bry-biometric-collector 2.4.0 → 2.4.1-RC02

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 (22) hide show
  1. package/README.md +52 -8
  2. package/dist/DocumentCollector_5f82eb10_2.4.1-RC02.js +1121 -0
  3. package/dist/FaceCollector_dce93c4d_2.4.1-RC02.js +1992 -0
  4. package/dist/{TakePictureBtn_3c447bd3_2.4.0.js → TakePictureBtn_22c86e39_2.4.1-RC02.js} +93 -93
  5. package/dist/{___vite-browser-external_commonjs-proxy_12b6e368_2.4.0.js → ___vite-browser-external_commonjs-proxy_1b93077b_2.4.1-RC02.js} +1 -1
  6. package/dist/bry-biometric-collector-main.js +3 -2
  7. package/dist/{en-us_46a6e2d2_2.4.0.js → en-us_99b30d39_2.4.1-RC02.js} +2 -1
  8. package/dist/{es-cl_af82486d_2.4.0.js → es-cl_cfa50670_2.4.1-RC02.js} +7 -6
  9. package/dist/{fingersApi_8e2acbb1_2.4.0.js → fingersApi_5ac257a6_2.4.1-RC02.js} +5 -4
  10. package/dist/index.d.ts +0 -6
  11. package/dist/index.js +3 -2
  12. package/dist/{index_9664d71c_2.4.0.js → index_57e8f323_2.4.1-RC02.js} +7 -6
  13. package/dist/{index_898ffd1f_2.4.0.js → index_e8c1550c_2.4.1-RC02.js} +5 -4
  14. package/dist/{main_ade50a8c_2.4.0.js → main_37501062_2.4.1-RC02.js} +1292 -1272
  15. package/dist/{pt-br_b6088a59_2.4.0.js → pt-br_d5ca6103_2.4.1-RC02.js} +8 -7
  16. package/dist/style.css +1 -1
  17. package/package.json +2 -4
  18. package/dist/DocumentCollector_33be8c4f_2.4.0.js +0 -1249
  19. package/dist/FaceCollector_c6ab76c4_2.4.0.js +0 -1985
  20. /package/dist/{face_api_0e3ce8c8_2.4.0.js → face_api_0e3ce8c8_2.4.1-RC02.js} +0 -0
  21. /package/dist/{index-no-detector_4b302e78_2.4.0.js → index-no-detector_4b302e78_2.4.1-RC02.js} +0 -0
  22. /package/dist/{index-no-detector_b6972e40_2.4.0.js → index-no-detector_b6972e40_2.4.1-RC02.js} +0 -0
