@incodetech/core 2.3.0-rc.2 → 2.3.0-rc.4

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 (71) hide show
  1. package/dist/{BrowserDiagnosticsCryptoProvider-Crg8fwBl.esm.js → BrowserDiagnosticsCryptoProvider-B7RIE207.esm.js} +1 -1
  2. package/dist/{FaceDetectionProvider-i55W_Jkj.esm.js → FaceDetectionProvider-CLIh2W7m.esm.js} +4 -4
  3. package/dist/ae-signature.esm.js +1 -1
  4. package/dist/{apiError-DcnaKSwk.esm.js → apiError-E-_iaWws.esm.js} +1 -1
  5. package/dist/authentication.d.ts +2 -2
  6. package/dist/authentication.esm.js +2 -2
  7. package/dist/{authenticationManager-CjXBjC-c.d.ts → authenticationManager-DcTHmYmL.d.ts} +1 -1
  8. package/dist/{authenticationManager-D-UWdyhr.esm.js → authenticationManager-ljZLcmVd.esm.js} +3 -3
  9. package/dist/{authenticationStateMachine-Cklrmjfo.esm.js → authenticationStateMachine-bw9-rkqY.esm.js} +2 -2
  10. package/dist/consent.d.ts +1 -1
  11. package/dist/{consentManager-BhYFeKiG.d.ts → consentManager-KEY2gp6H.d.ts} +1 -1
  12. package/dist/{deepsightLoader-BNDIPbEK.esm.js → deepsightLoader-B0VaGq2x.esm.js} +3 -3
  13. package/dist/document-capture.d.ts +1 -1
  14. package/dist/{documentCaptureManager-DensIj5F.d.ts → documentCaptureManager-Dv0TjEoS.d.ts} +4 -4
  15. package/dist/dynamic-forms.esm.js +2 -2
  16. package/dist/{dynamicFormsManager-DOu0Xgs0.esm.js → dynamicFormsManager-CI3S8dV4.esm.js} +1 -1
  17. package/dist/{dynamicFormsStateMachine-DehYndAZ.esm.js → dynamicFormsStateMachine-B0UJg4zR.esm.js} +1 -1
  18. package/dist/ekyb.esm.js +3 -3
  19. package/dist/{ekybManager-CCcz4-FC.esm.js → ekybManager-B6rnJ2WV.esm.js} +1 -1
  20. package/dist/{ekybStateMachine-xesYf5pK.esm.js → ekybStateMachine-CIDhxLgL.esm.js} +1 -1
  21. package/dist/electronic-signature.esm.js +1 -1
  22. package/dist/{electronicSignatureManager-8VGN2aKU.esm.js → electronicSignatureManager-3nmHM2Ip.esm.js} +1 -1
  23. package/dist/extensibility.d.ts +9 -9
  24. package/dist/extensibility.esm.js +10 -10
  25. package/dist/{faceCaptureManagerFactory-Bl6EffXD.esm.js → faceCaptureManagerFactory-ByH_zPjx.esm.js} +1 -1
  26. package/dist/{faceCaptureManagerFactory-BeUl8fl1.d.ts → faceCaptureManagerFactory-Cx-8SqRy.d.ts} +45 -37
  27. package/dist/{faceCaptureSetup-CDGmqC8J.esm.js → faceCaptureSetup-Ddt4pqZt.esm.js} +243 -42
  28. package/dist/{feature-management-J3rr-HDW.esm.js → feature-management-D2Isb1B1.esm.js} +1 -1
  29. package/dist/feature-management.esm.js +1 -1
  30. package/dist/flow.esm.js +3 -3
  31. package/dist/{flowCompletionService-CayNS1FR.esm.js → flowCompletionService-BSNpSjTl.esm.js} +1 -1
  32. package/dist/{flowServices-DX5ygAyn.esm.js → flowServices-Ddnj6SJu.esm.js} +4 -4
  33. package/dist/geolocation.d.ts +1 -1
  34. package/dist/geolocation.esm.js +2 -2
  35. package/dist/{geolocationManager-Cz744E5S.d.ts → geolocationManager-B0gz37Ry.d.ts} +1 -1
  36. package/dist/{geolocationManager-DYXuNsN2.esm.js → geolocationManager-CzEXS9dH.esm.js} +1 -1
  37. package/dist/{geolocationStateMachine-C-37vSiR.esm.js → geolocationStateMachine-BmGNkkDJ.esm.js} +1 -1
  38. package/dist/id-ocr.d.ts +1 -1
  39. package/dist/id-selfie-flow.esm.js +8 -7
  40. package/dist/id.esm.js +3 -3
  41. package/dist/idCaptureDefaults-CdGZWxTZ.esm.js +282 -0
  42. package/dist/{idCaptureManager-BFtpmjsP.esm.js → idCaptureManager-Ti3ol0Xx.esm.js} +3 -3
  43. package/dist/{idCaptureServices-C7aPT72E.esm.js → idCaptureServices-BbxjZBLC.esm.js} +4 -4
  44. package/dist/{idCaptureStateMachine-BEbzg_R1.esm.js → idCaptureStateMachine-DagQB0Tl.esm.js} +9 -9
  45. package/dist/{idOcrManager-BF_cXZq8.d.ts → idOcrManager-CFlDwUvN.d.ts} +1 -1
  46. package/dist/identity-reuse.d.ts +1 -1
  47. package/dist/{identityReuseManager-v2TH5g7e.d.ts → identityReuseManager-D6pD4hcZ.d.ts} +1 -1
  48. package/dist/index.esm.js +1 -1
  49. package/dist/mandatory-consent.d.ts +1 -1
  50. package/dist/{mandatoryConsentManager-vhv1co_n.d.ts → mandatoryConsentManager-CbwP1sIp.d.ts} +1 -1
  51. package/dist/{multipartRecordingService-OEgIRvqC.esm.js → multipartRecordingService-CuXLH4tK.esm.js} +446 -1
  52. package/dist/personhood.esm.js +4 -4
  53. package/dist/qe-signature.esm.js +1 -1
  54. package/dist/{runChildModule-CT0aKjFV.esm.js → runChildModule-DQ4TienK.esm.js} +1 -1
  55. package/dist/{sdkVersion-DTrl2Jm7.esm.js → sdkVersion-YDsnVX6k.esm.js} +1 -1
  56. package/dist/selfie.d.ts +2 -2
  57. package/dist/selfie.esm.js +5 -5
  58. package/dist/{selfieManager-0gvnAH1m.esm.js → selfieManager-CFbZAveM.esm.js} +3 -3
  59. package/dist/{selfieManager-4RRLi21P.d.ts → selfieManager-jXqwqosi.d.ts} +1 -1
  60. package/dist/{selfieStateMachine-rfneTd9x.esm.js → selfieStateMachine-Lo7BxnW4.esm.js} +2 -2
  61. package/dist/{session-ZAdron5D.esm.js → session-BtGQjs4Y.esm.js} +3 -3
  62. package/dist/session.esm.js +4 -4
  63. package/dist/{sessionInitializer-C1A6s33W.esm.js → sessionInitializer-BMe3q3I6.esm.js} +3 -3
  64. package/dist/{setup-6e71xCI7.esm.js → setup-CYKOne8r.esm.js} +4 -4
  65. package/dist/{trueSightService-DJ1kSDlH.esm.js → trueSightService-Goxs4dp4.esm.js} +3 -3
  66. package/dist/video-selfie.esm.js +4 -5
  67. package/dist/{videoSelfieCameraWarmer-BqXupt3L.esm.js → videoSelfieCameraWarmer-DhcyW9sN.esm.js} +3 -3
  68. package/dist/wasm.esm.js +1 -1
  69. package/dist/workflow.esm.js +14 -14
  70. package/package.json +1 -1
  71. package/dist/idCaptureDefaults-CxOh31Xf.esm.js +0 -727
