@vincentt-xr/sdk 2.0.0-alpha.6 → 2.0.0-alpha.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/GROUNDING.md +1188 -14
  2. package/dist/{DebuggerUI-C_rbLdkh.js → DebuggerUI-C-ldiozL.js} +1 -1
  3. package/dist/{DebuggerUI-DYT_dk1E.cjs → DebuggerUI-CWX5EtQv.cjs} +1 -1
  4. package/dist/FaceMeshRenderer-BEEXZwS6.cjs +158 -0
  5. package/dist/FaceMeshRenderer-UuH5sTXG.js +1322 -0
  6. package/dist/FaceRetouch-C7h7x9kd.js +683 -0
  7. package/dist/FaceRetouch-DqftT26Y.cjs +134 -0
  8. package/dist/GLTFLoader-C5q63sKO.js +1633 -0
  9. package/dist/GLTFLoader-Cb_CRwmG.cjs +1 -0
  10. package/dist/SegmentationOverlay-DQuW3dsc.js +133 -0
  11. package/dist/SegmentationOverlay-aWVod8Kl.cjs +1 -0
  12. package/dist/assets/cache.d.ts +99 -0
  13. package/dist/assets/estimate.d.ts +11 -0
  14. package/dist/assets/index.d.ts +7 -0
  15. package/dist/assets/loaders.d.ts +28 -0
  16. package/dist/assets/react.d.ts +33 -0
  17. package/dist/calibration/calibration.d.ts +70 -0
  18. package/dist/calibration/index.d.ts +6 -0
  19. package/dist/calibration/storage.d.ts +13 -0
  20. package/dist/calibration/types.d.ts +53 -0
  21. package/dist/calibration/useXRCalibration.d.ts +46 -0
  22. package/dist/camera/CameraPermissionGate.d.ts +26 -0
  23. package/dist/camera/devices.d.ts +26 -0
  24. package/dist/camera/index.d.ts +8 -0
  25. package/dist/camera/permission.d.ts +86 -0
  26. package/dist/camera/useCameraPermission.d.ts +35 -0
  27. package/dist/capabilities/detect.d.ts +45 -0
  28. package/dist/capabilities/index.d.ts +5 -0
  29. package/dist/capabilities/types.d.ts +120 -0
  30. package/dist/capabilities/useXRCapabilities.d.ts +18 -0
  31. package/dist/compat/environment.d.ts +5 -0
  32. package/dist/compat/index.d.ts +4 -0
  33. package/dist/compat/run.d.ts +18 -0
  34. package/dist/compat/scenarios.d.ts +10 -0
  35. package/dist/compat/types.d.ts +101 -0
  36. package/dist/components/BodyTracker/index.d.ts +9 -0
  37. package/dist/components/FaceMesh/FaceMeshRenderer.d.ts +11 -3
  38. package/dist/components/FaceMesh/canonical/CanonicalFaceMeshRenderer.d.ts +41 -5
  39. package/dist/components/FaceMesh/canonical/parseCanonicalFaceModel.d.ts +12 -0
  40. package/dist/components/FaceMesh/canonical/shaders.d.ts +1 -1
  41. package/dist/components/FaceMesh/index.d.ts +2 -2
  42. package/dist/components/GestureListener/index.d.ts +11 -0
  43. package/dist/components/HandTracker/index.d.ts +10 -0
  44. package/dist/components/HolisticTracker/index.d.ts +69 -0
  45. package/dist/components/HolisticTracker/settings.d.ts +58 -0
  46. package/dist/components/HolisticTracker/signals.d.ts +49 -0
  47. package/dist/components/IrisEffect/IrisMaterial.d.ts +73 -0
  48. package/dist/components/IrisEffect/index.d.ts +51 -0
  49. package/dist/components/IrisEffect/settings.d.ts +117 -0
  50. package/dist/components/LipEffect/LipEffect.d.ts +7 -1
  51. package/dist/components/LipEffect/LipEffectMaterial.d.ts +43 -7
  52. package/dist/components/LipEffect/LipEffects.d.ts +9 -0
  53. package/dist/components/LipEffect/defaults.d.ts +27 -4
  54. package/dist/components/LipEffect/index.d.ts +11 -3
  55. package/dist/components/LipEffect/settings.d.ts +271 -0
  56. package/dist/components/LipEffect/types.d.ts +56 -9
  57. package/dist/components/LipEffect/useLipDesignTextures.d.ts +11 -0
  58. package/dist/components/LipEffect/uvGuide.d.ts +59 -0
  59. package/dist/components/PersonCutout/index.d.ts +50 -0
  60. package/dist/components/PersonCutout/personCutout.d.ts +16 -0
  61. package/dist/components/SceneObjectRenderer/index.d.ts +9 -2
  62. package/dist/components/ScreenImage/components/ScreenImageBody.d.ts +1 -1
  63. package/dist/components/ScreenImage/index.d.ts +3 -1
  64. package/dist/components/ScreenImage/materials/ScreenImageBlendMaterial.d.ts +1 -1
  65. package/dist/components/ScreenImage/materials/ScreenImageMaskMaterial.d.ts +11 -0
  66. package/dist/components/ScreenImage/source.d.ts +6 -0
  67. package/dist/components/ScreenImage/types.d.ts +18 -0
  68. package/dist/components/SegmentationOverlay/SegmentationOverlay.d.ts +37 -0
  69. package/dist/components/SegmentationOverlay/SegmentationOverlayMaterial.d.ts +31 -0
  70. package/dist/components/SegmentationOverlay/index.d.ts +9 -0
  71. package/dist/components/SegmentationOverlay/maskTexture.d.ts +23 -0
  72. package/dist/components/SegmentationOverlay/providers.d.ts +72 -0
  73. package/dist/components/SegmentationOverlay/settings.d.ts +65 -0
  74. package/dist/components/XRMediaSurface/index.d.ts +2 -1
  75. package/dist/components/XRProvider/index.d.ts +16 -2
  76. package/dist/components/XRViewport/hooks/useViewportExternalFaces.d.ts +1 -1
  77. package/dist/components/XRViewport/hooks/useViewportMediaSource.d.ts +1 -1
  78. package/dist/components/XRViewport/hooks/useViewportPipeline.d.ts +1 -1
  79. package/dist/components/index.d.ts +3 -0
  80. package/dist/constants/index.d.ts +4 -1
  81. package/dist/contexts-CO0sd4JQ.cjs +1 -0
  82. package/dist/{contexts-DvQI4PqI.js → contexts-FzlnnMYD.js} +252 -246
  83. package/dist/coordinates/feed.d.ts +52 -0
  84. package/dist/coordinates/index.d.ts +5 -0
  85. package/dist/coordinates/spaces.d.ts +49 -0
  86. package/dist/coordinates/viewport.d.ts +22 -0
  87. package/dist/coordinates/world.d.ts +15 -0
  88. package/dist/debug-ui/gesture-settings/index.d.ts +14 -0
  89. package/dist/debug-ui/holistic-tracker-settings/index.d.ts +16 -0
  90. package/dist/debug-ui/index.d.ts +14 -0
  91. package/dist/debug-ui/iris-effect-settings/index.d.ts +12 -0
  92. package/dist/debug-ui/lip-effect-settings/index.d.ts +15 -0
  93. package/dist/debug-ui/media-source.cjs +1 -1
  94. package/dist/debug-ui/media-source.js +1 -1
  95. package/dist/debug-ui/product-hotspots/index.d.ts +24 -0
  96. package/dist/debug-ui/segmentation-overlay-settings/index.d.ts +12 -0
  97. package/dist/debug-ui/xr-diagnostics/index.d.ts +25 -0
  98. package/dist/debug-ui.cjs +3 -3
  99. package/dist/debug-ui.js +2057 -1687
  100. package/dist/detector-K8aej4MB.js +59 -0
  101. package/dist/detector-ijypGtse.cjs +1 -0
  102. package/dist/entries/core.d.ts +21 -3
  103. package/dist/entries/face-effects.d.ts +12 -4
  104. package/dist/entries/low-level.d.ts +22 -3
  105. package/dist/entries/product.d.ts +11 -0
  106. package/dist/entries/tracking.d.ts +26 -1
  107. package/dist/face-effects.cjs +155 -1
  108. package/dist/face-effects.js +1134 -2196
  109. package/dist/gestures/definitions.d.ts +85 -0
  110. package/dist/gestures/detector.d.ts +87 -0
  111. package/dist/gestures/index.d.ts +8 -0
  112. package/dist/gestures/measures.d.ts +101 -0
  113. package/dist/gestures/settings.d.ts +49 -0
  114. package/dist/{getFaceInfo-B43Cwq4n.js → getFaceInfo-BkZfaQs-.js} +5 -5
  115. package/dist/{getFaceInfo-DEzcL_Ub.cjs → getFaceInfo-ahPxQFGu.cjs} +1 -1
  116. package/dist/hooks/selectors.d.ts +68 -1
  117. package/dist/hooks/useCalibrationFaceTracker.d.ts +1 -1
  118. package/dist/hooks/useFaceInfo.d.ts +13 -1
  119. package/dist/hooks/useFaceInfos.d.ts +1 -1
  120. package/dist/hooks/useGesture.d.ts +32 -0
  121. package/dist/hooks/useIrisTracking.d.ts +45 -0
  122. package/dist/hooks/useXRDiagnostics.d.ts +81 -0
  123. package/dist/hooks/useXRModel.d.ts +7 -0
  124. package/dist/hooks/useXRSession/facade.d.ts +44 -2
  125. package/dist/hooks/useXRSession/index.d.ts +2 -2
  126. package/dist/hooks/useXRSession/reason.d.ts +3 -1
  127. package/dist/hooks/useXRSession/registry.d.ts +14 -0
  128. package/dist/hooks/useXRSession/store.d.ts +52 -3
  129. package/dist/index--RgGzZ6X.cjs +47 -0
  130. package/dist/{index-uE3sKczj.js → index-CHVbH0hz.js} +4 -4
  131. package/dist/index-CeVkgsag.cjs +1 -0
  132. package/dist/index-CnGox6Xr.js +3054 -0
  133. package/dist/{index-B-s4YbWu.js → index-CsUdQ-pn.js} +113 -111
  134. package/dist/{index-CY7Z8cHV.cjs → index-DKBAh6hV.cjs} +1 -1
  135. package/dist/index-DsZwTfG0.cjs +1 -0
  136. package/dist/index-Dw6tj2Mi.js +144 -0
  137. package/dist/index-OCPjOaeP.cjs +1 -0
  138. package/dist/{index-G_5h_FJQ.js → index-s9pF4zkG.js} +999 -1014
  139. package/dist/internal-BYza1h8_.cjs +1 -0
  140. package/dist/{internal-ldPYiUF0.js → internal-vsfNQycj.js} +15 -16
  141. package/dist/internal.cjs +1 -1
  142. package/dist/internal.js +2 -2
  143. package/dist/iris/compute.d.ts +25 -0
  144. package/dist/iris/index.d.ts +4 -0
  145. package/dist/iris/lead.d.ts +19 -0
  146. package/dist/iris/types.d.ts +87 -0
  147. package/dist/landmarkMask-CbTFzBYG.js +224 -0
  148. package/dist/landmarkMask-u7es2k4X.cjs +1 -0
  149. package/dist/low-level.cjs +1 -1
  150. package/dist/low-level.js +1104 -639
  151. package/dist/main.cjs +1 -1
  152. package/dist/main.js +1519 -462
  153. package/dist/measures-9dQPdw96.js +154 -0
  154. package/dist/measures-KfJzpvod.cjs +1 -0
  155. package/dist/models/Base/index.d.ts +49 -0
  156. package/dist/models/Body/index.d.ts +1 -1
  157. package/dist/models/Face/index.d.ts +1 -1
  158. package/dist/models/Hand/GestureTracking.d.ts +1 -1
  159. package/dist/models/Hand/HandTracking.d.ts +1 -1
  160. package/dist/models/Holistic/index.d.ts +49 -0
  161. package/dist/models/Holistic/result.d.ts +68 -0
  162. package/dist/models/SemanticSegmentation/index.d.ts +31 -0
  163. package/dist/models/SemanticSegmentation/presets.d.ts +28 -0
  164. package/dist/models/index.d.ts +2 -0
  165. package/dist/product/ProductDimensions.d.ts +16 -0
  166. package/dist/product/ProductHotspot.d.ts +16 -0
  167. package/dist/product/ProductViewer.d.ts +9 -0
  168. package/dist/product/details.d.ts +53 -0
  169. package/dist/product/index.d.ts +14 -0
  170. package/dist/product/loadModelViewer.d.ts +4 -0
  171. package/dist/product/types.d.ts +71 -0
  172. package/dist/product/useProductAr.d.ts +37 -0
  173. package/dist/product/useProductDetails.d.ts +60 -0
  174. package/dist/product.cjs +1 -0
  175. package/dist/product.js +414 -0
  176. package/dist/providers-C0Dlhh9Z.js +365 -0
  177. package/dist/providers-YNwkmNeK.cjs +62 -0
  178. package/dist/quality/XRQualityController.d.ts +25 -0
  179. package/dist/quality/controller.d.ts +33 -0
  180. package/dist/quality/index.d.ts +6 -0
  181. package/dist/quality/types.d.ts +100 -0
  182. package/dist/quality/useXRQuality.d.ts +28 -0
  183. package/dist/{renderGroups-CFt1yYLB.js → renderGroups-CN1cGFUo.js} +1 -1
  184. package/dist/{renderGroups-BJsx32q5.cjs → renderGroups-O4KmaMl9.cjs} +1 -1
  185. package/dist/renderPasses-Cg-zqmEz.cjs +21 -0
  186. package/dist/renderPasses-NnKZVfBy.js +1460 -0
  187. package/dist/scene-object.cjs +1 -1
  188. package/dist/scene-object.js +2 -2
  189. package/dist/screen2d/coordinates.d.ts +20 -0
  190. package/dist/screenTransform-BenfCtZt.js +44 -0
  191. package/dist/screenTransform-BiXdpVf0.cjs +1 -0
  192. package/dist/segmentation-9PhSvc-R.cjs +1 -0
  193. package/dist/segmentation-CeOTKemr.js +5 -0
  194. package/dist/segmentation2d/faceMemory.d.ts +28 -0
  195. package/dist/segmentation2d/faceRegions.d.ts +24 -0
  196. package/dist/segmentation2d/index.d.ts +9 -0
  197. package/dist/segmentation2d/maskUv.d.ts +23 -0
  198. package/dist/segmentation2d/rasterize.d.ts +14 -0
  199. package/dist/segmentation2d/types.d.ts +46 -0
  200. package/dist/selectors-C5G1PMYL.js +195 -0
  201. package/dist/selectors-Du_PsVnW.cjs +1 -0
  202. package/dist/{session-CANvoLD6.cjs → session-BBr0yN8h.cjs} +7 -7
  203. package/dist/{session-Dhi0OqZo.js → session-Cy0m7l7-.js} +76 -76
  204. package/dist/settings-DRR7-snV.cjs +1 -0
  205. package/dist/settings-aQk845NJ.js +73 -0
  206. package/dist/subjects/index.d.ts +2 -0
  207. package/dist/subjects/select.d.ts +62 -0
  208. package/dist/subjects/types.d.ts +55 -0
  209. package/dist/tracking/coordinates.d.ts +5 -0
  210. package/dist/tracking-config/apply.d.ts +57 -0
  211. package/dist/tracking-config/index.d.ts +7 -0
  212. package/dist/tracking-config/resolve.d.ts +25 -0
  213. package/dist/tracking-config/storage.d.ts +8 -0
  214. package/dist/tracking-config/types.d.ts +106 -0
  215. package/dist/tracking-config/useXRTrackingConfig.d.ts +38 -0
  216. package/dist/tracking.cjs +1 -1
  217. package/dist/tracking.js +1056 -380
  218. package/dist/types/common.d.ts +11 -1
  219. package/dist/types/compositor.d.ts +21 -0
  220. package/dist/types/gesture-tracking.d.ts +2 -2
  221. package/dist/types/hand-tracking.d.ts +3 -3
  222. package/dist/types/holistic.d.ts +121 -0
  223. package/dist/types/index.d.ts +1 -0
  224. package/dist/types/model.d.ts +22 -2
  225. package/dist/types/nodes.d.ts +29 -4
  226. package/dist/types/segmentation.d.ts +19 -0
  227. package/dist/types/session.d.ts +48 -4
  228. package/dist/useFaceInfo-Blf7FCu3.js +303 -0
  229. package/dist/useFaceInfo-C5mO8NQY.cjs +1 -0
  230. package/dist/useXRCapabilities-B1R2ghy-.cjs +1 -0
  231. package/dist/useXRCapabilities-C68v__wB.js +30 -0
  232. package/dist/utils/fns.d.ts +6 -3
  233. package/dist/utils/integrity.d.ts +4 -1
  234. package/dist/utils/updateThrottle.d.ts +2 -0
  235. package/dist/utils/useStableUniforms.d.ts +18 -0
  236. package/docs/SDK_DOCUMENTATION.md +3 -0
  237. package/docs/api/adaptive-quality.mdx +104 -0
  238. package/docs/api/asset-lifecycle.mdx +78 -0
  239. package/docs/api/camera-permission.mdx +142 -0
  240. package/docs/api/capture-recording.mdx +9 -1
  241. package/docs/api/coordinate-spaces.mdx +165 -0
  242. package/docs/api/cross-camera.mdx +88 -0
  243. package/docs/api/diagnostics-calibration.mdx +97 -0
  244. package/docs/api/face-effects.mdx +6 -0
  245. package/docs/api/face-mesh.mdx +35 -0
  246. package/docs/api/gestures.mdx +173 -0
  247. package/docs/api/holistic-tracker.mdx +159 -0
  248. package/docs/api/iris-tracking.mdx +242 -0
  249. package/docs/api/multi-subject.mdx +95 -0
  250. package/docs/api/person-cutout.mdx +136 -0
  251. package/docs/api/product-ar.mdx +111 -0
  252. package/docs/api/product-details.mdx +78 -0
  253. package/docs/api/runtime-3d.mdx +5 -0
  254. package/docs/api/screen-image.mdx +3 -1
  255. package/docs/api/screen-space-coordinates.mdx +35 -1
  256. package/docs/api/segmentation-overlay.mdx +301 -0
  257. package/docs/api/session-lifecycle.mdx +136 -0
  258. package/docs/api/trackers.mdx +18 -0
  259. package/docs/api/tracking-config.mdx +108 -0
  260. package/docs/docs.json +23 -1
  261. package/docs/examples/lip-shaders.mdx +224 -0
  262. package/docs/guides/lip-effect-textures.mdx +292 -0
  263. package/docs/guides/lip-uv-template.png +0 -0
  264. package/docs/guides/lip-uv-template.svg +1 -0
  265. package/package.json +16 -1
  266. package/dist/FaceMeshRenderer-D1WsrTLA.cjs +0 -155
  267. package/dist/FaceMeshRenderer-DSCd1H55.js +0 -1264
  268. package/dist/FaceRetouch-CMJbGThL.js +0 -551
  269. package/dist/FaceRetouch-DsE0Dbw-.cjs +0 -134
  270. package/dist/contexts-h-9TRH0r.cjs +0 -1
  271. package/dist/index-C0-fg1Hk.cjs +0 -1
  272. package/dist/index-CxMEeCRP.cjs +0 -1
  273. package/dist/index-D67hHm44.cjs +0 -1
  274. package/dist/index-DPPpU5By.cjs +0 -17
  275. package/dist/index-DYfY9ljy.js +0 -111
  276. package/dist/index-I4eF5TKT.js +0 -1457
  277. package/dist/internal-MvKrz0Nt.cjs +0 -1
  278. package/dist/renderLayers-lDtL0_43.cjs +0 -1
  279. package/dist/renderLayers-zrK2pv5O.js +0 -13
  280. package/dist/renderPasses-C72MbZ-a.js +0 -1500
  281. package/dist/renderPasses-D-Krl6D0.cjs +0 -21
  282. package/dist/selectors-ByKNTXeA.js +0 -59
  283. package/dist/selectors-CAwmL9VW.cjs +0 -1
  284. package/dist/useFaceInfo-BSZq7AO1.cjs +0 -1
  285. package/dist/useFaceInfo-FVQBBNdY.js +0 -62
  286. package/dist/useFaceResults-C3oZkn2Z.cjs +0 -1
  287. package/dist/useFaceResults-D62STzT1.js +0 -19
