@galacean/cli 2.0.0-alpha.12 → 2.0.0-alpha.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/dist/cli.bundle.cjs +134 -135
  2. package/dist/viewport-client/_static/Accordion-3d330bc6.js +1 -0
  3. package/dist/viewport-client/_static/{AmbientLightAsset-f70b95f1.js → AmbientLightAsset-bdbc4e1d.js} +2 -2
  4. package/dist/viewport-client/_static/AnimationClipAsset-9167378a.js +1 -0
  5. package/dist/viewport-client/_static/AnimatorControllerAsset-21dc6332.js +1 -0
  6. package/dist/viewport-client/_static/AnimatorStore-18d3c551.js +1 -0
  7. package/dist/viewport-client/_static/{AssetViewer-bc198e16.js → AssetViewer-64cd01fa.js} +1 -1
  8. package/dist/viewport-client/_static/AudioAsset-0c828c80.js +1 -0
  9. package/dist/viewport-client/_static/AudioComponent-fbff3825.js +1 -0
  10. package/dist/viewport-client/_static/{Callout-cb4a55ff.js → Callout-ba7e2adf.js} +1 -1
  11. package/dist/viewport-client/_static/CameraComponent-74975570.js +1 -0
  12. package/dist/viewport-client/_static/{Component-f923abb1.js → Component-ed7aa0ab.js} +1 -1
  13. package/dist/viewport-client/_static/DirectLight-b884e7db.js +1 -0
  14. package/dist/viewport-client/_static/FontAsset-d1ced18d.js +5 -0
  15. package/dist/viewport-client/_static/FormItemArray-6d69acd4.js +6 -0
  16. package/dist/viewport-client/_static/{GlTFAsset-9c68f862.js → GlTFAsset-2723b84a.js} +9 -9
  17. package/dist/viewport-client/_static/IconEdit-ab77303f.js +6 -0
  18. package/dist/viewport-client/_static/{IconPointFilled-a304fd34.js → IconPointFilled-811fc660.js} +1 -1
  19. package/dist/viewport-client/_static/LightBaseComponent-12dc27d1.js +1 -0
  20. package/dist/viewport-client/_static/LottieAnimationComponent-c48c5eb5.js +1 -0
  21. package/dist/viewport-client/_static/LottieAsset-3692580d.js +6 -0
  22. package/dist/viewport-client/_static/MarkdownAsset-bcb90be4.js +1 -0
  23. package/dist/viewport-client/_static/MaterialAsset-6ef9b4ed.js +1 -0
  24. package/dist/viewport-client/_static/MaterialInspector-e8242674.js +1 -0
  25. package/dist/viewport-client/_static/Menu-0b8da92f.js +17 -0
  26. package/dist/viewport-client/_static/MeshAsset-ca9305e5.js +1 -0
  27. package/dist/viewport-client/_static/MeshRendererBaseComponent-9efd3943.js +1 -0
  28. package/dist/viewport-client/_static/MeshRendererComponent-c9a03641.js +1 -0
  29. package/dist/viewport-client/_static/{MeshThumbnail-49273f71.js → MeshThumbnail-ab28b3b8.js} +1 -1
  30. package/dist/viewport-client/_static/ParticleRendererComponent-96947c1d.js +26 -0
  31. package/dist/viewport-client/_static/PhysicsMaterialAsset-4a1e5ea3.js +1 -0
  32. package/dist/viewport-client/_static/PhysicsStore-33cac578.js +1 -0
  33. package/dist/viewport-client/_static/PointLight-fd514526.js +1 -0
  34. package/dist/viewport-client/_static/PostProcessComponent-d0ea27a4.js +6 -0
  35. package/dist/viewport-client/_static/PrefabAsset-9179b95c.js +1 -0
  36. package/dist/viewport-client/_static/PrimitiveMesh-0572a073.js +1 -0
  37. package/dist/viewport-client/_static/ProxyConfigs-3a5fd860.js +1 -0
  38. package/dist/viewport-client/_static/{ReferencedMaterial-a87818f3.js → ReferencedMaterial-5773c9d2.js} +1 -1
  39. package/dist/viewport-client/_static/RenderTargetAsset-ab6e06d2.js +1 -0
  40. package/dist/viewport-client/_static/SceneAsset-385fa837.js +1 -0
  41. package/dist/viewport-client/_static/{ShaderAsset-cb3ff628.js → ShaderAsset-f4514b03.js} +6 -6
  42. package/dist/viewport-client/_static/ShaderChunkAsset-34116f2c.js +5 -0
  43. package/dist/viewport-client/_static/{ShaderUIScriptAsset-d13fa4e2.js → ShaderUIScriptAsset-fc503291.js} +5 -5
  44. package/dist/viewport-client/_static/SkinnedMeshRendererComponent-494ad439.js +1 -0
  45. package/dist/viewport-client/_static/SpineAnimationComponent-3918d7b5.js +1 -0
  46. package/dist/viewport-client/_static/SpineSkeletonDataAsset-27244892.js +1 -0
  47. package/dist/viewport-client/_static/SpotLight-f9972dc0.js +1 -0
  48. package/dist/viewport-client/_static/SpriteAsset-558ffca8.js +6 -0
  49. package/dist/viewport-client/_static/SpriteAtlasAsset-cdc34386.js +1 -0
  50. package/dist/viewport-client/_static/SpriteBaseComponent-3edafa31.js +1 -0
  51. package/dist/viewport-client/_static/SpriteMaskComponent-de2e5231.js +1 -0
  52. package/dist/viewport-client/_static/SpriteRendererComponent-e999e735.js +1 -0
  53. package/dist/viewport-client/_static/{TextBaseComponent-69233798.js → TextBaseComponent-ce1402c3.js} +2 -2
  54. package/dist/viewport-client/_static/TextRendererComponent-f7c0deae.js +1 -0
  55. package/dist/viewport-client/_static/TextureAsset-39fb07fe.js +36 -0
  56. package/dist/viewport-client/_static/Tooltip-82063435.js +1 -0
  57. package/dist/viewport-client/_static/TrailRendererComponent-37f5c981.js +1 -0
  58. package/dist/viewport-client/_static/TransformBaseComponent-713d57e9.js +1 -0
  59. package/dist/viewport-client/_static/TransformComponent-40a57948.js +1 -0
  60. package/dist/viewport-client/_static/XRReferenceImageAsset-2f6ff226.js +1 -0
  61. package/dist/viewport-client/_static/audio-7120ec91.js +1 -0
  62. package/dist/viewport-client/_static/glTFIO-79bbca27.js +1 -0
  63. package/dist/viewport-client/_static/index-483b5738.js +1 -0
  64. package/dist/viewport-client/_static/{index-98982ce2.js → index-74130ff3.js} +1 -1
  65. package/dist/viewport-client/_static/index-78269e76.js +1 -0
  66. package/dist/viewport-client/_static/index-7834b582.js +1 -0
  67. package/dist/viewport-client/_static/{index-237c84cd.js → index-7917f782.js} +3 -3
  68. package/dist/viewport-client/_static/index-7acd49d2.js +1 -0
  69. package/dist/viewport-client/_static/index-9d3917da.js +1 -0
  70. package/dist/viewport-client/_static/index-a9b2675e.js +1 -0
  71. package/dist/viewport-client/_static/index-aec7e708.js +11487 -0
  72. package/dist/viewport-client/_static/index-b5582401.js +1 -0
  73. package/dist/viewport-client/_static/{index-e46ec5b1.js → index-bfe6f30e.js} +7 -7
  74. package/dist/viewport-client/_static/index-c63c9606.js +2 -0
  75. package/dist/viewport-client/_static/index-cd1fee9d.js +1 -0
  76. package/dist/viewport-client/_static/index-e73ceaed.js +1 -0
  77. package/dist/viewport-client/_static/index-e8a45e82.js +1 -0
  78. package/dist/viewport-client/_static/index-f2cb64af.js +1 -0
  79. package/dist/viewport-client/_static/index-fbe040bf.js +31 -0
  80. package/dist/viewport-client/_static/ktx2-encoder-53b21bdc.js +1 -0
  81. package/dist/viewport-client/_static/{module-5c85b07e.js → module-220b3921.js} +1 -1
  82. package/dist/viewport-client/_static/{module-6406b050.js → module-8816772d.js} +1 -1
  83. package/dist/viewport-client/_static/{module-107b7430.js → module-ffeaf99f.js} +1 -1
  84. package/dist/viewport-client/_static/postmen-2f47f6bb.js +1 -0
  85. package/dist/viewport-client/index.html +2 -2
  86. package/package.json +1 -1
  87. package/dist/viewport-client/_static/Accordion-4897319b.js +0 -6
  88. package/dist/viewport-client/_static/AnimationClipAsset-01f3deb6.js +0 -1
  89. package/dist/viewport-client/_static/AnimatorControllerAsset-b7424e9c.js +0 -1
  90. package/dist/viewport-client/_static/AnimatorStore-fd98c00e.js +0 -1
  91. package/dist/viewport-client/_static/AssetPreviewer-24e31d97.js +0 -6
  92. package/dist/viewport-client/_static/AudioAsset-eae03324.js +0 -1
  93. package/dist/viewport-client/_static/AudioComponent-44070c2c.js +0 -1
  94. package/dist/viewport-client/_static/CameraComponent-907ac745.js +0 -1
  95. package/dist/viewport-client/_static/CanvasRenderer-9dd98cb3.js +0 -1
  96. package/dist/viewport-client/_static/DirectLight-58f5fe9e.js +0 -1
  97. package/dist/viewport-client/_static/FontAsset-abfb9a8a.js +0 -5
  98. package/dist/viewport-client/_static/FormItemArray-66be8701.js +0 -1
  99. package/dist/viewport-client/_static/IconPlayerPlayFilled-b058c98f.js +0 -6
  100. package/dist/viewport-client/_static/InstanceEditorAsset-a70e73fe.js +0 -1
  101. package/dist/viewport-client/_static/LightBaseComponent-fbc3ae49.js +0 -1
  102. package/dist/viewport-client/_static/LottieAnimationComponent-1c3e02a5.js +0 -1
  103. package/dist/viewport-client/_static/LottieAsset-377c1419.js +0 -1
  104. package/dist/viewport-client/_static/MarkdownAsset-7ea387a9.js +0 -1
  105. package/dist/viewport-client/_static/MaterialAsset-74a15124.js +0 -1
  106. package/dist/viewport-client/_static/MaterialInspector-aec1248b.js +0 -1
  107. package/dist/viewport-client/_static/Menu-cd3be298.js +0 -17
  108. package/dist/viewport-client/_static/MeshAsset-73e2cc8e.js +0 -1
  109. package/dist/viewport-client/_static/MeshRendererBaseComponent-3a0e09ed.js +0 -1
  110. package/dist/viewport-client/_static/MeshRendererComponent-5385d30f.js +0 -1
  111. package/dist/viewport-client/_static/ParticleRendererComponent-5a7b57d9.js +0 -21
  112. package/dist/viewport-client/_static/PhysicsMaterialAsset-a5ac9f82.js +0 -1
  113. package/dist/viewport-client/_static/PhysicsStore-0729e76d.js +0 -1
  114. package/dist/viewport-client/_static/PointLight-0e1d1546.js +0 -1
  115. package/dist/viewport-client/_static/PostProcessComponent-8276d33c.js +0 -1
  116. package/dist/viewport-client/_static/PrefabAsset-1a7edfbd.js +0 -1
  117. package/dist/viewport-client/_static/PrimitiveMesh-3ce6fa2f.js +0 -1
  118. package/dist/viewport-client/_static/ProxyConfigs-4de3304c.js +0 -1
  119. package/dist/viewport-client/_static/RenderTargetAsset-33c0d9e7.js +0 -1
  120. package/dist/viewport-client/_static/SceneAsset-8917c210.js +0 -1
  121. package/dist/viewport-client/_static/ShaderChunkAsset-83f923f4.js +0 -5
  122. package/dist/viewport-client/_static/SkinnedMeshRendererComponent-2a8323bf.js +0 -1
  123. package/dist/viewport-client/_static/SpineAnimationComponent-e733d50f.js +0 -1
  124. package/dist/viewport-client/_static/SpineSkeletonDataAsset-b64a3ee3.js +0 -1
  125. package/dist/viewport-client/_static/SpotLight-ca6c0c3b.js +0 -1
  126. package/dist/viewport-client/_static/SpriteAsset-9a31ec24.js +0 -1
  127. package/dist/viewport-client/_static/SpriteAtlasAsset-a862db46.js +0 -1
  128. package/dist/viewport-client/_static/SpriteBaseComponent-f6f1731f.js +0 -1
  129. package/dist/viewport-client/_static/SpriteMaskComponent-778be04f.js +0 -1
  130. package/dist/viewport-client/_static/SpriteRendererComponent-2b4d153b.js +0 -1
  131. package/dist/viewport-client/_static/TextRendererComponent-130b4e99.js +0 -1
  132. package/dist/viewport-client/_static/TextureAsset-28fedf2a.js +0 -36
  133. package/dist/viewport-client/_static/ThumbnailMixin-35997457.js +0 -1
  134. package/dist/viewport-client/_static/ThumbnailRegistry-495c18c9.js +0 -1
  135. package/dist/viewport-client/_static/Tooltip-33f770ba.js +0 -1
  136. package/dist/viewport-client/_static/TrailRendererComponent-148550b5.js +0 -1
  137. package/dist/viewport-client/_static/TransformBaseComponent-02318c5a.js +0 -1
  138. package/dist/viewport-client/_static/TransformComponent-96106065.js +0 -1
  139. package/dist/viewport-client/_static/ViewerManager-202b570a.js +0 -1
  140. package/dist/viewport-client/_static/XRReferenceImageAsset-6a6adb3b.js +0 -1
  141. package/dist/viewport-client/_static/audio-244358e2.js +0 -1
  142. package/dist/viewport-client/_static/glTFIO-45ff9a17.js +0 -1
  143. package/dist/viewport-client/_static/index-0a8702e2.js +0 -11217
  144. package/dist/viewport-client/_static/index-37c74ae9.js +0 -26
  145. package/dist/viewport-client/_static/index-4cca0201.js +0 -1
  146. package/dist/viewport-client/_static/index-59732f86.js +0 -1
  147. package/dist/viewport-client/_static/index-6c8198f6.js +0 -2
  148. package/dist/viewport-client/_static/index-6f827618.js +0 -1
  149. package/dist/viewport-client/_static/index-803ca489.js +0 -1
  150. package/dist/viewport-client/_static/index-85a6cf6a.js +0 -1
  151. package/dist/viewport-client/_static/index-b3d51f87.js +0 -1
  152. package/dist/viewport-client/_static/index-be6bc38a.js +0 -177
  153. package/dist/viewport-client/_static/index-c403cbcd.js +0 -1
  154. package/dist/viewport-client/_static/index-e73966ae.js +0 -1
  155. package/dist/viewport-client/_static/index-e95b4498.js +0 -1
  156. package/dist/viewport-client/_static/index-f5a67a46.js +0 -1
  157. package/dist/viewport-client/_static/ktx-parse.modern-6c9f771f.js +0 -1
  158. package/dist/viewport-client/_static/ktx2-encoder-1e63c1eb.js +0 -1
  159. package/dist/viewport-client/_static/postmen-45d4c238.js +0 -1
  160. package/dist/viewport-client/_static/utilities-e09052e3.js +0 -11
