@incodetech/core 0.0.0-dev-20260420-8f6ba50 → 0.0.0-dev-20260420-91c84fb
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ae-signature.d.ts +1 -1
- package/dist/authentication.esm.js +12 -12
- package/dist/{authenticationManager-D1CGAxwM.esm.js → authenticationManager-CSUs5i1x.esm.js} +1 -1
- package/dist/{authenticationStateMachine-yeeQh71H.esm.js → authenticationStateMachine-CILXOYXS.esm.js} +3 -3
- package/dist/{backCameraStream-BgZ58W73.esm.js → backCameraStream-BXfdKlzB.esm.js} +1 -1
- package/dist/camera.d.ts +7 -0
- package/dist/camera.esm.js +3 -3
- package/dist/consent.d.ts +50 -50
- package/dist/{deepsightLoader-BJ5lXzeg.esm.js → deepsightLoader-BiqNFbbE.esm.js} +5 -5
- package/dist/{deepsightService-C8LxpD33.esm.js → deepsightService-Yfw6LCyd.esm.js} +3 -3
- package/dist/device.esm.js +2 -2
- package/dist/document-capture.d.ts +70 -70
- package/dist/document-capture.esm.js +3 -3
- package/dist/document-upload.d.ts +46 -46
- package/dist/document-upload.esm.js +2 -2
- package/dist/{documentCaptureStateMachine-vuDvKpBa.esm.js → documentCaptureStateMachine-CCevSMgK.esm.js} +2 -2
- package/dist/electronic-signature.d.ts +1 -1
- package/dist/extensibility.esm.js +16 -16
- package/dist/{faceCaptureSetup-Dmvit1y7.esm.js → faceCaptureSetup-QU9jwWFa.esm.js} +6 -3
- package/dist/{getDeviceClass-DEQ0Ko8p.esm.js → getDeviceClass-BiqKa0Vc.esm.js} +1 -1
- package/dist/home.d.ts +10 -10
- package/dist/id.esm.js +11 -11
- package/dist/{idCaptureManager-DhQXfuJt.esm.js → idCaptureManager-B3y62Sgk.esm.js} +1 -1
- package/dist/{idCaptureStateMachine-BdfhVQwC.esm.js → idCaptureStateMachine-BFSvu5or.esm.js} +16 -10
- package/dist/identity-reuse.d.ts +47 -47
- package/dist/{index-KnSX6CGk.d.ts → index-D_Tlr6G0.d.ts} +119 -119
- package/dist/mandatory-consent.d.ts +50 -50
- package/dist/permissionServices-Dso6GWap.esm.js +117 -0
- package/dist/qe-signature.d.ts +1 -1
- package/dist/{recordingService-B6vw5h4n.esm.js → recordingService-C4pR3IWN.esm.js} +6 -6
- package/dist/selfie.esm.js +12 -12
- package/dist/{selfieManager-BSGrpyaa.esm.js → selfieManager-BzQvkdCk.esm.js} +1 -1
- package/dist/{selfieStateMachine-C5LVaSTG.esm.js → selfieStateMachine-CYcGwdw6.esm.js} +2 -2
- package/dist/stats.esm.js +1 -1
- package/dist/workflow.d.ts +82 -82
- package/dist/workflow.esm.js +14 -14
- package/package.json +1 -1
- package/dist/permissionServices-DyQ32wFf.esm.js +0 -50
- /package/dist/{MotionSensorProvider-8vkQ9IG9.esm.js → MotionSensorProvider-CH2gIQDD.esm.js} +0 -0
- /package/dist/{camera-tcz9eaMX.esm.js → camera-KXMnriZv.esm.js} +0 -0
- /package/dist/{getBrowser-a8Hu_roJ.esm.js → getBrowser-4G-fNoOH.esm.js} +0 -0
- /package/dist/{stats-CEGFkSDj.esm.js → stats-DdObETry.esm.js} +0 -0
|
@@ -3,7 +3,7 @@ import "./Actor-Cqaw-2DF.js";
|
|
|
3
3
|
import "./camera-C1Lz6NFz.js";
|
|
4
4
|
import "./types-DGwsRYfm.js";
|
|
5
5
|
import { a as RegulationTypes } from "./types-x6tue2ld.js";
|
|
6
|
-
import * as
|
|
6
|
+
import * as xstate1072 from "xstate";
|
|
7
7
|
|
|
8
8
|
//#region src/modules/mandatory-consent/types.d.ts
|
|
9
9
|
type MandatoryConsentConfig = {
|
|
@@ -30,7 +30,7 @@ type MandatoryConsentContext = {
|
|
|
30
30
|
type MandatoryConsentInput = {
|
|
31
31
|
config: MandatoryConsentConfig;
|
|
32
32
|
};
|
|
33
|
-
declare const mandatoryConsentMachine:
|
|
33
|
+
declare const mandatoryConsentMachine: xstate1072.StateMachine<MandatoryConsentContext, {
|
|
34
34
|
type: "LOAD";
|
|
35
35
|
} | {
|
|
36
36
|
type: "TOGGLE";
|
|
@@ -43,53 +43,53 @@ declare const mandatoryConsentMachine: xstate389.StateMachine<MandatoryConsentCo
|
|
|
43
43
|
} | {
|
|
44
44
|
type: "RESET";
|
|
45
45
|
}, {
|
|
46
|
-
[x: string]:
|
|
46
|
+
[x: string]: xstate1072.ActorRefFromLogic<xstate1072.PromiseActorLogic<FetchMandatoryConsentResponse, {
|
|
47
47
|
config: MandatoryConsentConfig;
|
|
48
|
-
},
|
|
48
|
+
}, xstate1072.EventObject>> | xstate1072.ActorRefFromLogic<xstate1072.PromiseActorLogic<void, {
|
|
49
49
|
consentId: string;
|
|
50
50
|
isSigned: boolean;
|
|
51
|
-
},
|
|
52
|
-
},
|
|
51
|
+
}, xstate1072.EventObject>> | undefined;
|
|
52
|
+
}, xstate1072.Values<{
|
|
53
53
|
fetchConsent: {
|
|
54
54
|
src: "fetchConsent";
|
|
55
|
-
logic:
|
|
55
|
+
logic: xstate1072.PromiseActorLogic<FetchMandatoryConsentResponse, {
|
|
56
56
|
config: MandatoryConsentConfig;
|
|
57
|
-
},
|
|
57
|
+
}, xstate1072.EventObject>;
|
|
58
58
|
id: string | undefined;
|
|
59
59
|
};
|
|
60
60
|
submitConsent: {
|
|
61
61
|
src: "submitConsent";
|
|
62
|
-
logic:
|
|
62
|
+
logic: xstate1072.PromiseActorLogic<void, {
|
|
63
63
|
consentId: string;
|
|
64
64
|
isSigned: boolean;
|
|
65
|
-
},
|
|
65
|
+
}, xstate1072.EventObject>;
|
|
66
66
|
id: string | undefined;
|
|
67
67
|
};
|
|
68
|
-
}>,
|
|
68
|
+
}>, xstate1072.Values<{
|
|
69
69
|
setConsent: {
|
|
70
70
|
type: "setConsent";
|
|
71
|
-
params:
|
|
71
|
+
params: xstate1072.NonReducibleUnknown;
|
|
72
72
|
};
|
|
73
73
|
setError: {
|
|
74
74
|
type: "setError";
|
|
75
|
-
params:
|
|
75
|
+
params: xstate1072.NonReducibleUnknown;
|
|
76
76
|
};
|
|
77
77
|
clearError: {
|
|
78
78
|
type: "clearError";
|
|
79
|
-
params:
|
|
80
|
-
};
|
|
81
|
-
toggleSigned: {
|
|
82
|
-
type: "toggleSigned";
|
|
83
|
-
params: xstate389.NonReducibleUnknown;
|
|
79
|
+
params: xstate1072.NonReducibleUnknown;
|
|
84
80
|
};
|
|
85
81
|
resetContext: {
|
|
86
82
|
type: "resetContext";
|
|
87
|
-
params:
|
|
83
|
+
params: xstate1072.NonReducibleUnknown;
|
|
84
|
+
};
|
|
85
|
+
toggleSigned: {
|
|
86
|
+
type: "toggleSigned";
|
|
87
|
+
params: xstate1072.NonReducibleUnknown;
|
|
88
88
|
};
|
|
89
89
|
}>, {
|
|
90
90
|
type: "canSubmit";
|
|
91
91
|
params: unknown;
|
|
92
|
-
}, never, "error" | "idle" | "closed" | "finished" | "loading" | "display" | "submitting", string, MandatoryConsentInput,
|
|
92
|
+
}, never, "error" | "idle" | "closed" | "finished" | "loading" | "display" | "submitting", string, MandatoryConsentInput, xstate1072.NonReducibleUnknown, xstate1072.EventObject, xstate1072.MetaObject, {
|
|
93
93
|
readonly id: "mandatoryConsent";
|
|
94
94
|
readonly initial: "idle";
|
|
95
95
|
readonly context: ({
|
|
@@ -98,70 +98,70 @@ declare const mandatoryConsentMachine: xstate389.StateMachine<MandatoryConsentCo
|
|
|
98
98
|
spawn: {
|
|
99
99
|
<TSrc extends "fetchConsent" | "submitConsent">(logic: TSrc, ...[options]: ({
|
|
100
100
|
src: "fetchConsent";
|
|
101
|
-
logic:
|
|
101
|
+
logic: xstate1072.PromiseActorLogic<FetchMandatoryConsentResponse, {
|
|
102
102
|
config: MandatoryConsentConfig;
|
|
103
|
-
},
|
|
103
|
+
}, xstate1072.EventObject>;
|
|
104
104
|
id: string | undefined;
|
|
105
105
|
} extends infer T ? T extends {
|
|
106
106
|
src: "fetchConsent";
|
|
107
|
-
logic:
|
|
107
|
+
logic: xstate1072.PromiseActorLogic<FetchMandatoryConsentResponse, {
|
|
108
108
|
config: MandatoryConsentConfig;
|
|
109
|
-
},
|
|
109
|
+
}, xstate1072.EventObject>;
|
|
110
110
|
id: string | undefined;
|
|
111
111
|
} ? T extends {
|
|
112
112
|
src: TSrc;
|
|
113
|
-
} ?
|
|
113
|
+
} ? xstate1072.ConditionalRequired<[options?: ({
|
|
114
114
|
id?: T["id"] | undefined;
|
|
115
115
|
systemId?: string;
|
|
116
|
-
input?:
|
|
116
|
+
input?: xstate1072.InputFrom<T["logic"]> | undefined;
|
|
117
117
|
syncSnapshot?: boolean;
|
|
118
|
-
} & { [K in
|
|
118
|
+
} & { [K in xstate1072.RequiredActorOptions<T>]: unknown }) | undefined], xstate1072.IsNotNever<xstate1072.RequiredActorOptions<T>>> : never : never : never) | ({
|
|
119
119
|
src: "submitConsent";
|
|
120
|
-
logic:
|
|
120
|
+
logic: xstate1072.PromiseActorLogic<void, {
|
|
121
121
|
consentId: string;
|
|
122
122
|
isSigned: boolean;
|
|
123
|
-
},
|
|
123
|
+
}, xstate1072.EventObject>;
|
|
124
124
|
id: string | undefined;
|
|
125
125
|
} extends infer T_1 ? T_1 extends {
|
|
126
126
|
src: "submitConsent";
|
|
127
|
-
logic:
|
|
127
|
+
logic: xstate1072.PromiseActorLogic<void, {
|
|
128
128
|
consentId: string;
|
|
129
129
|
isSigned: boolean;
|
|
130
|
-
},
|
|
130
|
+
}, xstate1072.EventObject>;
|
|
131
131
|
id: string | undefined;
|
|
132
132
|
} ? T_1 extends {
|
|
133
133
|
src: TSrc;
|
|
134
|
-
} ?
|
|
134
|
+
} ? xstate1072.ConditionalRequired<[options?: ({
|
|
135
135
|
id?: T_1["id"] | undefined;
|
|
136
136
|
systemId?: string;
|
|
137
|
-
input?:
|
|
137
|
+
input?: xstate1072.InputFrom<T_1["logic"]> | undefined;
|
|
138
138
|
syncSnapshot?: boolean;
|
|
139
|
-
} & { [K_1 in
|
|
139
|
+
} & { [K_1 in xstate1072.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate1072.IsNotNever<xstate1072.RequiredActorOptions<T_1>>> : never : never : never)): xstate1072.ActorRefFromLogic<xstate1072.GetConcreteByKey<xstate1072.Values<{
|
|
140
140
|
fetchConsent: {
|
|
141
141
|
src: "fetchConsent";
|
|
142
|
-
logic:
|
|
142
|
+
logic: xstate1072.PromiseActorLogic<FetchMandatoryConsentResponse, {
|
|
143
143
|
config: MandatoryConsentConfig;
|
|
144
|
-
},
|
|
144
|
+
}, xstate1072.EventObject>;
|
|
145
145
|
id: string | undefined;
|
|
146
146
|
};
|
|
147
147
|
submitConsent: {
|
|
148
148
|
src: "submitConsent";
|
|
149
|
-
logic:
|
|
149
|
+
logic: xstate1072.PromiseActorLogic<void, {
|
|
150
150
|
consentId: string;
|
|
151
151
|
isSigned: boolean;
|
|
152
|
-
},
|
|
152
|
+
}, xstate1072.EventObject>;
|
|
153
153
|
id: string | undefined;
|
|
154
154
|
};
|
|
155
155
|
}>, "src", TSrc>["logic"]>;
|
|
156
|
-
<TLogic extends
|
|
156
|
+
<TLogic extends xstate1072.AnyActorLogic>(src: TLogic, ...[options]: xstate1072.ConditionalRequired<[options?: ({
|
|
157
157
|
id?: never;
|
|
158
158
|
systemId?: string;
|
|
159
|
-
input?:
|
|
159
|
+
input?: xstate1072.InputFrom<TLogic> | undefined;
|
|
160
160
|
syncSnapshot?: boolean;
|
|
161
|
-
} & { [K in
|
|
161
|
+
} & { [K in xstate1072.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate1072.IsNotNever<xstate1072.RequiredLogicInput<TLogic>>>): xstate1072.ActorRefFromLogic<TLogic>;
|
|
162
162
|
};
|
|
163
163
|
input: MandatoryConsentInput;
|
|
164
|
-
self:
|
|
164
|
+
self: xstate1072.ActorRef<xstate1072.MachineSnapshot<MandatoryConsentContext, {
|
|
165
165
|
type: "LOAD";
|
|
166
166
|
} | {
|
|
167
167
|
type: "TOGGLE";
|
|
@@ -173,7 +173,7 @@ declare const mandatoryConsentMachine: xstate389.StateMachine<MandatoryConsentCo
|
|
|
173
173
|
type: "RETRY";
|
|
174
174
|
} | {
|
|
175
175
|
type: "RESET";
|
|
176
|
-
}, Record<string,
|
|
176
|
+
}, Record<string, xstate1072.AnyActorRef | undefined>, xstate1072.StateValue, string, unknown, any, any>, {
|
|
177
177
|
type: "LOAD";
|
|
178
178
|
} | {
|
|
179
179
|
type: "TOGGLE";
|
|
@@ -185,7 +185,7 @@ declare const mandatoryConsentMachine: xstate389.StateMachine<MandatoryConsentCo
|
|
|
185
185
|
type: "RETRY";
|
|
186
186
|
} | {
|
|
187
187
|
type: "RESET";
|
|
188
|
-
},
|
|
188
|
+
}, xstate1072.AnyEventObject>;
|
|
189
189
|
}) => {
|
|
190
190
|
config: MandatoryConsentConfig;
|
|
191
191
|
consent: undefined;
|
|
@@ -222,7 +222,7 @@ declare const mandatoryConsentMachine: xstate389.StateMachine<MandatoryConsentCo
|
|
|
222
222
|
} | {
|
|
223
223
|
type: "RESET";
|
|
224
224
|
};
|
|
225
|
-
self:
|
|
225
|
+
self: xstate1072.ActorRef<xstate1072.MachineSnapshot<MandatoryConsentContext, {
|
|
226
226
|
type: "LOAD";
|
|
227
227
|
} | {
|
|
228
228
|
type: "TOGGLE";
|
|
@@ -234,7 +234,7 @@ declare const mandatoryConsentMachine: xstate389.StateMachine<MandatoryConsentCo
|
|
|
234
234
|
type: "RETRY";
|
|
235
235
|
} | {
|
|
236
236
|
type: "RESET";
|
|
237
|
-
}, Record<string,
|
|
237
|
+
}, Record<string, xstate1072.AnyActorRef>, xstate1072.StateValue, string, unknown, any, any>, {
|
|
238
238
|
type: "LOAD";
|
|
239
239
|
} | {
|
|
240
240
|
type: "TOGGLE";
|
|
@@ -246,7 +246,7 @@ declare const mandatoryConsentMachine: xstate389.StateMachine<MandatoryConsentCo
|
|
|
246
246
|
type: "RETRY";
|
|
247
247
|
} | {
|
|
248
248
|
type: "RESET";
|
|
249
|
-
},
|
|
249
|
+
}, xstate1072.AnyEventObject>;
|
|
250
250
|
}) => {
|
|
251
251
|
config: MandatoryConsentConfig;
|
|
252
252
|
};
|
|
@@ -299,7 +299,7 @@ declare const mandatoryConsentMachine: xstate389.StateMachine<MandatoryConsentCo
|
|
|
299
299
|
} | {
|
|
300
300
|
type: "RESET";
|
|
301
301
|
};
|
|
302
|
-
self:
|
|
302
|
+
self: xstate1072.ActorRef<xstate1072.MachineSnapshot<MandatoryConsentContext, {
|
|
303
303
|
type: "LOAD";
|
|
304
304
|
} | {
|
|
305
305
|
type: "TOGGLE";
|
|
@@ -311,7 +311,7 @@ declare const mandatoryConsentMachine: xstate389.StateMachine<MandatoryConsentCo
|
|
|
311
311
|
type: "RETRY";
|
|
312
312
|
} | {
|
|
313
313
|
type: "RESET";
|
|
314
|
-
}, Record<string,
|
|
314
|
+
}, Record<string, xstate1072.AnyActorRef>, xstate1072.StateValue, string, unknown, any, any>, {
|
|
315
315
|
type: "LOAD";
|
|
316
316
|
} | {
|
|
317
317
|
type: "TOGGLE";
|
|
@@ -323,7 +323,7 @@ declare const mandatoryConsentMachine: xstate389.StateMachine<MandatoryConsentCo
|
|
|
323
323
|
type: "RETRY";
|
|
324
324
|
} | {
|
|
325
325
|
type: "RESET";
|
|
326
|
-
},
|
|
326
|
+
}, xstate1072.AnyEventObject>;
|
|
327
327
|
}) => {
|
|
328
328
|
consentId: string;
|
|
329
329
|
isSigned: boolean;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { i as stopCameraStream, r as requestCameraAccess } from "./camera-KXMnriZv.esm.js";
|
|
2
|
+
import { t as MotionSensorProvider } from "./MotionSensorProvider-CH2gIQDD.esm.js";
|
|
3
|
+
|
|
4
|
+
//#region ../infra/src/media/permissions.ts
|
|
5
|
+
async function queryPermission(name) {
|
|
6
|
+
try {
|
|
7
|
+
if (typeof navigator === "undefined" || !navigator.permissions) return "prompt";
|
|
8
|
+
return (await navigator.permissions.query({ name })).state;
|
|
9
|
+
} catch {
|
|
10
|
+
return "prompt";
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
async function queryCameraPermission() {
|
|
14
|
+
return queryPermission("camera");
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Session-scoped cache for the camera permission grant.
|
|
18
|
+
*
|
|
19
|
+
* Rationale: `navigator.permissions.query({ name: 'camera' })` is unreliable on
|
|
20
|
+
* Android WebView — it returns `'prompt'` (or throws) even when the host app
|
|
21
|
+
* has already granted camera access for the current session. Without a
|
|
22
|
+
* secondary source of truth, the SDK re-renders its custom "allow camera"
|
|
23
|
+
* screen every time a new capture module starts, even though no system prompt
|
|
24
|
+
* will follow.
|
|
25
|
+
*
|
|
26
|
+
* When `requestPermission()` (or a capture stream acquisition) succeeds, we
|
|
27
|
+
* write `true` to sessionStorage. `checkPermission()` prefers any concrete
|
|
28
|
+
* answer from the Permissions API, and falls back to this cache only when the
|
|
29
|
+
* query returns `'prompt'`. The cache is cleared whenever the browser reports
|
|
30
|
+
* `'denied'` or a capture operation fails with `NotAllowedError`, so a
|
|
31
|
+
* revoked permission self-heals on the next attempt.
|
|
32
|
+
*
|
|
33
|
+
* SessionStorage (not localStorage) is intentional: camera permission in
|
|
34
|
+
* mobile WebViews is typically scoped to the tab/session anyway, and we do not
|
|
35
|
+
* want to imply a persistent grant across app launches.
|
|
36
|
+
*/
|
|
37
|
+
const CAMERA_PERMISSION_CACHE_KEY = "cameraPermissionsGranted";
|
|
38
|
+
function hasSessionStorage() {
|
|
39
|
+
try {
|
|
40
|
+
return typeof sessionStorage !== "undefined";
|
|
41
|
+
} catch {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function isCameraPermissionCached() {
|
|
46
|
+
if (!hasSessionStorage()) return false;
|
|
47
|
+
try {
|
|
48
|
+
return sessionStorage.getItem(CAMERA_PERMISSION_CACHE_KEY) === "true";
|
|
49
|
+
} catch {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function markCameraPermissionGranted() {
|
|
54
|
+
if (!hasSessionStorage()) return;
|
|
55
|
+
try {
|
|
56
|
+
sessionStorage.setItem(CAMERA_PERMISSION_CACHE_KEY, "true");
|
|
57
|
+
} catch {}
|
|
58
|
+
}
|
|
59
|
+
function clearCameraPermissionCache() {
|
|
60
|
+
if (!hasSessionStorage()) return;
|
|
61
|
+
try {
|
|
62
|
+
sessionStorage.removeItem(CAMERA_PERMISSION_CACHE_KEY);
|
|
63
|
+
} catch {}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/internal/permissions/permissionServices.ts
|
|
68
|
+
/**
|
|
69
|
+
* Checks the current camera permission state without prompting the user.
|
|
70
|
+
*
|
|
71
|
+
* On Android WebView, `navigator.permissions.query({ name: 'camera' })` is
|
|
72
|
+
* unreliable and returns `'prompt'` (or throws) even when camera access has
|
|
73
|
+
* already been granted for the session. To avoid re-rendering the custom
|
|
74
|
+
* "allow camera" UI for every capture module, we fall back to a session-scoped
|
|
75
|
+
* cache (written by `requestPermission()` or by a successful capture stream
|
|
76
|
+
* acquisition) when the browser query can't tell us anything concrete.
|
|
77
|
+
*/
|
|
78
|
+
async function checkPermission() {
|
|
79
|
+
const queryResult = await queryCameraPermission();
|
|
80
|
+
if (queryResult === "granted") return "granted";
|
|
81
|
+
if (queryResult === "denied") {
|
|
82
|
+
clearCameraPermissionCache();
|
|
83
|
+
return "denied";
|
|
84
|
+
}
|
|
85
|
+
if (isCameraPermissionCached()) return "granted";
|
|
86
|
+
return "prompt";
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Requests motion sensor permission. Must be called during a user gesture on iOS.
|
|
90
|
+
* Returns the permission result.
|
|
91
|
+
*/
|
|
92
|
+
async function requestMotionPermission() {
|
|
93
|
+
return new MotionSensorProvider().requestPermission();
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Requests camera permission by attempting to access the camera, then immediately
|
|
97
|
+
* stops the obtained stream. Also requests motion sensor permission (required on iOS
|
|
98
|
+
* to be called during a user gesture). This function does not keep or return the stream.
|
|
99
|
+
*/
|
|
100
|
+
async function requestPermission() {
|
|
101
|
+
try {
|
|
102
|
+
await requestMotionPermission();
|
|
103
|
+
stopCameraStream(await requestCameraAccess({ video: true }));
|
|
104
|
+
markCameraPermissionGranted();
|
|
105
|
+
return "granted";
|
|
106
|
+
} catch (error) {
|
|
107
|
+
const name = error instanceof Error ? error.name : void 0;
|
|
108
|
+
if (name === "NotAllowedError" || name === "PermissionDeniedError") {
|
|
109
|
+
clearCameraPermissionCache();
|
|
110
|
+
return "denied";
|
|
111
|
+
}
|
|
112
|
+
return "prompt";
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
//#endregion
|
|
117
|
+
export { requestPermission as n, clearCameraPermissionCache as r, checkPermission as t };
|
package/dist/qe-signature.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as Manager } from "./Manager-C1r-74H0.js";
|
|
2
2
|
import "./Actor-Cqaw-2DF.js";
|
|
3
|
-
import { c as ConsentKey, f as QE_CONSENT_KEYS, g as getDefaultConsentChecks, i as electronicSignatureMachine, l as ElectronicSignatureConfig, m as areAllConsented, n as ElectronicSignatureState, s as ConsentChecks, u as ElectronicSignatureDocument } from "./index-
|
|
3
|
+
import { c as ConsentKey, f as QE_CONSENT_KEYS, g as getDefaultConsentChecks, i as electronicSignatureMachine, l as ElectronicSignatureConfig, m as areAllConsented, n as ElectronicSignatureState, s as ConsentChecks, u as ElectronicSignatureDocument } from "./index-D_Tlr6G0.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/qe-signature/index.d.ts
|
|
6
6
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { i as WasmPipelineType, r as mlWasmJSApi_default, t as BaseWasmProvider } from "./BaseWasmProvider-D2uvIbAN.esm.js";
|
|
2
2
|
import { t as api } from "./api-BhYI_G8R.esm.js";
|
|
3
3
|
import { _ as endpoints } from "./events-CLo0CBD5.esm.js";
|
|
4
|
-
import { n as IncodeCanvas } from "./deepsightService-
|
|
5
|
-
import { i as stopCameraStream, r as requestCameraAccess } from "./camera-
|
|
6
|
-
import { t as addDeviceStats } from "./stats-
|
|
4
|
+
import { n as IncodeCanvas } from "./deepsightService-Yfw6LCyd.esm.js";
|
|
5
|
+
import { i as stopCameraStream, r as requestCameraAccess } from "./camera-KXMnriZv.esm.js";
|
|
6
|
+
import { t as addDeviceStats } from "./stats-DdObETry.esm.js";
|
|
7
7
|
import { a as isIPhone14OrHigher, n as isDesktop, r as isIOS, t as isAndroid } from "./platform-BcNZipjK.esm.js";
|
|
8
|
-
import { n as getDesktopCameraStream, t as getBackCameraStream } from "./backCameraStream-
|
|
9
|
-
import { t as getDeviceClass } from "./getDeviceClass-
|
|
8
|
+
import { n as getDesktopCameraStream, t as getBackCameraStream } from "./backCameraStream-BXfdKlzB.esm.js";
|
|
9
|
+
import { t as getDeviceClass } from "./getDeviceClass-BiqKa0Vc.esm.js";
|
|
10
10
|
|
|
11
11
|
//#region src/internal/faceCapture/types.ts
|
|
12
12
|
const FACE_ERROR_CODES = {
|
|
@@ -633,7 +633,7 @@ async function stopRecording(session) {
|
|
|
633
633
|
}
|
|
634
634
|
}
|
|
635
635
|
async function initializeDeepsightSession(options) {
|
|
636
|
-
const { loadDeepsightSession } = await import("./deepsightLoader-
|
|
636
|
+
const { loadDeepsightSession } = await import("./deepsightLoader-BiqNFbbE.esm.js");
|
|
637
637
|
return loadDeepsightSession({
|
|
638
638
|
ds: options.ds,
|
|
639
639
|
storage: options.storage
|
package/dist/selfie.esm.js
CHANGED
|
@@ -6,19 +6,19 @@ import "./browserSimulation-UTYyQOiB.esm.js";
|
|
|
6
6
|
import "./xstate.esm-BlgyVBVv.esm.js";
|
|
7
7
|
import "./faceCaptureManagerFactory-B9xq08-G.esm.js";
|
|
8
8
|
import "./BrowserStorageProvider-DOp7HlOV.esm.js";
|
|
9
|
-
import { l as processFace } from "./recordingService-
|
|
10
|
-
import "./deepsightService-
|
|
11
|
-
import "./
|
|
12
|
-
import "./
|
|
13
|
-
import "./
|
|
14
|
-
import "./
|
|
15
|
-
import "./
|
|
9
|
+
import { l as processFace } from "./recordingService-C4pR3IWN.esm.js";
|
|
10
|
+
import "./deepsightService-Yfw6LCyd.esm.js";
|
|
11
|
+
import "./permissionServices-Dso6GWap.esm.js";
|
|
12
|
+
import "./camera-KXMnriZv.esm.js";
|
|
13
|
+
import "./getBrowser-4G-fNoOH.esm.js";
|
|
14
|
+
import "./stats-DdObETry.esm.js";
|
|
15
|
+
import "./MotionSensorProvider-CH2gIQDD.esm.js";
|
|
16
16
|
import "./platform-BcNZipjK.esm.js";
|
|
17
17
|
import "./ITimerCapability-6rqYcRcc.esm.js";
|
|
18
|
-
import "./backCameraStream-
|
|
19
|
-
import "./getDeviceClass-
|
|
20
|
-
import "./faceCaptureSetup-
|
|
21
|
-
import { t as selfieMachine } from "./selfieStateMachine-
|
|
22
|
-
import { t as createSelfieManager } from "./selfieManager-
|
|
18
|
+
import "./backCameraStream-BXfdKlzB.esm.js";
|
|
19
|
+
import "./getDeviceClass-BiqKa0Vc.esm.js";
|
|
20
|
+
import "./faceCaptureSetup-QU9jwWFa.esm.js";
|
|
21
|
+
import { t as selfieMachine } from "./selfieStateMachine-CYcGwdw6.esm.js";
|
|
22
|
+
import { t as createSelfieManager } from "./selfieManager-BzQvkdCk.esm.js";
|
|
23
23
|
|
|
24
24
|
export { createSelfieManager, processFace, selfieMachine };
|
|
@@ -3,7 +3,7 @@ import { n as eventModuleNames } from "./events-CLo0CBD5.esm.js";
|
|
|
3
3
|
import { a as createActor } from "./xstate.esm-BlgyVBVv.esm.js";
|
|
4
4
|
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-B9xq08-G.esm.js";
|
|
5
5
|
import { t as BrowserStorageProvider } from "./BrowserStorageProvider-DOp7HlOV.esm.js";
|
|
6
|
-
import { t as selfieMachine } from "./selfieStateMachine-
|
|
6
|
+
import { t as selfieMachine } from "./selfieStateMachine-CYcGwdw6.esm.js";
|
|
7
7
|
|
|
8
8
|
//#region src/modules/selfie/selfieActor.ts
|
|
9
9
|
function createSelfieActor(options) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as fromPromise, n as assign } from "./xstate.esm-BlgyVBVv.esm.js";
|
|
2
|
-
import { l as processFace, u as uploadSelfie, v as FACE_ERROR_CODES } from "./recordingService-
|
|
3
|
-
import { t as faceCaptureMachine } from "./faceCaptureSetup-
|
|
2
|
+
import { l as processFace, u as uploadSelfie, v as FACE_ERROR_CODES } from "./recordingService-C4pR3IWN.esm.js";
|
|
3
|
+
import { t as faceCaptureMachine } from "./faceCaptureSetup-QU9jwWFa.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/selfie/selfieErrorUtils.ts
|
|
6
6
|
const FACE_ERROR_CODE_VALUES = Object.values(FACE_ERROR_CODES);
|
package/dist/stats.esm.js
CHANGED