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