bry-biometric-collector 2.4.1 → 3.0.0-RC01
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_480bc217_3.0.0-RC01.js +1029 -0
- package/dist/FaceCollector_95bb182b_3.0.0-RC01.js +2041 -0
- package/dist/ValidationAlert_0a6b586f_3.0.0-RC01.js +1656 -0
- package/dist/{___vite-browser-external_commonjs-proxy_ed55ad19_2.4.1.js → ___vite-browser-external_commonjs-proxy_8bb8db0d_3.0.0-RC01.js} +31 -31
- package/dist/bry-biometric-collector-main.js +3 -3
- package/dist/{fingersApi_ad7905b1_2.4.1.js → fingersApi_09f5a55b_3.0.0-RC01.js} +2 -2
- package/dist/index-no-detector_281a271b_3.0.0-RC01.js +15045 -0
- package/dist/index-no-detector_56051121_3.0.0-RC01.js +10830 -0
- package/dist/index.js +3 -3
- package/dist/{index_2724a1c0_2.4.1.js → index_b8df6bb6_3.0.0-RC01.js} +3 -3
- package/dist/{index_554d13bc_2.4.1.js → index_fa569ec3_3.0.0-RC01.js} +3 -3
- package/dist/{main_a11369bb_2.4.1.js → main_550fd4ab_3.0.0-RC01.js} +2678 -2611
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/dist/DocumentCollector_1945fe25_2.4.1.js +0 -1121
- package/dist/FaceCollector_76033700_2.4.1.js +0 -1992
- package/dist/TakePictureBtn_8ab0f124_2.4.1.js +0 -864
- package/dist/index-no-detector_4b302e78_2.4.1.js +0 -10414
- package/dist/index-no-detector_b6972e40_2.4.1.js +0 -5739
- /package/dist/{en-us_99b30d39_2.4.1.js → en-us_99b30d39_3.0.0-RC01.js} +0 -0
- /package/dist/{es-cl_cfa50670_2.4.1.js → es-cl_cfa50670_3.0.0-RC01.js} +0 -0
- /package/dist/{face_api_0e3ce8c8_2.4.1.js → face_api_0e3ce8c8_3.0.0-RC01.js} +0 -0
- /package/dist/{pt-br_d5ca6103_2.4.1.js → pt-br_d5ca6103_3.0.0-RC01.js} +0 -0
@@ -0,0 +1,2041 @@
|
|
1
|
+
import { S as Ut, q as Vt, r as Ht, t as jt, w as D, x as q, y as C, z as be, B as x, C as m, D as ge, E as X, G as Z, H as S, I as ve, J as L, K as Ne, L as Me, M as _e, N as h, O as K, P as H, Q as U, R as fa, T as _, U as lt, V as rt, W as Lt, X as Qe, Y as G, 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 j, 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 Ha, b7 as pi, b8 as ja, b9 as ut, ba as Ka } from "./main_550fd4ab_3.0.0-RC01.js";
|
2
|
+
import { W as qa, C as za, V as Ja, a as Xa } from "./ValidationAlert_0a6b586f_3.0.0-RC01.js";
|
3
|
+
import { detectSingleFace as Qa, matchDimensions as Ga, resizeResults as Ya, Box as Za } from "./face_api_0e3ce8c8_3.0.0-RC01.js";
|
4
|
+
function xa(i) {
|
5
|
+
let e, t, s, o;
|
6
|
+
return t = new qa({}), {
|
7
|
+
c() {
|
8
|
+
e = C("div"), be(t.$$.fragment), this.c = x, m(e, "id", "face-oval"), m(e, "class", s = "loader " + /*loading*/
|
9
|
+
(i[0] ? "loading" : "") + " z-10"), m(
|
10
|
+
e,
|
11
|
+
"style",
|
12
|
+
/*styleVars*/
|
13
|
+
i[1]
|
14
|
+
);
|
15
|
+
},
|
16
|
+
m(n, l) {
|
17
|
+
D(n, e, l), ge(t, e, null), o = !0;
|
18
|
+
},
|
19
|
+
p(n, [l]) {
|
20
|
+
(!o || l & /*loading*/
|
21
|
+
1 && s !== (s = "loader " + /*loading*/
|
22
|
+
(n[0] ? "loading" : "") + " z-10")) && m(e, "class", s), (!o || l & /*styleVars*/
|
23
|
+
2) && m(
|
24
|
+
e,
|
25
|
+
"style",
|
26
|
+
/*styleVars*/
|
27
|
+
n[1]
|
28
|
+
);
|
29
|
+
},
|
30
|
+
i(n) {
|
31
|
+
o || (X(t.$$.fragment, n), o = !0);
|
32
|
+
},
|
33
|
+
o(n) {
|
34
|
+
Z(t.$$.fragment, n), o = !1;
|
35
|
+
},
|
36
|
+
d(n) {
|
37
|
+
n && S(e), ve(t);
|
38
|
+
}
|
39
|
+
};
|
40
|
+
}
|
41
|
+
const $a = "hsl(var(--p))", es = "hsl(var(--su))";
|
42
|
+
function ts(i, e, t) {
|
43
|
+
let s, o, n;
|
44
|
+
L(i, Ne, (v) => t(7, o = v)), L(i, Me, (v) => t(8, n = v));
|
45
|
+
let { loading: l } = e, r, c, u = 0.8, f = 8, g = 0.15;
|
46
|
+
return _e() && (u = 0.65, f = 10, g = 0.25), i.$$set = (v) => {
|
47
|
+
"loading" in v && t(0, l = v.loading);
|
48
|
+
}, i.$$.update = () => {
|
49
|
+
if (i.$$.dirty & /*$videoStore, percentage, ovalHeight, ovalWidth, $ovalDimensions, captureBarPercentage*/
|
50
|
+
476 && n) {
|
51
|
+
t(3, c = n.videoHeight * u), t(2, r = c / 1.45), h(Ne, o.width = r, o), h(Ne, o.height = c, o), h(Ne, o.x = (n.videoWidth - o.width) / 2, o);
|
52
|
+
let v = n.videoHeight - n.videoHeight * g;
|
53
|
+
h(Ne, o.y = v - o.height, o);
|
54
|
+
}
|
55
|
+
i.$$.dirty & /*ovalWidth, ovalHeight, borderWidth*/
|
56
|
+
44 && t(1, s = `
|
57
|
+
--oval-width: ${r}px;
|
58
|
+
--oval-height: ${c}px;
|
59
|
+
--border-color: ${$a};
|
60
|
+
--border-color-animation: ${es};
|
61
|
+
--oval-border: ${f}px;
|
62
|
+
`);
|
63
|
+
}, [
|
64
|
+
l,
|
65
|
+
s,
|
66
|
+
r,
|
67
|
+
c,
|
68
|
+
u,
|
69
|
+
f,
|
70
|
+
g,
|
71
|
+
o,
|
72
|
+
n
|
73
|
+
];
|
74
|
+
}
|
75
|
+
class Fi extends Ut {
|
76
|
+
constructor(e) {
|
77
|
+
super(), Vt(
|
78
|
+
this,
|
79
|
+
{
|
80
|
+
target: this.shadowRoot,
|
81
|
+
props: jt(this.attributes),
|
82
|
+
customElement: !0
|
83
|
+
},
|
84
|
+
ts,
|
85
|
+
xa,
|
86
|
+
Ht,
|
87
|
+
{ loading: 0 },
|
88
|
+
null
|
89
|
+
), e && (e.target && D(e.target, this, e.anchor), e.props && (this.$set(e.props), q()));
|
90
|
+
}
|
91
|
+
static get observedAttributes() {
|
92
|
+
return ["loading"];
|
93
|
+
}
|
94
|
+
get loading() {
|
95
|
+
return this.$$.ctx[0];
|
96
|
+
}
|
97
|
+
set loading(e) {
|
98
|
+
this.$$set({ loading: e }), q();
|
99
|
+
}
|
100
|
+
}
|
101
|
+
customElements.define("face-oval", Fi);
|
102
|
+
function is(i) {
|
103
|
+
let e;
|
104
|
+
return {
|
105
|
+
c() {
|
106
|
+
e = C("div"), this.c = x, m(e, "class", "video-overlay z-0"), m(
|
107
|
+
e,
|
108
|
+
"style",
|
109
|
+
/*styleVars*/
|
110
|
+
i[0]
|
111
|
+
);
|
112
|
+
},
|
113
|
+
m(t, s) {
|
114
|
+
D(t, e, s);
|
115
|
+
},
|
116
|
+
p(t, [s]) {
|
117
|
+
s & /*styleVars*/
|
118
|
+
1 && m(
|
119
|
+
e,
|
120
|
+
"style",
|
121
|
+
/*styleVars*/
|
122
|
+
t[0]
|
123
|
+
);
|
124
|
+
},
|
125
|
+
i: x,
|
126
|
+
o: x,
|
127
|
+
d(t) {
|
128
|
+
t && S(e);
|
129
|
+
}
|
130
|
+
};
|
131
|
+
}
|
132
|
+
function as(i, e, t) {
|
133
|
+
let s, o;
|
134
|
+
L(i, Me, (f) => t(6, o = f));
|
135
|
+
let n, l, r = 0.8, { overlayColor: c } = e, { overlayTransparency: u } = e;
|
136
|
+
return _e() && (r = 0.65), i.$$set = (f) => {
|
137
|
+
"overlayColor" in f && t(1, c = f.overlayColor), "overlayTransparency" in f && t(2, u = f.overlayTransparency);
|
138
|
+
}, i.$$.update = () => {
|
139
|
+
i.$$.dirty & /*$videoStore, percentage, ovalHeight*/
|
140
|
+
112 && o && (t(4, l = o.videoHeight * r), t(3, n = l / 1.45)), i.$$.dirty & /*ovalWidth, ovalHeight, overlayColor, overlayTransparency*/
|
141
|
+
30 && t(0, s = `
|
142
|
+
--oval-width: ${n}px;
|
143
|
+
--oval-height: ${l}px;
|
144
|
+
--overlay-color: ${c};
|
145
|
+
--overlay-transparency: ${u};
|
146
|
+
`);
|
147
|
+
}, [
|
148
|
+
s,
|
149
|
+
c,
|
150
|
+
u,
|
151
|
+
n,
|
152
|
+
l,
|
153
|
+
r,
|
154
|
+
o
|
155
|
+
];
|
156
|
+
}
|
157
|
+
class Ni extends Ut {
|
158
|
+
constructor(e) {
|
159
|
+
super(), Vt(
|
160
|
+
this,
|
161
|
+
{
|
162
|
+
target: this.shadowRoot,
|
163
|
+
props: jt(this.attributes),
|
164
|
+
customElement: !0
|
165
|
+
},
|
166
|
+
as,
|
167
|
+
is,
|
168
|
+
Ht,
|
169
|
+
{ overlayColor: 1, overlayTransparency: 2 },
|
170
|
+
null
|
171
|
+
), e && (e.target && D(e.target, this, e.anchor), e.props && (this.$set(e.props), q()));
|
172
|
+
}
|
173
|
+
static get observedAttributes() {
|
174
|
+
return ["overlayColor", "overlayTransparency"];
|
175
|
+
}
|
176
|
+
get overlayColor() {
|
177
|
+
return this.$$.ctx[1];
|
178
|
+
}
|
179
|
+
set overlayColor(e) {
|
180
|
+
this.$$set({ overlayColor: e }), q();
|
181
|
+
}
|
182
|
+
get overlayTransparency() {
|
183
|
+
return this.$$.ctx[2];
|
184
|
+
}
|
185
|
+
set overlayTransparency(e) {
|
186
|
+
this.$$set({ overlayTransparency: e }), q();
|
187
|
+
}
|
188
|
+
}
|
189
|
+
customElements.define("overlay-oval", Ni);
|
190
|
+
function wi(i, e, t) {
|
191
|
+
const s = i.slice();
|
192
|
+
return s[118] = e[t], s;
|
193
|
+
}
|
194
|
+
function Ci(i) {
|
195
|
+
let e, t, s = K(), o, n, l, r, c, u, f, g, v, d, E, b, p, k, O, N, A, B = s && ss(i), W = (
|
196
|
+
/*$ready*/
|
197
|
+
i[21] && Ei(i)
|
198
|
+
);
|
199
|
+
return d = new Ba({}), b = new za({
|
200
|
+
props: {
|
201
|
+
showConfigButton: (
|
202
|
+
/*showConfigButton*/
|
203
|
+
i[4]
|
204
|
+
),
|
205
|
+
showAutoCaptureButton: (
|
206
|
+
/*showAutoCaptureButton*/
|
207
|
+
i[5]
|
208
|
+
),
|
209
|
+
showCaptureButton: (
|
210
|
+
/*showCaptureButton*/
|
211
|
+
i[0]
|
212
|
+
),
|
213
|
+
showCameraButton: (
|
214
|
+
/*showCameraButton*/
|
215
|
+
i[6]
|
216
|
+
),
|
217
|
+
enableCaptureButton: (
|
218
|
+
/*enableCaptureButton*/
|
219
|
+
i[15]
|
220
|
+
),
|
221
|
+
videoOverlay: (
|
222
|
+
/*videoOverlay*/
|
223
|
+
i[8]
|
224
|
+
),
|
225
|
+
videoOverlayTransparency: (
|
226
|
+
/*videoOverlayTransparency*/
|
227
|
+
i[9]
|
228
|
+
),
|
229
|
+
idrndClosed: (
|
230
|
+
/*idrndClosed*/
|
231
|
+
i[17]
|
232
|
+
),
|
233
|
+
idrndLoading: (
|
234
|
+
/*idrndLoading*/
|
235
|
+
i[16]
|
236
|
+
),
|
237
|
+
waitingIdrndCaptureEvent: (
|
238
|
+
/*waitingIdrndCaptureEvent*/
|
239
|
+
i[18]
|
240
|
+
),
|
241
|
+
handler: (
|
242
|
+
/*capture*/
|
243
|
+
i[37]
|
244
|
+
)
|
245
|
+
}
|
246
|
+
}), {
|
247
|
+
c() {
|
248
|
+
e = C("div"), t = C("div"), B && B.c(), o = U(), n = C("video"), r = U(), c = C("canvas"), u = U(), f = C("div"), g = C("div"), W && W.c(), v = U(), be(d.$$.fragment), E = U(), be(b.$$.fragment), m(n, "id", "bry-cc-camera-video-tag"), m(n, "class", l = /*$ready*/
|
249
|
+
i[21] ? _e() ? "absolute inset-0 -scale-x-100" : "w-full h-full object-cover -scale-x-100" : "w-0 h-0"), n.playsInline = !0, n.muted = !0, n.autoplay = !0, m(c, "id", "bry-ce-detectionsCanvas"), m(c, "class", "absolute top-0 left-0 max-w-full -scale-x-100"), m(t, "class", "overflow-hidden"), st(
|
250
|
+
t,
|
251
|
+
"width",
|
252
|
+
/*$videoStore*/
|
253
|
+
i[31].videoWidth + "px"
|
254
|
+
), st(
|
255
|
+
t,
|
256
|
+
"height",
|
257
|
+
/*$videoStore*/
|
258
|
+
i[31].videoHeight + "px"
|
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
|
+
i[21] ? "relative" : "relative w-0 h-0"), e.hidden = k = /*$cameraStatusStore*/
|
261
|
+
i[20] !== H.OK || K() && /*idrndLoading*/
|
262
|
+
(i[16] || /*idrndClosed*/
|
263
|
+
i[17] || /*waitingIdrndCaptureEvent*/
|
264
|
+
i[18]);
|
265
|
+
},
|
266
|
+
m(R, y) {
|
267
|
+
D(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), O = !0, N || (A = [
|
268
|
+
oe(
|
269
|
+
n,
|
270
|
+
"canplay",
|
271
|
+
/*canplay_handler*/
|
272
|
+
i[48]
|
273
|
+
),
|
274
|
+
oe(
|
275
|
+
n,
|
276
|
+
"play",
|
277
|
+
/*play*/
|
278
|
+
i[10],
|
279
|
+
{ once: !0 }
|
280
|
+
)
|
281
|
+
], N = !0);
|
282
|
+
},
|
283
|
+
p(R, y) {
|
284
|
+
s && B.p(R, y), (!O || y[0] & /*$ready*/
|
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), (!O || y[1] & /*$videoStore*/
|
287
|
+
1) && st(
|
288
|
+
t,
|
289
|
+
"width",
|
290
|
+
/*$videoStore*/
|
291
|
+
R[31].videoWidth + "px"
|
292
|
+
), (!O || y[1] & /*$videoStore*/
|
293
|
+
1) && st(
|
294
|
+
t,
|
295
|
+
"height",
|
296
|
+
/*$videoStore*/
|
297
|
+
R[31].videoHeight + "px"
|
298
|
+
), /*$ready*/
|
299
|
+
R[21] ? W ? (W.p(R, y), y[0] & /*$ready*/
|
300
|
+
2097152 && X(W, 1)) : (W = Ei(R), W.c(), X(W, 1), W.m(g, null)) : W && (lt(), Z(W, 1, 1, () => {
|
301
|
+
W = null;
|
302
|
+
}), rt());
|
303
|
+
const Q = {};
|
304
|
+
y[0] & /*showConfigButton*/
|
305
|
+
16 && (Q.showConfigButton = /*showConfigButton*/
|
306
|
+
R[4]), y[0] & /*showAutoCaptureButton*/
|
307
|
+
32 && (Q.showAutoCaptureButton = /*showAutoCaptureButton*/
|
308
|
+
R[5]), y[0] & /*showCaptureButton*/
|
309
|
+
1 && (Q.showCaptureButton = /*showCaptureButton*/
|
310
|
+
R[0]), y[0] & /*showCameraButton*/
|
311
|
+
64 && (Q.showCameraButton = /*showCameraButton*/
|
312
|
+
R[6]), y[0] & /*enableCaptureButton*/
|
313
|
+
32768 && (Q.enableCaptureButton = /*enableCaptureButton*/
|
314
|
+
R[15]), y[0] & /*videoOverlay*/
|
315
|
+
256 && (Q.videoOverlay = /*videoOverlay*/
|
316
|
+
R[8]), y[0] & /*videoOverlayTransparency*/
|
317
|
+
512 && (Q.videoOverlayTransparency = /*videoOverlayTransparency*/
|
318
|
+
R[9]), y[0] & /*idrndClosed*/
|
319
|
+
131072 && (Q.idrndClosed = /*idrndClosed*/
|
320
|
+
R[17]), y[0] & /*idrndLoading*/
|
321
|
+
65536 && (Q.idrndLoading = /*idrndLoading*/
|
322
|
+
R[16]), y[0] & /*waitingIdrndCaptureEvent*/
|
323
|
+
262144 && (Q.waitingIdrndCaptureEvent = /*waitingIdrndCaptureEvent*/
|
324
|
+
R[18]), b.$set(Q), (!O || y[0] & /*$ready*/
|
325
|
+
2097152 && p !== (p = /*$ready*/
|
326
|
+
R[21] ? "relative" : "relative w-0 h-0")) && m(e, "class", p), (!O || y[0] & /*$cameraStatusStore, idrndLoading, idrndClosed, waitingIdrndCaptureEvent*/
|
327
|
+
1507328 && k !== (k = /*$cameraStatusStore*/
|
328
|
+
R[20] !== H.OK || K() && /*idrndLoading*/
|
329
|
+
(R[16] || /*idrndClosed*/
|
330
|
+
R[17] || /*waitingIdrndCaptureEvent*/
|
331
|
+
R[18]))) && (e.hidden = k);
|
332
|
+
},
|
333
|
+
i(R) {
|
334
|
+
O || (X(W), X(d.$$.fragment, R), X(b.$$.fragment, R), O = !0);
|
335
|
+
},
|
336
|
+
o(R) {
|
337
|
+
Z(W), Z(d.$$.fragment, R), Z(b.$$.fragment, R), O = !1;
|
338
|
+
},
|
339
|
+
d(R) {
|
340
|
+
R && S(e), B && B.d(), i[47](null), i[49](null), W && W.d(), ve(d), ve(b), N = !1, ft(A);
|
341
|
+
}
|
342
|
+
};
|
343
|
+
}
|
344
|
+
function ss(i) {
|
345
|
+
let e;
|
346
|
+
return {
|
347
|
+
c() {
|
348
|
+
e = C("idlive-face-capture"), e.hidden = !0, We(e, "mask_hidden", ""), We(e, "auto_capture_disabled", ""), We(e, "auto_close_disabled", ""), We(
|
349
|
+
e,
|
350
|
+
"device_id",
|
351
|
+
/*$selectedVideoDeviceId*/
|
352
|
+
i[22]
|
353
|
+
);
|
354
|
+
},
|
355
|
+
m(t, s) {
|
356
|
+
D(t, e, s), i[46](e);
|
357
|
+
},
|
358
|
+
p(t, s) {
|
359
|
+
s[0] & /*$selectedVideoDeviceId*/
|
360
|
+
4194304 && We(
|
361
|
+
e,
|
362
|
+
"device_id",
|
363
|
+
/*$selectedVideoDeviceId*/
|
364
|
+
t[22]
|
365
|
+
);
|
366
|
+
},
|
367
|
+
d(t) {
|
368
|
+
t && S(e), i[46](null);
|
369
|
+
}
|
370
|
+
};
|
371
|
+
}
|
372
|
+
function Ei(i) {
|
373
|
+
let e, t, s, o, n, l;
|
374
|
+
return e = new Ja({
|
375
|
+
props: {
|
376
|
+
isCountingDown: (
|
377
|
+
/*isCountingDown*/
|
378
|
+
i[14]
|
379
|
+
)
|
380
|
+
}
|
381
|
+
}), s = new Fi({
|
382
|
+
props: { loading: (
|
383
|
+
/*isCountingDown*/
|
384
|
+
i[14]
|
385
|
+
) }
|
386
|
+
}), n = new Ni({
|
387
|
+
props: {
|
388
|
+
overlayColor: (
|
389
|
+
/*videoOverlay*/
|
390
|
+
i[8]
|
391
|
+
),
|
392
|
+
overlayTransparency: (
|
393
|
+
/*videoOverlayTransparency*/
|
394
|
+
i[9]
|
395
|
+
)
|
396
|
+
}
|
397
|
+
}), {
|
398
|
+
c() {
|
399
|
+
be(e.$$.fragment), t = U(), be(s.$$.fragment), o = U(), be(n.$$.fragment);
|
400
|
+
},
|
401
|
+
m(r, c) {
|
402
|
+
ge(e, r, c), D(r, t, c), ge(s, r, c), D(r, o, c), ge(n, r, c), l = !0;
|
403
|
+
},
|
404
|
+
p(r, c) {
|
405
|
+
const u = {};
|
406
|
+
c[0] & /*isCountingDown*/
|
407
|
+
16384 && (u.isCountingDown = /*isCountingDown*/
|
408
|
+
r[14]), e.$set(u);
|
409
|
+
const f = {};
|
410
|
+
c[0] & /*isCountingDown*/
|
411
|
+
16384 && (f.loading = /*isCountingDown*/
|
412
|
+
r[14]), s.$set(f);
|
413
|
+
const g = {};
|
414
|
+
c[0] & /*videoOverlay*/
|
415
|
+
256 && (g.overlayColor = /*videoOverlay*/
|
416
|
+
r[8]), c[0] & /*videoOverlayTransparency*/
|
417
|
+
512 && (g.overlayTransparency = /*videoOverlayTransparency*/
|
418
|
+
r[9]), n.$set(g);
|
419
|
+
},
|
420
|
+
i(r) {
|
421
|
+
l || (X(e.$$.fragment, r), X(s.$$.fragment, r), X(n.$$.fragment, r), l = !0);
|
422
|
+
},
|
423
|
+
o(r) {
|
424
|
+
Z(e.$$.fragment, r), Z(s.$$.fragment, r), Z(n.$$.fragment, r), l = !1;
|
425
|
+
},
|
426
|
+
d(r) {
|
427
|
+
ve(e, r), r && S(t), ve(s, r), r && S(o), ve(n, r);
|
428
|
+
}
|
429
|
+
};
|
430
|
+
}
|
431
|
+
function yi(i) {
|
432
|
+
let e, t, s, o, n;
|
433
|
+
function l(u, f) {
|
434
|
+
return (
|
435
|
+
/*$isLoading*/
|
436
|
+
u[32] ? ns : os
|
437
|
+
);
|
438
|
+
}
|
439
|
+
let r = l(i), c = r(i);
|
440
|
+
return {
|
441
|
+
c() {
|
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
|
+
},
|
444
|
+
m(u, f) {
|
445
|
+
D(u, e, f), _(e, t), _(t, s), _(t, n), c.m(t, null);
|
446
|
+
},
|
447
|
+
p(u, f) {
|
448
|
+
r === (r = l(u)) && c ? c.p(u, f) : (c.d(1), c = r(u), c && (c.c(), c.m(t, null)));
|
449
|
+
},
|
450
|
+
d(u) {
|
451
|
+
u && S(e), c.d();
|
452
|
+
}
|
453
|
+
};
|
454
|
+
}
|
455
|
+
function os(i) {
|
456
|
+
let e, t = (
|
457
|
+
/*$_*/
|
458
|
+
i[28]("faceCollector.obtainingPicture") + ""
|
459
|
+
), s;
|
460
|
+
return {
|
461
|
+
c() {
|
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
|
+
},
|
464
|
+
m(o, n) {
|
465
|
+
D(o, e, n), _(e, s);
|
466
|
+
},
|
467
|
+
p(o, n) {
|
468
|
+
n[0] & /*$_*/
|
469
|
+
268435456 && t !== (t = /*$_*/
|
470
|
+
o[28]("faceCollector.obtainingPicture") + "") && V(s, t);
|
471
|
+
},
|
472
|
+
d(o) {
|
473
|
+
o && S(e);
|
474
|
+
}
|
475
|
+
};
|
476
|
+
}
|
477
|
+
function ns(i) {
|
478
|
+
let e;
|
479
|
+
return {
|
480
|
+
c() {
|
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
|
+
},
|
483
|
+
m(t, s) {
|
484
|
+
D(t, e, s);
|
485
|
+
},
|
486
|
+
p: x,
|
487
|
+
d(t) {
|
488
|
+
t && S(e);
|
489
|
+
}
|
490
|
+
};
|
491
|
+
}
|
492
|
+
function Ti(i) {
|
493
|
+
let e, t, s, o, n;
|
494
|
+
function l(u, f) {
|
495
|
+
return (
|
496
|
+
/*$isLoading*/
|
497
|
+
u[32] ? rs : ls
|
498
|
+
);
|
499
|
+
}
|
500
|
+
let r = l(i), c = r(i);
|
501
|
+
return {
|
502
|
+
c() {
|
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
|
+
},
|
505
|
+
m(u, f) {
|
506
|
+
D(u, e, f), _(e, t), _(t, s), _(t, n), c.m(t, null);
|
507
|
+
},
|
508
|
+
p(u, f) {
|
509
|
+
r === (r = l(u)) && c ? c.p(u, f) : (c.d(1), c = r(u), c && (c.c(), c.m(t, null)));
|
510
|
+
},
|
511
|
+
d(u) {
|
512
|
+
u && S(e), c.d();
|
513
|
+
}
|
514
|
+
};
|
515
|
+
}
|
516
|
+
function ls(i) {
|
517
|
+
let e, t = (
|
518
|
+
/*$_*/
|
519
|
+
i[28]("faceCollector.initiatingCamera") + ""
|
520
|
+
), s;
|
521
|
+
return {
|
522
|
+
c() {
|
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
|
+
},
|
525
|
+
m(o, n) {
|
526
|
+
D(o, e, n), _(e, s);
|
527
|
+
},
|
528
|
+
p(o, n) {
|
529
|
+
n[0] & /*$_*/
|
530
|
+
268435456 && t !== (t = /*$_*/
|
531
|
+
o[28]("faceCollector.initiatingCamera") + "") && V(s, t);
|
532
|
+
},
|
533
|
+
d(o) {
|
534
|
+
o && S(e);
|
535
|
+
}
|
536
|
+
};
|
537
|
+
}
|
538
|
+
function rs(i) {
|
539
|
+
let e;
|
540
|
+
return {
|
541
|
+
c() {
|
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
|
+
},
|
544
|
+
m(t, s) {
|
545
|
+
D(t, e, s);
|
546
|
+
},
|
547
|
+
p: x,
|
548
|
+
d(t) {
|
549
|
+
t && S(e);
|
550
|
+
}
|
551
|
+
};
|
552
|
+
}
|
553
|
+
function Oi(i) {
|
554
|
+
let e, t, s = (
|
555
|
+
/*$_*/
|
556
|
+
i[28]("faceCollector.finish") + ""
|
557
|
+
), o, n, l, r, c = (
|
558
|
+
/*$_*/
|
559
|
+
i[28]("faceCollector.retakePhoto") + ""
|
560
|
+
), u, f, g;
|
561
|
+
return {
|
562
|
+
c() {
|
563
|
+
e = C("div"), t = C("button"), o = M(s), l = U(), r = C("button"), u = M(c), t.disabled = n = /*$justification*/
|
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
|
+
},
|
566
|
+
m(v, d) {
|
567
|
+
D(v, e, d), _(e, t), _(t, o), _(e, l), _(e, r), _(r, u), f || (g = [
|
568
|
+
oe(
|
569
|
+
t,
|
570
|
+
"click",
|
571
|
+
/*click_handler*/
|
572
|
+
i[50]
|
573
|
+
),
|
574
|
+
oe(
|
575
|
+
r,
|
576
|
+
"click",
|
577
|
+
/*click_handler_1*/
|
578
|
+
i[51]
|
579
|
+
)
|
580
|
+
], f = !0);
|
581
|
+
},
|
582
|
+
p(v, d) {
|
583
|
+
d[0] & /*$_*/
|
584
|
+
268435456 && s !== (s = /*$_*/
|
585
|
+
v[28]("faceCollector.finish") + "") && V(o, s), d[0] & /*$justification*/
|
586
|
+
33554432 && n !== (n = /*$justification*/
|
587
|
+
v[25].length === 0) && (t.disabled = n), d[0] & /*$_*/
|
588
|
+
268435456 && c !== (c = /*$_*/
|
589
|
+
v[28]("faceCollector.retakePhoto") + "") && V(u, c);
|
590
|
+
},
|
591
|
+
d(v) {
|
592
|
+
v && S(e), f = !1, ft(g);
|
593
|
+
}
|
594
|
+
};
|
595
|
+
}
|
596
|
+
function cs(i) {
|
597
|
+
let e, t;
|
598
|
+
return e = new Xa({ props: { handler: (
|
599
|
+
/*func*/
|
600
|
+
i[60]
|
601
|
+
) } }), {
|
602
|
+
c() {
|
603
|
+
be(e.$$.fragment);
|
604
|
+
},
|
605
|
+
m(s, o) {
|
606
|
+
ge(e, s, o), t = !0;
|
607
|
+
},
|
608
|
+
p: x,
|
609
|
+
i(s) {
|
610
|
+
t || (X(e.$$.fragment, s), t = !0);
|
611
|
+
},
|
612
|
+
o(s) {
|
613
|
+
Z(e.$$.fragment, s), t = !1;
|
614
|
+
},
|
615
|
+
d(s) {
|
616
|
+
ve(e, s);
|
617
|
+
}
|
618
|
+
};
|
619
|
+
}
|
620
|
+
function us(i) {
|
621
|
+
let e, t, s, o, n, l, r, c, u;
|
622
|
+
const f = [
|
623
|
+
_s,
|
624
|
+
ms,
|
625
|
+
hs,
|
626
|
+
ds,
|
627
|
+
fs
|
628
|
+
], g = [];
|
629
|
+
function v(d, E) {
|
630
|
+
return (
|
631
|
+
/*$captured*/
|
632
|
+
d[23] ? (
|
633
|
+
/*$unconformitiesStore*/
|
634
|
+
d[29].isLoading ? 1 : (
|
635
|
+
/*$requestResult*/
|
636
|
+
d[27] !== j.OK ? 2 : (
|
637
|
+
/*$saved*/
|
638
|
+
d[24] ? 4 : 3
|
639
|
+
)
|
640
|
+
)
|
641
|
+
) : 0
|
642
|
+
);
|
643
|
+
}
|
644
|
+
return l = v(i), r = g[l] = f[l](i), {
|
645
|
+
c() {
|
646
|
+
e = C("div"), t = C("img"), n = U(), r.c(), m(t, "class", "m-auto col-start-1 col-end-1 max-h-[23.2em]"), ct(t.src, s = /*$dataTypePrefix*/
|
647
|
+
i[30] + "," + /*$image*/
|
648
|
+
i[26]) || m(t, "src", s), t.hidden = o = !/*$captured*/
|
649
|
+
i[23] || !/*$showFaceWhileValidating*/
|
650
|
+
i[33] && /*$unconformitiesStore*/
|
651
|
+
i[29].isLoading, m(t, "alt", ""), m(e, "class", c = "grid-cols-1 grid-rows-2 sm:grid-cols-2 sm:grid-rows-1 gap-[.5em] " + (!/*$showFaceWhileValidating*/
|
652
|
+
i[33] && /*$unconformitiesStore*/
|
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
|
+
},
|
655
|
+
m(d, E) {
|
656
|
+
D(d, e, E), _(e, t), _(e, n), g[l].m(e, null), u = !0;
|
657
|
+
},
|
658
|
+
p(d, E) {
|
659
|
+
(!u || E[0] & /*$dataTypePrefix, $image*/
|
660
|
+
1140850688 && !ct(t.src, s = /*$dataTypePrefix*/
|
661
|
+
d[30] + "," + /*$image*/
|
662
|
+
d[26])) && m(t, "src", s), (!u || E[0] & /*$captured, $unconformitiesStore*/
|
663
|
+
545259520 | E[1] & /*$showFaceWhileValidating*/
|
664
|
+
4 && o !== (o = !/*$captured*/
|
665
|
+
d[23] || !/*$showFaceWhileValidating*/
|
666
|
+
d[33] && /*$unconformitiesStore*/
|
667
|
+
d[29].isLoading)) && (t.hidden = o);
|
668
|
+
let b = l;
|
669
|
+
l = v(d), l === b ? g[l].p(d, E) : (lt(), Z(g[b], 1, 1, () => {
|
670
|
+
g[b] = null;
|
671
|
+
}), rt(), r = g[l], r ? r.p(d, E) : (r = g[l] = f[l](d), r.c()), X(r, 1), r.m(e, null)), (!u || E[0] & /*$unconformitiesStore*/
|
672
|
+
536870912 | E[1] & /*$showFaceWhileValidating*/
|
673
|
+
4 && c !== (c = "grid-cols-1 grid-rows-2 sm:grid-cols-2 sm:grid-rows-1 gap-[.5em] " + (!/*$showFaceWhileValidating*/
|
674
|
+
d[33] && /*$unconformitiesStore*/
|
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
|
+
},
|
677
|
+
i(d) {
|
678
|
+
u || (X(r), u = !0);
|
679
|
+
},
|
680
|
+
o(d) {
|
681
|
+
Z(r), u = !1;
|
682
|
+
},
|
683
|
+
d(d) {
|
684
|
+
d && S(e), g[l].d();
|
685
|
+
}
|
686
|
+
};
|
687
|
+
}
|
688
|
+
function fs(i) {
|
689
|
+
let e, t, s = (
|
690
|
+
/*$_*/
|
691
|
+
i[28]("faceCollector.captured") + ""
|
692
|
+
), o, n, l, r, c, u = (
|
693
|
+
/*$_*/
|
694
|
+
i[28]("faceCollector.retakePhoto") + ""
|
695
|
+
), f, g, v = nt(Va).faceStrategy !== Ha.DISABLED, d, E, b, p = (
|
696
|
+
/*$unconformitiesStore*/
|
697
|
+
i[29].unconformities.length !== 0 && Ri(i)
|
698
|
+
), k = v && bs();
|
699
|
+
return {
|
700
|
+
c() {
|
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
|
+
i[34]);
|
703
|
+
},
|
704
|
+
m(O, N) {
|
705
|
+
D(O, e, N), _(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
|
+
c,
|
707
|
+
"click",
|
708
|
+
/*click_handler_6*/
|
709
|
+
i[59]
|
710
|
+
), E = !0);
|
711
|
+
},
|
712
|
+
p(O, N) {
|
713
|
+
(!d || N[0] & /*$_*/
|
714
|
+
268435456) && s !== (s = /*$_*/
|
715
|
+
O[28]("faceCollector.captured") + "") && V(o, s), /*$unconformitiesStore*/
|
716
|
+
O[29].unconformities.length !== 0 ? p ? p.p(O, N) : (p = Ri(O), p.c(), p.m(e, l)) : p && (p.d(1), p = null), (!d || N[0] & /*$_*/
|
717
|
+
268435456) && u !== (u = /*$_*/
|
718
|
+
O[28]("faceCollector.retakePhoto") + "") && V(f, u), (!d || N[1] & /*$exportButtonDisabled*/
|
719
|
+
8) && pi(r, "ce-dui-btn-group", !/*$exportButtonDisabled*/
|
720
|
+
O[34]);
|
721
|
+
},
|
722
|
+
i(O) {
|
723
|
+
d || (X(k), d = !0);
|
724
|
+
},
|
725
|
+
o(O) {
|
726
|
+
Z(k), d = !1;
|
727
|
+
},
|
728
|
+
d(O) {
|
729
|
+
O && S(e), p && p.d(), k && k.d(), E = !1, b();
|
730
|
+
}
|
731
|
+
};
|
732
|
+
}
|
733
|
+
function ds(i) {
|
734
|
+
let e, t, s = (
|
735
|
+
/*evaluatePhoto*/
|
736
|
+
(i[2] ? (
|
737
|
+
/*$_*/
|
738
|
+
i[28]("faceCollector.unconformities")
|
739
|
+
) : (
|
740
|
+
/*$_*/
|
741
|
+
i[28]("faceCollector.previewCapture")
|
742
|
+
)) + ""
|
743
|
+
), o, n, l, r, c, u, f = (
|
744
|
+
/*$unconformitiesStore*/
|
745
|
+
i[29].unconformities
|
746
|
+
), g = [];
|
747
|
+
for (let b = 0; b < f.length; b += 1)
|
748
|
+
g[b] = ki(wi(i, f, b));
|
749
|
+
let v = (
|
750
|
+
/*evaluatePhoto*/
|
751
|
+
i[2] && /*$unconformitiesStore*/
|
752
|
+
i[29].unconformities.length == 0 && Ai(i)
|
753
|
+
), d = (
|
754
|
+
/*showJustificationField*/
|
755
|
+
i[7] && /*$unconformitiesStore*/
|
756
|
+
i[29].unconformities.length > 0 && Ii(i)
|
757
|
+
), E = (
|
758
|
+
/*$captured*/
|
759
|
+
i[23] && Li(i)
|
760
|
+
);
|
761
|
+
return {
|
762
|
+
c() {
|
763
|
+
e = C("div"), t = C("h1"), o = M(s), n = U(), l = C("div");
|
764
|
+
for (let b = 0; b < g.length; b += 1)
|
765
|
+
g[b].c();
|
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
|
+
},
|
768
|
+
m(b, p) {
|
769
|
+
D(b, e, p), _(e, t), _(t, o), _(e, n), _(e, l);
|
770
|
+
for (let k = 0; k < g.length; k += 1)
|
771
|
+
g[k] && g[k].m(l, null);
|
772
|
+
_(l, r), v && v.m(l, null), _(e, c), d && d.m(e, null), _(e, u), E && E.m(e, null);
|
773
|
+
},
|
774
|
+
p(b, p) {
|
775
|
+
if (p[0] & /*evaluatePhoto, $_*/
|
776
|
+
268435460 && s !== (s = /*evaluatePhoto*/
|
777
|
+
(b[2] ? (
|
778
|
+
/*$_*/
|
779
|
+
b[28]("faceCollector.unconformities")
|
780
|
+
) : (
|
781
|
+
/*$_*/
|
782
|
+
b[28]("faceCollector.previewCapture")
|
783
|
+
)) + "") && V(o, s), p[0] & /*$unconformitiesStore*/
|
784
|
+
536870912) {
|
785
|
+
f = /*$unconformitiesStore*/
|
786
|
+
b[29].unconformities;
|
787
|
+
let k;
|
788
|
+
for (k = 0; k < f.length; k += 1) {
|
789
|
+
const O = wi(b, f, k);
|
790
|
+
g[k] ? g[k].p(O, p) : (g[k] = ki(O), g[k].c(), g[k].m(l, r));
|
791
|
+
}
|
792
|
+
for (; k < g.length; k += 1)
|
793
|
+
g[k].d(1);
|
794
|
+
g.length = f.length;
|
795
|
+
}
|
796
|
+
/*evaluatePhoto*/
|
797
|
+
b[2] && /*$unconformitiesStore*/
|
798
|
+
b[29].unconformities.length == 0 ? v ? v.p(b, p) : (v = Ai(b), v.c(), v.m(l, null)) : v && (v.d(1), v = null), /*showJustificationField*/
|
799
|
+
b[7] && /*$unconformitiesStore*/
|
800
|
+
b[29].unconformities.length > 0 ? d ? d.p(b, p) : (d = Ii(b), d.c(), d.m(e, u)) : d && (d.d(1), d = null), /*$captured*/
|
801
|
+
b[23] ? E ? E.p(b, p) : (E = Li(b), E.c(), E.m(e, null)) : E && (E.d(1), E = null);
|
802
|
+
},
|
803
|
+
i: x,
|
804
|
+
o: x,
|
805
|
+
d(b) {
|
806
|
+
b && S(e), ja(g, b), v && v.d(), d && d.d(), E && E.d();
|
807
|
+
}
|
808
|
+
};
|
809
|
+
}
|
810
|
+
function hs(i) {
|
811
|
+
let e, t, s, o, n = (
|
812
|
+
/*$_*/
|
813
|
+
i[28]("faceCollector.finish") + ""
|
814
|
+
), l, r, c, u = (
|
815
|
+
/*$_*/
|
816
|
+
i[28]("faceCollector.retakePhoto") + ""
|
817
|
+
), f, g, v;
|
818
|
+
function d(p, k) {
|
819
|
+
return (
|
820
|
+
/*$requestResult*/
|
821
|
+
p[27] === j.LIVENESS_DETECTION_FAILURE || /*$requestResult*/
|
822
|
+
p[27] === j.UNKNOWN_LIVENESS_ERROR ? Es : (
|
823
|
+
/*$requestResult*/
|
824
|
+
p[27] === j.LOW_LIVENESS_SCORE ? Cs : (
|
825
|
+
/*$requestResult*/
|
826
|
+
p[27] === j.TEMPLATE_EXTRACTION_ERROR || /*$requestResult*/
|
827
|
+
p[27] === j.UNKNOWN_TEMPLATE_EXTRACTION_ERROR ? ws : (
|
828
|
+
/*$requestResult*/
|
829
|
+
p[27] === j.UNABLE_TO_COMMUNICATE_WITH_TEMPLATE_EXTRACTION_SERVICE ? ps : (
|
830
|
+
/*$requestResult*/
|
831
|
+
p[27] === j.LIVENESS_EVALUATION_ERROR ? vs : gs
|
832
|
+
)
|
833
|
+
)
|
834
|
+
)
|
835
|
+
)
|
836
|
+
);
|
837
|
+
}
|
838
|
+
let E = d(i), b = E(i);
|
839
|
+
return {
|
840
|
+
c() {
|
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
|
+
},
|
843
|
+
m(p, k) {
|
844
|
+
D(p, e, k), b.m(e, null), _(e, t), _(e, s), _(s, o), _(o, l), _(s, r), _(s, c), _(c, f), g || (v = [
|
845
|
+
oe(
|
846
|
+
o,
|
847
|
+
"click",
|
848
|
+
/*click_handler_2*/
|
849
|
+
i[53]
|
850
|
+
),
|
851
|
+
oe(
|
852
|
+
c,
|
853
|
+
"click",
|
854
|
+
/*click_handler_3*/
|
855
|
+
i[54]
|
856
|
+
)
|
857
|
+
], g = !0);
|
858
|
+
},
|
859
|
+
p(p, k) {
|
860
|
+
E === (E = d(p)) && b ? b.p(p, k) : (b.d(1), b = E(p), b && (b.c(), b.m(e, t))), k[0] & /*$_*/
|
861
|
+
268435456 && n !== (n = /*$_*/
|
862
|
+
p[28]("faceCollector.finish") + "") && V(l, n), k[0] & /*$_*/
|
863
|
+
268435456 && u !== (u = /*$_*/
|
864
|
+
p[28]("faceCollector.retakePhoto") + "") && V(f, u);
|
865
|
+
},
|
866
|
+
i: x,
|
867
|
+
o: x,
|
868
|
+
d(p) {
|
869
|
+
p && S(e), b.d(), g = !1, ft(v);
|
870
|
+
}
|
871
|
+
};
|
872
|
+
}
|
873
|
+
function ms(i) {
|
874
|
+
let e, t, s = (
|
875
|
+
/*$_*/
|
876
|
+
i[28]("faceCollector.validating") + ""
|
877
|
+
), o, n, l;
|
878
|
+
return {
|
879
|
+
c() {
|
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
|
+
},
|
882
|
+
m(r, c) {
|
883
|
+
D(r, e, c), _(e, t), _(t, o), _(e, n), _(e, l);
|
884
|
+
},
|
885
|
+
p(r, c) {
|
886
|
+
c[0] & /*$_*/
|
887
|
+
268435456 && s !== (s = /*$_*/
|
888
|
+
r[28]("faceCollector.validating") + "") && V(o, s);
|
889
|
+
},
|
890
|
+
i: x,
|
891
|
+
o: x,
|
892
|
+
d(r) {
|
893
|
+
r && S(e);
|
894
|
+
}
|
895
|
+
};
|
896
|
+
}
|
897
|
+
function _s(i) {
|
898
|
+
let e;
|
899
|
+
return {
|
900
|
+
c() {
|
901
|
+
e = C("div"), m(e, "class", "");
|
902
|
+
},
|
903
|
+
m(t, s) {
|
904
|
+
D(t, e, s);
|
905
|
+
},
|
906
|
+
p: x,
|
907
|
+
i: x,
|
908
|
+
o: x,
|
909
|
+
d(t) {
|
910
|
+
t && S(e);
|
911
|
+
}
|
912
|
+
};
|
913
|
+
}
|
914
|
+
function Ri(i) {
|
915
|
+
let e, t, s = (
|
916
|
+
/*$_*/
|
917
|
+
i[28]("faceCollector.justification") + ""
|
918
|
+
), o, n, l, r, c;
|
919
|
+
return {
|
920
|
+
c() {
|
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
|
+
},
|
923
|
+
m(u, f) {
|
924
|
+
D(u, e, f), _(e, t), _(t, o), D(u, n, f), D(u, l, f), ut(
|
925
|
+
l,
|
926
|
+
/*$justification*/
|
927
|
+
i[25]
|
928
|
+
), r || (c = oe(
|
929
|
+
l,
|
930
|
+
"input",
|
931
|
+
/*textarea_input_handler_1*/
|
932
|
+
i[58]
|
933
|
+
), r = !0);
|
934
|
+
},
|
935
|
+
p(u, f) {
|
936
|
+
f[0] & /*$_*/
|
937
|
+
268435456 && s !== (s = /*$_*/
|
938
|
+
u[28]("faceCollector.justification") + "") && V(o, s), f[0] & /*$justification*/
|
939
|
+
33554432 && ut(
|
940
|
+
l,
|
941
|
+
/*$justification*/
|
942
|
+
u[25]
|
943
|
+
);
|
944
|
+
},
|
945
|
+
d(u) {
|
946
|
+
u && S(e), u && S(n), u && S(l), r = !1, c();
|
947
|
+
}
|
948
|
+
};
|
949
|
+
}
|
950
|
+
function bs(i) {
|
951
|
+
let e, t;
|
952
|
+
return e = new Ka({
|
953
|
+
props: { cssClass: "ce-dui-btn-block flex-shrink" }
|
954
|
+
}), {
|
955
|
+
c() {
|
956
|
+
be(e.$$.fragment);
|
957
|
+
},
|
958
|
+
m(s, o) {
|
959
|
+
ge(e, s, o), t = !0;
|
960
|
+
},
|
961
|
+
i(s) {
|
962
|
+
t || (X(e.$$.fragment, s), t = !0);
|
963
|
+
},
|
964
|
+
o(s) {
|
965
|
+
Z(e.$$.fragment, s), t = !1;
|
966
|
+
},
|
967
|
+
d(s) {
|
968
|
+
ve(e, s);
|
969
|
+
}
|
970
|
+
};
|
971
|
+
}
|
972
|
+
function ki(i) {
|
973
|
+
let e, t = (
|
974
|
+
/*unconformity*/
|
975
|
+
i[118] + ""
|
976
|
+
), s;
|
977
|
+
return {
|
978
|
+
c() {
|
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
|
+
},
|
981
|
+
m(o, n) {
|
982
|
+
D(o, e, n), _(e, s);
|
983
|
+
},
|
984
|
+
p(o, n) {
|
985
|
+
n[0] & /*$unconformitiesStore*/
|
986
|
+
536870912 && t !== (t = /*unconformity*/
|
987
|
+
o[118] + "") && V(s, t);
|
988
|
+
},
|
989
|
+
d(o) {
|
990
|
+
o && S(e);
|
991
|
+
}
|
992
|
+
};
|
993
|
+
}
|
994
|
+
function Ai(i) {
|
995
|
+
let e, t = (
|
996
|
+
/*$_*/
|
997
|
+
i[28]("faceCollector.noNonconformity") + ""
|
998
|
+
), s;
|
999
|
+
return {
|
1000
|
+
c() {
|
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
|
+
},
|
1003
|
+
m(o, n) {
|
1004
|
+
D(o, e, n), _(e, s);
|
1005
|
+
},
|
1006
|
+
p(o, n) {
|
1007
|
+
n[0] & /*$_*/
|
1008
|
+
268435456 && t !== (t = /*$_*/
|
1009
|
+
o[28]("faceCollector.noNonconformity") + "") && V(s, t);
|
1010
|
+
},
|
1011
|
+
d(o) {
|
1012
|
+
o && S(e);
|
1013
|
+
}
|
1014
|
+
};
|
1015
|
+
}
|
1016
|
+
function Ii(i) {
|
1017
|
+
let e, t, s, o = (
|
1018
|
+
/*$_*/
|
1019
|
+
i[28]("faceCollector.provideAReasonForTheLowQualityCapture") + ""
|
1020
|
+
), n, l, r, c, u, f, g, v, d = (
|
1021
|
+
/*$_*/
|
1022
|
+
i[28]("faceCollector.thisInformationIsRequired") + ""
|
1023
|
+
), E, b, p, k;
|
1024
|
+
return {
|
1025
|
+
c() {
|
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
|
+
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
|
+
},
|
1029
|
+
m(O, N) {
|
1030
|
+
D(O, e, N), _(e, t), _(t, s), _(s, n), _(e, l), _(e, r), ut(
|
1031
|
+
r,
|
1032
|
+
/*$justification*/
|
1033
|
+
i[25]
|
1034
|
+
), _(e, u), _(e, f), _(f, g), _(g, v), _(g, E), _(g, b), p || (k = oe(
|
1035
|
+
r,
|
1036
|
+
"input",
|
1037
|
+
/*textarea_input_handler*/
|
1038
|
+
i[55]
|
1039
|
+
), p = !0);
|
1040
|
+
},
|
1041
|
+
p(O, N) {
|
1042
|
+
N[0] & /*$_*/
|
1043
|
+
268435456 && o !== (o = /*$_*/
|
1044
|
+
O[28]("faceCollector.provideAReasonForTheLowQualityCapture") + "") && V(n, o), N[0] & /*$_*/
|
1045
|
+
268435456 && c !== (c = /*$_*/
|
1046
|
+
O[28]("faceCollector.yourJustification")) && m(r, "placeholder", c), N[0] & /*$justification*/
|
1047
|
+
33554432 && ut(
|
1048
|
+
r,
|
1049
|
+
/*$justification*/
|
1050
|
+
O[25]
|
1051
|
+
), N[0] & /*$_*/
|
1052
|
+
268435456 && d !== (d = /*$_*/
|
1053
|
+
O[28]("faceCollector.thisInformationIsRequired") + "") && V(E, d);
|
1054
|
+
},
|
1055
|
+
d(O) {
|
1056
|
+
O && S(e), p = !1, k();
|
1057
|
+
}
|
1058
|
+
};
|
1059
|
+
}
|
1060
|
+
function Li(i) {
|
1061
|
+
let e, t, s = (
|
1062
|
+
/*$_*/
|
1063
|
+
i[28]("faceCollector.finish") + ""
|
1064
|
+
), o, n, l, r, c = (
|
1065
|
+
/*$_*/
|
1066
|
+
i[28]("faceCollector.retakePhoto") + ""
|
1067
|
+
), u, f, g;
|
1068
|
+
return {
|
1069
|
+
c() {
|
1070
|
+
e = C("div"), t = C("button"), o = M(s), l = U(), r = C("button"), u = M(c), t.disabled = n = /*$justification*/
|
1071
|
+
i[25].length === 0 && /*showJustificationField*/
|
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
|
+
},
|
1074
|
+
m(v, d) {
|
1075
|
+
D(v, e, d), _(e, t), _(t, o), _(e, l), _(e, r), _(r, u), f || (g = [
|
1076
|
+
oe(
|
1077
|
+
t,
|
1078
|
+
"click",
|
1079
|
+
/*click_handler_4*/
|
1080
|
+
i[56]
|
1081
|
+
),
|
1082
|
+
oe(
|
1083
|
+
r,
|
1084
|
+
"click",
|
1085
|
+
/*click_handler_5*/
|
1086
|
+
i[57]
|
1087
|
+
)
|
1088
|
+
], f = !0);
|
1089
|
+
},
|
1090
|
+
p(v, d) {
|
1091
|
+
d[0] & /*$_*/
|
1092
|
+
268435456 && s !== (s = /*$_*/
|
1093
|
+
v[28]("faceCollector.finish") + "") && V(o, s), d[0] & /*$justification, showJustificationField*/
|
1094
|
+
33554560 && n !== (n = /*$justification*/
|
1095
|
+
v[25].length === 0 && /*showJustificationField*/
|
1096
|
+
v[7]) && (t.disabled = n), d[0] & /*$_*/
|
1097
|
+
268435456 && c !== (c = /*$_*/
|
1098
|
+
v[28]("faceCollector.retakePhoto") + "") && V(u, c);
|
1099
|
+
},
|
1100
|
+
d(v) {
|
1101
|
+
v && S(e), f = !1, ft(g);
|
1102
|
+
}
|
1103
|
+
};
|
1104
|
+
}
|
1105
|
+
function gs(i) {
|
1106
|
+
let e, t = (
|
1107
|
+
/*$_*/
|
1108
|
+
i[28]("faceCollector.everythingOk") + ""
|
1109
|
+
), s;
|
1110
|
+
return {
|
1111
|
+
c() {
|
1112
|
+
e = C("h1"), s = M(t), m(e, "class", "text-3xl font-bold pb-[1em] transition-opacity");
|
1113
|
+
},
|
1114
|
+
m(o, n) {
|
1115
|
+
D(o, e, n), _(e, s);
|
1116
|
+
},
|
1117
|
+
p(o, n) {
|
1118
|
+
n[0] & /*$_*/
|
1119
|
+
268435456 && t !== (t = /*$_*/
|
1120
|
+
o[28]("faceCollector.everythingOk") + "") && V(s, t);
|
1121
|
+
},
|
1122
|
+
d(o) {
|
1123
|
+
o && S(e);
|
1124
|
+
}
|
1125
|
+
};
|
1126
|
+
}
|
1127
|
+
function vs(i) {
|
1128
|
+
let e, t = (
|
1129
|
+
/*$_*/
|
1130
|
+
i[28]("liveness.error.evaluationError") + ""
|
1131
|
+
), s;
|
1132
|
+
return {
|
1133
|
+
c() {
|
1134
|
+
e = C("h1"), s = M(t), m(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1135
|
+
},
|
1136
|
+
m(o, n) {
|
1137
|
+
D(o, e, n), _(e, s);
|
1138
|
+
},
|
1139
|
+
p(o, n) {
|
1140
|
+
n[0] & /*$_*/
|
1141
|
+
268435456 && t !== (t = /*$_*/
|
1142
|
+
o[28]("liveness.error.evaluationError") + "") && V(s, t);
|
1143
|
+
},
|
1144
|
+
d(o) {
|
1145
|
+
o && S(e);
|
1146
|
+
}
|
1147
|
+
};
|
1148
|
+
}
|
1149
|
+
function ps(i) {
|
1150
|
+
let e, t = (
|
1151
|
+
/*$_*/
|
1152
|
+
i[28]("faceCollector.unableToCompleteRequest") + ""
|
1153
|
+
), s;
|
1154
|
+
return {
|
1155
|
+
c() {
|
1156
|
+
e = C("h1"), s = M(t), m(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1157
|
+
},
|
1158
|
+
m(o, n) {
|
1159
|
+
D(o, e, n), _(e, s);
|
1160
|
+
},
|
1161
|
+
p(o, n) {
|
1162
|
+
n[0] & /*$_*/
|
1163
|
+
268435456 && t !== (t = /*$_*/
|
1164
|
+
o[28]("faceCollector.unableToCompleteRequest") + "") && V(s, t);
|
1165
|
+
},
|
1166
|
+
d(o) {
|
1167
|
+
o && S(e);
|
1168
|
+
}
|
1169
|
+
};
|
1170
|
+
}
|
1171
|
+
function ws(i) {
|
1172
|
+
let e, t = (
|
1173
|
+
/*$_*/
|
1174
|
+
i[28]("faceCollector.lowQualityCapture") + ""
|
1175
|
+
), s;
|
1176
|
+
return {
|
1177
|
+
c() {
|
1178
|
+
e = C("h1"), s = M(t), m(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1179
|
+
},
|
1180
|
+
m(o, n) {
|
1181
|
+
D(o, e, n), _(e, s);
|
1182
|
+
},
|
1183
|
+
p(o, n) {
|
1184
|
+
n[0] & /*$_*/
|
1185
|
+
268435456 && t !== (t = /*$_*/
|
1186
|
+
o[28]("faceCollector.lowQualityCapture") + "") && V(s, t);
|
1187
|
+
},
|
1188
|
+
d(o) {
|
1189
|
+
o && S(e);
|
1190
|
+
}
|
1191
|
+
};
|
1192
|
+
}
|
1193
|
+
function Cs(i) {
|
1194
|
+
let e, t = (
|
1195
|
+
/*$_*/
|
1196
|
+
i[28]("liveness.error.error") + ""
|
1197
|
+
), s, o, n = (
|
1198
|
+
/*$_*/
|
1199
|
+
i[28]("faceCollector.unaliveCapture") + ""
|
1200
|
+
), l;
|
1201
|
+
return {
|
1202
|
+
c() {
|
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
|
+
},
|
1205
|
+
m(r, c) {
|
1206
|
+
D(r, e, c), _(e, s), _(e, o), _(e, l);
|
1207
|
+
},
|
1208
|
+
p(r, c) {
|
1209
|
+
c[0] & /*$_*/
|
1210
|
+
268435456 && t !== (t = /*$_*/
|
1211
|
+
r[28]("liveness.error.error") + "") && V(s, t), c[0] & /*$_*/
|
1212
|
+
268435456 && n !== (n = /*$_*/
|
1213
|
+
r[28]("faceCollector.unaliveCapture") + "") && V(l, n);
|
1214
|
+
},
|
1215
|
+
d(r) {
|
1216
|
+
r && S(e);
|
1217
|
+
}
|
1218
|
+
};
|
1219
|
+
}
|
1220
|
+
function Es(i) {
|
1221
|
+
let e, t = (
|
1222
|
+
/*$_*/
|
1223
|
+
i[28]("liveness.error.error") + ""
|
1224
|
+
), s, o, n = (
|
1225
|
+
/*$_*/
|
1226
|
+
i[28](
|
1227
|
+
/*livenessError*/
|
1228
|
+
i[19]
|
1229
|
+
) + ""
|
1230
|
+
), l, r;
|
1231
|
+
return {
|
1232
|
+
c() {
|
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
|
+
},
|
1235
|
+
m(c, u) {
|
1236
|
+
D(c, e, u), _(e, s), _(e, o), _(e, l), _(e, r);
|
1237
|
+
},
|
1238
|
+
p(c, u) {
|
1239
|
+
u[0] & /*$_*/
|
1240
|
+
268435456 && t !== (t = /*$_*/
|
1241
|
+
c[28]("liveness.error.error") + "") && V(s, t), u[0] & /*$_, livenessError*/
|
1242
|
+
268959744 && n !== (n = /*$_*/
|
1243
|
+
c[28](
|
1244
|
+
/*livenessError*/
|
1245
|
+
c[19]
|
1246
|
+
) + "") && V(l, n);
|
1247
|
+
},
|
1248
|
+
d(c) {
|
1249
|
+
c && S(e);
|
1250
|
+
}
|
1251
|
+
};
|
1252
|
+
}
|
1253
|
+
function ys(i) {
|
1254
|
+
let e, t, s, o = K() && /*waitingIdrndCaptureEvent*/
|
1255
|
+
i[18], n, l = (K() && /*idrndLoading*/
|
1256
|
+
(i[16] || !/*$ready*/
|
1257
|
+
i[21]) || !K() && !/*$ready*/
|
1258
|
+
i[21]) && /*$cameraStatusStore*/
|
1259
|
+
i[20] === H.OK, r, c, u, f, g, v, d = (
|
1260
|
+
/*$videoStore*/
|
1261
|
+
i[31] && Ci(i)
|
1262
|
+
), E = o && yi(i), b = l && Ti(i), p = (
|
1263
|
+
/*$captured*/
|
1264
|
+
i[23] && Oi(i)
|
1265
|
+
);
|
1266
|
+
const k = [us, cs], O = [];
|
1267
|
+
function N(A, B) {
|
1268
|
+
return (!/*idrndClosed*/
|
1269
|
+
A[17] || /*$captured*/
|
1270
|
+
A[23]) && /*showUnconformities*/
|
1271
|
+
A[3] ? 0 : (
|
1272
|
+
/*$cameraStatusStore*/
|
1273
|
+
A[20] !== H.OK ? 1 : -1
|
1274
|
+
);
|
1275
|
+
}
|
1276
|
+
return ~(u = N(i)) && (f = O[u] = k[u](i)), {
|
1277
|
+
c() {
|
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
|
+
},
|
1280
|
+
m(A, B) {
|
1281
|
+
D(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), D(A, c, B), ~u && O[u].m(A, B), D(A, g, B), v = !0;
|
1282
|
+
},
|
1283
|
+
p(A, B) {
|
1284
|
+
/*$videoStore*/
|
1285
|
+
A[31] ? d ? (d.p(A, B), B[1] & /*$videoStore*/
|
1286
|
+
1 && X(d, 1)) : (d = Ci(A), d.c(), X(d, 1), d.m(t, s)) : d && (lt(), Z(d, 1, 1, () => {
|
1287
|
+
d = null;
|
1288
|
+
}), rt()), B[0] & /*waitingIdrndCaptureEvent*/
|
1289
|
+
262144 && (o = K() && /*waitingIdrndCaptureEvent*/
|
1290
|
+
A[18]), o ? E ? E.p(A, B) : (E = yi(A), E.c(), E.m(t, n)) : E && (E.d(1), E = null), B[0] & /*idrndLoading, $ready, $cameraStatusStore*/
|
1291
|
+
3211264 && (l = (K() && /*idrndLoading*/
|
1292
|
+
(A[16] || !/*$ready*/
|
1293
|
+
A[21]) || !K() && !/*$ready*/
|
1294
|
+
A[21]) && /*$cameraStatusStore*/
|
1295
|
+
A[20] === H.OK), l ? b ? b.p(A, B) : (b = Ti(A), b.c(), b.m(t, r)) : b && (b.d(1), b = null), /*$captured*/
|
1296
|
+
A[23] ? p ? p.p(A, B) : (p = Oi(A), p.c(), p.m(t, null)) : p && (p.d(1), p = null);
|
1297
|
+
let W = u;
|
1298
|
+
u = N(A), u === W ? ~u && O[u].p(A, B) : (f && (lt(), Z(O[W], 1, 1, () => {
|
1299
|
+
O[W] = null;
|
1300
|
+
}), rt()), ~u ? (f = O[u], f ? f.p(A, B) : (f = O[u] = k[u](A), f.c()), X(f, 1), f.m(g.parentNode, g)) : f = null);
|
1301
|
+
},
|
1302
|
+
i(A) {
|
1303
|
+
v || (X(d), X(f), v = !0);
|
1304
|
+
},
|
1305
|
+
o(A) {
|
1306
|
+
Z(d), Z(f), v = !1;
|
1307
|
+
},
|
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 && O[u].d(A), A && S(g);
|
1310
|
+
}
|
1311
|
+
};
|
1312
|
+
}
|
1313
|
+
let Ts = 5, Os = 3e3;
|
1314
|
+
function Rs() {
|
1315
|
+
({}).VITE_USE_DEV === "true" ? import("./index-no-detector_281a271b_3.0.0-RC01.js") : import("./index-no-detector_56051121_3.0.0-RC01.js");
|
1316
|
+
}
|
1317
|
+
function ks(i, e, t) {
|
1318
|
+
const s = e.videoWidth / e.videoHeight, o = t.width / t.height;
|
1319
|
+
let n = 0, l = 0, r = e.videoWidth, c = e.videoHeight;
|
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
|
+
}
|
1322
|
+
function As(i, e, t) {
|
1323
|
+
let s, o, n, l, r, c, u, f, g, v, d, E, b, p, k, O, N, A, B, W, R, y, Q, $, ce, le, ke, dt, ae, Kt, ht, mt, _t, qt, zt, Jt;
|
1324
|
+
L(i, Lt, (a) => t(73, s = a)), L(i, Qe, (a) => t(75, n = a)), L(i, G, (a) => t(20, l = a)), L(i, Ge, (a) => t(21, r = a)), L(i, da, (a) => t(76, c = a)), L(i, Ye, (a) => t(77, u = a)), L(i, he, (a) => t(22, f = a)), L(i, ha, (a) => t(78, g = a)), L(i, Se, (a) => t(23, v = a)), L(i, ui, (a) => t(79, d = a)), L(i, Dt, (a) => t(80, E = a)), L(i, fi, (a) => t(81, b = a)), L(i, ma, (a) => t(82, p = a)), L(i, _a, (a) => t(83, k = a)), L(i, Pe, (a) => t(84, O = a)), L(i, we, (a) => t(85, N = a)), L(i, ba, (a) => t(86, A = a)), L(i, Ft, (a) => t(24, B = a)), L(i, Nt, (a) => t(25, W = a)), L(i, me, (a) => t(26, R = a)), L(i, ee, (a) => t(27, y = a)), L(i, ga, (a) => t(28, Q = a)), L(i, Ce, (a) => t(29, $ = a)), L(i, di, (a) => t(87, le = a)), L(i, Ze, (a) => t(88, ke = a)), L(i, St, (a) => t(89, dt = a)), L(i, Me, (a) => t(31, ae = a)), L(i, va, (a) => t(90, Kt = a)), L(i, xe, (a) => t(91, ht = a)), L(i, hi, (a) => t(92, mt = a)), L(i, mi, (a) => t(93, _t = a)), L(i, pa, (a) => t(32, qt = a)), L(i, wa, (a) => t(33, zt = a)), L(i, Ca, (a) => t(34, Jt = a));
|
1325
|
+
let F, 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
|
+
const Ue = vi(!1);
|
1327
|
+
L(i, Ue, (a) => t(74, o = a));
|
1328
|
+
const Le = vi("data:image/png;base64");
|
1329
|
+
L(i, Le, (a) => t(30, ce = a));
|
1330
|
+
let { widgetInstance: Y } = e, De = !1, Rt = !1, Ve = !0, ne = !0, ye = !1, ti = 0, ie = "", kt = 0, He = !0, ii = 0;
|
1331
|
+
const je = Ea.mixin({
|
1332
|
+
toast: !0,
|
1333
|
+
position: "bottom-left",
|
1334
|
+
timer: 13e3,
|
1335
|
+
timerProgressBar: !0
|
1336
|
+
});
|
1337
|
+
ya(async () => {
|
1338
|
+
if (h(Ze, ke = !0, ke), h(Ge, r = !1, r), si(), le)
|
1339
|
+
try {
|
1340
|
+
await Ta(yt), Qt = !0, Xt = await Oa();
|
1341
|
+
} catch {
|
1342
|
+
h(di, le = !1, le), t(0, Tt = !0);
|
1343
|
+
}
|
1344
|
+
K() ? (Rs(), Si()) : await pe(), _e() || Bi();
|
1345
|
+
});
|
1346
|
+
async function ai() {
|
1347
|
+
const [a, w] = (Ct ?? "")?.replaceAll(" ", "")?.split("x")?.map((T) => T ? parseInt(T) : void 0);
|
1348
|
+
if (!(!a || !w))
|
1349
|
+
if (_e()) {
|
1350
|
+
await Wa();
|
1351
|
+
const T = window.innerWidth, P = window.innerHeight, I = w, z = P / T * I;
|
1352
|
+
h(
|
1353
|
+
Me,
|
1354
|
+
ae = {
|
1355
|
+
videoWidth: I,
|
1356
|
+
videoHeight: z
|
1357
|
+
},
|
1358
|
+
ae
|
1359
|
+
);
|
1360
|
+
} else
|
1361
|
+
h(Me, ae = { videoWidth: a, videoHeight: w }, ae);
|
1362
|
+
}
|
1363
|
+
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 = j.OK, y), h(Pe, O = "", O), h(Ce, $.unconformities = [], $);
|
1365
|
+
const a = nt(Bt);
|
1366
|
+
a.closedMouth = !1, a.isPersonCloseEnough = !1, a.isPersonTooclose = !0, a.isPersonInFrame = !1, Bt.set(a), h(we, N = "", N);
|
1367
|
+
}
|
1368
|
+
function Si() {
|
1369
|
+
Y.addEventListener("open", (a) => {
|
1370
|
+
const w = a.detail[0].video;
|
1371
|
+
h(
|
1372
|
+
mi,
|
1373
|
+
_t = {
|
1374
|
+
width: w.videoWidth,
|
1375
|
+
height: w.videoHeight
|
1376
|
+
},
|
1377
|
+
_t
|
1378
|
+
), t(11, F.srcObject = w.srcObject, F), t(16, Ve = !1), Ra(Y);
|
1379
|
+
function T() {
|
1380
|
+
ne || Be(F, T, !0);
|
1381
|
+
}
|
1382
|
+
T();
|
1383
|
+
}), Y.addEventListener("error", (a) => {
|
1384
|
+
console.error(a), a.detail[0].message === "Device in use" ? h(G, l = H.CAMERA_IN_USE_ERROR, l) : a.detail[0].message === "Permission denied" || a.detail[0].message === "Permission dismissed" ? h(G, l = H.CAMERA_DENIED_ERROR, l) : a.detail[0].message === "Requested device not found" && h(G, l = H.DEVICE_NOT_FOUND_ERROR, l), t(16, Ve = !1);
|
1385
|
+
}), Y.addEventListener("faceDetection", (a) => {
|
1386
|
+
}), Y.addEventListener("close", async (a) => {
|
1387
|
+
v || (De = !1), t(17, ne = !0), t(18, ye = !1), l === H.OK && h(G, l = H.CAMERA_CLOSED_ERROR, l);
|
1388
|
+
}), Y.addEventListener("initialize", async (a) => {
|
1389
|
+
Rt = !0, h(hi, mt = !0, mt), dt === $e.Face && !De && !v && Rt && await At();
|
1390
|
+
}), Y.addEventListener("capture", async (a) => {
|
1391
|
+
t(19, ie = "");
|
1392
|
+
const { encryptedFile: w, photo: T } = a.detail[0];
|
1393
|
+
h(xe, ht = w, ht);
|
1394
|
+
const P = (await et(T)).split(",");
|
1395
|
+
if (le)
|
1396
|
+
try {
|
1397
|
+
let J = await ka(T);
|
1398
|
+
if (!await _i(J)) {
|
1399
|
+
console.warn("Liveness capture - face not detected! Resetting capture.");
|
1400
|
+
return;
|
1401
|
+
}
|
1402
|
+
} catch (J) {
|
1403
|
+
console.warn(J);
|
1404
|
+
} finally {
|
1405
|
+
t(18, ye = !1);
|
1406
|
+
}
|
1407
|
+
if (t(18, ye = !1), h(ee, y = j.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, O = P[1], O), !Kt) {
|
1408
|
+
let J, re, It, Je;
|
1409
|
+
try {
|
1410
|
+
if (!bi(Ie))
|
1411
|
+
throw new Error("FACE_TOO_SMALL");
|
1412
|
+
({ bodyParts: J, icaoWarnings: re } = await tt(O, fe, (await et(w)).split(",")[1])), window.dispatchEvent(new CustomEvent(
|
1413
|
+
"face-unconformities-validated",
|
1414
|
+
{
|
1415
|
+
detail: {
|
1416
|
+
bodyParts: J,
|
1417
|
+
icaoWarnings: re,
|
1418
|
+
status: y
|
1419
|
+
}
|
1420
|
+
}
|
1421
|
+
));
|
1422
|
+
} catch (se) {
|
1423
|
+
console.error(se);
|
1424
|
+
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 = j.LIVENESS_DETECTION_FAILURE, y), t(19, ie = Ee[Oe]), console.error("Liveness error:", Oe)) : h(ee, y = j.TEMPLATE_EXTRACTION_ERROR, y) : se instanceof Error && ["FACE_NOT_FOUND", "FACE_TOO_SMALL"].includes(se.message) ? (h(ee, y = j.LIVENESS_DETECTION_FAILURE, y), Oe = se.message, t(19, ie = Ee[Oe]), Xe = li()) : fe && je.fire({
|
1426
|
+
icon: "error",
|
1427
|
+
title: "Falha ao comunicar com serviço de Liveness"
|
1428
|
+
}), h(Ce, $.isLoading = !1, $), window.dispatchEvent(new CustomEvent(
|
1429
|
+
"face-unconformities-validated",
|
1430
|
+
{
|
1431
|
+
detail: {
|
1432
|
+
bodyParts: Xe,
|
1433
|
+
errorCode: Oe,
|
1434
|
+
translatedError: Q(ie),
|
1435
|
+
status: y,
|
1436
|
+
icaoWarnings: ci,
|
1437
|
+
invalidLivenessCounter: It,
|
1438
|
+
invalidLivenessLimit: Je
|
1439
|
+
}
|
1440
|
+
}
|
1441
|
+
));
|
1442
|
+
return;
|
1443
|
+
}
|
1444
|
+
if (y !== j.OK) {
|
1445
|
+
h(Ce, $.isLoading = !1, $);
|
1446
|
+
return;
|
1447
|
+
}
|
1448
|
+
J[0].livenessResult && ni(J[0].livenessResult), J.length !== 0 && J[0].data && h(me, R = J[0].data, R), it(re);
|
1449
|
+
return;
|
1450
|
+
}
|
1451
|
+
let I, z;
|
1452
|
+
try {
|
1453
|
+
z = await Aa(w), ni(z.data);
|
1454
|
+
} catch (J) {
|
1455
|
+
h(ee, y = j.UNKNOWN_LIVENESS_ERROR, y), console.error(J), J instanceof Wt && J.response?.status === 400 ? (I = J.response.data.error_code, t(19, ie = Ee[I]), console.error("Liveness error:", I), h(ee, y = j.LIVENESS_DETECTION_FAILURE, y)) : je.fire({
|
1456
|
+
icon: "error",
|
1457
|
+
title: "Falha ao comunicar com serviço de Liveness"
|
1458
|
+
});
|
1459
|
+
}
|
1460
|
+
if (y !== j.OK) {
|
1461
|
+
h(Ce, $.isLoading = !1, $), window.dispatchEvent(new CustomEvent(
|
1462
|
+
"face-unconformities-validated",
|
1463
|
+
{
|
1464
|
+
detail: {
|
1465
|
+
bodyParts: [
|
1466
|
+
{
|
1467
|
+
bodyPart: "FACE",
|
1468
|
+
data: O,
|
1469
|
+
livenessBlob: (await et(w)).split(",")[1],
|
1470
|
+
...z && { livenessResult: z }
|
1471
|
+
}
|
1472
|
+
],
|
1473
|
+
...I && { errorCode: I },
|
1474
|
+
...ie && { translatedError: Q(ie) },
|
1475
|
+
status: y
|
1476
|
+
}
|
1477
|
+
}
|
1478
|
+
));
|
1479
|
+
return;
|
1480
|
+
}
|
1481
|
+
let { bodyParts: de, icaoWarnings: Fe } = await tt(O, fe);
|
1482
|
+
window.dispatchEvent(new CustomEvent(
|
1483
|
+
"face-unconformities-validated",
|
1484
|
+
{
|
1485
|
+
detail: {
|
1486
|
+
bodyParts: de,
|
1487
|
+
icaoWarnings: Fe,
|
1488
|
+
status: y,
|
1489
|
+
errorCode: I,
|
1490
|
+
...ie && { translatedError: Q(ie) }
|
1491
|
+
}
|
1492
|
+
}
|
1493
|
+
)), de[0].data && h(me, R = de[0].data, R), it(Fe);
|
1494
|
+
});
|
1495
|
+
}
|
1496
|
+
async function pe(a) {
|
1497
|
+
if (!He) {
|
1498
|
+
h(G, l = H.CAMERA_ORIENTATION_PORTRAIT, l);
|
1499
|
+
return;
|
1500
|
+
}
|
1501
|
+
await ai(), K() ? At() : await Pi(ae.videoWidth, ae.videoHeight, a);
|
1502
|
+
}
|
1503
|
+
async function At() {
|
1504
|
+
if (K()) {
|
1505
|
+
if (await ai(), !g[0]?.deviceId) {
|
1506
|
+
try {
|
1507
|
+
await gi(640, 480);
|
1508
|
+
} catch (a) {
|
1509
|
+
const w = a, T = Re(a) && a.constraint ? a.constraint : "";
|
1510
|
+
console.error(w.message, T), Re(w) && "message" in w && w.message.includes("Requested device not found") && h(G, l = H.DEVICE_NOT_FOUND_ERROR, l);
|
1511
|
+
}
|
1512
|
+
await Mt(), h(he, f = g[0].deviceId, f);
|
1513
|
+
}
|
1514
|
+
h(G, l = H.OK, l), Y && "openCamera" in Y && Y.openCamera(), De = !0, t(17, ne = !1), t(16, Ve = !0);
|
1515
|
+
}
|
1516
|
+
}
|
1517
|
+
async function Ke() {
|
1518
|
+
if (le && !Qt)
|
1519
|
+
return Be(F, Ke);
|
1520
|
+
if (F) {
|
1521
|
+
if (dt !== $e.Face && !Et)
|
1522
|
+
return Be(F, Ke);
|
1523
|
+
h(Ge, r = !0, r), h(Ze, ke = !1, ke), le && (o || h(Ue, o = !0, o)), Be(F, Ke);
|
1524
|
+
}
|
1525
|
+
}
|
1526
|
+
async function oi() {
|
1527
|
+
if (h(ee, y = j.OK, y), K()) {
|
1528
|
+
t(18, ye = !0), Y.takePhoto();
|
1529
|
+
return;
|
1530
|
+
}
|
1531
|
+
let a = null;
|
1532
|
+
if (le && (a = await Mi(), !await _i(a))) {
|
1533
|
+
console.warn("Face capture - face not detected! Resetting capture.");
|
1534
|
+
return;
|
1535
|
+
}
|
1536
|
+
h(Se, v = !0, v);
|
1537
|
+
try {
|
1538
|
+
if (le && a) {
|
1539
|
+
const w = a.toDataURL("image/jpeg").split(",");
|
1540
|
+
h(Le, ce = w[0], ce), h(me, R = w[1], R), h(Pe, O = w[1], O);
|
1541
|
+
let T, P;
|
1542
|
+
if (!bi(Ie))
|
1543
|
+
throw new Error("FACE_TOO_SMALL");
|
1544
|
+
({ bodyParts: T, icaoWarnings: P } = await tt(R, fe)), window.dispatchEvent(new CustomEvent(
|
1545
|
+
"face-unconformities-validated",
|
1546
|
+
{
|
1547
|
+
detail: {
|
1548
|
+
bodyParts: T,
|
1549
|
+
icaoWarnings: P,
|
1550
|
+
status: y
|
1551
|
+
}
|
1552
|
+
}
|
1553
|
+
)), T.length !== 0 && T[0].data && h(me, R = T[0].data, R), it(P);
|
1554
|
+
} else {
|
1555
|
+
const w = document.createElement("canvas"), T = w.getContext("2d");
|
1556
|
+
w.width = F.width, w.height = F.height, T?.drawImage(F, 0, 0, w.width, w.height);
|
1557
|
+
const P = w.toDataURL("image/jpeg").split(",");
|
1558
|
+
h(Le, ce = P[0], ce), h(me, R = P[1], R), h(Pe, O = P[1], O);
|
1559
|
+
let { bodyParts: I, icaoWarnings: z } = await tt(R, fe);
|
1560
|
+
window.dispatchEvent(new CustomEvent(
|
1561
|
+
"face-unconformities-validated",
|
1562
|
+
{
|
1563
|
+
detail: {
|
1564
|
+
bodyParts: I,
|
1565
|
+
icaoWarnings: z,
|
1566
|
+
status: y
|
1567
|
+
}
|
1568
|
+
}
|
1569
|
+
)), I.length !== 0 && I[0].data && h(me, R = I[0].data, R), it(z);
|
1570
|
+
}
|
1571
|
+
} catch (w) {
|
1572
|
+
console.error(w);
|
1573
|
+
let T = Ee.UNKNOWN, P = [], I = [];
|
1574
|
+
if (w instanceof Wt && w.response?.status === 400)
|
1575
|
+
if (w.response.data && Array.isArray(w.response.data.bodyParts)) {
|
1576
|
+
P = w.response.data.bodyParts, I = w.response.data.icaoWarnings;
|
1577
|
+
const z = P.find((de) => de.livenessResult.error);
|
1578
|
+
T = z?.livenessResult.error_code, h(ee, y = j.LIVENESS_DETECTION_FAILURE, y), z?.livenessResult.error_code || h(ee, y = j.UNKNOWN_LIVENESS_ERROR, y), t(19, ie = Ee[T]), console.error("Liveness error:", T);
|
1579
|
+
} else
|
1580
|
+
h(ee, y = j.TEMPLATE_EXTRACTION_ERROR, y);
|
1581
|
+
else
|
1582
|
+
w instanceof Error && ["FACE_NOT_FOUND", "FACE_TOO_SMALL"].includes(w.message) ? (h(ee, y = j.LIVENESS_DETECTION_FAILURE, y), T = w.message, t(19, ie = Ee[T]), P = li()) : (h(ee, y = j.UNABLE_TO_COMMUNICATE_WITH_TEMPLATE_EXTRACTION_SERVICE, y), fe && je.fire({
|
1583
|
+
icon: "error",
|
1584
|
+
title: "Falha ao comunicar com serviço de Liveness"
|
1585
|
+
}));
|
1586
|
+
h(Ce, $.isLoading = !1, $), window.dispatchEvent(new CustomEvent(
|
1587
|
+
"face-unconformities-validated",
|
1588
|
+
{
|
1589
|
+
detail: {
|
1590
|
+
bodyParts: P,
|
1591
|
+
errorCode: T,
|
1592
|
+
translatedError: Q(ie),
|
1593
|
+
status: y,
|
1594
|
+
icaoWarnings: I
|
1595
|
+
}
|
1596
|
+
}
|
1597
|
+
));
|
1598
|
+
}
|
1599
|
+
}
|
1600
|
+
function qe() {
|
1601
|
+
const a = {
|
1602
|
+
bodyPart: "FACE",
|
1603
|
+
data: R,
|
1604
|
+
justification: W
|
1605
|
+
};
|
1606
|
+
h(Ft, B = !0, B), nt(xe) && et(nt(xe)).then((w) => {
|
1607
|
+
a.livenessBlob = w.split(",")[1];
|
1608
|
+
}), window.dispatchEvent(new CustomEvent("export-face", { detail: a }));
|
1609
|
+
}
|
1610
|
+
function Te() {
|
1611
|
+
window.dispatchEvent(new CustomEvent("face-scrapped")), si(), ne && At();
|
1612
|
+
}
|
1613
|
+
function ni(a) {
|
1614
|
+
let w = "", T = "success";
|
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 && (T = "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 && je.fire({ icon: T, title: w });
|
1616
|
+
}
|
1617
|
+
async function Pi(a, w, T) {
|
1618
|
+
try {
|
1619
|
+
const { stream: P, deviceId: I } = await gi(pt.width, pt.height, u, T);
|
1620
|
+
h(ui, d = P, d), h(he, f = I || g[0].deviceId, f);
|
1621
|
+
} catch (P) {
|
1622
|
+
const I = P, z = Re(P) && P.constraint ? P.constraint : "";
|
1623
|
+
console.error(I.message, z), Re(I) && "message" in I && I.message.includes("Permission denied") && (console.error("User didn't give permission to use camera!"), h(G, l = H.CAMERA_DENIED_ERROR, l)), Re(I) && "message" in I && I.message.includes("Requested device not found") && h(G, l = H.DEVICE_NOT_FOUND_ERROR, l), (z.includes("width") || z.includes("height")) && (console.error(`Camera does not meet the minimum supported requirements! (${z})`), h(G, l = H.CAMERA_UNSUPPORTED, l));
|
1624
|
+
}
|
1625
|
+
}
|
1626
|
+
async function ze() {
|
1627
|
+
h(he, f = "", f), await pe();
|
1628
|
+
}
|
1629
|
+
function Bi() {
|
1630
|
+
navigator.mediaDevices.ondevicechange = async (a) => {
|
1631
|
+
a.type == "devicechange" && (await Mt(), l !== H.OK ? await ze() : (!K() && !d.active || K() && !ne) && (at(Y), h(G, l = H.DEVICE_NOT_FOUND_ERROR, l), t(17, ne = !0)));
|
1632
|
+
};
|
1633
|
+
}
|
1634
|
+
async function Wi() {
|
1635
|
+
h(Qe, n = !1, n);
|
1636
|
+
const a = (/* @__PURE__ */ new Date()).getTime();
|
1637
|
+
if (a - vt > 5e3) {
|
1638
|
+
vt = a;
|
1639
|
+
try {
|
1640
|
+
const T = await Ma(F);
|
1641
|
+
if (T < 50) {
|
1642
|
+
h(we, N = "faceCollector.illuminationTooLow", N);
|
1643
|
+
return;
|
1644
|
+
}
|
1645
|
+
if (T > 180) {
|
1646
|
+
h(we, N = "faceCollector.illuminationTooHigh", N);
|
1647
|
+
return;
|
1648
|
+
}
|
1649
|
+
} catch (T) {
|
1650
|
+
console.warn("An error occurred while getting the video lighting level: ", T);
|
1651
|
+
}
|
1652
|
+
try {
|
1653
|
+
if (await Ua(F) < 4.5) {
|
1654
|
+
h(we, N = "faceCollector.lowSharpness", N);
|
1655
|
+
return;
|
1656
|
+
}
|
1657
|
+
} catch (T) {
|
1658
|
+
console.warn("An error occurred while getting the video sharpness level: ", T);
|
1659
|
+
}
|
1660
|
+
h(we, N = "faceCollector.faceWasNotFound", N);
|
1661
|
+
} else
|
1662
|
+
bt || (bt = !0, setTimeout(
|
1663
|
+
() => {
|
1664
|
+
let T = [
|
1665
|
+
"faceCollector.faceWasNotFound",
|
1666
|
+
"faceCollector.illuminationTooLow",
|
1667
|
+
"faceCollector.lowSharpness",
|
1668
|
+
"faceCollector.illuminationTooHigh"
|
1669
|
+
];
|
1670
|
+
bt = !1, t(15, gt = !1), N && !T.includes(N) && h(we, N = "", N);
|
1671
|
+
},
|
1672
|
+
1500
|
1673
|
+
));
|
1674
|
+
}
|
1675
|
+
function li() {
|
1676
|
+
return [
|
1677
|
+
{
|
1678
|
+
bodyPart: "FACE",
|
1679
|
+
data: O,
|
1680
|
+
format: "jpg",
|
1681
|
+
capturedEyeToEyeDist: k,
|
1682
|
+
minEyeToEyeDist: Ie
|
1683
|
+
}
|
1684
|
+
];
|
1685
|
+
}
|
1686
|
+
async function Mi() {
|
1687
|
+
const a = F.width, w = F.height, T = pt.height, P = w / a * T, I = document.createElement("canvas"), z = I.getContext("2d");
|
1688
|
+
I.width = T, I.height = P;
|
1689
|
+
const de = I.width / F.width, Fe = I.height / F.height, J = new Za({
|
1690
|
+
x: p.x * de,
|
1691
|
+
y: p.y * Fe,
|
1692
|
+
width: p.width * de,
|
1693
|
+
height: p.height * Fe
|
1694
|
+
}), re = document.createElement("canvas");
|
1695
|
+
re.width = J.width, re.height = J.height, re.getContext("2d")?.clearRect(0, 0, re.width, re.height), z && ks(z, F, I);
|
1696
|
+
const [Je] = await (await import("./face_api_0e3ce8c8_3.0.0-RC01.js")).extractFaces(I, [J]);
|
1697
|
+
return Je;
|
1698
|
+
}
|
1699
|
+
const Ui = Bt.subscribe((a) => {
|
1700
|
+
let w = "";
|
1701
|
+
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
|
+
t(14, Ae = !0), ii = (/* @__PURE__ */ new Date()).getTime() + Os;
|
1703
|
+
const T = setInterval(
|
1704
|
+
async () => {
|
1705
|
+
if (!b || v || ye || K() && ne || !a.isPersonCloseEnough || a.isPersonTooclose || !a.closedMouth || !a.isPersonInFrame) {
|
1706
|
+
t(14, Ae = !1), setTimeout(
|
1707
|
+
() => {
|
1708
|
+
},
|
1709
|
+
1500
|
1710
|
+
), clearInterval(T);
|
1711
|
+
return;
|
1712
|
+
}
|
1713
|
+
const P = (/* @__PURE__ */ new Date()).getTime();
|
1714
|
+
Math.floor((ii - P) % (1e3 * 60) / 1e3) <= 0 && (clearInterval(T), t(14, Ae = !1), oi());
|
1715
|
+
},
|
1716
|
+
100
|
1717
|
+
);
|
1718
|
+
}
|
1719
|
+
}), Vi = Se.subscribe((a) => {
|
1720
|
+
ue && (a ? (ue.classList.remove("flex"), ue.classList.add("hidden")) : (ue.classList.add("flex"), ue.classList.remove("hidden")));
|
1721
|
+
}), Hi = Dt.subscribe((a) => {
|
1722
|
+
F && a && (console.log("setting null in video srcObject"), t(11, F.srcObject = null, F), t(11, F.src = "", F), h(he, f = null, f));
|
1723
|
+
});
|
1724
|
+
St.subscribe(async (a) => {
|
1725
|
+
a === $e.Face && (await Mt(), K() && h(he, f = g[0]?.deviceId, f));
|
1726
|
+
});
|
1727
|
+
const ji = he.subscribe(async (a) => {
|
1728
|
+
if (!(!d || !a || K() && ne))
|
1729
|
+
try {
|
1730
|
+
if (K()) {
|
1731
|
+
await at(Y), await pe();
|
1732
|
+
return;
|
1733
|
+
}
|
1734
|
+
t(11, F.srcObject = d, F), h(Dt, E = !1, E), He ? h(G, l = H.OK, l) : h(G, l = H.CAMERA_ORIENTATION_PORTRAIT, l), d.getTracks().forEach((w) => {
|
1735
|
+
w.readyState === "live" && console.log(`Camera ${w.label} opened successfully!`);
|
1736
|
+
}), h(G, l = H.OK, l), La(F);
|
1737
|
+
} catch (w) {
|
1738
|
+
const T = w;
|
1739
|
+
t(17, ne = !0), Re(T) && "message" in T && T.message.includes("Requested device not found") && h(G, l = H.DEVICE_NOT_FOUND_ERROR, l);
|
1740
|
+
}
|
1741
|
+
}), Ki = St.subscribe(async (a) => {
|
1742
|
+
a === $e.Face && K() && !De && !v && Rt && await pe();
|
1743
|
+
}), qi = Ue.subscribe(async (a) => {
|
1744
|
+
a && ri();
|
1745
|
+
}), zi = Da.subscribe(async (a) => {
|
1746
|
+
if (g[0]?.deviceId) {
|
1747
|
+
if (at(), !_e() || K()) {
|
1748
|
+
const T = (g.findIndex((I) => I.deviceId === f) + 1) % g.length, P = g[T].deviceId;
|
1749
|
+
K() ? h(he, f = P, f) : await pe(P);
|
1750
|
+
return;
|
1751
|
+
}
|
1752
|
+
a ? (h(Ye, u = Pt.REAR_CAMERA, u), await pe()) : (h(Ye, u = Pt.FRONT_CAMERA, u), await pe());
|
1753
|
+
}
|
1754
|
+
}), Ji = Fa.subscribe(async (a) => {
|
1755
|
+
!a.isSupported || !_e() || c != "FACE" || (He = a.orientation.includes("portrait"), He ? F && !r ? await ze() : h(G, l = H.OK, l) : h(G, l = H.CAMERA_ORIENTATION_PORTRAIT, l));
|
1756
|
+
});
|
1757
|
+
async function ri() {
|
1758
|
+
let a;
|
1759
|
+
try {
|
1760
|
+
if (kt >= Ts) {
|
1761
|
+
kt = 0;
|
1762
|
+
let w;
|
1763
|
+
if (w = Qa(F, Xt), a = await w.withFaceLandmarks(), te.getContext("2d")?.clearRect(0, 0, te.width, te.height), a != null) {
|
1764
|
+
const T = Ga(te, F, !0);
|
1765
|
+
Na(te, F, T);
|
1766
|
+
const P = Ya(a, T);
|
1767
|
+
Sa(P, te, wt), h(Qe, n = !0, n), t(15, gt = !0), vt = (/* @__PURE__ */ new Date()).getTime();
|
1768
|
+
} else
|
1769
|
+
Wi();
|
1770
|
+
} else
|
1771
|
+
kt++;
|
1772
|
+
} catch (w) {
|
1773
|
+
console.warn(`FaceapiLoop: ${w}`);
|
1774
|
+
} finally {
|
1775
|
+
o && Be(F, ri);
|
1776
|
+
}
|
1777
|
+
}
|
1778
|
+
Lt.subscribe(async (a) => {
|
1779
|
+
a && (Te(), h(Lt, s = !1, s));
|
1780
|
+
});
|
1781
|
+
const Xi = Ge.subscribe((a) => {
|
1782
|
+
a && window.dispatchEvent(new CustomEvent("brycc-camera-ready"));
|
1783
|
+
}), Qi = Ze.subscribe((a) => {
|
1784
|
+
a && window.dispatchEvent(new CustomEvent("brycc-face-initialized"));
|
1785
|
+
});
|
1786
|
+
Pa(() => {
|
1787
|
+
at(), Vi(), Ui(), Hi(), ji(), Ki(), clearInterval(ti), qi(), zi(), Ji(), Xi(), Qi(), ti = 0;
|
1788
|
+
});
|
1789
|
+
function Gi(a) {
|
1790
|
+
ot[a ? "unshift" : "push"](() => {
|
1791
|
+
Y = a, t(1, Y);
|
1792
|
+
});
|
1793
|
+
}
|
1794
|
+
function Yi(a) {
|
1795
|
+
ot[a ? "unshift" : "push"](() => {
|
1796
|
+
F = a, t(11, F);
|
1797
|
+
});
|
1798
|
+
}
|
1799
|
+
const Zi = () => {
|
1800
|
+
K() || (t(11, F.width = ae.videoWidth, F), t(11, F.height = ae.videoHeight, F), t(12, te.width = ae.videoWidth, te), t(12, te.height = ae.videoHeight, te));
|
1801
|
+
};
|
1802
|
+
function xi(a) {
|
1803
|
+
ot[a ? "unshift" : "push"](() => {
|
1804
|
+
te = a, t(12, te);
|
1805
|
+
});
|
1806
|
+
}
|
1807
|
+
const $i = () => qe(), ea = () => Te();
|
1808
|
+
function ta(a) {
|
1809
|
+
ot[a ? "unshift" : "push"](() => {
|
1810
|
+
ue = a, t(13, ue);
|
1811
|
+
});
|
1812
|
+
}
|
1813
|
+
const ia = () => qe(), aa = () => Te();
|
1814
|
+
function sa() {
|
1815
|
+
W = this.value, Nt.set(W);
|
1816
|
+
}
|
1817
|
+
const oa = () => qe(), na = () => Te();
|
1818
|
+
function la() {
|
1819
|
+
W = this.value, Nt.set(W);
|
1820
|
+
}
|
1821
|
+
const ra = () => Te(), ca = async () => {
|
1822
|
+
await ze();
|
1823
|
+
};
|
1824
|
+
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, Y = a.widgetInstance);
|
1826
|
+
}, [
|
1827
|
+
Tt,
|
1828
|
+
Y,
|
1829
|
+
fe,
|
1830
|
+
Gt,
|
1831
|
+
Yt,
|
1832
|
+
Ot,
|
1833
|
+
Zt,
|
1834
|
+
xt,
|
1835
|
+
$t,
|
1836
|
+
ei,
|
1837
|
+
Ke,
|
1838
|
+
F,
|
1839
|
+
te,
|
1840
|
+
ue,
|
1841
|
+
Ae,
|
1842
|
+
gt,
|
1843
|
+
Ve,
|
1844
|
+
ne,
|
1845
|
+
ye,
|
1846
|
+
ie,
|
1847
|
+
l,
|
1848
|
+
r,
|
1849
|
+
f,
|
1850
|
+
v,
|
1851
|
+
B,
|
1852
|
+
W,
|
1853
|
+
R,
|
1854
|
+
y,
|
1855
|
+
Q,
|
1856
|
+
$,
|
1857
|
+
ce,
|
1858
|
+
ae,
|
1859
|
+
qt,
|
1860
|
+
zt,
|
1861
|
+
Jt,
|
1862
|
+
Ue,
|
1863
|
+
Le,
|
1864
|
+
oi,
|
1865
|
+
qe,
|
1866
|
+
Te,
|
1867
|
+
ze,
|
1868
|
+
wt,
|
1869
|
+
Ct,
|
1870
|
+
Et,
|
1871
|
+
yt,
|
1872
|
+
Ie,
|
1873
|
+
Gi,
|
1874
|
+
Yi,
|
1875
|
+
Zi,
|
1876
|
+
xi,
|
1877
|
+
$i,
|
1878
|
+
ea,
|
1879
|
+
ta,
|
1880
|
+
ia,
|
1881
|
+
aa,
|
1882
|
+
sa,
|
1883
|
+
oa,
|
1884
|
+
na,
|
1885
|
+
la,
|
1886
|
+
ra,
|
1887
|
+
ca
|
1888
|
+
];
|
1889
|
+
}
|
1890
|
+
class Is extends Ut {
|
1891
|
+
constructor(e) {
|
1892
|
+
super(), Vt(
|
1893
|
+
this,
|
1894
|
+
{
|
1895
|
+
target: this.shadowRoot,
|
1896
|
+
props: jt(this.attributes),
|
1897
|
+
customElement: !0
|
1898
|
+
},
|
1899
|
+
As,
|
1900
|
+
ys,
|
1901
|
+
Ht,
|
1902
|
+
{
|
1903
|
+
enableMinutiae: 41,
|
1904
|
+
videoDimensions: 42,
|
1905
|
+
noTabs: 43,
|
1906
|
+
weightsPath: 44,
|
1907
|
+
evaluatePhoto: 2,
|
1908
|
+
showCaptureButton: 0,
|
1909
|
+
showUnconformities: 3,
|
1910
|
+
showConfigButton: 4,
|
1911
|
+
showAutoCaptureButton: 5,
|
1912
|
+
showCameraButton: 6,
|
1913
|
+
showJustificationField: 7,
|
1914
|
+
minEyeToEyeDist: 45,
|
1915
|
+
videoOverlay: 8,
|
1916
|
+
videoOverlayTransparency: 9,
|
1917
|
+
widgetInstance: 1,
|
1918
|
+
play: 10
|
1919
|
+
},
|
1920
|
+
null,
|
1921
|
+
[-1, -1, -1, -1]
|
1922
|
+
), e && (e.target && D(e.target, this, e.anchor), e.props && (this.$set(e.props), q()));
|
1923
|
+
}
|
1924
|
+
static get observedAttributes() {
|
1925
|
+
return [
|
1926
|
+
"enableMinutiae",
|
1927
|
+
"videoDimensions",
|
1928
|
+
"noTabs",
|
1929
|
+
"weightsPath",
|
1930
|
+
"evaluatePhoto",
|
1931
|
+
"showCaptureButton",
|
1932
|
+
"showUnconformities",
|
1933
|
+
"showConfigButton",
|
1934
|
+
"showAutoCaptureButton",
|
1935
|
+
"showCameraButton",
|
1936
|
+
"showJustificationField",
|
1937
|
+
"minEyeToEyeDist",
|
1938
|
+
"videoOverlay",
|
1939
|
+
"videoOverlayTransparency",
|
1940
|
+
"widgetInstance",
|
1941
|
+
"play"
|
1942
|
+
];
|
1943
|
+
}
|
1944
|
+
get enableMinutiae() {
|
1945
|
+
return this.$$.ctx[41];
|
1946
|
+
}
|
1947
|
+
set enableMinutiae(e) {
|
1948
|
+
this.$$set({ enableMinutiae: e }), q();
|
1949
|
+
}
|
1950
|
+
get videoDimensions() {
|
1951
|
+
return this.$$.ctx[42];
|
1952
|
+
}
|
1953
|
+
set videoDimensions(e) {
|
1954
|
+
this.$$set({ videoDimensions: e }), q();
|
1955
|
+
}
|
1956
|
+
get noTabs() {
|
1957
|
+
return this.$$.ctx[43];
|
1958
|
+
}
|
1959
|
+
set noTabs(e) {
|
1960
|
+
this.$$set({ noTabs: e }), q();
|
1961
|
+
}
|
1962
|
+
get weightsPath() {
|
1963
|
+
return this.$$.ctx[44];
|
1964
|
+
}
|
1965
|
+
set weightsPath(e) {
|
1966
|
+
this.$$set({ weightsPath: e }), q();
|
1967
|
+
}
|
1968
|
+
get evaluatePhoto() {
|
1969
|
+
return this.$$.ctx[2];
|
1970
|
+
}
|
1971
|
+
set evaluatePhoto(e) {
|
1972
|
+
this.$$set({ evaluatePhoto: e }), q();
|
1973
|
+
}
|
1974
|
+
get showCaptureButton() {
|
1975
|
+
return this.$$.ctx[0];
|
1976
|
+
}
|
1977
|
+
set showCaptureButton(e) {
|
1978
|
+
this.$$set({ showCaptureButton: e }), q();
|
1979
|
+
}
|
1980
|
+
get showUnconformities() {
|
1981
|
+
return this.$$.ctx[3];
|
1982
|
+
}
|
1983
|
+
set showUnconformities(e) {
|
1984
|
+
this.$$set({ showUnconformities: e }), q();
|
1985
|
+
}
|
1986
|
+
get showConfigButton() {
|
1987
|
+
return this.$$.ctx[4];
|
1988
|
+
}
|
1989
|
+
set showConfigButton(e) {
|
1990
|
+
this.$$set({ showConfigButton: e }), q();
|
1991
|
+
}
|
1992
|
+
get showAutoCaptureButton() {
|
1993
|
+
return this.$$.ctx[5];
|
1994
|
+
}
|
1995
|
+
set showAutoCaptureButton(e) {
|
1996
|
+
this.$$set({ showAutoCaptureButton: e }), q();
|
1997
|
+
}
|
1998
|
+
get showCameraButton() {
|
1999
|
+
return this.$$.ctx[6];
|
2000
|
+
}
|
2001
|
+
set showCameraButton(e) {
|
2002
|
+
this.$$set({ showCameraButton: e }), q();
|
2003
|
+
}
|
2004
|
+
get showJustificationField() {
|
2005
|
+
return this.$$.ctx[7];
|
2006
|
+
}
|
2007
|
+
set showJustificationField(e) {
|
2008
|
+
this.$$set({ showJustificationField: e }), q();
|
2009
|
+
}
|
2010
|
+
get minEyeToEyeDist() {
|
2011
|
+
return this.$$.ctx[45];
|
2012
|
+
}
|
2013
|
+
set minEyeToEyeDist(e) {
|
2014
|
+
this.$$set({ minEyeToEyeDist: e }), q();
|
2015
|
+
}
|
2016
|
+
get videoOverlay() {
|
2017
|
+
return this.$$.ctx[8];
|
2018
|
+
}
|
2019
|
+
set videoOverlay(e) {
|
2020
|
+
this.$$set({ videoOverlay: e }), q();
|
2021
|
+
}
|
2022
|
+
get videoOverlayTransparency() {
|
2023
|
+
return this.$$.ctx[9];
|
2024
|
+
}
|
2025
|
+
set videoOverlayTransparency(e) {
|
2026
|
+
this.$$set({ videoOverlayTransparency: e }), q();
|
2027
|
+
}
|
2028
|
+
get widgetInstance() {
|
2029
|
+
return this.$$.ctx[1];
|
2030
|
+
}
|
2031
|
+
set widgetInstance(e) {
|
2032
|
+
this.$$set({ widgetInstance: e }), q();
|
2033
|
+
}
|
2034
|
+
get play() {
|
2035
|
+
return this.$$.ctx[10];
|
2036
|
+
}
|
2037
|
+
}
|
2038
|
+
customElements.define("face-collector", Is);
|
2039
|
+
export {
|
2040
|
+
Is as default
|
2041
|
+
};
|