@incodetech/core 2.0.1 → 2.1.0-rc.1

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 (218) hide show
  1. package/dist/{BrowserStorageProvider-CuOW1Er2.esm.js → BrowserStorageProvider-BpJM-gIl.esm.js} +8 -1
  2. package/dist/{IpifyProvider-D7jx52AL.esm.js → IpifyProvider-D4LWD15E.esm.js} +28 -0
  3. package/dist/{MotionSensorProvider-4v7xkqAp.esm.js → MotionSensorProvider-Bx7Mpzt0.esm.js} +63 -13
  4. package/dist/{OpenViduRecordingProvider-CMu6XVdc.esm.js → OpenViduRecordingProvider-O4GjBseO.esm.js} +1 -1
  5. package/dist/StateMachine-BC_nGvrc.d.ts +2 -0
  6. package/dist/StreamCanvasCapture-ImiDQdVA.esm.js +118 -0
  7. package/dist/StreamCanvasCapture-yyl20qd9.d.ts +152 -0
  8. package/dist/{BaseWasmProvider-C_DLEI40.esm.js → WasmUtilProvider-BKWm8rSA.esm.js} +202 -11
  9. package/dist/{addressSearch-BpTbTWCa.esm.js → addressSearch-DvmWXKZg.esm.js} +63 -57
  10. package/dist/{ae-signature-DDDZmWXj.esm.js → ae-signature-BFZta3TZ.esm.js} +1 -1
  11. package/dist/ae-signature.d.ts +3 -3
  12. package/dist/ae-signature.esm.js +6 -5
  13. package/dist/antifraud.d.ts +5 -46
  14. package/dist/antifraud.esm.js +6 -43
  15. package/dist/antifraudManager-CkV4u-LE.esm.js +55 -0
  16. package/dist/antifraudManager-CznnhyvD.d.ts +63 -0
  17. package/dist/{antifraudStateMachine-O0TMf6yc.esm.js → antifraudStateMachine-Ccrb-Jxc.esm.js} +2 -2
  18. package/dist/apiError-B-j-gyDx.esm.js +51 -0
  19. package/dist/authentication.d.ts +13 -11
  20. package/dist/authentication.esm.js +26 -22
  21. package/dist/{authenticationManager-5M-fKzXx.esm.js → authenticationManager-BlR6mSaG.esm.js} +6 -6
  22. package/dist/{authenticationManager-C83GNIhl.d.ts → authenticationManager-CaiQbp-q.d.ts} +4 -4
  23. package/dist/{authenticationStateMachine-BMZqatiF.esm.js → authenticationStateMachine-DkcGUMw5.esm.js} +21 -9
  24. package/dist/{backCameraStream-DMdMeGk2.esm.js → backCameraStream-D7Wo4Nbx.esm.js} +95 -7
  25. package/dist/{session-CrkWAs-q.esm.js → browserSimulation-B1dWiXp7.esm.js} +61 -476
  26. package/dist/camera.d.ts +4 -3
  27. package/dist/camera.esm.js +4 -3
  28. package/dist/canvas-SKcRBxsk.esm.js +230 -0
  29. package/dist/consent.d.ts +4 -398
  30. package/dist/consent.esm.js +6 -77
  31. package/dist/consentManager-BYo9Nu1r.esm.js +90 -0
  32. package/dist/consentManager-Cg5Sk2tv.d.ts +419 -0
  33. package/dist/{consentStateMachine-CCT-B60O.esm.js → consentStateMachine-BG3yL8aC.esm.js} +9 -6
  34. package/dist/cpf-ocr.d.ts +4 -199
  35. package/dist/cpf-ocr.esm.js +8 -177
  36. package/dist/cpfOcrManager-Dg1s_TY5.d.ts +216 -0
  37. package/dist/cpfOcrManager-sSKegxox.esm.js +190 -0
  38. package/dist/cross-document-data-match.d.ts +1 -1
  39. package/dist/cross-document-data-match.esm.js +4 -4
  40. package/dist/curp-validation.d.ts +8 -158
  41. package/dist/curp-validation.esm.js +6 -108
  42. package/dist/curpValidationManager-CFem6zP9.esm.js +122 -0
  43. package/dist/curpValidationManager-RttixpIc.d.ts +184 -0
  44. package/dist/{curpValidationStateMachine-CitWLr2c.esm.js → curpValidationStateMachine-B7V_qp66.esm.js} +20 -13
  45. package/dist/custom-fields.d.ts +2 -2
  46. package/dist/custom-fields.esm.js +4 -4
  47. package/dist/custom-watchlist.d.ts +1 -1
  48. package/dist/custom-watchlist.esm.js +4 -41
  49. package/dist/customWatchlistStateMachine-HmFybXLX.esm.js +50 -0
  50. package/dist/{deepsightLoader-Cm4JIT_z.esm.js → deepsightLoader-8tnddNx-.esm.js} +19 -10
  51. package/dist/deepsightService-CrHmvx8X.esm.js +276 -0
  52. package/dist/{deepsightService-CEVxzehb.d.ts → deepsightService-Dh5P-hLf.d.ts} +13 -160
  53. package/dist/device.esm.js +4 -3
  54. package/dist/document-capture.d.ts +989 -80
  55. package/dist/document-capture.esm.js +34 -8
  56. package/dist/document-upload.d.ts +44 -44
  57. package/dist/document-upload.esm.js +7 -7
  58. package/dist/{documentCaptureStateMachine-BqzTDy9k.esm.js → documentCaptureStateMachine-CUTUzUw_.esm.js} +90 -6
  59. package/dist/dynamic-forms.d.ts +20 -5
  60. package/dist/dynamic-forms.esm.js +150 -61
  61. package/dist/ekyb.d.ts +32 -13
  62. package/dist/ekyb.esm.js +25 -15
  63. package/dist/{ekybStateMachine-CyMx_kg-.esm.js → ekybStateMachine-klc-AImJ.esm.js} +319 -207
  64. package/dist/ekyc.d.ts +10 -78
  65. package/dist/ekyc.esm.js +17 -12
  66. package/dist/{ekycStateMachine-oeO0Iekd.esm.js → ekycStateMachine-CXbpaJJn.esm.js} +201 -113
  67. package/dist/electronic-signature.d.ts +3 -3
  68. package/dist/electronic-signature.esm.js +5 -4
  69. package/dist/{electronicSignatureManager-D9OHzTpG.esm.js → electronicSignatureManager-BaECdJ1u.esm.js} +91 -23
  70. package/dist/email.d.ts +4 -3
  71. package/dist/email.esm.js +6 -5
  72. package/dist/{emailManager-wAV0LE-H.esm.js → emailManager--D5G3ChB.esm.js} +30 -7
  73. package/dist/{emailManager-DIfnS5g1.d.ts → emailManager-lAzDoQOs.d.ts} +66 -8
  74. package/dist/{emailStateMachine-DOf4j58N.esm.js → emailStateMachine-CxTOMAjC.esm.js} +46 -11
  75. package/dist/{endpoints-CnN3SyDa.esm.js → endpoints-BeTK0Mlt.esm.js} +6 -3
  76. package/dist/{events-D6-e4vok.esm.js → events-Dvvriq9l.esm.js} +3 -1
  77. package/dist/events.d.ts +2 -0
  78. package/dist/events.esm.js +1 -1
  79. package/dist/extensibility.d.ts +41 -16
  80. package/dist/extensibility.esm.js +55 -33
  81. package/dist/face-match.d.ts +21 -2
  82. package/dist/face-match.esm.js +5 -5
  83. package/dist/{faceCaptureManagerFactory-yqtpxjnN.d.ts → faceCaptureManagerFactory-CjdBUS6s.d.ts} +48 -17
  84. package/dist/{faceCaptureManagerFactory-Dh2PdGlF.esm.js → faceCaptureManagerFactory-ej2j1LMr.esm.js} +21 -5
  85. package/dist/{faceCaptureSetup-B3faSpYA.esm.js → faceCaptureSetup-B9t6bYze.esm.js} +68 -183
  86. package/dist/{faceMatchStateMachine-DNFrxTFS.esm.js → faceMatchStateMachine-DeXXzSuz.esm.js} +62 -6
  87. package/dist/field-comparison.d.ts +4 -0
  88. package/dist/field-comparison.esm.js +7 -0
  89. package/dist/fieldComparisonManager-Bu5TaSr3.d.ts +76 -0
  90. package/dist/fieldComparisonManager-COGI2ARD.esm.js +162 -0
  91. package/dist/fiscal-qr.d.ts +59 -0
  92. package/dist/fiscal-qr.esm.js +323 -0
  93. package/dist/flow-events.d.ts +6 -5
  94. package/dist/flow.d.ts +23 -15
  95. package/dist/flow.esm.js +56 -17
  96. package/dist/flowCompletionService-BdR2cGgB.d.ts +19 -0
  97. package/dist/flowCompletionService-DdGojV9K.esm.js +20 -0
  98. package/dist/{flowServices-PiNsxLfK.esm.js → flowServices-ChgTNggJ.esm.js} +10 -5
  99. package/dist/geolocation.d.ts +4 -4
  100. package/dist/geolocation.esm.js +6 -6
  101. package/dist/{geolocationStateMachine-asasuHY2.esm.js → geolocationStateMachine-Dvh7X0wF.esm.js} +5 -5
  102. package/dist/getBrowser-C8DP7oTB.esm.js +8 -0
  103. package/dist/{getBrowser-BSXUTWXw.esm.js → getDeviceClass-C0olyNFS.esm.js} +1 -8
  104. package/dist/{getDeviceClass-BSntT9_j.esm.js → getDeviceClass-C8Do2qYu.esm.js} +1 -1
  105. package/dist/government-validation.d.ts +28 -8
  106. package/dist/government-validation.esm.js +19 -8
  107. package/dist/{governmentValidationStateMachine-BDDYrJTo.esm.js → governmentValidationStateMachine-DcJ-BfsC.esm.js} +35 -77
  108. package/dist/home.d.ts +15 -14
  109. package/dist/home.esm.js +2 -2
  110. package/dist/http-Cai3IoLS.esm.js +0 -0
  111. package/dist/http.esm.js +1 -0
  112. package/dist/id-ocr.d.ts +54 -54
  113. package/dist/id-ocr.esm.js +5 -5
  114. package/dist/id-verification.d.ts +27 -27
  115. package/dist/id-verification.esm.js +4 -4
  116. package/dist/id.d.ts +12 -10
  117. package/dist/id.esm.js +70 -27
  118. package/dist/{idCaptureManager-Fyd0eam-.d.ts → idCaptureManager-ChCNmgBj.d.ts} +40 -20
  119. package/dist/{idCaptureManager-D0ktk7Hh.esm.js → idCaptureManager-D3pwWutw.esm.js} +22 -7
  120. package/dist/{idCaptureStateMachine-dwlBUjbC.esm.js → idCaptureStateMachine-B3AiDIsT.esm.js} +172 -123
  121. package/dist/{idOcrStateMachine-YbjjC_Gg.esm.js → idOcrStateMachine-CDQ5d_VM.esm.js} +4 -4
  122. package/dist/{idVerificationStateMachine-xbw9HP1Z.esm.js → idVerificationStateMachine-kRxwImzO.esm.js} +2 -2
  123. package/dist/identity-reuse.d.ts +4 -530
  124. package/dist/identity-reuse.esm.js +8 -274
  125. package/dist/identityReuseManager-C6n_97dw.esm.js +95 -0
  126. package/dist/identityReuseManager-Cww-NDtd.d.ts +428 -0
  127. package/dist/identityReuseStateMachine-BfE5YiEr.esm.js +148 -0
  128. package/dist/{index-BcRG8rtJ.d.ts → index-B5hPA0Bg.d.ts} +2 -2
  129. package/dist/{index-ChHWNH48.d.ts → index-B9NysVDB.d.ts} +469 -195
  130. package/dist/index.d.ts +2 -2
  131. package/dist/index.esm.js +10 -8
  132. package/dist/{invokeOnCaptureCallback-rc6kBHo5.esm.js → invokeOnCaptureCallback-ygByVdnn.esm.js} +1 -1
  133. package/dist/{lib-BB0B_qQX.esm.js → lib-BY67lgbq.esm.js} +1 -1
  134. package/dist/mandatory-consent.d.ts +8 -412
  135. package/dist/mandatory-consent.esm.js +6 -76
  136. package/dist/mandatoryConsentManager-Dq6WiOZh.d.ts +429 -0
  137. package/dist/mandatoryConsentManager-H6D18cZB.esm.js +89 -0
  138. package/dist/{mandatoryConsentStateMachine-Cnco1jvn.esm.js → mandatoryConsentStateMachine-DtQNW1ji.esm.js} +6 -6
  139. package/dist/openviduLazy-B8L--0oe.esm.js +3 -0
  140. package/dist/{openviduLazy-Cok70ZSg.esm.js → openviduLazy-Dh14JNJc.esm.js} +2 -2
  141. package/dist/otp-CGMdUzBC.esm.js +33 -0
  142. package/dist/otp-DF5A0sFx.d.ts +8 -0
  143. package/dist/permissionGuards-D0wGddy7.esm.js +23 -0
  144. package/dist/permissionServices-Doec4X5L.esm.js +130 -0
  145. package/dist/phone.d.ts +4 -3
  146. package/dist/phone.esm.js +6 -5
  147. package/dist/{phoneManager-DAJbGhlY.esm.js → phoneManager-BmF-0Ez4.esm.js} +30 -7
  148. package/dist/{phoneManager-B6M30hKE.d.ts → phoneManager-fPmIBYQK.d.ts} +65 -7
  149. package/dist/{phoneStateMachine-CuPARRaT.esm.js → phoneStateMachine-BiV0yoEx.esm.js} +46 -11
  150. package/dist/{qe-signature-DFo_Cc-I.esm.js → qe-signature-CUYPcHVo.esm.js} +1 -1
  151. package/dist/qe-signature.d.ts +3 -3
  152. package/dist/qe-signature.esm.js +6 -5
  153. package/dist/{recordingService-Ig2UgbLv.esm.js → recordingService-yRw7hfzU.esm.js} +197 -179
  154. package/dist/redirect-to-mobile.d.ts +6 -104
  155. package/dist/redirect-to-mobile.esm.js +6 -99
  156. package/dist/redirectToMobileManager-BNe3IzC_.d.ts +178 -0
  157. package/dist/redirectToMobileManager-Dy3t7o0C.esm.js +159 -0
  158. package/dist/{redirectToMobileStateMachine-BOEqe46A.esm.js → redirectToMobileStateMachine-DyAdRxfP.esm.js} +28 -19
  159. package/dist/{runChildModule-CqqwqAkW.esm.js → runChildModule-CuoHZ1cx.esm.js} +35 -3
  160. package/dist/selfie.d.ts +13 -11
  161. package/dist/selfie.esm.js +53 -24
  162. package/dist/{selfieManager-Duisl7qN.esm.js → selfieManager-BNuTIGAz.esm.js} +6 -6
  163. package/dist/{selfieManager-D0lSgd-J.d.ts → selfieManager-C2y_t6DG.d.ts} +4 -4
  164. package/dist/{selfieStateMachine-D76whWEf.esm.js → selfieStateMachine-Bv99bZJE.esm.js} +5 -3
  165. package/dist/session-DoVb-OcB.esm.js +152 -0
  166. package/dist/session.d.ts +37 -5
  167. package/dist/session.esm.js +12 -7
  168. package/dist/sessionInitializer-DRB-hgbV.esm.js +366 -0
  169. package/dist/{setup-C5AITV8m.d.ts → setup-BwCluiw3.d.ts} +86 -6
  170. package/dist/{setup-DPPAxmXf.esm.js → setup-CUO4mErT.esm.js} +175 -25
  171. package/dist/signature.d.ts +2 -2
  172. package/dist/signature.esm.js +4 -4
  173. package/dist/{signatureStateMachine-B5-QVUve.esm.js → signatureStateMachine-C5qqYLRz.esm.js} +3 -3
  174. package/dist/stats-BMNUG1AU.esm.js +41 -0
  175. package/dist/stats.d.ts +13 -2
  176. package/dist/stats.esm.js +3 -2
  177. package/dist/trust-graph.d.ts +33 -4
  178. package/dist/trust-graph.esm.js +21 -15
  179. package/dist/{types-CFV9G_7j.d.ts → types-Bj9hdFjU.d.ts} +1 -1
  180. package/dist/{types-BP1m8VRw.d.ts → types-DOUhndhT.d.ts} +14 -2
  181. package/dist/types-DsnEVMhr.esm.js +34 -0
  182. package/dist/types-DvGZI7BF.d.ts +131 -0
  183. package/dist/{types-B06Ypu2F.d.ts → types-NuT8ftBV.d.ts} +1 -1
  184. package/dist/types-ya0LN_MX.d.ts +5 -0
  185. package/dist/{warmup-CEcppFiS.d.ts → warmup-Dg8Lh-50.d.ts} +8 -0
  186. package/dist/wasm.d.ts +6 -4
  187. package/dist/wasm.esm.js +11 -9
  188. package/dist/watchlist-for-business.d.ts +1 -1
  189. package/dist/watchlist-for-business.esm.js +5 -73
  190. package/dist/watchlist.d.ts +1 -1
  191. package/dist/watchlist.esm.js +4 -41
  192. package/dist/watchlistForBusinessStateMachine-DMl8j2Ov.esm.js +74 -0
  193. package/dist/watchlistStateMachine-DmQlqI6L.esm.js +50 -0
  194. package/dist/workflow.d.ts +146 -100
  195. package/dist/workflow.esm.js +116 -66
  196. package/package.json +19 -1
  197. package/dist/StateMachine-BCQrZJhf.d.ts +0 -2
  198. package/dist/WasmUtilProvider-j98OJf-S.esm.js +0 -114
  199. package/dist/browserSimulation-gxD8cSpM.esm.js +0 -20
  200. package/dist/deepsightService-O74l4Y__.esm.js +0 -489
  201. package/dist/displayErrors-DqJ_IbsG.d.ts +0 -39
  202. package/dist/flowCompletionService-DhkT4SRY.d.ts +0 -10
  203. package/dist/flowCompletionService-P54yzGvA.esm.js +0 -13
  204. package/dist/openviduLazy-Cm0XFh_v.esm.js +0 -3
  205. package/dist/permissionServices-D_i6nzEw.esm.js +0 -50
  206. package/dist/stats-CIfiPzb1.esm.js +0 -16
  207. package/dist/types-CAD4va6a.d.ts +0 -5
  208. package/dist/watchlistServices-DMbUhkBX.esm.js +0 -12
  209. /package/dist/{Actor-CI32dTbG.d.ts → Actor-Y0_Fj-KL.d.ts} +0 -0
  210. /package/dist/{ITimerCapability-C67ZRskg.esm.js → ITimerCapability-CB0I1Uf2.esm.js} +0 -0
  211. /package/dist/{Manager-C8PrhBOx.d.ts → Manager-BHn8wH8K.d.ts} +0 -0
  212. /package/dist/{camera-PA2Ljri3.esm.js → camera-DJWm3V4g.esm.js} +0 -0
  213. /package/dist/{camera-DBSxa6ML.d.ts → camera-SRBpPq2X.d.ts} +0 -0
  214. /package/dist/{chunk-CRF6K_H_.esm.js → chunk-CMUKZ2uL.esm.js} +0 -0
  215. /package/dist/{cpf-PPz2Njto.esm.js → cpf-BRzggV8G.esm.js} +0 -0
  216. /package/dist/{dateUtils-UoN5xswP.esm.js → dateUtils-AksLQmgV.esm.js} +0 -0
  217. /package/dist/{platform-CfrjKhmi.esm.js → platform-SKvEfCBh.esm.js} +0 -0
  218. /package/dist/{xstate.esm-B70JrNqo.esm.js → xstate.esm-C9wncMQa.esm.js} +0 -0