@@ -0,0 +1,282 @@
1
+ import { b as resolveWasmSource, p as WASM_MODEL_FILES } from "./wasmWebClient-B7baE-Wf.esm.js";
2
+ import { p as getBarcodeEnhanceModelUrl } from "./setup-CYKOne8r.esm.js";
3
+ import { s as wasmRuntime, t as getResolvedModelSource } from "./warmup-CUUnwYxe.esm.js";
4
+ import { i as BaseWasmProvider } from "./safeStorage-B-trhxg6.esm.js";
5
+ import { t as IncodeCanvas } from "./canvas-BxFzWTt-.esm.js";
6
+ //#region ../infra/src/wasm/idCaptureWasmApi.ts
7
+ var IdCaptureWasmApi = class {
8
+ constructor(runtime = wasmRuntime) {
9
+ this.runtime = runtime;
10
+ }
11
+ async setIdCaptureThresholds(type, blurThreshold, blurChangeThreshold, glareThreshold, clsThreshold, sideThreshold, iouThreshold, idDetectedTimeout, autocaptureTimeout, framesAggregationInterval) {
12
+ this.runtime.requireIdCaptureApi("Unable to set thresholds, cpp API hasn't been initialized").setIdCaptureThresholds(this.runtime.pipelineTypeToWasmEnum(type), blurThreshold, blurChangeThreshold, glareThreshold, clsThreshold, sideThreshold, iouThreshold, idDetectedTimeout, autocaptureTimeout, framesAggregationInterval);
13
+ }
14
+ async setIdCaptureCallbacks(type, onFarAway, onDetectionStarted, onMaskChange, onBlur, onGlare, onCapturing, onCapture, onBestFrame, onIDNotDetected, onSwitchToManualCapture, onIDTypeChange, onIDSideChange, onCapturingCounterValueChange) {
15
+ this.runtime.requireIdCaptureApi("Unable to set callbacks, cpp API hasn't been initialized").setIdCaptureCallbacks(this.runtime.pipelineTypeToWasmEnum(type), onFarAway, onDetectionStarted, onMaskChange, onBlur, onGlare, onCapturing, onCapture, onBestFrame, onIDNotDetected, onSwitchToManualCapture, onIDTypeChange, onIDSideChange, onCapturingCounterValueChange);
16
+ }
17
+ async setIdCaptureGeometryParams(type, areaDown, areaUp, areaIOSPassportUp, areaIOSPassportDown, widthIOSUp, widthIOSDown, widthDown, widthUp, windowOuterWidth, windowOuterHeight, windowInnerWidth, windowInnerHeight) {
18
+ this.runtime.requireIdCaptureApi("Unable to set geometry params, cpp API hasn't been initialized").setIdCaptureGeometryParams(this.runtime.pipelineTypeToWasmEnum(type), areaDown, areaUp, areaIOSPassportUp, areaIOSPassportDown, widthIOSUp, widthIOSDown, widthDown, widthUp, windowOuterWidth, windowOuterHeight, windowInnerWidth, windowInnerHeight);
19
+ }
20
+ async setIdCaptureConfigParams(type, isFixedMask, isIPhone14OrHigher, idType, isBlurCheckEnabled, isGlareCheckEnabled, _isIdFaceQualityCheckEnabled, isIouCheckEnabled, _isFPSLimitEnabled) {
21
+ this.runtime.requireIdCaptureApi("Unable to set config params, cpp API hasn't been initialized").setIdCaptureConfigParams(this.runtime.pipelineTypeToWasmEnum(type), isFixedMask, isIPhone14OrHigher, idType, isBlurCheckEnabled, isGlareCheckEnabled, isIouCheckEnabled);
22
+ }
23
+ setIdCaptureModelType(pipelineType, modelType) {
24
+ this.runtime.requireIdCaptureApi("Unable to set model type, cpp API hasn't been initialized").setIdCaptureModelType(this.runtime.pipelineTypeToWasmEnum(pipelineType), this.runtime.IdCaptureModelTypeToWasmEnum(modelType));
25
+ }
26
+ setIdBarcodeCaptureEnabled(pipelineType, enabled) {
27
+ this.runtime.requireIdCaptureApi("Unable to set barcode capture enabled, cpp API hasn't been initialized").setIdBarcodeCaptureEnabled(this.runtime.pipelineTypeToWasmEnum(pipelineType), enabled);
28
+ }
29
+ setIdBarcodeAutoCaptureOnDecode(pipelineType, enabled) {
30
+ this.runtime.requireIdCaptureApi("Unable to set barcode auto-capture-on-decode, cpp API hasn't been initialized").setIdBarcodeAutoCaptureOnDecode(this.runtime.pipelineTypeToWasmEnum(pipelineType), enabled);
31
+ }
32
+ setIdBarcodeDecodedCallback(pipelineType, onBarcodeDecoded) {
33
+ this.runtime.requireIdCaptureApi("Unable to set barcode decoded callback, cpp API hasn't been initialized").setIdBarcodeDecodedCallback(this.runtime.pipelineTypeToWasmEnum(pipelineType), onBarcodeDecoded);
34
+ }
35
+ async setIdBarcodeEnhancementModel(pipelineType, modelPath) {
36
+ const message = "Unable to set barcode enhancement model, cpp API hasn't been initialized";
37
+ this.runtime.requireIdCaptureApi(message);
38
+ const buffer = await resolveWasmSource(modelPath, "barcode model");
39
+ return this.runtime.requireIdCaptureApi(message).setBarcodeEnhancementModel(this.runtime.pipelineTypeToWasmEnum(pipelineType), buffer);
40
+ }
41
+ IdPerspectiveTransform(image, frameRect) {
42
+ return this.runtime.requireIdCaptureApi("Unable to perform perspective transform, cpp API hasn't been initialized").IdPerspectiveTransform(image, frameRect);
43
+ }
44
+ /**
45
+ * Kept-dead: mirrors upstream `wasmApi.runIdCapture`. Nothing in the SDK calls
46
+ * it; it exists so the mirror stays 1:1 with upstream at the pinned tag.
47
+ */
48
+ async runIdCapture(image) {
49
+ const idCaptureWasmApi = this.runtime.requireIdCaptureApi("Unable to run Id Capture, cpp API hasn't been initialized");
50
+ if (image) {
51
+ await this.runtime.allocateImageBuffers(image.width, image.height);
52
+ this.runtime.writeFrame(image);
53
+ }
54
+ return idCaptureWasmApi.runIdCapture();
55
+ }
56
+ };
57
+ const idCaptureWasmApi = new IdCaptureWasmApi();
58
+ //#endregion
59
+ //#region ../infra/src/providers/wasm/IdCaptureProvider.ts
60
+ var IdCaptureProvider = class extends BaseWasmProvider {
61
+ constructor(protectedWorkflow) {
62
+ super(protectedWorkflow ?? 0);
63
+ this.lastProcessResult = null;
64
+ this.capturedCanvas = null;
65
+ this.originalCapturedCanvas = null;
66
+ this.lastDecodedBarcode = null;
67
+ this.barcodeEnhancementModelLoaded = false;
68
+ }
69
+ async initialize(config) {
70
+ if (config.videoSelfie === true) {
71
+ if (this.pipelineType !== 0) throw new Error("[Incode SDK] Protected ID workflows are unavailable for video selfie.");
72
+ this.pipelineType = 2;
73
+ await this.initializeBase(config, "videoSelfieId");
74
+ } else await this.initializeBase(config, "idCapture");
75
+ }
76
+ setCallbacks(callbacks) {
77
+ this.ensureInitialized();
78
+ const onCaptureWrapper = (canvas) => {
79
+ callbacks.onCapture?.(canvas);
80
+ };
81
+ idCaptureWasmApi.setIdCaptureCallbacks(this.getPipelineType(), callbacks.onFarAway ?? (() => {}), callbacks.onDetectionStarted ?? (() => {}), callbacks.onMaskChange ? (show, mask, top, orientation) => callbacks.onMaskChange?.(show, mask, top, orientation) : () => {}, callbacks.onBlur ?? (() => {}), callbacks.onGlare ?? (() => {}), callbacks.onCapturing ?? (() => {}), callbacks.onCapture ? onCaptureWrapper : () => {}, callbacks.onBestFrame ? (blur, glare, orientation) => callbacks.onBestFrame?.(blur, glare, orientation) : () => {}, callbacks.onIdNotDetected ?? (() => {}), callbacks.onSwitchToManualCapture ?? (() => {}), callbacks.onIdTypeChange ? (idType) => callbacks.onIdTypeChange?.(idType) : () => {}, callbacks.onIdSideChange ? (side) => callbacks.onIdSideChange?.(side) : () => {}, callbacks.onCapturingCounterValueChange ? (value) => callbacks.onCapturingCounterValueChange?.(value) : () => {});
82
+ if (callbacks.onBarcodeDecoded) {
83
+ const onBarcodeDecoded = callbacks.onBarcodeDecoded;
84
+ idCaptureWasmApi.setIdBarcodeDecodedCallback(this.getPipelineType(), (decoded) => {
85
+ this.lastDecodedBarcode = decoded;
86
+ onBarcodeDecoded(decoded);
87
+ });
88
+ } else idCaptureWasmApi.setIdBarcodeDecodedCallback(this.getPipelineType(), () => {});
89
+ }
90
+ setThresholds(thresholds) {
91
+ this.ensureInitialized();
92
+ idCaptureWasmApi.setIdCaptureThresholds(this.getPipelineType(), thresholds.blurThreshold, thresholds.blurChangeThreshold, thresholds.glareThreshold, thresholds.clsThreshold, thresholds.sideThreshold, thresholds.iouThreshold, thresholds.idDetectedTimeout, thresholds.autocaptureTimeout, thresholds.framesAggregationInterval);
93
+ }
94
+ setGeometry(geometry) {
95
+ this.ensureInitialized();
96
+ idCaptureWasmApi.setIdCaptureGeometryParams(this.getPipelineType(), geometry.areaDown, geometry.areaUp, geometry.areaIOSPassportUp, geometry.areaIOSPassportDown, geometry.widthIOSUp, geometry.widthIOSDown, geometry.widthDown, geometry.widthUp, geometry.windowOuterWidth, geometry.windowOuterHeight, geometry.windowInnerWidth, geometry.windowInnerHeight);
97
+ }
98
+ setSettings(settings) {
99
+ this.ensureInitialized();
100
+ idCaptureWasmApi.setIdCaptureConfigParams(this.getPipelineType(), settings.isFixedMask, settings.isIPhone14OrHigher, settings.idType, settings.blurCheckEnabled, settings.glareCheckEnabled, settings.faceQualityCheckEnabled, settings.iouCheckEnabled, settings.fpsLimitEnabled);
101
+ }
102
+ setModelType(modelType) {
103
+ this.ensureInitialized();
104
+ let wasmModelType;
105
+ switch (modelType) {
106
+ case "v1":
107
+ wasmModelType = 0;
108
+ break;
109
+ case "v2":
110
+ wasmModelType = 1;
111
+ break;
112
+ case "v3":
113
+ wasmModelType = 2;
114
+ break;
115
+ default: throw new Error(`Unknown model type: ${modelType}`);
116
+ }
117
+ idCaptureWasmApi.setIdCaptureModelType(this.getPipelineType(), wasmModelType);
118
+ }
119
+ setBarcodeCaptureEnabled(enabled) {
120
+ this.ensureInitialized();
121
+ idCaptureWasmApi.setIdBarcodeCaptureEnabled(this.getPipelineType(), enabled);
122
+ }
123
+ setBarcodeAutoCaptureOnDecode(enabled) {
124
+ this.ensureInitialized();
125
+ idCaptureWasmApi.setIdBarcodeAutoCaptureOnDecode(this.getPipelineType(), enabled);
126
+ }
127
+ async setBarcodeEnhancementModel() {
128
+ this.ensureInitialized();
129
+ if (this.barcodeEnhancementModelLoaded) return true;
130
+ const modelUrl = getResolvedModelSource(WASM_MODEL_FILES.barcode, "idCapture") ?? getBarcodeEnhanceModelUrl();
131
+ const applied = await idCaptureWasmApi.setIdBarcodeEnhancementModel(this.getPipelineType(), modelUrl);
132
+ this.barcodeEnhancementModelLoaded = applied;
133
+ return applied;
134
+ }
135
+ getLastDecodedBarcode() {
136
+ return this.lastDecodedBarcode;
137
+ }
138
+ /**
139
+ * Processes a frame through the WASM pipeline and stores the result.
140
+ */
141
+ async processFrame(image) {
142
+ const result = await this.processFrameWasm(image);
143
+ const pipelineType = this.getPipelineType();
144
+ if (result && (pipelineType === 0 || pipelineType === 2)) this.lastProcessResult = result;
145
+ else this.lastProcessResult = null;
146
+ }
147
+ /**
148
+ * Gets the last process result from the most recent frame processing.
149
+ * @returns The last process result with quad coordinates, or null if not available
150
+ */
151
+ getLastProcessResult() {
152
+ return this.lastProcessResult;
153
+ }
154
+ transformPerspective(canvas, frameRect) {
155
+ this.ensureInitialized();
156
+ const originalWidth = canvas.width();
157
+ const originalHeight = canvas.height();
158
+ try {
159
+ const imageData = canvas.getImageData();
160
+ if (!imageData) return canvas;
161
+ const transformedCanvas = idCaptureWasmApi.IdPerspectiveTransform(imageData, frameRect);
162
+ if (transformedCanvas) {
163
+ const wrappedCanvas = new IncodeCanvas(transformedCanvas);
164
+ const wrappedWidth = wrappedCanvas.width();
165
+ const wrappedHeight = wrappedCanvas.height();
166
+ if (wrappedWidth === originalWidth && wrappedHeight === originalHeight) {
167
+ const croppedCanvas = this.cropCanvasToRect(wrappedCanvas, {
168
+ x: Math.round(frameRect.x),
169
+ y: Math.round(frameRect.y),
170
+ w: Math.round(frameRect.w),
171
+ h: Math.round(frameRect.h)
172
+ });
173
+ if (croppedCanvas) return croppedCanvas;
174
+ }
175
+ return wrappedCanvas;
176
+ }
177
+ return canvas;
178
+ } catch (_error) {
179
+ return canvas;
180
+ }
181
+ }
182
+ /**
183
+ * Crops a canvas to the specified rectangle region.
184
+ * @param canvas - The canvas to crop
185
+ * @param rect - The rectangle to crop to (x, y, w, h)
186
+ * @returns A new IncodeCanvas with the cropped region, or null if cropping fails
187
+ */
188
+ cropCanvasToRect(canvas, rect) {
189
+ const canvasWidth = canvas.width();
190
+ const canvasHeight = canvas.height();
191
+ if (!canvasWidth || !canvasHeight) return null;
192
+ const x = Math.max(0, Math.min(rect.x, canvasWidth));
193
+ const y = Math.max(0, Math.min(rect.y, canvasHeight));
194
+ const w = Math.max(1, Math.min(rect.w, canvasWidth - x));
195
+ const h = Math.max(1, Math.min(rect.h, canvasHeight - y));
196
+ const croppedCanvasElement = document.createElement("canvas");
197
+ croppedCanvasElement.width = w;
198
+ croppedCanvasElement.height = h;
199
+ const ctx = croppedCanvasElement.getContext("2d");
200
+ if (!ctx) return null;
201
+ ctx.drawImage(canvas.canvas, x, y, w, h, 0, 0, w, h);
202
+ return new IncodeCanvas(croppedCanvasElement);
203
+ }
204
+ /**
205
+ * Gets the captured canvas (transformed for preview).
206
+ * @returns The captured canvas, or null if not available
207
+ */
208
+ getCapturedCanvas() {
209
+ return this.capturedCanvas;
210
+ }
211
+ /**
212
+ * Gets the original captured canvas (full frame for upload).
213
+ * @returns The original captured canvas, or null if not available
214
+ */
215
+ getOriginalCapturedCanvas() {
216
+ return this.originalCapturedCanvas;
217
+ }
218
+ /**
219
+ * Sets the captured canvases (original and transformed).
220
+ * @param original - The original full-frame canvas (for upload)
221
+ * @param transformed - The transformed canvas (for preview)
222
+ */
223
+ setCapturedCanvases(original, transformed) {
224
+ this.originalCapturedCanvas = original;
225
+ this.capturedCanvas = transformed;
226
+ }
227
+ /**
228
+ * Re-arms WASM detection without discarding the captured result.
229
+ *
230
+ * Detection-session teardown runs immediately after a successful capture.
231
+ * The captured canvases must remain available for the subsequent upload and
232
+ * are only replaced by `setCapturedCanvases()` or cleared by a full reset.
233
+ */
234
+ resetDetectionState() {
235
+ super.reset();
236
+ this.lastProcessResult = null;
237
+ this.lastDecodedBarcode = null;
238
+ }
239
+ reset() {
240
+ this.resetDetectionState();
241
+ this.capturedCanvas = null;
242
+ this.originalCapturedCanvas = null;
243
+ }
244
+ async dispose() {
245
+ await super.dispose();
246
+ this.barcodeEnhancementModelLoaded = false;
247
+ }
248
+ };
249
+ //#endregion
250
+ //#region ../infra/src/wasm/idCaptureDefaults.ts
251
+ /**
252
+ * Default WASM thresholds for ID capture quality checks.
253
+ * Matches SDK 1's `wasmWorkflowsConfig.ts` production ID profile. Explicit
254
+ * consumer and experiment overrides still take precedence in Core.
255
+ */
256
+ const DEFAULT_ID_CAPTURE_THRESHOLDS = {
257
+ blurThreshold: .2,
258
+ blurChangeThreshold: .2,
259
+ glareThreshold: .3,
260
+ clsThreshold: .98,
261
+ sideThreshold: .8,
262
+ iouThreshold: .8,
263
+ idDetectedTimeout: 1e4,
264
+ autocaptureTimeout: 5e3,
265
+ framesAggregationInterval: 1700
266
+ };
267
+ /**
268
+ * Default geometry parameters for ID detection.
269
+ * Window dimensions must be provided at runtime.
270
+ */
271
+ const DEFAULT_ID_CAPTURE_GEOMETRY = {
272
+ areaDown: 25e3,
273
+ areaUp: 55e3,
274
+ areaIOSPassportUp: 3e4,
275
+ areaIOSPassportDown: 2e4,
276
+ widthIOSUp: 160,
277
+ widthIOSDown: 85,
278
+ widthDown: 110,
279
+ widthUp: 205
280
+ };
281
+ //#endregion
282
+ export { DEFAULT_ID_CAPTURE_THRESHOLDS as n, IdCaptureProvider as r, DEFAULT_ID_CAPTURE_GEOMETRY as t };
@@ -1,12 +1,12 @@
1
- import { l as BrowserStorageProvider } from "./setup-6e71xCI7.esm.js";
1
+ import { l as BrowserStorageProvider } from "./setup-CYKOne8r.esm.js";
2
2
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-ijlbX_Wx.esm.js";
3
3
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
4
4
  import { s as createActor, u as createManager } from "./xstate.esm-BuFLFuzz.esm.js";
