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