import { t as CameraStream } from "./camera-9wWD-pwg.js"; import { o as IncodeCanvas } from "./IStorageCapability-ORkQfK3F.js"; //#region ../infra/src/media/StreamCanvasCapture.d.ts type StreamCanvasCaptureOptions = { fps?: number; width?: number; height?: number; }; type StreamCanvasCaptureEventMap = { frame: Event; }; declare class StreamCanvasCapture { private video; private canvas; private ctx; private rafId; private lastFrameTimeSeconds; private lastTickTimeMs; private hasFrame; private disposed; private eventTarget; constructor(stream: CameraStream, options?: StreamCanvasCaptureOptions); addEventListener(type: keyof StreamCanvasCaptureEventMap, listener: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: keyof StreamCanvasCaptureEventMap, listener: EventListenerOrEventListenerObject | null, options?: boolean | EventListenerOptions): void; /** * Returns the latest cached frame as an {@link IncodeCanvas}. */ getLatestCanvas(): IncodeCanvas | null; /** * Returns the latest cached frame as raw {@link ImageData}. */ getLatestFrame(): ImageData | null; /** * Disposes internal resources and stops the capture loop. */ dispose(): void; private rafLoop; private tick; } //#endregion //#region ../infra/src/capabilities/IMotionSensorCapability.d.ts type MotionStatus = 'PASS' | 'FAIL' | 'UNCLEAR'; type MotionPermissionState = 'granted' | 'denied' | 'not-required'; //#endregion //#region src/internal/deepsight/metadataService.d.ts type MetadataService = { initialize(sdkVersion: string, disableIpify?: boolean, disableFingerprint?: boolean): Promise; updateCameraInfo(videoTrack: MediaStreamTrack): void; checkForVirtualCameraByLabel(videoTrack: MediaStreamTrack | null): Promise; analyzeFrame(imageData: ImageData): Promise; setMotionStatus(status: string): void; setBackgroundMode(backgroundMode: boolean): void; estimatePerformance(): string; getMetadata(): string; getCheck(): string; getPipelineState(): string; /** * Prepares pipeline state for metadata collection. * Must be called before setMotionStatus, getCheck, setBackgroundMode, and getMetadata. */ preparePipelineState(): void; }; //#endregion //#region src/internal/deepsight/motionStatusService.d.ts type MotionStatusService = { requestPermission(): Promise; start(): Promise; stop(): void; check(): MotionStatus; readonly isRunning: boolean; readonly hasPermission: boolean; }; //#endregion //#region src/internal/virtualCameraCheck.d.ts declare const frameSources: { readonly front: "FRONT_ID"; readonly back: "BACK_ID"; readonly selfie: "SELFIE"; }; type FrameSource = (typeof frameSources)[keyof typeof frameSources]; //#endregion //#region src/internal/deepsight/deepsightService.d.ts type DeepsightService = { readonly metadata: MetadataService; readonly motion: MotionStatusService; initialize(disableIpify?: boolean, disableFingerprint?: boolean): Promise; requestMotionPermission(): Promise<'granted' | 'denied' | 'not-required'>; startMotionSensors(): Promise; primeWasmMotionSensor(): Promise; stopMotionSensors(): void; checkVirtualCamera(videoTrack: MediaStreamTrack): Promise; performVirtualCameraCheck(sessionToken: string | null, source: FrameSource): Promise; /** * Runs PRC warmup and stores DS flag using infrastructure providers. */ performPrcCheck(params: DeepsightPrcCheckParams): Promise; analyzeFrame(imageData: ImageData): Promise; getMetadata(): string; getMotionStatus(): string; getAnalysisStatus(): string; getPipelineState(): string; cleanup(): void; }; type DeepsightPrcCheckParams = { constraints: MediaStreamConstraints; }; //#endregion export { StreamCanvasCapture as n, DeepsightService as t };