@incodetech/core 0.0.0-dev-20260407-4677d7f → 0.0.0-dev-20260407-2c382da
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/{BaseWasmProvider-CQgeReKV.esm.js → BaseWasmProvider--AzPfwOm.esm.js} +785 -1
- package/dist/{xstate.esm-BXrcOcSC.esm.js → Manager-C6AGXEq_.esm.js} +507 -103
- package/dist/{warmup-CEOVQKby.d.ts → StateMachine-CM_aOfNL.d.ts} +4 -1
- package/dist/{recordingsRepository-blYn-iKZ.esm.js → StreamCanvasCapture-DkpkIgyL.esm.js} +215 -157
- package/dist/{WasmUtilProvider-C45HStLj.esm.js → WasmUtilProvider-BonqBWdj.esm.js} +1 -1
- package/dist/{addressSearch-C5qzDvkN.esm.js → addressSearch-B8Fo4v9V.esm.js} +4 -4
- package/dist/antifraud.d.ts +1 -1
- package/dist/antifraud.esm.js +3 -3
- package/dist/authentication.d.ts +9 -11
- package/dist/authentication.esm.js +13 -18
- package/dist/{authenticationManager-CW4qxgcq.esm.js → authenticationManager-B4gSCgrO.esm.js} +6 -7
- package/dist/{authenticationManager-CiXsOTdM.d.ts → authenticationManager-Bd10YGSO.d.ts} +2 -2
- package/dist/{backCameraStream-CUo1USCT.esm.js → backCameraStream-DF_d7hTz.esm.js} +2 -2
- package/dist/consent.d.ts +52 -52
- package/dist/consent.esm.js +3 -3
- package/dist/curp-validation.d.ts +5 -5
- package/dist/curp-validation.esm.js +3 -3
- package/dist/{deepsightLoader-Bs5jHgca.esm.js → deepsightLoader-DKgEdLIS.esm.js} +7 -10
- package/dist/{deepsightService-CMAtxAC9.d.ts → deepsightService-Ciu0atv5.d.ts} +197 -193
- package/dist/document-capture.d.ts +70 -70
- package/dist/document-capture.esm.js +6 -6
- package/dist/document-upload.d.ts +4 -4
- package/dist/document-upload.esm.js +6 -6
- package/dist/ekyb.d.ts +3 -3
- package/dist/ekyb.esm.js +9 -9
- package/dist/ekyc.d.ts +3 -3
- package/dist/ekyc.esm.js +5 -5
- package/dist/email.d.ts +3 -3
- package/dist/email.esm.js +5 -5
- package/dist/{emailManager-DEIxY7l6.d.ts → emailManager-BQPIJR_O.d.ts} +2 -2
- package/dist/{emailManager-CZ2IGW0g.esm.js → emailManager-CpAwvP3v.esm.js} +4 -4
- package/dist/endpoints-CI5-28jT.esm.js +69 -0
- package/dist/extensibility.d.ts +13 -15
- package/dist/extensibility.esm.js +20 -25
- package/dist/face-match.d.ts +1 -1
- package/dist/face-match.esm.js +3 -3
- package/dist/{faceCaptureManagerFactory-CWj-nXdx.d.ts → faceCaptureManagerFactory-CdwpYykv.d.ts} +6 -8
- package/dist/{faceCaptureSetup-DIE5cftl.esm.js → faceCaptureSetup-DbXgtcp7.esm.js} +10 -13
- package/dist/flow.d.ts +6 -7
- package/dist/flow.esm.js +8 -8
- package/dist/{flowCompletionService-N6-xypy-.esm.js → flowCompletionService-TnWijsSw.esm.js} +2 -2
- package/dist/{flowServices-xgqnJ64L.esm.js → flowServices-CO2sIR3D.esm.js} +3 -3
- package/dist/geolocation.d.ts +2 -2
- package/dist/geolocation.esm.js +4 -4
- package/dist/government-validation.d.ts +2 -2
- package/dist/government-validation.esm.js +4 -4
- package/dist/id-CzDAG_kM.esm.js +0 -0
- package/dist/id.d.ts +10 -11
- package/dist/id.esm.js +15 -19
- package/dist/{idCaptureManager-SHBRQ-X_.esm.js → idCaptureManager-DaLU1ug7.esm.js} +11 -15
- package/dist/{idCaptureManager-H-rkXnbK.d.ts → idCaptureManager-IdqsAASp.d.ts} +6 -7
- package/dist/index-BuVKc9bv.d.ts +1 -0
- package/dist/index.d.ts +611 -3
- package/dist/index.esm.js +562 -10
- package/dist/{lib-Cq5Wc-Hd.esm.js → lib-i-4qLKdG.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +55 -55
- package/dist/mandatory-consent.esm.js +3 -3
- package/dist/phone.d.ts +3 -3
- package/dist/phone.esm.js +5 -5
- package/dist/{phoneManager-CscgaER2.esm.js → phoneManager-BAPHSXx8.esm.js} +4 -4
- package/dist/{phoneManager-Clfbrs6b.d.ts → phoneManager-DA8WUJtl.d.ts} +2 -2
- package/dist/redirect-to-mobile.d.ts +2 -2
- package/dist/redirect-to-mobile.esm.js +4 -4
- package/dist/selfie.d.ts +9 -11
- package/dist/selfie.esm.js +13 -18
- package/dist/{selfieManager-DeGqD5aN.esm.js → selfieManager-BSkzncsa.esm.js} +4 -5
- package/dist/{selfieManager-h_hhEefT.d.ts → selfieManager-Dft5wZQ_.d.ts} +2 -2
- package/dist/{session-PLjFj_T3.esm.js → session-OglUYC9l.esm.js} +19 -5
- package/dist/session.d.ts +2 -46
- package/dist/session.esm.js +4 -7
- package/dist/signature.d.ts +2 -2
- package/dist/signature.esm.js +3 -3
- package/dist/{stats-BZ1kFW4p.esm.js → stats-BVigf5Rn.esm.js} +1 -1
- package/dist/stats.esm.js +2 -2
- package/dist/{types-T0VjZW3T.d.ts → types-CiLyvJGb.d.ts} +1 -1
- package/dist/{types-zH5PDmSe.d.ts → types-D8Y1faI5.d.ts} +1 -1
- package/package.json +2 -18
- package/dist/MotionSensorProvider-BTDLt08l.esm.js +0 -254
- package/dist/StateMachine-8d441d6x.d.ts +0 -2
- package/dist/camera.d.ts +0 -16
- package/dist/camera.esm.js +0 -5
- package/dist/deepsightService-C3gQ_9Ml.esm.js +0 -493
- package/dist/device.d.ts +0 -46
- package/dist/device.esm.js +0 -106
- package/dist/events-BlVGS-8F.esm.js +0 -472
- package/dist/events.d.ts +0 -232
- package/dist/events.esm.js +0 -4
- package/dist/getBrowser-B800KRAi.esm.js +0 -41
- package/dist/getDeviceClass-BKd2FOAf.esm.js +0 -14
- package/dist/http.d.ts +0 -57
- package/dist/http.esm.js +0 -3
- package/dist/permissionServices-CDqkkway.esm.js +0 -50
- package/dist/setup-DJ3dFl5k.d.ts +0 -120
- package/dist/setup-fvDWE7f8.esm.js +0 -450
- package/dist/types-qhLxpptI.d.ts +0 -5
- package/dist/wasm.d.ts +0 -15
- package/dist/wasm.esm.js +0 -10
- /package/dist/{Actor-C-jivmFF.d.ts → Actor-By8WNHi-.d.ts} +0 -0
- /package/dist/{BrowserEnvironmentProvider--xQUs3sg.esm.js → BrowserEnvironmentProvider-BECjyw3_.esm.js} +0 -0
- /package/dist/{BrowserTimerProvider-CkHEwJFa.esm.js → BrowserTimerProvider-CIqH6hJp.esm.js} +0 -0
- /package/dist/{Manager-BqFybBV-.d.ts → Manager-CCT_-HuZ.d.ts} +0 -0
- /package/dist/{api-CyI8qTie.esm.js → api-C2uzxrpN.esm.js} +0 -0
- /package/dist/{browserSimulation-yzDdWSBf.esm.js → browserSimulation-DYAk0Ipe.esm.js} +0 -0
- /package/dist/{camera-CKsQVNlH.d.ts → camera-6XJdOeBF.d.ts} +0 -0
- /package/dist/{camera-CsT06Zqy.esm.js → camera-DAuRUvnp.esm.js} +0 -0
- /package/dist/{chunk-BcQWkoAq.esm.js → chunk-D6hkk-hd.esm.js} +0 -0
- /package/dist/{displayErrors-CjMXlBnu.d.ts → displayErrors-CGJwvrTl.d.ts} +0 -0
- /package/dist/{flowCompletionService-BV6ThEJ1.d.ts → flowCompletionService-BOd4Rk8n.d.ts} +0 -0
- /package/dist/{platform-Dcuv6w60.esm.js → platform-DdhkonXk.esm.js} +0 -0
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
//#region ../infra/src/providers/browser/MotionSensorProvider.ts
|
|
2
|
-
var MotionSensorProvider = class {
|
|
3
|
-
constructor(thresholds) {
|
|
4
|
-
this._isRunning = false;
|
|
5
|
-
this._hasPermission = true;
|
|
6
|
-
this.acl = null;
|
|
7
|
-
this.gyro = null;
|
|
8
|
-
this.minNumberOfFrames = 3;
|
|
9
|
-
this.maxFrequency = 60;
|
|
10
|
-
this.emptyParams = {
|
|
11
|
-
meanX: 0,
|
|
12
|
-
meanY: 0,
|
|
13
|
-
meanZ: 0,
|
|
14
|
-
m2X: 0,
|
|
15
|
-
m2Y: 0,
|
|
16
|
-
m2Z: 0,
|
|
17
|
-
cumulativeAbsErrorX: 0,
|
|
18
|
-
cumulativeAbsErrorY: 0,
|
|
19
|
-
cumulativeAbsErrorZ: 0,
|
|
20
|
-
ptsNum: 0
|
|
21
|
-
};
|
|
22
|
-
this.paramsAcc = { ...this.emptyParams };
|
|
23
|
-
this.paramsGyro = { ...this.emptyParams };
|
|
24
|
-
this.paramsAccGrOld = { ...this.emptyParams };
|
|
25
|
-
this.paramsAccOld = { ...this.emptyParams };
|
|
26
|
-
this.paramsGyroscopeOld = { ...this.emptyParams };
|
|
27
|
-
this.paramsOrientationOld = { ...this.emptyParams };
|
|
28
|
-
this.deviceMotionListener = (event) => {
|
|
29
|
-
if (event.accelerationIncludingGravity) {
|
|
30
|
-
const accGrVal = {
|
|
31
|
-
x: event.accelerationIncludingGravity.x,
|
|
32
|
-
y: event.accelerationIncludingGravity.y,
|
|
33
|
-
z: event.accelerationIncludingGravity.z
|
|
34
|
-
};
|
|
35
|
-
if (this.checkFields(accGrVal)) {
|
|
36
|
-
this.paramsAccGrOld.ptsNum += 1;
|
|
37
|
-
this.updateParams(this.paramsAccGrOld, accGrVal);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
if (event.acceleration) {
|
|
41
|
-
const accVal = {
|
|
42
|
-
x: event.acceleration.x,
|
|
43
|
-
y: event.acceleration.y,
|
|
44
|
-
z: event.acceleration.z
|
|
45
|
-
};
|
|
46
|
-
if (this.checkFields(accVal)) {
|
|
47
|
-
this.paramsAccOld.ptsNum += 1;
|
|
48
|
-
this.updateParams(this.paramsAccOld, accVal);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
if (event.rotationRate) {
|
|
52
|
-
const gyroVal = {
|
|
53
|
-
x: event.rotationRate.alpha,
|
|
54
|
-
y: event.rotationRate.beta,
|
|
55
|
-
z: event.rotationRate.gamma
|
|
56
|
-
};
|
|
57
|
-
if (this.checkFields(gyroVal)) {
|
|
58
|
-
this.paramsGyroscopeOld.ptsNum += 1;
|
|
59
|
-
this.updateParams(this.paramsGyroscopeOld, gyroVal);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
this.deviceOrientationListener = (event) => {
|
|
64
|
-
const orientationVal = {
|
|
65
|
-
x: event.alpha,
|
|
66
|
-
y: event.beta,
|
|
67
|
-
z: event.gamma
|
|
68
|
-
};
|
|
69
|
-
if (this.checkFields(orientationVal)) {
|
|
70
|
-
this.paramsOrientationOld.ptsNum += 1;
|
|
71
|
-
this.updateParams(this.paramsOrientationOld, orientationVal);
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
this.thresholds = {
|
|
75
|
-
accThreshold: thresholds?.accThreshold ?? .3,
|
|
76
|
-
gyroThreshold: thresholds?.gyroThreshold ?? .3,
|
|
77
|
-
accGrOldThreshold: thresholds?.accGrOldThreshold ?? .3,
|
|
78
|
-
accOldThreshold: thresholds?.accOldThreshold ?? .3,
|
|
79
|
-
gyroscopeOldThreshold: thresholds?.gyroscopeOldThreshold ?? 10,
|
|
80
|
-
orientationOldThreshold: thresholds?.orientationOldThreshold ?? 10,
|
|
81
|
-
maeAccThreshold: thresholds?.maeAccThreshold ?? .3,
|
|
82
|
-
maeGyroThreshold: thresholds?.maeGyroThreshold ?? .3,
|
|
83
|
-
maeAccGrOldThreshold: thresholds?.maeAccGrOldThreshold ?? .3,
|
|
84
|
-
maeAccOldThreshold: thresholds?.maeAccOldThreshold ?? .3,
|
|
85
|
-
maeGyroscopeOldThreshold: thresholds?.maeGyroscopeOldThreshold ?? 10,
|
|
86
|
-
maeOrientationOldThreshold: thresholds?.maeOrientationOldThreshold ?? 10
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
get isRunning() {
|
|
90
|
-
return this._isRunning;
|
|
91
|
-
}
|
|
92
|
-
get hasPermission() {
|
|
93
|
-
return this._hasPermission;
|
|
94
|
-
}
|
|
95
|
-
async requestPermission() {
|
|
96
|
-
if (typeof DeviceMotionEvent !== "undefined" && typeof DeviceMotionEvent.requestPermission === "function") {
|
|
97
|
-
sessionStorage.setItem("motionSensorsPermissionsRequested", String(true));
|
|
98
|
-
try {
|
|
99
|
-
if (await DeviceMotionEvent.requestPermission() !== "granted") {
|
|
100
|
-
this._hasPermission = false;
|
|
101
|
-
return "denied";
|
|
102
|
-
}
|
|
103
|
-
return "granted";
|
|
104
|
-
} catch {
|
|
105
|
-
this._hasPermission = false;
|
|
106
|
-
return "denied";
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
return "not-required";
|
|
110
|
-
}
|
|
111
|
-
initializeAccelerometer() {
|
|
112
|
-
if (!("Accelerometer" in window)) return;
|
|
113
|
-
try {
|
|
114
|
-
const AccelerometerConstructor = window.Accelerometer;
|
|
115
|
-
if (AccelerometerConstructor) {
|
|
116
|
-
this.acl = new AccelerometerConstructor({ frequency: this.maxFrequency });
|
|
117
|
-
this.acl.addEventListener("reading", () => this.updateAcc());
|
|
118
|
-
}
|
|
119
|
-
} catch {}
|
|
120
|
-
}
|
|
121
|
-
initializeGyroscope() {
|
|
122
|
-
if (!("Gyroscope" in window)) return;
|
|
123
|
-
try {
|
|
124
|
-
const GyroscopeConstructor = window.Gyroscope;
|
|
125
|
-
if (GyroscopeConstructor) {
|
|
126
|
-
this.gyro = new GyroscopeConstructor({ frequency: this.maxFrequency });
|
|
127
|
-
this.gyro.addEventListener("reading", () => this.updateGyro());
|
|
128
|
-
}
|
|
129
|
-
} catch {}
|
|
130
|
-
}
|
|
131
|
-
async start() {
|
|
132
|
-
if (this._isRunning || !this._hasPermission) return;
|
|
133
|
-
try {
|
|
134
|
-
this.initializeAccelerometer();
|
|
135
|
-
if (this.acl) this.acl.start();
|
|
136
|
-
} catch {}
|
|
137
|
-
try {
|
|
138
|
-
this.initializeGyroscope();
|
|
139
|
-
if (this.gyro) this.gyro.start();
|
|
140
|
-
} catch {}
|
|
141
|
-
window.addEventListener("devicemotion", this.deviceMotionListener);
|
|
142
|
-
window.addEventListener("deviceorientation", this.deviceOrientationListener);
|
|
143
|
-
this._isRunning = true;
|
|
144
|
-
}
|
|
145
|
-
stop() {
|
|
146
|
-
this._isRunning = false;
|
|
147
|
-
if (this.acl) this.acl.stop();
|
|
148
|
-
if (this.gyro) this.gyro.stop();
|
|
149
|
-
window.removeEventListener("devicemotion", this.deviceMotionListener);
|
|
150
|
-
window.removeEventListener("deviceorientation", this.deviceOrientationListener);
|
|
151
|
-
this.paramsAcc = { ...this.emptyParams };
|
|
152
|
-
this.paramsGyro = { ...this.emptyParams };
|
|
153
|
-
this.paramsAccGrOld = { ...this.emptyParams };
|
|
154
|
-
this.paramsAccOld = { ...this.emptyParams };
|
|
155
|
-
this.paramsGyroscopeOld = { ...this.emptyParams };
|
|
156
|
-
this.paramsOrientationOld = { ...this.emptyParams };
|
|
157
|
-
}
|
|
158
|
-
updateAcc() {
|
|
159
|
-
if (!this._isRunning || !this.acl) return;
|
|
160
|
-
this.paramsAcc.ptsNum += 1;
|
|
161
|
-
const val = {
|
|
162
|
-
x: this.acl.x,
|
|
163
|
-
y: this.acl.y,
|
|
164
|
-
z: this.acl.z
|
|
165
|
-
};
|
|
166
|
-
if (this.checkFields(val)) this.updateParams(this.paramsAcc, val);
|
|
167
|
-
}
|
|
168
|
-
updateGyro() {
|
|
169
|
-
if (!this._isRunning || !this.gyro) return;
|
|
170
|
-
this.paramsGyro.ptsNum += 1;
|
|
171
|
-
const val = {
|
|
172
|
-
x: this.gyro.x,
|
|
173
|
-
y: this.gyro.y,
|
|
174
|
-
z: this.gyro.z
|
|
175
|
-
};
|
|
176
|
-
if (this.checkFields(val)) this.updateParams(this.paramsGyro, val);
|
|
177
|
-
}
|
|
178
|
-
check() {
|
|
179
|
-
if (!this._hasPermission) return "UNCLEAR";
|
|
180
|
-
const result = this.checkStability();
|
|
181
|
-
return result === null ? "UNCLEAR" : result ? "FAIL" : "PASS";
|
|
182
|
-
}
|
|
183
|
-
checkStability() {
|
|
184
|
-
if (!this._isRunning) return null;
|
|
185
|
-
const filteredStdChecks = [
|
|
186
|
-
this.gyro ? this.isBelowStdThreshold(this.paramsGyro, this.thresholds.gyroThreshold) : null,
|
|
187
|
-
this.acl ? this.isBelowStdThreshold(this.paramsAcc, this.thresholds.accThreshold) : null,
|
|
188
|
-
this.isBelowStdThreshold(this.paramsAccGrOld, this.thresholds.accGrOldThreshold),
|
|
189
|
-
this.isBelowStdThreshold(this.paramsAccOld, this.thresholds.accOldThreshold),
|
|
190
|
-
this.isBelowStdThreshold(this.paramsGyroscopeOld, this.thresholds.gyroscopeOldThreshold),
|
|
191
|
-
this.isBelowStdThreshold(this.paramsOrientationOld, this.thresholds.orientationOldThreshold)
|
|
192
|
-
].filter((check) => check !== null);
|
|
193
|
-
const finalStdCheck = filteredStdChecks.length > 0 ? filteredStdChecks.every((check) => check) : null;
|
|
194
|
-
const filteredMaeChecks = [
|
|
195
|
-
this.gyro ? this.isBelowMaeThreshold(this.paramsGyro, this.thresholds.maeGyroThreshold) : null,
|
|
196
|
-
this.acl ? this.isBelowMaeThreshold(this.paramsAcc, this.thresholds.maeAccThreshold) : null,
|
|
197
|
-
this.isBelowMaeThreshold(this.paramsAccGrOld, this.thresholds.maeAccGrOldThreshold),
|
|
198
|
-
this.isBelowMaeThreshold(this.paramsAccOld, this.thresholds.maeAccOldThreshold),
|
|
199
|
-
this.isBelowMaeThreshold(this.paramsGyroscopeOld, this.thresholds.maeGyroscopeOldThreshold),
|
|
200
|
-
this.isBelowMaeThreshold(this.paramsOrientationOld, this.thresholds.maeOrientationOldThreshold)
|
|
201
|
-
].filter((check) => check !== null);
|
|
202
|
-
const finalMaeCheck = filteredMaeChecks.length > 0 ? filteredMaeChecks.every((check) => check) : null;
|
|
203
|
-
return finalStdCheck === null ? finalMaeCheck === null ? null : finalMaeCheck : finalMaeCheck !== null ? finalStdCheck && finalMaeCheck : finalStdCheck;
|
|
204
|
-
}
|
|
205
|
-
updateParams(params, val) {
|
|
206
|
-
const deltaX = val.x - params.meanX;
|
|
207
|
-
const deltaY = val.y - params.meanY;
|
|
208
|
-
const deltaZ = val.z - params.meanZ;
|
|
209
|
-
params.meanX += deltaX / params.ptsNum;
|
|
210
|
-
params.meanY += deltaY / params.ptsNum;
|
|
211
|
-
params.meanZ += deltaZ / params.ptsNum;
|
|
212
|
-
params.m2X += deltaX * (val.x - params.meanX);
|
|
213
|
-
params.m2Y += deltaY * (val.y - params.meanY);
|
|
214
|
-
params.m2Z += deltaZ * (val.z - params.meanZ);
|
|
215
|
-
params.cumulativeAbsErrorX += Math.abs(val.x - params.meanX);
|
|
216
|
-
params.cumulativeAbsErrorY += Math.abs(val.y - params.meanY);
|
|
217
|
-
params.cumulativeAbsErrorZ += Math.abs(val.z - params.meanZ);
|
|
218
|
-
}
|
|
219
|
-
calculateStd(params) {
|
|
220
|
-
const variance = {
|
|
221
|
-
x: params.m2X / params.ptsNum,
|
|
222
|
-
y: params.m2Y / params.ptsNum,
|
|
223
|
-
z: params.m2Z / params.ptsNum
|
|
224
|
-
};
|
|
225
|
-
return {
|
|
226
|
-
x: Math.sqrt(variance.x),
|
|
227
|
-
y: Math.sqrt(variance.y),
|
|
228
|
-
z: Math.sqrt(variance.z)
|
|
229
|
-
};
|
|
230
|
-
}
|
|
231
|
-
calculateMae(params) {
|
|
232
|
-
return {
|
|
233
|
-
x: params.cumulativeAbsErrorX / params.ptsNum,
|
|
234
|
-
y: params.cumulativeAbsErrorY / params.ptsNum,
|
|
235
|
-
z: params.cumulativeAbsErrorZ / params.ptsNum
|
|
236
|
-
};
|
|
237
|
-
}
|
|
238
|
-
checkFields(point) {
|
|
239
|
-
return point.x !== null && point.y !== null && point.z !== null;
|
|
240
|
-
}
|
|
241
|
-
isBelowStdThreshold(params, threshold) {
|
|
242
|
-
if (params.ptsNum < this.minNumberOfFrames) return null;
|
|
243
|
-
const std = this.calculateStd(params);
|
|
244
|
-
return std.x < threshold && std.y < threshold && std.z < threshold;
|
|
245
|
-
}
|
|
246
|
-
isBelowMaeThreshold(params, threshold) {
|
|
247
|
-
if (params.ptsNum < this.minNumberOfFrames) return null;
|
|
248
|
-
const mae = this.calculateMae(params);
|
|
249
|
-
return mae.x < threshold && mae.y < threshold && mae.z < threshold;
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
//#endregion
|
|
254
|
-
export { MotionSensorProvider as t };
|
package/dist/camera.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { n as PermissionStatus, t as PermissionResult } from "./types-qhLxpptI.js";
|
|
2
|
-
|
|
3
|
-
//#region src/internal/permissions/permissionServices.d.ts
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Checks the current camera permission state without prompting the user.
|
|
7
|
-
*/
|
|
8
|
-
declare function checkPermission(): Promise<PermissionResult>;
|
|
9
|
-
/**
|
|
10
|
-
* Requests camera permission by attempting to access the camera, then immediately
|
|
11
|
-
* stops the obtained stream. Also requests motion sensor permission (required on iOS
|
|
12
|
-
* to be called during a user gesture). This function does not keep or return the stream.
|
|
13
|
-
*/
|
|
14
|
-
declare function requestPermission(): Promise<PermissionResult>;
|
|
15
|
-
//#endregion
|
|
16
|
-
export { type PermissionResult, type PermissionStatus, checkPermission as checkCameraPermission, requestPermission as requestCameraPermission };
|
package/dist/camera.esm.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import "./camera-CsT06Zqy.esm.js";
|
|
2
|
-
import "./MotionSensorProvider-BTDLt08l.esm.js";
|
|
3
|
-
import { n as requestPermission, t as checkPermission } from "./permissionServices-CDqkkway.esm.js";
|
|
4
|
-
|
|
5
|
-
export { checkPermission as checkCameraPermission, requestPermission as requestCameraPermission };
|