bry-biometric-collector 2.2.0 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CameraBtn_feceeea6_2.2.0.js → CameraBtn_6f8a02ac_2.2.2.js} +142 -152
- package/dist/DocumentCollector_7e26745c_2.2.2.js +1037 -0
- package/dist/FaceCollector_88417927_2.2.2.js +1641 -0
- package/dist/bry-biometric-collector-main.js +1 -1
- package/dist/{fingersApi_6e81733e_2.2.0.js → fingersApi_4f72b6e0_2.2.2.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{main_6691dc65_2.2.0.js → main_3ec3e90c_2.2.2.js} +3970 -4104
- package/package.json +1 -1
- package/dist/DocumentCollector_44ff30af_2.2.0.js +0 -1080
- package/dist/FaceCollector_e3d60e9c_2.2.0.js +0 -1682
- /package/dist/{en-us_46223587_2.2.0.js → en-us_46223587_2.2.2.js} +0 -0
- /package/dist/{face_api_0e3ce8c8_2.2.0.js → face_api_0e3ce8c8_2.2.2.js} +0 -0
- /package/dist/{index-no-detector_acb82d83_2.2.0.js → index-no-detector_acb82d83_2.2.2.js} +0 -0
- /package/dist/{pt-br_7b1f22cd_2.2.0.js → pt-br_7b1f22cd_2.2.2.js} +0 -0
@@ -0,0 +1,1037 @@
|
|
1
|
+
import { S as $t, r as ei, t as vt, w as ti, x as K, y as ae, C as ii, B as _, D as O, E as Ie, G as ee, H as u, I as c, J as Fe, K as Ct, L as le, M as yt, N as oe, O as Y, P as Le, Q as S, R as Ve, U as Pe, V as ue, T as Re, W as si, X as pe, Y as qe, _ as at, Z as li, ab as De, a2 as Ke, a3 as je, a4 as Ae, a5 as nt, a6 as rt, a8 as oi, a9 as Se, aa as Ye, ah as ct, $ as ai, ai as ni, aj as ri, ak as ci, al as ui, am as di, an as p, ao as Xe, ap as fi, ay as ut, az as hi, ax as Je, f as Te, aA as mi, aq as Qe, aB as bi, aC as ze, aD as gi, aE as _i, aF as we, aG as pi, aH as dt, aI as te, aJ as Oe, aK as H, aL as j, aO as ft, ar as Ge, aP as wi, aQ as ki, aR as ke, aM as Ze, aN as vi, l as Ci, aT as yi, aU as Ei, aV as ht, aW as mt, aY as Pi } from "./main_3ec3e90c_2.2.2.js";
|
2
|
+
import { a as Ri, C as G, c as ie, b as Di } from "./CameraBtn_6f8a02ac_2.2.2.js";
|
3
|
+
function bt(s) {
|
4
|
+
let e, t, l;
|
5
|
+
return {
|
6
|
+
c() {
|
7
|
+
e = _("video"), u(e, "id", "bry-cc-camera-video-tag"), e.hidden = /*$isLoadingAPP*/
|
8
|
+
s[17], u(e, "class", "absolute -z-10"), e.playsInline = !0, e.muted = !0, e.autoplay = !0;
|
9
|
+
},
|
10
|
+
m(o, r) {
|
11
|
+
K(o, e, r), s[40](e), t || (l = [
|
12
|
+
te(
|
13
|
+
e,
|
14
|
+
"canplay",
|
15
|
+
/*canplay_handler*/
|
16
|
+
s[41]
|
17
|
+
),
|
18
|
+
te(
|
19
|
+
e,
|
20
|
+
"play",
|
21
|
+
/*play*/
|
22
|
+
s[2],
|
23
|
+
{ once: !0 }
|
24
|
+
)
|
25
|
+
], t = !0);
|
26
|
+
},
|
27
|
+
p(o, r) {
|
28
|
+
r[0] & /*$isLoadingAPP*/
|
29
|
+
131072 && (e.hidden = /*$isLoadingAPP*/
|
30
|
+
o[17]);
|
31
|
+
},
|
32
|
+
d(o) {
|
33
|
+
o && Y(e), s[40](null), t = !1, Oe(l);
|
34
|
+
}
|
35
|
+
};
|
36
|
+
}
|
37
|
+
function gt(s) {
|
38
|
+
let e, t = (
|
39
|
+
/*$_*/
|
40
|
+
s[26]("faceCollector.stayStill") + ""
|
41
|
+
), l;
|
42
|
+
return {
|
43
|
+
c() {
|
44
|
+
e = _("span"), l = H(t), u(e, "class", "absolute left-1/2 -translate-x-1/2 top-[10%] ce-dui-badge ce-dui-badge-lg h-[2em] text-4xl 4xl:text-base w-[12.1em]");
|
45
|
+
},
|
46
|
+
m(o, r) {
|
47
|
+
K(o, e, r), c(e, l);
|
48
|
+
},
|
49
|
+
p(o, r) {
|
50
|
+
r[0] & /*$_*/
|
51
|
+
67108864 && t !== (t = /*$_*/
|
52
|
+
o[26]("faceCollector.stayStill") + "") && j(l, t);
|
53
|
+
},
|
54
|
+
d(o) {
|
55
|
+
o && Y(e);
|
56
|
+
}
|
57
|
+
};
|
58
|
+
}
|
59
|
+
function _t(s) {
|
60
|
+
let e, t = (
|
61
|
+
/*$_*/
|
62
|
+
s[26](`${/*faceValidationAlert*/
|
63
|
+
s[13]}`) + ""
|
64
|
+
), l;
|
65
|
+
return {
|
66
|
+
c() {
|
67
|
+
e = _("span"), l = H(t), u(e, "class", "absolute left-1/2 -translate-x-1/2 top-[10%] ce-dui-badge ce-dui-badge-lg h-[2em] text-4xl 4xl:text-base w-[12.1em]");
|
68
|
+
},
|
69
|
+
m(o, r) {
|
70
|
+
K(o, e, r), c(e, l);
|
71
|
+
},
|
72
|
+
p(o, r) {
|
73
|
+
r[0] & /*$_, faceValidationAlert*/
|
74
|
+
67117056 && t !== (t = /*$_*/
|
75
|
+
o[26](`${/*faceValidationAlert*/
|
76
|
+
o[13]}`) + "") && j(l, t);
|
77
|
+
},
|
78
|
+
d(o) {
|
79
|
+
o && Y(e);
|
80
|
+
}
|
81
|
+
};
|
82
|
+
}
|
83
|
+
function Ai(s) {
|
84
|
+
let e, t, l = (
|
85
|
+
/*$_*/
|
86
|
+
s[26]("faceCollector.finish") + ""
|
87
|
+
), o, r, n, a, d = (
|
88
|
+
/*$_*/
|
89
|
+
s[26]("faceCollector.retakePhoto") + ""
|
90
|
+
), h, g, w;
|
91
|
+
return {
|
92
|
+
c() {
|
93
|
+
e = _("div"), t = _("button"), o = H(l), n = O(), a = _("button"), h = H(d), t.disabled = r = /*$justification*/
|
94
|
+
s[20].length === 0, u(t, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), u(a, "id", "bry-cc-retake-button"), u(a, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), u(e, "class", "ce-dui-btn-group flex");
|
95
|
+
},
|
96
|
+
m(m, f) {
|
97
|
+
K(m, e, f), c(e, t), c(t, o), c(e, n), c(e, a), c(a, h), g || (w = [
|
98
|
+
te(
|
99
|
+
t,
|
100
|
+
"click",
|
101
|
+
/*click_handler_1*/
|
102
|
+
s[46]
|
103
|
+
),
|
104
|
+
te(
|
105
|
+
a,
|
106
|
+
"click",
|
107
|
+
/*click_handler_2*/
|
108
|
+
s[47]
|
109
|
+
)
|
110
|
+
], g = !0);
|
111
|
+
},
|
112
|
+
p(m, f) {
|
113
|
+
f[0] & /*$_*/
|
114
|
+
67108864 && l !== (l = /*$_*/
|
115
|
+
m[26]("faceCollector.finish") + "") && j(o, l), f[0] & /*$justification*/
|
116
|
+
1048576 && r !== (r = /*$justification*/
|
117
|
+
m[20].length === 0) && (t.disabled = r), f[0] & /*$_*/
|
118
|
+
67108864 && d !== (d = /*$_*/
|
119
|
+
m[26]("faceCollector.retakePhoto") + "") && j(h, d);
|
120
|
+
},
|
121
|
+
d(m) {
|
122
|
+
m && Y(e), g = !1, Oe(w);
|
123
|
+
}
|
124
|
+
};
|
125
|
+
}
|
126
|
+
function Si(s) {
|
127
|
+
let e, t, l, o, r;
|
128
|
+
function n(h, g) {
|
129
|
+
return (
|
130
|
+
/*$isLoading*/
|
131
|
+
h[27] ? Ii : Ti
|
132
|
+
);
|
133
|
+
}
|
134
|
+
let a = n(s), d = a(s);
|
135
|
+
return {
|
136
|
+
c() {
|
137
|
+
e = _("button"), d.c(), u(e, "id", "bry-cc-capture-btn"), e.disabled = t = !/*$faceFound*/
|
138
|
+
s[25] && /*$enableFaceApi*/
|
139
|
+
s[23] || !/*$ready*/
|
140
|
+
s[24] && !/*$enableFaceApi*/
|
141
|
+
s[23], e.hidden = l = !/*showCaptureButton*/
|
142
|
+
s[0], u(e, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-primary text-xl");
|
143
|
+
},
|
144
|
+
m(h, g) {
|
145
|
+
K(h, e, g), d.m(e, null), o || (r = te(
|
146
|
+
e,
|
147
|
+
"click",
|
148
|
+
/*click_handler*/
|
149
|
+
s[45]
|
150
|
+
), o = !0);
|
151
|
+
},
|
152
|
+
p(h, g) {
|
153
|
+
a === (a = n(h)) && d ? d.p(h, g) : (d.d(1), d = a(h), d && (d.c(), d.m(e, null))), g[0] & /*$faceFound, $enableFaceApi, $ready*/
|
154
|
+
58720256 && t !== (t = !/*$faceFound*/
|
155
|
+
h[25] && /*$enableFaceApi*/
|
156
|
+
h[23] || !/*$ready*/
|
157
|
+
h[24] && !/*$enableFaceApi*/
|
158
|
+
h[23]) && (e.disabled = t), g[0] & /*showCaptureButton*/
|
159
|
+
1 && l !== (l = !/*showCaptureButton*/
|
160
|
+
h[0]) && (e.hidden = l);
|
161
|
+
},
|
162
|
+
d(h) {
|
163
|
+
h && Y(e), d.d(), o = !1, r();
|
164
|
+
}
|
165
|
+
};
|
166
|
+
}
|
167
|
+
function Ti(s) {
|
168
|
+
let e = (
|
169
|
+
/*$_*/
|
170
|
+
s[26]("faceCollector.takePicture") + ""
|
171
|
+
), t;
|
172
|
+
return {
|
173
|
+
c() {
|
174
|
+
t = H(e);
|
175
|
+
},
|
176
|
+
m(l, o) {
|
177
|
+
K(l, t, o);
|
178
|
+
},
|
179
|
+
p(l, o) {
|
180
|
+
o[0] & /*$_*/
|
181
|
+
67108864 && e !== (e = /*$_*/
|
182
|
+
l[26]("faceCollector.takePicture") + "") && j(t, e);
|
183
|
+
},
|
184
|
+
d(l) {
|
185
|
+
l && Y(t);
|
186
|
+
}
|
187
|
+
};
|
188
|
+
}
|
189
|
+
function Ii(s) {
|
190
|
+
let e;
|
191
|
+
return {
|
192
|
+
c() {
|
193
|
+
e = H("Take picture");
|
194
|
+
},
|
195
|
+
m(t, l) {
|
196
|
+
K(t, e, l);
|
197
|
+
},
|
198
|
+
p: ee,
|
199
|
+
d(t) {
|
200
|
+
t && Y(e);
|
201
|
+
}
|
202
|
+
};
|
203
|
+
}
|
204
|
+
function Fi(s) {
|
205
|
+
let e, t, l, o, r, n = (
|
206
|
+
/*$isLoadingAPP*/
|
207
|
+
s[17] && pt(s)
|
208
|
+
);
|
209
|
+
return {
|
210
|
+
c() {
|
211
|
+
e = _("slot"), t = _("div"), l = _("img"), r = O(), n && n.c(), Ze(l.src, o = vi) || u(l, "src", o), u(l, "alt", "loading gif"), u(l, "class", "m-auto h-[10em] lg:h-[12em]"), u(t, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), u(e, "name", "obtaining-photo-gif"), u(e, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]");
|
212
|
+
},
|
213
|
+
m(a, d) {
|
214
|
+
K(a, e, d), c(e, t), c(t, l), c(t, r), n && n.m(t, null);
|
215
|
+
},
|
216
|
+
p(a, d) {
|
217
|
+
/*$isLoadingAPP*/
|
218
|
+
a[17] ? n ? n.p(a, d) : (n = pt(a), n.c(), n.m(t, null)) : n && (n.d(1), n = null);
|
219
|
+
},
|
220
|
+
i: ee,
|
221
|
+
o: ee,
|
222
|
+
d(a) {
|
223
|
+
a && Y(e), n && n.d();
|
224
|
+
}
|
225
|
+
};
|
226
|
+
}
|
227
|
+
function Li(s) {
|
228
|
+
let e, t;
|
229
|
+
return e = new Di({ props: { handler: (
|
230
|
+
/*func*/
|
231
|
+
s[55]
|
232
|
+
) } }), {
|
233
|
+
c() {
|
234
|
+
Ie(e.$$.fragment);
|
235
|
+
},
|
236
|
+
m(l, o) {
|
237
|
+
Fe(e, l, o), t = !0;
|
238
|
+
},
|
239
|
+
p(l, o) {
|
240
|
+
const r = {};
|
241
|
+
o[0] & /*capturing*/
|
242
|
+
1024 && (r.handler = /*func*/
|
243
|
+
l[55]), e.$set(r);
|
244
|
+
},
|
245
|
+
i(l) {
|
246
|
+
t || (oe(e.$$.fragment, l), t = !0);
|
247
|
+
},
|
248
|
+
o(l) {
|
249
|
+
le(e.$$.fragment, l), t = !1;
|
250
|
+
},
|
251
|
+
d(l) {
|
252
|
+
Le(e, l);
|
253
|
+
}
|
254
|
+
};
|
255
|
+
}
|
256
|
+
function Oi(s) {
|
257
|
+
let e, t, l, o, r, n, a, d, h;
|
258
|
+
const g = [Hi, Ni, Mi, Wi], w = [];
|
259
|
+
function m(f, y) {
|
260
|
+
return (
|
261
|
+
/*$captured*/
|
262
|
+
f[16] ? (
|
263
|
+
/*$requestResult*/
|
264
|
+
f[18] !== Ge.OK ? 1 : (
|
265
|
+
/*$saved*/
|
266
|
+
f[19] ? 3 : 2
|
267
|
+
)
|
268
|
+
) : 0
|
269
|
+
);
|
270
|
+
}
|
271
|
+
return n = m(s), a = w[n] = g[n](s), {
|
272
|
+
c() {
|
273
|
+
e = _("div"), t = _("img"), r = O(), a.c(), u(t, "class", "m-auto col-start-1 col-end-1 max-h-[23.2em]"), Ze(t.src, l = /*$dataTypePrefix*/
|
274
|
+
s[22] + "," + /*$image*/
|
275
|
+
s[21]) || u(t, "src", l), t.hidden = o = !/*$captured*/
|
276
|
+
s[16] || !/*$showFaceWhileValidating*/
|
277
|
+
s[28], u(t, "alt", ""), u(e, "class", d = "grid-cols-1 grid-rows-2 sm:grid-cols-2 sm:grid-rows-1 gap-[.5em] " + (/*$showFaceWhileValidating*/
|
278
|
+
s[28] ? "grid m-[1em] overflow-hidden" : "absolute -translate-y-1/2 -translate-x-1/2 top-1/2 left-1/2 overflow-visible"));
|
279
|
+
},
|
280
|
+
m(f, y) {
|
281
|
+
K(f, e, y), c(e, t), c(e, r), w[n].m(e, null), h = !0;
|
282
|
+
},
|
283
|
+
p(f, y) {
|
284
|
+
(!h || y[0] & /*$dataTypePrefix, $image*/
|
285
|
+
6291456 && !Ze(t.src, l = /*$dataTypePrefix*/
|
286
|
+
f[22] + "," + /*$image*/
|
287
|
+
f[21])) && u(t, "src", l), (!h || y[0] & /*$captured, $showFaceWhileValidating*/
|
288
|
+
268500992 && o !== (o = !/*$captured*/
|
289
|
+
f[16] || !/*$showFaceWhileValidating*/
|
290
|
+
f[28])) && (t.hidden = o);
|
291
|
+
let k = n;
|
292
|
+
n = m(f), n === k ? w[n].p(f, y) : (Ct(), le(w[k], 1, 1, () => {
|
293
|
+
w[k] = null;
|
294
|
+
}), yt(), a = w[n], a ? a.p(f, y) : (a = w[n] = g[n](f), a.c()), oe(a, 1), a.m(e, null)), (!h || y[0] & /*$showFaceWhileValidating*/
|
295
|
+
268435456 && d !== (d = "grid-cols-1 grid-rows-2 sm:grid-cols-2 sm:grid-rows-1 gap-[.5em] " + (/*$showFaceWhileValidating*/
|
296
|
+
f[28] ? "grid m-[1em] overflow-hidden" : "absolute -translate-y-1/2 -translate-x-1/2 top-1/2 left-1/2 overflow-visible"))) && u(e, "class", d);
|
297
|
+
},
|
298
|
+
i(f) {
|
299
|
+
h || (oe(a), h = !0);
|
300
|
+
},
|
301
|
+
o(f) {
|
302
|
+
le(a), h = !1;
|
303
|
+
},
|
304
|
+
d(f) {
|
305
|
+
f && Y(e), w[n].d();
|
306
|
+
}
|
307
|
+
};
|
308
|
+
}
|
309
|
+
function pt(s) {
|
310
|
+
let e, t = (
|
311
|
+
/*$_*/
|
312
|
+
s[26]("faceCollector.loading") + ""
|
313
|
+
), l;
|
314
|
+
return {
|
315
|
+
c() {
|
316
|
+
e = _("span"), l = H(t), u(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
|
317
|
+
},
|
318
|
+
m(o, r) {
|
319
|
+
K(o, e, r), c(e, l);
|
320
|
+
},
|
321
|
+
p(o, r) {
|
322
|
+
r[0] & /*$_*/
|
323
|
+
67108864 && t !== (t = /*$_*/
|
324
|
+
o[26]("faceCollector.loading") + "") && j(l, t);
|
325
|
+
},
|
326
|
+
d(o) {
|
327
|
+
o && Y(e);
|
328
|
+
}
|
329
|
+
};
|
330
|
+
}
|
331
|
+
function Wi(s) {
|
332
|
+
let e, t, l = (
|
333
|
+
/*$_*/
|
334
|
+
s[26]("docCollector.captured") + ""
|
335
|
+
), o, r, n, a, d = (
|
336
|
+
/*$_*/
|
337
|
+
s[26]("faceCollector.retakePhoto") + ""
|
338
|
+
), h, g, w = Ci(yi).faceStrategy !== Ei.DISABLED, m, f, y, k = w && Bi();
|
339
|
+
return {
|
340
|
+
c() {
|
341
|
+
e = _("div"), t = _("h1"), o = H(l), r = O(), n = _("div"), a = _("button"), h = H(d), g = O(), k && k.c(), u(t, "class", "text-3xl font-bold pb-[1em] transition-opacity"), u(a, "id", "bry-cc-retake-button"), u(a, "class", "ce-dui-btn ce-dui-btn-block flex-shrink text-base"), u(n, "class", "flex flex-row"), ht(n, "ce-dui-btn-group", !/*$exportButtonDisabled*/
|
342
|
+
s[29]);
|
343
|
+
},
|
344
|
+
m(v, D) {
|
345
|
+
K(v, e, D), c(e, t), c(t, o), c(e, r), c(e, n), c(n, a), c(a, h), c(n, g), k && k.m(n, null), m = !0, f || (y = te(
|
346
|
+
a,
|
347
|
+
"click",
|
348
|
+
/*click_handler_7*/
|
349
|
+
s[54]
|
350
|
+
), f = !0);
|
351
|
+
},
|
352
|
+
p(v, D) {
|
353
|
+
(!m || D[0] & /*$_*/
|
354
|
+
67108864) && l !== (l = /*$_*/
|
355
|
+
v[26]("docCollector.captured") + "") && j(o, l), (!m || D[0] & /*$_*/
|
356
|
+
67108864) && d !== (d = /*$_*/
|
357
|
+
v[26]("faceCollector.retakePhoto") + "") && j(h, d), (!m || D[0] & /*$exportButtonDisabled*/
|
358
|
+
536870912) && ht(n, "ce-dui-btn-group", !/*$exportButtonDisabled*/
|
359
|
+
v[29]);
|
360
|
+
},
|
361
|
+
i(v) {
|
362
|
+
m || (oe(k), m = !0);
|
363
|
+
},
|
364
|
+
o(v) {
|
365
|
+
le(k), m = !1;
|
366
|
+
},
|
367
|
+
d(v) {
|
368
|
+
v && Y(e), k && k.d(), f = !1, y();
|
369
|
+
}
|
370
|
+
};
|
371
|
+
}
|
372
|
+
function Mi(s) {
|
373
|
+
let e, t, l = (
|
374
|
+
/*$_*/
|
375
|
+
s[26]("faceCollector.unconformities") + ""
|
376
|
+
), o, r, n, a, d, h = (
|
377
|
+
/*$_*/
|
378
|
+
s[26]("faceCollector.provideAReasonForTheLowQualityCapture") + ""
|
379
|
+
), g, w, m, f, y, k, v, D, X = (
|
380
|
+
/*$_*/
|
381
|
+
s[26]("faceCollector.thisInformationIsRequired") + ""
|
382
|
+
), Z, J, Q, z, I, C = (
|
383
|
+
/*$captured*/
|
384
|
+
s[16] && wt(s)
|
385
|
+
);
|
386
|
+
return {
|
387
|
+
c() {
|
388
|
+
e = _("div"), t = _("h1"), o = H(l), r = O(), n = _("div"), a = _("label"), d = _("span"), g = H(h), w = O(), m = _("textarea"), y = O(), k = _("label"), v = _("span"), D = H("("), Z = H(X), J = H(")"), Q = O(), C && C.c(), u(t, "class", "text-3xl font-bold pb-[1em] transition-opacity"), u(d, "class", "ce-dui-label-text text-base"), u(a, "class", "ce-dui-label"), u(a, "for", "justification"), u(m, "contenteditable", ""), u(m, "id", "justification"), u(m, "class", "ce-dui-textarea ce-dui-textarea-bordered h-[6em] text-base"), u(m, "placeholder", f = /*$_*/
|
389
|
+
s[26]("faceCollector.yourJustification")), u(v, "class", "ce-dui-label-text-alt text-base"), u(k, "class", "ce-dui-label"), u(k, "for", "justification"), u(n, "class", "ce-dui-form-control mt-[2.5em]");
|
390
|
+
},
|
391
|
+
m(T, W) {
|
392
|
+
K(T, e, W), c(e, t), c(t, o), c(e, r), c(e, n), c(n, a), c(a, d), c(d, g), c(n, w), c(n, m), mt(
|
393
|
+
m,
|
394
|
+
/*$justification*/
|
395
|
+
s[20]
|
396
|
+
), c(n, y), c(n, k), c(k, v), c(v, D), c(v, Z), c(v, J), c(e, Q), C && C.m(e, null), z || (I = te(
|
397
|
+
m,
|
398
|
+
"input",
|
399
|
+
/*textarea_input_handler*/
|
400
|
+
s[51]
|
401
|
+
), z = !0);
|
402
|
+
},
|
403
|
+
p(T, W) {
|
404
|
+
W[0] & /*$_*/
|
405
|
+
67108864 && l !== (l = /*$_*/
|
406
|
+
T[26]("faceCollector.unconformities") + "") && j(o, l), W[0] & /*$_*/
|
407
|
+
67108864 && h !== (h = /*$_*/
|
408
|
+
T[26]("faceCollector.provideAReasonForTheLowQualityCapture") + "") && j(g, h), W[0] & /*$_*/
|
409
|
+
67108864 && f !== (f = /*$_*/
|
410
|
+
T[26]("faceCollector.yourJustification")) && u(m, "placeholder", f), W[0] & /*$justification*/
|
411
|
+
1048576 && mt(
|
412
|
+
m,
|
413
|
+
/*$justification*/
|
414
|
+
T[20]
|
415
|
+
), W[0] & /*$_*/
|
416
|
+
67108864 && X !== (X = /*$_*/
|
417
|
+
T[26]("faceCollector.thisInformationIsRequired") + "") && j(Z, X), /*$captured*/
|
418
|
+
T[16] ? C ? C.p(T, W) : (C = wt(T), C.c(), C.m(e, null)) : C && (C.d(1), C = null);
|
419
|
+
},
|
420
|
+
i: ee,
|
421
|
+
o: ee,
|
422
|
+
d(T) {
|
423
|
+
T && Y(e), C && C.d(), z = !1, I();
|
424
|
+
}
|
425
|
+
};
|
426
|
+
}
|
427
|
+
function Ni(s) {
|
428
|
+
let e, t, l = (
|
429
|
+
/*$_*/
|
430
|
+
s[26]("faceCollector.everythingOk") + ""
|
431
|
+
), o, r, n, a, d = (
|
432
|
+
/*$_*/
|
433
|
+
s[26]("faceCollector.finish") + ""
|
434
|
+
), h, g, w, m = (
|
435
|
+
/*$_*/
|
436
|
+
s[26]("faceCollector.retakePhoto") + ""
|
437
|
+
), f, y, k;
|
438
|
+
return {
|
439
|
+
c() {
|
440
|
+
e = _("div"), t = _("h1"), o = H(l), r = O(), n = _("div"), a = _("button"), h = H(d), g = O(), w = _("button"), f = H(m), u(t, "class", "text-3xl font-bold pb-[1em] transition-opacity"), a.disabled = !0, u(a, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), u(w, "id", "bry-cc-retake-button"), u(w, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), u(n, "class", "ce-dui-btn-group flex"), u(e, "class", "flex flex-col justify-between");
|
441
|
+
},
|
442
|
+
m(v, D) {
|
443
|
+
K(v, e, D), c(e, t), c(t, o), c(e, r), c(e, n), c(n, a), c(a, h), c(n, g), c(n, w), c(w, f), y || (k = [
|
444
|
+
te(
|
445
|
+
a,
|
446
|
+
"click",
|
447
|
+
/*click_handler_3*/
|
448
|
+
s[49]
|
449
|
+
),
|
450
|
+
te(
|
451
|
+
w,
|
452
|
+
"click",
|
453
|
+
/*click_handler_4*/
|
454
|
+
s[50]
|
455
|
+
)
|
456
|
+
], y = !0);
|
457
|
+
},
|
458
|
+
p(v, D) {
|
459
|
+
D[0] & /*$_*/
|
460
|
+
67108864 && l !== (l = /*$_*/
|
461
|
+
v[26]("faceCollector.everythingOk") + "") && j(o, l), D[0] & /*$_*/
|
462
|
+
67108864 && d !== (d = /*$_*/
|
463
|
+
v[26]("faceCollector.finish") + "") && j(h, d), D[0] & /*$_*/
|
464
|
+
67108864 && m !== (m = /*$_*/
|
465
|
+
v[26]("faceCollector.retakePhoto") + "") && j(f, m);
|
466
|
+
},
|
467
|
+
i: ee,
|
468
|
+
o: ee,
|
469
|
+
d(v) {
|
470
|
+
v && Y(e), y = !1, Oe(k);
|
471
|
+
}
|
472
|
+
};
|
473
|
+
}
|
474
|
+
function Hi(s) {
|
475
|
+
let e;
|
476
|
+
return {
|
477
|
+
c() {
|
478
|
+
e = _("div"), u(e, "class", "");
|
479
|
+
},
|
480
|
+
m(t, l) {
|
481
|
+
K(t, e, l);
|
482
|
+
},
|
483
|
+
p: ee,
|
484
|
+
i: ee,
|
485
|
+
o: ee,
|
486
|
+
d(t) {
|
487
|
+
t && Y(e);
|
488
|
+
}
|
489
|
+
};
|
490
|
+
}
|
491
|
+
function Bi(s) {
|
492
|
+
let e, t;
|
493
|
+
return e = new Pi({
|
494
|
+
props: { cssClass: "ce-dui-btn-block flex-shrink" }
|
495
|
+
}), {
|
496
|
+
c() {
|
497
|
+
Ie(e.$$.fragment);
|
498
|
+
},
|
499
|
+
m(l, o) {
|
500
|
+
Fe(e, l, o), t = !0;
|
501
|
+
},
|
502
|
+
i(l) {
|
503
|
+
t || (oe(e.$$.fragment, l), t = !0);
|
504
|
+
},
|
505
|
+
o(l) {
|
506
|
+
le(e.$$.fragment, l), t = !1;
|
507
|
+
},
|
508
|
+
d(l) {
|
509
|
+
Le(e, l);
|
510
|
+
}
|
511
|
+
};
|
512
|
+
}
|
513
|
+
function wt(s) {
|
514
|
+
let e, t, l = (
|
515
|
+
/*$_*/
|
516
|
+
s[26]("faceCollector.finish") + ""
|
517
|
+
), o, r, n, a, d = (
|
518
|
+
/*$_*/
|
519
|
+
s[26]("faceCollector.retakePhoto") + ""
|
520
|
+
), h, g, w;
|
521
|
+
return {
|
522
|
+
c() {
|
523
|
+
e = _("div"), t = _("button"), o = H(l), n = O(), a = _("button"), h = H(d), t.disabled = r = /*$justification*/
|
524
|
+
s[20].length === 0, u(t, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink text-base"), u(a, "id", "bry-cc-retake-button"), u(a, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink text-base"), u(e, "class", "ce-dui-btn-group flex");
|
525
|
+
},
|
526
|
+
m(m, f) {
|
527
|
+
K(m, e, f), c(e, t), c(t, o), c(e, n), c(e, a), c(a, h), g || (w = [
|
528
|
+
te(
|
529
|
+
t,
|
530
|
+
"click",
|
531
|
+
/*click_handler_5*/
|
532
|
+
s[52]
|
533
|
+
),
|
534
|
+
te(
|
535
|
+
a,
|
536
|
+
"click",
|
537
|
+
/*click_handler_6*/
|
538
|
+
s[53]
|
539
|
+
)
|
540
|
+
], g = !0);
|
541
|
+
},
|
542
|
+
p(m, f) {
|
543
|
+
f[0] & /*$_*/
|
544
|
+
67108864 && l !== (l = /*$_*/
|
545
|
+
m[26]("faceCollector.finish") + "") && j(o, l), f[0] & /*$justification*/
|
546
|
+
1048576 && r !== (r = /*$justification*/
|
547
|
+
m[20].length === 0) && (t.disabled = r), f[0] & /*$_*/
|
548
|
+
67108864 && d !== (d = /*$_*/
|
549
|
+
m[26]("faceCollector.retakePhoto") + "") && j(h, d);
|
550
|
+
},
|
551
|
+
d(m) {
|
552
|
+
m && Y(e), g = !1, Oe(w);
|
553
|
+
}
|
554
|
+
};
|
555
|
+
}
|
556
|
+
function Ui(s) {
|
557
|
+
let e, t, l, o, r = (
|
558
|
+
/*unique*/
|
559
|
+
s[7]
|
560
|
+
), n, a, d, h, g, w, m, f, y, k, v, D, X, Z, J, Q, z, I, C, T, W = bt(s);
|
561
|
+
a = new ii({ props: { className: "bottom-0" } }), h = new Ri({ props: { className: "bottom-0" } });
|
562
|
+
let U = (
|
563
|
+
/*isCountingDown*/
|
564
|
+
s[6] && gt(s)
|
565
|
+
), V = !/*$isLoadingAPP*/
|
566
|
+
s[17] && /*$enableFaceApi*/
|
567
|
+
s[23] && !/*isCountingDown*/
|
568
|
+
s[6] && /*faceNotValidated*/
|
569
|
+
s[12] && _t(s);
|
570
|
+
function E(b, M) {
|
571
|
+
return (
|
572
|
+
/*$captured*/
|
573
|
+
b[16] ? Ai : Si
|
574
|
+
);
|
575
|
+
}
|
576
|
+
let q = E(s), N = q(s);
|
577
|
+
const se = [Oi, Li, Fi], x = [];
|
578
|
+
function de(b, M) {
|
579
|
+
return (
|
580
|
+
/*showUnconformities*/
|
581
|
+
b[1] && (!/*idrndClosed*/
|
582
|
+
b[11] || /*$captured*/
|
583
|
+
b[16]) ? 0 : (
|
584
|
+
/*$cameraStatusStore*/
|
585
|
+
b[14] !== G.OK ? 1 : (
|
586
|
+
/*$isLoadingAPP*/
|
587
|
+
b[17] ? 2 : -1
|
588
|
+
)
|
589
|
+
)
|
590
|
+
);
|
591
|
+
}
|
592
|
+
return ~(I = de(s)) && (C = x[I] = se[I](s)), {
|
593
|
+
c() {
|
594
|
+
e = _("div"), t = _("div"), l = _("div"), o = _("div"), W.c(), n = O(), Ie(a.$$.fragment), d = O(), Ie(h.$$.fragment), g = O(), w = _("canvas"), m = O(), f = _("canvas"), y = O(), k = _("canvas"), v = O(), U && U.c(), D = O(), V && V.c(), Z = O(), J = _("div"), N.c(), z = O(), C && C.c(), this.c = ee, u(w, "id", "bry-ce-displayCanvas"), w.hidden = /*$isLoadingAPP*/
|
595
|
+
s[17], u(w, "class", "max-w-full"), u(f, "id", "bry-ce-detectionsCanvas"), f.hidden = /*$isLoadingAPP*/
|
596
|
+
s[17], u(f, "class", "absolute top-0 left-0 max-w-full"), u(k, "id", "bry-ce-maskCanvas"), k.hidden = /*$isLoadingAPP*/
|
597
|
+
s[17], u(k, "class", "absolute top-0 left-0 max-w-full"), u(o, "class", "relative"), o.hidden = X = /*$cameraStatusStore*/
|
598
|
+
s[14] !== G.OK, u(J, "class", "px-4 sm:px-0 mt-[1em]"), J.hidden = Q = !/*showCaptureButton*/
|
599
|
+
s[0], u(l, "class", "relative mx-auto"), u(t, "class", "flex flex-col justify-between");
|
600
|
+
},
|
601
|
+
m(b, M) {
|
602
|
+
K(b, e, M), c(e, t), c(t, l), c(l, o), W.m(o, null), c(o, n), Fe(a, o, null), c(o, d), Fe(h, o, null), c(o, g), c(o, w), s[42](w), c(o, m), c(o, f), s[43](f), c(o, y), c(o, k), s[44](k), c(o, v), U && U.m(o, null), c(o, D), V && V.m(o, null), c(l, Z), c(l, J), N.m(J, null), s[48](t), c(e, z), ~I && x[I].m(e, null), T = !0;
|
603
|
+
},
|
604
|
+
p(b, M) {
|
605
|
+
M[0] & /*unique*/
|
606
|
+
128 && vt(r, r = /*unique*/
|
607
|
+
b[7]) ? (W.d(1), W = bt(b), W.c(), W.m(o, n)) : W.p(b, M), (!T || M[0] & /*$isLoadingAPP*/
|
608
|
+
131072) && (w.hidden = /*$isLoadingAPP*/
|
609
|
+
b[17]), (!T || M[0] & /*$isLoadingAPP*/
|
610
|
+
131072) && (f.hidden = /*$isLoadingAPP*/
|
611
|
+
b[17]), (!T || M[0] & /*$isLoadingAPP*/
|
612
|
+
131072) && (k.hidden = /*$isLoadingAPP*/
|
613
|
+
b[17]), /*isCountingDown*/
|
614
|
+
b[6] ? U ? U.p(b, M) : (U = gt(b), U.c(), U.m(o, D)) : U && (U.d(1), U = null), !/*$isLoadingAPP*/
|
615
|
+
b[17] && /*$enableFaceApi*/
|
616
|
+
b[23] && !/*isCountingDown*/
|
617
|
+
b[6] && /*faceNotValidated*/
|
618
|
+
b[12] ? V ? V.p(b, M) : (V = _t(b), V.c(), V.m(o, null)) : V && (V.d(1), V = null), (!T || M[0] & /*$cameraStatusStore*/
|
619
|
+
16384 && X !== (X = /*$cameraStatusStore*/
|
620
|
+
b[14] !== G.OK)) && (o.hidden = X), q === (q = E(b)) && N ? N.p(b, M) : (N.d(1), N = q(b), N && (N.c(), N.m(J, null))), (!T || M[0] & /*showCaptureButton*/
|
621
|
+
1 && Q !== (Q = !/*showCaptureButton*/
|
622
|
+
b[0])) && (J.hidden = Q);
|
623
|
+
let ne = I;
|
624
|
+
I = de(b), I === ne ? ~I && x[I].p(b, M) : (C && (Ct(), le(x[ne], 1, 1, () => {
|
625
|
+
x[ne] = null;
|
626
|
+
}), yt()), ~I ? (C = x[I], C ? C.p(b, M) : (C = x[I] = se[I](b), C.c()), oe(C, 1), C.m(e, null)) : C = null);
|
627
|
+
},
|
628
|
+
i(b) {
|
629
|
+
T || (oe(a.$$.fragment, b), oe(h.$$.fragment, b), oe(C), T = !0);
|
630
|
+
},
|
631
|
+
o(b) {
|
632
|
+
le(a.$$.fragment, b), le(h.$$.fragment, b), le(C), T = !1;
|
633
|
+
},
|
634
|
+
d(b) {
|
635
|
+
b && Y(e), W.d(b), Le(a), Le(h), s[42](null), s[43](null), s[44](null), U && U.d(), V && V.d(), N.d(), s[48](null), ~I && x[I].d();
|
636
|
+
}
|
637
|
+
};
|
638
|
+
}
|
639
|
+
let Vi = !1, qi = 10;
|
640
|
+
function kt(s, e, t) {
|
641
|
+
const l = e.videoHeight >= e.videoWidth && t.height >= t.width || e.videoHeight < e.videoWidth && t.height < t.width;
|
642
|
+
s.drawImage(
|
643
|
+
e,
|
644
|
+
l ? 0 : e.videoWidth / 2 - t.width,
|
645
|
+
0,
|
646
|
+
l ? e.videoWidth : e.videoHeight * (t.width / t.height),
|
647
|
+
e.videoHeight,
|
648
|
+
0,
|
649
|
+
0,
|
650
|
+
t.width,
|
651
|
+
t.height
|
652
|
+
);
|
653
|
+
}
|
654
|
+
function Ki(s, e, t) {
|
655
|
+
let l, o, r, n, a, d, h, g, w, m, f, y, k, v, D, X, Z, J, Q, z, I, C, T, W, U, V;
|
656
|
+
S(s, Ve, (i) => t(64, l = i)), S(s, ie, (i) => t(14, r = i)), S(s, Pe, (i) => t(66, n = i)), S(s, ue, (i) => t(15, a = i)), S(s, Re, (i) => t(67, d = i)), S(s, si, (i) => t(68, h = i)), S(s, pe, (i) => t(16, g = i)), S(s, qe, (i) => t(69, w = i)), S(s, at, (i) => t(70, m = i)), S(s, li, (i) => t(71, f = i)), S(s, De, (i) => t(17, y = i)), S(s, Ke, (i) => t(72, k = i)), S(s, je, (i) => t(18, v = i)), S(s, Ae, (i) => t(19, D = i)), S(s, nt, (i) => t(20, X = i)), S(s, rt, (i) => t(21, Z = i)), S(s, oi, (i) => t(23, Q = i)), S(s, Se, (i) => t(24, z = i)), S(s, Ye, (i) => t(73, I = i)), S(s, ct, (i) => t(25, C = i)), S(s, ai, (i) => t(26, T = i)), S(s, ni, (i) => t(27, W = i)), S(s, ri, (i) => t(28, U = i)), S(s, ci, (i) => t(29, V = i));
|
657
|
+
let E, q, N, se = !1, x = {}, de = !1, { enableMinutiae: b } = e, { videoDimensions: M } = e, { noTabs: ne } = e, { weightsPath: We } = e, { showCaptureButton: xe } = e, { showUnconformities: $e } = e, { videoFilter: fe } = e;
|
658
|
+
const ve = ft(!1);
|
659
|
+
S(s, ve, (i) => t(65, o = i));
|
660
|
+
const Me = ft("data:image/png;base64");
|
661
|
+
S(s, Me, (i) => t(22, J = i));
|
662
|
+
let re, F, Ce = !1, he = !0, et = 0, Ne = 0, He = !0, Be = 0, Ue = !1, me = !1, ye = "", P = {
|
663
|
+
topLeftX: 130,
|
664
|
+
topLeftY: 70,
|
665
|
+
width: 540,
|
666
|
+
height: 400
|
667
|
+
};
|
668
|
+
ui.mixin({
|
669
|
+
toast: !0,
|
670
|
+
position: "bottom-left",
|
671
|
+
timer: 13e3,
|
672
|
+
timerProgressBar: !0
|
673
|
+
}), di(async () => {
|
674
|
+
p(De, y = !0, y), p(Se, z = !1, z), p(ct, C = !1, C), p(pe, g = !1, g), p(Re, d = Xe.REAR_CAMERA, d), ge(), Q && (await fi(We), de = !0);
|
675
|
+
});
|
676
|
+
function Et() {
|
677
|
+
const i = a.videoWidth, A = a.videoHeight, L = A * 0.73, R = L * 1.36;
|
678
|
+
P.topLeftX = (i - R) / 2, P.topLeftY = (A - L) / 1.42, P.width = R, P.height = L;
|
679
|
+
}
|
680
|
+
function tt(i, A) {
|
681
|
+
i.clearRect(0, 0, F.width, F.height), i.save(), fe == "blur" ? (i.filter = `blur(${A.width / 60}px)`, i.rect(0, 0, F.width, F.height)) : fe != "none" ? (i.fillStyle = fe, i.fillRect(0, 0, F.width, F.height)) : (i.beginPath(), i.rect(0, 0, F.width, F.height)), i.rect(P.topLeftX, P.topLeftY, P.width, P.height), i.clip(), kt(i, A, F), i.restore(), i.save(), i.beginPath();
|
682
|
+
const L = window.getComputedStyle(F).getPropertyValue("--p"), R = window.getComputedStyle(F).getPropertyValue("--su");
|
683
|
+
if (i.strokeStyle = `hsl(${L})`, i.lineWidth = 16, i.rect(P.topLeftX, P.topLeftY, P.width, P.height), i.stroke(), se && !Ue) {
|
684
|
+
const $ = 1 - (Be - (/* @__PURE__ */ new Date()).getTime()) / 4500;
|
685
|
+
i.save(), i.beginPath(), i.lineWidth = 16, i.strokeStyle = `hsl(${R})`;
|
686
|
+
const _e = P.width * 3 * $, ot = P.height * 2 * $, Zt = _e < P.width ? _e : P.width, xt = ot < P.height ? ot : P.height;
|
687
|
+
i.rect(P.topLeftX, P.topLeftY, Zt, xt), i.stroke();
|
688
|
+
}
|
689
|
+
i.beginPath();
|
690
|
+
const B = new Path2D();
|
691
|
+
B.rect(P.topLeftX, P.topLeftY, P.width, P.height), i.clip(B), kt(i, A, F), i.restore();
|
692
|
+
}
|
693
|
+
function it() {
|
694
|
+
p(ie, r = G.OK, r), t(10, Ce = !0), t(11, he = !1);
|
695
|
+
}
|
696
|
+
async function be() {
|
697
|
+
if (Q && !de)
|
698
|
+
return we(E, be);
|
699
|
+
if (E) {
|
700
|
+
if (I !== Qe.Document && !ne)
|
701
|
+
return we(E, be);
|
702
|
+
p(Se, z = !0, z), Q ? (o || p(ve, o = !0, o), tt(F.getContext("2d"), E), we(E, be)) : (tt(F.getContext("2d"), E), we(E, be));
|
703
|
+
}
|
704
|
+
}
|
705
|
+
async function st() {
|
706
|
+
dt(), p(je, v = Ge.OK, v), p(pe, g = !0, g), p(Ae, D = !0, D);
|
707
|
+
const i = document.createElement("canvas"), A = i.getContext("2d");
|
708
|
+
i.width = P.width, i.height = P.height, A?.drawImage(E, P.topLeftX, P.topLeftY, P.width, P.height, 0, 0, i.width, i.height);
|
709
|
+
const L = i.toDataURL("image/jpeg").split(",");
|
710
|
+
p(Me, J = L[0], J), p(rt, Z = L[1], Z), p(Ke, k = L[1], k);
|
711
|
+
const R = [{ data: k }];
|
712
|
+
window.dispatchEvent(new CustomEvent(
|
713
|
+
"document-unconformities-validated",
|
714
|
+
{
|
715
|
+
detail: { bodyParts: R, status: v }
|
716
|
+
}
|
717
|
+
));
|
718
|
+
}
|
719
|
+
function Ee() {
|
720
|
+
const i = {
|
721
|
+
bodyPart: "DOCUMENT",
|
722
|
+
data: Z,
|
723
|
+
justification: X
|
724
|
+
};
|
725
|
+
p(Ae, D = !0, D), window.dispatchEvent(new CustomEvent("export-document", { detail: i }));
|
726
|
+
}
|
727
|
+
function ce() {
|
728
|
+
window.dispatchEvent(new CustomEvent("document-scrapped")), p(Ae, D = !1, D), p(je, v = Ge.OK, v), p(pe, g = !1, g), p(Ke, k = "", k), t(13, ye = ""), t(12, me = !1), he && it();
|
729
|
+
}
|
730
|
+
async function ge(i) {
|
731
|
+
p(De, y = !0, y);
|
732
|
+
const [A, L] = (M ?? "")?.replaceAll(" ", "")?.split("x")?.map((R) => R ? parseInt(R) : void 0);
|
733
|
+
if (!(!A || !L)) {
|
734
|
+
p(ue, a = { videoWidth: A, videoHeight: L }, a);
|
735
|
+
try {
|
736
|
+
if (r == G.CAMERA_ORIENTATION_LANDSCAPE)
|
737
|
+
return;
|
738
|
+
await ut();
|
739
|
+
const { deviceId: R, width: B, height: $, aspectRatio: _e } = await hi(A, L, d, i);
|
740
|
+
_e && _e < 1 && Je() ? p(
|
741
|
+
ue,
|
742
|
+
a = {
|
743
|
+
videoWidth: $,
|
744
|
+
videoHeight: B
|
745
|
+
},
|
746
|
+
a
|
747
|
+
) : p(
|
748
|
+
ue,
|
749
|
+
a = {
|
750
|
+
videoWidth: B,
|
751
|
+
videoHeight: $
|
752
|
+
},
|
753
|
+
a
|
754
|
+
), Et(), p(Pe, n = R || h[0].deviceId, n), p(ie, r = G.OK, r);
|
755
|
+
} catch (R) {
|
756
|
+
const B = R;
|
757
|
+
t(11, he = !0);
|
758
|
+
const $ = Te(R) && R.constraint ? R.constraint : "";
|
759
|
+
console.error(B, $), Te(B) && "message" in B && B.message.includes("Permission denied") && (console.error("User didn't give permission to use camera!"), p(ie, r = G.CAMERA_DENIED_ERROR, r)), Te(B) && "message" in B && B.message.includes("Requested device not found") && p(ie, r = G.DEVICE_NOT_FOUND_ERROR, r), ($.includes("width") || $.includes("height")) && (console.error(`Camera does not meet the minimum supported requirements! (${$})`), p(ie, r = G.CAMERA_UNSUPPORTED, r));
|
760
|
+
}
|
761
|
+
p(De, y = !1, y);
|
762
|
+
}
|
763
|
+
}
|
764
|
+
const Pt = ue.subscribe((i) => {
|
765
|
+
E && q && (t(3, E.width = i.videoWidth, E), t(3, E.height = i.videoHeight, E), t(4, q.width = i.videoWidth, q), t(4, q.height = i.videoHeight, q), t(8, re.width = i.videoWidth, re), t(8, re.height = i.videoHeight, re), t(9, F.width = i.videoWidth, F), t(9, F.height = i.videoHeight, F));
|
766
|
+
}), Rt = mi.subscribe((i) => {
|
767
|
+
let A = "";
|
768
|
+
if (i.isPersonCloseEnough ? i.isPersonTooclose ? A = "faceCollector.moveAwayCamera" : i.isPersonInFrame || (A = "docCollector.stayInFrame") : A = "faceCollector.comeCloserCamera", A != "" && A != ye && (t(12, me = !1), setTimeout(
|
769
|
+
() => {
|
770
|
+
t(13, ye = A), t(12, me = !0);
|
771
|
+
},
|
772
|
+
1e3
|
773
|
+
)), !g && f && !se && i.isPersonInFrame && !(!i.isPersonCloseEnough || i.isPersonTooclose)) {
|
774
|
+
t(6, se = !0), t(12, me = !1), Be = (/* @__PURE__ */ new Date()).getTime() + 4500;
|
775
|
+
const L = setInterval(
|
776
|
+
() => {
|
777
|
+
if (!f || g || !i.isPersonCloseEnough || i.isPersonTooclose || !i.isPersonInFrame) {
|
778
|
+
t(6, se = !1), Ue = !0, setTimeout(
|
779
|
+
() => {
|
780
|
+
Ue = !1;
|
781
|
+
},
|
782
|
+
1500
|
783
|
+
), clearInterval(L);
|
784
|
+
return;
|
785
|
+
}
|
786
|
+
const R = (/* @__PURE__ */ new Date()).getTime();
|
787
|
+
Math.floor((Be - R) % (1e3 * 60) / 1e3) <= 0 && (clearInterval(L), t(6, se = !1), document.getElementsByTagName("biometric-collector")?.[0]?.shadowRoot?.getElementById("bry-cc-capture-btn")?.click());
|
788
|
+
},
|
789
|
+
250
|
790
|
+
);
|
791
|
+
}
|
792
|
+
}), Dt = pe.subscribe((i) => {
|
793
|
+
N && (i ? (N.classList.remove("flex"), N.classList.add("hidden")) : (N.classList.add("flex"), N.classList.remove("hidden")));
|
794
|
+
}), At = qe.subscribe((i) => {
|
795
|
+
E && i && (console.log("setting null in video srcObject"), t(3, E.srcObject = null, E), t(3, E.src = "", E));
|
796
|
+
});
|
797
|
+
Ye.subscribe(async (i) => {
|
798
|
+
i === Qe.Document && await ut();
|
799
|
+
});
|
800
|
+
const St = Pe.subscribe(async (i) => {
|
801
|
+
if (!i)
|
802
|
+
return;
|
803
|
+
E || t(7, x = {});
|
804
|
+
const { videoHeight: A, videoWidth: L } = a;
|
805
|
+
try {
|
806
|
+
const R = await bi(L, A, i);
|
807
|
+
t(3, E.srcObject = R, E), p(at, m = R, m), p(qe, w = !1, w), He || (p(ie, r = G.CAMERA_ORIENTATION_LANDSCAPE, r), ze());
|
808
|
+
} catch (R) {
|
809
|
+
const B = R;
|
810
|
+
t(11, he = !0), Te(B) && "message" in B && B.message.includes("Requested device not found") && p(ie, r = G.DEVICE_NOT_FOUND_ERROR, r);
|
811
|
+
}
|
812
|
+
}), Tt = Ye.subscribe(async (i) => {
|
813
|
+
i === Qe.Document && !Ce && !g && Vi && await it();
|
814
|
+
}), It = ve.subscribe(async (i) => {
|
815
|
+
i && lt();
|
816
|
+
}), Ft = Se.subscribe((i) => {
|
817
|
+
i && window.dispatchEvent(new CustomEvent("brycc-camera-ready"));
|
818
|
+
}), Lt = gi.subscribe((i) => {
|
819
|
+
if (a) {
|
820
|
+
if (!Je()) {
|
821
|
+
const A = h.find((R) => R.deviceId !== n), L = A ? A.deviceId : h[0].deviceId;
|
822
|
+
ge(L);
|
823
|
+
return;
|
824
|
+
}
|
825
|
+
i ? (p(Re, d = Xe.FRONT_CAMERA, d), ge()) : (p(Re, d = Xe.REAR_CAMERA, d), ge());
|
826
|
+
}
|
827
|
+
}), Ot = _i.subscribe((i) => {
|
828
|
+
!i.isSupported || !Je() || (He = i.orientation.includes("landscape"), He ? (p(ie, r = G.OK, r), a && (p(Pe, n = "", n), ge())) : (p(ie, r = G.CAMERA_ORIENTATION_LANDSCAPE, r), ze()));
|
829
|
+
});
|
830
|
+
async function lt() {
|
831
|
+
let i;
|
832
|
+
if (Ne >= qi) {
|
833
|
+
Ne = 0;
|
834
|
+
const A = await wi(), L = await import("./face_api_0e3ce8c8_2.2.2.js");
|
835
|
+
let R;
|
836
|
+
R = L.detectSingleFace(F, A), i = await R.withFaceLandmarks(), q.getContext("2d")?.clearRect(0, 0, q.width, q.height);
|
837
|
+
} else
|
838
|
+
Ne++;
|
839
|
+
i && ki(i, q, b, !0), o && we(E, lt);
|
840
|
+
}
|
841
|
+
Ve.subscribe(async (i) => {
|
842
|
+
i && (ce(), p(Ve, l = !1, l));
|
843
|
+
}), pi(() => {
|
844
|
+
ze(), Dt(), Rt(), Pt(), At(), St(), Tt(), clearInterval(et), It(), Lt(), Ft(), Ot(), dt(), et = 0;
|
845
|
+
});
|
846
|
+
function Wt(i) {
|
847
|
+
ke[i ? "unshift" : "push"](() => {
|
848
|
+
E = i, t(3, E);
|
849
|
+
});
|
850
|
+
}
|
851
|
+
const Mt = () => {
|
852
|
+
p(
|
853
|
+
ue,
|
854
|
+
a = {
|
855
|
+
videoHeight: E.videoHeight,
|
856
|
+
videoWidth: E.videoWidth
|
857
|
+
},
|
858
|
+
a
|
859
|
+
);
|
860
|
+
};
|
861
|
+
function Nt(i) {
|
862
|
+
ke[i ? "unshift" : "push"](() => {
|
863
|
+
F = i, t(9, F);
|
864
|
+
});
|
865
|
+
}
|
866
|
+
function Ht(i) {
|
867
|
+
ke[i ? "unshift" : "push"](() => {
|
868
|
+
q = i, t(4, q);
|
869
|
+
});
|
870
|
+
}
|
871
|
+
function Bt(i) {
|
872
|
+
ke[i ? "unshift" : "push"](() => {
|
873
|
+
re = i, t(8, re);
|
874
|
+
});
|
875
|
+
}
|
876
|
+
const Ut = () => st(), Vt = () => Ee(), qt = () => ce();
|
877
|
+
function Kt(i) {
|
878
|
+
ke[i ? "unshift" : "push"](() => {
|
879
|
+
N = i, t(5, N);
|
880
|
+
});
|
881
|
+
}
|
882
|
+
const jt = () => Ee(), Yt = () => ce();
|
883
|
+
function Xt() {
|
884
|
+
X = this.value, nt.set(X);
|
885
|
+
}
|
886
|
+
const Jt = () => Ee(), Qt = () => ce(), zt = () => ce(), Gt = () => {
|
887
|
+
t(10, Ce = !0);
|
888
|
+
};
|
889
|
+
return s.$$set = (i) => {
|
890
|
+
"enableMinutiae" in i && t(35, b = i.enableMinutiae), "videoDimensions" in i && t(36, M = i.videoDimensions), "noTabs" in i && t(37, ne = i.noTabs), "weightsPath" in i && t(38, We = i.weightsPath), "showCaptureButton" in i && t(0, xe = i.showCaptureButton), "showUnconformities" in i && t(1, $e = i.showUnconformities), "videoFilter" in i && t(39, fe = i.videoFilter);
|
891
|
+
}, [
|
892
|
+
xe,
|
893
|
+
$e,
|
894
|
+
be,
|
895
|
+
E,
|
896
|
+
q,
|
897
|
+
N,
|
898
|
+
se,
|
899
|
+
x,
|
900
|
+
re,
|
901
|
+
F,
|
902
|
+
Ce,
|
903
|
+
he,
|
904
|
+
me,
|
905
|
+
ye,
|
906
|
+
r,
|
907
|
+
a,
|
908
|
+
g,
|
909
|
+
y,
|
910
|
+
v,
|
911
|
+
D,
|
912
|
+
X,
|
913
|
+
Z,
|
914
|
+
J,
|
915
|
+
Q,
|
916
|
+
z,
|
917
|
+
C,
|
918
|
+
T,
|
919
|
+
W,
|
920
|
+
U,
|
921
|
+
V,
|
922
|
+
ve,
|
923
|
+
Me,
|
924
|
+
st,
|
925
|
+
Ee,
|
926
|
+
ce,
|
927
|
+
b,
|
928
|
+
M,
|
929
|
+
ne,
|
930
|
+
We,
|
931
|
+
fe,
|
932
|
+
Wt,
|
933
|
+
Mt,
|
934
|
+
Nt,
|
935
|
+
Ht,
|
936
|
+
Bt,
|
937
|
+
Ut,
|
938
|
+
Vt,
|
939
|
+
qt,
|
940
|
+
Kt,
|
941
|
+
jt,
|
942
|
+
Yt,
|
943
|
+
Xt,
|
944
|
+
Jt,
|
945
|
+
Qt,
|
946
|
+
zt,
|
947
|
+
Gt
|
948
|
+
];
|
949
|
+
}
|
950
|
+
class ji extends $t {
|
951
|
+
constructor(e) {
|
952
|
+
super(), ei(
|
953
|
+
this,
|
954
|
+
{
|
955
|
+
target: this.shadowRoot,
|
956
|
+
props: ti(this.attributes),
|
957
|
+
customElement: !0
|
958
|
+
},
|
959
|
+
Ki,
|
960
|
+
Ui,
|
961
|
+
vt,
|
962
|
+
{
|
963
|
+
enableMinutiae: 35,
|
964
|
+
videoDimensions: 36,
|
965
|
+
noTabs: 37,
|
966
|
+
weightsPath: 38,
|
967
|
+
showCaptureButton: 0,
|
968
|
+
showUnconformities: 1,
|
969
|
+
videoFilter: 39,
|
970
|
+
play: 2
|
971
|
+
},
|
972
|
+
null,
|
973
|
+
[-1, -1, -1]
|
974
|
+
), e && (e.target && K(e.target, this, e.anchor), e.props && (this.$set(e.props), ae()));
|
975
|
+
}
|
976
|
+
static get observedAttributes() {
|
977
|
+
return [
|
978
|
+
"enableMinutiae",
|
979
|
+
"videoDimensions",
|
980
|
+
"noTabs",
|
981
|
+
"weightsPath",
|
982
|
+
"showCaptureButton",
|
983
|
+
"showUnconformities",
|
984
|
+
"videoFilter",
|
985
|
+
"play"
|
986
|
+
];
|
987
|
+
}
|
988
|
+
get enableMinutiae() {
|
989
|
+
return this.$$.ctx[35];
|
990
|
+
}
|
991
|
+
set enableMinutiae(e) {
|
992
|
+
this.$$set({ enableMinutiae: e }), ae();
|
993
|
+
}
|
994
|
+
get videoDimensions() {
|
995
|
+
return this.$$.ctx[36];
|
996
|
+
}
|
997
|
+
set videoDimensions(e) {
|
998
|
+
this.$$set({ videoDimensions: e }), ae();
|
999
|
+
}
|
1000
|
+
get noTabs() {
|
1001
|
+
return this.$$.ctx[37];
|
1002
|
+
}
|
1003
|
+
set noTabs(e) {
|
1004
|
+
this.$$set({ noTabs: e }), ae();
|
1005
|
+
}
|
1006
|
+
get weightsPath() {
|
1007
|
+
return this.$$.ctx[38];
|
1008
|
+
}
|
1009
|
+
set weightsPath(e) {
|
1010
|
+
this.$$set({ weightsPath: e }), ae();
|
1011
|
+
}
|
1012
|
+
get showCaptureButton() {
|
1013
|
+
return this.$$.ctx[0];
|
1014
|
+
}
|
1015
|
+
set showCaptureButton(e) {
|
1016
|
+
this.$$set({ showCaptureButton: e }), ae();
|
1017
|
+
}
|
1018
|
+
get showUnconformities() {
|
1019
|
+
return this.$$.ctx[1];
|
1020
|
+
}
|
1021
|
+
set showUnconformities(e) {
|
1022
|
+
this.$$set({ showUnconformities: e }), ae();
|
1023
|
+
}
|
1024
|
+
get videoFilter() {
|
1025
|
+
return this.$$.ctx[39];
|
1026
|
+
}
|
1027
|
+
set videoFilter(e) {
|
1028
|
+
this.$$set({ videoFilter: e }), ae();
|
1029
|
+
}
|
1030
|
+
get play() {
|
1031
|
+
return this.$$.ctx[2];
|
1032
|
+
}
|
1033
|
+
}
|
1034
|
+
customElements.define("document-collector", ji);
|
1035
|
+
export {
|
1036
|
+
ji as default
|
1037
|
+
};
|