@incodetech/web 0.0.0-dev-20260306-aac8dd3 → 0.0.0-dev-20260309-8c96b8e

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 (2) hide show
  1. package/dist/id/id.es.js +150 -153
  2. package/package.json +2 -2
package/dist/id/id.es.js CHANGED
@@ -1,14 +1,14 @@
1
- import { u as e, b as u, S as p, B, c as w, r as z, I as U, a as N } from "../incodeModule-Cep-QgBA.js";
2
- import { createIdCaptureManager as O } from "@incodetech/core/id";
3
- import { d as m, y as v, k as G, D as K, A as Z } from "../vendor-preact-DP-hbKuj.js";
1
+ import { u as e, b as C, S as p, B, c as w, r as z, I as N, a as O } from "../incodeModule-Cep-QgBA.js";
2
+ import { createIdCaptureManager as G } from "@incodetech/core/id";
3
+ import { d as m, y as v, k as K, D as Q, A as Z, q as $ } from "../vendor-preact-DP-hbKuj.js";
4
4
  import "@incodetech/core";
5
- import { L as E, B as Q, P as j } from "../baseTutorial-Bn4o165G.js";
6
- import { P as $ } from "../processing-BivHhXrQ.js";
5
+ import { L as E, B as j, P as q } from "../baseTutorial-Bn4o165G.js";
6
+ import { P as W } from "../processing-BivHhXrQ.js";
7
7
  import "../uiConfig-B8PUPgHY.js";
8
- import { L as q, P as J, a as W, b as X, c as Y, C as e1, d as t1 } from "../captureFooter-I1T3jXYf.js";
8
+ import { L as J, P as X, a as Y, b as e1, c as t1, C as i1, d as n1 } from "../captureFooter-I1T3jXYf.js";
9
9
  import { P as M } from "../page-ws5_se-Y.js";
10
- import { T as H, S as i1 } from "../spinner-BNswWIfS.js";
11
- const n1 = ({ className: n }) => /* @__PURE__ */ e(
10
+ import { T as H, S as D } from "../spinner-BNswWIfS.js";
11
+ const r1 = ({ className: n }) => /* @__PURE__ */ e(
12
12
  "svg",
13
13
  {
14
14
  width: "24",
@@ -56,7 +56,7 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
56
56
  )
57
57
  ]
58
58
  }
59
- ), r1 = ({ className: n }) => /* @__PURE__ */ e(
59
+ ), o1 = ({ className: n }) => /* @__PURE__ */ e(
60
60
  "svg",
61
61
  {
62
62
  width: "24",
@@ -74,7 +74,7 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
74
74
  }
75
75
  )
76
76
  }
77
- ), o1 = ({ className: n }) => /* @__PURE__ */ e(
77
+ ), s1 = ({ className: n }) => /* @__PURE__ */ e(
78
78
  "svg",
79
79
  {
80
80
  width: "24",
@@ -115,7 +115,7 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
115
115
  )
116
116
  ]
117
117
  }
118
- ), s1 = ({
118
+ ), l1 = ({
119
119
  className: n
120
120
  }) => /* @__PURE__ */ e(
121
121
  "svg",
@@ -166,7 +166,7 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
166
166
  )
167
167
  ]
168
168
  }
169
- ), l1 = ({ className: n }) => /* @__PURE__ */ e(
169
+ ), a1 = ({ className: n }) => /* @__PURE__ */ e(
170
170
  "svg",
171
171
  {
172
172
  width: "64",
@@ -187,11 +187,11 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
187
187
  )
188
188
  ]
189
189
  }
190
- ), a1 = ({
190
+ ), c1 = ({
191
191
  onClose: n,
192
192
  onTakeManually: t
193
193
  }) => {
194
- const { t: i } = u(), r = () => {
194
+ const { t: i } = C(), r = () => {
195
195
  t(), n();
196
196
  };
197
197
  return /* @__PURE__ */ e("div", { class: "IncodeCommonIssuesModal", children: /* @__PURE__ */ e("div", { class: "IncodeCommonIssuesModalContent", children: [
@@ -202,31 +202,31 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
202
202
  class: "IncodeCommonIssuesCloseButton",
203
203
  onClick: n,
204
204
  "aria-label": i("commonIssues.close"),
205
- children: /* @__PURE__ */ e(r1, {})
205
+ children: /* @__PURE__ */ e(o1, {})
206
206
  }
207
207
  ) }),
208
208
  /* @__PURE__ */ e("div", { class: "IncodeCommonIssuesContent", children: [
209
- /* @__PURE__ */ e(l1, { className: "IncodeCommonIssuesQuestionIcon" }),
209
+ /* @__PURE__ */ e(a1, { className: "IncodeCommonIssuesQuestionIcon" }),
210
210
  /* @__PURE__ */ e(p, { size: 12 }),
211
211
  /* @__PURE__ */ e("h2", { class: "IncodeCommonIssuesTitle", children: i("commonIssues.commonIssues") }),
212
212
  /* @__PURE__ */ e(p, { size: 24 }),
213
213
  /* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCards", children: [
214
214
  /* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCard", children: [
215
- /* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardIcon", children: /* @__PURE__ */ e(o1, {}) }),
215
+ /* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardIcon", children: /* @__PURE__ */ e(s1, {}) }),
216
216
  /* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardText", children: [
217
217
  /* @__PURE__ */ e("h5", { class: "IncodeCommonIssuesCardTitle", children: i("commonIssues.glarePresent") }),
218
218
  /* @__PURE__ */ e("p", { class: "IncodeCommonIssuesCardBody", children: i("commonIssues.glarePresentDescription") })
219
219
  ] })
