@sekyro/web 0.1.0-rc.22.1 → 0.1.0-rc.24
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/CHANGELOG.md +10 -2
- package/README.md +2 -0
- package/dist/background-monitor-A7FKJOAG.js +1 -0
- package/dist/camera-trait-V4UAOPIQ.js +1 -0
- package/dist/{capture-session-doc-VSUEDAEN.js → capture-session-doc-RIBBH3M4.js} +1 -1
- package/dist/{capture-session-v3-DD-MXSU4.d.cts → capture-session-v3-CPHzDT7E.d.cts} +1 -1
- package/dist/{capture-session-v3-C-Q-21Fm.d.ts → capture-session-v3-TUPtnvmu.d.ts} +1 -1
- package/dist/{chunk-XLYHT4ZQ.js → chunk-33KKMPJ5.js} +1 -1
- package/dist/{chunk-J5IQ6THP.js → chunk-5YVQIHQA.js} +1 -1
- package/dist/{chunk-HFCVN6AG.js → chunk-A3FUGHAH.js} +1 -1
- package/dist/chunk-DMOGKGDS.js +1 -0
- package/dist/{chunk-H6REKPZ4.js → chunk-FLA42JCK.js} +1 -1
- package/dist/{chunk-EKEHAFEK.js → chunk-G6LKLN4U.js} +1 -1
- package/dist/chunk-IC6TI6GV.js +1 -0
- package/dist/chunk-IFLOS5OT.js +1 -0
- package/dist/{chunk-NHXLIDQJ.js → chunk-LBH6KGTV.js} +1 -1
- package/dist/{chunk-FSJPKOCC.js → chunk-MQBX4DQQ.js} +1 -1
- package/dist/{chunk-AXJ2VWIK.js → chunk-MXWLCDFX.js} +1 -1
- package/dist/{chunk-6RJTKX5I.js → chunk-QY6TJCOJ.js} +1 -1
- package/dist/{chunk-TYJA2XJR.js → chunk-RI3E7GBN.js} +1 -1
- package/dist/{chunk-RJZ5SARR.js → chunk-SX7TUC3V.js} +1 -1
- package/dist/{chunk-ACP2ZOVW.js → chunk-VWGKUQ3C.js} +1 -1
- package/dist/chunk-XI5FXEKC.js +1 -0
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.d.cts +3 -3
- package/dist/client/index.d.ts +3 -3
- package/dist/client/index.js +1 -1
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js +1 -1
- package/dist/core/ocr/worker.js +1 -1
- package/dist/core/v3/detect-worker.js +1 -1
- package/dist/create-document-capture-XQURFZZK.js +1 -0
- package/dist/create-portrait-capture-5VGYZUOK.js +1 -0
- package/dist/{create-verification-BsZ038gI.d.cts → create-verification-DF60lg8Y.d.cts} +29 -5
- package/dist/{create-verification-CfSZiPSN.d.ts → create-verification-acQzNRiB.d.ts} +29 -5
- package/dist/{detector-scanic-F3Y5X3DF.js → detector-scanic-YCDNLCGV.js} +1 -1
- package/dist/{icao-gate-BrnPW_gd.d.ts → icao-gate-CX0chQMM.d.cts} +8 -1
- package/dist/icao-gate-T3BTOKFJ.js +1 -0
- package/dist/{icao-gate-Bw0Fxd30.d.cts → icao-gate-VwsQo8Bq.d.ts} +8 -1
- package/dist/{icao-policy-C14ZKZ7r.d.ts → icao-policy-B02jDiox.d.ts} +2 -2
- package/dist/{icao-policy-DcaumEDt.d.cts → icao-policy-WnG2OSyp.d.cts} +2 -2
- package/dist/icao-tuning-4ETMF53W.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +1 -1
- package/dist/internal/index.cjs +1 -1
- package/dist/internal/index.d.cts +6 -6
- package/dist/internal/index.d.ts +6 -6
- package/dist/internal/index.js +1 -1
- package/dist/{landmarker-3BBP3RBY.js → landmarker-KB7LVXAU.js} +1 -1
- package/dist/mrz-band-VYHOTDHY.js +1 -0
- package/dist/{plan-runner-5UZYQ2XH.js → plan-runner-LDV4PYN7.js} +1 -1
- package/dist/popup/index.js +1 -1
- package/dist/{print-4WOMNRBE.js → print-SEWS3VHQ.js} +1 -1
- package/dist/{turnstile-MX6YN4YH.js → turnstile-52B3RFXD.js} +1 -1
- package/dist/{types-ChKVytm_.d.ts → types-1s8CQrEN.d.cts} +33 -11
- package/dist/{types-ChKVytm_.d.cts → types-1s8CQrEN.d.ts} +33 -11
- package/package.json +1 -1
- package/sbom.cdx.json +10 -10
- package/dist/background-monitor-GCMNCJMG.js +0 -1
- package/dist/camera-trait-HVV5ZEDI.js +0 -1
- package/dist/chunk-PVSYKKMP.js +0 -1
- package/dist/chunk-TTD5LQG2.js +0 -1
- package/dist/chunk-XK4CCTLL.js +0 -1
- package/dist/chunk-ZGDUIZC2.js +0 -1
- package/dist/create-document-capture-D7GUVFWF.js +0 -1
- package/dist/create-portrait-capture-VRZZOMJS.js +0 -1
- package/dist/icao-gate-SO6YJ7RV.js +0 -1
- package/dist/icao-tuning-DCZCMCEQ.js +0 -1
- package/dist/mrz-band-DCXFWDBD.js +0 -1
- /package/dist/{chunk-XB4KLBHY.js → chunk-2LDOXGY3.js} +0 -0
- /package/dist/{chunk-25TEJBSB.js → chunk-53POX7U4.js} +0 -0
- /package/dist/{chunk-CPK5FYNJ.js → chunk-7QZWBDI5.js} +0 -0
- /package/dist/{chunk-YH7DR3PF.js → chunk-CJHMFPL6.js} +0 -0
- /package/dist/{chunk-7KXJEF7P.js → chunk-CPUECYAJ.js} +0 -0
- /package/dist/{chunk-VP37FW6C.js → chunk-DFTCAWMP.js} +0 -0
- /package/dist/{chunk-LYYLXNA4.js → chunk-DK5YPBDQ.js} +0 -0
- /package/dist/{chunk-FK2DJADA.js → chunk-FPXL63KZ.js} +0 -0
- /package/dist/{chunk-UBRNDTTD.js → chunk-FSSMUAKC.js} +0 -0
- /package/dist/{chunk-LL3YYUKR.js → chunk-GI3UFGRQ.js} +0 -0
- /package/dist/{chunk-7TGVXBW6.js → chunk-LJYMZQY2.js} +0 -0
- /package/dist/{chunk-V5P5P3HY.js → chunk-POIQGEZM.js} +0 -0
- /package/dist/{chunk-NYRFUVAR.js → chunk-SMKCBUJL.js} +0 -0
- /package/dist/{chunk-V4VFZ7NQ.js → chunk-TDCLQRT4.js} +0 -0
- /package/dist/{chunk-BPKDXDDH.js → chunk-TDLIXFDT.js} +0 -0
- /package/dist/{chunk-CDDYFUER.js → chunk-TSA6GHUG.js} +0 -0
- /package/dist/{clip-inspect-HZ7N2YOP.js → clip-inspect-DLJXVKV6.js} +0 -0
- /package/dist/{keyframe-rank-R4NPQGN3.js → keyframe-rank-YAJLYJYF.js} +0 -0
- /package/dist/{scanic-ml-stub-XPNKT2N3.js → scanic-ml-stub-KW7IZHUT.js} +0 -0
- /package/dist/{segmenter-3CVPTZMM.js → segmenter-USLNBX65.js} +0 -0
- /package/dist/{upload-file-C4MFKLT3.js → upload-file-UYXOHCRG.js} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { b1 as DocCatalogEntry, b2 as LiveMrzTuning, b3 as TextLockTuning, b4 as OcrEngineClient, b5 as DocAssistReport, b6 as ReadyInfo, b7 as LoadFailure, b8 as OcrEngineOptions, b9 as SubmitRuntime, a3 as LivenessCaptureOptions, a2 as LivenessCaptureHandle, aM as VerificationStep, aK as VerificationResult, aB as StepSnapshot, _ as LivePhotoGateUpdate, ba as HostedClientLike } from '../create-verification-
|
|
2
|
-
export { bb as ANALYSIS_LONG_EDGE, bc as ASPECT_BANDS, bd as AttestationError, be as BLUR_REFUSE_SHARPNESS_MAX, bf as BlurStatus, bg as CAPTURE_CANDIDATE_SPACING_MS, bh as CAPTURE_EXTRA_CANDIDATES, bi as CLIP_MIME_ALLOWLIST, bj as CaptureEngine, bk as CaptureSessionDoc, bl as CaptureSessionDocEvents, bm as CaptureSessionDocOptions, bn as DOC_ANALYSIS_DEFAULTS, bo as DOC_BLACK_FRAME_LUMA, bp as DOC_BLACK_FRAME_TICKS, bq as DOC_CADENCE_HZ, br as DOC_CAMERA_TUNING_DEFAULTS, bs as DOC_CATALOG, bt as DOC_DETECT_WIDTH, bu as DOC_FEEDBACK_STATES, bv as DOC_FIRST_FRAME_MS, bw as DOC_GATE_V1_DEFAULTS, bx as DOC_SHUTTER_DEFAULTS, by as DeviceReadHint, bz as DocArtifacts, bA as DocAssist, bB as DocAssistEngine, bC as DocAssistTick, bD as DocCameraTuning, bE as DocCaptureReport, bF as DocCaptureVia, bG as DocChecksPayload, bH as DocEngineLike, bI as DocFeedbackAggregator, bJ as DocFeedbackKey, bK as DocFeedbackState, bL as DocFormat, bM as DocFrameAnalysis, bN as DocFrameMeasures, bO as DocGateQuality, bP as DocGateThresholds, bQ as DocGateTick, bR as DocGateTickInput, bS as DocGateV1, bT as DocQuad, bU as DocQuadPoint, bV as DocShutterReason, bW as DocShutterTuning, bX as DocSide, bY as DocumentCaptureController, bZ as DocumentCaptureInternals, b_ as EMPTY_GUIDE_METRICS, b$ as EncodedDocument, c0 as FLIP_FILL_MIN, c1 as FLIP_GAP_MS, c2 as FLIP_TIMEOUT_MS, c3 as FocusCaps, c4 as FramingStatus, c5 as GUIDE_LOCK_DEFAULTS, c6 as GlareStatus, c7 as GrabbedFrame, c8 as GuideBlocker, c9 as GuideLock, ca as GuideLockTick, cb as GuideLockTuning, cc as GuideMetrics, cd as GuideRect, ce as INFERENCE_RETRY_ATTEMPTS, cf as INFERENCE_RETRY_DEFAULT_S, W as ISSUER_CODES, cg as LANDMARKER_MODEL, ch as LENS_STORAGE_KEY, ci as LIVE_MRZ_DEFAULTS, cj as LIVE_PHOTO_IDLE_MS, ck as LIVE_PHOTO_MAX_HZ, cl as LandmarkedFace, cm as LandmarkerLike, cn as LensSource, co as LightingStatus, cp as LiveMrzCapture, cq as LiveMrzState, cr as LivePhotoGate, cs as LivePhotoKit, ct as LivePhotoKitInternals, cu as LivePhotoKitOptions, cv as LivePhotoStill, cw as LivenessCaptureInternalHandle, cx as LivenessCaptureInternals, cy as LivenessFlowDeps, cz as LivenessFlowOutcome, cA as MANUAL_SHUTTER_MS, cB as MR_DOC_CATALOG, cC as NO_REPORT_MS, cD as OpenDocCameraDeps, cE as PORTRAIT_JPEG_QUALITY, cF as PRELOAD_BLAZE_INIT_TIMEOUT_MS, cG as PRELOAD_BUDGET_MS, cH as PROCESSING_POLL_DELAY_MS, cI as PROCESSING_POLL_MAX, cJ as PortraitCaptureController, cK as PortraitCaptureInternals, cL as REGISTRY_RETRY_DELAY_MS, cM as ReticleType, cN as SAME_FACE_MAX_DROPS, cO as ScanEvent, cP as ScanLayout, cQ as ScanNotice, cR as ScanPhase, cS as ScanReport, cT as ScanSide, cU as ScanState, cV as SubmitExecutor, cW as TEXT_LOCK_DEFAULTS, cX as TRANSPORT_REPLAY_ATTEMPTS, cY as TRANSPORT_REPLAY_DELAY_MS, cZ as VerificationInternals, c_ as analyzeDocFrame, c$ as analyzeGuide, d0 as aspectBand, d1 as aspectFits, d2 as buildDeviceReadHint, d3 as coverPointToVideo, d4 as createDocumentCaptureInternal, d5 as createFaceLandmarker, d6 as createLivePhotoKit, d7 as createLivenessCaptureInternal, d8 as createPortraitCaptureInternal, d9 as createVerificationInternal, da as docZoomFor, db as encodeDocumentImage, dc as facesOf, dd as feedbackVoteOf, de as focusOk, df as guideQuad, dg as guideRegionInFrame, dh as initialScanState, di as mapEngineState, dj as mapErrorKind, dk as mapGuidanceHint, dl as nextScanState, dm as observePortraitFrame, dn as openDocCamera, dp as passportBandOf, dq as portraitMatchStep, dr as preloadedDetectorFactory, ds as quadAreaFrac, dt as quadBounds, du as quadIou, dv as quadTiltRatio, dw as randomUuid, dx as readStoredLens, dy as resetLivenessAssetsForTests, dz as resolveDocCameraTuning, dA as resolveDocShutterTuning, dB as resolveGuideLockTuning, dC as runLivenessFlow, dD as runSubmission, dE as scannerFormatFor, dF as setPreloadLoaderForTests, dG as settledHint, dH as singleShotFocusAt, dI as specularFraction, dJ as supportsFocusMode, dK as warmDocDetector, dL as writeStoredLens } from '../create-verification-
|
|
1
|
+
import { b1 as DocCatalogEntry, b2 as LiveMrzTuning, b3 as TextLockTuning, b4 as OcrEngineClient, b5 as DocAssistReport, b6 as ReadyInfo, b7 as LoadFailure, b8 as OcrEngineOptions, b9 as SubmitRuntime, a3 as LivenessCaptureOptions, a2 as LivenessCaptureHandle, aM as VerificationStep, aK as VerificationResult, aB as StepSnapshot, _ as LivePhotoGateUpdate, ba as HostedClientLike } from '../create-verification-DF60lg8Y.cjs';
|
|
2
|
+
export { bb as ANALYSIS_LONG_EDGE, bc as ASPECT_BANDS, bd as AttestationError, be as BLUR_REFUSE_SHARPNESS_MAX, bf as BlurStatus, bg as CAPTURE_CANDIDATE_SPACING_MS, bh as CAPTURE_EXTRA_CANDIDATES, bi as CLIP_MIME_ALLOWLIST, bj as CaptureEngine, bk as CaptureSessionDoc, bl as CaptureSessionDocEvents, bm as CaptureSessionDocOptions, bn as DOC_ANALYSIS_DEFAULTS, bo as DOC_BLACK_FRAME_LUMA, bp as DOC_BLACK_FRAME_TICKS, bq as DOC_CADENCE_HZ, br as DOC_CAMERA_TUNING_DEFAULTS, bs as DOC_CATALOG, bt as DOC_DETECT_WIDTH, bu as DOC_FEEDBACK_STATES, bv as DOC_FIRST_FRAME_MS, bw as DOC_GATE_V1_DEFAULTS, bx as DOC_SHUTTER_DEFAULTS, by as DeviceReadHint, bz as DocArtifacts, bA as DocAssist, bB as DocAssistEngine, bC as DocAssistTick, bD as DocCameraTuning, bE as DocCaptureReport, bF as DocCaptureVia, bG as DocChecksPayload, bH as DocEngineLike, bI as DocFeedbackAggregator, bJ as DocFeedbackKey, bK as DocFeedbackState, bL as DocFormat, bM as DocFrameAnalysis, bN as DocFrameMeasures, bO as DocGateQuality, bP as DocGateThresholds, bQ as DocGateTick, bR as DocGateTickInput, bS as DocGateV1, bT as DocQuad, bU as DocQuadPoint, bV as DocShutterReason, bW as DocShutterTuning, bX as DocSide, bY as DocumentCaptureController, bZ as DocumentCaptureInternals, b_ as EMPTY_GUIDE_METRICS, b$ as EncodedDocument, c0 as FLIP_FILL_MIN, c1 as FLIP_GAP_MS, c2 as FLIP_TIMEOUT_MS, c3 as FocusCaps, c4 as FramingStatus, c5 as GUIDE_LOCK_DEFAULTS, c6 as GlareStatus, c7 as GrabbedFrame, c8 as GuideBlocker, c9 as GuideLock, ca as GuideLockTick, cb as GuideLockTuning, cc as GuideMetrics, cd as GuideRect, ce as INFERENCE_RETRY_ATTEMPTS, cf as INFERENCE_RETRY_DEFAULT_S, W as ISSUER_CODES, cg as LANDMARKER_MODEL, ch as LENS_STORAGE_KEY, ci as LIVE_MRZ_DEFAULTS, cj as LIVE_PHOTO_IDLE_MS, ck as LIVE_PHOTO_MAX_HZ, cl as LandmarkedFace, cm as LandmarkerLike, cn as LensSource, co as LightingStatus, cp as LiveMrzCapture, cq as LiveMrzState, cr as LivePhotoGate, cs as LivePhotoKit, ct as LivePhotoKitInternals, cu as LivePhotoKitOptions, cv as LivePhotoStill, cw as LivenessCaptureInternalHandle, cx as LivenessCaptureInternals, cy as LivenessFlowDeps, cz as LivenessFlowOutcome, cA as MANUAL_SHUTTER_MS, cB as MR_DOC_CATALOG, cC as NO_REPORT_MS, cD as OpenDocCameraDeps, cE as PORTRAIT_JPEG_QUALITY, cF as PRELOAD_BLAZE_INIT_TIMEOUT_MS, cG as PRELOAD_BUDGET_MS, cH as PROCESSING_POLL_DELAY_MS, cI as PROCESSING_POLL_MAX, cJ as PortraitCaptureController, cK as PortraitCaptureInternals, cL as REGISTRY_RETRY_DELAY_MS, cM as ReticleType, cN as SAME_FACE_MAX_DROPS, cO as ScanEvent, cP as ScanLayout, cQ as ScanNotice, cR as ScanPhase, cS as ScanReport, cT as ScanSide, cU as ScanState, cV as SubmitExecutor, cW as TEXT_LOCK_DEFAULTS, cX as TRANSPORT_REPLAY_ATTEMPTS, cY as TRANSPORT_REPLAY_DELAY_MS, cZ as VerificationInternals, c_ as analyzeDocFrame, c$ as analyzeGuide, d0 as aspectBand, d1 as aspectFits, d2 as buildDeviceReadHint, d3 as coverPointToVideo, d4 as createDocumentCaptureInternal, d5 as createFaceLandmarker, d6 as createLivePhotoKit, d7 as createLivenessCaptureInternal, d8 as createPortraitCaptureInternal, d9 as createVerificationInternal, da as docZoomFor, db as encodeDocumentImage, dc as facesOf, dd as feedbackVoteOf, de as focusOk, df as guideQuad, dg as guideRegionInFrame, dh as initialScanState, di as mapEngineState, dj as mapErrorKind, dk as mapGuidanceHint, dl as nextScanState, dm as observePortraitFrame, dn as openDocCamera, dp as passportBandOf, dq as portraitMatchStep, dr as preloadedDetectorFactory, ds as quadAreaFrac, dt as quadBounds, du as quadIou, dv as quadTiltRatio, dw as randomUuid, dx as readStoredLens, dy as resetLivenessAssetsForTests, dz as resolveDocCameraTuning, dA as resolveDocShutterTuning, dB as resolveGuideLockTuning, dC as runLivenessFlow, dD as runSubmission, dE as scannerFormatFor, dF as setPreloadLoaderForTests, dG as settledHint, dH as singleShotFocusAt, dI as specularFraction, dJ as supportsFocusMode, dK as warmDocDetector, dL as writeStoredLens } from '../create-verification-DF60lg8Y.cjs';
|
|
3
3
|
export { C as CENTERED_FACTOR, a as CIRCLE_RADIUS_FACTOR, F as FormFactor, I as IN_CIRCLE_FACTOR, d as detectFormFactor, c as detectIsMobile } from '../capture-constraints-CVqpMNGA.cjs';
|
|
4
|
-
import { S as HostedSessionView, h as CheckType,
|
|
5
|
-
export {
|
|
6
|
-
export { B as BackgroundStats, h as Box, C as CLIPPED_LUMA, F as FaceGeometry, i as FaceLighting, c as HeadPose, j as ICAO_CANVAS, k as ICAO_GATE_CRITERIA, l as ICAO_SHARP_REF, I as IcaoCoachKey, d as IcaoCriterionState, m as IcaoFrameObservation, n as IcaoGate, e as IcaoGateCriterion, o as IcaoGateOptions, p as IcaoGateScores, f as IcaoGateSummary, g as IcaoGateUpdate, q as IcaoJudgedCriterion, r as IcaoMeasures, t as IcaoMouthScores, u as IcaoPixelStats, L as LumaPlane, P as Point, R as RegionStats, v as backgroundStats, w as createIcaoGate, x as eyeLineRoll, y as eyeOpenness, z as eyeSpecular, A as faceGeometry, D as faceLighting, E as faceSharpness, G as icaoPixelStats, J as icaoWindow, K as judgeIcao, N as lumaPlane, O as percentile, Q as portraitCropRegion, T as poseFromMatrix, V as regionStats, W as scoreFrame, X as windowOverflow } from '../icao-gate-
|
|
4
|
+
import { S as HostedSessionView, h as CheckType, an as PlanStepView } from '../types-1s8CQrEN.cjs';
|
|
5
|
+
export { a$ as ICAO_FALLBACK, aV as IcaoCaptureTuning, b0 as IcaoProfile, b1 as ResolvedIcaoTuning, b2 as resolveIcaoTuning } from '../types-1s8CQrEN.cjs';
|
|
6
|
+
export { B as BackgroundStats, h as Box, C as CLIPPED_LUMA, F as FaceGeometry, i as FaceLighting, c as HeadPose, j as ICAO_CANVAS, k as ICAO_GATE_CRITERIA, l as ICAO_SHARP_REF, I as IcaoCoachKey, d as IcaoCriterionState, m as IcaoFrameObservation, n as IcaoGate, e as IcaoGateCriterion, o as IcaoGateOptions, p as IcaoGateScores, f as IcaoGateSummary, g as IcaoGateUpdate, q as IcaoJudgedCriterion, r as IcaoMeasures, t as IcaoMouthScores, u as IcaoPixelStats, L as LumaPlane, P as Point, R as RegionStats, v as backgroundStats, w as createIcaoGate, x as eyeLineRoll, y as eyeOpenness, z as eyeSpecular, A as faceGeometry, D as faceLighting, E as faceSharpness, G as icaoPixelStats, J as icaoWindow, K as judgeIcao, N as lumaPlane, O as percentile, Q as portraitCropRegion, T as poseFromMatrix, V as regionStats, W as scoreFrame, X as windowOverflow } from '../icao-gate-CX0chQMM.cjs';
|
|
7
7
|
import '../detect-worker-CHqsPJoM.cjs';
|
|
8
|
-
import '../capture-session-v3-
|
|
8
|
+
import '../capture-session-v3-CPHzDT7E.cjs';
|
|
9
9
|
|
|
10
10
|
/** At most this many ranked lenses are tried (each costs a camera reopen). */
|
|
11
11
|
declare const LENS_TRY_MAX = 3;
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { b1 as DocCatalogEntry, b2 as LiveMrzTuning, b3 as TextLockTuning, b4 as OcrEngineClient, b5 as DocAssistReport, b6 as ReadyInfo, b7 as LoadFailure, b8 as OcrEngineOptions, b9 as SubmitRuntime, a3 as LivenessCaptureOptions, a2 as LivenessCaptureHandle, aM as VerificationStep, aK as VerificationResult, aB as StepSnapshot, _ as LivePhotoGateUpdate, ba as HostedClientLike } from '../create-verification-
|
|
2
|
-
export { bb as ANALYSIS_LONG_EDGE, bc as ASPECT_BANDS, bd as AttestationError, be as BLUR_REFUSE_SHARPNESS_MAX, bf as BlurStatus, bg as CAPTURE_CANDIDATE_SPACING_MS, bh as CAPTURE_EXTRA_CANDIDATES, bi as CLIP_MIME_ALLOWLIST, bj as CaptureEngine, bk as CaptureSessionDoc, bl as CaptureSessionDocEvents, bm as CaptureSessionDocOptions, bn as DOC_ANALYSIS_DEFAULTS, bo as DOC_BLACK_FRAME_LUMA, bp as DOC_BLACK_FRAME_TICKS, bq as DOC_CADENCE_HZ, br as DOC_CAMERA_TUNING_DEFAULTS, bs as DOC_CATALOG, bt as DOC_DETECT_WIDTH, bu as DOC_FEEDBACK_STATES, bv as DOC_FIRST_FRAME_MS, bw as DOC_GATE_V1_DEFAULTS, bx as DOC_SHUTTER_DEFAULTS, by as DeviceReadHint, bz as DocArtifacts, bA as DocAssist, bB as DocAssistEngine, bC as DocAssistTick, bD as DocCameraTuning, bE as DocCaptureReport, bF as DocCaptureVia, bG as DocChecksPayload, bH as DocEngineLike, bI as DocFeedbackAggregator, bJ as DocFeedbackKey, bK as DocFeedbackState, bL as DocFormat, bM as DocFrameAnalysis, bN as DocFrameMeasures, bO as DocGateQuality, bP as DocGateThresholds, bQ as DocGateTick, bR as DocGateTickInput, bS as DocGateV1, bT as DocQuad, bU as DocQuadPoint, bV as DocShutterReason, bW as DocShutterTuning, bX as DocSide, bY as DocumentCaptureController, bZ as DocumentCaptureInternals, b_ as EMPTY_GUIDE_METRICS, b$ as EncodedDocument, c0 as FLIP_FILL_MIN, c1 as FLIP_GAP_MS, c2 as FLIP_TIMEOUT_MS, c3 as FocusCaps, c4 as FramingStatus, c5 as GUIDE_LOCK_DEFAULTS, c6 as GlareStatus, c7 as GrabbedFrame, c8 as GuideBlocker, c9 as GuideLock, ca as GuideLockTick, cb as GuideLockTuning, cc as GuideMetrics, cd as GuideRect, ce as INFERENCE_RETRY_ATTEMPTS, cf as INFERENCE_RETRY_DEFAULT_S, W as ISSUER_CODES, cg as LANDMARKER_MODEL, ch as LENS_STORAGE_KEY, ci as LIVE_MRZ_DEFAULTS, cj as LIVE_PHOTO_IDLE_MS, ck as LIVE_PHOTO_MAX_HZ, cl as LandmarkedFace, cm as LandmarkerLike, cn as LensSource, co as LightingStatus, cp as LiveMrzCapture, cq as LiveMrzState, cr as LivePhotoGate, cs as LivePhotoKit, ct as LivePhotoKitInternals, cu as LivePhotoKitOptions, cv as LivePhotoStill, cw as LivenessCaptureInternalHandle, cx as LivenessCaptureInternals, cy as LivenessFlowDeps, cz as LivenessFlowOutcome, cA as MANUAL_SHUTTER_MS, cB as MR_DOC_CATALOG, cC as NO_REPORT_MS, cD as OpenDocCameraDeps, cE as PORTRAIT_JPEG_QUALITY, cF as PRELOAD_BLAZE_INIT_TIMEOUT_MS, cG as PRELOAD_BUDGET_MS, cH as PROCESSING_POLL_DELAY_MS, cI as PROCESSING_POLL_MAX, cJ as PortraitCaptureController, cK as PortraitCaptureInternals, cL as REGISTRY_RETRY_DELAY_MS, cM as ReticleType, cN as SAME_FACE_MAX_DROPS, cO as ScanEvent, cP as ScanLayout, cQ as ScanNotice, cR as ScanPhase, cS as ScanReport, cT as ScanSide, cU as ScanState, cV as SubmitExecutor, cW as TEXT_LOCK_DEFAULTS, cX as TRANSPORT_REPLAY_ATTEMPTS, cY as TRANSPORT_REPLAY_DELAY_MS, cZ as VerificationInternals, c_ as analyzeDocFrame, c$ as analyzeGuide, d0 as aspectBand, d1 as aspectFits, d2 as buildDeviceReadHint, d3 as coverPointToVideo, d4 as createDocumentCaptureInternal, d5 as createFaceLandmarker, d6 as createLivePhotoKit, d7 as createLivenessCaptureInternal, d8 as createPortraitCaptureInternal, d9 as createVerificationInternal, da as docZoomFor, db as encodeDocumentImage, dc as facesOf, dd as feedbackVoteOf, de as focusOk, df as guideQuad, dg as guideRegionInFrame, dh as initialScanState, di as mapEngineState, dj as mapErrorKind, dk as mapGuidanceHint, dl as nextScanState, dm as observePortraitFrame, dn as openDocCamera, dp as passportBandOf, dq as portraitMatchStep, dr as preloadedDetectorFactory, ds as quadAreaFrac, dt as quadBounds, du as quadIou, dv as quadTiltRatio, dw as randomUuid, dx as readStoredLens, dy as resetLivenessAssetsForTests, dz as resolveDocCameraTuning, dA as resolveDocShutterTuning, dB as resolveGuideLockTuning, dC as runLivenessFlow, dD as runSubmission, dE as scannerFormatFor, dF as setPreloadLoaderForTests, dG as settledHint, dH as singleShotFocusAt, dI as specularFraction, dJ as supportsFocusMode, dK as warmDocDetector, dL as writeStoredLens } from '../create-verification-
|
|
1
|
+
import { b1 as DocCatalogEntry, b2 as LiveMrzTuning, b3 as TextLockTuning, b4 as OcrEngineClient, b5 as DocAssistReport, b6 as ReadyInfo, b7 as LoadFailure, b8 as OcrEngineOptions, b9 as SubmitRuntime, a3 as LivenessCaptureOptions, a2 as LivenessCaptureHandle, aM as VerificationStep, aK as VerificationResult, aB as StepSnapshot, _ as LivePhotoGateUpdate, ba as HostedClientLike } from '../create-verification-acQzNRiB.js';
|
|
2
|
+
export { bb as ANALYSIS_LONG_EDGE, bc as ASPECT_BANDS, bd as AttestationError, be as BLUR_REFUSE_SHARPNESS_MAX, bf as BlurStatus, bg as CAPTURE_CANDIDATE_SPACING_MS, bh as CAPTURE_EXTRA_CANDIDATES, bi as CLIP_MIME_ALLOWLIST, bj as CaptureEngine, bk as CaptureSessionDoc, bl as CaptureSessionDocEvents, bm as CaptureSessionDocOptions, bn as DOC_ANALYSIS_DEFAULTS, bo as DOC_BLACK_FRAME_LUMA, bp as DOC_BLACK_FRAME_TICKS, bq as DOC_CADENCE_HZ, br as DOC_CAMERA_TUNING_DEFAULTS, bs as DOC_CATALOG, bt as DOC_DETECT_WIDTH, bu as DOC_FEEDBACK_STATES, bv as DOC_FIRST_FRAME_MS, bw as DOC_GATE_V1_DEFAULTS, bx as DOC_SHUTTER_DEFAULTS, by as DeviceReadHint, bz as DocArtifacts, bA as DocAssist, bB as DocAssistEngine, bC as DocAssistTick, bD as DocCameraTuning, bE as DocCaptureReport, bF as DocCaptureVia, bG as DocChecksPayload, bH as DocEngineLike, bI as DocFeedbackAggregator, bJ as DocFeedbackKey, bK as DocFeedbackState, bL as DocFormat, bM as DocFrameAnalysis, bN as DocFrameMeasures, bO as DocGateQuality, bP as DocGateThresholds, bQ as DocGateTick, bR as DocGateTickInput, bS as DocGateV1, bT as DocQuad, bU as DocQuadPoint, bV as DocShutterReason, bW as DocShutterTuning, bX as DocSide, bY as DocumentCaptureController, bZ as DocumentCaptureInternals, b_ as EMPTY_GUIDE_METRICS, b$ as EncodedDocument, c0 as FLIP_FILL_MIN, c1 as FLIP_GAP_MS, c2 as FLIP_TIMEOUT_MS, c3 as FocusCaps, c4 as FramingStatus, c5 as GUIDE_LOCK_DEFAULTS, c6 as GlareStatus, c7 as GrabbedFrame, c8 as GuideBlocker, c9 as GuideLock, ca as GuideLockTick, cb as GuideLockTuning, cc as GuideMetrics, cd as GuideRect, ce as INFERENCE_RETRY_ATTEMPTS, cf as INFERENCE_RETRY_DEFAULT_S, W as ISSUER_CODES, cg as LANDMARKER_MODEL, ch as LENS_STORAGE_KEY, ci as LIVE_MRZ_DEFAULTS, cj as LIVE_PHOTO_IDLE_MS, ck as LIVE_PHOTO_MAX_HZ, cl as LandmarkedFace, cm as LandmarkerLike, cn as LensSource, co as LightingStatus, cp as LiveMrzCapture, cq as LiveMrzState, cr as LivePhotoGate, cs as LivePhotoKit, ct as LivePhotoKitInternals, cu as LivePhotoKitOptions, cv as LivePhotoStill, cw as LivenessCaptureInternalHandle, cx as LivenessCaptureInternals, cy as LivenessFlowDeps, cz as LivenessFlowOutcome, cA as MANUAL_SHUTTER_MS, cB as MR_DOC_CATALOG, cC as NO_REPORT_MS, cD as OpenDocCameraDeps, cE as PORTRAIT_JPEG_QUALITY, cF as PRELOAD_BLAZE_INIT_TIMEOUT_MS, cG as PRELOAD_BUDGET_MS, cH as PROCESSING_POLL_DELAY_MS, cI as PROCESSING_POLL_MAX, cJ as PortraitCaptureController, cK as PortraitCaptureInternals, cL as REGISTRY_RETRY_DELAY_MS, cM as ReticleType, cN as SAME_FACE_MAX_DROPS, cO as ScanEvent, cP as ScanLayout, cQ as ScanNotice, cR as ScanPhase, cS as ScanReport, cT as ScanSide, cU as ScanState, cV as SubmitExecutor, cW as TEXT_LOCK_DEFAULTS, cX as TRANSPORT_REPLAY_ATTEMPTS, cY as TRANSPORT_REPLAY_DELAY_MS, cZ as VerificationInternals, c_ as analyzeDocFrame, c$ as analyzeGuide, d0 as aspectBand, d1 as aspectFits, d2 as buildDeviceReadHint, d3 as coverPointToVideo, d4 as createDocumentCaptureInternal, d5 as createFaceLandmarker, d6 as createLivePhotoKit, d7 as createLivenessCaptureInternal, d8 as createPortraitCaptureInternal, d9 as createVerificationInternal, da as docZoomFor, db as encodeDocumentImage, dc as facesOf, dd as feedbackVoteOf, de as focusOk, df as guideQuad, dg as guideRegionInFrame, dh as initialScanState, di as mapEngineState, dj as mapErrorKind, dk as mapGuidanceHint, dl as nextScanState, dm as observePortraitFrame, dn as openDocCamera, dp as passportBandOf, dq as portraitMatchStep, dr as preloadedDetectorFactory, ds as quadAreaFrac, dt as quadBounds, du as quadIou, dv as quadTiltRatio, dw as randomUuid, dx as readStoredLens, dy as resetLivenessAssetsForTests, dz as resolveDocCameraTuning, dA as resolveDocShutterTuning, dB as resolveGuideLockTuning, dC as runLivenessFlow, dD as runSubmission, dE as scannerFormatFor, dF as setPreloadLoaderForTests, dG as settledHint, dH as singleShotFocusAt, dI as specularFraction, dJ as supportsFocusMode, dK as warmDocDetector, dL as writeStoredLens } from '../create-verification-acQzNRiB.js';
|
|
3
3
|
export { C as CENTERED_FACTOR, a as CIRCLE_RADIUS_FACTOR, F as FormFactor, I as IN_CIRCLE_FACTOR, d as detectFormFactor, c as detectIsMobile } from '../capture-constraints-CVqpMNGA.js';
|
|
4
|
-
import { S as HostedSessionView, h as CheckType,
|
|
5
|
-
export {
|
|
6
|
-
export { B as BackgroundStats, h as Box, C as CLIPPED_LUMA, F as FaceGeometry, i as FaceLighting, c as HeadPose, j as ICAO_CANVAS, k as ICAO_GATE_CRITERIA, l as ICAO_SHARP_REF, I as IcaoCoachKey, d as IcaoCriterionState, m as IcaoFrameObservation, n as IcaoGate, e as IcaoGateCriterion, o as IcaoGateOptions, p as IcaoGateScores, f as IcaoGateSummary, g as IcaoGateUpdate, q as IcaoJudgedCriterion, r as IcaoMeasures, t as IcaoMouthScores, u as IcaoPixelStats, L as LumaPlane, P as Point, R as RegionStats, v as backgroundStats, w as createIcaoGate, x as eyeLineRoll, y as eyeOpenness, z as eyeSpecular, A as faceGeometry, D as faceLighting, E as faceSharpness, G as icaoPixelStats, J as icaoWindow, K as judgeIcao, N as lumaPlane, O as percentile, Q as portraitCropRegion, T as poseFromMatrix, V as regionStats, W as scoreFrame, X as windowOverflow } from '../icao-gate-
|
|
4
|
+
import { S as HostedSessionView, h as CheckType, an as PlanStepView } from '../types-1s8CQrEN.js';
|
|
5
|
+
export { a$ as ICAO_FALLBACK, aV as IcaoCaptureTuning, b0 as IcaoProfile, b1 as ResolvedIcaoTuning, b2 as resolveIcaoTuning } from '../types-1s8CQrEN.js';
|
|
6
|
+
export { B as BackgroundStats, h as Box, C as CLIPPED_LUMA, F as FaceGeometry, i as FaceLighting, c as HeadPose, j as ICAO_CANVAS, k as ICAO_GATE_CRITERIA, l as ICAO_SHARP_REF, I as IcaoCoachKey, d as IcaoCriterionState, m as IcaoFrameObservation, n as IcaoGate, e as IcaoGateCriterion, o as IcaoGateOptions, p as IcaoGateScores, f as IcaoGateSummary, g as IcaoGateUpdate, q as IcaoJudgedCriterion, r as IcaoMeasures, t as IcaoMouthScores, u as IcaoPixelStats, L as LumaPlane, P as Point, R as RegionStats, v as backgroundStats, w as createIcaoGate, x as eyeLineRoll, y as eyeOpenness, z as eyeSpecular, A as faceGeometry, D as faceLighting, E as faceSharpness, G as icaoPixelStats, J as icaoWindow, K as judgeIcao, N as lumaPlane, O as percentile, Q as portraitCropRegion, T as poseFromMatrix, V as regionStats, W as scoreFrame, X as windowOverflow } from '../icao-gate-VwsQo8Bq.js';
|
|
7
7
|
import '../detect-worker-CHqsPJoM.js';
|
|
8
|
-
import '../capture-session-v3-
|
|
8
|
+
import '../capture-session-v3-TUPtnvmu.js';
|
|
9
9
|
|
|
10
10
|
/** At most this many ranked lenses are tried (each costs a camera reopen). */
|
|
11
11
|
declare const LENS_TRY_MAX = 3;
|
package/dist/internal/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as me,d as _e,e as Le,h as Te,i as Re,j as Se}from"../chunk-
|
|
1
|
+
import{c as me,d as _e,e as Le,h as Te,i as Re,j as Se}from"../chunk-IC6TI6GV.js";import{a as W,b as ve,c as ge,d as be,e as Ge,f as he,g as Ue,h as Ye,i as He,j as k,k as K,l as w,m as X,n as Z,o as J,p as Q,q as j,r as q,s as $,t as ee,u as te,x as re}from"../chunk-MQBX4DQQ.js";import{a as Bt,b as Vt,c as Xt,d as Zt,e as Jt,f as Qt,g as jt,h as qt,i as $t,j as ne,k as ae,m as se,n as Ee}from"../chunk-VWGKUQ3C.js";import{a as Ft,b as Nt,c as vt,d as gt,e as bt,f as Gt,g as ht,h as Ut,i as Yt,j as Ht,k as Wt,l as kt,m as Kt}from"../chunk-53POX7U4.js";import{a as wt,b as zt}from"../chunk-33KKMPJ5.js";import{b as oe,c as pe,d as ie}from"../chunk-CJHMFPL6.js";import"../chunk-RI3E7GBN.js";import"../chunk-GI3UFGRQ.js";import{a as D,b as d,c as M,d as F,e as N}from"../chunk-TDCLQRT4.js";import{A as ut,B as It,C as Ot,D as xt,E as At,F as Ct,G as Pt,H as Dt,I as dt,J as Mt,a as Ke,b as we,c as ze,d as je,e as qe,f as $e,g as et,h as tt,i as rt,j as ot,k as pt,l as it,m as nt,n as at,o as st,p as Et,q as mt,r as _t,s as Lt,t as Tt,u as Rt,v as St,w as ct,x as lt,y as yt,z as ft}from"../chunk-FLA42JCK.js";import{a as v,b as g,c as b,d as G,e as h,f as U,g as Y,h as H,i as z,j as B,l as V}from"../chunk-G6LKLN4U.js";import{a as We,b as ke}from"../chunk-SMKCBUJL.js";import{a as Be,b as Ve,c as Xe,d as Ze,e as Je,f as Qe}from"../chunk-MXWLCDFX.js";import{a as Pe,b as De,c as de,d as Me,e as Fe,f as Ne}from"../chunk-TDLIXFDT.js";import{b as le,c as ye,d as fe,e as ue,g as Ie,h as er,i as tr,j as rr,k as or,l as pr,m as ir,s as Oe}from"../chunk-DMOGKGDS.js";import{A as C,B as P,i as R,j as S,k as c,l,o as y,u as f,v as u,w as I,x as O,y as x,z as A}from"../chunk-QY6TJCOJ.js";import{a as i,b as n,c as a,d as s,i as E,j as m,k as _,l as L,n as T}from"../chunk-LBH6KGTV.js";import"../chunk-7QZWBDI5.js";import"../chunk-5YVQIHQA.js";import"../chunk-SX7TUC3V.js";import"../chunk-POIQGEZM.js";import{p as xe,q as Ae,r as Ce}from"../chunk-CPUECYAJ.js";import"../chunk-FPXL63KZ.js";import"../chunk-XI5FXEKC.js";import{c as e,d as t,f as r,g as o,h as p}from"../chunk-TSA6GHUG.js";import"../chunk-IFLOS5OT.js";import"../chunk-FSSMUAKC.js";import{a as ce}from"../chunk-DFTCAWMP.js";import"../chunk-DK5YPBDQ.js";export{ne as ANALYSIS_LONG_EDGE,Pe as ASPECT_BANDS,A as AttestationError,Ue as BLUR_REFUSE_SHARPNESS_MAX,Mt as CAPTURE_CANDIDATE_SPACING_MS,dt as CAPTURE_EXTRA_CANDIDATES,p as CENTERED_FACTOR,r as CIRCLE_RADIUS_FACTOR,Bt as CLIPPED_LUMA,f as CLIP_MIME_ALLOWLIST,Pt as CaptureSessionDoc,tr as DOCUMENT_TYPE_ORDER,je as DOC_ANALYSIS_DEFAULTS,It as DOC_BLACK_FRAME_LUMA,Ot as DOC_BLACK_FRAME_TICKS,xt as DOC_CADENCE_HZ,tt as DOC_CAMERA_TUNING_DEFAULTS,Fe as DOC_CATALOG,Be as DOC_DETECT_WIDTH,Ke as DOC_FEEDBACK_STATES,ut as DOC_FIRST_FRAME_MS,Ve as DOC_GATE_V1_DEFAULTS,At as DOC_SHUTTER_DEFAULTS,V as DocAssist,ze as DocFeedbackAggregator,Qe as DocGateV1,Lt as EMPTY_GUIDE_METRICS,ge as FLIP_FILL_MIN,ve as FLIP_GAP_MS,be as FLIP_TIMEOUT_MS,ct as GUIDE_LOCK_DEFAULTS,yt as GuideLock,gt as ICAO_CANVAS,wt as ICAO_FALLBACK,Ut as ICAO_GATE_CRITERIA,Vt as ICAO_SHARP_REF,O as INFERENCE_RETRY_ATTEMPTS,x as INFERENCE_RETRY_DEFAULT_S,o as IN_CIRCLE_FACTOR,er as ISSUER_CODES,oe as LANDMARKER_MODEL,ot as LENS_STORAGE_KEY,xe as LENS_TRY_MAX,B as LIVE_MRZ_DEFAULTS,_e as LIVE_PHOTO_IDLE_MS,me as LIVE_PHOTO_MAX_HZ,Ge as MANUAL_SHUTTER_MS,We as MRZ_BAND_DEFAULTS,Me as MR_DOC_CATALOG,he as NO_REPORT_MS,ce as OCR_ASSET_SET,Re as OTP_RESEND_COOLDOWN_MS,ae as PORTRAIT_JPEG_QUALITY,i as PRELOAD_BLAZE_INIT_TIMEOUT_MS,n as PRELOAD_BUDGET_MS,Te as PROCESSING_BACKOFF_MS,ye as PROCESSING_POLL_DELAY_MS,fe as PROCESSING_POLL_MAX,b as REGION_PAD,le as REGISTRY_RETRY_DELAY_MS,te as SAME_FACE_MAX_DROPS,v as SHARPNESS_LONG_EDGE,z as TEXT_LOCK_DEFAULTS,u as TRANSPORT_REPLAY_ATTEMPTS,I as TRANSPORT_REPLAY_DELAY_MS,d as TURNSTILE_EXECUTE_TIMEOUT_MS,D as TURNSTILE_SCRIPT_SRC,J as WEB_OCR_ENGINE,or as acceptedIssuers,rr as acceptedTypesFor,et as analyzeDocFrame,Rt as analyzeGuide,De as aspectBand,de as aspectFits,jt as backgroundStats,q as browserFamily,X as buildDeviceReadHint,K as classifyCardSide,k as classifyCardSideWith,st as coverPointToVideo,re as createDocumentCaptureInternal,ie as createFaceLandmarker,Kt as createIcaoGate,Le as createLivePhotoKit,T as createLivenessCaptureInternal,Ee as createPortraitCaptureInternal,Se as createStepRunner,Ie as createVerificationInternal,h as cropImage,e as detectFormFactor,t as detectIsMobile,ke as detectMrzBand,Et as docZoomFor,W as encodeDocumentImage,N as executeTurnstile,vt as eyeLineRoll,Ht as eyeOpenness,Qt as eyeSpecular,Ft as faceGeometry,Jt as faceLighting,qt as faceSharpness,pe as facesOf,we as feedbackVoteOf,ir as flagOf,mt as focusOk,ee as formatMismatch,c as frontierStep,St as guideQuad,Tt as guideRegionInFrame,$t as icaoPixelStats,bt as icaoWindow,Ye as initialScanState,R as isExecutable,S as isTerminalView,Yt as judgeIcao,Ae as lensKindOf,$ as liveMrzWireReport,F as loadTurnstile,Xt as lumaPlane,_ as mapEngineState,L as mapErrorKind,m as mapGuidanceHint,y as mapSessionResult,H as measureBitmapSharpness,Y as measureRegionSharpness,He as nextScanState,se as observePortraitFrame,_t as openDocCamera,Dt as passportBandOf,Wt as percentile,g as photoSharpness,ht as portraitCropRegion,Oe as portraitMatchStep,Nt as poseFromMatrix,E as preloadedDetectorFactory,Xe as quadAreaFrac,Je as quadBounds,Ze as quadIou,$e as quadTiltRatio,ue as randomUuid,Ce as rankBackCameras,pt as readStoredLens,Zt as regionStats,s as resetLivenessAssetsForTests,M as resetTurnstileForTests,U as resizeLongEdge,pr as resolveAcceptedDocuments,rt as resolveDocCameraTuning,Ct as resolveDocShutterTuning,lt as resolveGuideLockTuning,zt as resolveIcaoTuning,Q as resolveWebOcrPlan,P as runLivenessFlow,C as runSubmission,Ne as scannerFormatFor,kt as scoreFrame,a as setPreloadLoaderForTests,Z as settledHint,at as singleShotFocusAt,qe as specularFraction,j as startWebOcr,l as stepOf,G as stillRegionOf,w as stillToImageData,nt as supportsFocusMode,ft as warmDocDetector,Gt as windowOverflow,it as writeStoredLens};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d}from"./chunk-
|
|
1
|
+
import{a,b,c,d}from"./chunk-CJHMFPL6.js";export{a as LANDMARKER_INIT_TIMEOUT_MS,b as LANDMARKER_MODEL,d as createFaceLandmarker,c as facesOf};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"./chunk-SMKCBUJL.js";export{a as MRZ_BAND_DEFAULTS,b as detectMrzBand};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as Z}from"./chunk-HFCVN6AG.js";import{a as Q,b as J,e as X,f as E,g as R,j as Y}from"./chunk-TTD5LQG2.js";import{x as $}from"./chunk-FSJPKOCC.js";import{n as W}from"./chunk-ACP2ZOVW.js";import"./chunk-25TEJBSB.js";import"./chunk-XLYHT4ZQ.js";import"./chunk-YH7DR3PF.js";import"./chunk-TYJA2XJR.js";import"./chunk-LL3YYUKR.js";import{F as N,i as z,x as K}from"./chunk-H6REKPZ4.js";import"./chunk-EKEHAFEK.js";import"./chunk-NYRFUVAR.js";import"./chunk-AXJ2VWIK.js";import"./chunk-BPKDXDDH.js";import{b as O,c as B,q as G,s as j,t as F}from"./chunk-6RJTKX5I.js";import"./chunk-NHXLIDQJ.js";import"./chunk-CPK5FYNJ.js";import"./chunk-J5IQ6THP.js";import"./chunk-RJZ5SARR.js";import"./chunk-V5P5P3HY.js";import"./chunk-7KXJEF7P.js";import"./chunk-FK2DJADA.js";import{c as C,i as q}from"./chunk-ZGDUIZC2.js";import"./chunk-CDDYFUER.js";import{a as H}from"./chunk-XK4CCTLL.js";import"./chunk-UBRNDTTD.js";import"./chunk-VP37FW6C.js";import"./chunk-LYYLXNA4.js";var re=2e4,oe=new Set(["media_type_unsupported","media_type_mismatch"]),ee=new Set(["document_upload_not_allowed","portrait_source_not_allowed","uploaded_media_not_allowed"]);function te(e){let c=null,m=Promise.resolve(),d=!1,w=null,M=null,h=!1,D=null,g=!1,_=!1,k=()=>{c?.controller.handle.destroy(),c=null},v=()=>{let t=e.currentView(),r=t===null?null:R(t,{isMobile:e.isMobile()});return r?.kind==="portrait"?r:null},S=()=>{if(e.destroyed())return"self";let t=e.currentView(),r=t===null?void 0:E(t);return r==="self"||r==="assisted"?r:r==="choice"&&e.captureModeSwitch!==void 0?e.captureModeSwitch.pick()??"self":e.cameraMode?.()??j(r??G(t),null)},I=e.captureModeSwitch,x=I===void 0?void 0:{session:()=>{let t=e.currentView();return t!==null&&E(t)==="choice"?"choice":S()},onModeChange:t=>I.choose(t)},T=async(t,r)=>{if(e.destroyed())return;let u=S();r.setFlowState("uploading"),d=!1;let n=null;try{await e.runner().submit("portrait_icao",async(s,y)=>{if(n===null){let f=await F(s,"image","image/jpeg",t.image.size,{engine:"portrait"});await s.uploadToSpaces(f.uploadUrl,t.image,"image/jpeg"),n=(await s.completeMedia(f.key)).key}r.setFlowState("checking");let b={media:{portrait:n},gate:q(t.gate),...t.tuningVersion!==void 0?{tuningVersion:t.tuningVersion}:{},source:"camera",capture:{mode:u,facingMode:t.facingMode}};return s.submitCheck("portrait_icao",b,{idempotencyKey:y})})}catch(s){d=!0,s instanceof C&&ee.has(s.code)&&await e.refreshView?.().catch(()=>{})}if(r.setFlowState("done"),e.destroyed())return;let o=v();(o===null||o.phase!=="capture")&&c?.controller===r&&k(),e.runner().republish()},L=t=>e.runner().submit("face_match",(r,u)=>r.submitCheck("face_match",e.runner().faceProbeSkipped()?{simulatedCapture:!0}:{},{idempotencyKey:u})).then(()=>{},()=>{d=!0,t()}),P=null,V=async t=>{let r=v();if(r===null||r.phase!=="capture"||!r.photo.uploadOffered)throw new RangeError("upload_not_offered");let{prepareUploadFile:u}=await import("./upload-file-C4MFKLT3.js"),n=await u(t,e.uploadInternals);if(e.destroyed())return;k(),d=!1;let o=null;try{await e.runner().submit("portrait_icao",async(s,y)=>{if(o===null){let f=await s.presign("image",n.contentType,n.blob.size,{source:"upload"});await s.uploadToSpaces(f.uploadUrl,n.blob,n.contentType),o=(await s.completeMedia(f.key)).key}let b={media:{portrait:o},source:"upload"};return s.submitCheck("portrait_icao",b,{idempotencyKey:y})})}catch(s){throw s instanceof C&&oe.has(s.code)?new TypeError("unsupported_file"):(s instanceof C&&ee.has(s.code)&&await e.refreshView?.().catch(()=>{}),s)}},i=null,l=t=>{if(i!==null)return i;let r=v();if(r===null||r.phase!=="review")return Promise.reject(new RangeError("no_pending_fix"));let u={fixReview:{accept:t}},n=e.runner().submit("portrait_icao",(o,s)=>o.submitCheck("portrait_icao",u,{idempotencyKey:s})).catch(async o=>{throw o instanceof C&&o.code==="portrait_no_pending_fix"&&await e.refreshView?.().catch(()=>{}),o}).finally(()=>{i=null});return i=n,n},a=t=>{let r=()=>V(t),u=(P===null?r():P.then(r,r)).finally(()=>{P===u&&(P=null)});return P=u,u};return{bind:(t,r)=>{if(t.phase==="review")return k(),{...t,uploadFailed:d,resubmit:()=>Promise.resolve(),capture:()=>{throw new Error("the adjusted photo waits for confirmFix()")},uploadPortrait:()=>Promise.reject(new RangeError("upload_not_offered")),confirmFix:l};if(t.phase==="match")return k(),w!==t.attemptsRemaining&&!d&&(w=t.attemptsRemaining,L(r)),{...t,uploadFailed:d,resubmit:()=>(d=!1,w=t.attemptsRemaining,r(),L(r)),capture:()=>{throw new Error("the portrait was already accepted")},uploadPortrait:()=>Promise.reject(new RangeError("upload_not_offered")),confirmFix:l};if(w=null,t.reuse===!0&&t.phase==="capture")return k(),!g&&D!==t.attemptsRemaining&&(D=t.attemptsRemaining,g=!0,e.runner().submit("portrait_icao",(n,o)=>n.submitCheck("portrait_icao",{},{idempotencyKey:o})).then(()=>{_=!1},()=>{_=!0}).finally(()=>{g=!1,r()})),{kind:"processing",key:"processing",context:t.context,section:t.section,stalled:_&&!g,refresh:()=>(_=!1,D=null,r(),Promise.resolve())};let u=e.keptPortraitInput?.()??null;return u!==null&&(h||u!==M&&t.report===null&&t.reason===void 0&&!t.retakeOnly)?(h||(M=u,h=!0,e.runner().submit("portrait_icao",(n,o)=>n.submitCheck("portrait_icao",u,{idempotencyKey:o})).catch(()=>{}).finally(()=>{h=!1,r()})),{kind:"processing",key:"processing",context:t.context,section:t.section,stalled:!1,refresh:()=>Promise.resolve()}):{...t,uploadFailed:d,resubmit:()=>Promise.resolve(),capture:n=>{if(c!==null&&c.video===n.video)return c.controller.handle;k(),d=!1;let o=W({video:n.video,tuning:t.tuning,tuningVersion:t.tuningVersion,...t.icao!=null?{policy:t.icao.policy}:{},...n.keepScreenAwake!==void 0?{keepScreenAwake:n.keepScreenAwake}:{},...n.assetBaseUrl!==void 0?{assetBaseUrl:n.assetBaseUrl}:{}},e.internals,S,x);c={video:n.video,controller:o};let s=o.handle.destroy;o.handle.destroy=()=>{c?.controller===o&&(c=null),s()},o.handle.on("error",f=>{e.reportCaptureIssue?.(O("portrait",f,0))});let y=!1,b=(f,U)=>{let A=o.gateScores();A!==null&&e.reportGate?.({kind:"portrait_gate",platform:"web",outcome:f,...U!==null?{failing:U}:{},...A})};return o.handle.on("gate",f=>{!y&&!f.ready&&(o.gateScores()?.elapsedMs??0)>=re&&(y=!0,b("stuck",f.failing))}),o.handle.on("captured",f=>{b("captured",null),y=!1,m=m.then(()=>T(f,o)).catch(()=>{})}),o.handle},uploadPortrait:a,confirmFix:l}},destroy:k}}function ne(e){let c=e;if(typeof c.apiOrigin!="string"||typeof c.sessionToken!="string")return;let m=`${c.apiOrigin}/api/v2/hosted/capture-reports`,d=c.sessionToken;return w=>{try{fetch(m,{method:"POST",headers:{"content-type":"application/json","x-session-token":d,"x-sekyro-sdk":`@sekyro/web/${H}`},body:JSON.stringify({reports:w}),keepalive:!0}).catch(()=>{})}catch{}}}function ie(e){let c=e.apiOrigin;return Z("sdk",typeof c=="string"&&/staging|sandbox|localhost/.test(c)?"sandbox":"live")}function Me(e){let c=null,m=null,d=null,w=B(),M=Promise.resolve(),h=()=>{d?.flow.handle.destroy(),d=null},D=async(i,l)=>{if(e.destroyed())return;l.setFlowState("uploading");let a=null,p,t=!1,r=e.currentView()?.documents!==void 0;try{await c.submit("doc_ocr",async(y,b)=>{if(a===null){let f=await F(y,"image","image/jpeg",i.image.size,{engine:"document"});await y.uploadToSpaces(f.uploadUrl,i.image,"image/jpeg"),a=(await y.completeMedia(f.key)).key}return l.setFlowState("checking"),p===void 0&&(p=l.takeDeviceRead(i)),y.submitCheck("doc_ocr",{imageKey:a,side:i.side,...p!==null?{deviceRead:p}:{},...r?{source:"camera"}:{}},{idempotencyKey:b})})}catch{t=!0}finally{l.setFlowState("done")}if(e.destroyed())return;if(t){l.settle(i.side,{ok:!1,issue:"technical"});return}let u=e.currentView(),n=u===null?null:R(u,{isMobile:e.isMobile()});if(n?.kind!=="document"){l.settle(i.side,{ok:!0}),d?.flow===l?h():l.handle.destroy();return}if(n.reason==="document_type_not_accepted"){m=null,d?.flow===l&&h(),c.republish();return}let o=n.acceptedSides;i.side!=="single"&&(o.includes(i.side)||n.reason==="side_missing")&&!(o.includes("recto")&&o.includes("verso"))?(l.settle(i.side,{ok:!0}),m?.documentType!=="passport"&&l.handle.setSide(n.side)):l.settle(i.side,{ok:!1,issue:"reread"})},g=null,_=async i=>{let l=e.currentView(),a=l===null?null:R(l,{isMobile:e.isMobile()});if(l===null||a?.kind!=="document")throw new RangeError("upload_not_offered");if(!a.photo.uploadOffered)throw new RangeError("upload_not_offered");let p=m?.documentType==="passport"?"single":a.side,{prepareUploadFile:t}=await import("./upload-file-C4MFKLT3.js"),r=await t(i,e.uploadInternals);if(e.destroyed())return;h();let u=null;try{await c.submit("doc_ocr",async(n,o)=>{if(u===null){let s=await n.presign("image",r.contentType,r.blob.size,{source:"upload"});await n.uploadToSpaces(s.uploadUrl,r.blob,r.contentType),u=(await n.completeMedia(s.key)).key}return n.submitCheck("doc_ocr",{imageKey:u,side:p,source:"upload"},{idempotencyKey:o})})}catch(n){throw n instanceof C&&(n.code==="media_type_unsupported"||n.code==="media_type_mismatch")?new TypeError("unsupported_file"):(n instanceof C&&(n.code==="document_upload_not_allowed"||n.code==="uploaded_media_not_allowed")&&await e.refreshView().catch(()=>{}),n)}},k=(i,l)=>({...i,uploadDocument:a=>{let p=()=>_(a),t=(g===null?p():g.then(p,p)).finally(()=>{g===t&&(g=null)});return g=t,t},issuer:m?.issuer??null,documentType:m?.documentType??null,captureSide:m===null?null:m.documentType==="passport"?"single":i.side,selectDocument:(a,p)=>{if(!J(i.documents).includes(a)||!Q(i.documents,a).includes(p))throw new RangeError(`${p} from ${a} is not accepted`);(m?.issuer!==a||m.documentType!==p)&&h(),m={issuer:a,documentType:p},l()},capture:a=>{if(m===null)throw new Error("selectDocument() first");if(d!==null&&d.video===a.video)return d.flow.handle;h();let p=m,t=p.documentType==="passport"?"single":i.acceptedSides.length>0?i.side:void 0,r=$({video:a.video,documentType:p.documentType,issuer:p.issuer,...t!==void 0?{side:t}:{},...a.keepScreenAwake!==void 0?{keepScreenAwake:a.keepScreenAwake}:{},...a.liveMrz!==void 0?{liveMrz:a.liveMrz}:{}},{...e.documentInternals??{},...(()=>{let n=e.currentView()?.capture?.document,o=e.documentInternals?.blurRefuseSharpnessMax??n?.scan?.blurRefuseSharpnessMax;return{engineOptions:{camera:z(n?.camera),shutter:N(n?.scan),guideLock:K(n?.guide),...e.documentInternals?.engineOptions??{}},...typeof o=="number"&&Number.isFinite(o)&&o>=0&&o<=1?{blurRefuseSharpnessMax:o}:{}}})(),deferRead:!0,...(()=>{let n=e.currentView();if(n===null||e.documentInternals?.webOcr!==void 0)return{};let o=ne(e.runtime.client);return{webOcr:{captureDocument:n.capture?.document,salt:n.sessionId,baseUrl:ie(e.runtime.client),...o!==void 0?{reports:o}:{}}}})()});d={video:a.video,flow:r};let u=r.handle.destroy;return r.handle.destroy=()=>{d?.flow===r&&(d=null),u()},w.newHandle(),r.handle.on("state",n=>w.note(n)),r.handle.on("error",n=>{w.noteError(),e.reportCaptureIssue?.(O("document",n,w.value))}),r.handle.on("captured",n=>{M=M.then(()=>D(n,r)).catch(()=>{})}),r.handle}}),v=null,S=null,I=new Set,x=e.runtime.client;e.runtime.client=new Proxy(x,{get(i,l){if(l==="submitCheck")return(S??i).submitCheck.bind(S??i);let a=Reflect.get(i,l);return typeof a=="function"?a.bind(i):a}});let T=()=>{v?.destroy(),v=null,S=null},L=i=>{let l=e.currentView(),a=l===null?null:R(l,{isMobile:e.isMobile()});if(l===null||a?.kind!=="liveness"||a.livePhoto?.icao!==!0)return;if(v===null){let u=X({tuning:l.capture?.icao??null,tuningVersion:l.capture?.tuningVersion??null,...a.icao!=null?{policy:a.icao.policy}:{},still:a.livePhoto.still,...i.assetBaseUrl!==void 0?{assetBaseUrl:i.assetBaseUrl}:{}},e.livePhotoInternals);v=u,S=u.decorate(x),u.onGate(n=>{for(let o of I)o(n)})}let p=v,t=e.baseCapture??{},r=t.engineOptions?.telemetry;return{...t,engineOptions:{...t.engineOptions??{},measureQuality:p.engineOptions.measureQuality,telemetry:u=>{r?.(u),p.engineOptions.telemetry(u)}}}},P=te({keptPortraitInput:()=>v?.lastPortraitInput()??null,runner:()=>c,currentView:e.currentView,...e.cameraMode!==void 0?{cameraMode:e.cameraMode}:{},...e.captureModeSwitch!==void 0?{captureModeSwitch:e.captureModeSwitch}:{},destroyed:e.destroyed,isMobile:e.isMobile,...e.portraitInternals!==void 0?{internals:e.portraitInternals}:{},...e.uploadInternals!==void 0?{uploadInternals:e.uploadInternals}:{},refreshView:()=>e.refreshView(),...e.reportCaptureIssue!==void 0?{reportCaptureIssue:e.reportCaptureIssue}:{},reportGate:i=>ne(e.runtime.client)?.([i])}),V=Y({...e,bindDocument:k,bindPortrait:P.bind,stopCameras:()=>{h(),P.destroy(),T(),e.stopLiveness?.()},onLivePhoto:i=>(I.add(i),()=>I.delete(i))});return c=V,{...V,captureInternals:L,destroy:()=>{h(),P.destroy(),T(),I.clear()}}}export{Me as createPlanRunner,ne as reportSink,ie as sdkAssetBase};
|
|
1
|
+
import{e as Z}from"./chunk-A3FUGHAH.js";import{a as Q,b as J,e as X,f as E,g as R,j as Y}from"./chunk-IC6TI6GV.js";import{x as $}from"./chunk-MQBX4DQQ.js";import{n as W}from"./chunk-VWGKUQ3C.js";import"./chunk-53POX7U4.js";import"./chunk-33KKMPJ5.js";import"./chunk-CJHMFPL6.js";import"./chunk-RI3E7GBN.js";import"./chunk-GI3UFGRQ.js";import{F as N,i as z,x as K}from"./chunk-FLA42JCK.js";import"./chunk-G6LKLN4U.js";import"./chunk-SMKCBUJL.js";import"./chunk-MXWLCDFX.js";import"./chunk-TDLIXFDT.js";import{b as O,c as B,q as G,s as j,t as F}from"./chunk-QY6TJCOJ.js";import"./chunk-LBH6KGTV.js";import"./chunk-7QZWBDI5.js";import"./chunk-5YVQIHQA.js";import"./chunk-SX7TUC3V.js";import"./chunk-POIQGEZM.js";import"./chunk-CPUECYAJ.js";import"./chunk-FPXL63KZ.js";import{c as C,i as q}from"./chunk-XI5FXEKC.js";import"./chunk-TSA6GHUG.js";import{a as H}from"./chunk-IFLOS5OT.js";import"./chunk-FSSMUAKC.js";import"./chunk-DFTCAWMP.js";import"./chunk-DK5YPBDQ.js";var re=2e4,oe=new Set(["media_type_unsupported","media_type_mismatch"]),ee=new Set(["document_upload_not_allowed","portrait_source_not_allowed","uploaded_media_not_allowed"]);function te(e){let c=null,m=Promise.resolve(),d=!1,w=null,M=null,h=!1,D=null,g=!1,_=!1,k=()=>{c?.controller.handle.destroy(),c=null},v=()=>{let t=e.currentView(),r=t===null?null:R(t,{isMobile:e.isMobile()});return r?.kind==="portrait"?r:null},S=()=>{if(e.destroyed())return"self";let t=e.currentView(),r=t===null?void 0:E(t);return r==="self"||r==="assisted"?r:r==="choice"&&e.captureModeSwitch!==void 0?e.captureModeSwitch.pick()??"self":e.cameraMode?.()??j(r??G(t),null)},I=e.captureModeSwitch,x=I===void 0?void 0:{session:()=>{let t=e.currentView();return t!==null&&E(t)==="choice"?"choice":S()},onModeChange:t=>I.choose(t)},T=async(t,r)=>{if(e.destroyed())return;let u=S();r.setFlowState("uploading"),d=!1;let n=null;try{await e.runner().submit("portrait_icao",async(s,y)=>{if(n===null){let f=await F(s,"image","image/jpeg",t.image.size,{engine:"portrait"});await s.uploadToSpaces(f.uploadUrl,t.image,"image/jpeg"),n=(await s.completeMedia(f.key)).key}r.setFlowState("checking");let b={media:{portrait:n},gate:q(t.gate),...t.tuningVersion!==void 0?{tuningVersion:t.tuningVersion}:{},source:"camera",capture:{mode:u,facingMode:t.facingMode}};return s.submitCheck("portrait_icao",b,{idempotencyKey:y})})}catch(s){d=!0,s instanceof C&&ee.has(s.code)&&await e.refreshView?.().catch(()=>{})}if(r.setFlowState("done"),e.destroyed())return;let o=v();(o===null||o.phase!=="capture")&&c?.controller===r&&k(),e.runner().republish()},L=t=>e.runner().submit("face_match",(r,u)=>r.submitCheck("face_match",e.runner().faceProbeSkipped()?{simulatedCapture:!0}:{},{idempotencyKey:u})).then(()=>{},()=>{d=!0,t()}),P=null,V=async t=>{let r=v();if(r===null||r.phase!=="capture"||!r.photo.uploadOffered)throw new RangeError("upload_not_offered");let{prepareUploadFile:u}=await import("./upload-file-UYXOHCRG.js"),n=await u(t,e.uploadInternals);if(e.destroyed())return;k(),d=!1;let o=null;try{await e.runner().submit("portrait_icao",async(s,y)=>{if(o===null){let f=await s.presign("image",n.contentType,n.blob.size,{source:"upload"});await s.uploadToSpaces(f.uploadUrl,n.blob,n.contentType),o=(await s.completeMedia(f.key)).key}let b={media:{portrait:o},source:"upload"};return s.submitCheck("portrait_icao",b,{idempotencyKey:y})})}catch(s){throw s instanceof C&&oe.has(s.code)?new TypeError("unsupported_file"):(s instanceof C&&ee.has(s.code)&&await e.refreshView?.().catch(()=>{}),s)}},i=null,l=t=>{if(i!==null)return i;let r=v();if(r===null||r.phase!=="review")return Promise.reject(new RangeError("no_pending_fix"));let u={fixReview:{accept:t}},n=e.runner().submit("portrait_icao",(o,s)=>o.submitCheck("portrait_icao",u,{idempotencyKey:s})).catch(async o=>{throw o instanceof C&&o.code==="portrait_no_pending_fix"&&await e.refreshView?.().catch(()=>{}),o}).finally(()=>{i=null});return i=n,n},a=t=>{let r=()=>V(t),u=(P===null?r():P.then(r,r)).finally(()=>{P===u&&(P=null)});return P=u,u};return{bind:(t,r)=>{if(t.phase==="review")return k(),{...t,uploadFailed:d,resubmit:()=>Promise.resolve(),capture:()=>{throw new Error("the adjusted photo waits for confirmFix()")},uploadPortrait:()=>Promise.reject(new RangeError("upload_not_offered")),confirmFix:l};if(t.phase==="match")return k(),w!==t.attemptsRemaining&&!d&&(w=t.attemptsRemaining,L(r)),{...t,uploadFailed:d,resubmit:()=>(d=!1,w=t.attemptsRemaining,r(),L(r)),capture:()=>{throw new Error("the portrait was already accepted")},uploadPortrait:()=>Promise.reject(new RangeError("upload_not_offered")),confirmFix:l};if(w=null,t.reuse===!0&&t.phase==="capture")return k(),!g&&D!==t.attemptsRemaining&&(D=t.attemptsRemaining,g=!0,e.runner().submit("portrait_icao",(n,o)=>n.submitCheck("portrait_icao",{},{idempotencyKey:o})).then(()=>{_=!1},()=>{_=!0}).finally(()=>{g=!1,r()})),{kind:"processing",key:"processing",context:t.context,section:t.section,stalled:_&&!g,refresh:()=>(_=!1,D=null,r(),Promise.resolve())};let u=e.keptPortraitInput?.()??null;return u!==null&&(h||u!==M&&t.report===null&&t.reason===void 0&&!t.retakeOnly)?(h||(M=u,h=!0,e.runner().submit("portrait_icao",(n,o)=>n.submitCheck("portrait_icao",u,{idempotencyKey:o})).catch(()=>{}).finally(()=>{h=!1,r()})),{kind:"processing",key:"processing",context:t.context,section:t.section,stalled:!1,refresh:()=>Promise.resolve()}):{...t,uploadFailed:d,resubmit:()=>Promise.resolve(),capture:n=>{if(c!==null&&c.video===n.video)return c.controller.handle;k(),d=!1;let o=W({video:n.video,tuning:t.tuning,tuningVersion:t.tuningVersion,...t.icao!=null?{policy:t.icao.policy}:{},...n.keepScreenAwake!==void 0?{keepScreenAwake:n.keepScreenAwake}:{},...n.assetBaseUrl!==void 0?{assetBaseUrl:n.assetBaseUrl}:{}},e.internals,S,x);c={video:n.video,controller:o};let s=o.handle.destroy;o.handle.destroy=()=>{c?.controller===o&&(c=null),s()},o.handle.on("error",f=>{e.reportCaptureIssue?.(O("portrait",f,0))});let y=!1,b=(f,U)=>{let A=o.gateScores();A!==null&&e.reportGate?.({kind:"portrait_gate",platform:"web",outcome:f,...U!==null?{failing:U}:{},...A})};return o.handle.on("gate",f=>{!y&&!f.ready&&(o.gateScores()?.elapsedMs??0)>=re&&(y=!0,b("stuck",f.failing))}),o.handle.on("captured",f=>{b("captured",null),y=!1,m=m.then(()=>T(f,o)).catch(()=>{})}),o.handle},uploadPortrait:a,confirmFix:l}},destroy:k}}function ne(e){let c=e;if(typeof c.apiOrigin!="string"||typeof c.sessionToken!="string")return;let m=`${c.apiOrigin}/api/v2/hosted/capture-reports`,d=c.sessionToken;return w=>{try{fetch(m,{method:"POST",headers:{"content-type":"application/json","x-session-token":d,"x-sekyro-sdk":`@sekyro/web/${H}`},body:JSON.stringify({reports:w}),keepalive:!0}).catch(()=>{})}catch{}}}function ie(e){let c=e.apiOrigin;return Z("sdk",typeof c=="string"&&/staging|sandbox|localhost/.test(c)?"sandbox":"live")}function Me(e){let c=null,m=null,d=null,w=B(),M=Promise.resolve(),h=()=>{d?.flow.handle.destroy(),d=null},D=async(i,l)=>{if(e.destroyed())return;l.setFlowState("uploading");let a=null,p,t=!1,r=e.currentView()?.documents!==void 0;try{await c.submit("doc_ocr",async(y,b)=>{if(a===null){let f=await F(y,"image","image/jpeg",i.image.size,{engine:"document"});await y.uploadToSpaces(f.uploadUrl,i.image,"image/jpeg"),a=(await y.completeMedia(f.key)).key}return l.setFlowState("checking"),p===void 0&&(p=l.takeDeviceRead(i)),y.submitCheck("doc_ocr",{imageKey:a,side:i.side,...p!==null?{deviceRead:p}:{},...r?{source:"camera"}:{}},{idempotencyKey:b})})}catch{t=!0}finally{l.setFlowState("done")}if(e.destroyed())return;if(t){l.settle(i.side,{ok:!1,issue:"technical"});return}let u=e.currentView(),n=u===null?null:R(u,{isMobile:e.isMobile()});if(n?.kind!=="document"){l.settle(i.side,{ok:!0}),d?.flow===l?h():l.handle.destroy();return}if(n.reason==="document_type_not_accepted"){m=null,d?.flow===l&&h(),c.republish();return}let o=n.acceptedSides;i.side!=="single"&&(o.includes(i.side)||n.reason==="side_missing")&&!(o.includes("recto")&&o.includes("verso"))?(l.settle(i.side,{ok:!0}),m?.documentType!=="passport"&&l.handle.setSide(n.side)):l.settle(i.side,{ok:!1,issue:"reread"})},g=null,_=async i=>{let l=e.currentView(),a=l===null?null:R(l,{isMobile:e.isMobile()});if(l===null||a?.kind!=="document")throw new RangeError("upload_not_offered");if(!a.photo.uploadOffered)throw new RangeError("upload_not_offered");let p=m?.documentType==="passport"?"single":a.side,{prepareUploadFile:t}=await import("./upload-file-UYXOHCRG.js"),r=await t(i,e.uploadInternals);if(e.destroyed())return;h();let u=null;try{await c.submit("doc_ocr",async(n,o)=>{if(u===null){let s=await n.presign("image",r.contentType,r.blob.size,{source:"upload"});await n.uploadToSpaces(s.uploadUrl,r.blob,r.contentType),u=(await n.completeMedia(s.key)).key}return n.submitCheck("doc_ocr",{imageKey:u,side:p,source:"upload"},{idempotencyKey:o})})}catch(n){throw n instanceof C&&(n.code==="media_type_unsupported"||n.code==="media_type_mismatch")?new TypeError("unsupported_file"):(n instanceof C&&(n.code==="document_upload_not_allowed"||n.code==="uploaded_media_not_allowed")&&await e.refreshView().catch(()=>{}),n)}},k=(i,l)=>({...i,uploadDocument:a=>{let p=()=>_(a),t=(g===null?p():g.then(p,p)).finally(()=>{g===t&&(g=null)});return g=t,t},issuer:m?.issuer??null,documentType:m?.documentType??null,captureSide:m===null?null:m.documentType==="passport"?"single":i.side,selectDocument:(a,p)=>{if(!J(i.documents).includes(a)||!Q(i.documents,a).includes(p))throw new RangeError(`${p} from ${a} is not accepted`);(m?.issuer!==a||m.documentType!==p)&&h(),m={issuer:a,documentType:p},l()},capture:a=>{if(m===null)throw new Error("selectDocument() first");if(d!==null&&d.video===a.video)return d.flow.handle;h();let p=m,t=p.documentType==="passport"?"single":i.acceptedSides.length>0?i.side:void 0,r=$({video:a.video,documentType:p.documentType,issuer:p.issuer,...t!==void 0?{side:t}:{},...a.keepScreenAwake!==void 0?{keepScreenAwake:a.keepScreenAwake}:{},...a.liveMrz!==void 0?{liveMrz:a.liveMrz}:{}},{...e.documentInternals??{},...(()=>{let n=e.currentView()?.capture?.document,o=e.documentInternals?.blurRefuseSharpnessMax??n?.scan?.blurRefuseSharpnessMax;return{engineOptions:{camera:z(n?.camera),shutter:N(n?.scan),guideLock:K(n?.guide),...e.documentInternals?.engineOptions??{}},...typeof o=="number"&&Number.isFinite(o)&&o>=0&&o<=1?{blurRefuseSharpnessMax:o}:{}}})(),deferRead:!0,...(()=>{let n=e.currentView();if(n===null||e.documentInternals?.webOcr!==void 0)return{};let o=ne(e.runtime.client);return{webOcr:{captureDocument:n.capture?.document,salt:n.sessionId,baseUrl:ie(e.runtime.client),...o!==void 0?{reports:o}:{}}}})()});d={video:a.video,flow:r};let u=r.handle.destroy;return r.handle.destroy=()=>{d?.flow===r&&(d=null),u()},w.newHandle(),r.handle.on("state",n=>w.note(n)),r.handle.on("error",n=>{w.noteError(),e.reportCaptureIssue?.(O("document",n,w.value))}),r.handle.on("captured",n=>{M=M.then(()=>D(n,r)).catch(()=>{})}),r.handle}}),v=null,S=null,I=new Set,x=e.runtime.client;e.runtime.client=new Proxy(x,{get(i,l){if(l==="submitCheck")return(S??i).submitCheck.bind(S??i);let a=Reflect.get(i,l);return typeof a=="function"?a.bind(i):a}});let T=()=>{v?.destroy(),v=null,S=null},L=i=>{let l=e.currentView(),a=l===null?null:R(l,{isMobile:e.isMobile()});if(l===null||a?.kind!=="liveness"||a.livePhoto?.icao!==!0)return;if(v===null){let u=X({tuning:l.capture?.icao??null,tuningVersion:l.capture?.tuningVersion??null,...a.icao!=null?{policy:a.icao.policy}:{},still:a.livePhoto.still,...i.assetBaseUrl!==void 0?{assetBaseUrl:i.assetBaseUrl}:{}},e.livePhotoInternals);v=u,S=u.decorate(x),u.onGate(n=>{for(let o of I)o(n)})}let p=v,t=e.baseCapture??{},r=t.engineOptions?.telemetry;return{...t,engineOptions:{...t.engineOptions??{},measureQuality:p.engineOptions.measureQuality,telemetry:u=>{r?.(u),p.engineOptions.telemetry(u)}}}},P=te({keptPortraitInput:()=>v?.lastPortraitInput()??null,runner:()=>c,currentView:e.currentView,...e.cameraMode!==void 0?{cameraMode:e.cameraMode}:{},...e.captureModeSwitch!==void 0?{captureModeSwitch:e.captureModeSwitch}:{},destroyed:e.destroyed,isMobile:e.isMobile,...e.portraitInternals!==void 0?{internals:e.portraitInternals}:{},...e.uploadInternals!==void 0?{uploadInternals:e.uploadInternals}:{},refreshView:()=>e.refreshView(),...e.reportCaptureIssue!==void 0?{reportCaptureIssue:e.reportCaptureIssue}:{},reportGate:i=>ne(e.runtime.client)?.([i])}),V=Y({...e,bindDocument:k,bindPortrait:P.bind,stopCameras:()=>{h(),P.destroy(),T(),e.stopLiveness?.()},onLivePhoto:i=>(I.add(i),()=>I.delete(i))});return c=V,{...V,captureInternals:L,destroy:()=>{h(),P.destroy(),T(),I.clear()}}}export{Me as createPlanRunner,ne as reportSink,ie as sdkAssetBase};
|
package/dist/popup/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c}from"../chunk-
|
|
1
|
+
import{a,b,c}from"../chunk-LJYMZQY2.js";export{a as SEKYRO_EVENTS,b as open,c as openHosted};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s,b as u}from"./chunk-
|
|
1
|
+
import{a as s,b as u}from"./chunk-2LDOXGY3.js";import{Thumbmark as c}from"@thumbmarkjs/thumbmarkjs";var d=["canvas","webgl","audio","fonts","hardware","screen","system","locales","math","plugins"],f=2e3,l=4e3,m=1e3,g=2e3,h=64,p=32,P=8,b=128;function a(n,t){if(typeof n!="string")return;let e=n.trim();return e.length>0&&e.length<=t?e:void 0}async function y(){let n=navigator.userAgentData;if(typeof n?.getHighEntropyValues!="function")return;let t=await s(()=>n.getHighEntropyValues(["model","platformVersion"]),m);if(t==null)return;let e=a(t.model,h),i=a(t.platformVersion,p),o={...e!==void 0?{model:e}:{},...i!==void 0?{platformVersion:i}:{}};return Object.keys(o).length>0?o:void 0}async function _(){let[n,t]=await Promise.all([new c({stabilize:["private","iframe"],exclude:["permissions","webrtc","speech"],logging:!1,collect_beacon:!1,timeout:f}).get(),y()]),e=n?.thumbmark;if(typeof e!="string"||e.length<P||e.length>b)return;let i={};for(let o of d){let r=n.components?.[o];r==null||r.timeout==="true"||(i[o]=await u(r))}return{hash:e,c:i,...t!==void 0?{hints:t}:{}}}function w(){return new Promise(n=>{typeof globalThis.requestIdleCallback=="function"?globalThis.requestIdleCallback(()=>n(),{timeout:g}):n()})}async function I(n){return n()||(await w(),n())?"busy":s(_,l)}export{I as computePrint,y as readHints};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e}from"./chunk-
|
|
1
|
+
import{a,b,c,d,e}from"./chunk-TDCLQRT4.js";export{b as TURNSTILE_EXECUTE_TIMEOUT_MS,a as TURNSTILE_SCRIPT_SRC,e as executeTurnstile,d as loadTurnstile,c as resetTurnstileForTests};
|
|
@@ -1164,9 +1164,10 @@ interface HostedSessionView {
|
|
|
1164
1164
|
* Cloudflare Turnstile site key the browser must solve an execute-mode
|
|
1165
1165
|
* challenge against before submitting `liveness` (Plan A Task 5): the org's
|
|
1166
1166
|
* own widget key when the request origin is one of the org's allowlisted SDK
|
|
1167
|
-
* origins, else the hosted widget key
|
|
1168
|
-
*
|
|
1169
|
-
*
|
|
1167
|
+
* origins, else the hosted widget key; on a Sandbox session always
|
|
1168
|
+
* Cloudflare's always-passing test site key, so the same code runs in both
|
|
1169
|
+
* environments. `null` only on a Live deployment without Turnstile: the SDK
|
|
1170
|
+
* sends no token and the server decides.
|
|
1170
1171
|
*/
|
|
1171
1172
|
turnstileSiteKey: string | null;
|
|
1172
1173
|
/**
|
|
@@ -1176,6 +1177,12 @@ interface HostedSessionView {
|
|
|
1176
1177
|
sandbox?: boolean;
|
|
1177
1178
|
/** Spec 2026-10-27: this session enrolls a Sandbox tester (the hosted page shows the removal link at the end). */
|
|
1178
1179
|
testerEnrollment?: boolean;
|
|
1180
|
+
/**
|
|
1181
|
+
* Spec 2026-11-09 §3.3: present only while the flow should offer "Run real checks as a tester" (a simulated Sandbox
|
|
1182
|
+
* session, nothing captured yet, gates left, and the organization has an active tester). `attemptsLeft`: gates left
|
|
1183
|
+
* on this session. Absent in Live and once a tester is recognised (the session then runs real checks).
|
|
1184
|
+
*/
|
|
1185
|
+
testerGate?: HostedTesterGateView;
|
|
1179
1186
|
/**
|
|
1180
1187
|
* The session was minted with a server-bound NNI (`POST /sessions`
|
|
1181
1188
|
* `input.nni`, Plan A Task 2): `population_registry` is submitted with an
|
|
@@ -1469,15 +1476,13 @@ interface CompleteMediaResult {
|
|
|
1469
1476
|
}
|
|
1470
1477
|
/**
|
|
1471
1478
|
* Liveness attestation bag (attestation-verifier.service.ts). The web SDK sends
|
|
1472
|
-
* `{channel: 'hosted_web', siteKey, turnstileToken}`
|
|
1473
|
-
* `HostedSessionView.turnstileSiteKey` the challenge was
|
|
1474
|
-
* backend picks the matching widget secret
|
|
1475
|
-
* are single-use: siteverify runs exactly
|
|
1476
|
-
*
|
|
1477
|
-
* native SDKs will use platform attestation.
|
|
1479
|
+
* `{channel: 'hosted_web', siteKey, turnstileToken}` in both environments:
|
|
1480
|
+
* `siteKey` echoes the `HostedSessionView.turnstileSiteKey` the challenge was
|
|
1481
|
+
* rendered with, so the backend picks the matching widget secret
|
|
1482
|
+
* deterministically (Turnstile tokens are single-use: siteverify runs exactly
|
|
1483
|
+
* once, never "org then global"). Native SDKs use platform attestation.
|
|
1478
1484
|
*/
|
|
1479
1485
|
interface AttestationInput {
|
|
1480
|
-
sandbox?: boolean;
|
|
1481
1486
|
signature?: string;
|
|
1482
1487
|
channel?: "hosted_web";
|
|
1483
1488
|
turnstileToken?: string;
|
|
@@ -1571,6 +1576,23 @@ interface FaceMatchInput {
|
|
|
1571
1576
|
}
|
|
1572
1577
|
/** Document side (docs.types.ts DocSide). */
|
|
1573
1578
|
type DocSide = "recto" | "verso" | "single";
|
|
1579
|
+
/** The hosted view's `testerGate` block (spec 2026-11-09 §3.3). */
|
|
1580
|
+
interface HostedTesterGateView {
|
|
1581
|
+
offered: true;
|
|
1582
|
+
/** Gates left on this session (3 at most). */
|
|
1583
|
+
attemptsLeft: number;
|
|
1584
|
+
}
|
|
1585
|
+
/** Body `input` of `POST /hosted/tester-gate`: the liveness clip of the gate, in the liveness step's input shape. */
|
|
1586
|
+
interface TesterGateInput {
|
|
1587
|
+
clipKey: string;
|
|
1588
|
+
attestation?: AttestationInput;
|
|
1589
|
+
captureChannel?: "mobile" | "desktop";
|
|
1590
|
+
capture?: LivenessCaptureInput;
|
|
1591
|
+
}
|
|
1592
|
+
/** Answer of `POST /hosted/tester-gate`: the hosted view after the gate, and whether an enrolled tester was recognised. */
|
|
1593
|
+
type TesterGateResponse = HostedSessionView & {
|
|
1594
|
+
bound: boolean;
|
|
1595
|
+
};
|
|
1574
1596
|
/** The hosted view's `simulation` block (Sandbox DX spec 2026-11-06 §8): what a simulated session tells the flow. */
|
|
1575
1597
|
interface HostedSimulationView {
|
|
1576
1598
|
/** The code that passes the phone, email and national eID code screens: render it, nothing is delivered. */
|
|
@@ -1784,4 +1806,4 @@ interface SubmitCheckBody {
|
|
|
1784
1806
|
forceOutcome?: "pass" | "fail" | "age_over" | "age_uncertain" | "age_under" | "age_unavailable";
|
|
1785
1807
|
}
|
|
1786
1808
|
|
|
1787
|
-
export { type
|
|
1809
|
+
export { type IdentityMethod as $, type AcceptedDocumentType as A, type HostedEidView as B, type CaptureContext as C, type DecisionReason as D, type EidAfterPass as E, type FaceMatchInput as F, type HostedEmailOtpView as G, type HostedAcceptedDocuments as H, type HostedFlowRef as I, type HostedIcaoPolicy as J, type HostedIntegrity as K, type HostedLivePhotoTuning as L, type HostedNativeCaptureTuning as M, type HostedOcrTuning as N, type HostedOtpView as O, type HostedPlanView as P, type HostedPortraitPendingFix as Q, type HostedPortraitView as R, type HostedSessionView as S, type HostedSimulationView as T, type HostedStepView as U, type HostedTesterGateView as V, type HostedVoiceLocale as W, type HostedVoiceView as X, type IcaoCriterion as Y, type IcaoReportEntry as Z, type IdentityConfirmDecision as _, type AttestationInput as a, ICAO_FALLBACK as a$, type IdentitySummarySource as a0, type IdentitySummaryView as a1, type LivenessCaptureInput as a2, type LivenessInput as a3, type LivenessReason as a4, type MatchReason as a5, type MediaKind as a6, type MethodChoiceView as a7, type NationalEidOption as a8, type NfcChipReason as a9, type SessionFailureReason as aA, type SessionReason as aB, type SessionStatus as aC, type SessionStepView as aD, type SessionView as aE, type SimulatedCaptureInput as aF, type StepResult as aG, type StepSection as aH, type SubmitCheckBody as aI, type TesterGateInput as aJ, type TesterGateResponse as aK, type VerificationAssurance as aL, type VerificationLevel as aM, type ScreenRampColour as aN, type AgeEstimationReason as aO, type CameraUnavailableCause as aP, type CaptureIssueReport as aQ, type CaptureProvenance as aR, type HostedBranding as aS, type HostedBrandingColorKey as aT, type HostedLivenessCaptureTuning as aU, type IcaoCaptureTuning as aV, type RetakeHint as aW, type ScreenRampChallenge as aX, type ScreenRampPaint as aY, type ScreenRampRendered as aZ, type ScreenRampReport as a_, type NfcStepView as aa, type OtpChoiceView as ab, type PhoneCountryRule as ac, type PhoneFormat as ad, type PhoneOtpInput as ae, type PhoneOtpReason as af, type PhotoSource as ag, type PhotoSourcePick as ah, type PlanAttempts as ai, type PlanChoiceKind as aj, type PlanChoiceOption as ak, type PlanChoiceView as al, type PlanSectionView as am, type PlanStepView as an, type PopulationInput as ao, type PopulationReason as ap, type PortraitFix as aq, type PortraitFixReviewInput as ar, type PortraitIcaoInput as as, type PortraitIcaoReason as at, type PortraitOutputFormat as au, type PresignRequest as av, type PresignUploadResult as aw, type RecordConsentResult as ax, type ResolvedCaptureMode as ay, type SessionDecidingStep as az, type CaptureMode as b, type IcaoProfile as b0, type ResolvedIcaoTuning as b1, resolveIcaoTuning as b2, type PersonMask as b3, type BackgroundUniformity as b4, type CaptureNoncesResult as c, type CaptureProof as d, type CheckInputByType as e, type CheckReason as f, type CheckState as g, type CheckType as h, type ClosedBy as i, type CompleteMediaResult as j, type ConsentLocale as k, type ContactChannel as l, type DocDeviceRead as m, type DocOcrInput as n, type DocReason as o, type DocSide as p, type EidAuthInput as q, type EidReason as r, type EmailOtpInput as s, type EmailOtpReason as t, type FaceMatchReason as u, type HostedCaptureTuning as v, type HostedConsentView as w, type HostedDocumentCaptureTuning as x, type HostedDocumentScanTuning as y, type HostedDocumentsView as z };
|
|
@@ -1164,9 +1164,10 @@ interface HostedSessionView {
|
|
|
1164
1164
|
* Cloudflare Turnstile site key the browser must solve an execute-mode
|
|
1165
1165
|
* challenge against before submitting `liveness` (Plan A Task 5): the org's
|
|
1166
1166
|
* own widget key when the request origin is one of the org's allowlisted SDK
|
|
1167
|
-
* origins, else the hosted widget key
|
|
1168
|
-
*
|
|
1169
|
-
*
|
|
1167
|
+
* origins, else the hosted widget key; on a Sandbox session always
|
|
1168
|
+
* Cloudflare's always-passing test site key, so the same code runs in both
|
|
1169
|
+
* environments. `null` only on a Live deployment without Turnstile: the SDK
|
|
1170
|
+
* sends no token and the server decides.
|
|
1170
1171
|
*/
|
|
1171
1172
|
turnstileSiteKey: string | null;
|
|
1172
1173
|
/**
|
|
@@ -1176,6 +1177,12 @@ interface HostedSessionView {
|
|
|
1176
1177
|
sandbox?: boolean;
|
|
1177
1178
|
/** Spec 2026-10-27: this session enrolls a Sandbox tester (the hosted page shows the removal link at the end). */
|
|
1178
1179
|
testerEnrollment?: boolean;
|
|
1180
|
+
/**
|
|
1181
|
+
* Spec 2026-11-09 §3.3: present only while the flow should offer "Run real checks as a tester" (a simulated Sandbox
|
|
1182
|
+
* session, nothing captured yet, gates left, and the organization has an active tester). `attemptsLeft`: gates left
|
|
1183
|
+
* on this session. Absent in Live and once a tester is recognised (the session then runs real checks).
|
|
1184
|
+
*/
|
|
1185
|
+
testerGate?: HostedTesterGateView;
|
|
1179
1186
|
/**
|
|
1180
1187
|
* The session was minted with a server-bound NNI (`POST /sessions`
|
|
1181
1188
|
* `input.nni`, Plan A Task 2): `population_registry` is submitted with an
|
|
@@ -1469,15 +1476,13 @@ interface CompleteMediaResult {
|
|
|
1469
1476
|
}
|
|
1470
1477
|
/**
|
|
1471
1478
|
* Liveness attestation bag (attestation-verifier.service.ts). The web SDK sends
|
|
1472
|
-
* `{channel: 'hosted_web', siteKey, turnstileToken}`
|
|
1473
|
-
* `HostedSessionView.turnstileSiteKey` the challenge was
|
|
1474
|
-
* backend picks the matching widget secret
|
|
1475
|
-
* are single-use: siteverify runs exactly
|
|
1476
|
-
*
|
|
1477
|
-
* native SDKs will use platform attestation.
|
|
1479
|
+
* `{channel: 'hosted_web', siteKey, turnstileToken}` in both environments:
|
|
1480
|
+
* `siteKey` echoes the `HostedSessionView.turnstileSiteKey` the challenge was
|
|
1481
|
+
* rendered with, so the backend picks the matching widget secret
|
|
1482
|
+
* deterministically (Turnstile tokens are single-use: siteverify runs exactly
|
|
1483
|
+
* once, never "org then global"). Native SDKs use platform attestation.
|
|
1478
1484
|
*/
|
|
1479
1485
|
interface AttestationInput {
|
|
1480
|
-
sandbox?: boolean;
|
|
1481
1486
|
signature?: string;
|
|
1482
1487
|
channel?: "hosted_web";
|
|
1483
1488
|
turnstileToken?: string;
|
|
@@ -1571,6 +1576,23 @@ interface FaceMatchInput {
|
|
|
1571
1576
|
}
|
|
1572
1577
|
/** Document side (docs.types.ts DocSide). */
|
|
1573
1578
|
type DocSide = "recto" | "verso" | "single";
|
|
1579
|
+
/** The hosted view's `testerGate` block (spec 2026-11-09 §3.3). */
|
|
1580
|
+
interface HostedTesterGateView {
|
|
1581
|
+
offered: true;
|
|
1582
|
+
/** Gates left on this session (3 at most). */
|
|
1583
|
+
attemptsLeft: number;
|
|
1584
|
+
}
|
|
1585
|
+
/** Body `input` of `POST /hosted/tester-gate`: the liveness clip of the gate, in the liveness step's input shape. */
|
|
1586
|
+
interface TesterGateInput {
|
|
1587
|
+
clipKey: string;
|
|
1588
|
+
attestation?: AttestationInput;
|
|
1589
|
+
captureChannel?: "mobile" | "desktop";
|
|
1590
|
+
capture?: LivenessCaptureInput;
|
|
1591
|
+
}
|
|
1592
|
+
/** Answer of `POST /hosted/tester-gate`: the hosted view after the gate, and whether an enrolled tester was recognised. */
|
|
1593
|
+
type TesterGateResponse = HostedSessionView & {
|
|
1594
|
+
bound: boolean;
|
|
1595
|
+
};
|
|
1574
1596
|
/** The hosted view's `simulation` block (Sandbox DX spec 2026-11-06 §8): what a simulated session tells the flow. */
|
|
1575
1597
|
interface HostedSimulationView {
|
|
1576
1598
|
/** The code that passes the phone, email and national eID code screens: render it, nothing is delivered. */
|
|
@@ -1784,4 +1806,4 @@ interface SubmitCheckBody {
|
|
|
1784
1806
|
forceOutcome?: "pass" | "fail" | "age_over" | "age_uncertain" | "age_under" | "age_unavailable";
|
|
1785
1807
|
}
|
|
1786
1808
|
|
|
1787
|
-
export { type
|
|
1809
|
+
export { type IdentityMethod as $, type AcceptedDocumentType as A, type HostedEidView as B, type CaptureContext as C, type DecisionReason as D, type EidAfterPass as E, type FaceMatchInput as F, type HostedEmailOtpView as G, type HostedAcceptedDocuments as H, type HostedFlowRef as I, type HostedIcaoPolicy as J, type HostedIntegrity as K, type HostedLivePhotoTuning as L, type HostedNativeCaptureTuning as M, type HostedOcrTuning as N, type HostedOtpView as O, type HostedPlanView as P, type HostedPortraitPendingFix as Q, type HostedPortraitView as R, type HostedSessionView as S, type HostedSimulationView as T, type HostedStepView as U, type HostedTesterGateView as V, type HostedVoiceLocale as W, type HostedVoiceView as X, type IcaoCriterion as Y, type IcaoReportEntry as Z, type IdentityConfirmDecision as _, type AttestationInput as a, ICAO_FALLBACK as a$, type IdentitySummarySource as a0, type IdentitySummaryView as a1, type LivenessCaptureInput as a2, type LivenessInput as a3, type LivenessReason as a4, type MatchReason as a5, type MediaKind as a6, type MethodChoiceView as a7, type NationalEidOption as a8, type NfcChipReason as a9, type SessionFailureReason as aA, type SessionReason as aB, type SessionStatus as aC, type SessionStepView as aD, type SessionView as aE, type SimulatedCaptureInput as aF, type StepResult as aG, type StepSection as aH, type SubmitCheckBody as aI, type TesterGateInput as aJ, type TesterGateResponse as aK, type VerificationAssurance as aL, type VerificationLevel as aM, type ScreenRampColour as aN, type AgeEstimationReason as aO, type CameraUnavailableCause as aP, type CaptureIssueReport as aQ, type CaptureProvenance as aR, type HostedBranding as aS, type HostedBrandingColorKey as aT, type HostedLivenessCaptureTuning as aU, type IcaoCaptureTuning as aV, type RetakeHint as aW, type ScreenRampChallenge as aX, type ScreenRampPaint as aY, type ScreenRampRendered as aZ, type ScreenRampReport as a_, type NfcStepView as aa, type OtpChoiceView as ab, type PhoneCountryRule as ac, type PhoneFormat as ad, type PhoneOtpInput as ae, type PhoneOtpReason as af, type PhotoSource as ag, type PhotoSourcePick as ah, type PlanAttempts as ai, type PlanChoiceKind as aj, type PlanChoiceOption as ak, type PlanChoiceView as al, type PlanSectionView as am, type PlanStepView as an, type PopulationInput as ao, type PopulationReason as ap, type PortraitFix as aq, type PortraitFixReviewInput as ar, type PortraitIcaoInput as as, type PortraitIcaoReason as at, type PortraitOutputFormat as au, type PresignRequest as av, type PresignUploadResult as aw, type RecordConsentResult as ax, type ResolvedCaptureMode as ay, type SessionDecidingStep as az, type CaptureMode as b, type IcaoProfile as b0, type ResolvedIcaoTuning as b1, resolveIcaoTuning as b2, type PersonMask as b3, type BackgroundUniformity as b4, type CaptureNoncesResult as c, type CaptureProof as d, type CheckInputByType as e, type CheckReason as f, type CheckState as g, type CheckType as h, type ClosedBy as i, type CompleteMediaResult as j, type ConsentLocale as k, type ContactChannel as l, type DocDeviceRead as m, type DocOcrInput as n, type DocReason as o, type DocSide as p, type EidAuthInput as q, type EidReason as r, type EmailOtpInput as s, type EmailOtpReason as t, type FaceMatchReason as u, type HostedCaptureTuning as v, type HostedConsentView as w, type HostedDocumentCaptureTuning as x, type HostedDocumentScanTuning as y, type HostedDocumentsView as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sekyro/web",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.24",
|
|
4
4
|
"description": "Sekyro AI web SDK \u2014 browser liveness capture, hosted-verification client and popup embed for Sekyro AI identity verification",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"repository": {
|
package/sbom.cdx.json
CHANGED
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
"type": "application",
|
|
98
98
|
"name": "web",
|
|
99
99
|
"group": "@sekyro",
|
|
100
|
-
"version": "0.1.0-rc.
|
|
101
|
-
"bom-ref": "@sekyro/web@0.1.0-rc.
|
|
100
|
+
"version": "0.1.0-rc.24",
|
|
101
|
+
"bom-ref": "@sekyro/web@0.1.0-rc.24",
|
|
102
102
|
"description": "Sekyro AI web SDK — browser liveness capture, hosted-verification client and popup embed for Sekyro AI identity verification",
|
|
103
103
|
"licenses": [
|
|
104
104
|
{
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
],
|
|
111
|
-
"purl": "pkg:npm/%40sekyro/web@0.1.0-rc.
|
|
111
|
+
"purl": "pkg:npm/%40sekyro/web@0.1.0-rc.24?vcs_url=git%2Bhttps%3A%2F%2Fgithub.com%2FIBTIKAR-Technologies%2Fibtikar-identity.git%23packages%2Fsekyro-web",
|
|
112
112
|
"externalReferences": [
|
|
113
113
|
{
|
|
114
114
|
"url": "https://github.com/IBTIKAR-Technologies/ibtikar-identity/issues",
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
"name": "tasks-vision",
|
|
151
151
|
"group": "@mediapipe",
|
|
152
152
|
"version": "0.10.35",
|
|
153
|
-
"bom-ref": "@sekyro/web@0.1.0-rc.
|
|
153
|
+
"bom-ref": "@sekyro/web@0.1.0-rc.24|@mediapipe/tasks-vision@0.10.35",
|
|
154
154
|
"licenses": [
|
|
155
155
|
{
|
|
156
156
|
"license": {
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
"name": "thumbmarkjs",
|
|
186
186
|
"group": "@thumbmarkjs",
|
|
187
187
|
"version": "1.12.0",
|
|
188
|
-
"bom-ref": "@sekyro/web@0.1.0-rc.
|
|
188
|
+
"bom-ref": "@sekyro/web@0.1.0-rc.24|@thumbmarkjs/thumbmarkjs@1.12.0",
|
|
189
189
|
"licenses": [
|
|
190
190
|
{
|
|
191
191
|
"license": {
|
|
@@ -218,17 +218,17 @@
|
|
|
218
218
|
],
|
|
219
219
|
"dependencies": [
|
|
220
220
|
{
|
|
221
|
-
"ref": "@sekyro/web@0.1.0-rc.
|
|
221
|
+
"ref": "@sekyro/web@0.1.0-rc.24",
|
|
222
222
|
"dependsOn": [
|
|
223
|
-
"@sekyro/web@0.1.0-rc.
|
|
224
|
-
"@sekyro/web@0.1.0-rc.
|
|
223
|
+
"@sekyro/web@0.1.0-rc.24|@mediapipe/tasks-vision@0.10.35",
|
|
224
|
+
"@sekyro/web@0.1.0-rc.24|@thumbmarkjs/thumbmarkjs@1.12.0"
|
|
225
225
|
]
|
|
226
226
|
},
|
|
227
227
|
{
|
|
228
|
-
"ref": "@sekyro/web@0.1.0-rc.
|
|
228
|
+
"ref": "@sekyro/web@0.1.0-rc.24|@mediapipe/tasks-vision@0.10.35"
|
|
229
229
|
},
|
|
230
230
|
{
|
|
231
|
-
"ref": "@sekyro/web@0.1.0-rc.
|
|
231
|
+
"ref": "@sekyro/web@0.1.0-rc.24|@thumbmarkjs/thumbmarkjs@1.12.0"
|
|
232
232
|
}
|
|
233
233
|
]
|
|
234
234
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-TYJA2XJR.js";import"./chunk-LL3YYUKR.js";export{a as createBackgroundMonitor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d}from"./chunk-XB4KLBHY.js";export{a as bounded,c as cameraHash,b as hex16,d as noteCameraTrait};
|
package/dist/chunk-PVSYKKMP.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as Fe,B as Be,a as Te,b as Ve,c as De,d as L,e as W,f as j,g as Ne,h as V,i as He,j as R,k as D,l as O,m as se,n as E,o as U,p as F,q as Z,r as Le,s as Ue}from"./chunk-6RJTKX5I.js";import{n as we}from"./chunk-NHXLIDQJ.js";import{a as Me}from"./chunk-CPK5FYNJ.js";import{c as re,g as Ee,h as $}from"./chunk-ZGDUIZC2.js";import{c as Ie,d as ie}from"./chunk-CDDYFUER.js";function J(e){return e.idNumberBound??e.nniBound}function B(e){return e===void 0?void 0:e.idNumberFromDocument??e.nniFromDocument}function Ge(e){let t=e.idNumberMasked??e.nniMasked;return typeof t=="string"&&t!==""?t:void 0}var ht="https://api.sekyro.ai",St=5e3,yt=24e4,gt=3e4,_t=1500,Ct=10;function kt(e){return new Promise(t=>setTimeout(t,e))}function Pt(){let e=globalThis.crypto;if(e!==void 0&&typeof e.randomUUID=="function")return e.randomUUID();let t=new Uint8Array(16);if(e!==void 0&&typeof e.getRandomValues=="function")e.getRandomValues(t);else for(let r=0;r<16;r+=1)t[r]=Math.floor(Math.random()*256);t[6]=(t[6]??0)&15|64,t[8]=(t[8]??0)&63|128;let o=[...t].map(r=>r.toString(16).padStart(2,"0")).join("");return`${o.slice(0,8)}-${o.slice(8,12)}-${o.slice(12,16)}-${o.slice(16,20)}-${o.slice(20)}`}function hn(e){return bt(e,{})}function bt(e,t){let o=e.apiOrigin??ht,r=e.autoRetry??!0,i=e.rearm??"auto",s=t.client??new Ee({apiOrigin:o,sessionToken:e.clientToken,fetch:e.fetch}),u=t.sleep??kt,c=t.uuid??Pt,p=t.getTurnstileToken??((n,a)=>import("./turnstile-MX6YN4YH.js").then(l=>l.executeTurnstile(n,a))),m=Me(),S=null,x=null,d=!1,_=new AbortController,f=null,M=null,G=null,K=()=>G??Le(f),pe=()=>Ue(Z(f),K()),v=n=>{f=n,m.emit("view",n),S?.onView(n)},C=()=>f!==null?Promise.resolve(f):(M??(M=s.getSession().then(n=>(v(n),n)).finally(()=>{M=null})),M),A=async()=>{let n=await s.getSession();return v(n),n},Q=async(n,a)=>{n.plan!==void 0?v(n):await A()},X=null,fe=async n=>{let a=await C();if(n||!a.consentRecorded){let l=await s.recordConsent(e.locale);l.plan!==void 0?v(l):f!==null&&v({...f,consentRecorded:!0})}Re(a.turnstileSiteKey)},w=n=>n?.force===!0?fe(!0):(X??(X=fe(!1).finally(()=>{X=null})),X),z={client:s,ensureConsent:n=>w(n),sleep:u,uuid:c,...t.random!==void 0?{random:t.random}:{},onBusy:n=>{d||m.emit("busy",n)}},me=!1,he=null,ee=n=>{if(n.status==="verified"||n.status==="not_verified"||n.status==="review"){if(me)return;me=!0}he=JSON.stringify(n),m.emit("result",n)},tt=n=>{he!==JSON.stringify(n)&&ee(n)},Se=async n=>{let a=f;n&&(a=await A().catch(()=>f));let l=a===null?null:V(a);return l!==null&&!d&&m.emit("method",l),l!==null},ye=null,ge=!1,_e=!1,Ce=()=>Fe(z,(n,a)=>n.submitCheck("population_registry",{},{idempotencyKey:a})),ke=n=>J(n)===!0||B(O(n,"population_registry"))===!0,nt=async()=>{try{let n=await C();if(R(n)||V(n)!==null||D(n)?.checkType!=="population_registry")return;if(!ke(n)&&B(O(n,"population_registry"))===void 0&&(n=await A()),!ke(n)){_e=!0;return}await w(),await Q(await Ce(),"population_registry");let a=f===null?void 0:O(f,"population_registry");if(a?.state==="input_required"&&a.reason==="registry_unavailable"&&j(a)>0){if(await u(St),d)return;await Q(await Ce(),"population_registry")}}catch(n){if(n instanceof re&&(n.code==="check_not_active"||n.code==="step_not_on_path")){await A().catch(()=>{});return}ge=!0;return}f!==null&&R(f)&&ee(U(f,{autoRetry:r}))},Pe=()=>(ye??(ye=nt()),ye),te=t.now??Date.now,T=null,ne=n=>p(n,{signal:_.signal}),be=(n,a)=>n!==null&&n.siteKey===a&&te()-n.at<yt,Re=n=>{if(n===null||d||be(T,n))return;let a=ne(n);a.catch(()=>{}),T={siteKey:n,at:te(),token:a}},ot=async n=>{let a=T;T=null;let l=be(a,n),g=l?a.at:te(),h=l?a.token.catch(()=>ne(n)):ne(n);h.catch(()=>{});let b,Y=new Promise(P=>{b=setTimeout(()=>P("late"),gt)});try{let P=await Promise.race([h.then(y=>({value:y}),()=>null),Y]);return P==="late"?(!d&&T===null&&(T={siteKey:n,at:g,token:h}),null):P===null?null:P.value}finally{clearTimeout(b)}},it=async()=>{let a=(await C()).turnstileSiteKey;if(a===null)return{sandbox:!0};let l=await ot(a);return l===null?{channel:"hosted_web",siteKey:a}:{channel:"hosted_web",siteKey:a,turnstileToken:l}},q=n=>{if(d)return;let a=s.reportCaptureIssue;if(a===void 0)return;let l=n.formFactor;try{l??(l=Ie())}catch{}try{Promise.resolve(a.call(s,{...n,...l!==void 0?{formFactor:l}:{}})).catch(()=>{})}catch{}},k=null,xe=Promise.resolve(),H=0,rt=async()=>{let n=await C();for(let a=0;a<Ct&&!d&&!R(n)&&D(n)===void 0&&W(n).some(l=>l.state==="processing")&&(await u(_t),!d);a+=1)n=await A();return n},st=async(n,a,l)=>{let{capture:g}=n,h=()=>d,b=()=>n.alive&&n.attempt===l,Y=y=>{b()&&g.setFlowState(y)},P=y=>{if(!h()&&(y.status==="unavailable"&&y.reasonCode!==void 0&&!Te(y.reasonCode)&&q({check:"liveness",kind:"unavailable",phase:"upload",engineKind:y.reasonCode,attempt:Math.max(0,n.issues.value)}),ee(y),!!b())){if(y.status==="retry"&&i==="auto"){g.handle.retry();return}g.setFlowState("done")}};if(a.degraded==="NO_RECORDER"){let y=f?.sessionId??(await C().catch(()=>null))?.sessionId??"";P(E(y,"no_recorder"));return}Y("uploading");try{if(await Pe(),h())return;let y=await C(),Ae;if(!R(y)&&V(y)!==null){await Se(!1),P(E(y.sessionId,"method_required"));return}if(!R(y)){if(D(y)?.checkType==="population_registry"){P(E(y.sessionId,_e?"nni_unbound":ge?"network":"registry_unavailable"));return}if(await w(),h())return;Ae=f??y;let oe=await Be({...z,artifacts:a,getAttestation:it,getView:()=>f??y,refreshView:A,applySubmit:Q,onPhase:Y,isCancelled:h,onKeyframePromoted:mt=>{x=mt}});if(h())return;if(oe.kind==="unavailable"){P(E(y.sessionId,oe.reason));return}if(oe.kind==="resync"&&await A(),f!==null&&V(f)!==null){await Se(!1),P(E(y.sessionId,"method_required"));return}y=await rt()}P(U(y,{autoRetry:r,previous:Ae}))}catch{if(h())return;P(E(f?.sessionId??"","network"))}},at=(n,a)=>{let l=n.attempt;H>0&&n.alive&&n.capture.setFlowState("uploading"),H+=1,xe=xe.then(()=>st(n,a,l)).finally(()=>{H-=1,H===0&&S?.onChainIdle()}).catch(()=>{})},Oe=n=>{k?.capture.handle.destroy(),k!==null&&(k.alive=!1);let a=we(n,S?.captureInternals?.(n)??t.capture,()=>f?.capture?.liveness?.keyframe?.rank===!0,pe,()=>f?.capture?.liveness?.screenRamp,{session:()=>Z(f),onModeChange:h=>{G=h}}),l={capture:a,alive:!0,attempt:0,issues:De()};k=l,a.handle.on("error",h=>{q(Ve("liveness",h,l.issues.value))}),a.handle.on("state",h=>{if(l.issues.note(h),h==="starting"){l.attempt+=1,Re(f?.turnstileSiteKey??null);let b=f===null?void 0:D(f)?.checkType;(b==="liveness"||b==="face_match")&&w().catch(()=>{})}}),a.handle.on("captured",h=>{Promise.resolve().then(()=>at(l,h))});let g=a.handle;return{get state(){return g.state},get captureMode(){return g.captureMode},get facingMode(){return g.facingMode},on:(h,b)=>g.on(h,b),start:async h=>{if(f===null&&await C().catch(()=>{}),!!l.alive)return g.start(h)},retry:()=>g.retry(),switchCamera:()=>g.switchCamera(),canSwitchCaptureMode:()=>g.canSwitchCaptureMode(),setCaptureMode:h=>g.setCaptureMode(h),destroy:()=>{l.alive=!1,k===l&&(k=null),g.destroy()}}},ct=async()=>{if(d)return null;try{let n=await C();return d?null:V(n)}catch{return null}},ut=async()=>{if(d)return"self";try{let n=await C();if(d)return"self";let a=Z(n);return a==="choice"?K()??a:a}catch{return"self"}},dt=async()=>{if(d)return!1;try{let n=await C();return d||R(n)||ie()?!1:F(n,D(n))==="phone"||F(n,O(n,"liveness"))==="phone"}catch{return!1}},lt=async()=>{if(d)return!1;try{let n=await C();return!d&&n.returning===!0}catch{return!1}},pt=async n=>{let a=(await C()).plan?.choice,l=a?.options.find(h=>L[h.service]===n);if(!l)throw new RangeError(`method ${String(n)} is not offered`);let g=await s.choose(a.nodeId,l.id);d||v(g)},ve=null,ft=()=>(ve??(ve=import("./plan-runner-5UZYQ2XH.js").then(n=>{let a=n.createPlanRunner({runtime:z,currentView:()=>f,cameraMode:pe,captureModeSwitch:{pick:K,choose:l=>{G=l}},ensureView:C,refreshView:A,ensureConsent:()=>w(),liveness:Oe,stopLiveness:()=>{k!==null&&(k.alive=!1,k.capture.handle.destroy(),k=null)},chainBusy:()=>H>0,destroyed:()=>d,sleep:u,isMobile:ie,now:t.now??Date.now,keptFaceKey:()=>x,setView:v,baseCapture:t.capture,emitStep:l=>{d||m.emit("step",l)},emitResult:tt,reportCaptureIssue:q,documentInternals:t.document,portraitInternals:t.portrait,livePhotoInternals:t.livePhoto,uploadInternals:t.upload});return S=a,a})),ve);return{consent:()=>w(),startRegistry:Pe,methodChoice:ct,selectMethod:pt,reportCameraUnavailable:async n=>{await w();let a=s.reportCameraUnavailable;if(a===void 0)throw new TypeError("this client cannot report a missing camera");let l=await a.call(s,n).catch(g=>{if(g instanceof re&&g.code==="check_out_of_order")return s.getSession();throw g});d||v(l)},reportCaptureIssue:q,mobileRequired:dt,captureMode:ut,chooseCaptureMode:n=>{G=n},get captureChoice(){return K()},returning:lt,liveness:Oe,run:async()=>{if(d)throw new Error("verification destroyed");return(await ft()).run()},currentStep:()=>S?.current()??null,voiceClips:async()=>{if(d)return null;try{let n=await C();return d?null:n.voice??null}catch{return null}},on:(n,a)=>m.on(n,a),destroy:()=>{d=!0,_.abort(),S?.destroy(),k!==null&&(k.alive=!1,k.capture.handle.destroy(),k=null),m.clear()}}}var Ke=["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"];var Rt=["carte_identite","passport","residence_permit"];function xt(e,t){let o=e.byIssuer?.[t]??e.default;return Rt.filter(r=>o==="*"||o.includes(r))}function _n(e,t=Ke){return[...new Set([...t,...Object.keys(e.byIssuer??{})])].filter(r=>xt(e,r).length>0).sort()}function qe(e){if(e.acceptedDocuments)return e.acceptedDocuments;let t=e.acceptedDocumentTypes?.length?[...e.acceptedDocumentTypes]:["carte_identite","passport"];return{default:[],byIssuer:{MR:t}}}function Cn(e){return/^[A-Z]{2}$/.test(e)?String.fromCodePoint(...[...e].map(t=>127462+t.charCodeAt(0)-65)):""}var Ye=Object.freeze({nni_invalid:"id_number_invalid",nni_not_found:"registry_record_not_found",nni_recheck:"id_number_recheck",document_nni_mismatch:"document_id_number_mismatch",nni_locked:"id_number_locked",nni_unbound:"id_number_unbound",sandbox_nni_not_seeded:"sandbox_id_number_not_seeded",missing_nni:"missing_id_number",registry_needs_nni_source:"registry_needs_id_number_source"}),Ot=new Map(Object.entries(Ye)),Pn=new Map(Object.entries(Ye).map(([e,t])=>[t,e]));function We(e){return Ot.get(e)??e}var Mn=["national_number","document_photo","national_eid"],vt=new Set(["phone_otp","email_otp","national_eid","document","nfc","population_registry","supplied_identity","summary_confirm","liveness","portrait","face_match","aml_screening","face_dedup","age_estimation"]),At=new Set(["supplied_identity","aml_screening","face_dedup","age_estimation"]),ce=["document","population_registry","national_eid"],ue=["phone_otp","email_otp"],$e={identity_method:ce,contact:ue},It=["population_registry","document"],de="platform_unsupported",Mt=new Set(["prefilled","user_entered","prefilled_or_entered"]),wt={phone_otp:"contact",email_otp:"contact",eid_auth:"identity",doc_ocr:"identity",nfc_chip:"identity",population_registry:"identity",liveness:"live_photo",portrait_icao:"live_photo",face_match:"live_photo"};function I(e){return e.section??wt[e.checkType]??null}function Et(e,t){let o=e.plan?.choice;if(o===void 0||o.locked)return;let r=o.options.find(i=>i.id!==o.selected&&i.available!==!1&&t.includes(i.service));return r===void 0?void 0:{nodeId:o.nodeId,option:r}}function le(e){let t=e.plan,o=t?.choice;if(t===void 0||o===void 0||o.locked||t.current===null||t.current===o.nodeId||R(e))return null;let r=$e[o.kind]??[...ce,...ue],i=o.options.flatMap(c=>c.available===!1||!r.includes(c.service)?[]:[c.nationalEid!=null?{id:c.id,service:c.service,nationalEid:c.nationalEid}:{id:c.id,service:c.service}]),s=t.steps.find(c=>c.id===t.current)?.service,u=o.selected??i.find(c=>c.service===s)?.id??null;return i.some(c=>c.id!==u)?{nodeId:o.nodeId,kind:o.kind,current:u,options:i}:null}function Je(e){return e==null?[]:e.options.filter(t=>t.id!==e.current)}function Tt(e){let t=e.simulation;if(typeof t!="object"||t===null)return;let{otpCode:o,skipCapture:r}=t;return typeof o=="string"&&o!==""&&typeof r=="boolean"?{otpCode:o,skipCapture:r}:void 0}function Vt(e){let t=(e.plan?.sections??[]).map(s=>({id:s.id,state:s.state})),o={sessionId:se(e.sessionId),orgName:e.orgName,returning:e.returning===!0,consentRecorded:e.consentRecorded,expiresAt:e.expiresAt,sections:t.map(s=>s.id),progress:t,purpose:e.purpose??"identity"};e.branding!==void 0&&(o.branding=e.branding),e.cameraUnavailableHandled===!0&&(o.cameraUnavailableHandled=!0);let r=Tt(e);r!==void 0&&(o.simulation=r);let i=le(e);return i!==null&&(o.switchable=i),o}function Dt(e){let t={attemptsRemaining:j(e),attemptsExhausted:e.attempts.used>=e.attempts.max};return e.reason!==void 0&&(t.reason=e.reason),e.retakeHint!==void 0&&(t.retakeHint=e.retakeHint),t}var Qe={phone_otp:"phone",email_otp:"email"};function Nt(e,t){let o=Et(e,[t==="phone_otp"?"email_otp":"phone_otp"]);return o===void 0?void 0:Qe[o.option.service]}function Ht(e,t,o,r){let i=t.checkType==="email_otp",s=(i?t.emailOtp:t.otp)??{},u=i?t.emailOtp?.emailSource:t.otp?.numberSource,c=u!==void 0&&Mt.has(u)?u:i?"prefilled_or_entered":"user_entered",p=typeof s.sentToMasked=="string"&&s.sentToMasked.length>0,m=s.prefilled===!0,S=Nt(e,i?"email_otp":"phone_otp"),x={key:t.checkType,context:o,section:I(t),phase:p?"verify":"send",canSwitch:S!==void 0,...r},d=i?{kind:"email_otp",...x,emailSource:c,needsEmail:c!=="prefilled"&&!m}:{kind:"phone_otp",...x,numberSource:c,needsPhone:c!=="prefilled"&&!m,channels:(t.otp?.channels??[]).filter(_=>_==="whatsapp"||_==="sms")};if(S!==void 0&&(d.switchChannel=S),m&&(d.prefilled=!0),p&&(d.sentToMasked=s.sentToMasked),!i&&t.otp?.channel!==void 0&&(d.channel=t.otp.channel),!i&&Array.isArray(t.phoneCountries)&&(d.phoneCountries=t.phoneCountries.filter(_=>typeof _=="string"&&/^[A-Z]{2}$/.test(_))),!i&&Array.isArray(t.phoneRules)){let _=d.phoneCountries??[];d.phoneRules=t.phoneRules.flatMap(f=>{let M=Ft(f);return M!==void 0&&_.includes(M.code)?[M]:[]})}return!i&&t.phoneInternational===!0&&(d.phoneInternational=!0),s.expiresAt!==void 0&&(d.codeExpiresAt=s.expiresAt),s.resendAvailableAt!==void 0&&(d.resendAvailableAt=s.resendAvailableAt),d}var Lt=/^[\d[\]\-|()?:^]{1,64}$/;function Ut(e){try{return typeof e=="string"&&Lt.test(e)&&new RegExp(e)!==null}catch{return!1}}var je=e=>typeof e=="number"&&Number.isInteger(e)&&e>=1&&e<=15;function Ft(e){let{code:t,dial:o,trunk:r,lengths:i,formats:s}=e??{};if(typeof t!="string"||typeof o!="string"||!/^\d{1,3}$/.test(o)||r!==void 0&&(typeof r!="string"||!/^\d{1,3}$/.test(r))||!Array.isArray(i)||i.length===0||!i.every(je))return;let u={code:t,dial:o,lengths:[...i].sort((c,p)=>c-p)};if(r!==void 0&&(u.trunk=r),s!==void 0){if(!(Array.isArray(s)&&s.length<=8&&s.every(p=>Ut(p?.leading)&&Array.isArray(p.groups)&&p.groups.every(je)&&i.includes(p.groups.reduce((m,S)=>m+S,0)))))return;u.formats=s.map(p=>({leading:p.leading,groups:[...p.groups]}))}return u}function Bt(e,t,o,r){let i=J(e)===!0?"bound":B(t)===!0?"document":"typed",s=i==="typed"&&t.state==="input_required"&&t.reason!==void 0&&We(t.reason)==="id_number_recheck",u=Je(le(e)),c=!r.attemptsExhausted&&u.length===1&&u[0]?.service==="document";return{kind:"registry",key:"registry",context:o,section:I(t),state:t.state==="input_required"?"input_required":"pending",source:i,recheck:s,canUseDocument:c,...r}}function Gt(e,t,o,r,i){let s=[...t.acceptedSides??[]],u={kind:"document",key:"document",context:o,section:I(t),side:s.includes("recto")?"verso":"recto",acceptedSides:s,documents:qe(e),photo:ze(Xe(e.documents),i),...r};return e.detectedCountry!==void 0&&(u.detectedCountry=e.detectedCountry),Kt(e)&&(u.ageStepUp=!0),u}function Xe(e,t=!0){let o=e?.source==="upload"||e?.source==="choice"?e.source:"camera",r=e?.sourcePick==="camera"||e?.sourcePick==="upload"?e.sourcePick:null;return{source:o,pick:r,uploadOffered:t&&e?.uploadOffered===!0}}function ze(e,t){return t?{...e,cameraOnPhone:!0}:e}function Kt(e){let t=W(e).find(r=>r.checkType==="age_estimation"),o=t?.reason;return t?.state==="failed"&&(o==="age_uncertain"||o==="age_unavailable")}function qt(e){let t=O(e,"liveness");return t?.state==="passed"||t?.state==="review"}function Ze(e,t,o,r,i,s=!1){let u=t.icao?.report,c=e.portrait,p=i==="capture"?c?.pendingFix??null:null;p!==null&&(i="review");let m=et(e);return{kind:"portrait",key:`portrait:${i}`,context:o,section:I(t),phase:i,report:Array.isArray(u)?u:null,review:t.state==="review",tuning:e.capture?.icao??null,tuningVersion:e.capture?.tuningVersion??null,icao:$(e),retakeOnly:i==="capture"&&t.state==="input_required"&&m===void 0&&e.capture?.livePhoto?.oneCapture===!0&&qt(e),photo:ze(Xe(c,i==="capture"),s&&i==="capture"),pendingFix:p,...m!==void 0?{captureMode:m}:{},...c?.reuse?.pending===!0?{reuse:!0}:{},...r}}function et(e){let t=e.portrait?.captureMode;return t==="self"||t==="assisted"||t==="choice"?t:void 0}var ae={minLongSidePx:1280,jpegQuality:.95};function Yt(e,t){let o=e.capture?.livePhoto;if(o?.oneCapture!==!0)return null;let r=O(e,"portrait_icao"),i=o.still??ae;return{icao:t==="liveness"&&$(e)!==null&&et(e)===void 0&&r!==void 0&&r.state==="pending"&&r.reason===void 0,still:{minLongSidePx:i.minLongSidePx??ae.minLongSidePx,jpegQuality:i.jpegQuality??ae.jpegQuality}}}function Wt(e,t,o,r){let i=t.eid,s=I(t);if(i===void 0||i.challenge!=="app_code")return{kind:"unsupported",key:"unsupported:eid_auth",context:o,section:s,checkType:"eid_auth",reason:"update_required"};let u=Je(le(e)),c=u.length===1&&It.includes(u[0]?.service??"")?u[0]:void 0,p=c===void 0?void 0:L[c.service],m=p!==void 0,S={kind:"eid",key:"eid",context:o,section:s,provider:i.provider,providerName:i.providerName,country:i.country,challenge:"app_code",phase:i.awaiting==="code"?"code":"identifier",identifierBound:i.identifierBound===!0,canUseCamera:m,afterPass:i.afterPass==="continue"?"continue":"end",...r};return m&&(S.cameraMethod=p),i.expiresAt!==void 0&&(S.codeExpiresAt=i.expiresAt),i.resendAvailableAt!==void 0&&(S.resendAvailableAt=i.resendAvailableAt),i.resendsRemaining!==void 0&&(S.resendsRemaining=i.resendsRemaining),i.codeAttemptsRemaining!==void 0&&(S.codeAttemptsRemaining=i.codeAttemptsRemaining),S}function jt(e,t){if(t.checkType!=="face_match"||t.reason!==void 0)return null;let o=O(e,"portrait_icao");return o!==void 0&&(o.state==="passed"||o.state==="review")?o:null}var Zt={rejected:"rejected",inconclusive:"inconclusive",unavailable:"unavailable",abandoned:"expired",not_opened:"expired",cancelled:"expired",superseded:"expired",policy:"policy"};function $t(e){return e.reasonCode===de?"platform_unsupported":e.status==="review_pending"?"review":e.status==="verified"?"verified":e.reasonCode==="device_cooldown"?"cooldown":e.reasonCode==="starter_credit_claimed"?"policy":(e.status==="not_verified"&&e.reason!==void 0?Zt[e.reason]:void 0)??"rejected"}function Jt(e,t){let o=$t(e),r=o==="platform_unsupported"?{sessionId:se(e.sessionId),status:"unavailable",reasonCode:de}:U(e,{autoRetry:!1}),i={kind:"result",key:"result",context:t,section:null,display:o,result:r};return e.status==="not_verified"&&e.reason!==void 0&&(i.reason=e.reason),e.reasonCode!==void 0&&(i.reasonCode=e.reasonCode),e.status==="not_verified"&&e.step!==void 0&&(i.step=e.step),e.retryAfter!==void 0&&(i.retryAfter=e.retryAfter),i}function Qt(e,t,o){let r=e.identitySummary;if(r==null)return null;let i={kind:"identity_summary",key:"identity_summary",context:t,section:o??"identity",summaryKind:r.kind==="partial"?"partial":r.kind??"full",source:r.source,portraitAvailable:r.portrait?.available===!0,retakeAvailable:r.retakeAvailable===!0};for(let u of Xt){let c=r[u];typeof c=="string"&&c!==""&&(i[u]=c)}let s=Ge(r);return s!==void 0&&(i.idNumberMasked=s,i.nniMasked=s),i}var Xt=["fullName","birthDate","birthYear","nationality","documentType","documentNumberMasked","expiryDate","retakeTarget"];function N(e,t,o,r){return{kind:"unsupported",key:`unsupported:${o}`,context:e,section:t,checkType:o,reason:r}}function zt(e){return e.kind==="contact"?"contact":(e.kind==="identity_method","identity")}function en(e,t){let o=$e[e.kind]??[...ce,...ue],r=zt(e),i=e.options.flatMap(u=>{if(u.available===!1||!o.includes(u.service))return[];let c={id:u.id,service:u.service};u.nationalEid!=null&&(c.nationalEid=u.nationalEid);let p=(u.channels??[]).filter(m=>m==="whatsapp"||m==="sms");return u.service==="phone_otp"&&p.length>0&&(c.channels=p),[c]});if(i.length===0){let u=e.options.length>0&&e.options.every(c=>c.service==="nfc");return N(t,r,"choice",u?"platform_unsupported":"update_required")}let s={nodeId:e.nodeId,kind:e.kind,selected:e.selected,options:i};if(e.kind==="identity_method"){let u={kind:"method",key:"method",context:t,section:r,options:i.map(p=>L[p.service]),choice:s},c=i.find(p=>p.nationalEid!==void 0)?.nationalEid;return c!==void 0&&(u.nationalEid=c),u}return e.kind==="contact"?{kind:"contact_choice",key:"contact_choice",context:t,section:r,options:i.map(u=>Qe[u.service]),selected:null,locked:!1,choice:s}:{kind:"choice",key:`choice:${e.nodeId}`,context:t,section:r,choice:s}}function wn(e,t={}){let o=Vt(e);if(R(e)||e.reasonCode===de)return Jt(e,o);let r=e.plan;if(r===void 0||!Array.isArray(r.sections))return N(o,null,"plan","update_required");let i=Ne(e);if(i!==null)return en(i,o);let s=r.current===null?void 0:r.steps.find(d=>d.id===r.current),u=d=>{let _={kind:"processing",key:"processing",context:o,section:d!==void 0?I(d):r.sections.find(f=>f.state==="current")?.id??null,stalled:!1};return typeof d?.service=="string"&&d.service!==""&&(_.service=d.service),_};if(r.current===null)return u(r.steps.find(d=>d.state==="processing"));if(s===void 0)return N(o,null,"step","update_required");if(!vt.has(s.service))return s.interaction==="server"?u(s):N(o,I(s),s.service,"update_required");if(At.has(s.service)||!He(s))return u(s);let c=s,p=Dt(c),m=c.checkType,S=I(c),x=t.isMobile===!1?F(e,c):null;if(x==="phone")return{kind:"mobile_required",key:"mobile_required",context:o,section:S,checkType:m};switch(m){case"phone_otp":case"email_otp":return Ht(e,c,o,p);case"population_registry":return Bt(e,c,o,p);case"eid_auth":return Wt(e,c,o,p);case"doc_ocr":return Gt(e,c,o,p,x==="upload_or_phone");case"identity_confirm":return Qt(e,o,S)??u(c);case"portrait_icao":return Ze(e,c,o,p,"capture",x==="upload_or_phone");case"liveness":case"face_match":{let d=jt(e,c);if(d!==null)return Ze(e,d,o,p,"match");let _=c.requiresMobile===!0,f=$(e);return{kind:"liveness",key:"biometric",context:o,section:S,mode:m==="face_match"?"selfie":"liveness",requiresMobile:_,instructions:f===null?"standard":"icao",icao:f,livePhoto:Yt(e,m),...p}}case"nfc_chip":return N(o,S,m,"platform_unsupported");default:return N(o,S,m,"update_required")}}export{ht as a,St as b,_t as c,Ct as d,Pt as e,hn as f,bt as g,Ke as h,Rt as i,xt as j,_n as k,qe as l,Cn as m,Mn as n,de as o,I as p,le as q,Je as r,jt as s,wn as t};
|