@idmission/websdk-core 0.2.0-rc.2 → 0.2.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 +8 -1
- package/dist/client/IdmissionClient.d.ts +2 -0
- package/dist/client/IdmissionClient.d.ts.map +1 -1
- package/dist/client/IdmissionClient.js +3 -0
- package/dist/client/artifacts.d.ts +2 -0
- package/dist/client/artifacts.d.ts.map +1 -1
- package/dist/client/payload.d.ts.map +1 -1
- package/dist/client/payload.js +2 -1
- package/dist/client/types.d.ts +2 -0
- package/dist/client/types.d.ts.map +1 -1
- package/dist/documentCapture/autoCaptureEngine.d.ts +106 -0
- package/dist/documentCapture/autoCaptureEngine.d.ts.map +1 -0
- package/dist/documentCapture/autoCaptureEngine.js +456 -0
- package/dist/documentCapture/autoCaptureGeometry.d.ts +424 -0
- package/dist/documentCapture/autoCaptureGeometry.d.ts.map +1 -0
- package/dist/documentCapture/autoCaptureGeometry.js +394 -0
- package/dist/documentCapture/autoCaptureGuidance.d.ts +61 -0
- package/dist/documentCapture/autoCaptureGuidance.d.ts.map +1 -0
- package/dist/documentCapture/autoCaptureGuidance.js +73 -0
- package/dist/documentCapture/autoCaptureMetadata.d.ts +185 -0
- package/dist/documentCapture/autoCaptureMetadata.d.ts.map +1 -0
- package/dist/documentCapture/autoCaptureMetadata.js +197 -0
- package/dist/documentCapture/autoCaptureOptions.d.ts +212 -0
- package/dist/documentCapture/autoCaptureOptions.d.ts.map +1 -0
- package/dist/documentCapture/autoCaptureOptions.js +178 -0
- package/dist/documentCapture/autoCaptureShutter.d.ts +162 -0
- package/dist/documentCapture/autoCaptureShutter.d.ts.map +1 -0
- package/dist/documentCapture/autoCaptureShutter.js +183 -0
- package/dist/documentCapture/controller.d.ts +33 -1
- package/dist/documentCapture/controller.d.ts.map +1 -1
- package/dist/documentCapture/controller.js +604 -40
- package/dist/documentCapture/index.d.ts +8 -2
- package/dist/documentCapture/index.d.ts.map +1 -1
- package/dist/documentCapture/index.js +6 -0
- package/dist/documentCapture/reducer.d.ts +26 -1
- package/dist/documentCapture/reducer.d.ts.map +1 -1
- package/dist/documentCapture/reducer.js +43 -0
- package/dist/documentCapture/state.d.ts +118 -0
- package/dist/documentCapture/state.d.ts.map +1 -1
- package/dist/documentCapture/state.js +24 -0
- package/dist/idCapture/controller.d.ts +20 -0
- package/dist/idCapture/controller.d.ts.map +1 -1
- package/dist/idCapture/controller.js +42 -3
- package/dist/idCapture/index.d.ts +1 -1
- package/dist/idCapture/index.d.ts.map +1 -1
- package/dist/idCapture/index.js +12 -1
- package/dist/idCapture/pipeline.d.ts +30 -0
- package/dist/idCapture/pipeline.d.ts.map +1 -1
- package/dist/idCapture/pipeline.js +33 -10
- package/dist/models/DocumentDetection.d.ts +29 -1
- package/dist/models/DocumentDetection.d.ts.map +1 -1
- package/dist/models/DocumentDetection.js +37 -5
- package/dist/models/defaults/PoaDocumentDetectorLiteRT.d.ts +3 -0
- package/dist/models/defaults/PoaDocumentDetectorLiteRT.d.ts.map +1 -0
- package/dist/models/defaults/PoaDocumentDetectorLiteRT.js +15 -0
- package/dist/models/defaults/index.d.ts +4 -1
- package/dist/models/defaults/index.d.ts.map +1 -1
- package/dist/models/defaults/index.js +4 -0
- package/dist/models/preloadModels.d.ts +21 -14
- package/dist/models/preloadModels.d.ts.map +1 -1
- package/dist/models/preloadModels.js +10 -0
- package/dist/models/providers/litert/docDetectPrePost.d.ts.map +1 -1
- package/dist/models/providers/litert/docDetectPrePost.js +5 -0
- package/dist/selfieCapture/guidance.d.ts +49 -0
- package/dist/selfieCapture/guidance.d.ts.map +1 -1
- package/dist/selfieCapture/guidance.js +51 -0
- package/dist/selfieCapture/index.d.ts +1 -1
- package/dist/selfieCapture/index.d.ts.map +1 -1
- package/dist/selfieCapture/index.js +1 -1
- package/dist/signatureCapture/controller.d.ts.map +1 -1
- package/dist/signatureCapture/controller.js +71 -21
- package/dist/signatureCapture/pipeline.d.ts +14 -2
- package/dist/signatureCapture/pipeline.d.ts.map +1 -1
- package/dist/signatureCapture/pipeline.js +30 -7
- package/dist/signatureCapture/state.d.ts +15 -0
- package/dist/signatureCapture/state.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/videoIdCapture/controller.d.ts.map +1 -1
- package/dist/videoIdCapture/controller.js +64 -3
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
// deps.createCanvas() (a canvas-key remount becomes a fresh createCanvas()
|
|
18
18
|
// call), useEffect wiring -> direct calls. All I/O-adjacent collaborators are
|
|
19
19
|
// injectable through `deps` so the whole pipeline runs in plain Node tests.
|
|
20
|
-
import { closeDocumentDetector, defaultDocumentDetectionBoundaries, defaultDocumentDetectionModelLoadTimeoutMs, defaultDocumentDetectionScoreThreshold, defaultDocumentDetectionThresholds, lastDetectionTime, loadDocumentDetector, makeDocumentDetectorPrediction, processDocumentDetectorPrediction, setLastDetectionAt, testDocumentDetectorAgainstKnownImage, } from '../models/DocumentDetection';
|
|
20
|
+
import { closeDocumentDetector, defaultDocumentDetectionBoundaries, defaultDocumentDetectionModelLoadTimeoutMs, defaultDocumentDetectionScoreThreshold, defaultDocumentDetectionThresholds, lastDetectionTime, loadDocumentDetector, makeDocumentDetectorPrediction, processDocumentDetectorPrediction, resetDocumentStabilityTracking, setLastDetectionAt, testDocumentDetectorAgainstKnownImage, } from '../models/DocumentDetection';
|
|
21
21
|
import { classifyFocusModelForVideo, closeFocusModel, defaultFocusThresholds, lastFocusPredictionTime, loadFocusModel, makeFocusModelPrediction, setLastFocusPredictionAt, } from '../models/Focus';
|
|
22
22
|
import { classifyBarcodeReadabilityModelForVideo, closeBarcodeReadabilityModel, lastBarcodeReadabilityPredictionTime, loadBarcodeReadabilityModel, makeBarcodeReadabilityModelPrediction, setLastBarcodeReadabilityPredictionAt, } from '../models/BarcodeReadability';
|
|
23
23
|
import { waitForVideoReady } from '../models/helpers';
|
|
@@ -272,14 +272,23 @@ export function createDetectionPipeline(opts) {
|
|
|
272
272
|
let recaptureBarcodeScore = 0;
|
|
273
273
|
let isRecapturePhase = false;
|
|
274
274
|
let requiredDocumentType = 'none'; // (:542-544)
|
|
275
|
-
// Live threshold/boundary state
|
|
276
|
-
//
|
|
277
|
-
//
|
|
278
|
-
//
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
275
|
+
// Live threshold/boundary state, seeded from `opts` and thereafter owned by
|
|
276
|
+
// setThresholds/setBoundaries.
|
|
277
|
+
//
|
|
278
|
+
// sdk2's providers initialised detection/focus to {} (DocumentDetection-
|
|
279
|
+
// ModelProvider.tsx:121-122, FocusModelProvider.tsx:81) and relied on an
|
|
280
|
+
// effect to fill them in. That sentinel is not a usable runtime config:
|
|
281
|
+
// both are consumed with `?? 0`, so {} means "every threshold is 0" — every
|
|
282
|
+
// document type passes on every frame and focus never gates. The port
|
|
283
|
+
// defaults them here so a standalone `createDetectionPipeline` is correct
|
|
284
|
+
// without the setThresholds ritual both controllers perform.
|
|
285
|
+
//
|
|
286
|
+
// barcodeReadability deliberately stays {}: defaultIdCaptureThresholds
|
|
287
|
+
// carries only detection + focus, so {} is what the shipping SDK runs with.
|
|
288
|
+
let documentDetectionThresholds = opts.thresholds?.detection ?? defaultDocumentDetectionThresholds;
|
|
289
|
+
let documentDetectionBoundaries = opts.boundaries ?? defaultDocumentDetectionBoundaries;
|
|
290
|
+
let focusThresholds = opts.thresholds?.focus ?? defaultFocusThresholds;
|
|
291
|
+
let barcodeReadabilityThresholds = opts.thresholds?.barcodeReadability ?? {};
|
|
283
292
|
let timesAllZero = 0; // DocumentDetectionModelProvider.tsx:125
|
|
284
293
|
// ---------------------------------------------------------------------
|
|
285
294
|
// Model load + readiness aggregation (IdCaptureModelsProvider.tsx:
|
|
@@ -943,6 +952,18 @@ export function createDetectionPipeline(opts) {
|
|
|
943
952
|
}
|
|
944
953
|
stopDetection += 1;
|
|
945
954
|
captureGeneration += 1;
|
|
955
|
+
// The box history behind `documentIsStable` is module state that outlives
|
|
956
|
+
// any single capture: without this, two frames of a frozen feed (a paused
|
|
957
|
+
// element on the way back from a review) score IoU 1.0 against a history
|
|
958
|
+
// the previous session filled, and pass stability on their first tick.
|
|
959
|
+
//
|
|
960
|
+
// Untested, deliberately: the history lives in DocumentDetection's module
|
|
961
|
+
// scope, and both suites that could reach it stub the seam — this
|
|
962
|
+
// pipeline's harness fakes `processDocumentDetectorPrediction` outright,
|
|
963
|
+
// and DocumentDetection.test.ts's loader replaces `calculateIoU`/`average`
|
|
964
|
+
// with constants. Pinning it needs a loader that keeps the real helpers
|
|
965
|
+
// AND seeds the detector's frame-interval samples.
|
|
966
|
+
resetDocumentStabilityTracking();
|
|
946
967
|
// clearDocumentDetectionLastPredictionCanvas (:1166): bumps the loop's
|
|
947
968
|
// stop counter (folded into stopDetection above) and remounts the frame
|
|
948
969
|
// canvas.
|
|
@@ -968,7 +989,9 @@ export function createDetectionPipeline(opts) {
|
|
|
968
989
|
requiredDocumentType = value;
|
|
969
990
|
resetBestFrame();
|
|
970
991
|
}
|
|
971
|
-
// (:559-576)
|
|
992
|
+
// (:559-576) Partial at the sub-object level: a sub-object that is present
|
|
993
|
+
// replaces the current one outright (it is not merged key-by-key), and one
|
|
994
|
+
// that is absent is left untouched.
|
|
972
995
|
function setThresholds(thresholds) {
|
|
973
996
|
if (thresholds.detection) {
|
|
974
997
|
documentDetectionThresholds = thresholds.detection;
|
|
@@ -11,7 +11,7 @@ export declare const documentTypeDisplayNames: {
|
|
|
11
11
|
singlePage: string;
|
|
12
12
|
none: string;
|
|
13
13
|
};
|
|
14
|
-
export type Label = 'Document' | 'Document back' | 'MRZ' | 'PDF417' | 'Primary face' | 'Secondary face' | 'Glare' | 'Punch Hole' | 'Passport page' | 'Single page' | 'Nose' | 'Hologram' | 'Primary signature' | 'Official signature' | '1-D barcode' | 'QR code' | 'Fingerprint' | 'Finger' | 'Real ID star' | 'Watermark' | 'NFC chip' | 'Issuer emblem' | 'Document title';
|
|
14
|
+
export type Label = 'Document' | 'Document back' | 'MRZ' | 'PDF417' | 'Primary face' | 'Secondary face' | 'Glare' | 'Punch Hole' | 'Passport page' | 'Single page' | 'POA' | 'Nose' | 'Hologram' | 'Primary signature' | 'Official signature' | '1-D barcode' | 'QR code' | 'Fingerprint' | 'Finger' | 'Real ID star' | 'Watermark' | 'NFC chip' | 'Issuer emblem' | 'Document title';
|
|
15
15
|
export type DetectedObjectBox = {
|
|
16
16
|
xMin: number;
|
|
17
17
|
xMax: number;
|
|
@@ -35,7 +35,24 @@ export type DocumentDetectionThresholds = DocumentThresholds & {
|
|
|
35
35
|
stability?: DocumentThresholds;
|
|
36
36
|
};
|
|
37
37
|
export type DocumentDetectorRuntime = 'mediapipe' | 'litert';
|
|
38
|
+
/**
|
|
39
|
+
* Which trained artifact to load. `'shared'` is the detector idCapture,
|
|
40
|
+
* passport and selfie `docdetect` are tuned against; `'poa'` is the POA-class
|
|
41
|
+
* retrain that `documentCapture` loads ALONGSIDE it (#355) rather than
|
|
42
|
+
* replacing it.
|
|
43
|
+
*
|
|
44
|
+
* This is one parameter rather than two because the default path and the
|
|
45
|
+
* preloaded artifact must never disagree: `preloadKey` is model-keyed, so
|
|
46
|
+
* warming the wrong member both downloads ~5.5 MB nobody uses AND leaves the
|
|
47
|
+
* artifact that IS loaded unverified by `verifySRI`.
|
|
48
|
+
*/
|
|
49
|
+
export type DocumentDetectorArtifact = 'shared' | 'poa';
|
|
38
50
|
export type LoadDocumentDetectorOptions = {
|
|
51
|
+
/**
|
|
52
|
+
* Which artifact to load. Defaults to `'shared'`, so every existing caller
|
|
53
|
+
* keeps the detector it is tuned for.
|
|
54
|
+
*/
|
|
55
|
+
artifact?: DocumentDetectorArtifact;
|
|
39
56
|
allowSinglePageIdCapture?: boolean;
|
|
40
57
|
enableFingerOcclusionGuidance?: boolean;
|
|
41
58
|
enableGlareOcclusionGuidance?: boolean;
|
|
@@ -78,6 +95,17 @@ export declare function makeDocumentDetectorPrediction(frame: HTMLCanvasElement)
|
|
|
78
95
|
export declare let lastDetectionAt: number;
|
|
79
96
|
export declare let lastDetectionTime: number;
|
|
80
97
|
export declare function setLastDetectionAt(time: number): void;
|
|
98
|
+
/**
|
|
99
|
+
* Drops the box history stability is judged from. Module-level, like the
|
|
100
|
+
* history itself, so every consumer of this detector shares one reset.
|
|
101
|
+
*
|
|
102
|
+
* Call it wherever "the frames before this point no longer describe what the
|
|
103
|
+
* camera is looking at": a retake, a flip, a document swap. Stability means
|
|
104
|
+
* "the same box N frames running", and history carried across such a break
|
|
105
|
+
* can satisfy that before the new session has seen N frames of anything —
|
|
106
|
+
* including a frame the user has already rejected.
|
|
107
|
+
*/
|
|
108
|
+
export declare function resetDocumentStabilityTracking(): void;
|
|
81
109
|
export type DocumentDetectionBoundaries = {
|
|
82
110
|
top: number;
|
|
83
111
|
bottom: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentDetection.d.ts","sourceRoot":"","sources":["../../src/models/DocumentDetection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"DocumentDetection.d.ts","sourceRoot":"","sources":["../../src/models/DocumentDetection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAYnE,cAAc,6BAA6B,CAAA;AAC3C,eAAO,MAAM,sCAAsC,MAAM,CAAA;AACzD,eAAO,MAAM,0CAA0C,QAAQ,CAAA;AAC/D,eAAO,MAAM,kCAAkC,EAAE,2BAWhD,CAAA;AAED,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,aAAa,GACb,YAAY,GACZ,UAAU,GACV,YAAY,CAAA;AAEhB,eAAO,MAAM,wBAAwB;;;;;;CAMpC,CAAA;AAQD,MAAM,MAAM,KAAK,GAEb,UAAU,GACV,eAAe,GACf,KAAK,GAC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M,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,wBAAsB,8BAA8B,CAClD,KAAK,EAAE,iBAAiB,GACvB,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAG1C;AAED,eAAO,IAAI,eAAe,QAAI,CAAA;AAC9B,eAAO,IAAI,iBAAiB,QAAI,CAAA;AAEhC,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,QAG9C;AAiBD;;;;;;;;;GASG;AACH,wBAAgB,8BAA8B,IAAI,IAAI,CAGrD;AAeD,MAAM,MAAM,2BAA2B,GAAG;IACxC,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,kCAAkC,EAAE,2BAMhD,CAAA;AAED,wBAAgB,iCAAiC,CAC/C,UAAU,EAAE,wBAAwB,EACpC,UAAU,EAAE,2BAA2B,EACvC,UAAU,GAAE,2BAAgE,GAC3E,2BAA2B,CAsK7B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { preloadModelDependencies, } from './preloadModels';
|
|
2
2
|
import { average, calculateIoU, convertBoundingBox } from './helpers';
|
|
3
|
-
import { defaultDocumentDetectorModelPath, defaultDocumentDetectorLiteRTModelPath, } from './defaults';
|
|
3
|
+
import { defaultDocumentDetectorModelPath, defaultDocumentDetectorLiteRTModelPath, defaultPoaDocumentDetectorLiteRTModelPath, } from './defaults';
|
|
4
4
|
export * from './defaults/DocumentDetector';
|
|
5
5
|
export const defaultDocumentDetectionScoreThreshold = 0.1;
|
|
6
6
|
export const defaultDocumentDetectionModelLoadTimeoutMs = 45000;
|
|
@@ -37,11 +37,18 @@ async function ensureProviderLoaded(runtime) {
|
|
|
37
37
|
activeRuntime = runtime;
|
|
38
38
|
return provider;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function defaultModelPathForArtifact(artifact, runtime) {
|
|
41
|
+
if (artifact === 'poa')
|
|
42
|
+
return defaultPoaDocumentDetectorLiteRTModelPath;
|
|
41
43
|
return runtime === 'mediapipe'
|
|
42
44
|
? defaultDocumentDetectorModelPath
|
|
43
45
|
: defaultDocumentDetectorLiteRTModelPath;
|
|
44
46
|
}
|
|
47
|
+
function preloadableModelForArtifact(artifact, runtime) {
|
|
48
|
+
if (artifact === 'poa')
|
|
49
|
+
return 'poaDocumentDetectorLiteRT';
|
|
50
|
+
return runtime === 'litert' ? 'documentDetectorLiteRT' : 'documentDetector';
|
|
51
|
+
}
|
|
45
52
|
export async function loadDocumentDetector(modelAssetPath, scoreThreshold = defaultDocumentDetectionScoreThreshold, runtime = 'mediapipe', opts = {}) {
|
|
46
53
|
if (opts.enableFingerOcclusionGuidance && runtime !== 'litert') {
|
|
47
54
|
throw new Error('enableFingerOcclusionGuidance requires documentDetectorRuntime="litert". ' +
|
|
@@ -55,8 +62,19 @@ export async function loadDocumentDetector(modelAssetPath, scoreThreshold = defa
|
|
|
55
62
|
throw new Error('enableHologramOcclusionGuidance requires documentDetectorRuntime="litert". ' +
|
|
56
63
|
'Either switch runtimes or set enableHologramOcclusionGuidance={false}.');
|
|
57
64
|
}
|
|
58
|
-
const
|
|
59
|
-
|
|
65
|
+
const artifact = opts.artifact ?? 'shared';
|
|
66
|
+
if (artifact === 'poa' && runtime !== 'litert') {
|
|
67
|
+
throw new Error("The POA document detector requires documentDetectorRuntime=\"litert\": " +
|
|
68
|
+
'its input tensor is uint8 and the mediapipe provider cannot load a ' +
|
|
69
|
+
'raw .tflite at all.');
|
|
70
|
+
}
|
|
71
|
+
const resolvedPath = modelAssetPath ?? defaultModelPathForArtifact(artifact, runtime);
|
|
72
|
+
// Warm the artifact this call will actually load. A caller-supplied
|
|
73
|
+
// `modelAssetPath` still warms its artifact's DEFAULT path rather than the
|
|
74
|
+
// override — known waste, ~5.5 MB, not a correctness bug, since
|
|
75
|
+
// `getCachedModelBuffer` is keyed by the real path and the override still
|
|
76
|
+
// wins. Recorded so it is not rediscovered as a bug (#355).
|
|
77
|
+
await preloadModelDependencies(preloadableModelForArtifact(artifact, runtime), runtime);
|
|
60
78
|
const p = await ensureProviderLoaded(runtime);
|
|
61
79
|
await p.load({ modelAssetPath: resolvedPath, scoreThreshold });
|
|
62
80
|
}
|
|
@@ -90,6 +108,20 @@ function trackFramesNeeded(value, bufferLength = 25) {
|
|
|
90
108
|
}
|
|
91
109
|
const lastNBoxes = [];
|
|
92
110
|
const lastNPairs = [];
|
|
111
|
+
/**
|
|
112
|
+
* Drops the box history stability is judged from. Module-level, like the
|
|
113
|
+
* history itself, so every consumer of this detector shares one reset.
|
|
114
|
+
*
|
|
115
|
+
* Call it wherever "the frames before this point no longer describe what the
|
|
116
|
+
* camera is looking at": a retake, a flip, a document swap. Stability means
|
|
117
|
+
* "the same box N frames running", and history carried across such a break
|
|
118
|
+
* can satisfy that before the new session has seen N frames of anything —
|
|
119
|
+
* including a frame the user has already rejected.
|
|
120
|
+
*/
|
|
121
|
+
export function resetDocumentStabilityTracking() {
|
|
122
|
+
lastNBoxes.length = 0;
|
|
123
|
+
lastNPairs.length = 0;
|
|
124
|
+
}
|
|
93
125
|
function trackBox(box, framesNeeded = 12) {
|
|
94
126
|
lastNBoxes.unshift(box);
|
|
95
127
|
if (lastNBoxes.length > framesNeeded)
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const defaultPoaDocumentDetectorLiteRTModelPath = "https://websdk-cdn-dev.idmission.com/assets/models/DocumentDetectorLiteRT/DocumentDetectorLiteRT-20260820_172325.tflite";
|
|
2
|
+
export declare const defaultPoaDocumentDetectorLiteRTModelHash = "+p5v0jz8wv7txlyHqEE0wtxaJKVTX9DmRDd0Df4msN7Sm3SSWOzZHNWszcdxmoP4";
|
|
3
|
+
//# sourceMappingURL=PoaDocumentDetectorLiteRT.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PoaDocumentDetectorLiteRT.d.ts","sourceRoot":"","sources":["../../../src/models/defaults/PoaDocumentDetectorLiteRT.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,yCAAyC,4HAAmG,CAAA;AAMzJ,eAAO,MAAM,yCAAyC,qEACc,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DEFAULT_CDN_URL } from '../../config/cdn';
|
|
2
|
+
// The POA-class document detector, loaded ALONGSIDE the shared detector rather
|
|
3
|
+
// than replacing it (#355). `DocumentDetectorLiteRT.ts` stays pointed at
|
|
4
|
+
// 20260602_111723 because idCapture/passport/selfie gate on Glare, Hologram,
|
|
5
|
+
// Finger, MRZ and the face classes, and none of those were measured across
|
|
6
|
+
// this retrain.
|
|
7
|
+
//
|
|
8
|
+
// Runtime contract, measured in a browser (#339): uint8 [1, 300, 300, 3] input,
|
|
9
|
+
// batch fixed at 1, float32 outputs identified by shape. POA is classId 23.
|
|
10
|
+
export const defaultPoaDocumentDetectorLiteRTModelPath = `${DEFAULT_CDN_URL}/models/DocumentDetectorLiteRT/DocumentDetectorLiteRT-20260820_172325.tflite`;
|
|
11
|
+
// BARE base64 SHA-384 — no `sha384-` prefix. `verifySRI` does string equality
|
|
12
|
+
// against the raw digest and strips no prefix, so a prefixed value here makes
|
|
13
|
+
// `preloadDependency` reject with `SRI mismatch` on every session and the
|
|
14
|
+
// detector never loads. The sibling constants are bare for the same reason.
|
|
15
|
+
export const defaultPoaDocumentDetectorLiteRTModelHash = '+p5v0jz8wv7txlyHqEE0wtxaJKVTX9DmRDd0Df4msN7Sm3SSWOzZHNWszcdxmoP4';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './DocumentDetector';
|
|
2
2
|
export * from './DocumentDetectorLiteRT';
|
|
3
|
+
export * from './PoaDocumentDetectorLiteRT';
|
|
3
4
|
export * from './Focus';
|
|
4
5
|
export * from './FocusLiteRT';
|
|
5
6
|
export * from './FaceDetector';
|
|
@@ -12,6 +13,8 @@ export declare const defaultModelPaths: {
|
|
|
12
13
|
documentDetectorHash: string;
|
|
13
14
|
documentDetectorLiteRT: string;
|
|
14
15
|
documentDetectorLiteRTHash: string;
|
|
16
|
+
poaDocumentDetectorLiteRT: string;
|
|
17
|
+
poaDocumentDetectorLiteRTHash: string;
|
|
15
18
|
focus: string;
|
|
16
19
|
focusHash: string;
|
|
17
20
|
focusLiteRT: string;
|
|
@@ -27,5 +30,5 @@ export declare const defaultModelPaths: {
|
|
|
27
30
|
barcodeReadabilityLiteRT: string;
|
|
28
31
|
barcodeReadabilityLiteRTHash: string;
|
|
29
32
|
};
|
|
30
|
-
export type HashTypes = 'documentDetectorHash' | 'documentDetectorLiteRTHash' | 'focusHash' | 'focusLiteRTHash' | 'faceDetectionHash' | 'faceLandmarkerHash' | 'faceLandmarkerLiteRTHash' | 'barcodeReadabilityHash' | 'barcodeReadabilityLiteRTHash';
|
|
33
|
+
export type HashTypes = 'documentDetectorHash' | 'documentDetectorLiteRTHash' | 'poaDocumentDetectorLiteRTHash' | 'focusHash' | 'focusLiteRTHash' | 'faceDetectionHash' | 'faceLandmarkerHash' | 'faceLandmarkerLiteRTHash' | 'barcodeReadabilityHash' | 'barcodeReadabilityLiteRTHash';
|
|
31
34
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/defaults/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/defaults/index.ts"],"names":[],"mappings":"AAsCA,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,4BAA4B,CAAA;AAE1C,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;CAqB7B,CAAA;AAED,MAAM,MAAM,SAAS,GACjB,sBAAsB,GACtB,4BAA4B,GAC5B,+BAA+B,GAC/B,WAAW,GACX,iBAAiB,GACjB,mBAAmB,GACnB,oBAAoB,GACpB,0BAA0B,GAC1B,wBAAwB,GACxB,8BAA8B,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defaultDocumentDetectorModelPath, defaultDocumentDetectorModelHash, } from './DocumentDetector';
|
|
2
2
|
import { defaultDocumentDetectorLiteRTModelPath, defaultDocumentDetectorLiteRTModelHash, } from './DocumentDetectorLiteRT';
|
|
3
|
+
import { defaultPoaDocumentDetectorLiteRTModelPath, defaultPoaDocumentDetectorLiteRTModelHash, } from './PoaDocumentDetectorLiteRT';
|
|
3
4
|
import { defaultFocusModelPath, defaultFocusModelHash } from './Focus';
|
|
4
5
|
import { defaultFocusLiteRTModelPath, defaultFocusLiteRTModelHash, } from './FocusLiteRT';
|
|
5
6
|
import { defaultFaceDetectorModelPath, defaultFaceDetectorModelHash, } from './FaceDetector';
|
|
@@ -9,6 +10,7 @@ import { defaultBarcodeReadabilityModelPath, defaultBarcodeReadabilityModelHash,
|
|
|
9
10
|
import { defaultBarcodeReadabilityLiteRTModelPath, defaultBarcodeReadabilityLiteRTModelHash, } from './BarcodeReadabilityLiteRT';
|
|
10
11
|
export * from './DocumentDetector';
|
|
11
12
|
export * from './DocumentDetectorLiteRT';
|
|
13
|
+
export * from './PoaDocumentDetectorLiteRT';
|
|
12
14
|
export * from './Focus';
|
|
13
15
|
export * from './FocusLiteRT';
|
|
14
16
|
export * from './FaceDetector';
|
|
@@ -21,6 +23,8 @@ export const defaultModelPaths = {
|
|
|
21
23
|
documentDetectorHash: defaultDocumentDetectorModelHash,
|
|
22
24
|
documentDetectorLiteRT: defaultDocumentDetectorLiteRTModelPath,
|
|
23
25
|
documentDetectorLiteRTHash: defaultDocumentDetectorLiteRTModelHash,
|
|
26
|
+
poaDocumentDetectorLiteRT: defaultPoaDocumentDetectorLiteRTModelPath,
|
|
27
|
+
poaDocumentDetectorLiteRTHash: defaultPoaDocumentDetectorLiteRTModelHash,
|
|
24
28
|
focus: defaultFocusModelPath,
|
|
25
29
|
focusHash: defaultFocusModelHash,
|
|
26
30
|
focusLiteRT: defaultFocusLiteRTModelPath,
|
|
@@ -16,21 +16,29 @@ export type PreloadProgress = {
|
|
|
16
16
|
total: number;
|
|
17
17
|
};
|
|
18
18
|
export declare function getCachedModelBuffer(url: string): Uint8Array | undefined;
|
|
19
|
-
export declare const progressByUseCase:
|
|
20
|
-
visionRuntime: PreloadProgress;
|
|
21
|
-
documentDetector: PreloadProgress;
|
|
22
|
-
documentDetectorLiteRT: PreloadProgress;
|
|
23
|
-
focus: PreloadProgress;
|
|
24
|
-
focusLiteRT: PreloadProgress;
|
|
25
|
-
faceDetection: PreloadProgress;
|
|
26
|
-
faceLandmarker: PreloadProgress;
|
|
27
|
-
faceLandmarkerLiteRT: PreloadProgress;
|
|
28
|
-
barcodeReadability: PreloadProgress;
|
|
29
|
-
barcodeReadabilityLiteRT: PreloadProgress;
|
|
30
|
-
};
|
|
19
|
+
export declare const progressByUseCase: Record<PreloadableModel | 'visionRuntime', PreloadProgress>;
|
|
31
20
|
export declare function preloadDependency(url: string, hash: string): Promise<unknown>;
|
|
32
|
-
|
|
21
|
+
/**
|
|
22
|
+
* A model the preloader can warm, SRI-verify, and cache a buffer for.
|
|
23
|
+
*
|
|
24
|
+
* The POA detector needs its OWN member rather than filing under
|
|
25
|
+
* `documentDetectorLiteRT`, and the reason is SRI coverage, not tidiness:
|
|
26
|
+
* `preloadKey` is `` `${model}:${runtime}` ``, NOT path-keyed. A second
|
|
27
|
+
* artifact sharing the `documentDetectorLiteRT` key would never be preloaded,
|
|
28
|
+
* so the litert provider would fall through `getCachedModelBuffer(path) ?? path`
|
|
29
|
+
* and hand `loadModel` the URL — which works, and thereby skips `verifySRI`
|
|
30
|
+
* altogether and loses download-progress events. This repo moved every asset
|
|
31
|
+
* onto its own CloudFront for integrity; a model that loads unverified undoes
|
|
32
|
+
* that for one model. Do not collapse these two members.
|
|
33
|
+
*/
|
|
34
|
+
export type PreloadableModel = 'documentDetector' | 'documentDetectorLiteRT' | 'poaDocumentDetectorLiteRT' | 'focus' | 'focusLiteRT' | 'faceDetection' | 'faceLandmarker' | 'faceLandmarkerLiteRT' | 'barcodeReadability' | 'barcodeReadabilityLiteRT';
|
|
33
35
|
export declare const preloadDocumentDetectorDependencies: (runtime?: RuntimeName) => Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Warms the POA-class detector (#355's "alongside" ruling). litert-only: the
|
|
38
|
+
* artifact is a uint8-input `.tflite` and the mediapipe provider cannot load
|
|
39
|
+
* it at all.
|
|
40
|
+
*/
|
|
41
|
+
export declare const preloadPoaDocumentDetectorDependencies: () => Promise<void>;
|
|
34
42
|
export declare const preloadFocusModelDependencies: (runtime?: RuntimeName) => Promise<void>;
|
|
35
43
|
export declare const preloadFaceDetectorDependencies: (runtime?: RuntimeName) => Promise<void>;
|
|
36
44
|
export declare const preloadFaceLandmarkerDependencies: (runtime?: RuntimeName) => Promise<void>;
|
|
@@ -38,5 +46,4 @@ export declare const preloadBarcodeReadabilityModelDependencies: (runtime?: Runt
|
|
|
38
46
|
export declare function preloadModelDependencies(model: PreloadableModel, runtime?: RuntimeName): Promise<void>;
|
|
39
47
|
export declare function progressToPercentage(progress: PreloadProgress): number;
|
|
40
48
|
export declare function sumUpProgressForDependencies(dependencies: string[]): PreloadProgress;
|
|
41
|
-
export {};
|
|
42
49
|
//# sourceMappingURL=preloadModels.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preloadModels.d.ts","sourceRoot":"","sources":["../../src/models/preloadModels.ts"],"names":[],"mappings":"AAAA,OAAO,EACL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CAWjB"}
|
|
@@ -53,10 +53,14 @@ const modelBufferCache = new Map();
|
|
|
53
53
|
export function getCachedModelBuffer(url) {
|
|
54
54
|
return modelBufferCache.get(url);
|
|
55
55
|
}
|
|
56
|
+
// Keyed off `PreloadableModel` rather than a hand-repeated member list, so
|
|
57
|
+
// adding a preloadable model is a compile error here until its counter exists
|
|
58
|
+
// — the alternative silently reports 0% forever for the new model.
|
|
56
59
|
export const progressByUseCase = {
|
|
57
60
|
visionRuntime: { loaded: 0, total: 0 },
|
|
58
61
|
documentDetector: { loaded: 0, total: 0 },
|
|
59
62
|
documentDetectorLiteRT: { loaded: 0, total: 0 },
|
|
63
|
+
poaDocumentDetectorLiteRT: { loaded: 0, total: 0 },
|
|
60
64
|
focus: { loaded: 0, total: 0 },
|
|
61
65
|
focusLiteRT: { loaded: 0, total: 0 },
|
|
62
66
|
faceDetection: { loaded: 0, total: 0 },
|
|
@@ -124,6 +128,12 @@ async function verifySRI(buf, hash) {
|
|
|
124
128
|
const modelsPreloading = new Map();
|
|
125
129
|
const preloadKey = (model, runtime) => `${model}:${runtime}`;
|
|
126
130
|
export const preloadDocumentDetectorDependencies = (runtime = 'mediapipe') => preloadModelDependencies(runtime === 'litert' ? 'documentDetectorLiteRT' : 'documentDetector', runtime);
|
|
131
|
+
/**
|
|
132
|
+
* Warms the POA-class detector (#355's "alongside" ruling). litert-only: the
|
|
133
|
+
* artifact is a uint8-input `.tflite` and the mediapipe provider cannot load
|
|
134
|
+
* it at all.
|
|
135
|
+
*/
|
|
136
|
+
export const preloadPoaDocumentDetectorDependencies = () => preloadModelDependencies('poaDocumentDetectorLiteRT', 'litert');
|
|
127
137
|
export const preloadFocusModelDependencies = (runtime = 'mediapipe') => preloadModelDependencies(runtime === 'litert' ? 'focusLiteRT' : 'focus', runtime);
|
|
128
138
|
export const preloadFaceDetectorDependencies = (runtime = 'mediapipe') => preloadModelDependencies('faceDetection', runtime);
|
|
129
139
|
export const preloadFaceLandmarkerDependencies = (runtime = 'mediapipe') => preloadModelDependencies(runtime === 'litert' ? 'faceLandmarkerLiteRT' : 'faceLandmarker', runtime);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docDetectPrePost.d.ts","sourceRoot":"","sources":["../../../../src/models/providers/litert/docDetectPrePost.ts"],"names":[],"mappings":"AAgCA,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAYzC,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"docDetectPrePost.d.ts","sourceRoot":"","sources":["../../../../src/models/providers/litert/docDetectPrePost.ts"],"names":[],"mappings":"AAgCA,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAYzC,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA+BvD,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CACpD,CAAC;AAEzB,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IAGd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAyBF,wBAAgB,eAAe,CAC7B,MAAM,EAAE,gBAAgB,GAAG,iBAAiB,GAC3C,UAAU,CAAC,WAAW,CAAC,CAgBzB;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,YAAY,EAAE,YAAY,CAAC;IAC3B,gBAAgB,EAAE,YAAY,CAAC;IAC/B,OAAO,EAAE,YAAY,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1D,CAAC;AA4BF,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,gBAAgB,GACxB,YAAY,EAAE,CA2FhB"}
|
|
@@ -66,6 +66,11 @@ export const DOC_DETECT_LABEL_MAP = {
|
|
|
66
66
|
// post-processor (DocumentDetection.ts). The string must match the MediaPipe
|
|
67
67
|
// model's label for the same concept so both runtimes route identically.
|
|
68
68
|
22: "Single page",
|
|
69
|
+
// Added by the 20260801 retrain (#339). Verified in a real browser at
|
|
70
|
+
// classId 23, score 0.777, box [0.025, 0, 0.996, 1.0] on a full POA sheet.
|
|
71
|
+
// Inert until a model that carries the class is loaded — the shipping
|
|
72
|
+
// artifact stops at 22, and an unmapped class would surface as `class_23`.
|
|
73
|
+
23: "POA",
|
|
69
74
|
};
|
|
70
75
|
export const DEFAULT_SCALE_FACTORS = [10.0, 10.0, 5.0, 5.0];
|
|
71
76
|
let preprocessCanvas = null;
|
|
@@ -21,4 +21,53 @@ export declare const SelfieGuidanceCode: {
|
|
|
21
21
|
export type SelfieGuidanceCode = (typeof SelfieGuidanceCode)[keyof typeof SelfieGuidanceCode];
|
|
22
22
|
export declare function deriveSelfieGuidance(prediction: FaceDetectionPrediction | null): SelfieGuidanceCode;
|
|
23
23
|
export declare function isSatisfiedSelfieCode(code: SelfieGuidanceCode): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Every message the face pill can display that is NOT a `SelfieGuidanceCode`:
|
|
26
|
+
* the challenge prompts, the liveness status ladder, and the manual-capture
|
|
27
|
+
* prompt that replaces guidance entirely when manual capture is enabled.
|
|
28
|
+
*
|
|
29
|
+
* Split from `SelfieGuidanceCode` because those are derived from a face
|
|
30
|
+
* prediction and these are not — adding these there would break the
|
|
31
|
+
* exhaustiveness of every `Record<SelfieGuidanceCode, …>` map with members
|
|
32
|
+
* `deriveSelfieGuidance` can never return.
|
|
33
|
+
*
|
|
34
|
+
* The two ladders that produce these already carry their own `source`
|
|
35
|
+
* discriminant at the call site, so this deliberately does NOT sub-divide by
|
|
36
|
+
* ladder; one flat vocabulary is what gets emitted as `data-guidance-code`.
|
|
37
|
+
*
|
|
38
|
+
* APPEND-ONLY. These names are a public styling contract the moment they reach
|
|
39
|
+
* the DOM: customers select on them from their own stylesheets, where a rename
|
|
40
|
+
* fails silently with no type error and no runtime warning. Treat this like a
|
|
41
|
+
* protobuf enum — add members, never rename, remove, or repurpose one. The
|
|
42
|
+
* string a code maps to may change freely; the code may not.
|
|
43
|
+
*/
|
|
44
|
+
export declare const FaceMessageCode: {
|
|
45
|
+
/** 'Turn your head left' */
|
|
46
|
+
readonly TURN_LEFT: "TURN_LEFT";
|
|
47
|
+
/** 'Turn your head right' */
|
|
48
|
+
readonly TURN_RIGHT: "TURN_RIGHT";
|
|
49
|
+
/** 'Return to center' */
|
|
50
|
+
readonly RETURN_TO_CENTER: "RETURN_TO_CENTER";
|
|
51
|
+
/** 'Blink' — the view appends ' N times' when blinkCount is set */
|
|
52
|
+
readonly BLINK: "BLINK";
|
|
53
|
+
/** 'Blink twice' */
|
|
54
|
+
readonly BLINK_TWICE: "BLINK_TWICE";
|
|
55
|
+
/** 'Please remove your eye coverings (sunglasses, eye patch, etc.)...' */
|
|
56
|
+
readonly REMOVE_EYE_COVERINGS: "REMOVE_EYE_COVERINGS";
|
|
57
|
+
/** 'Please remove your head coverings (hat, scarf, etc.)...' */
|
|
58
|
+
readonly REMOVE_HEAD_COVERINGS: "REMOVE_HEAD_COVERINGS";
|
|
59
|
+
/** 'Please remove your mask...' */
|
|
60
|
+
readonly REMOVE_MASK: "REMOVE_MASK";
|
|
61
|
+
/** "Let's try that again — please follow the prompts." */
|
|
62
|
+
readonly CHALLENGE_TIMED_OUT: "CHALLENGE_TIMED_OUT";
|
|
63
|
+
/** 'Could not verify your face.' */
|
|
64
|
+
readonly LIVENESS_CHECK_FAILED: "LIVENESS_CHECK_FAILED";
|
|
65
|
+
/** 'An error occurred while verifying your face.' */
|
|
66
|
+
readonly LIVENESS_CHECK_ERROR: "LIVENESS_CHECK_ERROR";
|
|
67
|
+
/** 'Photo captured, verifying...' */
|
|
68
|
+
readonly VALIDATING: "VALIDATING";
|
|
69
|
+
/** 'Position your face in the circle and click to capture.' */
|
|
70
|
+
readonly MANUAL_CAPTURE: "MANUAL_CAPTURE";
|
|
71
|
+
};
|
|
72
|
+
export type FaceMessageCode = (typeof FaceMessageCode)[keyof typeof FaceMessageCode];
|
|
24
73
|
//# sourceMappingURL=guidance.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guidance.d.ts","sourceRoot":"","sources":["../../src/selfieCapture/guidance.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AAE7D,eAAO,MAAM,kBAAkB;;IAE7B,mDAAmD;;IAEnD,uCAAuC;;IAEvC,2CAA2C;;IAE3C,8BAA8B;;IAE9B,yCAAyC;;IAEzC,qBAAqB;;IAErB,wBAAwB;;IAExB,6BAA6B;;CAErB,CAAA;AAEV,MAAM,MAAM,kBAAkB,GAC5B,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAA;AAE9D,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,uBAAuB,GAAG,IAAI,GACzC,kBAAkB,CAapB;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAEvE"}
|
|
1
|
+
{"version":3,"file":"guidance.d.ts","sourceRoot":"","sources":["../../src/selfieCapture/guidance.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AAE7D,eAAO,MAAM,kBAAkB;;IAE7B,mDAAmD;;IAEnD,uCAAuC;;IAEvC,2CAA2C;;IAE3C,8BAA8B;;IAE9B,yCAAyC;;IAEzC,qBAAqB;;IAErB,wBAAwB;;IAExB,6BAA6B;;CAErB,CAAA;AAEV,MAAM,MAAM,kBAAkB,GAC5B,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAA;AAE9D,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,uBAAuB,GAAG,IAAI,GACzC,kBAAkB,CAapB;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAEvE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,eAAe;IAE1B,4BAA4B;;IAE5B,6BAA6B;;IAE7B,yBAAyB;;IAEzB,mEAAmE;;IAEnE,oBAAoB;;IAIpB,0EAA0E;;IAE1E,gEAAgE;;IAEhE,mCAAmC;;IAEnC,0DAA0D;;IAE1D,oCAAoC;;IAEpC,qDAAqD;;IAErD,qCAAqC;;IAIrC,+DAA+D;;CAEvD,CAAA;AAEV,MAAM,MAAM,eAAe,GACzB,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAA"}
|
|
@@ -39,3 +39,54 @@ export function deriveSelfieGuidance(prediction) {
|
|
|
39
39
|
export function isSatisfiedSelfieCode(code) {
|
|
40
40
|
return code === SelfieGuidanceCode.HOLD_STILL;
|
|
41
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Every message the face pill can display that is NOT a `SelfieGuidanceCode`:
|
|
44
|
+
* the challenge prompts, the liveness status ladder, and the manual-capture
|
|
45
|
+
* prompt that replaces guidance entirely when manual capture is enabled.
|
|
46
|
+
*
|
|
47
|
+
* Split from `SelfieGuidanceCode` because those are derived from a face
|
|
48
|
+
* prediction and these are not — adding these there would break the
|
|
49
|
+
* exhaustiveness of every `Record<SelfieGuidanceCode, …>` map with members
|
|
50
|
+
* `deriveSelfieGuidance` can never return.
|
|
51
|
+
*
|
|
52
|
+
* The two ladders that produce these already carry their own `source`
|
|
53
|
+
* discriminant at the call site, so this deliberately does NOT sub-divide by
|
|
54
|
+
* ladder; one flat vocabulary is what gets emitted as `data-guidance-code`.
|
|
55
|
+
*
|
|
56
|
+
* APPEND-ONLY. These names are a public styling contract the moment they reach
|
|
57
|
+
* the DOM: customers select on them from their own stylesheets, where a rename
|
|
58
|
+
* fails silently with no type error and no runtime warning. Treat this like a
|
|
59
|
+
* protobuf enum — add members, never rename, remove, or repurpose one. The
|
|
60
|
+
* string a code maps to may change freely; the code may not.
|
|
61
|
+
*/
|
|
62
|
+
export const FaceMessageCode = {
|
|
63
|
+
// Challenge prompts (the runner's active step).
|
|
64
|
+
/** 'Turn your head left' */
|
|
65
|
+
TURN_LEFT: 'TURN_LEFT',
|
|
66
|
+
/** 'Turn your head right' */
|
|
67
|
+
TURN_RIGHT: 'TURN_RIGHT',
|
|
68
|
+
/** 'Return to center' */
|
|
69
|
+
RETURN_TO_CENTER: 'RETURN_TO_CENTER',
|
|
70
|
+
/** 'Blink' — the view appends ' N times' when blinkCount is set */
|
|
71
|
+
BLINK: 'BLINK',
|
|
72
|
+
/** 'Blink twice' */
|
|
73
|
+
BLINK_TWICE: 'BLINK_TWICE',
|
|
74
|
+
// Liveness status ladder.
|
|
75
|
+
/** 'Please remove your eye coverings (sunglasses, eye patch, etc.)...' */
|
|
76
|
+
REMOVE_EYE_COVERINGS: 'REMOVE_EYE_COVERINGS',
|
|
77
|
+
/** 'Please remove your head coverings (hat, scarf, etc.)...' */
|
|
78
|
+
REMOVE_HEAD_COVERINGS: 'REMOVE_HEAD_COVERINGS',
|
|
79
|
+
/** 'Please remove your mask...' */
|
|
80
|
+
REMOVE_MASK: 'REMOVE_MASK',
|
|
81
|
+
/** "Let's try that again — please follow the prompts." */
|
|
82
|
+
CHALLENGE_TIMED_OUT: 'CHALLENGE_TIMED_OUT',
|
|
83
|
+
/** 'Could not verify your face.' */
|
|
84
|
+
LIVENESS_CHECK_FAILED: 'LIVENESS_CHECK_FAILED',
|
|
85
|
+
/** 'An error occurred while verifying your face.' */
|
|
86
|
+
LIVENESS_CHECK_ERROR: 'LIVENESS_CHECK_ERROR',
|
|
87
|
+
/** 'Photo captured, verifying...' */
|
|
88
|
+
VALIDATING: 'VALIDATING',
|
|
89
|
+
// Surface prompt, shown in place of guidance while manual capture is on.
|
|
90
|
+
/** 'Position your face in the circle and click to capture.' */
|
|
91
|
+
MANUAL_CAPTURE: 'MANUAL_CAPTURE',
|
|
92
|
+
};
|
|
@@ -2,7 +2,7 @@ export { DEFAULT_MIN_CAPTURE_BRIGHTNESS_THRESHOLD, DEFAULT_MIN_CAPTURE_RANGE_THR
|
|
|
2
2
|
export type { LightingSample, SamplePoint, SamplingBounds, RunningAvg, } from './lighting';
|
|
3
3
|
export { createFaceTrackingState, trackFaceStep, } from './faceTracking';
|
|
4
4
|
export type { FaceDetectionPrediction, FaceTrackingInput, FaceTrackingOptions, FaceTrackingState, } from './faceTracking';
|
|
5
|
-
export { SelfieGuidanceCode, deriveSelfieGuidance, isSatisfiedSelfieCode, } from './guidance';
|
|
5
|
+
export { FaceMessageCode, SelfieGuidanceCode, deriveSelfieGuidance, isSatisfiedSelfieCode, } from './guidance';
|
|
6
6
|
export { clearedSelfieVerdict, createInitialSelfieCaptureState, } from './state';
|
|
7
7
|
export type { SelfieCaptureFlowError, SelfieCaptureFlowState, SelfieCapturePhase, SelfieCaptureThresholds, SelfieModelsState, } from './state';
|
|
8
8
|
export { reduceSelfieCapture } from './reducer';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/selfieCapture/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,wCAAwC,EACxC,mCAAmC,EACnC,sCAAsC,EACtC,2BAA2B,EAC3B,gBAAgB,GACjB,MAAM,YAAY,CAAA;AACnB,YAAY,EACV,cAAc,EACd,WAAW,EACX,cAAc,EACd,UAAU,GACX,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,uBAAuB,EACvB,aAAa,GACd,MAAM,gBAAgB,CAAA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,MAAM,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/selfieCapture/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,wCAAwC,EACxC,mCAAmC,EACnC,sCAAsC,EACtC,2BAA2B,EAC3B,gBAAgB,GACjB,MAAM,YAAY,CAAA;AACnB,YAAY,EACV,cAAc,EACd,WAAW,EACX,cAAc,EACd,UAAU,GACX,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,uBAAuB,EACvB,aAAa,GACd,MAAM,gBAAgB,CAAA;AACvB,YAAY,EACV,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,oBAAoB,EACpB,+BAA+B,GAChC,MAAM,SAAS,CAAA;AAChB,YAAY,EACV,sBAAsB,EACtB,sBAAsB,EACtB,kBAAkB,EAClB,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAA;AAC/C,YAAY,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,uBAAuB,EACvB,oCAAoC,GACrC,MAAM,YAAY,CAAA;AACnB,YAAY,EACV,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,iCAAiC,EACjC,+BAA+B,EAC/B,qBAAqB,GACtB,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EACV,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,0BAA0B,EAC1B,iBAAiB,GAClB,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EACV,eAAe,EACf,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,6BAA6B,EAC7B,0BAA0B,EAC1B,gCAAgC,EAChC,8BAA8B,EAC9B,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,cAAc,CAAA;AACrB,YAAY,EACV,uBAAuB,EACvB,uBAAuB,EACvB,6BAA6B,EAC7B,4BAA4B,EAC5B,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,cAAc,CAAA"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// liveness machine join in later plans.
|
|
3
3
|
export { DEFAULT_MIN_CAPTURE_BRIGHTNESS_THRESHOLD, DEFAULT_MIN_CAPTURE_RANGE_THRESHOLD, DEFAULT_MIN_CAPTURE_VARIANCE_THRESHOLD, detectBrightnessAndContrast, createRunningAvg, } from './lighting';
|
|
4
4
|
export { createFaceTrackingState, trackFaceStep, } from './faceTracking';
|
|
5
|
-
export { SelfieGuidanceCode, deriveSelfieGuidance, isSatisfiedSelfieCode, } from './guidance';
|
|
5
|
+
export { FaceMessageCode, SelfieGuidanceCode, deriveSelfieGuidance, isSatisfiedSelfieCode, } from './guidance';
|
|
6
6
|
export { clearedSelfieVerdict, createInitialSelfieCaptureState, } from './state';
|
|
7
7
|
export { reduceSelfieCapture } from './reducer';
|
|
8
8
|
export { createSelfiePipeline, resolveProgressEventName, DEFAULT_SELFIE_DETECTOR, DEFAULT_SELFIE_MODEL_LOAD_TIMEOUT_MS, } from './pipeline';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/signatureCapture/controller.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,KAAK,oBAAoB,EAE1B,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBA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