220
220
  ] }),
221
221
  /* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCard", children: [
222
- /* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardIcon", children: /* @__PURE__ */ e(n1, {}) }),
222
+ /* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardIcon", children: /* @__PURE__ */ e(r1, {}) }),
223
223
  /* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardText", children: [
224
224
  /* @__PURE__ */ e("h3", { class: "IncodeCommonIssuesCardTitle", children: i("commonIssues.blurPresent") }),
225
225
  /* @__PURE__ */ e("p", { class: "IncodeCommonIssuesCardBody", children: i("commonIssues.blurPresentDescription") })
226
226
  ] })
227
227
  ] }),
228
228
  /* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCard", children: [
229
- /* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardIcon", children: /* @__PURE__ */ e(s1, {}) }),
229
+ /* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardIcon", children: /* @__PURE__ */ e(l1, {}) }),
230
230
  /* @__PURE__ */ e("div", { class: "IncodeCommonIssuesCardText", children: [
231
231
  /* @__PURE__ */ e("h3", { class: "IncodeCommonIssuesCardTitle", children: i("commonIssues.notReadable") }),
232
232
  /* @__PURE__ */ e("p", { class: "IncodeCommonIssuesCardBody", children: i("commonIssues.notReadableDescription") })
@@ -247,14 +247,14 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
247
247
  ] })
248
248
  ] })
249
249
  ] }) });
250
- }, c1 = ({
250
+ }, d1 = ({
251
251
  orientation: n,
252
252
  mode: t,
253
253
  state: i,
254
254
  children: r,
255
255
  className: o
256
256
  }) => {
257
- const s = n !== "vertical" || t === "passport", a = t === "passport", l = `IncodeCaptureFrame${i.charAt(0).toUpperCase() + i.slice(1)}`;
257
+ const s = n !== "vertical" || t === "passport", c = t === "passport", l = `IncodeCaptureFrame${i.charAt(0).toUpperCase() + i.slice(1)}`;
258
258
  return /* @__PURE__ */ e(
259
259
  "div",
260
260
  {
@@ -262,26 +262,26 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
262
262
  "IncodeCaptureFrame",
263
263
  s ? "IncodeCaptureFrameHorizontal" : "IncodeCaptureFrameVertical",
264
264
  l,
265
- a && "IncodeCaptureFramePassport",
265
+ c && "IncodeCaptureFramePassport",
266
266
  o
267
267
  ),
268
268
  children: r
269
269
  }
270
270
  );
271
- }, D = ({
271
+ }, V = ({
272
272
  imageUrl: n,
273
273
  orientation: t,
274
274
  mode: i,
275
275
  borderState: r,
276
276
  topContent: o,
277
277
  bottomContent: s,
278
- overlayContent: a
278
+ overlayContent: c
279
279
  }) => {
280
- const { t: l } = u();
280
+ const { t: l } = C();
281
281
  return /* @__PURE__ */ e(M, { hideHeader: !0, hideFooterBranding: !0, children: /* @__PURE__ */ e("div", { class: "IncodeIdProcessingLayout", children: /* @__PURE__ */ e("div", { class: "IncodeIdProcessingLayoutContent", children: [
282
282
  o && /* @__PURE__ */ e("div", { class: "IncodeIdProcessingTopArea", children: o }),
283
283
  /* @__PURE__ */ e(
284
- c1,
284
+ d1,
285
285
  {
286
286
  orientation: t,
287
287
  mode: i === "id" ? "front" : i,
@@ -295,46 +295,46 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
295
295
  class: "IncodeIdProcessingImage"
296
296
  }
297
297
  ),
298
- a && /* @__PURE__ */ e("div", { class: "IncodeIdProcessingOverlay", children: a })
298
+ c && /* @__PURE__ */ e("div", { class: "IncodeIdProcessingOverlay", children: c })
299
299
  ]
300
300
  }
301
301
  ),
302
302
  /* @__PURE__ */ e("div", { class: "IncodeIdProcessingBottomArea", children: [
303
303
  /* @__PURE__ */ e("div", { class: "IncodeCaptureEncryptionLabel", children: [
304
- /* @__PURE__ */ e(q, { className: "IncodeCaptureEncryptionIcon" }),
304
+ /* @__PURE__ */ e(J, { className: "IncodeCaptureEncryptionIcon" }),
305
305
  /* @__PURE__ */ e("span", { children: l("v2.capture.label") })
306
306
  ] }),
307
307
  s
308
308
  ] })
309
309
  ] }) }) });
