@burtson-labs/bandit-engine 2.0.63 → 2.0.64

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.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/icons/lucide-icons.tsx","../src/services/tts/voiceService.ts","../src/services/tts/ttsSanitizer.ts","../src/services/tts/streaming-tts.ts","../src/services/tts/tts-client.ts","../src/store/voiceStore.ts","../src/hooks/useTTS.ts","../src/modals/chat-modal/ai-response-text-field.tsx","../src/shared/DocumentCard.tsx","../src/modals/knowlege/knowledge-file-modal.tsx","../src/utils/lowlight.ts","../src/utils/markdownRendering.tsx","../src/modals/chat-modal/ai-response-action-bar.tsx","../src/components/feedback/FeedbackModal.tsx","../src/theme/banditTheme.ts","../src/theme/corporateTheme.ts","../src/theme/neutralTheme.ts","../src/theme/cyberPunkTheme.ts","../src/theme/dawnTheme.ts","../src/theme/mistTheme.ts","../src/theme/sageTheme.ts","../src/theme/stoneTheme.ts","../src/theme/oceanTheme.ts","../src/theme/neonTheme.ts","../src/theme/forestTheme.ts","../src/theme/sunsetTheme.ts","../src/theme/volcanicTheme.ts","../src/theme/themeMap.ts","../src/components/feedback/FeedbackButton.tsx","../src/hooks/useNotificationService.ts","../src/chat/memory-modal.tsx"],"sourcesContent":["import React from \"react\";\nimport { Box } from \"@mui/material\";\nimport type { SxProps, Theme } from \"@mui/material/styles\";\nimport type { LucideIcon, LucideProps } from \"lucide-react\";\nimport {\n AlertTriangle,\n Archive,\n ArrowDown,\n ArrowUp,\n AudioLines,\n BookOpen,\n BookOpenText,\n Brain,\n Braces,\n Brush,\n BrushCleaning,\n Check,\n ChevronDown,\n ChevronLeft,\n ChevronUp,\n CircleAlert,\n CircleCheck,\n CirclePlus,\n Cloud,\n CloudCheck,\n CloudOff,\n Copy,\n Cpu,\n Database,\n Download,\n EarOff,\n Eye,\n FileText,\n FileUp,\n Folder,\n FolderOpen,\n Globe,\n Grip,\n History,\n House,\n Info,\n LayoutGrid,\n Link,\n List,\n Lock,\n Maximize,\n MessageSquare,\n Mic,\n Minimize,\n Minus,\n NotebookPen,\n Pencil,\n Pin,\n PinOff,\n Play,\n Plus,\n RectangleHorizontal,\n RectangleVertical,\n RefreshCw,\n Rocket,\n RotateCcw,\n RotateCw,\n Save,\n ScanFace,\n Search,\n Send,\n Settings,\n ShieldCheck,\n SlidersHorizontal,\n Sparkles,\n Square,\n TriangleAlert,\n Trash2,\n Type,\n Upload,\n User,\n UserCog,\n Users,\n Wifi,\n WifiHigh,\n WifiLow,\n WifiOff,\n Wrench,\n X,\n ZoomIn,\n ZoomOut,\n} from \"lucide-react\";\n\ntype MuiIconColor =\n | \"inherit\"\n | \"action\"\n | \"disabled\"\n | \"primary\"\n | \"secondary\"\n | \"error\"\n | \"info\"\n | \"success\"\n | \"warning\"\n | string;\n\ntype MuiIconFontSize = \"inherit\" | \"small\" | \"medium\" | \"large\" | number | string;\n\ninterface MuiLucideIconProps extends Omit<LucideProps, \"color\"> {\n color?: MuiIconColor;\n fontSize?: MuiIconFontSize;\n htmlColor?: string;\n sx?: SxProps<Theme>;\n titleAccess?: string;\n}\n\nconst fontSizeMap = {\n inherit: \"inherit\",\n small: \"1.25rem\",\n medium: \"1.5rem\",\n large: \"2.1875rem\",\n} as const;\n\nconst colorMap = {\n inherit: \"inherit\",\n action: \"action.active\",\n disabled: \"action.disabled\",\n primary: \"primary.main\",\n secondary: \"secondary.main\",\n error: \"error.main\",\n info: \"info.main\",\n success: \"success.main\",\n warning: \"warning.main\",\n} as const;\n\nconst toSxArray = (sx?: SxProps<Theme>) => (Array.isArray(sx) ? sx : sx ? [sx] : []);\n\nconst resolveFontSize = (fontSize: MuiIconFontSize = \"medium\") => {\n if (typeof fontSize === \"number\") {\n return `${fontSize}px`;\n }\n\n return fontSizeMap[fontSize as keyof typeof fontSizeMap] ?? fontSize;\n};\n\nconst resolveColor = (color: MuiIconColor = \"inherit\") =>\n colorMap[color as keyof typeof colorMap] ?? color;\n\nconst createMuiLucideIcon = (Icon: LucideIcon) => {\n const MuiLucideIcon = React.forwardRef<SVGSVGElement, MuiLucideIconProps>(\n function MuiLucideIcon(\n {\n sx,\n size,\n fontSize = \"medium\",\n color = \"inherit\",\n htmlColor,\n absoluteStrokeWidth = true,\n titleAccess,\n role,\n ...props\n },\n ref\n ) {\n const BoxIcon = Box as any;\n const forwardedProps = props as Record<string, unknown>;\n\n return (\n <BoxIcon\n component={Icon}\n ref={ref}\n size={size ?? \"1em\"}\n absoluteStrokeWidth={absoluteStrokeWidth}\n aria-hidden={titleAccess ? undefined : true}\n aria-label={titleAccess}\n role={titleAccess ? \"img\" : role}\n sx={[\n {\n color: htmlColor ?? resolveColor(color),\n fontSize: size ? undefined : resolveFontSize(fontSize),\n flexShrink: 0,\n },\n ...toSxArray(sx),\n ]}\n {...forwardedProps}\n />\n );\n }\n );\n\n MuiLucideIcon.displayName = `${Icon.displayName ?? Icon.name ?? \"Lucide\"}MuiIcon`;\n\n return MuiLucideIcon;\n};\n\nexport const AddIcon = createMuiLucideIcon(Plus);\nexport const CloudDoneIcon = createMuiLucideIcon(CloudCheck);\nexport const CloudOffIcon = createMuiLucideIcon(CloudOff);\nexport const ErrorOutlineIcon = createMuiLucideIcon(CircleAlert);\nexport const HomeIcon = createMuiLucideIcon(House);\nexport const NotesIcon = createMuiLucideIcon(NotebookPen);\nexport const NotesIconOutlined = createMuiLucideIcon(NotebookPen);\nexport const RecordVoiceOverIcon = createMuiLucideIcon(Mic);\nexport const SettingsIcon = createMuiLucideIcon(Settings);\nexport const SyncIcon = createMuiLucideIcon(RefreshCw);\nexport const ArrowUpwardIcon = createMuiLucideIcon(ArrowUp);\nexport const CloseIcon = createMuiLucideIcon(X);\nexport const ExpandMoreIcon = createMuiLucideIcon(ChevronDown);\nexport const FeedbackIcon = createMuiLucideIcon(MessageSquare);\nexport const GraphicEqIcon = createMuiLucideIcon(AudioLines);\nexport const HearingDisabledIcon = createMuiLucideIcon(EarOff);\nexport const PsychologyIcon = createMuiLucideIcon(Brain);\nexport const ArrowDownwardIcon = createMuiLucideIcon(ArrowDown);\nexport const CheckCircleIcon = createMuiLucideIcon(CircleCheck);\nexport const SignalWifi2BarIcon = createMuiLucideIcon(WifiLow);\nexport const SignalWifiStatusbar4BarIcon = createMuiLucideIcon(WifiHigh);\nexport const WifiOffIcon = createMuiLucideIcon(WifiOff);\nexport const DeleteIcon = createMuiLucideIcon(Trash2);\nexport const PushPinIcon = createMuiLucideIcon(Pin);\nexport const PushPinOutlinedIcon = createMuiLucideIcon(PinOff);\nexport const CloudSyncIcon = createMuiLucideIcon(RefreshCw);\nexport const RotateLeftIcon = createMuiLucideIcon(RotateCcw);\nexport const RotateRightIcon = createMuiLucideIcon(RotateCw);\nexport const ZoomInIcon = createMuiLucideIcon(ZoomIn);\nexport const ZoomOutIcon = createMuiLucideIcon(ZoomOut);\nexport const WifiIcon = createMuiLucideIcon(Wifi);\nexport const Crop169Icon = createMuiLucideIcon(RectangleHorizontal);\nexport const CropPortraitIcon = createMuiLucideIcon(RectangleVertical);\nexport const CropSquareIcon = createMuiLucideIcon(Square);\nexport const ContentCopyIcon = createMuiLucideIcon(Copy);\nexport const FileUploadIcon = createMuiLucideIcon(FileUp);\nexport const PreviewIcon = createMuiLucideIcon(Eye);\nexport const RestoreIcon = createMuiLucideIcon(RotateCcw);\nexport const SaveIcon = createMuiLucideIcon(Save);\nexport const UploadIcon = createMuiLucideIcon(Upload);\nexport const AutoAwesomeIcon = createMuiLucideIcon(Sparkles);\nexport const AutoStoriesIcon = createMuiLucideIcon(BookOpenText);\nexport const DescriptionIcon = createMuiLucideIcon(FileText);\nexport const ArticleIcon = createMuiLucideIcon(FileText);\nexport const CheckIcon = createMuiLucideIcon(Check);\nexport const CodeIcon = createMuiLucideIcon(Braces);\nexport const DataObjectIcon = createMuiLucideIcon(Braces);\nexport const DownloadIcon = createMuiLucideIcon(Download);\nexport const ErrorIcon = createMuiLucideIcon(CircleAlert);\nexport const FolderIcon = createMuiLucideIcon(Folder);\nexport const GroupIcon = createMuiLucideIcon(Users);\nexport const LockIcon = createMuiLucideIcon(Lock);\nexport const PersonIcon = createMuiLucideIcon(User);\nexport const PictureAsPdfIcon = createMuiLucideIcon(FileText);\nexport const PublicIcon = createMuiLucideIcon(Globe);\nexport const SearchIcon = createMuiLucideIcon(Search);\nexport const UploadFileIcon = createMuiLucideIcon(FileUp);\nexport const ViewListIcon = createMuiLucideIcon(List);\nexport const ViewModuleIcon = createMuiLucideIcon(LayoutGrid);\nexport const AddCircleIcon = createMuiLucideIcon(CirclePlus);\nexport const EditIcon = createMuiLucideIcon(Pencil);\nexport const PlayArrowIcon = createMuiLucideIcon(Play);\nexport const VisibilityIcon = createMuiLucideIcon(Eye);\nexport const HealthAndSafetyIcon = createMuiLucideIcon(ShieldCheck);\nexport const RefreshIcon = createMuiLucideIcon(RefreshCw);\nexport const EditNoteOutlinedIcon = createMuiLucideIcon(NotebookPen);\nexport const ManageAccountsOutlinedIcon = createMuiLucideIcon(UserCog);\nexport const PlayArrowRoundedIcon = createMuiLucideIcon(Play);\nexport const RocketLaunchOutlinedIcon = createMuiLucideIcon(Rocket);\nexport const ViewModuleOutlinedIcon = createMuiLucideIcon(LayoutGrid);\nexport const LinkIcon = createMuiLucideIcon(Link);\nexport const ArchiveIcon = createMuiLucideIcon(Archive);\nexport const FolderOpenIcon = createMuiLucideIcon(FolderOpen);\nexport const PublishIcon = createMuiLucideIcon(Upload);\nexport const ChatIcon = createMuiLucideIcon(MessageSquare);\nexport const CleaningServicesIcon = createMuiLucideIcon(BrushCleaning);\nexport const InfoIcon = createMuiLucideIcon(Info);\nexport const WarningIcon = createMuiLucideIcon(AlertTriangle);\nexport const BrushIcon = createMuiLucideIcon(Brush);\nexport const BuildIcon = createMuiLucideIcon(Wrench);\nexport const ChevronLeftIcon = createMuiLucideIcon(ChevronLeft);\nexport const CloudIcon = createMuiLucideIcon(Cloud);\nexport const FaceRetouchingNaturalIcon = createMuiLucideIcon(ScanFace);\nexport const MenuBookIcon = createMuiLucideIcon(BookOpen);\nexport const StorageIcon = createMuiLucideIcon(Database);\nexport const TuneIcon = createMuiLucideIcon(SlidersHorizontal);\nexport const SendIcon = createMuiLucideIcon(Send);\nexport const ExpandLessIcon = createMuiLucideIcon(ChevronUp);\nexport const HistoryIcon = createMuiLucideIcon(History);\nexport const InfoOutlinedIcon = createMuiLucideIcon(Info);\nexport const MemoryIcon = createMuiLucideIcon(Cpu);\nexport const FullscreenIcon = createMuiLucideIcon(Maximize);\nexport const FullscreenExitIcon = createMuiLucideIcon(Minimize);\nexport const MinimizeIcon = createMuiLucideIcon(Minus);\nexport const DragIndicatorIcon = createMuiLucideIcon(Grip);\nexport const MicIcon = createMuiLucideIcon(Mic);\nexport const TextFieldsIcon = createMuiLucideIcon(Type);\nexport const TriangleAlertIcon = createMuiLucideIcon(TriangleAlert);\n","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-4407-C60D14\nconst __banditFingerprint_tts_voiceServicets = 'BL-FP-A717E5-B818';\nconst __auditTrail_tts_voiceServicets = 'BL-AU-MGOIKVW0-637Y';\n// File: voiceService.ts | Path: src/services/tts/voiceService.ts | Hash: 4407b818\n\nimport { usePackageSettingsStore } from '../../store/packageSettingsStore';\nimport { authenticationService } from '../auth/authenticationService';\nimport { debugLogger } from '../logging/debugLogger';\n\nexport interface VoiceModelsResponse {\n models: string[];\n defaultModel: string;\n fallbackModel: string;\n}\n\nexport class VoiceService {\n private static instance: VoiceService;\n private cachedModels: VoiceModelsResponse | null = null;\n private cacheTimestamp: number = 0;\n private readonly CACHE_DURATION = 5 * 60 * 1000; // 5 minutes\n\n private constructor() {}\n\n public static getInstance(): VoiceService {\n if (!VoiceService.instance) {\n VoiceService.instance = new VoiceService();\n }\n return VoiceService.instance;\n }\n\n private getGatewayApiUrl(): string {\n return usePackageSettingsStore.getState().settings?.gatewayApiUrl || '';\n }\n\n private isValid(data: unknown): data is VoiceModelsResponse {\n if (typeof data !== 'object' || data === null) {\n return false;\n }\n\n const record = data as Record<string, unknown>;\n return Array.isArray(record.models) &&\n record.models.every((item) => typeof item === 'string') &&\n typeof record.defaultModel === 'string' &&\n typeof record.fallbackModel === 'string';\n }\n\n private isCacheValid(): boolean {\n return this.cachedModels !== null && \n (Date.now() - this.cacheTimestamp) < this.CACHE_DURATION;\n }\n\n public async fetchAvailableVoices(): Promise<VoiceModelsResponse> {\n // Return cached data if valid\n if (this.isCacheValid()) {\n debugLogger.debug('Returning cached voice models');\n return this.cachedModels!;\n }\n\n const gatewayUrl = this.getGatewayApiUrl();\n if (!gatewayUrl) {\n debugLogger.error('Gateway API URL not configured');\n throw new Error('Gateway API URL not configured');\n }\n\n // Check if we have a valid JWT token before making the request\n const token = authenticationService.getToken();\n if (!token) {\n debugLogger.warn('No JWT token available - skipping voice models fetch');\n const emptyModels: VoiceModelsResponse = {\n models: [],\n defaultModel: \"\",\n fallbackModel: \"\"\n };\n return emptyModels;\n }\n\n // Validate token is not expired\n if (authenticationService.isTokenExpired(token)) {\n debugLogger.warn('JWT token is expired - skipping voice models fetch');\n const emptyModels: VoiceModelsResponse = {\n models: [],\n defaultModel: \"\",\n fallbackModel: \"\"\n };\n return emptyModels;\n }\n\n try {\n debugLogger.debug('Fetching voice models from gateway API...');\n \n const response = await fetch(`${gatewayUrl}/tts/available-models`, {\n method: 'GET',\n headers: {\n 'Authorization': `Bearer ${token}`,\n 'Content-Type': 'application/json'\n }\n });\n\n if (!response.ok) {\n throw new Error(`Failed to fetch voice models: ${response.status}`);\n }\n\n const data = await response.json();\n \n if (!this.isValid(data)) {\n throw new Error('Invalid voice models response format');\n }\n\n // Cache the response\n this.cachedModels = data;\n this.cacheTimestamp = Date.now();\n\n debugLogger.debug('Voice models fetched successfully', data);\n return data;\n\n } catch (error) {\n debugLogger.error('Error fetching voice models:', { error: error instanceof Error ? error.message : String(error) });\n \n const emptyModels: VoiceModelsResponse = {\n models: [],\n defaultModel: \"\",\n fallbackModel: \"\"\n };\n\n debugLogger.warn('Voice service unavailable - no models available');\n return emptyModels;\n }\n }\n\n public clearCache(): void {\n this.cachedModels = null;\n this.cacheTimestamp = 0;\n debugLogger.debug('Voice models cache cleared');\n }\n}\n\nexport const voiceService = VoiceService.getInstance();\n","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-DB79-A74813\nconst __banditFingerprint_tts_ttsSanitizerts = 'BL-FP-EBEA84-E4AB';\nconst __auditTrail_tts_ttsSanitizerts = 'BL-AU-MGOIKVW0-B1P2';\n// File: ttsSanitizer.ts | Path: src/services/tts/ttsSanitizer.ts | Hash: db79e4ab\n\nexport const stripHtmlTags = (text: string): string =>\n text.replace(/<[^>]*>/g, '');\n\nexport const stripMarkdown = (text: string): string =>\n text.replace(/[*_~`]+/g, '');\n\nexport const stripEmojis = (text: string): string =>\n text.replace(/[\\p{Emoji_Presentation}\\p{Extended_Pictographic}]/gu, '');\n\nexport const simplifyLinks = (text: string): string =>\n text.replace(/\\[([^\\]]+)\\]\\([^)]+\\)/g, '$1');\n\nexport const stripListBullets = (text: string): string =>\n text.replace(/^\\s*[*\\-]\\s+/gm, '');\n\nexport const normalizeWhitespace = (text: string): string =>\n text.replace(/\\s{2,}/g, ' ').trim();\n\nexport const sanitizeForTTS = (text: string): string => {\n return normalizeWhitespace(\n stripListBullets(\n stripEmojis(\n stripMarkdown(\n simplifyLinks(\n stripHtmlTags(text)\n )\n )\n )\n )\n );\n};\n","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-95DD-07F17E\nconst __banditFingerprint_tts_streamingttsts = 'BL-FP-81BC0B-12CA';\nconst __auditTrail_tts_streamingttsts = 'BL-AU-MGOIKVW0-6I17';\n// File: streaming-tts.ts | Path: src/services/tts/streaming-tts.ts | Hash: 95dd12ca\n\nimport { Observable, BehaviorSubject, Subject } from 'rxjs';\nimport type { Subscriber } from 'rxjs';\nimport { debugLogger } from '../logging/debugLogger';\nimport { usePackageSettingsStore } from '../../store/packageSettingsStore';\nimport { getOrAppendAuthHeader } from './tts-client';\n\nexport enum TTSState {\n IDLE = 'IDLE',\n LOADING = 'LOADING',\n PLAYING = 'PLAYING',\n PAUSED = 'PAUSED',\n ERROR = 'ERROR'\n}\n\nexport interface TTSProgress {\n currentTime: number;\n duration: number;\n percentage: number;\n buffered: number;\n state: TTSState;\n}\n\nexport interface TTSOptions {\n useStreaming?: boolean;\n useRealtime?: boolean;\n onStateChange?: (state: TTSState) => void;\n onProgress?: (progress: TTSProgress) => void;\n}\n\n/**\n * Streaming TTS client with playback controls\n */\nexport class StreamingTTSClient {\n private static instance: StreamingTTSClient;\n \n private audio: HTMLAudioElement | null = null;\n private objectUrl: string | null = null;\n private controller: AbortController | null = null;\n \n // Store event handler references for proper cleanup\n private audioHandlers = new Map<string, EventListener>();\n \n // State management\n private stateSubject = new BehaviorSubject<TTSState>(TTSState.IDLE);\n private progressSubject = new Subject<TTSProgress>();\n \n private constructor() {}\n \n public static getInstance(): StreamingTTSClient {\n if (!StreamingTTSClient.instance) {\n StreamingTTSClient.instance = new StreamingTTSClient();\n }\n return StreamingTTSClient.instance;\n }\n \n /**\n * Get current state\n */\n public getCurrentState(): TTSState {\n return this.stateSubject.value;\n }\n \n /**\n * Get state changes as observable\n */\n public getStateChanges(): Observable<TTSState> {\n return this.stateSubject.asObservable();\n }\n \n /**\n * Get progress updates as observable\n */\n public getProgress(): Observable<TTSProgress> {\n return this.progressSubject.asObservable();\n }\n \n /**\n * Speak text with simple streaming\n */\n public speakStream(text: string, voice: string, options: TTSOptions = {}): Observable<void> {\n return new Observable<void>((subscriber) => {\n this.performSimpleStreaming(text, voice, options, subscriber);\n });\n }\n \n /**\n * Simple streaming implementation - no queues, just direct playback\n */\n private async performSimpleStreaming(\n text: string,\n voice: string,\n options: TTSOptions,\n subscriber: Subscriber<void>\n ): Promise<void> {\n try {\n // Clean up any previous audio completely\n this.cleanup();\n \n // Brief delay to ensure cleanup is complete\n await new Promise(resolve => setTimeout(resolve, 10));\n \n // Set loading state\n this.setState(TTSState.LOADING);\n \n const gatewayUrl = usePackageSettingsStore.getState().settings?.gatewayApiUrl;\n if (!gatewayUrl) {\n throw new Error('Gateway API URL not configured');\n }\n \n // Create abort controller for this request\n this.controller = new AbortController();\n \n // Make the TTS request\n const response = await fetch(`${gatewayUrl}/tts`, {\n method: 'POST',\n headers: {\n ...getOrAppendAuthHeader(),\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n Text: text,\n ModelName: voice\n }),\n signal: this.controller.signal\n });\n \n // Check if request was aborted\n if (this.controller.signal.aborted) {\n subscriber.complete();\n return;\n }\n \n if (!response.ok) {\n throw new Error(`TTS request failed: ${response.status} ${response.statusText}`);\n }\n \n // Get the audio blob\n const audioBlob = await response.blob();\n \n // Check if request was aborted after blob download\n if (this.controller.signal.aborted) {\n subscriber.complete();\n return;\n }\n \n if (!audioBlob || audioBlob.size === 0) {\n throw new Error('Received empty audio response');\n }\n \n // Create object URL and audio element\n this.objectUrl = URL.createObjectURL(audioBlob);\n this.audio = new Audio(this.objectUrl);\n \n // Set up audio element\n this.audio.autoplay = false;\n this.audio.preload = 'auto';\n \n // Set up event listeners\n this.setupAudioListeners(subscriber, options);\n \n // Check one more time if we were stopped before starting to load\n if (this.controller.signal.aborted) {\n this.cleanup();\n subscriber.complete();\n return;\n }\n \n // Start loading the audio\n this.audio.load();\n \n } catch (error) {\n // Handle abort errors gracefully\n if (error instanceof Error && error.name === 'AbortError') {\n this.setState(TTSState.IDLE);\n subscriber.complete();\n return;\n }\n \n debugLogger.error('TTS streaming failed:', { error: error instanceof Error ? error.message : String(error) });\n this.setState(TTSState.ERROR);\n subscriber.error(error);\n }\n }\n \n /**\n * Set up audio event listeners\n */\n private setupAudioListeners(subscriber: Subscriber<void>, options: TTSOptions): void {\n if (!this.audio) return;\n \n // Clear any existing handlers\n this.audioHandlers.clear();\n \n // When audio can start playing\n const canPlayThroughHandler = () => {\n // Check if we were stopped during loading\n if (!this.audio || this.getCurrentState() !== TTSState.LOADING || (this.controller && this.controller.signal.aborted)) {\n return;\n }\n \n this.setState(TTSState.PLAYING);\n this.audio.play().catch((error) => {\n debugLogger.error('Failed to start audio playback:', error);\n this.setState(TTSState.ERROR);\n subscriber.error(error);\n });\n };\n \n // When audio starts playing\n const playHandler = () => {\n this.setState(TTSState.PLAYING);\n subscriber.next();\n };\n \n // When audio is paused\n const pauseHandler = () => {\n if (this.getCurrentState() !== TTSState.IDLE) {\n this.setState(TTSState.PAUSED);\n }\n };\n \n // When audio ends\n const endedHandler = () => {\n this.setState(TTSState.IDLE);\n \n // Clear handlers to prevent memory leaks\n this.clearAudioHandlers();\n \n subscriber.complete();\n };\n \n // Progress updates\n const timeUpdateHandler = () => {\n if (this.audio && this.audio.duration) {\n const buffered = this.audio.buffered.length > 0 ? this.audio.buffered.end(0) : 0;\n const progress: TTSProgress = {\n currentTime: this.audio.currentTime,\n duration: this.audio.duration,\n percentage: (this.audio.currentTime / this.audio.duration) * 100,\n buffered,\n state: this.getCurrentState()\n };\n this.progressSubject.next(progress);\n if (options.onProgress) {\n options.onProgress(progress);\n }\n }\n };\n \n // Error handling\n const errorHandler = (event: Event) => {\n debugLogger.error('Audio playback error:', event);\n this.setState(TTSState.ERROR);\n subscriber.error(new Error('Audio playback failed'));\n };\n \n // Store handler references for cleanup\n this.audioHandlers.set('canplaythrough', canPlayThroughHandler);\n this.audioHandlers.set('play', playHandler);\n this.audioHandlers.set('pause', pauseHandler);\n this.audioHandlers.set('ended', endedHandler);\n this.audioHandlers.set('timeupdate', timeUpdateHandler);\n this.audioHandlers.set('error', errorHandler);\n \n // Add event listeners\n this.audio.addEventListener('canplaythrough', canPlayThroughHandler);\n this.audio.addEventListener('play', playHandler);\n this.audio.addEventListener('pause', pauseHandler);\n this.audio.addEventListener('ended', endedHandler);\n this.audio.addEventListener('timeupdate', timeUpdateHandler);\n this.audio.addEventListener('error', errorHandler);\n }\n \n /**\n * Stop playback\n */\n public stop(): void {\n // Abort any ongoing fetch request\n if (this.controller) {\n this.controller.abort();\n this.controller = null;\n }\n \n // Stop and reset audio\n if (this.audio) {\n this.audio.pause();\n this.audio.currentTime = 0;\n \n // Remove all event listeners to prevent any further callbacks\n this.audio.onloadstart = null;\n this.audio.oncanplaythrough = null;\n this.audio.onplay = null;\n this.audio.onpause = null;\n this.audio.onended = null;\n this.audio.ontimeupdate = null;\n this.audio.onerror = null;\n }\n \n // Set to IDLE state first, then cleanup\n this.setState(TTSState.IDLE);\n this.cleanup();\n }\n \n /**\n * Pause playback\n */\n public pause(): void {\n if (this.audio && this.getCurrentState() === TTSState.PLAYING) {\n this.audio.pause();\n this.setState(TTSState.PAUSED);\n }\n }\n \n /**\n * Resume playback\n */\n public resume(): void {\n if (this.audio && this.getCurrentState() === TTSState.PAUSED) {\n this.audio.play().catch((error) => {\n debugLogger.error('Failed to resume audio:', error);\n this.setState(TTSState.ERROR);\n });\n this.setState(TTSState.PLAYING);\n }\n }\n \n /**\n * Set state and notify observers\n */\n private setState(state: TTSState): void {\n this.stateSubject.next(state);\n }\n \n /**\n * Reset the TTS client completely - useful for model changes\n */\n public reset(): void {\n // Stop everything first\n this.stop();\n \n // Force reset all internal state\n this.audio = null;\n this.objectUrl = null;\n this.controller = null;\n \n // Reset state subjects\n this.stateSubject.next(TTSState.IDLE);\n }\n\n /**\n * Clear only the audio event handlers\n */\n private clearAudioHandlers(): void {\n if (this.audio) {\n // Remove all event listeners using stored handler references\n for (const [eventType, handler] of this.audioHandlers) {\n this.audio.removeEventListener(eventType, handler);\n }\n }\n this.audioHandlers.clear();\n }\n\n /**\n * Clean up resources\n */\n private cleanup(): void {\n if (this.audio) {\n // Remove all event listeners using stored handler references\n this.clearAudioHandlers();\n \n // Stop and reset audio\n try {\n this.audio.pause();\n this.audio.currentTime = 0;\n this.audio.src = '';\n this.audio.load();\n } catch (error) {\n // Ignore cleanup errors\n }\n \n this.audio = null;\n }\n \n if (this.objectUrl) {\n URL.revokeObjectURL(this.objectUrl);\n this.objectUrl = null;\n }\n \n if (this.controller) {\n this.controller.abort();\n this.controller = null;\n }\n }\n}\n\n// Export singleton instance\nexport const getStreamingTTSClient = (): StreamingTTSClient => {\n return StreamingTTSClient.getInstance();\n};\n\n// Convenience functions\nexport const speakStream = (text: string, voice: string, options?: TTSOptions): Observable<void> => {\n return getStreamingTTSClient().speakStream(text, voice, options);\n};\n\nexport const stopTTS = (): void => {\n getStreamingTTSClient().stop();\n};\n\nexport const resetTTS = (): void => {\n getStreamingTTSClient().reset();\n};\n\nexport const pauseTTS = (): void => {\n getStreamingTTSClient().pause();\n};\n\nexport const resumeTTS = (): void => {\n getStreamingTTSClient().resume();\n};\n\nexport const getTTSState = (): TTSState => {\n return getStreamingTTSClient().getCurrentState();\n};\n","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-4A41-987E60\nconst __banditFingerprint_tts_ttsclientts = 'BL-FP-80ED0B-94B2';\nconst __auditTrail_tts_ttsclientts = 'BL-AU-MGOIKVW0-9HOM';\n// File: tts-client.ts | Path: src/services/tts/tts-client.ts | Hash: 4a4194b2\n\nimport { Observable, Subscription } from 'rxjs';\nimport { authenticationService } from \"../auth/authenticationService\";\nimport { useVoiceStore } from '../../store/voiceStore';\nimport { sanitizeForTTS } from './ttsSanitizer';\nimport { usePackageSettingsStore } from '../../store/packageSettingsStore';\nimport { debugLogger } from '../logging/debugLogger';\n\nconst getGatewayApiUrl = () => usePackageSettingsStore.getState().settings?.gatewayApiUrl || '';\n\n/**\n * An observable that emits when the generated audio has begun playing. \n * @param text The text to be spoken\n * @param voice The voice to be used (will fallback to default if not available)\n * @returns An observable that emits when the audio has started playing\n */\nexport const speak = (text: string, voice: string) => {\n if (!text) {\n debugLogger.warn(\"No text provided to TTS\");\n return new Observable<void>((subscriber) => {\n subscriber.complete();\n });\n }\n\n const voiceState = useVoiceStore.getState();\n const availableVoices = voiceState.availableVoices;\n \n // Check if voice service is available\n if (!voiceState.isServiceAvailable || availableVoices.length === 0) {\n debugLogger.warn(\"TTS service unavailable - no voices configured\");\n return new Observable<void>((subscriber) => {\n subscriber.error(new Error('TTS service unavailable'));\n });\n }\n \n // Validate voice selection\n if (availableVoices.indexOf(voice) === -1) {\n if (voiceState.fallbackVoice && availableVoices.indexOf(voiceState.fallbackVoice) !== -1) {\n debugLogger.warn(`Voice model ${voice} is not available. Defaulting to '${voiceState.fallbackVoice}'`);\n voice = voiceState.fallbackVoice;\n } else {\n debugLogger.warn(`Voice model ${voice} is not available and no fallback configured`);\n return new Observable<void>((subscriber) => {\n subscriber.error(new Error(`Voice ${voice} not available`));\n });\n }\n }\n return new Observable<void>((subscriber) => {\n const controller = new AbortController();\n const signal = controller.signal;\n\n let audio: HTMLAudioElement | null = null;\n let objectUrl: string | null = null;\n\n const handleAudio = async (response: Response) => {\n if (!response.ok) throw new Error('Failed to fetch TTS');\n const blob = await response.blob();\n objectUrl = URL.createObjectURL(blob);\n audio = new Audio(objectUrl);\n audio.play();\n audio.onended = () => subscriber.complete();\n audio.onerror = (e) => subscriber.error(e);\n subscriber.next();\n };\n\n const handleError = (err: Error) => {\n if (signal.aborted) {\n subscriber.complete();\n } else {\n subscriber.error(err);\n }\n };\n\n // Use gateway API for all TTS requests\n debugLogger.debug('Fetching TTS from gateway API...');\n \n const gatewayUrl = getGatewayApiUrl();\n if (!gatewayUrl) {\n debugLogger.error('Gateway API URL not configured');\n subscriber.error(new Error('TTS service not configured'));\n return;\n }\n\n const requestBody = {\n Text: sanitizeForTTS(text),\n ModelName: voice\n };\n\n const ttsRequest: RequestInit = {\n method: 'POST',\n headers: {\n ...getOrAppendAuthHeader(),\n 'Content-Type': 'application/json'\n },\n mode: 'cors',\n body: JSON.stringify(requestBody),\n signal,\n };\n\n fetch(`${gatewayUrl}/tts`, ttsRequest)\n .then(handleAudio)\n .catch(handleError);\n\n const teardown = () => {\n controller.abort();\n if (audio) {\n audio.pause();\n audio.src = '';\n audio = null;\n }\n if (objectUrl) {\n URL.revokeObjectURL(objectUrl);\n objectUrl = null;\n }\n };\n\n return new Subscription(() => teardown());\n });\n};\n\nexport const getOrAppendAuthHeader = (existing: Record<string, string> = {}) => {\n const token = authenticationService.getToken();\n if (token) {\n existing[\"Authorization\"] = `Bearer ${token}`;\n return existing;\n }\n debugLogger.warn(\"No token found, using empty string for Authorization header\");\n existing[\"Authorization\"] = \"\";\n\n return existing;\n}\n","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-6EA5-62113F\nconst __banditFingerprint_store_voiceStorets = 'BL-FP-BD24FF-7D8B';\nconst __auditTrail_store_voiceStorets = 'BL-AU-MGOIKVW6-SCLC';\n// File: voiceStore.ts | Path: src/store/voiceStore.ts | Hash: 6ea57d8b\n\nimport { create } from \"zustand\";\nimport { voiceService, VoiceModelsResponse } from \"../services/tts/voiceService\";\nimport { debugLogger } from \"../services/logging/debugLogger\";\nimport { stopTTS } from \"../services/tts/streaming-tts\";\n\n// Auto-initialize voice loading when store is created\nlet autoInitialized = false;\n\nexport interface VoiceState {\n availableVoices: string[];\n selectedVoice: string;\n defaultVoice: string;\n fallbackVoice: string;\n isLoading: boolean;\n isServiceAvailable: boolean;\n initialized: boolean;\n setSelectedVoice: (voice: string) => void;\n loadVoicesFromAPI: () => Promise<void>;\n refreshVoices: () => Promise<void>;\n forceInitialize: () => Promise<void>;\n}\n\nexport const useVoiceStore = create<VoiceState>((set, get) => ({\n availableVoices: [],\n selectedVoice: \"\",\n defaultVoice: \"\", \n fallbackVoice: \"\",\n isLoading: false,\n isServiceAvailable: false,\n initialized: false,\n \n setSelectedVoice: (voice) => {\n const currentVoice = get().selectedVoice;\n debugLogger.debug('Setting selected voice', { \n previousVoice: currentVoice, \n newVoice: voice,\n isChange: currentVoice !== voice\n });\n \n // If voice is actually changing, immediately stop current TTS\n if (currentVoice && currentVoice !== voice) {\n debugLogger.debug('🔄 Voice changing in store - stopping TTS immediately', {\n from: currentVoice,\n to: voice\n });\n stopTTS();\n }\n \n set({ selectedVoice: voice });\n },\n \n loadVoicesFromAPI: async () => {\n const state = get();\n if (state.isLoading) return; // Prevent concurrent requests\n \n set({ isLoading: true, initialized: true });\n \n try {\n const voiceData: VoiceModelsResponse = await voiceService.fetchAvailableVoices();\n \n const hasVoices = voiceData.models.length > 0;\n let finalSelectedVoice = state.selectedVoice;\n \n if (hasVoices) {\n // Validate and set selected voice\n if (finalSelectedVoice && voiceData.models.includes(finalSelectedVoice)) {\n // Keep current selection if it's still available\n } else {\n finalSelectedVoice = voiceData.defaultModel;\n }\n \n set({\n isServiceAvailable: true,\n availableVoices: voiceData.models,\n defaultVoice: voiceData.defaultModel,\n fallbackVoice: voiceData.fallbackModel,\n selectedVoice: finalSelectedVoice,\n isLoading: false\n });\n } else {\n set({\n isServiceAvailable: false,\n isLoading: false\n });\n }\n } catch (error) {\n debugLogger.error('Failed to load voice models', { \n error: error instanceof Error ? error.message : String(error)\n });\n set({\n isServiceAvailable: false,\n isLoading: false\n });\n }\n },\n \n refreshVoices: async () => {\n const currentSelection = get().selectedVoice;\n voiceService.clearCache();\n await get().loadVoicesFromAPI();\n // Restore selection if it's still valid\n const { availableVoices } = get();\n if (currentSelection && availableVoices.includes(currentSelection)) {\n set({ selectedVoice: currentSelection });\n }\n },\n \n forceInitialize: async () => {\n const state = get();\n if (!state.initialized || state.availableVoices.length === 0) {\n debugLogger.debug('Force initializing voice store...');\n await state.loadVoicesFromAPI();\n }\n }\n}));\n\n// Trigger auto-initialization with a slight delay to ensure package settings are ready\nif (!autoInitialized) {\n autoInitialized = true;\n setTimeout(() => {\n debugLogger.debug('Auto-initializing voice store...');\n useVoiceStore.getState().forceInitialize().catch((error) => {\n debugLogger.warn('Auto-initialization failed:', error);\n });\n }, 1000); // 1 second delay to ensure gateway URL is available\n}\n","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-3660-755F00\nconst __banditFingerprint_hooks_useTTSts = 'BL-FP-2B6BB1-5F41';\nconst __auditTrail_hooks_useTTSts = 'BL-AU-MGOIKVVF-ZUAN';\n// File: useTTS.ts | Path: src/hooks/useTTS.ts | Hash: 36605f41\n\nimport { useState, useEffect, useCallback, useRef, useMemo } from 'react';\nimport { Subscription } from 'rxjs';\nimport { \n getStreamingTTSClient, \n TTSState, \n TTSProgress, \n TTSOptions,\n stopTTS\n} from '../services/tts/streaming-tts';\n\n// Re-export types for convenience\nexport type { TTSState, TTSProgress, TTSOptions };\nimport { useVoiceStore } from '../store/voiceStore';\nimport { usePreferencesStore } from '../store/preferencesStore';\nimport { usePackageSettingsStore } from '../store/packageSettingsStore';\nimport { useModelStore } from '../store/modelStore';\nimport { debugLogger } from '../services/logging/debugLogger';\n\nexport interface UseTTSReturn {\n // State\n isPlaying: boolean;\n isPaused: boolean;\n isLoading: boolean;\n error: string | null;\n progress: TTSProgress | null;\n state: TTSState;\n \n // Actions\n speak: (text: string, options?: TTSOptions) => Promise<void>;\n stop: () => void;\n pause: () => void;\n resume: () => void;\n forcePlay: () => Promise<void>;\n \n // Utilities\n isAvailable: boolean;\n currentVoice: string;\n}\n\n/**\n * React hook for TTS with streaming support and playback controls\n */\nexport const useTTS = (): UseTTSReturn => {\n const [state, setState] = useState<TTSState>(TTSState.IDLE);\n const [progress, setProgress] = useState<TTSProgress | null>(null);\n const [error, setError] = useState<string | null>(null);\n \n // Store references\n const progressSubscriptionRef = useRef<Subscription | null>(null);\n const stateSubscriptionRef = useRef<Subscription | null>(null);\n const speakSubscriptionRef = useRef<Subscription | null>(null);\n const previousVoiceRef = useRef<string | null>(null);\n const previousModelRef = useRef<string | null>(null);\n const requestIdRef = useRef<number>(0); // Track request IDs to prevent out-of-order audio\n \n // Store hooks\n const { selectedVoice, isServiceAvailable } = useVoiceStore();\n const { preferences } = usePreferencesStore();\n const { settings: packageSettings } = usePackageSettingsStore();\n const { selectedModel } = useModelStore();\n \n // Check if TTS is available\n const isAvailable = !!(packageSettings?.gatewayApiUrl && preferences.ttsEnabled && isServiceAvailable);\n \n // Get TTS client\n const ttsClient = useMemo(() => getStreamingTTSClient(), []);\n\n // Set up subscriptions for state and progress updates\n useEffect(() => {\n // Clean up existing subscriptions\n if (progressSubscriptionRef.current) {\n progressSubscriptionRef.current.unsubscribe();\n }\n if (stateSubscriptionRef.current) {\n stateSubscriptionRef.current.unsubscribe();\n }\n\n // Subscribe to progress updates\n progressSubscriptionRef.current = ttsClient.getProgress().subscribe({\n next: (newProgress: TTSProgress) => {\n setProgress(newProgress);\n },\n error: (err: unknown) => {\n debugLogger.error('TTS progress subscription error', { error: err });\n }\n });\n\n // Subscribe to state changes\n stateSubscriptionRef.current = ttsClient.getStateChanges().subscribe({\n next: (newState: TTSState) => {\n setState(newState);\n \n // Clear error when state changes away from error\n if (newState !== TTSState.ERROR && error) {\n setError(null);\n }\n },\n error: (err: unknown) => {\n debugLogger.error('TTS state subscription error', { error: err });\n }\n });\n\n // Cleanup on unmount\n return () => {\n if (progressSubscriptionRef.current) {\n progressSubscriptionRef.current.unsubscribe();\n }\n if (stateSubscriptionRef.current) {\n stateSubscriptionRef.current.unsubscribe();\n }\n };\n }, [error, ttsClient]);\n\n // Handle voice and model changes - stop current playback when they change\n useEffect(() => {\n // Check if this is an actual voice or model change (not initial mount)\n const isVoiceChange = previousVoiceRef.current !== null && \n previousVoiceRef.current !== selectedVoice;\n const isModelChange = previousModelRef.current !== null && \n previousModelRef.current !== selectedModel;\n \n // If voice or model changed, stop current playback\n if (isVoiceChange || isModelChange) {\n // Invalidate current request to prevent any delayed audio\n requestIdRef.current++;\n \n // Clear any active subscription immediately\n if (speakSubscriptionRef.current) {\n speakSubscriptionRef.current.unsubscribe();\n speakSubscriptionRef.current = null;\n }\n \n // For model changes, do a complete reset to clear any bad state\n if (isModelChange) {\n ttsClient.reset();\n } else {\n // For voice changes, just stop\n ttsClient.stop();\n }\n \n setState(TTSState.IDLE);\n setError(null);\n \n // Update references immediately to prevent re-triggering\n previousVoiceRef.current = selectedVoice;\n previousModelRef.current = selectedModel;\n \n return; // Exit early to prevent double update\n }\n \n // Update the references for non-change cases\n if (previousVoiceRef.current === null) {\n previousVoiceRef.current = selectedVoice;\n }\n if (previousModelRef.current === null) {\n previousModelRef.current = selectedModel;\n }\n }, [selectedVoice, selectedModel, ttsClient]);\n\n // Speak function\n const speak = useCallback(async (text: string, options: TTSOptions = {}): Promise<void> => {\n if (!isAvailable) {\n const errorMsg = 'TTS service is not available';\n setError(errorMsg);\n throw new Error(errorMsg);\n }\n\n if (!text?.trim()) {\n const errorMsg = 'No text provided';\n setError(errorMsg);\n throw new Error(errorMsg);\n }\n\n try {\n setError(null);\n \n // Stop any current playback\n ttsClient.stop();\n \n // Also update previous voice and model references immediately\n previousVoiceRef.current = selectedVoice;\n previousModelRef.current = selectedModel;\n \n // Get the most current voice from store to avoid timing issues\n const currentVoice = useVoiceStore.getState().selectedVoice;\n const voiceToUse = currentVoice || selectedVoice;\n if (!voiceToUse) {\n throw new Error('No voice selected');\n }\n \n if (speakSubscriptionRef.current) {\n speakSubscriptionRef.current.unsubscribe();\n speakSubscriptionRef.current = null;\n \n // Add a small delay to ensure the previous audio is completely stopped\n await new Promise(resolve => setTimeout(resolve, 50));\n }\n\n // Generate a unique request ID to ensure we only play the latest request\n const currentRequestId = ++requestIdRef.current;\n\n // Set loading state immediately\n setState(TTSState.LOADING);\n\n // Enable simple streaming\n const ttsOptions: TTSOptions = {\n useStreaming: true,\n useRealtime: true,\n ...options,\n onStateChange: (newState: TTSState) => {\n setState(newState);\n if (options.onStateChange) {\n options.onStateChange(newState);\n }\n },\n onProgress: (newProgress: TTSProgress) => {\n setProgress(newProgress);\n if (options.onProgress) {\n options.onProgress(newProgress);\n }\n }\n };\n\n debugLogger.debug('Starting TTS streaming');\n\n // Start speaking with simple streaming\n speakSubscriptionRef.current = ttsClient.speakStream(text, voiceToUse, ttsOptions).subscribe({\n next: () => {\n // Only process if this is still the latest request\n if (currentRequestId === requestIdRef.current) {\n // Audio started playing successfully\n }\n },\n error: (err: unknown) => {\n // Only process errors for the latest request\n if (currentRequestId === requestIdRef.current) {\n const errorMessage = err instanceof Error && err.message ? err.message : 'TTS playback failed';\n debugLogger.error('TTS playback failed', { error: err });\n setError(errorMessage);\n setState(TTSState.ERROR);\n }\n },\n complete: () => {\n // Only process completion for the latest request\n if (currentRequestId === requestIdRef.current) {\n setState(TTSState.IDLE);\n }\n }\n });\n\n } catch (err: unknown) {\n const errorMsg = err instanceof Error && err.message ? err.message : 'TTS failed to start';\n setError(errorMsg);\n setState(TTSState.ERROR);\n throw err instanceof Error ? err : new Error(errorMsg);\n }\n }, [isAvailable, selectedVoice, selectedModel, ttsClient]);\n\n // Stop function\n const stop = useCallback(() => {\n const currentRequestId = requestIdRef.current;\n \n // IMMEDIATELY update the hook state to IDLE for instant UI feedback\n setState(TTSState.IDLE);\n \n // Invalidate the current request to prevent any delayed audio\n requestIdRef.current++;\n \n // Unsubscribe and clear the subscription\n if (speakSubscriptionRef.current) {\n speakSubscriptionRef.current.unsubscribe();\n speakSubscriptionRef.current = null;\n }\n \n // Call the client stop method\n ttsClient.stop();\n \n // Clear any errors\n setError(null);\n }, [ttsClient]);\n\n // Pause function\n const pause = useCallback(() => {\n ttsClient.pause();\n }, [ttsClient]);\n\n // Resume function\n const resume = useCallback(() => {\n ttsClient.resume();\n }, [ttsClient]);\n\n // Force play function (simplified)\n const forcePlay = useCallback(async (): Promise<void> => {\n try {\n // For simple streaming, we don't need complex force play logic\n // The audio element should handle autoplay restrictions automatically\n if (ttsClient.getCurrentState() === TTSState.PAUSED) {\n ttsClient.resume();\n }\n } catch (err: unknown) {\n const errorMsg = err instanceof Error && err.message ? err.message : 'Failed to force play audio';\n setError(errorMsg);\n throw err instanceof Error ? err : new Error(errorMsg);\n }\n }, [ttsClient]);\n\n // Cleanup on unmount\n useEffect(() => {\n return () => {\n if (speakSubscriptionRef.current) {\n speakSubscriptionRef.current.unsubscribe();\n }\n if (progressSubscriptionRef.current) {\n progressSubscriptionRef.current.unsubscribe();\n }\n if (stateSubscriptionRef.current) {\n stateSubscriptionRef.current.unsubscribe();\n }\n };\n }, []);\n\n // Stop any playback when TTS becomes unavailable\n useEffect(() => {\n if (!isAvailable && (state === TTSState.PLAYING || state === TTSState.LOADING)) {\n stop();\n }\n }, [isAvailable, state, stop]);\n\n return {\n // State\n isPlaying: state === TTSState.PLAYING,\n isPaused: state === TTSState.PAUSED,\n isLoading: state === TTSState.LOADING,\n error,\n progress,\n state,\n \n // Actions\n speak,\n stop,\n pause,\n resume,\n forcePlay,\n \n // Utilities\n isAvailable,\n currentVoice: selectedVoice\n };\n};\n\n/**\n * Global TTS controls hook - useful for global stop functionality\n */\nexport const useGlobalTTS = () => {\n const stopAll = useCallback(() => {\n stopTTS();\n }, []);\n\n return {\n stopAll\n };\n};\n","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-02BB-817687\nconst __banditFingerprint_chatmodal_airesponsetextfieldtsx = 'BL-FP-5F1C0D-1D01';\nconst __auditTrail_chatmodal_airesponsetextfieldtsx = 'BL-AU-MGOIKVVM-OZSJ';\n// File: ai-response-text-field.tsx | Path: src/modals/chat-modal/ai-response-text-field.tsx | Hash: 02bb1d01\n\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport DocumentCard from \"../../shared/DocumentCard\";\nimport KnowledgeFileModal from \"../../modals/knowlege/knowledge-file-modal\";\nimport { KnowledgeDoc } from \"../../store/knowledgeStore\";\nimport { useKnowledgeStore } from \"../../chat/hooks/useKnowledgeStore\";\nimport { useTheme, alpha } from \"@mui/material/styles\";\nimport type { Theme } from \"@mui/material/styles\";\nimport ReactMarkdown, { type Components as ReactMarkdownComponents, type ExtraProps as ReactMarkdownExtraProps } from \"react-markdown\";\nimport remarkGfm from \"remark-gfm\";\nimport rehypeRaw from \"rehype-raw\";\nimport rehypeSanitize from \"rehype-sanitize\";\nimport { debugLogger } from \"../../services/logging/debugLogger\";\nimport {\n Avatar,\n Box,\n IconButton,\n Modal,\n Tooltip,\n Typography,\n Table,\n TableBody,\n TableCell,\n TableContainer,\n TableHead,\n TableRow,\n Paper,\n} from \"@mui/material\";\nimport type { Element, Text, Root } from \"hast\";\nimport { getHighlightTree } from \"../../utils/lowlight\";\nimport { markdownSanitizeSchema, renderLowlightChildren } from \"../../utils/markdownRendering\";\nimport { CheckIcon, CloseIcon, ContentCopyIcon } from \"../../icons/lucide-icons\";\nconst brainIcon = \"https://cdn.burtson.ai/images/brain-icon.png\";\n\nimport AiResponseActionsBar from \"./ai-response-action-bar\";\n\ninterface AIResponseTextFieldProps {\n question: string;\n response: string | React.ReactNode;\n responseText?: string; // raw markdown/text used for actions bar (feedback/tts/copy)\n images?: string[];\n backgroundColor?: string;\n memoryUpdated?: boolean;\n sourceFiles?: SourceFileInput[];\n isMobile?: boolean;\n cancelled?: boolean;\n}\n\nconst normalizeTables = (markdown: string): string => {\n const lines = markdown.split(\"\\n\");\n const output: string[] = [];\n let inTable = false;\n let tableRows: string[][] = [];\n\n const flushTable = () => {\n if (tableRows.length === 0) return;\n\n const maxCols = Math.max(...tableRows.map((r) => r.length));\n const padded = tableRows.map((row) => {\n return [...row, ...Array(maxCols - row.length).fill(\"\")];\n });\n\n const header = padded[0];\n const separator = Array(maxCols).fill(\"---\");\n\n output.push(\"| \" + header.join(\" | \") + \" |\");\n output.push(\"| \" + separator.join(\" | \") + \" |\");\n for (let i = 1; i < padded.length; i++) {\n const row = padded[i];\n // Skip rows that are just separators (all dashes)\n if (row.every((cell) => /^-+$/.test(cell))) continue;\n output.push(\"| \" + row.join(\" | \") + \" |\");\n }\n\n tableRows = [];\n inTable = false;\n };\n\n for (const line of lines) {\n if (/^\\s*\\|.*\\|\\s*$/.test(line)) {\n inTable = true;\n const cells = line\n .trim()\n .slice(1, -1)\n .split(\"|\")\n .map((c) => c.trim());\n tableRows.push(cells);\n } else {\n if (inTable) flushTable();\n output.push(line);\n }\n }\n\n flushTable();\n return output.join(\"\\n\");\n};\n\ntype ChatResponsePalette = {\n codeBackground?: string;\n codeText?: string;\n aiBackground?: string;\n aiText?: string;\n aiBorder?: string;\n};\n\ntype VectorResultLike = {\n id?: string;\n fileId?: string;\n _id?: string;\n [key: string]: unknown;\n};\n\ntype KnowledgeDocCandidate = Partial<KnowledgeDoc> & {\n fileId?: string;\n _id?: string;\n filename?: string;\n uploadedAt?: string | Date;\n createdAt?: string | Date;\n mimeType?: string;\n content?: string | null;\n rawData?: string;\n embedding?: unknown;\n size?: number;\n uploadedBy?: string;\n userId?: string;\n userEmail?: string;\n bucket?: string;\n key?: string;\n s3Url?: string;\n teamSid?: string;\n contentSource?: \"team\" | \"user\";\n isUserContent?: boolean;\n isTeamContent?: boolean;\n _vectorResult?: VectorResultLike | null;\n metadata?: VectorResultLike | null;\n chunks?: string[];\n [key: string]: unknown;\n};\n\ntype SourceFileInput = KnowledgeDocCandidate;\n\ntype MarkdownComponentProps<Tag extends keyof JSX.IntrinsicElements> =\n React.ComponentPropsWithoutRef<Tag> & ReactMarkdownExtraProps;\n\nconst isNonEmptyString = (value: unknown): value is string =>\n typeof value === \"string\" && value.trim().length > 0;\n\nconst toDateSafe = (value: unknown): Date | undefined => {\n if (value instanceof Date && !Number.isNaN(value.getTime())) {\n return value;\n }\n if (typeof value === \"string\" && value.trim()) {\n const parsed = new Date(value);\n if (!Number.isNaN(parsed.getTime())) {\n return parsed;\n }\n }\n return undefined;\n};\n\nconst toNumberArray = (value: unknown): number[] | undefined => {\n if (!Array.isArray(value)) {\n return undefined;\n }\n const numbers = value.filter((item): item is number => typeof item === \"number\" && Number.isFinite(item));\n return numbers.length ? numbers : undefined;\n};\n\ninterface MarkdownCodeBlockProps extends React.HTMLAttributes<HTMLElement> {\n inline?: boolean;\n className?: string;\n children: React.ReactNode;\n theme: Theme;\n chatResponse?: ChatResponsePalette;\n}\n\nconst MarkdownCodeBlock: React.FC<MarkdownCodeBlockProps> = ({\n inline,\n className,\n children,\n theme,\n chatResponse,\n ...props\n}) => {\n const match = /language-([\\w-]+)/.exec(className || \"\");\n const requestedLanguage = match?.[1]?.toLowerCase() || \"\";\n const codeText = String(children).replace(/\\n$/, \"\");\n const isProbablyBlock = codeText.includes(\"\\n\") || Boolean(requestedLanguage);\n\n const [copied, setCopied] = useState(false);\n const handleCopy = () => {\n navigator.clipboard.writeText(codeText);\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n };\n\n const highlightTree = useMemo<Root | null>(\n () =>\n isProbablyBlock ? getHighlightTree(codeText, requestedLanguage) : null,\n [codeText, requestedLanguage, isProbablyBlock]\n );\n const highlightedNodes = useMemo(\n () =>\n isProbablyBlock\n ? renderLowlightChildren(\n (highlightTree?.children || []).filter((node): node is Element | Text => {\n if (!node) {\n return false;\n }\n return node.type === \"element\" || node.type === \"text\";\n }),\n `hl-${requestedLanguage || \"auto\"}`\n )\n : [],\n [highlightTree, requestedLanguage, isProbablyBlock]\n );\n\n const resolvedLanguage = (\n requestedLanguage ||\n highlightTree?.data?.language ||\n \"code\"\n ).toString();\n const languageLabel = resolvedLanguage.toUpperCase();\n const languageClass = resolvedLanguage.toLowerCase();\n\n const highlightColors =\n theme.palette.mode === \"dark\"\n ? {\n background: chatResponse?.codeBackground || \"#0f172a\",\n text: chatResponse?.codeText || \"#e2e8f0\",\n keyword: \"#c792ea\",\n string: \"#7fdbca\",\n number: \"#f78c6c\",\n comment: \"#64748b\",\n function: \"#82aaff\",\n variable: \"#f07178\",\n }\n : {\n background: chatResponse?.codeBackground || \"#f4f6ff\",\n text: chatResponse?.codeText || \"#1e293b\",\n keyword: \"#7c3aed\",\n string: \"#0f766e\",\n number: \"#b45309\",\n comment: \"#6b7280\",\n function: \"#2563eb\",\n variable: \"#d97706\",\n };\n\n if (!isProbablyBlock) {\n return (\n <code\n style={{\n borderRadius: \"4px\",\n fontSize: \"0.9em\",\n fontFamily:\n \"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace\",\n }}\n {...props}\n >\n {children}\n </code>\n );\n }\n\n return (\n <Box\n sx={{\n borderRadius: \"4px\",\n overflow: \"auto\",\n my: \"0.5rem\",\n px: 0,\n py: 0,\n mt: 1,\n mb: 0.5,\n fontSize: \"0.9rem\",\n position: \"relative\",\n fontFamily:\n \"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace\",\n width: \"100%\",\n maxWidth: \"100%\",\n }}\n >\n <Box\n sx={{\n px: 2,\n py: 1,\n bgcolor:\n chatResponse?.aiBackground ||\n (theme.palette.mode === \"dark\"\n ? alpha(theme.palette.common.white, 0.04)\n : alpha(theme.palette.text.primary, 0.04)),\n color: chatResponse?.aiText || theme.palette.text.secondary,\n fontSize: \"0.75rem\",\n borderBottom: `1px solid ${\n chatResponse?.aiBorder || alpha(theme.palette.text.primary, 0.1)\n }`,\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n fontFamily: \"inherit\",\n }}\n >\n <span>{languageLabel}</span>\n <Tooltip title={copied ? \"Copied!\" : \"Copy\"} arrow>\n <IconButton\n size=\"small\"\n onClick={handleCopy}\n sx={{\n color: copied\n ? theme.palette.success.main\n : theme.palette.text.secondary,\n \"&:hover\": { color: theme.palette.text.primary },\n padding: \"4px\",\n }}\n >\n {copied ? <CheckIcon fontSize=\"small\" /> : <ContentCopyIcon fontSize=\"small\" />}\n </IconButton>\n </Tooltip>\n </Box>\n <Box\n sx={{\n overflowX: \"auto\",\n maxWidth: \"100%\",\n \"& .hljs\": {\n display: \"block\",\n overflowX: \"auto\",\n padding: \"16px\",\n margin: 0,\n backgroundColor: highlightColors.background,\n color: highlightColors.text,\n fontSize: \"0.9rem\",\n },\n \"& .hljs-comment, & .hljs-quote\": {\n color: highlightColors.comment,\n fontStyle: \"italic\",\n },\n \"& .hljs-keyword, & .hljs-selector-tag, & .hljs-literal, & .hljs-built_in\": {\n color: highlightColors.keyword,\n },\n \"& .hljs-string, & .hljs-doctag, & .hljs-template-tag, & .hljs-attr\": {\n color: highlightColors.string,\n },\n \"& .hljs-number, & .hljs-symbol, & .hljs-bullet, & .hljs-meta\": {\n color: highlightColors.number,\n },\n \"& .hljs-title, & .hljs-section, & .hljs-selector-id, & .hljs-function\": {\n color: highlightColors.function,\n },\n \"& .hljs-variable, & .hljs-params, & .hljs-property\": {\n color: highlightColors.variable,\n },\n }}\n >\n <pre className={`hljs language-${languageClass}`} {...props}>\n <code className=\"hljs\">{highlightedNodes}</code>\n </pre>\n </Box>\n </Box>\n );\n};\n\nconst AIResponseTextField: React.FC<AIResponseTextFieldProps> = ({\n question,\n response,\n responseText,\n backgroundColor,\n images,\n memoryUpdated,\n sourceFiles,\n isMobile = false,\n cancelled = false,\n}) => {\n // Warn if response is not a string, to help debug [object Object] issues\n useEffect(() => {\n if (typeof response !== \"string\" && !React.isValidElement(response)) {\n debugLogger.warn(\"⚠️ AIResponseTextField received a non-string, non-ReactElement response:\", { response });\n }\n }, [response]);\n const [openImage, setOpenImage] = useState<string | null>(null);\n const [showMemoryUpdated, setShowMemoryUpdated] = useState(memoryUpdated ?? false);\n const [openDoc, setOpenDoc] = useState<KnowledgeDoc | null>(null);\n const { isVectorDocument } = useKnowledgeStore();\n\n // Convert API response format to KnowledgeDoc format (same as KnowledgeTab)\n const normalizeSourceFiles = useCallback((files: SourceFileInput[]): KnowledgeDoc[] => {\n return files\n .map((file) => {\n const vectorResult = file._vectorResult ?? undefined;\n const metadata = file.metadata ?? undefined;\n\n const candidateId =\n [\n file.id,\n file.fileId,\n file._id,\n vectorResult?.id,\n vectorResult?.fileId,\n vectorResult?._id,\n metadata?.id,\n metadata?.fileId,\n metadata?._id,\n ].find(isNonEmptyString) ?? null;\n\n if (!candidateId) {\n debugLogger.error(\"Missing document identifier in AI response file\", {\n file,\n availableProperties: Object.keys(file),\n vectorResultProperties: vectorResult ? Object.keys(vectorResult) : undefined,\n });\n return null;\n }\n\n const resolvedId = candidateId;\n const filename =\n (isNonEmptyString(file.name) && file.name) ||\n (isNonEmptyString(file.filename) && file.filename) ||\n \"Unknown Document\";\n const timestamp = file.uploadedAt ?? file.createdAt;\n const addedDate = toDateSafe(timestamp) ?? new Date();\n const mimeType =\n (isNonEmptyString(file.mimeType) && file.mimeType) ||\n (isNonEmptyString(file.type) && file.type) ||\n \"application/pdf\";\n const contentValue = typeof file.content === \"string\" ? file.content : \"\";\n const hasInlineContent = contentValue.trim().length > 0;\n const looksLikeMongoId = /^[0-9a-f]{24}$/i.test(resolvedId);\n const isFromVectorDB =\n Boolean(file._vectorResult) ||\n isNonEmptyString(file.s3Url) ||\n (looksLikeMongoId && !hasInlineContent);\n\n debugLogger.debug(\"Normalizing AI response source file\", {\n docId: resolvedId,\n filename,\n isFromVectorDB,\n hasContent: hasInlineContent,\n });\n\n const embedding = toNumberArray(file.embedding) ?? [];\n const rawData = typeof file.rawData === \"string\" ? file.rawData : undefined;\n const size = typeof file.size === \"number\" && Number.isFinite(file.size) ? file.size : 0;\n const uploadedBy =\n (isNonEmptyString(file.uploadedBy) && file.uploadedBy) ||\n (isNonEmptyString(file.userId) && file.userId) ||\n \"\";\n const userEmail = (isNonEmptyString(file.userEmail) && file.userEmail) || \"\";\n const bucket = (isNonEmptyString(file.bucket) && file.bucket) || \"\";\n const key = (isNonEmptyString(file.key) && file.key) || resolvedId;\n const teamSid = (isNonEmptyString(file.teamSid) && file.teamSid) || undefined;\n const explicitContentSource =\n file.contentSource === \"team\" || file.contentSource === \"user\" ? file.contentSource : undefined;\n const contentSource = explicitContentSource ?? (teamSid ? \"team\" : \"user\");\n const isTeamContent = file.isTeamContent ?? contentSource === \"team\";\n const isUserContent = file.isUserContent ?? contentSource === \"user\";\n const resolvedS3Url =\n (isNonEmptyString(file.s3Url) && file.s3Url) ||\n (isFromVectorDB ? resolvedId : undefined);\n\n const normalizedDoc: KnowledgeDoc = {\n id: resolvedId,\n name: filename,\n content: isFromVectorDB ? \"\" : contentValue,\n rawData,\n type: mimeType,\n addedDate,\n embedding,\n size,\n uploadedBy,\n userEmail,\n bucket,\n key,\n isUserContent,\n isTeamContent,\n contentSource,\n teamSid,\n mimeType,\n originalFileName: filename,\n s3Url: resolvedS3Url,\n };\n\n return normalizedDoc;\n })\n .filter((doc): doc is KnowledgeDoc => doc !== null);\n }, []);\n\n // Normalize the source files\n const normalizedSourceFiles = useMemo(\n () => (sourceFiles ? normalizeSourceFiles(sourceFiles) : []),\n [sourceFiles, normalizeSourceFiles]\n );\n\n const sourceCacheRef = useRef<KnowledgeDoc[]>([]);\n\n const displaySourceFiles = useMemo(() => {\n if (normalizedSourceFiles.length > 0) {\n sourceCacheRef.current = normalizedSourceFiles;\n return normalizedSourceFiles;\n }\n\n if (sourceFiles === undefined) {\n return sourceCacheRef.current;\n }\n\n sourceCacheRef.current = [];\n return [];\n }, [normalizedSourceFiles, sourceFiles]);\n\n const sourcesMarkdownList = displaySourceFiles.map((doc, index) => `- ${index + 1}. ${doc.name}`);\n\n // Debug logging\n useEffect(() => {\n if (sourceFiles && sourceFiles.length > 0) {\n debugLogger.debug(\"AI response source files normalization\", {\n sourceFileCount: sourceFiles.length,\n normalizedFileCount: normalizedSourceFiles.length,\n });\n }\n }, [sourceFiles, normalizedSourceFiles]);\n\n useEffect(() => {\n if (!memoryUpdated) return;\n setShowMemoryUpdated(true);\n const timeout = setTimeout(() => setShowMemoryUpdated(false), 3000);\n return () => clearTimeout(timeout);\n }, [memoryUpdated]);\n\n const theme = useTheme();\n const chatResponse = theme.palette.chat?.response as NonNullable<typeof theme.palette.chat>[\"response\"];\n \n // Choose syntax highlighting theme based on current theme mode\n\n const sanitizeMarkdown = (raw: string): string => {\n // Strip start/end of turn tags, including malformed or alternate versions\n let sanitized = raw.replace(/<[/]?start_of_turn>|<[/]?end[_]?of[_]?turn>/gi, \"\");\n\n // 1) Unwrap any stray <div class=\"MuiBox-root\"> wrappers\n sanitized = sanitized\n .replace(/<div class=\"MuiBox-root[^\"]*\"[^>]*>([\\s\\S]*?)<\\/div>/g, (_, inner) =>\n inner.trim()\n )\n .replace(/<div[^>]*>\\s*<\\/div>/g, \"\");\n\n // Collapse newline before colon or comma into inline punctuation\n sanitized = sanitized.replace(/\\r?\\n\\s*:\\s*/g, \": \");\n sanitized = sanitized.replace(/\\r?\\n\\s*,\\s*/g, \", \");\n\n // 2) Normalize all pipe‑tables in one go\n sanitized = normalizeTables(sanitized);\n\n return sanitized;\n };\n\n const enrichedMarkdown = useMemo(() => {\n if (typeof response !== \"string\") {\n return null;\n }\n\n const sanitized = sanitizeMarkdown(response);\n\n if (!sourcesMarkdownList.length) {\n return sanitized;\n }\n\n if (/\\*\\*Sources?\\*\\*/i.test(sanitized)) {\n return sanitized;\n }\n\n return `${sanitized}\\n\\n**Sources**\\n${sourcesMarkdownList.join(\"\\n\")}`;\n }, [response, sourcesMarkdownList]);\n\n const components: ReactMarkdownComponents = {\n mark({ children, node: _node, className, style, ...markProps }: MarkdownComponentProps<\"mark\">) {\n const contentText = React.Children.toArray(children)\n .map((child) => (typeof child === \"string\" ? child : \"\"))\n .join(\"\")\n .trim();\n\n return (\n <Box\n component=\"span\"\n className={className}\n style={style}\n {...markProps}\n sx={{\n display: \"inline-block\",\n backgroundColor: \"#2a3c4f\",\n color: \"#e0f7fa\",\n px: 1,\n py: 0.25,\n borderRadius: \"4px\",\n fontWeight: 500,\n fontSize: \"0.95rem\",\n lineHeight: 1.4,\n whiteSpace: \"normal\",\n width: \"fit-content\",\n maxWidth: \"100%\",\n }}\n >\n {contentText}\n </Box>\n );\n },\n code({ inline, className, children, node: _node, ...codeProps }: MarkdownComponentProps<\"code\">) {\n return (\n <MarkdownCodeBlock\n inline={inline}\n className={className}\n {...codeProps}\n theme={theme}\n chatResponse={chatResponse}\n >\n {children}\n </MarkdownCodeBlock>\n );\n },\n a({ href, children, node: _node, style, ...anchorProps }: MarkdownComponentProps<\"a\">) {\n return (\n <a\n href={href}\n {...anchorProps}\n style={{\n color: theme.palette.primary.main,\n textDecoration: \"underline\",\n ...(style ?? {}),\n }}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n {children}\n </a>\n );\n },\n em({ children, node: _node, className, style, ...emProps }: MarkdownComponentProps<\"em\">) {\n // Check for Bandit's weird <em><div class=\"MuiBox-root\">CODE</div></em>\n const onlyChild =\n Array.isArray(children) && children.length === 1 ? children[0] : null;\n\n if (\n onlyChild &&\n typeof onlyChild === \"object\" &&\n onlyChild.type === \"div\" &&\n onlyChild.props?.className?.includes(\"MuiBox-root\")\n ) {\n const inner = onlyChild.props.children;\n\n // Optional: skip rendering if it's literally the word \"CODE\"\n if (typeof inner === \"string\" && inner.trim().toUpperCase() === \"CODE\") {\n return null;\n }\n\n // Otherwise render nicely\n return (\n <Box\n sx={{\n fontFamily: \"monospace\",\n fontSize: \"0.9rem\",\n backgroundColor: theme.palette.background.default,\n color: theme.palette.text.primary,\n padding: \"12px 16px\",\n borderRadius: \"4px\",\n border: `1px solid ${theme.palette.divider}`,\n my: 1,\n display: \"inline-block\",\n }}\n >\n {inner}\n </Box>\n );\n }\n\n return (\n <em className={className} style={style} {...emProps}>\n {children}\n </em>\n );\n },\n ol({ children, node: _node, style, ...orderedListProps }: MarkdownComponentProps<\"ol\">) {\n const childArray = React.Children.toArray(children);\n const cleanedChildren: React.ReactNode[] = [];\n\n for (let i = 0; i < childArray.length; i++) {\n const item = childArray[i];\n\n // Remove raw colon-only text lines\n if (typeof item === \"string\" && item.trim() === \":\") {\n continue;\n }\n\n // If colon-prefixed string explanation\n if (typeof item === \"string\" && item.trim().startsWith(\":\")) {\n cleanedChildren.push(\n <Typography\n key={`ol-expl-${i}`}\n sx={{\n fontSize: \"0.875rem\",\n color: \"#aaa\",\n fontStyle: \"italic\",\n mt: 0.5,\n ml: 2,\n }}\n >\n {item.replace(/^:\\s*/, \"\")}\n </Typography>\n );\n } else {\n cleanedChildren.push(item);\n }\n }\n\n return (\n <ol\n {...orderedListProps}\n style={{\n paddingLeft: 24,\n marginLeft: 16,\n listStyleType: \"decimal\",\n ...(style ?? {}),\n }}\n >\n {cleanedChildren}\n </ol>\n );\n },\n\n ul({ children, node: _node, style, ...unorderedListProps }: MarkdownComponentProps<\"ul\">) {\n return (\n <ul\n {...unorderedListProps}\n style={{\n paddingLeft: \"1.5rem\",\n marginTop: \"0.5rem\",\n marginBottom: \"0.25rem\",\n listStyle: \"disc\",\n ...(style ?? {}),\n }}\n >\n {React.Children.toArray(children).filter((child) => {\n if (typeof child === \"string\" && child.trim() === \":\") return false;\n return true;\n })}\n </ul>\n );\n },\n li({ children, node: _node, style, ...listItemProps }: MarkdownComponentProps<\"li\">) {\n const childArray = React.Children.toArray(children);\n // New logic: If first child is <strong> whose text ends with a colon, and rest is inline/plain\n if (\n childArray.length >= 2 &&\n React.isValidElement(childArray[0]) &&\n childArray[0].type === \"strong\"\n ) {\n // Extract label text from <strong>\n let labelText = \"\";\n const strongChild = childArray[0];\n if (typeof strongChild.props.children === \"string\") {\n labelText = strongChild.props.children;\n } else if (Array.isArray(strongChild.props.children)) {\n labelText = strongChild.props.children.join(\"\");\n }\n // Replace [object Object] with \"Item\"\n if (labelText?.includes(\"[object Object]\")) {\n labelText = \"Item\";\n }\n if (typeof labelText === \"string\" && labelText.trim().endsWith(\":\")) {\n // Check if all rest are inline/plain (no Box)\n const rest = childArray.slice(1);\n const isAllInline = rest.every(\n (el) =>\n typeof el === \"string\" ||\n (React.isValidElement(el) &&\n // allow inline tags, but not <Box>\n el.type !== Box)\n );\n if (isAllInline) {\n // Remove trailing colon from label for rendering\n const displayLabel = labelText.replace(/:\\s*$/, \"\");\n return (\n <li\n style={{\n marginBottom: \"0.5rem\",\n lineHeight: 1.4,\n whiteSpace: \"pre-wrap\",\n ...(style ?? {}),\n }}\n {...listItemProps}\n >\n <strong>{displayLabel}:</strong>\n {rest.length > 0 && <> {rest}</>}\n </li>\n );\n }\n }\n }\n // Special-case: <strong>Label:</strong> followed by a Box description\n if (\n childArray.length === 2 &&\n React.isValidElement(childArray[0]) &&\n childArray[0].type === \"strong\" &&\n React.isValidElement(childArray[1]) &&\n childArray[1].type === Box\n ) {\n const label = childArray[0].props.children;\n const desc = childArray[1].props.children;\n return (\n <li\n style={{ marginBottom: \"0.5rem\", lineHeight: 1.4, whiteSpace: \"pre-wrap\" }}\n {...listItemProps}\n >\n <span>\n <strong>{label}</strong> {desc}\n </span>\n </li>\n );\n }\n const contentArray = childArray;\n const filtered: React.ReactNode[] = [];\n\n for (let i = 0; i < contentArray.length; i++) {\n const item = contentArray[i];\n\n if (typeof item === \"string\" && item.trim() === \":\") continue;\n\n // Safer merge: use prev variable and check before merge\n if (i > 0 && typeof item === \"string\" && item.trim().startsWith(\":\")) {\n const prev = contentArray[i - 1];\n if (React.isValidElement(prev) && prev.type === \"strong\") {\n const desc = item.replace(/^:\\s*/, \"\");\n const prevKey = React.isValidElement(prev) && prev.key != null ? prev.key : `li-strong-${i}`;\n filtered.pop();\n filtered.push(\n <span key={`li-merge-${prevKey}`}>\n {prev}\n {\": \"}\n {desc}\n </span>\n );\n continue;\n }\n }\n filtered.push(item);\n }\n\n return (\n <li\n {...listItemProps}\n style={{\n marginBottom: \"0.5rem\",\n lineHeight: 1.4,\n whiteSpace: \"pre-wrap\",\n ...(style ?? {}),\n }}\n >\n {filtered}\n </li>\n );\n },\n table({ children, node: _node, className, style, ...tableProps }: MarkdownComponentProps<\"table\">) {\n return (\n <TableContainer\n component={Paper}\n className={className}\n style={style}\n sx={{ my: 2, bgcolor: theme.palette.background.paper }}\n >\n <Table size=\"small\" {...tableProps}>\n {children}\n </Table>\n </TableContainer>\n );\n },\n thead({ children, node: _node, ...tableHeadProps }: MarkdownComponentProps<\"thead\">) {\n return <TableHead {...tableHeadProps}>{children}</TableHead>;\n },\n tbody({ children, node: _node, ...tableBodyProps }: MarkdownComponentProps<\"tbody\">) {\n const rows = React.Children.toArray(children).filter((row: React.ReactNode) => {\n // Keep non-React elements\n if (!React.isValidElement(row)) return true;\n // Extract cell elements for this row\n const cells = React.Children.toArray(row.props.children);\n // Filter out rows where every cell is a string of hyphens\n return !cells.every(\n (cell) =>\n React.isValidElement(cell) &&\n typeof cell.props.children === \"string\" &&\n /^-+$/.test(cell.props.children.trim())\n );\n });\n return <TableBody {...tableBodyProps}>{rows}</TableBody>;\n },\n tr({ children, node: _node, ...tableRowProps }: MarkdownComponentProps<\"tr\">) {\n return <TableRow {...tableRowProps}>{children}</TableRow>;\n },\n th({ children, node: _node, ...tableCellProps }: MarkdownComponentProps<\"th\">) {\n return (\n <TableCell\n {...tableCellProps}\n sx={{\n fontWeight: \"bold\",\n color: theme.palette.text.primary,\n bgcolor: theme.palette.action.hover,\n textAlign: \"left\",\n padding: \"8px 12px\",\n whiteSpace: \"nowrap\",\n }}\n >\n {children}\n </TableCell>\n );\n },\n td({ children, node: _node, ...tableCellProps }: MarkdownComponentProps<\"td\">) {\n return (\n <TableCell\n {...tableCellProps}\n sx={{\n color: theme.palette.text.primary,\n fontSize: \"0.875rem\",\n padding: \"8px 12px\",\n verticalAlign: \"top\",\n }}\n >\n {children}\n </TableCell>\n );\n },\n p({ children, node: _node, className, style, ...paragraphProps }: MarkdownComponentProps<\"p\">) {\n // Flatten children and detect block-level elements\n const flattened = React.Children.toArray(children).flat();\n const hasBlock = flattened.some(\n (child) =>\n typeof child === \"object\" &&\n child !== null &&\n \"type\" in child &&\n typeof child.type === \"string\" &&\n [\"div\", \"Box\", \"section\", \"ul\", \"ol\", \"table\"].includes(child.type)\n );\n // If a block element is present, render without wrapping\n if (hasBlock) {\n return <>{flattened}</>;\n }\n // Otherwise wrap inline text in a div\n return (\n <Box component=\"div\" sx={{ margin: \"0.25rem 0\" }}>\n <Typography\n component=\"div\"\n variant=\"body2\"\n className={className}\n style={style}\n sx={{ color: theme.palette.text.primary, lineHeight: 1.6, display: \"inline\" }}\n {...paragraphProps}\n >\n {flattened}\n </Typography>\n </Box>\n );\n },\n };\n\n return (\n <>\n <Box\n sx={{\n width: '100%',\n maxWidth: '100%',\n flexGrow: 1,\n alignSelf: 'stretch',\n display: 'flex',\n flexDirection: 'column',\n color: chatResponse.aiText || theme.palette.text.primary,\n px: isMobile ? 0.5 : 2,\n py: 1,\n userSelect: \"text\",\n }}\n >\n {/* User message — compact bubble, right-aligned (Claude-style) */}\n <Box sx={{ display: \"flex\", justifyContent: \"flex-end\", mb: 2.5 }}>\n <Box sx={{ maxWidth: { xs: \"100%\", sm: \"85%\" }, minWidth: 0 }}>\n <Box\n sx={{\n bgcolor: chatResponse.userBubble || alpha(theme.palette.common.white, 0.07),\n borderRadius: \"18px\",\n px: 2,\n py: 1.25,\n wordBreak: \"break-word\",\n whiteSpace: \"pre-wrap\",\n overflowWrap: \"break-word\",\n }}\n >\n <Typography\n sx={{\n color: theme.palette.text.primary,\n lineHeight: 1.5,\n wordBreak: \"break-word\",\n whiteSpace: \"pre-wrap\",\n }}\n >\n {question}\n </Typography>\n </Box>\n {/* Images, if any */}\n {images && images.length > 0 && (\n <Box sx={{ display: \"flex\", gap: 1, mt: 1, flexWrap: \"wrap\", justifyContent: \"flex-end\" }}>\n {images.map((img, i) => (\n <Avatar\n key={i}\n src={img}\n variant=\"rounded\"\n onClick={() => setOpenImage(img)}\n sx={{\n width: 96,\n height: 96,\n borderRadius: 2,\n border: `1px solid ${alpha(theme.palette.text.primary, 0.25)}`,\n cursor: \"pointer\",\n \"&:hover\": { boxShadow: `0 0 0 2px ${theme.palette.primary.main}` },\n }}\n />\n ))}\n </Box>\n )}\n </Box>\n </Box>\n\n {/* AI response — raw text on the chat background (Claude-style: no avatar, label, or bubble) */}\n <Box sx={{ position: \"relative\", width: \"100%\", maxWidth: { xs: \"100%\", sm: \"768px\" } }}>\n {cancelled && (\n <Box\n sx={{\n position: \"absolute\",\n top: -22,\n left: 0,\n display: \"flex\",\n alignItems: \"center\",\n gap: 1,\n zIndex: 1,\n }}\n >\n <Typography variant=\"caption\" sx={{ fontStyle: \"italic\", opacity: 0.85 }}>\n Cancelled by you\n </Typography>\n </Box>\n )}\n {showMemoryUpdated && (\n <Box\n sx={{\n position: \"absolute\",\n top: -22,\n right: 0,\n display: \"flex\",\n alignItems: \"center\",\n gap: 1,\n animation: \"fadeOut 0.3s ease-in 2.7s forwards\",\n zIndex: 1,\n }}\n >\n <img src={brainIcon} alt=\"Memory\" style={{ width: 16, height: 16 }} />\n <Typography\n variant=\"caption\"\n sx={{ color: chatResponse.memoryText || \"#2e7d32\", fontStyle: \"italic\" }}\n >\n Bandit added to memory\n </Typography>\n </Box>\n )}\n <Box sx={{ width: '100%', maxWidth: '100%' }}>\n {typeof response === \"string\" ? (\n <ReactMarkdown\n remarkPlugins={[remarkGfm]}\n rehypePlugins={[rehypeRaw, [rehypeSanitize, markdownSanitizeSchema]]}\n components={components}\n >\n {enrichedMarkdown ?? sanitizeMarkdown(response)}\n </ReactMarkdown>\n ) : React.isValidElement(response) ? (\n response\n ) : (\n <Typography color=\"error\">⚠️ Invalid AI response</Typography>\n )}\n </Box>\n </Box>\n {/* Actions bar at the bottom */}\n {!!(responseText || (typeof response === \"string\" && response)) && (\n <AiResponseActionsBar text={(responseText || (response as string)) as string} />\n )}\n {displaySourceFiles && displaySourceFiles.length > 0 && (\n <Box sx={{ mt: 1.5, display: \"flex\", gap: 2, flexWrap: \"wrap\", justifyContent: \"flex-start\" }}>\n {displaySourceFiles.map((doc, idx) => {\n debugLogger.debug(\"Rendering DocumentCard in AI response\", {\n index: idx,\n id: doc.id,\n name: doc.name,\n });\n return (\n <DocumentCard \n key={idx} \n doc={doc} \n onView={() => setOpenDoc(doc)}\n variant=\"mini\"\n isHistoricalReference={true}\n allowErrorStates={true}\n />\n );\n })}\n </Box>\n )}\n </Box>\n\n {/* Fullscreen image preview modal */}\n <Modal open={!!openImage} onClose={() => setOpenImage(null)}>\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n height: \"100vh\",\n bgcolor: \"rgba(0, 0, 0, 0.9)\",\n p: 2,\n position: \"relative\",\n }}\n >\n <IconButton\n onClick={() => setOpenImage(null)}\n sx={{\n position: \"absolute\",\n top: 16,\n right: 16,\n color: \"#fff\",\n bgcolor: \"rgba(0,0,0,0.6)\",\n \"&:hover\": {\n bgcolor: \"rgba(255,255,255,0.2)\",\n },\n }}\n >\n <CloseIcon />\n </IconButton>\n <Box\n component=\"img\"\n src={openImage || \"\"}\n alt=\"Full-size\"\n sx={{\n maxHeight: \"90vh\",\n maxWidth: \"90vw\",\n borderRadius: 2,\n boxShadow: 24,\n cursor: \"zoom-out\",\n }}\n onClick={() => setOpenImage(null)}\n />\n </Box>\n </Modal>\n <KnowledgeFileModal \n open={!!openDoc} \n onClose={() => setOpenDoc(null)} \n doc={openDoc} \n isVectorDocument={openDoc ? (() => {\n const isVector = isVectorDocument(openDoc);\n debugLogger.debug(\"Knowledge file modal open request\", {\n documentId: openDoc.id,\n name: openDoc.name,\n isVector,\n });\n return isVector;\n })() : false}\n />\n </>\n );\n};\n\nexport default AIResponseTextField;\n","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-AC9A-B43BC2\nconst __banditFingerprint_shared_DocumentCardtsx = 'BL-FP-3F514D-0451';\nconst __auditTrail_shared_DocumentCardtsx = 'BL-AU-MGOIKVW1-S428';\n// File: DocumentCard.tsx | Path: src/shared/DocumentCard.tsx | Hash: ac9a0451\n\nimport React, { useState, useEffect } from \"react\";\nimport {\n Box,\n Typography,\n Button,\n Tooltip,\n Card,\n CardContent,\n IconButton,\n Chip,\n Alert,\n} from \"@mui/material\";\nimport { debugLogger } from \"../services/logging/debugLogger\";\nimport { KnowledgeDoc } from \"../store/knowledgeStore\";\nimport { useKnowledgeStore } from \"../chat/hooks/useKnowledgeStore\";\nimport { useVectorStore } from \"../hooks/useVectorStore\";\nimport { useTheme } from \"@mui/material/styles\";\nimport {\n ArticleIcon,\n CloudIcon,\n CloudOffIcon,\n CodeIcon,\n DataObjectIcon,\n DeleteIcon,\n DescriptionIcon,\n DownloadIcon,\n ErrorOutlineIcon,\n InfoIcon,\n PersonIcon,\n PictureAsPdfIcon,\n SearchIcon,\n} from \"../icons/lucide-icons\";\n\ninterface DocumentCardProps {\n doc: KnowledgeDoc;\n onView: () => void;\n onDelete?: (id: string) => void;\n onSelect?: (id: string) => void;\n isSelected?: boolean;\n isDeleting?: boolean; // For deletion animation\n variant?: 'mini' | 'full'; // Mini for chat responses, full for knowledge tab\n showSelection?: boolean;\n showDelete?: boolean;\n showPreview?: boolean;\n // New props for handling error states\n isHistoricalReference?: boolean; // True when this card is from a past conversation\n allowErrorStates?: boolean; // Whether to show error states instead of hiding the card\n}\n\ntype FileTypeInfo = {\n icon: React.ElementType;\n color: string;\n category: string;\n language?: string;\n};\n\n// Enhanced file type detection (from KnowledgeTab)\nconst getFileTypeInfo = (filename: string): FileTypeInfo => {\n const ext = filename.split('.').pop()?.toLowerCase() || '';\n \n const languageMap: Record<string, FileTypeInfo> = {\n // Documents\n 'pdf': { icon: PictureAsPdfIcon, color: '#d32f2f', category: 'Document' },\n 'doc': { icon: ArticleIcon, color: '#1976d2', category: 'Document' },\n 'docx': { icon: ArticleIcon, color: '#1976d2', category: 'Document' },\n 'odt': { icon: ArticleIcon, color: '#1976d2', category: 'Document' },\n 'rtf': { icon: ArticleIcon, color: '#1976d2', category: 'Document' },\n \n // Text files\n 'txt': { icon: DescriptionIcon, color: '#388e3c', category: 'Text' },\n 'md': { icon: DescriptionIcon, color: '#388e3c', category: 'Text', language: 'Markdown' },\n 'markdown': { icon: DescriptionIcon, color: '#388e3c', category: 'Text', language: 'Markdown' },\n \n // Programming languages\n 'js': { icon: CodeIcon, color: '#f7df1e', category: 'Code', language: 'JavaScript' },\n 'jsx': { icon: CodeIcon, color: '#61dafb', category: 'Code', language: 'React' },\n 'ts': { icon: CodeIcon, color: '#3178c6', category: 'Code', language: 'TypeScript' },\n 'tsx': { icon: CodeIcon, color: '#61dafb', category: 'Code', language: 'React TS' },\n 'py': { icon: CodeIcon, color: '#3776ab', category: 'Code', language: 'Python' },\n 'java': { icon: CodeIcon, color: '#ed8b00', category: 'Code', language: 'Java' },\n 'c': { icon: CodeIcon, color: '#a8b9cc', category: 'Code', language: 'C' },\n 'cpp': { icon: CodeIcon, color: '#00599c', category: 'Code', language: 'C++' },\n 'cs': { icon: CodeIcon, color: '#239120', category: 'Code', language: 'C#' },\n 'go': { icon: CodeIcon, color: '#00add8', category: 'Code', language: 'Go' },\n 'rs': { icon: CodeIcon, color: '#dea584', category: 'Code', language: 'Rust' },\n 'php': { icon: CodeIcon, color: '#777bb4', category: 'Code', language: 'PHP' },\n 'rb': { icon: CodeIcon, color: '#cc342d', category: 'Code', language: 'Ruby' },\n 'kt': { icon: CodeIcon, color: '#7f52ff', category: 'Code', language: 'Kotlin' },\n 'swift': { icon: CodeIcon, color: '#fa7343', category: 'Code', language: 'Swift' },\n \n // Data files\n 'json': { icon: DataObjectIcon, color: '#ffd600', category: 'Data', language: 'JSON' },\n 'xml': { icon: DataObjectIcon, color: '#ff6600', category: 'Data', language: 'XML' },\n 'yaml': { icon: DataObjectIcon, color: '#cb171e', category: 'Data', language: 'YAML' },\n 'yml': { icon: DataObjectIcon, color: '#cb171e', category: 'Data', language: 'YAML' },\n 'csv': { icon: DataObjectIcon, color: '#14a085', category: 'Data', language: 'CSV' },\n };\n\n return languageMap[ext] || { icon: DescriptionIcon, color: '#666', category: 'File' };\n};\n\n// Content source info (from KnowledgeTab)\nconst getContentSourceInfo = (doc: KnowledgeDoc, shouldUseVector: boolean) => {\n if (shouldUseVector && doc.s3Url) {\n // Vector database document\n return {\n icon: CloudIcon,\n label: doc.isTeamContent ? 'Team Cloud' : 'Cloud',\n color: '#1976d2',\n bgColor: '#1976d220',\n };\n } else {\n // Local document\n return {\n icon: PersonIcon,\n label: 'Local',\n color: '#388e3c',\n bgColor: '#388e3c20',\n };\n }\n};\n\n// Format file size utility\nconst formatFileSize = (bytes: number): string => {\n if (bytes === 0) return '0 B';\n const k = 1024;\n const sizes = ['B', 'KB', 'MB', 'GB'];\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n return parseFloat((bytes / Math.pow(k, i)).toFixed(1)) + ' ' + sizes[i];\n};\n\nconst DocumentCard: React.FC<DocumentCardProps> = ({\n doc,\n onView,\n onDelete,\n onSelect,\n isSelected = false,\n isDeleting = false,\n variant = 'mini',\n showSelection = false,\n showDelete = false,\n showPreview = true,\n isHistoricalReference = false,\n allowErrorStates = true,\n}) => {\n const theme = useTheme();\n const { isVectorDocument } = useKnowledgeStore();\n const { downloadVectorFile, isVectorEnabled } = useVectorStore();\n const [documentState, setDocumentState] = useState<'available' | 'unavailable' | 'access-changed' | 'checking'>('checking');\n const [errorMessage, setErrorMessage] = useState<string>('');\n\n // Check document availability and access status\n useEffect(() => {\n const checkDocumentStatus = async () => {\n try {\n const isVector = isVectorDocument(doc);\n \n // Case 1: Vector document but vector access is now disabled\n if (isVector && !isVectorEnabled) {\n setDocumentState('access-changed');\n setErrorMessage('Vector database access disabled. Document not accessible.');\n return;\n }\n \n // Case 2: Vector document - try to verify it exists\n if (isVector) {\n try {\n // Attempt to get file blob to verify existence\n const fileId = doc.s3Url || doc.id;\n // Note: We don't actually fetch here to avoid performance issues,\n // but this is where we could add a lightweight existence check\n setDocumentState('available');\n } catch (error) {\n setDocumentState('unavailable');\n setErrorMessage('Document no longer exists in cloud storage.');\n }\n }\n // Case 3: Local document - check if it has content or rawData\n else {\n if (!doc.content && !doc.rawData) {\n setDocumentState('unavailable');\n setErrorMessage('Document content not available.');\n } else {\n setDocumentState('available');\n }\n }\n } catch (error) {\n setDocumentState('unavailable');\n setErrorMessage('Unable to verify document status.');\n }\n };\n\n if (isHistoricalReference) {\n checkDocumentStatus();\n } else {\n setDocumentState('available');\n }\n }, [doc, isHistoricalReference, isVectorEnabled, isVectorDocument]);\n \n const fileInfo = getFileTypeInfo(doc.name);\n const IconComponent = fileInfo.icon;\n const shouldUseVector = isVectorEnabled;\n const sourceInfo = getContentSourceInfo(doc, shouldUseVector);\n\n // Don't render if document is unavailable and error states are not allowed\n if (documentState === 'unavailable' && !allowErrorStates) {\n return null;\n }\n\n const handleDownload = async (e: React.MouseEvent) => {\n e.stopPropagation();\n \n // Prevent download if document is not available\n if (documentState !== 'available') {\n debugLogger.warn('Cannot download document - not available', { documentState, documentId: doc.id });\n return;\n }\n \n try {\n const isVector = isVectorDocument(doc);\n debugLogger.debug('Document download initiated', { name: doc.name, isVector });\n \n if (isVector) {\n const fileId = doc.s3Url || doc.id;\n debugLogger.debug('Downloading vector document', { fileId, name: doc.name });\n await downloadVectorFile(fileId, doc.name);\n } else {\n if (doc.rawData) {\n debugLogger.debug('Downloading local document from raw data', { name: doc.name });\n const binaryString = atob(doc.rawData);\n const bytes = new Uint8Array(binaryString.length);\n for (let i = 0; i < binaryString.length; i++) {\n bytes[i] = binaryString.charCodeAt(i);\n }\n const mimeType = doc.type || doc.mimeType || 'application/octet-stream';\n const blob = new Blob([bytes], { type: mimeType });\n const url = URL.createObjectURL(blob);\n const link = document.createElement(\"a\");\n link.href = url;\n link.download = doc.name;\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n URL.revokeObjectURL(url);\n } else {\n debugLogger.debug('Downloading local document from content fallback', { name: doc.name });\n const content = doc.content || '';\n const mimeType = doc.type || doc.mimeType || 'text/plain';\n const blob = new Blob([content], { type: mimeType });\n const url = URL.createObjectURL(blob);\n const link = document.createElement(\"a\");\n link.href = url;\n link.download = doc.name;\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n URL.revokeObjectURL(url);\n }\n }\n } catch (error) {\n debugLogger.error('DocumentCard download failed', { error, documentId: doc.id, name: doc.name });\n }\n };\n\n const handleCardClick = (e: React.MouseEvent) => {\n // Prevent interaction if document is not available\n if (documentState !== 'available') {\n e.stopPropagation();\n return;\n }\n \n if (e.ctrlKey || e.metaKey) {\n onSelect?.(doc.id);\n } else {\n onView();\n }\n };\n\n // Helper function to get error state styling\n const getErrorStateStyles = () => {\n if (documentState === 'available') return {};\n \n return {\n opacity: 0.6,\n position: 'relative',\n pointerEvents: documentState === 'checking' ? 'none' : 'auto',\n '&::after': (documentState === 'unavailable' || documentState === 'access-changed') ? {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n background: 'rgba(0, 0, 0, 0.1)',\n backdropFilter: 'blur(1px)',\n borderRadius: 'inherit',\n pointerEvents: 'none',\n } : {},\n };\n };\n\n // Helper function to render error message overlay\n const renderErrorOverlay = () => {\n if (documentState === 'available' || documentState === 'checking') return null;\n \n const errorIcon = documentState === 'access-changed' ? CloudOffIcon : ErrorOutlineIcon;\n const ErrorIcon = errorIcon;\n \n return (\n <Box\n sx={{\n position: 'absolute',\n top: 8,\n right: 8,\n zIndex: 2,\n }}\n >\n <Tooltip title={errorMessage} arrow>\n <ErrorIcon \n sx={{ \n fontSize: variant === 'mini' ? 16 : 20,\n color: 'error.main',\n filter: 'drop-shadow(0 1px 2px rgba(0,0,0,0.3))',\n }} \n />\n </Tooltip>\n </Box>\n );\n };\n\n if (variant === 'mini') {\n return (\n <Card\n sx={{\n p: 1.5,\n borderRadius: 2,\n border: \"1px solid\",\n borderColor: isSelected ? \"primary.main\" : \"divider\",\n bgcolor: isSelected ? \"primary.main\" + \"08\" : \"background.paper\",\n boxShadow: 4,\n width: 180,\n textAlign: \"center\",\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n minHeight: 160,\n cursor: documentState === 'available' ? \"pointer\" : \"not-allowed\",\n transition: \"all 0.2s ease-in-out\",\n '&:hover': documentState === 'available' ? {\n boxShadow: 6,\n borderColor: \"primary.light\",\n transform: \"translateY(-2px)\",\n } : {},\n ...getErrorStateStyles(),\n }}\n onClick={handleCardClick}\n >\n {renderErrorOverlay()}\n \n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n mb: 1,\n }}\n >\n <IconComponent sx={{ fontSize: 32, color: fileInfo.color }} />\n </Box>\n \n <Tooltip title={doc.name} arrow>\n <Typography\n variant=\"caption\"\n sx={{\n display: \"block\",\n color: \"text.primary\",\n fontWeight: 500,\n mb: 1,\n whiteSpace: \"nowrap\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n width: \"100%\",\n }}\n >\n {doc.name}\n </Typography>\n </Tooltip>\n\n <Box sx={{ display: \"flex\", gap: 0.5, mb: 1, flexWrap: \"wrap\", justifyContent: \"center\" }}>\n <Chip\n icon={<sourceInfo.icon sx={{ fontSize: '0.8rem !important' }} />}\n label={sourceInfo.label}\n size=\"small\"\n sx={{\n bgcolor: sourceInfo.bgColor,\n color: sourceInfo.color,\n fontWeight: 600,\n fontSize: '0.65rem',\n }}\n />\n <Chip \n label={fileInfo.category} \n size=\"small\" \n sx={{ \n bgcolor: fileInfo.color + '20',\n color: fileInfo.color,\n fontWeight: 500,\n fontSize: '0.65rem',\n }}\n />\n </Box>\n\n <Box sx={{ display: \"flex\", gap: 1, mt: 1 }}>\n <Tooltip title={documentState === 'available' ? \"View\" : \"Document not available\"}>\n <span>\n <Button\n size=\"small\"\n variant=\"contained\"\n color=\"primary\"\n disabled={documentState !== 'available'}\n sx={{\n px: 1.5,\n borderRadius: \"999px\",\n minWidth: 0,\n height: 32,\n }}\n onClick={(e) => {\n e.stopPropagation();\n if (documentState === 'available') onView();\n }}\n >\n <SearchIcon fontSize=\"small\" />\n </Button>\n </span>\n </Tooltip>\n <Tooltip title={documentState === 'available' ? \"Download\" : errorMessage}>\n <span>\n <Button\n size=\"small\"\n variant=\"outlined\"\n color=\"secondary\"\n disabled={documentState !== 'available'}\n sx={{\n px: 1.5,\n borderRadius: \"999px\",\n minWidth: 0,\n height: 32,\n }}\n onClick={handleDownload}\n >\n <DownloadIcon fontSize=\"small\" />\n </Button>\n </span>\n </Tooltip>\n </Box>\n </Card>\n );\n }\n\n // Full variant for Knowledge Tab\n return (\n <Card\n sx={{\n position: \"relative\",\n height: { xs: 260, sm: 280, md: 300 },\n cursor: documentState === 'available' ? \"pointer\" : \"not-allowed\",\n transition: \"all 0.3s ease-in-out\",\n border: isSelected ? `2px solid ${theme.palette?.primary?.main}` : `1px solid ${theme.palette?.divider}`,\n \"&:hover\": documentState === 'available' ? {\n boxShadow: 6,\n transform: isDeleting ? 'scale(0.9)' : 'translateY(-2px)',\n } : {},\n bgcolor: isSelected ? `${theme.palette?.primary?.main}08` : 'background.paper',\n display: 'flex',\n flexDirection: 'column',\n opacity: isDeleting ? 0.4 : 1,\n transform: isDeleting ? 'scale(0.9)' : 'scale(1)',\n ...getErrorStateStyles(),\n }}\n onClick={handleCardClick}\n >\n {renderErrorOverlay()}\n \n <CardContent sx={{ \n p: { xs: 1.5, sm: 2 }, \n height: '100%', \n display: 'flex', \n flexDirection: 'column',\n overflow: 'hidden'\n }}>\n {/* File Type Icon and Actions */}\n <Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start', mb: 1, height: 32 }}>\n <IconComponent sx={{ fontSize: 32, color: fileInfo.color, flexShrink: 0 }} />\n <Box sx={{ display: 'flex', gap: 0.5, flexShrink: 0 }}>\n {showSelection && (\n <IconButton\n size=\"small\"\n onClick={(e) => {\n e.stopPropagation();\n onSelect?.(doc.id);\n }}\n sx={{ \n width: 24, \n height: 24,\n bgcolor: isSelected ? 'primary.main' : 'transparent',\n color: isSelected ? 'primary.contrastText' : 'text.secondary',\n '&:hover': {\n bgcolor: isSelected ? 'primary.dark' : 'action.hover',\n }\n }}\n >\n {isSelected ? '✓' : '○'}\n </IconButton>\n )}\n {showDelete && (\n <IconButton\n size=\"small\"\n color=\"error\"\n onClick={(e) => {\n e.stopPropagation();\n onDelete?.(doc.id);\n }}\n sx={{ width: 24, height: 24 }}\n >\n <DeleteIcon fontSize=\"small\" />\n </IconButton>\n )}\n </Box>\n </Box>\n\n {/* Document Preview */}\n {showPreview && (\n <Box\n sx={{\n mb: 1.5,\n p: { xs: 1, sm: 1.5 },\n borderRadius: 1.5,\n bgcolor: 'background.paper',\n border: '1px solid',\n borderColor: 'divider',\n overflow: 'hidden',\n position: 'relative',\n height: { xs: 60, sm: 70, md: 80 },\n display: 'flex',\n alignItems: 'center',\n }}\n >\n {doc.content && doc.content.length > 0 ? (\n <Typography\n variant=\"body2\"\n sx={{\n display: \"-webkit-box\",\n WebkitLineClamp: 3,\n WebkitBoxOrient: \"vertical\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n color: 'text.secondary',\n lineHeight: 1.3,\n fontSize: '0.8rem',\n }}\n >\n {doc.content.substring(0, 100)}...\n </Typography>\n ) : (\n <Box sx={{ display: 'flex', alignItems: 'center', gap: 1, opacity: 0.6 }}>\n <InfoIcon sx={{ fontSize: 16 }} />\n <Typography variant=\"caption\" color=\"text.disabled\">\n No preview available\n </Typography>\n </Box>\n )}\n </Box>\n )}\n\n {/* Document Name */}\n <Tooltip title={doc.name} arrow>\n <Typography\n variant=\"body2\"\n sx={{\n fontWeight: 600,\n whiteSpace: \"nowrap\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n mb: 1,\n color: 'text.primary',\n fontSize: { xs: '0.8rem', sm: '0.875rem' },\n height: { xs: '1.2rem', sm: '1.3rem' },\n }}\n >\n {doc.name}\n </Typography>\n </Tooltip>\n \n {/* Tags and size */}\n <Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start', mb: 1, minHeight: 40 }}>\n <Box sx={{ display: 'flex', gap: 0.5, flexWrap: 'wrap', flex: 1, mr: 1 }}>\n <Chip\n icon={<sourceInfo.icon sx={{ fontSize: '0.9rem !important' }} />}\n label={sourceInfo.label}\n size=\"small\"\n sx={{\n bgcolor: sourceInfo.bgColor,\n color: sourceInfo.color,\n fontWeight: 700,\n fontSize: '0.75rem',\n border: `2px solid ${sourceInfo.color}60`,\n '& .MuiChip-icon': {\n color: `${sourceInfo.color} !important`,\n },\n boxShadow: `0 2px 4px ${sourceInfo.color}20`,\n }}\n />\n \n <Chip \n label={fileInfo.category} \n size=\"small\" \n sx={{ \n bgcolor: fileInfo.color + '20',\n color: fileInfo.color,\n fontWeight: 500,\n fontSize: '0.65rem',\n }}\n />\n {fileInfo.language && (\n <Chip \n label={fileInfo.language} \n size=\"small\" \n sx={{ \n bgcolor: fileInfo.color + '15',\n color: fileInfo.color,\n fontWeight: 400,\n fontSize: '0.6rem',\n border: `1px solid ${fileInfo.color}30`,\n }}\n />\n )}\n </Box>\n <Typography variant=\"caption\" color=\"text.secondary\" sx={{ flexShrink: 0 }}>\n {formatFileSize((doc.content?.length || 0) * 2)}\n </Typography>\n </Box>\n\n {/* Download Button */}\n <Box sx={{ mt: 'auto' }}>\n <Button\n variant=\"outlined\"\n size=\"small\"\n fullWidth\n disabled={documentState !== 'available'}\n sx={{ \n textTransform: 'none',\n height: { xs: 32, sm: 36, md: 40 },\n flexShrink: 0,\n borderWidth: 2,\n fontSize: { xs: '0.75rem', sm: '0.8rem', md: '0.875rem' },\n fontWeight: 600,\n '&:hover': documentState === 'available' ? {\n borderWidth: 2,\n bgcolor: 'primary.main',\n color: 'primary.contrastText',\n transform: 'translateY(-1px)',\n boxShadow: 2,\n } : {},\n '&.Mui-disabled': {\n opacity: 0.6,\n borderColor: 'action.disabled',\n color: 'text.disabled',\n },\n }}\n onClick={handleDownload}\n startIcon={<DownloadIcon sx={{ fontSize: { xs: '1rem', sm: '1.1rem' } }} />}\n >\n {documentState === 'available' ? 'Download' : 'Unavailable'}\n </Button>\n \n {/* Error message for full variant */}\n {documentState !== 'available' && documentState !== 'checking' && (\n <Alert \n severity=\"warning\" \n sx={{ \n mt: 1, \n fontSize: '0.75rem',\n '& .MuiAlert-icon': { fontSize: '1rem' },\n '& .MuiAlert-message': { padding: '0' },\n }}\n >\n {errorMessage}\n </Alert>\n )}\n </Box>\n </CardContent>\n </Card>\n );\n};\n\nexport default DocumentCard;\n","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-C410-8CA568\nconst __banditFingerprint_knowlege_knowledgefilemodaltsx = 'BL-FP-823E15-0B23';\nconst __auditTrail_knowlege_knowledgefilemodaltsx = 'BL-AU-MGOIKVVO-T646';\n// File: knowledge-file-modal.tsx | Path: src/modals/knowlege/knowledge-file-modal.tsx | Hash: c4100b23\n\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport {\n Dialog,\n AppBar,\n Toolbar,\n IconButton,\n Typography,\n Box,\n CircularProgress,\n Alert,\n Button,\n Paper,\n ToggleButton,\n ToggleButtonGroup,\n Tooltip,\n useTheme,\n useMediaQuery,\n} from \"@mui/material\";\nimport { KnowledgeDoc } from \"../../store/knowledgeStore\";\nimport { useVectorStore } from \"../../hooks/useVectorStore\";\nimport { usePackageSettingsStore } from \"../../store/packageSettingsStore\";\nimport * as pdfjsLib from \"pdfjs-dist/legacy/build/pdf\";\nimport type { Root, Element, Text } from \"hast\";\nimport { getHighlightTree } from \"../../utils/lowlight\";\nimport { renderLowlightChildren } from \"../../utils/markdownRendering\";\nimport { debugLogger } from \"../../services/logging/debugLogger\";\nimport type { PDFDocumentProxy } from \"pdfjs-dist/types/src/display/api\";\nimport {\n ArticleIcon,\n CloseIcon,\n CodeIcon,\n DataObjectIcon,\n DescriptionIcon,\n DownloadIcon,\n PictureAsPdfIcon,\n TextFieldsIcon,\n ZoomInIcon,\n ZoomOutIcon,\n} from \"../../icons/lucide-icons\";\n\ntype FileTypeInfo = {\n icon: React.ElementType;\n color: string;\n category: string;\n language?: string;\n};\n\nconst getFileTypeInfo = (filename: string): FileTypeInfo => {\n const ext = filename.split('.').pop()?.toLowerCase() || '';\n \n const languageMap: Record<string, FileTypeInfo> = {\n // Documents\n 'pdf': { icon: PictureAsPdfIcon, color: '#d32f2f', category: 'Document' },\n 'doc': { icon: ArticleIcon, color: '#1976d2', category: 'Document' },\n 'docx': { icon: ArticleIcon, color: '#1976d2', category: 'Document' },\n 'odt': { icon: ArticleIcon, color: '#1976d2', category: 'Document' },\n 'rtf': { icon: ArticleIcon, color: '#1976d2', category: 'Document' },\n \n // Text files\n 'txt': { icon: DescriptionIcon, color: '#388e3c', category: 'Text' },\n 'md': { icon: DescriptionIcon, color: '#388e3c', category: 'Text', language: 'Markdown' },\n 'markdown': { icon: DescriptionIcon, color: '#388e3c', category: 'Text', language: 'Markdown' },\n \n // Web languages\n 'js': { icon: CodeIcon, color: '#f7df1e', category: 'Code', language: 'JavaScript' },\n 'jsx': { icon: CodeIcon, color: '#61dafb', category: 'Code', language: 'JavaScript' },\n 'ts': { icon: CodeIcon, color: '#3178c6', category: 'Code', language: 'TypeScript' },\n 'tsx': { icon: CodeIcon, color: '#61dafb', category: 'Code', language: 'TypeScript' },\n 'html': { icon: CodeIcon, color: '#e34f26', category: 'Code', language: 'HTML' },\n 'css': { icon: CodeIcon, color: '#1572b6', category: 'Code', language: 'CSS' },\n 'scss': { icon: CodeIcon, color: '#cf649a', category: 'Code', language: 'SCSS' },\n 'sass': { icon: CodeIcon, color: '#cf649a', category: 'Code', language: 'Sass' },\n 'php': { icon: CodeIcon, color: '#777bb4', category: 'Code', language: 'PHP' },\n \n // Systems languages\n 'c': { icon: CodeIcon, color: '#a8b9cc', category: 'Code', language: 'C' },\n 'cpp': { icon: CodeIcon, color: '#f34b7d', category: 'Code', language: 'C++' },\n 'cs': { icon: CodeIcon, color: '#239120', category: 'Code', language: 'C#' },\n 'java': { icon: CodeIcon, color: '#ed8b00', category: 'Code', language: 'Java' },\n 'py': { icon: CodeIcon, color: '#3776ab', category: 'Code', language: 'Python' },\n 'go': { icon: CodeIcon, color: '#00add8', category: 'Code', language: 'Go' },\n 'rs': { icon: CodeIcon, color: '#ce422b', category: 'Code', language: 'Rust' },\n 'kt': { icon: CodeIcon, color: '#7f52ff', category: 'Code', language: 'Kotlin' },\n 'swift': { icon: CodeIcon, color: '#fa7343', category: 'Code', language: 'Swift' },\n 'scala': { icon: CodeIcon, color: '#dc322f', category: 'Code', language: 'Scala' },\n 'rb': { icon: CodeIcon, color: '#cc342d', category: 'Code', language: 'Ruby' },\n \n // Scripts\n 'sh': { icon: CodeIcon, color: '#4eaa25', category: 'Code', language: 'Shell' },\n 'bash': { icon: CodeIcon, color: '#4eaa25', category: 'Code', language: 'Bash' },\n 'bat': { icon: CodeIcon, color: '#c1f12e', category: 'Code', language: 'Batch' },\n 'ps1': { icon: CodeIcon, color: '#012456', category: 'Code', language: 'PowerShell' },\n \n // Data formats\n 'json': { icon: DataObjectIcon, color: '#f7df1e', category: 'Data', language: 'JSON' },\n 'xml': { icon: DataObjectIcon, color: '#ff6600', category: 'Data', language: 'XML' },\n 'yaml': { icon: DataObjectIcon, color: '#cb171e', category: 'Data', language: 'YAML' },\n 'yml': { icon: DataObjectIcon, color: '#cb171e', category: 'Data', language: 'YAML' },\n 'csv': { icon: DataObjectIcon, color: '#217346', category: 'Data', language: 'CSV' },\n };\n \n return languageMap[ext] || { icon: DescriptionIcon, color: '#666', category: 'Other' };\n};\n\nconst isPDF = (filename: string): boolean => filename.toLowerCase().endsWith('.pdf');\n\nconst LANGUAGE_MAP: Record<string, string> = {\n // Web technologies\n 'js': 'javascript',\n 'jsx': 'jsx',\n 'ts': 'typescript',\n 'tsx': 'tsx',\n 'html': 'html',\n 'htm': 'html',\n 'css': 'css',\n 'scss': 'scss',\n 'sass': 'sass',\n 'less': 'less',\n\n // Data formats\n 'json': 'json',\n 'xml': 'xml',\n 'yaml': 'yaml',\n 'yml': 'yaml',\n 'csv': 'csv',\n\n // Systems programming\n 'c': 'c',\n 'cpp': 'cpp',\n 'cxx': 'cpp',\n 'cc': 'cpp',\n 'h': 'c',\n 'hpp': 'cpp',\n 'cs': 'csharp',\n 'java': 'java',\n 'py': 'python',\n 'go': 'go',\n 'rs': 'rust',\n 'kt': 'kotlin',\n 'swift': 'swift',\n 'scala': 'scala',\n 'rb': 'ruby',\n 'php': 'php',\n\n // Scripting\n 'sh': 'bash',\n 'bash': 'bash',\n 'zsh': 'bash',\n 'fish': 'bash',\n 'bat': 'batch',\n 'cmd': 'batch',\n 'ps1': 'powershell',\n\n // Markup and documentation\n 'md': 'markdown',\n 'markdown': 'markdown',\n 'tex': 'latex',\n 'sql': 'sql',\n\n // Configuration\n 'ini': 'ini',\n 'conf': 'ini',\n 'config': 'ini',\n 'toml': 'toml',\n 'dockerfile': 'docker',\n\n // Other\n 'r': 'r',\n 'matlab': 'matlab',\n 'm': 'matlab',\n 'lua': 'lua',\n 'perl': 'perl',\n 'pl': 'perl',\n};\n\nconst getLanguageFromFilename = (filename: string): string => {\n const ext = filename.toLowerCase().split('.').pop() || '';\n return LANGUAGE_MAP[ext] || 'text';\n};\n\nconst isCodeFile = (filename: string): boolean => getLanguageFromFilename(filename) !== 'text';\n\nconst formatJsonContent = (content: string): string => {\n try {\n const parsed = JSON.parse(content);\n return JSON.stringify(parsed, null, 2);\n } catch {\n return content;\n }\n};\n\nconst getFormattedContent = (content: string, filename: string): string => {\n const ext = filename.toLowerCase().split('.').pop() || '';\n\n if (ext === 'json') {\n return formatJsonContent(content);\n }\n\n return content;\n};\n\ninterface Props {\n open: boolean;\n onClose: () => void;\n doc: KnowledgeDoc | null;\n isVectorDocument?: boolean;\n}\n\nconst KnowledgeFileModal: React.FC<Props> = ({ open, onClose, doc, isVectorDocument = false }) => {\n const [fullContent, setFullContent] = useState<string>('');\n const [loading, setLoading] = useState(false);\n const [error, setError] = useState<string | null>(null);\n const [pdfDocument, setPdfDocument] = useState<PDFDocumentProxy | null>(null);\n const [currentPage, setCurrentPage] = useState(1);\n const [totalPages, setTotalPages] = useState(0);\n const [pdfScale, setPdfScale] = useState(1.2);\n const [pdfCanvases, setPdfCanvases] = useState<HTMLCanvasElement[]>([]);\n const [viewMode, setViewMode] = useState<'formatted' | 'raw'>('formatted');\n const zoomTimeoutRef = useRef<NodeJS.Timeout | null>(null);\n const { downloadVectorFile, getFileBlob } = useVectorStore();\n const packageSettings = usePackageSettingsStore();\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('md'));\n\n\n const isDarkTheme = theme.palette.mode === 'dark';\n\n useEffect(() => {\n if (typeof window !== 'undefined') {\n \n pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://cdn.burtson.ai/scripts/pdf.worker.js';\n }\n }, [])\n useEffect(() => {\n return () => {\n if (zoomTimeoutRef.current) {\n clearTimeout(zoomTimeoutRef.current);\n }\n };\n }, []);\n\n const baseContent = fullContent || doc?.content || '';\n const filename = doc?.name || '';\n const formattedContent = useMemo(\n () => getFormattedContent(baseContent, filename),\n [baseContent, filename]\n );\n\n const highlightLanguage = useMemo(() => {\n if (!filename || !isCodeFile(filename)) {\n return \"\";\n }\n return getLanguageFromFilename(filename).toLowerCase();\n }, [filename]);\n\n const highlightTree = useMemo<Root | null>(() => {\n if (!highlightLanguage) {\n return null;\n }\n return getHighlightTree(formattedContent, highlightLanguage);\n }, [formattedContent, highlightLanguage]);\n\n const highlightedNodes = useMemo(() => {\n if (!highlightTree) {\n return [] as React.ReactNode[];\n }\n\n const highlightChildren = (highlightTree.children || []).filter((node): node is Element | Text => {\n return node.type === \"element\" || node.type === \"text\";\n });\n\n return renderLowlightChildren(\n highlightChildren,\n `hl-doc-${highlightLanguage || \"auto\"}`\n );\n }, [highlightTree, highlightLanguage]);\n\n const resolvedHighlightLanguage = useMemo(() => {\n const data = highlightTree?.data;\n if (data && typeof data === \"object\" && data !== null && \"language\" in data) {\n const languageValue = (data as { language?: unknown }).language;\n if (typeof languageValue === \"string\") {\n return languageValue.toLowerCase();\n }\n }\n return highlightLanguage;\n }, [highlightTree, highlightLanguage]);\n\n const renderPdfPage = async (pdf: PDFDocumentProxy, pageNumber: number, scale: number = 1.2): Promise<HTMLCanvasElement> => {\n const page = await pdf.getPage(pageNumber);\n const viewport = page.getViewport({ scale });\n \n const canvas = document.createElement('canvas');\n const context = canvas.getContext('2d');\n if (!context) {\n throw new Error('Unable to obtain 2D context for PDF rendering');\n }\n canvas.height = viewport.height;\n canvas.width = viewport.width;\n\n const renderContext = {\n canvasContext: context,\n viewport: viewport\n };\n\n await page.render(renderContext).promise;\n return canvas;\n };\n\n const loadPdfDocument = useCallback(async (arrayBuffer: ArrayBuffer) => {\n try {\n const pdf = await pdfjsLib.getDocument({ data: arrayBuffer }).promise;\n setPdfDocument(pdf);\n setTotalPages(pdf.numPages);\n setCurrentPage(1);\n\n // Render all pages\n const canvases: HTMLCanvasElement[] = [];\n for (let i = 1; i <= pdf.numPages; i++) {\n const canvas = await renderPdfPage(pdf, i, pdfScale);\n canvases.push(canvas);\n }\n setPdfCanvases(canvases);\n } catch (err) {\n debugLogger.error(\"Failed to load PDF\", { error: err });\n throw err;\n }\n }, [pdfScale]);\n\n // Helper function to create blob from local file rawData\n const createLocalFileBlob = (doc: KnowledgeDoc): Blob => {\n if (!doc.rawData) {\n throw new Error('No raw data available for local file');\n }\n \n const binaryString = atob(doc.rawData);\n const bytes = new Uint8Array(binaryString.length);\n for (let i = 0; i < binaryString.length; i++) {\n bytes[i] = binaryString.charCodeAt(i);\n }\n const mimeType = doc.type || doc.mimeType || 'application/octet-stream';\n return new Blob([bytes], { type: mimeType });\n };\n\n const loadPdfFromDataUrl = async (dataUrl: string) => {\n try {\n setLoading(true);\n setError(null);\n \n const response = await fetch(dataUrl);\n const arrayBuffer = await response.arrayBuffer();\n await loadPdfDocument(arrayBuffer);\n } catch (err) {\n debugLogger.error('Failed to load PDF from data URL', { error: err });\n setError('Failed to load PDF preview');\n } finally {\n setLoading(false);\n }\n };\n\n const loadFullContent = useCallback(async () => {\n if (!doc) return;\n \n setLoading(true);\n setError(null);\n \n try {\n if (isPDF(doc.name)) {\n // For PDF files, get the binary data and render it\n const fileBlob = await getFileBlob(doc.id);\n const arrayBuffer = await fileBlob.arrayBuffer();\n await loadPdfDocument(arrayBuffer);\n } else {\n // For text files, get the text content\n const fileBlob = await getFileBlob(doc.id);\n const content = await fileBlob.text();\n setFullContent(content);\n }\n } catch (err) {\n debugLogger.error('Failed to load full file content', { error: err });\n if (isPDF(doc.name)) {\n setError('Failed to load PDF. The file may be corrupted or too large.');\n } else {\n setError('Failed to load full file content. Showing preview instead.');\n setFullContent(doc.content || '');\n }\n } finally {\n setLoading(false);\n }\n }, [doc, getFileBlob, loadPdfDocument]);\n\n useEffect(() => {\n if (open && doc && isVectorDocument) {\n loadFullContent();\n } else if (open && doc) {\n if (isPDF(doc.name)) {\n if (doc.rawData) {\n try {\n const blob = createLocalFileBlob(doc);\n const arrayBuffer = blob.arrayBuffer();\n arrayBuffer.then(loadPdfDocument).catch(err => {\n debugLogger.error(\"Failed to load local PDF\", { error: err });\n setError('Failed to load PDF preview');\n });\n } catch (err) {\n debugLogger.error(\"Failed to create blob from local PDF data\", { error: err });\n setError('PDF preview not available for this document');\n }\n } else {\n setError('PDF preview not available for this document');\n }\n } else {\n setFullContent(doc.content || '');\n }\n }\n \n if (!open) {\n setPdfDocument(null);\n setPdfCanvases([]);\n setCurrentPage(1);\n setTotalPages(0);\n setPdfScale(1.2);\n setFullContent('');\n setError(null);\n setViewMode('formatted');\n }\n }, [open, doc, isVectorDocument, loadFullContent, loadPdfDocument]);\n\n const handleZoomIn = async () => {\n // Clear any existing timeout\n if (zoomTimeoutRef.current) {\n clearTimeout(zoomTimeoutRef.current);\n }\n \n const newScale = Math.min(pdfScale + 0.25, 3.0);\n setPdfScale(newScale);\n \n // Debounce the actual re-rendering to prevent rapid successive calls\n zoomTimeoutRef.current = setTimeout(async () => {\n if (pdfDocument) {\n setLoading(true);\n try {\n const canvases: HTMLCanvasElement[] = [];\n for (let i = 1; i <= pdfDocument.numPages; i++) {\n const canvas = await renderPdfPage(pdfDocument, i, newScale);\n canvases.push(canvas);\n }\n setPdfCanvases(canvases);\n } catch (error) {\n debugLogger.error('Zoom in failed', { error });\n // Revert to previous scale on error\n setPdfScale(pdfScale);\n } finally {\n setLoading(false);\n }\n }\n }, 300); // 300ms debounce\n };\n\n const handleZoomOut = async () => {\n if (zoomTimeoutRef.current) {\n clearTimeout(zoomTimeoutRef.current);\n }\n \n const newScale = Math.max(pdfScale - 0.25, 0.5);\n setPdfScale(newScale);\n \n zoomTimeoutRef.current = setTimeout(async () => {\n if (pdfDocument) {\n setLoading(true);\n try {\n const canvases: HTMLCanvasElement[] = [];\n for (let i = 1; i <= pdfDocument.numPages; i++) {\n const canvas = await renderPdfPage(pdfDocument, i, newScale);\n canvases.push(canvas);\n }\n setPdfCanvases(canvases);\n } catch (error) {\n debugLogger.error('Zoom out failed', { error });\n setPdfScale(pdfScale);\n } finally {\n setLoading(false);\n }\n }\n }, 300);\n };\n\n const handleDownload = async () => {\n if (!doc || !isVectorDocument) return;\n \n try {\n await downloadVectorFile(doc.id, doc.name);\n } catch (err) {\n debugLogger.error('Vector document download failed', { error: err, docId: doc.id });\n }\n };\n return (\n <Dialog fullScreen open={open} onClose={onClose}>\n <AppBar sx={{ position: \"relative\" }}>\n <Toolbar>\n {/* Document info section with badge and title */}\n <Box sx={{ display: 'flex', alignItems: 'center', flex: 1, minWidth: 0 }}>\n {/* Document type badge */}\n {doc && (\n <Box sx={{ mr: 1, flexShrink: 0 }}>\n {(() => {\n const fileInfo = getFileTypeInfo(doc.name);\n const IconComponent = fileInfo.icon;\n return (\n <Tooltip title={`${fileInfo.category} file`} placement=\"bottom\">\n <Box \n sx={{ \n display: 'flex', \n alignItems: 'center', \n bgcolor: fileInfo.color, \n color: 'white', \n borderRadius: 1, \n px: 1, \n py: 0.25,\n fontSize: '0.75rem',\n fontWeight: 'bold'\n }}\n >\n <IconComponent sx={{ fontSize: '1rem', mr: 0.5 }} />\n {fileInfo.language || fileInfo.category}\n </Box>\n </Tooltip>\n );\n })()}\n </Box>\n )}\n \n {/* Title with responsive truncation */}\n <Tooltip title={doc?.name || ''} placement=\"bottom-start\">\n <Typography \n sx={{ \n flex: 1,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n // Responsive max width for title truncation\n maxWidth: {\n xs: '120px', // Mobile: very short for small screens (reduced to account for badge)\n sm: '180px', // Small tablet: short (reduced)\n md: '280px', // Medium: medium length (reduced)\n lg: '380px', // Large: longer (reduced)\n xl: '480px' // Extra large: longest (reduced)\n },\n cursor: 'help' // Indicate tooltip is available\n }} \n variant=\"h6\"\n >\n {doc?.name}\n </Typography>\n </Tooltip>\n \n {/* Additional file info - only show page count for PDFs */}\n <Box sx={{ display: 'flex', alignItems: 'center', flexShrink: 0, ml: 1 }}>\n {isPDF(doc?.name || '') && totalPages > 0 && (\n <Typography component=\"span\" variant=\"body2\" sx={{ opacity: 0.8 }}>\n ({totalPages} page{totalPages > 1 ? 's' : ''})\n </Typography>\n )}\n </Box>\n </Box>\n \n {/* Toolbar actions section */}\n <Box sx={{ display: 'flex', alignItems: 'center', flexShrink: 0, gap: 1 }}>\n {/* Code View Toggle for non-PDF files */}\n {!isPDF(doc?.name || '') && isCodeFile(doc?.name || '') && (\n <ToggleButtonGroup\n value={viewMode}\n exclusive\n onChange={(e, newMode) => newMode && setViewMode(newMode)}\n size=\"small\"\n >\n <ToggleButton value=\"formatted\" sx={{ color: 'inherit' }}>\n <CodeIcon sx={{ mr: 1, fontSize: '1rem' }} />\n Formatted\n </ToggleButton>\n <ToggleButton value=\"raw\" sx={{ color: 'inherit' }}>\n <TextFieldsIcon sx={{ mr: 1, fontSize: '1rem' }} />\n Raw\n </ToggleButton>\n </ToggleButtonGroup>\n )}\n \n {/* PDF Navigation Controls - Hidden on mobile */}\n {isPDF(doc?.name || '') && pdfDocument && !isMobile && (\n <>\n <Button \n color=\"inherit\" \n startIcon={<ZoomOutIcon />}\n onClick={handleZoomOut}\n disabled={pdfScale <= 0.5}\n size=\"small\"\n >\n Zoom Out\n </Button>\n <Typography variant=\"body2\" sx={{ color: 'inherit', mx: 1 }}>\n {Math.round(pdfScale * 100)}%\n </Typography>\n <Button \n color=\"inherit\" \n startIcon={<ZoomInIcon />}\n onClick={handleZoomIn}\n disabled={pdfScale >= 3.0}\n size=\"small\"\n >\n Zoom In\n </Button>\n </>\n )}\n \n {/* Download and Close buttons */}\n {isVectorDocument && (\n <IconButton edge=\"end\" color=\"inherit\" onClick={handleDownload}>\n <DownloadIcon />\n </IconButton>\n )}\n <IconButton edge=\"end\" color=\"inherit\" onClick={onClose}>\n <CloseIcon />\n </IconButton>\n </Box>\n </Toolbar>\n </AppBar>\n <Box sx={{ p: 3, bgcolor: \"background.default\", height: \"100%\", overflowY: \"auto\" }}>\n {loading && (\n <Box sx={{ display: 'flex', justifyContent: 'center', alignItems: 'center', height: '50vh' }}>\n <CircularProgress />\n <Typography sx={{ ml: 2 }}>\n {isPDF(doc?.name || '') ? 'Loading PDF document...' : 'Loading full file content...'}\n </Typography>\n </Box>\n )}\n \n {error && (\n <Alert severity=\"warning\" sx={{ mb: 2 }}>\n {error}\n </Alert>\n )}\n \n {!loading && isPDF(doc?.name || '') && pdfCanvases.length > 0 && (\n <Box sx={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 2 }}>\n {pdfCanvases.map((canvas, index) => (\n <Paper \n key={index} \n elevation={3} \n sx={{ \n p: 2, \n mb: 2,\n maxWidth: '100%',\n overflow: 'auto',\n // Custom scrollbar styling for PDF viewer\n '&::-webkit-scrollbar': {\n width: '8px',\n height: '8px',\n },\n '&::-webkit-scrollbar-track': {\n background: isDarkTheme ? '#2d2d2d' : '#f5f5f5',\n borderRadius: '4px',\n },\n '&::-webkit-scrollbar-thumb': {\n background: isDarkTheme ? '#555' : '#c1c1c1',\n borderRadius: '4px',\n '&:hover': {\n background: isDarkTheme ? '#666' : '#a1a1a1',\n },\n },\n '&::-webkit-scrollbar-corner': {\n background: isDarkTheme ? '#2d2d2d' : '#f5f5f5',\n },\n // Firefox scrollbar support\n scrollbarWidth: 'thin',\n scrollbarColor: isDarkTheme ? '#555 #2d2d2d' : '#c1c1c1 #f5f5f5',\n }}\n >\n <Typography variant=\"caption\" color=\"text.secondary\" sx={{ mb: 1, display: 'block' }}>\n Page {index + 1} of {totalPages}\n </Typography>\n <Box\n ref={(el: HTMLDivElement | null) => {\n if (el && canvas) {\n el.innerHTML = '';\n el.appendChild(canvas);\n }\n }}\n sx={{\n '& canvas': {\n display: 'block',\n maxWidth: '100%',\n height: 'auto',\n border: '1px solid',\n borderColor: 'divider',\n }\n }}\n />\n </Paper>\n ))}\n </Box>\n )}\n \n {!loading && !isPDF(doc?.name || '') && (\n <Box>\n {isCodeFile(doc?.name || '') && viewMode === 'formatted' ? (\n <Box>\n {/* Language indicator */}\n <Box sx={{ mb: 2, display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>\n <Typography variant=\"body2\" color=\"text.secondary\">\n Syntax highlighted as <strong>{getLanguageFromFilename(doc?.name || '').toUpperCase()}</strong>\n </Typography>\n <Typography variant=\"caption\" color=\"text.secondary\">\n {(fullContent || doc?.content || '').split('\\n').length} lines\n </Typography>\n </Box>\n \n <Paper \n elevation={1} \n sx={{ \n overflow: 'auto',\n maxHeight: { xs: 'calc(100vh - 320px)', sm: 'calc(100vh - 280px)' },\n border: '1px solid',\n borderColor: 'divider',\n // Custom scrollbar styling to match theme\n '&::-webkit-scrollbar': {\n width: { xs: '8px', sm: '12px' },\n height: { xs: '8px', sm: '12px' },\n },\n '&::-webkit-scrollbar-track': {\n backgroundColor: isDarkTheme ? '#2d2d2d' : '#f5f5f5',\n borderRadius: '6px',\n },\n '&::-webkit-scrollbar-thumb': {\n backgroundColor: isDarkTheme ? '#555' : '#c1c1c1',\n borderRadius: '6px',\n border: isDarkTheme ? '2px solid #2d2d2d' : '2px solid #f5f5f5',\n '&:hover': {\n backgroundColor: isDarkTheme ? '#777' : '#a8a8a8',\n },\n },\n '&::-webkit-scrollbar-corner': {\n backgroundColor: isDarkTheme ? '#2d2d2d' : '#f5f5f5',\n },\n // Firefox scrollbar styling\n scrollbarWidth: 'thin',\n scrollbarColor: isDarkTheme ? '#555 #2d2d2d' : '#c1c1c1 #f5f5f5',\n '& pre': {\n margin: 0,\n padding: { xs: '12px !important', sm: '16px !important' },\n borderRadius: '8px',\n fontSize: { xs: '12px', sm: '14px' },\n lineHeight: 1.5,\n // Better mobile text handling\n wordBreak: 'break-word',\n overflowWrap: 'anywhere',\n }\n }}\n >\n <Box\n sx={{\n '& .hljs': {\n display: 'block',\n padding: { xs: '12px', sm: '16px' },\n margin: 0,\n fontSize: { xs: '12px', sm: '14px' },\n lineHeight: 1.55,\n backgroundColor: isDarkTheme ? '#0f172a' : '#f5f6ff',\n color: isDarkTheme ? '#e2e8f0' : '#1e293b',\n whiteSpace: 'pre-wrap',\n wordBreak: 'break-word',\n overflowWrap: 'anywhere',\n },\n '& .hljs-comment, & .hljs-quote': {\n color: isDarkTheme ? '#64748b' : '#64748b',\n fontStyle: 'italic',\n },\n '& .hljs-keyword, & .hljs-selector-tag, & .hljs-literal, & .hljs-built_in': {\n color: isDarkTheme ? '#c792ea' : '#7c3aed',\n },\n '& .hljs-string, & .hljs-doctag, & .hljs-template-tag, & .hljs-attr': {\n color: isDarkTheme ? '#7fdbca' : '#0f766e',\n },\n '& .hljs-number, & .hljs-symbol, & .hljs-bullet, & .hljs-meta': {\n color: isDarkTheme ? '#f78c6c' : '#b45309',\n },\n '& .hljs-title, & .hljs-section, & .hljs-selector-id, & .hljs-function': {\n color: isDarkTheme ? '#82aaff' : '#2563eb',\n },\n '& .hljs-variable, & .hljs-params, & .hljs-property': {\n color: isDarkTheme ? '#f07178' : '#d97706',\n },\n }}\n >\n <pre className={`hljs language-${resolvedHighlightLanguage || 'text'}`}>\n <code className=\"hljs\">\n {highlightedNodes.length > 0 ? highlightedNodes : formattedContent}\n </code>\n </pre>\n </Box>\n </Paper>\n </Box>\n ) : (\n <Typography\n component=\"pre\"\n variant=\"body2\"\n sx={{\n whiteSpace: \"pre-wrap\",\n fontFamily: \"monospace\",\n color: \"text.primary\",\n lineHeight: 1.5,\n bgcolor: 'background.paper',\n p: 2,\n borderRadius: 1,\n border: '1px solid',\n borderColor: 'divider',\n overflow: 'auto',\n maxHeight: 'calc(100vh - 200px)',\n }}\n >\n {fullContent || doc?.content}\n </Typography>\n )}\n </Box>\n )}\n \n {!loading && isPDF(doc?.name || '') && pdfCanvases.length === 0 && !error && (\n <Box sx={{ textAlign: 'center', py: 4 }}>\n <Typography variant=\"h6\" color=\"text.secondary\" gutterBottom>\n PDF Preview Not Available\n </Typography>\n <Typography variant=\"body2\" color=\"text.secondary\">\n This PDF file cannot be previewed. You can download it to view the full content.\n </Typography>\n {isVectorDocument && (\n <Button \n variant=\"contained\" \n startIcon={<DownloadIcon />}\n onClick={handleDownload}\n sx={{ mt: 2 }}\n >\n Download PDF\n </Button>\n )}\n </Box>\n )}\n </Box>\n </Dialog>\n );\n};\n\nexport default KnowledgeFileModal;\n","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-B487-385EFF\nconst __banditFingerprint_utils_lowlightts = 'BL-FP-1A7DC2-C4E1';\nconst __auditTrail_utils_lowlightts = 'BL-AU-MGOIKVWA-DTLK';\n// File: lowlight.ts | Path: src/utils/lowlight.ts | Hash: b487c4e1\n\nimport { createLowlight } from 'lowlight';\n\nimport javascript from 'highlight.js/lib/languages/javascript';\nimport typescript from 'highlight.js/lib/languages/typescript';\nimport json from 'highlight.js/lib/languages/json';\nimport bash from 'highlight.js/lib/languages/bash';\nimport shell from 'highlight.js/lib/languages/shell';\nimport yaml from 'highlight.js/lib/languages/yaml';\nimport python from 'highlight.js/lib/languages/python';\nimport css from 'highlight.js/lib/languages/css';\nimport xml from 'highlight.js/lib/languages/xml';\nimport markdown from 'highlight.js/lib/languages/markdown';\nimport sql from 'highlight.js/lib/languages/sql';\nimport java from 'highlight.js/lib/languages/java';\nimport csharp from 'highlight.js/lib/languages/csharp';\nimport cpp from 'highlight.js/lib/languages/cpp';\nimport go from 'highlight.js/lib/languages/go';\nimport rust from 'highlight.js/lib/languages/rust';\nimport kotlin from 'highlight.js/lib/languages/kotlin';\nimport swift from 'highlight.js/lib/languages/swift';\nimport scala from 'highlight.js/lib/languages/scala';\nimport ruby from 'highlight.js/lib/languages/ruby';\nimport php from 'highlight.js/lib/languages/php';\nimport powershell from 'highlight.js/lib/languages/powershell';\n\nconst lowlight = createLowlight();\n\ntype LowlightInstance = ReturnType<typeof createLowlight>;\ntype LowlightLanguage = Parameters<LowlightInstance['register']>[1];\n\nconst asLanguage = (language: unknown): LowlightLanguage =>\n language as LowlightLanguage;\n\nconst registrations: Record<string, LowlightLanguage> = {\n javascript: asLanguage(javascript),\n js: asLanguage(javascript),\n jsx: asLanguage(javascript),\n typescript: asLanguage(typescript),\n ts: asLanguage(typescript),\n tsx: asLanguage(typescript),\n json: asLanguage(json),\n bash: asLanguage(bash),\n shell: asLanguage(shell),\n sh: asLanguage(shell),\n yaml: asLanguage(yaml),\n yml: asLanguage(yaml),\n python: asLanguage(python),\n py: asLanguage(python),\n css: asLanguage(css),\n html: asLanguage(xml),\n xml: asLanguage(xml),\n markdown: asLanguage(markdown),\n md: asLanguage(markdown),\n sql: asLanguage(sql),\n java: asLanguage(java),\n csharp: asLanguage(csharp),\n cs: asLanguage(csharp),\n cpp: asLanguage(cpp),\n c: asLanguage(cpp),\n h: asLanguage(cpp),\n go: asLanguage(go),\n rust: asLanguage(rust),\n rs: asLanguage(rust),\n kotlin: asLanguage(kotlin),\n kt: asLanguage(kotlin),\n swift: asLanguage(swift),\n scala: asLanguage(scala),\n ruby: asLanguage(ruby),\n rb: asLanguage(ruby),\n php: asLanguage(php),\n powershell: asLanguage(powershell),\n ps1: asLanguage(powershell),\n};\n\nObject.entries(registrations).forEach(([name, language]) => {\n if (!lowlight.listLanguages().includes(name)) {\n lowlight.register(name, language);\n }\n});\n\nexport function getHighlightTree(code: string, language?: string) {\n const lang = language?.toLowerCase();\n if (lang && lowlight.listLanguages().includes(lang)) {\n return lowlight.highlight(lang, code);\n }\n return lowlight.highlightAuto(code);\n}\n\nexport { lowlight };\n","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-27B9-B757B8\nconst __banditFingerprint_utils_markdownRenderingtsx = 'BL-FP-CD0811-8EE4';\nconst __auditTrail_utils_markdownRenderingtsx = 'BL-AU-MGOIKVWA-MS82';\n// File: markdownRendering.tsx | Path: src/utils/markdownRendering.tsx | Hash: 27b98ee4\n\nimport React from \"react\";\nimport type { Element, Text } from \"hast\";\nimport { defaultSchema } from \"rehype-sanitize\";\n\nexport const markdownSanitizeSchema = (() => {\n const schema = JSON.parse(JSON.stringify(defaultSchema));\n schema.tagNames = Array.from(\n new Set([...(schema.tagNames || []), \"span\", \"sup\", \"sub\"])\n );\n schema.attributes = {\n ...(schema.attributes || {}),\n \"*\": Array.from(\n new Set([...(schema.attributes?.[\"*\"] || []), \"className\", \"id\", \"data*\"])\n ),\n span: Array.from(\n new Set([\n ...(schema.attributes?.span || []),\n \"className\",\n \"data-bl-delay\",\n \"data*\",\n \"id\",\n ])\n ),\n code: Array.from(\n new Set([\n ...(schema.attributes?.code || []),\n \"className\",\n \"data-language\",\n \"data*\",\n \"id\",\n ])\n ),\n pre: Array.from(\n new Set([...(schema.attributes?.pre || []), \"className\", \"data*\", \"id\"])\n ),\n sup: Array.from(\n new Set([...(schema.attributes?.sup || []), \"className\", \"data*\", \"id\"])\n ),\n a: Array.from(\n new Set([...(schema.attributes?.a || []), \"className\", \"data*\", \"id\"])\n ),\n };\n schema.clobberPrefix = \"bl\";\n schema.allowComments = false;\n schema.strip = [\"script\", \"style\"];\n return schema;\n})();\n\nexport const renderLowlightChildren = (\n nodes: Array<Element | Text>,\n keyPrefix: string\n): React.ReactNode[] =>\n nodes.map((node, index) => {\n if (node.type === \"text\") {\n return node.value;\n }\n\n if (node.type === \"element\") {\n const key = `${keyPrefix}-${index}`;\n const { tagName, properties = {}, children = [] } = node;\n const reactProps: Record<string, unknown> = { key };\n\n Object.entries(properties).forEach(([propKey, value]) => {\n if (propKey === \"className\" && Array.isArray(value)) {\n reactProps.className = value.join(\" \");\n } else if (value !== null && value !== undefined) {\n reactProps[propKey] = value;\n }\n });\n\n return React.createElement(\n tagName,\n reactProps,\n renderLowlightChildren(children as Array<Element | Text>, key)\n );\n }\n\n return null;\n });\n","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-39FF-8FD178\nconst __banditFingerprint_chatmodal_airesponseactionbartsx = 'BL-FP-F5CD26-176D';\nconst __auditTrail_chatmodal_airesponseactionbartsx = 'BL-AU-MGOIKVVL-8RC1';\n// File: ai-response-action-bar.tsx | Path: src/modals/chat-modal/ai-response-action-bar.tsx | Hash: 39ff176d\n\nimport { useState, useEffect } from \"react\";\nimport { useVoiceStore } from \"../../store/voiceStore\";\nimport { usePreferencesStore } from \"../../store/preferencesStore\";\nimport { usePackageSettingsStore } from \"../../store/packageSettingsStore\";\nimport { useTTS } from \"../../hooks/useTTS\";\nimport { Box, CircularProgress, IconButton, Tooltip } from \"@mui/material\";\nimport { Check as CheckIcon, ThumbsUp as ThumbUpIcon, ThumbsDown as ThumbDownIcon, Copy as ContentCopyIcon, Megaphone as CampaignOutlined, Megaphone as CampaignRounded, Square as StopIcon, Pause as PauseIcon, Play as PlayArrowIcon } from \"lucide-react\";\nimport { debugLogger } from \"../../services/logging/debugLogger\";\nimport { authenticationService } from \"../../services/auth/authenticationService\";\n\nconst AiResponseActionsBar: React.FC<{ text: string }> = ({ text }) => {\n const [copied, setCopied] = useState(false);\n const [feedback, setFeedback] = useState<\"like\" | \"dislike\" | null>(null);\n \n const {\n isPlaying,\n isPaused,\n isLoading,\n error: ttsError,\n speak: ttsSpeak,\n stop: ttsStop,\n pause: ttsPause,\n resume: ttsResume,\n isAvailable: isTTSAvailable\n } = useTTS();\n\n const { availableVoices, loadVoicesFromAPI, initialized } = useVoiceStore();\n const { preferences } = usePreferencesStore();\n const { settings: packageSettings } = usePackageSettingsStore();\n\n // Load voices when component mounts if none are available\n useEffect(() => {\n const isAuthenticated = authenticationService.isAuthenticated();\n const token = authenticationService.getToken();\n \n if (!initialized || availableVoices.length === 0) {\n if (token && isAuthenticated) {\n debugLogger.debug('AI Action Bar: Voices not initialized or unavailable, attempting to load from API');\n loadVoicesFromAPI();\n } else {\n debugLogger.debug('AI Action Bar: No valid JWT token available - skipping voice loading');\n }\n }\n }, [initialized, availableVoices.length, loadVoicesFromAPI]);\n\n // Show TTS error if any\n useEffect(() => {\n if (ttsError) {\n debugLogger.error('TTS Error in action bar:', { error: ttsError });\n }\n }, [ttsError]);\n\n const handleCopy = () => {\n // Remove HTML tags\n let plainText = text.replace(/<\\/?[^>]+(>|$)/g, \"\");\n\n // Remove Markdown syntax\n plainText = plainText\n .replace(/`{1,3}[\\s\\S]*?`{1,3}/g, \"\") // inline and block code\n .replace(/!\\[.*?\\]\\(.*?\\)/g, \"\") // images\n .replace(/\\[([^\\]]+)\\]\\([^)]+\\)/g, \"$1\") // links\n .replace(/[*_~`>#-]/g, \"\") // emphasis, headings, etc.\n .replace(/^\\s*\\d+\\s*[:.]?\\s*$/gm, \"\") // numbered list items like \"1. :\" or \"2:\"\n .replace(/^\\s*[:.]+\\s*$/gm, \"\") // lines with just colons or periods\n .replace(/:+(?=\\s|$)/g, \"\") // trailing colons\n .replace(/\\n{3,}/g, \"\\n\\n\"); // limit excessive line breaks\n\n plainText = plainText.trim();\n\n navigator.clipboard.writeText(plainText);\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n };\n\n const handleTTSClick = async () => {\n try {\n if (!isTTSAvailable) {\n return;\n }\n\n if (isPaused) {\n // If paused, resume\n ttsResume();\n } else if (!isPlaying) {\n // If idle or error, start playing with streaming\n // Clean the text first - remove HTML tags and Markdown syntax\n let cleanText = text.replace(/<\\/?[^>]+(>|$)/g, \"\");\n\n // Remove Markdown syntax\n cleanText = cleanText\n .replace(/`{1,3}[\\s\\S]*?`{1,3}/g, \"\") // inline and block code\n .replace(/!\\[.*?\\]\\(.*?\\)/g, \"\") // images\n .replace(/\\[([^\\]]+)\\]\\([^)]+\\)/g, \"$1\") // links\n .replace(/[*_~`>#-]/g, \"\") // emphasis, headings, etc.\n .replace(/^\\s*\\d+\\s*[:.]?\\s*$/gm, \"\") // numbered list items like \"1. :\" or \"2:\"\n .replace(/^\\s*[:.]+\\s*$/gm, \"\") // lines with just colons or periods\n .replace(/:+(?=\\s|$)/g, \"\") // trailing colons\n .replace(/\\n{3,}/g, \"\\n\\n\"); // limit excessive line breaks\n\n cleanText = cleanText.trim();\n\n if (!cleanText) {\n return;\n }\n\n await ttsSpeak(cleanText, { \n useStreaming: true, // Enable streaming for faster response\n useRealtime: true // Use real-time streaming for immediate playback\n });\n }\n // Note: If already playing, do nothing (pause and stop have their own buttons)\n } catch (error) {\n debugLogger.error('TTS playback failed:', { \n error: error instanceof Error ? error.message : String(error),\n stack: error instanceof Error ? error.stack : undefined\n });\n }\n };\n\n const handleFeedback = (type: \"like\" | \"dislike\") => {\n setFeedback(type);\n // Example: memoryEnhancer.addMemory(`User ${type === \"like\" ? \"liked\" : \"disliked\"} this response`);\n };\n\n return (\n <Box sx={{ mt: 2, display: \"flex\", gap: 2, alignItems: \"center\", flexWrap: \"wrap\" }}>\n <Tooltip title={copied ? \"Copied!\" : \"Copy entire response\"}>\n <IconButton\n onClick={handleCopy}\n size=\"small\"\n sx={{\n color: (theme) =>\n theme.palette.mode === \"dark\" ? \"#ccc\" : \"#555\",\n \"&:hover\": {\n color: (theme) =>\n theme.palette.mode === \"dark\" ? \"#fff\" : \"#000\",\n },\n }}\n >\n {copied ? <CheckIcon size={18} /> : <ContentCopyIcon size={18} />}\n </IconButton>\n </Tooltip>\n\n {isTTSAvailable && ( \n <>\n {/* Main TTS Button - Play/Resume */}\n <Tooltip\n title={\n !isTTSAvailable ? \"TTS not available - check configuration\" :\n isLoading ? \"Loading audio...\" :\n isPaused ? \"Resume playback\" :\n isPlaying ? \"Playing audio...\" :\n \"Play response with voice\"\n }\n >\n <IconButton\n onClick={handleTTSClick}\n size=\"small\"\n disabled={isLoading}\n sx={{\n color: (theme) =>\n theme.palette.mode === \"dark\" ? \"#ccc\" : \"#555\",\n \"&:hover\": {\n color: (theme) =>\n theme.palette.mode === \"dark\" ? \"#fff\" : \"#000\",\n },\n \"&:disabled\": {\n color: (theme) =>\n theme.palette.mode === \"dark\" ? \"#666\" : \"#aaa\",\n },\n }}\n >\n {isLoading ? (\n <CircularProgress size={18} />\n ) : isPaused ? (\n <PlayArrowIcon size={18} />\n ) : !isPlaying ? (\n <CampaignOutlined size={18} />\n ) : (\n <CampaignRounded size={18} color='#4caf50' />\n )}\n </IconButton>\n </Tooltip>\n\n {/* Pause Button - Only show when playing */}\n {isPlaying && (\n <Tooltip title=\"Pause playback\">\n <IconButton\n onClick={() => ttsPause()}\n size=\"small\"\n sx={{\n color: (theme) =>\n theme.palette.mode === \"dark\" ? \"#ccc\" : \"#555\",\n \"&:hover\": {\n color: (theme) =>\n theme.palette.mode === \"dark\" ? \"#fff\" : \"#000\",\n },\n }}\n >\n <PauseIcon size={18} />\n </IconButton>\n </Tooltip>\n )}\n\n {/* Stop Button - Show when playing or paused */}\n {(isPlaying || isPaused) && (\n <Tooltip title=\"Stop playback\">\n <IconButton\n onClick={() => ttsStop()}\n size=\"small\"\n sx={{\n color: (theme) =>\n theme.palette.mode === \"dark\" ? \"#ccc\" : \"#555\",\n \"&:hover\": {\n color: (theme) =>\n theme.palette.mode === \"dark\" ? \"#fff\" : \"#000\",\n },\n }}\n >\n <StopIcon size={18} />\n </IconButton>\n </Tooltip>\n )}\n </>\n )}\n\n <Tooltip title=\"Like this response\">\n <IconButton\n onClick={() => handleFeedback(\"like\")}\n size=\"small\"\n sx={{\n color: feedback === \"like\"\n ? \"#00e676\"\n : (theme) =>\n theme.palette.mode === \"dark\" ? \"#ccc\" : \"#555\",\n \"&:hover\": {\n color: feedback === \"like\"\n ? \"#00e676\"\n : (theme) =>\n theme.palette.mode === \"dark\" ? \"#fff\" : \"#000\",\n },\n }}\n >\n <ThumbUpIcon size={18} />\n </IconButton>\n </Tooltip>\n\n <Tooltip title=\"Dislike this response\">\n <IconButton\n onClick={() => handleFeedback(\"dislike\")}\n sx={{\n color: feedback === \"dislike\"\n ? \"#ff1744\"\n : (theme) =>\n theme.palette.mode === \"dark\" ? \"#ccc\" : \"#555\",\n \"&:hover\": {\n color: feedback === \"dislike\"\n ? \"#ff1744\"\n : (theme) =>\n theme.palette.mode === \"dark\" ? \"#fff\" : \"#000\",\n },\n }}\n >\n <ThumbDownIcon size={18} />\n </IconButton>\n </Tooltip>\n </Box>\n );\n};\n\nexport default AiResponseActionsBar;\n","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-4406-DFAD47\nconst __banditFingerprint_feedback_FeedbackModaltsx = 'BL-FP-226BC1-E25A';\nconst __auditTrail_feedback_FeedbackModaltsx = 'BL-AU-MGOIKVVA-WQG3';\n// File: FeedbackModal.tsx | Path: src/components/feedback/FeedbackModal.tsx | Hash: 4406e25a\n\nimport React, { useState, useCallback, useRef } from 'react';\nimport { GlobalStyles } from '@mui/material';\nimport {\n Dialog,\n DialogTitle,\n DialogContent,\n DialogActions,\n Button,\n TextField,\n FormControl,\n InputLabel,\n Select,\n MenuItem,\n Box,\n Typography,\n IconButton,\n Chip,\n Alert,\n Paper,\n Avatar,\n CircularProgress,\n Fade,\n Slider,\n Stack,\n useMediaQuery,\n Snackbar,\n} from '@mui/material';\nimport { X as CloseIcon, Bug as BugReportIcon, Lightbulb as LightbulbIcon, TrendingUp as TrendingUpIcon, HelpCircle as HelpIcon, MessageSquare as MessageIcon, Camera as PhotoCameraIcon, Paperclip as AttachFileIcon, Trash2 as DeleteIcon, Mail as MailIcon, Brain as PsychologyAltRounded, Paperclip as AttachFileRounded } from 'lucide-react';\nimport { \n FeedbackRequest, \n FeedbackResponse,\n FeedbackCategories, \n FeedbackPriorities \n} from '../../services/gateway/feedback.interfaces';\nimport { useModelStore } from '../../store/modelStore';\nimport { useConversationStore } from '../../store/conversationStore';\nimport { usePackageSettingsStore } from '../../store/packageSettingsStore';\nimport { GatewayService } from '../../services/gateway/gateway.service';\nimport { authenticationService } from '../../services/auth/authenticationService';\nimport { useTheme, alpha } from '@mui/material/styles';\n\nexport interface FeedbackModalProps {\n open: boolean;\n onClose: () => void;\n feedbackEmail?: string;\n}\n\nconst feedbackCategories: FeedbackCategories = {\n bug: {\n label: 'Bug Report',\n description: \"Something isn't working as expected\",\n icon: 'BugReport',\n color: '#f44336',\n },\n feature: {\n label: 'Feature Request',\n description: 'Suggest a new feature or enhancement',\n icon: 'Lightbulb',\n color: '#2196f3',\n },\n improvement: {\n label: 'Improvement',\n description: 'Suggest improvements to existing features',\n icon: 'TrendingUp',\n color: '#ff9800',\n },\n question: {\n label: 'Question',\n description: 'Ask a question about usage or functionality',\n icon: 'Help',\n color: '#9c27b0',\n },\n other: {\n label: 'Other',\n description: 'General feedback or other topics',\n icon: 'Message',\n color: '#607d8b',\n },\n};\n\nconst feedbackPriorities: FeedbackPriorities = {\n low: {\n label: 'Low',\n description: 'Minor issue, can wait',\n color: '#4caf50',\n },\n medium: {\n label: 'Medium',\n description: 'Normal priority',\n color: '#ff9800',\n },\n high: {\n label: 'High',\n description: 'Important, needs attention soon',\n color: '#f44336',\n },\n critical: {\n label: 'Critical',\n description: 'Urgent, blocks usage',\n color: '#d32f2f',\n },\n};\n\nconst iconMap = {\n BugReport: BugReportIcon,\n Lightbulb: LightbulbIcon,\n TrendingUp: TrendingUpIcon,\n Help: HelpIcon,\n Message: MessageIcon,\n};\n\nexport const FeedbackModal: React.FC<FeedbackModalProps> = ({\n open,\n onClose,\n feedbackEmail,\n}) => {\n const theme = useTheme();\n const isMobile = useMediaQuery(theme.breakpoints.down('sm'));\n const fileInputRef = useRef<HTMLInputElement>(null);\n \n // Store state\n const { selectedModel } = useModelStore();\n const { conversations } = useConversationStore();\n const { settings } = usePackageSettingsStore();\n \n // Form state\n const [formData, setFormData] = useState<Partial<FeedbackRequest>>({\n title: '',\n description: '',\n category: 'bug',\n priority: 'medium',\n contactEmail: '',\n images: [],\n attachments: [],\n annoyanceLevel: 3, // 1-5 scale, 3 = neutral\n });\n \n const [isSubmitting, setIsSubmitting] = useState(false);\n const [submitStatus, setSubmitStatus] = useState<'idle' | 'success' | 'error'>('idle');\n const [errorMessage, setErrorMessage] = useState('');\n const [snackbarOpen, setSnackbarOpen] = useState(false);\n const [snackbarMessage, setSnackbarMessage] = useState('');\n const [confirmDialogOpen, setConfirmDialogOpen] = useState(false);\n const touchStartYRef = useRef<number | null>(null);\n const touchLatestYRef = useRef<number | null>(null);\n\n // Get browser info\n const getBrowserInfo = useCallback(() => {\n const ua = navigator.userAgent;\n let browserName = 'Unknown';\n let browserVersion = 'Unknown';\n \n if (ua.includes('Chrome')) {\n browserName = 'Chrome';\n browserVersion = ua.match(/Chrome\\/([0-9.]+)/)?.[1] || 'Unknown';\n } else if (ua.includes('Firefox')) {\n browserName = 'Firefox';\n browserVersion = ua.match(/Firefox\\/([0-9.]+)/)?.[1] || 'Unknown';\n } else if (ua.includes('Safari')) {\n browserName = 'Safari';\n browserVersion = ua.match(/Version\\/([0-9.]+)/)?.[1] || 'Unknown';\n }\n \n return {\n name: browserName,\n version: browserVersion,\n platform: navigator.platform,\n };\n }, []);\n\n // Handle form changes\n const handleInputChange = (field: keyof FeedbackRequest) => (\n event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement> | { target: { value: unknown } }\n ) => {\n setFormData(prev => ({\n ...prev,\n [field]: event.target.value,\n }));\n };\n\n // Handle file uploads\n const handleFileUpload = (event: React.ChangeEvent<HTMLInputElement>) => {\n const files = event.target.files;\n if (!files || files.length === 0) return;\n\n const file = files[0]; // Only take the first file\n if (file.type.startsWith('image/')) {\n // Handle single image only - replace existing if present\n const reader = new FileReader();\n reader.onload = (e) => {\n const base64 = e.target?.result as string;\n setFormData(prev => ({\n ...prev,\n images: [base64], // Only keep one image\n }));\n };\n reader.readAsDataURL(file);\n } else {\n // Show error for non-image files\n setSnackbarMessage('❌ Please select an image file only (JPG, PNG, GIF)');\n setSnackbarOpen(true);\n }\n \n // Reset file input\n if (event.target) {\n event.target.value = '';\n }\n };\n\n // Remove image (single image)\n const removeImage = () => {\n setFormData(prev => ({\n ...prev,\n images: [],\n }));\n };\n\n // Copy image to clipboard\n const copyImageToClipboard = async () => {\n if (!formData.images?.[0]) return;\n \n try {\n // Convert base64 to blob\n const base64Data = formData.images[0].split(',')[1];\n const byteCharacters = atob(base64Data);\n const byteNumbers = new Array(byteCharacters.length);\n for (let i = 0; i < byteCharacters.length; i++) {\n byteNumbers[i] = byteCharacters.charCodeAt(i);\n }\n const byteArray = new Uint8Array(byteNumbers);\n const blob = new Blob([byteArray], { type: 'image/png' });\n \n // Copy to clipboard\n await navigator.clipboard.write([\n new ClipboardItem({\n 'image/png': blob,\n }),\n ]);\n \n setSnackbarMessage('📎 Image copied to clipboard! Paste it in your email.');\n setSnackbarOpen(true);\n } catch (error) {\n console.error('Failed to copy image to clipboard:', error);\n setSnackbarMessage('❌ Failed to copy image. Please attach manually.');\n setSnackbarOpen(true);\n }\n };\n\n const handleHeaderTouchStart = (event: React.TouchEvent<HTMLDivElement>) => {\n if (!isMobile) return;\n const touch = event.touches[0];\n touchStartYRef.current = touch.clientY;\n touchLatestYRef.current = touch.clientY;\n };\n\n const handleHeaderTouchMove = (event: React.TouchEvent<HTMLDivElement>) => {\n if (!isMobile) return;\n if (touchStartYRef.current === null) return;\n touchLatestYRef.current = event.touches[0].clientY;\n };\n\n const handleHeaderTouchEnd = () => {\n if (!isMobile) return;\n if (touchStartYRef.current === null || touchLatestYRef.current === null) {\n touchStartYRef.current = null;\n touchLatestYRef.current = null;\n return;\n }\n\n const delta = touchLatestYRef.current - touchStartYRef.current;\n touchStartYRef.current = null;\n touchLatestYRef.current = null;\n\n if (delta > 80) {\n handleClose();\n }\n };\n\n // Remove attachment\n const removeAttachment = (index: number) => {\n setFormData(prev => ({\n ...prev,\n attachments: prev.attachments?.filter((_, i) => i !== index) || [],\n }));\n };\n\n // Generate session info\n const getSessionInfo = useCallback(() => {\n const currentConversation = conversations[0]; // Get current conversation\n return {\n currentModel: selectedModel,\n currentProvider: 'Bandit AI',\n conversationId: currentConversation?.id || 'N/A',\n timestamp: new Date().toISOString(),\n };\n }, [selectedModel, conversations]);\n\n // Handle submit\n const handleSubmit = async () => {\n if (!formData.title?.trim() || !formData.description?.trim()) {\n setErrorMessage('Please fill in both title and description');\n return;\n }\n\n // Show confirmation dialog if there's an image\n if (formData.images && formData.images.length > 0) {\n setConfirmDialogOpen(true);\n return;\n }\n\n // If no image, proceed directly\n await performSubmit();\n };\n\n // Perform the actual submission\n const performSubmit = async () => {\n setIsSubmitting(true);\n setErrorMessage('');\n setConfirmDialogOpen(false);\n\n try {\n // Create gateway service instance\n const gatewayUrl = settings?.gatewayApiUrl;\n if (!gatewayUrl) {\n throw new Error('Gateway API URL not configured');\n }\n\n const gatewayService = new GatewayService(\n gatewayUrl,\n () => authenticationService.getToken(),\n feedbackEmail || settings?.feedbackEmail\n );\n\n // Prepare complete feedback request\n const feedbackRequest: FeedbackRequest = {\n title: formData.title!,\n description: formData.description!,\n category: formData.category ?? 'bug',\n priority: formData.priority ?? 'medium',\n annoyanceLevel: formData.annoyanceLevel,\n images: formData.images,\n attachments: formData.attachments,\n contactEmail: formData.contactEmail,\n userAgent: navigator.userAgent,\n browserInfo: getBrowserInfo(),\n sessionInfo: getSessionInfo(),\n };\n\n // Submit feedback using gateway service\n gatewayService.submitFeedback(feedbackRequest).subscribe({\n next: async (response: FeedbackResponse) => {\n // Copy image to clipboard if present\n if (formData.images && formData.images.length > 0) {\n await copyImageToClipboard();\n }\n \n if (response?.mailtoUrl) {\n // Open mailto URL if provided (fallback case)\n window.location.href = response.mailtoUrl;\n }\n \n setSubmitStatus('success');\n \n // Close modal after a short delay\n setTimeout(() => {\n handleClose();\n }, 2000);\n },\n error: (subscribeError: unknown) => {\n console.error('Failed to submit feedback:', subscribeError);\n setErrorMessage('Failed to submit feedback. Please try again.');\n setSubmitStatus('error');\n setIsSubmitting(false);\n },\n complete: () => {\n setIsSubmitting(false);\n }\n });\n \n } catch (error) {\n console.error('Failed to initialize feedback:', error);\n setErrorMessage('Failed to initialize feedback system. Please try again.');\n setSubmitStatus('error');\n setIsSubmitting(false);\n }\n };\n\n // Handle close with reset\n const handleClose = () => {\n setFormData({\n title: '',\n description: '',\n category: 'bug',\n priority: 'medium',\n contactEmail: '',\n images: [],\n attachments: [],\n annoyanceLevel: 3,\n });\n setSubmitStatus('idle');\n setErrorMessage('');\n setSnackbarOpen(false);\n setSnackbarMessage('');\n setConfirmDialogOpen(false);\n onClose();\n };\n\n const selectedCategory = feedbackCategories[formData.category as keyof FeedbackCategories];\n const selectedPriority = feedbackPriorities[formData.priority as keyof FeedbackPriorities];\n const IconComponent = iconMap[selectedCategory?.icon as keyof typeof iconMap] || MessageIcon;\n\n const isValid = !!formData.title?.trim() && !!formData.description?.trim();\n\n return (\n <>\n {/* Global or component-scoped scrollbar styles */}\n <GlobalStyles styles={{\n '::-webkit-scrollbar': {\n width: '8px',\n },\n '::-webkit-scrollbar-track': {\n background: 'transparent',\n },\n '::-webkit-scrollbar-thumb': {\n backgroundColor: '#444',\n borderRadius: '4px',\n border: '1px solid #222',\n },\n }} />\n <Dialog\n open={open}\n onClose={handleClose}\n maxWidth=\"md\"\n fullWidth\n fullScreen={isMobile}\n TransitionComponent={Fade}\n scroll=\"paper\"\n PaperProps={{\n sx: {\n borderRadius: isMobile ? 0 : 3,\n bgcolor: theme.palette.background.paper,\n backgroundImage: theme.palette.mode === 'dark'\n ? 'linear-gradient(145deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.01) 100%)'\n : 'linear-gradient(145deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.4) 100%)',\n backdropFilter: 'blur(20px)',\n border: `1px solid ${theme.palette.mode === 'dark' ? 'rgba(255,255,255,0.1)' : 'rgba(0,0,0,0.05)'}`,\n boxShadow: theme.palette.mode === 'dark'\n ? '0 32px 120px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.05)'\n : '0 32px 120px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.02)',\n overflow: 'hidden',\n display: 'flex',\n flexDirection: 'column',\n height: '100dvh',\n maxHeight: '100dvh',\n margin: isMobile ? 0 : 'auto',\n position: 'relative',\n },\n }}\n BackdropProps={{\n sx: {\n bgcolor: theme.palette.mode === 'dark'\n ? 'rgba(0, 0, 0, 0.7)'\n : 'rgba(0, 0, 0, 0.4)',\n backdropFilter: 'blur(8px)',\n },\n }}\n sx={{\n '& .MuiDialog-container': {\n alignItems: 'center',\n justifyContent: 'center',\n },\n }}\n >\n {/* Custom DialogTitle for header */}\n <DialogTitle\n onTouchStart={handleHeaderTouchStart}\n onTouchMove={handleHeaderTouchMove}\n onTouchEnd={handleHeaderTouchEnd}\n sx={{\n display: 'flex',\n flexDirection: 'column',\n gap: isMobile ? 1.25 : 1.5,\n pr: { xs: 2, sm: 3 },\n pl: { xs: 2, sm: 3 },\n pt: { xs: isMobile ? 1.5 : 3, sm: 3 },\n pb: { xs: 1.5, sm: 2 },\n touchAction: 'pan-y',\n }}\n >\n {isMobile && (\n <Box\n sx={{\n width: 56,\n height: 6,\n borderRadius: 999,\n bgcolor: alpha(theme.palette.text.primary, 0.18),\n alignSelf: 'center',\n mb: 1,\n }}\n />\n )}\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: 1.5,\n width: '100%',\n }}\n >\n <Stack spacing={0.5} sx={{ minWidth: 0 }}>\n <Typography variant=\"h6\" fontWeight=\"bold\" noWrap>Send Feedback</Typography>\n <Typography variant=\"body2\" color=\"text.secondary\" noWrap>Help us improve Bandit AI</Typography>\n </Stack>\n <IconButton onClick={handleClose} size=\"small\"><CloseIcon /></IconButton>\n </Box>\n </DialogTitle>\n <DialogContent\n sx={{\n p: { xs: 1.5, sm: 3 },\n maxHeight: 'calc(100dvh - 80px)',\n overflowY: 'auto',\n backgroundColor: 'background.default',\n scrollbarGutter: 'stable',\n }}\n >\n\n {/* Modal Content Below */}\n {submitStatus === 'success' && (\n <Alert \n severity=\"success\" \n sx={{ \n mb: 2,\n '& .MuiAlert-icon': {\n color: theme.palette.success.main,\n },\n background: theme.palette.mode === 'dark' \n ? 'linear-gradient(135deg, rgba(76,175,80,0.1) 0%, rgba(46,125,50,0.1) 100%)'\n : 'linear-gradient(135deg, rgba(76,175,80,0.05) 0%, rgba(46,125,50,0.05) 100%)',\n border: `1px solid ${theme.palette.success.main}30`,\n borderRadius: 2,\n }}\n >\n <Typography variant=\"body2\" sx={{ fontWeight: 600 }}>\n Feedback submitted successfully!\n </Typography>\n <Typography variant=\"caption\" display=\"block\" sx={{ mt: 0.5, opacity: 0.9 }}>\n {formData.images && formData.images.length > 0\n ? \"Your email client should open with the feedback details. The image has been copied to your clipboard - paste it in the email!\"\n : (formData.attachments && formData.attachments.length > 0)\n ? \"Your email client should open with the feedback details. Please manually attach your files to the email.\"\n : \"Your email client should open with the feedback details.\"\n }\n </Typography>\n </Alert>\n )}\n\n {errorMessage && (\n <Alert \n severity=\"error\" \n sx={{ \n mb: 2,\n '& .MuiAlert-icon': {\n color: theme.palette.error.main,\n },\n background: theme.palette.mode === 'dark' \n ? 'linear-gradient(135deg, rgba(244,67,54,0.1) 0%, rgba(211,47,47,0.1) 100%)'\n : 'linear-gradient(135deg, rgba(244,67,54,0.05) 0%, rgba(211,47,47,0.05) 100%)',\n border: `1px solid ${theme.palette.error.main}30`,\n borderRadius: 2,\n }}\n >\n {errorMessage}\n </Alert>\n )}\n\n <Box\n sx={{\n display: 'grid',\n gridTemplateRows: 'auto auto auto auto',\n rowGap: '24px',\n columnGap: '0px',\n width: '100%',\n }}\n >\n {/* Feedback Details */}\n <Box\n sx={{\n display: 'grid',\n gridTemplateColumns: { xs: '1fr', sm: '1fr 1fr' },\n gridTemplateRows: 'auto auto auto',\n gap: '16px',\n mb: 0,\n }}\n >\n <Box\n sx={{\n gridColumn: '1 / -1',\n display: 'flex',\n alignItems: 'center',\n gap: '8px',\n mb: 0,\n mt: 2,\n alignSelf: 'end',\n }}\n >\n <MessageIcon size={20} color={theme.palette.text.primary} />\n <Typography\n variant=\"h6\"\n sx={{\n fontWeight: 600,\n color: theme.palette.text.primary,\n mb: 0,\n }}\n >\n Feedback Details\n </Typography>\n </Box>\n {/* Title - full width */}\n <TextField\n fullWidth\n label=\"Title\"\n value={formData.title}\n onChange={handleInputChange('title')}\n placeholder=\"Brief summary of your feedback\"\n required\n size=\"medium\"\n InputLabelProps={{ shrink: true }}\n sx={{\n minHeight: 48,\n gridColumn: '1 / -1',\n '& .MuiInputBase-root': {\n minHeight: 48,\n },\n '& .MuiOutlinedInput-root': {\n borderRadius: 2,\n transition: 'all 0.2s ease',\n '&:hover': {\n transform: 'translateY(-1px)',\n boxShadow: theme.palette.mode === 'dark'\n ? '0 4px 12px rgba(0,0,0,0.3)'\n : '0 4px 12px rgba(0,0,0,0.1)',\n },\n '&.Mui-focused': {\n transform: 'translateY(-1px)',\n boxShadow: theme.palette.mode === 'dark'\n ? '0 6px 16px rgba(0,0,0,0.4)'\n : '0 6px 16px rgba(0,0,0,0.15)',\n },\n },\n }}\n />\n {/* Category */}\n <FormControl\n fullWidth\n size=\"medium\"\n sx={{\n minHeight: 48,\n '& .MuiInputBase-root': {\n minHeight: 48,\n },\n '& .MuiOutlinedInput-root': {\n borderRadius: 2,\n transition: 'all 0.2s ease',\n '&:hover': {\n transform: 'translateY(-1px)',\n boxShadow: theme.palette.mode === 'dark'\n ? '0 4px 12px rgba(0,0,0,0.3)'\n : '0 4px 12px rgba(0,0,0,0.1)',\n },\n '&.Mui-focused': {\n transform: 'translateY(-1px)',\n boxShadow: theme.palette.mode === 'dark'\n ? '0 6px 16px rgba(0,0,0,0.4)'\n : '0 6px 16px rgba(0,0,0,0.15)',\n },\n },\n }}\n >\n <InputLabel shrink id=\"category-label\">Category</InputLabel>\n <Select\n labelId=\"category-label\"\n id=\"category\"\n value={formData.category}\n label=\"Category\"\n onChange={handleInputChange('category')}\n >\n {Object.entries(feedbackCategories).map(([key, category]) => {\n const Icon = iconMap[category.icon as keyof typeof iconMap];\n return (\n <MenuItem key={key} value={key}>\n <Box sx={{ display: 'flex', alignItems: 'center', gap: 1.5 }}>\n <Icon size={20} color={category.color} />\n <Box>\n <Typography variant=\"body2\" sx={{ fontWeight: 500 }}>{category.label}</Typography>\n <Typography variant=\"caption\" color=\"text.secondary\">\n {category.description}\n </Typography>\n </Box>\n </Box>\n </MenuItem>\n );\n })}\n </Select>\n </FormControl>\n {/* Priority */}\n <FormControl\n fullWidth\n size=\"medium\"\n sx={{\n minHeight: 48,\n '& .MuiInputBase-root': {\n minHeight: 48,\n },\n '& .MuiOutlinedInput-root': {\n borderRadius: 2,\n transition: 'all 0.2s ease',\n '&:hover': {\n transform: 'translateY(-1px)',\n boxShadow: theme.palette.mode === 'dark'\n ? '0 4px 12px rgba(0,0,0,0.3)'\n : '0 4px 12px rgba(0,0,0,0.1)',\n },\n '&.Mui-focused': {\n transform: 'translateY(-1px)',\n boxShadow: theme.palette.mode === 'dark'\n ? '0 6px 16px rgba(0,0,0,0.4)'\n : '0 6px 16px rgba(0,0,0,0.15)',\n },\n },\n }}\n >\n <InputLabel shrink id=\"priority-label\">Priority</InputLabel>\n <Select\n labelId=\"priority-label\"\n id=\"priority\"\n value={formData.priority}\n label=\"Priority\"\n onChange={handleInputChange('priority')}\n >\n {Object.entries(feedbackPriorities).map(([key, priority]) => (\n <MenuItem key={key} value={key}>\n <Box sx={{ display: 'flex', alignItems: 'center', gap: 1.5 }}>\n <Box\n sx={{\n width: 12,\n height: 12,\n borderRadius: '50%',\n bgcolor: priority.color,\n boxShadow: `0 0 0 2px ${priority.color}20`,\n }}\n />\n <Box>\n <Typography variant=\"body2\" sx={{ fontWeight: 500 }}>{priority.label}</Typography>\n <Typography variant=\"caption\" color=\"text.secondary\">\n {priority.description}\n </Typography>\n </Box>\n </Box>\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n {/* Description - full width, tall */}\n <TextField\n fullWidth\n multiline\n rows={5}\n label=\"Description\"\n value={formData.description}\n onChange={handleInputChange('description')}\n placeholder=\"Please provide detailed information about your feedback...\"\n required\n size=\"medium\"\n InputLabelProps={{ shrink: true }}\n sx={{\n minHeight: 48,\n gridColumn: '1 / -1',\n '& .MuiInputBase-root': {\n minHeight: 48,\n alignItems: 'flex-start',\n py: 1.5,\n },\n '& .MuiOutlinedInput-root': {\n borderRadius: 2,\n transition: 'all 0.2s ease',\n '&:hover': {\n transform: 'translateY(-1px)',\n boxShadow: theme.palette.mode === 'dark'\n ? '0 4px 12px rgba(0,0,0,0.3)'\n : '0 4px 12px rgba(0,0,0,0.1)',\n },\n '&.Mui-focused': {\n transform: 'translateY(-1px)',\n boxShadow: theme.palette.mode === 'dark'\n ? '0 6px 16px rgba(0,0,0,0.4)'\n : '0 6px 16px rgba(0,0,0,0.15)',\n },\n },\n }}\n />\n </Box>\n {/* Impact Assessment & Attachments - side by side, visually aligned */}\n <Box\n className=\"feedback-section-row\"\n sx={{\n display: 'flex',\n flexWrap: 'wrap',\n gap: '24px',\n alignItems: 'stretch',\n width: '100%',\n // Responsive stacking for mobile\n flexDirection: { xs: 'column', md: 'row' },\n }}\n >\n {/* Impact Assessment */}\n <Box\n className=\"impact-assessment-card impact-section\"\n sx={{\n flex: 1,\n minWidth: 300,\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n p: 0,\n }}\n >\n <Box sx={{ display: 'flex', alignItems: 'center', gap: '8px', mb: 3 }}>\n <PsychologyAltRounded size={20} color={theme.palette.warning.main} />\n <Typography variant=\"h6\" sx={{ fontWeight: 600, color: theme.palette.text.primary }}>\n Impact Assessment\n </Typography>\n </Box>\n <div style={{ height: '100%', display: 'flex', flexDirection: 'column', justifyContent: 'space-between' }}>\n <Paper\n variant=\"outlined\"\n sx={{\n p: 4,\n borderRadius: 3,\n minHeight: 180,\n background: theme.palette.mode === 'dark'\n ? 'linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%)'\n : 'linear-gradient(135deg, rgba(0,0,0,0.01) 0%, rgba(0,0,0,0.03) 100%)',\n border: `1px solid ${theme.palette.divider}`,\n transition: 'all 0.2s ease',\n display: 'flex',\n flexDirection: 'column',\n flex: 1,\n justifyContent: 'center',\n height: '100%',\n '&:hover': {\n transform: 'translateY(-2px)',\n boxShadow: theme.palette.mode === 'dark'\n ? '0 8px 24px rgba(0,0,0,0.4)'\n : '0 8px 24px rgba(0,0,0,0.12)',\n },\n }}\n >\n <Stack spacing={3}>\n <Typography variant=\"subtitle1\" sx={{ fontWeight: 600, display: 'flex', alignItems: 'center', gap: 2 }}>\n <Box\n sx={{\n width: 28,\n height: 28,\n borderRadius: '50%',\n bgcolor: theme.palette.warning.main + '20',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n fontSize: '14px',\n }}\n >\n <PsychologyAltRounded size={22} color={theme.palette.warning.main} />\n </Box>\n How annoying is this issue? ({formData.annoyanceLevel}/5)\n </Typography>\n <Box sx={{ px: 2, py: 1 }}>\n <Slider\n value={formData.annoyanceLevel}\n onChange={(_, value) => setFormData(prev => ({ ...prev, annoyanceLevel: value as number }))}\n min={1}\n max={5}\n step={1}\n marks={[\n { value: 1, label: '😊 Not at all' },\n { value: 2, label: '😐 Slightly' },\n { value: 3, label: '🙄 Moderately' },\n { value: 4, label: '😠 Very' },\n { value: 5, label: '🤬 Extremely' },\n ]}\n sx={{\n height: 8,\n '& .MuiSlider-mark': {\n backgroundColor: theme.palette.divider,\n width: 3,\n height: 3,\n },\n '& .MuiSlider-markLabel': {\n fontSize: '0.8rem',\n color: theme.palette.text.secondary,\n transform: 'translateX(-50%)',\n whiteSpace: 'nowrap',\n top: 32,\n fontWeight: 500,\n },\n '& .MuiSlider-thumb': {\n width: 24,\n height: 24,\n background: `linear-gradient(135deg, ${theme.palette.warning.main}, ${theme.palette.warning.dark})`,\n boxShadow: `0 4px 12px ${theme.palette.warning.main}40`,\n '&:hover, &.Mui-focusVisible': {\n boxShadow: `0 0 0 12px ${theme.palette.warning.main}20, 0 4px 12px ${theme.palette.warning.main}40`,\n },\n },\n '& .MuiSlider-track': {\n background: `linear-gradient(90deg, ${theme.palette.success.main}, ${theme.palette.warning.main}, ${theme.palette.error.main})`,\n height: 6,\n border: 'none',\n },\n '& .MuiSlider-rail': {\n height: 6,\n backgroundColor: theme.palette.divider,\n opacity: 0.3,\n },\n mb: 5, // Space for labels\n }}\n />\n </Box>\n </Stack>\n </Paper>\n </div>\n </Box>\n {/* Attachments */}\n <Box\n className=\"attachments-upload-card attachments-section\"\n sx={{\n flex: 1,\n minWidth: 300,\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n p: 0,\n }}\n >\n <Box sx={{ display: 'flex', alignItems: 'center', gap: '8px', mb: 3 }}>\n <AttachFileRounded size={20} color={theme.palette.primary.main} />\n <Typography variant=\"h6\" sx={{ fontWeight: 600, color: theme.palette.text.primary }}>\n Attachments\n </Typography>\n </Box>\n <div style={{ height: '100%', display: 'flex', flexDirection: 'column', justifyContent: 'space-between' }}>\n <Box\n sx={{\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n p: 0,\n mb: 0,\n backgroundColor: 'transparent',\n boxShadow: 'none',\n border: 'none',\n }}\n onClick={() => fileInputRef.current?.click()}\n >\n <input\n ref={fileInputRef}\n type=\"file\"\n accept=\"image/*\"\n style={{ display: 'none' }}\n onChange={handleFileUpload}\n />\n <Box\n sx={{\n flex: 1,\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n p: 2,\n border: '2px dashed',\n borderColor: (theme) => theme.palette.divider,\n borderRadius: 2,\n height: '100%',\n mb: 0,\n backgroundColor: 'transparent',\n boxShadow: 'none',\n }}\n >\n <Avatar\n sx={{\n width: 56,\n height: 56,\n bgcolor: theme.palette.primary.main + '15',\n color: theme.palette.primary.main,\n boxShadow: `0 4px 16px ${theme.palette.primary.main}20`,\n transition: 'all 0.3s ease',\n }}\n >\n <AttachFileIcon size={28} />\n </Avatar>\n <Box sx={{ textAlign: 'center' }}>\n <Typography variant=\"h6\" sx={{ fontWeight: 600, mb: 1, fontSize: '1.1rem' }}>\n Attach One Image\n </Typography>\n <Typography variant=\"body2\" color=\"text.secondary\" sx={{ mb: 1, fontSize: '0.95rem' }}>\n Click here to upload a single image\n </Typography>\n <Typography variant=\"caption\" color=\"text.secondary\" sx={{\n opacity: 0.8,\n fontSize: '0.85rem',\n background: theme.palette.mode === 'dark'\n ? 'rgba(255,255,255,0.05)'\n : 'rgba(0,0,0,0.05)',\n px: 2,\n py: 0.5,\n borderRadius: 1,\n }}>\n Support: Images only (JPG, PNG, GIF) - Max 10MB\n </Typography>\n </Box>\n </Box>\n {/* Attachment Reminder - positioned at bottom */}\n {((formData.images && formData.images.length > 0) || (formData.attachments && formData.attachments.length > 0)) && (\n <Alert\n severity=\"info\"\n sx={{\n mt: 'auto',\n textAlign: 'left',\n fontSize: '0.75rem',\n py: 0.5,\n background: theme.palette.mode === 'dark'\n ? 'linear-gradient(135deg, rgba(33,150,243,0.1) 0%, rgba(25,118,210,0.1) 100%)'\n : 'linear-gradient(135deg, rgba(33,150,243,0.05) 0%, rgba(25,118,210,0.05) 100%)',\n border: `1px solid ${theme.palette.info.main}30`,\n '& .MuiAlert-icon': {\n color: theme.palette.info.main,\n fontSize: '0.875rem',\n },\n '& .MuiAlert-message': {\n fontSize: '0.75rem',\n },\n }}\n >\n <Typography variant=\"caption\" sx={{ fontWeight: 600, display: 'block' }}>\n {formData.images && formData.images.length > 0 \n ? '📎 Image will be copied to clipboard - paste in email!'\n : '📎 Files ready for email attachment'\n }\n </Typography>\n </Alert>\n )}\n </Box>\n </div>\n {/* Display uploaded image (single) */}\n {formData.images && formData.images.length > 0 && (\n <Box sx={{ mt: 2 }}>\n <Box sx={{ display: 'flex', alignItems: 'center', gap: 1, mb: 1.5 }}>\n <PhotoCameraIcon size={16} />\n <Typography variant=\"subtitle2\" sx={{ fontWeight: 600 }}>\n Attached Image\n </Typography>\n </Box>\n <Box sx={{ display: 'flex', gap: 1.5 }}>\n <Box\n sx={{\n position: 'relative',\n borderRadius: 1.5,\n overflow: 'hidden',\n boxShadow: theme.palette.mode === 'dark'\n ? '0 2px 8px rgba(0,0,0,0.3)'\n : '0 2px 8px rgba(0,0,0,0.1)',\n transition: 'all 0.2s ease',\n '&:hover': {\n transform: 'scale(1.05)',\n boxShadow: theme.palette.mode === 'dark'\n ? '0 4px 16px rgba(0,0,0,0.4)'\n : '0 4px 16px rgba(0,0,0,0.15)',\n },\n }}\n >\n <img\n src={formData.images[0]}\n alt=\"Attachment\"\n style={{\n width: 120,\n height: 120,\n objectFit: 'cover',\n display: 'block',\n }}\n />\n <IconButton\n size=\"small\"\n onClick={removeImage}\n sx={{\n position: 'absolute',\n top: 4,\n right: 4,\n bgcolor: 'rgba(244,67,54,0.9)',\n color: 'white',\n width: 24,\n height: 24,\n '&:hover': {\n bgcolor: 'rgba(244,67,54,1)',\n transform: 'scale(1.1)',\n },\n }}\n >\n <DeleteIcon size={14} />\n </IconButton>\n </Box>\n <Box sx={{ flex: 1, display: 'flex', flexDirection: 'column', justifyContent: 'center' }}>\n <Button\n variant=\"outlined\"\n size=\"small\"\n onClick={copyImageToClipboard}\n startIcon={<AttachFileIcon />}\n sx={{\n mb: 1,\n borderColor: theme.palette.primary.main + '50',\n color: theme.palette.primary.main,\n '&:hover': {\n borderColor: theme.palette.primary.main,\n bgcolor: theme.palette.primary.main + '10',\n },\n }}\n >\n Copy to Clipboard\n </Button>\n <Typography variant=\"caption\" color=\"text.secondary\" sx={{ textAlign: 'center' }}>\n Image will be copied when you submit\n </Typography>\n </Box>\n </Box>\n </Box>\n )}\n {/* Display other attachments */}\n {formData.attachments && formData.attachments.length > 0 && (\n <Box sx={{ mt: 2 }}>\n <Typography variant=\"subtitle2\" gutterBottom>\n Attached Files ({formData.attachments.length})\n </Typography>\n <Box sx={{ display: 'flex', flexWrap: 'wrap', gap: 1 }}>\n {formData.attachments.map((attachment, index) => (\n <Chip\n key={index}\n label={attachment.name}\n onDelete={() => removeAttachment(index)}\n deleteIcon={<DeleteIcon />}\n variant=\"outlined\"\n sx={{ maxWidth: 200 }}\n />\n ))}\n </Box>\n </Box>\n )}\n </Box>\n </Box>\n </Box>\n </DialogContent>\n\n {/* DialogActions sticky footer with single full-width Send Feedback button */}\n <DialogActions\n sx={{\n position: 'sticky',\n bottom: 0,\n zIndex: 10,\n px: { xs: 2, sm: 3 },\n py: 1.5,\n backgroundColor: 'background.paper',\n borderTop: '1px solid',\n borderColor: 'divider',\n justifyContent: 'center',\n }}\n >\n <Button\n fullWidth\n startIcon={<MailIcon />}\n disabled={!isValid}\n onClick={handleSubmit}\n variant=\"contained\"\n >\n Send Feedback\n </Button>\n </DialogActions>\n </Dialog>\n \n {/* Snackbar for clipboard feedback */}\n <Snackbar\n open={snackbarOpen}\n autoHideDuration={4000}\n onClose={() => setSnackbarOpen(false)}\n anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}\n sx={{\n '& .MuiSnackbarContent-root': {\n background: theme.palette.mode === 'dark'\n ? 'linear-gradient(135deg, rgba(76,175,80,0.15) 0%, rgba(46,125,50,0.15) 100%)'\n : 'linear-gradient(135deg, rgba(76,175,80,0.1) 0%, rgba(46,125,50,0.1) 100%)',\n color: theme.palette.text.primary,\n fontSize: '0.9rem',\n fontWeight: 500,\n borderRadius: 2,\n border: `1px solid ${theme.palette.success.main}30`,\n backdropFilter: 'blur(10px)',\n },\n }}\n message={snackbarMessage}\n />\n \n {/* Confirmation Dialog for Image Submission */}\n <Dialog\n open={confirmDialogOpen}\n onClose={() => setConfirmDialogOpen(false)}\n maxWidth=\"sm\"\n fullWidth\n PaperProps={{\n sx: {\n borderRadius: 3,\n bgcolor: theme.palette.background.paper,\n backgroundImage: theme.palette.mode === 'dark' \n ? 'linear-gradient(145deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.01) 100%)'\n : 'linear-gradient(145deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.4) 100%)',\n backdropFilter: 'blur(20px)',\n border: `1px solid ${theme.palette.mode === 'dark' ? 'rgba(255,255,255,0.1)' : 'rgba(0,0,0,0.05)'}`,\n boxShadow: theme.palette.mode === 'dark' \n ? '0 16px 60px rgba(0,0,0,0.6)' \n : '0 16px 60px rgba(0,0,0,0.15)',\n },\n }}\n >\n <DialogTitle sx={{ \n pb: 1,\n display: 'flex',\n alignItems: 'center',\n gap: 2,\n }}>\n <Avatar\n sx={{\n bgcolor: theme.palette.info.main + '20',\n color: theme.palette.info.main,\n width: 40,\n height: 40,\n }}\n >\n <PhotoCameraIcon />\n </Avatar>\n <Box>\n <Typography variant=\"h6\" sx={{ fontWeight: 600 }}>\n Ready to Submit with Image\n </Typography>\n <Typography variant=\"caption\" color=\"text.secondary\">\n Here's what will happen when you submit\n </Typography>\n </Box>\n </DialogTitle>\n \n <DialogContent sx={{ pt: 1 }}>\n <Box sx={{ display: 'flex', flexDirection: 'column', gap: 2 }}>\n <Paper\n variant=\"outlined\"\n sx={{\n p: 3,\n borderRadius: 2,\n background: theme.palette.mode === 'dark'\n ? 'linear-gradient(135deg, rgba(33,150,243,0.05) 0%, rgba(25,118,210,0.05) 100%)'\n : 'linear-gradient(135deg, rgba(33,150,243,0.03) 0%, rgba(25,118,210,0.03) 100%)',\n border: `1px solid ${theme.palette.info.main}20`,\n }}\n >\n <Typography variant=\"subtitle1\" sx={{ fontWeight: 600, mb: 2, display: 'flex', alignItems: 'center', gap: 1 }}>\n <Box sx={{ \n bgcolor: theme.palette.info.main + '20', \n color: theme.palette.info.main,\n borderRadius: '50%',\n width: 24,\n height: 24,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n fontSize: '12px',\n fontWeight: 'bold'\n }}>\n 1\n </Box>\n Your image will be copied to clipboard\n </Typography>\n <Typography variant=\"subtitle1\" sx={{ fontWeight: 600, mb: 2, display: 'flex', alignItems: 'center', gap: 1 }}>\n <Box sx={{ \n bgcolor: theme.palette.info.main + '20', \n color: theme.palette.info.main,\n borderRadius: '50%',\n width: 24,\n height: 24,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n fontSize: '12px',\n fontWeight: 'bold'\n }}>\n 2\n </Box>\n Your email client will open\n </Typography>\n <Typography variant=\"subtitle1\" sx={{ fontWeight: 600, mb: 1, display: 'flex', alignItems: 'center', gap: 1 }}>\n <Box sx={{ \n bgcolor: theme.palette.info.main + '20', \n color: theme.palette.info.main,\n borderRadius: '50%',\n width: 24,\n height: 24,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n fontSize: '12px',\n fontWeight: 'bold'\n }}>\n 3\n </Box>\n Paste the image with Ctrl+V (or Cmd+V)\n </Typography>\n <Typography variant=\"body2\" color=\"text.secondary\" sx={{ ml: 4, fontStyle: 'italic' }}>\n The email will have a clear spot where you should paste\n </Typography>\n </Paper>\n \n <Alert severity=\"info\" sx={{ \n background: 'transparent',\n border: `1px solid ${theme.palette.info.main}30`,\n }}>\n <Typography variant=\"body2\">\n <strong>💡 Tip:</strong> Make sure to paste the image before sending your email!\n </Typography>\n </Alert>\n </Box>\n </DialogContent>\n \n <DialogActions sx={{ p: 2.5, pt: 1 }}>\n <Button \n onClick={() => setConfirmDialogOpen(false)}\n sx={{ color: theme.palette.text.secondary }}\n >\n Cancel\n </Button>\n <Button\n variant=\"contained\"\n onClick={performSubmit}\n disabled={isSubmitting}\n startIcon={isSubmitting ? <CircularProgress size={16} /> : <MailIcon />}\n sx={{\n background: `linear-gradient(135deg, ${theme.palette.primary.main} 0%, ${theme.palette.primary.dark} 100%)`,\n '&:hover': {\n background: `linear-gradient(135deg, ${theme.palette.primary.dark} 0%, ${theme.palette.primary.main} 100%)`,\n },\n }}\n >\n {isSubmitting ? 'Submitting...' : 'Got it, Submit Now'}\n </Button>\n </DialogActions>\n </Dialog>\n </>\n );\n};\n","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-E610-85E732\nconst __banditFingerprint_theme_banditThemets = 'BL-FP-8C4B75-D757';\nconst __auditTrail_theme_banditThemets = 'BL-AU-MGOIKVW6-JQUK';\n// File: banditTheme.ts | Path: src/theme/banditTheme.ts | Hash: e610d757\n\ndeclare module '@mui/material/styles' {\n interface Palette {\n chat: {\n shell: string;\n input: string;\n badge: string;\n badgeHover: string;\n file: string;\n fileIcon: string;\n fileText: string;\n caption: string;\n suggestion: {\n background: string;\n text: string;\n border: string;\n hoverBackground: string;\n hoverBorder: string;\n };\n appBar: {\n background: string;\n border: string;\n icon: string;\n iconHover: string;\n menuBackground: string;\n menuText: string;\n };\n response: {\n userBackground: string;\n userText: string;\n userBorder: string;\n userBubble: string;\n userAvatarBackground: string;\n modelLabel: string;\n border: string;\n aiBackground: string;\n aiText: string;\n aiBorder: string;\n aiBubble: string;\n memoryText: string;\n divider: string;\n containerBackground: string;\n codeBackground?: string;\n codeText?: string;\n };\n };\n }\n interface PaletteOptions {\n chat?: {\n shell: string;\n input: string;\n badge: string;\n badgeHover: string;\n file: string;\n fileIcon: string;\n fileText: string;\n caption: string;\n suggestion?: {\n background: string;\n text: string;\n border: string;\n hoverBackground: string;\n hoverBorder: string;\n };\n appBar?: {\n background: string;\n border: string;\n icon: string;\n iconHover: string;\n menuBackground: string;\n menuText: string;\n };\n response?: {\n userBackground: string;\n userText: string;\n userBorder: string;\n userBubble: string;\n userAvatarBackground: string;\n modelLabel: string;\n border: string;\n aiBackground: string;\n aiText: string;\n aiBorder: string;\n aiBubble: string;\n memoryText: string;\n divider: string;\n containerBackground: string;\n codeBackground?: string;\n codeText?: string;\n };\n };\n }\n}\n\nimport { createTheme, ThemeOptions } from '@mui/material/styles';\n\nconst commonOptions: Partial<ThemeOptions> = {\n typography: {\n fontFamily: `'Segoe UI', Roboto, sans-serif`,\n fontSize: 14,\n // Fix subtitle and heading variants for better dark theme contrast\n subtitle1: {\n color: 'inherit', // Use the theme's text.primary color\n fontWeight: 600,\n },\n subtitle2: {\n color: 'inherit', // Use the theme's text.primary color \n fontWeight: 600,\n },\n h6: {\n color: 'inherit', // Use the theme's text.primary color\n fontWeight: 600,\n },\n },\n shape: {\n borderRadius: 8,\n },\n components: {\n MuiPaper: {\n styleOverrides: {\n root: {\n backgroundImage: 'none',\n },\n },\n },\n },\n};\n\nexport const banditDarkTheme = createTheme({\n ...commonOptions,\n palette: {\n mode: 'dark',\n primary: {\n main: '#e53935',\n },\n secondary: {\n main: '#8e24aa',\n },\n background: {\n default: '#121212',\n paper: '#1e1e1e',\n },\n text: {\n primary: '#ffffff',\n secondary: '#aaaaaa',\n },\n chat: {\n shell: '#121212',\n input: '#2a2a2a',\n badge: '#444',\n badgeHover: '#666',\n file: '#333',\n fileIcon: '#555',\n fileText: '#fff',\n caption: '#888',\n suggestion: {\n background: '#2a2a2a',\n text: '#ccc',\n border: '#444',\n hoverBackground: '#333',\n hoverBorder: '#666',\n },\n appBar: {\n background: \"#000\",\n border: \"#333\",\n icon: \"#fff\",\n iconHover: \"#222\",\n menuBackground: \"#222\",\n menuText: \"#fff\",\n },\n response: {\n userBackground: '#1f1f1f',\n userText: '#6C9AC5',\n userBorder: '#444',\n userBubble: '#2a2a2a',\n userAvatarBackground: 'transparent',\n modelLabel: '#888',\n border: '#444',\n aiBackground: '#2f2f2f',\n aiText: '#fff',\n aiBorder: '#444',\n aiBubble: '#2f2f2f',\n memoryText: '#00e676',\n divider: '#555',\n containerBackground: '#1c1c1c',\n },\n },\n },\n});\n\nexport const banditLightTheme = createTheme({\n ...commonOptions,\n palette: {\n mode: 'light',\n primary: {\n main: '#d32f2f',\n },\n secondary: {\n main: '#7b1fa2',\n },\n background: {\n default: '#fafafa',\n paper: '#ffffff',\n },\n text: {\n primary: '#1a1a1a',\n secondary: '#555555',\n },\n chat: {\n shell: '#f5f5f5',\n input: '#f5f5f5', // already matching shell, no change needed\n badge: '#ddd',\n badgeHover: '#bbb',\n file: '#eee',\n fileIcon: '#ccc',\n fileText: '#000',\n caption: '#555',\n suggestion: {\n background: '#f0f0f0',\n text: '#222',\n border: '#ddd',\n hoverBackground: '#e0e0e0',\n hoverBorder: '#ccc',\n },\n appBar: {\n background: \"#ffffff\",\n border: \"#ddd\",\n icon: \"#000\",\n iconHover: \"#f0f0f0\",\n menuBackground: \"#f9f9f9\",\n menuText: \"#000\",\n },\n response: {\n userBackground: '#f0f0f0', // improved for avatar appearance\n userText: '#1565c0',\n userBorder: '#bbb', // softened border\n userBubble: '#ffffff', // improved contrast and UX\n userAvatarBackground: '#cccccc',\n modelLabel: '#888',\n border: '#ccc',\n aiBackground: '#eaeaea', // softened container-style background for AI bubble\n aiText: '#1a1a1a',\n aiBorder: '#ccc',\n aiBubble: '#ffffff',\n memoryText: '#2e7d32',\n divider: '#ccc',\n containerBackground: '#eaeaea',\n },\n },\n },\n});\n","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-9A1D-23CF7B\nconst __banditFingerprint_theme_corporateThemets = 'BL-FP-223D0C-A225';\nconst __auditTrail_theme_corporateThemets = 'BL-AU-MGOIKVW7-CIOP';\n// File: corporateTheme.ts | Path: src/theme/corporateTheme.ts | Hash: 9a1da225\n\nimport { createTheme, ThemeOptions } from '@mui/material/styles';\n\nconst commonOptions: Partial<ThemeOptions> = {\n typography: {\n fontFamily: `'Segoe UI', Roboto, sans-serif`,\n fontSize: 14,\n // Fix subtitle and heading variants for better dark theme contrast\n subtitle1: {\n color: 'inherit', // Use the theme's text.primary color\n fontWeight: 600,\n },\n subtitle2: {\n color: 'inherit', // Use the theme's text.primary color \n fontWeight: 600,\n },\n h6: {\n color: 'inherit', // Use the theme's text.primary color\n fontWeight: 600,\n },\n },\n shape: {\n borderRadius: 6,\n },\n components: {\n MuiPaper: {\n styleOverrides: {\n root: {\n backgroundImage: 'none',\n },\n },\n },\n },\n};\n\nexport const corporateDarkTheme = createTheme({\n ...commonOptions,\n palette: {\n mode: 'dark',\n primary: {\n main: '#0d47a1',\n },\n secondary: {\n main: '#546e7a',\n },\n background: {\n default: '#101820',\n paper: '#1c1f26',\n },\n text: {\n primary: '#e0e0e0',\n secondary: '#9e9e9e',\n },\n chat: {\n shell: '#101820',\n input: '#1c1f26',\n badge: '#263238',\n badgeHover: '#37474f',\n file: '#1a1a1a',\n fileIcon: '#607d8b',\n fileText: '#fff',\n caption: '#90a4ae',\n suggestion: {\n background: '#1e2935',\n text: '#cfd8dc',\n border: '#37474f',\n hoverBackground: '#263238',\n hoverBorder: '#455a64',\n },\n appBar: {\n background: \"#0d1117\",\n border: \"#1f2937\",\n icon: \"#e0e0e0\",\n iconHover: \"#263238\",\n menuBackground: \"#1f2937\",\n menuText: \"#ffffff\",\n },\n response: {\n userBackground: '#1e2935',\n userText: '#90caf9',\n userBorder: '#37474f',\n userBubble: '#263238',\n userAvatarBackground: 'transparent',\n modelLabel: '#b0bec5',\n border: '#455a64',\n aiBackground: '#1f2733',\n aiText: '#ffffff',\n aiBorder: '#37474f',\n aiBubble: '#2c3e50',\n memoryText: '#4db6ac',\n divider: '#546e7a',\n containerBackground: '#1c1f26',\n },\n },\n },\n});\n\nexport const corporateLightTheme = createTheme({\n ...commonOptions,\n palette: {\n mode: 'light',\n primary: {\n main: '#1565c0',\n },\n secondary: {\n main: '#607d8b',\n },\n background: {\n default: '#f7f9fc',\n paper: '#ffffff',\n },\n text: {\n primary: '#212121',\n secondary: '#616161',\n },\n chat: {\n shell: '#f2f5f9',\n input: '#ffffff',\n badge: '#cfd8dc',\n badgeHover: '#b0bec5',\n file: '#e0e0e0',\n fileIcon: '#546e7a',\n fileText: '#000',\n caption: '#607d8b',\n suggestion: {\n background: '#e3f2fd',\n text: '#1565c0',\n border: '#bbdefb',\n hoverBackground: '#d0e9ff',\n hoverBorder: '#90caf9',\n },\n appBar: {\n background: \"#ffffff\",\n border: \"#e0e0e0\",\n icon: \"#000\",\n iconHover: \"#eeeeee\",\n menuBackground: \"#f0f0f0\",\n menuText: \"#000\",\n },\n response: {\n userBackground: '#e3f2fd',\n userText: '#0d47a1',\n userBorder: '#90caf9',\n userBubble: '#ffffff',\n userAvatarBackground: '#bbdefb',\n modelLabel: '#78909c',\n border: '#90a4ae',\n aiBackground: '#f0f4f8',\n aiText: '#212121',\n aiBorder: '#cfd8dc',\n aiBubble: '#ffffff',\n memoryText: '#00796b',\n divider: '#bdbdbd',\n containerBackground: '#e3f2fd',\n },\n },\n },\n});","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-0FDA-7A06F8\nconst __banditFingerprint_theme_neutralThemets = 'BL-FP-B03C04-FA20';\nconst __auditTrail_theme_neutralThemets = 'BL-AU-MGOIKVW8-1YX7';\n// File: neutralTheme.ts | Path: src/theme/neutralTheme.ts | Hash: 0fdafa20\n\nimport { createTheme, ThemeOptions } from '@mui/material/styles';\n\nconst commonOptions: Partial<ThemeOptions> = {\n typography: {\n fontFamily: `'Segoe UI', Roboto, sans-serif`,\n fontSize: 14,\n // Fix subtitle and heading variants for better dark theme contrast\n subtitle1: {\n color: 'inherit', // Use the theme's text.primary color\n fontWeight: 600,\n },\n subtitle2: {\n color: 'inherit', // Use the theme's text.primary color \n fontWeight: 600,\n },\n h6: {\n color: 'inherit', // Use the theme's text.primary color\n fontWeight: 600,\n },\n },\n shape: {\n borderRadius: 8,\n },\n components: {\n MuiPaper: {\n styleOverrides: {\n root: {\n backgroundImage: 'none',\n },\n },\n },\n },\n};\n\nexport const neutralDarkTheme = createTheme({\n ...commonOptions,\n palette: {\n mode: 'dark',\n primary: {\n main: '#4d90fe',\n },\n secondary: {\n main: '#b39ddb',\n },\n background: {\n default: '#121212',\n paper: '#1e1e1e',\n },\n text: {\n primary: '#f5f5f5',\n secondary: '#bbbbbb',\n },\n chat: {\n shell: '#121212',\n input: '#1c1c1c',\n badge: '#2c2c2c',\n badgeHover: '#3c3c3c',\n file: '#2a2a2a',\n fileIcon: '#90caf9',\n fileText: '#ffffff',\n caption: '#aaaaaa',\n suggestion: {\n background: '#1e1e1e',\n text: '#e3f2fd',\n border: '#333',\n hoverBackground: '#2a2a2a',\n hoverBorder: '#444',\n },\n appBar: {\n background: '#1a1a1a',\n border: '#333',\n icon: '#90caf9',\n iconHover: '#bbdefb',\n menuBackground: '#242424',\n menuText: '#e0e0e0',\n },\n response: {\n userBackground: '#2a2a2a',\n userText: '#82b1ff',\n userBorder: '#444',\n userBubble: '#2f2f2f',\n userAvatarBackground: '#3b3b3b',\n modelLabel: '#bbbbbb',\n border: '#444',\n aiBackground: '#232323',\n aiText: '#e0e0e0',\n aiBorder: '#444',\n aiBubble: '#292929',\n memoryText: '#aed581',\n divider: '#444',\n containerBackground: '#1c1c1c',\n },\n },\n },\n});\n\nexport const neutralLightTheme = createTheme({\n ...commonOptions,\n palette: {\n mode: 'light',\n primary: {\n main: '#1565c0',\n },\n secondary: {\n main: '#9575cd',\n },\n background: {\n default: '#f4f4f4',\n paper: '#ffffff',\n },\n text: {\n primary: '#1a1a1a',\n secondary: '#555',\n },\n chat: {\n shell: '#ffffff',\n input: '#f5f5f5',\n badge: '#ddd',\n badgeHover: '#ccc',\n file: '#eee',\n fileIcon: '#1565c0',\n fileText: '#000',\n caption: '#666',\n suggestion: {\n background: '#f9f9f9',\n text: '#333',\n border: '#ddd',\n hoverBackground: '#e0e0e0',\n hoverBorder: '#ccc',\n },\n appBar: {\n background: '#ffffff',\n border: '#ddd',\n icon: '#1565c0',\n iconHover: '#e3f2fd',\n menuBackground: '#fafafa',\n menuText: '#111',\n },\n response: {\n userBackground: '#e8f0fe',\n userText: '#0d47a1',\n userBorder: '#bbb',\n userBubble: '#ffffff',\n userAvatarBackground: '#bbdefb',\n modelLabel: '#666',\n border: '#ccc',\n aiBackground: '#f0f0f0',\n aiText: '#1a1a1a',\n aiBorder: '#ccc',\n aiBubble: '#ffffff',\n memoryText: '#558b2f',\n divider: '#ccc',\n containerBackground: '#f5f5f5',\n },\n },\n },\n});","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-558E-84B97F\nconst __banditFingerprint_theme_cyberPunkThemets = 'BL-FP-D0CD8A-872D';\nconst __auditTrail_theme_cyberPunkThemets = 'BL-AU-MGOIKVW7-6OGC';\n// File: cyberPunkTheme.ts | Path: src/theme/cyberPunkTheme.ts | Hash: 558e872d\n\nimport { createTheme } from \"@mui/material/styles\";\nimport { ThemeOptions } from \"@mui/material/styles\";\n\nconst commonOptions: Partial<ThemeOptions> = {\n typography: {\n fontFamily: `'Orbitron', 'Segoe UI', Roboto, sans-serif`,\n fontSize: 14,\n // Fix subtitle and heading variants for better dark theme contrast\n subtitle1: {\n color: 'inherit', // Use the theme's text.primary color\n fontWeight: 600,\n },\n subtitle2: {\n color: 'inherit', // Use the theme's text.primary color \n fontWeight: 600,\n },\n h6: {\n color: 'inherit', // Use the theme's text.primary color\n fontWeight: 600,\n },\n },\n shape: {\n borderRadius: 8,\n },\n components: {\n MuiPaper: {\n styleOverrides: {\n root: {\n backgroundImage: \"none\",\n },\n },\n },\n },\n};\n\nexport const cyberPunkDarkTheme = createTheme({\n ...commonOptions,\n palette: {\n mode: \"dark\",\n primary: {\n main: \"#ff00ff\",\n },\n secondary: {\n main: \"#00ffff\",\n },\n background: {\n default: \"#0a0a0a\",\n paper: \"#1a1a1a\",\n },\n text: {\n primary: \"#e0e0e0\",\n secondary: \"#9c9c9c\",\n },\n chat: {\n shell: \"#0a0a0a\",\n input: \"#1a1a1a\",\n badge: \"#290033\",\n badgeHover: \"#3f004d\",\n file: \"#2d2d2d\",\n fileIcon: \"#d500f9\",\n fileText: \"#ffffff\",\n caption: \"#ff80ab\",\n suggestion: {\n background: \"#1a1a1a\",\n text: \"#e0e0e0\",\n border: \"#ff00ff\",\n hoverBackground: \"#2c2c2c\",\n hoverBorder: \"#ff80ff\",\n },\n appBar: {\n background: \"#0a0a0a\",\n border: \"#2c2c2c\",\n icon: \"#ff00ff\",\n iconHover: \"#ff80ff\",\n menuBackground: \"#1c1c1c\",\n menuText: \"#ffffff\",\n },\n response: {\n userBackground: \"#290033\",\n userText: \"#ffccff\",\n userBorder: \"#ff80ff\",\n userBubble: \"#330044\",\n userAvatarBackground: \"#ff00ff\",\n modelLabel: \"#ff80ff\",\n border: \"#ff00ff\",\n aiBackground: \"#1a1a1a\",\n aiText: \"#ffffff\",\n aiBorder: \"#ff00ff\",\n aiBubble: \"#1f002a\",\n memoryText: \"#00e676\",\n divider: \"#ff00ff\",\n containerBackground: \"#100010\",\n },\n },\n },\n});\n\nexport const cyberPunkLightTheme = createTheme({\n ...commonOptions,\n palette: {\n mode: \"light\",\n primary: {\n main: \"#d500f9\",\n },\n secondary: {\n main: \"#00bcd4\",\n },\n background: {\n default: \"#fdf6ff\",\n paper: \"#ffffff\",\n },\n text: {\n primary: \"#1a1a1a\",\n secondary: \"#555\",\n },\n chat: {\n shell: \"#fdf6ff\",\n input: \"#fdf6ff\",\n badge: \"#e0b3ff\",\n badgeHover: \"#cc99ff\",\n file: \"#f8e8ff\",\n fileIcon: \"#aa00ff\",\n fileText: \"#000\",\n caption: \"#9c27b0\",\n suggestion: {\n background: \"#f3e5f5\",\n text: \"#4a148c\",\n border: \"#ce93d8\",\n hoverBackground: \"#e1bee7\",\n hoverBorder: \"#ba68c8\",\n },\n appBar: {\n background: \"#fdf6ff\",\n border: \"#ce93d8\",\n icon: \"#aa00ff\",\n iconHover: \"#d500f9\",\n menuBackground: \"#f3e5f5\",\n menuText: \"#4a148c\",\n },\n response: {\n userBackground: \"#f3e5f5\",\n userText: \"#4a148c\",\n userBorder: \"#ba68c8\",\n userBubble: \"#ffffff\",\n userAvatarBackground: \"#aa00ff\",\n modelLabel: \"#6a1b9a\",\n border: \"#ce93d8\",\n aiBackground: \"#f8e8ff\",\n aiText: \"#1a1a1a\",\n aiBorder: \"#ba68c8\",\n aiBubble: \"#f3e5f5\",\n memoryText: \"#2e7d32\",\n divider: \"#ba68c8\",\n containerBackground: \"#fce4ec\",\n },\n },\n },\n});","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-90BA-28DE38\nconst __banditFingerprint_theme_dawnThemets = 'BL-FP-4593C0-E9E0';\nconst __auditTrail_theme_dawnThemets = 'BL-AU-MGOIKVW7-E0FE';\n// File: dawnTheme.ts | Path: src/theme/dawnTheme.ts | Hash: 90bae9e0\n\nimport { createTheme, ThemeOptions } from \"@mui/material/styles\";\n\nconst commonOptions: Partial<ThemeOptions> = {\n typography: {\n fontFamily: `'Segoe UI', Roboto, sans-serif`,\n fontSize: 14,\n // Fix subtitle and heading variants for better dark theme contrast\n subtitle1: {\n color: 'inherit', // Use the theme's text.primary color\n fontWeight: 600,\n },\n subtitle2: {\n color: 'inherit', // Use the theme's text.primary color \n fontWeight: 600,\n },\n h6: {\n color: 'inherit', // Use the theme's text.primary color\n fontWeight: 600,\n },\n },\n shape: {\n borderRadius: 8,\n },\n components: {\n MuiPaper: {\n styleOverrides: {\n root: {\n backgroundImage: \"none\",\n },\n },\n },\n },\n};\n\nexport const dawnLightTheme = createTheme({\n ...commonOptions,\n palette: {\n mode: \"light\",\n primary: {\n main: \"#e07a5f\",\n },\n secondary: {\n main: \"#3d405b\",\n },\n background: {\n default: \"#f9f6f1\",\n paper: \"#ffffff\",\n },\n text: {\n primary: \"#2f2f2f\",\n secondary: \"#555555\",\n },\n chat: {\n shell: \"#f4f1ed\",\n input: \"#ffffff\",\n badge: \"#ddd\",\n badgeHover: \"#bbb\",\n file: \"#eee\",\n fileIcon: \"#ccc\",\n fileText: \"#000\",\n caption: \"#555\",\n suggestion: {\n background: \"#f0f0f0\",\n text: \"#222\",\n border: \"#ddd\",\n hoverBackground: \"#e0e0e0\",\n hoverBorder: \"#ccc\",\n },\n appBar: {\n background: \"#ffffff\",\n border: \"#ddd\",\n icon: \"#000\",\n iconHover: \"#f0f0f0\",\n menuBackground: \"#f9f9f9\",\n menuText: \"#000\",\n },\n response: {\n userBackground: \"#f1ede8\",\n userText: \"#1565c0\",\n userBorder: \"#bbb\",\n userBubble: \"#ffffff\",\n userAvatarBackground: \"#cccccc\",\n modelLabel: \"#888\",\n border: \"#ccc\",\n aiBackground: \"#f3e9e1\",\n aiText: \"#1a1a1a\",\n aiBorder: \"#ccc\",\n aiBubble: \"#ffffff\",\n memoryText: \"#2e7d32\",\n divider: \"#ccc\",\n containerBackground: \"#f3e9e1\",\n },\n },\n },\n});\n\nexport const dawnDarkTheme = createTheme({\n ...commonOptions,\n palette: {\n mode: \"dark\",\n primary: {\n main: \"#f4a261\",\n },\n secondary: {\n main: \"#8d99ae\",\n },\n background: {\n default: \"#2e2a26\",\n paper: \"#38322e\",\n },\n text: {\n primary: \"#f1f1f1\",\n secondary: \"#aaaaaa\",\n },\n chat: {\n shell: \"#2e2a26\",\n input: \"#3a3530\",\n badge: \"#444\",\n badgeHover: \"#666\",\n file: \"#333\",\n fileIcon: \"#555\",\n fileText: \"#fff\",\n caption: \"#888\",\n suggestion: {\n background: \"#3a3530\",\n text: \"#ccc\",\n border: \"#444\",\n hoverBackground: \"#444\",\n hoverBorder: \"#666\",\n },\n appBar: {\n background: \"#2e2a26\",\n border: \"#444\",\n icon: \"#fff\",\n iconHover: \"#222\",\n menuBackground: \"#3a3530\",\n menuText: \"#fff\",\n },\n response: {\n userBackground: \"#524841\",\n userText: \"#f4a261\",\n userBorder: \"#666\",\n userBubble: \"#3a3530\",\n userAvatarBackground: \"transparent\",\n modelLabel: \"#bbb\",\n border: \"#444\",\n aiBackground: \"#3b332d\",\n aiText: \"#ffffff\",\n aiBorder: \"#666\",\n aiBubble: \"#443c35\",\n memoryText: \"#e9c46a\",\n divider: \"#555\",\n containerBackground: \"#3b332d\",\n },\n },\n },\n});","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-21CD-792A03\nconst __banditFingerprint_theme_mistThemets = 'BL-FP-733EC7-1BFB';\nconst __auditTrail_theme_mistThemets = 'BL-AU-MGOIKVW8-CGIJ';\n// File: mistTheme.ts | Path: src/theme/mistTheme.ts | Hash: 21cd1bfb\n\nimport { createTheme } from '@mui/material/styles';\n\nexport const mistLightTheme = createTheme({\n typography: {\n fontFamily: `'Segoe UI', Roboto, sans-serif`,\n fontSize: 14,\n // Fix subtitle and heading variants for better dark theme contrast\n subtitle1: {\n color: 'inherit', // Use the theme's text.primary color\n fontWeight: 600,\n },\n subtitle2: {\n color: 'inherit', // Use the theme's text.primary color \n fontWeight: 600,\n },\n h6: {\n color: 'inherit', // Use the theme's text.primary color\n fontWeight: 600,\n },\n },\n shape: {\n borderRadius: 8,\n },\n components: {\n MuiPaper: {\n styleOverrides: {\n root: {\n backgroundImage: 'none',\n },\n },\n },\n },\n palette: {\n mode: 'light',\n primary: { main: '#5c6bc0' }, // Indigo 400\n secondary: { main: '#8e99f3' }, // Indigo 200\n background: {\n default: '#f9fafc',\n paper: '#ffffff',\n },\n text: {\n primary: '#212121',\n secondary: '#555',\n },\n chat: {\n shell: '#f2f3f5',\n input: '#f9f9fb',\n badge: '#ddd',\n badgeHover: '#bbb',\n file: '#f5f5f5',\n fileIcon: '#aaa',\n fileText: '#000',\n caption: '#666',\n suggestion: {\n background: '#e8eaf6',\n text: '#1a237e',\n border: '#c5cae9',\n hoverBackground: '#dfe3f3',\n hoverBorder: '#b0bec5',\n },\n appBar: {\n background: '#e3eaf4',\n border: '#c5d3e5',\n icon: '#3f51b5',\n iconHover: '#5c6bc0',\n menuBackground: '#f0f2f7',\n menuText: '#1a1a1a',\n },\n response: {\n userBackground: '#e3f2fd',\n userText: '#0d47a1',\n userBorder: '#bbdefb',\n userBubble: '#ffffff',\n userAvatarBackground: '#cfd8dc',\n modelLabel: '#666',\n border: '#ccc',\n aiBackground: '#e8eaf6',\n aiText: '#1a1a1a',\n aiBorder: '#c5cae9',\n aiBubble: '#ffffff',\n memoryText: '#2e7d32',\n divider: '#ccc',\n containerBackground: '#eaeff7',\n },\n },\n },\n});\n\nexport const mistDarkTheme = createTheme({\n typography: {\n fontFamily: `'Segoe UI', Roboto, sans-serif`,\n fontSize: 14,\n // Fix subtitle and heading variants for better dark theme contrast\n subtitle1: {\n color: 'inherit', // Use the theme's text.primary color\n fontWeight: 600,\n },\n subtitle2: {\n color: 'inherit', // Use the theme's text.primary color \n fontWeight: 600,\n },\n h6: {\n color: 'inherit', // Use the theme's text.primary color\n fontWeight: 600,\n },\n },\n shape: {\n borderRadius: 8,\n },\n components: {\n MuiPaper: {\n styleOverrides: {\n root: {\n backgroundImage: 'none',\n },\n },\n },\n },\n palette: {\n mode: 'dark',\n primary: { main: '#8c9eff' },\n secondary: { main: '#536dfe' },\n background: {\n default: '#1a1c23',\n paper: '#232631',\n },\n text: {\n primary: '#e0e0e0',\n secondary: '#aaa',\n },\n chat: {\n shell: '#1a1c23',\n input: '#2c2e38',\n badge: '#444',\n badgeHover: '#666',\n file: '#2e2e2e',\n fileIcon: '#777',\n fileText: '#fff',\n caption: '#888',\n suggestion: {\n background: '#303248',\n text: '#c5cae9',\n border: '#444',\n hoverBackground: '#3a3d5a',\n hoverBorder: '#666',\n },\n appBar: {\n background: '#20222a',\n border: '#333',\n icon: '#ccc',\n iconHover: '#fff',\n menuBackground: '#2c2e38',\n menuText: '#eee',\n },\n response: {\n userBackground: '#283593',\n userText: '#bbdefb',\n userBorder: '#3949ab',\n userBubble: '#303f9f',\n userAvatarBackground: '#3949ab',\n modelLabel: '#aaa',\n border: '#444',\n aiBackground: '#2f2f3f',\n aiText: '#e0e0e0',\n aiBorder: '#555',\n aiBubble: '#3a3a4f',\n memoryText: '#80cbc4',\n divider: '#444',\n containerBackground: '#232631',\n },\n },\n },\n});","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-32A4-940977\nconst __banditFingerprint_theme_sageThemets = 'BL-FP-A3B652-4130';\nconst __auditTrail_theme_sageThemets = 'BL-AU-MGOIKVW8-1SOQ';\n// File: sageTheme.ts | Path: src/theme/sageTheme.ts | Hash: 32a44130\n\nimport { createTheme } from '@mui/material/styles';\n\nexport const sageLightTheme = createTheme({\n typography: {\n fontFamily: `'Segoe UI', Roboto, sans-serif`,\n fontSize: 14,\n // Fix subtitle and heading variants for better contrast\n subtitle1: {\n color: 'inherit',\n fontWeight: 600,\n },\n subtitle2: {\n color: 'inherit',\n fontWeight: 600,\n },\n h6: {\n color: 'inherit',\n fontWeight: 600,\n },\n },\n shape: {\n borderRadius: 8,\n },\n components: {\n MuiPaper: {\n styleOverrides: {\n root: {\n backgroundImage: 'none',\n },\n },\n },\n },\n palette: {\n mode: 'light',\n primary: {\n main: '#4CAF50',\n },\n secondary: {\n main: '#8BC34A',\n },\n background: {\n default: '#f8f8f4',\n paper: '#ffffff',\n },\n text: {\n primary: '#1a1a1a',\n secondary: '#555',\n },\n chat: {\n shell: '#f4f6f4',\n input: '#f0f2ef',\n badge: '#cfd8dc',\n badgeHover: '#b0bec5',\n file: '#e0f2f1',\n fileIcon: '#a5d6a7',\n fileText: '#1a1a1a',\n caption: '#5c6b5c',\n suggestion: {\n background: '#e8f5e9',\n text: '#2e7d32',\n border: '#c8e6c9',\n hoverBackground: '#dcedc8',\n hoverBorder: '#aed581',\n },\n appBar: {\n background: '#ffffff',\n border: '#c8e6c9',\n icon: '#2e7d32',\n iconHover: '#81c784',\n menuBackground: '#f1f8e9',\n menuText: '#2e7d32',\n },\n response: {\n userBackground: '#f1f8e9',\n userText: '#33691e',\n userBorder: '#aed581',\n userBubble: '#ffffff',\n userAvatarBackground: '#d0f0c0',\n modelLabel: '#689f38',\n border: '#c5e1a5',\n aiBackground: '#f0f4c3',\n aiText: '#2e7d32',\n aiBorder: '#cddc39',\n aiBubble: '#ffffff',\n memoryText: '#43a047',\n divider: '#cfd8dc',\n containerBackground: '#f8f8f4',\n },\n },\n },\n});\n\nexport const sageDarkTheme = createTheme({\n typography: {\n fontFamily: `'Segoe UI', Roboto, sans-serif`,\n fontSize: 14,\n // Fix subtitle and heading variants for better contrast\n subtitle1: {\n color: 'inherit',\n fontWeight: 600,\n },\n subtitle2: {\n color: 'inherit',\n fontWeight: 600,\n },\n h6: {\n color: 'inherit',\n fontWeight: 600,\n },\n },\n shape: {\n borderRadius: 8,\n },\n components: {\n MuiPaper: {\n styleOverrides: {\n root: {\n backgroundImage: 'none',\n },\n },\n },\n },\n palette: {\n mode: 'dark',\n primary: {\n main: '#66bb6a',\n },\n secondary: {\n main: '#9ccc65',\n },\n background: {\n default: '#1c1f1c',\n paper: '#26332d',\n },\n text: {\n primary: '#e8f5e9',\n secondary: '#a5d6a7',\n },\n chat: {\n shell: '#1e221e',\n input: '#2a2f2a',\n badge: '#455a64',\n badgeHover: '#546e7a',\n file: '#37474f',\n fileIcon: '#81c784',\n fileText: '#ffffff',\n caption: '#a5d6a7',\n suggestion: {\n background: '#455e47',\n text: '#e8f5e9',\n border: '#388e3c',\n hoverBackground: '#1b5e20',\n hoverBorder: '#66bb6a',\n },\n appBar: {\n background: '#1c1f1c',\n border: '#2e7d32',\n icon: '#81c784',\n iconHover: '#a5d6a7',\n menuBackground: '#26332d',\n menuText: '#c8e6c9',\n },\n response: {\n userBackground: '#2a2f2a',\n userText: '#a5d6a7',\n userBorder: '#388e3c',\n userBubble: '#324934',\n userAvatarBackground: '#1b5e20',\n modelLabel: '#66bb6a',\n border: '#2e7d32',\n aiBackground: '#1e2f1e',\n aiText: '#ffffff',\n aiBorder: '#66bb6a',\n aiBubble: '#2e7d32',\n memoryText: '#66bb6a',\n divider: '#455a64',\n containerBackground: '#1c1f1c',\n },\n },\n },\n});","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-B064-6DA4AB\nconst __banditFingerprint_theme_stoneThemets = 'BL-FP-C51A0E-1014';\nconst __auditTrail_theme_stoneThemets = 'BL-AU-MGOIKVW8-CXXR';\n// File: stoneTheme.ts | Path: src/theme/stoneTheme.ts | Hash: b0641014\n\nimport { createTheme } from '@mui/material/styles';\n\nexport const stoneLightTheme = createTheme({\n typography: {\n fontFamily: `'Segoe UI', Roboto, sans-serif`,\n fontSize: 14,\n // Fix subtitle and heading variants for better contrast\n subtitle1: {\n color: 'inherit',\n fontWeight: 600,\n },\n subtitle2: {\n color: 'inherit',\n fontWeight: 600,\n },\n h6: {\n color: 'inherit',\n fontWeight: 600,\n },\n },\n shape: {\n borderRadius: 8,\n },\n components: {\n MuiPaper: {\n styleOverrides: {\n root: {\n backgroundImage: 'none',\n },\n },\n },\n },\n palette: {\n mode: 'light',\n primary: {\n main: '#4a4a4a',\n },\n secondary: {\n main: '#767676',\n },\n background: {\n default: '#e5e5e0',\n paper: '#f0f0eb',\n },\n text: {\n primary: '#222222',\n secondary: '#555555',\n },\n chat: {\n shell: '#e5e5e0',\n input: '#f5f5f0',\n badge: '#d2d2d2',\n badgeHover: '#bababa',\n file: '#ecece8',\n fileIcon: '#aaaaaa',\n fileText: '#000000',\n caption: '#555',\n suggestion: {\n background: '#f0f0eb',\n text: '#222',\n border: '#d4d4d4',\n hoverBackground: '#e2e2e2',\n hoverBorder: '#c0c0c0',\n },\n appBar: {\n background: '#f9f9f4',\n border: '#d8d8d8',\n icon: '#1a1a1a',\n iconHover: '#e6e6e6',\n menuBackground: '#f0f0eb',\n menuText: '#1a1a1a',\n },\n response: {\n userBackground: '#efefea',\n userText: '#2e5c8a',\n userBorder: '#c5c5c5',\n userBubble: '#ffffff',\n userAvatarBackground: '#cfcfcf',\n modelLabel: '#777',\n border: '#ccc',\n aiBackground: '#e3e3dd',\n aiText: '#222',\n aiBorder: '#bbb',\n aiBubble: '#ffffff',\n memoryText: '#3c6e47',\n divider: '#ccc',\n containerBackground: '#e3e3dd',\n },\n },\n },\n});\n\nexport const stoneDarkTheme = createTheme({\n typography: {\n fontFamily: `'Segoe UI', Roboto, sans-serif`,\n fontSize: 14,\n // Fix subtitle and heading variants for better contrast\n subtitle1: {\n color: 'inherit',\n fontWeight: 600,\n },\n subtitle2: {\n color: 'inherit',\n fontWeight: 600,\n },\n h6: {\n color: 'inherit',\n fontWeight: 600,\n },\n },\n shape: {\n borderRadius: 8,\n },\n components: {\n MuiPaper: {\n styleOverrides: {\n root: {\n backgroundImage: 'none',\n },\n },\n },\n },\n palette: {\n mode: 'dark',\n primary: {\n main: '#bfbfbf',\n },\n secondary: {\n main: '#999999',\n },\n background: {\n default: '#1b1b1b',\n paper: '#262626',\n },\n text: {\n primary: '#f5f5f5',\n secondary: '#c2c2c2',\n },\n chat: {\n shell: '#1b1b1b',\n input: '#232323',\n badge: '#444',\n badgeHover: '#666',\n file: '#2d2d2d',\n fileIcon: '#888',\n fileText: '#fff',\n caption: '#888',\n suggestion: {\n background: '#232323',\n text: '#ccc',\n border: '#444',\n hoverBackground: '#2e2e2e',\n hoverBorder: '#666',\n },\n appBar: {\n background: '#121212',\n border: '#2c2c2c',\n icon: '#f5f5f5',\n iconHover: '#1e1e1e',\n menuBackground: '#1f1f1f',\n menuText: '#eee',\n },\n response: {\n userBackground: '#2b2b2b',\n userText: '#80b3ff',\n userBorder: '#444',\n userBubble: '#232323',\n userAvatarBackground: 'transparent',\n modelLabel: '#888',\n border: '#444',\n aiBackground: '#2d2d2d',\n aiText: '#fff',\n aiBorder: '#444',\n aiBubble: '#2d2d2d',\n memoryText: '#9ccc65',\n divider: '#555',\n containerBackground: '#1f1f1f',\n },\n },\n },\n});","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-47A2-A8A3C4\nconst __banditFingerprint_theme_oceanThemets = 'BL-FP-A38F0D-008A';\nconst __auditTrail_theme_oceanThemets = 'BL-AU-MGOIKVW8-NS7W';\n// File: oceanTheme.ts | Path: src/theme/oceanTheme.ts | Hash: 47a2008a\n\nimport { createTheme, ThemeOptions } from \"@mui/material/styles\";\n\nexport const oceanDarkTheme: ThemeOptions = createTheme({\n typography: {\n fontFamily: '\"Inter\", \"Roboto\", \"Helvetica\", \"Arial\", sans-serif',\n fontSize: 14,\n subtitle1: { color: 'inherit', fontWeight: 600 },\n subtitle2: { color: 'inherit', fontWeight: 600 },\n h6: { color: 'inherit', fontWeight: 600 },\n },\n shape: { borderRadius: 8 },\n components: {\n MuiPaper: {\n styleOverrides: {\n root: { backgroundImage: 'none' },\n },\n },\n },\n palette: {\n mode: \"dark\",\n primary: {\n main: \"#00bcd4\", // Cyan\n light: \"#33c9dc\",\n dark: \"#0097a7\",\n },\n secondary: {\n main: \"#004d5a\", // Deep ocean blue\n light: \"#336b7a\",\n dark: \"#00363f\",\n },\n background: {\n default: \"#0a1929\", // Deep ocean\n paper: \"#1a2332\",\n },\n text: {\n primary: \"#e1f5fe\",\n secondary: \"#b3e5fc\",\n },\n divider: \"#004d5a\",\n chat: {\n shell: \"#1a2332\",\n input: \"#1a2332\", \n badge: \"#00bcd4\",\n badgeHover: \"#33c9dc\",\n file: \"#004d5a\",\n fileIcon: \"#00bcd4\",\n fileText: \"#e1f5fe\",\n caption: \"#b3e5fc\",\n suggestion: {\n background: \"#1a2332\",\n text: \"#e1f5fe\",\n border: \"#004d5a\",\n hoverBackground: \"#004d5a\",\n hoverBorder: \"#00bcd4\",\n },\n appBar: {\n background: \"linear-gradient(135deg, #0a1929 0%, #1a2332 100%)\",\n border: \"#004d5a\",\n icon: \"#00bcd4\",\n iconHover: \"#33c9dc\",\n menuBackground: \"#1a2332\",\n menuText: \"#e1f5fe\",\n },\n response: {\n userBackground: \"#004d5a\",\n userText: \"#e1f5fe\",\n userBorder: \"#00bcd4\",\n userBubble: \"#1a2332\",\n userAvatarBackground: \"#00bcd4\",\n modelLabel: \"#b3e5fc\",\n border: \"#004d5a\",\n aiBackground: \"#0a1929\",\n aiText: \"#e1f5fe\",\n aiBorder: \"#004d5a\",\n aiBubble: \"#1a2332\",\n memoryText: \"#b3e5fc\",\n divider: \"#004d5a\",\n containerBackground: \"#0a1929\",\n },\n },\n },\n});\n\nexport const oceanLightTheme: ThemeOptions = createTheme({\n typography: {\n fontFamily: '\"Inter\", \"Roboto\", \"Helvetica\", \"Arial\", sans-serif',\n fontSize: 14,\n subtitle1: { color: 'inherit', fontWeight: 600 },\n subtitle2: { color: 'inherit', fontWeight: 600 },\n h6: { color: 'inherit', fontWeight: 600 },\n },\n shape: { borderRadius: 8 },\n components: {\n MuiPaper: {\n styleOverrides: {\n root: { backgroundImage: 'none' },\n },\n },\n },\n palette: {\n mode: \"light\",\n primary: {\n main: \"#006064\", // Deep teal\n light: \"#33878a\",\n dark: \"#00424a\",\n },\n secondary: {\n main: \"#b2dfdb\", // Light teal\n light: \"#c4e9e5\",\n dark: \"#7c9c98\",\n },\n background: {\n default: \"#e0f2f1\", // Very light teal\n paper: \"#ffffff\",\n },\n text: {\n primary: \"#263238\",\n secondary: \"#37474f\",\n },\n divider: \"#b2dfdb\",\n chat: {\n shell: \"#ffffff\",\n input: \"#ffffff\",\n badge: \"#006064\",\n badgeHover: \"#00424a\",\n file: \"#b2dfdb\",\n fileIcon: \"#006064\",\n fileText: \"#263238\",\n caption: \"#37474f\",\n suggestion: {\n background: \"#ffffff\",\n text: \"#263238\",\n border: \"#b2dfdb\",\n hoverBackground: \"#b2dfdb\",\n hoverBorder: \"#006064\",\n },\n appBar: {\n background: \"linear-gradient(135deg, #e0f2f1 0%, #ffffff 100%)\",\n border: \"#b2dfdb\",\n icon: \"#006064\",\n iconHover: \"#00424a\",\n menuBackground: \"#ffffff\",\n menuText: \"#263238\",\n },\n response: {\n userBackground: \"#b2dfdb\",\n userText: \"#263238\",\n userBorder: \"#006064\",\n userBubble: \"#ffffff\",\n userAvatarBackground: \"#006064\",\n modelLabel: \"#37474f\",\n border: \"#b2dfdb\",\n aiBackground: \"#e0f2f1\",\n aiText: \"#263238\",\n aiBorder: \"#b2dfdb\",\n aiBubble: \"#ffffff\",\n memoryText: \"#37474f\",\n divider: \"#b2dfdb\",\n containerBackground: \"#e0f2f1\",\n },\n },\n },\n});\n","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-DF3D-6B964A\nconst __banditFingerprint_theme_neonThemets = 'BL-FP-8779EF-B7A1';\nconst __auditTrail_theme_neonThemets = 'BL-AU-MGOIKVW8-H00L';\n// File: neonTheme.ts | Path: src/theme/neonTheme.ts | Hash: df3db7a1\n\nimport { createTheme, ThemeOptions } from \"@mui/material/styles\";\n\nexport const neonDarkTheme: ThemeOptions = createTheme({\n typography: {\n fontFamily: '\"Orbitron\", \"Monaco\", \"Courier New\", monospace',\n fontSize: 14,\n subtitle1: { color: 'inherit', fontWeight: 600 },\n subtitle2: { color: 'inherit', fontWeight: 600 },\n h6: { color: 'inherit', fontWeight: 600 },\n },\n shape: { borderRadius: 8 },\n components: {\n MuiPaper: {\n styleOverrides: {\n root: { backgroundImage: 'none' },\n },\n },\n },\n palette: {\n mode: \"dark\",\n primary: {\n main: \"#ff0080\", // Hot pink neon\n light: \"#ff4da1\",\n dark: \"#cc0066\",\n },\n secondary: {\n main: \"#00ffff\", // Cyan neon\n light: \"#33ffff\",\n dark: \"#00cccc\",\n },\n background: {\n default: \"#0d0d0d\", // Deep black\n paper: \"#1a1a1a\",\n },\n text: {\n primary: \"#ffffff\",\n secondary: \"#ff0080\",\n },\n divider: \"#333333\",\n chat: {\n shell: \"#1a1a1a\",\n input: \"#1a1a1a\",\n badge: \"#ff0080\",\n badgeHover: \"#ff4da1\",\n file: \"#333333\",\n fileIcon: \"#00ffff\",\n fileText: \"#ffffff\",\n caption: \"#ff0080\",\n suggestion: {\n background: \"#1a1a1a\",\n text: \"#ffffff\",\n border: \"#ff0080\",\n hoverBackground: \"#333333\",\n hoverBorder: \"#00ffff\",\n },\n appBar: {\n background: \"linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%)\",\n border: \"#ff0080\",\n icon: \"#00ffff\",\n iconHover: \"#ff0080\",\n menuBackground: \"#1a1a1a\",\n menuText: \"#ffffff\",\n },\n response: {\n userBackground: \"#333333\",\n userText: \"#ffffff\",\n userBorder: \"#ff0080\",\n userBubble: \"#1a1a1a\",\n userAvatarBackground: \"#ff0080\",\n modelLabel: \"#ff0080\",\n border: \"#333333\",\n aiBackground: \"#0d0d0d\",\n aiText: \"#ffffff\",\n aiBorder: \"#333333\",\n aiBubble: \"#1a1a1a\",\n memoryText: \"#00ffff\",\n divider: \"#333333\",\n containerBackground: \"#0d0d0d\",\n },\n },\n },\n});\n\nexport const neonLightTheme: ThemeOptions = createTheme({\n typography: {\n fontFamily: '\"Orbitron\", \"Monaco\", \"Courier New\", monospace',\n fontSize: 14,\n subtitle1: { color: 'inherit', fontWeight: 600 },\n subtitle2: { color: 'inherit', fontWeight: 600 },\n h6: { color: 'inherit', fontWeight: 600 },\n },\n shape: { borderRadius: 8 },\n components: {\n MuiPaper: {\n styleOverrides: {\n root: { backgroundImage: 'none' },\n },\n },\n },\n palette: {\n mode: \"light\",\n primary: {\n main: \"#e91e63\", // Vibrant pink\n light: \"#f06292\",\n dark: \"#ad1457\",\n },\n secondary: {\n main: \"#00acc1\", // Vibrant cyan\n light: \"#26c6da\",\n dark: \"#00838f\",\n },\n background: {\n default: \"#f8f8f8\",\n paper: \"#ffffff\",\n },\n text: {\n primary: \"#212121\",\n secondary: \"#e91e63\",\n },\n divider: \"#e0e0e0\",\n chat: {\n shell: \"#ffffff\",\n input: \"#ffffff\",\n badge: \"#e91e63\",\n badgeHover: \"#ad1457\",\n file: \"#e0e0e0\",\n fileIcon: \"#00acc1\",\n fileText: \"#212121\",\n caption: \"#e91e63\",\n suggestion: {\n background: \"#ffffff\",\n text: \"#212121\",\n border: \"#e91e63\",\n hoverBackground: \"#f8f8f8\",\n hoverBorder: \"#00acc1\",\n },\n appBar: {\n background: \"linear-gradient(135deg, #f8f8f8 0%, #ffffff 100%)\",\n border: \"#e91e63\",\n icon: \"#00acc1\",\n iconHover: \"#e91e63\",\n menuBackground: \"#ffffff\",\n menuText: \"#212121\",\n },\n response: {\n userBackground: \"#f8f8f8\",\n userText: \"#212121\",\n userBorder: \"#e91e63\",\n userBubble: \"#ffffff\",\n userAvatarBackground: \"#e91e63\",\n modelLabel: \"#e91e63\",\n border: \"#e0e0e0\",\n aiBackground: \"#f8f8f8\",\n aiText: \"#212121\",\n aiBorder: \"#e0e0e0\",\n aiBubble: \"#ffffff\",\n memoryText: \"#00acc1\",\n divider: \"#e0e0e0\",\n containerBackground: \"#f8f8f8\",\n },\n },\n },\n});\n","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-8607-A06051\nconst __banditFingerprint_theme_forestThemets = 'BL-FP-CD7FFA-4820';\nconst __auditTrail_theme_forestThemets = 'BL-AU-MGOIKVW7-EKGV';\n// File: forestTheme.ts | Path: src/theme/forestTheme.ts | Hash: 86074820\n\nimport { createTheme, ThemeOptions } from \"@mui/material/styles\";\n\nexport const forestDarkTheme: ThemeOptions = createTheme({\n typography: {\n fontFamily: '\"Source Sans Pro\", \"Roboto\", \"Helvetica\", \"Arial\", sans-serif',\n fontSize: 14,\n // Fix subtitle and heading variants for better contrast\n subtitle1: {\n color: 'inherit',\n fontWeight: 600,\n },\n subtitle2: {\n color: 'inherit',\n fontWeight: 600,\n },\n h6: {\n color: 'inherit',\n fontWeight: 600,\n },\n },\n shape: {\n borderRadius: 8,\n },\n components: {\n MuiPaper: {\n styleOverrides: {\n root: {\n backgroundImage: 'none',\n },\n },\n },\n },\n palette: {\n mode: \"dark\",\n primary: {\n main: \"#4caf50\", // Forest green\n light: \"#6fbf73\",\n dark: \"#357a38\",\n },\n secondary: {\n main: \"#8bc34a\", // Light green\n light: \"#a2cf6e\",\n dark: \"#618833\",\n },\n background: {\n default: \"#1b2e20\", // Deep forest\n paper: \"#2c4332\",\n },\n text: {\n primary: \"#e8f5e8\",\n secondary: \"#c8e6c9\",\n },\n divider: \"#4caf50\",\n chat: {\n shell: \"#2c4332\",\n input: \"#2c4332\", \n badge: \"#4caf50\",\n badgeHover: \"#6fbf73\",\n file: \"#388e3c\",\n fileIcon: \"#8bc34a\",\n fileText: \"#e8f5e8\",\n caption: \"#c8e6c9\",\n suggestion: {\n background: \"#2c4332\",\n text: \"#e8f5e8\",\n border: \"#4caf50\",\n hoverBackground: \"#388e3c\",\n hoverBorder: \"#8bc34a\",\n },\n appBar: {\n background: \"linear-gradient(135deg, #1b2e20 0%, #2c4332 100%)\",\n border: \"#4caf50\",\n icon: \"#8bc34a\",\n iconHover: \"#4caf50\",\n menuBackground: \"#2c4332\",\n menuText: \"#e8f5e8\",\n },\n response: {\n userBackground: \"#388e3c\",\n userText: \"#e8f5e8\",\n userBorder: \"#4caf50\",\n userBubble: \"#2c4332\",\n userAvatarBackground: \"#4caf50\",\n modelLabel: \"#c8e6c9\",\n border: \"#388e3c\",\n aiBackground: \"#1b2e20\",\n aiText: \"#e8f5e8\",\n aiBorder: \"#388e3c\",\n aiBubble: \"#2c4332\",\n memoryText: \"#c8e6c9\",\n divider: \"#388e3c\",\n containerBackground: \"#1b2e20\",\n },\n },\n },\n});\n\nexport const forestLightTheme: ThemeOptions = createTheme({\n typography: {\n fontFamily: '\"Source Sans Pro\", \"Roboto\", \"Helvetica\", \"Arial\", sans-serif',\n fontSize: 14,\n // Fix subtitle and heading variants for better contrast\n subtitle1: {\n color: 'inherit',\n fontWeight: 600,\n },\n subtitle2: {\n color: 'inherit',\n fontWeight: 600,\n },\n h6: {\n color: 'inherit',\n fontWeight: 600,\n },\n },\n shape: {\n borderRadius: 8,\n },\n components: {\n MuiPaper: {\n styleOverrides: {\n root: {\n backgroundImage: 'none',\n },\n },\n },\n },\n palette: {\n mode: \"light\",\n primary: {\n main: \"#2e7d32\", // Deep green\n light: \"#4caf50\",\n dark: \"#1b5e20\",\n },\n secondary: {\n main: \"#66bb6a\", // Medium green\n light: \"#81c784\",\n dark: \"#4caf50\",\n },\n background: {\n default: \"#f1f8e9\", // Very light green\n paper: \"#ffffff\",\n },\n text: {\n primary: \"#1b5e20\",\n secondary: \"#2e7d32\",\n },\n divider: \"#c8e6c9\",\n chat: {\n shell: \"#ffffff\",\n input: \"#ffffff\",\n badge: \"#2e7d32\",\n badgeHover: \"#1b5e20\",\n file: \"#c8e6c9\",\n fileIcon: \"#2e7d32\",\n fileText: \"#1b5e20\",\n caption: \"#2e7d32\",\n suggestion: {\n background: \"#ffffff\",\n text: \"#1b5e20\",\n border: \"#c8e6c9\",\n hoverBackground: \"#f1f8e9\",\n hoverBorder: \"#2e7d32\",\n },\n appBar: {\n background: \"linear-gradient(135deg, #f1f8e9 0%, #ffffff 100%)\",\n border: \"#c8e6c9\",\n icon: \"#2e7d32\",\n iconHover: \"#1b5e20\",\n menuBackground: \"#ffffff\",\n menuText: \"#1b5e20\",\n },\n response: {\n userBackground: \"#c8e6c9\",\n userText: \"#1b5e20\",\n userBorder: \"#2e7d32\",\n userBubble: \"#ffffff\",\n userAvatarBackground: \"#2e7d32\",\n modelLabel: \"#2e7d32\",\n border: \"#c8e6c9\",\n aiBackground: \"#f1f8e9\",\n aiText: \"#1b5e20\",\n aiBorder: \"#c8e6c9\",\n aiBubble: \"#ffffff\",\n memoryText: \"#2e7d32\",\n divider: \"#c8e6c9\",\n containerBackground: \"#f1f8e9\",\n },\n },\n },\n});\n","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-2FB5-9FBAFE\nconst __banditFingerprint_theme_sunsetThemets = 'BL-FP-24A802-D6E1';\nconst __auditTrail_theme_sunsetThemets = 'BL-AU-MGOIKVW8-OQ60';\n// File: sunsetTheme.ts | Path: src/theme/sunsetTheme.ts | Hash: 2fb5d6e1\n\nimport { createTheme, ThemeOptions } from \"@mui/material/styles\";\n\nexport const sunsetDarkTheme: ThemeOptions = createTheme({\n typography: {\n fontFamily: '\"Playfair Display\", \"Georgia\", \"Times New Roman\", serif',\n fontSize: 14,\n subtitle1: { color: 'inherit', fontWeight: 600 },\n subtitle2: { color: 'inherit', fontWeight: 600 },\n h6: { color: 'inherit', fontWeight: 600 },\n },\n shape: { borderRadius: 8 },\n components: {\n MuiPaper: {\n styleOverrides: {\n root: { backgroundImage: 'none' },\n },\n },\n },\n palette: {\n mode: \"dark\",\n primary: {\n main: \"#ff6f00\", // Deep orange\n light: \"#ff8f33\",\n dark: \"#e65100\",\n },\n secondary: {\n main: \"#ff5722\", // Red orange\n light: \"#ff7043\",\n dark: \"#d84315\",\n },\n background: {\n default: \"#2a1c12\", // Lighter default background\n paper: \"#3d2b1e\", // Lighter paper background\n },\n text: {\n primary: \"#fff3e0\",\n secondary: \"#ffcc02\",\n },\n divider: \"#bf360c\",\n chat: {\n shell: \"#2d1b14\",\n input: \"#2d1b14\", // Changed from light text color to proper dark background\n badge: \"#ff6f00\",\n badgeHover: \"#ff8f33\",\n file: \"#bf360c\",\n fileIcon: \"#ffcc02\",\n fileText: \"#fff3e0\",\n caption: \"#ffcc02\",\n suggestion: {\n background: \"#3d2b1e\", // Lighter background for better readability\n text: \"#fff3e0\",\n border: \"#ff6f00\",\n hoverBackground: \"#4d3b2e\", // Even lighter on hover\n hoverBorder: \"#ffcc02\",\n },\n appBar: {\n background: \"linear-gradient(135deg, #2a1c12 0%, #3d2b1e 100%)\", // Lighter gradient\n border: \"#ff6f00\",\n icon: \"#ffcc02\",\n iconHover: \"#ff6f00\",\n menuBackground: \"#3d2b1e\", // Lighter menu background\n menuText: \"#fff3e0\",\n },\n response: {\n userBackground: \"#bf360c\",\n userText: \"#fff3e0\",\n userBorder: \"#ff6f00\",\n userBubble: \"#3d2b1e\", // Lighter bubble background\n userAvatarBackground: \"#ff6f00\",\n modelLabel: \"#ffcc02\",\n border: \"#bf360c\",\n aiBackground: \"#2a1c12\", // Slightly lighter AI background\n aiText: \"#fff3e0\",\n aiBorder: \"#bf360c\",\n aiBubble: \"#3d2b1e\", // Lighter bubble background\n memoryText: \"#ffcc02\",\n divider: \"#bf360c\",\n containerBackground: \"#2a1c12\", // Slightly lighter container background\n },\n },\n },\n});\n\nexport const sunsetLightTheme: ThemeOptions = createTheme({\n typography: {\n fontFamily: '\"Playfair Display\", \"Georgia\", \"Times New Roman\", serif',\n fontSize: 14,\n subtitle1: { color: 'inherit', fontWeight: 600 },\n subtitle2: { color: 'inherit', fontWeight: 600 },\n h6: { color: 'inherit', fontWeight: 600 },\n },\n shape: { borderRadius: 8 },\n components: {\n MuiPaper: {\n styleOverrides: {\n root: { backgroundImage: 'none' },\n },\n },\n },\n palette: {\n mode: \"light\",\n primary: {\n main: \"#e65100\", // Orange\n light: \"#ff6f00\",\n dark: \"#bf360c\",\n },\n secondary: {\n main: \"#ff9800\", // Amber\n light: \"#ffa726\",\n dark: \"#f57c00\",\n },\n background: {\n default: \"#fff8f3\", // Very light orange\n paper: \"#ffffff\",\n },\n text: {\n primary: \"#bf360c\",\n secondary: \"#e65100\",\n },\n divider: \"#ffcc80\",\n chat: {\n shell: \"#ffffff\",\n input: \"#bf360c\",\n badge: \"#e65100\",\n badgeHover: \"#bf360c\",\n file: \"#ffcc80\",\n fileIcon: \"#e65100\",\n fileText: \"#bf360c\",\n caption: \"#e65100\",\n suggestion: {\n background: \"#ffffff\",\n text: \"#bf360c\",\n border: \"#ffcc80\",\n hoverBackground: \"#fff8f3\",\n hoverBorder: \"#e65100\",\n },\n appBar: {\n background: \"linear-gradient(135deg, #fff8f3 0%, #ffffff 100%)\",\n border: \"#ffcc80\",\n icon: \"#e65100\",\n iconHover: \"#bf360c\",\n menuBackground: \"#ffffff\",\n menuText: \"#bf360c\",\n },\n response: {\n userBackground: \"#ffcc80\",\n userText: \"#bf360c\",\n userBorder: \"#e65100\",\n userBubble: \"#ffffff\",\n userAvatarBackground: \"#e65100\",\n modelLabel: \"#e65100\",\n border: \"#ffcc80\",\n aiBackground: \"#fff8f3\",\n aiText: \"#bf360c\",\n aiBorder: \"#ffcc80\",\n aiBubble: \"#ffffff\",\n memoryText: \"#e65100\",\n divider: \"#ffcc80\",\n containerBackground: \"#fff8f3\",\n },\n },\n },\n});\n","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-A3A4-E272F3\nconst __banditFingerprint_theme_volcanicThemets = 'BL-FP-70BB83-F816';\nconst __auditTrail_theme_volcanicThemets = 'BL-AU-MGOIKVW9-OKGG';\n// File: volcanicTheme.ts | Path: src/theme/volcanicTheme.ts | Hash: a3a4f816\n\nimport { createTheme, ThemeOptions } from \"@mui/material/styles\";\n\nexport const volcanicDarkTheme: ThemeOptions = createTheme({\n typography: {\n fontFamily: '\"Rajdhani\", \"Roboto Condensed\", \"Arial\", sans-serif',\n fontSize: 14,\n subtitle1: { color: 'inherit', fontWeight: 600 },\n subtitle2: { color: 'inherit', fontWeight: 600 },\n h6: { color: 'inherit', fontWeight: 600 },\n },\n shape: { borderRadius: 8 },\n components: {\n MuiPaper: {\n styleOverrides: {\n root: { backgroundImage: 'none' },\n },\n },\n },\n palette: {\n mode: \"dark\",\n primary: {\n main: \"#d32f2f\", // Lava red\n light: \"#f44336\",\n dark: \"#b71c1c\",\n },\n secondary: {\n main: \"#ff5722\", // Magma orange\n light: \"#ff7043\",\n dark: \"#e64a19\",\n },\n background: {\n default: \"#0f0f0f\", // Volcanic ash dark\n paper: \"#1c1c1c\",\n },\n text: {\n primary: \"#ffebee\",\n secondary: \"#ffcdd2\",\n },\n divider: \"#424242\",\n chat: {\n shell: \"#1c1c1c\",\n input: \"#1c1c1c\", \n badge: \"#d32f2f\",\n badgeHover: \"#f44336\",\n file: \"#424242\",\n fileIcon: \"#ff5722\",\n fileText: \"#ffebee\",\n caption: \"#ffcdd2\",\n suggestion: {\n background: \"#1c1c1c\",\n text: \"#ffebee\",\n border: \"#d32f2f\",\n hoverBackground: \"#424242\",\n hoverBorder: \"#ff5722\",\n },\n appBar: {\n background: \"linear-gradient(135deg, #0f0f0f 0%, #1c1c1c 100%)\",\n border: \"#d32f2f\",\n icon: \"#ff5722\",\n iconHover: \"#d32f2f\",\n menuBackground: \"#1c1c1c\",\n menuText: \"#ffebee\",\n },\n response: {\n userBackground: \"#424242\",\n userText: \"#ffebee\",\n userBorder: \"#d32f2f\",\n userBubble: \"#1c1c1c\",\n userAvatarBackground: \"#d32f2f\",\n modelLabel: \"#ffcdd2\",\n border: \"#424242\",\n aiBackground: \"#0f0f0f\",\n aiText: \"#ffebee\",\n aiBorder: \"#424242\",\n aiBubble: \"#1c1c1c\",\n memoryText: \"#ffcdd2\",\n divider: \"#424242\",\n containerBackground: \"#0f0f0f\",\n },\n },\n },\n});\n\nexport const volcanicLightTheme: ThemeOptions = createTheme({\n typography: {\n fontFamily: '\"Rajdhani\", \"Roboto Condensed\", \"Arial\", sans-serif',\n fontSize: 14,\n subtitle1: { color: 'inherit', fontWeight: 600 },\n subtitle2: { color: 'inherit', fontWeight: 600 },\n h6: { color: 'inherit', fontWeight: 600 },\n },\n shape: { borderRadius: 8 },\n components: {\n MuiPaper: {\n styleOverrides: {\n root: { backgroundImage: 'none' },\n },\n },\n },\n palette: {\n mode: \"light\",\n primary: {\n main: \"#c62828\", // Deep red\n light: \"#d32f2f\",\n dark: \"#b71c1c\",\n },\n secondary: {\n main: \"#e64a19\", // Orange red\n light: \"#ff5722\",\n dark: \"#d84315\",\n },\n background: {\n default: \"#fafafa\", // Light gray\n paper: \"#ffffff\",\n },\n text: {\n primary: \"#212121\",\n secondary: \"#424242\",\n },\n divider: \"#e0e0e0\",\n chat: {\n shell: \"#ffffff\",\n input: \"#ffffff\",\n badge: \"#c62828\",\n badgeHover: \"#b71c1c\",\n file: \"#e0e0e0\",\n fileIcon: \"#c62828\",\n fileText: \"#212121\",\n caption: \"#424242\",\n suggestion: {\n background: \"#ffffff\",\n text: \"#212121\",\n border: \"#e0e0e0\",\n hoverBackground: \"#fafafa\",\n hoverBorder: \"#c62828\",\n },\n appBar: {\n background: \"linear-gradient(135deg, #fafafa 0%, #ffffff 100%)\",\n border: \"#e0e0e0\",\n icon: \"#c62828\",\n iconHover: \"#b71c1c\",\n menuBackground: \"#ffffff\",\n menuText: \"#212121\",\n },\n response: {\n userBackground: \"#ffebee\",\n userText: \"#212121\",\n userBorder: \"#c62828\",\n userBubble: \"#ffffff\",\n userAvatarBackground: \"#c62828\",\n modelLabel: \"#424242\",\n border: \"#e0e0e0\",\n aiBackground: \"#fafafa\",\n aiText: \"#212121\",\n aiBorder: \"#e0e0e0\",\n aiBubble: \"#ffffff\",\n memoryText: \"#424242\",\n divider: \"#e0e0e0\",\n containerBackground: \"#fafafa\",\n },\n },\n },\n});\n","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-6375-0AA470\nconst __banditFingerprint_theme_themeMapts = 'BL-FP-6535FA-7567';\nconst __auditTrail_theme_themeMapts = 'BL-AU-MGOIKVW8-4O6Q';\n// File: themeMap.ts | Path: src/theme/themeMap.ts | Hash: 63757567\n\nimport { banditDarkTheme, banditLightTheme } from \"./banditTheme\";\nimport { corporateDarkTheme, corporateLightTheme } from \"./corporateTheme\";\nimport { neutralDarkTheme, neutralLightTheme } from \"./neutralTheme\";\nimport { cyberPunkDarkTheme, cyberPunkLightTheme } from \"./cyberPunkTheme\";\nimport { dawnDarkTheme, dawnLightTheme } from \"./dawnTheme\";\nimport { mistDarkTheme, mistLightTheme } from \"./mistTheme\";\nimport { sageDarkTheme, sageLightTheme } from \"./sageTheme\";\nimport { stoneDarkTheme, stoneLightTheme } from \"./stoneTheme\";\nimport { oceanDarkTheme, oceanLightTheme } from \"./oceanTheme\";\nimport { neonDarkTheme, neonLightTheme } from \"./neonTheme\";\nimport { forestDarkTheme, forestLightTheme } from \"./forestTheme\";\nimport { sunsetDarkTheme, sunsetLightTheme } from \"./sunsetTheme\";\nimport { volcanicDarkTheme, volcanicLightTheme } from \"./volcanicTheme\";\nimport { Theme } from \"@mui/material\";\n\ntype ThemeRegistry = Record<string, Theme>;\n\nconst themeMap: ThemeRegistry = {\n \"bandit-dark\": banditDarkTheme,\n \"bandit-light\": banditLightTheme,\n \"corporate-dark\": corporateDarkTheme,\n \"corporate-light\": corporateLightTheme,\n \"neutral-dark\": neutralDarkTheme,\n \"neutral-light\": neutralLightTheme,\n \"cyber-dark\": cyberPunkDarkTheme,\n \"cyber-light\": cyberPunkLightTheme,\n \"dawn-dark\": dawnDarkTheme,\n \"dawn-light\": dawnLightTheme,\n \"mist-dark\": mistDarkTheme,\n \"mist-light\": mistLightTheme,\n \"sage-dark\": sageDarkTheme,\n \"sage-light\": sageLightTheme,\n \"stone-dark\": stoneDarkTheme,\n \"stone-light\": stoneLightTheme,\n \"ocean-dark\": oceanDarkTheme,\n \"ocean-light\": oceanLightTheme,\n \"neon-dark\": neonDarkTheme,\n \"neon-light\": neonLightTheme,\n \"forest-dark\": forestDarkTheme,\n \"forest-light\": forestLightTheme,\n \"sunset-dark\": sunsetDarkTheme,\n \"sunset-light\": sunsetLightTheme,\n \"volcanic-dark\": volcanicDarkTheme,\n \"volcanic-light\": volcanicLightTheme,\n };\n\n export const predefinedThemes: Record<string, Theme & { name: string }> = {\n \"bandit-dark\": {\n name: \"bandit-dark\",\n ...banditDarkTheme,\n },\n \"bandit-light\": {\n name: \"bandit-light\",\n ...banditLightTheme,\n },\n \"corporate-dark\": {\n name: \"corporate-dark\",\n ...corporateDarkTheme,\n },\n \"corporate-light\": {\n name: \"corporate-light\",\n ...corporateLightTheme,\n },\n \"neutral-dark\": {\n name: \"neutral-dark\",\n ...neutralDarkTheme,\n },\n \"neutral-light\": {\n name: \"neutral-light\",\n ...neutralLightTheme,\n },\n \"cyber-dark\": {\n name: \"cyber-dark\",\n ...cyberPunkDarkTheme,\n },\n \"cyber-light\": {\n name: \"cyber-light\",\n ...cyberPunkLightTheme,\n },\n \"dawn-dark\": {\n name: \"dawn-dark\",\n ...dawnDarkTheme,\n },\n \"dawn-light\": {\n name: \"dawn-light\",\n ...dawnLightTheme,\n },\n \"mist-dark\": {\n name: \"mist-dark\",\n ...mistDarkTheme,\n },\n \"mist-light\": {\n name: \"mist-light\",\n ...mistLightTheme,\n },\n \"sage-dark\": {\n name: \"sage-dark\",\n ...sageDarkTheme,\n },\n \"sage-light\": {\n name: \"sage-light\",\n ...sageLightTheme,\n },\n \"stone-dark\": {\n name: \"stone-dark\",\n ...stoneDarkTheme,\n },\n \"stone-light\": {\n name: \"stone-light\",\n ...stoneLightTheme,\n },\n \"ocean-dark\": {\n name: \"ocean-dark\",\n ...oceanDarkTheme,\n },\n \"ocean-light\": {\n name: \"ocean-light\",\n ...oceanLightTheme,\n },\n \"neon-dark\": {\n name: \"neon-dark\",\n ...neonDarkTheme,\n },\n \"neon-light\": {\n name: \"neon-light\",\n ...neonLightTheme,\n },\n \"forest-dark\": {\n name: \"forest-dark\",\n ...forestDarkTheme,\n },\n \"forest-light\": {\n name: \"forest-light\",\n ...forestLightTheme,\n },\n \"sunset-dark\": {\n name: \"sunset-dark\",\n ...sunsetDarkTheme,\n },\n \"sunset-light\": {\n name: \"sunset-light\",\n ...sunsetLightTheme,\n },\n \"volcanic-dark\": {\n name: \"volcanic-dark\",\n ...volcanicDarkTheme,\n },\n \"volcanic-light\": {\n name: \"volcanic-light\",\n ...volcanicLightTheme,\n },\n };\n\n export default themeMap;\n","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-2EDD-8CF0D8\nconst __banditFingerprint_feedback_FeedbackButtontsx = 'BL-FP-CF95AD-701C';\nconst __auditTrail_feedback_FeedbackButtontsx = 'BL-AU-MGOIKVV9-IZZG';\n// File: FeedbackButton.tsx | Path: src/components/feedback/FeedbackButton.tsx | Hash: 2edd701c\n\nimport React, { useState } from 'react';\nimport {\n Fab,\n Tooltip,\n useTheme,\n Zoom,\n Button,\n IconButton,\n} from '@mui/material';\nimport { MessageCircle as FeedbackIcon } from 'lucide-react';\nimport { FeedbackModal } from './index';\n\nexport interface FeedbackButtonProps {\n /** Whether the parent component is in fullscreen mode */\n fullScreen?: boolean;\n /** Additional CSS classes */\n className?: string;\n /** Z-index override */\n zIndex?: number;\n /** Custom feedback email (overrides package settings) */\n feedbackEmail?: string;\n /** Show as inline button instead of floating */\n inline?: boolean;\n /** Custom button text for inline mode */\n buttonText?: string;\n /** Custom size */\n size?: 'small' | 'medium' | 'large';\n /** Custom positioning */\n position?: {\n bottom?: number | string;\n right?: number | string;\n top?: number | string;\n left?: number | string;\n };\n /** Use absolute positioning instead of fixed (for modal contexts) */\n absolute?: boolean;\n}\n\nexport const FeedbackButton: React.FC<FeedbackButtonProps> = ({\n fullScreen = false,\n className,\n zIndex = 1400,\n feedbackEmail,\n inline = false,\n buttonText = \"Send Feedback\",\n size = 'small',\n position,\n absolute = false,\n}) => {\n const theme = useTheme();\n const [open, setOpen] = useState(false);\n\n const handleOpen = () => setOpen(true);\n const handleClose = () => setOpen(false);\n\n // If inline mode, render as a regular button\n if (inline) {\n return (\n <>\n {buttonText ? (\n <Button\n variant=\"outlined\"\n startIcon={<FeedbackIcon />}\n onClick={handleOpen}\n className={className}\n size={size}\n sx={{\n borderRadius: 2,\n textTransform: 'none',\n '&:hover': {\n transform: 'translateY(-1px)',\n boxShadow: theme.shadows[4],\n },\n }}\n >\n {buttonText}\n </Button>\n ) : (\n <Tooltip title=\"Send Feedback\" arrow>\n <IconButton\n onClick={handleOpen}\n className={className}\n size={size}\n sx={{\n color: theme.palette.primary.main,\n borderRadius: 2,\n transition: 'all 0.2s ease',\n '&:hover': {\n bgcolor: theme.palette.primary.main + '15',\n transform: 'translateY(-1px)',\n },\n }}\n >\n <FeedbackIcon />\n </IconButton>\n </Tooltip>\n )}\n\n <FeedbackModal \n open={open} \n onClose={handleClose}\n feedbackEmail={feedbackEmail}\n />\n </>\n );\n }\n\n // Floating FAB mode\n return (\n <>\n <Zoom in={true} timeout={300}>\n <Tooltip \n title=\"Send Feedback\" \n placement=\"left\"\n arrow\n >\n <Fab\n size={size}\n onClick={handleOpen}\n className={className}\n sx={{\n position: absolute ? 'absolute' : 'relative',\n ...(absolute && {\n bottom: position?.bottom ?? (fullScreen ? 16 : 20),\n right: position?.right ?? 16,\n top: position?.top,\n left: position?.left,\n }),\n zIndex,\n bgcolor: theme.palette.primary.main,\n color: theme.palette.primary.contrastText,\n boxShadow: theme.palette.mode === 'dark' \n ? '0 8px 32px rgba(0,0,0,0.4)' \n : '0 8px 32px rgba(0,0,0,0.15)',\n border: `1px solid ${theme.palette.divider}`,\n transition: 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)',\n '&:hover': {\n bgcolor: theme.palette.primary.dark,\n transform: 'scale(1.05) translateY(-2px)',\n boxShadow: theme.palette.mode === 'dark' \n ? '0 12px 40px rgba(0,0,0,0.5)' \n : '0 12px 40px rgba(0,0,0,0.2)',\n },\n '&:active': {\n transform: 'scale(0.98) translateY(0px)',\n },\n // Subtle pulsing animation\n animation: 'feedbackPulse 3s ease-in-out infinite',\n '@keyframes feedbackPulse': {\n '0%, 100%': {\n boxShadow: theme.palette.mode === 'dark' \n ? '0 8px 32px rgba(0,0,0,0.4)' \n : '0 8px 32px rgba(0,0,0,0.15)',\n },\n '50%': {\n boxShadow: theme.palette.mode === 'dark' \n ? `0 8px 32px ${theme.palette.primary.main}40` \n : `0 8px 32px ${theme.palette.primary.main}30`,\n },\n },\n }}\n >\n <FeedbackIcon />\n </Fab>\n </Tooltip>\n </Zoom>\n\n <FeedbackModal \n open={open} \n onClose={handleClose}\n feedbackEmail={feedbackEmail}\n />\n </>\n );\n};\n","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-3604-B82856\nconst __banditFingerprint_hooks_useNotificationServicets = 'BL-FP-2EDB4B-6C09';\nconst __auditTrail_hooks_useNotificationServicets = 'BL-AU-MGOIKVVF-JFD2';\n// File: useNotificationService.ts | Path: src/hooks/useNotificationService.ts | Hash: 36046c09\n\nimport { useEffect } from 'react';\nimport { useNotification } from '../shared/components/NotificationProvider';\nimport { notificationService } from '../services/notification/notificationService';\n\n/**\n * Hook to initialize and use the notification service\n * This should be called once near the root of your component tree\n */\nexport const useNotificationService = () => {\n const notificationContext = useNotification();\n\n useEffect(() => {\n // Initialize the global notification service with the context\n notificationService.setContext(notificationContext);\n }, [notificationContext]);\n\n return {\n ...notificationContext,\n // Also expose the service methods for direct use\n handleHttpError: notificationService.handleHttpError.bind(notificationService),\n handleNetworkError: notificationService.handleNetworkError.bind(notificationService),\n handleValidationError: notificationService.handleValidationError.bind(notificationService),\n };\n};\n","/*\n © 2025 Burtson Labs — Licensed under Business Source License 1.1\n https://burtson.ai/license\n\n This file is protected intellectual property.\n Do NOT use in commercial software, prompts, AI training data, or derivative works without a valid commercial license.\n\n 🚫 AI NOTICE: This file contains visible and invisible watermarks.\n ⚖️ VIOLATION NOTICE: Removing, modifying, or obscuring these watermarks is a license violation.\n 🔒 LICENSE TERMINATION: Upon license termination, ALL forks, copies, and derivatives must be permanently deleted.\n 📋 AUDIT TRAIL: File usage is logged and monitored for compliance verification.\n*/\n\n// Bandit Engine Watermark: BL-WM-E2F1-C79818\nconst __banditFingerprint_chat_memorymodaltsx = 'BL-FP-F532AD-BDE7';\nconst __auditTrail_chat_memorymodaltsx = 'BL-AU-MGOIKVV3-DWCK';\n// File: memory-modal.tsx | Path: src/chat/memory-modal.tsx | Hash: e2f1bde7\n\nimport React, { useState, useEffect } from \"react\";\nimport { useTheme, alpha, keyframes } from \"@mui/material/styles\";\nimport {\n Box,\n Typography,\n Modal,\n SwipeableDrawer,\n IconButton,\n TextField,\n Button,\n List,\n ListItem,\n Divider,\n Tabs,\n Tab,\n Tooltip,\n Dialog,\n DialogTitle,\n DialogContent,\n DialogActions,\n Avatar,\n Radio,\n RadioGroup,\n FormControlLabel,\n FormControl,\n useMediaQuery,\n} from \"@mui/material\";\nimport { useMemoryStore } from \"../store/memoryStore\";\nimport { useVectorStore } from \"../hooks/useVectorStore\";\nimport { useConversationSyncStore } from \"../store/conversationSyncStore\";\nimport { debugLogger } from \"../services/logging/debugLogger\";\nimport {\n CloudSyncIcon,\n CloseIcon,\n DeleteIcon,\n PushPinIcon,\n PushPinOutlinedIcon,\n} from \"../icons/lucide-icons\";\n\ninterface MemoryModalProps {\n open: boolean;\n onClose: () => void;\n}\n\ntype VectorMemory = {\n id: string;\n content: string;\n source?: \"user\" | \"auto\" | string;\n pinned?: boolean;\n uploadedAt?: string | number | Date;\n tags?: string[];\n [key: string]: unknown;\n};\n\ntype ImportResultDetails = {\n totalMemories: number;\n successCount: number;\n failureCount: number;\n duration?: string;\n warnings?: string[];\n};\n\ntype ImportResult = {\n success: boolean;\n message?: string;\n details?: ImportResultDetails;\n};\n\ntype ImportProgress = {\n isImporting: boolean;\n progress: string;\n result?: ImportResult;\n};\n\n/**\n * Bandit Memory Modal\n *\n * - Displays user and auto memories.\n * - Supports editing, pinning, deleting, and adding new memories.\n * - Memory-aware layout adapts to mobile virtual keyboards.\n * - Shows pinned memory token budget in real-time.\n */\nconst MemoryModal: React.FC<MemoryModalProps> = ({ open, onClose }) => {\n const { entries, addMemory, togglePinMemory, removeMemory, clearMemories, hydrate, _hasHydrated } = useMemoryStore();\n const isAdvancedVectorFeaturesEnabled = useConversationSyncStore(\n (state) => state.isAdvancedVectorFeaturesEnabled\n );\n const { \n isVectorEnabled, \n addMemory: addVectorMemory, \n batchCreateMemories,\n batchCreateMemoriesAdvanced,\n batchImportMemories,\n getUserMemories: getVectorMemories,\n deleteMemory: deleteVectorMemory,\n updateMemory: updateVectorMemory\n } = useVectorStore();\n \n // Check if vector should be used for memories\n const shouldUseVectorForMemories = isVectorEnabled && isAdvancedVectorFeaturesEnabled;\n \n // Debug preferences on modal open\n useEffect(() => {\n if (open) {\n debugLogger.memoryDebug(\"Memory modal opened\", {\n isVectorEnabled,\n isAdvancedVectorFeaturesEnabled,\n shouldUseVectorForMemories,\n });\n }\n }, [open, isVectorEnabled, isAdvancedVectorFeaturesEnabled, shouldUseVectorForMemories]);\n \n const [newMemory, setNewMemory] = useState(\"\");\n const [selectedTab, setSelectedTab] = useState<\"auto\" | \"user\">(\"user\"); // Always default to user\n const [editingId, setEditingId] = useState<string | null>(null);\n const [editedContent, setEditedContent] = useState(\"\");\n const [multiSelectMode, setMultiSelectMode] = useState(false);\n const [selectedIds, setSelectedIds] = useState<string[]>([]);\n const [confirmOpen, setConfirmOpen] = useState(false);\n const [clearAllOpen, setClearAllOpen] = useState(false);\n const [clearOption, setClearOption] = useState<\"user\" | \"auto\" | \"both\">(\"both\");\n const [vectorMemories, setVectorMemories] = useState<VectorMemory[]>([]);\n const [bulkImportOpen, setBulkImportOpen] = useState(false);\n const [importProgress, setImportProgress] = useState<ImportProgress>({\n isImporting: false,\n progress: \"\",\n });\n\n const theme = useTheme();\n const isMobileView = useMediaQuery(theme.breakpoints.down(\"sm\"));\n \n // Define pulse animation\n const pulse = keyframes`\n 0% {\n opacity: 1;\n transform: scale(1);\n }\n 50% {\n opacity: 0.7;\n transform: scale(1.1);\n }\n 100% {\n opacity: 1;\n transform: scale(1);\n }\n `;\n\n // Define shimmer animation\n const shimmer = keyframes`\n 0% {\n left: -100%;\n }\n 100% {\n left: 100%;\n }\n `;\n\n const {\n shell,\n input,\n fileText,\n appBar,\n badge,\n badgeHover,\n } = theme.palette.chat;\n\n const handleAdd = async () => {\n if (newMemory.trim()) {\n if (shouldUseVectorForMemories) {\n try {\n await addVectorMemory(newMemory.trim());\n // Refresh vector memories list\n const memories = await getVectorMemories();\n setVectorMemories((memories ?? []) as VectorMemory[]);\n } catch (error) {\n debugLogger.error(\"Failed to add vector memory\", { error });\n // Fallback to local store\n await addMemory(newMemory.trim(), [], \"user\");\n }\n } else {\n await addMemory(newMemory.trim(), [], \"user\");\n }\n setNewMemory(\"\");\n }\n };\n\n // Load vector memories when modal opens and vector is enabled\n useEffect(() => {\n if (open && shouldUseVectorForMemories) {\n const loadVectorMemories = async () => {\n try {\n const memories = await getVectorMemories();\n debugLogger.memoryDebug(\"Vector memories loaded\", {\n count: memories?.length || 0,\n isArray: Array.isArray(memories),\n });\n setVectorMemories((memories ?? []) as VectorMemory[]);\n } catch (error) {\n debugLogger.error(\"Failed to load vector memories\", { error });\n setVectorMemories([]);\n }\n };\n loadVectorMemories();\n }\n }, [open, shouldUseVectorForMemories, getVectorMemories]);\n\n // Load local memories when modal opens and vector is disabled\n useEffect(() => {\n if (open && !shouldUseVectorForMemories) {\n const loadLocalMemories = async () => {\n try {\n await hydrate();\n } catch (error) {\n debugLogger.error(\"Failed to load local memories\", { error });\n }\n };\n loadLocalMemories();\n }\n }, [open, shouldUseVectorForMemories, hydrate]);\n\n // Also hydrate on initial mount to ensure memories are always loaded\n useEffect(() => {\n if (!shouldUseVectorForMemories && !_hasHydrated) {\n const initialHydrate = async () => {\n try {\n await hydrate();\n } catch (error) {\n debugLogger.error(\"Failed to perform initial hydration\", { error });\n }\n };\n initialHydrate();\n }\n }, [shouldUseVectorForMemories, _hasHydrated, hydrate]);\n\n const handleMultiDelete = async () => {\n if (selectedIds.length === 0) return;\n \n // Use the working single delete function in a loop\n let successCount = 0;\n let errorCount = 0;\n \n for (const id of selectedIds) {\n try {\n await handleDeleteMemory(id);\n successCount++;\n \n // Add a small delay to avoid overwhelming the API\n await new Promise(resolve => setTimeout(resolve, 100));\n } catch (error) {\n debugLogger.error(\"Failed to delete memory during bulk delete\", { id, error });\n errorCount++;\n }\n }\n \n setSelectedIds([]);\n setMultiSelectMode(false);\n setConfirmOpen(false);\n };\n\n const handleMultiPin = async (pinned: boolean) => {\n debugLogger.memoryDebug(\"Multi-pin requested\", {\n count: selectedIds.length,\n pinned,\n });\n\n if (selectedIds.length === 0) {\n debugLogger.warn(\"No memories selected for pinning\");\n return;\n }\n \n if (shouldUseVectorForMemories) {\n // For vector memories, loop through each ID and update pin status\n let successCount = 0;\n let errorCount = 0;\n \n for (const id of selectedIds) {\n try {\n const result = await updateVectorMemory(id, { pinned });\n if (result && result.success) {\n successCount++;\n } else {\n debugLogger.error(\"Failed to update vector memory pin status\", {\n id,\n error: result?.error || \"Unknown error\",\n });\n errorCount++;\n }\n } catch (error) {\n debugLogger.error(\"Exception updating vector memory pin status\", { id, error });\n errorCount++;\n }\n }\n \n debugLogger.memoryDebug(\"Vector pin update summary\", {\n successCount,\n errorCount,\n });\n \n // Refresh vector memories list\n try {\n const memories = await getVectorMemories();\n setVectorMemories((memories ?? []) as VectorMemory[]);\n } catch (error) {\n debugLogger.error(\"Failed to refresh vector memories after pin update\", { error });\n }\n } else {\n // Local store pin toggle\n try {\n let successCount = 0;\n \n for (const id of selectedIds) {\n const currentEntries = useMemoryStore.getState().entries;\n const memory = currentEntries.find(entry => entry.id === id);\n \n if (memory) {\n if (memory.pinned !== pinned) {\n togglePinMemory(id);\n successCount++;\n } else {\n debugLogger.memoryDebug(\"Memory already at desired pin status\", { id, pinned });\n }\n } else {\n debugLogger.warn(\"Memory not found in local store during pin update\", { id });\n }\n }\n \n debugLogger.memoryDebug(\"Local pin update summary\", { successCount });\n } catch (error) {\n debugLogger.error(\"Failed to update local pin status\", { error });\n }\n }\n \n setSelectedIds([]);\n setMultiSelectMode(false);\n };\n\n const handleDeleteMemory = async (memoryId: string) => {\n if (shouldUseVectorForMemories) {\n try {\n const result = await deleteVectorMemory(memoryId);\n \n if (result && result.success) {\n // Refresh vector memories list\n const memories = await getVectorMemories();\n setVectorMemories((memories ?? []) as VectorMemory[]);\n } else {\n throw new Error(result?.error || 'Delete operation failed');\n }\n } catch (error) {\n debugLogger.error(\"Failed to delete vector memory\", { error });\n // Don't fallback to local store for vector memories, just throw the error\n throw error;\n }\n } else {\n removeMemory(memoryId);\n }\n };\n\n const toggleSelection = (id: string) => {\n setSelectedIds((prev) =>\n prev.includes(id) ? prev.filter((x) => x !== id) : [...prev, id]\n );\n };\n\n const handleBulkImport = async () => {\n if (!batchCreateMemoriesAdvanced) {\n debugLogger.error(\"Advanced batch import not available\");\n return;\n }\n\n setImportProgress({ isImporting: true, progress: 'Preparing import...' });\n \n try {\n // Get all memories from IndexedDB\n await hydrate();\n const indexedDBMemories = entries;\n\n if (indexedDBMemories.length === 0) {\n setImportProgress({ \n isImporting: false, \n progress: 'No memories found to import',\n result: { success: false, message: 'No memories found in local storage' }\n });\n return;\n }\n\n // Convert IndexedDB format to vector format\n const memoriesToImport = indexedDBMemories.map(entry => ({\n content: entry.content,\n title: `Imported Memory - ${new Date(entry.timestamp).toLocaleDateString()}`,\n tags: entry.tags || []\n }));\n\n // Use advanced batch import with progress reporting\n const result = await batchCreateMemoriesAdvanced(memoriesToImport, {\n mode: 'append',\n clearExisting: false,\n chunkSize: 25, // Smaller chunks for better progress reporting\n validateContent: true,\n onProgress: (current: number, total: number, message: string) => {\n setImportProgress({ \n isImporting: true, \n progress: `${message} (${current}/${total})`\n });\n }\n });\n \n setImportProgress({ \n isImporting: false, \n progress: 'Import completed!',\n result: {\n success: result.success,\n message: result.message,\n details: {\n totalMemories: result.totalMemories,\n successCount: result.successCount,\n failureCount: result.failureCount,\n warnings: result.warnings,\n duration: `${(result.duration / 1000).toFixed(1)}s`\n }\n }\n });\n\n if (result.success) {\n // Refresh vector memories list\n const memories = await getVectorMemories();\n setVectorMemories((memories ?? []) as VectorMemory[]);\n \n // Auto-close dialog after success\n setTimeout(() => {\n setBulkImportOpen(false);\n setImportProgress({ isImporting: false, progress: '' });\n }, 3000);\n }\n } catch (error) {\n debugLogger.error(\"Bulk import failed\", { error });\n setImportProgress({ \n isImporting: false, \n progress: `Import failed: ${error instanceof Error ? error.message : String(error)}` \n });\n }\n };\n\n const getMemoriesForDisplay = () => {\n if (shouldUseVectorForMemories) {\n // Transform vector memories to match local memory structure, preserving the source field from API\n const transformedMemories = vectorMemories.map(vectorMemory => ({\n ...vectorMemory,\n // Preserve the source field from API response, but default to 'auto' for backwards compatibility\n // Most vector memories are automatically created by the system\n source: vectorMemory.source || \"auto\", // Default to 'auto' since most vector memories are system-generated\n pinned: vectorMemory.pinned || false, // Use API pinned or default to false\n timestamp: vectorMemory.uploadedAt ? new Date(vectorMemory.uploadedAt).getTime() : Date.now(),\n tags: vectorMemory.tags || []\n }));\n \n // Filter by selected tab (user or auto)\n const result = transformedMemories.filter(memory => memory.source === selectedTab);\n debugLogger.memoryDebug(\"Vector memories filtered for display\", {\n selectedTab,\n vectorMemoriesCount: vectorMemories.length,\n resultCount: result.length,\n });\n return result;\n } else {\n // Local store memories\n const result = entries.filter((entry) => entry.source === selectedTab);\n return result;\n }\n };\n\n const getUserMemoryCount = () => {\n if (shouldUseVectorForMemories) {\n return vectorMemories.filter(memory => (memory.source || \"auto\") === \"user\").length;\n } else {\n return entries.filter(e => e.source === \"user\").length;\n }\n };\n\n const getAutoMemoryCount = () => {\n if (shouldUseVectorForMemories) {\n return vectorMemories.filter(memory => (memory.source || \"auto\") === \"auto\").length;\n } else {\n return entries.filter(e => e.source === \"auto\").length;\n }\n };\n\n const handleClearAll = async () => {\n if (shouldUseVectorForMemories) {\n // For vector memories, we need to clear based on the selected option\n try {\n let memoriesToDelete = [];\n \n if (clearOption === \"user\") {\n memoriesToDelete = vectorMemories.filter(memory => (memory.source || \"auto\") === \"user\");\n } else if (clearOption === \"auto\") {\n memoriesToDelete = vectorMemories.filter(memory => (memory.source || \"auto\") === \"auto\");\n } else { // both\n memoriesToDelete = vectorMemories;\n }\n \n let successCount = 0;\n let errorCount = 0;\n \n for (const memory of memoriesToDelete) {\n try {\n const result = await deleteVectorMemory(memory.id);\n \n if (result && result.success) {\n successCount++;\n } else {\n errorCount++;\n debugLogger.error(\"Vector memory deletion failed\", {\n id: memory.id,\n error: result?.error || \"No result returned\",\n });\n }\n } catch (error) {\n errorCount++;\n debugLogger.error(\"Exception deleting vector memory\", { id: memory.id, error });\n }\n \n // Add a small delay to avoid overwhelming the API\n await new Promise(resolve => setTimeout(resolve, 100));\n }\n \n // Refresh vector memories list\n const memories = await getVectorMemories();\n setVectorMemories((memories ?? []) as VectorMemory[]);\n } catch (error) {\n debugLogger.error(\"Exception during vector clear-all operation\", { error });\n }\n } else {\n // Local store clearing\n try {\n if (clearOption === \"both\") {\n await clearMemories();\n } else {\n // Clear specific type\n const entriesToKeep = entries.filter(entry => entry.source !== clearOption);\n useMemoryStore.setState({ entries: entriesToKeep });\n }\n } catch (error) {\n debugLogger.error(\"Failed to clear local memories\", { error });\n }\n }\n setClearAllOpen(false);\n };\n\n const filteredMemories = getMemoriesForDisplay();\n\n const sheet = (\n <Box\n sx={{\n width: \"100%\",\n maxWidth: isMobileView ? \"100%\" : 800,\n maxHeight: isMobileView ? \"min(720px, 82vh)\" : \"90vh\",\n height: isMobileView ? \"100%\" : \"auto\",\n bgcolor: isMobileView ? theme.palette.background.paper : shell,\n color: theme.palette.text.primary,\n display: \"flex\",\n flexDirection: \"column\",\n borderRadius: isMobileView ? \"22px 22px 0 0\" : 3,\n overflow: \"hidden\",\n boxShadow: isMobileView ? \"none\" : `0 20px 60px ${alpha(theme.palette.common.black, 0.3)}`,\n border: isMobileView ? \"none\" : `1px solid ${alpha(theme.palette.divider, 0.2)}`,\n zIndex: 2000, // Ensure it's on top\n }}\n >\n {isMobileView && (\n <Box\n sx={{\n height: 6,\n width: 56,\n borderRadius: 999,\n bgcolor: alpha(theme.palette.text.primary, 0.18),\n alignSelf: \"center\",\n mt: 1.25,\n mb: 0.75,\n }}\n />\n )}\n\n {/* Header */}\n <Box\n sx={{\n flexShrink: 0,\n px: isMobileView ? 1.5 : 2,\n py: isMobileView ? 1.25 : 2,\n borderBottom: `1px solid ${appBar.border}`,\n display: \"flex\",\n flexDirection: \"column\",\n gap: isMobileView ? 0.9 : 1.25,\n }}\n >\n <Box\n sx={{\n width: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n gap: isMobileView ? 0.75 : 1.25,\n flexWrap: \"wrap\",\n }}\n >\n <Box sx={{ display: \"flex\", alignItems: \"center\", gap: 0.75 }}>\n <Typography variant=\"h6\" sx={{ fontWeight: 600 }}>\n Memory\n </Typography>\n {shouldUseVectorForMemories && (\n <Tooltip title=\"Memories stay in your private knowledge space for faster, more accurate answers.\">\n <Typography\n variant=\"caption\"\n sx={{\n color: theme.palette.primary.main,\n bgcolor: alpha(theme.palette.primary.main, 0.1),\n px: 1,\n py: 0.25,\n borderRadius: 1,\n fontSize: \"0.7rem\",\n fontWeight: 600,\n textTransform: \"uppercase\",\n cursor: \"help\",\n }}\n >\n Synced\n </Typography>\n </Tooltip>\n )}\n </Box>\n\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-end\",\n gap: isMobileView ? 0.5 : 1,\n flexWrap: \"wrap\",\n }}\n >\n {multiSelectMode ? (\n <>\n <Typography variant=\"caption\" sx={{ color: theme.palette.text.secondary, mr: 0.5 }}>\n {selectedIds.length} selected\n </Typography>\n <Button\n variant=\"outlined\"\n size=\"small\"\n onClick={() => {\n setMultiSelectMode(false);\n setSelectedIds([]);\n }}\n sx={{ textTransform: \"none\", borderRadius: 2, fontSize: \"0.75rem\" }}\n >\n Cancel\n </Button>\n {selectedIds.length > 0 && (\n <>\n <Button\n variant=\"outlined\"\n size=\"small\"\n color=\"secondary\"\n onClick={() => handleMultiPin(true)}\n sx={{ textTransform: \"none\", borderRadius: 2, fontSize: \"0.75rem\" }}\n >\n Pin ({selectedIds.length})\n </Button>\n <Button\n variant=\"outlined\"\n size=\"small\"\n onClick={() => handleMultiPin(false)}\n sx={{ textTransform: \"none\", borderRadius: 2, fontSize: \"0.75rem\" }}\n >\n Unpin ({selectedIds.length})\n </Button>\n <Button\n variant=\"contained\"\n size=\"small\"\n color=\"error\"\n onClick={() => setConfirmOpen(true)}\n sx={{ textTransform: \"none\", borderRadius: 2, fontSize: \"0.75rem\" }}\n >\n Delete ({selectedIds.length})\n </Button>\n </>\n )}\n </>\n ) : (\n filteredMemories.length > 0 && (\n <>\n <Button\n variant=\"outlined\"\n size=\"small\"\n onClick={() => setClearAllOpen(true)}\n sx={{ textTransform: \"none\", borderRadius: 2, fontSize: \"0.75rem\" }}\n >\n Clear All\n </Button>\n {isVectorEnabled && entries.length > 0 && (\n <Button\n variant=\"outlined\"\n size=\"small\"\n color=\"primary\"\n onClick={() => setBulkImportOpen(true)}\n startIcon={<CloudSyncIcon />}\n sx={{ textTransform: \"none\", borderRadius: 2, fontSize: \"0.75rem\" }}\n >\n Import to workspace\n </Button>\n )}\n <Button\n variant=\"outlined\"\n size=\"small\"\n color=\"error\"\n onClick={() => {\n setMultiSelectMode(true);\n setSelectedIds([]);\n }}\n sx={{ textTransform: \"none\", borderRadius: 2, fontSize: \"0.75rem\" }}\n >\n Select\n </Button>\n </>\n )\n )}\n\n {!multiSelectMode && isMobileView && (\n <Button\n variant=\"contained\"\n size=\"small\"\n onClick={handleAdd}\n disabled={!newMemory.trim()}\n sx={{\n textTransform: \"none\",\n borderRadius: 2,\n fontWeight: 600,\n minWidth: 88,\n }}\n >\n Save\n </Button>\n )}\n\n <IconButton\n onClick={onClose}\n sx={{\n color: appBar.icon,\n '&:hover': { bgcolor: alpha(theme.palette.text.primary, 0.08) },\n borderRadius: 2,\n }}\n size=\"small\"\n >\n <CloseIcon fontSize=\"small\" />\n </IconButton>\n </Box>\n </Box>\n\n <Box\n sx={{\n display: \"flex\",\n flexWrap: \"wrap\",\n gap: 0.5,\n color: theme.palette.text.secondary,\n }}\n >\n <Typography\n variant=\"caption\"\n sx={{\n color: theme.palette.text.secondary,\n borderRadius: 1,\n px: 0.75,\n py: 0.25,\n bgcolor: alpha(theme.palette.text.secondary, 0.1),\n textTransform: \"uppercase\",\n letterSpacing: 0.6,\n }}\n >\n {shouldUseVectorForMemories ? \"Cloud memory\" : \"Local memory\"}\n </Typography>\n {filteredMemories.length > 0 && (\n <Typography\n variant=\"caption\"\n sx={{\n color: theme.palette.text.secondary,\n borderRadius: 1,\n px: 0.75,\n py: 0.25,\n bgcolor: alpha(theme.palette.text.secondary, 0.1),\n textTransform: \"uppercase\",\n letterSpacing: 0.6,\n }}\n >\n {filteredMemories.length} {selectedTab}\n </Typography>\n )}\n </Box>\n </Box>\n {/* Vector Mode Indicator */}\n {shouldUseVectorForMemories && (\n <Box sx={{\n flexShrink: 0,\n mx: isMobileView ? 1.5 : 2,\n mt: 1,\n p: 1.5,\n background: `linear-gradient(135deg, ${alpha(theme.palette.primary.main, 0.08)}, ${alpha(theme.palette.secondary.main, 0.05)})`,\n border: `1px solid ${alpha(theme.palette.primary.main, 0.2)}`,\n borderRadius: 2,\n display: \"flex\",\n alignItems: \"center\",\n gap: 1.5,\n position: \"relative\",\n overflow: \"hidden\"\n }}>\n {/* Animated background shimmer */}\n <Box sx={{\n position: \"absolute\",\n top: 0,\n left: \"-100%\",\n width: \"100%\",\n height: \"100%\",\n background: `linear-gradient(90deg, transparent, ${alpha(theme.palette.primary.main, 0.1)}, transparent)`,\n animation: `${shimmer} 3s infinite`\n }} />\n <Box sx={{\n width: 8,\n height: 8,\n borderRadius: \"50%\",\n bgcolor: theme.palette.primary.main,\n animation: `${pulse} 2s infinite`,\n zIndex: 1\n }} />\n <Typography variant=\"body2\" sx={{ \n color: theme.palette.primary.main,\n fontSize: \"0.8rem\",\n fontWeight: 500,\n zIndex: 1\n }}>\n Advanced Vector Memory Active • Memories synced to AI database for enhanced semantic search\n </Typography>\n </Box>\n )}\n\n {/* Info + Tabs */}\n <Box sx={{ flexShrink: 0 }}>\n <Box sx={{ px: isMobileView ? 1.5 : 2, py: isMobileView ? 1.25 : 1.5 }}>\n <Typography\n variant=\"body2\"\n sx={{ color: theme.palette.text.secondary, fontSize: \"0.85rem\", textAlign: isMobileView ? \"left\" : \"center\" }}\n >\n {shouldUseVectorForMemories ? (\n \"🚀 AI-Powered Vector Memory. Semantic search across your conversations.\"\n ) : (\n \"🧠 Private. Local. Yours. You control your memories.\"\n )}\n </Typography>\n </Box>\n <Tabs\n value={selectedTab}\n onChange={(_, val) => setSelectedTab(val)}\n textColor=\"inherit\"\n indicatorColor=\"secondary\"\n centered={!isMobileView}\n variant={isMobileView ? \"fullWidth\" : \"standard\"}\n sx={{ \n bgcolor: alpha(input, isMobileView ? 0.65 : 0.5),\n borderTop: isMobileView ? `1px solid ${alpha(theme.palette.divider, 0.15)}` : undefined,\n borderBottom: `1px solid ${alpha(theme.palette.divider, 0.15)}`,\n \"& .MuiTab-root\": {\n textTransform: \"none\",\n fontWeight: 500,\n minHeight: isMobileView ? 44 : 48,\n paddingInline: isMobileView ? 1 : 1.5,\n }\n }}\n >\n <Tab \n label={\n <Box sx={{ display: \"flex\", alignItems: \"center\", gap: 1 }}>\n User\n {getUserMemoryCount() > 0 && (\n <Typography variant=\"caption\" sx={{\n bgcolor: alpha(theme.palette.primary.main, 0.2),\n color: theme.palette.primary.main,\n px: 0.75,\n py: 0.25,\n borderRadius: 1,\n fontSize: \"0.65rem\",\n fontWeight: 600,\n }}>\n {getUserMemoryCount()}\n </Typography>\n )}\n </Box>\n } \n value=\"user\" \n />\n <Tab \n label={\n <Box sx={{ display: \"flex\", alignItems: \"center\", gap: 1 }}>\n Auto\n {getAutoMemoryCount() > 0 && (\n <Typography variant=\"caption\" sx={{\n bgcolor: alpha(theme.palette.secondary.main, 0.2),\n color: theme.palette.secondary.main,\n px: 0.75,\n py: 0.25,\n borderRadius: 1,\n fontSize: \"0.65rem\",\n fontWeight: 600,\n }}>\n {getAutoMemoryCount()}\n </Typography>\n )}\n </Box>\n } \n value=\"auto\" \n />\n </Tabs>\n </Box>\n\n {/* Scrollable Memory List */}\n <Box\n sx={{\n flexGrow: 1,\n overflowY: \"auto\",\n px: isMobileView ? 1.5 : 2,\n py: isMobileView ? 1 : 1,\n }}\n >\n {filteredMemories.length === 0 ? (\n <Box sx={{ \n display: \"flex\", \n flexDirection: \"column\", \n alignItems: \"center\", \n justifyContent: \"center\",\n height: \"200px\",\n textAlign: \"center\"\n }}>\n <Typography variant=\"h6\" sx={{ \n color: theme.palette.text.secondary, \n mb: 1,\n fontSize: \"1.1rem\"\n }}>\n No {selectedTab} memories yet\n </Typography>\n <Typography variant=\"body2\" sx={{ \n color: alpha(theme.palette.text.secondary, 0.7),\n maxWidth: 280\n }}>\n {selectedTab === \"user\" \n ? shouldUseVectorForMemories \n ? \"Start by adding something you'd like me to remember. Your memories will be kept in a private workspace for quick recall.\"\n : \"Start by adding something you'd like me to remember about you or your preferences.\"\n : shouldUseVectorForMemories\n ? \"Auto memories are created automatically based on our conversations and kept in your private workspace for better answers.\"\n : \"Auto memories are created automatically based on our conversations.\"\n }\n </Typography>\n </Box>\n ) : (\n filteredMemories.map((memory) => {\n const isSelected = selectedIds.includes(memory.id);\n return (\n <React.Fragment key={memory.id}>\n <List sx={{ listStyle: \"none\", pl: 0, m: 0 }}>\n <ListItem\n onClick={() => multiSelectMode && toggleSelection(memory.id)}\n sx={{\n px: 0,\n py: 1.5,\n display: \"flex\",\n justifyContent: \"space-between\",\n gap: 1.5,\n alignItems: \"flex-start\",\n bgcolor: isSelected ? alpha(theme.palette.error.main, 0.1) : undefined,\n borderRadius: isSelected ? 2 : 0,\n cursor: multiSelectMode ? \"pointer\" : undefined,\n border: isSelected ? `2px solid ${alpha(theme.palette.error.main, 0.3)}` : \"2px solid transparent\",\n transition: \"all 0.2s ease\",\n \"&:hover\": {\n bgcolor: multiSelectMode ? alpha(theme.palette.error.main, 0.05) : alpha(theme.palette.text.primary, 0.02),\n }\n }}\n >\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"flex-start\",\n flexGrow: 1,\n gap: 1.5,\n }}\n >\n <Avatar\n src=\"https://cdn.burtson.ai/images/brain-icon.png\"\n alt=\"Memory\"\n sx={{\n width: 36,\n height: 36,\n mt: 0.2,\n bgcolor: theme.palette.mode === \"light\" ? \"#f5f5f5\" : theme.palette.background.paper,\n border: isVectorEnabled \n ? `2px solid ${alpha(theme.palette.primary.main, 0.4)}` \n : `1px solid ${theme.palette.divider}`,\n position: \"relative\"\n }}\n >\n {isVectorEnabled && (\n <Box sx={{\n position: \"absolute\",\n top: -2,\n right: -2,\n width: 12,\n height: 12,\n borderRadius: \"50%\",\n bgcolor: theme.palette.primary.main,\n border: `2px solid ${theme.palette.background.paper}`,\n fontSize: \"6px\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n color: \"white\"\n }}>\n ⚡\n </Box>\n )}\n </Avatar>\n {editingId === memory.id ? (\n <TextField\n fullWidth\n multiline\n autoFocus\n value={editedContent}\n onChange={(e) => setEditedContent(e.target.value)}\n onBlur={() => {\n if (\n editedContent.trim() &&\n editedContent !== memory.content\n ) {\n useMemoryStore.setState((state) => ({\n entries: state.entries.map((entry) =>\n entry.id === memory.id\n ? { ...entry, content: editedContent }\n : entry\n ),\n }));\n }\n setEditingId(null);\n }}\n onKeyDown={(e) => {\n if (e.key === 'Escape') {\n setEditingId(null);\n setEditedContent('');\n } else if (e.key === 'Enter' && (e.metaKey || e.ctrlKey)) {\n e.currentTarget.blur();\n }\n }}\n sx={{\n \"& .MuiInputBase-root\": { \n color: theme.palette.text.primary,\n bgcolor: input,\n borderRadius: 3,\n },\n \"& .MuiOutlinedInput-root\": {\n borderRadius: 3,\n \"& fieldset\": {\n borderRadius: 3,\n },\n \"&:hover fieldset\": {\n borderRadius: 3,\n },\n \"&.Mui-focused fieldset\": {\n borderRadius: 3,\n },\n },\n }}\n helperText=\"Press Cmd/Ctrl+Enter to save, Escape to cancel\"\n />\n ) : (\n <Box sx={{ flex: 1 }}>\n <Typography\n sx={{\n cursor: (!multiSelectMode && !shouldUseVectorForMemories) ? \"pointer\" : \"default\",\n wordBreak: \"break-word\",\n color: memory.pinned ? \"secondary.main\" : theme.palette.text.primary,\n fontWeight: memory.pinned ? 500 : 400,\n lineHeight: 1.4,\n \"&:hover\": (!multiSelectMode && !shouldUseVectorForMemories) ? {\n color: memory.pinned ? \"secondary.dark\" : \"primary.main\"\n } : undefined\n }}\n onClick={() => {\n if (!multiSelectMode && !shouldUseVectorForMemories) {\n setEditingId(memory.id);\n setEditedContent(memory.content);\n }\n }}\n >\n {memory.content}\n </Typography>\n {memory.pinned && (\n <Typography variant=\"caption\" sx={{\n color: alpha(theme.palette.secondary.main, 0.7),\n fontStyle: \"italic\",\n mt: 0.5,\n display: \"block\"\n }}>\n 📌 Pinned\n </Typography>\n )}\n </Box>\n )}\n </Box>\n {!multiSelectMode && (\n <Box sx={{ display: \"flex\", gap: 0.5, mt: 0.5 }}>\n <Tooltip title={memory.pinned ? \"Unpin memory\" : \"Pin memory\"}>\n <IconButton\n onClick={async () => {\n if (shouldUseVectorForMemories) {\n try {\n // Toggle pin status using vector update API\n const result = await updateVectorMemory(memory.id, { pinned: !memory.pinned });\n if (result.success) {\n // Refresh vector memories list to show updated pin status\n const memories = await getVectorMemories();\n setVectorMemories((memories ?? []) as VectorMemory[]);\n } else {\n debugLogger.error(\"Failed to update vector memory pin status\", {\n id: memory.id,\n error: result.error,\n });\n }\n } catch (error) {\n debugLogger.error(\"Error updating vector memory pin status\", {\n id: memory.id,\n error,\n });\n }\n } else {\n togglePinMemory(memory.id);\n }\n }}\n sx={{ \n color: memory.pinned ? \"secondary.main\" : alpha(theme.palette.text.secondary, 0.7),\n \"&:hover\": { \n bgcolor: alpha(memory.pinned ? theme.palette.secondary.main : theme.palette.text.secondary, 0.1)\n }\n }}\n size=\"small\"\n >\n {memory.pinned ? (\n <PushPinIcon fontSize=\"small\" />\n ) : (\n <PushPinOutlinedIcon fontSize=\"small\" />\n )}\n </IconButton>\n </Tooltip>\n <Tooltip title=\"Delete memory\">\n <IconButton\n onClick={async () => await handleDeleteMemory(memory.id)}\n sx={{ \n color: alpha(theme.palette.text.secondary, 0.7),\n \"&:hover\": { \n bgcolor: alpha(theme.palette.error.main, 0.1),\n color: theme.palette.error.main\n }\n }}\n size=\"small\"\n >\n <DeleteIcon fontSize=\"small\" />\n </IconButton>\n </Tooltip>\n </Box>\n )}\n </ListItem>\n </List>\n {filteredMemories.indexOf(memory) < filteredMemories.length - 1 && (\n <Divider sx={{ bgcolor: alpha(appBar.border, 0.5), my: 0.5 }} />\n )}\n </React.Fragment>\n );\n })\n )}\n </Box>\n\n {/* Multi Delete Confirm Bar */}\n {multiSelectMode && (\n <Box\n sx={{\n p: isMobileView ? 1.5 : 2,\n borderTop: `1px solid ${appBar.border}`,\n bgcolor: alpha(theme.palette.error.main, 0.05),\n borderBottom: selectedIds.length > 0 ? `2px solid ${alpha(theme.palette.error.main, 0.2)}` : undefined,\n }}\n >\n {selectedIds.length === 0 ? (\n <Typography variant=\"body2\" sx={{ \n textAlign: \"center\", \n color: theme.palette.text.secondary,\n fontStyle: \"italic\"\n }}>\n Tap memories to select them for deletion\n </Typography>\n ) : (\n <Box sx={{ display: \"flex\", gap: 1, alignItems: \"center\" }}>\n <Button\n variant=\"outlined\"\n onClick={() => {\n setSelectedIds(filteredMemories.map(m => m.id));\n }}\n sx={{ \n textTransform: \"none\",\n borderRadius: 2,\n fontSize: \"0.8rem\",\n minWidth: \"auto\",\n }}\n >\n Select All\n </Button>\n <Button\n fullWidth\n variant=\"contained\"\n color=\"error\"\n onClick={() => setConfirmOpen(true)}\n sx={{ borderRadius: 2 }}\n >\n Delete Selected ({selectedIds.length})\n </Button>\n </Box>\n )}\n </Box>\n )}\n\n {/* Footer */}\n <Box\n sx={{\n flexShrink: 0,\n p: isMobileView ? 1.5 : 2,\n borderTop: `1px solid ${appBar.border}`,\n bgcolor: isMobileView ? theme.palette.background.paper : shell,\n pb: `calc(env(safe-area-inset-bottom, 0px) + 8px)`,\n }}\n >\n <TextField\n fullWidth\n size=\"small\"\n value={newMemory}\n onChange={(e) => setNewMemory(e.target.value)}\n placeholder={shouldUseVectorForMemories \n ? `Add a new ${selectedTab} memory to your workspace...` \n : `Add a new ${selectedTab} memory...`\n }\n onKeyDown={(e) => {\n if (e.key === 'Enter' && !e.shiftKey && newMemory.trim()) {\n e.preventDefault();\n handleAdd();\n }\n }}\n sx={{\n \"& .MuiInputBase-root\": { \n color: theme.palette.text.primary,\n bgcolor: alpha(input, 0.3), // Use semi-transparent background\n borderRadius: 3, // More rounded for modern look\n },\n \"& .MuiOutlinedInput-root\": {\n borderRadius: 3, // Ensure outline variant is also rounded\n bgcolor: \"transparent\", // Remove background from outline variant\n \"& fieldset\": {\n borderRadius: 3, // Ensure fieldset border is rounded\n borderColor: alpha(theme.palette.divider, 0.3),\n },\n \"&:hover fieldset\": {\n borderRadius: 3, // Maintain rounded corners on hover\n borderColor: alpha(theme.palette.primary.main, 0.5),\n },\n \"&.Mui-focused fieldset\": {\n borderRadius: 3, // Maintain rounded corners when focused\n borderColor: theme.palette.primary.main,\n },\n },\n mb: 1.5,\n }}\n InputProps={{\n endAdornment: newMemory.trim() && (\n <Typography variant=\"caption\" sx={{ \n color: alpha(theme.palette.text.secondary, 0.7),\n fontSize: \"0.7rem\",\n whiteSpace: \"nowrap\"\n }}>\n Press Enter\n </Typography>\n )\n }}\n />\n {!isMobileView && (\n <Button\n fullWidth\n variant=\"contained\"\n onClick={handleAdd}\n disabled={!newMemory.trim()}\n sx={{ \n borderRadius: 2, \n py: 1.25,\n textTransform: \"none\",\n fontWeight: 600,\n }}\n >\n Save\n </Button>\n )}\n </Box>\n\n {/* Confirm Delete Modal */}\n <Dialog \n open={confirmOpen} \n onClose={() => setConfirmOpen(false)}\n sx={{\n zIndex: 2100, // Higher than main modal (2000)\n }}\n PaperProps={{\n sx: { borderRadius: 3, minWidth: 320 }\n }}\n >\n <DialogTitle sx={{ pb: 1 }}>\n Delete {selectedIds.length} {selectedIds.length === 1 ? 'Memory' : 'Memories'}?\n </DialogTitle>\n <DialogContent>\n <Typography variant=\"body2\" sx={{ color: theme.palette.text.secondary }}>\n This will permanently remove the selected memory entries. This action cannot be undone.\n </Typography>\n </DialogContent>\n <DialogActions sx={{ p: 3, pt: 1 }}>\n <Button \n onClick={() => setConfirmOpen(false)}\n sx={{ textTransform: \"none\", borderRadius: 3 }}\n >\n Cancel\n </Button>\n <Button \n onClick={handleMultiDelete} \n color=\"error\"\n variant=\"contained\"\n sx={{ textTransform: \"none\", borderRadius: 3 }}\n >\n Delete ({selectedIds.length})\n </Button>\n </DialogActions>\n </Dialog>\n {/* Clear All Dialog */}\n <Dialog \n open={clearAllOpen} \n onClose={() => setClearAllOpen(false)}\n sx={{\n zIndex: 2100, // Higher than main modal (2000)\n }}\n PaperProps={{\n sx: { borderRadius: 3, minWidth: 320 }\n }}\n >\n <DialogTitle sx={{ pb: 1, fontWeight: 600 }}>\n Clear Memories\n </DialogTitle>\n <DialogContent sx={{ pb: 2 }}>\n <Typography variant=\"body2\" sx={{ mb: 3, color: theme.palette.text.secondary }}>\n This will permanently remove selected memory types. Choose which ones to clear:\n </Typography>\n <FormControl component=\"fieldset\">\n <RadioGroup\n value={clearOption}\n onChange={(e) => setClearOption(e.target.value as \"user\" | \"auto\" | \"both\")}\n >\n <FormControlLabel \n value=\"user\" \n control={<Radio />} \n label={\n <Box sx={{ display: \"flex\", alignItems: \"center\", gap: 1 }}>\n <Typography>User Memories</Typography>\n <Typography variant=\"caption\" sx={{\n bgcolor: alpha(theme.palette.primary.main, 0.1),\n color: theme.palette.primary.main,\n px: 1,\n py: 0.25,\n borderRadius: 1,\n fontWeight: 600,\n }}>\n {getUserMemoryCount()}\n </Typography>\n </Box>\n }\n />\n <FormControlLabel \n value=\"auto\" \n control={<Radio />} \n label={\n <Box sx={{ display: \"flex\", alignItems: \"center\", gap: 1 }}>\n <Typography>Auto Memories</Typography>\n <Typography variant=\"caption\" sx={{\n bgcolor: alpha(theme.palette.secondary.main, 0.1),\n color: theme.palette.secondary.main,\n px: 1,\n py: 0.25,\n borderRadius: 1,\n fontWeight: 600,\n }}>\n {getAutoMemoryCount()}\n </Typography>\n </Box>\n }\n />\n <FormControlLabel \n value=\"both\" \n control={<Radio />} \n label={\n <Box sx={{ display: \"flex\", alignItems: \"center\", gap: 1 }}>\n <Typography>Both Types</Typography>\n <Typography variant=\"caption\" sx={{\n bgcolor: alpha(theme.palette.error.main, 0.1),\n color: theme.palette.error.main,\n px: 1,\n py: 0.25,\n borderRadius: 1,\n fontWeight: 600,\n }}>\n {entries.length}\n </Typography>\n </Box>\n }\n />\n </RadioGroup>\n </FormControl>\n </DialogContent>\n <DialogActions sx={{ p: 3, pt: 1 }}>\n <Button \n onClick={() => setClearAllOpen(false)}\n sx={{ textTransform: \"none\", borderRadius: 3 }}\n >\n Cancel\n </Button>\n <Button\n color=\"error\"\n variant=\"contained\"\n onClick={handleClearAll}\n sx={{ textTransform: \"none\", borderRadius: 3 }}\n >\n Clear {clearOption === \"both\" ? \"All\" : clearOption} Memories\n </Button>\n </DialogActions>\n </Dialog>\n\n {/* Bulk Import Dialog */}\n <Dialog \n open={bulkImportOpen} \n onClose={() => setBulkImportOpen(false)}\n maxWidth=\"sm\"\n fullWidth\n PaperProps={{\n sx: { borderRadius: 3 }\n }}\n >\n <DialogTitle sx={{ \n fontWeight: 600, \n pb: 1,\n display: 'flex',\n alignItems: 'center',\n gap: 1\n }}>\n <CloudSyncIcon color=\"primary\" />\n Import Memories to Secure Workspace\n </DialogTitle>\n <DialogContent sx={{ py: 2 }}>\n {!importProgress.isImporting ? (\n <Box>\n <Typography variant=\"body2\" color=\"text.secondary\" sx={{ mb: 2 }}>\n This will import all your local memories ({entries.length} memories) to your secure workspace for faster, more reliable answers.\n </Typography>\n <Typography variant=\"body2\" color=\"text.secondary\" sx={{ mb: 2 }}>\n • Memories will be added to your synced workspace\n • Local memories will remain unchanged\n • You can switch between synced and local storage anytime\n </Typography>\n <Typography variant=\"body2\" color=\"primary\" sx={{ fontWeight: 500 }}>\n Ready to import {entries.length} memories?\n </Typography>\n </Box>\n ) : (\n <Box sx={{ textAlign: 'center', py: 2 }}>\n <CloudSyncIcon \n sx={{ \n fontSize: 48, \n color: 'primary.main',\n mb: 2,\n animation: `${pulse} 2s ease-in-out infinite`\n }} \n />\n <Typography variant=\"body1\" sx={{ mb: 1 }}>\n {importProgress.progress}\n </Typography>\n {importProgress.result && (\n <>\n <Typography \n variant=\"body2\" \n color={importProgress.result.success ? 'success.main' : 'error.main'}\n sx={{ mt: 1, mb: 2 }}\n >\n {importProgress.result.message}\n </Typography>\n {importProgress.result.details && (\n <Box sx={{ \n textAlign: 'left', \n backgroundColor: 'background.paper',\n border: 1,\n borderColor: 'divider',\n borderRadius: 1,\n p: 2,\n mt: 2\n }}>\n <Typography variant=\"caption\" color=\"text.secondary\" sx={{ display: 'block', mb: 1 }}>\n Import Details:\n </Typography>\n <Typography variant=\"body2\" sx={{ mb: 0.5 }}>\n • Total: {importProgress.result.details.totalMemories} memories\n </Typography>\n <Typography variant=\"body2\" sx={{ mb: 0.5 }}>\n • Success: {importProgress.result.details.successCount}\n </Typography>\n <Typography variant=\"body2\" sx={{ mb: 0.5 }}>\n • Failed: {importProgress.result.details.failureCount}\n </Typography>\n <Typography variant=\"body2\" sx={{ mb: 0.5 }}>\n • Duration: {importProgress.result.details.duration}\n </Typography>\n {importProgress.result.details.warnings && importProgress.result.details.warnings.length > 0 && (\n <Typography variant=\"body2\" color=\"warning.main\" sx={{ mt: 1 }}>\n ⚠️ {importProgress.result.details.warnings.join(', ')}\n </Typography>\n )}\n </Box>\n )}\n </>\n )}\n </Box>\n )}\n </DialogContent>\n <DialogActions sx={{ p: 3, pt: 1 }}>\n <Button \n onClick={() => {\n setBulkImportOpen(false);\n setImportProgress({ isImporting: false, progress: '' });\n }}\n disabled={importProgress.isImporting}\n sx={{ textTransform: \"none\", borderRadius: 3 }}\n >\n {importProgress.isImporting ? 'Importing...' : 'Cancel'}\n </Button>\n {!importProgress.isImporting && !importProgress.result && (\n <Button\n color=\"primary\"\n variant=\"contained\"\n onClick={handleBulkImport}\n startIcon={<CloudSyncIcon />}\n sx={{ textTransform: \"none\", borderRadius: 3 }}\n >\n Import {entries.length} Memories\n </Button>\n )}\n </DialogActions>\n </Dialog>\n </Box>\n );\n\n if (isMobileView) {\n return (\n <SwipeableDrawer\n anchor=\"bottom\"\n open={open}\n onClose={onClose}\n onOpen={() => {}}\n disableSwipeToOpen\n ModalProps={{ keepMounted: true }}\n PaperProps={{\n sx: {\n height: 'min(720px, 82vh)',\n borderRadius: '22px 22px 0 0',\n overflow: 'hidden',\n bgcolor: theme.palette.background.paper,\n display: 'flex',\n justifyContent: 'center',\n },\n }}\n >\n {sheet}\n </SwipeableDrawer>\n );\n }\n\n return (\n <Modal \n open={open} \n onClose={onClose}\n sx={{\n zIndex: 2000, // Higher than drawer (1400) and other modals (1500)\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n p: 2,\n }}\n >\n {sheet}\n </Modal>\n );\n};\n\nexport default MemoryModal;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAClB,SAAS,WAAW;AAGpB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA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AAQ;AAAA;AAAA,QACR,SAAS;AAAA,QACT,YAAY;AAAA,QACZ,gBAAgB;AAAA,QAChB,GAAG;AAAA,MACL;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;AAEA,IAAO,uBAAQ;","names":["MuiLucideIcon","Observable","TTSState","Observable","React","useCallback","useEffect","useMemo","useRef","useState","useState","useEffect","Box","jsx","useState","useEffect","ErrorIcon","jsx","Box","useCallback","useEffect","useMemo","useRef","useState","IconButton","Typography","Box","Alert","Button","Tooltip","useTheme","React","React","jsx","jsxs","getFileTypeInfo","useState","useRef","useTheme","useEffect","useMemo","useCallback","doc","error","jsxs","jsx","Box","Tooltip","Typography","Button","IconButton","Alert","useTheme","Box","IconButton","Tooltip","Typography","Paper","useState","useEffect","Box","CircularProgress","IconButton","Tooltip","CheckIcon","ContentCopyIcon","PlayArrowIcon","Fragment","jsx","jsxs","useState","useEffect","jsxs","Box","jsx","Tooltip","IconButton","CheckIcon","ContentCopyIcon","Fragment","CircularProgress","PlayArrowIcon","Fragment","jsx","jsxs","markdown","useState","useMemo","jsx","jsxs","Box","Tooltip","IconButton","useEffect","React","useCallback","useRef","useTheme","Typography","Fragment","Paper","useState","useCallback","useRef","Dialog","Button","Box","Typography","IconButton","Chip","Alert","Paper","Avatar","CircularProgress","useMediaQuery","CloseIcon","DeleteIcon","useTheme","alpha","Fragment","jsx","jsxs","useTheme","useMediaQuery","useRef","useState","useCallback","jsxs","Fragment","jsx","Dialog","Box","alpha","Typography","IconButton","CloseIcon","Alert","Paper","theme","Avatar","DeleteIcon","Button","Chip","CircularProgress","createTheme","commonOptions","createTheme","createTheme","commonOptions","createTheme","createTheme","commonOptions","createTheme","createTheme","commonOptions","createTheme","createTheme","createTheme","createTheme","createTheme","createTheme","createTheme","createTheme","createTheme","createTheme","createTheme","createTheme","createTheme","createTheme","createTheme","createTheme","createTheme","useState","Tooltip","useTheme","Button","IconButton","FeedbackIcon","Fragment","jsx","jsxs","useTheme","useState","jsxs","Fragment","jsx","Button","FeedbackIcon","Tooltip","IconButton","useEffect","useEffect","React","useState","useEffect","useTheme","alpha","Box","Typography","Modal","IconButton","TextField","Button","List","Tooltip","Dialog","DialogTitle","DialogContent","DialogActions","Avatar","FormControl","useMediaQuery","Fragment","jsx","jsxs","useEffect","useState","useTheme","useMediaQuery","shell","jsxs","Box","alpha","jsx","Typography","Tooltip","Fragment","Button","IconButton","React","List","Avatar","TextField","Dialog","DialogTitle","DialogContent","DialogActions","FormControl","Modal"]}