@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.
Files changed (165) hide show
  1. package/README.md +4 -0
  2. package/dist/css/idvc.css +1 -0
  3. package/dist/idvc.js +1684 -0
  4. package/dist/index.html +114 -0
  5. package/dist/js/defaultConfig.ts +303 -0
  6. package/dist/js/environment/capturingModes.json +4 -0
  7. package/dist/js/environment/cssVariables.json +191 -0
  8. package/dist/js/environment/designations.ts +23 -0
  9. package/dist/js/environment/documentTypes.ts +151 -0
  10. package/dist/js/environment/langs.js +1 -0
  11. package/dist/js/environment/loadModes.json +11 -0
  12. package/dist/js/environment/loopResult.ts +14 -0
  13. package/dist/js/environment/modalPosition.ts +27 -0
  14. package/dist/js/environment/networkNames.json +9 -0
  15. package/dist/js/environment/realFaceModes.ts +24 -0
  16. package/dist/js/environment/stepsDescription.ts +64 -0
  17. package/dist/js/environment/triangulation.ts +188 -0
  18. package/dist/networks/156-2c44-chunk.js +1 -0
  19. package/dist/networks/190-00d9-chunk.js +1 -0
  20. package/dist/networks/77-705c-chunk.js +1 -0
  21. package/dist/networks/Face-5c85-chunk.js +1 -0
  22. package/dist/networks/MRZ-70ee-chunk.js +1 -0
  23. package/dist/networks/PDF-4ee2-chunk.js +1 -0
  24. package/dist/networks/ZXing-f54a-chunk.js +1 -0
  25. package/dist/networks/angle03032023.onnx +0 -0
  26. package/dist/networks/classLocal03032023.onnx +0 -0
  27. package/dist/networks/faceDetection03032023.onnx +0 -0
  28. package/dist/networks/faceLandmark03032023.onnx +0 -0
  29. package/dist/networks/mrz03032023.onnx +0 -0
  30. package/dist/networks/ort-wasm-simd-threaded.wasm +0 -0
  31. package/dist/networks/ort-wasm-simd.wasm +0 -0
  32. package/dist/networks/ort-wasm-threaded.wasm +0 -0
  33. package/dist/networks/ort-wasm.wasm +0 -0
  34. package/package.json +45 -45
  35. package/dist/types/assets/images/barcode.d.ts +0 -2
  36. package/dist/types/assets/images/face.d.ts +0 -2
  37. package/dist/types/assets/images/front.d.ts +0 -2
  38. package/dist/types/assets/images/mrz.d.ts +0 -2
  39. package/dist/types/assets/images/pdf.d.ts +0 -2
  40. package/dist/types/bl.d.ts +0 -15
  41. package/dist/types/constatnts/camera.d.ts +0 -11
  42. package/dist/types/constatnts/imageProcessing.d.ts +0 -3
  43. package/dist/types/constatnts/pdf.d.ts +0 -1
  44. package/dist/types/context.d.ts +0 -118
  45. package/dist/types/defaultConfig.d.ts +0 -57
  46. package/dist/types/environment/designations.d.ts +0 -5
  47. package/dist/types/environment/documentTypes.d.ts +0 -26
  48. package/dist/types/environment/langs.d.ts +0 -89
  49. package/dist/types/environment/loopResult.d.ts +0 -8
  50. package/dist/types/environment/modalPosition.d.ts +0 -19
  51. package/dist/types/environment/realFaceModes.d.ts +0 -22
  52. package/dist/types/environment/stepsDescription.d.ts +0 -54
  53. package/dist/types/environment/triangulation.d.ts +0 -18
  54. package/dist/types/eventListeners/eventListeners.d.ts +0 -15
  55. package/dist/types/eventListeners/selectDocumentType/selectHandler.d.ts +0 -5
  56. package/dist/types/helpers/apiSupport.d.ts +0 -1
  57. package/dist/types/helpers/canvas.d.ts +0 -34
  58. package/dist/types/helpers/color.d.ts +0 -14
  59. package/dist/types/helpers/dataManipulation.d.ts +0 -27
  60. package/dist/types/helpers/detectLanguage.d.ts +0 -3
  61. package/dist/types/helpers/geometry.d.ts +0 -35
  62. package/dist/types/helpers/html.d.ts +0 -26
  63. package/dist/types/helpers/image.d.ts +0 -36
  64. package/dist/types/helpers/imageprocessing.d.ts +0 -11
  65. package/dist/types/helpers/licenceKeyError.d.ts +0 -6
  66. package/dist/types/helpers/manualUpload.d.ts +0 -7
  67. package/dist/types/helpers/math.d.ts +0 -35
  68. package/dist/types/helpers/mobileChecker.d.ts +0 -15
  69. package/dist/types/helpers/numbers.d.ts +0 -2
  70. package/dist/types/helpers/step-background.d.ts +0 -2
  71. package/dist/types/helpers/strings.d.ts +0 -9
  72. package/dist/types/helpers/time.d.ts +0 -11
  73. package/dist/types/helpers/ts/common.d.ts +0 -17
  74. package/dist/types/helpers/updateSelecetTypes.d.ts +0 -3
  75. package/dist/types/helpers/validators.d.ts +0 -44
  76. package/dist/types/idvc.d.ts +0 -19
  77. package/dist/types/initialize.d.ts +0 -12
  78. package/dist/types/loader/asyncLoader.d.ts +0 -1
  79. package/dist/types/loader/loadAnglesModel.d.ts +0 -2
  80. package/dist/types/loader/loadFrontModels.d.ts +0 -2
  81. package/dist/types/loader/loaderClassLocal.d.ts +0 -2
  82. package/dist/types/loader/loaderFace.d.ts +0 -2
  83. package/dist/types/loader/loaderMRZ.d.ts +0 -4
  84. package/dist/types/loader/loaderMeshFace.d.ts +0 -3
  85. package/dist/types/loader/loaderPDF.d.ts +0 -3
  86. package/dist/types/loader/loaderUploadMode.d.ts +0 -1
  87. package/dist/types/loader/loaderZXing.d.ts +0 -2
  88. package/dist/types/loop.d.ts +0 -13
  89. package/dist/types/loopControl.d.ts +0 -10
  90. package/dist/types/modules/BarcodeModule.d.ts +0 -28
  91. package/dist/types/modules/Config.d.ts +0 -131
  92. package/dist/types/modules/FrontProcessing.d.ts +0 -11
  93. package/dist/types/modules/MetaData.d.ts +0 -10
  94. package/dist/types/modules/MrzModule.d.ts +0 -73
  95. package/dist/types/modules/PdfModule.d.ts +0 -79
  96. package/dist/types/modules/Step.d.ts +0 -69
  97. package/dist/types/modules/blur.d.ts +0 -4
  98. package/dist/types/modules/browwserCompatibilities.d.ts +0 -7
  99. package/dist/types/modules/camera/camera.d.ts +0 -14
  100. package/dist/types/modules/camera/cameraManager.d.ts +0 -9
  101. package/dist/types/modules/face/Face.d.ts +0 -63
  102. package/dist/types/modules/face/MeshFace.d.ts +0 -48
  103. package/dist/types/modules/face/SimpleFace.d.ts +0 -23
  104. package/dist/types/modules/feature-detect/simd.d.ts +0 -2
  105. package/dist/types/modules/frameQuality.d.ts +0 -10
  106. package/dist/types/modules/heic.d.ts +0 -11
  107. package/dist/types/modules/image.d.ts +0 -13
  108. package/dist/types/modules/initErrorHandler.d.ts +0 -10
  109. package/dist/types/modules/licenseKeyChecker.d.ts +0 -1
  110. package/dist/types/modules/manualUpload.d.ts +0 -7
  111. package/dist/types/modules/manualUploadProcessing.d.ts +0 -30
  112. package/dist/types/modules/mediaDevices.d.ts +0 -2
  113. package/dist/types/modules/moduleInitializer.d.ts +0 -8
  114. package/dist/types/modules/step-functions/face.d.ts +0 -2
  115. package/dist/types/modules/step-functions/pdf.d.ts +0 -13
  116. package/dist/types/modules/step-result-processing/barcode.d.ts +0 -2
  117. package/dist/types/modules/step-result-processing/common.d.ts +0 -1
  118. package/dist/types/modules/step-result-processing/mrz.d.ts +0 -2
  119. package/dist/types/modules/step-result-processing/pdf.d.ts +0 -2
  120. package/dist/types/modules/step-result-processing/simpleFace.d.ts +0 -2
  121. package/dist/types/modules/step-result-processing/volumeFace.d.ts +0 -7
  122. package/dist/types/modules/stepFunctions.d.ts +0 -5
  123. package/dist/types/modules/stepResultProcessing.d.ts +0 -9
  124. package/dist/types/modules/ui/Flashlight.d.ts +0 -17
  125. package/dist/types/modules/ui/MaskCapture.d.ts +0 -52
  126. package/dist/types/modules/ui/MessageBox.d.ts +0 -19
  127. package/dist/types/modules/ui/Modal.d.ts +0 -20
  128. package/dist/types/modules/ui/SelectDocumentType.d.ts +0 -37
  129. package/dist/types/modules/ui/canvas.d.ts +0 -48
  130. package/dist/types/modules/ui/forceCaptruringBtn.d.ts +0 -12
  131. package/dist/types/modules/ui/hints.d.ts +0 -17
  132. package/dist/types/modules/ui/limitations.d.ts +0 -2
  133. package/dist/types/modules/ui/manualSwitchBtn.d.ts +0 -30
  134. package/dist/types/modules/ui/selectDocumentType/documentSelectedEvent.d.ts +0 -7
  135. package/dist/types/modules/ui/spinner.d.ts +0 -13
  136. package/dist/types/modules/ui/swiper.d.ts +0 -3
  137. package/dist/types/modules/uploader.d.ts +0 -58
  138. package/dist/types/modules/validation/ValidateBool.d.ts +0 -5
  139. package/dist/types/modules/validation/ValidateDocumentTypes.d.ts +0 -20
  140. package/dist/types/modules/validation/ValidateElement.d.ts +0 -5
  141. package/dist/types/modules/validation/ValidateFunction.d.ts +0 -5
  142. package/dist/types/modules/validation/ValidateNumber.d.ts +0 -5
  143. package/dist/types/modules/validation/ValidateString.d.ts +0 -5
  144. package/dist/types/modules/validation/ValidateStringInArray.d.ts +0 -12
  145. package/dist/types/modules/validation/showValidationError.d.ts +0 -2
  146. package/dist/types/modules/validation/validatorFactory.d.ts +0 -10
  147. package/dist/types/modules/validator.d.ts +0 -12
  148. package/dist/types/neural models/Provider.d.ts +0 -4
  149. package/dist/types/neural models/anglesModel.d.ts +0 -15
  150. package/dist/types/neural models/blazeFaceModel.d.ts +0 -27
  151. package/dist/types/neural models/classLocal/exits.d.ts +0 -3
  152. package/dist/types/neural models/classLocalModel.d.ts +0 -29
  153. package/dist/types/neural models/meshFaceModel.d.ts +0 -17
  154. package/dist/types/neural models/mrzModel.d.ts +0 -20
  155. package/dist/types/neural models/neuralModel.d.ts +0 -18
  156. package/dist/types/neural models/preload.d.ts +0 -7
  157. package/dist/types/stepProcessing.d.ts +0 -27
  158. package/dist/types/types/enums/realFace.d.ts +0 -4
  159. package/dist/types/types/modules/camera.enum.d.ts +0 -18
  160. package/dist/types/ui.d.ts +0 -89
  161. package/dist/types/util.d.ts +0 -34
  162. package/dist/types/workers/blurWorker.d.ts +0 -1
  163. package/dist/types/workers/bubbleWorker.d.ts +0 -1
  164. package/dist/types/workers/loadNetworksWorker.d.ts +0 -0
  165. package/dist/types/workers/mrzWorker.d.ts +0 -1
