@incodetech/web 2.0.0-alpha.8 → 2.0.0-rc.0
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/ae-signature/ae-signature.es.js +15 -0
- package/dist/ae-signature/styles.css +348 -0
- package/dist/ae-signature/styles2.css +107 -0
- package/dist/aligndevicelottie-DoV8xKjh.js +12757 -0
- package/dist/antifraud/antifraud.es.js +18 -0
- package/dist/antifraud/styles.css +2 -0
- package/dist/authentication/authentication.es.js +29 -0
- package/dist/autoFocusTitle-QexamZ4i.js +16 -0
- package/dist/back-horizontal-hint-B8Brxh3U.js +137 -0
- package/dist/back-tutorial-1NOQobGO.js +14585 -0
- package/dist/back-vertical-hint-BBo36dxn.js +128 -0
- package/dist/backdevicelottie-C_ceuqY7.js +16678 -0
- package/dist/base.css +5218 -639
- package/dist/blurdevicelottie-UO14Y0WC.js +15939 -0
- package/dist/bottomSheet-DE_8TFEC.js +31 -0
- package/dist/browser-ponyfill-jOkuz57z.js +299 -0
- package/dist/button-DcCUEn2n.js +24 -0
- package/dist/checkbox-Cl57ltq_.js +85 -0
- package/dist/consent/consent.es.js +90 -0
- package/dist/consent/styles.css +116 -0
- package/dist/countrySelector-CE-JgIsv.js +58 -0
- package/dist/cpf-ocr/styles.css +45 -0
- package/dist/cpfOcr-D_tbwbvh.js +78 -0
- package/dist/cross-document-data-match/cross-document-data-match.es.js +18 -0
- package/dist/curp-validation/curp-validation.es.js +279 -0
- package/dist/curp-validation/styles.css +82 -0
- package/dist/custom-fields/styles.css +22 -0
- package/dist/customFields-CW38fQUv.js +127 -0
- package/dist/customWatchlist-D9_yjEQd.js +33 -0
- package/dist/dateInputComposed-BpAGsjN6.js +55 -0
- package/dist/dateInputComposed-DU3o6PAV.js +1 -0
- package/dist/defineProperty-Dh8nSJpJ.js +39 -0
- package/dist/document-capture/styles.css +367 -0
- package/dist/documentCapture-xX-JT7ZY.js +763 -0
- package/dist/dropdownComposed-DFRBG22E.js +284 -0
- package/dist/dropdownComposed-DwTzc2YU.js +1 -0
- package/dist/dynamic-forms/styles.css +36 -0
- package/dist/dynamicForms-CJP1Ia6Q.js +262 -0
- package/dist/ekyb/ekyb.es.js +2 -0
- package/dist/ekyb/styles.css +137 -0
- package/dist/ekybModule-BSs7mndb.js +280 -0
- package/dist/ekybModule-D9M3E2Gm.js +2 -0
- package/dist/ekyc/ekyc.es.js +2 -0
- package/dist/ekyc/styles.css +106 -0
- package/dist/ekycModule-CU9pt5YN.js +246 -0
- package/dist/ekycModule-CZw9cLno.js +2 -0
- package/dist/electronic-signature/electronic-signature.es.js +2 -0
- package/dist/electronic-signature-COYXjGdd.js +410 -0
- package/dist/email/email.es.js +87 -145
- package/dist/email/styles.css +5 -116
- package/dist/emailInput-DppGf9pv.js +37 -0
- package/dist/expiredId-BnmzE8T3.js +70 -0
- package/dist/extensibility-CzEJfRwo.js +2586 -0
- package/dist/extensibility.es.js +25 -0
- package/dist/face-match/face-match.es.js +2 -0
- package/dist/face-match/styles.css +910 -0
- package/dist/faceMatch-B8j0g0Yo.js +2 -0
- package/dist/faceMatch-BV8UD7tj.js +201 -0
- package/dist/flip-animation-CgwRsEmK.js +6983 -0
- package/dist/flow/flow.es.js +646 -542
- package/dist/flow/styles.css +4524 -440
- package/dist/front-horizontal-hint-DGGGi8e1.js +380 -0
- package/dist/front-vertical-hint-CNr5mE6Q.js +420 -0
- package/dist/frontdevicelottie-Bu6f9fDE.js +17302 -0
- package/dist/geolocation/geolocation.es.js +857 -0
- package/dist/geolocation/styles.css +158 -0
- package/dist/glaredevicelottie-B10axYs_.js +14466 -0
- package/dist/governmentValidation/governmentValidation.es.js +98 -0
- package/dist/governmentValidation/styles.css +58 -0
- package/dist/homeScreen-DnP1jw9A.js +227 -0
- package/dist/hooks-BVnGysT7.js +80 -0
- package/dist/i18n-9s4OSqwi.js +2010 -0
- package/dist/icons-Cc7zwchP.js +310 -0
- package/dist/id/id.es.js +832 -0
- package/dist/id/styles.css +1287 -0
- package/dist/id-laser-h-mBAzHVOK.js +467 -0
- package/dist/id-laser-v-CrFg4bcJ.js +483 -0
- package/dist/id-ocr/styles.css +46 -0
- package/dist/id-tutorial-BCr42Pnn.js +13153 -0
- package/dist/id-verification/id-verification.es.js +20 -0
- package/dist/idOcr-CCjfWQvH.js +94 -0
- package/dist/identity-reuse/identity-reuse.es.js +198 -0
- package/dist/identity-reuse/styles.css +163 -0
- package/dist/incode-logo-DX016usY.js +4 -0
- package/dist/incodeComponent-C1o4M0ZK.js +50 -0
- package/dist/incodeModule-BqCjVgEI.js +18 -0
- package/dist/index.es.js +16 -6
- package/dist/inputComposed-APSw8C7o.js +89 -0
- package/dist/inputComposed-XYrarFxS.js +1 -0
- package/dist/loadingIcon-BN5YRQUb.js +104 -0
- package/dist/mandatoryConsent-DssKMC3v.js +100 -0
- package/dist/modal-NMxsQHAO.js +135 -0
- package/dist/modal.hooks-CAjcIFZK.js +126 -0
- package/dist/numberedStep-CT-alrK5.js +11 -0
- package/dist/optionAccessibleLabel-CzEeX3Q4.js +140 -0
- package/dist/otpInput-DqRA_egd.js +145 -0
- package/dist/page-C1yT4DLb.js +69 -0
- package/dist/passport-horizontal-hint-Bgquwtac.js +293 -0
- package/dist/passport-tutorial-DwRwtPVX.js +11689 -0
- package/dist/passport-vertical-hint-BT1D5BrW.js +267 -0
- package/dist/pdf-BurGZ08w.js +14967 -0
- package/dist/pdfViewer-BGBNL1Ea.js +63 -0
- package/dist/phone/phone.es.js +98 -3441
- package/dist/phone/styles.css +3 -297
- package/dist/phoneInputComposed-bvWhGLFZ.js +11206 -0
- package/dist/processing-G_y3o32b.js +6 -0
- package/dist/qe-signature/qe-signature.es.js +15 -0
- package/dist/radioGroupComposed-BbmvxmD2.js +177 -0
- package/dist/redirect-to-mobile/styles.css +588 -0
- package/dist/redirectToMobile-C3k1gloW.js +1514 -0
- package/dist/requiredLabelHint-BLwgqozE.js +13 -0
- package/dist/richText-DbJ5sl2n.js +1973 -0
- package/dist/rolldown-runtime-CYMK-g2i.js +20 -0
- package/dist/selfie/selfie.es.js +42 -892
- package/dist/selfie/styles.css +298 -184
- package/dist/selfieTutorial-BgrlUMXP.js +2677 -0
- package/dist/signature/signature.es.js +546 -0
- package/dist/snackbar-BDp8x7Cv.js +14 -0
- package/dist/spinner-B4dcie2T.js +1 -0
- package/dist/spinner-CKnjVHxw.js +39 -0
- package/dist/statusPage-CUI7ApcU.js +28 -0
- package/dist/successIcon-DbILeIz_.js +28 -0
- package/dist/tabs-DaPyP71c.js +78 -0
- package/dist/themes/dark.css +846 -151
- package/dist/themes/light.css +798 -116
- package/dist/transitionSpinner-PIEPU2Vx.js +17 -0
- package/dist/tutorial-9vHAHvMK.js +2587 -0
- package/dist/types/ae-signature.d.ts +40 -0
- package/dist/types/antifraud.d.ts +40 -0
- package/dist/types/authentication.d.ts +45 -0
- package/dist/types/consent.d.ts +41 -0
- package/dist/types/cpf-ocr/styles.d.ts +1 -0
- package/dist/types/cross-document-data-match.d.ts +34 -0
- package/dist/types/curp-validation.d.ts +40 -0
- package/dist/types/custom-fields/styles.d.ts +1 -0
- package/dist/types/document-capture/styles.d.ts +1 -0
- package/dist/types/dynamic-forms/styles.d.ts +1 -0
- package/dist/types/ekyb.d.ts +34 -0
- package/dist/types/ekyc.d.ts +34 -0
- package/dist/types/electronic-signature.d.ts +43 -0
- package/dist/types/email.d.ts +14 -4
- package/dist/types/extensibility.d.ts +981 -0
- package/dist/types/face-match.d.ts +59 -0
- package/dist/types/flow.d.ts +81 -13
- package/dist/types/geolocation.d.ts +41 -0
- package/dist/types/governmentValidation.d.ts +34 -0
- package/dist/types/id-ocr/styles.d.ts +1 -0
- package/dist/types/id-verification.d.ts +40 -0
- package/dist/types/id.d.ts +41 -0
- package/dist/types/identity-reuse.d.ts +43 -0
- package/dist/types/index.d.ts +6 -12
- package/dist/types/mandatory-consent/styles.d.ts +1 -0
- package/dist/types/phone.d.ts +14 -4
- package/dist/types/qe-signature.d.ts +40 -0
- package/dist/types/redirect-to-mobile/styles.d.ts +1 -0
- package/dist/types/selfie.d.ts +14 -4
- package/dist/types/signature.d.ts +40 -0
- package/dist/types/watchlist-for-business/styles.d.ts +1 -0
- package/dist/types/watchlist.d.ts +40 -0
- package/dist/types/workflow.d.ts +91 -0
- package/dist/typography-CxjaknHN.js +28 -0
- package/dist/uiConfig-CwpQ-IM6.js +20 -0
- package/dist/useModuleLoader-BFiVA41N.js +432 -0
- package/dist/vendor-preact-D6SntenC.js +958 -0
- package/dist/verificationResult-BrVbUJ4U.js +97 -0
- package/dist/verifiedByIncode-ChZBpqNy.js +101 -0
- package/dist/watchlist/watchlist.es.js +33 -0
- package/dist/watchlist-for-business/styles.css +18 -0
- package/dist/watchlistForBusiness-BcSNtHCV.js +77 -0
- package/dist/workflow/styles.css +4612 -0
- package/dist/workflow/workflow.es.js +244 -0
- package/package.json +211 -15
- package/dist/browser-ponyfill-B6W6hHVY.js +0 -344
- package/dist/incodeModule-Dv8Qllrv.js +0 -254
- package/dist/instance-B-q0ZREN.js +0 -2140
- package/dist/otpInput-BtoZe0Wz.js +0 -151
- package/dist/page-D9ijzlSn.js +0 -234
- package/dist/selfieTutorial-C-u5GufD.js +0 -29
- package/dist/setup-wNL83jmW.js +0 -20
- package/dist/title-BfO5Dlzk.js +0 -25
- package/dist/uiConfig-CQ1W9cUD.js +0 -23
- package/dist/vendor-preact-CK0WeTOR.js +0 -584
package/dist/selfie/selfie.es.js
CHANGED
|
@@ -1,893 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import "../
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
viewBox: "0 0 16 17",
|
|
14
|
-
fill: "none",
|
|
15
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
16
|
-
class: "IncodeSuccessIcon",
|
|
17
|
-
"aria-hidden": "true",
|
|
18
|
-
children: [
|
|
19
|
-
/* @__PURE__ */ e("title", { children: "status" }),
|
|
20
|
-
/* @__PURE__ */ e(
|
|
21
|
-
"path",
|
|
22
|
-
{
|
|
23
|
-
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",
|
|
24
|
-
fill: "var(--icon-status-positive-static)"
|
|
25
|
-
}
|
|
26
|
-
)
|
|
27
|
-
]
|
|
28
|
-
}
|
|
29
|
-
), V = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.8/assets/permissions-img-83924a96.svg", k = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.8/assets/android-dots-icon-846d605c.svg", H = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.8/assets/android-settings-icon-8bd49c8d.svg", U = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.8/assets/android-toggle-icon-03e22d7a.svg", z = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.8/assets/chrome-icon-4c3b130c.svg", Z = () => /* @__PURE__ */ e(
|
|
30
|
-
"svg",
|
|
31
|
-
{
|
|
32
|
-
class: "IncodeBoldWithArrowIcon",
|
|
33
|
-
width: "13",
|
|
34
|
-
height: "14",
|
|
35
|
-
viewBox: "0 0 13 14",
|
|
36
|
-
fill: "none",
|
|
37
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
38
|
-
"aria-hidden": "true",
|
|
39
|
-
children: /* @__PURE__ */ e(
|
|
40
|
-
"path",
|
|
41
|
-
{
|
|
42
|
-
d: "M0 8.08009V5.92009H9.198L4.698 1.87009L6.228 0.340088L12.6 6.28009V7.70209L6.228 13.6601L4.698 12.1301L9.198 8.08009H0Z",
|
|
43
|
-
fill: "currentColor"
|
|
44
|
-
}
|
|
45
|
-
)
|
|
46
|
-
}
|
|
47
|
-
), W = ({ i18nKey: i }) => {
|
|
48
|
-
const { t: n } = d(), s = n(i).split(/<arrow\s*\/?>/gi);
|
|
49
|
-
return /* @__PURE__ */ e("span", { class: "IncodeBoldWithArrow", children: s.map((o, r) => /* @__PURE__ */ e("span", { children: [
|
|
50
|
-
o,
|
|
51
|
-
r < s.length - 1 ? /* @__PURE__ */ e(Z, {}) : null
|
|
52
|
-
] }, r)) });
|
|
53
|
-
}, D = ({ icon: i, title: n }) => /* @__PURE__ */ e("div", { class: "IncodeIconWrapper", children: /* @__PURE__ */ e("img", { src: i, alt: n, class: "IncodeIconWrapperImage" }) }), $ = () => {
|
|
54
|
-
const { t: i } = d(), n = [
|
|
55
|
-
{
|
|
56
|
-
icon: k,
|
|
57
|
-
iconTitle: i("idv2.permissions.denied.settings"),
|
|
58
|
-
instructionKey: "tap",
|
|
59
|
-
boldKey: "idv2.permissions.denied.dots",
|
|
60
|
-
additionalText: ` ${i("idv2.permissions.denied.topRight")}`
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
icon: H,
|
|
64
|
-
iconTitle: i("idv2.permissions.denied.browser"),
|
|
65
|
-
instructionKey: "tap",
|
|
66
|
-
boldKey: "idv2.permissions.denied.siteSettings"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
icon: U,
|
|
70
|
-
iconTitle: i("idv2.permissions.denied.camera"),
|
|
71
|
-
instructionKey: "tap",
|
|
72
|
-
boldKey: "idv2.permissions.denied.cameraAllow"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
icon: z,
|
|
76
|
-
iconTitle: i("idv2.permissions.denied.toggle"),
|
|
77
|
-
instructionKey: "returnPress",
|
|
78
|
-
boldKey: "idv2.permissions.denied.refreshPage"
|
|
79
|
-
}
|
|
80
|
-
];
|
|
81
|
-
return /* @__PURE__ */ e("div", { class: "IncodeDeniedInstructionsContainer", children: /* @__PURE__ */ e("ol", { class: "IncodeDeniedStepsList", children: n.map((t) => /* @__PURE__ */ e("li", { class: "IncodeDeniedStepItem", children: [
|
|
82
|
-
/* @__PURE__ */ e(D, { icon: t.icon, title: t.iconTitle }),
|
|
83
|
-
/* @__PURE__ */ e("p", { class: "IncodeDeniedStepText", children: [
|
|
84
|
-
i(`idv2.permissions.denied.${t.instructionKey}`),
|
|
85
|
-
" ",
|
|
86
|
-
/* @__PURE__ */ e(W, { i18nKey: t.boldKey }),
|
|
87
|
-
t.additionalText ? t.additionalText : null
|
|
88
|
-
] })
|
|
89
|
-
] }, t.boldKey)) }) });
|
|
90
|
-
}, Q = ({ number: i }) => /* @__PURE__ */ e("div", { class: "IncodeNumberedStep", children: /* @__PURE__ */ e("span", { class: "IncodeNumberedStepText", children: i }) }), Y = (i) => {
|
|
91
|
-
const n = [
|
|
92
|
-
`idv2.permissions.denied.${i}.firstStep`,
|
|
93
|
-
`idv2.permissions.denied.${i}.secondStep`,
|
|
94
|
-
`idv2.permissions.denied.${i}.thirdStep`,
|
|
95
|
-
`idv2.permissions.denied.${i}.fourthStep`,
|
|
96
|
-
`idv2.permissions.denied.${i}.fifthStep`
|
|
97
|
-
];
|
|
98
|
-
return i === "safari" && n.push(`idv2.permissions.denied.${i}.sixthStep`), n;
|
|
99
|
-
}, G = (i, n) => i(n).split(/(<strong>[^<]+<\/strong>)/g).map((o, r) => {
|
|
100
|
-
if (o.startsWith("<strong>") && o.endsWith("</strong>")) {
|
|
101
|
-
const a = o.slice(8, -9);
|
|
102
|
-
return /* @__PURE__ */ e("span", { class: "IncodeDeniedStepTextBold", children: a }, r);
|
|
103
|
-
}
|
|
104
|
-
return o;
|
|
105
|
-
}), j = () => {
|
|
106
|
-
const { t: i } = d(), n = B(), t = Y(n);
|
|
107
|
-
return /* @__PURE__ */ e("div", { class: "IncodeDeniedInstructionsContainer", children: /* @__PURE__ */ e("div", { class: "IncodeDeniedDesktopContainer", children: t.map((s, o) => /* @__PURE__ */ e(E, { children: [
|
|
108
|
-
/* @__PURE__ */ e("div", { class: "IncodeDeniedDesktopStep", children: [
|
|
109
|
-
/* @__PURE__ */ e(Q, { number: o + 1 }),
|
|
110
|
-
/* @__PURE__ */ e("p", { class: "IncodeDeniedStepText", children: G(i, s) })
|
|
111
|
-
] }),
|
|
112
|
-
o < t.length - 1 ? /* @__PURE__ */ e("div", { class: "IncodeNumberedStepConnector" }) : null
|
|
113
|
-
] }, s)) }) });
|
|
114
|
-
}, q = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.8/assets/camera-ios-9eac3be1.svg", R = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.8/assets/safari-icon-7823d73d.svg", X = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.8/assets/settings-icon-9743cbda.svg", J = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.8/assets/toggle-icon-351f86ce.svg", ee = () => {
|
|
115
|
-
const { t: i } = d(), n = [
|
|
116
|
-
{
|
|
117
|
-
icon: X,
|
|
118
|
-
iconTitle: i("idv2.permissions.denied.settings"),
|
|
119
|
-
instructionKey: "open",
|
|
120
|
-
boldKey: "settings"
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
icon: R,
|
|
124
|
-
iconTitle: i("idv2.permissions.denied.browser"),
|
|
125
|
-
instructionKey: "scroll",
|
|
126
|
-
boldKey: "yourBrowser"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
icon: q,
|
|
130
|
-
iconTitle: i("idv2.permissions.denied.camera"),
|
|
131
|
-
instructionKey: "tap",
|
|
132
|
-
boldKey: "camera"
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
icon: J,
|
|
136
|
-
iconTitle: i("idv2.permissions.denied.toggle"),
|
|
137
|
-
instructionKey: "changeTo",
|
|
138
|
-
boldKey: "allow",
|
|
139
|
-
additionalText: ` ${i("idv2.permissions.denied.or")}`,
|
|
140
|
-
secondBoldKey: "ask"
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
icon: R,
|
|
144
|
-
iconTitle: i("idv2.permissions.denied.browser"),
|
|
145
|
-
instructionKey: "return",
|
|
146
|
-
boldKey: "refreshPage"
|
|
147
|
-
}
|
|
148
|
-
];
|
|
149
|
-
return /* @__PURE__ */ e("div", { class: "IncodeDeniedInstructionsContainer", children: /* @__PURE__ */ e("ol", { class: "IncodeDeniedStepsList", children: n.map((t) => /* @__PURE__ */ e("li", { class: "IncodeDeniedStepItem", children: [
|
|
150
|
-
/* @__PURE__ */ e(D, { icon: t.icon, title: t.iconTitle }),
|
|
151
|
-
/* @__PURE__ */ e("p", { class: "IncodeDeniedStepText", children: [
|
|
152
|
-
i(`idv2.permissions.denied.${t.instructionKey}`),
|
|
153
|
-
" ",
|
|
154
|
-
/* @__PURE__ */ e("span", { class: "IncodeDeniedStepTextBold", children: i(`idv2.permissions.denied.${t.boldKey}`) }),
|
|
155
|
-
t.additionalText ? /* @__PURE__ */ e(E, { children: [
|
|
156
|
-
t.additionalText,
|
|
157
|
-
/* @__PURE__ */ e("span", { class: "IncodeDeniedStepTextBold", children: [
|
|
158
|
-
" ",
|
|
159
|
-
i(`idv2.permissions.denied.${t.secondBoldKey}`)
|
|
160
|
-
] })
|
|
161
|
-
] }) : null
|
|
162
|
-
] })
|
|
163
|
-
] }, t.boldKey)) }) });
|
|
164
|
-
}, ie = () => {
|
|
165
|
-
const i = N();
|
|
166
|
-
return i === "ios" ? /* @__PURE__ */ e(ee, {}) : i === "android" ? /* @__PURE__ */ e($, {}) : /* @__PURE__ */ e(j, {});
|
|
167
|
-
}, ne = ({ onRefresh: i }) => {
|
|
168
|
-
const { t: n } = d();
|
|
169
|
-
return /* @__PURE__ */ e(u, { hideHeader: !0, className: "IncodeDeniedPage", children: [
|
|
170
|
-
/* @__PURE__ */ e(c, { size: 24 }),
|
|
171
|
-
/* @__PURE__ */ e("p", { class: "IncodeDeniedTitle", children: n("idv2.permissions.denied.title") }),
|
|
172
|
-
/* @__PURE__ */ e(c, { size: 64 }),
|
|
173
|
-
/* @__PURE__ */ e(ie, {}),
|
|
174
|
-
/* @__PURE__ */ e("div", { class: "IncodeDeniedActions", children: /* @__PURE__ */ e(C, { onClick: i, children: n("idv2.permissions.denied.refreshPage") }) })
|
|
175
|
-
] });
|
|
176
|
-
}, te = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.8/assets/bank-card-icon-6af62350.svg", se = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.8/assets/camera-icon-b2fc4c1c.svg", oe = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.8/assets/check-icon-b1d1ddd8.svg", re = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.8/assets/password-icon-f5257b0b.svg", ce = "https://assets.incode.com/@incodetech/web/2.0.0-alpha.8/assets/warning-icon-f3eadd0b.svg", ae = [
|
|
177
|
-
{
|
|
178
|
-
icon: se,
|
|
179
|
-
textKey: "idv2.permissions.learnMorePage.instructions.1"
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
icon: te,
|
|
183
|
-
textKey: "idv2.permissions.learnMorePage.instructions.2"
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
icon: re,
|
|
187
|
-
textKey: "idv2.permissions.learnMorePage.instructions.3"
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
icon: oe,
|
|
191
|
-
textKey: "idv2.permissions.learnMorePage.instructions.4"
|
|
192
|
-
}
|
|
193
|
-
], de = ({
|
|
194
|
-
onAllowPermissions: i,
|
|
195
|
-
onQuitProcess: n
|
|
196
|
-
}) => {
|
|
197
|
-
const { t } = d();
|
|
198
|
-
return /* @__PURE__ */ e(u, { className: "IncodeLearnMorePage", hideHeader: !0, children: [
|
|
199
|
-
/* @__PURE__ */ e(c, { size: 40 }),
|
|
200
|
-
/* @__PURE__ */ e("div", { class: "IncodeLearnMoreContainer", children: [
|
|
201
|
-
/* @__PURE__ */ e(
|
|
202
|
-
"img",
|
|
203
|
-
{
|
|
204
|
-
src: ce,
|
|
205
|
-
alt: t("idv2.permissions.learnMorePage.warning"),
|
|
206
|
-
class: "IncodeLearnMoreImage"
|
|
207
|
-
}
|
|
208
|
-
),
|
|
209
|
-
/* @__PURE__ */ e(c, { size: 12 }),
|
|
210
|
-
/* @__PURE__ */ e("p", { class: "IncodeLearnMoreTitle", children: t("idv2.permissions.learnMorePage.title") }),
|
|
211
|
-
/* @__PURE__ */ e(c, { size: 32 }),
|
|
212
|
-
/* @__PURE__ */ e("div", { class: "IncodeLearnMoreInstructions", children: ae.map((s) => /* @__PURE__ */ e("div", { class: "IncodeLearnMoreInstruction", children: [
|
|
213
|
-
/* @__PURE__ */ e("div", { class: "IncodeLearnMoreInstructionIcon", children: /* @__PURE__ */ e(
|
|
214
|
-
"img",
|
|
215
|
-
{
|
|
216
|
-
src: s.icon,
|
|
217
|
-
alt: "",
|
|
218
|
-
class: "IncodeLearnMoreInstructionIconImage"
|
|
219
|
-
}
|
|
220
|
-
) }),
|
|
221
|
-
/* @__PURE__ */ e("span", { class: "IncodeLearnMoreInstructionText", children: t(s.textKey) })
|
|
222
|
-
] }, s.textKey)) })
|
|
223
|
-
] }),
|
|
224
|
-
/* @__PURE__ */ e("div", { class: "IncodeLearnMoreActions", children: [
|
|
225
|
-
/* @__PURE__ */ e(C, { onClick: i, children: t("idv2.permissions.learnMorePage.allowPermissions") }),
|
|
226
|
-
/* @__PURE__ */ e(c, { size: 12 }),
|
|
227
|
-
/* @__PURE__ */ e(C, { variant: "link", onClick: n, children: t("idv2.permissions.learnMorePage.quitProcess") })
|
|
228
|
-
] })
|
|
229
|
-
] });
|
|
230
|
-
}, le = ({
|
|
231
|
-
manager: i,
|
|
232
|
-
permissionStatus: n
|
|
233
|
-
}) => {
|
|
234
|
-
const { t } = d();
|
|
235
|
-
return n === "requesting" ? /* @__PURE__ */ e(u, { className: "IncodePermissionsRequestingPage", hideHeader: !0 }) : n === "learnMore" ? /* @__PURE__ */ e(
|
|
236
|
-
de,
|
|
237
|
-
{
|
|
238
|
-
onAllowPermissions: () => i.requestPermission(),
|
|
239
|
-
onQuitProcess: () => i.close()
|
|
240
|
-
}
|
|
241
|
-
) : n === "denied" ? /* @__PURE__ */ e(ne, { onRefresh: () => window.location.reload() }) : /* @__PURE__ */ e(
|
|
242
|
-
u,
|
|
243
|
-
{
|
|
244
|
-
className: "IncodePermissionsPage",
|
|
245
|
-
title: t("idv2.permissions.allowPermissionsV2"),
|
|
246
|
-
subtitle: t("idv2.permissions.inOrderToCompleteTheProcess"),
|
|
247
|
-
hideHeader: !0,
|
|
248
|
-
children: [
|
|
249
|
-
/* @__PURE__ */ e(c, { size: 40 }),
|
|
250
|
-
/* @__PURE__ */ e("div", { class: "IncodePermissionsImageContainer", children: /* @__PURE__ */ e(
|
|
251
|
-
"img",
|
|
252
|
-
{
|
|
253
|
-
src: V,
|
|
254
|
-
alt: t("idv2.permissions.alertAlt"),
|
|
255
|
-
class: "IncodePermissionsImage"
|
|
256
|
-
}
|
|
257
|
-
) }),
|
|
258
|
-
/* @__PURE__ */ e(c, { size: 24 }),
|
|
259
|
-
/* @__PURE__ */ e("div", { class: "IncodePermissionsActions", children: [
|
|
260
|
-
/* @__PURE__ */ e(C, { onClick: () => i.requestPermission(), children: t("idv2.permissions.allowPermissions") }),
|
|
261
|
-
/* @__PURE__ */ e(c, { size: 12 }),
|
|
262
|
-
/* @__PURE__ */ e(C, { variant: "link", onClick: () => i.goToLearnMore(), children: t("idv2.permissions.learnMore") }),
|
|
263
|
-
/* @__PURE__ */ e(c, { size: 16 })
|
|
264
|
-
] })
|
|
265
|
-
]
|
|
266
|
-
}
|
|
267
|
-
);
|
|
268
|
-
}, S = ({
|
|
269
|
-
title: i,
|
|
270
|
-
description: n,
|
|
271
|
-
attemptsText: t,
|
|
272
|
-
buttonText: s,
|
|
273
|
-
icon: o,
|
|
274
|
-
onButtonClick: r
|
|
275
|
-
}) => /* @__PURE__ */ e("div", { class: "IncodeErrorModalContent", children: /* @__PURE__ */ e(u, { "data-testid": "face-capture-error-modal", children: /* @__PURE__ */ e("div", { class: "IncodeErrorModalContentContainer", children: [
|
|
276
|
-
/* @__PURE__ */ e("div", { class: "IncodeErrorModalContentIconContainer", children: [
|
|
277
|
-
o,
|
|
278
|
-
/* @__PURE__ */ e(c, { size: 24 }),
|
|
279
|
-
/* @__PURE__ */ e("h2", { class: "IncodeErrorModalContentTitle", children: i }),
|
|
280
|
-
/* @__PURE__ */ e(c, { size: 16 }),
|
|
281
|
-
/* @__PURE__ */ e("p", { class: "IncodeErrorModalContentDescription", children: n })
|
|
282
|
-
] }),
|
|
283
|
-
/* @__PURE__ */ e("div", { class: "IncodeErrorModalContentAttemptsContainer", children: [
|
|
284
|
-
/* @__PURE__ */ e("p", { class: "IncodeErrorModalContentAttemptsText", children: t }),
|
|
285
|
-
/* @__PURE__ */ e(c, { size: 24 }),
|
|
286
|
-
/* @__PURE__ */ e(C, { onClick: r, children: s })
|
|
287
|
-
] })
|
|
288
|
-
] }) }) }), ue = () => /* @__PURE__ */ e(
|
|
289
|
-
"svg",
|
|
290
|
-
{
|
|
291
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
292
|
-
width: "32",
|
|
293
|
-
height: "32",
|
|
294
|
-
viewBox: "0 0 32 32",
|
|
295
|
-
fill: "none",
|
|
296
|
-
children: [
|
|
297
|
-
/* @__PURE__ */ e("title", { children: "Error" }),
|
|
298
|
-
/* @__PURE__ */ e(
|
|
299
|
-
"path",
|
|
300
|
-
{
|
|
301
|
-
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",
|
|
302
|
-
fill: "var(--surface-status-negative-600)"
|
|
303
|
-
}
|
|
304
|
-
)
|
|
305
|
-
]
|
|
306
|
-
}
|
|
307
|
-
), pe = ({
|
|
308
|
-
title: i,
|
|
309
|
-
onContinue: n
|
|
310
|
-
}) => {
|
|
311
|
-
const { t } = d();
|
|
312
|
-
return /* @__PURE__ */ e(
|
|
313
|
-
S,
|
|
314
|
-
{
|
|
315
|
-
title: i,
|
|
316
|
-
description: t("notifications.selfieCaptureFailedDescription"),
|
|
317
|
-
attemptsText: t("notifications.noAttemptsRemaining") ?? "No attempts remaining",
|
|
318
|
-
buttonText: t("common.continue") ?? "Continue",
|
|
319
|
-
icon: /* @__PURE__ */ e(ue, {}),
|
|
320
|
-
onButtonClick: n
|
|
321
|
-
}
|
|
322
|
-
);
|
|
323
|
-
}, Ce = () => /* @__PURE__ */ e(
|
|
324
|
-
"svg",
|
|
325
|
-
{
|
|
326
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
327
|
-
width: "32",
|
|
328
|
-
height: "32",
|
|
329
|
-
viewBox: "0 0 32 32",
|
|
330
|
-
fill: "none",
|
|
331
|
-
children: [
|
|
332
|
-
/* @__PURE__ */ e("title", { children: "Warning" }),
|
|
333
|
-
/* @__PURE__ */ e("g", { clipPath: "url(#clip0)", children: /* @__PURE__ */ e(
|
|
334
|
-
"path",
|
|
335
|
-
{
|
|
336
|
-
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",
|
|
337
|
-
fill: "var(--surface-status-warning-500)"
|
|
338
|
-
}
|
|
339
|
-
) }),
|
|
340
|
-
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ e("clipPath", { id: "clip0", children: /* @__PURE__ */ e("rect", { width: "32", height: "32", fill: "white" }) }) })
|
|
341
|
-
]
|
|
342
|
-
}
|
|
343
|
-
), he = ({
|
|
344
|
-
title: i,
|
|
345
|
-
description: n,
|
|
346
|
-
attemptsRemaining: t,
|
|
347
|
-
onTryAgain: s
|
|
348
|
-
}) => {
|
|
349
|
-
const { t: o } = d();
|
|
350
|
-
return /* @__PURE__ */ e(
|
|
351
|
-
S,
|
|
352
|
-
{
|
|
353
|
-
title: i,
|
|
354
|
-
description: o(n),
|
|
355
|
-
attemptsText: o("common.attemptsRemaining", { count: t }) ?? `Attempts remaining: ${t}`,
|
|
356
|
-
buttonText: o("common.tryAgain") ?? "Try Again",
|
|
357
|
-
icon: /* @__PURE__ */ e(Ce, {}),
|
|
358
|
-
onButtonClick: s
|
|
359
|
-
}
|
|
360
|
-
);
|
|
361
|
-
}, h = {
|
|
362
|
-
title: "Something went wrong",
|
|
363
|
-
description: "Please try again later"
|
|
364
|
-
}, me = {
|
|
365
|
-
MASK_ERROR: {
|
|
366
|
-
title: "notifications.mask",
|
|
367
|
-
description: "notifications.maskDescription"
|
|
368
|
-
},
|
|
369
|
-
BRIGHTNESS_ERROR: {
|
|
370
|
-
title: "notifications.brightness",
|
|
371
|
-
description: "notifications.brightnessDescription"
|
|
372
|
-
},
|
|
373
|
-
LIVENESS_ERROR: {
|
|
374
|
-
title: "notifications.spoof",
|
|
375
|
-
description: "notifications.spoofDescription"
|
|
376
|
-
},
|
|
377
|
-
CLOSED_EYES_ERROR: {
|
|
378
|
-
title: "notifications.closedEyes",
|
|
379
|
-
description: "notifications.closedEyesDescription"
|
|
380
|
-
},
|
|
381
|
-
HEAD_COVER_ERROR: {
|
|
382
|
-
title: "notifications.removeHeadwear",
|
|
383
|
-
description: "notifications.removeHeadwearDescription"
|
|
384
|
-
},
|
|
385
|
-
LENSES_ERROR: {
|
|
386
|
-
title: "notifications.lenses",
|
|
387
|
-
description: "notifications.lensesDescription"
|
|
388
|
-
},
|
|
389
|
-
FACE_NOT_FOUND: {
|
|
390
|
-
title: "notifications.faceNotFound",
|
|
391
|
-
description: "notifications.faceNotFoundDescription"
|
|
392
|
-
},
|
|
393
|
-
MULTIPLE_FACES: {
|
|
394
|
-
title: "notifications.multiple",
|
|
395
|
-
description: "notifications.multipleDescription"
|
|
396
|
-
},
|
|
397
|
-
TOO_BLURRY_ERROR: h,
|
|
398
|
-
TOO_DARK_ERROR: h,
|
|
399
|
-
SERVER_ERROR: h,
|
|
400
|
-
FACE_CROPPING_FAILED: h,
|
|
401
|
-
FACE_TOO_SMALL: h,
|
|
402
|
-
PROCESSING_ERROR: h,
|
|
403
|
-
BAD_REQUEST: h,
|
|
404
|
-
USER_IS_NOT_RECOGNIZED: {
|
|
405
|
-
title: "notifications.accessDenied",
|
|
406
|
-
description: "notifications.accessDeniedDescription"
|
|
407
|
-
},
|
|
408
|
-
SPOOF_ATTEMPT_DETECTED: {
|
|
409
|
-
title: "notifications.spoof",
|
|
410
|
-
description: "notifications.spoofDescription"
|
|
411
|
-
},
|
|
412
|
-
FACE_TOO_DARK: {
|
|
413
|
-
title: "notifications.brightness",
|
|
414
|
-
description: "notifications.brightnessDescription"
|
|
415
|
-
},
|
|
416
|
-
LENSES_DETECTED: {
|
|
417
|
-
title: "notifications.lenses",
|
|
418
|
-
description: "notifications.lensesDescription"
|
|
419
|
-
},
|
|
420
|
-
FACE_MASK_DETECTED: {
|
|
421
|
-
title: "notifications.mask",
|
|
422
|
-
description: "notifications.maskDescription"
|
|
423
|
-
},
|
|
424
|
-
CLOSED_EYES_DETECTED: {
|
|
425
|
-
title: "notifications.closedEyes",
|
|
426
|
-
description: "notifications.closedEyesDescription"
|
|
427
|
-
},
|
|
428
|
-
HEAD_COVER_DETECTED: {
|
|
429
|
-
title: "notifications.removeHeadwear",
|
|
430
|
-
description: "notifications.removeHeadwearDescription"
|
|
431
|
-
},
|
|
432
|
-
FACE_TOO_BLURRY: {
|
|
433
|
-
title: "notifications.spoof",
|
|
434
|
-
description: "notifications.spoofDescription"
|
|
435
|
-
},
|
|
436
|
-
BAD_PHOTO_QUALITY: {
|
|
437
|
-
title: "notifications.lowQualityImage",
|
|
438
|
-
description: "notifications.lowQualityImageDescription"
|
|
439
|
-
},
|
|
440
|
-
NONEXISTENT_CUSTOMER: {
|
|
441
|
-
title: "notifications.nonexistentCustomer",
|
|
442
|
-
description: "notifications.nonexistentCustomerDescription"
|
|
443
|
-
},
|
|
444
|
-
HINT_NOT_PROVIDED: {
|
|
445
|
-
title: "notifications.hintNotProvided",
|
|
446
|
-
description: "notifications.hintNotProvidedDescription"
|
|
447
|
-
},
|
|
448
|
-
SELFIE_IMAGE_LOW_QUALITY: {
|
|
449
|
-
title: "notifications.selfieImageLowQuality",
|
|
450
|
-
description: "notifications.selfieImageLowQualityDescription"
|
|
451
|
-
}
|
|
452
|
-
}, fe = [
|
|
453
|
-
"LIVENESS_ERROR",
|
|
454
|
-
"BRIGHTNESS_ERROR",
|
|
455
|
-
"LENSES_ERROR",
|
|
456
|
-
"MASK_ERROR",
|
|
457
|
-
"CLOSED_EYES_ERROR",
|
|
458
|
-
"HEAD_COVER_ERROR",
|
|
459
|
-
"SERVER_ERROR",
|
|
460
|
-
"FACE_NOT_FOUND",
|
|
461
|
-
"MULTIPLE_FACES",
|
|
462
|
-
"TOO_BLURRY_ERROR",
|
|
463
|
-
"TOO_DARK_ERROR",
|
|
464
|
-
"USER_IS_NOT_RECOGNIZED",
|
|
465
|
-
"SPOOF_ATTEMPT_DETECTED",
|
|
466
|
-
"FACE_TOO_DARK",
|
|
467
|
-
"LENSES_DETECTED",
|
|
468
|
-
"FACE_MASK_DETECTED",
|
|
469
|
-
"CLOSED_EYES_DETECTED",
|
|
470
|
-
"HEAD_COVER_DETECTED",
|
|
471
|
-
"FACE_CROPPING_FAILED",
|
|
472
|
-
"FACE_TOO_SMALL",
|
|
473
|
-
"FACE_TOO_BLURRY",
|
|
474
|
-
"BAD_PHOTO_QUALITY",
|
|
475
|
-
"PROCESSING_ERROR",
|
|
476
|
-
"BAD_REQUEST",
|
|
477
|
-
"NONEXISTENT_CUSTOMER",
|
|
478
|
-
"HINT_NOT_PROVIDED",
|
|
479
|
-
"SELFIE_IMAGE_LOW_QUALITY"
|
|
480
|
-
], ge = (i) => {
|
|
481
|
-
const n = i.toUpperCase();
|
|
482
|
-
if (n.includes("HTTP 400") || n.includes("BAD_REQUEST"))
|
|
483
|
-
return "BAD_REQUEST";
|
|
484
|
-
if (n.includes("HTTP 500") || n.includes("SERVER_ERROR"))
|
|
485
|
-
return "SERVER_ERROR";
|
|
486
|
-
for (const t of fe)
|
|
487
|
-
if (n.includes(t))
|
|
488
|
-
return t;
|
|
489
|
-
return null;
|
|
490
|
-
}, L = ({
|
|
491
|
-
error: i,
|
|
492
|
-
attemptsRemaining: n,
|
|
493
|
-
onTryAgain: t,
|
|
494
|
-
onContinue: s
|
|
495
|
-
}) => {
|
|
496
|
-
const { t: o } = d();
|
|
497
|
-
if (!i) return null;
|
|
498
|
-
const a = ge(i) ?? i, { title: l, description: p } = me[a] ?? h, m = n <= 0, f = o(l) ?? l;
|
|
499
|
-
return m ? /* @__PURE__ */ e(pe, { title: f, onContinue: s }) : /* @__PURE__ */ e(
|
|
500
|
-
he,
|
|
501
|
-
{
|
|
502
|
-
title: f,
|
|
503
|
-
description: p,
|
|
504
|
-
attemptsRemaining: n,
|
|
505
|
-
onTryAgain: t
|
|
506
|
-
}
|
|
507
|
-
);
|
|
508
|
-
}, Ee = () => /* @__PURE__ */ e(
|
|
509
|
-
"svg",
|
|
510
|
-
{
|
|
511
|
-
width: "292",
|
|
512
|
-
height: "272",
|
|
513
|
-
viewBox: "0 0 292 272",
|
|
514
|
-
fill: "none",
|
|
515
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
516
|
-
class: "IncodeFaceOutline",
|
|
517
|
-
children: [
|
|
518
|
-
/* @__PURE__ */ e("title", { children: "Outline" }),
|
|
519
|
-
/* @__PURE__ */ e(
|
|
520
|
-
"path",
|
|
521
|
-
{
|
|
522
|
-
opacity: "0.8",
|
|
523
|
-
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",
|
|
524
|
-
fill: "white"
|
|
525
|
-
}
|
|
526
|
-
)
|
|
527
|
-
]
|
|
528
|
-
}
|
|
529
|
-
), Ie = (i) => {
|
|
530
|
-
switch (i) {
|
|
531
|
-
case "success":
|
|
532
|
-
case "capturing":
|
|
533
|
-
return "var(--surface-status-positive-600)";
|
|
534
|
-
case "loading":
|
|
535
|
-
return "var(--surface-brand-500)";
|
|
536
|
-
case "error":
|
|
537
|
-
return "var(--surface-status-negative-600)";
|
|
538
|
-
case "idle":
|
|
539
|
-
return "var(--surface-neutral-100)";
|
|
540
|
-
}
|
|
541
|
-
}, ve = ({
|
|
542
|
-
borderState: i = "idle"
|
|
543
|
-
}) => {
|
|
544
|
-
const n = K(), t = i === "loading" || i === "capturing", s = Ie(i), o = t ? `url(#${n})` : s;
|
|
545
|
-
return /* @__PURE__ */ e(
|
|
546
|
-
"div",
|
|
547
|
-
{
|
|
548
|
-
class: _("IncodeLoadingBorder", {
|
|
549
|
-
IncodeLoadingBorderSpinning: t
|
|
550
|
-
}),
|
|
551
|
-
children: /* @__PURE__ */ e(
|
|
552
|
-
"svg",
|
|
553
|
-
{
|
|
554
|
-
width: "100%",
|
|
555
|
-
height: "100%",
|
|
556
|
-
viewBox: "0 0 335 335",
|
|
557
|
-
fill: "none",
|
|
558
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
559
|
-
children: [
|
|
560
|
-
/* @__PURE__ */ e("title", { children: "Loading Border" }),
|
|
561
|
-
/* @__PURE__ */ e(
|
|
562
|
-
"path",
|
|
563
|
-
{
|
|
564
|
-
"fill-rule": "evenodd",
|
|
565
|
-
"clip-rule": "evenodd",
|
|
566
|
-
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",
|
|
567
|
-
class: "IncodeLoadingBorderPath",
|
|
568
|
-
fill: o
|
|
569
|
-
}
|
|
570
|
-
),
|
|
571
|
-
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ e(
|
|
572
|
-
"radialGradient",
|
|
573
|
-
{
|
|
574
|
-
id: n,
|
|
575
|
-
cx: "0",
|
|
576
|
-
cy: "0",
|
|
577
|
-
r: "1",
|
|
578
|
-
gradientUnits: "userSpaceOnUse",
|
|
579
|
-
gradientTransform: "translate(240.418 17.4369) rotate(115.674) scale(167.087)",
|
|
580
|
-
children: [
|
|
581
|
-
/* @__PURE__ */ e("stop", { "stop-color": s }),
|
|
582
|
-
/* @__PURE__ */ e("stop", { offset: "1", "stop-color": s, "stop-opacity": "0" })
|
|
583
|
-
]
|
|
584
|
-
}
|
|
585
|
-
) })
|
|
586
|
-
]
|
|
587
|
-
}
|
|
588
|
-
)
|
|
589
|
-
}
|
|
590
|
-
);
|
|
591
|
-
}, Te = () => /* @__PURE__ */ e("div", { class: "IncodeCameraButton", children: /* @__PURE__ */ e(
|
|
592
|
-
"svg",
|
|
593
|
-
{
|
|
594
|
-
width: "64",
|
|
595
|
-
height: "64",
|
|
596
|
-
viewBox: "0 0 64 64",
|
|
597
|
-
fill: "none",
|
|
598
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
599
|
-
"aria-hidden": "true",
|
|
600
|
-
children: [
|
|
601
|
-
/* @__PURE__ */ e(
|
|
602
|
-
"path",
|
|
603
|
-
{
|
|
604
|
-
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",
|
|
605
|
-
class: "IncodeCameraButtonBackground"
|
|
606
|
-
}
|
|
607
|
-
),
|
|
608
|
-
/* @__PURE__ */ e(
|
|
609
|
-
"path",
|
|
610
|
-
{
|
|
611
|
-
fillRule: "evenodd",
|
|
612
|
-
clipRule: "evenodd",
|
|
613
|
-
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",
|
|
614
|
-
class: "IncodeCameraButtonPath"
|
|
615
|
-
}
|
|
616
|
-
),
|
|
617
|
-
/* @__PURE__ */ e(
|
|
618
|
-
"path",
|
|
619
|
-
{
|
|
620
|
-
fillRule: "evenodd",
|
|
621
|
-
clipRule: "evenodd",
|
|
622
|
-
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",
|
|
623
|
-
class: "IncodeCameraButtonPath"
|
|
624
|
-
}
|
|
625
|
-
)
|
|
626
|
-
]
|
|
627
|
-
}
|
|
628
|
-
) }), Re = ({
|
|
629
|
-
onClick: i,
|
|
630
|
-
disabled: n
|
|
631
|
-
}) => {
|
|
632
|
-
const { t } = d();
|
|
633
|
-
return /* @__PURE__ */ e("div", { class: "IncodeManualCaptureButton", "data-testid": "manual-capture-button", children: [
|
|
634
|
-
/* @__PURE__ */ e("p", { class: "IncodeManualCaptureButtonText", children: t("selfiev2.manualCapture.instructions") }),
|
|
635
|
-
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
636
|
-
C,
|
|
637
|
-
{
|
|
638
|
-
variant: "link",
|
|
639
|
-
onClick: i,
|
|
640
|
-
disabled: n,
|
|
641
|
-
class: "IncodeManualCaptureButtonButton",
|
|
642
|
-
children: /* @__PURE__ */ e(Te, {})
|
|
643
|
-
}
|
|
644
|
-
) })
|
|
645
|
-
] });
|
|
646
|
-
}, Le = ({ detectionState: i }) => {
|
|
647
|
-
const { t: n } = d(), s = {
|
|
648
|
-
noFace: n("notifications.faceNotFound"),
|
|
649
|
-
tooManyFaces: n("notifications.tooManyFaces"),
|
|
650
|
-
tooClose: n("notifications.moveAway"),
|
|
651
|
-
tooFar: n("notifications.moveCloser"),
|
|
652
|
-
blur: n("notifications.onBlur"),
|
|
653
|
-
dark: n("notifications.onDark"),
|
|
654
|
-
faceAngle: n("notifications.onFaceAngleV2"),
|
|
655
|
-
headWear: n("notifications.removeHeadwear"),
|
|
656
|
-
lenses: n("notifications.removeLenses"),
|
|
657
|
-
eyesClosed: n("notifications.eyesClosed"),
|
|
658
|
-
faceMask: n("notifications.mask"),
|
|
659
|
-
centerFace: n("notifications.centerFaceV2"),
|
|
660
|
-
getReady: n("notifications.getReady")
|
|
661
|
-
}[i];
|
|
662
|
-
return s ? /* @__PURE__ */ e("div", { class: "IncodeNotification", children: /* @__PURE__ */ e("p", { class: "IncodeNotificationText", children: s }) }) : null;
|
|
663
|
-
}, De = ({ manager: i, state: n, onFinish: t }) => {
|
|
664
|
-
const {
|
|
665
|
-
captureStatus: s,
|
|
666
|
-
stream: o,
|
|
667
|
-
detectionStatus: r,
|
|
668
|
-
attemptsRemaining: a,
|
|
669
|
-
uploadError: l
|
|
670
|
-
} = n, [p, m] = v(!1), { t: f } = d();
|
|
671
|
-
return s === "initializing" ? /* @__PURE__ */ e(
|
|
672
|
-
u,
|
|
673
|
-
{
|
|
674
|
-
className: "IncodeCaptureInitializingPage",
|
|
675
|
-
title: "Initializing Camera",
|
|
676
|
-
subtitle: "Please wait...",
|
|
677
|
-
children: /* @__PURE__ */ e(
|
|
678
|
-
"div",
|
|
679
|
-
{
|
|
680
|
-
style: {
|
|
681
|
-
display: "flex",
|
|
682
|
-
justifyContent: "center",
|
|
683
|
-
marginTop: "auto"
|
|
684
|
-
},
|
|
685
|
-
children: /* @__PURE__ */ e(C, { isLoading: !0, children: "Initializing..." })
|
|
686
|
-
}
|
|
687
|
-
)
|
|
688
|
-
}
|
|
689
|
-
) : s === "detecting" ? r === "offline" ? /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e("div", { class: "flex flex-col items-center justify-center h-full", children: /* @__PURE__ */ e("p", { class: "text-text-body-primary", children: "No internet connection" }) }) }) : /* @__PURE__ */ e(u, { "data-testid": "capture-container", children: [
|
|
690
|
-
/* @__PURE__ */ e(c, { size: 48 }),
|
|
691
|
-
/* @__PURE__ */ e("div", { class: "IncodeCaptureContainer", children: [
|
|
692
|
-
/* @__PURE__ */ e(ve, { borderState: p ? "capturing" : r === "detecting" ? "idle" : r === "getReady" ? "loading" : r === "success" ? "success" : r === "error" ? "error" : "idle" }),
|
|
693
|
-
/* @__PURE__ */ e("div", { class: "IncodeCaptureFrame", children: /* @__PURE__ */ e("div", { class: "IncodeCaptureVideoWrapper", children: o ? /* @__PURE__ */ e(E, { children: [
|
|
694
|
-
/* @__PURE__ */ e(Se, { stream: o }),
|
|
695
|
-
/* @__PURE__ */ e("div", { class: "IncodeCaptureVideo", children: /* @__PURE__ */ e(Ee, {}) })
|
|
696
|
-
] }) : null }) }),
|
|
697
|
-
/* @__PURE__ */ e(c, { size: 48 }),
|
|
698
|
-
r ? /* @__PURE__ */ e(E, { children: [
|
|
699
|
-
/* @__PURE__ */ e(Le, { detectionState: r }),
|
|
700
|
-
/* @__PURE__ */ e(c, { size: 24 })
|
|
701
|
-
] }) : null,
|
|
702
|
-
r === "manualCapture" ? /* @__PURE__ */ e(
|
|
703
|
-
Re,
|
|
704
|
-
{
|
|
705
|
-
onClick: () => {
|
|
706
|
-
m(!0), i.capture();
|
|
707
|
-
},
|
|
708
|
-
disabled: p
|
|
709
|
-
}
|
|
710
|
-
) : null
|
|
711
|
-
] }),
|
|
712
|
-
l ? /* @__PURE__ */ e(
|
|
713
|
-
L,
|
|
714
|
-
{
|
|
715
|
-
error: l,
|
|
716
|
-
attemptsRemaining: a,
|
|
717
|
-
onTryAgain: () => {
|
|
718
|
-
i.retryCapture(), m(!1);
|
|
719
|
-
},
|
|
720
|
-
onContinue: t
|
|
721
|
-
}
|
|
722
|
-
) : null
|
|
723
|
-
] }) : s === "capturing" ? /* @__PURE__ */ e(
|
|
724
|
-
u,
|
|
725
|
-
{
|
|
726
|
-
className: "IncodeCaptureCapturingPage",
|
|
727
|
-
title: "Capturing",
|
|
728
|
-
subtitle: "Taking photo...",
|
|
729
|
-
children: /* @__PURE__ */ e(
|
|
730
|
-
"div",
|
|
731
|
-
{
|
|
732
|
-
style: {
|
|
733
|
-
display: "flex",
|
|
734
|
-
justifyContent: "center",
|
|
735
|
-
marginTop: "auto"
|
|
736
|
-
},
|
|
737
|
-
children: /* @__PURE__ */ e(C, { isLoading: !0, children: "Capturing..." })
|
|
738
|
-
}
|
|
739
|
-
)
|
|
740
|
-
}
|
|
741
|
-
) : s === "uploading" ? /* @__PURE__ */ e(_e, {}) : s === "uploadError" ? /* @__PURE__ */ e(
|
|
742
|
-
L,
|
|
743
|
-
{
|
|
744
|
-
error: l,
|
|
745
|
-
attemptsRemaining: a,
|
|
746
|
-
onTryAgain: () => {
|
|
747
|
-
i.retryCapture(), m(!1);
|
|
748
|
-
},
|
|
749
|
-
onContinue: t
|
|
750
|
-
}
|
|
751
|
-
) : s === "success" ? /* @__PURE__ */ e(u, { className: "IncodeCaptureSuccessPage", children: /* @__PURE__ */ e("div", { class: "IncodeCaptureSuccessContainer", children: [
|
|
752
|
-
/* @__PURE__ */ e(c, { size: 160 }),
|
|
753
|
-
/* @__PURE__ */ e(F, { size: 64 }),
|
|
754
|
-
/* @__PURE__ */ e(c, { size: 16 }),
|
|
755
|
-
/* @__PURE__ */ e(A, { children: f("idv2.capture.processing.success") })
|
|
756
|
-
] }) }) : null;
|
|
757
|
-
}, Se = ({ stream: i }) => {
|
|
758
|
-
const n = T(null);
|
|
759
|
-
return I(() => {
|
|
760
|
-
n.current && i && (n.current.srcObject = i);
|
|
761
|
-
}, [i]), /* @__PURE__ */ e(
|
|
762
|
-
"video",
|
|
763
|
-
{
|
|
764
|
-
ref: n,
|
|
765
|
-
autoplay: !0,
|
|
766
|
-
playsInline: !0,
|
|
767
|
-
muted: !0,
|
|
768
|
-
class: "IncodeCaptureVideoElement"
|
|
769
|
-
}
|
|
770
|
-
);
|
|
771
|
-
}, _e = () => {
|
|
772
|
-
const { t: i } = d();
|
|
773
|
-
return /* @__PURE__ */ e(u, { className: "IncodeCaptureUploadingPage", children: /* @__PURE__ */ e("div", { class: "IncodeCaptureUploadingContainer", children: [
|
|
774
|
-
/* @__PURE__ */ e(c, { size: 160 }),
|
|
775
|
-
/* @__PURE__ */ e("div", { class: "IncodeCaptureUploadingIconContainer", children: /* @__PURE__ */ e(w, { size: 64 }) }),
|
|
776
|
-
/* @__PURE__ */ e(c, { size: 16 }),
|
|
777
|
-
/* @__PURE__ */ e("h2", { class: "IncodeCaptureUploadingTitle", children: i("idv2.capture.processing.uploading") })
|
|
778
|
-
] }) });
|
|
779
|
-
};
|
|
780
|
-
let g = null;
|
|
781
|
-
function we() {
|
|
782
|
-
return g || (g = new Promise((i, n) => {
|
|
783
|
-
const t = document.createElement("script");
|
|
784
|
-
t.src = "https://cdn.jsdelivr.net/npm/lottie-web@5.13.0/build/player/lottie_light.min.js", t.onload = () => i(window.lottie), t.onerror = n, document.head.appendChild(t);
|
|
785
|
-
}), g);
|
|
1
|
+
import { _ as e, v as t } from "../vendor-preact-D6SntenC.js";
|
|
2
|
+
import { o as n } from "../hooks-BVnGysT7.js";
|
|
3
|
+
import { t as r } from "../incodeComponent-C1o4M0ZK.js";
|
|
4
|
+
import { t as i } from "../transitionSpinner-PIEPU2Vx.js";
|
|
5
|
+
import { t as a } from "../processing-G_y3o32b.js";
|
|
6
|
+
import { n as o, r as s, t as c } from "../tutorial-9vHAHvMK.js";
|
|
7
|
+
import { t as l } from "../incodeModule-BqCjVgEI.js";
|
|
8
|
+
import { createSelfieManager as u } from "@incodetech/core/selfie";
|
|
9
|
+
//#region src/modules/selfie/preloadTutorialAssets.ts
|
|
10
|
+
var d = !1;
|
|
11
|
+
function f() {
|
|
12
|
+
d || (d = !0, import("../selfieTutorial-BgrlUMXP.js"));
|
|
786
13
|
}
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
};
|
|
818
|
-
}, [r]), /* @__PURE__ */ e("div", { ref: a, style: s, className: o });
|
|
819
|
-
}
|
|
820
|
-
const Me = ({
|
|
821
|
-
animationData: i,
|
|
822
|
-
title: n,
|
|
823
|
-
subtitle: t,
|
|
824
|
-
onContinue: s,
|
|
825
|
-
buttonText: o,
|
|
826
|
-
disclaimerText: r,
|
|
827
|
-
isLoading: a
|
|
828
|
-
}) => {
|
|
829
|
-
const l = P("--surface-brand-500");
|
|
830
|
-
return /* @__PURE__ */ e(u, { className: "IncodeTutorialPage", title: n, subtitle: t, children: [
|
|
831
|
-
/* @__PURE__ */ e("div", { class: "IncodeBaseTutorialContainer", children: /* @__PURE__ */ e("div", { class: "IncodeBaseTutorialAnimationContainer", children: /* @__PURE__ */ e(
|
|
832
|
-
Oe,
|
|
833
|
-
{
|
|
834
|
-
animationData: x(
|
|
835
|
-
i,
|
|
836
|
-
l ?? "#006aff"
|
|
837
|
-
),
|
|
838
|
-
className: "IncodeBaseTutorialAnimation"
|
|
839
|
-
}
|
|
840
|
-
) }) }),
|
|
841
|
-
/* @__PURE__ */ e("div", { children: [
|
|
842
|
-
/* @__PURE__ */ e("p", { class: "IncodeBaseTutorialDisclaimer", children: r }),
|
|
843
|
-
/* @__PURE__ */ e("div", { class: "IncodeBaseTutorialButtonContainer", children: /* @__PURE__ */ e(
|
|
844
|
-
C,
|
|
845
|
-
{
|
|
846
|
-
onClick: s,
|
|
847
|
-
class: "max-w-[420px] m-auto",
|
|
848
|
-
isLoading: a,
|
|
849
|
-
children: o
|
|
850
|
-
}
|
|
851
|
-
) })
|
|
852
|
-
] })
|
|
853
|
-
] });
|
|
854
|
-
}, ye = ({ manager: i }) => {
|
|
855
|
-
const { t: n } = d(), [t, s] = v(!1), [o, r] = v(null);
|
|
856
|
-
I(() => {
|
|
857
|
-
import("../selfieTutorial-C-u5GufD.js").then((l) => {
|
|
858
|
-
r(l.default);
|
|
859
|
-
});
|
|
860
|
-
}, []);
|
|
861
|
-
const a = () => {
|
|
862
|
-
s(!0), i.nextStep();
|
|
863
|
-
};
|
|
864
|
-
return o ? /* @__PURE__ */ e(
|
|
865
|
-
Me,
|
|
866
|
-
{
|
|
867
|
-
animationData: o,
|
|
868
|
-
title: n("face.tutorial.title"),
|
|
869
|
-
subtitle: n("face.tutorial.subtitle"),
|
|
870
|
-
onContinue: a,
|
|
871
|
-
buttonText: n("face.tutorial.startCapture"),
|
|
872
|
-
disclaimerText: n("face.tutorial.autoCapture"),
|
|
873
|
-
isLoading: t
|
|
874
|
-
}
|
|
875
|
-
) : null;
|
|
876
|
-
}, Ae = ({
|
|
877
|
-
config: i,
|
|
878
|
-
onFinish: n,
|
|
879
|
-
onError: t
|
|
880
|
-
}) => {
|
|
881
|
-
const [s, o] = M(() => y({ config: i }));
|
|
882
|
-
return s.status === "idle" || s.status === "loading" ? null : s.status === "tutorial" ? /* @__PURE__ */ e(ye, { manager: o }) : s.status === "permissions" ? /* @__PURE__ */ e(
|
|
883
|
-
le,
|
|
884
|
-
{
|
|
885
|
-
manager: o,
|
|
886
|
-
permissionStatus: s.permissionStatus
|
|
887
|
-
}
|
|
888
|
-
) : s.status === "capture" ? /* @__PURE__ */ e(De, { manager: o, state: s, onFinish: () => n?.() }) : s.status === "finished" ? (n?.(), null) : s.status === "closed" ? (t?.(void 0), null) : (s.status === "error" && t?.(s.error), null);
|
|
889
|
-
}, Pe = ({ config: i, onFinish: n, onError: t }) => /* @__PURE__ */ e(b, { children: i ? /* @__PURE__ */ e(Ae, { config: i, onFinish: n, onError: t }) : null });
|
|
890
|
-
O(Pe, "incode-selfie");
|
|
891
|
-
export {
|
|
892
|
-
Pe as Selfie
|
|
893
|
-
};
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/modules/selfie/selfie.tsx
|
|
16
|
+
var p = ({ config: r, manager: l, onFinish: d, onError: p }) => {
|
|
17
|
+
e(() => {
|
|
18
|
+
f();
|
|
19
|
+
}, []);
|
|
20
|
+
let [m, h] = n(() => {
|
|
21
|
+
if (l) return l;
|
|
22
|
+
if (!r) throw Error("Selfie config is required when no manager is provided");
|
|
23
|
+
return u({ config: r });
|
|
24
|
+
}, { manageLifecycle: !l });
|
|
25
|
+
return m.status === "idle" || m.status === "loading" ? /* @__PURE__ */ t(i, { hideText: !0 }) : m.status === "tutorial" ? /* @__PURE__ */ t(c, {
|
|
26
|
+
manager: h,
|
|
27
|
+
ageAssurance: m.ageAssurance
|
|
28
|
+
}) : m.status === "permissions" ? /* @__PURE__ */ t(s, {
|
|
29
|
+
manager: h,
|
|
30
|
+
permissionStatus: m.permissionStatus
|
|
31
|
+
}) : m.status === "capture" ? /* @__PURE__ */ t(o, {
|
|
32
|
+
manager: h,
|
|
33
|
+
state: m
|
|
34
|
+
}) : m.status === "processing" ? /* @__PURE__ */ t(a, {}) : m.status === "finished" ? (d?.(), null) : m.status === "closed" ? (p?.(void 0), null) : (m.status === "error" && p?.(m.error), null);
|
|
35
|
+
}, m = ({ config: e, manager: n, onFinish: i, onError: a }) => /* @__PURE__ */ t(r, { children: e || n ? /* @__PURE__ */ t(p, {
|
|
36
|
+
config: e,
|
|
37
|
+
manager: n,
|
|
38
|
+
onFinish: i,
|
|
39
|
+
onError: a
|
|
40
|
+
}) : null });
|
|
41
|
+
l(m, "incode-selfie");
|
|
42
|
+
//#endregion
|
|
43
|
+
export { m as Selfie };
|