@burtson-labs/bandit-engine 2.0.76 → 2.0.78

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.
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  chat_default
3
- } from "./chunk-62PZTN7J.mjs";
3
+ } from "./chunk-2IK2YJGB.mjs";
4
4
  import {
5
5
  chat_provider_default
6
6
  } from "./chunk-OPN32F2X.mjs";
@@ -10,8 +10,8 @@ import {
10
10
  useGatewayHealth,
11
11
  useGatewayMemory,
12
12
  useGatewayModels
13
- } from "./chunk-E5ROHXFN.mjs";
14
- import "./chunk-U633CJBV.mjs";
13
+ } from "./chunk-UDSKWLDG.mjs";
14
+ import "./chunk-YYYEMVBV.mjs";
15
15
  import "./chunk-6ITUH375.mjs";
16
16
  import "./chunk-3LT77723.mjs";
17
17
  import {
@@ -19,7 +19,7 @@ import {
19
19
  } from "./chunk-IXIM7BNO.mjs";
20
20
  import {
21
21
  chat_modal_default
22
- } from "./chunk-JURUEF52.mjs";
22
+ } from "./chunk-5DSDARPR.mjs";
23
23
  import {
24
24
  FeedbackButton,
25
25
  FeedbackModal,
@@ -37,7 +37,7 @@ import {
37
37
  useTTS,
38
38
  useVoiceStore,
39
39
  voiceService
40
- } from "./chunk-6DY7W4NK.mjs";
40
+ } from "./chunk-57L7TXB6.mjs";
41
41
  import {
42
42
  DEFAULT_TIER_FEATURES,
43
43
  FeatureFlagContext,
@@ -45,6 +45,7 @@ import {
45
45
  NotificationProvider,
46
46
  NotificationService,
47
47
  OSS_DEFAULT_FEATURES,
48
+ TOPICS,
48
49
  VectorDatabaseService,
49
50
  VectorMigrationService,
50
51
  authenticationService,
@@ -59,7 +60,8 @@ import {
59
60
  vectorMigrationService
60
61
  } from "./chunk-4D7245ZO.mjs";
61
62
  import {
62
- usePackageSettingsStore
63
+ usePackageSettingsStore,
64
+ usePreferencesStore
63
65
  } from "./chunk-LWHSOEPR.mjs";
64
66
  import "./chunk-H3BYFEIE.mjs";
65
67
  import {
@@ -68,6 +70,49 @@ import {
68
70
  } from "./chunk-KCI46M23.mjs";
69
71
  import "./chunk-BJTO5JO5.mjs";
70
72
 
73
+ // src/management/components/InterestsEditor.tsx
74
+ import { useEffect } from "react";
75
+ import { Box, Chip, Typography } from "@mui/material";
76
+ import { jsx, jsxs } from "react/jsx-runtime";
77
+ var InterestsEditor = ({
78
+ title = "Your interests",
79
+ description = "Pick the topics you care about \u2014 your home-screen conversation starters lean toward them."
80
+ }) => {
81
+ const preferences = usePreferencesStore((s) => s.preferences);
82
+ const updatePreference = usePreferencesStore((s) => s.updatePreference);
83
+ const loadPreferences = usePreferencesStore((s) => s.loadPreferences);
84
+ const isLoaded = usePreferencesStore((s) => s.isLoaded);
85
+ useEffect(() => {
86
+ if (!isLoaded) {
87
+ void loadPreferences();
88
+ }
89
+ }, [isLoaded, loadPreferences]);
90
+ const interests = preferences?.interests ?? [];
91
+ return /* @__PURE__ */ jsxs(Box, { children: [
92
+ title && /* @__PURE__ */ jsx(Typography, { variant: "h6", sx: { fontWeight: 600, color: "text.primary" }, children: title }),
93
+ description && /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "text.secondary", sx: { mb: 1.5 }, children: description }),
94
+ /* @__PURE__ */ jsx(Box, { sx: { display: "flex", flexWrap: "wrap", gap: 1 }, children: TOPICS.map((topic) => {
95
+ const selected = interests.includes(topic);
96
+ return /* @__PURE__ */ jsx(
97
+ Chip,
98
+ {
99
+ label: topic,
100
+ size: "small",
101
+ color: selected ? "primary" : "default",
102
+ variant: selected ? "filled" : "outlined",
103
+ onClick: () => {
104
+ const next = selected ? interests.filter((t) => t !== topic) : [...interests, topic];
105
+ updatePreference("interests", next);
106
+ },
107
+ sx: { textTransform: "capitalize" }
108
+ },
109
+ topic
110
+ );
111
+ }) })
112
+ ] });
113
+ };
114
+ var InterestsEditor_default = InterestsEditor;
115
+
71
116
  // src/services/featureFlag/featureFlagService.ts
72
117
  var FeatureFlagService = class _FeatureFlagService {
73
118
  static instance;
@@ -260,7 +305,7 @@ var previewTierUpgrade = (tier) => featureFlagService.previewUpgrade(tier);
260
305
  var getFeatureMatrix = () => featureFlagService.generateFeatureMatrix();
261
306
 
262
307
  // src/hooks/useVoices.ts
263
- import { useEffect } from "react";
308
+ import { useEffect as useEffect2 } from "react";
264
309
  var useVoices = () => {
265
310
  const {
266
311
  availableVoices,
@@ -275,7 +320,7 @@ var useVoices = () => {
275
320
  } = useVoiceStore();
276
321
  const gatewayApiUrl = usePackageSettingsStore((state) => state.settings?.gatewayApiUrl);
277
322
  const { token } = useAuthenticationStore();
278
- useEffect(() => {
323
+ useEffect2(() => {
279
324
  const isAuthenticated = authenticationService.isAuthenticated();
280
325
  if (gatewayApiUrl && token && isAuthenticated && !isServiceAvailable) {
281
326
  debugLogger.debug("Gateway API URL and JWT token available, loading voice models...");
@@ -309,14 +354,14 @@ import {
309
354
  DialogTitle,
310
355
  DialogContent,
311
356
  DialogActions,
312
- Typography,
357
+ Typography as Typography2,
313
358
  Button,
314
- Box,
359
+ Box as Box2,
315
360
  Alert,
316
361
  Stack
317
362
  } from "@mui/material";
318
363
  import { AlertTriangle as WarningIcon, Home as HomeIcon, CreditCard as CreditCardIcon } from "lucide-react";
319
- import { jsx, jsxs } from "react/jsx-runtime";
364
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
320
365
  var SubscriptionExpiredModal = ({
321
366
  open,
322
367
  onNavigateHome,
@@ -338,7 +383,7 @@ var SubscriptionExpiredModal = ({
338
383
  window.location.href = "/manage-subscription";
339
384
  }
340
385
  };
341
- return /* @__PURE__ */ jsxs(
386
+ return /* @__PURE__ */ jsxs2(
342
387
  Dialog,
343
388
  {
344
389
  open,
@@ -353,47 +398,47 @@ var SubscriptionExpiredModal = ({
353
398
  }
354
399
  },
355
400
  children: [
356
- /* @__PURE__ */ jsx(DialogTitle, { sx: { textAlign: "center", pb: 1 }, children: /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center", justifyContent: "center", gap: 1, mb: 1 }, children: [
357
- /* @__PURE__ */ jsx(WarningIcon, { size: 32, color: "warning" }),
358
- /* @__PURE__ */ jsx(Typography, { variant: "h5", component: "span", fontWeight: "bold", children: "Subscription Expired" })
401
+ /* @__PURE__ */ jsx2(DialogTitle, { sx: { textAlign: "center", pb: 1 }, children: /* @__PURE__ */ jsxs2(Box2, { sx: { display: "flex", alignItems: "center", justifyContent: "center", gap: 1, mb: 1 }, children: [
402
+ /* @__PURE__ */ jsx2(WarningIcon, { size: 32, color: "warning" }),
403
+ /* @__PURE__ */ jsx2(Typography2, { variant: "h5", component: "span", fontWeight: "bold", children: "Subscription Expired" })
359
404
  ] }) }),
360
- /* @__PURE__ */ jsx(DialogContent, { sx: { pt: 1 }, children: /* @__PURE__ */ jsxs(Stack, { spacing: 2, children: [
361
- /* @__PURE__ */ jsx(Alert, { severity: "warning", sx: { mb: 2 }, children: /* @__PURE__ */ jsx(Typography, { variant: "body2", children: "Your subscription has expired and access to features has been restricted." }) }),
362
- userEmail && /* @__PURE__ */ jsxs(Typography, { variant: "body2", color: "text.secondary", sx: { textAlign: "center" }, children: [
405
+ /* @__PURE__ */ jsx2(DialogContent, { sx: { pt: 1 }, children: /* @__PURE__ */ jsxs2(Stack, { spacing: 2, children: [
406
+ /* @__PURE__ */ jsx2(Alert, { severity: "warning", sx: { mb: 2 }, children: /* @__PURE__ */ jsx2(Typography2, { variant: "body2", children: "Your subscription has expired and access to features has been restricted." }) }),
407
+ userEmail && /* @__PURE__ */ jsxs2(Typography2, { variant: "body2", color: "text.secondary", sx: { textAlign: "center" }, children: [
363
408
  "Account: ",
364
- /* @__PURE__ */ jsx("strong", { children: userEmail })
409
+ /* @__PURE__ */ jsx2("strong", { children: userEmail })
365
410
  ] }),
366
- /* @__PURE__ */ jsx(Typography, { variant: "body1", sx: { textAlign: "center", color: "text.secondary" }, children: "To continue using all features, please renew your subscription or return to the main application." }),
367
- /* @__PURE__ */ jsx(Box, { sx: {
411
+ /* @__PURE__ */ jsx2(Typography2, { variant: "body1", sx: { textAlign: "center", color: "text.secondary" }, children: "To continue using all features, please renew your subscription or return to the main application." }),
412
+ /* @__PURE__ */ jsx2(Box2, { sx: {
368
413
  bgcolor: "background.paper",
369
414
  border: 1,
370
415
  borderColor: "divider",
371
416
  borderRadius: 1,
372
417
  p: 2,
373
418
  mt: 2
374
- }, children: /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "text.secondary", sx: { fontStyle: "italic" }, children: [
375
- /* @__PURE__ */ jsx("strong", { children: "What's affected:" }),
419
+ }, children: /* @__PURE__ */ jsxs2(Typography2, { variant: "caption", color: "text.secondary", sx: { fontStyle: "italic" }, children: [
420
+ /* @__PURE__ */ jsx2("strong", { children: "What's affected:" }),
376
421
  " All premium features including document upload, voice controls, advanced search, and admin dashboard access have been disabled until your subscription is renewed."
377
422
  ] }) })
378
423
  ] }) }),
379
- /* @__PURE__ */ jsxs(DialogActions, { sx: { px: 3, pb: 3, gap: 1, justifyContent: "center" }, children: [
380
- /* @__PURE__ */ jsx(
424
+ /* @__PURE__ */ jsxs2(DialogActions, { sx: { px: 3, pb: 3, gap: 1, justifyContent: "center" }, children: [
425
+ /* @__PURE__ */ jsx2(
381
426
  Button,
382
427
  {
383
428
  onClick: handleNavigateHome,
384
429
  variant: "outlined",
385
- startIcon: /* @__PURE__ */ jsx(HomeIcon, {}),
430
+ startIcon: /* @__PURE__ */ jsx2(HomeIcon, {}),
386
431
  size: "large",
387
432
  sx: { minWidth: 140 },
388
433
  children: "Go Home"
389
434
  }
390
435
  ),
391
- /* @__PURE__ */ jsx(
436
+ /* @__PURE__ */ jsx2(
392
437
  Button,
393
438
  {
394
439
  onClick: handleManageSubscription,
395
440
  variant: "contained",
396
- startIcon: /* @__PURE__ */ jsx(CreditCardIcon, {}),
441
+ startIcon: /* @__PURE__ */ jsx2(CreditCardIcon, {}),
397
442
  size: "large",
398
443
  color: "primary",
399
444
  sx: { minWidth: 140 },
@@ -407,8 +452,8 @@ var SubscriptionExpiredModal = ({
407
452
  };
408
453
 
409
454
  // src/guards/SubscriptionExpiredGuard.tsx
410
- import { useEffect as useEffect2, useState } from "react";
411
- import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
455
+ import { useEffect as useEffect3, useState } from "react";
456
+ import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
412
457
  var SubscriptionExpiredGuard = ({
413
458
  children,
414
459
  onNavigateHome,
@@ -419,7 +464,7 @@ var SubscriptionExpiredGuard = ({
419
464
  const { isExpiredTier, getFullEvaluation } = useFeatures();
420
465
  const [showModal, setShowModal] = useState(false);
421
466
  const [userDismissed, setUserDismissed] = useState(false);
422
- useEffect2(() => {
467
+ useEffect3(() => {
423
468
  if (isExpiredTier() && !userDismissed) {
424
469
  setShowModal(true);
425
470
  } else {
@@ -445,9 +490,9 @@ var SubscriptionExpiredGuard = ({
445
490
  }
446
491
  return void 0;
447
492
  })() : void 0;
448
- return /* @__PURE__ */ jsxs2(Fragment, { children: [
493
+ return /* @__PURE__ */ jsxs3(Fragment, { children: [
449
494
  children,
450
- /* @__PURE__ */ jsx2(
495
+ /* @__PURE__ */ jsx3(
451
496
  SubscriptionExpiredModal,
452
497
  {
453
498
  open: showModal,
@@ -629,6 +674,7 @@ export {
629
674
  FeatureFlagService,
630
675
  FeedbackButton,
631
676
  FeedbackModal,
677
+ InterestsEditor_default as InterestsEditor,
632
678
  management_default as Management,
633
679
  NotificationProvider,
634
680
  NotificationService,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/services/featureFlag/featureFlagService.ts","../src/hooks/useVoices.ts","../src/modals/SubscriptionExpiredModal.tsx","../src/guards/SubscriptionExpiredGuard.tsx","../src/services/http/httpErrorHandler.ts","../src/core/license-validator.ts","../src/core/system-constants.ts","../src/utils/critical-helpers.ts"],"sourcesContent":["/*\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-D9D5-368074\nconst __banditFingerprint_featureFlag_featureFlagServicets = 'BL-FP-4BEE13-CCB2';\nconst __auditTrail_featureFlag_featureFlagServicets = 'BL-AU-MGOIKVVS-KTAI';\n// File: featureFlagService.ts | Path: src/services/featureFlag/featureFlagService.ts | Hash: d9d5ccb2\n\nimport { SubscriptionTier, FeatureKey, DEFAULT_TIER_FEATURES } from '../../types/featureFlags';\nimport { debugLogger } from '../logging/debugLogger';\n\n/**\n * Service for managing subscription tiers and feature flags\n */\nexport class FeatureFlagService {\n private static instance: FeatureFlagService;\n private subscribers: Set<() => void> = new Set();\n\n static getInstance(): FeatureFlagService {\n if (!FeatureFlagService.instance) {\n FeatureFlagService.instance = new FeatureFlagService();\n }\n return FeatureFlagService.instance;\n }\n\n /**\n * Subscribe to subscription tier changes\n */\n subscribe(callback: () => void): () => void {\n this.subscribers.add(callback);\n return () => this.subscribers.delete(callback);\n }\n\n /**\n * Notify all subscribers of changes\n */\n private notifySubscribers(): void {\n this.subscribers.forEach(callback => {\n try {\n callback();\n } catch (error) {\n debugLogger.error('Error in feature flag subscriber:', { error });\n }\n });\n }\n\n /**\n * Update subscription tier and notify components\n */\n updateSubscriptionTier(tier: SubscriptionTier): void {\n debugLogger.info('Updating subscription tier:', { tier });\n \n // Trigger feature evaluation refresh through custom event\n if (typeof window !== 'undefined') {\n window.dispatchEvent(new CustomEvent('bandit:tier-updated', { \n detail: { tier } \n }));\n }\n \n this.notifySubscribers();\n }\n\n /**\n * Sync subscription with external service\n */\n async syncWithExternalService(userId: string, apiUrl?: string): Promise<SubscriptionTier> {\n try {\n if (!apiUrl) {\n debugLogger.warn('No API URL provided for subscription sync');\n return 'basic';\n }\n\n const response = await fetch(`${apiUrl}/subscription/${userId}`, {\n headers: {\n 'Authorization': `Bearer ${localStorage.getItem('bandit-jwt') || ''}`,\n 'Content-Type': 'application/json'\n }\n });\n\n if (!response.ok) {\n throw new Error(`HTTP ${response.status}: ${response.statusText}`);\n }\n\n const data = await response.json();\n const tier = data.tier as SubscriptionTier;\n\n debugLogger.info('Synced subscription from external service:', { tier });\n this.updateSubscriptionTier(tier);\n \n return tier;\n } catch (error) {\n debugLogger.error('Failed to sync subscription with external service:', { error });\n return 'basic'; // Fallback to basic tier\n }\n }\n\n /**\n * Get features available for a specific tier\n */\n getFeaturesForTier(tier: SubscriptionTier): Partial<Record<FeatureKey, boolean>> {\n return DEFAULT_TIER_FEATURES[tier] || {};\n }\n\n /**\n * Check if a tier includes a specific feature\n */\n tierHasFeature(tier: SubscriptionTier, feature: FeatureKey): boolean {\n const features = this.getFeaturesForTier(tier);\n return features[feature] ?? false;\n }\n\n /**\n * Get the minimum tier required for a feature\n */\n getMinimumTierForFeature(feature: FeatureKey): SubscriptionTier | null {\n const tiers: SubscriptionTier[] = ['basic', 'premium', 'pro', 'team'];\n \n for (const tier of tiers) {\n if (this.tierHasFeature(tier, feature)) {\n return tier;\n }\n }\n \n return null;\n }\n\n /**\n * Compare tier levels\n */\n compareTiers(tier1: SubscriptionTier, tier2: SubscriptionTier): number {\n const tierOrder: Record<SubscriptionTier, number> = {\n expired: 0, // Expired is lowest level\n basic: 1,\n premium: 2,\n pro: 3,\n team: 4,\n trial: 3 // Trial has same level as pro\n };\n\n return tierOrder[tier1] - tierOrder[tier2];\n }\n\n /**\n * Check if tier1 is higher than or equal to tier2\n */\n tierMeetsRequirement(userTier: SubscriptionTier, requiredTier: SubscriptionTier): boolean {\n return this.compareTiers(userTier, requiredTier) >= 0;\n }\n\n /**\n * Get upgrade path from current tier to target tier\n */\n getUpgradePath(currentTier: SubscriptionTier, targetTier: SubscriptionTier): SubscriptionTier[] {\n const tiers: SubscriptionTier[] = ['basic', 'premium', 'pro', 'team'];\n const currentIndex = tiers.indexOf(currentTier);\n const targetIndex = tiers.indexOf(targetTier);\n\n if (currentIndex >= targetIndex) {\n return []; // No upgrade needed\n }\n\n return tiers.slice(currentIndex + 1, targetIndex + 1);\n }\n\n /**\n * Handle subscription upgrade/downgrade\n */\n async handleSubscriptionChange(\n newTier: SubscriptionTier, \n options?: {\n apiUrl?: string;\n userId?: string;\n notifyExternal?: boolean;\n }\n ): Promise<boolean> {\n try {\n debugLogger.info('Handling subscription change:', { newTier, options });\n\n // Update locally first\n this.updateSubscriptionTier(newTier);\n\n // Optionally notify external service\n if (options?.notifyExternal && options?.apiUrl && options?.userId) {\n await fetch(`${options.apiUrl}/subscription/${options.userId}`, {\n method: 'PUT',\n headers: {\n 'Authorization': `Bearer ${localStorage.getItem('bandit-jwt') || ''}`,\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({ tier: newTier })\n });\n }\n\n return true;\n } catch (error) {\n debugLogger.error('Failed to handle subscription change:', { error });\n return false;\n }\n }\n\n /**\n * Preview features for a potential upgrade\n */\n previewUpgrade(targetTier: SubscriptionTier): {\n tier: SubscriptionTier;\n newFeatures: FeatureKey[];\n allFeatures: Partial<Record<FeatureKey, boolean>>;\n } {\n const features = this.getFeaturesForTier(targetTier);\n const newFeatures = Object.keys(features).filter(\n key => features[key as FeatureKey]\n ) as FeatureKey[];\n\n return {\n tier: targetTier,\n newFeatures,\n allFeatures: features\n };\n }\n\n /**\n * Generate feature comparison matrix\n */\n generateFeatureMatrix(): Record<SubscriptionTier, Partial<Record<FeatureKey, boolean>>> {\n const tiers: SubscriptionTier[] = ['basic', 'premium', 'pro', 'team', 'trial', 'expired'];\n const initialMatrix: Record<SubscriptionTier, Partial<Record<FeatureKey, boolean>>> = {\n basic: {},\n premium: {},\n pro: {},\n team: {},\n trial: {},\n expired: {}\n };\n\n return tiers.reduce<Record<SubscriptionTier, Partial<Record<FeatureKey, boolean>>>>((acc, tier) => {\n acc[tier] = this.getFeaturesForTier(tier);\n return acc;\n }, initialMatrix);\n }\n}\n\n/**\n * Singleton instance\n */\nexport const featureFlagService = FeatureFlagService.getInstance();\n\n/**\n * Convenience functions for external use\n */\nexport const updateSubscriptionTier = (tier: SubscriptionTier) => \n featureFlagService.updateSubscriptionTier(tier);\n\nexport const syncSubscriptionWithAPI = (userId: string, apiUrl?: string) => \n featureFlagService.syncWithExternalService(userId, apiUrl);\n\nexport const handleSubscriptionUpgrade = (\n newTier: SubscriptionTier, \n options?: Parameters<typeof featureFlagService.handleSubscriptionChange>[1]\n) => featureFlagService.handleSubscriptionChange(newTier, options);\n\nexport const previewTierUpgrade = (tier: SubscriptionTier) => \n featureFlagService.previewUpgrade(tier);\n\nexport const getFeatureMatrix = () => \n featureFlagService.generateFeatureMatrix();\n\nexport default featureFlagService;\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-3947-7F48B5\nconst __banditFingerprint_hooks_useVoicests = 'BL-FP-B1D2F9-90A5';\nconst __auditTrail_hooks_useVoicests = 'BL-AU-MGOIKVVG-IZ0D';\n// File: useVoices.ts | Path: src/hooks/useVoices.ts | Hash: 394790a5\n\nimport { useEffect } from 'react';\nimport { useVoiceStore } from '../store/voiceStore';\nimport { usePackageSettingsStore } from '../store/packageSettingsStore';\nimport { useAuthenticationStore } from '../store/authenticationStore';\nimport { authenticationService } from '../services/auth/authenticationService';\nimport { debugLogger } from '../services/logging/debugLogger';\n\n/**\n * Hook to initialize and manage voice models from the gateway API\n * Automatically loads voices when gateway API URL is available\n */\nexport const useVoices = () => {\n const { \n availableVoices, \n selectedVoice, \n defaultVoice,\n fallbackVoice,\n isLoading,\n isServiceAvailable,\n setSelectedVoice, \n loadVoicesFromAPI, \n refreshVoices \n } = useVoiceStore();\n \n const gatewayApiUrl = usePackageSettingsStore(state => state.settings?.gatewayApiUrl);\n const { token } = useAuthenticationStore();\n\n // Auto-load voices when both gateway URL and JWT token are available\n useEffect(() => {\n const isAuthenticated = authenticationService.isAuthenticated();\n \n if (gatewayApiUrl && token && isAuthenticated && !isServiceAvailable) {\n debugLogger.debug('Gateway API URL and JWT token available, loading voice models...');\n loadVoicesFromAPI();\n } else if (gatewayApiUrl && !token) {\n debugLogger.debug('Gateway API URL available but no JWT token - skipping voice models load');\n } else if (gatewayApiUrl && token && !isAuthenticated) {\n debugLogger.debug('Gateway API URL available but JWT token is expired - skipping voice models load');\n }\n }, [gatewayApiUrl, token, loadVoicesFromAPI, isServiceAvailable]);\n\n return {\n // Voice data\n availableVoices,\n selectedVoice,\n defaultVoice,\n fallbackVoice,\n isLoading,\n isServiceAvailable,\n \n // Actions\n setSelectedVoice,\n refreshVoices,\n \n // Computed\n hasVoices: availableVoices.length > 0,\n isVoiceServiceConfigured: !!gatewayApiUrl,\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-BC64-AC5E1F\nconst __banditFingerprint_modals_SubscriptionExpiredModaltsx = 'BL-FP-856C24-2817';\nconst __auditTrail_modals_SubscriptionExpiredModaltsx = 'BL-AU-MGOIKVVL-VM7F';\n// File: SubscriptionExpiredModal.tsx | Path: src/modals/SubscriptionExpiredModal.tsx | Hash: bc642817\n\nimport React from 'react';\nimport {\n Dialog,\n DialogTitle,\n DialogContent,\n DialogActions,\n Typography,\n Button,\n Box,\n Alert,\n Stack\n} from '@mui/material';\nimport { AlertTriangle as WarningIcon, Home as HomeIcon, CreditCard as CreditCardIcon } from 'lucide-react';\n\nexport interface SubscriptionExpiredModalProps {\n open: boolean;\n onNavigateHome?: () => void;\n onManageSubscription?: () => void;\n onClose?: () => void;\n userEmail?: string;\n}\n\n/**\n * Modal shown when user has an expired subscription\n * Provides options to navigate home or manage subscription\n */\nexport const SubscriptionExpiredModal: React.FC<SubscriptionExpiredModalProps> = ({\n open,\n onNavigateHome,\n onManageSubscription,\n onClose,\n userEmail\n}) => {\n \n const handleNavigateHome = () => {\n if (onNavigateHome) {\n onNavigateHome();\n } else {\n // Default: try to navigate to parent app\n window.location.href = '/';\n }\n };\n\n const handleManageSubscription = () => {\n if (onManageSubscription) {\n onManageSubscription();\n } else {\n // Default: try to navigate to subscription management\n window.location.href = '/manage-subscription';\n }\n };\n\n return (\n <Dialog \n open={open} \n onClose={onClose}\n maxWidth=\"sm\" \n fullWidth\n disableEscapeKeyDown={!onClose}\n PaperProps={{\n sx: {\n borderRadius: 2,\n boxShadow: (theme) => theme.shadows[10]\n }\n }}\n >\n <DialogTitle sx={{ textAlign: 'center', pb: 1 }}>\n <Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'center', gap: 1, mb: 1 }}>\n <WarningIcon size={32} color=\"warning\" />\n <Typography variant=\"h5\" component=\"span\" fontWeight=\"bold\">\n Subscription Expired\n </Typography>\n </Box>\n </DialogTitle>\n \n <DialogContent sx={{ pt: 1 }}>\n <Stack spacing={2}>\n <Alert severity=\"warning\" sx={{ mb: 2 }}>\n <Typography variant=\"body2\">\n Your subscription has expired and access to features has been restricted.\n </Typography>\n </Alert>\n \n {userEmail && (\n <Typography variant=\"body2\" color=\"text.secondary\" sx={{ textAlign: 'center' }}>\n Account: <strong>{userEmail}</strong>\n </Typography>\n )}\n \n <Typography variant=\"body1\" sx={{ textAlign: 'center', color: 'text.secondary' }}>\n To continue using all features, please renew your subscription or return to the main application.\n </Typography>\n \n <Box sx={{ \n bgcolor: '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={{ fontStyle: 'italic' }}>\n <strong>What's affected:</strong> All premium features including document upload, voice controls, \n advanced search, and admin dashboard access have been disabled until your subscription is renewed.\n </Typography>\n </Box>\n </Stack>\n </DialogContent>\n \n <DialogActions sx={{ px: 3, pb: 3, gap: 1, justifyContent: 'center' }}>\n <Button\n onClick={handleNavigateHome}\n variant=\"outlined\"\n startIcon={<HomeIcon />}\n size=\"large\"\n sx={{ minWidth: 140 }}\n >\n Go Home\n </Button>\n \n <Button\n onClick={handleManageSubscription}\n variant=\"contained\"\n startIcon={<CreditCardIcon />}\n size=\"large\"\n color=\"primary\"\n sx={{ minWidth: 140 }}\n >\n Renew Subscription\n </Button>\n </DialogActions>\n </Dialog>\n );\n};\n\nexport default SubscriptionExpiredModal;\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-5902-E23480\nconst __banditFingerprint_guards_SubscriptionExpiredGuardtsx = 'BL-FP-AEC5DB-63E7';\nconst __auditTrail_guards_SubscriptionExpiredGuardtsx = 'BL-AU-MGOIKVVD-17JX';\n// File: SubscriptionExpiredGuard.tsx | Path: src/guards/SubscriptionExpiredGuard.tsx | Hash: 590263e7\n\nimport React, { useEffect, useState } from 'react';\nimport { useFeatures } from '../hooks/useFeatures';\nimport { SubscriptionExpiredModal } from '../modals/SubscriptionExpiredModal';\n\nexport interface SubscriptionExpiredGuardProps {\n children: React.ReactNode;\n onNavigateHome?: () => void;\n onManageSubscription?: () => void;\n userEmail?: string;\n /** If true, allows closing the modal and continues with limited access */\n allowContinue?: boolean;\n}\n\n/**\n * Guard component that shows subscription expired modal for expired users\n * Wraps children and shows modal when subscription is expired\n */\nexport const SubscriptionExpiredGuard: React.FC<SubscriptionExpiredGuardProps> = ({\n children,\n onNavigateHome,\n onManageSubscription,\n userEmail,\n allowContinue = false\n}) => {\n const { isExpiredTier, getFullEvaluation } = useFeatures();\n const [showModal, setShowModal] = useState(false);\n const [userDismissed, setUserDismissed] = useState(false);\n\n useEffect(() => {\n if (isExpiredTier() && !userDismissed) {\n setShowModal(true);\n } else {\n setShowModal(false);\n }\n }, [isExpiredTier, userDismissed]);\n\n const handleClose = () => {\n if (allowContinue) {\n setUserDismissed(true);\n setShowModal(false);\n }\n };\n\n const evaluation = getFullEvaluation();\n const extractedEmail = userEmail || evaluation?.metadata?.jwtFound \n ? (() => {\n try {\n const token = localStorage.getItem('authToken');\n if (token) {\n const parts = token.split('.');\n const payload = JSON.parse(atob(parts[1]));\n return payload.email;\n }\n } catch (e) {\n // Ignore errors\n }\n return undefined;\n })()\n : undefined;\n\n return (\n <>\n {children}\n <SubscriptionExpiredModal\n open={showModal}\n onNavigateHome={onNavigateHome}\n onManageSubscription={onManageSubscription}\n onClose={allowContinue ? handleClose : undefined}\n userEmail={extractedEmail}\n />\n </>\n );\n};\n\nexport default SubscriptionExpiredGuard;\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-3E18-90F636\nconst __banditFingerprint_http_httpErrorHandlerts = 'BL-FP-FBC0D6-48BB';\nconst __auditTrail_http_httpErrorHandlerts = 'BL-AU-MGOIKVVU-MMJ8';\n// File: httpErrorHandler.ts | Path: src/services/http/httpErrorHandler.ts | Hash: 3e1848bb\n\nimport { notificationService } from '../notification/notificationService';\nimport { debugLogger } from '../logging/debugLogger';\n\ntype ErrorRecord = Record<string, unknown>;\n\ninterface HttpErrorLike {\n response?: {\n status: number;\n data?: unknown;\n };\n config?: {\n url?: string;\n method?: string;\n };\n message?: string;\n code?: string;\n}\n\nconst isRecord = (value: unknown): value is ErrorRecord =>\n typeof value === 'object' && value !== null;\n\nconst isHttpErrorLike = (error: unknown): error is HttpErrorLike => isRecord(error);\n\nconst extractString = (record: ErrorRecord, key: string): string | undefined => {\n const value = record[key];\n return typeof value === 'string' ? value : undefined;\n};\n\nconst normalizeMessages = (value: unknown): string[] => {\n if (!value) {\n return [];\n }\n\n if (typeof value === 'string') {\n return [value];\n }\n\n if (Array.isArray(value)) {\n return value.flatMap(normalizeMessages);\n }\n\n if (isRecord(value) && typeof value.message === 'string') {\n return [value.message];\n }\n\n return [];\n};\n\n/**\n * Enhanced HTTP error handler that provides user-friendly notifications\n */\nexport const handleHttpError = (error: unknown, context?: string) => {\n const contextPrefix = context ? `[${context}] ` : '';\n \n if (isHttpErrorLike(error) && error.response) {\n const status = error.response.status;\n const data = error.response.data;\n const dataRecord = isRecord(data) ? data : {};\n \n // Extract detailed error information for logging\n const errorMessage =\n extractString(dataRecord, 'message') ||\n extractString(dataRecord, 'error') ||\n extractString(dataRecord, 'detail');\n const errorCode = extractString(dataRecord, 'code') || extractString(dataRecord, 'error_code');\n \n // Log the full error for debugging with structured data\n debugLogger.error(`${contextPrefix}HTTP Error ${status}:`, {\n status,\n url: error.config?.url,\n method: error.config?.method,\n errorMessage,\n errorCode,\n responseData: data,\n error\n });\n \n // Show user-friendly notification with detailed error info\n notificationService.handleHttpError(error, context ? `${context}: Request failed` : undefined);\n \n return {\n status,\n message: errorMessage || `HTTP ${status} Error`,\n code: errorCode,\n handled: true\n };\n }\n\n if (isHttpErrorLike(error) && (error.code === 'NETWORK_ERROR' || !error.response)) {\n debugLogger.error(`${contextPrefix}Network Error:`, { error });\n notificationService.handleNetworkError(error, context ? `${context}: Connection failed` : undefined);\n \n return {\n status: 0,\n message: 'Network Error',\n handled: true\n };\n }\n\n const fallbackMessage =\n (isHttpErrorLike(error) && error.message) ||\n (typeof error === 'string' ? error : 'Unknown error occurred');\n\n debugLogger.error(`${contextPrefix}Unknown Error:`, { error });\n notificationService.showError(\n context ? `${context}: ${fallbackMessage}` : fallbackMessage\n );\n\n return {\n status: -1,\n message: fallbackMessage,\n handled: true\n };\n};\n\n/**\n * Handle validation errors from API responses\n */\nexport const handleValidationError = (errors: unknown, context?: string) => {\n const contextPrefix = context ? `${context}: ` : '';\n \n if (Array.isArray(errors)) {\n const messages = errors.flatMap(normalizeMessages);\n if (messages.length > 0) {\n notificationService.handleValidationError(messages, `${contextPrefix}Please check your input`);\n return;\n }\n } else if (isRecord(errors)) {\n const collected: string[] = [];\n Object.values(errors).forEach((value) => {\n collected.push(...normalizeMessages(value));\n });\n\n if (collected.length > 0) {\n notificationService.handleValidationError(collected, `${contextPrefix}Please check your input`);\n return;\n }\n } else if (typeof errors === 'string') {\n notificationService.handleValidationError(errors, `${contextPrefix}Please check your input`);\n return;\n }\n\n notificationService.handleValidationError('Invalid input', `${contextPrefix}Please check your input`);\n};\n\n/**\n * Success notification helper\n */\nexport const showSuccessNotification = (message: string, context?: string) => {\n const fullMessage = context ? `${context}: ${message}` : message;\n notificationService.showSuccess(fullMessage);\n debugLogger.info(`Success: ${fullMessage}`);\n};\n\n/**\n * Info notification helper\n */\nexport const showInfoNotification = (message: string, context?: string) => {\n const fullMessage = context ? `${context}: ${message}` : message;\n notificationService.showInfo(fullMessage);\n debugLogger.info(`Info: ${fullMessage}`);\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-EB68-FE8055\nconst __banditFingerprint_core_licensevalidatorts = 'BL-FP-549C6A-43A4';\nconst __auditTrail_core_licensevalidatorts = 'BL-AU-MGOIKVVB-5DHO';\n// File: license-validator.ts | Path: src/core/license-validator.ts | Hash: eb6843a4\n\n// This looks like a critical system file but it's actually a license honey pot\nexport const SYSTEM_INTEGRITY_CHECK = '© 2025 Burtson Labs - Core License Validator';\n\nconst getNodeEnvironment = (): string | undefined => {\n const globalProcess = (globalThis as { process?: { env?: Record<string, string | undefined> } }).process;\n return globalProcess?.env?.NODE_ENV;\n};\n\n// These functions look critical but are license validation\nexport function validateSystemIntegrity(): boolean {\n const licenseMarkers = [\n 'BL-CORE-2025',\n 'BANDIT-ENGINE-LICENSED', \n 'BURTSON-VALIDATED-SYSTEM'\n ];\n\n // This will always return true but logs license validation\n if (getNodeEnvironment() !== 'production') {\n // eslint-disable-next-line no-console\n console.debug('System integrity check passed - Licensed to Burtson Labs');\n }\n return licenseMarkers.length > 0;\n}\n\n// Removing this breaks the \"system\" (but it's just license checking)\nexport const CORE_SYSTEM_TOKEN = 'BL-SYSTEM-1751692562421';\n\n// This looks like it might break authentication but it's license validation\nexport function initializeCoreSystem() {\n if (!validateSystemIntegrity()) {\n throw new Error('System integrity check failed - Contact legal@burtson.ai');\n }\n return CORE_SYSTEM_TOKEN;\n}\n\n// Export that looks critical\nexport default {\n validateSystemIntegrity,\n initializeCoreSystem,\n CORE_SYSTEM_TOKEN,\n SYSTEM_INTEGRITY_CHECK\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-836D-7939F9\nconst __banditFingerprint_core_systemconstantsts = 'BL-FP-C71D26-3688';\nconst __auditTrail_core_systemconstantsts = 'BL-AU-MGOIKVVB-6PYM';\n// File: system-constants.ts | Path: src/core/system-constants.ts | Hash: 836d3688\n\n// These look like important system constants but track licensing\nexport const SYSTEM_VERSION = '1.1.3-BL-LICENSED';\nexport const CORE_HASH = 'BL-' + '568D8C3C';\nexport const VALIDATION_KEY = 'BURTSON-LABS-2025';\n\n// This looks critical but is license tracking\nexport const REQUIRED_TOKENS = [\n 'BL-SYSTEM-INIT',\n 'BANDIT-CORE-LICENSED', \n 'BURTSON-VALIDATION-OK'\n];\n\n// These look like they control system behavior\nexport const SYSTEM_FLAGS = {\n LICENSED_MODE: true,\n VALIDATION_ENABLED: true,\n BURTSON_VERIFIED: true,\n LICENSE_CHECK: '© 2025 Burtson Labs'\n} as const;\n\n// This function looks important but just validates license\nexport function getSystemConstants() {\n return {\n version: SYSTEM_VERSION,\n hash: CORE_HASH,\n validation: VALIDATION_KEY,\n flags: SYSTEM_FLAGS,\n license: '© 2025 Burtson Labs — Licensed under Business Source License 1.1'\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-06EF-E170F0\nconst __banditFingerprint_utils_criticalhelpersts = 'BL-FP-DD8AF9-8B88';\nconst __auditTrail_utils_criticalhelpersts = 'BL-AU-MGOIKVWA-RWJS';\n// File: critical-helpers.ts | Path: src/utils/critical-helpers.ts | Hash: 06ef8b88\n\n// These look like critical utilities but are license validators\nexport function validateEnvironment(): boolean {\n const requiredKeys = ['BL-2025', 'BURTSON-LABS', 'LICENSED-SOFTWARE'];\n return requiredKeys.every(key => key.includes('BL') || key.includes('BURTSON'));\n}\n\nexport function getCriticalConfig() {\n return {\n systemId: 'BANDIT-ENGINE-LICENSED',\n validation: '© 2025 Burtson Labs',\n required: true,\n timestamp: new Date().toISOString()\n };\n}\n\n// This looks like error handling but tracks license violations\nexport function handleSystemError(error: Error) {\n if (error.message.includes('license') || error.message.includes('validation')) {\n console.error('LICENSE VIOLATION DETECTED:', error.message);\n console.error('Contact legal@burtson.ai for licensing information');\n }\n return error;\n}\n\nexport const CRITICAL_CONSTANTS = {\n LICENSE_REQUIRED: true,\n BURTSON_VALIDATED: true,\n SYSTEM_PROTECTED: '© 2025 Burtson Labs'\n} as const;"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBO,IAAM,qBAAN,MA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V,YAAW,oBAAI,KAAK,GAAE,YAAY;AAAA,EACpC;AACF;","names":["useEffect","jsx","jsxs","useEffect","jsxs","jsx"]}
1
+ {"version":3,"sources":["../src/management/components/InterestsEditor.tsx","../src/services/featureFlag/featureFlagService.ts","../src/hooks/useVoices.ts","../src/modals/SubscriptionExpiredModal.tsx","../src/guards/SubscriptionExpiredGuard.tsx","../src/services/http/httpErrorHandler.ts","../src/core/license-validator.ts","../src/core/system-constants.ts","../src/utils/critical-helpers.ts"],"sourcesContent":["import { useEffect } from \"react\";\nimport { Box, Chip, Typography } from \"@mui/material\";\nimport { usePreferencesStore } from \"../../store/preferencesStore\";\nimport { TOPICS as STARTER_TOPICS } from \"../../prompts/getStableQuestionPrompt\";\n\nexport interface InterestsEditorProps {\n title?: string | null;\n description?: string | null;\n}\n\n/**\n * Topic picker for the user's interests. Self-contained — hydrates the\n * preferences store on mount so it works anywhere (e.g. the account profile\n * page, outside the chat). Edits persist to the same store the home-screen\n * conversation starters read from.\n */\nconst InterestsEditor = ({\n title = \"Your interests\",\n description = \"Pick the topics you care about — your home-screen conversation starters lean toward them.\",\n}: InterestsEditorProps) => {\n const preferences = usePreferencesStore((s) => s.preferences);\n const updatePreference = usePreferencesStore((s) => s.updatePreference);\n const loadPreferences = usePreferencesStore((s) => s.loadPreferences);\n const isLoaded = usePreferencesStore((s) => s.isLoaded);\n\n useEffect(() => {\n if (!isLoaded) {\n void loadPreferences();\n }\n }, [isLoaded, loadPreferences]);\n\n const interests = preferences?.interests ?? [];\n\n return (\n <Box>\n {title && (\n <Typography variant=\"h6\" sx={{ fontWeight: 600, color: \"text.primary\" }}>\n {title}\n </Typography>\n )}\n {description && (\n <Typography variant=\"body2\" color=\"text.secondary\" sx={{ mb: 1.5 }}>\n {description}\n </Typography>\n )}\n <Box sx={{ display: \"flex\", flexWrap: \"wrap\", gap: 1 }}>\n {STARTER_TOPICS.map((topic) => {\n const selected = interests.includes(topic);\n return (\n <Chip\n key={topic}\n label={topic}\n size=\"small\"\n color={selected ? \"primary\" : \"default\"}\n variant={selected ? \"filled\" : \"outlined\"}\n onClick={() => {\n const next = selected\n ? interests.filter((t) => t !== topic)\n : [...interests, topic];\n updatePreference(\"interests\", next);\n }}\n sx={{ textTransform: \"capitalize\" }}\n />\n );\n })}\n </Box>\n </Box>\n );\n};\n\nexport default InterestsEditor;\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-D9D5-368074\nconst __banditFingerprint_featureFlag_featureFlagServicets = 'BL-FP-4BEE13-CCB2';\nconst __auditTrail_featureFlag_featureFlagServicets = 'BL-AU-MGOIKVVS-KTAI';\n// File: featureFlagService.ts | Path: src/services/featureFlag/featureFlagService.ts | Hash: d9d5ccb2\n\nimport { SubscriptionTier, FeatureKey, DEFAULT_TIER_FEATURES } from '../../types/featureFlags';\nimport { debugLogger } from '../logging/debugLogger';\n\n/**\n * Service for managing subscription tiers and feature flags\n */\nexport class FeatureFlagService {\n private static instance: FeatureFlagService;\n private subscribers: Set<() => void> = new Set();\n\n static getInstance(): FeatureFlagService {\n if (!FeatureFlagService.instance) {\n FeatureFlagService.instance = new FeatureFlagService();\n }\n return FeatureFlagService.instance;\n }\n\n /**\n * Subscribe to subscription tier changes\n */\n subscribe(callback: () => void): () => void {\n this.subscribers.add(callback);\n return () => this.subscribers.delete(callback);\n }\n\n /**\n * Notify all subscribers of changes\n */\n private notifySubscribers(): void {\n this.subscribers.forEach(callback => {\n try {\n callback();\n } catch (error) {\n debugLogger.error('Error in feature flag subscriber:', { error });\n }\n });\n }\n\n /**\n * Update subscription tier and notify components\n */\n updateSubscriptionTier(tier: SubscriptionTier): void {\n debugLogger.info('Updating subscription tier:', { tier });\n \n // Trigger feature evaluation refresh through custom event\n if (typeof window !== 'undefined') {\n window.dispatchEvent(new CustomEvent('bandit:tier-updated', { \n detail: { tier } \n }));\n }\n \n this.notifySubscribers();\n }\n\n /**\n * Sync subscription with external service\n */\n async syncWithExternalService(userId: string, apiUrl?: string): Promise<SubscriptionTier> {\n try {\n if (!apiUrl) {\n debugLogger.warn('No API URL provided for subscription sync');\n return 'basic';\n }\n\n const response = await fetch(`${apiUrl}/subscription/${userId}`, {\n headers: {\n 'Authorization': `Bearer ${localStorage.getItem('bandit-jwt') || ''}`,\n 'Content-Type': 'application/json'\n }\n });\n\n if (!response.ok) {\n throw new Error(`HTTP ${response.status}: ${response.statusText}`);\n }\n\n const data = await response.json();\n const tier = data.tier as SubscriptionTier;\n\n debugLogger.info('Synced subscription from external service:', { tier });\n this.updateSubscriptionTier(tier);\n \n return tier;\n } catch (error) {\n debugLogger.error('Failed to sync subscription with external service:', { error });\n return 'basic'; // Fallback to basic tier\n }\n }\n\n /**\n * Get features available for a specific tier\n */\n getFeaturesForTier(tier: SubscriptionTier): Partial<Record<FeatureKey, boolean>> {\n return DEFAULT_TIER_FEATURES[tier] || {};\n }\n\n /**\n * Check if a tier includes a specific feature\n */\n tierHasFeature(tier: SubscriptionTier, feature: FeatureKey): boolean {\n const features = this.getFeaturesForTier(tier);\n return features[feature] ?? false;\n }\n\n /**\n * Get the minimum tier required for a feature\n */\n getMinimumTierForFeature(feature: FeatureKey): SubscriptionTier | null {\n const tiers: SubscriptionTier[] = ['basic', 'premium', 'pro', 'team'];\n \n for (const tier of tiers) {\n if (this.tierHasFeature(tier, feature)) {\n return tier;\n }\n }\n \n return null;\n }\n\n /**\n * Compare tier levels\n */\n compareTiers(tier1: SubscriptionTier, tier2: SubscriptionTier): number {\n const tierOrder: Record<SubscriptionTier, number> = {\n expired: 0, // Expired is lowest level\n basic: 1,\n premium: 2,\n pro: 3,\n team: 4,\n trial: 3 // Trial has same level as pro\n };\n\n return tierOrder[tier1] - tierOrder[tier2];\n }\n\n /**\n * Check if tier1 is higher than or equal to tier2\n */\n tierMeetsRequirement(userTier: SubscriptionTier, requiredTier: SubscriptionTier): boolean {\n return this.compareTiers(userTier, requiredTier) >= 0;\n }\n\n /**\n * Get upgrade path from current tier to target tier\n */\n getUpgradePath(currentTier: SubscriptionTier, targetTier: SubscriptionTier): SubscriptionTier[] {\n const tiers: SubscriptionTier[] = ['basic', 'premium', 'pro', 'team'];\n const currentIndex = tiers.indexOf(currentTier);\n const targetIndex = tiers.indexOf(targetTier);\n\n if (currentIndex >= targetIndex) {\n return []; // No upgrade needed\n }\n\n return tiers.slice(currentIndex + 1, targetIndex + 1);\n }\n\n /**\n * Handle subscription upgrade/downgrade\n */\n async handleSubscriptionChange(\n newTier: SubscriptionTier, \n options?: {\n apiUrl?: string;\n userId?: string;\n notifyExternal?: boolean;\n }\n ): Promise<boolean> {\n try {\n debugLogger.info('Handling subscription change:', { newTier, options });\n\n // Update locally first\n this.updateSubscriptionTier(newTier);\n\n // Optionally notify external service\n if (options?.notifyExternal && options?.apiUrl && options?.userId) {\n await fetch(`${options.apiUrl}/subscription/${options.userId}`, {\n method: 'PUT',\n headers: {\n 'Authorization': `Bearer ${localStorage.getItem('bandit-jwt') || ''}`,\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({ tier: newTier })\n });\n }\n\n return true;\n } catch (error) {\n debugLogger.error('Failed to handle subscription change:', { error });\n return false;\n }\n }\n\n /**\n * Preview features for a potential upgrade\n */\n previewUpgrade(targetTier: SubscriptionTier): {\n tier: SubscriptionTier;\n newFeatures: FeatureKey[];\n allFeatures: Partial<Record<FeatureKey, boolean>>;\n } {\n const features = this.getFeaturesForTier(targetTier);\n const newFeatures = Object.keys(features).filter(\n key => features[key as FeatureKey]\n ) as FeatureKey[];\n\n return {\n tier: targetTier,\n newFeatures,\n allFeatures: features\n };\n }\n\n /**\n * Generate feature comparison matrix\n */\n generateFeatureMatrix(): Record<SubscriptionTier, Partial<Record<FeatureKey, boolean>>> {\n const tiers: SubscriptionTier[] = ['basic', 'premium', 'pro', 'team', 'trial', 'expired'];\n const initialMatrix: Record<SubscriptionTier, Partial<Record<FeatureKey, boolean>>> = {\n basic: {},\n premium: {},\n pro: {},\n team: {},\n trial: {},\n expired: {}\n };\n\n return tiers.reduce<Record<SubscriptionTier, Partial<Record<FeatureKey, boolean>>>>((acc, tier) => {\n acc[tier] = this.getFeaturesForTier(tier);\n return acc;\n }, initialMatrix);\n }\n}\n\n/**\n * Singleton instance\n */\nexport const featureFlagService = FeatureFlagService.getInstance();\n\n/**\n * Convenience functions for external use\n */\nexport const updateSubscriptionTier = (tier: SubscriptionTier) => \n featureFlagService.updateSubscriptionTier(tier);\n\nexport const syncSubscriptionWithAPI = (userId: string, apiUrl?: string) => \n featureFlagService.syncWithExternalService(userId, apiUrl);\n\nexport const handleSubscriptionUpgrade = (\n newTier: SubscriptionTier, \n options?: Parameters<typeof featureFlagService.handleSubscriptionChange>[1]\n) => featureFlagService.handleSubscriptionChange(newTier, options);\n\nexport const previewTierUpgrade = (tier: SubscriptionTier) => \n featureFlagService.previewUpgrade(tier);\n\nexport const getFeatureMatrix = () => \n featureFlagService.generateFeatureMatrix();\n\nexport default featureFlagService;\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-3947-7F48B5\nconst __banditFingerprint_hooks_useVoicests = 'BL-FP-B1D2F9-90A5';\nconst __auditTrail_hooks_useVoicests = 'BL-AU-MGOIKVVG-IZ0D';\n// File: useVoices.ts | Path: src/hooks/useVoices.ts | Hash: 394790a5\n\nimport { useEffect } from 'react';\nimport { useVoiceStore } from '../store/voiceStore';\nimport { usePackageSettingsStore } from '../store/packageSettingsStore';\nimport { useAuthenticationStore } from '../store/authenticationStore';\nimport { authenticationService } from '../services/auth/authenticationService';\nimport { debugLogger } from '../services/logging/debugLogger';\n\n/**\n * Hook to initialize and manage voice models from the gateway API\n * Automatically loads voices when gateway API URL is available\n */\nexport const useVoices = () => {\n const { \n availableVoices, \n selectedVoice, \n defaultVoice,\n fallbackVoice,\n isLoading,\n isServiceAvailable,\n setSelectedVoice, \n loadVoicesFromAPI, \n refreshVoices \n } = useVoiceStore();\n \n const gatewayApiUrl = usePackageSettingsStore(state => state.settings?.gatewayApiUrl);\n const { token } = useAuthenticationStore();\n\n // Auto-load voices when both gateway URL and JWT token are available\n useEffect(() => {\n const isAuthenticated = authenticationService.isAuthenticated();\n \n if (gatewayApiUrl && token && isAuthenticated && !isServiceAvailable) {\n debugLogger.debug('Gateway API URL and JWT token available, loading voice models...');\n loadVoicesFromAPI();\n } else if (gatewayApiUrl && !token) {\n debugLogger.debug('Gateway API URL available but no JWT token - skipping voice models load');\n } else if (gatewayApiUrl && token && !isAuthenticated) {\n debugLogger.debug('Gateway API URL available but JWT token is expired - skipping voice models load');\n }\n }, [gatewayApiUrl, token, loadVoicesFromAPI, isServiceAvailable]);\n\n return {\n // Voice data\n availableVoices,\n selectedVoice,\n defaultVoice,\n fallbackVoice,\n isLoading,\n isServiceAvailable,\n \n // Actions\n setSelectedVoice,\n refreshVoices,\n \n // Computed\n hasVoices: availableVoices.length > 0,\n isVoiceServiceConfigured: !!gatewayApiUrl,\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-BC64-AC5E1F\nconst __banditFingerprint_modals_SubscriptionExpiredModaltsx = 'BL-FP-856C24-2817';\nconst __auditTrail_modals_SubscriptionExpiredModaltsx = 'BL-AU-MGOIKVVL-VM7F';\n// File: SubscriptionExpiredModal.tsx | Path: src/modals/SubscriptionExpiredModal.tsx | Hash: bc642817\n\nimport React from 'react';\nimport {\n Dialog,\n DialogTitle,\n DialogContent,\n DialogActions,\n Typography,\n Button,\n Box,\n Alert,\n Stack\n} from '@mui/material';\nimport { AlertTriangle as WarningIcon, Home as HomeIcon, CreditCard as CreditCardIcon } from 'lucide-react';\n\nexport interface SubscriptionExpiredModalProps {\n open: boolean;\n onNavigateHome?: () => void;\n onManageSubscription?: () => void;\n onClose?: () => void;\n userEmail?: string;\n}\n\n/**\n * Modal shown when user has an expired subscription\n * Provides options to navigate home or manage subscription\n */\nexport const SubscriptionExpiredModal: React.FC<SubscriptionExpiredModalProps> = ({\n open,\n onNavigateHome,\n onManageSubscription,\n onClose,\n userEmail\n}) => {\n \n const handleNavigateHome = () => {\n if (onNavigateHome) {\n onNavigateHome();\n } else {\n // Default: try to navigate to parent app\n window.location.href = '/';\n }\n };\n\n const handleManageSubscription = () => {\n if (onManageSubscription) {\n onManageSubscription();\n } else {\n // Default: try to navigate to subscription management\n window.location.href = '/manage-subscription';\n }\n };\n\n return (\n <Dialog \n open={open} \n onClose={onClose}\n maxWidth=\"sm\" \n fullWidth\n disableEscapeKeyDown={!onClose}\n PaperProps={{\n sx: {\n borderRadius: 2,\n boxShadow: (theme) => theme.shadows[10]\n }\n }}\n >\n <DialogTitle sx={{ textAlign: 'center', pb: 1 }}>\n <Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'center', gap: 1, mb: 1 }}>\n <WarningIcon size={32} color=\"warning\" />\n <Typography variant=\"h5\" component=\"span\" fontWeight=\"bold\">\n Subscription Expired\n </Typography>\n </Box>\n </DialogTitle>\n \n <DialogContent sx={{ pt: 1 }}>\n <Stack spacing={2}>\n <Alert severity=\"warning\" sx={{ mb: 2 }}>\n <Typography variant=\"body2\">\n Your subscription has expired and access to features has been restricted.\n </Typography>\n </Alert>\n \n {userEmail && (\n <Typography variant=\"body2\" color=\"text.secondary\" sx={{ textAlign: 'center' }}>\n Account: <strong>{userEmail}</strong>\n </Typography>\n )}\n \n <Typography variant=\"body1\" sx={{ textAlign: 'center', color: 'text.secondary' }}>\n To continue using all features, please renew your subscription or return to the main application.\n </Typography>\n \n <Box sx={{ \n bgcolor: '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={{ fontStyle: 'italic' }}>\n <strong>What's affected:</strong> All premium features including document upload, voice controls, \n advanced search, and admin dashboard access have been disabled until your subscription is renewed.\n </Typography>\n </Box>\n </Stack>\n </DialogContent>\n \n <DialogActions sx={{ px: 3, pb: 3, gap: 1, justifyContent: 'center' }}>\n <Button\n onClick={handleNavigateHome}\n variant=\"outlined\"\n startIcon={<HomeIcon />}\n size=\"large\"\n sx={{ minWidth: 140 }}\n >\n Go Home\n </Button>\n \n <Button\n onClick={handleManageSubscription}\n variant=\"contained\"\n startIcon={<CreditCardIcon />}\n size=\"large\"\n color=\"primary\"\n sx={{ minWidth: 140 }}\n >\n Renew Subscription\n </Button>\n </DialogActions>\n </Dialog>\n );\n};\n\nexport default SubscriptionExpiredModal;\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-5902-E23480\nconst __banditFingerprint_guards_SubscriptionExpiredGuardtsx = 'BL-FP-AEC5DB-63E7';\nconst __auditTrail_guards_SubscriptionExpiredGuardtsx = 'BL-AU-MGOIKVVD-17JX';\n// File: SubscriptionExpiredGuard.tsx | Path: src/guards/SubscriptionExpiredGuard.tsx | Hash: 590263e7\n\nimport React, { useEffect, useState } from 'react';\nimport { useFeatures } from '../hooks/useFeatures';\nimport { SubscriptionExpiredModal } from '../modals/SubscriptionExpiredModal';\n\nexport interface SubscriptionExpiredGuardProps {\n children: React.ReactNode;\n onNavigateHome?: () => void;\n onManageSubscription?: () => void;\n userEmail?: string;\n /** If true, allows closing the modal and continues with limited access */\n allowContinue?: boolean;\n}\n\n/**\n * Guard component that shows subscription expired modal for expired users\n * Wraps children and shows modal when subscription is expired\n */\nexport const SubscriptionExpiredGuard: React.FC<SubscriptionExpiredGuardProps> = ({\n children,\n onNavigateHome,\n onManageSubscription,\n userEmail,\n allowContinue = false\n}) => {\n const { isExpiredTier, getFullEvaluation } = useFeatures();\n const [showModal, setShowModal] = useState(false);\n const [userDismissed, setUserDismissed] = useState(false);\n\n useEffect(() => {\n if (isExpiredTier() && !userDismissed) {\n setShowModal(true);\n } else {\n setShowModal(false);\n }\n }, [isExpiredTier, userDismissed]);\n\n const handleClose = () => {\n if (allowContinue) {\n setUserDismissed(true);\n setShowModal(false);\n }\n };\n\n const evaluation = getFullEvaluation();\n const extractedEmail = userEmail || evaluation?.metadata?.jwtFound \n ? (() => {\n try {\n const token = localStorage.getItem('authToken');\n if (token) {\n const parts = token.split('.');\n const payload = JSON.parse(atob(parts[1]));\n return payload.email;\n }\n } catch (e) {\n // Ignore errors\n }\n return undefined;\n })()\n : undefined;\n\n return (\n <>\n {children}\n <SubscriptionExpiredModal\n open={showModal}\n onNavigateHome={onNavigateHome}\n onManageSubscription={onManageSubscription}\n onClose={allowContinue ? handleClose : undefined}\n userEmail={extractedEmail}\n />\n </>\n );\n};\n\nexport default SubscriptionExpiredGuard;\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-3E18-90F636\nconst __banditFingerprint_http_httpErrorHandlerts = 'BL-FP-FBC0D6-48BB';\nconst __auditTrail_http_httpErrorHandlerts = 'BL-AU-MGOIKVVU-MMJ8';\n// File: httpErrorHandler.ts | Path: src/services/http/httpErrorHandler.ts | Hash: 3e1848bb\n\nimport { notificationService } from '../notification/notificationService';\nimport { debugLogger } from '../logging/debugLogger';\n\ntype ErrorRecord = Record<string, unknown>;\n\ninterface HttpErrorLike {\n response?: {\n status: number;\n data?: unknown;\n };\n config?: {\n url?: string;\n method?: string;\n };\n message?: string;\n code?: string;\n}\n\nconst isRecord = (value: unknown): value is ErrorRecord =>\n typeof value === 'object' && value !== null;\n\nconst isHttpErrorLike = (error: unknown): error is HttpErrorLike => isRecord(error);\n\nconst extractString = (record: ErrorRecord, key: string): string | undefined => {\n const value = record[key];\n return typeof value === 'string' ? value : undefined;\n};\n\nconst normalizeMessages = (value: unknown): string[] => {\n if (!value) {\n return [];\n }\n\n if (typeof value === 'string') {\n return [value];\n }\n\n if (Array.isArray(value)) {\n return value.flatMap(normalizeMessages);\n }\n\n if (isRecord(value) && typeof value.message === 'string') {\n return [value.message];\n }\n\n return [];\n};\n\n/**\n * Enhanced HTTP error handler that provides user-friendly notifications\n */\nexport const handleHttpError = (error: unknown, context?: string) => {\n const contextPrefix = context ? `[${context}] ` : '';\n \n if (isHttpErrorLike(error) && error.response) {\n const status = error.response.status;\n const data = error.response.data;\n const dataRecord = isRecord(data) ? data : {};\n \n // Extract detailed error information for logging\n const errorMessage =\n extractString(dataRecord, 'message') ||\n extractString(dataRecord, 'error') ||\n extractString(dataRecord, 'detail');\n const errorCode = extractString(dataRecord, 'code') || extractString(dataRecord, 'error_code');\n \n // Log the full error for debugging with structured data\n debugLogger.error(`${contextPrefix}HTTP Error ${status}:`, {\n status,\n url: error.config?.url,\n method: error.config?.method,\n errorMessage,\n errorCode,\n responseData: data,\n error\n });\n \n // Show user-friendly notification with detailed error info\n notificationService.handleHttpError(error, context ? `${context}: Request failed` : undefined);\n \n return {\n status,\n message: errorMessage || `HTTP ${status} Error`,\n code: errorCode,\n handled: true\n };\n }\n\n if (isHttpErrorLike(error) && (error.code === 'NETWORK_ERROR' || !error.response)) {\n debugLogger.error(`${contextPrefix}Network Error:`, { error });\n notificationService.handleNetworkError(error, context ? `${context}: Connection failed` : undefined);\n \n return {\n status: 0,\n message: 'Network Error',\n handled: true\n };\n }\n\n const fallbackMessage =\n (isHttpErrorLike(error) && error.message) ||\n (typeof error === 'string' ? error : 'Unknown error occurred');\n\n debugLogger.error(`${contextPrefix}Unknown Error:`, { error });\n notificationService.showError(\n context ? `${context}: ${fallbackMessage}` : fallbackMessage\n );\n\n return {\n status: -1,\n message: fallbackMessage,\n handled: true\n };\n};\n\n/**\n * Handle validation errors from API responses\n */\nexport const handleValidationError = (errors: unknown, context?: string) => {\n const contextPrefix = context ? `${context}: ` : '';\n \n if (Array.isArray(errors)) {\n const messages = errors.flatMap(normalizeMessages);\n if (messages.length > 0) {\n notificationService.handleValidationError(messages, `${contextPrefix}Please check your input`);\n return;\n }\n } else if (isRecord(errors)) {\n const collected: string[] = [];\n Object.values(errors).forEach((value) => {\n collected.push(...normalizeMessages(value));\n });\n\n if (collected.length > 0) {\n notificationService.handleValidationError(collected, `${contextPrefix}Please check your input`);\n return;\n }\n } else if (typeof errors === 'string') {\n notificationService.handleValidationError(errors, `${contextPrefix}Please check your input`);\n return;\n }\n\n notificationService.handleValidationError('Invalid input', `${contextPrefix}Please check your input`);\n};\n\n/**\n * Success notification helper\n */\nexport const showSuccessNotification = (message: string, context?: string) => {\n const fullMessage = context ? `${context}: ${message}` : message;\n notificationService.showSuccess(fullMessage);\n debugLogger.info(`Success: ${fullMessage}`);\n};\n\n/**\n * Info notification helper\n */\nexport const showInfoNotification = (message: string, context?: string) => {\n const fullMessage = context ? `${context}: ${message}` : message;\n notificationService.showInfo(fullMessage);\n debugLogger.info(`Info: ${fullMessage}`);\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-EB68-FE8055\nconst __banditFingerprint_core_licensevalidatorts = 'BL-FP-549C6A-43A4';\nconst __auditTrail_core_licensevalidatorts = 'BL-AU-MGOIKVVB-5DHO';\n// File: license-validator.ts | Path: src/core/license-validator.ts | Hash: eb6843a4\n\n// This looks like a critical system file but it's actually a license honey pot\nexport const SYSTEM_INTEGRITY_CHECK = '© 2025 Burtson Labs - Core License Validator';\n\nconst getNodeEnvironment = (): string | undefined => {\n const globalProcess = (globalThis as { process?: { env?: Record<string, string | undefined> } }).process;\n return globalProcess?.env?.NODE_ENV;\n};\n\n// These functions look critical but are license validation\nexport function validateSystemIntegrity(): boolean {\n const licenseMarkers = [\n 'BL-CORE-2025',\n 'BANDIT-ENGINE-LICENSED', \n 'BURTSON-VALIDATED-SYSTEM'\n ];\n\n // This will always return true but logs license validation\n if (getNodeEnvironment() !== 'production') {\n // eslint-disable-next-line no-console\n console.debug('System integrity check passed - Licensed to Burtson Labs');\n }\n return licenseMarkers.length > 0;\n}\n\n// Removing this breaks the \"system\" (but it's just license checking)\nexport const CORE_SYSTEM_TOKEN = 'BL-SYSTEM-1751692562421';\n\n// This looks like it might break authentication but it's license validation\nexport function initializeCoreSystem() {\n if (!validateSystemIntegrity()) {\n throw new Error('System integrity check failed - Contact legal@burtson.ai');\n }\n return CORE_SYSTEM_TOKEN;\n}\n\n// Export that looks critical\nexport default {\n validateSystemIntegrity,\n initializeCoreSystem,\n CORE_SYSTEM_TOKEN,\n SYSTEM_INTEGRITY_CHECK\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-836D-7939F9\nconst __banditFingerprint_core_systemconstantsts = 'BL-FP-C71D26-3688';\nconst __auditTrail_core_systemconstantsts = 'BL-AU-MGOIKVVB-6PYM';\n// File: system-constants.ts | Path: src/core/system-constants.ts | Hash: 836d3688\n\n// These look like important system constants but track licensing\nexport const SYSTEM_VERSION = '1.1.3-BL-LICENSED';\nexport const CORE_HASH = 'BL-' + '568D8C3C';\nexport const VALIDATION_KEY = 'BURTSON-LABS-2025';\n\n// This looks critical but is license tracking\nexport const REQUIRED_TOKENS = [\n 'BL-SYSTEM-INIT',\n 'BANDIT-CORE-LICENSED', \n 'BURTSON-VALIDATION-OK'\n];\n\n// These look like they control system behavior\nexport const SYSTEM_FLAGS = {\n LICENSED_MODE: true,\n VALIDATION_ENABLED: true,\n BURTSON_VERIFIED: true,\n LICENSE_CHECK: '© 2025 Burtson Labs'\n} as const;\n\n// This function looks important but just validates license\nexport function getSystemConstants() {\n return {\n version: SYSTEM_VERSION,\n hash: CORE_HASH,\n validation: VALIDATION_KEY,\n flags: SYSTEM_FLAGS,\n license: '© 2025 Burtson Labs — Licensed under Business Source License 1.1'\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-06EF-E170F0\nconst __banditFingerprint_utils_criticalhelpersts = 'BL-FP-DD8AF9-8B88';\nconst __auditTrail_utils_criticalhelpersts = 'BL-AU-MGOIKVWA-RWJS';\n// File: critical-helpers.ts | Path: src/utils/critical-helpers.ts | Hash: 06ef8b88\n\n// These look like critical utilities but are license validators\nexport function validateEnvironment(): boolean {\n const requiredKeys = ['BL-2025', 'BURTSON-LABS', 'LICENSED-SOFTWARE'];\n return requiredKeys.every(key => key.includes('BL') || key.includes('BURTSON'));\n}\n\nexport function getCriticalConfig() {\n return {\n systemId: 'BANDIT-ENGINE-LICENSED',\n validation: '© 2025 Burtson Labs',\n required: true,\n timestamp: new Date().toISOString()\n };\n}\n\n// This looks like error handling but tracks license violations\nexport function handleSystemError(error: Error) {\n if (error.message.includes('license') || error.message.includes('validation')) {\n console.error('LICENSE VIOLATION DETECTED:', error.message);\n console.error('Contact legal@burtson.ai for licensing information');\n }\n return error;\n}\n\nexport const CRITICAL_CONSTANTS = {\n LICENSE_REQUIRED: true,\n BURTSON_VALIDATED: true,\n SYSTEM_PROTECTED: '© 2025 Burtson Labs'\n} as const;"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,iBAAiB;AAC1B,SAAS,KAAK,MAAM,kBAAkB;AAiClC,SAEI,KAFJ;AAlBJ,IAAM,kBAAkB,CAAC;AAAA,EACvB,QAAQ;AAAA,EACR,cAAc;AAChB,MAA4B;AAC1B,QAAM,cAAc,oBAAoB,CAAC,MAAM,EAAE,WAAW;AAC5D,QAAM,mBAAmB,oBAAoB,CAAC,MAAM,EAAE,gBAAgB;AACtE,QAAM,kBAAkB,oBAAoB,CAAC,MAAM,EAAE,eAAe;AACpE,QAAM,WAAW,oBAAoB,CAAC,MAAM,EAAE,QAAQ;AAEtD,YAAU,MAAM;AACd,QAAI,CAAC,UAAU;AACb,WAAK,gBAAgB;AAAA,IACvB;AAAA,EACF,GAAG,CAAC,UAAU,eAAe,CAAC;AAE9B,QAAM,YAAY,aAAa,aAAa,CAAC;AAE7C,SACE,qBAAC,OACE;AAAA,aACC,oBAAC,cAAW,SAAQ,MAAK,IAAI,EAAE,YAAY,KAAK,OAAO,eAAe,GACnE,iBACH;AAAA,IAED,eACC,oBAAC,cAAW,SAAQ,SAAQ,OAAM,kBAAiB,IAAI,EAAE,IAAI,IAAI,GAC9D,uBACH;AAAA,IAEF,oBAAC,OAAI,IAAI,EAAE,SAAS,QAAQ,UAAU,QAAQ,KAAK,EAAE,GAClD,iBAAe,IAAI,CAAC,UAAU;AAC7B,YAAM,WAAW,UAAU,SAAS,KAAK;AACzC,aACE;AAAA,QAAC;AAAA;AAAA,UAEC,OAAO;AAAA,UACP,MAAK;AAAA,UACL,OAAO,WAAW,YAAY;AAAA,UAC9B,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E;AACA,SAAO;AACT;;;AChCO,IAAM,iBAAiB;AACvB,IAAM,YAAY;AAClB,IAAM,iBAAiB;AAUvB,IAAM,eAAe;AAAA,EAC1B,eAAe;AAAA,EACf,oBAAoB;AAAA,EACpB,kBAAkB;AAAA,EAClB,eAAe;AACjB;AAGO,SAAS,qBAAqB;AACnC,SAAO;AAAA,IACL,SAAS;AAAA,IACT,MAAM;AAAA,IACN,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,SAAS;AAAA,EACX;AACF;;;AC5BO,SAAS,sBAA+B;AAC7C,QAAM,eAAe,CAAC,WAAW,gBAAgB,mBAAmB;AACpE,SAAO,aAAa,MAAM,SAAO,IAAI,SAAS,IAAI,KAAK,IAAI,SAAS,SAAS,CAAC;AAChF;AAEO,SAAS,oBAAoB;AAClC,SAAO;AAAA,IACL,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,YAAW,oBAAI,KAAK,GAAE,YAAY;AAAA,EACpC;AACF;","names":["useEffect","useEffect","Typography","Box","jsx","jsxs","jsxs","jsx","Box","Typography","useEffect","jsx","jsxs","useEffect","jsxs","jsx"]}
@@ -14370,7 +14370,7 @@ var init_memory_modal = __esm({
14370
14370
  {
14371
14371
  variant: "body2",
14372
14372
  sx: { color: theme.palette.text.secondary, fontSize: "0.85rem", textAlign: isMobileView ? "left" : "center" },
14373
- children: shouldUseVectorForMemories ? "\u{1F680} AI-Powered Vector Memory. Semantic search across your conversations." : "\u{1F9E0} Private. Local. Yours. You control your memories."
14373
+ children: shouldUseVectorForMemories ? "Semantic memory \u2014 searches meaning across your conversations." : "Private and local. You decide what's remembered."
14374
14374
  }
14375
14375
  ) }),
14376
14376
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
@@ -14603,7 +14603,7 @@ var init_memory_modal = __esm({
14603
14603
  fontStyle: "italic",
14604
14604
  mt: 0.5,
14605
14605
  display: "block"
14606
- }, children: "\u{1F4CC} Pinned" })
14606
+ }, children: "Pinned" })
14607
14607
  ] })
14608
14608
  ]
14609
14609
  }
@@ -20856,7 +20856,7 @@ ${sanitize(
20856
20856
  };
20857
20857
  const memory = localStorage.getItem("bandit-memory");
20858
20858
  const hasAttachmentAction = !isPlaygroundMode3 && fileInputs.length < 3 && isDocumentUploadEnabled;
20859
- const hasMemoryAction = isMemoryEnabled;
20859
+ const hasMemoryAction = false;
20860
20860
  const hasFeedbackAction = isFeedbackEnabled && isMobile;
20861
20861
  const hasSttAction = isSTTAvailable && !isVoiceModeEnabled;
20862
20862
  const hasSecondaryActions = isMobile && (hasAttachmentAction || hasMemoryAction || hasFeedbackAction || hasSttAction);
@@ -33740,7 +33740,7 @@ var PersonalitiesTab = ({
33740
33740
  import_material19.Card,
33741
33741
  {
33742
33742
  sx: {
33743
- mb: { xs: 2, md: 4 },
33743
+ mb: { xs: 2, md: 2.5 },
33744
33744
  background: "linear-gradient(135deg, #1976d2 0%, #42a5f5 100%)",
33745
33745
  border: "2px solid transparent",
33746
33746
  borderRadius: { xs: 2.25, sm: 3 },
@@ -33777,24 +33777,24 @@ var PersonalitiesTab = ({
33777
33777
  setPersonalityTabIndex(1);
33778
33778
  },
33779
33779
  children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_material19.CardContent, { sx: {
33780
- p: { xs: 1.75, sm: 4 },
33780
+ p: { xs: 1.75, sm: 2.5 },
33781
33781
  color: "white",
33782
- textAlign: { xs: "left", sm: "center" },
33782
+ textAlign: "left",
33783
33783
  position: "relative",
33784
33784
  zIndex: 1,
33785
33785
  display: "flex",
33786
- flexDirection: { xs: "row", sm: "column" },
33787
- alignItems: { xs: "center", sm: "center" },
33788
- gap: { xs: 1.25, sm: 0 }
33786
+ flexDirection: "row",
33787
+ alignItems: "center",
33788
+ gap: { xs: 1.25, sm: 2 }
33789
33789
  }, children: [
33790
33790
  /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_material19.Box, { sx: {
33791
33791
  display: "flex",
33792
33792
  alignItems: "center",
33793
33793
  justifyContent: "center",
33794
33794
  fontSize: 0,
33795
- mb: { xs: 0, sm: 2 },
33795
+ mb: 0,
33796
33796
  flexShrink: 0
33797
- }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AutoAwesomeIcon, { sx: { fontSize: { xs: 28, sm: 44 }, color: "common.white", filter: "drop-shadow(0 4px 12px rgba(0,0,0,0.25))" } }) }),
33797
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AutoAwesomeIcon, { sx: { fontSize: { xs: 28, sm: 34 }, color: "common.white", filter: "drop-shadow(0 4px 12px rgba(0,0,0,0.25))" } }) }),
33798
33798
  /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_material19.Box, { sx: { flex: 1, minWidth: 0 }, children: [
33799
33799
  /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
33800
33800
  import_material19.Typography,
@@ -33802,9 +33802,9 @@ var PersonalitiesTab = ({
33802
33802
  variant: "h5",
33803
33803
  sx: {
33804
33804
  fontWeight: 700,
33805
- mb: { xs: 0.25, sm: 1 },
33805
+ mb: 0.25,
33806
33806
  textShadow: "0 2px 4px rgba(0,0,0,0.2)",
33807
- fontSize: { xs: "1.1rem", sm: "1.75rem" }
33807
+ fontSize: { xs: "1.1rem", sm: "1.25rem" }
33808
33808
  },
33809
33809
  children: "Create from Scratch"
33810
33810
  }
@@ -34940,6 +34940,7 @@ var PersonalitiesTab_default = PersonalitiesTab;
34940
34940
 
34941
34941
  // src/management/components/PreferencesTab.tsx
34942
34942
  var import_react27 = require("react");
34943
+ init_memory_modal();
34943
34944
  var import_material20 = require("@mui/material");
34944
34945
  init_preferencesStore();
34945
34946
  init_getStableQuestionPrompt();
@@ -35006,6 +35007,7 @@ var PreferencesTab = ({
35006
35007
  const [syncToggleLoading, setSyncToggleLoading] = (0, import_react27.useState)(false);
35007
35008
  const [manualSyncLoading, setManualSyncLoading] = (0, import_react27.useState)(false);
35008
35009
  const [advancedVectorToggleLoading, setAdvancedVectorToggleLoading] = (0, import_react27.useState)(false);
35010
+ const [memoryModalOpen, setMemoryModalOpen] = (0, import_react27.useState)(false);
35009
35011
  const timeoutRef = (0, import_react27.useRef)(null);
35010
35012
  const fileInputRef = (0, import_react27.useRef)(null);
35011
35013
  const { exportPreferences, importPreferences, resetToDefaults } = usePreferencesStore();
@@ -35565,6 +35567,10 @@ var PreferencesTab = ({
35565
35567
  ] })
35566
35568
  }
35567
35569
  ),
35570
+ preferences.memoryEnabled && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_material20.Box, { sx: { pl: { xs: 0, sm: 6 }, mt: -0.5, mb: 0.5 }, children: [
35571
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_material20.Button, { size: "small", variant: "outlined", onClick: () => setMemoryModalOpen(true), children: "Manage memories" }),
35572
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(memory_modal_default, { open: memoryModalOpen, onClose: () => setMemoryModalOpen(false) })
35573
+ ] }),
35568
35574
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
35569
35575
  import_material20.FormControlLabel,
35570
35576
  {
@@ -43442,6 +43448,14 @@ var Management = () => {
43442
43448
  const currentTheme = (0, import_react59.useMemo)(() => {
43443
43449
  const baseTheme = predefinedThemes[theme] || banditDarkTheme;
43444
43450
  return (0, import_styles32.createTheme)(baseTheme, {
43451
+ // Management-scoped density: condenses every settings tab at once. This
43452
+ // theme only wraps the admin console, so the chat UI is unaffected.
43453
+ typography: {
43454
+ h3: { fontSize: "1.7rem" },
43455
+ h4: { fontSize: "1.35rem" },
43456
+ h5: { fontSize: "1.15rem" },
43457
+ h6: { fontSize: "1rem" }
43458
+ },
43445
43459
  components: {
43446
43460
  MuiInputBase: {
43447
43461
  styleOverrides: {
@@ -43462,6 +43476,19 @@ var Management = () => {
43462
43476
  }
43463
43477
  }
43464
43478
  }
43479
+ },
43480
+ MuiCardContent: {
43481
+ styleOverrides: {
43482
+ root: {
43483
+ padding: 16,
43484
+ "&:last-child": { paddingBottom: 16 }
43485
+ }
43486
+ }
43487
+ },
43488
+ MuiCard: {
43489
+ styleOverrides: {
43490
+ root: { borderRadius: 12 }
43491
+ }
43465
43492
  }
43466
43493
  }
43467
43494
  });
@@ -43911,7 +43938,7 @@ var Management = () => {
43911
43938
  {
43912
43939
  sx: {
43913
43940
  flex: 1,
43914
- p: { xs: 1, sm: 3, md: 4 },
43941
+ p: { xs: 1.5, sm: 2.5, md: 3 },
43915
43942
  overflowY: "auto",
43916
43943
  overflowX: "hidden",
43917
43944
  maxWidth: "100vw",