@idscan/idvc2 2.9.0 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -4
- package/dist/css/idvc.css +1 -1
- package/dist/idvc.js +1 -1
- package/dist/idvc.js.gzip +0 -0
- package/dist/index.html +41 -45
- package/dist/js/defaultConfig.ts +5 -5
- package/dist/js/environment/langs.js +1 -1
- package/dist/js/environment/networkNames.json +1 -2
- package/dist/js/environment/stepsDescription.ts +5 -4
- package/dist/langs.js.gzip +0 -0
- package/dist/networks/Face-chunk.js +1 -1
- package/dist/networks/MRZ-chunk.js +1 -1
- package/dist/networks/blurWorker.js.gzip +0 -0
- package/dist/networks/generalTypeDetectionYolo29052024.onnx.gzip +0 -0
- package/dist/networks/mrzWorker.js.gzip +0 -0
- package/dist/types/bl.d.ts +2 -2
- package/dist/types/constatnts/animations.d.ts +1 -0
- package/dist/types/context.d.ts +1 -129
- package/dist/types/controllers/ModuleController.d.ts +26 -7
- package/dist/types/defaultConfig.d.ts +1 -1
- package/dist/types/environment/langs.d.ts +69 -8
- package/dist/types/environment/stepsDescription.d.ts +1 -0
- package/dist/types/eventListeners/eventListeners.d.ts +1 -1
- package/dist/types/eventListeners/selectDocumentType/selectHandler.d.ts +1 -3
- package/dist/types/helpers/cameraConstraints.d.ts +6 -0
- package/dist/types/helpers/canvas.d.ts +3 -3
- package/dist/types/helpers/detectLanguage.d.ts +1 -0
- package/dist/types/helpers/image.d.ts +6 -7
- package/dist/types/helpers/layoutBreakpoints.d.ts +10 -0
- package/dist/types/helpers/step-background.d.ts +2 -2
- package/dist/types/idvc.d.ts +1 -1
- package/dist/types/loop.d.ts +2 -2
- package/dist/types/{modules/manualUpload.d.ts → manualUpload.d.ts} +3 -3
- package/dist/types/modules/App/UI-Types.d.ts +9 -0
- package/dist/types/modules/App/UI.d.ts +52 -0
- package/dist/types/modules/App/WebLibManualUploader.d.ts +13 -0
- package/dist/types/modules/Config.d.ts +2 -2
- package/dist/types/modules/MrzModule.d.ts +3 -3
- package/dist/types/modules/PdfModule.d.ts +3 -3
- package/dist/types/modules/Slider.d.ts +10 -0
- package/dist/types/modules/Spinner/Spinner.d.ts +22 -0
- package/dist/types/modules/Step.d.ts +7 -3
- package/dist/types/modules/camera/camera.d.ts +2 -2
- package/dist/types/modules/camera/cameraManager.d.ts +6 -2
- package/dist/types/modules/manualUploadProcessing.d.ts +8 -8
- package/dist/types/modules/ui/CardStep/Card.d.ts +33 -0
- package/dist/types/modules/ui/CardStep/CardStep.d.ts +10 -0
- package/dist/types/modules/ui/Component.d.ts +32 -0
- package/dist/types/modules/ui/ControlButton/ControlButton.d.ts +22 -0
- package/dist/types/modules/ui/DesktopNotification/DesktopNotification.d.ts +17 -0
- package/dist/types/modules/ui/DocumentsList/DocumentsList.d.ts +21 -0
- package/dist/types/modules/ui/IDVCVersionPlank/IDVCVersionPlank.d.ts +10 -0
- package/dist/types/modules/ui/InitialLoader/initialLoader.d.ts +12 -0
- package/dist/types/modules/ui/MainScreen/MainScreen.d.ts +75 -0
- package/dist/types/modules/ui/MessageBox/MessageBox.d.ts +30 -0
- package/dist/types/modules/ui/Modal.d.ts +5 -7
- package/dist/types/modules/ui/ModeSwitch/ModeSwitch.d.ts +20 -0
- package/dist/types/modules/ui/Notification/Notification.d.ts +24 -0
- package/dist/types/modules/ui/SelectDocumentType.d.ts +8 -11
- package/dist/types/modules/ui/Spinner/SpinnerUI.d.ts +11 -0
- package/dist/types/modules/ui/StepsList/StepsList.d.ts +48 -0
- package/dist/types/modules/ui/Uploader/UploaderUI.d.ts +39 -0
- package/dist/types/modules/ui/VideoWrapper/CanvasWrapper.d.ts +46 -0
- package/dist/types/modules/ui/{Flashlight.d.ts → VideoWrapper/Flashlight.d.ts} +8 -8
- package/dist/types/modules/ui/VideoWrapper/MaskCapture.d.ts +47 -0
- package/dist/types/modules/ui/VideoWrapper/StepPreview/StepPreview.d.ts +16 -0
- package/dist/types/modules/ui/VideoWrapper/UIHints.d.ts +27 -0
- package/dist/types/modules/ui/VideoWrapper/VideoWrapper.d.ts +44 -0
- package/dist/types/modules/ui/selectDocumentType/documentSelectedEvent.d.ts +2 -2
- package/dist/types/neural models/generalTypeDetectionYoloModel.d.ts +1 -1
- package/dist/types/stepProcessing.d.ts +3 -3
- package/dist/types/types/context.d.ts +121 -0
- package/dist/types/util.d.ts +1 -1
- package/package.json +5 -1
- package/dist/networks/ClassLocal-chunk.js +0 -1
- package/dist/networks/classLocal03032023.onnx.gzip +0 -0
- package/dist/types/loader/loaderClassLocal.d.ts +0 -3
- package/dist/types/modules/heic.d.ts +0 -11
- package/dist/types/modules/ui/MaskCapture.d.ts +0 -76
- package/dist/types/modules/ui/MessageBox.d.ts +0 -21
- package/dist/types/modules/ui/canvas.d.ts +0 -49
- package/dist/types/modules/ui/forceCaptruringBtn.d.ts +0 -12
- package/dist/types/modules/ui/hints.d.ts +0 -17
- package/dist/types/modules/ui/limitations.d.ts +0 -2
- package/dist/types/modules/ui/manualSwitchBtn.d.ts +0 -30
- package/dist/types/modules/ui/spinner.d.ts +0 -13
- package/dist/types/modules/uploader.d.ts +0 -58
- package/dist/types/neural models/classLocal/exits.d.ts +0 -4
- package/dist/types/neural models/classLocalModel.d.ts +0 -29
- package/dist/types/ui.d.ts +0 -93
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Component } from '../Component';
|
|
2
|
+
import type { StepTypeImageName } from '../../../environment/stepsDescription';
|
|
3
|
+
import type { ErrorCodes } from '../../../environment/langs';
|
|
4
|
+
import Step from '../../Step';
|
|
5
|
+
export type UploaderState = {
|
|
6
|
+
status: 'ready' | 'warning' | 'success' | 'disabled';
|
|
7
|
+
stepType: StepTypeImageName;
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
image?: string;
|
|
10
|
+
errorCode?: ErrorCodes;
|
|
11
|
+
};
|
|
12
|
+
export type UploaderUIEvents = {
|
|
13
|
+
onFileInput: (event: any) => void;
|
|
14
|
+
onFileDrop: (event: any) => void;
|
|
15
|
+
onUploadClick: (event: any) => void;
|
|
16
|
+
};
|
|
17
|
+
export declare class UploaderUI extends Component<UploaderState> {
|
|
18
|
+
fileInput: HTMLInputElement;
|
|
19
|
+
dropArea: HTMLDivElement;
|
|
20
|
+
events: UploaderUIEvents;
|
|
21
|
+
private backgroundElement;
|
|
22
|
+
constructor(mountElement: any, state: UploaderState);
|
|
23
|
+
changeType(step: Step): void;
|
|
24
|
+
resetInput(): void;
|
|
25
|
+
backToInitialState(): void;
|
|
26
|
+
changeState(state: Partial<UploaderState>): void;
|
|
27
|
+
remount(): void;
|
|
28
|
+
protected addEventListeners(): void;
|
|
29
|
+
protected updateView(): void;
|
|
30
|
+
private addFileInputListener;
|
|
31
|
+
private addFileDropListener;
|
|
32
|
+
private addAreaClickListener;
|
|
33
|
+
private initDragAndDropEvents;
|
|
34
|
+
private getStepTypeBackground;
|
|
35
|
+
private setUploaderBackground;
|
|
36
|
+
private setImage;
|
|
37
|
+
private setDraggedView;
|
|
38
|
+
private setInitialView;
|
|
39
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { BrowserInfo } from 'detect-browser';
|
|
2
|
+
import type { Size } from '../../../helpers/image';
|
|
3
|
+
import type { StepType } from '../../../environment/stepsDescription';
|
|
4
|
+
export declare class CanvasWrapper {
|
|
5
|
+
private componentWrapper;
|
|
6
|
+
videoCanvas: HTMLCanvasElement;
|
|
7
|
+
resizedCanvas: HTMLCanvasElement;
|
|
8
|
+
mrzCanvas: HTMLCanvasElement;
|
|
9
|
+
borderCanvas: HTMLCanvasElement;
|
|
10
|
+
faceCanvas: HTMLCanvasElement;
|
|
11
|
+
generalTypeCanvas: HTMLCanvasElement;
|
|
12
|
+
blazeFaceCanvas: HTMLCanvasElement;
|
|
13
|
+
meshFaceCanvas: HTMLCanvasElement;
|
|
14
|
+
mrzCtx: CanvasRenderingContext2D;
|
|
15
|
+
videoCtx: CanvasRenderingContext2D;
|
|
16
|
+
resizedCtx: CanvasRenderingContext2D;
|
|
17
|
+
borderCtx: CanvasRenderingContext2D;
|
|
18
|
+
faceCtx: CanvasRenderingContext2D;
|
|
19
|
+
blazeFaceCtx: CanvasRenderingContext2D;
|
|
20
|
+
meshFaceCtx: CanvasRenderingContext2D;
|
|
21
|
+
private readonly video;
|
|
22
|
+
private readonly faceOffset;
|
|
23
|
+
private readonly canvasNames;
|
|
24
|
+
private readonly canvasCtxNames;
|
|
25
|
+
constructor(componentWrapper: HTMLElement, video: HTMLVideoElement);
|
|
26
|
+
saveCanvas(): void;
|
|
27
|
+
restoreCanvas(): void;
|
|
28
|
+
toggleBorderCanvas(currentStepType: StepType, isStarted: boolean): void;
|
|
29
|
+
clearBorderCtx(): void;
|
|
30
|
+
setVideoCanvasSizes({ width, height }: Size): void;
|
|
31
|
+
getBaseSizes(coefficient?: number): {
|
|
32
|
+
baseHeight: number;
|
|
33
|
+
baseWidth: number;
|
|
34
|
+
};
|
|
35
|
+
setResizedCanvas(resizedCanvasSizes: Size): void;
|
|
36
|
+
setBorderCanvas(width: number, height: number): void;
|
|
37
|
+
prepareFaceCanvas(width: number, height: number): void;
|
|
38
|
+
drawVideo(): void;
|
|
39
|
+
recreateWorkingCanvas(browser: BrowserInfo, browserMajorVersion: number): void;
|
|
40
|
+
drawResizedVideo(currentStepType: StepType, isRealFaceAvailable: boolean): void;
|
|
41
|
+
private drawResized;
|
|
42
|
+
private drawFace;
|
|
43
|
+
private recreateCanvas;
|
|
44
|
+
private rectreateDistinctCanvas;
|
|
45
|
+
private isEqualSizes;
|
|
46
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
declare class Flashlight {
|
|
2
|
-
private
|
|
3
|
-
private
|
|
4
|
-
private
|
|
1
|
+
export declare class Flashlight {
|
|
2
|
+
private componentWrapper;
|
|
3
|
+
private readonly icon;
|
|
4
|
+
private readonly onIcon;
|
|
5
|
+
private readonly offIcon;
|
|
5
6
|
private isEnableFlashLight;
|
|
6
|
-
constructor();
|
|
7
|
+
constructor(componentWrapper: HTMLElement);
|
|
8
|
+
get isTurnedOn(): boolean;
|
|
7
9
|
/**
|
|
8
10
|
* switches visible of lightning icon
|
|
9
11
|
* @param {boolean} val
|
|
10
12
|
*/
|
|
11
13
|
show(val: boolean): void;
|
|
14
|
+
addClickEventListener(fn?: () => void): void;
|
|
12
15
|
turnOff(): void;
|
|
13
16
|
turnOn(): void;
|
|
14
|
-
get isTurnedOn(): boolean;
|
|
15
|
-
addClickEventListener(fn?: () => void): void;
|
|
16
17
|
}
|
|
17
|
-
export default Flashlight;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { StepType } from '../../../environment/stepsDescription';
|
|
2
|
+
import type { DocumentTypeIndex } from '../../../environment/documentTypes';
|
|
3
|
+
export declare class MaskCapture {
|
|
4
|
+
private componentWrapper;
|
|
5
|
+
private readonly svg;
|
|
6
|
+
private readonly strokeMask;
|
|
7
|
+
private successMask;
|
|
8
|
+
private readonly pdfHint;
|
|
9
|
+
private readonly mrz2Hint;
|
|
10
|
+
private readonly mrz3Hint;
|
|
11
|
+
private type;
|
|
12
|
+
private cssVarContainer;
|
|
13
|
+
private borders;
|
|
14
|
+
private cssVars;
|
|
15
|
+
private sizesMap;
|
|
16
|
+
private hintElements;
|
|
17
|
+
private hintType;
|
|
18
|
+
constructor(componentWrapper: HTMLElement, cssVarContainer: HTMLElement);
|
|
19
|
+
set sizes({ width, height }: {
|
|
20
|
+
width: any;
|
|
21
|
+
height: any;
|
|
22
|
+
});
|
|
23
|
+
set fillPercentage(percentage: number);
|
|
24
|
+
set maskType(type: any);
|
|
25
|
+
private get svgSizes();
|
|
26
|
+
private get strokeLength();
|
|
27
|
+
private set borderSizes(value);
|
|
28
|
+
applyMaskCaptureSizes(mainContainer: HTMLElement, currentStepType: StepType, type: DocumentTypeIndex | 0): void;
|
|
29
|
+
changeHintState(currentStepType: any, currentDocument: any): void;
|
|
30
|
+
/**
|
|
31
|
+
* resizes frame based on width and height of main container
|
|
32
|
+
*/
|
|
33
|
+
private calculateMainContainerSizes;
|
|
34
|
+
private hideAllHints;
|
|
35
|
+
private showHintForCurrentStep;
|
|
36
|
+
/**
|
|
37
|
+
* get computed width and height of element
|
|
38
|
+
* @param {HTMLElement} el
|
|
39
|
+
* @return {{width: string, height: string}}
|
|
40
|
+
*/
|
|
41
|
+
private getSizes;
|
|
42
|
+
private calculateSizes;
|
|
43
|
+
private calculateMaskSizes;
|
|
44
|
+
private applySizes;
|
|
45
|
+
private addAnimation;
|
|
46
|
+
private removeAnimation;
|
|
47
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Component } from '../../Component';
|
|
2
|
+
import type { StepType } from '../../../../environment/stepsDescription';
|
|
3
|
+
type StepPreviewState = {
|
|
4
|
+
stepType: StepType;
|
|
5
|
+
};
|
|
6
|
+
export declare class StepPreview extends Component<StepPreviewState> {
|
|
7
|
+
private backgroundElement;
|
|
8
|
+
constructor(mountElement: any, state: StepPreviewState);
|
|
9
|
+
showPreview(timeToShow: number): Promise<void>;
|
|
10
|
+
backToInitialState(): void;
|
|
11
|
+
protected updateView(): void;
|
|
12
|
+
protected addEventListeners(): void;
|
|
13
|
+
private setStepBackground;
|
|
14
|
+
private getStepTypeBackground;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { RealFaceTurnSide } from '../../../types/enums/realFace';
|
|
2
|
+
import Step from '../../Step';
|
|
3
|
+
import type { StepType } from '../../../environment/stepsDescription';
|
|
4
|
+
export type HoldTextParams = {
|
|
5
|
+
hintFlags: Record<string, boolean>;
|
|
6
|
+
realFaceTurnSide: RealFaceTurnSide;
|
|
7
|
+
steps: Step[];
|
|
8
|
+
currentStep: number;
|
|
9
|
+
currentStepType: StepType;
|
|
10
|
+
};
|
|
11
|
+
export declare class UiHints {
|
|
12
|
+
private componentWrapper;
|
|
13
|
+
private holdText;
|
|
14
|
+
private readonly arrowUpHintContainer;
|
|
15
|
+
private readonly arrowLeftHintContainer;
|
|
16
|
+
private readonly arrowRightHintContainer;
|
|
17
|
+
private arrowLeftFaceTheCameraContainer;
|
|
18
|
+
private arrowRightFaceTheCameraContainer;
|
|
19
|
+
private currentArrowContainer;
|
|
20
|
+
constructor(componentWrapper: HTMLElement);
|
|
21
|
+
updateHoldText({ hintFlags, realFaceTurnSide, steps, currentStep, currentStepType, }: HoldTextParams, data?: number, isCorrectDirection?: boolean): string;
|
|
22
|
+
private showFaceTheCameraArrows;
|
|
23
|
+
private hideFaceTheCameraArrows;
|
|
24
|
+
private showArrow;
|
|
25
|
+
private hideArrows;
|
|
26
|
+
private isType;
|
|
27
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Flashlight } from './Flashlight';
|
|
2
|
+
import { MaskCapture } from './MaskCapture';
|
|
3
|
+
import { CanvasWrapper } from './CanvasWrapper';
|
|
4
|
+
import { UiHints } from './UIHints';
|
|
5
|
+
import Step from '../../Step';
|
|
6
|
+
import { StepPreview } from './StepPreview/StepPreview';
|
|
7
|
+
import { ControlButton } from '../ControlButton/ControlButton';
|
|
8
|
+
export type UpdateVideoWrapParams = {
|
|
9
|
+
currentStepImg: string;
|
|
10
|
+
currentStepObj: Step;
|
|
11
|
+
isVideoCapture: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare class VideoWrapper {
|
|
14
|
+
componentWrapper: HTMLElement;
|
|
15
|
+
flashlight: Flashlight;
|
|
16
|
+
Mask: MaskCapture;
|
|
17
|
+
canvasWrapper: CanvasWrapper;
|
|
18
|
+
hints: UiHints;
|
|
19
|
+
stepPreview: StepPreview;
|
|
20
|
+
captureButton: ControlButton;
|
|
21
|
+
video: HTMLVideoElement;
|
|
22
|
+
videoWrap: HTMLDivElement;
|
|
23
|
+
stepImage: HTMLDivElement;
|
|
24
|
+
private videoPos;
|
|
25
|
+
private videoErrorText;
|
|
26
|
+
private fakeContour;
|
|
27
|
+
private videoError;
|
|
28
|
+
private cameraErrorContainer;
|
|
29
|
+
private cameraErrorHeader;
|
|
30
|
+
private cameraErrorText;
|
|
31
|
+
constructor(componentWrapper: HTMLElement);
|
|
32
|
+
updateVideoWrap({ currentStepImg, currentStepObj, }: UpdateVideoWrapParams): void;
|
|
33
|
+
setMirroring(isMirroring: boolean): void;
|
|
34
|
+
setVideoWrapEnabled(enabled?: boolean): void;
|
|
35
|
+
toggleVideoPos(isStarted: boolean): void;
|
|
36
|
+
setFakeContourStyles(width: number): void;
|
|
37
|
+
hideVideoError(): void;
|
|
38
|
+
showVideoError(errorCode: string): void;
|
|
39
|
+
private init;
|
|
40
|
+
setCameraErrorText(header: string, text: string): void;
|
|
41
|
+
showCameraError(): void;
|
|
42
|
+
hideCameraError(): void;
|
|
43
|
+
private getFakeContourWidth;
|
|
44
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DocumentTypeIndex, DocumentTypeName } from '../../../environment/documentTypes';
|
|
2
|
-
export
|
|
2
|
+
export type DocumentSelectEvent = {
|
|
3
3
|
docType: DocumentTypeName;
|
|
4
4
|
id: 0 | DocumentTypeIndex;
|
|
5
|
-
}
|
|
5
|
+
};
|
|
6
6
|
declare const _default: ({ docType, id }: DocumentSelectEvent) => CustomEvent<DocumentSelectEvent>;
|
|
7
7
|
export default _default;
|
|
@@ -20,5 +20,5 @@ export declare class GeneralTypeDetectionYoloModel extends NeuralModel {
|
|
|
20
20
|
iou(box1: any, box2: any): number;
|
|
21
21
|
union(box1: any, box2: any): number;
|
|
22
22
|
intersection(box1: any, box2: any): number;
|
|
23
|
-
|
|
23
|
+
predict(rgb: RGBColor32): Promise<import("onnxruntime-web").InferenceSession.OnnxValueMapType>;
|
|
24
24
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare const isFullFilled: () => boolean;
|
|
2
2
|
export declare const generateSteps: () => void;
|
|
3
3
|
export declare const updateSteps: () => void;
|
|
4
|
-
export declare const changeStep: (nextStepNumber: number) => void
|
|
4
|
+
export declare const changeStep: (nextStepNumber: number) => Promise<void>;
|
|
5
5
|
export declare const getNextStep: () => number;
|
|
6
|
-
export declare const changeStepAuto: () => void
|
|
6
|
+
export declare const changeStepAuto: () => Promise<void>;
|
|
7
7
|
export declare const updateStepImgCallback: () => void;
|
|
8
8
|
export declare const submitIfFullSteps: (payload?: {}) => Promise<void>;
|
|
9
9
|
export declare const resetStepResults: (stepIndex?: number) => void;
|
|
@@ -17,7 +17,7 @@ export declare const setStepImage: () => Promise<void>;
|
|
|
17
17
|
*/
|
|
18
18
|
export declare const emitCurrentStepChangeImage: (isNeedToChangeStep?: boolean) => Promise<void>;
|
|
19
19
|
declare const _default: {
|
|
20
|
-
changeStepAuto: () => void
|
|
20
|
+
changeStepAuto: () => Promise<void>;
|
|
21
21
|
updateStepImgCallback: () => void;
|
|
22
22
|
generateSteps: () => void;
|
|
23
23
|
submitIfFullSteps: (payload?: {}) => Promise<void>;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { BrowserInfo } from 'detect-browser';
|
|
2
|
+
import { DocumentTypeIndex, DocumentTypeName } from '../environment/documentTypes';
|
|
3
|
+
import { InitClient } from '../modules/supaBaseClient';
|
|
4
|
+
import MetaData from '../modules/MetaData';
|
|
5
|
+
import { WebLibManualUploader } from '../modules/App/WebLibManualUploader';
|
|
6
|
+
import LoggerController from '../controllers/LoggerController';
|
|
7
|
+
import Step from '../modules/Step';
|
|
8
|
+
import { StepType } from '../environment/stepsDescription';
|
|
9
|
+
import { Base64Image, Offset, Size } from '../helpers/image';
|
|
10
|
+
import { RealFaceTurnSide } from './enums/realFace';
|
|
11
|
+
import { StepConfig, StepMode } from '../defaultConfig';
|
|
12
|
+
import { IMRZResults } from './mrz';
|
|
13
|
+
type LoopFunction = () => Promise<false>;
|
|
14
|
+
export type Context = {
|
|
15
|
+
isIIphone: boolean;
|
|
16
|
+
minPDFframes: number;
|
|
17
|
+
sizeK: number;
|
|
18
|
+
VERSION: string;
|
|
19
|
+
topImage: ImageData | null;
|
|
20
|
+
running: boolean;
|
|
21
|
+
allowedTypesIds: (DocumentTypeIndex | 0)[];
|
|
22
|
+
type: DocumentTypeIndex | 0;
|
|
23
|
+
capturingMode: 'processImage5' | 'processImage4';
|
|
24
|
+
isBrowserSupport: boolean;
|
|
25
|
+
resizedData: ImageData | null;
|
|
26
|
+
origData: ImageData | null;
|
|
27
|
+
cameraSupported: boolean;
|
|
28
|
+
isMirroring: boolean;
|
|
29
|
+
config: Record<string, any>;
|
|
30
|
+
networkUrl: string;
|
|
31
|
+
chunkPublicPath: string;
|
|
32
|
+
showForceCapturingBtn: boolean;
|
|
33
|
+
imageFormat: 'webp' | 'jpeg';
|
|
34
|
+
supabase: ReturnType<typeof InitClient> | null;
|
|
35
|
+
cameraInfo: Record<string, any>;
|
|
36
|
+
idvcLinkParam: string;
|
|
37
|
+
mobileInfo: Record<string, any>;
|
|
38
|
+
metaData: MetaData | null;
|
|
39
|
+
uploader: WebLibManualUploader | null;
|
|
40
|
+
loggerController: LoggerController | null;
|
|
41
|
+
browser?: BrowserInfo;
|
|
42
|
+
browserMajorVersion?: number;
|
|
43
|
+
steps: Step[];
|
|
44
|
+
currentStepType: StepType;
|
|
45
|
+
currentStepCamera: VideoFacingModeEnum;
|
|
46
|
+
currentStepImg: Base64Image | null;
|
|
47
|
+
currentStepBlob: Blob | null;
|
|
48
|
+
curStep: number;
|
|
49
|
+
currentStep: number;
|
|
50
|
+
currentStepObj: Step;
|
|
51
|
+
isStarted: boolean;
|
|
52
|
+
loopFrame: boolean;
|
|
53
|
+
loopStarted: boolean;
|
|
54
|
+
isRealFaceAvailable: boolean;
|
|
55
|
+
realFaceTurnSide: RealFaceTurnSide;
|
|
56
|
+
invertFace: boolean;
|
|
57
|
+
isDetectFace: boolean;
|
|
58
|
+
isVerification: boolean;
|
|
59
|
+
isMobile: boolean;
|
|
60
|
+
processFace3d: {
|
|
61
|
+
started: boolean;
|
|
62
|
+
ended: boolean;
|
|
63
|
+
start(): void;
|
|
64
|
+
end(): void;
|
|
65
|
+
};
|
|
66
|
+
baseWidth: number;
|
|
67
|
+
baseHeight: number;
|
|
68
|
+
videoLoading: boolean;
|
|
69
|
+
isVideoCapture: boolean;
|
|
70
|
+
track: MediaStreamTrack | null;
|
|
71
|
+
stream: MediaStream | null;
|
|
72
|
+
hintFlags: Record<string, boolean>;
|
|
73
|
+
keys: {
|
|
74
|
+
imageProcessingKey: string;
|
|
75
|
+
pdf417key: string;
|
|
76
|
+
commonLicenseKey: string;
|
|
77
|
+
};
|
|
78
|
+
licenseKeyError: string | null | undefined;
|
|
79
|
+
resizedCanvasSizes: Size;
|
|
80
|
+
videoCanvasSizes: Size;
|
|
81
|
+
resizedToBorderScale: Size;
|
|
82
|
+
cropSizes: Size;
|
|
83
|
+
cropSize: Size;
|
|
84
|
+
cropResizedSizes: Size;
|
|
85
|
+
cropResizedSize: Size;
|
|
86
|
+
cropFaceSize: Size;
|
|
87
|
+
cropFace: Size;
|
|
88
|
+
/**
|
|
89
|
+
* разрешение камеры
|
|
90
|
+
*/
|
|
91
|
+
baseSizes: Size;
|
|
92
|
+
resizedToBorder: Size;
|
|
93
|
+
offsetsFace: Offset;
|
|
94
|
+
offsetsResized: Offset;
|
|
95
|
+
offsets: Offset;
|
|
96
|
+
loop: null | LoopFunction;
|
|
97
|
+
get currentStepMode(): StepMode;
|
|
98
|
+
get currentDocumentType(): DocumentTypeName | '';
|
|
99
|
+
get currentStepDelay(): number;
|
|
100
|
+
get hasFrontStep(): boolean;
|
|
101
|
+
calculateIsMirroring(): void;
|
|
102
|
+
dropKeys(): void;
|
|
103
|
+
resetStats(): void;
|
|
104
|
+
dropSizes(): void;
|
|
105
|
+
resetHints(): void;
|
|
106
|
+
dropMediaDevices(): void;
|
|
107
|
+
dropState(): void;
|
|
108
|
+
clearStepData(): void;
|
|
109
|
+
fillSteps(): void;
|
|
110
|
+
setMRZParsedResults(res: IMRZResults): void;
|
|
111
|
+
initImageFormat(): void;
|
|
112
|
+
initVerificationState(): void;
|
|
113
|
+
initLogging(): void;
|
|
114
|
+
init(): void;
|
|
115
|
+
dropCounters(): void;
|
|
116
|
+
updateRealFaceTurnSide(): void;
|
|
117
|
+
isStepSucceed(step: number): boolean;
|
|
118
|
+
isStepFulfilled(step: number): boolean;
|
|
119
|
+
getStepConfigValue<K extends keyof StepConfig>(key: K): StepConfig[K];
|
|
120
|
+
};
|
|
121
|
+
export {};
|
package/dist/types/util.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Base64Image } from './helpers/image';
|
|
2
2
|
import { IStepCallback } from './modules/Step';
|
|
3
3
|
import { DocumentTypeIndex } from './environment/documentTypes';
|
|
4
|
-
import { Context } from './context';
|
|
4
|
+
import { Context } from './types/context';
|
|
5
5
|
export interface IDataForSubmit {
|
|
6
6
|
metaData?: string;
|
|
7
7
|
payload?: Record<string, any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idscan/idvc2",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"description": "component for the capturing documents",
|
|
5
5
|
"main": "dist/idvc.js",
|
|
6
6
|
"types": "dist/types/idvc.d.ts",
|
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@swc/core": "1.3.59",
|
|
31
|
+
"@types/animejs": "^3.1.12",
|
|
32
|
+
"@types/dot": "^1.1.5",
|
|
31
33
|
"@types/pako": "^2.0.3",
|
|
32
34
|
"@typescript-eslint/eslint-plugin": "5.59.6",
|
|
33
35
|
"@typescript-eslint/parser": "5.59.6",
|
|
@@ -63,11 +65,13 @@
|
|
|
63
65
|
},
|
|
64
66
|
"dependencies": {
|
|
65
67
|
"@supabase/supabase-js": "^2.32.0",
|
|
68
|
+
"animejs": "^3.2.2",
|
|
66
69
|
"assert": "2.0.0",
|
|
67
70
|
"buffer": "6.0.3",
|
|
68
71
|
"core-js": "3.30.2",
|
|
69
72
|
"crypto-browserify": "3.12.0",
|
|
70
73
|
"detect-browser": "5.3.0",
|
|
74
|
+
"dot": "^1.1.3",
|
|
71
75
|
"mobile-detect": "1.4.5",
|
|
72
76
|
"onnxruntime-web": "1.17.0",
|
|
73
77
|
"pako": "^2.1.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_idscan_idvc2=self.webpackChunk_idscan_idvc2||[]).push([[423],{2093:(e,t,n)=>{n.r(t),n.d(t,{default:()=>O});var r=n(4328),o=n(4554),i=n(7286),a=n(8417),c=n(6955),u=n(813),l=n(528),s=n(683),f=["Back","BackWithoutBarcode","Front","None"];new Set(["Back","BackWithoutBarcode"]);function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function y(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?h(e):t;var n}function w(e,t){return w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},w(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function m(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}var S=[1,320,320,3],k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&w(e,t)}(i,e);var t,n,r,o=g(i);function i(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.z.WASM,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),v(h(e=o.call(this,t,n,r)),"canvasSize",{width:1,height:1}),e}return t=i,n=[{key:"setSizes",value:function(e){var t=e.height,n=e.width;this.canvasSize.width=n,this.canvasSize.height=t}},{key:"predictFromImage",value:function(e,t,n,r){var o,i=this;return(o=function(){var o,a,c,u,f;return m(this,(function(h){switch(h.label){case 0:return i.loading?[2,[]]:(o=i.createSrc(e,"angles-input-canvas"),a=t||(0,l.vL)("angles-canvas",{width:320,height:320}),c=(0,l.SI)(o,a,n,r),u=(0,s.Di)(c,s.eQ.WITHOUT),console.time("classLocal"),[4,i.predict(u)]);case 1:return f=h.sent(),console.timeEnd("classLocal"),i.setSizes(o),[2,i.interpret(f["StatefulPartitionedCall:1"].data,f["StatefulPartitionedCall:0"].data)]}}))},function(){var e=this,t=arguments;return new Promise((function(n,r){var i=o.apply(e,t);function a(e){p(i,n,r,a,c,"next",e)}function c(e){p(i,n,r,a,c,"throw",e)}a(void 0)}))})()}},{key:"interpret",value:function(e,t){var n={side:"None",bbox:{topLeft:{x:0,y:0},bottomRight:{x:1,y:1}},perimeterInPercents:{width:0,height:0}},r=[];return e.forEach((function(e,t){return r.push({label:f[t],score:e})})),n.side=r.sort((function(e,t){return t.score-e.score}))[0].label,n.bbox.topLeft.x=~~(t[0]*this.canvasSize.width),n.bbox.topLeft.y=~~(t[1]*this.canvasSize.height),n.bbox.bottomRight.x=~~(t[2]*this.canvasSize.width),n.bbox.bottomRight.y=~~(t[3]*this.canvasSize.height),n.perimeterInPercents.width=~~(100*(t[2]-t[0])),n.perimeterInPercents.height=~~(100*(t[3]-t[1])),n}},{key:"predict",value:function(e){var t=v({},"serving_default_input_2:0",new a.es("float32",e,S));return this.session.run(t)}}],n&&b(t.prototype,n),r&&b(t,r),i}(c.Z);function x(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}function P(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){x(i,r,o,a,c,"next",e)}function c(e){x(i,r,o,a,c,"throw",e)}a(void 0)}))}}function _(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}const O=P((function(){var e;return _(this,(function(t){return e=new k("".concat(o.t.cK),u.z.WASM,r.Z.networkUrl),i.Z.setModule("model","classLocal",e),[2,[e.initialize.bind(e)]]}))}))}}]);
|
|
Binary file
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare class HeicModule {
|
|
2
|
-
private core;
|
|
3
|
-
constructor(core?: any);
|
|
4
|
-
processSingleImage(image: any): Promise<unknown>;
|
|
5
|
-
private heifDecode;
|
|
6
|
-
convert(e: any): Promise<{
|
|
7
|
-
imageDataArr: any[];
|
|
8
|
-
error: string;
|
|
9
|
-
}>;
|
|
10
|
-
}
|
|
11
|
-
export default HeicModule;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import type { StepType } from '../../environment/stepsDescription';
|
|
2
|
-
import { DocumentTypeIndex } from '../../environment/documentTypes';
|
|
3
|
-
declare class MaskCapture {
|
|
4
|
-
private readonly svg;
|
|
5
|
-
private readonly strokeMask;
|
|
6
|
-
private successMask;
|
|
7
|
-
private readonly pdfHint;
|
|
8
|
-
private readonly mrz2Hint;
|
|
9
|
-
private readonly mrz3Hint;
|
|
10
|
-
private type;
|
|
11
|
-
private cssVarContainer;
|
|
12
|
-
private borders;
|
|
13
|
-
private cssVars;
|
|
14
|
-
private hintElements;
|
|
15
|
-
constructor(cssVarContainer: any);
|
|
16
|
-
_mainContainerSizes: {
|
|
17
|
-
width: string;
|
|
18
|
-
height: string;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* resizes frame based on width and height of main container
|
|
22
|
-
* @param {{width: number, height: number}} param - width and height of main container
|
|
23
|
-
*/
|
|
24
|
-
set mainContainerSizes({ width, height }: {
|
|
25
|
-
width: any;
|
|
26
|
-
height: any;
|
|
27
|
-
});
|
|
28
|
-
get svgSizes(): {
|
|
29
|
-
width: string;
|
|
30
|
-
height: string;
|
|
31
|
-
};
|
|
32
|
-
get strokeSizes(): {
|
|
33
|
-
width: number;
|
|
34
|
-
height: number;
|
|
35
|
-
};
|
|
36
|
-
get strokeLength(): number;
|
|
37
|
-
set sizes({ width, height }: {
|
|
38
|
-
width: any;
|
|
39
|
-
height: any;
|
|
40
|
-
});
|
|
41
|
-
set fillPercentage(percentage: any);
|
|
42
|
-
/**
|
|
43
|
-
* sets the type of capturing mask and it position on screen
|
|
44
|
-
* @param {VideoFacingModeEnum} type - 'environment', 'user'
|
|
45
|
-
*/
|
|
46
|
-
set maskType(type: any);
|
|
47
|
-
private set borderSizes(value);
|
|
48
|
-
/**
|
|
49
|
-
* get computed width and height of element
|
|
50
|
-
* @param {HTMLElement} el
|
|
51
|
-
* @return {{width: string, height: string}}
|
|
52
|
-
*/
|
|
53
|
-
getSizes: (el: any) => {
|
|
54
|
-
width: string;
|
|
55
|
-
height: string;
|
|
56
|
-
};
|
|
57
|
-
applyMaskCaptureSizes(mainContainer: Element, currentStepType: StepType, currentDocument: DocumentTypeIndex | 0): void;
|
|
58
|
-
applyCaptureHintMask(mainContainer: Element): void;
|
|
59
|
-
applyMainContainerSize(mainContainer: Element): void;
|
|
60
|
-
changeHintState(currentStepType: any, currentDocument: any): void;
|
|
61
|
-
hideAllHints(): void;
|
|
62
|
-
showHintForCurrentStep(currentStepType: any, currentDocument: any): void;
|
|
63
|
-
private calculateUserSizes;
|
|
64
|
-
private calculateEnvironmentSizes;
|
|
65
|
-
private calculateFieldMaskSizes;
|
|
66
|
-
private applySizes;
|
|
67
|
-
private addAnimation;
|
|
68
|
-
private removeAnimation;
|
|
69
|
-
/**
|
|
70
|
-
*
|
|
71
|
-
* @param {Number} size1
|
|
72
|
-
* @param {Number} size2
|
|
73
|
-
*/
|
|
74
|
-
private calculateSize;
|
|
75
|
-
}
|
|
76
|
-
export default MaskCapture;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
type MessageBoxType = 'error' | 'primary' | 'pointer' | 'disabled' | null;
|
|
2
|
-
type CallbackHandler = (event: Event) => void;
|
|
3
|
-
declare class MessageBox {
|
|
4
|
-
#private;
|
|
5
|
-
constructor();
|
|
6
|
-
get type(): MessageBoxType;
|
|
7
|
-
/**
|
|
8
|
-
* sets the message in message-box
|
|
9
|
-
* @param {string} text - text to set in message-box
|
|
10
|
-
* @param {'error', 'primary'} type - type of message. Default: primary
|
|
11
|
-
*/
|
|
12
|
-
message(text?: string, type?: string): void;
|
|
13
|
-
updateByTypesCount(typesCount?: number): void;
|
|
14
|
-
addChangeDocumentTypeListener(handler: CallbackHandler): void;
|
|
15
|
-
removeAllChangeDocumentTypeListener(): void;
|
|
16
|
-
setEnabled(status: boolean): void;
|
|
17
|
-
setCaretVisible(val: boolean): void;
|
|
18
|
-
changeMessageBoxVisible(visibility: boolean): void;
|
|
19
|
-
private setClass;
|
|
20
|
-
}
|
|
21
|
-
export default MessageBox;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { IOffset, ISize } from '../../helpers/image';
|
|
2
|
-
import { Bbox } from '../../types/geometry';
|
|
3
|
-
export default class CanvasUi {
|
|
4
|
-
canvasNames: Set<string>;
|
|
5
|
-
canvasCtxNames: Set<string>;
|
|
6
|
-
videoCanvas: HTMLCanvasElement;
|
|
7
|
-
resizedCanvas: HTMLCanvasElement;
|
|
8
|
-
mrzCanvas: HTMLCanvasElement;
|
|
9
|
-
borderCanvas: HTMLCanvasElement;
|
|
10
|
-
faceCanvas: HTMLCanvasElement;
|
|
11
|
-
classLocalCanvas: HTMLCanvasElement;
|
|
12
|
-
generalTypeCanvas: HTMLCanvasElement;
|
|
13
|
-
blazeFaceCanvas: HTMLCanvasElement;
|
|
14
|
-
meshFaceCanvas: HTMLCanvasElement;
|
|
15
|
-
mrzCtx: CanvasRenderingContext2D;
|
|
16
|
-
videoCtx: CanvasRenderingContext2D;
|
|
17
|
-
resizedCtx: CanvasRenderingContext2D;
|
|
18
|
-
borderCtx: CanvasRenderingContext2D;
|
|
19
|
-
faceCtx: CanvasRenderingContext2D;
|
|
20
|
-
classLocalCtx: CanvasRenderingContext2D;
|
|
21
|
-
blazeFaceCtx: CanvasRenderingContext2D;
|
|
22
|
-
meshFaceCtx: CanvasRenderingContext2D;
|
|
23
|
-
video: HTMLVideoElement;
|
|
24
|
-
faceOffset: IOffset;
|
|
25
|
-
constructor(video: HTMLVideoElement);
|
|
26
|
-
saveCanvas(): void;
|
|
27
|
-
restoreCanvas(): void;
|
|
28
|
-
toggleBorderCanvas(): void;
|
|
29
|
-
clearBorderCtx(): void;
|
|
30
|
-
setVideoCanvasSizes({ width, height }: ISize): void;
|
|
31
|
-
getBaseSizes(coefficient?: number): {
|
|
32
|
-
baseHeight: number;
|
|
33
|
-
baseWidth: number;
|
|
34
|
-
};
|
|
35
|
-
setResizedCanvas(): void;
|
|
36
|
-
setBorderCanvas(width: number, height: number): void;
|
|
37
|
-
recreateCanvas(canvas: HTMLCanvasElement): {
|
|
38
|
-
canvas: HTMLCanvasElement;
|
|
39
|
-
ctx: CanvasRenderingContext2D;
|
|
40
|
-
};
|
|
41
|
-
rectreateDistinctCanvas(canvasName: string): void;
|
|
42
|
-
prepareFaceCanvas(width: number, height: number): void;
|
|
43
|
-
drawVideo(): void;
|
|
44
|
-
drawResized(): void;
|
|
45
|
-
drawFace(): void;
|
|
46
|
-
recreateWorkingCanvas(): void;
|
|
47
|
-
drawResizedVideo(): void;
|
|
48
|
-
drawBbox(bbox: Bbox): void;
|
|
49
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
type EventCallback = (e?: Event) => void;
|
|
2
|
-
declare class ForceCapturingButton {
|
|
3
|
-
private isShowing;
|
|
4
|
-
private el;
|
|
5
|
-
private callback;
|
|
6
|
-
constructor();
|
|
7
|
-
get state(): boolean;
|
|
8
|
-
set state(val: boolean);
|
|
9
|
-
addClickCallback(cbl: EventCallback): void;
|
|
10
|
-
setAvailable(status: boolean): void;
|
|
11
|
-
}
|
|
12
|
-
export default ForceCapturingButton;
|