@incodetech/core 2.3.0-rc.0 → 2.3.0-rc.10
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-C_9o3L2L.esm.js → BrowserDiagnosticsCryptoProvider-BuzqvbhN.esm.js} +6 -24
- package/dist/{FaceDetectionProvider-DTetAE8H.esm.js → FaceDetectionProvider-BZYHujqz.esm.js} +10 -55
- package/dist/{IWasmUtilCapability-CXXDA5l1.d.ts → IWasmUtilCapability-CNWRl7jr.d.ts} +1 -43
- package/dist/{MotionSensorProvider-BgTYwg9L.esm.js → MotionSensorProvider-DyhbM4Si.esm.js} +1 -1
- package/dist/{StreamCanvasCapture-B3YT2Bt6.d.ts → StreamCanvasCapture-_8gdW5Lk.d.ts} +1 -1
- package/dist/{addressSearch-BRSu_aGA.esm.js → addressSearch-DyHGgeX8.esm.js} +1 -1
- package/dist/ae-signature.esm.js +1 -1
- package/dist/antifraud.esm.js +2 -2
- package/dist/{antifraudManager-Bg9ynGum.esm.js → antifraudManager-DNkw66oW.esm.js} +1 -1
- package/dist/{antifraudStateMachine-BHxehiJZ.esm.js → antifraudStateMachine-DBeq47D2.esm.js} +1 -1
- package/dist/{apiError-D0v5hFyN.esm.js → apiError-iTFZ5fiI.esm.js} +1 -1
- package/dist/authentication.d.ts +3 -3
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-DXTIUcma.d.ts → authenticationManager-B23V74p7.d.ts} +1 -1
- package/dist/{authenticationManager-C4B4-29g.esm.js → authenticationManager-D22ju23T.esm.js} +4 -4
- package/dist/{authenticationStateMachine-DJ0zUm-A.esm.js → authenticationStateMachine-TyFaCegB.esm.js} +3 -3
- package/dist/{backCameraStream-BOtyQowf.esm.js → backCameraStream-B0-YgP_y.esm.js} +1 -0
- package/dist/camera.esm.js +1 -1
- package/dist/certificate-issuance.esm.js +2 -2
- package/dist/{certificateIssuanceManager-Bfvkq7Cy.esm.js → certificateIssuanceManager-C3-CI0_s.esm.js} +1 -1
- package/dist/{certificateIssuanceStateMachine-BBD5h8c4.esm.js → certificateIssuanceStateMachine-CxqS_nD-.esm.js} +1 -1
- package/dist/consent.esm.js +2 -2
- package/dist/{consentManager-B5Vqdez-.esm.js → consentManager-B6E1XJDw.esm.js} +1 -1
- package/dist/{consentStateMachine-DbUmqWgV.esm.js → consentStateMachine-DTSfdGiW.esm.js} +1 -1
- package/dist/{createCameraCycleOwnership-DQ5-F2oW.esm.js → createCameraCycleOwnership-DnwTl1ad.esm.js} +7 -2
- package/dist/cross-document-data-match.esm.js +1 -1
- package/dist/{crossDocumentDataMatchManager-QMOGwHXR.esm.js → crossDocumentDataMatchManager-9XhFVZ5S.esm.js} +1 -1
- package/dist/curp-validation.esm.js +2 -2
- package/dist/{curpValidationManager-D1ppROcF.esm.js → curpValidationManager-DbIMYFcJ.esm.js} +1 -1
- package/dist/{curpValidationStateMachine-DvUPC_8S.esm.js → curpValidationStateMachine-g5kMfuLj.esm.js} +1 -1
- package/dist/custom-fields.esm.js +1 -1
- package/dist/custom-watchlist.esm.js +2 -2
- package/dist/{customFieldsManager-2j_PBq4U.esm.js → customFieldsManager-CzWZTkW-.esm.js} +1 -1
- package/dist/{customWatchlistManager-DUVrEdw9.esm.js → customWatchlistManager-DWTED5Ur.esm.js} +1 -1
- package/dist/{customWatchlistStateMachine-qZVgkKgP.esm.js → customWatchlistStateMachine-DOQou6TW.esm.js} +1 -1
- package/dist/{deepsightLoader-Dm7ejW4v.esm.js → deepsightLoader-DamOBrBJ.esm.js} +7 -7
- package/dist/document-capture.d.ts +1 -1
- package/dist/document-capture.esm.js +2 -2
- package/dist/{documentCaptureManager-DR_Wv-3H.esm.js → documentCaptureManager-BRPxqYD2.esm.js} +1 -1
- package/dist/{documentCaptureManager-DensIj5F.d.ts → documentCaptureManager-lEtCM320.d.ts} +14 -0
- package/dist/{documentCaptureStateMachine-CWOATHfE.esm.js → documentCaptureStateMachine-D312sSIu.esm.js} +14 -9
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-Dt98SDfV.esm.js → dynamicFormsManager-DKgiusbF.esm.js} +1 -1
- package/dist/{dynamicFormsStateMachine-obKr4IIp.esm.js → dynamicFormsStateMachine-BV8yR5iN.esm.js} +2 -2
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-DNZKrKF3.esm.js → ekybManager-8VUBu8VW.esm.js} +1 -1
- package/dist/{ekybStateMachine-DjhHQXZ8.esm.js → ekybStateMachine-Bnsefu9M.esm.js} +3 -3
- package/dist/ekyc.esm.js +2 -2
- package/dist/{ekycManager-CmQBpeiI.esm.js → ekycManager-BlQ-Qj4E.esm.js} +1 -1
- package/dist/{ekycStateMachine-CmdW2gVm.esm.js → ekycStateMachine-CshSNJhh.esm.js} +2 -2
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-DzulxM4_.esm.js → electronicSignatureManager--YFXVldr.esm.js} +2 -2
- package/dist/email.esm.js +2 -2
- package/dist/{emailManager-B5ek_UfM.esm.js → emailManager-bR1N5rV_.esm.js} +1 -1
- package/dist/{emailStateMachine-CyPFZ7dW.esm.js → emailStateMachine-Bc_6oIYw.esm.js} +1 -1
- package/dist/{endpoints-D3B9mUHh.esm.js → endpoints-B-3Q-LUw.esm.js} +0 -3
- package/dist/extensibility.d.ts +9 -9
- package/dist/extensibility.esm.js +34 -34
- package/dist/face-match.esm.js +2 -2
- package/dist/{faceCaptureManagerFactory-pCmG4MeF.esm.js → faceCaptureManagerFactory-Bk6pVs6E.esm.js} +3 -3
- package/dist/{faceCaptureManagerFactory-CvtqcLxs.d.ts → faceCaptureManagerFactory-DMLstvui.d.ts} +84 -45
- package/dist/{faceCaptureSetup-BSextack.esm.js → faceCaptureSetup-CGQDK97m.esm.js} +283 -100
- package/dist/{faceMatchManager-Caal2zyV.esm.js → faceMatchManager-Bmv0HzuY.esm.js} +1 -1
- package/dist/{faceMatchStateMachine-BUc5FXYy.esm.js → faceMatchStateMachine-mRIHQ3dA.esm.js} +1 -1
- package/dist/{feature-management-B0sGlozZ.esm.js → feature-management-C8OAO_CZ.esm.js} +1 -1
- package/dist/feature-management.esm.js +1 -1
- package/dist/field-comparison.esm.js +1 -1
- package/dist/{fieldComparisonManager-BIs6HPJG.esm.js → fieldComparisonManager-CC-klG0h.esm.js} +1 -1
- package/dist/fiscal-qr.d.ts +1 -1
- package/dist/fiscal-qr.esm.js +1 -1
- package/dist/{fiscalQrManager-CHcBJwUM.d.ts → fiscalQrManager-B1STmT6z.d.ts} +4 -1
- package/dist/{fiscalQrManager-Bp_-3LJr.esm.js → fiscalQrManager-DbCVMIBx.esm.js} +17 -5
- package/dist/flow.d.ts +2 -2
- package/dist/flow.esm.js +3 -3
- package/dist/{flowCompletionService-CLtbWhSK.esm.js → flowCompletionService-C0zcPnqK.esm.js} +2 -2
- package/dist/{flowServices-B5FwukTQ.esm.js → flowServices-G1FDrkLd.esm.js} +6 -6
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-DIw-xq9a.esm.js → geolocationManager-DNixQOgf.esm.js} +1 -1
- package/dist/{geolocationStateMachine-DpG0TFOU.esm.js → geolocationStateMachine-D1aZJ6eR.esm.js} +2 -2
- package/dist/government-validation.esm.js +2 -2
- package/dist/{governmentValidationManager-TjC9iVjH.esm.js → governmentValidationManager-CacFOtKO.esm.js} +1 -1
- package/dist/{governmentValidationStateMachine-D1ZnEqdd.esm.js → governmentValidationStateMachine-CoaZOSTP.esm.js} +1 -1
- package/dist/id-ocr.esm.js +2 -2
- package/dist/id-selfie-flow.d.ts +1 -1
- package/dist/id-selfie-flow.esm.js +10 -10
- package/dist/id-verification.esm.js +2 -2
- package/dist/id.d.ts +3 -3
- package/dist/id.esm.js +4 -4
- package/dist/{idCaptureDefaults-BcxjQDI3.esm.js → idCaptureDefaults-sJahGQgV.esm.js} +4 -206
- package/dist/{idCaptureManager-Vby8oYqh.esm.js → idCaptureManager-B8lo-ksK.esm.js} +5 -5
- package/dist/{idCaptureManager-CvmHOWWd.d.ts → idCaptureManager-BaHEyQyr.d.ts} +33 -16
- package/dist/{idCaptureServices-CJIxD9ep.esm.js → idCaptureServices-DLqls7Xv.esm.js} +71 -122
- package/dist/{idCaptureStateMachine-CmqihkUy.esm.js → idCaptureStateMachine-CCPGFPRF.esm.js} +226 -91
- package/dist/{idOcrManager-DHU22hVn.esm.js → idOcrManager-r46XfZGE.esm.js} +1 -1
- package/dist/{idOcrStateMachine-33UvRAHE.esm.js → idOcrStateMachine-ClDEP-VI.esm.js} +1 -1
- package/dist/{idVerificationManager-CyaixD0D.esm.js → idVerificationManager-DT42c77H.esm.js} +1 -1
- package/dist/{idVerificationStateMachine-BPGrQZEm.esm.js → idVerificationStateMachine-DbDVIh9t.esm.js} +1 -1
- package/dist/identity-reuse.esm.js +2 -2
- package/dist/{identityReuseManager-CWaNHBO3.esm.js → identityReuseManager-yG3acUrQ.esm.js} +1 -1
- package/dist/{identityReuseStateMachine-CQgnATo5.esm.js → identityReuseStateMachine-BhAkuIra.esm.js} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/mandatory-consent.esm.js +2 -2
- package/dist/{mandatoryConsentManager-Du-m-tZ_.esm.js → mandatoryConsentManager-7dI0D08q.esm.js} +1 -1
- package/dist/{mandatoryConsentStateMachine-DSDAk7WZ.esm.js → mandatoryConsentStateMachine-DC5Mo6M1.esm.js} +1 -1
- package/dist/{multipartRecordingService-B3C_zlev.esm.js → multipartRecordingService-YKu0Bd7S.esm.js} +496 -3
- package/dist/{permissionGuards-uYZYFu4J.esm.js → permissionGuards-D6TfVop2.esm.js} +1 -1
- package/dist/{permissionServices-Bj_fyWtv.esm.js → permissionServices-EY3_Vx6c.esm.js} +2 -2
- package/dist/phone.esm.js +2 -2
- package/dist/{phoneManager-N1-sbrY4.esm.js → phoneManager-IjhSv5XS.esm.js} +1 -1
- package/dist/{phoneStateMachine-jl8LJKCo.esm.js → phoneStateMachine-CXdXufKg.esm.js} +1 -1
- package/dist/qe-signature.esm.js +1 -1
- package/dist/redirect-to-mobile.esm.js +2 -2
- package/dist/{redirectToMobileManager-DsFzdTwA.esm.js → redirectToMobileManager-FLEWJtv8.esm.js} +1 -1
- package/dist/{redirectToMobileStateMachine-v3otpT-L.esm.js → redirectToMobileStateMachine-CSWWgUTO.esm.js} +1 -1
- package/dist/{runChildModule-TuyGE00X.esm.js → runChildModule-B3Z4iJnG.esm.js} +1 -1
- package/dist/{safeStorage-B-trhxg6.esm.js → safeStorage-BdU9_m2E.esm.js} +1 -1
- package/dist/{sdkVersion-CLxKvdyz.esm.js → sdkVersion-CD9fJC2Y.esm.js} +1 -1
- package/dist/selfie.d.ts +4 -4
- package/dist/selfie.esm.js +8 -8
- package/dist/{selfieErrorUtils-C77GXJH6.esm.js → selfieErrorUtils-UiQ46EBa.esm.js} +2 -2
- package/dist/{selfieManager-D1KRJ39M.d.ts → selfieManager-CDCTOrcg.d.ts} +1 -1
- package/dist/{selfieManager-CihVnODO.esm.js → selfieManager-DzOPNipB.esm.js} +4 -4
- package/dist/{selfieStateMachine-fwMmNtOi.esm.js → selfieStateMachine-CidiobBW.esm.js} +4 -4
- package/dist/{session-BHIeAamR.esm.js → session-BABCfUhC.esm.js} +4 -4
- package/dist/session.esm.js +4 -4
- package/dist/{sessionInitializer-BLoK7SP9.esm.js → sessionInitializer-BK5NjMe0.esm.js} +6 -6
- package/dist/{setup-Cv-JM9QC.d.ts → setup-Cyko6cAn.d.ts} +6 -18
- package/dist/{setup-msLybMbC.esm.js → setup-D4YCSH31.esm.js} +14 -202
- package/dist/signature.esm.js +2 -2
- package/dist/{signatureManager-ChsB-nMD.esm.js → signatureManager-B72np4ZO.esm.js} +1 -1
- package/dist/{signatureStateMachine-BHPwkJZS.esm.js → signatureStateMachine-ce_XMA3l.esm.js} +1 -1
- package/dist/{stats-DkK-f8JT.esm.js → stats-CZcy2J53.esm.js} +1 -1
- package/dist/stats.esm.js +1 -1
- package/dist/{tri-4RsGrIt6.esm.js → tri-xzRLIIMN.esm.js} +0 -10
- package/dist/tri.esm.js +1 -1
- package/dist/{trueSightService-CKrrfV0Q.esm.js → trueSightService-D8yZwF3G.esm.js} +190 -571
- package/dist/{types-CM-jtjJ2.d.ts → types-Bnl58jUQ.d.ts} +2 -6
- package/dist/{types-ZT1XFIJ8.d.ts → types-ChAowIxT.d.ts} +1 -1
- package/dist/{types-CjKBS37a2.d.ts → types-byBHOzCG2.d.ts} +5 -15
- package/dist/video-selfie.d.ts +1 -1
- package/dist/video-selfie.esm.js +6 -7
- package/dist/{videoSelfieCameraWarmer-CB1IzZkt.esm.js → videoSelfieCameraWarmer-C80ZPDZ8.esm.js} +8 -8
- package/dist/{videoSelfieStepDetector-5YHFe0Mq.d.ts → videoSelfieStepDetector-Co0Gu2k2.d.ts} +43 -13
- package/dist/{virtualCameraCheck-WOloJ-do.esm.js → virtualCameraCheck-Cjab7FTI.esm.js} +1 -1
- package/dist/{warmup-CUUnwYxe.esm.js → warmup-ChDwHSel.esm.js} +5 -0
- package/dist/wasm.d.ts +1 -1
- package/dist/wasm.esm.js +3 -2
- package/dist/{wasmDsFlagSync-B2e8p268.esm.js → wasmDsFlagSync-DYrLUEII.esm.js} +1 -1
- package/dist/watchlist-for-business.esm.js +2 -2
- package/dist/watchlist.esm.js +2 -2
- package/dist/{watchlistForBusinessManager-CpuuB1J2.esm.js → watchlistForBusinessManager-CIMkpEhu.esm.js} +1 -1
- package/dist/{watchlistForBusinessStateMachine-DEzgjz7C.esm.js → watchlistForBusinessStateMachine-CJ-MvUre.esm.js} +1 -1
- package/dist/{watchlistManager-CI8BHFob.esm.js → watchlistManager-CixcLNDT.esm.js} +1 -1
- package/dist/{watchlistStateMachine-DvOby3a-.esm.js → watchlistStateMachine-CBqk2w-h.esm.js} +1 -1
- package/dist/workflow.esm.js +34 -34
- package/package.json +1 -6
- package/dist/FaceDetectionProvider-LdZ47bWy.d.ts +0 -36
- package/dist/personhood.d.ts +0 -538
- package/dist/personhood.esm.js +0 -1574
- package/dist/recordingsRepository-CCWy13M-.esm.js +0 -72
- package/dist/types-BT_Oalip.d.ts +0 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
+
import { l as trueSightLog, m as isTrueSightTesting } from "./trueSightService-D8yZwF3G.esm.js";
|
|
1
2
|
import { t as getTimestamp } from "./IBrowserEnvironmentCapability-DEaRRk-R.esm.js";
|
|
2
|
-
import { r as getToken } from "./api-Bx3gKW_y.esm.js";
|
|
3
|
-
import
|
|
4
|
-
import "./
|
|
5
|
-
import { t as addDeviceStats } from "./stats-
|
|
3
|
+
import { r as getToken, t as api } from "./api-Bx3gKW_y.esm.js";
|
|
4
|
+
import "./sessionInitializer-BK5NjMe0.esm.js";
|
|
5
|
+
import { t as endpoints } from "./endpoints-B-3Q-LUw.esm.js";
|
|
6
|
+
import { t as addDeviceStats } from "./stats-CZcy2J53.esm.js";
|
|
6
7
|
import { t as isAndroid } from "./platform-DkcRc9JV.esm.js";
|
|
7
8
|
import { i as assign, n as enqueueActions, r as sendTo, t as setup } from "./xstate.esm-BuFLFuzz.esm.js";
|
|
8
9
|
import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-BXeQ-Ucz.esm.js";
|
|
9
|
-
import { n as invokeRequestPermissionActor, t as checkPermission } from "./permissionServices-
|
|
10
|
-
import { a as sendLabelInspectionEvent,
|
|
10
|
+
import { n as invokeRequestPermissionActor, t as checkPermission } from "./permissionServices-EY3_Vx6c.esm.js";
|
|
11
|
+
import { a as sendLabelInspectionEvent, i as initializeDeepsightSession, r as initializeCamera, s as stopStream, t as FaceDetectionProvider } from "./FaceDetectionProvider-BZYHujqz.esm.js";
|
|
11
12
|
import { t as FACE_ERROR_CODES } from "./types-BN5RPPIZ.esm.js";
|
|
12
|
-
import { a as flagFaceManualReview, i as imageFileToDataUrl, n as runProtectedAttempt, r as cameraCycleProvider, s as PROTECTED_CAPTURE_TARGET, t as createCameraCycleOwnership } from "./createCameraCycleOwnership-
|
|
13
|
+
import { a as flagFaceManualReview, i as imageFileToDataUrl, n as runProtectedAttempt, r as cameraCycleProvider, s as PROTECTED_CAPTURE_TARGET, t as createCameraCycleOwnership } from "./createCameraCycleOwnership-DnwTl1ad.esm.js";
|
|
13
14
|
import { n as releaseFaceAvatarWarmup, r as warmFaceAvatar, t as createFaceAvatar } from "./createFaceAvatar-BNHdeFj8.esm.js";
|
|
14
15
|
import { t as IncodeCanvas } from "./canvas-BxFzWTt-.esm.js";
|
|
15
|
-
import { n as needsMotionPrimeOnlyFromPermission, r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-
|
|
16
|
-
import {
|
|
16
|
+
import { n as needsMotionPrimeOnlyFromPermission, r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-D6TfVop2.esm.js";
|
|
17
|
+
import { n as CameraCompositor, r as getAdaptiveMediaRecorderOptions, t as MultipartRecordingService } from "./multipartRecordingService-YKu0Bd7S.esm.js";
|
|
17
18
|
import { t as getDeviceClass } from "./getDeviceClass-5NYZg9s6.esm.js";
|
|
18
|
-
import { n as getAdaptiveMediaRecorderOptions, t as MultipartRecordingService } from "./multipartRecordingService-B3C_zlev.esm.js";
|
|
19
19
|
//#region src/internal/avatar/concealment.ts
|
|
20
20
|
/**
|
|
21
21
|
* Maps a backend concealment option to the internal avatar flags. `OPTION_NONE`
|
|
@@ -496,7 +496,28 @@ var LocalRecordingProvider = class {
|
|
|
496
496
|
recorder?.stream?.getTracks().forEach((track) => track.stop());
|
|
497
497
|
});
|
|
498
498
|
}
|
|
499
|
+
/**
|
|
500
|
+
* Discards the in-progress recording without producing a result: detaches
|
|
501
|
+
* the recorder's handlers, stops it, releases its cloned tracks and clears
|
|
502
|
+
* the flags. Idempotent, and safe after `stopRecording` or when never
|
|
503
|
+
* started. Mirrors `MultipartRecordingProvider.reset()` so an attempt that is
|
|
504
|
+
* released before finalization cannot leave a live camera clone behind
|
|
505
|
+
* (ENG-56648).
|
|
506
|
+
*/
|
|
499
507
|
reset() {
|
|
508
|
+
this.removeEventListeners();
|
|
509
|
+
const recorder = this.mediaRecorder;
|
|
510
|
+
if (recorder) {
|
|
511
|
+
recorder.ondataavailable = null;
|
|
512
|
+
recorder.onerror = null;
|
|
513
|
+
recorder.onstop = null;
|
|
514
|
+
if (recorder.state !== "inactive") try {
|
|
515
|
+
recorder.stop();
|
|
516
|
+
} catch {}
|
|
517
|
+
recorder.stream?.getTracks().forEach((track) => track.stop());
|
|
518
|
+
this.mediaRecorder = null;
|
|
519
|
+
}
|
|
520
|
+
this.stream = null;
|
|
500
521
|
this._isRecording = false;
|
|
501
522
|
this._error = null;
|
|
502
523
|
this._hasError = false;
|
|
@@ -515,6 +536,18 @@ var LocalRecordingProvider = class {
|
|
|
515
536
|
}
|
|
516
537
|
};
|
|
517
538
|
//#endregion
|
|
539
|
+
//#region src/internal/recordings/recordingsRepository.ts
|
|
540
|
+
async function uploadDeepsightVideo(encryptedVideo, token) {
|
|
541
|
+
try {
|
|
542
|
+
return (await api.post(endpoints.deepsightVideoImport, {
|
|
543
|
+
video: encryptedVideo,
|
|
544
|
+
type: "selfie"
|
|
545
|
+
}, { headers: { "X-Incode-Hardware-Id": token } })).data.recordingId ?? "";
|
|
546
|
+
} catch {
|
|
547
|
+
return "";
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
//#endregion
|
|
518
551
|
//#region src/internal/faceCapture/recordingService.ts
|
|
519
552
|
/**
|
|
520
553
|
* Records on-device and uploads encrypted video for liveness.
|
|
@@ -559,84 +592,146 @@ var LocalRecordingService = class {
|
|
|
559
592
|
* the interview asynchronously by the backend's `selfie` scope consumer, so
|
|
560
593
|
* its upload id must not be forwarded to `/omni/add/face` as a legacy
|
|
561
594
|
* `recordingId`.
|
|
595
|
+
*
|
|
596
|
+
* The recording is scoped to the capture step (ENG-56648). The recorder
|
|
597
|
+
* records a stable `CameraCompositor` stream instead of a raw camera clone, so
|
|
598
|
+
* every attempt can end its own clone before PRC and POC run and the next
|
|
599
|
+
* attempt swaps a fresh clone into the same multipart upload. The owning
|
|
600
|
+
* controller completes the upload once the backend accepts a capture or the
|
|
601
|
+
* step ends without a retry.
|
|
562
602
|
*/
|
|
563
603
|
var MultipartFaceRecordingService = class {
|
|
564
604
|
constructor() {
|
|
565
605
|
this.service = new MultipartRecordingService("selfie");
|
|
606
|
+
this.audioSource = [];
|
|
607
|
+
this.needsVideoSourceReplacement = false;
|
|
566
608
|
this.pausedForAttempt = false;
|
|
609
|
+
this.startInFlight = false;
|
|
610
|
+
this.suspendRequested = false;
|
|
611
|
+
this.stopping = false;
|
|
567
612
|
}
|
|
568
613
|
async start(stream) {
|
|
569
|
-
if (this.
|
|
570
|
-
|
|
571
|
-
this.
|
|
614
|
+
if (this.stopping) throw new Error("Face recording already completed");
|
|
615
|
+
if (this.compositor) {
|
|
616
|
+
await this.resume(stream);
|
|
617
|
+
return;
|
|
618
|
+
}
|
|
619
|
+
const recordingSource = stream.clone();
|
|
620
|
+
const compositor = new CameraCompositor({ fps: 30 });
|
|
621
|
+
this.startInFlight = true;
|
|
622
|
+
try {
|
|
623
|
+
const composite = compositor.start(recordingSource);
|
|
624
|
+
await this.service.start(composite);
|
|
625
|
+
} catch (error) {
|
|
626
|
+
compositor.stop();
|
|
627
|
+
recordingSource.getTracks().forEach((track) => track.stop());
|
|
628
|
+
this.service.cleanup();
|
|
629
|
+
throw error;
|
|
630
|
+
} finally {
|
|
631
|
+
this.startInFlight = false;
|
|
632
|
+
}
|
|
633
|
+
if (this.stopping) {
|
|
634
|
+
compositor.stop();
|
|
635
|
+
recordingSource.getTracks().forEach((track) => track.stop());
|
|
636
|
+
this.service.cleanup();
|
|
637
|
+
return;
|
|
638
|
+
}
|
|
639
|
+
this.compositor = compositor;
|
|
640
|
+
this.recordingSource = recordingSource;
|
|
641
|
+
this.audioSource = recordingSource.getAudioTracks();
|
|
642
|
+
if (this.suspendRequested) {
|
|
643
|
+
this.suspendRequested = false;
|
|
644
|
+
this.suspend();
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* Pauses the container and ends the camera clone on the calling thread. The
|
|
649
|
+
* composite stream and the upload stay open for the next attempt.
|
|
650
|
+
*/
|
|
651
|
+
suspend() {
|
|
652
|
+
if (this.stopping) return;
|
|
653
|
+
if (!this.compositor) {
|
|
654
|
+
this.suspendRequested = this.startInFlight;
|
|
572
655
|
return;
|
|
573
656
|
}
|
|
574
|
-
|
|
657
|
+
if (!this.pausedForAttempt) this.pausedForAttempt = this.service.pause();
|
|
658
|
+
this.releaseCameraClone({ keepAudio: true });
|
|
659
|
+
this.needsVideoSourceReplacement = true;
|
|
575
660
|
}
|
|
576
661
|
async prepareUpload() {
|
|
577
|
-
this.
|
|
662
|
+
this.suspend();
|
|
578
663
|
return { recordingId: null };
|
|
579
664
|
}
|
|
580
665
|
async stop() {
|
|
581
|
-
|
|
582
|
-
await this.service.stop();
|
|
583
|
-
} finally {
|
|
584
|
-
this.pausedForAttempt = false;
|
|
585
|
-
}
|
|
666
|
+
await this.complete();
|
|
586
667
|
return { recordingId: null };
|
|
587
668
|
}
|
|
588
669
|
pauseForBackground() {
|
|
589
|
-
this.
|
|
670
|
+
this.suspend();
|
|
590
671
|
}
|
|
591
|
-
async resumeFromBackground() {
|
|
592
|
-
this.
|
|
672
|
+
async resumeFromBackground(stream) {
|
|
673
|
+
if (!this.compositor || this.stopping) return;
|
|
674
|
+
await this.resume(stream);
|
|
593
675
|
}
|
|
594
676
|
async stopAndGetVideo() {
|
|
595
|
-
|
|
596
|
-
await this.service.stop();
|
|
597
|
-
} finally {
|
|
598
|
-
this.pausedForAttempt = false;
|
|
599
|
-
}
|
|
677
|
+
await this.complete();
|
|
600
678
|
return { videoBase64: void 0 };
|
|
601
679
|
}
|
|
602
680
|
cleanup() {
|
|
681
|
+
this.suspendRequested = false;
|
|
603
682
|
this.pausedForAttempt = false;
|
|
683
|
+
this.needsVideoSourceReplacement = false;
|
|
684
|
+
this.releaseCameraClone({ keepAudio: false });
|
|
685
|
+
this.compositor?.stop();
|
|
686
|
+
this.compositor = void 0;
|
|
687
|
+
this.recordingSource = void 0;
|
|
688
|
+
this.audioSource = [];
|
|
604
689
|
this.service.cleanup();
|
|
605
690
|
}
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
clonedStream: stream.clone()
|
|
619
|
-
});
|
|
620
|
-
}
|
|
621
|
-
async prepareUpload() {
|
|
622
|
-
return { recordingId: null };
|
|
623
|
-
}
|
|
624
|
-
async stop() {
|
|
625
|
-
if (this.session) {
|
|
626
|
-
stopRecording(this.session);
|
|
627
|
-
this.session = void 0;
|
|
691
|
+
/** Swaps this attempt's camera clone into the composite and resumes. */
|
|
692
|
+
async resume(stream) {
|
|
693
|
+
const compositor = this.compositor;
|
|
694
|
+
if (!compositor) return;
|
|
695
|
+
if (this.needsVideoSourceReplacement) {
|
|
696
|
+
const recordingSource = stream.clone();
|
|
697
|
+
recordingSource.getAudioTracks().forEach((track) => track.stop());
|
|
698
|
+
compositor.switchVideo(recordingSource);
|
|
699
|
+
this.needsVideoSourceReplacement = false;
|
|
700
|
+
this.recordingSource = recordingSource;
|
|
701
|
+
const result = await compositor.resume();
|
|
702
|
+
if (result !== "resumed") throw new Error(`Face recording camera did not resume: ${result}`);
|
|
628
703
|
}
|
|
629
|
-
|
|
704
|
+
if (this.pausedForAttempt && !this.service.resume()) throw new Error("Face recording did not resume");
|
|
705
|
+
this.pausedForAttempt = false;
|
|
630
706
|
}
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
707
|
+
/**
|
|
708
|
+
* Completes the scoped upload. The camera clone ends synchronously before the
|
|
709
|
+
* drain so a step that ends mid-attempt never pins the camera; the composite
|
|
710
|
+
* stays alive until the recorder has emitted its final chunk.
|
|
711
|
+
*/
|
|
712
|
+
async complete() {
|
|
713
|
+
this.stopping = true;
|
|
714
|
+
this.suspendRequested = false;
|
|
715
|
+
this.releaseCameraClone({ keepAudio: false });
|
|
716
|
+
try {
|
|
717
|
+
await this.service.stop();
|
|
718
|
+
} finally {
|
|
719
|
+
this.compositor?.stop();
|
|
720
|
+
this.compositor = void 0;
|
|
721
|
+
this.recordingSource = void 0;
|
|
722
|
+
this.audioSource = [];
|
|
723
|
+
this.pausedForAttempt = false;
|
|
724
|
+
this.needsVideoSourceReplacement = false;
|
|
635
725
|
}
|
|
636
|
-
return { videoBase64: void 0 };
|
|
637
726
|
}
|
|
638
|
-
|
|
639
|
-
|
|
727
|
+
releaseCameraClone(options) {
|
|
728
|
+
try {
|
|
729
|
+
this.compositor?.pause();
|
|
730
|
+
} catch {}
|
|
731
|
+
const tracks = options.keepAudio ? this.recordingSource?.getVideoTracks() ?? [] : /* @__PURE__ */ new Set([...this.recordingSource?.getTracks() ?? [], ...this.audioSource]);
|
|
732
|
+
for (const track of tracks) try {
|
|
733
|
+
track.stop();
|
|
734
|
+
} catch {}
|
|
640
735
|
}
|
|
641
736
|
};
|
|
642
737
|
/**
|
|
@@ -648,65 +743,100 @@ var InjectedRecordingService = class {
|
|
|
648
743
|
* JSON via `WebApi.postFaceResults`. Mirrors V1's
|
|
649
744
|
* `FaceFlowManager.setRecorders()` early return.
|
|
650
745
|
* 2. `deepsightLiveness === 'VIDEOLIVENESS'` → local Deepsight recorder.
|
|
651
|
-
* 3. `enableFaceRecording === true` → scoped multipart recorder.
|
|
652
|
-
* injected recording capability remains supported for backwards-compatible
|
|
653
|
-
* dependency injection.
|
|
746
|
+
* 3. `enableFaceRecording === true` → scoped multipart recorder.
|
|
654
747
|
* 4. otherwise → no recording.
|
|
655
748
|
*/
|
|
656
749
|
function createRecordingService(params) {
|
|
657
750
|
if (params.config.onDeviceFaceResultsSubmissionEnabled === true) return;
|
|
658
751
|
if (params.localDelivery === true) return params.config.enableFaceRecording === true || params.config.deepsightLiveness === "VIDEOLIVENESS" ? new LocalRecordingService(params.wasmUtil, null) : void 0;
|
|
659
752
|
if (params.config.deepsightLiveness === "VIDEOLIVENESS") return new LocalRecordingService(params.wasmUtil, params.sessionToken);
|
|
660
|
-
if (params.config.enableFaceRecording === true) return
|
|
753
|
+
if (params.config.enableFaceRecording === true) return new MultipartFaceRecordingService();
|
|
661
754
|
}
|
|
662
755
|
//#endregion
|
|
663
756
|
//#region src/internal/faceCapture/protectedFaceAttempt.ts
|
|
664
757
|
const ON_DEVICE_MANUAL_CAPTURE_TIMEOUT_MS = 2147483647;
|
|
758
|
+
/**
|
|
759
|
+
* Recorder hooks for one protected face attempt.
|
|
760
|
+
*
|
|
761
|
+
* The recording service comes from the owner of the capture step (the face
|
|
762
|
+
* controller), so a step-scoped service (`suspend` present) is started or
|
|
763
|
+
* resumed by every attempt, paused with its camera clone ended before POC, and
|
|
764
|
+
* suspended again on release; only the controller completes it (ENG-56648).
|
|
765
|
+
* Per-attempt services (local video liveness, capture-only video) keep their
|
|
766
|
+
* stop-before-POC and cleanup-on-release behavior.
|
|
767
|
+
*/
|
|
665
768
|
var ProtectedFaceRecorderHooks = class {
|
|
666
|
-
constructor(config,
|
|
667
|
-
this.config = config;
|
|
668
|
-
this.dependencies = dependencies;
|
|
769
|
+
constructor(config, delivery, getRecordingService) {
|
|
669
770
|
this.delivery = delivery;
|
|
771
|
+
this.getRecordingService = getRecordingService;
|
|
772
|
+
this.disposed = false;
|
|
670
773
|
this.mode = config.onDeviceFaceResultsSubmissionEnabled === true || config.enableFaceRecording !== true && config.deepsightLiveness !== "VIDEOLIVENESS" ? "none" : "finalizeBeforePoc";
|
|
671
774
|
}
|
|
672
775
|
async start(unprotectedStream) {
|
|
673
776
|
if (this.mode === "none") return;
|
|
674
|
-
const
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
}
|
|
681
|
-
|
|
777
|
+
const service = await this.getRecordingService();
|
|
778
|
+
if (!service) return;
|
|
779
|
+
this.service = service;
|
|
780
|
+
if (this.disposed) {
|
|
781
|
+
this.suspendOrCleanup();
|
|
782
|
+
return;
|
|
783
|
+
}
|
|
784
|
+
try {
|
|
785
|
+
await service.start(unprotectedStream);
|
|
786
|
+
} catch (error) {
|
|
787
|
+
if (service.suspend) {
|
|
788
|
+
service.suspend();
|
|
789
|
+
trueSightLog("warning", "recording", "faceScan", "face recording did not resume for this attempt");
|
|
790
|
+
return;
|
|
791
|
+
}
|
|
792
|
+
throw error;
|
|
793
|
+
}
|
|
794
|
+
if (this.disposed) this.suspendOrCleanup();
|
|
682
795
|
}
|
|
683
796
|
async prepareForPoc() {
|
|
684
|
-
|
|
797
|
+
const service = this.service;
|
|
798
|
+
if (!service) return {};
|
|
685
799
|
if (this.delivery === "local") {
|
|
686
800
|
try {
|
|
687
|
-
const result = await
|
|
801
|
+
const result = await service.stopAndGetVideo();
|
|
688
802
|
this.captureOnlyVideoBase64 = result.videoBase64;
|
|
689
803
|
} catch {
|
|
690
804
|
this.captureOnlyVideoBase64 = void 0;
|
|
691
805
|
}
|
|
692
806
|
return {};
|
|
693
807
|
}
|
|
694
|
-
return
|
|
808
|
+
if (service.suspend) return service.prepareUpload();
|
|
809
|
+
return service.stop();
|
|
695
810
|
}
|
|
696
811
|
async resumeAfterPoc() {}
|
|
697
812
|
pauseForBackground() {
|
|
698
813
|
this.service?.pauseForBackground?.();
|
|
699
814
|
}
|
|
700
815
|
async resumeFromBackground(unprotectedStream) {
|
|
701
|
-
|
|
816
|
+
const service = this.service;
|
|
817
|
+
if (!service?.resumeFromBackground || this.disposed) return;
|
|
818
|
+
try {
|
|
819
|
+
await service.resumeFromBackground(unprotectedStream);
|
|
820
|
+
} catch {
|
|
821
|
+
service.suspend?.();
|
|
822
|
+
trueSightLog("warning", "recording", "faceScan", "face recording did not resume after foreground");
|
|
823
|
+
}
|
|
702
824
|
}
|
|
703
825
|
dispose() {
|
|
826
|
+
this.disposed = true;
|
|
704
827
|
try {
|
|
705
|
-
this.
|
|
828
|
+
this.suspendOrCleanup();
|
|
706
829
|
} finally {
|
|
707
830
|
this.service = void 0;
|
|
708
831
|
}
|
|
709
832
|
}
|
|
833
|
+
/** Step-scoped services suspend (the owner completes them); others clean up. */
|
|
834
|
+
suspendOrCleanup() {
|
|
835
|
+
const service = this.service;
|
|
836
|
+
if (!service) return;
|
|
837
|
+
if (service.suspend) service.suspend();
|
|
838
|
+
else service.cleanup();
|
|
839
|
+
}
|
|
710
840
|
takeCaptureOnlyVideo() {
|
|
711
841
|
const video = this.captureOnlyVideoBase64;
|
|
712
842
|
this.captureOnlyVideoBase64 = void 0;
|
|
@@ -730,9 +860,19 @@ var ProtectedFaceAttemptRuntime = class ProtectedFaceAttemptRuntime {
|
|
|
730
860
|
this.recorderTransferred = false;
|
|
731
861
|
this.pendingSignals = [];
|
|
732
862
|
this.provider = options.faceDetection;
|
|
733
|
-
this.recorder = new ProtectedFaceRecorderHooks(options.config, options.
|
|
863
|
+
this.recorder = new ProtectedFaceRecorderHooks(options.config, options.delivery, options.getRecordingService ?? (() => this.createAttemptRecordingService()));
|
|
734
864
|
this.cycleOwnership = createCameraCycleOwnership(options.cycle);
|
|
735
865
|
}
|
|
866
|
+
/** Per-attempt fallback when no step owner supplies the recording service. */
|
|
867
|
+
async createAttemptRecordingService() {
|
|
868
|
+
const wasmUtil = await this.options.dependencies.getWasmUtil();
|
|
869
|
+
return createRecordingService({
|
|
870
|
+
config: this.options.config,
|
|
871
|
+
wasmUtil,
|
|
872
|
+
sessionToken: getToken(),
|
|
873
|
+
localDelivery: this.options.delivery === "local"
|
|
874
|
+
});
|
|
875
|
+
}
|
|
736
876
|
get delivery() {
|
|
737
877
|
return this.options.delivery;
|
|
738
878
|
}
|
|
@@ -998,6 +1138,8 @@ function createProtectedFaceControllerActor(options) {
|
|
|
998
1138
|
let committedPreview;
|
|
999
1139
|
let pendingAutoPreview;
|
|
1000
1140
|
let recording = {};
|
|
1141
|
+
let stepRecording;
|
|
1142
|
+
let stepRecordingPending;
|
|
1001
1143
|
let generation = 0;
|
|
1002
1144
|
let active = true;
|
|
1003
1145
|
let diagnosticAttempt = 0;
|
|
@@ -1016,6 +1158,48 @@ function createProtectedFaceControllerActor(options) {
|
|
|
1016
1158
|
if (!controllerInput) throw new Error("Protected face controller is not bound");
|
|
1017
1159
|
return controllerInput;
|
|
1018
1160
|
};
|
|
1161
|
+
/**
|
|
1162
|
+
* One recording service per capture step (ENG-56648). Every attempt of the
|
|
1163
|
+
* step starts or resumes it; `completeStepRecording` completes it when the
|
|
1164
|
+
* backend accepts a capture or the step ends without a retry.
|
|
1165
|
+
*/
|
|
1166
|
+
const getStepRecordingService = () => {
|
|
1167
|
+
if (stepRecording) return Promise.resolve(stepRecording);
|
|
1168
|
+
if (stepRecordingPending) return stepRecordingPending;
|
|
1169
|
+
const input = getControllerInput();
|
|
1170
|
+
const pending = (async () => {
|
|
1171
|
+
const wasmUtil = await input.dependencies.getWasmUtil();
|
|
1172
|
+
if (!active) return;
|
|
1173
|
+
stepRecording ??= createRecordingService({
|
|
1174
|
+
config: input.config,
|
|
1175
|
+
wasmUtil,
|
|
1176
|
+
sessionToken: getToken(),
|
|
1177
|
+
localDelivery: options.delivery === "local"
|
|
1178
|
+
});
|
|
1179
|
+
return stepRecording;
|
|
1180
|
+
})();
|
|
1181
|
+
stepRecordingPending = pending;
|
|
1182
|
+
pending.finally(() => {
|
|
1183
|
+
if (stepRecordingPending === pending) stepRecordingPending = void 0;
|
|
1184
|
+
});
|
|
1185
|
+
return pending;
|
|
1186
|
+
};
|
|
1187
|
+
const completeStepRecording = () => {
|
|
1188
|
+
const service = stepRecording;
|
|
1189
|
+
stepRecording = void 0;
|
|
1190
|
+
if (!service) return;
|
|
1191
|
+
if (!service.suspend) {
|
|
1192
|
+
try {
|
|
1193
|
+
service.cleanup();
|
|
1194
|
+
} catch {}
|
|
1195
|
+
return;
|
|
1196
|
+
}
|
|
1197
|
+
service.stop().catch(() => void 0).finally(() => {
|
|
1198
|
+
try {
|
|
1199
|
+
service.cleanup();
|
|
1200
|
+
} catch {}
|
|
1201
|
+
});
|
|
1202
|
+
};
|
|
1019
1203
|
const ensureRuntime = () => {
|
|
1020
1204
|
if (!runtime) {
|
|
1021
1205
|
const input = getControllerInput();
|
|
@@ -1031,7 +1215,8 @@ function createProtectedFaceControllerActor(options) {
|
|
|
1031
1215
|
acquireCamera: (provider) => initializeCamera({
|
|
1032
1216
|
config: input.config,
|
|
1033
1217
|
provider
|
|
1034
|
-
})
|
|
1218
|
+
}),
|
|
1219
|
+
getRecordingService: getStepRecordingService
|
|
1035
1220
|
});
|
|
1036
1221
|
if (deepsightService) runtime.setDeepsightService(deepsightService);
|
|
1037
1222
|
}
|
|
@@ -1275,12 +1460,16 @@ function createProtectedFaceControllerActor(options) {
|
|
|
1275
1460
|
case "RESET":
|
|
1276
1461
|
releaseCurrent("retry");
|
|
1277
1462
|
return;
|
|
1463
|
+
case "COMPLETE_RECORDING":
|
|
1464
|
+
completeStepRecording();
|
|
1465
|
+
return;
|
|
1278
1466
|
case "RELEASE": releaseCurrent(command.reason);
|
|
1279
1467
|
}
|
|
1280
1468
|
});
|
|
1281
1469
|
return () => {
|
|
1282
1470
|
active = false;
|
|
1283
1471
|
releaseCurrent("externalStop");
|
|
1472
|
+
completeStepRecording();
|
|
1284
1473
|
};
|
|
1285
1474
|
});
|
|
1286
1475
|
}
|
|
@@ -1484,7 +1673,6 @@ const faceCaptureMachine = setup({
|
|
|
1484
1673
|
flagFaceManualReview: () => {
|
|
1485
1674
|
flagFaceManualReview();
|
|
1486
1675
|
},
|
|
1487
|
-
preloadRecordingProvider: () => void 0,
|
|
1488
1676
|
warmAvatarProvider: ({ context }) => {
|
|
1489
1677
|
const { obfuscateWithAvatar, avatarVariant } = concealmentToAvatar(context.config.selfieConcealmentOption);
|
|
1490
1678
|
if (!obfuscateWithAvatar || !avatarVariant) return;
|
|
@@ -1517,6 +1705,10 @@ const faceCaptureMachine = setup({
|
|
|
1517
1705
|
if (!isProtectedFaceControllerRunning(self)) return;
|
|
1518
1706
|
enqueue.sendTo("protectedFaceController", { type: "RESET" });
|
|
1519
1707
|
}),
|
|
1708
|
+
completeProtectedRecording: enqueueActions(({ enqueue, self }) => {
|
|
1709
|
+
if (!isProtectedFaceControllerRunning(self)) return;
|
|
1710
|
+
enqueue.sendTo("protectedFaceController", { type: "COMPLETE_RECORDING" });
|
|
1711
|
+
}),
|
|
1520
1712
|
sendProtectedAutoCapture: enqueueActions(({ enqueue, self, event }) => {
|
|
1521
1713
|
if (!isProtectedFaceControllerRunning(self)) return;
|
|
1522
1714
|
enqueue.sendTo("protectedFaceController", {
|
|
@@ -1632,11 +1824,7 @@ const faceCaptureMachine = setup({
|
|
|
1632
1824
|
{ target: "loading" }
|
|
1633
1825
|
] } },
|
|
1634
1826
|
loading: {
|
|
1635
|
-
entry: [
|
|
1636
|
-
"preloadRecordingProvider",
|
|
1637
|
-
"warmAvatarProvider",
|
|
1638
|
-
"initializeProtectedDeepsight"
|
|
1639
|
-
],
|
|
1827
|
+
entry: ["warmAvatarProvider", "initializeProtectedDeepsight"],
|
|
1640
1828
|
invoke: {
|
|
1641
1829
|
id: "checkPermissionLoading",
|
|
1642
1830
|
src: "checkPermission",
|
|
@@ -1652,11 +1840,7 @@ const faceCaptureMachine = setup({
|
|
|
1652
1840
|
},
|
|
1653
1841
|
tutorial: {
|
|
1654
1842
|
initial: "checkingPermission",
|
|
1655
|
-
entry: [
|
|
1656
|
-
"trackTutorial",
|
|
1657
|
-
"preloadRecordingProvider",
|
|
1658
|
-
"warmAvatarProvider"
|
|
1659
|
-
],
|
|
1843
|
+
entry: ["trackTutorial", "warmAvatarProvider"],
|
|
1660
1844
|
on: { GO_TO_MANUAL_UPLOAD: {
|
|
1661
1845
|
guard: "hasManualUploadEnabled",
|
|
1662
1846
|
target: "#faceCapture.manualUpload"
|
|
@@ -1775,11 +1959,7 @@ const faceCaptureMachine = setup({
|
|
|
1775
1959
|
}
|
|
1776
1960
|
},
|
|
1777
1961
|
permissions: {
|
|
1778
|
-
entry: [
|
|
1779
|
-
"preloadRecordingProvider",
|
|
1780
|
-
"warmAvatarProvider",
|
|
1781
|
-
"initializeProtectedDeepsight"
|
|
1782
|
-
],
|
|
1962
|
+
entry: ["warmAvatarProvider", "initializeProtectedDeepsight"],
|
|
1783
1963
|
initial: "checkingDeepsight",
|
|
1784
1964
|
states: {
|
|
1785
1965
|
checkingDeepsight: { always: [{
|
|
@@ -1873,7 +2053,6 @@ const faceCaptureMachine = setup({
|
|
|
1873
2053
|
},
|
|
1874
2054
|
capture: {
|
|
1875
2055
|
entry: [
|
|
1876
|
-
"preloadRecordingProvider",
|
|
1877
2056
|
"warmAvatarProvider",
|
|
1878
2057
|
"initializeProtectedDeepsight",
|
|
1879
2058
|
"startProtectedAttempt"
|
|
@@ -2019,7 +2198,7 @@ const faceCaptureMachine = setup({
|
|
|
2019
2198
|
}
|
|
2020
2199
|
] } },
|
|
2021
2200
|
success: {
|
|
2022
|
-
entry: "cleanup",
|
|
2201
|
+
entry: ["completeProtectedRecording", "cleanup"],
|
|
2023
2202
|
after: { 3e3: { target: "#faceCapture.processing" } }
|
|
2024
2203
|
}
|
|
2025
2204
|
}
|
|
@@ -2065,7 +2244,7 @@ const faceCaptureMachine = setup({
|
|
|
2065
2244
|
onError: { target: "finished" }
|
|
2066
2245
|
} },
|
|
2067
2246
|
terminalProcessing: {
|
|
2068
|
-
entry: "cleanup",
|
|
2247
|
+
entry: ["completeProtectedRecording", "cleanup"],
|
|
2069
2248
|
invoke: {
|
|
2070
2249
|
id: "processFace",
|
|
2071
2250
|
src: "processFace",
|
|
@@ -2094,7 +2273,11 @@ const faceCaptureMachine = setup({
|
|
|
2094
2273
|
type: "final"
|
|
2095
2274
|
},
|
|
2096
2275
|
error: {
|
|
2097
|
-
entry: [
|
|
2276
|
+
entry: [
|
|
2277
|
+
"completeProtectedRecording",
|
|
2278
|
+
"stopMediaStream",
|
|
2279
|
+
"releaseAvatarWarmup"
|
|
2280
|
+
],
|
|
2098
2281
|
on: { RESET: {
|
|
2099
2282
|
target: "idle",
|
|
2100
2283
|
actions: ["resetProtectedController", "resetContext"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-ijlbX_Wx.esm.js";
|
|
2
2
|
import { s as createActor, u as createManager } from "./xstate.esm-BuFLFuzz.esm.js";
|
|
3
|
-
import { t as faceMatchMachine } from "./faceMatchStateMachine-
|
|
3
|
+
import { t as faceMatchMachine } from "./faceMatchStateMachine-mRIHQ3dA.esm.js";
|
|
4
4
|
//#region src/modules/face-match/faceMatchActor.ts
|
|
5
5
|
function createFaceMatchActor(options) {
|
|
6
6
|
return createActor(faceMatchMachine, { input: { config: options.config } }).start();
|
package/dist/{faceMatchStateMachine-BUc5FXYy.esm.js → faceMatchStateMachine-mRIHQ3dA.esm.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as api } from "./api-Bx3gKW_y.esm.js";
|
|
2
|
-
import { t as endpoints } from "./endpoints-
|
|
2
|
+
import { t as endpoints } from "./endpoints-B-3Q-LUw.esm.js";
|
|
3
3
|
import { i as assign, t as setup } from "./xstate.esm-BuFLFuzz.esm.js";
|
|
4
4
|
import { n as fromPromise } from "./xstate-actors.esm-BXeQ-Ucz.esm.js";
|
|
5
5
|
//#region src/modules/face-match/constants.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as __toESM } from "./rolldown-runtime-FDOR9p9I.esm.js";
|
|
2
|
-
import { t as SDK_VERSION } from "./sdkVersion-
|
|
2
|
+
import { t as SDK_VERSION } from "./sdkVersion-CD9fJC2Y.esm.js";
|
|
3
3
|
import { t as BrowserLazyImportProvider } from "./BrowserLazyImportProvider-BhoA957O.esm.js";
|
|
4
4
|
let currentEnvironment;
|
|
5
5
|
/** Effective tier: the explicitly-set value, else the default (see note above). */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { E as updateFeatureManagementUser, T as subscribeFeatureManagement, _ as getIsFeatureManagementInitialized, a as stringParam, d as ONBOARDING_WEB_SDK_PARAMETER_STORE, f as getExperiment, g as getFeatureParameterStore, h as getFeatureManagementVersion, i as numberParam, l as resolveExperiment, m as getFeatureGate, n as defineExperimentParams, o as EXPERIMENT_UNAVAILABLE_SENTINEL, p as getFeatureDynamicConfig, r as enumParam, s as exposeExperimentOnce, t as booleanParam, u as resolveExperimentOnce, x as logEvent, y as getLayer } from "./feature-management-
|
|
1
|
+
import { E as updateFeatureManagementUser, T as subscribeFeatureManagement, _ as getIsFeatureManagementInitialized, a as stringParam, d as ONBOARDING_WEB_SDK_PARAMETER_STORE, f as getExperiment, g as getFeatureParameterStore, h as getFeatureManagementVersion, i as numberParam, l as resolveExperiment, m as getFeatureGate, n as defineExperimentParams, o as EXPERIMENT_UNAVAILABLE_SENTINEL, p as getFeatureDynamicConfig, r as enumParam, s as exposeExperimentOnce, t as booleanParam, u as resolveExperimentOnce, x as logEvent, y as getLayer } from "./feature-management-C8OAO_CZ.esm.js";
|
|
2
2
|
export { EXPERIMENT_UNAVAILABLE_SENTINEL, ONBOARDING_WEB_SDK_PARAMETER_STORE, booleanParam, defineExperimentParams, enumParam, exposeExperimentOnce, getExperiment, getFeatureDynamicConfig, getFeatureGate, getFeatureManagementVersion, getFeatureParameterStore, getIsFeatureManagementInitialized, getLayer, logEvent, numberParam, resolveExperiment, resolveExperimentOnce, stringParam, subscribeFeatureManagement, updateFeatureManagementUser };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createFieldComparisonManagerFromActor, r as fieldComparisonMachine, t as createFieldComparisonManager } from "./fieldComparisonManager-
|
|
1
|
+
import { n as createFieldComparisonManagerFromActor, r as fieldComparisonMachine, t as createFieldComparisonManager } from "./fieldComparisonManager-CC-klG0h.esm.js";
|
|
2
2
|
export { createFieldComparisonManager, createFieldComparisonManagerFromActor, fieldComparisonMachine };
|
package/dist/{fieldComparisonManager-BIs6HPJG.esm.js → fieldComparisonManager-CC-klG0h.esm.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as api } from "./api-Bx3gKW_y.esm.js";
|
|
2
2
|
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-ijlbX_Wx.esm.js";
|
|
3
|
-
import { t as endpoints } from "./endpoints-
|
|
3
|
+
import { t as endpoints } from "./endpoints-B-3Q-LUw.esm.js";
|
|
4
4
|
import { i as assign, s as createActor, t as setup, u as createManager } from "./xstate.esm-BuFLFuzz.esm.js";
|
|
5
5
|
import { n as fromPromise } from "./xstate-actors.esm-BXeQ-Ucz.esm.js";
|
|
6
6
|
//#region src/modules/field-comparison/fieldComparisonServices.ts
|
package/dist/fiscal-qr.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as FiscalQrActor, i as createFiscalQrManagerFromActor, n as FiscalQrState, o as fiscalQrMachine, r as createFiscalQrManager, s as FiscalQrConfig, t as FiscalQrManager } from "./fiscalQrManager-
|
|
1
|
+
import { a as FiscalQrActor, i as createFiscalQrManagerFromActor, n as FiscalQrState, o as fiscalQrMachine, r as createFiscalQrManager, s as FiscalQrConfig, t as FiscalQrManager } from "./fiscalQrManager-B1STmT6z.js";
|
|
2
2
|
export { type FiscalQrActor, type FiscalQrConfig, type FiscalQrManager, type FiscalQrState, createFiscalQrManager, createFiscalQrManagerFromActor, fiscalQrMachine };
|
package/dist/fiscal-qr.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createFiscalQrManagerFromActor, r as fiscalQrMachine, t as createFiscalQrManager } from "./fiscalQrManager-
|
|
1
|
+
import { n as createFiscalQrManagerFromActor, r as fiscalQrMachine, t as createFiscalQrManager } from "./fiscalQrManager-DbCVMIBx.esm.js";
|
|
2
2
|
export { createFiscalQrManager, createFiscalQrManagerFromActor, fiscalQrMachine };
|
|
@@ -20,6 +20,9 @@ type FiscalQrActor = ActorRefFrom<FiscalQrMachine>;
|
|
|
20
20
|
type FiscalQrIdleState = {
|
|
21
21
|
status: 'idle';
|
|
22
22
|
};
|
|
23
|
+
type FiscalQrPermissionDeniedState = {
|
|
24
|
+
status: 'permissionDenied';
|
|
25
|
+
};
|
|
23
26
|
type FiscalQrScanningState = {
|
|
24
27
|
status: 'scanning';
|
|
25
28
|
stream?: MediaStream;
|
|
@@ -48,7 +51,7 @@ type FiscalQrVerifiedState = {
|
|
|
48
51
|
type FiscalQrFinishedState = {
|
|
49
52
|
status: 'finished';
|
|
50
53
|
};
|
|
51
|
-
type FiscalQrState = FiscalQrIdleState | FiscalQrScanningState | FiscalQrCapturingState | FiscalQrSuccessState | FiscalQrProcessingState | FiscalQrErrorState | FiscalQrVerifiedState | FiscalQrFinishedState;
|
|
54
|
+
type FiscalQrState = FiscalQrIdleState | FiscalQrPermissionDeniedState | FiscalQrScanningState | FiscalQrCapturingState | FiscalQrSuccessState | FiscalQrProcessingState | FiscalQrErrorState | FiscalQrVerifiedState | FiscalQrFinishedState;
|
|
52
55
|
declare function createFiscalQrManager(options: {
|
|
53
56
|
config: FiscalQrConfig;
|
|
54
57
|
}): Manager<FiscalQrState> & {
|