bry-biometric-collector 3.3.0-RC02 → 3.3.0-RC04

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 (22) hide show
  1. package/README.md +8 -3
  2. package/dist/{DocumentCollector_d1c80ecf_3.3.0-RC02.js → DocumentCollector_defd5e57_3.3.0-RC04.js} +258 -258
  3. package/dist/FaceCollector_16e3c9ed_3.3.0-RC04.js +2392 -0
  4. package/dist/{ValidationAlert_f608a307_3.3.0-RC02.js → ValidationAlert_722c259d_3.3.0-RC04.js} +122 -122
  5. package/dist/{___vite-browser-external_commonjs-proxy_18980ff7_3.3.0-RC02.js → ___vite-browser-external_commonjs-proxy_c9629267_3.3.0-RC04.js} +1 -1
  6. package/dist/bry-biometric-collector-main.js +2 -2
  7. package/dist/faceApi_8254146e_3.3.0-RC04.js +15 -0
  8. package/dist/{fingersApi_e73e0484_3.3.0-RC02.js → fingersApi_2e316625_3.3.0-RC04.js} +34 -34
  9. package/dist/index.d.ts +2 -2
  10. package/dist/index.js +2 -2
  11. package/dist/{index_c6027bfe_3.3.0-RC02.js → index_882c2cd7_3.3.0-RC04.js} +3 -3
  12. package/dist/{index_0e3c2de1_3.3.0-RC02.js → index_ccdcae61_3.3.0-RC04.js} +3 -3
  13. package/dist/{main_92f80aa7_3.3.0-RC02.js → main_adc308db_3.3.0-RC04.js} +6434 -6398
  14. package/package.json +4 -2
  15. package/dist/FaceCollector_0019b3db_3.3.0-RC02.js +0 -2365
  16. package/dist/faceApi_940794d6_3.3.0-RC02.js +0 -17
  17. /package/dist/{en-us_e83efd5d_3.3.0-RC02.js → en-us_e83efd5d_3.3.0-RC04.js} +0 -0
  18. /package/dist/{es-cl_5939150a_3.3.0-RC02.js → es-cl_5939150a_3.3.0-RC04.js} +0 -0
  19. /package/dist/{face_api_0e3ce8c8_3.3.0-RC02.js → face_api_0e3ce8c8_3.3.0-RC04.js} +0 -0
  20. /package/dist/{index-idlf-detector_39cfdffa_3.3.0-RC02.js → index-idlf-detector_39cfdffa_3.3.0-RC04.js} +0 -0
  21. /package/dist/{index-idlf-detector_a819b3c8_3.3.0-RC02.js → index-idlf-detector_a819b3c8_3.3.0-RC04.js} +0 -0
  22. /package/dist/{pt-br_fae15356_3.3.0-RC02.js → pt-br_fae15356_3.3.0-RC04.js} +0 -0
