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

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 (517) hide show
  1. package/GROUNDING.md +4643 -170
  2. package/README.md +1 -0
  3. package/dist/CanonicalHeadFrame-BHcWyaiK.js +1506 -0
  4. package/dist/CanonicalHeadFrame-D-_T1OMU.cjs +1 -0
  5. package/dist/DebuggerUI-7ngnJsBe.js +275 -0
  6. package/dist/DebuggerUI-CoglgKdO.cjs +1 -0
  7. package/dist/FaceRetouch-CLoTfrcs.js +1071 -0
  8. package/dist/FaceRetouch-J1lC1WbS.cjs +134 -0
  9. package/dist/FaceSurface-CHAMEeG1.cjs +1 -0
  10. package/dist/FaceSurface-DmP9AEeC.js +27 -0
  11. package/dist/SegmentationOverlay-D_FWkcyP.cjs +35 -0
  12. package/dist/SegmentationOverlay-vn5x_knv.js +6237 -0
  13. package/dist/SkeletonUtils-C2r90MtN.js +21 -0
  14. package/dist/SkeletonUtils-CddIup1F.cjs +1 -0
  15. package/dist/TextLabel-XE0rQSDn.cjs +2 -0
  16. package/dist/TextLabel-c9BCucOI.js +961 -0
  17. package/dist/assets/gltfLoader.d.ts +16 -0
  18. package/dist/assets/loaders.d.ts +16 -1
  19. package/dist/body-pose/index.d.ts +521 -0
  20. package/dist/body-trigger/__fixtures__/syntheticBody.d.ts +83 -0
  21. package/dist/body-trigger/frame.d.ts +88 -0
  22. package/dist/body-trigger/index.d.ts +6 -0
  23. package/dist/body-trigger/moves.d.ts +235 -0
  24. package/dist/body-trigger/trigger.d.ts +75 -0
  25. package/dist/calibration/calibration.d.ts +11 -6
  26. package/dist/canonicalFace-BHwyCx1c.js +9 -0
  27. package/dist/canonicalFace-C83I225R.cjs +1 -0
  28. package/dist/components/BodyInstruction/BodyPoseHint.d.ts +63 -0
  29. package/dist/components/BodyInstruction/index.d.ts +69 -0
  30. package/dist/components/BodyInstruction/useBodyPose.d.ts +23 -0
  31. package/dist/components/BodyTracker/index.d.ts +10 -2
  32. package/dist/components/BodyTrigger/index.d.ts +49 -0
  33. package/dist/components/Debugger/DebuggerProvider.d.ts +14 -1
  34. package/dist/components/Debugger/DebuggerUI.d.ts +3 -1
  35. package/dist/components/FaceAtlas/FaceAtlasLayer.d.ts +114 -0
  36. package/dist/components/FaceAtlas/MadeUpCamera.d.ts +80 -0
  37. package/dist/components/FaceAtlas/constants.d.ts +8 -0
  38. package/dist/components/FaceAtlas/index.d.ts +7 -0
  39. package/dist/components/FaceAtlas/useFaceAtlasSurface.d.ts +84 -0
  40. package/dist/components/FaceAtlas/useFaceSkin.d.ts +84 -0
  41. package/dist/components/FaceCharacter/ExternalFaceMesh.d.ts +109 -0
  42. package/dist/components/FaceCharacter/FaceExpressionController.d.ts +53 -0
  43. package/dist/components/FaceCharacter/FaceMorph.d.ts +71 -0
  44. package/dist/components/FaceCharacter/FacePiercing.d.ts +65 -0
  45. package/dist/components/FaceCharacter/FaceReprojection.d.ts +85 -0
  46. package/dist/components/FaceCharacter/FaceRig.d.ts +38 -0
  47. package/dist/components/FaceCharacter/FaceSurface.d.ts +49 -0
  48. package/dist/components/FaceCharacter/FaceSurfaceOccluder.d.ts +39 -0
  49. package/dist/components/FaceCharacter/PinToFaceMesh.d.ts +68 -0
  50. package/dist/components/FaceCharacter/index.d.ts +18 -0
  51. package/dist/components/FaceCharacter/useFaceReprojector.d.ts +10 -0
  52. package/dist/components/FaceInset/FaceInset.d.ts +68 -0
  53. package/dist/components/FaceInset/frame.d.ts +94 -0
  54. package/dist/components/FaceInset/index.d.ts +6 -0
  55. package/dist/components/FaceInset/material.d.ts +40 -0
  56. package/dist/components/FaceInset/useFaceInsetTexture.d.ts +37 -0
  57. package/dist/components/FaceInstruction/FaceExpressionHint.d.ts +43 -0
  58. package/dist/components/FaceInstruction/index.d.ts +56 -0
  59. package/dist/components/FaceInstruction/useFaceExpression.d.ts +20 -0
  60. package/dist/components/FaceLiquify/FaceLiquify.d.ts +49 -0
  61. package/dist/components/FaceLiquify/debug.d.ts +37 -0
  62. package/dist/components/FaceLiquify/frame.d.ts +55 -0
  63. package/dist/components/FaceLiquify/index.d.ts +10 -0
  64. package/dist/components/FaceLiquify/material.d.ts +39 -0
  65. package/dist/components/FaceLiquify/pass.d.ts +49 -0
  66. package/dist/components/FaceLiquify/presence.d.ts +25 -0
  67. package/dist/components/FaceLiquify/presets.d.ts +82 -0
  68. package/dist/components/FaceLiquify/selfTest.d.ts +66 -0
  69. package/dist/components/FaceLiquify/target.d.ts +85 -0
  70. package/dist/components/FaceLiquify/warp.d.ts +72 -0
  71. package/dist/components/FaceMesh/canonical/CanonicalFaceMeshRenderer.d.ts +5 -3
  72. package/dist/components/FaceMesh/canonical/geometryGroups.d.ts +21 -0
  73. package/dist/components/FaceMesh/canonical/parseCanonicalFaceModel.d.ts +9 -0
  74. package/dist/components/FaceMesh/index.d.ts +1 -1
  75. package/dist/components/FaceRetouch/Background.d.ts +3 -1
  76. package/dist/components/FaceRetouch/FaceRetouch.d.ts +5 -0
  77. package/dist/components/FaceRetouch/renderState.d.ts +19 -0
  78. package/dist/components/FaceSwap/FaceMirror.d.ts +46 -0
  79. package/dist/components/FaceSwap/FaceSwap.d.ts +58 -0
  80. package/dist/components/FaceSwap/FaceTextureLayer.d.ts +72 -0
  81. package/dist/components/FaceSwap/faceSwapPlan.d.ts +91 -0
  82. package/dist/components/FaceSwap/index.d.ts +13 -0
  83. package/dist/components/FaceSwap/settings.d.ts +300 -0
  84. package/dist/components/FaceSwap/useFaceTexture.d.ts +35 -0
  85. package/dist/components/FaceSwap/useLiveFace.d.ts +38 -0
  86. package/dist/components/FaceSwap/useLiveFaceTexture.d.ts +31 -0
  87. package/dist/components/FaceWarp3D/FaceWarp3D.d.ts +50 -0
  88. package/dist/components/FaceWarp3D/index.d.ts +2 -3
  89. package/dist/components/Faceless/Faceless.d.ts +51 -0
  90. package/dist/components/Faceless/index.d.ts +2 -0
  91. package/dist/components/HairLock/HairLock.d.ts +39 -0
  92. package/dist/components/HairLock/index.d.ts +2 -0
  93. package/dist/components/HairLock/lockGeometry.d.ts +15 -0
  94. package/dist/components/HandCutout/index.d.ts +35 -0
  95. package/dist/components/HandInstruction/HandGestureHint.d.ts +70 -0
  96. package/dist/components/HandInstruction/index.d.ts +74 -0
  97. package/dist/components/HandInstruction/useHandGesture.d.ts +22 -0
  98. package/dist/components/HandRig/ForearmOccluder.d.ts +29 -0
  99. package/dist/components/HandRig/HandAttachment.d.ts +34 -0
  100. package/dist/components/HandRig/HandOccluder.d.ts +55 -0
  101. package/dist/components/HandRig/HandTattoo.d.ts +61 -0
  102. package/dist/components/HandRig/WristAttachment.d.ts +34 -0
  103. package/dist/components/HandRig/index.d.ts +101 -0
  104. package/dist/components/HandRig/useArmMask.d.ts +29 -0
  105. package/dist/components/HandRig/wristSolve.d.ts +69 -0
  106. package/dist/components/HandTouch/HandTouch.d.ts +62 -0
  107. package/dist/components/HandTouch/Touchable.d.ts +36 -0
  108. package/dist/components/HandTouch/index.d.ts +2 -0
  109. package/dist/components/HeadBinding/index.d.ts +14 -0
  110. package/dist/components/HeadOccluder/CanonicalHeadFrame.d.ts +22 -0
  111. package/dist/components/HeadOccluder/Earrings.d.ts +55 -0
  112. package/dist/components/HeadOccluder/HeadAttachment.d.ts +38 -0
  113. package/dist/components/HeadOccluder/NeckOccluder.d.ts +64 -0
  114. package/dist/components/HeadOccluder/earringPlacement.d.ts +31 -0
  115. package/dist/components/HeadOccluder/headAttachmentPoints.d.ts +69 -0
  116. package/dist/components/HeadOccluder/index.d.ts +57 -3
  117. package/dist/components/HeadOccluder/useCanonicalHeadFit.d.ts +36 -0
  118. package/dist/components/HeadOccluder/useLandmarkPoseFit.d.ts +80 -0
  119. package/dist/components/Instruction/HintStage.d.ts +29 -0
  120. package/dist/components/Instruction/InstructionCue.d.ts +126 -0
  121. package/dist/components/Instruction/gestureHold.d.ts +20 -0
  122. package/dist/components/Instruction/ghost.d.ts +129 -0
  123. package/dist/components/Instruction/hintBlend.d.ts +19 -0
  124. package/dist/components/Instruction/hintLook.d.ts +81 -0
  125. package/dist/components/Instruction/hintLoop.d.ts +36 -0
  126. package/dist/components/Instruction/index.d.ts +41 -0
  127. package/dist/components/Instruction/useGhostModel.d.ts +33 -0
  128. package/dist/components/Instruction/useInstructionHold.d.ts +72 -0
  129. package/dist/components/LipEffect/LipEffect.d.ts +22 -2
  130. package/dist/components/LipEffect/LipEffectMaterial.d.ts +62 -10
  131. package/dist/components/LipEffect/LipEffects.d.ts +5 -2
  132. package/dist/components/LipEffect/defaults.d.ts +21 -2
  133. package/dist/components/LipEffect/index.d.ts +1 -1
  134. package/dist/components/LipEffect/lipShading.d.ts +73 -0
  135. package/dist/components/LipEffect/settings.d.ts +117 -13
  136. package/dist/components/LipEffect/shader.d.ts +39 -0
  137. package/dist/components/LipEffect/types.d.ts +82 -10
  138. package/dist/components/LipEffect/useLipDesignTextures.d.ts +6 -0
  139. package/dist/components/LipEffect/uvGuide.d.ts +31 -16
  140. package/dist/components/Makeup/Blush.d.ts +18 -0
  141. package/dist/components/Makeup/Brows.d.ts +20 -0
  142. package/dist/components/Makeup/Contour.d.ts +17 -0
  143. package/dist/components/Makeup/Eyeliner.d.ts +20 -0
  144. package/dist/components/Makeup/Eyeshadow.d.ts +20 -0
  145. package/dist/components/Makeup/Highlighter.d.ts +18 -0
  146. package/dist/components/Makeup/MakeupDesign.d.ts +37 -0
  147. package/dist/components/Makeup/MakeupRegion.d.ts +132 -0
  148. package/dist/components/Makeup/constants.d.ts +44 -0
  149. package/dist/components/Makeup/design.d.ts +106 -0
  150. package/dist/components/Makeup/designSamples.d.ts +42 -0
  151. package/dist/components/Makeup/eyes.d.ts +114 -0
  152. package/dist/components/Makeup/fields.d.ts +10 -0
  153. package/dist/components/Makeup/geometry.d.ts +106 -0
  154. package/dist/components/Makeup/index.d.ts +26 -0
  155. package/dist/components/Makeup/looks.d.ts +28 -0
  156. package/dist/components/Makeup/material.d.ts +239 -0
  157. package/dist/components/Makeup/settings.d.ts +54 -0
  158. package/dist/components/Makeup/shades.d.ts +143 -0
  159. package/dist/components/Makeup/shapes.d.ts +27 -0
  160. package/dist/components/Makeup/skinTone.d.ts +135 -0
  161. package/dist/components/Makeup/types.d.ts +110 -0
  162. package/dist/components/Makeup/useMakeupSkinTone.d.ts +40 -0
  163. package/dist/components/Necklace/Necklace.d.ts +44 -0
  164. package/dist/components/Necklace/index.d.ts +1 -0
  165. package/dist/components/ParticleEmitter/ParticleEmitter.d.ts +69 -0
  166. package/dist/components/ParticleEmitter/index.d.ts +1 -0
  167. package/dist/components/ShoulderOccluder/index.d.ts +43 -0
  168. package/dist/components/ShoulderOccluder/useCanonicalTorsoFit.d.ts +24 -0
  169. package/dist/components/SpringSwing/SpringSwing.d.ts +22 -0
  170. package/dist/components/SpringSwing/index.d.ts +1 -0
  171. package/dist/components/XRScene/renderOutputTarget.d.ts +12 -0
  172. package/dist/components/index.d.ts +8 -0
  173. package/dist/config/index.d.ts +0 -1
  174. package/dist/context-DTxSQvp4.js +13 -0
  175. package/dist/context-hA0Rb2Xa.cjs +1 -0
  176. package/dist/contexts-BH7PdKFS.cjs +1 -0
  177. package/dist/contexts-jak8-tND.js +667 -0
  178. package/dist/coordinates/index.d.ts +2 -0
  179. package/dist/coordinates/side.d.ts +40 -0
  180. package/dist/debug-ui/default-setting.cjs +2 -2
  181. package/dist/debug-ui/face-swap-settings/index.d.ts +22 -0
  182. package/dist/debug-ui/hierarchy-panel/index.d.ts +3 -2
  183. package/dist/debug-ui/index.d.ts +4 -3
  184. package/dist/debug-ui/media-source/index.d.ts +1 -1
  185. package/dist/debug-ui/media-source/session.d.ts +30 -2
  186. package/dist/debug-ui/media-source.cjs +1 -1
  187. package/dist/debug-ui/media-source.js +1 -1
  188. package/dist/debug-ui/object-inspector-panel/index.d.ts +3 -2
  189. package/dist/debug-ui/product-hotspots/index.d.ts +3 -2
  190. package/dist/debug-ui/scene-editor/hierarchy-panel.d.ts +3 -1
  191. package/dist/debug-ui/scene-editor/inspector-panel.d.ts +3 -1
  192. package/dist/debug-ui/screen-image-settings/index.d.ts +3 -1
  193. package/dist/debug-ui/screen-text-settings/ScreenTextSettingsPanel.d.ts +1 -1
  194. package/dist/debug-ui/screen-text-settings/types.d.ts +2 -0
  195. package/dist/debug-ui/settings-panel/index.d.ts +6 -1
  196. package/dist/debug-ui/shared/debugWindow.d.ts +51 -0
  197. package/dist/debug-ui/xr-diagnostics/index.d.ts +3 -2
  198. package/dist/debug-ui.cjs +3 -3
  199. package/dist/debug-ui.js +2250 -2472
  200. package/dist/entries/all.d.ts +3 -1
  201. package/dist/entries/core.d.ts +3 -2
  202. package/dist/entries/face-effects.d.ts +114 -8
  203. package/dist/entries/instructions.d.ts +48 -0
  204. package/dist/entries/internal.d.ts +2 -1
  205. package/dist/entries/low-level.d.ts +28 -1
  206. package/dist/entries/particles.d.ts +11 -0
  207. package/dist/entries/tracking.d.ts +37 -2
  208. package/dist/face-atlas/attributes.d.ts +30 -0
  209. package/dist/face-atlas/eyes.d.ts +272 -0
  210. package/dist/face-atlas/faceAtlas.generated.d.ts +46 -0
  211. package/dist/face-atlas/glsl/atlasVertex.d.ts +46 -0
  212. package/dist/face-atlas/glsl/common.d.ts +55 -0
  213. package/dist/face-atlas/glsl/design.d.ts +49 -0
  214. package/dist/face-atlas/glsl/eyes.d.ts +73 -0
  215. package/dist/face-atlas/glsl/finish.d.ts +24 -0
  216. package/dist/face-atlas/glsl/format.d.ts +4 -0
  217. package/dist/face-atlas/glsl/index.d.ts +59 -0
  218. package/dist/face-atlas/glsl/shading.d.ts +15 -0
  219. package/dist/face-atlas/glsl/shapes.d.ts +66 -0
  220. package/dist/face-atlas/glsl/sparkle.d.ts +19 -0
  221. package/dist/face-atlas/glsl/uniforms.d.ts +106 -0
  222. package/dist/face-atlas/guide.d.ts +51 -0
  223. package/dist/face-atlas/index.d.ts +25 -0
  224. package/dist/face-atlas/lead.d.ts +117 -0
  225. package/dist/face-atlas/madeUpCamera.d.ts +125 -0
  226. package/dist/face-atlas/masks.d.ts +53 -0
  227. package/dist/face-atlas/obj.d.ts +69 -0
  228. package/dist/face-atlas/polylines.d.ts +63 -0
  229. package/dist/face-atlas/probe/FaceSkinProbe.d.ts +208 -0
  230. package/dist/face-atlas/probe/__fixtures__/emulate.d.ts +9 -0
  231. package/dist/face-atlas/probe/__fixtures__/face.d.ts +24 -0
  232. package/dist/face-atlas/probe/constants.d.ts +137 -0
  233. package/dist/face-atlas/probe/glsl.d.ts +43 -0
  234. package/dist/face-atlas/probe/lightFit.d.ts +108 -0
  235. package/dist/face-atlas/probe/schedule.d.ts +44 -0
  236. package/dist/face-atlas/probe/selfTest.d.ts +87 -0
  237. package/dist/face-atlas/probe/stats.d.ts +143 -0
  238. package/dist/face-atlas/probe/targets.d.ts +70 -0
  239. package/dist/face-atlas/probe/unwrap.d.ts +76 -0
  240. package/dist/face-atlas/quality.d.ts +28 -0
  241. package/dist/face-atlas/regions.d.ts +31 -0
  242. package/dist/face-atlas/registry.d.ts +252 -0
  243. package/dist/face-atlas/renderState.d.ts +86 -0
  244. package/dist/face-atlas/selfOcclusion.d.ts +62 -0
  245. package/dist/face-atlas/shading.d.ts +406 -0
  246. package/dist/face-atlas/shapes.d.ts +86 -0
  247. package/dist/face-atlas/sides.d.ts +41 -0
  248. package/dist/face-atlas/skinMask.d.ts +35 -0
  249. package/dist/face-atlas/surface.d.ts +155 -0
  250. package/dist/face-atlas/topology.d.ts +44 -0
  251. package/dist/face-character/__fixtures__/faceImageDetections.d.ts +25 -0
  252. package/dist/face-character/__fixtures__/faceNode.d.ts +22 -0
  253. package/dist/face-character/bindFaceModel.d.ts +106 -0
  254. package/dist/face-character/canonicalFace.d.ts +17 -0
  255. package/dist/face-character/canonicalFaceGeometry.d.ts +11 -0
  256. package/dist/face-character/canonicalFacePositions.d.ts +7 -0
  257. package/dist/face-character/driveFaceModel.d.ts +57 -0
  258. package/dist/face-character/expressionOutputs.d.ts +45 -0
  259. package/dist/face-character/faceExpressions.d.ts +104 -0
  260. package/dist/face-character/faceImageLandmarker.d.ts +93 -0
  261. package/dist/face-character/faceMeshBinding.d.ts +62 -0
  262. package/dist/face-character/faceMorph.d.ts +77 -0
  263. package/dist/face-character/faceMorphs.d.ts +46 -0
  264. package/dist/face-character/facePhoto.d.ts +138 -0
  265. package/dist/face-character/facePiercings.d.ts +116 -0
  266. package/dist/face-character/facePin.d.ts +131 -0
  267. package/dist/face-character/faceReprojection.d.ts +273 -0
  268. package/dist/face-character/faceReprojector.d.ts +171 -0
  269. package/dist/face-character/faceRig.d.ts +176 -0
  270. package/dist/face-character/faceSwapPresence.d.ts +85 -0
  271. package/dist/face-character/faceTexture.d.ts +169 -0
  272. package/dist/face-character/faceTextureBaker.d.ts +86 -0
  273. package/dist/face-character/faceTextureGuide.d.ts +106 -0
  274. package/dist/face-character/faceTextureStats.d.ts +298 -0
  275. package/dist/face-character/faceTransfer.d.ts +396 -0
  276. package/dist/face-character/faceTransferGeometry.d.ts +109 -0
  277. package/dist/face-character/faceTransferSelfTest.d.ts +94 -0
  278. package/dist/face-character/faceWarp3D.d.ts +101 -0
  279. package/dist/face-character/faceless.d.ts +79 -0
  280. package/dist/face-character/featureWarp.d.ts +28 -0
  281. package/dist/face-character/liveFaceRegistry.d.ts +370 -0
  282. package/dist/face-character/liveValue.d.ts +12 -0
  283. package/dist/face-character/memo.d.ts +15 -0
  284. package/dist/face-effects.cjs +2252 -83
  285. package/dist/face-effects.js +14234 -1231
  286. package/dist/face-expression/index.d.ts +182 -0
  287. package/dist/face-info/landmarks.d.ts +17 -3
  288. package/dist/face-info/types.d.ts +20 -3
  289. package/dist/gestures/definitions.d.ts +15 -2
  290. package/dist/gestures/index.d.ts +1 -1
  291. package/dist/gestures/measures.d.ts +21 -8
  292. package/dist/getFaceInfo-B1otSDMX.cjs +1 -0
  293. package/dist/getFaceInfo-Cu4xDWiL.js +62 -0
  294. package/dist/hand/armFit.d.ts +46 -0
  295. package/dist/hand/armMask.d.ts +178 -0
  296. package/dist/hand/handCutout.d.ts +23 -0
  297. package/dist/hand/handCutoutRegistry.d.ts +7 -0
  298. package/dist/hand/handGestures.d.ts +524 -0
  299. package/dist/hand/handPose.d.ts +98 -0
  300. package/dist/hand/handRigSolver.d.ts +159 -0
  301. package/dist/hand/handTattoo.d.ts +81 -0
  302. package/dist/hand/handTouch.d.ts +240 -0
  303. package/dist/hand/wrist.d.ts +44 -0
  304. package/dist/hand/wristFilter.d.ts +44 -0
  305. package/dist/hooks/selectors.d.ts +8 -0
  306. package/dist/hooks/useFaceModelAcquisition.d.ts +38 -0
  307. package/dist/hooks/useTrackerContext.d.ts +6 -0
  308. package/dist/index-B1_TzJaI.js +1104 -0
  309. package/dist/index-BavF06C6.js +190 -0
  310. package/dist/index-BfFmpddl.cjs +21 -0
  311. package/dist/index-BuBzneeW.cjs +46 -0
  312. package/dist/index-CGsQWodV.cjs +1 -0
  313. package/dist/index-CIe7eCMH.js +3200 -0
  314. package/dist/index-CfSF8LXa.cjs +1 -0
  315. package/dist/index-D5GTzOzD.cjs +1 -0
  316. package/dist/index-DBhQzvVa.js +314 -0
  317. package/dist/index-DE17y0ZI.cjs +1 -0
  318. package/dist/index-JII7huPk.js +442 -0
  319. package/dist/index-tpCr9CLj.cjs +1 -0
  320. package/dist/{renderPasses-NnKZVfBy.js → index-w1S7fI2B.js} +219 -247
  321. package/dist/index-zGaqrz_K.js +188 -0
  322. package/dist/instructions.cjs +30 -0
  323. package/dist/instructions.js +1507 -0
  324. package/dist/{internal-vsfNQycj.js → internal-B90P-clC.js} +138 -118
  325. package/dist/internal-Cjinca64.cjs +1 -0
  326. package/dist/internal.cjs +1 -1
  327. package/dist/internal.js +15 -10
  328. package/dist/iris/compute.d.ts +7 -5
  329. package/dist/iris/types.d.ts +6 -4
  330. package/dist/{landmarkMask-CbTFzBYG.js → landmarkMask-BFDyBnKM.js} +6 -6
  331. package/dist/landmarks-BlUqf5MZ.cjs +1 -0
  332. package/dist/landmarks-bftdwq6Z.js +76 -0
  333. package/dist/loaders-BGAUACsd.js +363 -0
  334. package/dist/loaders-BJ1_QCHt.cjs +1 -0
  335. package/dist/low-level.cjs +1 -1
  336. package/dist/low-level.js +666 -602
  337. package/dist/main.cjs +1 -1
  338. package/dist/main.js +866 -1182
  339. package/dist/models/Body/index.d.ts +2 -0
  340. package/dist/models/Face/constants.d.ts +8 -0
  341. package/dist/models/Face/index.d.ts +3 -11
  342. package/dist/models/Face/rotation.d.ts +18 -3
  343. package/dist/models/Hand/HandTracking.d.ts +17 -1
  344. package/dist/models/Segmentation/index.d.ts +2 -0
  345. package/dist/models/nodeSource.d.ts +9 -0
  346. package/dist/particles/emission.d.ts +24 -0
  347. package/dist/particles/eyes.d.ts +24 -0
  348. package/dist/particles/glsl.d.ts +14 -0
  349. package/dist/particles/index.d.ts +10 -0
  350. package/dist/particles/motion.d.ts +42 -0
  351. package/dist/particles/presets.d.ts +12 -0
  352. package/dist/particles/ring.d.ts +58 -0
  353. package/dist/particles/selfTest.d.ts +53 -0
  354. package/dist/particles/settings.d.ts +127 -0
  355. package/dist/particles/shapes.d.ts +29 -0
  356. package/dist/particles/spawner.d.ts +60 -0
  357. package/dist/particles/system.d.ts +64 -0
  358. package/dist/particles.cjs +122 -0
  359. package/dist/particles.js +774 -0
  360. package/dist/product.cjs +1 -1
  361. package/dist/product.js +29 -29
  362. package/dist/{providers-C0Dlhh9Z.js → providers-C8rE26Uf.js} +127 -126
  363. package/dist/providers-DHsrhDI2.cjs +62 -0
  364. package/dist/render/renderPasses.d.ts +8 -0
  365. package/dist/render/sceneBeforeRender.d.ts +12 -0
  366. package/dist/{renderGroups-CN1cGFUo.js → renderGroups-B38pUaX2.js} +1 -1
  367. package/dist/{renderGroups-O4KmaMl9.cjs → renderGroups-Cb_4Ar1Q.cjs} +1 -1
  368. package/dist/renderPasses-B6l8IpJv.js +1290 -0
  369. package/dist/renderPasses-dqmkft4P.cjs +158 -0
  370. package/dist/renderState-CJNmj5jz.js +39 -0
  371. package/dist/renderState-apSfg4eR.cjs +1 -0
  372. package/dist/scene-object.cjs +1 -1
  373. package/dist/scene-object.js +2 -2
  374. package/dist/segmentation-Cb3ouK6Z.js +1758 -0
  375. package/dist/segmentation-D9pYO6aR.cjs +1 -0
  376. package/dist/segmentation2d/types.d.ts +6 -0
  377. package/dist/select-Ck5LGz-J.cjs +1 -0
  378. package/dist/select-pYRo_win.js +233 -0
  379. package/dist/selectors-C4X71aoD.cjs +1 -0
  380. package/dist/selectors-DmNaKIwE.js +196 -0
  381. package/dist/session-BrH8G7iJ.cjs +31 -0
  382. package/dist/session-DgA_z6O1.js +418 -0
  383. package/dist/{settings-aQk845NJ.js → settings-BJ7FMBsO.js} +53 -15
  384. package/dist/settings-C63FMBlF.cjs +1 -0
  385. package/dist/similarityFit-BFqHND2e.cjs +1 -0
  386. package/dist/similarityFit-Bbz-R8AY.js +91 -0
  387. package/dist/spring/index.d.ts +2 -0
  388. package/dist/spring/spring.d.ts +69 -0
  389. package/dist/spring/swing.d.ts +54 -0
  390. package/dist/tracking.cjs +10 -1
  391. package/dist/tracking.js +1002 -855
  392. package/dist/trigger-D0Pm9noT.cjs +49 -0
  393. package/dist/trigger-IQeys0oS.js +2128 -0
  394. package/dist/types/face.d.ts +20 -1
  395. package/dist/types/hand-tracking.d.ts +9 -0
  396. package/dist/types/nodes.d.ts +20 -1
  397. package/dist/types/segmentation.d.ts +5 -0
  398. package/dist/updateThrottle-BseecYag.js +4 -0
  399. package/dist/updateThrottle-Of5Y4SVa.cjs +1 -0
  400. package/dist/useFaceInfo-BHDNCvsJ.cjs +1 -0
  401. package/dist/useFaceInfo-J4x7LsqL.js +76 -0
  402. package/dist/useFaceResultReader-BvEo5REG.js +61 -0
  403. package/dist/useFaceResultReader-DuaL1KJG.cjs +1 -0
  404. package/dist/useInstructionHold-DOu-RpCM.js +53 -0
  405. package/dist/useInstructionHold-DwJY1Alr.cjs +1 -0
  406. package/dist/useLandmarkPoseFit-Bg-h9BPb.cjs +1 -0
  407. package/dist/useLandmarkPoseFit-Bmb3h6Mw.js +87 -0
  408. package/dist/{useXRCapabilities-B1R2ghy-.cjs → useXRCapabilities-Cr3RzuAW.cjs} +1 -1
  409. package/dist/{useXRCapabilities-C68v__wB.js → useXRCapabilities-Cxmlmpbd.js} +1 -1
  410. package/dist/utils/canonicalRigidLandmarks.d.ts +8 -0
  411. package/dist/utils/headOccluderFit.d.ts +42 -0
  412. package/dist/utils/integrity.d.ts +17 -0
  413. package/dist/utils/resolveNumFaces.d.ts +13 -0
  414. package/dist/utils/shoulderOccluderFit.d.ts +38 -0
  415. package/dist/utils/similarityFit.d.ts +23 -0
  416. package/dist/uv-BMFt19bg.cjs +1 -0
  417. package/dist/{index-CsUdQ-pn.js → uv-DJU_XfmN.js} +15 -249
  418. package/docs/SDK_DOCUMENTATION.md +1 -2
  419. package/docs/api/adaptive-quality.mdx +1 -1
  420. package/docs/api/body-instructions.mdx +285 -0
  421. package/docs/api/body-triggers.mdx +234 -0
  422. package/docs/api/camera-permission.mdx +1 -1
  423. package/docs/api/coordinate-spaces.mdx +7 -4
  424. package/docs/api/cross-camera.mdx +3 -2
  425. package/docs/api/debug-ui-scene-editor.mdx +23 -2
  426. package/docs/api/external-face-mesh.mdx +231 -0
  427. package/docs/api/face-actions.mdx +20 -16
  428. package/docs/api/face-attribute-expression.mdx +1 -1
  429. package/docs/api/face-binding-anchors.mdx +4 -2
  430. package/docs/api/face-character.mdx +157 -0
  431. package/docs/api/face-effects.mdx +3 -0
  432. package/docs/api/face-expression-controller.mdx +153 -0
  433. package/docs/api/face-info.mdx +17 -11
  434. package/docs/api/face-inset.mdx +204 -0
  435. package/docs/api/face-instructions.mdx +183 -0
  436. package/docs/api/face-liquify.mdx +196 -0
  437. package/docs/api/face-mesh.mdx +4 -7
  438. package/docs/api/face-morph.mdx +117 -0
  439. package/docs/api/face-painting.mdx +7 -0
  440. package/docs/api/face-reprojection.mdx +154 -0
  441. package/docs/api/face-retouching.mdx +18 -10
  442. package/docs/api/face-swap.mdx +350 -0
  443. package/docs/api/face-warp-3d.mdx +166 -0
  444. package/docs/api/faceless.mdx +143 -0
  445. package/docs/api/gestures.mdx +68 -32
  446. package/docs/api/hair.mdx +97 -0
  447. package/docs/api/hand-instructions.mdx +222 -0
  448. package/docs/api/hand-rig.mdx +535 -0
  449. package/docs/api/hand-touch.mdx +162 -0
  450. package/docs/api/head-occluder.mdx +563 -0
  451. package/docs/api/holistic-tracker.mdx +6 -1
  452. package/docs/api/instructions.mdx +323 -0
  453. package/docs/api/iris-tracking.mdx +24 -19
  454. package/docs/api/made-up-camera.mdx +131 -0
  455. package/docs/api/makeup-skin-tone.mdx +135 -0
  456. package/docs/api/makeup.mdx +353 -0
  457. package/docs/api/multi-subject.mdx +4 -1
  458. package/docs/api/particles.mdx +155 -0
  459. package/docs/api/person-cutout.mdx +1 -1
  460. package/docs/api/pin-to-face-mesh.mdx +274 -0
  461. package/docs/api/product-ar.mdx +5 -2
  462. package/docs/api/segmentation-overlay.mdx +1 -1
  463. package/docs/docs.json +29 -1
  464. package/docs/examples/lip-shaders.mdx +82 -33
  465. package/docs/guides/face-atlas-template.svg +1 -0
  466. package/docs/guides/face-atlas-textures.mdx +186 -0
  467. package/docs/guides/face-texture-template.svg +1 -0
  468. package/docs/guides/harness-debug-ui.mdx +4 -4
  469. package/docs/guides/lip-effect-textures.mdx +178 -102
  470. package/docs/guides/lip-uv-template.png +0 -0
  471. package/docs/guides/lip-uv-template.svg +1 -1
  472. package/docs/guides/makeup-design-textures.mdx +109 -0
  473. package/docs/introduction.mdx +1 -2
  474. package/package.json +11 -1
  475. package/dist/DebuggerUI-C-ldiozL.js +0 -269
  476. package/dist/DebuggerUI-CWX5EtQv.cjs +0 -1
  477. package/dist/FaceMeshRenderer-BEEXZwS6.cjs +0 -158
  478. package/dist/FaceMeshRenderer-UuH5sTXG.js +0 -1322
  479. package/dist/FaceRetouch-C7h7x9kd.js +0 -683
  480. package/dist/FaceRetouch-DqftT26Y.cjs +0 -134
  481. package/dist/GLTFLoader-C5q63sKO.js +0 -1633
  482. package/dist/GLTFLoader-Cb_CRwmG.cjs +0 -1
  483. package/dist/SegmentationOverlay-DQuW3dsc.js +0 -133
  484. package/dist/SegmentationOverlay-aWVod8Kl.cjs +0 -1
  485. package/dist/components/FaceWarp3D/FaceWarp3DHead.d.ts +0 -15
  486. package/dist/components/FaceWarp3D/defaults.d.ts +0 -37
  487. package/dist/components/FaceWarp3D/warp.d.ts +0 -13
  488. package/dist/contexts-CO0sd4JQ.cjs +0 -1
  489. package/dist/contexts-FzlnnMYD.js +0 -669
  490. package/dist/debug-ui/face-warp-3d/index.d.ts +0 -6
  491. package/dist/getFaceInfo-BkZfaQs-.js +0 -118
  492. package/dist/getFaceInfo-ahPxQFGu.cjs +0 -1
  493. package/dist/index--RgGzZ6X.cjs +0 -47
  494. package/dist/index-CHVbH0hz.js +0 -214
  495. package/dist/index-CeVkgsag.cjs +0 -1
  496. package/dist/index-CnGox6Xr.js +0 -3054
  497. package/dist/index-DKBAh6hV.cjs +0 -1
  498. package/dist/index-DsZwTfG0.cjs +0 -1
  499. package/dist/index-Dw6tj2Mi.js +0 -144
  500. package/dist/index-OCPjOaeP.cjs +0 -1
  501. package/dist/index-s9pF4zkG.js +0 -2053
  502. package/dist/internal-BYza1h8_.cjs +0 -1
  503. package/dist/measures-9dQPdw96.js +0 -154
  504. package/dist/measures-KfJzpvod.cjs +0 -1
  505. package/dist/providers-YNwkmNeK.cjs +0 -62
  506. package/dist/renderPasses-Cg-zqmEz.cjs +0 -21
  507. package/dist/screenTransform-BenfCtZt.js +0 -44
  508. package/dist/screenTransform-BiXdpVf0.cjs +0 -1
  509. package/dist/segmentation-9PhSvc-R.cjs +0 -1
  510. package/dist/segmentation-CeOTKemr.js +0 -5
  511. package/dist/selectors-C5G1PMYL.js +0 -195
  512. package/dist/selectors-Du_PsVnW.cjs +0 -1
  513. package/dist/session-BBr0yN8h.cjs +0 -31
  514. package/dist/session-Cy0m7l7-.js +0 -363
  515. package/dist/settings-DRR7-snV.cjs +0 -1
  516. package/dist/useFaceInfo-Blf7FCu3.js +0 -303
  517. package/dist/useFaceInfo-C5mO8NQY.cjs +0 -1