5
5
  import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-B2e8p268.esm.js";
6
6
  import { t as BrowserVisibilityObserverProvider } from "./BrowserVisibilityObserverProvider-BrJN1B8A.esm.js";
7
7
  import { o as resetWasmMotionPrimedForModule, r as primeMotionFromUserGestureIfNeeded } from "./permissionServices-Bj_fyWtv.esm.js";
8
- import { a as createIdProtectedCaptureController, n as provideIdProtectedCaptureController, o as findIdProtectedCaptureController, s as getManualUploadTabs, t as idCaptureMachine } from "./idCaptureStateMachine-BEbzg_R1.esm.js";
9
- import { b as resolveIdCaptureThresholds, y as resolveCaptureOptimizingTreatment } from "./idCaptureServices-C7aPT72E.esm.js";
8
+ import { a as createIdProtectedCaptureController, n as provideIdProtectedCaptureController, o as findIdProtectedCaptureController, s as getManualUploadTabs, t as idCaptureMachine } from "./idCaptureStateMachine-DagQB0Tl.esm.js";
9
+ import { b as resolveIdCaptureThresholds, y as resolveCaptureOptimizingTreatment } from "./idCaptureServices-BbxjZBLC.esm.js";
10
10
  //#region src/modules/id/digitalUpload/instrumentation.ts