@@ -0,0 +1,276 @@
1
+ import { t as api } from "./api-CESGtpbH.esm.js";
2
+ import { t as addDeviceStats } from "./stats-BMNUG1AU.esm.js";
3
+ import { n as getThumbmarkId, r as getParsedUserAgent, t as isBrowserSimulation } from "./browserSimulation-B1dWiXp7.esm.js";
4
+ import { t as getUserAgent } from "./getBrowser-C8DP7oTB.esm.js";
5
+ import { i as stopCameraStream, r as requestCameraAccess } from "./camera-DJWm3V4g.esm.js";
6
+ import { t as IncodeCanvas } from "./canvas-SKcRBxsk.esm.js";
7
+ import { t as getDeviceInfo } from "./getDeviceClass-C0olyNFS.esm.js";
8
+
9
+ //#region ../infra/src/media/video.ts
10
+ /**
11
+ * Creates a hidden video element for a stream and appends it to document.body.
12
+ */
13
+ function createHiddenVideoElement(stream) {
14
+ if (typeof document === "undefined") throw new Error("Document not available");
15
+ const video = document.createElement("video");
16
+ video.autoplay = true;
17
+ video.playsInline = true;
18
+ video.muted = true;
19
+ video.srcObject = stream;
20
+ video.style.width = "0px";
21
+ video.style.height = "0px";
22
+ video.style.position = "absolute";
23
+ video.style.top = "0";
24
+ video.style.left = "0";
25
+ video.style.zIndex = "-1";
26
+ document.body.appendChild(video);
27
+ return {
28
+ element: video,
29
+ dispose: () => {
30
+ const current = video.srcObject;
31
+ if (current instanceof MediaStream) for (const track of current.getTracks()) track.stop();
32
+ video.srcObject = null;
33
+ if (video.parentElement) video.parentElement.removeChild(video);
34
+ }
35
+ };
36
+ }
37
+
38
+ //#endregion
39
+ //#region src/internal/deepsight/metadataService.ts
40
+ function createMetadataService(wasmUtil, visibility, browserEnv, ipLookup) {
41
+ return {
42
+ async initialize(sdkVersion, disableIpify = false) {
43
+ wasmUtil.setSdkPlatform("WEBAPP");
44
+ wasmUtil.setSdkVersion(sdkVersion);
45
+ const ua = getUserAgent();
46
+ const parsedUa = getParsedUserAgent(ua);
47
+ const isMobile = /Android|iPhone|iPad|iPod/i.test(ua);
48
+ const deviceInfo = getDeviceInfo();
49
+ let fingerprintHash = "";
50
+ try {
51
+ fingerprintHash = await getThumbmarkId();
52
+ } catch {
53
+ fingerprintHash = browserEnv.generateCanvasFingerprint();
54
+ }
55
+ const ip = disableIpify ? "" : await ipLookup.getIp();
56
+ const screenDimensions = browserEnv.getScreenDimensions();
57
+ const model = [parsedUa.device.vendor, parsedUa.device.model].filter(Boolean).join(" ");
58
+ const deviceMetadata = {
59
+ kind: isMobile ? "mobile" : "desktop",
60
+ model,
61
+ os: parsedUa.os.name ?? "",
62
+ osVersion: parsedUa.os.version ?? "",
63
+ screenDimensions,
64
+ numTouchPoints: deviceInfo.maxTouchPoints,
65
+ fingerprintHash,
66
+ ip,
67
+ backgroundMode: false
68
+ };
69
+ wasmUtil.setDeviceInfo(deviceMetadata);
70
+ const navigatorPrefixes = browserEnv.getNavigatorPrefixes();
71
+ const browserInfo = {
72
+ userAgent: ua,
73
+ getUserMediaAvailability: {
74
+ webkit: navigatorPrefixes.webkit,
75
+ moz: navigatorPrefixes.moz,
76
+ o: navigatorPrefixes.o,
77
+ ms: navigatorPrefixes.ms
78
+ },
79
+ webglFingerprint: browserEnv.getWebGLRenderer(),
80
+ inspectorOpened: false,
81
+ isMockedBrowser: isBrowserSimulation(browserEnv)
82
+ };
83
+ wasmUtil.setBrowserInfo(browserInfo, false);
84
+ },
85
+ updateCameraInfo(videoTrack) {
86
+ const settings = videoTrack.getSettings();
87
+ const capabilities = videoTrack.getCapabilities?.() ?? {};
88
+ const labels = videoTrack.label ? [videoTrack.label] : [];
89
+ const cameraInfo = {
90
+ facingMode: settings.facingMode === "user" ? "frontal" : settings.facingMode === "environment" ? "back" : settings.facingMode || "unknown",
91
+ settings,
92
+ capabilities,
93
+ labels
94
+ };
95
+ wasmUtil.setCameraInfo(cameraInfo);
96
+ },
97
+ async checkForVirtualCameraByLabel(videoTrack = null) {
98
+ try {
99
+ if (!videoTrack) {
100
+ const labels = await browserEnv.enumerateVideoDeviceLabels();
101
+ for (const label of labels) if (wasmUtil.isVirtualCamera(label)) return true;
102
+ }
103
+ if (videoTrack && wasmUtil.isVirtualCamera(videoTrack.label)) return true;
104
+ return false;
105
+ } catch {
106
+ return false;
107
+ }
108
+ },
109
+ async analyzeFrame(imageData) {
110
+ await wasmUtil.analyzeFrame(imageData);
111
+ },
112
+ setMotionStatus(status) {
113
+ wasmUtil.setMotionStatus(status);
114
+ },
115
+ setBackgroundMode(backgroundMode) {
116
+ wasmUtil.setBackgroundMode(backgroundMode || visibility.wasBackgrounded);
117
+ visibility.reset();
118
+ },
119
+ estimatePerformance() {
120
+ return wasmUtil.estimatePerformance();
121
+ },
122
+ getMetadata() {
123
+ return wasmUtil.getMetadata();
124
+ },
125
+ getCheck() {
126
+ return wasmUtil.getCheck();
127
+ },
128
+ getPipelineState() {
129
+ return wasmUtil.getPipelineState();
130
+ },
131
+ preparePipelineState() {
132
+ wasmUtil.getPipelineState();
133
+ }
134
+ };
135
+ }
136
+
137
+ //#endregion
138
+ //#region src/internal/deepsight/motionStatusService.ts
139
+ function createMotionStatusService(motionSensor) {
140
+ return {
141
+ async requestPermission() {
142
+ return motionSensor.requestPermission();
143
+ },
144
+ async start() {
145
+ await motionSensor.start();
146
+ },
147
+ stop() {
148
+ motionSensor.stop();
149
+ },
150
+ check() {
151
+ return motionSensor.check();
152
+ },
153
+ get isRunning() {
154
+ return motionSensor.isRunning;
155
+ },
156
+ get hasPermission() {
157
+ return motionSensor.hasPermission;
158
+ }
159
+ };
160
+ }
161
+
162
+ //#endregion
163
+ //#region src/internal/virtualCameraCheck.ts
164
+ /**
165
+ * Sends the analyzed frame image to the backend for logging.
166
+ */
167
+ async function logFrame({ source, base64Image, token }) {
168
+ try {
169
+ return (await api.post("/omni/log/frame/v2", { base64Image }, {
170
+ query: { source },
171
+ headers: { "X-Incode-Hardware-Id": token }
172
+ })).data;
173
+ } catch {
174
+ return;
175
+ }
176
+ }
177
+ /**
178
+ * Runs the WASM virtual camera check and handles logging and stats.
179
+ */
180
+ async function runVirtualCameraCheck({ wasmUtil, source, token }) {
181
+ const output = {
182
+ canvas: null,
183
+ itr: null,
184
+ skipped: null
185
+ };
186
+ await wasmUtil.poc(output);
187
+ if (output.skipped !== false) return;
188
+ if (output.canvas && token) {
189
+ const base64Image = new IncodeCanvas(output.canvas).getBase64Image();
190
+ if (base64Image) await logFrame({
191
+ source,
192
+ base64Image,
193
+ token
194
+ });
195
+ }
196
+ if (output.itr === true) {
197
+ addDeviceStats({ virtualCameraDetected: true });
198
+ wasmUtil.setZc("FAIL");
199
+ } else if (output.itr === false) wasmUtil.setZc("PASS");
200
+ }
201
+
202
+ //#endregion
203
+ //#region src/internal/deepsight/deepsightService.ts
204
+ function createDeepsightService(config) {
205
+ const metadata = createMetadataService(config.wasmUtil, config.visibility, config.browserEnv, config.ipLookup);
206
+ const motion = createMotionStatusService(config.motionSensor);
207
+ return {
208
+ metadata,
209
+ motion,
210
+ async initialize(disableIpify = false) {
211
+ await metadata.initialize(config.sdkVersion, disableIpify);
212
+ metadata.estimatePerformance();
213
+ },
214
+ async requestMotionPermission() {
215
+ return motion.requestPermission();
216
+ },
217
+ async startMotionSensors() {
218
+ await motion.start();
219
+ },
220
+ async primeWasmMotionSensor() {
221
+ await config.wasmUtil.rsp();
222
+ config.wasmUtil.ssl();
223
+ },
224
+ stopMotionSensors() {
225
+ motion.stop();
226
+ },
227
+ async checkVirtualCamera(videoTrack) {
228
+ metadata.updateCameraInfo(videoTrack);
229
+ return metadata.checkForVirtualCameraByLabel(videoTrack);
230
+ },
231
+ async performVirtualCameraCheck(sessionToken, source) {
232
+ await runVirtualCameraCheck({
233
+ wasmUtil: config.wasmUtil,
234
+ source,
235
+ token: sessionToken
236
+ });
237
+ },
238
+ async performPrcCheck(params) {
239
+ const prcStream = await requestCameraAccess(params.constraints);
240
+ const hiddenVideo = createHiddenVideoElement(prcStream);
241
+ try {
242
+ await config.wasmUtil.prc();
243
+ } finally {
244
+ hiddenVideo.dispose();
245
+ stopCameraStream(prcStream);
246
+ }
247
+ },
248
+ async analyzeFrame(imageData) {
249
+ await motion.start();
250
+ await metadata.analyzeFrame(imageData);
251
+ metadata.preparePipelineState();
252
+ const motionStatus = motion.check();
253
+ metadata.setMotionStatus(motionStatus);
254
+ metadata.getCheck();
255
+ metadata.setBackgroundMode(false);
256
+ },
257
+ getMetadata() {
258
+ return metadata.getMetadata();
259
+ },
260
+ getMotionStatus() {
261
+ return motion.check();
262
+ },
263
+ getAnalysisStatus() {
264
+ return metadata.getCheck();
265
+ },
266
+ getPipelineState() {
267
+ return metadata.getPipelineState();
268
+ },
269
+ cleanup() {
270
+ motion.stop();
271
+ }
272
+ };
273
+ }
274
+
275
+ //#endregion
276
+ export { createDeepsightService as t };
@@ -1,5 +1,4 @@
1
- import { n as WasmPipeline } from "./warmup-CEcppFiS.js";
2
- import { t as CameraStream } from "./camera-DBSxa6ML.js";
1
+ import { n as WasmPipeline } from "./warmup-Dg8Lh-50.js";
3
2
 
