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