@incodetech/core 0.0.0-dev-20260928-e8e00ca9 → 0.0.0-dev-20260928-85249f77
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/dist/{BrowserDiagnosticsCryptoProvider-CglolaLX.esm.js → BrowserDiagnosticsCryptoProvider-BuzqvbhN.esm.js} +6 -24
- package/dist/{FaceDetectionProvider-ZWuTisXf.esm.js → FaceDetectionProvider-CSjiXOo7.esm.js} +7 -7
- package/dist/{MotionSensorProvider-Bti5f6op.esm.js → MotionSensorProvider-1Ul_1GPn.esm.js} +1 -1
- package/dist/ae-signature.esm.js +1 -1
- package/dist/{apiError-DqxsUXGC.esm.js → apiError-DmDlw1pl.esm.js} +1 -1
- package/dist/authentication.d.ts +2 -2
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-DgCLrxXN.esm.js → authenticationManager-B9l6NeDe.esm.js} +4 -4
- package/dist/{authenticationManager-B-MR_-Si.d.ts → authenticationManager-DE40FMUU.d.ts} +1 -1
- package/dist/{authenticationStateMachine-DECsoldb.esm.js → authenticationStateMachine-BGme0djA.esm.js} +3 -3
- package/dist/camera.esm.js +1 -1
- package/dist/consent.d.ts +1 -1
- package/dist/{consentManager-Cv_0QKLD.d.ts → consentManager-CTdFloVJ.d.ts} +1 -1
- package/dist/{createCameraCycleOwnership-BjoMVvya.esm.js → createCameraCycleOwnership-P1AtkhRJ.esm.js} +6 -1
- package/dist/{deepsightLoader-DidR7w-7.esm.js → deepsightLoader-BY2NIp7n.esm.js} +6 -6
- package/dist/document-capture.d.ts +1 -1
- package/dist/document-capture.esm.js +2 -2
- package/dist/{documentCaptureManager-CbAGkHWh.d.ts → documentCaptureManager-C8eO0hbv.d.ts} +1 -1
- package/dist/{documentCaptureManager-7e1RLKhG.esm.js → documentCaptureManager-DRAn04PI.esm.js} +1 -1
- package/dist/{documentCaptureStateMachine-DyJb_vDQ.esm.js → documentCaptureStateMachine-BS9VBtqN.esm.js} +2 -2
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-B5GSLZvO.esm.js → dynamicFormsManager-CTJzsDqC.esm.js} +1 -1
- package/dist/{dynamicFormsStateMachine-DAq-HoCA.esm.js → dynamicFormsStateMachine-8oOTouxq.esm.js} +1 -1
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-7ljnpTt2.esm.js → ekybManager-CKNCVYs7.esm.js} +1 -1
- package/dist/{ekybStateMachine-CD8oLnoa.esm.js → ekybStateMachine-BDQHv558.esm.js} +1 -1
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-r2Zci23-.esm.js → electronicSignatureManager-BbgLJk1x.esm.js} +1 -1
- package/dist/extensibility.d.ts +9 -9
- package/dist/extensibility.esm.js +12 -12
- package/dist/{faceCaptureManagerFactory-OSygJ72q.esm.js → faceCaptureManagerFactory-DG4z3rkR.esm.js} +3 -3
- package/dist/{faceCaptureManagerFactory-BgbP5N1j.d.ts → faceCaptureManagerFactory-s0Vhw_wP.d.ts} +80 -40
- package/dist/{faceCaptureSetup-DSvOibxj.esm.js → faceCaptureSetup-GzW2oNiM.esm.js} +261 -58
- package/dist/{feature-management-BhzWEsyZ.esm.js → feature-management-02JHuEhD.esm.js} +1 -1
- package/dist/feature-management.esm.js +1 -1
- package/dist/flow.esm.js +3 -3
- package/dist/{flowCompletionService-B-ri1Pvq.esm.js → flowCompletionService-BAg6qc6d.esm.js} +1 -1
- package/dist/{flowServices-C62Eyo7N.esm.js → flowServices-Dc-EUuwB.esm.js} +5 -5
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-BU4OLtRY.esm.js → geolocationManager-v0LZK1kW.esm.js} +1 -1
- package/dist/{geolocationStateMachine-D8UrSeXQ.esm.js → geolocationStateMachine-DfdsEj7L.esm.js} +1 -1
- package/dist/id-ocr.d.ts +1 -1
- package/dist/id-selfie-flow.esm.js +9 -10
- package/dist/id.d.ts +2 -2
- package/dist/id.esm.js +4 -4
- package/dist/{idCaptureDefaults-B6gkShby.esm.js → idCaptureDefaults-Ba-m1uO3.esm.js} +3 -3
- package/dist/{idCaptureManager-DIT7ZyEa.esm.js → idCaptureManager-Bfrj7DvH.esm.js} +6 -5
- package/dist/{idCaptureManager-poTdJI74.d.ts → idCaptureManager-DfHdJLmj.d.ts} +29 -5
- package/dist/{idCaptureServices-Cl67CI_t.esm.js → idCaptureServices-DKeVf0Gu.esm.js} +67 -12
- package/dist/{idCaptureStateMachine-BADMFRXg.esm.js → idCaptureStateMachine-BL3MnDOu.esm.js} +222 -77
- package/dist/{idOcrManager-DT3kPIB3.d.ts → idOcrManager-BTdHlJ9D.d.ts} +1 -1
- package/dist/identity-reuse.d.ts +1 -1
- package/dist/{identityReuseManager-x2QG6QAm.d.ts → identityReuseManager-D0-4bAeK.d.ts} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/mandatory-consent.d.ts +1 -1
- package/dist/{mandatoryConsentManager-DzIGk6u7.d.ts → mandatoryConsentManager-S94mjtTG.d.ts} +1 -1
- package/dist/{multipartRecordingService-Dw0scizg.esm.js → multipartRecordingService-mwKFTlhR.esm.js} +42 -1
- package/dist/{permissionGuards-DAyjPT2R.esm.js → permissionGuards-DS36X5Hh.esm.js} +1 -1
- package/dist/{permissionServices-DIaG8BlW.esm.js → permissionServices-B9IqVf3c.esm.js} +2 -2
- package/dist/qe-signature.esm.js +1 -1
- package/dist/{runChildModule-CoWvzHhB.esm.js → runChildModule-DQbERvPv.esm.js} +1 -1
- package/dist/{safeStorage-C511Hltw.esm.js → safeStorage-Q_iUpxa8.esm.js} +1 -1
- package/dist/{sdkVersion-sSFpdmZk.esm.js → sdkVersion-kGZmwBhf.esm.js} +1 -1
- package/dist/selfie.d.ts +2 -2
- package/dist/selfie.esm.js +7 -7
- package/dist/{selfieManager-Be-moOeO.esm.js → selfieManager-B-F-lrAH.esm.js} +4 -4
- package/dist/{selfieManager-oSsnyvBl.d.ts → selfieManager-PVc2k2Oq.d.ts} +1 -1
- package/dist/{selfieStateMachine-0bHX1R9_.esm.js → selfieStateMachine--KjoErrq.esm.js} +2 -2
- package/dist/{session-DjUhUWYA.esm.js → session-Bb5KuwEu.esm.js} +3 -3
- package/dist/session.esm.js +4 -4
- package/dist/{sessionInitializer-_BmsjkUB.esm.js → sessionInitializer-D-gzxDwN.esm.js} +4 -4
- package/dist/{setup-CHHZ8BBM.d.ts → setup-BdeKbA9K.d.ts} +4 -17
- package/dist/{setup-D7B4g7Jc.esm.js → setup-Cb7Ws1HA.esm.js} +8 -58
- package/dist/{tri-4RsGrIt6.esm.js → tri-xzRLIIMN.esm.js} +0 -10
- package/dist/tri.esm.js +1 -1
- package/dist/{trueSightService-Bb116pCE.esm.js → trueSightService-D8dk4ZID.esm.js} +16 -554
- package/dist/video-selfie.esm.js +5 -5
- package/dist/{videoSelfieCameraWarmer-CeZLd5w_.esm.js → videoSelfieCameraWarmer-CkdLS8NK.esm.js} +5 -5
- package/dist/{warmup-REsua-sF.esm.js → warmup-DLq_t-Zu.esm.js} +5 -0
- package/dist/wasm.d.ts +1 -1
- package/dist/wasm.esm.js +3 -3
- package/dist/{wasmDsFlagSync-Czjlp68o.esm.js → wasmDsFlagSync-DyNj8RY_.esm.js} +1 -1
- package/dist/workflow.esm.js +15 -15
- package/package.json +2 -7
- package/dist/FaceDetectionProvider-Di1DmZu1.d.ts +0 -36
- package/dist/StreamCanvasProcessingSession-CBnbTnOr.esm.js +0 -42
- package/dist/personhood.d.ts +0 -537
- package/dist/personhood.esm.js +0 -1574
- package/dist/types-CfuWgAi-.d.ts +0 -1
package/dist/id.esm.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as eventModuleNames } from "./events-ijlbX_Wx.esm.js";
|
|
2
2
|
import { i as assign, s as createActor } from "./xstate.esm-Bg3FuvIs.esm.js";
|
|
3
3
|
import { n as fromPromise } from "./xstate-actors.esm-Ccyzgxj1.esm.js";
|
|
4
|
-
import { a as isRedirectFlowType, c as createIdCaptureOnlyDeliveryActor, d as renderWallet, f as createDeviceWalletManager, h as resolveWalletPlatform, i as DIGITAL_ID_REGISTRY, l as createIdProtectedCaptureController, n as provideIdProtectedCaptureController, o as resolveDigitalIdImplementation, r as DIGITAL_ID_DOCUMENT_TYPES, s as attachIdProtectedCaptureController, t as idCaptureMachine } from "./idCaptureStateMachine-
|
|
5
|
-
import { n as createIdCaptureActor, r as createIdCaptureManagerFromActor, t as createIdCaptureManager } from "./idCaptureManager-
|
|
6
|
-
import { _ as
|
|
4
|
+
import { a as isRedirectFlowType, c as createIdCaptureOnlyDeliveryActor, d as renderWallet, f as createDeviceWalletManager, h as resolveWalletPlatform, i as DIGITAL_ID_REGISTRY, l as createIdProtectedCaptureController, n as provideIdProtectedCaptureController, o as resolveDigitalIdImplementation, r as DIGITAL_ID_DOCUMENT_TYPES, s as attachIdProtectedCaptureController, t as idCaptureMachine } from "./idCaptureStateMachine-BL3MnDOu.esm.js";
|
|
5
|
+
import { n as createIdCaptureActor, r as createIdCaptureManagerFromActor, t as createIdCaptureManager } from "./idCaptureManager-Bfrj7DvH.esm.js";
|
|
6
|
+
import { _ as ID_ERROR_CODES, a as getRealQualityValue, b as resolveIdCaptureThresholds, c as pauseRecordingForAttempt, d as resumeRecordingAfterPause, f as startRecordingSession, g as validateUploadResponse, h as uploadIdImage, i as finalizeRecordingSession, l as prepareRecordingForCameraRetry, m as stopStream, n as barcodeToBase64, o as initializeIdCapture, p as stopRecording, r as disposeRecordingSession, s as isSuspendableRecordingSession, t as addBarcode, u as processId } from "./idCaptureServices-DKeVf0Gu.esm.js";
|
|
7
7
|
import { t as invokeOnCaptureCallback } from "./invokeOnCaptureCallback-BjzPjJ_p.esm.js";
|
|
8
8
|
//#region src/modules/id/deviceWallet/deviceWalletErrors.ts
|
|
9
9
|
/**
|
|
@@ -212,4 +212,4 @@ function createIdCaptureOnlyManager(options) {
|
|
|
212
212
|
return createIdCaptureOnlyManagerFromActor(createIdCaptureOnlyActor(options), options.config);
|
|
213
213
|
}
|
|
214
214
|
//#endregion
|
|
215
|
-
export { DEVICE_WALLET_ERROR_KEYS, DIGITAL_ID_DOCUMENT_TYPES, DIGITAL_ID_REGISTRY, ID_ERROR_CODES, addBarcode, barcodeToBase64, createDeviceWalletManager, createIdCaptureActor, createIdCaptureManager, createIdCaptureOnlyActor, createIdCaptureOnlyManager, createIdCaptureOnlyManagerFromActor, disposeRecordingSession, finalizeRecordingSession, getRealQualityValue, idCaptureMachine, idCaptureOnlyMachine, initializeIdCapture, isRedirectFlowType, pauseRecordingForAttempt, prepareRecordingForCameraRetry, processId, renderWallet, resolveDigitalIdImplementation, resolveWalletPlatform, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
|
|
215
|
+
export { DEVICE_WALLET_ERROR_KEYS, DIGITAL_ID_DOCUMENT_TYPES, DIGITAL_ID_REGISTRY, ID_ERROR_CODES, addBarcode, barcodeToBase64, createDeviceWalletManager, createIdCaptureActor, createIdCaptureManager, createIdCaptureOnlyActor, createIdCaptureOnlyManager, createIdCaptureOnlyManagerFromActor, disposeRecordingSession, finalizeRecordingSession, getRealQualityValue, idCaptureMachine, idCaptureOnlyMachine, initializeIdCapture, isRedirectFlowType, isSuspendableRecordingSession, pauseRecordingForAttempt, prepareRecordingForCameraRetry, processId, renderWallet, resolveDigitalIdImplementation, resolveWalletPlatform, resumeRecordingAfterPause, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { b as resolveWasmSource, p as WASM_MODEL_FILES } from "./wasmWebClient-DPPQlS-U.esm.js";
|
|
2
|
-
import {
|
|
3
|
-
import { s as wasmRuntime, t as getResolvedModelSource } from "./warmup-
|
|
4
|
-
import { i as BaseWasmProvider } from "./safeStorage-
|
|
2
|
+
import { E as getBarcodeEnhanceModelUrl } from "./trueSightService-D8dk4ZID.esm.js";
|
|
3
|
+
import { s as wasmRuntime, t as getResolvedModelSource } from "./warmup-DLq_t-Zu.esm.js";
|
|
4
|
+
import { i as BaseWasmProvider } from "./safeStorage-Q_iUpxa8.esm.js";
|
|
5
5
|
import { t as IncodeCanvas } from "./canvas-BxFzWTt-.esm.js";
|
|
6
6
|
//#region ../infra/src/wasm/idCaptureWasmApi.ts
|
|
7
7
|
var IdCaptureWasmApi = class {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { l as BrowserStorageProvider } from "./setup-
|
|
1
|
+
import { l as BrowserStorageProvider } from "./setup-Cb7Ws1HA.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-Bg3FuvIs.esm.js";
|
|
5
|
-
import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-
|
|
5
|
+
import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-DyNj8RY_.esm.js";
|
|
6
6
|
import { t as BrowserVisibilityObserverProvider } from "./BrowserVisibilityObserverProvider-BrJN1B8A.esm.js";
|
|
7
|
-
import { c as resetWasmMotionPrimedForModule, o as requiresMotionPermissionUserGesture, r as primeMotionFromUserGestureIfNeeded } from "./permissionServices-
|
|
7
|
+
import { c as resetWasmMotionPrimedForModule, o as requiresMotionPermissionUserGesture, r as primeMotionFromUserGestureIfNeeded } from "./permissionServices-B9IqVf3c.esm.js";
|
|
8
8
|
import { t as getDeviceClass } from "./getDeviceClass-5NYZg9s6.esm.js";
|
|
9
|
-
import { l as createIdProtectedCaptureController, m as mapDeviceWalletScreenName, n as provideIdProtectedCaptureController, p as BrowserDigitalCredentialsProvider, t as idCaptureMachine, u as findIdProtectedCaptureController } from "./idCaptureStateMachine-
|
|
10
|
-
import {
|
|
9
|
+
import { l as createIdProtectedCaptureController, m as mapDeviceWalletScreenName, n as provideIdProtectedCaptureController, p as BrowserDigitalCredentialsProvider, t as idCaptureMachine, u as findIdProtectedCaptureController } from "./idCaptureStateMachine-BL3MnDOu.esm.js";
|
|
10
|
+
import { b as resolveIdCaptureThresholds, v as resolveCaptureOptimizingTreatment, y as resolveCountdownStepMs } from "./idCaptureServices-DKeVf0Gu.esm.js";
|
|
11
11
|
//#region src/modules/id/digitalUpload/instrumentation.ts
|
|
12
12
|
const TERMINAL_REASONS = /* @__PURE__ */ new Set(["DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED", "ID_TYPE_UNACCEPTABLE"]);
|
|
13
13
|
function isHoldingState(value) {
|
|
@@ -214,6 +214,7 @@ function mapCaptureState(snapshot, context, presentationStream) {
|
|
|
214
214
|
selectedDocumentType: getEffectiveSelectedDocumentType(context),
|
|
215
215
|
tutorialEnabled: context.config.showTutorial === true,
|
|
216
216
|
counterValue: context.counterValue,
|
|
217
|
+
countdownStepMs: resolveCountdownStepMs(context.config),
|
|
217
218
|
orientation: context.orientation,
|
|
218
219
|
idType: context.idType,
|
|
219
220
|
previewImageUrl: context.previewImageUrl,
|
|
@@ -8,7 +8,6 @@ import { a as RegulationTypes } from "./types-BuR0sro5.js";
|
|
|
8
8
|
import { n as VirtualCameraCheckOutput, r as WasmUtilConfig, t as IWasmUtilCapability } from "./IWasmUtilCapability-VC40Kx9N.js";
|
|
9
9
|
import { n as PermissionStatus } from "./types-BEwVKkLJ.js";
|
|
10
10
|
import { t as BaseWasmProvider } from "./BaseWasmProvider-BL9wIRnN.js";
|
|
11
|
-
import "./types-CfuWgAi-.js";
|
|
12
11
|
import { n as DeepsightService } from "./StreamCanvasCapture-CeBBJ_RC.js";
|
|
13
12
|
import { t as CameraStream } from "./camera-9wWD-pwg.js";
|
|
14
13
|
import { i as Pdf417DecodeResult, n as IIdCaptureCapability, t as DetectionOrientation } from "./IIdCaptureCapability-DBsv9-7M.js";
|
|
@@ -123,15 +122,34 @@ type StartRecordingParams = {
|
|
|
123
122
|
declare function startRecordingSession(params: StartRecordingParams): Promise<object | undefined>;
|
|
124
123
|
declare function pauseRecordingForAttempt(session: object): void;
|
|
125
124
|
declare function prepareRecordingForCameraRetry(session: object): void;
|
|
125
|
+
/**
|
|
126
|
+
* Resumes a recording paused with `pauseRecordingForAttempt` while its camera
|
|
127
|
+
* clone is still attached (no source replacement pending). Returns whether the
|
|
128
|
+
* recorder is recording again.
|
|
129
|
+
*/
|
|
130
|
+
declare function resumeRecordingAfterPause(session: object): boolean;
|
|
131
|
+
/**
|
|
132
|
+
* True only for a live SDK-managed multipart session. A session that has
|
|
133
|
+
* already been finalized or disposed is no longer in the registry, so callers
|
|
134
|
+
* use this to avoid resuming or re-pausing a torn-down recording.
|
|
135
|
+
*/
|
|
136
|
+
declare function isSuspendableRecordingSession(session: object): boolean;
|
|
126
137
|
type FinalizedIdRecording = Readonly<{
|
|
127
138
|
recordingId?: string | null;
|
|
128
139
|
}>;
|
|
129
140
|
/**
|
|
130
|
-
*
|
|
131
|
-
*
|
|
141
|
+
* Completes an ID recording: drains the multipart upload and releases the
|
|
142
|
+
* compositor. The camera clone ends synchronously, before this function
|
|
143
|
+
* returns its promise, so a step that ends mid-attempt never pins the camera
|
|
144
|
+
* while the upload finishes (ENG-56648). The composite canvas stays alive until
|
|
145
|
+
* the recorder has emitted its final chunk.
|
|
132
146
|
*/
|
|
133
147
|
declare function finalizeRecordingSession(session: object): Promise<FinalizedIdRecording>;
|
|
134
|
-
/**
|
|
148
|
+
/**
|
|
149
|
+
* Teardown for an attempt released before finalization. The camera clone ends
|
|
150
|
+
* synchronously, before this function returns; the upload completes in the
|
|
151
|
+
* background with whatever was recorded.
|
|
152
|
+
*/
|
|
135
153
|
declare function disposeRecordingSession(session: object): void;
|
|
136
154
|
declare function stopRecording(session: object): void;
|
|
137
155
|
declare function processId(isSecondId?: boolean, queueName?: string, signal?: AbortSignal): Promise<{
|
|
@@ -455,6 +473,12 @@ type IdCaptureCaptureState = {
|
|
|
455
473
|
/** `config.showTutorial` — whether this camera path was configured with a tutorial. */
|
|
456
474
|
tutorialEnabled: boolean;
|
|
457
475
|
counterValue: number;
|
|
476
|
+
/**
|
|
477
|
+
* Milliseconds between `counterValue` steps (3 → 2 → 1 → 0) in the
|
|
478
|
+
* auto-capture countdown. Lets a renderer run the whole countdown from its
|
|
479
|
+
* first value, without waiting for each `counterValue` update.
|
|
480
|
+
*/
|
|
481
|
+
countdownStepMs: number;
|
|
458
482
|
orientation: DetectionOrientation | undefined;
|
|
459
483
|
idType: string | undefined;
|
|
460
484
|
previewImageUrl?: string;
|
|
@@ -741,4 +765,4 @@ declare function createIdCaptureManager(options: CreateIdCaptureActorOptions): M
|
|
|
741
765
|
deviceWalletUseAnotherMethod(): void;
|
|
742
766
|
};
|
|
743
767
|
//#endregion
|
|
744
|
-
export { barcodeToBase64 as A,
|
|
768
|
+
export { barcodeToBase64 as A, startRecordingSession as B, FinalizedIdRecording as C, UploadIdImageParams as D, StartRecordingParams as E, isSuspendableRecordingSession as F, WasmUtilProvider as G, stopStream as H, pauseRecordingForAttempt as I, prepareRecordingForCameraRetry as L, finalizeRecordingSession as M, getRealQualityValue as N, ValidationError as O, initializeIdCapture as P, processId as R, AddBarcodeParams as S, InitializeIdCaptureParams as T, uploadIdImage as U, stopRecording as V, validateUploadResponse as W, CreateIdCaptureActorOptions as _, RenderWalletError as a, IdCaptureMachine as b, DeviceWalletManager as c, CreateDeviceWalletActorOptions as d, CreateIdCaptureOnlyActorOptions as f, idCaptureOnlyMachine as g, IdCaptureOnlyMachine as h, createIdCaptureManagerFromActor as i, disposeRecordingSession as j, addBarcode as k, DeviceWalletState as l, createIdCaptureOnlyActor as m, IdCaptureManager as n, RenderWalletParams as o, IdCaptureOnlyActor as p, IdCaptureState as r, renderWallet as s, createIdCaptureManager as t, createDeviceWalletManager as u, IdCaptureActor as v, IdCaptureInitResult as w, idCaptureMachine as x, createIdCaptureActor as y, resumeRecordingAfterPause as z };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { t as ensureWasmPipelines } from "./setup-
|
|
2
|
-
import { i as numberParam, n as defineExperimentParams, t as booleanParam, u as resolveExperimentOnce } from "./feature-management-
|
|
1
|
+
import { t as ensureWasmPipelines } from "./setup-Cb7Ws1HA.esm.js";
|
|
2
|
+
import { i as numberParam, n as defineExperimentParams, t as booleanParam, u as resolveExperimentOnce } from "./feature-management-02JHuEhD.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";
|
|
6
6
|
import { i as assign, t as setup } from "./xstate.esm-Bg3FuvIs.esm.js";
|
|
7
7
|
import { n as fromPromise } from "./xstate-actors.esm-Ccyzgxj1.esm.js";
|
|
8
|
-
import { l as queryCameraPermission } from "./permissionServices-
|
|
8
|
+
import { l as queryCameraPermission } from "./permissionServices-B9IqVf3c.esm.js";
|
|
9
|
+
import { i as createRecordingCompositor, n as WorkerEncoderRecordingProvider, t as MultipartRecordingService } from "./multipartRecordingService-mwKFTlhR.esm.js";
|
|
9
10
|
import { n as getBackCameraStream, o as isBackFacingTrack } from "./backCameraStream-CMvXj4X4.esm.js";
|
|
10
11
|
import { t as getDeviceClass } from "./getDeviceClass-5NYZg9s6.esm.js";
|
|
11
|
-
import {
|
|
12
|
-
import { n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider } from "./idCaptureDefaults-B6gkShby.esm.js";
|
|
12
|
+
import { n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider } from "./idCaptureDefaults-Ba-m1uO3.esm.js";
|
|
13
13
|
//#region src/internal/camera/cameraServices.ts
|
|
14
14
|
function createCameraServices(camera) {
|
|
15
15
|
return {
|
|
@@ -293,6 +293,14 @@ function resolveAutocaptureTimeout(config) {
|
|
|
293
293
|
return config.thresholds?.autocaptureTimeout ?? (config.autoCaptureTimeout ?? 5) * 1e3;
|
|
294
294
|
}
|
|
295
295
|
/**
|
|
296
|
+
* Time between the countdown values 3 → 2 → 1 → 0: a third of the resolved
|
|
297
|
+
* aggregation window. The actor's countdown timers and the UI's CSS countdown
|
|
298
|
+
* both read this, so they cannot drift apart.
|
|
299
|
+
*/
|
|
300
|
+
function resolveCountdownStepMs(config) {
|
|
301
|
+
return (config.thresholds?.framesAggregationInterval ?? DEFAULT_ID_CAPTURE_THRESHOLDS.framesAggregationInterval) / 3;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
296
304
|
* Resolves the IDC-05 arm and, for the treatment, the two halves of the capture
|
|
297
305
|
* window. Precedence:
|
|
298
306
|
*
|
|
@@ -577,6 +585,7 @@ function createMultipartSessionHandle(service, compositor, recordingSource) {
|
|
|
577
585
|
needsVideoSourceReplacement: false,
|
|
578
586
|
recorderPaused: false,
|
|
579
587
|
recordingSource,
|
|
588
|
+
audioSource: recordingSource.getAudioTracks(),
|
|
580
589
|
service
|
|
581
590
|
});
|
|
582
591
|
return session;
|
|
@@ -621,21 +630,62 @@ function prepareRecordingForCameraRetry(session) {
|
|
|
621
630
|
const multipartSession = multipartIdSessions.get(session);
|
|
622
631
|
if (!multipartSession) return;
|
|
623
632
|
if (!multipartSession.recorderPaused) multipartSession.recorderPaused = multipartSession.service.pause();
|
|
624
|
-
multipartSession
|
|
625
|
-
multipartSession.recordingSource.getVideoTracks().forEach((track) => track.stop());
|
|
633
|
+
releaseCameraClone(multipartSession, { keepAudio: true });
|
|
626
634
|
multipartSession.needsVideoSourceReplacement = true;
|
|
627
635
|
}
|
|
628
636
|
/**
|
|
629
|
-
*
|
|
630
|
-
*
|
|
637
|
+
* Resumes a recording paused with `pauseRecordingForAttempt` while its camera
|
|
638
|
+
* clone is still attached (no source replacement pending). Returns whether the
|
|
639
|
+
* recorder is recording again.
|
|
640
|
+
*/
|
|
641
|
+
function resumeRecordingAfterPause(session) {
|
|
642
|
+
const multipartSession = multipartIdSessions.get(session);
|
|
643
|
+
if (!multipartSession || multipartSession.needsVideoSourceReplacement) return false;
|
|
644
|
+
if (!multipartSession.recorderPaused) return true;
|
|
645
|
+
if (!multipartSession.service.resume()) return false;
|
|
646
|
+
multipartSession.recorderPaused = false;
|
|
647
|
+
return true;
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* True only for a live SDK-managed multipart session. A session that has
|
|
651
|
+
* already been finalized or disposed is no longer in the registry, so callers
|
|
652
|
+
* use this to avoid resuming or re-pausing a torn-down recording.
|
|
653
|
+
*/
|
|
654
|
+
function isSuspendableRecordingSession(session) {
|
|
655
|
+
return multipartIdSessions.has(session);
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* Ends the compositor's camera clone on the calling thread. The composite
|
|
659
|
+
* stream and its upload stay alive; only the tracks that pin the physical
|
|
660
|
+
* camera end. `keepAudio` preserves the compositor's audio track across a
|
|
661
|
+
* video-source swap. Every release path must call this before any async work
|
|
662
|
+
* so no camera clone can overlap a PRC or POC camera switch (ENG-47407) or pin
|
|
663
|
+
* the device for the next module (ENG-56648).
|
|
664
|
+
*/
|
|
665
|
+
function releaseCameraClone(multipartSession, options) {
|
|
666
|
+
try {
|
|
667
|
+
multipartSession.compositor.pause();
|
|
668
|
+
} catch {}
|
|
669
|
+
const tracks = options.keepAudio ? multipartSession.recordingSource.getVideoTracks() : /* @__PURE__ */ new Set([...multipartSession.recordingSource.getTracks(), ...multipartSession.audioSource]);
|
|
670
|
+
for (const track of tracks) try {
|
|
671
|
+
track.stop();
|
|
672
|
+
} catch {}
|
|
673
|
+
}
|
|
674
|
+
/**
|
|
675
|
+
* Completes an ID recording: drains the multipart upload and releases the
|
|
676
|
+
* compositor. The camera clone ends synchronously, before this function
|
|
677
|
+
* returns its promise, so a step that ends mid-attempt never pins the camera
|
|
678
|
+
* while the upload finishes (ENG-56648). The composite canvas stays alive until
|
|
679
|
+
* the recorder has emitted its final chunk.
|
|
631
680
|
*/
|
|
632
681
|
async function finalizeRecordingSession(session) {
|
|
633
682
|
const existing = idRecordingFinalizations.get(session);
|
|
634
683
|
if (existing) return existing;
|
|
635
684
|
const multipartSession = multipartIdSessions.get(session);
|
|
636
685
|
if (!multipartSession) return {};
|
|
686
|
+
multipartIdSessions.delete(session);
|
|
687
|
+
releaseCameraClone(multipartSession, { keepAudio: false });
|
|
637
688
|
const finalization = (async () => {
|
|
638
|
-
multipartIdSessions.delete(session);
|
|
639
689
|
try {
|
|
640
690
|
return await multipartSession.service.stop();
|
|
641
691
|
} finally {
|
|
@@ -645,11 +695,16 @@ async function finalizeRecordingSession(session) {
|
|
|
645
695
|
idRecordingFinalizations.set(session, finalization);
|
|
646
696
|
return finalization;
|
|
647
697
|
}
|
|
648
|
-
/**
|
|
698
|
+
/**
|
|
699
|
+
* Teardown for an attempt released before finalization. The camera clone ends
|
|
700
|
+
* synchronously, before this function returns; the upload completes in the
|
|
701
|
+
* background with whatever was recorded.
|
|
702
|
+
*/
|
|
649
703
|
function disposeRecordingSession(session) {
|
|
650
704
|
const multipartSession = multipartIdSessions.get(session);
|
|
651
705
|
if (multipartSession) {
|
|
652
706
|
multipartIdSessions.delete(session);
|
|
707
|
+
releaseCameraClone(multipartSession, { keepAudio: false });
|
|
653
708
|
const finalization = multipartSession.service.stop().finally(() => multipartSession.compositor.stop());
|
|
654
709
|
idRecordingFinalizations.set(session, finalization);
|
|
655
710
|
finalization.catch(() => {});
|
|
@@ -706,4 +761,4 @@ async function addBarcode(params) {
|
|
|
706
761
|
return res.data;
|
|
707
762
|
}
|
|
708
763
|
//#endregion
|
|
709
|
-
export {
|
|
764
|
+
export { getIdCameraStream as C, OPTIMIZING_WATCHDOG_MARGIN_MS as S, ID_ERROR_CODES as _, getRealQualityValue as a, resolveIdCaptureThresholds as b, pauseRecordingForAttempt as c, resumeRecordingAfterPause as d, startRecordingSession as f, validateUploadResponse as g, uploadIdImage as h, finalizeRecordingSession as i, prepareRecordingForCameraRetry as l, stopStream as m, barcodeToBase64 as n, initializeIdCapture as o, stopRecording as p, disposeRecordingSession as r, isSuspendableRecordingSession as s, addBarcode as t, processId as u, resolveCaptureOptimizingTreatment as v, CAPTURE_OPTIMIZING as x, resolveCountdownStepMs as y };
|