bry-biometric-collector 3.3.2 → 3.3.3

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.
Files changed (24) hide show
  1. package/README.md +1 -1
  2. package/dist/{CaptureBar_2e1f84ce_3.3.2.js → CaptureBar_469237c4_3.3.3.js} +1 -1
  3. package/dist/{DocumentCollector_8501cf17_3.3.2.js → DocumentCollector_dba89ca4_3.3.3.js} +5 -5
  4. package/dist/{FaceCollector_1a7d88ec_3.3.2.js → FaceCollector_9cad4376_3.3.3.js} +6 -6
  5. package/dist/{FaceOval_e923d0d6_3.3.2.js → FaceOval_b6968a4e_3.3.3.js} +2 -2
  6. package/dist/StreamCollector_1b45bf65_3.3.3.js +324 -0
  7. package/dist/{Unique_impl_348303a3_3.3.2.js → Unique_impl_f01a8015_3.3.3.js} +1 -1
  8. package/dist/ValidationAlert_1542254e_3.3.3.js +4520 -0
  9. package/dist/bry-biometric-collector-main.js +2 -2
  10. package/dist/{en-us_c02e99cd_3.3.2.js → en-us_842702b5_3.3.3.js} +1 -1
  11. package/dist/{es-cl_6f3eda53_3.3.2.js → es-cl_70439136_3.3.3.js} +1 -1
  12. package/dist/{fingersApi_ab3ce6d7_3.3.2.js → fingersApi_3155ee00_3.3.3.js} +2 -2
  13. package/dist/index.js +2 -2
  14. package/dist/{index_b4e024a2_3.3.2.js → index_7735cb97_3.3.3.js} +4 -4
  15. package/dist/{index_7cf0b409_3.3.2.js → index_ba49be56_3.3.3.js} +3 -3
  16. package/dist/{main_fc376378_3.3.2.js → main_ca394221_3.3.3.js} +24 -24
  17. package/dist/{pt-br_e7d46668_3.3.2.js → pt-br_f8343e55_3.3.3.js} +1 -1
  18. package/dist/style.css +1 -1
  19. package/package.json +1 -1
  20. package/dist/StreamCollector_7164f978_3.3.2.js +0 -339
  21. package/dist/ValidationAlert_d87c5ed5_3.3.2.js +0 -974
  22. /package/dist/{face_api_d3d25326_3.3.2.js → face_api_d3d25326_3.3.3.js} +0 -0
  23. /package/dist/{index-idlf-detector_18843221_3.3.2.js → index-idlf-detector_18843221_3.3.3.js} +0 -0
  24. /package/dist/{index-idlf-detector_a5efb00c_3.3.2.js → index-idlf-detector_a5efb00c_3.3.3.js} +0 -0