package/dist/main.js CHANGED
@@ -1,168 +1,171 @@
1
- var Ke = Object.defineProperty;
2
- var We = (s, e, t) => e in s ? Ke(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
- var T = (s, e, t) => We(s, typeof e != "symbol" ? e + "" : e, t);
4
- import { X as C, u as xe, Y as He, Z as Ve, _ as je, $ as Ye, a0 as Qe, a1 as Ze, a2 as Ee, R as Je, L as et, N as tt, I as st, a3 as rt, p as at } from "./index-CnGox6Xr.js";
5
- import { ag as dr, ah as mr, g as fr, a4 as hr, ai as pr, ad as gr, ae as yr, c as Sr, a as Mr, j as Er, d as br, a5 as Tr, o as Ar, a6 as Rr, i as vr, a7 as wr, a8 as Fr, a9 as Cr, af as kr, A as _r, aa as xr, r as Ur, ab as Pr, ac as Nr } from "./index-CnGox6Xr.js";
6
- import { S as nt } from "./contexts-FzlnnMYD.js";
7
- import { X as Ir } from "./contexts-FzlnnMYD.js";
8
- import { S as it, c as ot } from "./index-s9pF4zkG.js";
9
- import { L as Or, e as Gr, R as qr, b as Br, f as $r, a as zr, d as Xr, g as Kr, T as Wr } from "./index-s9pF4zkG.js";
10
- import { jsxs as L, jsx as M, Fragment as ae } from "react/jsx-runtime";
11
- import { useRef as w, useMemo as K, useEffect as x, useState as k, Suspense as ct, useCallback as E, forwardRef as lt, useImperativeHandle as ut, useContext as dt, createContext as mt, useId as ft, useSyncExternalStore as ht } from "react";
12
- import * as $ from "three";
13
- import { MathUtils as pt, Vector2 as gt, Vector3 as yt, DoubleSide as se, RepeatWrapping as be, LinearFilter as Te } from "three";
14
- import { D as Vr, K as jr, J as Yr, F as Qr, N as Zr, O as Jr, H as ea, M as ta, P as sa, S as ra, E as aa, B as na, L as ia, Q as oa, R as ca, G as la, C as ua, I as da } from "./renderPasses-NnKZVfBy.js";
15
- import { useThree as St, useFrame as Ue } from "@react-three/fiber";
16
- import { u as Pe, a as Ne, R as Mt, d as Et, e as bt } from "./selectors-C5G1PMYL.js";
17
- import { u as Tt } from "./index-CsUdQ-pn.js";
18
- import { M as fa } from "./index-CsUdQ-pn.js";
19
- import { useTexture as At } from "@react-three/drei";
20
- import { a as Rt } from "./index-CHVbH0hz.js";
21
- import { D as pa, d as ga, M as ya, n as Sa } from "./index-CHVbH0hz.js";
22
- import { G as Ea, A as ba, E as Ta, M as Aa, S as Ra, T as va, H as wa, B as Fa } from "./FaceMeshRenderer-UuH5sTXG.js";
23
- import { d as ka, r as _a } from "./drawNormalizedCrop-CRdIDyl1.js";
24
- import { c as Ua, a as Pa, b as Na, D as Da, m as Ia, r as La } from "./screenTransform-BenfCtZt.js";
25
- import { d as Ga, q as qa, r as Ba, v as $a, m as za, n as Xa, g as Ka, x as Wa, h as Ha, i as Va, k as ja, e as Ya, l as Qa, o as Za, p as Ja, t as en, y as tn, z as sn, w as rn } from "./useFaceInfo-Blf7FCu3.js";
26
- import { u as nn } from "./useXRCapabilities-C68v__wB.js";
27
- import { G as vt } from "./GLTFLoader-C5q63sKO.js";
28
- import { S as wt } from "./segmentation-CeOTKemr.js";
29
- const Q = (s, e, t, r) => pt.damp(s, e, Math.max(0, t), Math.max(0, r)), ks = (s, e, t, r, n = new gt()) => n.set(
30
- Q(s.x, e.x, t, r),
31
- Q(s.y, e.y, t, r)
32
- ), _s = (s, e, t, r, n = new yt()) => n.set(
33
- Q(s.x, e.x, t, r),
34
- Q(s.y, e.y, t, r),
35
- Q(s.z, e.z, t, r)
36
- ), Ft = "rgba(20,40,110,0.88)", Ct = 24, kt = 512;
37
- function xs({
38
- color: s = Ft,
39
- borderColor: e,
40
- borderWidth: t = 0,
41
- borderRadius: r = Ct,
42
- resolution: n = kt,
43
- aspect: a = 1,
1
+ var Pe = Object.defineProperty;
2
+ var Ie = (e, t, s) => t in e ? Pe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
+ var N = (e, t, s) => Ie(e, typeof t != "symbol" ? t + "" : t, s);
4
+ import { X as v, u as Le, G as Oe, I as Ge, J as qe, K as Be, L as Ke, M as We } from "./index-CIe7eCMH.js";
5
+ import { a2 as Gs, a3 as qs, z as Bs, N as Ks, a4 as Ws, _ as Xs, $ as Hs, c as zs, v as $s, B as js, d as Vs, f as Zs, O as Ys, k as Js, P as Qs, i as er, Q as tr, R as sr, T as rr, Y as ar, p as nr, q as ir, a0 as or, r as cr, a1 as lr, U as ur, Z as dr, t as mr, V as pr, W as fr } from "./index-CIe7eCMH.js";
6
+ import { S as Xe } from "./contexts-jak8-tND.js";
7
+ import { X as gr } from "./contexts-jak8-tND.js";
8
+ import { S as yr, T as Mr } from "./TextLabel-c9BCucOI.js";
9
+ import { jsxs as L, jsx as M, Fragment as re } from "react/jsx-runtime";
10
+ import { useRef as F, useMemo as Z, useEffect as x, useState as k, Suspense as He, useCallback as R, forwardRef as ze, useImperativeHandle as $e, useContext as je, createContext as Ve, useId as Ze, useSyncExternalStore as Ye } from "react";
11
+ import * as Je from "three";
12
+ import { MathUtils as Qe, Vector2 as et, Vector3 as tt, DoubleSide as te, RepeatWrapping as Se, LinearFilter as ye } from "three";
13
+ import { D as Er, H as Rr, G as br, E as Ar, J as Fr, K as Cr, P as vr, S as kr, C as _r, I as xr, L as wr, M as Nr, F as Ur, B as Dr } from "./index-w1S7fI2B.js";
14
+ import { useThree as st, useFrame as Fe } from "@react-three/fiber";
15
+ import { R as rt } from "./uv-DJU_XfmN.js";
16
+ import { c as Ce, b as ve } from "./selectors-DmNaKIwE.js";
17
+ import { u as at } from "./landmarks-bftdwq6Z.js";
18
+ import { S as nt, c as it } from "./index-B1_TzJaI.js";
19
+ import { L as Ir, d as Lr, R as Or, a as Gr, e as qr, b as Br, f as Kr } from "./index-B1_TzJaI.js";
20
+ import { useTexture as ot } from "@react-three/drei";
21
+ import { a as ct } from "./context-DTxSQvp4.js";
22
+ import { k as Xr, D as Hr, j as zr, E as $r, M as jr, h as Vr, S as Zr, T as Yr, l as Jr, g as Qr, n as ea, r as ta } from "./renderPasses-B6l8IpJv.js";
23
+ import { D as ra, a as aa, M as na, n as ia } from "./index-zGaqrz_K.js";
24
+ import { d as ca, r as la } from "./drawNormalizedCrop-CRdIDyl1.js";
25
+ import { M as da } from "./index-BavF06C6.js";
26
+ import { k as pa, a as fa, b as ha, D as ga, m as Sa, r as ya } from "./index-DBhQzvVa.js";
27
+ import { c as Ta, j as Ea, k as Ra, l as ba, m as Aa, n as Fa, b as Ca, o as va, d as ka, e as _a, f as xa, a as wa, g as Na, h as Ua, i as Da, t as Pa, p as Ia, v as La, w as Oa } from "./select-pYRo_win.js";
28
+ import { u as qa } from "./useXRCapabilities-Cxmlmpbd.js";
29
+ import { g as ke } from "./loaders-BGAUACsd.js";
30
+ import { D as Ka, X as Wa, c as Xa, d as Ha, a as za, b as $a, e as ja, f as Va, h as Za, i as Ya, u as Ja } from "./loaders-BGAUACsd.js";
31
+ import { S as lt } from "./segmentation-Cb3ouK6Z.js";
32
+ const V = (e, t, s, r) => Qe.damp(e, t, Math.max(0, s), Math.max(0, r)), os = (e, t, s, r, a = new et()) => a.set(
33
+ V(e.x, t.x, s, r),
34
+ V(e.y, t.y, s, r)
35
+ ), cs = (e, t, s, r, a = new tt()) => a.set(
36
+ V(e.x, t.x, s, r),
37
+ V(e.y, t.y, s, r),
38
+ V(e.z, t.z, s, r)
39
+ ), ut = "rgba(20,40,110,0.88)", dt = 24, mt = 512;
40
+ function ls({
41
+ color: e = ut,
42
+ borderColor: t,
43
+ borderWidth: s = 0,
44
+ borderRadius: r = dt,
45
+ resolution: a = mt,
46
+ aspect: n = 1,
44
47
  opacity: i = 1,
45
- name: o,
46
- overlay: c = !0,
48
+ name: c,
49
+ overlay: o = !0,
47
50
  position: l,
48
- rotation: p,
49
- scale: u,
51
+ rotation: h,
52
+ scale: d,
50
53
  visible: m
51
54
  }) {
52
- const d = w(null), f = w(null), y = K(() => _t({
53
- width: Math.round(n * Math.max(a, 0.05)),
54
- height: Math.round(n),
55
- color: s,
56
- borderColor: e,
57
- borderWidth: t,
55
+ const u = F(null), p = F(null), S = Z(() => pt({
56
+ width: Math.round(a * Math.max(n, 0.05)),
57
+ height: Math.round(a),
58
+ color: e,
59
+ borderColor: t,
60
+ borderWidth: s,
58
61
  borderRadius: r
59
- }), [s, e, t, r, n, a]);
62
+ }), [e, t, s, r, a, n]);
60
63
  x(() => () => {
61
- y.dispose();
62
- }, [y]);
63
- const A = w(null), h = w(i);
64
- return h.current !== i && (h.current = i, A.current = null, f.current && (f.current.opacity = i)), x(() => {
65
- const g = d.current;
64
+ S.dispose();
65
+ }, [S]);
66
+ const E = F(null), f = F(i);
67
+ return f.current !== i && (f.current = i, E.current = null, p.current && (p.current.opacity = i)), x(() => {
68
+ const g = u.current;
66
69
  if (g)
67
- return g.userData.setOpacity = (R) => {
68
- A.current = R, f.current && (f.current.opacity = R);
70
+ return g.userData.setOpacity = (b) => {
71
+ E.current = b, p.current && (p.current.opacity = b);
69
72
  }, () => {
70
73
  delete g.userData.setOpacity;
71
74
  };
72
75
  }, []), /* @__PURE__ */ L(
73
76
  "mesh",
74
77
  {
75
- ref: d,
76
- name: o,
78
+ ref: u,
79
+ name: c,
77
80
  position: l,
78
- rotation: p,
79
- scale: u,
81
+ rotation: h,
82
+ scale: d,
80
83
  visible: m,
81
84
  children: [
82
85
  /* @__PURE__ */ M("planeGeometry", { args: [1, 1] }),
83
86
  /* @__PURE__ */ M(
84
87
  "meshBasicMaterial",
85
88
  {
86
- ref: f,
87
- map: y,
89
+ ref: p,
90
+ map: S,
88
91
  transparent: !0,
89
92
  opacity: i,
90
- depthTest: !c,
91
- depthWrite: !c
93
+ depthTest: !o,
94
+ depthWrite: !o
92
95
  }
93
96
  )
94
97
  ]
95
98
  }
96
99
  );
97
100
  }
98
- function _t(s) {
99
- const { width: e, height: t, color: r, borderColor: n, borderWidth: a, borderRadius: i } = s, o = typeof OffscreenCanvas < "u" ? new OffscreenCanvas(e, t) : (() => {
100
- const u = document.createElement("canvas");
101
- return u.width = e, u.height = t, u;
102
- })(), c = o.getContext("2d");
103
- c.clearRect(0, 0, e, t);
104
- const l = Math.min(i, Math.min(e, t) / 2);
105
- c.beginPath(), c.moveTo(l, 0), c.lineTo(e - l, 0), c.quadraticCurveTo(e, 0, e, l), c.lineTo(e, t - l), c.quadraticCurveTo(e, t, e - l, t), c.lineTo(l, t), c.quadraticCurveTo(0, t, 0, t - l), c.lineTo(0, l), c.quadraticCurveTo(0, 0, l, 0), c.closePath(), c.fillStyle = r, c.fill(), n && a > 0 && (c.lineWidth = a, c.strokeStyle = n, c.stroke());
106
- const p = new $.CanvasTexture(o);
107
- return p.needsUpdate = !0, p;
101
+ function pt(e) {
102
+ const { width: t, height: s, color: r, borderColor: a, borderWidth: n, borderRadius: i } = e, c = typeof OffscreenCanvas < "u" ? new OffscreenCanvas(t, s) : (() => {
103
+ const d = document.createElement("canvas");
104
+ return d.width = t, d.height = s, d;
105
+ })(), o = c.getContext("2d");
106
+ o.clearRect(0, 0, t, s);
107
+ const l = Math.min(i, Math.min(t, s) / 2);
108
+ 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());
109
+ const h = new Je.CanvasTexture(c);
110
+ return h.needsUpdate = !0, h;
108
111
  }
109
- const Us = ({
110
- segmentationMask: s,
111
- segmentation: e,
112
- invert: t = !1,
112
+ const us = ({
113
+ segmentationMask: e,
114
+ segmentation: t,
115
+ invert: s = !1,
113
116
  customBackground: r,
114
- renderOrder: n = Mt.BACKGROUND
117
+ renderOrder: a = rt.BACKGROUND
115
118
  }) => {
116
- const { camera: a, size: i } = St(), o = Pe(), c = Ne(C.BACKGROUND_SEGMENTATION), l = e ? c == null ? void 0 : c.backgroundSegmentationMask : void 0, p = w(!1);
119
+ const { camera: n, size: i } = st(), c = Ce(), o = ve(v.BACKGROUND_SEGMENTATION), l = t ? o == null ? void 0 : o.backgroundSegmentationMask : void 0, h = F(!1);
117
120
  x(() => {
118
- if (!e) {
119
- p.current = !1;
121
+ if (!t) {
122
+ h.current = !1;
120
123
  return;
121
124
  }
122
- c === null && !p.current && (console.warn(
123
- `[VideoBackground] segmentation="${e}" set but no matching <Segmentation> component is mounted; rendering unmasked.`
124
- ), p.current = !0);
125
- }, [e, c]);
126
- const u = e ? l : s, m = K(() => {
127
- if (!a.isPerspectiveCamera)
125
+ o === null && !h.current && (console.warn(
126
+ `[VideoBackground] segmentation="${t}" set but no matching <Segmentation> component is mounted; rendering unmasked.`
127
+ ), h.current = !0);
128
+ }, [t, o]);
129
+ const d = t ? l : e, m = Z(() => {
130
+ if (!n.isPerspectiveCamera)
128
131
  return [10, 10];
129
- const d = a, A = (d.position.z || 5) - -1, h = d.fov * Math.PI / 180, g = 2 * Math.tan(h / 2) * A;
132
+ const u = n, E = (u.position.z || 5) - -1, f = u.fov * Math.PI / 180, g = 2 * Math.tan(f / 2) * E;
130
133
  return [g * (i.width / i.height), g];
131
- }, [a, i]);
132
- return o ? /* @__PURE__ */ M("group", { position: [0, 0, -1], children: t ? /* @__PURE__ */ L(ae, { children: [
133
- /* @__PURE__ */ L("mesh", { position: [0, 0, -0.01], renderOrder: n - 1, children: [
134
+ }, [n, i]);
135
+ return c ? /* @__PURE__ */ M("group", { position: [0, 0, -1], children: s ? /* @__PURE__ */ L(re, { children: [
136
+ /* @__PURE__ */ L("mesh", { position: [0, 0, -0.01], renderOrder: a - 1, children: [
134
137
  /* @__PURE__ */ M("planeGeometry", { args: m }),
135
138
  /* @__PURE__ */ M(
136
139
  "meshBasicMaterial",
137
140
  {
138
- map: o,
141
+ map: c,
139
142
  depthTest: !1,
140
143
  depthWrite: !1,
141
144
  toneMapped: !1,
142
- side: se
145
+ side: te
143
146
  }
144
147
  )
145
148
  ] }),
146
- r && u && /* @__PURE__ */ L("mesh", { position: [0, 0, 0], renderOrder: n, children: [
149
+ r && d && /* @__PURE__ */ L("mesh", { position: [0, 0, 0], renderOrder: a, children: [
147
150
  /* @__PURE__ */ M("planeGeometry", { args: m }),
148
151
  /* @__PURE__ */ M(
149
152
  "meshBasicMaterial",
150
153
  {
151
154
  map: typeof r == "string" ? void 0 : r,
152
155
  color: typeof r == "string" ? r : void 0,
153
- alphaMap: u,
156
+ alphaMap: d,
154
157
  transparent: !1,
155
158
  alphaTest: 0.5,
156
159
  depthTest: !1,
157
160
  depthWrite: !1,
158
161
  toneMapped: !1,
159
- side: se
162
+ side: te
160
163
  },
161
164
  "inverted-mask"
162
165
  )
163
166
  ] })
164
- ] }) : /* @__PURE__ */ L(ae, { children: [
165
- r && u && /* @__PURE__ */ L("mesh", { position: [0, 0, -0.01], renderOrder: n - 1, children: [
167
+ ] }) : /* @__PURE__ */ L(re, { children: [
168
+ r && d && /* @__PURE__ */ L("mesh", { position: [0, 0, -0.01], renderOrder: a - 1, children: [
166
169
  /* @__PURE__ */ M("planeGeometry", { args: m }),
167
170
  /* @__PURE__ */ M(
168
171
  "meshBasicMaterial",
@@ -172,87 +175,87 @@ const Us = ({
172
175
  depthTest: !1,
173
176
  depthWrite: !1,
174
177
  toneMapped: !1,
175
- side: se
178
+ side: te
176
179
  }
177
180
  )
178
181
  ] }),
179
- /* @__PURE__ */ L("mesh", { position: [0, 0, 0], renderOrder: n, children: [
182
+ /* @__PURE__ */ L("mesh", { position: [0, 0, 0], renderOrder: a, children: [
180
183
  /* @__PURE__ */ M("planeGeometry", { args: m }),
181
184
  /* @__PURE__ */ M(
182
185
  "meshBasicMaterial",
183
186
  {
184
- map: o,
185
- alphaMap: u,
187
+ map: c,
188
+ alphaMap: d,
186
189
  transparent: !1,
187
- alphaTest: u ? 0.5 : void 0,
190
+ alphaTest: d ? 0.5 : void 0,
188
191
  depthTest: !1,
189
192
  depthWrite: !1,
190
193
  toneMapped: !1,
191
- side: se
194
+ side: te
192
195
  },
193
- u ? "with-mask" : "no-mask"
196
+ d ? "with-mask" : "no-mask"
194
197
  )
195
198
  ] })
196
199
  ] }) }) : null;
197
- }, xt = { left: -1, right: 1, top: 1, bottom: -1 }, Ut = ({
198
- ready: s,
199
- error: e,
200
- hasMask: t
201
- }) => e ? "error" : s && t ? "ready" : "loading", Pt = (s, e) => s === "ready" || e === "camera", Nt = (s = !0) => {
202
- const { ready: e, error: t } = Tt(
203
- C.BACKGROUND_SEGMENTATION,
200
+ }, ft = { left: -1, right: 1, top: 1, bottom: -1 }, ht = ({
201
+ ready: e,
202
+ error: t,
203
+ hasMask: s
204
+ }) => t ? "error" : e && s ? "ready" : "loading", gt = (e, t) => e === "ready" || t === "camera", St = (e = !0) => {
205
+ const { ready: t, error: s } = at(
206
+ v.BACKGROUND_SEGMENTATION,
204
207
  { type: "portrait" },
205
- s
206
- ), r = Ne(C.BACKGROUND_SEGMENTATION), [n, a] = k(null);
207
- return Ue(() => {
208
+ e
209
+ ), r = ve(v.BACKGROUND_SEGMENTATION), [a, n] = k(null);
210
+ return Fe(() => {
208
211
  const i = (r == null ? void 0 : r.backgroundSegmentationMask) ?? null;
209
- i !== n && a(i);
212
+ i !== a && n(i);
210
213
  }), {
211
- texture: n,
212
- status: Ut({ ready: e, error: t, hasMask: !!n }),
213
- error: t
214
+ texture: a,
215
+ status: ht({ ready: t, error: s, hasMask: !!a }),
216
+ error: s
214
217
  };
215
- }, Ps = ({
216
- invert: s = !1,
217
- fallback: e = "camera",
218
- active: t = !0,
218
+ }, ds = ({
219
+ invert: e = !1,
220
+ fallback: t = "camera",
221
+ active: s = !0,
219
222
  onStatusChange: r,
220
- fit: n = "cover",
221
- anchors: a = xt,
223
+ fit: a = "cover",
224
+ anchors: n = ft,
222
225
  renderOrder: i = 100,
223
- visible: o = !0,
224
- maskFeather: c = 4,
226
+ visible: c = !0,
227
+ maskFeather: o = 4,
225
228
  maskErode: l = 0.7,
226
- ...p
229
+ ...h
227
230
  }) => {
228
- const u = Pe(), { texture: m, status: d, error: f } = Nt(t);
231
+ const d = Ce(), { texture: m, status: u, error: p } = St(s);
229
232
  if (x(() => {
230
- r == null || r(d, f);
231
- }, [d, f, r]), !u) return null;
232
- const y = d === "ready" && m;
233
- return !y && !Pt(d, e) ? null : /* @__PURE__ */ M(
234
- it,
233
+ r == null || r(u, p);
234
+ }, [u, p, r]), !d) return null;
235
+ const S = u === "ready" && m;
236
+ return !S && !gt(u, t) ? null : /* @__PURE__ */ M(
237
+ nt,
235
238
  {
236
- ...p,
237
- source: { kind: "texture", texture: u },
238
- fit: n,
239
- anchors: a,
239
+ ...h,
240
+ source: { kind: "texture", texture: d },
241
+ fit: a,
242
+ anchors: n,
240
243
  renderOrder: i,
241
- visible: o,
242
- maskTexture: y ? m : null,
244
+ visible: c,
245
+ maskTexture: S ? m : null,
243
246
  maskChannel: "green",
244
- maskInvert: s,
245
- maskFeather: c,
247
+ maskInvert: e,
248
+ maskFeather: o,
246
249
  maskErode: l
247
250
  }
248
251
  );
249
- }, oe = 9, ce = 16, Ns = ({ children: s }) => {
250
- const [e, t] = k({ width: 0, height: 0 });
252
+ }, ie = 9, oe = 16, ms = ({ children: e }) => {
253
+ const [t, s] = k({ width: 0, height: 0 });
251
254
  return x(() => {
252
255
  const r = () => {
253
- const n = document.documentElement.clientWidth, a = document.documentElement.clientHeight, i = n / a, o = oe / ce;
254
- let c, l;
255
- i > o ? (l = a, c = l * oe / ce) : (c = n, l = c * ce / oe), t({ width: c, height: l });
256
+ const a = document.documentElement.clientWidth, n = document.documentElement.clientHeight, i = a / n, c = ie / oe;
257
+ let o, l;
258
+ i > c ? (l = n, o = l * ie / oe) : (o = a, l = o * oe / ie), s({ width: o, height: l });
256
259
  };
257
260
  return r(), window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
258
261
  }, []), /* @__PURE__ */ M(
@@ -266,38 +269,38 @@ const Us = ({
266
269
  justifyContent: "center",
267
270
  backgroundColor: "#0d0d0d"
268
271
  },
269
- children: /* @__PURE__ */ M("div", { style: { width: e.width, height: e.height, position: "relative" }, children: s })
272
+ children: /* @__PURE__ */ M("div", { style: { width: t.width, height: t.height, position: "relative" }, children: e })
270
273
  }
271
274
  );
272
- }, Ds = ({ size: s = 0.25, ...e }) => /* @__PURE__ */ M("axesHelper", { args: [s], ...e }), Dt = { left: -1, right: 1, top: 1, bottom: -1 }, It = (s, e, t) => {
273
- const r = s % e, n = Math.floor(s / e);
274
- return { x: r / e, y: (t - 1 - n) / t };
275
- }, Lt = ({
276
- sheet: s,
277
- contentAspect: e,
278
- renderOrder: t,
275
+ }, ps = ({ size: e = 0.25, ...t }) => /* @__PURE__ */ M("axesHelper", { args: [e], ...t }), yt = { left: -1, right: 1, top: 1, bottom: -1 }, Mt = (e, t, s) => {
276
+ const r = e % t, a = Math.floor(e / t);
277
+ return { x: r / t, y: (s - 1 - a) / s };
278
+ }, Tt = ({
279
+ sheet: e,
280
+ contentAspect: t,
281
+ renderOrder: s,
279
282
  name: r
280
283
  }) => {
281
- const n = At(s.url), a = w(0), i = w(-1), o = Rt(), [c, l] = e != null ? ot(o, e) : [1, 1];
282
- return Ue((p, u) => {
283
- n.wrapS = be, n.wrapT = be, n.magFilter = Te, n.minFilter = Te, n.generateMipmaps = !1, n.repeat.set(1 / s.cols, 1 / s.rows), a.current += u;
284
- const m = Math.floor(a.current * s.fps) % s.frames;
284
+ const a = ot(e.url), n = F(0), i = F(-1), c = ct(), [o, l] = t != null ? it(c, t) : [1, 1];
285
+ return Fe((h, d) => {
286
+ 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;
287
+ const m = Math.floor(n.current * e.fps) % e.frames;
285
288
  if (m === i.current) return;
286
289
  i.current = m;
287
- const { x: d, y: f } = It(m, s.cols, s.rows);
288
- n.offset.set(d, f);
289
- }), /* @__PURE__ */ L("mesh", { name: r, renderOrder: t, scale: [c, l, 1], children: [
290
+ const { x: u, y: p } = Mt(m, e.cols, e.rows);
291
+ a.offset.set(u, p);
292
+ }), /* @__PURE__ */ L("mesh", { name: r, renderOrder: s, scale: [o, l, 1], children: [
290
293
  /* @__PURE__ */ M("planeGeometry", { args: [1, 1] }),
291
- /* @__PURE__ */ M("meshBasicMaterial", { map: n, transparent: !0, toneMapped: !1, depthWrite: !1 })
294
+ /* @__PURE__ */ M("meshBasicMaterial", { map: a, transparent: !0, toneMapped: !1, depthWrite: !1 })
292
295
  ] });
293
- }, Is = ({
294
- sheet: s,
295
- anchors: e = Dt,
296
- contentAspect: t,
296
+ }, fs = ({
297
+ sheet: e,
298
+ anchors: t = yt,
299
+ contentAspect: s,
297
300
  renderOrder: r = 10,
298
- name: n = "spriteAnimation"
299
- }) => /* @__PURE__ */ M(ct, { fallback: null, children: /* @__PURE__ */ M(nt, { anchors: e, children: /* @__PURE__ */ M(Lt, { sheet: s, contentAspect: t, renderOrder: r, name: n }) }) }), q = (s) => {
300
- switch (s) {
301
+ name: a = "spriteAnimation"
302
+ }) => /* @__PURE__ */ M(He, { fallback: null, children: /* @__PURE__ */ M(Xe, { anchors: t, children: /* @__PURE__ */ M(Tt, { sheet: e, contentAspect: s, renderOrder: r, name: a }) }) }), q = (e) => {
303
+ switch (e) {
301
304
  case "start":
302
305
  return "starting";
303
306
  case "started":
@@ -314,232 +317,232 @@ const Us = ({
314
317
  case "clear":
315
318
  return "idle";
316
319
  }
317
- }, Ot = [
320
+ }, Et = [
318
321
  "video/mp4",
319
322
  "video/webm;codecs=vp9",
320
323
  "video/webm;codecs=vp8",
321
324
  "video/webm"
322
325
  ];
323
- function Ls(s = {}) {
326
+ function hs(e = {}) {
324
327
  const {
325
- audio: e = !1,
326
- mimeType: t,
328
+ audio: t = !1,
329
+ mimeType: s,
327
330
  bitsPerSecond: r,
328
- onData: n,
329
- onStop: a,
331
+ onData: a,
332
+ onStop: n,
330
333
  onRecordingStart: i,
331
- onRecordingPause: o,
332
- onRecordingResume: c,
334
+ onRecordingPause: c,
335
+ onRecordingResume: o,
333
336
  onRecordingStop: l,
334
- onRecordingComplete: p,
335
- onError: u,
337
+ onRecordingComplete: h,
338
+ onError: d,
336
339
  passThroughStream: m
337
- } = s, d = w(null), f = w(null), y = w([]), [A, h] = k("idle"), [g, R] = k(null), [W, v] = k(null), U = E(() => {
338
- var F;
339
- const S = [t, ...Ot].filter(Boolean);
340
- for (const b of S)
341
- if ((F = MediaRecorder.isTypeSupported) != null && F.call(MediaRecorder, b)) return b;
342
- }, [t]), G = E(
343
- async (S) => {
344
- const F = new MediaStream();
345
- if (S.getTracks().forEach((b) => F.addTrack(b)), e) {
346
- let b;
347
- if (e instanceof MediaStream)
348
- b = e;
340
+ } = e, u = F(null), p = F(null), S = F([]), [E, f] = k("idle"), [g, b] = k(null), [X, A] = k(null), w = R(() => {
341
+ var C;
342
+ const y = [s, ...Et].filter(Boolean);
343
+ for (const T of y)
344
+ if ((C = MediaRecorder.isTypeSupported) != null && C.call(MediaRecorder, T)) return T;
345
+ }, [s]), G = R(
346
+ async (y) => {
347
+ const C = new MediaStream();
348
+ if (y.getTracks().forEach((T) => C.addTrack(T)), t) {
349
+ let T;
350
+ if (t instanceof MediaStream)
351
+ T = t;
349
352
  else {
350
- const _ = typeof e == "object" ? { audio: e } : { audio: !0, video: !1 };
351
- b = await navigator.mediaDevices.getUserMedia(_);
353
+ const _ = typeof t == "object" ? { audio: t } : { audio: !0, video: !1 };
354
+ T = await navigator.mediaDevices.getUserMedia(_);
352
355
  }
353
- b.getAudioTracks().forEach((_) => F.addTrack(_));
356
+ T.getAudioTracks().forEach((_) => C.addTrack(_));
354
357
  }
355
- if (!F.getTracks().length)
358
+ if (!C.getTracks().length)
356
359
  throw new Error("No tracks available in combined stream.");
357
- return f.current = F, F;
360
+ return p.current = C, C;
358
361
  },
359
- [e]
360
- ), Z = E(
361
- async (S, F) => {
362
- h(q("start")), v(null), R(null);
362
+ [t]
363
+ ), Y = R(
364
+ async (y, C) => {
365
+ f(q("start")), A(null), b(null);
363
366
  try {
364
- let b;
367
+ let T;
365
368
  if (m)
366
- b = m, f.current = b;
369
+ T = m, p.current = T;
367
370
  else {
368
- if (!S) throw new Error("start(stream) requires a MediaStream.");
369
- b = await G(S);
371
+ if (!y) throw new Error("start(stream) requires a MediaStream.");
372
+ T = await G(y);
370
373
  }
371
- const _ = U(), H = {};
374
+ const _ = w(), H = {};
372
375
  _ && (H.mimeType = _), r && (H.bitsPerSecond = r);
373
- const X = new MediaRecorder(b, H);
374
- X.ondataavailable = (D) => {
375
- var j;
376
- ((j = D.data) == null ? void 0 : j.size) > 0 && (y.current.push(D.data), n == null || n(D.data));
377
- }, X.onstop = () => {
378
- const D = new Blob(y.current, {
376
+ const W = new MediaRecorder(T, H);
377
+ W.ondataavailable = (P) => {
378
+ var $;
379
+ (($ = P.data) == null ? void 0 : $.size) > 0 && (S.current.push(P.data), a == null || a(P.data));
380
+ }, W.onstop = () => {
381
+ const P = new Blob(S.current, {
379
382
  type: _ ?? "video/webm"
380
383
  });
381
- R(D), a == null || a(D), p == null || p(D), y.current = [], h(q("complete"));
382
- }, d.current = X, X.start(F), h(q("started")), i == null || i();
383
- } catch (b) {
384
- const _ = b instanceof Error ? b : new Error(String(b));
385
- console.error("start(stream) failed", _), v(_), h(q("fail")), u == null || u(_);
384
+ b(P), n == null || n(P), h == null || h(P), S.current = [], f(q("complete"));
385
+ }, u.current = W, W.start(C), f(q("started")), i == null || i();
386
+ } catch (T) {
387
+ const _ = T instanceof Error ? T : new Error(String(T));
388
+ console.error("start(stream) failed", _), A(_), f(q("fail")), d == null || d(_);
386
389
  }
387
390
  },
388
391
  [
389
392
  G,
390
- U,
393
+ w,
391
394
  r,
392
- n,
393
395
  a,
394
- p,
396
+ n,
397
+ h,
395
398
  i,
396
- u,
399
+ d,
397
400
  m
398
401
  ]
399
- ), J = E(() => {
400
- const S = d.current;
401
- !S || S.state === "inactive" || (h(q("stop")), S.stop(), l == null || l());
402
- }, [l]), ee = E(() => {
403
- const S = d.current;
404
- (S == null ? void 0 : S.state) === "recording" && (S.pause(), h(q("pause")), o == null || o());
405
- }, [o]), te = E(() => {
406
- const S = d.current;
407
- (S == null ? void 0 : S.state) === "paused" && (S.resume(), h(q("resume")), c == null || c());
408
- }, [c]), V = E(() => {
409
- var S;
402
+ ), J = R(() => {
403
+ const y = u.current;
404
+ !y || y.state === "inactive" || (f(q("stop")), y.stop(), l == null || l());
405
+ }, [l]), Q = R(() => {
406
+ const y = u.current;
407
+ (y == null ? void 0 : y.state) === "recording" && (y.pause(), f(q("pause")), c == null || c());
408
+ }, [c]), ee = R(() => {
409
+ const y = u.current;
410
+ (y == null ? void 0 : y.state) === "paused" && (y.resume(), f(q("resume")), o == null || o());
411
+ }, [o]), z = R(() => {
412
+ var y;
410
413
  try {
411
- d.current && (d.current.onstop = null, d.current.state !== "inactive" && d.current.stop()), d.current = null, (S = f.current) == null || S.getTracks().forEach((F) => F.stop()), f.current = null, R(null), h(q("clear")), y.current = [], v(null);
412
- } catch (F) {
413
- console.error("clear failed", F);
414
+ 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")), S.current = [], A(null);
415
+ } catch (C) {
416
+ console.error("clear failed", C);
414
417
  }
415
418
  }, []);
416
- return x(() => () => V(), []), {
417
- status: A,
418
- start: Z,
419
+ return x(() => () => z(), []), {
420
+ status: E,
421
+ start: Y,
419
422
  stop: J,
420
- pause: ee,
421
- resume: te,
422
- clear: V,
423
- isRecording: A === "recording" || A === "paused",
424
- isPaused: A === "paused",
423
+ pause: Q,
424
+ resume: ee,
425
+ clear: z,
426
+ isRecording: E === "recording" || E === "paused",
427
+ isPaused: E === "paused",
425
428
  recordedBlob: g,
426
- error: W,
427
- getActiveStream: () => f.current
429
+ error: X,
430
+ getActiveStream: () => p.current
428
431
  };
429
432
  }
430
- const Gt = async (s, e = {}) => {
431
- var t, r, n;
432
- (t = e.onCaptureStart) == null || t.call(e), await Promise.resolve();
433
+ const Rt = async (e, t = {}) => {
434
+ var s, r, a;
435
+ (s = t.onCaptureStart) == null || s.call(t), await Promise.resolve();
433
436
  try {
434
- const a = s();
435
- return (r = e.onCaptureComplete) == null || r.call(e, a), a;
436
- } catch (a) {
437
- const i = a instanceof Error ? a : new Error(String(a));
438
- throw (n = e.onError) == null || n.call(e, i), i;
437
+ const n = e();
438
+ return (r = t.onCaptureComplete) == null || r.call(t, n), n;
439
+ } catch (n) {
440
+ const i = n instanceof Error ? n : new Error(String(n));
441
+ throw (a = t.onError) == null || a.call(t, i), i;
439
442
  }
440
- }, Os = (s = {}) => {
441
- const { session: e } = xe(), {
442
- captureFrame: t = e.captureFrame,
443
+ }, gs = (e = {}) => {
444
+ const { session: t } = Le(), {
445
+ captureFrame: s = t.captureFrame,
443
446
  onCaptureStart: r,
444
- onCaptureComplete: n,
445
- onError: a
446
- } = s, [i, o] = k("idle"), [c, l] = k(null), [p, u] = k(null), m = E(async () => {
447
- o("capturing"), l(null), u(null);
447
+ onCaptureComplete: a,
448
+ onError: n
449
+ } = e, [i, c] = k("idle"), [o, l] = k(null), [h, d] = k(null), m = R(async () => {
450
+ c("capturing"), l(null), d(null);
448
451
  try {
449
- const f = await Gt(t, {
452
+ const p = await Rt(s, {
450
453
  onCaptureStart: r,
451
- onCaptureComplete: n,
452
- onError: a
454
+ onCaptureComplete: a,
455
+ onError: n
453
456
  });
454
- return l(f), o("completed"), f;
455
- } catch (f) {
456
- const y = f instanceof Error ? f : new Error(String(f));
457
- return u(y), o("error"), null;
457
+ return l(p), c("completed"), p;
458
+ } catch (p) {
459
+ const S = p instanceof Error ? p : new Error(String(p));
460
+ return d(S), c("error"), null;
458
461
  }
459
- }, [t, r, n, a]), d = E(() => {
460
- o("idle"), l(null), u(null);
462
+ }, [s, r, a, n]), u = R(() => {
463
+ c("idle"), l(null), d(null);
461
464
  }, []);
462
- return { status: i, capturePhoto: m, clear: d, dataUrl: c, error: p };
463
- }, Gs = (s, e) => {
464
- const t = s.split(","), r = t[0].match(/:(.*?);/), n = r ? r[1] : "application/octet-stream", a = atob(t[t.length - 1]);
465
- let i = a.length;
466
- const o = new Uint8Array(i);
465
+ return { status: i, capturePhoto: m, clear: u, dataUrl: o, error: h };
466
+ }, Ss = (e, t) => {
467
+ const s = e.split(","), r = s[0].match(/:(.*?);/), a = r ? r[1] : "application/octet-stream", n = atob(s[s.length - 1]);
468
+ let i = n.length;
469
+ const c = new Uint8Array(i);
467
470
  for (; i--; )
468
- o[i] = a.charCodeAt(i);
469
- return new File([o], e, { type: n });
470
- }, qt = 4, Bt = 50, $t = 5e3, re = (s) => Math.min(1, Math.max(0, s)), Ae = (s) => new Promise((e) => {
471
- if (s.readyState >= 4) {
472
- e();
471
+ c[i] = n.charCodeAt(i);
472
+ return new File([c], t, { type: a });
473
+ }, bt = 4, At = 50, Ft = 5e3, se = (e) => Math.min(1, Math.max(0, e)), Me = (e) => new Promise((t) => {
474
+ if (e.readyState >= 4) {
475
+ t();
473
476
  return;
474
477
  }
475
- let t = !1;
478
+ let s = !1;
476
479
  const r = () => {
477
- t || (t = !0, e());
480
+ s || (s = !0, t());
478
481
  };
479
- s.addEventListener("canplaythrough", r, { once: !0 }), s.addEventListener("error", r, { once: !0 }), setTimeout(r, $t);
480
- }), Re = (s, e) => {
481
- const t = document.createElement("audio");
482
- return t.src = s, t.loop = e, t.preload = "auto", t.setAttribute("playsinline", ""), t.setAttribute("webkit-playsinline", ""), t.load(), t;
483
- }, zt = (s) => {
484
- s.muted = !0, s.play().then(() => {
485
- s.pause(), s.currentTime = 0, s.muted = !1;
482
+ e.addEventListener("canplaythrough", r, { once: !0 }), e.addEventListener("error", r, { once: !0 }), setTimeout(r, Ft);
483
+ }), Te = (e, t) => {
484
+ const s = document.createElement("audio");
485
+ return s.src = e, s.loop = t, s.preload = "auto", s.setAttribute("playsinline", ""), s.setAttribute("webkit-playsinline", ""), s.load(), s;
486
+ }, Ct = (e) => {
487
+ e.muted = !0, e.play().then(() => {
488
+ e.pause(), e.currentTime = 0, e.muted = !1;
486
489
  }).catch(() => {
487
- s.muted = !1;
490
+ e.muted = !1;
488
491
  });
489
492
  };
490
- class Xt {
491
- constructor(e = {}) {
492
- T(this, "sfxPoolSize");
493
- T(this, "coalesceMs");
494
- T(this, "muted", !0);
495
- T(this, "listeners", /* @__PURE__ */ new Set());
496
- T(this, "music", null);
497
- T(this, "musicUrl", null);
498
- T(this, "musicReady", null);
499
- T(this, "musicWanted", null);
500
- T(this, "pools", /* @__PURE__ */ new Map());
493
+ class vt {
494
+ constructor(t = {}) {
495
+ N(this, "sfxPoolSize");
496
+ N(this, "coalesceMs");
497
+ N(this, "muted", !0);
498
+ N(this, "listeners", /* @__PURE__ */ new Set());
499
+ N(this, "music", null);
500
+ N(this, "musicUrl", null);
501
+ N(this, "musicReady", null);
502
+ N(this, "musicWanted", null);
503
+ N(this, "pools", /* @__PURE__ */ new Map());
501
504
  /** Last play time per SFX URL, for the coalesce window. */
502
- T(this, "lastPlayed", /* @__PURE__ */ new Map());
505
+ N(this, "lastPlayed", /* @__PURE__ */ new Map());
503
506
  /** Readiness promises so a loading gate can await decode/buffer. */
504
- T(this, "ready", /* @__PURE__ */ new Map());
505
- this.sfxPoolSize = e.sfxPoolSize ?? qt, this.coalesceMs = e.coalesceMs ?? Bt;
507
+ N(this, "ready", /* @__PURE__ */ new Map());
508
+ this.sfxPoolSize = t.sfxPoolSize ?? bt, this.coalesceMs = t.coalesceMs ?? At;
506
509
  }
507
510
  /**
508
511
  * Create + buffer the looping music element. Await in the loading gate so the
509
512
  * unmute tap is instant. Idempotent per URL (re-requesting the same track is
510
513
  * a no-op that returns the in-flight promise).
511
514
  */
512
- prefetchMusic(e, t = 0.4) {
513
- const r = re(t);
514
- if (this.musicWanted = { url: e, volume: r }, this.musicUrl === e && this.musicReady)
515
+ prefetchMusic(t, s = 0.4) {
516
+ const r = se(s);
517
+ if (this.musicWanted = { url: t, volume: r }, this.musicUrl === t && this.musicReady)
515
518
  return this.music && (this.music.volume = r), this.musicReady;
516
- this.music && (this.music.pause(), this.music.currentTime = 0, this.music.removeAttribute("src"), this.music.load()), this.music = Re(e, !0), this.musicUrl = e, this.music.volume = r;
517
- const n = Ae(this.music);
518
- return this.musicReady = n, n;
519
+ 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;
520
+ const a = Me(this.music);
521
+ return this.musicReady = a, a;
519
522
  }
520
523
  /**
521
524
  * Create + buffer an SFX voice pool (round-robin so overlapping plays don't
522
525
  * cut each other off). Returns a promise that resolves when the first element
523
526
  * buffers. Idempotent per URL.
524
527
  */
525
- registerSound(e, t = 1) {
526
- const r = this.ready.get(e);
528
+ registerSound(t, s = 1) {
529
+ const r = this.ready.get(t);
527
530
  if (r) return r;
528
- const n = re(t), a = [];
529
- for (let o = 0; o < this.sfxPoolSize; o += 1) {
530
- const c = Re(e, !1);
531
- c.volume = n, c.addEventListener("ended", () => {
532
- c.currentTime = 0;
533
- }), a.push(c);
531
+ const a = se(s), n = [];
532
+ for (let c = 0; c < this.sfxPoolSize; c += 1) {
533
+ const o = Te(t, !1);
534
+ o.volume = a, o.addEventListener("ended", () => {
535
+ o.currentTime = 0;
536
+ }), n.push(o);
534
537
  }
535
- this.pools.set(e, { els: a, next: 0, volume: n });
536
- const i = Ae(a[0]);
537
- return this.ready.set(e, i), i;
538
+ this.pools.set(t, { els: n, next: 0, volume: a });
539
+ const i = Me(n[0]);
540
+ return this.ready.set(t, i), i;
538
541
  }
539
542
  /** Subscribe to mute-state changes (for a toggle UI). Fires immediately with
540
543
  * the current state. Returns an unsubscribe. */
541
- onMuteChange(e) {
542
- return this.listeners.add(e), e(this.muted), () => this.listeners.delete(e);
544
+ onMuteChange(t) {
545
+ return this.listeners.add(t), t(this.muted), () => this.listeners.delete(t);
543
546
  }
544
547
  isMuted() {
545
548
  return this.muted;
@@ -550,8 +553,8 @@ class Xt {
550
553
  * element with a muted play/pause so later `playOneShot` calls are allowed,
551
554
  * then start the music. All elements are already buffered, so this is instant.
552
555
  */
553
- setMuted(e) {
554
- e !== this.muted && (this.muted = e, this.muted || this.pools.forEach((t) => t.els.forEach(zt)), this.applyMusic(), this.listeners.forEach((t) => t(this.muted)));
556
+ setMuted(t) {
557
+ t !== this.muted && (this.muted = t, this.muted || this.pools.forEach((s) => s.els.forEach(Ct)), this.applyMusic(), this.listeners.forEach((s) => s(this.muted)));
555
558
  }
556
559
  toggleMuted() {
557
560
  this.setMuted(!this.muted);
@@ -562,30 +565,30 @@ class Xt {
562
565
  * same sound into one play, and does NO synchronous `currentTime` seek on a
563
566
  * ready element (the pool rewinds on `ended`, off the hot path).
564
567
  */
565
- playOneShot(e, t) {
568
+ playOneShot(t, s) {
566
569
  if (this.muted) return;
567
- const r = this.pools.get(e);
570
+ const r = this.pools.get(t);
568
571
  if (!r) return;
569
- const n = performance.now();
570
- if (n - (this.lastPlayed.get(e) ?? -1 / 0) < this.coalesceMs) return;
571
- this.lastPlayed.set(e, n);
572
- const a = r.els.length;
572
+ const a = performance.now();
573
+ if (a - (this.lastPlayed.get(t) ?? -1 / 0) < this.coalesceMs) return;
574
+ this.lastPlayed.set(t, a);
575
+ const n = r.els.length;
573
576
  let i;
574
- for (let o = 0; o < a; o += 1) {
575
- const c = r.els[(r.next + o) % a];
576
- if (c.paused) {
577
- i = c, r.next = (r.next + o + 1) % a;
577
+ for (let c = 0; c < n; c += 1) {
578
+ const o = r.els[(r.next + c) % n];
579
+ if (o.paused) {
580
+ i = o, r.next = (r.next + c + 1) % n;
578
581
  break;
579
582
  }
580
583
  }
581
- i || (i = r.els[r.next], r.next = (r.next + 1) % a), i.muted = !1, i.volume = re(t ?? r.volume), i.currentTime !== 0 && (i.currentTime = 0), i.play().catch(() => {
584
+ 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(() => {
582
585
  });
583
586
  }
584
587
  /** Request the looping background track (buffer it with prefetchMusic, which
585
588
  * a loading gate awaits). Remembered while muted; starts on unmute. */
586
- startMusic(e, t = 0.4) {
587
- const r = re(t);
588
- this.musicUrl !== e && this.prefetchMusic(e, r), this.musicWanted = { url: e, volume: r }, this.applyMusic();
589
+ startMusic(t, s = 0.4) {
590
+ const r = se(s);
591
+ this.musicUrl !== t && this.prefetchMusic(t, r), this.musicWanted = { url: t, volume: r }, this.applyMusic();
589
592
  }
590
593
  stopMusic() {
591
594
  this.musicWanted = null, this.music && (this.music.pause(), this.music.currentTime = 0);
@@ -595,129 +598,129 @@ class Xt {
595
598
  }), this.muted && !this.music.paused && this.music.pause());
596
599
  }
597
600
  }
598
- const Kt = (s, e, t) => s === "infinite" || s === "loop" && e < Math.max(1, Math.floor(t)) ? "replay" : "ended", Wt = (s, e, t) => s && e !== t, Ht = (s) => Math.min(100, Math.max(0, s)) / 100, qs = lt(function({
599
- src: e,
600
- playMode: t = "once",
601
+ const kt = (e, t, s) => e === "infinite" || e === "loop" && t < Math.max(1, Math.floor(s)) ? "replay" : "ended", _t = (e, t, s) => e && t !== s, xt = (e) => Math.min(100, Math.max(0, e)) / 100, ys = ze(function({
602
+ src: t,
603
+ playMode: s = "once",
601
604
  loopCount: r = 1,
602
- autoplay: n = !1,
603
- muted: a = !1,
605
+ autoplay: a = !1,
606
+ muted: n = !1,
604
607
  volume: i = 100,
605
- preload: o = "auto",
606
- onReady: c,
608
+ preload: c = "auto",
609
+ onReady: o,
607
610
  onPlay: l,
608
- onPause: p,
609
- onEnded: u,
611
+ onPause: h,
612
+ onEnded: d,
610
613
  onError: m
611
- }, d) {
612
- const f = w(null), y = w(0), A = w(null), h = E(async () => {
613
- const v = f.current;
614
- if (v)
614
+ }, u) {
615
+ const p = F(null), S = F(0), E = F(null), f = R(async () => {
616
+ const A = p.current;
617
+ if (A)
615
618
  try {
616
- await v.play();
617
- } catch (U) {
618
- const G = U instanceof Error ? U : new Error(String(U));
619
+ await A.play();
620
+ } catch (w) {
621
+ const G = w instanceof Error ? w : new Error(String(w));
619
622
  throw m == null || m(G), G;
620
623
  }
621
- }, [m]), g = E(() => {
622
- var v;
623
- return (v = f.current) == null ? void 0 : v.pause();
624
- }, []), R = E(() => {
625
- const v = f.current;
626
- v && (v.pause(), v.currentTime = 0, y.current = 0);
624
+ }, [m]), g = R(() => {
625
+ var A;
626
+ return (A = p.current) == null ? void 0 : A.pause();
627
+ }, []), b = R(() => {
628
+ const A = p.current;
629
+ A && (A.pause(), A.currentTime = 0, S.current = 0);
627
630
  }, []);
628
- ut(
629
- d,
631
+ $e(
632
+ u,
630
633
  () => ({
631
- play: h,
634
+ play: f,
632
635
  pause: g,
633
- stop: R,
636
+ stop: b,
634
637
  get current() {
635
- return f.current;
638
+ return p.current;
636
639
  }
637
640
  }),
638
- [g, h, R]
641
+ [g, f, b]
639
642
  ), x(() => {
640
- y.current = 0, A.current = null;
641
- }, [e]), x(() => {
642
- f.current && (f.current.volume = Ht(i));
643
+ S.current = 0, E.current = null;
644
+ }, [t]), x(() => {
645
+ p.current && (p.current.volume = xt(i));
643
646
  }, [i]), x(() => {
644
- Wt(n, A.current, e) && (A.current = e, h().catch(() => {
647
+ _t(a, E.current, t) && (E.current = t, f().catch(() => {
645
648
  }));
646
- }, [n, e]);
647
- const W = E(() => {
648
- y.current += 1;
649
- const v = Math.max(1, Math.floor(r));
650
- if (Kt(t, y.current, v) === "replay") {
651
- const U = f.current;
652
- U && (U.currentTime = 0, h().catch(() => {
649
+ }, [a, t]);
650
+ const X = R(() => {
651
+ S.current += 1;
652
+ const A = Math.max(1, Math.floor(r));
653
+ if (kt(s, S.current, A) === "replay") {
654
+ const w = p.current;
655
+ w && (w.currentTime = 0, f().catch(() => {
653
656
  }));
654
657
  return;
655
658
  }
656
- y.current = 0, u == null || u();
657
- }, [r, u, h, t]);
659
+ S.current = 0, d == null || d();
660
+ }, [r, d, f, s]);
658
661
  return /* @__PURE__ */ M(
659
662
  "audio",
660
663
  {
661
- ref: f,
662
- src: e,
663
- preload: o,
664
+ ref: p,
665
+ src: t,
666
+ preload: c,
664
667
  autoPlay: !1,
665
- muted: a,
668
+ muted: n,
666
669
  loop: !1,
667
670
  playsInline: !0,
668
671
  style: { display: "none" },
669
- onCanPlayThrough: c,
672
+ onCanPlayThrough: o,
670
673
  onPlay: l,
671
- onPause: p,
672
- onEnded: W,
673
- onError: () => m == null ? void 0 : m(new Error(`Unable to load audio: ${e}`))
674
+ onPause: h,
675
+ onEnded: X,
676
+ onError: () => m == null ? void 0 : m(new Error(`Unable to load audio: ${t}`))
674
677
  }
675
678
  );
676
- }), N = new Xt(), Bs = (s, e) => N.prefetchMusic(s, e), $s = (s, e) => N.registerSound(s, e), zs = (s, e) => N.startMusic(s, e), Xs = () => N.stopMusic(), Ks = (s, e) => N.playOneShot(s, e), Ws = (s) => N.setMuted(s), Hs = () => N.toggleMuted(), Vs = () => N.isMuted(), js = (s) => N.onMuteChange(s), Ys = () => {
677
- const [s, e] = k(N.isMuted());
678
- return x(() => N.onMuteChange(e), []), s;
679
- }, Vt = (s = {}) => {
680
- const { auto: e = !1 } = s, t = w(s.env ?? He()), r = w(s.constraints);
681
- r.current = s.constraints;
682
- const [n, a] = k("unknown"), [i, o] = k(null), c = w(0), l = E(async () => {
683
- const u = ++c.current, m = await Ve(t.current);
684
- if (u !== c.current) return n;
685
- const d = m.state === "unknown" ? "unknown" : m.state;
686
- return a((f) => f === "requesting" ? f : d), d !== "blocked" && o(null), d;
687
- }, []), p = E(
688
- async (u) => {
689
- const m = ++c.current;
690
- a("requesting"), o(null);
691
- const d = await je(
692
- { constraints: (u == null ? void 0 : u.constraints) ?? r.current, keepStream: !1 },
693
- t.current
679
+ }), D = new vt(), Ms = (e, t) => D.prefetchMusic(e, t), Ts = (e, t) => D.registerSound(e, t), Es = (e, t) => D.startMusic(e, t), Rs = () => D.stopMusic(), bs = (e, t) => D.playOneShot(e, t), As = (e) => D.setMuted(e), Fs = () => D.toggleMuted(), Cs = () => D.isMuted(), vs = (e) => D.onMuteChange(e), ks = () => {
680
+ const [e, t] = k(D.isMuted());
681
+ return x(() => D.onMuteChange(t), []), e;
682
+ }, wt = (e = {}) => {
683
+ const { auto: t = !1 } = e, s = F(e.env ?? Oe()), r = F(e.constraints);
684
+ r.current = e.constraints;
685
+ const [a, n] = k("unknown"), [i, c] = k(null), o = F(0), l = R(async () => {
686
+ const d = ++o.current, m = await Ge(s.current);
687
+ if (d !== o.current) return a;
688
+ const u = m.state === "unknown" ? "unknown" : m.state;
689
+ return n((p) => p === "requesting" ? p : u), u !== "blocked" && c(null), u;
690
+ }, []), h = R(
691
+ async (d) => {
692
+ const m = ++o.current;
693
+ n("requesting"), c(null);
694
+ const u = await qe(
695
+ { constraints: (d == null ? void 0 : d.constraints) ?? r.current, keepStream: !1 },
696
+ s.current
694
697
  );
695
- return m !== c.current || (a(d.state), o(d.reason)), d.state;
698
+ return m !== o.current || (n(u.state), c(u.reason)), u.state;
696
699
  },
697
700
  []
698
701
  );
699
702
  return x(() => {
700
- let u = () => {
703
+ let d = () => {
701
704
  }, m = !0;
702
- return e ? p() : l(), Ye((d) => {
703
- m && (a((f) => f === "requesting" ? f : d.state === "unknown" ? "unknown" : d.state), d.state !== "blocked" && o(null));
704
- }, t.current).then((d) => {
705
- m ? u = d : d();
705
+ return t ? h() : l(), Be((u) => {
706
+ m && (n((p) => p === "requesting" ? p : u.state === "unknown" ? "unknown" : u.state), u.state !== "blocked" && c(null));
707
+ }, s.current).then((u) => {
708
+ m ? d = u : u();
706
709
  }), () => {
707
- m = !1, c.current += 1, u();
710
+ m = !1, o.current += 1, d();
708
711
  };
709
- }, [e, l, p]), K(
712
+ }, [t, l, h]), Z(
710
713
  () => ({
711
- state: n,
714
+ state: a,
712
715
  reason: i,
713
- canPrompt: Qe(n),
714
- usable: n === "granted",
715
- request: p,
716
+ canPrompt: Ke(a),
717
+ usable: a === "granted",
718
+ request: h,
716
719
  refresh: l
717
720
  }),
718
- [n, i, p, l]
721
+ [a, i, h, l]
719
722
  );
720
- }, jt = {
723
+ }, Nt = {
721
724
  display: "flex",
722
725
  flexDirection: "column",
723
726
  alignItems: "center",
@@ -730,7 +733,7 @@ const Kt = (s, e, t) => s === "infinite" || s === "loop" && e < Math.max(1, Math
730
733
  background: "#111827",
731
734
  color: "#f9fafb",
732
735
  fontFamily: "system-ui, sans-serif"
733
- }, Yt = {
736
+ }, Ut = {
734
737
  font: "inherit",
735
738
  padding: "10px 18px",
736
739
  borderRadius: 8,
@@ -738,410 +741,86 @@ const Kt = (s, e, t) => s === "infinite" || s === "loop" && e < Math.max(1, Math
738
741
  background: "#2563eb",
739
742
  color: "#fff",
740
743
  cursor: "pointer"
741
- }, Qs = ({
742
- children: s,
743
- fallback: e,
744
- auto: t = !1,
744
+ }, _s = ({
745
+ children: e,
746
+ fallback: t,
747
+ auto: s = !1,
745
748
  constraints: r,
746
- requestLabel: n = "Allow camera"
749
+ requestLabel: a = "Allow camera"
747
750
  }) => {
748
- const a = Vt({ auto: t, constraints: r });
749
- if (a.usable) return /* @__PURE__ */ M(ae, { children: s });
750
- if (e) return /* @__PURE__ */ M(ae, { children: e(a) });
751
- const { state: i, reason: o, canPrompt: c, request: l } = a;
752
- return /* @__PURE__ */ L("div", { style: jt, role: "region", "aria-label": "Camera access", children: [
753
- /* @__PURE__ */ M("p", { "aria-live": "polite", style: { margin: 0 }, children: (o == null ? void 0 : o.message) ?? Ze[i] }),
751
+ const n = wt({ auto: s, constraints: r });
752
+ if (n.usable) return /* @__PURE__ */ M(re, { children: e });
753
+ if (t) return /* @__PURE__ */ M(re, { children: t(n) });
754
+ const { state: i, reason: c, canPrompt: o, request: l } = n;
755
+ return /* @__PURE__ */ L("div", { style: Nt, role: "region", "aria-label": "Camera access", children: [
756
+ /* @__PURE__ */ M("p", { "aria-live": "polite", style: { margin: 0 }, children: (c == null ? void 0 : c.message) ?? We[i] }),
754
757
  /* @__PURE__ */ M(
755
758
  "button",
756
759
  {
757
760
  type: "button",
758
761
  onClick: () => void l(),
759
- disabled: !c || i === "requesting",
760
- "aria-disabled": !c || i === "requesting",
761
- style: { ...Yt, opacity: c && i !== "requesting" ? 1 : 0.5 },
762
- children: i === "requesting" ? "Waiting…" : i === "denied" ? "Try again" : n
762
+ disabled: !o || i === "requesting",
763
+ "aria-disabled": !o || i === "requesting",
764
+ style: { ...Ut, opacity: o && i !== "requesting" ? 1 : 0.5 },
765
+ children: i === "requesting" ? "Waiting…" : i === "denied" ? "Try again" : a
763
766
  }
764
767
  )
765
768
  ] });
766
- }, Qt = () => {
767
- var s;
769
+ }, Dt = () => {
770
+ var e;
768
771
  return {
769
- enumerateDevices: typeof navigator < "u" && ((s = navigator.mediaDevices) != null && s.enumerateDevices) ? () => navigator.mediaDevices.enumerateDevices() : void 0
772
+ enumerateDevices: typeof navigator < "u" && ((e = navigator.mediaDevices) != null && e.enumerateDevices) ? () => navigator.mediaDevices.enumerateDevices() : void 0
770
773
  };
771
- }, Zt = /\b(back|rear|environment|world)\b/i, Jt = /\b(front|user|facetime|selfie)\b/i, es = (s) => Zt.test(s) ? "environment" : Jt.test(s) ? "user" : null, Zs = async (s = Qt()) => {
772
- if (!s.enumerateDevices) return [];
774
+ }, Pt = /\b(back|rear|environment|world)\b/i, It = /\b(front|user|facetime|selfie)\b/i, Lt = (e) => Pt.test(e) ? "environment" : It.test(e) ? "user" : null, xs = async (e = Dt()) => {
775
+ if (!e.enumerateDevices) return [];
773
776
  try {
774
- return (await s.enumerateDevices()).filter((t) => t.kind === "videoinput").map((t) => ({
775
- deviceId: t.deviceId,
776
- label: t.label,
777
- facing: es(t.label)
777
+ return (await e.enumerateDevices()).filter((s) => s.kind === "videoinput").map((s) => ({
778
+ deviceId: s.deviceId,
779
+ label: s.label,
780
+ facing: Lt(s.label)
778
781
  }));
779
782
  } catch {
780
783
  return [];
781
784
  }
782
- }, Js = (s, e) => s.find((t) => t.facing === e) ?? null, er = (s) => {
783
- const { session: e } = xe(), t = Et(), r = bt(), n = JSON.stringify(s ?? null), a = K(
784
- () => s ? Ee(s) : r ?? Ee(),
785
- [n, r]
786
- // eslint-disable-line react-hooks/exhaustive-deps
787
- ), i = a.tiers, o = E(
788
- (p) => {
789
- const u = e.store.getSnapshot().quality;
790
- u && e._setQuality(Je(u, a, p, performance.now()));
791
- },
792
- [e, a]
793
- ), c = E(
794
- (p) => {
795
- const u = e.store.getSnapshot().quality;
796
- u && e._setQuality(et(u, a, p, performance.now()));
797
- },
798
- [e, a]
799
- ), l = E(() => {
800
- const p = e.store.getSnapshot().quality;
801
- e._setQuality(
802
- tt(a, (p == null ? void 0 : p.signals) ?? st, performance.now())
803
- );
804
- }, [e, a]);
805
- return K(
806
- () => ({
807
- tier: (t == null ? void 0 : t.decision.tier) ?? null,
808
- index: (t == null ? void 0 : t.index) ?? -1,
809
- tiers: i,
810
- decision: (t == null ? void 0 : t.decision) ?? null,
811
- history: (t == null ? void 0 : t.history) ?? [],
812
- signals: (t == null ? void 0 : t.signals) ?? null,
813
- locked: (t == null ? void 0 : t.locked) ?? !1,
814
- setTier: o,
815
- lock: () => c(!0),
816
- unlock: () => c(!1),
817
- reset: l,
818
- state: t
819
- }),
820
- [t, i, o, c, l]
821
- );
822
- }, ts = 256 * 1024 * 1024;
823
- class ss {
824
- constructor(e = {}) {
825
- T(this, "entries", /* @__PURE__ */ new Map());
826
- T(this, "listeners", /* @__PURE__ */ new Set());
827
- T(this, "budget");
828
- T(this, "now");
829
- T(this, "evictions", 0);
830
- T(this, "hits", 0);
831
- T(this, "misses", 0);
832
- /** Memoised `getStats()` result; cleared on every change so `useSyncExternalStore` sees a stable snapshot. */
833
- T(this, "statsSnapshot", null);
834
- this.budget = e.budgetBytes ?? ts, this.now = e.now ?? (() => typeof performance < "u" ? performance.now() : Date.now());
835
- }
836
- /** Acquire `asset` on behalf of `ownerId`; shares an in-flight or loaded value. */
837
- acquire(e, t) {
838
- let r = this.entries.get(e.key);
839
- if (r && r.status === "error" && (this.entries.delete(e.key), r = void 0), !r) {
840
- this.misses += 1;
841
- const n = typeof AbortController < "u" ? new AbortController() : null, a = {
842
- definition: e,
843
- status: "loading",
844
- value: void 0,
845
- bytes: 0,
846
- owners: /* @__PURE__ */ new Set([t]),
847
- promise: null,
848
- controller: n,
849
- error: null,
850
- lastUsed: this.now(),
851
- disposed: !1
852
- };
853
- return a.promise = e.load((n == null ? void 0 : n.signal) ?? new AbortController().signal).then((i) => {
854
- var o, c;
855
- if (a.disposed || this.entries.get(e.key) !== a)
856
- throw (o = e.dispose) == null || o.call(e, i), new Error(`Asset "${e.key}" was released before it loaded`);
857
- return a.value = i, a.bytes = Math.max(0, Math.round(((c = e.bytes) == null ? void 0 : c.call(e, i)) ?? 0)), a.status = "ready", a.promise = null, this.notify(), this.enforceBudget(), i;
858
- }).catch((i) => {
859
- const o = i instanceof Error ? i : new Error(String(i));
860
- throw this.entries.get(e.key) === a && !a.disposed && (a.status = "error", a.error = o, a.promise = null, this.notify()), o;
861
- }), this.entries.set(e.key, a), this.notify(), a.promise;
862
- }
863
- return this.hits += 1, r.owners.add(t), r.lastUsed = this.now(), this.notify(), r.status === "ready" ? Promise.resolve(r.value) : r.promise;
864
- }
865
- /** Start loading without holding a reference (warm the cache). */
866
- preload(e) {
867
- const t = "__preload__";
868
- return this.acquire(e, t).finally(() => this.release(e.key, t));
869
- }
870
- /** Drop `ownerId`'s reference. The value stays cached until evicted or disposed. */
871
- release(e, t) {
872
- var n;
873
- const r = this.entries.get(e);
874
- !r || !r.owners.delete(t) || (r.lastUsed = this.now(), r.owners.size === 0 && r.status === "loading" && ((n = r.controller) == null || n.abort(), r.disposed = !0, this.entries.delete(e)), this.notify(), this.enforceBudget());
875
- }
876
- /** Synchronous read of a loaded value (or `undefined`). Does not take a reference. */
877
- get(e) {
878
- const t = this.entries.get(e);
879
- return (t == null ? void 0 : t.status) === "ready" ? t.value : void 0;
880
- }
881
- has(e) {
882
- return this.entries.has(e);
883
- }
884
- entry(e) {
885
- const t = this.entries.get(e);
886
- return t ? ve(e, t) : void 0;
887
- }
888
- list() {
889
- return Array.from(this.entries, ([e, t]) => ve(e, t));
890
- }
891
- setBudget(e) {
892
- this.budget = e, this.enforceBudget(), this.notify();
893
- }
894
- /**
895
- * Dispose unreferenced values, least recently used first, until usage is
896
- * within the budget (or `bytesToFree` is reclaimed). Referenced values are
897
- * never touched. Returns the bytes reclaimed.
898
- */
899
- evict(e) {
900
- const t = e ?? Math.max(0, this.usage() - (Number.isFinite(this.budget) ? this.budget : 1 / 0));
901
- if (t <= 0) return 0;
902
- const r = Array.from(this.entries).filter(([, a]) => a.owners.size === 0 && a.status === "ready").sort((a, i) => a[1].lastUsed - i[1].lastUsed);
903
- let n = 0;
904
- for (const [a, i] of r) {
905
- if (n >= t) break;
906
- n += i.bytes, this.disposeEntry(a, i), this.evictions += 1;
907
- }
908
- return n > 0 && this.notify(), n;
909
- }
910
- /** Dispose every unreferenced value (route change, scene teardown). Returns the bytes freed. */
911
- disposeUnreferenced() {
912
- let e = 0;
913
- for (const [t, r] of Array.from(this.entries))
914
- r.owners.size === 0 && (e += r.bytes, this.disposeEntry(t, r));
915
- return e > 0 && this.notify(), e;
916
- }
917
- /** Dispose everything, referenced or not (app / session shutdown). Owners are forgotten. */
918
- disposeAll() {
919
- for (const [e, t] of Array.from(this.entries)) this.disposeEntry(e, t);
920
- this.notify();
921
- }
922
- /** Current statistics. The object is reused until the cache changes, so it is safe as a store snapshot. */
923
- getStats() {
924
- if (this.statsSnapshot) return this.statsSnapshot;
925
- let e = 0, t = 0, r = 0, n = 0, a = 0;
926
- for (const i of this.entries.values())
927
- i.owners.size > 0 && (e += 1), i.status === "loading" && (t += 1), i.status === "error" && (r += 1), i.status === "ready" && (n += i.bytes, i.owners.size === 0 && (a += i.bytes));
928
- return this.statsSnapshot = {
929
- assets: this.entries.size,
930
- referencedAssets: e,
931
- loadingAssets: t,
932
- erroredAssets: r,
933
- usageBytes: n,
934
- reclaimableBytes: a,
935
- budgetBytes: this.budget,
936
- overBudget: n > this.budget,
937
- evictions: this.evictions,
938
- hits: this.hits,
939
- misses: this.misses
940
- }, this.statsSnapshot;
941
- }
942
- subscribe(e) {
943
- return this.listeners.add(e), () => {
944
- this.listeners.delete(e);
945
- };
946
- }
947
- usage() {
948
- let e = 0;
949
- for (const t of this.entries.values()) t.status === "ready" && (e += t.bytes);
950
- return e;
951
- }
952
- enforceBudget() {
953
- Number.isFinite(this.budget) && this.usage() > this.budget && this.evict();
954
- }
955
- disposeEntry(e, t) {
956
- var r, n, a;
957
- if (!t.disposed) {
958
- if (t.disposed = !0, (r = t.controller) == null || r.abort(), t.status === "ready" && t.value !== void 0)
959
- try {
960
- (a = (n = t.definition).dispose) == null || a.call(n, t.value);
961
- } catch (i) {
962
- console.warn(`[xr-sdk assets] dispose threw for ${e}`, i);
963
- }
964
- this.entries.delete(e);
965
- }
966
- }
967
- notify() {
968
- this.statsSnapshot = null, this.listeners.forEach((e) => e());
969
- }
970
- }
971
- const ve = (s, e) => ({
972
- key: s,
973
- status: e.status,
974
- bytes: e.bytes,
975
- owners: e.owners.size,
976
- lastUsed: e.lastUsed,
977
- error: e.error
978
- }), rs = (s) => new ss(s);
979
- let le;
980
- const De = () => (le || (le = rs()), le), ue = (s) => {
981
- if (!s) return 0;
982
- const e = s.image;
983
- if (!e) return 0;
984
- const t = e.videoWidth || e.width || 0, r = e.videoHeight || e.height || 0;
985
- if (!t || !r) return 0;
986
- const n = s.isCompressedTexture, a = n ? 0.5 : s.type === $.FloatType ? 16 : 4, i = t * r * a;
987
- return Math.round(s.generateMipmaps && !n ? i * 1.3334 : i);
988
- }, as = (s) => {
989
- if (!s) return 0;
990
- let e = 0;
991
- for (const t of Object.values(s.attributes)) {
992
- const r = t.array;
993
- r && (e += r.byteLength);
994
- }
995
- return s.index && (e += s.index.array.byteLength), e;
996
- }, ns = [
997
- "map",
998
- "alphaMap",
999
- "aoMap",
1000
- "bumpMap",
1001
- "displacementMap",
1002
- "emissiveMap",
1003
- "envMap",
1004
- "lightMap",
1005
- "metalnessMap",
1006
- "normalMap",
1007
- "roughnessMap",
1008
- "specularMap"
1009
- ], Ie = (s) => {
1010
- const e = [], t = s;
1011
- for (const n of ns) {
1012
- const a = t[n];
1013
- a && a.isTexture && e.push(a);
1014
- }
1015
- const r = s.uniforms;
1016
- if (r)
1017
- for (const n of Object.values(r)) {
1018
- const a = n == null ? void 0 : n.value;
1019
- a && a.isTexture && e.push(a);
1020
- }
1021
- return e;
1022
- }, is = (s) => {
1023
- if (!s) return 0;
1024
- const e = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set();
1025
- s.traverse((n) => {
1026
- const a = n;
1027
- a.geometry && e.add(a.geometry);
1028
- const i = Array.isArray(a.material) ? a.material : a.material ? [a.material] : [];
1029
- for (const o of i) Ie(o).forEach((c) => t.add(c));
1030
- });
1031
- let r = 0;
1032
- return e.forEach((n) => {
1033
- r += as(n);
1034
- }), t.forEach((n) => {
1035
- r += ue(n);
1036
- }), r;
1037
- }, we = (s) => {
1038
- if (!s) return;
1039
- const e = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
1040
- s.traverse((n) => {
1041
- const a = n;
1042
- a.geometry && e.add(a.geometry);
1043
- const i = Array.isArray(a.material) ? a.material : a.material ? [a.material] : [];
1044
- for (const o of i)
1045
- t.add(o), Ie(o).forEach((c) => r.add(c));
1046
- }), r.forEach((n) => n.dispose()), t.forEach((n) => n.dispose()), e.forEach((n) => n.dispose()), s.removeFromParent();
1047
- }, Le = async (s, e) => {
1048
- if (rt(s)) return at(s, { signal: e });
1049
- const t = await fetch(s, { signal: e });
1050
- if (!t.ok) throw new Error(`Asset fetch failed (${t.status}): ${s}`);
1051
- return t.arrayBuffer();
1052
- }, Oe = (s) => new Promise((e, t) => {
1053
- const r = () => t(new DOMException("Asset load aborted", "AbortError"));
1054
- s.aborted ? r() : s.addEventListener("abort", r, { once: !0 });
1055
- }), tr = (s, e = {}) => ({
1056
- key: `texture:${s}${e.variant ? `#${e.variant}` : ""}`,
1057
- load: async (t) => {
1058
- const r = await Le(s, t), n = new Blob([r]), a = createImageBitmap(n, {
1059
- imageOrientation: e.flipY === !1 ? "none" : "flipY"
1060
- }), i = await Promise.race([a, Oe(t)]).catch((c) => {
1061
- throw a.then((l) => l.close()).catch(() => {
1062
- }), c;
1063
- }), o = new $.Texture(i);
1064
- return o.flipY = !1, o.colorSpace = e.colorSpace ?? $.SRGBColorSpace, o.generateMipmaps = e.generateMipmaps ?? !0, o.minFilter = o.generateMipmaps ? $.LinearMipmapLinearFilter : $.LinearFilter, o.needsUpdate = !0, o;
1065
- },
1066
- dispose: (t) => {
1067
- var n;
1068
- const r = t.image;
1069
- t.dispose(), (n = r == null ? void 0 : r.close) == null || n.call(r);
1070
- },
1071
- bytes: ue
1072
- }), sr = (s) => ({
1073
- key: `gltf:${s}`,
1074
- load: async (e) => {
1075
- const t = await Le(s, e), r = new vt(), n = s.slice(0, s.lastIndexOf("/") + 1), a = r.parseAsync(t, n);
1076
- return Promise.race([a, Oe(e)]).catch((i) => {
1077
- throw a.then((o) => we(o.scene)).catch(() => {
1078
- }), i;
1079
- });
1080
- },
1081
- dispose: (e) => we(e.scene),
1082
- bytes: (e) => is(e.scene)
1083
- }), rr = (s, e = {}) => ({
1084
- key: `video:${s}`,
1085
- load: (t) => new Promise((r, n) => {
1086
- const a = document.createElement("video");
1087
- a.src = s, a.loop = e.loop ?? !0, a.muted = e.muted ?? !0, a.playsInline = !0, a.crossOrigin = e.crossOrigin ?? "anonymous", a.preload = "auto";
1088
- const i = (o) => {
1089
- a.removeAttribute("src"), a.load(), n(o instanceof Error ? o : new Error(`Video failed to load: ${s}`));
1090
- };
1091
- t.addEventListener(
1092
- "abort",
1093
- () => i(new DOMException("Asset load aborted", "AbortError")),
1094
- {
1095
- once: !0
1096
- }
1097
- ), a.onerror = () => i(a.error), a.onloadeddata = () => {
1098
- const o = new $.VideoTexture(a);
1099
- o.colorSpace = $.SRGBColorSpace, r({ video: a, texture: o });
1100
- }, a.load();
1101
- }),
1102
- dispose: ({ video: t, texture: r }) => {
1103
- r.dispose(), t.pause(), t.removeAttribute("src"), t.load();
1104
- },
1105
- bytes: ({ texture: t }) => ue(t)
1106
- }), Ge = mt(null), ar = ({
1107
- cache: s,
1108
- disposeUnreferencedOnUnmount: e = !0,
1109
- children: t
785
+ }, ws = (e, t) => e.find((s) => s.facing === t) ?? null, _e = Ve(null), Ns = ({
786
+ cache: e,
787
+ disposeUnreferencedOnUnmount: t = !0,
788
+ children: s
1110
789
  }) => {
1111
- const r = s ?? De();
790
+ const r = e ?? ke();
1112
791
  return x(() => () => {
1113
- e && r.disposeUnreferenced();
1114
- }, [r, e]), /* @__PURE__ */ M(Ge.Provider, { value: r, children: t });
1115
- }, qe = () => dt(Ge) ?? De(), nr = (s, e = {}) => {
1116
- const { enabled: t = !0 } = e, r = qe(), n = ft(), a = (s == null ? void 0 : s.key) ?? null, [i, o] = k({
792
+ t && r.disposeUnreferenced();
793
+ }, [r, t]), /* @__PURE__ */ M(_e.Provider, { value: r, children: s });
794
+ }, xe = () => je(_e) ?? ke(), Us = (e, t = {}) => {
795
+ const { enabled: s = !0 } = t, r = xe(), a = Ze(), n = (e == null ? void 0 : e.key) ?? null, [i, c] = k({
1117
796
  value: null,
1118
797
  status: "idle",
1119
798
  error: null
1120
799
  });
1121
800
  return x(() => {
1122
- if (!s || !t) {
1123
- o({ value: null, status: "idle", error: null });
801
+ if (!e || !s) {
802
+ c({ value: null, status: "idle", error: null });
1124
803
  return;
1125
804
  }
1126
- let c = !0;
1127
- const l = r.get(s.key);
1128
- return o({ value: l ?? null, status: l ? "ready" : "loading", error: null }), r.acquire(s, n).then((p) => {
1129
- c && o({ value: p, status: "ready", error: null });
1130
- }).catch((p) => {
1131
- c && o({ value: null, status: "error", error: p });
805
+ let o = !0;
806
+ const l = r.get(e.key);
807
+ return c({ value: l ?? null, status: l ? "ready" : "loading", error: null }), r.acquire(e, a).then((h) => {
808
+ o && c({ value: h, status: "ready", error: null });
809
+ }).catch((h) => {
810
+ o && c({ value: null, status: "error", error: h });
1132
811
  }), () => {
1133
- c = !1, r.release(s.key, n);
812
+ o = !1, r.release(e.key, a);
1134
813
  };
1135
- }, [r, a, t, n]), i;
1136
- }, ir = (s) => {
1137
- const e = qe(), t = s ?? e;
1138
- return ht(
1139
- (r) => t.subscribe(r),
1140
- () => t.getStats(),
1141
- () => t.getStats()
814
+ }, [r, n, s, a]), i;
815
+ }, Ds = (e) => {
816
+ const t = xe(), s = e ?? t;
817
+ return Ye(
818
+ (r) => s.subscribe(r),
819
+ () => s.getStats(),
820
+ () => s.getStats()
1142
821
  );
1143
- }, ne = 1, Be = Object.freeze({
1144
- version: ne,
822
+ }, ae = 1, we = Object.freeze({
823
+ version: ae,
1145
824
  trackers: {
1146
825
  face: { enabled: !0, numFaces: 1, targetFps: null, holdMs: 250, predictMs: 0, smoothing: 0 },
1147
826
  hand: { enabled: !1, targetFps: null },
@@ -1168,13 +847,13 @@ const De = () => (le || (le = rs()), le), ue = (s) => {
1168
847
  fallbacks: { onUnsupported: "degrade", delegate: "auto" },
1169
848
  assets: { holisticModelUrl: null, semanticSegmentationModelUrl: null },
1170
849
  updatedAt: 0
1171
- }), P = (s, e, t, r, n, a) => {
1172
- if (s === void 0) return e;
1173
- if (typeof s != "number" || !Number.isFinite(s))
1174
- return a(`${n}: not a number, kept ${e}`), e;
1175
- const i = Math.min(r, Math.max(t, s));
1176
- return i !== s && a(`${n}: ${s} clamped to ${i}`), i;
1177
- }, Y = (s, e, t, r) => s === void 0 ? e : s === null ? null : typeof s != "number" || !Number.isFinite(s) || s <= 0 ? (r(`${t}: invalid fps, kept ${e}`), e) : (s > 120 && r(`${t}: ${s} clamped to 120`), Math.min(120, s)), os = [
850
+ }), U = (e, t, s, r, a, n) => {
851
+ if (e === void 0) return t;
852
+ if (typeof e != "number" || !Number.isFinite(e))
853
+ return n(`${a}: not a number, kept ${t}`), t;
854
+ const i = Math.min(r, Math.max(s, e));
855
+ return i !== e && n(`${a}: ${e} clamped to ${i}`), i;
856
+ }, 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)), Ot = [
1178
857
  "tiers",
1179
858
  "budget",
1180
859
  "initialTier",
@@ -1182,34 +861,34 @@ const De = () => (le || (le = rs()), le), ue = (s) => {
1182
861
  "maxTier",
1183
862
  "adaptive",
1184
863
  "historySize"
1185
- ], Fe = (s) => {
1186
- const e = {};
1187
- for (const t of os) s[t] !== void 0 && (e[t] = s[t]);
1188
- return e;
1189
- }, I = (s, e, t, r) => s === void 0 ? e : typeof s != "boolean" ? (r(`${t}: not a boolean, kept ${e}`), e) : s, B = (s, e, t, r, n) => s === void 0 ? t : e.includes(s) ? s : (n(`${r}: "${String(s)}" is not one of ${e.join(" | ")}, kept ${t}`), t), Ce = (s, e, t, r) => s === void 0 ? e : s === null ? null : typeof s != "string" || !/^https?:\/\//.test(s) ? (r(`${t}: not an http(s) URL, kept ${e === null ? "the SDK default" : e}`), e) : s, z = (s = {}, e = Be, t = []) => {
1190
- var o, c, l, p, u, m, d, f, y, A, h, g, R, W, v, U, G, Z, J, ee, te, V, S, F, b, _, H, X, D, j, me, fe, he, pe, ge, ye, Se, Me;
1191
- const r = (Xe) => t.push(Xe), n = s.trackers ?? {}, a = e.trackers, i = s.quality === void 0 ? e.quality === !1 ? !1 : Fe(e.quality) : s.quality === !1 ? !1 : typeof s.quality == "object" && s.quality !== null ? Fe(s.quality) : (r("quality: must be an object or false, kept base"), e.quality);
864
+ ], Ee = (e) => {
865
+ const t = {};
866
+ for (const s of Ot) e[s] !== void 0 && (t[s] = e[s]);
867
+ return t;
868
+ }, 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, K = (e = {}, t = we, s = []) => {
869
+ var c, o, l, h, d, m, u, p, S, E, f, g, b, X, A, w, G, Y, J, Q, ee, z, y, C, T, _, H, W, P, $, le, ue, de, me, pe, fe, he, ge;
870
+ const r = (De) => s.push(De), 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);
1192
871
  return {
1193
- version: ne,
872
+ version: ae,
1194
873
  trackers: {
1195
874
  face: {
1196
- enabled: I((o = n.face) == null ? void 0 : o.enabled, a.face.enabled, "trackers.face.enabled", r),
875
+ enabled: I((c = a.face) == null ? void 0 : c.enabled, n.face.enabled, "trackers.face.enabled", r),
1197
876
  numFaces: Math.round(
1198
- P((c = n.face) == null ? void 0 : c.numFaces, a.face.numFaces, 1, 10, "trackers.face.numFaces", r)
877
+ U((o = a.face) == null ? void 0 : o.numFaces, n.face.numFaces, 1, 10, "trackers.face.numFaces", r)
1199
878
  ),
1200
- targetFps: Y((l = n.face) == null ? void 0 : l.targetFps, a.face.targetFps, "trackers.face.targetFps", r),
1201
- holdMs: P((p = n.face) == null ? void 0 : p.holdMs, a.face.holdMs, 0, 5e3, "trackers.face.holdMs", r),
1202
- predictMs: P(
1203
- (u = n.face) == null ? void 0 : u.predictMs,
1204
- a.face.predictMs,
879
+ targetFps: j((l = a.face) == null ? void 0 : l.targetFps, n.face.targetFps, "trackers.face.targetFps", r),
880
+ holdMs: U((h = a.face) == null ? void 0 : h.holdMs, n.face.holdMs, 0, 5e3, "trackers.face.holdMs", r),
881
+ predictMs: U(
882
+ (d = a.face) == null ? void 0 : d.predictMs,
883
+ n.face.predictMs,
1205
884
  0,
1206
885
  1e3,
1207
886
  "trackers.face.predictMs",
1208
887
  r
1209
888
  ),
1210
- smoothing: P(
1211
- (m = n.face) == null ? void 0 : m.smoothing,
1212
- a.face.smoothing,
889
+ smoothing: U(
890
+ (m = a.face) == null ? void 0 : m.smoothing,
891
+ n.face.smoothing,
1213
892
  0,
1214
893
  100,
1215
894
  "trackers.face.smoothing",
@@ -1217,57 +896,57 @@ const De = () => (le || (le = rs()), le), ue = (s) => {
1217
896
  )
1218
897
  },
1219
898
  hand: {
1220
- enabled: I((d = n.hand) == null ? void 0 : d.enabled, a.hand.enabled, "trackers.hand.enabled", r),
1221
- targetFps: Y((f = n.hand) == null ? void 0 : f.targetFps, a.hand.targetFps, "trackers.hand.targetFps", r)
899
+ enabled: I((u = a.hand) == null ? void 0 : u.enabled, n.hand.enabled, "trackers.hand.enabled", r),
900
+ targetFps: j((p = a.hand) == null ? void 0 : p.targetFps, n.hand.targetFps, "trackers.hand.targetFps", r)
1222
901
  },
1223
902
  gesture: {
1224
- enabled: I((y = n.gesture) == null ? void 0 : y.enabled, a.gesture.enabled, "trackers.gesture.enabled", r),
1225
- targetFps: Y(
1226
- (A = n.gesture) == null ? void 0 : A.targetFps,
1227
- a.gesture.targetFps,
903
+ enabled: I((S = a.gesture) == null ? void 0 : S.enabled, n.gesture.enabled, "trackers.gesture.enabled", r),
904
+ targetFps: j(
905
+ (E = a.gesture) == null ? void 0 : E.targetFps,
906
+ n.gesture.targetFps,
1228
907
  "trackers.gesture.targetFps",
1229
908
  r
1230
909
  )
1231
910
  },
1232
911
  body: {
1233
- enabled: I((h = n.body) == null ? void 0 : h.enabled, a.body.enabled, "trackers.body.enabled", r),
1234
- targetFps: Y((g = n.body) == null ? void 0 : g.targetFps, a.body.targetFps, "trackers.body.targetFps", r)
912
+ enabled: I((f = a.body) == null ? void 0 : f.enabled, n.body.enabled, "trackers.body.enabled", r),
913
+ targetFps: j((g = a.body) == null ? void 0 : g.targetFps, n.body.targetFps, "trackers.body.targetFps", r)
1235
914
  },
1236
915
  holistic: {
1237
- enabled: I((R = n.holistic) == null ? void 0 : R.enabled, a.holistic.enabled, "trackers.holistic.enabled", r),
1238
- targetFps: Y(
1239
- (W = n.holistic) == null ? void 0 : W.targetFps,
1240
- a.holistic.targetFps,
916
+ enabled: I((b = a.holistic) == null ? void 0 : b.enabled, n.holistic.enabled, "trackers.holistic.enabled", r),
917
+ targetFps: j(
918
+ (X = a.holistic) == null ? void 0 : X.targetFps,
919
+ n.holistic.targetFps,
1241
920
  "trackers.holistic.targetFps",
1242
921
  r
1243
922
  ),
1244
923
  hands: B(
1245
- (v = n.holistic) == null ? void 0 : v.hands,
924
+ (A = a.holistic) == null ? void 0 : A.hands,
1246
925
  ["both", "left", "right", "none"],
1247
- a.holistic.hands,
926
+ n.holistic.hands,
1248
927
  "trackers.holistic.hands",
1249
928
  r
1250
929
  ),
1251
- holdMs: P(
1252
- (U = n.holistic) == null ? void 0 : U.holdMs,
1253
- a.holistic.holdMs,
930
+ holdMs: U(
931
+ (w = a.holistic) == null ? void 0 : w.holdMs,
932
+ n.holistic.holdMs,
1254
933
  0,
1255
934
  5e3,
1256
935
  "trackers.holistic.holdMs",
1257
936
  r
1258
937
  ),
1259
- predictMs: P(
1260
- (G = n.holistic) == null ? void 0 : G.predictMs,
1261
- a.holistic.predictMs,
938
+ predictMs: U(
939
+ (G = a.holistic) == null ? void 0 : G.predictMs,
940
+ n.holistic.predictMs,
1262
941
  0,
1263
942
  1e3,
1264
943
  "trackers.holistic.predictMs",
1265
944
  r
1266
945
  ),
1267
946
  analysisMaxDimension: Math.round(
1268
- P(
1269
- (Z = n.holistic) == null ? void 0 : Z.analysisMaxDimension,
1270
- a.holistic.analysisMaxDimension,
947
+ U(
948
+ (Y = a.holistic) == null ? void 0 : Y.analysisMaxDimension,
949
+ n.holistic.analysisMaxDimension,
1271
950
  128,
1272
951
  2048,
1273
952
  "trackers.holistic.analysisMaxDimension",
@@ -1275,72 +954,72 @@ const De = () => (le || (le = rs()), le), ue = (s) => {
1275
954
  )
1276
955
  ),
1277
956
  outputFaceBlendshapes: I(
1278
- (J = n.holistic) == null ? void 0 : J.outputFaceBlendshapes,
1279
- a.holistic.outputFaceBlendshapes,
957
+ (J = a.holistic) == null ? void 0 : J.outputFaceBlendshapes,
958
+ n.holistic.outputFaceBlendshapes,
1280
959
  "trackers.holistic.outputFaceBlendshapes",
1281
960
  r
1282
961
  ),
1283
- confidence: P(
1284
- (ee = n.holistic) == null ? void 0 : ee.confidence,
1285
- a.holistic.confidence,
962
+ confidence: U(
963
+ (Q = a.holistic) == null ? void 0 : Q.confidence,
964
+ n.holistic.confidence,
1286
965
  0,
1287
966
  1,
1288
967
  "trackers.holistic.confidence",
1289
968
  r
1290
969
  ),
1291
970
  delegate: B(
1292
- (te = n.holistic) == null ? void 0 : te.delegate,
971
+ (ee = a.holistic) == null ? void 0 : ee.delegate,
1293
972
  ["auto", "GPU", "CPU"],
1294
- a.holistic.delegate,
973
+ n.holistic.delegate,
1295
974
  "trackers.holistic.delegate",
1296
975
  r
1297
976
  )
1298
977
  },
1299
978
  segmentation: {
1300
979
  enabled: I(
1301
- (V = n.segmentation) == null ? void 0 : V.enabled,
1302
- a.segmentation.enabled,
980
+ (z = a.segmentation) == null ? void 0 : z.enabled,
981
+ n.segmentation.enabled,
1303
982
  "trackers.segmentation.enabled",
1304
983
  r
1305
984
  ),
1306
985
  quality: B(
1307
- (S = n.segmentation) == null ? void 0 : S.quality,
986
+ (y = a.segmentation) == null ? void 0 : y.quality,
1308
987
  ["low", "medium", "high"],
1309
- a.segmentation.quality,
988
+ n.segmentation.quality,
1310
989
  "trackers.segmentation.quality",
1311
990
  r
1312
991
  )
1313
992
  },
1314
993
  semanticSegmentation: {
1315
994
  enabled: I(
1316
- (F = n.semanticSegmentation) == null ? void 0 : F.enabled,
1317
- a.semanticSegmentation.enabled,
995
+ (C = a.semanticSegmentation) == null ? void 0 : C.enabled,
996
+ n.semanticSegmentation.enabled,
1318
997
  "trackers.semanticSegmentation.enabled",
1319
998
  r
1320
999
  ),
1321
1000
  preset: B(
1322
- (b = n.semanticSegmentation) == null ? void 0 : b.preset,
1323
- wt,
1324
- a.semanticSegmentation.preset,
1001
+ (T = a.semanticSegmentation) == null ? void 0 : T.preset,
1002
+ lt,
1003
+ n.semanticSegmentation.preset,
1325
1004
  "trackers.semanticSegmentation.preset",
1326
1005
  r
1327
1006
  ),
1328
1007
  quality: B(
1329
- (_ = n.semanticSegmentation) == null ? void 0 : _.quality,
1008
+ (_ = a.semanticSegmentation) == null ? void 0 : _.quality,
1330
1009
  ["low", "medium", "high"],
1331
- a.semanticSegmentation.quality,
1010
+ n.semanticSegmentation.quality,
1332
1011
  "trackers.semanticSegmentation.quality",
1333
1012
  r
1334
1013
  )
1335
1014
  }
1336
1015
  },
1337
1016
  perf: {
1338
- targetFps: P((H = s.perf) == null ? void 0 : H.targetFps, e.perf.targetFps, 0, 120, "perf.targetFps", r),
1339
- camRes: Math.round(P((X = s.perf) == null ? void 0 : X.camRes, e.perf.camRes, 160, 3840, "perf.camRes", r)),
1340
- cameraZoom: P((D = s.perf) == null ? void 0 : D.cameraZoom, e.perf.cameraZoom, 1, 3, "perf.cameraZoom", r),
1341
- analysisScale: P(
1342
- (j = s.perf) == null ? void 0 : j.analysisScale,
1343
- e.perf.analysisScale,
1017
+ targetFps: U((H = e.perf) == null ? void 0 : H.targetFps, t.perf.targetFps, 0, 120, "perf.targetFps", r),
1018
+ camRes: Math.round(U((W = e.perf) == null ? void 0 : W.camRes, t.perf.camRes, 160, 3840, "perf.camRes", r)),
1019
+ cameraZoom: U((P = e.perf) == null ? void 0 : P.cameraZoom, t.perf.cameraZoom, 1, 3, "perf.cameraZoom", r),
1020
+ analysisScale: U(
1021
+ ($ = e.perf) == null ? void 0 : $.analysisScale,
1022
+ t.perf.analysisScale,
1344
1023
  0.25,
1345
1024
  1,
1346
1025
  "perf.analysisScale",
@@ -1349,8 +1028,8 @@ const De = () => (le || (le = rs()), le), ue = (s) => {
1349
1028
  },
1350
1029
  lifecycle: {
1351
1030
  pauseWhenHidden: I(
1352
- (me = s.lifecycle) == null ? void 0 : me.pauseWhenHidden,
1353
- e.lifecycle.pauseWhenHidden,
1031
+ (le = e.lifecycle) == null ? void 0 : le.pauseWhenHidden,
1032
+ t.lifecycle.pauseWhenHidden,
1354
1033
  "lifecycle.pauseWhenHidden",
1355
1034
  r
1356
1035
  )
@@ -1358,71 +1037,71 @@ const De = () => (le || (le = rs()), le), ue = (s) => {
1358
1037
  quality: i,
1359
1038
  camera: {
1360
1039
  facingMode: B(
1361
- (fe = s.camera) == null ? void 0 : fe.facingMode,
1040
+ (ue = e.camera) == null ? void 0 : ue.facingMode,
1362
1041
  ["user", "environment"],
1363
- e.camera.facingMode,
1042
+ t.camera.facingMode,
1364
1043
  "camera.facingMode",
1365
1044
  r
1366
1045
  ),
1367
- deviceId: ((he = s.camera) == null ? void 0 : he.deviceId) === void 0 ? e.camera.deviceId : typeof s.camera.deviceId == "string" || s.camera.deviceId === null ? s.camera.deviceId : (r("camera.deviceId: not a string, kept base"), e.camera.deviceId),
1368
- mirrored: ((pe = s.camera) == null ? void 0 : pe.mirrored) === void 0 ? e.camera.mirrored : s.camera.mirrored === "auto" || typeof s.camera.mirrored == "boolean" ? s.camera.mirrored : (r('camera.mirrored: must be boolean or "auto", kept base'), e.camera.mirrored)
1046
+ 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),
1047
+ 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)
1369
1048
  },
1370
1049
  fallbacks: {
1371
1050
  onUnsupported: B(
1372
- (ge = s.fallbacks) == null ? void 0 : ge.onUnsupported,
1051
+ (pe = e.fallbacks) == null ? void 0 : pe.onUnsupported,
1373
1052
  ["block", "degrade"],
1374
- e.fallbacks.onUnsupported,
1053
+ t.fallbacks.onUnsupported,
1375
1054
  "fallbacks.onUnsupported",
1376
1055
  r
1377
1056
  ),
1378
1057
  delegate: B(
1379
- (ye = s.fallbacks) == null ? void 0 : ye.delegate,
1058
+ (fe = e.fallbacks) == null ? void 0 : fe.delegate,
1380
1059
  ["auto", "GPU", "CPU"],
1381
- e.fallbacks.delegate,
1060
+ t.fallbacks.delegate,
1382
1061
  "fallbacks.delegate",
1383
1062
  r
1384
1063
  )
1385
1064
  },
1386
1065
  assets: {
1387
- holisticModelUrl: Ce(
1388
- (Se = s.assets) == null ? void 0 : Se.holisticModelUrl,
1389
- e.assets.holisticModelUrl,
1066
+ holisticModelUrl: Re(
1067
+ (he = e.assets) == null ? void 0 : he.holisticModelUrl,
1068
+ t.assets.holisticModelUrl,
1390
1069
  "assets.holisticModelUrl",
1391
1070
  r
1392
1071
  ),
1393
- semanticSegmentationModelUrl: Ce(
1394
- (Me = s.assets) == null ? void 0 : Me.semanticSegmentationModelUrl,
1395
- e.assets.semanticSegmentationModelUrl,
1072
+ semanticSegmentationModelUrl: Re(
1073
+ (ge = e.assets) == null ? void 0 : ge.semanticSegmentationModelUrl,
1074
+ t.assets.semanticSegmentationModelUrl,
1396
1075
  "assets.semanticSegmentationModelUrl",
1397
1076
  r
1398
1077
  )
1399
1078
  },
1400
- updatedAt: typeof s.updatedAt == "number" && Number.isFinite(s.updatedAt) ? s.updatedAt : e.updatedAt
1079
+ updatedAt: typeof e.updatedAt == "number" && Number.isFinite(e.updatedAt) ? e.updatedAt : t.updatedAt
1401
1080
  };
1402
- }, ke = (s, e, t = Date.now()) => z({ ...e, updatedAt: t }, s), $e = (s) => JSON.stringify(z({}, s)), ze = (s) => {
1403
- const e = [];
1404
- let t = s;
1405
- if (typeof s == "string")
1081
+ }, be = (e, t, s = Date.now()) => K({ ...t, updatedAt: s }, e), Ne = (e) => JSON.stringify(K({}, e)), Ue = (e) => {
1082
+ const t = [];
1083
+ let s = e;
1084
+ if (typeof e == "string")
1406
1085
  try {
1407
- t = JSON.parse(s);
1086
+ s = JSON.parse(e);
1408
1087
  } catch {
1409
1088
  return {
1410
- config: z(),
1089
+ config: K(),
1411
1090
  migrated: !0,
1412
1091
  warnings: ["not valid JSON; defaults used"]
1413
1092
  };
1414
1093
  }
1415
- if (!t || typeof t != "object")
1094
+ if (!s || typeof s != "object")
1416
1095
  return {
1417
- config: z(),
1096
+ config: K(),
1418
1097
  migrated: !0,
1419
1098
  warnings: ["not an object; defaults used"]
1420
1099
  };
1421
- const r = t, n = r.version !== ne;
1422
- return n && e.push(
1423
- `migrated from version ${String(r.version ?? "none")} to ${ne}`
1424
- ), { config: z(r, Be, e), migrated: n, warnings: e };
1425
- }, or = [
1100
+ const r = s, a = r.version !== ae;
1101
+ return a && t.push(
1102
+ `migrated from version ${String(r.version ?? "none")} to ${ae}`
1103
+ ), { config: K(r, we, t), migrated: a, warnings: t };
1104
+ }, Ps = [
1426
1105
  "face",
1427
1106
  "hand",
1428
1107
  "gesture",
@@ -1430,64 +1109,64 @@ const De = () => (le || (le = rs()), le), ue = (s) => {
1430
1109
  "holistic",
1431
1110
  "segmentation",
1432
1111
  "semanticSegmentation"
1433
- ], cs = (s) => ({
1112
+ ], Gt = (e) => ({
1434
1113
  perf: {
1435
- targetFps: s.perf.targetFps > 0 ? s.perf.targetFps : void 0,
1436
- camRes: s.perf.camRes,
1437
- cameraZoom: s.perf.cameraZoom,
1438
- analysisScale: s.perf.analysisScale
1114
+ targetFps: e.perf.targetFps > 0 ? e.perf.targetFps : void 0,
1115
+ camRes: e.perf.camRes,
1116
+ cameraZoom: e.perf.cameraZoom,
1117
+ analysisScale: e.perf.analysisScale
1439
1118
  },
1440
- lifecycle: { pauseWhenHidden: s.lifecycle.pauseWhenHidden },
1441
- quality: s.quality
1442
- }), ls = (s) => ({
1443
- facingMode: s.camera.facingMode,
1444
- ...s.camera.deviceId ? { deviceId: s.camera.deviceId } : {},
1445
- ...s.camera.mirrored === "auto" ? {} : { mirrored: s.camera.mirrored }
1446
- }), O = (s) => s === null ? {} : { targetFps: s }, us = (s, e) => {
1447
- const t = s.trackers;
1119
+ lifecycle: { pauseWhenHidden: e.lifecycle.pauseWhenHidden },
1120
+ quality: e.quality
1121
+ }), qt = (e) => ({
1122
+ facingMode: e.camera.facingMode,
1123
+ ...e.camera.deviceId ? { deviceId: e.camera.deviceId } : {},
1124
+ ...e.camera.mirrored === "auto" ? {} : { mirrored: e.camera.mirrored }
1125
+ }), O = (e) => e === null ? {} : { targetFps: e }, Bt = (e, t) => {
1126
+ const s = e.trackers;
1448
1127
  return {
1449
1128
  face: {
1450
- numFaces: t.face.numFaces,
1451
- ...O(t.face.targetFps),
1452
- holdMs: t.face.holdMs,
1453
- predictMs: t.face.predictMs,
1454
- active: t.face.enabled
1129
+ numFaces: s.face.numFaces,
1130
+ ...O(s.face.targetFps),
1131
+ holdMs: s.face.holdMs,
1132
+ predictMs: s.face.predictMs,
1133
+ active: s.face.enabled
1455
1134
  },
1456
- hand: { ...O(t.hand.targetFps), active: t.hand.enabled },
1457
- gesture: { ...O(t.gesture.targetFps), active: t.gesture.enabled },
1458
- body: { active: t.body.enabled },
1135
+ hand: { ...O(s.hand.targetFps), active: s.hand.enabled },
1136
+ gesture: { ...O(s.gesture.targetFps), active: s.gesture.enabled },
1137
+ body: { active: s.body.enabled },
1459
1138
  holistic: {
1460
- ...O(t.holistic.targetFps),
1461
- hands: t.holistic.hands,
1462
- holdMs: t.holistic.holdMs,
1463
- predictMs: t.holistic.predictMs,
1464
- analysisMaxDimension: t.holistic.analysisMaxDimension,
1465
- outputFaceBlendshapes: t.holistic.outputFaceBlendshapes,
1466
- delegate: t.holistic.delegate === "auto" ? s.fallbacks.delegate : t.holistic.delegate,
1467
- ...s.assets.holisticModelUrl ? { modelUrl: s.assets.holisticModelUrl } : {},
1468
- active: t.holistic.enabled
1139
+ ...O(s.holistic.targetFps),
1140
+ hands: s.holistic.hands,
1141
+ holdMs: s.holistic.holdMs,
1142
+ predictMs: s.holistic.predictMs,
1143
+ analysisMaxDimension: s.holistic.analysisMaxDimension,
1144
+ outputFaceBlendshapes: s.holistic.outputFaceBlendshapes,
1145
+ delegate: s.holistic.delegate === "auto" ? e.fallbacks.delegate : s.holistic.delegate,
1146
+ ...e.assets.holisticModelUrl ? { modelUrl: e.assets.holisticModelUrl } : {},
1147
+ active: s.holistic.enabled
1469
1148
  },
1470
- segmentation: { quality: t.segmentation.quality, active: t.segmentation.enabled },
1149
+ segmentation: { quality: s.segmentation.quality, active: s.segmentation.enabled },
1471
1150
  semanticSegmentation: {
1472
- preset: t.semanticSegmentation.preset,
1473
- quality: t.semanticSegmentation.quality,
1474
- ...s.assets.semanticSegmentationModelUrl ? { modelUrl: s.assets.semanticSegmentationModelUrl } : {},
1475
- active: t.semanticSegmentation.enabled
1151
+ preset: s.semanticSegmentation.preset,
1152
+ quality: s.semanticSegmentation.quality,
1153
+ ...e.assets.semanticSegmentationModelUrl ? { modelUrl: e.assets.semanticSegmentationModelUrl } : {},
1154
+ active: s.semanticSegmentation.enabled
1476
1155
  }
1477
- }[e];
1478
- }, ds = (s, e) => {
1479
- const t = s.trackers;
1480
- switch (e) {
1481
- case C.FACE_TRACKER:
1482
- return { numFaces: t.face.numFaces, ...O(t.face.targetFps) };
1483
- case C.HAND_TRACKER:
1484
- return { ...O(t.hand.targetFps) };
1485
- case C.GESTURE_TRACKER:
1486
- return { ...O(t.gesture.targetFps) };
1487
- case C.BODY_TRACKER:
1488
- return { ...O(t.body.targetFps) };
1489
- case C.HOLISTIC_TRACKER: {
1490
- const r = t.holistic;
1156
+ }[t];
1157
+ }, Kt = (e, t) => {
1158
+ const s = e.trackers;
1159
+ switch (t) {
1160
+ case v.FACE_TRACKER:
1161
+ return { numFaces: s.face.numFaces, ...O(s.face.targetFps) };
1162
+ case v.HAND_TRACKER:
1163
+ return { ...O(s.hand.targetFps) };
1164
+ case v.GESTURE_TRACKER:
1165
+ return { ...O(s.gesture.targetFps) };
1166
+ case v.BODY_TRACKER:
1167
+ return { ...O(s.body.targetFps) };
1168
+ case v.HOLISTIC_TRACKER: {
1169
+ const r = s.holistic;
1491
1170
  return {
1492
1171
  ...O(r.targetFps),
1493
1172
  hands: r.hands,
@@ -1500,271 +1179,276 @@ const De = () => (le || (le = rs()), le), ue = (s) => {
1500
1179
  minPoseDetectionConfidence: r.confidence,
1501
1180
  minPosePresenceConfidence: r.confidence,
1502
1181
  minHandLandmarksConfidence: r.confidence,
1503
- delegate: r.delegate === "auto" ? s.fallbacks.delegate : r.delegate,
1504
- ...s.assets.holisticModelUrl ? { modelUrl: s.assets.holisticModelUrl } : {}
1182
+ delegate: r.delegate === "auto" ? e.fallbacks.delegate : r.delegate,
1183
+ ...e.assets.holisticModelUrl ? { modelUrl: e.assets.holisticModelUrl } : {}
1505
1184
  };
1506
1185
  }
1507
- case C.BACKGROUND_SEGMENTATION:
1508
- return { quality: t.segmentation.quality };
1509
- case C.SEMANTIC_SEGMENTATION:
1186
+ case v.BACKGROUND_SEGMENTATION:
1187
+ return { quality: s.segmentation.quality };
1188
+ case v.SEMANTIC_SEGMENTATION:
1510
1189
  return {
1511
- preset: t.semanticSegmentation.preset,
1512
- quality: t.semanticSegmentation.quality,
1513
- ...s.assets.semanticSegmentationModelUrl ? { modelUrl: s.assets.semanticSegmentationModelUrl } : {}
1190
+ preset: s.semanticSegmentation.preset,
1191
+ quality: s.semanticSegmentation.quality,
1192
+ ...e.assets.semanticSegmentationModelUrl ? { modelUrl: e.assets.semanticSegmentationModelUrl } : {}
1514
1193
  };
1515
1194
  default:
1516
1195
  return {};
1517
1196
  }
1518
- }, ms = (s) => {
1519
- const e = s.trackers, t = [];
1520
- return e.face.enabled && t.push(C.FACE_TRACKER), e.hand.enabled && t.push(C.HAND_TRACKER), e.gesture.enabled && t.push(C.GESTURE_TRACKER), e.body.enabled && t.push(C.BODY_TRACKER), e.holistic.enabled && t.push(C.HOLISTIC_TRACKER), e.segmentation.enabled && t.push(C.BACKGROUND_SEGMENTATION), e.semanticSegmentation.enabled && t.push(C.SEMANTIC_SEGMENTATION), t;
1521
- }, ie = "vincentt.xr.tracking-config", de = () => {
1197
+ }, Wt = (e) => {
1198
+ const t = e.trackers, s = [];
1199
+ 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;
1200
+ }, ne = "vincentt.xr.tracking-config", ce = () => {
1522
1201
  try {
1523
1202
  return typeof localStorage < "u" ? localStorage : null;
1524
1203
  } catch {
1525
1204
  return null;
1526
1205
  }
1527
- }, fs = (s = ie, e = de()) => {
1528
- if (!e) return null;
1206
+ }, Xt = (e = ne, t = ce()) => {
1207
+ if (!t) return null;
1529
1208
  try {
1530
- const t = e.getItem(s);
1531
- return t ? ze(t) : null;
1209
+ const s = t.getItem(e);
1210
+ return s ? Ue(s) : null;
1532
1211
  } catch {
1533
1212
  return null;
1534
1213
  }
1535
- }, _e = (s, e = ie, t = de()) => {
1536
- if (!t) return !1;
1214
+ }, Ae = (e, t = ne, s = ce()) => {
1215
+ if (!s) return !1;
1537
1216
  try {
1538
- return t.setItem(e, $e(s)), !0;
1217
+ return s.setItem(t, Ne(e)), !0;
1539
1218
  } catch {
1540
1219
  return !1;
1541
1220
  }
1542
- }, hs = (s = ie, e = de()) => {
1543
- if (e)
1221
+ }, Ht = (e = ne, t = ce()) => {
1222
+ if (t)
1544
1223
  try {
1545
- e.removeItem(s);
1224
+ t.removeItem(e);
1546
1225
  } catch {
1547
1226
  }
1548
- }, cr = (s = {}) => {
1549
- const { storageKey: e = ie, persist: t = !0 } = s, r = s.storage, n = w(s.initial), a = K(() => z(n.current ?? {}), []), [i, o] = k(a), [c, l] = k([]), [p, u] = k(!t), m = w(i);
1227
+ }, Is = (e = {}) => {
1228
+ const { storageKey: t = ne, persist: s = !0 } = e, r = e.storage, a = F(e.initial), n = Z(() => K(a.current ?? {}), []), [i, c] = k(n), [o, l] = k([]), [h, d] = k(!s), m = F(i);
1550
1229
  m.current = i, x(() => {
1551
- if (!t) {
1552
- u(!0);
1230
+ if (!s) {
1231
+ d(!0);
1553
1232
  return;
1554
1233
  }
1555
- const h = fs(e, r);
1556
- if (h) {
1557
- const g = z(h.config, a);
1558
- m.current = g, o(g), l(h.warnings), h.migrated && _e(g, e, r);
1234
+ const f = Xt(t, r);
1235
+ if (f) {
1236
+ const g = K(f.config, n);
1237
+ m.current = g, c(g), l(f.warnings), f.migrated && Ae(g, t, r);
1559
1238
  }
1560
- u(!0);
1561
- }, [t, e, r, a]);
1562
- const d = E(
1563
- (h, g) => (m.current = h, o(h), l(g), t && _e(h, e, r), h),
1564
- [t, e, r]
1565
- ), f = E(
1566
- (h) => {
1567
- const g = [], R = z({ ...h, updatedAt: Date.now() }, m.current, g);
1568
- return d(R, g);
1239
+ d(!0);
1240
+ }, [s, t, r, n]);
1241
+ const u = R(
1242
+ (f, g) => (m.current = f, c(f), l(g), s && Ae(f, t, r), f),
1243
+ [s, t, r]
1244
+ ), p = R(
1245
+ (f) => {
1246
+ const g = [], b = K({ ...f, updatedAt: Date.now() }, m.current, g);
1247
+ return u(b, g);
1569
1248
  },
1570
- [d]
1571
- ), y = E(() => {
1572
- const h = ke(a, {}, 0);
1573
- return m.current = h, o(h), l([]), t && hs(e, r), h;
1574
- }, [a, t, e, r]), A = E(
1575
- (h) => {
1576
- const g = ze(h);
1577
- return g.warnings.some((R) => R.startsWith("not valid JSON") || R.startsWith("not an object")) ? (l([`import: ${g.warnings[0]}; config unchanged`]), m.current) : d(ke(g.config, {}, Date.now()), g.warnings);
1249
+ [u]
1250
+ ), S = R(() => {
1251
+ const f = be(n, {}, 0);
1252
+ return m.current = f, c(f), l([]), s && Ht(t, r), f;
1253
+ }, [n, s, t, r]), E = R(
1254
+ (f) => {
1255
+ const g = Ue(f);
1256
+ return g.warnings.some((b) => b.startsWith("not valid JSON") || b.startsWith("not an object")) ? (l([`import: ${g.warnings[0]}; config unchanged`]), m.current) : u(be(g.config, {}, Date.now()), g.warnings);
1578
1257
  },
1579
- [d]
1258
+ [u]
1580
1259
  );
1581
- return K(
1260
+ return Z(
1582
1261
  () => ({
1583
1262
  config: i,
1584
- hydrated: p,
1585
- warnings: c,
1586
- update: f,
1587
- reset: y,
1588
- importJson: A,
1589
- json: $e(i),
1590
- providerProps: cs(i),
1591
- cameraRequest: ls(i),
1592
- trackerProps: (h) => us(i, h),
1593
- modelOptions: (h) => ds(i, h),
1594
- enabledModels: ms(i)
1263
+ hydrated: h,
1264
+ warnings: o,
1265
+ update: p,
1266
+ reset: S,
1267
+ importJson: E,
1268
+ json: Ne(i),
1269
+ providerProps: Gt(i),
1270
+ cameraRequest: qt(i),
1271
+ trackerProps: (f) => Bt(i, f),
1272
+ modelOptions: (f) => Kt(i, f),
1273
+ enabledModels: Wt(i)
1595
1274
  }),
1596
- [i, p, c, f, y, A]
1275
+ [i, h, o, p, S, E]
1597
1276
  );
1598
1277
  };
1599
1278
  export {
1600
- Ns as AspectRatioContainer,
1601
- Xt as AudioEngine,
1602
- qs as AudioPlayer,
1603
- Ds as Axes,
1604
- Ze as CAMERA_PERMISSION_MESSAGES,
1605
- Qs as CameraPermissionGate,
1606
- ts as DEFAULT_ASSET_BUDGET_BYTES,
1607
- Ea as DEFAULT_MATERIAL_FILL,
1608
- pa as DEFAULT_MESH_RENDERER,
1609
- ga as DEFAULT_MESH_RENDERER_RENDER_STATE,
1610
- dr as DEFAULT_PERFORMANCE_BUDGET,
1611
- Ua as DEFAULT_PIXEL_SNAP_INCREMENT,
1612
- mr as DEFAULT_QUALITY_TIERS,
1613
- Pa as DEFAULT_REFERENCE_PIXELS_PER_UNIT,
1614
- Vr as DEFAULT_SCREEN_GLASS,
1615
- ba as DEFAULT_SCREEN_GRADIENT,
1616
- jr as DEFAULT_SCREEN_IMAGE_SCENE_SETTINGS,
1617
- Yr as DEFAULT_SCREEN_IMAGE_SETTINGS,
1618
- Qr as DEFAULT_SCREEN_SHAPE_SETTINGS,
1619
- Zr as DEFAULT_SCREEN_TEXT_SCENE_SETTINGS,
1620
- Jr as DEFAULT_SCREEN_TEXT_SHADOW_LAYER,
1621
- Na as DEFAULT_SCREEN_TRANSFORM_2D,
1622
- Da as DEFAULT_SCREEN_TRANSFORM_ROOT,
1623
- Be as DEFAULT_TRACKING_CONFIG,
1624
- Ta as DEFAULT_TRANSFORM_3D,
1625
- ea as EXTERNAL_BACKGROUND_RENDER_LAYER,
1626
- xt as FULL_SCREEN_ANCHORS,
1627
- Or as LightObject,
1628
- Gr as LookAt,
1629
- ta as MAX_RENDER_GROUP_PASSES,
1630
- Aa as MaterialFill,
1631
- fa as MeshMaterial,
1632
- ya as MeshRenderer,
1633
- xs as Panel,
1634
- Ps as PersonCutout,
1635
- sa as PinToMesh,
1636
- qr as RenderGroupLayer,
1637
- Br as SCREEN_IMAGE_MASK_CHANNELS,
1638
- $r as SceneObjectRenderer,
1639
- ra as ScreenGlassMaterial,
1640
- Ra as ScreenGradientMaterial,
1641
- it as ScreenImage,
1642
- aa as ScreenShape,
1643
- zr as ScreenSpaceUI,
1644
- Xr as ScreenText,
1645
- nt as ScreenTransform,
1279
+ ms as AspectRatioContainer,
1280
+ vt as AudioEngine,
1281
+ ys as AudioPlayer,
1282
+ ps as Axes,
1283
+ We as CAMERA_PERMISSION_MESSAGES,
1284
+ _s as CameraPermissionGate,
1285
+ Ka as DEFAULT_ASSET_BUDGET_BYTES,
1286
+ Xr as DEFAULT_MATERIAL_FILL,
1287
+ ra as DEFAULT_MESH_RENDERER,
1288
+ aa as DEFAULT_MESH_RENDERER_RENDER_STATE,
1289
+ Gs as DEFAULT_PERFORMANCE_BUDGET,
1290
+ pa as DEFAULT_PIXEL_SNAP_INCREMENT,
1291
+ qs as DEFAULT_QUALITY_TIERS,
1292
+ fa as DEFAULT_REFERENCE_PIXELS_PER_UNIT,
1293
+ Er as DEFAULT_SCREEN_GLASS,
1294
+ Hr as DEFAULT_SCREEN_GRADIENT,
1295
+ Rr as DEFAULT_SCREEN_IMAGE_SCENE_SETTINGS,
1296
+ br as DEFAULT_SCREEN_IMAGE_SETTINGS,
1297
+ Ar as DEFAULT_SCREEN_SHAPE_SETTINGS,
1298
+ Fr as DEFAULT_SCREEN_TEXT_SCENE_SETTINGS,
1299
+ Cr as DEFAULT_SCREEN_TEXT_SHADOW_LAYER,
1300
+ ha as DEFAULT_SCREEN_TRANSFORM_2D,
1301
+ ga as DEFAULT_SCREEN_TRANSFORM_ROOT,
1302
+ we as DEFAULT_TRACKING_CONFIG,
1303
+ zr as DEFAULT_TRANSFORM_3D,
1304
+ $r as EXTERNAL_BACKGROUND_RENDER_LAYER,
1305
+ ft as FULL_SCREEN_ANCHORS,
1306
+ Ir as LightObject,
1307
+ Lr as LookAt,
1308
+ jr as MAX_RENDER_GROUP_PASSES,
1309
+ Vr as MaterialFill,
1310
+ da as MeshMaterial,
1311
+ na as MeshRenderer,
1312
+ ls as Panel,
1313
+ ds as PersonCutout,
1314
+ vr as PinToMesh,
1315
+ Or as RenderGroupLayer,
1316
+ Gr as SCREEN_IMAGE_MASK_CHANNELS,
1317
+ qr as SceneObjectRenderer,
1318
+ kr as ScreenGlassMaterial,
1319
+ Zr as ScreenGradientMaterial,
1320
+ nt as ScreenImage,
1321
+ _r as ScreenShape,
1322
+ yr as ScreenSpaceUI,
1323
+ Br as ScreenText,
1324
+ Xe as ScreenTransform,
1646
1325
  Kr as SequentialRenderPasses,
1647
- Is as SpriteAnimation,
1648
- or as TRACKER_KINDS,
1649
- ie as TRACKING_CONFIG_STORAGE_KEY,
1650
- ne as TRACKING_CONFIG_VERSION,
1651
- Wr as TextLabel,
1652
- va as Transform3D,
1653
- Us as VideoBackground,
1654
- ss as XRAssetCache,
1655
- ar as XRAssetCacheProvider,
1656
- fr as XRMediaSource,
1657
- C as XRModel,
1658
- hr as XRProvider,
1659
- pr as XRQualityController,
1660
- Ir as XRScene,
1661
- gr as XR_FALLBACK_MESSAGES,
1662
- yr as XR_MODEL_ASSET_URLS,
1663
- N as audio,
1664
- Qe as canPromptForCamera,
1665
- hs as clearTrackingConfig,
1666
- Ga as clientToScreenPixels,
1667
- ot as computeContainScale,
1668
- Sr as computeFeedCrop,
1669
- Mr as computeFitLayout,
1670
- rs as createAssetCache,
1671
- Er as createFallbackReason,
1672
- wa as createTwoStopGradient,
1673
- Gs as dataURLtoFile,
1674
- sr as defineGltfAsset,
1675
- tr as defineTextureAsset,
1676
- rr as defineVideoAsset,
1677
- br as detectXRCapabilities,
1678
- we as disposeObject3D,
1679
- ka as drawNormalizedCrop,
1680
- ms as enabledModels,
1681
- as as estimateGeometryBytes,
1682
- is as estimateObjectBytes,
1683
- ue as estimateTextureBytes,
1684
- qa as feedToScreenPixels,
1685
- Tr as feedToSource,
1686
- Ba as feedToTracker,
1687
- $a as feedToViewport,
1688
- Ar as feedToWorld,
1689
- Js as findCameraByFacing,
1690
- De as getDefaultAssetCache,
1691
- na as getRenderGroupLayer,
1692
- Rr as isFeedPointInSource,
1693
- vr as isMirroredSourceKind,
1694
- Vs as isMuted,
1695
- Zs as listCameras,
1696
- fs as loadTrackingConfig,
1697
- ia as mapScreenImageSettingsToProps,
1698
- oa as mapScreenTextInnerShadowToProps,
1699
- ca as mapScreenTextSettingsToProps,
1700
- za as mediaToScreenPixels,
1701
- la as mergeScreenShapeSettings,
1702
- Ia as mergeScreenTransform2D,
1703
- ke as mergeTrackingConfig,
1704
- wr as mirrorFeedX,
1705
- Sa as normalizeMeshRendererRenderState,
1706
- ua as normalizeScreenGlass,
1707
- Fa as normalizeScreenGradient,
1708
- Xa as normalizedToScreenPixels,
1709
- js as onMuteChange,
1710
- Fr as orientSourcePoint,
1711
- Cr as orientedSize,
1712
- ze as parseTrackingConfig,
1713
- Ks as playOneShot,
1714
- Bs as prefetchMusic,
1715
- Ve as queryCameraPermission,
1716
- $s as registerSound,
1717
- da as renderSequentialPasses,
1718
- je as requestCameraAccess,
1719
- kr as resolveModelAssetUrl,
1720
- _a as resolveNormalizedCrop,
1721
- Ut as resolvePersonCutoutStatus,
1722
- Ee as resolveQualityConfig,
1723
- La as resolveScreenTransform2D,
1724
- _r as resolveTrackerSupport,
1725
- z as resolveTrackingConfig,
1726
- _e as saveTrackingConfig,
1727
- Ka as screenPixelsToClient,
1728
- Wa as screenPixelsToFeed,
1729
- Ha as screenPixelsToMedia,
1730
- Va as screenPixelsToNormalized,
1731
- ja as screenPixelsToScreenSpace,
1732
- Ya as screenPixelsToUnits,
1733
- Qa as screenPointToRay,
1734
- Za as screenSpaceToScreenPixels,
1735
- Ja as screenUnitsToPixels,
1736
- $e as serializeTrackingConfig,
1737
- Ws as setMuted,
1738
- Pt as shouldDrawFallback,
1739
- Q as smoothNumber,
1740
- ks as smoothVector2,
1741
- _s as smoothVector3,
1742
- xr as sourceToFeed,
1743
- zs as startMusic,
1744
- Xs as stopMusic,
1745
- Ye as subscribeCameraPermission,
1746
- ls as toCameraRequest,
1747
- ds as toModelOptions,
1748
- cs as toProviderProps,
1749
- us as toTrackerProps,
1750
- Hs as toggleMuted,
1751
- en as trackerPointToScreenPixels,
1752
- tn as trackerToFeed,
1753
- Ur as trackerToWorld,
1754
- Vt as useCameraPermission,
1755
- Os as useFrameCapture,
1756
- Ls as useMediaRecorder,
1757
- Ys as useMuted,
1758
- Nt as usePersonMaskTexture,
1759
- Rt as useScreenRectAspect,
1760
- nr as useXRAsset,
1761
- qe as useXRAssetCache,
1762
- ir as useXRAssetStats,
1763
- nn as useXRCapabilities,
1764
- er as useXRQuality,
1765
- cr as useXRTrackingConfig,
1766
- sn as viewportToFeed,
1767
- Pr as worldToFeed,
1768
- rn as worldToScreenPixels,
1769
- Nr as worldToTracker
1326
+ fs as SpriteAnimation,
1327
+ Ps as TRACKER_KINDS,
1328
+ ne as TRACKING_CONFIG_STORAGE_KEY,
1329
+ ae as TRACKING_CONFIG_VERSION,
1330
+ Mr as TextLabel,
1331
+ Yr as Transform3D,
1332
+ us as VideoBackground,
1333
+ Wa as XRAssetCache,
1334
+ Ns as XRAssetCacheProvider,
1335
+ Bs as XRMediaSource,
1336
+ v as XRModel,
1337
+ Ks as XRProvider,
1338
+ Ws as XRQualityController,
1339
+ gr as XRScene,
1340
+ Xs as XR_FALLBACK_MESSAGES,
1341
+ Hs as XR_MODEL_ASSET_URLS,
1342
+ D as audio,
1343
+ Ke as canPromptForCamera,
1344
+ Ht as clearTrackingConfig,
1345
+ Ta as clientToScreenPixels,
1346
+ it as computeContainScale,
1347
+ zs as computeFeedCrop,
1348
+ $s as computeFitLayout,
1349
+ Xa as createAssetCache,
1350
+ js as createFallbackReason,
1351
+ Jr as createTwoStopGradient,
1352
+ Ss as dataURLtoFile,
1353
+ Ha as defineGltfAsset,
1354
+ za as defineTextureAsset,
1355
+ $a as defineVideoAsset,
1356
+ Vs as detectXRCapabilities,
1357
+ ja as disposeObject3D,
1358
+ ca as drawNormalizedCrop,
1359
+ Wt as enabledModels,
1360
+ Va as estimateGeometryBytes,
1361
+ Za as estimateObjectBytes,
1362
+ Ya as estimateTextureBytes,
1363
+ Zs as feedSidedName,
1364
+ Ea as feedToScreenPixels,
1365
+ Ys as feedToSource,
1366
+ Ra as feedToTracker,
1367
+ ba as feedToViewport,
1368
+ Js as feedToWorld,
1369
+ ws as findCameraByFacing,
1370
+ ke as getDefaultAssetCache,
1371
+ Qr as getRenderGroupLayer,
1372
+ Qs as isFeedPointInSource,
1373
+ er as isMirroredSourceKind,
1374
+ Cs as isMuted,
1375
+ xs as listCameras,
1376
+ Xt as loadTrackingConfig,
1377
+ xr as mapScreenImageSettingsToProps,
1378
+ wr as mapScreenTextInnerShadowToProps,
1379
+ Nr as mapScreenTextSettingsToProps,
1380
+ Aa as mediaToScreenPixels,
1381
+ Ur as mergeScreenShapeSettings,
1382
+ Sa as mergeScreenTransform2D,
1383
+ be as mergeTrackingConfig,
1384
+ tr as mirrorFeedX,
1385
+ ia as normalizeMeshRendererRenderState,
1386
+ Dr as normalizeScreenGlass,
1387
+ ea as normalizeScreenGradient,
1388
+ Fa as normalizedToScreenPixels,
1389
+ vs as onMuteChange,
1390
+ sr as orientSourcePoint,
1391
+ rr as orientedSize,
1392
+ ar as otherSide,
1393
+ Ue as parseTrackingConfig,
1394
+ nr as personLeftSign,
1395
+ ir as personSide,
1396
+ bs as playOneShot,
1397
+ Ms as prefetchMusic,
1398
+ Ge as queryCameraPermission,
1399
+ Ts as registerSound,
1400
+ ta as renderSequentialPasses,
1401
+ qe as requestCameraAccess,
1402
+ or as resolveModelAssetUrl,
1403
+ la as resolveNormalizedCrop,
1404
+ ht as resolvePersonCutoutStatus,
1405
+ cr as resolveQualityConfig,
1406
+ ya as resolveScreenTransform2D,
1407
+ lr as resolveTrackerSupport,
1408
+ K as resolveTrackingConfig,
1409
+ Ae as saveTrackingConfig,
1410
+ Ca as screenPixelsToClient,
1411
+ va as screenPixelsToFeed,
1412
+ ka as screenPixelsToMedia,
1413
+ _a as screenPixelsToNormalized,
1414
+ xa as screenPixelsToScreenSpace,
1415
+ wa as screenPixelsToUnits,
1416
+ Na as screenPointToRay,
1417
+ Ua as screenSpaceToScreenPixels,
1418
+ Da as screenUnitsToPixels,
1419
+ Ne as serializeTrackingConfig,
1420
+ As as setMuted,
1421
+ gt as shouldDrawFallback,
1422
+ V as smoothNumber,
1423
+ os as smoothVector2,
1424
+ cs as smoothVector3,
1425
+ ur as sourceToFeed,
1426
+ Es as startMusic,
1427
+ Rs as stopMusic,
1428
+ Be as subscribeCameraPermission,
1429
+ dr as swapSidedName,
1430
+ qt as toCameraRequest,
1431
+ Kt as toModelOptions,
1432
+ Gt as toProviderProps,
1433
+ Bt as toTrackerProps,
1434
+ Fs as toggleMuted,
1435
+ Pa as trackerPointToScreenPixels,
1436
+ Ia as trackerToFeed,
1437
+ mr as trackerToWorld,
1438
+ wt as useCameraPermission,
1439
+ gs as useFrameCapture,
1440
+ hs as useMediaRecorder,
1441
+ ks as useMuted,
1442
+ St as usePersonMaskTexture,
1443
+ ct as useScreenRectAspect,
1444
+ Us as useXRAsset,
1445
+ xe as useXRAssetCache,
1446
+ Ds as useXRAssetStats,
1447
+ qa as useXRCapabilities,
1448
+ Ja as useXRQuality,
1449
+ Is as useXRTrackingConfig,
1450
+ La as viewportToFeed,
1451
+ pr as worldToFeed,
1452
+ Oa as worldToScreenPixels,
1453
+ fr as worldToTracker
1770
1454
  };