package/dist/tracking.js CHANGED
@@ -1,19 +1,28 @@
1
- import { u as N, T as O } from "./index-B-s4YbWu.js";
2
- import { d as Ve, c as We, b as qe } from "./index-B-s4YbWu.js";
3
- import { jsx as A, Fragment as J } from "react/jsx-runtime";
4
- import { useThree as C, useFrame as b } from "@react-three/fiber";
5
- import { useRef as R, useMemo as _, useCallback as I, useEffect as L, useState as P } from "react";
6
- import * as U from "three";
7
- import { X as F, u as Q, f as ee } from "./index-I4eF5TKT.js";
8
- import { R as z } from "./renderLayers-zrK2pv5O.js";
9
- import { B as $e, D as Ze, F as Je, H as Qe, T as et, g as tt } from "./index-DYfY9ljy.js";
10
- import { u as rt } from "./useFaceResults-D62STzT1.js";
11
- import { u as te } from "./useFaceInfo-FVQBBNdY.js";
12
- import { a as st } from "./useFaceInfo-FVQBBNdY.js";
13
- import { a as S } from "./getFaceInfo-B43Cwq4n.js";
14
- import { D as it, b as ct, h as at } from "./getFaceInfo-B43Cwq4n.js";
15
- import { d as ne } from "./drawNormalizedCrop-CRdIDyl1.js";
16
- const re = {
1
+ import { u as U, T as q, r as $e } from "./index-CsUdQ-pn.js";
2
+ import { d as Mr, c as Fr, b as Pr } from "./index-CsUdQ-pn.js";
3
+ import { jsx as b, Fragment as Ze } from "react/jsx-runtime";
4
+ import { useThree as Z, useFrame as D } from "@react-three/fiber";
5
+ import { useRef as g, useMemo as E, useCallback as O, useContext as Qe, useEffect as k, useState as B, createContext as et, useSyncExternalStore as tt } from "react";
6
+ import { X as I, r as L, v as rt, o as Le, i as nt, u as He, p as st } from "./index-CnGox6Xr.js";
7
+ import { y as Br, w as Ur, D as jr, x as Gr, b as Kr, e as zr, n as Wr, t as Xr } from "./index-CnGox6Xr.js";
8
+ import { R as J } from "./selectors-C5G1PMYL.js";
9
+ import { a as ke } from "./segmentation-CeOTKemr.js";
10
+ import { S as Vr } from "./segmentation-CeOTKemr.js";
11
+ import { B as Jr, D as $r, F as Zr, H as Qr, b as en, g as tn } from "./index-Dw6tj2Mi.js";
12
+ import { r as _e, c as me, s as Be, a as ot, g as it } from "./detector-K8aej4MB.js";
13
+ import { D as nn } from "./detector-K8aej4MB.js";
14
+ import { a as A, c as at, b as ct } from "./getFaceInfo-BkZfaQs-.js";
15
+ import { D as on, d as an, h as cn } from "./getFaceInfo-BkZfaQs-.js";
16
+ import { O as ut, m as lt, a as G, b as we, c as K, d as dt, e as ht, f as ft, g as mt } from "./measures-9dQPdw96.js";
17
+ import { u as ln } from "./measures-9dQPdw96.js";
18
+ import { u as pt } from "./useFaceInfo-Blf7FCu3.js";
19
+ import { b as hn, D as fn, E as mn, X as pn, a as gn, f as Tn, j as Sn, s as yn, c as Rn } from "./useFaceInfo-Blf7FCu3.js";
20
+ import { S as bn, u as An } from "./SegmentationOverlay-DQuW3dsc.js";
21
+ import { d as gt } from "./drawNormalizedCrop-CRdIDyl1.js";
22
+ import { b as vn, D as On, G as Ln, H as kn, a as _n, c as wn, p as Dn, d as In, r as Nn, t as Cn } from "./settings-aQk845NJ.js";
23
+ import { h as Fn, i as Pn, P as Hn, e as Bn, f as Un, g as jn } from "./providers-C0Dlhh9Z.js";
24
+ import { D as Kn, f as zn, r as Wn } from "./landmarkMask-CbTFzBYG.js";
25
+ const Ue = {
17
26
  "hand.wrist": 0,
18
27
  "hand.thumbTip": 4,
19
28
  "hand.indexTip": 8,
@@ -25,9 +34,9 @@ const re = {
25
34
  "hand.ringBase": 13,
26
35
  "hand.pinkyBase": 17
27
36
  };
28
- function oe(e, t, r = 0) {
29
- var o;
30
- const n = (o = e == null ? void 0 : e.hands) != null && o.length ? e.hands : e != null && e.coordinates ? [
37
+ function je(e, r, t = 0) {
38
+ var s;
39
+ const n = (s = e == null ? void 0 : e.hands) != null && s.length ? e.hands : e != null && e.coordinates ? [
31
40
  {
32
41
  coordinates: e.coordinates,
33
42
  gesture: e.gesture,
@@ -35,60 +44,55 @@ function oe(e, t, r = 0) {
35
44
  }
36
45
  ] : [];
37
46
  if (n.length) {
38
- if (t) {
39
- const u = n.find((i) => i.handedness === t);
40
- if (u) return u;
47
+ if (r) {
48
+ const o = n.find((a) => a.handedness === r);
49
+ if (o) return o;
41
50
  }
42
- return n[r] ?? n[0];
51
+ return n[t] ?? n[0];
43
52
  }
44
53
  }
45
- const Ne = ({
54
+ const mr = ({
46
55
  children: e,
47
- hand: t,
48
- handIndex: r = 0,
56
+ hand: r,
57
+ handIndex: t = 0,
49
58
  targetFps: n,
50
- active: o = !0
59
+ active: s = !0
51
60
  }) => {
52
- const u = R(null), i = _(
61
+ const o = g(null), a = E(
53
62
  () => n === void 0 ? void 0 : { targetFps: n },
54
63
  [n]
55
- ), { ready: a, node: y } = N(
56
- F.HAND_TRACKER,
57
- i,
58
- o
59
- ), { camera: s } = C(), c = R(s);
60
- c.current !== s && (c.current = s);
61
- const l = R(null);
62
- b(() => {
63
- var m;
64
- if (!a || !y || !u.current) return;
65
- const g = oe(y, t, r);
66
- l.current = g ?? null;
67
- const d = (m = g == null ? void 0 : g.coordinates) == null ? void 0 : m[0];
68
- if (!d) {
69
- u.current.visible = !1;
64
+ ), { ready: i, node: u } = U(
65
+ I.HAND_TRACKER,
66
+ a,
67
+ s
68
+ ), { camera: c } = Z(), h = g(c);
69
+ h.current !== c && (h.current = c);
70
+ const d = g(null);
71
+ D(() => {
72
+ var l;
73
+ if (!i || !u || !o.current) return;
74
+ const S = je(u, r, t);
75
+ d.current = S ?? null;
76
+ const T = (l = S == null ? void 0 : S.coordinates) == null ? void 0 : l[0];
77
+ if (!T) {
78
+ o.current.visible = !1;
70
79
  return;
71
80
  }
72
- const p = K(d, c.current);
73
- u.current.visible = !0, u.current.position.copy(p);
81
+ const y = L(T, h.current);
82
+ o.current.visible = !0, o.current.position.copy(y);
74
83
  });
75
- const f = I((g) => {
76
- var m, E;
77
- const d = re[g];
78
- if (d === void 0) return null;
79
- const p = (E = (m = l.current) == null ? void 0 : m.coordinates) == null ? void 0 : E[d];
80
- return p ? { position: K(p, c.current) } : null;
81
- }, []), h = _(
82
- () => ({ type: "hand", resolveLandmark: f }),
83
- [f]
84
+ const m = O((S) => {
85
+ var l, p;
86
+ const T = Ue[S];
87
+ if (T === void 0) return null;
88
+ const y = (p = (l = d.current) == null ? void 0 : l.coordinates) == null ? void 0 : p[T];
89
+ return y ? { position: L(y, h.current) } : null;
90
+ }, []), f = E(
91
+ () => ({ type: "hand", resolveLandmark: m }),
92
+ [m]
84
93
  );
85
- return /* @__PURE__ */ A(O.Provider, { value: h, children: /* @__PURE__ */ A("group", { ref: u, renderOrder: z.TRACKED, children: e }) });
86
- }, K = (e, t) => {
87
- const r = new U.Vector3(e.x, e.y, e.z);
88
- r.unproject(t);
89
- const n = r.sub(t.position).normalize(), o = -t.position.z / n.z;
90
- return t.position.clone().add(n.multiplyScalar(o));
91
- }, se = {
94
+ return /* @__PURE__ */ b(q.Provider, { value: f, children: /* @__PURE__ */ b("group", { ref: o, renderOrder: J.TRACKED, children: e }) });
95
+ }, Tt = {
92
96
  "hand.wrist": 0,
93
97
  "hand.thumbTip": 4,
94
98
  "hand.indexTip": 8,
@@ -99,46 +103,41 @@ const Ne = ({
99
103
  "hand.middleBase": 9,
100
104
  "hand.ringBase": 13,
101
105
  "hand.pinkyBase": 17
102
- }, Fe = ({ children: e, targetFps: t, active: r = !0 }) => {
103
- const n = R(null), o = _(
104
- () => t === void 0 ? void 0 : { targetFps: t },
105
- [t]
106
- ), { ready: u, node: i } = N(
107
- F.GESTURE_TRACKER,
108
- o,
109
- r
110
- ), { camera: a } = C(), y = R(a);
111
- y.current !== a && (y.current = a);
112
- const s = R(null);
113
- b(() => {
114
- var g;
115
- if (!u || !i || !n.current) return;
116
- s.current = i;
117
- const f = (g = i == null ? void 0 : i.coordinates) == null ? void 0 : g[0];
118
- if (!f) {
106
+ }, pr = ({ children: e, targetFps: r, active: t = !0 }) => {
107
+ const n = g(null), s = E(
108
+ () => r === void 0 ? void 0 : { targetFps: r },
109
+ [r]
110
+ ), { ready: o, node: a } = U(
111
+ I.GESTURE_TRACKER,
112
+ s,
113
+ t
114
+ ), { camera: i } = Z(), u = g(i);
115
+ u.current !== i && (u.current = i);
116
+ const c = g(null);
117
+ D(() => {
118
+ var S;
119
+ if (!o || !a || !n.current) return;
120
+ c.current = a;
121
+ const m = (S = a == null ? void 0 : a.coordinates) == null ? void 0 : S[0];
122
+ if (!m) {
119
123
  n.current.visible = !1;
120
124
  return;
121
125
  }
122
- const h = G(f, y.current);
123
- n.current.visible = !0, n.current.position.copy(h);
126
+ const f = L(m, u.current);
127
+ n.current.visible = !0, n.current.position.copy(f);
124
128
  });
125
- const c = I((f) => {
126
- var d, p;
127
- const h = se[f];
128
- if (h === void 0) return null;
129
- const g = (p = (d = s.current) == null ? void 0 : d.coordinates) == null ? void 0 : p[h];
130
- return g ? { position: G(g, y.current) } : null;
131
- }, []), l = _(
132
- () => ({ type: "hand", resolveLandmark: c }),
133
- [c]
129
+ const h = O((m) => {
130
+ var T, y;
131
+ const f = Tt[m];
132
+ if (f === void 0) return null;
133
+ const S = (y = (T = c.current) == null ? void 0 : T.coordinates) == null ? void 0 : y[f];
134
+ return S ? { position: L(S, u.current) } : null;
135
+ }, []), d = E(
136
+ () => ({ type: "hand", resolveLandmark: h }),
137
+ [h]
134
138
  );
135
- return /* @__PURE__ */ A(O.Provider, { value: l, children: /* @__PURE__ */ A("group", { ref: n, renderOrder: z.TRACKED, children: e }) });
136
- }, G = (e, t) => {
137
- const r = new U.Vector3(e.x, e.y, e.z);
138
- r.unproject(t);
139
- const n = r.sub(t.position).normalize(), o = -t.position.z / n.z;
140
- return t.position.clone().add(n.multiplyScalar(o));
141
- }, ue = {
139
+ return /* @__PURE__ */ b(q.Provider, { value: d, children: /* @__PURE__ */ b("group", { ref: n, renderOrder: J.TRACKED, children: e }) });
140
+ }, Ge = {
142
141
  "body.head": 0,
143
142
  "body.leftShoulder": 11,
144
143
  "body.rightShoulder": 12,
@@ -152,150 +151,321 @@ const Ne = ({
152
151
  "body.rightKnee": 26,
153
152
  "body.leftAnkle": 27,
154
153
  "body.rightAnkle": 28
155
- }, Me = ({ bodyIndex: e = 0, active: t = !0, children: r }) => {
156
- const n = R(null), { ready: o, node: u } = N(
157
- F.BODY_TRACKER,
154
+ }, gr = ({ bodyIndex: e = 0, active: r = !0, children: t }) => {
155
+ const n = g(null), { ready: s, node: o } = U(
156
+ I.BODY_TRACKER,
158
157
  void 0,
159
- t
160
- ), { camera: i } = C(), a = R(i);
161
- a.current !== i && (a.current = i);
162
- const y = R(null);
163
- b(() => {
164
- if (!o || !u || !n.current) return;
165
- const l = u;
166
- y.current = l;
167
- const f = l.getLandmarks2D(e), h = f == null ? void 0 : f[0];
168
- if (!h) {
158
+ r
159
+ ), { camera: a } = Z(), i = g(a);
160
+ i.current !== a && (i.current = a);
161
+ const u = g(null);
162
+ D(() => {
163
+ if (!s || !o || !n.current) return;
164
+ const d = o;
165
+ u.current = d;
166
+ const m = d.getLandmarks2D(e), f = m == null ? void 0 : m[0];
167
+ if (!f) {
169
168
  n.current.visible = !1;
170
169
  return;
171
170
  }
172
- const g = B(h, a.current);
173
- n.current.visible = !0, n.current.position.copy(g);
171
+ const S = L(f, i.current);
172
+ n.current.visible = !0, n.current.position.copy(S);
174
173
  });
175
- const s = I(
176
- (l) => {
177
- const f = y.current;
174
+ const c = O(
175
+ (d) => {
176
+ const m = u.current;
177
+ if (!m) return null;
178
+ const f = m.getLandmarks2D(e);
178
179
  if (!f) return null;
179
- const h = f.getLandmarks2D(e);
180
- if (!h) return null;
181
- if (l === "body.neck") {
182
- const p = h[11], m = h[12];
183
- if (!p || !m) return null;
184
- const E = {
185
- x: (p.x + m.x) / 2,
186
- y: (p.y + m.y) / 2,
187
- z: (p.z + m.z) / 2
180
+ if (d === "body.neck") {
181
+ const y = f[11], l = f[12];
182
+ if (!y || !l) return null;
183
+ const p = {
184
+ x: (y.x + l.x) / 2,
185
+ y: (y.y + l.y) / 2,
186
+ z: (y.z + l.z) / 2
188
187
  };
189
- return { position: B(E, a.current) };
188
+ return { position: L(p, i.current) };
190
189
  }
191
- const g = ue[l];
192
- if (g === void 0) return null;
193
- const d = h[g];
194
- return d ? { position: B(d, a.current) } : null;
190
+ const S = Ge[d];
191
+ if (S === void 0) return null;
192
+ const T = f[S];
193
+ return T ? { position: L(T, i.current) } : null;
194
+ },
195
+ [e]
196
+ ), h = E(
197
+ () => ({ type: "body", resolveLandmark: c }),
198
+ [c]
199
+ );
200
+ return /* @__PURE__ */ b(q.Provider, { value: h, children: /* @__PURE__ */ b("group", { ref: n, renderOrder: J.TRACKED, children: t }) });
201
+ }, te = { leftShoulder: 11, rightShoulder: 12, leftWrist: 15, rightWrist: 16 }, St = 0, yt = [
202
+ [5, 8],
203
+ [9, 12],
204
+ [13, 16],
205
+ [17, 20]
206
+ ], pe = {
207
+ smile: 0.3,
208
+ mouthOpen: 0.25,
209
+ minVisibility: 0.5,
210
+ fingerExtension: 1.25
211
+ }, Rt = () => ({
212
+ facePresent: !1,
213
+ leftHandPresent: !1,
214
+ rightHandPresent: !1,
215
+ posePresent: !1,
216
+ smile: 0,
217
+ mouthOpen: 0,
218
+ smiling: !1,
219
+ mouthIsOpen: !1,
220
+ leftHandRaised: !1,
221
+ rightHandRaised: !1,
222
+ leftPalmOpen: !1,
223
+ rightPalmOpen: !1,
224
+ greeting: null
225
+ }), De = (e, r) => Math.hypot(e.x - r.x, e.y - r.y), Ie = (e, r = pe.fingerExtension) => {
226
+ if (!e || e.landmarks.length < 21) return !1;
227
+ const t = e.landmarks[St];
228
+ let n = 0;
229
+ for (const [s, o] of yt) {
230
+ const a = De(e.landmarks[s], t), i = De(e.landmarks[o], t);
231
+ a > 0 && i >= a * r && (n += 1);
232
+ }
233
+ return n >= 3;
234
+ }, Ne = (e, r, t = pe.minVisibility) => {
235
+ const { pose: n } = e;
236
+ if (!n || n.landmarks.length < 33) return !1;
237
+ const s = r === "left" ? te.leftWrist : te.rightWrist, o = r === "left" ? te.leftShoulder : te.rightShoulder;
238
+ return n.visibility[s] < t || n.visibility[o] < t ? !1 : n.landmarks[s].y > n.landmarks[o].y;
239
+ }, Tr = (e, r = {}, t = Rt()) => {
240
+ const n = { ...pe, ...r }, { face: s, leftHand: o, rightHand: a, pose: i } = e;
241
+ t.facePresent = s !== null, t.leftHandPresent = o !== null, t.rightHandPresent = a !== null, t.posePresent = i !== null;
242
+ const u = s == null ? void 0 : s.blendshapes;
243
+ return t.smile = u ? ((u.mouthSmileLeft ?? 0) + (u.mouthSmileRight ?? 0)) / 2 : 0, t.mouthOpen = (u == null ? void 0 : u.jawOpen) ?? 0, t.smiling = s !== null && t.smile >= n.smile, t.mouthIsOpen = s !== null && t.mouthOpen >= n.mouthOpen, t.leftHandRaised = Ne(e, "left", n.minVisibility), t.rightHandRaised = Ne(e, "right", n.minVisibility), t.leftPalmOpen = Ie(o, n.fingerExtension), t.rightPalmOpen = Ie(a, n.fingerExtension), t.smiling && t.rightHandRaised && t.rightPalmOpen ? t.greeting = "right" : t.smiling && t.leftHandRaised && t.leftPalmOpen ? t.greeting = "left" : t.greeting = null, t;
244
+ }, Et = {
245
+ node: null,
246
+ ready: !1,
247
+ status: "loading",
248
+ error: null
249
+ }, Ke = et(null), bt = () => Qe(Ke) ?? Et, Ce = (e, r) => r ? "error" : e ? e.getStatus() : "loading", At = ({
250
+ children: e,
251
+ active: r = !0,
252
+ onStatusChange: t,
253
+ modelUrl: n,
254
+ delegate: s,
255
+ minFaceDetectionConfidence: o,
256
+ minFacePresenceConfidence: a,
257
+ minPoseDetectionConfidence: i,
258
+ minPosePresenceConfidence: u,
259
+ minHandLandmarksConfidence: c,
260
+ outputFaceBlendshapes: h,
261
+ targetFps: d,
262
+ hands: m,
263
+ analysisMaxDimension: f,
264
+ holdMs: S,
265
+ predictMs: T
266
+ }) => {
267
+ const y = E(() => {
268
+ const R = {};
269
+ return n !== void 0 && (R.modelUrl = n), s !== void 0 && (R.delegate = s), o !== void 0 && (R.minFaceDetectionConfidence = o), a !== void 0 && (R.minFacePresenceConfidence = a), i !== void 0 && (R.minPoseDetectionConfidence = i), u !== void 0 && (R.minPosePresenceConfidence = u), c !== void 0 && (R.minHandLandmarksConfidence = c), h !== void 0 && (R.outputFaceBlendshapes = h), d !== void 0 && (R.targetFps = d), Object.keys(R).length > 0 ? R : void 0;
270
+ }, [
271
+ s,
272
+ o,
273
+ a,
274
+ c,
275
+ i,
276
+ u,
277
+ n,
278
+ h,
279
+ d
280
+ ]), { ready: l, node: p, error: _ } = U(
281
+ I.HOLISTIC_TRACKER,
282
+ y,
283
+ r
284
+ );
285
+ k(() => {
286
+ p && p.setOptions(
287
+ rt({ hands: m, analysisMaxDimension: f, holdMs: S, predictMs: T })
288
+ );
289
+ }, [p, m, f, S, T]);
290
+ const [x, N] = B(() => Ce(p, _)), F = g(x), C = g(t);
291
+ C.current = t, D(() => {
292
+ var j;
293
+ const R = Ce(p, _);
294
+ R !== F.current && (F.current = R, N(R), (j = C.current) == null || j.call(C, R, _ ?? (p == null ? void 0 : p.getError()) ?? null));
295
+ });
296
+ const Q = E(
297
+ () => ({
298
+ node: p,
299
+ ready: l && x === "ready",
300
+ status: x,
301
+ error: _ ?? (p == null ? void 0 : p.getError()) ?? null
302
+ }),
303
+ [p, l, x, _]
304
+ );
305
+ return /* @__PURE__ */ b(Ke.Provider, { value: Q, children: e });
306
+ }, xt = () => {
307
+ const { camera: e } = Z(), r = g(e);
308
+ return r.current !== e && (r.current = e), r;
309
+ }, ge = (e, r) => {
310
+ const t = g(null), { node: n, ready: s } = bt(), o = xt();
311
+ return D(() => {
312
+ const a = t.current;
313
+ if (!a) return;
314
+ const i = s && n ? e(n.getResult()) : null;
315
+ if (!i) {
316
+ a.visible = !1;
317
+ return;
318
+ }
319
+ a.visible = !0, a.position.copy(r(i, o.current));
320
+ }), { groupRef: t, cameraRef: o, node: n };
321
+ }, ze = ({ children: e }) => {
322
+ const r = g({ x: 0, y: 0, z: 0, visibility: 0 }), { groupRef: t, cameraRef: n, node: s } = ge(
323
+ (i) => {
324
+ var u;
325
+ return ((u = i.face) == null ? void 0 : u.landmarks[4]) ?? null;
326
+ },
327
+ (i, u) => Le(i, u)
328
+ ), o = O(
329
+ (i, u) => {
330
+ var d;
331
+ const c = (d = s == null ? void 0 : s.getResult().face) == null ? void 0 : d.landmarks;
332
+ if (!c || c.length === 0) return null;
333
+ const h = $e(
334
+ i,
335
+ c,
336
+ u,
337
+ r.current
338
+ );
339
+ return h ? { position: Le(h, n.current) } : null;
195
340
  },
341
+ [n, s]
342
+ ), a = E(
343
+ () => ({ type: "face", resolveLandmark: o }),
344
+ [o]
345
+ );
346
+ return /* @__PURE__ */ b(q.Provider, { value: a, children: /* @__PURE__ */ b("group", { ref: t, renderOrder: J.TRACKED, visible: !1, children: e }) });
347
+ };
348
+ ze.displayName = "HolisticTracker.Face";
349
+ const We = ({ hand: e, children: r }) => {
350
+ const t = O(
351
+ (u) => e === "left" ? u.leftHand : u.rightHand,
196
352
  [e]
197
- ), c = _(
353
+ ), { groupRef: n, cameraRef: s, node: o } = ge(
354
+ (u) => {
355
+ var c;
356
+ return ((c = t(u)) == null ? void 0 : c.landmarks[0]) ?? null;
357
+ },
358
+ L
359
+ ), a = O(
360
+ (u) => {
361
+ var d;
362
+ const c = Ue[u];
363
+ if (c === void 0 || !o) return null;
364
+ const h = (d = t(o.getResult())) == null ? void 0 : d.landmarks[c];
365
+ return h ? { position: L(h, s.current) } : null;
366
+ },
367
+ [s, o, t]
368
+ ), i = E(
369
+ () => ({ type: "hand", resolveLandmark: a }),
370
+ [a]
371
+ );
372
+ return /* @__PURE__ */ b(q.Provider, { value: i, children: /* @__PURE__ */ b("group", { ref: n, renderOrder: J.TRACKED, visible: !1, children: r }) });
373
+ };
374
+ We.displayName = "HolisticTracker.Hand";
375
+ const Xe = ({ children: e }) => {
376
+ const { groupRef: r, cameraRef: t, node: n } = ge(
377
+ (a) => {
378
+ var i;
379
+ return ((i = a.pose) == null ? void 0 : i.landmarks[0]) ?? null;
380
+ },
381
+ L
382
+ ), s = O(
383
+ (a) => {
384
+ var h;
385
+ const i = (h = n == null ? void 0 : n.getResult().pose) == null ? void 0 : h.landmarks;
386
+ if (!i) return null;
387
+ if (a === "body.neck") {
388
+ const d = i[11], m = i[12];
389
+ if (!d || !m) return null;
390
+ const f = { x: (d.x + m.x) / 2, y: (d.y + m.y) / 2, z: (d.z + m.z) / 2 };
391
+ return { position: L(f, t.current) };
392
+ }
393
+ const u = Ge[a];
394
+ if (u === void 0) return null;
395
+ const c = i[u];
396
+ return c ? { position: L(c, t.current) } : null;
397
+ },
398
+ [t, n]
399
+ ), o = E(
198
400
  () => ({ type: "body", resolveLandmark: s }),
199
401
  [s]
200
402
  );
201
- return /* @__PURE__ */ A(O.Provider, { value: c, children: /* @__PURE__ */ A("group", { ref: n, renderOrder: z.TRACKED, children: r }) });
202
- }, B = (e, t) => {
203
- const r = new U.Vector3(e.x, e.y, e.z);
204
- r.unproject(t);
205
- const n = r.sub(t.position).normalize(), o = -t.position.z / n.z;
206
- return t.position.clone().add(n.multiplyScalar(o));
207
- }, X = ["portrait"], Be = ({ type: e, active: t = !0, children: r }) => (N(F.BACKGROUND_SEGMENTATION, { type: e }, t), L(() => {
208
- X.includes(e) || console.warn(
209
- `[Segmentation] unsupported type "${e}"; valid values: ${X.join(", ")}`
403
+ return /* @__PURE__ */ b(q.Provider, { value: o, children: /* @__PURE__ */ b("group", { ref: r, renderOrder: J.TRACKED, visible: !1, children: e }) });
404
+ };
405
+ Xe.displayName = "HolisticTracker.Body";
406
+ const Te = At;
407
+ Te.Face = ze;
408
+ Te.Hand = We;
409
+ Te.Body = Xe;
410
+ const Sr = ({ type: e, active: r = !0, children: t }) => (U(I.BACKGROUND_SEGMENTATION, { type: e }, r), k(() => {
411
+ ke.includes(e) || console.warn(
412
+ `[Segmentation] unsupported type "${e}"; valid values: ${ke.join(", ")}`
210
413
  );
211
- }, [e]), /* @__PURE__ */ A(J, { children: r })), ie = 800, ce = 200, ae = () => ({
414
+ }, [e]), /* @__PURE__ */ b(Ze, { children: t })), vt = 800, Ot = 200, Lt = () => ({
212
415
  armed: !1,
213
416
  armStart: null,
214
417
  holdStart: null,
215
418
  fired: !1
216
- }), le = (e, {
217
- isTrigger: t,
218
- gesture: r,
419
+ }), kt = (e, {
420
+ isTrigger: r,
421
+ gesture: t,
219
422
  now: n,
220
- mode: o,
221
- debounceMs: u,
222
- holdMs: i
423
+ mode: s,
424
+ debounceMs: o,
425
+ holdMs: a
223
426
  }) => {
224
427
  if (e.fired) return null;
225
- if (o === "hold") {
226
- if (t && r) {
227
- if (e.holdStart === null && (e.holdStart = n), n - e.holdStart >= i)
228
- return e.fired = !0, r;
428
+ if (s === "hold") {
429
+ if (r && t) {
430
+ if (e.holdStart === null && (e.holdStart = n), n - e.holdStart >= a)
431
+ return e.fired = !0, t;
229
432
  } else
230
433
  e.holdStart = null;
231
434
  return null;
232
435
  }
233
- return e.armed ? t && r ? (e.fired = !0, r) : null : (t ? e.armStart = null : (e.armStart === null && (e.armStart = n), n - e.armStart >= u && (e.armed = !0)), null);
436
+ return e.armed ? r && t ? (e.fired = !0, t) : null : (r ? e.armStart = null : (e.armStart === null && (e.armStart = n), n - e.armStart >= o && (e.armed = !0)), null);
234
437
  };
235
- function de({
438
+ function _t({
236
439
  gestures: e,
237
- mode: t = "arm",
238
- debounceMs: r = ie,
239
- holdMs: n = ce,
240
- onTrigger: o,
241
- enabled: u = !0
440
+ mode: r = "arm",
441
+ debounceMs: t = vt,
442
+ holdMs: n = Ot,
443
+ onTrigger: s,
444
+ enabled: o = !0
242
445
  }) {
243
- const { ready: i, node: a } = N(F.GESTURE_TRACKER), y = R(o);
244
- L(() => {
245
- y.current = o;
246
- }, [o]);
247
- const s = R(/* @__PURE__ */ new Set());
248
- L(() => {
249
- s.current = new Set(Array.isArray(e) ? e : [e]);
446
+ const { ready: a, node: i } = U(I.GESTURE_TRACKER), u = g(s);
447
+ k(() => {
448
+ u.current = s;
449
+ }, [s]);
450
+ const c = g(/* @__PURE__ */ new Set());
451
+ k(() => {
452
+ c.current = new Set(Array.isArray(e) ? e : [e]);
250
453
  }, [e]);
251
- const c = R(ae());
252
- b(() => {
253
- if (!u || !i || !a) return;
254
- const l = a.gesture, f = !!(l && s.current.has(l)), h = le(c.current, {
255
- isTrigger: f,
256
- gesture: l,
454
+ const h = g(Lt());
455
+ D(() => {
456
+ if (!o || !a || !i) return;
457
+ const d = i.gesture, m = !!(d && c.current.has(d)), f = kt(h.current, {
458
+ isTrigger: m,
459
+ gesture: d,
257
460
  now: performance.now(),
258
- mode: t,
259
- debounceMs: r,
461
+ mode: r,
462
+ debounceMs: t,
260
463
  holdMs: n
261
464
  });
262
- h && y.current(h);
465
+ f && u.current(f);
263
466
  });
264
467
  }
265
- const je = (e) => (de(e), null), he = (e, t) => t && !e ? "begin" : !t && e ? "end" : t ? "stay" : "none", fe = {
266
- face: null,
267
- faces: [],
268
- faceCount: 0,
269
- detected: !1,
270
- justDetected: !1,
271
- justLost: !1,
272
- phase: "none"
273
- }, Oe = ({
274
- faceIndex: e = 0,
275
- numFaces: t,
276
- ...r
277
- } = {}) => {
278
- const n = Number.isFinite(e) ? Math.max(0, Math.round(e)) : 0, o = te({
279
- ...r,
280
- numFaces: Math.max(t ?? n + 1, n + 1)
281
- }), u = R([]), i = R(n), a = R({ detected: !1, faceIndex: n }), [y, s] = P(fe), c = R(y);
282
- return L(() => {
283
- u.current = o, i.current = n;
284
- }, [o, n]), b(() => {
285
- const l = u.current, f = i.current, h = l[f] ?? null, g = !!h, d = a.current.faceIndex === f && a.current.detected, p = he(d, g);
286
- a.current = { detected: g, faceIndex: f };
287
- const m = {
288
- face: h,
289
- faces: l,
290
- faceCount: l.length,
291
- detected: g,
292
- justDetected: p === "begin",
293
- justLost: p === "end",
294
- phase: p
295
- }, E = c.current;
296
- E.face === m.face && E.faces === m.faces && E.faceCount === m.faceCount && E.detected === m.detected && E.justDetected === m.justDetected && E.justLost === m.justLost && E.phase === m.phase || (c.current = m, s(m));
297
- }), y;
298
- }, Ce = [
468
+ const yr = (e) => (_t(e), null), Rr = [
299
469
  "_neutral",
300
470
  "browDownLeft",
301
471
  "browDownRight",
@@ -348,13 +518,13 @@ const je = (e) => (de(e), null), he = (e, t) => t && !e ? "begin" : !t && e ? "e
348
518
  "mouthUpperUpRight",
349
519
  "noseSneerLeft",
350
520
  "noseSneerRight"
351
- ], pe = ({
521
+ ], wt = ({
352
522
  source: e,
353
- face: t,
354
- canvas: r,
523
+ face: r,
524
+ canvas: t,
355
525
  outputSize: n,
356
- padding: o = 0.2
357
- }) => ne({ source: e, bounds: t.bounds, canvas: r, outputSize: n, padding: o }), Ie = [
526
+ padding: s = 0.2
527
+ }) => gt({ source: e, bounds: r.bounds, canvas: t, outputSize: n, padding: s }), Er = [
358
528
  "browRaise",
359
529
  "eyeBlink",
360
530
  "eyeBlinkLeft",
@@ -368,86 +538,86 @@ const je = (e) => (de(e), null), he = (e, t) => t && !e ? "begin" : !t && e ? "e
368
538
  "mouthPout",
369
539
  "headTiltLeft",
370
540
  "headTiltRight"
371
- ], T = (e = 0.5) => ({
541
+ ], H = (e = 0.5) => ({
372
542
  threshold: e,
373
543
  releaseThreshold: Math.max(0, e - 0.15),
374
544
  holdMs: 50
375
- }), w = {
545
+ }), z = {
376
546
  threshold: Math.PI / 18,
377
547
  releaseThreshold: Math.PI / 30,
378
548
  holdMs: 80
379
- }, me = {
380
- browRaise: T(0.45),
381
- eyeBlink: T(0.55),
382
- eyeBlinkLeft: T(0.55),
383
- eyeBlinkRight: T(0.55),
384
- eyeBlinkEither: T(0.55),
385
- headUp: w,
386
- headDown: w,
387
- headTurnLeft: w,
388
- headTurnRight: w,
389
- mouthOpen: T(0.45),
390
- mouthPout: T(0.5),
391
- headTiltLeft: w,
392
- headTiltRight: w
393
- }, x = (e) => Math.max(0, e), k = (e, t) => e !== void 0 && Number.isFinite(e) ? e : t, q = (e, t = {}) => {
394
- const r = me[e], n = Math.max(0, k(t.threshold, r.threshold));
549
+ }, Dt = {
550
+ browRaise: H(0.45),
551
+ eyeBlink: H(0.55),
552
+ eyeBlinkLeft: H(0.55),
553
+ eyeBlinkRight: H(0.55),
554
+ eyeBlinkEither: H(0.55),
555
+ headUp: z,
556
+ headDown: z,
557
+ headTurnLeft: z,
558
+ headTurnRight: z,
559
+ mouthOpen: H(0.45),
560
+ mouthPout: H(0.5),
561
+ headTiltLeft: z,
562
+ headTiltRight: z
563
+ }, W = (e) => Math.max(0, e), Y = (e, r) => e !== void 0 && Number.isFinite(e) ? e : r, Ye = (e, r = {}) => {
564
+ const t = Dt[e], n = Math.max(0, Y(r.threshold, t.threshold));
395
565
  return {
396
566
  threshold: n,
397
567
  releaseThreshold: Math.min(
398
568
  n,
399
- Math.max(0, k(t.releaseThreshold, r.releaseThreshold))
569
+ Math.max(0, Y(r.releaseThreshold, t.releaseThreshold))
400
570
  ),
401
- holdMs: Math.max(0, k(t.holdMs, r.holdMs))
571
+ holdMs: Math.max(0, Y(r.holdMs, t.holdMs))
402
572
  };
403
- }, H = (e, t, { neutralRotation: r = { x: 0, y: 0, z: 0 } } = {}) => {
404
- const n = k(r.x, 0), o = k(r.y, 0), u = k(r.z, 0);
405
- switch (t) {
573
+ }, V = (e, r, { neutralRotation: t = { x: 0, y: 0, z: 0 } } = {}) => {
574
+ const n = Y(t.x, 0), s = Y(t.y, 0), o = Y(t.z, 0);
575
+ switch (r) {
406
576
  case "browRaise":
407
577
  return Math.max(
408
- S(e, "browInnerUp"),
409
- S(e, "browOuterUpLeft"),
410
- S(e, "browOuterUpRight")
578
+ A(e, "browInnerUp"),
579
+ A(e, "browOuterUpLeft"),
580
+ A(e, "browOuterUpRight")
411
581
  );
412
582
  case "eyeBlink":
413
583
  return Math.min(
414
- S(e, "eyeBlinkLeft"),
415
- S(e, "eyeBlinkRight")
584
+ A(e, "eyeBlinkLeft"),
585
+ A(e, "eyeBlinkRight")
416
586
  );
417
587
  case "eyeBlinkLeft":
418
- return S(e, "eyeBlinkRight");
588
+ return A(e, "eyeBlinkRight");
419
589
  case "eyeBlinkRight":
420
- return S(e, "eyeBlinkLeft");
590
+ return A(e, "eyeBlinkLeft");
421
591
  case "eyeBlinkEither":
422
592
  return Math.max(
423
- S(e, "eyeBlinkLeft"),
424
- S(e, "eyeBlinkRight")
593
+ A(e, "eyeBlinkLeft"),
594
+ A(e, "eyeBlinkRight")
425
595
  );
426
596
  case "mouthOpen":
427
- return S(e, "jawOpen");
597
+ return A(e, "jawOpen");
428
598
  case "mouthPout":
429
- return S(e, "mouthPucker");
599
+ return A(e, "mouthPucker");
430
600
  case "headUp":
431
- return x(e.pose.rotation.x - n);
601
+ return W(e.pose.rotation.x - n);
432
602
  case "headDown":
433
- return x(n - e.pose.rotation.x);
603
+ return W(n - e.pose.rotation.x);
434
604
  case "headTurnLeft":
435
- return x(e.pose.rotation.y - o);
605
+ return W(e.pose.rotation.y - s);
436
606
  case "headTurnRight":
437
- return x(o - e.pose.rotation.y);
607
+ return W(s - e.pose.rotation.y);
438
608
  case "headTiltLeft":
439
- return x(e.pose.rotation.z - u);
609
+ return W(e.pose.rotation.z - o);
440
610
  case "headTiltRight":
441
- return x(u - e.pose.rotation.z);
611
+ return W(o - e.pose.rotation.z);
442
612
  }
443
- }, Pe = (e, t, r = {}) => H(e, t, r) >= q(t, r).threshold, Ue = (e, t, r = {}) => {
444
- let n = null, o = 0;
445
- for (const u of e) {
446
- const i = H(u, t, r);
447
- (!n || i > o) && (n = u, o = i);
613
+ }, br = (e, r, t = {}) => V(e, r, t) >= Ye(r, t).threshold, Ar = (e, r, t = {}) => {
614
+ let n = null, s = 0;
615
+ for (const o of e) {
616
+ const a = V(o, r, t);
617
+ (!n || a > s) && (n = o, s = a);
448
618
  }
449
- return { face: n, value: o };
450
- }, V = (e) => ({
619
+ return { face: n, value: s };
620
+ }, Me = (e) => ({
451
621
  action: e,
452
622
  active: !1,
453
623
  value: 0,
@@ -455,54 +625,488 @@ const je = (e) => (de(e), null), he = (e, t) => t && !e ? "begin" : !t && e ? "e
455
625
  justEnded: !1,
456
626
  phase: "none",
457
627
  holdStartedAt: null
458
- }), Re = (e, t, r, n, o) => {
459
- const u = e.phase === "begin";
460
- if (e.value = t, e.justStarted = !1, e.justEnded = !1, e.phase = e.active ? "stay" : "none", !n)
628
+ }), It = (e, r, t, n, s) => {
629
+ const o = e.phase === "begin";
630
+ if (e.value = r, e.justStarted = !1, e.justEnded = !1, e.phase = e.active ? "stay" : "none", !n)
461
631
  return e.holdStartedAt = null, e.active && (e.active = !1, e.justEnded = !0, e.phase = "end"), e;
462
632
  if (e.active) {
463
- if (t <= o.releaseThreshold) {
464
- if (u) return e;
633
+ if (r <= s.releaseThreshold) {
634
+ if (o) return e;
465
635
  e.active = !1, e.justEnded = !0, e.phase = "end";
466
636
  }
467
637
  return e;
468
638
  }
469
- return t < o.threshold ? (e.holdStartedAt = null, e) : (e.holdStartedAt === null && (e.holdStartedAt = r), r - e.holdStartedAt >= o.holdMs && (e.active = !0, e.justStarted = !0, e.phase = "begin", e.holdStartedAt = null), e);
470
- }, W = (e) => ({
639
+ return r < s.threshold ? (e.holdStartedAt = null, e) : (e.holdStartedAt === null && (e.holdStartedAt = t), t - e.holdStartedAt >= s.holdMs && (e.active = !0, e.justStarted = !0, e.phase = "begin", e.holdStartedAt = null), e);
640
+ }, se = (e) => ({ value: e, confidence: 1 }), re = (e, r, t, n) => ({
641
+ name: e,
642
+ kind: "face",
643
+ description: r,
644
+ defaults: n,
645
+ measure: (s) => s ? se(t(s)) : null
646
+ }), v = (e, r, t, n) => ({
647
+ name: e,
648
+ kind: "hand",
649
+ description: r,
650
+ defaults: n,
651
+ measure: (s) => s && s.length >= 21 ? se(t(s)) : null
652
+ }), $ = (e, r, t, n) => ({
653
+ name: e,
654
+ kind: "body",
655
+ description: r,
656
+ defaults: n,
657
+ measure: (s) => s && s.length >= 33 ? se(t(s)) : null
658
+ }), le = (e) => () => ({
659
+ tracker: new ut(e),
660
+ wasPresent: !1
661
+ }), de = (e, r, t) => r === null ? (e.wasPresent = !1, null) : (e.wasPresent || e.tracker.reset(), e.wasPresent = !0, se(e.tracker.push(r, t))), he = {
662
+ enterThreshold: 0.99,
663
+ exitThreshold: 0.3,
664
+ cooldownMs: 600
665
+ }, Ve = {
666
+ // ── Face ───────────────────────────────────────────────────────────────
667
+ mouthOpen: re(
668
+ "mouthOpen",
669
+ "Jaw open (blendshape jawOpen).",
670
+ (e) => V(e, "mouthOpen")
671
+ ),
672
+ smile: re(
673
+ "smile",
674
+ "Mean of the two mouthSmile blendshapes.",
675
+ (e) => (A(e, "mouthSmileLeft") + A(e, "mouthSmileRight")) / 2,
676
+ { enterThreshold: 0.4 }
677
+ ),
678
+ blink: re(
679
+ "blink",
680
+ "Both eyes closed (min of the eyeBlink blendshapes).",
681
+ (e) => V(e, "eyeBlink"),
682
+ { enterThreshold: 0.55, holdMs: 50 }
683
+ ),
684
+ browRaise: re(
685
+ "browRaise",
686
+ "Eyebrows raised (max of the brow-up blendshapes).",
687
+ (e) => V(e, "browRaise"),
688
+ { enterThreshold: 0.45 }
689
+ ),
690
+ headNod: {
691
+ name: "headNod",
692
+ kind: "face",
693
+ description: "Pitch oscillation: three turning points of at least 0.12 rad within 1.5 s.",
694
+ defaults: he,
695
+ createMemory: le({ minAmplitude: 0.12, requiredReversals: 3, windowMs: 1500 }),
696
+ measure: (e, r, t) => de(r, e ? e.pose.rotation.x : null, t)
697
+ },
698
+ headShake: {
699
+ name: "headShake",
700
+ kind: "face",
701
+ description: "Yaw oscillation: three turning points of at least 0.15 rad within 1.5 s.",
702
+ defaults: he,
703
+ createMemory: le({ minAmplitude: 0.15, requiredReversals: 3, windowMs: 1500 }),
704
+ measure: (e, r, t) => de(r, e ? e.pose.rotation.y : null, t)
705
+ },
706
+ // ── Hand ───────────────────────────────────────────────────────────────
707
+ pinch: v(
708
+ "pinch",
709
+ "Thumb and index tips touching, relative to palm size.",
710
+ mt,
711
+ {
712
+ enterThreshold: 0.75,
713
+ exitThreshold: 0.5
714
+ }
715
+ ),
716
+ grab: v("grab", "Fist: index to pinky curled toward the wrist.", ft, {
717
+ enterThreshold: 0.7,
718
+ exitThreshold: 0.45
719
+ }),
720
+ openPalm: v("openPalm", "Index to pinky extended.", ht, {
721
+ enterThreshold: 0.7,
722
+ exitThreshold: 0.45
723
+ }),
724
+ handRaised: v(
725
+ "handRaised",
726
+ "Wrist in the upper part of the frame (0 bottom edge, 1 top edge).",
727
+ dt,
728
+ { enterThreshold: 0.7, exitThreshold: 0.6 }
729
+ ),
730
+ // Finger-count signs: each required finger must agree; 1 only when all do.
731
+ oneFinger: v(
732
+ "oneFinger",
733
+ "Index extended, other fingers curled (pointing).",
734
+ (e) => K(e, { fingers: [!0, !1, !1, !1] }),
735
+ { enterThreshold: 0.65, exitThreshold: 0.45 }
736
+ ),
737
+ peaceSign: v(
738
+ "peaceSign",
739
+ "Index and middle extended, ring and pinky curled.",
740
+ (e) => K(e, { fingers: [!0, !0, !1, !1] }),
741
+ { enterThreshold: 0.65, exitThreshold: 0.45 }
742
+ ),
743
+ threeFingers: v(
744
+ "threeFingers",
745
+ "Index, middle and ring extended, pinky curled.",
746
+ (e) => K(e, { fingers: [!0, !0, !0, !1] }),
747
+ { enterThreshold: 0.65, exitThreshold: 0.45 }
748
+ ),
749
+ fourFingers: v(
750
+ "fourFingers",
751
+ "Index to pinky extended, thumb tucked.",
752
+ (e) => K(e, { fingers: [!0, !0, !0, !0], thumb: !1 }),
753
+ { enterThreshold: 0.65, exitThreshold: 0.45 }
754
+ ),
755
+ fist: v(
756
+ "fist",
757
+ "All four fingers curled and the thumb tucked.",
758
+ (e) => K(e, { fingers: [!1, !1, !1, !1], thumb: !1 }),
759
+ { enterThreshold: 0.65, exitThreshold: 0.45 }
760
+ ),
761
+ palm: v(
762
+ "palm",
763
+ "All four fingers extended and the thumb out.",
764
+ (e) => K(e, { fingers: [!0, !0, !0, !0], thumb: !0 }),
765
+ { enterThreshold: 0.65, exitThreshold: 0.45 }
766
+ ),
767
+ thumbUp: v(
768
+ "thumbUp",
769
+ "Thumb out and pointing up, fingers curled.",
770
+ (e) => we(e, "up"),
771
+ { enterThreshold: 0.6, exitThreshold: 0.4 }
772
+ ),
773
+ thumbDown: v(
774
+ "thumbDown",
775
+ "Thumb out and pointing down, fingers curled.",
776
+ (e) => we(e, "down"),
777
+ { enterThreshold: 0.6, exitThreshold: 0.4 }
778
+ ),
779
+ wave: {
780
+ name: "wave",
781
+ kind: "hand",
782
+ description: "Wrist swinging side to side: three turning points of at least 0.08 within 1.2 s.",
783
+ defaults: he,
784
+ createMemory: le({ minAmplitude: 0.08, requiredReversals: 3, windowMs: 1200 }),
785
+ measure: (e, r, t) => de(r, e && e.length >= 21 ? e[0].x : null, t)
786
+ },
787
+ // ── Body ───────────────────────────────────────────────────────────────
788
+ armRaisedLeft: $(
789
+ "armRaisedLeft",
790
+ "Person's left wrist above the left shoulder, in shoulder widths.",
791
+ (e) => G(e, "left"),
792
+ { enterThreshold: 0.3, exitThreshold: 0.15 }
793
+ ),
794
+ armRaisedRight: $(
795
+ "armRaisedRight",
796
+ "Person's right wrist above the right shoulder, in shoulder widths.",
797
+ (e) => G(e, "right"),
798
+ { enterThreshold: 0.3, exitThreshold: 0.15 }
799
+ ),
800
+ armRaised: $(
801
+ "armRaised",
802
+ "Either wrist above its shoulder.",
803
+ (e) => Math.max(G(e, "left"), G(e, "right")),
804
+ { enterThreshold: 0.3, exitThreshold: 0.15 }
805
+ ),
806
+ bothArmsRaised: $(
807
+ "bothArmsRaised",
808
+ "Both wrists above their shoulders.",
809
+ (e) => Math.min(G(e, "left"), G(e, "right")),
810
+ { enterThreshold: 0.3, exitThreshold: 0.15 }
811
+ ),
812
+ tPose: $("tPose", "Both arms level and outstretched.", lt, {
813
+ enterThreshold: 0.6,
814
+ exitThreshold: 0.4,
815
+ holdMs: 150
816
+ })
817
+ }, xr = Object.keys(Ve), Nt = (e) => typeof e == "string" ? Ve[e] : e, vr = (e) => e, Ct = {
818
+ face: I.FACE_TRACKER,
819
+ hand: I.HAND_TRACKER,
820
+ body: I.BODY_TRACKER
821
+ }, Fe = (e) => Be(me(e)), Mt = (e, r = {}) => {
822
+ var Ae;
823
+ const t = E(() => Nt(e), [e]), {
824
+ active: n = !0,
825
+ faceIndex: s = 0,
826
+ numFaces: o,
827
+ hand: a,
828
+ handIndex: i = 0,
829
+ bodyIndex: u = 0,
830
+ targetFps: c,
831
+ onBegin: h,
832
+ onEnd: d,
833
+ onChange: m,
834
+ ...f
835
+ } = r, S = Ct[t.kind], T = Math.max(o ?? s + 1, s + 1), y = E(() => {
836
+ const w = {};
837
+ return t.kind === "face" && (w.numFaces = T), c !== void 0 && c > 0 && (w.targetFps = c), Object.keys(w).length > 0 ? w : void 0;
838
+ }, [t.kind, T, c]), { node: l, ready: p } = U(S, y, n), { camera: _ } = Z();
839
+ k(() => {
840
+ !l || t.kind !== "face" || l.setCamera(_, s);
841
+ }, [_, t.kind, s, l]);
842
+ const x = E(
843
+ () => _e(
844
+ f,
845
+ _e(t.defaults)
846
+ ),
847
+ // eslint-disable-next-line react-hooks/exhaustive-deps
848
+ [
849
+ t,
850
+ f.enterThreshold,
851
+ f.exitThreshold,
852
+ f.holdMs,
853
+ f.cooldownMs,
854
+ f.minConfidence,
855
+ f.lostGraceMs
856
+ ]
857
+ ), N = g(me(t.name)), F = g((Ae = t.createMemory) == null ? void 0 : Ae.call(t)), C = g(at()), [Q, R] = B(() => Fe(t.name)), j = g(Q);
858
+ k(() => {
859
+ var M;
860
+ N.current = me(t.name), F.current = (M = t.createMemory) == null ? void 0 : M.call(t);
861
+ const w = Fe(t.name);
862
+ j.current = w, R(w);
863
+ }, [t]);
864
+ const Ee = g({ onBegin: h, onEnd: d, onChange: m });
865
+ Ee.current = { onBegin: h, onEnd: d, onChange: m };
866
+ const be = g({ faceIndex: s, hand: a, handIndex: i, bodyIndex: u, active: n });
867
+ return be.current = { faceIndex: s, hand: a, handIndex: i, bodyIndex: u, active: n }, D(() => {
868
+ var Oe;
869
+ const w = performance.now(), M = be.current;
870
+ let xe = null;
871
+ if (M.active && p && l) {
872
+ let ee;
873
+ t.kind === "face" ? ee = ct(l, M.faceIndex, C.current) : t.kind === "hand" ? ee = (Oe = je(
874
+ l,
875
+ M.hand,
876
+ M.handIndex
877
+ )) == null ? void 0 : Oe.coordinates : ee = l.getLandmarks2D(M.bodyIndex), xe = t.measure(ee, F.current, w);
878
+ }
879
+ const ve = ot(N.current, xe, w, x);
880
+ if (it(j.current, ve)) return;
881
+ const P = Be(ve);
882
+ j.current = P, R(P);
883
+ const { onBegin: ae, onEnd: ce, onChange: ue } = Ee.current;
884
+ P.justBegan && (ae == null || ae(P)), P.justEnded && (ce == null || ce(P)), ue == null || ue(P);
885
+ }), Q;
886
+ }, Or = ({ gesture: e, ...r }) => (Mt(e, r), null), Se = 1, ye = Object.freeze({
887
+ version: Se,
888
+ orientation: 0,
889
+ mirrored: "auto",
890
+ scale: 1,
891
+ offset: Object.freeze({ x: 0, y: 0 }),
892
+ face: null,
893
+ body: null,
894
+ updatedAt: 0
895
+ }), Ft = (e = {}) => oe(ye, e, 0), Pt = [0, 90, 180, 270], Ht = (e) => Math.min(4, Math.max(0.25, e)), oe = (e, r, t = Date.now()) => ({
896
+ version: Se,
897
+ orientation: r.orientation !== void 0 && Pt.includes(r.orientation) ? r.orientation : e.orientation,
898
+ mirrored: r.mirrored === !0 || r.mirrored === !1 || r.mirrored === "auto" ? r.mirrored : e.mirrored,
899
+ scale: r.scale !== void 0 && Number.isFinite(r.scale) && r.scale > 0 ? Ht(r.scale) : e.scale,
900
+ offset: r.offset && Number.isFinite(r.offset.x) && Number.isFinite(r.offset.y) ? { x: r.offset.x, y: r.offset.y } : { ...e.offset },
901
+ face: r.face !== void 0 ? r.face : e.face,
902
+ body: r.body !== void 0 ? r.body : e.body,
903
+ updatedAt: t
904
+ }), Bt = (e = Date.now()) => oe(ye, {}, e), Lr = (e) => e.orientation === 0 && e.mirrored === "auto" && e.scale === 1 && e.offset.x === 0 && e.offset.y === 0, Ut = (e, r) => e.mirrored === "auto" ? !1 : e.mirrored !== nt(r), jt = (e, r, t, n = { x: 0, y: 0 }) => {
905
+ let { x: s, y: o } = e;
906
+ switch (r.orientation) {
907
+ case 90:
908
+ [s, o] = [1 - o, s];
909
+ break;
910
+ case 180:
911
+ [s, o] = [1 - s, 1 - o];
912
+ break;
913
+ case 270:
914
+ [s, o] = [o, 1 - s];
915
+ break;
916
+ }
917
+ return Ut(r, t) && (s = 1 - s), s = 0.5 + (s - 0.5) * r.scale + r.offset.x, o = 0.5 + (o - 0.5) * r.scale + r.offset.y, n.x = s, n.y = o, e.z !== void 0 && (n.z = e.z), n;
918
+ }, ne = (e, r) => e && r ? Math.hypot(e.x - r.x, e.y - r.y) : null, Gt = Object.freeze({
919
+ leftTemple: 234,
920
+ rightTemple: 454,
921
+ leftEyeOuter: 33,
922
+ rightEyeOuter: 263
923
+ }), qe = (e, r = Date.now()) => {
924
+ if (!e || e.length < 468) return null;
925
+ const { leftTemple: t, rightTemple: n, leftEyeOuter: s, rightEyeOuter: o } = Gt, a = ne(e[t], e[n]), i = ne(e[s], e[o]);
926
+ return !a || !i ? null : { faceWidth: a, eyeDistance: i, capturedAt: r };
927
+ }, Kt = Object.freeze({
928
+ leftShoulder: 11,
929
+ rightShoulder: 12,
930
+ leftHip: 23,
931
+ rightHip: 24
932
+ }), Je = (e, r = Date.now()) => {
933
+ if (!e || e.length < 33) return null;
934
+ const { leftShoulder: t, rightShoulder: n, leftHip: s, rightHip: o } = Kt, a = ne(e[t], e[n]), i = ne(e[s], e[o]), u = e[t], c = e[n], h = e[s], d = e[o];
935
+ if (!a || !i || !u || !c || !h || !d) return null;
936
+ const m = Math.hypot(
937
+ (u.x + c.x) / 2 - (h.x + d.x) / 2,
938
+ (u.y + c.y) / 2 - (h.y + d.y) / 2
939
+ );
940
+ return { shoulderWidth: a, hipWidth: i, torsoLength: m, capturedAt: r };
941
+ }, zt = (e, r) => {
942
+ const t = r.face, n = qe(e, 0);
943
+ return !t || !n ? null : t.faceWidth > 0 && n.faceWidth > 0 ? n.faceWidth / t.faceWidth : t.eyeDistance > 0 && n.eyeDistance > 0 ? n.eyeDistance / t.eyeDistance : null;
944
+ }, Wt = (e, r) => {
945
+ const t = r.body, n = Je(e, 0);
946
+ return !t || !n || t.shoulderWidth <= 0 ? null : n.shoulderWidth / t.shoulderWidth;
947
+ }, ie = "vincentt.xr.calibration", Re = () => {
948
+ try {
949
+ return typeof localStorage < "u" ? localStorage : null;
950
+ } catch {
951
+ return null;
952
+ }
953
+ }, Xt = (e = ie, r = Re()) => {
954
+ if (!r) return null;
955
+ try {
956
+ const t = r.getItem(e);
957
+ if (!t) return null;
958
+ const n = JSON.parse(t);
959
+ return !n || typeof n != "object" || n.version !== Se ? null : oe(
960
+ ye,
961
+ {
962
+ orientation: n.orientation,
963
+ mirrored: n.mirrored,
964
+ scale: n.scale,
965
+ offset: n.offset,
966
+ face: n.face ?? null,
967
+ body: n.body ?? null
968
+ },
969
+ typeof n.updatedAt == "number" ? n.updatedAt : 0
970
+ );
971
+ } catch {
972
+ return null;
973
+ }
974
+ }, Yt = (e, r = ie, t = Re()) => {
975
+ if (!t) return !1;
976
+ try {
977
+ return t.setItem(r, JSON.stringify(e)), !0;
978
+ } catch {
979
+ return !1;
980
+ }
981
+ }, Vt = (e = ie, r = Re()) => {
982
+ if (r)
983
+ try {
984
+ r.removeItem(e);
985
+ } catch {
986
+ }
987
+ }, kr = (e = {}) => {
988
+ const { storageKey: r = ie, persist: t = !0 } = e, n = e.storage === void 0 ? void 0 : e.storage, s = g(e.initial), { session: o } = He(), a = tt(
989
+ (l) => o.store.subscribe(l),
990
+ () => o.store.getSnapshot().sourceKind,
991
+ () => {
992
+ }
993
+ ), [i, u] = B(
994
+ () => Ft(s.current)
995
+ ), [c, h] = B(!t), d = g(i);
996
+ d.current = i, k(() => {
997
+ if (!t) {
998
+ h(!0);
999
+ return;
1000
+ }
1001
+ const l = Xt(r, n);
1002
+ l && (d.current = l, u(l)), h(!0);
1003
+ }, [t, r, n]);
1004
+ const m = O(
1005
+ (l) => (d.current = l, u(l), t && Yt(l, r, n), l),
1006
+ [t, r, n]
1007
+ ), f = O(
1008
+ (l) => m(oe(d.current, l)),
1009
+ [m]
1010
+ ), S = O(() => {
1011
+ const l = Bt();
1012
+ return d.current = l, u(l), t && Vt(r, n), l;
1013
+ }, [t, r, n]), T = O(
1014
+ (l) => {
1015
+ const p = qe(l);
1016
+ return p ? (f({ face: p }), !0) : !1;
1017
+ },
1018
+ [f]
1019
+ ), y = O(
1020
+ (l) => {
1021
+ const p = Je(l);
1022
+ return p ? (f({ body: p }), !0) : !1;
1023
+ },
1024
+ [f]
1025
+ );
1026
+ return E(
1027
+ () => ({
1028
+ calibration: i,
1029
+ hydrated: c,
1030
+ update: f,
1031
+ reset: S,
1032
+ calibrateFace: T,
1033
+ calibrateBody: y,
1034
+ applyToFeedPoint: (l, p) => jt(l, i, a, p),
1035
+ faceDistance: (l) => zt(l, i),
1036
+ bodyScale: (l) => Wt(l, i),
1037
+ sourceKind: a
1038
+ }),
1039
+ [i, c, f, S, T, y, a]
1040
+ );
1041
+ }, qt = (e, r) => r && !e ? "begin" : !r && e ? "end" : r ? "stay" : "none", Jt = {
1042
+ face: null,
1043
+ faces: [],
1044
+ faceCount: 0,
1045
+ detected: !1,
1046
+ justDetected: !1,
1047
+ justLost: !1,
1048
+ phase: "none"
1049
+ }, _r = ({
1050
+ faceIndex: e = 0,
1051
+ numFaces: r,
1052
+ ...t
1053
+ } = {}) => {
1054
+ const n = Number.isFinite(e) ? Math.max(0, Math.round(e)) : 0, s = pt({
1055
+ ...t,
1056
+ numFaces: Math.max(r ?? n + 1, n + 1)
1057
+ }), o = g([]), a = g(n), i = g({ detected: !1, faceIndex: n }), [u, c] = B(Jt), h = g(u);
1058
+ return k(() => {
1059
+ o.current = s, a.current = n;
1060
+ }, [s, n]), D(() => {
1061
+ const d = o.current, m = a.current, f = d[m] ?? null, S = !!f, T = i.current.faceIndex === m && i.current.detected, y = qt(T, S);
1062
+ i.current = { detected: S, faceIndex: m };
1063
+ const l = {
1064
+ face: f,
1065
+ faces: d,
1066
+ faceCount: d.length,
1067
+ detected: S,
1068
+ justDetected: y === "begin",
1069
+ justLost: y === "end",
1070
+ phase: y
1071
+ }, p = h.current;
1072
+ p.face === l.face && p.faces === l.faces && p.faceCount === l.faceCount && p.detected === l.detected && p.justDetected === l.justDetected && p.justLost === l.justLost && p.phase === l.phase || (h.current = l, c(l));
1073
+ }), u;
1074
+ }, Pe = (e) => ({
471
1075
  action: e,
472
1076
  active: !1,
473
1077
  value: 0,
474
1078
  justStarted: !1,
475
1079
  justEnded: !1,
476
1080
  phase: "none"
477
- }), ze = (e, t, r = {}) => {
478
- const n = R(V(t)), o = R(null), u = R(t), i = R({}), [a, y] = P(() => W(t)), s = R(a);
479
- return L(() => {
480
- o.current = e, i.current = r;
481
- }, [e, r]), L(() => {
482
- u.current = t, n.current = V(t);
483
- const c = W(t);
484
- s.current = c, y(c);
485
- }, [t]), b(({ clock: c }) => {
486
- const l = o.current, f = u.current, h = i.current, g = l ? H(l, f, h) : 0, d = Re(
1081
+ }), wr = (e, r, t = {}) => {
1082
+ const n = g(Me(r)), s = g(null), o = g(r), a = g({}), [i, u] = B(() => Pe(r)), c = g(i);
1083
+ return k(() => {
1084
+ s.current = e, a.current = t;
1085
+ }, [e, t]), k(() => {
1086
+ o.current = r, n.current = Me(r);
1087
+ const h = Pe(r);
1088
+ c.current = h, u(h);
1089
+ }, [r]), D(({ clock: h }) => {
1090
+ const d = s.current, m = o.current, f = a.current, S = d ? V(d, m, f) : 0, T = It(
487
1091
  n.current,
488
- g,
489
- c.elapsedTime * 1e3,
490
- !!l,
491
- q(f, h)
492
- ), p = s.current;
493
- if (p.action === d.action && p.active === d.active && p.value === d.value && p.justStarted === d.justStarted && p.justEnded === d.justEnded && p.phase === d.phase)
1092
+ S,
1093
+ h.elapsedTime * 1e3,
1094
+ !!d,
1095
+ Ye(m, f)
1096
+ ), y = c.current;
1097
+ if (y.action === T.action && y.active === T.active && y.value === T.value && y.justStarted === T.justStarted && y.justEnded === T.justEnded && y.phase === T.phase)
494
1098
  return;
495
- const m = {
496
- action: d.action,
497
- active: d.active,
498
- value: d.value,
499
- justStarted: d.justStarted,
500
- justEnded: d.justEnded,
501
- phase: d.phase
1099
+ const l = {
1100
+ action: T.action,
1101
+ active: T.active,
1102
+ value: T.value,
1103
+ justStarted: T.justStarted,
1104
+ justEnded: T.justEnded,
1105
+ phase: T.phase
502
1106
  };
503
- s.current = m, y(m);
504
- }), a;
505
- }, He = [
1107
+ c.current = l, u(l);
1108
+ }), i;
1109
+ }, Dr = [
506
1110
  "angry",
507
1111
  "disgust",
508
1112
  "fear",
@@ -511,7 +1115,7 @@ const je = (e) => (de(e), null), he = (e, t) => t && !e ? "begin" : !t && e ? "e
511
1115
  "sad",
512
1116
  "surprise",
513
1117
  "unknown"
514
- ], v = [
1118
+ ], X = [
515
1119
  "angry",
516
1120
  "disgust",
517
1121
  "fear",
@@ -519,110 +1123,182 @@ const je = (e) => (de(e), null), he = (e, t) => t && !e ? "begin" : !t && e ? "e
519
1123
  "neutral",
520
1124
  "sad",
521
1125
  "surprise"
522
- ], ye = (e, t = 0.55) => {
523
- let r = -1 / 0;
524
- for (let s = 0; s < v.length; s += 1)
525
- r = Math.max(r, Number(e[s]) || 0);
526
- const n = new Array(v.length);
527
- let o = 0;
528
- for (let s = 0; s < v.length; s += 1) {
529
- const c = Math.exp((Number(e[s]) || 0) - r);
530
- n[s] = c, o += c;
1126
+ ], $t = (e, r = 0.55) => {
1127
+ let t = -1 / 0;
1128
+ for (let c = 0; c < X.length; c += 1)
1129
+ t = Math.max(t, Number(e[c]) || 0);
1130
+ const n = new Array(X.length);
1131
+ let s = 0;
1132
+ for (let c = 0; c < X.length; c += 1) {
1133
+ const h = Math.exp((Number(e[c]) || 0) - t);
1134
+ n[c] = h, s += h;
531
1135
  }
532
- const u = Object.fromEntries(v.map((s) => [s, 0]));
533
- let i = "unknown", a = 0;
534
- for (let s = 0; s < v.length; s += 1) {
535
- const c = o ? n[s] / o : 0, l = v[s];
536
- u[l] = c, c > a && (i = l, a = c);
1136
+ const o = Object.fromEntries(X.map((c) => [c, 0]));
1137
+ let a = "unknown", i = 0;
1138
+ for (let c = 0; c < X.length; c += 1) {
1139
+ const h = s ? n[c] / s : 0, d = X[c];
1140
+ o[d] = h, h > i && (a = d, i = h);
537
1141
  }
538
- const y = Number.isFinite(t) ? Math.min(1, Math.max(0, t)) : 0.55;
539
- return { expression: a >= y ? i : "unknown", confidence: a, scores: u };
540
- }, ge = (e) => {
541
- const t = e.width * e.height, r = new Float32Array(t * 3);
542
- for (let n = 0, o = 0; n < t; n += 1, o += 4)
543
- r[n] = e.data[o] / 127.5 - 1, r[t + n] = e.data[o + 1] / 127.5 - 1, r[t * 2 + n] = e.data[o + 2] / 127.5 - 1;
544
- return r;
545
- }, Ee = "https://huggingface.co/opencv/facial_expression_recognition/resolve/main/facial_expression_recognition_mobilefacenet_2022july_int8.onnx", Se = (e) => `https://cdn.jsdelivr.net/npm/onnxruntime-web@${e.env.versions.web}/dist/`, j = /* @__PURE__ */ new Map(), Te = (e) => {
546
- let t = j.get(e);
547
- return t || (t = Promise.all([import("onnxruntime-web/wasm"), ee(e)]).then(([r, n]) => (r.env.wasm.wasmPaths = Se(r), r.InferenceSession.create(n, { executionProviders: ["wasm"] }))).catch((r) => {
548
- throw j.delete(e), r;
549
- }), j.set(e, t)), t;
550
- }, Ke = (e, {
551
- active: t = !0,
552
- targetFps: r = 5,
1142
+ const u = Number.isFinite(r) ? Math.min(1, Math.max(0, r)) : 0.55;
1143
+ return { expression: i >= u ? a : "unknown", confidence: i, scores: o };
1144
+ }, Zt = (e) => {
1145
+ const r = e.width * e.height, t = new Float32Array(r * 3);
1146
+ for (let n = 0, s = 0; n < r; n += 1, s += 4)
1147
+ t[n] = e.data[s] / 127.5 - 1, t[r + n] = e.data[s + 1] / 127.5 - 1, t[r * 2 + n] = e.data[s + 2] / 127.5 - 1;
1148
+ return t;
1149
+ }, Qt = "https://huggingface.co/opencv/facial_expression_recognition/resolve/main/facial_expression_recognition_mobilefacenet_2022july_int8.onnx", er = (e) => `https://cdn.jsdelivr.net/npm/onnxruntime-web@${e.env.versions.web}/dist/`, fe = /* @__PURE__ */ new Map(), tr = (e) => {
1150
+ let r = fe.get(e);
1151
+ return r || (r = Promise.all([import("onnxruntime-web/wasm"), st(e)]).then(([t, n]) => (t.env.wasm.wasmPaths = er(t), t.InferenceSession.create(n, { executionProviders: ["wasm"] }))).catch((t) => {
1152
+ throw fe.delete(e), t;
1153
+ }), fe.set(e, r)), r;
1154
+ }, Ir = (e, {
1155
+ active: r = !0,
1156
+ targetFps: t = 5,
553
1157
  minConfidence: n = 0.55,
554
- modelUrl: o = Ee
1158
+ modelUrl: s = Qt
555
1159
  } = {}) => {
556
- const { session: u } = Q(), i = R(null), a = R(null), y = R(!1), s = R(-1 / 0), c = R(!0), [l, f] = P({
1160
+ const { session: o } = He(), a = g(null), i = g(null), u = g(!1), c = g(-1 / 0), h = g(!0), [d, m] = B({
557
1161
  status: "idle",
558
1162
  result: null,
559
1163
  error: null
560
1164
  });
561
- return L(() => {
562
- const h = document.createElement("canvas");
563
- return i.current = h, a.current = h.getContext("2d", { willReadFrequently: !0 }), c.current = !0, () => {
564
- c.current = !1, i.current = null, a.current = null;
1165
+ return k(() => {
1166
+ const f = document.createElement("canvas");
1167
+ return a.current = f, i.current = f.getContext("2d", { willReadFrequently: !0 }), h.current = !0, () => {
1168
+ h.current = !1, a.current = null, i.current = null;
565
1169
  };
566
- }, []), b(({ clock: h }) => {
567
- if (!t || !e || y.current || l.status === "error") return;
568
- const g = Number.isFinite(r) && r > 0 ? r : 5, d = h.elapsedTime * 1e3;
569
- if (d - s.current < 1e3 / g) return;
570
- const p = u.getInputFrame(), m = i.current, E = a.current;
571
- if (!p || !m || !E || !pe({ source: p, face: e, canvas: m, outputSize: { width: 112, height: 112 } })) return;
572
- s.current = d, y.current = !0, l.status === "idle" && f({ status: "loading", result: null, error: null });
573
- const Y = ge(E.getImageData(0, 0, 112, 112));
574
- Promise.all([import("onnxruntime-web/wasm"), Te(o)]).then(async ([D, M]) => {
575
- const $ = await M.run({
576
- [M.inputNames[0]]: new D.Tensor("float32", Y, [1, 3, 112, 112])
577
- }), Z = ye(
578
- $[M.outputNames[0]].data,
1170
+ }, []), D(({ clock: f }) => {
1171
+ if (!r || !e || u.current || d.status === "error") return;
1172
+ const S = Number.isFinite(t) && t > 0 ? t : 5, T = f.elapsedTime * 1e3;
1173
+ if (T - c.current < 1e3 / S) return;
1174
+ const y = o.getInputFrame(), l = a.current, p = i.current;
1175
+ if (!y || !l || !p || !wt({ source: y, face: e, canvas: l, outputSize: { width: 112, height: 112 } })) return;
1176
+ c.current = T, u.current = !0, d.status === "idle" && m({ status: "loading", result: null, error: null });
1177
+ const _ = Zt(p.getImageData(0, 0, 112, 112));
1178
+ Promise.all([import("onnxruntime-web/wasm"), tr(s)]).then(async ([x, N]) => {
1179
+ const F = await N.run({
1180
+ [N.inputNames[0]]: new x.Tensor("float32", _, [1, 3, 112, 112])
1181
+ }), C = $t(
1182
+ F[N.outputNames[0]].data,
579
1183
  n
580
1184
  );
581
- c.current && f({ status: "ready", result: Z, error: null });
582
- }).catch((D) => {
583
- c.current && f({
1185
+ h.current && m({ status: "ready", result: C, error: null });
1186
+ }).catch((x) => {
1187
+ h.current && m({
584
1188
  status: "error",
585
1189
  result: null,
586
- error: D instanceof Error ? D : new Error(String(D))
1190
+ error: x instanceof Error ? x : new Error(String(x))
587
1191
  });
588
1192
  }).finally(() => {
589
- y.current = !1;
1193
+ u.current = !1;
590
1194
  });
591
- }), l;
1195
+ }), d;
592
1196
  };
593
1197
  export {
594
- $e as BODY_TARGETS,
595
- Me as BodyTracker,
596
- me as DEFAULT_FACE_ACTION_OPTIONS,
597
- Ee as DEFAULT_FACE_ATTRIBUTE_EXPRESSION_MODEL_URL,
598
- it as DEFAULT_FACE_EXPRESSION_THRESHOLD,
599
- Ze as DEFAULT_TRACKING_ANCHOR,
600
- Ie as FACE_ACTION_NAMES,
601
- He as FACE_ATTRIBUTE_EXPRESSION_NAMES,
602
- Ce as FACE_BLENDSHAPE_NAMES,
603
- Ve as FACE_LANDMARK_INDICES,
604
- Je as FACE_TARGETS,
605
- We as FaceMesh,
606
- qe as FaceTracker,
607
- Fe as GestureTracker,
608
- je as GestureTrigger,
609
- Qe as HAND_TARGETS,
610
- Ne as HandTracker,
611
- X as SEGMENTATION_TYPES,
612
- Be as Segmentation,
613
- et as TrackingAnchor,
614
- pe as drawFaceCrop,
615
- H as getFaceActionValue,
616
- S as getFaceBlendshape,
617
- ct as getFaceEyeDistance,
618
- Ue as getStrongestFaceAction,
619
- tt as getTargetNamespace,
620
- Pe as hasFaceAction,
621
- at as hasFaceExpression,
622
- ze as useFaceAction,
623
- Ke as useFaceAttributeExpression,
624
- Oe as useFaceDetection,
625
- st as useFaceInfo,
626
- te as useFaceInfos,
627
- rt as useFaceResults
1198
+ Kt as BODY_CALIBRATION_LANDMARKS,
1199
+ Jr as BODY_TARGETS,
1200
+ gr as BodyTracker,
1201
+ ie as CALIBRATION_STORAGE_KEY,
1202
+ Se as CALIBRATION_VERSION,
1203
+ ye as DEFAULT_CALIBRATION,
1204
+ Dt as DEFAULT_FACE_ACTION_OPTIONS,
1205
+ Qt as DEFAULT_FACE_ATTRIBUTE_EXPRESSION_MODEL_URL,
1206
+ on as DEFAULT_FACE_EXPRESSION_THRESHOLD,
1207
+ nn as DEFAULT_GESTURE_DETECTOR_OPTIONS,
1208
+ vn as DEFAULT_GESTURE_SETTINGS,
1209
+ Br as DEFAULT_HOLISTIC_ANALYSIS_MAX_DIMENSION,
1210
+ Ur as DEFAULT_HOLISTIC_HOLD_MS,
1211
+ jr as DEFAULT_HOLISTIC_MODEL_URL,
1212
+ Gr as DEFAULT_HOLISTIC_PREDICT_MS,
1213
+ pe as DEFAULT_HOLISTIC_SIGNAL_THRESHOLDS,
1214
+ On as DEFAULT_HOLISTIC_TRACKER_SETTINGS,
1215
+ hn as DEFAULT_POLICY_NUM_FACES,
1216
+ Kn as DEFAULT_SEGMENTATION_OVERLAY_SETTINGS,
1217
+ fn as DEFAULT_SUBJECT_POLICY,
1218
+ $r as DEFAULT_TRACKING_ANCHOR,
1219
+ mn as EMPTY_SUBJECT_MEMORY,
1220
+ Er as FACE_ACTION_NAMES,
1221
+ Dr as FACE_ATTRIBUTE_EXPRESSION_NAMES,
1222
+ Rr as FACE_BLENDSHAPE_NAMES,
1223
+ Gt as FACE_CALIBRATION_LANDMARKS,
1224
+ Mr as FACE_LANDMARK_INDICES,
1225
+ Zr as FACE_TARGETS,
1226
+ Fr as FaceMesh,
1227
+ Pr as FaceTracker,
1228
+ Ve as GESTURES,
1229
+ xr as GESTURE_NAMES,
1230
+ Ln as GESTURE_SETTINGS_FIELDS,
1231
+ Or as GestureListener,
1232
+ pr as GestureTracker,
1233
+ yr as GestureTrigger,
1234
+ Qr as HAND_TARGETS,
1235
+ kn as HOLISTIC_HANDS_OPTIONS,
1236
+ _n as HOLISTIC_TRACKER_SETTINGS_FIELDS,
1237
+ mr as HandTracker,
1238
+ Te as HolisticTracker,
1239
+ Fn as IRIS_LANDMARKS,
1240
+ Pn as IRIS_LANDMARK_COUNT,
1241
+ Hn as PERSON_MASK_LABELS,
1242
+ ke as SEGMENTATION_TYPES,
1243
+ Vr as SEMANTIC_SEGMENTATION_PRESETS,
1244
+ Sr as Segmentation,
1245
+ bn as SegmentationOverlay,
1246
+ en as TrackingAnchor,
1247
+ pn as XR_MAX_SUBJECTS,
1248
+ jt as applyCalibrationToFeedPoint,
1249
+ gn as associateSubjects,
1250
+ Vt as clearCalibration,
1251
+ Kr as clearSemanticMask,
1252
+ Ft as createCalibration,
1253
+ Rt as createHolisticSignals,
1254
+ zr as createSemanticMask,
1255
+ vr as defineGesture,
1256
+ wt as drawFaceCrop,
1257
+ Wt as estimateBodyScale,
1258
+ zt as estimateFaceDistance,
1259
+ Tn as faceCandidates,
1260
+ V as getFaceActionValue,
1261
+ A as getFaceBlendshape,
1262
+ an as getFaceEyeDistance,
1263
+ Tr as getHolisticSignals,
1264
+ Ar as getStrongestFaceAction,
1265
+ tn as getTargetNamespace,
1266
+ br as hasFaceAction,
1267
+ cn as hasFaceExpression,
1268
+ Ne as isHandRaised,
1269
+ Lr as isIdentityCalibration,
1270
+ Ie as isPalmOpen,
1271
+ Sn as jointCandidates,
1272
+ Xt as loadCalibration,
1273
+ Je as measureBodyCalibration,
1274
+ qe as measureFaceCalibration,
1275
+ Wr as normalizedTrackerPointToTrackerPoint,
1276
+ wn as patchGestureSettings,
1277
+ Dn as patchHolisticTrackerSettings,
1278
+ zn as patchSegmentationOverlaySettings,
1279
+ Bt as resetCalibration,
1280
+ Ut as resolveCalibrationMirror,
1281
+ Nt as resolveGestureDefinition,
1282
+ _e as resolveGestureDetectorOptions,
1283
+ In as resolveGestureSettings,
1284
+ Nn as resolveHolisticTrackerSettings,
1285
+ Wn as resolveSegmentationOverlaySettings,
1286
+ Yt as saveCalibration,
1287
+ yn as selectSubject,
1288
+ Cn as toHolisticTrackerProps,
1289
+ Xr as trackerPointToNormalizedTrackerPoint,
1290
+ oe as updateCalibration,
1291
+ wr as useFaceAction,
1292
+ Ir as useFaceAttributeExpression,
1293
+ _r as useFaceDetection,
1294
+ Rn as useFaceInfo,
1295
+ pt as useFaceInfos,
1296
+ ln as useFaceResults,
1297
+ Mt as useGesture,
1298
+ Bn as useHairMask,
1299
+ bt as useHolisticTracking,
1300
+ An as useIrisTracking,
1301
+ Un as usePersonMask,
1302
+ jn as useSemanticSegmentationMask,
1303
+ kr as useXRCalibration
628
1304
  };