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