@vincentt-xr/sdk 2.0.0-alpha.0 → 2.0.0-alpha.10

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 (879) hide show
  1. package/GROUNDING.md +8193 -111
  2. package/README.md +86 -52
  3. package/dist/CanonicalHeadFrame-D_0OzdB9.cjs +1 -0
  4. package/dist/CanonicalHeadFrame-DdUqF6Fv.js +1506 -0
  5. package/dist/DebuggerUI-CVuV-VJ5.cjs +1 -0
  6. package/dist/DebuggerUI-D-rcPa54.js +275 -0
  7. package/dist/FaceRetouch-C1AxBNex.js +1071 -0
  8. package/dist/FaceRetouch-D7kryDE6.cjs +134 -0
  9. package/dist/FaceSurface-CHAMEeG1.cjs +1 -0
  10. package/dist/FaceSurface-DmP9AEeC.js +27 -0
  11. package/dist/SkeletonUtils-C2r90MtN.js +21 -0
  12. package/dist/SkeletonUtils-CddIup1F.cjs +1 -0
  13. package/dist/TextLabel-XE0rQSDn.cjs +2 -0
  14. package/dist/TextLabel-c9BCucOI.js +961 -0
  15. package/dist/assets/cache.d.ts +99 -0
  16. package/dist/assets/estimate.d.ts +11 -0
  17. package/dist/assets/gltfLoader.d.ts +16 -0
  18. package/dist/assets/index.d.ts +7 -0
  19. package/dist/assets/loaders.d.ts +43 -0
  20. package/dist/assets/react.d.ts +33 -0
  21. package/dist/assets/sdkModels.d.ts +22 -0
  22. package/dist/audio/AudioEngine.d.ts +3 -1
  23. package/dist/audio/AudioPlayer.d.ts +29 -0
  24. package/dist/audio/AudioPlayerLogic.d.ts +4 -0
  25. package/dist/audio/index.d.ts +2 -0
  26. package/dist/body/__fixtures__/syntheticRig.d.ts +21 -0
  27. package/dist/body/bodyFlipGuard.d.ts +39 -0
  28. package/dist/body/bodyIdentity.d.ts +72 -0
  29. package/dist/body/bodyMask.d.ts +79 -0
  30. package/dist/body/bodyMaskMaterial.d.ts +15 -0
  31. package/dist/body/bodyPose.d.ts +58 -0
  32. package/dist/body/bodyRigFit.d.ts +148 -0
  33. package/dist/body/bodyRigSolver.d.ts +114 -0
  34. package/dist/body/bodySubject.d.ts +46 -0
  35. package/dist/body-pose/index.d.ts +521 -0
  36. package/dist/body-trigger/__fixtures__/syntheticBody.d.ts +83 -0
  37. package/dist/body-trigger/frame.d.ts +88 -0
  38. package/dist/body-trigger/index.d.ts +6 -0
  39. package/dist/body-trigger/moves.d.ts +235 -0
  40. package/dist/body-trigger/trigger.d.ts +75 -0
  41. package/dist/bodyMaskMaterial-CBWub5t_.cjs +68 -0
  42. package/dist/bodyMaskMaterial-Cs2awskk.js +207 -0
  43. package/dist/cache-2x3CUJuY.js +212 -0
  44. package/dist/cache-DL1Dbz6k.cjs +1 -0
  45. package/dist/calibration/calibration.d.ts +75 -0
  46. package/dist/calibration/index.d.ts +6 -0
  47. package/dist/calibration/storage.d.ts +13 -0
  48. package/dist/calibration/types.d.ts +53 -0
  49. package/dist/calibration/useXRCalibration.d.ts +46 -0
  50. package/dist/camera/CameraPermissionGate.d.ts +26 -0
  51. package/dist/camera/devices.d.ts +26 -0
  52. package/dist/camera/index.d.ts +8 -0
  53. package/dist/camera/permission.d.ts +86 -0
  54. package/dist/camera/useCameraPermission.d.ts +35 -0
  55. package/dist/canonicalFace-BHwyCx1c.js +9 -0
  56. package/dist/canonicalFace-C83I225R.cjs +1 -0
  57. package/dist/capabilities/detect.d.ts +45 -0
  58. package/dist/capabilities/index.d.ts +5 -0
  59. package/dist/capabilities/types.d.ts +120 -0
  60. package/dist/capabilities/useXRCapabilities.d.ts +18 -0
  61. package/dist/compat/environment.d.ts +5 -0
  62. package/dist/compat/index.d.ts +4 -0
  63. package/dist/compat/run.d.ts +18 -0
  64. package/dist/compat/scenarios.d.ts +10 -0
  65. package/dist/compat/types.d.ts +101 -0
  66. package/dist/components/Axes/index.d.ts +6 -0
  67. package/dist/components/BodyInstruction/BodyPoseHint.d.ts +63 -0
  68. package/dist/components/BodyInstruction/index.d.ts +76 -0
  69. package/dist/components/BodyInstruction/useBodyPose.d.ts +30 -0
  70. package/dist/components/BodyRig/BodyAttachment.d.ts +28 -0
  71. package/dist/components/BodyRig/BodyOccluder.d.ts +27 -0
  72. package/dist/components/BodyRig/bodyDepth.d.ts +57 -0
  73. package/dist/components/BodyRig/index.d.ts +129 -0
  74. package/dist/components/BodyRig/useBodyDepthTexture.d.ts +40 -0
  75. package/dist/components/BodyTracker/index.d.ts +26 -1
  76. package/dist/components/BodyTrigger/index.d.ts +56 -0
  77. package/dist/components/Debugger/DebuggerProvider.d.ts +14 -1
  78. package/dist/components/Debugger/DebuggerUI.d.ts +3 -1
  79. package/dist/components/FaceAtlas/FaceAtlasLayer.d.ts +114 -0
  80. package/dist/components/FaceAtlas/MadeUpCamera.d.ts +80 -0
  81. package/dist/components/FaceAtlas/constants.d.ts +8 -0
  82. package/dist/components/FaceAtlas/index.d.ts +7 -0
  83. package/dist/components/FaceAtlas/useFaceAtlasSurface.d.ts +84 -0
  84. package/dist/components/FaceAtlas/useFaceSkin.d.ts +84 -0
  85. package/dist/components/FaceCharacter/ExternalFaceMesh.d.ts +109 -0
  86. package/dist/components/FaceCharacter/FaceExpressionController.d.ts +53 -0
  87. package/dist/components/FaceCharacter/FaceMorph.d.ts +71 -0
  88. package/dist/components/FaceCharacter/FacePiercing.d.ts +65 -0
  89. package/dist/components/FaceCharacter/FaceReprojection.d.ts +85 -0
  90. package/dist/components/FaceCharacter/FaceRig.d.ts +38 -0
  91. package/dist/components/FaceCharacter/FaceSurface.d.ts +49 -0
  92. package/dist/components/FaceCharacter/FaceSurfaceOccluder.d.ts +39 -0
  93. package/dist/components/FaceCharacter/PinToFaceMesh.d.ts +68 -0
  94. package/dist/components/FaceCharacter/index.d.ts +18 -0
  95. package/dist/components/FaceCharacter/useFaceReprojector.d.ts +10 -0
  96. package/dist/components/FaceInset/FaceInset.d.ts +68 -0
  97. package/dist/components/FaceInset/frame.d.ts +94 -0
  98. package/dist/components/FaceInset/index.d.ts +6 -0
  99. package/dist/components/FaceInset/material.d.ts +40 -0
  100. package/dist/components/FaceInset/useFaceInsetTexture.d.ts +37 -0
  101. package/dist/components/FaceInstruction/FaceExpressionHint.d.ts +43 -0
  102. package/dist/components/FaceInstruction/index.d.ts +56 -0
  103. package/dist/components/FaceInstruction/useFaceExpression.d.ts +20 -0
  104. package/dist/components/FaceLiquify/FaceLiquify.d.ts +49 -0
  105. package/dist/components/FaceLiquify/debug.d.ts +37 -0
  106. package/dist/components/FaceLiquify/frame.d.ts +55 -0
  107. package/dist/components/FaceLiquify/index.d.ts +10 -0
  108. package/dist/components/FaceLiquify/material.d.ts +39 -0
  109. package/dist/components/FaceLiquify/pass.d.ts +49 -0
  110. package/dist/components/FaceLiquify/presence.d.ts +25 -0
  111. package/dist/components/FaceLiquify/presets.d.ts +82 -0
  112. package/dist/components/FaceLiquify/selfTest.d.ts +66 -0
  113. package/dist/components/FaceLiquify/target.d.ts +85 -0
  114. package/dist/components/FaceLiquify/warp.d.ts +72 -0
  115. package/dist/components/FaceMesh/FaceMeshRenderer.d.ts +25 -0
  116. package/dist/components/FaceMesh/canonical/CanonicalFaceMeshRenderer.d.ts +70 -1
  117. package/dist/components/FaceMesh/canonical/FaceMeshMaterial.d.ts +25 -0
  118. package/dist/components/FaceMesh/canonical/assets.d.ts +3 -0
  119. package/dist/components/FaceMesh/canonical/geometryGroups.d.ts +30 -0
  120. package/dist/components/FaceMesh/canonical/parseCanonicalFaceModel.d.ts +24 -0
  121. package/dist/components/FaceMesh/canonical/shaders.d.ts +2 -0
  122. package/dist/components/FaceMesh/deform.d.ts +3 -0
  123. package/dist/components/FaceMesh/index.d.ts +6 -1
  124. package/dist/components/FaceMesh/material/defaults.d.ts +74 -0
  125. package/dist/components/FaceMesh/material/index.d.ts +1 -0
  126. package/dist/components/FaceMesh/material/options.d.ts +5 -1
  127. package/dist/components/FaceMesh/material/support.d.ts +7 -2
  128. package/dist/components/FaceMesh/material/textures.d.ts +4 -0
  129. package/dist/components/FaceMesh/material/types.d.ts +4 -2
  130. package/dist/components/FaceRetouch/Background.d.ts +11 -5
  131. package/dist/components/FaceRetouch/FaceRetouch.d.ts +52 -0
  132. package/dist/components/FaceRetouch/index.d.ts +2 -6
  133. package/dist/components/FaceRetouch/landmarkMask.d.ts +4 -6
  134. package/dist/components/FaceRetouch/renderState.d.ts +19 -0
  135. package/dist/components/FaceRetouch/useFaceRetouchMask.d.ts +4 -7
  136. package/dist/components/FaceSwap/FaceMirror.d.ts +46 -0
  137. package/dist/components/FaceSwap/FaceSwap.d.ts +58 -0
  138. package/dist/components/FaceSwap/FaceTextureLayer.d.ts +72 -0
  139. package/dist/components/FaceSwap/faceSwapPlan.d.ts +91 -0
  140. package/dist/components/FaceSwap/index.d.ts +13 -0
  141. package/dist/components/FaceSwap/settings.d.ts +300 -0
  142. package/dist/components/FaceSwap/useFaceTexture.d.ts +35 -0
  143. package/dist/components/FaceSwap/useLiveFace.d.ts +38 -0
  144. package/dist/components/FaceSwap/useLiveFaceTexture.d.ts +31 -0
  145. package/dist/components/FaceTracker/index.d.ts +5 -3
  146. package/dist/components/FaceWarp3D/FaceWarp3D.d.ts +50 -0
  147. package/dist/components/FaceWarp3D/index.d.ts +2 -0
  148. package/dist/components/Faceless/Faceless.d.ts +51 -0
  149. package/dist/components/Faceless/index.d.ts +2 -0
  150. package/dist/components/GestureListener/index.d.ts +11 -0
  151. package/dist/components/HairLock/HairLock.d.ts +39 -0
  152. package/dist/components/HairLock/index.d.ts +2 -0
  153. package/dist/components/HairLock/lockGeometry.d.ts +15 -0
  154. package/dist/components/HandCutout/index.d.ts +35 -0
  155. package/dist/components/HandEffect/index.d.ts +36 -0
  156. package/dist/components/HandInstruction/HandGestureHint.d.ts +70 -0
  157. package/dist/components/HandInstruction/index.d.ts +74 -0
  158. package/dist/components/HandInstruction/useHandGesture.d.ts +22 -0
  159. package/dist/components/HandJoints2D/index.d.ts +6 -0
  160. package/dist/components/HandRig/ForearmOccluder.d.ts +29 -0
  161. package/dist/components/HandRig/HandAttachment.d.ts +34 -0
  162. package/dist/components/HandRig/HandNails.d.ts +61 -0
  163. package/dist/components/HandRig/HandOccluder.d.ts +45 -0
  164. package/dist/components/HandRig/HandTattoo.d.ts +61 -0
  165. package/dist/components/HandRig/WristAttachment.d.ts +34 -0
  166. package/dist/components/HandRig/index.d.ts +127 -0
  167. package/dist/components/HandRig/useArmMask.d.ts +29 -0
  168. package/dist/components/HandRig/wristSolve.d.ts +96 -0
  169. package/dist/components/HandTouch/HandTouch.d.ts +62 -0
  170. package/dist/components/HandTouch/Touchable.d.ts +36 -0
  171. package/dist/components/HandTouch/index.d.ts +2 -0
  172. package/dist/components/HandTracker/index.d.ts +12 -2
  173. package/dist/components/HandTracking2D/HandVisual.d.ts +12 -0
  174. package/dist/components/HandTracking2D/index.d.ts +5 -0
  175. package/dist/components/HandTracking2DController/index.d.ts +5 -0
  176. package/dist/components/HandTracking3D/index.d.ts +6 -0
  177. package/dist/components/HeadBinding/index.d.ts +14 -0
  178. package/dist/components/HeadOccluder/CanonicalHeadFrame.d.ts +22 -0
  179. package/dist/components/HeadOccluder/Earrings.d.ts +55 -0
  180. package/dist/components/HeadOccluder/HeadAttachment.d.ts +38 -0
  181. package/dist/components/HeadOccluder/NeckOccluder.d.ts +67 -0
  182. package/dist/components/HeadOccluder/earringPlacement.d.ts +31 -0
  183. package/dist/components/HeadOccluder/headAttachmentPoints.d.ts +69 -0
  184. package/dist/components/HeadOccluder/index.d.ts +57 -3
  185. package/dist/components/HeadOccluder/useCanonicalHeadFit.d.ts +36 -0
  186. package/dist/components/HeadOccluder/useLandmarkPoseFit.d.ts +80 -0
  187. package/dist/components/HolisticTracker/index.d.ts +69 -0
  188. package/dist/components/HolisticTracker/settings.d.ts +58 -0
  189. package/dist/components/HolisticTracker/signals.d.ts +49 -0
  190. package/dist/components/Instruction/HintStage.d.ts +29 -0
  191. package/dist/components/Instruction/InstructionCue.d.ts +126 -0
  192. package/dist/components/Instruction/gestureHold.d.ts +20 -0
  193. package/dist/components/Instruction/ghost.d.ts +129 -0
  194. package/dist/components/Instruction/hintBlend.d.ts +19 -0
  195. package/dist/components/Instruction/hintLook.d.ts +81 -0
  196. package/dist/components/Instruction/hintLoop.d.ts +36 -0
  197. package/dist/components/Instruction/index.d.ts +41 -0
  198. package/dist/components/Instruction/useGhostModel.d.ts +33 -0
  199. package/dist/components/Instruction/useInstructionHold.d.ts +72 -0
  200. package/dist/components/IrisEffect/IrisMaterial.d.ts +73 -0
  201. package/dist/components/IrisEffect/index.d.ts +51 -0
  202. package/dist/components/IrisEffect/settings.d.ts +117 -0
  203. package/dist/components/LightObject/index.d.ts +20 -0
  204. package/dist/components/LipEffect/LipEffect.d.ts +28 -0
  205. package/dist/components/LipEffect/LipEffectMaterial.d.ts +98 -0
  206. package/dist/components/LipEffect/LipEffects.d.ts +12 -0
  207. package/dist/components/LipEffect/defaults.d.ts +51 -0
  208. package/dist/components/LipEffect/index.d.ts +12 -0
  209. package/dist/components/LipEffect/lipShading.d.ts +73 -0
  210. package/dist/components/LipEffect/settings.d.ts +375 -0
  211. package/dist/components/LipEffect/shader.d.ts +39 -0
  212. package/dist/components/LipEffect/types.d.ts +141 -0
  213. package/dist/components/LipEffect/useLipDesignTextures.d.ts +17 -0
  214. package/dist/components/LipEffect/uvGuide.d.ts +74 -0
  215. package/dist/components/LookAt/index.d.ts +23 -0
  216. package/dist/components/Makeup/Blush.d.ts +18 -0
  217. package/dist/components/Makeup/Brows.d.ts +20 -0
  218. package/dist/components/Makeup/Contour.d.ts +17 -0
  219. package/dist/components/Makeup/Eyeliner.d.ts +20 -0
  220. package/dist/components/Makeup/Eyeshadow.d.ts +20 -0
  221. package/dist/components/Makeup/Highlighter.d.ts +18 -0
  222. package/dist/components/Makeup/MakeupDesign.d.ts +37 -0
  223. package/dist/components/Makeup/MakeupRegion.d.ts +132 -0
  224. package/dist/components/Makeup/constants.d.ts +44 -0
  225. package/dist/components/Makeup/design.d.ts +106 -0
  226. package/dist/components/Makeup/designSamples.d.ts +42 -0
  227. package/dist/components/Makeup/eyes.d.ts +114 -0
  228. package/dist/components/Makeup/fields.d.ts +10 -0
  229. package/dist/components/Makeup/geometry.d.ts +106 -0
  230. package/dist/components/Makeup/index.d.ts +26 -0
  231. package/dist/components/Makeup/looks.d.ts +28 -0
  232. package/dist/components/Makeup/material.d.ts +239 -0
  233. package/dist/components/Makeup/settings.d.ts +54 -0
  234. package/dist/components/Makeup/shades.d.ts +143 -0
  235. package/dist/components/Makeup/shapes.d.ts +27 -0
  236. package/dist/components/Makeup/skinTone.d.ts +135 -0
  237. package/dist/components/Makeup/types.d.ts +110 -0
  238. package/dist/components/Makeup/useMakeupSkinTone.d.ts +40 -0
  239. package/dist/components/MeshRenderer/index.d.ts +59 -0
  240. package/dist/components/Necklace/Necklace.d.ts +44 -0
  241. package/dist/components/Necklace/index.d.ts +1 -0
  242. package/dist/components/ParticleEmitter/ParticleEmitter.d.ts +69 -0
  243. package/dist/components/ParticleEmitter/index.d.ts +1 -0
  244. package/dist/components/PersonCutout/index.d.ts +46 -0
  245. package/dist/components/PersonCutout/personCutout.d.ts +16 -0
  246. package/dist/components/PersonCutout/personMask.d.ts +19 -0
  247. package/dist/components/PersonCutout/useBodyMaskTexture.d.ts +35 -0
  248. package/dist/components/PerspectiveCamera/index.d.ts +2 -8
  249. package/dist/components/PinToMesh/index.d.ts +47 -0
  250. package/dist/components/RenderGroupLayer/index.d.ts +6 -0
  251. package/dist/components/SceneObjectRenderer/index.d.ts +23 -0
  252. package/dist/components/Screen2D/ScreenTransformFrame.d.ts +11 -0
  253. package/dist/components/Screen2D/ScreenTransformHelpers.d.ts +19 -0
  254. package/dist/components/Screen2D/ScreenTransformInteraction.d.ts +18 -0
  255. package/dist/components/Screen2D/index.d.ts +5 -0
  256. package/dist/components/ScreenGlass/defaults.d.ts +3 -0
  257. package/dist/components/ScreenGlass/index.d.ts +5 -0
  258. package/dist/components/ScreenGlass/shaders.d.ts +2 -0
  259. package/dist/components/ScreenGlass/types.d.ts +10 -0
  260. package/dist/components/ScreenGradient/defaults.d.ts +5 -0
  261. package/dist/components/ScreenGradient/index.d.ts +5 -0
  262. package/dist/components/ScreenGradient/shaders.d.ts +2 -0
  263. package/dist/components/ScreenGradient/types.d.ts +19 -0
  264. package/dist/components/ScreenImage/ScreenImage.d.ts +4 -0
  265. package/dist/components/ScreenImage/components/DynamicTextureSync.d.ts +9 -0
  266. package/dist/components/ScreenImage/components/ScreenImageBody.d.ts +9 -0
  267. package/dist/components/ScreenImage/components/ScreenImageFrame.d.ts +9 -0
  268. package/dist/components/ScreenImage/components/ScreenImageTransformFrame.d.ts +9 -0
  269. package/dist/components/ScreenImage/fit.d.ts +52 -0
  270. package/dist/components/ScreenImage/index.d.ts +10 -0
  271. package/dist/components/ScreenImage/materials/ScreenImageBlendMaterial.d.ts +9 -0
  272. package/dist/components/ScreenImage/materials/ScreenImageMaskMaterial.d.ts +11 -0
  273. package/dist/components/ScreenImage/materials/ScreenImageMatcap.d.ts +3 -0
  274. package/dist/components/ScreenImage/source.d.ts +25 -0
  275. package/dist/components/ScreenImage/types.d.ts +64 -0
  276. package/dist/components/ScreenImage/utils/ScreenImageConstants.d.ts +9 -0
  277. package/dist/components/ScreenImage/utils/ScreenImageHelpers.d.ts +4 -0
  278. package/dist/components/ScreenShape/geometry.d.ts +5 -0
  279. package/dist/components/ScreenShape/index.d.ts +5 -0
  280. package/dist/components/ScreenShape/types.d.ts +54 -0
  281. package/dist/components/ScreenSpaceUI/ScreenTransformGuide.d.ts +15 -0
  282. package/dist/components/ScreenSpaceUI/ScreenTransformOverlayGuide.d.ts +9 -0
  283. package/dist/components/ScreenSpaceUI/index.d.ts +3 -0
  284. package/dist/components/ScreenText/components/ScreenTextBody.d.ts +2 -0
  285. package/dist/components/ScreenText/components/ScreenTextTransformFrame.d.ts +9 -0
  286. package/dist/components/ScreenText/constants.d.ts +5 -0
  287. package/dist/components/ScreenText/index.d.ts +6 -0
  288. package/dist/components/ScreenText/types.d.ts +31 -0
  289. package/dist/components/ScreenText/utils/ScreenTextHelpers.d.ts +14 -0
  290. package/dist/components/ScreenText/utils/ScreenTextMappings.d.ts +17 -0
  291. package/dist/components/SegmentationOverlay/SegmentationOverlay.d.ts +37 -0
  292. package/dist/components/SegmentationOverlay/SegmentationOverlayMaterial.d.ts +31 -0
  293. package/dist/components/SegmentationOverlay/index.d.ts +9 -0
  294. package/dist/components/SegmentationOverlay/maskTexture.d.ts +23 -0
  295. package/dist/components/SegmentationOverlay/providers.d.ts +72 -0
  296. package/dist/components/SegmentationOverlay/settings.d.ts +65 -0
  297. package/dist/components/SequentialRenderPasses/index.d.ts +6 -0
  298. package/dist/components/ShoulderOccluder/index.d.ts +46 -0
  299. package/dist/components/ShoulderOccluder/useCanonicalTorsoFit.d.ts +27 -0
  300. package/dist/components/SpringSwing/SpringSwing.d.ts +22 -0
  301. package/dist/components/SpringSwing/index.d.ts +1 -0
  302. package/dist/components/TextLabel/TextLabel.d.ts +5 -0
  303. package/dist/components/TextLabel/alignment.d.ts +4 -0
  304. package/dist/components/TextLabel/bend.d.ts +9 -0
  305. package/dist/components/TextLabel/canvas/buildTextLabelTexture.d.ts +4 -0
  306. package/dist/components/TextLabel/canvas/canvasTypography.d.ts +13 -0
  307. package/dist/components/TextLabel/canvas/drawBackground.d.ts +21 -0
  308. package/dist/components/TextLabel/canvas/drawEffects.d.ts +34 -0
  309. package/dist/components/TextLabel/canvas/drawText.d.ts +19 -0
  310. package/dist/components/TextLabel/components/TextLabelMesh.d.ts +13 -0
  311. package/dist/components/TextLabel/constants.d.ts +2 -0
  312. package/dist/components/TextLabel/hooks/useTextLabelTexture.d.ts +7 -0
  313. package/dist/components/TextLabel/index.d.ts +2 -62
  314. package/dist/components/TextLabel/layout/measurement.d.ts +8 -0
  315. package/dist/components/TextLabel/layout/resolveTextLayout.d.ts +25 -0
  316. package/dist/components/TextLabel/layout/wrapText.d.ts +6 -0
  317. package/dist/components/TextLabel/types.d.ts +337 -0
  318. package/dist/components/TrackingAnchor/index.d.ts +18 -2
  319. package/dist/components/Transform3D/index.d.ts +30 -0
  320. package/dist/components/XRMediaSurface/index.d.ts +8 -7
  321. package/dist/components/XRProvider/index.d.ts +16 -2
  322. package/dist/components/XRScene/index.d.ts +14 -3
  323. package/dist/components/XRScene/renderOutputTarget.d.ts +12 -0
  324. package/dist/components/XRViewport/XRViewport.d.ts +11 -0
  325. package/dist/components/XRViewport/components/HiddenMedia.d.ts +7 -0
  326. package/dist/components/XRViewport/components/MediaAssetPicker.d.ts +8 -0
  327. package/dist/components/XRViewport/components/MediaControlStack.d.ts +13 -0
  328. package/dist/components/XRViewport/components/XRViewportLayers.d.ts +30 -0
  329. package/dist/components/XRViewport/constants.d.ts +24 -0
  330. package/dist/components/XRViewport/contexts.d.ts +6 -0
  331. package/dist/components/XRViewport/hooks/useViewportExternalFaces.d.ts +13 -0
  332. package/dist/components/XRViewport/hooks/useViewportMediaSource.d.ts +16 -0
  333. package/dist/components/XRViewport/hooks/useViewportMediaTexture.d.ts +10 -0
  334. package/dist/components/XRViewport/hooks/useViewportPipeline.d.ts +41 -0
  335. package/dist/components/XRViewport/hooks/useViewportRenderState.d.ts +47 -0
  336. package/dist/components/XRViewport/index.d.ts +3 -101
  337. package/dist/components/XRViewport/layout.d.ts +16 -0
  338. package/dist/components/XRViewport/slots.d.ts +16 -0
  339. package/dist/components/XRViewport/types.d.ts +89 -0
  340. package/dist/components/XRViewport/useViewportSize.d.ts +3 -0
  341. package/dist/components/index.d.ts +31 -0
  342. package/dist/components/occluder/skinnedOccluder.d.ts +39 -0
  343. package/dist/config/index.d.ts +1 -1
  344. package/dist/constants/index.d.ts +4 -1
  345. package/dist/context-DTxSQvp4.js +13 -0
  346. package/dist/context-hA0Rb2Xa.cjs +1 -0
  347. package/dist/contexts-DQc7zyqT.cjs +1 -0
  348. package/dist/contexts-Y_FhdnIv.js +667 -0
  349. package/dist/coordinates/feed.d.ts +52 -0
  350. package/dist/coordinates/index.d.ts +7 -0
  351. package/dist/coordinates/side.d.ts +40 -0
  352. package/dist/coordinates/spaces.d.ts +49 -0
  353. package/dist/coordinates/viewport.d.ts +22 -0
  354. package/dist/coordinates/world.d.ts +15 -0
  355. package/dist/debug-ui/component-editor/index.d.ts +19 -0
  356. package/dist/debug-ui/default-setting/index.d.ts +37 -0
  357. package/dist/debug-ui/default-setting.cjs +21 -0
  358. package/dist/debug-ui/default-setting.js +777 -0
  359. package/dist/debug-ui/face-mesh-renderer-settings/index.d.ts +8 -0
  360. package/dist/debug-ui/face-retouch/index.d.ts +11 -0
  361. package/dist/debug-ui/face-swap-settings/index.d.ts +22 -0
  362. package/dist/debug-ui/gesture-settings/index.d.ts +14 -0
  363. package/dist/debug-ui/hand-joints-2d/index.d.ts +6 -0
  364. package/dist/debug-ui/hand-tracking-2d/index.d.ts +6 -0
  365. package/dist/debug-ui/hand-tracking-2d-controller/index.d.ts +6 -0
  366. package/dist/debug-ui/hand-tracking-3d/index.d.ts +6 -0
  367. package/dist/debug-ui/hierarchy-panel/index.d.ts +30 -0
  368. package/dist/debug-ui/holistic-tracker-settings/index.d.ts +16 -0
  369. package/dist/debug-ui/index.d.ts +61 -0
  370. package/dist/debug-ui/iris-effect-settings/index.d.ts +12 -0
  371. package/dist/debug-ui/layer-panel/index.d.ts +18 -0
  372. package/dist/debug-ui/lip-effect-settings/index.d.ts +15 -0
  373. package/dist/debug-ui/media-source/MediaSourceSwitcher.d.ts +10 -0
  374. package/dist/debug-ui/media-source/index.d.ts +6 -0
  375. package/dist/debug-ui/media-source/media-preset.d.ts +21 -0
  376. package/dist/debug-ui/media-source/session.d.ts +40 -0
  377. package/dist/debug-ui/media-source.cjs +1 -0
  378. package/dist/debug-ui/media-source.js +11 -0
  379. package/dist/debug-ui/mesh-renderer-settings/index.d.ts +6 -0
  380. package/dist/debug-ui/object-inspector-panel/index.d.ts +26 -0
  381. package/dist/debug-ui/pin-to-mesh-settings/index.d.ts +10 -0
  382. package/dist/debug-ui/product-hotspots/index.d.ts +25 -0
  383. package/dist/debug-ui/scene-editor/context.d.ts +38 -0
  384. package/dist/debug-ui/scene-editor/hierarchy-panel.d.ts +11 -0
  385. package/dist/debug-ui/scene-editor/index.d.ts +11 -0
  386. package/dist/debug-ui/scene-editor/inspector-panel.d.ts +9 -0
  387. package/dist/debug-ui/scene-editor/store-utils.d.ts +2 -0
  388. package/dist/debug-ui/scene-editor/viewport-toolbar.d.ts +4 -0
  389. package/dist/debug-ui/scene-editor/viewport.d.ts +21 -0
  390. package/dist/debug-ui/screen-glass-settings/index.d.ts +6 -0
  391. package/dist/debug-ui/screen-gradient-settings/GradientStopsEditor.d.ts +5 -0
  392. package/dist/debug-ui/screen-gradient-settings/index.d.ts +6 -0
  393. package/dist/debug-ui/screen-gradient-settings/styles.d.ts +3 -0
  394. package/dist/debug-ui/screen-image-settings/index.d.ts +11 -0
  395. package/dist/debug-ui/screen-shape-settings/index.d.ts +6 -0
  396. package/dist/debug-ui/screen-text-settings/NumberField.d.ts +9 -0
  397. package/dist/debug-ui/screen-text-settings/ScreenTextSettingsPanel.d.ts +3 -0
  398. package/dist/debug-ui/screen-text-settings/controls/NestedSection.d.ts +7 -0
  399. package/dist/debug-ui/screen-text-settings/controls/Section.d.ts +8 -0
  400. package/dist/debug-ui/screen-text-settings/controls/icons.d.ts +4 -0
  401. package/dist/debug-ui/screen-text-settings/index.d.ts +2 -0
  402. package/dist/debug-ui/screen-text-settings/sections/BackgroundSection.d.ts +8 -0
  403. package/dist/debug-ui/screen-text-settings/sections/ContentSection.d.ts +5 -0
  404. package/dist/debug-ui/screen-text-settings/sections/EffectsSection.d.ts +25 -0
  405. package/dist/debug-ui/screen-text-settings/sections/StyleSection.d.ts +5 -0
  406. package/dist/debug-ui/screen-text-settings/sections/TransformSection.d.ts +5 -0
  407. package/dist/debug-ui/screen-text-settings/sections/background/BackgroundFillControls.d.ts +2 -0
  408. package/dist/debug-ui/screen-text-settings/sections/background/BackgroundSizeControls.d.ts +2 -0
  409. package/dist/debug-ui/screen-text-settings/sections/background/BackgroundStrokeControls.d.ts +2 -0
  410. package/dist/debug-ui/screen-text-settings/sections/background/types.d.ts +7 -0
  411. package/dist/debug-ui/screen-text-settings/sections/effects/BendEffectSection.d.ts +4 -0
  412. package/dist/debug-ui/screen-text-settings/sections/effects/EffectChrome.d.ts +21 -0
  413. package/dist/debug-ui/screen-text-settings/sections/effects/GlowEffectSection.d.ts +4 -0
  414. package/dist/debug-ui/screen-text-settings/sections/effects/InnerShadowEffectSection.d.ts +4 -0
  415. package/dist/debug-ui/screen-text-settings/sections/effects/OutlineEffectSection.d.ts +4 -0
  416. package/dist/debug-ui/screen-text-settings/sections/effects/ShadowEffectSection.d.ts +4 -0
  417. package/dist/debug-ui/screen-text-settings/sections/effects/types.d.ts +14 -0
  418. package/dist/debug-ui/screen-text-settings/settings.d.ts +90 -0
  419. package/dist/debug-ui/screen-text-settings/styles.d.ts +26 -0
  420. package/dist/debug-ui/screen-text-settings/transform.d.ts +6 -0
  421. package/dist/debug-ui/screen-text-settings/types.d.ts +11 -0
  422. package/dist/debug-ui/segmentation-overlay-settings/index.d.ts +12 -0
  423. package/dist/debug-ui/settings-panel/index.d.ts +43 -0
  424. package/dist/debug-ui/shared/MaterialSection.d.ts +13 -0
  425. package/dist/debug-ui/shared/ScreenTransformSection.d.ts +32 -0
  426. package/dist/debug-ui/shared/debugWindow.d.ts +51 -0
  427. package/dist/debug-ui/transform-3d-settings/index.d.ts +11 -0
  428. package/dist/debug-ui/xr-diagnostics/index.d.ts +26 -0
  429. package/dist/debug-ui.cjs +10 -0
  430. package/dist/debug-ui.js +9051 -0
  431. package/dist/detector-K8aej4MB.js +59 -0
  432. package/dist/detector-ijypGtse.cjs +1 -0
  433. package/dist/drawNormalizedCrop-C4KFaRne.cjs +1 -0
  434. package/dist/drawNormalizedCrop-DG3gtJxf.js +135 -0
  435. package/dist/entries/all.d.ts +4 -1
  436. package/dist/entries/core.d.ts +76 -6
  437. package/dist/entries/face-effects.d.ts +130 -10
  438. package/dist/entries/instructions.d.ts +48 -0
  439. package/dist/entries/internal.d.ts +5 -2
  440. package/dist/entries/low-level.d.ts +104 -6
  441. package/dist/entries/particles.d.ts +15 -0
  442. package/dist/entries/product.d.ts +11 -0
  443. package/dist/entries/scene-object.d.ts +10 -0
  444. package/dist/entries/tracking.d.ts +110 -2
  445. package/dist/face-action/index.d.ts +34 -0
  446. package/dist/face-atlas/attributes.d.ts +30 -0
  447. package/dist/face-atlas/eyes.d.ts +272 -0
  448. package/dist/face-atlas/faceAtlas.generated.d.ts +46 -0
  449. package/dist/face-atlas/glsl/atlasVertex.d.ts +46 -0
  450. package/dist/face-atlas/glsl/common.d.ts +55 -0
  451. package/dist/face-atlas/glsl/design.d.ts +49 -0
  452. package/dist/face-atlas/glsl/eyes.d.ts +73 -0
  453. package/dist/face-atlas/glsl/finish.d.ts +24 -0
  454. package/dist/face-atlas/glsl/format.d.ts +4 -0
  455. package/dist/face-atlas/glsl/index.d.ts +59 -0
  456. package/dist/face-atlas/glsl/shading.d.ts +15 -0
  457. package/dist/face-atlas/glsl/shapes.d.ts +66 -0
  458. package/dist/face-atlas/glsl/sparkle.d.ts +19 -0
  459. package/dist/face-atlas/glsl/uniforms.d.ts +106 -0
  460. package/dist/face-atlas/guide.d.ts +51 -0
  461. package/dist/face-atlas/index.d.ts +25 -0
  462. package/dist/face-atlas/lead.d.ts +117 -0
  463. package/dist/face-atlas/madeUpCamera.d.ts +125 -0
  464. package/dist/face-atlas/masks.d.ts +53 -0
  465. package/dist/face-atlas/obj.d.ts +69 -0
  466. package/dist/face-atlas/polylines.d.ts +63 -0
  467. package/dist/face-atlas/probe/FaceSkinProbe.d.ts +208 -0
  468. package/dist/face-atlas/probe/__fixtures__/emulate.d.ts +9 -0
  469. package/dist/face-atlas/probe/__fixtures__/face.d.ts +24 -0
  470. package/dist/face-atlas/probe/constants.d.ts +137 -0
  471. package/dist/face-atlas/probe/glsl.d.ts +43 -0
  472. package/dist/face-atlas/probe/lightFit.d.ts +108 -0
  473. package/dist/face-atlas/probe/schedule.d.ts +44 -0
  474. package/dist/face-atlas/probe/selfTest.d.ts +87 -0
  475. package/dist/face-atlas/probe/stats.d.ts +143 -0
  476. package/dist/face-atlas/probe/targets.d.ts +70 -0
  477. package/dist/face-atlas/probe/unwrap.d.ts +76 -0
  478. package/dist/face-atlas/quality.d.ts +28 -0
  479. package/dist/face-atlas/regions.d.ts +31 -0
  480. package/dist/face-atlas/registry.d.ts +252 -0
  481. package/dist/face-atlas/renderState.d.ts +86 -0
  482. package/dist/face-atlas/selfOcclusion.d.ts +62 -0
  483. package/dist/face-atlas/shading.d.ts +406 -0
  484. package/dist/face-atlas/shapes.d.ts +86 -0
  485. package/dist/face-atlas/sides.d.ts +41 -0
  486. package/dist/face-atlas/skinMask.d.ts +35 -0
  487. package/dist/face-atlas/surface.d.ts +155 -0
  488. package/dist/face-atlas/topology.d.ts +44 -0
  489. package/dist/face-attribute-expression/index.d.ts +10 -0
  490. package/dist/face-character/__fixtures__/faceImageDetections.d.ts +25 -0
  491. package/dist/face-character/__fixtures__/faceNode.d.ts +22 -0
  492. package/dist/face-character/bindFaceModel.d.ts +106 -0
  493. package/dist/face-character/canonicalFace.d.ts +17 -0
  494. package/dist/face-character/canonicalFaceGeometry.d.ts +11 -0
  495. package/dist/face-character/canonicalFacePositions.d.ts +7 -0
  496. package/dist/face-character/driveFaceModel.d.ts +57 -0
  497. package/dist/face-character/expressionOutputs.d.ts +45 -0
  498. package/dist/face-character/faceExpressions.d.ts +104 -0
  499. package/dist/face-character/faceImageLandmarker.d.ts +93 -0
  500. package/dist/face-character/faceMeshBinding.d.ts +62 -0
  501. package/dist/face-character/faceMorph.d.ts +77 -0
  502. package/dist/face-character/faceMorphs.d.ts +46 -0
  503. package/dist/face-character/facePhoto.d.ts +138 -0
  504. package/dist/face-character/facePiercings.d.ts +116 -0
  505. package/dist/face-character/facePin.d.ts +131 -0
  506. package/dist/face-character/faceReprojection.d.ts +273 -0
  507. package/dist/face-character/faceReprojector.d.ts +171 -0
  508. package/dist/face-character/faceRig.d.ts +176 -0
  509. package/dist/face-character/faceSwapPresence.d.ts +85 -0
  510. package/dist/face-character/faceTexture.d.ts +169 -0
  511. package/dist/face-character/faceTextureBaker.d.ts +86 -0
  512. package/dist/face-character/faceTextureGuide.d.ts +106 -0
  513. package/dist/face-character/faceTextureStats.d.ts +298 -0
  514. package/dist/face-character/faceTransfer.d.ts +396 -0
  515. package/dist/face-character/faceTransferGeometry.d.ts +109 -0
  516. package/dist/face-character/faceTransferSelfTest.d.ts +94 -0
  517. package/dist/face-character/faceWarp3D.d.ts +101 -0
  518. package/dist/face-character/faceless.d.ts +79 -0
  519. package/dist/face-character/featureWarp.d.ts +28 -0
  520. package/dist/face-character/liveFaceRegistry.d.ts +370 -0
  521. package/dist/face-character/liveValue.d.ts +12 -0
  522. package/dist/face-character/memo.d.ts +15 -0
  523. package/dist/face-effects.cjs +2267 -195
  524. package/dist/face-effects.js +14191 -3346
  525. package/dist/face-expression/index.d.ts +182 -0
  526. package/dist/face-info/blendshapes.d.ts +3 -0
  527. package/dist/face-info/derive.d.ts +8 -0
  528. package/dist/face-info/drawFaceCrop.d.ts +10 -0
  529. package/dist/face-info/getFaceInfo.d.ts +8 -0
  530. package/dist/face-info/index.d.ts +8 -0
  531. package/dist/face-info/landmarks.d.ts +35 -0
  532. package/dist/face-info/types.d.ts +69 -0
  533. package/dist/gestures/definitions.d.ts +98 -0
  534. package/dist/gestures/detector.d.ts +87 -0
  535. package/dist/gestures/index.d.ts +8 -0
  536. package/dist/gestures/measures.d.ts +114 -0
  537. package/dist/gestures/settings.d.ts +49 -0
  538. package/dist/getFaceInfo-BafgGT27.js +62 -0
  539. package/dist/getFaceInfo-BzlwHMjX.cjs +1 -0
  540. package/dist/hand/armFit.d.ts +46 -0
  541. package/dist/hand/armMask.d.ts +190 -0
  542. package/dist/hand/forearm.d.ts +114 -0
  543. package/dist/hand/handCutout.d.ts +23 -0
  544. package/dist/hand/handCutoutRegistry.d.ts +7 -0
  545. package/dist/hand/handEffect.d.ts +38 -0
  546. package/dist/hand/handGestures.d.ts +524 -0
  547. package/dist/hand/handJoints2d.d.ts +49 -0
  548. package/dist/hand/handNail.d.ts +73 -0
  549. package/dist/hand/handPose.d.ts +98 -0
  550. package/dist/hand/handRigSolver.d.ts +159 -0
  551. package/dist/hand/handTattoo.d.ts +81 -0
  552. package/dist/hand/handTouch.d.ts +240 -0
  553. package/dist/hand/handTracking2d.d.ts +33 -0
  554. package/dist/hand/handTracking2dController.d.ts +65 -0
  555. package/dist/hand/handTracking3d.d.ts +52 -0
  556. package/dist/hand/nailImageMask.d.ts +40 -0
  557. package/dist/hand/nailMaskFingers.d.ts +23 -0
  558. package/dist/hand/nailTipRefine.d.ts +37 -0
  559. package/dist/hand/wrist.d.ts +44 -0
  560. package/dist/hand/wristFilter.d.ts +44 -0
  561. package/dist/hooks/faceResults.d.ts +1 -1
  562. package/dist/hooks/selectors.d.ts +77 -4
  563. package/dist/hooks/useBodies.d.ts +39 -0
  564. package/dist/hooks/useCalibrationFaceTracker.d.ts +1 -1
  565. package/dist/hooks/useFaceAction.d.ts +3 -0
  566. package/dist/hooks/useFaceAttributeExpression.d.ts +16 -0
  567. package/dist/hooks/useFaceDetection.d.ts +18 -0
  568. package/dist/hooks/useFaceInfo.d.ts +19 -0
  569. package/dist/hooks/useFaceInfos.d.ts +15 -0
  570. package/dist/hooks/useFaceModelAcquisition.d.ts +38 -0
  571. package/dist/hooks/useFaceResultReader.d.ts +10 -0
  572. package/dist/hooks/useFrameCapture.d.ts +18 -0
  573. package/dist/hooks/useGesture.d.ts +39 -0
  574. package/dist/hooks/useIrisTracking.d.ts +45 -0
  575. package/dist/hooks/useMediaRecorder.d.ts +14 -2
  576. package/dist/hooks/useOwnedTexture.d.ts +6 -0
  577. package/dist/hooks/useTrackerContext.d.ts +14 -2
  578. package/dist/hooks/useXRDiagnostics.d.ts +81 -0
  579. package/dist/hooks/useXRModel.d.ts +12 -0
  580. package/dist/hooks/useXRSession/facade.d.ts +47 -2
  581. package/dist/hooks/useXRSession/index.d.ts +2 -2
  582. package/dist/hooks/useXRSession/reason.d.ts +21 -0
  583. package/dist/hooks/useXRSession/registry.d.ts +23 -0
  584. package/dist/hooks/useXRSession/store.d.ts +64 -7
  585. package/dist/index-BZoBxyLn.js +1103 -0
  586. package/dist/index-By_LCo2V.cjs +1 -0
  587. package/dist/index-C-Mryx_u.cjs +21 -0
  588. package/dist/index-CKRN-xJp.js +3740 -0
  589. package/dist/index-CUldCMRl.js +188 -0
  590. package/dist/index-Cyk_VIZE.js +1432 -0
  591. package/dist/index-D-4w34GO.cjs +1 -0
  592. package/dist/index-DiIoHK_4.js +442 -0
  593. package/dist/index-Dv3WnY9n.cjs +46 -0
  594. package/dist/index-ItufYyHH.cjs +1 -0
  595. package/dist/index-S3gqudT6.cjs +1 -0
  596. package/dist/index-Sho4F4it.cjs +1 -0
  597. package/dist/index-iIQ9jBDb.js +240 -0
  598. package/dist/index-vr2ichWQ.js +190 -0
  599. package/dist/instructions.cjs +30 -0
  600. package/dist/instructions.js +1528 -0
  601. package/dist/internal-Bb9ZXbpr.cjs +1 -0
  602. package/dist/{internal-KOKJDxCG.js → internal-Gt1wn6Z3.js} +152 -127
  603. package/dist/internal.cjs +1 -1
  604. package/dist/internal.js +16 -9
  605. package/dist/iris/compute.d.ts +27 -0
  606. package/dist/iris/index.d.ts +4 -0
  607. package/dist/iris/lead.d.ts +19 -0
  608. package/dist/iris/types.d.ts +89 -0
  609. package/dist/landmarkMask-CvN-L5NT.cjs +1 -0
  610. package/dist/landmarkMask-DHivVjJm.js +225 -0
  611. package/dist/landmarks-BEjJXcnE.cjs +1 -0
  612. package/dist/landmarks-DtCAFV_m.js +76 -0
  613. package/dist/low-level.cjs +1 -1
  614. package/dist/low-level.js +1494 -629
  615. package/dist/main.cjs +1 -1
  616. package/dist/main.js +1306 -475
  617. package/dist/material/MaterialFill.d.ts +20 -0
  618. package/dist/material/MeshMaterial.d.ts +14 -0
  619. package/dist/material/index.d.ts +2 -0
  620. package/dist/models/Base/index.d.ts +49 -0
  621. package/dist/models/Body/index.d.ts +30 -1
  622. package/dist/models/Face/constants.d.ts +8 -0
  623. package/dist/models/Face/index.d.ts +5 -12
  624. package/dist/models/Face/rotation.d.ts +18 -0
  625. package/dist/models/Hand/GestureTracking.d.ts +1 -1
  626. package/dist/models/Hand/HandTracking.d.ts +19 -1
  627. package/dist/models/Holistic/index.d.ts +49 -0
  628. package/dist/models/Holistic/result.d.ts +68 -0
  629. package/dist/models/Segmentation/index.d.ts +6 -3
  630. package/dist/models/SemanticSegmentation/index.d.ts +31 -0
  631. package/dist/models/SemanticSegmentation/presets.d.ts +28 -0
  632. package/dist/models/index.d.ts +2 -0
  633. package/dist/models/nodeSource.d.ts +9 -0
  634. package/dist/particles/emission.d.ts +24 -0
  635. package/dist/particles/eyes.d.ts +24 -0
  636. package/dist/particles/glsl.d.ts +14 -0
  637. package/dist/particles/index.d.ts +10 -0
  638. package/dist/particles/motion.d.ts +42 -0
  639. package/dist/particles/presets.d.ts +12 -0
  640. package/dist/particles/ring.d.ts +58 -0
  641. package/dist/particles/selfTest.d.ts +53 -0
  642. package/dist/particles/settings.d.ts +127 -0
  643. package/dist/particles/shapes.d.ts +29 -0
  644. package/dist/particles/spawner.d.ts +71 -0
  645. package/dist/particles/system.d.ts +66 -0
  646. package/dist/particles.cjs +122 -0
  647. package/dist/particles.js +999 -0
  648. package/dist/product/ProductDimensions.d.ts +16 -0
  649. package/dist/product/ProductHotspot.d.ts +16 -0
  650. package/dist/product/ProductViewer.d.ts +9 -0
  651. package/dist/product/details.d.ts +53 -0
  652. package/dist/product/index.d.ts +14 -0
  653. package/dist/product/loadModelViewer.d.ts +4 -0
  654. package/dist/product/types.d.ts +71 -0
  655. package/dist/product/useProductAr.d.ts +37 -0
  656. package/dist/product/useProductDetails.d.ts +60 -0
  657. package/dist/product.cjs +1 -0
  658. package/dist/product.js +414 -0
  659. package/dist/providers-CEZQgz2s.cjs +62 -0
  660. package/dist/providers-CRuaD8bi.js +424 -0
  661. package/dist/quality/XRQualityController.d.ts +25 -0
  662. package/dist/quality/controller.d.ts +33 -0
  663. package/dist/quality/index.d.ts +6 -0
  664. package/dist/quality/types.d.ts +100 -0
  665. package/dist/quality/useXRQuality.d.ts +28 -0
  666. package/dist/render/layerStack.d.ts +29 -0
  667. package/dist/render/renderGroups.d.ts +47 -0
  668. package/dist/render/renderPasses.d.ts +26 -0
  669. package/dist/render/sceneBeforeRender.d.ts +12 -0
  670. package/dist/renderGroups-BADrepA1.cjs +1 -0
  671. package/dist/renderGroups-CNB99dZ2.js +152 -0
  672. package/dist/renderPasses-DgxUKn9b.cjs +158 -0
  673. package/dist/renderPasses-DuapJA6V.js +1290 -0
  674. package/dist/renderState-CJNmj5jz.js +39 -0
  675. package/dist/renderState-apSfg4eR.cjs +1 -0
  676. package/dist/scene-object/index.d.ts +146 -0
  677. package/dist/scene-object/runtimeRegistry.d.ts +14 -0
  678. package/dist/scene-object.cjs +1 -0
  679. package/dist/scene-object.js +40 -0
  680. package/dist/screen-image/screenImagePresets.d.ts +13 -0
  681. package/dist/screen-image/screenImageSettings.d.ts +57 -0
  682. package/dist/screen-text/screenTextPresets.d.ts +6 -0
  683. package/dist/screen-text/screenTextSettings.d.ts +147 -0
  684. package/dist/screen2d/coordinates.d.ts +107 -0
  685. package/dist/screen2d/index.d.ts +7 -0
  686. package/dist/screen2d/material-runtime.d.ts +32 -0
  687. package/dist/screen2d/screenTransform.d.ts +60 -0
  688. package/dist/screen2d/smoothing.d.ts +5 -0
  689. package/dist/screen2d/texture.d.ts +10 -0
  690. package/dist/screen2d/transform.d.ts +25 -0
  691. package/dist/screen2d/types.d.ts +90 -0
  692. package/dist/segmentation-BOZJdWFC.js +1911 -0
  693. package/dist/segmentation-J8GoNBvP.cjs +1 -0
  694. package/dist/segmentation2d/faceMemory.d.ts +28 -0
  695. package/dist/segmentation2d/faceRegions.d.ts +24 -0
  696. package/dist/segmentation2d/index.d.ts +9 -0
  697. package/dist/segmentation2d/maskUv.d.ts +23 -0
  698. package/dist/segmentation2d/rasterize.d.ts +14 -0
  699. package/dist/segmentation2d/types.d.ts +52 -0
  700. package/dist/selectors-BvJepq6H.js +196 -0
  701. package/dist/selectors-QB2qsaxy.cjs +1 -0
  702. package/dist/services/MetricsCollector/index.d.ts +7 -1
  703. package/dist/services/MetricsCollector/utils.d.ts +1 -1
  704. package/dist/session-BVX859as.cjs +31 -0
  705. package/dist/session-Cz8aie4K.js +493 -0
  706. package/dist/settings-BJ7FMBsO.js +111 -0
  707. package/dist/settings-C63FMBlF.cjs +1 -0
  708. package/dist/similarityFit-BFqHND2e.cjs +1 -0
  709. package/dist/similarityFit-Bbz-R8AY.js +91 -0
  710. package/dist/spring/index.d.ts +2 -0
  711. package/dist/spring/spring.d.ts +69 -0
  712. package/dist/spring/swing.d.ts +54 -0
  713. package/dist/subjects/index.d.ts +2 -0
  714. package/dist/subjects/select.d.ts +70 -0
  715. package/dist/subjects/types.d.ts +59 -0
  716. package/dist/texture/animatedTexture.d.ts +63 -0
  717. package/dist/texture/animationMath.d.ts +8 -0
  718. package/dist/texture/gifReader.d.ts +17 -0
  719. package/dist/texture/gifTextureSource.d.ts +16 -0
  720. package/dist/texture/sourceResolver.d.ts +30 -0
  721. package/dist/textures-BVwo9Z7z.js +38 -0
  722. package/dist/textures-DAfc61zz.cjs +1 -0
  723. package/dist/tracking/coordinates.d.ts +5 -0
  724. package/dist/tracking-config/apply.d.ts +57 -0
  725. package/dist/tracking-config/index.d.ts +7 -0
  726. package/dist/tracking-config/resolve.d.ts +25 -0
  727. package/dist/tracking-config/storage.d.ts +8 -0
  728. package/dist/tracking-config/types.d.ts +106 -0
  729. package/dist/tracking-config/useXRTrackingConfig.d.ts +38 -0
  730. package/dist/tracking.cjs +10 -1
  731. package/dist/tracking.js +1531 -294
  732. package/dist/trigger-D9L4GPmQ.js +3726 -0
  733. package/dist/trigger-DZ9vU7jo.cjs +147 -0
  734. package/dist/types/common.d.ts +11 -1
  735. package/dist/types/compositor.d.ts +21 -0
  736. package/dist/types/face.d.ts +21 -14
  737. package/dist/types/gesture-tracking.d.ts +2 -2
  738. package/dist/types/hand-tracking.d.ts +19 -2
  739. package/dist/types/holistic.d.ts +121 -0
  740. package/dist/types/index.d.ts +1 -1
  741. package/dist/types/model.d.ts +22 -2
  742. package/dist/types/nodes.d.ts +83 -6
  743. package/dist/types/segmentation.d.ts +26 -0
  744. package/dist/types/session.d.ts +50 -4
  745. package/dist/types/tracking.d.ts +8 -2
  746. package/dist/types/util-types.d.ts +1 -1
  747. package/dist/useBodies-BYzJpQ4L.js +75 -0
  748. package/dist/useBodies-Cxpmx6Bb.cjs +1 -0
  749. package/dist/useFaceInfo-BzEUj2OI.js +75 -0
  750. package/dist/useFaceInfo-DlLRAVNw.cjs +1 -0
  751. package/dist/useFaceResultReader-Cc4Qrutf.js +61 -0
  752. package/dist/useFaceResultReader-D3jOQNKz.cjs +1 -0
  753. package/dist/useInstructionHold-DOu-RpCM.js +53 -0
  754. package/dist/useInstructionHold-DwJY1Alr.cjs +1 -0
  755. package/dist/useIrisTracking-Bz4uLDa7.js +6190 -0
  756. package/dist/useIrisTracking-DRGWgoNy.cjs +35 -0
  757. package/dist/useLandmarkPoseFit-Bg-h9BPb.cjs +1 -0
  758. package/dist/useLandmarkPoseFit-Bmb3h6Mw.js +87 -0
  759. package/dist/useXRCapabilities-B1KLckqw.js +30 -0
  760. package/dist/useXRCapabilities-CZlPUBjF.cjs +1 -0
  761. package/dist/utils/canonicalRigidLandmarks.d.ts +8 -0
  762. package/dist/utils/drawNormalizedCrop.d.ts +22 -0
  763. package/dist/utils/fns.d.ts +6 -3
  764. package/dist/utils/headOccluderFit.d.ts +42 -0
  765. package/dist/utils/integrity.d.ts +25 -26
  766. package/dist/utils/landmarkBounds.d.ts +1 -1
  767. package/dist/utils/logger.d.ts +2 -2
  768. package/dist/utils/resolveNumFaces.d.ts +13 -0
  769. package/dist/utils/shoulderOccluderFit.d.ts +38 -0
  770. package/dist/utils/similarityFit.d.ts +23 -0
  771. package/dist/utils/updateThrottle.d.ts +2 -0
  772. package/dist/utils/useStableUniforms.d.ts +18 -0
  773. package/dist/utils/visionWasm.d.ts +18 -0
  774. package/dist/uv-BMFt19bg.cjs +1 -0
  775. package/dist/{index-BD-JWMjE.js → uv-DJU_XfmN.js} +15 -180
  776. package/dist/x-Co8jPhP0.js +127 -0
  777. package/dist/x-KC8E4Gaj.cjs +41 -0
  778. package/docs/MIGRATION_GUIDE.md +589 -0
  779. package/docs/SDK_DOCUMENTATION.md +1157 -0
  780. package/docs/api/adaptive-quality.mdx +104 -0
  781. package/docs/api/asset-lifecycle.mdx +78 -0
  782. package/docs/api/audio.mdx +36 -0
  783. package/docs/api/behavior-components.mdx +164 -0
  784. package/docs/api/body-instructions.mdx +287 -0
  785. package/docs/api/body-rig.mdx +384 -0
  786. package/docs/api/body-triggers.mdx +235 -0
  787. package/docs/api/camera-permission.mdx +142 -0
  788. package/docs/api/capture-recording.mdx +111 -0
  789. package/docs/api/coordinate-spaces.mdx +168 -0
  790. package/docs/api/cross-camera.mdx +89 -0
  791. package/docs/api/debug-ui-scene-editor.mdx +270 -0
  792. package/docs/api/diagnostics-calibration.mdx +97 -0
  793. package/docs/api/external-face-mesh.mdx +231 -0
  794. package/docs/api/face-actions.mdx +108 -0
  795. package/docs/api/face-attribute-expression.mdx +87 -0
  796. package/docs/api/face-binding-anchors.mdx +55 -0
  797. package/docs/api/face-character.mdx +157 -0
  798. package/docs/api/face-effects.mdx +28 -0
  799. package/docs/api/face-expression-controller.mdx +153 -0
  800. package/docs/api/face-info.mdx +118 -0
  801. package/docs/api/face-inset.mdx +204 -0
  802. package/docs/api/face-instructions.mdx +183 -0
  803. package/docs/api/face-liquify.mdx +196 -0
  804. package/docs/api/face-mesh.mdx +130 -0
  805. package/docs/api/face-morph.mdx +117 -0
  806. package/docs/api/face-painting.mdx +40 -0
  807. package/docs/api/face-reprojection.mdx +154 -0
  808. package/docs/api/face-retouching.mdx +81 -0
  809. package/docs/api/face-swap.mdx +350 -0
  810. package/docs/api/face-warp-3d.mdx +166 -0
  811. package/docs/api/faceless.mdx +143 -0
  812. package/docs/api/gestures.mdx +210 -0
  813. package/docs/api/hair.mdx +97 -0
  814. package/docs/api/hand-instructions.mdx +222 -0
  815. package/docs/api/hand-rig.mdx +661 -0
  816. package/docs/api/hand-touch.mdx +162 -0
  817. package/docs/api/head-occluder.mdx +563 -0
  818. package/docs/api/holistic-tracker.mdx +164 -0
  819. package/docs/api/instructions.mdx +323 -0
  820. package/docs/api/iris-tracking.mdx +247 -0
  821. package/docs/api/made-up-camera.mdx +131 -0
  822. package/docs/api/makeup-skin-tone.mdx +135 -0
  823. package/docs/api/makeup.mdx +353 -0
  824. package/docs/api/material-render-state.mdx +132 -0
  825. package/docs/api/multi-subject.mdx +185 -0
  826. package/docs/api/particles.mdx +183 -0
  827. package/docs/api/person-cutout.mdx +171 -0
  828. package/docs/api/pin-to-face-mesh.mdx +274 -0
  829. package/docs/api/product-ar.mdx +114 -0
  830. package/docs/api/product-details.mdx +78 -0
  831. package/docs/api/runtime-3d.mdx +316 -0
  832. package/docs/api/scene-object-store.mdx +213 -0
  833. package/docs/api/screen-image.mdx +67 -0
  834. package/docs/api/screen-shape.mdx +64 -0
  835. package/docs/api/screen-space-coordinates.mdx +75 -0
  836. package/docs/api/screen-text.mdx +39 -0
  837. package/docs/api/segmentation-overlay.mdx +301 -0
  838. package/docs/api/session-lifecycle.mdx +136 -0
  839. package/docs/api/texture-sources.mdx +74 -0
  840. package/docs/api/trackers.mdx +65 -0
  841. package/docs/api/tracking-config.mdx +108 -0
  842. package/docs/docs.json +121 -0
  843. package/docs/examples/lip-shaders.mdx +273 -0
  844. package/docs/examples/scene-object-recipes.mdx +194 -0
  845. package/docs/guides/face-atlas-template.svg +1 -0
  846. package/docs/guides/face-atlas-textures.mdx +186 -0
  847. package/docs/guides/face-texture-template.svg +1 -0
  848. package/docs/guides/harness-debug-ui.mdx +139 -0
  849. package/docs/guides/lip-effect-textures.mdx +368 -0
  850. package/docs/guides/lip-uv-template.png +0 -0
  851. package/docs/guides/lip-uv-template.svg +1 -0
  852. package/docs/guides/makeup-design-textures.mdx +109 -0
  853. package/docs/inspector/hierarchy-panel.mdx +51 -0
  854. package/docs/inspector/object-inspector-panel.mdx +51 -0
  855. package/docs/introduction.mdx +120 -0
  856. package/docs/scene-objects/overview.mdx +127 -0
  857. package/docs/scene-objects/render-groups.mdx +77 -0
  858. package/docs/scene-objects/runtime-rendering.mdx +75 -0
  859. package/docs/texture-api-consumer.md +84 -0
  860. package/package.json +86 -8
  861. package/settings.json +1998 -0
  862. package/dist/DebuggerUI-CEfdddkZ.cjs +0 -1
  863. package/dist/DebuggerUI-Dgop6Q6o.js +0 -269
  864. package/dist/components/FaceRetouch/retouchRegions.d.ts +0 -23
  865. package/dist/components/FaceRetouch/useFaceRetouchRegions.d.ts +0 -12
  866. package/dist/index-B5J4gzn2.cjs +0 -1
  867. package/dist/index-BVBVg96G.cjs +0 -1
  868. package/dist/index-CYMj26Ej.js +0 -1331
  869. package/dist/index-DtwHElmG.js +0 -157
  870. package/dist/index-PtFmD6B8.cjs +0 -1
  871. package/dist/internal-DH5d1Xnq.cjs +0 -1
  872. package/dist/modules/XRClient/index.d.ts +0 -9
  873. package/dist/modules/index.d.ts +0 -1
  874. package/dist/selectors-BHO6TnoC.js +0 -59
  875. package/dist/selectors-Bub0o3qy.cjs +0 -1
  876. package/dist/services/ApiService.d.ts +0 -12
  877. package/dist/types/client.d.ts +0 -3
  878. package/dist/useFaceResults-cpsSmKKc.js +0 -81
  879. package/dist/useFaceResults-hVUJYSEY.cjs +0 -1
