@sekyro/react 0.1.0-rc.2 → 0.1.0-rc.21

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 (57) hide show
  1. package/CHANGELOG.md +477 -0
  2. package/LICENSE +25 -16
  3. package/README.md +228 -16
  4. package/dist/chunk-2I4BU32X.js +2 -0
  5. package/dist/chunk-2KED7D2Q.js +2 -0
  6. package/dist/chunk-55NNQK5P.js +2 -0
  7. package/dist/chunk-5CLPIFBP.js +2 -0
  8. package/dist/chunk-5RQLU3VM.js +2 -0
  9. package/dist/chunk-7MMT5M4E.js +2 -0
  10. package/dist/chunk-BGAPVTOP.js +2 -0
  11. package/dist/chunk-D65O3EVR.js +2 -0
  12. package/dist/chunk-E4OK3CB5.js +2 -0
  13. package/dist/chunk-EGCGC7NK.js +2 -0
  14. package/dist/chunk-FTKNXQTF.js +2 -0
  15. package/dist/chunk-GUTF3SPK.js +2 -0
  16. package/dist/chunk-MH5E5KTI.js +2 -0
  17. package/dist/chunk-SDO324RU.js +2 -0
  18. package/dist/chunk-VRDPGOXM.js +2 -0
  19. package/dist/chunk-WPSVDW2G.js +2 -0
  20. package/dist/chunk-XQNZJ3J3.js +2 -0
  21. package/dist/chunk-ZLA6BTHU.js +2 -0
  22. package/dist/document-capture-view-GZX5JJ7N.js +2 -0
  23. package/dist/eid-view-ERVRHLLD.js +2 -0
  24. package/dist/email-otp-view-B7UQ5CHL.js +2 -0
  25. package/dist/flow-views-IGQ5MYS2.js +2 -0
  26. package/dist/fonts/Cairo-OFL.txt +93 -0
  27. package/dist/fonts/Geist-OFL.txt +93 -0
  28. package/dist/fonts/Inter-OFL.txt +93 -0
  29. package/dist/fonts/SekyroCairo-Bold.woff2 +0 -0
  30. package/dist/fonts/SekyroCairo-Regular.woff2 +0 -0
  31. package/dist/fonts/SekyroCairo-SemiBold.woff2 +0 -0
  32. package/dist/fonts/SekyroGeist-Bold.woff2 +0 -0
  33. package/dist/fonts/SekyroGeist-SemiBold.woff2 +0 -0
  34. package/dist/fonts/SekyroInter-Medium.woff2 +0 -0
  35. package/dist/fonts/SekyroInter-Regular.woff2 +0 -0
  36. package/dist/fonts/SekyroInter-SemiBold.woff2 +0 -0
  37. package/dist/index.cjs +2 -901
  38. package/dist/index.d.cts +7 -233
  39. package/dist/index.d.ts +7 -233
  40. package/dist/index.js +2 -880
  41. package/dist/overlay-de-5KYN4JFO.js +2 -0
  42. package/dist/overlay-es-6CAERCCN.js +2 -0
  43. package/dist/overlay-pt-UBGXJ3C3.js +2 -0
  44. package/dist/portrait-capture-view-TMHG2UX2.js +2 -0
  45. package/dist/portrait-review-view-XUWQ5LIN.js +2 -0
  46. package/dist/styles.css +310 -12
  47. package/dist/theme-quu7XV_Y.d.cts +544 -0
  48. package/dist/theme-quu7XV_Y.d.ts +544 -0
  49. package/dist/verification/index.cjs +2 -0
  50. package/dist/verification/index.d.cts +689 -0
  51. package/dist/verification/index.d.ts +689 -0
  52. package/dist/verification/index.js +2 -0
  53. package/dist/verification.css +757 -0
  54. package/package.json +28 -13
  55. package/sbom.cdx.json +153 -0
  56. package/dist/index.cjs.map +0 -1
  57. package/dist/index.js.map +0 -1
package/package.json CHANGED
@@ -1,17 +1,13 @@
1
1
  {
2
2
  "name": "@sekyro/react",
3
- "version": "0.1.0-rc.2",
4
- "description": "Sekyro React SDK — the themeable, accessible <LivenessCapture /> component over @sekyro/web (ar/fr/en, RTL-safe, WCAG AAA defaults)",
5
- "license": "UNLICENSED",
3
+ "version": "0.1.0-rc.21",
4
+ "description": "Sekyro AI React SDK — the themeable, accessible <LivenessCapture /> component over @sekyro/web (ar/fr/en, RTL-safe, WCAG AAA defaults)",
5
+ "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git+https://github.com/IBTIKAR-Technologies/sekyro-sdks.git",
8
+ "url": "git+https://github.com/IBTIKAR-Technologies/ibtikar-identity.git",
9
9
  "directory": "packages/sekyro-react"
10
10
  },
11
- "homepage": "https://github.com/IBTIKAR-Technologies/sekyro-sdks/tree/main/packages/sekyro-react#readme",
12
- "bugs": {
13
- "url": "https://github.com/IBTIKAR-Technologies/sekyro-sdks/issues"
14
- },
15
11
  "keywords": [
16
12
  "sekyro",
17
13
  "kyc",
@@ -46,6 +42,17 @@
46
42
  "default": "./dist/index.cjs"
47
43
  }
48
44
  },
45
+ "./verification": {
46
+ "import": {
47
+ "types": "./dist/verification/index.d.ts",
48
+ "default": "./dist/verification/index.js"
49
+ },
50
+ "require": {
51
+ "types": "./dist/verification/index.d.cts",
52
+ "default": "./dist/verification/index.cjs"
53
+ }
54
+ },
55
+ "./verification.css": "./dist/verification.css",
49
56
  "./styles.css": "./dist/styles.css",
50
57
  "./package.json": "./package.json"
51
58
  },
@@ -53,17 +60,22 @@
53
60
  "dist",
54
61
  "README.md",
55
62
  "CHANGELOG.md",
56
- "LICENSE"
63
+ "LICENSE",
64
+ "sbom.cdx.json"
57
65
  ],
58
66
  "scripts": {
59
67
  "build": "tsup",
60
- "test": "node scripts/check-css.mjs && vitest run",
68
+ "test": "node scripts/check-css.mjs && node scripts/gen-step-strings.mjs --check && node scripts/gen-dial-codes.mjs --check && vitest run",
69
+ "size": "node scripts/check-size.mjs",
70
+ "test:dist": "SEKYRO_REQUIRE_DIST=1 vitest run test/ssr/dist-banner.test.ts",
71
+ "voice:texts": "node --experimental-strip-types scripts/export-voice-texts.mts",
61
72
  "typecheck": "tsc --noEmit",
62
- "api:report": "api-extractor run --local",
63
- "api:check": "api-extractor run"
73
+ "api:report": "api-extractor run --local && api-extractor run --local -c api-extractor.verification.json",
74
+ "api:check": "api-extractor run && api-extractor run -c api-extractor.verification.json",
75
+ "strings:steps": "node scripts/gen-step-strings.mjs"
64
76
  },
65
77
  "peerDependencies": {
66
- "@sekyro/web": "^0.1.0-rc.4",
78
+ "@sekyro/web": "^0.1.0-rc.25 || ^0.2.0-rc.0",
67
79
  "react": ">=18.2",
68
80
  "react-dom": ">=18.2"
69
81
  },
@@ -74,11 +86,14 @@
74
86
  "@testing-library/react": "^16",
75
87
  "@types/jest-axe": "^3.5",
76
88
  "@types/node": "^22",
89
+ "@types/qrcode": "1.5.5",
77
90
  "@types/react": "^19",
78
91
  "@types/react-dom": "^19",
79
92
  "@vitejs/plugin-react": "^4",
80
93
  "jest-axe": "^10",
81
94
  "jsdom": "^25",
95
+ "libphonenumber-js": "1.12.10",
96
+ "qrcode": "1.5.4",
82
97
  "react": "19.2.0",
83
98
  "react-dom": "19.2.0",
84
99
  "tsup": "^8",
