@incodetech/welcome 1.85.0-20251217213623.0 → 1.85.0-20251218170039.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,4 +11,6 @@ type SardineContext = {
11
11
  };
12
12
  export declare const getSardineContext: () => SardineContext | null;
13
13
  export declare const enableDeviceRiskModule: ({ token, isSandbox, interviewId, }: EnableDeviceRiskModuleParams) => Promise<SardineContext>;
14
+ export declare const getDwnContext: () => any | null;
15
+ export declare const createDwnContext: () => any;
14
16
  export {};
@@ -88,7 +88,7 @@ declare class MlWasmJSApi {
88
88
  */
89
89
  allocateImageBuffers(imageWidth: number | null, imageHeight: number | null): Promise<void>;
90
90
  handleDetectionCallAndUpdateState(type: WasmPipelineType): Promise<void>;
91
- encryptImage(image: string): string;
91
+ ens(input: string): string;
92
92
  ckvcks(data: ArrayBuffer): void;
93
93
  isVirtualCamera(label: string | null): boolean;
94
94
  estimatePerformance(): string;
@@ -7699,7 +7699,7 @@ function getProfile(Be) {
7699
7699
  throw new Error(`Profile not found for type: ${Be}`);
7700
7700
  return Le;
7701
7701
  }
7702
- const wasmVersion = "v2.12.46";
7702
+ const wasmVersion = "v2.12.47";
7703
7703
  function generateBundle() {
7704
7704
  const Be = getFeatureFlag("id_text_barcode_readability") ? PipelineProfileName.IdCapture_3_02 : getFeatureFlag("id_model_hebrew_back_id") ? PipelineProfileName.IdCapture_2_02 : PipelineProfileName.IdCapture_2_01, Le = PipelineProfileName.SelfieWithQualityMetrics, Ye = PipelineProfileName.SelfieVideoSelfie, tt = PipelineProfileName.IdVideoSelfie_2_01;
7705
7705
  return [
@@ -7796,14 +7796,14 @@ class MlWasmJSApi {
7796
7796
  this.pipelineTypeToWasmEnum(Le)
7797
7797
  );
7798
7798
  }
7799
- encryptImage(Le) {
7799
+ ens(Le) {
7800
7800
  return this.checkWasmInitialization(
7801
- "Unable to encrypt the image, cpp API hasn't been initialized"
7802
- ), this.utilityApi.encryptImage(Le);
7801
+ "Unable to ens, cpp API hasn't been initialized"
7802
+ ), this.utilityApi.ens(Le);
7803
7803
  }
7804
7804
  ckvcks(Le) {
7805
7805
  this.checkWasmInitialization(
7806
- "Unable to compute video checksum, cpp API hasn't been initialized"
7806
+ "Unable to ckvcks, cpp API hasn't been initialized"
7807
7807
  ), this.utilityApi.ckvcks(Le);
7808
7808
  }
7809
7809
  isVirtualCamera(Le) {
@@ -8287,7 +8287,7 @@ class MlWasmJSApi {
8287
8287
  );
8288
8288
  }
8289
8289
  }
8290
- const MlWasmJSApi$1 = MlWasmJSApi.getInstance(), version$4 = "1.85.0-20251217213623.0";
8290
+ const MlWasmJSApi$1 = MlWasmJSApi.getInstance(), version$4 = "1.85.0-20251218170039.0";
8291
8291
  function e$2(Be, Le) {
8292
8292
  return function(Ye, tt) {
8293
8293
  return Object.prototype.hasOwnProperty.call(Ye, tt);
@@ -26978,6 +26978,11 @@ const FlexCenter = (Be) => /* @__PURE__ */ jsx$1(Flex, { justify: "center", alig
26978
26978
  background-color: ${(Be) => Be.tokens.button.primary.surface.pressed};
26979
26979
  }
26980
26980
 
26981
+ &:focus-visible {
26982
+ outline: ${(Be) => Be.tokens.focus.ringWidth} solid ${(Be) => Be.tokens.focus.ringColor};
26983
+ outline-offset: ${(Be) => Be.tokens.focus.ringOffset};
26984
+ }
26985
+
26981
26986
  &:disabled {
26982
26987
  background-color: ${(Be) => Be.tokens.button.primary.surface.disabled};
26983
26988
  border: 1px solid ${(Be) => Be.borderColor || Be.tokens.button.primary.border.disabled};
@@ -26996,6 +27001,11 @@ const FlexCenter = (Be) => /* @__PURE__ */ jsx$1(Flex, { justify: "center", alig
26996
27001
  width: 100%;
26997
27002
  height: 56px;
26998
27003
 
27004
+ &:focus-visible {
27005
+ outline: ${(Be) => Be.tokens.focus.ringWidth} solid ${(Be) => Be.tokens.focus.ringColor};
27006
+ outline-offset: ${(Be) => Be.tokens.focus.ringOffset};
27007
+ }
27008
+
26999
27009
  &:disabled {
27000
27010
  opacity: 0.5;
27001
27011
  }
@@ -27005,6 +27015,11 @@ const FlexCenter = (Be) => /* @__PURE__ */ jsx$1(Flex, { justify: "center", alig
27005
27015
  background: transparent;
27006
27016
  color: ${(Be) => Be.color || Be.tokens.button.secondary.text.default};
27007
27017
  border: 1.5px solid ${(Be) => Be.borderColor || Be.tokens.button.secondary.border.default};
27018
+
27019
+ &:focus-visible {
27020
+ outline: ${(Be) => Be.tokens.focus.ringWidth} solid ${(Be) => Be.tokens.focus.ringColor};
27021
+ outline-offset: ${(Be) => Be.tokens.focus.ringOffset};
27022
+ }
27008
27023
  }
27009
27024
 
27010
27025
  svg {
@@ -28459,7 +28474,24 @@ const buildButtonTokens = (Be, Le) => mergeWithOverrides(buildButtonBase(Be), Le
28459
28474
  primary: Be.text.body.primary,
28460
28475
  secondary: Be.text.body.secondary
28461
28476
  }
28462
- }), spinner$2 = buildSpinnerTokens(lightColors), animations = {
28477
+ }), spinner$2 = buildSpinnerTokens(lightColors), buildFocusBase = (Be) => ({
28478
+ /**
28479
+ * Focus ring thickness (2px minimum for WCAG compliance)
28480
+ */
28481
+ ringWidth: "2px",
28482
+ /**
28483
+ * Focus ring color - uses brand color for consistency and contrast
28484
+ */
28485
+ ringColor: Be.surface.primary[500],
28486
+ /**
28487
+ * Focus ring offset - creates space between element and ring
28488
+ */
28489
+ ringOffset: "2px",
28490
+ /**
28491
+ * Focus ring offset color - typically matches background
28492
+ */
28493
+ ringOffsetColor: Be.surface.neutral.light
28494
+ }), buildFocusTokens = (Be) => buildFocusBase(Be), focus = buildFocusTokens(lightColors), animations = {
28463
28495
  duration: {
28464
28496
  fast: "150ms",
28465
28497
  normal: "300ms",
@@ -28740,6 +28772,7 @@ const buildButtonTokens = (Be, Le) => mergeWithOverrides(buildButtonBase(Be), Le
28740
28772
  color: lightColors,
28741
28773
  typography: typography$1,
28742
28774
  spacing: spacing$1,
28775
+ focus,
28743
28776
  button,
28744
28777
  input,
28745
28778
  spinner: spinner$2
@@ -28886,14 +28919,14 @@ const buildColorPrimitives = (Be) => {
28886
28919
  )), mergeWithOverrides(Le, Ye);
28887
28920
  };
28888
28921
  function createTokens(Be = {}) {
28889
- var gt;
28922
+ var At;
28890
28923
  const Le = buildColorPrimitives(Be), Ye = buildReferenceWithOverrides(
28891
28924
  Le,
28892
- (gt = Be.reference) == null ? void 0 : gt.colors
28925
+ (At = Be.reference) == null ? void 0 : At.colors
28893
28926
  ), tt = mergeWithOverrides(
28894
28927
  typography$1,
28895
28928
  Be.typography
28896
- ), nt = buildButtonTokens(Ye, Be.button), ft = buildInputTokens(Ye), ht = buildSpinnerTokens(Ye, Be.spinner);
28929
+ ), nt = buildButtonTokens(Ye, Be.button), ft = buildInputTokens(Ye), ht = buildSpinnerTokens(Ye, Be.spinner), gt = buildFocusTokens(Ye);
28897
28930
  return {
28898
28931
  primitives: {
28899
28932
  color: Le,
@@ -28910,6 +28943,7 @@ function createTokens(Be = {}) {
28910
28943
  color: Ye,
28911
28944
  typography: tt,
28912
28945
  spacing: spacing$1,
28946
+ focus: gt,
28913
28947
  button: nt,
28914
28948
  input: ft,
28915
28949
  spinner: ht
@@ -151332,6 +151366,13 @@ const getCustomFields = ({ token: Be }) => api.get("/omni/get/custom-fields", {
151332
151366
  const nt = document.getElementsByTagName("script")[0];
151333
151367
  nt.parentNode.insertBefore(Ye, nt);
151334
151368
  });
151369
+ }, loadDwnSDK = async () => {
151370
+ const Be = document.createElement("script");
151371
+ return Be.type = "text/javascript", Be.async = !0, Be.src = "https://demo-aps.incodesmile.com/dwn_profiling.js", new Promise((Le) => {
151372
+ Be.onload = () => Le();
151373
+ const Ye = document.getElementsByTagName("script")[0];
151374
+ Ye.parentNode.insertBefore(Be, Ye);
151375
+ });
151335
151376
  };
151336
151377
  let sardineContext = null;
151337
151378
  const getSardineContext = () => sardineContext, createSardineContextFromSardine = ({
@@ -151354,6 +151395,7 @@ const getSardineContext = () => sardineContext, createSardineContextFromSardine
151354
151395
  addEvent({
151355
151396
  code: "externalRiskSDKInitialized",
151356
151397
  payload: {
151398
+ riskService: "sardine",
151357
151399
  sardineData: {
151358
151400
  deviceId: ht.deviceId,
151359
151401
  uuid: ht.uuid
@@ -151382,6 +151424,7 @@ const getSardineContext = () => sardineContext, createSardineContextFromSardine
151382
151424
  addEvent({
151383
151425
  code: "externalRiskSDKInitialized",
151384
151426
  payload: {
151427
+ riskService: "sardine",
151385
151428
  sardineData: {
151386
151429
  deviceId: nt.deviceId,
151387
151430
  uuid: nt.uuid
@@ -151404,7 +151447,7 @@ const getSardineContext = () => sardineContext, createSardineContextFromSardine
151404
151447
  SardineUserID: void 0
151405
151448
  }
151406
151449
  }));
151407
- shouldDoSardineContextFromSardine(tt) && (await loadSardineSDK(Le), sardineContext = createSardineContextFromSardine({
151450
+ await loadDwnSDK(), dwnContext = createDwnContext(), shouldDoSardineContextFromSardine(tt) && (await loadSardineSDK(Le), sardineContext = createSardineContextFromSardine({
151408
151451
  sardineClientId: tt.SardineClientID,
151409
151452
  sardineSessionKey: tt.SardineSessionKey,
151410
151453
  sardineUserId: tt.SardineUserID,
@@ -151419,6 +151462,14 @@ const getSardineContext = () => sardineContext, createSardineContextFromSardine
151419
151462
  token: Be,
151420
151463
  interviewId: Ye
151421
151464
  })), sardineContext;
151465
+ };
151466
+ let dwnContext = null;
151467
+ const getDwnContext = () => dwnContext, createDwnContext = () => {
151468
+ var Be;
151469
+ return dwnContext = (Be = window == null ? void 0 : window.dwn) == null ? void 0 : Be.start({
151470
+ geo_location_enabled: !1,
151471
+ mouse: !0
151472
+ }), dwnContext;
151422
151473
  }, eventModuleNames = {
151423
151474
  selfie: "SELFIE",
151424
151475
  authFace: "AUTH_FACE",
@@ -159512,7 +159563,7 @@ async function identify({
159512
159563
  return api.post("/omni/oneToN/identify?returnIPDeviceLocation=true", {
159513
159564
  authReference: Ye,
159514
159565
  selfie: {
159515
- base64Image: await MlWasmJSApi$1.encryptImage(Be),
159566
+ base64Image: await MlWasmJSApi$1.ens(Be),
159516
159567
  faceCoordinates: Le,
159517
159568
  clientInfo: { deviceClass: getDeviceClass() }
159518
159569
  },
@@ -159531,7 +159582,7 @@ async function identifyInstantVerify({
159531
159582
  return api.post(
159532
159583
  "/omni/instant/verify/face",
159533
159584
  {
159534
- base64Image: await MlWasmJSApi$1.encryptImage(Le),
159585
+ base64Image: await MlWasmJSApi$1.ens(Le),
159535
159586
  faceCoordinates: Ye,
159536
159587
  clientInfo: { deviceClass: getDeviceClass() }
159537
159588
  },
@@ -159564,7 +159615,7 @@ async function oneToOneIdentify({
159564
159615
  videoRecordingId: ht,
159565
159616
  videoRecordingToken: gt,
159566
159617
  selfie: {
159567
- base64Image: await MlWasmJSApi$1.encryptImage(Be),
159618
+ base64Image: await MlWasmJSApi$1.ens(Be),
159568
159619
  clientInfo: { deviceClass: getDeviceClass() }
159569
159620
  }
159570
159621
  }).then((At) => At.data).catch((At) => {
@@ -161443,7 +161494,7 @@ class DeepsightVideoRecorder extends InterruptionHandler {
161443
161494
  try {
161444
161495
  const At = new Blob(ft, { type: this.mimeType }), xt = await trimLastNSeconds(At, 10);
161445
161496
  this.trimmedVideoBlob = xt;
161446
- const Et = MlWasmJSApi$1.encryptImage(
161497
+ const Et = MlWasmJSApi$1.ens(
161447
161498
  await toBase64(xt)
161448
161499
  );
161449
161500
  if (MlWasmJSApi$1.ckvcks(await xt.arrayBuffer()), !Ye) {
@@ -365812,6 +365863,7 @@ function FlowRenderer({
365812
365863
  }
365813
365864
  if (!At) return null;
365814
365865
  const Tt = At.flowModules, Rt = Tt[yt], Bt = async () => {
365866
+ var Nt, Lt;
365815
365867
  const Dt = Tt.length;
365816
365868
  bt.stepCompleted(Rt.key, yt, Dt);
365817
365869
  const Pt = yt + 1;
@@ -365819,8 +365871,17 @@ function FlowRenderer({
365819
365871
  bt.stepStarted(Tt[Pt].key, Pt, Dt), Ct(Pt);
365820
365872
  else {
365821
365873
  vt(!0);
365822
- const { redirectionUrl: Nt } = await getFinishStatus(void 0, { token: Be });
365823
- bt.flowCompleted(Dt), Ye({ redirectionUrl: Nt });
365874
+ const { redirectionUrl: Wt } = await getFinishStatus(void 0, { token: Be });
365875
+ (Lt = (Nt = getDwnContext()) == null ? void 0 : Nt.collect()) == null || Lt.then(($t) => {
365876
+ addEvent({
365877
+ code: "externalRiskSDKInitialized",
365878
+ payload: {
365879
+ riskService: "dwn",
365880
+ dwnData: { blob: $t }
365881
+ },
365882
+ token: Be
365883
+ });
365884
+ }).catch(console.error), bt.flowCompleted(Dt), Ye({ redirectionUrl: Wt });
365824
365885
  }
365825
365886
  };
365826
365887
  return kt ? /* @__PURE__ */ jsxRuntimeExports.jsx(Spinner$6, {}) : It ? /* @__PURE__ */ jsxRuntimeExports.jsx(