@@ -1,339 +0,0 @@
1
- import { S as ve, x as he, y as we, z as Ee, B as R, C as I, D as A, N as O, E as ne, bf as f, G as ie, X as D, a0 as g, a1 as J, a2 as h, a3 as Q, H as oe, I as _, aa as V, am as Y, au as x, av as $, ah as L, T as E, ar as z, a9 as ee, aA as ye, f as Ce, aB as m, aG as Ie, l as te, d as Le, aL as ze, aN as ae, b5 as De, Z as T, _ as M, a4 as N, w as Se, aR as ke, be as Fe } from "./main_fc376378_3.3.2.js";
2
- import { V as Be, C as Ve } from "./ValidationAlert_d87c5ed5_3.3.2.js";
3
- import { F as Ae } from "./FaceOval_e923d0d6_3.3.2.js";
4
- import "./face_api_d3d25326_3.3.2.js";
5
- function re(s) {
6
- let t, a, r, l, b;
7
- return a = new Be({}), l = new Ae({
8
- props: { borderColor: (
9
- /*ovalColor*/
10
- s[5]
11
- ) }
12
- }), {
13
- c() {
14
- t = A("div"), T(a.$$.fragment), r = O(), T(l.$$.fragment), ie(t, "class", "absolute inset-0 flex flex-col items-center mt-[4%] mb-[8%] z-50");
15
- },
16
- m(c, o) {
17
- R(c, t, o), M(a, t, null), D(t, r), M(l, t, null), b = !0;
18
- },
19
- p(c, o) {
20
- const n = {};
21
- o[0] & /*ovalColor*/
22
- 32 && (n.borderColor = /*ovalColor*/
23
- c[5]), l.$set(n);
24
- },
25
- i(c) {
26
- b || (g(a.$$.fragment, c), g(l.$$.fragment, c), b = !0);
27
- },
28
- o(c) {
29
- h(a.$$.fragment, c), h(l.$$.fragment, c), b = !1;
30
- },
31
- d(c) {
32
- c && oe(t), N(a), N(l);
33
- }
34
- };
35
- }
36
- function se(s) {
37
- let t, a;
38
- return t = new Ve({ props: { handler: (
39
- /*func*/
40
- s[12]
41
- ) } }), {
42
- c() {
43
- T(t.$$.fragment);
44
- },
45
- m(r, l) {
46
- M(t, r, l), a = !0;
47
- },
48
- p: ne,
49
- i(r) {
50
- a || (g(t.$$.fragment, r), a = !0);
51
- },
52
- o(r) {
53
- h(t.$$.fragment, r), a = !1;
54
- },
55
- d(r) {
56
- N(t, r);
57
- }
58
- };
59
- }
60
- function Oe(s) {
61
- let t, a, r, l, b, c, o = (
62
- /*$ready*/
63
- s[7] && !/*idrndClosed*/
64
- s[3] && !/*idrndLoading*/
65
- s[4] && re(s)
66
- ), n = (
67
- /*idrndClosed*/
68
- s[3] && !/*idrndLoading*/
69
- s[4] && se(s)
70
- );
71
- return {
72
- c() {
73
- t = A("div"), o && o.c(), a = O(), r = A("idlive-face-capture"), b = O(), n && n.c(), this.c = ne, f(r, "class", "w-full h-full"), f(r, "mask_hidden", ""), f(r, "auto_close_disabled", ""), f(
74
- r,
75
- "device_id",
76
- /*$selectedVideoDeviceId*/
77
- s[6]
78
- ), f(r, "face_not_centered_check_enabled", ""), f(r, "sunglasses_detected_check_enabled", ""), f(r, "mouth_open_check_enabled", ""), f(r, "face_blurry_check_enabled", ""), f(r, "dark_image_check_enabled", ""), f(r, "eyes_closed_check_enabled", ""), f(
79
- r,
80
- "payload_size",
81
- /*livenessBlobSize*/
82
- s[1]
83
- ), f(r, "style", l = /*idrndClosed*/
84
- s[3] ? "opacity: 0; pointer-events: none;" : "opacity: 1;"), ie(t, "class", "flex justify-center w-full h-full relative bg-black");
85
- },
86
- m(i, u) {
87
- R(i, t, u), o && o.m(t, null), D(t, a), D(t, r), s[11](r), D(t, b), n && n.m(t, null), c = !0;
88
- },
89
- p(i, u) {
90
- /*$ready*/
91
- i[7] && !/*idrndClosed*/
92
- i[3] && !/*idrndLoading*/
93
- i[4] ? o ? (o.p(i, u), u[0] & /*$ready, idrndClosed, idrndLoading*/
94
- 152 && g(o, 1)) : (o = re(i), o.c(), g(o, 1), o.m(t, a)) : o && (J(), h(o, 1, 1, () => {
95
- o = null;
96
- }), Q()), (!c || u[0] & /*$selectedVideoDeviceId*/
97
- 64) && f(
98
- r,
99
- "device_id",
100
- /*$selectedVideoDeviceId*/
101
- i[6]
102
- ), (!c || u[0] & /*livenessBlobSize*/
103
- 2) && f(
104
- r,
105
- "payload_size",
106
- /*livenessBlobSize*/
107
- i[1]
108
- ), (!c || u[0] & /*idrndClosed*/
109
- 8 && l !== (l = /*idrndClosed*/
110
- i[3] ? "opacity: 0; pointer-events: none;" : "opacity: 1;")) && f(r, "style", l), /*idrndClosed*/
111
- i[3] && !/*idrndLoading*/
112
- i[4] ? n ? (n.p(i, u), u[0] & /*idrndClosed, idrndLoading*/
113
- 24 && g(n, 1)) : (n = se(i), n.c(), g(n, 1), n.m(t, null)) : n && (J(), h(n, 1, 1, () => {
114
- n = null;
115
- }), Q());
116
- },
117
- i(i) {
118
- c || (g(o), g(n), c = !0);
119
- },
120
- o(i) {
121
- h(o), h(n), c = !1;
122
- },
123
- d(i) {
124
- i && oe(t), o && o.d(), s[11](null), n && n.d();
125
- }
126
- };
127
- }
128
- function Te() {
129
- ({}).VITE_USE_DEV === "true" ? import("./index-idlf-detector_18843221_3.3.2.js") : import("./index-idlf-detector_a5efb00c_3.3.2.js");
130
- }
131
- function Me(s, t, a) {
132
- let r, l, b, c, o, n, i, u, S;
133
- _(s, V, (e) => a(6, r = e)), _(s, Y, (e) => a(16, l = e)), _(s, x, (e) => a(18, c = e)), _(s, $, (e) => a(19, o = e)), _(s, L, (e) => a(20, n = e)), _(s, E, (e) => a(7, i = e)), _(s, z, (e) => a(21, u = e)), _(s, ee, (e) => a(22, S = e));
134
- let { livenessBlobSize: W } = t, { cameraDeviceId: y } = t;
135
- const k = Se("data:image/png;base64");
136
- _(s, k, (e) => a(17, b = e));
137
- let { widgetInstance: d } = t, P = !1, p = !0, v = !0, F = !1, w = !0, B = "text-blue-400";
138
- ye(async () => {
139
- Ce("Mounting Stream Collector!"), m(z, u = !0, u), m(E, i = !1, i), ce(), Te(), de(), le();
140
- });
141
- function ce() {
142
- F = !1, m(ee, S = Ie.FRONT_CAMERA, S), m(L, n = "faceCollector.stayInFrame", n);
143
- }
144
- function le() {
145
- window.addEventListener("focus", j), window.addEventListener("blur", G), document.addEventListener("visibilitychange", H);
146
- }
147
- function j() {
148
- w = !0;
149
- }
150
- function G() {
151
- w = !1;
152
- }
153
- function H() {
154
- document.hidden ? w = !1 : w = !0;
155
- }
156
- function de() {
157
- d.addEventListener("open", async (e) => {
158
- a(3, p = !1), a(4, v = !1), m(E, i = !0, i), m(z, u = !1, u), window.dispatchEvent(new CustomEvent(
159
- "stream-ready",
160
- {
161
- detail: {
162
- message: "Stream de vídeo pronto para captura"
163
- }
164
- }
165
- ));
166
- }), d.addEventListener("error", (e) => {
167
- te("Stream Collector error:", e), a(3, p = !0), a(4, v = !1), m(E, i = !1, i), window.dispatchEvent(new CustomEvent(
168
- "stream-error",
169
- {
170
- detail: {
171
- message: e.detail[0]?.message || "Erro na câmera",
172
- error: e
173
- }
174
- }
175
- ));
176
- }), d.addEventListener("faceDetection", (e) => {
177
- m(
178
- L,
179
- n = e.detail[0].errors[0] ? "faceCollector.stayInFrame" : "faceCollector.capturing",
180
- n
181
- ), a(5, B = e.detail[0].errors[0] ? "text-blue-400" : "text-green-400");
182
- }), d.addEventListener("detection", (e) => {
183
- m(
184
- L,
185
- n = e.detail[0].errors[0] ? "faceCollector.stayInFrame" : "faceCollector.capturing",
186
- n
187
- ), a(5, B = e.detail[0].errors[0] ? "text-blue-400" : "text-green-400");
188
- }), d.addEventListener("close", async (e) => {
189
- a(3, p = !0), a(4, v = !1), w || (Le("Video stream was closed due to loss of focus"), window.dispatchEvent(new CustomEvent(
190
- "stream-lost-focus",
191
- {
192
- detail: {
193
- message: "Stream de vídeo foi fechado por perda de foco"
194
- }
195
- }
196
- )));
197
- }), d.addEventListener("initialize", async (e) => {
198
- P = !0, m($, o = !0, o);
199
- try {
200
- d.setLicense(ze, "faceDetector");
201
- } catch (C) {
202
- te("Error setting license:", C);
203
- }
204
- !F && P && await K();
205
- }), d.addEventListener("capture", async (e) => {
206
- const { encryptedFile: C, photo: ge } = e.detail[0];
207
- m(x, c = C, c);
208
- const q = (await ae(ge)).split(",");
209
- F = !0, m(k, b = q[0], b), m(Y, l = q[1], l);
210
- try {
211
- window.dispatchEvent(new CustomEvent(
212
- "stream-capture",
213
- {
214
- detail: {
215
- image: l,
216
- blob: (await ae(C)).split(",")[1],
217
- status: "success"
218
- }
219
- }
220
- ));
221
- } catch (X) {
222
- let Z = X instanceof Error ? X.message : "UNKNOWN", pe = ke[Z] || "Erro desconhecido";
223
- window.dispatchEvent(new CustomEvent(
224
- "stream-capture",
225
- {
226
- detail: {
227
- errorCode: Z,
228
- translatedError: pe,
229
- status: "error"
230
- }
231
- }
232
- ));
233
- }
234
- });
235
- }
236
- async function K() {
237
- y && m(V, r = y, r), a(4, v = !0), p && d && "openCamera" in d && d.openCamera(), a(3, p = !1);
238
- }
239
- async function ue() {
240
- d.takePhoto();
241
- }
242
- async function U() {
243
- !p && !v || (a(4, v = !0), m(V, r = "", r), await K());
244
- }
245
- const fe = E.subscribe((e) => {
246
- e && window.dispatchEvent(new CustomEvent("brycc-camera-ready"));
247
- }), me = z.subscribe((e) => {
248
- e && window.dispatchEvent(new CustomEvent("brycc-face-initialized"));
249
- });
250
- De(() => {
251
- fe(), me(), window.removeEventListener("focus", j), window.removeEventListener("blur", G), document.removeEventListener("visibilitychange", H);
252
- });
253
- function be(e) {
254
- Fe[e ? "unshift" : "push"](() => {
255
- d = e, a(0, d);
256
- });
257
- }
258
- const _e = async () => {
259
- await U();
260
- };
261
- return s.$$set = (e) => {
262
- "livenessBlobSize" in e && a(1, W = e.livenessBlobSize), "cameraDeviceId" in e && a(9, y = e.cameraDeviceId), "widgetInstance" in e && a(0, d = e.widgetInstance);
263
- }, [
264
- d,
265
- W,
266
- U,
267
- p,
268
- v,
269
- B,
270
- r,
271
- i,
272
- k,
273
- y,
274
- ue,
275
- be,
276
- _e
277
- ];
278
- }
279
- class Ne extends ve {
280
- constructor(t) {
281
- super(), he(
282
- this,
283
- {
284
- target: this.shadowRoot,
285
- props: Ee(this.attributes),
286
- customElement: !0
287
- },
288
- Me,
289
- Oe,
290
- we,
291
- {
292
- livenessBlobSize: 1,
293
- cameraDeviceId: 9,
294
- widgetInstance: 0,
295
- capture: 10,
296
- reOpenCamera: 2
297
- },
298
- null,
299
- [-1, -1]
300
- ), t && (t.target && R(t.target, this, t.anchor), t.props && (this.$set(t.props), I()));
301
- }
302
- static get observedAttributes() {
303
- return [
304
- "livenessBlobSize",
305
- "cameraDeviceId",
306
- "widgetInstance",
307
- "capture",
308
- "reOpenCamera"
309
- ];
310
- }
311
- get livenessBlobSize() {
312
- return this.$$.ctx[1];
313
- }
314
- set livenessBlobSize(t) {
315
- this.$$set({ livenessBlobSize: t }), I();
316
- }
317
- get cameraDeviceId() {
318
- return this.$$.ctx[9];
319
- }
320
- set cameraDeviceId(t) {
321
- this.$$set({ cameraDeviceId: t }), I();
322
- }
323
- get widgetInstance() {
324
- return this.$$.ctx[0];
325
- }
326
- set widgetInstance(t) {
327
- this.$$set({ widgetInstance: t }), I();
328
- }
329
- get capture() {
330
- return this.$$.ctx[10];
331
- }
332
- get reOpenCamera() {
333
- return this.$$.ctx[2];
334
- }
335
- }
336
- customElements.define("stream-collector", Ne);
337
- export {
338
- Ne as default
339
- };