bry-biometric-collector 2.3.1-RC04 → 2.3.1

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.
@@ -1,6 +1,6 @@
1
- import { S as pi, q as wi, r as Ut, t as vi, w as Q, L as ne, N as K, x as w, O as B, b7 as Ci, z as oe, B as c, D as l, P as V, Q as ve, R as z, T as Ce, H as G, I as T, U as $e, V as Pe, W as se, X as ki, Y as Ae, _ as yi, Z as ge, a3 as _e, a0 as Se, a1 as et, a2 as vt, J as Ct, a4 as Le, a6 as Fe, a7 as kt, a8 as yt, a9 as tt, ab as it, af as Dt, ad as Di, ah as Ie, ai as st, b8 as We, $ as Ei, ao as Ti, ap as Oi, aq as Ri, ar as Pi, as as Ai, K as g, at as Si, au as at, av as lt, j as Kt, aw as ot, aF as Li, C as Me, d as Ne, aG as Et, ax as Be, aH as Fi, ay as nt, aI as Ii, aJ as Wi, aK as Mi, aL as Ni, aA as Bi, aM as Hi, aN as pe, aO as Ui, aP as Tt, E as re, aR as Ki, aS as ke, aT as ye, aU as De, y as J, G as x, aV as rt, aW as Vi, aQ as ct, aX as Ot, a$ as we, b1 as qi, b2 as Xi, b3 as Rt, b5 as Pt, b6 as Yi } from "./main_53e35476_2.3.1-RC04.js";
2
- import { C as ji, T as Ji, a as Qi } from "./TakePictureBtn_4d4e3b8c_2.3.1-RC04.js";
3
- function At(a) {
1
+ import { S as gi, q as _i, r as Ht, t as pi, w as Q, L as ne, N as K, x as w, O as B, b7 as wi, z as oe, B as c, D as l, P as V, Q as ve, R as z, T as Ce, H as G, I as T, U as $e, V as Ae, W as se, X as vi, Y as Se, _ as Ci, Z as ge, a3 as _e, a0 as Le, a1 as et, a2 as wt, J as vt, a4 as Fe, a6 as Ie, a7 as Ct, a8 as kt, a9 as tt, ab as it, af as yt, ad as ki, ah as We, ai as st, b8 as Me, $ as yi, ao as Di, ap as Ei, aq as Ti, ar as Oi, as as Ri, K as g, at as Pi, au as at, av as lt, j as Ut, aw as ot, aF as Ai, C as Ne, d as Be, aG as Dt, ax as He, aH as Si, ay as nt, aI as Li, aJ as Fi, aK as Ii, aL as Wi, aA as Mi, aM as Ni, aN as pe, aO as Bi, aP as Et, E as re, aR as Hi, aS as ke, aT as ye, aU as De, y as J, G as x, aV as rt, aW as Ui, aQ as ct, aX as Tt, a$ as we, b1 as Ki, b2 as Vi, b3 as Ot, b5 as Rt, b6 as qi } from "./main_e423e405_2.3.1.js";
2
+ import { C as Yi, T as Xi, a as ji } from "./TakePictureBtn_3319a771_2.3.1.js";
3
+ function Pt(a) {
4
4
  let t, i, s;
5
5
  return {
6
6
  c() {
@@ -21,9 +21,9 @@ function At(a) {
21
21
  }
22
22
  };
23
23
  }
24
- function St(a) {
24
+ function At(a) {
25
25
  let t, i;
26
- return t = new Ki({}), {
26
+ return t = new Hi({}), {
27
27
  c() {
28
28
  ke(t.$$.fragment);
29
29
  },
@@ -41,9 +41,9 @@ function St(a) {
41
41
  }
42
42
  };
43
43
  }
44
- function Lt(a) {
44
+ function St(a) {
45
45
  let t, i;
46
- return t = new ji({}), {
46
+ return t = new Yi({}), {
47
47
  c() {
48
48
  ke(t.$$.fragment);
49
49
  },
@@ -61,9 +61,9 @@ function Lt(a) {
61
61
  }
62
62
  };
63
63
  }
64
- function Ft(a) {
64
+ function Lt(a) {
65
65
  let t, i;
66
- return t = new Ji({
66
+ return t = new Xi({
67
67
  props: {
68
68
  id: "bry-cc-capture-btn",
69
69
  disabled: !/*$ready*/
@@ -103,7 +103,7 @@ function Ft(a) {
103
103
  }
104
104
  };
105
105
  }
106
- function It(a) {
106
+ function Ft(a) {
107
107
  let t, i = (
108
108
  /*$_*/
109
109
  a[22]("faceCollector.stayStill") + ""
@@ -125,7 +125,7 @@ function It(a) {
125
125
  }
126
126
  };
127
127
  }
128
- function Wt(a) {
128
+ function It(a) {
129
129
  let t, i = (
130
130
  /*$_*/
131
131
  a[22](`${/*$faceValidationAlert*/
@@ -149,18 +149,18 @@ function Wt(a) {
149
149
  }
150
150
  };
151
151
  }
152
- function Mt(a) {
152
+ function Wt(a) {
153
153
  let t, i, s, n, u;
154
154
  function o(b, C) {
155
155
  return (
156
156
  /*$isLoading*/
157
- b[23] ? Gi : zi
157
+ b[23] ? Qi : Ji
158
158
  );
159
159
  }
160
160
  let r = o(a), f = r(a);
161
161
  return {
162
162
  c() {
163
- t = w("slot"), i = w("div"), s = w("img"), u = B(), f.c(), rt(s.src, n = Vi) || c(s, "src", n), c(s, "alt", "loading gif"), c(s, "class", "m-auto h-[10em] lg:h-[12em]"), c(i, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), c(t, "name", "loading-camera-gif"), c(t, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]");
163
+ t = w("slot"), i = w("div"), s = w("img"), u = B(), f.c(), rt(s.src, n = Ui) || c(s, "src", n), c(s, "alt", "loading gif"), c(s, "class", "m-auto h-[10em] lg:h-[12em]"), c(i, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), c(t, "name", "loading-camera-gif"), c(t, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]");
164
164
  },
165
165
  m(b, C) {
166
166
  Q(b, t, C), l(t, i), l(i, s), l(i, u), f.m(i, null);
@@ -173,7 +173,7 @@ function Mt(a) {
173
173
  }
174
174
  };
175
175
  }
176
- function zi(a) {
176
+ function Ji(a) {
177
177
  let t, i = (
178
178
  /*$_*/
179
179
  a[22]("faceCollector.initiatingCamera") + ""
@@ -195,7 +195,7 @@ function zi(a) {
195
195
  }
196
196
  };
197
197
  }
198
- function Gi(a) {
198
+ function Qi(a) {
199
199
  let t;
200
200
  return {
201
201
  c() {
@@ -210,7 +210,7 @@ function Gi(a) {
210
210
  }
211
211
  };
212
212
  }
213
- function Nt(a) {
213
+ function Mt(a) {
214
214
  let t, i, s = (
215
215
  /*$_*/
216
216
  a[22]("faceCollector.finish") + ""
@@ -253,9 +253,9 @@ function Nt(a) {
253
253
  }
254
254
  };
255
255
  }
256
- function Zi(a) {
256
+ function zi(a) {
257
257
  let t, i;
258
- return t = new Qi({ props: { handler: (
258
+ return t = new ji({ props: { handler: (
259
259
  /*func*/
260
260
  a[51]
261
261
  ) } }), {
@@ -277,10 +277,10 @@ function Zi(a) {
277
277
  }
278
278
  };
279
279
  }
280
- function xi(a) {
280
+ function Gi(a) {
281
281
  let t, i, s, n, u, o, r, f, b;
282
- const C = [is, ts, es, $i], _ = [];
283
- function d(h, L) {
282
+ const C = [es, $i, xi, Zi], _ = [];
283
+ function d(h, A) {
284
284
  return (
285
285
  /*$captured*/
286
286
  h[13] ? (
@@ -301,21 +301,21 @@ function xi(a) {
301
301
  a[24], c(i, "alt", ""), c(t, "class", f = "grid-cols-1 grid-rows-2 sm:grid-cols-2 sm:grid-rows-1 gap-[.5em] " + (/*$showFaceWhileValidating*/
302
302
  a[24] ? "grid overflow-hidden" : "absolute -translate-y-1/2 -translate-x-1/2 top-1/2 left-1/2 overflow-visible"));
303
303
  },
304
- m(h, L) {
305
- Q(h, t, L), l(t, i), l(t, u), _[o].m(t, null), b = !0;
304
+ m(h, A) {
305
+ Q(h, t, A), l(t, i), l(t, u), _[o].m(t, null), b = !0;
306
306
  },
307
- p(h, L) {
308
- (!b || L[0] & /*$dataTypePrefix, $image*/
307
+ p(h, A) {
308
+ (!b || A[0] & /*$dataTypePrefix, $image*/
309
309
  655360 && !rt(i.src, s = /*$dataTypePrefix*/
310
310
  h[19] + "," + /*$image*/
311
- h[17])) && c(i, "src", s), (!b || L[0] & /*$captured, $showFaceWhileValidating*/
311
+ h[17])) && c(i, "src", s), (!b || A[0] & /*$captured, $showFaceWhileValidating*/
312
312
  16785408 && n !== (n = !/*$captured*/
313
313
  h[13] || !/*$showFaceWhileValidating*/
314
314
  h[24])) && (i.hidden = n);
315
315
  let D = o;
316
- o = d(h), o === D ? _[o].p(h, L) : (ve(), z(_[D], 1, 1, () => {
316
+ o = d(h), o === D ? _[o].p(h, A) : (ve(), z(_[D], 1, 1, () => {
317
317
  _[D] = null;
318
- }), Ce(), r = _[o], r ? r.p(h, L) : (r = _[o] = C[o](h), r.c()), V(r, 1), r.m(t, null)), (!b || L[0] & /*$showFaceWhileValidating*/
318
+ }), Ce(), r = _[o], r ? r.p(h, A) : (r = _[o] = C[o](h), r.c()), V(r, 1), r.m(t, null)), (!b || A[0] & /*$showFaceWhileValidating*/
319
319
  16777216 && f !== (f = "grid-cols-1 grid-rows-2 sm:grid-cols-2 sm:grid-rows-1 gap-[.5em] " + (/*$showFaceWhileValidating*/
320
320
  h[24] ? "grid overflow-hidden" : "absolute -translate-y-1/2 -translate-x-1/2 top-1/2 left-1/2 overflow-visible"))) && c(t, "class", f);
321
321
  },
@@ -330,21 +330,21 @@ function xi(a) {
330
330
  }
331
331
  };
332
332
  }
333
- function $i(a) {
333
+ function Zi(a) {
334
334
  let t, i, s = (
335
335
  /*$_*/
336
336
  a[22]("docCollector.captured") + ""
337
337
  ), n, u, o, r, f = (
338
338
  /*$_*/
339
339
  a[22]("faceCollector.retakePhoto") + ""
340
- ), b, C, _ = Kt(qi).faceStrategy !== Xi.DISABLED, d, h, L, D = _ && ss();
340
+ ), b, C, _ = Ut(Ki).faceStrategy !== Vi.DISABLED, d, h, A, D = _ && ts();
341
341
  return {
342
342
  c() {
343
- t = w("div"), i = w("h1"), n = J(s), u = B(), o = w("div"), r = w("button"), b = J(f), C = B(), D && D.c(), c(i, "class", "text-3xl font-bold pb-[1em] transition-opacity"), c(r, "id", "bry-cc-retake-button"), c(r, "class", "ce-dui-btn ce-dui-btn-block flex-shrink text-base"), c(o, "class", "flex flex-row"), Rt(o, "ce-dui-btn-group", !/*$exportButtonDisabled*/
343
+ t = w("div"), i = w("h1"), n = J(s), u = B(), o = w("div"), r = w("button"), b = J(f), C = B(), D && D.c(), c(i, "class", "text-3xl font-bold pb-[1em] transition-opacity"), c(r, "id", "bry-cc-retake-button"), c(r, "class", "ce-dui-btn ce-dui-btn-block flex-shrink text-base"), c(o, "class", "flex flex-row"), Ot(o, "ce-dui-btn-group", !/*$exportButtonDisabled*/
344
344
  a[25]);
345
345
  },
346
346
  m(v, O) {
347
- Q(v, t, O), l(t, i), l(i, n), l(t, u), l(t, o), l(o, r), l(r, b), l(o, C), D && D.m(o, null), d = !0, h || (L = re(
347
+ Q(v, t, O), l(t, i), l(i, n), l(t, u), l(t, o), l(o, r), l(r, b), l(o, C), D && D.m(o, null), d = !0, h || (A = re(
348
348
  r,
349
349
  "click",
350
350
  /*click_handler_6*/
@@ -357,7 +357,7 @@ function $i(a) {
357
357
  v[22]("docCollector.captured") + "") && x(n, s), (!d || O[0] & /*$_*/
358
358
  4194304) && f !== (f = /*$_*/
359
359
  v[22]("faceCollector.retakePhoto") + "") && x(b, f), (!d || O[0] & /*$exportButtonDisabled*/
360
- 33554432) && Rt(o, "ce-dui-btn-group", !/*$exportButtonDisabled*/
360
+ 33554432) && Ot(o, "ce-dui-btn-group", !/*$exportButtonDisabled*/
361
361
  v[25]);
362
362
  },
363
363
  i(v) {
@@ -367,35 +367,35 @@ function $i(a) {
367
367
  z(D), d = !1;
368
368
  },
369
369
  d(v) {
370
- v && G(t), D && D.d(), h = !1, L();
370
+ v && G(t), D && D.d(), h = !1, A();
371
371
  }
372
372
  };
373
373
  }
374
- function es(a) {
374
+ function xi(a) {
375
375
  let t, i, s = (
376
376
  /*$_*/
377
377
  a[22]("faceCollector.unconformities") + ""
378
378
  ), n, u, o, r, f, b = (
379
379
  /*$_*/
380
380
  a[22]("faceCollector.provideAReasonForTheLowQualityCapture") + ""
381
- ), C, _, d, h, L, D, v, O, ee = (
381
+ ), C, _, d, h, A, D, v, O, ee = (
382
382
  /*$_*/
383
383
  a[22]("faceCollector.thisInformationIsRequired") + ""
384
- ), te, $, F, M, ie, P = (
384
+ ), te, $, S, M, ie, P = (
385
385
  /*$captured*/
386
- a[13] && Bt(a)
386
+ a[13] && Nt(a)
387
387
  );
388
388
  return {
389
389
  c() {
390
- t = w("div"), i = w("h1"), n = J(s), u = B(), o = w("div"), r = w("label"), f = w("span"), C = J(b), _ = B(), d = w("textarea"), L = B(), D = w("label"), v = w("span"), O = J("("), te = J(ee), $ = J(")"), F = B(), P && P.c(), c(i, "class", "text-3xl font-bold pb-[1em] transition-opacity"), c(f, "class", "ce-dui-label-text text-base"), c(r, "class", "ce-dui-label"), c(r, "for", "justification"), c(d, "contenteditable", ""), c(d, "id", "justification"), c(d, "class", "ce-dui-textarea ce-dui-textarea-bordered h-[6em] text-base"), c(d, "placeholder", h = /*$_*/
390
+ t = w("div"), i = w("h1"), n = J(s), u = B(), o = w("div"), r = w("label"), f = w("span"), C = J(b), _ = B(), d = w("textarea"), A = B(), D = w("label"), v = w("span"), O = J("("), te = J(ee), $ = J(")"), S = B(), P && P.c(), c(i, "class", "text-3xl font-bold pb-[1em] transition-opacity"), c(f, "class", "ce-dui-label-text text-base"), c(r, "class", "ce-dui-label"), c(r, "for", "justification"), c(d, "contenteditable", ""), c(d, "id", "justification"), c(d, "class", "ce-dui-textarea ce-dui-textarea-bordered h-[6em] text-base"), c(d, "placeholder", h = /*$_*/
391
391
  a[22]("faceCollector.yourJustification")), c(v, "class", "ce-dui-label-text-alt text-base"), c(D, "class", "ce-dui-label"), c(D, "for", "justification"), c(o, "class", "ce-dui-form-control mt-[2.5em]");
392
392
  },
393
393
  m(R, E) {
394
- Q(R, t, E), l(t, i), l(i, n), l(t, u), l(t, o), l(o, r), l(r, f), l(f, C), l(o, _), l(o, d), Pt(
394
+ Q(R, t, E), l(t, i), l(i, n), l(t, u), l(t, o), l(o, r), l(r, f), l(f, C), l(o, _), l(o, d), Rt(
395
395
  d,
396
396
  /*$justification*/
397
397
  a[16]
398
- ), l(o, L), l(o, D), l(D, v), l(v, O), l(v, te), l(v, $), l(t, F), P && P.m(t, null), M || (ie = re(
398
+ ), l(o, A), l(o, D), l(D, v), l(v, O), l(v, te), l(v, $), l(t, S), P && P.m(t, null), M || (ie = re(
399
399
  d,
400
400
  "input",
401
401
  /*textarea_input_handler*/
@@ -410,14 +410,14 @@ function es(a) {
410
410
  R[22]("faceCollector.provideAReasonForTheLowQualityCapture") + "") && x(C, b), E[0] & /*$_*/
411
411
  4194304 && h !== (h = /*$_*/
412
412
  R[22]("faceCollector.yourJustification")) && c(d, "placeholder", h), E[0] & /*$justification*/
413
- 65536 && Pt(
413
+ 65536 && Rt(
414
414
  d,
415
415
  /*$justification*/
416
416
  R[16]
417
417
  ), E[0] & /*$_*/
418
418
  4194304 && ee !== (ee = /*$_*/
419
419
  R[22]("faceCollector.thisInformationIsRequired") + "") && x(te, ee), /*$captured*/
420
- R[13] ? P ? P.p(R, E) : (P = Bt(R), P.c(), P.m(t, null)) : P && (P.d(1), P = null);
420
+ R[13] ? P ? P.p(R, E) : (P = Nt(R), P.c(), P.m(t, null)) : P && (P.d(1), P = null);
421
421
  },
422
422
  i: oe,
423
423
  o: oe,
@@ -426,7 +426,7 @@ function es(a) {
426
426
  }
427
427
  };
428
428
  }
429
- function ts(a) {
429
+ function $i(a) {
430
430
  let t, i, s = (
431
431
  /*$_*/
432
432
  a[22]("faceCollector.everythingOk") + ""
@@ -436,13 +436,13 @@ function ts(a) {
436
436
  ), b, C, _, d = (
437
437
  /*$_*/
438
438
  a[22]("faceCollector.retakePhoto") + ""
439
- ), h, L, D;
439
+ ), h, A, D;
440
440
  return {
441
441
  c() {
442
442
  t = w("div"), i = w("h1"), n = J(s), u = B(), o = w("div"), r = w("button"), b = J(f), C = B(), _ = w("button"), h = J(d), c(i, "class", "text-3xl font-bold pb-[1em] transition-opacity"), r.disabled = !0, c(r, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), c(_, "id", "bry-cc-retake-button"), c(_, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), c(o, "class", "ce-dui-btn-group flex"), c(t, "class", "flex flex-col justify-between");
443
443
  },
444
444
  m(v, O) {
445
- Q(v, t, O), l(t, i), l(i, n), l(t, u), l(t, o), l(o, r), l(r, b), l(o, C), l(o, _), l(_, h), L || (D = [
445
+ Q(v, t, O), l(t, i), l(i, n), l(t, u), l(t, o), l(o, r), l(r, b), l(o, C), l(o, _), l(_, h), A || (D = [
446
446
  re(
447
447
  r,
448
448
  "click",
@@ -455,7 +455,7 @@ function ts(a) {
455
455
  /*click_handler_3*/
456
456
  a[46]
457
457
  )
458
- ], L = !0);
458
+ ], A = !0);
459
459
  },
460
460
  p(v, O) {
461
461
  O[0] & /*$_*/
@@ -469,11 +469,11 @@ function ts(a) {
469
469
  i: oe,
470
470
  o: oe,
471
471
  d(v) {
472
- v && G(t), L = !1, ct(D);
472
+ v && G(t), A = !1, ct(D);
473
473
  }
474
474
  };
475
475
  }
476
- function is(a) {
476
+ function es(a) {
477
477
  let t;
478
478
  return {
479
479
  c() {
@@ -490,9 +490,9 @@ function is(a) {
490
490
  }
491
491
  };
492
492
  }
493
- function ss(a) {
493
+ function ts(a) {
494
494
  let t, i;
495
- return t = new Yi({
495
+ return t = new qi({
496
496
  props: { cssClass: "ce-dui-btn-block flex-shrink" }
497
497
  }), {
498
498
  c() {
@@ -512,7 +512,7 @@ function ss(a) {
512
512
  }
513
513
  };
514
514
  }
515
- function Bt(a) {
515
+ function Nt(a) {
516
516
  let t, i, s = (
517
517
  /*$_*/
518
518
  a[22]("faceCollector.finish") + ""
@@ -555,35 +555,35 @@ function Bt(a) {
555
555
  }
556
556
  };
557
557
  }
558
- function as(a) {
558
+ function is(a) {
559
559
  let t, i, s, n = (
560
560
  /*unique*/
561
561
  a[8]
562
- ), u, o, r, f, b, C, _, d, h, L, D, v, O, ee, te, $, F, M, ie, P, R = At(a), E = (
562
+ ), u, o, r, f, b, C, _, d, h, A, D, v, O, ee, te, $, S, M, ie, P, R = Pt(a), E = (
563
563
  /*showConfigButton*/
564
564
  a[1] && /*$ready*/
565
- a[21] && St()
566
- ), I = (
565
+ a[21] && At()
566
+ ), F = (
567
567
  /*showCameraButton*/
568
568
  a[2] && /*$ready*/
569
- a[21] && Lt()
569
+ a[21] && St()
570
570
  ), H = !/*$captured*/
571
571
  a[13] && /*$ready*/
572
- a[21] && Ft(a), q = (
572
+ a[21] && Lt(a), q = (
573
573
  /*isCountingDown*/
574
- a[7] && It(a)
575
- ), X = (
574
+ a[7] && Ft(a)
575
+ ), Y = (
576
576
  /*$enableFaceApi*/
577
577
  a[20] && !/*isCountingDown*/
578
578
  a[7] && /*$faceValidationAlert*/
579
- a[14] && Wt(a)
580
- ), Y = !/*$ready*/
579
+ a[14] && It(a)
580
+ ), X = !/*$ready*/
581
581
  a[21] && /*$cameraStatusStore*/
582
- a[12] === K.OK && Mt(a), p = (
582
+ a[12] === K.OK && Wt(a), p = (
583
583
  /*$captured*/
584
- a[13] && Nt(a)
584
+ a[13] && Mt(a)
585
585
  );
586
- const Z = [xi, Zi], j = [];
586
+ const Z = [Gi, zi], j = [];
587
587
  function le(m, N) {
588
588
  return (
589
589
  /*showUnconformities*/
@@ -595,111 +595,110 @@ function as(a) {
595
595
  )
596
596
  );
597
597
  }
598
- return ~(F = le(a)) && (M = j[F] = Z[F](a)), {
598
+ return ~(S = le(a)) && (M = j[S] = Z[S](a)), {
599
599
  c() {
600
- t = w("div"), i = w("div"), s = w("div"), R.c(), u = B(), E && E.c(), o = B(), I && I.c(), r = B(), H && H.c(), f = B(), b = w("canvas"), C = B(), _ = w("canvas"), d = B(), h = w("canvas"), L = B(), q && q.c(), D = B(), X && X.c(), ee = B(), Y && Y.c(), te = B(), p && p.c(), $ = B(), M && M.c(), ie = Ci(), this.c = oe, c(b, "id", "bry-ce-displayCanvas"), c(b, "class", "max-w-full"), c(_, "id", "bry-ce-detectionsCanvas"), c(_, "class", "absolute top-0 left-0 max-w-full"), c(h, "id", "bry-ce-maskCanvas"), c(h, "class", "absolute top-0 left-0 max-w-full"), c(s, "class", v = /*$ready*/
600
+ t = w("div"), i = w("div"), s = w("div"), R.c(), u = B(), E && E.c(), o = B(), F && F.c(), r = B(), H && H.c(), f = B(), b = w("canvas"), C = B(), _ = w("canvas"), d = B(), h = w("canvas"), A = B(), q && q.c(), D = B(), Y && Y.c(), ee = B(), X && X.c(), te = B(), p && p.c(), $ = B(), M && M.c(), ie = wi(), this.c = oe, c(b, "id", "bry-ce-displayCanvas"), c(b, "class", "max-w-full"), c(_, "id", "bry-ce-detectionsCanvas"), c(_, "class", "absolute top-0 left-0 max-w-full"), c(h, "id", "bry-ce-maskCanvas"), c(h, "class", "absolute top-0 left-0 max-w-full"), c(s, "class", v = /*$ready*/
601
601
  a[21] ? "relative" : "relative w-0 h-0"), s.hidden = O = /*$cameraStatusStore*/
602
602
  a[12] !== K.OK, c(i, "class", "relative mx-auto"), c(t, "class", "flex flex-col justify-between");
603
603
  },
604
604
  m(m, N) {
605
- Q(m, t, N), l(t, i), l(i, s), R.m(s, null), l(s, u), E && E.m(s, null), l(s, o), I && I.m(s, null), l(s, r), H && H.m(s, null), l(s, f), l(s, b), a[39](b), l(s, C), l(s, _), a[40](_), l(s, d), l(s, h), a[41](h), l(s, L), q && q.m(s, null), l(s, D), X && X.m(s, null), l(i, ee), Y && Y.m(i, null), l(i, te), p && p.m(i, null), a[44](t), Q(m, $, N), ~F && j[F].m(m, N), Q(m, ie, N), P = !0;
605
+ Q(m, t, N), l(t, i), l(i, s), R.m(s, null), l(s, u), E && E.m(s, null), l(s, o), F && F.m(s, null), l(s, r), H && H.m(s, null), l(s, f), l(s, b), a[39](b), l(s, C), l(s, _), a[40](_), l(s, d), l(s, h), a[41](h), l(s, A), q && q.m(s, null), l(s, D), Y && Y.m(s, null), l(i, ee), X && X.m(i, null), l(i, te), p && p.m(i, null), a[44](t), Q(m, $, N), ~S && j[S].m(m, N), Q(m, ie, N), P = !0;
606
606
  },
607
607
  p(m, N) {
608
608
  N[0] & /*unique*/
609
- 256 && Ut(n, n = /*unique*/
610
- m[8]) ? (R.d(1), R = At(m), R.c(), R.m(s, u)) : R.p(m, N), /*showConfigButton*/
609
+ 256 && Ht(n, n = /*unique*/
610
+ m[8]) ? (R.d(1), R = Pt(m), R.c(), R.m(s, u)) : R.p(m, N), /*showConfigButton*/
611
611
  m[1] && /*$ready*/
612
612
  m[21] ? E ? N[0] & /*showConfigButton, $ready*/
613
- 2097154 && V(E, 1) : (E = St(), E.c(), V(E, 1), E.m(s, o)) : E && (ve(), z(E, 1, 1, () => {
613
+ 2097154 && V(E, 1) : (E = At(), E.c(), V(E, 1), E.m(s, o)) : E && (ve(), z(E, 1, 1, () => {
614
614
  E = null;
615
615
  }), Ce()), /*showCameraButton*/
616
616
  m[2] && /*$ready*/
617
- m[21] ? I ? N[0] & /*showCameraButton, $ready*/
618
- 2097156 && V(I, 1) : (I = Lt(), I.c(), V(I, 1), I.m(s, r)) : I && (ve(), z(I, 1, 1, () => {
619
- I = null;
617
+ m[21] ? F ? N[0] & /*showCameraButton, $ready*/
618
+ 2097156 && V(F, 1) : (F = St(), F.c(), V(F, 1), F.m(s, r)) : F && (ve(), z(F, 1, 1, () => {
619
+ F = null;
620
620
  }), Ce()), !/*$captured*/
621
621
  m[13] && /*$ready*/
622
622
  m[21] ? H ? (H.p(m, N), N[0] & /*$captured, $ready*/
623
- 2105344 && V(H, 1)) : (H = Ft(m), H.c(), V(H, 1), H.m(s, f)) : H && (ve(), z(H, 1, 1, () => {
623
+ 2105344 && V(H, 1)) : (H = Lt(m), H.c(), V(H, 1), H.m(s, f)) : H && (ve(), z(H, 1, 1, () => {
624
624
  H = null;
625
625
  }), Ce()), /*isCountingDown*/
626
- m[7] ? q ? q.p(m, N) : (q = It(m), q.c(), q.m(s, D)) : q && (q.d(1), q = null), /*$enableFaceApi*/
626
+ m[7] ? q ? q.p(m, N) : (q = Ft(m), q.c(), q.m(s, D)) : q && (q.d(1), q = null), /*$enableFaceApi*/
627
627
  m[20] && !/*isCountingDown*/
628
628
  m[7] && /*$faceValidationAlert*/
629
- m[14] ? X ? X.p(m, N) : (X = Wt(m), X.c(), X.m(s, null)) : X && (X.d(1), X = null), (!P || N[0] & /*$ready*/
629
+ m[14] ? Y ? Y.p(m, N) : (Y = It(m), Y.c(), Y.m(s, null)) : Y && (Y.d(1), Y = null), (!P || N[0] & /*$ready*/
630
630
  2097152 && v !== (v = /*$ready*/
631
631
  m[21] ? "relative" : "relative w-0 h-0")) && c(s, "class", v), (!P || N[0] & /*$cameraStatusStore*/
632
632
  4096 && O !== (O = /*$cameraStatusStore*/
633
633
  m[12] !== K.OK)) && (s.hidden = O), !/*$ready*/
634
634
  m[21] && /*$cameraStatusStore*/
635
- m[12] === K.OK ? Y ? Y.p(m, N) : (Y = Mt(m), Y.c(), Y.m(i, te)) : Y && (Y.d(1), Y = null), /*$captured*/
636
- m[13] ? p ? p.p(m, N) : (p = Nt(m), p.c(), p.m(i, null)) : p && (p.d(1), p = null);
637
- let ce = F;
638
- F = le(m), F === ce ? ~F && j[F].p(m, N) : (M && (ve(), z(j[ce], 1, 1, () => {
635
+ m[12] === K.OK ? X ? X.p(m, N) : (X = Wt(m), X.c(), X.m(i, te)) : X && (X.d(1), X = null), /*$captured*/
636
+ m[13] ? p ? p.p(m, N) : (p = Mt(m), p.c(), p.m(i, null)) : p && (p.d(1), p = null);
637
+ let ce = S;
638
+ S = le(m), S === ce ? ~S && j[S].p(m, N) : (M && (ve(), z(j[ce], 1, 1, () => {
639
639
  j[ce] = null;
640
- }), Ce()), ~F ? (M = j[F], M ? M.p(m, N) : (M = j[F] = Z[F](m), M.c()), V(M, 1), M.m(ie.parentNode, ie)) : M = null);
640
+ }), Ce()), ~S ? (M = j[S], M ? M.p(m, N) : (M = j[S] = Z[S](m), M.c()), V(M, 1), M.m(ie.parentNode, ie)) : M = null);
641
641
  },
642
642
  i(m) {
643
- P || (V(E), V(I), V(H), V(M), P = !0);
643
+ P || (V(E), V(F), V(H), V(M), P = !0);
644
644
  },
645
645
  o(m) {
646
- z(E), z(I), z(H), z(M), P = !1;
646
+ z(E), z(F), z(H), z(M), P = !1;
647
647
  },
648
648
  d(m) {
649
- m && G(t), R.d(m), E && E.d(), I && I.d(), H && H.d(), a[39](null), a[40](null), a[41](null), q && q.d(), X && X.d(), Y && Y.d(), p && p.d(), a[44](null), m && G($), ~F && j[F].d(m), m && G(ie);
649
+ m && G(t), R.d(m), E && E.d(), F && F.d(), H && H.d(), a[39](null), a[40](null), a[41](null), q && q.d(), Y && Y.d(), X && X.d(), p && p.d(), a[44](null), m && G($), ~S && j[S].d(m), m && G(ie);
650
650
  }
651
651
  };
652
652
  }
653
- let os = !1, ns = 5;
654
- function Ht(a, t, i) {
653
+ let ss = !1, as = 5;
654
+ function Bt(a, t, i) {
655
655
  const s = t.videoWidth / t.videoHeight, n = i.width / i.height;
656
656
  let u = 0, o = 0, r = t.videoWidth, f = t.videoHeight;
657
657
  s > n ? (r = t.videoHeight * n, u = (t.videoWidth - r) / 2) : s < n && (f = t.videoWidth / n, o = (t.videoHeight - f) / 2), a.drawImage(t, u, o, r, f, 0, 0, i.width, i.height);
658
658
  }
659
- function ls(a, t, i) {
660
- let s, n, u, o, r, f, b, C, _, d, h, L, D, v, O, ee, te, $, F, M, ie, P, R, E, I, H, q, X, Y;
661
- T(a, $e, (e) => i(63, s = e)), T(a, Pe, (e) => i(65, u = e)), T(a, se, (e) => i(12, o = e)), T(a, ki, (e) => i(66, r = e)), T(a, Ae, (e) => i(67, f = e)), T(a, yi, (e) => i(68, b = e)), T(a, ge, (e) => i(69, C = e)), T(a, _e, (e) => i(70, _ = e)), T(a, Se, (e) => i(13, d = e)), T(a, et, (e) => i(71, h = e)), T(a, vt, (e) => i(72, L = e)), T(a, Ct, (e) => i(73, D = e)), T(a, Le, (e) => i(14, v = e)), T(a, Fe, (e) => i(15, O = e)), T(a, kt, (e) => i(16, ee = e)), T(a, yt, (e) => i(17, te = e)), T(a, tt, (e) => i(18, $ = e)), T(a, it, (e) => i(74, F = e)), T(a, Dt, (e) => i(75, ie = e)), T(a, Di, (e) => i(20, P = e)), T(a, Ie, (e) => i(21, R = e)), T(a, st, (e) => i(76, E = e)), T(a, We, (e) => i(77, I = e)), T(a, Ei, (e) => i(22, H = e)), T(a, Ti, (e) => i(23, q = e)), T(a, Oi, (e) => i(24, X = e)), T(a, Ri, (e) => i(25, Y = e));
662
- let p, Z, j, le = !1, m = {}, N = !1, { enableMinutiae: ce } = t, { videoDimensions: He } = t, { noTabs: Ue } = t, { weightsPath: Ke } = t, { showUnconformities: ut } = t, { videoOverlay: Ee } = t, { videoOverlayTransparency: he } = t, { showConfigButton: ft } = t, { showCameraButton: dt } = t;
663
- const Te = Ot(!1);
659
+ function os(a, t, i) {
660
+ let s, n, u, o, r, f, b, C, _, d, h, A, D, v, O, ee, te, $, S, M, ie, P, R, E, F, H, q, Y, X;
661
+ T(a, $e, (e) => i(63, s = e)), T(a, Ae, (e) => i(65, u = e)), T(a, se, (e) => i(12, o = e)), T(a, vi, (e) => i(66, r = e)), T(a, Se, (e) => i(67, f = e)), T(a, Ci, (e) => i(68, b = e)), T(a, ge, (e) => i(69, C = e)), T(a, _e, (e) => i(70, _ = e)), T(a, Le, (e) => i(13, d = e)), T(a, et, (e) => i(71, h = e)), T(a, wt, (e) => i(72, A = e)), T(a, vt, (e) => i(73, D = e)), T(a, Fe, (e) => i(14, v = e)), T(a, Ie, (e) => i(15, O = e)), T(a, Ct, (e) => i(16, ee = e)), T(a, kt, (e) => i(17, te = e)), T(a, tt, (e) => i(18, $ = e)), T(a, it, (e) => i(74, S = e)), T(a, yt, (e) => i(75, ie = e)), T(a, ki, (e) => i(20, P = e)), T(a, We, (e) => i(21, R = e)), T(a, st, (e) => i(76, E = e)), T(a, Me, (e) => i(77, F = e)), T(a, yi, (e) => i(22, H = e)), T(a, Di, (e) => i(23, q = e)), T(a, Ei, (e) => i(24, Y = e)), T(a, Ti, (e) => i(25, X = e));
662
+ let p, Z, j, le = !1, m = {}, N = !1, { enableMinutiae: ce } = t, { videoDimensions: Ue } = t, { noTabs: Ke } = t, { weightsPath: Ve } = t, { showUnconformities: ut } = t, { videoOverlay: Ee } = t, { videoOverlayTransparency: he } = t, { showConfigButton: ft } = t, { showCameraButton: dt } = t;
663
+ const Te = Tt(!1);
664
664
  T(a, Te, (e) => i(64, n = e));
665
- const Ve = Ot("data:image/png;base64");
666
- T(a, Ve, (e) => i(19, M = e));
667
- let ue, U, ht = !1, me = !0, mt = 0, qe = 0, Xe = !0, Ye = 0, je = !1, Je = (/* @__PURE__ */ new Date()).getTime(), Qe = !1, k = {
665
+ const qe = Tt("data:image/png;base64");
666
+ T(a, qe, (e) => i(19, M = e));
667
+ let ue, U, ht = !1, me = !0, mt = 0, Ye = 0, Xe = !0, je = 0, Je = !1, Qe = (/* @__PURE__ */ new Date()).getTime(), ze = !1, k = {
668
668
  topLeftX: 130,
669
669
  topLeftY: 70,
670
670
  width: 540,
671
671
  height: 400
672
672
  };
673
- Pi.mixin({
673
+ Oi.mixin({
674
674
  toast: !0,
675
675
  position: "bottom-left",
676
676
  timer: 13e3,
677
677
  timerProgressBar: !0
678
- }), Ai(async () => {
679
- g(Ie, R = !1, R), bt(), await ze(), P && (await Si(Ke), N = !0), Xt();
678
+ }), Ri(async () => {
679
+ g(We, R = !1, R), bt(), await Ge(), P && (await Pi(Ve), N = !0), qt();
680
680
  });
681
681
  function bt() {
682
- g(Se, d = !1, d), g(Ct, D = !0, D), g(Le, v = "", v), g(Ae, f = at.REAR_CAMERA, f), g(se, o = K.OK, o), g(Pe, u = !1, u), g(Fe, O = !1, O), g(tt, $ = lt.OK, $), g(it, F = "", F);
683
- const e = Kt(ot);
682
+ g(Le, d = !1, d), g(vt, D = !0, D), g(Fe, v = "", v), g(Se, f = at.REAR_CAMERA, f), g(se, o = K.OK, o), g(Ae, u = !1, u), g(Ie, O = !1, O), g(tt, $ = lt.OK, $), g(it, S = "", S);
683
+ const e = Ut(ot);
684
684
  e.closedMouth = !1, e.isPersonCloseEnough = !1, e.isPersonTooclose = !0, e.isPersonInFrame = !1, ot.set(e);
685
685
  }
686
- function Vt() {
687
- const e = _.videoWidth, A = _.videoHeight;
688
- let S = A * 0.75, y = S * 1.36;
689
- k.topLeftX = (e - y) / 2, k.topLeftY = (A - S) / 3, Me() && (S = A * 0.85, y = S * 1.5, k.topLeftX = (e - y) / 2, k.topLeftY = (A - S) / 2), k.width = y, k.height = S, g(We, I.y = k.topLeftY, I), g(We, I.height = k.height, I), g(We, I.width = k.width, I);
686
+ function Kt() {
687
+ const e = _.videoWidth, L = _.videoHeight, I = L * 0.85, y = I * 1.5;
688
+ k.topLeftX = (e - y) / 2, k.topLeftY = (L - I) / 3, Ne() && (k.topLeftY = (L - I) / 2), k.width = y, k.height = I, g(Me, F.y = k.topLeftY, F), g(Me, F.height = k.height, F), g(Me, F.width = k.width, F);
690
689
  }
691
- function gt(e, A) {
692
- e.clearRect(0, 0, U.width, U.height), e.save(), Vt(), Ee != "none" ? (he > 0 && (e.globalAlpha = he / 100), e.fillStyle = Ee, e.fillRect(0, 0, U.width, U.height)) : (e.beginPath(), e.rect(0, 0, U.width, U.height)), e.rect(k.topLeftX, k.topLeftY, k.width, k.height), he == 0 && e.clip(), Ht(e, A, U), e.restore(), e.save(), e.beginPath();
693
- const S = window.getComputedStyle(U).getPropertyValue("--p"), y = window.getComputedStyle(U).getPropertyValue("--su");
694
- if (e.strokeStyle = `hsl(${S})`, e.lineWidth = 12, e.lineJoin = "round", e.setLineDash([28, 8]), e.rect(k.topLeftX, k.topLeftY, k.width, k.height), e.stroke(), le && !je) {
695
- const ae = 1 - (Ye - (/* @__PURE__ */ new Date()).getTime()) / 4500;
690
+ function gt(e, L) {
691
+ e.clearRect(0, 0, U.width, U.height), e.save(), Kt(), Ee != "none" ? (he > 0 && (e.globalAlpha = he / 100), e.fillStyle = Ee, e.fillRect(0, 0, U.width, U.height)) : (e.beginPath(), e.rect(0, 0, U.width, U.height)), e.rect(k.topLeftX, k.topLeftY, k.width, k.height), he == 0 && e.clip(), Bt(e, L, U), e.restore(), e.save(), e.beginPath();
692
+ const I = window.getComputedStyle(U).getPropertyValue("--p"), y = window.getComputedStyle(U).getPropertyValue("--su");
693
+ if (e.strokeStyle = `hsl(${I})`, e.lineWidth = 12, e.lineJoin = "round", e.setLineDash([28, 8]), e.rect(k.topLeftX, k.topLeftY, k.width, k.height), e.stroke(), le && !Je) {
694
+ const ae = 1 - (je - (/* @__PURE__ */ new Date()).getTime()) / 4500;
696
695
  e.save(), e.beginPath(), e.setLineDash([]), e.lineWidth = 14, e.strokeStyle = `hsl(${y})`;
697
- const Ge = k.width * 3 * ae, Re = k.height * 2 * ae, Ze = Ge < k.width ? Ge : k.width, xe = Re < k.height ? Re : k.height;
698
- e.rect(k.topLeftX, k.topLeftY, Ze, xe), e.stroke();
696
+ const Ze = k.width * 3 * ae, Re = k.height * 2 * ae, xe = Ze < k.width ? Ze : k.width, Pe = Re < k.height ? Re : k.height;
697
+ e.rect(k.topLeftX, k.topLeftY, xe, Pe), e.stroke();
699
698
  }
700
699
  e.beginPath();
701
700
  const W = new Path2D();
702
- W.rect(k.topLeftX, k.topLeftY, k.width, k.height), e.clip(W), Ht(e, A, U), e.restore();
701
+ W.rect(k.topLeftX, k.topLeftY, k.width, k.height), e.clip(W), Bt(e, L, U), e.restore();
703
702
  }
704
703
  function _t() {
705
704
  g(se, o = K.OK, o), ht = !0, i(11, me = !1);
@@ -708,18 +707,18 @@ function ls(a, t, i) {
708
707
  if (P && !N)
709
708
  return pe(p, be);
710
709
  if (p) {
711
- if (E !== nt.Document && !Ue)
710
+ if (E !== nt.Document && !Ke)
712
711
  return pe(p, be);
713
- g(Ie, R = !0, R), P ? (n || g(Te, n = !0, n), gt(U.getContext("2d"), p), pe(p, be)) : (gt(U.getContext("2d"), p), pe(p, be));
712
+ g(We, R = !0, R), P ? (n || g(Te, n = !0, n), gt(U.getContext("2d"), p), pe(p, be)) : (gt(U.getContext("2d"), p), pe(p, be));
714
713
  }
715
714
  }
716
- async function qt() {
717
- ie && (Tt(), g(Dt, ie = !1, ie)), g(tt, $ = lt.OK, $), g(Se, d = !0, d), g(Fe, O = !0, O);
718
- const e = document.createElement("canvas"), A = e.getContext("2d"), S = 0.2 * k.width, y = 0.2 * k.height;
719
- e.width = k.width + S, e.height = k.height + y, A?.drawImage(p, k.topLeftX - S / 2, k.topLeftY - y / 2, k.width + S, k.height + y, 0, 0, e.width, e.height);
715
+ async function Vt() {
716
+ ie && (Et(), g(yt, ie = !1, ie)), g(tt, $ = lt.OK, $), g(Le, d = !0, d), g(Ie, O = !0, O);
717
+ const e = document.createElement("canvas"), L = e.getContext("2d"), I = 0.2 * k.width, y = 0.2 * k.height;
718
+ e.width = k.width + I, e.height = k.height + y, L?.drawImage(p, k.topLeftX - I / 2, k.topLeftY - y / 2, k.width + I, k.height + y, 0, 0, e.width, e.height);
720
719
  const W = e.toDataURL("image/jpeg").split(",");
721
- g(Ve, M = W[0], M), g(yt, te = W[1], te), g(it, F = W[1], F);
722
- const ae = [{ data: F }];
720
+ g(qe, M = W[0], M), g(kt, te = W[1], te), g(it, S = W[1], S);
721
+ const ae = [{ data: S }];
723
722
  window.dispatchEvent(new CustomEvent(
724
723
  "document-unconformities-validated",
725
724
  {
@@ -733,176 +732,176 @@ function ls(a, t, i) {
733
732
  data: te,
734
733
  justification: ee
735
734
  };
736
- g(Fe, O = !0, O), window.dispatchEvent(new CustomEvent("export-document", { detail: e }));
735
+ g(Ie, O = !0, O), window.dispatchEvent(new CustomEvent("export-document", { detail: e }));
737
736
  }
738
737
  function fe() {
739
738
  window.dispatchEvent(new CustomEvent("document-scrapped")), bt(), me && _t();
740
739
  }
741
- async function ze(e) {
742
- const [A, S] = (He ?? "")?.replaceAll(" ", "")?.split("x")?.map((y) => y ? parseInt(y) : void 0);
743
- if (!(!A || !S)) {
744
- g(_e, _ = { videoWidth: A, videoHeight: S }, _);
740
+ async function Ge(e) {
741
+ const [L, I] = (Ue ?? "")?.replaceAll(" ", "")?.split("x")?.map((y) => y ? parseInt(y) : void 0);
742
+ if (!(!L || !I)) {
743
+ g(_e, _ = { videoWidth: L, videoHeight: I }, _);
745
744
  try {
746
- const { deviceId: y, width: W, height: ae, aspectRatio: Ge, facingMode: Re, touchPoints: Ze } = await Li(A, S, f, e);
747
- if (Me() && !(!Re || Ze <= 1)) {
748
- const xe = window.innerWidth, gi = window.innerHeight, wt = 2560, _i = gi / xe * wt;
745
+ const { deviceId: y, width: W, height: ae, aspectRatio: Ze } = await Ai(L, I, f, e);
746
+ if (Ne()) {
747
+ const Re = window.innerWidth, xe = window.innerHeight, Pe = 2560, bi = xe / Re * Pe;
749
748
  g(
750
749
  _e,
751
750
  _ = {
752
- videoWidth: wt,
753
- videoHeight: _i
751
+ videoWidth: Pe,
752
+ videoHeight: bi
754
753
  },
755
754
  _
756
755
  );
757
756
  } else
758
- g(_e, _ = { videoWidth: A, videoHeight: S }, _);
757
+ g(_e, _ = { videoWidth: L, videoHeight: I }, _);
759
758
  g(ge, C = y || b[0].deviceId, C), g(se, o = K.OK, o);
760
759
  } catch (y) {
761
760
  const W = y;
762
761
  i(11, me = !0);
763
- const ae = Ne(y) && y.constraint ? y.constraint : "";
764
- console.error(W, ae), Ne(W) && "message" in W && W.message.includes("Permission denied") && (console.error("User didn't give permission to use camera!"), g(se, o = K.CAMERA_DENIED_ERROR, o)), Ne(W) && "message" in W && W.message.includes("Requested device not found") && g(se, o = K.DEVICE_NOT_FOUND_ERROR, o), (ae.includes("width") || ae.includes("height")) && (console.error(`Camera does not meet the minimum supported requirements! (${ae})`), g(se, o = K.CAMERA_UNSUPPORTED, o));
762
+ const ae = Be(y) && y.constraint ? y.constraint : "";
763
+ console.error(W, ae), Be(W) && "message" in W && W.message.includes("Permission denied") && (console.error("User didn't give permission to use camera!"), g(se, o = K.CAMERA_DENIED_ERROR, o)), Be(W) && "message" in W && W.message.includes("Requested device not found") && g(se, o = K.DEVICE_NOT_FOUND_ERROR, o), (ae.includes("width") || ae.includes("height")) && (console.error(`Camera does not meet the minimum supported requirements! (${ae})`), g(se, o = K.CAMERA_UNSUPPORTED, o));
765
764
  }
766
765
  }
767
766
  }
768
767
  async function de() {
769
- g(ge, C = "", C), await ze();
768
+ g(ge, C = "", C), await Ge();
770
769
  }
771
- function Xt() {
770
+ function qt() {
772
771
  navigator.mediaDevices.ondevicechange = async (e) => {
773
- await Et(), o !== K.OK ? await de() : L.active || (Be(), g(se, o = K.DEVICE_NOT_FOUND_ERROR, o));
772
+ await Dt(), o !== K.OK ? await de() : A.active || (He(), g(se, o = K.DEVICE_NOT_FOUND_ERROR, o));
774
773
  };
775
774
  }
776
775
  function Yt() {
777
- g(Pe, u = !1, u);
776
+ g(Ae, u = !1, u);
778
777
  const e = (/* @__PURE__ */ new Date()).getTime();
779
- e - Je > 1e4 ? (Je = e, g(Le, v = "docCollector.docWasNotFound", v)) : Qe || (Qe = !0, setTimeout(
778
+ e - Qe > 1e4 ? (Qe = e, g(Fe, v = "docCollector.docWasNotFound", v)) : ze || (ze = !0, setTimeout(
780
779
  () => {
781
- Qe = !1, v != "docCollector.docWasNotFound" && g(Le, v = "", v);
780
+ ze = !1, v != "docCollector.docWasNotFound" && g(Fe, v = "", v);
782
781
  },
783
782
  1500
784
783
  ));
785
784
  }
786
- const jt = _e.subscribe((e) => {
785
+ const Xt = _e.subscribe((e) => {
787
786
  p && Z && (i(4, p.width = e.videoWidth, p), i(4, p.height = e.videoHeight, p), i(5, Z.width = e.videoWidth, Z), i(5, Z.height = e.videoHeight, Z), i(9, ue.width = e.videoWidth, ue), i(9, ue.height = e.videoHeight, ue), i(10, U.width = e.videoWidth, U), i(10, U.height = e.videoHeight, U));
788
- }), Jt = ot.subscribe((e) => {
787
+ }), jt = ot.subscribe((e) => {
789
788
  if (r != "DOCUMENT")
790
789
  return;
791
- let A = "";
792
- if (e.isPersonCloseEnough ? e.isPersonTooclose ? A = "docCollector.moveAwayCamera" : e.isPersonInFrame || (A = "docCollector.stayInFrame") : A = "docCollector.comeCloserCamera", u && Fi(A), !d && D && u && !le && e.isPersonInFrame && !(!e.isPersonCloseEnough || e.isPersonTooclose)) {
793
- i(7, le = !0), Ye = (/* @__PURE__ */ new Date()).getTime() + 4500;
794
- const S = setInterval(
790
+ let L = "";
791
+ if (e.isPersonCloseEnough ? e.isPersonTooclose ? L = "docCollector.moveAwayCamera" : e.isPersonInFrame || (L = "docCollector.stayInFrame") : L = "docCollector.comeCloserCamera", u && Si(L), !d && D && u && !le && e.isPersonInFrame && !(!e.isPersonCloseEnough || e.isPersonTooclose)) {
792
+ i(7, le = !0), je = (/* @__PURE__ */ new Date()).getTime() + 4500;
793
+ const I = setInterval(
795
794
  () => {
796
795
  if (!D || d || !e.isPersonCloseEnough || e.isPersonTooclose || !e.isPersonInFrame) {
797
- i(7, le = !1), je = !0, setTimeout(
796
+ i(7, le = !1), Je = !0, setTimeout(
798
797
  () => {
799
- je = !1;
798
+ Je = !1;
800
799
  },
801
800
  1500
802
- ), clearInterval(S);
801
+ ), clearInterval(I);
803
802
  return;
804
803
  }
805
804
  const y = (/* @__PURE__ */ new Date()).getTime();
806
- Math.floor((Ye - y) % (1e3 * 60) / 1e3) <= 0 && (clearInterval(S), i(7, le = !1), document.getElementsByTagName("biometric-collector")?.[0]?.shadowRoot?.getElementById("bry-cc-capture-btn")?.click());
805
+ Math.floor((je - y) % (1e3 * 60) / 1e3) <= 0 && (clearInterval(I), i(7, le = !1), document.getElementsByTagName("biometric-collector")?.[0]?.shadowRoot?.getElementById("bry-cc-capture-btn")?.click());
807
806
  },
808
807
  250
809
808
  );
810
809
  }
811
- }), Qt = Se.subscribe((e) => {
810
+ }), Jt = Le.subscribe((e) => {
812
811
  j && (e ? (j.classList.remove("flex"), j.classList.add("hidden")) : (j.classList.add("flex"), j.classList.remove("hidden")));
813
- }), zt = et.subscribe((e) => {
812
+ }), Qt = et.subscribe((e) => {
814
813
  p && e && (console.log("setting null in video srcObject"), i(4, p.srcObject = null, p), i(4, p.src = "", p), g(ge, C = null, C));
815
814
  });
816
815
  st.subscribe(async (e) => {
817
- e === nt.Document && await Et();
816
+ e === nt.Document && await Dt();
818
817
  });
819
- const Gt = ge.subscribe(async (e) => {
818
+ const zt = ge.subscribe(async (e) => {
820
819
  if (!e || r != "DOCUMENT")
821
820
  return;
822
821
  p || i(8, m = {});
823
- const { videoHeight: A, videoWidth: S } = _;
822
+ const { videoHeight: L, videoWidth: I } = _;
824
823
  try {
825
- const y = await Ii(S, A, e);
826
- i(4, p.srcObject = y, p), g(vt, L = y, L), g(et, h = !1, h), y.getTracks().forEach((W) => {
824
+ const y = await Li(I, L, e);
825
+ i(4, p.srcObject = y, p), g(wt, A = y, A), g(et, h = !1, h), y.getTracks().forEach((W) => {
827
826
  W.readyState === "live" && console.log(`Camera ${W.label} opened successfully!`);
828
- }), Wi(p), Xe || g(se, o = K.CAMERA_ORIENTATION_LANDSCAPE, o);
827
+ }), Fi(p), Xe || g(se, o = K.CAMERA_ORIENTATION_LANDSCAPE, o);
829
828
  } catch (y) {
830
829
  const W = y;
831
- i(11, me = !0), Ne(W) && "message" in W && W.message.includes("Requested device not found") && g(se, o = K.DEVICE_NOT_FOUND_ERROR, o);
830
+ i(11, me = !0), Be(W) && "message" in W && W.message.includes("Requested device not found") && g(se, o = K.DEVICE_NOT_FOUND_ERROR, o);
832
831
  }
833
- }), Zt = st.subscribe(async (e) => {
834
- e === nt.Document && !ht && !d && os && await _t();
835
- }), xt = Te.subscribe(async (e) => {
832
+ }), Gt = st.subscribe(async (e) => {
833
+ e === nt.Document && !ht && !d && ss && await _t();
834
+ }), Zt = Te.subscribe(async (e) => {
836
835
  e && pt();
837
- }), $t = Ie.subscribe((e) => {
836
+ }), xt = We.subscribe((e) => {
838
837
  e && window.dispatchEvent(new CustomEvent("brycc-camera-ready"));
839
- }), ei = Mi.subscribe(async (e) => {
838
+ }), $t = Ii.subscribe(async (e) => {
840
839
  if (_) {
841
- if (Be(), !Me()) {
842
- const S = (b.findIndex((W) => W.deviceId === C) + 1) % b.length, y = b[S].deviceId;
843
- await ze(y);
840
+ if (He(), !Ne()) {
841
+ const I = (b.findIndex((W) => W.deviceId === C) + 1) % b.length, y = b[I].deviceId;
842
+ await Ge(y);
844
843
  return;
845
844
  }
846
- e ? (g(Ae, f = at.FRONT_CAMERA, f), await de()) : (g(Ae, f = at.REAR_CAMERA, f), await de());
845
+ e ? (g(Se, f = at.FRONT_CAMERA, f), await de()) : (g(Se, f = at.REAR_CAMERA, f), await de());
847
846
  }
848
- }), ti = Ni.subscribe(async (e) => {
849
- !e.isSupported || !Me() || r != "DOCUMENT" || (Be(), Xe = e.orientation.includes("landscape"), Xe ? g(se, o = K.OK, o) : g(se, o = K.CAMERA_ORIENTATION_LANDSCAPE, o), await de());
847
+ }), ei = Wi.subscribe(async (e) => {
848
+ !e.isSupported || !Ne() || r != "DOCUMENT" || (He(), Xe = e.orientation.includes("landscape"), Xe ? g(se, o = K.OK, o) : g(se, o = K.CAMERA_ORIENTATION_LANDSCAPE, o), await de());
850
849
  });
851
850
  async function pt() {
852
851
  let e;
853
852
  try {
854
- if (qe >= ns) {
855
- qe = 0;
856
- const A = await Bi(), S = await import("./face_api_0e3ce8c8_2.3.1-RC04.js");
853
+ if (Ye >= as) {
854
+ Ye = 0;
855
+ const L = await Mi(), I = await import("./face_api_0e3ce8c8_2.3.1.js");
857
856
  let y;
858
- y = S.detectSingleFace(U, A), e = await y.withFaceLandmarks(), Z.getContext("2d")?.clearRect(0, 0, Z.width, Z.height), e != null ? (Hi(e, Z, ce, !0), g(Pe, u = !0, u), Je = (/* @__PURE__ */ new Date()).getTime()) : Yt();
857
+ y = I.detectSingleFace(U, L), e = await y.withFaceLandmarks(), Z.getContext("2d")?.clearRect(0, 0, Z.width, Z.height), e != null ? (Ni(e, Z, ce, !0), g(Ae, u = !0, u), Qe = (/* @__PURE__ */ new Date()).getTime()) : Yt();
859
858
  } else
860
- qe++;
859
+ Ye++;
861
860
  n && pe(p, pt);
862
- } catch (A) {
863
- console.warn(`FaceapiLoop: ${A}`);
861
+ } catch (L) {
862
+ console.warn(`FaceapiLoop: ${L}`);
864
863
  }
865
864
  }
866
865
  $e.subscribe(async (e) => {
867
866
  e && (fe(), g($e, s = !1, s));
868
- }), Ui(() => {
869
- Be(), Qt(), Jt(), jt(), zt(), Gt(), Zt(), clearInterval(mt), xt(), ei(), $t(), ti(), Tt(), mt = 0;
867
+ }), Bi(() => {
868
+ He(), Jt(), jt(), Xt(), Qt(), zt(), Gt(), clearInterval(mt), Zt(), $t(), xt(), ei(), Et(), mt = 0;
870
869
  });
871
- function ii(e) {
870
+ function ti(e) {
872
871
  we[e ? "unshift" : "push"](() => {
873
872
  p = e, i(4, p);
874
873
  });
875
874
  }
876
- function si(e) {
875
+ function ii(e) {
877
876
  we[e ? "unshift" : "push"](() => {
878
877
  U = e, i(10, U);
879
878
  });
880
879
  }
881
- function ai(e) {
880
+ function si(e) {
882
881
  we[e ? "unshift" : "push"](() => {
883
882
  Z = e, i(5, Z);
884
883
  });
885
884
  }
886
- function oi(e) {
885
+ function ai(e) {
887
886
  we[e ? "unshift" : "push"](() => {
888
887
  ue = e, i(9, ue);
889
888
  });
890
889
  }
891
- const ni = () => Oe(), li = () => fe();
892
- function ri(e) {
890
+ const oi = () => Oe(), ni = () => fe();
891
+ function li(e) {
893
892
  we[e ? "unshift" : "push"](() => {
894
893
  j = e, i(6, j);
895
894
  });
896
895
  }
897
- const ci = () => Oe(), ui = () => fe();
898
- function fi() {
899
- ee = this.value, kt.set(ee);
896
+ const ri = () => Oe(), ci = () => fe();
897
+ function ui() {
898
+ ee = this.value, Ct.set(ee);
900
899
  }
901
- const di = () => Oe(), hi = () => fe(), mi = () => fe(), bi = async () => {
900
+ const fi = () => Oe(), di = () => fe(), hi = () => fe(), mi = async () => {
902
901
  await de();
903
902
  };
904
903
  return a.$$set = (e) => {
905
- "enableMinutiae" in e && i(32, ce = e.enableMinutiae), "videoDimensions" in e && i(33, He = e.videoDimensions), "noTabs" in e && i(34, Ue = e.noTabs), "weightsPath" in e && i(35, Ke = e.weightsPath), "showUnconformities" in e && i(0, ut = e.showUnconformities), "videoOverlay" in e && i(36, Ee = e.videoOverlay), "videoOverlayTransparency" in e && i(37, he = e.videoOverlayTransparency), "showConfigButton" in e && i(1, ft = e.showConfigButton), "showCameraButton" in e && i(2, dt = e.showCameraButton);
904
+ "enableMinutiae" in e && i(32, ce = e.enableMinutiae), "videoDimensions" in e && i(33, Ue = e.videoDimensions), "noTabs" in e && i(34, Ke = e.noTabs), "weightsPath" in e && i(35, Ve = e.weightsPath), "showUnconformities" in e && i(0, ut = e.showUnconformities), "videoOverlay" in e && i(36, Ee = e.videoOverlay), "videoOverlayTransparency" in e && i(37, he = e.videoOverlayTransparency), "showConfigButton" in e && i(1, ft = e.showConfigButton), "showCameraButton" in e && i(2, dt = e.showCameraButton);
906
905
  }, [
907
906
  ut,
908
907
  ft,
@@ -928,20 +927,21 @@ function ls(a, t, i) {
928
927
  R,
929
928
  H,
930
929
  q,
931
- X,
932
930
  Y,
931
+ X,
933
932
  Te,
934
- Ve,
935
- qt,
933
+ qe,
934
+ Vt,
936
935
  Oe,
937
936
  fe,
938
937
  de,
939
938
  ce,
940
- He,
941
939
  Ue,
942
940
  Ke,
941
+ Ve,
943
942
  Ee,
944
943
  he,
944
+ ti,
945
945
  ii,
946
946
  si,
947
947
  ai,
@@ -954,22 +954,21 @@ function ls(a, t, i) {
954
954
  fi,
955
955
  di,
956
956
  hi,
957
- mi,
958
- bi
957
+ mi
959
958
  ];
960
959
  }
961
- class rs extends pi {
960
+ class ns extends gi {
962
961
  constructor(t) {
963
- super(), wi(
962
+ super(), _i(
964
963
  this,
965
964
  {
966
965
  target: this.shadowRoot,
967
- props: vi(this.attributes),
966
+ props: pi(this.attributes),
968
967
  customElement: !0
969
968
  },
970
- ls,
971
- as,
972
- Ut,
969
+ os,
970
+ is,
971
+ Ht,
973
972
  {
974
973
  enableMinutiae: 32,
975
974
  videoDimensions: 33,
@@ -1058,7 +1057,7 @@ class rs extends pi {
1058
1057
  return this.$$.ctx[3];
1059
1058
  }
1060
1059
  }
1061
- customElements.define("document-collector", rs);
1060
+ customElements.define("document-collector", ns);
1062
1061
  export {
1063
- rs as default
1062
+ ns as default
1064
1063
  };