@@ -1,1249 +0,0 @@
1
- import { S as ei, q as ti, r as wt, t as ii, w as U, x as I, z as ie, aU as Qe, B as u, b7 as Ie, D as c, H as J, I as A, a4 as je, b8 as Oe, L as ue, N as q, O as P, b9 as Xi, P as Z, Q as Ce, R as V, T as pe, U as ft, V as We, W as re, X as Fe, Y as Yi, Z as He, a0 as Gi, _ as Te, a1 as Be, a2 as dt, a3 as Lt, J as St, a5 as Ue, a7 as Xe, a8 as Pt, a9 as Et, aa as Ye, ac as ht, ae as Zt, ah as gt, $ as Qi, an as Vi, ao as Ji, ap as Ki, aq as qi, ar as xi, K as b, as as $i, at as mt, au as Le, j as ai, av as bt, aE as ea, d as Ge, aF as Wt, aG as It, aH as ta, ax as Ct, aI as ia, aJ as aa, aK as la, C as we, aL as sa, az as Ft, aM as oa, aN as ze, aO as na, E as fe, aR as _e, aS as Me, aT as ve, aQ as ca, y as x, G as ee, aV as ra, aP as _t, aW as Ht, aX as ua, a$ as Re, b1 as fa, b2 as da, b3 as Bt, b5 as Ut, b6 as ha } from "./main_ade50a8c_2.4.0.js";
2
- import { C as ga, T as ma, a as ba } from "./TakePictureBtn_3c447bd3_2.4.0.js";
3
- const Ia = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwNiIgaGVpZ2h0PSI4OTAiIHZpZXdCb3g9IjAgMCAxMjA2IDg5MCIgZmlsbD0ibm9uZSIgb3BhY2l0eT0iMC4yIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZF8xOF80KSIgb3BhY2l0eT0iMCI+CiAgICA8bWFzayBpZD0icGF0aC0xLWluc2lkZS0xXzE4XzQiIGZpbGw9IndoaXRlIj4KICAgIDxyZWN0IHg9IjQiIHdpZHRoPSIxMTk4IiBoZWlnaHQ9Ijg4MiIgcng9IjYiLz4KICAgIDwvbWFzaz4KICAgIDxyZWN0IHg9IjQiIHdpZHRoPSIxMTk4IiBoZWlnaHQ9Ijg4MiIgcng9IjYiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS1vcGFjaXR5PSIwLjkiIHN0cm9rZS13aWR0aD0iMTYiIHNoYXBlLXJlbmRlcmluZz0iY3Jpc3BFZGdlcyIgbWFzaz0idXJsKCNwYXRoLTEtaW5zaWRlLTFfMThfNCkiLz4KICAgIDwvZz4KICAgIDxtYXNrIGlkPSJwYXRoLTItaW5zaWRlLTJfMThfNCIgZmlsbD0id2hpdGUiPgogICAgPHJlY3QgeD0iMjE5LjI3OCIgeT0iMjk2IiB3aWR0aD0iMzM4Ljg2MyIgaGVpZ2h0PSI0NjgiIHJ4PSI3Ii8+CiAgICA8L21hc2s+CiAgICA8cmVjdCB4PSIyMTkuMjc4IiB5PSIyOTYiIHdpZHRoPSIzMzguODYzIiBoZWlnaHQ9IjQ2OCIgcng9IjciIHN0cm9rZT0id2hpdGUiIHN0cm9rZS1vcGFjaXR5PSIwLjkiIHN0cm9rZS13aWR0aD0iMTYiIG1hc2s9InVybCgjcGF0aC0yLWluc2lkZS0yXzE4XzQpIi8+CiAgICA8ZWxsaXBzZSBjeD0iMzg5LjIzOCIgY3k9IjUxMS4yMjgiIHJ4PSI4Ni4yMzc2IiByeT0iODUuMjI4NCIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC4wOCIvPgogICAgPHBhdGggZD0iTTQ3MS40NzUgNTExLjIyOEM0NzEuNDc1IDU1Ni4wNDUgNDM0LjcwMSA1OTIuNDU3IDM4OS4yMzggNTkyLjQ1N0MzNDMuNzc0IDU5Mi40NTcgMzA3IDU1Ni4wNDUgMzA3IDUxMS4yMjhDMzA3IDQ2Ni40MTEgMzQzLjc3NCA0MzAgMzg5LjIzOCA0MzBDNDM0LjcwMSA0MzAgNDcxLjQ3NSA0NjYuNDExIDQ3MS40NzUgNTExLjIyOFoiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS1vcGFjaXR5PSIwLjkiIHN0cm9rZS13aWR0aD0iOCIvPgogICAgPHBhdGggZD0iTTM4Ny4zOCA2MDhDNTM1LjI2IDYwOCA1MzkuODggNzQzLjQ3MyA1MzkuODggNzQzLjQ3M0wyMzkgNzQzLjVDMjM5IDc0My41IDIzOS41IDYwOCAzODcuMzggNjA4WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC4wOCIvPgogICAgPHBhdGggZD0iTTM4Ny4zOCA2MTJDNDU5Ljc5NCA2MTIgNDk2LjY0OSA2NDUuMDIgNTE1LjYyNSA2NzcuNzQzQzUyNS4xOCA2OTQuMjIgNTMwLjI1NSA3MTAuNzMzIDUzMi45MzggNzIzLjE1QzUzNC4yNzggNzI5LjM1MSA1MzUuMDE2IDczNC41MDggNTM1LjQxOCA3MzguMDk4QzUzNS40NzMgNzM4LjU4NiA1MzUuNTIxIDczOS4wNDUgNTM1LjU2NCA3MzkuNDc0TDI0My4xODQgNzM5LjVDMjQzLjIxNiA3MzkuMDM3IDI0My4yNTMgNzM4LjUzOCAyNDMuMjk3IDczOC4wMDNDMjQzLjU5IDczNC40MTQgMjQ0LjE3MSA3MjkuMjU4IDI0NS4zMjIgNzIzLjA1OEMyNDcuNjI2IDcxMC42NDIgMjUyLjE5NyA2OTQuMTM4IDI2MS4yNDEgNjc3LjY3NkMyNzAuMjczIDY2MS4yMzYgMjgzLjc0OCA2NDQuODY0IDMwMy44OTEgNjMyLjU4N0MzMjQuMDI0IDYyMC4zMTYgMzUxLjA0MiA2MTIgMzg3LjM4IDYxMloiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS1vcGFjaXR5PSIwLjkiIHN0cm9rZS13aWR0aD0iOCIvPgogICAgPGRlZnM+CiAgICA8ZmlsdGVyIGlkPSJmaWx0ZXIwX2RfMThfNCIgeD0iMCIgeT0iMCIgd2lkdGg9IjEyMDYiIGhlaWdodD0iODkwIiBmaWx0ZXJVbml0cz0idXNlclNwYWNlT25Vc2UiIGNvbG9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiI+CiAgICA8ZmVGbG9vZCBmbG9vZC1vcGFjaXR5PSIwIiByZXN1bHQ9IkJhY2tncm91bmRJbWFnZUZpeCIvPgogICAgPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMTI3IDAiIHJlc3VsdD0iaGFyZEFscGhhIi8+CiAgICA8ZmVPZmZzZXQgZHk9IjQiLz4KICAgIDxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjIiLz4KICAgIDxmZUNvbXBvc2l0ZSBpbjI9ImhhcmRBbHBoYSIgb3BlcmF0b3I9Im91dCIvPgogICAgPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMjUgMCIvPgogICAgPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbjI9IkJhY2tncm91bmRJbWFnZUZpeCIgcmVzdWx0PSJlZmZlY3QxX2Ryb3BTaGFkb3dfMThfNCIvPgogICAgPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMThfNCIgcmVzdWx0PSJzaGFwZSIvPgogICAgPC9maWx0ZXI+CiAgICA8L2RlZnM+CiAgICA8L3N2Zz4KICAgIA==";
4
- function Ca(l) {
5
- let e, t, a, s;
6
- return {
7
- c() {
8
- e = I("div"), t = I("div"), a = I("img"), this.c = ie, Qe(a.src, s = Ia) || u(a, "src", s), u(a, "alt", "document"), Ie(
9
- t,
10
- "width",
11
- /*docWidth*/
12
- l[0] + "%"
13
- ), Ie(
14
- t,
15
- "height",
16
- /*docHeight*/
17
- l[1] + "%"
18
- ), Ie(
19
- t,
20
- "margin-top",
21
- /*docMarginTop*/
22
- l[2] + "%"
23
- ), u(e, "class", "absolute inset-0 flex justify-center items-center");
24
- },
25
- m(n, o) {
26
- U(n, e, o), c(e, t), c(t, a);
27
- },
28
- p(n, [o]) {
29
- o & /*docWidth*/
30
- 1 && Ie(
31
- t,
32
- "width",
33
- /*docWidth*/
34
- n[0] + "%"
35
- ), o & /*docHeight*/
36
- 2 && Ie(
37
- t,
38
- "height",
39
- /*docHeight*/
40
- n[1] + "%"
41
- ), o & /*docMarginTop*/
42
- 4 && Ie(
43
- t,
44
- "margin-top",
45
- /*docMarginTop*/
46
- n[2] + "%"
47
- );
48
- },
49
- i: ie,
50
- o: ie,
51
- d(n) {
52
- n && J(e);
53
- }
54
- };
55
- }
56
- function pa(l, e, t) {
57
- let a, s;
58
- A(l, je, (f) => t(3, a = f)), A(l, Oe, (f) => t(4, s = f));
59
- let n, o, r;
60
- return l.$$.update = () => {
61
- l.$$.dirty & /*$videoStore, $docDimensions*/
62
- 24 && a && (t(0, n = s.width / a.videoWidth * 100), t(1, o = s.height / a.videoHeight * 100), t(2, r = s.y / a.videoHeight));
63
- }, [n, o, r, a, s];
64
- }
65
- class li extends ei {
66
- constructor(e) {
67
- super(), ti(
68
- this,
69
- {
70
- target: this.shadowRoot,
71
- props: ii(this.attributes),
72
- customElement: !0
73
- },
74
- pa,
75
- Ca,
76
- wt,
77
- {},
78
- null
79
- ), e && e.target && U(e.target, this, e.anchor);
80
- }
81
- }
82
- customElements.define("document-overlay", li);
83
- function Xt(l) {
84
- let e, t, a;
85
- return {
86
- c() {
87
- e = I("video"), u(e, "id", "bry-cc-camera-video-tag"), u(e, "class", "absolute -z-10"), e.playsInline = !0, e.muted = !0, e.autoplay = !0;
88
- },
89
- m(s, n) {
90
- U(s, e, n), l[38](e), t || (a = fe(
91
- e,
92
- "play",
93
- /*play*/
94
- l[3],
95
- { once: !0 }
96
- ), t = !0);
97
- },
98
- p: ie,
99
- d(s) {
100
- s && J(e), l[38](null), t = !1, a();
101
- }
102
- };
103
- }
104
- function Yt(l) {
105
- let e, t;
106
- return e = new li({}), {
107
- c() {
108
- _e(e.$$.fragment);
109
- },
110
- m(a, s) {
111
- Me(e, a, s), t = !0;
112
- },
113
- i(a) {
114
- t || (Z(e.$$.fragment, a), t = !0);
115
- },
116
- o(a) {
117
- V(e.$$.fragment, a), t = !1;
118
- },
119
- d(a) {
120
- ve(e, a);
121
- }
122
- };
123
- }
124
- function Gt(l) {
125
- let e, t;
126
- return e = new ca({}), {
127
- c() {
128
- _e(e.$$.fragment);
129
- },
130
- m(a, s) {
131
- Me(e, a, s), t = !0;
132
- },
133
- i(a) {
134
- t || (Z(e.$$.fragment, a), t = !0);
135
- },
136
- o(a) {
137
- V(e.$$.fragment, a), t = !1;
138
- },
139
- d(a) {
140
- ve(e, a);
141
- }
142
- };
143
- }
144
- function Qt(l) {
145
- let e, t;
146
- return e = new ga({}), {
147
- c() {
148
- _e(e.$$.fragment);
149
- },
150
- m(a, s) {
151
- Me(e, a, s), t = !0;
152
- },
153
- i(a) {
154
- t || (Z(e.$$.fragment, a), t = !0);
155
- },
156
- o(a) {
157
- V(e.$$.fragment, a), t = !1;
158
- },
159
- d(a) {
160
- ve(e, a);
161
- }
162
- };
163
- }
164
- function Vt(l) {
165
- let e, t;
166
- return e = new ma({
167
- props: {
168
- id: "bry-cc-capture-btn",
169
- disabled: !/*$ready*/
170
- l[13],
171
- hidden: (
172
- /*$cameraStatusStore*/
173
- l[12] !== q.OK
174
- ),
175
- handler: (
176
- /*capture*/
177
- l[28]
178
- )
179
- }
180
- }), {
181
- c() {
182
- _e(e.$$.fragment);
183
- },
184
- m(a, s) {
185
- Me(e, a, s), t = !0;
186
- },
187
- p(a, s) {
188
- const n = {};
189
- s[0] & /*$ready*/
190
- 8192 && (n.disabled = !/*$ready*/
191
- a[13]), s[0] & /*$cameraStatusStore*/
192
- 4096 && (n.hidden = /*$cameraStatusStore*/
193
- a[12] !== q.OK), e.$set(n);
194
- },
195
- i(a) {
196
- t || (Z(e.$$.fragment, a), t = !0);
197
- },
198
- o(a) {
199
- V(e.$$.fragment, a), t = !1;
200
- },
201
- d(a) {
202
- ve(e, a);
203
- }
204
- };
205
- }
206
- function Jt(l) {
207
- let e, t = (
208
- /*$_*/
209
- l[22]("faceCollector.stayStill") + ""
210
- ), a;
211
- return {
212
- c() {
213
- e = I("span"), a = x(t), u(e, "class", we() ? "absolute left-1/2 -translate-x-1/2 top-[15%] ce-dui-badge ce-dui-badge-lg h-[2em] text-xl xl:text-base w-[15.1em]" : "absolute left-1/2 -translate-x-1/2 top-[4%] ce-dui-badge ce-dui-badge-lg h-[2em] text-xl xl:text-base w-[15.1em]");
214
- },
215
- m(s, n) {
216
- U(s, e, n), c(e, a);
217
- },
218
- p(s, n) {
219
- n[0] & /*$_*/
220
- 4194304 && t !== (t = /*$_*/
221
- s[22]("faceCollector.stayStill") + "") && ee(a, t);
222
- },
223
- d(s) {
224
- s && J(e);
225
- }
226
- };
227
- }
228
- function Kt(l) {
229
- let e, t = (
230
- /*$_*/
231
- l[22](`${/*$faceValidationAlert*/
232
- l[15]}`) + ""
233
- ), a;
234
- return {
235
- c() {
236
- e = I("span"), a = x(t), u(e, "class", we() ? "absolute left-1/2 -translate-x-1/2 top-[15%] ce-dui-badge ce-dui-badge-lg h-[2em] text-xl xl:text-base w-[15.1em]" : "absolute left-1/2 -translate-x-1/2 top-[4%] ce-dui-badge ce-dui-badge-lg h-[2em] text-xl xl:text-base w-[15.1em]");
237
- },
238
- m(s, n) {
239
- U(s, e, n), c(e, a);
240
- },
241
- p(s, n) {
242
- n[0] & /*$_, $faceValidationAlert*/
243
- 4227072 && t !== (t = /*$_*/
244
- s[22](`${/*$faceValidationAlert*/
245
- s[15]}`) + "") && ee(a, t);
246
- },
247
- d(s) {
248
- s && J(e);
249
- }
250
- };
251
- }
252
- function qt(l) {
253
- let e, t, a, s, n;
254
- function o(m, w) {
255
- return (
256
- /*$isLoading*/
257
- m[23] ? _a : wa
258
- );
259
- }
260
- let r = o(l), f = r(l);
261
- return {
262
- c() {
263
- e = I("slot"), t = I("div"), a = I("img"), n = P(), f.c(), Qe(a.src, s = ra) || u(a, "src", s), u(a, "alt", "loading gif"), u(a, "class", "m-auto h-[10em] lg:h-[12em]"), u(t, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), u(e, "name", "loading-camera-gif"), u(e, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]");
264
- },
265
- m(m, w) {
266
- U(m, e, w), c(e, t), c(t, a), c(t, n), f.m(t, null);
267
- },
268
- p(m, w) {
269
- r === (r = o(m)) && f ? f.p(m, w) : (f.d(1), f = r(m), f && (f.c(), f.m(t, null)));
270
- },
271
- d(m) {
272
- m && J(e), f.d();
273
- }
274
- };
275
- }
276
- function wa(l) {
277
- let e, t = (
278
- /*$_*/
279
- l[22]("faceCollector.initiatingCamera") + ""
280
- ), a;
281
- return {
282
- c() {
283
- e = I("span"), a = x(t), u(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
284
- },
285
- m(s, n) {
286
- U(s, e, n), c(e, a);
287
- },
288
- p(s, n) {
289
- n[0] & /*$_*/
290
- 4194304 && t !== (t = /*$_*/
291
- s[22]("faceCollector.initiatingCamera") + "") && ee(a, t);
292
- },
293
- d(s) {
294
- s && J(e);
295
- }
296
- };
297
- }
298
- function _a(l) {
299
- let e;
300
- return {
301
- c() {
302
- e = I("span"), e.textContent = "Loading camera...", u(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
303
- },
304
- m(t, a) {
305
- U(t, e, a);
306
- },
307
- p: ie,
308
- d(t) {
309
- t && J(e);
310
- }
311
- };
312
- }
313
- function xt(l) {
314
- let e, t, a = (
315
- /*$_*/
316
- l[22]("faceCollector.finish") + ""
317
- ), s, n, o, r, f = (
318
- /*$_*/
319
- l[22]("faceCollector.retakePhoto") + ""
320
- ), m, w, D;
321
- return {
322
- c() {
323
- e = I("div"), t = I("button"), s = x(a), o = P(), r = I("button"), m = x(f), t.disabled = n = /*$justification*/
324
- l[17].length === 0, u(t, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), u(r, "id", "bry-cc-retake-button"), u(r, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), u(e, "class", "ce-dui-btn-group flex");
325
- },
326
- m(h, d) {
327
- U(h, e, d), c(e, t), c(t, s), c(e, o), c(e, r), c(r, m), w || (D = [
328
- fe(
329
- t,
330
- "click",
331
- /*click_handler*/
332
- l[42]
333
- ),
334
- fe(
335
- r,
336
- "click",
337
- /*click_handler_1*/
338
- l[43]
339
- )
340
- ], w = !0);
341
- },
342
- p(h, d) {
343
- d[0] & /*$_*/
344
- 4194304 && a !== (a = /*$_*/
345
- h[22]("faceCollector.finish") + "") && ee(s, a), d[0] & /*$justification*/
346
- 131072 && n !== (n = /*$justification*/
347
- h[17].length === 0) && (t.disabled = n), d[0] & /*$_*/
348
- 4194304 && f !== (f = /*$_*/
349
- h[22]("faceCollector.retakePhoto") + "") && ee(m, f);
350
- },
351
- d(h) {
352
- h && J(e), w = !1, _t(D);
353
- }
354
- };
355
- }
356
- function Ma(l) {
357
- let e, t;
358
- return e = new ba({ props: { handler: (
359
- /*func*/
360
- l[51]
361
- ) } }), {
362
- c() {
363
- _e(e.$$.fragment);
364
- },
365
- m(a, s) {
366
- Me(e, a, s), t = !0;
367
- },
368
- p: ie,
369
- i(a) {
370
- t || (Z(e.$$.fragment, a), t = !0);
371
- },
372
- o(a) {
373
- V(e.$$.fragment, a), t = !1;
374
- },
375
- d(a) {
376
- ve(e, a);
377
- }
378
- };
379
- }
380
- function va(l) {
381
- let e, t, a, s, n, o, r, f, m;
382
- const w = [Aa, ka, ya, Da], D = [];
383
- function h(d, N) {
384
- return (
385
- /*$captured*/
386
- d[14] ? (
387
- /*$requestResult*/
388
- d[19] !== Le.OK ? 1 : (
389
- /*$saved*/
390
- d[16] ? 3 : 2
391
- )
392
- ) : 0
393
- );
394
- }
395
- return o = h(l), r = D[o] = w[o](l), {
396
- c() {
397
- e = I("div"), t = I("img"), n = P(), r.c(), u(t, "class", "m-auto col-start-1 col-end-1 max-h-[23.2em]"), Qe(t.src, a = /*$dataTypePrefix*/
398
- l[20] + "," + /*$image*/
399
- l[18]) || u(t, "src", a), t.hidden = s = !/*$captured*/
400
- l[14] || !/*$showFaceWhileValidating*/
401
- l[24], u(t, "alt", ""), u(e, "class", f = "grid-cols-1 grid-rows-2 sm:grid-cols-2 sm:grid-rows-1 gap-[.5em] " + (/*$showFaceWhileValidating*/
402
- l[24] ? "grid overflow-hidden" : "absolute -translate-y-1/2 -translate-x-1/2 top-1/2 left-1/2 overflow-visible"));
403
- },
404
- m(d, N) {
405
- U(d, e, N), c(e, t), c(e, n), D[o].m(e, null), m = !0;
406
- },
407
- p(d, N) {
408
- (!m || N[0] & /*$dataTypePrefix, $image*/
409
- 1310720 && !Qe(t.src, a = /*$dataTypePrefix*/
410
- d[20] + "," + /*$image*/
411
- d[18])) && u(t, "src", a), (!m || N[0] & /*$captured, $showFaceWhileValidating*/
412
- 16793600 && s !== (s = !/*$captured*/
413
- d[14] || !/*$showFaceWhileValidating*/
414
- d[24])) && (t.hidden = s);
415
- let v = o;
416
- o = h(d), o === v ? D[o].p(d, N) : (Ce(), V(D[v], 1, 1, () => {
417
- D[v] = null;
418
- }), pe(), r = D[o], r ? r.p(d, N) : (r = D[o] = w[o](d), r.c()), Z(r, 1), r.m(e, null)), (!m || N[0] & /*$showFaceWhileValidating*/
419
- 16777216 && f !== (f = "grid-cols-1 grid-rows-2 sm:grid-cols-2 sm:grid-rows-1 gap-[.5em] " + (/*$showFaceWhileValidating*/
420
- d[24] ? "grid overflow-hidden" : "absolute -translate-y-1/2 -translate-x-1/2 top-1/2 left-1/2 overflow-visible"))) && u(e, "class", f);
421
- },
422
- i(d) {
423
- m || (Z(r), m = !0);
424
- },
425
- o(d) {
426
- V(r), m = !1;
427
- },
428
- d(d) {
429
- d && J(e), D[o].d();
430
- }
431
- };
432
- }
433
- function Da(l) {
434
- let e, t, a = (
435
- /*$_*/
436
- l[22]("docCollector.captured") + ""
437
- ), s, n, o, r, f = (
438
- /*$_*/
439
- l[22]("faceCollector.retakePhoto") + ""
440
- ), m, w, D = ai(fa).faceStrategy !== da.DISABLED, h, d, N, v = D && Na();
441
- return {
442
- c() {
443
- e = I("div"), t = I("h1"), s = x(a), n = P(), o = I("div"), r = I("button"), m = x(f), w = P(), v && v.c(), u(t, "class", "text-3xl font-bold pb-[1em] transition-opacity"), u(r, "id", "bry-cc-retake-button"), u(r, "class", "ce-dui-btn ce-dui-btn-block flex-shrink text-base"), u(o, "class", "flex flex-row"), Bt(o, "ce-dui-btn-group", !/*$exportButtonDisabled*/
444
- l[25]);
445
- },
446
- m(_, k) {
447
- U(_, e, k), c(e, t), c(t, s), c(e, n), c(e, o), c(o, r), c(r, m), c(o, w), v && v.m(o, null), h = !0, d || (N = fe(
448
- r,
449
- "click",
450
- /*click_handler_6*/
451
- l[50]
452
- ), d = !0);
453
- },
454
- p(_, k) {
455
- (!h || k[0] & /*$_*/
456
- 4194304) && a !== (a = /*$_*/
457
- _[22]("docCollector.captured") + "") && ee(s, a), (!h || k[0] & /*$_*/
458
- 4194304) && f !== (f = /*$_*/
459
- _[22]("faceCollector.retakePhoto") + "") && ee(m, f), (!h || k[0] & /*$exportButtonDisabled*/
460
- 33554432) && Bt(o, "ce-dui-btn-group", !/*$exportButtonDisabled*/
461
- _[25]);
462
- },
463
- i(_) {
464
- h || (Z(v), h = !0);
465
- },
466
- o(_) {
467
- V(v), h = !1;
468
- },
469
- d(_) {
470
- _ && J(e), v && v.d(), d = !1, N();
471
- }
472
- };
473
- }
474
- function ya(l) {
475
- let e, t, a = (
476
- /*$_*/
477
- l[22]("faceCollector.unconformities") + ""
478
- ), s, n, o, r, f, m = (
479
- /*$_*/
480
- l[22]("faceCollector.provideAReasonForTheLowQualityCapture") + ""
481
- ), w, D, h, d, N, v, _, k, K = (
482
- /*$_*/
483
- l[22]("faceCollector.thisInformationIsRequired") + ""
484
- ), le, se, $, z, W, T = (
485
- /*$captured*/
486
- l[14] && $t(l)
487
- );
488
- return {
489
- c() {
490
- e = I("div"), t = I("h1"), s = x(a), n = P(), o = I("div"), r = I("label"), f = I("span"), w = x(m), D = P(), h = I("textarea"), N = P(), v = I("label"), _ = I("span"), k = x("("), le = x(K), se = x(")"), $ = P(), T && T.c(), u(t, "class", "text-3xl font-bold pb-[1em] transition-opacity"), u(f, "class", "ce-dui-label-text text-base"), u(r, "class", "ce-dui-label"), u(r, "for", "justification"), u(h, "contenteditable", ""), u(h, "id", "justification"), u(h, "class", "ce-dui-textarea ce-dui-textarea-bordered h-[6em] text-base"), u(h, "placeholder", d = /*$_*/
491
- l[22]("faceCollector.yourJustification")), u(_, "class", "ce-dui-label-text-alt text-base"), u(v, "class", "ce-dui-label"), u(v, "for", "justification"), u(o, "class", "ce-dui-form-control mt-[2.5em]");
492
- },
493
- m(F, j) {
494
- U(F, e, j), c(e, t), c(t, s), c(e, n), c(e, o), c(o, r), c(r, f), c(f, w), c(o, D), c(o, h), Ut(
495
- h,
496
- /*$justification*/
497
- l[17]
498
- ), c(o, N), c(o, v), c(v, _), c(_, k), c(_, le), c(_, se), c(e, $), T && T.m(e, null), z || (W = fe(
499
- h,
500
- "input",
501
- /*textarea_input_handler*/
502
- l[47]
503
- ), z = !0);
504
- },
505
- p(F, j) {
506
- j[0] & /*$_*/
507
- 4194304 && a !== (a = /*$_*/
508
- F[22]("faceCollector.unconformities") + "") && ee(s, a), j[0] & /*$_*/
509
- 4194304 && m !== (m = /*$_*/
510
- F[22]("faceCollector.provideAReasonForTheLowQualityCapture") + "") && ee(w, m), j[0] & /*$_*/
511
- 4194304 && d !== (d = /*$_*/
512
- F[22]("faceCollector.yourJustification")) && u(h, "placeholder", d), j[0] & /*$justification*/
513
- 131072 && Ut(
514
- h,
515
- /*$justification*/
516
- F[17]
517
- ), j[0] & /*$_*/
518
- 4194304 && K !== (K = /*$_*/
519
- F[22]("faceCollector.thisInformationIsRequired") + "") && ee(le, K), /*$captured*/
520
- F[14] ? T ? T.p(F, j) : (T = $t(F), T.c(), T.m(e, null)) : T && (T.d(1), T = null);
521
- },
522
- i: ie,
523
- o: ie,
524
- d(F) {
525
- F && J(e), T && T.d(), z = !1, W();
526
- }
527
- };
528
- }
529
- function ka(l) {
530
- let e, t, a, s, n = (
531
- /*$_*/
532
- l[22]("faceCollector.finish") + ""
533
- ), o, r, f, m = (
534
- /*$_*/
535
- l[22]("faceCollector.retakePhoto") + ""
536
- ), w, D, h;
537
- function d(_, k) {
538
- return (
539
- /*$requestResult*/
540
- _[19] === Le.TEMPLATE_EXTRACTION_ERROR ? za : Ta
541
- );
542
- }
543
- let N = d(l), v = N(l);
544
- return {
545
- c() {
546
- e = I("div"), v.c(), t = P(), a = I("div"), s = I("button"), o = x(n), r = P(), f = I("button"), w = x(m), s.disabled = !0, u(s, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), u(f, "id", "bry-cc-retake-button"), u(f, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), u(a, "class", "ce-dui-btn-group flex"), u(e, "class", "flex flex-col justify-between");
547
- },
548
- m(_, k) {
549
- U(_, e, k), v.m(e, null), c(e, t), c(e, a), c(a, s), c(s, o), c(a, r), c(a, f), c(f, w), D || (h = [
550
- fe(
551
- s,
552
- "click",
553
- /*click_handler_2*/
554
- l[45]
555
- ),
556
- fe(
557
- f,
558
- "click",
559
- /*click_handler_3*/
560
- l[46]
561
- )
562
- ], D = !0);
563
- },
564
- p(_, k) {
565
- N === (N = d(_)) && v ? v.p(_, k) : (v.d(1), v = N(_), v && (v.c(), v.m(e, t))), k[0] & /*$_*/
566
- 4194304 && n !== (n = /*$_*/
567
- _[22]("faceCollector.finish") + "") && ee(o, n), k[0] & /*$_*/
568
- 4194304 && m !== (m = /*$_*/
569
- _[22]("faceCollector.retakePhoto") + "") && ee(w, m);
570
- },
571
- i: ie,
572
- o: ie,
573
- d(_) {
574
- _ && J(e), v.d(), D = !1, _t(h);
575
- }
576
- };
577
- }
578
- function Aa(l) {
579
- let e;
580
- return {
581
- c() {
582
- e = I("div"), u(e, "class", "");
583
- },
584
- m(t, a) {
585
- U(t, e, a);
586
- },
587
- p: ie,
588
- i: ie,
589
- o: ie,
590
- d(t) {
591
- t && J(e);
592
- }
593
- };
594
- }
595
- function Na(l) {
596
- let e, t;
597
- return e = new ha({
598
- props: { cssClass: "ce-dui-btn-block flex-shrink" }
599
- }), {
600
- c() {
601
- _e(e.$$.fragment);
602
- },
603
- m(a, s) {
604
- Me(e, a, s), t = !0;
605
- },
606
- i(a) {
607
- t || (Z(e.$$.fragment, a), t = !0);
608
- },
609
- o(a) {
610
- V(e.$$.fragment, a), t = !1;
611
- },
612
- d(a) {
613
- ve(e, a);
614
- }
615
- };
616
- }
617
- function $t(l) {
618
- let e, t, a = (
619
- /*$_*/
620
- l[22]("faceCollector.finish") + ""
621
- ), s, n, o, r, f = (
622
- /*$_*/
623
- l[22]("faceCollector.retakePhoto") + ""
624
- ), m, w, D;
625
- return {
626
- c() {
627
- e = I("div"), t = I("button"), s = x(a), o = P(), r = I("button"), m = x(f), t.disabled = n = /*$justification*/
628
- l[17].length === 0, u(t, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink text-base"), u(r, "id", "bry-cc-retake-button"), u(r, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink text-base"), u(e, "class", "ce-dui-btn-group flex");
629
- },
630
- m(h, d) {
631
- U(h, e, d), c(e, t), c(t, s), c(e, o), c(e, r), c(r, m), w || (D = [
632
- fe(
633
- t,
634
- "click",
635
- /*click_handler_4*/
636
- l[48]
637
- ),
638
- fe(
639
- r,
640
- "click",
641
- /*click_handler_5*/
642
- l[49]
643
- )
644
- ], w = !0);
645
- },
646
- p(h, d) {
647
- d[0] & /*$_*/
648
- 4194304 && a !== (a = /*$_*/
649
- h[22]("faceCollector.finish") + "") && ee(s, a), d[0] & /*$justification*/
650
- 131072 && n !== (n = /*$justification*/
651
- h[17].length === 0) && (t.disabled = n), d[0] & /*$_*/
652
- 4194304 && f !== (f = /*$_*/
653
- h[22]("faceCollector.retakePhoto") + "") && ee(m, f);
654
- },
655
- d(h) {
656
- h && J(e), w = !1, _t(D);
657
- }
658
- };
659
- }
660
- function Ta(l) {
661
- let e, t = (
662
- /*$_*/
663
- l[22]("faceCollector.everythingOk") + ""
664
- ), a;
665
- return {
666
- c() {
667
- e = I("h1"), a = x(t), u(e, "class", "text-3xl font-bold pb-[1em] transition-opacity");
668
- },
669
- m(s, n) {
670
- U(s, e, n), c(e, a);
671
- },
672
- p(s, n) {
673
- n[0] & /*$_*/
674
- 4194304 && t !== (t = /*$_*/
675
- s[22]("faceCollector.everythingOk") + "") && ee(a, t);
676
- },
677
- d(s) {
678
- s && J(e);
679
- }
680
- };
681
- }
682
- function za(l) {
683
- let e, t = (
684
- /*$_*/
685
- l[22]("faceCollector.lowQualityCapture") + ""
686
- ), a;
687
- return {
688
- c() {
689
- e = I("h1"), a = x(t), u(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
690
- },
691
- m(s, n) {
692
- U(s, e, n), c(e, a);
693
- },
694
- p(s, n) {
695
- n[0] & /*$_*/
696
- 4194304 && t !== (t = /*$_*/
697
- s[22]("faceCollector.lowQualityCapture") + "") && ee(a, t);
698
- },
699
- d(s) {
700
- s && J(e);
701
- }
702
- };
703
- }
704
- function Ra(l) {
705
- let e, t, a, s = (
706
- /*unique*/
707
- l[8]
708
- ), n, o, r, f, m, w, D, h, d, N, v, _, k, K, le, se, $, z, W, T, F, j = Xt(l), X = (
709
- /*$ready*/
710
- l[13] && Yt()
711
- ), Y = (
712
- /*showConfigButton*/
713
- l[1] && /*$ready*/
714
- l[13] && Gt()
715
- ), G = (
716
- /*showCameraButton*/
717
- l[2] && /*$ready*/
718
- l[13] && Qt()
719
- ), H = !/*$captured*/
720
- l[14] && /*$ready*/
721
- l[13] && Vt(l), C = (
722
- /*isCountingDown*/
723
- l[7] && Jt(l)
724
- ), R = (
725
- /*$enableFaceApi*/
726
- l[21] && !/*isCountingDown*/
727
- l[7] && /*$faceValidationAlert*/
728
- l[15] && Kt(l)
729
- ), E = !/*$ready*/
730
- l[13] && /*$cameraStatusStore*/
731
- l[12] === q.OK && qt(l), B = (
732
- /*$captured*/
733
- l[14] && xt(l)
734
- );
735
- const De = [va, Ma], ne = [];
736
- function te(g, O) {
737
- return (
738
- /*showUnconformities*/
739
- g[0] && (!/*idrndClosed*/
740
- g[11] || /*$captured*/
741
- g[14]) ? 0 : (
742
- /*$cameraStatusStore*/
743
- g[12] !== q.OK ? 1 : -1
744
- )
745
- );
746
- }
747
- return ~(z = te(l)) && (W = ne[z] = De[z](l)), {
748
- c() {
749
- e = I("div"), t = I("div"), a = I("div"), j.c(), n = P(), X && X.c(), o = P(), Y && Y.c(), r = P(), G && G.c(), f = P(), H && H.c(), m = P(), w = I("canvas"), D = P(), h = I("canvas"), d = P(), N = I("canvas"), v = P(), C && C.c(), _ = P(), R && R.c(), le = P(), E && E.c(), se = P(), B && B.c(), $ = P(), W && W.c(), T = Xi(), this.c = ie, u(w, "id", "bry-ce-displayCanvas"), u(w, "class", "max-w-full"), u(h, "id", "bry-ce-detectionsCanvas"), u(h, "class", "absolute top-0 left-0 max-w-full"), u(N, "id", "bry-ce-maskCanvas"), u(N, "class", "absolute top-0 left-0 max-w-full"), u(a, "class", k = /*$ready*/
750
- l[13] ? "relative" : "relative w-0 h-0"), a.hidden = K = /*$cameraStatusStore*/
751
- l[12] !== q.OK, u(t, "class", "relative mx-auto"), u(e, "class", "flex flex-col justify-between");
752
- },
753
- m(g, O) {
754
- U(g, e, O), c(e, t), c(t, a), j.m(a, null), c(a, n), X && X.m(a, null), c(a, o), Y && Y.m(a, null), c(a, r), G && G.m(a, null), c(a, f), H && H.m(a, null), c(a, m), c(a, w), l[39](w), c(a, D), c(a, h), l[40](h), c(a, d), c(a, N), l[41](N), c(a, v), C && C.m(a, null), c(a, _), R && R.m(a, null), c(t, le), E && E.m(t, null), c(t, se), B && B.m(t, null), l[44](e), U(g, $, O), ~z && ne[z].m(g, O), U(g, T, O), F = !0;
755
- },
756
- p(g, O) {
757
- O[0] & /*unique*/
758
- 256 && wt(s, s = /*unique*/
759
- g[8]) ? (j.d(1), j = Xt(g), j.c(), j.m(a, n)) : j.p(g, O), /*$ready*/
760
- g[13] ? X ? O[0] & /*$ready*/
761
- 8192 && Z(X, 1) : (X = Yt(), X.c(), Z(X, 1), X.m(a, o)) : X && (Ce(), V(X, 1, 1, () => {
762
- X = null;
763
- }), pe()), /*showConfigButton*/
764
- g[1] && /*$ready*/
765
- g[13] ? Y ? O[0] & /*showConfigButton, $ready*/
766
- 8194 && Z(Y, 1) : (Y = Gt(), Y.c(), Z(Y, 1), Y.m(a, r)) : Y && (Ce(), V(Y, 1, 1, () => {
767
- Y = null;
768
- }), pe()), /*showCameraButton*/
769
- g[2] && /*$ready*/
770
- g[13] ? G ? O[0] & /*showCameraButton, $ready*/
771
- 8196 && Z(G, 1) : (G = Qt(), G.c(), Z(G, 1), G.m(a, f)) : G && (Ce(), V(G, 1, 1, () => {
772
- G = null;
773
- }), pe()), !/*$captured*/
774
- g[14] && /*$ready*/
775
- g[13] ? H ? (H.p(g, O), O[0] & /*$captured, $ready*/
776
- 24576 && Z(H, 1)) : (H = Vt(g), H.c(), Z(H, 1), H.m(a, m)) : H && (Ce(), V(H, 1, 1, () => {
777
- H = null;
778
- }), pe()), /*isCountingDown*/
779
- g[7] ? C ? C.p(g, O) : (C = Jt(g), C.c(), C.m(a, _)) : C && (C.d(1), C = null), /*$enableFaceApi*/
780
- g[21] && !/*isCountingDown*/
781
- g[7] && /*$faceValidationAlert*/
782
- g[15] ? R ? R.p(g, O) : (R = Kt(g), R.c(), R.m(a, null)) : R && (R.d(1), R = null), (!F || O[0] & /*$ready*/
783
- 8192 && k !== (k = /*$ready*/
784
- g[13] ? "relative" : "relative w-0 h-0")) && u(a, "class", k), (!F || O[0] & /*$cameraStatusStore*/
785
- 4096 && K !== (K = /*$cameraStatusStore*/
786
- g[12] !== q.OK)) && (a.hidden = K), !/*$ready*/
787
- g[13] && /*$cameraStatusStore*/
788
- g[12] === q.OK ? E ? E.p(g, O) : (E = qt(g), E.c(), E.m(t, se)) : E && (E.d(1), E = null), /*$captured*/
789
- g[14] ? B ? B.p(g, O) : (B = xt(g), B.c(), B.m(t, null)) : B && (B.d(1), B = null);
790
- let he = z;
791
- z = te(g), z === he ? ~z && ne[z].p(g, O) : (W && (Ce(), V(ne[he], 1, 1, () => {
792
- ne[he] = null;
793
- }), pe()), ~z ? (W = ne[z], W ? W.p(g, O) : (W = ne[z] = De[z](g), W.c()), Z(W, 1), W.m(T.parentNode, T)) : W = null);
794
- },
795
- i(g) {
796
- F || (Z(X), Z(Y), Z(G), Z(H), Z(W), F = !0);
797
- },
798
- o(g) {
799
- V(X), V(Y), V(G), V(H), V(W), F = !1;
800
- },
801
- d(g) {
802
- g && J(e), j.d(g), X && X.d(), Y && Y.d(), G && G.d(), H && H.d(), l[39](null), l[40](null), l[41](null), C && C.d(), R && R.d(), E && E.d(), B && B.d(), l[44](null), g && J($), ~z && ne[z].d(g), g && J(T);
803
- }
804
- };
805
- }
806
- let ja = !1, Oa = 5;
807
- function pt(l, e, t) {
808
- const a = e.videoWidth / e.videoHeight, s = t.width / t.height;
809
- let n = 0, o = 0, r = e.videoWidth, f = e.videoHeight;
810
- a > s ? (r = e.videoHeight * s, n = (e.videoWidth - r) / 2) : a < s && (f = e.videoWidth / s, o = (e.videoHeight - f) / 2), l.drawImage(e, n, o, r, f, 0, 0, t.width, t.height);
811
- }
812
- function La(l, e, t) {
813
- let a, s, n, o, r, f, m, w, D, h, d, N, v, _, k, K, le, se, $, z, W, T, F, j, X, Y, G, H;
814
- A(l, ft, (i) => t(64, a = i)), A(l, We, (i) => t(66, n = i)), A(l, re, (i) => t(12, o = i)), A(l, Fe, (i) => t(13, r = i)), A(l, Yi, (i) => t(67, f = i)), A(l, He, (i) => t(68, m = i)), A(l, Gi, (i) => t(69, w = i)), A(l, Te, (i) => t(70, D = i)), A(l, je, (i) => t(71, h = i)), A(l, Be, (i) => t(14, d = i)), A(l, dt, (i) => t(72, N = i)), A(l, Lt, (i) => t(73, v = i)), A(l, St, (i) => t(74, _ = i)), A(l, Ue, (i) => t(15, k = i)), A(l, Xe, (i) => t(16, K = i)), A(l, Pt, (i) => t(17, le = i)), A(l, Et, (i) => t(18, se = i)), A(l, Ye, (i) => t(19, $ = i)), A(l, ht, (i) => t(75, z = i)), A(l, Zt, (i) => t(21, T = i)), A(l, gt, (i) => t(76, F = i)), A(l, Oe, (i) => t(77, j = i)), A(l, Qi, (i) => t(22, X = i)), A(l, Vi, (i) => t(23, Y = i)), A(l, Ji, (i) => t(24, G = i)), A(l, Ki, (i) => t(25, H = i));
815
- let C, R, E, B = !1, De = {}, ne = !1, te = {
816
- width: 2560,
817
- height: 1440,
818
- aspectRatio: -1
819
- };
820
- const g = { width: 2560, height: 1440 };
821
- let { enableMinutiae: O } = e, { videoDimensions: he } = e, { noTabs: Ve } = e, { weightsPath: Je } = e, { showUnconformities: Mt } = e, { videoOverlay: Se } = e, { videoOverlayTransparency: ye } = e, { showConfigButton: vt } = e, { showCameraButton: Dt } = e;
822
- const Pe = Ht(!1);
823
- A(l, Pe, (i) => t(65, s = i));
824
- const Ke = Ht("data:image/png;base64");
825
- A(l, Ke, (i) => t(20, W = i));
826
- let ge, L, yt = !1, ke = !0, kt = 0, qe = 0, xe = !0, $e = 0, et = !1, tt = (/* @__PURE__ */ new Date()).getTime(), it = !1, y = {
827
- topLeftX: 130,
828
- topLeftY: 70,
829
- width: 540,
830
- height: 400
831
- };
832
- qi.mixin({
833
- toast: !0,
834
- position: "bottom-left",
835
- timer: 13e3,
836
- timerProgressBar: !0
837
- }), xi(async () => {
838
- if (b(Fe, r = !1, r), At(), T)
839
- try {
840
- await $i(Je), ne = !0;
841
- } catch {
842
- b(Zt, T = !1, T);
843
- }
844
- await at(), ci();
845
- });
846
- function At() {
847
- b(Be, d = !1, d), b(St, _ = !0, _), b(Ue, k = "", k), b(He, m = mt.REAR_CAMERA, m), b(We, n = !1, n), b(Xe, K = !1, K), b(Ye, $ = Le.OK, $), b(ht, z = "", z);
848
- const i = ai(bt);
849
- i.closedMouth = !1, i.isPersonCloseEnough = !1, i.isPersonTooclose = !0, i.isPersonInFrame = !1, bt.set(i);
850
- }
851
- function si() {
852
- const i = h.videoWidth, M = h.videoHeight, p = 1.36;
853
- let S = 0.7;
854
- we() && (S = 0.85);
855
- let Q, ae;
856
- i / M > p ? (ae = M * S, Q = ae * p) : (Q = i * S, ae = Q / p), y.topLeftX = (i - Q) / 2, y.topLeftY = (M - ae) / 2, y.width = Q, y.height = ae, b(Oe, j.y = y.topLeftY, j), b(Oe, j.height = y.height, j), b(Oe, j.width = y.width, j);
857
- }
858
- async function oi() {
859
- const [i, M] = (he ?? "")?.replaceAll(" ", "")?.split("x")?.map((p) => p ? parseInt(p) : void 0);
860
- if (!(!i || !M))
861
- if (we()) {
862
- await ua();
863
- const p = window.innerWidth, S = window.innerHeight, Q = M, ae = S / p * Q;
864
- b(
865
- je,
866
- h = {
867
- videoWidth: Q,
868
- videoHeight: ae
869
- },
870
- h
871
- );
872
- } else
873
- b(je, h = { videoWidth: i, videoHeight: M }, h);
874
- }
875
- function Nt(i, M) {
876
- i.clearRect(0, 0, L.width, L.height), i.save(), si(), Se != "none" ? (ye > 0 && (i.globalAlpha = ye / 100), i.fillStyle = Se, i.fillRect(0, 0, L.width, L.height)) : (i.beginPath(), i.rect(0, 0, L.width, L.height)), i.rect(y.topLeftX, y.topLeftY, y.width, y.height), ye == 0 && i.clip(), pt(i, M, L), i.restore(), i.save(), i.beginPath();
877
- const p = window.getComputedStyle(L).getPropertyValue("--p"), S = window.getComputedStyle(L).getPropertyValue("--su");
878
- if (i.strokeStyle = `hsl(${p})`, i.lineWidth = 8, i.lineJoin = "round", i.setLineDash([28, 8]), i.rect(y.topLeftX, y.topLeftY, y.width, y.height), i.stroke(), B && !et) {
879
- const ae = 1 - ($e - (/* @__PURE__ */ new Date()).getTime()) / 4500;
880
- i.save(), i.beginPath(), i.setLineDash([]), i.lineWidth = 14, i.strokeStyle = `hsl(${S})`;
881
- const Ze = y.width * 3 * ae, Ne = y.height * 2 * ae, lt = Ze < y.width ? Ze : y.width, ce = Ne < y.height ? Ne : y.height;
882
- i.rect(y.topLeftX, y.topLeftY, lt, ce), i.stroke();
883
- }
884
- i.beginPath();
885
- const Q = new Path2D();
886
- Q.rect(y.topLeftX, y.topLeftY, y.width, y.height), i.clip(Q), pt(i, M, L), i.restore();
887
- }
888
- function Tt() {
889
- b(re, o = q.OK, o), yt = !0, t(11, ke = !1);
890
- }
891
- async function Ae() {
892
- if (T && !ne)
893
- return ze(C, Ae);
894
- if (C) {
895
- if (F !== Ct.Document && !Ve)
896
- return ze(C, Ae);
897
- b(Fe, r = !0, r), T ? (s || b(Pe, s = !0, s), Nt(L.getContext("2d"), C), ze(C, Ae)) : (Nt(L.getContext("2d"), C), ze(C, Ae));
898
- }
899
- }
900
- async function ni() {
901
- const i = await import("./face_api_0e3ce8c8_2.4.0.js");
902
- let M, p;
903
- const S = await Ft();
904
- p = i.detectSingleFace(L, S), M = await p.withFaceLandmarks(), b(Be, d = !0, d);
905
- let Q = [];
906
- const ae = L.width, Ze = L.height, Ne = g.height, lt = Ze / ae * Ne, ce = document.createElement("canvas"), Rt = ce.getContext("2d");
907
- ce.width = Ne, ce.height = lt;
908
- const jt = ce.width / L.width, Ot = ce.height / L.height, oe = {
909
- topLeftX: y.topLeftX * jt,
910
- topLeftY: y.topLeftY * Ot,
911
- width: y.width * jt,
912
- height: y.height * Ot
913
- }, st = 0.2 * oe.width, ot = 0.2 * oe.height, de = document.createElement("canvas");
914
- de.width = oe.width + st, de.height = oe.height + ot;
915
- const nt = de.getContext("2d");
916
- nt?.clearRect(0, 0, de.width, de.height), Rt && pt(Rt, C, ce);
917
- const Li = ce.width / 2, Si = ce.height / 2, Pi = oe.topLeftX + oe.width / 2, Ei = oe.topLeftY + oe.height / 2, Zi = Li - Pi, Wi = Si - Ei, Fi = oe.topLeftX - st / 2, Hi = oe.topLeftY - ot / 2, ct = oe.width + st, rt = oe.height + ot, Bi = (de.width - ct) / 2, Ui = (de.height - rt) / 2;
918
- nt?.drawImage(ce, Fi - Zi, Hi - Wi, ct, rt, Bi, Ui, ct, rt), nt?.save();
919
- const ut = de.toDataURL("image/jpeg").split(",");
920
- b(Ke, W = ut[0], W), b(Et, se = ut[1], se), b(ht, z = ut[1], z), M ? (b(Xe, K = !0, K), Q = [{ data: z }], b(Ye, $ = Le.OK, $)) : b(Ye, $ = Le.TEMPLATE_EXTRACTION_ERROR, $), window.dispatchEvent(new CustomEvent(
921
- "document-unconformities-validated",
922
- {
923
- detail: { bodyParts: Q, status: $ }
924
- }
925
- ));
926
- }
927
- function Ee() {
928
- const i = {
929
- bodyPart: "DOCUMENT",
930
- data: se,
931
- justification: le
932
- };
933
- b(Xe, K = !0, K), window.dispatchEvent(new CustomEvent("export-document", { detail: i }));
934
- }
935
- function me() {
936
- window.dispatchEvent(new CustomEvent("document-scrapped")), At(), ke && Tt();
937
- }
938
- async function at(i) {
939
- if (!xe) {
940
- b(re, o = q.CAMERA_ORIENTATION_PORTRAIT, o);
941
- return;
942
- }
943
- await oi();
944
- try {
945
- const { deviceId: M, width: p, height: S, aspectRatio: Q } = await ea(te.width, te.height, m, i);
946
- te.aspectRatio = Q || p / S, (te.aspectRatio > 1 && p < te.width || te.aspectRatio < 1 && S < te.width) && (te.width = p, te.height = p / 1.7777), b(Te, D = M || w[0].deviceId, D);
947
- } catch (M) {
948
- const p = M;
949
- t(11, ke = !0);
950
- const S = Ge(M) && M.constraint ? M.constraint : "";
951
- console.error(p, S), Ge(p) && "message" in p && p.message.includes("Permission denied") && (console.error("User didn't give permission to use camera!"), b(re, o = q.CAMERA_DENIED_ERROR, o)), Ge(p) && "message" in p && p.message.includes("Requested device not found") && b(re, o = q.DEVICE_NOT_FOUND_ERROR, o), (S.includes("width") || S.includes("height")) && (console.error(`Camera does not meet the minimum supported requirements! (${S})`), b(re, o = q.CAMERA_UNSUPPORTED, o));
952
- }
953
- }
954
- async function be() {
955
- b(Te, D = "", D), await at();
956
- }
957
- function ci() {
958
- navigator.mediaDevices.ondevicechange = async (i) => {
959
- await Wt(), o !== q.OK ? await be() : v.active || (It(), b(re, o = q.DEVICE_NOT_FOUND_ERROR, o));
960
- };
961
- }
962
- function ri() {
963
- b(We, n = !1, n);
964
- const i = (/* @__PURE__ */ new Date()).getTime();
965
- i - tt > 5e3 ? (tt = i, b(Ue, k = "docCollector.docWasNotFound", k)) : it || (it = !0, setTimeout(
966
- () => {
967
- it = !1, k != "docCollector.docWasNotFound" && b(Ue, k = "", k);
968
- },
969
- 1500
970
- ));
971
- }
972
- const ui = je.subscribe((i) => {
973
- C && R && (t(4, C.width = i.videoWidth, C), t(4, C.height = i.videoHeight, C), t(5, R.width = i.videoWidth, R), t(5, R.height = i.videoHeight, R), t(9, ge.width = i.videoWidth, ge), t(9, ge.height = i.videoHeight, ge), t(10, L.width = i.videoWidth, L), t(10, L.height = i.videoHeight, L));
974
- }), fi = bt.subscribe((i) => {
975
- if (f != "DOCUMENT")
976
- return;
977
- let M = "";
978
- if (i.isPersonCloseEnough ? i.isPersonTooclose ? M = "docCollector.moveAwayCamera" : i.isPersonInFrame || (M = "docCollector.stayInFrame") : M = "docCollector.comeCloserCamera", n && ta(M), !d && _ && n && !B && i.isPersonInFrame && !(!i.isPersonCloseEnough || i.isPersonTooclose)) {
979
- t(7, B = !0), $e = (/* @__PURE__ */ new Date()).getTime() + 4500;
980
- const p = setInterval(
981
- () => {
982
- if (!_ || d || !i.isPersonCloseEnough || i.isPersonTooclose || !i.isPersonInFrame) {
983
- t(7, B = !1), et = !0, setTimeout(
984
- () => {
985
- et = !1;
986
- },
987
- 1500
988
- ), clearInterval(p);
989
- return;
990
- }
991
- const S = (/* @__PURE__ */ new Date()).getTime();
992
- Math.floor(($e - S) % (1e3 * 60) / 1e3) <= 0 && (clearInterval(p), t(7, B = !1), document.getElementsByTagName("biometric-collector")?.[0]?.shadowRoot?.getElementById("bry-cc-capture-btn")?.click());
993
- },
994
- 250
995
- );
996
- }
997
- }), di = Be.subscribe((i) => {
998
- E && (i ? (E.classList.remove("flex"), E.classList.add("hidden")) : (E.classList.add("flex"), E.classList.remove("hidden")));
999
- }), hi = dt.subscribe((i) => {
1000
- C && i && (console.log("setting null in video srcObject"), t(4, C.srcObject = null, C), t(4, C.src = "", C), b(Te, D = null, D));
1001
- });
1002
- gt.subscribe(async (i) => {
1003
- i === Ct.Document && await Wt();
1004
- });
1005
- const gi = Te.subscribe(async (i) => {
1006
- if (!(!i || f != "DOCUMENT")) {
1007
- C || t(8, De = {});
1008
- try {
1009
- const M = await ia(te.width, te.height, i);
1010
- t(4, C.srcObject = M, C), b(Lt, v = M, v), b(dt, N = !1, N), M.getTracks().forEach((p) => {
1011
- p.readyState === "live" && console.log(`Camera ${p.label} opened successfully!`);
1012
- }), b(re, o = q.OK, o), aa(C);
1013
- } catch (M) {
1014
- const p = M;
1015
- t(11, ke = !0), Ge(p) && "message" in p && p.message.includes("Requested device not found") && b(re, o = q.DEVICE_NOT_FOUND_ERROR, o);
1016
- }
1017
- }
1018
- }), mi = gt.subscribe(async (i) => {
1019
- i === Ct.Document && !yt && !d && ja && await Tt();
1020
- }), bi = Pe.subscribe(async (i) => {
1021
- i && zt();
1022
- }), Ii = Fe.subscribe((i) => {
1023
- i && window.dispatchEvent(new CustomEvent("brycc-camera-ready"));
1024
- }), Ci = la.subscribe(async (i) => {
1025
- if (h) {
1026
- if (It(), !we()) {
1027
- const p = (w.findIndex((Q) => Q.deviceId === D) + 1) % w.length, S = w[p].deviceId;
1028
- await at(S);
1029
- return;
1030
- }
1031
- i ? (b(He, m = mt.FRONT_CAMERA, m), await be()) : (b(He, m = mt.REAR_CAMERA, m), await be());
1032
- }
1033
- }), pi = sa.subscribe(async (i) => {
1034
- !i.isSupported || !we() || f != "DOCUMENT" || (xe = i.orientation.includes("portrait"), xe ? r ? b(re, o = q.OK, o) : await be() : b(re, o = q.CAMERA_ORIENTATION_PORTRAIT, o));
1035
- });
1036
- async function zt() {
1037
- let i;
1038
- try {
1039
- if (qe >= Oa) {
1040
- qe = 0;
1041
- const M = await Ft(), p = await import("./face_api_0e3ce8c8_2.4.0.js");
1042
- let S;
1043
- S = p.detectSingleFace(L, M), i = await S.withFaceLandmarks(), R.getContext("2d")?.clearRect(0, 0, R.width, R.height), i != null ? (oa(i, R, O, !0), b(We, n = !0, n), tt = (/* @__PURE__ */ new Date()).getTime()) : ri();
1044
- } else
1045
- qe++;
1046
- s && ze(C, zt);
1047
- } catch (M) {
1048
- console.warn(`FaceapiLoop: ${M}`);
1049
- }
1050
- }
1051
- ft.subscribe(async (i) => {
1052
- i && (me(), b(ft, a = !1, a));
1053
- }), na(() => {
1054
- It(), di(), fi(), ui(), hi(), gi(), mi(), clearInterval(kt), bi(), Ci(), Ii(), pi(), kt = 0;
1055
- });
1056
- function wi(i) {
1057
- Re[i ? "unshift" : "push"](() => {
1058
- C = i, t(4, C);
1059
- });
1060
- }
1061
- function _i(i) {
1062
- Re[i ? "unshift" : "push"](() => {
1063
- L = i, t(10, L);
1064
- });
1065
- }
1066
- function Mi(i) {
1067
- Re[i ? "unshift" : "push"](() => {
1068
- R = i, t(5, R);
1069
- });
1070
- }
1071
- function vi(i) {
1072
- Re[i ? "unshift" : "push"](() => {
1073
- ge = i, t(9, ge);
1074
- });
1075
- }
1076
- const Di = () => Ee(), yi = () => me();
1077
- function ki(i) {
1078
- Re[i ? "unshift" : "push"](() => {
1079
- E = i, t(6, E);
1080
- });
1081
- }
1082
- const Ai = () => Ee(), Ni = () => me();
1083
- function Ti() {
1084
- le = this.value, Pt.set(le);
1085
- }
1086
- const zi = () => Ee(), Ri = () => me(), ji = () => me(), Oi = async () => {
1087
- await be();
1088
- };
1089
- return l.$$set = (i) => {
1090
- "enableMinutiae" in i && t(32, O = i.enableMinutiae), "videoDimensions" in i && t(33, he = i.videoDimensions), "noTabs" in i && t(34, Ve = i.noTabs), "weightsPath" in i && t(35, Je = i.weightsPath), "showUnconformities" in i && t(0, Mt = i.showUnconformities), "videoOverlay" in i && t(36, Se = i.videoOverlay), "videoOverlayTransparency" in i && t(37, ye = i.videoOverlayTransparency), "showConfigButton" in i && t(1, vt = i.showConfigButton), "showCameraButton" in i && t(2, Dt = i.showCameraButton);
1091
- }, [
1092
- Mt,
1093
- vt,
1094
- Dt,
1095
- Ae,
1096
- C,
1097
- R,
1098
- E,
1099
- B,
1100
- De,
1101
- ge,
1102
- L,
1103
- ke,
1104
- o,
1105
- r,
1106
- d,
1107
- k,
1108
- K,
1109
- le,
1110
- se,
1111
- $,
1112
- W,
1113
- T,
1114
- X,
1115
- Y,
1116
- G,
1117
- H,
1118
- Pe,
1119
- Ke,
1120
- ni,
1121
- Ee,
1122
- me,
1123
- be,
1124
- O,
1125
- he,
1126
- Ve,
1127
- Je,
1128
- Se,
1129
- ye,
1130
- wi,
1131
- _i,
1132
- Mi,
1133
- vi,
1134
- Di,
1135
- yi,
1136
- ki,
1137
- Ai,
1138
- Ni,
1139
- Ti,
1140
- zi,
1141
- Ri,
1142
- ji,
1143
- Oi
1144
- ];
1145
- }
1146
- class Sa extends ei {
1147
- constructor(e) {
1148
- super(), ti(
1149
- this,
1150
- {
1151
- target: this.shadowRoot,
1152
- props: ii(this.attributes),
1153
- customElement: !0
1154
- },
1155
- La,
1156
- Ra,
1157
- wt,
1158
- {
1159
- enableMinutiae: 32,
1160
- videoDimensions: 33,
1161
- noTabs: 34,
1162
- weightsPath: 35,
1163
- showUnconformities: 0,
1164
- videoOverlay: 36,
1165
- videoOverlayTransparency: 37,
1166
- showConfigButton: 1,
1167
- showCameraButton: 2,
1168
- play: 3
1169
- },
1170
- null,
1171
- [-1, -1, -1, -1]
1172
- ), e && (e.target && U(e.target, this, e.anchor), e.props && (this.$set(e.props), ue()));
1173
- }
1174
- static get observedAttributes() {
1175
- return [
1176
- "enableMinutiae",
1177
- "videoDimensions",
1178
- "noTabs",
1179
- "weightsPath",
1180
- "showUnconformities",
1181
- "videoOverlay",
1182
- "videoOverlayTransparency",
1183
- "showConfigButton",
1184
- "showCameraButton",
1185
- "play"
1186
- ];
1187
- }
1188
- get enableMinutiae() {
1189
- return this.$$.ctx[32];
1190
- }
1191
- set enableMinutiae(e) {
1192
- this.$$set({ enableMinutiae: e }), ue();
1193
- }
1194
- get videoDimensions() {
1195
- return this.$$.ctx[33];
1196
- }
1197
- set videoDimensions(e) {
1198
- this.$$set({ videoDimensions: e }), ue();
1199
- }
1200
- get noTabs() {
1201
- return this.$$.ctx[34];
1202
- }
1203
- set noTabs(e) {
1204
- this.$$set({ noTabs: e }), ue();
1205
- }
1206
- get weightsPath() {
1207
- return this.$$.ctx[35];
1208
- }
1209
- set weightsPath(e) {
1210
- this.$$set({ weightsPath: e }), ue();
1211
- }
1212
- get showUnconformities() {
1213
- return this.$$.ctx[0];
1214
- }
1215
- set showUnconformities(e) {
1216
- this.$$set({ showUnconformities: e }), ue();
1217
- }
1218
- get videoOverlay() {
1219
- return this.$$.ctx[36];
1220
- }
1221
- set videoOverlay(e) {
1222
- this.$$set({ videoOverlay: e }), ue();
1223
- }
1224
- get videoOverlayTransparency() {
1225
- return this.$$.ctx[37];
1226
- }
1227
- set videoOverlayTransparency(e) {
1228
- this.$$set({ videoOverlayTransparency: e }), ue();
1229
- }
1230
- get showConfigButton() {
1231
- return this.$$.ctx[1];
1232
- }
1233
- set showConfigButton(e) {
1234
- this.$$set({ showConfigButton: e }), ue();
1235
- }
1236
- get showCameraButton() {
1237
- return this.$$.ctx[2];
1238
- }
1239
- set showCameraButton(e) {
1240
- this.$$set({ showCameraButton: e }), ue();
1241
- }
1242
- get play() {
1243
- return this.$$.ctx[3];
1244
- }
1245
- }
1246
- customElements.define("document-collector", Sa);
1247
- export {
1248
- Sa as default
1249
- };