@vincentt-xr/sdk 2.0.0-alpha.0 → 2.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GROUNDING.md +8193 -111
- package/README.md +86 -52
- package/dist/CanonicalHeadFrame-D_0OzdB9.cjs +1 -0
- package/dist/CanonicalHeadFrame-DdUqF6Fv.js +1506 -0
- package/dist/DebuggerUI-CVuV-VJ5.cjs +1 -0
- package/dist/DebuggerUI-D-rcPa54.js +275 -0
- package/dist/FaceRetouch-C1AxBNex.js +1071 -0
- package/dist/FaceRetouch-D7kryDE6.cjs +134 -0
- package/dist/FaceSurface-CHAMEeG1.cjs +1 -0
- package/dist/FaceSurface-DmP9AEeC.js +27 -0
- package/dist/SkeletonUtils-C2r90MtN.js +21 -0
- package/dist/SkeletonUtils-CddIup1F.cjs +1 -0
- package/dist/TextLabel-XE0rQSDn.cjs +2 -0
- package/dist/TextLabel-c9BCucOI.js +961 -0
- package/dist/assets/cache.d.ts +99 -0
- package/dist/assets/estimate.d.ts +11 -0
- package/dist/assets/gltfLoader.d.ts +16 -0
- package/dist/assets/index.d.ts +7 -0
- package/dist/assets/loaders.d.ts +43 -0
- package/dist/assets/react.d.ts +33 -0
- package/dist/assets/sdkModels.d.ts +22 -0
- package/dist/audio/AudioEngine.d.ts +3 -1
- package/dist/audio/AudioPlayer.d.ts +29 -0
- package/dist/audio/AudioPlayerLogic.d.ts +4 -0
- package/dist/audio/index.d.ts +2 -0
- package/dist/body/__fixtures__/syntheticRig.d.ts +21 -0
- package/dist/body/bodyFlipGuard.d.ts +39 -0
- package/dist/body/bodyIdentity.d.ts +72 -0
- package/dist/body/bodyMask.d.ts +79 -0
- package/dist/body/bodyMaskMaterial.d.ts +15 -0
- package/dist/body/bodyPose.d.ts +58 -0
- package/dist/body/bodyRigFit.d.ts +148 -0
- package/dist/body/bodyRigSolver.d.ts +114 -0
- package/dist/body/bodySubject.d.ts +46 -0
- package/dist/body-pose/index.d.ts +521 -0
- package/dist/body-trigger/__fixtures__/syntheticBody.d.ts +83 -0
- package/dist/body-trigger/frame.d.ts +88 -0
- package/dist/body-trigger/index.d.ts +6 -0
- package/dist/body-trigger/moves.d.ts +235 -0
- package/dist/body-trigger/trigger.d.ts +75 -0
- package/dist/bodyMaskMaterial-CBWub5t_.cjs +68 -0
- package/dist/bodyMaskMaterial-Cs2awskk.js +207 -0
- package/dist/cache-2x3CUJuY.js +212 -0
- package/dist/cache-DL1Dbz6k.cjs +1 -0
- package/dist/calibration/calibration.d.ts +75 -0
- package/dist/calibration/index.d.ts +6 -0
- package/dist/calibration/storage.d.ts +13 -0
- package/dist/calibration/types.d.ts +53 -0
- package/dist/calibration/useXRCalibration.d.ts +46 -0
- package/dist/camera/CameraPermissionGate.d.ts +26 -0
- package/dist/camera/devices.d.ts +26 -0
- package/dist/camera/index.d.ts +8 -0
- package/dist/camera/permission.d.ts +86 -0
- package/dist/camera/useCameraPermission.d.ts +35 -0
- package/dist/canonicalFace-BHwyCx1c.js +9 -0
- package/dist/canonicalFace-C83I225R.cjs +1 -0
- package/dist/capabilities/detect.d.ts +45 -0
- package/dist/capabilities/index.d.ts +5 -0
- package/dist/capabilities/types.d.ts +120 -0
- package/dist/capabilities/useXRCapabilities.d.ts +18 -0
- package/dist/compat/environment.d.ts +5 -0
- package/dist/compat/index.d.ts +4 -0
- package/dist/compat/run.d.ts +18 -0
- package/dist/compat/scenarios.d.ts +10 -0
- package/dist/compat/types.d.ts +101 -0
- package/dist/components/Axes/index.d.ts +6 -0
- package/dist/components/BodyInstruction/BodyPoseHint.d.ts +63 -0
- package/dist/components/BodyInstruction/index.d.ts +76 -0
- package/dist/components/BodyInstruction/useBodyPose.d.ts +30 -0
- package/dist/components/BodyRig/BodyAttachment.d.ts +28 -0
- package/dist/components/BodyRig/BodyOccluder.d.ts +27 -0
- package/dist/components/BodyRig/bodyDepth.d.ts +57 -0
- package/dist/components/BodyRig/index.d.ts +129 -0
- package/dist/components/BodyRig/useBodyDepthTexture.d.ts +40 -0
- package/dist/components/BodyTracker/index.d.ts +26 -1
- package/dist/components/BodyTrigger/index.d.ts +56 -0
- package/dist/components/Debugger/DebuggerProvider.d.ts +14 -1
- package/dist/components/Debugger/DebuggerUI.d.ts +3 -1
- package/dist/components/FaceAtlas/FaceAtlasLayer.d.ts +114 -0
- package/dist/components/FaceAtlas/MadeUpCamera.d.ts +80 -0
- package/dist/components/FaceAtlas/constants.d.ts +8 -0
- package/dist/components/FaceAtlas/index.d.ts +7 -0
- package/dist/components/FaceAtlas/useFaceAtlasSurface.d.ts +84 -0
- package/dist/components/FaceAtlas/useFaceSkin.d.ts +84 -0
- package/dist/components/FaceCharacter/ExternalFaceMesh.d.ts +109 -0
- package/dist/components/FaceCharacter/FaceExpressionController.d.ts +53 -0
- package/dist/components/FaceCharacter/FaceMorph.d.ts +71 -0
- package/dist/components/FaceCharacter/FacePiercing.d.ts +65 -0
- package/dist/components/FaceCharacter/FaceReprojection.d.ts +85 -0
- package/dist/components/FaceCharacter/FaceRig.d.ts +38 -0
- package/dist/components/FaceCharacter/FaceSurface.d.ts +49 -0
- package/dist/components/FaceCharacter/FaceSurfaceOccluder.d.ts +39 -0
- package/dist/components/FaceCharacter/PinToFaceMesh.d.ts +68 -0
- package/dist/components/FaceCharacter/index.d.ts +18 -0
- package/dist/components/FaceCharacter/useFaceReprojector.d.ts +10 -0
- package/dist/components/FaceInset/FaceInset.d.ts +68 -0
- package/dist/components/FaceInset/frame.d.ts +94 -0
- package/dist/components/FaceInset/index.d.ts +6 -0
- package/dist/components/FaceInset/material.d.ts +40 -0
- package/dist/components/FaceInset/useFaceInsetTexture.d.ts +37 -0
- package/dist/components/FaceInstruction/FaceExpressionHint.d.ts +43 -0
- package/dist/components/FaceInstruction/index.d.ts +56 -0
- package/dist/components/FaceInstruction/useFaceExpression.d.ts +20 -0
- package/dist/components/FaceLiquify/FaceLiquify.d.ts +49 -0
- package/dist/components/FaceLiquify/debug.d.ts +37 -0
- package/dist/components/FaceLiquify/frame.d.ts +55 -0
- package/dist/components/FaceLiquify/index.d.ts +10 -0
- package/dist/components/FaceLiquify/material.d.ts +39 -0
- package/dist/components/FaceLiquify/pass.d.ts +49 -0
- package/dist/components/FaceLiquify/presence.d.ts +25 -0
- package/dist/components/FaceLiquify/presets.d.ts +82 -0
- package/dist/components/FaceLiquify/selfTest.d.ts +66 -0
- package/dist/components/FaceLiquify/target.d.ts +85 -0
- package/dist/components/FaceLiquify/warp.d.ts +72 -0
- package/dist/components/FaceMesh/FaceMeshRenderer.d.ts +25 -0
- package/dist/components/FaceMesh/canonical/CanonicalFaceMeshRenderer.d.ts +70 -1
- package/dist/components/FaceMesh/canonical/FaceMeshMaterial.d.ts +25 -0
- package/dist/components/FaceMesh/canonical/assets.d.ts +3 -0
- package/dist/components/FaceMesh/canonical/geometryGroups.d.ts +30 -0
- package/dist/components/FaceMesh/canonical/parseCanonicalFaceModel.d.ts +24 -0
- package/dist/components/FaceMesh/canonical/shaders.d.ts +2 -0
- package/dist/components/FaceMesh/deform.d.ts +3 -0
- package/dist/components/FaceMesh/index.d.ts +6 -1
- package/dist/components/FaceMesh/material/defaults.d.ts +74 -0
- package/dist/components/FaceMesh/material/index.d.ts +1 -0
- package/dist/components/FaceMesh/material/options.d.ts +5 -1
- package/dist/components/FaceMesh/material/support.d.ts +7 -2
- package/dist/components/FaceMesh/material/textures.d.ts +4 -0
- package/dist/components/FaceMesh/material/types.d.ts +4 -2
- package/dist/components/FaceRetouch/Background.d.ts +11 -5
- package/dist/components/FaceRetouch/FaceRetouch.d.ts +52 -0
- package/dist/components/FaceRetouch/index.d.ts +2 -6
- package/dist/components/FaceRetouch/landmarkMask.d.ts +4 -6
- package/dist/components/FaceRetouch/renderState.d.ts +19 -0
- package/dist/components/FaceRetouch/useFaceRetouchMask.d.ts +4 -7
- package/dist/components/FaceSwap/FaceMirror.d.ts +46 -0
- package/dist/components/FaceSwap/FaceSwap.d.ts +58 -0
- package/dist/components/FaceSwap/FaceTextureLayer.d.ts +72 -0
- package/dist/components/FaceSwap/faceSwapPlan.d.ts +91 -0
- package/dist/components/FaceSwap/index.d.ts +13 -0
- package/dist/components/FaceSwap/settings.d.ts +300 -0
- package/dist/components/FaceSwap/useFaceTexture.d.ts +35 -0
- package/dist/components/FaceSwap/useLiveFace.d.ts +38 -0
- package/dist/components/FaceSwap/useLiveFaceTexture.d.ts +31 -0
- package/dist/components/FaceTracker/index.d.ts +5 -3
- package/dist/components/FaceWarp3D/FaceWarp3D.d.ts +50 -0
- package/dist/components/FaceWarp3D/index.d.ts +2 -0
- package/dist/components/Faceless/Faceless.d.ts +51 -0
- package/dist/components/Faceless/index.d.ts +2 -0
- package/dist/components/GestureListener/index.d.ts +11 -0
- package/dist/components/HairLock/HairLock.d.ts +39 -0
- package/dist/components/HairLock/index.d.ts +2 -0
- package/dist/components/HairLock/lockGeometry.d.ts +15 -0
- package/dist/components/HandCutout/index.d.ts +35 -0
- package/dist/components/HandEffect/index.d.ts +36 -0
- package/dist/components/HandInstruction/HandGestureHint.d.ts +70 -0
- package/dist/components/HandInstruction/index.d.ts +74 -0
- package/dist/components/HandInstruction/useHandGesture.d.ts +22 -0
- package/dist/components/HandJoints2D/index.d.ts +6 -0
- package/dist/components/HandRig/ForearmOccluder.d.ts +29 -0
- package/dist/components/HandRig/HandAttachment.d.ts +34 -0
- package/dist/components/HandRig/HandNails.d.ts +61 -0
- package/dist/components/HandRig/HandOccluder.d.ts +45 -0
- package/dist/components/HandRig/HandTattoo.d.ts +61 -0
- package/dist/components/HandRig/WristAttachment.d.ts +34 -0
- package/dist/components/HandRig/index.d.ts +127 -0
- package/dist/components/HandRig/useArmMask.d.ts +29 -0
- package/dist/components/HandRig/wristSolve.d.ts +96 -0
- package/dist/components/HandTouch/HandTouch.d.ts +62 -0
- package/dist/components/HandTouch/Touchable.d.ts +36 -0
- package/dist/components/HandTouch/index.d.ts +2 -0
- package/dist/components/HandTracker/index.d.ts +12 -2
- package/dist/components/HandTracking2D/HandVisual.d.ts +12 -0
- package/dist/components/HandTracking2D/index.d.ts +5 -0
- package/dist/components/HandTracking2DController/index.d.ts +5 -0
- package/dist/components/HandTracking3D/index.d.ts +6 -0
- package/dist/components/HeadBinding/index.d.ts +14 -0
- package/dist/components/HeadOccluder/CanonicalHeadFrame.d.ts +22 -0
- package/dist/components/HeadOccluder/Earrings.d.ts +55 -0
- package/dist/components/HeadOccluder/HeadAttachment.d.ts +38 -0
- package/dist/components/HeadOccluder/NeckOccluder.d.ts +67 -0
- package/dist/components/HeadOccluder/earringPlacement.d.ts +31 -0
- package/dist/components/HeadOccluder/headAttachmentPoints.d.ts +69 -0
- package/dist/components/HeadOccluder/index.d.ts +57 -3
- package/dist/components/HeadOccluder/useCanonicalHeadFit.d.ts +36 -0
- package/dist/components/HeadOccluder/useLandmarkPoseFit.d.ts +80 -0
- package/dist/components/HolisticTracker/index.d.ts +69 -0
- package/dist/components/HolisticTracker/settings.d.ts +58 -0
- package/dist/components/HolisticTracker/signals.d.ts +49 -0
- package/dist/components/Instruction/HintStage.d.ts +29 -0
- package/dist/components/Instruction/InstructionCue.d.ts +126 -0
- package/dist/components/Instruction/gestureHold.d.ts +20 -0
- package/dist/components/Instruction/ghost.d.ts +129 -0
- package/dist/components/Instruction/hintBlend.d.ts +19 -0
- package/dist/components/Instruction/hintLook.d.ts +81 -0
- package/dist/components/Instruction/hintLoop.d.ts +36 -0
- package/dist/components/Instruction/index.d.ts +41 -0
- package/dist/components/Instruction/useGhostModel.d.ts +33 -0
- package/dist/components/Instruction/useInstructionHold.d.ts +72 -0
- package/dist/components/IrisEffect/IrisMaterial.d.ts +73 -0
- package/dist/components/IrisEffect/index.d.ts +51 -0
- package/dist/components/IrisEffect/settings.d.ts +117 -0
- package/dist/components/LightObject/index.d.ts +20 -0
- package/dist/components/LipEffect/LipEffect.d.ts +28 -0
- package/dist/components/LipEffect/LipEffectMaterial.d.ts +98 -0
- package/dist/components/LipEffect/LipEffects.d.ts +12 -0
- package/dist/components/LipEffect/defaults.d.ts +51 -0
- package/dist/components/LipEffect/index.d.ts +12 -0
- package/dist/components/LipEffect/lipShading.d.ts +73 -0
- package/dist/components/LipEffect/settings.d.ts +375 -0
- package/dist/components/LipEffect/shader.d.ts +39 -0
- package/dist/components/LipEffect/types.d.ts +141 -0
- package/dist/components/LipEffect/useLipDesignTextures.d.ts +17 -0
- package/dist/components/LipEffect/uvGuide.d.ts +74 -0
- package/dist/components/LookAt/index.d.ts +23 -0
- package/dist/components/Makeup/Blush.d.ts +18 -0
- package/dist/components/Makeup/Brows.d.ts +20 -0
- package/dist/components/Makeup/Contour.d.ts +17 -0
- package/dist/components/Makeup/Eyeliner.d.ts +20 -0
- package/dist/components/Makeup/Eyeshadow.d.ts +20 -0
- package/dist/components/Makeup/Highlighter.d.ts +18 -0
- package/dist/components/Makeup/MakeupDesign.d.ts +37 -0
- package/dist/components/Makeup/MakeupRegion.d.ts +132 -0
- package/dist/components/Makeup/constants.d.ts +44 -0
- package/dist/components/Makeup/design.d.ts +106 -0
- package/dist/components/Makeup/designSamples.d.ts +42 -0
- package/dist/components/Makeup/eyes.d.ts +114 -0
- package/dist/components/Makeup/fields.d.ts +10 -0
- package/dist/components/Makeup/geometry.d.ts +106 -0
- package/dist/components/Makeup/index.d.ts +26 -0
- package/dist/components/Makeup/looks.d.ts +28 -0
- package/dist/components/Makeup/material.d.ts +239 -0
- package/dist/components/Makeup/settings.d.ts +54 -0
- package/dist/components/Makeup/shades.d.ts +143 -0
- package/dist/components/Makeup/shapes.d.ts +27 -0
- package/dist/components/Makeup/skinTone.d.ts +135 -0
- package/dist/components/Makeup/types.d.ts +110 -0
- package/dist/components/Makeup/useMakeupSkinTone.d.ts +40 -0
- package/dist/components/MeshRenderer/index.d.ts +59 -0
- package/dist/components/Necklace/Necklace.d.ts +44 -0
- package/dist/components/Necklace/index.d.ts +1 -0
- package/dist/components/ParticleEmitter/ParticleEmitter.d.ts +69 -0
- package/dist/components/ParticleEmitter/index.d.ts +1 -0
- package/dist/components/PersonCutout/index.d.ts +46 -0
- package/dist/components/PersonCutout/personCutout.d.ts +16 -0
- package/dist/components/PersonCutout/personMask.d.ts +19 -0
- package/dist/components/PersonCutout/useBodyMaskTexture.d.ts +35 -0
- package/dist/components/PerspectiveCamera/index.d.ts +2 -8
- package/dist/components/PinToMesh/index.d.ts +47 -0
- package/dist/components/RenderGroupLayer/index.d.ts +6 -0
- package/dist/components/SceneObjectRenderer/index.d.ts +23 -0
- package/dist/components/Screen2D/ScreenTransformFrame.d.ts +11 -0
- package/dist/components/Screen2D/ScreenTransformHelpers.d.ts +19 -0
- package/dist/components/Screen2D/ScreenTransformInteraction.d.ts +18 -0
- package/dist/components/Screen2D/index.d.ts +5 -0
- package/dist/components/ScreenGlass/defaults.d.ts +3 -0
- package/dist/components/ScreenGlass/index.d.ts +5 -0
- package/dist/components/ScreenGlass/shaders.d.ts +2 -0
- package/dist/components/ScreenGlass/types.d.ts +10 -0
- package/dist/components/ScreenGradient/defaults.d.ts +5 -0
- package/dist/components/ScreenGradient/index.d.ts +5 -0
- package/dist/components/ScreenGradient/shaders.d.ts +2 -0
- package/dist/components/ScreenGradient/types.d.ts +19 -0
- package/dist/components/ScreenImage/ScreenImage.d.ts +4 -0
- package/dist/components/ScreenImage/components/DynamicTextureSync.d.ts +9 -0
- package/dist/components/ScreenImage/components/ScreenImageBody.d.ts +9 -0
- package/dist/components/ScreenImage/components/ScreenImageFrame.d.ts +9 -0
- package/dist/components/ScreenImage/components/ScreenImageTransformFrame.d.ts +9 -0
- package/dist/components/ScreenImage/fit.d.ts +52 -0
- package/dist/components/ScreenImage/index.d.ts +10 -0
- package/dist/components/ScreenImage/materials/ScreenImageBlendMaterial.d.ts +9 -0
- package/dist/components/ScreenImage/materials/ScreenImageMaskMaterial.d.ts +11 -0
- package/dist/components/ScreenImage/materials/ScreenImageMatcap.d.ts +3 -0
- package/dist/components/ScreenImage/source.d.ts +25 -0
- package/dist/components/ScreenImage/types.d.ts +64 -0
- package/dist/components/ScreenImage/utils/ScreenImageConstants.d.ts +9 -0
- package/dist/components/ScreenImage/utils/ScreenImageHelpers.d.ts +4 -0
- package/dist/components/ScreenShape/geometry.d.ts +5 -0
- package/dist/components/ScreenShape/index.d.ts +5 -0
- package/dist/components/ScreenShape/types.d.ts +54 -0
- package/dist/components/ScreenSpaceUI/ScreenTransformGuide.d.ts +15 -0
- package/dist/components/ScreenSpaceUI/ScreenTransformOverlayGuide.d.ts +9 -0
- package/dist/components/ScreenSpaceUI/index.d.ts +3 -0
- package/dist/components/ScreenText/components/ScreenTextBody.d.ts +2 -0
- package/dist/components/ScreenText/components/ScreenTextTransformFrame.d.ts +9 -0
- package/dist/components/ScreenText/constants.d.ts +5 -0
- package/dist/components/ScreenText/index.d.ts +6 -0
- package/dist/components/ScreenText/types.d.ts +31 -0
- package/dist/components/ScreenText/utils/ScreenTextHelpers.d.ts +14 -0
- package/dist/components/ScreenText/utils/ScreenTextMappings.d.ts +17 -0
- package/dist/components/SegmentationOverlay/SegmentationOverlay.d.ts +37 -0
- package/dist/components/SegmentationOverlay/SegmentationOverlayMaterial.d.ts +31 -0
- package/dist/components/SegmentationOverlay/index.d.ts +9 -0
- package/dist/components/SegmentationOverlay/maskTexture.d.ts +23 -0
- package/dist/components/SegmentationOverlay/providers.d.ts +72 -0
- package/dist/components/SegmentationOverlay/settings.d.ts +65 -0
- package/dist/components/SequentialRenderPasses/index.d.ts +6 -0
- package/dist/components/ShoulderOccluder/index.d.ts +46 -0
- package/dist/components/ShoulderOccluder/useCanonicalTorsoFit.d.ts +27 -0
- package/dist/components/SpringSwing/SpringSwing.d.ts +22 -0
- package/dist/components/SpringSwing/index.d.ts +1 -0
- package/dist/components/TextLabel/TextLabel.d.ts +5 -0
- package/dist/components/TextLabel/alignment.d.ts +4 -0
- package/dist/components/TextLabel/bend.d.ts +9 -0
- package/dist/components/TextLabel/canvas/buildTextLabelTexture.d.ts +4 -0
- package/dist/components/TextLabel/canvas/canvasTypography.d.ts +13 -0
- package/dist/components/TextLabel/canvas/drawBackground.d.ts +21 -0
- package/dist/components/TextLabel/canvas/drawEffects.d.ts +34 -0
- package/dist/components/TextLabel/canvas/drawText.d.ts +19 -0
- package/dist/components/TextLabel/components/TextLabelMesh.d.ts +13 -0
- package/dist/components/TextLabel/constants.d.ts +2 -0
- package/dist/components/TextLabel/hooks/useTextLabelTexture.d.ts +7 -0
- package/dist/components/TextLabel/index.d.ts +2 -62
- package/dist/components/TextLabel/layout/measurement.d.ts +8 -0
- package/dist/components/TextLabel/layout/resolveTextLayout.d.ts +25 -0
- package/dist/components/TextLabel/layout/wrapText.d.ts +6 -0
- package/dist/components/TextLabel/types.d.ts +337 -0
- package/dist/components/TrackingAnchor/index.d.ts +18 -2
- package/dist/components/Transform3D/index.d.ts +30 -0
- package/dist/components/XRMediaSurface/index.d.ts +8 -7
- package/dist/components/XRProvider/index.d.ts +16 -2
- package/dist/components/XRScene/index.d.ts +14 -3
- package/dist/components/XRScene/renderOutputTarget.d.ts +12 -0
- package/dist/components/XRViewport/XRViewport.d.ts +11 -0
- package/dist/components/XRViewport/components/HiddenMedia.d.ts +7 -0
- package/dist/components/XRViewport/components/MediaAssetPicker.d.ts +8 -0
- package/dist/components/XRViewport/components/MediaControlStack.d.ts +13 -0
- package/dist/components/XRViewport/components/XRViewportLayers.d.ts +30 -0
- package/dist/components/XRViewport/constants.d.ts +24 -0
- package/dist/components/XRViewport/contexts.d.ts +6 -0
- package/dist/components/XRViewport/hooks/useViewportExternalFaces.d.ts +13 -0
- package/dist/components/XRViewport/hooks/useViewportMediaSource.d.ts +16 -0
- package/dist/components/XRViewport/hooks/useViewportMediaTexture.d.ts +10 -0
- package/dist/components/XRViewport/hooks/useViewportPipeline.d.ts +41 -0
- package/dist/components/XRViewport/hooks/useViewportRenderState.d.ts +47 -0
- package/dist/components/XRViewport/index.d.ts +3 -101
- package/dist/components/XRViewport/layout.d.ts +16 -0
- package/dist/components/XRViewport/slots.d.ts +16 -0
- package/dist/components/XRViewport/types.d.ts +89 -0
- package/dist/components/XRViewport/useViewportSize.d.ts +3 -0
- package/dist/components/index.d.ts +31 -0
- package/dist/components/occluder/skinnedOccluder.d.ts +39 -0
- package/dist/config/index.d.ts +1 -1
- package/dist/constants/index.d.ts +4 -1
- package/dist/context-DTxSQvp4.js +13 -0
- package/dist/context-hA0Rb2Xa.cjs +1 -0
- package/dist/contexts-DQc7zyqT.cjs +1 -0
- package/dist/contexts-Y_FhdnIv.js +667 -0
- package/dist/coordinates/feed.d.ts +52 -0
- package/dist/coordinates/index.d.ts +7 -0
- package/dist/coordinates/side.d.ts +40 -0
- package/dist/coordinates/spaces.d.ts +49 -0
- package/dist/coordinates/viewport.d.ts +22 -0
- package/dist/coordinates/world.d.ts +15 -0
- package/dist/debug-ui/component-editor/index.d.ts +19 -0
- package/dist/debug-ui/default-setting/index.d.ts +37 -0
- package/dist/debug-ui/default-setting.cjs +21 -0
- package/dist/debug-ui/default-setting.js +777 -0
- package/dist/debug-ui/face-mesh-renderer-settings/index.d.ts +8 -0
- package/dist/debug-ui/face-retouch/index.d.ts +11 -0
- package/dist/debug-ui/face-swap-settings/index.d.ts +22 -0
- package/dist/debug-ui/gesture-settings/index.d.ts +14 -0
- package/dist/debug-ui/hand-joints-2d/index.d.ts +6 -0
- package/dist/debug-ui/hand-tracking-2d/index.d.ts +6 -0
- package/dist/debug-ui/hand-tracking-2d-controller/index.d.ts +6 -0
- package/dist/debug-ui/hand-tracking-3d/index.d.ts +6 -0
- package/dist/debug-ui/hierarchy-panel/index.d.ts +30 -0
- package/dist/debug-ui/holistic-tracker-settings/index.d.ts +16 -0
- package/dist/debug-ui/index.d.ts +61 -0
- package/dist/debug-ui/iris-effect-settings/index.d.ts +12 -0
- package/dist/debug-ui/layer-panel/index.d.ts +18 -0
- package/dist/debug-ui/lip-effect-settings/index.d.ts +15 -0
- package/dist/debug-ui/media-source/MediaSourceSwitcher.d.ts +10 -0
- package/dist/debug-ui/media-source/index.d.ts +6 -0
- package/dist/debug-ui/media-source/media-preset.d.ts +21 -0
- package/dist/debug-ui/media-source/session.d.ts +40 -0
- package/dist/debug-ui/media-source.cjs +1 -0
- package/dist/debug-ui/media-source.js +11 -0
- package/dist/debug-ui/mesh-renderer-settings/index.d.ts +6 -0
- package/dist/debug-ui/object-inspector-panel/index.d.ts +26 -0
- package/dist/debug-ui/pin-to-mesh-settings/index.d.ts +10 -0
- package/dist/debug-ui/product-hotspots/index.d.ts +25 -0
- package/dist/debug-ui/scene-editor/context.d.ts +38 -0
- package/dist/debug-ui/scene-editor/hierarchy-panel.d.ts +11 -0
- package/dist/debug-ui/scene-editor/index.d.ts +11 -0
- package/dist/debug-ui/scene-editor/inspector-panel.d.ts +9 -0
- package/dist/debug-ui/scene-editor/store-utils.d.ts +2 -0
- package/dist/debug-ui/scene-editor/viewport-toolbar.d.ts +4 -0
- package/dist/debug-ui/scene-editor/viewport.d.ts +21 -0
- package/dist/debug-ui/screen-glass-settings/index.d.ts +6 -0
- package/dist/debug-ui/screen-gradient-settings/GradientStopsEditor.d.ts +5 -0
- package/dist/debug-ui/screen-gradient-settings/index.d.ts +6 -0
- package/dist/debug-ui/screen-gradient-settings/styles.d.ts +3 -0
- package/dist/debug-ui/screen-image-settings/index.d.ts +11 -0
- package/dist/debug-ui/screen-shape-settings/index.d.ts +6 -0
- package/dist/debug-ui/screen-text-settings/NumberField.d.ts +9 -0
- package/dist/debug-ui/screen-text-settings/ScreenTextSettingsPanel.d.ts +3 -0
- package/dist/debug-ui/screen-text-settings/controls/NestedSection.d.ts +7 -0
- package/dist/debug-ui/screen-text-settings/controls/Section.d.ts +8 -0
- package/dist/debug-ui/screen-text-settings/controls/icons.d.ts +4 -0
- package/dist/debug-ui/screen-text-settings/index.d.ts +2 -0
- package/dist/debug-ui/screen-text-settings/sections/BackgroundSection.d.ts +8 -0
- package/dist/debug-ui/screen-text-settings/sections/ContentSection.d.ts +5 -0
- package/dist/debug-ui/screen-text-settings/sections/EffectsSection.d.ts +25 -0
- package/dist/debug-ui/screen-text-settings/sections/StyleSection.d.ts +5 -0
- package/dist/debug-ui/screen-text-settings/sections/TransformSection.d.ts +5 -0
- package/dist/debug-ui/screen-text-settings/sections/background/BackgroundFillControls.d.ts +2 -0
- package/dist/debug-ui/screen-text-settings/sections/background/BackgroundSizeControls.d.ts +2 -0
- package/dist/debug-ui/screen-text-settings/sections/background/BackgroundStrokeControls.d.ts +2 -0
- package/dist/debug-ui/screen-text-settings/sections/background/types.d.ts +7 -0
- package/dist/debug-ui/screen-text-settings/sections/effects/BendEffectSection.d.ts +4 -0
- package/dist/debug-ui/screen-text-settings/sections/effects/EffectChrome.d.ts +21 -0
- package/dist/debug-ui/screen-text-settings/sections/effects/GlowEffectSection.d.ts +4 -0
- package/dist/debug-ui/screen-text-settings/sections/effects/InnerShadowEffectSection.d.ts +4 -0
- package/dist/debug-ui/screen-text-settings/sections/effects/OutlineEffectSection.d.ts +4 -0
- package/dist/debug-ui/screen-text-settings/sections/effects/ShadowEffectSection.d.ts +4 -0
- package/dist/debug-ui/screen-text-settings/sections/effects/types.d.ts +14 -0
- package/dist/debug-ui/screen-text-settings/settings.d.ts +90 -0
- package/dist/debug-ui/screen-text-settings/styles.d.ts +26 -0
- package/dist/debug-ui/screen-text-settings/transform.d.ts +6 -0
- package/dist/debug-ui/screen-text-settings/types.d.ts +11 -0
- package/dist/debug-ui/segmentation-overlay-settings/index.d.ts +12 -0
- package/dist/debug-ui/settings-panel/index.d.ts +43 -0
- package/dist/debug-ui/shared/MaterialSection.d.ts +13 -0
- package/dist/debug-ui/shared/ScreenTransformSection.d.ts +32 -0
- package/dist/debug-ui/shared/debugWindow.d.ts +51 -0
- package/dist/debug-ui/transform-3d-settings/index.d.ts +11 -0
- package/dist/debug-ui/xr-diagnostics/index.d.ts +26 -0
- package/dist/debug-ui.cjs +10 -0
- package/dist/debug-ui.js +9051 -0
- package/dist/detector-K8aej4MB.js +59 -0
- package/dist/detector-ijypGtse.cjs +1 -0
- package/dist/drawNormalizedCrop-C4KFaRne.cjs +1 -0
- package/dist/drawNormalizedCrop-DG3gtJxf.js +135 -0
- package/dist/entries/all.d.ts +4 -1
- package/dist/entries/core.d.ts +76 -6
- package/dist/entries/face-effects.d.ts +130 -10
- package/dist/entries/instructions.d.ts +48 -0
- package/dist/entries/internal.d.ts +5 -2
- package/dist/entries/low-level.d.ts +104 -6
- package/dist/entries/particles.d.ts +15 -0
- package/dist/entries/product.d.ts +11 -0
- package/dist/entries/scene-object.d.ts +10 -0
- package/dist/entries/tracking.d.ts +110 -2
- package/dist/face-action/index.d.ts +34 -0
- package/dist/face-atlas/attributes.d.ts +30 -0
- package/dist/face-atlas/eyes.d.ts +272 -0
- package/dist/face-atlas/faceAtlas.generated.d.ts +46 -0
- package/dist/face-atlas/glsl/atlasVertex.d.ts +46 -0
- package/dist/face-atlas/glsl/common.d.ts +55 -0
- package/dist/face-atlas/glsl/design.d.ts +49 -0
- package/dist/face-atlas/glsl/eyes.d.ts +73 -0
- package/dist/face-atlas/glsl/finish.d.ts +24 -0
- package/dist/face-atlas/glsl/format.d.ts +4 -0
- package/dist/face-atlas/glsl/index.d.ts +59 -0
- package/dist/face-atlas/glsl/shading.d.ts +15 -0
- package/dist/face-atlas/glsl/shapes.d.ts +66 -0
- package/dist/face-atlas/glsl/sparkle.d.ts +19 -0
- package/dist/face-atlas/glsl/uniforms.d.ts +106 -0
- package/dist/face-atlas/guide.d.ts +51 -0
- package/dist/face-atlas/index.d.ts +25 -0
- package/dist/face-atlas/lead.d.ts +117 -0
- package/dist/face-atlas/madeUpCamera.d.ts +125 -0
- package/dist/face-atlas/masks.d.ts +53 -0
- package/dist/face-atlas/obj.d.ts +69 -0
- package/dist/face-atlas/polylines.d.ts +63 -0
- package/dist/face-atlas/probe/FaceSkinProbe.d.ts +208 -0
- package/dist/face-atlas/probe/__fixtures__/emulate.d.ts +9 -0
- package/dist/face-atlas/probe/__fixtures__/face.d.ts +24 -0
- package/dist/face-atlas/probe/constants.d.ts +137 -0
- package/dist/face-atlas/probe/glsl.d.ts +43 -0
- package/dist/face-atlas/probe/lightFit.d.ts +108 -0
- package/dist/face-atlas/probe/schedule.d.ts +44 -0
- package/dist/face-atlas/probe/selfTest.d.ts +87 -0
- package/dist/face-atlas/probe/stats.d.ts +143 -0
- package/dist/face-atlas/probe/targets.d.ts +70 -0
- package/dist/face-atlas/probe/unwrap.d.ts +76 -0
- package/dist/face-atlas/quality.d.ts +28 -0
- package/dist/face-atlas/regions.d.ts +31 -0
- package/dist/face-atlas/registry.d.ts +252 -0
- package/dist/face-atlas/renderState.d.ts +86 -0
- package/dist/face-atlas/selfOcclusion.d.ts +62 -0
- package/dist/face-atlas/shading.d.ts +406 -0
- package/dist/face-atlas/shapes.d.ts +86 -0
- package/dist/face-atlas/sides.d.ts +41 -0
- package/dist/face-atlas/skinMask.d.ts +35 -0
- package/dist/face-atlas/surface.d.ts +155 -0
- package/dist/face-atlas/topology.d.ts +44 -0
- package/dist/face-attribute-expression/index.d.ts +10 -0
- package/dist/face-character/__fixtures__/faceImageDetections.d.ts +25 -0
- package/dist/face-character/__fixtures__/faceNode.d.ts +22 -0
- package/dist/face-character/bindFaceModel.d.ts +106 -0
- package/dist/face-character/canonicalFace.d.ts +17 -0
- package/dist/face-character/canonicalFaceGeometry.d.ts +11 -0
- package/dist/face-character/canonicalFacePositions.d.ts +7 -0
- package/dist/face-character/driveFaceModel.d.ts +57 -0
- package/dist/face-character/expressionOutputs.d.ts +45 -0
- package/dist/face-character/faceExpressions.d.ts +104 -0
- package/dist/face-character/faceImageLandmarker.d.ts +93 -0
- package/dist/face-character/faceMeshBinding.d.ts +62 -0
- package/dist/face-character/faceMorph.d.ts +77 -0
- package/dist/face-character/faceMorphs.d.ts +46 -0
- package/dist/face-character/facePhoto.d.ts +138 -0
- package/dist/face-character/facePiercings.d.ts +116 -0
- package/dist/face-character/facePin.d.ts +131 -0
- package/dist/face-character/faceReprojection.d.ts +273 -0
- package/dist/face-character/faceReprojector.d.ts +171 -0
- package/dist/face-character/faceRig.d.ts +176 -0
- package/dist/face-character/faceSwapPresence.d.ts +85 -0
- package/dist/face-character/faceTexture.d.ts +169 -0
- package/dist/face-character/faceTextureBaker.d.ts +86 -0
- package/dist/face-character/faceTextureGuide.d.ts +106 -0
- package/dist/face-character/faceTextureStats.d.ts +298 -0
- package/dist/face-character/faceTransfer.d.ts +396 -0
- package/dist/face-character/faceTransferGeometry.d.ts +109 -0
- package/dist/face-character/faceTransferSelfTest.d.ts +94 -0
- package/dist/face-character/faceWarp3D.d.ts +101 -0
- package/dist/face-character/faceless.d.ts +79 -0
- package/dist/face-character/featureWarp.d.ts +28 -0
- package/dist/face-character/liveFaceRegistry.d.ts +370 -0
- package/dist/face-character/liveValue.d.ts +12 -0
- package/dist/face-character/memo.d.ts +15 -0
- package/dist/face-effects.cjs +2267 -195
- package/dist/face-effects.js +14191 -3346
- package/dist/face-expression/index.d.ts +182 -0
- package/dist/face-info/blendshapes.d.ts +3 -0
- package/dist/face-info/derive.d.ts +8 -0
- package/dist/face-info/drawFaceCrop.d.ts +10 -0
- package/dist/face-info/getFaceInfo.d.ts +8 -0
- package/dist/face-info/index.d.ts +8 -0
- package/dist/face-info/landmarks.d.ts +35 -0
- package/dist/face-info/types.d.ts +69 -0
- package/dist/gestures/definitions.d.ts +98 -0
- package/dist/gestures/detector.d.ts +87 -0
- package/dist/gestures/index.d.ts +8 -0
- package/dist/gestures/measures.d.ts +114 -0
- package/dist/gestures/settings.d.ts +49 -0
- package/dist/getFaceInfo-BafgGT27.js +62 -0
- package/dist/getFaceInfo-BzlwHMjX.cjs +1 -0
- package/dist/hand/armFit.d.ts +46 -0
- package/dist/hand/armMask.d.ts +190 -0
- package/dist/hand/forearm.d.ts +114 -0
- package/dist/hand/handCutout.d.ts +23 -0
- package/dist/hand/handCutoutRegistry.d.ts +7 -0
- package/dist/hand/handEffect.d.ts +38 -0
- package/dist/hand/handGestures.d.ts +524 -0
- package/dist/hand/handJoints2d.d.ts +49 -0
- package/dist/hand/handNail.d.ts +73 -0
- package/dist/hand/handPose.d.ts +98 -0
- package/dist/hand/handRigSolver.d.ts +159 -0
- package/dist/hand/handTattoo.d.ts +81 -0
- package/dist/hand/handTouch.d.ts +240 -0
- package/dist/hand/handTracking2d.d.ts +33 -0
- package/dist/hand/handTracking2dController.d.ts +65 -0
- package/dist/hand/handTracking3d.d.ts +52 -0
- package/dist/hand/nailImageMask.d.ts +40 -0
- package/dist/hand/nailMaskFingers.d.ts +23 -0
- package/dist/hand/nailTipRefine.d.ts +37 -0
- package/dist/hand/wrist.d.ts +44 -0
- package/dist/hand/wristFilter.d.ts +44 -0
- package/dist/hooks/faceResults.d.ts +1 -1
- package/dist/hooks/selectors.d.ts +77 -4
- package/dist/hooks/useBodies.d.ts +39 -0
- package/dist/hooks/useCalibrationFaceTracker.d.ts +1 -1
- package/dist/hooks/useFaceAction.d.ts +3 -0
- package/dist/hooks/useFaceAttributeExpression.d.ts +16 -0
- package/dist/hooks/useFaceDetection.d.ts +18 -0
- package/dist/hooks/useFaceInfo.d.ts +19 -0
- package/dist/hooks/useFaceInfos.d.ts +15 -0
- package/dist/hooks/useFaceModelAcquisition.d.ts +38 -0
- package/dist/hooks/useFaceResultReader.d.ts +10 -0
- package/dist/hooks/useFrameCapture.d.ts +18 -0
- package/dist/hooks/useGesture.d.ts +39 -0
- package/dist/hooks/useIrisTracking.d.ts +45 -0
- package/dist/hooks/useMediaRecorder.d.ts +14 -2
- package/dist/hooks/useOwnedTexture.d.ts +6 -0
- package/dist/hooks/useTrackerContext.d.ts +14 -2
- package/dist/hooks/useXRDiagnostics.d.ts +81 -0
- package/dist/hooks/useXRModel.d.ts +12 -0
- package/dist/hooks/useXRSession/facade.d.ts +47 -2
- package/dist/hooks/useXRSession/index.d.ts +2 -2
- package/dist/hooks/useXRSession/reason.d.ts +21 -0
- package/dist/hooks/useXRSession/registry.d.ts +23 -0
- package/dist/hooks/useXRSession/store.d.ts +64 -7
- package/dist/index-BZoBxyLn.js +1103 -0
- package/dist/index-By_LCo2V.cjs +1 -0
- package/dist/index-C-Mryx_u.cjs +21 -0
- package/dist/index-CKRN-xJp.js +3740 -0
- package/dist/index-CUldCMRl.js +188 -0
- package/dist/index-Cyk_VIZE.js +1432 -0
- package/dist/index-D-4w34GO.cjs +1 -0
- package/dist/index-DiIoHK_4.js +442 -0
- package/dist/index-Dv3WnY9n.cjs +46 -0
- package/dist/index-ItufYyHH.cjs +1 -0
- package/dist/index-S3gqudT6.cjs +1 -0
- package/dist/index-Sho4F4it.cjs +1 -0
- package/dist/index-iIQ9jBDb.js +240 -0
- package/dist/index-vr2ichWQ.js +190 -0
- package/dist/instructions.cjs +30 -0
- package/dist/instructions.js +1528 -0
- package/dist/internal-Bb9ZXbpr.cjs +1 -0
- package/dist/{internal-KOKJDxCG.js → internal-Gt1wn6Z3.js} +152 -127
- package/dist/internal.cjs +1 -1
- package/dist/internal.js +16 -9
- package/dist/iris/compute.d.ts +27 -0
- package/dist/iris/index.d.ts +4 -0
- package/dist/iris/lead.d.ts +19 -0
- package/dist/iris/types.d.ts +89 -0
- package/dist/landmarkMask-CvN-L5NT.cjs +1 -0
- package/dist/landmarkMask-DHivVjJm.js +225 -0
- package/dist/landmarks-BEjJXcnE.cjs +1 -0
- package/dist/landmarks-DtCAFV_m.js +76 -0
- package/dist/low-level.cjs +1 -1
- package/dist/low-level.js +1494 -629
- package/dist/main.cjs +1 -1
- package/dist/main.js +1306 -475
- package/dist/material/MaterialFill.d.ts +20 -0
- package/dist/material/MeshMaterial.d.ts +14 -0
- package/dist/material/index.d.ts +2 -0
- package/dist/models/Base/index.d.ts +49 -0
- package/dist/models/Body/index.d.ts +30 -1
- package/dist/models/Face/constants.d.ts +8 -0
- package/dist/models/Face/index.d.ts +5 -12
- package/dist/models/Face/rotation.d.ts +18 -0
- package/dist/models/Hand/GestureTracking.d.ts +1 -1
- package/dist/models/Hand/HandTracking.d.ts +19 -1
- package/dist/models/Holistic/index.d.ts +49 -0
- package/dist/models/Holistic/result.d.ts +68 -0
- package/dist/models/Segmentation/index.d.ts +6 -3
- package/dist/models/SemanticSegmentation/index.d.ts +31 -0
- package/dist/models/SemanticSegmentation/presets.d.ts +28 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/nodeSource.d.ts +9 -0
- package/dist/particles/emission.d.ts +24 -0
- package/dist/particles/eyes.d.ts +24 -0
- package/dist/particles/glsl.d.ts +14 -0
- package/dist/particles/index.d.ts +10 -0
- package/dist/particles/motion.d.ts +42 -0
- package/dist/particles/presets.d.ts +12 -0
- package/dist/particles/ring.d.ts +58 -0
- package/dist/particles/selfTest.d.ts +53 -0
- package/dist/particles/settings.d.ts +127 -0
- package/dist/particles/shapes.d.ts +29 -0
- package/dist/particles/spawner.d.ts +71 -0
- package/dist/particles/system.d.ts +66 -0
- package/dist/particles.cjs +122 -0
- package/dist/particles.js +999 -0
- package/dist/product/ProductDimensions.d.ts +16 -0
- package/dist/product/ProductHotspot.d.ts +16 -0
- package/dist/product/ProductViewer.d.ts +9 -0
- package/dist/product/details.d.ts +53 -0
- package/dist/product/index.d.ts +14 -0
- package/dist/product/loadModelViewer.d.ts +4 -0
- package/dist/product/types.d.ts +71 -0
- package/dist/product/useProductAr.d.ts +37 -0
- package/dist/product/useProductDetails.d.ts +60 -0
- package/dist/product.cjs +1 -0
- package/dist/product.js +414 -0
- package/dist/providers-CEZQgz2s.cjs +62 -0
- package/dist/providers-CRuaD8bi.js +424 -0
- package/dist/quality/XRQualityController.d.ts +25 -0
- package/dist/quality/controller.d.ts +33 -0
- package/dist/quality/index.d.ts +6 -0
- package/dist/quality/types.d.ts +100 -0
- package/dist/quality/useXRQuality.d.ts +28 -0
- package/dist/render/layerStack.d.ts +29 -0
- package/dist/render/renderGroups.d.ts +47 -0
- package/dist/render/renderPasses.d.ts +26 -0
- package/dist/render/sceneBeforeRender.d.ts +12 -0
- package/dist/renderGroups-BADrepA1.cjs +1 -0
- package/dist/renderGroups-CNB99dZ2.js +152 -0
- package/dist/renderPasses-DgxUKn9b.cjs +158 -0
- package/dist/renderPasses-DuapJA6V.js +1290 -0
- package/dist/renderState-CJNmj5jz.js +39 -0
- package/dist/renderState-apSfg4eR.cjs +1 -0
- package/dist/scene-object/index.d.ts +146 -0
- package/dist/scene-object/runtimeRegistry.d.ts +14 -0
- package/dist/scene-object.cjs +1 -0
- package/dist/scene-object.js +40 -0
- package/dist/screen-image/screenImagePresets.d.ts +13 -0
- package/dist/screen-image/screenImageSettings.d.ts +57 -0
- package/dist/screen-text/screenTextPresets.d.ts +6 -0
- package/dist/screen-text/screenTextSettings.d.ts +147 -0
- package/dist/screen2d/coordinates.d.ts +107 -0
- package/dist/screen2d/index.d.ts +7 -0
- package/dist/screen2d/material-runtime.d.ts +32 -0
- package/dist/screen2d/screenTransform.d.ts +60 -0
- package/dist/screen2d/smoothing.d.ts +5 -0
- package/dist/screen2d/texture.d.ts +10 -0
- package/dist/screen2d/transform.d.ts +25 -0
- package/dist/screen2d/types.d.ts +90 -0
- package/dist/segmentation-BOZJdWFC.js +1911 -0
- package/dist/segmentation-J8GoNBvP.cjs +1 -0
- package/dist/segmentation2d/faceMemory.d.ts +28 -0
- package/dist/segmentation2d/faceRegions.d.ts +24 -0
- package/dist/segmentation2d/index.d.ts +9 -0
- package/dist/segmentation2d/maskUv.d.ts +23 -0
- package/dist/segmentation2d/rasterize.d.ts +14 -0
- package/dist/segmentation2d/types.d.ts +52 -0
- package/dist/selectors-BvJepq6H.js +196 -0
- package/dist/selectors-QB2qsaxy.cjs +1 -0
- package/dist/services/MetricsCollector/index.d.ts +7 -1
- package/dist/services/MetricsCollector/utils.d.ts +1 -1
- package/dist/session-BVX859as.cjs +31 -0
- package/dist/session-Cz8aie4K.js +493 -0
- package/dist/settings-BJ7FMBsO.js +111 -0
- package/dist/settings-C63FMBlF.cjs +1 -0
- package/dist/similarityFit-BFqHND2e.cjs +1 -0
- package/dist/similarityFit-Bbz-R8AY.js +91 -0
- package/dist/spring/index.d.ts +2 -0
- package/dist/spring/spring.d.ts +69 -0
- package/dist/spring/swing.d.ts +54 -0
- package/dist/subjects/index.d.ts +2 -0
- package/dist/subjects/select.d.ts +70 -0
- package/dist/subjects/types.d.ts +59 -0
- package/dist/texture/animatedTexture.d.ts +63 -0
- package/dist/texture/animationMath.d.ts +8 -0
- package/dist/texture/gifReader.d.ts +17 -0
- package/dist/texture/gifTextureSource.d.ts +16 -0
- package/dist/texture/sourceResolver.d.ts +30 -0
- package/dist/textures-BVwo9Z7z.js +38 -0
- package/dist/textures-DAfc61zz.cjs +1 -0
- package/dist/tracking/coordinates.d.ts +5 -0
- package/dist/tracking-config/apply.d.ts +57 -0
- package/dist/tracking-config/index.d.ts +7 -0
- package/dist/tracking-config/resolve.d.ts +25 -0
- package/dist/tracking-config/storage.d.ts +8 -0
- package/dist/tracking-config/types.d.ts +106 -0
- package/dist/tracking-config/useXRTrackingConfig.d.ts +38 -0
- package/dist/tracking.cjs +10 -1
- package/dist/tracking.js +1531 -294
- package/dist/trigger-D9L4GPmQ.js +3726 -0
- package/dist/trigger-DZ9vU7jo.cjs +147 -0
- package/dist/types/common.d.ts +11 -1
- package/dist/types/compositor.d.ts +21 -0
- package/dist/types/face.d.ts +21 -14
- package/dist/types/gesture-tracking.d.ts +2 -2
- package/dist/types/hand-tracking.d.ts +19 -2
- package/dist/types/holistic.d.ts +121 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/model.d.ts +22 -2
- package/dist/types/nodes.d.ts +83 -6
- package/dist/types/segmentation.d.ts +26 -0
- package/dist/types/session.d.ts +50 -4
- package/dist/types/tracking.d.ts +8 -2
- package/dist/types/util-types.d.ts +1 -1
- package/dist/useBodies-BYzJpQ4L.js +75 -0
- package/dist/useBodies-Cxpmx6Bb.cjs +1 -0
- package/dist/useFaceInfo-BzEUj2OI.js +75 -0
- package/dist/useFaceInfo-DlLRAVNw.cjs +1 -0
- package/dist/useFaceResultReader-Cc4Qrutf.js +61 -0
- package/dist/useFaceResultReader-D3jOQNKz.cjs +1 -0
- package/dist/useInstructionHold-DOu-RpCM.js +53 -0
- package/dist/useInstructionHold-DwJY1Alr.cjs +1 -0
- package/dist/useIrisTracking-Bz4uLDa7.js +6190 -0
- package/dist/useIrisTracking-DRGWgoNy.cjs +35 -0
- package/dist/useLandmarkPoseFit-Bg-h9BPb.cjs +1 -0
- package/dist/useLandmarkPoseFit-Bmb3h6Mw.js +87 -0
- package/dist/useXRCapabilities-B1KLckqw.js +30 -0
- package/dist/useXRCapabilities-CZlPUBjF.cjs +1 -0
- package/dist/utils/canonicalRigidLandmarks.d.ts +8 -0
- package/dist/utils/drawNormalizedCrop.d.ts +22 -0
- package/dist/utils/fns.d.ts +6 -3
- package/dist/utils/headOccluderFit.d.ts +42 -0
- package/dist/utils/integrity.d.ts +25 -26
- package/dist/utils/landmarkBounds.d.ts +1 -1
- package/dist/utils/logger.d.ts +2 -2
- package/dist/utils/resolveNumFaces.d.ts +13 -0
- package/dist/utils/shoulderOccluderFit.d.ts +38 -0
- package/dist/utils/similarityFit.d.ts +23 -0
- package/dist/utils/updateThrottle.d.ts +2 -0
- package/dist/utils/useStableUniforms.d.ts +18 -0
- package/dist/utils/visionWasm.d.ts +18 -0
- package/dist/uv-BMFt19bg.cjs +1 -0
- package/dist/{index-BD-JWMjE.js → uv-DJU_XfmN.js} +15 -180
- package/dist/x-Co8jPhP0.js +127 -0
- package/dist/x-KC8E4Gaj.cjs +41 -0
- package/docs/MIGRATION_GUIDE.md +589 -0
- package/docs/SDK_DOCUMENTATION.md +1157 -0
- package/docs/api/adaptive-quality.mdx +104 -0
- package/docs/api/asset-lifecycle.mdx +78 -0
- package/docs/api/audio.mdx +36 -0
- package/docs/api/behavior-components.mdx +164 -0
- package/docs/api/body-instructions.mdx +287 -0
- package/docs/api/body-rig.mdx +384 -0
- package/docs/api/body-triggers.mdx +235 -0
- package/docs/api/camera-permission.mdx +142 -0
- package/docs/api/capture-recording.mdx +111 -0
- package/docs/api/coordinate-spaces.mdx +168 -0
- package/docs/api/cross-camera.mdx +89 -0
- package/docs/api/debug-ui-scene-editor.mdx +270 -0
- package/docs/api/diagnostics-calibration.mdx +97 -0
- package/docs/api/external-face-mesh.mdx +231 -0
- package/docs/api/face-actions.mdx +108 -0
- package/docs/api/face-attribute-expression.mdx +87 -0
- package/docs/api/face-binding-anchors.mdx +55 -0
- package/docs/api/face-character.mdx +157 -0
- package/docs/api/face-effects.mdx +28 -0
- package/docs/api/face-expression-controller.mdx +153 -0
- package/docs/api/face-info.mdx +118 -0
- package/docs/api/face-inset.mdx +204 -0
- package/docs/api/face-instructions.mdx +183 -0
- package/docs/api/face-liquify.mdx +196 -0
- package/docs/api/face-mesh.mdx +130 -0
- package/docs/api/face-morph.mdx +117 -0
- package/docs/api/face-painting.mdx +40 -0
- package/docs/api/face-reprojection.mdx +154 -0
- package/docs/api/face-retouching.mdx +81 -0
- package/docs/api/face-swap.mdx +350 -0
- package/docs/api/face-warp-3d.mdx +166 -0
- package/docs/api/faceless.mdx +143 -0
- package/docs/api/gestures.mdx +210 -0
- package/docs/api/hair.mdx +97 -0
- package/docs/api/hand-instructions.mdx +222 -0
- package/docs/api/hand-rig.mdx +661 -0
- package/docs/api/hand-touch.mdx +162 -0
- package/docs/api/head-occluder.mdx +563 -0
- package/docs/api/holistic-tracker.mdx +164 -0
- package/docs/api/instructions.mdx +323 -0
- package/docs/api/iris-tracking.mdx +247 -0
- package/docs/api/made-up-camera.mdx +131 -0
- package/docs/api/makeup-skin-tone.mdx +135 -0
- package/docs/api/makeup.mdx +353 -0
- package/docs/api/material-render-state.mdx +132 -0
- package/docs/api/multi-subject.mdx +185 -0
- package/docs/api/particles.mdx +183 -0
- package/docs/api/person-cutout.mdx +171 -0
- package/docs/api/pin-to-face-mesh.mdx +274 -0
- package/docs/api/product-ar.mdx +114 -0
- package/docs/api/product-details.mdx +78 -0
- package/docs/api/runtime-3d.mdx +316 -0
- package/docs/api/scene-object-store.mdx +213 -0
- package/docs/api/screen-image.mdx +67 -0
- package/docs/api/screen-shape.mdx +64 -0
- package/docs/api/screen-space-coordinates.mdx +75 -0
- package/docs/api/screen-text.mdx +39 -0
- package/docs/api/segmentation-overlay.mdx +301 -0
- package/docs/api/session-lifecycle.mdx +136 -0
- package/docs/api/texture-sources.mdx +74 -0
- package/docs/api/trackers.mdx +65 -0
- package/docs/api/tracking-config.mdx +108 -0
- package/docs/docs.json +121 -0
- package/docs/examples/lip-shaders.mdx +273 -0
- package/docs/examples/scene-object-recipes.mdx +194 -0
- package/docs/guides/face-atlas-template.svg +1 -0
- package/docs/guides/face-atlas-textures.mdx +186 -0
- package/docs/guides/face-texture-template.svg +1 -0
- package/docs/guides/harness-debug-ui.mdx +139 -0
- package/docs/guides/lip-effect-textures.mdx +368 -0
- package/docs/guides/lip-uv-template.png +0 -0
- package/docs/guides/lip-uv-template.svg +1 -0
- package/docs/guides/makeup-design-textures.mdx +109 -0
- package/docs/inspector/hierarchy-panel.mdx +51 -0
- package/docs/inspector/object-inspector-panel.mdx +51 -0
- package/docs/introduction.mdx +120 -0
- package/docs/scene-objects/overview.mdx +127 -0
- package/docs/scene-objects/render-groups.mdx +77 -0
- package/docs/scene-objects/runtime-rendering.mdx +75 -0
- package/docs/texture-api-consumer.md +84 -0
- package/package.json +86 -8
- package/settings.json +1998 -0
- package/dist/DebuggerUI-CEfdddkZ.cjs +0 -1
- package/dist/DebuggerUI-Dgop6Q6o.js +0 -269
- package/dist/components/FaceRetouch/retouchRegions.d.ts +0 -23
- package/dist/components/FaceRetouch/useFaceRetouchRegions.d.ts +0 -12
- package/dist/index-B5J4gzn2.cjs +0 -1
- package/dist/index-BVBVg96G.cjs +0 -1
- package/dist/index-CYMj26Ej.js +0 -1331
- package/dist/index-DtwHElmG.js +0 -157
- package/dist/index-PtFmD6B8.cjs +0 -1
- package/dist/internal-DH5d1Xnq.cjs +0 -1
- package/dist/modules/XRClient/index.d.ts +0 -9
- package/dist/modules/index.d.ts +0 -1
- package/dist/selectors-BHO6TnoC.js +0 -59
- package/dist/selectors-Bub0o3qy.cjs +0 -1
- package/dist/services/ApiService.d.ts +0 -12
- package/dist/types/client.d.ts +0 -3
- package/dist/useFaceResults-cpsSmKKc.js +0 -81
- package/dist/useFaceResults-hVUJYSEY.cjs +0 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Oe=require("./session-BVX859as.cjs"),Hs=require("./debug-ui/default-setting.cjs"),e=require("react/jsx-runtime"),y=require("react"),Le=require("./renderGroups-BADrepA1.cjs"),K=require("./index-C-Mryx_u.cjs"),Ae=require("react-dom"),$e=require("./index-Sho4F4it.cjs"),Gs=require("three"),J=require("./renderPasses-DgxUKn9b.cjs"),Ne=require("./settings-C63FMBlF.cjs"),N=require("./FaceRetouch-D7kryDE6.cjs"),It=require("./landmarkMask-CvN-L5NT.cjs"),_s=require("./index-D-4w34GO.cjs"),Us=require("./index-By_LCo2V.cjs"),Zt=require("@react-three/drei"),Xs=require("@react-three/fiber"),Yt=require("./index-Dv3WnY9n.cjs"),Zs=require("./contexts-DQc7zyqT.cjs"),Ys=require("./selectors-QB2qsaxy.cjs"),qs={position:"fixed",zIndex:2e4,pointerEvents:"none"},kt={width:"100%",maxHeight:"none",border:"none",borderRadius:0,background:"transparent",boxShadow:"none",backdropFilter:"none",WebkitBackdropFilter:"none",overflow:"visible"},js=({docked:t=!1,initialPosition:s,position:l,onPositionChange:n})=>{const[a,d]=y.useState(s),r=l??a,o=y.useRef(null),h=y.useRef(n);return h.current=n,y.useEffect(()=>{if(t)return;const p=g=>{var j;const i=o.current;if(!i)return;const u={x:Math.max(8,g.clientX-i.x),y:Math.max(8,g.clientY-i.y)};d(u),(j=h.current)==null||j.call(h,u)},f=()=>{const g=o.current;g&&(o.current=null,g.selectNone&&document.body.classList.remove("select-none"))};return window.addEventListener("pointermove",p),window.addEventListener("pointerup",f),()=>{window.removeEventListener("pointermove",p),window.removeEventListener("pointerup",f)}},[t]),{docked:t,position:r,startDrag:(p,{capture:f=!0,selectNone:g=!0}={})=>{if(t)return;const i=p.currentTarget.getBoundingClientRect();o.current={x:p.clientX-i.left,y:p.clientY-i.top,selectNone:g},g&&document.body.classList.add("select-none"),f&&p.currentTarget.setPointerCapture(p.pointerId)},place:p=>t?p:typeof document>"u"?null:Ae.createPortal(e.jsx("div",{style:{...qs,left:r.x,top:r.y},children:p}),document.body)}},qt={pointerEvents:"auto",width:306,maxHeight:"calc(100vh - 124px)",borderRadius:16,border:"1px solid rgba(255,255,255,0.12)",background:"rgba(8, 15, 28, 0.58)",boxShadow:"0 16px 36px rgba(0,0,0,0.28)",backdropFilter:"blur(20px) saturate(1.1)",WebkitBackdropFilter:"blur(20px) saturate(1.1)",color:"#f8fafc",overflow:"hidden"},Js=306,Qs=()=>({x:typeof window>"u"?14:window.innerWidth-(Js+20),y:30}),en={display:"grid",gap:7,padding:"7px 8px 8px",borderBottom:"1px solid rgba(255,255,255,0.08)",background:"rgba(8, 15, 28, 0.88)"},ms={display:"grid",gridTemplateColumns:"16px 22px minmax(0, 1fr) 28px",alignItems:"center",gap:7},tn={...ms,gridTemplateColumns:"22px minmax(0, 1fr) 28px"},sn={display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:11,fontWeight:700},nn={width:"100%",height:24,borderRadius:7,border:"1px solid rgba(125,211,252,0.46)",background:"rgba(15,23,42,0.82)",color:"#f8fafc",fontSize:11,fontWeight:700,outline:"none",padding:"0 7px",boxSizing:"border-box"},ln={display:"flex",width:20,height:20,alignItems:"center",justifyContent:"center",borderRadius:7,background:"rgba(255,255,255,0.08)",border:"1px solid rgba(255,255,255,0.08)",color:"#e2e8f0"},on={width:16,height:18,display:"flex",alignItems:"center",justifyContent:"center",cursor:"grab",color:"rgba(148,163,184,0.82)"},Jt={display:"grid",gap:8,padding:8,overflowY:"auto",maxHeight:"calc(100vh - 215px)"},rn={display:"grid",gridTemplateColumns:"minmax(0, 1fr) 30px",gap:6},an={width:"100%",height:26,borderRadius:8,border:"1px solid rgba(255,255,255,0.12)",background:"rgba(56,189,248,0.16)",color:"#e0f2fe",fontSize:10.5,fontWeight:700,cursor:"pointer"},dn=t=>({display:"inline-flex",alignItems:"center",justifyContent:"center",width:30,height:26,borderRadius:8,border:"1px solid rgba(255,255,255,0.10)",color:t?"#e0f2fe":"rgba(148,163,184,0.72)",background:t?"rgba(56,189,248,0.16)":"rgba(255,255,255,0.04)",cursor:"pointer",padding:0}),cn={display:"inline-flex",alignItems:"center",justifyContent:"center",width:28,height:24,borderRadius:8,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(255,255,255,0.05)",color:"#e2e8f0",cursor:"pointer",padding:0},pn={width:"fit-content",maxWidth:"100%",height:24,borderRadius:7,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(255,255,255,0.07)",color:"#e2e8f0",fontSize:10,padding:"0 8px"},hn=()=>e.jsx("svg",{width:"11",height:"15",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M8 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM8 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM8 18a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM16 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM16 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM16 18a2 2 0 1 1-4 0 2 2 0 0 1 4 0z"})}),xn=()=>e.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"m12 2 8 4.6v10.8L12 22l-8-4.6V6.6L12 2zm0 2.3L6.3 7.6 12 10.9l5.7-3.3L12 4.3zM6 9.3v6.9l5 2.9v-6.9L6 9.3zm12 0-5 2.9v6.9l5-2.9V9.3z"})}),un=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 5c5 0 8.7 4.2 10 7-1.3 2.8-5 7-10 7s-8.7-4.2-10-7c1.3-2.8 5-7 10-7zm0 2c-3.6 0-6.4 2.7-7.7 5 1.3 2.3 4.1 5 7.7 5s6.4-2.7 7.7-5C18.4 9.7 15.6 7 12 7zm0 2.5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5z"})}),gn=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M3.3 2 22 20.7 20.7 22l-3.1-3.1A10.5 10.5 0 0 1 12 20c-5 0-8.7-4.2-10-7a16.4 16.4 0 0 1 4-4.9L2 3.3 3.3 2zm4.1 7.5A14.4 14.4 0 0 0 4.3 13c1.3 2.3 4.1 5 7.7 5 1.5 0 2.8-.5 4-1.2l-2.1-2.1A2.5 2.5 0 0 1 9.3 10L7.4 9.5zM12 4c5 0 8.7 4.2 10 7a15 15 0 0 1-3.2 4.2l-1.4-1.4A13 13 0 0 0 19.7 11C18.4 8.7 15.6 6 12 6c-.9 0-1.8.2-2.6.5L7.8 4.9C9.1 4.3 10.5 4 12 4z"})}),yn=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M7 10h10v2H7v-2zm0 4h10v2H7v-2z"})}),bn=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M11 5h2v6h6v2h-6v6h-2v-6H5v-2h6V5z"})}),fn=async t=>{var l;if((l=navigator.clipboard)!=null&&l.writeText){await navigator.clipboard.writeText(t);return}const s=document.createElement("textarea");s.value=t,s.setAttribute("readonly",""),s.style.position="fixed",s.style.left="-9999px",document.body.appendChild(s),s.select(),document.execCommand("copy"),document.body.removeChild(s)},Ct=({children:t,copyConfig:s,docked:l=!1,initialPosition:n,layer:a="Default Layer",objectId:d,objectName:r,onObjectNameChange:o,onPositionChange:h,onVisibleChange:x,position:c,title:p,visible:f})=>{const{startDrag:g,place:i}=js({docked:l,initialPosition:n??Qs,position:c,onPositionChange:h}),[u,j]=y.useState(!1),[w,v]=y.useState(!0),M=r??p??d??"Scene Object",[U,b]=y.useState(!1),[F,E]=y.useState(M);y.useEffect(()=>{U||E(M)},[M,U]);const P=async()=>{try{await fn(JSON.stringify(s,null,2)),j(!0),window.setTimeout(()=>j(!1),1200)}catch{j(!1)}},le=()=>{const L=F.trim();if(b(!1),!o||!L||L===M){E(M);return}o(L)},ae=()=>{E(M),b(!1)};return i(e.jsxs("div",{style:l?{...qt,...kt}:qt,children:[e.jsxs("div",{style:en,children:[e.jsxs("div",{style:l?tn:ms,children:[!l&&e.jsx("div",{onPointerDown:g,style:on,children:e.jsx(hn,{})}),e.jsx("span",{style:ln,children:e.jsx(xn,{})}),U?e.jsx("input",{autoFocus:!0,"aria-label":"Object Name",style:nn,value:F,onBlur:le,onChange:L=>E(L.currentTarget.value),onKeyDown:L=>{L.key==="Enter"&&le(),L.key==="Escape"&&ae()}}):e.jsx("button",{type:"button",style:{...sn,padding:0,border:0,background:"transparent",color:"inherit",cursor:o?"text":"default",textAlign:"left"},onDoubleClick:()=>{o&&b(!0)},children:M}),e.jsx("button",{type:"button","aria-label":w?"Fold Inspector":"Expand Inspector",title:w?"Fold Inspector":"Expand Inspector",style:cn,onClick:()=>v(L=>!L),children:w?e.jsx(yn,{}):e.jsx(bn,{})})]}),w?e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",style:pn,children:a}),e.jsxs("div",{style:rn,children:[e.jsx("button",{type:"button",style:an,onClick:P,children:u?"Copied Config":"Copy Config"}),e.jsx("button",{type:"button",style:dn(f),onClick:()=>x(!f),children:f?e.jsx(un,{}):e.jsx(gn,{})})]})]}):null]}),w?e.jsx("div",{style:l?{...Jt,maxHeight:"none"}:Jt,children:t}):null]}))},jn={clean:{fontWeight:400,strokeLayers:[],shadowLayers:[]},sticker:{color:"#101828",fontWeight:800,strokeLayers:[{color:"#ffffff",width:26,opacity:1},{color:"#101828",width:10,opacity:1}],shadowLayers:[]},"shadow-pop":{color:"#fff8df",fontWeight:800,strokeLayers:[{color:"#101828",width:12,opacity:1}],shadowLayers:[{color:"#0f172a",blur:0,offsetX:18,offsetY:18,opacity:.9},{color:"#0f172a",blur:10,offsetX:10,offsetY:10,opacity:.35}]},neon:{color:"#ffffff",fontWeight:700,strokeLayers:[{color:"#9be7ff",width:8,opacity:.9}],shadowLayers:[{color:"#38bdf8",blur:18,opacity:.8},{color:"#0ea5e9",blur:40,opacity:.7},{color:"#7c3aed",blur:70,opacity:.5}]},editorial:{color:"#f8fafc",fontWeight:500,strokeLayers:[{color:"#0f172a",width:4,opacity:.5}],shadowLayers:[]},"comic-burst":{color:"#fff06a",fontWeight:900,strokeLayers:[{color:"#ef4444",width:28,opacity:1},{color:"#111827",width:12,opacity:1}],shadowLayers:[{color:"#111827",blur:0,offsetX:12,offsetY:12,opacity:.65}]},"ice-outline":{color:"#eff8ff",fontWeight:800,strokeLayers:[{color:"#dbeafe",width:16,opacity:1},{color:"#1d4ed8",width:6,opacity:.95}],shadowLayers:[{color:"#38bdf8",blur:24,opacity:.32}]},"sunset-glow":{color:"#fff7ed",fontWeight:800,strokeLayers:[{color:"#fb7185",width:8,opacity:.95}],shadowLayers:[{color:"#fb7185",blur:18,opacity:.7},{color:"#f97316",blur:42,opacity:.55},{color:"#facc15",blur:70,opacity:.28}]},cutout:{color:"#fffaf0",fontWeight:800,strokeLayers:[{color:"#0f172a",width:6,opacity:.9}],shadowLayers:[{color:"#0f172a",blur:0,offsetX:8,offsetY:8,opacity:.95},{color:"#0f172a",blur:0,offsetX:16,offsetY:16,opacity:.4}]},"badge-arc":{color:"#ffffff",fontWeight:900,outlineEnabled:!0,shadowEnabled:!0,glowEnabled:!1,innerShadowEnabled:!1,bendEnabled:!0,bend:{preset:"arc",strength:100},strokeLayers:[{color:"#0b1020",width:24,opacity:1},{color:"#ffffff",width:8,opacity:1}],shadowLayers:[{color:"#020617",blur:8,offset:10,angle:-45,feather:.2,opacity:.65}]},"chrome-bulge":{color:"#f8fafc",fontWeight:900,outlineEnabled:!0,shadowEnabled:!1,glowEnabled:!0,innerShadowEnabled:!0,bendEnabled:!0,bend:{preset:"bulge",strength:100},glow:{color:"#dbeafe",style:"contoured",intensity:.55,range:.35,horizontalAngle:0,verticalAngle:0},innerShadow:{color:"#64748b",opacity:.9,offset:16,angle:-45,feather:.25},strokeLayers:[{color:"#0f172a",width:5,opacity:.9}],shadowLayers:[]},"retro-wave":{color:"#fffbeb",fontWeight:900,outlineEnabled:!0,shadowEnabled:!0,glowEnabled:!0,innerShadowEnabled:!1,bendEnabled:!0,bend:{preset:"wave",strength:100},glow:{color:"#fb7185",style:"outward",intensity:.65,range:.55,horizontalAngle:0,verticalAngle:0},strokeLayers:[{color:"#fb7185",width:12,opacity:1},{color:"#7c2d12",width:5,opacity:.9}],shadowLayers:[{color:"#7c2d12",blur:4,offset:14,angle:45,feather:.1,opacity:.75}]},"flag-pop":{color:"#ffffff",fontWeight:900,outlineEnabled:!0,shadowEnabled:!0,glowEnabled:!0,innerShadowEnabled:!1,bendEnabled:!0,bend:{preset:"flag",strength:100},glow:{color:"#38bdf8",style:"outward",intensity:.5,range:.45,horizontalAngle:.15,verticalAngle:-.1},strokeLayers:[{color:"#fde047",width:18,opacity:1},{color:"#111827",width:7,opacity:1}],shadowLayers:[{color:"#111827",blur:0,offset:14,angle:35,feather:0,opacity:.75}]},"fisheye-poster":{color:"#fff7ed",fontWeight:900,outlineEnabled:!0,shadowEnabled:!0,glowEnabled:!1,innerShadowEnabled:!0,bendEnabled:!0,bend:{preset:"fisheye",strength:100},innerShadow:{color:"#92400e",opacity:.55,offset:10,angle:-45,feather:.15},strokeLayers:[{color:"#020617",width:24,opacity:1},{color:"#f97316",width:8,opacity:.9}],shadowLayers:[{color:"#020617",blur:0,offset:12,angle:40,feather:0,opacity:.8}]}},mn=[{label:"Space Grotesk",value:'"Space Grotesk", sans-serif'},{label:"Bebas Neue",value:'"Bebas Neue", sans-serif'},{label:"DM Serif Display",value:'"DM Serif Display", serif'},{label:"Caveat",value:'"Caveat", cursive'}],Sn=["clean","sticker","shadow-pop","neon","editorial","comic-burst","ice-outline","sunset-glow","cutout","badge-arc","chrome-bulge","retro-wave","flag-pop","fisheye-poster"],vn={clean:"NONE",sticker:"sticker","shadow-pop":"shadow-pop",neon:"neon",editorial:"editorial","comic-burst":"comic-burst","ice-outline":"ice-outline","sunset-glow":"sunset-glow",cutout:"cutout","badge-arc":"badge-arc","chrome-bulge":"chrome-bulge","retro-wave":"retro-wave","flag-pop":"flag-pop","fisheye-poster":"fisheye-poster"},wn=()=>({color:"#000000",opacity:1,width:30}),Bt=()=>({color:"#000000",opacity:1,offset:10,angle:-45,feather:0,blur:0,offsetX:7.071,offsetY:-7.071}),Ss=()=>({color:"#ffffff",style:"outward",intensity:.5,range:.5,horizontalAngle:0,verticalAngle:0}),vs=()=>({preset:"arc",strength:100}),kn=[{label:"Arc",value:"arc"},{label:"Arc Lower",value:"arc-lower"},{label:"Arc Upper",value:"arc-upper"},{label:"Arch",value:"arch"},{label:"Bulge",value:"bulge"},{label:"Shell Lower",value:"shell-lower"},{label:"Shell Upper",value:"shell-upper"},{label:"Flag",value:"flag"},{label:"Wave",value:"wave"},{label:"Fish",value:"fish"},{label:"Rise",value:"rise"},{label:"Fisheye",value:"fisheye"},{label:"Inflate",value:"inflate"},{label:"Squeeze",value:"squeeze"},{label:"Twist",value:"twist"}],Cn=(t,s)=>{const l=jn[s],n=l.strokeLayers??t.style.strokeLayers,a=l.shadowLayers??t.style.shadowLayers;return{...t,textArtPreset:s,style:{...t.style,...l,fontWeight:t.style.bold?"bold":l.fontWeight??t.style.fontWeight,background:{...t.style.background,...l.background},outlineEnabled:l.strokeLayers?l.strokeLayers.length>0:t.style.outlineEnabled,shadowEnabled:l.shadowLayers?l.shadowLayers.length>0:t.style.shadowEnabled,strokeLayers:n,shadowLayers:a}}},ws=(t,s)=>({enabled:(s==null?void 0:s.enabled)??t.enabled,showGuides:(s==null?void 0:s.showTransformGuides)??t.showTransformGuides,coordinateSpace:t.coordinateSpace,canvasSize:t.canvasSize,position:(s==null?void 0:s.position)??t.position,size:(s==null?void 0:s.size)??t.size,rotation:(s==null?void 0:s.rotation)??t.rotation,scale2D:s==null?void 0:s.scale2D,referencePixelsPerUnit:s==null?void 0:s.referencePixelsPerUnit,pivot:(s==null?void 0:s.pivot)??t.pivot,renderOrder:(s==null?void 0:s.renderOrder)??t.renderOrder,overlay:(s==null?void 0:s.overlay)??t.overlay,visible:(s==null?void 0:s.visible)??t.visible}),Rn=(t,s)=>({...s,enabled:t.enabled,showTransformGuides:t.showGuides,coordinateSpace:t.coordinateSpace,canvasSize:t.canvasSize,position:t.position,size:t.size,rotation:t.rotation,pivot:t.pivot,renderOrder:t.renderOrder,overlay:t.overlay,visible:t.visible}),ks=(t,s)=>({...$e.DEFAULT_SCREEN_TRANSFORM_2D,...s,enabled:t.enabled,showTransformGuides:t.showGuides,position:t.position,size:t.size,rotation:t.rotation,scale2D:t.scale2D??(s==null?void 0:s.scale2D)??$e.DEFAULT_SCREEN_TRANSFORM_2D.scale2D,referencePixelsPerUnit:t.referencePixelsPerUnit??(s==null?void 0:s.referencePixelsPerUnit)??$e.DEFAULT_SCREEN_TRANSFORM_2D.referencePixelsPerUnit,pivot:t.pivot,renderOrder:t.renderOrder,overlay:t.overlay,visible:t.visible}),In={display:"flex",width:18,height:18,alignItems:"center",justifyContent:"center",borderRadius:6,background:"rgba(255,255,255,0.08)",border:"1px solid rgba(255,255,255,0.08)",color:"#e2e8f0",flex:"0 0 auto"},En={borderRadius:12,border:"1px solid rgba(255,255,255,0.08)",background:"rgba(255,255,255,0.03)",overflow:"hidden"},Tn={display:"flex",alignItems:"center",gap:7,padding:"6px 7px"},zn={display:"flex",alignItems:"center",gap:6,fontSize:11,fontWeight:500,flex:"1 1 auto",minWidth:0},Mn={width:28,height:16,borderRadius:999,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(255,255,255,0.08)",padding:2,display:"flex",alignItems:"center",cursor:"pointer",flex:"0 0 auto"},Fn=t=>({width:10,height:10,borderRadius:999,background:t?"#f8fafc":"rgba(148,163,184,0.7)",transform:t?"translateX(12px)":"translateX(0)",transition:"transform 140ms ease, background 140ms ease"}),Wn={display:"grid",gap:7,padding:"0 7px 7px"},me={display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:6},k={display:"flex",flexDirection:"column",gap:4},ee={...k,gridColumn:"1 / -1"},Ln={gridColumn:"1 / -1",display:"grid",gap:6,padding:"8px 8px 2px 12px",marginTop:-2,borderLeft:"1px solid rgba(255,255,255,0.10)"},$n={display:"flex",alignItems:"center",justifyContent:"space-between",gap:6,width:"100%",padding:0,border:0,background:"transparent",fontSize:9,color:"rgba(226,232,240,0.64)",textTransform:"uppercase",cursor:"pointer"},Nn={display:"flex",alignItems:"center",gap:6,minWidth:0},On={width:16,height:16,borderRadius:999,display:"inline-flex",alignItems:"center",justifyContent:"center",background:"rgba(255,255,255,0.06)",color:"rgba(226,232,240,0.72)",flex:"0 0 auto"},S={fontSize:9,color:"rgba(226,232,240,0.72)"},Kt={width:"100%",height:24,borderRadius:7,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(15,23,42,0.68)",color:"#f8fafc",fontSize:10.5,outline:"none",padding:"0 7px",boxSizing:"border-box"},An={...Kt,height:72,padding:"7px",resize:"vertical",lineHeight:1.35,fontFamily:"inherit"},je={...Kt,padding:2,cursor:"pointer"},xe={...Kt,appearance:"none"},Pn={opacity:.45,cursor:"not-allowed"},ue={display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,minHeight:24},gt={width:16,height:16},Dn={display:"grid",gridTemplateColumns:"1.25fr repeat(4, 1fr)",gap:4,width:"100%"},Je=t=>({height:26,borderRadius:8,border:t?"1px solid rgba(125,211,252,0.72)":"1px solid rgba(255,255,255,0.10)",background:t?"rgba(56,189,248,0.20)":"rgba(255,255,255,0.05)",color:t?"#f0f9ff":"#e2e8f0",fontSize:10.5,fontWeight:700,cursor:"pointer",padding:"0 6px"}),wt={display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:8,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(255,255,255,0.05)",color:"#e2e8f0",cursor:"pointer",padding:0,flex:"0 0 auto"};function Bn({label:t,icon:s,open:l,onToggle:n,children:a}){return e.jsxs("div",{style:En,children:[e.jsxs("div",{style:Tn,children:[e.jsx("button",{type:"button",onClick:n,style:Mn,children:e.jsx("div",{style:Fn(l)})}),e.jsxs("div",{style:zn,children:[e.jsx("span",{style:In,children:s}),e.jsx("span",{children:t})]})]}),l?e.jsx("div",{style:Wn,children:a}):null]})}const Qt=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M4 6V4h16v2h-7v14h-2V6H4z"})}),es=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 3a9 9 0 1 0 0 18h1.2a2.8 2.8 0 0 0 0-5.6h-.4a1.8 1.8 0 0 1 0-3.6H16a5 5 0 0 0 0-10h-4zm-4 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm1 5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm6-7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"})}),Vn=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M4 4h6v2H7.4l3.3 3.3-1.4 1.4L6 7.4V10H4V4zm10 0h6v6h-2V7.4l-3.3 3.3-1.4-1.4L16.6 6H14V4zM9.3 13.3l1.4 1.4L7.4 18H10v2H4v-6h2v2.6l3.3-3.3zm5.4 0 3.3 3.3V14h2v6h-6v-2h2.6l-3.3-3.3 1.4-1.4z"})}),Kn=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M7 5h10v2H9v6h8v2H7V5zm4 8h6v6h-6v-2h4v-2h-4v-2z"})});function Hn({value:t,onChange:s}){return e.jsxs("div",{style:me,children:[e.jsxs("label",{style:ee,children:[e.jsx("span",{style:S,children:"Text"}),e.jsx("textarea",{style:An,value:t.content.text,onChange:l=>s(n=>({...n,content:{...n.content,text:l.target.value}}))})]}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Text Art"}),e.jsx("select",{style:xe,value:t.textArtPreset,onChange:l=>s(n=>Cn(n,l.target.value)),children:Sn.map(l=>e.jsx("option",{value:l,children:vn[l]},l))})]}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Font"}),e.jsx("select",{style:xe,value:t.style.fontFamily,onChange:l=>s(n=>({...n,style:{...n.style,fontFamily:l.target.value}})),children:mn.map(l=>e.jsx("option",{value:l.value,children:l.label},l.value))})]})]})}const Gn={width:"100%",boxSizing:"border-box",border:"1px solid rgba(148,163,184,0.22)",borderRadius:8,background:"rgba(15,23,42,0.8)",color:"#e2e8f0",padding:"7px 9px"},_n=t=>/^-?\d*(\.\d*)?$/.test(t),z=({value:t,onChange:s,step:l=1,min:n,max:a,disabled:d=!1})=>{const[r,o]=y.useState(String(t));y.useEffect(()=>o(String(t)),[t]);const h=x=>Math.min(typeof a=="number"?a:1/0,Math.max(typeof n=="number"?n:-1/0,x));return e.jsx("input",{type:"text",inputMode:"decimal",pattern:"-?[0-9]*[.,]?[0-9]*",style:{...Gn,...d?{cursor:"not-allowed",opacity:.45}:{}},value:r,disabled:d,onChange:x=>{if(d)return;const c=x.target.value;if(!_n(c)||(o(c),["","-",".","-."].includes(c)))return;const p=Number(c);Number.isNaN(p)||s(h(p))},onBlur:()=>{if(d)return;const x=Number(r);if(Number.isNaN(x))return o(String(t));const c=h(x);o(String(c)),s(c)},onKeyDown:x=>{if(d||x.key!=="ArrowUp"&&x.key!=="ArrowDown")return;x.preventDefault();const c=x.shiftKey?l*10:x.altKey?l/10:l,p=x.key==="ArrowUp"?t+c:t-c;s(h(Number.isInteger(p)?p:Number(p.toFixed(6))))}})};function Un({background:t,onChange:s}){return e.jsxs(e.Fragment,{children:[e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Fill Mode"}),e.jsxs("select",{style:xe,value:t.fillMode,onChange:l=>s(n=>({...n,style:{...n.style,background:{...n.style.background,fillMode:l.target.value}}})),children:[e.jsx("option",{value:"solid",children:"solid"}),e.jsx("option",{value:"gradient",children:"gradient"})]})]}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Fill Area"}),e.jsxs("select",{style:xe,value:t.fit,onChange:l=>s(n=>({...n,style:{...n.style,background:{...n.style.background,fit:l.target.value}}})),children:[e.jsx("option",{value:"text",children:"text"}),e.jsx("option",{value:"full",children:"full"})]})]}),t.fillMode==="solid"?e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Background Color"}),e.jsx("input",{style:je,type:"color",value:t.color,onChange:l=>s(n=>({...n,style:{...n.style,background:{...n.style.background,color:l.target.value}}}))})]}):e.jsx("div",{style:{gridColumn:"1 / -1",display:"grid",gap:6},children:t.gradientStops.slice(0,3).map((l,n)=>e.jsxs("label",{style:k,children:[e.jsxs("span",{style:S,children:["Gradient ",n+1]}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 60px",gap:4},children:[e.jsx("input",{style:je,type:"color",value:l.color,onChange:a=>s(d=>{const r=[...d.style.background.gradientStops];return r[n]={...r[n],color:a.target.value},{...d,style:{...d.style,background:{...d.style.background,gradientStops:r}}}})}),e.jsx(z,{value:l.position,min:0,max:1,step:.05,onChange:a=>s(d=>{const r=[...d.style.background.gradientStops];return r[n]={...r[n],position:a},{...d,style:{...d.style,background:{...d.style.background,gradientStops:r}}}})})]})]},n))}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Background Opacity"}),e.jsx(z,{value:t.opacity,min:0,max:1,step:.05,onChange:l=>s(n=>({...n,style:{...n.style,background:{...n.style.background,opacity:l}}}))})]}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Corner Radius"}),e.jsx(z,{value:t.borderRadius,min:0,max:200,step:2,onChange:l=>s(n=>({...n,style:{...n.style,background:{...n.style.background,borderRadius:l}}}))})]})]})}function Xn({background:t,onChange:s}){return e.jsxs(e.Fragment,{children:[e.jsx("label",{style:ee,children:e.jsxs("div",{style:ue,children:[e.jsx("span",{style:S,children:"Auto Width / Height"}),e.jsx("input",{type:"checkbox",style:gt,checked:t.autoSize,onChange:l=>s(n=>({...n,style:{...n.style,background:{...n.style.background,autoSize:l.target.checked}}}))})]})}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Width"}),e.jsx(z,{value:t.width,min:32,max:1024,step:8,disabled:t.autoSize,onChange:l=>s(n=>({...n,style:{...n.style,background:{...n.style.background,width:l}}}))})]}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Height"}),e.jsx(z,{value:t.height,min:32,max:1024,step:8,disabled:t.autoSize,onChange:l=>s(n=>({...n,style:{...n.style,background:{...n.style.background,height:l}}}))})]})]})}function Zn({background:t,onChange:s}){return e.jsxs(e.Fragment,{children:[e.jsx("label",{style:ee,children:e.jsxs("div",{style:ue,children:[e.jsx("span",{style:S,children:"Background Stroke"}),e.jsx("input",{type:"checkbox",style:gt,checked:t.borderEnabled,onChange:l=>s(n=>({...n,style:{...n.style,background:{...n.style.background,borderEnabled:l.target.checked,borderColor:l.target.checked&&n.style.background.borderColor==="transparent"?"#ffffff":n.style.background.borderColor,borderWidth:l.target.checked?Math.max(n.style.background.borderWidth,2):n.style.background.borderWidth}}}))})]})}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Stroke Color"}),e.jsx("input",{style:{...je,...t.borderEnabled?{}:Pn},type:"color",value:t.borderColor,disabled:!t.borderEnabled,onChange:l=>s(n=>({...n,style:{...n.style,background:{...n.style.background,borderColor:l.target.value}}}))})]}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Stroke Width"}),e.jsx(z,{value:t.borderWidth,min:0,max:64,step:1,disabled:!t.borderEnabled,onChange:l=>s(n=>({...n,style:{...n.style,background:{...n.style.background,borderWidth:l}}}))})]})]})}const Cs={gridColumn:"1 / -1",display:"grid",gap:6,padding:"8px",borderRadius:10,border:"1px solid rgba(255,255,255,0.08)",background:"rgba(255,255,255,0.03)"};function yt({checked:t,label:s,onChange:l}){return e.jsx("label",{style:ee,children:e.jsxs("div",{style:ue,children:[e.jsx("span",{style:S,children:s}),e.jsx("input",{type:"checkbox",style:gt,checked:t,onChange:n=>l(n.target.checked)})]})})}function Xe({children:t,label:s,open:l,setOpen:n}){return e.jsxs("div",{style:Ln,children:[e.jsxs("button",{type:"button",style:$n,onClick:()=>n(a=>!a),children:[e.jsxs("span",{style:Nn,children:[e.jsx(Kn,{}),e.jsx("span",{children:s})]}),e.jsx("span",{style:On,children:l?"−":"+"})]}),l?t:null]})}function Yn({value:t,onChange:s,open:l,setOpen:n}){const a=t.style.background;return e.jsxs(e.Fragment,{children:[e.jsx("label",{style:ee,children:e.jsxs("div",{style:ue,children:[e.jsx("span",{style:S,children:"Background Enabled"}),e.jsx("input",{type:"checkbox",style:gt,checked:a.enabled,onChange:d=>s(r=>({...r,style:{...r.style,background:{...r.style.background,enabled:d.target.checked}}}))})]})}),a.enabled?e.jsx(Xe,{label:"Background Settings",open:l,setOpen:n,children:e.jsxs(e.Fragment,{children:[e.jsx(Un,{background:a,onChange:s}),e.jsx(Zn,{background:a,onChange:s}),e.jsx(Xn,{background:a,onChange:s})]})}):null]})}function qn({bend:t,open:s,onChange:l,setOpen:n,value:a}){const d=r=>l(o=>({...o,style:{...o.style,bend:{...o.style.bend??t,...r}}}));return e.jsxs(e.Fragment,{children:[e.jsx(yt,{label:"Bend",checked:a.style.bendEnabled===!0,onChange:r=>l(o=>({...o,style:{...o.style,bendEnabled:r,bend:o.style.bend??vs()}}))}),a.style.bendEnabled===!0?e.jsx(Xe,{label:"Bend",open:s,setOpen:n,children:e.jsxs("div",{style:me,children:[e.jsxs("label",{style:ee,children:[e.jsx("span",{style:S,children:"Bend Preset"}),e.jsx("select",{style:xe,value:t.preset,onChange:r=>d({preset:r.target.value}),children:kn.map(r=>e.jsx("option",{value:r.value,children:r.label},r.value))})]}),e.jsxs("label",{style:ee,children:[e.jsx("span",{style:S,children:"Bend Strength"}),e.jsx(z,{value:t.strength,min:-100,max:100,step:1,onChange:r=>d({strength:r})})]})]})}):null]})}function Jn({glow:t,open:s,onChange:l,setOpen:n,value:a}){const d=r=>l(o=>({...o,style:{...o.style,glow:{...o.style.glow??t,...r}}}));return e.jsxs(e.Fragment,{children:[e.jsx(yt,{label:"Glow",checked:a.style.glowEnabled===!0,onChange:r=>l(o=>({...o,style:{...o.style,glowEnabled:r,glow:o.style.glow??Ss()}}))}),a.style.glowEnabled===!0?e.jsx(Xe,{label:"Glow",open:s,setOpen:n,children:e.jsxs("div",{style:me,children:[e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Color"}),e.jsx("input",{style:je,type:"color",value:t.color,onChange:r=>d({color:r.target.value})})]}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Style"}),e.jsxs("select",{style:xe,value:t.style,onChange:r=>d({style:r.target.value}),children:[e.jsx("option",{value:"outward",children:"Outward"}),e.jsx("option",{value:"contoured",children:"Contoured"})]})]}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Intensity"}),e.jsx(z,{value:t.intensity??.5,min:0,max:1,step:.05,onChange:r=>d({intensity:r})})]}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Range"}),e.jsx(z,{value:t.range??.5,min:0,max:1,step:.05,onChange:r=>d({range:r})})]}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Horizontal Angle"}),e.jsx(z,{value:t.horizontalAngle??0,min:-.5,max:.5,step:.05,onChange:r=>d({horizontalAngle:r})})]}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Vertical Angle"}),e.jsx(z,{value:t.verticalAngle??0,min:-.5,max:.5,step:.05,onChange:r=>d({verticalAngle:r})})]})]})}):null]})}const Qn={color:"#000000",opacity:1,offset:10,angle:-45,feather:0};function el({innerShadow:t,open:s,onChange:l,setOpen:n,value:a}){const d=r=>l(o=>({...o,style:{...o.style,innerShadow:{...o.style.innerShadow??t,...r}}}));return e.jsxs(e.Fragment,{children:[e.jsx(yt,{label:"Inner Shadow",checked:a.style.innerShadowEnabled===!0,onChange:r=>l(o=>({...o,style:{...o.style,innerShadowEnabled:r,innerShadow:o.style.innerShadow??Qn}}))}),a.style.innerShadowEnabled===!0?e.jsx(Xe,{label:"Inner Shadow",open:s,setOpen:n,children:e.jsxs("div",{style:me,children:[e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Shadow Color"}),e.jsx("input",{style:je,type:"color",value:t.color,onChange:r=>d({color:r.target.value})})]}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Shadow Opacity"}),e.jsx(z,{value:t.opacity??1,min:0,max:1,step:.05,onChange:r=>d({opacity:r})})]}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Shadow Offset"}),e.jsx(z,{value:t.offset??10,min:0,max:100,step:1,onChange:r=>d({offset:r})})]}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Shadow Angle"}),e.jsx(z,{value:t.angle??-45,min:-180,max:180,step:1,onChange:r=>d({angle:r})})]}),e.jsxs("label",{style:ee,children:[e.jsx("span",{style:S,children:"Shadow Feather"}),e.jsx(z,{value:t.feather??0,min:0,max:1,step:.05,onChange:r=>d({feather:r})})]})]})}):null]})}function tl({layers:t,open:s,onChange:l,setOpen:n,value:a}){const d=(r,o)=>l(h=>{const x=[...h.style.strokeLayers??[]];return x[r]={...x[r],...o},{...h,style:{...h.style,strokeLayers:x}}});return e.jsxs(e.Fragment,{children:[e.jsx(yt,{label:"Outline",checked:a.style.outlineEnabled!==!1,onChange:r=>l(o=>({...o,style:{...o.style,outlineEnabled:r}}))}),a.style.outlineEnabled!==!1?e.jsx(Xe,{label:"Outline Editor",open:s,setOpen:n,children:e.jsxs(e.Fragment,{children:[e.jsxs("div",{style:{...ue,gridColumn:"1 / -1"},children:[e.jsxs("span",{style:S,children:["Layers: ",t.length]}),e.jsx("button",{type:"button",style:wt,onClick:()=>l(r=>({...r,style:{...r.style,strokeLayers:[...r.style.strokeLayers??[],wn()]}})),children:"+"})]}),t.length>0?t.map((r,o)=>e.jsxs("div",{style:Cs,children:[e.jsxs("div",{style:ue,children:[e.jsxs("span",{style:S,children:["Outline ",o+1]}),e.jsx("button",{type:"button",style:wt,onClick:()=>l(h=>({...h,style:{...h.style,strokeLayers:(h.style.strokeLayers??[]).filter((x,c)=>c!==o)}})),children:"×"})]}),e.jsxs("div",{style:me,children:[e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Outline Color"}),e.jsx("input",{style:je,type:"color",value:r.color,onChange:h=>d(o,{color:h.target.value})})]}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Outline Opacity"}),e.jsx(z,{value:r.opacity??1,min:0,max:1,step:.05,onChange:h=>d(o,{opacity:h})})]}),e.jsxs("label",{style:ee,children:[e.jsx("span",{style:S,children:"Outline Size"}),e.jsx(z,{value:r.width,min:0,max:100,step:1,onChange:h=>d(o,{width:h})})]})]})]},o)):e.jsx("div",{style:{...S,gridColumn:"1 / -1"},children:"No outlines. Use `+` to add one."})]})}):null]})}function sl({layers:t,open:s,onChange:l,setOpen:n,value:a}){const d=(r,o)=>l(h=>{const x=[...h.style.shadowLayers??[]];return x[r]={...x[r],...o},{...h,style:{...h.style,shadowLayers:x}}});return e.jsxs(e.Fragment,{children:[e.jsx(yt,{label:"Outer Shadow",checked:a.style.shadowEnabled!==!1,onChange:r=>l(o=>{var h;return{...o,style:{...o.style,shadowEnabled:r,shadowLayers:r&&(((h=o.style.shadowLayers)==null?void 0:h.length)??0)===0?[Bt()]:o.style.shadowLayers}}})}),a.style.shadowEnabled!==!1?e.jsx(Xe,{label:"Shadow Editor",open:s,setOpen:n,children:e.jsxs(e.Fragment,{children:[e.jsxs("div",{style:{...ue,gridColumn:"1 / -1"},children:[e.jsxs("span",{style:S,children:["Layers: ",t.length]}),e.jsx("button",{type:"button",style:wt,onClick:()=>l(r=>({...r,style:{...r.style,shadowLayers:[...r.style.shadowLayers??[],Bt()]}})),children:"+"})]}),t.length>0?t.map((r,o)=>e.jsxs("div",{style:Cs,children:[e.jsxs("div",{style:ue,children:[e.jsxs("span",{style:S,children:["Shadow ",o+1]}),e.jsx("button",{type:"button",style:wt,onClick:()=>l(h=>({...h,style:{...h.style,shadowLayers:(h.style.shadowLayers??[]).filter((x,c)=>c!==o)}})),children:"×"})]}),e.jsxs("div",{style:me,children:[e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Shadow Color"}),e.jsx("input",{style:je,type:"color",value:r.color,onChange:h=>d(o,{color:h.target.value})})]}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Shadow Opacity"}),e.jsx(z,{value:r.opacity??1,min:0,max:1,step:.05,onChange:h=>d(o,{opacity:h})})]}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Shadow Offset"}),e.jsx(z,{value:r.offset??10,min:0,max:100,step:1,onChange:h=>d(o,{offset:h})})]}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Shadow Angle"}),e.jsx(z,{value:r.angle??-45,min:-180,max:180,step:1,onChange:h=>d(o,{angle:h})})]}),e.jsxs("label",{style:ee,children:[e.jsx("span",{style:S,children:"Shadow Feather"}),e.jsx(z,{value:r.feather??0,min:0,max:1,step:.05,onChange:h=>d(o,{feather:h})})]})]})]},o)):e.jsx("div",{style:{...S,gridColumn:"1 / -1"},children:"No outer shadows. Use `+` to add one."})]})}):null]})}function nl({backgroundSettingsOpen:t,bend:s,bendSettingsOpen:l,glow:n,glowSettingsOpen:a,innerShadow:d,innerShadowSettingsOpen:r,onChange:o,outlineLayers:h,outlineSettingsOpen:x,setBackgroundSettingsOpen:c,setBendSettingsOpen:p,setGlowSettingsOpen:f,setInnerShadowSettingsOpen:g,setOutlineSettingsOpen:i,setShadowSettingsOpen:u,shadowLayers:j,shadowSettingsOpen:w,value:v}){return e.jsxs("div",{style:me,children:[e.jsx(tl,{value:v,onChange:o,layers:h,open:x,setOpen:i}),e.jsx(sl,{value:v,onChange:o,layers:j,open:w,setOpen:u}),e.jsx(el,{value:v,onChange:o,innerShadow:d,open:a,setOpen:f}),e.jsx(Jn,{value:v,onChange:o,glow:n,open:r,setOpen:g}),e.jsx(qn,{value:v,onChange:o,bend:s,open:l,setOpen:p}),e.jsx(Yn,{value:v,onChange:o,open:t,setOpen:c})]})}function ll({value:t,onChange:s}){const l=t.style.bold===!0||t.style.fontStyle==="italic"||t.style.underline===!0||t.style.strikethrough===!0;return e.jsxs("div",{style:me,children:[e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Text Color"}),e.jsx("input",{style:je,type:"color",value:t.style.color,onChange:n=>s(a=>({...a,style:{...a.style,color:n.target.value}}))})]}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Font Size"}),e.jsx(z,{value:t.style.fontSize,min:16,max:180,step:4,onChange:n=>s(a=>({...a,layout:{...a.layout,minFontSize:Math.min(a.layout.minFontSize??n,n)},style:{...a.style,fontSize:n}}))})]}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Letter Spacing"}),e.jsx(z,{value:t.style.letterSpacing,min:0,max:1,step:.05,onChange:n=>s(a=>({...a,style:{...a.style,letterSpacing:n}}))})]}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Line Spacing"}),e.jsx(z,{value:t.style.lineSpacing,min:0,max:1,step:.05,onChange:n=>s(a=>({...a,style:{...a.style,lineSpacing:n}}))})]}),e.jsxs("div",{style:ee,children:[e.jsx("span",{style:S,children:"Text Style"}),e.jsxs("div",{style:Dn,children:[e.jsx("button",{type:"button",style:Je(!l),onClick:()=>s(n=>({...n,style:{...n.style,bold:!1,fontWeight:n.style.fontWeight==="bold"?"normal":n.style.fontWeight,fontStyle:"normal",underline:!1,strikethrough:!1}})),children:"None"}),e.jsx("button",{type:"button",style:Je(t.style.bold===!0),onClick:()=>s(n=>({...n,style:{...n.style,bold:n.style.bold!==!0,fontWeight:n.style.bold!==!0?"bold":400}})),children:"B"}),e.jsx("button",{type:"button",style:Je(t.style.fontStyle==="italic"),onClick:()=>s(n=>({...n,style:{...n.style,fontStyle:n.style.fontStyle==="italic"?"normal":"italic"}})),children:"I"}),e.jsx("button",{type:"button",style:Je(t.style.underline===!0),onClick:()=>s(n=>({...n,style:{...n.style,underline:n.style.underline!==!0}})),children:"U"}),e.jsx("button",{type:"button",style:Je(t.style.strikethrough===!0),onClick:()=>s(n=>({...n,style:{...n.style,strikethrough:n.style.strikethrough!==!0}})),children:"S"})]})]}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Horizontal Alignment"}),e.jsxs("select",{style:xe,value:t.layout.textAlign??"center",onChange:n=>s(a=>({...a,layout:{...a.layout,textAlign:n.target.value}})),children:[e.jsx("option",{value:"left",children:"left"}),e.jsx("option",{value:"center",children:"center"}),e.jsx("option",{value:"right",children:"right"})]})]}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Vertical Alignment"}),e.jsxs("select",{style:xe,value:t.layout.verticalAlign??"center",onChange:n=>s(a=>({...a,layout:{...a.layout,verticalAlign:n.target.value}})),children:[e.jsx("option",{value:"top",children:"top"}),e.jsx("option",{value:"center",children:"center"}),e.jsx("option",{value:"bottom",children:"bottom"})]})]}),e.jsxs("label",{style:k,children:[e.jsx("span",{style:S,children:"Overflow"}),e.jsxs("select",{style:xe,value:t.layout.overflow,onChange:n=>s(a=>({...a,layout:{...a.layout,overflow:n.target.value}})),children:[e.jsx("option",{value:"clip",children:"Clip text"}),e.jsx("option",{value:"ellipsis",children:"Show ellipsis"}),e.jsx("option",{value:"clamp",children:"Clamp"}),e.jsx("option",{value:"shrink",children:"Shrink"})]})]}),e.jsx("label",{style:ee,children:e.jsxs("div",{style:ue,children:[e.jsx("span",{style:S,children:"Resize To Fit"}),e.jsx("input",{type:"checkbox",style:gt,checked:t.layout.resizeToFit===!0,onChange:n=>s(a=>({...a,layout:{...a.layout,resizeToFit:n.target.checked}}))})]})})]})}const il={display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:6},re={display:"flex",flexDirection:"column",gap:4},Et={...re,gridColumn:"1 / -1"},Y={fontSize:9,color:"rgba(226,232,240,0.72)"},ol={width:"100%",height:24,borderRadius:7,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(15,23,42,0.68)",color:"#f8fafc",fontSize:10.5,outline:"none",padding:"0 7px",boxSizing:"border-box"},rl={...ol,fontVariantNumeric:"tabular-nums"},al={display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,minHeight:24},dl={width:16,height:16},cl=t=>/^-?\d*(\.\d*)?$/.test(t),se=({value:t,onChange:s,step:l=1,min:n,max:a,disabled:d=!1})=>{const[r,o]=y.useState(String(t));y.useEffect(()=>o(String(t)),[t]);const h=x=>{let c=x;return typeof n=="number"&&(c=Math.max(n,c)),typeof a=="number"&&(c=Math.min(a,c)),c};return e.jsx("input",{type:"text",inputMode:"decimal",pattern:"-?[0-9]*[.,]?[0-9]*",style:rl,value:r,disabled:d,onChange:x=>{const c=x.target.value;if(!cl(c)||(o(c),c===""||c==="-"||c==="."||c==="-."))return;const p=Number(c);Number.isNaN(p)||s(h(p))},onBlur:()=>{const x=Number(r);if(Number.isNaN(x)){o(String(t));return}const c=h(x);o(String(c)),s(c)},onKeyDown:x=>{if(x.key!=="ArrowUp"&&x.key!=="ArrowDown")return;x.preventDefault();const c=x.shiftKey?l*10:x.altKey?l/10:l,p=x.key==="ArrowUp"?t+c:t-c;s(h(Number.isInteger(p)?p:Number(p.toFixed(6))))}})},Ht=({value:t,onChange:s,guideLabel:l,showRenderOrder:n=!0})=>{var a,d;return e.jsxs("div",{style:il,children:[e.jsxs("label",{style:re,children:[e.jsx("span",{style:Y,children:"Position X"}),e.jsx(se,{value:t.position.x,min:-4096,max:4096,step:1,onChange:r=>s({...t,position:{...t.position,x:r}})})]}),e.jsxs("label",{style:re,children:[e.jsx("span",{style:Y,children:"Position Y"}),e.jsx(se,{value:t.position.y,min:-4096,max:4096,step:1,onChange:r=>s({...t,position:{...t.position,y:r}})})]}),e.jsxs("label",{style:re,children:[e.jsx("span",{style:Y,children:"Size X"}),e.jsx(se,{value:t.size.width,min:0,max:8192,step:1,onChange:r=>s({...t,size:{...t.size,width:r}})})]}),e.jsxs("label",{style:re,children:[e.jsx("span",{style:Y,children:"Size Y"}),e.jsx(se,{value:t.size.height,min:0,max:8192,step:1,onChange:r=>s({...t,size:{...t.size,height:r}})})]}),e.jsxs("label",{style:Et,children:[e.jsx("span",{style:Y,children:"Rotation"}),e.jsx(se,{value:t.rotation,min:-360,max:360,step:1,onChange:r=>s({...t,rotation:r})})]}),e.jsxs("label",{style:re,children:[e.jsx("span",{style:Y,children:"Scale 2D X"}),e.jsx(se,{value:((a=t.scale2D)==null?void 0:a.x)??1,min:-10,max:10,step:.01,onChange:r=>{var o;return s({...t,scale2D:{x:r,y:((o=t.scale2D)==null?void 0:o.y)??1}})}})]}),e.jsxs("label",{style:re,children:[e.jsx("span",{style:Y,children:"Scale 2D Y"}),e.jsx(se,{value:((d=t.scale2D)==null?void 0:d.y)??1,min:-10,max:10,step:.01,onChange:r=>{var o;return s({...t,scale2D:{x:((o=t.scale2D)==null?void 0:o.x)??1,y:r}})}})]}),e.jsxs("label",{style:Et,children:[e.jsx("span",{style:Y,children:"Reference Pixels Per Unit"}),e.jsx(se,{value:t.referencePixelsPerUnit??32,min:1,max:512,step:1,onChange:r=>s({...t,referencePixelsPerUnit:r})})]}),n?e.jsxs("label",{style:re,children:[e.jsx("span",{style:Y,children:"Render Order"}),e.jsx(se,{value:t.renderOrder,min:-9999,max:9999,step:1,onChange:r=>s({...t,renderOrder:r})})]}):null,e.jsxs("label",{style:re,children:[e.jsx("span",{style:Y,children:"Pivot X"}),e.jsx(se,{value:t.pivot[0],min:0,max:1,step:.01,onChange:r=>s({...t,pivot:[r,t.pivot[1]]})})]}),e.jsxs("label",{style:re,children:[e.jsx("span",{style:Y,children:"Pivot Y"}),e.jsx(se,{value:t.pivot[1],min:0,max:1,step:.01,onChange:r=>s({...t,pivot:[t.pivot[0],r]})})]}),e.jsx("label",{style:Et,children:e.jsxs("div",{style:al,children:[e.jsx("span",{style:Y,children:l}),e.jsx("input",{type:"checkbox",style:dl,checked:t.showGuides,onChange:r=>s({...t,showGuides:r.target.checked})})]})})]})};function pl({value:t,onChange:s}){return e.jsx(Ht,{value:ws(t.transformation,t.screenTransform),guideLabel:"Transform Control On",showRenderOrder:!1,onChange:l=>s(n=>({...n,transformation:Rn(l,n.transformation),screenTransform:ks(l,n.screenTransform)}))})}const hl=({value:t,onChange:s,copyLabel:l,inspector:n,docked:a})=>{var Ze;const[d,r]=y.useState(()=>K.createSceneObject({name:l??"Screen Text",renderGroupId:Le.DEFAULT_RENDER_GROUP_IDS.screen2d})),[o]=y.useState(()=>{const $=d.id,Z=K.createDefaultComponent("ScreenTransform",$),m=K.createDefaultComponent("ScreenText",$),R=K.createDefaultComponent("Material",$),D=K.createDefaultComponent("Texture",$);return{screenTransform:Z,screenText:m,material:R,texture:D}}),[h,x]=y.useState(!0),[c,p]=y.useState(!0),[f,g]=y.useState(!0),[i,u]=y.useState(!0),[j,w]=y.useState(!0),[v,M]=y.useState(!0),[U,b]=y.useState({text2d:!0,content:!0,transformation:!0,style:!0,textEffect:!0}),F=ws(t.screenText.transformation,t.screenText.screenTransform),E={object:{...d,componentIds:[o.screenTransform.id,o.screenText.id,o.material.id,o.texture.id]},kind:"screenText",components:[{...o.screenTransform,settings:t.screenText.screenTransform??ks(F)},{...o.screenText,settings:t.screenText},{...o.material,settings:{...o.material.settings,color:t.screenText.style.color,opacity:t.screenText.style.opacity}},{...o.texture,settings:{...o.texture.settings,url:t.screenText.style.background.textureUrl,flipX:t.screenText.style.background.textureFlipX,flipY:t.screenText.style.background.textureFlipY}}],scene:{screenSpaceUI:t.screenSpaceUI}},P=$=>{s({...t,screenText:$(t.screenText)})},le=t.screenText.style.strokeLayers??[],ae=t.screenText.style.shadowEnabled!==!1&&(((Ze=t.screenText.style.shadowLayers)==null?void 0:Ze.length)??0)===0?[Bt()]:t.screenText.style.shadowLayers??[],L=t.screenText.style.innerShadow??{color:"#000000",opacity:1,offset:10,angle:-45,feather:0},Pe=t.screenText.style.glow??Ss(),De=t.screenText.style.bend??vs(),W=$=>b(Z=>({...Z,[$]:!Z[$]})),ve=($,Z,m,R)=>e.jsx(Bn,{label:Z,icon:m,open:U[$],onToggle:()=>W($),children:R},$);return e.jsxs(Ct,{objectId:(n==null?void 0:n.objectId)??d.id,objectName:(n==null?void 0:n.objectName)??d.name,onObjectNameChange:(n==null?void 0:n.onObjectNameChange)??($=>r(Z=>({...Z,name:$}))),layer:(n==null?void 0:n.layer)??"Default Layer",visible:(n==null?void 0:n.visible)??t.screenText.enabled,onVisibleChange:(n==null?void 0:n.onVisibleChange)??($=>P(Z=>({...Z,enabled:$}))),copyConfig:(n==null?void 0:n.copyConfig)??E,docked:a??(n==null?void 0:n.docked),initialPosition:n==null?void 0:n.initialPosition,position:n==null?void 0:n.position,onPositionChange:n==null?void 0:n.onPositionChange,title:n==null?void 0:n.title,children:[ve("transformation","Transformation",e.jsx(Vn,{}),e.jsx(pl,{value:t.screenText,onChange:P})),ve("text2d","2D Text",e.jsx(Qt,{}),e.jsxs(e.Fragment,{children:[ve("content","Content",e.jsx(Qt,{}),e.jsx(Hn,{value:t.screenText,onChange:P})),ve("style","Style",e.jsx(es,{}),e.jsx(ll,{value:t.screenText,onChange:P})),ve("textEffect","Text Effect",e.jsx(es,{}),e.jsx(nl,{value:t.screenText,onChange:P,outlineLayers:le,shadowLayers:ae,innerShadow:L,glow:Pe,bend:De,outlineSettingsOpen:h,setOutlineSettingsOpen:x,shadowSettingsOpen:c,setShadowSettingsOpen:p,innerShadowSettingsOpen:f,setInnerShadowSettingsOpen:g,glowSettingsOpen:i,setGlowSettingsOpen:u,bendSettingsOpen:j,setBendSettingsOpen:w,backgroundSettingsOpen:v,setBackgroundSettingsOpen:M}))]}))]})},xl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtAAAAUAAgMAAAAToI2uAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAlQTFRFqampbGxsAAAA/lGquwAAAAN0Uk5T//8A18oNQQAABPRJREFUeJztzssNQWEYQEG3CP1oQqJGsdCfBFs7j8X8+eRMBbPtBtpWB35RWimtlFZKK6WV0kppZWj6uLrwrceltFFaKa2UVkorpZXSSmlldPp2XT350P5Q2iitlFZKK6WV0kpppbRSWimtlFZKK3+RPq8OvXM/lTZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK6WV0kpppbRSWimtlFZKK3+THqG0UloprZRWSiulldJKaaW0UloprZRWSiuv6VFKK6WV0kpppbRSWimtlFbGpgcqrZRWSiulldJKaaW0MjL9BFWtRqVFuJpUAAAAAElFTkSuQmCC",ul={placeholder:"Placeholder","hero-image":"Hero Image","photo-frame":"Default Frame"},gl=Object.entries(ul).map(([t,s])=>({value:t,label:s})),yl={placeholder:{transformation:{showFitGuides:!1},image:{sourceKind:"default",stretchMode:"fit",materialType:"unlit",blendMode:"normal",opacity:1,color:"#ffffff",flipX:!1,flipY:!1,transparent:!0,alphaTest:0}},"hero-image":{transformation:{position:{x:0,y:.08},size:{width:.96,height:.62},rotation:0,pivot:[.5,.5],overlay:!0,visible:!0},image:{sourceKind:"image",stretchMode:"fillAndCut",materialType:"unlit",blendMode:"normal",opacity:1,color:"#ffffff",flipX:!1,flipY:!1,transparent:!0,alphaTest:0}},"photo-frame":{transformation:{position:{x:0,y:.01},size:{width:2,height:2},rotation:0,pivot:[.5,.5],overlay:!0,visible:!0},image:{sourceKind:"image",src:xl,stretchMode:"fill",materialType:"unlit",blendMode:"normal",opacity:1,color:"#ffffff",flipX:!1,flipY:!1,transparent:!0,alphaTest:0}}},bl=(t,s)=>{const l=yl[s];return{...t,preset:s,...l.enabled!==void 0?{enabled:l.enabled}:{},transformation:{...t.transformation,...l.transformation??{}},image:{...t.image,...l.image??{}}}},fl={display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:6},ct={display:"flex",flexDirection:"column",gap:4},jl={...ct,gridColumn:"1 / -1"},Qe={fontSize:9,color:"rgba(226,232,240,0.72)"},Gt={width:"100%",height:24,borderRadius:7,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(15,23,42,0.68)",color:"#f8fafc",fontSize:10.5,outline:"none",padding:"0 7px",boxSizing:"border-box"},ts={...Gt,appearance:"none"},ml={...Gt,fontVariantNumeric:"tabular-nums"},Sl={...Gt,padding:2,cursor:"pointer"},vl=t=>/^-?\d*(\.\d*)?$/.test(t),ss=({value:t,onChange:s,step:l=1,min:n,max:a})=>{const[d,r]=y.useState(String(t));y.useEffect(()=>r(String(t)),[t]);const o=h=>{let x=h;return typeof n=="number"&&(x=Math.max(n,x)),typeof a=="number"&&(x=Math.min(a,x)),x};return e.jsx("input",{type:"text",inputMode:"decimal",pattern:"-?[0-9]*[.,]?[0-9]*",style:ml,value:d,onChange:h=>{const x=h.target.value;if(!vl(x)||(r(x),x===""||x==="-"||x==="."||x==="-."))return;const c=Number(x);Number.isNaN(c)||s(o(c))},onBlur:()=>{const h=Number(d);if(Number.isNaN(h)){r(String(t));return}const x=o(h);r(String(x)),s(x)},onKeyDown:h=>{if(h.key!=="ArrowUp"&&h.key!=="ArrowDown")return;h.preventDefault();const x=h.shiftKey?l*10:h.altKey?l/10:l,c=h.key==="ArrowUp"?t+x:t-x;s(o(Number.isInteger(c)?c:Number(c.toFixed(6))))}})},wl=({value:t,onChange:s})=>e.jsxs("div",{style:fl,children:[e.jsxs("label",{style:ct,children:[e.jsx("span",{style:Qe,children:"Material Type"}),e.jsxs("select",{style:ts,value:t.materialType,onChange:l=>s({...t,materialType:l.target.value}),children:[e.jsx("option",{value:"unlit",children:"Unlit"}),e.jsx("option",{value:"standardPBR",children:"Standard PBR"}),e.jsx("option",{value:"matcap",children:"Matcap"})]})]}),e.jsxs("label",{style:ct,children:[e.jsx("span",{style:Qe,children:"Blend Mode"}),e.jsxs("select",{style:ts,value:t.blendMode,onChange:l=>s({...t,blendMode:l.target.value}),children:[e.jsx("option",{value:"normal",children:"Normal"}),e.jsx("option",{value:"add",children:"Add"}),e.jsx("option",{value:"subtract",children:"Subtract"}),e.jsx("option",{value:"multiply",children:"Multiply"}),e.jsx("option",{value:"screen",children:"Screen"}),e.jsx("option",{value:"lighten",children:"Lighten"}),e.jsx("option",{value:"darken",children:"Darken"}),e.jsx("option",{value:"overlay",children:"Overlay"}),e.jsx("option",{value:"softLight",children:"Soft Light"}),e.jsx("option",{value:"hardLight",children:"Hard Light"}),e.jsx("option",{value:"difference",children:"Difference"}),e.jsx("option",{value:"exclusion",children:"Exclusion"})]})]}),e.jsxs("label",{style:ct,children:[e.jsx("span",{style:Qe,children:"Opacity"}),e.jsx(ss,{value:t.opacity,min:0,max:1,step:.01,onChange:l=>s({...t,opacity:l})})]}),e.jsxs("label",{style:ct,children:[e.jsx("span",{style:Qe,children:"Tint"}),e.jsx("input",{type:"color",style:Sl,value:t.color,onChange:l=>s({...t,color:l.target.value})})]}),e.jsxs("label",{style:jl,children:[e.jsx("span",{style:Qe,children:"Alpha Test"}),e.jsx(ss,{value:t.alphaTest,min:0,max:1,step:.01,onChange:l=>s({...t,alphaTest:l})})]})]}),kl={display:"flex",width:18,height:18,alignItems:"center",justifyContent:"center",borderRadius:6,background:"rgba(255,255,255,0.08)",border:"1px solid rgba(255,255,255,0.08)",color:"#e2e8f0",flex:"0 0 auto"},Cl={borderRadius:12,border:"1px solid rgba(255,255,255,0.08)",background:"rgba(255,255,255,0.03)",overflow:"hidden"},Rl={display:"flex",alignItems:"center",gap:7,padding:"6px 7px"},Il={display:"flex",alignItems:"center",gap:6,fontSize:11,fontWeight:500,flex:"1 1 auto",minWidth:0},El={width:28,height:16,borderRadius:999,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(255,255,255,0.08)",padding:2,display:"flex",alignItems:"center",cursor:"pointer",flex:"0 0 auto"},Tl=t=>({width:10,height:10,borderRadius:999,background:t?"#f8fafc":"rgba(148,163,184,0.7)",transform:t?"translateX(12px)":"translateX(0)",transition:"transform 140ms ease, background 140ms ease"}),zl={display:"grid",gap:7,padding:"0 7px 7px"},Ml={display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:6},pt={display:"flex",flexDirection:"column",gap:4},Tt={...pt,gridColumn:"1 / -1"},we={fontSize:9,color:"rgba(226,232,240,0.72)"},Rs={width:"100%",height:24,borderRadius:7,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(15,23,42,0.68)",color:"#f8fafc",fontSize:10.5,outline:"none",padding:"0 7px",boxSizing:"border-box"},zt={...Rs,appearance:"none"},Mt={display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,minHeight:24},Ft={width:16,height:16},Fl=[{value:"default",label:"Default"},{value:"image",label:"Image"},{value:"gif",label:"GIF"}],Wl=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M5 4h14a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2zm0 2v8.76l4.5-4.5 3.2 3.2 2.8-2.8L19 14.16V6H5zm12 3a2 2 0 1 1-4 0 2 2 0 0 1 4 0z"})}),Ll=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M11 2h2v4h3l-4 4-4-4h3V2zm0 20v-4H8l4-4 4 4h-3v4h-2zM2 11h4V8l4 4-4 4v-3H2v-2zm20 0v2h-4v3l-4-4 4-4v3h4z"})}),$l=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2 3 7v10l9 5 9-5V7l-9-5zm0 2.3L17.9 7 12 9.7 6.1 7 12 4.3zM5 8.5l6 2.7v7.9l-6-3.3V8.5zm8 10.6v-7.9l6-2.7v7.3l-6 3.3z"})}),ns=(t,s)=>({enabled:(s==null?void 0:s.enabled)??t.enabled,showGuides:(s==null?void 0:s.showTransformGuides)??t.showFitGuides,coordinateSpace:t.coordinateSpace,canvasSize:t.canvasSize,position:(s==null?void 0:s.position)??t.position,size:(s==null?void 0:s.size)??t.size,rotation:(s==null?void 0:s.rotation)??t.rotation,scale2D:s==null?void 0:s.scale2D,referencePixelsPerUnit:s==null?void 0:s.referencePixelsPerUnit,pivot:(s==null?void 0:s.pivot)??t.pivot,renderOrder:(s==null?void 0:s.renderOrder)??t.renderOrder,overlay:(s==null?void 0:s.overlay)??t.overlay,visible:(s==null?void 0:s.visible)??t.visible}),Nl=(t,s)=>({...s,enabled:t.enabled,showFitGuides:t.showGuides,coordinateSpace:t.coordinateSpace,canvasSize:t.canvasSize,position:t.position,size:t.size,rotation:t.rotation,pivot:t.pivot,renderOrder:t.renderOrder,overlay:t.overlay,visible:t.visible}),ls=(t,s)=>({...$e.DEFAULT_SCREEN_TRANSFORM_2D,...s,enabled:t.enabled,showTransformGuides:t.showGuides,position:t.position,size:t.size,rotation:t.rotation,scale2D:t.scale2D??(s==null?void 0:s.scale2D)??$e.DEFAULT_SCREEN_TRANSFORM_2D.scale2D,referencePixelsPerUnit:t.referencePixelsPerUnit??(s==null?void 0:s.referencePixelsPerUnit)??$e.DEFAULT_SCREEN_TRANSFORM_2D.referencePixelsPerUnit,pivot:t.pivot,renderOrder:t.renderOrder,overlay:t.overlay,visible:t.visible}),Ol=({value:t,onChange:s,copyLabel:l,inspector:n,docked:a})=>{const[d,r]=y.useState(()=>K.createSceneObject({name:l??"Screen Image",renderGroupId:Le.DEFAULT_RENDER_GROUP_IDS.screen2d})),[o]=y.useState(()=>{const i=d.id,u=K.createDefaultComponent("ScreenTransform",i),j=K.createDefaultComponent("ScreenImage",i),w=K.createDefaultComponent("Material",i),v=K.createDefaultComponent("Texture",i);return{screenTransform:u,screenImage:j,material:w,texture:v}}),[h,x]=y.useState({transformation:!0,image:!0,material:!0}),c=ns(t.screenImage.transformation,t.screenImage.screenTransform),p={object:{...d,componentIds:[o.screenTransform.id,o.screenImage.id,o.material.id,o.texture.id]},kind:"screenImage",components:[{...o.screenTransform,settings:t.screenImage.screenTransform??ls(c)},{...o.screenImage,settings:t.screenImage},{...o.material,settings:{...o.material.settings,color:t.screenImage.image.color,opacity:t.screenImage.image.opacity}},{...o.texture,settings:{...o.texture.settings,url:t.screenImage.image.src||void 0,flipX:t.screenImage.image.flipX,flipY:t.screenImage.image.flipY}}],scene:{screenSpaceUI:t.screenSpaceUI}},f=i=>{s({...t,screenImage:i(t.screenImage)})},g=(i,u,j,w)=>e.jsxs("div",{style:Cl,children:[e.jsxs("div",{style:Rl,children:[e.jsx("button",{type:"button",onClick:()=>x(v=>({...v,[i]:!v[i]})),style:El,children:e.jsx("div",{style:Tl(h[i])})}),e.jsxs("div",{style:Il,children:[e.jsx("span",{style:kl,children:j}),e.jsx("span",{children:u})]})]}),h[i]?e.jsx("div",{style:zl,children:w}):null]},i);return e.jsxs(Ct,{objectId:(n==null?void 0:n.objectId)??d.id,objectName:(n==null?void 0:n.objectName)??d.name,onObjectNameChange:(n==null?void 0:n.onObjectNameChange)??(i=>r(u=>({...u,name:i}))),layer:(n==null?void 0:n.layer)??"Default Layer",visible:(n==null?void 0:n.visible)??t.screenImage.enabled,onVisibleChange:(n==null?void 0:n.onVisibleChange)??(i=>f(u=>({...u,enabled:i}))),copyConfig:(n==null?void 0:n.copyConfig)??p,docked:a??(n==null?void 0:n.docked),initialPosition:n==null?void 0:n.initialPosition,position:n==null?void 0:n.position,onPositionChange:n==null?void 0:n.onPositionChange,title:n==null?void 0:n.title,children:[g("transformation","Transformation",e.jsx(Ll,{}),e.jsx(Ht,{value:ns(t.screenImage.transformation,t.screenImage.screenTransform),guideLabel:"Transform Control On",showRenderOrder:!1,onChange:i=>f(u=>({...u,transformation:Nl(i,u.transformation),screenTransform:ls(i,u.screenTransform)}))})),g("image","Image",e.jsx(Wl,{}),e.jsxs("div",{style:{display:"grid",gap:6},children:[e.jsxs("label",{style:pt,children:[e.jsx("span",{style:we,children:"Preset"}),e.jsx("select",{style:zt,value:t.screenImage.preset,onChange:i=>f(u=>bl(u,i.target.value)),children:gl.map(i=>e.jsx("option",{value:i.value,children:i.label},i.value))})]}),e.jsxs("label",{style:pt,children:[e.jsx("span",{style:we,children:"Source Kind"}),e.jsx("select",{style:zt,value:t.screenImage.image.sourceKind,onChange:i=>f(u=>({...u,image:{...u.image,sourceKind:i.target.value}})),children:Fl.map(i=>e.jsx("option",{value:i.value,children:i.label},i.value))})]}),t.screenImage.image.sourceKind==="image"||t.screenImage.image.sourceKind==="gif"?e.jsxs("label",{style:pt,children:[e.jsx("span",{style:we,children:"Source URL"}),e.jsx("input",{style:Rs,value:t.screenImage.image.src,onChange:i=>f(u=>({...u,image:{...u.image,src:i.target.value}}))})]}):null,e.jsxs("label",{style:pt,children:[e.jsx("span",{style:we,children:"Stretch Mode"}),e.jsxs("select",{style:zt,value:t.screenImage.image.stretchMode,onChange:i=>f(u=>({...u,image:{...u.image,stretchMode:i.target.value}})),children:[e.jsx("option",{value:"fit",children:"Fit"}),e.jsx("option",{value:"fitWidth",children:"Fit Width"}),e.jsx("option",{value:"fitHeight",children:"Fit Height"}),e.jsx("option",{value:"center",children:"Center"}),e.jsx("option",{value:"stretch",children:"Stretch"}),e.jsx("option",{value:"fill",children:"Fill"}),e.jsx("option",{value:"fillAndCut",children:"Fill and Cut"})]})]}),e.jsx("label",{style:Tt,children:e.jsxs("div",{style:Mt,children:[e.jsx("span",{style:we,children:"Flip X"}),e.jsx("input",{type:"checkbox",style:Ft,checked:t.screenImage.image.flipX,onChange:i=>f(u=>({...u,image:{...u.image,flipX:i.target.checked}}))})]})}),e.jsx("label",{style:Tt,children:e.jsxs("div",{style:Mt,children:[e.jsx("span",{style:we,children:"Flip Y"}),e.jsx("input",{type:"checkbox",style:Ft,checked:t.screenImage.image.flipY,onChange:i=>f(u=>({...u,image:{...u.image,flipY:i.target.checked}}))})]})})]})),g("material","Material",e.jsx($l,{}),e.jsxs("div",{style:Ml,children:[e.jsx(wl,{value:t.screenImage.image,onChange:i=>f(u=>({...u,image:{...u.image,materialType:i.materialType,blendMode:i.blendMode,opacity:i.opacity,color:i.color,alphaTest:i.alphaTest}}))}),e.jsx("label",{style:Tt,children:e.jsxs("div",{style:Mt,children:[e.jsx("span",{style:we,children:"Transparent"}),e.jsx("input",{type:"checkbox",style:Ft,checked:t.screenImage.image.transparent,onChange:i=>f(u=>({...u,image:{...u.image,transparent:i.target.checked}}))})]})})]}))]})},_e={display:"grid",gridTemplateColumns:"92px minmax(0,1fr)",alignItems:"center",gap:10,margin:"8px 0",color:"#cbd5e1",fontSize:12},We={width:"100%",boxSizing:"border-box",padding:"8px 9px",border:"1px solid rgba(148,163,184,.16)",borderRadius:6,background:"rgba(15,23,42,.72)",color:"#e2e8f0"},Al=({onChange:t,value:s})=>e.jsxs("fieldset",{style:{border:0,padding:0,margin:0},children:[s.map((l,n)=>e.jsxs("div",{style:_e,children:[e.jsx("input",{"aria-label":`Gradient stop ${n+1} color`,type:"color",style:{...We,padding:2},value:l.color,onChange:a=>t(s.map((d,r)=>r===n?{...d,color:a.currentTarget.value}:d))}),e.jsxs("span",{style:{display:"grid",gridTemplateColumns:"1fr auto",gap:4},children:[e.jsx("input",{"aria-label":`Gradient stop ${n+1} position`,type:"number",min:0,max:1,step:.05,style:We,value:l.offset,onChange:a=>t(s.map((d,r)=>r===n?{...d,offset:Number(a.currentTarget.value)}:d))}),s.length>2?e.jsx("button",{type:"button",onClick:()=>t(s.filter((a,d)=>d!==n)),children:"−"}):null]})]},`${n}-${l.color}`)),s.length<J.MAX_SCREEN_GRADIENT_STOPS?e.jsx("button",{type:"button",onClick:()=>{var l;return t([...s,{offset:.5,color:((l=s[s.length-1])==null?void 0:l.color)??"#ffffff"}])},children:"Add stop"}):null]}),Is=({onChange:t,value:s})=>e.jsxs("fieldset",{style:{border:0,padding:0,margin:0},children:[e.jsxs("label",{style:_e,children:[e.jsx("span",{children:"Gradient"}),e.jsxs("select",{style:We,value:s.type,onChange:l=>t({...s,type:l.currentTarget.value}),children:[e.jsx("option",{value:"linear",children:"Linear"}),e.jsx("option",{value:"radial",children:"Radial"}),e.jsx("option",{value:"angular",children:"Conic / Angular"})]})]}),e.jsx(Al,{value:s.stops,onChange:l=>t({...s,stops:l})}),s.type!=="radial"?e.jsxs("label",{style:_e,children:[e.jsx("span",{children:"Angle"}),e.jsx("input",{type:"number",style:We,step:5,value:s.angle,onChange:l=>t({...s,angle:Number(l.currentTarget.value)})})]}):null,s.type!=="linear"?e.jsxs(e.Fragment,{children:[e.jsxs("label",{style:_e,children:[e.jsx("span",{children:"Center X"}),e.jsx("input",{type:"number",style:We,min:0,max:1,step:.05,value:s.center.x,onChange:l=>t({...s,center:{...s.center,x:Number(l.currentTarget.value)}})})]}),e.jsxs("label",{style:_e,children:[e.jsx("span",{children:"Center Y"}),e.jsx("input",{type:"number",style:We,min:0,max:1,step:.05,value:s.center.y,onChange:l=>t({...s,center:{...s.center,y:Number(l.currentTarget.value)}})})]})]}):null,s.type==="radial"?e.jsxs("label",{style:_e,children:[e.jsx("span",{children:"Radius"}),e.jsx("input",{type:"number",style:We,min:.01,step:.05,value:s.radius,onChange:l=>t({...s,radius:Number(l.currentTarget.value)})})]}):null]}),is={display:"grid",gridTemplateColumns:"92px minmax(0,1fr)",alignItems:"center",gap:10,margin:"8px 0",color:"#cbd5e1",fontSize:12},os={width:"100%",boxSizing:"border-box",padding:"8px 9px",border:"1px solid rgba(148,163,184,.16)",borderRadius:6,background:"rgba(15,23,42,.72)",color:"#e2e8f0"},Es=({value:t,onChange:s})=>e.jsxs("fieldset",{style:{border:0,padding:0,margin:0},children:[e.jsxs("label",{style:is,children:[e.jsx("span",{children:"Tint"}),e.jsx("input",{type:"color",style:{...os,padding:2},value:t.tint,onChange:l=>s({...t,tint:l.currentTarget.value})})]}),["opacity","frost","highlight"].map(l=>e.jsxs("label",{style:is,children:[e.jsx("span",{children:l[0].toUpperCase()+l.slice(1)}),e.jsx("input",{type:"number",style:os,min:0,max:1,step:.05,value:t[l],onChange:n=>s({...t,[l]:Number(n.currentTarget.value)})})]},l))]}),Pl={borderRadius:12,border:"1px solid rgba(255,255,255,.08)",background:"rgba(255,255,255,.03)",padding:8},Ue={display:"grid",gridTemplateColumns:"92px minmax(0,1fr)",alignItems:"center",gap:10,margin:"8px 0",color:"#cbd5e1",fontSize:12},ht={width:"100%",boxSizing:"border-box",padding:"8px 9px",border:"1px solid rgba(148,163,184,.16)",borderRadius:6,background:"rgba(15,23,42,.72)",color:"#e2e8f0"},ie=({label:t,onValue:s,...l})=>e.jsxs("label",{style:Ue,children:[e.jsx("span",{children:t}),e.jsx("input",{...l,type:"number",style:ht,onChange:n=>s(Number(n.currentTarget.value))})]}),Ts=({value:t,onChange:s})=>e.jsxs("section",{style:Pl,children:[e.jsx("div",{style:{fontSize:11,fontWeight:700,marginBottom:7},children:"Screen Shape"}),e.jsxs("label",{style:Ue,children:[e.jsx("span",{children:"Shape"}),e.jsxs("select",{style:ht,value:t.kind,onChange:l=>s({...t,kind:l.currentTarget.value}),children:[e.jsx("option",{value:"circle",children:"Circle"}),e.jsx("option",{value:"ellipse",children:"Ellipse"}),e.jsx("option",{value:"rectangle",children:"Rectangle"}),e.jsx("option",{value:"roundedRectangle",children:"Rounded Rectangle"}),e.jsx("option",{value:"polygon",children:"Polygon"}),e.jsx("option",{value:"star",children:"Star"}),e.jsx("option",{value:"line",children:"Line"})]})]}),t.kind!=="line"?e.jsxs(e.Fragment,{children:[e.jsxs("label",{style:Ue,children:[e.jsx("span",{children:"Fill"}),e.jsxs("select",{style:ht,value:t.fillMode,onChange:l=>s({...t,fillMode:l.currentTarget.value}),children:[e.jsx("option",{value:"solid",children:"Solid"}),e.jsx("option",{value:"gradient",children:"Gradient"}),e.jsx("option",{value:"glass",children:"Glass"})]})]}),t.fillMode==="gradient"?e.jsx(Is,{value:t.gradient,onChange:l=>s({...t,gradient:l})}):t.fillMode==="glass"?e.jsx(Es,{value:t.glass,onChange:l=>s({...t,glass:l})}):e.jsxs("label",{style:Ue,children:[e.jsx("span",{children:"Color"}),e.jsx("input",{type:"color",style:{...ht,padding:2},value:t.fillColor,onChange:l=>s({...t,fillColor:l.currentTarget.value})})]}),e.jsx(ie,{label:"Fill Opacity",min:0,max:1,step:.05,value:t.fillOpacity,onValue:l=>s({...t,fillOpacity:l})})]}):null,e.jsxs("label",{style:Ue,children:[e.jsx("span",{children:"Stroke"}),e.jsx("input",{type:"color",style:{...ht,padding:2},value:t.strokeColor,onChange:l=>s({...t,strokeColor:l.currentTarget.value})})]}),e.jsx(ie,{label:"Stroke Width",min:0,step:1,value:t.strokeWidth,onValue:l=>s({...t,strokeWidth:l})}),e.jsx(ie,{label:"Stroke Opacity",min:0,max:1,step:.05,value:t.strokeOpacity,onValue:l=>s({...t,strokeOpacity:l})}),e.jsxs("label",{style:Ue,children:[e.jsx("span",{children:"Dashed"}),e.jsx("input",{type:"checkbox",checked:t.dashed,onChange:l=>s({...t,dashed:l.currentTarget.checked})})]}),t.kind==="roundedRectangle"?e.jsx(ie,{label:"Corner Radius",min:0,max:.5,step:.01,value:t.cornerRadius,onValue:l=>s({...t,cornerRadius:l})}):null,t.kind==="polygon"||t.kind==="star"?e.jsx(ie,{label:t.kind==="star"?"Points":"Sides",min:3,max:12,step:1,value:t.sides,onValue:l=>s({...t,sides:l})}):null,t.kind==="star"?e.jsx(ie,{label:"Inner Radius",min:.05,max:.95,step:.05,value:t.innerRadiusRatio,onValue:l=>s({...t,innerRadiusRatio:l})}):null,t.kind==="line"?e.jsxs(e.Fragment,{children:[e.jsx(ie,{label:"Start X",min:0,max:1,step:.05,value:t.lineStart.x,onValue:l=>s({...t,lineStart:{...t.lineStart,x:l}})}),e.jsx(ie,{label:"Start Y",min:0,max:1,step:.05,value:t.lineStart.y,onValue:l=>s({...t,lineStart:{...t.lineStart,y:l}})}),e.jsx(ie,{label:"End X",min:0,max:1,step:.05,value:t.lineEnd.x,onValue:l=>s({...t,lineEnd:{...t.lineEnd,x:l}})}),e.jsx(ie,{label:"End Y",min:0,max:1,step:.05,value:t.lineEnd.y,onValue:l=>s({...t,lineEnd:{...t.lineEnd,y:l}})})]}):null]}),Dl={enabled:!0,bothHands:!0,visualScale:1,opacity:.92,pointRadius:3,lineWidth:3,labelScale:1.2,smoothing:.35,color:"#22d3ee",showBoundingBox:!0,showLabels:!1,logToConsole:!1},Bl={position:"fixed",left:14,top:104,zIndex:2e4,pointerEvents:"none"},zs={pointerEvents:"auto",width:286,borderRadius:16,border:"1px solid rgba(255,255,255,0.12)",background:"rgba(8, 15, 28, 0.58)",boxShadow:"0 16px 36px rgba(0,0,0,0.28)",backdropFilter:"blur(20px) saturate(1.1)",WebkitBackdropFilter:"blur(20px) saturate(1.1)",color:"#f8fafc",overflowX:"hidden",overflowY:"auto",scrollbarWidth:"thin",scrollbarColor:"rgba(148,163,184,0.55) rgba(255,255,255,0.06)",overscrollBehavior:"contain"},Vl={...zs,width:32,height:32,borderRadius:16,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},Kl={position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:7,padding:"7px 8px",borderBottom:"1px solid rgba(255,255,255,0.08)",background:"rgba(8, 15, 28, 0.88)",backdropFilter:"blur(20px) saturate(1.1)",WebkitBackdropFilter:"blur(20px) saturate(1.1)"},Hl={width:16,height:16,display:"flex",alignItems:"center",justifyContent:"center",cursor:"grab",color:"rgba(148,163,184,0.82)",flex:"0 0 auto"},Gl={display:"flex",alignItems:"center",gap:6,fontSize:11,fontWeight:600,minWidth:0},rs={display:"flex",width:18,height:18,alignItems:"center",justifyContent:"center",borderRadius:6,background:"rgba(255,255,255,0.08)",border:"1px solid rgba(255,255,255,0.08)",color:"#e2e8f0",flex:"0 0 auto"},_l={display:"grid",gap:6,padding:7},Ul={borderRadius:12,border:"1px solid rgba(255,255,255,0.08)",background:"rgba(255,255,255,0.03)",overflow:"hidden"},Xl={display:"flex",alignItems:"center",gap:7,padding:"6px 7px"},Zl={display:"flex",alignItems:"center",gap:6,fontSize:11,fontWeight:500,flex:"1 1 auto",minWidth:0},Yl={width:28,height:16,borderRadius:999,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(255,255,255,0.08)",padding:2,display:"flex",alignItems:"center",cursor:"pointer",flex:"0 0 auto"},ql=t=>({width:10,height:10,borderRadius:999,background:t?"#f8fafc":"rgba(148,163,184,0.7)",transform:t?"translateX(12px)":"translateX(0)",transition:"transform 140ms ease, background 140ms ease"}),Jl={display:"grid",gap:7,padding:"0 7px 7px"},Ql={display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:6},Fe={display:"flex",flexDirection:"column",gap:4},et={...Fe,gridColumn:"1 / -1"},ne={fontSize:9,color:"rgba(226,232,240,0.72)"},Ve={width:"100%",height:24,borderRadius:7,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(15,23,42,0.68)",color:"#f8fafc",fontSize:10.5,outline:"none",padding:"0 7px",boxSizing:"border-box"},tt={display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,minHeight:24},st={width:16,height:16},as={display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:8,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(255,255,255,0.05)",color:"#e2e8f0",cursor:"pointer",padding:0,flex:"0 0 auto"},ei=()=>e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M7 10h10v2H7v-2zm0 4h10v2H7v-2zm0-8h10v2H7V6z"})}),ti=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M18.3 5.71 12 12l6.3 6.29-1.41 1.41L10.59 13.41 4.29 19.7 2.88 18.29 9.17 12 2.88 5.71 4.29 4.3l6.3 6.29 6.29-6.3z"})}),si=()=>e.jsx("svg",{width:"11",height:"15",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M8 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM8 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM8 18a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM16 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM16 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM16 18a2 2 0 1 1-4 0 2 2 0 0 1 4 0z"})}),Wt=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M11 2a1 1 0 0 1 1 1v6h1V3a1 1 0 1 1 2 0v6h1V4a1 1 0 1 1 2 0v7.3l1.6 2.4a5 5 0 0 1 .8 2.7V18a4 4 0 0 1-4 4H9a6 6 0 0 1-6-6v-3.5a2.5 2.5 0 0 1 5 0V15h1V3a1 1 0 0 1 1-1z"})}),ni=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 5V2L7 7l5 5V9a4 4 0 1 1-4 4H6a6 6 0 1 0 6-8z"})}),li=({value:t,onChange:s})=>{const[l,n]=y.useState(!0),[a,d]=y.useState({x:14,y:104}),[r,o]=y.useState(typeof window>"u"?0:window.innerHeight),[h,x]=y.useState({overlay:!0,visibility:!1}),c=y.useRef(null),p=Math.max(240,r-a.y-16);y.useEffect(()=>{const i=j=>{c.current&&d({x:Math.max(8,j.clientX-c.current.x),y:Math.max(8,j.clientY-c.current.y)})},u=()=>{c.current=null,document.body.classList.remove("select-none")};return window.addEventListener("pointermove",i),window.addEventListener("pointerup",u),()=>{window.removeEventListener("pointermove",i),window.removeEventListener("pointerup",u)}},[]),y.useEffect(()=>{const i=()=>o(window.innerHeight);return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]);const f=i=>{const u=i.currentTarget.getBoundingClientRect();c.current={x:i.clientX-u.left,y:i.clientY-u.top},document.body.classList.add("select-none"),i.currentTarget.setPointerCapture(i.pointerId)},g=(i,u,j,w)=>e.jsxs("div",{style:Ul,children:[e.jsxs("div",{style:Xl,children:[e.jsx("button",{type:"button",onClick:()=>x(v=>({...v,[i]:!v[i]})),style:Yl,children:e.jsx("div",{style:ql(h[i])})}),e.jsxs("div",{style:Zl,children:[e.jsx("span",{style:rs,children:j}),e.jsx("span",{children:u})]})]}),h[i]?e.jsx("div",{style:Jl,children:w}):null]},i);return typeof document>"u"?null:Ae.createPortal(e.jsxs("div",{style:{...Bl,left:a.x,top:a.y},children:[e.jsx("style",{children:`
|
|
2
|
+
.xr-hand-tracking-2d-scroll::-webkit-scrollbar { width: 10px; }
|
|
3
|
+
.xr-hand-tracking-2d-scroll::-webkit-scrollbar-track { background: rgba(255,255,255,0.06); border-radius: 999px; }
|
|
4
|
+
.xr-hand-tracking-2d-scroll::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.55); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
|
|
5
|
+
.xr-hand-tracking-2d-scroll::-webkit-scrollbar-thumb:hover { background: rgba(226,232,240,0.68); background-clip: padding-box; }
|
|
6
|
+
`}),l?e.jsxs("div",{className:"xr-hand-tracking-2d-scroll",style:{...zs,height:p},children:[e.jsxs("div",{style:Kl,children:[e.jsx("div",{onPointerDown:f,style:Hl,children:e.jsx(si,{})}),e.jsxs("div",{style:Gl,children:[e.jsx("span",{style:rs,children:e.jsx(Wt,{})}),e.jsx("span",{children:"HandTracking2D"})]}),e.jsx("div",{style:{flex:"1 1 auto"}}),e.jsx("button",{type:"button",onClick:()=>s(Dl),style:as,children:e.jsx(ni,{})}),e.jsx("button",{type:"button",onClick:()=>n(!1),style:as,children:e.jsx(ti,{})})]}),e.jsxs("div",{style:_l,children:[g("overlay","Overlay",e.jsx(Wt,{}),e.jsxs("div",{style:Ql,children:[e.jsxs("label",{style:Fe,children:[e.jsx("span",{style:ne,children:"Hand Size"}),e.jsx("input",{style:Ve,type:"number",min:.25,max:1.8,step:.05,value:t.visualScale,onChange:i=>s({...t,visualScale:Number(i.target.value)})})]}),e.jsxs("label",{style:Fe,children:[e.jsx("span",{style:ne,children:"Opacity"}),e.jsx("input",{style:Ve,type:"number",min:0,max:1,step:.01,value:t.opacity,onChange:i=>s({...t,opacity:Number(i.target.value)})})]}),e.jsxs("label",{style:Fe,children:[e.jsx("span",{style:ne,children:"Joint Radius"}),e.jsx("input",{style:Ve,type:"number",min:1,max:20,step:1,value:t.pointRadius,onChange:i=>s({...t,pointRadius:Number(i.target.value)})})]}),e.jsxs("label",{style:Fe,children:[e.jsx("span",{style:ne,children:"Stroke"}),e.jsx("input",{style:Ve,type:"number",min:.01,max:100,step:.01,value:t.lineWidth,onChange:i=>s({...t,lineWidth:Number(i.target.value)})})]}),e.jsxs("label",{style:Fe,children:[e.jsx("span",{style:ne,children:"Smoothing"}),e.jsx("input",{style:Ve,type:"number",min:0,max:1,step:.01,value:t.smoothing,onChange:i=>s({...t,smoothing:Number(i.target.value)})})]}),e.jsxs("label",{style:Fe,children:[e.jsx("span",{style:ne,children:"Label Size"}),e.jsx("input",{style:Ve,type:"number",min:.25,max:3,step:.05,value:t.labelScale,onChange:i=>s({...t,labelScale:Number(i.target.value)})})]}),e.jsx("label",{style:et,children:e.jsxs("div",{style:tt,children:[e.jsx("span",{style:ne,children:"Bounding Box"}),e.jsx("input",{type:"checkbox",style:st,checked:t.showBoundingBox,onChange:i=>s({...t,showBoundingBox:i.target.checked})})]})})]})),g("visibility","Visibility",e.jsx(Wt,{}),e.jsxs(e.Fragment,{children:[e.jsx("label",{style:et,children:e.jsxs("div",{style:tt,children:[e.jsx("span",{style:ne,children:"Show Overlay"}),e.jsx("input",{type:"checkbox",style:st,checked:t.enabled,onChange:i=>s({...t,enabled:i.target.checked})})]})}),e.jsx("label",{style:et,children:e.jsxs("div",{style:tt,children:[e.jsx("span",{style:ne,children:"Both Hands"}),e.jsx("input",{type:"checkbox",style:st,checked:t.bothHands,onChange:i=>s({...t,bothHands:i.target.checked})})]})}),e.jsx("label",{style:et,children:e.jsxs("div",{style:tt,children:[e.jsx("span",{style:ne,children:"Show Labels"}),e.jsx("input",{type:"checkbox",style:st,checked:t.showLabels,onChange:i=>s({...t,showLabels:i.target.checked})})]})}),e.jsx("label",{style:et,children:e.jsxs("div",{style:tt,children:[e.jsx("span",{style:ne,children:"Log to Console"}),e.jsx("input",{type:"checkbox",style:st,checked:t.logToConsole,onChange:i=>s({...t,logToConsole:i.target.checked})})]})})]}))]})]}):e.jsx("div",{role:"button",tabIndex:0,onClick:()=>n(!0),style:Vl,children:e.jsx(ei,{})})]}),document.body)},ii={enabled:!0,attachImageEnabled:!0,showBoundingBox:!1,verticalAlign:"middle",horizontalAlign:"center",sizeResponsiveToHandBoundingBox:!1,size:1,offsetX:0,offsetY:.02,rotation:0,alpha:1,smoothFollowing:!0,smoothing:.35},oi=[{label:"Top",value:"top"},{label:"Middle",value:"middle"},{label:"Bottom",value:"bottom"}],ri=[{label:"Left",value:"left"},{label:"Middle",value:"center"},{label:"Right",value:"right"}],ai={position:"fixed",left:320,top:104,zIndex:2e4,pointerEvents:"none"},Ms={pointerEvents:"auto",width:286,borderRadius:16,border:"1px solid rgba(255,255,255,0.12)",background:"rgba(8, 15, 28, 0.58)",boxShadow:"0 16px 36px rgba(0,0,0,0.28)",backdropFilter:"blur(20px) saturate(1.1)",WebkitBackdropFilter:"blur(20px) saturate(1.1)",color:"#f8fafc",overflowX:"hidden",overflowY:"auto",scrollbarWidth:"thin",scrollbarColor:"rgba(148,163,184,0.55) rgba(255,255,255,0.06)",overscrollBehavior:"contain"},di={...Ms,width:32,height:32,borderRadius:16,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},ci={position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:7,padding:"7px 8px",borderBottom:"1px solid rgba(255,255,255,0.08)",background:"rgba(8, 15, 28, 0.88)",backdropFilter:"blur(20px) saturate(1.1)",WebkitBackdropFilter:"blur(20px) saturate(1.1)"},pi={display:"grid",gap:6,padding:7},hi={borderRadius:12,border:"1px solid rgba(255,255,255,0.08)",background:"rgba(255,255,255,0.03)",overflow:"hidden"},xi={display:"flex",alignItems:"center",gap:7,padding:"6px 7px"},ui={display:"flex",alignItems:"center",gap:6,fontSize:11,fontWeight:500,flex:"1 1 auto",minWidth:0},gi={width:28,height:16,borderRadius:999,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(255,255,255,0.08)",padding:2,display:"flex",alignItems:"center",cursor:"pointer",flex:"0 0 auto"},yi=t=>({width:10,height:10,borderRadius:999,background:t?"#f8fafc":"rgba(148,163,184,0.7)",transform:t?"translateX(12px)":"translateX(0)",transition:"transform 140ms ease, background 140ms ease"}),bi={display:"grid",gap:7,padding:"0 7px 7px"},fi={display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:6},pe={display:"flex",flexDirection:"column",gap:4},ke={...pe,gridColumn:"1 / -1"},B={fontSize:9,color:"rgba(226,232,240,0.72)"},ge={width:"100%",height:24,borderRadius:7,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(15,23,42,0.68)",color:"#f8fafc",fontSize:10.5,outline:"none",padding:"0 7px",boxSizing:"border-box"},Ce={display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,minHeight:24},Re={width:16,height:16},ds={display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:8,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(255,255,255,0.05)",color:"#e2e8f0",cursor:"pointer",padding:0,flex:"0 0 auto"},ji=()=>e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M7 10h10v2H7v-2zm0 4h10v2H7v-2zm0-8h10v2H7V6z"})}),mi=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M18.3 5.71 12 12l6.3 6.29-1.41 1.41L10.59 13.41 4.29 19.7 2.88 18.29 9.17 12 2.88 5.71 4.29 4.3l6.3 6.29 6.29-6.3z"})}),Si=()=>e.jsx("svg",{width:"11",height:"15",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M8 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM8 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM8 18a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM16 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM16 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM16 18a2 2 0 1 1-4 0 2 2 0 0 1 4 0z"})}),Lt=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M11 2a1 1 0 0 1 1 1v6h1V3a1 1 0 1 1 2 0v6h1V4a1 1 0 1 1 2 0v7.3l1.6 2.4a5 5 0 0 1 .8 2.7V18a4 4 0 0 1-4 4H9a6 6 0 0 1-6-6v-3.5a2.5 2.5 0 0 1 5 0V15h1V3a1 1 0 0 1 1-1z"})}),vi=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 5V2L7 7l5 5V9a4 4 0 1 1-4 4H6a6 6 0 1 0 6-8z"})}),wi=({value:t,onChange:s})=>{const[l,n]=y.useState(!0),[a,d]=y.useState({x:320,y:104}),[r,o]=y.useState(typeof window>"u"?0:window.innerHeight),[h,x]=y.useState({controller:!0,visibility:!1}),c=y.useRef(null),p=Math.max(240,r-a.y-16);y.useEffect(()=>{const i=j=>{c.current&&d({x:Math.max(8,j.clientX-c.current.x),y:Math.max(8,j.clientY-c.current.y)})},u=()=>{c.current=null,document.body.classList.remove("select-none")};return window.addEventListener("pointermove",i),window.addEventListener("pointerup",u),()=>{window.removeEventListener("pointermove",i),window.removeEventListener("pointerup",u)}},[]),y.useEffect(()=>{const i=()=>o(window.innerHeight);return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]);const f=i=>{const u=i.currentTarget.getBoundingClientRect();c.current={x:i.clientX-u.left,y:i.clientY-u.top},document.body.classList.add("select-none"),i.currentTarget.setPointerCapture(i.pointerId)},g=(i,u,j,w)=>e.jsxs("div",{style:hi,children:[e.jsxs("div",{style:xi,children:[e.jsx("button",{type:"button",onClick:()=>x(v=>({...v,[i]:!v[i]})),style:gi,children:e.jsx("div",{style:yi(h[i])})}),e.jsxs("div",{style:ui,children:[e.jsx("span",{style:{display:"flex",width:18,height:18,alignItems:"center",justifyContent:"center",borderRadius:6,background:"rgba(255,255,255,0.08)",border:"1px solid rgba(255,255,255,0.08)",color:"#e2e8f0",flex:"0 0 auto"},children:j}),e.jsx("span",{children:u})]})]}),h[i]?e.jsx("div",{style:bi,children:w}):null]},i);return typeof document>"u"?null:Ae.createPortal(e.jsxs("div",{style:{...ai,left:a.x,top:a.y},children:[e.jsx("style",{children:`
|
|
7
|
+
.xr-hand-tracking-2d-controller-scroll::-webkit-scrollbar { width: 10px; }
|
|
8
|
+
.xr-hand-tracking-2d-controller-scroll::-webkit-scrollbar-track { background: rgba(255,255,255,0.06); border-radius: 999px; }
|
|
9
|
+
.xr-hand-tracking-2d-controller-scroll::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.55); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
|
|
10
|
+
`}),l?e.jsxs("div",{className:"xr-hand-tracking-2d-controller-scroll",style:{...Ms,height:p},children:[e.jsxs("div",{style:ci,children:[e.jsx("div",{onPointerDown:f,style:{width:16,height:16,display:"flex",alignItems:"center",justifyContent:"center",cursor:"grab",color:"rgba(148,163,184,0.82)",flex:"0 0 auto"},children:e.jsx(Si,{})}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,fontSize:11,fontWeight:600,minWidth:0},children:[e.jsx("span",{style:{display:"flex",width:18,height:18,alignItems:"center",justifyContent:"center",borderRadius:6,background:"rgba(255,255,255,0.08)",border:"1px solid rgba(255,255,255,0.08)",color:"#e2e8f0",flex:"0 0 auto"},children:e.jsx(Lt,{})}),e.jsx("span",{children:"HandTracking2DController"})]}),e.jsx("div",{style:{flex:"1 1 auto"}}),e.jsx("button",{type:"button",onClick:()=>s(ii),style:ds,children:e.jsx(vi,{})}),e.jsx("button",{type:"button",onClick:()=>n(!1),style:ds,children:e.jsx(mi,{})})]}),e.jsxs("div",{style:pi,children:[g("controller","Controller",e.jsx(Lt,{}),e.jsxs("div",{style:fi,children:[e.jsx("label",{style:ke,children:e.jsxs("div",{style:Ce,children:[e.jsx("span",{style:B,children:"Enabled"}),e.jsx("input",{type:"checkbox",style:Re,checked:t.enabled,onChange:i=>s({...t,enabled:i.target.checked})})]})}),e.jsx("label",{style:ke,children:e.jsxs("div",{style:Ce,children:[e.jsx("span",{style:B,children:"Attach Image"}),e.jsx("input",{type:"checkbox",style:Re,checked:t.attachImageEnabled,onChange:i=>s({...t,attachImageEnabled:i.target.checked})})]})}),e.jsx("label",{style:ke,children:e.jsxs("div",{style:Ce,children:[e.jsx("span",{style:B,children:"Size Responsive to Hand Bounding Box"}),e.jsx("input",{type:"checkbox",style:Re,checked:t.sizeResponsiveToHandBoundingBox,onChange:i=>s({...t,sizeResponsiveToHandBoundingBox:i.target.checked})})]})}),e.jsxs("label",{style:pe,children:[e.jsx("span",{style:B,children:"Size"}),e.jsx("input",{style:ge,type:"number",min:.1,max:3,step:.01,value:t.size,onChange:i=>s({...t,size:Number(i.target.value)})})]}),e.jsxs("label",{style:pe,children:[e.jsx("span",{style:B,children:"Vertical Align"}),e.jsx("select",{style:ge,value:t.verticalAlign,onChange:i=>s({...t,verticalAlign:i.target.value}),children:oi.map(i=>e.jsx("option",{value:i.value,children:i.label},i.value))})]}),e.jsxs("label",{style:pe,children:[e.jsx("span",{style:B,children:"Horizontal Align"}),e.jsx("select",{style:ge,value:t.horizontalAlign,onChange:i=>s({...t,horizontalAlign:i.target.value}),children:ri.map(i=>e.jsx("option",{value:i.value,children:i.label},i.value))})]}),e.jsxs("label",{style:pe,children:[e.jsx("span",{style:B,children:"Offset X"}),e.jsx("input",{style:ge,type:"number",min:-1,max:1,step:.01,value:t.offsetX,onChange:i=>s({...t,offsetX:Number(i.target.value)})})]}),e.jsxs("label",{style:pe,children:[e.jsx("span",{style:B,children:"Offset Y"}),e.jsx("input",{style:ge,type:"number",min:-1,max:1,step:.01,value:t.offsetY,onChange:i=>s({...t,offsetY:Number(i.target.value)})})]}),e.jsxs("label",{style:pe,children:[e.jsx("span",{style:B,children:"Rotation"}),e.jsx("input",{style:ge,type:"number",min:-180,max:180,step:.1,value:t.rotation,onChange:i=>s({...t,rotation:Number(i.target.value)})})]}),e.jsxs("label",{style:pe,children:[e.jsx("span",{style:B,children:"Alpha"}),e.jsx("input",{style:ge,type:"number",min:0,max:1,step:.01,value:t.alpha,onChange:i=>s({...t,alpha:Number(i.target.value)})})]}),e.jsx("label",{style:ke,children:e.jsxs("div",{style:Ce,children:[e.jsx("span",{style:B,children:"Smooth Following"}),e.jsx("input",{type:"checkbox",style:Re,checked:t.smoothFollowing,onChange:i=>s({...t,smoothFollowing:i.target.checked})})]})}),e.jsxs("label",{style:pe,children:[e.jsx("span",{style:B,children:"Smoothing"}),e.jsx("input",{style:ge,type:"number",min:0,max:1,step:.01,value:t.smoothing,onChange:i=>s({...t,smoothing:Number(i.target.value)})})]})]})),g("visibility","Visibility",e.jsx(Lt,{}),e.jsxs(e.Fragment,{children:[e.jsx("label",{style:ke,children:e.jsxs("div",{style:Ce,children:[e.jsx("span",{style:B,children:"Show Overlay"}),e.jsx("input",{type:"checkbox",style:Re,checked:t.enabled,onChange:i=>s({...t,enabled:i.target.checked})})]})}),e.jsx("label",{style:ke,children:e.jsxs("div",{style:Ce,children:[e.jsx("span",{style:B,children:"Show Attach Image"}),e.jsx("input",{type:"checkbox",style:Re,checked:t.attachImageEnabled,onChange:i=>s({...t,attachImageEnabled:i.target.checked})})]})}),e.jsx("label",{style:ke,children:e.jsxs("div",{style:Ce,children:[e.jsx("span",{style:B,children:"Show Bounding Box"}),e.jsx("input",{type:"checkbox",style:Re,checked:t.showBoundingBox,onChange:i=>s({...t,showBoundingBox:i.target.checked})})]})})]}))]})]}):e.jsx("div",{role:"button",tabIndex:0,onClick:()=>n(!0),style:di,children:e.jsx(ji,{})})]}),document.body)},ki={position:"fixed",left:320,top:104,zIndex:2e4,pointerEvents:"none"},Fs={pointerEvents:"auto",width:286,borderRadius:16,border:"1px solid rgba(255,255,255,0.12)",background:"rgba(8, 15, 28, 0.58)",boxShadow:"0 16px 36px rgba(0,0,0,0.28)",backdropFilter:"blur(20px) saturate(1.1)",WebkitBackdropFilter:"blur(20px) saturate(1.1)",color:"#f8fafc",overflowX:"hidden",overflowY:"auto",scrollbarWidth:"thin",scrollbarColor:"rgba(148,163,184,0.55) rgba(255,255,255,0.06)",overscrollBehavior:"contain"},Ci={...Fs,width:32,height:32,borderRadius:16,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},Ri={position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:7,padding:"7px 8px",borderBottom:"1px solid rgba(255,255,255,0.08)",background:"rgba(8, 15, 28, 0.88)",backdropFilter:"blur(20px) saturate(1.1)",WebkitBackdropFilter:"blur(20px) saturate(1.1)"},Ii={display:"grid",gap:6,padding:7},Ei={borderRadius:12,border:"1px solid rgba(255,255,255,0.08)",background:"rgba(255,255,255,0.03)",overflow:"hidden"},Ti={display:"flex",alignItems:"center",gap:7,padding:"6px 7px"},zi={display:"flex",alignItems:"center",gap:6,fontSize:11,fontWeight:500,flex:"1 1 auto",minWidth:0},Mi={width:28,height:16,borderRadius:999,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(255,255,255,0.08)",padding:2,display:"flex",alignItems:"center",cursor:"pointer",flex:"0 0 auto"},Fi=t=>({width:10,height:10,borderRadius:999,background:t?"#f8fafc":"rgba(148,163,184,0.7)",transform:t?"translateX(12px)":"translateX(0)",transition:"transform 140ms ease, background 140ms ease"}),Wi={display:"grid",gap:7,padding:"0 7px 7px"},cs={display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:6},be={display:"flex",flexDirection:"column",gap:4},Ie={...be,gridColumn:"1 / -1"},H={fontSize:9,color:"rgba(226,232,240,0.72)"},Ee={width:"100%",height:24,borderRadius:7,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(15,23,42,0.68)",color:"#f8fafc",fontSize:10.5,outline:"none",padding:"0 7px",boxSizing:"border-box"},Te={display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,minHeight:24},ze={width:16,height:16},ps={display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:8,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(255,255,255,0.05)",color:"#e2e8f0",cursor:"pointer",padding:0,flex:"0 0 auto"},Li=()=>e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M7 10h10v2H7v-2zm0 4h10v2H7v-2zm0-8h10v2H7V6z"})}),$i=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M18.3 5.71 12 12l6.3 6.29-1.41 1.41L10.59 13.41 4.29 19.7 2.88 18.29 9.17 12 2.88 5.71 4.29 4.3l6.3 6.29 6.29-6.3z"})}),Ni=()=>e.jsx("svg",{width:"11",height:"15",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M8 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM8 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM8 18a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM16 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM16 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM16 18a2 2 0 1 1-4 0 2 2 0 0 1 4 0z"})}),$t=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M8 5a3 3 0 1 1-3-3 3 3 0 0 1 3 3zm11 11a3 3 0 1 0 3 3 3 3 0 0 0-3-3zM7.1 7.1l9.8 9.8 1.4-1.4-9.8-9.8-1.4 1.4zM19 2a3 3 0 1 0 3 3 3 3 0 0 0-3-3zM7.1 16.9l9.8-9.8-1.4-1.4-9.8 9.8 1.4 1.4zM5 16a3 3 0 1 0 3 3 3 3 0 0 0-3-3z"})}),Oi=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 5V2L7 7l5 5V9a4 4 0 1 1-4 4H6a6 6 0 1 0 6-8z"})}),Ai=({value:t,onChange:s})=>{const[l,n]=y.useState(!0),[a,d]=y.useState({x:320,y:104}),[r,o]=y.useState(typeof window>"u"?0:window.innerHeight),[h,x]=y.useState({joints:!0,visibility:!0}),c=y.useRef(null),p=Math.max(240,r-a.y-16);y.useEffect(()=>{const i=j=>{c.current&&d({x:Math.max(8,j.clientX-c.current.x),y:Math.max(8,j.clientY-c.current.y)})},u=()=>{c.current=null,document.body.classList.remove("select-none")};return window.addEventListener("pointermove",i),window.addEventListener("pointerup",u),()=>{window.removeEventListener("pointermove",i),window.removeEventListener("pointerup",u)}},[]),y.useEffect(()=>{const i=()=>o(window.innerHeight);return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]);const f=i=>{const u=i.currentTarget.getBoundingClientRect();c.current={x:i.clientX-u.left,y:i.clientY-u.top},document.body.classList.add("select-none"),i.currentTarget.setPointerCapture(i.pointerId)},g=(i,u,j,w)=>e.jsxs("div",{style:Ei,children:[e.jsxs("div",{style:Ti,children:[e.jsx("button",{type:"button",onClick:()=>x(v=>({...v,[i]:!v[i]})),style:Mi,children:e.jsx("div",{style:Fi(h[i])})}),e.jsxs("div",{style:zi,children:[e.jsx("span",{style:{display:"flex",width:18,height:18,alignItems:"center",justifyContent:"center",borderRadius:6,background:"rgba(255,255,255,0.08)",border:"1px solid rgba(255,255,255,0.08)",color:"#e2e8f0",flex:"0 0 auto"},children:j}),e.jsx("span",{children:u})]})]}),h[i]?e.jsx("div",{style:Wi,children:w}):null]},i);return typeof document>"u"?null:Ae.createPortal(e.jsx("div",{style:{...ki,left:a.x,top:a.y},children:l?e.jsxs("div",{style:{...Fs,height:p},children:[e.jsxs("div",{style:Ri,children:[e.jsx("div",{onPointerDown:f,style:{width:16,height:16,display:"flex",alignItems:"center",justifyContent:"center",cursor:"grab",color:"rgba(148,163,184,0.82)",flex:"0 0 auto"},children:e.jsx(Ni,{})}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,fontSize:11,fontWeight:600,minWidth:0},children:[e.jsx("span",{style:{display:"flex",width:18,height:18,alignItems:"center",justifyContent:"center",borderRadius:6,background:"rgba(255,255,255,0.08)",border:"1px solid rgba(255,255,255,0.08)",color:"#e2e8f0",flex:"0 0 auto"},children:e.jsx($t,{})}),e.jsx("span",{children:"HandJoints2D"})]}),e.jsx("div",{style:{flex:"1 1 auto"}}),e.jsx("button",{type:"button",onClick:()=>s(Ne.DEFAULT_HAND_JOINTS_2D_SETTINGS),style:ps,children:e.jsx(Oi,{})}),e.jsx("button",{type:"button",onClick:()=>n(!1),style:ps,children:e.jsx($i,{})})]}),e.jsxs("div",{style:Ii,children:[g("joints","Joints",e.jsx($t,{}),e.jsxs("div",{style:cs,children:[e.jsxs("label",{style:be,children:[e.jsx("span",{style:H,children:"Visual Scale"}),e.jsx("input",{style:Ee,type:"number",min:.25,max:2,step:.01,value:t.visualScale,onChange:i=>s({...t,visualScale:Number(i.target.value)})})]}),e.jsxs("label",{style:be,children:[e.jsx("span",{style:H,children:"Opacity"}),e.jsx("input",{style:Ee,type:"number",min:0,max:1,step:.01,value:t.opacity,onChange:i=>s({...t,opacity:Number(i.target.value)})})]}),e.jsxs("label",{style:be,children:[e.jsx("span",{style:H,children:"Joint Radius"}),e.jsx("input",{style:Ee,type:"number",min:.5,max:24,step:.5,value:t.jointRadius,onChange:i=>s({...t,jointRadius:Number(i.target.value)})})]}),e.jsxs("label",{style:be,children:[e.jsx("span",{style:H,children:"Line Width"}),e.jsx("input",{style:Ee,type:"number",min:.01,max:100,step:.1,value:t.lineWidth,onChange:i=>s({...t,lineWidth:Number(i.target.value)})})]}),e.jsxs("label",{style:be,children:[e.jsx("span",{style:H,children:"Label Size"}),e.jsx("input",{style:Ee,type:"number",min:.25,max:3,step:.05,value:t.labelScale,onChange:i=>s({...t,labelScale:Number(i.target.value)})})]}),e.jsxs("label",{style:be,children:[e.jsx("span",{style:H,children:"Smoothing"}),e.jsx("input",{style:Ee,type:"number",min:0,max:1,step:.01,value:t.smoothing,onChange:i=>s({...t,smoothing:Number(i.target.value)})})]}),e.jsxs("label",{style:be,children:[e.jsx("span",{style:H,children:"Min Count Confidence"}),e.jsx("input",{style:Ee,type:"number",min:0,max:1,step:.01,value:t.minCountConfidence,onChange:i=>s({...t,minCountConfidence:Number(i.target.value)})})]})]})),g("visibility","Visibility",e.jsx($t,{}),e.jsxs("div",{style:cs,children:[e.jsx("label",{style:Ie,children:e.jsxs("div",{style:Te,children:[e.jsx("span",{style:H,children:"Show Joints"}),e.jsx("input",{type:"checkbox",style:ze,checked:t.enabled,onChange:i=>s({...t,enabled:i.target.checked})})]})}),e.jsx("label",{style:Ie,children:e.jsxs("div",{style:Te,children:[e.jsx("span",{style:H,children:"Both Hands"}),e.jsx("input",{type:"checkbox",style:ze,checked:t.bothHands,onChange:i=>s({...t,bothHands:i.target.checked})})]})}),e.jsx("label",{style:Ie,children:e.jsxs("div",{style:Te,children:[e.jsx("span",{style:H,children:"Count Fingers"}),e.jsx("input",{type:"checkbox",style:ze,checked:t.countEnabled,onChange:i=>s({...t,countEnabled:i.target.checked})})]})}),e.jsx("label",{style:Ie,children:e.jsxs("div",{style:Te,children:[e.jsx("span",{style:H,children:"Joint Dots"}),e.jsx("input",{type:"checkbox",style:ze,checked:t.showJoints,onChange:i=>s({...t,showJoints:i.target.checked})})]})}),e.jsx("label",{style:Ie,children:e.jsxs("div",{style:Te,children:[e.jsx("span",{style:H,children:"Bone Lines"}),e.jsx("input",{type:"checkbox",style:ze,checked:t.showBones,onChange:i=>s({...t,showBones:i.target.checked})})]})}),e.jsx("label",{style:Ie,children:e.jsxs("div",{style:Te,children:[e.jsx("span",{style:H,children:"Bounding Box"}),e.jsx("input",{type:"checkbox",style:ze,checked:t.showBoundingBox,onChange:i=>s({...t,showBoundingBox:i.target.checked})})]})}),e.jsx("label",{style:Ie,children:e.jsxs("div",{style:Te,children:[e.jsx("span",{style:H,children:"Labels"}),e.jsx("input",{type:"checkbox",style:ze,checked:t.showLabels,onChange:i=>s({...t,showLabels:i.target.checked})})]})})]}))]})]}):e.jsx("div",{role:"button",tabIndex:0,onClick:()=>n(!0),style:Ci,children:e.jsx(Li,{})})}),document.body)},Pi={enabled:!0,bothHands:!0,space:"scene",showJoints:!0,showBones:!0,showLabels:!1,handScale:1,depthScale:1,trackingDistanceM:.6096,projectionDistanceM:2,fitX:1,fitY:.9,offsetX:0,offsetY:0,offsetZ:0,jointRadius:.012,boneRadius:.012,opacity:.88,smoothing:.35},Di={position:"fixed",left:320,top:104,zIndex:2e4,pointerEvents:"none"},Ws={pointerEvents:"auto",width:286,borderRadius:16,border:"1px solid rgba(255,255,255,0.12)",background:"rgba(8, 15, 28, 0.58)",boxShadow:"0 16px 36px rgba(0,0,0,0.28)",backdropFilter:"blur(20px) saturate(1.1)",WebkitBackdropFilter:"blur(20px) saturate(1.1)",color:"#f8fafc",overflowX:"hidden",overflowY:"auto",scrollbarWidth:"thin",scrollbarColor:"rgba(148,163,184,0.55) rgba(255,255,255,0.06)",overscrollBehavior:"contain"},Bi={...Ws,width:32,height:32,borderRadius:16,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},Vi={position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:7,padding:"7px 8px",borderBottom:"1px solid rgba(255,255,255,0.08)",background:"rgba(8, 15, 28, 0.88)",backdropFilter:"blur(20px) saturate(1.1)",WebkitBackdropFilter:"blur(20px) saturate(1.1)"},Ki={display:"grid",gap:6,padding:7},Hi={borderRadius:12,border:"1px solid rgba(255,255,255,0.08)",background:"rgba(255,255,255,0.03)",overflow:"hidden"},Gi={display:"flex",alignItems:"center",gap:7,padding:"6px 7px"},_i={display:"flex",alignItems:"center",gap:6,fontSize:11,fontWeight:500,flex:"1 1 auto",minWidth:0},Ui={width:28,height:16,borderRadius:999,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(255,255,255,0.08)",padding:2,display:"flex",alignItems:"center",cursor:"pointer",flex:"0 0 auto"},Xi=t=>({width:10,height:10,borderRadius:999,background:t?"#f8fafc":"rgba(148,163,184,0.7)",transform:t?"translateX(12px)":"translateX(0)",transition:"transform 140ms ease, background 140ms ease"}),Zi={display:"grid",gap:7,padding:"0 7px 7px"},Nt={display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:6},_={display:"flex",flexDirection:"column",gap:4},Ke={..._,gridColumn:"1 / -1"},O={fontSize:9,color:"rgba(226,232,240,0.72)"},G={width:"100%",height:24,borderRadius:7,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(15,23,42,0.68)",color:"#f8fafc",fontSize:10.5,outline:"none",padding:"0 7px",boxSizing:"border-box"},nt={display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,minHeight:24},lt={width:16,height:16},hs={display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:8,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(255,255,255,0.05)",color:"#e2e8f0",cursor:"pointer",padding:0,flex:"0 0 auto"},Yi=()=>e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M7 10h10v2H7v-2zm0 4h10v2H7v-2zm0-8h10v2H7V6z"})}),qi=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M18.3 5.71 12 12l6.3 6.29-1.41 1.41L10.59 13.41 4.29 19.7 2.88 18.29 9.17 12 2.88 5.71 4.29 4.3l6.3 6.29 6.29-6.3z"})}),Ji=()=>e.jsx("svg",{width:"11",height:"15",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M8 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM8 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM8 18a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM16 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM16 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM16 18a2 2 0 1 1-4 0 2 2 0 0 1 4 0z"})}),jt=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M11 2a1 1 0 0 1 1 1v6h1V3a1 1 0 1 1 2 0v6h1V4a1 1 0 1 1 2 0v7.3l1.6 2.4a5 5 0 0 1 .8 2.7V18a4 4 0 0 1-4 4H9a6 6 0 0 1-6-6v-3.5a2.5 2.5 0 0 1 5 0V15h1V3a1 1 0 0 1 1-1z"})}),Qi=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 5V2L7 7l5 5V9a4 4 0 1 1-4 4H6a6 6 0 1 0 6-8z"})}),eo=({value:t,onChange:s})=>{const[l,n]=y.useState(!0),[a,d]=y.useState({x:320,y:104}),[r,o]=y.useState(typeof window>"u"?0:window.innerHeight),[h,x]=y.useState({visual:!0,calibration:!0,visibility:!0}),c=y.useRef(null),p=Math.max(240,r-a.y-16);y.useEffect(()=>{const i=j=>{c.current&&d({x:Math.max(8,j.clientX-c.current.x),y:Math.max(8,j.clientY-c.current.y)})},u=()=>{c.current=null,document.body.classList.remove("select-none")};return window.addEventListener("pointermove",i),window.addEventListener("pointerup",u),()=>{window.removeEventListener("pointermove",i),window.removeEventListener("pointerup",u)}},[]),y.useEffect(()=>{const i=()=>o(window.innerHeight);return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]);const f=i=>{const u=i.currentTarget.getBoundingClientRect();c.current={x:i.clientX-u.left,y:i.clientY-u.top},document.body.classList.add("select-none"),i.currentTarget.setPointerCapture(i.pointerId)},g=(i,u,j,w)=>e.jsxs("div",{style:Hi,children:[e.jsxs("div",{style:Gi,children:[e.jsx("button",{type:"button",onClick:()=>x(v=>({...v,[i]:!v[i]})),style:Ui,children:e.jsx("div",{style:Xi(h[i])})}),e.jsxs("div",{style:_i,children:[e.jsx("span",{style:{display:"flex",width:18,height:18,alignItems:"center",justifyContent:"center",borderRadius:6,background:"rgba(255,255,255,0.08)",border:"1px solid rgba(255,255,255,0.08)",color:"#e2e8f0",flex:"0 0 auto"},children:j}),e.jsx("span",{children:u})]})]}),h[i]?e.jsx("div",{style:Zi,children:w}):null]},i);return typeof document>"u"?null:Ae.createPortal(e.jsx("div",{style:{...Di,left:a.x,top:a.y},children:l?e.jsxs("div",{style:{...Ws,height:p},children:[e.jsxs("div",{style:Vi,children:[e.jsx("div",{onPointerDown:f,style:{width:16,height:16,display:"flex",alignItems:"center",justifyContent:"center",cursor:"grab",color:"rgba(148,163,184,0.82)",flex:"0 0 auto"},children:e.jsx(Ji,{})}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,fontSize:11,fontWeight:600,minWidth:0},children:[e.jsx("span",{style:{display:"flex",width:18,height:18,alignItems:"center",justifyContent:"center",borderRadius:6,background:"rgba(255,255,255,0.08)",border:"1px solid rgba(255,255,255,0.08)",color:"#e2e8f0",flex:"0 0 auto"},children:e.jsx(jt,{})}),e.jsx("span",{children:"HandTracking3D"})]}),e.jsx("div",{style:{flex:"1 1 auto"}}),e.jsx("button",{type:"button",onClick:()=>s(Pi),style:hs,children:e.jsx(Qi,{})}),e.jsx("button",{type:"button",onClick:()=>n(!1),style:hs,children:e.jsx(qi,{})})]}),e.jsxs("div",{style:Ki,children:[g("visual","Visual",e.jsx(jt,{}),e.jsxs("div",{style:Nt,children:[e.jsxs("label",{style:Ke,children:[e.jsx("span",{style:O,children:"Space"}),e.jsxs("select",{style:G,value:t.space,onChange:i=>s({...t,space:i.target.value}),children:[e.jsx("option",{value:"scene",children:"Scene"}),e.jsx("option",{value:"screen",children:"Screen Fit"})]})]}),e.jsxs("label",{style:_,children:[e.jsx("span",{style:O,children:"Joint Size"}),e.jsx("input",{style:G,type:"number",min:5e-4,max:.08,step:5e-4,value:t.jointRadius,onChange:i=>s({...t,jointRadius:Number(i.target.value)})})]}),e.jsxs("label",{style:_,children:[e.jsx("span",{style:O,children:"Bone Radius"}),e.jsx("input",{style:G,type:"number",min:.001,max:.12,step:.001,value:t.boneRadius,onChange:i=>s({...t,boneRadius:Number(i.target.value)})})]}),e.jsxs("label",{style:_,children:[e.jsx("span",{style:O,children:"Opacity"}),e.jsx("input",{style:G,type:"number",min:0,max:1,step:.01,value:t.opacity,onChange:i=>s({...t,opacity:Number(i.target.value)})})]}),e.jsxs("label",{style:_,children:[e.jsx("span",{style:O,children:"Smoothing"}),e.jsx("input",{style:G,type:"number",min:0,max:1,step:.01,value:t.smoothing,onChange:i=>s({...t,smoothing:Number(i.target.value)})})]})]})),g("calibration","Calibration",e.jsx(jt,{}),e.jsxs("div",{style:Nt,children:[e.jsxs("label",{style:_,children:[e.jsx("span",{style:O,children:"Hand Distance Ref (m)"}),e.jsx("input",{style:G,type:"number",min:.05,max:5,step:.01,value:t.trackingDistanceM,onChange:i=>s({...t,trackingDistanceM:Number(i.target.value)})})]}),e.jsxs("label",{style:_,children:[e.jsx("span",{style:O,children:"Projection Distance"}),e.jsx("input",{style:G,type:"number",min:.05,max:10,step:.01,value:t.projectionDistanceM,onChange:i=>s({...t,projectionDistanceM:Number(i.target.value)})})]}),e.jsxs("label",{style:_,children:[e.jsx("span",{style:O,children:"Hand Scale"}),e.jsx("input",{style:G,type:"number",min:.1,max:8,step:.01,value:t.handScale,onChange:i=>s({...t,handScale:Number(i.target.value)})})]}),e.jsxs("label",{style:_,children:[e.jsx("span",{style:O,children:"Fit X"}),e.jsx("input",{style:G,type:"number",min:.1,max:4,step:.01,value:t.fitX,onChange:i=>s({...t,fitX:Number(i.target.value)})})]}),e.jsxs("label",{style:_,children:[e.jsx("span",{style:O,children:"Fit Y"}),e.jsx("input",{style:G,type:"number",min:.1,max:4,step:.01,value:t.fitY,onChange:i=>s({...t,fitY:Number(i.target.value)})})]}),e.jsxs("label",{style:_,children:[e.jsx("span",{style:O,children:"Offset X"}),e.jsx("input",{style:G,type:"number",min:-5,max:5,step:.01,value:t.offsetX,onChange:i=>s({...t,offsetX:Number(i.target.value)})})]}),e.jsxs("label",{style:_,children:[e.jsx("span",{style:O,children:"Offset Y"}),e.jsx("input",{style:G,type:"number",min:-5,max:5,step:.01,value:t.offsetY,onChange:i=>s({...t,offsetY:Number(i.target.value)})})]}),e.jsxs("label",{style:_,children:[e.jsx("span",{style:O,children:"Offset Z"}),e.jsx("input",{style:G,type:"number",min:-5,max:5,step:.01,value:t.offsetZ,onChange:i=>s({...t,offsetZ:Number(i.target.value)})})]}),e.jsxs("label",{style:_,children:[e.jsx("span",{style:O,children:"Depth Scale"}),e.jsx("input",{style:G,type:"number",min:0,max:10,step:.1,value:t.depthScale,onChange:i=>s({...t,depthScale:Number(i.target.value)})})]})]})),g("visibility","Visibility",e.jsx(jt,{}),e.jsxs("div",{style:Nt,children:[e.jsx("label",{style:Ke,children:e.jsxs("div",{style:nt,children:[e.jsx("span",{style:O,children:"Show 3D Hand"}),e.jsx("input",{type:"checkbox",style:lt,checked:t.enabled,onChange:i=>s({...t,enabled:i.target.checked})})]})}),e.jsx("label",{style:Ke,children:e.jsxs("div",{style:nt,children:[e.jsx("span",{style:O,children:"Both Hands"}),e.jsx("input",{type:"checkbox",style:lt,checked:t.bothHands,onChange:i=>s({...t,bothHands:i.target.checked})})]})}),e.jsx("label",{style:Ke,children:e.jsxs("div",{style:nt,children:[e.jsx("span",{style:O,children:"Joint Spheres"}),e.jsx("input",{type:"checkbox",style:lt,checked:t.showJoints,onChange:i=>s({...t,showJoints:i.target.checked})})]})}),e.jsx("label",{style:Ke,children:e.jsxs("div",{style:nt,children:[e.jsx("span",{style:O,children:"Bone Cylinders"}),e.jsx("input",{type:"checkbox",style:lt,checked:t.showBones,onChange:i=>s({...t,showBones:i.target.checked})})]})}),e.jsx("label",{style:Ke,children:e.jsxs("div",{style:nt,children:[e.jsx("span",{style:O,children:"Labels"}),e.jsx("input",{type:"checkbox",style:lt,checked:t.showLabels,onChange:i=>s({...t,showLabels:i.target.checked})})]})})]}))]})]}):e.jsx("div",{role:"button",tabIndex:0,onClick:()=>n(!0),style:Bi,children:e.jsx(Yi,{})})}),document.body)},to=1e3;function so(t,s=to){return t.map((l,n)=>({...l,renderOrder:s+(t.length-n)}))}function no(t,s,l){const n=t.findIndex(o=>o.id===s),a=t.findIndex(o=>o.id===l);if(n<0||a<0||n===a)return t;const d=[...t],[r]=d.splice(n,1);return d.splice(a,0,r),so(d)}const lo={position:"fixed",left:14,top:104,zIndex:2e4,pointerEvents:"none"},xs={pointerEvents:"auto",width:284,borderRadius:16,border:"1px solid rgba(255,255,255,0.12)",background:"rgba(8, 15, 28, 0.58)",boxShadow:"0 16px 36px rgba(0,0,0,0.28)",backdropFilter:"blur(20px) saturate(1.1)",WebkitBackdropFilter:"blur(20px) saturate(1.1)",color:"#f8fafc",overflowX:"hidden",overflowY:"auto",scrollbarWidth:"thin",scrollbarColor:"rgba(148,163,184,0.55) rgba(255,255,255,0.06)",overscrollBehavior:"contain"},Vt={display:"inline-flex",alignItems:"center",justifyContent:"center",width:22,height:22,borderRadius:8,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(255,255,255,0.05)",color:"#e2e8f0",cursor:"pointer",padding:0,flex:"0 0 auto"},io={position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:8,padding:"8px 8px",borderBottom:"1px solid rgba(255,255,255,0.08)",background:"rgba(8, 15, 28, 0.88)",backdropFilter:"blur(20px) saturate(1.1)",WebkitBackdropFilter:"blur(20px) saturate(1.1)"},oo={width:16,height:16,display:"flex",alignItems:"center",justifyContent:"center",cursor:"grab",color:"rgba(148,163,184,0.82)",flex:"0 0 auto"},ro={display:"flex",alignItems:"center",gap:6,fontSize:11,fontWeight:600,minWidth:0},ao={display:"flex",width:18,height:18,alignItems:"center",justifyContent:"center",borderRadius:6,background:"rgba(255,255,255,0.08)",border:"1px solid rgba(255,255,255,0.08)",color:"#e2e8f0",flex:"0 0 auto"},co={display:"grid",gap:6,padding:7},po=t=>({display:"grid",gridTemplateColumns:"20px 20px 20px minmax(0, 1fr)",alignItems:"center",gap:6,minHeight:34,padding:"6px 7px",borderRadius:10,border:t?"1px solid rgba(56,189,248,0.5)":"1px solid rgba(255,255,255,0.08)",background:t?"rgba(56,189,248,0.10)":"rgba(255,255,255,0.03)",cursor:"pointer",opacity:1}),ho={display:"flex",flexDirection:"column",gap:2,minWidth:0},xo={fontSize:10,fontWeight:600,lineHeight:1.15,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},uo={fontSize:9,color:"rgba(226,232,240,0.6)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},Ot={...Vt,width:20,height:20,borderRadius:7,fontSize:11,lineHeight:1},go=({off:t=!1})=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:t?e.jsx("path",{d:"M2 2l20 20-1.4 1.4-3.2-3.2C15.9 21 14.1 21.5 12 21.5 6.5 21.5 2 16 1 12c.4-1.8 1.1-3.4 2.2-4.8L.6 4.6 2 2zm10 4c3.9 0 7.4 2.8 9.2 6-1 1.8-2.6 3.5-4.4 4.6l-2-2c.1-.3.2-.7.2-1.1a3 3 0 0 0-3-3c-.4 0-.8.1-1.1.2l-1.9-1.9C10.2 6.8 11.1 6 12 6z"}):e.jsx("path",{d:"M12 5c5.5 0 10 5 11 7-.9 2-5.5 7-11 7S2 14 1 12c1-2 5.5-7 11-7zm0 3.2A3.8 3.8 0 1 0 12 16.8 3.8 3.8 0 0 0 12 8.2z"})}),yo=({off:t=!1})=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:t?e.jsx("path",{d:"M18 8h-1V6a5 5 0 0 0-9.1-2.9l1.5 1.5A3 3 0 0 1 16 6v2H8a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h9.2l1.8 1.8 1.4-1.4L2.6 3.4 1.2 4.8 5 8.6V20h14a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2z"}):e.jsx("path",{d:"M7 10V8a5 5 0 0 1 10 0v2h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h1zm2 0h6V8a3 3 0 0 0-6 0v2z"})}),bo=()=>e.jsx("svg",{width:"11",height:"15",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M11 2h2v4h3l-4 4-4-4h3V2zm0 20v-4H8l4-4 4 4h-3v4h-2zM2 11h4V8l4 4-4 4v-3H2v-2zm20 0v2h-4v3l-4-4 4-4v3h4z"})}),us=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 3 1 9l11 6 11-6-11-6zm0 8L1 5v4l11 6 11-6V5l-11 6zm0 6L1 11v4l11 6 11-6v-4l-11 6z"})}),fo=({layers:t,selectedLayerId:s,onSelectLayer:l,onToggleVisible:n,onToggleEnabled:a,onReorder:d,onToggleLocked:r,initialPosition:o,title:h="Layers"})=>{const[x,c]=y.useState(!0),[p,f]=y.useState(o??{x:644,y:104}),[g,i]=y.useState(typeof window>"u"?0:window.innerHeight),u=y.useRef(null),[j,w]=y.useState(null),v=Math.max(240,g-p.y-16);if(y.useEffect(()=>{const b=E=>{u.current&&f({x:Math.max(8,E.clientX-u.current.x),y:Math.max(8,E.clientY-u.current.y)})},F=()=>{u.current=null,document.body.classList.remove("select-none")};return window.addEventListener("pointermove",b),window.addEventListener("pointerup",F),()=>{window.removeEventListener("pointermove",b),window.removeEventListener("pointerup",F)}},[]),y.useEffect(()=>{const b=()=>i(window.innerHeight);return window.addEventListener("resize",b),()=>window.removeEventListener("resize",b)},[]),typeof document>"u")return null;const M=b=>{const F=b.currentTarget.getBoundingClientRect();u.current={x:b.clientX-F.left,y:b.clientY-F.top},document.body.classList.add("select-none"),b.currentTarget.setPointerCapture(b.pointerId)},U=b=>{if(!j||j===b){w(null);return}const F=t.findIndex(P=>P.id===j),E=t.findIndex(P=>P.id===b);if(F<0||E<0){w(null);return}d(no(t,j,b)),w(null)};return Ae.createPortal(e.jsx("div",{style:{...lo,left:p.x,top:p.y},children:x?e.jsxs("div",{style:{...xs,height:v},children:[e.jsxs("div",{style:io,children:[e.jsx("div",{onPointerDown:M,style:oo,children:e.jsx(bo,{})}),e.jsxs("div",{style:ro,children:[e.jsx("span",{style:ao,children:e.jsx(us,{})}),e.jsx("span",{children:h})]}),e.jsx("div",{style:{flex:"1 1 auto"}}),e.jsx("button",{type:"button",onClick:()=>c(!1),style:Vt,children:"−"})]}),e.jsx("div",{style:co,children:t.map((b,F)=>e.jsxs("div",{style:po(s===b.id),draggable:!0,onDragStart:()=>w(b.id),onDragOver:E=>E.preventDefault(),onDrop:()=>U(b.id),onClick:()=>l(b.id),title:b.label,children:[e.jsx("button",{type:"button",style:Ot,onClick:E=>{E.stopPropagation(),n(b.id,!b.visible)},children:e.jsx(go,{off:!b.visible})}),e.jsx("button",{type:"button",style:Ot,onClick:E=>{E.stopPropagation(),a(b.id,!b.enabled)},children:b.enabled?"●":"○"}),e.jsx("button",{type:"button",style:Ot,onClick:E=>{E.stopPropagation(),r==null||r(b.id,!b.locked)},children:e.jsx(yo,{off:!b.locked})}),e.jsxs("div",{style:ho,children:[e.jsx("div",{style:xo,children:b.label}),e.jsxs("div",{style:uo,children:[b.domain," / ",b.type," • #",t.length-F]})]})]},b.id))})]}):e.jsx("div",{role:"button",tabIndex:0,onClick:()=>c(!0),style:{...xs,...Vt,width:32,height:32,display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(us,{})})}),document.body)},At={pointerEvents:"auto",width:300,borderRadius:16,border:"1px solid rgba(255,255,255,.12)",background:"rgba(8,15,28,.78)",boxShadow:"0 16px 36px rgba(0,0,0,.28)",backdropFilter:"blur(20px) saturate(1.1)",color:"#f8fafc",overflow:"auto"},it={display:"inline-flex",alignItems:"center",justifyContent:"center",width:22,height:22,padding:0,borderRadius:7,border:"1px solid rgba(255,255,255,.1)",background:"rgba(255,255,255,.05)",color:"#e2e8f0",cursor:"pointer"},gs=t=>{try{return JSON.parse(t.dataTransfer.getData("application/x-xr-hierarchy"))}catch{return null}},jo=async t=>{var l;if((l=navigator.clipboard)!=null&&l.writeText){await navigator.clipboard.writeText(t);return}const s=document.createElement("textarea");s.value=t,s.setAttribute("readonly",""),s.style.position="fixed",s.style.left="-9999px",document.body.appendChild(s),s.select(),document.execCommand("copy"),document.body.removeChild(s)},Ls=({groups:t,objects:s,selectedObjectId:l,onSelectObject:n,onReorderGroup:a,onReorderObject:d,onMoveObject:r,onSetObjectParent:o,onToggleGroupEnabled:h,onToggleObjectVisible:x,copyConfig:c,docked:p=!1,initialPosition:f={x:10,y:30},title:g="Hierarchy"})=>{const[i,u]=y.useState(!0),{position:j,startDrag:w,place:v}=js({docked:p,initialPosition:f}),M=p?{...At,...kt}:At,[U,b]=y.useState(new Set),[F,E]=y.useState(new Set),[P,le]=y.useState(!1),[ae,L]=y.useState(null),Pe=t.filter(m=>m.objectIds.some(R=>!!s[R])),De=(m,R)=>{m.stopPropagation(),m.dataTransfer.effectAllowed="move",m.dataTransfer.setData("application/x-xr-hierarchy",JSON.stringify(R)),L(null)},W=(m,R,D)=>{var C;m.preventDefault(),m.stopPropagation();const I=gs(m);if(I){if(I.kind==="group"){a(I.groupId,D);return}if(!(o!=null&&o(I.objectId,null,R.objectIds.length,R.id))){if(I.groupId===R.id){d(R.id,I.objectId,R.objectIds.length-1);return}r(I.objectId,R.id,R.objectIds.length)||L(`${((C=s[I.objectId])==null?void 0:C.name)??"Object"} is not compatible with ${R.name}.`)}}},ve=(m,R,D,I)=>{var Ye;m.preventDefault(),m.stopPropagation();const C=gs(m);if(!(!C||C.kind!=="object")&&C.objectId!==D){if(o!=null&&o(C.objectId,D,Ze(D).length,R.id)){E(Be=>{const qe=new Set(Be);return qe.delete(D),qe});return}C.groupId===R.id?d(R.id,C.objectId,I):r(C.objectId,R.id,I)||L(`${((Ye=s[C.objectId])==null?void 0:Ye.name)??"Object"} is not compatible with ${R.name}.`)}},Ze=m=>{const R=s[m],D=(R==null?void 0:R.childObjectIds)??[],I=Object.values(s).filter(C=>C.parentObjectId===m).map(C=>C.id);return[...new Set([...D,...I])].filter(C=>!!s[C])},$=(m,R,D,I)=>{const C=s[m];if(!C)return null;const Ye=l===m,Be=Ze(m),qe=F.has(m);return e.jsxs("div",{style:{display:"grid",gap:4},children:[e.jsxs("div",{draggable:!0,onDragStart:te=>De(te,{kind:"object",groupId:R.id,objectId:m}),onDragOver:te=>te.preventDefault(),onDrop:te=>ve(te,R,m,D),onClick:()=>n(m),style:{display:"grid",gridTemplateColumns:`${Be.length?22:0}px ${x?"22px ":""}minmax(0,1fr)`,alignItems:"center",gap:Be.length||x?6:0,minHeight:30,padding:`4px 7px 4px ${Math.max(10,24+I*16)}px`,border:Ye?"1px solid rgba(56,189,248,.55)":"1px solid transparent",borderRadius:8,background:Ye?"rgba(56,189,248,.12)":"rgba(255,255,255,.025)",cursor:"grab",opacity:C.enabled?1:.5},children:[Be.length?e.jsx("button",{type:"button",style:it,onClick:te=>{te.stopPropagation(),E(Rt=>{const ft=new Set(Rt);return ft.has(m)?ft.delete(m):ft.add(m),ft})},children:qe?"▸":"▾"}):e.jsx("span",{}),x?e.jsx("button",{type:"button",style:it,onClick:te=>{te.stopPropagation(),x(m,!C.enabled)},children:C.enabled?"●":"○"}):null,e.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",fontSize:10},children:C.name})]}),qe?null:Be.map((te,Rt)=>$(te,R,Rt,I+1))]},m)},Z=async()=>{if(c!==void 0)try{await jo(JSON.stringify(c,null,2)),le(!0),window.setTimeout(()=>le(!1),1400)}catch{L("Unable to copy the scene configuration.")}};return v(e.jsx(e.Fragment,{children:i?e.jsxs("section",{style:p?M:{...At,maxHeight:`calc(100vh - ${j.y+16}px)`},children:[e.jsx("header",{onPointerDown:m=>w(m,{capture:!1,selectNone:!1}),style:{position:"sticky",top:0,zIndex:2,padding:"10px 12px",borderBottom:"1px solid rgba(255,255,255,.08)",background:"rgba(8,15,28,.94)",cursor:p?"default":"grab"},children:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontSize:12},children:[e.jsx("strong",{children:g}),e.jsx("div",{style:{flex:"1 1 auto"}}),e.jsx("button",{type:"button","aria-label":`Fold ${g}`,"aria-expanded":"true",onPointerDown:m=>m.stopPropagation(),onClick:()=>u(!1),style:it,children:"−"})]})}),e.jsxs("div",{style:{display:"grid",gap:7,padding:7},children:[c!==void 0&&e.jsx("button",{type:"button",onClick:Z,style:{width:"100%",height:28,borderRadius:8,border:"1px solid rgba(56,189,248,.28)",background:"rgba(56,189,248,.14)",color:"#e0f2fe",cursor:"pointer",fontSize:10,fontWeight:700},children:P?"Copied Config":"Copy Config"}),Pe.map(m=>{const R=t.findIndex(I=>I.id===m.id),D=U.has(m.id);return e.jsxs("section",{onDragOver:I=>I.preventDefault(),onDrop:I=>W(I,m,R),style:{border:"1px solid rgba(255,255,255,.1)",borderRadius:10,overflow:"hidden",opacity:m.enabled?1:.55},children:[e.jsxs("div",{draggable:!0,onDragStart:I=>De(I,{kind:"group",groupId:m.id}),style:{display:"grid",gridTemplateColumns:"22px 22px minmax(0,1fr)",gap:5,alignItems:"center",padding:"6px",background:"rgba(255,255,255,.06)",cursor:"grab"},children:[e.jsx("button",{type:"button",style:it,onClick:()=>b(I=>{const C=new Set(I);return C.has(m.id)?C.delete(m.id):C.add(m.id),C}),children:D?"▸":"▾"}),e.jsx("button",{type:"button",style:it,title:"Toggle group visibility",onClick:()=>h(m.id,!m.enabled),children:m.enabled?"◉":"○"}),e.jsx("div",{style:{minWidth:0},children:e.jsx("div",{style:{fontSize:10,fontWeight:700},children:m.name})})]}),!D&&e.jsx("div",{style:{display:"grid",gap:4,padding:m.objectIds.length?5:0},children:m.objectIds.filter(I=>{var C;return!((C=s[I])!=null&&C.parentObjectId)}).map((I,C)=>$(I,m,C,0))})]},m.id)}),ae&&e.jsx("div",{role:"alert",style:{color:"#fca5a5",fontSize:9,padding:"2px 5px 5px"},children:ae})]})]}):e.jsx("button",{type:"button","aria-expanded":"false",onClick:()=>u(!0),style:{...M,width:"auto",padding:"9px 12px",cursor:"pointer",fontSize:11,fontWeight:700},children:g})}))},mt={display:"grid",gridTemplateColumns:"92px minmax(0, 1fr)",alignItems:"center",gap:10,margin:"8px 0",color:"#cbd5e1",fontSize:12},mo=t=>({display:"grid",gridTemplateColumns:`92px repeat(${t}, minmax(0, 1fr))`,alignItems:"center",gap:6,margin:"8px 0"}),So={fontSize:12,color:"#cbd5e1"},Pt={width:"100%",boxSizing:"border-box",padding:"8px 9px",border:"1px solid rgba(148,163,184,.16)",borderRadius:6,background:"rgba(15,23,42,.72)",color:"#e2e8f0"},vo={width:"100%",minWidth:0,height:24,boxSizing:"border-box",borderRadius:7,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(15,23,42,0.68)",padding:"0 7px",outline:0,color:"#f8fafc",fontSize:10.5,fontVariantNumeric:"tabular-nums"},wo=t=>/^-?\d*(\.\d*)?$/.test(t),St=t=>Number.isFinite(t)?String(t):"0",ko=({onChange:t,value:s})=>{const[l,n]=y.useState(St(s));return y.useEffect(()=>{n(St(s))},[s]),e.jsx("input",{style:vo,type:"text",inputMode:"decimal",value:l,placeholder:"0",onBlur:()=>{if(l.trim()===""){n(St(s));return}const a=Number(l);if(Number.isNaN(a)){n(St(s));return}t(a)},onChange:a=>{const d=a.currentTarget.value;if(!wo(d)||(n(d),d===""||d==="-"||d==="."||d==="-."))return;const r=Number(d);Number.isNaN(r)||t(r)},onKeyDown:a=>{if(a.key!=="ArrowUp"&&a.key!=="ArrowDown")return;a.preventDefault();const d=a.shiftKey?1:a.altKey?.01:.1,r=a.key==="ArrowUp"?s+d:s-d;t(Number(r.toFixed(6)))}})},Dt=({axes:t=["x","y","z"],label:s,onChange:l,value:n})=>e.jsxs("div",{style:mo(t.length),children:[e.jsx("div",{style:So,children:s}),t.map(a=>e.jsx(ko,{value:n[a],onChange:d=>l({...n,[a]:d})},a))]}),$s=({value:t,onChange:s,targets:l=[]})=>e.jsxs("section",{style:{padding:10,borderRadius:10,background:"rgba(255,255,255,.04)"},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontWeight:700,color:"#f8fafc"},children:[e.jsx("span",{children:"Pin to Mesh"}),e.jsx("input",{type:"checkbox",checked:t.enabled,onChange:n=>s({...t,enabled:n.target.checked})})]}),e.jsxs("label",{style:mt,children:[e.jsx("span",{children:"Target"}),e.jsxs("select",{style:Pt,value:t.targetObjectId??"",onChange:n=>s({...t,targetObjectId:n.target.value||null}),children:[e.jsx("option",{value:"",children:"None (Transform)"}),l.map(n=>e.jsx("option",{value:n.id,children:n.name},n.id))]})]}),e.jsxs("label",{style:mt,children:[e.jsx("span",{children:"Orientation"}),e.jsxs("select",{style:Pt,value:t.orientation,onChange:n=>s({...t,orientation:n.target.value}),children:[e.jsx("option",{value:"none",children:"None"}),e.jsx("option",{value:"position",children:"Position"}),e.jsx("option",{value:"positionAndDirection",children:"Position and Direction"})]})]}),e.jsxs("label",{style:mt,children:[e.jsx("span",{children:"Offset Space"}),e.jsxs("select",{style:Pt,value:t.offsetSpace,onChange:n=>s({...t,offsetSpace:n.target.value}),children:[e.jsx("option",{value:"local",children:"Local"}),e.jsx("option",{value:"world",children:"World"})]})]}),e.jsx(Dt,{axes:["x","y"],label:"UV",value:{x:t.uv.x,y:t.uv.y,z:0},onChange:n=>s({...t,uv:{x:n.x,y:n.y}})}),e.jsxs("label",{style:mt,children:[e.jsx("span",{children:"Vertex Normal"}),e.jsx("input",{type:"checkbox",checked:t.vertexNormal,onChange:n=>s({...t,vertexNormal:n.target.checked})})]}),e.jsx(Dt,{label:"Offset Position",value:t.offsetPosition,onChange:n=>s({...t,offsetPosition:n})}),e.jsx(Dt,{label:"Offset Rotation",value:t.offsetRotation,onChange:n=>s({...t,offsetRotation:n})})]}),Co={position:"fixed",zIndex:2e4,pointerEvents:"none"},Ro={pointerEvents:"auto",width:284,maxHeight:"min(620px, calc(100vh - 32px))",borderRadius:16,border:"1px solid rgba(255,255,255,0.12)",background:"rgba(8, 15, 28, 0.62)",boxShadow:"0 16px 36px rgba(0,0,0,0.28)",backdropFilter:"blur(20px) saturate(1.1)",WebkitBackdropFilter:"blur(20px) saturate(1.1)",color:"#f8fafc",overflow:"hidden",fontFamily:"Inter, ui-sans-serif, system-ui, sans-serif"},Io={display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,padding:"8px 8px",borderBottom:"1px solid rgba(255,255,255,0.08)",background:"rgba(8, 15, 28, 0.88)"},Eo={display:"flex",alignItems:"center",gap:6,minWidth:0,fontSize:11,fontWeight:700},To={width:16,height:16,display:"flex",alignItems:"center",justifyContent:"center",cursor:"grab",color:"rgba(148,163,184,0.82)",flex:"0 0 auto"},zo={display:"grid",gap:8,padding:10,maxHeight:"min(548px, calc(100vh - 104px))",overflowY:"auto",scrollbarWidth:"thin",scrollbarColor:"rgba(148,163,184,0.55) rgba(255,255,255,0.06)",overscrollBehavior:"contain"},ot={display:"grid",gap:4,fontSize:10,color:"rgba(226,232,240,0.78)"},vt={width:"100%",minWidth:0,height:28,borderRadius:8,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(15,23,42,0.8)",color:"#f8fafc",padding:"0 8px",boxSizing:"border-box"},Mo={height:24,borderRadius:8,border:"1px solid rgba(56,189,248,0.25)",background:"rgba(56,189,248,0.16)",color:"#e0f2fe",cursor:"pointer",fontSize:10,fontWeight:700,padding:"0 8px"},Fo={display:"grid",gridTemplateColumns:"1fr 74px",alignItems:"center",gap:8},Wo=()=>e.jsx("svg",{width:"11",height:"15",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M11 2h2v4h3l-4 4-4-4h3V2zm0 20v-4H8l4-4 4 4h-3v4h-2zM2 11h4V8l4 4-4 4v-3H2v-2zm20 0v2h-4v3l-4-4 4-4v3h4z"})}),Lo=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M19.4 13.5c.1-.5.1-1 .1-1.5s0-1-.1-1.5l2.1-1.6-2-3.5-2.5 1a8 8 0 0 0-2.6-1.5L14 2h-4l-.4 2.9A8 8 0 0 0 7 6.4l-2.5-1-2 3.5 2.1 1.6A10 10 0 0 0 4.5 12c0 .5 0 1 .1 1.5l-2.1 1.6 2 3.5 2.5-1a8 8 0 0 0 2.6 1.5L10 22h4l.4-2.9a8 8 0 0 0 2.6-1.5l2.5 1 2-3.5-2.1-1.6zM12 15.5A3.5 3.5 0 1 1 12 8a3.5 3.5 0 0 1 0 7.5z"})}),$o=(t,s)=>{const l=t.find(n=>String(n.value)===s);return(l==null?void 0:l.value)??s};function Se({title:t,value:s,fields:l,onChange:n,copyLabel:a,copyPayload:d,initialPosition:r}){const[o,h]=y.useState(r??{x:14,y:452}),x=y.useRef(null);y.useEffect(()=>{const g=u=>{x.current&&h({x:Math.max(8,u.clientX-x.current.x),y:Math.max(8,u.clientY-x.current.y)})},i=()=>{x.current=null,document.body.classList.remove("select-none")};return window.addEventListener("pointermove",g),window.addEventListener("pointerup",i),()=>{window.removeEventListener("pointermove",g),window.removeEventListener("pointerup",i)}},[]);const c=(g,i)=>{n({...s,[g]:i})},p=async()=>{var i;const g=(d==null?void 0:d(s))??{name:a??t,kind:"settings",settings:s};await((i=navigator.clipboard)==null?void 0:i.writeText(JSON.stringify(g,null,2)))},f=g=>{var u;const i=(u=g.currentTarget.parentElement)==null?void 0:u.parentElement;i&&(x.current={x:g.clientX-i.getBoundingClientRect().left,y:g.clientY-i.getBoundingClientRect().top},document.body.classList.add("select-none"))};return e.jsx("div",{style:{...Co,left:o.x,top:o.y},children:e.jsxs("div",{style:Ro,children:[e.jsxs("div",{style:Io,children:[e.jsxs("div",{style:Eo,children:[e.jsx("span",{style:To,onPointerDown:f,children:e.jsx(Wo,{})}),e.jsx(Lo,{}),e.jsx("span",{children:t})]}),e.jsx("button",{style:Mo,type:"button",onClick:p,children:"Copy"})]}),e.jsx("div",{style:zo,children:l.map(g=>{const i=s[g.key];if(g.type==="boolean")return e.jsxs("label",{style:ot,children:[e.jsx("span",{children:g.label}),e.jsx("input",{type:"checkbox",checked:!!i,onChange:u=>c(g.key,u.target.checked)})]},g.key);if(g.type==="number"){const u=Number(i),j=g.min??0,w=g.max??1,v=g.step??.01;return e.jsxs("label",{style:ot,children:[e.jsx("span",{children:g.label}),e.jsxs("div",{style:Fo,children:[e.jsx("input",{type:"range",min:j,max:w,step:v,value:u,onChange:M=>c(g.key,Number(M.target.value))}),e.jsx("input",{style:vt,type:"number",min:j,max:w,step:v,value:u,onChange:M=>c(g.key,Number(M.target.value))})]})]},g.key)}return g.type==="color"?e.jsxs("label",{style:ot,children:[e.jsx("span",{children:g.label}),e.jsx("input",{style:{...vt,padding:2},type:"color",value:String(i),onChange:u=>c(g.key,u.target.value)})]},g.key):g.type==="select"?e.jsxs("label",{style:ot,children:[e.jsx("span",{children:g.label}),e.jsx("select",{style:vt,value:String(i),onChange:u=>c(g.key,$o(g.options,u.target.value)),children:g.options.map(u=>e.jsx("option",{value:String(u.value),children:u.label},`${g.key}-${String(u.value)}`))})]},g.key):e.jsxs("label",{style:ot,children:[e.jsx("span",{children:g.label}),e.jsx("input",{style:vt,type:"text",value:String(i),onChange:u=>c(g.key,u.target.value)})]},g.key)})})]})})}const No=({title:t="Face Retouch",value:s,onChange:l,initialPosition:n})=>{const a=N.resolveFaceRetouchControls(s);return e.jsx(Se,{title:t,value:a,fields:N.FACE_RETOUCH_SETTINGS_FIELDS,onChange:d=>l(N.patchFaceRetouchControls(a,d)),initialPosition:n})},Oo=({title:t="Face Swap",value:s,onChange:l,source:n,initialPosition:a})=>{const d=N.resolveFaceSwapSettings(s,{source:n});return e.jsx(Se,{title:t,value:d,fields:N.FACE_SWAP_SETTINGS_FIELDS,onChange:r=>l(N.patchFaceSwapSettings(d,r)),initialPosition:a})},Ao=({title:t="Gesture",value:s,defaults:l,onChange:n,initialPosition:a})=>{const d=Ne.resolveGestureSettings(s,l);return e.jsx(Se,{title:t,value:d,fields:Ne.GESTURE_SETTINGS_FIELDS,onChange:r=>n(Ne.patchGestureSettings(d,r)),initialPosition:a})},Po=({title:t="Iris Effect",value:s,onChange:l,initialPosition:n})=>{const a=N.resolveIrisEffectSettings(s);return e.jsx(Se,{title:t,value:a,fields:N.IRIS_EFFECT_SETTINGS_FIELDS,onChange:d=>l(N.patchIrisEffectSettings(a,d)),initialPosition:n})},Do=({title:t="Lip Effect",value:s,onChange:l,initialPosition:n})=>{const a=N.resolveLipEffectSettings(s);return e.jsx(Se,{title:t,value:a,fields:N.LIP_EFFECT_SETTINGS_FIELDS,onChange:d=>l(N.patchLipEffectSettings(a,d)),initialPosition:n})},Bo=({title:t="Product hotspots",hotspots:s,placing:l,onPlacingChange:n,variants:a,initialPosition:d={x:16,y:16},docked:r=!1})=>{const[o,h]=y.useState(!1),x=async()=>{try{await navigator.clipboard.writeText(s.json),h(!0),setTimeout(()=>h(!1),1200)}catch{h(!1)}};return e.jsxs("div",{style:r?{...A.shell,...kt,position:"static"}:{...A.shell,left:d.x,top:d.y},children:[e.jsx("div",{style:A.header,children:t}),e.jsxs("div",{style:A.body,children:[a&&a.variants.length>0&&e.jsxs("label",{style:A.row,children:[e.jsx("span",{style:A.label,children:"variant"}),e.jsxs("select",{style:A.input,value:a.variant??"",onChange:c=>a.setVariant(c.target.value||null),children:[e.jsx("option",{value:"",children:"default"}),a.variants.map(c=>e.jsx("option",{value:c,children:c},c))]})]}),e.jsxs("div",{style:A.row,children:[e.jsx("button",{type:"button",style:{...A.button,...l?A.active:null},onClick:()=>n(!l),children:l?"placing: click the model":"place hotspot"}),e.jsx("button",{type:"button",style:A.button,onClick:()=>void x(),children:o?"copied":"copy JSON"}),e.jsx("button",{type:"button",style:A.button,onClick:s.clear,children:"clear"})]}),s.hotspots.length===0?e.jsx("div",{style:A.hint,children:"no hotspots yet"}):s.hotspots.map(c=>e.jsxs("div",{style:A.item,children:[e.jsx("input",{style:{...A.input,flex:1},value:c.label??"",placeholder:c.id,onChange:p=>s.update(c.id,{label:p.target.value})}),e.jsx("span",{style:A.coord,children:c.position.map(p=>p.toFixed(2)).join(", ")}),e.jsx("button",{type:"button",style:A.button,onClick:()=>s.remove(c.id),children:"×"})]},c.id))]})]})},A={shell:{position:"fixed",zIndex:2e4,width:300,maxHeight:"min(560px, calc(100vh - 32px))",overflow:"auto",borderRadius:16,border:"1px solid rgba(255,255,255,0.12)",background:"rgba(8, 15, 28, 0.72)",boxShadow:"0 16px 36px rgba(0,0,0,0.28)",backdropFilter:"blur(20px) saturate(1.1)",color:"#f8fafc",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:11},header:{padding:"8px 10px",fontWeight:700,borderBottom:"1px solid rgba(255,255,255,0.08)"},body:{padding:"6px 10px 10px"},row:{display:"flex",gap:6,alignItems:"center",margin:"4px 0",flexWrap:"wrap"},label:{color:"#94a3b8"},input:{font:"inherit",background:"#0b1220",color:"#f8fafc",border:"1px solid #334155",borderRadius:4,padding:"3px 6px"},button:{background:"rgba(255,255,255,0.08)",border:"1px solid rgba(255,255,255,0.18)",color:"#f8fafc",borderRadius:6,padding:"4px 8px",cursor:"pointer",font:"inherit"},active:{borderColor:"#22d3ee",color:"#22d3ee"},hint:{color:"#94a3b8"},item:{display:"flex",gap:6,alignItems:"center",margin:"4px 0"},coord:{color:"#94a3b8",whiteSpace:"nowrap"}},rt={ready:"#4ade80",loading:"#facc15",paused:"#93c5fd",unavailable:"#64748b",error:"#f87171"},He=(t,s=0,l="")=>t==null||Number.isNaN(t)?"–":`${t.toFixed(s)}${l}`,X=({label:t,value:s,color:l})=>e.jsxs("div",{style:V.row,children:[e.jsx("span",{style:V.rowLabel,children:t}),e.jsx("span",{style:{...V.rowValue,color:l??V.rowValue.color},children:s})]}),Vo=({title:t="XR Diagnostics",intervalMs:s=250,models:l,initialPosition:n={x:16,y:16},docked:a=!1,defaultCollapsed:d=!1,onSample:r})=>{const o=$e.useXRDiagnostics({intervalMs:s,models:l}),[h,x]=y.useState(d);r==null||r(o);const{session:c}=o;return e.jsxs("div",{style:a?{...V.shell,...kt,position:"static"}:{...V.shell,left:n.x,top:n.y},"data-testid":"xr-diagnostics-panel",children:[e.jsxs("div",{style:V.header,children:[e.jsx("span",{style:V.title,children:t}),e.jsx("button",{type:"button",onClick:()=>x(p=>!p),style:V.toggle,"aria-label":h?"Expand diagnostics":"Collapse diagnostics",children:h?"+":"–"})]}),!h&&e.jsxs("div",{style:V.body,children:[e.jsx("div",{style:V.section,children:"session"}),e.jsx(X,{label:"lifecycle",value:c.lifecycle,color:c.lifecycle==="running"?rt.ready:rt.paused}),e.jsx(X,{label:"ready",value:c.ready?"yes":"no"}),e.jsx(X,{label:"source",value:`${c.source??"–"} / ${c.sourceKind??"–"}`}),e.jsx(X,{label:"camera",value:c.sourceWidth?`${c.sourceWidth}×${c.sourceHeight}`:"unbound"}),e.jsx(X,{label:"feed",value:c.renderWidth?`${c.renderWidth}×${c.renderHeight} @ ${He(c.feedFps,0)} fps`:"–"}),e.jsx(X,{label:"inference",value:He(o.inferenceMsTotal,1," ms / frame")}),o.quality&&e.jsx(X,{label:"quality",value:`${o.quality.tier} (${o.quality.reason})${o.quality.locked?" · locked":""}`}),c.error&&e.jsx(X,{label:"error",value:`${c.error.reason}`,color:rt.error}),o.models.map(p=>e.jsxs("div",{style:V.model,children:[e.jsxs("div",{style:V.modelHeader,children:[e.jsx("span",{style:V.modelName,children:p.label}),e.jsx("span",{style:{...V.badge,color:rt[p.state]},children:p.state})]}),p.state!=="unavailable"&&e.jsxs(e.Fragment,{children:[e.jsx(X,{label:"inference",value:`${He(p.inferenceMs,1," ms")} · ${He(p.inferenceFps,0)} fps${p.targetFps?` (cap ${p.targetFps})`:""}`}),e.jsx(X,{label:"frames",value:`${p.inferences} run · ${p.skippedFrames} skipped`}),e.jsx(X,{label:"detections",value:`${He(p.detections)} · conf ${He(p.confidence,2)}`}),e.jsx(X,{label:"owners",value:`${p.owners.refs.length} (${p.owners.active.length} active)`})]}),p.error&&e.jsx(X,{label:"error",value:p.error.message,color:rt.error})]},p.model))]})]})},V={shell:{position:"fixed",zIndex:2e4,width:284,maxHeight:"min(640px, calc(100vh - 32px))",overflow:"auto",borderRadius:16,border:"1px solid rgba(255,255,255,0.12)",background:"rgba(8, 15, 28, 0.72)",boxShadow:"0 16px 36px rgba(0,0,0,0.28)",backdropFilter:"blur(20px) saturate(1.1)",WebkitBackdropFilter:"blur(20px) saturate(1.1)",color:"#f8fafc",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:11},header:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 10px",borderBottom:"1px solid rgba(255,255,255,0.08)",background:"rgba(8, 15, 28, 0.88)",position:"sticky",top:0},title:{fontWeight:700},toggle:{background:"transparent",border:"1px solid rgba(255,255,255,0.2)",color:"#f8fafc",borderRadius:6,width:22,height:22,cursor:"pointer"},body:{padding:"6px 10px 10px"},section:{color:"#94a3b8",textTransform:"uppercase",fontSize:9,letterSpacing:1,margin:"6px 0 2px"},row:{display:"flex",justifyContent:"space-between",gap:8,padding:"2px 0"},rowLabel:{color:"#94a3b8"},rowValue:{color:"#e2e8f0",textAlign:"right",overflowWrap:"anywhere"},model:{marginTop:8,paddingTop:6,borderTop:"1px solid rgba(255,255,255,0.08)"},modelHeader:{display:"flex",justifyContent:"space-between",alignItems:"center"},modelName:{fontWeight:700},badge:{fontSize:10,textTransform:"uppercase",letterSpacing:.5}},Ko=({title:t="Holistic Tracker",value:s,onChange:l,initialPosition:n})=>{const a=Ne.resolveHolisticTrackerSettings(s);return e.jsx(Se,{title:t,value:a,fields:Ne.HOLISTIC_TRACKER_SETTINGS_FIELDS,onChange:d=>l(Ne.patchHolisticTrackerSettings(a,d)),initialPosition:n})},Ho=({title:t="Segmentation Overlay",value:s,onChange:l,initialPosition:n})=>{const a=It.resolveSegmentationOverlaySettings(s);return e.jsx(Se,{title:t,value:a,fields:It.SEGMENTATION_OVERLAY_SETTINGS_FIELDS,onChange:d=>l(It.patchSegmentationOverlaySettings(a,d)),initialPosition:n})},Go={position:"fixed",left:14,top:104,zIndex:2e4,pointerEvents:"none"},_o={pointerEvents:"auto",width:298,borderRadius:16,border:"1px solid rgba(255,255,255,0.12)",background:"rgba(8, 15, 28, 0.58)",boxShadow:"0 16px 36px rgba(0,0,0,0.28)",backdropFilter:"blur(20px) saturate(1.1)",WebkitBackdropFilter:"blur(20px) saturate(1.1)",color:"#f8fafc",overflow:"hidden"},Uo={display:"flex",alignItems:"center",gap:7,padding:"7px 8px",borderBottom:"1px solid rgba(255,255,255,0.08)",background:"rgba(8, 15, 28, 0.88)"},Xo={display:"grid",gap:8,padding:8},Ns={display:"flex",alignItems:"center",gap:6,fontSize:11,fontWeight:700},Os={display:"flex",width:18,height:18,alignItems:"center",justifyContent:"center",borderRadius:6,background:"rgba(255,255,255,0.08)",border:"1px solid rgba(255,255,255,0.08)",color:"#e2e8f0"},Zo={width:16,height:16,display:"flex",alignItems:"center",justifyContent:"center",cursor:"grab",color:"rgba(148,163,184,0.82)"},Yo={display:"grid",gridTemplateColumns:"minmax(0, 1fr) 30px",gap:6},qo={width:"100%",height:26,borderRadius:8,border:"1px solid rgba(255,255,255,0.12)",background:"rgba(56,189,248,0.16)",color:"#e0f2fe",fontSize:10.5,fontWeight:700,cursor:"pointer"},Jo={display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:8,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(255,255,255,0.05)",color:"#e2e8f0",cursor:"pointer",padding:0},Qo=t=>({...Jo,width:30,height:26,color:t?"#e0f2fe":"rgba(148,163,184,0.72)",background:t?"rgba(56,189,248,0.16)":"rgba(255,255,255,0.04)"}),er={borderRadius:12,border:"1px solid rgba(255,255,255,0.08)",background:"rgba(255,255,255,0.03)",padding:8},tr={display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:6},sr={display:"grid",gridTemplateColumns:"repeat(3, minmax(0, 1fr))",gap:6},nr={display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,marginBottom:7},lr={display:"grid",gridTemplateColumns:"62px repeat(3, minmax(0, 1fr)) 24px",alignItems:"center",gap:6,marginTop:6},ir={fontSize:10,color:"rgba(226,232,240,0.82)"},or=t=>({display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:22,borderRadius:7,border:t?"1px solid rgba(125,211,252,0.72)":"1px solid rgba(255,255,255,0.10)",background:t?"rgba(56,189,248,0.20)":"rgba(255,255,255,0.05)",color:t?"#e0f2fe":"rgba(226,232,240,0.75)",cursor:"pointer"}),ys={display:"flex",flexDirection:"column",gap:4,fontSize:9,color:"rgba(226,232,240,0.72)"},rr={width:"100%",height:24,borderRadius:7,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(15,23,42,0.68)",color:"#f8fafc",fontSize:10.5,outline:"none",padding:"0 7px",boxSizing:"border-box",fontVariantNumeric:"tabular-nums"},ar={display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,fontSize:9,color:"rgba(226,232,240,0.72)"},As={width:15,height:15,accentColor:"#38bdf8",cursor:"pointer"},bs=t=>({height:25,borderRadius:8,border:t?"1px solid rgba(125,211,252,0.72)":"1px solid rgba(255,255,255,0.10)",background:t?"rgba(56,189,248,0.20)":"rgba(255,255,255,0.05)",color:t?"#e0f2fe":"rgba(226,232,240,0.82)",fontSize:10,fontWeight:700,cursor:"pointer"}),dr=t=>/^-?\d*(\.\d*)?$/.test(t),cr=({value:t,onChange:s,step:l=.1})=>{const[n,a]=y.useState(String(t));return y.useEffect(()=>a(String(t)),[t]),e.jsx("input",{type:"text",inputMode:"decimal",style:rr,value:n,onChange:d=>{const r=d.target.value;if(!dr(r)||(a(r),r===""||r==="-"||r==="."||r==="-."))return;const o=Number(r);Number.isNaN(o)||s(o)},onBlur:()=>{const d=Number(n);if(Number.isNaN(d)){a(String(t));return}s(d)},onKeyDown:d=>{if(d.key!=="ArrowUp"&&d.key!=="ArrowDown")return;d.preventDefault();const r=d.shiftKey?l*10:d.altKey?l/10:l,o=d.key==="ArrowUp"?t+r:t-r;s(Number(o.toFixed(6)))}})},Ps=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M4 4h6v2H7.4l3.3 3.3-1.4 1.4L6 7.4V10H4V4zm10 0h6v6h-2V7.4l-3.3 3.3-1.4-1.4L16.6 6H14V4zM9.3 13.3l1.4 1.4L7.4 18H10v2H4v-6h2v2.6l3.3-3.3zm5.4 0 3.3 3.3V14h2v6h-6v-2h2.6l-3.3-3.3 1.4-1.4z"})}),pr=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M7 12a5 5 0 0 1 5-5h3v2h-3a3 3 0 0 0 0 6h3v2h-3a5 5 0 0 1-5-5zm4-1h2v2h-2v-2zm-2 6H6a5 5 0 0 1 0-10h3v2H6a3 3 0 0 0 0 6h3v2zm6-10h3a5 5 0 0 1 0 10h-3v-2h3a3 3 0 0 0 0-6h-3V7z"})}),hr=()=>e.jsx("svg",{width:"11",height:"15",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M8 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM8 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM8 18a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM16 6a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM16 12a2 2 0 1 1-4 0 2 2 0 0 1 4 0zM16 18a2 2 0 1 1-4 0 2 2 0 0 1 4 0z"})}),xr=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 5c5 0 8.7 4.2 10 7-1.3 2.8-5 7-10 7s-8.7-4.2-10-7c1.3-2.8 5-7 10-7zm0 2c-3.6 0-6.4 2.7-7.7 5 1.3 2.3 4.1 5 7.7 5s6.4-2.7 7.7-5C18.4 9.7 15.6 7 12 7zm0 2.5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5z"})}),ur=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M3.3 2 22 20.7 20.7 22l-3.1-3.1A10.5 10.5 0 0 1 12 20c-5 0-8.7-4.2-10-7a16.4 16.4 0 0 1 4-4.9L2 3.3 3.3 2zm4.1 7.5A14.4 14.4 0 0 0 4.3 13c1.3 2.3 4.1 5 7.7 5 1.5 0 2.8-.5 4-1.2l-2.1-2.1A2.5 2.5 0 0 1 9.3 10L7.4 9.5zM12 4c5 0 8.7 4.2 10 7a15 15 0 0 1-3.2 4.2l-1.4-1.4A13 13 0 0 0 19.7 11C18.4 8.7 15.6 6 12 6c-.9 0-1.8.2-2.6.5L7.8 4.9C9.1 4.3 10.5 4 12 4z"})}),gr=({value:t,onChange:s})=>{const l=t.transformControlMode??"translate",n=t.transformControlSpace??"local",a=t.showTransformControls??!1;return e.jsxs("div",{style:{marginTop:8},children:[e.jsxs("label",{style:ar,children:[e.jsx("span",{children:"Show Transform On"}),e.jsx("input",{type:"checkbox",checked:a,style:As,onChange:d=>s({...t,showTransformControls:d.currentTarget.checked})})]}),e.jsxs("div",{style:{...ys,marginTop:8},children:["Mode",e.jsx("div",{style:sr,children:["translate","rotate","scale"].map(d=>e.jsx("button",{type:"button",style:bs(l===d),onClick:()=>s({...t,transformControlMode:d}),children:d==="translate"?"Move":d==="rotate"?"Rotate":"Scale"},d))})]}),e.jsxs("div",{style:{...ys,marginTop:8},children:["Space",e.jsx("div",{style:tr,children:["local","world"].map(d=>e.jsx("button",{type:"button",style:bs(n===d),onClick:()=>s({...t,transformControlSpace:d}),children:d==="local"?"Local":"World"},d))})]})]})},_t=({value:t,onChange:s})=>{var d,r,o;const l={position:((d=t.linked)==null?void 0:d.position)??!1,rotation:((r=t.linked)==null?void 0:r.rotation)??!1,scale:((o=t.linked)==null?void 0:o.scale)??!1},n=(h,x)=>{const c=t[h];s({...t,linked:{...l,[h]:x},[h]:x?{x:c.x,y:c.x,z:c.x}:c})},a=(h,x,c,p)=>e.jsxs("div",{style:lr,children:[e.jsx("div",{style:ir,children:x}),["x","y","z"].map(f=>e.jsx(cr,{value:c[f],step:p,onChange:g=>l[h]?s({...t,[h]:{x:g,y:g,z:g}}):s({...t,[h]:{...c,[f]:g}})},f)),e.jsx("button",{type:"button","aria-label":l[h]?`Unlink ${x}`:`Link ${x}`,title:l[h]?`Unlink ${x}`:`Link ${x}`,style:or(l[h]),onClick:()=>n(h,!l[h]),children:e.jsx(pr,{})})]});return e.jsxs("div",{style:er,children:[e.jsxs("div",{style:nr,children:[e.jsxs("div",{style:Ns,children:[e.jsx("span",{style:Os,children:e.jsx(Ps,{})}),e.jsx("span",{children:"Transform"})]}),e.jsx("input",{type:"checkbox",checked:t.enabled,style:As,onChange:h=>s({...t,enabled:h.currentTarget.checked})})]}),a("position","Position",t.position,.001),a("rotation","Rotation",t.rotation,1),a("scale","Scale",t.scale),e.jsx(gr,{value:t,onChange:s})]})},yr=({value:t,onChange:s,copyLabel:l="Selected transform"})=>{const[n,a]=y.useState({x:14,y:104}),[d,r]=y.useState(!1),o=y.useRef(null);y.useEffect(()=>{const c=f=>{o.current&&a({x:Math.max(8,f.clientX-o.current.x),y:Math.max(8,f.clientY-o.current.y)})},p=()=>{o.current=null,document.body.classList.remove("select-none")};return window.addEventListener("pointermove",c),window.addEventListener("pointerup",p),()=>{window.removeEventListener("pointermove",c),window.removeEventListener("pointerup",p)}},[]);const h=c=>{const p=c.currentTarget.getBoundingClientRect();o.current={x:c.clientX-p.left,y:c.clientY-p.top},document.body.classList.add("select-none"),c.currentTarget.setPointerCapture(c.pointerId)},x=async()=>{await navigator.clipboard.writeText(JSON.stringify({name:l,kind:"transform3D",transform:t},null,2)),r(!0),window.setTimeout(()=>r(!1),1200)};return typeof document>"u"?null:Ae.createPortal(e.jsx("div",{style:{...Go,left:n.x,top:n.y},children:e.jsxs("div",{style:_o,children:[e.jsxs("div",{style:Uo,children:[e.jsx("div",{onPointerDown:h,style:Zo,children:e.jsx(hr,{})}),e.jsxs("div",{style:Ns,children:[e.jsx("span",{style:Os,children:e.jsx(Ps,{})}),e.jsx("span",{children:"Transform"})]})]}),e.jsxs("div",{style:Xo,children:[e.jsxs("div",{style:Yo,children:[e.jsx("button",{type:"button",style:qo,onClick:x,children:d?"Copied Config":"Copy Config"}),e.jsx("button",{type:"button","aria-label":t.visible?"Hide Transform":"Show Transform",title:t.visible?"Hide Transform":"Show Transform",style:Qo(t.visible),onClick:()=>s({...t,visible:!t.visible}),children:t.visible?e.jsx(xr,{}):e.jsx(ur,{})})]}),e.jsx(_t,{value:t,onChange:s})]})]})}),document.body)},br={borderRadius:12,border:"1px solid rgba(255,255,255,0.08)",background:"rgba(255,255,255,0.03)",padding:8},fr={display:"flex",alignItems:"center",gap:6,marginBottom:7,fontSize:11,fontWeight:700},jr={display:"flex",width:18,height:18,alignItems:"center",justifyContent:"center",borderRadius:6,background:"rgba(255,255,255,0.08)",border:"1px solid rgba(255,255,255,0.08)",color:"#e2e8f0"},fs={display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:6},q={display:"flex",flexDirection:"column",gap:4,fontSize:9,color:"rgba(226,232,240,0.72)"},Ut={width:"100%",height:24,borderRadius:7,border:"1px solid rgba(255,255,255,0.10)",background:"rgba(15,23,42,0.68)",color:"#f8fafc",fontSize:10.5,outline:"none",padding:"0 7px",boxSizing:"border-box"},Ge={...Ut,cursor:"pointer"},de={display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,height:24,fontSize:9,color:"rgba(226,232,240,0.72)"},ce={width:15,height:15,accentColor:"#38bdf8",cursor:"pointer"},mr={marginTop:10,paddingTop:10,borderTop:"1px solid rgba(255,255,255,0.08)"},Sr={marginBottom:7,fontSize:10,fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:"rgba(226,232,240,0.74)"},vr=()=>e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"m12 2 8 4.6v10.8L12 22l-8-4.6V6.6L12 2zm0 2.3L6.3 7.6 12 10.9l5.7-3.3L12 4.3zM6 9.3v6.9l5 2.9v-6.9L6 9.3zm12 0-5 2.9v6.9l5-2.9V9.3z"})}),wr=(t,s,l)=>Math.min(l,Math.max(s,t)),at=({max:t,min:s,onChange:l,step:n,value:a})=>e.jsx("input",{type:"number",min:s,max:t,step:n??.01,style:Ut,value:a,onChange:d=>{const r=Number(d.currentTarget.value);Number.isNaN(r)||l(wr(r,s??Number.NEGATIVE_INFINITY,t??Number.POSITIVE_INFINITY))}}),Ds=({value:t,onChange:s})=>{const l=o=>{s({...t,material:{...t.material,...o}})},n=_s.normalizeMeshRendererRenderState(t.material.renderState),a=o=>{l({renderState:{...n,...o,colorMask:{...n.colorMask,...o.colorMask},polygonOffset:{...n.polygonOffset,...o.polygonOffset}}})},d=o=>{a({polygonOffset:{...n.polygonOffset,...o}})},r=o=>{a({colorMask:{...n.colorMask,...o}})};return e.jsxs("div",{style:br,children:[e.jsxs("div",{style:fr,children:[e.jsx("span",{style:jr,children:e.jsx(vr,{})}),e.jsx("span",{children:"Mesh Renderer"})]}),e.jsxs("div",{style:fs,children:[e.jsxs("label",{style:q,children:["Mesh",e.jsxs("select",{style:Ge,value:t.mesh,onChange:o=>s({...t,mesh:o.currentTarget.value}),children:[e.jsx("option",{value:"cube",children:"Cube"}),e.jsx("option",{value:"sphere",children:"Sphere"}),e.jsx("option",{value:"plane",children:"Plane"})]})]}),e.jsxs("label",{style:q,children:["Material",e.jsxs("select",{style:Ge,value:t.material.type,onChange:o=>l({type:o.currentTarget.value}),children:[e.jsx("option",{value:"standard",children:"Standard"}),e.jsx("option",{value:"basic",children:"Basic"})]})]}),e.jsxs("label",{style:q,children:["Color",e.jsx("input",{type:"color",style:{...Ut,padding:2},value:t.material.color,onChange:o=>l({color:o.currentTarget.value})})]}),e.jsxs("label",{style:q,children:["Opacity",e.jsx(at,{min:0,max:1,step:.01,value:t.material.opacity,onChange:o=>l({opacity:o})})]}),e.jsxs("label",{style:q,children:["Roughness",e.jsx(at,{min:0,max:1,step:.01,value:t.material.roughness,onChange:o=>l({roughness:o})})]}),e.jsxs("label",{style:q,children:["Metalness",e.jsx(at,{min:0,max:1,step:.01,value:t.material.metalness,onChange:o=>l({metalness:o})})]}),e.jsxs("label",{style:q,children:["Shadow Mode",e.jsxs("select",{style:Ge,value:t.shadowMode,onChange:o=>s({...t,shadowMode:o.currentTarget.value}),children:[e.jsx("option",{value:"off",children:"Off"}),e.jsx("option",{value:"cast",children:"Cast"}),e.jsx("option",{value:"receive",children:"Receive"}),e.jsx("option",{value:"castReceive",children:"Cast + Receive"})]})]}),e.jsxs("label",{style:de,children:["Wireframe",e.jsx("input",{type:"checkbox",checked:t.material.wireframe,style:ce,onChange:o=>l({wireframe:o.currentTarget.checked})})]})]}),e.jsxs("div",{style:mr,children:[e.jsx("div",{style:Sr,children:"Render State"}),e.jsxs("div",{style:fs,children:[e.jsxs("label",{style:de,children:["Depth Test",e.jsx("input",{type:"checkbox",checked:n.depthTest,style:ce,onChange:o=>a({depthTest:o.currentTarget.checked})})]}),e.jsxs("label",{style:de,children:["Depth Write",e.jsx("input",{type:"checkbox",checked:n.depthWrite,style:ce,onChange:o=>a({depthWrite:o.currentTarget.checked})})]}),e.jsxs("label",{style:q,children:["Depth Function",e.jsxs("select",{style:Ge,value:n.depthFunc,onChange:o=>a({depthFunc:o.currentTarget.value}),children:[e.jsx("option",{value:"never",children:"Never"}),e.jsx("option",{value:"less",children:"Less"}),e.jsx("option",{value:"equal",children:"Equal"}),e.jsx("option",{value:"lessEqual",children:"Less Equal"}),e.jsx("option",{value:"greater",children:"Greater"}),e.jsx("option",{value:"notEqual",children:"Not Equal"}),e.jsx("option",{value:"greaterEqual",children:"Greater Equal"}),e.jsx("option",{value:"always",children:"Always"})]})]}),e.jsxs("label",{style:de,children:["Color Write",e.jsx("input",{type:"checkbox",checked:n.colorWrite,style:ce,onChange:o=>a({colorWrite:o.currentTarget.checked})})]}),e.jsxs("label",{style:de,children:["Mask R",e.jsx("input",{type:"checkbox",checked:n.colorMask.r,style:ce,onChange:o=>r({r:o.currentTarget.checked})})]}),e.jsxs("label",{style:de,children:["Mask G",e.jsx("input",{type:"checkbox",checked:n.colorMask.g,style:ce,onChange:o=>r({g:o.currentTarget.checked})})]}),e.jsxs("label",{style:de,children:["Mask B",e.jsx("input",{type:"checkbox",checked:n.colorMask.b,style:ce,onChange:o=>r({b:o.currentTarget.checked})})]}),e.jsxs("label",{style:de,children:["Mask A",e.jsx("input",{type:"checkbox",checked:n.colorMask.a,style:ce,onChange:o=>r({a:o.currentTarget.checked})})]}),e.jsxs("label",{style:q,children:["Cull Mode",e.jsxs("select",{style:Ge,value:n.cullMode,onChange:o=>a({cullMode:o.currentTarget.value}),children:[e.jsx("option",{value:"back",children:"Back"}),e.jsx("option",{value:"front",children:"Front"}),e.jsx("option",{value:"off",children:"Off"})]})]}),e.jsxs("label",{style:q,children:["Blend Mode",e.jsxs("select",{style:Ge,value:n.blendMode,onChange:o=>a({blendMode:o.currentTarget.value}),children:[e.jsx("option",{value:"normal",children:"Normal"}),e.jsx("option",{value:"additive",children:"Additive"}),e.jsx("option",{value:"subtractive",children:"Subtractive"}),e.jsx("option",{value:"multiply",children:"Multiply"}),e.jsx("option",{value:"none",children:"None"})]})]}),e.jsxs("label",{style:de,children:["Polygon Offset",e.jsx("input",{type:"checkbox",checked:n.polygonOffset.enabled,style:ce,onChange:o=>d({enabled:o.currentTarget.checked})})]}),e.jsxs("label",{style:q,children:["Offset Factor",e.jsx(at,{step:.1,value:n.polygonOffset.factor,onChange:o=>d({factor:o})})]}),e.jsxs("label",{style:q,children:["Offset Units",e.jsx(at,{step:.1,value:n.polygonOffset.units,onChange:o=>d({units:o})})]})]})]})]})},kr={borderRadius:12,border:"1px solid rgba(255,255,255,0.08)",background:"rgba(255,255,255,0.03)",padding:"8px 8px 56px"},Cr={marginBottom:7,fontSize:11,fontWeight:700},Rr={marginTop:10,paddingTop:10,borderTop:"1px solid rgba(255,255,255,0.08)"},Ir={marginBottom:7,fontSize:10,fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:"rgba(226,232,240,0.74)"},T={display:"grid",gridTemplateColumns:"92px minmax(0, 1fr)",alignItems:"center",gap:10,margin:"8px 0",color:"#cbd5e1",fontSize:12},he={width:"100%",boxSizing:"border-box",padding:"8px 9px",border:"1px solid rgba(148,163,184,.16)",borderRadius:6,background:"rgba(15,23,42,.72)",color:"#e2e8f0"},Er={display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:6,marginTop:8,color:"#cbd5e1",fontSize:11},ye=({max:t,min:s,onChange:l,step:n,value:a})=>e.jsx("input",{type:"number",min:s,max:t,step:n??1,style:he,value:a,onChange:d=>{const r=Number(d.currentTarget.value);Number.isNaN(r)||l(r)}}),Me=({onChange:t,options:s,value:l})=>e.jsx("select",{style:he,value:l,onChange:n=>t(n.currentTarget.value),children:s.map(n=>e.jsx("option",{value:n.value,children:n.label},n.value))}),dt=({children:t,title:s})=>e.jsxs("div",{style:Rr,children:[e.jsx("div",{style:Ir,children:s}),t]}),Xt=({onChange:t,value:s})=>{const l=p=>t(J.resolveFaceMeshRendererSettings(s,p)),n=J.supportsTexturePanel(s.materialType,s.shaderPreset),a=J.supportsBlendMode(s.materialType,s.shaderPreset,s.textureMap),d=s.materialType===J.FACE_MESH_MATERIAL_TYPES.shader&&s.shaderPreset===J.FACE_MESH_SHADER_PRESETS.composite?N.textureMapOptions.filter(p=>p.value!==J.FACE_MESH_TEXTURE_MAPS.none):N.textureMapOptions,r=J.usesMaskColor(s.maskTextureSource),o=J.usesMaskSourceUrl(s.maskTextureSource),h=p=>{l({shaderPreset:p})},x=p=>{l({materialType:p})},c=e.jsxs(dt,{title:"Geometry",children:[e.jsxs("div",{style:Er,children:[e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:s.showLeftEyeGeometry,onChange:p=>l({showLeftEyeGeometry:p.currentTarget.checked})})," ","Left Eye"]}),e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:s.showRightEyeGeometry,onChange:p=>l({showRightEyeGeometry:p.currentTarget.checked})})," ","Right Eye"]}),e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:s.showNoseGeometry,onChange:p=>l({showNoseGeometry:p.currentTarget.checked})})," ","Nose"]}),e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:s.showMouthGeometry,onChange:p=>l({showMouthGeometry:p.currentTarget.checked})})," ","Mouth"]})]}),e.jsxs("label",{style:T,children:[e.jsx("span",{children:"Show Overlay Mask"}),e.jsx("input",{type:"checkbox",checked:s.showOverlayMask,onChange:p=>l({showOverlayMask:p.currentTarget.checked})})]}),e.jsxs("label",{style:T,children:[e.jsx("span",{children:"Source"}),e.jsx(Me,{value:s.maskTextureSource,options:N.maskTextureSourceOptions,onChange:p=>l({maskTextureSource:p})})]}),o?e.jsxs("label",{style:T,children:[e.jsx("span",{children:"URL"}),e.jsx("input",{type:"url",style:he,value:s.maskSourceUrl,onChange:p=>l({maskSourceUrl:p.currentTarget.value})})]}):null,r?e.jsxs("label",{style:T,children:[e.jsx("span",{children:"Color"}),e.jsx("input",{type:"color",style:{...he,padding:2},value:s.maskColor,onChange:p=>l({maskColor:p.currentTarget.value})})]}):null,e.jsxs("label",{style:T,children:[e.jsx("span",{children:"Overlay Opacity"}),e.jsx(ye,{min:0,max:1,step:.1,value:s.maskOpacity,onChange:p=>l({maskOpacity:p})})]})]});return e.jsxs("section",{style:kr,children:[e.jsxs("label",{style:{...Cr,display:"flex",justifyContent:"space-between"},children:[e.jsx("span",{children:"Face Mesh Renderer"}),e.jsx("input",{type:"checkbox",checked:s.enabled,onChange:p=>l({enabled:p.currentTarget.checked})})]}),e.jsxs(dt,{title:"Renderer",children:[e.jsxs("label",{style:T,children:[e.jsx("span",{children:"Face Index"}),e.jsx(ye,{min:0,step:1,value:s.faceIndex,onChange:p=>l({faceIndex:p})})]}),e.jsxs("label",{style:T,children:[e.jsx("span",{children:"Target FPS"}),e.jsx(ye,{min:1,step:1,value:s.targetFps??24,onChange:p=>l({targetFps:p})})]}),e.jsxs("label",{style:T,children:[e.jsx("span",{children:"Render Order"}),e.jsx(ye,{step:1,value:s.renderOrder,onChange:p=>l({renderOrder:p})})]}),e.jsxs("label",{style:T,children:[e.jsx("span",{children:"External Mesh"}),e.jsx("input",{type:"url",style:he,value:s.externalMeshUrl??"",onChange:p=>l({externalMeshUrl:p.currentTarget.value||void 0})})]}),e.jsxs("label",{style:T,children:[e.jsx("span",{children:"Mesh Scale"}),e.jsx(ye,{min:.01,step:.01,value:s.externalScale,onChange:p=>l({externalScale:p})})]})]}),c,e.jsxs(dt,{title:"Material",children:[e.jsxs("label",{style:T,children:[e.jsx("span",{children:"Type"}),e.jsx(Me,{value:s.materialType,options:N.materialTypeOptions,onChange:x})]}),s.materialType===J.FACE_MESH_MATERIAL_TYPES.shader?e.jsxs("label",{style:T,children:[e.jsx("span",{children:"Shader"}),e.jsx(Me,{value:s.shaderPreset,options:N.shaderPresetOptions,onChange:h})]}):null,e.jsxs("label",{style:T,children:[e.jsx("span",{children:"Base Color"}),e.jsx("input",{type:"color",style:{...he,padding:2},value:s.baseColor,onChange:p=>l({baseColor:p.currentTarget.value})})]}),e.jsxs("label",{style:T,children:[e.jsx("span",{children:"Material Opacity"}),e.jsx(ye,{min:0,max:1,step:.01,value:s.opacity,onChange:p=>l({opacity:p})})]}),e.jsxs("label",{style:T,children:[e.jsx("span",{children:"Side"}),e.jsx(Me,{value:s.side,options:N.sideOptions,onChange:p=>l({side:p})})]})]}),n?e.jsxs(dt,{title:"Texture",children:[e.jsxs("label",{style:T,children:[e.jsx("span",{children:"Map"}),e.jsx(Me,{value:s.textureMap,options:d,onChange:p=>l({textureMap:p})})]}),s.textureMap===J.FACE_MESH_TEXTURE_MAPS.canonical?e.jsxs("label",{style:T,children:[e.jsx("span",{children:"Face URL"}),e.jsx("input",{type:"url",style:he,value:s.faceTextureUrl,onChange:p=>l({faceTextureUrl:p.currentTarget.value})})]}):null,s.textureMap===J.FACE_MESH_TEXTURE_MAPS.style2?e.jsxs("label",{style:T,children:[e.jsx("span",{children:"Style URL"}),e.jsx("input",{type:"url",style:he,value:s.faceTextureStyle2Url,onChange:p=>l({faceTextureStyle2Url:p.currentTarget.value})})]}):null,e.jsxs("label",{style:T,children:[e.jsx("span",{children:"Material Alpha"}),e.jsx(Me,{value:s.alphaMap,options:N.alphaMapOptions,onChange:p=>l({alphaMap:p})})]}),e.jsxs("label",{style:T,children:[e.jsx("span",{children:"Alpha Texture URL"}),e.jsx("input",{type:"url",style:he,value:s.faceAlphaMaskUrl,onChange:p=>l({faceAlphaMaskUrl:p.currentTarget.value})})]}),e.jsxs("label",{style:T,children:[e.jsx("span",{children:"Alpha Strength"}),e.jsx(ye,{min:0,max:1,step:.01,value:s.alphaOpacity,onChange:p=>l({alphaOpacity:p})})]})]}):null,a?e.jsxs(dt,{title:"Blend",children:[e.jsxs("label",{style:T,children:[e.jsx("span",{children:"Mode"}),e.jsx(Me,{value:s.blendMode,options:N.blendModeOptions,onChange:p=>l({blendMode:p})})]}),e.jsxs("label",{style:T,children:[e.jsx("span",{children:"Blend Strength"}),e.jsx(ye,{min:0,max:1,step:.01,value:s.blendOpacity,onChange:p=>l({blendOpacity:p})})]}),e.jsxs("label",{style:T,children:[e.jsx("span",{children:"Composite"}),e.jsx("input",{type:"checkbox",checked:s.compositeShading,onChange:p=>l({compositeShading:p.currentTarget.checked})})]})]}):null]})},Tr=({component:t,onChange:s})=>e.jsx(Xt,{value:t.settings,onChange:l=>s==null?void 0:s({...t,settings:l})}),Bs=y.createContext(null),zr=({children:t,defaultOrbitEnabled:s=!0,defaultSelectedObjectId:l=null,defaultShowGrid:n=!0,defaultShowVideoBackground:a=!0,onComponentChange:d,onObjectChange:r,onOrbitEnabledChange:o,onSelectObject:h,onShowGridChange:x,onShowVideoBackgroundChange:c,onStoreChange:p,orbitEnabled:f,selectedObjectId:g,showGrid:i,showVideoBackground:u,store:j})=>{const[w,v]=y.useState(l),[M,U]=y.useState(s),[b,F]=y.useState(n),[E,P]=y.useState(a),le=g??w,ae=f??M,L=i??b,Pe=u??E,De=y.useMemo(()=>({store:j,selectedObjectId:le,orbitEnabled:ae,showGrid:L,showVideoBackground:Pe,onStoreChange:p,onSelectObject:W=>{v(W),h==null||h(W)},onComponentChange:d??(W=>{p({...j,components:{...j.components,[W.id]:W}})}),onObjectChange:r??(W=>{p({...j,objects:{...j.objects,[W.id]:W}})}),onOrbitEnabledChange:W=>{U(W),o==null||o(W)},onShowGridChange:W=>{F(W),x==null||x(W)},onShowVideoBackgroundChange:W=>{P(W),c==null||c(W)}}),[d,r,o,h,x,c,p,ae,le,L,Pe,j]);return e.jsx(Bs.Provider,{value:De,children:t})},bt=()=>{const t=y.useContext(Bs);if(!t)throw new Error("useXRSceneEditor must be used inside XRSceneEditorProvider.");return t},Vs=t=>t.renderGroupOrder.map(s=>t.renderGroups[s]).filter(Boolean),Mr=({initialPosition:t,rootOnly:s=!1,title:l,docked:n})=>{const{onSelectObject:a,onStoreChange:d,selectedObjectId:r,store:o}=bt(),h=Vs(o),x=s?Object.fromEntries(Object.entries(o.objects).filter(([,c])=>!c.parentObjectId)):o.objects;return e.jsx(Ls,{title:l,initialPosition:t,docked:n,groups:h,objects:x,selectedObjectId:r??void 0,onSelectObject:c=>a(c),onReorderGroup:(c,p)=>d(Le.reorderRenderGroup(o,c,p)),onReorderObject:(c,p,f)=>d(Le.reorderObjectWithinGroup(o,c,p,f)),onMoveObject:(c,p,f)=>{const g=Le.moveObjectToGroup(o,c,p,f);return g===o?!1:(d(g),!0)},onSetObjectParent:(c,p,f,g)=>{let i=o;const u=i.objects[c];if(!u||g&&u.renderGroupId!==g&&(i=Le.moveObjectToGroup(i,c,g,f),i===o))return!1;const j=K.setSceneObjectParentPreserveWorldTransform(i,c,p,f);return j===o?!1:(d(j),!0)},onToggleGroupEnabled:(c,p)=>{const f=o.renderGroups[c];f&&d({...o,renderGroups:{...o.renderGroups,[c]:{...f,enabled:p}}})},onToggleObjectVisible:(c,p)=>d(K.setSceneObjectVisible(o,c,p)),copyConfig:{kind:"scene",version:1,renderGroupOrder:o.renderGroupOrder,renderGroups:o.renderGroups,objects:o.objects,components:o.components}})},Q={display:"grid",gridTemplateColumns:"92px minmax(0, 1fr)",alignItems:"center",gap:10,margin:"8px 0",color:"#cbd5e1",fontSize:12},fe={width:"100%",boxSizing:"border-box",padding:"8px 9px",border:"1px solid rgba(148,163,184,.16)",borderRadius:6,background:"rgba(15,23,42,.72)",color:"#e2e8f0"},xt={borderRadius:12,border:"1px solid rgba(255,255,255,0.08)",background:"rgba(255,255,255,0.03)",padding:8},ut={display:"flex",alignItems:"center",gap:6,marginBottom:7,fontSize:11,fontWeight:700},oe=(t,s)=>t.find(l=>l.type===s),Fr=({onChange:t,value:s})=>e.jsxs("section",{style:xt,children:[e.jsx("div",{style:ut,children:"Light"}),e.jsxs("label",{style:Q,children:[e.jsx("span",{children:"Type"}),e.jsxs("select",{style:fe,value:s.type,onChange:l=>t({...s,type:l.currentTarget.value}),children:[e.jsx("option",{value:"ambient",children:"Ambient"}),e.jsx("option",{value:"directional",children:"Directional"}),e.jsx("option",{value:"point",children:"Point"}),e.jsx("option",{value:"spot",children:"Spot"})]})]}),e.jsxs("label",{style:Q,children:[e.jsx("span",{children:"Color"}),e.jsx("input",{type:"color",style:{...fe,padding:2},value:s.color,onChange:l=>t({...s,color:l.currentTarget.value})})]}),e.jsxs("label",{style:Q,children:[e.jsx("span",{children:"Intensity"}),e.jsx("input",{type:"number",min:0,step:.1,style:fe,value:s.intensity,onChange:l=>t({...s,intensity:Number(l.currentTarget.value)})})]}),e.jsxs("label",{style:Q,children:[e.jsx("span",{children:"Cast Shadow"}),e.jsx("input",{type:"checkbox",checked:s.castShadow,onChange:l=>t({...s,castShadow:l.currentTarget.checked})})]}),e.jsxs("label",{style:Q,children:[e.jsx("span",{children:"Show Helper"}),e.jsx("input",{type:"checkbox",checked:s.showHelper,onChange:l=>t({...s,showHelper:l.currentTarget.checked})})]})]}),Wr=({onChange:t,value:s})=>e.jsxs("section",{style:xt,children:[e.jsxs("label",{style:{...ut,justifyContent:"space-between"},children:[e.jsx("span",{children:"Look At"}),e.jsx("input",{type:"checkbox",checked:s.enabled,onChange:l=>t({...s,enabled:l.currentTarget.checked})})]}),e.jsxs("label",{style:Q,children:[e.jsx("span",{children:"Mode"}),e.jsxs("select",{style:fe,value:s.mode,onChange:l=>t({...s,mode:l.currentTarget.value}),children:[e.jsx("option",{value:"point",children:"Point"}),e.jsx("option",{value:"direction",children:"Direction"})]})]}),e.jsxs("label",{style:Q,children:[e.jsx("span",{children:"Children Inherit"}),e.jsx("input",{type:"checkbox",checked:s.inheritChildren,onChange:l=>t({...s,inheritChildren:l.currentTarget.checked})})]})]}),Lr=({onChange:t,value:s})=>{const l=(n,a,d)=>["x","y","z"].map(r=>e.jsxs("label",{style:Q,children:[e.jsx("span",{children:`${n} ${r.toUpperCase()}`}),e.jsx("input",{type:"number",step:.05,style:fe,value:a[r],onChange:o=>d({...a,[r]:Number(o.currentTarget.value)})})]},`${n}-${r}`));return e.jsxs("section",{style:xt,children:[e.jsx("div",{style:ut,children:"Face Binding"}),e.jsxs("label",{style:Q,children:[e.jsx("span",{children:"Target"}),e.jsx("select",{style:fe,value:s.target,onChange:n=>t({...s,target:n.currentTarget.value}),children:Us.FACE_TARGETS.map(n=>e.jsx("option",{value:n,children:n.replace("face.","")},n))})]}),s.target==="face.custom"?l("Custom",s.customAnchorPoint,n=>t({...s,customAnchorPoint:n})):null,l("Offset",s.offset,n=>t({...s,offset:n})),e.jsxs("label",{style:Q,children:[e.jsx("span",{children:"Smoothing"}),e.jsx("input",{type:"number",min:0,step:1,style:fe,value:s.smoothing,onChange:n=>t({...s,smoothing:Number(n.currentTarget.value)})})]}),e.jsxs("label",{style:Q,children:[e.jsx("span",{children:"Follow Face Roll"}),e.jsx("input",{type:"checkbox",checked:s.followFaceRoll,onChange:n=>t({...s,followFaceRoll:n.currentTarget.checked})})]})]})},$r=({initialPosition:t,docked:s})=>{const{onComponentChange:l,onObjectChange:n,onStoreChange:a,selectedObjectId:d,store:r}=bt(),o=d?r.objects[d]:null,h=o?K.getOrderedComponents(r,o.id):[],x=oe(h,"Transform"),c=oe(h,"ScreenTransform"),p=oe(h,"ScreenShape"),f=oe(h,"MeshRenderer"),g=oe(h,"FaceMeshRenderer"),i=oe(h,"Light"),u=oe(h,"LookAt"),j=oe(h,"PinToMesh"),w=oe(h,"TrackingAnchor"),v=o!=null&&o.renderGroupId?r.renderGroups[o.renderGroupId]:void 0;if(!o)return null;const M=Object.values(r.objects).filter(b=>b.id!==o.id).filter(b=>{const F=K.getOrderedComponents(r,b.id);return!!oe(F,"MeshRenderer")}).map(b=>({id:b.id,name:b.name})),U=Object.values(r.objects).filter(b=>b.id!==o.id);return e.jsxs(Ct,{objectId:o.id,objectName:o.name,onObjectNameChange:b=>n({...o,name:b}),visible:o.enabled,onVisibleChange:b=>n({...o,enabled:b}),layer:(v==null?void 0:v.name)??"3D Scene",initialPosition:t,docked:s,copyConfig:{object:o,components:h},children:[e.jsxs("section",{style:xt,children:[e.jsx("div",{style:ut,children:"Hierarchy"}),e.jsxs("label",{style:Q,children:[e.jsx("span",{children:"Parent"}),e.jsxs("select",{style:fe,value:o.parentObjectId??"",onChange:b=>a(K.setSceneObjectParentPreserveWorldTransform(r,o.id,b.currentTarget.value||null)),children:[e.jsx("option",{value:"",children:"None"}),U.map(b=>e.jsx("option",{value:b.id,children:b.name},b.id))]})]})]}),x?e.jsx(_t,{value:x.settings,onChange:b=>l({...x,settings:b})}):null,c?e.jsxs("section",{style:xt,children:[e.jsx("div",{style:ut,children:"Screen Transform"}),e.jsx(Ht,{guideLabel:"Screen Transform",value:{...c.settings,showGuides:c.settings.showTransformGuides},onChange:b=>{const{showGuides:F,...E}=b;l({...c,settings:{...c.settings,...E,showTransformGuides:F}})}})]}):null,f?e.jsx(Ds,{value:f.settings,onChange:b=>l({...f,settings:b})}):null,g?e.jsx(Xt,{value:g.settings,onChange:b=>l({...g,settings:b})}):null,p?e.jsx(Ts,{value:p.settings,onChange:b=>l({...p,settings:b})}):null,i?e.jsx(Fr,{value:i.settings,onChange:b=>l({...i,settings:b})}):null,u?e.jsx(Wr,{value:u.settings,onChange:b=>l({...u,settings:b})}):null,j?e.jsx($s,{value:j.settings,onChange:b=>l({...j,settings:b}),targets:M}):null,w?e.jsx(Lr,{value:w.settings,onChange:b=>l({...w,settings:b})}):null]})},Nr=({renderOrder:t=-999})=>{const{camera:s,size:l}=Xs.useThree(),n=Ys.useXRCameraTexture(),a=y.useMemo(()=>{if(!s.isPerspectiveCamera)return[10,10];const d=s,h=(d.position.z||5)- -1,x=d.fov*Math.PI/180,c=2*Math.tan(x/2)*h;return[c*(l.width/l.height),c]},[s,l]);return n?e.jsxs("mesh",{position:[0,0,-1],renderOrder:t,children:[e.jsx("planeGeometry",{args:a}),e.jsx("meshBasicMaterial",{map:n,depthTest:!0,depthWrite:!0,toneMapped:!1,side:Gs.DoubleSide})]}):null},Or=({camera:t={position:{x:0,y:.2,z:5.5},fov:42},grid:s={size:12,divisions:12,position:{x:0,y:-2.5,z:0}},style:l})=>{const{onComponentChange:n,orbitEnabled:a,showGrid:d,showVideoBackground:r,store:o}=bt(),h=Le.createRenderPlan(o),x=Array.from(new Set(h.map(f=>f.renderLayer))),c=t.position??{x:0,y:.2,z:5.5},p=s.position??{x:0,y:-2.5,z:0};return e.jsxs(Zs.XRScene,{style:{width:"100%",height:"100%",...l},canvasProps:{shadows:!0},children:[r?e.jsx(Nr,{renderOrder:-999}):null,e.jsx("color",{attach:"background",args:["#18212b"]}),e.jsx(Zt.PerspectiveCamera,{makeDefault:!0,position:[c.x,c.y,c.z],fov:t.fov??42}),e.jsx("ambientLight",{intensity:1.1}),d?e.jsx("gridHelper",{args:[s.size??12,s.divisions??12,"#344454","#263544"],position:[p.x,p.y,p.z]}):null,h.map(f=>e.jsx(Yt.SceneObjectRenderer,{objectId:f.objectId,store:o,editorMode:!0,renderOrder:f.renderOrder,renderLayer:f.renderLayer,onComponentChange:n},f.objectId)),e.jsx(Yt.SequentialRenderPasses,{layers:x}),e.jsx(Zt.OrbitControls,{enabled:a,enablePan:!1,minDistance:.05,maxDistance:1/0})]})},Ar=t=>({position:"absolute",top:12,left:t==="top-left"?12:t==="top-right"?"auto":"50%",right:t==="top-right"?12:"auto",transform:t==="top-center"||!t?"translateX(-50%)":"none",zIndex:5,display:"flex",alignItems:"center",gap:12,padding:"7px 10px",border:"1px solid rgba(148,163,184,.24)",borderRadius:9,background:"rgba(15,23,42,.78)",color:"#d8e2ec",backdropFilter:"blur(12px)",fontSize:11}),Pr=({position:t="top-center"})=>{const{onOrbitEnabledChange:s,orbitEnabled:l}=bt();return e.jsxs("div",{style:Ar(t),children:[e.jsx("span",{style:{color:"#7e95aa",fontSize:9,fontWeight:800,letterSpacing:"0.14em"},children:"VIEWPORT"}),e.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer"},children:[e.jsx("input",{type:"checkbox",checked:l,onChange:n=>s(n.currentTarget.checked)}),"Orbit Controls"]})]})},Dr={borderRadius:12,border:"1px solid rgba(251,191,36,0.30)",background:"rgba(251,191,36,0.08)",color:"#fde68a",padding:8,fontSize:10.5,lineHeight:1.45},Br={display:"block",marginTop:6,overflow:"auto",maxHeight:160,borderRadius:8,background:"rgba(15,23,42,0.55)",color:"#f8fafc",padding:8,fontSize:10},Ks=({component:t})=>e.jsxs("div",{style:Dr,children:[e.jsxs("div",{children:["Missing editor for component type: ",t.type]}),e.jsxs("div",{children:["Component ID: ",t.id]}),e.jsx("pre",{style:Br,children:JSON.stringify(t,null,2)})]}),Vr=({component:t,editors:s={},onChange:l})=>{const n=s[t.type];return n?e.jsx(n,{component:t,onChange:l}):e.jsx(Ks,{component:t})},Kr=t=>t.slice(0,12);exports.MediaSourceSwitcher=Oe.MediaSourceSwitcher;exports.defaultMediaSources=Oe.defaultMediaSources;exports.sampleVideoMediaSources=Oe.sampleVideoMediaSources;exports.sdkImageMediaSources=Oe.sdkImageMediaSources;exports.sdkVideoMediaSources=Oe.sdkVideoMediaSources;exports.useFaceTrackingMediaSourceSession=Oe.useFaceTrackingMediaSourceSession;exports.useMediaSourceSession=Oe.useMediaSourceSession;exports.DefaultSettingPanel=Hs.DefaultSettingPanel;exports.ComponentEditor=Vr;exports.ComponentEditorFallback=Ks;exports.FaceMeshRendererComponentEditor=Tr;exports.FaceMeshRendererSettingsPanel=Xt;exports.FaceRetouchSettingsPanel=No;exports.FaceSwapSettingsPanel=Oo;exports.GestureSettingsPanel=Ao;exports.HandJoints2DSettingsPanel=Ai;exports.HandTracking2DControllerSettingsPanel=wi;exports.HandTracking2DSettingsPanel=li;exports.HandTracking3DSettingsPanel=eo;exports.HierarchyPanel=Ls;exports.HolisticTrackerSettingsPanel=Ko;exports.IrisEffectSettingsPanel=Po;exports.LayerPanel=fo;exports.LipEffectSettingsPanel=Do;exports.MeshRendererSettingsPanel=Ds;exports.ObjectInspectorPanel=Ct;exports.PinToMeshSettingsPanel=$s;exports.ProductHotspotPanel=Bo;exports.SceneHierarchyPanel=Mr;exports.SceneInspectorPanel=$r;exports.ScreenGlassSettingsPanel=Es;exports.ScreenGradientSettingsPanel=Is;exports.ScreenImageSettingsPanel=Ol;exports.ScreenShapeSettingsPanel=Ts;exports.ScreenTextSettingsPanel=hl;exports.SegmentationOverlaySettingsPanel=Ho;exports.SettingsPanel=Se;exports.Transform3DSettingsPanel=yr;exports.Transform3DSettingsSection=_t;exports.ViewportToolbar=Pr;exports.XRDiagnosticsPanel=Vo;exports.XRSceneEditorProvider=zr;exports.XRSceneViewport=Or;exports.createComponentIdLabel=Kr;exports.getSceneEditorGroups=Vs;exports.useXRSceneEditor=bt;
|