@incodetech/web 0.0.0-dev-20260126-4504c5b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aligndevicelottie-DlQCRPfM.js +29 -0
- package/dist/backdevicelottie-B4NgyWmX.js +29 -0
- package/dist/base.css +1634 -0
- package/dist/baseTutorial-Be85FuyO.js +383 -0
- package/dist/blurdevicelottie-_BZRug1c.js +29 -0
- package/dist/browser-ponyfill-B6W6hHVY.js +344 -0
- package/dist/email/email.es.js +137 -0
- package/dist/email/styles.css +123 -0
- package/dist/flip-animation-COR596wy.js +29 -0
- package/dist/flow/flow.es.js +540 -0
- package/dist/flow/styles.css +3204 -0
- package/dist/frontdevicelottie-KhKxT5n9.js +29 -0
- package/dist/glaredevicelottie-DLuIStvb.js +29 -0
- package/dist/id/id.es.js +1497 -0
- package/dist/id/styles.css +1587 -0
- package/dist/id-laser-h-BBV3r3rz.js +29 -0
- package/dist/id-laser-v-BTHJaSfx.js +29 -0
- package/dist/id-tutorial-B-F5Q28m.js +29 -0
- package/dist/incodeModule-DR92HDjR.js +257 -0
- package/dist/index.es.js +6 -0
- package/dist/instance-B-q0ZREN.js +2140 -0
- package/dist/otpInput-Dm1LhnDm.js +151 -0
- package/dist/page-CITAo3qf.js +189 -0
- package/dist/passport-tutorial-CaYBFTqt.js +29 -0
- package/dist/phone/phone.es.js +3442 -0
- package/dist/phone/styles.css +305 -0
- package/dist/selfie/selfie.es.js +570 -0
- package/dist/selfie/styles.css +638 -0
- package/dist/selfieTutorial-Dm_p0ke9.js +29 -0
- package/dist/setup-BhetRn4n.js +20 -0
- package/dist/spinner-CQtj_FFo.js +65 -0
- package/dist/themes/dark.css +797 -0
- package/dist/themes/light.css +688 -0
- package/dist/types/base.d.ts +1 -0
- package/dist/types/dark.d.ts +1 -0
- package/dist/types/email.d.ts +57 -0
- package/dist/types/flow.d.ts +69 -0
- package/dist/types/id.d.ts +34 -0
- package/dist/types/index.d.ts +38 -0
- package/dist/types/light.d.ts +1 -0
- package/dist/types/phone.d.ts +58 -0
- package/dist/types/selfie.d.ts +31 -0
- package/dist/types/styles.d.ts +1 -0
- package/dist/types/themes/dark.d.ts +1 -0
- package/dist/types/themes/light.d.ts +1 -0
- package/dist/uiConfig-DEqynrWx.js +23 -0
- package/dist/vendor-preact-CjD4WiuC.js +593 -0
- package/package.json +100 -0
|
@@ -0,0 +1,570 @@
|
|
|
1
|
+
import { u as t, S as a, B as h, c as O, L, r as I, a as S } from "../incodeModule-DR92HDjR.js";
|
|
2
|
+
import { createSelfieManager as D } from "@incodetech/core/selfie";
|
|
3
|
+
import { g as v, d as R, k as g, A, y as T } from "../vendor-preact-CjD4WiuC.js";
|
|
4
|
+
import "@incodetech/core";
|
|
5
|
+
import { B as M, P as w, a as N } from "../baseTutorial-Be85FuyO.js";
|
|
6
|
+
import { P as C, I as B } from "../page-CITAo3qf.js";
|
|
7
|
+
import { u as d, S as y, T as x } from "../spinner-CQtj_FFo.js";
|
|
8
|
+
import "../instance-B-q0ZREN.js";
|
|
9
|
+
const F = ({ size: i = 64 }) => /* @__PURE__ */ t(
|
|
10
|
+
"svg",
|
|
11
|
+
{
|
|
12
|
+
width: i,
|
|
13
|
+
height: i,
|
|
14
|
+
viewBox: "0 0 16 17",
|
|
15
|
+
fill: "none",
|
|
16
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
17
|
+
class: "IncodeSuccessIcon",
|
|
18
|
+
"aria-hidden": "true",
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ t("title", { children: "status" }),
|
|
21
|
+
/* @__PURE__ */ t(
|
|
22
|
+
"path",
|
|
23
|
+
{
|
|
24
|
+
d: "M8 0.5C12.4182 0.500064 16 4.0818 16 8.5C16 12.9182 12.4181 16.4999 8 16.5C3.58181 16.5 3.68521e-05 12.9182 0 8.5C0 4.08176 3.58179 0.5 8 0.5ZM11.1748 6.11621C10.9423 5.88373 10.5747 5.86781 10.3242 6.06934L10.3203 6.07324L10.2764 6.1123L6.85742 9.53125L5.72656 8.40039C5.47758 8.1514 5.0732 8.1514 4.82422 8.40039C4.59169 8.63292 4.57673 9.00038 4.77832 9.25098L4.78125 9.25488L4.82031 9.29883L6.40625 10.8848C6.63867 11.117 7.00542 11.1319 7.25586 10.9307L7.26074 10.9277L7.30371 10.8877L11.1748 7.01758C11.4235 6.76863 11.4234 6.36521 11.1748 6.11621Z",
|
|
25
|
+
fill: "var(--icon-status-positive-static)"
|
|
26
|
+
}
|
|
27
|
+
)
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
), m = ({
|
|
31
|
+
title: i,
|
|
32
|
+
description: e,
|
|
33
|
+
attemptsText: o,
|
|
34
|
+
buttonText: n,
|
|
35
|
+
icon: r,
|
|
36
|
+
onButtonClick: s
|
|
37
|
+
}) => /* @__PURE__ */ t("div", { class: "IncodeErrorModalContent", children: /* @__PURE__ */ t(C, { "data-testid": "face-capture-error-modal", children: /* @__PURE__ */ t("div", { class: "IncodeErrorModalContentContainer", children: [
|
|
38
|
+
/* @__PURE__ */ t("div", { class: "IncodeErrorModalContentIconContainer", children: [
|
|
39
|
+
r,
|
|
40
|
+
/* @__PURE__ */ t(a, { size: 24 }),
|
|
41
|
+
/* @__PURE__ */ t("h2", { class: "IncodeErrorModalContentTitle", children: i }),
|
|
42
|
+
/* @__PURE__ */ t(a, { size: 16 }),
|
|
43
|
+
/* @__PURE__ */ t("p", { class: "IncodeErrorModalContentDescription", children: e })
|
|
44
|
+
] }),
|
|
45
|
+
/* @__PURE__ */ t("div", { class: "IncodeErrorModalContentAttemptsContainer", children: [
|
|
46
|
+
/* @__PURE__ */ t("p", { class: "IncodeErrorModalContentAttemptsText", children: o }),
|
|
47
|
+
/* @__PURE__ */ t(a, { size: 24 }),
|
|
48
|
+
/* @__PURE__ */ t(h, { onClick: s, children: n })
|
|
49
|
+
] })
|
|
50
|
+
] }) }) }), P = () => /* @__PURE__ */ t(
|
|
51
|
+
"svg",
|
|
52
|
+
{
|
|
53
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
54
|
+
width: "32",
|
|
55
|
+
height: "32",
|
|
56
|
+
viewBox: "0 0 32 32",
|
|
57
|
+
fill: "none",
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ t("title", { children: "Error" }),
|
|
60
|
+
/* @__PURE__ */ t(
|
|
61
|
+
"path",
|
|
62
|
+
{
|
|
63
|
+
d: "M16 0C24.8219 0 32 7.17642 32 16C32 24.8219 24.8219 32 16 32C7.17811 32 0 24.8219 0 16C0 7.17642 7.17811 0 16 0ZM13.1553 11.3701C12.6618 10.8767 11.8636 10.8767 11.3701 11.3701C10.8767 11.8636 10.8767 12.6618 11.3701 13.1553L14.4053 16.1924L11.3721 19.2256C10.8803 19.7191 10.8803 20.5173 11.3721 21.0107C11.8656 21.504 12.6658 21.5041 13.1592 21.0107L16.1924 17.9775L19.2334 21.0205C19.481 21.2664 19.8029 21.3916 20.1279 21.3916C20.4513 21.3916 20.7746 21.2664 21.0205 21.0205C21.514 20.527 21.514 19.7269 21.0205 19.2334L17.9775 16.1924L21.0107 13.1572C21.5041 12.6638 21.504 11.8639 21.0107 11.3721C20.5173 10.8786 19.7191 10.8786 19.2256 11.3721L16.1904 14.4053L13.1553 11.3701Z",
|
|
64
|
+
fill: "var(--surface-status-negative-600)"
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
), V = ({
|
|
70
|
+
title: i,
|
|
71
|
+
onContinue: e
|
|
72
|
+
}) => {
|
|
73
|
+
const { t: o } = d();
|
|
74
|
+
return /* @__PURE__ */ t(
|
|
75
|
+
m,
|
|
76
|
+
{
|
|
77
|
+
title: i,
|
|
78
|
+
description: o("notifications.selfieCaptureFailedDescription"),
|
|
79
|
+
attemptsText: o("notifications.noAttemptsRemaining") ?? "No attempts remaining",
|
|
80
|
+
buttonText: o("common.continue") ?? "Continue",
|
|
81
|
+
icon: /* @__PURE__ */ t(P, {}),
|
|
82
|
+
onButtonClick: e
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
}, U = () => /* @__PURE__ */ t(
|
|
86
|
+
"svg",
|
|
87
|
+
{
|
|
88
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
89
|
+
width: "32",
|
|
90
|
+
height: "32",
|
|
91
|
+
viewBox: "0 0 32 32",
|
|
92
|
+
fill: "none",
|
|
93
|
+
children: [
|
|
94
|
+
/* @__PURE__ */ t("title", { children: "Warning" }),
|
|
95
|
+
/* @__PURE__ */ t("g", { clipPath: "url(#clip0)", children: /* @__PURE__ */ t(
|
|
96
|
+
"path",
|
|
97
|
+
{
|
|
98
|
+
d: "M16 0C24.848 0 32 7.1696 32 16C32 24.8336 24.848 32 16 32C7.168 32 0 24.8336 0 16C0 7.1696 7.168 0 16 0ZM16 20.6896C15.232 20.6896 14.608 21.3136 14.608 22.0816C14.608 22.8496 15.232 23.4896 16.016 23.4896C16.784 23.4896 17.408 22.8496 17.408 22.0816C17.408 21.3136 16.784 20.6896 16 20.6896ZM16 8.528C15.232 8.528 14.592 9.1696 14.592 9.936V17.008C14.592 17.7776 15.232 18.4 16 18.4C16.768 18.4 17.392 17.7776 17.392 17.008V9.936C17.392 9.1696 16.768 8.528 16 8.528Z",
|
|
99
|
+
fill: "var(--surface-status-warning-500)"
|
|
100
|
+
}
|
|
101
|
+
) }),
|
|
102
|
+
/* @__PURE__ */ t("defs", { children: /* @__PURE__ */ t("clipPath", { id: "clip0", children: /* @__PURE__ */ t("rect", { width: "32", height: "32", fill: "white" }) }) })
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
), H = ({
|
|
106
|
+
title: i,
|
|
107
|
+
description: e,
|
|
108
|
+
attemptsRemaining: o,
|
|
109
|
+
onTryAgain: n
|
|
110
|
+
}) => {
|
|
111
|
+
const { t: r } = d();
|
|
112
|
+
return /* @__PURE__ */ t(
|
|
113
|
+
m,
|
|
114
|
+
{
|
|
115
|
+
title: i,
|
|
116
|
+
description: r(e),
|
|
117
|
+
attemptsText: r("common.attemptsRemaining", { count: o }) ?? `Attempts remaining: ${o}`,
|
|
118
|
+
buttonText: r("common.tryAgain") ?? "Try Again",
|
|
119
|
+
icon: /* @__PURE__ */ t(U, {}),
|
|
120
|
+
onButtonClick: n
|
|
121
|
+
}
|
|
122
|
+
);
|
|
123
|
+
}, l = {
|
|
124
|
+
title: "Something went wrong",
|
|
125
|
+
description: "Please try again later"
|
|
126
|
+
}, Z = {
|
|
127
|
+
MASK_ERROR: {
|
|
128
|
+
title: "notifications.mask",
|
|
129
|
+
description: "notifications.maskDescription"
|
|
130
|
+
},
|
|
131
|
+
BRIGHTNESS_ERROR: {
|
|
132
|
+
title: "notifications.brightness",
|
|
133
|
+
description: "notifications.brightnessDescription"
|
|
134
|
+
},
|
|
135
|
+
LIVENESS_ERROR: {
|
|
136
|
+
title: "notifications.spoof",
|
|
137
|
+
description: "notifications.spoofDescription"
|
|
138
|
+
},
|
|
139
|
+
CLOSED_EYES_ERROR: {
|
|
140
|
+
title: "notifications.closedEyes",
|
|
141
|
+
description: "notifications.closedEyesDescription"
|
|
142
|
+
},
|
|
143
|
+
HEAD_COVER_ERROR: {
|
|
144
|
+
title: "notifications.removeHeadwear",
|
|
145
|
+
description: "notifications.removeHeadwearDescription"
|
|
146
|
+
},
|
|
147
|
+
LENSES_ERROR: {
|
|
148
|
+
title: "notifications.lenses",
|
|
149
|
+
description: "notifications.lensesDescription"
|
|
150
|
+
},
|
|
151
|
+
FACE_NOT_FOUND: {
|
|
152
|
+
title: "notifications.faceNotFound",
|
|
153
|
+
description: "notifications.faceNotFoundDescription"
|
|
154
|
+
},
|
|
155
|
+
MULTIPLE_FACES: {
|
|
156
|
+
title: "notifications.multiple",
|
|
157
|
+
description: "notifications.multipleDescription"
|
|
158
|
+
},
|
|
159
|
+
TOO_BLURRY_ERROR: l,
|
|
160
|
+
TOO_DARK_ERROR: l,
|
|
161
|
+
SERVER_ERROR: l,
|
|
162
|
+
FACE_CROPPING_FAILED: l,
|
|
163
|
+
FACE_TOO_SMALL: l,
|
|
164
|
+
PROCESSING_ERROR: l,
|
|
165
|
+
BAD_REQUEST: l,
|
|
166
|
+
USER_IS_NOT_RECOGNIZED: {
|
|
167
|
+
title: "notifications.accessDenied",
|
|
168
|
+
description: "notifications.accessDeniedDescription"
|
|
169
|
+
},
|
|
170
|
+
SPOOF_ATTEMPT_DETECTED: {
|
|
171
|
+
title: "notifications.spoof",
|
|
172
|
+
description: "notifications.spoofDescription"
|
|
173
|
+
},
|
|
174
|
+
FACE_TOO_DARK: {
|
|
175
|
+
title: "notifications.brightness",
|
|
176
|
+
description: "notifications.brightnessDescription"
|
|
177
|
+
},
|
|
178
|
+
LENSES_DETECTED: {
|
|
179
|
+
title: "notifications.lenses",
|
|
180
|
+
description: "notifications.lensesDescription"
|
|
181
|
+
},
|
|
182
|
+
FACE_MASK_DETECTED: {
|
|
183
|
+
title: "notifications.mask",
|
|
184
|
+
description: "notifications.maskDescription"
|
|
185
|
+
},
|
|
186
|
+
CLOSED_EYES_DETECTED: {
|
|
187
|
+
title: "notifications.closedEyes",
|
|
188
|
+
description: "notifications.closedEyesDescription"
|
|
189
|
+
},
|
|
190
|
+
HEAD_COVER_DETECTED: {
|
|
191
|
+
title: "notifications.removeHeadwear",
|
|
192
|
+
description: "notifications.removeHeadwearDescription"
|
|
193
|
+
},
|
|
194
|
+
FACE_TOO_BLURRY: {
|
|
195
|
+
title: "notifications.spoof",
|
|
196
|
+
description: "notifications.spoofDescription"
|
|
197
|
+
},
|
|
198
|
+
BAD_PHOTO_QUALITY: {
|
|
199
|
+
title: "notifications.lowQualityImage",
|
|
200
|
+
description: "notifications.lowQualityImageDescription"
|
|
201
|
+
},
|
|
202
|
+
NONEXISTENT_CUSTOMER: {
|
|
203
|
+
title: "notifications.nonexistentCustomer",
|
|
204
|
+
description: "notifications.nonexistentCustomerDescription"
|
|
205
|
+
},
|
|
206
|
+
HINT_NOT_PROVIDED: {
|
|
207
|
+
title: "notifications.hintNotProvided",
|
|
208
|
+
description: "notifications.hintNotProvidedDescription"
|
|
209
|
+
},
|
|
210
|
+
SELFIE_IMAGE_LOW_QUALITY: {
|
|
211
|
+
title: "notifications.selfieImageLowQuality",
|
|
212
|
+
description: "notifications.selfieImageLowQualityDescription"
|
|
213
|
+
}
|
|
214
|
+
}, k = [
|
|
215
|
+
"LIVENESS_ERROR",
|
|
216
|
+
"BRIGHTNESS_ERROR",
|
|
217
|
+
"LENSES_ERROR",
|
|
218
|
+
"MASK_ERROR",
|
|
219
|
+
"CLOSED_EYES_ERROR",
|
|
220
|
+
"HEAD_COVER_ERROR",
|
|
221
|
+
"SERVER_ERROR",
|
|
222
|
+
"FACE_NOT_FOUND",
|
|
223
|
+
"MULTIPLE_FACES",
|
|
224
|
+
"TOO_BLURRY_ERROR",
|
|
225
|
+
"TOO_DARK_ERROR",
|
|
226
|
+
"USER_IS_NOT_RECOGNIZED",
|
|
227
|
+
"SPOOF_ATTEMPT_DETECTED",
|
|
228
|
+
"FACE_TOO_DARK",
|
|
229
|
+
"LENSES_DETECTED",
|
|
230
|
+
"FACE_MASK_DETECTED",
|
|
231
|
+
"CLOSED_EYES_DETECTED",
|
|
232
|
+
"HEAD_COVER_DETECTED",
|
|
233
|
+
"FACE_CROPPING_FAILED",
|
|
234
|
+
"FACE_TOO_SMALL",
|
|
235
|
+
"FACE_TOO_BLURRY",
|
|
236
|
+
"BAD_PHOTO_QUALITY",
|
|
237
|
+
"PROCESSING_ERROR",
|
|
238
|
+
"BAD_REQUEST",
|
|
239
|
+
"NONEXISTENT_CUSTOMER",
|
|
240
|
+
"HINT_NOT_PROVIDED",
|
|
241
|
+
"SELFIE_IMAGE_LOW_QUALITY"
|
|
242
|
+
], b = (i) => {
|
|
243
|
+
const e = i.toUpperCase();
|
|
244
|
+
if (e.includes("HTTP 400") || e.includes("BAD_REQUEST"))
|
|
245
|
+
return "BAD_REQUEST";
|
|
246
|
+
if (e.includes("HTTP 500") || e.includes("SERVER_ERROR"))
|
|
247
|
+
return "SERVER_ERROR";
|
|
248
|
+
for (const o of k)
|
|
249
|
+
if (e.includes(o))
|
|
250
|
+
return o;
|
|
251
|
+
return null;
|
|
252
|
+
}, _ = ({
|
|
253
|
+
error: i,
|
|
254
|
+
attemptsRemaining: e,
|
|
255
|
+
onTryAgain: o,
|
|
256
|
+
onContinue: n
|
|
257
|
+
}) => {
|
|
258
|
+
const { t: r } = d();
|
|
259
|
+
if (!i) return null;
|
|
260
|
+
const u = b(i) ?? i, { title: c, description: f } = Z[u] ?? l, p = e <= 0, E = r(c) ?? c;
|
|
261
|
+
return p ? /* @__PURE__ */ t(V, { title: E, onContinue: n }) : /* @__PURE__ */ t(
|
|
262
|
+
H,
|
|
263
|
+
{
|
|
264
|
+
title: E,
|
|
265
|
+
description: f,
|
|
266
|
+
attemptsRemaining: e,
|
|
267
|
+
onTryAgain: o
|
|
268
|
+
}
|
|
269
|
+
);
|
|
270
|
+
}, z = () => /* @__PURE__ */ t(
|
|
271
|
+
"svg",
|
|
272
|
+
{
|
|
273
|
+
width: "292",
|
|
274
|
+
height: "272",
|
|
275
|
+
viewBox: "0 0 292 272",
|
|
276
|
+
fill: "none",
|
|
277
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
278
|
+
class: "IncodeFaceOutline",
|
|
279
|
+
children: [
|
|
280
|
+
/* @__PURE__ */ t("title", { children: "Outline" }),
|
|
281
|
+
/* @__PURE__ */ t(
|
|
282
|
+
"path",
|
|
283
|
+
{
|
|
284
|
+
opacity: "0.8",
|
|
285
|
+
d: "M145.633 8.0625C115.606 8.06268 85.6206 26.5984 76.9712 54.293L76.771 54.9492C70.4539 76.1063 75.0139 100.802 76.8687 110.58L77.3628 113.188L75.1528 114.656C66.1187 120.66 63.5861 124.089 62.8472 126.92C62.4669 128.377 62.4644 130.035 62.8003 132.412C63.1635 134.983 63.7533 137.484 64.4233 141.347L64.5142 141.841C65.5056 146.956 68.1062 152.133 71.2749 156.618C74.5527 161.257 78.2056 164.826 80.7349 166.584L82.4517 167.777V169.869C82.4517 177.866 85.3476 186.144 89.6763 194.128C93.9906 202.085 99.5748 209.473 104.623 215.646L105.526 216.751V218.178C105.526 220.891 105.68 223.73 105.801 226.9C105.92 230.011 106.003 233.347 105.828 236.771C105.475 243.652 104.077 251.044 99.7446 258.227C91.1977 272.397 72.1081 284.401 31.8677 291.776L29.936 292.124C-41.1597 304.684 -61.4563 361.617 -63.2153 392.062H145.633V400.062H-71.3638L-71.3462 396.044C-71.2048 364.597 -50.9804 298.295 28.5444 284.246L30.4448 283.904C69.9919 276.654 86.1642 265.253 92.894 254.095C96.3216 248.412 97.5261 242.442 97.8374 236.362C97.9939 233.307 97.9241 230.262 97.8071 227.206C97.7111 224.697 97.5799 222.105 97.5396 219.615C92.5931 213.5 87.048 206.064 82.644 197.941C78.308 189.944 74.9442 181.04 74.5024 171.896C71.3932 169.387 67.8531 165.638 64.7417 161.234C61.1656 156.173 57.9337 149.942 56.6587 143.353L56.5415 142.714C55.9864 139.514 55.2491 136.155 54.8784 133.531C54.4806 130.715 54.3377 127.843 55.106 124.899C56.5344 119.427 60.7885 114.886 68.5259 109.489C66.4692 98.2995 62.7062 74.0938 69.106 52.6602L69.3345 51.9092C79.2266 20.2173 112.853 0.0626788 145.633 0.0625V8.0625ZM145.635 0.0625C178.415 0.0625 212.042 20.2172 221.934 51.9092L222.163 52.6602C228.562 74.0938 224.799 98.2996 222.743 109.489C230.48 114.886 234.734 119.427 236.163 124.899C236.931 127.843 236.788 130.715 236.39 133.531C236.019 136.155 235.282 139.514 234.727 142.714L234.61 143.353C233.335 149.942 230.103 156.173 226.527 161.234C223.415 165.638 219.875 169.387 216.766 171.896C216.324 181.04 212.961 189.944 208.625 197.941C204.221 206.064 198.676 213.5 193.729 219.615C193.689 222.105 193.557 224.697 193.461 227.206C193.344 230.262 193.275 233.307 193.431 236.362C193.742 242.442 194.947 248.412 198.375 254.095C205.104 265.253 221.277 276.654 260.824 283.904L262.724 284.246C342.249 298.294 362.473 364.597 362.615 396.044L362.632 400.062H145.635V392.062H354.484C352.725 361.616 332.429 304.683 261.333 292.124L259.401 291.776C219.161 284.401 200.071 272.397 191.524 258.227C187.192 251.044 185.793 243.652 185.441 236.771C185.266 233.347 185.348 230.011 185.467 226.9C185.589 223.73 185.743 220.891 185.743 218.178V216.751L186.646 215.646C191.694 209.473 197.278 202.085 201.592 194.128C205.921 186.144 208.817 177.866 208.817 169.869V167.777L210.534 166.584C213.063 164.826 216.716 161.257 219.994 156.618C223.162 152.133 225.763 146.956 226.754 141.841L226.845 141.347C227.515 137.484 228.105 134.983 228.468 132.412C228.804 130.034 228.802 128.377 228.421 126.92C227.682 124.089 225.15 120.66 216.116 114.656L213.906 113.188L214.4 110.58C216.255 100.802 220.815 76.1064 214.498 54.9492L214.297 54.293C205.648 26.5983 175.662 8.0625 145.635 8.0625V0.0625Z",
|
|
286
|
+
fill: "white"
|
|
287
|
+
}
|
|
288
|
+
)
|
|
289
|
+
]
|
|
290
|
+
}
|
|
291
|
+
), Q = (i) => {
|
|
292
|
+
switch (i) {
|
|
293
|
+
case "success":
|
|
294
|
+
case "capturing":
|
|
295
|
+
return "var(--surface-status-positive-600)";
|
|
296
|
+
case "loading":
|
|
297
|
+
return "var(--surface-brand-500)";
|
|
298
|
+
case "error":
|
|
299
|
+
return "var(--surface-status-negative-600)";
|
|
300
|
+
case "idle":
|
|
301
|
+
return "var(--surface-neutral-100)";
|
|
302
|
+
}
|
|
303
|
+
}, Y = ({
|
|
304
|
+
borderState: i = "idle"
|
|
305
|
+
}) => {
|
|
306
|
+
const e = v(), o = i === "loading" || i === "capturing", n = Q(i), r = o ? `url(#${e})` : n;
|
|
307
|
+
return /* @__PURE__ */ t(
|
|
308
|
+
"div",
|
|
309
|
+
{
|
|
310
|
+
class: O("IncodeLoadingBorder", {
|
|
311
|
+
IncodeLoadingBorderSpinning: o
|
|
312
|
+
}),
|
|
313
|
+
children: /* @__PURE__ */ t(
|
|
314
|
+
"svg",
|
|
315
|
+
{
|
|
316
|
+
width: "100%",
|
|
317
|
+
height: "100%",
|
|
318
|
+
viewBox: "0 0 335 335",
|
|
319
|
+
fill: "none",
|
|
320
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
321
|
+
children: [
|
|
322
|
+
/* @__PURE__ */ t("title", { children: "Loading Border" }),
|
|
323
|
+
/* @__PURE__ */ t(
|
|
324
|
+
"path",
|
|
325
|
+
{
|
|
326
|
+
"fill-rule": "evenodd",
|
|
327
|
+
"clip-rule": "evenodd",
|
|
328
|
+
d: "M335 167.5C335 260.008 260.008 335 167.5 335C74.9923 335 0 260.008 0 167.5C0 74.9923 74.9923 0 167.5 0C260.008 0 335 74.9923 335 167.5ZM167.5 325C254.485 325 325 254.485 325 167.5C325 80.5152 254.485 10 167.5 10C80.5152 10 10 80.5152 10 167.5C10 254.485 80.5152 325 167.5 325Z",
|
|
329
|
+
class: "IncodeLoadingBorderPath",
|
|
330
|
+
fill: r
|
|
331
|
+
}
|
|
332
|
+
),
|
|
333
|
+
/* @__PURE__ */ t("defs", { children: /* @__PURE__ */ t(
|
|
334
|
+
"radialGradient",
|
|
335
|
+
{
|
|
336
|
+
id: e,
|
|
337
|
+
cx: "0",
|
|
338
|
+
cy: "0",
|
|
339
|
+
r: "1",
|
|
340
|
+
gradientUnits: "userSpaceOnUse",
|
|
341
|
+
gradientTransform: "translate(240.418 17.4369) rotate(115.674) scale(167.087)",
|
|
342
|
+
children: [
|
|
343
|
+
/* @__PURE__ */ t("stop", { "stop-color": n }),
|
|
344
|
+
/* @__PURE__ */ t("stop", { offset: "1", "stop-color": n, "stop-opacity": "0" })
|
|
345
|
+
]
|
|
346
|
+
}
|
|
347
|
+
) })
|
|
348
|
+
]
|
|
349
|
+
}
|
|
350
|
+
)
|
|
351
|
+
}
|
|
352
|
+
);
|
|
353
|
+
}, G = () => /* @__PURE__ */ t("div", { class: "IncodeCameraButton", children: /* @__PURE__ */ t(
|
|
354
|
+
"svg",
|
|
355
|
+
{
|
|
356
|
+
width: "64",
|
|
357
|
+
height: "64",
|
|
358
|
+
viewBox: "0 0 64 64",
|
|
359
|
+
fill: "none",
|
|
360
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
361
|
+
"aria-hidden": "true",
|
|
362
|
+
children: [
|
|
363
|
+
/* @__PURE__ */ t(
|
|
364
|
+
"path",
|
|
365
|
+
{
|
|
366
|
+
d: "M0 32C0 14.3269 14.3269 0 32 0C49.6731 0 64 14.3269 64 32C64 49.6731 49.6731 64 32 64C14.3269 64 0 49.6731 0 32Z",
|
|
367
|
+
class: "IncodeCameraButtonBackground"
|
|
368
|
+
}
|
|
369
|
+
),
|
|
370
|
+
/* @__PURE__ */ t(
|
|
371
|
+
"path",
|
|
372
|
+
{
|
|
373
|
+
fillRule: "evenodd",
|
|
374
|
+
clipRule: "evenodd",
|
|
375
|
+
d: "M41.872 28.9792C41.872 29.6692 41.312 30.2292 40.622 30.2292C39.932 30.2292 39.372 29.6692 39.372 28.9792C39.372 28.2892 39.932 27.6808 40.622 27.6808C41.312 27.6808 41.872 28.1908 41.872 28.8808V28.9792ZM31.9987 40.7475C28.467 40.7475 25.5937 37.8742 25.5937 34.3425C25.5937 30.8108 28.467 27.9375 31.9987 27.9375C35.5303 27.9375 38.4037 30.8108 38.4037 34.3425C38.4037 37.8742 35.5303 40.7475 31.9987 40.7475ZM41.9287 23.4192C41.3237 23.3958 40.7603 23.1425 40.3553 22.7192C40.282 22.6375 39.9853 22.2692 39.2937 20.9725C38.4987 19.4858 36.9587 18.5625 35.2753 18.5625H28.7553C27.0987 18.5625 25.5703 19.4642 24.7703 20.9142C24.042 22.2325 23.7403 22.6208 23.6587 22.7108C23.2403 23.1475 22.677 23.4025 22.1037 23.4275C18.8337 23.4275 16.172 26.0875 16.167 29.3575V38.7608C16.167 42.9942 19.612 46.4392 23.8437 46.4392H40.157C44.3903 46.4392 47.8337 42.9942 47.8337 38.7608V29.3542C47.8337 26.0808 45.1703 23.4192 41.9287 23.4192Z",
|
|
376
|
+
class: "IncodeCameraButtonPath"
|
|
377
|
+
}
|
|
378
|
+
),
|
|
379
|
+
/* @__PURE__ */ t(
|
|
380
|
+
"path",
|
|
381
|
+
{
|
|
382
|
+
fillRule: "evenodd",
|
|
383
|
+
clipRule: "evenodd",
|
|
384
|
+
d: "M31.9987 30.4375C29.8454 30.4375 28.0938 32.1892 28.0938 34.3425C28.0938 36.4958 29.8454 38.2475 31.9987 38.2475C34.152 38.2475 35.9037 36.4958 35.9037 34.3425C35.9037 32.1892 34.152 30.4375 31.9987 30.4375Z",
|
|
385
|
+
class: "IncodeCameraButtonPath"
|
|
386
|
+
}
|
|
387
|
+
)
|
|
388
|
+
]
|
|
389
|
+
}
|
|
390
|
+
) }), K = ({
|
|
391
|
+
onClick: i,
|
|
392
|
+
disabled: e
|
|
393
|
+
}) => {
|
|
394
|
+
const { t: o } = d();
|
|
395
|
+
return /* @__PURE__ */ t("div", { class: "IncodeManualCaptureButton", "data-testid": "manual-capture-button", children: [
|
|
396
|
+
/* @__PURE__ */ t("p", { class: "IncodeManualCaptureButtonText", children: o("selfiev2.manualCapture.instructions") }),
|
|
397
|
+
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
398
|
+
h,
|
|
399
|
+
{
|
|
400
|
+
variant: "link",
|
|
401
|
+
onClick: i,
|
|
402
|
+
disabled: e,
|
|
403
|
+
class: "IncodeManualCaptureButtonButton",
|
|
404
|
+
children: /* @__PURE__ */ t(G, {})
|
|
405
|
+
}
|
|
406
|
+
) })
|
|
407
|
+
] });
|
|
408
|
+
}, W = ({ detectionState: i }) => {
|
|
409
|
+
const { t: e } = d(), n = {
|
|
410
|
+
noFace: e("notifications.faceNotFound"),
|
|
411
|
+
tooManyFaces: e("notifications.tooManyFaces"),
|
|
412
|
+
tooClose: e("notifications.moveAway"),
|
|
413
|
+
tooFar: e("notifications.moveCloser"),
|
|
414
|
+
blur: e("notifications.onBlur"),
|
|
415
|
+
dark: e("notifications.onDark"),
|
|
416
|
+
faceAngle: e("notifications.onFaceAngleV2"),
|
|
417
|
+
headWear: e("notifications.removeHeadwear"),
|
|
418
|
+
lenses: e("notifications.removeLenses"),
|
|
419
|
+
eyesClosed: e("notifications.eyesClosed"),
|
|
420
|
+
faceMask: e("notifications.mask"),
|
|
421
|
+
centerFace: e("notifications.centerFaceV2"),
|
|
422
|
+
getReady: e("notifications.getReady")
|
|
423
|
+
}[i];
|
|
424
|
+
return n ? /* @__PURE__ */ t("div", { class: "IncodeNotification", children: /* @__PURE__ */ t("p", { class: "IncodeNotificationText", children: n }) }) : null;
|
|
425
|
+
}, j = ({ manager: i, state: e, onFinish: o }) => {
|
|
426
|
+
const {
|
|
427
|
+
captureStatus: n,
|
|
428
|
+
stream: r,
|
|
429
|
+
detectionStatus: s,
|
|
430
|
+
attemptsRemaining: u,
|
|
431
|
+
uploadError: c
|
|
432
|
+
} = e, [f, p] = R(!1), { t: E } = d();
|
|
433
|
+
return n === "initializing" ? /* @__PURE__ */ t(
|
|
434
|
+
y,
|
|
435
|
+
{
|
|
436
|
+
fullScreen: !0,
|
|
437
|
+
title: E("v2.selfie.camera.loading"),
|
|
438
|
+
className: "IncodeCameraLoading"
|
|
439
|
+
}
|
|
440
|
+
) : n === "detecting" ? s === "offline" ? /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t("div", { class: "flex h-full flex-col items-center justify-center", children: /* @__PURE__ */ t("p", { class: "text-text-body-primary", children: "No internet connection" }) }) }) : /* @__PURE__ */ t(C, { "data-testid": "capture-container", children: [
|
|
441
|
+
/* @__PURE__ */ t(a, { size: 48 }),
|
|
442
|
+
/* @__PURE__ */ t("div", { class: "IncodeCaptureContainer", children: [
|
|
443
|
+
/* @__PURE__ */ t(Y, { borderState: f ? "capturing" : s === "detecting" ? "idle" : s === "getReady" ? "loading" : s === "success" ? "success" : s === "error" ? "error" : "idle" }),
|
|
444
|
+
/* @__PURE__ */ t("div", { class: "IncodeCaptureFrame", children: /* @__PURE__ */ t("div", { class: "IncodeCaptureVideoWrapper", children: r ? /* @__PURE__ */ t(g, { children: [
|
|
445
|
+
/* @__PURE__ */ t(X, { stream: r }),
|
|
446
|
+
/* @__PURE__ */ t("div", { class: "IncodeCaptureVideo", children: /* @__PURE__ */ t(z, {}) })
|
|
447
|
+
] }) : null }) }),
|
|
448
|
+
/* @__PURE__ */ t(a, { size: 48 }),
|
|
449
|
+
s ? /* @__PURE__ */ t(g, { children: [
|
|
450
|
+
/* @__PURE__ */ t(W, { detectionState: s }),
|
|
451
|
+
/* @__PURE__ */ t(a, { size: 24 })
|
|
452
|
+
] }) : null,
|
|
453
|
+
s === "manualCapture" ? /* @__PURE__ */ t(
|
|
454
|
+
K,
|
|
455
|
+
{
|
|
456
|
+
onClick: () => {
|
|
457
|
+
p(!0), i.capture();
|
|
458
|
+
},
|
|
459
|
+
disabled: f
|
|
460
|
+
}
|
|
461
|
+
) : null
|
|
462
|
+
] }),
|
|
463
|
+
c ? /* @__PURE__ */ t(
|
|
464
|
+
_,
|
|
465
|
+
{
|
|
466
|
+
error: c,
|
|
467
|
+
attemptsRemaining: u,
|
|
468
|
+
onTryAgain: () => {
|
|
469
|
+
i.retryCapture(), p(!1);
|
|
470
|
+
},
|
|
471
|
+
onContinue: o
|
|
472
|
+
}
|
|
473
|
+
) : null
|
|
474
|
+
] }) : n === "capturing" ? /* @__PURE__ */ t(
|
|
475
|
+
C,
|
|
476
|
+
{
|
|
477
|
+
className: "IncodeCaptureCapturingPage",
|
|
478
|
+
title: "Capturing",
|
|
479
|
+
subtitle: "Taking photo...",
|
|
480
|
+
children: /* @__PURE__ */ t(
|
|
481
|
+
"div",
|
|
482
|
+
{
|
|
483
|
+
style: {
|
|
484
|
+
display: "flex",
|
|
485
|
+
justifyContent: "center",
|
|
486
|
+
marginTop: "auto"
|
|
487
|
+
},
|
|
488
|
+
children: /* @__PURE__ */ t(h, { isLoading: !0, children: "Capturing..." })
|
|
489
|
+
}
|
|
490
|
+
)
|
|
491
|
+
}
|
|
492
|
+
) : n === "uploading" ? /* @__PURE__ */ t($, {}) : n === "uploadError" ? /* @__PURE__ */ t(
|
|
493
|
+
_,
|
|
494
|
+
{
|
|
495
|
+
error: c,
|
|
496
|
+
attemptsRemaining: u,
|
|
497
|
+
onTryAgain: () => {
|
|
498
|
+
i.retryCapture(), p(!1);
|
|
499
|
+
},
|
|
500
|
+
onContinue: o
|
|
501
|
+
}
|
|
502
|
+
) : n === "success" ? /* @__PURE__ */ t(C, { className: "IncodeCaptureSuccessPage", children: /* @__PURE__ */ t("div", { class: "IncodeCaptureSuccessContainer", children: [
|
|
503
|
+
/* @__PURE__ */ t(a, { size: 160 }),
|
|
504
|
+
/* @__PURE__ */ t(F, { size: 64 }),
|
|
505
|
+
/* @__PURE__ */ t(a, { size: 16 }),
|
|
506
|
+
/* @__PURE__ */ t(x, { children: E("idv2.capture.processing.success") })
|
|
507
|
+
] }) }) : null;
|
|
508
|
+
}, X = ({ stream: i }) => {
|
|
509
|
+
const e = A(null);
|
|
510
|
+
return T(() => {
|
|
511
|
+
e.current && i && (e.current.srcObject = i);
|
|
512
|
+
}, [i]), /* @__PURE__ */ t(
|
|
513
|
+
"video",
|
|
514
|
+
{
|
|
515
|
+
ref: e,
|
|
516
|
+
autoplay: !0,
|
|
517
|
+
playsInline: !0,
|
|
518
|
+
muted: !0,
|
|
519
|
+
class: "IncodeCaptureVideoElement"
|
|
520
|
+
}
|
|
521
|
+
);
|
|
522
|
+
}, $ = () => {
|
|
523
|
+
const { t: i } = d();
|
|
524
|
+
return /* @__PURE__ */ t(C, { className: "IncodeCaptureUploadingPage", children: /* @__PURE__ */ t("div", { class: "IncodeCaptureUploadingContainer", children: [
|
|
525
|
+
/* @__PURE__ */ t(a, { size: 160 }),
|
|
526
|
+
/* @__PURE__ */ t("div", { class: "IncodeCaptureUploadingIconContainer", children: /* @__PURE__ */ t(L, { size: 64 }) }),
|
|
527
|
+
/* @__PURE__ */ t(a, { size: 16 }),
|
|
528
|
+
/* @__PURE__ */ t("h2", { class: "IncodeCaptureUploadingTitle", children: i("idv2.capture.processing.uploading") })
|
|
529
|
+
] }) });
|
|
530
|
+
}, q = ({ manager: i }) => {
|
|
531
|
+
const { t: e } = d(), [o, n] = R(!1), [r, s] = R(null);
|
|
532
|
+
T(() => {
|
|
533
|
+
import("../selfieTutorial-Dm_p0ke9.js").then((c) => {
|
|
534
|
+
s(c.default);
|
|
535
|
+
});
|
|
536
|
+
}, []);
|
|
537
|
+
const u = () => {
|
|
538
|
+
n(!0), i.nextStep();
|
|
539
|
+
};
|
|
540
|
+
return r ? /* @__PURE__ */ t(
|
|
541
|
+
M,
|
|
542
|
+
{
|
|
543
|
+
animationData: r,
|
|
544
|
+
title: e("face.tutorial.title"),
|
|
545
|
+
subtitle: e("face.tutorial.subtitle"),
|
|
546
|
+
onContinue: u,
|
|
547
|
+
buttonText: e("face.tutorial.startCapture"),
|
|
548
|
+
disclaimerText: e("face.tutorial.autoCapture"),
|
|
549
|
+
isLoading: o,
|
|
550
|
+
className: "IncodeSelfieTutorial"
|
|
551
|
+
}
|
|
552
|
+
) : null;
|
|
553
|
+
}, J = ({
|
|
554
|
+
config: i,
|
|
555
|
+
onFinish: e,
|
|
556
|
+
onError: o
|
|
557
|
+
}) => {
|
|
558
|
+
const [n, r] = S(() => D({ config: i }));
|
|
559
|
+
return n.status === "idle" || n.status === "loading" ? null : n.status === "tutorial" ? /* @__PURE__ */ t(q, { manager: r }) : n.status === "permissions" ? /* @__PURE__ */ t(
|
|
560
|
+
w,
|
|
561
|
+
{
|
|
562
|
+
manager: r,
|
|
563
|
+
permissionStatus: n.permissionStatus
|
|
564
|
+
}
|
|
565
|
+
) : n.status === "capture" ? /* @__PURE__ */ t(j, { manager: r, state: n, onFinish: () => e?.() }) : n.status === "processing" ? /* @__PURE__ */ t(N, {}) : n.status === "finished" ? (e?.(), null) : n.status === "closed" ? (o?.(void 0), null) : (n.status === "error" && o?.(n.error), null);
|
|
566
|
+
}, tt = ({ config: i, onFinish: e, onError: o }) => /* @__PURE__ */ t(B, { children: i ? /* @__PURE__ */ t(J, { config: i, onFinish: e, onError: o }) : null });
|
|
567
|
+
I(tt, "incode-selfie");
|
|
568
|
+
export {
|
|
569
|
+
tt as Selfie
|
|
570
|
+
};
|