package/sbom.cdx.json ADDED
@@ -0,0 +1,153 @@
1
+ {
2
+ "$schema": "http://cyclonedx.org/schema/bom-1.6.schema.json",
3
+ "bomFormat": "CycloneDX",
4
+ "specVersion": "1.6",
5
+ "version": 1,
6
+ "metadata": {
7
+ "tools": {
8
+ "components": [
9
+ {
10
+ "type": "application",
11
+ "name": "npm",
12
+ "version": "11.12.1"
13
+ },
14
+ {
15
+ "type": "library",
16
+ "name": "cyclonedx-library",
17
+ "group": "@cyclonedx",
18
+ "version": "10.3.0",
19
+ "author": "Jan Kowalleck",
20
+ "description": "Core functionality of CycloneDX for JavaScript (Node.js or WebBrowser).",
21
+ "licenses": [
22
+ {
23
+ "license": {
24
+ "id": "Apache-2.0"
25
+ }
26
+ }
27
+ ],
28
+ "externalReferences": [
29
+ {
30
+ "url": "https://github.com/CycloneDX/cyclonedx-javascript-library/issues",
31
+ "type": "issue-tracker",
32
+ "comment": "as detected from PackageJson property \"bugs.url\""
33
+ },
34
+ {
35
+ "url": "git+https://github.com/CycloneDX/cyclonedx-javascript-library.git",
36
+ "type": "vcs",
37
+ "comment": "as detected from PackageJson property \"repository.url\""
38
+ },
39
+ {
40
+ "url": "https://github.com/CycloneDX/cyclonedx-javascript-library#readme",
41
+ "type": "website",
42
+ "comment": "as detected from PackageJson property \"homepage\""
43
+ }
44
+ ],
45
+ "properties": [
46
+ {
47
+ "name": "cdx:npm:package:constraint:engine:node",
48
+ "value": ">=20.18.0"
49
+ }
50
+ ]
51
+ },
52
+ {
53
+ "type": "application",
54
+ "name": "cyclonedx-npm",
55
+ "group": "@cyclonedx",
56
+ "version": "6.0.1",
57
+ "author": "Jan Kowalleck",
58
+ "description": "Create CycloneDX Software Bill of Materials (SBOM) from NPM projects.",
59
+ "licenses": [
60
+ {
61
+ "license": {
62
+ "id": "Apache-2.0"
63
+ }
64
+ }
65
+ ],
66
+ "externalReferences": [
67
+ {
68
+ "url": "https://github.com/CycloneDX/cyclonedx-node-npm/issues",
69
+ "type": "issue-tracker",
70
+ "comment": "as detected from PackageJson property \"bugs.url\""
71
+ },
72
+ {
73
+ "url": "git+https://github.com/CycloneDX/cyclonedx-node-npm.git",
74
+ "type": "vcs",
75
+ "comment": "as detected from PackageJson property \"repository.url\""
76
+ },
77
+ {
78
+ "url": "https://github.com/CycloneDX/cyclonedx-node-npm#readme",
79
+ "type": "website",
80
+ "comment": "as detected from PackageJson property \"homepage\""
81
+ }
82
+ ],
83
+ "properties": [
84
+ {
85
+ "name": "cdx:npm:package:constraint:engine:node",
86
+ "value": ">=20.18.0"
87
+ },
88
+ {
89
+ "name": "cdx:npm:package:constraint:engine:npm",
90
+ "value": ">=9"
91
+ }
92
+ ]
93
+ }
94
+ ]
95
+ },
96
+ "component": {
97
+ "type": "application",
98
+ "name": "react",
99
+ "group": "@sekyro",
100
+ "version": "0.1.0-rc.21",
101
+ "bom-ref": "@sekyro/react@0.1.0-rc.21",
102
+ "description": "Sekyro AI React SDK — the themeable, accessible <LivenessCapture /> component over @sekyro/web (ar/fr/en, RTL-safe, WCAG AAA defaults)",
103
+ "licenses": [
104
+ {
105
+ "license": {
106
+ "name": "SEE LICENSE IN LICENSE",
107
+ "acknowledgement": "declared"
108
+ }
109
+ }
110
+ ],
111
+ "purl": "pkg:npm/%40sekyro/react@0.1.0-rc.21?vcs_url=git%2Bhttps%3A%2F%2Fgithub.com%2FIBTIKAR-Technologies%2Fibtikar-identity.git%23packages%2Fsekyro-react",
112
+ "externalReferences": [
113
+ {
114
+ "url": "https://github.com/IBTIKAR-Technologies/ibtikar-identity/issues",
115
+ "type": "issue-tracker",
116
+ "comment": "as detected from PackageJson property \"bugs.url\""
117
+ },
118
+ {
119
+ "url": "git+https://github.com/IBTIKAR-Technologies/ibtikar-identity.git#packages/sekyro-react",
120
+ "type": "vcs",
121
+ "comment": "as detected from PackageJson property \"repository.url\" and \"repository.directory\""
122
+ },
123
+ {
124
+ "url": "https://github.com/IBTIKAR-Technologies/ibtikar-identity#readme",
125
+ "type": "website",
126
+ "comment": "as detected from PackageJson property \"homepage\""
127
+ }
128
+ ],
129
+ "properties": [
130
+ {
131
+ "name": "cdx:npm:package:constraint:engine:node",
132
+ "value": ">=20"
133
+ },
134
+ {
135
+ "name": "cdx:npm:package:path",
136
+ "value": ""
137
+ }
138
+ ]
139
+ },
140
+ "properties": [
141
+ {
142
+ "name": "cdx:reproducible",
143
+ "value": "true"
144
+ }
145
+ ]
146
+ },
147
+ "components": [],
148
+ "dependencies": [
149
+ {
150
+ "ref": "@sekyro/react@0.1.0-rc.21"
151
+ }
152
+ ]
153
+ }
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.ts","../src/liveness-capture.tsx","../src/button.tsx","../src/capture-arc.tsx","../src/use-strings.ts","../src/strings/en.ts","../src/strings/ar.ts","../src/strings/fr.ts","../src/strings/index.ts","../src/capture-stage.tsx","../src/captured-panel.tsx","../src/notice.tsx","../src/use-focus-on-mount.ts","../src/use-liveness-handle.ts","../src/theme.tsx"],"sourcesContent":["// @sekyro/react — the themeable, accessible <LivenessCapture /> over\n// @sekyro/web (spec §3.2). Import `@sekyro/react/styles.css` once.\nexport {\n LivenessCapture,\n type LivenessCaptureProps,\n type LivenessCaptureSlots,\n NO_FACE_DEBOUNCE_MS,\n} from \"./liveness-capture\";\nexport {\n DEFAULT_THEME,\n SekyroThemeProvider,\n type SekyroTheme,\n type SekyroThemeColors,\n type SekyroThemeProviderProps,\n themeToCssVars,\n} from \"./theme\";\nexport {\n ar,\n attemptsRemainingText,\n captureErrorStringKey,\n en,\n fr,\n hintStringKey,\n reasonStringKey,\n type SekyroLocale,\n type StringKey,\n type Strings,\n} from \"./strings/index\";\nexport { resolveStrings } from \"./use-strings\";\n","// <LivenessCapture /> — the hosted liveness step's capture UI, extracted onto\n// the public @sekyro/web API (spec §3.2). Two modes:\n// - verification mode (`verification` prop): the handle comes from\n// `verification.liveness()`; after `captured` the SDK uploads, attests and\n// submits, and the verdict arrives through `onResult`;\n// - capture-only mode (no `verification`): `createLivenessCapture()`; the\n// component emits `onCaptured` and stops there.\nimport type {\n CaptureError,\n CapturedArtifacts,\n CaptureState,\n GateHint,\n Verification,\n VerificationResult,\n} from \"@sekyro/web\";\nimport { type ReactNode, type RefObject, useEffect, useMemo, useRef, useState } from \"react\";\nimport { Button } from \"./button\";\nimport type { CapturePhase } from \"./capture-arc\";\nimport { CaptureStage } from \"./capture-stage\";\nimport { CapturedPanel } from \"./captured-panel\";\nimport { Notice } from \"./notice\";\nimport {\n attemptsRemainingText,\n captureErrorStringKey,\n hintStringKey,\n reasonStringKey,\n type SekyroLocale,\n type StringKey,\n type Strings,\n} from \"./strings/index\";\nimport { useFocusOnMount } from \"./use-focus-on-mount\";\nimport { useLivenessHandle } from \"./use-liveness-handle\";\nimport { resolveStrings, StringsProvider } from \"./use-strings\";\n\n/**\n * Display debounce before the no-face copy replaces another hint: detector\n * blips flash \"we can't see your face\" while the face is clearly visible, so\n * switching TO no-face must persist this long first. Any other hint renders\n * immediately and cancels a pending no-face. Chrome only — never gate input.\n */\nexport const NO_FACE_DEBOUNCE_MS = 800;\n\n/** Render slots — partners inject their own chrome around and inside the stage. */\nexport interface LivenessCaptureSlots {\n /** Above the stage (title, step indicator). */\n header?: ReactNode;\n /** Below everything (security note, help link). */\n footer?: ReactNode;\n /**\n * Replaces the built-in intro (security note + Start button) while the\n * capture is idle; `start` begins the attempt. Hosts render their own\n * permission rows, loaders or settings here.\n */\n intro?: (start: () => void) => ReactNode;\n /**\n * Rendered inside the stage box above the ring (measurement overlays,\n * watermarks); receives the ref of the component-owned `<video>`.\n */\n stageOverlay?: (videoRef: RefObject<HTMLVideoElement | null>) => ReactNode;\n /**\n * Rendered in the stage's start corner next to the guidance line; receives\n * the current hint code, the on-screen text and the string key behind it\n * (audio / TTS controls go here — the key selects a voice clip).\n */\n voicePrompt?: (hint: GateHint | null, text: string, key: StringKey | null) => ReactNode;\n /** Replaces the default camera-error notice. `retry` starts a fresh attempt. */\n errorPanel?: (error: CaptureError, retry: () => void) => ReactNode;\n}\n\n/** Props of {@link LivenessCapture}. */\nexport interface LivenessCaptureProps {\n /** From `createVerification()`. Absent → capture-only mode. */\n verification?: Verification;\n /** Built-in dictionary to use (`ar` | `fr` | `en`). */\n locale: SekyroLocale;\n /** Text direction; defaults to `rtl` for `ar`, `ltr` otherwise. */\n dir?: \"ltr\" | \"rtl\";\n /** Copy overrides merged on top of the built-in dictionary for `locale`. */\n strings?: Partial<Strings>;\n /** Render slots around / inside the stage. */\n slots?: LivenessCaptureSlots;\n /**\n * Start the camera instead of showing the intro — at most once per mount,\n * the first time it is `true` while the capture is idle (a host flips it\n * once its own preconditions, e.g. a granted permission, are met).\n */\n autoStart?: boolean;\n /** Fires BEFORE any upload, with the engine's artifacts. */\n onCaptured?: (artifacts: CapturedArtifacts) => void;\n /** Verification mode only: the verdict for this session / capture. */\n onResult?: (result: VerificationResult) => void;\n /** Camera / engine failure. */\n onError?: (error: CaptureError) => void;\n /** Every capture-state transition (`starting` … `done`), for host chrome. */\n onStateChange?: (state: CaptureState) => void;\n /** Base URL of the detector assets (tasks-vision wasm + tflite); default `/models-v3`. */\n assetBaseUrl?: string;\n /** Extra class on the root element. */\n className?: string;\n}\n\nfunction isCapturing(state: CaptureState): boolean {\n return state === \"starting\" || state === \"gating\" || state === \"recording\";\n}\n\nfunction isPostCapture(state: CaptureState): boolean {\n return state === \"captured\" || state === \"uploading\" || state === \"checking\";\n}\n\n/**\n * Liveness capture UI over `@sekyro/web`: the mirrored camera stage with the\n * circular guide / progress ring / guidance line, the Start intro, the frozen\n * still + \"checking\" state, and the retry / error surfaces. Wrap in\n * {@link SekyroThemeProvider} (or set the `--sekyro-*` variables yourself) and\n * import `@sekyro/react/styles.css` once.\n */\nexport function LivenessCapture({\n verification,\n locale,\n dir,\n strings,\n slots,\n autoStart = false,\n onCaptured,\n onResult,\n onError,\n onStateChange,\n assetBaseUrl,\n className,\n}: LivenessCaptureProps) {\n const dictionary = useMemo(() => resolveStrings(locale, strings), [locale, strings]);\n // Only the optional plural-category keys can be absent; they are read via\n // attemptsRemainingText (with its `other` fallback), never through `t`.\n const t = useMemo(() => (key: StringKey) => dictionary[key] ?? \"\", [dictionary]);\n const direction = dir ?? (locale === \"ar\" ? \"rtl\" : \"ltr\");\n\n const videoRef = useRef<HTMLVideoElement | null>(null);\n const capture = useLivenessHandle({\n verification,\n videoRef,\n assetBaseUrl,\n onCaptured,\n onResult,\n onError,\n onStateChange,\n });\n\n // Auto-start at most once per mount, the first time the flag is up while\n // idle (a later error keeps the normal error surface).\n const autoStartedRef = useRef(false);\n const preCaptureIdle = capture.state === \"idle\" && capture.error === null;\n useEffect(() => {\n if (!autoStart || !preCaptureIdle || autoStartedRef.current) return;\n autoStartedRef.current = true;\n capture.start();\n }, [autoStart, preCaptureIdle, capture.start]);\n\n // The captured still: the frozen preview (available at recording-stop, the\n // same keyframe) stays put into checking; without one, an object URL of the\n // keyframe blob, revoked when it changes.\n const objectUrl = useMemo(\n () =>\n capture.artifacts !== null && typeof URL.createObjectURL === \"function\"\n ? URL.createObjectURL(capture.artifacts.keyframe)\n : null,\n [capture.artifacts],\n );\n useEffect(() => {\n if (objectUrl === null) return;\n return () => URL.revokeObjectURL(objectUrl);\n }, [objectUrl]);\n const stillUrl = capture.frozenPreview ?? objectUrl;\n\n const verificationMode = verification !== undefined;\n const capturing = isCapturing(capture.state);\n const postCapture = isPostCapture(capture.state);\n const stageVisible = capturing || postCapture;\n const result = capture.result;\n const done = capture.state === \"done\" && result !== null;\n // Recording stopped (frozen still arrived) but the clip is still finalizing.\n const frozen = capture.state === \"recording\" && capture.frozenPreview !== null;\n\n const phase: CapturePhase = postCapture\n ? \"checking\"\n : frozen\n ? \"frozen\"\n : capture.state === \"recording\"\n ? \"recording\"\n : capture.gateLocked || capture.gate.progress >= 1\n ? \"locked\"\n : capture.gate.faceDetected\n ? \"aligning\"\n : \"seeking\";\n\n // ── guidance line (hint → string key, with the no-face display debounce) ──\n const guidanceHint = capturing ? capture.gate.hint : null;\n const rawKey: StringKey | null =\n capture.state === \"starting\"\n ? \"capture.preparing.title\"\n : guidanceHint === null\n ? null\n : guidanceHint === \"center\" && !capture.gate.faceDetected\n ? \"fcv3.no_face\"\n : hintStringKey(guidanceHint);\n const [displayKey, setDisplayKey] = useState<StringKey | null>(null);\n useEffect(() => {\n if (rawKey !== \"fcv3.no_face\") {\n setDisplayKey(rawKey);\n return;\n }\n // Schedule ONLY while the camera is driving: a state exit cancels the\n // timer so no-face never surfaces over an error surface.\n if (!capturing) return;\n const timer = setTimeout(() => setDisplayKey(rawKey), NO_FACE_DEBOUNCE_MS);\n return () => clearTimeout(timer);\n }, [rawKey, capturing]);\n const guidanceKey = capturing ? displayKey : null;\n const guidanceText = guidanceKey === null ? \"\" : t(guidanceKey);\n\n // A retryable verdict: with the SDK's auto re-arm the reason + coaching stay\n // up while the new attempt runs; with a manual re-arm (`rearm: 'manual'`)\n // the handle settles at `done` and the retake button starts the next one.\n const retryVerdict = result !== null && result.status === \"retry\" ? result : null;\n const unavailable = done && result.status === \"unavailable\" ? result : null;\n const terminal =\n done && (result.status === \"approved\" || result.status === \"rejected\" || result.status === \"review\")\n ? result\n : null;\n const reasonText = (reason: VerificationResult[\"reason\"]): string | null => {\n if (reason === undefined) return null;\n const key = reasonStringKey(reason);\n return key === null ? null : t(key);\n };\n // A missing MediaRecorder will not appear on retry; an off-allowlist\n // container (a recorder exists) may — a switched camera can negotiate another.\n // An expired session (no reason) and an unbound NNI are terminal: a new attempt\n // cannot succeed on this session — the host must start a new one.\n const unavailableRetryable =\n unavailable !== null &&\n unavailable.reason !== undefined &&\n unavailable.reason !== \"nni_unbound\" &&\n !(unavailable.reason === \"no_recorder\" && capture.artifacts?.degraded === \"NO_RECORDER\");\n const focusRetry = useFocusOnMount();\n\n return (\n <StringsProvider value={t}>\n <div\n className={className === undefined ? \"sekyro-capture\" : `sekyro-capture ${className}`}\n dir={direction}\n lang={locale}\n data-testid=\"sekyro-liveness-capture\"\n data-state={capture.state}\n >\n {slots?.header}\n\n {/* Polite: the SDK already re-armed the camera — coaching, not an interruption (M4). */}\n {retryVerdict !== null && reasonText(retryVerdict.reason) !== null ? (\n <Notice tone=\"warning\" role=\"status\" testId=\"sekyro-retry-notice\">\n <span>{reasonText(retryVerdict.reason)}</span>\n </Notice>\n ) : null}\n\n {capture.error !== null ? (\n slots?.errorPanel !== undefined ? (\n slots.errorPanel(capture.error, capture.retry)\n ) : (\n <Notice tone=\"danger\" testId=\"sekyro-error-notice\">\n <span>{t(captureErrorStringKey(capture.error.kind))}</span>\n {capture.error.retryable ? (\n <Button ref={focusRetry} kind=\"ghost\" className=\"sekyro-btn--start\" onClick={capture.retry}>\n {t(\"common.retry\")}\n </Button>\n ) : null}\n </Notice>\n )\n ) : null}\n\n {unavailable !== null ? (\n <Notice tone=\"danger\" testId=\"sekyro-unavailable-notice\">\n {/* No reason at all = the session itself is no longer usable (expired /\n terminal without a verdict for this capture) — not a network fault (M6). */}\n <span>\n {reasonText(unavailable.reason) ??\n t(unavailable.reason === undefined ? \"errors.session_expired\" : \"errors.network_error\")}\n </span>\n {unavailableRetryable ? (\n <Button ref={focusRetry} kind=\"ghost\" className=\"sekyro-btn--start\" onClick={capture.retry}>\n {t(\"capture.recordAgain\")}\n </Button>\n ) : null}\n </Notice>\n ) : null}\n\n {terminal !== null && reasonText(terminal.reason) !== null ? (\n <Notice tone={terminal.status === \"rejected\" ? \"danger\" : \"info\"} testId=\"sekyro-result-notice\">\n <span>{reasonText(terminal.reason)}</span>\n </Notice>\n ) : null}\n\n {/* The stage stays MOUNTED from mount (the engine binds the <video>\n element once) and is hidden until capture is live. */}\n <div className={stageVisible ? undefined : \"sekyro-hidden\"} data-capture-live={stageVisible ? \"\" : undefined}>\n <CaptureStage\n videoRef={videoRef}\n guidanceText={guidanceText}\n guidanceHint={guidanceHint}\n guidanceKey={guidanceKey}\n progress={capture.gate.progress}\n phase={phase}\n draining={capture.draining}\n stillUrl={stillUrl}\n showChecking={verificationMode}\n onSwitchCamera={capture.switchCamera}\n canSwitchCamera={capturing && capture.state !== \"recording\"}\n voicePrompt={slots?.voicePrompt}\n overlay={slots?.stageOverlay}\n reduceMotion={capture.reduceMotion}\n />\n </div>\n\n {preCaptureIdle && !autoStart ? (\n slots?.intro !== undefined ? (\n slots.intro(capture.start)\n ) : (\n <div className=\"sekyro-stack sekyro-stack--4\" data-testid=\"sekyro-intro\">\n <p className=\"sekyro-text-muted\">{t(\"capture.securityNote\")}</p>\n <Button full onClick={capture.start} data-testid=\"sekyro-start\">\n {t(\"capture.start\")}\n </Button>\n </div>\n )\n ) : null}\n\n <CapturedPanel\n showCoaching={retryVerdict !== null}\n attemptsText={\n retryVerdict?.attemptsRemaining !== undefined\n ? attemptsRemainingText(dictionary, locale, retryVerdict.attemptsRemaining)\n : null\n }\n showRetake={\n (retryVerdict !== null && !capturing && !postCapture) ||\n (!verificationMode && capture.state === \"captured\")\n }\n onRetake={capture.retry}\n />\n\n {slots?.footer}\n </div>\n </StringsProvider>\n );\n}\n","// Local button (replaces the private design-system Button): native <button>,\n// ≥48px target, visible 3px focus ring from the theme (styles.css .sekyro-btn).\n// forwardRef keeps the React 18 peer range working (ref-as-prop is React 19 only).\nimport { type ButtonHTMLAttributes, forwardRef } from \"react\";\n\nexport type ButtonKind = \"primary\" | \"ghost\" | \"chip\";\n\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n kind?: ButtonKind;\n /** Stretch to the container width (the intro's Start button). */\n full?: boolean;\n}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n { kind = \"primary\", full = false, className, type, ...rest },\n ref,\n) {\n const classes = [\"sekyro-btn\", `sekyro-btn--${kind}`];\n if (full) classes.push(\"sekyro-btn--full\");\n if (className !== undefined) classes.push(className);\n return <button ref={ref} type={type ?? \"button\"} className={classes.join(\" \")} {...rest} />;\n});\n","// Circular face guide + radial-tick progress ring + scrim — ported from\n// identity-hosted/components/capture-arc.tsx (Capture Stage v2.1), tokens\n// `--ds-color-*` → `--sekyro-color-*`, Tailwind utilities → styles.css classes.\n//\n// CRITICAL: rendered CHROME ONLY. The engine's gate (inside @sekyro/web) is the\n// only gating geometry; nothing drawn here feeds gate input. Fill is the gate\n// integrator progress from the handle's `gate` event.\n//\n// GUIDE RADIUS — fixed r=100 (owner ruling 2026-07-06): the gate is a centering\n// test; the engine's hints handle face size and distance. Never above 104 — the\n// guide must stay inside the tick ring (R_IN 108).\n//\n// The scrim is ONE even-odd path, effectively solid (96% live / 100% once the\n// still is shown): the stage box is always 3:4 under `meet`, so the letterbox\n// bands are exactly 50 viewBox units top and bottom and the oversized rect\n// (svg overflow visible) covers everything. The video is visible only through\n// the circular hole.\n//\n// Colors: the scrim is the theme `fg`, the guide circle the theme `surface`\n// (same pairing as text on surface → inherits the theme's AAA ratio); the ticks\n// are decorative (aria-hidden, redundant with the guidance text).\nimport type { CSSProperties } from \"react\";\n\n/** Radial tick marks around the guide (donor ARC_TICKS). */\nexport const ARC_TICKS = 56;\n\n/**\n * Stage phase — derived in LivenessCapture from the handle's state + gate.\n * `recording`: the ring HOLDS its earned full/success state and the guide\n * borrows the checking state's dashed spin. `frozen`: recording ended and the\n * keyframe still is shown while the clip finalizes (reads like checking\n * WITHOUT the camera-off claim). `checking`: the still is shown, tracks stopped.\n */\nexport type CapturePhase = \"seeking\" | \"aligning\" | \"locked\" | \"recording\" | \"frozen\" | \"checking\";\n\nconst VIEW = 300;\nconst CX = 150;\nconst CY = 150;\n/** Guide / scrim-hole center — concentric with the tick ring (v3 gates on the eye midpoint). */\nconst CY_GUIDE = 150;\n/** Fixed guide radius (viewBox units). MUST stay below R_IN (108). */\nconst GUIDE_R = 100;\nconst R_IN = 108;\nconst R_OUT = 138;\nconst TICK_W = 3;\n\nconst TICKS = Array.from({ length: ARC_TICKS }, (_, i) => {\n const angle = (i / ARC_TICKS) * 2 * Math.PI - Math.PI / 2; // start top, clockwise\n const cos = Math.cos(angle);\n const sin = Math.sin(angle);\n return {\n id: `tick-${i}`,\n frac: i / (ARC_TICKS - 1),\n x1: CX + R_IN * cos,\n y1: CY + R_IN * sin,\n x2: CX + R_OUT * cos,\n y2: CY + R_OUT * sin,\n // Ignition cascade: constant per-tick stagger so fills and the success\n // flip sweep clockwise (~340 ms) instead of snapping.\n style: { transitionDelay: `${i * 6}ms` } as CSSProperties,\n };\n});\n\n/** Tick color: neutral until reached, progressively stronger brand by ring\n * position, success everywhere once the gate is ready; warning while the\n * integrator DRAINS so \"not advancing\" is visible the moment it starts. */\nfunction tickColor(reached: boolean, frac: number, complete: boolean, draining: boolean): string {\n if (complete) return \"var(--sekyro-color-success)\";\n if (!reached) return \"color-mix(in srgb, var(--sekyro-color-surface) 32%, transparent)\";\n if (draining) return \"color-mix(in srgb, var(--sekyro-color-warning) 75%, transparent)\";\n if (frac < 0.33) return \"color-mix(in srgb, var(--sekyro-color-brand) 55%, transparent)\";\n if (frac < 0.66) return \"color-mix(in srgb, var(--sekyro-color-brand) 80%, transparent)\";\n return \"var(--sekyro-color-brand)\";\n}\n\nconst SCRIM_PATH = `M0 -50 H${VIEW} V${VIEW + 50} H0 Z M${CX - GUIDE_R} ${CY_GUIDE} a${GUIDE_R},${GUIDE_R} 0 1 0 ${2 * GUIDE_R},0 a${GUIDE_R},${GUIDE_R} 0 1 0 ${-2 * GUIDE_R},0 Z`;\n\n/**\n * Decorative guide + progress halo over the capture stage (`progress` 0..1).\n * Guidance text is announced via the stage's aria-live region, so this is\n * aria-hidden.\n */\nexport function CaptureArc({\n progress,\n phase,\n draining = false,\n}: {\n progress: number;\n phase: CapturePhase;\n /** Gate integrator falling — warning-tint the earned ticks (chrome only). */\n draining?: boolean;\n}) {\n const clamped = Math.min(1, Math.max(0, progress));\n const filled = Math.round(clamped * ARC_TICKS);\n const checking = phase === \"checking\";\n const recording = phase === \"recording\";\n const frozen = phase === \"frozen\";\n // The still is on screen for BOTH frozen and checking — dim the earned\n // ticks and deepen the scrim for both; live recording keeps the earned ring.\n const stillShown = checking || frozen;\n // All three post-fire phases spin the guide.\n const spinning = checking || recording || frozen;\n const complete = phase === \"locked\" || spinning;\n const drainingVisible = draining && !complete;\n\n return (\n <svg\n aria-hidden=\"true\"\n viewBox={`0 0 ${VIEW} ${VIEW}`}\n preserveAspectRatio=\"xMidYMid meet\"\n className=\"sekyro-stage__arc\"\n data-testid=\"sekyro-capture-arc\"\n data-phase={phase}\n data-filled={filled}\n data-recording={recording ? \"\" : undefined}\n data-draining={drainingVisible ? \"\" : undefined}\n >\n <path\n fillRule=\"evenodd\"\n d={SCRIM_PATH}\n fill=\"color-mix(in srgb, var(--sekyro-color-fg) var(--sekyro-scrim, 96%), transparent)\"\n style={{ \"--sekyro-scrim\": stillShown ? \"100%\" : \"96%\" } as CSSProperties}\n className=\"sekyro-arc__scrim sekyro-capture-fade-in\"\n data-testid=\"sekyro-capture-scrim\"\n />\n {/* Ring group: one-shot settle beat on entering locked. */}\n <g className={phase === \"locked\" ? \"sekyro-capture-settle\" : undefined}>\n <g className={stillShown ? \"sekyro-arc__ring sekyro-arc__ring--dim\" : \"sekyro-arc__ring\"}>\n {TICKS.map((tick, i) => (\n <line\n key={tick.id}\n x1={tick.x1}\n y1={tick.y1}\n x2={tick.x2}\n y2={tick.y2}\n stroke={tickColor(i < filled, tick.frac, complete, drainingVisible)}\n strokeWidth={TICK_W}\n strokeLinecap=\"round\"\n style={tick.style}\n className=\"sekyro-arc__tick\"\n />\n ))}\n </g>\n {/* Inward breathe while seeking — never expands past the gate. */}\n <g className={phase === \"seeking\" ? \"sekyro-capture-breathe\" : undefined}>\n <circle\n cx={CX}\n cy={CY_GUIDE}\n r={GUIDE_R}\n fill=\"none\"\n stroke={complete ? \"var(--sekyro-color-success)\" : \"var(--sekyro-color-surface)\"}\n strokeWidth={complete ? 3.5 : 2.5}\n className={\n spinning\n ? // Recording + checking spinner: dashed success circle, the\n // dashes crawl one lap ≈ 2s. Reduced motion → static solid circle.\n \"sekyro-arc__guide sekyro-arc__guide--spin sekyro-capture-ring-spin\"\n : \"sekyro-arc__guide sekyro-capture-fade-in\"\n }\n data-testid=\"sekyro-capture-guide\"\n />\n </g>\n </g>\n </svg>\n );\n}\n","// Locale + overrides → a `t(key)` lookup, provided by LivenessCapture to the\n// ported sub-components (replaces next-intl's useTranslations()).\nimport { createContext, useContext } from \"react\";\nimport { ar, en, fr, type SekyroLocale, type StringKey, type Strings } from \"./strings/index\";\n\nconst BUILT_IN: Record<SekyroLocale, Strings> = { ar, fr, en };\n\n/** The complete dictionary for `locale` with `overrides` merged on top. */\nexport function resolveStrings(locale: SekyroLocale, overrides?: Partial<Strings>): Strings {\n const base = BUILT_IN[locale];\n if (overrides === undefined) return base;\n const merged: Strings = { ...base };\n for (const key of Object.keys(overrides) as StringKey[]) {\n const value = overrides[key];\n if (typeof value === \"string\") merged[key] = value;\n }\n return merged;\n}\n\nexport type Translate = (key: StringKey) => string;\n\nconst StringsContext = createContext<Translate>((key) => en[key] ?? \"\");\n\nexport const StringsProvider = StringsContext.Provider;\n\nexport function useStrings(): Translate {\n return useContext(StringsContext);\n}\n","// Built-in English copy — the hosted keys the capture surface uses, copied\n// verbatim from identity-hosted/messages/en.json (the source of truth for the\n// wording; partners override per key via the `strings` prop).\n\n/**\n * Every string the component renders, keyed like the hosted message catalog\n * (`capture.*`, `fcv2.err.*`, `fcv3.*`, `reasons.*`, `errors.*`, `common.*`).\n * The built-in ar/fr/en dictionaries are complete; `strings` overrides are\n * `Partial<Strings>`.\n */\nexport interface Strings {\n \"capture.start\": string;\n \"capture.recordAgain\": string;\n \"capture.switchCamera\": string;\n \"capture.preparing.title\": string;\n \"capture.checking\": string;\n \"capture.checkingHint\": string;\n \"capture.securityNote\": string;\n \"capture.cameraOff\": string;\n \"capture.previewAlt\": string;\n \"capture.retryCoaching.title\": string;\n \"capture.retryCoaching.light\": string;\n \"capture.retryCoaching.eyeLevel\": string;\n \"capture.retryCoaching.head\": string;\n /**\n * Remaining-attempts line per CLDR plural category (`Intl.PluralRules`),\n * `{count}` = the locale-formatted number. `one`/`other` are required; the\n * other categories fall back to `other` where the locale never selects them.\n */\n \"capture.attemptsRemaining.one\": string;\n \"capture.attemptsRemaining.other\": string;\n \"capture.attemptsRemaining.zero\"?: string;\n \"capture.attemptsRemaining.two\"?: string;\n \"capture.attemptsRemaining.few\"?: string;\n \"capture.attemptsRemaining.many\"?: string;\n \"common.retry\": string;\n \"fcv2.err.permission\": string;\n \"fcv2.err.notfound\": string;\n \"fcv2.err.inuse\": string;\n \"fcv2.err.insecure\": string;\n \"fcv2.err.unsupported\": string;\n \"fcv2.err.generic\": string;\n \"fcv3.no_face\": string;\n \"fcv3.come_closer\": string;\n \"fcv3.move_back\": string;\n \"fcv3.center_face\": string;\n \"fcv3.straighten\": string;\n \"fcv3.more_light\": string;\n \"fcv3.too_bright\": string;\n \"fcv3.hold_still\": string;\n \"fcv3.steady_camera\": string;\n \"reasons.no_face\": string;\n \"reasons.media_unreadable\": string;\n \"reasons.clip_too_short\": string;\n \"reasons.spoof_detected\": string;\n \"reasons.review_band\": string;\n \"reasons.nni_not_found\": string;\n \"reasons.nni_invalid\": string;\n \"reasons.registry_unavailable\": string;\n \"reasons.result_from_cache\": string;\n \"reasons.no_face_source\": string;\n \"reasons.no_face_reference\": string;\n \"reasons.low_quality_reference\": string;\n \"reasons.below_threshold\": string;\n \"reasons.side_missing\": string;\n \"reasons.mrz_checksum_failed\": string;\n \"reasons.unreadable\": string;\n \"reasons.expired_document\": string;\n \"reasons.authenticity_review\": string;\n \"reasons.registry_mismatch\": string;\n \"reasons.otp_mismatch\": string;\n \"reasons.otp_expired\": string;\n \"reasons.otp_send_failed\": string;\n \"reasons.uncalibrated_capture_channel\": string;\n \"errors.attestation_invalid\": string;\n \"errors.network_error\": string;\n \"errors.session_expired\": string;\n \"errors.nni_unbound\": string;\n}\n\n/** Every string key the component renders. */\nexport type StringKey = keyof Strings;\n\nexport const en: Strings = {\n \"capture.start\": \"Start camera\",\n \"capture.recordAgain\": \"Start a new attempt\",\n \"capture.switchCamera\": \"Switch camera\",\n \"capture.preparing.title\": \"Preparing secure capture…\",\n \"capture.checking\": \"We're checking your identity…\",\n \"capture.checkingHint\": \"This usually takes a few seconds — keep this page open\",\n \"capture.securityNote\": \"Your images are encrypted and used only for this verification\",\n \"capture.cameraOff\": \"Camera off\",\n \"capture.previewAlt\": \"Preview of the captured image of your face\",\n \"capture.retryCoaching.title\": \"That attempt didn't work — a few adjustments will help:\",\n \"capture.retryCoaching.light\": \"Find good lighting — light on your face, not behind you\",\n \"capture.retryCoaching.eyeLevel\": \"Hold your phone at eye level\",\n \"capture.retryCoaching.head\": \"Look straight at the camera and keep your head upright\",\n \"capture.attemptsRemaining.one\": \"{count} attempt remaining\",\n \"capture.attemptsRemaining.other\": \"{count} attempts remaining\",\n \"common.retry\": \"Try again\",\n \"fcv2.err.permission\":\n \"Allow camera access in your browser settings (the camera icon in the address bar), then try again\",\n \"fcv2.err.notfound\": \"No camera detected — connect or enable a camera, then try again\",\n \"fcv2.err.inuse\": \"Another app is using the camera — close it, then try again\",\n \"fcv2.err.insecure\": \"The camera needs a secure connection (HTTPS) — reopen this page over HTTPS\",\n \"fcv2.err.unsupported\":\n \"Your browser cannot capture in a supported format — open this page in a recent browser such as Chrome or Safari\",\n \"fcv2.err.generic\": \"The camera is unavailable — try again, or contact support if it keeps failing\",\n \"fcv3.no_face\": \"We can't see your face — hold the phone in front of you\",\n \"fcv3.come_closer\": \"Bring the phone a little closer\",\n \"fcv3.move_back\": \"Move the phone a little farther away\",\n \"fcv3.center_face\": \"Center your face in the circle\",\n \"fcv3.straighten\": \"Hold your head straight\",\n \"fcv3.more_light\": \"Find a brighter spot — light your face\",\n \"fcv3.too_bright\": \"Too much light — turn away from the light source\",\n \"fcv3.hold_still\": \"Perfect — hold still\",\n \"fcv3.steady_camera\": \"Hold the phone steady\",\n \"reasons.no_face\": \"No face could be detected during the check\",\n \"reasons.media_unreadable\": \"The submitted capture could not be read\",\n \"reasons.clip_too_short\": \"The capture was too short\",\n \"reasons.spoof_detected\": \"The liveness check could not confirm a live person in front of the camera\",\n \"reasons.review_band\": \"The automatic check was not conclusive, so it was sent to human review\",\n \"reasons.nni_not_found\": \"The national identification number was not found in the civil registry\",\n \"reasons.nni_invalid\": \"The national identification number is not a valid 10-digit NNI\",\n \"reasons.registry_unavailable\": \"The civil registry could not be reached to confirm the NNI\",\n \"reasons.result_from_cache\": \"The registry check was confirmed from a recent copy of the registry\",\n \"reasons.no_face_source\": \"No face could be detected in the selfie photo\",\n \"reasons.no_face_reference\":\n \"No reference photo was available to compare your selfie against — the requester needs to resolve this, so retaking your selfie will not help\",\n \"reasons.low_quality_reference\": \"The reference photo on file was not clear enough to compare against\",\n \"reasons.below_threshold\": \"The selfie did not match the photo on the identity document closely enough\",\n \"reasons.side_missing\": \"One side of the identity document was not submitted\",\n \"reasons.mrz_checksum_failed\": \"The machine-readable zone of the document could not be validated\",\n \"reasons.unreadable\": \"The document photo was not clear enough to read\",\n \"reasons.expired_document\": \"The identity document has expired\",\n \"reasons.authenticity_review\": \"The document was sent to human review to confirm its authenticity\",\n \"reasons.registry_mismatch\": \"The document's details did not match the civil registry — a reviewer will check\",\n \"reasons.otp_mismatch\": \"The verification code did not match the one we sent\",\n \"reasons.otp_expired\": \"The verification code expired before it was entered\",\n \"reasons.otp_send_failed\": \"We could not send a verification code to your phone\",\n \"reasons.uncalibrated_capture_channel\":\n \"Desktop/webcam captures are not yet auto-decided — your verification went to human review\",\n \"errors.attestation_invalid\":\n \"We could not confirm this browser session is genuine — reload the page and try again\",\n \"errors.network_error\":\n \"We could not reach the verification service — check your internet connection and try again\",\n \"errors.session_expired\":\n \"This verification session has expired — ask the organisation that sent you here for a new link\",\n \"errors.nni_unbound\":\n \"This link was created without your national ID number — ask the requester for a new link\",\n};\n","// Built-in Arabic copy — copied verbatim from identity-hosted/messages/ar.json.\nimport type { Strings } from \"./en\";\n\nexport const ar: Strings = {\n \"capture.start\": \"تشغيل الكاميرا\",\n \"capture.recordAgain\": \"ابدأ محاولة جديدة\",\n \"capture.switchCamera\": \"تبديل الكاميرا\",\n \"capture.preparing.title\": \"جارٍ تجهيز الالتقاط الآمن…\",\n \"capture.checking\": \"نتحقق من هويتك…\",\n \"capture.checkingHint\": \"يستغرق هذا عادةً بضع ثوانٍ — أبقِ هذه الصفحة مفتوحة\",\n \"capture.securityNote\": \"تُشفَّر لقطاتك وتُستخدم فقط لهذا التحقق\",\n \"capture.cameraOff\": \"الكاميرا مطفأة\",\n \"capture.previewAlt\": \"معاينة الصورة الملتقطة لوجهك\",\n \"capture.retryCoaching.title\": \"لم تنجح هذه المحاولة — بعض التعديلات ستساعد:\",\n \"capture.retryCoaching.light\": \"اختر مكانًا جيد الإضاءة — الضوء على وجهك لا خلفك\",\n \"capture.retryCoaching.eyeLevel\": \"أمسك هاتفك بمستوى العينين\",\n \"capture.retryCoaching.head\": \"انظر مباشرة إلى الكاميرا وأبقِ رأسك مستقيمًا\",\n \"capture.attemptsRemaining.zero\": \"لم تتبقَّ أي محاولة\",\n \"capture.attemptsRemaining.one\": \"تبقّت محاولة واحدة\",\n \"capture.attemptsRemaining.two\": \"تبقّت محاولتان\",\n \"capture.attemptsRemaining.few\": \"تبقّت {count} محاولات\",\n \"capture.attemptsRemaining.many\": \"تبقّت {count} محاولة\",\n \"capture.attemptsRemaining.other\": \"تبقّت {count} محاولة\",\n \"common.retry\": \"أعد المحاولة\",\n \"fcv2.err.permission\":\n \"اسمح بالوصول إلى الكاميرا من إعدادات المتصفح (أيقونة الكاميرا في شريط العنوان) ثم أعد المحاولة\",\n \"fcv2.err.notfound\": \"لم يتم العثور على كاميرا — وصِّل كاميرا أو فعِّلها ثم أعد المحاولة\",\n \"fcv2.err.inuse\": \"تطبيق آخر يستخدم الكاميرا — أغلقه ثم أعد المحاولة\",\n \"fcv2.err.insecure\": \"تتطلب الكاميرا اتصالًا آمنًا (HTTPS) — افتح هذه الصفحة عبر HTTPS\",\n \"fcv2.err.unsupported\":\n \"متصفحك لا يستطيع الالتقاط بصيغة مدعومة — افتح هذه الصفحة في متصفح حديث مثل كروم أو سفاري\",\n \"fcv2.err.generic\": \"الكاميرا غير متاحة — أعد المحاولة، وتواصل مع الدعم إذا استمرت المشكلة\",\n \"fcv3.no_face\": \"لا نرى وجهك — أمسك الهاتف أمامك\",\n \"fcv3.come_closer\": \"قرّب الهاتف قليلًا\",\n \"fcv3.move_back\": \"أبعد الهاتف قليلًا\",\n \"fcv3.center_face\": \"ضع وجهك في منتصف الدائرة\",\n \"fcv3.straighten\": \"أبقِ رأسك مستقيمًا\",\n \"fcv3.more_light\": \"انتقل إلى مكان أكثر إضاءة — أضئ وجهك\",\n \"fcv3.too_bright\": \"الإضاءة قوية جدًا — ابتعد عن مصدر الضوء\",\n \"fcv3.hold_still\": \"ممتاز — لا تتحرك\",\n \"fcv3.steady_camera\": \"أمسك الهاتف بثبات\",\n \"reasons.no_face\": \"تعذّر اكتشاف أي وجه أثناء التحقق\",\n \"reasons.media_unreadable\": \"تعذّرت قراءة اللقطة المُرسلة\",\n \"reasons.clip_too_short\": \"كانت اللقطة أقصر من اللازم\",\n \"reasons.spoof_detected\": \"لم يتمكن فحص الحضور الحي من تأكيد وجود شخص حقيقي أمام الكاميرا\",\n \"reasons.review_band\": \"لم يكن الفحص التلقائي حاسمًا، لذا أُحيل إلى مراجعة بشرية\",\n \"reasons.nni_not_found\": \"لم يُعثر على الرقم الوطني في سجل الحالة المدنية\",\n \"reasons.nni_invalid\": \"الرقم الوطني ليس رقمًا صالحًا مكوّنًا من 10 أرقام\",\n \"reasons.registry_unavailable\": \"تعذّر الوصول إلى سجل الحالة المدنية لتأكيد الرقم الوطني\",\n \"reasons.result_from_cache\": \"أُكِّد فحص السجل استنادًا إلى نسخة حديثة من السجل\",\n \"reasons.no_face_source\": \"تعذّر اكتشاف وجه في الصورة الذاتية\",\n \"reasons.no_face_reference\":\n \"لم تتوفّر صورة مرجعية لمقارنة صورتك الذاتية بها — على الجهة الطالبة معالجة ذلك، وإعادة التقاط صورتك الذاتية لن تُجدي\",\n \"reasons.low_quality_reference\": \"الصورة المرجعية المحفوظة لم تكن واضحة بما يكفي للمقارنة\",\n \"reasons.below_threshold\": \"الصورة الذاتية لم تطابق صورة وثيقة الهوية بدرجة كافية\",\n \"reasons.side_missing\": \"أحد وجهي وثيقة الهوية لم يُرسل\",\n \"reasons.mrz_checksum_failed\": \"تعذّر التحقق من منطقة القراءة الآلية في الوثيقة\",\n \"reasons.unreadable\": \"صورة الوثيقة لم تكن واضحة بما يكفي للقراءة\",\n \"reasons.expired_document\": \"انتهت صلاحية وثيقة الهوية\",\n \"reasons.authenticity_review\": \"أُحيلت الوثيقة إلى مراجعة بشرية للتأكد من صحتها\",\n \"reasons.registry_mismatch\": \"بيانات الوثيقة لا تطابق السجل المدني — سيتحقق منها مراجع\",\n \"reasons.otp_mismatch\": \"رمز التحقّق لا يطابق الرمز الذي أرسلناه\",\n \"reasons.otp_expired\": \"انتهت صلاحية رمز التحقّق قبل إدخاله\",\n \"reasons.otp_send_failed\": \"تعذّر إرسال رمز التحقّق إلى هاتفك\",\n \"reasons.uncalibrated_capture_channel\":\n \"جودة الكاميرا المكتبية غير معايَرة بعد — أُحيل تحققك إلى مراجعة بشرية\",\n \"errors.attestation_invalid\": \"تعذّر التأكد من سلامة جلسة المتصفح — أعد تحميل الصفحة وحاول مجددًا\",\n \"errors.network_error\": \"تعذّر الوصول إلى خدمة التحقق — تحقق من اتصالك بالإنترنت وأعد المحاولة\",\n \"errors.session_expired\": \"انتهت صلاحية جلسة التحقق هذه — اطلب رابطًا جديدًا من الجهة التي أرسلتك إلى هنا\",\n \"errors.nni_unbound\": \"أُنشئ هذا الرابط دون رقمك الوطني للتعريف — اطلب رابطًا جديدًا من الجهة الطالبة\",\n};\n","// Built-in French copy — copied verbatim from identity-hosted/messages/fr.json.\nimport type { Strings } from \"./en\";\n\nexport const fr: Strings = {\n \"capture.start\": \"Démarrer la caméra\",\n \"capture.recordAgain\": \"Commencer une nouvelle tentative\",\n \"capture.switchCamera\": \"Changer de caméra\",\n \"capture.preparing.title\": \"Préparation de la capture sécurisée…\",\n \"capture.checking\": \"Nous vérifions votre identité…\",\n \"capture.checkingHint\": \"Cela prend généralement quelques secondes — gardez cette page ouverte\",\n \"capture.securityNote\":\n \"Vos images sont chiffrées et utilisées uniquement pour cette vérification\",\n \"capture.cameraOff\": \"Caméra éteinte\",\n \"capture.previewAlt\": \"Aperçu de l’image capturée de votre visage\",\n \"capture.retryCoaching.title\":\n \"Cette tentative n'a pas abouti — quelques ajustements vous aideront :\",\n \"capture.retryCoaching.light\":\n \"Placez-vous dans un endroit bien éclairé — lumière sur le visage, pas derrière vous\",\n \"capture.retryCoaching.eyeLevel\": \"Tenez votre téléphone à hauteur des yeux\",\n \"capture.retryCoaching.head\": \"Regardez droit vers la caméra, la tête bien droite\",\n \"capture.attemptsRemaining.one\": \"{count} tentative restante\",\n \"capture.attemptsRemaining.other\": \"{count} tentatives restantes\",\n \"common.retry\": \"Réessayer\",\n \"fcv2.err.permission\":\n \"Autorisez la caméra dans les réglages du navigateur (icône caméra dans la barre d’adresse), puis réessayez\",\n \"fcv2.err.notfound\": \"Aucune caméra détectée — branchez ou activez une caméra, puis réessayez\",\n \"fcv2.err.inuse\": \"La caméra est utilisée par une autre application — fermez-la, puis réessayez\",\n \"fcv2.err.insecure\":\n \"La caméra nécessite une connexion sécurisée (HTTPS) — rouvrez cette page en HTTPS\",\n \"fcv2.err.unsupported\":\n \"Votre navigateur ne prend pas en charge un format de capture compatible — ouvrez cette page dans un navigateur récent comme Chrome ou Safari\",\n \"fcv2.err.generic\":\n \"Caméra indisponible — réessayez, ou contactez le support si le problème persiste\",\n \"fcv3.no_face\": \"Nous ne voyons pas votre visage — tenez le téléphone devant vous\",\n \"fcv3.come_closer\": \"Rapprochez un peu le téléphone\",\n \"fcv3.move_back\": \"Éloignez un peu le téléphone\",\n \"fcv3.center_face\": \"Centrez votre visage dans le cercle\",\n \"fcv3.straighten\": \"Tenez la tête droite\",\n \"fcv3.more_light\": \"Cherchez un endroit plus lumineux — éclairez votre visage\",\n \"fcv3.too_bright\": \"Trop de lumière — tournez-vous dos à la source de lumière\",\n \"fcv3.hold_still\": \"Parfait — ne bougez plus\",\n \"fcv3.steady_camera\": \"Tenez le téléphone stable\",\n \"reasons.no_face\": \"Aucun visage n’a pu être détecté pendant la vérification\",\n \"reasons.media_unreadable\": \"La capture envoyée n’a pas pu être lue\",\n \"reasons.clip_too_short\": \"La capture était trop courte\",\n \"reasons.spoof_detected\":\n \"Le contrôle de présence n'a pas pu confirmer la présence d'une personne réelle devant la caméra\",\n \"reasons.review_band\":\n \"Le contrôle automatique n'a pas été concluant, il a donc été transmis à un examen humain\",\n \"reasons.nni_not_found\":\n \"Le numéro national d'identification n'a pas été trouvé dans le registre d'état civil\",\n \"reasons.nni_invalid\": \"Le numéro national d'identification n'est pas un NNI valide à 10 chiffres\",\n \"reasons.registry_unavailable\":\n \"Le registre d'état civil n'a pas pu être joint pour confirmer le NNI\",\n \"reasons.result_from_cache\":\n \"Le contrôle du registre a été confirmé à partir d'une copie récente du registre\",\n \"reasons.no_face_source\": \"Aucun visage n'a pu être détecté sur la photo selfie\",\n \"reasons.no_face_reference\":\n \"Aucune photo de référence n'était disponible pour comparer votre selfie — c'est au demandeur de le résoudre, reprendre votre selfie n'y changera rien\",\n \"reasons.low_quality_reference\":\n \"La photo de référence enregistrée n'était pas assez nette pour la comparaison\",\n \"reasons.below_threshold\":\n \"Le selfie ne correspondait pas suffisamment à la photo de la pièce d'identité\",\n \"reasons.side_missing\": \"Un côté de la pièce d'identité n'a pas été envoyé\",\n \"reasons.mrz_checksum_failed\":\n \"La zone de lecture automatique du document n'a pas pu être validée\",\n \"reasons.unreadable\": \"La photo du document n'était pas assez nette pour être lue\",\n \"reasons.expired_document\": \"La pièce d'identité a expiré\",\n \"reasons.authenticity_review\":\n \"Le document a été transmis à un examen humain pour confirmer son authenticité\",\n \"reasons.registry_mismatch\":\n \"Les informations du document ne correspondent pas au registre civil — un examinateur va vérifier\",\n \"reasons.otp_mismatch\": \"Le code de vérification ne correspond pas à celui que nous avons envoyé\",\n \"reasons.otp_expired\": \"Le code de vérification a expiré avant d'être saisi\",\n \"reasons.otp_send_failed\": \"Nous n'avons pas pu envoyer de code de vérification à votre téléphone\",\n \"reasons.uncalibrated_capture_channel\":\n \"Les captures webcam ne sont pas encore décidées automatiquement — votre vérification part en revue humaine\",\n \"errors.attestation_invalid\":\n \"Nous n'avons pas pu confirmer l'authenticité de cette session de navigateur — rechargez la page et réessayez\",\n \"errors.network_error\":\n \"Nous n'avons pas pu joindre le service de vérification — vérifiez votre connexion internet et réessayez\",\n \"errors.session_expired\":\n \"Cette session de vérification a expiré — demandez un nouveau lien à l'organisme qui vous a envoyé ici\",\n \"errors.nni_unbound\":\n \"Ce lien a été créé sans votre numéro national d'identification — demandez un nouveau lien à l'organisme demandeur\",\n};\n","// Built-in copy + the hint-code → string-key mapping. Keys are the hosted\n// message keys the capture surface uses (`capture.*`, `fcv2.err.*`, `fcv3.*`,\n// `reasons.*`, `errors.*`, `common.retry`) so Sekyro's hosted page can hand its\n// own next-intl catalog straight in through `strings`.\nimport type { CaptureErrorKind, GateHint, ReasonCode } from \"@sekyro/web\";\nimport { en, type StringKey, type Strings } from \"./en\";\n\n/** Locales with a built-in dictionary. */\nexport type SekyroLocale = \"ar\" | \"fr\" | \"en\";\n\nexport { en, type StringKey, type Strings };\nexport { ar } from \"./ar\";\nexport { fr } from \"./fr\";\n\n/** Gate hint code → the guidance line's string key. */\nexport function hintStringKey(hint: GateHint): StringKey {\n switch (hint) {\n case \"center\":\n return \"fcv3.center_face\";\n case \"closer\":\n return \"fcv3.come_closer\";\n case \"farther\":\n return \"fcv3.move_back\";\n case \"light\":\n return \"fcv3.more_light\";\n case \"still\":\n case \"hold\":\n return \"fcv3.hold_still\";\n default: {\n const unhandled: never = hint;\n throw new Error(`hintStringKey: unhandled hint ${unhandled as string}`);\n }\n }\n}\n\n/** Camera / engine failure kind → its copy key. */\nexport function captureErrorStringKey(kind: CaptureErrorKind): StringKey {\n return `fcv2.err.${kind}`;\n}\n\n/**\n * Result reason → copy key. SDK-side failure reasons map onto the existing\n * error copy (`no_recorder` is the browser's missing recorder = unsupported;\n * `attestation` / `network` reuse the hosted error copy); backend reasons use\n * `reasons.*`. Returns `null` for a reason without built-in copy.\n */\nexport function reasonStringKey(reason: ReasonCode): StringKey | null {\n switch (reason) {\n case \"no_recorder\":\n return \"fcv2.err.unsupported\";\n case \"attestation\":\n return \"errors.attestation_invalid\";\n case \"network\":\n return \"errors.network_error\";\n case \"nni_unbound\":\n return \"errors.nni_unbound\";\n default: {\n const key = `reasons.${reason}`;\n return Object.hasOwn(en, key) ? (key as StringKey) : null;\n }\n }\n}\n\n/**\n * The remaining-attempts line for `count`, pluralized with the locale's CLDR\n * rules (`Intl.PluralRules`) and the locale's digits (`Intl.NumberFormat`) —\n * the same rendering an ICU `{count, plural, …}` message produces.\n */\nexport function attemptsRemainingText(dictionary: Strings, locale: SekyroLocale, count: number): string {\n const category = new Intl.PluralRules(locale).select(count);\n const template =\n (category === \"other\" ? undefined : dictionary[`capture.attemptsRemaining.${category}`]) ??\n dictionary[\"capture.attemptsRemaining.other\"];\n return template.replace(\"{count}\", new Intl.NumberFormat(locale).format(count));\n}\n","// Capture stage — ported from identity-hosted/components/capture-stage.tsx\n// (Capture Stage v2): mirrored <video> + circular guide/scrim/tick ring + ONE\n// guidance line + in-stage icon controls + the captured still with the\n// \"checking\" state. Everything the user needs during the act lives INSIDE this\n// 3:4 box, so the whole stage fits one phone viewport.\n//\n// A11y capture contract:\n// - ONE always-mounted aria-live=\"polite\" region is the sole announcement\n// channel: hint copy during capture, capture.checking once the still is up.\n// - overlay text + icon chips sit on the fg scrim in the surface color;\n// - non-color status: stroke width + dashes + text carry every phase change.\n//\n// iOS engine contract: the <video> carries playsInline + muted — the engine\n// attaches the stream and calls play() itself. The element is NEVER unmounted\n// or display:none'd while captured — the still overlays it opaquely. In clip\n// mode the still lands at `frozen` (recording just ended; the tracks are still\n// finalizing the clip, hence NO camera-off pill yet) and stays through\n// `checking` (tracks stopped → the pill appears). The mirror transform is\n// direction-independent (RTL-safe); the still is NOT flipped (the keyframe is\n// pre-mirrored by the engine).\nimport type { GateHint } from \"@sekyro/web\";\nimport type { ReactNode, RefObject } from \"react\";\nimport { Button } from \"./button\";\nimport { CaptureArc, type CapturePhase } from \"./capture-arc\";\nimport type { StringKey } from \"./strings/index\";\nimport { useStrings } from \"./use-strings\";\n\nexport function CaptureStage({\n videoRef,\n guidanceText,\n guidanceHint,\n guidanceKey,\n progress,\n phase,\n draining = false,\n stillUrl,\n showChecking,\n onSwitchCamera,\n canSwitchCamera,\n voicePrompt,\n overlay,\n reduceMotion = false,\n}: {\n videoRef: RefObject<HTMLVideoElement | null>;\n /** Already-translated guidance line. */\n guidanceText: string;\n /** The hint code behind `guidanceText` (handed to the voice slot). */\n guidanceHint: GateHint | null;\n /** The string key behind `guidanceText` (the voice slot's clip selector). */\n guidanceKey: StringKey | null;\n /** Gate integrator 0..1 — chrome only, never gate input. */\n progress: number;\n phase: CapturePhase;\n draining?: boolean;\n /** The captured keyframe (frozen preview or object URL) — shown inside the stage from `frozen` on. */\n stillUrl: string | null;\n /** Verification mode: the umbrella \"checking\" copy + camera-off pill. */\n showChecking: boolean;\n onSwitchCamera: () => void;\n canSwitchCamera: boolean;\n /** Partner slot rendered in the start corner (audio / TTS controls). */\n voicePrompt?: ((hint: GateHint | null, text: string, key: StringKey | null) => ReactNode) | undefined;\n /** Partner slot rendered inside the stage box above the ring (overlays). */\n overlay?: ((videoRef: RefObject<HTMLVideoElement | null>) => ReactNode) | undefined;\n /** Force the reduced-motion variants (host hint) — prefers-reduced-motion is honoured by CSS regardless. */\n reduceMotion?: boolean;\n}) {\n const t = useStrings();\n const checking = phase === \"checking\";\n const frozen = phase === \"frozen\";\n // `settled` = recording is over and the still is on screen (frozen: clip\n // still finalizing; checking: blob landed, uploading). The still freezes the\n // stage the instant recording ends — no live feed left running while the\n // clip flushes. `checking` alone gates the camera-off pill: at `frozen` the\n // tracks are NOT stopped yet, so claiming \"camera off\" would be a trust bug.\n const settled = checking || frozen;\n // One umbrella line covers finish + upload + attestation + submit + verdict\n // wait — no \"uploading\"/\"sending\" leakage.\n const displayText = settled && showChecking ? t(\"capture.checking\") : guidanceText;\n const voice = voicePrompt?.(guidanceHint, displayText, guidanceKey);\n\n return (\n <div\n className={reduceMotion ? \"sekyro-stage sekyro-capture-reduce\" : \"sekyro-stage\"}\n data-testid=\"sekyro-capture-stage\"\n >\n {/* Live camera preview — no caption track exists; guidance is announced\n via the aria-live region below. Kept mounted through captured. */}\n <video ref={videoRef} playsInline muted className=\"sekyro-stage__video\" data-testid=\"sekyro-capture-video\" />\n {stillUrl !== null && settled ? (\n // \"Photo develops\": fade + settle-scale while the scrim deepens — NOT\n // flipped (the keyframe is pre-mirrored).\n <img\n src={stillUrl}\n alt={t(\"capture.previewAlt\")}\n className=\"sekyro-stage__still sekyro-capture-develop\"\n data-testid=\"sekyro-capture-still\"\n />\n ) : null}\n <CaptureArc progress={progress} phase={phase} draining={draining} />\n {overlay?.(videoRef)}\n\n {/* Controls: DOM order after the video/still, before and OUTSIDE the live\n region (label churn is never re-announced). Start corner = voice slot,\n end corner = flip camera; both hide once the still is up. */}\n {voice !== undefined && voice !== null && !settled ? (\n <div className=\"sekyro-stage__corner-start\" data-testid=\"sekyro-voice-slot\">\n {voice}\n </div>\n ) : null}\n {canSwitchCamera ? (\n <Button\n kind=\"chip\"\n onClick={onSwitchCamera}\n aria-label={t(\"capture.switchCamera\")}\n className=\"sekyro-stage__corner-end\"\n data-testid=\"sekyro-switch-camera\"\n >\n <FlipCameraIcon />\n </Button>\n ) : null}\n {checking && showChecking ? (\n /* Camera-off trust pill — where the flip control was. Truthful: the\n engine stopped the tracks the moment the artifacts landed. */\n <span\n className=\"sekyro-stage__corner-end sekyro-stage__pill sekyro-capture-pill-in\"\n data-testid=\"sekyro-camera-off-pill\"\n >\n <CameraOffIcon />\n {t(\"capture.cameraOff\")}\n </span>\n ) : null}\n\n {/* Always-mounted polite live region — the SOLE announcement channel\n (stable element identity; the inner span crossfades on text change). */}\n <p aria-live=\"polite\" className=\"sekyro-stage__guidance\" data-testid=\"sekyro-capture-guidance\">\n <span key={displayText} className=\"sekyro-stage__guidance-text sekyro-capture-text-in\">\n {displayText}\n </span>\n {settled && showChecking ? (\n <span className=\"sekyro-stage__guidance-hint\">{t(\"capture.checkingHint\")}</span>\n ) : null}\n </p>\n </div>\n );\n}\n\n/** Camera outline + two chasing arrows — the universal flip glyph. */\nfunction FlipCameraIcon() {\n return (\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.8\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"sekyro-icon\"\n >\n <path d=\"M4 7.5h2.2l1.4-1.9h8.8l1.4 1.9H20a1.6 1.6 0 0 1 1.6 1.6v8.3A1.6 1.6 0 0 1 20 19H4a1.6 1.6 0 0 1-1.6-1.6V9.1A1.6 1.6 0 0 1 4 7.5Z\" />\n <path d=\"M15.4 11.9a3.5 3.5 0 0 0-6.1-1.4M15.4 11.9h-2.1m2.1 0V9.8\" />\n <path d=\"M8.6 13.4a3.5 3.5 0 0 0 6.1 1.4M8.6 13.4h2.1m-2.1 0v2.1\" />\n </svg>\n );\n}\n\n/** Slashed camera — the trust pill's glyph. */\nfunction CameraOffIcon() {\n return (\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.8\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"sekyro-icon sekyro-icon--sm\"\n >\n <path d=\"M4 7.5h2.2l1.4-1.9h8.8l1.4 1.9H20a1.6 1.6 0 0 1 1.6 1.6v8.3A1.6 1.6 0 0 1 20 19H4a1.6 1.6 0 0 1-1.6-1.6V9.1A1.6 1.6 0 0 1 4 7.5Z\" />\n <path d=\"M3 3l18 18\" />\n </svg>\n );\n}\n","// Post-capture failure / retake surfaces, ported from\n// identity-hosted/components/steps/captured-panel.tsx: the retry coaching\n// (environment first, then framing) after a retryable verdict, and the\n// fresh-capture retake affordance. The happy path renders NOTHING here — the\n// still + the \"checking\" umbrella live inside the stage.\nimport { useEffect, useRef } from \"react\";\nimport { Button } from \"./button\";\nimport { useStrings } from \"./use-strings\";\n\nexport function CapturedPanel({\n showCoaching,\n attemptsText,\n showRetake,\n onRetake,\n}: {\n /** A retryable verdict came back: teach the fix. */\n showCoaching: boolean;\n /** Localized remaining-attempts line (null hides it — never claim \"0 attempts\"). */\n attemptsText: string | null;\n /** Offer a fresh attempt (the SDK did not re-arm by itself). */\n showRetake: boolean;\n onRetake: () => void;\n}) {\n const t = useStrings();\n const retakeRef = useRef<HTMLButtonElement | null>(null);\n // Focus the retake action when it appears (the user is being asked to act).\n useEffect(() => {\n if (showRetake) retakeRef.current?.focus();\n }, [showRetake]);\n if (!showCoaching && !showRetake) return null;\n return (\n <div className=\"sekyro-stack sekyro-stack--3\" data-testid=\"sekyro-captured-panel\">\n {showCoaching ? (\n <div className=\"sekyro-stack sekyro-stack--1\">\n <p className=\"sekyro-text-body\">{t(\"capture.retryCoaching.title\")}</p>\n {/* Coaching is essential guidance → fg, not fg-muted. */}\n <ul className=\"sekyro-coaching\">\n <li>{t(\"capture.retryCoaching.light\")}</li>\n <li>{t(\"capture.retryCoaching.eyeLevel\")}</li>\n <li>{t(\"capture.retryCoaching.head\")}</li>\n </ul>\n {attemptsText !== null ? (\n <p className=\"sekyro-text-muted\" data-testid=\"sekyro-attempts-remaining\">\n {attemptsText}\n </p>\n ) : null}\n </div>\n ) : null}\n {showRetake ? (\n <Button ref={retakeRef} className=\"sekyro-btn--start\" onClick={onRetake}>\n {t(\"capture.recordAgain\")}\n </Button>\n ) : null}\n </div>\n );\n}\n","// Inline notice (ported from identity-hosted/components/steps/notice.tsx):\n// info renders as a polite status, warning/danger interrupt via role=\"alert\"\n// unless `role` overrides it (the retry notice is warning-toned but polite —\n// the engine is already re-arming, nothing interrupts the person).\n// Tone paints the border + a tint of the surface; the text stays `fg` so the\n// copy keeps the theme's AAA fg/surface contrast on every tone.\nimport type { ReactNode } from \"react\";\n\nexport type NoticeTone = \"info\" | \"warning\" | \"danger\";\n\nexport function Notice({\n tone,\n role,\n children,\n testId,\n}: {\n tone: NoticeTone;\n /** Live-region role; defaults from the tone (`info` → status, else alert). */\n role?: \"status\" | \"alert\";\n children: ReactNode;\n testId?: string;\n}) {\n return (\n <div\n role={role ?? (tone === \"info\" ? \"status\" : \"alert\")}\n className={`sekyro-notice sekyro-notice--${tone}`}\n data-testid={testId}\n >\n {children}\n </div>\n );\n}\n","// Focus an element the moment it mounts — the failure-surface actions (retry,\n// retake) appear in response to something going wrong, so keyboard and\n// screen-reader users land on the action instead of hunting for it.\nimport { useCallback } from \"react\";\n\n/** A callback ref: focuses the element when it attaches. */\nexport function useFocusOnMount(): (element: HTMLElement | null) => void {\n return useCallback((element: HTMLElement | null) => {\n element?.focus();\n }, []);\n}\n","// React binding for a @sekyro/web LivenessCaptureHandle (replaces the hosted\n// useCapture + useCaptureSubmission pair): constructs the handle ONCE per\n// mount from the PUBLIC API — `verification.liveness({video})` or the\n// standalone `createLivenessCapture({video})` — mirrors its events into React\n// state and destroys it on unmount (camera tracks stopped — privacy).\n//\n// Retry delegates to the handle's own retry() (full engine reset + camera\n// restart); the mirror clears itself on the `starting` transition so stale\n// artifacts / errors / stills never leak into the new attempt.\n//\n// The `verification` is bound ONCE per mount (M3): a parent that re-creates it\n// (an unmemoised `createVerification()` in render) must not tear the camera\n// down and rebuild the engine — the first instance stays bound and a dev-only\n// warning names the mistake.\nimport {\n type CapturedArtifacts,\n type CaptureError,\n type CaptureState,\n createLivenessCapture,\n type GateUpdate,\n type LivenessCaptureHandle,\n type LivenessCaptureOptions,\n type Verification,\n type VerificationResult,\n} from \"@sekyro/web\";\nimport { type RefObject, useCallback, useEffect, useRef, useState } from \"react\";\n\nexport interface UseLivenessHandleOptions {\n verification: Verification | undefined;\n videoRef: RefObject<HTMLVideoElement | null>;\n assetBaseUrl: string | undefined;\n onCaptured: ((artifacts: CapturedArtifacts) => void) | undefined;\n onResult: ((result: VerificationResult) => void) | undefined;\n onError: ((error: CaptureError) => void) | undefined;\n onStateChange: ((state: CaptureState) => void) | undefined;\n}\n\nexport interface UseLivenessHandleResult {\n state: CaptureState;\n gate: GateUpdate;\n /** True while the gate integrator is FALLING (latest tick lowered progress). */\n draining: boolean;\n /** Chrome latch: once the fill completes within an attempt the ring stays locked. */\n gateLocked: boolean;\n /**\n * The keyframe preview the moment RECORDING ends (the handle's `frozen`\n * event) — ahead of `artifacts`, which only land once the clip finalizes.\n * Null until frozen; cleared on a fresh attempt.\n */\n frozenPreview: string | null;\n /** Device-profile hint: drop the decorative animations (LOW device class). */\n reduceMotion: boolean;\n artifacts: CapturedArtifacts | null;\n error: CaptureError | null;\n /** The latest verification result; cleared when the next capture lands. */\n result: VerificationResult | null;\n start: () => void;\n retry: () => void;\n switchCamera: () => void;\n}\n\nconst IDLE_GATE: GateUpdate = { progress: 0, hint: null, faceDetected: false };\n\n/** Dev-only: bundlers inline `process.env.NODE_ENV`; a bare browser has no `process`. */\nfunction isDevBuild(): boolean {\n try {\n return typeof process !== \"undefined\" && process.env.NODE_ENV !== \"production\";\n } catch {\n return false;\n }\n}\n\nexport function useLivenessHandle(options: UseLivenessHandleOptions): UseLivenessHandleResult {\n const { videoRef, assetBaseUrl } = options;\n // Bound once: the FIRST verification instance owns the handle for this mount.\n const verificationRef = useRef<Verification | undefined>(options.verification);\n const verification = verificationRef.current;\n const warnedRef = useRef(false);\n if (options.verification !== verification && !warnedRef.current && isDevBuild()) {\n warnedRef.current = true;\n console.warn(\n \"[@sekyro/react] <LivenessCapture>: the `verification` prop changed identity after mount. \" +\n \"The first instance stays bound (the camera is not rebuilt); create the verification once \" +\n \"(useMemo / useState / outside render) instead of on every render.\",\n );\n }\n const handleRef = useRef<LivenessCaptureHandle | null>(null);\n const [state, setState] = useState<CaptureState>(\"idle\");\n const [gate, setGate] = useState<GateUpdate>(IDLE_GATE);\n const [draining, setDraining] = useState(false);\n const [gateLocked, setGateLocked] = useState(false);\n const [frozenPreview, setFrozenPreview] = useState<string | null>(null);\n const [reduceMotion, setReduceMotion] = useState(false);\n const [artifacts, setArtifacts] = useState<CapturedArtifacts | null>(null);\n const [error, setError] = useState<CaptureError | null>(null);\n const [result, setResult] = useState<VerificationResult | null>(null);\n const lastProgressRef = useRef<number | null>(null);\n\n // Latest callbacks via a ref so the mount effect never re-runs for a new\n // inline handler (rebuilding the engine on every render would be a bug).\n const callbacksRef = useRef(options);\n callbacksRef.current = options;\n\n useEffect(() => {\n const video = videoRef.current;\n if (video === null) return;\n const captureOptions: LivenessCaptureOptions = {\n video,\n ...(assetBaseUrl !== undefined ? { assetBaseUrl } : {}),\n };\n const handle =\n verification !== undefined\n ? verification.liveness(captureOptions)\n : createLivenessCapture(captureOptions);\n handleRef.current = handle;\n\n const unsubscribes = [\n handle.on(\"state\", (next) => {\n if (next === \"starting\") {\n // Fresh attempt: the mirror resets with the engine's gate.\n setArtifacts(null);\n setError(null);\n setGate(IDLE_GATE);\n setGateLocked(false);\n setDraining(false);\n setFrozenPreview(null);\n lastProgressRef.current = null;\n }\n setState(next);\n callbacksRef.current.onStateChange?.(next);\n }),\n handle.on(\"gate\", (update) => {\n const previous = lastProgressRef.current;\n lastProgressRef.current = update.progress;\n // Draining = the integrator moved DOWN this tick; mid-fill only.\n setDraining(\n previous !== null &&\n update.progress < previous - 0.001 &&\n update.progress > 0 &&\n update.progress < 1,\n );\n if (update.progress >= 1) setGateLocked(true);\n setGate(update);\n }),\n handle.on(\"frozen\", ({ previewDataUrl }) => setFrozenPreview(previewDataUrl)),\n handle.on(\"profile\", ({ animations }) => setReduceMotion(animations === \"reduced\")),\n handle.on(\"captured\", (captured) => {\n setArtifacts(captured);\n setResult(null);\n callbacksRef.current.onCaptured?.(captured);\n }),\n handle.on(\"error\", (err) => {\n setError(err);\n callbacksRef.current.onError?.(err);\n }),\n verification?.on(\"result\", (next) => {\n setResult(next);\n callbacksRef.current.onResult?.(next);\n }),\n ];\n return () => {\n for (const unsubscribe of unsubscribes) unsubscribe?.();\n handleRef.current = null;\n handle.destroy();\n };\n }, [verification, videoRef, assetBaseUrl]);\n\n const start = useCallback(() => {\n void handleRef.current?.start();\n }, []);\n const retry = useCallback(() => {\n handleRef.current?.retry();\n }, []);\n const switchCamera = useCallback(() => {\n // The engine resets its gate on switch: the chrome latch must drop with it\n // (and any frozen still — a switch always precedes a fresh capture).\n setGateLocked(false);\n setDraining(false);\n setFrozenPreview(null);\n lastProgressRef.current = null;\n handleRef.current?.switchCamera();\n }, []);\n\n return {\n state,\n gate,\n draining,\n gateLocked,\n frozenPreview,\n reduceMotion,\n artifacts,\n error,\n result,\n start,\n retry,\n switchCamera,\n };\n}\n","// SekyroThemeProvider — the theme is a set of CSS custom properties written on\n// ONE wrapper element (`.sekyro-root`); every component paints through them\n// (`var(--sekyro-color-*)`), never through a literal color. Without a provider\n// the stylesheet's `:root` defaults apply (same values as DEFAULT_THEME).\nimport type { CSSProperties, ReactNode } from \"react\";\n\n/** Color tokens. Every value is any valid CSS `<color>`. */\nexport interface SekyroThemeColors {\n /** Primary action surface (buttons, filled ring ticks). */\n brand: string;\n /** Text on `brand`. */\n brandFg: string;\n /** Primary text; also the capture-stage scrim. */\n fg: string;\n /** Secondary text (hints, notes) — never essential instructions. */\n fgMuted: string;\n /** Page background behind the component. */\n bg: string;\n /** Card / panel surface the component sits on; also the text on the scrim. */\n surface: string;\n /** Focus ring. */\n ring: string;\n /** Error accents (notice border / tint). */\n danger: string;\n /** Gate-locked ring + success accents. */\n success: string;\n /** Draining-ring and retry-notice accents. */\n warning: string;\n}\n\n/** Theme shape accepted by {@link SekyroThemeProvider}. Partial: unset tokens keep the defaults. */\nexport interface SekyroTheme {\n /** Color tokens to override. */\n colors?: Partial<SekyroThemeColors>;\n /** Corner radius of panels and buttons (CSS length). */\n radius?: string;\n /** Font stack for all component text. */\n fontFamily?: string;\n}\n\n/**\n * Default theme. Every text pairing passes WCAG AAA (7:1) — fg/surface,\n * fg/bg, fgMuted/surface, brandFg/brand, surface/fg (the on-scrim guidance) —\n * and every UI accent passes 3:1 on surface (see test/contrast.test.ts).\n */\nexport const DEFAULT_THEME: Required<SekyroTheme> & { colors: SekyroThemeColors } = {\n colors: {\n brand: \"#1e40af\",\n brandFg: \"#ffffff\",\n fg: \"#111827\",\n fgMuted: \"#4b5563\",\n bg: \"#f8fafc\",\n surface: \"#ffffff\",\n ring: \"#1e40af\",\n danger: \"#b91c1c\",\n success: \"#15803d\",\n warning: \"#a16207\",\n },\n radius: \"12px\",\n fontFamily:\n 'system-ui, -apple-system, \"Segoe UI\", Roboto, \"Noto Sans Arabic\", \"Noto Sans\", sans-serif',\n};\n\nconst COLOR_VAR: Record<keyof SekyroThemeColors, string> = {\n brand: \"--sekyro-color-brand\",\n brandFg: \"--sekyro-color-brand-fg\",\n fg: \"--sekyro-color-fg\",\n fgMuted: \"--sekyro-color-fg-muted\",\n bg: \"--sekyro-color-bg\",\n surface: \"--sekyro-color-surface\",\n ring: \"--sekyro-color-ring\",\n danger: \"--sekyro-color-danger\",\n success: \"--sekyro-color-success\",\n warning: \"--sekyro-color-warning\",\n};\n\n/** The CSS custom properties a theme resolves to (defaults filled in). */\nexport function themeToCssVars(theme: SekyroTheme = {}): Record<string, string> {\n const vars: Record<string, string> = {};\n for (const key of Object.keys(COLOR_VAR) as (keyof SekyroThemeColors)[]) {\n vars[COLOR_VAR[key]] = theme.colors?.[key] ?? DEFAULT_THEME.colors[key];\n }\n vars[\"--sekyro-radius\"] = theme.radius ?? DEFAULT_THEME.radius;\n vars[\"--sekyro-font\"] = theme.fontFamily ?? DEFAULT_THEME.fontFamily;\n return vars;\n}\n\n/** Props of {@link SekyroThemeProvider}. */\nexport interface SekyroThemeProviderProps {\n /** Partial theme; unset tokens keep the {@link DEFAULT_THEME} values. */\n theme?: SekyroTheme;\n /** The subtree that reads the tokens. */\n children: ReactNode;\n /** Extra class on the wrapper (layout hooks for the host). */\n className?: string;\n}\n\n/**\n * Writes the theme's CSS variables on a wrapper `<div class=\"sekyro-root\">`.\n * Nest inside your own layout; import `@sekyro/react/styles.css` once.\n */\nexport function SekyroThemeProvider({ theme, children, className }: SekyroThemeProviderProps) {\n const style = themeToCssVars(theme) as CSSProperties;\n return (\n <div className={className === undefined ? \"sekyro-root\" : `sekyro-root ${className}`} style={style}>\n {children}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACeA,IAAAA,gBAAqF;;;ACZrF,mBAAsD;AAiB7C;AAPF,IAAM,aAAS,yBAA2C,SAASC,QACxE,EAAE,OAAO,WAAW,OAAO,OAAO,WAAW,MAAM,GAAG,KAAK,GAC3D,KACA;AACA,QAAM,UAAU,CAAC,cAAc,eAAe,IAAI,EAAE;AACpD,MAAI,KAAM,SAAQ,KAAK,kBAAkB;AACzC,MAAI,cAAc,OAAW,SAAQ,KAAK,SAAS;AACnD,SAAO,4CAAC,YAAO,KAAU,MAAM,QAAQ,UAAU,WAAW,QAAQ,KAAK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OAA+B,CAAC;AACtC,aAAW,OAAO,OAAO,KAAK,SAAS,GAAkC;AACvE,SAAK,UAAU,GAAG,CAAC,IAAI,MAAM,SAAS,GAAG,KAAK,cAAc,OAAO,GAAG;AAAA,EACxE;AACA,OAAK,iBAAiB,IAAI,MAAM,UAAU,cAAc;AACxD,OAAK,eAAe,IAAI,MAAM,cAAc,cAAc;AAC1D,SAAO;AACT;AAgBO,SAAS,oBAAoB,EAAE,OAAO,UAAU,UAAU,GAA6B;AAC5F,QAAM,QAAQ,eAAe,KAAK;AAClC,SACE,6CAAC,SAAI,WAAW,cAAc,SAAY,gBAAgB,eAAe,SAAS,IAAI,OACnF,UACH;AAEJ;","names":["import_react","Button","import_jsx_runtime","import_react","import_jsx_runtime","import_react","import_jsx_runtime","import_jsx_runtime","import_react","import_react","import_jsx_runtime","import_jsx_runtime"]}