4
3
  //#region ../infra/src/capabilities/IRecordingCapability.d.ts
5
4
  type RecordingPublisher = {
@@ -166,6 +165,11 @@ type IWasmUtilCapability = {
166
165
  setBackgroundMode(backgroundMode: boolean): void;
167
166
  setZc(zc: string): void;
168
167
  setInspectorOpened(opened: boolean): void;
168
+ /**
169
+ * Toggles the WASM module's production mode. When `true`, the native module
170
+ * suppresses its verbose debug logging/console output.
171
+ */
172
+ setProductionMode(productionMode: boolean): Promise<void>;
169
173
  getMetadata(): string;
170
174
  analyzeFrame(image: ImageData): Promise<void>;
171
175
  getCheck(): string;
@@ -178,6 +182,11 @@ type IWasmUtilCapability = {
178
182
  isVirtualCamera(label: string | null): boolean;
179
183
  prc(): Promise<void>;
180
184
  poc(output: VirtualCameraCheckOutput): Promise<void>;
185
+ rsp(): Promise<void>;
186
+ ssl(): void;
187
+ stl(): void;
188
+ osv(): void;
189
+ oev(): void;
181
190
  ckvcks(data: ArrayBuffer): void;
182
191
  getVersions(): Promise<unknown>;
183
192
  /**
@@ -186,166 +195,9 @@ type IWasmUtilCapability = {
186
195
  dispose(): Promise<void>;
187
196
  };
188
197
  //#endregion
189
- //#region ../infra/src/media/canvas.d.ts
190
- /**
191
- * Class representing a canvas element for image capture and manipulation.
192
- */
193
- declare class IncodeCanvas {
194
- canvas: HTMLCanvasElement;
195
- private base64Image;
196
- private blobData;
197
- /**
198
- * Creates an {@link IncodeCanvas} from a raw {@link ImageData} frame.
199
- * @param imageData - Frame pixels in RGBA format
200
- * @returns An {@link IncodeCanvas} containing the provided pixels
201
- */
202
- static fromImageData(imageData: ImageData): IncodeCanvas;
203
- /**
204
- * Create a new canvas element.
205
- * @param canvas_ - The canvas element to clone.
206
- */
207
- constructor(canvas_: HTMLCanvasElement);
208
- /**
209
- * Check if the current canvas is valid.
210
- */
211
- private checkCanvas;
212
- /**
213
- * Disposes of resources, including revoking object URLs to prevent memory leaks.
214
- */
215
- dispose(): void;
216
- /**
217
- * Release the data stored by IncodeCanvas.
218
- */
219
- release(): void;
220
- /**
221
- * Revokes the object URL if one exists, preventing memory leaks.
222
- * Use this when you no longer need the preview image URL.
223
- */
224
- revokeObjectURL(): void;
225
- /**
226
- * Get the width of the canvas.
227
- */
228
- width(): number | null;
229
- /**
230
- * Get the height of the canvas.
231
- */
232
- height(): number | null;
233
- /**
234
- * Set the width of the canvas.
235
- */
236
- setWidth(width: number): void;
237
- /**
238
- * Set the height of the canvas.
239
- */
240
- setHeight(height: number): void;
241
- /**
242
- * Clone the current canvas.
243
- */
244
- clone(): IncodeCanvas | null;
245
- /**
246
- * Deep clone the current IncodeCanvas including blob data.
247
- */
248
- deepClone(): Promise<IncodeCanvas | null>;
249
- /**
250
- * Returns the drawing context on the canvas.
251
- */
252
- getContext(contextId: '2d', contextAttributes?: CanvasRenderingContext2DSettings): CanvasRenderingContext2D | null;
253
- /**
254
- * Retrieves the image data from the canvas.
255
- */
256
- getImageData(): ImageData | null;
257
- /**
258
- * Updates the base64 representation of the current canvas image.
259
- */
260
- updateBase64Image(jpegQuality?: number): void;
261
- /**
262
- * Converts the current canvas element to a base64 string.
263
- */
264
- getBase64Image(jpegQuality?: number, includeDataURLPrefix?: boolean): string | null;
265
- /**
266
- * Sets the base64 representation of the current canvas image.
267
- */
268
- setBase64Image(base64Image: string | null): void;
269
- /**
270
- * Updates the Blob representation of the current canvas image.
271
- */
272
- updateBlob(jpegQuality?: number, includeDataURLPrefix?: boolean): void;
273
- /**
274
- * Converts a base64 string to a Blob and creates a URL for it.
275
- */
276
- static base64ToBlob(base64: string): {
277
- blob: Blob;
278
- url: string;
279
- } | null;
280
- /**
281
- * Retrieves the Blob data and its URL from the current canvas.
282
- */
283
- getBlobData(jpegQuality?: number, includeDataURLPrefix?: boolean): {
284
- blob: Blob;
285
- url: string;
286
- } | null;
287
- /**
288
- * Sets the Blob data of the current canvas image.
289
- */
290
- setBlobData(blobData: {
291
- blob: Blob;
292
- url: string;
293
- }): Promise<void>;
294
- /**
295
- * Returns a resized canvas according to video element size.
296
- */
297
- getResizedCanvas(videoElementWidth: number, videoElementHeight: number): IncodeCanvas | null;
298
- }
299
- //#endregion
300
- //#region ../infra/src/media/StreamCanvasCapture.d.ts
301
- type StreamCanvasCaptureOptions = {
302
- fps?: number;
303
- width?: number;
304
- height?: number;
305
- };
306
- type StreamCanvasCaptureEventMap = {
307
- frame: Event;
308
- };
309
- declare class StreamCanvasCapture {
310
- private video;
311
- private canvas;
312
- private ctx;
313
- private rafId;
314
- private lastFrameTimeSeconds;
315
- private lastTickTimeMs;
316
- private hasFrame;
317
- private disposed;
318
- private eventTarget;
319
- constructor(stream: CameraStream, options?: StreamCanvasCaptureOptions);
320
- addEventListener(type: keyof StreamCanvasCaptureEventMap, listener: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions): void;
321
- removeEventListener(type: keyof StreamCanvasCaptureEventMap, listener: EventListenerOrEventListenerObject | null, options?: boolean | EventListenerOptions): void;
322
- /**
323
- * Returns the latest cached frame as an {@link IncodeCanvas}.
324
- */
325
- getLatestCanvas(): IncodeCanvas | null;
326
- /**
327
- * Returns the latest cached frame as raw {@link ImageData}.
328
- */
329
- getLatestFrame(): ImageData | null;
330
- /**
331
- * Disposes internal resources and stops the capture loop.
332
- */
333
- dispose(): void;
334
- private rafLoop;
335
- private tick;
336
- }
337
- //#endregion
338
198
  //#region ../infra/src/capabilities/IMotionSensorCapability.d.ts
339
199
  type MotionStatus = 'PASS' | 'FAIL' | 'UNCLEAR';
340
200
  type MotionPermissionState = 'granted' | 'denied' | 'not-required';
341
- type IMotionSensorCapability = {
342
- requestPermission(): Promise<MotionPermissionState>;
343
- start(): Promise<void>;
344
- stop(): void;
345
- check(): MotionStatus;
346
- readonly isRunning: boolean;
347
- readonly hasPermission: boolean;
348
- };
349
201
  //#endregion
350
202
  //#region src/internal/deepsight/metadataService.d.ts
351
203
  type MetadataService = {
@@ -391,6 +243,7 @@ type DeepsightService = {
391
243
  initialize(disableIpify?: boolean): Promise<void>;
392
244
  requestMotionPermission(): Promise<'granted' | 'denied' | 'not-required'>;
393
245
  startMotionSensors(): Promise<void>;
246
+ primeWasmMotionSensor(): Promise<void>;
394
247
  stopMotionSensors(): void;
395
248
  checkVirtualCamera(videoTrack: MediaStreamTrack): Promise<boolean>;
396
249
  performVirtualCameraCheck(sessionToken: string | null, source: FrameSource): Promise<void>;
@@ -409,4 +262,4 @@ type DeepsightPrcCheckParams = {
409
262
  constraints: MediaStreamConstraints;
410
263
  };
411
264
  //#endregion
412
- export { IWasmUtilCapability as a, IMLProviderCapability as c, IRecordingCapability as d, RecordingConnection as f, IncodeCanvas as i, MLProviderConfig as l, IMotionSensorCapability as n, VirtualCameraCheckOutput as o, StreamCanvasCapture as r, WasmUtilConfig as s, DeepsightService as t, IStorageCapability as u };
265
+ export { IMLProviderCapability as a, IRecordingCapability as c, WasmUtilConfig as i, RecordingConnection as l, IWasmUtilCapability as n, MLProviderConfig as o, VirtualCameraCheckOutput as r, IStorageCapability as s, DeepsightService as t };
@@ -1,6 +1,7 @@
1
- import { i as isIPad } from "./platform-CfrjKhmi.esm.js";
2
- import { t as getUserAgent } from "./getBrowser-BSXUTWXw.esm.js";
3
- import { t as getDeviceClass } from "./getDeviceClass-BSntT9_j.esm.js";
1
+ import { i as isIPad } from "./platform-SKvEfCBh.esm.js";
2
+ import { t as getUserAgent } from "./getBrowser-C8DP7oTB.esm.js";
3
+ import "./getDeviceClass-C0olyNFS.esm.js";
4
+ import { t as getDeviceClass } from "./getDeviceClass-C8Do2qYu.esm.js";
4
5
 
5
6
  //#region src/internal/device/getBrowser.ts
6
7
  function getBrowser() {