@@ -1,4 +1,4 @@
1
- var Cn=Object.defineProperty;var En=(e,t,n)=>t in e?Cn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var x=(e,t,n)=>(En(e,typeof t!="symbol"?t+"":t,n),n);import{CameraComponent as Bi}from"./CameraComponent-907ac745.js";import{DirectLightComponent as ki}from"./DirectLight-58f5fe9e.js";import{PointLightComponent as ji}from"./PointLight-0e1d1546.js";import{SpotLightComponent as $i}from"./SpotLight-ca6c0c3b.js";import{MeshRendererComponent as Xi}from"./MeshRendererComponent-5385d30f.js";import{SkinnedMeshRendererComponent as Wi}from"./SkinnedMeshRendererComponent-2a8323bf.js";import{A as Ki,a as Vi}from"./AnimatorStore-fd98c00e.js";import{SpriteRendererComponent as qi}from"./SpriteRendererComponent-2b4d153b.js";import{SpriteMaskComponent as Qi}from"./SpriteMaskComponent-778be04f.js";import{C as es,D as ts,F as ns,H as rs,P as os,a as is,S as ss}from"./PhysicsStore-0729e76d.js";import{ScriptComponent as ls}from"./index-e95b4498.js";import{TextRendererComponent as us}from"./TextRendererComponent-130b4e99.js";import{LottieAnimationComponent as fs}from"./LottieAnimationComponent-1c3e02a5.js";import{SpineAnimationComponent as hs}from"./SpineAnimationComponent-e733d50f.js";import{ParticleRendererComponent as vs}from"./ParticleRendererComponent-5a7b57d9.js";import{TrailRendererComponent as bs}from"./TrailRendererComponent-148550b5.js";import{aC as ct,aJ as l,bx as U,e3 as he,aH as ut,aK as Fe,aT as Dn,aU as Rn,aD as E,aM as Je,e4 as Pn,b8 as Mn,cF as An,bd as _n,H as In,U as jt,O as On,e5 as qe,L as Ln,cQ as De,dK as Ft,o as Tn,bf as Bn,u as le,bp as Nn,J as ve,bg as kn}from"./index-0a8702e2.js";import{u as zn}from"./InstanceEditorAsset-a70e73fe.js";import"./ThumbnailMixin-35997457.js";import{I as jn}from"./AssetPreviewer-24e31d97.js";import"./CanvasRenderer-9dd98cb3.js";import"./postmen-45d4c238.js";import{I as Fn}from"./IconPlayerPlayFilled-b058c98f.js";import{T as Ge}from"./Tooltip-33f770ba.js";import{I as xs}from"./index-e73966ae.js";import{P as Ss}from"./PostProcessComponent-8276d33c.js";import{AudioComponent as Es}from"./AudioComponent-44070c2c.js";import{TransformComponent as Rs}from"./TransformComponent-96106065.js";import{ButtonComponent as Ms,ImageComponent as As,TextComponent as _s,UICanvasComponent as Is,UIGroupComponent as Os,UITransformComponent as Ls}from"./index-85a6cf6a.js";import"./Component-f923abb1.js";import"./ThumbnailRegistry-495c18c9.js";import"./LightBaseComponent-fbc3ae49.js";import"./createOnModelChange-b57a0da8.js";import"./ReferencedMaterial-a87818f3.js";import"./MaterialInspector-aec1248b.js";import"./IconPointFilled-a304fd34.js";import"./MeshRendererBaseComponent-3a0e09ed.js";import"./SpriteBaseComponent-f6f1731f.js";import"./FormItemArray-66be8701.js";import"./Accordion-4897319b.js";import"./scriptPropertyActions-d3a583d2.js";import"./TextureAsset-28fedf2a.js";import"./enum-58295f88.js";import"./encode-ac4bb64e.js";import"./meshopt_simplifier.module-cd99529d.js";import"./AssetViewer-bc198e16.js";import"./ktx2-encoder-1e63c1eb.js";import"./TaskQueue-05c94a4d.js";import"./ktx-parse.modern-6c9f771f.js";import"./GlTFAsset-9c68f862.js";import"./glTFIO-45ff9a17.js";import"./MaterialAsset-74a15124.js";import"./ProxyConfigs-4de3304c.js";import"./index-be6bc38a.js";import"./MeshAsset-73e2cc8e.js";import"./index-98982ce2.js";import"./MeshThumbnail-49273f71.js";import"./AnimatorControllerAsset-b7424e9c.js";import"./bundlers-9b0d37fc.js";import"./assetEditorActions-c4e5962f.js";import"./AnimationClipAsset-01f3deb6.js";import"./module-6406b050.js";import"./module-107b7430.js";import"./SpriteAsset-9a31ec24.js";import"./SpriteAtlasAsset-a862db46.js";import"./utilities-e09052e3.js";import"./AmbientLightAsset-f70b95f1.js";import"./LottieAsset-377c1419.js";import"./ShaderChunkAsset-83f923f4.js";import"./SpineSkeletonDataAsset-b64a3ee3.js";import"./FontAsset-abfb9a8a.js";import"./SceneAsset-8917c210.js";import"./ShaderAsset-cb3ff628.js";import"./ShaderUIScriptAsset-d13fa4e2.js";import"./PrimitiveMesh-3ce6fa2f.js";import"./XRReferenceImageAsset-6a6adb3b.js";import"./module-5c85b07e.js";import"./PrefabAsset-1a7edfbd.js";import"./PhysicsMaterialAsset-a5ac9f82.js";import"./RenderTargetAsset-33c0d9e7.js";import"./AudioAsset-eae03324.js";import"./index-59732f86.js";import"./MarkdownAsset-7ea387a9.js";import"./TextBaseComponent-69233798.js";import"./index-37c74ae9.js";import"./Menu-cd3be298.js";import"./TransformBaseComponent-02318c5a.js";import"./Callout-cb4a55ff.js";/**
1
+ var Cn=Object.defineProperty;var En=(e,t,n)=>t in e?Cn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var x=(e,t,n)=>(En(e,typeof t!="symbol"?t+"":t,n),n);import{CameraComponent as Mi}from"./CameraComponent-74975570.js";import{DirectLightComponent as _i}from"./DirectLight-b884e7db.js";import{PointLightComponent as Oi}from"./PointLight-fd514526.js";import{SpotLightComponent as Ti}from"./SpotLight-f9972dc0.js";import{MeshRendererComponent as Ni}from"./MeshRendererComponent-c9a03641.js";import{SkinnedMeshRendererComponent as zi}from"./SkinnedMeshRendererComponent-494ad439.js";import{A as Fi,a as $i}from"./AnimatorStore-18d3c551.js";import{SpriteRendererComponent as Xi}from"./SpriteRendererComponent-e999e735.js";import{SpriteMaskComponent as Yi}from"./SpriteMaskComponent-de2e5231.js";import{C as Ki,D as Vi,F as qi,H as Gi,P as Ji,a as Qi,S as Zi}from"./PhysicsStore-33cac578.js";import{ScriptComponent as ts}from"./index-7acd49d2.js";import{TextRendererComponent as rs}from"./TextRendererComponent-f7c0deae.js";import{LottieAnimationComponent as is}from"./LottieAnimationComponent-c48c5eb5.js";import{SpineAnimationComponent as as}from"./SpineAnimationComponent-3918d7b5.js";import{ParticleRendererComponent as cs}from"./ParticleRendererComponent-96947c1d.js";import{TrailRendererComponent as ds}from"./TrailRendererComponent-37f5c981.js";import{aG as ct,aU as l,bL as X,e6 as pe,aO as ut,aP as Fe,aQ as Dn,aR as Rn,aS as E,aT as qe,e7 as Pn,e8 as Mn,e9 as An,bl as _n,dQ as In,bq as On,K as Ln,U as jt,O as Tn,ea as Ge,L as Bn,ct as De,d_ as Ft,u as Nn,bs as kn,x as le,bD as zn,aL as ve,bt as jn}from"./index-aec7e708.js";import{u as Fn}from"./index-e8a45e82.js";import"./postmen-2f47f6bb.js";import{T as Je}from"./Tooltip-82063435.js";import{I as hs}from"./index-f2cb64af.js";import{P as gs}from"./PostProcessComponent-d0ea27a4.js";import{AudioComponent as ms}from"./AudioComponent-fbff3825.js";import{TransformComponent as ys}from"./TransformComponent-40a57948.js";import{ButtonComponent as ws,ImageComponent as Ss,TextComponent as Cs,UICanvasComponent as Es,UIGroupComponent as Ds,UITransformComponent as Rs}from"./index-7834b582.js";import"./Component-ed7aa0ab.js";import"./LightBaseComponent-12dc27d1.js";import"./createOnModelChange-b57a0da8.js";import"./ReferencedMaterial-5773c9d2.js";import"./MaterialInspector-e8242674.js";import"./IconPointFilled-811fc660.js";import"./MeshRendererBaseComponent-9efd3943.js";import"./SpriteBaseComponent-3edafa31.js";import"./FormItemArray-6d69acd4.js";import"./Accordion-3d330bc6.js";import"./IconEdit-ab77303f.js";import"./scriptPropertyActions-d3a583d2.js";import"./TextureAsset-39fb07fe.js";import"./enum-58295f88.js";import"./encode-ac4bb64e.js";import"./meshopt_simplifier.module-cd99529d.js";import"./AssetViewer-64cd01fa.js";import"./ktx2-encoder-53b21bdc.js";import"./TaskQueue-05c94a4d.js";import"./GlTFAsset-2723b84a.js";import"./glTFIO-79bbca27.js";import"./MaterialAsset-6ef9b4ed.js";import"./ProxyConfigs-3a5fd860.js";import"./MeshAsset-ca9305e5.js";import"./index-74130ff3.js";import"./MeshThumbnail-ab28b3b8.js";import"./AnimatorControllerAsset-21dc6332.js";import"./bundlers-9b0d37fc.js";import"./assetEditorActions-c4e5962f.js";import"./AnimationClipAsset-9167378a.js";import"./module-8816772d.js";import"./module-ffeaf99f.js";import"./SpriteAsset-558ffca8.js";import"./SpriteAtlasAsset-cdc34386.js";import"./AmbientLightAsset-bdbc4e1d.js";import"./LottieAsset-3692580d.js";import"./ShaderChunkAsset-34116f2c.js";import"./SpineSkeletonDataAsset-27244892.js";import"./FontAsset-d1ced18d.js";import"./SceneAsset-385fa837.js";import"./ShaderAsset-f4514b03.js";import"./ShaderUIScriptAsset-fc503291.js";import"./PrimitiveMesh-0572a073.js";import"./XRReferenceImageAsset-2f6ff226.js";import"./module-220b3921.js";import"./PrefabAsset-9179b95c.js";import"./PhysicsMaterialAsset-4a1e5ea3.js";import"./RenderTargetAsset-ab6e06d2.js";import"./AudioAsset-0c828c80.js";import"./index-78269e76.js";import"./MarkdownAsset-bcb90be4.js";import"./TextBaseComponent-ce1402c3.js";import"./index-fbe040bf.js";import"./Menu-0b8da92f.js";import"./TransformBaseComponent-713d57e9.js";import"./Callout-ba7e2adf.js";/**
2
2
  * @license @tabler/icons-react v3.24.0 - MIT
3
3
  *
4
4
  * This source code is licensed under the MIT license.
@@ -13,8 +13,8 @@ var Cn=Object.defineProperty;var En=(e,t,n)=>t in e?Cn(e,t,{enumerable:!0,config
13
13
  *
14
14
  * This source code is licensed under the MIT license.
15
15
  * See the LICENSE file in the root directory of this source tree.
16
- */var Xn=ct("filled","player-stop-filled","IconPlayerStopFilled",[["path",{d:"M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z",key:"svg-0"}]]);const He=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function me(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function dt(e){return"nodeType"in e}function k(e){var t,n;return e?me(e)?e:dt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function ft(e){const{Document:t}=k(e);return e instanceof t}function _e(e){return me(e)?!1:e instanceof k(e).HTMLElement}function Gt(e){return e instanceof k(e).SVGElement}function be(e){return e?me(e)?e.document:dt(e)?ft(e)?e:_e(e)||Gt(e)?e.ownerDocument:document:document:document}const oe=He?l.useLayoutEffect:l.useEffect;function pt(e){const t=l.useRef(e);return oe(()=>{t.current=e}),l.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Hn(){const e=l.useRef(null),t=l.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=l.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ht(e,t){t===void 0&&(t=[e]);const n=l.useRef(e);return oe(()=>{n.current!==e&&(n.current=e)},t),n}function Ie(e,t){const n=l.useRef();return l.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function rt(e){const t=pt(e),n=l.useRef(null),r=l.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function ot(e){const t=l.useRef();return l.useEffect(()=>{t.current=e},[e]),t.current}let Qe={};function gt(e,t){return l.useMemo(()=>{if(t)return t;const n=Qe[e]==null?0:Qe[e]+1;return Qe[e]=n,e+"-"+n},[e,t])}function Qt(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,a)=>{const s=Object.entries(a);for(const[c,u]of s){const d=i[c];d!=null&&(i[c]=d+e*u)}return i},{...t})}}const ge=Qt(1),$e=Qt(-1);function Wn(e){return"clientX"in e&&"clientY"in e}function Zt(e){if(!e)return!1;const{KeyboardEvent:t}=k(e.target);return t&&e instanceof t}function Yn(e){if(!e)return!1;const{TouchEvent:t}=k(e.target);return t&&e instanceof t}function it(e){if(Yn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Wn(e)?{x:e.clientX,y:e.clientY}:null}const $t="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Kn(e){return e.matches($t)?e:e.querySelector($t)}const Vn={display:"none"};function Jn(e){let{id:t,value:n}=e;return U.createElement("div",{id:t,style:Vn},n)}function qn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return U.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Gn(){const[e,t]=l.useState("");return{announce:l.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const en=l.createContext(null);function Qn(e){const t=l.useContext(en);l.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Zn(){const[e]=l.useState(()=>new Set),t=l.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[l.useCallback(r=>{let{type:o,event:i}=r;e.forEach(a=>{var s;return(s=a[o])==null?void 0:s.call(a,i)})},[e]),t]}const er={draggable:`
16
+ */var Xn=ct("filled","player-stop-filled","IconPlayerStopFilled",[["path",{d:"M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z",key:"svg-0"}]]);const We=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function me(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function dt(e){return"nodeType"in e}function k(e){var t,n;return e?me(e)?e:dt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function ft(e){const{Document:t}=k(e);return e instanceof t}function _e(e){return me(e)?!1:e instanceof k(e).HTMLElement}function Jt(e){return e instanceof k(e).SVGElement}function be(e){return e?me(e)?e.document:dt(e)?ft(e)?e:_e(e)||Jt(e)?e.ownerDocument:document:document:document}const oe=We?l.useLayoutEffect:l.useEffect;function ht(e){const t=l.useRef(e);return oe(()=>{t.current=e}),l.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Wn(){const e=l.useRef(null),t=l.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=l.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function pt(e,t){t===void 0&&(t=[e]);const n=l.useRef(e);return oe(()=>{n.current!==e&&(n.current=e)},t),n}function Ie(e,t){const n=l.useRef();return l.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function rt(e){const t=ht(e),n=l.useRef(null),r=l.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function ot(e){const t=l.useRef();return l.useEffect(()=>{t.current=e},[e]),t.current}let Qe={};function gt(e,t){return l.useMemo(()=>{if(t)return t;const n=Qe[e]==null?0:Qe[e]+1;return Qe[e]=n,e+"-"+n},[e,t])}function Qt(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,a)=>{const s=Object.entries(a);for(const[c,u]of s){const d=i[c];d!=null&&(i[c]=d+e*u)}return i},{...t})}}const ge=Qt(1),$e=Qt(-1);function Yn(e){return"clientX"in e&&"clientY"in e}function Zt(e){if(!e)return!1;const{KeyboardEvent:t}=k(e.target);return t&&e instanceof t}function Hn(e){if(!e)return!1;const{TouchEvent:t}=k(e.target);return t&&e instanceof t}function it(e){if(Hn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Yn(e)?{x:e.clientX,y:e.clientY}:null}const $t="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Kn(e){return e.matches($t)?e:e.querySelector($t)}const Vn={display:"none"};function qn(e){let{id:t,value:n}=e;return X.createElement("div",{id:t,style:Vn},n)}function Gn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return X.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Jn(){const[e,t]=l.useState("");return{announce:l.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const en=l.createContext(null);function Qn(e){const t=l.useContext(en);l.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Zn(){const[e]=l.useState(()=>new Set),t=l.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[l.useCallback(r=>{let{type:o,event:i}=r;e.forEach(a=>{var s;return(s=a[o])==null?void 0:s.call(a,i)})},[e]),t]}const er={draggable:`
17
17
  To pick up a draggable item, press the space bar.
18
18
  While dragging, use the arrow keys to move the item.
19
19
  Press space again to drop the item in its new position, or press escape to cancel.
20
- `},tr={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function nr(e){let{announcements:t=tr,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=er}=e;const{announce:i,announcement:a}=Gn(),s=gt("DndLiveRegion"),[c,u]=l.useState(!1);if(l.useEffect(()=>{u(!0)},[]),Qn(l.useMemo(()=>({onDragStart(f){let{active:g}=f;i(t.onDragStart({active:g}))},onDragMove(f){let{active:g,over:p}=f;t.onDragMove&&i(t.onDragMove({active:g,over:p}))},onDragOver(f){let{active:g,over:p}=f;i(t.onDragOver({active:g,over:p}))},onDragEnd(f){let{active:g,over:p}=f;i(t.onDragEnd({active:g,over:p}))},onDragCancel(f){let{active:g,over:p}=f;i(t.onDragCancel({active:g,over:p}))}}),[i,t])),!c)return null;const d=U.createElement(U.Fragment,null,U.createElement(Jn,{id:r,value:o.draggable}),U.createElement(qn,{id:s,announcement:a}));return n?he.createPortal(d,n):d}var I;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(I||(I={}));function Ue(){}const V=Object.freeze({x:0,y:0});function rr(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function or(e,t){if(!e||e.length===0)return null;const[n]=e;return t?n[t]:n}function ir(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,s=i-n;if(r<o&&n<i){const c=t.width*t.height,u=e.width*e.height,d=a*s,f=d/(c+u-d);return Number(f.toFixed(4))}return 0}const sr=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const i of r){const{id:a}=i,s=n.get(a);if(s){const c=ir(s,t);c>0&&o.push({id:a,data:{droppableContainer:i,value:c}})}}return o.sort(rr)};function ar(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function tn(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:V}function lr(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return o.reduce((a,s)=>({...a,top:a.top+e*s.y,bottom:a.bottom+e*s.y,left:a.left+e*s.x,right:a.right+e*s.x}),{...n})}}const cr=lr(1);function ur(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function dr(e,t,n){const r=ur(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:s}=r,c=e.left-a-(1-o)*parseFloat(n),u=e.top-s-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),d=o?e.width/o:e.width,f=i?e.height/i:e.height;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c}}const fr={ignoreTransform:!1};function Oe(e,t){t===void 0&&(t=fr);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=k(e).getComputedStyle(e);u&&(n=dr(n,u,d))}const{top:r,left:o,width:i,height:a,bottom:s,right:c}=n;return{top:r,left:o,width:i,height:a,bottom:s,right:c}}function Ut(e){return Oe(e,{ignoreTransform:!0})}function pr(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function hr(e,t){return t===void 0&&(t=k(e).getComputedStyle(e)),t.position==="fixed"}function gr(e,t){t===void 0&&(t=k(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const i=t[o];return typeof i=="string"?n.test(i):!1})}function vt(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(ft(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!_e(o)||Gt(o)||n.includes(o))return n;const i=k(e).getComputedStyle(o);return o!==e&&gr(o,i)&&n.push(o),hr(o,i)?n:r(o.parentNode)}return e?r(e):n}function nn(e){const[t]=vt(e,1);return t??null}function Ze(e){return!He||!e?null:me(e)?e:dt(e)?ft(e)||e===be(e).scrollingElement?window:_e(e)?e:null:null}function rn(e){return me(e)?e.scrollX:e.scrollLeft}function on(e){return me(e)?e.scrollY:e.scrollTop}function st(e){return{x:rn(e),y:on(e)}}var M;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(M||(M={}));function sn(e){return!He||!e?!1:e===document.scrollingElement}function an(e){const t={x:0,y:0},n=sn(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,a=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:o,isLeft:i,isBottom:a,isRight:s,maxScroll:r,minScroll:t}}const vr={x:.2,y:.2};function mr(e,t,n,r,o){let{top:i,left:a,right:s,bottom:c}=n;r===void 0&&(r=10),o===void 0&&(o=vr);const{isTop:u,isBottom:d,isLeft:f,isRight:g}=an(e),p={x:0,y:0},S={x:0,y:0},h={height:t.height*o.y,width:t.width*o.x};return!u&&i<=t.top+h.height?(p.y=M.Backward,S.y=r*Math.abs((t.top+h.height-i)/h.height)):!d&&c>=t.bottom-h.height&&(p.y=M.Forward,S.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!g&&s>=t.right-h.width?(p.x=M.Forward,S.x=r*Math.abs((t.right-h.width-s)/h.width)):!f&&a<=t.left+h.width&&(p.x=M.Backward,S.x=r*Math.abs((t.left+h.width-a)/h.width)),{direction:p,speed:S}}function br(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:a}=window;return{top:0,left:0,right:i,bottom:a,width:i,height:a}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function ln(e){return e.reduce((t,n)=>ge(t,st(n)),V)}function yr(e){return e.reduce((t,n)=>t+rn(n),0)}function xr(e){return e.reduce((t,n)=>t+on(n),0)}function wr(e,t){if(t===void 0&&(t=Oe),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);nn(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Sr=[["x",["left","right"],yr],["y",["top","bottom"],xr]];class mt{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=vt(n),o=ln(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,a,s]of Sr)for(const c of a)Object.defineProperty(this,c,{get:()=>{const u=s(r),d=o[i]-u;return this.rect[c]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Re{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function Cr(e){const{EventTarget:t}=k(e);return e instanceof t?e:be(e)}function et(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var $;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})($||($={}));function Xt(e){e.preventDefault()}function Er(e){e.stopPropagation()}var b;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(b||(b={}));const cn={start:[b.Space,b.Enter],cancel:[b.Esc],end:[b.Space,b.Enter]},Dr=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case b.Right:return{...n,x:n.x+25};case b.Left:return{...n,x:n.x-25};case b.Down:return{...n,y:n.y+25};case b.Up:return{...n,y:n.y-25}}};class un{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Re(be(n)),this.windowListeners=new Re(k(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add($.Resize,this.handleCancel),this.windowListeners.add($.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add($.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&wr(r),n(V)}handleKeyDown(t){if(Zt(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:i=cn,coordinateGetter:a=Dr,scrollBehavior:s="smooth"}=o,{code:c}=t;if(i.end.includes(c)){this.handleEnd(t);return}if(i.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=r.current,d=u?{x:u.left,y:u.top}:V;this.referenceCoordinates||(this.referenceCoordinates=d);const f=a(t,{active:n,context:r.current,currentCoordinates:d});if(f){const g=$e(f,d),p={x:0,y:0},{scrollableAncestors:S}=r.current;for(const h of S){const v=t.code,{isTop:w,isRight:C,isLeft:D,isBottom:N,maxScroll:A,minScroll:R}=an(h),m=br(h),y={x:Math.min(v===b.Right?m.right-m.width/2:m.right,Math.max(v===b.Right?m.left:m.left+m.width/2,f.x)),y:Math.min(v===b.Down?m.bottom-m.height/2:m.bottom,Math.max(v===b.Down?m.top:m.top+m.height/2,f.y))},L=v===b.Right&&!C||v===b.Left&&!D,T=v===b.Down&&!N||v===b.Up&&!w;if(L&&y.x!==f.x){const P=h.scrollLeft+g.x,q=v===b.Right&&P<=A.x||v===b.Left&&P>=R.x;if(q&&!g.y){h.scrollTo({left:P,behavior:s});return}q?p.x=h.scrollLeft-P:p.x=v===b.Right?h.scrollLeft-A.x:h.scrollLeft-R.x,p.x&&h.scrollBy({left:-p.x,behavior:s});break}else if(T&&y.y!==f.y){const P=h.scrollTop+g.y,q=v===b.Down&&P<=A.y||v===b.Up&&P>=R.y;if(q&&!g.x){h.scrollTo({top:P,behavior:s});return}q?p.y=h.scrollTop-P:p.y=v===b.Down?h.scrollTop-A.y:h.scrollTop-R.y,p.y&&h.scrollBy({top:-p.y,behavior:s});break}}this.handleMove(t,ge($e(f,this.referenceCoordinates),p))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}un.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=cn,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const s=i.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function Ht(e){return!!(e&&"distance"in e)}function Wt(e){return!!(e&&"delay"in e)}class bt{constructor(t,n,r){var o;r===void 0&&(r=Cr(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:i}=t,{target:a}=i;this.props=t,this.events=n,this.document=be(a),this.documentListeners=new Re(this.document),this.listeners=new Re(r),this.windowListeners=new Re(k(a)),this.initialCoordinates=(o=it(i))!=null?o:V,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add($.Resize,this.handleCancel),this.windowListeners.add($.DragStart,Xt),this.windowListeners.add($.VisibilityChange,this.handleCancel),this.windowListeners.add($.ContextMenu,Xt),this.documentListeners.add($.Keydown,this.handleKeydown),n){if(Ht(n))return;if(Wt(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add($.Click,Er,{capture:!0}),this.removeTextSelection(),this.documentListeners.add($.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:i}=this,{onMove:a,options:{activationConstraint:s}}=i;if(!o)return;const c=(n=it(t))!=null?n:V,u=$e(o,c);if(!r&&s){if(Wt(s))return et(u,s.tolerance)?this.handleCancel():void 0;if(Ht(s))return s.tolerance!=null&&et(u,s.tolerance)?this.handleCancel():et(u,s.distance)?this.handleStart():void 0}t.cancelable&&t.preventDefault(),a(c)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===b.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Rr={move:{name:"pointermove"},end:{name:"pointerup"}};class dn extends bt{constructor(t){const{event:n}=t,r=be(n.target);super(t,Rr,r)}}dn.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const Pr={move:{name:"mousemove"},end:{name:"mouseup"}};var at;(function(e){e[e.RightClick=2]="RightClick"})(at||(at={}));class Mr extends bt{constructor(t){super(t,Pr,be(t.event.target))}}Mr.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===at.RightClick?!1:(r==null||r({event:n}),!0)}}];const tt={move:{name:"touchmove"},end:{name:"touchend"}};class Ar extends bt{constructor(t){super(t,tt)}static setup(){return window.addEventListener(tt.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(tt.move.name,t)};function t(){}}}Ar.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r==null||r({event:n}),!0)}}];var Pe;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Pe||(Pe={}));var Xe;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Xe||(Xe={}));function _r(e){let{acceleration:t,activator:n=Pe.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:a=5,order:s=Xe.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:d,delta:f,threshold:g}=e;const p=Or({delta:f,disabled:!i}),[S,h]=Hn(),v=l.useRef({x:0,y:0}),w=l.useRef({x:0,y:0}),C=l.useMemo(()=>{switch(n){case Pe.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Pe.DraggableRect:return o}},[n,o,c]),D=l.useRef(null),N=l.useCallback(()=>{const R=D.current;if(!R)return;const m=v.current.x*w.current.x,y=v.current.y*w.current.y;R.scrollBy(m,y)},[]),A=l.useMemo(()=>s===Xe.TreeOrder?[...u].reverse():u,[s,u]);l.useEffect(()=>{if(!i||!u.length||!C){h();return}for(const R of A){if((r==null?void 0:r(R))===!1)continue;const m=u.indexOf(R),y=d[m];if(!y)continue;const{direction:L,speed:T}=mr(R,y,C,t,g);for(const P of["x","y"])p[P][L[P]]||(T[P]=0,L[P]=0);if(T.x>0||T.y>0){h(),D.current=R,S(N,a),v.current=T,w.current=L;return}}v.current={x:0,y:0},w.current={x:0,y:0},h()},[t,N,r,h,i,a,JSON.stringify(C),JSON.stringify(p),S,u,A,d,JSON.stringify(g)])}const Ir={x:{[M.Backward]:!1,[M.Forward]:!1},y:{[M.Backward]:!1,[M.Forward]:!1}};function Or(e){let{delta:t,disabled:n}=e;const r=ot(t);return Ie(o=>{if(n||!r||!o)return Ir;const i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[M.Backward]:o.x[M.Backward]||i.x===-1,[M.Forward]:o.x[M.Forward]||i.x===1},y:{[M.Backward]:o.y[M.Backward]||i.y===-1,[M.Forward]:o.y[M.Forward]||i.y===1}}},[n,t,r])}function Lr(e,t){const n=t!==null?e.get(t):void 0,r=n?n.node.current:null;return Ie(o=>{var i;return t===null?null:(i=r??o)!=null?i:null},[r,t])}function Tr(e,t){return l.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,i=o.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,r)}));return[...n,...i]},[]),[e,t])}var Ae;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Ae||(Ae={}));var lt;(function(e){e.Optimized="optimized"})(lt||(lt={}));const Yt=new Map;function Br(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,a]=l.useState(null),{frequency:s,measure:c,strategy:u}=o,d=l.useRef(e),f=v(),g=ht(f),p=l.useCallback(function(w){w===void 0&&(w=[]),!g.current&&a(C=>C===null?w:C.concat(w.filter(D=>!C.includes(D))))},[g]),S=l.useRef(null),h=Ie(w=>{if(f&&!n)return Yt;if(!w||w===Yt||d.current!==e||i!=null){const C=new Map;for(let D of e){if(!D)continue;if(i&&i.length>0&&!i.includes(D.id)&&D.rect.current){C.set(D.id,D.rect.current);continue}const N=D.node.current,A=N?new mt(c(N),N):null;D.rect.current=A,A&&C.set(D.id,A)}return C}return w},[e,i,n,f,c]);return l.useEffect(()=>{d.current=e},[e]),l.useEffect(()=>{f||p()},[n,f]),l.useEffect(()=>{i&&i.length>0&&a(null)},[JSON.stringify(i)]),l.useEffect(()=>{f||typeof s!="number"||S.current!==null||(S.current=setTimeout(()=>{p(),S.current=null},s))},[s,f,p,...r]),{droppableRects:h,measureDroppableContainers:p,measuringScheduled:i!=null};function v(){switch(u){case Ae.Always:return!1;case Ae.BeforeDragging:return n;default:return!n}}}function fn(e,t){return Ie(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Nr(e,t){return fn(e,t)}function kr(e){let{callback:t,disabled:n}=e;const r=pt(t),o=l.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(r)},[r,n]);return l.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function yt(e){let{callback:t,disabled:n}=e;const r=pt(t),o=l.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(r)},[n]);return l.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function zr(e){return new mt(Oe(e),e)}function Kt(e,t,n){t===void 0&&(t=zr);const[r,o]=l.useReducer(s,null),i=kr({callback(c){if(e)for(const u of c){const{type:d,target:f}=u;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),a=yt({callback:o});return oe(()=>{o(),e?(a==null||a.observe(e),i==null||i.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),i==null||i.disconnect())},[e]),r;function s(c){if(!e)return null;if(e.isConnected===!1){var u;return(u=c??n)!=null?u:null}const d=t(e);return JSON.stringify(c)===JSON.stringify(d)?c:d}}function jr(e){const t=fn(e);return tn(e,t)}const Vt=[];function Fr(e){const t=l.useRef(e),n=Ie(r=>e?r&&r!==Vt&&e&&t.current&&e.parentNode===t.current.parentNode?r:vt(e):Vt,[e]);return l.useEffect(()=>{t.current=e},[e]),n}function $r(e){const[t,n]=l.useState(null),r=l.useRef(e),o=l.useCallback(i=>{const a=Ze(i.target);a&&n(s=>s?(s.set(a,st(a)),new Map(s)):null)},[]);return l.useEffect(()=>{const i=r.current;if(e!==i){a(i);const s=e.map(c=>{const u=Ze(c);return u?(u.addEventListener("scroll",o,{passive:!0}),[u,st(u)]):null}).filter(c=>c!=null);n(s.length?new Map(s):null),r.current=e}return()=>{a(e),a(i)};function a(s){s.forEach(c=>{const u=Ze(c);u==null||u.removeEventListener("scroll",o)})}},[o,e]),l.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,a)=>ge(i,a),V):ln(e):V,[e,t])}function Jt(e,t){t===void 0&&(t=[]);const n=l.useRef(null);return l.useEffect(()=>{n.current=null},t),l.useEffect(()=>{const r=e!==V;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?$e(e,n.current):V}function Ur(e){l.useEffect(()=>{if(!He)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function Xr(e,t){return l.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:i}=r;return n[o]=a=>{i(a,t)},n},{}),[e,t])}function pn(e){return l.useMemo(()=>e?pr(e):null,[e])}const nt=[];function Hr(e,t){t===void 0&&(t=Oe);const[n]=e,r=pn(n?k(n):null),[o,i]=l.useReducer(s,nt),a=yt({callback:i});return e.length>0&&o===nt&&i(),oe(()=>{e.length?e.forEach(c=>a==null?void 0:a.observe(c)):(a==null||a.disconnect(),i())},[e]),o;function s(){return e.length?e.map(c=>sn(c)?r:new mt(t(c),c)):nt}}function Wr(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return _e(t)?t:e}function Yr(e){let{measure:t}=e;const[n,r]=l.useState(null),o=l.useCallback(u=>{for(const{target:d}of u)if(_e(d)){r(f=>{const g=t(d);return f?{...f,width:g.width,height:g.height}:g});break}},[t]),i=yt({callback:o}),a=l.useCallback(u=>{const d=Wr(u);i==null||i.disconnect(),d&&(i==null||i.observe(d)),r(d?t(d):null)},[t,i]),[s,c]=rt(a);return l.useMemo(()=>({nodeRef:s,rect:n,setRef:c}),[n,s,c])}const Kr=[{sensor:dn,options:{}},{sensor:un,options:{}}],Vr={current:{}},je={draggable:{measure:Ut},droppable:{measure:Ut,strategy:Ae.WhileDragging,frequency:lt.Optimized},dragOverlay:{measure:Oe}};class Me extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const Jr={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Me,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ue},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:je,measureDroppableContainers:Ue,windowRect:null,measuringScheduled:!1},qr={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ue,draggableNodes:new Map,over:null,measureDroppableContainers:Ue},xt=l.createContext(qr),Gr=l.createContext(Jr);function Qr(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Me}}}function Zr(e,t){switch(t.type){case I.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case I.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case I.DragEnd:case I.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case I.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Me(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case I.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Me(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case I.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Me(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function eo(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=l.useContext(xt),i=ot(r),a=ot(n==null?void 0:n.id);return l.useEffect(()=>{if(!t&&!r&&i&&a!=null){if(!Zt(i)||document.activeElement===i.target)return;const s=o.get(a);if(!s)return;const{activatorNode:c,node:u}=s;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const d of[c.current,u.current]){if(!d)continue;const f=Kn(d);if(f){f.focus();break}}})}},[r,t,o,a,i]),null}function to(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...r}),n):n}function no(e){return l.useMemo(()=>({draggable:{...je.draggable,...e==null?void 0:e.draggable},droppable:{...je.droppable,...e==null?void 0:e.droppable},dragOverlay:{...je.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function ro(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const i=l.useRef(!1),{x:a,y:s}=typeof o=="boolean"?{x:o,y:o}:o;oe(()=>{if(!a&&!s||!t){i.current=!1;return}if(i.current||!r)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const d=n(u),f=tn(d,r);if(a||(f.x=0),s||(f.y=0),i.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const g=nn(u);g&&g.scrollBy({top:f.y,left:f.x})}},[t,a,s,r,n])}const hn=l.createContext({...V,scaleX:1,scaleY:1});var re;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(re||(re={}));const oo=l.memo(function(t){var n,r,o,i;let{id:a,accessibility:s,autoScroll:c=!0,children:u,sensors:d=Kr,collisionDetection:f=sr,measuring:g,modifiers:p,...S}=t;const h=l.useReducer(Zr,void 0,Qr),[v,w]=h,[C,D]=Zn(),[N,A]=l.useState(re.Uninitialized),R=N===re.Initialized,{draggable:{active:m,nodes:y,translate:L},droppable:{containers:T}}=v,P=m?y.get(m):null,q=l.useRef({initial:null,translated:null}),G=l.useMemo(()=>{var _;return m!=null?{id:m,data:(_=P==null?void 0:P.data)!=null?_:Vr,rect:q}:null},[m,P]),Z=l.useRef(null),[wt,St]=l.useState(null),[Q,Ct]=l.useState(null),ye=ht(S,Object.values(S)),We=gt("DndDescribedBy",a),Et=l.useMemo(()=>T.getEnabled(),[T]),ie=no(g),{droppableRects:ce,measureDroppableContainers:Le,measuringScheduled:Dt}=Br(Et,{dragging:R,dependencies:[L.x,L.y],config:ie.droppable}),X=Lr(y,m),Rt=l.useMemo(()=>Q?it(Q):null,[Q]),Pt=Sn(),Mt=Nr(X,ie.draggable.measure);ro({activeNode:m?y.get(m):null,config:Pt.layoutShiftCompensation,initialRect:Mt,measure:ie.draggable.measure});const H=Kt(X,ie.draggable.measure,Mt),Ye=Kt(X?X.parentElement:null),se=l.useRef({activatorEvent:null,active:null,activeNode:X,collisionRect:null,collisions:null,droppableRects:ce,draggableNodes:y,draggingNode:null,draggingNodeRect:null,droppableContainers:T,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),At=T.getNodeFor((n=se.current.over)==null?void 0:n.id),ae=Yr({measure:ie.dragOverlay.measure}),Te=(r=ae.nodeRef.current)!=null?r:X,ue=R?(o=ae.rect)!=null?o:H:null,_t=!!(ae.nodeRef.current&&ae.rect),It=jr(_t?null:H),Ke=pn(Te?k(Te):null),ee=Fr(R?At??X:null),Be=Hr(ee),Ne=to(p,{transform:{x:L.x-It.x,y:L.y-It.y,scaleX:1,scaleY:1},activatorEvent:Q,active:G,activeNodeRect:H,containerNodeRect:Ye,draggingNodeRect:ue,over:se.current.over,overlayNodeRect:ae.rect,scrollableAncestors:ee,scrollableAncestorRects:Be,windowRect:Ke}),Ot=Rt?ge(Rt,L):null,Lt=$r(ee),gn=Jt(Lt),vn=Jt(Lt,[H]),de=ge(Ne,gn),fe=ue?cr(ue,Ne):null,xe=G&&fe?f({active:G,collisionRect:fe,droppableRects:ce,droppableContainers:Et,pointerCoordinates:Ot}):null,Tt=or(xe,"id"),[te,Bt]=l.useState(null),mn=_t?Ne:ge(Ne,vn),bn=ar(mn,(i=te==null?void 0:te.rect)!=null?i:null,H),Nt=l.useCallback((_,z)=>{let{sensor:j,options:ne}=z;if(Z.current==null)return;const F=y.get(Z.current);if(!F)return;const W=_.nativeEvent,J=new j({active:Z.current,activeNode:F,event:W,options:ne,context:se,onStart(Y){const we=Z.current;if(we==null)return;const Se=y.get(we);if(!Se)return;const{onDragStart:ke}=ye.current,ze={active:{id:we,data:Se.data,rect:q}};he.unstable_batchedUpdates(()=>{ke==null||ke(ze),A(re.Initializing),w({type:I.DragStart,initialCoordinates:Y,active:we}),C({type:"onDragStart",event:ze})})},onMove(Y){w({type:I.DragMove,coordinates:Y})},onEnd:pe(I.DragEnd),onCancel:pe(I.DragCancel)});he.unstable_batchedUpdates(()=>{St(J),Ct(_.nativeEvent)});function pe(Y){return async function(){const{active:Se,collisions:ke,over:ze,scrollAdjustedTranslate:zt}=se.current;let Ce=null;if(Se&&zt){const{cancelDrop:Ee}=ye.current;Ce={activatorEvent:W,active:Se,collisions:ke,delta:zt,over:ze},Y===I.DragEnd&&typeof Ee=="function"&&await Promise.resolve(Ee(Ce))&&(Y=I.DragCancel)}Z.current=null,he.unstable_batchedUpdates(()=>{w({type:Y}),A(re.Uninitialized),Bt(null),St(null),Ct(null);const Ee=Y===I.DragEnd?"onDragEnd":"onDragCancel";if(Ce){const Ve=ye.current[Ee];Ve==null||Ve(Ce),C({type:Ee,event:Ce})}})}}},[y]),yn=l.useCallback((_,z)=>(j,ne)=>{const F=j.nativeEvent,W=y.get(ne);if(Z.current!==null||!W||F.dndKit||F.defaultPrevented)return;const J={active:W};_(j,z.options,J)===!0&&(F.dndKit={capturedBy:z.sensor},Z.current=ne,Nt(j,z))},[y,Nt]),kt=Tr(d,yn);Ur(d),oe(()=>{H&&N===re.Initializing&&A(re.Initialized)},[H,N]),l.useEffect(()=>{const{onDragMove:_}=ye.current,{active:z,activatorEvent:j,collisions:ne,over:F}=se.current;if(!z||!j)return;const W={active:z,activatorEvent:j,collisions:ne,delta:{x:de.x,y:de.y},over:F};he.unstable_batchedUpdates(()=>{_==null||_(W),C({type:"onDragMove",event:W})})},[de.x,de.y]),l.useEffect(()=>{const{active:_,activatorEvent:z,collisions:j,droppableContainers:ne,scrollAdjustedTranslate:F}=se.current;if(!_||Z.current==null||!z||!F)return;const{onDragOver:W}=ye.current,J=ne.get(Tt),pe=J&&J.rect.current?{id:J.id,rect:J.rect.current,data:J.data,disabled:J.disabled}:null,Y={active:_,activatorEvent:z,collisions:j,delta:{x:F.x,y:F.y},over:pe};he.unstable_batchedUpdates(()=>{Bt(pe),W==null||W(Y),C({type:"onDragOver",event:Y})})},[Tt]),oe(()=>{se.current={activatorEvent:Q,active:G,activeNode:X,collisionRect:fe,collisions:xe,droppableRects:ce,draggableNodes:y,draggingNode:Te,draggingNodeRect:ue,droppableContainers:T,over:te,scrollableAncestors:ee,scrollAdjustedTranslate:de},q.current={initial:ue,translated:fe}},[G,X,xe,fe,y,Te,ue,ce,T,te,ee,de]),_r({...Pt,delta:L,draggingRect:fe,pointerCoordinates:Ot,scrollableAncestors:ee,scrollableAncestorRects:Be});const xn=l.useMemo(()=>({active:G,activeNode:X,activeNodeRect:H,activatorEvent:Q,collisions:xe,containerNodeRect:Ye,dragOverlay:ae,draggableNodes:y,droppableContainers:T,droppableRects:ce,over:te,measureDroppableContainers:Le,scrollableAncestors:ee,scrollableAncestorRects:Be,measuringConfiguration:ie,measuringScheduled:Dt,windowRect:Ke}),[G,X,H,Q,xe,Ye,ae,y,T,ce,te,Le,ee,Be,ie,Dt,Ke]),wn=l.useMemo(()=>({activatorEvent:Q,activators:kt,active:G,activeNodeRect:H,ariaDescribedById:{draggable:We},dispatch:w,draggableNodes:y,over:te,measureDroppableContainers:Le}),[Q,kt,G,H,w,We,y,te,Le]);return U.createElement(en.Provider,{value:D},U.createElement(xt.Provider,{value:wn},U.createElement(Gr.Provider,{value:xn},U.createElement(hn.Provider,{value:bn},u)),U.createElement(eo,{disabled:(s==null?void 0:s.restoreFocus)===!1})),U.createElement(nr,{...s,hiddenTextDescribedById:We}));function Sn(){const _=(wt==null?void 0:wt.autoScrollEnabled)===!1,z=typeof c=="object"?c.enabled===!1:c===!1,j=R&&!_&&!z;return typeof c=="object"?{...c,enabled:j}:{enabled:j}}}),io=l.createContext(null),qt="button",so="Droppable";function ao(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const i=gt(so),{activators:a,activatorEvent:s,active:c,activeNodeRect:u,ariaDescribedById:d,draggableNodes:f,over:g}=l.useContext(xt),{role:p=qt,roleDescription:S="draggable",tabIndex:h=0}=o??{},v=(c==null?void 0:c.id)===t,w=l.useContext(v?hn:io),[C,D]=rt(),[N,A]=rt(),R=Xr(a,t),m=ht(n);oe(()=>(f.set(t,{id:t,key:i,node:C,activatorNode:N,data:m}),()=>{const L=f.get(t);L&&L.key===i&&f.delete(t)}),[f,t]);const y=l.useMemo(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":v&&p===qt?!0:void 0,"aria-roledescription":S,"aria-describedby":d.draggable}),[r,p,h,v,S,d.draggable]);return{active:c,activatorEvent:s,activeNodeRect:u,attributes:y,isDragging:v,listeners:r?void 0:R,node:C,over:g,setNodeRef:D,setActivatorNodeRef:A,transform:w}}function lo(e,t,n){const r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}const co=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:r}=e;return!n||!t?r:lo(r,n,t)};var K=(e=>(e[e.Selected=0]="Selected",e[e.Everything=1]="Everything",e))(K||{});const uo=ut("div",{display:"flex",position:"absolute",flexDirection:"column",width:"260px",border:"1px solid $gray6",borderRadius:"$2",backgroundColor:"$panelBg",overflow:"hidden",userSelect:"none"}),fo=ut(Fe,{height:"$6",width:"100%",padding:"0 $1",backgroundColor:"$panelTitleBg",color:"$gray11",flexShrink:0,fontSize:"$sm"}),po=ut(Fe,{padding:"$1"});function ho(){const[{bottom:e,left:t},n]=l.useState({left:4,bottom:4}),r=l.useCallback(o=>{n(({bottom:i,left:a})=>{const{delta:s}=o;return{left:a+s.x,bottom:i+-s.y}})},[]);return E.jsx(oo,{modifiers:[co],onDragEnd:r,children:E.jsx(go,{left:t,bottom:e})})}const go=Dn(function(t){const{attributes:n,listeners:r,setNodeRef:o,transform:i}=ao({id:"ParticlePanel"}),{viewportStore:a}=zn(),s=a.particleStore,{t:c}=Rn(),u={bottom:`${t.bottom}px`,left:`${t.left}px`,transform:i?`translate3d(${i.x}px, ${i.y}px, 0)`:"none"};return s.isPanelOn?E.jsxs(uo,{ref:o,style:u,...n,children:[E.jsxs(fo,{align:"v",justifyContent:"between",children:[E.jsxs(Fe,{gap:"xxs",children:[E.jsx($n,{size:"12px",...r}),c("effects.particle.title")]}),E.jsxs(Fe,{gap:"xxs",align:"v",children:[E.jsx(Ge,{content:c("effects.particle.restart"),children:E.jsx(Je,{size:"xs",variant:"subtle",onClick:()=>s.play(),children:E.jsx(Un,{size:"12px"})})}),E.jsx(Ge,{content:s.isPlaying?c("effects.particle.pause"):c("effects.particle.play"),children:E.jsx(Je,{size:"xs",variant:"subtle",onClick:()=>s.togglePauseResume(),children:s.isPlaying?E.jsx(jn,{size:"12px"}):E.jsx(Fn,{size:"12px"})})}),E.jsx(Ge,{content:c("effects.particle.stop"),children:E.jsx(Je,{size:"xs",variant:"subtle",onClick:()=>s.stop(s.mode),disabled:s.isStopped,children:E.jsx(Xn,{size:"12px"})})})]})]}),E.jsxs(po,{children:[E.jsx(Pn,{label:c("effects.particle.speed"),value:s.speed,min:0,max:5,step:.1,dragStep:.1,onChange:d=>s.onSpeedChange(d)}),E.jsx(Mn,{label:c("effects.particle.scope.label"),value:s.mode,onChange:d=>{s.switchPlayMode(d),s.onBoundingChange(s.mode===K.Selected),s.stop(K.Everything),s.play()},options:[{value:K.Selected,label:c("effects.particle.scope.selected")},{value:K.Everything,label:c("effects.particle.scope.everything")}]}),E.jsx(An,{label:c("effects.particle.bounding"),disabled:s.mode===K.Everything,value:s.isBoundingEnabled,onChange:d=>s.onBoundingChange(d)})]})]}):null});class vo extends _n{constructor(){super(...arguments);x(this,"isBoundingEnabled",!1);x(this,"onScriptReset");x(this,"_onScriptStop");x(this,"_onScriptPlay");x(this,"_onScriptPause");x(this,"_hasLastSelectedEntity");x(this,"_selectedParticles",[]);x(this,"_allParticles",[]);x(this,"_mode",K.Selected);x(this,"_speed",1);x(this,"_isSelected",!1);x(this,"_componentArray",[]);x(this,"_center",new In);x(this,"_tempBoundingBox",new jt)}set mode(n){this._mode=n}get mode(){return this._mode}set speed(n){this._getParticles(this.mode).forEach(r=>{r.generator.main.simulationSpeed=n}),this._speed=n}get speed(){return this._speed}init(n){this.onScriptReset=n.onScriptReset,this._onScriptPlay=n.onScriptPlay,this._onScriptPause=n.onScriptPause,this._onScriptStop=n.onScriptStop,this._hasLastSelectedEntity=n.hasLastSelectedEntity}onStart(){const n=this.entity.parent.parent.createChild("particle_bounds_drawer");n.addComponent(On),n.addComponent(qe),n.layer=Ln.Outline}onSelectEntity(n){if(this.onScriptReset&&this.onScriptReset(),this._componentArray.length=0,this._isSelected=!1,n){for(const r of n){const o=[];r.getComponentsIncludeChildren(De,o),this._componentArray.push(...o)}this._isSelected=this._componentArray.length>0}this._updateArrayAndPlay()}onAddComponent(n){if(n instanceof De){if(this._hasLastSelectedEntity&&!this._hasLastSelectedEntity())return;this._componentArray.push(n),this._updateArrayAndPlay()}}onRemoveComponent(n){if(n instanceof De)if(this._hasLastSelectedEntity&&!this._hasLastSelectedEntity()){const r=this._allParticles.findIndex(o=>o.instanceId===n.instanceId);r>-1&&this._allParticles.splice(r,1)}else{const r=this._componentArray.findIndex(o=>o.instanceId===n.instanceId);r>-1&&this._componentArray.splice(r,1),this._updateArrayAndPlay()}}onPlay(n){this._updateAllParticles(),n?this.play(K.Everything):this.stop(K.Everything)}onUpdate(){if(this._isSelected&&this.isBoundingEnabled){this._tempBoundingBox.copyFrom(this._selectedParticles[0].bounds);for(let p=1,S=this._selectedParticles.length;p<S;p++)jt.merge(this._tempBoundingBox,this._selectedParticles[p].bounds,this._tempBoundingBox);const{min:n,max:r}=this._tempBoundingBox,{x:o,y:i,z:a}=n,{x:s,y:c,z:u}=r,d=s-o,f=c-i,g=u-a;this._center.set(s+o,c+i,u+a).scale(.5),qe.flush(),qe.drawCuboid(d,f,g,this._center)}}_getParticles(n){return n===K.Selected?this._selectedParticles:this._allParticles}play(n=this.mode){this._getParticles(n).forEach(r=>{r.generator.stop(!1,Ft.StopEmittingAndClear),r.generator.main.simulationSpeed=this._speed,r.generator.play()}),this._onScriptPlay&&this._onScriptPlay(n)}pause(n=!1){this._getParticles(this.mode).forEach(r=>{r.generator.main.simulationSpeed=0}),this._onScriptPause&&this._onScriptPause(n)}stop(n){this._getParticles(n).forEach(r=>{r.generator.stop(!1,Ft.StopEmittingAndClear)}),this._onScriptStop&&this._onScriptStop(n)}resume(){this._getParticles(this.mode).forEach(n=>{n.generator.main.simulationSpeed=this._speed,n.generator.play()})}_updateAllParticles(){this._allParticles.length=0,this.engine.sceneManager.scenes[0].rootEntities.forEach(r=>{r.getComponentsIncludeChildren(De,this._componentArray),this._allParticles.push(...this._componentArray)})}_updateSelectedParticles(){this._selectedParticles.length=0;for(const n of this._componentArray)n.entity.getComponentsIncludeChildren(De,this._componentArray),this._selectedParticles.push(...this._componentArray)}_updateArrayAndPlay(){const n=this._componentArray.length;this.pause(n!==0),n>0&&(this._updateSelectedParticles(),this._updateAllParticles(),this.play())}}var mo=Object.defineProperty,bo=Object.getOwnPropertyDescriptor,B=(e,t,n,r)=>{for(var o=r>1?void 0:r?bo(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&mo(t,n,o),o};let O=class{constructor(e){x(this,"isPanelOn",!1);x(this,"speed",1);x(this,"isPlaying",!1);x(this,"isStopped",!1);x(this,"_mode",K.Everything);x(this,"isModeChanged",!1);x(this,"isBoundingEnabled",!1);x(this,"script");x(this,"root");Tn(this),this.root=e.projectStore}get mode(){return this._mode}init(){this.script=Bn.addScript(vo),this.speed=this.script.speed,this.isBoundingEnabled=this.script.isBoundingEnabled,this.script.init({onScriptReset:()=>{this.isPanelOn=!1},onScriptPlay:()=>{this.isStopped=!1,this.isPlaying=!0},onScriptPause:e=>{this.isPanelOn=e},onScriptStop:e=>{this.isStopped=!0,this.isPlaying=!1},hasLastSelectedEntity:()=>{const e=this.root.currentScene.sceneUIStore.lastSelectedId;return e&&!!this.root.currentScene.entities.get(e)}}),this._mode=this.script.mode}play(e=this.mode){this.isStopped=!1,this.isPlaying=!0,this.script.play(e)}togglePauseResume(){this.isStopped=!1,this.isPlaying?(this.isPlaying=!1,this.script.pause()):(this.isPlaying=!0,this.script.resume())}stop(e){this.isStopped=!0,this.isPlaying=!1,this.script.stop(e)}onSpeedChange(e){this.speed=e,this.script.speed=e}onBoundingChange(e){this.isBoundingEnabled=e,this.script.isBoundingEnabled=e}switchPlayMode(e){this._mode=e,this.script.mode=e}};B([le],O.prototype,"isPanelOn",2);B([le],O.prototype,"speed",2);B([le],O.prototype,"isPlaying",2);B([le],O.prototype,"isStopped",2);B([le],O.prototype,"_mode",2);B([Nn],O.prototype,"mode",1);B([le],O.prototype,"isModeChanged",2);B([le],O.prototype,"isBoundingEnabled",2);B([ve],O.prototype,"play",1);B([ve],O.prototype,"togglePauseResume",1);B([ve],O.prototype,"stop",1);B([ve],O.prototype,"onSpeedChange",1);B([ve],O.prototype,"onBoundingChange",1);B([ve],O.prototype,"switchPlayMode",1);O=B([kn({type:"particleStore",Panel:ho})],O);export{Ki as AnimatorComponent,Vi as AnimatorStore,Es as AudioComponent,Ms as ButtonComponent,Bi as CameraComponent,es as CharacterControllerComponent,ki as DirectLightComponent,ts as DynamicColliderComponent,ns as FixedJointComponent,rs as HingeJointComponent,As as ImageComponent,xs as ImportScriptComponent,fs as LottieAnimationComponent,Xi as MeshRendererComponent,vs as ParticleRendererComponent,O as ParticleStore,os as PhysicsStore,ji as PointLightComponent,Ss as PostProcessComponent,ls as ScriptComponent,Wi as SkinnedMeshRendererComponent,hs as SpineAnimationComponent,$i as SpotLightComponent,is as SpringJointComponent,Qi as SpriteMaskComponent,qi as SpriteRendererComponent,ss as StaticColliderComponent,_s as TextComponent,us as TextRendererComponent,bs as TrailRendererComponent,Rs as TransformComponent,Is as UICanvasComponent,Os as UIGroupComponent,Ls as UITransformComponent};
20
+ `},tr={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function nr(e){let{announcements:t=tr,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=er}=e;const{announce:i,announcement:a}=Jn(),s=gt("DndLiveRegion"),[c,u]=l.useState(!1);if(l.useEffect(()=>{u(!0)},[]),Qn(l.useMemo(()=>({onDragStart(f){let{active:g}=f;i(t.onDragStart({active:g}))},onDragMove(f){let{active:g,over:h}=f;t.onDragMove&&i(t.onDragMove({active:g,over:h}))},onDragOver(f){let{active:g,over:h}=f;i(t.onDragOver({active:g,over:h}))},onDragEnd(f){let{active:g,over:h}=f;i(t.onDragEnd({active:g,over:h}))},onDragCancel(f){let{active:g,over:h}=f;i(t.onDragCancel({active:g,over:h}))}}),[i,t])),!c)return null;const d=X.createElement(X.Fragment,null,X.createElement(qn,{id:r,value:o.draggable}),X.createElement(Gn,{id:s,announcement:a}));return n?pe.createPortal(d,n):d}var I;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(I||(I={}));function Ue(){}const V=Object.freeze({x:0,y:0});function rr(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function or(e,t){if(!e||e.length===0)return null;const[n]=e;return t?n[t]:n}function ir(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,s=i-n;if(r<o&&n<i){const c=t.width*t.height,u=e.width*e.height,d=a*s,f=d/(c+u-d);return Number(f.toFixed(4))}return 0}const sr=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const i of r){const{id:a}=i,s=n.get(a);if(s){const c=ir(s,t);c>0&&o.push({id:a,data:{droppableContainer:i,value:c}})}}return o.sort(rr)};function ar(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function tn(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:V}function lr(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return o.reduce((a,s)=>({...a,top:a.top+e*s.y,bottom:a.bottom+e*s.y,left:a.left+e*s.x,right:a.right+e*s.x}),{...n})}}const cr=lr(1);function ur(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function dr(e,t,n){const r=ur(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:s}=r,c=e.left-a-(1-o)*parseFloat(n),u=e.top-s-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),d=o?e.width/o:e.width,f=i?e.height/i:e.height;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c}}const fr={ignoreTransform:!1};function Oe(e,t){t===void 0&&(t=fr);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=k(e).getComputedStyle(e);u&&(n=dr(n,u,d))}const{top:r,left:o,width:i,height:a,bottom:s,right:c}=n;return{top:r,left:o,width:i,height:a,bottom:s,right:c}}function Ut(e){return Oe(e,{ignoreTransform:!0})}function hr(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function pr(e,t){return t===void 0&&(t=k(e).getComputedStyle(e)),t.position==="fixed"}function gr(e,t){t===void 0&&(t=k(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const i=t[o];return typeof i=="string"?n.test(i):!1})}function vt(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(ft(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!_e(o)||Jt(o)||n.includes(o))return n;const i=k(e).getComputedStyle(o);return o!==e&&gr(o,i)&&n.push(o),pr(o,i)?n:r(o.parentNode)}return e?r(e):n}function nn(e){const[t]=vt(e,1);return t??null}function Ze(e){return!We||!e?null:me(e)?e:dt(e)?ft(e)||e===be(e).scrollingElement?window:_e(e)?e:null:null}function rn(e){return me(e)?e.scrollX:e.scrollLeft}function on(e){return me(e)?e.scrollY:e.scrollTop}function st(e){return{x:rn(e),y:on(e)}}var M;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(M||(M={}));function sn(e){return!We||!e?!1:e===document.scrollingElement}function an(e){const t={x:0,y:0},n=sn(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,a=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:o,isLeft:i,isBottom:a,isRight:s,maxScroll:r,minScroll:t}}const vr={x:.2,y:.2};function mr(e,t,n,r,o){let{top:i,left:a,right:s,bottom:c}=n;r===void 0&&(r=10),o===void 0&&(o=vr);const{isTop:u,isBottom:d,isLeft:f,isRight:g}=an(e),h={x:0,y:0},S={x:0,y:0},p={height:t.height*o.y,width:t.width*o.x};return!u&&i<=t.top+p.height?(h.y=M.Backward,S.y=r*Math.abs((t.top+p.height-i)/p.height)):!d&&c>=t.bottom-p.height&&(h.y=M.Forward,S.y=r*Math.abs((t.bottom-p.height-c)/p.height)),!g&&s>=t.right-p.width?(h.x=M.Forward,S.x=r*Math.abs((t.right-p.width-s)/p.width)):!f&&a<=t.left+p.width&&(h.x=M.Backward,S.x=r*Math.abs((t.left+p.width-a)/p.width)),{direction:h,speed:S}}function br(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:a}=window;return{top:0,left:0,right:i,bottom:a,width:i,height:a}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function ln(e){return e.reduce((t,n)=>ge(t,st(n)),V)}function yr(e){return e.reduce((t,n)=>t+rn(n),0)}function xr(e){return e.reduce((t,n)=>t+on(n),0)}function wr(e,t){if(t===void 0&&(t=Oe),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);nn(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Sr=[["x",["left","right"],yr],["y",["top","bottom"],xr]];class mt{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=vt(n),o=ln(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,a,s]of Sr)for(const c of a)Object.defineProperty(this,c,{get:()=>{const u=s(r),d=o[i]-u;return this.rect[c]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Re{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function Cr(e){const{EventTarget:t}=k(e);return e instanceof t?e:be(e)}function et(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var U;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(U||(U={}));function Xt(e){e.preventDefault()}function Er(e){e.stopPropagation()}var b;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(b||(b={}));const cn={start:[b.Space,b.Enter],cancel:[b.Esc],end:[b.Space,b.Enter]},Dr=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case b.Right:return{...n,x:n.x+25};case b.Left:return{...n,x:n.x-25};case b.Down:return{...n,y:n.y+25};case b.Up:return{...n,y:n.y-25}}};class un{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Re(be(n)),this.windowListeners=new Re(k(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(U.Resize,this.handleCancel),this.windowListeners.add(U.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(U.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&wr(r),n(V)}handleKeyDown(t){if(Zt(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:i=cn,coordinateGetter:a=Dr,scrollBehavior:s="smooth"}=o,{code:c}=t;if(i.end.includes(c)){this.handleEnd(t);return}if(i.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=r.current,d=u?{x:u.left,y:u.top}:V;this.referenceCoordinates||(this.referenceCoordinates=d);const f=a(t,{active:n,context:r.current,currentCoordinates:d});if(f){const g=$e(f,d),h={x:0,y:0},{scrollableAncestors:S}=r.current;for(const p of S){const v=t.code,{isTop:w,isRight:C,isLeft:D,isBottom:N,maxScroll:A,minScroll:R}=an(p),m=br(p),y={x:Math.min(v===b.Right?m.right-m.width/2:m.right,Math.max(v===b.Right?m.left:m.left+m.width/2,f.x)),y:Math.min(v===b.Down?m.bottom-m.height/2:m.bottom,Math.max(v===b.Down?m.top:m.top+m.height/2,f.y))},L=v===b.Right&&!C||v===b.Left&&!D,T=v===b.Down&&!N||v===b.Up&&!w;if(L&&y.x!==f.x){const P=p.scrollLeft+g.x,G=v===b.Right&&P<=A.x||v===b.Left&&P>=R.x;if(G&&!g.y){p.scrollTo({left:P,behavior:s});return}G?h.x=p.scrollLeft-P:h.x=v===b.Right?p.scrollLeft-A.x:p.scrollLeft-R.x,h.x&&p.scrollBy({left:-h.x,behavior:s});break}else if(T&&y.y!==f.y){const P=p.scrollTop+g.y,G=v===b.Down&&P<=A.y||v===b.Up&&P>=R.y;if(G&&!g.x){p.scrollTo({top:P,behavior:s});return}G?h.y=p.scrollTop-P:h.y=v===b.Down?p.scrollTop-A.y:p.scrollTop-R.y,h.y&&p.scrollBy({top:-h.y,behavior:s});break}}this.handleMove(t,ge($e(f,this.referenceCoordinates),h))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}un.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=cn,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const s=i.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function Wt(e){return!!(e&&"distance"in e)}function Yt(e){return!!(e&&"delay"in e)}class bt{constructor(t,n,r){var o;r===void 0&&(r=Cr(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:i}=t,{target:a}=i;this.props=t,this.events=n,this.document=be(a),this.documentListeners=new Re(this.document),this.listeners=new Re(r),this.windowListeners=new Re(k(a)),this.initialCoordinates=(o=it(i))!=null?o:V,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(U.Resize,this.handleCancel),this.windowListeners.add(U.DragStart,Xt),this.windowListeners.add(U.VisibilityChange,this.handleCancel),this.windowListeners.add(U.ContextMenu,Xt),this.documentListeners.add(U.Keydown,this.handleKeydown),n){if(Wt(n))return;if(Yt(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(U.Click,Er,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(U.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:i}=this,{onMove:a,options:{activationConstraint:s}}=i;if(!o)return;const c=(n=it(t))!=null?n:V,u=$e(o,c);if(!r&&s){if(Yt(s))return et(u,s.tolerance)?this.handleCancel():void 0;if(Wt(s))return s.tolerance!=null&&et(u,s.tolerance)?this.handleCancel():et(u,s.distance)?this.handleStart():void 0}t.cancelable&&t.preventDefault(),a(c)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===b.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Rr={move:{name:"pointermove"},end:{name:"pointerup"}};class dn extends bt{constructor(t){const{event:n}=t,r=be(n.target);super(t,Rr,r)}}dn.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const Pr={move:{name:"mousemove"},end:{name:"mouseup"}};var at;(function(e){e[e.RightClick=2]="RightClick"})(at||(at={}));class Mr extends bt{constructor(t){super(t,Pr,be(t.event.target))}}Mr.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===at.RightClick?!1:(r==null||r({event:n}),!0)}}];const tt={move:{name:"touchmove"},end:{name:"touchend"}};class Ar extends bt{constructor(t){super(t,tt)}static setup(){return window.addEventListener(tt.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(tt.move.name,t)};function t(){}}}Ar.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r==null||r({event:n}),!0)}}];var Pe;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Pe||(Pe={}));var Xe;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Xe||(Xe={}));function _r(e){let{acceleration:t,activator:n=Pe.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:a=5,order:s=Xe.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:d,delta:f,threshold:g}=e;const h=Or({delta:f,disabled:!i}),[S,p]=Wn(),v=l.useRef({x:0,y:0}),w=l.useRef({x:0,y:0}),C=l.useMemo(()=>{switch(n){case Pe.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Pe.DraggableRect:return o}},[n,o,c]),D=l.useRef(null),N=l.useCallback(()=>{const R=D.current;if(!R)return;const m=v.current.x*w.current.x,y=v.current.y*w.current.y;R.scrollBy(m,y)},[]),A=l.useMemo(()=>s===Xe.TreeOrder?[...u].reverse():u,[s,u]);l.useEffect(()=>{if(!i||!u.length||!C){p();return}for(const R of A){if((r==null?void 0:r(R))===!1)continue;const m=u.indexOf(R),y=d[m];if(!y)continue;const{direction:L,speed:T}=mr(R,y,C,t,g);for(const P of["x","y"])h[P][L[P]]||(T[P]=0,L[P]=0);if(T.x>0||T.y>0){p(),D.current=R,S(N,a),v.current=T,w.current=L;return}}v.current={x:0,y:0},w.current={x:0,y:0},p()},[t,N,r,p,i,a,JSON.stringify(C),JSON.stringify(h),S,u,A,d,JSON.stringify(g)])}const Ir={x:{[M.Backward]:!1,[M.Forward]:!1},y:{[M.Backward]:!1,[M.Forward]:!1}};function Or(e){let{delta:t,disabled:n}=e;const r=ot(t);return Ie(o=>{if(n||!r||!o)return Ir;const i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[M.Backward]:o.x[M.Backward]||i.x===-1,[M.Forward]:o.x[M.Forward]||i.x===1},y:{[M.Backward]:o.y[M.Backward]||i.y===-1,[M.Forward]:o.y[M.Forward]||i.y===1}}},[n,t,r])}function Lr(e,t){const n=t!==null?e.get(t):void 0,r=n?n.node.current:null;return Ie(o=>{var i;return t===null?null:(i=r??o)!=null?i:null},[r,t])}function Tr(e,t){return l.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,i=o.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,r)}));return[...n,...i]},[]),[e,t])}var Ae;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Ae||(Ae={}));var lt;(function(e){e.Optimized="optimized"})(lt||(lt={}));const Ht=new Map;function Br(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,a]=l.useState(null),{frequency:s,measure:c,strategy:u}=o,d=l.useRef(e),f=v(),g=pt(f),h=l.useCallback(function(w){w===void 0&&(w=[]),!g.current&&a(C=>C===null?w:C.concat(w.filter(D=>!C.includes(D))))},[g]),S=l.useRef(null),p=Ie(w=>{if(f&&!n)return Ht;if(!w||w===Ht||d.current!==e||i!=null){const C=new Map;for(let D of e){if(!D)continue;if(i&&i.length>0&&!i.includes(D.id)&&D.rect.current){C.set(D.id,D.rect.current);continue}const N=D.node.current,A=N?new mt(c(N),N):null;D.rect.current=A,A&&C.set(D.id,A)}return C}return w},[e,i,n,f,c]);return l.useEffect(()=>{d.current=e},[e]),l.useEffect(()=>{f||h()},[n,f]),l.useEffect(()=>{i&&i.length>0&&a(null)},[JSON.stringify(i)]),l.useEffect(()=>{f||typeof s!="number"||S.current!==null||(S.current=setTimeout(()=>{h(),S.current=null},s))},[s,f,h,...r]),{droppableRects:p,measureDroppableContainers:h,measuringScheduled:i!=null};function v(){switch(u){case Ae.Always:return!1;case Ae.BeforeDragging:return n;default:return!n}}}function fn(e,t){return Ie(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Nr(e,t){return fn(e,t)}function kr(e){let{callback:t,disabled:n}=e;const r=ht(t),o=l.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(r)},[r,n]);return l.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function yt(e){let{callback:t,disabled:n}=e;const r=ht(t),o=l.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(r)},[n]);return l.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function zr(e){return new mt(Oe(e),e)}function Kt(e,t,n){t===void 0&&(t=zr);const[r,o]=l.useReducer(s,null),i=kr({callback(c){if(e)for(const u of c){const{type:d,target:f}=u;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),a=yt({callback:o});return oe(()=>{o(),e?(a==null||a.observe(e),i==null||i.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),i==null||i.disconnect())},[e]),r;function s(c){if(!e)return null;if(e.isConnected===!1){var u;return(u=c??n)!=null?u:null}const d=t(e);return JSON.stringify(c)===JSON.stringify(d)?c:d}}function jr(e){const t=fn(e);return tn(e,t)}const Vt=[];function Fr(e){const t=l.useRef(e),n=Ie(r=>e?r&&r!==Vt&&e&&t.current&&e.parentNode===t.current.parentNode?r:vt(e):Vt,[e]);return l.useEffect(()=>{t.current=e},[e]),n}function $r(e){const[t,n]=l.useState(null),r=l.useRef(e),o=l.useCallback(i=>{const a=Ze(i.target);a&&n(s=>s?(s.set(a,st(a)),new Map(s)):null)},[]);return l.useEffect(()=>{const i=r.current;if(e!==i){a(i);const s=e.map(c=>{const u=Ze(c);return u?(u.addEventListener("scroll",o,{passive:!0}),[u,st(u)]):null}).filter(c=>c!=null);n(s.length?new Map(s):null),r.current=e}return()=>{a(e),a(i)};function a(s){s.forEach(c=>{const u=Ze(c);u==null||u.removeEventListener("scroll",o)})}},[o,e]),l.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,a)=>ge(i,a),V):ln(e):V,[e,t])}function qt(e,t){t===void 0&&(t=[]);const n=l.useRef(null);return l.useEffect(()=>{n.current=null},t),l.useEffect(()=>{const r=e!==V;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?$e(e,n.current):V}function Ur(e){l.useEffect(()=>{if(!We)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function Xr(e,t){return l.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:i}=r;return n[o]=a=>{i(a,t)},n},{}),[e,t])}function hn(e){return l.useMemo(()=>e?hr(e):null,[e])}const nt=[];function Wr(e,t){t===void 0&&(t=Oe);const[n]=e,r=hn(n?k(n):null),[o,i]=l.useReducer(s,nt),a=yt({callback:i});return e.length>0&&o===nt&&i(),oe(()=>{e.length?e.forEach(c=>a==null?void 0:a.observe(c)):(a==null||a.disconnect(),i())},[e]),o;function s(){return e.length?e.map(c=>sn(c)?r:new mt(t(c),c)):nt}}function Yr(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return _e(t)?t:e}function Hr(e){let{measure:t}=e;const[n,r]=l.useState(null),o=l.useCallback(u=>{for(const{target:d}of u)if(_e(d)){r(f=>{const g=t(d);return f?{...f,width:g.width,height:g.height}:g});break}},[t]),i=yt({callback:o}),a=l.useCallback(u=>{const d=Yr(u);i==null||i.disconnect(),d&&(i==null||i.observe(d)),r(d?t(d):null)},[t,i]),[s,c]=rt(a);return l.useMemo(()=>({nodeRef:s,rect:n,setRef:c}),[n,s,c])}const Kr=[{sensor:dn,options:{}},{sensor:un,options:{}}],Vr={current:{}},je={draggable:{measure:Ut},droppable:{measure:Ut,strategy:Ae.WhileDragging,frequency:lt.Optimized},dragOverlay:{measure:Oe}};class Me extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const qr={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Me,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ue},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:je,measureDroppableContainers:Ue,windowRect:null,measuringScheduled:!1},Gr={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ue,draggableNodes:new Map,over:null,measureDroppableContainers:Ue},xt=l.createContext(Gr),Jr=l.createContext(qr);function Qr(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Me}}}function Zr(e,t){switch(t.type){case I.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case I.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case I.DragEnd:case I.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case I.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Me(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case I.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Me(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case I.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Me(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function eo(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=l.useContext(xt),i=ot(r),a=ot(n==null?void 0:n.id);return l.useEffect(()=>{if(!t&&!r&&i&&a!=null){if(!Zt(i)||document.activeElement===i.target)return;const s=o.get(a);if(!s)return;const{activatorNode:c,node:u}=s;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const d of[c.current,u.current]){if(!d)continue;const f=Kn(d);if(f){f.focus();break}}})}},[r,t,o,a,i]),null}function to(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...r}),n):n}function no(e){return l.useMemo(()=>({draggable:{...je.draggable,...e==null?void 0:e.draggable},droppable:{...je.droppable,...e==null?void 0:e.droppable},dragOverlay:{...je.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function ro(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const i=l.useRef(!1),{x:a,y:s}=typeof o=="boolean"?{x:o,y:o}:o;oe(()=>{if(!a&&!s||!t){i.current=!1;return}if(i.current||!r)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const d=n(u),f=tn(d,r);if(a||(f.x=0),s||(f.y=0),i.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const g=nn(u);g&&g.scrollBy({top:f.y,left:f.x})}},[t,a,s,r,n])}const pn=l.createContext({...V,scaleX:1,scaleY:1});var re;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(re||(re={}));const oo=l.memo(function(t){var n,r,o,i;let{id:a,accessibility:s,autoScroll:c=!0,children:u,sensors:d=Kr,collisionDetection:f=sr,measuring:g,modifiers:h,...S}=t;const p=l.useReducer(Zr,void 0,Qr),[v,w]=p,[C,D]=Zn(),[N,A]=l.useState(re.Uninitialized),R=N===re.Initialized,{draggable:{active:m,nodes:y,translate:L},droppable:{containers:T}}=v,P=m?y.get(m):null,G=l.useRef({initial:null,translated:null}),J=l.useMemo(()=>{var _;return m!=null?{id:m,data:(_=P==null?void 0:P.data)!=null?_:Vr,rect:G}:null},[m,P]),Z=l.useRef(null),[wt,St]=l.useState(null),[Q,Ct]=l.useState(null),ye=pt(S,Object.values(S)),Ye=gt("DndDescribedBy",a),Et=l.useMemo(()=>T.getEnabled(),[T]),ie=no(g),{droppableRects:ce,measureDroppableContainers:Le,measuringScheduled:Dt}=Br(Et,{dragging:R,dependencies:[L.x,L.y],config:ie.droppable}),W=Lr(y,m),Rt=l.useMemo(()=>Q?it(Q):null,[Q]),Pt=Sn(),Mt=Nr(W,ie.draggable.measure);ro({activeNode:m?y.get(m):null,config:Pt.layoutShiftCompensation,initialRect:Mt,measure:ie.draggable.measure});const Y=Kt(W,ie.draggable.measure,Mt),He=Kt(W?W.parentElement:null),se=l.useRef({activatorEvent:null,active:null,activeNode:W,collisionRect:null,collisions:null,droppableRects:ce,draggableNodes:y,draggingNode:null,draggingNodeRect:null,droppableContainers:T,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),At=T.getNodeFor((n=se.current.over)==null?void 0:n.id),ae=Hr({measure:ie.dragOverlay.measure}),Te=(r=ae.nodeRef.current)!=null?r:W,ue=R?(o=ae.rect)!=null?o:Y:null,_t=!!(ae.nodeRef.current&&ae.rect),It=jr(_t?null:Y),Ke=hn(Te?k(Te):null),ee=Fr(R?At??W:null),Be=Wr(ee),Ne=to(h,{transform:{x:L.x-It.x,y:L.y-It.y,scaleX:1,scaleY:1},activatorEvent:Q,active:J,activeNodeRect:Y,containerNodeRect:He,draggingNodeRect:ue,over:se.current.over,overlayNodeRect:ae.rect,scrollableAncestors:ee,scrollableAncestorRects:Be,windowRect:Ke}),Ot=Rt?ge(Rt,L):null,Lt=$r(ee),gn=qt(Lt),vn=qt(Lt,[Y]),de=ge(Ne,gn),fe=ue?cr(ue,Ne):null,xe=J&&fe?f({active:J,collisionRect:fe,droppableRects:ce,droppableContainers:Et,pointerCoordinates:Ot}):null,Tt=or(xe,"id"),[te,Bt]=l.useState(null),mn=_t?Ne:ge(Ne,vn),bn=ar(mn,(i=te==null?void 0:te.rect)!=null?i:null,Y),Nt=l.useCallback((_,z)=>{let{sensor:j,options:ne}=z;if(Z.current==null)return;const $=y.get(Z.current);if(!$)return;const H=_.nativeEvent,q=new j({active:Z.current,activeNode:$,event:H,options:ne,context:se,onStart(K){const we=Z.current;if(we==null)return;const Se=y.get(we);if(!Se)return;const{onDragStart:ke}=ye.current,ze={active:{id:we,data:Se.data,rect:G}};pe.unstable_batchedUpdates(()=>{ke==null||ke(ze),A(re.Initializing),w({type:I.DragStart,initialCoordinates:K,active:we}),C({type:"onDragStart",event:ze})})},onMove(K){w({type:I.DragMove,coordinates:K})},onEnd:he(I.DragEnd),onCancel:he(I.DragCancel)});pe.unstable_batchedUpdates(()=>{St(q),Ct(_.nativeEvent)});function he(K){return async function(){const{active:Se,collisions:ke,over:ze,scrollAdjustedTranslate:zt}=se.current;let Ce=null;if(Se&&zt){const{cancelDrop:Ee}=ye.current;Ce={activatorEvent:H,active:Se,collisions:ke,delta:zt,over:ze},K===I.DragEnd&&typeof Ee=="function"&&await Promise.resolve(Ee(Ce))&&(K=I.DragCancel)}Z.current=null,pe.unstable_batchedUpdates(()=>{w({type:K}),A(re.Uninitialized),Bt(null),St(null),Ct(null);const Ee=K===I.DragEnd?"onDragEnd":"onDragCancel";if(Ce){const Ve=ye.current[Ee];Ve==null||Ve(Ce),C({type:Ee,event:Ce})}})}}},[y]),yn=l.useCallback((_,z)=>(j,ne)=>{const $=j.nativeEvent,H=y.get(ne);if(Z.current!==null||!H||$.dndKit||$.defaultPrevented)return;const q={active:H};_(j,z.options,q)===!0&&($.dndKit={capturedBy:z.sensor},Z.current=ne,Nt(j,z))},[y,Nt]),kt=Tr(d,yn);Ur(d),oe(()=>{Y&&N===re.Initializing&&A(re.Initialized)},[Y,N]),l.useEffect(()=>{const{onDragMove:_}=ye.current,{active:z,activatorEvent:j,collisions:ne,over:$}=se.current;if(!z||!j)return;const H={active:z,activatorEvent:j,collisions:ne,delta:{x:de.x,y:de.y},over:$};pe.unstable_batchedUpdates(()=>{_==null||_(H),C({type:"onDragMove",event:H})})},[de.x,de.y]),l.useEffect(()=>{const{active:_,activatorEvent:z,collisions:j,droppableContainers:ne,scrollAdjustedTranslate:$}=se.current;if(!_||Z.current==null||!z||!$)return;const{onDragOver:H}=ye.current,q=ne.get(Tt),he=q&&q.rect.current?{id:q.id,rect:q.rect.current,data:q.data,disabled:q.disabled}:null,K={active:_,activatorEvent:z,collisions:j,delta:{x:$.x,y:$.y},over:he};pe.unstable_batchedUpdates(()=>{Bt(he),H==null||H(K),C({type:"onDragOver",event:K})})},[Tt]),oe(()=>{se.current={activatorEvent:Q,active:J,activeNode:W,collisionRect:fe,collisions:xe,droppableRects:ce,draggableNodes:y,draggingNode:Te,draggingNodeRect:ue,droppableContainers:T,over:te,scrollableAncestors:ee,scrollAdjustedTranslate:de},G.current={initial:ue,translated:fe}},[J,W,xe,fe,y,Te,ue,ce,T,te,ee,de]),_r({...Pt,delta:L,draggingRect:fe,pointerCoordinates:Ot,scrollableAncestors:ee,scrollableAncestorRects:Be});const xn=l.useMemo(()=>({active:J,activeNode:W,activeNodeRect:Y,activatorEvent:Q,collisions:xe,containerNodeRect:He,dragOverlay:ae,draggableNodes:y,droppableContainers:T,droppableRects:ce,over:te,measureDroppableContainers:Le,scrollableAncestors:ee,scrollableAncestorRects:Be,measuringConfiguration:ie,measuringScheduled:Dt,windowRect:Ke}),[J,W,Y,Q,xe,He,ae,y,T,ce,te,Le,ee,Be,ie,Dt,Ke]),wn=l.useMemo(()=>({activatorEvent:Q,activators:kt,active:J,activeNodeRect:Y,ariaDescribedById:{draggable:Ye},dispatch:w,draggableNodes:y,over:te,measureDroppableContainers:Le}),[Q,kt,J,Y,w,Ye,y,te,Le]);return X.createElement(en.Provider,{value:D},X.createElement(xt.Provider,{value:wn},X.createElement(Jr.Provider,{value:xn},X.createElement(pn.Provider,{value:bn},u)),X.createElement(eo,{disabled:(s==null?void 0:s.restoreFocus)===!1})),X.createElement(nr,{...s,hiddenTextDescribedById:Ye}));function Sn(){const _=(wt==null?void 0:wt.autoScrollEnabled)===!1,z=typeof c=="object"?c.enabled===!1:c===!1,j=R&&!_&&!z;return typeof c=="object"?{...c,enabled:j}:{enabled:j}}}),io=l.createContext(null),Gt="button",so="Droppable";function ao(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const i=gt(so),{activators:a,activatorEvent:s,active:c,activeNodeRect:u,ariaDescribedById:d,draggableNodes:f,over:g}=l.useContext(xt),{role:h=Gt,roleDescription:S="draggable",tabIndex:p=0}=o??{},v=(c==null?void 0:c.id)===t,w=l.useContext(v?pn:io),[C,D]=rt(),[N,A]=rt(),R=Xr(a,t),m=pt(n);oe(()=>(f.set(t,{id:t,key:i,node:C,activatorNode:N,data:m}),()=>{const L=f.get(t);L&&L.key===i&&f.delete(t)}),[f,t]);const y=l.useMemo(()=>({role:h,tabIndex:p,"aria-disabled":r,"aria-pressed":v&&h===Gt?!0:void 0,"aria-roledescription":S,"aria-describedby":d.draggable}),[r,h,p,v,S,d.draggable]);return{active:c,activatorEvent:s,activeNodeRect:u,attributes:y,isDragging:v,listeners:r?void 0:R,node:C,over:g,setNodeRef:D,setActivatorNodeRef:A,transform:w}}function lo(e,t,n){const r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}const co=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:r}=e;return!n||!t?r:lo(r,n,t)};var F=(e=>(e[e.Selected=0]="Selected",e[e.Everything=1]="Everything",e))(F||{});const uo=ut("div",{display:"flex",position:"absolute",flexDirection:"column",width:"260px",border:"1px solid $gray6",borderRadius:"$2",backgroundColor:"$panelBg",overflow:"hidden",userSelect:"none"}),fo=ut(Fe,{height:"$6",width:"100%",padding:"0 $1",backgroundColor:"$panelTitleBg",color:"$gray11",flexShrink:0,fontSize:"$sm"}),ho=ut(Fe,{padding:"$1"});function po(){const[{bottom:e,left:t},n]=l.useState({left:4,bottom:4}),r=l.useCallback(o=>{n(({bottom:i,left:a})=>{const{delta:s}=o;return{left:a+s.x,bottom:i+-s.y}})},[]);return E.jsx(oo,{modifiers:[co],onDragEnd:r,children:E.jsx(go,{left:t,bottom:e})})}const go=Dn(function(t){const{attributes:n,listeners:r,setNodeRef:o,transform:i}=ao({id:"ParticlePanel"}),{viewportStore:a}=Fn(),s=a.particleStore,{t:c}=Rn(),u={bottom:`${t.bottom}px`,left:`${t.left}px`,transform:i?`translate3d(${i.x}px, ${i.y}px, 0)`:"none"};return s.isPanelOn?E.jsxs(uo,{ref:o,style:u,...n,children:[E.jsxs(fo,{align:"v",justifyContent:"between",children:[E.jsxs(Fe,{gap:"xxs",children:[E.jsx($n,{size:"12px",...r}),c("effects.particle.title")]}),E.jsxs(Fe,{gap:"xxs",align:"v",children:[E.jsx(Je,{content:c("effects.particle.restart"),children:E.jsx(qe,{size:"xs",variant:"subtle",onClick:()=>s.play(),children:E.jsx(Un,{size:"12px"})})}),E.jsx(Je,{content:s.isPlaying?c("effects.particle.pause"):c("effects.particle.play"),children:E.jsx(qe,{size:"xs",variant:"subtle",onClick:()=>s.togglePauseResume(),children:s.isPlaying?E.jsx(Pn,{size:"12px"}):E.jsx(Mn,{size:"12px"})})}),E.jsx(Je,{content:c("effects.particle.stop"),children:E.jsx(qe,{size:"xs",variant:"subtle",onClick:()=>s.stop(s.mode),disabled:s.isStopped,children:E.jsx(Xn,{size:"12px"})})})]})]}),E.jsxs(ho,{children:[E.jsx(An,{label:c("effects.particle.speed"),value:s.speed,min:0,max:5,step:.1,dragStep:.1,onChange:d=>s.onSpeedChange(d)}),E.jsx(_n,{label:c("effects.particle.scope.label"),value:s.mode,onChange:d=>{s.switchPlayMode(d),s.onBoundingChange(s.mode===F.Selected),s.stop(F.Everything),s.play()},options:[{value:F.Selected,label:c("effects.particle.scope.selected")},{value:F.Everything,label:c("effects.particle.scope.everything")}]}),E.jsx(In,{label:c("effects.particle.bounding"),disabled:s.mode===F.Everything,value:s.isBoundingEnabled,onChange:d=>s.onBoundingChange(d)})]})]}):null});class vo extends On{constructor(){super(...arguments);x(this,"isBoundingEnabled",!1);x(this,"onScriptReset");x(this,"_onScriptStop");x(this,"_onScriptPlay");x(this,"_onScriptPause");x(this,"_hasLastSelectedEntity");x(this,"_selectedParticles",[]);x(this,"_allParticles",[]);x(this,"_mode",F.Selected);x(this,"_speed",1);x(this,"_isSelected",!1);x(this,"_componentArray",[]);x(this,"_center",new Ln);x(this,"_tempBoundingBox",new jt)}set mode(n){this._mode=n}get mode(){return this._mode}set speed(n){this._getParticles(this.mode).forEach(r=>{r.generator.main.simulationSpeed=n}),this._speed=n}get speed(){return this._speed}init(n){this.onScriptReset=n.onScriptReset,this._onScriptPlay=n.onScriptPlay,this._onScriptPause=n.onScriptPause,this._onScriptStop=n.onScriptStop,this._hasLastSelectedEntity=n.hasLastSelectedEntity}onStart(){const n=this.entity.parent.parent.createChild("particle_bounds_drawer");n.addComponent(Tn),n.addComponent(Ge),n.layer=Bn.Outline}onSelectEntity(n){if(this.onScriptReset&&this.onScriptReset(),this._componentArray.length=0,this._isSelected=!1,n){for(const r of n){const o=[];r.getComponentsIncludeChildren(De,o),this._componentArray.push(...o)}this._isSelected=this._componentArray.length>0}this._updateArrayAndPlay()}onAddComponent(n){if(n instanceof De){if(this.mode===F.Selected&&this._hasLastSelectedEntity&&!this._hasLastSelectedEntity())return;this._componentArray.push(n),this._updateArrayAndPlay()}}onRemoveComponent(n){if(n instanceof De)if(this.mode===F.Selected&&this._hasLastSelectedEntity&&!this._hasLastSelectedEntity()){const r=this._allParticles.findIndex(o=>o.instanceId===n.instanceId);r>-1&&this._allParticles.splice(r,1)}else{const r=this._componentArray.findIndex(o=>o.instanceId===n.instanceId);r>-1&&this._componentArray.splice(r,1),this._updateArrayAndPlay()}}onPlay(n){this._updateAllParticles(),n?this.play(F.Everything):this.stop(F.Everything)}onUpdate(){if(this._isSelected&&this.isBoundingEnabled){this._tempBoundingBox.copyFrom(this._selectedParticles[0].bounds);for(let h=1,S=this._selectedParticles.length;h<S;h++)jt.merge(this._tempBoundingBox,this._selectedParticles[h].bounds,this._tempBoundingBox);const{min:n,max:r}=this._tempBoundingBox,{x:o,y:i,z:a}=n,{x:s,y:c,z:u}=r,d=s-o,f=c-i,g=u-a;this._center.set(s+o,c+i,u+a).scale(.5),Ge.flush(),Ge.drawCuboid(d,f,g,this._center)}}_getParticles(n){return n===F.Selected?this._selectedParticles:this._allParticles}play(n=this.mode){this._getParticles(n).forEach(r=>{r.generator.stop(!1,Ft.StopEmittingAndClear),r.generator.main.simulationSpeed=this._speed,r.generator.play()}),this._onScriptPlay&&this._onScriptPlay(n)}pause(n=!1){this._getParticles(this.mode).forEach(r=>{r.generator.main.simulationSpeed=0}),this._onScriptPause&&this._onScriptPause(n)}stop(n){this._getParticles(n).forEach(r=>{r.generator.stop(!1,Ft.StopEmittingAndClear)}),this._onScriptStop&&this._onScriptStop(n)}resume(){this._getParticles(this.mode).forEach(n=>{n.generator.main.simulationSpeed=this._speed,n.generator.play()})}_updateAllParticles(){this._allParticles.length=0;const n=new Set;this.engine.sceneManager.scenes[0].rootEntities.forEach(o=>{const i=[];o.getComponentsIncludeChildren(De,i);for(const a of i)n.has(a.instanceId)||(n.add(a.instanceId),this._allParticles.push(a))})}_updateSelectedParticles(){this._selectedParticles.length=0;const n=new Set;for(const r of this._componentArray){const o=[];r.entity.getComponentsIncludeChildren(De,o);for(const i of o)n.has(i.instanceId)||(n.add(i.instanceId),this._selectedParticles.push(i))}}_updateArrayAndPlay(){const n=this._componentArray.length;this.pause(n!==0),n>0&&(this._updateSelectedParticles(),this._updateAllParticles(),this.play())}}var mo=Object.defineProperty,bo=Object.getOwnPropertyDescriptor,B=(e,t,n,r)=>{for(var o=r>1?void 0:r?bo(t,n):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(r?a(t,n,o):a(o))||o);return r&&o&&mo(t,n,o),o};let O=class{constructor(e){x(this,"isPanelOn",!1);x(this,"speed",1);x(this,"isPlaying",!1);x(this,"isStopped",!1);x(this,"_mode",F.Everything);x(this,"isModeChanged",!1);x(this,"isBoundingEnabled",!1);x(this,"script");x(this,"root");Nn(this),this.root=e.projectStore}get mode(){return this._mode}init(){this.script=kn.addScript(vo),this.speed=this.script.speed,this.isBoundingEnabled=this.script.isBoundingEnabled,this.script.init({onScriptReset:()=>{this.isPanelOn=!1},onScriptPlay:()=>{this.isStopped=!1,this.isPlaying=!0},onScriptPause:e=>{this.isPanelOn=e},onScriptStop:e=>{this.isStopped=!0,this.isPlaying=!1},hasLastSelectedEntity:()=>{const e=this.root.currentScene.sceneUIStore.lastSelectedId;return e&&!!this.root.currentScene.entities.get(e)}}),this._mode=this.script.mode}play(e=this.mode){this.isStopped=!1,this.isPlaying=!0,this.script.play(e)}togglePauseResume(){this.isStopped=!1,this.isPlaying?(this.isPlaying=!1,this.script.pause()):(this.isPlaying=!0,this.script.resume())}stop(e){this.isStopped=!0,this.isPlaying=!1,this.script.stop(e)}onSpeedChange(e){this.speed=e,this.script.speed=e}onBoundingChange(e){this.isBoundingEnabled=e,this.script.isBoundingEnabled=e}switchPlayMode(e){this._mode=e,this.script.mode=e}};B([le],O.prototype,"isPanelOn",2);B([le],O.prototype,"speed",2);B([le],O.prototype,"isPlaying",2);B([le],O.prototype,"isStopped",2);B([le],O.prototype,"_mode",2);B([zn],O.prototype,"mode",1);B([le],O.prototype,"isModeChanged",2);B([le],O.prototype,"isBoundingEnabled",2);B([ve],O.prototype,"play",1);B([ve],O.prototype,"togglePauseResume",1);B([ve],O.prototype,"stop",1);B([ve],O.prototype,"onSpeedChange",1);B([ve],O.prototype,"onBoundingChange",1);B([ve],O.prototype,"switchPlayMode",1);O=B([jn({type:"particleStore",Panel:po})],O);export{Fi as AnimatorComponent,$i as AnimatorStore,ms as AudioComponent,ws as ButtonComponent,Mi as CameraComponent,Ki as CharacterControllerComponent,_i as DirectLightComponent,Vi as DynamicColliderComponent,qi as FixedJointComponent,Gi as HingeJointComponent,Ss as ImageComponent,hs as ImportScriptComponent,is as LottieAnimationComponent,Ni as MeshRendererComponent,cs as ParticleRendererComponent,O as ParticleStore,Ji as PhysicsStore,Oi as PointLightComponent,gs as PostProcessComponent,ts as ScriptComponent,zi as SkinnedMeshRendererComponent,as as SpineAnimationComponent,Ti as SpotLightComponent,Qi as SpringJointComponent,Yi as SpriteMaskComponent,Xi as SpriteRendererComponent,Zi as StaticColliderComponent,Cs as TextComponent,rs as TextRendererComponent,ds as TrailRendererComponent,ys as TransformComponent,Es as UICanvasComponent,Ds as UIGroupComponent,Rs as UITransformComponent};
@@ -0,0 +1 @@
1
+ var w=Object.defineProperty;var O=(p,e,t)=>e in p?w(p,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):p[e]=t;var m=(p,e,t)=>(O(p,typeof e!="symbol"?e+"":e,t),t);import{aQ as x,aR as E,aU as I,aS as d,bO as _,aW as v,E as R,C as h,bP as g,x as S,p as C,e as b,bQ as T,bR as j}from"./index-aec7e708.js";import"./index-e8a45e82.js";import{c as N}from"./Component-ed7aa0ab.js";import"./postmen-2f47f6bb.js";import{c as V,a as A,b as B}from"./scriptPropertyActions-d3a583d2.js";import"./TextureAsset-39fb07fe.js";import"./GlTFAsset-2723b84a.js";import"./MaterialAsset-6ef9b4ed.js";import"./MeshAsset-ca9305e5.js";import"./AnimatorControllerAsset-21dc6332.js";import"./AnimationClipAsset-9167378a.js";import"./SpriteAsset-558ffca8.js";import"./SpriteAtlasAsset-cdc34386.js";import"./AmbientLightAsset-bdbc4e1d.js";import"./LottieAsset-3692580d.js";import"./ShaderChunkAsset-34116f2c.js";import"./SpineSkeletonDataAsset-27244892.js";import"./FontAsset-d1ced18d.js";import"./SceneAsset-385fa837.js";import"./ShaderAsset-f4514b03.js";import"./PrimitiveMesh-0572a073.js";import"./XRReferenceImageAsset-2f6ff226.js";import"./PrefabAsset-9179b95c.js";import"./PhysicsMaterialAsset-4a1e5ea3.js";import"./RenderTargetAsset-ab6e06d2.js";import"./AudioAsset-0c828c80.js";import"./index-78269e76.js";import"./MarkdownAsset-bcb90be4.js";import{E as F}from"./ShaderUIScriptAsset-fc503291.js";import"./enum-58295f88.js";import"./encode-ac4bb64e.js";import"./meshopt_simplifier.module-cd99529d.js";import"./Tooltip-82063435.js";import"./AssetViewer-64cd01fa.js";import"./ktx2-encoder-53b21bdc.js";import"./TaskQueue-05c94a4d.js";import"./glTFIO-79bbca27.js";import"./MaterialInspector-e8242674.js";import"./IconPointFilled-811fc660.js";import"./ProxyConfigs-3a5fd860.js";import"./index-74130ff3.js";import"./MeshThumbnail-ab28b3b8.js";import"./bundlers-9b0d37fc.js";import"./assetEditorActions-c4e5962f.js";import"./module-8816772d.js";import"./module-ffeaf99f.js";import"./FormItemArray-6d69acd4.js";import"./Accordion-3d330bc6.js";import"./IconEdit-ab77303f.js";import"./module-220b3921.js";const M=["Input","Boolean","Switch","Toggle","Slider","Number","Vector2","Vector3","Vector4","Rect","Color","Select","AssetPicker","Textarea","SegmentControl"];function D(p){p=p.replace(/\/\/.*$/gm,"").replace(/,\s*}/gm,"}");const e=/@inspect\(['"](\w+)['"],?\s?(\{[\s\S]*?\})?\)\s*(?:public|private|static)?\s*(\w+)[:\s\w]+?\s*=\s*(?:['"]([^'"]*?)['"]|(-?[\w.]+));?/g,t=[];let o;for(;(o=e.exec(p))!==null;){let[,r,s,a,n,c]=o,l=n??c;if(M.indexOf(r)===-1){console.warn(`Unsupported property type: ${r}`);continue}let i={property:a.toString(),label:a.toString(),type:r};if(s){s=s.trim().replace(/\s+/g," ").replace(/'/g,'"').replace(/(\w+):/g,'"$1":');try{i=JSON.parse(s),i.type=r,i.label=i.label||a,i.property=i.property||a}catch{console.warn(`Failed to parse property options: ${s}`)}}["Number","Slider"].includes(r)&&(l=parseFloat(l)),t.push({propertyType:r,propertyOptions:i,propertyName:a,propertyValue:l})}return t}async function P(p){const e=D(p.code),t={success:!1,model:{},config:[]};for(let o=0;o<e.length;o++){const r=e[o];t.model[r.propertyName]=r.propertyValue,t.config.push(r.propertyOptions)}return t.success=!0,t}var J=Object.defineProperty,$=Object.getOwnPropertyDescriptor,f=(p,e,t,o)=>{for(var r=o>1?void 0:o?$(e,t):e,s=p.length-1,a;s>=0;s--)(a=p[s])&&(r=(o?a(e,t,r):a(r))||r);return o&&r&&J(e,t,r),r};const k=new BroadcastChannel("Galacean_Editor_Channel"),U=x(function(e){const{model:t}=e,{t:o}=E(),r=V(t.properties,t.root),s=n=>{Object.keys(n.properties).forEach(c=>{T(n,c,{getActualEditorValue:()=>g(n.properties[c]),setActualEditorValue:(l,i,y)=>{l.properties[i]=y}})})};async function a(){t.parsed=!1;const n=t.root.assetStore.assets[t.script.refId],c=await j.assets.getAssetInfo(n.serverId),l=await fetch(c.data.url).then(y=>y.text());await B(t.root,n.id,l,c.data.url);const i=await P(n);i.success&&(t.parsed=!0,t.propertiesConfig=i.config,t.properties=i.model,s(t))}return I.useEffect(()=>{t!=null&&t.properties&&s(t)},[t.properties]),t.script?d.jsxs(d.Fragment,{children:[d.jsx(_,{label:" ",async:a,children:o("component.script.parse-properties")}),t.parsed&&t.properties&&d.jsx(v.List,{model:r,configs:t.propertiesConfig,onModelChange:(n,c)=>{k.postMessage({type:"script-inspector-value-change",payload:{instanceId:t.id,property:n,value:c}}),A(t.root,t.id,n,c)}})]}):null});let u=class extends R{constructor(){super(...arguments);m(this,"parsed",!1);m(this,"propertiesConfig",[]);m(this,"isScript",!0);m(this,"script",null);m(this,"properties",{})}onInitComplete(){if(!this.script)return;this.root.assetStore.getAssetByRef(this.script).then(t=>{if(!t)throw new Error(`Cannot find file ${JSON.stringify(this.script)}`);return this.applyBoundPathChange("_scriptRef",h.AssetPicker,this.script).then(()=>P(t))}).then(t=>{this.propertiesConfig=t.config;for(const[o,r]of Object.entries(t.model))this.properties[o]=this.properties[o]??r;this.parsed=!0}).catch(t=>{console.warn(t)})}async applyBoundPathChange(e,t,o){if(e==="_scriptRef"){this.setBoundPathValue(e,h.Input,o);return}await super.applyBoundPathChange(e,t,o)}deserialize(e){if(super.deserialize(e),this.script=e.refId?{refId:e.refId}:null,e.props)for(const[t,o]of Object.entries(e.props))t!=="enabled"&&(this.properties[t]=o)}toJSON(){const e=super.toJSON();if(delete e.props.script,this.properties){const t=g(this.properties),o=e.props||{};for(const[r,s]of Object.entries(t))r!=="root"&&(o[r]=s);e.props=o}return this.script&&this.root.assetStore.assets[this.script.refId]&&(e.refId=this.script.refId),e}};f([S],u.prototype,"parsed",2);f([S.ref],u.prototype,"propertiesConfig",2);f([C({label:b("component.script.script-label"),type:h.AssetPicker,assetType:"script",bindPath:"_scriptRef",customFilter:p=>p.subType===F.Default,onLocate:p=>{p.onDoubleClick()}})],u.prototype,"script",2);f([C({label:b("component.script.properties-label"),customComponent:U})],u.prototype,"properties",2);u=f([N({type:"Script",componentsMenu:{label:"component.script.title"}})],u);export{u as ScriptComponent};
@@ -0,0 +1 @@
1
+ import{P as e}from"./PostProcessComponent-d0ea27a4.js";import"./index-aec7e708.js";import"./index-e8a45e82.js";import"./Component-ed7aa0ab.js";import"./Menu-0b8da92f.js";import"./Accordion-3d330bc6.js";export{e as PostProcessComponent};
@@ -0,0 +1 @@
1
+ import{C,D as s,F as l,H as c,P as S,a as d,S as J}from"./PhysicsStore-33cac578.js";import"./index-aec7e708.js";import"./index-e8a45e82.js";import"./Component-ed7aa0ab.js";import"./postmen-2f47f6bb.js";import"./FormItemArray-6d69acd4.js";import"./Accordion-3d330bc6.js";import"./IconEdit-ab77303f.js";export{C as CharacterControllerComponent,s as DynamicColliderComponent,l as FixedJointComponent,c as HingeJointComponent,S as PhysicsStore,d as SpringJointComponent,J as StaticColliderComponent};