@sekyro/web 0.1.0-rc.1 → 0.1.0-rc.11
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 +225 -0
- package/LICENSE +25 -16
- package/README.md +105 -61
- package/THIRD-PARTY-NOTICES.txt +154 -0
- package/dist/background-monitor-A7FKJOAG.js +1 -0
- package/dist/capture-constraints-B5omafmk.d.cts +44 -0
- package/dist/capture-constraints-B5omafmk.d.ts +44 -0
- package/dist/capture-session-doc-DMQ7T3HC.js +1 -0
- package/dist/{capture-session-v3-CAoWM8iT.d.cts → capture-session-v3-CCHws1mz.d.cts} +174 -15
- package/dist/{capture-session-v3-BJ8ciaWl.d.ts → capture-session-v3-DYrhYJoM.d.ts} +174 -15
- package/dist/chunk-73M7LS4H.js +1 -0
- package/dist/chunk-7ZCZY3ZP.js +1 -0
- package/dist/chunk-A3FUGHAH.js +2 -0
- package/dist/chunk-AHD4DA2V.js +1 -0
- package/dist/chunk-BPE5NSQ2.js +1 -0
- package/dist/chunk-CJHMFPL6.js +1 -0
- package/dist/chunk-DFTCAWMP.js +1 -0
- package/dist/chunk-DK5YPBDQ.js +1 -0
- package/dist/chunk-FHJ7HO3M.js +1 -0
- package/dist/chunk-FPXL63KZ.js +1 -0
- package/dist/chunk-FUHDOEBP.js +1 -0
- package/dist/chunk-G6LKLN4U.js +1 -0
- package/dist/chunk-GI3UFGRQ.js +1 -0
- package/dist/chunk-GT2ZLGF7.js +1 -0
- package/dist/chunk-HHCGQSD4.js +1 -0
- package/dist/chunk-IJLHPX35.js +1 -0
- package/dist/chunk-JDGEZ542.js +1 -0
- package/dist/chunk-LUKTHL6K.js +1 -0
- package/dist/chunk-MXNZMTC2.js +1 -0
- package/dist/chunk-MXWLCDFX.js +1 -0
- package/dist/chunk-O5WKNZ2C.js +1 -0
- package/dist/chunk-OKWG3PVH.js +1 -0
- package/dist/chunk-OWU22VXP.js +1 -0
- package/dist/chunk-POIQGEZM.js +1 -0
- package/dist/chunk-RI3E7GBN.js +1 -0
- package/dist/chunk-SMKCBUJL.js +1 -0
- package/dist/chunk-TDLIXFDT.js +1 -0
- package/dist/chunk-U6TYL2IJ.js +1 -0
- package/dist/chunk-URUKV6NC.js +1 -0
- package/dist/chunk-V5K2JLC7.js +1 -0
- package/dist/client/index.cjs +1 -357
- package/dist/client/index.d.cts +37 -3
- package/dist/client/index.d.ts +37 -3
- package/dist/client/index.js +1 -15
- package/dist/core/index.cjs +1 -1605
- package/dist/core/index.d.cts +5 -4
- package/dist/core/index.d.ts +5 -4
- package/dist/core/index.js +1 -139
- package/dist/core/ocr/worker.bundle.js +42 -0
- package/dist/core/ocr/worker.cjs +42 -0
- package/dist/core/ocr/worker.d.cts +84 -0
- package/dist/core/ocr/worker.d.ts +84 -0
- package/dist/core/ocr/worker.js +41 -0
- package/dist/core/v3/detect-worker.cjs +1 -392
- package/dist/core/v3/detect-worker.d.cts +1 -1
- package/dist/core/v3/detect-worker.d.ts +1 -1
- package/dist/core/v3/detect-worker.js +1 -13
- package/dist/create-document-capture-FV4XGUKQ.js +1 -0
- package/dist/create-portrait-capture-C462EIB6.js +1 -0
- package/dist/create-verification-CmJzn7sq.d.ts +3041 -0
- package/dist/create-verification-CzLrQjeM.d.cts +3041 -0
- package/dist/{detect-worker-CKXHlXx9.d.cts → detect-worker-DclNxkZT.d.cts} +6 -0
- package/dist/{detect-worker-CKXHlXx9.d.ts → detect-worker-DclNxkZT.d.ts} +6 -0
- package/dist/detector-scanic-YCDNLCGV.js +1 -0
- package/dist/icao-gate-BeznQECA.d.cts +500 -0
- package/dist/icao-gate-Bw5sQVlt.d.ts +500 -0
- package/dist/icao-gate-PWBMKRGC.js +1 -0
- package/dist/icao-tuning-4GGVX6B4.js +1 -0
- package/dist/index.cjs +1 -2580
- package/dist/index.d.cts +84 -5
- package/dist/index.d.ts +84 -5
- package/dist/index.js +1 -28
- package/dist/internal/index.cjs +1 -4110
- package/dist/internal/index.d.cts +364 -324
- package/dist/internal/index.d.ts +364 -324
- package/dist/internal/index.js +1 -647
- package/dist/keyframe-rank-YAJLYJYF.js +1 -0
- package/dist/landmarker-KB7LVXAU.js +1 -0
- package/dist/mrz-band-VYHOTDHY.js +1 -0
- package/dist/plan-runner-ZVAY4FSB.js +1 -0
- package/dist/popup/index.cjs +1 -76
- package/dist/popup/index.d.cts +7 -1
- package/dist/popup/index.d.ts +7 -1
- package/dist/popup/index.js +1 -11
- package/dist/scanic-ml-stub-KW7IZHUT.js +1 -0
- package/dist/segmenter-USLNBX65.js +1 -0
- package/dist/turnstile-FATNZ4AG.js +1 -0
- package/dist/types-BWyAHKt_.d.cts +1435 -0
- package/dist/types-BWyAHKt_.d.ts +1435 -0
- package/package.json +25 -10
- package/sbom.cdx.json +195 -0
- package/dist/capture-constraints-BujkZcfb.d.cts +0 -21
- package/dist/capture-constraints-BujkZcfb.d.ts +0 -21
- package/dist/chunk-LOTAJDRE.js +0 -1094
- package/dist/chunk-LOTAJDRE.js.map +0 -1
- package/dist/chunk-MWNFSNMP.js +0 -52
- package/dist/chunk-MWNFSNMP.js.map +0 -1
- package/dist/chunk-NILNKLK6.js +0 -50
- package/dist/chunk-NILNKLK6.js.map +0 -1
- package/dist/chunk-NU4YOLCN.js +0 -796
- package/dist/chunk-NU4YOLCN.js.map +0 -1
- package/dist/chunk-NWF46H7K.js +0 -359
- package/dist/chunk-NWF46H7K.js.map +0 -1
- package/dist/chunk-WY6U7AIK.js +0 -193
- package/dist/chunk-WY6U7AIK.js.map +0 -1
- package/dist/chunk-YVFF4Q4G.js +0 -327
- package/dist/chunk-YVFF4Q4G.js.map +0 -1
- package/dist/client/index.cjs.map +0 -1
- package/dist/client/index.js.map +0 -1
- package/dist/core/index.cjs.map +0 -1
- package/dist/core/index.js.map +0 -1
- package/dist/core/v3/detect-worker.cjs.map +0 -1
- package/dist/core/v3/detect-worker.js.map +0 -1
- package/dist/create-verification--ldwakXV.d.cts +0 -341
- package/dist/create-verification-BlAPWeW5.d.ts +0 -341
- package/dist/detector-scanic-4C6IEW2K.js +0 -787
- package/dist/detector-scanic-4C6IEW2K.js.map +0 -1
- package/dist/hosted-client-BpvBqu9f.d.cts +0 -408
- package/dist/hosted-client-BpvBqu9f.d.ts +0 -408
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/internal/index.cjs.map +0 -1
- package/dist/internal/index.js.map +0 -1
- package/dist/popup/index.cjs.map +0 -1
- package/dist/popup/index.js.map +0 -1
- package/dist/scanic-ml-stub-S2OZ6HEF.js +0 -10
- package/dist/scanic-ml-stub-S2OZ6HEF.js.map +0 -1
package/dist/popup/index.cjs
CHANGED
|
@@ -1,76 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/popup/index.ts
|
|
21
|
-
var popup_exports = {};
|
|
22
|
-
__export(popup_exports, {
|
|
23
|
-
SEKYRO_EVENTS: () => SEKYRO_EVENTS,
|
|
24
|
-
open: () => open,
|
|
25
|
-
openHosted: () => openHosted
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(popup_exports);
|
|
28
|
-
var SEKYRO_EVENTS = [
|
|
29
|
-
"session.completed",
|
|
30
|
-
"session.failed",
|
|
31
|
-
"session.review_pending",
|
|
32
|
-
"session.expired",
|
|
33
|
-
"session.cancelled"
|
|
34
|
-
];
|
|
35
|
-
var WINDOW_NAME = "sekyro-verify";
|
|
36
|
-
var WINDOW_FEATURES = "width=480,height=720,noopener=false";
|
|
37
|
-
var EVENT_NAMES = new Set(SEKYRO_EVENTS);
|
|
38
|
-
function isSekyroEvent(data) {
|
|
39
|
-
if (data === null || typeof data !== "object") return false;
|
|
40
|
-
const d = data;
|
|
41
|
-
return d.source === "sekyro" && d.version === 1 && typeof d.sessionId === "string" && typeof d.event === "string" && EVENT_NAMES.has(d.event);
|
|
42
|
-
}
|
|
43
|
-
function open(opts) {
|
|
44
|
-
const origin = new URL(opts.hostedUrl).origin;
|
|
45
|
-
const popup = window.open(opts.hostedUrl, WINDOW_NAME, WINDOW_FEATURES);
|
|
46
|
-
if (!popup) return { error: "popup_blocked" };
|
|
47
|
-
const listener = (ev) => {
|
|
48
|
-
if (ev.source !== popup) return;
|
|
49
|
-
if (ev.origin !== origin) return;
|
|
50
|
-
if (!isSekyroEvent(ev.data)) return;
|
|
51
|
-
const { source, version, event, sessionId } = ev.data;
|
|
52
|
-
opts.onEvent({ source, version, event, sessionId });
|
|
53
|
-
};
|
|
54
|
-
window.addEventListener("message", listener);
|
|
55
|
-
return {
|
|
56
|
-
close() {
|
|
57
|
-
window.removeEventListener("message", listener);
|
|
58
|
-
popup.close();
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
function openHosted(hostedUrl, opts) {
|
|
63
|
-
if (opts.mode === "redirect") {
|
|
64
|
-
window.location.assign(hostedUrl);
|
|
65
|
-
return { close() {
|
|
66
|
-
} };
|
|
67
|
-
}
|
|
68
|
-
return open({ hostedUrl, onEvent: opts.onEvent ?? (() => void 0) });
|
|
69
|
-
}
|
|
70
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
71
|
-
0 && (module.exports = {
|
|
72
|
-
SEKYRO_EVENTS,
|
|
73
|
-
open,
|
|
74
|
-
openHosted
|
|
75
|
-
});
|
|
76
|
-
//# sourceMappingURL=index.cjs.map
|
|
1
|
+
"use strict";var s=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var S=(n,e)=>{for(var t in e)s(n,t,{get:e[t],enumerable:!0})},k=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of f(e))!y.call(n,o)&&o!==t&&s(n,o,{get:()=>e[o],enumerable:!(r=E(e,o))||r.enumerable});return n};var g=n=>k(s({},"__esModule",{value:!0}),n);var h={};S(h,{SEKYRO_EVENTS:()=>d,open:()=>c,openHosted:()=>_});module.exports=g(h);var d=["session.completed","session.failed","session.review_pending","session.expired","session.cancelled"],w=new Set([0,1,2,3]),O="sekyro-verify",N="width=480,height=720,noopener=false",x=new Set(d);function m(n){if(n===null||typeof n!="object")return!1;let e=n;return e.source==="sekyro"&&e.version===1&&typeof e.sessionId=="string"&&typeof e.event=="string"&&x.has(e.event)}function c(n){let e=new URL(n.hostedUrl).origin,t=window.open(n.hostedUrl,O,N);if(!t)return{error:"popup_blocked"};let r=o=>{if(o.source!==t||o.origin!==e||!m(o.data))return;let{source:l,version:v,event:u,sessionId:a,level:i}=o.data,p={source:l,version:v,event:u,sessionId:a};w.has(i)&&(p.level=i),n.onEvent(p)};return window.addEventListener("message",r),{close(){window.removeEventListener("message",r),t.close()}}}function _(n,e){return e.mode==="redirect"?(window.location.assign(n),{close(){}}):c({hostedUrl:n,onEvent:e.onEvent??(()=>{})})}0&&(module.exports={SEKYRO_EVENTS,open,openHosted});
|
package/dist/popup/index.d.cts
CHANGED
|
@@ -2,12 +2,18 @@
|
|
|
2
2
|
declare const SEKYRO_EVENTS: readonly ["session.completed", "session.failed", "session.review_pending", "session.expired", "session.cancelled"];
|
|
3
3
|
/** One SDK event name — webhook-catalog terminal names + `session.cancelled`. */
|
|
4
4
|
type SekyroEventName = (typeof SEKYRO_EVENTS)[number];
|
|
5
|
-
/** The frozen postMessage payload: event name + sessionId
|
|
5
|
+
/** The frozen postMessage payload: event name + sessionId, plus the level when known. */
|
|
6
6
|
interface SekyroEvent {
|
|
7
7
|
source: "sekyro";
|
|
8
8
|
version: 1;
|
|
9
9
|
event: SekyroEventName;
|
|
10
10
|
sessionId: string;
|
|
11
|
+
/**
|
|
12
|
+
* What the session proved (`1` live person, `2` identity, `3` corroborated,
|
|
13
|
+
* `0` rejected), on a terminal event when the hosted page knows it. A
|
|
14
|
+
* display hint only: confirm server-side.
|
|
15
|
+
*/
|
|
16
|
+
level?: 0 | 1 | 2 | 3;
|
|
11
17
|
}
|
|
12
18
|
interface OpenOptions {
|
|
13
19
|
/** The `hosted_url` returned by `POST /api/v2/sessions` (create result). */
|
package/dist/popup/index.d.ts
CHANGED
|
@@ -2,12 +2,18 @@
|
|
|
2
2
|
declare const SEKYRO_EVENTS: readonly ["session.completed", "session.failed", "session.review_pending", "session.expired", "session.cancelled"];
|
|
3
3
|
/** One SDK event name — webhook-catalog terminal names + `session.cancelled`. */
|
|
4
4
|
type SekyroEventName = (typeof SEKYRO_EVENTS)[number];
|
|
5
|
-
/** The frozen postMessage payload: event name + sessionId
|
|
5
|
+
/** The frozen postMessage payload: event name + sessionId, plus the level when known. */
|
|
6
6
|
interface SekyroEvent {
|
|
7
7
|
source: "sekyro";
|
|
8
8
|
version: 1;
|
|
9
9
|
event: SekyroEventName;
|
|
10
10
|
sessionId: string;
|
|
11
|
+
/**
|
|
12
|
+
* What the session proved (`1` live person, `2` identity, `3` corroborated,
|
|
13
|
+
* `0` rejected), on a terminal event when the hosted page knows it. A
|
|
14
|
+
* display hint only: confirm server-side.
|
|
15
|
+
*/
|
|
16
|
+
level?: 0 | 1 | 2 | 3;
|
|
11
17
|
}
|
|
12
18
|
interface OpenOptions {
|
|
13
19
|
/** The `hosted_url` returned by `POST /api/v2/sessions` (create result). */
|
package/dist/popup/index.js
CHANGED
|
@@ -1,11 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
SEKYRO_EVENTS,
|
|
3
|
-
open,
|
|
4
|
-
openHosted
|
|
5
|
-
} from "../chunk-NILNKLK6.js";
|
|
6
|
-
export {
|
|
7
|
-
SEKYRO_EVENTS,
|
|
8
|
-
open,
|
|
9
|
-
openHosted
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import{a,b,c}from"../chunk-U6TYL2IJ.js";export{a as SEKYRO_EVENTS,b as open,c as openHosted};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(){throw new Error("scanic ML detector is not vendored (classical pipeline only)")}var t={};export{t as default,e as initMlDetector};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var c="selfie_segmenter.tflite";function l(t){if(t===void 0||t.length===0)return null;let r=t.length===1,n=t[0],s=Float32Array.from(n.getAsFloat32Array());if(!r)for(let e=0;e<s.length;e+=1)s[e]=1-s[e];return{data:s,width:n.width,height:n.height}}async function u(t){let r=t.replace(/\/+$/,""),n=await import("@mediapipe/tasks-vision"),s=await n.FilesetResolver.forVisionTasks(r),e=await n.ImageSegmenter.createFromOptions(s,{baseOptions:{modelAssetPath:`${r}/${c}`,delegate:"CPU"},runningMode:"VIDEO",outputConfidenceMasks:!0,outputCategoryMask:!1});return{segment(i,a){try{let o=e.segmentForVideo(i,a);try{return l(o.confidenceMasks)}finally{o.close?.()}}catch{return null}},close(){try{e.close()}catch{}}}}export{c as SEGMENTER_MODEL,u as createSelfieSegmenter,l as personMaskOf};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e}from"./chunk-O5WKNZ2C.js";export{b as TURNSTILE_EXECUTE_TIMEOUT_MS,a as TURNSTILE_SCRIPT_SRC,e as executeTurnstile,d as loadTurnstile,c as resetTurnstileForTests};
|