@volter/game-editor 0.5.145 → 0.5.147

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 (295) hide show
  1. package/BUNDLED_NOTICES +22 -22
  2. package/catalog/entries/blender.json +2 -2
  3. package/catalog/entries/music.json +2 -2
  4. package/dist/.vite/manifest.json +2136 -2136
  5. package/dist/assets/{AssetBudgetPanel-8flhcwbD.js → AssetBudgetPanel-_9o7NNOc.js} +3 -3
  6. package/dist/assets/{AudioViewer-BYZn4DUK.js → AudioViewer-B_cUBoy_.js} +1 -1
  7. package/dist/assets/{CanvasBoardDocument-CoNJL2CI.js → CanvasBoardDocument-C8eTtH_s.js} +1 -1
  8. package/dist/assets/{CanvasSceneViewport-Dq3V66EU.js → CanvasSceneViewport-Bs1qn2f4.js} +1 -1
  9. package/dist/assets/{ColorInput-CZ9YSe5b.js → ColorInput-BPXgNXFu.js} +1 -1
  10. package/dist/assets/{ColorPicker-DytPZaFB.js → ColorPicker-Bbz_9vJC.js} +1 -1
  11. package/dist/assets/{EntityModelDocument-BkXCSQxA.js → EntityModelDocument-QlbOfLaH.js} +1 -1
  12. package/dist/assets/{EnvironmentAssetDocument-DFZWx1WX.js → EnvironmentAssetDocument-utBb74BM.js} +1 -1
  13. package/dist/assets/{GameplaySessionTimeline-B8wWEj5v.js → GameplaySessionTimeline-V14di22j.js} +1 -1
  14. package/dist/assets/{ImageViewer-CIM_I8nH.js → ImageViewer-BkMo0IPP.js} +1 -1
  15. package/dist/assets/InspectorObjectPreview-SFcJJSPG.js +1 -0
  16. package/dist/assets/{JsonAssetDocument-gQuwiLdR.js → JsonAssetDocument-BLuaJWLP.js} +1 -1
  17. package/dist/assets/{LiveModuleDocument-DHCRcqhT.js → LiveModuleDocument-puZvN5U7.js} +1 -1
  18. package/dist/assets/{LutAssetDocument-B4RQTQCB.js → LutAssetDocument-UaemlCXE.js} +1 -1
  19. package/dist/assets/{ModelAssetDocument-DJnaaIHX.js → ModelAssetDocument-Dybr1un_.js} +1 -1
  20. package/dist/assets/{NonThreeAuthoringBootstrap-CF7BPoB9.js → NonThreeAuthoringBootstrap-CS8CKOgp.js} +1 -1
  21. package/dist/assets/{Object3DDocumentToolbar-DsN2NUQv.js → Object3DDocumentToolbar-CySnXf5X.js} +1 -1
  22. package/dist/assets/Object3DDocumentViewport-DQDepqIN.js +2 -0
  23. package/dist/assets/{Object3DPreview-BwZhzzAg.js → Object3DPreview-D3U756t8.js} +1 -1
  24. package/dist/assets/{OnlineAssetDetail-DB3yzRTz.js → OnlineAssetDetail-DqBKgHjE.js} +1 -1
  25. package/dist/assets/{PlayBar-CfImNQE-.js → PlayBar-CTGe_1DB.js} +1 -1
  26. package/dist/assets/{QuarksAssetDocument-DJGQB4u7.js → QuarksAssetDocument-BHkMS-Ga.js} +1 -1
  27. package/dist/assets/{ReactCanvasControls-BkR9VVE8.js → ReactCanvasControls-xRR7oNNu.js} +1 -1
  28. package/dist/assets/{RootSelectionOverlay-CSfOoibk.js → RootSelectionOverlay-CryhPQKQ.js} +1 -1
  29. package/dist/assets/{ShaderAssetDocument-CoiFAJWh.js → ShaderAssetDocument-DZAEoqUe.js} +1 -1
  30. package/dist/assets/{ShadowEditor-DgBjRx-V.js → ShadowEditor-Dt02ONTx.js} +1 -1
  31. package/dist/assets/{SourceAssetViewer-O0HH8IOS.js → SourceAssetViewer-BgdKlPbk.js} +1 -1
  32. package/dist/assets/StageHost-DotEJWDn.js +2 -0
  33. package/dist/assets/{StoryPreviewMount-Bdx5zbNZ.js → StoryPreviewMount-fy1HH3EA.js} +1 -1
  34. package/dist/assets/{ThreeBoardDocument-CXv7KFP1.js → ThreeBoardDocument-BThcmBaW.js} +2 -2
  35. package/dist/assets/{ThreeIsolationSceneContent-D5WV80fA.js → ThreeIsolationSceneContent-BqXwlAKo.js} +1 -1
  36. package/dist/assets/{ToolObject3DPreview-BGrgHTE9.js → ToolObject3DPreview-BMit2E5q.js} +1 -1
  37. package/dist/assets/{Toolbar-SOKVz9Is.js → Toolbar-CldLgNy0.js} +1 -1
  38. package/dist/assets/{TransientHint-C-aFB2Ox.js → TransientHint-Dd93nBDB.js} +1 -1
  39. package/dist/assets/{VideoViewer-B4I4Cbpl.js → VideoViewer-BUWJvD5B.js} +1 -1
  40. package/dist/assets/{ViewportShadingMenu-DBsoDPhe.js → ViewportShadingMenu-CA7sjFvW.js} +1 -1
  41. package/dist/assets/{active-ingest-DOoYv5lC.js → active-ingest-CAtltUt6.js} +2 -2
  42. package/dist/assets/{animation-clock-TPDD3KgB.js → animation-clock-DuRNpOkY.js} +1 -1
  43. package/dist/assets/{animation-mixers.service-fTlm79AY.js → animation-mixers.service-LWUg33iB.js} +1 -1
  44. package/dist/assets/{animation-timeline.utility-CagyUWvy.js → animation-timeline.utility-Dtqrn8Df.js} +1 -1
  45. package/dist/assets/{asset-budget-asset.menu-QnQQKyUV.js → asset-budget-asset.menu-DplPgcQF.js} +1 -1
  46. package/dist/assets/{asset-budget.action-Denu9n8R.js → asset-budget.action-DWQ8Z03a.js} +1 -1
  47. package/dist/assets/{asset-budget.document-DAQQudBF.js → asset-budget.document-KvHd_B-b.js} +1 -1
  48. package/dist/assets/{asset-budget.menu-Dhqm1ACI.js → asset-budget.menu-Dq0xjU7T.js} +1 -1
  49. package/dist/assets/{asset-editor-persistence-BPJ80IV2.js → asset-editor-persistence-C2FFcf1f.js} +1 -1
  50. package/dist/assets/{asset-loaders-Dcnf7Bw6.js → asset-loaders-D-qAq39L.js} +1 -1
  51. package/dist/assets/{asset-preview-BmprxTYE.js → asset-preview-BBNp5wTD.js} +1 -1
  52. package/dist/assets/{audio-unlock.service-CDSrqMlA.js → audio-unlock.service-5ISKsfGk.js} +1 -1
  53. package/dist/assets/{audio.utility-Bk4p5xsL.js → audio.utility-CcbZdTbr.js} +1 -1
  54. package/dist/assets/autoplay.service-D37lzGOy.js +1 -0
  55. package/dist/assets/{babylon-authoring-adapter-_KBkPwd9.js → babylon-authoring-adapter-Bi76ymde.js} +1 -1
  56. package/dist/assets/{binding-resolver-ClWFzZwl.js → binding-resolver-BT-wlV_S.js} +2 -2
  57. package/dist/assets/{blender-node-editor.document-BJs-svOJ.js → blender-node-editor.document-8KO07qK8.js} +1 -1
  58. package/dist/assets/{blender-properties-tab-Ca6GGoZA.js → blender-properties-tab-BDIFN9Ew.js} +1 -1
  59. package/dist/assets/{blender-runtime-host-BDbcC0Zg.js → blender-runtime-host-DayNDAb4.js} +1 -1
  60. package/dist/assets/{blender-runtime-skin-C-J3OdY_.js → blender-runtime-skin-SYIUtq-g.js} +26 -26
  61. package/dist/assets/{blender-runtime.document-0fBzbVqg.js → blender-runtime.document-DS9a1xTA.js} +1 -1
  62. package/dist/assets/{blender-screenshot.menu-D3yZwxi6.js → blender-screenshot.menu-NYHgjiD2.js} +1 -1
  63. package/dist/assets/{blender-timeline.document-BOpLOn76.js → blender-timeline.document-BecxD07e.js} +1 -1
  64. package/dist/assets/{blender-uv-editor.document-CNlwlNsR.js → blender-uv-editor.document-zlSQPhnI.js} +1 -1
  65. package/dist/assets/{blender-version.status-BrfCcN3A.js → blender-version.status-DV13oTI-.js} +1 -1
  66. package/dist/assets/{blender.command-B-4gubQH.js → blender.command-BxmGWW-J.js} +1 -1
  67. package/dist/assets/{board-guides-CAd3Uwwe.js → board-guides-D30dJhS9.js} +1 -1
  68. package/dist/assets/{bridge.command-B_ZMM1Af.js → bridge.command-DLHZ9N6O.js} +3 -3
  69. package/dist/assets/{browserAll-DJib4cRK.js → browserAll-d1LPFZ8a.js} +1 -1
  70. package/dist/assets/{build-player.document-Dkk9-Cxq.js → build-player.document-D9USjzns.js} +1 -1
  71. package/dist/assets/{build-profiles.document-E4xigdal.js → build-profiles.document-Dx_ot-Fc.js} +1 -1
  72. package/dist/assets/{build-progress.status-BmBmwXjj.js → build-progress.status-CpO5yV4P.js} +1 -1
  73. package/dist/assets/{build-session-DhHsQRks.js → build-session-BUzPoMeJ.js} +1 -1
  74. package/dist/assets/{build.action-CUifgV58.js → build.action-DDRWxEp_.js} +1 -1
  75. package/dist/assets/{build.command-BErZJdyz.js → build.command-Sr16CJ5Q.js} +1 -1
  76. package/dist/assets/{build.header-Bx2ejMEG.js → build.header-Dio0dYmL.js} +1 -1
  77. package/dist/assets/{build.menu-Dpl69Asc.js → build.menu-B4HojN0K.js} +1 -1
  78. package/dist/assets/{build.service-BHf0-RtC.js → build.service-nJA_hPeY.js} +1 -1
  79. package/dist/assets/{camera-D2f8WceK.js → camera-cFM_BzB5.js} +1 -1
  80. package/dist/assets/{camera-runtime.inspector-Bed8jPeG.js → camera-runtime.inspector-VTkCXhVn.js} +1 -1
  81. package/dist/assets/{canvas-design-mount-s-hs4sM5.js → canvas-design-mount-CwIE6jIe.js} +3 -3
  82. package/dist/assets/{canvas-entry-runtime-DtH7NAl5.js → canvas-entry-runtime-BHwunMIZ.js} +2 -2
  83. package/dist/assets/{canvas-preview-frames-BgBKQGAL.js → canvas-preview-frames-DiR_1Nkl.js} +1 -1
  84. package/dist/assets/{canvas-story-capture.service-Cqk4C8AX.js → canvas-story-capture.service-DFb_9Gj7.js} +2 -2
  85. package/dist/assets/{capability-coverage-CRqjvzDo.js → capability-coverage-DXpPzeSq.js} +1 -1
  86. package/dist/assets/{collaboration-presence-D-oYewcY.js → collaboration-presence-BPXi2uoB.js} +1 -1
  87. package/dist/assets/{collider-phxm70qk.js → collider-BDhZ2WGU.js} +1 -1
  88. package/dist/assets/{component-board.service-CLXsAGWX.js → component-board.service-1nXmWiyO.js} +2 -2
  89. package/dist/assets/{component-board.service-CE8B8nHy.js → component-board.service-F9QInLxP.js} +2 -2
  90. package/dist/assets/{component-board.service-D68yuC-G.js → component-board.service-oj_l1OCl.js} +2 -2
  91. package/dist/assets/{component-contracts.service-J0ThBCQb.js → component-contracts.service-7AclY-3L.js} +1 -1
  92. package/dist/assets/{component-instance-root-CTNzehmC.js → component-instance-root-s2oNaFgM.js} +1 -1
  93. package/dist/assets/{component-verbs.command-D9Y2aSPT.js → component-verbs.command-BedshcPk.js} +1 -1
  94. package/dist/assets/{component-verbs.service-NmQpK7Cp.js → component-verbs.service-BUPMTSK7.js} +1 -1
  95. package/dist/assets/{config-DtFNLMre.js → config-CONJQ1-s.js} +2 -2
  96. package/dist/assets/{configurations-DizIsCtw.js → configurations-Qo3roALR.js} +1 -1
  97. package/dist/assets/{connection.status-_545jhmC.js → connection.status-CwOzBKjh.js} +1 -1
  98. package/dist/assets/{constraints.inspector-Zg0371sI.js → constraints.inspector-CodiCDyu.js} +1 -1
  99. package/dist/assets/{content-bounds-JcLbQeNM.js → content-bounds-CgU8GC_V.js} +1 -1
  100. package/dist/assets/{contract-system-adapters-CborQejG.js → contract-system-adapters-DQy4r2Sz.js} +1 -1
  101. package/dist/assets/{coverage.service-ZvzXk_RH.js → coverage.service-BG-gGB1m.js} +1 -1
  102. package/dist/assets/{create-runtime-BRhUNQFy.js → create-runtime-DwJnXcQn.js} +1 -1
  103. package/dist/assets/{curve-ViOyXS6d.js → curve--9dHvlxI.js} +1 -1
  104. package/dist/assets/{data-asset-C4dKbRfK.js → data-asset-B63zZ6i5.js} +1 -1
  105. package/dist/assets/{data-ref-B0raIwHa.js → data-ref-Bx2EeAG-.js} +1 -1
  106. package/dist/assets/{debug-bridge-DPTNskFv.js → debug-bridge-DSKtmhFu.js} +1 -1
  107. package/dist/assets/{debug-registry-Dc3W6vwO.js → debug-registry-C_2eNpnk.js} +1 -1
  108. package/dist/assets/{deferred-ingest-play-CIebXfgB.js → deferred-ingest-play-5LkQpgbY.js} +2 -2
  109. package/dist/assets/{design-time-canvas-mount-BGOBVa9p.js → design-time-canvas-mount-BkG5N9yg.js} +2 -2
  110. package/dist/assets/{design-time-layers-BPYiK7VF.js → design-time-layers-CfsKfgXx.js} +1 -1
  111. package/dist/assets/{design-time-mount.service-qJ2qfNGK.js → design-time-mount.service-CfROK4Tk.js} +2 -2
  112. package/dist/assets/{design-time-mount.service-CBc4Am_-.js → design-time-mount.service-CrLbOI5D.js} +2 -2
  113. package/dist/assets/{design-time-react-mount-CV5Hd5Jd.js → design-time-react-mount-y3Mxm6MS.js} +1 -1
  114. package/dist/assets/{document-preview-three-C_6mBiiE.js → document-preview-three-BtJ5kvQP.js} +1 -1
  115. package/dist/assets/{dom-authoring-adapter-CJzZxsuq.js → dom-authoring-adapter-Ii9lsQEC.js} +1 -1
  116. package/dist/assets/{draco3d-CjtPWm52.js → draco3d-DVpFbiT2.js} +1 -1
  117. package/dist/assets/{edit-mode-audio.service-B-CjR9wW.js → edit-mode-audio.service-DOptSpox.js} +1 -1
  118. package/dist/assets/{edit-mode-authoring-CCBUV6q2.js → edit-mode-authoring-bbDKsmQY.js} +1 -1
  119. package/dist/assets/{edit-mode-networking.service-Mx_poWhf.js → edit-mode-networking.service-CQ9EIHxx.js} +1 -1
  120. package/dist/assets/{editor-api-DNxuq7oq.js → editor-api-So5QLNrp.js} +1 -1
  121. package/dist/assets/{editor-layers-DdJOFmu5.js → editor-layers-DOpEK7EI.js} +1 -1
  122. package/dist/assets/{editor-shell-store-BXKwqCuM.js → editor-shell-store-B6mGVxE1.js} +1 -1
  123. package/dist/assets/{entity-object-dwaTJjul.js → entity-object-BP-l2G3P.js} +1 -1
  124. package/dist/assets/{extend-D_CXDVWD.js → extend-BUAYCcQw.js} +1 -1
  125. package/dist/assets/{fork-menu-DklvmtJS.js → fork-menu-B5OZsFn3.js} +1 -1
  126. package/dist/assets/{frame-debugger-store-D2CIrmXD.js → frame-debugger-store-Dcd0xk80.js} +1 -1
  127. package/dist/assets/{game-contract-seams-C1m_P4SS.js → game-contract-seams-BcyjMWgg.js} +1 -1
  128. package/dist/assets/{game-css-scope-transform-BA7ZbLSi.js → game-css-scope-transform-BMZXZGxa.js} +1 -1
  129. package/dist/assets/{game-document.service-Cce4QU61.js → game-document.service-B-XkgDDF.js} +1 -1
  130. package/dist/assets/{game-eval.command-BkWv-UfA.js → game-eval.command-CDIobHKk.js} +1 -1
  131. package/dist/assets/{game-module-access-XGEiv_PE.js → game-module-access-Bco3xfHz.js} +1 -1
  132. package/dist/assets/{game-network-D8ug1x3w.js → game-network-D6ys6tk3.js} +3 -3
  133. package/dist/assets/{gameplay-export-DoN38r9u.js → gameplay-export-Bn1Gry1S.js} +1 -1
  134. package/dist/assets/{gameplay-replay-DtHDmjp5.js → gameplay-replay-F6SzY13b.js} +1 -1
  135. package/dist/assets/{gameplay.command-DYnPT8Lo.js → gameplay.command-B1zu5xn5.js} +1 -1
  136. package/dist/assets/{generation-jobs-BXHZFlzo.js → generation-jobs-DOejKlR8.js} +1 -1
  137. package/dist/assets/{generation.service-CGSWxPf1.js → generation.service-Dp-2Bugz.js} +1 -1
  138. package/dist/assets/{generations-DSXF1fKZ.js → generations-Cfg5VeT_.js} +1 -1
  139. package/dist/assets/{generations.status-Cf_3wvkx.js → generations.status-B71qbHkF.js} +1 -1
  140. package/dist/assets/{hierarchy-marks-D-538fQp.js → hierarchy-marks-C0IFZJpJ.js} +1 -1
  141. package/dist/assets/{hosted-asset-materialization-DyuYIe1c.js → hosted-asset-materialization-C13_NQiy.js} +1 -1
  142. package/dist/assets/{index-Bako454B.js → index-B2kLsykv.js} +1 -1
  143. package/dist/assets/{index-B6n4-N99.js → index-BUhh3Rzd.js} +1 -1
  144. package/dist/assets/{index-CqiPDGfq.js → index-CBXS7zwS.js} +1 -1
  145. package/dist/assets/{index-9uCSEhwf.js → index-CZN6xSZz.js} +1 -1
  146. package/dist/assets/{index-Crsbhlhy.js → index-D8WZNJyr.js} +7 -7
  147. package/dist/assets/{index-BzRGSlHd.js → index-DY0KD7bP.js} +1 -1
  148. package/dist/assets/{index-B_PxgVrX.js → index-DaJitWBP.js} +1 -1
  149. package/dist/assets/{index-CCKpGWll.js → index-DtG2FYKX.js} +2 -2
  150. package/dist/assets/{index-8RtOnhOo.js → index-Zh2eigf4.js} +1 -1
  151. package/dist/assets/{inference-diagnostics-JiGwiJUe.js → inference-diagnostics-BxYSTviL.js} +1 -1
  152. package/dist/assets/{ingest-boot-viewport-BqIgHJiK.js → ingest-boot-viewport-CeCgIUN-.js} +1 -1
  153. package/dist/assets/{ingest-siblings-C3KBC2OL.js → ingest-siblings-DYy4cVYn.js} +1 -1
  154. package/dist/assets/{ingest-source-persistence-Bk9qLkTV.js → ingest-source-persistence-DUR3zkkK.js} +1 -1
  155. package/dist/assets/{ingest.service-DdIqzdni.js → ingest.service-Dci3nThx.js} +1 -1
  156. package/dist/assets/{inspect-DPJ1m-DR.js → inspect-DZZVf2Cd.js} +1 -1
  157. package/dist/assets/instances.command-B1xSb5WF.js +1 -0
  158. package/dist/assets/{json-history-resource-BdE8EcB4.js → json-history-resource-zw9b6Y8f.js} +1 -1
  159. package/dist/assets/{layered-pick-CsPry26y.js → layered-pick-xWoyV-89.js} +1 -1
  160. package/dist/assets/{light-P3HQqMJN.js → light-DIoE0fX1.js} +1 -1
  161. package/dist/assets/{live-project-verbs-l0iIsIQL.js → live-project-verbs-BXEeauA6.js} +1 -1
  162. package/dist/assets/{machine.document-Dz14QA8c.js → machine.document-Nt7qJJnb.js} +1 -1
  163. package/dist/assets/{machines.finder-d1uSMp3z.js → machines.finder-DSRcplPO.js} +1 -1
  164. package/dist/assets/{material-factory-DzsVJzgQ.js → material-factory-Bd8GPiy9.js} +1 -1
  165. package/dist/assets/{material-D7yEfFFf.js → material-xp-yOoDf.js} +1 -1
  166. package/dist/assets/{mesh-f9oWqYCD.js → mesh-CKHHDEgo.js} +1 -1
  167. package/dist/assets/{model-asset-sections.service-Yh4yCNss.js → model-asset-sections.service-CsGjqQMr.js} +1 -1
  168. package/dist/assets/{model-inspection-C5OZWNER.js → model-inspection-CxUkvaYy.js} +1 -1
  169. package/dist/assets/{model-thumbnail-DFht0Zea.js → model-thumbnail-ji44cazv.js} +1 -1
  170. package/dist/assets/{models.finder-zG-WERDy.js → models.finder-7OLFZ3Ua.js} +1 -1
  171. package/dist/assets/{module-mode-CIRC4PLv.js → module-mode-CTX4Zewb.js} +2 -2
  172. package/dist/assets/{mount-canvas-ingest-root-WOBvBU2u.js → mount-canvas-ingest-root-CfQg5k2s.js} +2 -2
  173. package/dist/assets/{mount-dom-ingest-root-eYOFvDv6.js → mount-dom-ingest-root-Bk8578fv.js} +2 -2
  174. package/dist/assets/{mount-ingest-root-BtlYDYMM.js → mount-ingest-root-BC9Upehz.js} +2 -2
  175. package/dist/assets/{mount-manifest-BLFE1lZT.js → mount-manifest-BtU330Yf.js} +1 -1
  176. package/dist/assets/{mount-three-ingest-root-Bp78LaZS.js → mount-three-ingest-root-B9wyh99i.js} +1 -1
  177. package/dist/assets/{mounted-authoring-C7-8VFjR.js → mounted-authoring-rl9CAF3d.js} +1 -1
  178. package/dist/assets/{mounted-story-viewport-source-DYFGQweE.js → mounted-story-viewport-source-Dddc_OIU.js} +1 -1
  179. package/dist/assets/{native-debug-module-DZBcJZ3O.js → native-debug-module-C9N010aq.js} +1 -1
  180. package/dist/assets/{navigation-CLNvQtYC.js → navigation-DHVDGrf7.js} +1 -1
  181. package/dist/assets/{navmesh.menu-VhuMK-B9.js → navmesh.menu-NqxU_3q1.js} +1 -1
  182. package/dist/assets/{navmesh.service-9skC9KbW.js → navmesh.service-DE2es3jL.js} +1 -1
  183. package/dist/assets/network-observer.service-B2Pn7BYK.js +1 -0
  184. package/dist/assets/{network.utility-Cx6YQWiW.js → network.utility-BIsiGkKi.js} +1 -1
  185. package/dist/assets/{object3d-document-session-registry-DYtU0S61.js → object3d-document-session-registry-BXRoVukq.js} +2 -2
  186. package/dist/assets/{oid-transform--LwgkNr9.js → oid-transform-adTCl2dr.js} +1 -1
  187. package/dist/assets/{particles-DCL9brKJ.js → particles-Szke9R-F.js} +1 -1
  188. package/dist/assets/{pixi-authoring-adapter-CJsDP9TC.js → pixi-authoring-adapter-BqaHuca7.js} +1 -1
  189. package/dist/assets/{pixi-live-write-target-BkbfLPLj.js → pixi-live-write-target-rJAx3eKw.js} +1 -1
  190. package/dist/assets/{play.command-D7U5ws3m.js → play.command-DRO03Vwk.js} +2 -2
  191. package/dist/assets/{presentation-BlPdw2Jq.js → presentation-CoCMLuUj.js} +1 -1
  192. package/dist/assets/{product-BjUMoNzc.js → product-CmoJm1z7.js} +1 -1
  193. package/dist/assets/{profiler.action-BeMlKn0D.js → profiler.action-CFeHo2Me.js} +1 -1
  194. package/dist/assets/{profiler.menu-ByNYDsb_.js → profiler.menu-DyE7VCmY.js} +1 -1
  195. package/dist/assets/{profiler.utility-QR-GTEWX.js → profiler.utility-Dv_D8Vw-.js} +1 -1
  196. package/dist/assets/{project-authoring-session-D5fR27Xf.js → project-authoring-session-dQcglO8H.js} +2 -2
  197. package/dist/assets/{properties-bone-constraints.inspector-CQ1kzpeW.js → properties-bone-constraints.inspector-CIzNH3Z_.js} +1 -1
  198. package/dist/assets/{properties-bone.inspector-BmWvLtS5.js → properties-bone.inspector-41qz37vl.js} +1 -1
  199. package/dist/assets/{properties-collection.inspector-Bp4G6gAf.js → properties-collection.inspector-DYYFaZoX.js} +1 -1
  200. package/dist/assets/{properties-constraints.inspector-C5u2vHgr.js → properties-constraints.inspector-BRBLQA4H.js} +1 -1
  201. package/dist/assets/{properties-data.inspector-DLuIeVjK.js → properties-data.inspector-C0R7ekcB.js} +1 -1
  202. package/dist/assets/{properties-material.inspector-BazVBacy.js → properties-material.inspector-CNYVjoEc.js} +1 -1
  203. package/dist/assets/{properties-modifiers.inspector-BR_xxGgB.js → properties-modifiers.inspector-DHZG0Cxa.js} +1 -1
  204. package/dist/assets/{properties-object.inspector-BT8ErQ5C.js → properties-object.inspector-C_Mgm1nj.js} +1 -1
  205. package/dist/assets/{properties-output.inspector-Db7k-X5n.js → properties-output.inspector-FDfa5xyj.js} +1 -1
  206. package/dist/assets/{properties-particles.inspector-GHdgdRSV.js → properties-particles.inspector-B3_TZ-7s.js} +1 -1
  207. package/dist/assets/{properties-physics.inspector-CDa8fMg1.js → properties-physics.inspector-CNFMbeUu.js} +1 -1
  208. package/dist/assets/{properties-render.inspector-ChRA2wF6.js → properties-render.inspector-7hqJQyx_.js} +1 -1
  209. package/dist/assets/{properties-scene.inspector-wox_pPvs.js → properties-scene.inspector-C3Snw81s.js} +1 -1
  210. package/dist/assets/{properties-texture.inspector-c5cYfvzG.js → properties-texture.inspector-CFSO_Dlr.js} +1 -1
  211. package/dist/assets/{properties-view-layer.inspector-KfYDdJ83.js → properties-view-layer.inspector-BCT_uXoh.js} +1 -1
  212. package/dist/assets/{properties-world.inspector-DO4TsCFa.js → properties-world.inspector-7NucaecX.js} +1 -1
  213. package/dist/assets/{r3f-design-session-huIajqIc.js → r3f-design-session-C9CU7zUY.js} +2 -2
  214. package/dist/assets/{r3f-physics-binding-YA43TdoL.js → r3f-physics-binding-CPwS9PZB.js} +1 -1
  215. package/dist/assets/{r3f-source-authoring-adapter-BlRstmGA.js → r3f-source-authoring-adapter-DnPy_oLB.js} +1 -1
  216. package/dist/assets/{react-canvas-navigation-M0ghQ3Pg.js → react-canvas-navigation-M2ulH8Tv.js} +1 -1
  217. package/dist/assets/{react-inspector.service-CStUUFdZ.js → react-inspector.service-Bo91jpvq.js} +1 -1
  218. package/dist/assets/{react-story-board-CJ2rY1vM.js → react-story-board-CgSIwoIi.js} +1 -1
  219. package/dist/assets/{react-three-rapier.esm-2PI2GKyc.js → react-three-rapier.esm-CsZzas77.js} +1 -1
  220. package/dist/assets/{react-world-authoring-adapter-tdk4Hqj1.js → react-world-authoring-adapter-pm3Pec2P.js} +1 -1
  221. package/dist/assets/{realm-services-ZGsXIjKw.js → realm-services-CQpdYTrn.js} +1 -1
  222. package/dist/assets/{reflection-probe-capture.inspector-CacOiakh.js → reflection-probe-capture.inspector-BD_3gnLX.js} +1 -1
  223. package/dist/assets/{registry-CCO8vgc4.js → registry-CYyxpRNG.js} +1 -1
  224. package/dist/assets/{relative-import-specifier-CJ9epbC5.js → relative-import-specifier-CprW5QX1.js} +1 -1
  225. package/dist/assets/{render-env-CcmQfcfh.js → render-env-jkLm7mQ-.js} +1 -1
  226. package/dist/assets/{render-features-d6WsfyhR.js → render-features-DZj6xJ7A.js} +1 -1
  227. package/dist/assets/{render-settings-2QiH0WvX.js → render-settings-y9WwM9f2.js} +1 -1
  228. package/dist/assets/{resolve-three-DaW6J3do.js → resolve-three-BiA6TMOb.js} +3 -3
  229. package/dist/assets/{root-seam-contract-BaqTf_0m.js → root-seam-contract-BE3UJfPU.js} +1 -1
  230. package/dist/assets/{run-selection-BmPqbXVv.js → run-selection-oyZHUojP.js} +1 -1
  231. package/dist/assets/{scene-capture-BPf9CksU.js → scene-capture-DdYt-ezq.js} +1 -1
  232. package/dist/assets/{scene-document.service-BCJX2wYL.js → scene-document.service-BJpAFJ9x.js} +2 -2
  233. package/dist/assets/{scene-framing-pfBwKlV1.js → scene-framing-DaESgxep.js} +1 -1
  234. package/dist/assets/{seeded-random-Cm0mJ9WK.js → seeded-random-CiRcvG_O.js} +1 -1
  235. package/dist/assets/{setup-renderer-CDiOvS5v.js → setup-renderer-BPkAv9Fp.js} +1 -1
  236. package/dist/assets/{source-object3d-authoring-adapter-CmnO36sT.js → source-object3d-authoring-adapter-DyvmyB6t.js} +1 -1
  237. package/dist/assets/{source-persistence-backend-ECfFZPdn.js → source-persistence-backend-COR9hjaK.js} +1 -1
  238. package/dist/assets/{stage-keyboard-D9z07kMc.js → stage-keyboard-qLau9UI2.js} +1 -1
  239. package/dist/assets/{stage-overlay-set-BEcLelHE.js → stage-overlay-set-DGeTZI4D.js} +1 -1
  240. package/dist/assets/{stage-presence-markers-61iYjRz9.js → stage-presence-markers-ChdZ4iEj.js} +1 -1
  241. package/dist/assets/{stage-transform-tools-D_zntx7x.js → stage-transform-tools-D6z9r5Bu.js} +1 -1
  242. package/dist/assets/{standard-viewport-dressing-CvWc3TIo.js → standard-viewport-dressing-BTi3EC4-.js} +1 -1
  243. package/dist/assets/{state-watch.action-Dj33chqd.js → state-watch.action-BBJuiPxV.js} +1 -1
  244. package/dist/assets/{state-watch.menu-BDbYVr9h.js → state-watch.menu-Df03qnWN.js} +1 -1
  245. package/dist/assets/{state-watch.utility-YGDgFG4K.js → state-watch.utility-BRgr0mlj.js} +1 -1
  246. package/dist/assets/{story-capture-DRH3UvNr.js → story-capture-CPj2On1g.js} +1 -1
  247. package/dist/assets/{story-documents-DoLPg9Lx.js → story-documents-DB5jz0J4.js} +1 -1
  248. package/dist/assets/{story-documents.service-Ll8_ATjf.js → story-documents.service-Dh_vsIwR.js} +1 -1
  249. package/dist/assets/{story-documents.service-Teg89FZc.js → story-documents.service-DnMSzk6y.js} +1 -1
  250. package/dist/assets/{story-media-presence-Xlo427K1.js → story-media-presence-CmwbMtq5.js} +1 -1
  251. package/dist/assets/{story-pixi-preview-BBP84uRR.js → story-pixi-preview-ChgLtIMr.js} +1 -1
  252. package/dist/assets/{story-presentation-Bqi53kq0.js → story-presentation-D5MyfBZO.js} +1 -1
  253. package/dist/assets/{story-three-preview-BP4ILFDq.js → story-three-preview-8pZ9VDBK.js} +2 -2
  254. package/dist/assets/{studio-environment-BLFX45T5.js → studio-environment-BIGsD0w9.js} +1 -1
  255. package/dist/assets/{surface-state-rZISD-ig.js → surface-state-CfMKGBS8.js} +1 -1
  256. package/dist/assets/{syntactic-prop-specs-BVVxIxx3.js → syntactic-prop-specs-CsqhjQcU.js} +1 -1
  257. package/dist/assets/{team-playtest.service-DqP8zQMt.js → team-playtest.service-CEPhGU5R.js} +1 -1
  258. package/dist/assets/{three-a5CVjo2i.js → three-CJ8rXYAG.js} +1 -1
  259. package/dist/assets/{three-authoring-adapter-D9bJThN9.js → three-authoring-adapter-C5bmfaJR.js} +1 -1
  260. package/dist/assets/three-authoring.service-DaV0hSzN.js +2 -0
  261. package/dist/assets/{three-ingest-runtime-CfjyePZf.js → three-ingest-runtime-Cd4N9W9s.js} +1 -1
  262. package/dist/assets/{three-integration-Bq5NMTap.js → three-integration-C9RCTRFF.js} +2 -2
  263. package/dist/assets/three-integration.service-D29Q2JPH.js +1 -0
  264. package/dist/assets/{three-projection-core-BTQ_M-Ho.js → three-projection-core-Dyl2RKyC.js} +1 -1
  265. package/dist/assets/{three-state-DYl6KVhl.js → three-state-BBsWckdA.js} +1 -1
  266. package/dist/assets/{three-story-capture.service-CkEnDiGX.js → three-story-capture.service-BuiJlRNB.js} +2 -2
  267. package/dist/assets/{three-story-model-DR4JL0tj.js → three-story-model-WLzZGb08.js} +1 -1
  268. package/dist/assets/{three-viewport-presentation-Bu3_3jY0.js → three-viewport-presentation-Dj1rgGCy.js} +1 -1
  269. package/dist/assets/{transform-mode-request-CQMVP3gI.js → transform-mode-request-BlDpDb6q.js} +1 -1
  270. package/dist/assets/{transport-strip-7xF6Xkx1.js → transport-strip-DXtCpJ9z.js} +1 -1
  271. package/dist/assets/transport.header-B5_HK9Km.js +1 -0
  272. package/dist/assets/{tuples-Bi79tUJA.js → tuples-a1q2uI-K.js} +1 -1
  273. package/dist/assets/{ui-board-document-ByN-Igr_.js → ui-board-document-C0-Ka1Pc.js} +2 -2
  274. package/dist/assets/{user-data-BJje5VYV.js → user-data-BEqwoJ6c.js} +1 -1
  275. package/dist/assets/{utility-view-state-D_M1xdFg.js → utility-view-state-BJFTkWml.js} +1 -1
  276. package/dist/assets/{viewport-door-Bn_5UYAF.js → viewport-door-BJM9e-5e.js} +1 -1
  277. package/dist/assets/{viewport-root-presentation-CMku-eFg.js → viewport-root-presentation-b3HQkQsA.js} +1 -1
  278. package/dist/assets/{viewport-surface-status-Z2lECnRZ.js → viewport-surface-status-CWEsIWP5.js} +1 -1
  279. package/dist/assets/{webworkerAll-B66_oG9K.js → webworkerAll-DkxwDNyb.js} +1 -1
  280. package/dist/assets/{workspace-arrangement-BPsnvrOt.js → workspace-arrangement-DSOBJt3d.js} +1 -1
  281. package/dist/assets/{world-documents-CEI6Ult8.js → world-documents-CTOlRBai.js} +1 -1
  282. package/dist/assets/{world-root-stage-binding-BtFetoJf.js → world-root-stage-binding-CfHqbqWN.js} +1 -1
  283. package/dist/assets/{xstate-animation-binding-5ogRENtk.js → xstate-animation-binding-xlAjIuNr.js} +1 -1
  284. package/dist/assets/{xstate-animation-meta-D3SfP75s.js → xstate-animation-meta-CzcepwNz.js} +1 -1
  285. package/dist-node/cli.js +16 -16
  286. package/package.json +16 -16
  287. package/dist/assets/InspectorObjectPreview-ec285ozq.js +0 -1
  288. package/dist/assets/Object3DDocumentViewport-DGFR-qkU.js +0 -2
  289. package/dist/assets/StageHost-CNkXkK_f.js +0 -2
  290. package/dist/assets/autoplay.service-B8dGBVjn.js +0 -1
  291. package/dist/assets/instances.command-BIwrjtVv.js +0 -1
  292. package/dist/assets/network-observer.service-ib7T4XSw.js +0 -1
  293. package/dist/assets/three-authoring.service-C0WuXyLN.js +0 -2
  294. package/dist/assets/three-integration.service-scS00K9w.js +0 -1
  295. package/dist/assets/transport.header-AqKlS4Ny.js +0 -1