package/dist/main.js CHANGED
@@ -1,528 +1,537 @@
1
- var Q = Object.defineProperty;
2
- var ee = (r, e, t) => e in r ? Q(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
- var R = (r, e, t) => ee(r, typeof e != "symbol" ? e + "" : e, t);
4
- import { useState as W, useEffect as k, useRef as y, useMemo as I, Suspense as te, useCallback as F } from "react";
5
- import { X as re, R as ne } from "./index-CYMj26Ej.js";
6
- import { b as rt, a as nt } from "./index-CYMj26Ej.js";
7
- import { S as se, a as ie, u as oe } from "./index-DtwHElmG.js";
8
- import { X as it } from "./index-DtwHElmG.js";
9
- import { jsx as p, jsxs as P, Fragment as X } from "react/jsx-runtime";
10
- import { useThree as Y, useFrame as ae } from "@react-three/fiber";
11
- import * as K from "three";
12
- import { PerspectiveCamera as J, RepeatWrapping as q, LinearFilter as H } from "three";
13
- import { u as ce, a as le } from "./selectors-BHO6TnoC.js";
14
- import { useTexture as ue } from "@react-three/drei";
15
- const $ = 9, G = 16, Ae = ({ children: r }) => {
16
- const [e, t] = W({ width: 0, height: 0 });
17
- return k(() => {
18
- const n = () => {
19
- const i = document.documentElement.clientWidth, c = document.documentElement.clientHeight, o = i / c, a = $ / G;
20
- let s, u;
21
- o > a ? (u = c, s = u * $ / G) : (s = i, u = s * G / $), t({ width: s, height: u });
22
- };
23
- return n(), window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
24
- }, []), /* @__PURE__ */ p(
25
- "div",
26
- {
27
- style: {
28
- width: "100vw",
29
- height: `${window.innerHeight}px`,
30
- display: "flex",
31
- alignItems: "center",
32
- justifyContent: "center",
33
- backgroundColor: "#0d0d0d"
34
- },
35
- children: /* @__PURE__ */ p("div", { style: { width: e.width, height: e.height, position: "relative" }, children: r })
36
- }
37
- );
38
- }, de = "rgba(20,40,110,0.88)", he = 24, fe = 512;
39
- function _e({
40
- color: r = de,
41
- borderColor: e,
42
- borderWidth: t = 0,
43
- borderRadius: n = he,
44
- resolution: i = fe,
45
- aspect: c = 1,
46
- opacity: o = 1,
47
- name: a,
48
- overlay: s = !0,
49
- position: u,
50
- rotation: g,
51
- scale: m,
52
- visible: l
1
+ var De = Object.defineProperty;
2
+ var Ne = (e, t, s) => t in e ? De(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
+ var U = (e, t, s) => Ne(e, typeof t != "symbol" ? t + "" : t, s);
4
+ import { j as v, u as Ie, Q as Le, R as Oe, T as Ge, U as qe, V as Be, W as We } from "./index-CKRN-xJp.js";
5
+ import { av as Bs, Z as Ws, aw as Ks, M as Xs, P as Hs, L as zs, w as $s, Y as js, ax as Vs, ar as Zs, as as Ys, _ as Qs, c as Js, z as er, y as tr, d as sr, k as rr, ab as ar, ac as nr, ad as ir, ae as or, n as cr, af as lr, i as ur, $ as dr, O as mr, ag as pr, a0 as fr, ah as hr, ai as gr, ap as Sr, p as yr, A as Mr, at as Tr, r as Er, K as Rr, au as br, a2 as Ar, aj as Fr, a3 as Cr, a4 as vr, a5 as kr, a1 as _r, a6 as xr, a7 as wr, a8 as Ur, ak as Pr, aq as Dr, a9 as Nr, al as Ir, t as Lr, am as Or, an as Gr, aa as qr, ao as Br } from "./index-CKRN-xJp.js";
6
+ import { S as Ke } from "./contexts-Y_FhdnIv.js";
7
+ import { X as Kr } from "./contexts-Y_FhdnIv.js";
8
+ import { S as Hr, T as zr } from "./TextLabel-c9BCucOI.js";
9
+ import { jsxs as L, jsx as g, Fragment as re } from "react/jsx-runtime";
10
+ import { useRef as F, useMemo as Z, useEffect as _, useState as x, Suspense as Xe, useCallback as R, forwardRef as He, useImperativeHandle as ze, useContext as $e, createContext as je, useId as Ve, useSyncExternalStore as Ze } from "react";
11
+ import * as Ye from "three";
12
+ import { MathUtils as Qe, Vector2 as Je, Vector3 as et, DoubleSide as te, RepeatWrapping as Se, LinearFilter as ye } from "three";
13
+ import { D as jr, H as Vr, G as Zr, E as Yr, J as Qr, K as Jr, P as ea, S as ta, C as sa, I as ra, L as aa, M as na, F as ia, B as oa } from "./index-Cyk_VIZE.js";
14
+ import { useThree as tt, useFrame as st } from "@react-three/fiber";
15
+ import { R as rt } from "./uv-DJU_XfmN.js";
16
+ import { c as Fe, b as at } from "./selectors-BvJepq6H.js";
17
+ import { u as nt, a as it, s as ot, F as ct } from "./drawNormalizedCrop-DG3gtJxf.js";
18
+ import { d as la, b as ua, r as da } from "./drawNormalizedCrop-DG3gtJxf.js";
19
+ import { S as lt, c as ut } from "./index-BZoBxyLn.js";
20
+ import { L as pa, d as fa, R as ha, a as ga, e as Sa, b as ya, f as Ma } from "./index-BZoBxyLn.js";
21
+ import { useTexture as dt } from "@react-three/drei";
22
+ import { a as mt } from "./context-DTxSQvp4.js";
23
+ import { k as Ea, D as Ra, j as ba, E as Aa, M as Fa, h as Ca, S as va, T as ka, l as _a, g as xa, n as wa, r as Ua } from "./renderPasses-DuapJA6V.js";
24
+ import { D as Da, a as Na, M as Ia, n as La } from "./index-CUldCMRl.js";
25
+ import { M as Ga } from "./index-vr2ichWQ.js";
26
+ import { u as Ba } from "./useXRCapabilities-B1KLckqw.js";
27
+ import { g as Ce } from "./cache-2x3CUJuY.js";
28
+ import { D as Ka, X as Xa, c as Ha, u as za } from "./cache-2x3CUJuY.js";
29
+ import { S as pt } from "./segmentation-BOZJdWFC.js";
30
+ import { d as ja, a as Va, b as Za, e as Ya, f as Qa, g as Ja, h as en } from "./segmentation-BOZJdWFC.js";
31
+ const V = (e, t, s, r) => Qe.damp(e, t, Math.max(0, s), Math.max(0, r)), ls = (e, t, s, r, a = new Je()) => a.set(
32
+ V(e.x, t.x, s, r),
33
+ V(e.y, t.y, s, r)
34
+ ), us = (e, t, s, r, a = new et()) => a.set(
35
+ V(e.x, t.x, s, r),
36
+ V(e.y, t.y, s, r),
37
+ V(e.z, t.z, s, r)
38
+ ), ft = "rgba(20,40,110,0.88)", ht = 24, gt = 512;
39
+ function ds({
40
+ color: e = ft,
41
+ borderColor: t,
42
+ borderWidth: s = 0,
43
+ borderRadius: r = ht,
44
+ resolution: a = gt,
45
+ aspect: n = 1,
46
+ opacity: i = 1,
47
+ name: c,
48
+ overlay: o = !0,
49
+ position: l,
50
+ rotation: h,
51
+ scale: d,
52
+ visible: m
53
53
  }) {
54
- const M = y(null), v = y(null), w = I(() => me({
55
- width: Math.round(i * Math.max(c, 0.05)),
56
- height: Math.round(i),
57
- color: r,
58
- borderColor: e,
59
- borderWidth: t,
60
- borderRadius: n
61
- }), [r, e, t, n, i, c]);
62
- k(() => () => {
63
- w.dispose();
64
- }, [w]);
65
- const b = y(null), S = y(o);
66
- return S.current !== o && (S.current = o, b.current = null, v.current && (v.current.opacity = o)), k(() => {
67
- const d = M.current;
68
- if (d)
69
- return d.userData.setOpacity = (L) => {
70
- b.current = L, v.current && (v.current.opacity = L);
54
+ const u = F(null), p = F(null), M = Z(() => St({
55
+ width: Math.round(a * Math.max(n, 0.05)),
56
+ height: Math.round(a),
57
+ color: e,
58
+ borderColor: t,
59
+ borderWidth: s,
60
+ borderRadius: r
61
+ }), [e, t, s, r, a, n]);
62
+ _(() => () => {
63
+ M.dispose();
64
+ }, [M]);
65
+ const E = F(null), f = F(i);
66
+ return f.current !== i && (f.current = i, E.current = null, p.current && (p.current.opacity = i)), _(() => {
67
+ const S = u.current;
68
+ if (S)
69
+ return S.userData.setOpacity = (b) => {
70
+ E.current = b, p.current && (p.current.opacity = b);
71
71
  }, () => {
72
- delete d.userData.setOpacity;
73
- };
74
- }, []), /* @__PURE__ */ P(
75
- "mesh",
76
- {
77
- ref: M,
78
- name: a,
79
- position: u,
80
- rotation: g,
81
- scale: m,
82
- visible: l,
83
- children: [
84
- /* @__PURE__ */ p("planeGeometry", { args: [1, 1] }),
85
- /* @__PURE__ */ p(
86
- "meshBasicMaterial",
87
- {
88
- ref: v,
89
- map: w,
90
- transparent: !0,
91
- opacity: o,
92
- depthTest: !s,
93
- depthWrite: !s
94
- }
95
- )
96
- ]
97
- }
98
- );
99
- }
100
- function me(r) {
101
- const { width: e, height: t, color: n, borderColor: i, borderWidth: c, borderRadius: o } = r, a = typeof OffscreenCanvas < "u" ? new OffscreenCanvas(e, t) : (() => {
102
- const m = document.createElement("canvas");
103
- return m.width = e, m.height = t, m;
104
- })(), s = a.getContext("2d");
105
- s.clearRect(0, 0, e, t);
106
- const u = Math.min(o, Math.min(e, t) / 2);
107
- s.beginPath(), s.moveTo(u, 0), s.lineTo(e - u, 0), s.quadraticCurveTo(e, 0, e, u), s.lineTo(e, t - u), s.quadraticCurveTo(e, t, e - u, t), s.lineTo(u, t), s.quadraticCurveTo(0, t, 0, t - u), s.lineTo(0, u), s.quadraticCurveTo(0, 0, u, 0), s.closePath(), s.fillStyle = n, s.fill(), i && c > 0 && (s.lineWidth = c, s.strokeStyle = i, s.stroke());
108
- const g = new K.CanvasTexture(a);
109
- return g.needsUpdate = !0, g;
110
- }
111
- const ze = ({ children: r, depth: e = 0 }) => {
112
- const { camera: t, size: n } = Y(), i = I(() => {
113
- if (!(t instanceof J))
114
- return { width: 10, height: 10 };
115
- const c = Math.abs(t.position.z - e), o = t.fov * Math.PI / 180, a = 2 * Math.tan(o / 2) * c;
116
- return { width: a * (n.width / n.height), height: a };
117
- }, [t, n, e]);
118
- return /* @__PURE__ */ p(se.Provider, { value: i, children: /* @__PURE__ */ p("group", { position: [0, 0, e], children: r }) });
119
- };
120
- function pe(r, e) {
121
- return !Number.isFinite(r) || !Number.isFinite(e) || r <= 0 || e <= 0 ? [1, 1, 1] : Math.abs(r - e) < 1e-6 ? [1, 1, 1] : r > e ? [e / r, 1, 1] : [1, r / e, 1];
122
- }
123
- const ge = { left: -1, right: 1, top: 1, bottom: -1 }, Me = (r, e, t) => {
124
- const n = r % e, i = Math.floor(r / e);
125
- return { x: n / e, y: (t - 1 - i) / t };
126
- }, ve = ({
127
- sheet: r,
128
- contentAspect: e,
129
- renderOrder: t,
130
- name: n
131
- }) => {
132
- const i = ue(r.url), c = y(0), o = y(-1), a = oe(), [s, u] = e != null ? pe(a, e) : [1, 1];
133
- return ae((g, m) => {
134
- i.wrapS = q, i.wrapT = q, i.magFilter = H, i.minFilter = H, i.generateMipmaps = !1, i.repeat.set(1 / r.cols, 1 / r.rows), c.current += m;
135
- const l = Math.floor(c.current * r.fps) % r.frames;
136
- if (l === o.current) return;
137
- o.current = l;
138
- const { x: M, y: v } = Me(l, r.cols, r.rows);
139
- i.offset.set(M, v);
140
- }), /* @__PURE__ */ P("mesh", { name: n, renderOrder: t, scale: [s, u, 1], children: [
141
- /* @__PURE__ */ p("planeGeometry", { args: [1, 1] }),
142
- /* @__PURE__ */ p("meshBasicMaterial", { map: i, transparent: !0, toneMapped: !1, depthWrite: !1 })
143
- ] });
144
- }, Be = ({
145
- sheet: r,
146
- anchors: e = ge,
147
- contentAspect: t,
148
- renderOrder: n = 10,
149
- name: i = "spriteAnimation"
150
- }) => /* @__PURE__ */ p(te, { fallback: null, children: /* @__PURE__ */ p(ie, { anchors: e, children: /* @__PURE__ */ p(ve, { sheet: r, contentAspect: t, renderOrder: n, name: i }) }) }), Te = {
151
- color: "#ffffff",
152
- fontWeight: "bold",
153
- fontFamily: "Arial, sans-serif",
154
- fontSize: 48,
155
- bgColor: "rgba(20,40,110,0.88)",
156
- borderWidth: 0,
157
- borderRadius: 24,
158
- padding: 32,
159
- aspect: 2.5,
160
- resolution: 512,
161
- opacity: 1
162
- };
163
- function Ie(r) {
164
- const e = { ...Te, ...r }, {
165
- text: t,
166
- color: n,
167
- fontWeight: i,
168
- fontFamily: c,
169
- fontSize: o,
170
- bgColor: a,
171
- borderColor: s,
172
- borderWidth: u,
173
- borderRadius: g,
174
- padding: m,
175
- aspect: l,
176
- resolution: M,
177
- opacity: v,
178
- name: w,
179
- overlay: b = !0,
180
- position: S,
181
- rotation: d,
182
- scale: L,
183
- visible: N
184
- } = e, [_, z] = W(null), [B, A] = W(null), h = y(t);
185
- h.current !== t && (h.current = t, _ !== null && z(null));
186
- const T = y(a);
187
- T.current !== a && (T.current = a, B !== null && A(null));
188
- const f = y(null), E = _ ?? t, D = B ?? a, O = I(
189
- () => ye({
190
- text: E,
191
- color: n,
192
- fontWeight: i,
193
- fontFamily: c,
194
- fontSize: o,
195
- bgColor: D,
196
- borderColor: s,
197
- borderWidth: u,
198
- borderRadius: g,
199
- padding: m,
200
- height: M,
201
- width: Math.round(M * Math.max(l, 0.1))
202
- }),
203
- [
204
- E,
205
- n,
206
- i,
207
- c,
208
- o,
209
- D,
210
- s,
211
- u,
212
- g,
213
- m,
214
- l,
215
- M
216
- ]
217
- );
218
- return k(() => {
219
- const x = f.current;
220
- if (x)
221
- return x.userData.setText = (U) => z(U), x.userData.setBgColor = (U) => A(U), () => {
222
- delete x.userData.setText, delete x.userData.setBgColor;
72
+ delete S.userData.setOpacity;
223
73
  };
224
- }, []), k(() => () => {
225
- O.dispose();
226
- }, [O]), /* @__PURE__ */ P(
74
+ }, []), /* @__PURE__ */ L(
227
75
  "mesh",
228
76
  {
229
- ref: f,
230
- name: w,
231
- position: S,
232
- rotation: d,
233
- scale: L,
234
- visible: N,
77
+ ref: u,
78
+ name: c,
79
+ position: l,
80
+ rotation: h,
81
+ scale: d,
82
+ visible: m,
235
83
  children: [
236
- /* @__PURE__ */ p("planeGeometry", { args: [1, 1] }),
237
- /* @__PURE__ */ p(
84
+ /* @__PURE__ */ g("planeGeometry", { args: [1, 1] }),
85
+ /* @__PURE__ */ g(
238
86
  "meshBasicMaterial",
239
87
  {
240
- map: O,
88
+ ref: p,
89
+ map: M,
241
90
  transparent: !0,
242
- opacity: v,
243
- depthTest: !b,
244
- depthWrite: !b
91
+ opacity: i,
92
+ depthTest: !o,
93
+ depthWrite: !o
245
94
  }
246
95
  )
247
96
  ]
248
97
  }
249
98
  );
250
99
  }
251
- function ye(r) {
252
- const { width: e, height: t, text: n, color: i, fontFamily: c, fontWeight: o, padding: a } = r;
253
- let { fontSize: s, bgColor: u } = r, g;
254
- const m = typeof OffscreenCanvas < "u" ? new OffscreenCanvas(e, t) : (() => {
100
+ function St(e) {
101
+ const { width: t, height: s, color: r, borderColor: a, borderWidth: n, borderRadius: i } = e, c = typeof OffscreenCanvas < "u" ? new OffscreenCanvas(t, s) : (() => {
255
102
  const d = document.createElement("canvas");
256
- return d.width = e, d.height = t, d;
257
- })(), l = m.getContext("2d");
258
- if (l.clearRect(0, 0, e, t), u !== "transparent") {
259
- const d = Math.min(r.borderRadius, Math.min(e, t) / 2);
260
- l.beginPath(), l.moveTo(d, 0), l.lineTo(e - d, 0), l.quadraticCurveTo(e, 0, e, d), l.lineTo(e, t - d), l.quadraticCurveTo(e, t, e - d, t), l.lineTo(d, t), l.quadraticCurveTo(0, t, 0, t - d), l.lineTo(0, d), l.quadraticCurveTo(0, 0, d, 0), l.closePath(), l.fillStyle = u, l.fill(), r.borderColor && r.borderWidth > 0 && (l.lineWidth = r.borderWidth, l.strokeStyle = r.borderColor, l.stroke());
261
- }
262
- l.fillStyle = i, l.textAlign = "center", l.textBaseline = "middle";
263
- const M = e - a * 2;
264
- let v = Z(l, n, M, o, s, c);
265
- const w = Math.max(1, Math.floor((t - a * 2) / (s * 1.3)));
266
- v.length > w && (s = Math.max(12, Math.round(s * 0.75)), v = Z(l, n, M, o, s, c)), l.font = `${o} ${s}px ${c}`;
267
- const b = s * 1.3, S = t / 2 - (v.length - 1) * b / 2;
268
- for (let d = 0; d < v.length; d++)
269
- l.fillText(v[d], e / 2, S + d * b);
270
- return g = new K.CanvasTexture(m), g.needsUpdate = !0, g;
271
- }
272
- function Z(r, e, t, n, i, c) {
273
- r.font = `${n} ${i}px ${c}`;
274
- const o = e.split(" "), a = [];
275
- let s = "";
276
- for (const u of o) {
277
- const g = s ? `${s} ${u}` : u;
278
- r.measureText(g).width > t && s ? (a.push(s), s = u) : s = g;
279
- }
280
- return s && a.push(s), a;
103
+ return d.width = t, d.height = s, d;
104
+ })(), o = c.getContext("2d");
105
+ o.clearRect(0, 0, t, s);
106
+ const l = Math.min(i, Math.min(t, s) / 2);
107
+ o.beginPath(), o.moveTo(l, 0), o.lineTo(t - l, 0), o.quadraticCurveTo(t, 0, t, l), o.lineTo(t, s - l), o.quadraticCurveTo(t, s, t - l, s), o.lineTo(l, s), o.quadraticCurveTo(0, s, 0, s - l), o.lineTo(0, l), o.quadraticCurveTo(0, 0, l, 0), o.closePath(), o.fillStyle = r, o.fill(), a && n > 0 && (o.lineWidth = n, o.strokeStyle = a, o.stroke());
108
+ const h = new Ye.CanvasTexture(c);
109
+ return h.needsUpdate = !0, h;
281
110
  }
282
- const Ne = ({
283
- segmentationMask: r,
284
- segmentation: e,
285
- invert: t = !1,
286
- customBackground: n,
287
- renderOrder: i = ne.BACKGROUND
111
+ const ms = ({
112
+ segmentationMask: e,
113
+ segmentation: t,
114
+ invert: s = !1,
115
+ customBackground: r,
116
+ renderOrder: a = rt.BACKGROUND
288
117
  }) => {
289
- const { camera: c, size: o } = Y(), a = ce(), s = le(re.BACKGROUND_SEGMENTATION), u = e ? s == null ? void 0 : s.backgroundSegmentationMask : void 0, g = y(!1);
290
- k(() => {
291
- if (!e) {
292
- g.current = !1;
118
+ const { camera: n, size: i } = tt(), c = Fe(), o = at(v.BACKGROUND_SEGMENTATION), l = t ? o == null ? void 0 : o.backgroundSegmentationMask : void 0, h = F(!1);
119
+ _(() => {
120
+ if (!t) {
121
+ h.current = !1;
293
122
  return;
294
123
  }
295
- s === null && !g.current && (console.warn(
296
- `[VideoBackground] segmentation="${e}" set but no matching <Segmentation> component is mounted; rendering unmasked.`
297
- ), g.current = !0);
298
- }, [e, s]);
299
- const m = e ? u : r, l = I(() => {
300
- if (!(c instanceof J))
124
+ o === null && !h.current && (console.warn(
125
+ `[VideoBackground] segmentation="${t}" set but no matching <Segmentation> component is mounted; rendering unmasked.`
126
+ ), h.current = !0);
127
+ }, [t, o]);
128
+ const d = t ? l : e, m = Z(() => {
129
+ if (!n.isPerspectiveCamera)
301
130
  return [10, 10];
302
- const w = (c.position.z || 5) - -1, b = c.fov * Math.PI / 180, S = 2 * Math.tan(b / 2) * w;
303
- return [S * (o.width / o.height), S];
304
- }, [c, o]);
305
- return a ? /* @__PURE__ */ p("group", { position: [0, 0, -1], children: t ? /* @__PURE__ */ P(X, { children: [
306
- /* @__PURE__ */ P("mesh", { position: [0, 0, -0.01], renderOrder: i - 1, children: [
307
- /* @__PURE__ */ p("planeGeometry", { args: l }),
308
- /* @__PURE__ */ p(
131
+ const u = n, E = (u.position.z || 5) - -1, f = u.fov * Math.PI / 180, S = 2 * Math.tan(f / 2) * E;
132
+ return [S * (i.width / i.height), S];
133
+ }, [n, i]);
134
+ return c ? /* @__PURE__ */ g("group", { position: [0, 0, -1], children: s ? /* @__PURE__ */ L(re, { children: [
135
+ /* @__PURE__ */ L("mesh", { position: [0, 0, -0.01], renderOrder: a - 1, children: [
136
+ /* @__PURE__ */ g("planeGeometry", { args: m }),
137
+ /* @__PURE__ */ g(
309
138
  "meshBasicMaterial",
310
139
  {
311
- map: a,
140
+ map: c,
312
141
  depthTest: !1,
313
142
  depthWrite: !1,
314
- toneMapped: !1
143
+ toneMapped: !1,
144
+ side: te
315
145
  }
316
146
  )
317
147
  ] }),
318
- n && m && /* @__PURE__ */ P("mesh", { position: [0, 0, 0], renderOrder: i, children: [
319
- /* @__PURE__ */ p("planeGeometry", { args: l }),
320
- /* @__PURE__ */ p(
148
+ r && d && /* @__PURE__ */ L("mesh", { position: [0, 0, 0], renderOrder: a, children: [
149
+ /* @__PURE__ */ g("planeGeometry", { args: m }),
150
+ /* @__PURE__ */ g(
321
151
  "meshBasicMaterial",
322
152
  {
323
- map: typeof n == "string" ? void 0 : n,
324
- color: typeof n == "string" ? n : void 0,
325
- alphaMap: m,
153
+ map: typeof r == "string" ? void 0 : r,
154
+ color: typeof r == "string" ? r : void 0,
155
+ alphaMap: d,
326
156
  transparent: !1,
327
157
  alphaTest: 0.5,
328
158
  depthTest: !1,
329
159
  depthWrite: !1,
330
- toneMapped: !1
160
+ toneMapped: !1,
161
+ side: te
331
162
  },
332
163
  "inverted-mask"
333
164
  )
334
165
  ] })
335
- ] }) : /* @__PURE__ */ P(X, { children: [
336
- n && m && /* @__PURE__ */ P("mesh", { position: [0, 0, -0.01], renderOrder: i - 1, children: [
337
- /* @__PURE__ */ p("planeGeometry", { args: l }),
338
- /* @__PURE__ */ p(
166
+ ] }) : /* @__PURE__ */ L(re, { children: [
167
+ r && d && /* @__PURE__ */ L("mesh", { position: [0, 0, -0.01], renderOrder: a - 1, children: [
168
+ /* @__PURE__ */ g("planeGeometry", { args: m }),
169
+ /* @__PURE__ */ g(
339
170
  "meshBasicMaterial",
340
171
  {
341
- map: typeof n == "string" ? void 0 : n,
342
- color: typeof n == "string" ? n : void 0,
172
+ map: typeof r == "string" ? void 0 : r,
173
+ color: typeof r == "string" ? r : void 0,
343
174
  depthTest: !1,
344
175
  depthWrite: !1,
345
- toneMapped: !1
176
+ toneMapped: !1,
177
+ side: te
346
178
  }
347
179
  )
348
180
  ] }),
349
- /* @__PURE__ */ P("mesh", { position: [0, 0, 0], renderOrder: i, children: [
350
- /* @__PURE__ */ p("planeGeometry", { args: l }),
351
- /* @__PURE__ */ p(
181
+ /* @__PURE__ */ L("mesh", { position: [0, 0, 0], renderOrder: a, children: [
182
+ /* @__PURE__ */ g("planeGeometry", { args: m }),
183
+ /* @__PURE__ */ g(
352
184
  "meshBasicMaterial",
353
185
  {
354
- map: a,
355
- alphaMap: m,
186
+ map: c,
187
+ alphaMap: d,
356
188
  transparent: !1,
357
- alphaTest: m ? 0.5 : void 0,
189
+ alphaTest: d ? 0.5 : void 0,
358
190
  depthTest: !1,
359
191
  depthWrite: !1,
360
- toneMapped: !1
192
+ toneMapped: !1,
193
+ side: te
361
194
  },
362
- m ? "with-mask" : "no-mask"
195
+ d ? "with-mask" : "no-mask"
363
196
  )
364
197
  ] })
365
198
  ] }) }) : null;
366
- }, we = [
199
+ }, ve = ({
200
+ mask: e,
201
+ status: t,
202
+ error: s,
203
+ invert: r = !1,
204
+ fallback: a = "camera",
205
+ onStatusChange: n,
206
+ fit: i = "cover",
207
+ anchors: c = ct,
208
+ renderOrder: o = 100,
209
+ visible: l = !0,
210
+ maskFeather: h = 4,
211
+ maskErode: d = 0.7,
212
+ ...m
213
+ }) => {
214
+ const u = Fe();
215
+ if (_(() => {
216
+ n == null || n(t, s);
217
+ }, [t, s, n]), !u) return null;
218
+ const p = t === "ready" && e;
219
+ return !p && !ot(t, a) ? null : /* @__PURE__ */ g(
220
+ lt,
221
+ {
222
+ ...m,
223
+ source: { kind: "texture", texture: u },
224
+ fit: i,
225
+ anchors: c,
226
+ renderOrder: o,
227
+ visible: l,
228
+ maskTexture: p ? e : null,
229
+ maskChannel: "green",
230
+ maskInvert: r,
231
+ maskFeather: h,
232
+ maskErode: d
233
+ }
234
+ );
235
+ }, yt = ({ active: e = !0, ...t }) => {
236
+ const { texture: s, status: r, error: a } = it(e);
237
+ return /* @__PURE__ */ g(ve, { ...t, mask: s, status: r, error: a });
238
+ }, Mt = ({ bodyId: e, subject: t, numBodies: s, active: r = !0, ...a }) => {
239
+ const { texture: n, status: i, error: c } = nt({ bodyId: e, subject: t, numBodies: s, active: r });
240
+ return /* @__PURE__ */ g(ve, { ...a, mask: n, status: i, error: c });
241
+ }, ps = ({ bodyId: e, subject: t, numBodies: s, ...r }) => e !== void 0 || t ? /* @__PURE__ */ g(Mt, { ...r, bodyId: e, subject: t, numBodies: s }) : /* @__PURE__ */ g(yt, { ...r }), ie = 9, oe = 16, fs = ({ children: e }) => {
242
+ const [t, s] = x({ width: 0, height: 0 });
243
+ return _(() => {
244
+ const r = () => {
245
+ const a = document.documentElement.clientWidth, n = document.documentElement.clientHeight, i = a / n, c = ie / oe;
246
+ let o, l;
247
+ i > c ? (l = n, o = l * ie / oe) : (o = a, l = o * oe / ie), s({ width: o, height: l });
248
+ };
249
+ return r(), window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
250
+ }, []), /* @__PURE__ */ g(
251
+ "div",
252
+ {
253
+ style: {
254
+ width: "100vw",
255
+ height: `${window.innerHeight}px`,
256
+ display: "flex",
257
+ alignItems: "center",
258
+ justifyContent: "center",
259
+ backgroundColor: "#0d0d0d"
260
+ },
261
+ children: /* @__PURE__ */ g("div", { style: { width: t.width, height: t.height, position: "relative" }, children: e })
262
+ }
263
+ );
264
+ }, hs = ({ size: e = 0.25, ...t }) => /* @__PURE__ */ g("axesHelper", { args: [e], ...t }), Tt = { left: -1, right: 1, top: 1, bottom: -1 }, Et = (e, t, s) => {
265
+ const r = e % t, a = Math.floor(e / t);
266
+ return { x: r / t, y: (s - 1 - a) / s };
267
+ }, Rt = ({
268
+ sheet: e,
269
+ contentAspect: t,
270
+ renderOrder: s,
271
+ name: r
272
+ }) => {
273
+ const a = dt(e.url), n = F(0), i = F(-1), c = mt(), [o, l] = t != null ? ut(c, t) : [1, 1];
274
+ return st((h, d) => {
275
+ a.wrapS = Se, a.wrapT = Se, a.magFilter = ye, a.minFilter = ye, a.generateMipmaps = !1, a.repeat.set(1 / e.cols, 1 / e.rows), n.current += d;
276
+ const m = Math.floor(n.current * e.fps) % e.frames;
277
+ if (m === i.current) return;
278
+ i.current = m;
279
+ const { x: u, y: p } = Et(m, e.cols, e.rows);
280
+ a.offset.set(u, p);
281
+ }), /* @__PURE__ */ L("mesh", { name: r, renderOrder: s, scale: [o, l, 1], children: [
282
+ /* @__PURE__ */ g("planeGeometry", { args: [1, 1] }),
283
+ /* @__PURE__ */ g("meshBasicMaterial", { map: a, transparent: !0, toneMapped: !1, depthWrite: !1 })
284
+ ] });
285
+ }, gs = ({
286
+ sheet: e,
287
+ anchors: t = Tt,
288
+ contentAspect: s,
289
+ renderOrder: r = 10,
290
+ name: a = "spriteAnimation"
291
+ }) => /* @__PURE__ */ g(Xe, { fallback: null, children: /* @__PURE__ */ g(Ke, { anchors: t, children: /* @__PURE__ */ g(Rt, { sheet: e, contentAspect: s, renderOrder: r, name: a }) }) }), q = (e) => {
292
+ switch (e) {
293
+ case "start":
294
+ return "starting";
295
+ case "started":
296
+ case "resume":
297
+ return "recording";
298
+ case "pause":
299
+ return "paused";
300
+ case "stop":
301
+ return "stopping";
302
+ case "complete":
303
+ return "completed";
304
+ case "fail":
305
+ return "error";
306
+ case "clear":
307
+ return "idle";
308
+ }
309
+ }, bt = [
367
310
  "video/mp4",
368
311
  "video/webm;codecs=vp9",
369
312
  "video/webm;codecs=vp8",
370
313
  "video/webm"
371
314
  ];
372
- function $e(r = {}) {
373
- const { audio: e = !1, mimeType: t, bitsPerSecond: n, onData: i, onStop: c, passThroughStream: o } = r, a = y(null), s = y(null), u = y([]), [g, m] = W(!1), [l, M] = W(!1), [v, w] = W(null), [b, S] = W(null), d = F(() => {
374
- var T;
375
- const h = [t, ...we].filter(Boolean);
376
- for (const f of h)
377
- if ((T = MediaRecorder.isTypeSupported) != null && T.call(MediaRecorder, f)) return f;
378
- }, [t]), L = F(
379
- async (h) => {
380
- const T = new MediaStream();
381
- if (h.getTracks().forEach((f) => T.addTrack(f)), e) {
382
- let f;
383
- if (e instanceof MediaStream)
384
- f = e;
315
+ function Ss(e = {}) {
316
+ const {
317
+ audio: t = !1,
318
+ mimeType: s,
319
+ bitsPerSecond: r,
320
+ onData: a,
321
+ onStop: n,
322
+ onRecordingStart: i,
323
+ onRecordingPause: c,
324
+ onRecordingResume: o,
325
+ onRecordingStop: l,
326
+ onRecordingComplete: h,
327
+ onError: d,
328
+ passThroughStream: m
329
+ } = e, u = F(null), p = F(null), M = F([]), [E, f] = x("idle"), [S, b] = x(null), [X, A] = x(null), w = R(() => {
330
+ var C;
331
+ const y = [s, ...bt].filter(Boolean);
332
+ for (const T of y)
333
+ if ((C = MediaRecorder.isTypeSupported) != null && C.call(MediaRecorder, T)) return T;
334
+ }, [s]), G = R(
335
+ async (y) => {
336
+ const C = new MediaStream();
337
+ if (y.getTracks().forEach((T) => C.addTrack(T)), t) {
338
+ let T;
339
+ if (t instanceof MediaStream)
340
+ T = t;
385
341
  else {
386
- const E = typeof e == "object" ? { audio: e } : { audio: !0, video: !1 };
387
- f = await navigator.mediaDevices.getUserMedia(E);
342
+ const k = typeof t == "object" ? { audio: t } : { audio: !0, video: !1 };
343
+ T = await navigator.mediaDevices.getUserMedia(k);
388
344
  }
389
- f.getAudioTracks().forEach((E) => T.addTrack(E));
345
+ T.getAudioTracks().forEach((k) => C.addTrack(k));
390
346
  }
391
- if (!T.getTracks().length)
347
+ if (!C.getTracks().length)
392
348
  throw new Error("No tracks available in combined stream.");
393
- return s.current = T, T;
349
+ return p.current = C, C;
394
350
  },
395
- [e]
396
- ), N = F(
397
- async (h, T) => {
351
+ [t]
352
+ ), Y = R(
353
+ async (y, C) => {
354
+ f(q("start")), A(null), b(null);
398
355
  try {
399
- let f;
400
- o ? (f = h, s.current = f) : f = await L(h);
401
- const E = d(), D = {};
402
- E && (D.mimeType = E), n && (D.bitsPerSecond = n);
403
- const O = new MediaRecorder(f, D);
404
- O.ondataavailable = (x) => {
405
- var U;
406
- ((U = x.data) == null ? void 0 : U.size) > 0 && (u.current.push(x.data), i == null || i(x.data));
407
- }, O.onstop = () => {
408
- const x = new Blob(u.current, {
409
- type: E ?? "video/webm"
356
+ let T;
357
+ if (m)
358
+ T = m, p.current = T;
359
+ else {
360
+ if (!y) throw new Error("start(stream) requires a MediaStream.");
361
+ T = await G(y);
362
+ }
363
+ const k = w(), H = {};
364
+ k && (H.mimeType = k), r && (H.bitsPerSecond = r);
365
+ const K = new MediaRecorder(T, H);
366
+ K.ondataavailable = (N) => {
367
+ var $;
368
+ (($ = N.data) == null ? void 0 : $.size) > 0 && (M.current.push(N.data), a == null || a(N.data));
369
+ }, K.onstop = () => {
370
+ const N = new Blob(M.current, {
371
+ type: k ?? "video/webm"
410
372
  });
411
- w(x), c == null || c(x), u.current = [];
412
- }, a.current = O, O.start(T), m(!0), M(!1);
413
- } catch (f) {
414
- console.error("start(stream) failed", f), S(f instanceof Error ? f : new Error(String(f)));
373
+ b(N), n == null || n(N), h == null || h(N), M.current = [], f(q("complete"));
374
+ }, u.current = K, K.start(C), f(q("started")), i == null || i();
375
+ } catch (T) {
376
+ const k = T instanceof Error ? T : new Error(String(T));
377
+ console.error("start(stream) failed", k), A(k), f(q("fail")), d == null || d(k);
415
378
  }
416
379
  },
417
- [L, d, n, i, c, o]
418
- ), _ = F(() => {
419
- const h = a.current;
420
- h && h.state !== "inactive" && h.stop(), m(!1), M(!1);
421
- }, []), z = F(() => {
422
- const h = a.current;
423
- (h == null ? void 0 : h.state) === "recording" && (h.pause(), M(!0));
424
- }, []), B = F(() => {
425
- const h = a.current;
426
- (h == null ? void 0 : h.state) === "paused" && (h.resume(), M(!1));
427
- }, []), A = F(() => {
428
- var h, T;
380
+ [
381
+ G,
382
+ w,
383
+ r,
384
+ a,
385
+ n,
386
+ h,
387
+ i,
388
+ d,
389
+ m
390
+ ]
391
+ ), Q = R(() => {
392
+ const y = u.current;
393
+ !y || y.state === "inactive" || (f(q("stop")), y.stop(), l == null || l());
394
+ }, [l]), J = R(() => {
395
+ const y = u.current;
396
+ (y == null ? void 0 : y.state) === "recording" && (y.pause(), f(q("pause")), c == null || c());
397
+ }, [c]), ee = R(() => {
398
+ const y = u.current;
399
+ (y == null ? void 0 : y.state) === "paused" && (y.resume(), f(q("resume")), o == null || o());
400
+ }, [o]), z = R(() => {
401
+ var y;
429
402
  try {
430
- (h = a.current) == null || h.stop(), a.current = null, (T = s.current) == null || T.getTracks().forEach((f) => f.stop()), s.current = null, w(null), m(!1), M(!1), u.current = [], S(null);
431
- } catch (f) {
432
- console.error("clear failed", f);
403
+ u.current && (u.current.onstop = null, u.current.state !== "inactive" && u.current.stop()), u.current = null, (y = p.current) == null || y.getTracks().forEach((C) => C.stop()), p.current = null, b(null), f(q("clear")), M.current = [], A(null);
404
+ } catch (C) {
405
+ console.error("clear failed", C);
433
406
  }
434
407
  }, []);
435
- return k(() => () => A(), []), {
436
- start: N,
437
- stop: _,
438
- pause: z,
439
- resume: B,
440
- clear: A,
441
- isRecording: g,
442
- isPaused: l,
443
- recordedBlob: v,
444
- error: b,
445
- getActiveStream: () => s.current
408
+ return _(() => () => z(), []), {
409
+ status: E,
410
+ start: Y,
411
+ stop: Q,
412
+ pause: J,
413
+ resume: ee,
414
+ clear: z,
415
+ isRecording: E === "recording" || E === "paused",
416
+ isPaused: E === "paused",
417
+ recordedBlob: S,
418
+ error: X,
419
+ getActiveStream: () => p.current
446
420
  };
447
421
  }
448
- const Ge = (r, e) => {
449
- const t = r.split(","), n = t[0].match(/:(.*?);/), i = n ? n[1] : "application/octet-stream", c = atob(t[t.length - 1]);
450
- let o = c.length;
451
- const a = new Uint8Array(o);
452
- for (; o--; )
453
- a[o] = c.charCodeAt(o);
454
- return new File([a], e, { type: i });
455
- }, be = 4, Se = 50, xe = 5e3, j = (r) => new Promise((e) => {
456
- if (r.readyState >= 4) {
457
- e();
422
+ const At = async (e, t = {}) => {
423
+ var s, r, a;
424
+ (s = t.onCaptureStart) == null || s.call(t), await Promise.resolve();
425
+ try {
426
+ const n = e();
427
+ return (r = t.onCaptureComplete) == null || r.call(t, n), n;
428
+ } catch (n) {
429
+ const i = n instanceof Error ? n : new Error(String(n));
430
+ throw (a = t.onError) == null || a.call(t, i), i;
431
+ }
432
+ }, ys = (e = {}) => {
433
+ const { session: t } = Ie(), {
434
+ captureFrame: s = t.captureFrame,
435
+ onCaptureStart: r,
436
+ onCaptureComplete: a,
437
+ onError: n
438
+ } = e, [i, c] = x("idle"), [o, l] = x(null), [h, d] = x(null), m = R(async () => {
439
+ c("capturing"), l(null), d(null);
440
+ try {
441
+ const p = await At(s, {
442
+ onCaptureStart: r,
443
+ onCaptureComplete: a,
444
+ onError: n
445
+ });
446
+ return l(p), c("completed"), p;
447
+ } catch (p) {
448
+ const M = p instanceof Error ? p : new Error(String(p));
449
+ return d(M), c("error"), null;
450
+ }
451
+ }, [s, r, a, n]), u = R(() => {
452
+ c("idle"), l(null), d(null);
453
+ }, []);
454
+ return { status: i, capturePhoto: m, clear: u, dataUrl: o, error: h };
455
+ }, Ms = (e, t) => {
456
+ const s = e.split(","), r = s[0].match(/:(.*?);/), a = r ? r[1] : "application/octet-stream", n = atob(s[s.length - 1]);
457
+ let i = n.length;
458
+ const c = new Uint8Array(i);
459
+ for (; i--; )
460
+ c[i] = n.charCodeAt(i);
461
+ return new File([c], t, { type: a });
462
+ }, Ft = 4, Ct = 50, vt = 5e3, se = (e) => Math.min(1, Math.max(0, e)), Me = (e) => new Promise((t) => {
463
+ if (e.readyState >= 4) {
464
+ t();
458
465
  return;
459
466
  }
460
- let t = !1;
461
- const n = () => {
462
- t || (t = !0, e());
467
+ let s = !1;
468
+ const r = () => {
469
+ s || (s = !0, t());
463
470
  };
464
- r.addEventListener("canplaythrough", n, { once: !0 }), r.addEventListener("error", n, { once: !0 }), setTimeout(n, xe);
465
- }), V = (r, e) => {
466
- const t = document.createElement("audio");
467
- return t.src = r, t.loop = e, t.preload = "auto", t.setAttribute("playsinline", ""), t.setAttribute("webkit-playsinline", ""), t.load(), t;
468
- }, Ce = (r) => {
469
- r.muted = !0, r.play().then(() => {
470
- r.pause(), r.currentTime = 0, r.muted = !1;
471
+ e.addEventListener("canplaythrough", r, { once: !0 }), e.addEventListener("error", r, { once: !0 }), setTimeout(r, vt);
472
+ }), Te = (e, t) => {
473
+ const s = document.createElement("audio");
474
+ return s.src = e, s.loop = t, s.preload = "auto", s.setAttribute("playsinline", ""), s.setAttribute("webkit-playsinline", ""), s.load(), s;
475
+ }, kt = (e) => {
476
+ e.muted = !0, e.play().then(() => {
477
+ e.pause(), e.currentTime = 0, e.muted = !1;
471
478
  }).catch(() => {
472
- r.muted = !1;
479
+ e.muted = !1;
473
480
  });
474
481
  };
475
- class Ee {
476
- constructor(e = {}) {
477
- R(this, "sfxPoolSize");
478
- R(this, "coalesceMs");
479
- R(this, "muted", !0);
480
- R(this, "listeners", /* @__PURE__ */ new Set());
481
- R(this, "music", null);
482
- R(this, "musicWanted", null);
483
- R(this, "pools", /* @__PURE__ */ new Map());
482
+ class _t {
483
+ constructor(t = {}) {
484
+ U(this, "sfxPoolSize");
485
+ U(this, "coalesceMs");
486
+ U(this, "muted", !0);
487
+ U(this, "listeners", /* @__PURE__ */ new Set());
488
+ U(this, "music", null);
489
+ U(this, "musicUrl", null);
490
+ U(this, "musicReady", null);
491
+ U(this, "musicWanted", null);
492
+ U(this, "pools", /* @__PURE__ */ new Map());
484
493
  /** Last play time per SFX URL, for the coalesce window. */
485
- R(this, "lastPlayed", /* @__PURE__ */ new Map());
494
+ U(this, "lastPlayed", /* @__PURE__ */ new Map());
486
495
  /** Readiness promises so a loading gate can await decode/buffer. */
487
- R(this, "ready", /* @__PURE__ */ new Map());
488
- this.sfxPoolSize = e.sfxPoolSize ?? be, this.coalesceMs = e.coalesceMs ?? Se;
496
+ U(this, "ready", /* @__PURE__ */ new Map());
497
+ this.sfxPoolSize = t.sfxPoolSize ?? Ft, this.coalesceMs = t.coalesceMs ?? Ct;
489
498
  }
490
499
  /**
491
500
  * Create + buffer the looping music element. Await in the loading gate so the
492
501
  * unmute tap is instant. Idempotent per URL (re-requesting the same track is
493
502
  * a no-op that returns the in-flight promise).
494
503
  */
495
- prefetchMusic(e, t = 0.4) {
496
- this.musicWanted = { url: e, volume: t };
497
- const n = `music:${e}`, i = this.ready.get(n);
498
- if (i) return i;
499
- this.music = V(e, !0), this.music.volume = t;
500
- const c = j(this.music);
501
- return this.ready.set(n, c), c;
504
+ prefetchMusic(t, s = 0.4) {
505
+ const r = se(s);
506
+ if (this.musicWanted = { url: t, volume: r }, this.musicUrl === t && this.musicReady)
507
+ return this.music && (this.music.volume = r), this.musicReady;
508
+ this.music && (this.music.pause(), this.music.currentTime = 0, this.music.removeAttribute("src"), this.music.load()), this.music = Te(t, !0), this.musicUrl = t, this.music.volume = r;
509
+ const a = Me(this.music);
510
+ return this.musicReady = a, a;
502
511
  }
503
512
  /**
504
513
  * Create + buffer an SFX voice pool (round-robin so overlapping plays don't
505
514
  * cut each other off). Returns a promise that resolves when the first element
506
515
  * buffers. Idempotent per URL.
507
516
  */
508
- registerSound(e, t = 1) {
509
- const n = this.ready.get(e);
510
- if (n) return n;
511
- const i = [];
512
- for (let o = 0; o < this.sfxPoolSize; o += 1) {
513
- const a = V(e, !1);
514
- a.volume = t, a.addEventListener("ended", () => {
515
- a.currentTime = 0;
516
- }), i.push(a);
517
+ registerSound(t, s = 1) {
518
+ const r = this.ready.get(t);
519
+ if (r) return r;
520
+ const a = se(s), n = [];
521
+ for (let c = 0; c < this.sfxPoolSize; c += 1) {
522
+ const o = Te(t, !1);
523
+ o.volume = a, o.addEventListener("ended", () => {
524
+ o.currentTime = 0;
525
+ }), n.push(o);
517
526
  }
518
- this.pools.set(e, { els: i, next: 0, volume: t });
519
- const c = j(i[0]);
520
- return this.ready.set(e, c), c;
527
+ this.pools.set(t, { els: n, next: 0, volume: a });
528
+ const i = Me(n[0]);
529
+ return this.ready.set(t, i), i;
521
530
  }
522
531
  /** Subscribe to mute-state changes (for a toggle UI). Fires immediately with
523
532
  * the current state. Returns an unsubscribe. */
524
- onMuteChange(e) {
525
- return this.listeners.add(e), e(this.muted), () => this.listeners.delete(e);
533
+ onMuteChange(t) {
534
+ return this.listeners.add(t), t(this.muted), () => this.listeners.delete(t);
526
535
  }
527
536
  isMuted() {
528
537
  return this.muted;
@@ -533,8 +542,8 @@ class Ee {
533
542
  * element with a muted play/pause so later `playOneShot` calls are allowed,
534
543
  * then start the music. All elements are already buffered, so this is instant.
535
544
  */
536
- setMuted(e) {
537
- e !== this.muted && (this.muted = e, this.muted || this.pools.forEach((t) => t.els.forEach(Ce)), this.applyMusic(), this.listeners.forEach((t) => t(this.muted)));
545
+ setMuted(t) {
546
+ t !== this.muted && (this.muted = t, this.muted || this.pools.forEach((s) => s.els.forEach(kt)), this.applyMusic(), this.listeners.forEach((s) => s(this.muted)));
538
547
  }
539
548
  toggleMuted() {
540
549
  this.setMuted(!this.muted);
@@ -545,29 +554,30 @@ class Ee {
545
554
  * same sound into one play, and does NO synchronous `currentTime` seek on a
546
555
  * ready element (the pool rewinds on `ended`, off the hot path).
547
556
  */
548
- playOneShot(e, t) {
557
+ playOneShot(t, s) {
549
558
  if (this.muted) return;
550
- const n = this.pools.get(e);
551
- if (!n) return;
552
- const i = performance.now();
553
- if (i - (this.lastPlayed.get(e) ?? -1 / 0) < this.coalesceMs) return;
554
- this.lastPlayed.set(e, i);
555
- const c = n.els.length;
556
- let o;
557
- for (let a = 0; a < c; a += 1) {
558
- const s = n.els[(n.next + a) % c];
559
- if (s.paused) {
560
- o = s, n.next = (n.next + a + 1) % c;
559
+ const r = this.pools.get(t);
560
+ if (!r) return;
561
+ const a = performance.now();
562
+ if (a - (this.lastPlayed.get(t) ?? -1 / 0) < this.coalesceMs) return;
563
+ this.lastPlayed.set(t, a);
564
+ const n = r.els.length;
565
+ let i;
566
+ for (let c = 0; c < n; c += 1) {
567
+ const o = r.els[(r.next + c) % n];
568
+ if (o.paused) {
569
+ i = o, r.next = (r.next + c + 1) % n;
561
570
  break;
562
571
  }
563
572
  }
564
- o || (o = n.els[n.next], n.next = (n.next + 1) % c), o.muted = !1, o.volume = t ?? n.volume, o.currentTime !== 0 && (o.currentTime = 0), o.play().catch(() => {
573
+ i || (i = r.els[r.next], r.next = (r.next + 1) % n), i.muted = !1, i.volume = se(s ?? r.volume), i.currentTime !== 0 && (i.currentTime = 0), i.play().catch(() => {
565
574
  });
566
575
  }
567
576
  /** Request the looping background track (buffer it with prefetchMusic, which
568
577
  * a loading gate awaits). Remembered while muted; starts on unmute. */
569
- startMusic(e, t = 0.4) {
570
- this.musicWanted = { url: e, volume: t }, this.applyMusic();
578
+ startMusic(t, s = 0.4) {
579
+ const r = se(s);
580
+ this.musicUrl !== t && this.prefetchMusic(t, r), this.musicWanted = { url: t, volume: r }, this.applyMusic();
571
581
  }
572
582
  stopMusic() {
573
583
  this.musicWanted = null, this.music && (this.music.pause(), this.music.currentTime = 0);
@@ -577,36 +587,857 @@ class Ee {
577
587
  }), this.muted && !this.music.paused && this.music.pause());
578
588
  }
579
589
  }
580
- const C = new Ee(), Xe = (r, e) => C.prefetchMusic(r, e), qe = (r, e) => C.registerSound(r, e), He = (r, e) => C.startMusic(r, e), Ze = () => C.stopMusic(), je = (r, e) => C.playOneShot(r, e), Ve = (r) => C.setMuted(r), Ye = () => C.toggleMuted(), Ke = () => C.isMuted(), Je = (r) => C.onMuteChange(r), Qe = () => {
581
- const [r, e] = W(C.isMuted());
582
- return k(() => C.onMuteChange(e), []), r;
590
+ const xt = (e, t, s) => e === "infinite" || e === "loop" && t < Math.max(1, Math.floor(s)) ? "replay" : "ended", wt = (e, t, s) => e && t !== s, Ut = (e) => Math.min(100, Math.max(0, e)) / 100, Ts = He(function({
591
+ src: t,
592
+ playMode: s = "once",
593
+ loopCount: r = 1,
594
+ autoplay: a = !1,
595
+ muted: n = !1,
596
+ volume: i = 100,
597
+ preload: c = "auto",
598
+ onReady: o,
599
+ onPlay: l,
600
+ onPause: h,
601
+ onEnded: d,
602
+ onError: m
603
+ }, u) {
604
+ const p = F(null), M = F(0), E = F(null), f = R(async () => {
605
+ const A = p.current;
606
+ if (A)
607
+ try {
608
+ await A.play();
609
+ } catch (w) {
610
+ const G = w instanceof Error ? w : new Error(String(w));
611
+ throw m == null || m(G), G;
612
+ }
613
+ }, [m]), S = R(() => {
614
+ var A;
615
+ return (A = p.current) == null ? void 0 : A.pause();
616
+ }, []), b = R(() => {
617
+ const A = p.current;
618
+ A && (A.pause(), A.currentTime = 0, M.current = 0);
619
+ }, []);
620
+ ze(
621
+ u,
622
+ () => ({
623
+ play: f,
624
+ pause: S,
625
+ stop: b,
626
+ get current() {
627
+ return p.current;
628
+ }
629
+ }),
630
+ [S, f, b]
631
+ ), _(() => {
632
+ M.current = 0, E.current = null;
633
+ }, [t]), _(() => {
634
+ p.current && (p.current.volume = Ut(i));
635
+ }, [i]), _(() => {
636
+ wt(a, E.current, t) && (E.current = t, f().catch(() => {
637
+ }));
638
+ }, [a, t]);
639
+ const X = R(() => {
640
+ M.current += 1;
641
+ const A = Math.max(1, Math.floor(r));
642
+ if (xt(s, M.current, A) === "replay") {
643
+ const w = p.current;
644
+ w && (w.currentTime = 0, f().catch(() => {
645
+ }));
646
+ return;
647
+ }
648
+ M.current = 0, d == null || d();
649
+ }, [r, d, f, s]);
650
+ return /* @__PURE__ */ g(
651
+ "audio",
652
+ {
653
+ ref: p,
654
+ src: t,
655
+ preload: c,
656
+ autoPlay: !1,
657
+ muted: n,
658
+ loop: !1,
659
+ playsInline: !0,
660
+ style: { display: "none" },
661
+ onCanPlayThrough: o,
662
+ onPlay: l,
663
+ onPause: h,
664
+ onEnded: X,
665
+ onError: () => m == null ? void 0 : m(new Error(`Unable to load audio: ${t}`))
666
+ }
667
+ );
668
+ }), D = new _t(), Es = (e, t) => D.prefetchMusic(e, t), Rs = (e, t) => D.registerSound(e, t), bs = (e, t) => D.startMusic(e, t), As = () => D.stopMusic(), Fs = (e, t) => D.playOneShot(e, t), Cs = (e) => D.setMuted(e), vs = () => D.toggleMuted(), ks = () => D.isMuted(), _s = (e) => D.onMuteChange(e), xs = () => {
669
+ const [e, t] = x(D.isMuted());
670
+ return _(() => D.onMuteChange(t), []), e;
671
+ }, Pt = (e = {}) => {
672
+ const { auto: t = !1 } = e, s = F(e.env ?? Le()), r = F(e.constraints);
673
+ r.current = e.constraints;
674
+ const [a, n] = x("unknown"), [i, c] = x(null), o = F(0), l = R(async () => {
675
+ const d = ++o.current, m = await Oe(s.current);
676
+ if (d !== o.current) return a;
677
+ const u = m.state === "unknown" ? "unknown" : m.state;
678
+ return n((p) => p === "requesting" ? p : u), u !== "blocked" && c(null), u;
679
+ }, []), h = R(
680
+ async (d) => {
681
+ const m = ++o.current;
682
+ n("requesting"), c(null);
683
+ const u = await Ge(
684
+ { constraints: (d == null ? void 0 : d.constraints) ?? r.current, keepStream: !1 },
685
+ s.current
686
+ );
687
+ return m !== o.current || (n(u.state), c(u.reason)), u.state;
688
+ },
689
+ []
690
+ );
691
+ return _(() => {
692
+ let d = () => {
693
+ }, m = !0;
694
+ return t ? h() : l(), qe((u) => {
695
+ m && (n((p) => p === "requesting" ? p : u.state === "unknown" ? "unknown" : u.state), u.state !== "blocked" && c(null));
696
+ }, s.current).then((u) => {
697
+ m ? d = u : u();
698
+ }), () => {
699
+ m = !1, o.current += 1, d();
700
+ };
701
+ }, [t, l, h]), Z(
702
+ () => ({
703
+ state: a,
704
+ reason: i,
705
+ canPrompt: Be(a),
706
+ usable: a === "granted",
707
+ request: h,
708
+ refresh: l
709
+ }),
710
+ [a, i, h, l]
711
+ );
712
+ }, Dt = {
713
+ display: "flex",
714
+ flexDirection: "column",
715
+ alignItems: "center",
716
+ justifyContent: "center",
717
+ gap: 12,
718
+ height: "100%",
719
+ minHeight: 160,
720
+ padding: 24,
721
+ textAlign: "center",
722
+ background: "#111827",
723
+ color: "#f9fafb",
724
+ fontFamily: "system-ui, sans-serif"
725
+ }, Nt = {
726
+ font: "inherit",
727
+ padding: "10px 18px",
728
+ borderRadius: 8,
729
+ border: "1px solid rgba(255,255,255,0.3)",
730
+ background: "#2563eb",
731
+ color: "#fff",
732
+ cursor: "pointer"
733
+ }, ws = ({
734
+ children: e,
735
+ fallback: t,
736
+ auto: s = !1,
737
+ constraints: r,
738
+ requestLabel: a = "Allow camera"
739
+ }) => {
740
+ const n = Pt({ auto: s, constraints: r });
741
+ if (n.usable) return /* @__PURE__ */ g(re, { children: e });
742
+ if (t) return /* @__PURE__ */ g(re, { children: t(n) });
743
+ const { state: i, reason: c, canPrompt: o, request: l } = n;
744
+ return /* @__PURE__ */ L("div", { style: Dt, role: "region", "aria-label": "Camera access", children: [
745
+ /* @__PURE__ */ g("p", { "aria-live": "polite", style: { margin: 0 }, children: (c == null ? void 0 : c.message) ?? We[i] }),
746
+ /* @__PURE__ */ g(
747
+ "button",
748
+ {
749
+ type: "button",
750
+ onClick: () => void l(),
751
+ disabled: !o || i === "requesting",
752
+ "aria-disabled": !o || i === "requesting",
753
+ style: { ...Nt, opacity: o && i !== "requesting" ? 1 : 0.5 },
754
+ children: i === "requesting" ? "Waiting…" : i === "denied" ? "Try again" : a
755
+ }
756
+ )
757
+ ] });
758
+ }, It = () => {
759
+ var e;
760
+ return {
761
+ enumerateDevices: typeof navigator < "u" && ((e = navigator.mediaDevices) != null && e.enumerateDevices) ? () => navigator.mediaDevices.enumerateDevices() : void 0
762
+ };
763
+ }, Lt = /\b(back|rear|environment|world)\b/i, Ot = /\b(front|user|facetime|selfie)\b/i, Gt = (e) => Lt.test(e) ? "environment" : Ot.test(e) ? "user" : null, Us = async (e = It()) => {
764
+ if (!e.enumerateDevices) return [];
765
+ try {
766
+ return (await e.enumerateDevices()).filter((s) => s.kind === "videoinput").map((s) => ({
767
+ deviceId: s.deviceId,
768
+ label: s.label,
769
+ facing: Gt(s.label)
770
+ }));
771
+ } catch {
772
+ return [];
773
+ }
774
+ }, Ps = (e, t) => e.find((s) => s.facing === t) ?? null, ke = je(null), Ds = ({
775
+ cache: e,
776
+ disposeUnreferencedOnUnmount: t = !0,
777
+ children: s
778
+ }) => {
779
+ const r = e ?? Ce();
780
+ return _(() => () => {
781
+ t && r.disposeUnreferenced();
782
+ }, [r, t]), /* @__PURE__ */ g(ke.Provider, { value: r, children: s });
783
+ }, _e = () => $e(ke) ?? Ce(), Ns = (e, t = {}) => {
784
+ const { enabled: s = !0 } = t, r = _e(), a = Ve(), n = (e == null ? void 0 : e.key) ?? null, [i, c] = x({
785
+ value: null,
786
+ status: "idle",
787
+ error: null
788
+ });
789
+ return _(() => {
790
+ if (!e || !s) {
791
+ c({ value: null, status: "idle", error: null });
792
+ return;
793
+ }
794
+ let o = !0;
795
+ const l = r.get(e.key);
796
+ return c({ value: l ?? null, status: l ? "ready" : "loading", error: null }), r.acquire(e, a).then((h) => {
797
+ o && c({ value: h, status: "ready", error: null });
798
+ }).catch((h) => {
799
+ o && c({ value: null, status: "error", error: h });
800
+ }), () => {
801
+ o = !1, r.release(e.key, a);
802
+ };
803
+ }, [r, n, s, a]), i;
804
+ }, Is = (e) => {
805
+ const t = _e(), s = e ?? t;
806
+ return Ze(
807
+ (r) => s.subscribe(r),
808
+ () => s.getStats(),
809
+ () => s.getStats()
810
+ );
811
+ }, ae = 1, xe = Object.freeze({
812
+ version: ae,
813
+ trackers: {
814
+ face: { enabled: !0, numFaces: 1, targetFps: null, holdMs: 250, predictMs: 0, smoothing: 0 },
815
+ hand: { enabled: !1, targetFps: null },
816
+ gesture: { enabled: !1, targetFps: null },
817
+ body: { enabled: !1, targetFps: null },
818
+ holistic: {
819
+ enabled: !1,
820
+ targetFps: null,
821
+ hands: "both",
822
+ holdMs: 250,
823
+ predictMs: 0,
824
+ analysisMaxDimension: 768,
825
+ outputFaceBlendshapes: !0,
826
+ confidence: 0.5,
827
+ delegate: "auto"
828
+ },
829
+ segmentation: { enabled: !1, quality: "low" },
830
+ semanticSegmentation: { enabled: !1, preset: "multiclass", quality: "medium" }
831
+ },
832
+ perf: { targetFps: 24, camRes: 720, cameraZoom: 1.2, analysisScale: 1 },
833
+ lifecycle: { pauseWhenHidden: !1 },
834
+ quality: {},
835
+ camera: { facingMode: "user", deviceId: null, mirrored: "auto" },
836
+ fallbacks: { onUnsupported: "degrade", delegate: "auto" },
837
+ assets: { holisticModelUrl: null, semanticSegmentationModelUrl: null },
838
+ updatedAt: 0
839
+ }), P = (e, t, s, r, a, n) => {
840
+ if (e === void 0) return t;
841
+ if (typeof e != "number" || !Number.isFinite(e))
842
+ return n(`${a}: not a number, kept ${t}`), t;
843
+ const i = Math.min(r, Math.max(s, e));
844
+ return i !== e && n(`${a}: ${e} clamped to ${i}`), i;
845
+ }, j = (e, t, s, r) => e === void 0 ? t : e === null ? null : typeof e != "number" || !Number.isFinite(e) || e <= 0 ? (r(`${s}: invalid fps, kept ${t}`), t) : (e > 120 && r(`${s}: ${e} clamped to 120`), Math.min(120, e)), qt = [
846
+ "tiers",
847
+ "budget",
848
+ "initialTier",
849
+ "minTier",
850
+ "maxTier",
851
+ "adaptive",
852
+ "historySize"
853
+ ], Ee = (e) => {
854
+ const t = {};
855
+ for (const s of qt) e[s] !== void 0 && (t[s] = e[s]);
856
+ return t;
857
+ }, I = (e, t, s, r) => e === void 0 ? t : typeof e != "boolean" ? (r(`${s}: not a boolean, kept ${t}`), t) : e, B = (e, t, s, r, a) => e === void 0 ? s : t.includes(e) ? e : (a(`${r}: "${String(e)}" is not one of ${t.join(" | ")}, kept ${s}`), s), Re = (e, t, s, r) => e === void 0 ? t : e === null ? null : typeof e != "string" || !/^https?:\/\//.test(e) ? (r(`${s}: not an http(s) URL, kept ${t === null ? "the SDK default" : t}`), t) : e, W = (e = {}, t = xe, s = []) => {
858
+ var c, o, l, h, d, m, u, p, M, E, f, S, b, X, A, w, G, Y, Q, J, ee, z, y, C, T, k, H, K, N, $, le, ue, de, me, pe, fe, he, ge;
859
+ const r = (Pe) => s.push(Pe), a = e.trackers ?? {}, n = t.trackers, i = e.quality === void 0 ? t.quality === !1 ? !1 : Ee(t.quality) : e.quality === !1 ? !1 : typeof e.quality == "object" && e.quality !== null ? Ee(e.quality) : (r("quality: must be an object or false, kept base"), t.quality);
860
+ return {
861
+ version: ae,
862
+ trackers: {
863
+ face: {
864
+ enabled: I((c = a.face) == null ? void 0 : c.enabled, n.face.enabled, "trackers.face.enabled", r),
865
+ numFaces: Math.round(
866
+ P((o = a.face) == null ? void 0 : o.numFaces, n.face.numFaces, 1, 10, "trackers.face.numFaces", r)
867
+ ),
868
+ targetFps: j((l = a.face) == null ? void 0 : l.targetFps, n.face.targetFps, "trackers.face.targetFps", r),
869
+ holdMs: P((h = a.face) == null ? void 0 : h.holdMs, n.face.holdMs, 0, 5e3, "trackers.face.holdMs", r),
870
+ predictMs: P(
871
+ (d = a.face) == null ? void 0 : d.predictMs,
872
+ n.face.predictMs,
873
+ 0,
874
+ 1e3,
875
+ "trackers.face.predictMs",
876
+ r
877
+ ),
878
+ smoothing: P(
879
+ (m = a.face) == null ? void 0 : m.smoothing,
880
+ n.face.smoothing,
881
+ 0,
882
+ 100,
883
+ "trackers.face.smoothing",
884
+ r
885
+ )
886
+ },
887
+ hand: {
888
+ enabled: I((u = a.hand) == null ? void 0 : u.enabled, n.hand.enabled, "trackers.hand.enabled", r),
889
+ targetFps: j((p = a.hand) == null ? void 0 : p.targetFps, n.hand.targetFps, "trackers.hand.targetFps", r)
890
+ },
891
+ gesture: {
892
+ enabled: I((M = a.gesture) == null ? void 0 : M.enabled, n.gesture.enabled, "trackers.gesture.enabled", r),
893
+ targetFps: j(
894
+ (E = a.gesture) == null ? void 0 : E.targetFps,
895
+ n.gesture.targetFps,
896
+ "trackers.gesture.targetFps",
897
+ r
898
+ )
899
+ },
900
+ body: {
901
+ enabled: I((f = a.body) == null ? void 0 : f.enabled, n.body.enabled, "trackers.body.enabled", r),
902
+ targetFps: j((S = a.body) == null ? void 0 : S.targetFps, n.body.targetFps, "trackers.body.targetFps", r)
903
+ },
904
+ holistic: {
905
+ enabled: I((b = a.holistic) == null ? void 0 : b.enabled, n.holistic.enabled, "trackers.holistic.enabled", r),
906
+ targetFps: j(
907
+ (X = a.holistic) == null ? void 0 : X.targetFps,
908
+ n.holistic.targetFps,
909
+ "trackers.holistic.targetFps",
910
+ r
911
+ ),
912
+ hands: B(
913
+ (A = a.holistic) == null ? void 0 : A.hands,
914
+ ["both", "left", "right", "none"],
915
+ n.holistic.hands,
916
+ "trackers.holistic.hands",
917
+ r
918
+ ),
919
+ holdMs: P(
920
+ (w = a.holistic) == null ? void 0 : w.holdMs,
921
+ n.holistic.holdMs,
922
+ 0,
923
+ 5e3,
924
+ "trackers.holistic.holdMs",
925
+ r
926
+ ),
927
+ predictMs: P(
928
+ (G = a.holistic) == null ? void 0 : G.predictMs,
929
+ n.holistic.predictMs,
930
+ 0,
931
+ 1e3,
932
+ "trackers.holistic.predictMs",
933
+ r
934
+ ),
935
+ analysisMaxDimension: Math.round(
936
+ P(
937
+ (Y = a.holistic) == null ? void 0 : Y.analysisMaxDimension,
938
+ n.holistic.analysisMaxDimension,
939
+ 128,
940
+ 2048,
941
+ "trackers.holistic.analysisMaxDimension",
942
+ r
943
+ )
944
+ ),
945
+ outputFaceBlendshapes: I(
946
+ (Q = a.holistic) == null ? void 0 : Q.outputFaceBlendshapes,
947
+ n.holistic.outputFaceBlendshapes,
948
+ "trackers.holistic.outputFaceBlendshapes",
949
+ r
950
+ ),
951
+ confidence: P(
952
+ (J = a.holistic) == null ? void 0 : J.confidence,
953
+ n.holistic.confidence,
954
+ 0,
955
+ 1,
956
+ "trackers.holistic.confidence",
957
+ r
958
+ ),
959
+ delegate: B(
960
+ (ee = a.holistic) == null ? void 0 : ee.delegate,
961
+ ["auto", "GPU", "CPU"],
962
+ n.holistic.delegate,
963
+ "trackers.holistic.delegate",
964
+ r
965
+ )
966
+ },
967
+ segmentation: {
968
+ enabled: I(
969
+ (z = a.segmentation) == null ? void 0 : z.enabled,
970
+ n.segmentation.enabled,
971
+ "trackers.segmentation.enabled",
972
+ r
973
+ ),
974
+ quality: B(
975
+ (y = a.segmentation) == null ? void 0 : y.quality,
976
+ ["low", "medium", "high"],
977
+ n.segmentation.quality,
978
+ "trackers.segmentation.quality",
979
+ r
980
+ )
981
+ },
982
+ semanticSegmentation: {
983
+ enabled: I(
984
+ (C = a.semanticSegmentation) == null ? void 0 : C.enabled,
985
+ n.semanticSegmentation.enabled,
986
+ "trackers.semanticSegmentation.enabled",
987
+ r
988
+ ),
989
+ preset: B(
990
+ (T = a.semanticSegmentation) == null ? void 0 : T.preset,
991
+ pt,
992
+ n.semanticSegmentation.preset,
993
+ "trackers.semanticSegmentation.preset",
994
+ r
995
+ ),
996
+ quality: B(
997
+ (k = a.semanticSegmentation) == null ? void 0 : k.quality,
998
+ ["low", "medium", "high"],
999
+ n.semanticSegmentation.quality,
1000
+ "trackers.semanticSegmentation.quality",
1001
+ r
1002
+ )
1003
+ }
1004
+ },
1005
+ perf: {
1006
+ targetFps: P((H = e.perf) == null ? void 0 : H.targetFps, t.perf.targetFps, 0, 120, "perf.targetFps", r),
1007
+ camRes: Math.round(P((K = e.perf) == null ? void 0 : K.camRes, t.perf.camRes, 160, 3840, "perf.camRes", r)),
1008
+ cameraZoom: P((N = e.perf) == null ? void 0 : N.cameraZoom, t.perf.cameraZoom, 1, 3, "perf.cameraZoom", r),
1009
+ analysisScale: P(
1010
+ ($ = e.perf) == null ? void 0 : $.analysisScale,
1011
+ t.perf.analysisScale,
1012
+ 0.25,
1013
+ 1,
1014
+ "perf.analysisScale",
1015
+ r
1016
+ )
1017
+ },
1018
+ lifecycle: {
1019
+ pauseWhenHidden: I(
1020
+ (le = e.lifecycle) == null ? void 0 : le.pauseWhenHidden,
1021
+ t.lifecycle.pauseWhenHidden,
1022
+ "lifecycle.pauseWhenHidden",
1023
+ r
1024
+ )
1025
+ },
1026
+ quality: i,
1027
+ camera: {
1028
+ facingMode: B(
1029
+ (ue = e.camera) == null ? void 0 : ue.facingMode,
1030
+ ["user", "environment"],
1031
+ t.camera.facingMode,
1032
+ "camera.facingMode",
1033
+ r
1034
+ ),
1035
+ deviceId: ((de = e.camera) == null ? void 0 : de.deviceId) === void 0 ? t.camera.deviceId : typeof e.camera.deviceId == "string" || e.camera.deviceId === null ? e.camera.deviceId : (r("camera.deviceId: not a string, kept base"), t.camera.deviceId),
1036
+ mirrored: ((me = e.camera) == null ? void 0 : me.mirrored) === void 0 ? t.camera.mirrored : e.camera.mirrored === "auto" || typeof e.camera.mirrored == "boolean" ? e.camera.mirrored : (r('camera.mirrored: must be boolean or "auto", kept base'), t.camera.mirrored)
1037
+ },
1038
+ fallbacks: {
1039
+ onUnsupported: B(
1040
+ (pe = e.fallbacks) == null ? void 0 : pe.onUnsupported,
1041
+ ["block", "degrade"],
1042
+ t.fallbacks.onUnsupported,
1043
+ "fallbacks.onUnsupported",
1044
+ r
1045
+ ),
1046
+ delegate: B(
1047
+ (fe = e.fallbacks) == null ? void 0 : fe.delegate,
1048
+ ["auto", "GPU", "CPU"],
1049
+ t.fallbacks.delegate,
1050
+ "fallbacks.delegate",
1051
+ r
1052
+ )
1053
+ },
1054
+ assets: {
1055
+ holisticModelUrl: Re(
1056
+ (he = e.assets) == null ? void 0 : he.holisticModelUrl,
1057
+ t.assets.holisticModelUrl,
1058
+ "assets.holisticModelUrl",
1059
+ r
1060
+ ),
1061
+ semanticSegmentationModelUrl: Re(
1062
+ (ge = e.assets) == null ? void 0 : ge.semanticSegmentationModelUrl,
1063
+ t.assets.semanticSegmentationModelUrl,
1064
+ "assets.semanticSegmentationModelUrl",
1065
+ r
1066
+ )
1067
+ },
1068
+ updatedAt: typeof e.updatedAt == "number" && Number.isFinite(e.updatedAt) ? e.updatedAt : t.updatedAt
1069
+ };
1070
+ }, be = (e, t, s = Date.now()) => W({ ...t, updatedAt: s }, e), we = (e) => JSON.stringify(W({}, e)), Ue = (e) => {
1071
+ const t = [];
1072
+ let s = e;
1073
+ if (typeof e == "string")
1074
+ try {
1075
+ s = JSON.parse(e);
1076
+ } catch {
1077
+ return {
1078
+ config: W(),
1079
+ migrated: !0,
1080
+ warnings: ["not valid JSON; defaults used"]
1081
+ };
1082
+ }
1083
+ if (!s || typeof s != "object")
1084
+ return {
1085
+ config: W(),
1086
+ migrated: !0,
1087
+ warnings: ["not an object; defaults used"]
1088
+ };
1089
+ const r = s, a = r.version !== ae;
1090
+ return a && t.push(
1091
+ `migrated from version ${String(r.version ?? "none")} to ${ae}`
1092
+ ), { config: W(r, xe, t), migrated: a, warnings: t };
1093
+ }, Ls = [
1094
+ "face",
1095
+ "hand",
1096
+ "gesture",
1097
+ "body",
1098
+ "holistic",
1099
+ "segmentation",
1100
+ "semanticSegmentation"
1101
+ ], Bt = (e) => ({
1102
+ perf: {
1103
+ targetFps: e.perf.targetFps > 0 ? e.perf.targetFps : void 0,
1104
+ camRes: e.perf.camRes,
1105
+ cameraZoom: e.perf.cameraZoom,
1106
+ analysisScale: e.perf.analysisScale
1107
+ },
1108
+ lifecycle: { pauseWhenHidden: e.lifecycle.pauseWhenHidden },
1109
+ quality: e.quality
1110
+ }), Wt = (e) => ({
1111
+ facingMode: e.camera.facingMode,
1112
+ ...e.camera.deviceId ? { deviceId: e.camera.deviceId } : {},
1113
+ ...e.camera.mirrored === "auto" ? {} : { mirrored: e.camera.mirrored }
1114
+ }), O = (e) => e === null ? {} : { targetFps: e }, Kt = (e, t) => {
1115
+ const s = e.trackers;
1116
+ return {
1117
+ face: {
1118
+ numFaces: s.face.numFaces,
1119
+ ...O(s.face.targetFps),
1120
+ holdMs: s.face.holdMs,
1121
+ predictMs: s.face.predictMs,
1122
+ active: s.face.enabled
1123
+ },
1124
+ hand: { ...O(s.hand.targetFps), active: s.hand.enabled },
1125
+ gesture: { ...O(s.gesture.targetFps), active: s.gesture.enabled },
1126
+ body: { active: s.body.enabled },
1127
+ holistic: {
1128
+ ...O(s.holistic.targetFps),
1129
+ hands: s.holistic.hands,
1130
+ holdMs: s.holistic.holdMs,
1131
+ predictMs: s.holistic.predictMs,
1132
+ analysisMaxDimension: s.holistic.analysisMaxDimension,
1133
+ outputFaceBlendshapes: s.holistic.outputFaceBlendshapes,
1134
+ delegate: s.holistic.delegate === "auto" ? e.fallbacks.delegate : s.holistic.delegate,
1135
+ ...e.assets.holisticModelUrl ? { modelUrl: e.assets.holisticModelUrl } : {},
1136
+ active: s.holistic.enabled
1137
+ },
1138
+ segmentation: { quality: s.segmentation.quality, active: s.segmentation.enabled },
1139
+ semanticSegmentation: {
1140
+ preset: s.semanticSegmentation.preset,
1141
+ quality: s.semanticSegmentation.quality,
1142
+ ...e.assets.semanticSegmentationModelUrl ? { modelUrl: e.assets.semanticSegmentationModelUrl } : {},
1143
+ active: s.semanticSegmentation.enabled
1144
+ }
1145
+ }[t];
1146
+ }, Xt = (e, t) => {
1147
+ const s = e.trackers;
1148
+ switch (t) {
1149
+ case v.FACE_TRACKER:
1150
+ return { numFaces: s.face.numFaces, ...O(s.face.targetFps) };
1151
+ case v.HAND_TRACKER:
1152
+ return { ...O(s.hand.targetFps) };
1153
+ case v.GESTURE_TRACKER:
1154
+ return { ...O(s.gesture.targetFps) };
1155
+ case v.BODY_TRACKER:
1156
+ return { ...O(s.body.targetFps) };
1157
+ case v.HOLISTIC_TRACKER: {
1158
+ const r = s.holistic;
1159
+ return {
1160
+ ...O(r.targetFps),
1161
+ hands: r.hands,
1162
+ holdMs: r.holdMs,
1163
+ predictMs: r.predictMs,
1164
+ analysisMaxDimension: r.analysisMaxDimension,
1165
+ outputFaceBlendshapes: r.outputFaceBlendshapes,
1166
+ minFaceDetectionConfidence: r.confidence,
1167
+ minFacePresenceConfidence: r.confidence,
1168
+ minPoseDetectionConfidence: r.confidence,
1169
+ minPosePresenceConfidence: r.confidence,
1170
+ minHandLandmarksConfidence: r.confidence,
1171
+ delegate: r.delegate === "auto" ? e.fallbacks.delegate : r.delegate,
1172
+ ...e.assets.holisticModelUrl ? { modelUrl: e.assets.holisticModelUrl } : {}
1173
+ };
1174
+ }
1175
+ case v.BACKGROUND_SEGMENTATION:
1176
+ return { quality: s.segmentation.quality };
1177
+ case v.SEMANTIC_SEGMENTATION:
1178
+ return {
1179
+ preset: s.semanticSegmentation.preset,
1180
+ quality: s.semanticSegmentation.quality,
1181
+ ...e.assets.semanticSegmentationModelUrl ? { modelUrl: e.assets.semanticSegmentationModelUrl } : {}
1182
+ };
1183
+ default:
1184
+ return {};
1185
+ }
1186
+ }, Ht = (e) => {
1187
+ const t = e.trackers, s = [];
1188
+ return t.face.enabled && s.push(v.FACE_TRACKER), t.hand.enabled && s.push(v.HAND_TRACKER), t.gesture.enabled && s.push(v.GESTURE_TRACKER), t.body.enabled && s.push(v.BODY_TRACKER), t.holistic.enabled && s.push(v.HOLISTIC_TRACKER), t.segmentation.enabled && s.push(v.BACKGROUND_SEGMENTATION), t.semanticSegmentation.enabled && s.push(v.SEMANTIC_SEGMENTATION), s;
1189
+ }, ne = "vincentt.xr.tracking-config", ce = () => {
1190
+ try {
1191
+ return typeof localStorage < "u" ? localStorage : null;
1192
+ } catch {
1193
+ return null;
1194
+ }
1195
+ }, zt = (e = ne, t = ce()) => {
1196
+ if (!t) return null;
1197
+ try {
1198
+ const s = t.getItem(e);
1199
+ return s ? Ue(s) : null;
1200
+ } catch {
1201
+ return null;
1202
+ }
1203
+ }, Ae = (e, t = ne, s = ce()) => {
1204
+ if (!s) return !1;
1205
+ try {
1206
+ return s.setItem(t, we(e)), !0;
1207
+ } catch {
1208
+ return !1;
1209
+ }
1210
+ }, $t = (e = ne, t = ce()) => {
1211
+ if (t)
1212
+ try {
1213
+ t.removeItem(e);
1214
+ } catch {
1215
+ }
1216
+ }, Os = (e = {}) => {
1217
+ const { storageKey: t = ne, persist: s = !0 } = e, r = e.storage, a = F(e.initial), n = Z(() => W(a.current ?? {}), []), [i, c] = x(n), [o, l] = x([]), [h, d] = x(!s), m = F(i);
1218
+ m.current = i, _(() => {
1219
+ if (!s) {
1220
+ d(!0);
1221
+ return;
1222
+ }
1223
+ const f = zt(t, r);
1224
+ if (f) {
1225
+ const S = W(f.config, n);
1226
+ m.current = S, c(S), l(f.warnings), f.migrated && Ae(S, t, r);
1227
+ }
1228
+ d(!0);
1229
+ }, [s, t, r, n]);
1230
+ const u = R(
1231
+ (f, S) => (m.current = f, c(f), l(S), s && Ae(f, t, r), f),
1232
+ [s, t, r]
1233
+ ), p = R(
1234
+ (f) => {
1235
+ const S = [], b = W({ ...f, updatedAt: Date.now() }, m.current, S);
1236
+ return u(b, S);
1237
+ },
1238
+ [u]
1239
+ ), M = R(() => {
1240
+ const f = be(n, {}, 0);
1241
+ return m.current = f, c(f), l([]), s && $t(t, r), f;
1242
+ }, [n, s, t, r]), E = R(
1243
+ (f) => {
1244
+ const S = Ue(f);
1245
+ return S.warnings.some((b) => b.startsWith("not valid JSON") || b.startsWith("not an object")) ? (l([`import: ${S.warnings[0]}; config unchanged`]), m.current) : u(be(S.config, {}, Date.now()), S.warnings);
1246
+ },
1247
+ [u]
1248
+ );
1249
+ return Z(
1250
+ () => ({
1251
+ config: i,
1252
+ hydrated: h,
1253
+ warnings: o,
1254
+ update: p,
1255
+ reset: M,
1256
+ importJson: E,
1257
+ json: we(i),
1258
+ providerProps: Bt(i),
1259
+ cameraRequest: Wt(i),
1260
+ trackerProps: (f) => Kt(i, f),
1261
+ modelOptions: (f) => Xt(i, f),
1262
+ enabledModels: Ht(i)
1263
+ }),
1264
+ [i, h, o, p, M, E]
1265
+ );
583
1266
  };
584
1267
  export {
585
- Ae as AspectRatioContainer,
586
- Ee as AudioEngine,
587
- _e as Panel,
588
- ze as ScreenSpaceUI,
589
- ie as ScreenTransform,
590
- Be as SpriteAnimation,
591
- Ie as TextLabel,
592
- Ne as VideoBackground,
593
- rt as XRMediaSource,
594
- re as XRModel,
595
- nt as XRProvider,
596
- it as XRScene,
597
- C as audio,
598
- pe as computeContainScale,
599
- Ge as dataURLtoFile,
600
- Ke as isMuted,
601
- Je as onMuteChange,
602
- je as playOneShot,
603
- Xe as prefetchMusic,
604
- qe as registerSound,
605
- Ve as setMuted,
606
- He as startMusic,
607
- Ze as stopMusic,
608
- Ye as toggleMuted,
609
- $e as useMediaRecorder,
610
- Qe as useMuted,
611
- oe as useScreenRectAspect
1268
+ fs as AspectRatioContainer,
1269
+ _t as AudioEngine,
1270
+ Ts as AudioPlayer,
1271
+ hs as Axes,
1272
+ We as CAMERA_PERMISSION_MESSAGES,
1273
+ ws as CameraPermissionGate,
1274
+ Ka as DEFAULT_ASSET_BUDGET_BYTES,
1275
+ Ea as DEFAULT_MATERIAL_FILL,
1276
+ Da as DEFAULT_MESH_RENDERER,
1277
+ Na as DEFAULT_MESH_RENDERER_RENDER_STATE,
1278
+ Bs as DEFAULT_PERFORMANCE_BUDGET,
1279
+ Ws as DEFAULT_PIXEL_SNAP_INCREMENT,
1280
+ Ks as DEFAULT_QUALITY_TIERS,
1281
+ Xs as DEFAULT_REFERENCE_PIXELS_PER_UNIT,
1282
+ jr as DEFAULT_SCREEN_GLASS,
1283
+ Ra as DEFAULT_SCREEN_GRADIENT,
1284
+ Vr as DEFAULT_SCREEN_IMAGE_SCENE_SETTINGS,
1285
+ Zr as DEFAULT_SCREEN_IMAGE_SETTINGS,
1286
+ Yr as DEFAULT_SCREEN_SHAPE_SETTINGS,
1287
+ Qr as DEFAULT_SCREEN_TEXT_SCENE_SETTINGS,
1288
+ Jr as DEFAULT_SCREEN_TEXT_SHADOW_LAYER,
1289
+ Hs as DEFAULT_SCREEN_TRANSFORM_2D,
1290
+ zs as DEFAULT_SCREEN_TRANSFORM_ROOT,
1291
+ xe as DEFAULT_TRACKING_CONFIG,
1292
+ ba as DEFAULT_TRANSFORM_3D,
1293
+ Aa as EXTERNAL_BACKGROUND_RENDER_LAYER,
1294
+ ct as FULL_SCREEN_ANCHORS,
1295
+ pa as LightObject,
1296
+ fa as LookAt,
1297
+ Fa as MAX_RENDER_GROUP_PASSES,
1298
+ Ca as MaterialFill,
1299
+ Ga as MeshMaterial,
1300
+ Ia as MeshRenderer,
1301
+ ds as Panel,
1302
+ ps as PersonCutout,
1303
+ ea as PinToMesh,
1304
+ ha as RenderGroupLayer,
1305
+ ga as SCREEN_IMAGE_MASK_CHANNELS,
1306
+ Sa as SceneObjectRenderer,
1307
+ ta as ScreenGlassMaterial,
1308
+ va as ScreenGradientMaterial,
1309
+ lt as ScreenImage,
1310
+ sa as ScreenShape,
1311
+ Hr as ScreenSpaceUI,
1312
+ ya as ScreenText,
1313
+ Ke as ScreenTransform,
1314
+ Ma as SequentialRenderPasses,
1315
+ gs as SpriteAnimation,
1316
+ Ls as TRACKER_KINDS,
1317
+ ne as TRACKING_CONFIG_STORAGE_KEY,
1318
+ ae as TRACKING_CONFIG_VERSION,
1319
+ zr as TextLabel,
1320
+ ka as Transform3D,
1321
+ ms as VideoBackground,
1322
+ Xa as XRAssetCache,
1323
+ Ds as XRAssetCacheProvider,
1324
+ $s as XRMediaSource,
1325
+ v as XRModel,
1326
+ js as XRProvider,
1327
+ Vs as XRQualityController,
1328
+ Kr as XRScene,
1329
+ Zs as XR_FALLBACK_MESSAGES,
1330
+ Ys as XR_MODEL_ASSET_URLS,
1331
+ D as audio,
1332
+ Be as canPromptForCamera,
1333
+ $t as clearTrackingConfig,
1334
+ Qs as clientToScreenPixels,
1335
+ ut as computeContainScale,
1336
+ Js as computeFeedCrop,
1337
+ er as computeFitLayout,
1338
+ Ha as createAssetCache,
1339
+ tr as createFallbackReason,
1340
+ _a as createTwoStopGradient,
1341
+ Ms as dataURLtoFile,
1342
+ ja as defineGltfAsset,
1343
+ Va as defineTextureAsset,
1344
+ Za as defineVideoAsset,
1345
+ sr as detectXRCapabilities,
1346
+ Ya as disposeObject3D,
1347
+ la as drawNormalizedCrop,
1348
+ Ht as enabledModels,
1349
+ Qa as estimateGeometryBytes,
1350
+ Ja as estimateObjectBytes,
1351
+ en as estimateTextureBytes,
1352
+ rr as feedSidedName,
1353
+ ar as feedToScreenPixels,
1354
+ nr as feedToSource,
1355
+ ir as feedToTracker,
1356
+ or as feedToViewport,
1357
+ cr as feedToWorld,
1358
+ Ps as findCameraByFacing,
1359
+ Ce as getDefaultAssetCache,
1360
+ xa as getRenderGroupLayer,
1361
+ lr as isFeedPointInSource,
1362
+ ur as isMirroredSourceKind,
1363
+ ks as isMuted,
1364
+ Us as listCameras,
1365
+ zt as loadTrackingConfig,
1366
+ ra as mapScreenImageSettingsToProps,
1367
+ aa as mapScreenTextInnerShadowToProps,
1368
+ na as mapScreenTextSettingsToProps,
1369
+ dr as mediaToScreenPixels,
1370
+ ia as mergeScreenShapeSettings,
1371
+ mr as mergeScreenTransform2D,
1372
+ be as mergeTrackingConfig,
1373
+ pr as mirrorFeedX,
1374
+ La as normalizeMeshRendererRenderState,
1375
+ oa as normalizeScreenGlass,
1376
+ wa as normalizeScreenGradient,
1377
+ fr as normalizedToScreenPixels,
1378
+ _s as onMuteChange,
1379
+ hr as orientSourcePoint,
1380
+ gr as orientedSize,
1381
+ Sr as otherSide,
1382
+ Ue as parseTrackingConfig,
1383
+ yr as personLeftSign,
1384
+ Mr as personSide,
1385
+ Fs as playOneShot,
1386
+ Es as prefetchMusic,
1387
+ Oe as queryCameraPermission,
1388
+ Rs as registerSound,
1389
+ Ua as renderSequentialPasses,
1390
+ Ge as requestCameraAccess,
1391
+ Tr as resolveModelAssetUrl,
1392
+ ua as resolveNormalizedCrop,
1393
+ da as resolvePersonCutoutStatus,
1394
+ Er as resolveQualityConfig,
1395
+ Rr as resolveScreenTransform2D,
1396
+ br as resolveTrackerSupport,
1397
+ W as resolveTrackingConfig,
1398
+ Ae as saveTrackingConfig,
1399
+ Ar as screenPixelsToClient,
1400
+ Fr as screenPixelsToFeed,
1401
+ Cr as screenPixelsToMedia,
1402
+ vr as screenPixelsToNormalized,
1403
+ kr as screenPixelsToScreenSpace,
1404
+ _r as screenPixelsToUnits,
1405
+ xr as screenPointToRay,
1406
+ wr as screenSpaceToScreenPixels,
1407
+ Ur as screenUnitsToPixels,
1408
+ we as serializeTrackingConfig,
1409
+ Cs as setMuted,
1410
+ ot as shouldDrawFallback,
1411
+ V as smoothNumber,
1412
+ ls as smoothVector2,
1413
+ us as smoothVector3,
1414
+ Pr as sourceToFeed,
1415
+ bs as startMusic,
1416
+ As as stopMusic,
1417
+ qe as subscribeCameraPermission,
1418
+ Dr as swapSidedName,
1419
+ Wt as toCameraRequest,
1420
+ Xt as toModelOptions,
1421
+ Bt as toProviderProps,
1422
+ Kt as toTrackerProps,
1423
+ vs as toggleMuted,
1424
+ Nr as trackerPointToScreenPixels,
1425
+ Ir as trackerToFeed,
1426
+ Lr as trackerToWorld,
1427
+ Pt as useCameraPermission,
1428
+ ys as useFrameCapture,
1429
+ Ss as useMediaRecorder,
1430
+ xs as useMuted,
1431
+ it as usePersonMaskTexture,
1432
+ mt as useScreenRectAspect,
1433
+ Ns as useXRAsset,
1434
+ _e as useXRAssetCache,
1435
+ Is as useXRAssetStats,
1436
+ Ba as useXRCapabilities,
1437
+ za as useXRQuality,
1438
+ Os as useXRTrackingConfig,
1439
+ Or as viewportToFeed,
1440
+ Gr as worldToFeed,
1441
+ qr as worldToScreenPixels,
1442
+ Br as worldToTracker
612
1443
  };