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