bry-biometric-collector 3.0.0-RC01 → 3.0.0-RC03
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/DocumentCollector_cc7c3a54_3.0.0-RC03.js +1173 -0
- package/dist/{FaceCollector_95bb182b_3.0.0-RC01.js → FaceCollector_e350268a_3.0.0-RC03.js} +264 -270
- package/dist/{ValidationAlert_0a6b586f_3.0.0-RC01.js → ValidationAlert_dfb361e9_3.0.0-RC03.js} +230 -229
- package/dist/{___vite-browser-external_commonjs-proxy_8bb8db0d_3.0.0-RC01.js → ___vite-browser-external_commonjs-proxy_cbe30ad4_3.0.0-RC03.js} +31 -31
- package/dist/bry-biometric-collector-main.js +3 -3
- package/dist/{fingersApi_09f5a55b_3.0.0-RC01.js → fingersApi_5b5a03ec_3.0.0-RC03.js} +2 -2
- package/dist/index.js +3 -3
- package/dist/{index_b8df6bb6_3.0.0-RC01.js → index_4c3936a1_3.0.0-RC03.js} +3 -3
- package/dist/{index_fa569ec3_3.0.0-RC01.js → index_89b7de40_3.0.0-RC03.js} +3 -3
- package/dist/{main_550fd4ab_3.0.0-RC01.js → main_f74f12d4_3.0.0-RC03.js} +484 -474
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/DocumentCollector_480bc217_3.0.0-RC01.js +0 -1029
- /package/dist/{en-us_99b30d39_3.0.0-RC01.js → en-us_99b30d39_3.0.0-RC03.js} +0 -0
- /package/dist/{es-cl_cfa50670_3.0.0-RC01.js → es-cl_cfa50670_3.0.0-RC03.js} +0 -0
- /package/dist/{face_api_0e3ce8c8_3.0.0-RC01.js → face_api_0e3ce8c8_3.0.0-RC03.js} +0 -0
- /package/dist/{index-no-detector_281a271b_3.0.0-RC01.js → index-no-detector_281a271b_3.0.0-RC03.js} +0 -0
- /package/dist/{index-no-detector_56051121_3.0.0-RC01.js → index-no-detector_56051121_3.0.0-RC03.js} +0 -0
- /package/dist/{pt-br_d5ca6103_3.0.0-RC01.js → pt-br_d5ca6103_3.0.0-RC03.js} +0 -0
@@ -1,6 +1,6 @@
|
|
1
|
-
import { S as Ut, q as Vt, r as
|
2
|
-
import { W as qa, C as za, V as Ja, a as Xa } from "./
|
3
|
-
import { detectSingleFace as Qa, matchDimensions as Ga, resizeResults as Ya, Box as Za } from "./face_api_0e3ce8c8_3.0.0-
|
1
|
+
import { S as Ut, q as Vt, r as jt, t as Ht, w as L, x as q, y as C, z as be, B as x, C as m, D as ge, E as J, G as Z, H as S, I as ve, J as I, K as Ne, L as Me, M as _e, N as h, O as K, P as j, Q as U, R as fa, T as _, U as lt, V as rt, W as Lt, X as Qe, Y, Z as Ge, _ as da, a0 as Ye, a1 as he, a2 as ha, a3 as Se, a4 as ui, a5 as Dt, a6 as fi, a7 as ma, a8 as _a, a9 as Pe, aa as we, ab as ba, ac as Ft, ad as Nt, ae as me, af as ee, $ as ga, ag as Ce, ah as di, ai as Ze, aj as St, ak as va, al as xe, am as hi, an as mi, ao as pa, ap as wa, aq as Ca, ar as Ea, as as ya, at as Ta, au as Oa, av as Pt, aw as H, j as nt, ax as Bt, ay as Ra, az as $e, aA as et, aB as ka, aC as _i, aD as bi, aE as tt, A as Wt, aF as Ee, aG as it, aH as Aa, aI as gi, d as Re, aJ as Mt, aK as at, aL as Ia, aM as La, aN as Da, aO as Fa, aP as Na, aQ as Sa, aR as Be, aS as Pa, aT as Ba, aU as st, aV as oe, aW as ft, aX as ct, aY as Di, aZ as M, a_ as V, a$ as vi, b0 as Wa, b1 as Ma, b2 as Ua, b3 as ot, b4 as We, b5 as Va, b6 as ja, b7 as pi, b8 as Ha, b9 as ut, ba as Ka } from "./main_f74f12d4_3.0.0-RC03.js";
|
2
|
+
import { W as qa, C as za, V as Ja, a as Xa } from "./ValidationAlert_dfb361e9_3.0.0-RC03.js";
|
3
|
+
import { detectSingleFace as Qa, matchDimensions as Ga, resizeResults as Ya, Box as Za } from "./face_api_0e3ce8c8_3.0.0-RC03.js";
|
4
4
|
function xa(i) {
|
5
5
|
let e, t, s, o;
|
6
6
|
return t = new qa({}), {
|
@@ -14,7 +14,7 @@ function xa(i) {
|
|
14
14
|
);
|
15
15
|
},
|
16
16
|
m(n, l) {
|
17
|
-
|
17
|
+
L(n, e, l), ge(t, e, null), o = !0;
|
18
18
|
},
|
19
19
|
p(n, [l]) {
|
20
20
|
(!o || l & /*loading*/
|
@@ -28,7 +28,7 @@ function xa(i) {
|
|
28
28
|
);
|
29
29
|
},
|
30
30
|
i(n) {
|
31
|
-
o || (
|
31
|
+
o || (J(t.$$.fragment, n), o = !0);
|
32
32
|
},
|
33
33
|
o(n) {
|
34
34
|
Z(t.$$.fragment, n), o = !1;
|
@@ -41,7 +41,7 @@ function xa(i) {
|
|
41
41
|
const $a = "hsl(var(--p))", es = "hsl(var(--su))";
|
42
42
|
function ts(i, e, t) {
|
43
43
|
let s, o, n;
|
44
|
-
|
44
|
+
I(i, Ne, (v) => t(7, o = v)), I(i, Me, (v) => t(8, n = v));
|
45
45
|
let { loading: l } = e, r, c, u = 0.8, f = 8, g = 0.15;
|
46
46
|
return _e() && (u = 0.65, f = 10, g = 0.25), i.$$set = (v) => {
|
47
47
|
"loading" in v && t(0, l = v.loading);
|
@@ -78,15 +78,15 @@ class Fi extends Ut {
|
|
78
78
|
this,
|
79
79
|
{
|
80
80
|
target: this.shadowRoot,
|
81
|
-
props:
|
81
|
+
props: Ht(this.attributes),
|
82
82
|
customElement: !0
|
83
83
|
},
|
84
84
|
ts,
|
85
85
|
xa,
|
86
|
-
|
86
|
+
jt,
|
87
87
|
{ loading: 0 },
|
88
88
|
null
|
89
|
-
), e && (e.target &&
|
89
|
+
), e && (e.target && L(e.target, this, e.anchor), e.props && (this.$set(e.props), q()));
|
90
90
|
}
|
91
91
|
static get observedAttributes() {
|
92
92
|
return ["loading"];
|
@@ -111,7 +111,7 @@ function is(i) {
|
|
111
111
|
);
|
112
112
|
},
|
113
113
|
m(t, s) {
|
114
|
-
|
114
|
+
L(t, e, s);
|
115
115
|
},
|
116
116
|
p(t, [s]) {
|
117
117
|
s & /*styleVars*/
|
@@ -131,7 +131,7 @@ function is(i) {
|
|
131
131
|
}
|
132
132
|
function as(i, e, t) {
|
133
133
|
let s, o;
|
134
|
-
|
134
|
+
I(i, Me, (f) => t(6, o = f));
|
135
135
|
let n, l, r = 0.8, { overlayColor: c } = e, { overlayTransparency: u } = e;
|
136
136
|
return _e() && (r = 0.65), i.$$set = (f) => {
|
137
137
|
"overlayColor" in f && t(1, c = f.overlayColor), "overlayTransparency" in f && t(2, u = f.overlayTransparency);
|
@@ -160,15 +160,15 @@ class Ni extends Ut {
|
|
160
160
|
this,
|
161
161
|
{
|
162
162
|
target: this.shadowRoot,
|
163
|
-
props:
|
163
|
+
props: Ht(this.attributes),
|
164
164
|
customElement: !0
|
165
165
|
},
|
166
166
|
as,
|
167
167
|
is,
|
168
|
-
|
168
|
+
jt,
|
169
169
|
{ overlayColor: 1, overlayTransparency: 2 },
|
170
170
|
null
|
171
|
-
), e && (e.target &&
|
171
|
+
), e && (e.target && L(e.target, this, e.anchor), e.props && (this.$set(e.props), q()));
|
172
172
|
}
|
173
173
|
static get observedAttributes() {
|
174
174
|
return ["overlayColor", "overlayTransparency"];
|
@@ -192,7 +192,7 @@ function wi(i, e, t) {
|
|
192
192
|
return s[118] = e[t], s;
|
193
193
|
}
|
194
194
|
function Ci(i) {
|
195
|
-
let e, t, s = K(), o, n, l, r, c, u, f, g, v, d, E, b, p, k,
|
195
|
+
let e, t, s = K(), o, n, l, r, c, u, f, g, v, d, E, b, p, k, T, F, A, B = s && ss(i), W = (
|
196
196
|
/*$ready*/
|
197
197
|
i[21] && Ei(i)
|
198
198
|
);
|
@@ -258,13 +258,13 @@ function Ci(i) {
|
|
258
258
|
i[31].videoHeight + "px"
|
259
259
|
), m(g, "class", "flex flex-grow w-full items-center justify-center relative"), m(f, "class", "absolute inset-0 flex flex-col items-center justify-between w-full h-full"), m(e, "class", p = /*$ready*/
|
260
260
|
i[21] ? "relative" : "relative w-0 h-0"), e.hidden = k = /*$cameraStatusStore*/
|
261
|
-
i[20] !==
|
261
|
+
i[20] !== j.OK || K() && /*idrndLoading*/
|
262
262
|
(i[16] || /*idrndClosed*/
|
263
263
|
i[17] || /*waitingIdrndCaptureEvent*/
|
264
264
|
i[18]);
|
265
265
|
},
|
266
266
|
m(R, y) {
|
267
|
-
|
267
|
+
L(R, e, y), _(e, t), B && B.m(t, null), _(t, o), _(t, n), i[47](n), _(t, r), _(t, c), i[49](c), _(e, u), _(e, f), _(f, g), W && W.m(g, null), _(f, v), ge(d, f, null), _(f, E), ge(b, f, null), T = !0, F || (A = [
|
268
268
|
oe(
|
269
269
|
n,
|
270
270
|
"canplay",
|
@@ -278,18 +278,18 @@ function Ci(i) {
|
|
278
278
|
i[10],
|
279
279
|
{ once: !0 }
|
280
280
|
)
|
281
|
-
],
|
281
|
+
], F = !0);
|
282
282
|
},
|
283
283
|
p(R, y) {
|
284
|
-
s && B.p(R, y), (!
|
284
|
+
s && B.p(R, y), (!T || y[0] & /*$ready*/
|
285
285
|
2097152 && l !== (l = /*$ready*/
|
286
|
-
R[21] ? _e() ? "absolute inset-0 -scale-x-100" : "w-full h-full object-cover -scale-x-100" : "w-0 h-0")) && m(n, "class", l), (!
|
286
|
+
R[21] ? _e() ? "absolute inset-0 -scale-x-100" : "w-full h-full object-cover -scale-x-100" : "w-0 h-0")) && m(n, "class", l), (!T || y[1] & /*$videoStore*/
|
287
287
|
1) && st(
|
288
288
|
t,
|
289
289
|
"width",
|
290
290
|
/*$videoStore*/
|
291
291
|
R[31].videoWidth + "px"
|
292
|
-
), (!
|
292
|
+
), (!T || y[1] & /*$videoStore*/
|
293
293
|
1) && st(
|
294
294
|
t,
|
295
295
|
"height",
|
@@ -297,47 +297,47 @@ function Ci(i) {
|
|
297
297
|
R[31].videoHeight + "px"
|
298
298
|
), /*$ready*/
|
299
299
|
R[21] ? W ? (W.p(R, y), y[0] & /*$ready*/
|
300
|
-
2097152 &&
|
300
|
+
2097152 && J(W, 1)) : (W = Ei(R), W.c(), J(W, 1), W.m(g, null)) : W && (lt(), Z(W, 1, 1, () => {
|
301
301
|
W = null;
|
302
302
|
}), rt());
|
303
|
-
const
|
303
|
+
const X = {};
|
304
304
|
y[0] & /*showConfigButton*/
|
305
|
-
16 && (
|
305
|
+
16 && (X.showConfigButton = /*showConfigButton*/
|
306
306
|
R[4]), y[0] & /*showAutoCaptureButton*/
|
307
|
-
32 && (
|
307
|
+
32 && (X.showAutoCaptureButton = /*showAutoCaptureButton*/
|
308
308
|
R[5]), y[0] & /*showCaptureButton*/
|
309
|
-
1 && (
|
309
|
+
1 && (X.showCaptureButton = /*showCaptureButton*/
|
310
310
|
R[0]), y[0] & /*showCameraButton*/
|
311
|
-
64 && (
|
311
|
+
64 && (X.showCameraButton = /*showCameraButton*/
|
312
312
|
R[6]), y[0] & /*enableCaptureButton*/
|
313
|
-
32768 && (
|
313
|
+
32768 && (X.enableCaptureButton = /*enableCaptureButton*/
|
314
314
|
R[15]), y[0] & /*videoOverlay*/
|
315
|
-
256 && (
|
315
|
+
256 && (X.videoOverlay = /*videoOverlay*/
|
316
316
|
R[8]), y[0] & /*videoOverlayTransparency*/
|
317
|
-
512 && (
|
317
|
+
512 && (X.videoOverlayTransparency = /*videoOverlayTransparency*/
|
318
318
|
R[9]), y[0] & /*idrndClosed*/
|
319
|
-
131072 && (
|
319
|
+
131072 && (X.idrndClosed = /*idrndClosed*/
|
320
320
|
R[17]), y[0] & /*idrndLoading*/
|
321
|
-
65536 && (
|
321
|
+
65536 && (X.idrndLoading = /*idrndLoading*/
|
322
322
|
R[16]), y[0] & /*waitingIdrndCaptureEvent*/
|
323
|
-
262144 && (
|
324
|
-
R[18]), b.$set(
|
323
|
+
262144 && (X.waitingIdrndCaptureEvent = /*waitingIdrndCaptureEvent*/
|
324
|
+
R[18]), b.$set(X), (!T || y[0] & /*$ready*/
|
325
325
|
2097152 && p !== (p = /*$ready*/
|
326
|
-
R[21] ? "relative" : "relative w-0 h-0")) && m(e, "class", p), (!
|
326
|
+
R[21] ? "relative" : "relative w-0 h-0")) && m(e, "class", p), (!T || y[0] & /*$cameraStatusStore, idrndLoading, idrndClosed, waitingIdrndCaptureEvent*/
|
327
327
|
1507328 && k !== (k = /*$cameraStatusStore*/
|
328
|
-
R[20] !==
|
328
|
+
R[20] !== j.OK || K() && /*idrndLoading*/
|
329
329
|
(R[16] || /*idrndClosed*/
|
330
330
|
R[17] || /*waitingIdrndCaptureEvent*/
|
331
331
|
R[18]))) && (e.hidden = k);
|
332
332
|
},
|
333
333
|
i(R) {
|
334
|
-
|
334
|
+
T || (J(W), J(d.$$.fragment, R), J(b.$$.fragment, R), T = !0);
|
335
335
|
},
|
336
336
|
o(R) {
|
337
|
-
Z(W), Z(d.$$.fragment, R), Z(b.$$.fragment, R),
|
337
|
+
Z(W), Z(d.$$.fragment, R), Z(b.$$.fragment, R), T = !1;
|
338
338
|
},
|
339
339
|
d(R) {
|
340
|
-
R && S(e), B && B.d(), i[47](null), i[49](null), W && W.d(), ve(d), ve(b),
|
340
|
+
R && S(e), B && B.d(), i[47](null), i[49](null), W && W.d(), ve(d), ve(b), F = !1, ft(A);
|
341
341
|
}
|
342
342
|
};
|
343
343
|
}
|
@@ -353,7 +353,7 @@ function ss(i) {
|
|
353
353
|
);
|
354
354
|
},
|
355
355
|
m(t, s) {
|
356
|
-
|
356
|
+
L(t, e, s), i[46](e);
|
357
357
|
},
|
358
358
|
p(t, s) {
|
359
359
|
s[0] & /*$selectedVideoDeviceId*/
|
@@ -399,7 +399,7 @@ function Ei(i) {
|
|
399
399
|
be(e.$$.fragment), t = U(), be(s.$$.fragment), o = U(), be(n.$$.fragment);
|
400
400
|
},
|
401
401
|
m(r, c) {
|
402
|
-
ge(e, r, c),
|
402
|
+
ge(e, r, c), L(r, t, c), ge(s, r, c), L(r, o, c), ge(n, r, c), l = !0;
|
403
403
|
},
|
404
404
|
p(r, c) {
|
405
405
|
const u = {};
|
@@ -418,7 +418,7 @@ function Ei(i) {
|
|
418
418
|
r[9]), n.$set(g);
|
419
419
|
},
|
420
420
|
i(r) {
|
421
|
-
l || (
|
421
|
+
l || (J(e.$$.fragment, r), J(s.$$.fragment, r), J(n.$$.fragment, r), l = !0);
|
422
422
|
},
|
423
423
|
o(r) {
|
424
424
|
Z(e.$$.fragment, r), Z(s.$$.fragment, r), Z(n.$$.fragment, r), l = !1;
|
@@ -442,7 +442,7 @@ function yi(i) {
|
|
442
442
|
e = C("slot"), t = C("div"), s = C("img"), n = U(), c.c(), ct(s.src, o = Di) || m(s, "src", o), m(s, "alt", "loading gif"), m(s, "class", "m-auto h-[10em] lg:h-[12em]"), m(t, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), m(e, "name", "obtaining-photo-gif"), m(e, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]");
|
443
443
|
},
|
444
444
|
m(u, f) {
|
445
|
-
|
445
|
+
L(u, e, f), _(e, t), _(t, s), _(t, n), c.m(t, null);
|
446
446
|
},
|
447
447
|
p(u, f) {
|
448
448
|
r === (r = l(u)) && c ? c.p(u, f) : (c.d(1), c = r(u), c && (c.c(), c.m(t, null)));
|
@@ -462,7 +462,7 @@ function os(i) {
|
|
462
462
|
e = C("span"), s = M(t), m(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
|
463
463
|
},
|
464
464
|
m(o, n) {
|
465
|
-
|
465
|
+
L(o, e, n), _(e, s);
|
466
466
|
},
|
467
467
|
p(o, n) {
|
468
468
|
n[0] & /*$_*/
|
@@ -481,7 +481,7 @@ function ns(i) {
|
|
481
481
|
e = C("span"), e.textContent = "Obtaining photo...", m(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
|
482
482
|
},
|
483
483
|
m(t, s) {
|
484
|
-
|
484
|
+
L(t, e, s);
|
485
485
|
},
|
486
486
|
p: x,
|
487
487
|
d(t) {
|
@@ -503,7 +503,7 @@ function Ti(i) {
|
|
503
503
|
e = C("slot"), t = C("div"), s = C("img"), n = U(), c.c(), ct(s.src, o = Di) || m(s, "src", o), m(s, "alt", "loading gif"), m(s, "class", "m-auto h-[10em] lg:h-[12em]"), m(t, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), m(e, "name", "loading-camera-gif"), m(e, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]");
|
504
504
|
},
|
505
505
|
m(u, f) {
|
506
|
-
|
506
|
+
L(u, e, f), _(e, t), _(t, s), _(t, n), c.m(t, null);
|
507
507
|
},
|
508
508
|
p(u, f) {
|
509
509
|
r === (r = l(u)) && c ? c.p(u, f) : (c.d(1), c = r(u), c && (c.c(), c.m(t, null)));
|
@@ -523,7 +523,7 @@ function ls(i) {
|
|
523
523
|
e = C("span"), s = M(t), m(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
|
524
524
|
},
|
525
525
|
m(o, n) {
|
526
|
-
|
526
|
+
L(o, e, n), _(e, s);
|
527
527
|
},
|
528
528
|
p(o, n) {
|
529
529
|
n[0] & /*$_*/
|
@@ -542,7 +542,7 @@ function rs(i) {
|
|
542
542
|
e = C("span"), e.textContent = "Loading camera...", m(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
|
543
543
|
},
|
544
544
|
m(t, s) {
|
545
|
-
|
545
|
+
L(t, e, s);
|
546
546
|
},
|
547
547
|
p: x,
|
548
548
|
d(t) {
|
@@ -564,7 +564,7 @@ function Oi(i) {
|
|
564
564
|
i[25].length === 0, m(t, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), m(r, "id", "bry-cc-retake-button"), m(r, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), m(e, "class", "ce-dui-btn-group flex");
|
565
565
|
},
|
566
566
|
m(v, d) {
|
567
|
-
|
567
|
+
L(v, e, d), _(e, t), _(t, o), _(e, l), _(e, r), _(r, u), f || (g = [
|
568
568
|
oe(
|
569
569
|
t,
|
570
570
|
"click",
|
@@ -607,7 +607,7 @@ function cs(i) {
|
|
607
607
|
},
|
608
608
|
p: x,
|
609
609
|
i(s) {
|
610
|
-
t || (
|
610
|
+
t || (J(e.$$.fragment, s), t = !0);
|
611
611
|
},
|
612
612
|
o(s) {
|
613
613
|
Z(e.$$.fragment, s), t = !1;
|
@@ -633,7 +633,7 @@ function us(i) {
|
|
633
633
|
/*$unconformitiesStore*/
|
634
634
|
d[29].isLoading ? 1 : (
|
635
635
|
/*$requestResult*/
|
636
|
-
d[27] !==
|
636
|
+
d[27] !== H.OK ? 2 : (
|
637
637
|
/*$saved*/
|
638
638
|
d[24] ? 4 : 3
|
639
639
|
)
|
@@ -653,7 +653,7 @@ function us(i) {
|
|
653
653
|
i[29].isLoading ? "absolute -translate-y-1/2 -translate-x-1/2 top-1/2 left-1/2 overflow-visible" : "grid overflow-hidden"));
|
654
654
|
},
|
655
655
|
m(d, E) {
|
656
|
-
|
656
|
+
L(d, e, E), _(e, t), _(e, n), g[l].m(e, null), u = !0;
|
657
657
|
},
|
658
658
|
p(d, E) {
|
659
659
|
(!u || E[0] & /*$dataTypePrefix, $image*/
|
@@ -668,14 +668,14 @@ function us(i) {
|
|
668
668
|
let b = l;
|
669
669
|
l = v(d), l === b ? g[l].p(d, E) : (lt(), Z(g[b], 1, 1, () => {
|
670
670
|
g[b] = null;
|
671
|
-
}), rt(), r = g[l], r ? r.p(d, E) : (r = g[l] = f[l](d), r.c()),
|
671
|
+
}), rt(), r = g[l], r ? r.p(d, E) : (r = g[l] = f[l](d), r.c()), J(r, 1), r.m(e, null)), (!u || E[0] & /*$unconformitiesStore*/
|
672
672
|
536870912 | E[1] & /*$showFaceWhileValidating*/
|
673
673
|
4 && c !== (c = "grid-cols-1 grid-rows-2 sm:grid-cols-2 sm:grid-rows-1 gap-[.5em] " + (!/*$showFaceWhileValidating*/
|
674
674
|
d[33] && /*$unconformitiesStore*/
|
675
675
|
d[29].isLoading ? "absolute -translate-y-1/2 -translate-x-1/2 top-1/2 left-1/2 overflow-visible" : "grid overflow-hidden"))) && m(e, "class", c);
|
676
676
|
},
|
677
677
|
i(d) {
|
678
|
-
u || (
|
678
|
+
u || (J(r), u = !0);
|
679
679
|
},
|
680
680
|
o(d) {
|
681
681
|
Z(r), u = !1;
|
@@ -692,7 +692,7 @@ function fs(i) {
|
|
692
692
|
), o, n, l, r, c, u = (
|
693
693
|
/*$_*/
|
694
694
|
i[28]("faceCollector.retakePhoto") + ""
|
695
|
-
), f, g, v = nt(Va).faceStrategy !==
|
695
|
+
), f, g, v = nt(Va).faceStrategy !== ja.DISABLED, d, E, b, p = (
|
696
696
|
/*$unconformitiesStore*/
|
697
697
|
i[29].unconformities.length !== 0 && Ri(i)
|
698
698
|
), k = v && bs();
|
@@ -701,32 +701,32 @@ function fs(i) {
|
|
701
701
|
e = C("div"), t = C("h1"), o = M(s), n = U(), p && p.c(), l = U(), r = C("div"), c = C("button"), f = M(u), g = U(), k && k.c(), m(t, "class", "text-3xl font-bold pb-[1em] transition-opacity"), m(c, "id", "bry-cc-retake-button"), m(c, "class", "ce-dui-btn ce-dui-btn-block flex-shrink text-base"), m(r, "class", "flex flex-row"), pi(r, "ce-dui-btn-group", !/*$exportButtonDisabled*/
|
702
702
|
i[34]);
|
703
703
|
},
|
704
|
-
m(
|
705
|
-
|
704
|
+
m(T, F) {
|
705
|
+
L(T, e, F), _(e, t), _(t, o), _(e, n), p && p.m(e, null), _(e, l), _(e, r), _(r, c), _(c, f), _(r, g), k && k.m(r, null), d = !0, E || (b = oe(
|
706
706
|
c,
|
707
707
|
"click",
|
708
708
|
/*click_handler_6*/
|
709
709
|
i[59]
|
710
710
|
), E = !0);
|
711
711
|
},
|
712
|
-
p(
|
713
|
-
(!d ||
|
712
|
+
p(T, F) {
|
713
|
+
(!d || F[0] & /*$_*/
|
714
714
|
268435456) && s !== (s = /*$_*/
|
715
|
-
|
716
|
-
|
715
|
+
T[28]("faceCollector.captured") + "") && V(o, s), /*$unconformitiesStore*/
|
716
|
+
T[29].unconformities.length !== 0 ? p ? p.p(T, F) : (p = Ri(T), p.c(), p.m(e, l)) : p && (p.d(1), p = null), (!d || F[0] & /*$_*/
|
717
717
|
268435456) && u !== (u = /*$_*/
|
718
|
-
|
718
|
+
T[28]("faceCollector.retakePhoto") + "") && V(f, u), (!d || F[1] & /*$exportButtonDisabled*/
|
719
719
|
8) && pi(r, "ce-dui-btn-group", !/*$exportButtonDisabled*/
|
720
|
-
|
720
|
+
T[34]);
|
721
721
|
},
|
722
|
-
i(
|
723
|
-
d || (
|
722
|
+
i(T) {
|
723
|
+
d || (J(k), d = !0);
|
724
724
|
},
|
725
|
-
o(
|
725
|
+
o(T) {
|
726
726
|
Z(k), d = !1;
|
727
727
|
},
|
728
|
-
d(
|
729
|
-
|
728
|
+
d(T) {
|
729
|
+
T && S(e), p && p.d(), k && k.d(), E = !1, b();
|
730
730
|
}
|
731
731
|
};
|
732
732
|
}
|
@@ -766,7 +766,7 @@ function ds(i) {
|
|
766
766
|
r = U(), v && v.c(), c = U(), d && d.c(), u = U(), E && E.c(), m(t, "class", "text-3xl font-bold transition-opacity"), m(l, "class", "flex flex-wrap"), m(e, "class", "flex flex-col justify-between");
|
767
767
|
},
|
768
768
|
m(b, p) {
|
769
|
-
|
769
|
+
L(b, e, p), _(e, t), _(t, o), _(e, n), _(e, l);
|
770
770
|
for (let k = 0; k < g.length; k += 1)
|
771
771
|
g[k] && g[k].m(l, null);
|
772
772
|
_(l, r), v && v.m(l, null), _(e, c), d && d.m(e, null), _(e, u), E && E.m(e, null);
|
@@ -786,8 +786,8 @@ function ds(i) {
|
|
786
786
|
b[29].unconformities;
|
787
787
|
let k;
|
788
788
|
for (k = 0; k < f.length; k += 1) {
|
789
|
-
const
|
790
|
-
g[k] ? g[k].p(
|
789
|
+
const T = wi(b, f, k);
|
790
|
+
g[k] ? g[k].p(T, p) : (g[k] = ki(T), g[k].c(), g[k].m(l, r));
|
791
791
|
}
|
792
792
|
for (; k < g.length; k += 1)
|
793
793
|
g[k].d(1);
|
@@ -803,7 +803,7 @@ function ds(i) {
|
|
803
803
|
i: x,
|
804
804
|
o: x,
|
805
805
|
d(b) {
|
806
|
-
b && S(e),
|
806
|
+
b && S(e), Ha(g, b), v && v.d(), d && d.d(), E && E.d();
|
807
807
|
}
|
808
808
|
};
|
809
809
|
}
|
@@ -818,17 +818,17 @@ function hs(i) {
|
|
818
818
|
function d(p, k) {
|
819
819
|
return (
|
820
820
|
/*$requestResult*/
|
821
|
-
p[27] ===
|
822
|
-
p[27] ===
|
821
|
+
p[27] === H.LIVENESS_DETECTION_FAILURE || /*$requestResult*/
|
822
|
+
p[27] === H.UNKNOWN_LIVENESS_ERROR ? Es : (
|
823
823
|
/*$requestResult*/
|
824
|
-
p[27] ===
|
824
|
+
p[27] === H.LOW_LIVENESS_SCORE ? Cs : (
|
825
825
|
/*$requestResult*/
|
826
|
-
p[27] ===
|
827
|
-
p[27] ===
|
826
|
+
p[27] === H.TEMPLATE_EXTRACTION_ERROR || /*$requestResult*/
|
827
|
+
p[27] === H.UNKNOWN_TEMPLATE_EXTRACTION_ERROR ? ws : (
|
828
828
|
/*$requestResult*/
|
829
|
-
p[27] ===
|
829
|
+
p[27] === H.UNABLE_TO_COMMUNICATE_WITH_TEMPLATE_EXTRACTION_SERVICE ? ps : (
|
830
830
|
/*$requestResult*/
|
831
|
-
p[27] ===
|
831
|
+
p[27] === H.LIVENESS_EVALUATION_ERROR ? vs : gs
|
832
832
|
)
|
833
833
|
)
|
834
834
|
)
|
@@ -841,7 +841,7 @@ function hs(i) {
|
|
841
841
|
e = C("div"), b.c(), t = U(), s = C("div"), o = C("button"), l = M(n), r = U(), c = C("button"), f = M(u), o.disabled = !0, m(o, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), m(c, "id", "bry-cc-retake-button"), m(c, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), m(s, "class", "ce-dui-btn-group flex"), m(e, "class", "flex flex-col justify-between");
|
842
842
|
},
|
843
843
|
m(p, k) {
|
844
|
-
|
844
|
+
L(p, e, k), b.m(e, null), _(e, t), _(e, s), _(s, o), _(o, l), _(s, r), _(s, c), _(c, f), g || (v = [
|
845
845
|
oe(
|
846
846
|
o,
|
847
847
|
"click",
|
@@ -880,7 +880,7 @@ function ms(i) {
|
|
880
880
|
e = C("div"), t = C("h1"), o = M(s), n = U(), l = C("div"), m(t, "class", "inline-block text-3xl font-bold pb-[1em] transition-opacity"), m(l, "class", "ml-6 inline-block dot-typing"), m(e, "class", "min-w-[200px]");
|
881
881
|
},
|
882
882
|
m(r, c) {
|
883
|
-
|
883
|
+
L(r, e, c), _(e, t), _(t, o), _(e, n), _(e, l);
|
884
884
|
},
|
885
885
|
p(r, c) {
|
886
886
|
c[0] & /*$_*/
|
@@ -901,7 +901,7 @@ function _s(i) {
|
|
901
901
|
e = C("div"), m(e, "class", "");
|
902
902
|
},
|
903
903
|
m(t, s) {
|
904
|
-
|
904
|
+
L(t, e, s);
|
905
905
|
},
|
906
906
|
p: x,
|
907
907
|
i: x,
|
@@ -921,7 +921,7 @@ function Ri(i) {
|
|
921
921
|
e = C("label"), t = C("span"), o = M(s), n = U(), l = C("textarea"), m(t, "class", "ce-dui-label-text text-base"), m(e, "class", "ce-dui-label"), m(e, "for", "justification"), m(l, "contenteditable", ""), m(l, "id", "justification"), m(l, "class", "ce-dui-textarea ce-dui-textarea-bordered textarea-ghost h-[6em] w-full text-base");
|
922
922
|
},
|
923
923
|
m(u, f) {
|
924
|
-
|
924
|
+
L(u, e, f), _(e, t), _(t, o), L(u, n, f), L(u, l, f), ut(
|
925
925
|
l,
|
926
926
|
/*$justification*/
|
927
927
|
i[25]
|
@@ -959,7 +959,7 @@ function bs(i) {
|
|
959
959
|
ge(e, s, o), t = !0;
|
960
960
|
},
|
961
961
|
i(s) {
|
962
|
-
t || (
|
962
|
+
t || (J(e.$$.fragment, s), t = !0);
|
963
963
|
},
|
964
964
|
o(s) {
|
965
965
|
Z(e.$$.fragment, s), t = !1;
|
@@ -979,7 +979,7 @@ function ki(i) {
|
|
979
979
|
e = C("div"), s = M(t), m(e, "class", "ce-dui-badge ce-dui-badge-lg h-[2em] ce-dui-badge-error text-xl pb-[.25em] m-[.5em]");
|
980
980
|
},
|
981
981
|
m(o, n) {
|
982
|
-
|
982
|
+
L(o, e, n), _(e, s);
|
983
983
|
},
|
984
984
|
p(o, n) {
|
985
985
|
n[0] & /*$unconformitiesStore*/
|
@@ -1001,7 +1001,7 @@ function Ai(i) {
|
|
1001
1001
|
e = C("div"), s = M(t), m(e, "class", "ce-dui-badge ce-dui-badge-lg h-[2em] ce-dui-badge-info text-xl pb-[.25em] m-[.5em]");
|
1002
1002
|
},
|
1003
1003
|
m(o, n) {
|
1004
|
-
|
1004
|
+
L(o, e, n), _(e, s);
|
1005
1005
|
},
|
1006
1006
|
p(o, n) {
|
1007
1007
|
n[0] & /*$_*/
|
@@ -1026,8 +1026,8 @@ function Ii(i) {
|
|
1026
1026
|
e = C("div"), t = C("label"), s = C("span"), n = M(o), l = U(), r = C("textarea"), u = U(), f = C("label"), g = C("span"), v = M("("), E = M(d), b = M(")"), m(s, "class", "ce-dui-label-text text-base"), m(t, "class", "ce-dui-label"), m(t, "for", "justification"), m(r, "contenteditable", ""), m(r, "id", "justification"), m(r, "class", "ce-dui-textarea ce-dui-textarea-bordered h-[6em] text-base"), m(r, "placeholder", c = /*$_*/
|
1027
1027
|
i[28]("faceCollector.yourJustification")), m(g, "class", "ce-dui-label-text-alt text-base"), m(f, "class", "ce-dui-label"), m(f, "for", "justification"), m(e, "class", "ce-dui-form-control");
|
1028
1028
|
},
|
1029
|
-
m(
|
1030
|
-
|
1029
|
+
m(T, F) {
|
1030
|
+
L(T, e, F), _(e, t), _(t, s), _(s, n), _(e, l), _(e, r), ut(
|
1031
1031
|
r,
|
1032
1032
|
/*$justification*/
|
1033
1033
|
i[25]
|
@@ -1038,22 +1038,22 @@ function Ii(i) {
|
|
1038
1038
|
i[55]
|
1039
1039
|
), p = !0);
|
1040
1040
|
},
|
1041
|
-
p(
|
1042
|
-
|
1041
|
+
p(T, F) {
|
1042
|
+
F[0] & /*$_*/
|
1043
1043
|
268435456 && o !== (o = /*$_*/
|
1044
|
-
|
1044
|
+
T[28]("faceCollector.provideAReasonForTheLowQualityCapture") + "") && V(n, o), F[0] & /*$_*/
|
1045
1045
|
268435456 && c !== (c = /*$_*/
|
1046
|
-
|
1046
|
+
T[28]("faceCollector.yourJustification")) && m(r, "placeholder", c), F[0] & /*$justification*/
|
1047
1047
|
33554432 && ut(
|
1048
1048
|
r,
|
1049
1049
|
/*$justification*/
|
1050
|
-
|
1051
|
-
),
|
1050
|
+
T[25]
|
1051
|
+
), F[0] & /*$_*/
|
1052
1052
|
268435456 && d !== (d = /*$_*/
|
1053
|
-
|
1053
|
+
T[28]("faceCollector.thisInformationIsRequired") + "") && V(E, d);
|
1054
1054
|
},
|
1055
|
-
d(
|
1056
|
-
|
1055
|
+
d(T) {
|
1056
|
+
T && S(e), p = !1, k();
|
1057
1057
|
}
|
1058
1058
|
};
|
1059
1059
|
}
|
@@ -1072,7 +1072,7 @@ function Li(i) {
|
|
1072
1072
|
i[7], m(t, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink text-base"), m(r, "id", "bry-cc-retake-button"), m(r, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink text-base"), m(e, "class", "ce-dui-btn-group flex");
|
1073
1073
|
},
|
1074
1074
|
m(v, d) {
|
1075
|
-
|
1075
|
+
L(v, e, d), _(e, t), _(t, o), _(e, l), _(e, r), _(r, u), f || (g = [
|
1076
1076
|
oe(
|
1077
1077
|
t,
|
1078
1078
|
"click",
|
@@ -1112,7 +1112,7 @@ function gs(i) {
|
|
1112
1112
|
e = C("h1"), s = M(t), m(e, "class", "text-3xl font-bold pb-[1em] transition-opacity");
|
1113
1113
|
},
|
1114
1114
|
m(o, n) {
|
1115
|
-
|
1115
|
+
L(o, e, n), _(e, s);
|
1116
1116
|
},
|
1117
1117
|
p(o, n) {
|
1118
1118
|
n[0] & /*$_*/
|
@@ -1134,7 +1134,7 @@ function vs(i) {
|
|
1134
1134
|
e = C("h1"), s = M(t), m(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1135
1135
|
},
|
1136
1136
|
m(o, n) {
|
1137
|
-
|
1137
|
+
L(o, e, n), _(e, s);
|
1138
1138
|
},
|
1139
1139
|
p(o, n) {
|
1140
1140
|
n[0] & /*$_*/
|
@@ -1156,7 +1156,7 @@ function ps(i) {
|
|
1156
1156
|
e = C("h1"), s = M(t), m(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1157
1157
|
},
|
1158
1158
|
m(o, n) {
|
1159
|
-
|
1159
|
+
L(o, e, n), _(e, s);
|
1160
1160
|
},
|
1161
1161
|
p(o, n) {
|
1162
1162
|
n[0] & /*$_*/
|
@@ -1178,7 +1178,7 @@ function ws(i) {
|
|
1178
1178
|
e = C("h1"), s = M(t), m(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1179
1179
|
},
|
1180
1180
|
m(o, n) {
|
1181
|
-
|
1181
|
+
L(o, e, n), _(e, s);
|
1182
1182
|
},
|
1183
1183
|
p(o, n) {
|
1184
1184
|
n[0] & /*$_*/
|
@@ -1203,7 +1203,7 @@ function Cs(i) {
|
|
1203
1203
|
e = C("h1"), s = M(t), o = M(": "), l = M(n), m(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1204
1204
|
},
|
1205
1205
|
m(r, c) {
|
1206
|
-
|
1206
|
+
L(r, e, c), _(e, s), _(e, o), _(e, l);
|
1207
1207
|
},
|
1208
1208
|
p(r, c) {
|
1209
1209
|
c[0] & /*$_*/
|
@@ -1233,7 +1233,7 @@ function Es(i) {
|
|
1233
1233
|
e = C("h1"), s = M(t), o = M(": "), l = M(n), r = M("."), m(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1234
1234
|
},
|
1235
1235
|
m(c, u) {
|
1236
|
-
|
1236
|
+
L(c, e, u), _(e, s), _(e, o), _(e, l), _(e, r);
|
1237
1237
|
},
|
1238
1238
|
p(c, u) {
|
1239
1239
|
u[0] & /*$_*/
|
@@ -1256,34 +1256,34 @@ function ys(i) {
|
|
1256
1256
|
(i[16] || !/*$ready*/
|
1257
1257
|
i[21]) || !K() && !/*$ready*/
|
1258
1258
|
i[21]) && /*$cameraStatusStore*/
|
1259
|
-
i[20] ===
|
1259
|
+
i[20] === j.OK, r, c, u, f, g, v, d = (
|
1260
1260
|
/*$videoStore*/
|
1261
1261
|
i[31] && Ci(i)
|
1262
1262
|
), E = o && yi(i), b = l && Ti(i), p = (
|
1263
1263
|
/*$captured*/
|
1264
1264
|
i[23] && Oi(i)
|
1265
1265
|
);
|
1266
|
-
const k = [us, cs],
|
1267
|
-
function
|
1266
|
+
const k = [us, cs], T = [];
|
1267
|
+
function F(A, B) {
|
1268
1268
|
return (!/*idrndClosed*/
|
1269
1269
|
A[17] || /*$captured*/
|
1270
1270
|
A[23]) && /*showUnconformities*/
|
1271
1271
|
A[3] ? 0 : (
|
1272
1272
|
/*$cameraStatusStore*/
|
1273
|
-
A[20] !==
|
1273
|
+
A[20] !== j.OK ? 1 : -1
|
1274
1274
|
);
|
1275
1275
|
}
|
1276
|
-
return ~(u =
|
1276
|
+
return ~(u = F(i)) && (f = T[u] = k[u](i)), {
|
1277
1277
|
c() {
|
1278
1278
|
e = C("div"), t = C("div"), d && d.c(), s = U(), E && E.c(), n = U(), b && b.c(), r = U(), p && p.c(), c = U(), f && f.c(), g = fa(), this.c = x, m(t, "class", "relative mx-auto"), m(e, "class", "flex flex-col justify-between");
|
1279
1279
|
},
|
1280
1280
|
m(A, B) {
|
1281
|
-
|
1281
|
+
L(A, e, B), _(e, t), d && d.m(t, null), _(t, s), E && E.m(t, null), _(t, n), b && b.m(t, null), _(t, r), p && p.m(t, null), i[52](e), L(A, c, B), ~u && T[u].m(A, B), L(A, g, B), v = !0;
|
1282
1282
|
},
|
1283
1283
|
p(A, B) {
|
1284
1284
|
/*$videoStore*/
|
1285
1285
|
A[31] ? d ? (d.p(A, B), B[1] & /*$videoStore*/
|
1286
|
-
1 &&
|
1286
|
+
1 && J(d, 1)) : (d = Ci(A), d.c(), J(d, 1), d.m(t, s)) : d && (lt(), Z(d, 1, 1, () => {
|
1287
1287
|
d = null;
|
1288
1288
|
}), rt()), B[0] & /*waitingIdrndCaptureEvent*/
|
1289
1289
|
262144 && (o = K() && /*waitingIdrndCaptureEvent*/
|
@@ -1292,27 +1292,27 @@ function ys(i) {
|
|
1292
1292
|
(A[16] || !/*$ready*/
|
1293
1293
|
A[21]) || !K() && !/*$ready*/
|
1294
1294
|
A[21]) && /*$cameraStatusStore*/
|
1295
|
-
A[20] ===
|
1295
|
+
A[20] === j.OK), l ? b ? b.p(A, B) : (b = Ti(A), b.c(), b.m(t, r)) : b && (b.d(1), b = null), /*$captured*/
|
1296
1296
|
A[23] ? p ? p.p(A, B) : (p = Oi(A), p.c(), p.m(t, null)) : p && (p.d(1), p = null);
|
1297
1297
|
let W = u;
|
1298
|
-
u =
|
1299
|
-
|
1300
|
-
}), rt()), ~u ? (f =
|
1298
|
+
u = F(A), u === W ? ~u && T[u].p(A, B) : (f && (lt(), Z(T[W], 1, 1, () => {
|
1299
|
+
T[W] = null;
|
1300
|
+
}), rt()), ~u ? (f = T[u], f ? f.p(A, B) : (f = T[u] = k[u](A), f.c()), J(f, 1), f.m(g.parentNode, g)) : f = null);
|
1301
1301
|
},
|
1302
1302
|
i(A) {
|
1303
|
-
v || (
|
1303
|
+
v || (J(d), J(f), v = !0);
|
1304
1304
|
},
|
1305
1305
|
o(A) {
|
1306
1306
|
Z(d), Z(f), v = !1;
|
1307
1307
|
},
|
1308
1308
|
d(A) {
|
1309
|
-
A && S(e), d && d.d(), E && E.d(), b && b.d(), p && p.d(), i[52](null), A && S(c), ~u &&
|
1309
|
+
A && S(e), d && d.d(), E && E.d(), b && b.d(), p && p.d(), i[52](null), A && S(c), ~u && T[u].d(A), A && S(g);
|
1310
1310
|
}
|
1311
1311
|
};
|
1312
1312
|
}
|
1313
|
-
let Ts =
|
1313
|
+
let Ts = 0, Os = 3e3;
|
1314
1314
|
function Rs() {
|
1315
|
-
({}).VITE_USE_DEV === "true" ? import("./index-no-detector_281a271b_3.0.0-
|
1315
|
+
({}).VITE_USE_DEV === "true" ? import("./index-no-detector_281a271b_3.0.0-RC03.js") : import("./index-no-detector_56051121_3.0.0-RC03.js");
|
1316
1316
|
}
|
1317
1317
|
function ks(i, e, t) {
|
1318
1318
|
const s = e.videoWidth / e.videoHeight, o = t.width / t.height;
|
@@ -1320,15 +1320,15 @@ function ks(i, e, t) {
|
|
1320
1320
|
s > o ? (r = e.videoHeight * o, n = (e.videoWidth - r) / 2) : s < o && (c = e.videoWidth / o, l = (e.videoHeight - c) / 2), i.drawImage(e, n, l, r, c, 0, 0, t.width, t.height);
|
1321
1321
|
}
|
1322
1322
|
function As(i, e, t) {
|
1323
|
-
let s, o, n, l, r, c, u, f, g, v, d, E, b, p, k,
|
1324
|
-
|
1325
|
-
let
|
1323
|
+
let s, o, n, l, r, c, u, f, g, v, d, E, b, p, k, T, F, A, B, W, R, y, X, $, ce, le, ke, dt, ae, Kt, ht, mt, _t, qt, zt, Jt;
|
1324
|
+
I(i, Lt, (a) => t(73, s = a)), I(i, Qe, (a) => t(75, n = a)), I(i, Y, (a) => t(20, l = a)), I(i, Ge, (a) => t(21, r = a)), I(i, da, (a) => t(76, c = a)), I(i, Ye, (a) => t(77, u = a)), I(i, he, (a) => t(22, f = a)), I(i, ha, (a) => t(78, g = a)), I(i, Se, (a) => t(23, v = a)), I(i, ui, (a) => t(79, d = a)), I(i, Dt, (a) => t(80, E = a)), I(i, fi, (a) => t(81, b = a)), I(i, ma, (a) => t(82, p = a)), I(i, _a, (a) => t(83, k = a)), I(i, Pe, (a) => t(84, T = a)), I(i, we, (a) => t(85, F = a)), I(i, ba, (a) => t(86, A = a)), I(i, Ft, (a) => t(24, B = a)), I(i, Nt, (a) => t(25, W = a)), I(i, me, (a) => t(26, R = a)), I(i, ee, (a) => t(27, y = a)), I(i, ga, (a) => t(28, X = a)), I(i, Ce, (a) => t(29, $ = a)), I(i, di, (a) => t(87, le = a)), I(i, Ze, (a) => t(88, ke = a)), I(i, St, (a) => t(89, dt = a)), I(i, Me, (a) => t(31, ae = a)), I(i, va, (a) => t(90, Kt = a)), I(i, xe, (a) => t(91, ht = a)), I(i, hi, (a) => t(92, mt = a)), I(i, mi, (a) => t(93, _t = a)), I(i, pa, (a) => t(32, qt = a)), I(i, wa, (a) => t(33, zt = a)), I(i, Ca, (a) => t(34, Jt = a));
|
1325
|
+
let D, te, ue, Xt, Qt = !1, Ae = !1, bt = !1, gt = !1, vt = (/* @__PURE__ */ new Date()).getTime(), pt = { width: 1280, height: 720 }, { enableMinutiae: wt } = e, { videoDimensions: Ct } = e, { noTabs: Et } = e, { weightsPath: yt } = e, { evaluatePhoto: fe } = e, { showCaptureButton: Tt } = e, { showUnconformities: Gt } = e, { showConfigButton: Yt } = e, { showAutoCaptureButton: Ot } = e, { showCameraButton: Zt } = e, { showJustificationField: xt } = e, { minEyeToEyeDist: Ie } = e, { videoOverlay: $t } = e, { videoOverlayTransparency: ei } = e;
|
1326
1326
|
const Ue = vi(!1);
|
1327
|
-
|
1327
|
+
I(i, Ue, (a) => t(74, o = a));
|
1328
1328
|
const Le = vi("data:image/png;base64");
|
1329
|
-
|
1330
|
-
let { widgetInstance:
|
1331
|
-
const
|
1329
|
+
I(i, Le, (a) => t(30, ce = a));
|
1330
|
+
let { widgetInstance: Q } = e, De = !1, Rt = !1, Ve = !0, ne = !0, ye = !1, ti = 0, ie = "", kt = 0, je = !0, ii = 0;
|
1331
|
+
const He = Ea.mixin({
|
1332
1332
|
toast: !0,
|
1333
1333
|
position: "bottom-left",
|
1334
1334
|
timer: 13e3,
|
@@ -1344,29 +1344,23 @@ function As(i, e, t) {
|
|
1344
1344
|
K() ? (Rs(), Si()) : await pe(), _e() || Bi();
|
1345
1345
|
});
|
1346
1346
|
async function ai() {
|
1347
|
-
const [a, w] = (Ct ?? "")?.replaceAll(" ", "")?.split("x")?.map((
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
videoHeight: z
|
1357
|
-
},
|
1358
|
-
ae
|
1359
|
-
);
|
1360
|
-
} else
|
1361
|
-
h(Me, ae = { videoWidth: a, videoHeight: w }, ae);
|
1347
|
+
const [a, w] = (Ct ?? "")?.replaceAll(" ", "")?.split("x")?.map((O) => O ? parseInt(O) : void 0);
|
1348
|
+
!a || !w || (_e() ? (await Wa(), h(
|
1349
|
+
Me,
|
1350
|
+
ae = {
|
1351
|
+
videoWidth: window.innerWidth,
|
1352
|
+
videoHeight: window.innerHeight
|
1353
|
+
},
|
1354
|
+
ae
|
1355
|
+
)) : h(Me, ae = { videoWidth: a, videoHeight: w }, ae));
|
1362
1356
|
}
|
1363
1357
|
function si() {
|
1364
|
-
h(Qe, n = !1, n), h(Se, v = !1, v), h(Ye, u = Pt.FRONT_CAMERA, u), Ot && h(fi, b = !1, b), h(Ft, B = !1, B), h(ee, y =
|
1358
|
+
h(Qe, n = !1, n), h(Se, v = !1, v), h(Ye, u = Pt.FRONT_CAMERA, u), Ot && h(fi, b = !1, b), h(Ft, B = !1, B), h(ee, y = H.OK, y), h(Pe, T = "", T), h(Ce, $.unconformities = [], $);
|
1365
1359
|
const a = nt(Bt);
|
1366
|
-
a.closedMouth = !1, a.isPersonCloseEnough = !1, a.isPersonTooclose = !0, a.isPersonInFrame = !1, Bt.set(a), h(we,
|
1360
|
+
a.closedMouth = !1, a.isPersonCloseEnough = !1, a.isPersonTooclose = !0, a.isPersonInFrame = !1, Bt.set(a), h(we, F = "", F);
|
1367
1361
|
}
|
1368
1362
|
function Si() {
|
1369
|
-
|
1363
|
+
Q.addEventListener("open", (a) => {
|
1370
1364
|
const w = a.detail[0].video;
|
1371
1365
|
h(
|
1372
1366
|
mi,
|
@@ -1375,45 +1369,45 @@ function As(i, e, t) {
|
|
1375
1369
|
height: w.videoHeight
|
1376
1370
|
},
|
1377
1371
|
_t
|
1378
|
-
), t(11,
|
1379
|
-
function
|
1380
|
-
ne || Be(
|
1372
|
+
), t(11, D.srcObject = w.srcObject, D), t(16, Ve = !1), Ra(Q);
|
1373
|
+
function O() {
|
1374
|
+
ne || Be(D, O, !0);
|
1381
1375
|
}
|
1382
|
-
|
1383
|
-
}),
|
1384
|
-
console.error(a), a.detail[0].message === "Device in use" ? h(
|
1385
|
-
}),
|
1386
|
-
}),
|
1387
|
-
v || (De = !1), t(17, ne = !0), t(18, ye = !1), l ===
|
1388
|
-
}),
|
1376
|
+
O();
|
1377
|
+
}), Q.addEventListener("error", (a) => {
|
1378
|
+
console.error(a), a.detail[0].message === "Device in use" ? h(Y, l = j.CAMERA_IN_USE_ERROR, l) : a.detail[0].message === "Permission denied" || a.detail[0].message === "Permission dismissed" ? h(Y, l = j.CAMERA_DENIED_ERROR, l) : a.detail[0].message === "Requested device not found" && h(Y, l = j.DEVICE_NOT_FOUND_ERROR, l), t(16, Ve = !1);
|
1379
|
+
}), Q.addEventListener("faceDetection", (a) => {
|
1380
|
+
}), Q.addEventListener("close", async (a) => {
|
1381
|
+
v || (De = !1), t(17, ne = !0), t(18, ye = !1), l === j.OK && h(Y, l = j.CAMERA_CLOSED_ERROR, l);
|
1382
|
+
}), Q.addEventListener("initialize", async (a) => {
|
1389
1383
|
Rt = !0, h(hi, mt = !0, mt), dt === $e.Face && !De && !v && Rt && await At();
|
1390
|
-
}),
|
1384
|
+
}), Q.addEventListener("capture", async (a) => {
|
1391
1385
|
t(19, ie = "");
|
1392
|
-
const { encryptedFile: w, photo:
|
1386
|
+
const { encryptedFile: w, photo: O } = a.detail[0];
|
1393
1387
|
h(xe, ht = w, ht);
|
1394
|
-
const P = (await et(
|
1388
|
+
const P = (await et(O)).split(",");
|
1395
1389
|
if (le)
|
1396
1390
|
try {
|
1397
|
-
let
|
1398
|
-
if (!await _i(
|
1391
|
+
let z = await ka(O);
|
1392
|
+
if (!await _i(z)) {
|
1399
1393
|
console.warn("Liveness capture - face not detected! Resetting capture.");
|
1400
1394
|
return;
|
1401
1395
|
}
|
1402
|
-
} catch (
|
1403
|
-
console.warn(
|
1396
|
+
} catch (z) {
|
1397
|
+
console.warn(z);
|
1404
1398
|
} finally {
|
1405
1399
|
t(18, ye = !1);
|
1406
1400
|
}
|
1407
|
-
if (t(18, ye = !1), h(ee, y =
|
1408
|
-
let
|
1401
|
+
if (t(18, ye = !1), h(ee, y = H.OK, y), h(Ce, $.isLoading = !0, $), h(Se, v = !0, v), De = !1, h(Le, ce = P[0], ce), h(me, R = P[1], R), h(Pe, T = P[1], T), !Kt) {
|
1402
|
+
let z, re, It, Je;
|
1409
1403
|
try {
|
1410
1404
|
if (!bi(Ie))
|
1411
1405
|
throw new Error("FACE_TOO_SMALL");
|
1412
|
-
({ bodyParts:
|
1406
|
+
({ bodyParts: z, icaoWarnings: re } = await tt(T, fe, (await et(w)).split(",")[1])), window.dispatchEvent(new CustomEvent(
|
1413
1407
|
"face-unconformities-validated",
|
1414
1408
|
{
|
1415
1409
|
detail: {
|
1416
|
-
bodyParts:
|
1410
|
+
bodyParts: z,
|
1417
1411
|
icaoWarnings: re,
|
1418
1412
|
status: y
|
1419
1413
|
}
|
@@ -1422,7 +1416,7 @@ function As(i, e, t) {
|
|
1422
1416
|
} catch (se) {
|
1423
1417
|
console.error(se);
|
1424
1418
|
let Oe = Ee.UNKNOWN, Xe = [], ci = [];
|
1425
|
-
se instanceof Wt && se.response?.status === 400 ? se.response.data && Array.isArray(se.response.data.bodyParts) ? (Xe = se.response.data.bodyParts, ci = se.response.data.icaoWarnings, It = se.response.data.invalidLivenessCounter, Je = se.response.data.invalidLivenessLimit, Oe = Xe.find((ua) => ua.livenessResult.error)?.livenessResult.error_code, h(ee, y =
|
1419
|
+
se instanceof Wt && se.response?.status === 400 ? se.response.data && Array.isArray(se.response.data.bodyParts) ? (Xe = se.response.data.bodyParts, ci = se.response.data.icaoWarnings, It = se.response.data.invalidLivenessCounter, Je = se.response.data.invalidLivenessLimit, Oe = Xe.find((ua) => ua.livenessResult.error)?.livenessResult.error_code, h(ee, y = H.LIVENESS_DETECTION_FAILURE, y), t(19, ie = Ee[Oe]), console.error("Liveness error:", Oe)) : h(ee, y = H.TEMPLATE_EXTRACTION_ERROR, y) : se instanceof Error && ["FACE_NOT_FOUND", "FACE_TOO_SMALL"].includes(se.message) ? (h(ee, y = H.LIVENESS_DETECTION_FAILURE, y), Oe = se.message, t(19, ie = Ee[Oe]), Xe = li()) : fe && He.fire({
|
1426
1420
|
icon: "error",
|
1427
1421
|
title: "Falha ao comunicar com serviço de Liveness"
|
1428
1422
|
}), h(Ce, $.isLoading = !1, $), window.dispatchEvent(new CustomEvent(
|
@@ -1431,7 +1425,7 @@ function As(i, e, t) {
|
|
1431
1425
|
detail: {
|
1432
1426
|
bodyParts: Xe,
|
1433
1427
|
errorCode: Oe,
|
1434
|
-
translatedError:
|
1428
|
+
translatedError: X(ie),
|
1435
1429
|
status: y,
|
1436
1430
|
icaoWarnings: ci,
|
1437
1431
|
invalidLivenessCounter: It,
|
@@ -1441,23 +1435,23 @@ function As(i, e, t) {
|
|
1441
1435
|
));
|
1442
1436
|
return;
|
1443
1437
|
}
|
1444
|
-
if (y !==
|
1438
|
+
if (y !== H.OK) {
|
1445
1439
|
h(Ce, $.isLoading = !1, $);
|
1446
1440
|
return;
|
1447
1441
|
}
|
1448
|
-
|
1442
|
+
z[0].livenessResult && ni(z[0].livenessResult), z.length !== 0 && z[0].data && h(me, R = z[0].data, R), it(re);
|
1449
1443
|
return;
|
1450
1444
|
}
|
1451
|
-
let
|
1445
|
+
let N, G;
|
1452
1446
|
try {
|
1453
|
-
|
1454
|
-
} catch (
|
1455
|
-
h(ee, y =
|
1447
|
+
G = await Aa(w), ni(G.data);
|
1448
|
+
} catch (z) {
|
1449
|
+
h(ee, y = H.UNKNOWN_LIVENESS_ERROR, y), console.error(z), z instanceof Wt && z.response?.status === 400 ? (N = z.response.data.error_code, t(19, ie = Ee[N]), console.error("Liveness error:", N), h(ee, y = H.LIVENESS_DETECTION_FAILURE, y)) : He.fire({
|
1456
1450
|
icon: "error",
|
1457
1451
|
title: "Falha ao comunicar com serviço de Liveness"
|
1458
1452
|
});
|
1459
1453
|
}
|
1460
|
-
if (y !==
|
1454
|
+
if (y !== H.OK) {
|
1461
1455
|
h(Ce, $.isLoading = !1, $), window.dispatchEvent(new CustomEvent(
|
1462
1456
|
"face-unconformities-validated",
|
1463
1457
|
{
|
@@ -1465,20 +1459,20 @@ function As(i, e, t) {
|
|
1465
1459
|
bodyParts: [
|
1466
1460
|
{
|
1467
1461
|
bodyPart: "FACE",
|
1468
|
-
data:
|
1462
|
+
data: T,
|
1469
1463
|
livenessBlob: (await et(w)).split(",")[1],
|
1470
|
-
...
|
1464
|
+
...G && { livenessResult: G }
|
1471
1465
|
}
|
1472
1466
|
],
|
1473
|
-
...
|
1474
|
-
...ie && { translatedError:
|
1467
|
+
...N && { errorCode: N },
|
1468
|
+
...ie && { translatedError: X(ie) },
|
1475
1469
|
status: y
|
1476
1470
|
}
|
1477
1471
|
}
|
1478
1472
|
));
|
1479
1473
|
return;
|
1480
1474
|
}
|
1481
|
-
let { bodyParts: de, icaoWarnings: Fe } = await tt(
|
1475
|
+
let { bodyParts: de, icaoWarnings: Fe } = await tt(T, fe);
|
1482
1476
|
window.dispatchEvent(new CustomEvent(
|
1483
1477
|
"face-unconformities-validated",
|
1484
1478
|
{
|
@@ -1486,16 +1480,16 @@ function As(i, e, t) {
|
|
1486
1480
|
bodyParts: de,
|
1487
1481
|
icaoWarnings: Fe,
|
1488
1482
|
status: y,
|
1489
|
-
errorCode:
|
1490
|
-
...ie && { translatedError:
|
1483
|
+
errorCode: N,
|
1484
|
+
...ie && { translatedError: X(ie) }
|
1491
1485
|
}
|
1492
1486
|
}
|
1493
1487
|
)), de[0].data && h(me, R = de[0].data, R), it(Fe);
|
1494
1488
|
});
|
1495
1489
|
}
|
1496
1490
|
async function pe(a) {
|
1497
|
-
if (!
|
1498
|
-
h(
|
1491
|
+
if (!je) {
|
1492
|
+
h(Y, l = j.CAMERA_ORIENTATION_PORTRAIT, l);
|
1499
1493
|
return;
|
1500
1494
|
}
|
1501
1495
|
await ai(), K() ? At() : await Pi(ae.videoWidth, ae.videoHeight, a);
|
@@ -1506,26 +1500,26 @@ function As(i, e, t) {
|
|
1506
1500
|
try {
|
1507
1501
|
await gi(640, 480);
|
1508
1502
|
} catch (a) {
|
1509
|
-
const w = a,
|
1510
|
-
console.error(w.message,
|
1503
|
+
const w = a, O = Re(a) && a.constraint ? a.constraint : "";
|
1504
|
+
console.error(w.message, O), Re(w) && "message" in w && w.message.includes("Requested device not found") && h(Y, l = j.DEVICE_NOT_FOUND_ERROR, l);
|
1511
1505
|
}
|
1512
1506
|
await Mt(), h(he, f = g[0].deviceId, f);
|
1513
1507
|
}
|
1514
|
-
h(
|
1508
|
+
h(Y, l = j.OK, l), Q && "openCamera" in Q && Q.openCamera(), De = !0, t(17, ne = !1), t(16, Ve = !0);
|
1515
1509
|
}
|
1516
1510
|
}
|
1517
1511
|
async function Ke() {
|
1518
1512
|
if (le && !Qt)
|
1519
|
-
return Be(
|
1520
|
-
if (
|
1513
|
+
return Be(D, Ke);
|
1514
|
+
if (D) {
|
1521
1515
|
if (dt !== $e.Face && !Et)
|
1522
|
-
return Be(
|
1523
|
-
h(Ge, r = !0, r), h(Ze, ke = !1, ke), le && (o || h(Ue, o = !0, o)), Be(
|
1516
|
+
return Be(D, Ke);
|
1517
|
+
h(Ge, r = !0, r), h(Ze, ke = !1, ke), le && (o || h(Ue, o = !0, o)), Be(D, Ke);
|
1524
1518
|
}
|
1525
1519
|
}
|
1526
1520
|
async function oi() {
|
1527
|
-
if (h(ee, y =
|
1528
|
-
t(18, ye = !0),
|
1521
|
+
if (h(ee, y = H.OK, y), K()) {
|
1522
|
+
t(18, ye = !0), Q.takePhoto();
|
1529
1523
|
return;
|
1530
1524
|
}
|
1531
1525
|
let a = null;
|
@@ -1537,49 +1531,49 @@ function As(i, e, t) {
|
|
1537
1531
|
try {
|
1538
1532
|
if (le && a) {
|
1539
1533
|
const w = a.toDataURL("image/jpeg").split(",");
|
1540
|
-
h(Le, ce = w[0], ce), h(me, R = w[1], R), h(Pe,
|
1541
|
-
let
|
1534
|
+
h(Le, ce = w[0], ce), h(me, R = w[1], R), h(Pe, T = w[1], T);
|
1535
|
+
let O, P;
|
1542
1536
|
if (!bi(Ie))
|
1543
1537
|
throw new Error("FACE_TOO_SMALL");
|
1544
|
-
({ bodyParts:
|
1538
|
+
({ bodyParts: O, icaoWarnings: P } = await tt(R, fe)), window.dispatchEvent(new CustomEvent(
|
1545
1539
|
"face-unconformities-validated",
|
1546
1540
|
{
|
1547
1541
|
detail: {
|
1548
|
-
bodyParts:
|
1542
|
+
bodyParts: O,
|
1549
1543
|
icaoWarnings: P,
|
1550
1544
|
status: y
|
1551
1545
|
}
|
1552
1546
|
}
|
1553
|
-
)),
|
1547
|
+
)), O.length !== 0 && O[0].data && h(me, R = O[0].data, R), it(P);
|
1554
1548
|
} else {
|
1555
|
-
const w = document.createElement("canvas"),
|
1556
|
-
w.width =
|
1549
|
+
const w = document.createElement("canvas"), O = w.getContext("2d");
|
1550
|
+
w.width = D.width, w.height = D.height, O?.drawImage(D, 0, 0, w.width, w.height);
|
1557
1551
|
const P = w.toDataURL("image/jpeg").split(",");
|
1558
|
-
h(Le, ce = P[0], ce), h(me, R = P[1], R), h(Pe,
|
1559
|
-
let { bodyParts:
|
1552
|
+
h(Le, ce = P[0], ce), h(me, R = P[1], R), h(Pe, T = P[1], T);
|
1553
|
+
let { bodyParts: N, icaoWarnings: G } = await tt(R, fe);
|
1560
1554
|
window.dispatchEvent(new CustomEvent(
|
1561
1555
|
"face-unconformities-validated",
|
1562
1556
|
{
|
1563
1557
|
detail: {
|
1564
|
-
bodyParts:
|
1565
|
-
icaoWarnings:
|
1558
|
+
bodyParts: N,
|
1559
|
+
icaoWarnings: G,
|
1566
1560
|
status: y
|
1567
1561
|
}
|
1568
1562
|
}
|
1569
|
-
)),
|
1563
|
+
)), N.length !== 0 && N[0].data && h(me, R = N[0].data, R), it(G);
|
1570
1564
|
}
|
1571
1565
|
} catch (w) {
|
1572
1566
|
console.error(w);
|
1573
|
-
let
|
1567
|
+
let O = Ee.UNKNOWN, P = [], N = [];
|
1574
1568
|
if (w instanceof Wt && w.response?.status === 400)
|
1575
1569
|
if (w.response.data && Array.isArray(w.response.data.bodyParts)) {
|
1576
|
-
P = w.response.data.bodyParts,
|
1577
|
-
const
|
1578
|
-
|
1570
|
+
P = w.response.data.bodyParts, N = w.response.data.icaoWarnings;
|
1571
|
+
const G = P.find((de) => de.livenessResult.error);
|
1572
|
+
O = G?.livenessResult.error_code, h(ee, y = H.LIVENESS_DETECTION_FAILURE, y), G?.livenessResult.error_code || h(ee, y = H.UNKNOWN_LIVENESS_ERROR, y), t(19, ie = Ee[O]), console.error("Liveness error:", O);
|
1579
1573
|
} else
|
1580
|
-
h(ee, y =
|
1574
|
+
h(ee, y = H.TEMPLATE_EXTRACTION_ERROR, y);
|
1581
1575
|
else
|
1582
|
-
w instanceof Error && ["FACE_NOT_FOUND", "FACE_TOO_SMALL"].includes(w.message) ? (h(ee, y =
|
1576
|
+
w instanceof Error && ["FACE_NOT_FOUND", "FACE_TOO_SMALL"].includes(w.message) ? (h(ee, y = H.LIVENESS_DETECTION_FAILURE, y), O = w.message, t(19, ie = Ee[O]), P = li()) : (h(ee, y = H.UNABLE_TO_COMMUNICATE_WITH_TEMPLATE_EXTRACTION_SERVICE, y), fe && He.fire({
|
1583
1577
|
icon: "error",
|
1584
1578
|
title: "Falha ao comunicar com serviço de Liveness"
|
1585
1579
|
}));
|
@@ -1588,10 +1582,10 @@ function As(i, e, t) {
|
|
1588
1582
|
{
|
1589
1583
|
detail: {
|
1590
1584
|
bodyParts: P,
|
1591
|
-
errorCode:
|
1592
|
-
translatedError:
|
1585
|
+
errorCode: O,
|
1586
|
+
translatedError: X(ie),
|
1593
1587
|
status: y,
|
1594
|
-
icaoWarnings:
|
1588
|
+
icaoWarnings: N
|
1595
1589
|
}
|
1596
1590
|
}
|
1597
1591
|
));
|
@@ -1611,16 +1605,16 @@ function As(i, e, t) {
|
|
1611
1605
|
window.dispatchEvent(new CustomEvent("face-scrapped")), si(), ne && At();
|
1612
1606
|
}
|
1613
1607
|
function ni(a) {
|
1614
|
-
let w = "",
|
1615
|
-
a.isAlive ? w = `Vivacidade de face (${a.face_liveness.probability.toFixed(2)}) e de captura (${a.capture_liveness.probability}, ${a.capture_liveness.score.toFixed(2)}) verificados!` : a?.face_liveness?.probability && (
|
1608
|
+
let w = "", O = "success";
|
1609
|
+
a.isAlive ? w = `Vivacidade de face (${a.face_liveness.probability.toFixed(2)}) e de captura (${a.capture_liveness.probability}, ${a.capture_liveness.score.toFixed(2)}) verificados!` : a?.face_liveness?.probability && (O = "error", w = `Vivacidade de face (${a.face_liveness.probability.toFixed(2)}) e de captura (${a.capture_liveness.probability}, ${a.capture_liveness.score.toFixed(2)}) insuficientes!`), A && He.fire({ icon: O, title: w });
|
1616
1610
|
}
|
1617
|
-
async function Pi(a, w,
|
1611
|
+
async function Pi(a, w, O) {
|
1618
1612
|
try {
|
1619
|
-
const { stream: P, deviceId:
|
1620
|
-
h(ui, d = P, d), h(he, f =
|
1613
|
+
const { stream: P, deviceId: N } = await gi(pt.width, pt.height, u, O);
|
1614
|
+
h(ui, d = P, d), h(he, f = N || g[0].deviceId, f);
|
1621
1615
|
} catch (P) {
|
1622
|
-
const
|
1623
|
-
console.error(
|
1616
|
+
const N = P, G = Re(P) && P.constraint ? P.constraint : "";
|
1617
|
+
console.error(N.message, G), Re(N) && "message" in N && N.message.includes("Permission denied") && (console.error("User didn't give permission to use camera!"), h(Y, l = j.CAMERA_DENIED_ERROR, l)), Re(N) && "message" in N && N.message.includes("Requested device not found") && h(Y, l = j.DEVICE_NOT_FOUND_ERROR, l), (G.includes("width") || G.includes("height")) && (console.error(`Camera does not meet the minimum supported requirements! (${G})`), h(Y, l = j.CAMERA_UNSUPPORTED, l));
|
1624
1618
|
}
|
1625
1619
|
}
|
1626
1620
|
async function ze() {
|
@@ -1628,7 +1622,7 @@ function As(i, e, t) {
|
|
1628
1622
|
}
|
1629
1623
|
function Bi() {
|
1630
1624
|
navigator.mediaDevices.ondevicechange = async (a) => {
|
1631
|
-
a.type == "devicechange" && (await Mt(), l !==
|
1625
|
+
a.type == "devicechange" && (await Mt(), l !== j.OK ? await ze() : (!K() && !d.active || K() && !ne) && (at(Q), h(Y, l = j.DEVICE_NOT_FOUND_ERROR, l), t(17, ne = !0)));
|
1632
1626
|
};
|
1633
1627
|
}
|
1634
1628
|
async function Wi() {
|
@@ -1637,37 +1631,37 @@ function As(i, e, t) {
|
|
1637
1631
|
if (a - vt > 5e3) {
|
1638
1632
|
vt = a;
|
1639
1633
|
try {
|
1640
|
-
const
|
1641
|
-
if (
|
1642
|
-
h(we,
|
1634
|
+
const O = await Ma(D);
|
1635
|
+
if (O < 50) {
|
1636
|
+
h(we, F = "faceCollector.illuminationTooLow", F);
|
1643
1637
|
return;
|
1644
1638
|
}
|
1645
|
-
if (
|
1646
|
-
h(we,
|
1639
|
+
if (O > 180) {
|
1640
|
+
h(we, F = "faceCollector.illuminationTooHigh", F);
|
1647
1641
|
return;
|
1648
1642
|
}
|
1649
|
-
} catch (
|
1650
|
-
console.warn("An error occurred while getting the video lighting level: ",
|
1643
|
+
} catch (O) {
|
1644
|
+
console.warn("An error occurred while getting the video lighting level: ", O);
|
1651
1645
|
}
|
1652
1646
|
try {
|
1653
|
-
if (await Ua(
|
1654
|
-
h(we,
|
1647
|
+
if (await Ua(D) < 4.5) {
|
1648
|
+
h(we, F = "faceCollector.lowSharpness", F);
|
1655
1649
|
return;
|
1656
1650
|
}
|
1657
|
-
} catch (
|
1658
|
-
console.warn("An error occurred while getting the video sharpness level: ",
|
1651
|
+
} catch (O) {
|
1652
|
+
console.warn("An error occurred while getting the video sharpness level: ", O);
|
1659
1653
|
}
|
1660
|
-
h(we,
|
1654
|
+
h(we, F = "faceCollector.faceWasNotFound", F);
|
1661
1655
|
} else
|
1662
1656
|
bt || (bt = !0, setTimeout(
|
1663
1657
|
() => {
|
1664
|
-
let
|
1658
|
+
let O = [
|
1665
1659
|
"faceCollector.faceWasNotFound",
|
1666
1660
|
"faceCollector.illuminationTooLow",
|
1667
1661
|
"faceCollector.lowSharpness",
|
1668
1662
|
"faceCollector.illuminationTooHigh"
|
1669
1663
|
];
|
1670
|
-
bt = !1, t(15, gt = !1),
|
1664
|
+
bt = !1, t(15, gt = !1), F && !O.includes(F) && h(we, F = "", F);
|
1671
1665
|
},
|
1672
1666
|
1500
|
1673
1667
|
));
|
@@ -1676,7 +1670,7 @@ function As(i, e, t) {
|
|
1676
1670
|
return [
|
1677
1671
|
{
|
1678
1672
|
bodyPart: "FACE",
|
1679
|
-
data:
|
1673
|
+
data: T,
|
1680
1674
|
format: "jpg",
|
1681
1675
|
capturedEyeToEyeDist: k,
|
1682
1676
|
minEyeToEyeDist: Ie
|
@@ -1684,59 +1678,59 @@ function As(i, e, t) {
|
|
1684
1678
|
];
|
1685
1679
|
}
|
1686
1680
|
async function Mi() {
|
1687
|
-
const a =
|
1688
|
-
|
1689
|
-
const de =
|
1681
|
+
const a = D.width, w = D.height, O = pt.height, P = w / a * O, N = document.createElement("canvas"), G = N.getContext("2d");
|
1682
|
+
N.width = O, N.height = P;
|
1683
|
+
const de = N.width / D.width, Fe = N.height / D.height, z = new Za({
|
1690
1684
|
x: p.x * de,
|
1691
1685
|
y: p.y * Fe,
|
1692
1686
|
width: p.width * de,
|
1693
1687
|
height: p.height * Fe
|
1694
1688
|
}), re = document.createElement("canvas");
|
1695
|
-
re.width =
|
1696
|
-
const [Je] = await (await import("./face_api_0e3ce8c8_3.0.0-
|
1689
|
+
re.width = z.width, re.height = z.height, re.getContext("2d")?.clearRect(0, 0, re.width, re.height), G && ks(G, D, N);
|
1690
|
+
const [Je] = await (await import("./face_api_0e3ce8c8_3.0.0-RC03.js")).extractFaces(N, [z]);
|
1697
1691
|
return Je;
|
1698
1692
|
}
|
1699
1693
|
const Ui = Bt.subscribe((a) => {
|
1700
1694
|
let w = "";
|
1701
1695
|
if (a.isPersonCloseEnough ? a.isPersonTooclose ? w = "faceCollector.moveAwayCamera" : a.isPersonInFrame ? a.closedMouth || (w = "faceCollector.dontOpenMouth") : w = "faceCollector.stayInFrame" : w = "faceCollector.comeCloserCamera", n && Ia(w), !v && b && n && !Ae && a.isPersonInFrame && a.closedMouth && !(!a.isPersonCloseEnough || a.isPersonTooclose)) {
|
1702
1696
|
t(14, Ae = !0), ii = (/* @__PURE__ */ new Date()).getTime() + Os;
|
1703
|
-
const
|
1697
|
+
const O = setInterval(
|
1704
1698
|
async () => {
|
1705
1699
|
if (!b || v || ye || K() && ne || !a.isPersonCloseEnough || a.isPersonTooclose || !a.closedMouth || !a.isPersonInFrame) {
|
1706
1700
|
t(14, Ae = !1), setTimeout(
|
1707
1701
|
() => {
|
1708
1702
|
},
|
1709
1703
|
1500
|
1710
|
-
), clearInterval(
|
1704
|
+
), clearInterval(O);
|
1711
1705
|
return;
|
1712
1706
|
}
|
1713
1707
|
const P = (/* @__PURE__ */ new Date()).getTime();
|
1714
|
-
Math.floor((ii - P) % (1e3 * 60) / 1e3) <= 0 && (clearInterval(
|
1708
|
+
Math.floor((ii - P) % (1e3 * 60) / 1e3) <= 0 && (clearInterval(O), t(14, Ae = !1), oi());
|
1715
1709
|
},
|
1716
1710
|
100
|
1717
1711
|
);
|
1718
1712
|
}
|
1719
1713
|
}), Vi = Se.subscribe((a) => {
|
1720
1714
|
ue && (a ? (ue.classList.remove("flex"), ue.classList.add("hidden")) : (ue.classList.add("flex"), ue.classList.remove("hidden")));
|
1721
|
-
}),
|
1722
|
-
|
1715
|
+
}), ji = Dt.subscribe((a) => {
|
1716
|
+
D && a && (console.log("setting null in video srcObject"), t(11, D.srcObject = null, D), t(11, D.src = "", D), h(he, f = null, f));
|
1723
1717
|
});
|
1724
1718
|
St.subscribe(async (a) => {
|
1725
1719
|
a === $e.Face && (await Mt(), K() && h(he, f = g[0]?.deviceId, f));
|
1726
1720
|
});
|
1727
|
-
const
|
1721
|
+
const Hi = he.subscribe(async (a) => {
|
1728
1722
|
if (!(!d || !a || K() && ne))
|
1729
1723
|
try {
|
1730
1724
|
if (K()) {
|
1731
|
-
await at(
|
1725
|
+
await at(Q), await pe();
|
1732
1726
|
return;
|
1733
1727
|
}
|
1734
|
-
t(11,
|
1728
|
+
t(11, D.srcObject = d, D), h(Dt, E = !1, E), je ? h(Y, l = j.OK, l) : h(Y, l = j.CAMERA_ORIENTATION_PORTRAIT, l), d.getTracks().forEach((w) => {
|
1735
1729
|
w.readyState === "live" && console.log(`Camera ${w.label} opened successfully!`);
|
1736
|
-
}), h(
|
1730
|
+
}), h(Y, l = j.OK, l), La(D);
|
1737
1731
|
} catch (w) {
|
1738
|
-
const
|
1739
|
-
t(17, ne = !0), Re(
|
1732
|
+
const O = w;
|
1733
|
+
t(17, ne = !0), Re(O) && "message" in O && O.message.includes("Requested device not found") && h(Y, l = j.DEVICE_NOT_FOUND_ERROR, l);
|
1740
1734
|
}
|
1741
1735
|
}), Ki = St.subscribe(async (a) => {
|
1742
1736
|
a === $e.Face && K() && !De && !v && Rt && await pe();
|
@@ -1745,14 +1739,14 @@ function As(i, e, t) {
|
|
1745
1739
|
}), zi = Da.subscribe(async (a) => {
|
1746
1740
|
if (g[0]?.deviceId) {
|
1747
1741
|
if (at(), !_e() || K()) {
|
1748
|
-
const
|
1742
|
+
const O = (g.findIndex((N) => N.deviceId === f) + 1) % g.length, P = g[O].deviceId;
|
1749
1743
|
K() ? h(he, f = P, f) : await pe(P);
|
1750
1744
|
return;
|
1751
1745
|
}
|
1752
1746
|
a ? (h(Ye, u = Pt.REAR_CAMERA, u), await pe()) : (h(Ye, u = Pt.FRONT_CAMERA, u), await pe());
|
1753
1747
|
}
|
1754
1748
|
}), Ji = Fa.subscribe(async (a) => {
|
1755
|
-
!a.isSupported || !_e() || c != "FACE" || (
|
1749
|
+
!a.isSupported || !_e() || c != "FACE" || (je = a.orientation.includes("portrait"), je ? D && !r ? await ze() : h(Y, l = j.OK, l) : h(Y, l = j.CAMERA_ORIENTATION_PORTRAIT, l));
|
1756
1750
|
});
|
1757
1751
|
async function ri() {
|
1758
1752
|
let a;
|
@@ -1760,10 +1754,10 @@ function As(i, e, t) {
|
|
1760
1754
|
if (kt >= Ts) {
|
1761
1755
|
kt = 0;
|
1762
1756
|
let w;
|
1763
|
-
if (w = Qa(
|
1764
|
-
const
|
1765
|
-
Na(te,
|
1766
|
-
const P = Ya(a,
|
1757
|
+
if (w = Qa(D, Xt), a = await w.withFaceLandmarks(), te.getContext("2d")?.clearRect(0, 0, te.width, te.height), a != null) {
|
1758
|
+
const O = Ga(te, D, !0);
|
1759
|
+
Na(te, D, O);
|
1760
|
+
const P = Ya(a, O);
|
1767
1761
|
Sa(P, te, wt), h(Qe, n = !0, n), t(15, gt = !0), vt = (/* @__PURE__ */ new Date()).getTime();
|
1768
1762
|
} else
|
1769
1763
|
Wi();
|
@@ -1772,7 +1766,7 @@ function As(i, e, t) {
|
|
1772
1766
|
} catch (w) {
|
1773
1767
|
console.warn(`FaceapiLoop: ${w}`);
|
1774
1768
|
} finally {
|
1775
|
-
o && Be(
|
1769
|
+
o && Be(D, ri);
|
1776
1770
|
}
|
1777
1771
|
}
|
1778
1772
|
Lt.subscribe(async (a) => {
|
@@ -1784,20 +1778,20 @@ function As(i, e, t) {
|
|
1784
1778
|
a && window.dispatchEvent(new CustomEvent("brycc-face-initialized"));
|
1785
1779
|
});
|
1786
1780
|
Pa(() => {
|
1787
|
-
at(), Vi(), Ui(),
|
1781
|
+
console.log("Destroying face collector"), at(Q), Vi(), Ui(), ji(), Hi(), Ki(), clearInterval(ti), qi(), zi(), Ji(), Xi(), Qi(), ti = 0;
|
1788
1782
|
});
|
1789
1783
|
function Gi(a) {
|
1790
1784
|
ot[a ? "unshift" : "push"](() => {
|
1791
|
-
|
1785
|
+
Q = a, t(1, Q);
|
1792
1786
|
});
|
1793
1787
|
}
|
1794
1788
|
function Yi(a) {
|
1795
1789
|
ot[a ? "unshift" : "push"](() => {
|
1796
|
-
|
1790
|
+
D = a, t(11, D);
|
1797
1791
|
});
|
1798
1792
|
}
|
1799
1793
|
const Zi = () => {
|
1800
|
-
K() || (t(11,
|
1794
|
+
K() || (t(11, D.width = ae.videoWidth, D), t(11, D.height = ae.videoHeight, D), t(12, te.width = ae.videoWidth, te), t(12, te.height = ae.videoHeight, te));
|
1801
1795
|
};
|
1802
1796
|
function xi(a) {
|
1803
1797
|
ot[a ? "unshift" : "push"](() => {
|
@@ -1822,10 +1816,10 @@ function As(i, e, t) {
|
|
1822
1816
|
await ze();
|
1823
1817
|
};
|
1824
1818
|
return i.$$set = (a) => {
|
1825
|
-
"enableMinutiae" in a && t(41, wt = a.enableMinutiae), "videoDimensions" in a && t(42, Ct = a.videoDimensions), "noTabs" in a && t(43, Et = a.noTabs), "weightsPath" in a && t(44, yt = a.weightsPath), "evaluatePhoto" in a && t(2, fe = a.evaluatePhoto), "showCaptureButton" in a && t(0, Tt = a.showCaptureButton), "showUnconformities" in a && t(3, Gt = a.showUnconformities), "showConfigButton" in a && t(4, Yt = a.showConfigButton), "showAutoCaptureButton" in a && t(5, Ot = a.showAutoCaptureButton), "showCameraButton" in a && t(6, Zt = a.showCameraButton), "showJustificationField" in a && t(7, xt = a.showJustificationField), "minEyeToEyeDist" in a && t(45, Ie = a.minEyeToEyeDist), "videoOverlay" in a && t(8, $t = a.videoOverlay), "videoOverlayTransparency" in a && t(9, ei = a.videoOverlayTransparency), "widgetInstance" in a && t(1,
|
1819
|
+
"enableMinutiae" in a && t(41, wt = a.enableMinutiae), "videoDimensions" in a && t(42, Ct = a.videoDimensions), "noTabs" in a && t(43, Et = a.noTabs), "weightsPath" in a && t(44, yt = a.weightsPath), "evaluatePhoto" in a && t(2, fe = a.evaluatePhoto), "showCaptureButton" in a && t(0, Tt = a.showCaptureButton), "showUnconformities" in a && t(3, Gt = a.showUnconformities), "showConfigButton" in a && t(4, Yt = a.showConfigButton), "showAutoCaptureButton" in a && t(5, Ot = a.showAutoCaptureButton), "showCameraButton" in a && t(6, Zt = a.showCameraButton), "showJustificationField" in a && t(7, xt = a.showJustificationField), "minEyeToEyeDist" in a && t(45, Ie = a.minEyeToEyeDist), "videoOverlay" in a && t(8, $t = a.videoOverlay), "videoOverlayTransparency" in a && t(9, ei = a.videoOverlayTransparency), "widgetInstance" in a && t(1, Q = a.widgetInstance);
|
1826
1820
|
}, [
|
1827
1821
|
Tt,
|
1828
|
-
|
1822
|
+
Q,
|
1829
1823
|
fe,
|
1830
1824
|
Gt,
|
1831
1825
|
Yt,
|
@@ -1835,7 +1829,7 @@ function As(i, e, t) {
|
|
1835
1829
|
$t,
|
1836
1830
|
ei,
|
1837
1831
|
Ke,
|
1838
|
-
|
1832
|
+
D,
|
1839
1833
|
te,
|
1840
1834
|
ue,
|
1841
1835
|
Ae,
|
@@ -1852,7 +1846,7 @@ function As(i, e, t) {
|
|
1852
1846
|
W,
|
1853
1847
|
R,
|
1854
1848
|
y,
|
1855
|
-
|
1849
|
+
X,
|
1856
1850
|
$,
|
1857
1851
|
ce,
|
1858
1852
|
ae,
|
@@ -1893,12 +1887,12 @@ class Is extends Ut {
|
|
1893
1887
|
this,
|
1894
1888
|
{
|
1895
1889
|
target: this.shadowRoot,
|
1896
|
-
props:
|
1890
|
+
props: Ht(this.attributes),
|
1897
1891
|
customElement: !0
|
1898
1892
|
},
|
1899
1893
|
As,
|
1900
1894
|
ys,
|
1901
|
-
|
1895
|
+
jt,
|
1902
1896
|
{
|
1903
1897
|
enableMinutiae: 41,
|
1904
1898
|
videoDimensions: 42,
|
@@ -1919,7 +1913,7 @@ class Is extends Ut {
|
|
1919
1913
|
},
|
1920
1914
|
null,
|
1921
1915
|
[-1, -1, -1, -1]
|
1922
|
-
), e && (e.target &&
|
1916
|
+
), e && (e.target && L(e.target, this, e.anchor), e.props && (this.$set(e.props), q()));
|
1923
1917
|
}
|
1924
1918
|
static get observedAttributes() {
|
1925
1919
|
return [
|