@@ -1 +1 @@
1
- import{ab as a}from"./index-Crsbhlhy.js";import{s as n,n as s}from"./command-results-CUQD49AB.js";import{g as m,a as p}from"./game-network-D8ug1x3w.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-OZVqp6xS.js";import"./index-Da9JhEvW.js";import"./native-debug-module-DZBcJZ3O.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-Dc3W6vwO.js";import"./contract-system-adapters-CborQejG.js";import"./game-contract-seams-C1m_P4SS.js";import"./seeded-random-Cm0mJ9WK.js";import"./game-audio-BeCyd0Ha.js";import"./rapier-physics-adapter-CaZqWLu0.js";import"./events-156d8d12.esm-DmeaOP4r.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./index-DzuOGwVB.js";import"./live-project-verbs-l0iIsIQL.js";import"./capability-coverage-CRqjvzDo.js";import"./edit-mode-authoring-CCBUV6q2.js";import"./json-history-resource-BdE8EcB4.js";import"./binding-resolver-ClWFzZwl.js";import"./adapter-surface-Y37Nzcyw.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-ZGsXIjKw.js";import"./canvas-entry-runtime-DtH7NAl5.js";import"./three-ingest-runtime-CfjyePZf.js";import"./EffectComposer-BEAt0PtQ.js";import"./CopyShader-BzTUYzf6.js";import"./ShaderPass-DTnDQXm0.js";import"./Pass-D1MRT672.js";import"./CSS3DRenderer-BsAqfavI.js";import"./relative-path-guard-GiM7Lsz8.js";import"./react-root-BHA-cdrW.js";import"./editor-presentation-activity-CqJH4G9t.js";import"./active-ingest-DOoYv5lC.js";import"./ingest-source-persistence-Bk9qLkTV.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-CMku-eFg.js";import"./mounted-authoring-C7-8VFjR.js";import"./entity-object-dwaTJjul.js";import"./user-data-BJje5VYV.js";import"./workspace-arrangement-BPsnvrOt.js";import"./three-contract-Dkt6PmWY.js";import"./three-a5CVjo2i.js";import"./editor-layers-DdJOFmu5.js";import"./component-instance-root-CTNzehmC.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-D9bJThN9.js";import"./source-persistence-backend-ECfFZPdn.js";import"./three-projection-core-BTQ_M-Ho.js";import"./body-marks-C1LxJtQb.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./structural-ids-BOo2BRoY.js";import"./object3d-authoring-subject-XccsO0xG.js";import"./r3f-physics-binding-YA43TdoL.js";import"./deferred-ingest-play-CIebXfgB.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-tdk4Hqj1.js";import"./board-guides-CAd3Uwwe.js";import"./relative-import-specifier-CJ9epbC5.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-DPJ1m-DR.js";import"./inference-diagnostics-JiGwiJUe.js";import"./writer-tw6EcuVO.js";import"./three-state-DYl6KVhl.js";import"./editor-shell-store-BXKwqCuM.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-Bn_5UYAF.js";import"./game-surface-defaults-D8S4cRxi.js";const Le="workspace.command",Ue={"list-gameplay-state":{derivedRefresh:"if-content-changed",handle:()=>{const e=a().debug;return e?{ok:!0,data:{providers:e.providers()}}:p()?{ok:!0,data:{providers:[]}}:s()}},"inspect-gameplay-state":{derivedRefresh:"if-content-changed",handle:e=>{const t=a().debug;if(!t)return p()?{ok:!0,data:{state:null}}:s();const r=e.keys;try{const o={};if(r&&r.length>0)for(const i of r)o[i]=t.state(i);else Object.assign(o,t.stateAll());return{ok:!0,data:{state:o}}}catch(o){return n(o)}}},"list-debug-commands":{derivedRefresh:"if-content-changed",handle:()=>{const e=a().debug;return e?{ok:!0,data:{commands:e.commands()}}:p()?{ok:!0,data:{commands:[]}}:s()}},"invoke-debug-command":{derivedRefresh:"always",handle:async e=>{const t=a().debug;if(!t)return p()?{ok:!1,error:`debug: no command registered under "${e.name}" — this game exposes no debug adapter`,data:{code:"DEBUG_COMMAND_NOT_REGISTERED",registered:[]}}:s();try{return{ok:!0,data:{result:await t.invoke(e.name,e.args??[])}}}catch(r){return n(r)}}},"inject-input":{derivedRefresh:"none",handle:e=>{const t=m();if(!t)return{ok:!1,error:"not in play mode — start play before injecting input"};let r;try{r=t.getInputTarget(e.worldId)}catch(o){return n(o)}if(!r)return{ok:!1,error:"this play session has no input door: no root entry exports `debug.input`"};try{if(e.kind==="action"){const i=e.atTick;return typeof i=="number"?(r.scheduleActionAtTick(i,e.action,e.value),{ok:!0,data:{scheduled:!0,tick:i}}):{ok:!0,data:r.setVirtualAction(e.action,e.value)}}const o=e.sourceId;switch(e.kind){case"axis":r.injectAxis(o,e.value);break;case"vector2":r.injectVector2(o,e.value);break;case"pointerDelta":r.injectPointerDelta(o,e.value);break;case"pointerPosition":r.injectPointerPosition(o,e.value);break;default:return{ok:!1,error:`unknown injection kind "${e.kind}"`}}return{ok:!0,data:{delivered:!0}}}catch(o){return n(o)}}},"set-time-scale":{derivedRefresh:"none",handle:e=>{const t=m();return t?(t.loop.timeScale=e.timeScale,{ok:!0,data:{timeScale:t.loop.timeScale}}):{ok:!1,error:"not in play mode — start play before setting time-scale"}}},"set-seed":{derivedRefresh:"none",handle:e=>{const t=m();return t?t.determinismDeclared?t.random?(t.random.reseed(e.seed),{ok:!0,data:{seed:t.random.seed}}):{ok:!1,error:"this play session has no first-party ctx.random to reseed"}:{ok:!1,error:"this project's manifest does not declare determinism.seededRandom — play.seed.set has no documented contract to reseed against (D15)",data:{code:"DETERMINISM_NOT_DECLARED"}}:{ok:!1,error:"not in play mode — start play before setting the seed"}}},"run-ticks":{derivedRefresh:"none",handle:async e=>{const t=m();if(!t)return{ok:!1,error:"not in play mode — start play before running ticks"};if(!t.runTicks)return{ok:!1,error:"this play session has no first-party Game to run ticks on",data:{code:"RUN_TICKS_UNAVAILABLE"}};try{const r=e.n,o=e.render;return t.runTicksSettled?await t.runTicksSettled(r,o?{render:o}:void 0):t.runTicks(r,o?{render:o}:void 0),{ok:!0}}catch(r){return n(r)}}}};export{Ue as commands,Le as point};
1
+ import{ab as a}from"./index-D8WZNJyr.js";import{s as n,n as s}from"./command-results-CUQD49AB.js";import{g as m,a as p}from"./game-network-D6ys6tk3.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-OZVqp6xS.js";import"./index-Da9JhEvW.js";import"./native-debug-module-C9N010aq.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-C_2eNpnk.js";import"./contract-system-adapters-DQy4r2Sz.js";import"./game-contract-seams-BcyjMWgg.js";import"./seeded-random-CiRcvG_O.js";import"./game-audio-BeCyd0Ha.js";import"./rapier-physics-adapter-CaZqWLu0.js";import"./events-156d8d12.esm-DmeaOP4r.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./index-DzuOGwVB.js";import"./live-project-verbs-BXEeauA6.js";import"./capability-coverage-DXpPzeSq.js";import"./edit-mode-authoring-bbDKsmQY.js";import"./json-history-resource-zw9b6Y8f.js";import"./binding-resolver-BT-wlV_S.js";import"./adapter-surface-Y37Nzcyw.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-CQpdYTrn.js";import"./canvas-entry-runtime-BHwunMIZ.js";import"./three-ingest-runtime-Cd4N9W9s.js";import"./EffectComposer-BEAt0PtQ.js";import"./CopyShader-BzTUYzf6.js";import"./ShaderPass-DTnDQXm0.js";import"./Pass-D1MRT672.js";import"./CSS3DRenderer-BsAqfavI.js";import"./relative-path-guard-GiM7Lsz8.js";import"./react-root-BHA-cdrW.js";import"./editor-presentation-activity-CqJH4G9t.js";import"./active-ingest-CAtltUt6.js";import"./ingest-source-persistence-DUR3zkkK.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-b3HQkQsA.js";import"./mounted-authoring-rl9CAF3d.js";import"./entity-object-BP-l2G3P.js";import"./user-data-BEqwoJ6c.js";import"./workspace-arrangement-DSOBJt3d.js";import"./three-contract-Dkt6PmWY.js";import"./three-CJ8rXYAG.js";import"./editor-layers-DOpEK7EI.js";import"./component-instance-root-s2oNaFgM.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-C5bmfaJR.js";import"./source-persistence-backend-COR9hjaK.js";import"./three-projection-core-Dyl2RKyC.js";import"./body-marks-C1LxJtQb.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./structural-ids-BOo2BRoY.js";import"./object3d-authoring-subject-XccsO0xG.js";import"./r3f-physics-binding-CPwS9PZB.js";import"./deferred-ingest-play-5LkQpgbY.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-pm3Pec2P.js";import"./board-guides-D30dJhS9.js";import"./relative-import-specifier-CprW5QX1.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-DZZVf2Cd.js";import"./inference-diagnostics-BxYSTviL.js";import"./writer-tw6EcuVO.js";import"./three-state-BBsWckdA.js";import"./editor-shell-store-B6mGVxE1.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-BJM9e-5e.js";import"./game-surface-defaults-D8S4cRxi.js";const Le="workspace.command",Ue={"list-gameplay-state":{derivedRefresh:"if-content-changed",handle:()=>{const e=a().debug;return e?{ok:!0,data:{providers:e.providers()}}:p()?{ok:!0,data:{providers:[]}}:s()}},"inspect-gameplay-state":{derivedRefresh:"if-content-changed",handle:e=>{const t=a().debug;if(!t)return p()?{ok:!0,data:{state:null}}:s();const r=e.keys;try{const o={};if(r&&r.length>0)for(const i of r)o[i]=t.state(i);else Object.assign(o,t.stateAll());return{ok:!0,data:{state:o}}}catch(o){return n(o)}}},"list-debug-commands":{derivedRefresh:"if-content-changed",handle:()=>{const e=a().debug;return e?{ok:!0,data:{commands:e.commands()}}:p()?{ok:!0,data:{commands:[]}}:s()}},"invoke-debug-command":{derivedRefresh:"always",handle:async e=>{const t=a().debug;if(!t)return p()?{ok:!1,error:`debug: no command registered under "${e.name}" — this game exposes no debug adapter`,data:{code:"DEBUG_COMMAND_NOT_REGISTERED",registered:[]}}:s();try{return{ok:!0,data:{result:await t.invoke(e.name,e.args??[])}}}catch(r){return n(r)}}},"inject-input":{derivedRefresh:"none",handle:e=>{const t=m();if(!t)return{ok:!1,error:"not in play mode — start play before injecting input"};let r;try{r=t.getInputTarget(e.worldId)}catch(o){return n(o)}if(!r)return{ok:!1,error:"this play session has no input door: no root entry exports `debug.input`"};try{if(e.kind==="action"){const i=e.atTick;return typeof i=="number"?(r.scheduleActionAtTick(i,e.action,e.value),{ok:!0,data:{scheduled:!0,tick:i}}):{ok:!0,data:r.setVirtualAction(e.action,e.value)}}const o=e.sourceId;switch(e.kind){case"axis":r.injectAxis(o,e.value);break;case"vector2":r.injectVector2(o,e.value);break;case"pointerDelta":r.injectPointerDelta(o,e.value);break;case"pointerPosition":r.injectPointerPosition(o,e.value);break;default:return{ok:!1,error:`unknown injection kind "${e.kind}"`}}return{ok:!0,data:{delivered:!0}}}catch(o){return n(o)}}},"set-time-scale":{derivedRefresh:"none",handle:e=>{const t=m();return t?(t.loop.timeScale=e.timeScale,{ok:!0,data:{timeScale:t.loop.timeScale}}):{ok:!1,error:"not in play mode — start play before setting time-scale"}}},"set-seed":{derivedRefresh:"none",handle:e=>{const t=m();return t?t.determinismDeclared?t.random?(t.random.reseed(e.seed),{ok:!0,data:{seed:t.random.seed}}):{ok:!1,error:"this play session has no first-party ctx.random to reseed"}:{ok:!1,error:"this project's manifest does not declare determinism.seededRandom — play.seed.set has no documented contract to reseed against (D15)",data:{code:"DETERMINISM_NOT_DECLARED"}}:{ok:!1,error:"not in play mode — start play before setting the seed"}}},"run-ticks":{derivedRefresh:"none",handle:async e=>{const t=m();if(!t)return{ok:!1,error:"not in play mode — start play before running ticks"};if(!t.runTicks)return{ok:!1,error:"this play session has no first-party Game to run ticks on",data:{code:"RUN_TICKS_UNAVAILABLE"}};try{const r=e.n,o=e.render;return t.runTicksSettled?await t.runTicksSettled(r,o?{render:o}:void 0):t.runTicks(r,o?{render:o}:void 0),{ok:!0}}catch(r){return n(r)}}}};export{Ue as commands,Le as point};
@@ -1 +1 @@
1
- import{a3 as l,a4 as a,ac as c}from"./index-Crsbhlhy.js";const g={version:1,jobs:[]};let u=g,i=null,s=0,o=!1;const r=new Set;function w(e,n=null){u=e,i=n,s++;for(const d of r)d()}function J(){return u}function v(){return i}function E(){return s}function y(e){return r.add(e),()=>r.delete(e)}function p(e){return e.status==="queued"||e.status==="running"}function h(e){return!p(e)&&(!e.readAt||Date.parse(e.readAt)<Date.parse(e.updatedAt))}function b(e){return e.filter(h).length}async function t(){try{const e=await fetch("/__editor/generations");w(await l(e,"Generation activity request failed"))}catch(e){i=e instanceof Error?e.message:String(e),s++;for(const n of r)n()}}async function G(){if(!o){o=!0;try{const e=await fetch("/__editor/generations/reconcile",{method:"POST"});a(e,"Generation reconciliation failed"),await t()}finally{o=!1}}}async function _(e){const n=await c(e.poll.tool,e.poll.input);if(!n.ok)throw new Error(n.error.message);if(n.generationWarning)throw new Error(n.generationWarning);return await t(),await f(e.id),n.data}async function S(e){if(!e.accept)throw new Error("This completed generation has no project asset to add.");const n=await c(e.accept.tool,e.accept.input,{confirm:!0});if(!n.ok)throw new Error(n.error.message);if(n.generationWarning)throw new Error(n.generationWarning);await t(),await f(e.id)}async function f(e){const n=await fetch(`/__editor/generations/${encodeURIComponent(e)}/read`,{method:"POST"});a(n,"Mark generation read failed"),await t()}async function T(e){const n=await fetch(`/__editor/generations/${encodeURIComponent(e)}`,{method:"DELETE"});a(n,"Forget generation job failed"),await t()}function A(){t();const e=window.setInterval(()=>void t(),2e3);return()=>{window.clearInterval(e)}}export{b as a,p as b,S as c,v as d,h as e,T as f,J as g,A as h,_ as i,E as j,f as m,G as p,t as r,y as s};
1
+ import{a3 as l,a4 as a,ac as c}from"./index-D8WZNJyr.js";const g={version:1,jobs:[]};let u=g,i=null,s=0,o=!1;const r=new Set;function w(e,n=null){u=e,i=n,s++;for(const d of r)d()}function J(){return u}function v(){return i}function E(){return s}function y(e){return r.add(e),()=>r.delete(e)}function p(e){return e.status==="queued"||e.status==="running"}function h(e){return!p(e)&&(!e.readAt||Date.parse(e.readAt)<Date.parse(e.updatedAt))}function b(e){return e.filter(h).length}async function t(){try{const e=await fetch("/__editor/generations");w(await l(e,"Generation activity request failed"))}catch(e){i=e instanceof Error?e.message:String(e),s++;for(const n of r)n()}}async function G(){if(!o){o=!0;try{const e=await fetch("/__editor/generations/reconcile",{method:"POST"});a(e,"Generation reconciliation failed"),await t()}finally{o=!1}}}async function _(e){const n=await c(e.poll.tool,e.poll.input);if(!n.ok)throw new Error(n.error.message);if(n.generationWarning)throw new Error(n.generationWarning);return await t(),await f(e.id),n.data}async function S(e){if(!e.accept)throw new Error("This completed generation has no project asset to add.");const n=await c(e.accept.tool,e.accept.input,{confirm:!0});if(!n.ok)throw new Error(n.error.message);if(n.generationWarning)throw new Error(n.generationWarning);await t(),await f(e.id)}async function f(e){const n=await fetch(`/__editor/generations/${encodeURIComponent(e)}/read`,{method:"POST"});a(n,"Mark generation read failed"),await t()}async function T(e){const n=await fetch(`/__editor/generations/${encodeURIComponent(e)}`,{method:"DELETE"});a(n,"Forget generation job failed"),await t()}function A(){t();const e=window.setInterval(()=>void t(),2e3);return()=>{window.clearInterval(e)}}export{b as a,p as b,S as c,v as d,h as e,T as f,J as g,A as h,_ as i,E as j,f as m,G as p,t as r,y as s};
@@ -1 +1 @@
1
- import{jn as K,jo as Q,fc as I,dN as O,h2 as E,jp as Y,jq as A,aN as X,a6 as g,h4 as Z,fo as H,jr as ee,js as te,jt as w,ju as ne,jv as re,jw as oe,jx as ae,jy as se,jz as ie,bv as le,aL as h,hV as ce,eB as P,hF as R,bQ as B,Z as de,a7 as _,gi as ue,jA as me,jB as pe,jC as ge,g$ as ve,jD as fe,b7 as he,jE as xe,f6 as je,ad as ye,f8 as Ne}from"./index-Crsbhlhy.js";import{a as t}from"./jsx-runtime-DPjLkJKQ.js";import{r as u}from"./index-nmcBqr7Y.js";import{m as Ce}from"./model-thumbnail-DFht0Zea.js";import"./index-CtzuWnCS.js";import{s as T,g as x,c as z,f as M,i as Ee,b as F,p as Se,r as J,d as ke,e as Te,m as $e,h as be,j as Ae,a as we}from"./generation-jobs-BXHZFlzo.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./renderer-ownership-BovSEcLv.js";import"./studio-environment-BLFX45T5.js";import"./user-data-BJje5VYV.js";import"./workspace-arrangement-BPsnvrOt.js";import"./KTX2Loader-CaqVE6nY.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";function j(e){switch(e.status){case"queued":return"queued";case"running":return"running";case"failed":return"failed";case"cancelled":return"cancelled";default:return e.acceptedAt?"ready":e.accept?e.pollError?"save-failed":"saving":"no-asset"}}function L(e){const n=j(e);return n!=="queued"&&n!=="running"&&n!=="saving"}function U(e,n){return e.status==="succeeded"&&!!e.accept&&!e.acceptedAt&&!!(e.pollError??n)}const $={queued:"Queued",running:"Running",saving:"Saving","save-failed":"Couldn't save",ready:"In project","no-asset":"No file",failed:"Failed",cancelled:"Cancelled"},Re=new Map([...["png","jpg","jpeg","webp","gif","avif","svg","bmp"].map(e=>[e,"image"]),...["mp4","webm","ogv","mov","m4v"].map(e=>[e,"video"]),...["mp3","wav","ogg","oga","m4a","flac","aac"].map(e=>[e,"audio"]),...["glb","gltf","fbx","obj","stl","ply","dae","3ds","usdz","spz"].map(e=>[e,"model"])]);function De(e){const n=e.slice(e.lastIndexOf("/")+1).toLowerCase(),r=n.lastIndexOf(".");return r>0?n.slice(r+1):""}function q(e){return(e.outputPaths??[]).map(n=>{const r=K.find(o=>n.startsWith(`${o}/`)),a=r?Q(r,n.slice(r.length+1)):null;return{path:n,name:n.slice(n.lastIndexOf("/")+1),kind:Re.get(De(n))??"file",url:a}})}function D(e,n){const r=e.trim();return r.length<=n?r:`${r.slice(0,n-1).trimEnd()}…`}function C(e){const n=Oe(e);if(n)return n;const r=q(e);if(r.length===0)return D(e.label,64);const a=r[0],o=Ie(a.path);return r.length>1?o?`${o} · ${r.length} files`:`${r.length} files`:Ge.test(a.name)?o?`${o}/${a.name}`:D(e.label,64):a.name}const Ge=/^(image|video|audio|model|panorama|output)(-\d+)?\./;function Ie(e){const n=e.split("/").slice(-2,-1)[0];return n?/^[0-9a-f]{8,}$/i.test(n)||/^[0-9a-f-]{16,}$/i.test(n)?null:n:null}function Oe(e){const n=e.accept?.input;if(!n||typeof n!="object")return null;const r=n.outputName;return typeof r=="string"&&r.trim().length>0?r.trim():null}function Pe(e){for(const n of[e.accept?.input,e.poll.input]){const r=W(n,0);if(r)return r}return null}function W(e,n){if(n>3||typeof e!="object"||e===null)return null;const r=e,a=r.prompt;if(typeof a=="string"&&a.trim().length>0)return a.trim();for(const o of Object.values(r)){const l=W(o,n+1);if(l)return l}return null}function G(e){return e.operation}function Be(e){return e.mode==="managed"?"Volter subscription":e.mode==="direct"?"Your provider key":"Mock"}function _e(e){return e.route==="mock"?"Free · mock":e.route==="managed"?e.settledCredits!==void 0?`${e.settledCredits} credits`:e.estimatedCredits!==void 0?`Up to ${e.estimatedCredits} credits`:"Credit estimate unavailable":e.settledAmount!==void 0?`$${e.settledAmount.toFixed(3)}`:e.estimatedAmount!==void 0?`Up to $${e.estimatedAmount.toFixed(3)}`:"USD estimate unavailable"}function ze(e){return e.route==="mock"?!0:e.route==="managed"?e.settledCredits!==void 0:e.settledAmount!==void 0}function Me(e){const n=Math.floor((Date.now()-Date.parse(e))/6e4);if(!Number.isFinite(n)||n<1)return"just now";if(n<60)return`${n}m ago`;const r=Math.floor(n/60);if(r<24)return`${r}h ago`;const a=Math.floor(r/24);return a<7?`${a}d ago`:`${Math.floor(a/7)}w ago`}const S="generation:",Fe="generation:create";function Je(e){return e.route==="mock"?"Free mock":e.route==="managed"?e.settledCredits!==void 0?`${e.settledCredits} credits settled`:e.estimatedCredits!==void 0?`Up to ${e.estimatedCredits} credits`:"Volter subscription · estimate unavailable":e.settledAmount!==void 0?`$${e.settledAmount.toFixed(3)} settled`:e.estimatedAmount!==void 0?`Up to $${e.estimatedAmount.toFixed(3)}`:"BYOK · estimate unavailable"}function V(e){return I({id:`${S}${e.id}`,title:e.label,kind:"generation",workspaceRole:"authored-subject",provenance:{origin:`${e.provider}:${e.externalId}`},Content:qe,closeable:!0,presentation:()=>({kind:"generation",id:e.id})})}function k(){return I({id:Fe,title:"Create Asset",kind:"generation",workspaceRole:"workspace-task",provenance:{origin:"registered generation tools"},Content:Le,closeable:!0,presentation:()=>({kind:"generation",id:"create"})})}function Le(){u.useSyncExternalStore(O,E),u.useSyncExternalStore(Y,A,A);const e=ee(),[n,r]=u.useState(""),a=n.trim().toLowerCase(),o=E().filter(i=>i.point==="workspace.document"&&i.tool?.generation?.role==="submit").filter(i=>a?[i.title,i.tool?.generation?.provider,i.tool?.summary,i.tool?.description].filter(Boolean).some(c=>String(c).toLowerCase().includes(a)):!0),l=new Map;for(const i of o){const c=i.tool?.generation?.provider??"other";l.set(c,[...l.get(c)??[],i])}return t.jsxs("div",{className:"volter-tool-page","data-testid":"generation-create-catalog",children:[t.jsxs("header",{className:"volter-tool-header",children:[t.jsx("div",{className:"volter-tool-eyebrow",children:"Installed provider extensions"}),t.jsx("h2",{className:"volter-tool-title",children:"Create an asset"}),t.jsxs("p",{className:"volter-tool-description",children:["Choose a native provider operation. Mock, managed, and BYOK execution remain explicit in the operation you open. Current default: ",e.preferredRoute,"."]})]}),t.jsx(X,{type:"search","aria-label":"Search generation tools",placeholder:"Search operations or providers…",value:n,onChange:i=>r(i.target.value)}),[...l.entries()].map(([i,c])=>t.jsxs("section",{className:"volter-tool-card",children:[t.jsx("h3",{className:"volter-tool-section-title",children:i}),t.jsx("div",{className:"volter-generation-create-grid",children:c.map(m=>t.jsxs(g,{variant:"ghost",className:"volter-generation-create-card",onClick:()=>Z(m.id),children:[t.jsx("strong",{children:m.title}),t.jsx("span",{children:m.tool?.summary})]},m.id))})]},i)),o.length===0&&t.jsx("div",{className:"volter-generation-document-empty",children:"No installed generation operation matches this search."})]})}function Ue({job:e,result:n,documentId:r,active:a}){u.useSyncExternalStore(O,E),u.useSyncExternalStore(te,w,w);const o=ne(e.poll.tool,e,n);if(!o)return t.jsx("pre",{className:"volter-generation-native-result",children:JSON.stringify(n,null,2)});const l=o.Component;return t.jsx(re,{file:o.file,children:t.jsx(l,{tool:o.tool,contributionId:o.id,client:ie(),surfaces:oe,account:se(),play:ae(),documentId:r,active:a,job:e,result:n})})}function qe({documentId:e,active:n}){const{jobs:r}=u.useSyncExternalStore(T,x,x),a=e.startsWith(S)?e.slice(S.length):e,o=r.find(d=>d.id===a),[l,i]=u.useState(),[c,m]=u.useState(!1),[s,p]=u.useState(null),[v,f]=u.useState(!1),y=async d=>{m(!0),p(null);try{i(await Ee(d))}catch(N){p(N instanceof Error?N.message:String(N))}finally{m(!1)}};if(u.useEffect(()=>{o&&y(o)},[o?.id,o?.status]),!o)return t.jsx("div",{className:"volter-generation-document-empty",children:"This generation is no longer in project activity."});const b=s??(j(o)==="save-failed"?`Could not save into the project: ${o.pollError}`:null);return t.jsxs("div",{className:"volter-generation-document","data-status":o.status,children:[t.jsxs("header",{className:"volter-generation-document-header",children:[t.jsxs("div",{children:[t.jsxs("div",{className:"volter-tool-eyebrow",children:[o.provider," · ",o.operation]}),t.jsx("h2",{className:"volter-tool-title",children:o.label}),t.jsxs("div",{className:"volter-generation-job-meta",children:[$[j(o)]," · ",Je(o.billing)]})]}),t.jsxs("div",{className:"volter-tool-actions",children:[t.jsx(g,{size:"compact",variant:"ghost",disabled:c,onClick:()=>void y(o),children:c?"Refreshing…":"Refresh"}),U(o,s)&&t.jsx(g,{size:"compact",variant:"primary",disabled:v,onClick:()=>{f(!0),p(null),z(o).catch(d=>p(d instanceof Error?d.message:String(d))).finally(()=>f(!1))},children:v?"Saving…":"Retry save"})]})]}),o.message&&t.jsx("div",{className:"volter-tool-status",children:o.message}),b&&t.jsx("div",{className:"volter-tool-status","data-tone":"error",role:"alert",children:b}),t.jsx("section",{className:"volter-generation-result","aria-label":"Generation result",children:l===void 0?t.jsx("div",{className:"volter-generation-document-empty",children:c?"Loading provider result…":"No provider result is available yet."}):t.jsx(Ue,{job:o,result:l,documentId:e,active:n})}),o.outputPaths&&o.outputPaths.length>0&&t.jsxs("section",{className:"volter-generation-output-paths",children:[t.jsx("strong",{children:"Project assets"}),o.outputPaths.map(d=>t.jsx("code",{children:d},d))]}),L(o)&&t.jsx("div",{className:"volter-generation-document-footer",children:t.jsx(g,{size:"compact",variant:"ghost",disabled:v,onClick:()=>{f(!0),M(o.id).then(()=>H(e)).catch(d=>p(d instanceof Error?d.message:String(d))).finally(()=>f(!1))},children:"Remove from activity"})})]})}function We({output:e,onOpen:n}){const r=e.url;if(r&&e.kind==="image"){const a=t.jsx("img",{className:"volter-generation-output-media",src:r,alt:e.name,loading:"lazy"});return n?t.jsx(g,{variant:"ghost",className:"volter-generation-output-open",onClick:n,"aria-label":`Open ${e.name}`,children:a}):a}return r&&e.kind==="video"?t.jsx("video",{className:"volter-generation-output-media",src:r,controls:!0,preload:"metadata",playsInline:!0,title:e.name}):r&&e.kind==="audio"?t.jsxs("div",{className:"volter-generation-output-audio",children:[t.jsx(me,{url:r,name:e.name}),t.jsx("audio",{src:r,controls:!0,preload:"metadata",title:e.name})]}):e.url&&e.kind==="model"&&Ce(e.url)?t.jsx(pe,{url:e.url}):t.jsxs("div",{className:"volter-generation-output-file",children:[t.jsx(_,{icon:e.kind==="model"?ge:ve}),t.jsx(h,{variant:"caption",tone:"muted",children:e.name}),n&&t.jsx(g,{size:"compact",variant:"ghost",onClick:n,children:"Open file"})]})}const Ve={queued:"loading",running:"loading",saving:"loading","save-failed":"error",ready:"success","no-asset":"neutral",failed:"error",cancelled:"neutral"},Ke={queued:e=>e.queuePosition===void 0?"Waiting for the provider to start.":`Position ${e.queuePosition} in the provider queue.`,running:e=>e.message??"The provider is working on it.",saving:()=>"Downloading the finished output into this project.","save-failed":e=>e.pollError??"The finished output could not be saved.",ready:()=>"Saved into this project.","no-asset":()=>"The operation finished without a file this project can hold.",failed:e=>e.message??"The provider reported a failure.",cancelled:()=>"This generation was cancelled."};function Qe({job:e,state:n}){const r=n==="queued"||n==="running"||n==="saving",a=n==="failed"||n==="save-failed";return t.jsxs("div",{className:"volter-generation-state-media","data-state":n,children:[t.jsx(P,{compact:!0,tone:Ve[n],...a?{icon:t.jsx(_,{icon:ue})}:{},title:$[n],description:Ke[n](e)}),r&&t.jsx("progress",{className:"volter-generation-progress","aria-label":`${e.label} progress`,...n==="running"&&e.progress!==void 0?{value:e.progress,max:1}:{}})]})}function Ye({job:e,busy:n,error:r,run:a}){return t.jsxs("div",{className:"volter-generation-card-actions",children:[U(e,r)&&t.jsx(g,{size:"compact",variant:"primary",disabled:n,onClick:()=>a(()=>z(e)),children:n?"Saving…":"Retry save"}),t.jsx(g,{size:"compact",variant:"ghost",onClick:()=>V(e),children:"Details"}),L(e)&&t.jsx(g,{size:"compact",variant:"ghost",disabled:n,onClick:()=>a(()=>M(e.id)),children:"Remove"})]})}function Xe({job:e,busy:n,error:r,run:a}){const o=j(e),l=q(e),i=Pe(e),c=Te(e),m=s=>{if(!s.url)return;const p=fe(he(s.name));if(p)return()=>xe(s.url,p)};return t.jsxs("article",{className:"volter-generation-card","data-state":o,"aria-busy":F(e),"aria-label":C(e),onClickCapture:()=>{c&&$e(e.id).catch(s=>{de.warn(`Could not mark generation as seen: ${s instanceof Error?s.message:String(s)}`,"generations")})},children:[t.jsx("div",{className:"volter-generation-card-media","data-outputs":Math.min(l.length,4),children:l.length===0?t.jsx(Qe,{job:e,state:o}):l.map(s=>t.jsx("div",{className:"volter-generation-output",title:s.path,children:t.jsx(We,{output:s,onOpen:m(s)})},s.path))}),t.jsxs("div",{className:"volter-generation-card-body",children:[t.jsxs("div",{className:"volter-generation-card-heading",children:[t.jsx(h,{variant:"label",truncate:!0,title:C(e),children:C(e)}),t.jsxs(R,{className:"volter-generation-chip","data-state":o,children:[$[o],o==="running"&&e.progress!==void 0?` · ${Math.round(e.progress*100)}%`:""]}),c&&t.jsx(R,{className:"volter-generation-chip","data-state":"new",children:"New"})]}),t.jsxs(h,{variant:"caption",tone:"muted",truncate:!0,title:G(e),children:[e.provider," · ",G(e)]}),t.jsxs(h,{variant:"caption",tone:"dim",children:[_e(e.billing),ze(e.billing)?"":" (est.)"," · ",Be(e)," ·"," ",Me(e.updatedAt)]}),i&&t.jsx("p",{className:"volter-generation-card-prompt",title:i,children:i}),(r??e.pollError)&&t.jsx(B,{tone:r||o==="save-failed"?"error":"warning",className:"volter-generation-card-alert",children:r??(o==="save-failed"?`Could not save into the project: ${e.pollError}`:`Polling will retry: ${e.pollError}`)}),t.jsx(Ye,{job:e,busy:n,error:r,run:a})]})]})}function Ze(){const{jobs:e}=u.useSyncExternalStore(T,x,x),[n,r]=u.useState(null),[a,o]=u.useState({}),l=e.filter(F).length,i=e.filter(s=>j(s)==="saving").length,c=async(s,p)=>{r(s),o(v=>{const f={...v};return delete f[s],f});try{await p()}catch(v){const f=v instanceof Error?v.message:String(v);o(y=>({...y,[s]:f}))}finally{r(null)}},m=ke();return t.jsxs("div",{className:"volter-generation-gallery",children:[t.jsxs(le,{label:"Generations",compact:!0,className:"volter-generation-gallery-bar",children:[t.jsx(h,{variant:"label",children:"Generations"}),t.jsxs(h,{variant:"caption",tone:"muted",children:[e.length," ",e.length===1?"generation":"generations",l>0?` · ${l} running`:"",i>0?` · ${i} saving`:""]}),t.jsx(ce,{}),t.jsx(g,{size:"compact",variant:"ghost",onClick:()=>void Se().then(J),children:"Refresh"}),t.jsx(g,{size:"compact",variant:"primary",onClick:()=>k(),children:"New asset"})]}),m&&t.jsx(B,{tone:"error",className:"volter-generation-gallery-alert",children:m}),e.length===0?t.jsx(P,{className:"volter-generation-gallery-empty",title:"No generated assets yet",description:"Preview generated images, video, audio and models here. Create an asset to get started.",action:t.jsx(g,{size:"compact",variant:"primary",onClick:()=>k(),children:"New asset"})}):t.jsx("section",{className:"volter-generation-grid","aria-label":"Generated assets",children:e.map(s=>t.jsx(Xe,{job:s,busy:n===s.id,error:a[s.id]??null,run:p=>void c(s.id,p)},s.id))})]})}const kt="workspace.service",He="generation";function et(){const e=we(x().jobs);return e>0?{count:e,severity:"info"}:null}function Tt(){const e=[be(),je({...ye.generations,order:15,Content:Ze,badge:et,subscribeBadge:T,badgeSnapshot:Ae,visibleByDefault:!1,closeable:!0}),Ne({id:He,owner:"@volter/editor-game/generation",open:(n,r)=>{if(r.id==="create")return k();const a=x().jobs.find(o=>o.id===r.id);return a?V(a):null},settle:J})];return()=>{for(const n of e)n()}}export{kt as point,Tt as start};
1
+ import{jn as K,jo as Q,fc as I,dN as O,h2 as E,jp as Y,jq as A,aN as X,a6 as g,h4 as Z,fo as H,jr as ee,js as te,jt as w,ju as ne,jv as re,jw as oe,jx as ae,jy as se,jz as ie,bv as le,aL as h,hV as ce,eB as P,hF as R,bQ as B,Z as de,a7 as _,gi as ue,jA as me,jB as pe,jC as ge,g$ as ve,jD as fe,b7 as he,jE as xe,f6 as je,ad as ye,f8 as Ne}from"./index-D8WZNJyr.js";import{a as t}from"./jsx-runtime-DPjLkJKQ.js";import{r as u}from"./index-nmcBqr7Y.js";import{m as Ce}from"./model-thumbnail-ji44cazv.js";import"./index-CtzuWnCS.js";import{s as T,g as x,c as z,f as M,i as Ee,b as F,p as Se,r as J,d as ke,e as Te,m as $e,h as be,j as Ae,a as we}from"./generation-jobs-DOejKlR8.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./renderer-ownership-BovSEcLv.js";import"./studio-environment-BIGsD0w9.js";import"./user-data-BEqwoJ6c.js";import"./workspace-arrangement-DSOBJt3d.js";import"./KTX2Loader-CaqVE6nY.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";function j(e){switch(e.status){case"queued":return"queued";case"running":return"running";case"failed":return"failed";case"cancelled":return"cancelled";default:return e.acceptedAt?"ready":e.accept?e.pollError?"save-failed":"saving":"no-asset"}}function L(e){const n=j(e);return n!=="queued"&&n!=="running"&&n!=="saving"}function U(e,n){return e.status==="succeeded"&&!!e.accept&&!e.acceptedAt&&!!(e.pollError??n)}const $={queued:"Queued",running:"Running",saving:"Saving","save-failed":"Couldn't save",ready:"In project","no-asset":"No file",failed:"Failed",cancelled:"Cancelled"},Re=new Map([...["png","jpg","jpeg","webp","gif","avif","svg","bmp"].map(e=>[e,"image"]),...["mp4","webm","ogv","mov","m4v"].map(e=>[e,"video"]),...["mp3","wav","ogg","oga","m4a","flac","aac"].map(e=>[e,"audio"]),...["glb","gltf","fbx","obj","stl","ply","dae","3ds","usdz","spz"].map(e=>[e,"model"])]);function De(e){const n=e.slice(e.lastIndexOf("/")+1).toLowerCase(),r=n.lastIndexOf(".");return r>0?n.slice(r+1):""}function q(e){return(e.outputPaths??[]).map(n=>{const r=K.find(o=>n.startsWith(`${o}/`)),a=r?Q(r,n.slice(r.length+1)):null;return{path:n,name:n.slice(n.lastIndexOf("/")+1),kind:Re.get(De(n))??"file",url:a}})}function D(e,n){const r=e.trim();return r.length<=n?r:`${r.slice(0,n-1).trimEnd()}…`}function C(e){const n=Oe(e);if(n)return n;const r=q(e);if(r.length===0)return D(e.label,64);const a=r[0],o=Ie(a.path);return r.length>1?o?`${o} · ${r.length} files`:`${r.length} files`:Ge.test(a.name)?o?`${o}/${a.name}`:D(e.label,64):a.name}const Ge=/^(image|video|audio|model|panorama|output)(-\d+)?\./;function Ie(e){const n=e.split("/").slice(-2,-1)[0];return n?/^[0-9a-f]{8,}$/i.test(n)||/^[0-9a-f-]{16,}$/i.test(n)?null:n:null}function Oe(e){const n=e.accept?.input;if(!n||typeof n!="object")return null;const r=n.outputName;return typeof r=="string"&&r.trim().length>0?r.trim():null}function Pe(e){for(const n of[e.accept?.input,e.poll.input]){const r=W(n,0);if(r)return r}return null}function W(e,n){if(n>3||typeof e!="object"||e===null)return null;const r=e,a=r.prompt;if(typeof a=="string"&&a.trim().length>0)return a.trim();for(const o of Object.values(r)){const l=W(o,n+1);if(l)return l}return null}function G(e){return e.operation}function Be(e){return e.mode==="managed"?"Volter subscription":e.mode==="direct"?"Your provider key":"Mock"}function _e(e){return e.route==="mock"?"Free · mock":e.route==="managed"?e.settledCredits!==void 0?`${e.settledCredits} credits`:e.estimatedCredits!==void 0?`Up to ${e.estimatedCredits} credits`:"Credit estimate unavailable":e.settledAmount!==void 0?`$${e.settledAmount.toFixed(3)}`:e.estimatedAmount!==void 0?`Up to $${e.estimatedAmount.toFixed(3)}`:"USD estimate unavailable"}function ze(e){return e.route==="mock"?!0:e.route==="managed"?e.settledCredits!==void 0:e.settledAmount!==void 0}function Me(e){const n=Math.floor((Date.now()-Date.parse(e))/6e4);if(!Number.isFinite(n)||n<1)return"just now";if(n<60)return`${n}m ago`;const r=Math.floor(n/60);if(r<24)return`${r}h ago`;const a=Math.floor(r/24);return a<7?`${a}d ago`:`${Math.floor(a/7)}w ago`}const S="generation:",Fe="generation:create";function Je(e){return e.route==="mock"?"Free mock":e.route==="managed"?e.settledCredits!==void 0?`${e.settledCredits} credits settled`:e.estimatedCredits!==void 0?`Up to ${e.estimatedCredits} credits`:"Volter subscription · estimate unavailable":e.settledAmount!==void 0?`$${e.settledAmount.toFixed(3)} settled`:e.estimatedAmount!==void 0?`Up to $${e.estimatedAmount.toFixed(3)}`:"BYOK · estimate unavailable"}function V(e){return I({id:`${S}${e.id}`,title:e.label,kind:"generation",workspaceRole:"authored-subject",provenance:{origin:`${e.provider}:${e.externalId}`},Content:qe,closeable:!0,presentation:()=>({kind:"generation",id:e.id})})}function k(){return I({id:Fe,title:"Create Asset",kind:"generation",workspaceRole:"workspace-task",provenance:{origin:"registered generation tools"},Content:Le,closeable:!0,presentation:()=>({kind:"generation",id:"create"})})}function Le(){u.useSyncExternalStore(O,E),u.useSyncExternalStore(Y,A,A);const e=ee(),[n,r]=u.useState(""),a=n.trim().toLowerCase(),o=E().filter(i=>i.point==="workspace.document"&&i.tool?.generation?.role==="submit").filter(i=>a?[i.title,i.tool?.generation?.provider,i.tool?.summary,i.tool?.description].filter(Boolean).some(c=>String(c).toLowerCase().includes(a)):!0),l=new Map;for(const i of o){const c=i.tool?.generation?.provider??"other";l.set(c,[...l.get(c)??[],i])}return t.jsxs("div",{className:"volter-tool-page","data-testid":"generation-create-catalog",children:[t.jsxs("header",{className:"volter-tool-header",children:[t.jsx("div",{className:"volter-tool-eyebrow",children:"Installed provider extensions"}),t.jsx("h2",{className:"volter-tool-title",children:"Create an asset"}),t.jsxs("p",{className:"volter-tool-description",children:["Choose a native provider operation. Mock, managed, and BYOK execution remain explicit in the operation you open. Current default: ",e.preferredRoute,"."]})]}),t.jsx(X,{type:"search","aria-label":"Search generation tools",placeholder:"Search operations or providers…",value:n,onChange:i=>r(i.target.value)}),[...l.entries()].map(([i,c])=>t.jsxs("section",{className:"volter-tool-card",children:[t.jsx("h3",{className:"volter-tool-section-title",children:i}),t.jsx("div",{className:"volter-generation-create-grid",children:c.map(m=>t.jsxs(g,{variant:"ghost",className:"volter-generation-create-card",onClick:()=>Z(m.id),children:[t.jsx("strong",{children:m.title}),t.jsx("span",{children:m.tool?.summary})]},m.id))})]},i)),o.length===0&&t.jsx("div",{className:"volter-generation-document-empty",children:"No installed generation operation matches this search."})]})}function Ue({job:e,result:n,documentId:r,active:a}){u.useSyncExternalStore(O,E),u.useSyncExternalStore(te,w,w);const o=ne(e.poll.tool,e,n);if(!o)return t.jsx("pre",{className:"volter-generation-native-result",children:JSON.stringify(n,null,2)});const l=o.Component;return t.jsx(re,{file:o.file,children:t.jsx(l,{tool:o.tool,contributionId:o.id,client:ie(),surfaces:oe,account:se(),play:ae(),documentId:r,active:a,job:e,result:n})})}function qe({documentId:e,active:n}){const{jobs:r}=u.useSyncExternalStore(T,x,x),a=e.startsWith(S)?e.slice(S.length):e,o=r.find(d=>d.id===a),[l,i]=u.useState(),[c,m]=u.useState(!1),[s,p]=u.useState(null),[v,f]=u.useState(!1),y=async d=>{m(!0),p(null);try{i(await Ee(d))}catch(N){p(N instanceof Error?N.message:String(N))}finally{m(!1)}};if(u.useEffect(()=>{o&&y(o)},[o?.id,o?.status]),!o)return t.jsx("div",{className:"volter-generation-document-empty",children:"This generation is no longer in project activity."});const b=s??(j(o)==="save-failed"?`Could not save into the project: ${o.pollError}`:null);return t.jsxs("div",{className:"volter-generation-document","data-status":o.status,children:[t.jsxs("header",{className:"volter-generation-document-header",children:[t.jsxs("div",{children:[t.jsxs("div",{className:"volter-tool-eyebrow",children:[o.provider," · ",o.operation]}),t.jsx("h2",{className:"volter-tool-title",children:o.label}),t.jsxs("div",{className:"volter-generation-job-meta",children:[$[j(o)]," · ",Je(o.billing)]})]}),t.jsxs("div",{className:"volter-tool-actions",children:[t.jsx(g,{size:"compact",variant:"ghost",disabled:c,onClick:()=>void y(o),children:c?"Refreshing…":"Refresh"}),U(o,s)&&t.jsx(g,{size:"compact",variant:"primary",disabled:v,onClick:()=>{f(!0),p(null),z(o).catch(d=>p(d instanceof Error?d.message:String(d))).finally(()=>f(!1))},children:v?"Saving…":"Retry save"})]})]}),o.message&&t.jsx("div",{className:"volter-tool-status",children:o.message}),b&&t.jsx("div",{className:"volter-tool-status","data-tone":"error",role:"alert",children:b}),t.jsx("section",{className:"volter-generation-result","aria-label":"Generation result",children:l===void 0?t.jsx("div",{className:"volter-generation-document-empty",children:c?"Loading provider result…":"No provider result is available yet."}):t.jsx(Ue,{job:o,result:l,documentId:e,active:n})}),o.outputPaths&&o.outputPaths.length>0&&t.jsxs("section",{className:"volter-generation-output-paths",children:[t.jsx("strong",{children:"Project assets"}),o.outputPaths.map(d=>t.jsx("code",{children:d},d))]}),L(o)&&t.jsx("div",{className:"volter-generation-document-footer",children:t.jsx(g,{size:"compact",variant:"ghost",disabled:v,onClick:()=>{f(!0),M(o.id).then(()=>H(e)).catch(d=>p(d instanceof Error?d.message:String(d))).finally(()=>f(!1))},children:"Remove from activity"})})]})}function We({output:e,onOpen:n}){const r=e.url;if(r&&e.kind==="image"){const a=t.jsx("img",{className:"volter-generation-output-media",src:r,alt:e.name,loading:"lazy"});return n?t.jsx(g,{variant:"ghost",className:"volter-generation-output-open",onClick:n,"aria-label":`Open ${e.name}`,children:a}):a}return r&&e.kind==="video"?t.jsx("video",{className:"volter-generation-output-media",src:r,controls:!0,preload:"metadata",playsInline:!0,title:e.name}):r&&e.kind==="audio"?t.jsxs("div",{className:"volter-generation-output-audio",children:[t.jsx(me,{url:r,name:e.name}),t.jsx("audio",{src:r,controls:!0,preload:"metadata",title:e.name})]}):e.url&&e.kind==="model"&&Ce(e.url)?t.jsx(pe,{url:e.url}):t.jsxs("div",{className:"volter-generation-output-file",children:[t.jsx(_,{icon:e.kind==="model"?ge:ve}),t.jsx(h,{variant:"caption",tone:"muted",children:e.name}),n&&t.jsx(g,{size:"compact",variant:"ghost",onClick:n,children:"Open file"})]})}const Ve={queued:"loading",running:"loading",saving:"loading","save-failed":"error",ready:"success","no-asset":"neutral",failed:"error",cancelled:"neutral"},Ke={queued:e=>e.queuePosition===void 0?"Waiting for the provider to start.":`Position ${e.queuePosition} in the provider queue.`,running:e=>e.message??"The provider is working on it.",saving:()=>"Downloading the finished output into this project.","save-failed":e=>e.pollError??"The finished output could not be saved.",ready:()=>"Saved into this project.","no-asset":()=>"The operation finished without a file this project can hold.",failed:e=>e.message??"The provider reported a failure.",cancelled:()=>"This generation was cancelled."};function Qe({job:e,state:n}){const r=n==="queued"||n==="running"||n==="saving",a=n==="failed"||n==="save-failed";return t.jsxs("div",{className:"volter-generation-state-media","data-state":n,children:[t.jsx(P,{compact:!0,tone:Ve[n],...a?{icon:t.jsx(_,{icon:ue})}:{},title:$[n],description:Ke[n](e)}),r&&t.jsx("progress",{className:"volter-generation-progress","aria-label":`${e.label} progress`,...n==="running"&&e.progress!==void 0?{value:e.progress,max:1}:{}})]})}function Ye({job:e,busy:n,error:r,run:a}){return t.jsxs("div",{className:"volter-generation-card-actions",children:[U(e,r)&&t.jsx(g,{size:"compact",variant:"primary",disabled:n,onClick:()=>a(()=>z(e)),children:n?"Saving…":"Retry save"}),t.jsx(g,{size:"compact",variant:"ghost",onClick:()=>V(e),children:"Details"}),L(e)&&t.jsx(g,{size:"compact",variant:"ghost",disabled:n,onClick:()=>a(()=>M(e.id)),children:"Remove"})]})}function Xe({job:e,busy:n,error:r,run:a}){const o=j(e),l=q(e),i=Pe(e),c=Te(e),m=s=>{if(!s.url)return;const p=fe(he(s.name));if(p)return()=>xe(s.url,p)};return t.jsxs("article",{className:"volter-generation-card","data-state":o,"aria-busy":F(e),"aria-label":C(e),onClickCapture:()=>{c&&$e(e.id).catch(s=>{de.warn(`Could not mark generation as seen: ${s instanceof Error?s.message:String(s)}`,"generations")})},children:[t.jsx("div",{className:"volter-generation-card-media","data-outputs":Math.min(l.length,4),children:l.length===0?t.jsx(Qe,{job:e,state:o}):l.map(s=>t.jsx("div",{className:"volter-generation-output",title:s.path,children:t.jsx(We,{output:s,onOpen:m(s)})},s.path))}),t.jsxs("div",{className:"volter-generation-card-body",children:[t.jsxs("div",{className:"volter-generation-card-heading",children:[t.jsx(h,{variant:"label",truncate:!0,title:C(e),children:C(e)}),t.jsxs(R,{className:"volter-generation-chip","data-state":o,children:[$[o],o==="running"&&e.progress!==void 0?` · ${Math.round(e.progress*100)}%`:""]}),c&&t.jsx(R,{className:"volter-generation-chip","data-state":"new",children:"New"})]}),t.jsxs(h,{variant:"caption",tone:"muted",truncate:!0,title:G(e),children:[e.provider," · ",G(e)]}),t.jsxs(h,{variant:"caption",tone:"dim",children:[_e(e.billing),ze(e.billing)?"":" (est.)"," · ",Be(e)," ·"," ",Me(e.updatedAt)]}),i&&t.jsx("p",{className:"volter-generation-card-prompt",title:i,children:i}),(r??e.pollError)&&t.jsx(B,{tone:r||o==="save-failed"?"error":"warning",className:"volter-generation-card-alert",children:r??(o==="save-failed"?`Could not save into the project: ${e.pollError}`:`Polling will retry: ${e.pollError}`)}),t.jsx(Ye,{job:e,busy:n,error:r,run:a})]})]})}function Ze(){const{jobs:e}=u.useSyncExternalStore(T,x,x),[n,r]=u.useState(null),[a,o]=u.useState({}),l=e.filter(F).length,i=e.filter(s=>j(s)==="saving").length,c=async(s,p)=>{r(s),o(v=>{const f={...v};return delete f[s],f});try{await p()}catch(v){const f=v instanceof Error?v.message:String(v);o(y=>({...y,[s]:f}))}finally{r(null)}},m=ke();return t.jsxs("div",{className:"volter-generation-gallery",children:[t.jsxs(le,{label:"Generations",compact:!0,className:"volter-generation-gallery-bar",children:[t.jsx(h,{variant:"label",children:"Generations"}),t.jsxs(h,{variant:"caption",tone:"muted",children:[e.length," ",e.length===1?"generation":"generations",l>0?` · ${l} running`:"",i>0?` · ${i} saving`:""]}),t.jsx(ce,{}),t.jsx(g,{size:"compact",variant:"ghost",onClick:()=>void Se().then(J),children:"Refresh"}),t.jsx(g,{size:"compact",variant:"primary",onClick:()=>k(),children:"New asset"})]}),m&&t.jsx(B,{tone:"error",className:"volter-generation-gallery-alert",children:m}),e.length===0?t.jsx(P,{className:"volter-generation-gallery-empty",title:"No generated assets yet",description:"Preview generated images, video, audio and models here. Create an asset to get started.",action:t.jsx(g,{size:"compact",variant:"primary",onClick:()=>k(),children:"New asset"})}):t.jsx("section",{className:"volter-generation-grid","aria-label":"Generated assets",children:e.map(s=>t.jsx(Xe,{job:s,busy:n===s.id,error:a[s.id]??null,run:p=>void c(s.id,p)},s.id))})]})}const kt="workspace.service",He="generation";function et(){const e=we(x().jobs);return e>0?{count:e,severity:"info"}:null}function Tt(){const e=[be(),je({...ye.generations,order:15,Content:Ze,badge:et,subscribeBadge:T,badgeSnapshot:Ae,visibleByDefault:!1,closeable:!0}),Ne({id:He,owner:"@volter/editor-game/generation",open:(n,r)=>{if(r.id==="create")return k();const a=x().jobs.find(o=>o.id===r.id);return a?V(a):null},settle:J})];return()=>{for(const n of e)n()}}export{kt as point,Tt as start};
@@ -1 +1 @@
1
- import{dZ as p,u as o,x as n,c6 as e,v as l,w as t,c4 as d,e1 as c}from"./index-Crsbhlhy.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const u=d(["queued","running","succeeded","failed","cancelled"]),g=p("route",[o({route:n("mock")}).strict(),o({route:n("managed"),estimatedCredits:e().nonnegative().optional(),settledCredits:e().nonnegative().optional()}).strict(),o({route:n("byok"),currency:n("USD"),estimatedAmount:e().nonnegative().optional(),settledAmount:e().nonnegative().optional()}).strict()]),r=o({tool:t().min(1),input:c()}).strict(),v=o({id:t().min(1),provider:t().min(1),externalId:t().min(1),label:t().min(1),operation:t().min(1),mode:d(["mock","direct","managed"]),status:u,createdAt:t().datetime(),updatedAt:t().datetime(),progress:e().min(0).max(1).optional(),providerStatus:t().optional(),queuePosition:e().int().nonnegative().optional(),message:t().optional(),lastPolledAt:t().datetime().optional(),lastProviderChangeAt:t().datetime().optional(),pollError:t().optional(),pollErrorAt:t().datetime().optional(),pollFailureCount:e().int().nonnegative().optional(),nextPollAt:t().datetime().optional(),billing:g,poll:r,cancel:r.optional(),accept:r.optional(),acceptedAt:t().datetime().optional(),readAt:t().datetime().optional(),provenanceOperationId:t().optional(),outputPaths:l(t()).optional()}).strict(),k=o({version:n(1),jobs:l(v)}).strict();function y(m,s){if(m!=="managed")return{};const{estimatedCredits:i,settledCredits:a}=s;return i===void 0&&a===void 0?{}:{billing:{route:"managed",...i===void 0?{}:{estimatedCredits:i},...a===void 0?{}:{settledCredits:a}}}}export{g as GenerationBillingSchema,v as GenerationJobSchema,u as GenerationJobStatusSchema,k as GenerationJobsDocumentSchema,y as managedBilling};
1
+ import{dZ as p,u as o,x as n,c6 as e,v as l,w as t,c4 as d,e1 as c}from"./index-D8WZNJyr.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const u=d(["queued","running","succeeded","failed","cancelled"]),g=p("route",[o({route:n("mock")}).strict(),o({route:n("managed"),estimatedCredits:e().nonnegative().optional(),settledCredits:e().nonnegative().optional()}).strict(),o({route:n("byok"),currency:n("USD"),estimatedAmount:e().nonnegative().optional(),settledAmount:e().nonnegative().optional()}).strict()]),r=o({tool:t().min(1),input:c()}).strict(),v=o({id:t().min(1),provider:t().min(1),externalId:t().min(1),label:t().min(1),operation:t().min(1),mode:d(["mock","direct","managed"]),status:u,createdAt:t().datetime(),updatedAt:t().datetime(),progress:e().min(0).max(1).optional(),providerStatus:t().optional(),queuePosition:e().int().nonnegative().optional(),message:t().optional(),lastPolledAt:t().datetime().optional(),lastProviderChangeAt:t().datetime().optional(),pollError:t().optional(),pollErrorAt:t().datetime().optional(),pollFailureCount:e().int().nonnegative().optional(),nextPollAt:t().datetime().optional(),billing:g,poll:r,cancel:r.optional(),accept:r.optional(),acceptedAt:t().datetime().optional(),readAt:t().datetime().optional(),provenanceOperationId:t().optional(),outputPaths:l(t()).optional()}).strict(),k=o({version:n(1),jobs:l(v)}).strict();function y(m,s){if(m!=="managed")return{};const{estimatedCredits:i,settledCredits:a}=s;return i===void 0&&a===void 0?{}:{billing:{route:"managed",...i===void 0?{}:{estimatedCredits:i},...a===void 0?{}:{settledCredits:a}}}}export{g as GenerationBillingSchema,v as GenerationJobSchema,u as GenerationJobStatusSchema,k as GenerationJobsDocumentSchema,y as managedBilling};
@@ -1 +1 @@
1
- import{a as s}from"./jsx-runtime-DPjLkJKQ.js";import{a6 as r,r as a,ad as i}from"./index-Crsbhlhy.js";import{r as u}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{s as c,g as o,a as p,b as m}from"./generation-jobs-BXHZFlzo.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";const I="workspace.status",$="Generations",C="left",T=24;function U(){const{jobs:e}=u.useSyncExternalStore(c,o,o),n=p(e),t=e.filter(m).length;return s.jsxs(r,{type:"button",variant:"ghost",size:"compact",className:"volter-status-action","data-testid":"status-generations","aria-label":`Generations, ${n} unseen, ${t} running`,title:`${n} unseen generation results, ${t} running — open Generations`,onClick:()=>a().workspace.showUtility(i.generations.id),children:["Generations · ",n,t>0?` · ${t} running`:""]})}export{C as align,U as default,T as order,I as point,$ as title};
1
+ import{a as s}from"./jsx-runtime-DPjLkJKQ.js";import{a6 as r,r as a,ad as i}from"./index-D8WZNJyr.js";import{r as u}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{s as c,g as o,a as p,b as m}from"./generation-jobs-DOejKlR8.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";const I="workspace.status",$="Generations",C="left",T=24;function U(){const{jobs:e}=u.useSyncExternalStore(c,o,o),n=p(e),t=e.filter(m).length;return s.jsxs(r,{type:"button",variant:"ghost",size:"compact",className:"volter-status-action","data-testid":"status-generations","aria-label":`Generations, ${n} unseen, ${t} running`,title:`${n} unseen generation results, ${t} running — open Generations`,onClick:()=>a().workspace.showUtility(i.generations.id),children:["Generations · ",n,t>0?` · ${t} running`:""]})}export{C as align,U as default,T as order,I as point,$ as title};
@@ -1 +1 @@
1
- import{g as n}from"./workspace-arrangement-BPsnvrOt.js";function r(t){const o=n(t,"volterComponentRoot");return typeof o=="string"&&o?o:void 0}function i(t){return n(t,"volterBuiltInternal")===!0}export{r as c,i};
1
+ import{g as n}from"./workspace-arrangement-DSOBJt3d.js";function r(t){const o=n(t,"volterComponentRoot");return typeof o=="string"&&o?o:void 0}function i(t){return n(t,"volterBuiltInternal")===!0}export{r as c,i};
@@ -1,2 +1,2 @@
1
- import{kE as E,w as l,u as y,kF as P,v as b,b3 as T}from"./index-Crsbhlhy.js";import{i as x}from"./relative-path-guard-GiM7Lsz8.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const d=".volter/assets.json",k=y({key:l().min(1),license:l().min(1).optional(),sourceHash:l().regex(/^sha256-[a-f0-9]{64}$/,'sourceHash must be "sha256-<64 hex>"').optional(),materializedAt:l().datetime()}).strict(),O=E(l().min(1),k);function z(e){if(!/^[a-f0-9]{64}$/.test(e))throw new Error(`Not a sha256 digest, refusing to record it as a sourceHash: ${e}`);return`sha256-${e}`}function m(e){const t=e.replaceAll("\\","/").replace(/^\.\//,"").replace(/^\/+/,"");if(!t)throw new Error("An asset ledger path cannot be empty.");if(!x(t))throw new Error(`An asset ledger path cannot escape the project: ${e}`);return t}function _(e){return O.parse(e)}function D(e){if(e==null||e.trim()==="")return{};let t;try{t=JSON.parse(e)}catch(s){throw new Error(`${d} is not valid JSON: ${String(s)}`)}return _(t)}function I(e,t,s){const r=m(t),n=k.parse(s),a={...e,[r]:n},i={};for(const u of Object.keys(a).sort())i[u]=a[u];return i}function M(e){const t={};for(const s of Object.keys(e).sort())t[s]=e[s];return`${JSON.stringify(t,null,2)}
1
+ import{kE as E,w as l,u as y,kF as P,v as b,b3 as T}from"./index-D8WZNJyr.js";import{i as x}from"./relative-path-guard-GiM7Lsz8.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const d=".volter/assets.json",k=y({key:l().min(1),license:l().min(1).optional(),sourceHash:l().regex(/^sha256-[a-f0-9]{64}$/,'sourceHash must be "sha256-<64 hex>"').optional(),materializedAt:l().datetime()}).strict(),O=E(l().min(1),k);function z(e){if(!/^[a-f0-9]{64}$/.test(e))throw new Error(`Not a sha256 digest, refusing to record it as a sourceHash: ${e}`);return`sha256-${e}`}function m(e){const t=e.replaceAll("\\","/").replace(/^\.\//,"").replace(/^\/+/,"");if(!t)throw new Error("An asset ledger path cannot be empty.");if(!x(t))throw new Error(`An asset ledger path cannot escape the project: ${e}`);return t}function _(e){return O.parse(e)}function D(e){if(e==null||e.trim()==="")return{};let t;try{t=JSON.parse(e)}catch(s){throw new Error(`${d} is not valid JSON: ${String(s)}`)}return _(t)}function I(e,t,s){const r=m(t),n=k.parse(s),a={...e,[r]:n},i={};for(const u of Object.keys(a).sort())i[u]=a[u];return i}function M(e){const t={};for(const s of Object.keys(e).sort())t[s]=e[s];return`${JSON.stringify(t,null,2)}
2
2
  `}function U(e,t,s){const r=globalThis.navigator?.locks;return r?r.request(`volter:${e}:${P(t)}`,s):s()}const H=1e4,N=15;function j(){return globalThis.crypto?.randomUUID?.()??`${Date.now()}-${Math.random()}`}async function R(e,t,s={}){const r=s.staleAfterMs??H,n=s.retryDelayMs??N,a=s.now??Date.now,i=s.sleep??(o=>new Promise(c=>setTimeout(c,o))),u=s.token??j;for(;;){const o=JSON.stringify({at:a(),owner:s.owner??"unknown",token:u()});if(await e.createIfAbsent(o))try{return await t()}finally{await e.removeIfHeldBy(o)}const c=await e.read();if(c!==null){if(a()-B(c)>r){await e.removeIfHeldBy(c);continue}await i(n)}}}function B(e){try{const t=JSON.parse(e);return typeof t.at=="number"?t.at:0}catch{return 0}}function F(){const e=new Map;return(t,s)=>{const n=(e.get(t)??Promise.resolve()).then(s,s),a=n.then(()=>{},()=>{});return e.set(t,a),a.then(()=>{e.get(t)===a&&e.delete(t)}),n}}async function S(e){return await e.exists(d)?D(await e.read(d)):{}}async function J(e,t){await e.write(d,M(t))}const f=`${d}.lock`,C=F(),A=new WeakMap;let $=0;function K(e){const t=A.get(e);if(t!==void 0)return t;$+=1;const s=`${e.id}#${$}`;return A.set(e,s),s}async function W(e,t){const s={key:t.key,...t.license?{license:t.license}:{},...t.sourceSha256?{sourceHash:z(t.sourceSha256)}:{},materializedAt:t.materializedAt??new Date().toISOString()};await C(K(e),()=>R({createIfAbsent:r=>e.writeIfAbsent(f,r),read:async()=>await e.exists(f)?e.read(f):null,removeIfHeldBy:r=>U(e.id,f,async()=>{await e.exists(f)&&await e.read(f)===r&&await e.remove(f)})},async()=>{const r=await S(e);await J(e,I(r,m(t.destPath),s))},{owner:e.id}))}const G=y({key:l().regex(/^[^:]+:.+$/,'An asset key must be "source:id"'),dest:l().min(1),sha256:l().regex(/^[a-f0-9]{64}$/,"A pack entry must pin the sha256 of its bytes as 64 lowercase hex digits")}).strict(),Y=y({packs:E(l().min(1),b(G))}).strict();function q(e){return Y.parse(e)}function V(e){const t=[],s=new Map;for(const[r,n]of Object.entries(e.packs))for(const a of n){const i=s.get(a.dest);if(i!==void 0)throw new Error(`Two packs declare the same destination "${a.dest}": "${i}" and "${r}".`);s.set(a.dest,r),t.push({...a,pack:r})}return t}const w="asset-manifest.json",v="https://volter-asset-library.aaron-0ed.workers.dev";function L(e){return(e.baseUrl??v).replace(/\/+$/,"")}function Q(e){return e.signal?{signal:e.signal}:{}}async function X(e,t={}){const s=L(t),r=await fetch(`${s}/v1/assets/${encodeURIComponent(e)}`,Q(t));if(!r.ok)return null;const n=await r.json();return!n||typeof n!="object"||!Array.isArray(n.files)?null:n}function Z(e,t,s,r){return`${L(e?{baseUrl:e}:{})}/v1/assets/${encodeURIComponent(t)}/files/${s}`}async function he(e,t={}){const s=await ee(e),r={declared:s.length,materialized:[],alreadyPresent:[],failed:[]};if(s.length===0)return r;const n=await S(e);for(const a of s){if(t.signal?.aborted)break;if(n[m(a.dest)]&&await e.exists(a.dest)){r.alreadyPresent.push(a),t.onProgress?.(a,"already-present");continue}try{await te(e,a,t),r.materialized.push(a),t.onProgress?.(a,"materialized")}catch(i){r.failed.push({entry:a,reason:i instanceof Error?i.message:String(i)}),t.onProgress?.(a,"failed")}}return r}async function ee(e){if(!await e.exists(w))return[];const t=await e.read(w);let s;try{s=JSON.parse(t)}catch(r){throw new Error(`${w} is not valid JSON: ${r instanceof Error?r.message:String(r)}`)}return V(q(s))}async function te(e,t,s){const r=await se(t,s);await e.write(t.dest,r.bytes),await W(e,{destPath:t.dest,key:t.key,license:r.license,sourceSha256:t.sha256})}async function se(e,t={}){const s=e.key.indexOf(":");if(s<0)throw new Error(`Malformed asset key "${e.key}" (expected "source:id").`);const r=e.key.slice(0,s),n=e.key.slice(s+1);if(r!=="local")throw new Error(`Asset key "${e.key}": only the "local" (cloud-hosted) source can be materialized from the cloud worker.`);const a=t.baseUrl??v,i=t.signal?{baseUrl:a,signal:t.signal}:{baseUrl:a},u=await X(n,i);if(!u)throw new Error(`"${e.key}" is not hosted by the cloud asset library.`);const o=u.files[0];if(!o)throw new Error(`"${e.key}" has no files in the cloud library.`);if(o.dependencies.length>0)throw new Error(`"${e.key}" has ${o.dependencies.length} dependency file(s) — a pack entry names exactly one destination file.`);if(o.main.sha256!==e.sha256)throw new Error(`"${e.key}" → ${e.dest}: the cloud library reports sha256:${o.main.sha256} but ${w} pins sha256:${e.sha256}. Nothing was fetched or written; the pin is only re-cut by a reviewed change to the declaration.`);const c=Z(a,n,0),h=await fetch(c,t.signal?{signal:t.signal}:{});if(!h.ok)throw new Error(`${c} returned ${h.status} ${h.statusText}.`);const p=new Uint8Array(await h.arrayBuffer()),g=await T(p);if(g!==e.sha256)throw new Error(`"${e.key}" → ${e.dest}: ${c} delivered sha256:${g} but the declaration pins sha256:${e.sha256}. Nothing was written.`);return{bytes:p,license:u.license}}export{w as ASSET_MANIFEST_PATH,se as fetchVerifiedPackEntry,he as materializeDeclaredAssetPacks};
