bry-biometric-collector 3.0.0 → 3.1.0-RC02
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_a618e9a0_3.0.0.js → DocumentCollector_55619fb1_3.1.0-RC02.js} +4 -4
- package/dist/FaceCollector_ff8d1a7f_3.1.0-RC02.js +2156 -0
- package/dist/{ValidationAlert_f97e5664_3.0.0.js → ValidationAlert_de952c42_3.1.0-RC02.js} +1 -1
- package/dist/{___vite-browser-external_commonjs-proxy_be4e9a04_3.0.0.js → ___vite-browser-external_commonjs-proxy_40bba70e_3.1.0-RC02.js} +1 -1
- package/dist/bry-biometric-collector-main.js +2 -2
- package/dist/{en-us_f4328332_3.0.0.js → en-us_30d2d531_3.1.0-RC02.js} +6 -1
- package/dist/{es-cl_cea9f949_3.0.0.js → es-cl_5299d9ff_3.1.0-RC02.js} +11 -6
- package/dist/{fingersApi_0319e7d7_3.0.0.js → fingersApi_96f92c5e_3.1.0-RC02.js} +2 -2
- package/dist/index-no-detector_79efea88_3.1.0-RC02.js +10888 -0
- package/dist/index-no-detector_db7c16a4_3.1.0-RC02.js +15580 -0
- package/dist/index.js +2 -2
- package/dist/{index_0c2fed2f_3.0.0.js → index_284ff443_3.1.0-RC02.js} +3 -3
- package/dist/{index_c5935c72_3.0.0.js → index_c1d47d0b_3.1.0-RC02.js} +3 -3
- package/dist/{main_379f7152_3.0.0.js → main_507e14eb_3.1.0-RC02.js} +1136 -1115
- package/dist/{pt-br_378191b0_3.0.0.js → pt-br_d3ed1998_3.1.0-RC02.js} +18 -13
- package/package.json +3 -3
- package/dist/FaceCollector_3f0c6cfb_3.0.0.js +0 -2051
- package/dist/index-no-detector_281a271b_3.0.0.js +0 -15045
- package/dist/index-no-detector_56051121_3.0.0.js +0 -10830
- /package/dist/{face_api_0e3ce8c8_3.0.0.js → face_api_0e3ce8c8_3.1.0-RC02.js} +0 -0
@@ -1,2051 +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 ge, B as x, C as m, D as be, 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 H, 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 fi, a5 as Dt, a6 as di, a7 as ma, a8 as _a, a9 as Pe, aa as we, ab as ga, ac as Ft, ad as Nt, ae as me, af as ee, $ as ba, ag as Ce, ah as hi, ai as Ze, aj as St, ak as va, al as xe, am as mi, an as _i, 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 K, j as nt, ax as Bt, ay as Ra, az as $e, aA as et, aB as ka, aC as gi, aD as bi, aE as tt, A as Wt, aF as Ee, aG as it, aH as Aa, aI as vi, 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 Pa, aS as Be, aT as Ba, aU as Wa, aV as st, aW as oe, aX as ft, aY as ct, aZ as Fi, a_ as M, a$ as V, b0 as pi, b1 as Ma, b2 as Ua, b3 as Va, b4 as ot, b5 as We, b6 as ja, b7 as Ha, b8 as wi, b9 as Ka, ba as ut, bb as qa } from "./main_379f7152_3.0.0.js";
|
2
|
-
import { W as za, C as Ja, V as Xa, a as Qa } from "./ValidationAlert_f97e5664_3.0.0.js";
|
3
|
-
import { detectSingleFace as Ga, matchDimensions as Ya, resizeResults as Za, Box as xa } from "./face_api_0e3ce8c8_3.0.0.js";
|
4
|
-
function $a(i) {
|
5
|
-
let e, t, s, o;
|
6
|
-
return t = new za({}), {
|
7
|
-
c() {
|
8
|
-
e = C("div"), ge(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
|
-
L(n, e, l), be(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 || (J(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 es = "hsl(var(--p))", ts = "hsl(var(--su))";
|
42
|
-
function is(i, e, t) {
|
43
|
-
let s, o, n;
|
44
|
-
I(i, Ne, (b) => t(7, o = b)), I(i, Me, (b) => t(8, n = b));
|
45
|
-
let { loading: l } = e, r, c, u = 0.8, f = 8, v = 0.15;
|
46
|
-
return _e() && (u = 0.65, f = 10, v = 0.25), i.$$set = (b) => {
|
47
|
-
"loading" in b && t(0, l = b.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 b = n.videoHeight - n.videoHeight * v;
|
53
|
-
h(Ne, o.y = b - 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: ${es};
|
60
|
-
--border-color-animation: ${ts};
|
61
|
-
--oval-border: ${f}px;
|
62
|
-
`);
|
63
|
-
}, [
|
64
|
-
l,
|
65
|
-
s,
|
66
|
-
r,
|
67
|
-
c,
|
68
|
-
u,
|
69
|
-
f,
|
70
|
-
v,
|
71
|
-
o,
|
72
|
-
n
|
73
|
-
];
|
74
|
-
}
|
75
|
-
class Ni extends Ut {
|
76
|
-
constructor(e) {
|
77
|
-
super(), Vt(
|
78
|
-
this,
|
79
|
-
{
|
80
|
-
target: this.shadowRoot,
|
81
|
-
props: Ht(this.attributes),
|
82
|
-
customElement: !0
|
83
|
-
},
|
84
|
-
is,
|
85
|
-
$a,
|
86
|
-
jt,
|
87
|
-
{ loading: 0 },
|
88
|
-
null
|
89
|
-
), e && (e.target && L(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", Ni);
|
102
|
-
function as(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
|
-
L(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 ss(i, e, t) {
|
133
|
-
let s, o;
|
134
|
-
I(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 Si extends Ut {
|
158
|
-
constructor(e) {
|
159
|
-
super(), Vt(
|
160
|
-
this,
|
161
|
-
{
|
162
|
-
target: this.shadowRoot,
|
163
|
-
props: Ht(this.attributes),
|
164
|
-
customElement: !0
|
165
|
-
},
|
166
|
-
ss,
|
167
|
-
as,
|
168
|
-
jt,
|
169
|
-
{ overlayColor: 1, overlayTransparency: 2 },
|
170
|
-
null
|
171
|
-
), e && (e.target && L(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", Si);
|
190
|
-
function Ci(i, e, t) {
|
191
|
-
const s = i.slice();
|
192
|
-
return s[118] = e[t], s;
|
193
|
-
}
|
194
|
-
function Ei(i) {
|
195
|
-
let e, t, s = H(), o, n, l, r, c, u, f, v, b, d, E, g, p, k, T, F, A, B = s && os(i), W = (
|
196
|
-
/*$ready*/
|
197
|
-
i[21] && yi(i)
|
198
|
-
);
|
199
|
-
return d = new Wa({}), g = new Ja({
|
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"), v = C("div"), W && W.c(), b = U(), ge(d.$$.fragment), E = U(), ge(g.$$.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(v, "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] !== j.OK || H() && /*idrndLoading*/
|
262
|
-
(i[16] || /*idrndClosed*/
|
263
|
-
i[17] || /*waitingIdrndCaptureEvent*/
|
264
|
-
i[18]);
|
265
|
-
},
|
266
|
-
m(R, y) {
|
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, v), W && W.m(v, null), _(f, b), be(d, f, null), _(f, E), be(g, f, null), T = !0, F || (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
|
-
], F = !0);
|
282
|
-
},
|
283
|
-
p(R, y) {
|
284
|
-
s && B.p(R, y), (!T || 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), (!T || y[1] & /*$videoStore*/
|
287
|
-
1) && st(
|
288
|
-
t,
|
289
|
-
"width",
|
290
|
-
/*$videoStore*/
|
291
|
-
R[31].videoWidth + "px"
|
292
|
-
), (!T || 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 && J(W, 1)) : (W = yi(R), W.c(), J(W, 1), W.m(v, null)) : W && (lt(), Z(W, 1, 1, () => {
|
301
|
-
W = null;
|
302
|
-
}), rt());
|
303
|
-
const X = {};
|
304
|
-
y[0] & /*showConfigButton*/
|
305
|
-
16 && (X.showConfigButton = /*showConfigButton*/
|
306
|
-
R[4]), y[0] & /*showAutoCaptureButton*/
|
307
|
-
32 && (X.showAutoCaptureButton = /*showAutoCaptureButton*/
|
308
|
-
R[5]), y[0] & /*showCaptureButton*/
|
309
|
-
1 && (X.showCaptureButton = /*showCaptureButton*/
|
310
|
-
R[0]), y[0] & /*showCameraButton*/
|
311
|
-
64 && (X.showCameraButton = /*showCameraButton*/
|
312
|
-
R[6]), y[0] & /*enableCaptureButton*/
|
313
|
-
32768 && (X.enableCaptureButton = /*enableCaptureButton*/
|
314
|
-
R[15]), y[0] & /*videoOverlay*/
|
315
|
-
256 && (X.videoOverlay = /*videoOverlay*/
|
316
|
-
R[8]), y[0] & /*videoOverlayTransparency*/
|
317
|
-
512 && (X.videoOverlayTransparency = /*videoOverlayTransparency*/
|
318
|
-
R[9]), y[0] & /*idrndClosed*/
|
319
|
-
131072 && (X.idrndClosed = /*idrndClosed*/
|
320
|
-
R[17]), y[0] & /*idrndLoading*/
|
321
|
-
65536 && (X.idrndLoading = /*idrndLoading*/
|
322
|
-
R[16]), y[0] & /*waitingIdrndCaptureEvent*/
|
323
|
-
262144 && (X.waitingIdrndCaptureEvent = /*waitingIdrndCaptureEvent*/
|
324
|
-
R[18]), g.$set(X), (!T || y[0] & /*$ready*/
|
325
|
-
2097152 && p !== (p = /*$ready*/
|
326
|
-
R[21] ? "relative" : "relative w-0 h-0")) && m(e, "class", p), (!T || y[0] & /*$cameraStatusStore, idrndLoading, idrndClosed, waitingIdrndCaptureEvent*/
|
327
|
-
1507328 && k !== (k = /*$cameraStatusStore*/
|
328
|
-
R[20] !== j.OK || H() && /*idrndLoading*/
|
329
|
-
(R[16] || /*idrndClosed*/
|
330
|
-
R[17] || /*waitingIdrndCaptureEvent*/
|
331
|
-
R[18]))) && (e.hidden = k);
|
332
|
-
},
|
333
|
-
i(R) {
|
334
|
-
T || (J(W), J(d.$$.fragment, R), J(g.$$.fragment, R), T = !0);
|
335
|
-
},
|
336
|
-
o(R) {
|
337
|
-
Z(W), Z(d.$$.fragment, R), Z(g.$$.fragment, R), T = !1;
|
338
|
-
},
|
339
|
-
d(R) {
|
340
|
-
R && S(e), B && B.d(), i[47](null), i[49](null), W && W.d(), ve(d), ve(g), F = !1, ft(A);
|
341
|
-
}
|
342
|
-
};
|
343
|
-
}
|
344
|
-
function os(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
|
-
L(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 yi(i) {
|
373
|
-
let e, t, s, o, n, l;
|
374
|
-
return e = new Xa({
|
375
|
-
props: {
|
376
|
-
isCountingDown: (
|
377
|
-
/*isCountingDown*/
|
378
|
-
i[14]
|
379
|
-
)
|
380
|
-
}
|
381
|
-
}), s = new Ni({
|
382
|
-
props: { loading: (
|
383
|
-
/*isCountingDown*/
|
384
|
-
i[14]
|
385
|
-
) }
|
386
|
-
}), n = new Si({
|
387
|
-
props: {
|
388
|
-
overlayColor: (
|
389
|
-
/*videoOverlay*/
|
390
|
-
i[8]
|
391
|
-
),
|
392
|
-
overlayTransparency: (
|
393
|
-
/*videoOverlayTransparency*/
|
394
|
-
i[9]
|
395
|
-
)
|
396
|
-
}
|
397
|
-
}), {
|
398
|
-
c() {
|
399
|
-
ge(e.$$.fragment), t = U(), ge(s.$$.fragment), o = U(), ge(n.$$.fragment);
|
400
|
-
},
|
401
|
-
m(r, c) {
|
402
|
-
be(e, r, c), L(r, t, c), be(s, r, c), L(r, o, c), be(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 v = {};
|
414
|
-
c[0] & /*videoOverlay*/
|
415
|
-
256 && (v.overlayColor = /*videoOverlay*/
|
416
|
-
r[8]), c[0] & /*videoOverlayTransparency*/
|
417
|
-
512 && (v.overlayTransparency = /*videoOverlayTransparency*/
|
418
|
-
r[9]), n.$set(v);
|
419
|
-
},
|
420
|
-
i(r) {
|
421
|
-
l || (J(e.$$.fragment, r), J(s.$$.fragment, r), J(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 Ti(i) {
|
432
|
-
let e, t, s, o, n;
|
433
|
-
function l(u, f) {
|
434
|
-
return (
|
435
|
-
/*$isLoading*/
|
436
|
-
u[32] ? ls : ns
|
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 = Fi) || 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
|
-
L(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 ns(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
|
-
L(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 ls(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
|
-
L(t, e, s);
|
485
|
-
},
|
486
|
-
p: x,
|
487
|
-
d(t) {
|
488
|
-
t && S(e);
|
489
|
-
}
|
490
|
-
};
|
491
|
-
}
|
492
|
-
function Oi(i) {
|
493
|
-
let e, t, s, o, n;
|
494
|
-
function l(u, f) {
|
495
|
-
return (
|
496
|
-
/*$isLoading*/
|
497
|
-
u[32] ? cs : rs
|
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 = Fi) || 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
|
-
L(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 rs(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
|
-
L(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 cs(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
|
-
L(t, e, s);
|
546
|
-
},
|
547
|
-
p: x,
|
548
|
-
d(t) {
|
549
|
-
t && S(e);
|
550
|
-
}
|
551
|
-
};
|
552
|
-
}
|
553
|
-
function Ri(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, v;
|
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(b, d) {
|
567
|
-
L(b, e, d), _(e, t), _(t, o), _(e, l), _(e, r), _(r, u), f || (v = [
|
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(b, d) {
|
583
|
-
d[0] & /*$_*/
|
584
|
-
268435456 && s !== (s = /*$_*/
|
585
|
-
b[28]("faceCollector.finish") + "") && V(o, s), d[0] & /*$justification*/
|
586
|
-
33554432 && n !== (n = /*$justification*/
|
587
|
-
b[25].length === 0) && (t.disabled = n), d[0] & /*$_*/
|
588
|
-
268435456 && c !== (c = /*$_*/
|
589
|
-
b[28]("faceCollector.retakePhoto") + "") && V(u, c);
|
590
|
-
},
|
591
|
-
d(b) {
|
592
|
-
b && S(e), f = !1, ft(v);
|
593
|
-
}
|
594
|
-
};
|
595
|
-
}
|
596
|
-
function us(i) {
|
597
|
-
let e, t;
|
598
|
-
return e = new Qa({ props: { handler: (
|
599
|
-
/*func*/
|
600
|
-
i[60]
|
601
|
-
) } }), {
|
602
|
-
c() {
|
603
|
-
ge(e.$$.fragment);
|
604
|
-
},
|
605
|
-
m(s, o) {
|
606
|
-
be(e, s, o), t = !0;
|
607
|
-
},
|
608
|
-
p: x,
|
609
|
-
i(s) {
|
610
|
-
t || (J(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 fs(i) {
|
621
|
-
let e, t, s, o, n, l, r, c, u;
|
622
|
-
const f = [
|
623
|
-
gs,
|
624
|
-
_s,
|
625
|
-
ms,
|
626
|
-
hs,
|
627
|
-
ds
|
628
|
-
], v = [];
|
629
|
-
function b(d, E) {
|
630
|
-
return (
|
631
|
-
/*$captured*/
|
632
|
-
d[23] ? (
|
633
|
-
/*$unconformitiesStore*/
|
634
|
-
d[29].isLoading ? 1 : (
|
635
|
-
/*$requestResult*/
|
636
|
-
d[27] !== K.OK ? 2 : (
|
637
|
-
/*$saved*/
|
638
|
-
d[24] ? 4 : 3
|
639
|
-
)
|
640
|
-
)
|
641
|
-
) : 0
|
642
|
-
);
|
643
|
-
}
|
644
|
-
return l = b(i), r = v[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
|
-
L(d, e, E), _(e, t), _(e, n), v[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 g = l;
|
669
|
-
l = b(d), l === g ? v[l].p(d, E) : (lt(), Z(v[g], 1, 1, () => {
|
670
|
-
v[g] = null;
|
671
|
-
}), rt(), r = v[l], r ? r.p(d, E) : (r = v[l] = f[l](d), r.c()), J(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 || (J(r), u = !0);
|
679
|
-
},
|
680
|
-
o(d) {
|
681
|
-
Z(r), u = !1;
|
682
|
-
},
|
683
|
-
d(d) {
|
684
|
-
d && S(e), v[l].d();
|
685
|
-
}
|
686
|
-
};
|
687
|
-
}
|
688
|
-
function ds(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, v, b = nt(ja).faceStrategy !== Ha.DISABLED, d, E, g, p = (
|
696
|
-
/*$unconformitiesStore*/
|
697
|
-
i[29].unconformities.length !== 0 && ki(i)
|
698
|
-
), k = b && 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), v = 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"), wi(r, "ce-dui-btn-group", !/*$exportButtonDisabled*/
|
702
|
-
i[34]);
|
703
|
-
},
|
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, v), k && k.m(r, null), d = !0, E || (g = oe(
|
706
|
-
c,
|
707
|
-
"click",
|
708
|
-
/*click_handler_6*/
|
709
|
-
i[59]
|
710
|
-
), E = !0);
|
711
|
-
},
|
712
|
-
p(T, F) {
|
713
|
-
(!d || F[0] & /*$_*/
|
714
|
-
268435456) && s !== (s = /*$_*/
|
715
|
-
T[28]("faceCollector.captured") + "") && V(o, s), /*$unconformitiesStore*/
|
716
|
-
T[29].unconformities.length !== 0 ? p ? p.p(T, F) : (p = ki(T), p.c(), p.m(e, l)) : p && (p.d(1), p = null), (!d || F[0] & /*$_*/
|
717
|
-
268435456) && u !== (u = /*$_*/
|
718
|
-
T[28]("faceCollector.retakePhoto") + "") && V(f, u), (!d || F[1] & /*$exportButtonDisabled*/
|
719
|
-
8) && wi(r, "ce-dui-btn-group", !/*$exportButtonDisabled*/
|
720
|
-
T[34]);
|
721
|
-
},
|
722
|
-
i(T) {
|
723
|
-
d || (J(k), d = !0);
|
724
|
-
},
|
725
|
-
o(T) {
|
726
|
-
Z(k), d = !1;
|
727
|
-
},
|
728
|
-
d(T) {
|
729
|
-
T && S(e), p && p.d(), k && k.d(), E = !1, g();
|
730
|
-
}
|
731
|
-
};
|
732
|
-
}
|
733
|
-
function hs(i) {
|
734
|
-
let e, t, s = (
|
735
|
-
/*evaluatePhoto*/
|
736
|
-
(i[2] ? (
|
737
|
-
/*$unconformitiesStore*/
|
738
|
-
i[29].unconformities.length === 0 ? (
|
739
|
-
/*$_*/
|
740
|
-
i[28]("faceCollector.everythingOk")
|
741
|
-
) : (
|
742
|
-
/*$_*/
|
743
|
-
i[28]("faceCollector.unconformities")
|
744
|
-
)
|
745
|
-
) : (
|
746
|
-
/*$_*/
|
747
|
-
i[28]("faceCollector.previewCapture")
|
748
|
-
)) + ""
|
749
|
-
), o, n, l, r, c, u, f = (
|
750
|
-
/*$unconformitiesStore*/
|
751
|
-
i[29].unconformities
|
752
|
-
), v = [];
|
753
|
-
for (let g = 0; g < f.length; g += 1)
|
754
|
-
v[g] = Ai(Ci(i, f, g));
|
755
|
-
let b = (
|
756
|
-
/*evaluatePhoto*/
|
757
|
-
i[2] && /*$unconformitiesStore*/
|
758
|
-
i[29].unconformities.length == 0 && Ii(i)
|
759
|
-
), d = (
|
760
|
-
/*showJustificationField*/
|
761
|
-
i[7] && /*$unconformitiesStore*/
|
762
|
-
i[29].unconformities.length > 0 && Li(i)
|
763
|
-
), E = (
|
764
|
-
/*$captured*/
|
765
|
-
i[23] && Di(i)
|
766
|
-
);
|
767
|
-
return {
|
768
|
-
c() {
|
769
|
-
e = C("div"), t = C("h1"), o = M(s), n = U(), l = C("div");
|
770
|
-
for (let g = 0; g < v.length; g += 1)
|
771
|
-
v[g].c();
|
772
|
-
r = U(), b && b.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");
|
773
|
-
},
|
774
|
-
m(g, p) {
|
775
|
-
L(g, e, p), _(e, t), _(t, o), _(e, n), _(e, l);
|
776
|
-
for (let k = 0; k < v.length; k += 1)
|
777
|
-
v[k] && v[k].m(l, null);
|
778
|
-
_(l, r), b && b.m(l, null), _(e, c), d && d.m(e, null), _(e, u), E && E.m(e, null);
|
779
|
-
},
|
780
|
-
p(g, p) {
|
781
|
-
if (p[0] & /*evaluatePhoto, $unconformitiesStore, $_*/
|
782
|
-
805306372 && s !== (s = /*evaluatePhoto*/
|
783
|
-
(g[2] ? (
|
784
|
-
/*$unconformitiesStore*/
|
785
|
-
g[29].unconformities.length === 0 ? (
|
786
|
-
/*$_*/
|
787
|
-
g[28]("faceCollector.everythingOk")
|
788
|
-
) : (
|
789
|
-
/*$_*/
|
790
|
-
g[28]("faceCollector.unconformities")
|
791
|
-
)
|
792
|
-
) : (
|
793
|
-
/*$_*/
|
794
|
-
g[28]("faceCollector.previewCapture")
|
795
|
-
)) + "") && V(o, s), p[0] & /*$unconformitiesStore*/
|
796
|
-
536870912) {
|
797
|
-
f = /*$unconformitiesStore*/
|
798
|
-
g[29].unconformities;
|
799
|
-
let k;
|
800
|
-
for (k = 0; k < f.length; k += 1) {
|
801
|
-
const T = Ci(g, f, k);
|
802
|
-
v[k] ? v[k].p(T, p) : (v[k] = Ai(T), v[k].c(), v[k].m(l, r));
|
803
|
-
}
|
804
|
-
for (; k < v.length; k += 1)
|
805
|
-
v[k].d(1);
|
806
|
-
v.length = f.length;
|
807
|
-
}
|
808
|
-
/*evaluatePhoto*/
|
809
|
-
g[2] && /*$unconformitiesStore*/
|
810
|
-
g[29].unconformities.length == 0 ? b ? b.p(g, p) : (b = Ii(g), b.c(), b.m(l, null)) : b && (b.d(1), b = null), /*showJustificationField*/
|
811
|
-
g[7] && /*$unconformitiesStore*/
|
812
|
-
g[29].unconformities.length > 0 ? d ? d.p(g, p) : (d = Li(g), d.c(), d.m(e, u)) : d && (d.d(1), d = null), /*$captured*/
|
813
|
-
g[23] ? E ? E.p(g, p) : (E = Di(g), E.c(), E.m(e, null)) : E && (E.d(1), E = null);
|
814
|
-
},
|
815
|
-
i: x,
|
816
|
-
o: x,
|
817
|
-
d(g) {
|
818
|
-
g && S(e), Ka(v, g), b && b.d(), d && d.d(), E && E.d();
|
819
|
-
}
|
820
|
-
};
|
821
|
-
}
|
822
|
-
function ms(i) {
|
823
|
-
let e, t, s, o, n = (
|
824
|
-
/*$_*/
|
825
|
-
i[28]("faceCollector.finish") + ""
|
826
|
-
), l, r, c, u = (
|
827
|
-
/*$_*/
|
828
|
-
i[28]("faceCollector.retakePhoto") + ""
|
829
|
-
), f, v, b;
|
830
|
-
function d(p, k) {
|
831
|
-
return (
|
832
|
-
/*$requestResult*/
|
833
|
-
p[27] === K.LIVENESS_DETECTION_FAILURE || /*$requestResult*/
|
834
|
-
p[27] === K.UNKNOWN_LIVENESS_ERROR ? ys : (
|
835
|
-
/*$requestResult*/
|
836
|
-
p[27] === K.LOW_LIVENESS_SCORE ? Es : (
|
837
|
-
/*$requestResult*/
|
838
|
-
p[27] === K.TEMPLATE_EXTRACTION_ERROR || /*$requestResult*/
|
839
|
-
p[27] === K.UNKNOWN_TEMPLATE_EXTRACTION_ERROR ? Cs : (
|
840
|
-
/*$requestResult*/
|
841
|
-
p[27] === K.UNABLE_TO_COMMUNICATE_WITH_TEMPLATE_EXTRACTION_SERVICE ? ws : (
|
842
|
-
/*$requestResult*/
|
843
|
-
p[27] === K.LIVENESS_EVALUATION_ERROR ? ps : vs
|
844
|
-
)
|
845
|
-
)
|
846
|
-
)
|
847
|
-
)
|
848
|
-
);
|
849
|
-
}
|
850
|
-
let E = d(i), g = E(i);
|
851
|
-
return {
|
852
|
-
c() {
|
853
|
-
e = C("div"), g.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");
|
854
|
-
},
|
855
|
-
m(p, k) {
|
856
|
-
L(p, e, k), g.m(e, null), _(e, t), _(e, s), _(s, o), _(o, l), _(s, r), _(s, c), _(c, f), v || (b = [
|
857
|
-
oe(
|
858
|
-
o,
|
859
|
-
"click",
|
860
|
-
/*click_handler_2*/
|
861
|
-
i[53]
|
862
|
-
),
|
863
|
-
oe(
|
864
|
-
c,
|
865
|
-
"click",
|
866
|
-
/*click_handler_3*/
|
867
|
-
i[54]
|
868
|
-
)
|
869
|
-
], v = !0);
|
870
|
-
},
|
871
|
-
p(p, k) {
|
872
|
-
E === (E = d(p)) && g ? g.p(p, k) : (g.d(1), g = E(p), g && (g.c(), g.m(e, t))), k[0] & /*$_*/
|
873
|
-
268435456 && n !== (n = /*$_*/
|
874
|
-
p[28]("faceCollector.finish") + "") && V(l, n), k[0] & /*$_*/
|
875
|
-
268435456 && u !== (u = /*$_*/
|
876
|
-
p[28]("faceCollector.retakePhoto") + "") && V(f, u);
|
877
|
-
},
|
878
|
-
i: x,
|
879
|
-
o: x,
|
880
|
-
d(p) {
|
881
|
-
p && S(e), g.d(), v = !1, ft(b);
|
882
|
-
}
|
883
|
-
};
|
884
|
-
}
|
885
|
-
function _s(i) {
|
886
|
-
let e, t, s = (
|
887
|
-
/*$_*/
|
888
|
-
i[28]("faceCollector.validating") + ""
|
889
|
-
), o, n, l;
|
890
|
-
return {
|
891
|
-
c() {
|
892
|
-
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]");
|
893
|
-
},
|
894
|
-
m(r, c) {
|
895
|
-
L(r, e, c), _(e, t), _(t, o), _(e, n), _(e, l);
|
896
|
-
},
|
897
|
-
p(r, c) {
|
898
|
-
c[0] & /*$_*/
|
899
|
-
268435456 && s !== (s = /*$_*/
|
900
|
-
r[28]("faceCollector.validating") + "") && V(o, s);
|
901
|
-
},
|
902
|
-
i: x,
|
903
|
-
o: x,
|
904
|
-
d(r) {
|
905
|
-
r && S(e);
|
906
|
-
}
|
907
|
-
};
|
908
|
-
}
|
909
|
-
function gs(i) {
|
910
|
-
let e;
|
911
|
-
return {
|
912
|
-
c() {
|
913
|
-
e = C("div"), m(e, "class", "");
|
914
|
-
},
|
915
|
-
m(t, s) {
|
916
|
-
L(t, e, s);
|
917
|
-
},
|
918
|
-
p: x,
|
919
|
-
i: x,
|
920
|
-
o: x,
|
921
|
-
d(t) {
|
922
|
-
t && S(e);
|
923
|
-
}
|
924
|
-
};
|
925
|
-
}
|
926
|
-
function ki(i) {
|
927
|
-
let e, t, s = (
|
928
|
-
/*$_*/
|
929
|
-
i[28]("faceCollector.justification") + ""
|
930
|
-
), o, n, l, r, c;
|
931
|
-
return {
|
932
|
-
c() {
|
933
|
-
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");
|
934
|
-
},
|
935
|
-
m(u, f) {
|
936
|
-
L(u, e, f), _(e, t), _(t, o), L(u, n, f), L(u, l, f), ut(
|
937
|
-
l,
|
938
|
-
/*$justification*/
|
939
|
-
i[25]
|
940
|
-
), r || (c = oe(
|
941
|
-
l,
|
942
|
-
"input",
|
943
|
-
/*textarea_input_handler_1*/
|
944
|
-
i[58]
|
945
|
-
), r = !0);
|
946
|
-
},
|
947
|
-
p(u, f) {
|
948
|
-
f[0] & /*$_*/
|
949
|
-
268435456 && s !== (s = /*$_*/
|
950
|
-
u[28]("faceCollector.justification") + "") && V(o, s), f[0] & /*$justification*/
|
951
|
-
33554432 && ut(
|
952
|
-
l,
|
953
|
-
/*$justification*/
|
954
|
-
u[25]
|
955
|
-
);
|
956
|
-
},
|
957
|
-
d(u) {
|
958
|
-
u && S(e), u && S(n), u && S(l), r = !1, c();
|
959
|
-
}
|
960
|
-
};
|
961
|
-
}
|
962
|
-
function bs(i) {
|
963
|
-
let e, t;
|
964
|
-
return e = new qa({
|
965
|
-
props: { cssClass: "ce-dui-btn-block flex-shrink" }
|
966
|
-
}), {
|
967
|
-
c() {
|
968
|
-
ge(e.$$.fragment);
|
969
|
-
},
|
970
|
-
m(s, o) {
|
971
|
-
be(e, s, o), t = !0;
|
972
|
-
},
|
973
|
-
i(s) {
|
974
|
-
t || (J(e.$$.fragment, s), t = !0);
|
975
|
-
},
|
976
|
-
o(s) {
|
977
|
-
Z(e.$$.fragment, s), t = !1;
|
978
|
-
},
|
979
|
-
d(s) {
|
980
|
-
ve(e, s);
|
981
|
-
}
|
982
|
-
};
|
983
|
-
}
|
984
|
-
function Ai(i) {
|
985
|
-
let e, t = (
|
986
|
-
/*unconformity*/
|
987
|
-
i[118] + ""
|
988
|
-
), s;
|
989
|
-
return {
|
990
|
-
c() {
|
991
|
-
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]");
|
992
|
-
},
|
993
|
-
m(o, n) {
|
994
|
-
L(o, e, n), _(e, s);
|
995
|
-
},
|
996
|
-
p(o, n) {
|
997
|
-
n[0] & /*$unconformitiesStore*/
|
998
|
-
536870912 && t !== (t = /*unconformity*/
|
999
|
-
o[118] + "") && V(s, t);
|
1000
|
-
},
|
1001
|
-
d(o) {
|
1002
|
-
o && S(e);
|
1003
|
-
}
|
1004
|
-
};
|
1005
|
-
}
|
1006
|
-
function Ii(i) {
|
1007
|
-
let e, t = (
|
1008
|
-
/*$_*/
|
1009
|
-
i[28]("faceCollector.noNonconformity") + ""
|
1010
|
-
), s;
|
1011
|
-
return {
|
1012
|
-
c() {
|
1013
|
-
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]");
|
1014
|
-
},
|
1015
|
-
m(o, n) {
|
1016
|
-
L(o, e, n), _(e, s);
|
1017
|
-
},
|
1018
|
-
p(o, n) {
|
1019
|
-
n[0] & /*$_*/
|
1020
|
-
268435456 && t !== (t = /*$_*/
|
1021
|
-
o[28]("faceCollector.noNonconformity") + "") && V(s, t);
|
1022
|
-
},
|
1023
|
-
d(o) {
|
1024
|
-
o && S(e);
|
1025
|
-
}
|
1026
|
-
};
|
1027
|
-
}
|
1028
|
-
function Li(i) {
|
1029
|
-
let e, t, s, o = (
|
1030
|
-
/*$_*/
|
1031
|
-
i[28]("faceCollector.provideAReasonForTheLowQualityCapture") + ""
|
1032
|
-
), n, l, r, c, u, f, v, b, d = (
|
1033
|
-
/*$_*/
|
1034
|
-
i[28]("faceCollector.thisInformationIsRequired") + ""
|
1035
|
-
), E, g, p, k;
|
1036
|
-
return {
|
1037
|
-
c() {
|
1038
|
-
e = C("div"), t = C("label"), s = C("span"), n = M(o), l = U(), r = C("textarea"), u = U(), f = C("label"), v = C("span"), b = M("("), E = M(d), g = 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 = /*$_*/
|
1039
|
-
i[28]("faceCollector.yourJustification")), m(v, "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");
|
1040
|
-
},
|
1041
|
-
m(T, F) {
|
1042
|
-
L(T, e, F), _(e, t), _(t, s), _(s, n), _(e, l), _(e, r), ut(
|
1043
|
-
r,
|
1044
|
-
/*$justification*/
|
1045
|
-
i[25]
|
1046
|
-
), _(e, u), _(e, f), _(f, v), _(v, b), _(v, E), _(v, g), p || (k = oe(
|
1047
|
-
r,
|
1048
|
-
"input",
|
1049
|
-
/*textarea_input_handler*/
|
1050
|
-
i[55]
|
1051
|
-
), p = !0);
|
1052
|
-
},
|
1053
|
-
p(T, F) {
|
1054
|
-
F[0] & /*$_*/
|
1055
|
-
268435456 && o !== (o = /*$_*/
|
1056
|
-
T[28]("faceCollector.provideAReasonForTheLowQualityCapture") + "") && V(n, o), F[0] & /*$_*/
|
1057
|
-
268435456 && c !== (c = /*$_*/
|
1058
|
-
T[28]("faceCollector.yourJustification")) && m(r, "placeholder", c), F[0] & /*$justification*/
|
1059
|
-
33554432 && ut(
|
1060
|
-
r,
|
1061
|
-
/*$justification*/
|
1062
|
-
T[25]
|
1063
|
-
), F[0] & /*$_*/
|
1064
|
-
268435456 && d !== (d = /*$_*/
|
1065
|
-
T[28]("faceCollector.thisInformationIsRequired") + "") && V(E, d);
|
1066
|
-
},
|
1067
|
-
d(T) {
|
1068
|
-
T && S(e), p = !1, k();
|
1069
|
-
}
|
1070
|
-
};
|
1071
|
-
}
|
1072
|
-
function Di(i) {
|
1073
|
-
let e, t, s = (
|
1074
|
-
/*$_*/
|
1075
|
-
i[28]("faceCollector.finish") + ""
|
1076
|
-
), o, n, l, r, c = (
|
1077
|
-
/*$_*/
|
1078
|
-
i[28]("faceCollector.retakePhoto") + ""
|
1079
|
-
), u, f, v;
|
1080
|
-
return {
|
1081
|
-
c() {
|
1082
|
-
e = C("div"), t = C("button"), o = M(s), l = U(), r = C("button"), u = M(c), t.disabled = n = /*evaluatePhoto*/
|
1083
|
-
i[2] && /*showJustificationField*/
|
1084
|
-
i[7] && /*$justification*/
|
1085
|
-
i[25].length === 0 && /*$unconformitiesStore*/
|
1086
|
-
i[29].unconformities.length !== 0, 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");
|
1087
|
-
},
|
1088
|
-
m(b, d) {
|
1089
|
-
L(b, e, d), _(e, t), _(t, o), _(e, l), _(e, r), _(r, u), f || (v = [
|
1090
|
-
oe(
|
1091
|
-
t,
|
1092
|
-
"click",
|
1093
|
-
/*click_handler_4*/
|
1094
|
-
i[56]
|
1095
|
-
),
|
1096
|
-
oe(
|
1097
|
-
r,
|
1098
|
-
"click",
|
1099
|
-
/*click_handler_5*/
|
1100
|
-
i[57]
|
1101
|
-
)
|
1102
|
-
], f = !0);
|
1103
|
-
},
|
1104
|
-
p(b, d) {
|
1105
|
-
d[0] & /*$_*/
|
1106
|
-
268435456 && s !== (s = /*$_*/
|
1107
|
-
b[28]("faceCollector.finish") + "") && V(o, s), d[0] & /*evaluatePhoto, showJustificationField, $justification, $unconformitiesStore*/
|
1108
|
-
570425476 && n !== (n = /*evaluatePhoto*/
|
1109
|
-
b[2] && /*showJustificationField*/
|
1110
|
-
b[7] && /*$justification*/
|
1111
|
-
b[25].length === 0 && /*$unconformitiesStore*/
|
1112
|
-
b[29].unconformities.length !== 0) && (t.disabled = n), d[0] & /*$_*/
|
1113
|
-
268435456 && c !== (c = /*$_*/
|
1114
|
-
b[28]("faceCollector.retakePhoto") + "") && V(u, c);
|
1115
|
-
},
|
1116
|
-
d(b) {
|
1117
|
-
b && S(e), f = !1, ft(v);
|
1118
|
-
}
|
1119
|
-
};
|
1120
|
-
}
|
1121
|
-
function vs(i) {
|
1122
|
-
let e, t = (
|
1123
|
-
/*$_*/
|
1124
|
-
i[28]("faceCollector.everythingOk") + ""
|
1125
|
-
), s;
|
1126
|
-
return {
|
1127
|
-
c() {
|
1128
|
-
e = C("h1"), s = M(t), m(e, "class", "text-3xl font-bold pb-[1em] transition-opacity");
|
1129
|
-
},
|
1130
|
-
m(o, n) {
|
1131
|
-
L(o, e, n), _(e, s);
|
1132
|
-
},
|
1133
|
-
p(o, n) {
|
1134
|
-
n[0] & /*$_*/
|
1135
|
-
268435456 && t !== (t = /*$_*/
|
1136
|
-
o[28]("faceCollector.everythingOk") + "") && V(s, t);
|
1137
|
-
},
|
1138
|
-
d(o) {
|
1139
|
-
o && S(e);
|
1140
|
-
}
|
1141
|
-
};
|
1142
|
-
}
|
1143
|
-
function ps(i) {
|
1144
|
-
let e, t = (
|
1145
|
-
/*$_*/
|
1146
|
-
i[28]("liveness.error.evaluationError") + ""
|
1147
|
-
), s;
|
1148
|
-
return {
|
1149
|
-
c() {
|
1150
|
-
e = C("h1"), s = M(t), m(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1151
|
-
},
|
1152
|
-
m(o, n) {
|
1153
|
-
L(o, e, n), _(e, s);
|
1154
|
-
},
|
1155
|
-
p(o, n) {
|
1156
|
-
n[0] & /*$_*/
|
1157
|
-
268435456 && t !== (t = /*$_*/
|
1158
|
-
o[28]("liveness.error.evaluationError") + "") && V(s, t);
|
1159
|
-
},
|
1160
|
-
d(o) {
|
1161
|
-
o && S(e);
|
1162
|
-
}
|
1163
|
-
};
|
1164
|
-
}
|
1165
|
-
function ws(i) {
|
1166
|
-
let e, t = (
|
1167
|
-
/*$_*/
|
1168
|
-
i[28]("faceCollector.unableToCompleteRequest") + ""
|
1169
|
-
), s;
|
1170
|
-
return {
|
1171
|
-
c() {
|
1172
|
-
e = C("h1"), s = M(t), m(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1173
|
-
},
|
1174
|
-
m(o, n) {
|
1175
|
-
L(o, e, n), _(e, s);
|
1176
|
-
},
|
1177
|
-
p(o, n) {
|
1178
|
-
n[0] & /*$_*/
|
1179
|
-
268435456 && t !== (t = /*$_*/
|
1180
|
-
o[28]("faceCollector.unableToCompleteRequest") + "") && V(s, t);
|
1181
|
-
},
|
1182
|
-
d(o) {
|
1183
|
-
o && S(e);
|
1184
|
-
}
|
1185
|
-
};
|
1186
|
-
}
|
1187
|
-
function Cs(i) {
|
1188
|
-
let e, t = (
|
1189
|
-
/*$_*/
|
1190
|
-
i[28]("faceCollector.lowQualityCapture") + ""
|
1191
|
-
), s;
|
1192
|
-
return {
|
1193
|
-
c() {
|
1194
|
-
e = C("h1"), s = M(t), m(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1195
|
-
},
|
1196
|
-
m(o, n) {
|
1197
|
-
L(o, e, n), _(e, s);
|
1198
|
-
},
|
1199
|
-
p(o, n) {
|
1200
|
-
n[0] & /*$_*/
|
1201
|
-
268435456 && t !== (t = /*$_*/
|
1202
|
-
o[28]("faceCollector.lowQualityCapture") + "") && V(s, t);
|
1203
|
-
},
|
1204
|
-
d(o) {
|
1205
|
-
o && S(e);
|
1206
|
-
}
|
1207
|
-
};
|
1208
|
-
}
|
1209
|
-
function Es(i) {
|
1210
|
-
let e, t = (
|
1211
|
-
/*$_*/
|
1212
|
-
i[28]("liveness.error.error") + ""
|
1213
|
-
), s, o, n = (
|
1214
|
-
/*$_*/
|
1215
|
-
i[28]("faceCollector.unaliveCapture") + ""
|
1216
|
-
), l;
|
1217
|
-
return {
|
1218
|
-
c() {
|
1219
|
-
e = C("h1"), s = M(t), o = M(": "), l = M(n), m(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1220
|
-
},
|
1221
|
-
m(r, c) {
|
1222
|
-
L(r, e, c), _(e, s), _(e, o), _(e, l);
|
1223
|
-
},
|
1224
|
-
p(r, c) {
|
1225
|
-
c[0] & /*$_*/
|
1226
|
-
268435456 && t !== (t = /*$_*/
|
1227
|
-
r[28]("liveness.error.error") + "") && V(s, t), c[0] & /*$_*/
|
1228
|
-
268435456 && n !== (n = /*$_*/
|
1229
|
-
r[28]("faceCollector.unaliveCapture") + "") && V(l, n);
|
1230
|
-
},
|
1231
|
-
d(r) {
|
1232
|
-
r && S(e);
|
1233
|
-
}
|
1234
|
-
};
|
1235
|
-
}
|
1236
|
-
function ys(i) {
|
1237
|
-
let e, t = (
|
1238
|
-
/*$_*/
|
1239
|
-
i[28]("liveness.error.error") + ""
|
1240
|
-
), s, o, n = (
|
1241
|
-
/*$_*/
|
1242
|
-
i[28](
|
1243
|
-
/*livenessError*/
|
1244
|
-
i[19]
|
1245
|
-
) + ""
|
1246
|
-
), l, r;
|
1247
|
-
return {
|
1248
|
-
c() {
|
1249
|
-
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");
|
1250
|
-
},
|
1251
|
-
m(c, u) {
|
1252
|
-
L(c, e, u), _(e, s), _(e, o), _(e, l), _(e, r);
|
1253
|
-
},
|
1254
|
-
p(c, u) {
|
1255
|
-
u[0] & /*$_*/
|
1256
|
-
268435456 && t !== (t = /*$_*/
|
1257
|
-
c[28]("liveness.error.error") + "") && V(s, t), u[0] & /*$_, livenessError*/
|
1258
|
-
268959744 && n !== (n = /*$_*/
|
1259
|
-
c[28](
|
1260
|
-
/*livenessError*/
|
1261
|
-
c[19]
|
1262
|
-
) + "") && V(l, n);
|
1263
|
-
},
|
1264
|
-
d(c) {
|
1265
|
-
c && S(e);
|
1266
|
-
}
|
1267
|
-
};
|
1268
|
-
}
|
1269
|
-
function Ts(i) {
|
1270
|
-
let e, t, s, o = H() && /*waitingIdrndCaptureEvent*/
|
1271
|
-
i[18], n, l = (H() && /*idrndLoading*/
|
1272
|
-
(i[16] || !/*$ready*/
|
1273
|
-
i[21]) || !H() && !/*$ready*/
|
1274
|
-
i[21]) && /*$cameraStatusStore*/
|
1275
|
-
i[20] === j.OK, r, c, u, f, v, b, d = (
|
1276
|
-
/*$videoStore*/
|
1277
|
-
i[31] && Ei(i)
|
1278
|
-
), E = o && Ti(i), g = l && Oi(i), p = (
|
1279
|
-
/*$captured*/
|
1280
|
-
i[23] && Ri(i)
|
1281
|
-
);
|
1282
|
-
const k = [fs, us], T = [];
|
1283
|
-
function F(A, B) {
|
1284
|
-
return (!/*idrndClosed*/
|
1285
|
-
A[17] || /*$captured*/
|
1286
|
-
A[23]) && /*showUnconformities*/
|
1287
|
-
A[3] ? 0 : (
|
1288
|
-
/*$cameraStatusStore*/
|
1289
|
-
A[20] !== j.OK ? 1 : -1
|
1290
|
-
);
|
1291
|
-
}
|
1292
|
-
return ~(u = F(i)) && (f = T[u] = k[u](i)), {
|
1293
|
-
c() {
|
1294
|
-
e = C("div"), t = C("div"), d && d.c(), s = U(), E && E.c(), n = U(), g && g.c(), r = U(), p && p.c(), c = U(), f && f.c(), v = fa(), this.c = x, m(t, "class", "relative mx-auto"), m(e, "class", "flex flex-col justify-between");
|
1295
|
-
},
|
1296
|
-
m(A, B) {
|
1297
|
-
L(A, e, B), _(e, t), d && d.m(t, null), _(t, s), E && E.m(t, null), _(t, n), g && g.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, v, B), b = !0;
|
1298
|
-
},
|
1299
|
-
p(A, B) {
|
1300
|
-
/*$videoStore*/
|
1301
|
-
A[31] ? d ? (d.p(A, B), B[1] & /*$videoStore*/
|
1302
|
-
1 && J(d, 1)) : (d = Ei(A), d.c(), J(d, 1), d.m(t, s)) : d && (lt(), Z(d, 1, 1, () => {
|
1303
|
-
d = null;
|
1304
|
-
}), rt()), B[0] & /*waitingIdrndCaptureEvent*/
|
1305
|
-
262144 && (o = H() && /*waitingIdrndCaptureEvent*/
|
1306
|
-
A[18]), o ? E ? E.p(A, B) : (E = Ti(A), E.c(), E.m(t, n)) : E && (E.d(1), E = null), B[0] & /*idrndLoading, $ready, $cameraStatusStore*/
|
1307
|
-
3211264 && (l = (H() && /*idrndLoading*/
|
1308
|
-
(A[16] || !/*$ready*/
|
1309
|
-
A[21]) || !H() && !/*$ready*/
|
1310
|
-
A[21]) && /*$cameraStatusStore*/
|
1311
|
-
A[20] === j.OK), l ? g ? g.p(A, B) : (g = Oi(A), g.c(), g.m(t, r)) : g && (g.d(1), g = null), /*$captured*/
|
1312
|
-
A[23] ? p ? p.p(A, B) : (p = Ri(A), p.c(), p.m(t, null)) : p && (p.d(1), p = null);
|
1313
|
-
let W = u;
|
1314
|
-
u = F(A), u === W ? ~u && T[u].p(A, B) : (f && (lt(), Z(T[W], 1, 1, () => {
|
1315
|
-
T[W] = null;
|
1316
|
-
}), rt()), ~u ? (f = T[u], f ? f.p(A, B) : (f = T[u] = k[u](A), f.c()), J(f, 1), f.m(v.parentNode, v)) : f = null);
|
1317
|
-
},
|
1318
|
-
i(A) {
|
1319
|
-
b || (J(d), J(f), b = !0);
|
1320
|
-
},
|
1321
|
-
o(A) {
|
1322
|
-
Z(d), Z(f), b = !1;
|
1323
|
-
},
|
1324
|
-
d(A) {
|
1325
|
-
A && S(e), d && d.d(), E && E.d(), g && g.d(), p && p.d(), i[52](null), A && S(c), ~u && T[u].d(A), A && S(v);
|
1326
|
-
}
|
1327
|
-
};
|
1328
|
-
}
|
1329
|
-
let Os = 0, Rs = 3e3;
|
1330
|
-
function ks() {
|
1331
|
-
({}).VITE_USE_DEV === "true" ? import("./index-no-detector_281a271b_3.0.0.js") : import("./index-no-detector_56051121_3.0.0.js");
|
1332
|
-
}
|
1333
|
-
function As(i, e, t) {
|
1334
|
-
const s = e.videoWidth / e.videoHeight, o = t.width / t.height;
|
1335
|
-
let n = 0, l = 0, r = e.videoWidth, c = e.videoHeight;
|
1336
|
-
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);
|
1337
|
-
}
|
1338
|
-
function Is(i, e, t) {
|
1339
|
-
let s, o, n, l, r, c, u, f, v, b, d, E, g, p, k, T, F, A, B, W, R, y, X, $, ce, le, ke, dt, ae, Kt, ht, mt, _t, qt, zt, Jt;
|
1340
|
-
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, v = a)), I(i, Se, (a) => t(23, b = a)), I(i, fi, (a) => t(79, d = a)), I(i, Dt, (a) => t(80, E = a)), I(i, di, (a) => t(81, g = 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, ga, (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, ba, (a) => t(28, X = a)), I(i, Ce, (a) => t(29, $ = a)), I(i, hi, (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, mi, (a) => t(92, mt = a)), I(i, _i, (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));
|
1341
|
-
let D, te, ue, Xt, Qt = !1, Ae = !1, gt = !1, bt = !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;
|
1342
|
-
const Ue = pi(!1);
|
1343
|
-
I(i, Ue, (a) => t(74, o = a));
|
1344
|
-
const Le = pi("data:image/png;base64");
|
1345
|
-
I(i, Le, (a) => t(30, ce = a));
|
1346
|
-
let { widgetInstance: Q } = e, De = !1, Rt = !1, Ve = !0, ne = !0, ye = !1, ti = 0, ie = "", kt = 0, je = !0, ii = 0;
|
1347
|
-
const He = Ea.mixin({
|
1348
|
-
toast: !0,
|
1349
|
-
position: "bottom-left",
|
1350
|
-
timer: 13e3,
|
1351
|
-
timerProgressBar: !0
|
1352
|
-
});
|
1353
|
-
ya(async () => {
|
1354
|
-
if (h(Ze, ke = !0, ke), h(Ge, r = !1, r), si(), le)
|
1355
|
-
try {
|
1356
|
-
await Ta(yt), Qt = !0, Xt = await Oa();
|
1357
|
-
} catch {
|
1358
|
-
h(hi, le = !1, le), t(0, Tt = !0);
|
1359
|
-
}
|
1360
|
-
H() ? (ks(), Pi()) : await pe(), _e() || Wi();
|
1361
|
-
});
|
1362
|
-
async function ai() {
|
1363
|
-
const [a, w] = (Ct ?? "")?.replaceAll(" ", "")?.split("x")?.map((O) => O ? parseInt(O) : void 0);
|
1364
|
-
!a || !w || (_e() ? (await Ma(), h(
|
1365
|
-
Me,
|
1366
|
-
ae = {
|
1367
|
-
videoWidth: window.innerWidth,
|
1368
|
-
videoHeight: window.innerHeight
|
1369
|
-
},
|
1370
|
-
ae
|
1371
|
-
)) : h(Me, ae = { videoWidth: a, videoHeight: w }, ae));
|
1372
|
-
}
|
1373
|
-
function si() {
|
1374
|
-
h(Qe, n = !1, n), h(Se, b = !1, b), h(Ye, u = Pt.FRONT_CAMERA, u), Ot && h(di, g = !1, g), h(Ft, B = !1, B), h(ee, y = K.OK, y), h(Pe, T = "", T), h(Ce, $.unconformities = [], $);
|
1375
|
-
const a = nt(Bt);
|
1376
|
-
a.closedMouth = !1, a.isPersonCloseEnough = !1, a.isPersonTooclose = !0, a.isPersonInFrame = !1, Bt.set(a), h(we, F = "", F);
|
1377
|
-
}
|
1378
|
-
function Pi() {
|
1379
|
-
Q.addEventListener("open", (a) => {
|
1380
|
-
const w = a.detail[0].video;
|
1381
|
-
h(
|
1382
|
-
_i,
|
1383
|
-
_t = {
|
1384
|
-
width: w.videoWidth,
|
1385
|
-
height: w.videoHeight
|
1386
|
-
},
|
1387
|
-
_t
|
1388
|
-
), t(11, D.srcObject = w.srcObject, D), t(16, Ve = !1), Ra(Q);
|
1389
|
-
function O() {
|
1390
|
-
ne || Be(D, O, !0);
|
1391
|
-
}
|
1392
|
-
O();
|
1393
|
-
}), Q.addEventListener("error", (a) => {
|
1394
|
-
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);
|
1395
|
-
}), Q.addEventListener("faceDetection", (a) => {
|
1396
|
-
}), Q.addEventListener("close", async (a) => {
|
1397
|
-
b || (De = !1), t(17, ne = !0), t(18, ye = !1), l === j.OK && h(Y, l = j.CAMERA_CLOSED_ERROR, l);
|
1398
|
-
}), Q.addEventListener("initialize", async (a) => {
|
1399
|
-
Rt = !0, h(mi, mt = !0, mt), dt === $e.Face && !De && !b && Rt && await At();
|
1400
|
-
}), Q.addEventListener("capture", async (a) => {
|
1401
|
-
t(19, ie = "");
|
1402
|
-
const { encryptedFile: w, photo: O } = a.detail[0];
|
1403
|
-
h(xe, ht = w, ht);
|
1404
|
-
const P = (await et(O)).split(",");
|
1405
|
-
if (le)
|
1406
|
-
try {
|
1407
|
-
let z = await ka(O);
|
1408
|
-
if (!await gi(z)) {
|
1409
|
-
console.warn("Liveness capture - face not detected! Resetting capture.");
|
1410
|
-
return;
|
1411
|
-
}
|
1412
|
-
} catch (z) {
|
1413
|
-
console.warn(z);
|
1414
|
-
} finally {
|
1415
|
-
t(18, ye = !1);
|
1416
|
-
}
|
1417
|
-
if (t(18, ye = !1), h(ee, y = K.OK, y), h(Ce, $.isLoading = !0, $), h(Se, b = !0, b), De = !1, h(Le, ce = P[0], ce), h(me, R = P[1], R), h(Pe, T = P[1], T), !Kt) {
|
1418
|
-
let z, re, It, Je;
|
1419
|
-
try {
|
1420
|
-
if (!bi(Ie))
|
1421
|
-
throw new Error("FACE_TOO_SMALL");
|
1422
|
-
({ bodyParts: z, icaoWarnings: re } = await tt(T, fe, (await et(w)).split(",")[1])), window.dispatchEvent(new CustomEvent(
|
1423
|
-
"face-unconformities-validated",
|
1424
|
-
{
|
1425
|
-
detail: {
|
1426
|
-
bodyParts: z,
|
1427
|
-
icaoWarnings: re,
|
1428
|
-
status: y
|
1429
|
-
}
|
1430
|
-
}
|
1431
|
-
));
|
1432
|
-
} catch (se) {
|
1433
|
-
console.error(se);
|
1434
|
-
let Oe = Ee.UNKNOWN, Xe = [], ui = [];
|
1435
|
-
se instanceof Wt && se.response?.status === 400 ? se.response.data && Array.isArray(se.response.data.bodyParts) ? (Xe = se.response.data.bodyParts, ui = 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 = K.LIVENESS_DETECTION_FAILURE, y), t(19, ie = Ee[Oe]), console.error("Liveness error:", Oe)) : h(ee, y = K.TEMPLATE_EXTRACTION_ERROR, y) : se instanceof Error && ["FACE_NOT_FOUND", "FACE_TOO_SMALL"].includes(se.message) ? (h(ee, y = K.LIVENESS_DETECTION_FAILURE, y), Oe = se.message, t(19, ie = Ee[Oe]), Xe = ri()) : fe && He.fire({
|
1436
|
-
icon: "error",
|
1437
|
-
title: "Falha ao comunicar com serviço de Liveness"
|
1438
|
-
}), h(Ce, $.isLoading = !1, $), window.dispatchEvent(new CustomEvent(
|
1439
|
-
"face-unconformities-validated",
|
1440
|
-
{
|
1441
|
-
detail: {
|
1442
|
-
bodyParts: Xe,
|
1443
|
-
errorCode: Oe,
|
1444
|
-
translatedError: X(ie),
|
1445
|
-
status: y,
|
1446
|
-
icaoWarnings: ui,
|
1447
|
-
invalidLivenessCounter: It,
|
1448
|
-
invalidLivenessLimit: Je
|
1449
|
-
}
|
1450
|
-
}
|
1451
|
-
));
|
1452
|
-
return;
|
1453
|
-
}
|
1454
|
-
if (y !== K.OK) {
|
1455
|
-
h(Ce, $.isLoading = !1, $);
|
1456
|
-
return;
|
1457
|
-
}
|
1458
|
-
z[0].livenessResult && ni(z[0].livenessResult), z.length !== 0 && z[0].data && h(me, R = z[0].data, R), it(re);
|
1459
|
-
return;
|
1460
|
-
}
|
1461
|
-
let N, G;
|
1462
|
-
try {
|
1463
|
-
G = await Aa(w), ni(G.data);
|
1464
|
-
} catch (z) {
|
1465
|
-
h(ee, y = K.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 = K.LIVENESS_DETECTION_FAILURE, y)) : He.fire({
|
1466
|
-
icon: "error",
|
1467
|
-
title: "Falha ao comunicar com serviço de Liveness"
|
1468
|
-
});
|
1469
|
-
}
|
1470
|
-
if (y !== K.OK) {
|
1471
|
-
h(Ce, $.isLoading = !1, $), window.dispatchEvent(new CustomEvent(
|
1472
|
-
"face-unconformities-validated",
|
1473
|
-
{
|
1474
|
-
detail: {
|
1475
|
-
bodyParts: [
|
1476
|
-
{
|
1477
|
-
bodyPart: "FACE",
|
1478
|
-
data: T,
|
1479
|
-
livenessBlob: (await et(w)).split(",")[1],
|
1480
|
-
...G && { livenessResult: G }
|
1481
|
-
}
|
1482
|
-
],
|
1483
|
-
...N && { errorCode: N },
|
1484
|
-
...ie && { translatedError: X(ie) },
|
1485
|
-
status: y
|
1486
|
-
}
|
1487
|
-
}
|
1488
|
-
));
|
1489
|
-
return;
|
1490
|
-
}
|
1491
|
-
let { bodyParts: de, icaoWarnings: Fe } = await tt(T, fe);
|
1492
|
-
window.dispatchEvent(new CustomEvent(
|
1493
|
-
"face-unconformities-validated",
|
1494
|
-
{
|
1495
|
-
detail: {
|
1496
|
-
bodyParts: de,
|
1497
|
-
icaoWarnings: Fe,
|
1498
|
-
status: y,
|
1499
|
-
errorCode: N,
|
1500
|
-
...ie && { translatedError: X(ie) }
|
1501
|
-
}
|
1502
|
-
}
|
1503
|
-
)), de[0].data && h(me, R = de[0].data, R), it(Fe);
|
1504
|
-
});
|
1505
|
-
}
|
1506
|
-
async function pe(a) {
|
1507
|
-
if (!je) {
|
1508
|
-
h(Y, l = j.CAMERA_ORIENTATION_PORTRAIT, l);
|
1509
|
-
return;
|
1510
|
-
}
|
1511
|
-
await ai(), H() ? At() : await Bi(ae.videoWidth, ae.videoHeight, a);
|
1512
|
-
}
|
1513
|
-
async function At() {
|
1514
|
-
if (H()) {
|
1515
|
-
if (await ai(), !v[0]?.deviceId) {
|
1516
|
-
try {
|
1517
|
-
await vi(640, 480);
|
1518
|
-
} catch (a) {
|
1519
|
-
const w = a, O = Re(a) && a.constraint ? a.constraint : "";
|
1520
|
-
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);
|
1521
|
-
}
|
1522
|
-
await Mt(), h(he, f = v[0].deviceId, f);
|
1523
|
-
}
|
1524
|
-
h(Y, l = j.OK, l), Q && "openCamera" in Q && Q.openCamera(), De = !0, t(17, ne = !1), t(16, Ve = !0);
|
1525
|
-
}
|
1526
|
-
}
|
1527
|
-
async function Ke() {
|
1528
|
-
if (le && !Qt)
|
1529
|
-
return Be(D, Ke);
|
1530
|
-
if (D) {
|
1531
|
-
if (dt !== $e.Face && !Et)
|
1532
|
-
return Be(D, Ke);
|
1533
|
-
h(Ge, r = !0, r), h(Ze, ke = !1, ke), le && (o || h(Ue, o = !0, o)), Be(D, Ke);
|
1534
|
-
}
|
1535
|
-
}
|
1536
|
-
async function oi() {
|
1537
|
-
if (h(ee, y = K.OK, y), H()) {
|
1538
|
-
t(18, ye = !0), Q.takePhoto();
|
1539
|
-
return;
|
1540
|
-
}
|
1541
|
-
let a = null;
|
1542
|
-
if (le && (a = await Mi(), !await gi(a))) {
|
1543
|
-
console.warn("Face capture - face not detected! Resetting capture.");
|
1544
|
-
return;
|
1545
|
-
}
|
1546
|
-
h(Se, b = !0, b);
|
1547
|
-
try {
|
1548
|
-
if (le && a) {
|
1549
|
-
const w = a.toDataURL("image/jpeg").split(",");
|
1550
|
-
h(Le, ce = w[0], ce), h(me, R = w[1], R), h(Pe, T = w[1], T);
|
1551
|
-
let O, P;
|
1552
|
-
if (!bi(Ie))
|
1553
|
-
throw new Error("FACE_TOO_SMALL");
|
1554
|
-
({ bodyParts: O, icaoWarnings: P } = await tt(R, fe)), window.dispatchEvent(new CustomEvent(
|
1555
|
-
"face-unconformities-validated",
|
1556
|
-
{
|
1557
|
-
detail: {
|
1558
|
-
bodyParts: O,
|
1559
|
-
icaoWarnings: P,
|
1560
|
-
status: y
|
1561
|
-
}
|
1562
|
-
}
|
1563
|
-
)), O.length !== 0 && O[0].data && h(me, R = O[0].data, R), it(P);
|
1564
|
-
} else {
|
1565
|
-
const w = document.createElement("canvas"), O = w.getContext("2d");
|
1566
|
-
w.width = D.width, w.height = D.height, O?.drawImage(D, 0, 0, w.width, w.height);
|
1567
|
-
const P = w.toDataURL("image/jpeg").split(",");
|
1568
|
-
h(Le, ce = P[0], ce), h(me, R = P[1], R), h(Pe, T = P[1], T);
|
1569
|
-
let { bodyParts: N, icaoWarnings: G } = await tt(R, fe);
|
1570
|
-
window.dispatchEvent(new CustomEvent(
|
1571
|
-
"face-unconformities-validated",
|
1572
|
-
{
|
1573
|
-
detail: {
|
1574
|
-
bodyParts: N,
|
1575
|
-
icaoWarnings: G,
|
1576
|
-
status: y
|
1577
|
-
}
|
1578
|
-
}
|
1579
|
-
)), N.length !== 0 && N[0].data && h(me, R = N[0].data, R), it(G);
|
1580
|
-
}
|
1581
|
-
} catch (w) {
|
1582
|
-
console.error(w);
|
1583
|
-
let O = Ee.UNKNOWN, P = [], N = [];
|
1584
|
-
if (w instanceof Wt && w.response?.status === 400)
|
1585
|
-
if (w.response.data && Array.isArray(w.response.data.bodyParts)) {
|
1586
|
-
P = w.response.data.bodyParts, N = w.response.data.icaoWarnings;
|
1587
|
-
const G = P.find((de) => de.livenessResult.error);
|
1588
|
-
O = G?.livenessResult.error_code, h(ee, y = K.LIVENESS_DETECTION_FAILURE, y), G?.livenessResult.error_code || h(ee, y = K.UNKNOWN_LIVENESS_ERROR, y), t(19, ie = Ee[O]), console.error("Liveness error:", O);
|
1589
|
-
} else
|
1590
|
-
h(ee, y = K.TEMPLATE_EXTRACTION_ERROR, y);
|
1591
|
-
else
|
1592
|
-
w instanceof Error && ["FACE_NOT_FOUND", "FACE_TOO_SMALL"].includes(w.message) ? (h(ee, y = K.LIVENESS_DETECTION_FAILURE, y), O = w.message, t(19, ie = Ee[O]), P = ri()) : (h(ee, y = K.UNABLE_TO_COMMUNICATE_WITH_TEMPLATE_EXTRACTION_SERVICE, y), fe && He.fire({
|
1593
|
-
icon: "error",
|
1594
|
-
title: "Falha ao comunicar com serviço de Liveness"
|
1595
|
-
}));
|
1596
|
-
h(Ce, $.isLoading = !1, $), window.dispatchEvent(new CustomEvent(
|
1597
|
-
"face-unconformities-validated",
|
1598
|
-
{
|
1599
|
-
detail: {
|
1600
|
-
bodyParts: P,
|
1601
|
-
errorCode: O,
|
1602
|
-
translatedError: X(ie),
|
1603
|
-
status: y,
|
1604
|
-
icaoWarnings: N
|
1605
|
-
}
|
1606
|
-
}
|
1607
|
-
));
|
1608
|
-
}
|
1609
|
-
}
|
1610
|
-
function qe() {
|
1611
|
-
const a = {
|
1612
|
-
bodyPart: "FACE",
|
1613
|
-
data: R,
|
1614
|
-
justification: W
|
1615
|
-
};
|
1616
|
-
h(Ft, B = !0, B), nt(xe) && et(nt(xe)).then((w) => {
|
1617
|
-
a.livenessBlob = w.split(",")[1];
|
1618
|
-
}), window.dispatchEvent(new CustomEvent("export-face", { detail: a }));
|
1619
|
-
}
|
1620
|
-
function Te() {
|
1621
|
-
window.dispatchEvent(new CustomEvent("face-scrapped")), si(), ne && At();
|
1622
|
-
}
|
1623
|
-
function ni(a) {
|
1624
|
-
let w = "", O = "success";
|
1625
|
-
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 });
|
1626
|
-
}
|
1627
|
-
async function Bi(a, w, O) {
|
1628
|
-
try {
|
1629
|
-
const { stream: P, deviceId: N } = await vi(pt.width, pt.height, u, O);
|
1630
|
-
h(fi, d = P, d), h(he, f = N || v[0].deviceId, f);
|
1631
|
-
} catch (P) {
|
1632
|
-
const N = P, G = Re(P) && P.constraint ? P.constraint : "";
|
1633
|
-
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));
|
1634
|
-
}
|
1635
|
-
}
|
1636
|
-
async function ze() {
|
1637
|
-
h(he, f = "", f), await pe();
|
1638
|
-
}
|
1639
|
-
function Wi() {
|
1640
|
-
navigator.mediaDevices.ondevicechange = async (a) => {
|
1641
|
-
a.type == "devicechange" && (await Mt(), l !== j.OK ? await ze() : (!H() && !d.active || H() && !ne) && (at(Q), h(Y, l = j.DEVICE_NOT_FOUND_ERROR, l), t(17, ne = !0)));
|
1642
|
-
};
|
1643
|
-
}
|
1644
|
-
async function li() {
|
1645
|
-
h(Qe, n = !1, n);
|
1646
|
-
const a = (/* @__PURE__ */ new Date()).getTime();
|
1647
|
-
if (a - vt > 5e3) {
|
1648
|
-
vt = a;
|
1649
|
-
try {
|
1650
|
-
const O = await Ua(D);
|
1651
|
-
if (O < 50) {
|
1652
|
-
h(we, F = "faceCollector.illuminationTooLow", F);
|
1653
|
-
return;
|
1654
|
-
}
|
1655
|
-
if (O > 180) {
|
1656
|
-
h(we, F = "faceCollector.illuminationTooHigh", F);
|
1657
|
-
return;
|
1658
|
-
}
|
1659
|
-
} catch (O) {
|
1660
|
-
console.warn("An error occurred while getting the video lighting level: ", O);
|
1661
|
-
}
|
1662
|
-
try {
|
1663
|
-
if (await Va(D) < 4.5) {
|
1664
|
-
h(we, F = "faceCollector.lowSharpness", F);
|
1665
|
-
return;
|
1666
|
-
}
|
1667
|
-
} catch (O) {
|
1668
|
-
console.warn("An error occurred while getting the video sharpness level: ", O);
|
1669
|
-
}
|
1670
|
-
h(we, F = "faceCollector.faceWasNotFound", F);
|
1671
|
-
} else
|
1672
|
-
gt || (gt = !0, setTimeout(
|
1673
|
-
() => {
|
1674
|
-
let O = [
|
1675
|
-
"faceCollector.faceWasNotFound",
|
1676
|
-
"faceCollector.illuminationTooLow",
|
1677
|
-
"faceCollector.lowSharpness",
|
1678
|
-
"faceCollector.illuminationTooHigh"
|
1679
|
-
];
|
1680
|
-
gt = !1, t(15, bt = !1), F && !O.includes(F) && h(we, F = "", F);
|
1681
|
-
},
|
1682
|
-
1500
|
1683
|
-
));
|
1684
|
-
}
|
1685
|
-
function ri() {
|
1686
|
-
return [
|
1687
|
-
{
|
1688
|
-
bodyPart: "FACE",
|
1689
|
-
data: T,
|
1690
|
-
format: "jpg",
|
1691
|
-
capturedEyeToEyeDist: k,
|
1692
|
-
minEyeToEyeDist: Ie
|
1693
|
-
}
|
1694
|
-
];
|
1695
|
-
}
|
1696
|
-
async function Mi() {
|
1697
|
-
const a = D.width, w = D.height, O = pt.height, P = w / a * O, N = document.createElement("canvas"), G = N.getContext("2d");
|
1698
|
-
N.width = O, N.height = P;
|
1699
|
-
const de = N.width / D.width, Fe = N.height / D.height, z = new xa({
|
1700
|
-
x: p.x * de,
|
1701
|
-
y: p.y * Fe,
|
1702
|
-
width: p.width * de,
|
1703
|
-
height: p.height * Fe
|
1704
|
-
}), re = document.createElement("canvas");
|
1705
|
-
re.width = z.width, re.height = z.height, re.getContext("2d")?.clearRect(0, 0, re.width, re.height), G && As(G, D, N);
|
1706
|
-
const [Je] = await (await import("./face_api_0e3ce8c8_3.0.0.js")).extractFaces(N, [z]);
|
1707
|
-
return Je;
|
1708
|
-
}
|
1709
|
-
const Ui = Bt.subscribe((a) => {
|
1710
|
-
let w = "";
|
1711
|
-
if (a.isPersonCloseEnough ? a.isPersonTooclose ? w = "faceCollector.moveAwayCamera" : a.isPersonInFrame ? a.closedMouth || (w = "faceCollector.dontOpenMouth") : w = "faceCollector.stayInFrame" : w = "faceCollector.comeCloserCamera", n && Ia(w), !b && g && n && !Ae && a.isPersonInFrame && a.closedMouth && !(!a.isPersonCloseEnough || a.isPersonTooclose)) {
|
1712
|
-
t(14, Ae = !0), ii = (/* @__PURE__ */ new Date()).getTime() + Rs;
|
1713
|
-
const O = setInterval(
|
1714
|
-
async () => {
|
1715
|
-
if (!g || b || ye || H() && ne || !a.isPersonCloseEnough || a.isPersonTooclose || !a.closedMouth || !a.isPersonInFrame) {
|
1716
|
-
t(14, Ae = !1), setTimeout(
|
1717
|
-
() => {
|
1718
|
-
},
|
1719
|
-
1500
|
1720
|
-
), clearInterval(O);
|
1721
|
-
return;
|
1722
|
-
}
|
1723
|
-
const P = (/* @__PURE__ */ new Date()).getTime();
|
1724
|
-
Math.floor((ii - P) % (1e3 * 60) / 1e3) <= 0 && (clearInterval(O), t(14, Ae = !1), oi());
|
1725
|
-
},
|
1726
|
-
100
|
1727
|
-
);
|
1728
|
-
}
|
1729
|
-
}), Vi = Se.subscribe((a) => {
|
1730
|
-
ue && (a ? (ue.classList.remove("flex"), ue.classList.add("hidden")) : (ue.classList.add("flex"), ue.classList.remove("hidden")));
|
1731
|
-
}), ji = Dt.subscribe((a) => {
|
1732
|
-
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));
|
1733
|
-
});
|
1734
|
-
St.subscribe(async (a) => {
|
1735
|
-
a === $e.Face && (await Mt(), H() && h(he, f = v[0]?.deviceId, f));
|
1736
|
-
});
|
1737
|
-
const Hi = he.subscribe(async (a) => {
|
1738
|
-
if (!(!H() && !d || !a || H() && ne))
|
1739
|
-
try {
|
1740
|
-
if (H()) {
|
1741
|
-
await at(Q), await pe();
|
1742
|
-
return;
|
1743
|
-
}
|
1744
|
-
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) => {
|
1745
|
-
w.readyState === "live" && console.log(`Camera ${w.label} opened successfully!`);
|
1746
|
-
}), h(Y, l = j.OK, l), La(D);
|
1747
|
-
} catch (w) {
|
1748
|
-
const O = w;
|
1749
|
-
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);
|
1750
|
-
}
|
1751
|
-
}), Ki = St.subscribe(async (a) => {
|
1752
|
-
a === $e.Face && H() && !De && !b && Rt && await pe();
|
1753
|
-
}), qi = Ue.subscribe(async (a) => {
|
1754
|
-
a && ci();
|
1755
|
-
}), zi = Da.subscribe(async (a) => {
|
1756
|
-
if (v[0]?.deviceId) {
|
1757
|
-
if (at(), !_e() || H()) {
|
1758
|
-
const O = (v.findIndex((N) => N.deviceId === f) + 1) % v.length, P = v[O].deviceId;
|
1759
|
-
H() ? h(he, f = P, f) : await pe(P);
|
1760
|
-
return;
|
1761
|
-
}
|
1762
|
-
a ? (h(Ye, u = Pt.REAR_CAMERA, u), await pe()) : (h(Ye, u = Pt.FRONT_CAMERA, u), await pe());
|
1763
|
-
}
|
1764
|
-
}), Ji = Fa.subscribe(async (a) => {
|
1765
|
-
!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));
|
1766
|
-
});
|
1767
|
-
async function ci() {
|
1768
|
-
let a;
|
1769
|
-
try {
|
1770
|
-
if (kt >= Os) {
|
1771
|
-
kt = 0;
|
1772
|
-
let w;
|
1773
|
-
if (w = Ga(D, Xt), a = await w.withFaceLandmarks(), te.getContext("2d")?.clearRect(0, 0, te.width, te.height), a != null) {
|
1774
|
-
const O = Ya(te, D, !0);
|
1775
|
-
Na(te, D, O);
|
1776
|
-
const P = Za(a, O);
|
1777
|
-
Sa(P) ? (Pa(P, te, wt), h(Qe, n = !0, n), t(15, bt = !0), vt = (/* @__PURE__ */ new Date()).getTime()) : li();
|
1778
|
-
} else
|
1779
|
-
li();
|
1780
|
-
} else
|
1781
|
-
kt++;
|
1782
|
-
} catch (w) {
|
1783
|
-
console.warn(`FaceapiLoop: ${w}`);
|
1784
|
-
} finally {
|
1785
|
-
o && Be(D, ci);
|
1786
|
-
}
|
1787
|
-
}
|
1788
|
-
Lt.subscribe(async (a) => {
|
1789
|
-
a && (Te(), h(Lt, s = !1, s));
|
1790
|
-
});
|
1791
|
-
const Xi = Ge.subscribe((a) => {
|
1792
|
-
a && window.dispatchEvent(new CustomEvent("brycc-camera-ready"));
|
1793
|
-
}), Qi = Ze.subscribe((a) => {
|
1794
|
-
a && window.dispatchEvent(new CustomEvent("brycc-face-initialized"));
|
1795
|
-
});
|
1796
|
-
Ba(() => {
|
1797
|
-
console.log("Destroying face collector"), at(Q), Vi(), Ui(), ji(), Hi(), Ki(), clearInterval(ti), qi(), zi(), Ji(), Xi(), Qi(), ti = 0;
|
1798
|
-
});
|
1799
|
-
function Gi(a) {
|
1800
|
-
ot[a ? "unshift" : "push"](() => {
|
1801
|
-
Q = a, t(1, Q);
|
1802
|
-
});
|
1803
|
-
}
|
1804
|
-
function Yi(a) {
|
1805
|
-
ot[a ? "unshift" : "push"](() => {
|
1806
|
-
D = a, t(11, D);
|
1807
|
-
});
|
1808
|
-
}
|
1809
|
-
const Zi = () => {
|
1810
|
-
H() || (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));
|
1811
|
-
};
|
1812
|
-
function xi(a) {
|
1813
|
-
ot[a ? "unshift" : "push"](() => {
|
1814
|
-
te = a, t(12, te);
|
1815
|
-
});
|
1816
|
-
}
|
1817
|
-
const $i = () => qe(), ea = () => Te();
|
1818
|
-
function ta(a) {
|
1819
|
-
ot[a ? "unshift" : "push"](() => {
|
1820
|
-
ue = a, t(13, ue);
|
1821
|
-
});
|
1822
|
-
}
|
1823
|
-
const ia = () => qe(), aa = () => Te();
|
1824
|
-
function sa() {
|
1825
|
-
W = this.value, Nt.set(W);
|
1826
|
-
}
|
1827
|
-
const oa = () => qe(), na = () => Te();
|
1828
|
-
function la() {
|
1829
|
-
W = this.value, Nt.set(W);
|
1830
|
-
}
|
1831
|
-
const ra = () => Te(), ca = async () => {
|
1832
|
-
await ze();
|
1833
|
-
};
|
1834
|
-
return i.$$set = (a) => {
|
1835
|
-
"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);
|
1836
|
-
}, [
|
1837
|
-
Tt,
|
1838
|
-
Q,
|
1839
|
-
fe,
|
1840
|
-
Gt,
|
1841
|
-
Yt,
|
1842
|
-
Ot,
|
1843
|
-
Zt,
|
1844
|
-
xt,
|
1845
|
-
$t,
|
1846
|
-
ei,
|
1847
|
-
Ke,
|
1848
|
-
D,
|
1849
|
-
te,
|
1850
|
-
ue,
|
1851
|
-
Ae,
|
1852
|
-
bt,
|
1853
|
-
Ve,
|
1854
|
-
ne,
|
1855
|
-
ye,
|
1856
|
-
ie,
|
1857
|
-
l,
|
1858
|
-
r,
|
1859
|
-
f,
|
1860
|
-
b,
|
1861
|
-
B,
|
1862
|
-
W,
|
1863
|
-
R,
|
1864
|
-
y,
|
1865
|
-
X,
|
1866
|
-
$,
|
1867
|
-
ce,
|
1868
|
-
ae,
|
1869
|
-
qt,
|
1870
|
-
zt,
|
1871
|
-
Jt,
|
1872
|
-
Ue,
|
1873
|
-
Le,
|
1874
|
-
oi,
|
1875
|
-
qe,
|
1876
|
-
Te,
|
1877
|
-
ze,
|
1878
|
-
wt,
|
1879
|
-
Ct,
|
1880
|
-
Et,
|
1881
|
-
yt,
|
1882
|
-
Ie,
|
1883
|
-
Gi,
|
1884
|
-
Yi,
|
1885
|
-
Zi,
|
1886
|
-
xi,
|
1887
|
-
$i,
|
1888
|
-
ea,
|
1889
|
-
ta,
|
1890
|
-
ia,
|
1891
|
-
aa,
|
1892
|
-
sa,
|
1893
|
-
oa,
|
1894
|
-
na,
|
1895
|
-
la,
|
1896
|
-
ra,
|
1897
|
-
ca
|
1898
|
-
];
|
1899
|
-
}
|
1900
|
-
class Ls extends Ut {
|
1901
|
-
constructor(e) {
|
1902
|
-
super(), Vt(
|
1903
|
-
this,
|
1904
|
-
{
|
1905
|
-
target: this.shadowRoot,
|
1906
|
-
props: Ht(this.attributes),
|
1907
|
-
customElement: !0
|
1908
|
-
},
|
1909
|
-
Is,
|
1910
|
-
Ts,
|
1911
|
-
jt,
|
1912
|
-
{
|
1913
|
-
enableMinutiae: 41,
|
1914
|
-
videoDimensions: 42,
|
1915
|
-
noTabs: 43,
|
1916
|
-
weightsPath: 44,
|
1917
|
-
evaluatePhoto: 2,
|
1918
|
-
showCaptureButton: 0,
|
1919
|
-
showUnconformities: 3,
|
1920
|
-
showConfigButton: 4,
|
1921
|
-
showAutoCaptureButton: 5,
|
1922
|
-
showCameraButton: 6,
|
1923
|
-
showJustificationField: 7,
|
1924
|
-
minEyeToEyeDist: 45,
|
1925
|
-
videoOverlay: 8,
|
1926
|
-
videoOverlayTransparency: 9,
|
1927
|
-
widgetInstance: 1,
|
1928
|
-
play: 10
|
1929
|
-
},
|
1930
|
-
null,
|
1931
|
-
[-1, -1, -1, -1]
|
1932
|
-
), e && (e.target && L(e.target, this, e.anchor), e.props && (this.$set(e.props), q()));
|
1933
|
-
}
|
1934
|
-
static get observedAttributes() {
|
1935
|
-
return [
|
1936
|
-
"enableMinutiae",
|
1937
|
-
"videoDimensions",
|
1938
|
-
"noTabs",
|
1939
|
-
"weightsPath",
|
1940
|
-
"evaluatePhoto",
|
1941
|
-
"showCaptureButton",
|
1942
|
-
"showUnconformities",
|
1943
|
-
"showConfigButton",
|
1944
|
-
"showAutoCaptureButton",
|
1945
|
-
"showCameraButton",
|
1946
|
-
"showJustificationField",
|
1947
|
-
"minEyeToEyeDist",
|
1948
|
-
"videoOverlay",
|
1949
|
-
"videoOverlayTransparency",
|
1950
|
-
"widgetInstance",
|
1951
|
-
"play"
|
1952
|
-
];
|
1953
|
-
}
|
1954
|
-
get enableMinutiae() {
|
1955
|
-
return this.$$.ctx[41];
|
1956
|
-
}
|
1957
|
-
set enableMinutiae(e) {
|
1958
|
-
this.$$set({ enableMinutiae: e }), q();
|
1959
|
-
}
|
1960
|
-
get videoDimensions() {
|
1961
|
-
return this.$$.ctx[42];
|
1962
|
-
}
|
1963
|
-
set videoDimensions(e) {
|
1964
|
-
this.$$set({ videoDimensions: e }), q();
|
1965
|
-
}
|
1966
|
-
get noTabs() {
|
1967
|
-
return this.$$.ctx[43];
|
1968
|
-
}
|
1969
|
-
set noTabs(e) {
|
1970
|
-
this.$$set({ noTabs: e }), q();
|
1971
|
-
}
|
1972
|
-
get weightsPath() {
|
1973
|
-
return this.$$.ctx[44];
|
1974
|
-
}
|
1975
|
-
set weightsPath(e) {
|
1976
|
-
this.$$set({ weightsPath: e }), q();
|
1977
|
-
}
|
1978
|
-
get evaluatePhoto() {
|
1979
|
-
return this.$$.ctx[2];
|
1980
|
-
}
|
1981
|
-
set evaluatePhoto(e) {
|
1982
|
-
this.$$set({ evaluatePhoto: e }), q();
|
1983
|
-
}
|
1984
|
-
get showCaptureButton() {
|
1985
|
-
return this.$$.ctx[0];
|
1986
|
-
}
|
1987
|
-
set showCaptureButton(e) {
|
1988
|
-
this.$$set({ showCaptureButton: e }), q();
|
1989
|
-
}
|
1990
|
-
get showUnconformities() {
|
1991
|
-
return this.$$.ctx[3];
|
1992
|
-
}
|
1993
|
-
set showUnconformities(e) {
|
1994
|
-
this.$$set({ showUnconformities: e }), q();
|
1995
|
-
}
|
1996
|
-
get showConfigButton() {
|
1997
|
-
return this.$$.ctx[4];
|
1998
|
-
}
|
1999
|
-
set showConfigButton(e) {
|
2000
|
-
this.$$set({ showConfigButton: e }), q();
|
2001
|
-
}
|
2002
|
-
get showAutoCaptureButton() {
|
2003
|
-
return this.$$.ctx[5];
|
2004
|
-
}
|
2005
|
-
set showAutoCaptureButton(e) {
|
2006
|
-
this.$$set({ showAutoCaptureButton: e }), q();
|
2007
|
-
}
|
2008
|
-
get showCameraButton() {
|
2009
|
-
return this.$$.ctx[6];
|
2010
|
-
}
|
2011
|
-
set showCameraButton(e) {
|
2012
|
-
this.$$set({ showCameraButton: e }), q();
|
2013
|
-
}
|
2014
|
-
get showJustificationField() {
|
2015
|
-
return this.$$.ctx[7];
|
2016
|
-
}
|
2017
|
-
set showJustificationField(e) {
|
2018
|
-
this.$$set({ showJustificationField: e }), q();
|
2019
|
-
}
|
2020
|
-
get minEyeToEyeDist() {
|
2021
|
-
return this.$$.ctx[45];
|
2022
|
-
}
|
2023
|
-
set minEyeToEyeDist(e) {
|
2024
|
-
this.$$set({ minEyeToEyeDist: e }), q();
|
2025
|
-
}
|
2026
|
-
get videoOverlay() {
|
2027
|
-
return this.$$.ctx[8];
|
2028
|
-
}
|
2029
|
-
set videoOverlay(e) {
|
2030
|
-
this.$$set({ videoOverlay: e }), q();
|
2031
|
-
}
|
2032
|
-
get videoOverlayTransparency() {
|
2033
|
-
return this.$$.ctx[9];
|
2034
|
-
}
|
2035
|
-
set videoOverlayTransparency(e) {
|
2036
|
-
this.$$set({ videoOverlayTransparency: e }), q();
|
2037
|
-
}
|
2038
|
-
get widgetInstance() {
|
2039
|
-
return this.$$.ctx[1];
|
2040
|
-
}
|
2041
|
-
set widgetInstance(e) {
|
2042
|
-
this.$$set({ widgetInstance: e }), q();
|
2043
|
-
}
|
2044
|
-
get play() {
|
2045
|
-
return this.$$.ctx[10];
|
2046
|
-
}
|
2047
|
-
}
|
2048
|
-
customElements.define("face-collector", Ls);
|
2049
|
-
export {
|
2050
|
-
Ls as default
|
2051
|
-
};
|