@@ -1,131 +0,0 @@
1
- import { IStepConfig, ValidationFn } from '../defaultConfig';
2
- import { RealFaceMode } from '../environment/realFaceModes';
3
- import { SupportedLanguage } from '../environment/langs';
4
- import { StepType } from '../environment/stepsDescription';
5
- import { DocumentTypeName } from '../environment/documentTypes';
6
- import { IDocumentTypeConfig } from './validator';
7
- import { IStepCallback } from './Step';
8
- import { IDataForSubmit } from '../util';
9
- /**
10
- * @param {string} el,
11
- * @param {string} licenseKey,
12
- * @param {RealFaceMode} realFaceMode,
13
- * @param {IDocumentTypeConfig | null} documentTypes,
14
- * @param {boolean} autoContinue?,
15
- * @param {number} resizeUploadedImage?,
16
- * @param {boolean} fixFrontOrientAfterUpload?,
17
- * @param {boolean} useCDN?,
18
- * @param {string} networkUrl?,
19
- */
20
- export interface IConfig {
21
- /** this is the id of the html tag on the page where the web library will be displayed. Default: videoCapturingEl */
22
- el: string;
23
- /** license key for the web library provided for you by Idscan.net */
24
- licenseKey: string;
25
- /**
26
- * an option that enables advanced image capturing with volumetric face detection. Available values: 'auto','all', 'none'
27
- * - Auto - enable "realFaceMode" only for iPhone
28
- * - All - enable "realFaceMode" for all devices
29
- * - None - disable this option
30
- */
31
- realFaceMode: RealFaceMode;
32
- /**
33
- * the array contains an object per document type that is configured. Each object has the document type listed in the type field and then in its steps array you can configure what steps you want the user to complete and what capture modes you will allow (i.e. uploader and/or video)
34
- *
35
- * Available Document Types
36
- *
37
- * - ID (1) – USA driver license and USA ID (non-driver license), Canadian driver licenses
38
- * - Passport (2) – with 2 lines MRZ
39
- * - PassportCard (3) – with 3 lines MRZ (most European IDs, USA passports/cards)
40
- * - GreenCard (6) – USA Permanent Resident Cards (only MRZ)
41
- * - InternationalId (7) – Internationally approved U.S. IDs with 3 lines MRZ
42
- * - VIN (8) – Vehicle Identification Numbers
43
- * - Barcode (9) – 1-D and 2-D barcodes
44
- *
45
- * Available Step Types
46
- *
47
- * - front – capturing the front side of a document
48
- * - mrz – detection and capturing of the MRZ of a document
49
- * - pdf – detection and capturing of pdf417 of a document
50
- * - face – detection and capturing of the end user's face using the front camera
51
- * - barcode – detection and capturing of 1 dimensional (barcodes) or 2 dimensional (qr codes)
52
- * - photo – capturing of a vehicle identification number
53
- *
54
- * Available Capture Mode
55
- *
56
- * - uploader - uploading an image from the file system
57
- * - video - capturing an image using the auto capture feature
58
- */
59
- documentTypes: IDocumentTypeConfig | null;
60
- /** the setting that enables the automatic transition from one step to the next step. Default */
61
- autoContinue?: boolean;
62
- /** sets the maximum size in pixels (of the largest of the height or width) for a manually uploaded picture */
63
- resizeUploadedImage?: number;
64
- /** this setting will change the orientation of a front step's image if it is not horizontal when it is uploaded */
65
- fixFrontOrientAfterUpload?: boolean;
66
- /** set to true if you prefer to load neural networks from a content delivery network instead of from your web server */
67
- useCDN?: boolean;
68
- /** */
69
- networkUrl?: string;
70
- /** the web library supports two languages, english and spanish. English uses en and Spanish uses es */
71
- language?: SupportedLanguage;
72
- /**
73
- * Path to the folder with chunks. Specify the path on the server if you need to remove the folder to another location.
74
- */
75
- chunkPublicPath?: string;
76
- /**
77
- * switches on/off the button to show guide lines
78
- */
79
- isShowGuidelinesButton?: boolean;
80
- /**
81
- * if only one document type is configured in the documentTypes array AND this setting is set to false the document type dialog will not be displayed to the end user
82
- */
83
- isShowDocumentTypeSelect?: boolean;
84
- /**
85
- * option to show the button 'submit' after capturing all the images. If the button is turned off, an event will automatically fire that triggers the submit event handler
86
- */
87
- showSubmitBtn?: boolean;
88
- /**
89
- * This option switches on/off the HEIC image processing (HEIC is Apple’s proprietary version of the Image File format). It’s possible to upload an image of this type only using a Mac/MacBook
90
- */
91
- useHeic?: boolean;
92
- /** callback-function which will be called after guidelines button. */
93
- clickGuidlines?: () => void;
94
- /** function which will be called after each step completes */
95
- onChange?: (data: IStepCallback) => void;
96
- /**
97
- * function which will be called after the retake button is clicked
98
- * @param data - Step object of current step
99
- */
100
- onRetakeHook?: (data: IStepCallback) => void;
101
- /** the function that will be called on the component mounted. */
102
- onMounted?: () => void;
103
- /**
104
- * function which will be called after reset all the steps button is clicked
105
- * @param data - Step objects of current pipeline
106
- */
107
- onReset?: (data: IDataForSubmit) => void;
108
- /** function which will be called in case the camera is not available */
109
- onCameraError?: (data: Error) => void;
110
- /** function which will be called after clicking the submit button */
111
- submit?: (data: IDataForSubmit) => void;
112
- }
113
- declare class Config implements IConfig {
114
- el: string;
115
- commonStepTypes: Set<StepType>;
116
- types: DocumentTypeName[];
117
- steps: IStepConfig[];
118
- documentTypes: IDocumentTypeConfig | null;
119
- licenseKey: string;
120
- autoContinue: boolean;
121
- resizeUploadedImage: number;
122
- fixFrontOrientAfterUpload: boolean;
123
- useCDN: boolean;
124
- networkUrl: string;
125
- realFaceMode: "all" | "auto" | "none";
126
- language: any;
127
- constructor(configObject: IConfig);
128
- getFunction(validationFn: ValidationFn): false | import("./validation/ValidateElement").default | import("./validation/ValidateBool").default | import("./validation/ValidateStringInArray").default | import("./validation/ValidateDocumentTypes").default | import("./validation/ValidateFunction").default | import("./validation/ValidateNumber").default | import("./validation/ValidateString").default;
129
- validate(configObject: IConfig): void;
130
- }
131
- export default Config;
@@ -1,11 +0,0 @@
1
- import { ClassLocalExitType } from '../neural models/classLocal/exits';
2
- type Status = 'PENDING' | 'FULFILLED';
3
- interface FillingQueueResult {
4
- promise: Promise<ClassLocalExitType>;
5
- status: Status;
6
- }
7
- export declare const clearQueue: () => void;
8
- export declare const fillingQueue: (smallImage?: ImageData, isUpload?: boolean) => FillingQueueResult;
9
- export declare const getBestFrame: () => ImageData;
10
- export declare const dropPromise: () => void;
11
- export {};
@@ -1,10 +0,0 @@
1
- export default class MetaData {
2
- userAgent: string;
3
- capturedMethod: string;
4
- version: string;
5
- logs: Record<string, any>;
6
- constructor(version?: string);
7
- captureMethod(steps: any): void;
8
- getMetaData(steps: any): {};
9
- prepareMetaDataForSubmit(steps: any): string;
10
- }
@@ -1,73 +0,0 @@
1
- import { IMRZLocation } from './manualUploadProcessing';
2
- import { IMrzScanRes } from '../types/mrz';
3
- import { IMrzCoords } from '../loop';
4
- import { StepFunctionResult } from '../types/loop';
5
- import MrzModel, { PredictionList } from '../neural models/mrzModel';
6
- interface IMrzStepResult extends StepFunctionResult {
7
- coords?: IMrzCoords;
8
- needToCut?: boolean;
9
- results?: {
10
- mrzText: string;
11
- };
12
- }
13
- interface ILicenceError {
14
- errorType: string;
15
- error: boolean;
16
- errorVal: string;
17
- }
18
- interface IDetectRes {
19
- status: boolean;
20
- results?: {
21
- mrzText: string;
22
- } | null;
23
- locations?: IMRZLocation;
24
- error?: ILicenceError;
25
- }
26
- export declare class MrzModule {
27
- w: number;
28
- h: number;
29
- successCount: number;
30
- worker: Worker;
31
- model: MrzModel;
32
- isInitialized: boolean;
33
- isProcessing: boolean;
34
- constructor(worker: any, key: string, networkUrl: string);
35
- getErrorVal(errorId: number): any;
36
- /**
37
- * returns error Object
38
- * @return {ILicenceError}
39
- */
40
- licenseError(errorId: number): ILicenceError;
41
- yComparator(point1: any, point2: any): any[];
42
- allocate(): void;
43
- prepareMRZlocation(locations: any): IMRZLocation;
44
- writeResults(mrzResults: IMrzScanRes): {
45
- mrzText: string;
46
- };
47
- predict(batchArr: Float32Array, batchSize: any): Promise<PredictionList[]>;
48
- scan(iData: ImageData): Promise<IMrzScanRes>;
49
- /**
50
- * process frame for MRZ
51
- * @param data
52
- */
53
- processMRZ(data: any): Promise<IMrzStepResult | {
54
- error: ILicenceError;
55
- status: {
56
- value: number;
57
- };
58
- fields: import("../types/mrz").MrzFields;
59
- count: number;
60
- location: import("../types/mrz").IMRZLocation;
61
- errorStatus?: string;
62
- symbolsConf: number;
63
- errorId: number;
64
- }>;
65
- estimateResults(data: any): number;
66
- /**
67
- * detects MRZ on ImageData
68
- * @param {ImageData} imageData
69
- * @return {Promise<>}
70
- */
71
- detectMrz(imageData: ImageData): Promise<IDetectRes>;
72
- }
73
- export default MrzModule;
@@ -1,79 +0,0 @@
1
- import { ISize } from '../helpers/image';
2
- interface Coord {
3
- x: number;
4
- y: number;
5
- }
6
- export declare class PdfModule {
7
- module: any;
8
- reader: any;
9
- handle: any;
10
- bw: number;
11
- bh: number;
12
- src: any;
13
- out: any;
14
- isAllocate: boolean;
15
- successCount: number;
16
- _errorId: number;
17
- edgMem: any;
18
- src2: any;
19
- outLen: any;
20
- locations: any;
21
- pdfCount: number;
22
- geometry: {
23
- angleBetweenTwoVectors: any;
24
- };
25
- minPDFframes: number;
26
- cropSizes: ISize;
27
- canvasSizes: ISize;
28
- constructor(core: any, processor: any);
29
- /**
30
- *
31
- * @param geometry
32
- * @param {number} minPDFframes - c.config.minPDFframes
33
- * @param {{width: number, height: number}} cropSize - c.config.cropSize
34
- * @param {{width: number, height: number}} canvasSizes - ui.borderCanvas
35
- */
36
- init(geometry: any, minPDFframes: any, cropSize: any, canvasSizes: any): void;
37
- set errorId(id: number);
38
- get errorId(): number;
39
- get errorVal(): any;
40
- /**
41
- * returns error Object
42
- * @return {{errorType: string, error: boolean, errorVal: string}}
43
- */
44
- licenseError(): {
45
- error: boolean;
46
- errorType: string;
47
- errorVal: any;
48
- };
49
- getLocations(): void;
50
- setResizedData(data: any): void;
51
- initReader(key: any): void;
52
- destroyReader(): void;
53
- setPdfData(data: any): void;
54
- readPdf(): any;
55
- releasePdf(): void;
56
- create(): void;
57
- free(): void;
58
- setSizes(bw: any, bh: any): void;
59
- getSizes(): {
60
- bw: number;
61
- bh: number;
62
- };
63
- allocate(): void;
64
- readPDF(data: any): any;
65
- drawCords(locations: Record<string, number>): Coord[];
66
- proccessPDF(data: ImageData): {
67
- status: boolean;
68
- predict: boolean;
69
- touch: boolean;
70
- image: any;
71
- type: string;
72
- error: any;
73
- coords: any[];
74
- trackString: string;
75
- pdfSuccessCount: number;
76
- pdfCount: number;
77
- };
78
- }
79
- export default PdfModule;
@@ -1,69 +0,0 @@
1
- import { Base64Image } from '../helpers/image';
2
- import { StepType } from '../environment/stepsDescription';
3
- import { IStepMode } from '../defaultConfig';
4
- export interface IStepConfigMode {
5
- name: 'mode';
6
- value: IStepMode;
7
- }
8
- export type StepConfig = IStepConfigMode;
9
- export type StepConfigNames = StepConfig['name'];
10
- export type StepConfigValues = StepConfig['value'];
11
- export interface IStepObj {
12
- name: string;
13
- type: StepType;
14
- camera: VideoFacingModeEnum;
15
- img: Base64Image | null;
16
- err?: string | null;
17
- text?: string;
18
- time?: number;
19
- configs?: StepConfig[];
20
- }
21
- export interface IStepCallback {
22
- /** base64 encoded step image */
23
- img: Base64Image | null;
24
- /** blob step image */
25
- blob: Blob | null;
26
- /** step type */
27
- type: StepType;
28
- /** is it autocaptured from camera */
29
- isAuto?: boolean;
30
- /** image source */
31
- source?: 'video' | 'file' | '';
32
- /** step index */
33
- index?: number;
34
- /** trackstring from mrz or pdf */
35
- trackString?: string;
36
- /** mrz recognized text */
37
- mrzText?: string;
38
- /** cropped base64 encoded mrz image */
39
- mrzImg?: Base64Image | null;
40
- /** cropped blob mrz image */
41
- mrzBlob?: Blob | null;
42
- /** recognized text */
43
- text?: string;
44
- }
45
- export default class Step implements IStepCallback, IStepObj {
46
- blob: Blob | null;
47
- errorCode: string | null | undefined;
48
- mrzText?: string;
49
- mrzImg?: Base64Image | null;
50
- mrzBlob?: Blob | null;
51
- trackString?: string;
52
- err?: string | null;
53
- text?: string;
54
- isAuto?: boolean;
55
- source?: 'video' | 'file';
56
- configs: StepConfig[];
57
- name: string;
58
- type: StepType;
59
- camera: VideoFacingModeEnum;
60
- img: Base64Image | null;
61
- constructor(nameOrObj: string | IStepObj, type?: StepType, camera?: VideoFacingModeEnum, time?: number, img?: Base64Image | null);
62
- setConfig(configName: StepConfigNames, configValue: StepConfigValues): void;
63
- hasConfig(configName: StepConfigNames): StepConfig | undefined;
64
- getConfig(configName: StepConfigNames): StepConfigValues | null;
65
- get isShowManualSwitchButton(): boolean;
66
- get capturingMode(): IStepMode;
67
- prepareStepForCallback(index: number): IStepCallback;
68
- static createStep(stepObj: IStepObj): Step;
69
- }
@@ -1,4 +0,0 @@
1
- declare const _default: (core: any) => {
2
- analyze: (iData: ImageData) => any;
3
- };
4
- export default _default;
@@ -1,7 +0,0 @@
1
- export declare const browserCompatibilities: {
2
- simdSupport: boolean;
3
- wasmSupport: boolean;
4
- mediaSupport: boolean;
5
- secureConnection: boolean;
6
- };
7
- export declare const detectBrowserCompatibilities: () => void;
@@ -1,14 +0,0 @@
1
- import { ISize } from '../../helpers/image';
2
- export declare const stopTrack: () => void;
3
- export declare const cameraErrorHandling: (err: Error) => Promise<never>;
4
- declare const _default: {
5
- initUploader: () => Promise<void>;
6
- stopTrack: () => void;
7
- init: () => Promise<void>;
8
- start: (mode: VideoFacingModeEnum) => Promise<void>;
9
- setCapture: (val: boolean) => void;
10
- checkFlashAvailable: (mode?: VideoFacingModeEnum) => void;
11
- getResolution: (mode: VideoFacingModeEnum) => Promise<ISize>;
12
- dropResolutions: () => void;
13
- };
14
- export default _default;
@@ -1,9 +0,0 @@
1
- import { CameraObjects, StartCamera } from '../../types/modules/camera';
2
- import { CameraError } from '../initErrorHandler';
3
- /**
4
- * all available cameras
5
- */
6
- export declare const cameraObjects: CameraObjects;
7
- export declare const stopTrack: (mediaStream: MediaStream) => void;
8
- export declare const fillVideoDevices: () => Promise<CameraError | CameraObjects>;
9
- export declare const startCamera: StartCamera;
@@ -1,63 +0,0 @@
1
- import { Geometry } from '../../helpers/geometry';
2
- import { Color } from '../../helpers/color';
3
- declare class Face {
4
- module: any;
5
- protected isAllocate: boolean;
6
- private n;
7
- protected w: number;
8
- protected h: number;
9
- prcsq: number | null;
10
- rcsq: Float32Array | null;
11
- maxndetections: number;
12
- ppixels: number | null;
13
- faceSuccessCount: number;
14
- faceFailCount: number;
15
- faceNotRecognizedCount: number;
16
- private memory;
17
- pixels: Uint8Array;
18
- res: {
19
- cancel: boolean;
20
- image: null;
21
- touch: boolean;
22
- type: string;
23
- status: boolean;
24
- };
25
- private color;
26
- protected geometry: Geometry | null;
27
- protected edgesColor: string;
28
- constructor(core: any);
29
- init(geometry: Geometry, color: Color): void;
30
- initMemory(): void;
31
- updateMemory(dets: number[][]): any[];
32
- allocate(w: number, h: number): void;
33
- findFace(data: number[]): {
34
- tresh: number;
35
- face: {
36
- x: number;
37
- y: number;
38
- radius: number;
39
- };
40
- thresh?: undefined;
41
- } | {
42
- thresh: number;
43
- face: {
44
- x: number;
45
- y: number;
46
- radius: number;
47
- };
48
- tresh?: undefined;
49
- };
50
- setColorFromAngle(angle: number): void;
51
- result(status?: boolean, image?: any, touch?: boolean): {
52
- status: boolean;
53
- image: any;
54
- faceSuccessCount: number;
55
- faceFailCount: number;
56
- faceNotRecognizedCount: number;
57
- touch: boolean;
58
- cancel: boolean;
59
- type: string;
60
- };
61
- processFace(): void;
62
- }
63
- export default Face;
@@ -1,48 +0,0 @@
1
- import { Geometry } from '../../helpers/geometry';
2
- import { FacePrediction, RealFaceResultObject } from '../../types/modules/realFace';
3
- import { RealFaceTurnSide } from '../../types/enums/realFace';
4
- export declare class MeshFace {
5
- private realFace;
6
- private moveToCenter;
7
- private noFace;
8
- private perimeter;
9
- private distance;
10
- private baseSizes;
11
- private lowFacePerimeterPercent;
12
- private readonly lowFacePerimeterPercentDefault;
13
- private correctDirection;
14
- private direction;
15
- private turnDistances;
16
- private prediction;
17
- private faceFailCount;
18
- private faceSuccessCount;
19
- private readonly res;
20
- private geometry;
21
- constructor();
22
- init(geometry: Geometry): void;
23
- result(status?: boolean): RealFaceResultObject;
24
- noPredictions(): RealFaceResultObject;
25
- processFace(prediction: FacePrediction, resizedSize: HTMLCanvasElement | HTMLVideoElement): RealFaceResultObject;
26
- dropSuccess(): void;
27
- getDirection(): RealFaceTurnSide;
28
- setDirection(value: any): void;
29
- getMf(center: any): number[];
30
- processBadPerimeter(perimeter: any): void;
31
- main(perimeter: any, mf: any): void;
32
- processRealFace(): void;
33
- calculateFace(): {
34
- perimeter: number;
35
- mf: number[];
36
- };
37
- processPrediction(): void;
38
- processDistance(): void;
39
- /**
40
- * calculates head turn in degrees
41
- * @param {number} firstDistance
42
- * @param {number} secondDistance
43
- * @returns {number}
44
- */
45
- calculateTurn(firstDistance: any, secondDistance: any): number;
46
- calculateDistance(): void;
47
- }
48
- export default MeshFace;
@@ -1,23 +0,0 @@
1
- import Face from './Face';
2
- export declare class SimpleFace extends Face {
3
- private initialized;
4
- private readonly shiftFactor;
5
- private readonly minSize;
6
- private readonly maxSize;
7
- private readonly scaleFactor;
8
- constructor(core: any);
9
- initPico(data: ImageData): Promise<void>;
10
- rgbaToGrayScale(rgba: any, width: any, height: any): Uint8Array;
11
- detect(faceData: ImageData): {
12
- status: boolean;
13
- image: any;
14
- faceSuccessCount: number;
15
- faceFailCount: number;
16
- faceNotRecognizedCount: number;
17
- touch: boolean;
18
- cancel: boolean;
19
- type: string;
20
- };
21
- dropResults(): void;
22
- }
23
- export default SimpleFace;
@@ -1,2 +0,0 @@
1
- declare const _default: () => boolean;
2
- export default _default;
@@ -1,10 +0,0 @@
1
- /**
2
- * detect frame quality based on comparing pixels intesivity.
3
- */
4
- interface IData {
5
- data: Uint8ClampedArray;
6
- width: number;
7
- height: number;
8
- }
9
- export declare const getFrameQuality: ({ data, width, height }: IData) => number;
10
- export {};
@@ -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,13 +0,0 @@
1
- import { BrowserInfo } from 'detect-browser';
2
- export type Angle = 0 | 90 | 180 | 270;
3
- export declare function dataURItoBlob(dataURL: string): Blob;
4
- export declare const rotateImageByAngle: (src: string, angle: Angle) => Promise<unknown>;
5
- export declare const rotateImageByExif: (src: string, browser: BrowserInfo) => Promise<string>;
6
- /**
7
- *
8
- * @param src - string
9
- * @param maxSize - integer
10
- * @param browser - object
11
- * @returns {Promise<DataURL>}
12
- */
13
- export declare const resizeImage: (src: string, maxSize: number | 'none', browser: BrowserInfo) => Promise<string>;
@@ -1,10 +0,0 @@
1
- import { CameraNotSupportedReason } from '../types/modules/camera.enum';
2
- /**
3
- * The error object thrown when VideoRecognizer fails to open the camera feed.
4
- */
5
- export declare class CameraError extends Error {
6
- /** The reason why opening the camera failed. */
7
- readonly reason: CameraNotSupportedReason;
8
- constructor(reason: CameraNotSupportedReason, ...params: any[]);
9
- }
10
- export declare const CameraErrorHandler: (error: CameraError) => void;
@@ -1 +0,0 @@
1
- export declare const checkCommonKey: (key: string) => Promise<void>;
@@ -1,7 +0,0 @@
1
- import { Base64Image } from '../helpers/image';
2
- interface Base64Object {
3
- data: ImageData | Base64Image | null;
4
- err: boolean;
5
- }
6
- declare const dropFile: (base64Obj: Base64Object) => Promise<void>;
7
- export default dropFile;
@@ -1,30 +0,0 @@
1
- import { Base64Image } from '../helpers/image';
2
- interface ICoord {
3
- x: number;
4
- y: number;
5
- }
6
- export interface IMRZLocation {
7
- leftTop: ICoord;
8
- rightTop: ICoord;
9
- rightBottom: ICoord;
10
- leftBottom: ICoord;
11
- }
12
- /**
13
- * process manually uploaded image for MRZ
14
- * @param {ImageData} smallImage - resized image data
15
- * @return {Promise<boolean>}
16
- */
17
- export declare const mrzProcess: (smallImage: ImageData) => Promise<boolean>;
18
- export declare const pdfProcess: (smallImage: ImageData) => boolean;
19
- /**
20
- *
21
- * @param {Base64Image} data - base64 image
22
- */
23
- export declare const barCodeProcess: (data: Base64Image) => Promise<boolean>;
24
- export declare const frontProcess: (smallImage: ImageData) => Promise<boolean>;
25
- declare const _default: {
26
- mrzProcess: (smallImage: ImageData) => Promise<boolean>;
27
- pdfProcess: (smallImage: ImageData) => boolean;
28
- barCodeProcess: (data: string) => Promise<boolean>;
29
- };
30
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: (isiOS: boolean) => Promise<string>;
2
- export default _default;
@@ -1,8 +0,0 @@
1
- declare const _default: {
2
- hasModule: (name: any) => boolean;
3
- pdf: (module: any) => any;
4
- face: (module: any) => any;
5
- docDetector: (module: any) => any;
6
- barcode: (module: any) => any;
7
- };
8
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: () => Promise<any>;
2
- export default _default;