@@ -1 +1 @@
1
- import{bA as nt,aN as st,al as ot,e4 as E,dV as U,a6 as at,e6 as rt,e5 as it}from"./index-Crsbhlhy.js";import{hp as wt,hq as Rt,hr as Nt,aS as _t,dX as Ct,hs as Ft,ht as Ot,hu as kt,hv as Lt,hw as jt,hx as Bt,hy as Gt,eJ as Pt,hz as Ht,e_ as $t,hA as zt,hB as Wt,hC as Vt,hD as Kt,hE as Jt,dz as Ut,hF as qt,bQ as Yt,a7 as Qt,eq as Xt,bP as Zt,h1 as te,hG as ee,hH as ne,bv as se,hI as oe,hJ as ae,hK as re,eY as ie,fe as ce,hL as ue,ff as le,hM as de,d9 as pe,hN as fe,aM as he,df as me,hO as xe,hP as Ee,hQ as ge,dg as Se,f1 as Te,fz as be,bB as De,bC as Me,fN as ye,hR as Ae,hS as Ie,aT as ve,hT as we,hU as Re,aU as Ne,bH as _e,hV as Ce,db as Fe,de as Oe,eB as ke,hW as Le,hX as je,aL as Be,e$ as Ge,hY as Pe,hZ as He,gK as $e,h_ as ze,bw as We,h$ as Ve,i0 as Ke,es as Je,i1 as Ue,i2 as qe,i3 as Ye,i4 as Qe,i5 as Xe,eo as Ze,ep as tn,i6 as en,i7 as nn,i8 as sn,i9 as on,ev as an,ia as rn,ib as cn,ic as un,id as ln,ie as dn,a8 as pn,ig as fn,ih as hn,ii as mn,ij as xn,ik as En,il as gn,ew as Sn,im as Tn,io as bn,et as Dn,ip as Mn,iq as yn,ir as An,dA as In,is as vn,it as wn,iu as Rn,iv as Nn,iw as _n,ix as Cn,iy as Fn,eW as On,iz as kn,iA as Ln,iB as jn,iC as Bn,iD as Gn,iE as Pn,ex as Hn,iF as $n,iG as zn,iH as Wn,f0 as Vn,iI as Kn,iJ as Jn,iK as Un,iL as qn,dq as Yn,er as Qn,iM as Xn,iN as Zn,iO as ts,eu as es,iP as ns,aZ as ss,dW as os,iQ as as,iR as rs,iS as is,dp as cs}from"./index-Crsbhlhy.js";import{C as ls}from"./ColorInput-CZ9YSe5b.js";import{a as p}from"./jsx-runtime-DPjLkJKQ.js";import{r as b}from"./index-nmcBqr7Y.js";import{A as ps,k as fs,B as hs,a as ms,D as xs,l as Es,F as gs,h as Ss,G as Ts,m as bs,Q as Ds,S as Ms,f as ys,n as As,T as Is,d as vs,c as ws,g as Rs,i as Ns,j as _s,b as Cs,p as Fs,e as Os,u as ks,o as Ls}from"./ShadowEditor-DgBjRx-V.js";import{a as Bs,C as Gs,h as Ps,p as Hs,t as $s}from"./ColorPicker-DytPZaFB.js";import"./index-CtzuWnCS.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";function Dt({preview:t,children:e,...r}){const[o,a]=b.useState(!1),l=b.useRef(null),c=b.useId(),s=()=>a(!1),d=i=>{l.current=i,a(!0)};let m=e;if(b.isValidElement(e)){const i=[e.props["aria-describedby"],o?c:null].filter(Boolean).join(" ");m=b.cloneElement(e,i?{"aria-describedby":i}:{})}return p.jsxs("span",{className:"volter-tooltip-anchor",onMouseEnter:i=>d(i.currentTarget),onMouseLeave:s,onFocusCapture:i=>d(i.currentTarget),onBlurCapture:i=>{i.currentTarget.contains(i.relatedTarget)||s()},onKeyDown:i=>{i.key!=="Escape"||!o||(i.preventDefault(),i.stopPropagation(),s())},children:[m,o&&l.current&&p.jsx(nt,{...r,anchorRef:l,id:c,role:"tooltip",autoFocusFirst:!1,onDismiss:s,children:t})]})}function Mt({value:t,onCommit:e,style:r,disabled:o=!1}){const a=t===void 0?"":JSON.stringify(t),[l,c]=b.useState(a),[s,d]=b.useState(!1),m=b.useRef(!1);b.useEffect(()=>{c(a),d(!1)},[a]);const i=()=>{if(m.current){m.current=!1;return}if(l===a){d(!1);return}let h;try{h=JSON.parse(l)}catch{d(!0);return}d(!1),e(h)};return p.jsxs("div",{children:[p.jsx(st,{"data-testid":"json-input","aria-invalid":s||void 0,"data-tone":s?"danger":void 0,disabled:o,value:l,onChange:h=>{c(h.target.value),s&&d(!1)},onBlur:i,onKeyDown:h=>{h.key==="Enter"?i():h.key==="Escape"&&(m.current=!0,c(a),d(!1),h.target.blur())},style:r,title:s?"Not valid JSON — nothing written. Fix the JSON or press Escape to revert.":void 0}),s&&p.jsx("div",{"data-testid":"json-input-error",style:{fontSize:"var(--volter-font-sm)",color:ot.semantic.danger,marginTop:2},children:"Not valid JSON — nothing written. Fix the JSON or press Escape to revert."})]})}function v(t,e){return e+1<t.length?t[e+1].start:1}function ct(t){const e=t.map(o=>({time:o.start,value:o.function.p0})),r=t[t.length-1];return r&&e.push({time:1,value:r.function.p3}),e}function G(t){return t.map(e=>({start:e.start,function:{...e.function}}))}const B=.01;function C(t,e,r,o){const a=G(t),l=a.length;if(e<0||e>l)return a;if(e<l){const c=a[e],s=o-c.function.p0;if(c.function.p0=o,c.function.p1+=s,e>0){const d=a[e-1],m=o-d.function.p3;d.function.p3=o,d.function.p2+=m;const i=d.start+B,h=v(a,e)-B;c.start=Math.min(h,Math.max(i,r))}}else{const c=a[l-1],s=o-c.function.p3;c.function.p3=o,c.function.p2+=s}return a}function q(t,e,r,o){const a=G(t);return r==="out"&&e<a.length?a[e].function.p1=o:r==="in"&&e>0&&e<=a.length&&(a[e-1].function.p2=o),a}function M(t,e,r){return t+(e-t)*r}function yt(t,e){for(let r=0;r<t.length;r++){const o=t[r].start,a=v(t,r);if(e>=o&&e<=a){const l=a>o?(e-o)/(a-o):0,{p0:c,p1:s,p2:d,p3:m}=t[r].function,i=M(c,s,l),h=M(s,d,l),g=M(d,m,l),A=M(i,h,l),I=M(h,g,l);return M(A,I,l)}}return 0}function ut(t,e){for(let r=0;r<t.length;r++){const o=t[r].start,a=v(t,r);if(e<=o+B||e>=a-B||e<o||e>a)continue;const l=(e-o)/(a-o),{p0:c,p1:s,p2:d,p3:m}=t[r].function,i=M(c,s,l),h=M(s,d,l),g=M(d,m,l),A=M(i,h,l),I=M(h,g,l),D=M(A,I,l),S=G(t);return S.splice(r,1,{start:o,function:{p0:c,p1:i,p2:A,p3:D}},{start:e,function:{p0:D,p1:I,p2:g,p3:m}}),S}return t}function Y(t,e){if(e<=0||e>=t.length)return t;const r=t[e-1],o=t[e],a=o.start-r.start,l=v(t,e)-o.start,c=a+l;if(c<=0)return t;const s=r.function,d=o.function,m={start:r.start,function:{p0:s.p0,p1:s.p0+(s.p1-s.p0)*(a>0?c/a:1),p2:d.p3+(d.p2-d.p3)*(l>0?c/l:1),p3:d.p3}},i=G(t);return i.splice(e-1,2,m),i}function lt(t){let e=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(const o of t)for(const a of[o.function.p0,o.function.p1,o.function.p2,o.function.p3])a<e&&(e=a),a>r&&(r=a);return!Number.isFinite(e)||!Number.isFinite(r)?{min:0,max:1}:{min:e,max:r}}const F=34,Q=6,V=6,dt=14,j=260;function pt(t){return Math.abs(t)>=100?t.toFixed(0):Math.abs(t)>=1?String(Math.round(t*100)/100):String(Math.round(t*1e3)/1e3)}function At({value:t,onChange:e,onChangeEnd:r,disabled:o,height:a=90,color:l,testId:c="curve-editor"}){const[s,d]=b.useState(0),m=b.useRef(null),i=b.useRef(null),h=b.useMemo(()=>ct(t),[t]),g=b.useMemo(()=>{const{min:n,max:u}=lt(t);if(u-n<1e-6)return{min:n-1,max:u+1};const f=(u-n)*.1;return{min:n-f,max:u+f}},[t]),A=j-F-Q,I=a-V-dt,D=n=>F+n*A,S=n=>V+(1-(n-g.min)/(g.max-g.min))*I,X=n=>Math.max(0,Math.min(1,(n-F)/A)),Z=n=>g.min+(1-(n-V)/I)*(g.max-g.min),P=n=>{const u=m.current?.getBoundingClientRect();if(!u)return{t:0,v:0};const f=(n.clientX-u.left)/u.width*j,T=(n.clientY-u.top)/u.height*a;return{t:X(f),v:Z(T)}},tt=b.useMemo(()=>{if(t.length===0)return"";let n=`M ${D(t[0].start)} ${S(t[0].function.p0)}`;for(let u=0;u<t.length;u++){const f=t[u],T=v(t,u),y=T-f.start;n+=` C ${D(f.start+y/3)} ${S(f.function.p1)}, ${D(f.start+2*y/3)} ${S(f.function.p2)}, ${D(T)} ${S(f.function.p3)}`}return n},[t,g,a]),w=n=>rt({onChange:e,onChangeEnd:r},n),H=n=>it({onChange:e},n),$=(n,u)=>{if(o)return;n.preventDefault(),n.stopPropagation(),i.current=t;const f=y=>{const{t:_,v:W}=P(y),L=u(i.current??t,_,W);i.current=L,H(L)},T=y=>{const{t:_,v:W}=P(y),L=u(i.current??t,_,W);i.current=null,w(L),window.removeEventListener("pointermove",f),window.removeEventListener("pointerup",T)};window.addEventListener("pointermove",f),window.addEventListener("pointerup",T)},K=l??E.accent,J=t.length,x=h[s],z=s>0&&s<J,O=s<J?t[s]:void 0,k=s>0?t[s-1]:void 0,R=O?{x:D(O.start+(v(t,s)-O.start)/3),y:S(O.function.p1)}:null,N=k?{x:D(k.start+(v(t,s-1)-k.start)*2/3),y:S(k.function.p2)}:null,et=[g.min,(g.min+g.max)/2,g.max];return p.jsxs("div",{"data-testid":c,children:[p.jsxs("svg",{ref:m,"data-testid":`${c}-plot`,viewBox:`0 0 ${j} ${a}`,style:{width:"100%",height:a,display:"block",background:E.inputBg,border:`1px solid ${E.border}`,borderRadius:E.radiusSmall,touchAction:"none",outline:"none"},tabIndex:0,role:"application","aria-label":"Curve editor",onKeyDown:n=>{(n.key==="Delete"||n.key==="Backspace")&&z&&!o&&(n.preventDefault(),w(Y(t,s)),d(Math.max(0,s-1)))},onDoubleClick:n=>{if(o)return;const{t:u}=P(n),f=ut(t,u);f!==t&&(w(f),d(f.findIndex(T=>Math.abs(T.start-u)<1e-6)))},children:[et.map(n=>p.jsxs("g",{children:[p.jsx("line",{x1:F,x2:j-Q,y1:S(n),y2:S(n),stroke:E.border,strokeWidth:.5}),p.jsx("text",{x:F-3,y:S(n)+2.5,fontSize:7,fill:E.textMuted,textAnchor:"end",children:pt(n)})]},n)),[0,.5,1].map(n=>p.jsx("text",{x:D(n),y:a-3,fontSize:7,fill:E.textMuted,textAnchor:"middle",children:n},n)),p.jsx("path",{d:tt,fill:"none",stroke:K,strokeWidth:1.5}),x&&R&&p.jsxs("g",{children:[p.jsx("line",{x1:D(x.time),y1:S(x.value),x2:R.x,y2:R.y,stroke:E.textMuted,strokeDasharray:"2 2",strokeWidth:.75}),p.jsx("circle",{"data-testid":`${c}-tangent-out`,cx:R.x,cy:R.y,r:3,fill:E.surface,stroke:E.textMuted,style:{cursor:o?"not-allowed":"ns-resize"},onPointerDown:n=>$(n,(u,f,T)=>q(u,s,"out",T))})]}),x&&N&&p.jsxs("g",{children:[p.jsx("line",{x1:D(x.time),y1:S(x.value),x2:N.x,y2:N.y,stroke:E.textMuted,strokeDasharray:"2 2",strokeWidth:.75}),p.jsx("circle",{"data-testid":`${c}-tangent-in`,cx:N.x,cy:N.y,r:3,fill:E.surface,stroke:E.textMuted,style:{cursor:o?"not-allowed":"ns-resize"},onPointerDown:n=>$(n,(u,f,T)=>q(u,s,"in",T))})]}),h.map((n,u)=>p.jsx("circle",{"data-testid":`${c}-key-${u}`,cx:D(n.time),cy:S(n.value),r:4,fill:u===s?E.accent:E.surface,stroke:u===s?E.onAccent:K,strokeWidth:1.25,style:{cursor:o?"not-allowed":"move"},onPointerDown:f=>{d(u),$(f,(T,y,_)=>C(T,u,y,_))}},u))]}),p.jsxs("div",{style:{display:"flex",gap:4,alignItems:"center",marginTop:3},children:[p.jsxs("span",{style:{fontSize:9,color:E.textMuted,flex:"0 0 auto"},children:["Key ",s+1,"/",h.length]}),p.jsx(U,{label:"t",value:x?Math.round(x.time*1e3)/1e3:null,step:.05,testId:`${c}-key-time`,onChange:n=>{x&&H(C(t,s,n,x.value))},onChangeEnd:n=>{x&&w(C(t,s,n,x.value))}}),p.jsx(U,{label:"v",value:x?Math.round(x.value*1e3)/1e3:null,step:.05,testId:`${c}-key-value`,onChange:n=>{x&&H(C(t,s,x.time,n))},onChangeEnd:n=>{x&&w(C(t,s,x.time,n))}}),p.jsx(at,{type:"button",variant:"ghost",size:"compact","data-testid":`${c}-delete-key`,disabled:!z||o===!0,"aria-label":"Delete curve key",title:z?"Delete key":"Endpoint keys cannot be deleted",onClick:()=>{w(Y(t,s)),d(Math.max(0,s-1))},children:"×"})]})]})}export{wt as Actions,ps as AlignmentGrid,fs as AnchorPresets,nt as AnchoredMenu,Rt as AssetSlotPicker,hs as BorderEditor,ms as BorderRadiusEditor,at as Button,Nt as CLASSIC_MATERIAL,_t as Checkbox,ls as ColorInput,Bs as ColorPicker,Gs as ColorSwatch,Ct as ColorSwatchInput,At as CurveEditor,Ft as DEFAULT_ICON_SET_ID,xs as DEFAULT_SHADOW,Es as DEFAULT_TEXT_SHADOW,Ot as Dialog,kt as DialogBody,Lt as DialogField,jt as DialogFieldLabel,Bt as DialogFooter,Gt as DialogHeader,Pt as DisclosureIcon,Ht as Divider,$t as DraftTextInput,zt as DropIndicator,Wt as EDITOR_CATEGORY_NAMES,Vt as EDITOR_MATERIALS,Kt as EDITOR_MATERIAL_IDS,Jt as EDITOR_REGION_NAMES,Ut as EDITOR_THEME_CLASS,qt as EditorBadge,Yt as EditorBanner,Qt as EditorIcon,Xt as EditorListButton,Zt as EditorPopover,te as EditorSurface,ee as EditorTab,ne as EditorTabList,se as EditorToolbar,oe as EditorTree,ae as EditorTreeRow,re as FONT,ie as FONT_MONO,ce as FieldGroup,ue as FieldLabel,le as FieldRow,de as FileInput,gs as FilterEditor,pe as FloatingToolbar,Ss as FontPicker,fe as GLASS_MATERIAL,Ts as GradientEditor,bs as GradientStopsTrack,Dt as HoverPreview,he as IconButton,me as Inline,xe as InteractiveEditScopeContext,Ee as JoinedField,ge as JoinedFieldSuffix,Mt as JsonInput,Se as Keycap,Te as LABEL_COL_WIDTH,be as Menu,De as MenuItem,Me as MenuSeparator,ye as MenuSubmenu,Ae as MenuTrigger,U as NumberInput,Ie as Panel,Ds as QuarksGradientEditor,ve as RangeInput,we as ResizeHandle,Re as STAGE_WORD_MODES,Ms as ScrubbableInput,Ne as SectionHeader,_e as Select,ys as ShadowEditor,As as ShadowListEditor,Ce as Spacer,Fe as SplitButtonGroup,Oe as Stack,ke as StateSurface,E as THEME,Le as TONE_ERROR,je as TONE_WARNING,Be as Text,Ge as TextArea,st as TextInput,Is as TextShadowEditor,Pe as ThemeRootPortal,He as ToggleButton,$e as ToolbarDivider,ze as ToolbarGroup,We as Tooltip,Ve as TreeDisclosureIcon,Ke as Vec3Input,Je as accent,Ue as accentMuted,qe as activeIconGlyph,Ye as activeIconSetSnapshot,Qe as applyEditorTheme,Xe as areaEmbossValue,Ze as bg,tn as border,en as chromeSize,nn as clampRectToViewport,sn as composeEditorAppearance,vs as composeFilter,ws as composeGradient,Rs as composeShadows,on as controlSize,ct as curveKeys,lt as curveValueRange,an as danger,rn as dangerFaint,cn as dangerMuted,Y as deleteKey,un as dynamic,ln as dynamicBg,dn as editorIconSets,pn as editorIcons,fn as editorMaterials,hn as editorThemeVariables,mn as editorThemes,xn as fieldLabelStyle,it as fireChange,rt as fireEnd,En as focusFirstMenuItem,gn as focusRing,Sn as fontMono,Tn as fontSans,bn as fontSize,Dn as fontSizeVar,Mn as fontWeight,yn as glassDarkEditorTheme,An as glassDarkLiteEditorTheme,In as graphiteDarkEditorTheme,vn as graphiteNeutralEditorTheme,wn as groupLabelStyle,Ps as hexToRgb,Rn as iconSize,Nn as isEditorIconSetId,_n as isEditorMaterialId,Cn as isEditorThemeId,Ns as isUniformBorder,_s as isUniformRadius,Fn as lineHeight,On as lineHeightVar,kn as liquidGlassEditorTheme,Ln as liquidGlassLiteEditorTheme,jn as midnightHighContrastEditorTheme,Bn as motion,Gn as motionVar,C as moveKey,q as moveTangent,Hs as parseAlpha,Cs as parseFilterFunctions,Fs as parseGradient,Pn as parseNumericValue,Os as parseShadows,Hn as radius,$n as regionRowAltValue,zn as registerContributedIconSet,Wn as registerContributedMaterial,Vn as rowStyle,yt as sampleCurve,Kn as scrim,v as segmentEnd,Jn as selection,Un as setActiveIconSet,qn as shadow,Yn as space,Qn as spaceVar,ut as splitAt,Xn as strokeWidth,Zn as subscribeEditorMaterials,ts as subscribeIconSets,es as success,ns as successMuted,ss as text,ot as themeVars,$s as toHex,ks as uniformBorder,Ls as uniformRadius,os as useInteractiveEditScope,as as usesGlassMaterial,rs as warn,is as warnMuted,cs as zIndex};
1
+ import{bA as nt,aN as st,al as ot,e4 as E,dV as U,a6 as at,e6 as rt,e5 as it}from"./index-D8WZNJyr.js";import{hp as wt,hq as Rt,hr as Nt,aS as _t,dX as Ct,hs as Ft,ht as Ot,hu as kt,hv as Lt,hw as jt,hx as Bt,hy as Gt,eJ as Pt,hz as Ht,e_ as $t,hA as zt,hB as Wt,hC as Vt,hD as Kt,hE as Jt,dz as Ut,hF as qt,bQ as Yt,a7 as Qt,eq as Xt,bP as Zt,h1 as te,hG as ee,hH as ne,bv as se,hI as oe,hJ as ae,hK as re,eY as ie,fe as ce,hL as ue,ff as le,hM as de,d9 as pe,hN as fe,aM as he,df as me,hO as xe,hP as Ee,hQ as ge,dg as Se,f1 as Te,fz as be,bB as De,bC as Me,fN as ye,hR as Ae,hS as Ie,aT as ve,hT as we,hU as Re,aU as Ne,bH as _e,hV as Ce,db as Fe,de as Oe,eB as ke,hW as Le,hX as je,aL as Be,e$ as Ge,hY as Pe,hZ as He,gK as $e,h_ as ze,bw as We,h$ as Ve,i0 as Ke,es as Je,i1 as Ue,i2 as qe,i3 as Ye,i4 as Qe,i5 as Xe,eo as Ze,ep as tn,i6 as en,i7 as nn,i8 as sn,i9 as on,ev as an,ia as rn,ib as cn,ic as un,id as ln,ie as dn,a8 as pn,ig as fn,ih as hn,ii as mn,ij as xn,ik as En,il as gn,ew as Sn,im as Tn,io as bn,et as Dn,ip as Mn,iq as yn,ir as An,dA as In,is as vn,it as wn,iu as Rn,iv as Nn,iw as _n,ix as Cn,iy as Fn,eW as On,iz as kn,iA as Ln,iB as jn,iC as Bn,iD as Gn,iE as Pn,ex as Hn,iF as $n,iG as zn,iH as Wn,f0 as Vn,iI as Kn,iJ as Jn,iK as Un,iL as qn,dq as Yn,er as Qn,iM as Xn,iN as Zn,iO as ts,eu as es,iP as ns,aZ as ss,dW as os,iQ as as,iR as rs,iS as is,dp as cs}from"./index-D8WZNJyr.js";import{C as ls}from"./ColorInput-BPXgNXFu.js";import{a as p}from"./jsx-runtime-DPjLkJKQ.js";import{r as b}from"./index-nmcBqr7Y.js";import{A as ps,k as fs,B as hs,a as ms,D as xs,l as Es,F as gs,h as Ss,G as Ts,m as bs,Q as Ds,S as Ms,f as ys,n as As,T as Is,d as vs,c as ws,g as Rs,i as Ns,j as _s,b as Cs,p as Fs,e as Os,u as ks,o as Ls}from"./ShadowEditor-Dt02ONTx.js";import{a as Bs,C as Gs,h as Ps,p as Hs,t as $s}from"./ColorPicker-Bbz_9vJC.js";import"./index-CtzuWnCS.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";function Dt({preview:t,children:e,...r}){const[o,a]=b.useState(!1),l=b.useRef(null),c=b.useId(),s=()=>a(!1),d=i=>{l.current=i,a(!0)};let m=e;if(b.isValidElement(e)){const i=[e.props["aria-describedby"],o?c:null].filter(Boolean).join(" ");m=b.cloneElement(e,i?{"aria-describedby":i}:{})}return p.jsxs("span",{className:"volter-tooltip-anchor",onMouseEnter:i=>d(i.currentTarget),onMouseLeave:s,onFocusCapture:i=>d(i.currentTarget),onBlurCapture:i=>{i.currentTarget.contains(i.relatedTarget)||s()},onKeyDown:i=>{i.key!=="Escape"||!o||(i.preventDefault(),i.stopPropagation(),s())},children:[m,o&&l.current&&p.jsx(nt,{...r,anchorRef:l,id:c,role:"tooltip",autoFocusFirst:!1,onDismiss:s,children:t})]})}function Mt({value:t,onCommit:e,style:r,disabled:o=!1}){const a=t===void 0?"":JSON.stringify(t),[l,c]=b.useState(a),[s,d]=b.useState(!1),m=b.useRef(!1);b.useEffect(()=>{c(a),d(!1)},[a]);const i=()=>{if(m.current){m.current=!1;return}if(l===a){d(!1);return}let h;try{h=JSON.parse(l)}catch{d(!0);return}d(!1),e(h)};return p.jsxs("div",{children:[p.jsx(st,{"data-testid":"json-input","aria-invalid":s||void 0,"data-tone":s?"danger":void 0,disabled:o,value:l,onChange:h=>{c(h.target.value),s&&d(!1)},onBlur:i,onKeyDown:h=>{h.key==="Enter"?i():h.key==="Escape"&&(m.current=!0,c(a),d(!1),h.target.blur())},style:r,title:s?"Not valid JSON — nothing written. Fix the JSON or press Escape to revert.":void 0}),s&&p.jsx("div",{"data-testid":"json-input-error",style:{fontSize:"var(--volter-font-sm)",color:ot.semantic.danger,marginTop:2},children:"Not valid JSON — nothing written. Fix the JSON or press Escape to revert."})]})}function v(t,e){return e+1<t.length?t[e+1].start:1}function ct(t){const e=t.map(o=>({time:o.start,value:o.function.p0})),r=t[t.length-1];return r&&e.push({time:1,value:r.function.p3}),e}function G(t){return t.map(e=>({start:e.start,function:{...e.function}}))}const B=.01;function C(t,e,r,o){const a=G(t),l=a.length;if(e<0||e>l)return a;if(e<l){const c=a[e],s=o-c.function.p0;if(c.function.p0=o,c.function.p1+=s,e>0){const d=a[e-1],m=o-d.function.p3;d.function.p3=o,d.function.p2+=m;const i=d.start+B,h=v(a,e)-B;c.start=Math.min(h,Math.max(i,r))}}else{const c=a[l-1],s=o-c.function.p3;c.function.p3=o,c.function.p2+=s}return a}function q(t,e,r,o){const a=G(t);return r==="out"&&e<a.length?a[e].function.p1=o:r==="in"&&e>0&&e<=a.length&&(a[e-1].function.p2=o),a}function M(t,e,r){return t+(e-t)*r}function yt(t,e){for(let r=0;r<t.length;r++){const o=t[r].start,a=v(t,r);if(e>=o&&e<=a){const l=a>o?(e-o)/(a-o):0,{p0:c,p1:s,p2:d,p3:m}=t[r].function,i=M(c,s,l),h=M(s,d,l),g=M(d,m,l),A=M(i,h,l),I=M(h,g,l);return M(A,I,l)}}return 0}function ut(t,e){for(let r=0;r<t.length;r++){const o=t[r].start,a=v(t,r);if(e<=o+B||e>=a-B||e<o||e>a)continue;const l=(e-o)/(a-o),{p0:c,p1:s,p2:d,p3:m}=t[r].function,i=M(c,s,l),h=M(s,d,l),g=M(d,m,l),A=M(i,h,l),I=M(h,g,l),D=M(A,I,l),S=G(t);return S.splice(r,1,{start:o,function:{p0:c,p1:i,p2:A,p3:D}},{start:e,function:{p0:D,p1:I,p2:g,p3:m}}),S}return t}function Y(t,e){if(e<=0||e>=t.length)return t;const r=t[e-1],o=t[e],a=o.start-r.start,l=v(t,e)-o.start,c=a+l;if(c<=0)return t;const s=r.function,d=o.function,m={start:r.start,function:{p0:s.p0,p1:s.p0+(s.p1-s.p0)*(a>0?c/a:1),p2:d.p3+(d.p2-d.p3)*(l>0?c/l:1),p3:d.p3}},i=G(t);return i.splice(e-1,2,m),i}function lt(t){let e=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(const o of t)for(const a of[o.function.p0,o.function.p1,o.function.p2,o.function.p3])a<e&&(e=a),a>r&&(r=a);return!Number.isFinite(e)||!Number.isFinite(r)?{min:0,max:1}:{min:e,max:r}}const F=34,Q=6,V=6,dt=14,j=260;function pt(t){return Math.abs(t)>=100?t.toFixed(0):Math.abs(t)>=1?String(Math.round(t*100)/100):String(Math.round(t*1e3)/1e3)}function At({value:t,onChange:e,onChangeEnd:r,disabled:o,height:a=90,color:l,testId:c="curve-editor"}){const[s,d]=b.useState(0),m=b.useRef(null),i=b.useRef(null),h=b.useMemo(()=>ct(t),[t]),g=b.useMemo(()=>{const{min:n,max:u}=lt(t);if(u-n<1e-6)return{min:n-1,max:u+1};const f=(u-n)*.1;return{min:n-f,max:u+f}},[t]),A=j-F-Q,I=a-V-dt,D=n=>F+n*A,S=n=>V+(1-(n-g.min)/(g.max-g.min))*I,X=n=>Math.max(0,Math.min(1,(n-F)/A)),Z=n=>g.min+(1-(n-V)/I)*(g.max-g.min),P=n=>{const u=m.current?.getBoundingClientRect();if(!u)return{t:0,v:0};const f=(n.clientX-u.left)/u.width*j,T=(n.clientY-u.top)/u.height*a;return{t:X(f),v:Z(T)}},tt=b.useMemo(()=>{if(t.length===0)return"";let n=`M ${D(t[0].start)} ${S(t[0].function.p0)}`;for(let u=0;u<t.length;u++){const f=t[u],T=v(t,u),y=T-f.start;n+=` C ${D(f.start+y/3)} ${S(f.function.p1)}, ${D(f.start+2*y/3)} ${S(f.function.p2)}, ${D(T)} ${S(f.function.p3)}`}return n},[t,g,a]),w=n=>rt({onChange:e,onChangeEnd:r},n),H=n=>it({onChange:e},n),$=(n,u)=>{if(o)return;n.preventDefault(),n.stopPropagation(),i.current=t;const f=y=>{const{t:_,v:W}=P(y),L=u(i.current??t,_,W);i.current=L,H(L)},T=y=>{const{t:_,v:W}=P(y),L=u(i.current??t,_,W);i.current=null,w(L),window.removeEventListener("pointermove",f),window.removeEventListener("pointerup",T)};window.addEventListener("pointermove",f),window.addEventListener("pointerup",T)},K=l??E.accent,J=t.length,x=h[s],z=s>0&&s<J,O=s<J?t[s]:void 0,k=s>0?t[s-1]:void 0,R=O?{x:D(O.start+(v(t,s)-O.start)/3),y:S(O.function.p1)}:null,N=k?{x:D(k.start+(v(t,s-1)-k.start)*2/3),y:S(k.function.p2)}:null,et=[g.min,(g.min+g.max)/2,g.max];return p.jsxs("div",{"data-testid":c,children:[p.jsxs("svg",{ref:m,"data-testid":`${c}-plot`,viewBox:`0 0 ${j} ${a}`,style:{width:"100%",height:a,display:"block",background:E.inputBg,border:`1px solid ${E.border}`,borderRadius:E.radiusSmall,touchAction:"none",outline:"none"},tabIndex:0,role:"application","aria-label":"Curve editor",onKeyDown:n=>{(n.key==="Delete"||n.key==="Backspace")&&z&&!o&&(n.preventDefault(),w(Y(t,s)),d(Math.max(0,s-1)))},onDoubleClick:n=>{if(o)return;const{t:u}=P(n),f=ut(t,u);f!==t&&(w(f),d(f.findIndex(T=>Math.abs(T.start-u)<1e-6)))},children:[et.map(n=>p.jsxs("g",{children:[p.jsx("line",{x1:F,x2:j-Q,y1:S(n),y2:S(n),stroke:E.border,strokeWidth:.5}),p.jsx("text",{x:F-3,y:S(n)+2.5,fontSize:7,fill:E.textMuted,textAnchor:"end",children:pt(n)})]},n)),[0,.5,1].map(n=>p.jsx("text",{x:D(n),y:a-3,fontSize:7,fill:E.textMuted,textAnchor:"middle",children:n},n)),p.jsx("path",{d:tt,fill:"none",stroke:K,strokeWidth:1.5}),x&&R&&p.jsxs("g",{children:[p.jsx("line",{x1:D(x.time),y1:S(x.value),x2:R.x,y2:R.y,stroke:E.textMuted,strokeDasharray:"2 2",strokeWidth:.75}),p.jsx("circle",{"data-testid":`${c}-tangent-out`,cx:R.x,cy:R.y,r:3,fill:E.surface,stroke:E.textMuted,style:{cursor:o?"not-allowed":"ns-resize"},onPointerDown:n=>$(n,(u,f,T)=>q(u,s,"out",T))})]}),x&&N&&p.jsxs("g",{children:[p.jsx("line",{x1:D(x.time),y1:S(x.value),x2:N.x,y2:N.y,stroke:E.textMuted,strokeDasharray:"2 2",strokeWidth:.75}),p.jsx("circle",{"data-testid":`${c}-tangent-in`,cx:N.x,cy:N.y,r:3,fill:E.surface,stroke:E.textMuted,style:{cursor:o?"not-allowed":"ns-resize"},onPointerDown:n=>$(n,(u,f,T)=>q(u,s,"in",T))})]}),h.map((n,u)=>p.jsx("circle",{"data-testid":`${c}-key-${u}`,cx:D(n.time),cy:S(n.value),r:4,fill:u===s?E.accent:E.surface,stroke:u===s?E.onAccent:K,strokeWidth:1.25,style:{cursor:o?"not-allowed":"move"},onPointerDown:f=>{d(u),$(f,(T,y,_)=>C(T,u,y,_))}},u))]}),p.jsxs("div",{style:{display:"flex",gap:4,alignItems:"center",marginTop:3},children:[p.jsxs("span",{style:{fontSize:9,color:E.textMuted,flex:"0 0 auto"},children:["Key ",s+1,"/",h.length]}),p.jsx(U,{label:"t",value:x?Math.round(x.time*1e3)/1e3:null,step:.05,testId:`${c}-key-time`,onChange:n=>{x&&H(C(t,s,n,x.value))},onChangeEnd:n=>{x&&w(C(t,s,n,x.value))}}),p.jsx(U,{label:"v",value:x?Math.round(x.value*1e3)/1e3:null,step:.05,testId:`${c}-key-value`,onChange:n=>{x&&H(C(t,s,x.time,n))},onChangeEnd:n=>{x&&w(C(t,s,x.time,n))}}),p.jsx(at,{type:"button",variant:"ghost",size:"compact","data-testid":`${c}-delete-key`,disabled:!z||o===!0,"aria-label":"Delete curve key",title:z?"Delete key":"Endpoint keys cannot be deleted",onClick:()=>{w(Y(t,s)),d(Math.max(0,s-1))},children:"×"})]})]})}export{wt as Actions,ps as AlignmentGrid,fs as AnchorPresets,nt as AnchoredMenu,Rt as AssetSlotPicker,hs as BorderEditor,ms as BorderRadiusEditor,at as Button,Nt as CLASSIC_MATERIAL,_t as Checkbox,ls as ColorInput,Bs as ColorPicker,Gs as ColorSwatch,Ct as ColorSwatchInput,At as CurveEditor,Ft as DEFAULT_ICON_SET_ID,xs as DEFAULT_SHADOW,Es as DEFAULT_TEXT_SHADOW,Ot as Dialog,kt as DialogBody,Lt as DialogField,jt as DialogFieldLabel,Bt as DialogFooter,Gt as DialogHeader,Pt as DisclosureIcon,Ht as Divider,$t as DraftTextInput,zt as DropIndicator,Wt as EDITOR_CATEGORY_NAMES,Vt as EDITOR_MATERIALS,Kt as EDITOR_MATERIAL_IDS,Jt as EDITOR_REGION_NAMES,Ut as EDITOR_THEME_CLASS,qt as EditorBadge,Yt as EditorBanner,Qt as EditorIcon,Xt as EditorListButton,Zt as EditorPopover,te as EditorSurface,ee as EditorTab,ne as EditorTabList,se as EditorToolbar,oe as EditorTree,ae as EditorTreeRow,re as FONT,ie as FONT_MONO,ce as FieldGroup,ue as FieldLabel,le as FieldRow,de as FileInput,gs as FilterEditor,pe as FloatingToolbar,Ss as FontPicker,fe as GLASS_MATERIAL,Ts as GradientEditor,bs as GradientStopsTrack,Dt as HoverPreview,he as IconButton,me as Inline,xe as InteractiveEditScopeContext,Ee as JoinedField,ge as JoinedFieldSuffix,Mt as JsonInput,Se as Keycap,Te as LABEL_COL_WIDTH,be as Menu,De as MenuItem,Me as MenuSeparator,ye as MenuSubmenu,Ae as MenuTrigger,U as NumberInput,Ie as Panel,Ds as QuarksGradientEditor,ve as RangeInput,we as ResizeHandle,Re as STAGE_WORD_MODES,Ms as ScrubbableInput,Ne as SectionHeader,_e as Select,ys as ShadowEditor,As as ShadowListEditor,Ce as Spacer,Fe as SplitButtonGroup,Oe as Stack,ke as StateSurface,E as THEME,Le as TONE_ERROR,je as TONE_WARNING,Be as Text,Ge as TextArea,st as TextInput,Is as TextShadowEditor,Pe as ThemeRootPortal,He as ToggleButton,$e as ToolbarDivider,ze as ToolbarGroup,We as Tooltip,Ve as TreeDisclosureIcon,Ke as Vec3Input,Je as accent,Ue as accentMuted,qe as activeIconGlyph,Ye as activeIconSetSnapshot,Qe as applyEditorTheme,Xe as areaEmbossValue,Ze as bg,tn as border,en as chromeSize,nn as clampRectToViewport,sn as composeEditorAppearance,vs as composeFilter,ws as composeGradient,Rs as composeShadows,on as controlSize,ct as curveKeys,lt as curveValueRange,an as danger,rn as dangerFaint,cn as dangerMuted,Y as deleteKey,un as dynamic,ln as dynamicBg,dn as editorIconSets,pn as editorIcons,fn as editorMaterials,hn as editorThemeVariables,mn as editorThemes,xn as fieldLabelStyle,it as fireChange,rt as fireEnd,En as focusFirstMenuItem,gn as focusRing,Sn as fontMono,Tn as fontSans,bn as fontSize,Dn as fontSizeVar,Mn as fontWeight,yn as glassDarkEditorTheme,An as glassDarkLiteEditorTheme,In as graphiteDarkEditorTheme,vn as graphiteNeutralEditorTheme,wn as groupLabelStyle,Ps as hexToRgb,Rn as iconSize,Nn as isEditorIconSetId,_n as isEditorMaterialId,Cn as isEditorThemeId,Ns as isUniformBorder,_s as isUniformRadius,Fn as lineHeight,On as lineHeightVar,kn as liquidGlassEditorTheme,Ln as liquidGlassLiteEditorTheme,jn as midnightHighContrastEditorTheme,Bn as motion,Gn as motionVar,C as moveKey,q as moveTangent,Hs as parseAlpha,Cs as parseFilterFunctions,Fs as parseGradient,Pn as parseNumericValue,Os as parseShadows,Hn as radius,$n as regionRowAltValue,zn as registerContributedIconSet,Wn as registerContributedMaterial,Vn as rowStyle,yt as sampleCurve,Kn as scrim,v as segmentEnd,Jn as selection,Un as setActiveIconSet,qn as shadow,Yn as space,Qn as spaceVar,ut as splitAt,Xn as strokeWidth,Zn as subscribeEditorMaterials,ts as subscribeIconSets,es as success,ns as successMuted,ss as text,ot as themeVars,$s as toHex,ks as uniformBorder,Ls as uniformRadius,os as useInteractiveEditScope,as as usesGlassMaterial,rs as warn,is as warnMuted,cs as zIndex};
@@ -1 +1 @@
1
- import{e as f}from"./extend-D_CXDVWD.js";import"./jsx-runtime-DPjLkJKQ.js";import{C as p}from"./index-CCKpGWll.js";import{r as a}from"./index-nmcBqr7Y.js";const s="object";class m{constructor(e){const t=e[s];if(!(t instanceof p))throw new Error(`PixiPrimitive: \`object\` must be a PIXI.Container (got ${t===null?"null":typeof t}). This element adopts an object the game already owns; it does not create one.`);return Object.defineProperty(t,s,{configurable:!0,enumerable:!1,get:()=>t,set:()=>{}}),t}}f({VolterAdopted:m});const b="pixiVolterAdopted";function d(o){const{object:e,children:t,...r}=o;if(a.useRef(e).current!==e)throw new Error("PixiPrimitive: `object` changed on a mounted element. The adopted container IS this element's instance, so it cannot be swapped; give the element a `key` derived from the object instead, so React remounts it.");a.useLayoutEffect(()=>()=>P(e),[e]);const i={[s]:e};for(const[u,c]of Object.entries(r))c!==void 0&&(i[u]=c);return a.createElement(b,i,t)}function P(o){const e=o,t=Object.getOwnPropertyDescriptor(o,"destroy");let r=!0;const n=()=>{r&&(r=!1,t===void 0?delete e.destroy:Object.defineProperty(o,"destroy",t))};Object.defineProperty(o,"destroy",{configurable:!0,enumerable:!1,writable:!0,value:function(){n(),this.removeFromParent()}}),queueMicrotask(n)}function l(o,e){e.parent!==o&&o.addChild(e)}const g=Object.freeze(Object.defineProperty({__proto__:null,PixiPrimitive:d,adoptNow:l},Symbol.toStringTag,{value:"Module"})),h=Object.freeze(Object.defineProperty({__proto__:null,PixiPrimitive:d,adoptNow:l},Symbol.toStringTag,{value:"Module"}));export{h as i,g as p};
1
+ import{e as f}from"./extend-BUAYCcQw.js";import"./jsx-runtime-DPjLkJKQ.js";import{C as p}from"./index-DtG2FYKX.js";import{r as a}from"./index-nmcBqr7Y.js";const s="object";class m{constructor(e){const t=e[s];if(!(t instanceof p))throw new Error(`PixiPrimitive: \`object\` must be a PIXI.Container (got ${t===null?"null":typeof t}). This element adopts an object the game already owns; it does not create one.`);return Object.defineProperty(t,s,{configurable:!0,enumerable:!1,get:()=>t,set:()=>{}}),t}}f({VolterAdopted:m});const b="pixiVolterAdopted";function d(o){const{object:e,children:t,...r}=o;if(a.useRef(e).current!==e)throw new Error("PixiPrimitive: `object` changed on a mounted element. The adopted container IS this element's instance, so it cannot be swapped; give the element a `key` derived from the object instead, so React remounts it.");a.useLayoutEffect(()=>()=>P(e),[e]);const i={[s]:e};for(const[u,c]of Object.entries(r))c!==void 0&&(i[u]=c);return a.createElement(b,i,t)}function P(o){const e=o,t=Object.getOwnPropertyDescriptor(o,"destroy");let r=!0;const n=()=>{r&&(r=!1,t===void 0?delete e.destroy:Object.defineProperty(o,"destroy",t))};Object.defineProperty(o,"destroy",{configurable:!0,enumerable:!1,writable:!0,value:function(){n(),this.removeFromParent()}}),queueMicrotask(n)}function l(o,e){e.parent!==o&&o.addChild(e)}const g=Object.freeze(Object.defineProperty({__proto__:null,PixiPrimitive:d,adoptNow:l},Symbol.toStringTag,{value:"Module"})),h=Object.freeze(Object.defineProperty({__proto__:null,PixiPrimitive:d,adoptNow:l},Symbol.toStringTag,{value:"Module"}));export{h as i,g as p};
@@ -1,4 +1,4 @@
1
- import{_ as Ie}from"./extends-CF3RwP-h.js";import{r as A,a as Vn}from"./index-nmcBqr7Y.js";import{a as Jy}from"./client-DNXj_opT.js";import{U as Id,S as No,W as Zx}from"./three.module-BLhyNg0e.js";import{u as ue,a as He,I as Jx,q as _d,G as vi,s as ir,J as e4,K as Hu,e as xi,o as Wn,v as Xr,F as t4,l as ev,k as S0,L as i4}from"./events-156d8d12.esm-DmeaOP4r.js";import{fo as W,aI as bi,fd as Be,d9 as ci,d5 as Bi,az as ql,da as wr,cm as we,dp as rt,cl as Ln,ez as Vu,fp as Ei,_ as qe,aV as Pn,cj as Ze,co as ze,bu as tv,au as Ir,dw as Ti,b0 as si,ed as Ns,cE as Xt,N as Ji,M as Ai,aM as nn,ex as xn,em as hi,B as Ar,fe as Ko,K as cr,bl as n4,f1 as Hr,cW as yi,e6 as Wu,cp as ta,bX as ul,aq as Qn,a$ as $i,bV as It,db as an,cZ as Rr,ey as iv,e$ as Xl,cg as Th,bh as jo,I as Kt,aP as wh,bg as s4,fx as Fi,c1 as ni,cN as C0,Z as r4,aY as o4,b5 as nv,am as a4,ca as ia,cb as l4,aZ as ks,eX as _r,Y as Yn,eW as cn,cv as bh,cs as T0,aT as sv,F as Zm,dk as Eu,dd as Jm,eC as c4,aE as u4,ev as rv,et as h4,j as f4,f7 as d4,l as m4,fq as g4,dq as p4,cV as A4,eq as ur,a3 as Yu,aa as ov,ff as Gi,c5 as w0,dI as eg,e8 as Ms,e2 as zo,bi as fi,e0 as y4,d$ as v4,dZ as E4,dY as x4,dS as I4,dP as _4,dN as S4,dM as C4,dE as T4,av,aw as Qo,H as w4,er as b4,eo as R4,d8 as Rh,bs as b0,bt as Sd,bA as Go,fA as D4,bW as Fs,dn as L4,ag as P4,V as lv,x as M4,y as B4,cr as k4,cq as cv,dv as uv,br as xu,fb as pn,du as Ku,aO as F4,c_ as hv,cR as O4,ao as fv,dx as Iu,fj as Wr,fw as ju,a9 as dv,an as U4,el as br,T as mv,ad as R0,fs as N4,ej as gv,aC as pv,aA as Av,fm as D0,R as yv,b4 as _u,E as z4,e5 as Fl,by as ou,P as Cd,es as vv,e3 as Ev,e9 as Q4,n as G4,ch as $4,cw as xv,cx as Iv,cP as H4,dg as V4,f6 as Su,c7 as Td,cc as W4,c3 as tg,eG as Y4,cu as K4,S as j4,d as q4,ee as Dh,i as X4,bI as Lh,cU as Z4,aS as J4,aW as eI}from"./three.core-3arARmh6.js";import{v as Ol,d as _v,C as tI,u as BM}from"./Gltf-CRUmmFxv.js";import{G as VF}from"./Gltf-CRUmmFxv.js";import{m as iI,t as nI}from"./BufferGeometryUtils-FJZNEiJN.js";import{OrthographicCamera as sI}from"./OrthographicCamera-Bv8_A2mi.js";import{PerspectiveCamera as YF}from"./PerspectiveCamera-D3r6Hnc8.js";import{E as na,M as rI}from"./OrbitControls-C6LQ4Pxi.js";import{O as jF}from"./OrbitControls-C6LQ4Pxi.js";import{_ as Sv}from"./index-Crsbhlhy.js";import{g as oI}from"./_commonjsHelpers-D6-XlEtG.js";import{u as ds}from"./Fbo-Biv6Lrhl.js";import{F as XF}from"./Fbo-Biv6Lrhl.js";import{RoundedBox as JF,RoundedBoxGeometry as eO}from"./RoundedBox-DrJK5JOI.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-DzuOGwVB.js";import"./index-CtzuWnCS.js";import"./index-FUuS4qwW.js";const Ul=new W,L0=new W,aI=new W,ig=new Be;function lI(r,e,t){const i=Ul.setFromMatrixPosition(r.matrixWorld);i.project(e);const n=t.width/2,s=t.height/2;return[i.x*n+n,-(i.y*s)+s]}function cI(r,e){const t=Ul.setFromMatrixPosition(r.matrixWorld),i=L0.setFromMatrixPosition(e.matrixWorld),n=t.sub(i),s=e.getWorldDirection(aI);return n.angleTo(s)>Math.PI/2}function uI(r,e,t,i){const n=Ul.setFromMatrixPosition(r.matrixWorld),s=n.clone();s.project(e),ig.set(s.x,s.y),t.setFromCamera(ig,e);const o=t.intersectObjects(i,!0);if(o.length){const a=o[0].distance;return n.distanceTo(t.ray.origin)<a}return!0}function hI(r,e){if(e instanceof Bi)return e.zoom;if(e instanceof ci){const t=Ul.setFromMatrixPosition(r.matrixWorld),i=L0.setFromMatrixPosition(e.matrixWorld),n=e.fov*Math.PI/180,s=t.distanceTo(i);return 1/(2*Math.tan(n/2)*s)}else return 1}function fI(r,e,t){if(e instanceof ci||e instanceof Bi){const i=Ul.setFromMatrixPosition(r.matrixWorld),n=L0.setFromMatrixPosition(e.matrixWorld),s=i.distanceTo(n),o=(t[1]-t[0])/(e.far-e.near),a=t[1]-o*e.far;return Math.round(o*s+a)}}const wd=r=>Math.abs(r)<1e-10?0:r;function Cv(r,e,t=""){let i="matrix3d(";for(let n=0;n!==16;n++)i+=wd(e[n]*r.elements[n])+(n!==15?",":")");return t+i}const dI=(r=>e=>Cv(e,r))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),mI=(r=>(e,t)=>Cv(e,r(t),"translate(-50%,-50%)"))(r=>[1/r,1/r,1/r,1,-1/r,-1/r,-1/r,-1,1/r,1/r,1/r,1,1,1,1,1]);function gI(r){return r&&typeof r=="object"&&"current"in r}const qu=A.forwardRef(({children:r,eps:e=.001,style:t,className:i,prepend:n,center:s,fullscreen:o,portal:a,distanceFactor:l,sprite:c=!1,transform:u=!1,occlude:h,onOcclude:f,castShadow:d,receiveShadow:g,material:m,geometry:p,zIndexRange:E=[16777271,0],calculatePosition:v=lI,as:y="div",wrapperClass:x,pointerEvents:I="auto",..._},S)=>{const{gl:C,camera:w,scene:T,size:D,raycaster:b,events:R,viewport:P}=ue(),[O]=A.useState(()=>document.createElement(y)),Q=A.useRef(null),V=A.useRef(null),K=A.useRef(0),k=A.useRef([0,0]),G=A.useRef(null),M=A.useRef(null),H=a?.current||R.connected||C.domElement.parentNode,Y=A.useRef(null),N=A.useRef(!1),z=A.useMemo(()=>h&&h!=="blending"||Array.isArray(h)&&h.length&&gI(h[0]),[h]);A.useLayoutEffect(()=>{const ee=C.domElement;h&&h==="blending"?(ee.style.zIndex=`${Math.floor(E[0]/2)}`,ee.style.position="absolute",ee.style.pointerEvents="none"):(ee.style.zIndex=null,ee.style.position=null,ee.style.pointerEvents=null)},[h]),A.useLayoutEffect(()=>{if(V.current){const ee=Q.current=Jy.createRoot(O);if(T.updateMatrixWorld(),u)O.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const Z=v(V.current,w,D);O.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${Z[0]}px,${Z[1]}px,0);transform-origin:0 0;`}return H&&(n?H.prepend(O):H.appendChild(O)),()=>{H&&H.removeChild(O),ee.unmount()}}},[H,u]),A.useLayoutEffect(()=>{x&&(O.className=x)},[x]);const B=A.useMemo(()=>u?{position:"absolute",top:0,left:0,width:D.width,height:D.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:s?"translate3d(-50%,-50%,0)":"none",...o&&{top:-D.height/2,left:-D.width/2,width:D.width,height:D.height},...t},[t,s,o,D,u]),F=A.useMemo(()=>({position:"absolute",pointerEvents:I}),[I]);A.useLayoutEffect(()=>{if(N.current=!1,u){var ee;(ee=Q.current)==null||ee.render(A.createElement("div",{ref:G,style:B},A.createElement("div",{ref:M,style:F},A.createElement("div",{ref:S,className:i,style:t,children:r}))))}else{var Z;(Z=Q.current)==null||Z.render(A.createElement("div",{ref:S,style:B,className:i,children:r}))}});const U=A.useRef(!0);He(ee=>{if(V.current){w.updateMatrixWorld(),V.current.updateWorldMatrix(!0,!1);const Z=u?k.current:v(V.current,w,D);if(u||Math.abs(K.current-w.zoom)>e||Math.abs(k.current[0]-Z[0])>e||Math.abs(k.current[1]-Z[1])>e){const ne=cI(V.current,w);let ce=!1;z&&(Array.isArray(h)?ce=h.map(le=>le.current):h!=="blending"&&(ce=[T]));const me=U.current;if(ce){const le=uI(V.current,w,b,ce);U.current=le&&!ne}else U.current=!ne;me!==U.current&&(f?f(!U.current):O.style.display=U.current?"block":"none");const re=Math.floor(E[0]/2),te=h?z?[E[0],re]:[re-1,0]:E;if(O.style.zIndex=`${fI(V.current,w,te)}`,u){const[le,se]=[D.width/2,D.height/2],X=w.projectionMatrix.elements[5]*se,{isOrthographicCamera:j,top:oe,left:pe,bottom:_e,right:Ce}=w,ye=dI(w.matrixWorldInverse),Ne=j?`scale(${X})translate(${wd(-(Ce+pe)/2)}px,${wd((oe+_e)/2)}px)`:`translateZ(${X}px)`;let Te=V.current.matrixWorld;c&&(Te=w.matrixWorldInverse.clone().transpose().copyPosition(Te).scale(V.current.scale),Te.elements[3]=Te.elements[7]=Te.elements[11]=0,Te.elements[15]=1),O.style.width=D.width+"px",O.style.height=D.height+"px",O.style.perspective=j?"":`${X}px`,G.current&&M.current&&(G.current.style.transform=`${Ne}${ye}translate(${le}px,${se}px)`,M.current.style.transform=mI(Te,1/((l||10)/400)))}else{const le=l===void 0?1:hI(V.current,w)*l;O.style.transform=`translate3d(${Z[0]}px,${Z[1]}px,0) scale(${le})`}k.current=Z,K.current=w.zoom}}if(!z&&Y.current&&!N.current)if(u){if(G.current){const Z=G.current.children[0];if(Z!=null&&Z.clientWidth&&Z!=null&&Z.clientHeight){const{isOrthographicCamera:ne}=w;if(ne||p)_.scale&&(Array.isArray(_.scale)?_.scale instanceof W?Y.current.scale.copy(_.scale.clone().divideScalar(1)):Y.current.scale.set(1/_.scale[0],1/_.scale[1],1/_.scale[2]):Y.current.scale.setScalar(1/_.scale));else{const ce=(l||10)/400,me=Z.clientWidth*ce,re=Z.clientHeight*ce;Y.current.scale.set(me,re,1)}N.current=!0}}}else{const Z=O.children[0];if(Z!=null&&Z.clientWidth&&Z!=null&&Z.clientHeight){const ne=1/P.factor,ce=Z.clientWidth*ne,me=Z.clientHeight*ne;Y.current.scale.set(ce,me,1),N.current=!0}Y.current.lookAt(ee.camera.position)}});const J=A.useMemo(()=>({vertexShader:u?void 0:`
1
+ import{_ as Ie}from"./extends-CF3RwP-h.js";import{r as A,a as Vn}from"./index-nmcBqr7Y.js";import{a as Jy}from"./client-DNXj_opT.js";import{U as Id,S as No,W as Zx}from"./three.module-BLhyNg0e.js";import{u as ue,a as He,I as Jx,q as _d,G as vi,s as ir,J as e4,K as Hu,e as xi,o as Wn,v as Xr,F as t4,l as ev,k as S0,L as i4}from"./events-156d8d12.esm-DmeaOP4r.js";import{fo as W,aI as bi,fd as Be,d9 as ci,d5 as Bi,az as ql,da as wr,cm as we,dp as rt,cl as Ln,ez as Vu,fp as Ei,_ as qe,aV as Pn,cj as Ze,co as ze,bu as tv,au as Ir,dw as Ti,b0 as si,ed as Ns,cE as Xt,N as Ji,M as Ai,aM as nn,ex as xn,em as hi,B as Ar,fe as Ko,K as cr,bl as n4,f1 as Hr,cW as yi,e6 as Wu,cp as ta,bX as ul,aq as Qn,a$ as $i,bV as It,db as an,cZ as Rr,ey as iv,e$ as Xl,cg as Th,bh as jo,I as Kt,aP as wh,bg as s4,fx as Fi,c1 as ni,cN as C0,Z as r4,aY as o4,b5 as nv,am as a4,ca as ia,cb as l4,aZ as ks,eX as _r,Y as Yn,eW as cn,cv as bh,cs as T0,aT as sv,F as Zm,dk as Eu,dd as Jm,eC as c4,aE as u4,ev as rv,et as h4,j as f4,f7 as d4,l as m4,fq as g4,dq as p4,cV as A4,eq as ur,a3 as Yu,aa as ov,ff as Gi,c5 as w0,dI as eg,e8 as Ms,e2 as zo,bi as fi,e0 as y4,d$ as v4,dZ as E4,dY as x4,dS as I4,dP as _4,dN as S4,dM as C4,dE as T4,av,aw as Qo,H as w4,er as b4,eo as R4,d8 as Rh,bs as b0,bt as Sd,bA as Go,fA as D4,bW as Fs,dn as L4,ag as P4,V as lv,x as M4,y as B4,cr as k4,cq as cv,dv as uv,br as xu,fb as pn,du as Ku,aO as F4,c_ as hv,cR as O4,ao as fv,dx as Iu,fj as Wr,fw as ju,a9 as dv,an as U4,el as br,T as mv,ad as R0,fs as N4,ej as gv,aC as pv,aA as Av,fm as D0,R as yv,b4 as _u,E as z4,e5 as Fl,by as ou,P as Cd,es as vv,e3 as Ev,e9 as Q4,n as G4,ch as $4,cw as xv,cx as Iv,cP as H4,dg as V4,f6 as Su,c7 as Td,cc as W4,c3 as tg,eG as Y4,cu as K4,S as j4,d as q4,ee as Dh,i as X4,bI as Lh,cU as Z4,aS as J4,aW as eI}from"./three.core-3arARmh6.js";import{v as Ol,d as _v,C as tI,u as BM}from"./Gltf-CRUmmFxv.js";import{G as VF}from"./Gltf-CRUmmFxv.js";import{m as iI,t as nI}from"./BufferGeometryUtils-FJZNEiJN.js";import{OrthographicCamera as sI}from"./OrthographicCamera-Bv8_A2mi.js";import{PerspectiveCamera as YF}from"./PerspectiveCamera-D3r6Hnc8.js";import{E as na,M as rI}from"./OrbitControls-C6LQ4Pxi.js";import{O as jF}from"./OrbitControls-C6LQ4Pxi.js";import{_ as Sv}from"./index-D8WZNJyr.js";import{g as oI}from"./_commonjsHelpers-D6-XlEtG.js";import{u as ds}from"./Fbo-Biv6Lrhl.js";import{F as XF}from"./Fbo-Biv6Lrhl.js";import{RoundedBox as JF,RoundedBoxGeometry as eO}from"./RoundedBox-DrJK5JOI.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-DzuOGwVB.js";import"./index-CtzuWnCS.js";import"./index-FUuS4qwW.js";const Ul=new W,L0=new W,aI=new W,ig=new Be;function lI(r,e,t){const i=Ul.setFromMatrixPosition(r.matrixWorld);i.project(e);const n=t.width/2,s=t.height/2;return[i.x*n+n,-(i.y*s)+s]}function cI(r,e){const t=Ul.setFromMatrixPosition(r.matrixWorld),i=L0.setFromMatrixPosition(e.matrixWorld),n=t.sub(i),s=e.getWorldDirection(aI);return n.angleTo(s)>Math.PI/2}function uI(r,e,t,i){const n=Ul.setFromMatrixPosition(r.matrixWorld),s=n.clone();s.project(e),ig.set(s.x,s.y),t.setFromCamera(ig,e);const o=t.intersectObjects(i,!0);if(o.length){const a=o[0].distance;return n.distanceTo(t.ray.origin)<a}return!0}function hI(r,e){if(e instanceof Bi)return e.zoom;if(e instanceof ci){const t=Ul.setFromMatrixPosition(r.matrixWorld),i=L0.setFromMatrixPosition(e.matrixWorld),n=e.fov*Math.PI/180,s=t.distanceTo(i);return 1/(2*Math.tan(n/2)*s)}else return 1}function fI(r,e,t){if(e instanceof ci||e instanceof Bi){const i=Ul.setFromMatrixPosition(r.matrixWorld),n=L0.setFromMatrixPosition(e.matrixWorld),s=i.distanceTo(n),o=(t[1]-t[0])/(e.far-e.near),a=t[1]-o*e.far;return Math.round(o*s+a)}}const wd=r=>Math.abs(r)<1e-10?0:r;function Cv(r,e,t=""){let i="matrix3d(";for(let n=0;n!==16;n++)i+=wd(e[n]*r.elements[n])+(n!==15?",":")");return t+i}const dI=(r=>e=>Cv(e,r))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),mI=(r=>(e,t)=>Cv(e,r(t),"translate(-50%,-50%)"))(r=>[1/r,1/r,1/r,1,-1/r,-1/r,-1/r,-1,1/r,1/r,1/r,1,1,1,1,1]);function gI(r){return r&&typeof r=="object"&&"current"in r}const qu=A.forwardRef(({children:r,eps:e=.001,style:t,className:i,prepend:n,center:s,fullscreen:o,portal:a,distanceFactor:l,sprite:c=!1,transform:u=!1,occlude:h,onOcclude:f,castShadow:d,receiveShadow:g,material:m,geometry:p,zIndexRange:E=[16777271,0],calculatePosition:v=lI,as:y="div",wrapperClass:x,pointerEvents:I="auto",..._},S)=>{const{gl:C,camera:w,scene:T,size:D,raycaster:b,events:R,viewport:P}=ue(),[O]=A.useState(()=>document.createElement(y)),Q=A.useRef(null),V=A.useRef(null),K=A.useRef(0),k=A.useRef([0,0]),G=A.useRef(null),M=A.useRef(null),H=a?.current||R.connected||C.domElement.parentNode,Y=A.useRef(null),N=A.useRef(!1),z=A.useMemo(()=>h&&h!=="blending"||Array.isArray(h)&&h.length&&gI(h[0]),[h]);A.useLayoutEffect(()=>{const ee=C.domElement;h&&h==="blending"?(ee.style.zIndex=`${Math.floor(E[0]/2)}`,ee.style.position="absolute",ee.style.pointerEvents="none"):(ee.style.zIndex=null,ee.style.position=null,ee.style.pointerEvents=null)},[h]),A.useLayoutEffect(()=>{if(V.current){const ee=Q.current=Jy.createRoot(O);if(T.updateMatrixWorld(),u)O.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const Z=v(V.current,w,D);O.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${Z[0]}px,${Z[1]}px,0);transform-origin:0 0;`}return H&&(n?H.prepend(O):H.appendChild(O)),()=>{H&&H.removeChild(O),ee.unmount()}}},[H,u]),A.useLayoutEffect(()=>{x&&(O.className=x)},[x]);const B=A.useMemo(()=>u?{position:"absolute",top:0,left:0,width:D.width,height:D.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:s?"translate3d(-50%,-50%,0)":"none",...o&&{top:-D.height/2,left:-D.width/2,width:D.width,height:D.height},...t},[t,s,o,D,u]),F=A.useMemo(()=>({position:"absolute",pointerEvents:I}),[I]);A.useLayoutEffect(()=>{if(N.current=!1,u){var ee;(ee=Q.current)==null||ee.render(A.createElement("div",{ref:G,style:B},A.createElement("div",{ref:M,style:F},A.createElement("div",{ref:S,className:i,style:t,children:r}))))}else{var Z;(Z=Q.current)==null||Z.render(A.createElement("div",{ref:S,style:B,className:i,children:r}))}});const U=A.useRef(!0);He(ee=>{if(V.current){w.updateMatrixWorld(),V.current.updateWorldMatrix(!0,!1);const Z=u?k.current:v(V.current,w,D);if(u||Math.abs(K.current-w.zoom)>e||Math.abs(k.current[0]-Z[0])>e||Math.abs(k.current[1]-Z[1])>e){const ne=cI(V.current,w);let ce=!1;z&&(Array.isArray(h)?ce=h.map(le=>le.current):h!=="blending"&&(ce=[T]));const me=U.current;if(ce){const le=uI(V.current,w,b,ce);U.current=le&&!ne}else U.current=!ne;me!==U.current&&(f?f(!U.current):O.style.display=U.current?"block":"none");const re=Math.floor(E[0]/2),te=h?z?[E[0],re]:[re-1,0]:E;if(O.style.zIndex=`${fI(V.current,w,te)}`,u){const[le,se]=[D.width/2,D.height/2],X=w.projectionMatrix.elements[5]*se,{isOrthographicCamera:j,top:oe,left:pe,bottom:_e,right:Ce}=w,ye=dI(w.matrixWorldInverse),Ne=j?`scale(${X})translate(${wd(-(Ce+pe)/2)}px,${wd((oe+_e)/2)}px)`:`translateZ(${X}px)`;let Te=V.current.matrixWorld;c&&(Te=w.matrixWorldInverse.clone().transpose().copyPosition(Te).scale(V.current.scale),Te.elements[3]=Te.elements[7]=Te.elements[11]=0,Te.elements[15]=1),O.style.width=D.width+"px",O.style.height=D.height+"px",O.style.perspective=j?"":`${X}px`,G.current&&M.current&&(G.current.style.transform=`${Ne}${ye}translate(${le}px,${se}px)`,M.current.style.transform=mI(Te,1/((l||10)/400)))}else{const le=l===void 0?1:hI(V.current,w)*l;O.style.transform=`translate3d(${Z[0]}px,${Z[1]}px,0) scale(${le})`}k.current=Z,K.current=w.zoom}}if(!z&&Y.current&&!N.current)if(u){if(G.current){const Z=G.current.children[0];if(Z!=null&&Z.clientWidth&&Z!=null&&Z.clientHeight){const{isOrthographicCamera:ne}=w;if(ne||p)_.scale&&(Array.isArray(_.scale)?_.scale instanceof W?Y.current.scale.copy(_.scale.clone().divideScalar(1)):Y.current.scale.set(1/_.scale[0],1/_.scale[1],1/_.scale[2]):Y.current.scale.setScalar(1/_.scale));else{const ce=(l||10)/400,me=Z.clientWidth*ce,re=Z.clientHeight*ce;Y.current.scale.set(me,re,1)}N.current=!0}}}else{const Z=O.children[0];if(Z!=null&&Z.clientWidth&&Z!=null&&Z.clientHeight){const ne=1/P.factor,ce=Z.clientWidth*ne,me=Z.clientHeight*ne;Y.current.scale.set(ce,me,1),N.current=!0}Y.current.lookAt(ee.camera.position)}});const J=A.useMemo(()=>({vertexShader:u?void 0:`
2
2
  /*
3
3
  This shader is from the THREE's SpriteMaterial.
4
4
  We need to turn the backing plane into a Sprite