@@ -1,4 +1,4 @@
1
- import { bw as D, bx as V } from "./main_92f80aa7_3.3.0-RC02.js";
1
+ import { bA as D, bB as V } from "./main_adc308db_3.3.0-RC04.js";
2
2
  function H(e, t) {
3
3
  for (var n = 0; n < t.length; n++) {
4
4
  const r = t[n];
@@ -1,5 +1,5 @@
1
- import { by as a } from "./main_92f80aa7_3.3.0-RC02.js";
2
- import "./face_api_0e3ce8c8_3.3.0-RC02.js";
1
+ import { bC as a } from "./main_adc308db_3.3.0-RC04.js";
2
+ import "./face_api_0e3ce8c8_3.3.0-RC04.js";
3
3
  export {
4
4
  a as default
5
5
  };
@@ -0,0 +1,15 @@
1
+ import { w as a, x as r, y as i, d as n, j as o } from "./main_adc308db_3.3.0-RC04.js";
2
+ import "./FaceCollector_16e3c9ed_3.3.0-RC04.js";
3
+ import "./face_api_0e3ce8c8_3.3.0-RC04.js";
4
+ import "./ValidationAlert_722c259d_3.3.0-RC04.js";
5
+ async function p(t) {
6
+ try {
7
+ a("Capturing single face"), r.set(t), i.set(!0);
8
+ } catch (e) {
9
+ n("caught while validating face image: ", e.toString());
10
+ }
11
+ return { returnCode: o.CAPTURED };
12
+ }
13
+ export {
14
+ p as captureSingleFace
15
+ };
@@ -1,36 +1,36 @@
1
- import { u as m, $ as D, n as C, g as b, i as y, s as l, a as F, F as U, b as M, c, v as x, d as P, A as B, e as I, h as g, f as v, j as W, k as R, l as $, m as k, o as w, p as V } from "./main_92f80aa7_3.3.0-RC02.js";
2
- import "./face_api_0e3ce8c8_3.3.0-RC02.js";
3
- const f = m(D);
4
- var X = /* @__PURE__ */ ((n) => (n.EXTENSION_MISSING = "EXTENSION_MISSING", n.USER_CANCELLED = "USER_CANCELLED", n.UNAUTHORIZED_EXTENSION = "UNAUTHORIZED_EXTENSION", n.SCANNER_NOT_FOUND = "SCANNER_NOT_FOUND", n.EXTENSION_MODULE_NOT_INSTALLED = "EXTENSION_MODULE_NOT_INSTALLED", n.FINGER_NOT_REMOVED = "FINGER_NOT_REMOVED", n.UNKNOWN_ERROR = "UNKNOWN_ERROR", n.EVALUATE_BIOMETRICS_TIMEOUT = "EVALUATE_BIOMETRICS_TIMEOUT", n.EVALUATE_BIOMETRICS_NETWORK_ISSUE = "EVALUATE_BIOMETRICS_NETWORK_ISSUE", n))(X || {});
1
+ import { u as D, $ as C, n as b, g as y, i as M, s as l, a as F, l as U, F as L, b as x, c as E, v as P, d as B, e as W, A as v, f as $, h as I, j as g, k, m as q, o as R, p as V, q as X, r as p, t as G } from "./main_adc308db_3.3.0-RC04.js";
2
+ import "./face_api_0e3ce8c8_3.3.0-RC04.js";
3
+ const f = D(C);
4
+ var Q = /* @__PURE__ */ ((n) => (n.EXTENSION_MISSING = "EXTENSION_MISSING", n.USER_CANCELLED = "USER_CANCELLED", n.UNAUTHORIZED_EXTENSION = "UNAUTHORIZED_EXTENSION", n.SCANNER_NOT_FOUND = "SCANNER_NOT_FOUND", n.EXTENSION_MODULE_NOT_INSTALLED = "EXTENSION_MODULE_NOT_INSTALLED", n.FINGER_NOT_REMOVED = "FINGER_NOT_REMOVED", n.UNKNOWN_ERROR = "UNKNOWN_ERROR", n.EVALUATE_BIOMETRICS_TIMEOUT = "EVALUATE_BIOMETRICS_TIMEOUT", n.EVALUATE_BIOMETRICS_NETWORK_ISSUE = "EVALUATE_BIOMETRICS_NETWORK_ISSUE", n))(Q || {});
5
5
  class r extends Error {
6
6
  constructor(a, d) {
7
7
  super(a), this.status = d;
8
8
  }
9
9
  }
10
- async function H(n, a) {
11
- const d = C([n])[0], T = b();
12
- if (y(T))
10
+ async function z(n, a) {
11
+ const d = b([n])[0], T = y();
12
+ if (M(T))
13
13
  throw new r(
14
14
  "Attempting to capture finger but the extension apparently hasn't been properly injected. Received: " + T,
15
15
  "EXTENSION_MISSING"
16
16
  /* EXTENSION_MISSING */
17
17
  );
18
18
  if (l(!0), F())
19
- throw l(!1), w(!1), new r(
19
+ throw l(!1), p(!1), new r(
20
20
  "User cancelled",
21
21
  "USER_CANCELLED"
22
22
  /* USER_CANCELLED */
23
23
  );
24
- let E = null;
24
+ let c = null;
25
25
  try {
26
- E = await T.getFingerprint(
26
+ c = await T.getFingerprint(
27
27
  // @ts-ignore TODO: Alex has to fix this functions signature to accept pojo
28
28
  JSON.stringify(
29
29
  a ?? { outputFormat: "BASE64", imageFormat: "BMP", nonce: "webCollector", timeout: 3 }
30
30
  )
31
31
  );
32
32
  } catch (e) {
33
- console.error(e);
33
+ U(e);
34
34
  const t = e;
35
35
  throw l(!1), t.key === "fingerprint.scanner.timeout" ? new r(
36
36
  "Fingerprint scan timed out (didn't read a finger.)",
@@ -55,35 +55,35 @@ async function H(n, a) {
55
55
  );
56
56
  }
57
57
  if (F())
58
- throw l(!1), w(!1), new r(
58
+ throw l(!1), p(!1), new r(
59
59
  "User cancelled",
60
60
  "USER_CANCELLED"
61
61
  /* USER_CANCELLED */
62
62
  );
63
- const i = q(d);
64
- i.image = E?.content.image?.data, i.base64WSQ = E?.content.fingerprint.data, i.nfiqRating = (E?.content.score || 0) + 98, i.status = U.AVAILABLE;
65
- const L = M(c());
63
+ const i = H(d);
64
+ i.image = c?.content.image?.data, i.base64WSQ = c?.content.fingerprint.data, i.nfiqRating = (c?.content.score || 0) + 98, i.status = L.AVAILABLE;
65
+ const w = x(E());
66
66
  let s, O = !1;
67
67
  try {
68
- s = await x(L, i);
68
+ s = await P(w, i);
69
69
  } catch (e) {
70
- if (i.nfiqRating = -1, i.base64WSQ = "", i.image = "", console.warn("caught while validating fingerprint: ", e.toString()), P(e) && "message" in e && e.message === "error.template.extraction")
70
+ if (i.nfiqRating = -1, i.base64WSQ = "", i.image = "", B("caught while validating fingerprint: ", e.toString()), W(e) && "message" in e && e.message === "error.template.extraction")
71
71
  O = !0;
72
72
  else if (e instanceof XMLHttpRequest) {
73
73
  const t = e;
74
74
  "response" in t && "data" in t.response.data && t.response.data.message === "error.template.extraction" && (O = !0);
75
75
  } else {
76
- if (e instanceof B)
77
- throw e.code === "ECONNABORTED" ? (console.log("The evaluate biometrics request took too long to answer!"), new r(
76
+ if (e instanceof v)
77
+ throw e.code === "ECONNABORTED" ? ($("The evaluate biometrics request took too long to answer!"), new r(
78
78
  "Evaluate biometrics took too long to reply",
79
79
  "EVALUATE_BIOMETRICS_TIMEOUT"
80
80
  /* EVALUATE_BIOMETRICS_TIMEOUT */
81
- )) : (console.error("Error evaluating biometrics!", e), I(c()), l(!1), new r(
81
+ )) : (U("Error evaluating biometrics!", e), I(E()), l(!1), new r(
82
82
  "Network issue while validating biometrics, check logs",
83
83
  "EVALUATE_BIOMETRICS_NETWORK_ISSUE"
84
84
  /* EVALUATE_BIOMETRICS_NETWORK_ISSUE */
85
85
  ));
86
- I(c()), l(!1);
86
+ I(E()), l(!1);
87
87
  }
88
88
  }
89
89
  let S, N, _, A, u, o = g.LOW_QUALITY;
@@ -91,42 +91,42 @@ async function H(n, a) {
91
91
  const e = s.bodyParts.find(
92
92
  (t) => t.bodyPart === i.bodyPart
93
93
  );
94
- i.nfiqRating = e.quality, (e.quality > v() || e.status === "LOW_QUALITY") && (S = !0, o = g.LOW_QUALITY), s.bodyParts.find((t) => t.status === "DUPLICATE") && (N = !0, o = g.DUPLICATE), s.bodyParts.find((t) => t.status === "FORBIDDEN") && (_ = !0, o = g.FORBIDDEN), s.bodyParts.find((t) => t.status === "AGR") && (A = !0, o = g.AGR_DETECTED), s.bodyParts.find((t) => t.status === "AGR_NOT_MATCH") && (u = !0, o = g.AGR_NO_MATCH);
94
+ i.nfiqRating = e.quality, (e.quality > k() || e.status === "LOW_QUALITY") && (S = !0, o = g.LOW_QUALITY), s.bodyParts.find((t) => t.status === "DUPLICATE") && (N = !0, o = g.DUPLICATE), s.bodyParts.find((t) => t.status === "FORBIDDEN") && (_ = !0, o = g.FORBIDDEN), s.bodyParts.find((t) => t.status === "AGR") && (A = !0, o = g.AGR_DETECTED), s.bodyParts.find((t) => t.status === "AGR_NOT_MATCH") && (u = !0, o = g.AGR_NO_MATCH);
95
95
  }
96
96
  if (N || S || _ || u || A || O) {
97
- i.nfiqRating = -1, i.base64WSQ = "", i.image = "", i.status = U.AVAILABLE;
97
+ i.nfiqRating = -1, i.base64WSQ = "", i.image = "", i.status = L.AVAILABLE;
98
98
  let e = "badFingerQualitySwal";
99
99
  N ? e = "unknownDuplicateFingerSwal" : _ ? e = "forbiddenFingerSwal" : A ? e = "agrFinger" : u && (e = "agrFingerNotMatched");
100
100
  let t = f(`${e}.text`);
101
- if (W(V) && N) {
101
+ if (q(G) && N) {
102
102
  e = "duplicateFingerSwal", t = f(`${e}.text`, {
103
103
  values: {
104
104
  finger1: f(`${e}.${s.matchingFingers?.[0]}`),
105
105
  finger2: f(`${e}.${s.matchingFingers?.[1]}`)
106
106
  }
107
107
  });
108
- const h = R();
108
+ const m = R();
109
109
  return {
110
110
  returnCode: o,
111
- bodyParts: h,
111
+ bodyParts: m,
112
112
  matchingFingers: s.matchingFingers,
113
113
  message: t
114
114
  };
115
115
  }
116
- const p = R();
117
- return { returnCode: o, bodyParts: p, message: t };
116
+ const h = R();
117
+ return { returnCode: o, bodyParts: h, message: t };
118
118
  }
119
- return I(c()), l(!1), $(), { returnCode: g.CAPTURED, bodyParts: R() };
119
+ return I(E()), l(!1), V(), { returnCode: g.CAPTURED, bodyParts: R() };
120
120
  }
121
- function q(n) {
122
- k();
123
- for (const a of c())
121
+ function H(n) {
122
+ X();
123
+ for (const a of E())
124
124
  if (a.index === n)
125
125
  return a.selected = !0, a;
126
126
  throw new Error(`Finger ${n} not found`);
127
127
  }
128
128
  export {
129
129
  r as CaptureApiError,
130
- X as CaptureErrorStatusEnum,
131
- H as captureSingleFinger
130
+ Q as CaptureErrorStatusEnum,
131
+ z as captureSingleFinger
132
132
  };
package/dist/index.d.ts CHANGED
@@ -47,7 +47,7 @@ export enum Props {
47
47
  MIN_EYE_TO_EYE_DIST = 'min_eye_to_eye_dist',
48
48
  SHOW_WATERMARK = 'show_watermark',
49
49
  FACE_DETECTION_SENSITIVITY = 'face_detection_sensitivity',
50
- CAMERA_DEVICE_ID = 'camera_device_id',
50
+ LIVENESS_BLOB_SIZE = 'liveness_blob_size'
51
51
  }
52
52
 
53
53
  export const enum BodyPartNames {
@@ -155,7 +155,7 @@ declare global {
155
155
  [Props.MIN_EYE_TO_EYE_DIST]: number;
156
156
  [Props.SHOW_WATERMARK]: string;
157
157
  [Props.FACE_DETECTION_SENSITIVITY]: string;
158
- [Props.CAMERA_DEVICE_ID]: string;
158
+ [Props.LIVENESS_BLOB_SIZE]: string;
159
159
  /**
160
160
  * Clears fingers and face, to make ready for a new collection.
161
161
  * Will not clear jwtToken.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { by as a } from "./main_92f80aa7_3.3.0-RC02.js";
2
- import "./face_api_0e3ce8c8_3.3.0-RC02.js";
1
+ import { bC as a } from "./main_adc308db_3.3.0-RC04.js";
2
+ import "./face_api_0e3ce8c8_3.3.0-RC04.js";
3
3
  export {
4
4
  a as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { l as vu, L as Au, r as se } from "./___vite-browser-external_commonjs-proxy_18980ff7_3.3.0-RC02.js";
2
- import { bv as Xa, bw as hr } from "./main_92f80aa7_3.3.0-RC02.js";
3
- import "./face_api_0e3ce8c8_3.3.0-RC02.js";
1
+ import { l as vu, L as Au, r as se } from "./___vite-browser-external_commonjs-proxy_c9629267_3.3.0-RC04.js";
2
+ import { bz as Xa, bA as hr } from "./main_adc308db_3.3.0-RC04.js";
3
+ import "./face_api_0e3ce8c8_3.3.0-RC04.js";
4
4
  function gr(e, t) {
5
5
  for (var n = 0; n < t.length; n++) {
6
6
  const s = t[n];
@@ -1,6 +1,6 @@
1
- import { bv as eo } from "./main_92f80aa7_3.3.0-RC02.js";
2
- import { r as x1, l as b1, L as y1 } from "./___vite-browser-external_commonjs-proxy_18980ff7_3.3.0-RC02.js";
3
- import "./face_api_0e3ce8c8_3.3.0-RC02.js";
1
+ import { bz as eo } from "./main_adc308db_3.3.0-RC04.js";
2
+ import { r as x1, l as b1, L as y1 } from "./___vite-browser-external_commonjs-proxy_c9629267_3.3.0-RC04.js";
3
+ import "./face_api_0e3ce8c8_3.3.0-RC04.js";
4
4
  var pu = { exports: {} };
5
5
  pu.exports;
6
6
  (function(n) {