bry-biometric-collector 3.1.0-RC03 → 3.1.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.
- package/README.md +13 -1
- package/dist/{DocumentCollector_9474f250_3.1.0-RC03.js → DocumentCollector_2a473026_3.1.0.js} +28 -28
- package/dist/FaceCollector_81109b31_3.1.0.js +2189 -0
- package/dist/{ValidationAlert_de35f79f_3.1.0-RC03.js → ValidationAlert_15dcf5cc_3.1.0.js} +27 -27
- package/dist/{___vite-browser-external_commonjs-proxy_1b577ab2_3.1.0-RC03.js → ___vite-browser-external_commonjs-proxy_e49f2f2d_3.1.0.js} +1 -1
- package/dist/bry-biometric-collector-main.js +2 -2
- package/dist/{fingersApi_7ab23b24_3.1.0-RC03.js → fingersApi_2c740dd1_3.1.0.js} +2 -2
- package/dist/index.js +2 -2
- package/dist/{index_df5e7131_3.1.0-RC03.js → index_248edde3_3.1.0.js} +3 -3
- package/dist/{index_11cf6399_3.1.0-RC03.js → index_554a0a33_3.1.0.js} +3 -3
- package/dist/{main_11e1c290_3.1.0-RC03.js → main_297fa10f_3.1.0.js} +118 -118
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/FaceCollector_067efaea_3.1.0-RC03.js +0 -2165
- /package/dist/{en-us_793b081f_3.1.0-RC03.js → en-us_793b081f_3.1.0.js} +0 -0
- /package/dist/{es-cl_b2f1fc4e_3.1.0-RC03.js → es-cl_b2f1fc4e_3.1.0.js} +0 -0
- /package/dist/{face_api_0e3ce8c8_3.1.0-RC03.js → face_api_0e3ce8c8_3.1.0.js} +0 -0
- /package/dist/{index-idlf-detector_39cfdffa_3.1.0-RC03.js → index-idlf-detector_39cfdffa_3.1.0.js} +0 -0
- /package/dist/{index-idlf-detector_a819b3c8_3.1.0-RC03.js → index-idlf-detector_a819b3c8_3.1.0.js} +0 -0
- /package/dist/{pt-br_b093cbbf_3.1.0-RC03.js → pt-br_b093cbbf_3.1.0.js} +0 -0
package/README.md
CHANGED
@@ -630,6 +630,18 @@ The web component listens to and emits a few events. The events emitted are:
|
|
630
630
|
{detail: {bodyPart: 'DOCUMENT', data: string, justification: string}}
|
631
631
|
```
|
632
632
|
|
633
|
+
- **console-open-status**: Emitted when the browser’s developer tools (DevTools) or console is opened, *when liveness is enabled*. The component actively monitors for console access to help prevent potential injection attacks during remote liveness evaluation. When this event is triggered, the integrator is expected to:
|
634
|
+
|
635
|
+
1. Close or reset the component,
|
636
|
+
2. Inform the user about the console access,
|
637
|
+
3. Optionally reopen the component securely.
|
638
|
+
|
639
|
+
This event allows integrators to implement proactive security responses and maintain the integrity of the liveness check process. The event payload has the structure:
|
640
|
+
|
641
|
+
```ts
|
642
|
+
{ detail: { isOpen: true } }
|
643
|
+
```
|
644
|
+
|
633
645
|
And the events the webcomponent listens to are:
|
634
646
|
|
635
647
|
- **change-tabs**: When received, the web component switches the currently displaying tab. This is useful when you want an outer tab switching mechanism. The event must contain the tab to switch to which must be either 'Face' or 'Fingers', for example:
|
@@ -641,7 +653,7 @@ dispatchEvent(new CustomEvent('change-tabs', { detail: 'Face' }));
|
|
641
653
|
- **extension-error**: When extension errors are caught, this event is fired . The data is exported like so:
|
642
654
|
|
643
655
|
```ts
|
644
|
-
{detail
|
656
|
+
{detail: {code: number, description: string, key: string }};
|
645
657
|
```
|
646
658
|
|
647
659
|
## **Slots**
|
package/dist/{DocumentCollector_9474f250_3.1.0-RC03.js → DocumentCollector_2a473026_3.1.0.js}
RENAMED
@@ -1,6 +1,6 @@
|
|
1
|
-
import { S as st, q as ot, r as nt, t as rt,
|
2
|
-
import { W as
|
3
|
-
import { matchDimensions as Qi, resizeResults as Yi } from "./face_api_0e3ce8c8_3.1.0
|
1
|
+
import { S as st, q as ot, r as nt, t as rt, x as j, y as S, z as p, bg as se, C as Q, D as g, a_ as oe, bh as Ot, U as I, I as E, K as M, bi as q, bj as hi, M as ne, R as H, B as $, b1 as _e, E as ee, G as F, H as U, J as te, N as X, O as v, Q as W, T as mi, V as it, W as at, X as Ge, Y as be, Z as G, _ as ve, a0 as bi, a1 as Ie, a3 as vi, a2 as de, a4 as we, a5 as Qe, a6 as Ye, a7 as Nt, ab as Ce, ad as Xe, ae as Ii, af as zt, ag as ye, $ as wi, aa as Ve, ai as jt, ak as xe, ap as Ci, aq as yi, as as Mi, at as pi, au as _i, aw as Je, ax as re, j as Di, ay as Ke, aN as kt, d as Me, aO as Rt, aP as qe, aQ as Ti, aC as $e, bk as Ai, aR as Oi, aS as Ni, aT as zi, av as ji, aU as ki, bl as Ri, aW as Ei, aX as pe, aY as Si, aZ as Zi, a$ as le, b0 as lt, b2 as Pi, b3 as V, b4 as x, w as Et, b5 as Wi, aF as Fi, b8 as et, bm as Hi } from "./main_297fa10f_3.1.0.js";
|
2
|
+
import { W as Li, C as Ui, V as Bi, a as Gi } from "./ValidationAlert_15dcf5cc_3.1.0.js";
|
3
|
+
import { matchDimensions as Qi, resizeResults as Yi } from "./face_api_0e3ce8c8_3.1.0.js";
|
4
4
|
const Xi = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwNiIgaGVpZ2h0PSI4OTAiIHZpZXdCb3g9IjAgMCAxMjA2IDg5MCIgZmlsbD0ibm9uZSIgb3BhY2l0eT0iMC4yIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZF8xOF80KSIgb3BhY2l0eT0iMCI+CiAgICA8bWFzayBpZD0icGF0aC0xLWluc2lkZS0xXzE4XzQiIGZpbGw9IndoaXRlIj4KICAgIDxyZWN0IHg9IjQiIHdpZHRoPSIxMTk4IiBoZWlnaHQ9Ijg4MiIgcng9IjYiLz4KICAgIDwvbWFzaz4KICAgIDxyZWN0IHg9IjQiIHdpZHRoPSIxMTk4IiBoZWlnaHQ9Ijg4MiIgcng9IjYiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS1vcGFjaXR5PSIwLjkiIHN0cm9rZS13aW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ICAgPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMTI3IDAiIHJlc3VsdD0iaGFyZEFscGhhIi8+CiAgICA8ZmVPZmZzZXQgZHk9IjQiLz4KICAgIDxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjIiLz4KICAgIDxmZUNvbXBvc2l0ZSBpbjI9ImhhcmRBbHBoYSIgb3BlcmF0b3I9Im91dCIvPgogICAgPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMjUgMCIvPgogICAgPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbjI9IkJhY2tncm91bmRJbWFnZUZpeCIgcmVzdWx0PSJlZmZlY3QxX2Ryb3BTaGFkb3dfMThfNCIvPgogICAgPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMThfNCIgcmVzdWx0PSJzaGFwZSIvPgogICAgPC9maWx0ZXI+CiAgICA8L2RlZnM+CiAgICA8L3N2Zz4KICAgIA==";
|
5
5
|
function Vi(a) {
|
6
6
|
let e, t, s, o, r, n, u, f, d, l, h;
|
@@ -99,7 +99,7 @@ class Ft extends st {
|
|
99
99
|
customElements.define("document-overlay", Ft);
|
100
100
|
function Ji(a) {
|
101
101
|
let e, t, s, o, r, n, u, f, d, l, h;
|
102
|
-
return u = new
|
102
|
+
return u = new Li({}), l = new Ft({
|
103
103
|
props: {
|
104
104
|
videoOverlay: (
|
105
105
|
/*videoOverlay*/
|
@@ -116,7 +116,7 @@ function Ji(a) {
|
|
116
116
|
}
|
117
117
|
}), {
|
118
118
|
c() {
|
119
|
-
e = p("div"), t = p("div"), s = p("div"), o = p("img"), n =
|
119
|
+
e = p("div"), t = p("div"), s = p("div"), o = p("img"), n = H(), $(u.$$.fragment), d = H(), $(l.$$.fragment), this.c = Q, _e(o.src, r = Xi) || g(o, "src", r), g(o, "alt", "document"), g(s, "class", "w-full h-full relative"), g(t, "class", "absolute inset-0 flex justify-center"), g(e, "id", "doc-rectangle"), g(e, "class", f = "doc-loader " + /*loading*/
|
120
120
|
(a[0] ? "doc-loading" : "") + " z-10"), g(
|
121
121
|
e,
|
122
122
|
"style",
|
@@ -187,7 +187,7 @@ function $i(a, e, t) {
|
|
187
187
|
r
|
188
188
|
];
|
189
189
|
}
|
190
|
-
class
|
190
|
+
class Ht extends st {
|
191
191
|
constructor(e) {
|
192
192
|
super(), ot(
|
193
193
|
this,
|
@@ -229,7 +229,7 @@ class Lt extends st {
|
|
229
229
|
this.$$set({ videoOverlayTransparency: e }), S();
|
230
230
|
}
|
231
231
|
}
|
232
|
-
customElements.define("doc-rectangle",
|
232
|
+
customElements.define("doc-rectangle", Ht);
|
233
233
|
function St(a) {
|
234
234
|
let e, t, s, o, r, n, u, f, d, l, h, c, m, y, Z, b, C, O, A = (
|
235
235
|
/*$ready*/
|
@@ -260,7 +260,7 @@ function St(a) {
|
|
260
260
|
}
|
261
261
|
}), {
|
262
262
|
c() {
|
263
|
-
e = p("div"), t = p("div"), s = p("video"), r =
|
263
|
+
e = p("div"), t = p("div"), s = p("video"), r = H(), n = p("canvas"), u = H(), f = p("div"), d = p("div"), A && A.c(), l = H(), $(h.$$.fragment), c = H(), $(m.$$.fragment), g(s, "id", "bry-cc-camera-video-tag"), g(s, "class", o = /*$ready*/
|
264
264
|
a[11] ? X() ? "absolute inset-0" : "w-full h-full object-cover" : "w-0 h-0"), s.playsInline = !0, s.muted = !0, s.autoplay = !0, g(n, "id", "bry-ce-detectionsCanvas"), g(n, "class", "absolute top-0 left-0 max-w-full"), g(t, "class", "overflow-hidden"), oe(
|
265
265
|
t,
|
266
266
|
"width",
|
@@ -347,7 +347,7 @@ function Zt(a) {
|
|
347
347
|
a[9]
|
348
348
|
)
|
349
349
|
}
|
350
|
-
}), s = new
|
350
|
+
}), s = new Ht({
|
351
351
|
props: {
|
352
352
|
loading: (
|
353
353
|
/*isCountingDown*/
|
@@ -364,7 +364,7 @@ function Zt(a) {
|
|
364
364
|
}
|
365
365
|
}), {
|
366
366
|
c() {
|
367
|
-
$(e.$$.fragment), t =
|
367
|
+
$(e.$$.fragment), t = H(), $(s.$$.fragment);
|
368
368
|
},
|
369
369
|
m(r, n) {
|
370
370
|
ee(e, r, n), j(r, t, n), ee(s, r, n), o = !0;
|
@@ -405,7 +405,7 @@ function Pt(a) {
|
|
405
405
|
let u = n(a), f = u(a);
|
406
406
|
return {
|
407
407
|
c() {
|
408
|
-
e = p("slot"), t = p("div"), s = p("img"), r =
|
408
|
+
e = p("slot"), t = p("div"), s = p("img"), r = H(), f.c(), _e(s.src, o = Pi) || g(s, "src", o), g(s, "alt", "loading gif"), g(s, "class", "m-auto h-[10em] lg:h-[12em]"), g(t, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), g(e, "name", "loading-camera-gif"), g(e, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]");
|
409
409
|
},
|
410
410
|
m(d, l) {
|
411
411
|
j(d, e, l), I(e, t), I(t, s), I(t, r), f.m(t, null);
|
@@ -465,7 +465,7 @@ function Wt(a) {
|
|
465
465
|
), d, l, h;
|
466
466
|
return {
|
467
467
|
c() {
|
468
|
-
e = p("div"), t = p("button"), o = V(s), n =
|
468
|
+
e = p("div"), t = p("button"), o = V(s), n = H(), u = p("button"), d = V(f), t.disabled = r = /*$justification*/
|
469
469
|
a[15].length === 0, g(t, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), g(u, "id", "bry-cc-retake-button"), g(u, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), g(e, "class", "ce-dui-btn-group flex");
|
470
470
|
},
|
471
471
|
m(c, m) {
|
@@ -533,7 +533,7 @@ function aa(a) {
|
|
533
533
|
let f = u(a), d = f(a);
|
534
534
|
return {
|
535
535
|
c() {
|
536
|
-
e = p("div"), t = p("img"), r =
|
536
|
+
e = p("div"), t = p("img"), r = H(), d.c(), g(t, "class", "m-auto col-start-1 col-end-1 max-h-[23.2em]"), _e(t.src, s = /*$dataTypePrefix*/
|
537
537
|
a[19] + "," + /*$image*/
|
538
538
|
a[16]) || g(t, "src", s), t.hidden = o = !/*$captured*/
|
539
539
|
a[13] || !/*$showFaceWhileValidating*/
|
@@ -581,7 +581,7 @@ function sa(a) {
|
|
581
581
|
let Z = y(a), b = Z(a);
|
582
582
|
return {
|
583
583
|
c() {
|
584
|
-
e = p("div"), b.c(), t =
|
584
|
+
e = p("div"), b.c(), t = H(), s = p("div"), o = p("button"), n = V(r), f = H(), d = p("button"), h = V(l), o.disabled = u = /*$saved*/
|
585
585
|
a[14] || /*$requestResult*/
|
586
586
|
a[17] !== re.OK, g(o, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), g(d, "id", "bry-cc-retake-button"), g(d, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), g(s, "class", "ce-dui-btn-group flex"), g(e, "class", "flex flex-col justify-between");
|
587
587
|
},
|
@@ -720,7 +720,7 @@ function ca(a) {
|
|
720
720
|
}
|
721
721
|
return ~(n = Z(a)) && (u = y[n] = m[n](a)), {
|
722
722
|
c() {
|
723
|
-
e = p("div"), t = p("div"), l && l.c(), s =
|
723
|
+
e = p("div"), t = p("div"), l && l.c(), s = H(), h && h.c(), o = H(), c && c.c(), r = H(), u && u.c(), f = mi(), this.c = Q, g(t, "class", "relative mx-auto"), g(e, "class", "flex flex-col justify-between");
|
724
724
|
},
|
725
725
|
m(b, C) {
|
726
726
|
j(b, e, C), I(e, t), l && l.m(t, null), I(t, s), h && h.m(t, null), I(t, o), c && c.m(t, null), a[37](e), j(b, r, C), ~n && y[n].m(b, C), j(b, f, C), d = !0;
|
@@ -759,12 +759,12 @@ function ga(a, e, t) {
|
|
759
759
|
function fa(a, e, t) {
|
760
760
|
let s, o, r, n, u, f, d, l, h, c, m, y, Z, b, C, O, A, T, k, P, De, J, ue, K, ct, dt, ut;
|
761
761
|
M(a, Ge, (i) => t(54, s = i)), M(a, be, (i) => t(56, r = i)), M(a, G, (i) => t(10, n = i)), M(a, ve, (i) => t(11, u = i)), M(a, bi, (i) => t(57, f = i)), M(a, Ie, (i) => t(58, d = i)), M(a, vi, (i) => t(59, l = i)), M(a, de, (i) => t(60, h = i)), M(a, ne, (i) => t(12, c = i)), M(a, we, (i) => t(13, m = i)), M(a, Qe, (i) => t(61, y = i)), M(a, Ye, (i) => t(62, Z = i)), M(a, Nt, (i) => t(63, b = i)), M(a, q, (i) => t(64, C = i)), M(a, Ce, (i) => t(65, O = i)), M(a, Xe, (i) => t(14, A = i)), M(a, Ii, (i) => t(15, T = i)), M(a, zt, (i) => t(16, k = i)), M(a, ye, (i) => t(17, P = i)), M(a, wi, (i) => t(18, De = i)), M(a, Ve, (i) => t(66, J = i)), M(a, jt, (i) => t(67, K = i)), M(a, xe, (i) => t(68, ct = i)), M(a, Ci, (i) => t(20, dt = i)), M(a, yi, (i) => t(21, ut = i));
|
762
|
-
let _, R, Y, ce = !1, gt = !1,
|
762
|
+
let _, R, Y, ce = !1, gt = !1, L = {
|
763
763
|
width: 2560,
|
764
764
|
height: 1440,
|
765
765
|
aspectRatio: -1
|
766
766
|
};
|
767
|
-
const
|
767
|
+
const Lt = { width: 2560, height: 1440 };
|
768
768
|
let { enableMinutiae: Te } = e, { videoDimensions: Ae } = e, { noTabs: Oe } = e, { weightsPath: Ne } = e, { showUnconformities: ft } = e, { showConfigButton: ht } = e, { showCameraButton: mt } = e, { videoOverlay: bt } = e, { videoOverlayTransparency: vt } = e;
|
769
769
|
const ge = Et(!1);
|
770
770
|
M(a, ge, (i) => t(55, o = i));
|
@@ -836,7 +836,7 @@ function fa(a, e, t) {
|
|
836
836
|
));
|
837
837
|
} catch (w) {
|
838
838
|
console.error(w);
|
839
|
-
let N, z =
|
839
|
+
let N, z = Hi.DOCUMENT_NOT_FOUND, B = [];
|
840
840
|
w instanceof Error && ["DOCUMENT_NOT_FOUND"].includes(w.message) && (v(ye, P = re.TEMPLATE_EXTRACTION_ERROR, P), N = w.message, B = [
|
841
841
|
{
|
842
842
|
bodyPart: "DOCUMENT",
|
@@ -874,10 +874,10 @@ function fa(a, e, t) {
|
|
874
874
|
}
|
875
875
|
await Ut();
|
876
876
|
try {
|
877
|
-
let { stream: D, deviceId: w, width: N, height: z, aspectRatio: B } = await kt(
|
878
|
-
if (v(Qe, y = D, y),
|
879
|
-
|
880
|
-
const { stream: Pe } = await kt(
|
877
|
+
let { stream: D, deviceId: w, width: N, height: z, aspectRatio: B } = await kt(L.width, L.height, d, i);
|
878
|
+
if (v(Qe, y = D, y), L.aspectRatio = B || N / z, L.aspectRatio > 1 && N < L.width || L.aspectRatio < 1 && z < L.width) {
|
879
|
+
L.width = N, L.height = N / 1.7777, y.getTracks()?.forEach((We) => We?.stop());
|
880
|
+
const { stream: Pe } = await kt(L.width, L.height, d, i);
|
881
881
|
v(Qe, y = Pe, y);
|
882
882
|
}
|
883
883
|
v(de, h = w || l[0].deviceId, h);
|
@@ -907,12 +907,12 @@ function fa(a, e, t) {
|
|
907
907
|
));
|
908
908
|
}
|
909
909
|
function Gt() {
|
910
|
-
const i = c.videoWidth, D = c.videoHeight, w =
|
910
|
+
const i = c.videoWidth, D = c.videoHeight, w = Lt.width, N = D / i * w, z = document.createElement("canvas"), B = z.getContext("2d");
|
911
911
|
z.width = w, z.height = N, B && ga(B, _, z);
|
912
|
-
const Pe = z.width / c.videoWidth, We = z.height / c.videoHeight, di = X() ? 0.25 : 0.15, ui = Math.round(z.height * di), Fe = C.width * Pe,
|
913
|
-
ae.width =
|
912
|
+
const Pe = z.width / c.videoWidth, We = z.height / c.videoHeight, di = X() ? 0.25 : 0.15, ui = Math.round(z.height * di), Fe = C.width * Pe, He = C.height * We, Tt = (X() ? 0.15 : 0.2) * Fe, At = 0.2 * He, gi = (z.width - Fe) / 2 - Tt / 2, fi = (z.height - ui - He) / 2 - At / 2, Le = Fe + Tt, Ue = He + At, ae = document.createElement("canvas");
|
913
|
+
ae.width = Le, ae.height = Ue;
|
914
914
|
const Be = ae.getContext("2d");
|
915
|
-
return Be?.clearRect(0, 0, ae.width, ae.height), Be?.drawImage(z, gi, fi,
|
915
|
+
return Be?.clearRect(0, 0, ae.width, ae.height), Be?.drawImage(z, gi, fi, Le, Ue, 0, 0, Le, Ue), Be?.save(), ae;
|
916
916
|
}
|
917
917
|
const Qt = ne.subscribe((i) => {
|
918
918
|
_ && R && (t(6, _.width = i.videoWidth, _), t(6, _.height = i.videoHeight, _), t(7, R.width = i.videoWidth, R), t(7, R.height = i.videoHeight, R));
|
@@ -947,7 +947,7 @@ function fa(a, e, t) {
|
|
947
947
|
const xt = de.subscribe(async (i) => {
|
948
948
|
if (!(!y || !i))
|
949
949
|
try {
|
950
|
-
const D = await Ai(
|
950
|
+
const D = await Ai(L.width, L.height, i);
|
951
951
|
t(6, _.srcObject = y, _), v(Ye, Z = !1, Z), y.getTracks().forEach((w) => {
|
952
952
|
w.readyState === "live" && console.log(`Camera ${w.label} opened successfully!`);
|
953
953
|
}), v(G, n = W.OK, n), Oi(_);
|
@@ -978,7 +978,7 @@ function fa(a, e, t) {
|
|
978
978
|
try {
|
979
979
|
if (je >= ua) {
|
980
980
|
je = 0;
|
981
|
-
const D = await ji(), w = await import("./face_api_0e3ce8c8_3.1.0
|
981
|
+
const D = await ji(), w = await import("./face_api_0e3ce8c8_3.1.0.js");
|
982
982
|
let N;
|
983
983
|
if (N = w.detectSingleFace(_, D), i = await N.withFaceLandmarks(), R.getContext("2d")?.clearRect(0, 0, R.width, R.height), i != null) {
|
984
984
|
const z = Qi(R, _, !0);
|