310
- }, d1 = ({
310
+ }, C1 = ({
311
311
  imageUrl: n,
312
312
  progress: t,
313
313
  orientation: i,
314
314
  mode: r
315
315
  }) => {
316
- const { t: o } = u(), s = i !== "vertical" || r === "passport", [a, l] = m(null);
316
+ const { t: o } = C(), s = i !== "vertical" || r === "passport", [c, l] = m(null);
317
317
  return v(() => {
318
- s ? import("../id-laser-h-BBV3r3rz.js").then((c) => {
319
- l(c.default);
320
- }) : import("../id-laser-v-BTHJaSfx.js").then((c) => {
321
- l(c.default);
318
+ s ? import("../id-laser-h-BBV3r3rz.js").then((d) => {
319
+ l(d.default);
320
+ }) : import("../id-laser-v-BTHJaSfx.js").then((d) => {
321
+ l(d.default);
322
322
  });
323
323
  }, [s]), /* @__PURE__ */ e(
324
- D,
324
+ V,
325
325
  {
326
326
  imageUrl: n,
327
327
  orientation: i,
328
328
  mode: r,
329
329
  borderState: "analyzing",
330
330
  topContent: /* @__PURE__ */ e("div", { class: "IncodeAnalyzingContent", children: [
331
- /* @__PURE__ */ e(J, { progress: t }),
331
+ /* @__PURE__ */ e(X, { progress: t }),
332
332
  /* @__PURE__ */ e("h2", { class: "IncodeAnalyzingTitle", children: o("idv2.capture.processing.analyzing") })
333
333
  ] }),
334
- overlayContent: a ? /* @__PURE__ */ e(
334
+ overlayContent: c ? /* @__PURE__ */ e(
335
335
  E,
336
336
  {
337
- animationData: a,
337
+ animationData: c,
338
338
  loop: !0,
339
339
  className: "IncodeAnalyzingLottie"
340
340
  }
@@ -358,7 +358,7 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
358
358
  }
359
359
  )
360
360
  }
361
- ), V = ({ className: n }) => /* @__PURE__ */ e(
361
+ ), A = ({ className: n }) => /* @__PURE__ */ e(
362
362
  "svg",
363
363
  {
364
364
  class: n,
@@ -375,49 +375,49 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
375
375
  }
376
376
  )
377
377
  }
378
- ), A = ({
378
+ ), S = ({
379
379
  variant: n,
380
380
  imageUrl: t,
381
381
  orientation: i,
382
382
  mode: r,
383
383
  title: o,
384
384
  subtitle: s,
385
- buttonText: a,
385
+ buttonText: c,
386
386
  onButtonClick: l,
387
- attemptsRemaining: c
387
+ attemptsRemaining: d
388
388
  }) => {
389
- const { t: d } = u();
389
+ const { t: a } = C();
390
390
  return /* @__PURE__ */ e(
391
- D,
391
+ V,
392
392
  {
393
393
  imageUrl: t,
394
394
  orientation: i,
395
395
  mode: r,
396
396
  borderState: n,
397
397
  topContent: /* @__PURE__ */ e("div", { class: "IncodeIdProcessingResultContent", children: [
398
- n === "success" ? /* @__PURE__ */ e(u1, { className: "IncodeIdProcessingResultIcon" }) : /* @__PURE__ */ e(V, { className: "IncodeIdProcessingResultIcon" }),
398
+ n === "success" ? /* @__PURE__ */ e(u1, { className: "IncodeIdProcessingResultIcon" }) : /* @__PURE__ */ e(A, { className: "IncodeIdProcessingResultIcon" }),
399
399
  /* @__PURE__ */ e(p, { size: 16 }),
400
400
  o && /* @__PURE__ */ e("h2", { class: "IncodeIdProcessingResultTitle", children: o }),
401
- s && /* @__PURE__ */ e(G, { children: [
401
+ s && /* @__PURE__ */ e(K, { children: [
402
402
  /* @__PURE__ */ e(p, { size: 12 }),
403
403
  /* @__PURE__ */ e("p", { class: "IncodeIdProcessingResultSubtitle", children: s })
404
404
  ] })
405
405
  ] }),
406
406
  bottomContent: /* @__PURE__ */ e("div", { class: "IncodeIdProcessingResultButtonContainer", children: [
407
- c !== void 0 && c > 0 && /* @__PURE__ */ e("p", { class: "IncodeIdProcessingResultAttempts", children: d("v2.idError.attemptsLeft", {
408
- count: c
407
+ d !== void 0 && d > 0 && /* @__PURE__ */ e("p", { class: "IncodeIdProcessingResultAttempts", children: a("v2.idError.attemptsLeft", {
408
+ count: d
409
409
  }) }),
410
- /* @__PURE__ */ e(B, { onClick: l, "data-testid": "retry-button", children: a })
410
+ /* @__PURE__ */ e(B, { onClick: l, "data-testid": "retry-button", children: c })
411
411
  ] })
412
412
  }
413
413
  );
414
- }, C1 = ({ manager: n, state: t }) => {
415
- const { t: i } = u();
414
+ }, p1 = ({ manager: n, state: t }) => {
415
+ const { t: i } = C();
416
416
  if (!t.previewImageUrl)
417
417
  return null;
418
418
  const r = t.currentMode === "passport" ? "passport" : "id", o = () => t.needsBackCapture ? i("v2.idSuccess.subtitle") : t.needsFrontCapture ? i("idv2.capture.processing.successBackSubtitleScanFront") : i("v2.idSuccess.subtitleBack"), s = () => t.needsBackCapture ? i("idv2.capture.processing.scanBack") : t.needsFrontCapture ? i("idv2.capture.processing.scanFront") : i("idv2.capturePreview.continue");
419
419
  return /* @__PURE__ */ e(
420
- A,
420
+ S,
421
421
  {
422
422
  variant: "success",
423
423
  imageUrl: t.previewImageUrl,
@@ -429,8 +429,8 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
429
429
  onButtonClick: () => n.nextStep()
430
430
  }
431
431
  );
432
- }, S = ({ manager: n, state: t, ...i }) => {
433
- const { t: r } = u();
432
+ }, R = ({ manager: n, state: t, ...i }) => {
433
+ const { t: r } = C();
434
434
  if (t.status === "error")
435
435
  return /* @__PURE__ */ e("div", { class: "IncodeIdError", children: [
436
436
  /* @__PURE__ */ e("div", { class: "IncodeIdErrorMessage", children: t.error }),
@@ -438,7 +438,7 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
438
438
  ] });
439
439
  const o = t.currentMode === "passport" ? "passport" : "id";
440
440
  return t.previewImageUrl ? /* @__PURE__ */ e(
441
- A,
441
+ S,
442
442
  {
443
443
  variant: "error",
444
444
  imageUrl: t.previewImageUrl,
@@ -451,13 +451,13 @@ const n1 = ({ className: n }) => /* @__PURE__ */ e(
451
451
  attemptsRemaining: t.attemptsRemaining
452
452
  }
453
453
  ) : null;
454
- }, p1 = ({ manager: n }) => {
455
- const { t } = u(), i = () => {
454
+ }, h1 = ({ manager: n }) => {
455
+ const { t } = C(), i = () => {
456
456
  n.retryCapture();
457
457
  };
458
458
  return /* @__PURE__ */ e(M, { hideHeader: !0, hideFooterBranding: !0, className: "IncodeIdExpiredPage", children: [
459
459
  /* @__PURE__ */ e("div", { class: "IncodeIdExpiredContent", children: [
460
- /* @__PURE__ */ e(V, { className: "IncodeIdExpiredIcon" }),
460
+ /* @__PURE__ */ e(A, { className: "IncodeIdExpiredIcon" }),
461
461
  /* @__PURE__ */ e(H, { className: "IncodeIdExpiredTitle", children: t("idv2.capture.notifications.expiredId") }),
462
462
  /* @__PURE__ */ e(p, { size: 12 }),
463
463
  /* @__PURE__ */ e("p", { class: "IncodeIdExpiredSubtitle", children: t("idv2.capture.notifications.useDifferent") }),
@@ -474,7 +474,7 @@ const x = {
474
474
  front: () => import("../frontdevicelottie-KhKxT5n9.js"),
475
475
  back: () => import("../backdevicelottie-B4NgyWmX.js")
476
476
  };
477
- function R(n) {
477
+ function U(n) {
478
478
  k || (k = !0, Promise.all([
479
479
  x.blur(),
480
480
  x.glare(),
@@ -486,18 +486,18 @@ function R(n) {
486
486
  }).catch(() => {
487
487
  }));
488
488
  }
489
- function h1() {
490
- R();
491
- }
492
489
  function f1() {
490
+ U();
491
+ }
492
+ function I1() {
493
493
  v(() => {
494
- h1();
494
+ f1();
495
495
  }, []);
496
496
  }
497
- function I1(n, t) {
498
- const { t: i } = u(), [, r] = m(0);
497
+ function m1(n, t) {
498
+ const { t: i } = C(), [, r] = m(0);
499
499
  if (v(() => {
500
- R(() => r((o) => o + 1));
500
+ U(() => r((o) => o + 1));
501
501
  }, []), n === "blur")
502
502
  return {
503
503
  title: i("idv2.capture.notifications.blur.title"),
@@ -526,11 +526,11 @@ function I1(n, t) {
526
526
  }
527
527
  return null;
528
528
  }
529
- const m1 = ({
529
+ const v1 = ({
530
530
  detectionStatus: n,
531
531
  mode: t
532
532
  }) => {
533
- const i = I1(n, t);
533
+ const i = m1(n, t);
534
534
  return i ? /* @__PURE__ */ e("div", { class: w("IncodeIdCaptureNotification"), children: /* @__PURE__ */ e("div", { class: "IncodeIdCaptureNotificationContent", children: [
535
535
  /* @__PURE__ */ e("div", { class: w("IncodeIdCaptureNotificationText"), children: [
536
536
  /* @__PURE__ */ e("div", { class: "IncodeIdCaptureNotificationTitle", children: i.title }),
@@ -539,7 +539,7 @@ const m1 = ({
539
539
  /* @__PURE__ */ e(p, { size: 16, direction: "horizontal" }),
540
540
  i.animationData && /* @__PURE__ */ e("div", { class: "IncodeIdCaptureNotificationAnimation", children: /* @__PURE__ */ e(E, { animationData: i.animationData, loop: !0 }) })
541
541
  ] }) }) : null;
542
- }, v1 = K(
542
+ }, g1 = Q(
543
543
  ({
544
544
  mode: n,
545
545
  orientation: t,
@@ -547,34 +547,34 @@ const m1 = ({
547
547
  counterValue: r,
548
548
  isCapturing: o,
549
549
  showManualCapture: s,
550
- onCapture: a,
550
+ onCapture: c,
551
551
  onOpenHelp: l
552
- }, c) => {
553
- const { t: d } = u();
554
- f1();
552
+ }, d) => {
553
+ const { t: a } = C();
554
+ I1();
555
555
  const L = i === "detecting" || i === "idNotDetected" || i === "manualCapture", b = () => o || i === "capturing" ? "capturing" : i === "blur" || i === "glare" || i === "wrongSide" || i === "farAway" ? "error" : "idle", h = () => {
556
556
  if (o || i === "capturing")
557
557
  return {
558
- title: d("idv2.capture.takingPhoto"),
559
- subtitle: d("idv2.capture.dontMove")
558
+ title: a("idv2.capture.takingPhoto"),
559
+ subtitle: a("idv2.capture.dontMove")
560
560
  };
561
561
  if (L) {
562
562
  const _ = i === "manualCapture";
563
563
  return n === "passport" ? {
564
- title: d("idv2.capture.fillFramePassport"),
565
- subtitle: _ ? "" : d("idv2.capture.v2.autoCapture")
564
+ title: a("idv2.capture.fillFramePassport"),
565
+ subtitle: _ ? "" : a("idv2.capture.v2.autoCapture")
566
566
  } : n === "back" ? {
567
- title: d("idv2.capture.v2.fillFrameBack"),
568
- subtitle: _ ? "" : d("idv2.capture.v2.autoCapture")
567
+ title: a("idv2.capture.v2.fillFrameBack"),
568
+ subtitle: _ ? "" : a("idv2.capture.v2.autoCapture")
569
569
  } : {
570
- title: d("idv2.capture.v2.fillFrameFront"),
571
- subtitle: _ ? "" : d("idv2.capture.v2.autoCapture")
570
+ title: a("idv2.capture.v2.fillFrameFront"),
571
+ subtitle: _ ? "" : a("idv2.capture.v2.autoCapture")
572
572
  };
573
573
  }
574
574
  return null;
575
- }, P = b(), y = h(), C = n === "passport", I = t !== "vertical" || C, g = I ? "horizontal" : "vertical";
575
+ }, P = b(), y = h(), u = n === "passport", I = t !== "vertical" || u, g = I ? "horizontal" : "vertical";
576
576
  return /* @__PURE__ */ e(
577
- e1,
577
+ i1,
578
578
  {
579
579
  className: w(
580
580
  "IncodeCaptureOverlayId",
@@ -582,9 +582,9 @@ const m1 = ({
582
582
  ),
583
583
  children: [
584
584
  /* @__PURE__ */ e("div", { class: "IncodeCaptureTopSection", children: [
585
- /* @__PURE__ */ e(m1, { detectionStatus: i, mode: n }),
585
+ /* @__PURE__ */ e(v1, { detectionStatus: i, mode: n }),
586
586
  /* @__PURE__ */ e(
587
- W,
587
+ Y,
588
588
  {
589
589
  title: y?.title ?? "",
590
590
  subtitle: y?.subtitle,
@@ -593,25 +593,25 @@ const m1 = ({
593
593
  )
594
594
  ] }),
595
595
  /* @__PURE__ */ e(
596
- X,
596
+ e1,
597
597
  {
598
- ref: c,
598
+ ref: d,
599
599
  variant: "locked",
600
600
  orientation: g,
601
601
  frameState: P,
602
- className: w(C && "IncodeCaptureFramePassport"),
602
+ className: w(u && "IncodeCaptureFramePassport"),
603
603
  children: o && r > 0 && /* @__PURE__ */ e("div", { class: "IncodeCaptureCounter", children: r })
604
604
  }
605
605
  ),
606
606
  /* @__PURE__ */ e(
607
- Y,
607
+ t1,
608
608
  {
609
609
  onOpenHelp: l,
610
- onCapture: a,
610
+ onCapture: c,
611
611
  isManualCapture: s,
612
612
  children: s ? /* @__PURE__ */ e("div", { class: "IncodeIdManualCaptureTooltipContainer", children: /* @__PURE__ */ e("div", { class: "IncodeIdManualCaptureTooltip", children: /* @__PURE__ */ e("ol", { class: "IncodeIdManualCaptureTooltipList", children: [
613
- /* @__PURE__ */ e("li", { children: d("idv2.commonIssues.firstStep") }),
614
- /* @__PURE__ */ e("li", { children: d("idv2.commonIssues.secondStep") })
613
+ /* @__PURE__ */ e("li", { children: a("idv2.commonIssues.firstStep") }),
614
+ /* @__PURE__ */ e("li", { children: a("idv2.commonIssues.secondStep") })
615
615
  ] }) }) }) : null
616
616
  }
617
617
  )
@@ -619,17 +619,14 @@ const m1 = ({
619
619
  }
620
620
  );
621
621
  }
622
- ), g1 = ({ manager: n, state: t }) => {
623
- const { t: i } = u();
622
+ ), w1 = ({ manager: n, state: t }) => {
623
+ const { t: i } = C();
624
624
  if (t.captureStatus === "initializing")
625
- return /* @__PURE__ */ e(M, { hideHeader: !0, hideFooterBranding: !0, className: "IncodeIdCapturePage", children: /* @__PURE__ */ e("div", { class: "IncodeCaptureInitializing", children: [
626
- /* @__PURE__ */ e(i1, { size: "large" }),
627
- /* @__PURE__ */ e("p", { class: "IncodeCaptureInitializingText", children: i("idv2.capture.initializing") })
628
- ] }) });
625
+ return /* @__PURE__ */ e(M, { hideHeader: !0, hideFooterBranding: !0, className: "IncodeIdCapturePage", children: /* @__PURE__ */ e(D, { size: "large", title: `${i("webcam.loading")}...` }) });
629
626
  if (t.captureStatus === "uploading" && t.previewImageUrl) {
630
627
  const r = t.currentMode === "passport" ? "passport" : "id";
631
628
  return /* @__PURE__ */ e(
632
- d1,
629
+ C1,
633
630
  {
634
631
  imageUrl: t.previewImageUrl,
635
632
  progress: t.uploadProgress ?? 0,
@@ -638,21 +635,21 @@ const m1 = ({
638
635
  }
639
636
  );
640
637
  }
641
- return t.captureStatus === "success" && t.previewImageUrl ? /* @__PURE__ */ e(C1, { manager: n, state: t }) : t.captureStatus === "uploadError" && t.previewImageUrl ? /* @__PURE__ */ e(S, { manager: n, state: t }) : /* @__PURE__ */ e(w1, { manager: n, state: t });
642
- }, w1 = ({ manager: n, state: t }) => {
643
- const i = Z(null), r = Z(null), [o, s] = m(!1), [a, l] = m(!1);
638
+ return t.captureStatus === "success" && t.previewImageUrl ? /* @__PURE__ */ e(p1, { manager: n, state: t }) : t.captureStatus === "uploadError" && t.previewImageUrl ? /* @__PURE__ */ e(R, { manager: n, state: t }) : /* @__PURE__ */ e(L1, { manager: n, state: t });
639
+ }, L1 = ({ manager: n, state: t }) => {
640
+ const i = Z(null), r = Z(null), [o, s] = m(!1), [c, l] = m(!1);
644
641
  v(() => {
645
- const C = i.current;
646
- if (!C || !t.stream) {
642
+ const u = i.current;
643
+ if (!u || !t.stream) {
647
644
  l(!1);
648
645
  return;
649
646
  }
650
647
  l(!1);
651
648
  const I = () => l(!0);
652
- return C.addEventListener("playing", I), C.srcObject = t.stream, C.play().catch(() => {
653
- }), () => C.removeEventListener("playing", I);
649
+ return u.addEventListener("playing", I), u.srcObject = t.stream, u.play().catch(() => {
650
+ }), () => u.removeEventListener("playing", I);
654
651
  }, [t.stream]), v(() => {
655
- const C = () => {
652
+ const u = () => {
656
653
  const I = r.current;
657
654
  if (!I)
658
655
  return;
@@ -664,9 +661,9 @@ const m1 = ({
664
661
  height: g.height
665
662
  });
666
663
  };
667
- return C(), window.addEventListener("resize", C), () => window.removeEventListener("resize", C);
668
- }, [n, t.orientation, a]);
669
- const c = t.captureStatus === "capturing" || t.detectionStatus === "capturing", d = t.detectionStatus, L = d === "manualCapture" || t.showCaptureButtonInAuto && t.captureStatus === "detecting" && d !== "capturing", b = () => {
664
+ return u(), window.addEventListener("resize", u), () => window.removeEventListener("resize", u);
665
+ }, [n, t.orientation, c]);
666
+ const d = t.captureStatus === "capturing" || t.detectionStatus === "capturing", a = t.detectionStatus, L = a === "manualCapture" || t.showCaptureButtonInAuto && t.captureStatus === "detecting" && a !== "capturing", b = () => {
670
667
  s(!0);
671
668
  }, h = () => {
672
669
  s(!1);
@@ -675,30 +672,30 @@ const m1 = ({
675
672
  }, y = () => {
676
673
  n.capture();
677
674
  };
678
- return /* @__PURE__ */ e(M, { hideHeader: !0, hideFooterBranding: !0, className: "IncodeIdCapturePage", children: /* @__PURE__ */ e(t1, { stream: t.stream, children: [
675
+ return /* @__PURE__ */ e(M, { hideHeader: !0, hideFooterBranding: !0, className: "IncodeIdCapturePage", children: /* @__PURE__ */ e(n1, { stream: t.stream, children: [
679
676
  /* @__PURE__ */ e(
680
- v1,
677
+ g1,
681
678
  {
682
679
  ref: r,
683
680
  mode: t.currentMode,
684
681
  orientation: t.orientation,
685
682
  detectionStatus: t.detectionStatus,
686
683
  counterValue: t.counterValue,
687
- isCapturing: c,
684
+ isCapturing: d,
688
685
  showManualCapture: L,
689
686
  onCapture: y,
690
687
  onOpenHelp: b
691
688
  }
692
689
  ),
693
690
  o && /* @__PURE__ */ e(
694
- a1,
691
+ c1,
695
692
  {
696
693
  onClose: h,
697
694
  onTakeManually: P
698
695
  }
699
696
  )
700
697
  ] }) });
701
- }, L1 = () => /* @__PURE__ */ e(
698
+ }, y1 = () => /* @__PURE__ */ e(
702
699
  "svg",
703
700
  {
704
701
  width: "119",
@@ -892,7 +889,7 @@ const m1 = ({
892
889
  ] })
893
890
  ]
894
891
  }
895
- ), y1 = () => /* @__PURE__ */ e(
892
+ ), x1 = () => /* @__PURE__ */ e(
896
893
  "svg",
897
894
  {
898
895
  width: "118",
@@ -1197,7 +1194,7 @@ const m1 = ({
1197
1194
  ] })
1198
1195
  ]
1199
1196
  }
1200
- ), x1 = ({ className: n }) => /* @__PURE__ */ e(
1197
+ ), B1 = ({ className: n }) => /* @__PURE__ */ e(
1201
1198
  "svg",
1202
1199
  {
1203
1200
  width: "46",
@@ -1230,7 +1227,7 @@ const m1 = ({
1230
1227
  )
1231
1228
  ]
1232
1229
  }
1233
- ), T = ({
1230
+ ), F = ({
1234
1231
  icon: n,
1235
1232
  title: t,
1236
1233
  description: i,
@@ -1252,12 +1249,12 @@ const m1 = ({
1252
1249
  /* @__PURE__ */ e(p, { size: 4 }),
1253
1250
  /* @__PURE__ */ e("span", { class: "IncodeChooserButtonDescription", children: i }),
1254
1251
  /* @__PURE__ */ e(p, { size: 8 }),
1255
- /* @__PURE__ */ e("div", { class: "IncodeChooserButtonArrow", children: /* @__PURE__ */ e(x1, {}) })
1252
+ /* @__PURE__ */ e("div", { class: "IncodeChooserButtonArrow", children: /* @__PURE__ */ e(B1, {}) })
1256
1253
  ] })
1257
1254
  ]
1258
1255
  }
1259
- ), B1 = ({ manager: n }) => {
1260
- const { t } = u(), i = () => {
1256
+ ), M1 = ({ manager: n }) => {
1257
+ const { t } = C(), i = () => {
1261
1258
  n.selectDocument("id");
1262
1259
  }, r = () => {
1263
1260
  n.selectDocument("passport");
@@ -1270,9 +1267,9 @@ const m1 = ({
1270
1267
  className: "IncodeChooserPage",
1271
1268
  children: /* @__PURE__ */ e("div", { class: "IncodeChooserContainer", children: /* @__PURE__ */ e("div", { class: "IncodeChooserButtons", children: [
1272
1269
  /* @__PURE__ */ e(
1273
- T,
1270
+ F,
1274
1271
  {
1275
- icon: L1,
1272
+ icon: y1,
1276
1273
  title: t("idv2.chooser.idButtonTitle"),
1277
1274
  description: t("idv2.chooser.idButtonDescription"),
1278
1275
  ariaLabel: t("idv2.chooser.idButtonTitle"),
@@ -1281,9 +1278,9 @@ const m1 = ({
1281
1278
  }
1282
1279
  ),
1283
1280
  /* @__PURE__ */ e(
1284
- T,
1281
+ F,
1285
1282
  {
1286
- icon: y1,
1283
+ icon: x1,
1287
1284
  title: t("idv2.chooser.passportButtonTitle"),
1288
1285
  description: t("idv2.chooser.passportButtonDescription"),
1289
1286
  ariaLabel: t("idv2.chooser.passportButtonTitle"),
@@ -1294,49 +1291,49 @@ const m1 = ({
1294
1291
  ] }) })
1295
1292
  }
1296
1293
  );
1297
- }, F = ({
1294
+ }, T = ({
1298
1295
  manager: n,
1299
1296
  direction: t
1300
1297
  }) => {
1301
- const [i, r] = m(null), { t: o } = u();
1298
+ const [i, r] = m(null), [o, s] = m(!1), { t: c } = C();
1302
1299
  v(() => {
1303
- import("../flip-animation-COR596wy.js").then((l) => {
1304
- r(l.default);
1300
+ import("../flip-animation-COR596wy.js").then((a) => {
1301
+ r(a.default);
1305
1302
  });
1306
1303
  }, []);
1307
- const s = async () => {
1308
- await new Promise((l) => setTimeout(l, 1e3)), t === "toBack" ? n.continueToBack() : n.continueToFront();
1309
- };
1310
- return i ? /* @__PURE__ */ e("div", { class: "IncodeFlipAnimation", children: [
1311
- /* @__PURE__ */ e(H, { className: "IncodeFlipAnimationTitle", children: o(t === "toBack" ? "idv2.flipAnimation.title" : "idv2.flipAnimation.titleToFront") }),
1304
+ const l = $(async () => {
1305
+ await new Promise((a) => setTimeout(a, 1e3)), t === "toBack" ? n.continueToBack() : n.continueToFront(), s(!0);
1306
+ }, [t, n]);
1307
+ return o ? /* @__PURE__ */ e(D, { size: "large" }) : i ? /* @__PURE__ */ e("div", { class: "IncodeFlipAnimation", children: [
1308
+ /* @__PURE__ */ e(H, { className: "IncodeFlipAnimationTitle", children: c(t === "toBack" ? "idv2.flipAnimation.title" : "idv2.flipAnimation.titleToFront") }),
1312
1309
  /* @__PURE__ */ e(p, { size: 32 }),
1313
1310
  /* @__PURE__ */ e(
1314
1311
  E,
1315
1312
  {
1316
1313
  animationData: i,
1317
1314
  loop: !1,
1318
- onComplete: s
1315
+ onComplete: l
1319
1316
  }
1320
1317
  )
1321
1318
  ] }) : null;
1322
- }, M1 = ({ manager: n, state: t }) => {
1323
- const { t: i } = u(), [r, o] = m(!1), [s, a] = m(null), l = t.selectedDocumentType === "passport", c = t.currentMode === "back";
1319
+ }, b1 = ({ manager: n, state: t }) => {
1320
+ const { t: i } = C(), [r, o] = m(!1), [s, c] = m(null), l = t.selectedDocumentType === "passport", d = t.currentMode === "back";
1324
1321
  if (v(() => {
1325
1322
  l ? import("../passport-tutorial-CaYBFTqt.js").then((h) => {
1326
- a(h.default);
1327
- }) : c ? import("../id-tutorial-B-F5Q28m.js").then((h) => {
1328
- a(h.default);
1323
+ c(h.default);
1324
+ }) : d ? import("../id-tutorial-B-F5Q28m.js").then((h) => {
1325
+ c(h.default);
1329
1326
  }) : import("../id-tutorial-B-F5Q28m.js").then((h) => {
1330
- a(h.default);
1327
+ c(h.default);
1331
1328
  });
1332
- }, [l, c]), !s)
1329
+ }, [l, d]), !s)
1333
1330
  return null;
1334
- const d = i(l ? "idv2.capture.passport.title" : c ? "idv2.tutorial.v2.titleBack" : "idv2.tutorial.v2.title"), L = i(l ? "idv2.capture.passport.subtitle" : c ? "idv2.tutorial.subtitleBack" : "idv2.tutorial.subtitle");
1331
+ const a = i(l ? "idv2.capture.passport.title" : d ? "idv2.tutorial.v2.titleBack" : "idv2.tutorial.v2.title"), L = i(l ? "idv2.capture.passport.subtitle" : d ? "idv2.tutorial.subtitleBack" : "idv2.tutorial.subtitle");
1335
1332
  return /* @__PURE__ */ e(
1336
- Q,
1333
+ j,
1337
1334
  {
1338
1335
  animationData: s,
1339
- title: d,
1336
+ title: a,
1340
1337
  subtitle: L,
1341
1338
  onContinue: () => {
1342
1339
  o(!0), n.nextStep();
@@ -1350,17 +1347,17 @@ const m1 = ({
1350
1347
  )
1351
1348
  }
1352
1349
  );
1353
- }, b1 = ({ config: n, onFinish: t, onError: i }) => {
1354
- const [r, o] = N(() => O({ config: n }));
1355
- return r.status === "idle" || r.status === "loading" ? null : r.status === "chooser" ? /* @__PURE__ */ e(B1, { manager: o }) : r.status === "tutorial" ? /* @__PURE__ */ e(M1, { manager: o, state: r }) : r.status === "permissions" ? /* @__PURE__ */ e(
1356
- j,
1350
+ }, P1 = ({ config: n, onFinish: t, onError: i }) => {
1351
+ const [r, o] = O(() => G({ config: n }));
1352
+ return r.status === "idle" || r.status === "loading" ? null : r.status === "chooser" ? /* @__PURE__ */ e(M1, { manager: o }) : r.status === "tutorial" ? /* @__PURE__ */ e(b1, { manager: o, state: r }) : r.status === "permissions" ? /* @__PURE__ */ e(
1353
+ q,
1357
1354
  {
1358
1355
  manager: o,
1359
1356
  permissionStatus: r.permissionStatus
1360
1357
  }
1361
- ) : r.status === "frontFinished" ? /* @__PURE__ */ e(F, { manager: o, direction: "toBack" }) : r.status === "backFinished" ? /* @__PURE__ */ e(F, { manager: o, direction: "toFront" }) : r.status === "capture" ? /* @__PURE__ */ e(g1, { manager: o, state: r, onFinish: () => t?.() }) : r.status === "processing" ? /* @__PURE__ */ e($, {}) : r.status === "expired" ? /* @__PURE__ */ e(p1, { manager: o }) : r.status === "finished" ? (t?.(), null) : r.status === "closed" ? (i?.(void 0), null) : r.status === "error" ? /* @__PURE__ */ e(S, { manager: o, state: r, onError: i }) : null;
1362
- }, P1 = ({ config: n, onFinish: t, onError: i }) => /* @__PURE__ */ e(U, { children: n ? /* @__PURE__ */ e(b1, { config: n, onFinish: t, onError: i }) : null });
1363
- z(P1, "incode-id");
1358
+ ) : r.status === "frontFinished" ? /* @__PURE__ */ e(T, { manager: o, direction: "toBack" }) : r.status === "backFinished" ? /* @__PURE__ */ e(T, { manager: o, direction: "toFront" }) : r.status === "capture" ? /* @__PURE__ */ e(w1, { manager: o, state: r, onFinish: () => t?.() }) : r.status === "processing" ? /* @__PURE__ */ e(W, {}) : r.status === "expired" ? /* @__PURE__ */ e(h1, { manager: o }) : r.status === "finished" ? (t?.(), null) : r.status === "closed" ? (i?.(void 0), null) : r.status === "error" ? /* @__PURE__ */ e(R, { manager: o, state: r, onError: i }) : null;
1359
+ }, _1 = ({ config: n, onFinish: t, onError: i }) => /* @__PURE__ */ e(N, { children: n ? /* @__PURE__ */ e(P1, { config: n, onFinish: t, onError: i }) : null });
1360
+ z(_1, "incode-id");
1364
1361
  export {
1365
- P1 as Id
1362
+ _1 as Id
1366
1363
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/web",
3
- "version": "0.0.0-dev-20260306-aac8dd3",
3
+ "version": "0.0.0-dev-20260309-8c96b8e",
4
4
  "type": "module",
5
5
  "main": "./dist/index.es.js",
6
6
  "types": "./dist/types/index.d.ts",
@@ -107,7 +107,7 @@
107
107
  "libphonenumber-js": "^1.11.0",
108
108
  "preact-custom-element": "^4.6.0",
109
109
  "tailwindcss": "^4.1.17",
110
- "@incodetech/core": "0.0.0-dev-20260306-aac8dd3"
110
+ "@incodetech/core": "0.0.0-dev-20260309-8c96b8e"
111
111
  },
112
112
  "devDependencies": {
113
113
  "@microsoft/api-extractor": "^7.53.3",