11
11
  const TERMINAL_REASONS = /* @__PURE__ */ new Set(["DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED", "ID_TYPE_UNACCEPTABLE"]);
12
12
  function isHoldingState(value) {
@@ -1,5 +1,5 @@
1
- import { t as ensureWasmPipelines } from "./setup-6e71xCI7.esm.js";
2
- import { i as numberParam, n as defineExperimentParams, t as booleanParam, u as resolveExperimentOnce } from "./feature-management-J3rr-HDW.esm.js";
1
+ import { t as ensureWasmPipelines } from "./setup-CYKOne8r.esm.js";
2
+ import { i as numberParam, n as defineExperimentParams, t as booleanParam, u as resolveExperimentOnce } from "./feature-management-D2Isb1B1.esm.js";
3
3
  import { t as api } from "./api-Bx3gKW_y.esm.js";
4
4
  import { t as endpoints } from "./endpoints-B-3Q-LUw.esm.js";
5
5
  import { i as isDesktop } from "./platform-DkcRc9JV.esm.js";
@@ -8,8 +8,8 @@ import { n as fromPromise } from "./xstate-actors.esm-BXeQ-Ucz.esm.js";
8
8
  import { s as queryCameraPermission } from "./permissionServices-Bj_fyWtv.esm.js";
9
9
  import { a as isBackFacingTrack, n as getBackCameraStream } from "./backCameraStream-BOtyQowf.esm.js";
10
10
  import { t as getDeviceClass } from "./getDeviceClass-5NYZg9s6.esm.js";
11
- import { t as MultipartRecordingService } from "./multipartRecordingService-OEgIRvqC.esm.js";
12
- import { i as CameraCompositor, n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider } from "./idCaptureDefaults-CxOh31Xf.esm.js";
11
+ import { n as CameraCompositor, t as MultipartRecordingService } from "./multipartRecordingService-CuXLH4tK.esm.js";
12
+ import { n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider } from "./idCaptureDefaults-CdGZWxTZ.esm.js";
13
13
  //#region src/internal/camera/cameraServices.ts
14
14
  function createCameraServices(camera) {
15
15
  return {
@@ -1,16 +1,16 @@
1
- import { l as BrowserStorageProvider } from "./setup-6e71xCI7.esm.js";
1
+ import { l as BrowserStorageProvider } from "./setup-CYKOne8r.esm.js";
2
2
  import { r as WasmUtilProvider } from "./safeStorage-B-trhxg6.esm.js";
3
3
  import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
4
- import { s as exposeExperimentOnce } from "./feature-management-J3rr-HDW.esm.js";
4
+ import { s as exposeExperimentOnce } from "./feature-management-D2Isb1B1.esm.js";
5
5
  import { n as revokeObjectURL, t as getTimestamp } from "./IBrowserEnvironmentCapability-DEaRRk-R.esm.js";
6
6
  import { r as getToken, t as api } from "./api-Bx3gKW_y.esm.js";
7
- import { c as trueSightHintTransition, l as trueSightLog, m as isTrueSightTesting, r as noteTrueSightCaptureActivity } from "./trueSightService-DJ1kSDlH.esm.js";
7
+ import { c as trueSightHintTransition, l as trueSightLog, m as isTrueSightTesting, r as noteTrueSightCaptureActivity } from "./trueSightService-Goxs4dp4.esm.js";
8
8
  import { n as eventModuleNames, s as recordExperimentAssignmentOnce } from "./events-ijlbX_Wx.esm.js";
9
- import { t as getDisableIpify } from "./sessionInitializer-C1A6s33W.esm.js";
9
+ import { t as getDisableIpify } from "./sessionInitializer-BMe3q3I6.esm.js";
10
10
  import { t as endpoints } from "./endpoints-B-3Q-LUw.esm.js";
11
11
  import { t as addDeviceStats } from "./stats-CZcy2J53.esm.js";
12
12
  import { a as isIOS, s as isIPad, t as isAndroid, u as isMacOsSafari } from "./platform-DkcRc9JV.esm.js";
13
- import "./session-ZAdron5D.esm.js";
13
+ import "./session-BtGQjs4Y.esm.js";
14
14
  import { c as not, i as assign, l as raise, n as enqueueActions, o as and, r as sendTo, t as setup } from "./xstate.esm-BuFLFuzz.esm.js";
15
15
  import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-BXeQ-Ucz.esm.js";
16
16
  import { n as getUrlSearchParam, t as buildUrlWithSearchParams } from "./urlUtils-D6phjq1-.esm.js";
@@ -24,8 +24,8 @@ import { t as sleep } from "./ITimerCapability-DgdDzp8G.esm.js";
24
24
  import { t as getBrowser } from "./getBrowser-Cbe1C4Tn.esm.js";
25
25
  import { n as getWindowDimensions } from "./getDeviceClass-CeBiEayS.esm.js";
26
26
  import { n as runVirtualCameraCheck, t as frameSources } from "./virtualCameraCheck-Cjab7FTI.esm.js";
27
- import { n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider } from "./idCaptureDefaults-CxOh31Xf.esm.js";
28
- import { C as getIdCameraStream, S as OPTIMIZING_WATCHDOG_MARGIN_MS, _ as validateUploadResponse, a as getRealQualityValue, b as resolveIdCaptureThresholds, c as pauseRecordingForAttempt, d as resumeRecordingAfterPause, f as startRecordingSession, g as uploadManualIdFile, h as uploadIdImage, i as finalizeRecordingSession, l as prepareRecordingForCameraRetry, m as stopStream, o as initializeIdCapture, p as stopRecording, r as disposeRecordingSession, s as isSuspendableRecordingSession, t as addBarcode, u as processId, v as ID_ERROR_CODES, x as CAPTURE_OPTIMIZING } from "./idCaptureServices-C7aPT72E.esm.js";
27
+ import { n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider } from "./idCaptureDefaults-CdGZWxTZ.esm.js";
28
+ import { C as getIdCameraStream, S as OPTIMIZING_WATCHDOG_MARGIN_MS, _ as validateUploadResponse, a as getRealQualityValue, b as resolveIdCaptureThresholds, c as pauseRecordingForAttempt, d as resumeRecordingAfterPause, f as startRecordingSession, g as uploadManualIdFile, h as uploadIdImage, i as finalizeRecordingSession, l as prepareRecordingForCameraRetry, m as stopStream, o as initializeIdCapture, p as stopRecording, r as disposeRecordingSession, s as isSuspendableRecordingSession, t as addBarcode, u as processId, v as ID_ERROR_CODES, x as CAPTURE_OPTIMIZING } from "./idCaptureServices-BbxjZBLC.esm.js";
29
29
  import { t as StreamCanvasCapture } from "./StreamCanvasCapture-C9jtgBdT.esm.js";
30
30
  //#region src/modules/id/digitalUpload/digitalUploadErrors.ts
31
31
  const TERMINAL_FAIL_REASONS = /* @__PURE__ */ new Set(["DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED", "ID_TYPE_UNACCEPTABLE"]);
@@ -1781,7 +1781,7 @@ fromPromise(async ({ input }) => {
1781
1781
  });
1782
1782
  fromPromise(async ({ input }) => {
1783
1783
  if (!input.dependencies) return;
1784
- const { loadDeepsightSession } = await import("./deepsightLoader-BNDIPbEK.esm.js");
1784
+ const { loadDeepsightSession } = await import("./deepsightLoader-B0VaGq2x.esm.js");
1785
1785
  return loadDeepsightSession({
1786
1786
  ds: input.ds,
1787
1787
  storage: input.dependencies.storage,
@@ -2224,7 +2224,7 @@ function cleanup(service) {
2224
2224
  service.cleanup();
2225
2225
  } catch {}
2226
2226
  }
2227
- function createIdMetadataPreparationCoordinator(load = async (input) => (await import("./deepsightLoader-BNDIPbEK.esm.js")).loadDeepsightSession(input)) {
2227
+ function createIdMetadataPreparationCoordinator(load = async (input) => (await import("./deepsightLoader-B0VaGq2x.esm.js")).loadDeepsightSession(input)) {
2228
2228
  let disposed = false;
2229
2229
  let preparation;
2230
2230
  let service;
@@ -110,7 +110,7 @@ declare const idOcrStateMachine: StateMachine<IdOcrContext, {
110
110
  type: "shouldProceedWithoutSubmitToSecondId";
111
111
  params: unknown;
112
112
  };
113
- }>, never, "error" | "idle" | "success" | "finished" | "submitting" | "loading" | "inputting" | "readonly" | "validatingContinue", string, IdOcrInput, NonReducibleUnknown, EventObject, MetaObject, {
113
+ }>, never, "error" | "idle" | "success" | "finished" | "loading" | "submitting" | "inputting" | "readonly" | "validatingContinue", string, IdOcrInput, NonReducibleUnknown, EventObject, MetaObject, {
114
114
  readonly id: "idOcr";
115
115
  readonly initial: "idle";
116
116
  readonly context: ({ input }: {
@@ -1,2 +1,2 @@
1
- import { c as identityReuseMachine, d as ReusableDocument, f as SubmitResponse, i as createIdentityReuseManagerFromActor, l as FetchDocumentsResponse, n as IdentityReuseState, o as SCAN_NEW_DOCUMENT, r as createIdentityReuseManager, s as SelectedDocumentId, t as IdentityReuseManager, u as IdentityReuseConfig } from "./identityReuseManager-v2TH5g7e.js";
1
+ import { c as identityReuseMachine, d as ReusableDocument, f as SubmitResponse, i as createIdentityReuseManagerFromActor, l as FetchDocumentsResponse, n as IdentityReuseState, o as SCAN_NEW_DOCUMENT, r as createIdentityReuseManager, s as SelectedDocumentId, t as IdentityReuseManager, u as IdentityReuseConfig } from "./identityReuseManager-D6pD4hcZ.js";
2
2
  export { type FetchDocumentsResponse, type IdentityReuseConfig, type IdentityReuseManager, type IdentityReuseState, type ReusableDocument, SCAN_NEW_DOCUMENT, type SelectedDocumentId, type SubmitResponse, createIdentityReuseManager, createIdentityReuseManagerFromActor, identityReuseMachine };
@@ -125,7 +125,7 @@ declare const identityReuseMachine: StateMachine<IdentityReuseContext, {
125
125
  type: "hasSelection";
126
126
  params: unknown;
127
127
  };
128
- }>, never, "error" | "idle" | "finished" | "submitting" | "loading" | "documentsFound", string, IdentityReuseInput, NonReducibleUnknown, EventObject, MetaObject, {
128
+ }>, never, "error" | "idle" | "finished" | "loading" | "submitting" | "documentsFound", string, IdentityReuseInput, NonReducibleUnknown, EventObject, MetaObject, {
129
129
  readonly id: "identityReuse";
130
130
  readonly initial: "idle";
131
131
  readonly context: ({ input }: {
package/dist/index.esm.js CHANGED
@@ -1,2 +1,2 @@
1
- import { i as reset, r as isConfigured, s as setup } from "./setup-6e71xCI7.esm.js";
1
+ import { i as reset, r as isConfigured, s as setup } from "./setup-CYKOne8r.esm.js";
2
2
  export { isConfigured, reset, setup };
@@ -1,3 +1,3 @@
1
1
  import { r as MandatoryConsentConfig } from "./types-9_esGTPj.js";
2
- import { a as MandatoryConsentActor, i as createMandatoryConsentManagerFromActor, n as MandatoryConsentState, o as mandatoryConsentMachine, r as createMandatoryConsentManager, t as MandatoryConsentManager } from "./mandatoryConsentManager-vhv1co_n.js";
2
+ import { a as MandatoryConsentActor, i as createMandatoryConsentManagerFromActor, n as MandatoryConsentState, o as mandatoryConsentMachine, r as createMandatoryConsentManager, t as MandatoryConsentManager } from "./mandatoryConsentManager-CbwP1sIp.js";
3
3
  export { type MandatoryConsentActor, type MandatoryConsentConfig, type MandatoryConsentManager, type MandatoryConsentState, createMandatoryConsentManager, createMandatoryConsentManagerFromActor, mandatoryConsentMachine };
@@ -72,7 +72,7 @@ declare const mandatoryConsentMachine: StateMachine<MandatoryConsentContext, {
72
72
  }>, {
73
73
  type: "canSubmit";
74
74
  params: unknown;
75
- }, never, "error" | "idle" | "closed" | "finished" | "submitting" | "loading" | "display", string, MandatoryConsentInput, NonReducibleUnknown, EventObject, MetaObject, {
75
+ }, never, "error" | "idle" | "closed" | "finished" | "loading" | "display" | "submitting", string, MandatoryConsentInput, NonReducibleUnknown, EventObject, MetaObject, {
76
76
  readonly id: "mandatoryConsent";
77
77
  readonly initial: "idle";
78
78
  readonly context: ({ input }: {