@idscan/idvc2 2.5.7 → 2.5.8
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 +4 -0
- package/dist/css/idvc.css +1 -0
- package/dist/idvc.js +1684 -0
- package/dist/index.html +114 -0
- package/dist/js/defaultConfig.ts +303 -0
- package/dist/js/environment/capturingModes.json +4 -0
- package/dist/js/environment/cssVariables.json +191 -0
- package/dist/js/environment/designations.ts +23 -0
- package/dist/js/environment/documentTypes.ts +151 -0
- package/dist/js/environment/langs.js +1 -0
- package/dist/js/environment/loadModes.json +11 -0
- package/dist/js/environment/loopResult.ts +14 -0
- package/dist/js/environment/modalPosition.ts +27 -0
- package/dist/js/environment/networkNames.json +9 -0
- package/dist/js/environment/realFaceModes.ts +24 -0
- package/dist/js/environment/stepsDescription.ts +64 -0
- package/dist/js/environment/triangulation.ts +188 -0
- package/dist/networks/156-2c44-chunk.js +1 -0
- package/dist/networks/190-00d9-chunk.js +1 -0
- package/dist/networks/77-705c-chunk.js +1 -0
- package/dist/networks/Face-5c85-chunk.js +1 -0
- package/dist/networks/MRZ-70ee-chunk.js +1 -0
- package/dist/networks/PDF-4ee2-chunk.js +1 -0
- package/dist/networks/ZXing-f54a-chunk.js +1 -0
- package/dist/networks/angle03032023.onnx +0 -0
- package/dist/networks/classLocal03032023.onnx +0 -0
- package/dist/networks/faceDetection03032023.onnx +0 -0
- package/dist/networks/faceLandmark03032023.onnx +0 -0
- package/dist/networks/mrz03032023.onnx +0 -0
- package/dist/networks/ort-wasm-simd-threaded.wasm +0 -0
- package/dist/networks/ort-wasm-simd.wasm +0 -0
- package/dist/networks/ort-wasm-threaded.wasm +0 -0
- package/dist/networks/ort-wasm.wasm +0 -0
- package/package.json +45 -45
- package/dist/types/assets/images/barcode.d.ts +0 -2
- package/dist/types/assets/images/face.d.ts +0 -2
- package/dist/types/assets/images/front.d.ts +0 -2
- package/dist/types/assets/images/mrz.d.ts +0 -2
- package/dist/types/assets/images/pdf.d.ts +0 -2
- package/dist/types/bl.d.ts +0 -15
- package/dist/types/constatnts/camera.d.ts +0 -11
- package/dist/types/constatnts/imageProcessing.d.ts +0 -3
- package/dist/types/constatnts/pdf.d.ts +0 -1
- package/dist/types/context.d.ts +0 -118
- package/dist/types/defaultConfig.d.ts +0 -57
- package/dist/types/environment/designations.d.ts +0 -5
- package/dist/types/environment/documentTypes.d.ts +0 -26
- package/dist/types/environment/langs.d.ts +0 -89
- package/dist/types/environment/loopResult.d.ts +0 -8
- package/dist/types/environment/modalPosition.d.ts +0 -19
- package/dist/types/environment/realFaceModes.d.ts +0 -22
- package/dist/types/environment/stepsDescription.d.ts +0 -54
- package/dist/types/environment/triangulation.d.ts +0 -18
- package/dist/types/eventListeners/eventListeners.d.ts +0 -15
- package/dist/types/eventListeners/selectDocumentType/selectHandler.d.ts +0 -5
- package/dist/types/helpers/apiSupport.d.ts +0 -1
- package/dist/types/helpers/canvas.d.ts +0 -34
- package/dist/types/helpers/color.d.ts +0 -14
- package/dist/types/helpers/dataManipulation.d.ts +0 -27
- package/dist/types/helpers/detectLanguage.d.ts +0 -3
- package/dist/types/helpers/geometry.d.ts +0 -35
- package/dist/types/helpers/html.d.ts +0 -26
- package/dist/types/helpers/image.d.ts +0 -36
- package/dist/types/helpers/imageprocessing.d.ts +0 -11
- package/dist/types/helpers/licenceKeyError.d.ts +0 -6
- package/dist/types/helpers/manualUpload.d.ts +0 -7
- package/dist/types/helpers/math.d.ts +0 -35
- package/dist/types/helpers/mobileChecker.d.ts +0 -15
- package/dist/types/helpers/numbers.d.ts +0 -2
- package/dist/types/helpers/step-background.d.ts +0 -2
- package/dist/types/helpers/strings.d.ts +0 -9
- package/dist/types/helpers/time.d.ts +0 -11
- package/dist/types/helpers/ts/common.d.ts +0 -17
- package/dist/types/helpers/updateSelecetTypes.d.ts +0 -3
- package/dist/types/helpers/validators.d.ts +0 -44
- package/dist/types/idvc.d.ts +0 -19
- package/dist/types/initialize.d.ts +0 -12
- package/dist/types/loader/asyncLoader.d.ts +0 -1
- package/dist/types/loader/loadAnglesModel.d.ts +0 -2
- package/dist/types/loader/loadFrontModels.d.ts +0 -2
- package/dist/types/loader/loaderClassLocal.d.ts +0 -2
- package/dist/types/loader/loaderFace.d.ts +0 -2
- package/dist/types/loader/loaderMRZ.d.ts +0 -4
- package/dist/types/loader/loaderMeshFace.d.ts +0 -3
- package/dist/types/loader/loaderPDF.d.ts +0 -3
- package/dist/types/loader/loaderUploadMode.d.ts +0 -1
- package/dist/types/loader/loaderZXing.d.ts +0 -2
- package/dist/types/loop.d.ts +0 -13
- package/dist/types/loopControl.d.ts +0 -10
- package/dist/types/modules/BarcodeModule.d.ts +0 -28
- package/dist/types/modules/Config.d.ts +0 -131
- package/dist/types/modules/FrontProcessing.d.ts +0 -11
- package/dist/types/modules/MetaData.d.ts +0 -10
- package/dist/types/modules/MrzModule.d.ts +0 -73
- package/dist/types/modules/PdfModule.d.ts +0 -79
- package/dist/types/modules/Step.d.ts +0 -69
- package/dist/types/modules/blur.d.ts +0 -4
- package/dist/types/modules/browwserCompatibilities.d.ts +0 -7
- package/dist/types/modules/camera/camera.d.ts +0 -14
- package/dist/types/modules/camera/cameraManager.d.ts +0 -9
- package/dist/types/modules/face/Face.d.ts +0 -63
- package/dist/types/modules/face/MeshFace.d.ts +0 -48
- package/dist/types/modules/face/SimpleFace.d.ts +0 -23
- package/dist/types/modules/feature-detect/simd.d.ts +0 -2
- package/dist/types/modules/frameQuality.d.ts +0 -10
- package/dist/types/modules/heic.d.ts +0 -11
- package/dist/types/modules/image.d.ts +0 -13
- package/dist/types/modules/initErrorHandler.d.ts +0 -10
- package/dist/types/modules/licenseKeyChecker.d.ts +0 -1
- package/dist/types/modules/manualUpload.d.ts +0 -7
- package/dist/types/modules/manualUploadProcessing.d.ts +0 -30
- package/dist/types/modules/mediaDevices.d.ts +0 -2
- package/dist/types/modules/moduleInitializer.d.ts +0 -8
- package/dist/types/modules/step-functions/face.d.ts +0 -2
- package/dist/types/modules/step-functions/pdf.d.ts +0 -13
- package/dist/types/modules/step-result-processing/barcode.d.ts +0 -2
- package/dist/types/modules/step-result-processing/common.d.ts +0 -1
- package/dist/types/modules/step-result-processing/mrz.d.ts +0 -2
- package/dist/types/modules/step-result-processing/pdf.d.ts +0 -2
- package/dist/types/modules/step-result-processing/simpleFace.d.ts +0 -2
- package/dist/types/modules/step-result-processing/volumeFace.d.ts +0 -7
- package/dist/types/modules/stepFunctions.d.ts +0 -5
- package/dist/types/modules/stepResultProcessing.d.ts +0 -9
- package/dist/types/modules/ui/Flashlight.d.ts +0 -17
- package/dist/types/modules/ui/MaskCapture.d.ts +0 -52
- package/dist/types/modules/ui/MessageBox.d.ts +0 -19
- package/dist/types/modules/ui/Modal.d.ts +0 -20
- package/dist/types/modules/ui/SelectDocumentType.d.ts +0 -37
- package/dist/types/modules/ui/canvas.d.ts +0 -48
- 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/selectDocumentType/documentSelectedEvent.d.ts +0 -7
- package/dist/types/modules/ui/spinner.d.ts +0 -13
- package/dist/types/modules/ui/swiper.d.ts +0 -3
- package/dist/types/modules/uploader.d.ts +0 -58
- package/dist/types/modules/validation/ValidateBool.d.ts +0 -5
- package/dist/types/modules/validation/ValidateDocumentTypes.d.ts +0 -20
- package/dist/types/modules/validation/ValidateElement.d.ts +0 -5
- package/dist/types/modules/validation/ValidateFunction.d.ts +0 -5
- package/dist/types/modules/validation/ValidateNumber.d.ts +0 -5
- package/dist/types/modules/validation/ValidateString.d.ts +0 -5
- package/dist/types/modules/validation/ValidateStringInArray.d.ts +0 -12
- package/dist/types/modules/validation/showValidationError.d.ts +0 -2
- package/dist/types/modules/validation/validatorFactory.d.ts +0 -10
- package/dist/types/modules/validator.d.ts +0 -12
- package/dist/types/neural models/Provider.d.ts +0 -4
- package/dist/types/neural models/anglesModel.d.ts +0 -15
- package/dist/types/neural models/blazeFaceModel.d.ts +0 -27
- package/dist/types/neural models/classLocal/exits.d.ts +0 -3
- package/dist/types/neural models/classLocalModel.d.ts +0 -29
- package/dist/types/neural models/meshFaceModel.d.ts +0 -17
- package/dist/types/neural models/mrzModel.d.ts +0 -20
- package/dist/types/neural models/neuralModel.d.ts +0 -18
- package/dist/types/neural models/preload.d.ts +0 -7
- package/dist/types/stepProcessing.d.ts +0 -27
- package/dist/types/types/enums/realFace.d.ts +0 -4
- package/dist/types/types/modules/camera.enum.d.ts +0 -18
- package/dist/types/ui.d.ts +0 -89
- package/dist/types/util.d.ts +0 -34
- package/dist/types/workers/blurWorker.d.ts +0 -1
- package/dist/types/workers/bubbleWorker.d.ts +0 -1
- package/dist/types/workers/loadNetworksWorker.d.ts +0 -0
- package/dist/types/workers/mrzWorker.d.ts +0 -1
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { InferenceSession } from 'onnxruntime-web';
|
|
2
|
-
import { Provider } from './Provider';
|
|
3
|
-
import { RGBColor32 } from '../helpers/image';
|
|
4
|
-
declare abstract class NeuralModel {
|
|
5
|
-
private readonly model;
|
|
6
|
-
private readonly provider;
|
|
7
|
-
protected loading: boolean;
|
|
8
|
-
protected session: InferenceSession;
|
|
9
|
-
protected uri: string;
|
|
10
|
-
constructor(model?: string, provider?: Provider, url?: string);
|
|
11
|
-
prepareUri(url: string): void;
|
|
12
|
-
initWasmPath(): void;
|
|
13
|
-
initWasm(): Promise<void>;
|
|
14
|
-
init(): Promise<void>;
|
|
15
|
-
abstract predict(rgb: RGBColor32): any;
|
|
16
|
-
abstract predictFromImage(input: HTMLCanvasElement | HTMLImageElement, dstCanvas?: HTMLCanvasElement): unknown;
|
|
17
|
-
}
|
|
18
|
-
export default NeuralModel;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import NeuralModel from './neuralModel';
|
|
2
|
-
import { RGBColor32 } from '../helpers/image';
|
|
3
|
-
export default class Preload extends NeuralModel {
|
|
4
|
-
constructor(wasmPaths: any);
|
|
5
|
-
predict(rgb: RGBColor32): void;
|
|
6
|
-
predictFromImage(input: HTMLCanvasElement | HTMLImageElement, dstCanvas?: HTMLCanvasElement): unknown;
|
|
7
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export declare const generateSteps: () => void;
|
|
2
|
-
export declare const updateSteps: () => void;
|
|
3
|
-
export declare const changeStep: (nextStepNumber: number) => void;
|
|
4
|
-
export declare const getNextStep: () => number;
|
|
5
|
-
export declare const changeStepAuto: () => void;
|
|
6
|
-
export declare const updateStepImgCallback: () => void;
|
|
7
|
-
export declare const submitIfFullSteps: (payload?: {}) => void;
|
|
8
|
-
export declare const resetStepResults: (stepIndex?: number) => void;
|
|
9
|
-
export declare const again: () => void;
|
|
10
|
-
export declare const setStepImage: () => Promise<void>;
|
|
11
|
-
/**
|
|
12
|
-
* emits change function,
|
|
13
|
-
* emit change step function and
|
|
14
|
-
* emit submit function if all steps filled with image
|
|
15
|
-
* @param {Boolean} isNeedToChangeStep - is need to change step
|
|
16
|
-
*/
|
|
17
|
-
export declare const emitCurrentStepChangeImage: (isNeedToChangeStep?: boolean) => void;
|
|
18
|
-
declare const _default: {
|
|
19
|
-
changeStepAuto: () => void;
|
|
20
|
-
updateStepImgCallback: () => void;
|
|
21
|
-
generateSteps: () => void;
|
|
22
|
-
submitIfFullSteps: (payload?: {}) => void;
|
|
23
|
-
again: () => void;
|
|
24
|
-
resetStepResults: (stepIndex?: number) => void;
|
|
25
|
-
updateSteps: () => void;
|
|
26
|
-
};
|
|
27
|
-
export default _default;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare enum CameraType {
|
|
2
|
-
Back = "environment",
|
|
3
|
-
Front = "user"
|
|
4
|
-
}
|
|
5
|
-
export declare enum CameraNotSupportedReason {
|
|
6
|
-
/** navigator.mediaDevices.getUserMedia
|
|
7
|
-
* is not supported by current browser for current context.
|
|
8
|
-
* */
|
|
9
|
-
MediaDevicesNotSupported = "MediaDevicesNotSupported",
|
|
10
|
-
/** Camera with requested features is not available on current device. */
|
|
11
|
-
CameraNotFound = "CameraNotFound",
|
|
12
|
-
/** Camera access was not granted by the user. */
|
|
13
|
-
CameraNotAllowed = "CameraNotAllowed",
|
|
14
|
-
/** Unable to start playing because camera is already in use. */
|
|
15
|
-
CameraInUse = "CameraInUse",
|
|
16
|
-
/** Camera is currently not available due to a OS or hardware error. */
|
|
17
|
-
CameraNotAvailable = "CameraNotAvailable"
|
|
18
|
-
}
|
package/dist/types/ui.d.ts
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import ForceBtn from './modules/ui/forceCaptruringBtn';
|
|
2
|
-
import { ISize } from './helpers/image';
|
|
3
|
-
import SelectDocumentType from './modules/ui/SelectDocumentType';
|
|
4
|
-
import MessageBox from './modules/ui/MessageBox';
|
|
5
|
-
import MaskCapture from './modules/ui/MaskCapture';
|
|
6
|
-
import Flashlight from './modules/ui/Flashlight';
|
|
7
|
-
import { IManualSwitchBtn } from './modules/ui/manualSwitchBtn';
|
|
8
|
-
import CanvasUi from './modules/ui/canvas';
|
|
9
|
-
export declare const getCoefficient: () => number;
|
|
10
|
-
declare class Ui {
|
|
11
|
-
dialogTypeBackground: HTMLDivElement;
|
|
12
|
-
stepImg: HTMLDivElement;
|
|
13
|
-
videoError: HTMLDivElement;
|
|
14
|
-
btnsWrap: HTMLDivElement;
|
|
15
|
-
uploaderWrap: HTMLDivElement;
|
|
16
|
-
videoPos: HTMLDivElement;
|
|
17
|
-
fakeContour: HTMLDivElement;
|
|
18
|
-
stepsWrapper: HTMLDivElement;
|
|
19
|
-
guidlinesBtn: HTMLDivElement;
|
|
20
|
-
videoWrap: HTMLDivElement;
|
|
21
|
-
resetAllStepsBtn: HTMLDivElement;
|
|
22
|
-
version: HTMLDivElement;
|
|
23
|
-
selectDocumentTypeText: HTMLDivElement;
|
|
24
|
-
retakeBtn: HTMLButtonElement;
|
|
25
|
-
continueBtn: HTMLButtonElement;
|
|
26
|
-
submitBtn: HTMLButtonElement;
|
|
27
|
-
changeBtn: HTMLButtonElement;
|
|
28
|
-
correctBtn: HTMLButtonElement;
|
|
29
|
-
cancelBtn: HTMLButtonElement;
|
|
30
|
-
doneBtn: HTMLButtonElement;
|
|
31
|
-
closeBtn: HTMLButtonElement;
|
|
32
|
-
pressToUpdateText: HTMLElement;
|
|
33
|
-
pressToUpdateTextSuccess: HTMLElement;
|
|
34
|
-
documentType: HTMLParagraphElement;
|
|
35
|
-
videoErrorText: HTMLElement;
|
|
36
|
-
mainContainer: HTMLElement;
|
|
37
|
-
Mask: MaskCapture;
|
|
38
|
-
selectDocumentType: SelectDocumentType;
|
|
39
|
-
forceBtn: ForceBtn;
|
|
40
|
-
msBtn: IManualSwitchBtn;
|
|
41
|
-
messageBox: MessageBox;
|
|
42
|
-
flashlight: Flashlight;
|
|
43
|
-
canvas: CanvasUi;
|
|
44
|
-
video: HTMLVideoElement;
|
|
45
|
-
constructor();
|
|
46
|
-
initTypeSelect(): void;
|
|
47
|
-
resizeMainContainer(): void;
|
|
48
|
-
updateHoldText(data?: number, isCorrectDirection?: boolean): void;
|
|
49
|
-
updateStepImg(): void;
|
|
50
|
-
showVideoError(errorCode: string): void;
|
|
51
|
-
hideVideoError(): void;
|
|
52
|
-
updateVideoWrap(): void;
|
|
53
|
-
setVideoWrapEnabled(val?: boolean): void;
|
|
54
|
-
updateContinueBtn(): void;
|
|
55
|
-
updateBtnsWrap(): void;
|
|
56
|
-
updateSubmitBtn(): void;
|
|
57
|
-
updateResetAllBtn(): void;
|
|
58
|
-
updateRetakeButton(): void;
|
|
59
|
-
updateKeyError(): void;
|
|
60
|
-
initGeneralText(): void;
|
|
61
|
-
toggleUploaderWrap(): void;
|
|
62
|
-
setUploaderWrapEnabled(val?: boolean): void;
|
|
63
|
-
toggleVideoPos(): void;
|
|
64
|
-
resizeBorders(): void;
|
|
65
|
-
setDefaultVideoCanvasSizes(): void;
|
|
66
|
-
setOffsets(baseWidth: number, baseHeight: number): void;
|
|
67
|
-
setCropSizes(baseWidth: number, baseHeight: number): void;
|
|
68
|
-
getResizedBaseSizes(coefficient: number): {
|
|
69
|
-
resizedBaseWidth: number;
|
|
70
|
-
resizedBasedHeight: number;
|
|
71
|
-
};
|
|
72
|
-
setResizedCrops(resizedBaseWidth: number, resizedBasedHeight: number): void;
|
|
73
|
-
setResizedOffsets(): void;
|
|
74
|
-
getCropSizes(coefficient: number): {
|
|
75
|
-
width: number;
|
|
76
|
-
height: number;
|
|
77
|
-
};
|
|
78
|
-
setCropFace(): void;
|
|
79
|
-
setFaceOffsets({ width }: ISize): void;
|
|
80
|
-
setResizedCanvasSizes({ width, height }: ISize): void;
|
|
81
|
-
getFakeContourWidth(width: number): number;
|
|
82
|
-
setFakeContourStyles(width: number): void;
|
|
83
|
-
setMirroring(): void;
|
|
84
|
-
}
|
|
85
|
-
declare const ui: {
|
|
86
|
-
ui: Ui | null;
|
|
87
|
-
};
|
|
88
|
-
export declare const initUi: () => void;
|
|
89
|
-
export default ui;
|
package/dist/types/util.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Base64Image } from './helpers/image';
|
|
2
|
-
import { IStepCallback } from './modules/Step';
|
|
3
|
-
import { DocumentTypeIndex } from './environment/documentTypes';
|
|
4
|
-
import { Context } from './context';
|
|
5
|
-
export interface IDataForSubmit {
|
|
6
|
-
metaData?: string;
|
|
7
|
-
payload?: Record<string, any>;
|
|
8
|
-
steps: IStepCallback[];
|
|
9
|
-
documentType: DocumentTypeIndex | 0;
|
|
10
|
-
}
|
|
11
|
-
interface IError {
|
|
12
|
-
code?: string;
|
|
13
|
-
message?: string;
|
|
14
|
-
name?: string;
|
|
15
|
-
}
|
|
16
|
-
export declare const checkIsTouchScreen: () => boolean;
|
|
17
|
-
declare const _default: {
|
|
18
|
-
checkIsTouchScreen: () => boolean;
|
|
19
|
-
prepareCameraErr(err: IError): IError;
|
|
20
|
-
formDataForSubmit(steps: IStepCallback[], c: Context, payload?: {}): IDataForSubmit;
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
* @param img
|
|
24
|
-
* @returns {ImageData}
|
|
25
|
-
*/
|
|
26
|
-
imageToImageData(img: HTMLImageElement): ImageData;
|
|
27
|
-
/**
|
|
28
|
-
*
|
|
29
|
-
* @param base64
|
|
30
|
-
* @returns {Promise<ImageData>}
|
|
31
|
-
*/
|
|
32
|
-
base64ToImageData(base64: Base64Image): Promise<ImageData>;
|
|
33
|
-
};
|
|
34
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|