@camstack/addon-post-analysis 0.1.1
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/embedding-encoder/index.js +928 -0
- package/dist/embedding-encoder/index.js.map +1 -0
- package/dist/embedding-encoder/index.mjs +888 -0
- package/dist/embedding-encoder/index.mjs.map +1 -0
- package/dist/enrichment-engine/index.js +774 -0
- package/dist/enrichment-engine/index.js.map +1 -0
- package/dist/enrichment-engine/index.mjs +774 -0
- package/dist/enrichment-engine/index.mjs.map +1 -0
- package/dist/ffmpeg-config-DRONlBsj.mjs +56 -0
- package/dist/ffmpeg-config-DRONlBsj.mjs.map +1 -0
- package/dist/ffmpeg-config-uANz3sV5.js +73 -0
- package/dist/ffmpeg-config-uANz3sV5.js.map +1 -0
- package/dist/pipeline-analytics/@mf-types/compiled-types/pipeline-analytics/widgets/AudioHistoryChart.d.ts +4 -0
- package/dist/pipeline-analytics/@mf-types/compiled-types/pipeline-analytics/widgets/AudioMetricsPanel.d.ts +10 -0
- package/dist/pipeline-analytics/@mf-types/compiled-types/pipeline-analytics/widgets/DetectionHistoryChart.d.ts +4 -0
- package/dist/pipeline-analytics/@mf-types/compiled-types/pipeline-analytics/widgets/MotionHistoryChart.d.ts +4 -0
- package/dist/pipeline-analytics/@mf-types/compiled-types/pipeline-analytics/widgets/OccupancyHistoryChart.d.ts +4 -0
- package/dist/pipeline-analytics/@mf-types/compiled-types/pipeline-analytics/widgets/OccupancyPanel.d.ts +10 -0
- package/dist/pipeline-analytics/@mf-types/compiled-types/pipeline-analytics/widgets/chart-utils.d.ts +97 -0
- package/dist/pipeline-analytics/@mf-types/compiled-types/pipeline-analytics/widgets/index.d.ts +27 -0
- package/dist/pipeline-analytics/@mf-types/widgets.d.ts +2 -0
- package/dist/pipeline-analytics/@mf-types.d.ts +3 -0
- package/dist/pipeline-analytics/@mf-types.zip +0 -0
- package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_sdk__loadShare__.mjs-h5aXOPSA.mjs +12 -0
- package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-46iNwbxa.mjs +16 -0
- package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.mjs-Db6yh4op.mjs +15 -0
- package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.mjs-DoWbefqS.mjs +104 -0
- package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_trpc_mf_1_client__loadShare__.mjs-52bfkwC8.mjs +85 -0
- package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.mjs-CVrnrGED.mjs +62 -0
- package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare__react__loadShare__.mjs-DuO9h7li.mjs +85 -0
- package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare__react__loadShare__.mjs_commonjs-proxy-CmqNjq44.mjs +29 -0
- package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.mjs-BsyrX6NO.mjs +36 -0
- package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare__react_mf_2_dom__loadShare__.mjs-Dp8hqYOB.mjs +45 -0
- package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-CA8cCIEl.mjs +6 -0
- package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare__react_mf_2_dom_mf_1_client__loadShare__.mjs-BZjEt71l.mjs +34 -0
- package/dist/pipeline-analytics/_stub.js +1397 -0
- package/dist/pipeline-analytics/_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-Bfo-or09.mjs +156 -0
- package/dist/pipeline-analytics/client-DdXDZxzK.mjs +10063 -0
- package/dist/pipeline-analytics/getErrorShape-BPSzUA7W-TlK8ipWe.mjs +211 -0
- package/dist/pipeline-analytics/hostInit-CqUKNfOr.mjs +168 -0
- package/dist/pipeline-analytics/index-B4OKsa9p.mjs +2603 -0
- package/dist/pipeline-analytics/index-B7r1koiV.mjs +19109 -0
- package/dist/pipeline-analytics/index-CRN37Hr9.mjs +15195 -0
- package/dist/pipeline-analytics/index-DRx99znz.mjs +1617 -0
- package/dist/pipeline-analytics/index-DyYvUfc7.mjs +725 -0
- package/dist/pipeline-analytics/index-k0CA0h_r.mjs +185 -0
- package/dist/pipeline-analytics/index-kIgjN-uq.mjs +435 -0
- package/dist/pipeline-analytics/index-xncRG7-x.mjs +2713 -0
- package/dist/pipeline-analytics/index.js +2563 -0
- package/dist/pipeline-analytics/index.js.map +1 -0
- package/dist/pipeline-analytics/index.mjs +2564 -0
- package/dist/pipeline-analytics/index.mjs.map +1 -0
- package/dist/pipeline-analytics/jsx-runtime-4ro1c69i.mjs +55 -0
- package/dist/pipeline-analytics/remoteEntry.js +2973 -0
- package/dist/pipeline-analytics/virtualExposes-8FzWTdq3.mjs +42 -0
- package/dist/playlist-generator-EhPaB7Hn.js +48 -0
- package/dist/playlist-generator-EhPaB7Hn.js.map +1 -0
- package/dist/playlist-generator-VTkgn53O.mjs +48 -0
- package/dist/playlist-generator-VTkgn53O.mjs.map +1 -0
- package/dist/recording/index.js +257 -0
- package/dist/recording/index.js.map +1 -0
- package/dist/recording/index.mjs +235 -0
- package/dist/recording/index.mjs.map +1 -0
- package/dist/recording-coordinator-C2sATEhe.js +1052 -0
- package/dist/recording-coordinator-C2sATEhe.js.map +1 -0
- package/dist/recording-coordinator-DuP3BUTV.mjs +1012 -0
- package/dist/recording-coordinator-DuP3BUTV.mjs.map +1 -0
- package/dist/recording-db-gOgaoQh0.js +348 -0
- package/dist/recording-db-gOgaoQh0.js.map +1 -0
- package/dist/recording-db-lIkSMTLq.mjs +348 -0
- package/dist/recording-db-lIkSMTLq.mjs.map +1 -0
- package/dist/recording-service-facade-B9lG6OFn.mjs +123 -0
- package/dist/recording-service-facade-B9lG6OFn.mjs.map +1 -0
- package/dist/recording-service-facade-Do1PKlAL.js +123 -0
- package/dist/recording-service-facade-Do1PKlAL.js.map +1 -0
- package/dist/storage-estimator-CRpoQc9j.js +72 -0
- package/dist/storage-estimator-CRpoQc9j.js.map +1 -0
- package/dist/storage-estimator-DzD8gWJH.mjs +72 -0
- package/dist/storage-estimator-DzD8gWJH.mjs.map +1 -0
- package/package.json +148 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/enrichment-engine/types.ts","../../src/enrichment-engine/services/crop-extractor.ts","../../src/enrichment-engine/workers/embedding-dispatcher.ts","../../src/_analytics-schemas/persistence-records.ts","../../src/enrichment-engine/services/text-embedding-cache.ts","../../src/enrichment-engine/workers/scene-state-worker.ts","../../src/enrichment-engine/workers/activity-summary.ts","../../src/enrichment-engine/index.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// Enrichment Engine — Types\n// ---------------------------------------------------------------------------\n\n// --- Normalized Rectangle (0-1 coordinate space) ---\n\nexport interface NormalizedRect {\n readonly x: number // 0-1, left edge\n readonly y: number // 0-1, top edge\n readonly w: number // 0-1, width\n readonly h: number // 0-1, height\n}\n\n// --- Scene State ---\n\nexport interface SceneStateDefinition {\n readonly id: string\n readonly label: string // e.g. \"open\", \"closed\"\n readonly textPrompts: readonly string[] // zero-shot: [\"an open gate\"]\n readonly referenceEmbeddings: readonly (readonly number[])[] // optional: higher accuracy\n readonly notify: boolean\n readonly severity: 'info' | 'warning' | 'alert'\n}\n\nexport interface SceneMonitor {\n readonly id: string\n readonly label: string // e.g. \"Main Gate\"\n readonly roi: NormalizedRect // region of interest\n readonly enabled: boolean\n readonly states: readonly SceneStateDefinition[]\n}\n\nexport interface SceneMonitorConfig {\n readonly monitors: readonly SceneMonitor[]\n}\n\n// --- Enrichment Config (global) ---\n\nexport interface EnrichmentConfig {\n readonly enabled: boolean\n\n readonly embedding: {\n readonly enabled: boolean\n readonly modelId: string // 'clip-vit-b32' | 'clip-vit-b16' | 'siglip2-b16-256'\n readonly agentId: string | 'local'\n readonly runtime: 'node' | 'python'\n readonly backend: 'cpu' | 'coreml' | 'cuda'\n readonly classes: readonly string[] // [] = all classes\n readonly minConfidence: number\n readonly maxPerSecPerCamera: number\n readonly cropStrategy: 'first' | 'best-confidence' | 'track-end'\n readonly retentionDays: number\n }\n\n readonly sceneMonitor: {\n readonly enabled: boolean\n readonly modelId: string // can differ from embedding model\n readonly pollIntervalSec: number\n readonly hysteresisCount: number\n }\n\n readonly activitySummary: {\n readonly enabled: boolean\n readonly intervalSec: number\n readonly activityThresholds: {\n readonly low: number\n readonly medium: number\n readonly high: number\n }\n }\n}\n\n// --- Events ---\n\nexport interface EmbeddingStoredEvent {\n readonly deviceId: number\n readonly trackId: string\n readonly class: string\n readonly embeddingId: string // reference in vector store\n readonly modelId: string\n readonly embeddingDim: number\n readonly inferenceMs: number\n readonly timestamp: number\n}\n\nexport interface SceneStateChangedEvent {\n readonly deviceId: number\n readonly monitorId: string\n readonly monitorLabel: string\n readonly previousState: string\n readonly currentState: string\n readonly confidence: number\n readonly timestamp: number\n}\n\nexport interface ZoneActivityEntry {\n readonly zoneId: string\n readonly entries: number\n readonly exits: number\n readonly avgDwellMs: number\n}\n\nexport interface StateChangeEntry {\n readonly monitorId: string\n readonly from: string\n readonly to: string\n readonly timestamp: number\n}\n\nexport interface ActivitySummaryEvent {\n readonly deviceId: number\n readonly periodStart: number\n readonly periodEnd: number\n readonly objectCounts: Readonly<Record<string, number>>\n readonly zoneActivity: readonly ZoneActivityEntry[]\n readonly stateChanges: readonly StateChangeEntry[]\n readonly activityLevel: 'none' | 'low' | 'medium' | 'high'\n}\n\n// --- Defaults ---\n\nexport const DEFAULT_ENRICHMENT_CONFIG: EnrichmentConfig = {\n enabled: false,\n\n embedding: {\n enabled: false,\n modelId: 'clip-vit-b32',\n agentId: 'local',\n runtime: 'node',\n backend: 'cpu',\n classes: [],\n minConfidence: 0.5,\n maxPerSecPerCamera: 1,\n cropStrategy: 'first',\n retentionDays: 30,\n },\n\n sceneMonitor: {\n enabled: false,\n modelId: 'clip-vit-b32',\n pollIntervalSec: 10,\n hysteresisCount: 3,\n },\n\n activitySummary: {\n enabled: false,\n intervalSec: 60,\n activityThresholds: {\n low: 2,\n medium: 10,\n high: 30,\n },\n },\n}\n","import sharp from 'sharp'\n\n/**\n * Extracts a JPEG-encoded crop from a raw frame buffer using a normalized bounding box.\n * Coordinates are clamped to frame bounds to avoid out-of-range errors.\n */\nexport async function extractCrop(\n frameData: Buffer,\n frameWidth: number,\n frameHeight: number,\n bbox: { readonly x: number; readonly y: number; readonly w: number; readonly h: number },\n): Promise<{ crop: Buffer; width: number; height: number }> {\n // Convert normalized coordinates to pixel values\n const rawLeft = Math.round(bbox.x * frameWidth)\n const rawTop = Math.round(bbox.y * frameHeight)\n const rawWidth = Math.round(bbox.w * frameWidth)\n const rawHeight = Math.round(bbox.h * frameHeight)\n\n // Clamp to frame bounds\n const left = Math.max(0, Math.min(rawLeft, frameWidth - 1))\n const top = Math.max(0, Math.min(rawTop, frameHeight - 1))\n const width = Math.max(1, Math.min(rawWidth, frameWidth - left))\n const height = Math.max(1, Math.min(rawHeight, frameHeight - top))\n\n const crop = await sharp(frameData, {\n raw: { width: frameWidth, height: frameHeight, channels: 3 },\n })\n .extract({ left, top, width, height })\n .jpeg({ quality: 90 })\n .toBuffer()\n\n return { crop, width, height }\n}\n","import { EventCategory, createEvent } from '@camstack/types'\nimport type { IEventBus, IScopedLogger, TypedSystemEvent } from '@camstack/types'\nimport type { EnrichmentConfig, EmbeddingStoredEvent } from '../types.js'\nimport { extractCrop } from '../services/crop-extractor.js'\n\ninterface EmbeddingEncoder {\n encode(crop: Buffer, width: number, height: number): Promise<{ embedding: Float32Array; inferenceMs: number }>\n getInfo(): { modelId: string; embeddingDim: number; ready: boolean }\n}\n\ninterface PendingCrop {\n readonly trackId: string\n readonly deviceId: string\n readonly class: string\n readonly confidence: number\n readonly frameData: Buffer\n readonly frameWidth: number\n readonly frameHeight: number\n readonly bbox: { readonly x: number; readonly y: number; readonly w: number; readonly h: number }\n readonly receivedAt: number\n}\n\n/** Local narrow of a pipeline analysis result item (runtime shape from detection pipeline). */\ninterface PipelineAnalysisItem {\n readonly detection?: {\n readonly class: string\n readonly score: number\n readonly trackId?: string\n readonly bbox: { readonly x: number; readonly y: number; readonly w: number; readonly h: number }\n }\n readonly objectState?: {\n readonly state: string\n }\n readonly zoneEvents?: readonly { readonly zoneId: string; readonly type: string; readonly timestamp?: number }[]\n}\n\n/** Extended pipeline result with frame data attached by the pipeline stage. */\ninterface PipelineResultWithFrame {\n readonly frameData?: Buffer\n readonly imageWidth?: number\n readonly imageHeight?: number\n [key: string]: unknown\n}\n\nexport interface EmbeddingDispatcherDeps {\n readonly config: EnrichmentConfig['embedding']\n readonly encoders: readonly EmbeddingEncoder[]\n readonly eventBus: IEventBus\n readonly logger: IScopedLogger\n}\n\nexport class EmbeddingDispatcher {\n private readonly config: EnrichmentConfig['embedding']\n private readonly encoders: readonly EmbeddingEncoder[]\n private readonly eventBus: IEventBus\n private readonly logger: IScopedLogger\n\n private readonly lastEmbedTime = new Map<string, number>()\n private readonly pendingCrops = new Map<string, PendingCrop>()\n private flushTimer: ReturnType<typeof setInterval> | null = null\n private unsubscribe: (() => void) | null = null\n\n private _processedCount = 0\n private _totalInferenceMs = 0\n private _encoderIndex = 0\n\n constructor(deps: EmbeddingDispatcherDeps) {\n this.config = deps.config\n this.encoders = deps.encoders\n this.eventBus = deps.eventBus\n this.logger = deps.logger\n }\n\n async start(): Promise<void> {\n if (!this.config.enabled) {\n this.logger.info('EmbeddingDispatcher disabled')\n return\n }\n\n this.unsubscribe = this.eventBus.subscribe(\n { category: EventCategory.DetectionResult },\n (event) => { void this.handleDetectionResult(event) },\n )\n\n // Flush timer for best-confidence strategy\n if (this.config.cropStrategy === 'best-confidence') {\n this.flushTimer = setInterval(() => { void this.flushPending() }, 1000)\n }\n\n this.logger.info('EmbeddingDispatcher started', { meta: { strategy: this.config.cropStrategy, maxPerSec: this.config.maxPerSecPerCamera } })\n }\n\n async stop(): Promise<void> {\n this.unsubscribe?.()\n this.unsubscribe = null\n if (this.flushTimer) {\n clearInterval(this.flushTimer)\n this.flushTimer = null\n }\n // Flush remaining\n await this.flushPending()\n }\n\n get processedCount(): number { return this._processedCount }\n get avgInferenceMs(): number { return this._processedCount > 0 ? this._totalInferenceMs / this._processedCount : 0 }\n get queueDepth(): number { return this.pendingCrops.size }\n\n private async handleDetectionResult(event: TypedSystemEvent<'detection.result'>): Promise<void> {\n const data = event.data\n const deviceId = event.source.id !== undefined ? String(event.source.id) : ''\n if (!deviceId) return\n\n // analysisResults items are untyped pipeline outputs — narrow to local interface at boundary\n const detections = (data.analysisResults as readonly PipelineAnalysisItem[]) ?? []\n // pipelineResult may carry frame data attached by the analysis stage — narrow at boundary\n const pipelineResult = data.pipelineResult as unknown as PipelineResultWithFrame\n\n for (const det of detections) {\n const detection = det.detection\n if (!detection) continue\n\n // Class filter\n if (this.config.classes.length > 0 && !this.config.classes.includes(detection.class)) continue\n\n // Confidence filter\n if (detection.score < this.config.minConfidence) continue\n\n // Rate limit\n const now = Date.now()\n const minInterval = 1000 / this.config.maxPerSecPerCamera\n const lastTime = this.lastEmbedTime.get(deviceId) ?? 0\n if (now - lastTime < minInterval) continue\n\n const trackId = detection.trackId ?? `${deviceId}-${now}`\n const frameData = pipelineResult.frameData\n const frameWidth = pipelineResult.imageWidth\n const frameHeight = pipelineResult.imageHeight\n\n if (!frameData || !frameWidth || !frameHeight) continue\n\n const pending: PendingCrop = {\n trackId,\n deviceId,\n class: detection.class,\n confidence: detection.score,\n frameData,\n frameWidth,\n frameHeight,\n bbox: detection.bbox,\n receivedAt: now,\n }\n\n switch (this.config.cropStrategy) {\n case 'first': {\n if (!this.pendingCrops.has(trackId)) {\n this.pendingCrops.set(trackId, pending)\n void this.processOne(pending)\n }\n break\n }\n case 'best-confidence': {\n const existing = this.pendingCrops.get(trackId)\n if (!existing || pending.confidence > existing.confidence) {\n this.pendingCrops.set(trackId, pending)\n }\n break\n }\n case 'track-end': {\n const state = det.objectState?.state\n if (state === 'leaving') {\n this.pendingCrops.set(trackId, pending)\n void this.processOne(pending)\n } else {\n const existing = this.pendingCrops.get(trackId)\n if (!existing || pending.confidence > existing.confidence) {\n this.pendingCrops.set(trackId, pending)\n }\n }\n break\n }\n }\n }\n }\n\n private async flushPending(): Promise<void> {\n const now = Date.now()\n const toFlush: PendingCrop[] = []\n\n for (const [trackId, pending] of this.pendingCrops) {\n if (now - pending.receivedAt > 3000) {\n toFlush.push(pending)\n this.pendingCrops.delete(trackId)\n }\n }\n\n await Promise.all(toFlush.map(p => this.processOne(p)))\n }\n\n private async processOne(pending: PendingCrop): Promise<void> {\n if (this.encoders.length === 0) return\n\n try {\n const { crop, width, height } = await extractCrop(\n pending.frameData, pending.frameWidth, pending.frameHeight, pending.bbox,\n )\n\n // Round-robin across encoders\n const encoder = this.encoders[this._encoderIndex % this.encoders.length]!\n this._encoderIndex++\n\n const { embedding: _embedding, inferenceMs } = await encoder.encode(crop, width, height)\n const info = encoder.getInfo()\n\n this._processedCount++\n this._totalInferenceMs += inferenceMs\n this.lastEmbedTime.set(pending.deviceId, Date.now())\n this.pendingCrops.delete(pending.trackId)\n\n const embeddingId = `${pending.deviceId}/${pending.trackId}/${Date.now()}`\n\n const payload: EmbeddingStoredEvent = {\n deviceId: Number(pending.deviceId),\n trackId: pending.trackId,\n class: pending.class,\n embeddingId,\n modelId: info.modelId,\n embeddingDim: info.embeddingDim,\n inferenceMs,\n timestamp: Date.now(),\n }\n\n this.eventBus.emit(createEvent(\n EventCategory.EnrichmentEmbeddingStored,\n { type: 'addon', id: 'enrichment-engine' },\n payload,\n ))\n\n this.logger.debug('Embedded track', {\n tags: { deviceId: Number(pending.deviceId) },\n meta: { class: pending.class, trackId: pending.trackId, inferenceMs: Number(inferenceMs.toFixed(1)) },\n })\n } catch (err) {\n this.logger.warn('Failed to embed track', {\n tags: { deviceId: Number(pending.deviceId) },\n meta: { trackId: pending.trackId, error: String(err) },\n })\n }\n }\n}\n","/**\n * Zod schemas for analytics-suite persisted record types.\n * Used by persistence services to parse settings-store query results.\n */\nimport { z } from 'zod'\n\n// ── Track Trail ─────────────────────────────────────────────────────\n\nexport const TrackPositionSchema = z.object({\n x: z.number(),\n y: z.number(),\n timestamp: z.number(),\n bbox: z.tuple([z.number(), z.number(), z.number(), z.number()]),\n})\n\nexport const TrackSnapshotSchema = z.object({\n timestamp: z.number(),\n position: TrackPositionSchema,\n thumbnailPath: z.string(),\n})\n\nexport const TrackTrailSchema = z.object({\n trackId: z.string(),\n deviceId: z.string(),\n className: z.string(),\n label: z.string().optional(),\n firstSeen: z.number(),\n lastSeen: z.number(),\n positions: z.array(TrackPositionSchema),\n snapshots: z.array(TrackSnapshotSchema),\n totalDistance: z.number(),\n zonesVisited: z.array(z.string()),\n active: z.boolean(),\n})\n\nexport type TrackTrail = z.infer<typeof TrackTrailSchema>\n\n// ── Scene Monitor ───────────────────────────────────────────────────\n\nexport const SceneMonitorConfigSchema = z.object({\n monitors: z.array(z.object({\n id: z.string(),\n label: z.string(),\n roi: z.object({ x: z.number(), y: z.number(), w: z.number(), h: z.number() }),\n enabled: z.boolean(),\n states: z.array(z.object({\n id: z.string(),\n label: z.string(),\n prompt: z.string().optional(),\n textPrompts: z.array(z.string()).optional(),\n referenceEmbeddings: z.array(z.array(z.number())).optional(),\n threshold: z.number().optional(),\n notify: z.boolean().optional(),\n severity: z.enum(['info', 'warning', 'alert']).optional(),\n })),\n })),\n})\n\nexport type SceneMonitorConfig = z.infer<typeof SceneMonitorConfigSchema>\n\n/** Single scene monitor entry (element of SceneMonitorConfig.monitors). */\nexport type SceneMonitor = SceneMonitorConfig['monitors'][number]\n","/**\n * In-memory cache for text prompt embeddings.\n *\n * Keys follow the convention `${monitorId}:${text}` so that all entries\n * belonging to a specific scene monitor can be invalidated in one call.\n */\nexport class TextEmbeddingCache {\n private readonly cache = new Map<string, Float32Array>()\n\n get(key: string): Float32Array | undefined {\n return this.cache.get(key)\n }\n\n set(key: string, embedding: Float32Array): void {\n this.cache.set(key, embedding)\n }\n\n has(key: string): boolean {\n return this.cache.has(key)\n }\n\n /**\n * Deletes all entries whose key starts with `${monitorId}:`.\n * Used when a scene monitor's text prompts are updated.\n */\n invalidateMonitor(monitorId: string): void {\n const prefix = `${monitorId}:`\n for (const key of this.cache.keys()) {\n if (key.startsWith(prefix)) {\n this.cache.delete(key)\n }\n }\n }\n\n clear(): void {\n this.cache.clear()\n }\n\n get size(): number {\n return this.cache.size\n }\n}\n","import { EventCategory } from '@camstack/types'\nimport type { IEventBus, IScopedLogger, SettingsStoreClient } from '@camstack/types'\nimport type { EnrichmentConfig, SceneStateChangedEvent } from '../types.js'\nimport { SceneMonitorConfigSchema, type SceneMonitor } from '../../_analytics-schemas/persistence-records.js'\nimport { TextEmbeddingCache } from '../services/text-embedding-cache.js'\nimport { extractCrop } from '../services/crop-extractor.js'\n\ninterface EmbeddingEncoder {\n encode(crop: Buffer, width: number, height: number): Promise<{ embedding: Float32Array; inferenceMs: number }>\n encodeText(text: string): Promise<{ embedding: Float32Array }>\n getInfo(): { modelId: string; embeddingDim: number; ready: boolean }\n}\n\ninterface StreamBrokerRegistry {\n getSnapshot(deviceId: string): Promise<{ data: Buffer; width: number; height: number } | null>\n}\n\ninterface CameraMonitorState {\n currentState: string | null\n pendingState: string | null\n pendingCount: number\n pendingConfidence: number\n}\n\nexport interface SceneStateWorkerDeps {\n readonly config: EnrichmentConfig['sceneMonitor']\n readonly encoders: readonly EmbeddingEncoder[]\n readonly eventBus: IEventBus\n readonly store: SettingsStoreClient\n readonly streamBrokerRegistry: StreamBrokerRegistry\n readonly logger: IScopedLogger\n}\n\nexport class SceneStateWorker {\n private readonly config: EnrichmentConfig['sceneMonitor']\n private readonly encoders: readonly EmbeddingEncoder[]\n private readonly eventBus: IEventBus\n private readonly store: SettingsStoreClient\n private readonly streamBrokerRegistry: StreamBrokerRegistry\n private readonly logger: IScopedLogger\n\n private readonly textCache = new TextEmbeddingCache()\n private readonly monitorStates = new Map<string, CameraMonitorState>()\n private pollTimer: ReturnType<typeof setInterval> | null = null\n private _activeCount = 0\n\n constructor(deps: SceneStateWorkerDeps) {\n this.config = deps.config\n this.encoders = deps.encoders\n this.eventBus = deps.eventBus\n this.store = deps.store\n this.streamBrokerRegistry = deps.streamBrokerRegistry\n this.logger = deps.logger\n }\n\n async start(): Promise<void> {\n if (!this.config.enabled) {\n this.logger.info('SceneStateWorker disabled')\n return\n }\n\n this.pollTimer = setInterval(\n () => { void this.pollAll() },\n this.config.pollIntervalSec * 1000,\n )\n this.logger.info('SceneStateWorker started', { meta: { pollIntervalSec: this.config.pollIntervalSec, hysteresis: this.config.hysteresisCount } })\n }\n\n async stop(): Promise<void> {\n if (this.pollTimer) {\n clearInterval(this.pollTimer)\n this.pollTimer = null\n }\n }\n\n get activeCount(): number { return this._activeCount }\n\n private async pollAll(): Promise<void> {\n // Load all scene monitor configs from settings\n const rawConfigs = await this.store.query.query({ collection: 'device-settings', filter: {\n where: { id: 'enrichment:scene-monitor:%' },\n } })\n const allConfigs = rawConfigs.map(r => ({ id: r.id, data: SceneMonitorConfigSchema.parse(r.data) }))\n\n const deviceMonitors = new Map<string, SceneMonitor[]>()\n for (const record of allConfigs) {\n const deviceId = record.id.replace('enrichment:scene-monitor:', '')\n const config = record.data\n const active = config.monitors.filter(m => m.enabled)\n if (active.length > 0) {\n deviceMonitors.set(deviceId, active)\n }\n }\n\n this._activeCount = [...deviceMonitors.values()].reduce((sum, ms) => sum + ms.length, 0)\n\n // Process each camera (1 snapshot per camera)\n await Promise.all(\n [...deviceMonitors.entries()].map(([deviceId, monitors]) =>\n this.pollCamera(deviceId, monitors),\n ),\n )\n }\n\n private async pollCamera(deviceId: string, monitors: SceneMonitor[]): Promise<void> {\n if (this.encoders.length === 0) return\n\n try {\n // Capture 1 snapshot\n const snapshot = await this.streamBrokerRegistry.getSnapshot(deviceId)\n if (!snapshot) return\n\n const encoder = this.encoders[0]!\n\n // Process each monitor (crop from same snapshot)\n for (const monitor of monitors) {\n try {\n await this.processMonitor(deviceId, monitor, snapshot, encoder)\n } catch (err) {\n this.logger.warn('SceneState error', { tags: { deviceId: Number(deviceId) }, meta: { monitorLabel: monitor.label, error: String(err) } })\n }\n }\n } catch (err) {\n this.logger.warn('Failed to capture snapshot', { tags: { deviceId: Number(deviceId) }, meta: { error: String(err) } })\n }\n }\n\n private async processMonitor(\n deviceId: string,\n monitor: SceneMonitor,\n snapshot: { data: Buffer; width: number; height: number },\n encoder: EmbeddingEncoder,\n ): Promise<void> {\n // Crop ROI (normalized → pixel coords)\n const bbox = {\n x: monitor.roi.x * snapshot.width,\n y: monitor.roi.y * snapshot.height,\n w: monitor.roi.w * snapshot.width,\n h: monitor.roi.h * snapshot.height,\n }\n const { crop, width, height } = await extractCrop(snapshot.data, snapshot.width, snapshot.height, bbox)\n\n // Encode crop\n const { embedding: imageEmb } = await encoder.encode(crop, width, height)\n\n // Find best matching state\n let bestState: string | null = null\n let bestScore = -1\n\n for (const state of monitor.states) {\n let score = 0\n\n if (state.referenceEmbeddings && state.referenceEmbeddings.length > 0) {\n for (const refEmb of state.referenceEmbeddings) {\n const ref = new Float32Array(refEmb)\n const sim = cosineSimilarity(imageEmb, ref)\n score = Math.max(score, sim)\n }\n } else if (state.textPrompts && state.textPrompts.length > 0) {\n for (const prompt of state.textPrompts) {\n const cacheKey = `${monitor.id}:${state.id}:${prompt}`\n let textEmb = this.textCache.get(cacheKey)\n if (!textEmb) {\n const result = await encoder.encodeText(prompt)\n textEmb = result.embedding\n this.textCache.set(cacheKey, textEmb)\n }\n const sim = cosineSimilarity(imageEmb, textEmb)\n score = Math.max(score, sim)\n }\n }\n\n if (score > bestScore) {\n bestScore = score\n bestState = state.label\n }\n }\n\n if (!bestState) return\n\n // Hysteresis\n const key = `${deviceId}:${monitor.id}`\n let ms = this.monitorStates.get(key)\n if (!ms) {\n ms = { currentState: null, pendingState: null, pendingCount: 0, pendingConfidence: 0 }\n this.monitorStates.set(key, ms)\n }\n\n if (bestState === ms.pendingState) {\n ms.pendingCount++\n ms.pendingConfidence = bestScore\n } else {\n ms.pendingState = bestState\n ms.pendingCount = 1\n ms.pendingConfidence = bestScore\n }\n\n if (ms.pendingCount < this.config.hysteresisCount) return\n if (bestState === ms.currentState) return\n\n // State changed!\n const previousState = ms.currentState ?? 'unknown'\n ms.currentState = bestState\n ms.pendingState = null\n ms.pendingCount = 0\n\n const payload: SceneStateChangedEvent = {\n deviceId: Number(deviceId),\n monitorId: monitor.id,\n monitorLabel: monitor.label,\n previousState,\n currentState: bestState,\n confidence: bestScore,\n timestamp: Date.now(),\n }\n\n const data: Record<string, unknown> = { ...payload }\n this.eventBus.emit({\n id: `scene-state-${deviceId}-${monitor.id}-${Date.now()}`,\n category: EventCategory.EnrichmentSceneStateChanged,\n source: { type: 'device', id: deviceId },\n timestamp: new Date(),\n data,\n })\n\n this.logger.info('Scene state changed', {\n tags: { deviceId: Number(deviceId) },\n meta: { monitorLabel: monitor.label, previousState, currentState: bestState, confidence: Number(bestScore.toFixed(2)) },\n })\n }\n}\n\nfunction cosineSimilarity(a: Float32Array, b: Float32Array): number {\n let dot = 0\n let normA = 0\n let normB = 0\n for (let i = 0; i < a.length; i++) {\n dot += a[i]! * b[i]!\n normA += a[i]! * a[i]!\n normB += b[i]! * b[i]!\n }\n return dot / (Math.sqrt(normA) * Math.sqrt(normB))\n}\n","import { EventCategory, createEvent } from '@camstack/types'\nimport type { IEventBus, IScopedLogger, SettingsStoreClient, TypedSystemEvent } from '@camstack/types'\nimport type { EnrichmentConfig, ActivitySummaryEvent, StateChangeEntry } from '../types.js'\n\n/** Local narrow of a pipeline analysis result item (runtime shape from detection pipeline). */\ninterface PipelineAnalysisItem {\n readonly detection?: {\n readonly class: string\n readonly trackId?: string\n }\n readonly zoneEvents?: readonly { readonly zoneId: string; readonly type: string; readonly timestamp?: number }[]\n}\n\ninterface TrackInfo {\n class: string\n deviceId: string\n firstSeen: number\n lastSeen: number\n zones: Set<string>\n}\n\ninterface ZoneEventInfo {\n type: 'enter' | 'exit'\n zoneId: string\n trackId: string\n timestamp: number\n}\n\ninterface ActivityBuffer {\n tracks: Map<string, TrackInfo>\n zoneEvents: ZoneEventInfo[]\n stateChanges: StateChangeEntry[]\n}\n\nexport interface ActivitySummaryWorkerDeps {\n readonly config: EnrichmentConfig['activitySummary']\n readonly eventBus: IEventBus\n readonly store: SettingsStoreClient\n readonly logger: IScopedLogger\n}\n\nexport class ActivitySummaryWorker {\n private readonly config: EnrichmentConfig['activitySummary']\n private readonly eventBus: IEventBus\n private readonly store: SettingsStoreClient\n private readonly logger: IScopedLogger\n\n private readonly buffers = new Map<string, ActivityBuffer>()\n private summaryTimer: ReturnType<typeof setInterval> | null = null\n private unsubDetection: (() => void) | null = null\n private unsubSceneState: (() => void) | null = null\n private _lastSummary: ActivitySummaryEvent | null = null\n\n constructor(deps: ActivitySummaryWorkerDeps) {\n this.config = deps.config\n this.eventBus = deps.eventBus\n this.store = deps.store\n this.logger = deps.logger\n }\n\n async start(): Promise<void> {\n if (!this.config.enabled) {\n this.logger.info('ActivitySummaryWorker disabled')\n return\n }\n\n this.unsubDetection = this.eventBus.subscribe(\n { category: EventCategory.DetectionResult },\n (event) => { this.handleDetection(event) },\n )\n\n this.unsubSceneState = this.eventBus.subscribe(\n { category: EventCategory.EnrichmentSceneStateChanged },\n (event) => { this.handleSceneStateChange(event) },\n )\n\n this.summaryTimer = setInterval(\n () => { void this.emitSummaries() },\n this.config.intervalSec * 1000,\n )\n\n this.logger.info('ActivitySummaryWorker started', { meta: { intervalSec: this.config.intervalSec } })\n }\n\n async stop(): Promise<void> {\n this.unsubDetection?.()\n this.unsubSceneState?.()\n if (this.summaryTimer) {\n clearInterval(this.summaryTimer)\n this.summaryTimer = null\n }\n // Emit final summaries\n await this.emitSummaries()\n }\n\n get lastSummary(): ActivitySummaryEvent | null { return this._lastSummary }\n\n private getBuffer(deviceId: string): ActivityBuffer {\n let buf = this.buffers.get(deviceId)\n if (!buf) {\n buf = { tracks: new Map(), zoneEvents: [], stateChanges: [] }\n this.buffers.set(deviceId, buf)\n }\n return buf\n }\n\n private handleDetection(event: TypedSystemEvent<'detection.result'>): void {\n const deviceId = event.source.id !== undefined ? String(event.source.id) : ''\n if (!deviceId) return\n\n // analysisResults items are untyped pipeline outputs — narrow to local interface at boundary\n const results = (event.data.analysisResults as readonly PipelineAnalysisItem[]) ?? []\n const buf = this.getBuffer(deviceId)\n const now = Date.now()\n\n for (const det of results) {\n const detection = det.detection\n if (!detection) continue\n\n const trackId = detection.trackId ?? `unknown-${now}`\n const existing = buf.tracks.get(trackId)\n\n if (existing) {\n existing.lastSeen = now\n } else {\n buf.tracks.set(trackId, {\n class: detection.class,\n deviceId,\n firstSeen: now,\n lastSeen: now,\n zones: new Set(),\n })\n }\n\n // Zone events\n const zoneEvents = det.zoneEvents ?? []\n for (const ze of zoneEvents) {\n const track = buf.tracks.get(trackId)\n if (track) track.zones.add(ze.zoneId)\n\n if (ze.type === 'zone-enter' || ze.type === 'zone-exit') {\n buf.zoneEvents.push({\n type: ze.type === 'zone-enter' ? 'enter' : 'exit',\n zoneId: ze.zoneId,\n trackId,\n timestamp: ze.timestamp ?? now,\n })\n }\n }\n }\n }\n\n private handleSceneStateChange(event: TypedSystemEvent<'enrichment.scene.state-changed'>): void {\n const deviceId = event.source.id !== undefined ? String(event.source.id) : ''\n if (!deviceId) return\n\n const data = event.data\n const buf = this.getBuffer(deviceId)\n buf.stateChanges.push({\n monitorId: data.monitorId,\n from: data.previousState,\n to: data.currentState,\n timestamp: data.timestamp,\n })\n }\n\n private async emitSummaries(): Promise<void> {\n const now = Date.now()\n\n for (const [deviceId, buf] of this.buffers) {\n if (buf.tracks.size === 0 && buf.zoneEvents.length === 0 && buf.stateChanges.length === 0) {\n continue\n }\n\n // Object counts by class\n const objectCounts: Record<string, number> = {}\n for (const track of buf.tracks.values()) {\n objectCounts[track.class] = (objectCounts[track.class] ?? 0) + 1\n }\n\n // Zone activity\n const zoneMap = new Map<string, { entries: number; exits: number; dwellTimes: number[] }>()\n for (const ze of buf.zoneEvents) {\n let z = zoneMap.get(ze.zoneId)\n if (!z) {\n z = { entries: 0, exits: 0, dwellTimes: [] }\n zoneMap.set(ze.zoneId, z)\n }\n if (ze.type === 'enter') z.entries++\n else z.exits++\n }\n\n const zoneActivity = [...zoneMap.entries()].map(([zoneId, z]) => ({\n zoneId,\n entries: z.entries,\n exits: z.exits,\n avgDwellMs: z.dwellTimes.length > 0\n ? z.dwellTimes.reduce((a, b) => a + b, 0) / z.dwellTimes.length\n : 0,\n }))\n\n // Activity level\n const totalEvents = buf.tracks.size + buf.zoneEvents.length\n const eventsPerMin = totalEvents / (this.config.intervalSec / 60)\n const activityLevel = eventsPerMin >= this.config.activityThresholds.high ? 'high'\n : eventsPerMin >= this.config.activityThresholds.medium ? 'medium'\n : eventsPerMin >= this.config.activityThresholds.low ? 'low'\n : 'none' as const\n\n const summary: ActivitySummaryEvent = {\n deviceId: Number(deviceId),\n periodStart: now - this.config.intervalSec * 1000,\n periodEnd: now,\n objectCounts,\n zoneActivity,\n stateChanges: [...buf.stateChanges],\n activityLevel,\n }\n\n this._lastSummary = summary\n\n this.eventBus.emit(createEvent(\n EventCategory.EnrichmentActivitySummary,\n { type: 'device', id: deviceId },\n summary,\n ))\n\n // Persist for timeline UI\n try {\n await this.store.insert.mutate({ collection: 'addon-settings', record: {\n id: `${deviceId}:${now}`,\n data: { ...summary },\n } })\n } catch {\n // Best-effort persistence\n }\n\n // Reset buffer\n buf.tracks.clear()\n buf.zoneEvents.length = 0\n buf.stateChanges.length = 0\n }\n }\n}\n","import { BaseAddon, asJsonObject } from '@camstack/types'\nimport type { EnrichmentConfig } from './types.js'\nimport { DEFAULT_ENRICHMENT_CONFIG } from './types.js'\nimport { EmbeddingDispatcher } from './workers/embedding-dispatcher.js'\nimport type { EmbeddingDispatcherDeps } from './workers/embedding-dispatcher.js'\nimport { SceneStateWorker } from './workers/scene-state-worker.js'\nimport type { SceneStateWorkerDeps } from './workers/scene-state-worker.js'\nimport { ActivitySummaryWorker } from './workers/activity-summary.js'\n\n/**\n * Extended context shape injected at runtime by the server's capability wiring.\n * Not part of the base AddonContext interface because capabilities are resolved\n * after addon initialization.\n */\n\nexport class EnrichmentEngineAddon extends BaseAddon {\n private embeddingDispatcher: EmbeddingDispatcher | null = null\n private sceneStateWorker: SceneStateWorker | null = null\n private activitySummary: ActivitySummaryWorker | null = null\n private currentFlags = {\n embeddingEnabled: true,\n sceneMonitorEnabled: true,\n activitySummaryEnabled: true,\n }\n constructor() { super({}) }\n\n protected async onInitialize(): Promise<void> {\n const config = await this.loadConfig()\n\n // Encoders will be injected by the server via capability wiring.\n // The server extends AddonContext with a `capabilities` object at runtime.\n // Runtime bridges: capabilities.getCollection/get return unknown because\n // the registry holds heterogeneous providers. The shapes are guaranteed\n // by the capability declaration — see project_cast_elimination_checkpoint.md\n // pattern #7.\n const encoderCollection = this.capabilities?.getCollection?.('embedding-encoder') ?? []\n const streamBrokerRaw = this.capabilities?.get?.('stream-broker')\n\n this.embeddingDispatcher = new EmbeddingDispatcher({\n config: config.embedding,\n encoders: encoderCollection as EmbeddingDispatcherDeps['encoders'],\n eventBus: this.ctx.eventBus,\n logger: this.ctx.logger.child('EmbeddingDispatcher'),\n })\n\n this.sceneStateWorker = new SceneStateWorker({\n config: config.sceneMonitor,\n encoders: encoderCollection as SceneStateWorkerDeps['encoders'],\n eventBus: this.ctx.eventBus,\n store: this.ctx.api!.settingsStore,\n streamBrokerRegistry: (streamBrokerRaw ?? { getSnapshot: async () => null }) as SceneStateWorkerDeps['streamBrokerRegistry'],\n logger: this.ctx.logger.child('SceneStateWorker'),\n })\n\n this.activitySummary = new ActivitySummaryWorker({\n config: config.activitySummary,\n eventBus: this.ctx.eventBus,\n store: this.ctx.api!.settingsStore,\n logger: this.ctx.logger.child('ActivitySummary'),\n })\n\n this.currentFlags = {\n embeddingEnabled: config.embedding.enabled,\n sceneMonitorEnabled: config.sceneMonitor.enabled,\n activitySummaryEnabled: config.activitySummary.enabled,\n }\n\n await this.embeddingDispatcher.start()\n await this.sceneStateWorker.start()\n await this.activitySummary.start()\n\n this.ctx.logger.info('Enrichment engine initialized with 3 workers')\n }\n\n protected async onShutdown(): Promise<void> {\n await this.embeddingDispatcher?.stop()\n await this.sceneStateWorker?.stop()\n await this.activitySummary?.stop()\n this.embeddingDispatcher = null\n this.sceneStateWorker = null\n this.activitySummary = null\n }\n\n // ── Three-level settings API (Phase 3) ─────────────────────────────\n //\n // Enrichment engine is post-detection infra. The three boolean toggle\n // flags (embedding/scene/activity) live in `getGlobalSettings` until\n // the dedicated post-detection UI exists. The underlying\n // EnrichmentConfig blob (stored opaquely in 'addon-settings' →\n // 'enrichment:global') is a separate concern — the flags below mirror\n // the `.enabled` field of each worker's config.\n\n protected globalSettingsSchema() {\n return this.schema({\n sections: [\n {\n id: 'enrichment-engine-settings',\n title: 'Enrichment Engine',\n columns: 2,\n fields: [\n {\n type: 'boolean',\n key: 'embeddingEnabled',\n label: 'Embedding Enabled',\n description: 'Compute face/object embeddings from detection crops.',\n default: true,\n },\n {\n type: 'boolean',\n key: 'sceneMonitorEnabled',\n label: 'Scene Monitor Enabled',\n description: 'Run periodic scene state capture for change detection.',\n default: true,\n },\n {\n type: 'boolean',\n key: 'activitySummaryEnabled',\n label: 'Activity Summary Enabled',\n description: 'Aggregate hourly activity summaries per camera.',\n default: true,\n },\n ],\n },\n ],\n })\n }\n\n async updateGlobalSettings(patch: Record<string, unknown>): Promise<void> {\n await this.ctx?.settings?.writeAddonStore(patch)\n const prev = this.currentFlags\n const next = {\n embeddingEnabled: typeof patch['embeddingEnabled'] === 'boolean' ? patch['embeddingEnabled'] : prev.embeddingEnabled,\n sceneMonitorEnabled: typeof patch['sceneMonitorEnabled'] === 'boolean' ? patch['sceneMonitorEnabled'] : prev.sceneMonitorEnabled,\n activitySummaryEnabled: typeof patch['activitySummaryEnabled'] === 'boolean' ? patch['activitySummaryEnabled'] : prev.activitySummaryEnabled,\n }\n this.currentFlags = next\n\n // Toggle workers based on flag changes\n if (prev.embeddingEnabled && !next.embeddingEnabled) {\n this.ctx?.logger.info('Stopping embedding dispatcher (disabled via config)')\n await this.embeddingDispatcher?.stop()\n } else if (!prev.embeddingEnabled && next.embeddingEnabled) {\n this.ctx?.logger.info('Starting embedding dispatcher (enabled via config)')\n await this.embeddingDispatcher?.start()\n }\n\n if (prev.sceneMonitorEnabled && !next.sceneMonitorEnabled) {\n this.ctx?.logger.info('Stopping scene state worker (disabled via config)')\n await this.sceneStateWorker?.stop()\n } else if (!prev.sceneMonitorEnabled && next.sceneMonitorEnabled) {\n this.ctx?.logger.info('Starting scene state worker (enabled via config)')\n await this.sceneStateWorker?.start()\n }\n\n if (prev.activitySummaryEnabled && !next.activitySummaryEnabled) {\n this.ctx?.logger.info('Stopping activity summary worker (disabled via config)')\n await this.activitySummary?.stop()\n } else if (!prev.activitySummaryEnabled && next.activitySummaryEnabled) {\n this.ctx?.logger.info('Starting activity summary worker (enabled via config)')\n await this.activitySummary?.start()\n }\n\n this.ctx?.logger.info('Enrichment engine flags updated', { meta: { flags: this.currentFlags } })\n }\n\n private async loadConfig(): Promise<EnrichmentConfig> {\n try {\n const stored = asJsonObject(await this.ctx.api?.settingsStore.get.query({ collection: 'addon-settings', key: 'enrichment:global' }))\n if (stored) {\n // Shallow structural merge: only keys from DEFAULT_ENRICHMENT_CONFIG\n // are preserved; stored values override their counterparts when\n // present with a matching type.\n const merged: EnrichmentConfig = { ...DEFAULT_ENRICHMENT_CONFIG, ...stored }\n return merged\n }\n } catch {\n // First boot — use defaults\n }\n return DEFAULT_ENRICHMENT_CONFIG\n }\n}\n\n// Default export — kernel addon-loader prefers mod.default to identify the addon class\nexport default EnrichmentEngineAddon\n"],"names":["z"],"mappings":";;;AAyHO,MAAM,4BAA8C;AAAA,EACzD,SAAS;AAAA,EAET,WAAW;AAAA,IACT,SAAS;AAAA,IACT,SAAS;AAAA,IACT,SAAS;AAAA,IACT,SAAS;AAAA,IACT,SAAS;AAAA,IACT,SAAS,CAAA;AAAA,IACT,eAAe;AAAA,IACf,oBAAoB;AAAA,IACpB,cAAc;AAAA,IACd,eAAe;AAAA,EAAA;AAAA,EAGjB,cAAc;AAAA,IACZ,SAAS;AAAA,IACT,SAAS;AAAA,IACT,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,EAAA;AAAA,EAGnB,iBAAiB;AAAA,IACf,SAAS;AAAA,IACT,aAAa;AAAA,IACb,oBAAoB;AAAA,MAClB,KAAK;AAAA,MACL,QAAQ;AAAA,MACR,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ;ACnJA,eAAsB,YACpB,WACA,YACA,aACA,MAC0D;AAE1D,QAAM,UAAU,KAAK,MAAM,KAAK,IAAI,UAAU;AAC9C,QAAM,SAAS,KAAK,MAAM,KAAK,IAAI,WAAW;AAC9C,QAAM,WAAW,KAAK,MAAM,KAAK,IAAI,UAAU;AAC/C,QAAM,YAAY,KAAK,MAAM,KAAK,IAAI,WAAW;AAGjD,QAAM,OAAO,KAAK,IAAI,GAAG,KAAK,IAAI,SAAS,aAAa,CAAC,CAAC;AAC1D,QAAM,MAAM,KAAK,IAAI,GAAG,KAAK,IAAI,QAAQ,cAAc,CAAC,CAAC;AACzD,QAAM,QAAQ,KAAK,IAAI,GAAG,KAAK,IAAI,UAAU,aAAa,IAAI,CAAC;AAC/D,QAAM,SAAS,KAAK,IAAI,GAAG,KAAK,IAAI,WAAW,cAAc,GAAG,CAAC;AAEjE,QAAM,OAA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AkB,KAAA;AAAA,IAC/B,WAAW,CAAC,KAAK,uBAAuB,KAAK,qBAAqB;AAChE,WAAK,KAAK,OAAO,KAAK,kDAAkD;AACxE,YAAM,KAAK,kBAAkB,MAAA;AAAA,IAC/B;AAEA,QAAI,KAAK,0BAA0B,CAAC,KAAK,wBAAwB;AAC/D,WAAK,KAAK,OAAO,KAAK,wDAAwD;AAC9E,YAAM,KAAK,iBAAiB,KAAA;AAAA,IAC9B,WAAW,CAAC,KAAK,0BAA0B,KAAK,wBAAwB;AACtE,WAAK,KAAK,OAAO,KAAK,uDAAuD;AAC7E,YAAM,KAAK,iBAAiB,MAAA;AAAA,IAC9B;AAEA,SAAK,KAAK,OAAO,KAAK,mCAAmC,EAAE,MAAM,EAAE,OAAO,KAAK,aAAA,EAAa,CAAG;AAAA,EACjG;AAAA,EAEA,MAAc,aAAwC;AACpD,QAAI;AACF,YAAM,SAAS,aAAa,MAAM,KAAK,IAAI,KAAK,cAAc,IAAI,MAAM,EAAE,YAAY,kBAAkB,KAAK,oBAAA,CAAqB,CAAC;AACnI,UAAI,QAAQ;AAIV,cAAM,SAA2B,EAAE,GAAG,2BAA2B,GAAG,OAAA;AACpE,eAAO;AAAA,MACT;AAAA,IACF,QAAQ;AAAA,IAER;AACA,WAAO;AAAA,EACT;AACF;"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { execFileSync } from "node:child_process";
|
|
2
|
+
import * as os from "node:os";
|
|
3
|
+
function detectPlatformDefaults(ffmpegPath = "ffmpeg") {
|
|
4
|
+
let hwaccels = [];
|
|
5
|
+
try {
|
|
6
|
+
const output = execFileSync(ffmpegPath, ["-hwaccels", "-hide_banner"], { encoding: "utf8", timeout: 5e3, stdio: ["pipe", "pipe", "pipe"] });
|
|
7
|
+
hwaccels = output.split("\n").map((l) => l.trim()).filter((l) => l && l !== "Hardware acceleration methods:");
|
|
8
|
+
} catch {
|
|
9
|
+
}
|
|
10
|
+
const platform = os.platform();
|
|
11
|
+
if (platform === "darwin" && hwaccels.includes("videotoolbox")) return { hwaccel: "videotoolbox", threads: 0 };
|
|
12
|
+
if (platform === "linux") {
|
|
13
|
+
for (const hw of ["vaapi", "qsv", "cuda", "v4l2m2m"]) {
|
|
14
|
+
if (hwaccels.includes(hw)) return { hwaccel: hw, threads: 0 };
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return { hwaccel: "none", threads: Math.max(1, Math.floor(os.cpus().length / 2)) };
|
|
18
|
+
}
|
|
19
|
+
function resolveFfmpegConfig(deviceConfig, globalConfig, detected) {
|
|
20
|
+
return {
|
|
21
|
+
path: deviceConfig?.path ?? globalConfig.path ?? detected.path ?? "ffmpeg",
|
|
22
|
+
hwaccel: deviceConfig?.hwaccel ?? globalConfig.hwaccel ?? detected.hwaccel ?? "none",
|
|
23
|
+
inputArgs: deviceConfig?.inputArgs ?? globalConfig.inputArgs,
|
|
24
|
+
outputArgs: deviceConfig?.outputArgs ?? globalConfig.outputArgs,
|
|
25
|
+
videoCodec: deviceConfig?.videoCodec ?? globalConfig.videoCodec ?? "copy",
|
|
26
|
+
audioCodec: deviceConfig?.audioCodec ?? globalConfig.audioCodec ?? "copy",
|
|
27
|
+
threads: deviceConfig?.threads ?? globalConfig.threads ?? detected.threads
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function buildFfmpegInputArgs(config, inputUrl) {
|
|
31
|
+
const args = ["-hide_banner", "-loglevel", "warning"];
|
|
32
|
+
if (config.hwaccel && config.hwaccel !== "none") args.push("-hwaccel", config.hwaccel);
|
|
33
|
+
if (config.threads !== void 0) args.push("-threads", String(config.threads));
|
|
34
|
+
if (config.inputArgs?.length) args.push(...config.inputArgs);
|
|
35
|
+
args.push("-rtsp_transport", "tcp", "-i", inputUrl);
|
|
36
|
+
return args;
|
|
37
|
+
}
|
|
38
|
+
function buildFfmpegOutputArgs(config) {
|
|
39
|
+
const args = ["-c:v", config.videoCodec ?? "copy", "-c:a", config.audioCodec ?? "copy"];
|
|
40
|
+
if (config.outputArgs?.length) args.push(...config.outputArgs);
|
|
41
|
+
return args;
|
|
42
|
+
}
|
|
43
|
+
async function resolveFfmpegBinary(configPath, deps) {
|
|
44
|
+
if (configPath && configPath !== "ffmpeg") {
|
|
45
|
+
return configPath;
|
|
46
|
+
}
|
|
47
|
+
return deps.ensureFfmpeg();
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
buildFfmpegInputArgs,
|
|
51
|
+
buildFfmpegOutputArgs,
|
|
52
|
+
detectPlatformDefaults,
|
|
53
|
+
resolveFfmpegBinary,
|
|
54
|
+
resolveFfmpegConfig
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=ffmpeg-config-DRONlBsj.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ffmpeg-config-DRONlBsj.mjs","sources":["../src/recording/recording/ffmpeg-config.ts"],"sourcesContent":["import { execFileSync } from 'node:child_process'\nimport * as os from 'node:os'\nimport type { FfmpegConfig, IAddonDepsManager } from '@camstack/types'\n\n/**\n * Probe ffmpeg binary and detect optimal hwaccel for the host platform.\n * Called once at server startup, result cached.\n */\nexport function detectPlatformDefaults(ffmpegPath: string = 'ffmpeg'): Partial<FfmpegConfig> {\n let hwaccels: string[] = []\n try {\n const output = execFileSync(ffmpegPath, ['-hwaccels', '-hide_banner'], { encoding: 'utf8', timeout: 5000, stdio: ['pipe', 'pipe', 'pipe'] })\n hwaccels = output.split('\\n').map(l => l.trim()).filter(l => l && l !== 'Hardware acceleration methods:')\n } catch {\n // ffmpeg not found or hwaccel probe failed — fall through to defaults\n }\n\n const platform = os.platform()\n if (platform === 'darwin' && hwaccels.includes('videotoolbox')) return { hwaccel: 'videotoolbox', threads: 0 }\n if (platform === 'linux') {\n for (const hw of ['vaapi', 'qsv', 'cuda', 'v4l2m2m'] as const) {\n if (hwaccels.includes(hw)) return { hwaccel: hw, threads: 0 }\n }\n }\n return { hwaccel: 'none', threads: Math.max(1, Math.floor(os.cpus().length / 2)) }\n}\n\n/**\n * Resolve ffmpeg config for a device.\n * Merge order: detected <- global <- per-device (most specific wins).\n */\nexport function resolveFfmpegConfig(\n deviceConfig: Partial<FfmpegConfig> | undefined,\n globalConfig: Partial<FfmpegConfig>,\n detected: Partial<FfmpegConfig>,\n): FfmpegConfig {\n return {\n path: deviceConfig?.path ?? globalConfig.path ?? detected.path ?? 'ffmpeg',\n hwaccel: deviceConfig?.hwaccel ?? globalConfig.hwaccel ?? detected.hwaccel ?? 'none',\n inputArgs: deviceConfig?.inputArgs ?? globalConfig.inputArgs,\n outputArgs: deviceConfig?.outputArgs ?? globalConfig.outputArgs,\n videoCodec: deviceConfig?.videoCodec ?? globalConfig.videoCodec ?? 'copy',\n audioCodec: deviceConfig?.audioCodec ?? globalConfig.audioCodec ?? 'copy',\n threads: deviceConfig?.threads ?? globalConfig.threads ?? detected.threads,\n }\n}\n\n/**\n * Build common ffmpeg args from a resolved config.\n */\nexport function buildFfmpegInputArgs(config: FfmpegConfig, inputUrl: string): string[] {\n const args: string[] = ['-hide_banner', '-loglevel', 'warning']\n if (config.hwaccel && config.hwaccel !== 'none') args.push('-hwaccel', config.hwaccel)\n if (config.threads !== undefined) args.push('-threads', String(config.threads))\n if (config.inputArgs?.length) args.push(...config.inputArgs)\n args.push('-rtsp_transport', 'tcp', '-i', inputUrl)\n return args\n}\n\nexport function buildFfmpegOutputArgs(config: FfmpegConfig): string[] {\n const args: string[] = ['-c:v', config.videoCodec ?? 'copy', '-c:a', config.audioCodec ?? 'copy']\n if (config.outputArgs?.length) args.push(...config.outputArgs)\n return args\n}\n\n/**\n * Resolve ffmpeg binary path. Priority:\n * 1. Explicit config path\n * 2. Embedded (data/deps/ffmpeg)\n * 3. System PATH\n * 4. Download static build\n */\nexport async function resolveFfmpegBinary(\n configPath: string | undefined,\n deps: IAddonDepsManager,\n): Promise<string> {\n // Explicit config\n if (configPath && configPath !== 'ffmpeg') {\n return configPath\n }\n\n // Try embedded or download via deps manager\n return deps.ensureFfm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AS;AAC9D,MAAI,OAAO,WAAW,OAAO,YAAY,OAAQ,MAAK,KAAK,YAAY,OAAO,OAAO;AACrF,MAAI,OAAO,YAAY,OAAW,MAAK,KAAK,YAAY,OAAO,OAAO,OAAO,CAAC;AAC9E,MAAI,OAAO,WAAW,aAAa,KAAK,GAAG,OAAO,SAAS;AAC3D,OAAK,KAAK,mBAAmB,OAAO,MAAM,QAAQ;AAClD,SAAO;AACT;AAEO,SAAS,sBAAsB,QAAgC;AACpE,QAAM,OAAiB,CAAC,QAAQ,OAAO,cAAc,QAAQ,QAAQ,OAAO,cAAc,MAAM;AAChG,MAAI,OAAO,YAAY,aAAa,KAAK,GAAG,OAAO,UAAU;AAC7D,SAAO;AACT;AASA,eAAsB,oBACpB,YACA,MACiB;AAEjB,MAAI,cAAc,eAAe,UAAU;AACzC,WAAO;AAAA,EACT;AAGA,SAAO,KAAK,aAAA;AACd;"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const node_child_process = require("node:child_process");
|
|
4
|
+
const os = require("node:os");
|
|
5
|
+
function _interopNamespaceDefault(e) {
|
|
6
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
7
|
+
if (e) {
|
|
8
|
+
for (const k in e) {
|
|
9
|
+
if (k !== "default") {
|
|
10
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
11
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: () => e[k]
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
n.default = e;
|
|
19
|
+
return Object.freeze(n);
|
|
20
|
+
}
|
|
21
|
+
const os__namespace = /* @__PURE__ */ _interopNamespaceDefault(os);
|
|
22
|
+
function detectPlatformDefaults(ffmpegPath = "ffmpeg") {
|
|
23
|
+
let hwaccels = [];
|
|
24
|
+
try {
|
|
25
|
+
const output = node_child_process.execFileSync(ffmpegPath, ["-hwaccels", "-hide_banner"], { encoding: "utf8", timeout: 5e3, stdio: ["pipe", "pipe", "pipe"] });
|
|
26
|
+
hwaccels = output.split("\n").map((l) => l.trim()).filter((l) => l && l !== "Hardware acceleration methods:");
|
|
27
|
+
} catch {
|
|
28
|
+
}
|
|
29
|
+
const platform = os__namespace.platform();
|
|
30
|
+
if (platform === "darwin" && hwaccels.includes("videotoolbox")) return { hwaccel: "videotoolbox", threads: 0 };
|
|
31
|
+
if (platform === "linux") {
|
|
32
|
+
for (const hw of ["vaapi", "qsv", "cuda", "v4l2m2m"]) {
|
|
33
|
+
if (hwaccels.includes(hw)) return { hwaccel: hw, threads: 0 };
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return { hwaccel: "none", threads: Math.max(1, Math.floor(os__namespace.cpus().length / 2)) };
|
|
37
|
+
}
|
|
38
|
+
function resolveFfmpegConfig(deviceConfig, globalConfig, detected) {
|
|
39
|
+
return {
|
|
40
|
+
path: deviceConfig?.path ?? globalConfig.path ?? detected.path ?? "ffmpeg",
|
|
41
|
+
hwaccel: deviceConfig?.hwaccel ?? globalConfig.hwaccel ?? detected.hwaccel ?? "none",
|
|
42
|
+
inputArgs: deviceConfig?.inputArgs ?? globalConfig.inputArgs,
|
|
43
|
+
outputArgs: deviceConfig?.outputArgs ?? globalConfig.outputArgs,
|
|
44
|
+
videoCodec: deviceConfig?.videoCodec ?? globalConfig.videoCodec ?? "copy",
|
|
45
|
+
audioCodec: deviceConfig?.audioCodec ?? globalConfig.audioCodec ?? "copy",
|
|
46
|
+
threads: deviceConfig?.threads ?? globalConfig.threads ?? detected.threads
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function buildFfmpegInputArgs(config, inputUrl) {
|
|
50
|
+
const args = ["-hide_banner", "-loglevel", "warning"];
|
|
51
|
+
if (config.hwaccel && config.hwaccel !== "none") args.push("-hwaccel", config.hwaccel);
|
|
52
|
+
if (config.threads !== void 0) args.push("-threads", String(config.threads));
|
|
53
|
+
if (config.inputArgs?.length) args.push(...config.inputArgs);
|
|
54
|
+
args.push("-rtsp_transport", "tcp", "-i", inputUrl);
|
|
55
|
+
return args;
|
|
56
|
+
}
|
|
57
|
+
function buildFfmpegOutputArgs(config) {
|
|
58
|
+
const args = ["-c:v", config.videoCodec ?? "copy", "-c:a", config.audioCodec ?? "copy"];
|
|
59
|
+
if (config.outputArgs?.length) args.push(...config.outputArgs);
|
|
60
|
+
return args;
|
|
61
|
+
}
|
|
62
|
+
async function resolveFfmpegBinary(configPath, deps) {
|
|
63
|
+
if (configPath && configPath !== "ffmpeg") {
|
|
64
|
+
return configPath;
|
|
65
|
+
}
|
|
66
|
+
return deps.ensureFfmpeg();
|
|
67
|
+
}
|
|
68
|
+
exports.buildFfmpegInputArgs = buildFfmpegInputArgs;
|
|
69
|
+
exports.buildFfmpegOutputArgs = buildFfmpegOutputArgs;
|
|
70
|
+
exports.detectPlatformDefaults = detectPlatformDefaults;
|
|
71
|
+
exports.resolveFfmpegBinary = resolveFfmpegBinary;
|
|
72
|
+
exports.resolveFfmpegConfig = resolveFfmpegConfig;
|
|
73
|
+
//# sourceMappingURL=ffmpeg-config-uANz3sV5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ffmpeg-config-uANz3sV5.js","sources":["../src/recording/recording/ffmpeg-config.ts"],"sourcesContent":["import { execFileSync } from 'node:child_process'\nimport * as os from 'node:os'\nimport type { FfmpegConfig, IAddonDepsManager } from '@camstack/types'\n\n/**\n * Probe ffmpeg binary and detect optimal hwaccel for the host platform.\n * Called once at server startup, result cached.\n */\nexport function detectPlatformDefaults(ffmpegPath: string = 'ffmpeg'): Partial<FfmpegConfig> {\n let hwaccels: string[] = []\n try {\n const output = execFileSync(ffmpegPath, ['-hwaccels', '-hide_banner'], { encoding: 'utf8', timeout: 5000, stdio: ['pipe', 'pipe', 'pipe'] })\n hwaccels = output.split('\\n').map(l => l.trim()).filter(l => l && l !== 'Hardware acceleration methods:')\n } catch {\n // ffmpeg not found or hwaccel probe failed — fall through to defaults\n }\n\n const platform = os.platform()\n if (platform === 'darwin' && hwaccels.includes('videotoolbox')) return { hwaccel: 'videotoolbox', threads: 0 }\n if (platform === 'linux') {\n for (const hw of ['vaapi', 'qsv', 'cuda', 'v4l2m2m'] as const) {\n if (hwaccels.includes(hw)) return { hwaccel: hw, threads: 0 }\n }\n }\n return { hwaccel: 'none', threads: Math.max(1, Math.floor(os.cpus().length / 2)) }\n}\n\n/**\n * Resolve ffmpeg config for a device.\n * Merge order: detected <- global <- per-device (most specific wins).\n */\nexport function resolveFfmpegConfig(\n deviceConfig: Partial<FfmpegConfig> | undefined,\n globalConfig: Partial<FfmpegConfig>,\n detected: Partial<FfmpegConfig>,\n): FfmpegConfig {\n return {\n path: deviceConfig?.path ?? globalConfig.path ?? detected.path ?? 'ffmpeg',\n hwaccel: deviceConfig?.hwaccel ?? globalConfig.hwaccel ?? detected.hwaccel ?? 'none',\n inputArgs: deviceConfig?.inputArgs ?? globalConfig.inputArgs,\n outputArgs: deviceConfig?.outputArgs ?? globalConfig.outputArgs,\n videoCodec: deviceConfig?.videoCodec ?? globalConfig.videoCodec ?? 'copy',\n audioCodec: deviceConfig?.audioCodec ?? globalConfig.audioCodec ?? 'copy',\n threads: deviceConfig?.threads ?? globalConfig.threads ?? detected.threads,\n }\n}\n\n/**\n * Build common ffmpeg args from a resolved config.\n */\nexport function buildFfmpegInputArgs(config: FfmpegConfig, inputUrl: string): string[] {\n const args: string[] = ['-hide_banner', '-loglevel', 'warning']\n if (config.hwaccel && config.hwaccel !== 'none') args.push('-hwaccel', config.hwaccel)\n if (config.threads !== undefined) args.push('-threads', String(config.threads))\n if (config.inputArgs?.length) args.push(...config.inputArgs)\n args.push('-rtsp_transport', 'tcp', '-i', inputUrl)\n return args\n}\n\nexport function buildFfmpegOutputArgs(config: FfmpegConfig): string[] {\n const args: string[] = ['-c:v', config.videoCodec ?? 'copy', '-c:a', config.audioCodec ?? 'copy']\n if (config.outputArgs?.length) args.push(...config.outputArgs)\n return args\n}\n\n/**\n * Resolve ffmpeg binary path. Priority:\n * 1. Explicit config path\n * 2. Embedded (data/deps/ffmpeg)\n * 3. System PATH\n * 4. Download static build\n */\nexport async function resolveFfmpegBinary(\n configPath: string | undefined,\n deps: IAddonDepsManager,\n): Promise<string> {\n // Explicit config\n if (configPath && configPath !== 'ffmpeg') {\n return configPath\n }\n\n // Try embedded or download via deps manager\n return deps.ensureFfmpeg()\n}\n"],"names":["execFileSync","os"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAQO,SAAS,uBAAuB,aAAqB,UAAiC;AAC3F,MAAI,WAAqB,CAAA;AACzB,MAAI;AACF,UAAM,SAASA,mBAAAA,aAAa,YAAY,CAAC,aAAa,cAAc,GAAG,EAAE,UAAU,QAAQ,SAAS,KAAM,OAAO,CAAC,QAAQ,QAAQ,MAAM,GAAG;AAC3I,eAAW,OAAO,MAAM,IAAI,EAAE,IAAI,CAAA,MAAK,EAAE,KAAA,CAAM,EAAE,OAAO,CAAA,MAAK,KAAK,MAAM,gCAAgC;AAAA,EAC1G,QAAQ;AAAA,EAER;AAEA,QAAM,WAAWC,cAAG,SAAA;AACpB,MAAI,aAAa,YAAY,SAAS,SAAS,cAAc,EAAG,QAAO,EAAE,SAAS,gBAAgB,SAAS,EAAA;AAC3G,MAAI,aAAa,SAAS;AACxB,eAAW,MAAM,CAAC,SAAS,OAAO,QAAQ,SAAS,GAAY;AAC7D,UAAI,SAAS,SAAS,EAAE,UAAU,EAAE,SAAS,IAAI,SAAS,EAAA;AAAA,IAC5D;AAAA,EACF;AACA,SAAO,EAAE,SAAS,QAAQ,SAAS,KAAK,IAAI,GAAG,KAAK,MAAMA,cAAG,KAAA,EAAO,SAAS,CAAC,CAAC,EAAA;AACjF;AAMO,SAAS,oBACd,cACA,cACA,UACc;AACd,SAAO;AAAA,IACL,MAAM,cAAc,QAAQ,aAAa,QAAQ,SAAS,QAAQ;AAAA,IAClE,SAAS,cAAc,WAAW,aAAa,WAAW,SAAS,WAAW;AAAA,IAC9E,WAAW,cAAc,aAAa,aAAa;AAAA,IACnD,YAAY,cAAc,cAAc,aAAa;AAAA,IACrD,YAAY,cAAc,cAAc,aAAa,cAAc;AAAA,IACnE,YAAY,cAAc,cAAc,aAAa,cAAc;AAAA,IACnE,SAAS,cAAc,WAAW,aAAa,WAAW,SAAS;AAAA,EAAA;AAEvE;AAKO,SAAS,qBAAqB,QAAsB,UAA4B;AACrF,QAAM,OAAiB,CAAC,gBAAgB,aAAa,SAAS;AAC9D,MAAI,OAAO,WAAW,OAAO,YAAY,OAAQ,MAAK,KAAK,YAAY,OAAO,OAAO;AACrF,MAAI,OAAO,YAAY,OAAW,MAAK,KAAK,YAAY,OAAO,OAAO,OAAO,CAAC;AAC9E,MAAI,OAAO,WAAW,aAAa,KAAK,GAAG,OAAO,SAAS;AAC3D,OAAK,KAAK,mBAAmB,OAAO,MAAM,QAAQ;AAClD,SAAO;AACT;AAEO,SAAS,sBAAsB,QAAgC;AACpE,QAAM,OAAiB,CAAC,QAAQ,OAAO,cAAc,QAAQ,QAAQ,OAAO,cAAc,MAAM;AAChG,MAAI,OAAO,YAAY,aAAa,KAAK,GAAG,OAAO,UAAU;AAC7D,SAAO;AACT;AASA,eAAsB,oBACpB,YACA,MACiB;AAEjB,MAAI,cAAc,eAAe,UAAU;AACzC,WAAO;AAAA,EACT;AAGA,SAAO,KAAK,aAAA;AACd;;;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DeviceProxy } from '@camstack/types';
|
|
2
|
+
export interface AudioMetricsPanelProps {
|
|
3
|
+
/** Pre-resolved proxy — preferred when a parent tab already owns one. */
|
|
4
|
+
readonly dev?: DeviceProxy | null;
|
|
5
|
+
/** Resolve a proxy here when no parent dev is available. */
|
|
6
|
+
readonly deviceId?: number;
|
|
7
|
+
readonly title?: string;
|
|
8
|
+
readonly variant?: 'full' | 'compact';
|
|
9
|
+
}
|
|
10
|
+
export declare function AudioMetricsPanel({ dev: devProp, deviceId, title, variant, }: AudioMetricsPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DeviceProxy } from '@camstack/types';
|
|
2
|
+
export interface OccupancyPanelProps {
|
|
3
|
+
/** Pre-resolved proxy — preferred when a parent tab already owns one. */
|
|
4
|
+
readonly dev?: DeviceProxy | null;
|
|
5
|
+
/** Resolve a proxy here when no parent dev is available. */
|
|
6
|
+
readonly deviceId?: number;
|
|
7
|
+
readonly title?: string;
|
|
8
|
+
readonly variant?: 'full' | 'compact';
|
|
9
|
+
}
|
|
10
|
+
export declare function OccupancyPanel({ dev: devProp, deviceId, title, variant, }: OccupancyPanelProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/pipeline-analytics/@mf-types/compiled-types/pipeline-analytics/widgets/chart-utils.d.ts
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* chart-utils — primitives shared by the LiveStats inline-SVG charts
|
|
3
|
+
* (occupancy, motion, detection histograms). Audio history chart is
|
|
4
|
+
* the elder sibling and predates this module — it could be migrated
|
|
5
|
+
* onto these primitives in a future pass; for now it stays self-
|
|
6
|
+
* contained to keep the diff focused.
|
|
7
|
+
*
|
|
8
|
+
* Three pieces:
|
|
9
|
+
* 1. `<TimeWindowToggle>` — tiny segmented control, same look as the
|
|
10
|
+
* one inside `AudioHistoryChart`. Pure-display; the parent owns
|
|
11
|
+
* `value` + `onChange`.
|
|
12
|
+
* 2. `useChartWidth(elementId)` — `ResizeObserver`-driven width hook
|
|
13
|
+
* so the SVG viewBox matches the container as the device-detail
|
|
14
|
+
* panel divider drags. Floor at 320 keeps the chart legible on
|
|
15
|
+
* narrow side-panels.
|
|
16
|
+
* 3. `formatTimeAxisLabel` — short `HH:MM` for windows under 24h,
|
|
17
|
+
* `DD/MM HH:MM` once the window crosses a day boundary so the
|
|
18
|
+
* operator can tell midnight from noon at a glance.
|
|
19
|
+
*/
|
|
20
|
+
import { type RefObject } from 'react';
|
|
21
|
+
export interface TimeWindowPreset<TId extends string> {
|
|
22
|
+
readonly id: TId;
|
|
23
|
+
readonly label: string;
|
|
24
|
+
}
|
|
25
|
+
export interface TimeWindowToggleProps<TId extends string> {
|
|
26
|
+
readonly presets: readonly TimeWindowPreset<TId>[];
|
|
27
|
+
readonly value: TId;
|
|
28
|
+
readonly onChange: (id: TId) => void;
|
|
29
|
+
}
|
|
30
|
+
export declare function TimeWindowToggle<TId extends string>({ presets, value, onChange, }: TimeWindowToggleProps<TId>): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
/**
|
|
32
|
+
* Subscribe a ref's content-box width via `ResizeObserver`. Returned
|
|
33
|
+
* `width` is `0` until the first observation lands; callers should
|
|
34
|
+
* gate SVG rendering on `width > 0` (or accept a flash) so the chart
|
|
35
|
+
* never paints with the wrong width.
|
|
36
|
+
*
|
|
37
|
+
* Caller pattern:
|
|
38
|
+
*
|
|
39
|
+
* const [ref, width] = useChartWidth()
|
|
40
|
+
* return (
|
|
41
|
+
* <div ref={ref} className="p-3">
|
|
42
|
+
* {width > 0 && <svg width={width} ... />}
|
|
43
|
+
* </div>
|
|
44
|
+
* )
|
|
45
|
+
*
|
|
46
|
+
* Pre-ref versions of this hook used `document.getElementById` which
|
|
47
|
+
* required a unique DOM id per chart and didn't measure until after
|
|
48
|
+
* mount — leading to a brief 720px flash that pushed narrow parent
|
|
49
|
+
* containers wider than the viewport on mobile. Ref + width-gating is
|
|
50
|
+
* the proper React-friendly pattern.
|
|
51
|
+
*/
|
|
52
|
+
export declare function useChartWidth(floor?: number): [RefObject<HTMLDivElement | null>, number];
|
|
53
|
+
/**
|
|
54
|
+
* X-axis tick label. Uses `HH:MM` inside a 24h window and prepends
|
|
55
|
+
* `DD/MM` once the chart spans a calendar day so operators reading
|
|
56
|
+
* the 24h preset can tell which side of midnight they're on.
|
|
57
|
+
*/
|
|
58
|
+
export declare function formatTimeAxisLabel(ts: number, windowMs: number): string;
|
|
59
|
+
/** Map a 0..n-1 index onto chart x-pixels with left/right padding. */
|
|
60
|
+
export declare function xForIndex(i: number, total: number, width: number, padLeft: number, padRight: number): number;
|
|
61
|
+
/** Build evenly-spaced x-axis ticks from a [from..to] timestamp range. */
|
|
62
|
+
export declare function buildTimeAxisTicks(from: number, to: number, width: number, padLeft: number, padRight: number, count: number): {
|
|
63
|
+
readonly x: number;
|
|
64
|
+
readonly label: string;
|
|
65
|
+
}[];
|
|
66
|
+
/** Categorical palette indexed by class label — stable across charts. */
|
|
67
|
+
export declare const CLASS_PALETTE: readonly string[];
|
|
68
|
+
export declare function classColour(index: number): string;
|
|
69
|
+
export interface ChartTooltipState {
|
|
70
|
+
readonly anchorX: number;
|
|
71
|
+
readonly anchorY: number;
|
|
72
|
+
readonly title: string;
|
|
73
|
+
readonly rows: ReadonlyArray<{
|
|
74
|
+
label: string;
|
|
75
|
+
value: string;
|
|
76
|
+
colour?: string;
|
|
77
|
+
}>;
|
|
78
|
+
}
|
|
79
|
+
export interface ChartTooltipApi {
|
|
80
|
+
readonly state: ChartTooltipState | null;
|
|
81
|
+
readonly bindHover: (next: ChartTooltipState | null) => void;
|
|
82
|
+
}
|
|
83
|
+
export declare function useChartTooltip(): ChartTooltipApi;
|
|
84
|
+
export interface ChartTooltipProps {
|
|
85
|
+
readonly state: ChartTooltipState | null;
|
|
86
|
+
readonly containerWidth: number;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Render the active tooltip absolutely positioned inside the chart's
|
|
90
|
+
* relative container. Caller wraps the chart body in a `div` with
|
|
91
|
+
* `position: relative` (e.g. `<div className="relative ...">`) and
|
|
92
|
+
* places this component as a sibling of the SVG.
|
|
93
|
+
*
|
|
94
|
+
* The tooltip auto-clamps to the container's left/right edges so it
|
|
95
|
+
* never overflows; the small triangle below points at the anchor.
|
|
96
|
+
*/
|
|
97
|
+
export declare function ChartTooltip({ state, containerWidth }: ChartTooltipProps): import("react/jsx-runtime").JSX.Element | null;
|
package/dist/pipeline-analytics/@mf-types/compiled-types/pipeline-analytics/widgets/index.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Widget bundle entry — built into `dist/widgets.mjs` by
|
|
3
|
+
* `vite.widgets.config.ts`. Each widget is a thin `WidgetProps` wrapper
|
|
4
|
+
* around the data-shaped component sourced from this directory.
|
|
5
|
+
*
|
|
6
|
+
* The inner components were lifted verbatim from
|
|
7
|
+
* `addon-admin-ui/src/components/shared/` as part of Phase C of the
|
|
8
|
+
* addon-widgets system — admin-ui no longer imports them directly,
|
|
9
|
+
* mounting goes through `<WidgetSlot widgetId="pipeline-analytics/<id>"
|
|
10
|
+
* deviceId={…}/>` instead.
|
|
11
|
+
*/
|
|
12
|
+
import type { WidgetProps } from '@camstack/ui-library';
|
|
13
|
+
declare function AudioHistoryChartWidget(props: WidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function AudioMetricsPanelWidget(props: WidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function OccupancyHistoryChartWidget(props: WidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function MotionHistoryChartWidget(props: WidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function DetectionHistoryChartWidget(props: WidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function LiveOccupancyPanelWidget(props: WidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare const _default: {
|
|
20
|
+
'audio-history-chart': typeof AudioHistoryChartWidget;
|
|
21
|
+
'audio-metrics-panel': typeof AudioMetricsPanelWidget;
|
|
22
|
+
'occupancy-history-chart': typeof OccupancyHistoryChartWidget;
|
|
23
|
+
'motion-history-chart': typeof MotionHistoryChartWidget;
|
|
24
|
+
'detection-history-chart': typeof DetectionHistoryChartWidget;
|
|
25
|
+
'live-occupancy-panel': typeof LiveOccupancyPanelWidget;
|
|
26
|
+
};
|
|
27
|
+
export default _default;
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const e = "__mf_module_cache__";
|
|
2
|
+
globalThis[e] ||= { share: {}, remote: {} };
|
|
3
|
+
globalThis[e].share ||= {};
|
|
4
|
+
globalThis[e].remote ||= {};
|
|
5
|
+
const s = globalThis[e], _ = s.share["@camstack/sdk"];
|
|
6
|
+
if (_ === void 0)
|
|
7
|
+
throw new Error("[Module Federation] Shared module @camstack/sdk was imported before federation bootstrap finished.");
|
|
8
|
+
_.__esModule ? _.default : _.default;
|
|
9
|
+
const { DEFAULT_ENABLED_CLASSES: a, DetectionClass: m, ELIGIBLE_HA_DOMAINS: l, ELIGIBLE_HA_DOMAINS_SET: f, ELIGIBLE_SCRYPTED_DEVICE_TYPES: t, ELIGIBLE_SCRYPTED_DEVICE_TYPES_SET: o, FEATURE_MATRIX: i, HA_DOMAIN_TYPE_MAP: n, RAW_TO_CANONICAL: C, SCRYPTED_TYPE_TO_CANONICAL: E, System: r, TIMELINE_PRESET_ALL: c, TIMELINE_PRESET_CRITICAL: T, TIMELINE_PRESET_IMPORTANT: d, animalClasses: I, audioClasses: A, audioLabelClasses: L, createSystem: S, defaultDetectionClasses: u, detectionClassesDefaultMap: P, doorbellClasses: D, faceClasses: h, getBackendRequiredFeatures: M, getCanonicalDeviceType: b, getClassesForTimelinePreset: g, getNextEvalInterval: N, getParentClass: R, getParentDetectionClass: p, getSourceFeatures: F, isAnimalClassname: O, isAudioClassname: k, isDoorbellClassname: Y, isFaceClassname: B, isFeatureAvailable: v, isLabelDetection: G, isMotionClassname: y, isPackageClassname: w, isPersonClassname: x, isPlateClassname: H, isSensorLabelClassname: V, isVehicleClassname: U, licensePlateClasses: q, motionClasses: K, packageClasses: W, personClasses: X, raceFastestEndpoint: j, selectOptimalStream: z, sensorLabelClasses: J, vehicleClasses: Q } = _;
|
|
10
|
+
export {
|
|
11
|
+
S as _
|
|
12
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const e = "__mf_module_cache__";
|
|
2
|
+
globalThis[e] ||= { share: {}, remote: {} };
|
|
3
|
+
globalThis[e].share ||= {};
|
|
4
|
+
globalThis[e].remote ||= {};
|
|
5
|
+
const m = globalThis[e], _ = m.share["@camstack/types"];
|
|
6
|
+
if (_ === void 0)
|
|
7
|
+
throw new Error("[Module Federation] Shared module @camstack/types was imported before federation bootstrap finished.");
|
|
8
|
+
_.__esModule ? _.default : _.default;
|
|
9
|
+
const { ACCESSORY_LABEL: a, APPLE_SA_TO_MACRO: t, AUDIO_BACKEND_CHOICES: i, AUDIO_MACRO_LABELS: f, AccessoriesStatusSchema: o, AccessoryKind: c, AddonAutoUpdateSchema: r, AddonListItemSchema: S, AddonPageDeclarationSchema: n, AddonPageInfoSchema: s, AgentLoadSummarySchema: h, AlertSchema: l, AlertSeveritySchema: d, AlertSourceSchema: u, AlertStatusSchema: C, ApiKeyRecordSchema: p, ApiKeySummarySchema: y, ArchiveEntrySchema: A, ArchiveManifestSchema: E, AudioAnalysisResultSchema: b, AudioAnalysisSettingsSchema: g, AudioChunkInputSchema: I, AudioClassSummarySchema: T, AudioClassificationLabelSchema: R, AudioClassificationResultSchema: P, AudioCodecInfoSchema: D, AudioDecodeSessionConfigSchema: O, AudioEncodeSessionConfigSchema: v, AudioEncodedChunkSchema: L, AudioEventSchema: M, AudioLevelSchema: N, AudioMetricsHistoryPointSchema: k, AudioMetricsHistorySchema: B, AudioMetricsSnapshotSchema: U, AudioPcmChunkSchema: F, AuthProviderInfoSchema: w, AuthResultSchema: W, AutoUpdateSettingsSchema: z, AvailableIntegrationTypeSchema: H, BATTERY_DEVICE_PROFILE: K, BackupDestinationInfoSchema: Y, BackupEntrySchema: x, BatteryStatusSchema: G, BoundingBoxSchema: Z, BrightnessStatusSchema: V, BrokerAudioClientSchema: j, BrokerClientsSchema: J, BrokerDecodedClientSchema: Q, BrokerRtspClientSchema: q, BrokerStatsSchema: X, BrokerStatusSchema: $, CAM_PROFILE_ORDER: __, CamProfileSchema: e_, CamStreamKindSchema: m_, CamStreamResolutionSchema: a_, CameraCredentialsSchema: t_, CameraCredentialsStatusSchema: i_, CameraMetricsSchema: f_, CameraMetricsWithDeviceIdSchema: o_, CameraStreamSchema: c_, CapabilityBindingsSchema: r_, ChargingStatus: S_, ClientNetworkStatsSchema: n_, ClusterAddonNodeDeploymentSchema: s_, ClusterAddonStatusEntrySchema: h_, CollectionColumnSchema: l_, CollectionIndexSchema: d_, ConfigEntrySchema: u_, ConfigSectionWithValuesSchema: C_, ConfigTabDeclarationSchema: p_, CreateApiKeyInputSchema: y_, CreateApiKeyResultSchema: A_, CreateIntegrationInputSchema: E_, CreateScopedTokenInputSchema: b_, CreateScopedTokenResultSchema: g_, CreateUserInputSchema: I_, CustomActionInputSchema: T_, DEFAULT_AUDIO_ANALYZER_CONFIG: R_, DEFAULT_DECODER_HWACCEL_CONFIG: P_, DEVICE_PROFILES: D_, DEVICE_SETTINGS_CONTRIBUTION_METHODS: O_, DEVICE_STATUS_METHOD: v_, DecodedFrameSchema: L_, DecoderAssignmentSchema: M_, DecoderSessionConfigSchema: N_, DecoderStatsSchema: k_, DeleteIntegrationResultSchema: B_, DetectorOutputSchema: U_, DeviceDiscoveryStatusSchema: F_, DeviceFeature: w_, DeviceInfoSchema: W_, DeviceNetworkStatsSchema: z_, DeviceRole: H_, DeviceStatusSchema: K_, DeviceType: Y_, DiscoveredChildDeviceSchema: x_, DiscoveredChildStatusSchema: G_, DiscoveredDeviceSchema: Z_, DoorbellPressEventSchema: V_, DoorbellStatusSchema: j_, EmbeddingInfoSchema: J_, EmbeddingResultSchema: Q_, EncodedPacketSchema: q_, EnrichedWidgetMetadataSchema: X_, EventItemSchema: $_, EventKindSchema: _e, ExposedResourceSchema: ee, FeatureManifestSchema: me, FeatureProbeStatusSchema: ae, FrameInputSchema: te, GlobalMetricsSchema: ie, HWACCEL_OPTIONS: fe, HealthStatusSchema: oe, HistoryPointSchema: ce, HistoryResolutionEnum: re, InstalledPackageSchema: Se, IntegrationLiteSchema: ne, IntegrationWithStateSchema: se, IntercomAbilitySchema: he, IntercomStatusSchema: le, LocationStatSchema: de, LogEntrySchema: ue, LogLevelSchema: Ce, LogStreamEntrySchema: pe, MODEL_FORMATS: ye, MediaFileSchema: Ae, MotionAnalysisResultSchema: Ee, MotionEventSchema: be, MotionOnMotionChangedDataSchema: ge, MotionRegionSchema: Ie, MotionSourceEnum: Te, MotionSourcesSchema: Re, MotionStatusSchema: Pe, MotionTriggerRuntimeStateSchema: De, MotionTriggerStatusSchema: Oe, NativeDetectionSchema: ve, NativeObjectClassEnum: Le, NativeObjectDetectionStatusSchema: Me, NetworkAccessStatusSchema: Ne, NetworkAddressSchema: ke, NetworkEndpointSchema: Be, NotificationHistoryEntrySchema: Ue, NotificationRuleSchema: Fe, NotificationSchema: we, ObjectEventSchema: We, OrchestratorMetricsSchema: ze, OsdOverlayKindEnum: He, OsdOverlayPatchSchema: Ke, OsdOverlaySchema: Ye, OsdPositionEnum: xe, OsdStatusSchema: Ge, PIPELINE_FLOW_CAPABILITY_NAMES: Ze, PIPELINE_OWNER_CAPABILITY_NAMES: Ve, PackageUpdateSchema: je, PackageVersionInfoSchema: Je, PcmSampleFormatSchema: Qe, PerScopeBreakdownSchema: qe, PipelineAssignmentSchema: Xe, PipelineDefaultStepSchema: $e, PipelineEngineChoiceSchema: _m, PipelineRunResultBridge: em, PipelineStepInputSchema: mm, PlaceholderReasonSchema: am, PolygonPointSchema: tm, ProfileSlotSchema: im, ProfileSlotStatusSchema: fm, ProviderStatusSchema: om, PtzAutotrackRuntimeStateSchema: cm, PtzAutotrackSettingsSchema: rm, PtzAutotrackStatusSchema: Sm, PtzAutotrackTargetOptionSchema: nm, PtzMoveCommandSchema: sm, PtzPositionSchema: hm, PtzPresetSchema: lm, QueryFilterSchema: dm, RegisteredStreamSchema: um, RemoteAccessEndpointSchema: Cm, RemoteAccessProviderInfoSchema: pm, ReportMotionInputSchema: ym, RtspRestreamEntrySchema: Am, RunnerCameraConfigSchema: Em, RunnerCameraDeviceUIFields: bm, RunnerLocalLoadSchema: gm, RunnerLocalMetricsSchema: Im, STORAGE_LOCATION_CARDINALITY: Tm, ScopedTokenSchema: Rm, ScopedTokenSummarySchema: Pm, SearchResultSchema: Dm, SegmentSchema: Om, SettingsPatchSchema: vm, SettingsRecordSchema: Lm, SettingsSchemaWithValuesSchema: Mm, SettingsUpdateResultSchema: Nm, SnapshotImageSchema: km, SpatialDetectionSchema: Bm, StorageAbortUploadInputSchema: Um, StorageBeginDownloadInputSchema: Fm, StorageBeginDownloadResultSchema: wm, StorageBeginUploadInputSchema: Wm, StorageBeginUploadResultSchema: zm, StorageEndDownloadInputSchema: Hm, StorageFinalizeUploadInputSchema: Km, StorageLocationRefSchema: Ym, StorageLocationSchema: xm, StorageLocationTypeSchema: Gm, StorageProviderInfoSchema: Zm, StorageReadChunkInputSchema: Vm, StorageTestLocationResultSchema: jm, StorageWriteChunkInputSchema: Jm, StreamFormatSchema: Qm, StreamInfoSchema: qm, StreamNetworkStatsSchema: Xm, StreamSourceEntrySchema: $m, StreamSourceSchema: _a, SwitchStatusSchema: ea, SystemMetricsSchema: ma, TestConnectionResultSchema: aa, ToastSchema: ta, TokenScopeSchema: ia, TopologyNodeSchema: fa, TopologyProcessSchema: oa, TopologyServiceSchema: ca, TrackSchema: ra, TrackStateSchema: Sa, TrackedDetectionSchema: na, TurnProviderInfoSchema: sa, TurnServerSchema: ha, UpdateIntegrationInputSchema: la, UpdateUserInputSchema: da, UserRecordSchema: ua, UserRoleSchema: Ca, UserSummarySchema: pa, WELL_KNOWN_TABS: ya, WELL_KNOWN_TAB_MAP: Aa, WebrtcStreamChoiceSchema: Ea, WebrtcStreamTargetSchema: ba, WidgetHostEnum: ga, WidgetMetadataSchema: Ia, WidgetSizeEnum: Ta, YAMNET_TO_MACRO: Ra, ZoneKindEnum: Pa, ZoneRuleModeEnum: Da, ZoneRuleSchema: Oa, ZoneRuleStageEnum: va, ZoneRulesArraySchema: La, ZoneSchema: Ma, ZoneScopeBreakdownSchema: Na, accessoriesCapability: ka, accessoryStableId: Ba, addonPagesCapability: Ua, addonPagesSourceCapability: Fa, addonRoutesCapability: wa, addonSettingsCapability: Wa, addonWidgetsCapability: za, addonWidgetsSourceCapability: Ha, addonsCapability: Ka, adminUiCapability: Ya, advancedNotifierCapability: xa, alertsCapability: Ga, audioAnalysisCapability: Za, audioAnalyzerCapability: Va, audioCodecCapability: ja, audioMetricsCapability: Ja, authProviderCapability: Qa, authenticationCapability: qa, backupCapability: Xa, batteryCapability: $a, brightnessCapability: _t, cameraCredentialsCapability: et, cameraStreamsCapability: mt, decoderCapability: at, detectionPipelineCapability: tt, deviceDiscoveryCapability: it, deviceManagerCapability: ft, deviceMatchesProfile: ot, deviceOpsCapability: ct, deviceProviderCapability: rt, deviceStateCapability: St, deviceStatusCapability: nt, doorbellCapability: st, embeddingEncoderCapability: ht, errMsg: lt, event: dt, eventsCapability: ut, expandCapMethods: Ct, featureProbeCapability: pt, getAudioMacroClassIds: yt, hydrateSchema: At, integrationsCapability: Et, intercomCapability: bt, localNetworkCapability: gt, logDestinationCapability: It, mapAudioLabelToMacro: Tt, meshNetworkCapability: Rt, meshOrchestratorCapability: Pt, method: Dt, metricsProviderCapability: Ot, motionCapability: vt, motionDetectionCapability: Lt, motionTriggerCapability: Mt, nativeObjectDetectionCapability: Nt, networkAccessCapability: kt, networkQualityCapability: Bt, nodesCapability: Ut, notificationOutputCapability: Ft, osdCapability: wt, pipelineAnalyticsCapability: Wt, pipelineExecutorCapability: zt, pipelineOrchestratorCapability: Ht, pipelineRunnerCapability: Kt, platformProbeCapability: Yt, ptzAutotrackCapability: xt, ptzCapability: Gt, rebootCapability: Zt, recordingCapability: Vt, recordingEngineCapability: jt, remoteAccessCapability: Jt, resolveDeviceProfile: Qt, restreamerCapability: qt, settingsStoreCapability: Xt, snapshotCapability: $t, snapshotProviderCapability: _i, storageCapability: ei, storageProviderCapability: mi, streamBrokerCapability: ai, streamingEngineCapability: ti, switchCapability: ii, systemCapability: fi, toastCapability: oi, turnOrchestratorCapability: ci, turnProviderCapability: ri, userManagementCapability: Si, webrtcCapability: ni, webrtcClientHintsSchema: si, webrtcSessionCapability: hi, zoneAnalyticsCapability: li, zoneRulesCapability: di, zonesCapability: ui, ALL_CAPABILITY_DEFINITIONS: Ci, BACKEND_TO_FORMAT: pi, BaseAddon: yi, BaseDevice: Ai, BaseDeviceProvider: Ei, CAPABILITY_NAMES: bi, CAPABILITY_ROUTER_KEYS: gi, CAP_NAMES_WITH_STATUS: Ii, COCO_80_LABELS: Ti, COCO_TO_MACRO: Ri, DEFAULT_ADDON_GROUP: Pi, DEFAULT_ADDON_PLACEMENT: Di, DEFAULT_FEATURES: Oi, DEFAULT_LOCATION_SUBDIRS: vi, DEFAULT_RETENTION: Li, DEVICE_TYPE_INFO: Mi, DeviceConfig: Ni, DeviceRuntimeState: ki, DisposerChain: Bi, ElementConfigStore: Ui, EventCategory: Fi, EventSourceType: wi, HF_BASE_URL: Wi, HF_REPO: zi, MACRO_LABELS: Hi, PYTHON_SCRIPT: Ki, RECOGNITION_TYPES: Yi, RUNTIME_DEFAULTS: xi, RUNTIME_TO_FORMAT: Gi, ReadinessRegistry: Zi, ReadinessTimeoutError: Vi, RingBuffer: ji, STORAGE_LOCATION_TYPES: Ji, STREAM_QUALITY_LABELS: Qi, SUB_DETECTION_TYPES: qi, SystemMirror: Xi, asBoolean: $i, asJsonArray: _f, asJsonObject: ef, asNumber: mf, asString: af, autoAssignProfiles: tf, bindAddonActions: ff, classifyStream: of, classifyStreams: cf, cosineSimilarity: rf, createDeviceProxy: Sf, createEvent: nf, createLazyTrpcSource: sf, createMirrorSource: hf, createRuntimeStateBridge: lf, createSliceHandle: df, createSystemProxy: uf, customAction: Cf, defineCustomActions: pf, emitDownForOwnedCaps: yf, emitReadiness: Af, evaluateZoneRules: Ef, formatForBackend: bf, formatForRuntime: gf, hfModelUrl: If, isAgentOnlyPlacement: Tf, isDeployableToAgent: Rf, isEvent: Pf, maskUrlCredentials: Df, normalizeAddonInitResult: Of, parseCameraStreamConfig: vf, parseJsonArray: Lf, parseJsonObject: Mf, parseJsonUnknown: Nf, pythonScriptForBackend: kf, readinessKey: Bf, requiresPython: Uf, resolveAddonExecution: Ff, resolveAddonGroup: wf, resolveAddonPlacement: Wf, resolveAddonRuntime: zf, resolveDetectionRuntime: Hf, resolveModelFormat: Kf, runInferenceStep: Yf, scopeKey: xf, streamPixels: Gf, streamQualityLabel: Zf, toDeviceSummary: Vf, toStreamSourceEntry: jf, zodEntriesToConfigUI: Jf } = _;
|
|
10
|
+
export {
|
|
11
|
+
uf as _,
|
|
12
|
+
Xi as a,
|
|
13
|
+
Fi as b,
|
|
14
|
+
Sf as c,
|
|
15
|
+
Ci as d
|
|
16
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const _ = "__mf_module_cache__";
|
|
2
|
+
globalThis[_] ||= { share: {}, remote: {} };
|
|
3
|
+
globalThis[_].share ||= {};
|
|
4
|
+
globalThis[_].remote ||= {};
|
|
5
|
+
const t = globalThis[_], e = t.share["@camstack/ui-library"];
|
|
6
|
+
if (e === void 0)
|
|
7
|
+
throw new Error("[Module Federation] Shared module @camstack/ui-library was imported before federation bootstrap finished.");
|
|
8
|
+
e.__esModule ? e.default : e.default;
|
|
9
|
+
const { AddonGlobalSettingsForm: s, AgentStepEditor: i, AppShell: r, AudioClassificationList: o, AudioLevelWaveform: m, AudioWaveform: n, BTN_COMPACT: a, BTN_COMPACT_DANGER: u, BTN_COMPACT_PRIMARY: f, BTN_COMPACT_WARNING: c, Badge: l, BatteryBadge: d, BottomSheet: S, Breadcrumb: g, Button: p, CHIP_ACTIVE: v, CHIP_BASE: P, CHIP_INACTIVE: D, CLASS_COLORS: A, CameraStreamPlayer: C, Card: G, Checkbox: h, CodeBlock: E, CollapsibleCard: M, ConfigFormBuilder: R, ConfigFormField: y, ConfigSchemaField: T, ConfirmActionButton: L, ConfirmDialogProvider: b, CustomFieldRenderersProvider: k, DEFAULT_COLOR: O, DataTable: B, DetectionCanvas: I, DetectionOverlay: U, DetectionResultTree: N, DevShell: x, DeviceActivityPanel: F, DeviceCard: w, DeviceContextProvider: W, DeviceGrid: H, DeviceItem: z, DeviceList: Z, Dialog: V, DialogContent: K, DialogDescription: Q, DialogFooter: X, DialogHeader: j, DialogTitle: Y, DialogTrigger: J, DiscoveryPanel: q, DoorbellRecentPanel: $, Dropdown: ee, DropdownContent: _e, DropdownItem: te, DropdownTrigger: se, EmptyState: ie, EventStream: re, FilterBar: oe, FloatingEventStream: me, FloatingLogStream: ne, FloatingPanel: ae, FormField: ue, GRID_GAP: fe, GRID_PAIRED: ce, GRID_QUICK_STATS: le, INPUT_COMPACT: de, IconButton: Se, ImageSelector: ge, InferenceConfigSelector: pe, Input: ve, KebabMenu: Pe, KeyValueList: De, LIST_ROW: Ae, Label: Ce, LogStream: Ge, LoginForm: he, MobileDrawer: Ee, NodeMultiSelectField: Me, NodePicker: Re, NodeSelectField: ye, PHASE_CONFIG: Te, PTZOverlay: Le, PageHeader: be, PhaseIcon: ke, PipelineBuilder: Oe, PipelineRuntimeSelector: Be, PipelineStep: Ie, PipelineTreeMatrix: Ue, PlayerOverlaysProvider: Ne, Popover: xe, PopoverContent: Fe, PopoverTrigger: we, ProviderBadge: We, ResponseLog: He, SECTION_BODY: ze, SECTION_CARD: Ze, SECTION_HEADER: Ve, SPLIT_PANEL_OUTER: Ke, SPLIT_PANEL_SIDE: Qe, STACK_GAP: Xe, ScrollArea: je, Select: Ye, SemanticBadge: Je, Separator: qe, Sidebar: $e, SidebarItem: e_, Skeleton: __, SlideOverPanel: t_, SnapshotButton: s_, StatCard: i_, StateValuesStream: r_, StatusBadge: o_, StepTimings: m_, StepTreeMaster: n_, StreamPanel: a_, Switch: u_, SystemProvider: f_, TEXT_FIELD_LABEL: c_, TEXT_HINT: l_, TEXT_METRIC: d_, TEXT_SECTION_LABEL: S_, TEXT_VALUE: g_, Tabs: p_, TabsContent: v_, TabsList: P_, TabsTrigger: D_, ThemeProvider: A_, Tooltip: C_, TooltipContent: G_, TooltipTrigger: h_, VersionBadge: E_, WidgetRegistryProvider: M_, WidgetSlot: R_, ZoneEditingProvider: y_, __toESM: T_, buildStepTreeFromSchema: L_, cn: b_, createSharedContext: k_, createTheme: O_, darkColors: B_, defaultTheme: I_, deriveDeviceKind: U_, ensureMfHostInit: N_, getClassColor: x_, getPhaseVisual: F_, isFieldVisible: w_, lightColors: W_, mirror: H_, mountAddonPage: z_, providerIcons: Z_, statusIcons: V_, themeToCss: K_, trpc: Q_, useAccessoriesGetStatus: X_, useAddonPagesListPages: j_, useAddonSettingsGetDeviceSettings: Y_, useAddonSettingsGetGlobalSettings: J_, useAddonSettingsUpdateDeviceSettings: q_, useAddonSettingsUpdateGlobalSettings: $_, useAddonWidgetsListWidgets: et, useAddonsApplyAutoUpdateToAll: _t, useAddonsCustom: tt, useAddonsForceRefresh: st, useAddonsGetAddonAutoUpdate: it, useAddonsGetAutoUpdateSettings: rt, useAddonsGetLogs: ot, useAddonsGetVersions: mt, useAddonsInstallFromWorkspace: nt, useAddonsInstallPackage: at, useAddonsIsWorkspaceAvailable: ut, useAddonsList: ft, useAddonsListPackages: ct, useAddonsListUpdates: lt, useAddonsListWorkspacePackages: dt, useAddonsOnAddonLogs: St, useAddonsReloadPackages: gt, useAddonsRestartAddon: pt, useAddonsRestartServer: vt, useAddonsRetryLoad: Pt, useAddonsRollbackPackage: Dt, useAddonsSearchAvailable: At, useAddonsSetAddonAutoUpdate: Ct, useAddonsSetAutoUpdateSettings: Gt, useAddonsUninstallPackage: ht, useAddonsUpdatePackage: Et, useAlertsDismiss: Mt, useAlertsEmit: Rt, useAlertsGetUnreadCount: yt, useAlertsList: Tt, useAlertsMarkAllRead: Lt, useAlertsMarkRead: bt, useAlertsUpdate: kt, useAllWidgets: Ot, useAudioAnalysisApplyDeviceSettingsPatch: Bt, useAudioAnalysisGetDeviceLiveContribution: It, useAudioAnalysisGetDeviceSettingsContribution: Ut, useAudioAnalysisResolveDeviceSettings: Nt, useAudioAnalyzerAnalyseChunk: xt, useAudioAnalyzerClassify: Ft, useAudioAnalyzerDispose: wt, useAudioAnalyzerIsReady: Wt, useAudioAnalyzerReprobeAudioEngine: Ht, useAudioCodecCanHandle: zt, useAudioCodecCloseSession: Zt, useAudioCodecCreateDecodeSession: Vt, useAudioCodecCreateEncodeSession: Kt, useAudioCodecFlushEncode: Qt, useAudioCodecListActiveSessions: Xt, useAudioCodecListSupportedCodecs: jt, useAudioCodecPullEncoded: Yt, useAudioCodecPullPcm: Jt, useAudioCodecPushEncodedFrame: qt, useAudioCodecPushPcm: $t, useAudioMetricsGetCurrentSnapshot: es, useAudioMetricsGetHistory: _s, useAuthenticationListProviders: ts, useAuthenticationSetProviderEnabled: ss, useBackupDelete: is, useBackupGetEntries: rs, useBackupList: os, useBackupListArchives: ms, useBackupListDestinations: ns, useBackupListLocations: as, useBackupPreviewSchedule: us, useBackupRestore: fs, useBackupTrigger: cs, useBackupUpsertDestinationPolicy: ls, useBatteryGetStatus: ds, useBrightnessGetStatus: Ss, useBrightnessSetBrightness: gs, useCameraStreamsGetBrokerStreams: ps, useCameraStreamsGetCameraStreams: vs, useCameraStreamsGetRtspEntries: Ps, useClusterNodes: Ds, useConfirm: As, useCustomFieldRenderer: Cs, useDebouncedString: Gs, useDecoderCreateSession: hs, useDecoderDestroySession: Es, useDecoderGetInfo: Ms, useDecoderGetStats: Rs, useDecoderListActiveSessions: ys, useDecoderOpenStream: Ts, useDecoderPullFrames: Ls, useDecoderPushPacket: bs, useDecoderReprobeHwaccel: ks, useDecoderSupportsCodec: Os, useDecoderUpdateConfig: Bs, useDetectionPipelineApplyDeviceSettingsPatch: Is, useDetectionPipelineGetDeviceLiveContribution: Us, useDetectionPipelineGetDeviceSettingsContribution: Ns, useDevShell: xs, useDevice: Fs, useDeviceBattery: ws, useDeviceCapability: Ws, useDeviceDetections: Hs, useDeviceDiscoveryAdoptDevice: zs, useDeviceDiscoveryGetStatus: Zs, useDeviceDiscoveryListDiscovered: Vs, useDeviceDiscoveryRefreshDiscovery: Ks, useDeviceDiscoveryReleaseDevice: Qs, useDeviceId: Xs, useDeviceManagerAddLocation: js, useDeviceManagerAdoptDevice: Ys, useDeviceManagerAllocateDeviceId: Js, useDeviceManagerCreateDevice: qs, useDeviceManagerDisable: $s, useDeviceManagerDiscoverDevices: ei, useDeviceManagerEnable: _i, useDeviceManagerGetAllBindings: ti, useDeviceManagerGetBindings: si, useDeviceManagerGetChildren: ii, useDeviceManagerGetConfigSchema: ri, useDeviceManagerGetCreationSchema: oi, useDeviceManagerGetDevice: mi, useDeviceManagerGetDeviceAggregate: ni, useDeviceManagerGetDeviceLiveInfoAggregate: ai, useDeviceManagerGetDeviceSettingsAggregate: ui, useDeviceManagerGetDeviceStatusAggregate: fi, useDeviceManagerGetSettingsSchema: ci, useDeviceManagerGetStreamProfileMap: li, useDeviceManagerGetStreamSources: di, useDeviceManagerListAll: Si, useDeviceManagerListBindableCapsForDeviceType: gi, useDeviceManagerListLocations: pi, useDeviceManagerListPersistedByAddon: vi, useDeviceManagerListWrappersForCap: Pi, useDeviceManagerLoadConfig: Di, useDeviceManagerLoadMeta: Ai, useDeviceManagerLoadRuntimeState: Ci, useDeviceManagerPersistConfig: Gi, useDeviceManagerProbeStreams: hi, useDeviceManagerRegisterDevice: Ei, useDeviceManagerRemove: Mi, useDeviceManagerRemoveDevice: Ri, useDeviceManagerRemoveLocation: yi, useDeviceManagerSetDisabled: Ti, useDeviceManagerSetLocation: Li, useDeviceManagerSetMetadata: bi, useDeviceManagerSetName: ki, useDeviceManagerSetStreamProfileMap: Oi, useDeviceManagerSetWrapperActive: Bi, useDeviceManagerTestCreationField: Ii, useDeviceManagerTestField: Ui, useDeviceManagerUpdateConfig: Ni, useDeviceManagerUpdateDeviceField: xi, useDeviceManagerUpdateDeviceFieldsBatch: Fi, useDeviceOpsGetConfigEntries: wi, useDeviceOpsGetSettingsSchema: Wi, useDeviceOpsGetStreamSources: Hi, useDeviceOpsRemoveDevice: zi, useDeviceOpsSetConfig: Zi, useDeviceProviderAdoptDiscoveredDevice: Vi, useDeviceProviderCreateDevice: Ki, useDeviceProviderDiscoverDevices: Qi, useDeviceProviderGetChildCreationSchema: Xi, useDeviceProviderGetDevices: ji, useDeviceProviderGetStatus: Yi, useDeviceProviderStart: Ji, useDeviceProviderStop: qi, useDeviceProviderSupportsDiscovery: $i, useDeviceProviderSupportsManualCreation: er, useDeviceProviderTestCreationField: _r, useDeviceProxy: tr, useDeviceSnapshot: sr, useDeviceSnapshotImage: ir, useDeviceState: rr, useDeviceStateGetAllSnapshots: or, useDeviceStateGetCapSlice: mr, useDeviceStateGetSnapshot: nr, useDeviceStateSetCapSlice: ar, useDeviceStateSlice: ur, useDeviceWebrtc: fr, useDevices: cr, useDoorbellEvents: lr, useDoorbellGetStatus: dr, useEventInvalidation: Sr, useEventStreamLatest: gr, useEventStreamMap: pr, useEventsGetEventClipUrl: vr, useEventsGetEventThumbnail: Pr, useEventsGetEvents: Dr, useIntegrationsCreate: Ar, useIntegrationsDelete: Cr, useIntegrationsGet: Gr, useIntegrationsGetAvailableTypes: hr, useIntegrationsGetByAddonId: Er, useIntegrationsGetSettings: Mr, useIntegrationsList: Rr, useIntegrationsSetSettings: yr, useIntegrationsTestConnection: Tr, useIntegrationsUpdate: Lr, useIntercomGetStatus: br, useIntercomHandleAnswer: kr, useIntercomStartSession: Or, useIntercomStopSession: Br, useIsMidWidth: Ir, useIsMobile: Ur, useLiveBuffer: Nr, useLiveEvent: xr, useLocalNetworkGetAllowedAddresses: Fr, useLocalNetworkGetConnectionEndpoints: wr, useLocalNetworkGetPreferred: Wr, useLocalNetworkList: Hr, useLocalNetworkResetAllowlistToBestMatch: zr, useLocalNetworkSetAllowedAddresses: Zr, useMeshOrchestratorJoinProvider: Vr, useMeshOrchestratorLeaveProvider: Kr, useMeshOrchestratorListProviders: Qr, useMetricsProviderCollectSnapshot: Xr, useMetricsProviderGetAddonStats: jr, useMetricsProviderGetCached: Yr, useMetricsProviderGetCpuTemperature: Jr, useMetricsProviderGetCurrent: qr, useMetricsProviderGetDiskSpace: $r, useMetricsProviderGetGpuInfo: eo, useMetricsProviderGetProcessStats: _o, useMetricsProviderKillProcess: to, useMetricsProviderListAddonInstances: so, useMetricsProviderListNodeProcesses: io, useMotionDetectionAnalyze: ro, useMotionDetectionApplyDeviceSettingsPatch: oo, useMotionDetectionGetDeviceLiveContribution: mo, useMotionDetectionGetDeviceSettingsContribution: no, useMotionDetectionRemoveCamera: ao, useMotionDetectionReset: uo, useMotionGetStatus: fo, useMotionIsDetected: co, useMotionTriggerGetStatus: lo, useMotionTriggerSetMotionTrigger: So, useNativeObjectDetectionGetStatus: go, useNetworkQualityGetAllStats: po, useNetworkQualityGetDeviceStats: vo, useNetworkQualityReportClientStats: Po, useNodesClusterAddonStatus: Do, useNodesDeployAddon: Ao, useNodesExecuteQuery: Co, useNodesRenameNode: Go, useNodesRestartAddon: ho, useNodesRestartNode: Eo, useNodesRestartProcess: Mo, useNodesSetProcessLogLevel: Ro, useNodesShutdownNode: yo, useNodesTopology: To, useNodesUndeployAddon: Lo, useNotificationOutputSend: bo, useNotificationOutputSendTest: ko, useOptionalSystem: Oo, useOptionalWidgetRegistry: Bo, useOsdGetStatus: Io, useOsdSetOverlay: Uo, usePTZ: No, usePipelineAnalyticsApplyDeviceSettingsPatch: xo, usePipelineAnalyticsClearTracks: Fo, usePipelineAnalyticsGetActiveTracks: wo, usePipelineAnalyticsGetAudioEvents: Wo, usePipelineAnalyticsGetDeviceLiveContribution: Ho, usePipelineAnalyticsGetDeviceSettingsContribution: zo, usePipelineAnalyticsGetEventMedia: Zo, usePipelineAnalyticsGetMotionEvents: Vo, usePipelineAnalyticsGetObjectEvents: Ko, usePipelineAnalyticsGetTrack: Qo, usePipelineAnalyticsGetTrackMedia: Xo, usePipelineAnalyticsListTracks: jo, usePipelineExecutorCacheFrameInPool: Yo, usePipelineExecutorDeleteModel: Jo, usePipelineExecutorDeleteTemplate: qo, usePipelineExecutorDetect: $o, usePipelineExecutorDownloadModel: em, usePipelineExecutorGetAddonModels: _m, usePipelineExecutorGetAudioCapabilities: tm, usePipelineExecutorGetAvailableEngines: sm, usePipelineExecutorGetCapabilities: im, usePipelineExecutorGetDefaultSteps: rm, usePipelineExecutorGetDetectionConfigSchema: om, usePipelineExecutorGetEffectiveTuning: mm, usePipelineExecutorGetGlobalPipelineConfig: nm, usePipelineExecutorGetGlobalSteps: am, usePipelineExecutorGetOrchestratorConfigSchema: um, usePipelineExecutorGetReferenceAudio: fm, usePipelineExecutorGetReferenceAudioFiles: cm, usePipelineExecutorGetReferenceImage: lm, usePipelineExecutorGetSchema: dm, usePipelineExecutorGetSelectedEngine: Sm, usePipelineExecutorGetVideoPipelineSteps: gm, usePipelineExecutorInferCached: pm, usePipelineExecutorKillEngine: vm, usePipelineExecutorListLoadedEngines: Pm, usePipelineExecutorListReferenceImages: Dm, usePipelineExecutorListTemplates: Am, usePipelineExecutorReprobeEngine: Cm, usePipelineExecutorRunAudioTest: Gm, usePipelineExecutorRunPipeline: hm, usePipelineExecutorRunPipelineBatch: Em, usePipelineExecutorSaveTemplate: Mm, usePipelineExecutorSetVideoPipelineSteps: Rm, usePipelineExecutorSpinEngine: ym, usePipelineExecutorUncacheFrame: Tm, usePipelineExecutorUpdateTemplate: Lm, usePipelineOrchestratorApplyDeviceSettingsPatch: bm, usePipelineOrchestratorAssignAudio: km, usePipelineOrchestratorAssignDecoder: Om, usePipelineOrchestratorAssignPipeline: Bm, usePipelineOrchestratorDeleteTemplate: Im, usePipelineOrchestratorGetAgentLoad: Um, usePipelineOrchestratorGetAgentSettings: Nm, usePipelineOrchestratorGetAudioAssignment: xm, usePipelineOrchestratorGetAudioAssignments: Fm, usePipelineOrchestratorGetAudioNodeLoad: wm, usePipelineOrchestratorGetCameraMetrics: Wm, usePipelineOrchestratorGetCameraSettings: Hm, usePipelineOrchestratorGetCameraStepOverrides: zm, usePipelineOrchestratorGetCapabilityBindings: Zm, usePipelineOrchestratorGetDecoderAssignment: Vm, usePipelineOrchestratorGetDecoderAssignments: Km, usePipelineOrchestratorGetDeviceLiveContribution: Qm, usePipelineOrchestratorGetDeviceSettingsContribution: Xm, usePipelineOrchestratorGetGlobalMetrics: jm, usePipelineOrchestratorGetPipelineAssignment: Ym, usePipelineOrchestratorGetPipelineAssignments: Jm, usePipelineOrchestratorListAgentSettings: qm, usePipelineOrchestratorListTemplates: $m, usePipelineOrchestratorRebalance: en, usePipelineOrchestratorRemoveAgentSettings: _n, usePipelineOrchestratorResolvePipeline: tn, usePipelineOrchestratorSaveTemplate: sn, usePipelineOrchestratorSetAgentAddonDefaults: rn, usePipelineOrchestratorSetCameraPipelineForAgent: on, usePipelineOrchestratorSetCameraStepOverride: mn, usePipelineOrchestratorSetCameraStepToggle: nn, usePipelineOrchestratorSetCapabilityBinding: an, usePipelineOrchestratorUnassignAudio: un, usePipelineOrchestratorUnassignDecoder: fn, usePipelineOrchestratorUnassignPipeline: cn, usePipelineOrchestratorUpdateTemplate: ln, usePipelineRunnerAttachCamera: dn, usePipelineRunnerDetachCamera: Sn, usePipelineRunnerGetAllCameraMetrics: gn, usePipelineRunnerGetCameraMetrics: pn, usePipelineRunnerGetLocalCameras: vn, usePipelineRunnerGetLocalLoad: Pn, usePipelineRunnerGetLocalMetrics: Dn, usePipelineRunnerReportMotion: An, usePlatformProbeGetCapabilities: Cn, usePlatformProbeGetHardware: Gn, usePlatformProbeResolveHwAccel: hn, usePlatformProbeResolveInferenceConfig: En, usePlayerOverlayLayer: Mn, usePlayerOverlayLayers: Rn, usePlayerToolbarButton: yn, usePlayerToolbarButtons: Tn, usePtzAutotrackGetSettings: Ln, usePtzAutotrackGetStatus: bn, usePtzAutotrackSetEnabled: kn, usePtzAutotrackSetSettings: On, usePtzContinuousMove: Bn, usePtzGetPosition: In, usePtzGetPresets: Un, usePtzGetStatus: Nn, usePtzGoHome: xn, usePtzGoToPreset: Fn, usePtzMove: wn, usePtzStop: Wn, useRebootReboot: Hn, useRecordingEngineDisable: zn, useRecordingEngineEnable: Zn, useRecordingEngineEstimateGlobalStorage: Vn, useRecordingEngineEstimateStorage: Kn, useRecordingEngineGetAvailability: Qn, useRecordingEngineGetConfig: Xn, useRecordingEngineGetMotionStats: jn, useRecordingEngineGetPlaylist: Yn, useRecordingEngineGetPolicy: Jn, useRecordingEngineGetPolicyStatus: qn, useRecordingEngineGetRetentionConfig: $n, useRecordingEngineGetSegments: ea, useRecordingEngineGetStatus: _a, useRecordingEngineGetStorageUsage: ta, useRecordingEngineGetThumbnail: sa, useRecordingEngineSetPolicy: ia, useRecordingEngineUpdateConfig: ra, useRecordingEngineUpdateRetentionConfig: oa, useRecordingGetPlaybackUrl: ma, useRecordingGetSegments: na, useRecordingGetThumbnailAt: aa, useRemoteAccessListProviders: ua, useRemoteAccessStartProvider: fa, useRemoteAccessStopProvider: ca, useSettingsStoreCount: la, useSettingsStoreDeclareCollection: da, useSettingsStoreDelete: Sa, useSettingsStoreGet: ga, useSettingsStoreInsert: pa, useSettingsStoreIsEmpty: va, useSettingsStoreQuery: Pa, useSettingsStoreSet: Da, useSettingsStoreUpdate: Aa, useSnapshotApplyDeviceSettingsPatch: Ca, useSnapshotGetDeviceLiveContribution: Ga, useSnapshotGetDeviceSettingsContribution: ha, useSnapshotGetSnapshot: Ea, useSnapshotGetStatus: Ma, useSnapshotInvalidateCache: Ra, useSnapshotProviderGetSnapshot: ya, useSnapshotProviderSupportsDevice: Ta, useStorageAbortUpload: La, useStorageBeginDownload: ba, useStorageBeginUpload: ka, useStorageDelete: Oa, useStorageDeleteLocation: Ba, useStorageEndDownload: Ia, useStorageExists: Ua, useStorageFinalizeUpload: Na, useStorageGetAvailableSpace: xa, useStorageGetDefaultLocation: Fa, useStorageList: wa, useStorageListLocations: Wa, useStorageListProviders: Ha, useStorageRead: za, useStorageReadChunk: Za, useStorageResolve: Va, useStorageTestConfig: Ka, useStorageTestLocation: Qa, useStorageUpsertLocation: Xa, useStorageWrite: ja, useStorageWriteChunk: Ya, useStreamBrokerApplyDeviceSettingsPatch: Ja, useStreamBrokerAssignProfile: qa, useStreamBrokerGetAllRtspEntries: $a, useStreamBrokerGetBroker: eu, useStreamBrokerGetBrokerStats: _u, useStreamBrokerGetDeviceLiveContribution: tu, useStreamBrokerGetDeviceSettingsContribution: su, useStreamBrokerGetPreBufferInfo: iu, useStreamBrokerGetRtspEntry: ru, useStreamBrokerGetRtspPort: ou, useStreamBrokerGetStreamUrl: mu, useStreamBrokerIsRtspEnabled: nu, useStreamBrokerKillClient: au, useStreamBrokerListAllCameraStreams: uu, useStreamBrokerListAllProfileSlots: fu, useStreamBrokerListClients: cu, useStreamBrokerPublishCameraStream: lu, useStreamBrokerRegenerateRtspToken: du, useStreamBrokerRestartProfile: Su, useStreamBrokerRetractCameraStream: gu, useStreamBrokerSetPreBufferDuration: pu, useStreamBrokerSetRtspEnabled: vu, useStreamBrokerUnassignProfile: Pu, useSwitchGetStatus: Du, useSwitchSetState: Au, useSystem: Cu, useSystemFeatureFlags: Gu, useSystemForceRetentionCleanup: hu, useSystemGetRetentionConfig: Eu, useSystemHealth: Mu, useSystemInfo: Ru, useSystemMutation: yu, useSystemNetworkAddresses: Tu, useSystemQuery: Lu, useSystemSetRetentionConfig: bu, useThemeMode: ku, useToastOnToast: Ou, useTurnOrchestratorGetAllServers: Bu, useTurnOrchestratorListProviders: Iu, useTurnOrchestratorSetProviderEnabled: Uu, useTurnProviderGetTurnServers: Nu, useUserManagementCreateApiKey: xu, useUserManagementCreateScopedToken: Fu, useUserManagementCreateUser: wu, useUserManagementDeleteUser: Wu, useUserManagementListApiKeys: Hu, useUserManagementListScopedTokens: zu, useUserManagementListUsers: Zu, useUserManagementResetPassword: Vu, useUserManagementRevokeApiKey: Ku, useUserManagementRevokeScopedToken: Qu, useUserManagementUpdateUser: Xu, useUserManagementValidateApiKey: ju, useUserManagementValidateCredentials: Yu, useUserManagementValidateScopedToken: Ju, useWebrtcSessionCloseSession: qu, useWebrtcSessionCreateSession: $u, useWebrtcSessionHandleAnswer: ef, useWebrtcSessionHasAdaptiveBitrate: _f, useWebrtcSessionListStreams: tf, useWidget: sf, useWidgetMetadata: rf, useWidgetRegistry: of, useZoneAnalyticsGetCameraHistory: mf, useZoneAnalyticsGetCurrentSnapshot: nf, useZoneAnalyticsGetUnzonedHistory: af, useZoneAnalyticsGetZoneHistory: uf, useZoneEditing: ff, useZoneRulesListRules: cf, useZoneRulesSetRules: lf, useZonesAddZone: df, useZonesListZones: Sf, useZonesRemoveZone: gf, useZonesUpdateZone: pf } = e;
|
|
10
|
+
export {
|
|
11
|
+
Cu as _,
|
|
12
|
+
tr as a,
|
|
13
|
+
rr as b,
|
|
14
|
+
ur as c
|
|
15
|
+
};
|