@nebula-spatial/studio 0.0.0-stage → 0.1.0

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 (251) hide show
  1. package/README.md +206 -3
  2. package/dist/ai/contract.d.ts +73 -0
  3. package/dist/ai/host.d.ts +28 -0
  4. package/dist/asset/dependency-scan.d.ts +78 -0
  5. package/dist/asset/intake.d.ts +84 -0
  6. package/dist/asset/layout-detect.d.ts +40 -0
  7. package/dist/asset/media-type.d.ts +10 -0
  8. package/dist/asset/model-inspection.d.ts +127 -0
  9. package/dist/asset/record.d.ts +35 -0
  10. package/dist/asset/remote-asset-resolver.d.ts +36 -0
  11. package/dist/asset/repairs.d.ts +53 -0
  12. package/dist/asset/resource-locator.d.ts +15 -0
  13. package/dist/asset/revision-diff.d.ts +33 -0
  14. package/dist/asset/source-contracts.d.ts +21 -0
  15. package/dist/asset/source-paths.d.ts +15 -0
  16. package/dist/asset/usd-inspection.d.ts +39 -0
  17. package/dist/asset/usd-source-metadata.d.ts +142 -0
  18. package/dist/asset/visual-intake.d.ts +27 -0
  19. package/dist/asset/visual-record.d.ts +22 -0
  20. package/dist/asset/web-intake.d.ts +46 -0
  21. package/dist/asset-source-BExlEcRt.js +444 -0
  22. package/dist/assets/usd-export-worker-BsGubtAE.js +1 -0
  23. package/dist/builders-BAXRR5o5.js +1854 -0
  24. package/dist/core/asset-task.d.ts +105 -0
  25. package/dist/core/context.d.ts +23 -0
  26. package/dist/core/host.d.ts +432 -0
  27. package/dist/core/persistence-controller.d.ts +58 -0
  28. package/dist/core/plugins.d.ts +139 -0
  29. package/dist/core/scene-tree.d.ts +62 -0
  30. package/dist/core/versions.d.ts +2 -0
  31. package/dist/core/when.d.ts +13 -0
  32. package/dist/core/write-policy.d.ts +29 -0
  33. package/dist/delivery/build-plan.d.ts +2 -0
  34. package/dist/delivery/contracts.d.ts +362 -0
  35. package/dist/delivery/digest.d.ts +3 -0
  36. package/dist/delivery/evidence.d.ts +10 -0
  37. package/dist/delivery/export-evidence.d.ts +3 -0
  38. package/dist/delivery/index.d.ts +9 -0
  39. package/dist/delivery/prim-name.d.ts +17 -0
  40. package/dist/delivery/profile.d.ts +4 -0
  41. package/dist/doc/builders.d.ts +99 -0
  42. package/dist/doc/command.d.ts +195 -0
  43. package/dist/doc/domain-extensions.d.ts +34 -0
  44. package/dist/doc/node-facts.d.ts +87 -0
  45. package/dist/doc/physics-facts.d.ts +74 -0
  46. package/dist/doc/placement-policy.d.ts +71 -0
  47. package/dist/doc/random-placement.d.ts +30 -0
  48. package/dist/doc/scene-graph.d.ts +80 -0
  49. package/dist/doc/scene-regions.d.ts +29 -0
  50. package/dist/doc/schema.d.ts +452 -0
  51. package/dist/doc/task.d.ts +71 -0
  52. package/dist/doc/validate.d.ts +68 -0
  53. package/dist/editor/asset-source.d.ts +15 -0
  54. package/dist/editor/editor.d.ts +246 -0
  55. package/dist/editor/index.d.ts +22 -0
  56. package/dist/editor/shortcuts.d.ts +2 -0
  57. package/dist/editor/types.d.ts +143 -0
  58. package/dist/editor/ui-plugins.d.ts +64 -0
  59. package/dist/editor.js +1755 -0
  60. package/dist/editorial-BkAFWfbg.js +83 -0
  61. package/dist/export-evidence-B_0zRmb8.js +5027 -0
  62. package/dist/generalization/domain.d.ts +10 -0
  63. package/dist/generalization/generalization.d.ts +371 -0
  64. package/dist/generalization/index.d.ts +11 -0
  65. package/dist/generalization.js +1659 -0
  66. package/dist/history/undo-stack.d.ts +74 -0
  67. package/dist/index.d.ts +91 -0
  68. package/dist/index.js +2839 -0
  69. package/dist/persist/content-addressed.d.ts +11 -0
  70. package/dist/persist/create-scene-package-from-host.d.ts +7 -0
  71. package/dist/persist/indexeddb-store.d.ts +69 -0
  72. package/dist/persist/scene-file.d.ts +52 -0
  73. package/dist/persist/scene-package.d.ts +8 -0
  74. package/dist/persist/snapshot.d.ts +5 -0
  75. package/dist/physics-facts-tfQYyNTD.js +337 -0
  76. package/dist/placement-policy-DY_FNRDu.js +405 -0
  77. package/dist/ports/asset-ingestor.d.ts +41 -0
  78. package/dist/ports/asset-source.d.ts +57 -0
  79. package/dist/ports/delivery.d.ts +13 -0
  80. package/dist/ports/persistence.d.ts +29 -0
  81. package/dist/project/asset-catalog.d.ts +21 -0
  82. package/dist/project/contracts.d.ts +272 -0
  83. package/dist/project/editorial.d.ts +16 -0
  84. package/dist/project/identity.d.ts +20 -0
  85. package/dist/project/index.d.ts +9 -0
  86. package/dist/project/scene-document.d.ts +5 -0
  87. package/dist/project/source-dependencies.d.ts +7 -0
  88. package/dist/remote-asset-resolver-Cb8cfNmw.js +136 -0
  89. package/dist/scene/index.d.ts +12 -0
  90. package/dist/scene-graph-DBLKAhxa.js +681 -0
  91. package/dist/scene-session-BV1HnxNh.js +3506 -0
  92. package/dist/scene.js +244 -0
  93. package/dist/studio/delivery-catalog.d.ts +28 -0
  94. package/dist/studio/in-memory-asset-source.d.ts +15 -0
  95. package/dist/studio/index.d.ts +31 -0
  96. package/dist/studio/indexeddb-asset-source.d.ts +32 -0
  97. package/dist/studio/indexeddb-persistence.d.ts +13 -0
  98. package/dist/studio/remote-asset-importer.d.ts +56 -0
  99. package/dist/studio/source-package.d.ts +9 -0
  100. package/dist/studio/usd-export-client.d.ts +13 -0
  101. package/dist/studio/usd-export-protocol.d.ts +98 -0
  102. package/dist/studio/usd-export-worker.d.ts +1 -0
  103. package/dist/studio/usd-zip-reader.d.ts +14 -0
  104. package/dist/studio/web-asset-ingestor.d.ts +10 -0
  105. package/dist/studio/web-host.d.ts +8 -0
  106. package/dist/studio.js +5544 -0
  107. package/dist/util/asset-facts.d.ts +3 -0
  108. package/dist/util/data.d.ts +17 -0
  109. package/dist/util/diagnostics.d.ts +38 -0
  110. package/dist/util/geometry.d.ts +11 -0
  111. package/dist/util/hash.d.ts +9 -0
  112. package/dist/util/ids.d.ts +20 -0
  113. package/dist/util/math.d.ts +47 -0
  114. package/dist/util/ply-metadata.d.ts +19 -0
  115. package/dist/util/studio-source.d.ts +23 -0
  116. package/dist/version.d.ts +5 -0
  117. package/dist/view/appearance.d.ts +13 -0
  118. package/dist/view/authoring-appearance.d.ts +25 -0
  119. package/dist/view/bounds-preview.d.ts +34 -0
  120. package/dist/view/bounds.d.ts +11 -0
  121. package/dist/view/camera-zoom.d.ts +3 -0
  122. package/dist/view/geometry-anchors.d.ts +20 -0
  123. package/dist/view/gizmo-appearance.d.ts +5 -0
  124. package/dist/view/gizmo.d.ts +81 -0
  125. package/dist/view/group-selection.d.ts +13 -0
  126. package/dist/view/node-features.d.ts +39 -0
  127. package/dist/view/picking.d.ts +49 -0
  128. package/dist/view/placement.d.ts +48 -0
  129. package/dist/view/region-editing.d.ts +25 -0
  130. package/dist/view/rotation-guide.d.ts +36 -0
  131. package/dist/view/runtime-capabilities.d.ts +22 -0
  132. package/dist/view/scene-session.d.ts +258 -0
  133. package/dist/view/screen-bounds.d.ts +17 -0
  134. package/dist/view/selection-transform.d.ts +20 -0
  135. package/node_modules/@nebula-spatial/cad-loader/CHANGELOG.md +48 -0
  136. package/node_modules/@nebula-spatial/cad-loader/README.md +108 -0
  137. package/node_modules/@nebula-spatial/cad-loader/dist/core/cad-types.d.ts +26 -0
  138. package/node_modules/@nebula-spatial/cad-loader/dist/core/errors.d.ts +5 -0
  139. package/node_modules/@nebula-spatial/cad-loader/dist/core/index.d.ts +24 -0
  140. package/node_modules/@nebula-spatial/cad-loader/dist/core/index.js +2354 -0
  141. package/node_modules/@nebula-spatial/cad-loader/dist/core/parser/bin-group-reader.d.ts +9 -0
  142. package/node_modules/@nebula-spatial/cad-loader/dist/core/parser/bin-parser.d.ts +78 -0
  143. package/node_modules/@nebula-spatial/cad-loader/dist/core/parser/dxbs-sidecar.d.ts +24 -0
  144. package/node_modules/@nebula-spatial/cad-loader/dist/core/parser/geometry-segments.d.ts +20 -0
  145. package/node_modules/@nebula-spatial/cad-loader/dist/core/parser/text-roundtrip.d.ts +4 -0
  146. package/node_modules/@nebula-spatial/cad-loader/dist/core/parser/types.d.ts +81 -0
  147. package/node_modules/@nebula-spatial/cad-loader/dist/core/runtime-text-decoder.d.ts +8 -0
  148. package/node_modules/@nebula-spatial/cad-loader/dist/core/types.d.ts +153 -0
  149. package/node_modules/@nebula-spatial/cad-loader/dist/core/utils/insert-bbox.d.ts +10 -0
  150. package/node_modules/@nebula-spatial/cad-loader/dist/core/utils/viewport-rect.d.ts +21 -0
  151. package/node_modules/@nebula-spatial/cad-loader/dist/index.d.ts +36 -0
  152. package/node_modules/@nebula-spatial/cad-loader/dist/index.js +5829 -0
  153. package/node_modules/@nebula-spatial/cad-loader/dist/loader/geo-loader.d.ts +59 -0
  154. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/automatic-external-resources.d.ts +26 -0
  155. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/external-variant-sidecar-fetch.d.ts +13 -0
  156. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/flow-control.d.ts +29 -0
  157. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/frame-budget-scheduler.d.ts +21 -0
  158. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-compact-executor.d.ts +19 -0
  159. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-loader-local-adapter.d.ts +2 -0
  160. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-loader-pipeline.d.ts +92 -0
  161. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-loader-worker-adapter.d.ts +13 -0
  162. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-node-builder.d.ts +34 -0
  163. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-node-load-sink.d.ts +28 -0
  164. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-node.d.ts +304 -0
  165. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-prepare-worker-types.d.ts +94 -0
  166. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-prepare.d.ts +38 -0
  167. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/geo-prepare.worker.d.ts +1 -0
  168. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/insert-model-builder.d.ts +10 -0
  169. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/insert-runtime-geometry.d.ts +15 -0
  170. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/line-canonical.d.ts +37 -0
  171. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/line-quality.d.ts +9 -0
  172. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/prepare-credit-gate.d.ts +20 -0
  173. package/node_modules/@nebula-spatial/cad-loader/dist/loader/internal/transport.d.ts +2 -0
  174. package/node_modules/@nebula-spatial/cad-loader/dist/render-resource/cad-render-node.d.ts +80 -0
  175. package/node_modules/@nebula-spatial/cad-loader/dist/render-resource/geo-node-cad-render-node.d.ts +12 -0
  176. package/node_modules/@nebula-spatial/cad-loader/dist/scene/geo-cad-line-geometry.d.ts +28 -0
  177. package/node_modules/@nebula-spatial/cad-loader/dist/scene/geo-cad-line-material.d.ts +18 -0
  178. package/node_modules/@nebula-spatial/cad-loader/dist/scene/instancing/block-geometry-registry.d.ts +35 -0
  179. package/node_modules/@nebula-spatial/cad-loader/dist/scene/instancing/insert-instance-table.d.ts +23 -0
  180. package/node_modules/@nebula-spatial/cad-loader/dist/scene/instancing/viewport-instance-presenter.d.ts +66 -0
  181. package/node_modules/@nebula-spatial/cad-loader/dist/selection/cad-insert-selection.d.ts +35 -0
  182. package/node_modules/@nebula-spatial/cad-loader/dist/selection/cad-text-selection.d.ts +31 -0
  183. package/node_modules/@nebula-spatial/cad-loader/dist/session/annotation-idle-gate.d.ts +14 -0
  184. package/node_modules/@nebula-spatial/cad-loader/dist/session/cad-document-session.d.ts +187 -0
  185. package/node_modules/@nebula-spatial/cad-loader/dist/session/cad-font-runtime.d.ts +11 -0
  186. package/node_modules/@nebula-spatial/cad-loader/dist/session/cad-insert-id.d.ts +6 -0
  187. package/node_modules/@nebula-spatial/cad-loader/dist/session/cad-text-warmup.d.ts +38 -0
  188. package/node_modules/@nebula-spatial/cad-loader/dist/session/create-cad-document-session.d.ts +5 -0
  189. package/node_modules/@nebula-spatial/cad-loader/dist/session/load-session.d.ts +90 -0
  190. package/node_modules/@nebula-spatial/cad-loader/dist/session/viewport-coverage.d.ts +32 -0
  191. package/node_modules/@nebula-spatial/cad-loader/dist/shared/abort.d.ts +3 -0
  192. package/node_modules/@nebula-spatial/cad-loader/dist/shared/cad-display-color.d.ts +55 -0
  193. package/node_modules/@nebula-spatial/cad-loader/dist/shared/cad-load-source.d.ts +8 -0
  194. package/node_modules/@nebula-spatial/cad-loader/dist/shared/color-buffer.d.ts +6 -0
  195. package/node_modules/@nebula-spatial/cad-loader/dist/shared/constants.d.ts +11 -0
  196. package/node_modules/@nebula-spatial/cad-loader/dist/shared/display-color-buffer.d.ts +27 -0
  197. package/node_modules/@nebula-spatial/cad-loader/dist/shared/errors.d.ts +2 -0
  198. package/node_modules/@nebula-spatial/cad-loader/dist/shared/text-builder.d.ts +25 -0
  199. package/node_modules/@nebula-spatial/cad-loader/dist/shared/text-font.d.ts +12 -0
  200. package/node_modules/@nebula-spatial/cad-loader/dist/shared/types.d.ts +57 -0
  201. package/node_modules/@nebula-spatial/cad-loader/dist/shared/utils/insert-bbox.d.ts +1 -0
  202. package/node_modules/@nebula-spatial/cad-loader/dist/shared/utils/timing.d.ts +2 -0
  203. package/node_modules/@nebula-spatial/cad-loader/dist/shared/utils/viewport-rect.d.ts +1 -0
  204. package/node_modules/@nebula-spatial/cad-loader/dist/shared/viewer-theme.d.ts +2 -0
  205. package/node_modules/@nebula-spatial/cad-loader/dist/workers/geo-prepare.worker.js +2264 -0
  206. package/node_modules/@nebula-spatial/cad-loader/package.json +62 -0
  207. package/node_modules/@nebula-spatial/viewer/CHANGELOG.md +426 -0
  208. package/node_modules/@nebula-spatial/viewer/FBX-MATERIAL-CONVERSION.md +97 -0
  209. package/node_modules/@nebula-spatial/viewer/README.md +1056 -0
  210. package/node_modules/@nebula-spatial/viewer/USD-VISUAL-MATERIAL-SUPPORT.md +89 -0
  211. package/node_modules/@nebula-spatial/viewer/basis/basis_transcoder.js +19 -0
  212. package/node_modules/@nebula-spatial/viewer/basis/basis_transcoder.wasm +0 -0
  213. package/node_modules/@nebula-spatial/viewer/dist/asset-ir-DEOK9SqE.js +382 -0
  214. package/node_modules/@nebula-spatial/viewer/dist/assets/ground-grid.d.ts +6 -0
  215. package/node_modules/@nebula-spatial/viewer/dist/assets/source-types.d.ts +19 -0
  216. package/node_modules/@nebula-spatial/viewer/dist/assets/types.d.ts +393 -0
  217. package/node_modules/@nebula-spatial/viewer/dist/assets/usd-worker-Bom5cjz3.js +1392 -0
  218. package/node_modules/@nebula-spatial/viewer/dist/cad/text.d.ts +2 -0
  219. package/node_modules/@nebula-spatial/viewer/dist/cad/types.d.ts +368 -0
  220. package/node_modules/@nebula-spatial/viewer/dist/index-ByBlfVc0.js +12132 -0
  221. package/node_modules/@nebula-spatial/viewer/dist/index.d.ts +32 -0
  222. package/node_modules/@nebula-spatial/viewer/dist/index.js +26 -0
  223. package/node_modules/@nebula-spatial/viewer/dist/inspection/types.d.ts +112 -0
  224. package/node_modules/@nebula-spatial/viewer/dist/mjcf-visual-DVRa0w90.js +72 -0
  225. package/node_modules/@nebula-spatial/viewer/dist/mujoco-runtime-Dhx6Ua2u.js +463 -0
  226. package/node_modules/@nebula-spatial/viewer/dist/plugins.d.ts +179 -0
  227. package/node_modules/@nebula-spatial/viewer/dist/scene/instances.d.ts +36 -0
  228. package/node_modules/@nebula-spatial/viewer/dist/scene/types.d.ts +258 -0
  229. package/node_modules/@nebula-spatial/viewer/dist/session-B-j6KdA-.js +389 -0
  230. package/node_modules/@nebula-spatial/viewer/dist/session-B4AICTeJ.js +963 -0
  231. package/node_modules/@nebula-spatial/viewer/dist/session-BAG5cDYe.js +9153 -0
  232. package/node_modules/@nebula-spatial/viewer/dist/simulation/mujoco-runtime.d.ts +118 -0
  233. package/node_modules/@nebula-spatial/viewer/dist/simulation/mujoco-wasm-module.d.ts +11 -0
  234. package/node_modules/@nebula-spatial/viewer/dist/simulation/openusd-wasm-module.d.ts +10 -0
  235. package/node_modules/@nebula-spatial/viewer/dist/simulation/physics-runtime-state.d.ts +75 -0
  236. package/node_modules/@nebula-spatial/viewer/dist/simulation/types.d.ts +129 -0
  237. package/node_modules/@nebula-spatial/viewer/dist/simulation/usd-inspection.d.ts +66 -0
  238. package/node_modules/@nebula-spatial/viewer/dist/simulation/usd-query.d.ts +50 -0
  239. package/node_modules/@nebula-spatial/viewer/dist/simulation/usd-resource-policy.d.ts +28 -0
  240. package/node_modules/@nebula-spatial/viewer/dist/types.d.ts +278 -0
  241. package/node_modules/@nebula-spatial/viewer/dist/ui/types.d.ts +48 -0
  242. package/node_modules/@nebula-spatial/viewer/dist/urdf-session-kemAnBn8.js +3231 -0
  243. package/node_modules/@nebula-spatial/viewer/dist/usd-session-QtwGKI7v.js +6771 -0
  244. package/node_modules/@nebula-spatial/viewer/dist/version.d.ts +5 -0
  245. package/node_modules/@nebula-spatial/viewer/dist/viewer.d.ts +2 -0
  246. package/node_modules/@nebula-spatial/viewer/dist/xacro-CYTPS7mh.js +1537 -0
  247. package/node_modules/@nebula-spatial/viewer/openusd/openusd-runtime-manifest.json +15 -0
  248. package/node_modules/@nebula-spatial/viewer/openusd/openusd_probe.js +14 -0
  249. package/node_modules/@nebula-spatial/viewer/openusd/openusd_probe.wasm +0 -0
  250. package/node_modules/@nebula-spatial/viewer/package.json +66 -0
  251. package/package.json +87 -6
package/dist/index.js ADDED
@@ -0,0 +1,2839 @@
1
+ import { b as _t, c as vt, s as U, a as Rt, v as Ae, d as Nt, e as Pt, f as Tt, g as be } from "./builders-BAXRR5o5.js";
2
+ import { C as Ks, h as Hs, D as Ys, S as Js, i as Zs, j as Ws, k as Xs, l as qs, m as Qs, n as eo, o as to, p as no, q as so, r as oo, t as ro, u as io, w as ao, x as co, y as lo, z as uo, A as fo, B as mo, E as ho, F as po, G as go, H as So, I as Eo, J as yo, K as Io, L as Co, M as Ao, N as bo, O as _o, P as vo, Q as Ro, R as No, T as Po, U as To, V as wo, W as Mo, X as xo, Y as Oo, Z as Do, _ as Uo, $ as Lo, a0 as ko, a1 as $o, a2 as Fo, a3 as Go, a4 as Vo, a5 as Bo } from "./builders-BAXRR5o5.js";
3
+ import { q as wt, c as Mt, l as xt, d as je, a as Ke, w as Ot, S as Dt } from "./scene-graph-DBLKAhxa.js";
4
+ import { A as jo, G as Ko, I as Ho, b as Yo, e as Jo, f as Zo, g as Wo, h as Xo, i as qo, j as Qo, k as er, m as tr, n as nr, o as sr, p as or, r as rr, s as ir, t as ar, u as cr, v as lr, x as ur, y as dr, z as fr, B as mr, C as hr, D as pr, E as gr, F as Sr, H as Er, J as yr, K as Ir, L as Cr, M as Ar, N as br, O as _r, P as vr, Q as Rr, R as Nr, T as Pr, U as Tr } from "./scene-graph-DBLKAhxa.js";
5
+ import { n as ue, a as w, r as Ut, m as _e, b as rt, c as Lt } from "./asset-source-BExlEcRt.js";
6
+ import { S as Mr, d as xr, e as Or, f as Dr, g as Ur, h as Lr, i as kr, p as $r, j as Fr, k as Gr, l as Vr, s as Br, o as zr, q as jr, v as Kr } from "./asset-source-BExlEcRt.js";
7
+ import { r as He, J as re, s as ve, i as Ie, a as kt, n as Ce, b as $t, c as K, p as Ft, d as Gt, e as Vt, f as it, g as Bt, h as zt } from "./export-evidence-B_0zRmb8.js";
8
+ import { I as Yr, j as Jr, S as Zr, k as Wr, l as Xr, m as qr, o as Qr, q as ei, t as ti, u as ni, v as si, w as oi, x as ri, y as ii, z as ai, A as ci, B as li, C as ui, D as di, E as fi, F as mi, G as hi, H as pi, K as gi, L as Si, M as Ei, N as yi, O as Ii, P as Ci, Q as Ai, R as bi, T as _i, U as vi, V as Ri, W as Ni, X as Pi, Y as Ti, Z as wi, _ as Mi, $ as xi, a0 as Oi, a1 as Di, a2 as Ui, a3 as Li, a4 as ki, a5 as $i, a6 as Fi, a7 as Gi, a8 as Vi } from "./export-evidence-B_0zRmb8.js";
9
+ import { D as zi, a as ji, b as Ki, c as Hi, d as Yi, e as Ji, f as Zi, g as Wi, h as Xi, i as qi, j as Qi, m as ea, n as ta, k as na, p as sa, l as oa, s as ra, o as ia, u as aa } from "./placement-policy-DY_FNRDu.js";
10
+ import { a as at } from "./editorial-BkAFWfbg.js";
11
+ import { c as la, e as ua, b as da, n as fa } from "./editorial-BkAFWfbg.js";
12
+ import { D as ha, N as pa, g as ga, a as Sa, b as Ea, c as ya, n as Ia, d as Ca, r as Aa } from "./physics-facts-tfQYyNTD.js";
13
+ const jt = "0.1.0", Kt = "@nebula-spatial/studio", Ye = "__NEBULA_SPATIAL_SIM_STUDIO_BANNER_PRINTED__";
14
+ function Je() {
15
+ const e = `%c ${Kt} %c v${jt} `;
16
+ console.log(e, "background:#111827;color:#ffffff;padding:4px 10px;border-radius:4px 0 0 4px;font-weight:700;", "background:#6366F1;color:#ffffff;padding:4px 10px;border-radius:0 4px 4px 0;font-weight:700;");
17
+ }
18
+ try {
19
+ const e = globalThis;
20
+ e[Ye] || (e[Ye] = !0, Je());
21
+ } catch {
22
+ Je();
23
+ }
24
+ function As(e, t) {
25
+ if (!Number.isInteger(t.seed)) throw new Error("Scatter seed must be an integer.");
26
+ if (!Number.isInteger(t.count) || t.count <= 0) throw new Error("Scatter count must be a positive integer.");
27
+ if (t.region.minX > t.region.maxX || t.region.minY > t.region.maxY)
28
+ throw new Error("Scatter region bounds are invalid.");
29
+ if (t.size.some((a) => !Number.isFinite(a) || a <= 0))
30
+ throw new Error("Scatter placeholder size must contain positive finite values.");
31
+ const n = Ht(t.seed), o = t.yawRangeRadians ?? [0, Math.PI * 2], s = `batch_seeded_${t.seed}`, r = [], c = [], i = [];
32
+ for (let a = 0; a < t.count; a += 1) {
33
+ const l = {
34
+ position: [
35
+ fe(t.region.minX, t.region.maxX, n()),
36
+ fe(t.region.minY, t.region.maxY, n()),
37
+ t.region.z
38
+ ],
39
+ rotation: wt(fe(o[0], o[1], n())),
40
+ scale: [1, 1, 1]
41
+ }, u = Mt({
42
+ nodeId: `${t.nodeIdPrefix}${a + 1}`,
43
+ label: `${t.labelPrefix ?? "Seeded placeholder"} ${a + 1}`,
44
+ size: t.size,
45
+ localTransform: l
46
+ });
47
+ r.push(l), c.push(u), i.push(_t(u, e.root.nodeId, {
48
+ batchId: s,
49
+ label: `Scatter ${t.count} placeholders with seed ${t.seed}`,
50
+ source: "human"
51
+ }));
52
+ }
53
+ return { seed: t.seed, placements: r, nodes: c, records: i };
54
+ }
55
+ function Ht(e) {
56
+ let t = e >>> 0 || 1831565813;
57
+ return () => {
58
+ t += 1831565813;
59
+ let n = t;
60
+ return n = Math.imul(n ^ n >>> 15, n | 1), n ^= n + Math.imul(n ^ n >>> 7, n | 61), ((n ^ n >>> 14) >>> 0) / 4294967296;
61
+ };
62
+ }
63
+ function fe(e, t, n) {
64
+ return e + (t - e) * n;
65
+ }
66
+ function bs(e, t) {
67
+ const n = He(e), o = He(t), s = ue(n.locator), r = ue(o.locator), c = w(s), i = w(r), a = c !== i, l = !a && n.sha256 !== o.sha256, u = [];
68
+ a && u.push({
69
+ kind: "entry-locator-changed",
70
+ previousLocator: s,
71
+ nextLocator: r
72
+ }), l && u.push({
73
+ kind: "entry-content-changed",
74
+ previousSha256: n.sha256,
75
+ nextSha256: o.sha256
76
+ });
77
+ const f = Ze(e, n), m = Ze(t, o), d = [.../* @__PURE__ */ new Set([
78
+ ...f.keys(),
79
+ ...m.keys()
80
+ ])].sort(), g = [], p = [], S = [];
81
+ for (const C of d) {
82
+ const v = f.get(C), _ = m.get(C);
83
+ v && _ ? v.sha256 !== _.sha256 && g.push({
84
+ kind: "dependency-content-changed",
85
+ url: v.url,
86
+ previousSha256: v.sha256,
87
+ nextSha256: _.sha256
88
+ }) : v ? p.push({
89
+ kind: "dependency-removed",
90
+ url: v.url,
91
+ previousSha256: v.sha256
92
+ }) : _ && S.push({
93
+ kind: "dependency-added",
94
+ url: _.url,
95
+ nextSha256: _.sha256
96
+ });
97
+ }
98
+ u.push(...g, ...p, ...S);
99
+ const I = u.some((C) => C.kind === "dependency-content-changed" || C.kind === "dependency-added" || C.kind === "dependency-removed");
100
+ return {
101
+ previousRevisionId: e.revisionId,
102
+ nextRevisionId: t.revisionId,
103
+ entryLocatorChanged: a,
104
+ entryContentChanged: l,
105
+ dependencyChanged: I,
106
+ changes: u
107
+ };
108
+ }
109
+ function Ze(e, t) {
110
+ const n = /* @__PURE__ */ new Map();
111
+ for (const o of e.resources) {
112
+ if (o.resourceId === t.resourceId) continue;
113
+ const s = ue(o.locator), r = w(s);
114
+ n.set(r, {
115
+ url: s.kind === "remote-url" ? s.url : s.path,
116
+ sha256: o.sha256
117
+ });
118
+ }
119
+ return n;
120
+ }
121
+ const Yt = Object.freeze({
122
+ renderable: !0,
123
+ collidable: !1,
124
+ rigidBody: !1,
125
+ articulated: !1
126
+ });
127
+ function Jt(e) {
128
+ const t = [...e.resources].map((o) => ({
129
+ ...o,
130
+ locator: ue(o.locator)
131
+ })).sort((o, s) => w(o.locator).localeCompare(w(s.locator)) || o.resourceId.localeCompare(s.resourceId)), n = {
132
+ assetId: e.assetId,
133
+ label: e.label,
134
+ format: e.format,
135
+ entryResourceId: e.entryResourceId,
136
+ resources: t,
137
+ capabilities: Yt,
138
+ upAxis: e.upAxis ?? Zt(e.format),
139
+ suggestedScale: e.suggestedScale ?? [1, 1, 1],
140
+ ...e.bounds ? { bounds: e.bounds } : {},
141
+ ...e.metrics ? { metrics: e.metrics } : {}
142
+ };
143
+ return {
144
+ visualRevisionId: e.visualRevisionId,
145
+ ...n,
146
+ contentHash: vt(n),
147
+ provenance: { ...e.provenance }
148
+ };
149
+ }
150
+ function _s(e) {
151
+ const t = e.resources.find((n) => n.resourceId === e.entryResourceId);
152
+ if (!t)
153
+ throw new Error(`Visual revision ${e.visualRevisionId} is missing its entry resource.`);
154
+ return t;
155
+ }
156
+ function Zt(e) {
157
+ return e.startsWith("gaussian-") ? "y-down" : "y";
158
+ }
159
+ const Wt = /^(?:f_dc_\d+|f_rest_\d+|opacity|scale_\d+|rot_\d+|packed_(?:position|rotation|scale|color))$/i, Xt = /^(?:x|y|z|red|green|blue|r|g|b)$/i;
160
+ function ct(e) {
161
+ var g;
162
+ const t = e instanceof Uint8Array ? e : new Uint8Array(e), n = new TextDecoder("latin1").decode(
163
+ t.subarray(0, Math.min(t.byteLength, 1024 * 1024))
164
+ ), o = n.search(/\r?\nend_header\s*(?:\r?\n|$)/i);
165
+ if (o < 0)
166
+ return { kind: "unsupported", reason: "PLY header is missing end_header." };
167
+ const s = n.slice(0, o + 1).split(/\r?\n/).map((p) => p.trim()).filter(Boolean);
168
+ if (((g = s[0]) == null ? void 0 : g.toLowerCase()) !== "ply")
169
+ return { kind: "unsupported", reason: "PLY magic is missing." };
170
+ let r = null, c = 0, i = 0, a = null;
171
+ const l = [], u = [];
172
+ for (const p of s.slice(1)) {
173
+ const S = p.split(/\s+/);
174
+ if (S[0] === "format" && (r = S[1] ?? null), S[0] === "element" && S[1] && (a = S[1].toLowerCase(), l.push(a), a === "vertex" && (c = We(S[2])), a === "face" && (i = We(S[2]))), S[0] === "property" && a === "vertex") {
175
+ const I = S.at(-1);
176
+ I && u.push(I);
177
+ }
178
+ }
179
+ const f = { format: r, vertexCount: c, faceCount: i, properties: u, elements: l };
180
+ if (c <= 0)
181
+ return { kind: "unsupported", reason: "PLY has no vertex data.", ply: f };
182
+ if (i > 0 || l.includes("face"))
183
+ return { kind: "ply-mesh", reason: "PLY declares a face element.", ply: f };
184
+ if (u.some((p) => Wt.test(p)))
185
+ return { kind: "gaussian-ply", reason: "PLY declares Gaussian splat properties.", ply: f };
186
+ const m = new Set(u.map((p) => p.toLowerCase()));
187
+ if (!["x", "y", "z"].every((p) => m.has(p)))
188
+ return { kind: "unsupported", reason: "PLY point cloud is missing x/y/z fields.", ply: f };
189
+ const d = ["red", "green", "blue"].filter((p) => m.has(p));
190
+ return d.length !== 0 && d.length !== 3 ? { kind: "unsupported", reason: "PLY point cloud has an incomplete RGB field set.", ply: f } : u.some((p) => !Xt.test(p)) ? {
191
+ kind: "unsupported",
192
+ reason: "PLY has no faces and contains fields outside the supported point-cloud layout.",
193
+ ply: f
194
+ } : {
195
+ kind: "ply-point-cloud",
196
+ reason: "PLY has xyz vertices, no faces and no Gaussian fields.",
197
+ ply: f
198
+ };
199
+ }
200
+ function We(e) {
201
+ const t = Number(e);
202
+ return Number.isInteger(t) && t >= 0 ? t : 0;
203
+ }
204
+ const qt = /* @__PURE__ */ new Set([
205
+ ".glb",
206
+ ".gltf",
207
+ ".fbx",
208
+ ".ply",
209
+ ".spz",
210
+ ".splat",
211
+ ".ksplat",
212
+ ".sog",
213
+ ".rad"
214
+ ]);
215
+ async function vs(e, t = {}) {
216
+ const n = [];
217
+ let o = await Qt(e, n);
218
+ const s = await en(o, n);
219
+ if (s.length > 0) {
220
+ const l = [], u = [];
221
+ for (const f of s) {
222
+ const m = await Xe([f], f.path, t, n, !0);
223
+ m && (l.push(m.revision), u.push(m.source));
224
+ }
225
+ return q(l, u, n, s.map((f) => f.path));
226
+ }
227
+ if (n.some((l) => l.code === "VISUAL_INTAKE_SOG_VERSION_UNSUPPORTED"))
228
+ return q([], [], n, []);
229
+ o = await nn(o, n);
230
+ const r = sn(o), c = r.flatMap((l) => l.files.map((u) => u.path).filter(qe)).sort();
231
+ if (r.length === 0 || c.length === 0)
232
+ return n.push({
233
+ code: "VISUAL_INTAKE_UNSUPPORTED",
234
+ level: "error",
235
+ message: "No supported visual entry was found (GLB, glTF, FBX, PLY, SPZ, SPLAT, KSPLAT, SOG or RAD)."
236
+ }), q([], [], n, []);
237
+ if (c.length > 1 && !t.entry)
238
+ return n.push({
239
+ code: "VISUAL_INTAKE_AMBIGUOUS_ENTRY",
240
+ level: "warning",
241
+ message: `Multiple visual entries were found: ${c.join(", ")}.`
242
+ }), q([], [], n, c);
243
+ const i = [], a = [];
244
+ for (const l of r) {
245
+ const u = l.files.map((d) => d.path).filter(qe), f = t.entry ? Re(t.entry) : u.length === 1 ? u[0] : null;
246
+ if (!f) continue;
247
+ const m = await Xe(l.files, f, t, n, !1);
248
+ m && (i.push(m.revision), a.push(m.source));
249
+ }
250
+ return q(i, a, n, c);
251
+ }
252
+ async function Xe(e, t, n, o, s) {
253
+ var g;
254
+ const r = e.find((p) => p.path === t);
255
+ if (!r)
256
+ return o.push({
257
+ code: "VISUAL_INTAKE_ENTRY_MISSING",
258
+ level: "error",
259
+ message: `Visual entry is missing from the selected files: ${t}`
260
+ }), null;
261
+ const c = on(r.path, r.bytes, s);
262
+ if (!c)
263
+ return o.push({
264
+ code: "VISUAL_INTAKE_UNSUPPORTED_ENTRY",
265
+ level: "error",
266
+ message: `Visual entry format is unsupported or ambiguous: ${r.path}`
267
+ }), null;
268
+ const i = `res_${U(r.bytes).slice(0, 24)}`, a = [], l = /* @__PURE__ */ new Set();
269
+ for (const p of e) {
270
+ const S = U(p.bytes), I = `res_${S.slice(0, 24)}`, C = p.path === t ? i : l.has(I) ? `res_${U(new TextEncoder().encode(`${S}:${p.path}`)).slice(0, 24)}` : I;
271
+ l.add(C), a.push({
272
+ resourceId: C,
273
+ locator: { kind: "package-path", path: p.path },
274
+ mediaType: _e(p.path),
275
+ byteSize: p.bytes.byteLength,
276
+ sha256: S
277
+ });
278
+ }
279
+ const u = n.visualRevisionId ?? `vrev_${Rt()}`, f = n.label ?? cn(r.path), m = rn(c, r.bytes, a);
280
+ return {
281
+ revision: Jt({
282
+ visualRevisionId: u,
283
+ assetId: n.assetId ?? `visual_${ln(f)}`,
284
+ label: f,
285
+ format: c,
286
+ entryResourceId: i,
287
+ resources: a,
288
+ suggestedScale: [1, 1, 1],
289
+ ...m ? { metrics: m } : {},
290
+ provenance: {
291
+ source: n.provenance ?? "user",
292
+ ...n.sourceUrl ? { sourceUrl: n.sourceUrl } : {},
293
+ ...n.license ? { license: n.license } : {},
294
+ importedAt: ((g = n.now) == null ? void 0 : g.call(n)) ?? (/* @__PURE__ */ new Date()).toISOString()
295
+ }
296
+ }),
297
+ source: {
298
+ assetId: u,
299
+ entryLocator: { kind: "package-path", path: r.path },
300
+ files: e.map((p) => ({
301
+ locator: { kind: "package-path", path: p.path },
302
+ blob: p.blob
303
+ }))
304
+ }
305
+ };
306
+ }
307
+ async function Qt(e, t) {
308
+ const n = [];
309
+ for (const o of e) {
310
+ const s = new Uint8Array(await o.blob.arrayBuffer()), r = Re(o.path ?? o.name);
311
+ if (!r) {
312
+ t.push({
313
+ code: "VISUAL_INTAKE_INVALID_PATH",
314
+ level: "error",
315
+ message: `Visual file has no usable path: ${o.name}`
316
+ });
317
+ continue;
318
+ }
319
+ n.push({
320
+ path: r,
321
+ blob: new Blob([ut(s)], {
322
+ type: Ut(r, o.blob.type) ?? _e(r)
323
+ }),
324
+ bytes: s
325
+ });
326
+ }
327
+ return n;
328
+ }
329
+ async function en(e, t) {
330
+ const n = [];
331
+ for (const o of e) {
332
+ const s = o.path.toLowerCase();
333
+ if (!(!(s.endsWith(".zip") || s.endsWith(".sog")) || !lt(o.bytes)))
334
+ try {
335
+ const r = await re.loadAsync(o.bytes), c = Object.values(r.files).filter((i) => !i.dir && i.name.toLowerCase().endsWith(".json"));
336
+ for (const i of c) {
337
+ const a = JSON.parse(await i.async("string"));
338
+ if (!tn(a)) continue;
339
+ const l = Number(a.version);
340
+ if (Number.isInteger(l) && l > 2) {
341
+ t.push({
342
+ code: "VISUAL_INTAKE_SOG_VERSION_UNSUPPORTED",
343
+ level: "error",
344
+ message: `SOG v${l} is not supported by the current Spark decoder; rewrite it with --sog-version 2.`
345
+ });
346
+ break;
347
+ }
348
+ n.push({
349
+ ...o,
350
+ path: /\.sog(?:\.zip)?$/i.test(o.path) ? o.path : o.path.replace(/\.zip$/i, ".sog.zip")
351
+ });
352
+ break;
353
+ }
354
+ } catch {
355
+ }
356
+ }
357
+ return n;
358
+ }
359
+ function tn(e) {
360
+ if (!e || typeof e != "object" || Array.isArray(e)) return !1;
361
+ const t = e;
362
+ return ["means", "scales", "quats", "sh0"].every((n) => {
363
+ const o = t[n];
364
+ return Array.isArray(o) ? !0 : !o || typeof o != "object" ? !1 : Array.isArray(o.files);
365
+ });
366
+ }
367
+ async function nn(e, t) {
368
+ const n = [];
369
+ for (const o of e) {
370
+ if (!o.path.toLowerCase().endsWith(".zip") || !lt(o.bytes)) {
371
+ n.push(o);
372
+ continue;
373
+ }
374
+ try {
375
+ const s = await re.loadAsync(o.bytes);
376
+ for (const r of Object.values(s.files)) {
377
+ if (r.dir) continue;
378
+ if (!an(r.name)) {
379
+ t.push({
380
+ code: "VISUAL_INTAKE_UNSAFE_ZIP_PATH",
381
+ level: "error",
382
+ message: `ZIP contains an unsafe path: ${r.name}`
383
+ });
384
+ continue;
385
+ }
386
+ const c = await r.async("uint8array");
387
+ n.push({
388
+ path: Re(r.name),
389
+ bytes: c,
390
+ blob: new Blob([ut(c)], { type: _e(r.name) })
391
+ });
392
+ }
393
+ } catch (s) {
394
+ t.push({
395
+ code: "VISUAL_INTAKE_ZIP_MALFORMED",
396
+ level: "error",
397
+ message: `ZIP is malformed: ${s instanceof Error ? s.message : String(s)}`
398
+ });
399
+ }
400
+ }
401
+ return n;
402
+ }
403
+ function sn(e) {
404
+ if (e.length <= 1) return e.length ? [{ files: e }] : [];
405
+ if (e.filter((n) => n.path.includes("/")).length === e.length) {
406
+ const n = new Set(e.map((o) => o.path.split("/")[0]));
407
+ if (n.size === 1) {
408
+ const o = [...n][0];
409
+ return [{
410
+ files: e.map((s) => ({
411
+ ...s,
412
+ path: s.path.startsWith(`${o}/`) ? s.path.slice(o.length + 1) : s.path
413
+ }))
414
+ }];
415
+ }
416
+ }
417
+ return [{ files: e }];
418
+ }
419
+ function on(e, t, n) {
420
+ const o = e.slice(e.lastIndexOf(".")).toLowerCase();
421
+ if (n || o === ".sog" || e.toLowerCase().endsWith(".sog.zip")) return "gaussian-sog";
422
+ if (o === ".ply") {
423
+ const s = ct(t).kind;
424
+ return s === "unsupported" ? null : s;
425
+ }
426
+ return o === ".glb" ? "glb" : o === ".gltf" ? "gltf" : o === ".fbx" ? "fbx" : o === ".spz" ? "gaussian-spz" : o === ".splat" ? "gaussian-splat" : o === ".ksplat" ? "gaussian-ksplat" : o === ".rad" ? "gaussian-rad" : null;
427
+ }
428
+ function rn(e, t, n) {
429
+ const o = n.reduce((s, r) => s + r.byteSize, 0);
430
+ if (e === "ply-mesh" || e === "ply-point-cloud" || e === "gaussian-ply") {
431
+ const s = ct(t).ply;
432
+ if (s)
433
+ return {
434
+ ...e === "gaussian-ply" ? { splatCount: s.vertexCount } : e === "ply-point-cloud" ? { pointCount: s.vertexCount } : { meshCount: 1 },
435
+ byteSize: o
436
+ };
437
+ }
438
+ return { byteSize: o };
439
+ }
440
+ function q(e, t, n, o) {
441
+ return {
442
+ status: e.length > 0 ? "ready" : o.length > 1 ? "needs-entry" : "blocked",
443
+ visualAssets: e,
444
+ sources: t,
445
+ diagnostics: n,
446
+ entryCandidates: o
447
+ };
448
+ }
449
+ function qe(e) {
450
+ const t = e.toLowerCase();
451
+ if (t.endsWith(".sog.zip")) return !0;
452
+ const n = t.lastIndexOf(".");
453
+ return n >= 0 && qt.has(t.slice(n));
454
+ }
455
+ function lt(e) {
456
+ return e[0] === 80 && e[1] === 75;
457
+ }
458
+ function an(e) {
459
+ return !!e && !e.includes("\\") && !e.startsWith("/") && !/^[A-Za-z]:/.test(e) && e.split("/").every((t) => t && t !== "." && t !== "..");
460
+ }
461
+ function cn(e) {
462
+ return (e.split("/").pop() ?? e).replace(/\.sog\.zip$/i, "").replace(/\.[^.]+$/, "").replace(/[_-]+/g, " ").trim() || "Visual asset";
463
+ }
464
+ function ln(e) {
465
+ return e.toLowerCase().replace(/[^a-z0-9\u4e00-\u9fff]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 48) || "visual";
466
+ }
467
+ function Re(e) {
468
+ const t = [];
469
+ for (const n of e.replaceAll("\\", "/").split("/"))
470
+ !n || n === "." || (n === ".." ? t.pop() : t.push(n));
471
+ return t.join("/");
472
+ }
473
+ function ut(e) {
474
+ const t = new Uint8Array(e.byteLength);
475
+ return t.set(e), t.buffer;
476
+ }
477
+ const me = "mujoco-wasm", un = [
478
+ "mujoco-wasm",
479
+ "isaac-physx",
480
+ "isaac-newton"
481
+ ], dn = {
482
+ PKG_ENTRY_PRESENT: E("load", "never"),
483
+ PKG_DEPENDENCIES: E("load", "never"),
484
+ PKG_RELATIVE_REFERENCES: E("profile", "never"),
485
+ PKG_USDZ_SELF_CONTAINED: E("profile", "never"),
486
+ STAGE_LOADED: E("load", "never"),
487
+ STAGE_DEFAULTPRIM: E("load", "never"),
488
+ STAGE_ROOT_PRIM: E("load", "never"),
489
+ STAGE_UPAXIS: E("behavior", "never"),
490
+ STAGE_METERS_PER_UNIT: E("behavior", "never"),
491
+ STAGE_KILOGRAMS_PER_UNIT: E("physics", "never"),
492
+ STAGE_EXTENT: E("visual", "never"),
493
+ GEOM_MESH_COUNT: E("visual", "never"),
494
+ GEOM_VERTEX_COUNT: E("visual", "never"),
495
+ GEOM_TRIANGLE_COUNT: E("visual", "never"),
496
+ GEOM_DEGENERATE_FACES: E("visual", "never"),
497
+ GEOM_NORMALS_WINDING: E("visual", "never"),
498
+ GEOM_TRANSFORM_SCALE: E("behavior", "never"),
499
+ GEOM_PIVOT: E("visual", "never"),
500
+ GEOM_VISUAL_COLLISION_SEPARATION: E("visual", "never"),
501
+ MATERIAL_BINDING: E("visual", "never"),
502
+ TEXTURE_PATHS: E("visual", "never"),
503
+ TEXTURE_RESOLUTION: E("visual", "never"),
504
+ SEMANTIC_FIELDS: E("profile", "never"),
505
+ PHYSICS_RIGID_BODY: E("behavior", "never"),
506
+ PHYSICS_COLLIDER: E("physics", "never"),
507
+ PHYSICS_MASS: E("physics", "never"),
508
+ PHYSICS_DENSITY: E("physics", "never"),
509
+ PHYSICS_COM: E("physics", "never"),
510
+ PHYSICS_INERTIA: E("physics", "never"),
511
+ PHYSICS_MATERIAL: E("behavior", "never"),
512
+ PHYSICS_JOINT: E("physics", "never"),
513
+ PHYSICS_DRIVE: E("behavior", "never"),
514
+ PHYSICS_MIMIC: E("physics", "never"),
515
+ PHYSICS_ARTICULATION: E("physics", "never"),
516
+ RUNTIME_MUJOCO_COMPILE: E("physics", "never", ["mujoco-wasm"]),
517
+ SCENE_INITIAL_PENETRATION: E("behavior", "never", ["mujoco-wasm"]),
518
+ SCENE_BELOW_GROUND: E("behavior", "never", ["mujoco-wasm"]),
519
+ SCENE_FLOATING: E("behavior", "never", ["mujoco-wasm"]),
520
+ SCENE_AABB_OVERLAP: E("visual", "never", ["mujoco-wasm"]),
521
+ SCENE_DYNAMIC_STATIC: E("behavior", "never", ["mujoco-wasm"]),
522
+ SCENE_PHYSICS_COMPILE: E("physics", "target", ["mujoco-wasm"]),
523
+ RUNTIME_REPRODUCIBLE_CHECK: E("physics", "never", ["mujoco-wasm"])
524
+ };
525
+ function E(e, t, n = un) {
526
+ return { impact: e, blocking: t, targets: n };
527
+ }
528
+ const fn = {
529
+ rigidBodyCount: 0,
530
+ colliderCount: 0,
531
+ staticColliderCount: 0,
532
+ articulationRootCount: 0,
533
+ jointCount: 0,
534
+ driveCount: 0,
535
+ mimicCount: 0,
536
+ massCount: 0,
537
+ densityCount: 0,
538
+ centerOfMassCount: 0,
539
+ inertiaCount: 0,
540
+ materialCount: 0
541
+ };
542
+ async function Rs(e) {
543
+ var W, X, b, V, H, Y, Pe, Te, we, Me, xe, Oe, De, Ue, Le, ke, $e, Fe, Ge, Ve, Be;
544
+ const t = performance.now(), n = (/* @__PURE__ */ new Date()).toISOString(), o = [], s = (x) => {
545
+ var ze;
546
+ o.push({
547
+ ...x,
548
+ primPath: x.primPath ?? null,
549
+ instanceId: x.instanceId ?? ((ze = e.instance) == null ? void 0 : ze.nodeId) ?? null,
550
+ execution: {
551
+ at: n,
552
+ durationMs: Math.max(0, performance.now() - t),
553
+ engine: x.engine ?? "sim-studio-inspection",
554
+ ...x.detail ? { detail: x.detail } : {}
555
+ }
556
+ });
557
+ }, r = (...x) => T(s, ...x), c = await En(e), i = c.facts, a = e.runtime, l = ve(e.bundle), u = Tn(e.runtime), f = L((W = e.runtime) == null ? void 0 : W.physicsProperties), m = $(f == null ? void 0 : f.bodies), d = _n(e.metadata, u), g = L(u == null ? void 0 : u.stage), p = vn(i, u, e.instance), S = $(u == null ? void 0 : u.prims), I = e.instance ? Un(p, d.defaultPrim) : null;
558
+ T(
559
+ s,
560
+ "PKG_ENTRY_PRESENT",
561
+ "asset-package",
562
+ c.entryFound ? "pass" : "fail",
563
+ c.entryFound ? "info" : "error",
564
+ "probed",
565
+ c.entryFound ? `资产入口存在:${l}` : `资产包中缺少入口:${l}`,
566
+ c.entryFound ? "无需处理。" : "重新导入完整资产包,并确保入口文件位于包内。",
567
+ { entry: l, fileCount: e.bundle.files.length }
568
+ ), mn(r, i, c, l), T(
569
+ s,
570
+ "STAGE_LOADED",
571
+ "stage",
572
+ e.runtime ? e.runtime.phase === "ready" ? "pass" : e.runtime.phase === "failed" ? "fail" : "not-run" : "unknown",
573
+ e.runtime ? e.runtime.phase === "failed" ? "error" : "info" : "warning",
574
+ "runtime",
575
+ e.runtime ? e.runtime.phase === "ready" ? "Viewer 已完成当前 USD 视觉与 Stage 解析。" : `Viewer 当前加载阶段为 ${e.runtime.phase}。` : "对象尚未进入 Viewer 场景,真实 Stage 加载状态未知。",
576
+ ((X = e.runtime) == null ? void 0 : X.phase) === "failed" ? "检查资产依赖、USD 版本、浏览器控制台和 Viewer 错误详情。" : "无需处理。",
577
+ { phase: ((b = e.runtime) == null ? void 0 : b.phase) ?? null }
578
+ ), T(
579
+ s,
580
+ "STAGE_DEFAULTPRIM",
581
+ "stage",
582
+ d.defaultPrim ? "pass" : "fail",
583
+ d.defaultPrim ? "info" : "error",
584
+ N(g == null ? void 0 : g.defaultPrim) ? "runtime" : (V = e.metadata) != null && V.defaultPrim ? "authored" : "probed",
585
+ d.defaultPrim ? `defaultPrim 已声明:${d.defaultPrim}` : "Stage 未声明 defaultPrim。",
586
+ d.defaultPrim ? "无需处理。" : '在根层设置 `defaultPrim = "<根 Prim 名>"`。',
587
+ { defaultPrim: d.defaultPrim },
588
+ I
589
+ );
590
+ const C = d.defaultPrim, v = !!C && i.prims.some((x) => x.path === C), _ = !!C && S.some((x) => N(x.path) === C), R = v || _, M = S.length > 0, k = i.textual && i.prims.length > 0 && i.dependencies !== null && i.dependencies.references.length === 0, O = R ? "pass" : M || k ? "fail" : "unknown";
591
+ T(
592
+ s,
593
+ "STAGE_ROOT_PRIM",
594
+ "stage",
595
+ O,
596
+ O === "fail" ? "error" : "info",
597
+ _ ? "runtime" : v ? "authored" : M ? "runtime" : "probed",
598
+ R ? `根 Prim 存在:${C}` : O === "fail" ? `组合后 Stage 中未找到 defaultPrim 对应的根 Prim:${C ?? "not-authored"}。` : "当前可读入口层没有定位到根 Prim;组合后的运行时 Prim 树尚未取得。",
599
+ O === "fail" ? "校正 defaultPrim,或在默认层中补齐对应根 Prim。" : "等待真实 Stage 完成组合后重新检查。",
600
+ {
601
+ root: C,
602
+ authoredPrimCount: i.prims.length,
603
+ runtimePrimCount: S.length,
604
+ staticHierarchyComplete: k
605
+ },
606
+ I
607
+ ), T(
608
+ s,
609
+ "STAGE_UPAXIS",
610
+ "stage",
611
+ d.upAxis ? /^(Y|Z)$/i.test(d.upAxis) ? "pass" : "fail" : "unknown",
612
+ d.upAxis && !/^(Y|Z)$/i.test(d.upAxis) ? "error" : "info",
613
+ N(g == null ? void 0 : g.upAxis) ? "runtime" : (H = e.metadata) != null && H.upAxis ? "authored" : "probed",
614
+ d.upAxis ? `Stage upAxis = ${d.upAxis}` : "未取得 upAxis。",
615
+ d.upAxis ? "无需处理。" : '在根层声明 `upAxis = "Z"` 或 `"Y"`。',
616
+ { upAxis: d.upAxis }
617
+ ), T(
618
+ s,
619
+ "STAGE_METERS_PER_UNIT",
620
+ "stage",
621
+ d.metersPerUnit !== null ? d.metersPerUnit > 0 ? "pass" : "fail" : "unknown",
622
+ d.metersPerUnit !== null && d.metersPerUnit <= 0 ? "error" : "info",
623
+ G(g == null ? void 0 : g.metersPerUnit) !== null ? "runtime" : ((Y = e.metadata) == null ? void 0 : Y.metersPerUnit) !== void 0 ? "authored" : "probed",
624
+ d.metersPerUnit !== null ? `metersPerUnit = ${d.metersPerUnit}` : "未取得 metersPerUnit。",
625
+ d.metersPerUnit !== null && d.metersPerUnit > 0 ? "无需处理。" : "声明有限且大于 0 的 metersPerUnit。",
626
+ { metersPerUnit: d.metersPerUnit }
627
+ ), T(
628
+ s,
629
+ "STAGE_KILOGRAMS_PER_UNIT",
630
+ "stage",
631
+ d.kilogramsPerUnit !== null ? d.kilogramsPerUnit > 0 ? "pass" : "fail" : "unknown",
632
+ d.kilogramsPerUnit !== null && d.kilogramsPerUnit <= 0 ? "error" : "info",
633
+ G(g == null ? void 0 : g.kilogramsPerUnit) !== null ? "runtime" : ((Pe = e.metadata) == null ? void 0 : Pe.kilogramsPerUnit) !== void 0 ? "authored" : "probed",
634
+ d.kilogramsPerUnit !== null ? `kilogramsPerUnit = ${d.kilogramsPerUnit}` : "未取得 kilogramsPerUnit。",
635
+ d.kilogramsPerUnit !== null && d.kilogramsPerUnit > 0 ? "无需处理。" : "声明有限且大于 0 的 kilogramsPerUnit。",
636
+ { kilogramsPerUnit: d.kilogramsPerUnit }
637
+ );
638
+ const D = wn(u, e.scene, (Te = e.instance) == null ? void 0 : Te.nodeId);
639
+ T(
640
+ s,
641
+ "STAGE_EXTENT",
642
+ "stage",
643
+ D || d.extent ? "pass" : "unknown",
644
+ "info",
645
+ D ? "runtime" : "authored",
646
+ D ? `真实世界包围盒尺寸 ${ge(D.size)} m。` : d.extent ? `Stage 声明 extent:${ge(d.extent.min)} → ${ge(d.extent.max)}。` : "尚无真实包围盒或 authored extent。",
647
+ "对没有几何或需要跨引擎精确适配的资产,补充 extent 并运行真实加载。",
648
+ { runtimeBounds: D, authoredExtent: d.extent }
649
+ );
650
+ const h = Rn(i, u);
651
+ T(
652
+ s,
653
+ "GEOM_MESH_COUNT",
654
+ "geometry",
655
+ h.meshCount === null ? "unknown" : h.meshCount > 0 ? "pass" : "fail",
656
+ h.meshCount === 0 ? "error" : "info",
657
+ h.meshSource,
658
+ h.meshCount === null ? "未取得网格数量。" : `检测到 ${h.meshCount} 个 Mesh Prim。`,
659
+ h.meshCount ? "无需处理。" : "确认入口层是否包含可渲染几何,或显式标记为无视觉几何。",
660
+ { meshCount: h.meshCount }
661
+ ), T(
662
+ s,
663
+ "GEOM_VERTEX_COUNT",
664
+ "geometry",
665
+ h.vertexCount === null ? "unknown" : h.vertexCount > 0 ? "pass" : "fail",
666
+ h.vertexCount === 0 ? "error" : "info",
667
+ h.meshSource,
668
+ h.vertexCount === null ? "未取得顶点数。" : `检测到 ${h.vertexCount} 个顶点。`,
669
+ h.vertexCount ? "无需处理。" : "修复空 Mesh 或补齐顶点数据。",
670
+ { vertexCount: h.vertexCount }
671
+ ), T(
672
+ s,
673
+ "GEOM_TRIANGLE_COUNT",
674
+ "geometry",
675
+ h.triangleCount === null ? "unknown" : h.triangleCount > 0 ? "pass" : "fail",
676
+ h.triangleCount === 0 ? "error" : "info",
677
+ h.meshSource,
678
+ h.triangleCount === null ? "未取得三角面数。" : `检测到 ${h.triangleCount} 个三角面。`,
679
+ h.triangleCount ? "无需处理。" : "检查 faceVertexCounts/faceVertexIndices 是否完整。",
680
+ { triangleCount: h.triangleCount }
681
+ ), T(
682
+ s,
683
+ "GEOM_DEGENERATE_FACES",
684
+ "geometry",
685
+ h.degenerateTriangles === null ? "unknown" : h.degenerateTriangles === 0 ? "pass" : "fail",
686
+ h.degenerateTriangles ? "error" : "info",
687
+ h.meshSource,
688
+ h.degenerateTriangles === null ? "当前无法直接从资产计算退化面。" : h.degenerateTriangles === 0 ? "未发现零面积或重复索引三角面。" : h.collisionDegenerateTriangles ? `检测到 ${h.degenerateTriangles} 个退化三角面,其中 ${h.collisionDegenerateTriangles} 个属于碰撞网格。` : `检测到 ${h.degenerateTriangles} 个纯视觉退化三角面。`,
689
+ h.collisionDegenerateTriangles ? "修复碰撞网格中的零面积三角形后重新编译物理。" : h.degenerateTriangles ? "清理视觉网格中的零面积三角形以改善渲染与后续复用。" : "无需处理。",
690
+ {
691
+ degenerateTriangles: h.degenerateTriangles,
692
+ collisionDegenerateTriangles: h.collisionDegenerateTriangles,
693
+ affectedMeshes: h.degenerateMeshes,
694
+ criterion: "cross(edgeA, edgeB) <= 1e-12 * maxEdgeLengthSquared"
695
+ },
696
+ void 0,
697
+ E(h.collisionDegenerateTriangles ? "physics" : "visual", "never")
698
+ ), T(
699
+ s,
700
+ "GEOM_NORMALS_WINDING",
701
+ "geometry",
702
+ h.normals === null ? "unknown" : ((we = h.orientation) == null ? void 0 : we.toLowerCase()) === "lefthanded" ? "conditional" : h.normals ? "pass" : "conditional",
703
+ h.normals || ((Me = h.orientation) == null ? void 0 : Me.toLowerCase()) === "lefthanded" ? "warning" : "info",
704
+ h.meshSource,
705
+ h.normals === null ? "未取得法线信息。" : ((xe = h.orientation) == null ? void 0 : xe.toLowerCase()) === "lefthanded" ? "Mesh 使用 leftHanded orientation;真实跨引擎朝向需要运行时复核。" : h.normals ? "Mesh 已提供法线;本检查不替代逐面绕序/流形分析。" : "Mesh 未提供 authored 法线。",
706
+ "检查导出法线、绕序和 negative scale,并在目标渲染器中抽样复核。",
707
+ { normals: h.normals, orientation: h.orientation }
708
+ );
709
+ const A = ((Oe = e.instance) == null ? void 0 : Oe.localTransform.scale.some((x) => !Number.isFinite(x) || x <= 0)) ?? !1, P = ((De = e.instance) == null ? void 0 : De.localTransform.scale.some((x) => Math.abs(x - 1) > 1e-6)) ?? !1;
710
+ T(
711
+ s,
712
+ "GEOM_TRANSFORM_SCALE",
713
+ "geometry",
714
+ e.instance ? A ? "fail" : P ? "conditional" : "pass" : "unknown",
715
+ A ? "error" : P ? "warning" : "info",
716
+ "annotated",
717
+ e.instance ? A ? "实例包含零值、负值或非有限缩放。" : P ? "实例使用非单位缩放;统一 MuJoCo 物理明确拒绝非单位实例缩放。" : "实例缩放为单位值。" : "没有实例变换信息。",
718
+ A ? "修复为零或负的缩放。" : P ? "在资产导出处烘焙缩放,或让实例恢复单位缩放后再启动统一物理。" : "无需处理。",
719
+ { scale: ((Ue = e.instance) == null ? void 0 : Ue.localTransform.scale) ?? null },
720
+ I
721
+ ), T(
722
+ s,
723
+ "GEOM_PIVOT",
724
+ "geometry",
725
+ "unknown",
726
+ "info",
727
+ "probed",
728
+ "当前 Viewer 不公开 Prim 级 pivot 基准,无法把实例原点与作者 pivot 视为同一事实。",
729
+ "在 DCC 中明确 pivot,并使用真实包围盒/轴心可视化人工复核。",
730
+ { instancePosition: ((Le = e.instance) == null ? void 0 : Le.localTransform.position) ?? null },
731
+ I
732
+ ), T(
733
+ s,
734
+ "GEOM_VISUAL_COLLISION_SEPARATION",
735
+ "geometry",
736
+ i.physics.colliderCount === 0 && !tt(u) ? "not-run" : (ke = a == null ? void 0 : a.capabilities) != null && ke.canToggleCollision ? "pass" : "conditional",
737
+ "info",
738
+ ($e = a == null ? void 0 : a.capabilities) != null && $e.canToggleCollision ? "runtime" : "probed",
739
+ i.physics.colliderCount === 0 && !tt(u) ? "未发现碰撞 API,无法评价 visual/collision 分离。" : (Fe = a == null ? void 0 : a.capabilities) != null && Fe.canToggleCollision ? "Viewer 能独立构建并切换碰撞调试代理。" : "检测到碰撞定义,但当前证据不足以证明 visual/collision 已分离。",
740
+ "为碰撞体使用独立 proxy/guide Prim,并通过碰撞代理显示复核。",
741
+ {
742
+ colliderCount: i.physics.colliderCount,
743
+ runtimeColliderCount: (f == null ? void 0 : f.geomCount) ?? null,
744
+ canToggleCollision: ((Ge = a == null ? void 0 : a.capabilities) == null ? void 0 : Ge.canToggleCollision) ?? !1
745
+ },
746
+ I
747
+ ), hn(r, i, e.metadata, p, e.bundle), await pn(r, e.bundle, e.metadata, i, n);
748
+ const z = Dn(i.semanticFields, ((Ve = e.metadata) == null ? void 0 : Ve.semanticFields) ?? []);
749
+ T(
750
+ s,
751
+ "SEMANTIC_FIELDS",
752
+ "semantics",
753
+ z.valueCount > 0 ? "pass" : "not-run",
754
+ z.valueCount > 0 ? "info" : "warning",
755
+ "authored",
756
+ z.valueCount > 0 ? `检测到 ${z.attributeCount} 个语义属性、${z.primCount} 个语义 Prim。` : "入口层没有声明真实 semantic:* 字段。",
757
+ z.valueCount > 0 ? "无需处理;仍需业务侧确认语义分类是否符合目标本体。" : "如果资产需要参与语义检索/任务规划,请按项目采用的 semantic schema 标注。",
758
+ z.evidence,
759
+ I
760
+ ), gn(
761
+ r,
762
+ i,
763
+ u,
764
+ f,
765
+ a,
766
+ I,
767
+ e.instance,
768
+ e.asset.capabilities.physics === "authored" ? "usd-authored" : e.asset.capabilities.physics === "none" ? "none" : "unknown"
769
+ ), Sn(r, e, i, m, I);
770
+ const ie = Pn(o);
771
+ return {
772
+ assetId: e.asset.assetId,
773
+ instanceId: ((Be = e.instance) == null ? void 0 : Be.nodeId) ?? null,
774
+ entryPath: l,
775
+ checkedAt: n,
776
+ readiness: ie,
777
+ findings: o,
778
+ prims: p
779
+ };
780
+ }
781
+ function mn(e, t, n, o) {
782
+ const s = t.dependencies;
783
+ if (!s) {
784
+ e(
785
+ "PKG_DEPENDENCIES",
786
+ "asset-package",
787
+ "unknown",
788
+ "warning",
789
+ "probed",
790
+ "无法读取入口或容器内部层,依赖完整性未执行。",
791
+ "提供完整文本 USD 文件或可读取的 USDZ 容器后重新检查。",
792
+ { entry: o, zip: n.zip }
793
+ );
794
+ return;
795
+ }
796
+ e(
797
+ "PKG_DEPENDENCIES",
798
+ "asset-package",
799
+ s.missing.length ? "fail" : "pass",
800
+ s.missing.length ? "error" : "info",
801
+ "probed",
802
+ s.missing.length ? `${s.missing.length} 个包内依赖缺失。` : `依赖扫描完成:${s.references.length} 个引用,无缺失包内依赖。`,
803
+ s.missing.length ? "补齐缺失文件或修复引用路径。" : "无需处理。",
804
+ { missing: s.missing, references: s.references }
805
+ ), e(
806
+ "PKG_RELATIVE_REFERENCES",
807
+ "asset-package",
808
+ s.unanchored.length || s.external.length ? "conditional" : "pass",
809
+ s.unanchored.length || s.external.length ? "warning" : "info",
810
+ "probed",
811
+ s.unanchored.length || s.external.length ? `${s.unanchored.length} 个未锚定相对引用,${s.external.length} 个外部 URI。` : "所有资产依赖都是包内锚定相对路径。",
812
+ s.unanchored.length || s.external.length ? "把资产依赖改为 `./`/`../` 包内相对路径,并在需要时内嵌到 USDZ。" : "无需处理。",
813
+ { unanchored: s.unanchored, external: s.external }
814
+ ), e(
815
+ "PKG_USDZ_SELF_CONTAINED",
816
+ "asset-package",
817
+ n.isUsdz ? s.external.length ? "fail" : "pass" : "not-run",
818
+ n.isUsdz && s.external.length ? "error" : "info",
819
+ "probed",
820
+ n.isUsdz ? s.external.length ? `USDZ 中仍检测到 ${s.external.length} 个外部 URI。` : `USDZ 容器可读取,包含 ${n.zipFileCount} 个内嵌文件。` : "入口不是 USDZ;本项未执行。",
821
+ n.isUsdz ? s.external.length ? "移除 USDZ 包外依赖或重新打包。" : "无需处理。" : "若交付目标是单文件 USDZ,请执行 USDZ 打包并使用该入口复检。",
822
+ { zip: n.zip, zipFileCount: n.zipFileCount }
823
+ );
824
+ }
825
+ function hn(e, t, n, o, s) {
826
+ var i;
827
+ const r = t.materialBindings.length ? t.materialBindings : (n == null ? void 0 : n.materialBindings) ?? [], c = t.meshes.length || (n == null ? void 0 : n.meshCount) || 0;
828
+ e(
829
+ "MATERIAL_BINDING",
830
+ "materials-textures",
831
+ c === 0 ? "not-run" : r.length ? "pass" : t.textual ? "conditional" : "unknown",
832
+ r.length || c === 0 ? "info" : "warning",
833
+ t.textual ? "authored" : "runtime",
834
+ c === 0 ? "没有可评价材质绑定的 Mesh。" : r.length ? `检测到 ${r.length} 条 material:binding。` : "存在 Mesh,但入口文本中没有 material:binding。",
835
+ r.length ? "无需处理;逐材质复核仍需真实渲染截图。" : "为需要稳定外观的 Mesh 绑定 Material,或明确记录使用 displayColor。",
836
+ { bindings: r, meshCount: c, materialCount: (n == null ? void 0 : n.materials.length) ?? null },
837
+ (i = o.find((a) => a.typeName.toLowerCase().includes("mesh"))) == null ? void 0 : i.path
838
+ );
839
+ }
840
+ async function pn(e, t, n, o, s) {
841
+ var f;
842
+ const r = ((f = o.dependencies) == null ? void 0 : f.references.filter((m) => m.kind === "asset" && Vn(m.target)).map((m) => {
843
+ var g;
844
+ const d = ((g = t.files.find((p) => K(p.locator) === m.fromPath)) == null ? void 0 : g.locator) ?? t.entryLocator;
845
+ return {
846
+ path: m.target,
847
+ fromLocator: d,
848
+ resolvedPath: m.resolvedPath
849
+ };
850
+ })) ?? [], c = r.length > 0 ? r : ((n == null ? void 0 : n.textures) ?? []).map((m) => {
851
+ const d = rt(
852
+ t.entryLocator,
853
+ m,
854
+ t.files.map((g) => g.locator)
855
+ );
856
+ return {
857
+ path: m,
858
+ fromLocator: t.entryLocator,
859
+ resolvedPath: d && t.files.some((g) => w(g.locator) === w(d)) ? K(d) : null
860
+ };
861
+ }), i = [...new Map(c.map((m) => [
862
+ `${w(m.fromLocator)}\0${m.path}`,
863
+ m
864
+ ])).values()];
865
+ if (!i.length) {
866
+ e(
867
+ "TEXTURE_PATHS",
868
+ "materials-textures",
869
+ "not-run",
870
+ "info",
871
+ "authored",
872
+ "入口层没有声明外置图像纹理。",
873
+ "若材质依赖纹理,请确认引用写在可扫描层中。",
874
+ { paths: [] }
875
+ ), e(
876
+ "TEXTURE_RESOLUTION",
877
+ "materials-textures",
878
+ "not-run",
879
+ "info",
880
+ "probed",
881
+ "没有可探测的外置纹理。",
882
+ "无需处理。",
883
+ { probes: [] }
884
+ );
885
+ return;
886
+ }
887
+ const a = await Promise.all(
888
+ i.map((m) => bn(t, m))
889
+ ), l = a.filter((m) => !m.found), u = a.filter((m) => m.found && !m.width);
890
+ e(
891
+ "TEXTURE_PATHS",
892
+ "materials-textures",
893
+ l.length ? "fail" : "pass",
894
+ l.length ? "error" : "info",
895
+ "probed",
896
+ l.length ? `${l.length}/${i.length} 个纹理路径无法在资产包中解析。` : `${i.length} 个纹理路径均可解析到包内文件。`,
897
+ l.length ? "补齐纹理文件或修复相对路径。" : "无需处理。",
898
+ { probes: a }
899
+ ), e(
900
+ "TEXTURE_RESOLUTION",
901
+ "materials-textures",
902
+ u.length ? "unknown" : "pass",
903
+ u.length ? "warning" : "info",
904
+ "probed",
905
+ u.length ? `${u.length}/${i.length} 个纹理无法在当前浏览器探测像素尺寸。` : `已取得 ${a.length} 个纹理的真实像素尺寸。`,
906
+ u.length ? "确认浏览器支持该编码,或在离线资产检查器中读取尺寸。" : "无需处理。",
907
+ { probes: a, checkedAt: s }
908
+ );
909
+ }
910
+ function gn(e, t, n, o, s, r, c, i) {
911
+ var h, A, P, z, ie, W, X;
912
+ const a = t.physics, l = $((n == null ? void 0 : n.physics) && ((h = L(n.physics)) == null ? void 0 : h.rigidBodies)), u = $((n == null ? void 0 : n.physics) && ((A = L(n.physics)) == null ? void 0 : A.colliders)), f = $((n == null ? void 0 : n.physics) && ((P = L(n.physics)) == null ? void 0 : P.joints)), m = $((n == null ? void 0 : n.physics) && ((z = L(n.physics)) == null ? void 0 : z.articulationRoots)), d = l.filter((b) => b.enabled !== !1), g = u.filter((b) => b.enabled !== !1), p = Math.max(a.rigidBodyCount, d.length), S = Math.max(a.colliderCount, g.length), I = ((ie = s == null ? void 0 : s.physics) == null ? void 0 : ie.status) ?? "unknown", C = new Set(d.map((b) => N(b.path)).filter((b) => !!b)), v = g.filter((b) => {
913
+ const V = N(b.bodyPath);
914
+ return !!V && !C.has(V);
915
+ }), _ = f.filter((b) => b.enabled !== !1), R = _.filter((b) => N(b.body0) && !C.has(N(b.body0)) || N(b.body1) && !C.has(N(b.body1))), M = Mn(_), k = xn(m.map((b) => N(b.path)).filter((b) => !!b)), O = d.filter((b) => b.kinematicEnabled !== !0), F = O.filter((b) => {
916
+ const V = L(b.mass), H = G(V == null ? void 0 : V.mass) ?? G(b.mass);
917
+ return H === null || H <= 0;
918
+ });
919
+ e(
920
+ "PHYSICS_RIGID_BODY",
921
+ "physics",
922
+ p > 0 ? "pass" : (c == null ? void 0 : c.physics.kind) === "dynamic" ? "fail" : i === "none" ? "not-run" : "unknown",
923
+ (c == null ? void 0 : c.physics.kind) === "dynamic" && p === 0 ? "error" : "info",
924
+ p > 0 ? "authored" : "probed",
925
+ p > 0 ? `检测到 ${p} 个启用的 RigidBody API。` : (c == null ? void 0 : c.physics.kind) === "dynamic" ? "实例声明为动态,但没有可解析的启用 RigidBody。" : "未取得真实 RigidBody 定义。",
926
+ p > 0 ? "无需处理。" : "若对象需要动态行为,请声明 PhysicsRigidBodyAPI。",
927
+ { rigidBodyCount: p, physicsStatus: I },
928
+ r
929
+ ), e(
930
+ "PHYSICS_COLLIDER",
931
+ "physics",
932
+ S > 0 && v.length === 0 ? "pass" : p > 0 || v.length ? "fail" : i === "none" ? "not-run" : "unknown",
933
+ p > 0 && S === 0 || v.length ? "error" : "info",
934
+ S > 0 ? "authored" : "probed",
935
+ S > 0 ? v.length ? `检测到 ${v.length} 个碰撞体引用了不存在的刚体所有者。` : `检测到 ${S} 个碰撞体,其中 ${a.staticColliderCount} 个是静态碰撞体。` : p > 0 ? "存在启用刚体,但没有碰撞几何。" : "未取得真实 Collider API。",
936
+ S > 0 && !v.length ? "无需处理。" : "为需要参与碰撞的对象声明有效 PhysicsCollisionAPI,并确保碰撞体所有者存在。",
937
+ {
938
+ colliderCount: S,
939
+ staticColliderCount: a.staticColliderCount,
940
+ orphanColliders: v
941
+ },
942
+ r
943
+ );
944
+ for (const [b, V, H] of [
945
+ ["PHYSICS_DENSITY", a.densityCount, "physics:density"],
946
+ ["PHYSICS_COM", a.centerOfMassCount, "physics:centerOfMass"],
947
+ ["PHYSICS_INERTIA", a.inertiaCount, "physics:diagonalInertia"]
948
+ ]) {
949
+ const Y = V > 0 || On(o, b);
950
+ e(
951
+ b,
952
+ "physics",
953
+ Y ? "pass" : p ? "conditional" : "not-run",
954
+ Y ? "info" : "warning",
955
+ Y ? "authored" : "probed",
956
+ Y ? `${H} 已声明。` : p ? `${H} 未声明或无法从入口文本确认。` : "没有动态刚体,本项未执行。",
957
+ Y ? "无需处理。" : "声明确定的质量属性,或明确接受由碰撞几何推导的质量分布。",
958
+ { authoredCount: V, runtime: o ?? null },
959
+ r
960
+ );
961
+ }
962
+ const D = O.length > 0;
963
+ e(
964
+ "PHYSICS_MASS",
965
+ "physics",
966
+ O.length || a.rigidBodyCount ? D ? F.length ? "fail" : "pass" : a.massCount || a.densityCount ? "pass" : "conditional" : "not-run",
967
+ D && F.length ? "error" : p && !a.massCount && !a.densityCount ? "warning" : "info",
968
+ D ? "runtime" : "authored",
969
+ D ? F.length ? `${F.length}/${O.length} 个动态刚体没有正质量。` : `${O.length} 个动态刚体均具有正质量。` : a.massCount || a.densityCount ? "已声明质量或密度,最终质量由目标物理后端解析。" : p ? "动态刚体缺少可确认的质量或密度。" : "没有动态刚体,本项未执行。",
970
+ F.length ? "为每个动态刚体或其碰撞体声明正质量,或声明可计算质量的密度。" : "无需处理。",
971
+ {
972
+ authoredMassCount: a.massCount,
973
+ authoredDensityCount: a.densityCount,
974
+ bodiesMissingPositiveMass: F,
975
+ runtime: o ?? null
976
+ },
977
+ r
978
+ ), e(
979
+ "PHYSICS_MATERIAL",
980
+ "physics",
981
+ a.materialCount > 0 ? "pass" : S ? "conditional" : "not-run",
982
+ a.materialCount > 0 ? "info" : "warning",
983
+ "authored",
984
+ a.materialCount > 0 ? `检测到 ${a.materialCount} 个 PhysicsMaterial。` : S ? "碰撞体存在但没有可见 PhysicsMaterial 声明。" : "没有碰撞体,本项未执行。",
985
+ a.materialCount > 0 ? "无需处理。" : "为关键接触面声明 friction/restitution。",
986
+ { materialCount: a.materialCount },
987
+ r
988
+ ), e(
989
+ "PHYSICS_JOINT",
990
+ "physics",
991
+ R.length || M.length ? "fail" : _.length || a.jointCount ? "pass" : "not-run",
992
+ R.length || M.length ? "error" : "info",
993
+ _.length ? "runtime" : "authored",
994
+ R.length ? `${R.length} 个启用的物理关节引用了不存在的刚体目标。` : M.length ? `${M.length} 组刚体之间存在多个未排除于 articulation 的关节。` : _.length || a.jointCount ? `检测到 ${Math.max(_.length, a.jointCount)} 个物理关节。` : "资产没有关节。",
995
+ R.length || M.length ? "修正 body0/body1 目标,或删除/排除重复关节。" : "无需处理。",
996
+ {
997
+ jointCount: Math.max(_.length, a.jointCount),
998
+ invalidJointTargets: R,
999
+ duplicateJointPairs: M
1000
+ },
1001
+ r
1002
+ ), e(
1003
+ "PHYSICS_DRIVE",
1004
+ "physics",
1005
+ a.driveCount ? "pass" : a.jointCount ? "conditional" : "not-run",
1006
+ a.jointCount && !a.driveCount ? "warning" : "info",
1007
+ "authored",
1008
+ a.driveCount ? `检测到 ${a.driveCount} 个 drive 属性。` : a.jointCount ? "关节未声明驱动。" : "没有关节,本项未执行。",
1009
+ a.driveCount ? "无需处理。" : "需要主动控制时声明 drive。",
1010
+ { driveCount: a.driveCount },
1011
+ r
1012
+ ), e(
1013
+ "PHYSICS_MIMIC",
1014
+ "physics",
1015
+ a.mimicCount ? "pass" : "not-run",
1016
+ "info",
1017
+ "authored",
1018
+ a.mimicCount ? `检测到 ${a.mimicCount} 个 mimic 约束。` : "入口层没有 mimic 声明。",
1019
+ "无需处理。",
1020
+ { mimicCount: a.mimicCount },
1021
+ r
1022
+ ), e(
1023
+ "PHYSICS_ARTICULATION",
1024
+ "physics",
1025
+ k.length ? "fail" : a.articulationRootCount || m.length ? "pass" : a.jointCount || _.length ? "conditional" : "not-run",
1026
+ k.length ? "error" : (a.jointCount || _.length) && !a.articulationRootCount && !m.length ? "warning" : "info",
1027
+ m.length ? "runtime" : "authored",
1028
+ k.length ? `检测到 ${k.length} 个嵌套 ArticulationRoot。` : a.articulationRootCount || m.length ? `检测到 ${Math.max(a.articulationRootCount, m.length)} 个 ArticulationRoot。` : a.jointCount || _.length ? "存在关节,但没有 articulation root。" : "没有关节,本项未执行。",
1029
+ k.length ? "删除嵌套的 ArticulationRoot,只保留 articulation 树的唯一根。" : "需要 articulation 语义时声明 PhysicsArticulationRootAPI。",
1030
+ {
1031
+ articulationRootCount: Math.max(a.articulationRootCount, m.length),
1032
+ nestedArticulationRoots: k
1033
+ },
1034
+ r
1035
+ ), e(
1036
+ "RUNTIME_MUJOCO_COMPILE",
1037
+ "runtime",
1038
+ I === "ready" ? "pass" : I === "unavailable" ? "fail" : I === "not-authored" ? "not-run" : "unknown",
1039
+ I === "unavailable" ? "error" : "info",
1040
+ "runtime",
1041
+ I === "ready" ? "MuJoCo 子集已成功编译并初始化。" : I === "unavailable" ? `MuJoCo 子集初始化失败:${((X = (W = s == null ? void 0 : s.physics) == null ? void 0 : W.issue) == null ? void 0 : X.message) ?? "未提供原因"}` : `当前物理状态:${I}`,
1042
+ I === "unavailable" ? "根据错误码修复 USD 物理映射;修复前保持视觉预览,不进入仿真。" : "无需处理。",
1043
+ { physics: (s == null ? void 0 : s.physics) ?? null },
1044
+ r
1045
+ );
1046
+ }
1047
+ function Sn(e, t, n, o, s) {
1048
+ var k, O, F, D, h;
1049
+ const r = (k = t.scene) == null ? void 0 : k.physicsState, c = (r == null ? void 0 : r.status) === "ready" ? "pass" : (r == null ? void 0 : r.status) === "unavailable" ? "fail" : (r == null ? void 0 : r.status) === "not-authored" ? "not-run" : "unknown";
1050
+ e(
1051
+ "SCENE_PHYSICS_COMPILE",
1052
+ "scene",
1053
+ c,
1054
+ c === "fail" ? "error" : c === "unknown" ? "warning" : "info",
1055
+ "runtime",
1056
+ c === "pass" ? "Viewer 已完成统一场景 MuJoCo 编译与初始化。" : c === "fail" ? `统一场景物理不可用:${((O = r == null ? void 0 : r.issue) == null ? void 0 : O.message) ?? "未提供原因"}` : c === "not-run" ? "当前场景没有已公开的 MuJoCo 物理源。" : `统一场景物理状态:${(r == null ? void 0 : r.status) ?? "not-observed"}。`,
1057
+ c === "fail" ? "根据 Viewer 返回的错误修复统一场景编译;这是当前唯一会阻止启动的检查。" : "无需处理。",
1058
+ { physicsState: r ?? null },
1059
+ s
1060
+ );
1061
+ const i = (F = t.scene) == null ? void 0 : F.deterministic;
1062
+ if (!i) {
1063
+ for (const [A, P] of [
1064
+ ["SCENE_INITIAL_PENETRATION", "尚未运行固定初态 MuJoCo 检查。"],
1065
+ ["SCENE_BELOW_GROUND", "尚未运行固定初态 MuJoCo 检查。"],
1066
+ ["SCENE_FLOATING", "尚未运行固定初态 MuJoCo 检查。"],
1067
+ ["SCENE_AABB_OVERLAP", "尚未运行固定初态 MuJoCo 检查。"],
1068
+ ["SCENE_DYNAMIC_STATIC", "尚未运行固定初态 MuJoCo 检查。"]
1069
+ ])
1070
+ e(
1071
+ A,
1072
+ "scene",
1073
+ "not-run",
1074
+ "info",
1075
+ "runtime",
1076
+ P,
1077
+ "在检查页运行“固定步长场景检查”,本项不会使用交互调试结果。",
1078
+ { deterministic: null },
1079
+ s
1080
+ );
1081
+ return;
1082
+ }
1083
+ if (i.status !== "completed") {
1084
+ for (const [A, P] of [
1085
+ ["SCENE_INITIAL_PENETRATION", "没有可用的 MuJoCo 固定初态数据。"],
1086
+ ["SCENE_BELOW_GROUND", "没有可用的 MuJoCo 固定初态数据。"],
1087
+ ["SCENE_FLOATING", "没有可用的 MuJoCo 固定初态数据。"],
1088
+ ["SCENE_AABB_OVERLAP", "没有可用的 MuJoCo 固定初态数据。"],
1089
+ ["SCENE_DYNAMIC_STATIC", "没有可用的 MuJoCo 动态/静态分类。"]
1090
+ ])
1091
+ e(
1092
+ A,
1093
+ "scene",
1094
+ i.status === "unavailable" ? "unsupported" : "not-run",
1095
+ "warning",
1096
+ "runtime",
1097
+ `${P} ${i.reason ?? ""}`.trim(),
1098
+ "确认场景包含可编译物理后重新运行。",
1099
+ { deterministic: i },
1100
+ s
1101
+ );
1102
+ return;
1103
+ }
1104
+ const a = i.initial, l = i.final, u = Number((a == null ? void 0 : a.contactCount) ?? 0), f = Number((a == null ? void 0 : a.maxPenetration) ?? 0), m = se(l == null ? void 0 : l.qvel), d = m.length ? Math.max(...m.map(Math.abs)) : 0;
1105
+ e(
1106
+ "SCENE_INITIAL_PENETRATION",
1107
+ "scene",
1108
+ f > 1e-4 ? "fail" : u > 0 ? "pass" : "conditional",
1109
+ f > 1e-4 ? "error" : u > 0 ? "info" : "warning",
1110
+ "runtime",
1111
+ f > 1e-4 ? `固定初态最大穿透 ${f.toFixed(6)} m。` : u > 0 ? `固定初态检测到 ${u} 个接触,最大穿透 ${f.toFixed(6)} m。` : "固定初态没有检测到接触。",
1112
+ f > 1e-4 ? "调整初始位姿、碰撞代理或地面高度。" : "无需处理。",
1113
+ { initial: a },
1114
+ s
1115
+ );
1116
+ const g = (D = t.instance) == null ? void 0 : D.nodeId, p = g ? i.bounds[g] : null, S = Object.entries(i.bounds).filter(([, A]) => A.min[2] < -1e-4);
1117
+ e(
1118
+ "SCENE_BELOW_GROUND",
1119
+ "scene",
1120
+ S.length ? "fail" : Object.keys(i.bounds).length ? "pass" : "unknown",
1121
+ S.length ? "error" : "info",
1122
+ "runtime",
1123
+ S.length ? `${S.length} 个实例包围盒低于地面。` : Object.keys(i.bounds).length ? "实例包围盒均不低于地面。" : "没有实例包围盒数据。",
1124
+ S.length ? "上移初始姿态或修正地面/碰撞代理。" : "无需处理。",
1125
+ { bounds: p, violations: S },
1126
+ s
1127
+ );
1128
+ const I = new Set(
1129
+ [...$(a == null ? void 0 : a.contacts), ...$(l == null ? void 0 : l.contacts)].flatMap((A) => [A.instance1, A.instance2]).filter((A) => typeof A == "string")
1130
+ ), C = Object.entries(i.bounds).filter(([A, P]) => P.min[2] > 0.02 && !I.has(A));
1131
+ e(
1132
+ "SCENE_FLOATING",
1133
+ "scene",
1134
+ C.length ? "conditional" : Object.keys(i.bounds).length ? "pass" : "unknown",
1135
+ C.length ? "warning" : "info",
1136
+ "runtime",
1137
+ C.length ? `${C.length} 个实例在当前接触图中悬空;可能是合法的空中初始状态。` : Object.keys(i.bounds).length ? "未发现无接触且明显离地的实例。" : "没有实例包围盒数据。",
1138
+ C.length ? "若资产应落地,请降低初始高度;若是任务初始状态,保留注解说明。" : "无需处理。",
1139
+ { unsupportedFloating: C, touching: [...I] },
1140
+ s
1141
+ ), e(
1142
+ "SCENE_AABB_OVERLAP",
1143
+ "scene",
1144
+ i.overlaps.length ? "conditional" : "pass",
1145
+ i.overlaps.length ? "warning" : "info",
1146
+ "runtime",
1147
+ i.overlaps.length ? `${i.overlaps.length} 对实例的世界 AABB 重叠;该指标不是精确穿透判定。` : "实例世界 AABB 未发现重叠。",
1148
+ i.overlaps.length ? "结合碰撞代理和接触证据复核,必要时调整布局。" : "无需处理。",
1149
+ { overlaps: i.overlaps },
1150
+ s
1151
+ );
1152
+ const v = t.scene ? xt(t.scene.doc).find((A) => {
1153
+ var P;
1154
+ return A.nodeId === ((P = t.instance) == null ? void 0 : P.nodeId);
1155
+ }) : void 0, _ = Object.entries(i.bodyMotion), R = t.instance ? i.bodyMotion[t.instance.nodeId] : void 0, M = (v == null ? void 0 : v.physics.kind) ?? ((h = t.instance) == null ? void 0 : h.physics.kind);
1156
+ e(
1157
+ "SCENE_DYNAMIC_STATIC",
1158
+ "scene",
1159
+ R ? M === "dynamic" && R !== "dynamic" || M === "static" && R === "dynamic" ? "fail" : "pass" : "unknown",
1160
+ R && (M === "dynamic" && R !== "dynamic" || M === "static" && R === "dynamic") ? "error" : "info",
1161
+ "annotated",
1162
+ R ? `实例意图 ${M ?? "unknown"},MuJoCo 实际分类 ${R}。` : "没有该实例的 MuJoCo 动态/静态分类。",
1163
+ R ? "校正 PhysicsIntent 或 USD 刚体/碰撞声明。" : "运行固定步长场景检查后重试。",
1164
+ { selectedMotion: R, runtimeMotion: _, runtimeBodies: o },
1165
+ s
1166
+ ), e(
1167
+ "RUNTIME_REPRODUCIBLE_CHECK",
1168
+ "runtime",
1169
+ d > 1e4 ? "fail" : "pass",
1170
+ d > 1e4 ? "error" : "info",
1171
+ "runtime",
1172
+ `固定 timestep=${i.timestep ?? "unknown"},${i.steps} 步;最终最大 |qvel|=${d.toFixed(6)}。该结果只代表 MuJoCo 子集。`,
1173
+ d > 1e4 ? "降低速度、修复约束或排除不稳定的碰撞映射。" : "无需处理。",
1174
+ {
1175
+ timestep: i.timestep,
1176
+ steps: i.steps,
1177
+ maxVelocity: d,
1178
+ engine: "MuJoCo WASM subset"
1179
+ },
1180
+ s
1181
+ );
1182
+ }
1183
+ async function En(e) {
1184
+ const t = ve(e.bundle), n = w(e.bundle.entryLocator), o = e.bundle.files.find((i) => w(i.locator) === n), s = /\.usdz$/i.test(t);
1185
+ if (!o)
1186
+ return {
1187
+ entryFound: !1,
1188
+ facts: he(),
1189
+ isUsdz: s,
1190
+ zip: "unknown",
1191
+ zipFileCount: 0
1192
+ };
1193
+ const r = new Uint8Array(await o.blob.arrayBuffer());
1194
+ if (Ie(t, r)) {
1195
+ const i = new TextDecoder("utf-8").decode(r), a = await yn(e.bundle), l = kt(
1196
+ a,
1197
+ e.bundle.files.map((u) => u.locator)
1198
+ );
1199
+ return {
1200
+ entryFound: !0,
1201
+ facts: Qe(
1202
+ i,
1203
+ a.map((u) => ({ path: u.path, text: u.text })),
1204
+ l
1205
+ ),
1206
+ isUsdz: !1,
1207
+ zip: "not-zip",
1208
+ zipFileCount: 0
1209
+ };
1210
+ }
1211
+ if (s || Gn(r))
1212
+ try {
1213
+ const i = await re.loadAsync(r), a = Object.values(i.files).filter((d) => !d.dir), l = [], u = new Set(a.map((d) => Ce(d.name)));
1214
+ for (const d of a) {
1215
+ if (!/\.(?:usda|usd)$/i.test(d.name)) continue;
1216
+ const g = await d.async("uint8array");
1217
+ Ie(d.name, g) && l.push({ path: Ce(d.name), text: new TextDecoder("utf-8").decode(g) });
1218
+ }
1219
+ const f = l.length ? $t(l, u) : null, m = l.find((d) => /(?:^|\/)(?:root|scene|main)\.usd(?:a)?$/i.test(d.path)) ?? l[0];
1220
+ return {
1221
+ entryFound: !0,
1222
+ facts: Qe((m == null ? void 0 : m.text) ?? "", l, f ?? Ln()),
1223
+ isUsdz: s,
1224
+ zip: "readable",
1225
+ zipFileCount: a.length
1226
+ };
1227
+ } catch {
1228
+ return {
1229
+ entryFound: !0,
1230
+ facts: he(),
1231
+ isUsdz: s,
1232
+ zip: "invalid",
1233
+ zipFileCount: 0
1234
+ };
1235
+ }
1236
+ return {
1237
+ entryFound: !0,
1238
+ facts: he(),
1239
+ isUsdz: !1,
1240
+ zip: "not-zip",
1241
+ zipFileCount: 0
1242
+ };
1243
+ }
1244
+ async function yn(e) {
1245
+ const t = [];
1246
+ for (const n of e.files) {
1247
+ const o = K(n.locator);
1248
+ if (!/\.(?:usda|usd)$/i.test(o)) continue;
1249
+ const s = new Uint8Array(await n.blob.arrayBuffer());
1250
+ Ie(o, s) && t.push({
1251
+ locator: n.locator,
1252
+ path: o,
1253
+ text: new TextDecoder("utf-8").decode(s)
1254
+ });
1255
+ }
1256
+ return t;
1257
+ }
1258
+ function Qe(e, t, n) {
1259
+ const o = t.map((a) => a.text).join(`
1260
+ `), s = In(e || o), r = s.filter((a) => /Mesh$/i.test(a.typeName)).map(Cn), c = s.flatMap((a) => {
1261
+ var u;
1262
+ const l = (u = /\brel\s+material:binding(?:\s*=\s*<([^>]+)>)/.exec(a.body)) == null ? void 0 : u[1];
1263
+ return l ? [`${a.path} -> ${l.trim()}`] : [];
1264
+ }), i = {};
1265
+ for (const a of s)
1266
+ for (const l of a.body.matchAll(/\b(semantic:[A-Za-z0-9_:]+)\s*=\s*([^\n]+)/g)) {
1267
+ const u = i[l[1]] ?? [];
1268
+ u.push(`${a.path}: ${l[2].trim()}`), i[l[1]] = u;
1269
+ }
1270
+ return {
1271
+ textual: !0,
1272
+ text: o,
1273
+ prims: s,
1274
+ meshes: r,
1275
+ materialBindings: c,
1276
+ semanticFields: i,
1277
+ physics: An(s),
1278
+ dependencies: n,
1279
+ payloads: [...new Set([...o.matchAll(/\bpayload\s*=\s*@([^@]+)@/g)].map((a) => a[1].trim()))],
1280
+ sublayers: [...o.matchAll(/\bsubLayers\s*=\s*\[([\s\S]*?)\]/g)].flatMap((a) => [...a[1].matchAll(/@([^@]+)@/g)].map((l) => l[1].trim()))
1281
+ };
1282
+ }
1283
+ function In(e) {
1284
+ const t = [], n = (o, s, r) => {
1285
+ const c = /\b(?:def|over|class)\s+([A-Za-z0-9_:]+)\s+"([^"]+)"/g;
1286
+ for (c.lastIndex = o; c.lastIndex < s; ) {
1287
+ const i = c.exec(e);
1288
+ if (!i || i.index >= s) break;
1289
+ const a = $n(e, c.lastIndex, s);
1290
+ if (a < 0) continue;
1291
+ const l = Fn(e, a, s);
1292
+ if (l < 0) break;
1293
+ const u = i[2], f = `${r}/${u}`.replace(/\/+/g, "/");
1294
+ t.push({
1295
+ path: f,
1296
+ name: u,
1297
+ typeName: i[1],
1298
+ body: e.slice(a + 1, l),
1299
+ source: e.slice(i.index, l + 1)
1300
+ }), n(a + 1, l, f), c.lastIndex = l + 1;
1301
+ }
1302
+ };
1303
+ return n(0, e.length, ""), t;
1304
+ }
1305
+ function Cn(e) {
1306
+ var i, a;
1307
+ const t = pe(e.body, /\bpoint3f\[\]\s+points\s*=\s*[\[(]/), n = pe(e.body, /\bint\[\]\s+faceVertexCounts\s*=\s*[\[(]/), o = pe(e.body, /\bint\[\]\s+faceVertexIndices\s*=\s*[\[(]/);
1308
+ let s = 0, r = 0, c = 0;
1309
+ for (const l of n.length ? n : Array.from({ length: Math.floor(o.length / 3) }, () => 3)) {
1310
+ if (l < 3) {
1311
+ r += Math.max(0, l);
1312
+ continue;
1313
+ }
1314
+ s += Math.floor(l - 2);
1315
+ for (let u = 1; u < l - 1; u += 1) {
1316
+ const f = o[r], m = o[r + u], d = o[r + u + 1];
1317
+ (f === void 0 || m === void 0 || d === void 0 || f === m || m === d || f === d) && (c += 1);
1318
+ }
1319
+ r += l;
1320
+ }
1321
+ return !n.length && o.length && (s = Math.floor(o.length / 3)), {
1322
+ path: e.path,
1323
+ vertexCount: Math.floor(t.length / 3),
1324
+ triangleCount: s,
1325
+ normals: /\b(?:normal3f\[\]|texCoord2f\[\]|primvars:normals)\b/.test(e.body),
1326
+ orientation: ((i = /\borientation\s*=\s*"([^"]+)"/.exec(e.body)) == null ? void 0 : i[1]) ?? null,
1327
+ degenerateTriangles: c,
1328
+ materialBinding: ((a = /\brel\s+material:binding(?:\s*=\s*<([^>]+)>)?/.exec(e.body)) == null ? void 0 : a[1]) ?? null
1329
+ };
1330
+ }
1331
+ function An(e) {
1332
+ const t = e.filter((o) => /PhysicsRigidBodyAPI/.test(o.source)), n = e.filter((o) => /PhysicsCollisionAPI/.test(o.source));
1333
+ return {
1334
+ rigidBodyCount: t.length,
1335
+ colliderCount: n.length,
1336
+ staticColliderCount: n.filter((o) => !/PhysicsRigidBodyAPI/.test(o.source)).length,
1337
+ articulationRootCount: e.filter((o) => /PhysicsArticulationRootAPI/.test(o.source)).length,
1338
+ jointCount: e.filter((o) => /^Physics(?:Fixed|Revolute|Prismatic|Spherical)Joint$/.test(o.typeName)).length,
1339
+ driveCount: e.reduce((o, s) => o + (s.body.match(/\bdrive:/g) ?? []).length, 0),
1340
+ mimicCount: e.reduce((o, s) => o + (s.body.match(/mimic|(?:newton|mjc):mimic/gi) ?? []).length, 0),
1341
+ massCount: e.reduce((o, s) => o + (s.body.match(/\bphysics:mass\s*=/g) ?? []).length, 0),
1342
+ densityCount: e.reduce((o, s) => o + (s.body.match(/\bphysics:density\s*=/g) ?? []).length, 0),
1343
+ centerOfMassCount: e.reduce((o, s) => o + (s.body.match(/\bphysics:centerOfMass\s*=/g) ?? []).length, 0),
1344
+ inertiaCount: e.reduce((o, s) => o + (s.body.match(/\bphysics:diagonalInertia\s*=/g) ?? []).length, 0),
1345
+ materialCount: e.filter((o) => /PhysicsMaterialAPI/.test(o.source)).length
1346
+ };
1347
+ }
1348
+ async function bn(e, t) {
1349
+ var a;
1350
+ const n = e.files.map((l) => ({
1351
+ locator: l.locator,
1352
+ path: K(l.locator),
1353
+ blob: l.blob
1354
+ })), o = t.resolvedPath ? ((a = n.find((l) => l.path === t.resolvedPath)) == null ? void 0 : a.locator) ?? null : rt(
1355
+ t.fromLocator,
1356
+ t.path,
1357
+ n.map((l) => l.locator)
1358
+ ), s = o ? w(o) : null, r = t.fromLocator.kind === "package-path" ? Ce(t.path.replace(/^@|@$/g, "")) : null, c = (s ? n.find((l) => w(l.locator) === s) : void 0) ?? (t.fromLocator.kind === "package-path" ? n.find((l) => l.path.endsWith(`/${r}`)) ?? n.find((l) => l.path.split("/").pop() === (r == null ? void 0 : r.split("/").pop())) : void 0), i = (c == null ? void 0 : c.path) ?? null;
1359
+ if (!c)
1360
+ return {
1361
+ path: t.path,
1362
+ from: K(t.fromLocator),
1363
+ resolved: i,
1364
+ found: !1,
1365
+ width: null,
1366
+ height: null,
1367
+ error: "资产包中未找到纹理文件。"
1368
+ };
1369
+ if (typeof createImageBitmap != "function")
1370
+ return {
1371
+ path: t.path,
1372
+ from: K(t.fromLocator),
1373
+ resolved: i,
1374
+ found: !0,
1375
+ width: null,
1376
+ height: null,
1377
+ error: "当前宿主不支持 createImageBitmap。"
1378
+ };
1379
+ try {
1380
+ const l = await createImageBitmap(c.blob);
1381
+ try {
1382
+ return {
1383
+ path: t.path,
1384
+ from: K(t.fromLocator),
1385
+ resolved: i,
1386
+ found: !0,
1387
+ width: l.width,
1388
+ height: l.height,
1389
+ error: null
1390
+ };
1391
+ } finally {
1392
+ l.close();
1393
+ }
1394
+ } catch (l) {
1395
+ return {
1396
+ path: t.path,
1397
+ from: K(t.fromLocator),
1398
+ resolved: i,
1399
+ found: !0,
1400
+ width: null,
1401
+ height: null,
1402
+ error: l instanceof Error ? l.message : String(l)
1403
+ };
1404
+ }
1405
+ }
1406
+ function _n(e, t) {
1407
+ const n = L(t == null ? void 0 : t.stage), o = N(n == null ? void 0 : n.defaultPrim) ?? (e == null ? void 0 : e.defaultPrim) ?? null;
1408
+ return {
1409
+ defaultPrim: dt(o),
1410
+ upAxis: N(n == null ? void 0 : n.upAxis) ?? (e == null ? void 0 : e.upAxis) ?? null,
1411
+ metersPerUnit: G(n == null ? void 0 : n.metersPerUnit) ?? (e == null ? void 0 : e.metersPerUnit) ?? null,
1412
+ kilogramsPerUnit: G(n == null ? void 0 : n.kilogramsPerUnit) ?? (e == null ? void 0 : e.kilogramsPerUnit) ?? null,
1413
+ extent: (e == null ? void 0 : e.extent) ?? null
1414
+ };
1415
+ }
1416
+ function vn(e, t, n) {
1417
+ const o = $(t == null ? void 0 : t.prims);
1418
+ return o.length ? o.flatMap((s) => {
1419
+ const r = N(s.path);
1420
+ return r ? [{
1421
+ path: r,
1422
+ name: N(s.name) ?? r.split("/").pop() ?? r,
1423
+ typeName: N(s.typeName) || "unknown",
1424
+ variant: null,
1425
+ source: "runtime"
1426
+ }] : [];
1427
+ }) : e.prims.map((s) => ({
1428
+ path: s.path,
1429
+ name: s.name,
1430
+ typeName: s.typeName,
1431
+ variant: null,
1432
+ source: "authored"
1433
+ }));
1434
+ }
1435
+ function Rn(e, t) {
1436
+ var o;
1437
+ const n = $(t == null ? void 0 : t.meshes);
1438
+ if (n.length) {
1439
+ const s = n.flatMap((r) => {
1440
+ const c = G(r.degenerateTriangles) ?? 0, i = N(r.path) ?? "unknown";
1441
+ return c > 0 ? [{
1442
+ path: i,
1443
+ triangles: c,
1444
+ role: Nn(i, t) ? "collision" : "visual"
1445
+ }] : [];
1446
+ });
1447
+ return {
1448
+ meshCount: n.length,
1449
+ vertexCount: J(n.map((r) => G(r.vertexCount) ?? 0)),
1450
+ triangleCount: J(n.map((r) => G(r.triangleCount) ?? 0)),
1451
+ degenerateTriangles: J(n.map((r) => G(r.degenerateTriangles) ?? 0)),
1452
+ collisionDegenerateTriangles: J(
1453
+ s.filter((r) => r.role === "collision").map((r) => r.triangles)
1454
+ ),
1455
+ degenerateMeshes: s,
1456
+ normals: n.every((r) => (G(r.normalCount) ?? 0) > 0),
1457
+ orientation: null,
1458
+ meshSource: "runtime"
1459
+ };
1460
+ }
1461
+ if (e.meshes.length) {
1462
+ const s = e.meshes.filter((r) => r.degenerateTriangles > 0).map((r) => ({
1463
+ path: r.path,
1464
+ triangles: r.degenerateTriangles,
1465
+ role: "unknown"
1466
+ }));
1467
+ return {
1468
+ meshCount: e.meshes.length,
1469
+ vertexCount: J(e.meshes.map((r) => r.vertexCount)),
1470
+ triangleCount: J(e.meshes.map((r) => r.triangleCount)),
1471
+ degenerateTriangles: J(e.meshes.map((r) => r.degenerateTriangles)),
1472
+ collisionDegenerateTriangles: 0,
1473
+ degenerateMeshes: s,
1474
+ normals: e.meshes.every((r) => r.normals),
1475
+ orientation: ((o = e.meshes.find((r) => r.orientation)) == null ? void 0 : o.orientation) ?? null,
1476
+ meshSource: "probed"
1477
+ };
1478
+ }
1479
+ return {
1480
+ meshCount: null,
1481
+ vertexCount: null,
1482
+ triangleCount: null,
1483
+ degenerateTriangles: null,
1484
+ collisionDegenerateTriangles: 0,
1485
+ degenerateMeshes: [],
1486
+ normals: null,
1487
+ orientation: null,
1488
+ meshSource: "probed"
1489
+ };
1490
+ }
1491
+ function Nn(e, t) {
1492
+ var o;
1493
+ return $((o = L(t == null ? void 0 : t.physics)) == null ? void 0 : o.colliders).some((s) => {
1494
+ const r = N(s.path);
1495
+ return s.enabled !== !1 && !!r && (e === r || e.startsWith(`${r}/`));
1496
+ });
1497
+ }
1498
+ function Pn(e) {
1499
+ const t = Object.fromEntries([
1500
+ "not-run",
1501
+ "running",
1502
+ "pass",
1503
+ "conditional",
1504
+ "fail",
1505
+ "unsupported",
1506
+ "unknown",
1507
+ "stale"
1508
+ ].map((i) => [i, 0]));
1509
+ for (const i of e) t[i.status] += 1;
1510
+ const n = e.filter((i) => i.status === "fail" && et(i, me)).map((i) => i.code), o = e.filter((i) => i.status === "fail" && !et(i, me)).map((i) => i.code), s = e.filter((i) => ["conditional", "unknown", "unsupported", "stale"].includes(i.status) || i.status === "not-run" && i.severity === "warning").map((i) => i.code), r = e.find((i) => i.code === "SCENE_PHYSICS_COMPILE"), c = n.length ? "blocked" : (r == null ? void 0 : r.status) === "pass" ? "ready" : (r == null ? void 0 : r.status) === "not-run" ? "not-applicable" : "unknown";
1511
+ return {
1512
+ counts: t,
1513
+ simulation: {
1514
+ target: me,
1515
+ status: c,
1516
+ blockingCodes: [...new Set(n)]
1517
+ },
1518
+ diagnostics: {
1519
+ status: o.length ? "fail" : s.length ? "conditional" : "pass",
1520
+ failingCodes: [...new Set(o)],
1521
+ conditionalCodes: [...new Set(s)]
1522
+ },
1523
+ profile: {
1524
+ id: "simready",
1525
+ status: "not-run",
1526
+ reason: "Studio 执行本地运行时可行性预检;完整 SimReady / Isaac Asset Validator 未运行。"
1527
+ }
1528
+ };
1529
+ }
1530
+ function et(e, t) {
1531
+ return e.blocking === "always" ? !0 : e.blocking === "target" && e.targets.includes(t);
1532
+ }
1533
+ function Tn(e) {
1534
+ var t;
1535
+ return L((t = L(e == null ? void 0 : e.visualDiagnostics)) == null ? void 0 : t.usd);
1536
+ }
1537
+ function wn(e, t, n) {
1538
+ const o = t == null ? void 0 : t.deterministic;
1539
+ if (o && n) return o.bounds[n] ?? null;
1540
+ const r = $(e == null ? void 0 : e.meshes).map((u) => L(u.bounds)).filter(Boolean);
1541
+ if (!r.length) return null;
1542
+ const c = r.map((u) => se(u.min)).filter((u) => u.length === 3), i = r.map((u) => se(u.max)).filter((u) => u.length === 3);
1543
+ if (!c.length || !i.length) return null;
1544
+ const a = [0, 1, 2].map((u) => Math.min(...c.map((f) => f[u]))), l = [0, 1, 2].map((u) => Math.max(...i.map((f) => f[u])));
1545
+ return { min: a, max: l, size: l.map((u, f) => u - a[f]) };
1546
+ }
1547
+ function tt(e) {
1548
+ var t;
1549
+ return $((t = L(e == null ? void 0 : e.physics)) == null ? void 0 : t.colliders).length > 0;
1550
+ }
1551
+ function Mn(e) {
1552
+ const t = /* @__PURE__ */ new Map();
1553
+ for (const n of e) {
1554
+ if (n.excludeFromArticulation === !0) continue;
1555
+ const o = N(n.body0), s = N(n.body1);
1556
+ if (!o || !s) continue;
1557
+ const r = [o, s].sort().join(" <-> ");
1558
+ t.set(r, (t.get(r) ?? 0) + 1);
1559
+ }
1560
+ return [...t.entries()].filter(([, n]) => n > 1).map(([n]) => n);
1561
+ }
1562
+ function xn(e) {
1563
+ return e.filter((t) => e.some((n) => n !== t && n.startsWith(`${t}/`)));
1564
+ }
1565
+ function On(e, t) {
1566
+ const n = $(e == null ? void 0 : e.bodies);
1567
+ return n.length ? t === "PHYSICS_DENSITY" ? n.some((o) => {
1568
+ var s;
1569
+ return (G((s = L(o.mass)) == null ? void 0 : s.density) ?? G(o.density) ?? 0) > 0;
1570
+ }) : t === "PHYSICS_COM" ? n.some((o) => se(o.centerOfMass ?? o.position).length === 3) : t === "PHYSICS_INERTIA" ? n.some((o) => se(o.inertia).some((s) => s > 0)) : !1 : !1;
1571
+ }
1572
+ function Dn(e, t) {
1573
+ const n = /* @__PURE__ */ new Set([...Object.keys(e), ...t]), o = Object.values(e).flat(), s = new Set(o.map((r) => r.split(":", 1)[0]));
1574
+ return {
1575
+ attributeCount: n.size,
1576
+ primCount: s.size,
1577
+ valueCount: o.length + t.length,
1578
+ evidence: { fields: [...n], authored: e }
1579
+ };
1580
+ }
1581
+ function Un(e, t) {
1582
+ var o, s;
1583
+ if (!t) return ((o = e[0]) == null ? void 0 : o.path) ?? null;
1584
+ const n = dt(t);
1585
+ return ((s = e.find((r) => r.path === n)) == null ? void 0 : s.path) ?? null;
1586
+ }
1587
+ function dt(e) {
1588
+ return e ? `/${e.replace(/^\/+/, "")}`.replace(/\/+/g, "/") : null;
1589
+ }
1590
+ function he() {
1591
+ return {
1592
+ textual: !1,
1593
+ text: "",
1594
+ prims: [],
1595
+ meshes: [],
1596
+ materialBindings: [],
1597
+ semanticFields: {},
1598
+ physics: fn,
1599
+ dependencies: null,
1600
+ payloads: [],
1601
+ sublayers: []
1602
+ };
1603
+ }
1604
+ function Ln() {
1605
+ return {
1606
+ references: [],
1607
+ missing: [],
1608
+ external: [],
1609
+ unanchored: [],
1610
+ materialModules: [],
1611
+ layers: []
1612
+ };
1613
+ }
1614
+ function pe(e, t) {
1615
+ var s;
1616
+ const n = t.exec(e);
1617
+ return n ? ((s = kn(e, n.index + n[0].length - 1).match(/[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?/g)) == null ? void 0 : s.map(Number).filter(Number.isFinite)) ?? [] : [];
1618
+ }
1619
+ function kn(e, t) {
1620
+ const n = e[t], o = n === "(" ? ")" : n === "[" ? "]" : n === "{" ? "}" : "";
1621
+ if (!o) return "";
1622
+ let s = 0, r = !1;
1623
+ for (let c = t; c < e.length; c += 1) {
1624
+ const i = e[c];
1625
+ if (i === '"' && e[c - 1] !== "\\" && (r = !r), !r) {
1626
+ if (i === n) s += 1;
1627
+ else if (i === o && (s -= 1, s === 0))
1628
+ return e.slice(t + 1, c);
1629
+ }
1630
+ }
1631
+ return "";
1632
+ }
1633
+ function $n(e, t, n) {
1634
+ let o = !1;
1635
+ for (let s = t; s < n; s += 1) {
1636
+ const r = e[s];
1637
+ if (r === '"' && e[s - 1] !== "\\" && (o = !o), !o && r === "{") return s;
1638
+ }
1639
+ return -1;
1640
+ }
1641
+ function Fn(e, t, n) {
1642
+ let o = 0, s = !1, r = !1;
1643
+ for (let c = t; c < n; c += 1) {
1644
+ if (!s && e.slice(c, c + 3) === "'''") {
1645
+ r = !r, c += 2;
1646
+ continue;
1647
+ }
1648
+ if (r) continue;
1649
+ const i = e[c];
1650
+ if (i === '"' && e[c - 1] !== "\\" && (s = !s), !s) {
1651
+ if (i === "{") o += 1;
1652
+ else if (i === "}" && (o -= 1, o === 0))
1653
+ return c;
1654
+ }
1655
+ }
1656
+ return -1;
1657
+ }
1658
+ function Gn(e) {
1659
+ return e.length >= 4 && e[0] === 80 && e[1] === 75;
1660
+ }
1661
+ function Vn(e) {
1662
+ return /\.(?:png|jpe?g|exr|hdr|ktx2|webp|tga|dds)(?:[?#].*)?$/i.test(e);
1663
+ }
1664
+ function L(e) {
1665
+ return e && typeof e == "object" && !Array.isArray(e) ? e : null;
1666
+ }
1667
+ function $(e) {
1668
+ return Array.isArray(e) ? e.map(L).filter((t) => !!t) : [];
1669
+ }
1670
+ function se(e) {
1671
+ return Array.isArray(e) && e.every((t) => typeof t == "number" && Number.isFinite(t)) ? e : [];
1672
+ }
1673
+ function G(e) {
1674
+ return typeof e == "number" && Number.isFinite(e) ? e : null;
1675
+ }
1676
+ function N(e) {
1677
+ return typeof e == "string" && e ? e : null;
1678
+ }
1679
+ function J(e) {
1680
+ return e.reduce((t, n) => t + n, 0);
1681
+ }
1682
+ function ge(e) {
1683
+ return e.map((t) => Number(t.toFixed(4))).join(" × ");
1684
+ }
1685
+ function T(e, t, n, o, s, r, c, i, a, l, u) {
1686
+ const f = u ?? dn[t];
1687
+ if (!f) throw new Error(`Missing inspection finding contract: ${t}`);
1688
+ e({
1689
+ code: t,
1690
+ scope: n,
1691
+ status: o,
1692
+ severity: s,
1693
+ source: r,
1694
+ message: c,
1695
+ remediation: i,
1696
+ impact: f.impact,
1697
+ blocking: f.blocking,
1698
+ targets: f.targets,
1699
+ primPath: l,
1700
+ evidence: a
1701
+ });
1702
+ }
1703
+ const Se = Object.freeze({
1704
+ textual: !1,
1705
+ defaultPrim: null,
1706
+ upAxis: null,
1707
+ metersPerUnit: null,
1708
+ kilogramsPerUnit: null,
1709
+ creator: null,
1710
+ startTimeCode: null,
1711
+ endTimeCode: null,
1712
+ timeCodesPerSecond: null,
1713
+ rootPrim: null,
1714
+ simReady: null,
1715
+ packageEvidence: null,
1716
+ sourcePhysics: null,
1717
+ extent: null,
1718
+ references: [],
1719
+ payloads: [],
1720
+ sublayers: [],
1721
+ materials: [],
1722
+ materialBindings: [],
1723
+ textures: [],
1724
+ semanticFields: [],
1725
+ variantSets: [],
1726
+ meshCount: 0,
1727
+ hasRigidBodyApi: !1,
1728
+ hasCollisionApi: !1,
1729
+ jointCount: 0
1730
+ });
1731
+ async function Ns(e) {
1732
+ var O, F, D, h;
1733
+ const t = ve(e), n = w(e.entryLocator), o = e.files.find((A) => w(A.locator) === n);
1734
+ if (!o || !/\.(usda|usd)$/i.test(t)) return Se;
1735
+ const s = new Uint8Array(await o.blob.arrayBuffer());
1736
+ if (s.length >= 8 && new TextDecoder("ascii").decode(s.subarray(0, 8)) === "PXR-USDC") return Se;
1737
+ const r = new TextDecoder("utf-8").decode(s);
1738
+ if (!r.includes("#usda")) return Se;
1739
+ const c = ((O = /\bdefaultPrim\s*=\s*"([^"]+)"/.exec(r)) == null ? void 0 : O[1]) ?? null, i = ((F = /\bupAxis\s*=\s*"([^"]+)"/.exec(r)) == null ? void 0 : F[1]) ?? null, a = (D = /\bmetersPerUnit\s*=\s*([0-9.eE+-]+)/.exec(r)) == null ? void 0 : D[1], l = (h = /\bkilogramsPerUnit\s*=\s*([0-9.eE+-]+)/.exec(r)) == null ? void 0 : h[1], u = Z(Q(r, /\breferences?\s*=\s*@([^@]+)@/g)), f = Z(Q(r, /\bpayload\s*=\s*@([^@]+)@/g)), m = Z([...r.matchAll(/\bsubLayers\s*=\s*\[([\s\S]*?)\]/g)].flatMap((A) => [...A[1].matchAll(/@([^@]+)@/g)].map((P) => P[1].trim()))), d = Z(Q(r, /\bmaterial:binding\s*=\s*<([^>]+)>/g)), g = Z(Q(r, /\bdef\s+Material\s+"([^"]+)"/g)), p = Z(Q(r, /@([^@]+\.(?:png|jpe?g|exr|ktx2))@/gi)), S = Z([...r.matchAll(/\b(semantic:[A-Za-z0-9_:]+)\s*=/g)].map((A) => A[1])), I = /\bfloat3\[\]\s+extent\s*=\s*\[\s*\(([^)]+)\)\s*,\s*\(([^)]+)\)\s*\]/.exec(r), C = I ? nt(I[1]) : null, v = I ? nt(I[2]) : null, _ = Ft(r), R = e.files.map((A) => ({
1740
+ path: K(A.locator),
1741
+ blob: A.blob
1742
+ })), [M, k] = await Promise.all([
1743
+ Gt(R),
1744
+ Vt(R)
1745
+ ]);
1746
+ return Object.freeze({
1747
+ textual: !0,
1748
+ defaultPrim: c,
1749
+ upAxis: i,
1750
+ metersPerUnit: a && Number.isFinite(Number(a)) ? Number(a) : null,
1751
+ kilogramsPerUnit: l && Number.isFinite(Number(l)) ? Number(l) : null,
1752
+ creator: _.creator,
1753
+ startTimeCode: _.startTimeCode,
1754
+ endTimeCode: _.endTimeCode,
1755
+ timeCodesPerSecond: _.timeCodesPerSecond,
1756
+ rootPrim: _.rootPrim,
1757
+ simReady: _.simReady,
1758
+ packageEvidence: M,
1759
+ sourcePhysics: k,
1760
+ extent: C && v ? { min: C, max: v } : null,
1761
+ references: u,
1762
+ payloads: f,
1763
+ sublayers: m,
1764
+ materials: g,
1765
+ materialBindings: d,
1766
+ textures: p,
1767
+ semanticFields: S,
1768
+ variantSets: _.variantSets,
1769
+ meshCount: (r.match(/\bdef\s+Mesh\b/g) ?? []).length,
1770
+ hasRigidBodyApi: r.includes("PhysicsRigidBodyAPI"),
1771
+ hasCollisionApi: r.includes("PhysicsCollisionAPI"),
1772
+ jointCount: (r.match(/\bdef\s+Physics(?:Revolute|Prismatic|Fixed|Spherical)Joint\b/g) ?? []).length
1773
+ });
1774
+ }
1775
+ function Q(e, t) {
1776
+ return [...e.matchAll(t)].map((n) => {
1777
+ var o;
1778
+ return ((o = n[1]) == null ? void 0 : o.trim()) ?? "";
1779
+ }).filter(Boolean);
1780
+ }
1781
+ function nt(e) {
1782
+ const t = e.trim().split(/\s*,\s*|\s+/).map(Number);
1783
+ return t.length === 3 && t.every(Number.isFinite) ? [t[0], t[1], t[2]] : null;
1784
+ }
1785
+ function Z(e) {
1786
+ return [...new Set(e)].sort((t, n) => t.localeCompare(n));
1787
+ }
1788
+ const Bn = { instanceIds: [], primaryId: null }, st = "scene-instance:";
1789
+ function ot(e) {
1790
+ if (!e.startsWith(st)) return null;
1791
+ const t = e.slice(st.length);
1792
+ return t.length > 0 ? t : null;
1793
+ }
1794
+ function Ps(e) {
1795
+ let t = null;
1796
+ for (const n of e)
1797
+ ot(n.objectName) !== null && Number.isFinite(n.distance) && (t === null || n.distance < t.distance) && (t = n);
1798
+ return t === null ? null : ot(t.objectName);
1799
+ }
1800
+ function Ts(e, t, n = "replace", o = [], s = {}) {
1801
+ const r = (c) => {
1802
+ const i = o.find((l) => l.nodeId === c);
1803
+ if (!i) return !0;
1804
+ const a = s[i.nodeId];
1805
+ return i.visible && !(a != null && a.hidden);
1806
+ };
1807
+ if (t === null)
1808
+ return n === "replace" ? Bn : e;
1809
+ if (!r(t)) return e;
1810
+ switch (n) {
1811
+ case "replace":
1812
+ return { instanceIds: [t], primaryId: t };
1813
+ case "add":
1814
+ return e.instanceIds.includes(t) ? e : { instanceIds: [...e.instanceIds, t], primaryId: t };
1815
+ case "toggle": {
1816
+ if (!e.instanceIds.includes(t))
1817
+ return { instanceIds: [...e.instanceIds, t], primaryId: t };
1818
+ const c = e.instanceIds.filter((i) => i !== t);
1819
+ return {
1820
+ instanceIds: c,
1821
+ // Fall back to the last remaining item so the inspector is never empty.
1822
+ primaryId: c.length > 0 ? c[c.length - 1] : null
1823
+ };
1824
+ }
1825
+ }
1826
+ }
1827
+ function ws(e, t) {
1828
+ const n = new Set(t), o = e.instanceIds.filter((r) => n.has(r));
1829
+ if (o.length === e.instanceIds.length && o.every((r, c) => r === e.instanceIds[c]))
1830
+ return e;
1831
+ const s = e.primaryId !== null && n.has(e.primaryId) ? e.primaryId : o[o.length - 1] ?? null;
1832
+ return { instanceIds: o, primaryId: s };
1833
+ }
1834
+ function Ms(e, t = e.assets) {
1835
+ const n = Object.isFrozen(e) ? e : je(Ke(e));
1836
+ return {
1837
+ doc: n,
1838
+ library: t === e.assets ? n.assets : je(Ke(t))
1839
+ };
1840
+ }
1841
+ function ft(e, t, n) {
1842
+ const o = [], s = [];
1843
+ let r = e;
1844
+ for (const c of t) {
1845
+ const i = zn(c, r);
1846
+ if (i !== null)
1847
+ return s.push({
1848
+ code: "AI_UNKNOWN_ASSET",
1849
+ level: "error",
1850
+ message: `AI referenced asset ${i}, which is not in the scene library.`,
1851
+ assetId: i
1852
+ }), { records: o, diagnostics: s };
1853
+ const a = jn(c, r);
1854
+ if (a !== null)
1855
+ return s.push({
1856
+ code: "AI_UNKNOWN_INSTANCE",
1857
+ level: "error",
1858
+ message: `AI referenced instance ${a}, which does not exist in the scene.`,
1859
+ instanceId: a
1860
+ }), { records: o, diagnostics: s };
1861
+ const l = Pt(r, c);
1862
+ if (l.diagnostics.length > 0)
1863
+ return s.push(...l.diagnostics), { records: o, diagnostics: s };
1864
+ o.push(Tt(c, {
1865
+ batchId: n.batchId,
1866
+ label: n.label,
1867
+ // Provenance matters: the undo stack and audit log distinguish AI edits
1868
+ // even though the command shape is identical to a human edit.
1869
+ source: "ai",
1870
+ now: (/* @__PURE__ */ new Date()).toISOString()
1871
+ })), r = l.doc;
1872
+ }
1873
+ return { records: o, diagnostics: s };
1874
+ }
1875
+ function xs(e, t, n) {
1876
+ const o = ft(e, t, n);
1877
+ if (o.diagnostics.length > 0)
1878
+ return { doc: e, result: { applied: [], diagnostics: o.diagnostics, rejected: !0 } };
1879
+ const s = Ae(e);
1880
+ if (!s.ok) return { doc: e, result: { applied: [], diagnostics: s.diagnostics, rejected: !0 } };
1881
+ const r = Nt(e, o.records);
1882
+ return r.diagnostics.length > 0 ? { doc: e, result: { applied: [], diagnostics: r.diagnostics, rejected: !0 } } : {
1883
+ doc: r.doc,
1884
+ result: { applied: r.applied.length > 0 ? o.records : [], diagnostics: [], rejected: !1 }
1885
+ };
1886
+ }
1887
+ function zn(e, t) {
1888
+ switch (e.type) {
1889
+ case "node.add": {
1890
+ const n = e.node;
1891
+ return n.nodeType === "asset" ? t.assets.some((o) => o.revisionId === n.assetRevisionId) ? null : n.assetRevisionId : n.nodeType === "visual" ? t.visualAssets.some((o) => o.visualRevisionId === n.visualRevisionId) ? null : n.visualRevisionId : null;
1892
+ }
1893
+ case "asset.remove":
1894
+ return t.assets.some((n) => n.revisionId === e.revisionId) ? null : e.revisionId;
1895
+ case "visualAsset.remove":
1896
+ return t.visualAssets.some((n) => n.visualRevisionId === e.visualRevisionId) ? null : e.visualRevisionId;
1897
+ case "placeholder.bind":
1898
+ return e.after !== null && !t.assets.some((n) => n.revisionId === e.after) ? e.after : null;
1899
+ case "node.replaceModel":
1900
+ return e.after.nodeType === "asset" && !t.assets.some((n) => n.revisionId === e.after.assetRevisionId) ? e.after.assetRevisionId : null;
1901
+ default:
1902
+ return null;
1903
+ }
1904
+ }
1905
+ function jn(e, t) {
1906
+ const n = new Set(Ot(t.root).map((o) => o.nodeId));
1907
+ return "nodeId" in e && !n.has(e.nodeId) ? e.nodeId : e.type === "node.add" && e.parentNodeId !== t.root.nodeId && !n.has(e.parentNodeId) ? e.parentNodeId : null;
1908
+ }
1909
+ function Os(e, t, n, o = {}) {
1910
+ const s = ft(e.document, t, n);
1911
+ if (s.diagnostics.length > 0)
1912
+ return { applied: [], diagnostics: s.diagnostics, rejected: !0 };
1913
+ const r = e.commit({ ...o, commands: s.records });
1914
+ return {
1915
+ applied: r.changed ? s.records : [],
1916
+ diagnostics: r.diagnostics,
1917
+ rejected: !r.changed
1918
+ };
1919
+ }
1920
+ const mt = "sim-studio.scene-package@5", Kn = "sim-studio.package-scene@5", Hn = "sim-studio.editorial-state@1", Yn = "sim-studio.asset-catalog@3", ht = "sim-studio.resource-manifest@2", Ds = 5;
1921
+ function Jn(e, t) {
1922
+ const n = es(t);
1923
+ return {
1924
+ format: "sim-studio.package-scene@5",
1925
+ schemaVersion: 5,
1926
+ sceneId: e.sceneId,
1927
+ meta: { ...e.meta },
1928
+ coordinateSystem: e.coordinateSystem,
1929
+ environment: e.environment,
1930
+ root: gt(e.root, n),
1931
+ ...e.semantic ? { semantic: e.semantic } : {},
1932
+ ...e.domains ? { domains: e.domains } : {},
1933
+ ...e.extensions ? { extensions: e.extensions } : {}
1934
+ };
1935
+ }
1936
+ function Zn(e, t) {
1937
+ const n = new Map(t.entries.map((i) => [i.source.sourceRevisionId, i])), o = t.entries.filter((i) => i.kind === "usd").map((i) => i.interpretation.runtimeRevision).map((i) => i), s = t.entries.filter((i) => i.kind === "visual").map((i) => i.interpretation.runtimeRevision).map((i) => i), r = {
1938
+ schemaVersion: Dt,
1939
+ sceneId: e.sceneId,
1940
+ meta: e.meta,
1941
+ coordinateSystem: e.coordinateSystem,
1942
+ environment: e.environment,
1943
+ assets: o,
1944
+ visualAssets: s,
1945
+ root: St(e.root, n),
1946
+ ...e.semantic ? { semantic: e.semantic } : {},
1947
+ ...e.domains ? { domains: e.domains } : {},
1948
+ ...e.extensions ? { extensions: e.extensions } : {}
1949
+ }, c = Ae(r);
1950
+ if (!c.ok)
1951
+ throw new Error(c.diagnostics.map((i) => i.message).join(`
1952
+ `));
1953
+ return r;
1954
+ }
1955
+ function pt(e, t) {
1956
+ const n = new Map(t.entries.map((s) => [s.source.sourceRevisionId, s])), o = (s) => {
1957
+ if (s.nodeType === "asset")
1958
+ ye(n, s.assetSourceRevisionId, "usd", s.nodeId);
1959
+ else if (s.nodeType === "visual")
1960
+ ye(n, s.visualSourceRevisionId, "visual", s.nodeId);
1961
+ else if (s.nodeType === "placeholder" && s.assetSourceRevisionId)
1962
+ ye(n, s.assetSourceRevisionId, "usd", s.nodeId);
1963
+ else if (s.nodeType === "group")
1964
+ for (const r of s.children) o(r);
1965
+ };
1966
+ o(e.root);
1967
+ }
1968
+ function gt(e, t) {
1969
+ return {
1970
+ nodeId: e.nodeId,
1971
+ label: e.label,
1972
+ localTransform: e.localTransform,
1973
+ ...e.origin ? { origin: e.origin } : {},
1974
+ nodeType: "group",
1975
+ children: e.children.map((n) => Wn(n, t))
1976
+ };
1977
+ }
1978
+ function Wn(e, t) {
1979
+ return e.nodeType === "group" ? gt(e, t) : e.nodeType === "asset" ? Xn(e, t) : e.nodeType === "visual" ? qn(e, t) : e.nodeType === "placeholder" ? Qn(e, t) : ts(e);
1980
+ }
1981
+ function Xn(e, t) {
1982
+ return {
1983
+ nodeId: e.nodeId,
1984
+ label: e.label,
1985
+ localTransform: e.localTransform,
1986
+ ...e.origin ? { origin: e.origin } : {},
1987
+ nodeType: "asset",
1988
+ assetSourceRevisionId: Ne(t, "usd", e.assetRevisionId, e.nodeId),
1989
+ role: e.role,
1990
+ visible: e.visible,
1991
+ variantSelections: e.variantSelections,
1992
+ ...e.appearance ? { appearance: e.appearance } : {},
1993
+ physics: e.physics,
1994
+ ...e.initialPose ? { initialPose: e.initialPose } : {},
1995
+ ...e.semantic ? { semantic: e.semantic } : {}
1996
+ };
1997
+ }
1998
+ function qn(e, t) {
1999
+ return {
2000
+ nodeId: e.nodeId,
2001
+ label: e.label,
2002
+ localTransform: e.localTransform,
2003
+ ...e.origin ? { origin: e.origin } : {},
2004
+ nodeType: "visual",
2005
+ visualSourceRevisionId: Ne(
2006
+ t,
2007
+ "visual",
2008
+ e.visualRevisionId,
2009
+ e.nodeId
2010
+ ),
2011
+ visible: e.visible,
2012
+ renderLayer: e.renderLayer,
2013
+ selectionMode: e.selectionMode,
2014
+ ...e.appearance ? { appearance: e.appearance } : {},
2015
+ ...e.semantic ? { semantic: e.semantic } : {}
2016
+ };
2017
+ }
2018
+ function Qn(e, t) {
2019
+ return {
2020
+ nodeId: e.nodeId,
2021
+ label: e.label,
2022
+ localTransform: e.localTransform,
2023
+ ...e.origin ? { origin: e.origin } : {},
2024
+ nodeType: "placeholder",
2025
+ placeholderVersion: e.placeholderVersion,
2026
+ size: e.size,
2027
+ role: e.role,
2028
+ visible: e.visible,
2029
+ ...e.assetRevisionId ? {
2030
+ assetSourceRevisionId: Ne(
2031
+ t,
2032
+ "usd",
2033
+ e.assetRevisionId,
2034
+ e.nodeId
2035
+ )
2036
+ } : {},
2037
+ ...e.externalRef ? { externalRef: e.externalRef } : {},
2038
+ ...e.semantic ? { semantic: e.semantic } : {}
2039
+ };
2040
+ }
2041
+ function es(e) {
2042
+ const t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
2043
+ for (const o of e.entries) {
2044
+ const s = o.interpretation.runtimeRevision;
2045
+ "revisionId" in s ? t.set(s.revisionId, o.source.sourceRevisionId) : n.set(s.visualRevisionId, o.source.sourceRevisionId);
2046
+ }
2047
+ return { usd: t, visual: n };
2048
+ }
2049
+ function Ne(e, t, n, o) {
2050
+ const s = e[t].get(n);
2051
+ if (!s)
2052
+ throw new Error(
2053
+ `Scene node ${o} references a ${t} runtime revision missing from AssetCatalog: ${n}.`
2054
+ );
2055
+ return s;
2056
+ }
2057
+ function ts(e) {
2058
+ return {
2059
+ nodeId: e.nodeId,
2060
+ label: e.label,
2061
+ localTransform: e.localTransform,
2062
+ ...e.origin ? { origin: e.origin } : {},
2063
+ nodeType: "domain",
2064
+ domainId: e.domainId,
2065
+ dataVersion: e.dataVersion,
2066
+ payload: e.payload,
2067
+ visible: e.visible,
2068
+ selectable: e.selectable,
2069
+ ...e.bounds ? { bounds: e.bounds } : {},
2070
+ ...e.semantic ? { semantic: e.semantic } : {}
2071
+ };
2072
+ }
2073
+ function St(e, t) {
2074
+ return {
2075
+ nodeId: e.nodeId,
2076
+ label: e.label,
2077
+ localTransform: e.localTransform,
2078
+ ...e.origin ? { origin: e.origin } : {},
2079
+ nodeType: "group",
2080
+ children: e.children.map((n) => ns(n, t))
2081
+ };
2082
+ }
2083
+ function ns(e, t) {
2084
+ if (e.nodeType === "group") return St(e, t);
2085
+ if (e.nodeType === "asset") {
2086
+ const n = Ee(t, e.assetSourceRevisionId, "usd").interpretation.runtimeRevision;
2087
+ return {
2088
+ nodeId: e.nodeId,
2089
+ label: e.label,
2090
+ localTransform: e.localTransform,
2091
+ ...e.origin ? { origin: e.origin } : {},
2092
+ nodeType: "asset",
2093
+ assetRevisionId: "revisionId" in n ? n.revisionId : "",
2094
+ role: e.role,
2095
+ visible: e.visible,
2096
+ variantSelections: e.variantSelections,
2097
+ ...e.appearance ? { appearance: e.appearance } : {},
2098
+ physics: e.physics,
2099
+ ...e.initialPose ? { initialPose: e.initialPose } : {},
2100
+ ...e.semantic ? { semantic: e.semantic } : {}
2101
+ };
2102
+ }
2103
+ if (e.nodeType === "visual") {
2104
+ const n = Ee(t, e.visualSourceRevisionId, "visual").interpretation.runtimeRevision;
2105
+ return {
2106
+ nodeId: e.nodeId,
2107
+ label: e.label,
2108
+ localTransform: e.localTransform,
2109
+ ...e.origin ? { origin: e.origin } : {},
2110
+ nodeType: "visual",
2111
+ visualRevisionId: "visualRevisionId" in n ? n.visualRevisionId : "",
2112
+ visible: e.visible,
2113
+ renderLayer: e.renderLayer,
2114
+ selectionMode: e.selectionMode,
2115
+ ...e.appearance ? { appearance: e.appearance } : {},
2116
+ ...e.semantic ? { semantic: e.semantic } : {}
2117
+ };
2118
+ }
2119
+ if (e.nodeType === "placeholder") {
2120
+ const n = e.assetSourceRevisionId ? Ee(t, e.assetSourceRevisionId, "usd").interpretation.runtimeRevision : null;
2121
+ return {
2122
+ nodeId: e.nodeId,
2123
+ label: e.label,
2124
+ localTransform: e.localTransform,
2125
+ ...e.origin ? { origin: e.origin } : {},
2126
+ nodeType: "placeholder",
2127
+ placeholderVersion: e.placeholderVersion,
2128
+ size: e.size,
2129
+ ...n && "revisionId" in n ? { assetRevisionId: n.revisionId } : {},
2130
+ ...e.externalRef ? { externalRef: e.externalRef } : {},
2131
+ role: e.role,
2132
+ visible: e.visible,
2133
+ ...e.semantic ? { semantic: e.semantic } : {}
2134
+ };
2135
+ }
2136
+ return e;
2137
+ }
2138
+ function Ee(e, t, n) {
2139
+ const o = e.get(t);
2140
+ if (!o || o.kind !== n)
2141
+ throw new Error(`Scene references missing ${n} source revision ${t}.`);
2142
+ return o;
2143
+ }
2144
+ function ye(e, t, n, o) {
2145
+ const s = e.get(t);
2146
+ if (!s || s.kind !== n)
2147
+ throw new Error(`Scene node ${o} references missing ${n} source revision ${t}.`);
2148
+ }
2149
+ const Us = "sim-studio.delivery-profile@1", Ls = "sim-studio.usd-delivery-plan@4", ks = "sim-studio.delivery-evidence@1", $s = "sim-studio.usd-export-evidence@3";
2150
+ function ss(e) {
2151
+ const t = {
2152
+ format: "sim-studio.delivery-evidence@1",
2153
+ schemaVersion: 1,
2154
+ subjectDigest: e.subjectDigest,
2155
+ profileDigest: it(e.profile),
2156
+ validator: { ...e.validator },
2157
+ axes: rs(e.axes)
2158
+ };
2159
+ return {
2160
+ ...t,
2161
+ evidenceDigest: Et(t)
2162
+ };
2163
+ }
2164
+ function os(e, t) {
2165
+ const n = it(t.profile);
2166
+ return e.format === "sim-studio.delivery-evidence@1" && e.schemaVersion === 1 && e.subjectDigest === t.subjectDigest && e.profileDigest === n && e.validator.id === t.validator.id && e.validator.version === t.validator.version && e.validator.optionsDigest === t.validator.optionsDigest && e.evidenceDigest === Et(is(e));
2167
+ }
2168
+ function Fs(e, t) {
2169
+ if (os(e, t)) return e;
2170
+ const n = {
2171
+ openUsdStructure: ae(e.axes.openUsdStructure),
2172
+ stormRender: ae(e.axes.stormRender),
2173
+ isaacProfileStatic: ae(e.axes.isaacProfileStatic),
2174
+ isaacRuntime: ae(e.axes.isaacRuntime)
2175
+ };
2176
+ return ss({
2177
+ subjectDigest: e.subjectDigest,
2178
+ profile: t.profile,
2179
+ validator: t.validator,
2180
+ axes: n
2181
+ });
2182
+ }
2183
+ function Gs(e) {
2184
+ return U(be(e));
2185
+ }
2186
+ function ae(e) {
2187
+ return { status: e.status === "not_run" || e.status === "not_applicable" ? e.status : "stale" };
2188
+ }
2189
+ function rs(e) {
2190
+ return {
2191
+ openUsdStructure: ce(e.openUsdStructure.status),
2192
+ stormRender: ce(e.stormRender.status),
2193
+ isaacProfileStatic: ce(e.isaacProfileStatic.status),
2194
+ isaacRuntime: ce(e.isaacRuntime.status)
2195
+ };
2196
+ }
2197
+ function ce(e) {
2198
+ return { status: e };
2199
+ }
2200
+ function Et(e) {
2201
+ return U(be(e));
2202
+ }
2203
+ function is(e) {
2204
+ const { evidenceDigest: t, ...n } = e;
2205
+ return n;
2206
+ }
2207
+ async function Vs(e, t, n = {}) {
2208
+ return as({
2209
+ document: e.document,
2210
+ editorial: t.editorial,
2211
+ assetCatalog: t.assetCatalog,
2212
+ resourceManifest: t.resourceManifest,
2213
+ ...t.resources ? { resources: t.resources } : {}
2214
+ }, n);
2215
+ }
2216
+ const yt = /* @__PURE__ */ new Date("1980-01-01T00:00:00.000Z"), j = {
2217
+ scene: "scene.json",
2218
+ editorial: "editorial.json",
2219
+ assetCatalog: "asset-catalog.json",
2220
+ resourceManifest: "resource-manifest.json"
2221
+ };
2222
+ class y extends Error {
2223
+ constructor(t, n) {
2224
+ super(n), this.code = t, this.name = "ScenePackageError";
2225
+ }
2226
+ }
2227
+ async function as(e, t = {}) {
2228
+ hs(e.document), At(e.assetCatalog), It(e.resourceManifest), Ct(e.assetCatalog, e.resourceManifest), at(e.editorial, e.document);
2229
+ const n = Jn(e.document, e.assetCatalog);
2230
+ pt(n, e.assetCatalog), bt(n, e.assetCatalog);
2231
+ const o = te(n), s = te(e.editorial), r = te(e.assetCatalog), c = te(e.resourceManifest), i = {
2232
+ format: mt,
2233
+ schemaVersion: 5,
2234
+ minReaderVersion: 5,
2235
+ documents: {
2236
+ scene: { path: j.scene, contentHash: U(o) },
2237
+ editorial: { path: j.editorial, contentHash: U(s) },
2238
+ assetCatalog: { path: j.assetCatalog, contentHash: U(r) },
2239
+ resourceManifest: {
2240
+ path: j.resourceManifest,
2241
+ contentHash: U(c)
2242
+ }
2243
+ },
2244
+ resourceRoot: "resources"
2245
+ }, a = te(i), l = new re();
2246
+ ee(l, j.scene, o), ee(l, j.editorial, s), ee(l, j.assetCatalog, r), ee(l, j.resourceManifest, c), ee(l, "manifest.json", a);
2247
+ const u = ps(e.resourceManifest), f = new Map((e.resources ?? []).map((d) => [d.sha256, d]));
2248
+ for (const d of u) {
2249
+ const g = f.get(d.sha256);
2250
+ if (!g)
2251
+ throw new y(
2252
+ "SCENE_PACKAGE_EMBEDDED_RESOURCE_MISSING",
2253
+ `Embedded resource data is missing: ${d.resourceId} (${d.sha256}).`
2254
+ );
2255
+ if (U(g.bytes) !== d.sha256)
2256
+ throw new y(
2257
+ "SCENE_PACKAGE_RESOURCE_HASH_MISMATCH",
2258
+ `Embedded resource hash mismatch: ${d.resourceId}.`
2259
+ );
2260
+ if (g.bytes.byteLength !== d.byteSize)
2261
+ throw new y(
2262
+ "SCENE_PACKAGE_RESOURCE_SIZE_MISMATCH",
2263
+ `Embedded resource byteSize mismatch: ${d.resourceId}.`
2264
+ );
2265
+ const p = de(d);
2266
+ l.file(p) || l.file(p, g.bytes, {
2267
+ binary: !0,
2268
+ date: yt,
2269
+ createFolders: !1
2270
+ });
2271
+ }
2272
+ const m = await l.generateAsync({
2273
+ type: "uint8array",
2274
+ compression: "DEFLATE",
2275
+ compressionOptions: { level: 6 },
2276
+ platform: "DOS"
2277
+ });
2278
+ return {
2279
+ bytes: m,
2280
+ manifest: i,
2281
+ packageDigest: U(m)
2282
+ };
2283
+ }
2284
+ async function Bs(e, t = {}) {
2285
+ const n = await re.loadAsync(e), o = n.file("manifest.json");
2286
+ if (!o)
2287
+ throw new y(
2288
+ "UNSUPPORTED_SCENE_PACKAGE_FORMAT",
2289
+ "Scene package manifest.json is missing; legacy scene archives are not supported."
2290
+ );
2291
+ const s = ne(await o.async("string"), "manifest");
2292
+ if (!B(s) || s.format !== mt)
2293
+ throw new y(
2294
+ "UNSUPPORTED_SCENE_PACKAGE_FORMAT",
2295
+ `Unsupported scene package format: ${String(B(s) ? s.format : s)}.`
2296
+ );
2297
+ cs(s);
2298
+ const r = s, c = await le(n, r.documents.scene), i = await le(n, r.documents.editorial), a = await le(n, r.documents.assetCatalog), l = await le(n, r.documents.resourceManifest), u = ne(c, "scene"), f = ne(i, "editorial"), m = ne(a, "asset catalog"), d = ne(l, "resource manifest");
2299
+ ms(u, f, m, d);
2300
+ const g = u, p = f, S = m, I = d;
2301
+ At(S), It(I), pt(g, S), Ct(S, I);
2302
+ const C = await us(n, I, t), v = bt(g, S);
2303
+ return at(p, v), {
2304
+ document: v,
2305
+ editorial: p,
2306
+ assetCatalog: S,
2307
+ resourceManifest: I,
2308
+ resources: C,
2309
+ manifest: r,
2310
+ packageDigest: U(e)
2311
+ };
2312
+ }
2313
+ function cs(e) {
2314
+ if (!B(e))
2315
+ throw new y("SCENE_PACKAGE_INVALID_MANIFEST", "Scene package manifest must be an object.");
2316
+ if (e.schemaVersion !== 5 || e.minReaderVersion !== 5)
2317
+ throw new y(
2318
+ "SCENE_PACKAGE_VERSION_UNSUPPORTED",
2319
+ `Scene package schema ${String(e.schemaVersion)} requires reader ${String(e.minReaderVersion)}.`
2320
+ );
2321
+ if (e.resourceRoot !== "resources")
2322
+ throw new y("SCENE_PACKAGE_INVALID_MANIFEST", "Scene package resourceRoot must be resources.");
2323
+ if (!B(e.documents))
2324
+ throw new y(
2325
+ "SCENE_PACKAGE_INVALID_MANIFEST",
2326
+ "Scene package documents must be an object."
2327
+ );
2328
+ const t = ["scene", "editorial", "assetCatalog", "resourceManifest"];
2329
+ if (Object.keys(e.documents).length !== t.length)
2330
+ throw new y(
2331
+ "SCENE_PACKAGE_INVALID_MANIFEST",
2332
+ "Scene package manifest must contain exactly the four fixed documents."
2333
+ );
2334
+ for (const n of t) {
2335
+ const o = e.documents[n];
2336
+ if (!B(o) || o.path !== j[n] || typeof o.contentHash != "string")
2337
+ throw new y(
2338
+ "SCENE_PACKAGE_INVALID_MANIFEST",
2339
+ `Scene package document ${n} must use the fixed path ${j[n]}.`
2340
+ );
2341
+ if (!/^[a-f0-9]{64}$/.test(o.contentHash))
2342
+ throw new y("SCENE_PACKAGE_INVALID_MANIFEST", "Document content hashes must be SHA-256.");
2343
+ }
2344
+ }
2345
+ function It(e) {
2346
+ if (!B(e) || e.format !== ht || e.schemaVersion !== 2 || !Array.isArray(e.resources))
2347
+ throw new y("SCENE_PACKAGE_INVALID_RESOURCE_MANIFEST", "Unsupported resource manifest.");
2348
+ if (e.storagePolicy !== "embedded" && e.storagePolicy !== "remote" && e.storagePolicy !== "mixed")
2349
+ throw new y(
2350
+ "SCENE_PACKAGE_INVALID_RESOURCE_MANIFEST",
2351
+ `Unsupported resource storage policy: ${String(e.storagePolicy)}.`
2352
+ );
2353
+ const t = /* @__PURE__ */ new Set();
2354
+ for (const s of e.resources) {
2355
+ if (!B(s) || typeof s.resourceId != "string" || s.resourceId.length === 0 || typeof s.sourceRevisionId != "string" || !/^[a-f0-9]{64}$/.test(s.sourceRevisionId) || !B(s.locator) || typeof s.sha256 != "string" || typeof s.mediaType != "string" || s.mediaType.length === 0 || typeof s.byteSize != "number" || !Number.isInteger(s.byteSize) || s.byteSize < 0 || s.artifactId !== void 0 && typeof s.artifactId != "string" || !B(s.storage))
2356
+ throw new y(
2357
+ "SCENE_PACKAGE_INVALID_RESOURCE_MANIFEST",
2358
+ "Resource manifest entry is invalid."
2359
+ );
2360
+ if (t.has(s.resourceId))
2361
+ throw new y("SCENE_PACKAGE_INVALID_RESOURCE_MANIFEST", `Duplicate resource ${s.resourceId}.`);
2362
+ if (t.add(s.resourceId), !/^[a-f0-9]{64}$/.test(s.sha256))
2363
+ throw new y("SCENE_PACKAGE_INVALID_RESOURCE_MANIFEST", `Invalid resource facts: ${s.resourceId}.`);
2364
+ if (ls(s.locator, s.resourceId), s.storage.kind === "embedded") {
2365
+ if (typeof s.storage.packagePath != "string" || s.storage.packagePath !== `resources/${s.sha256}`)
2366
+ throw new y(
2367
+ "SCENE_PACKAGE_INVALID_RESOURCE_MANIFEST",
2368
+ `Embedded resource path must be resources/<sha256>: ${s.resourceId}.`
2369
+ );
2370
+ } else if (s.storage.kind === "remote") {
2371
+ if (s.locator.kind !== "remote-url")
2372
+ throw new y(
2373
+ "SCENE_PACKAGE_INVALID_RESOURCE_MANIFEST",
2374
+ `Remote storage requires a remote-url locator: ${s.resourceId}.`
2375
+ );
2376
+ } else
2377
+ throw new y(
2378
+ "SCENE_PACKAGE_INVALID_RESOURCE_MANIFEST",
2379
+ `Unsupported resource storage kind: ${s.resourceId}.`
2380
+ );
2381
+ }
2382
+ if (e.resources.length === 0) return;
2383
+ const n = e.resources.some((s) => s.storage.kind === "embedded"), o = e.resources.some((s) => s.storage.kind === "remote");
2384
+ if (e.storagePolicy === "embedded" && (!n || o) || e.storagePolicy === "remote" && (n || !o) || e.storagePolicy === "mixed" && !(n && o))
2385
+ throw new y(
2386
+ "SCENE_PACKAGE_INVALID_RESOURCE_MANIFEST",
2387
+ `Resource storage policy ${e.storagePolicy} does not match its entries.`
2388
+ );
2389
+ }
2390
+ function ls(e, t) {
2391
+ if (e.kind === "package-path") {
2392
+ if (typeof e.path != "string")
2393
+ throw new y(
2394
+ "SCENE_PACKAGE_INVALID_RESOURCE_MANIFEST",
2395
+ `Package-path resource locator is invalid: ${t}.`
2396
+ );
2397
+ try {
2398
+ zt(e.path);
2399
+ return;
2400
+ } catch (n) {
2401
+ throw new y(
2402
+ "SCENE_PACKAGE_INVALID_RESOURCE_MANIFEST",
2403
+ `Invalid resource path for ${t}: ${oe(n)}`
2404
+ );
2405
+ }
2406
+ }
2407
+ if (e.kind === "remote-url" && typeof e.url == "string")
2408
+ try {
2409
+ if (Lt(e.url) !== e.url)
2410
+ throw new Error("URL is not canonical and queryless.");
2411
+ return;
2412
+ } catch (n) {
2413
+ throw new y(
2414
+ "SCENE_PACKAGE_INVALID_RESOURCE_MANIFEST",
2415
+ `Invalid remote-url locator for ${t}: ${oe(n)}`
2416
+ );
2417
+ }
2418
+ throw new y(
2419
+ "SCENE_PACKAGE_INVALID_RESOURCE_MANIFEST",
2420
+ `Invalid resource locator for ${t}.`
2421
+ );
2422
+ }
2423
+ function Ct(e, t) {
2424
+ const n = /* @__PURE__ */ new Map();
2425
+ for (const o of t.resources) {
2426
+ const s = `${o.sourceRevisionId}\0${w(o.locator)}`, r = n.get(s) ?? [];
2427
+ r.push(o), n.set(s, r);
2428
+ }
2429
+ for (const o of e.entries)
2430
+ for (const s of o.source.files) {
2431
+ const r = `${o.source.sourceRevisionId}\0${w(s.locator)}`, c = n.get(r);
2432
+ if (!c)
2433
+ throw new y(
2434
+ "SCENE_PACKAGE_RESOURCE_MANIFEST_INCOMPLETE",
2435
+ `Resource manifest does not cover ${o.source.sourceRevisionId}:${w(s.locator)}.`
2436
+ );
2437
+ if (!c.some((i) => i.sha256 === s.sha256 && i.mediaType === s.mediaType && i.byteSize === s.byteSize))
2438
+ throw new y(
2439
+ "SCENE_PACKAGE_RESOURCE_MANIFEST_MISMATCH",
2440
+ `Resource manifest facts do not match ${o.source.sourceRevisionId}:${w(s.locator)}.`
2441
+ );
2442
+ }
2443
+ }
2444
+ async function us(e, t, n) {
2445
+ const o = [];
2446
+ for (const s of t.resources) {
2447
+ const r = s.storage.kind === "embedded" ? await ds(e, s) : await fs(s, n);
2448
+ if (U(r) !== s.sha256)
2449
+ throw new y(
2450
+ "SCENE_PACKAGE_RESOURCE_HASH_MISMATCH",
2451
+ `Resource hash mismatch: ${s.resourceId}.`
2452
+ );
2453
+ if (r.byteLength !== s.byteSize)
2454
+ throw new y(
2455
+ "SCENE_PACKAGE_RESOURCE_SIZE_MISMATCH",
2456
+ `Resource byteSize mismatch: ${s.resourceId}.`
2457
+ );
2458
+ o.push({ sha256: s.sha256, mediaType: s.mediaType, bytes: r });
2459
+ }
2460
+ return o.sort((s, r) => s.sha256.localeCompare(r.sha256));
2461
+ }
2462
+ async function ds(e, t) {
2463
+ const n = e.file(de(t));
2464
+ if (!n)
2465
+ throw new y(
2466
+ "SCENE_PACKAGE_RESOURCE_MISSING",
2467
+ `Embedded resource is missing: ${t.resourceId}.`
2468
+ );
2469
+ return n.async("uint8array");
2470
+ }
2471
+ async function fs(e, t) {
2472
+ if (e.storage.kind !== "remote") throw new Error("Internal remote resource mismatch.");
2473
+ if (!t.remoteResolver)
2474
+ throw new y(
2475
+ "SCENE_PACKAGE_REMOTE_RESOLVER_MISSING",
2476
+ `Remote resolver is required for ${e.resourceId}.`
2477
+ );
2478
+ const n = await t.remoteResolver.resolve(e.locator).catch(() => null);
2479
+ if (n) {
2480
+ const o = await gs(n).catch(() => null);
2481
+ if (o && U(o) === e.sha256) return o;
2482
+ }
2483
+ throw new y(
2484
+ "SCENE_PACKAGE_RESOURCE_MISSING",
2485
+ `All remote locators failed resolution or SHA-256 validation: ${e.resourceId}.`
2486
+ );
2487
+ }
2488
+ async function le(e, t) {
2489
+ const n = e.file(t.path);
2490
+ if (!n)
2491
+ throw new y("SCENE_PACKAGE_DOCUMENT_MISSING", `Scene package document is missing: ${t.path}.`);
2492
+ const o = await n.async("string");
2493
+ if (U(o) !== t.contentHash)
2494
+ throw new y("SCENE_PACKAGE_DOCUMENT_HASH_MISMATCH", `Document hash mismatch: ${t.path}.`);
2495
+ return o;
2496
+ }
2497
+ function ms(e, t, n, o) {
2498
+ const s = [
2499
+ [e, Kn, 5],
2500
+ [t, Hn, 1],
2501
+ [n, Yn, 3],
2502
+ [o, ht, 2]
2503
+ ];
2504
+ for (const [r, c, i] of s)
2505
+ if (!B(r) || r.format !== c || r.schemaVersion !== i)
2506
+ throw new y(
2507
+ "SCENE_PACKAGE_DOCUMENT_FORMAT_UNSUPPORTED",
2508
+ `Unsupported scene package document format or version: ${String(B(r) ? r.format : r)}.`
2509
+ );
2510
+ }
2511
+ function ee(e, t, n) {
2512
+ e.file(t, n, {
2513
+ binary: !1,
2514
+ date: yt,
2515
+ createFolders: !1
2516
+ });
2517
+ }
2518
+ function te(e) {
2519
+ return `${be(e)}
2520
+ `;
2521
+ }
2522
+ function hs(e) {
2523
+ let t;
2524
+ try {
2525
+ t = Ae(e);
2526
+ } catch (n) {
2527
+ throw new y(
2528
+ "SCENE_PACKAGE_DOCUMENT_INVALID",
2529
+ `Scene document validation failed: ${oe(n)}`
2530
+ );
2531
+ }
2532
+ if (!t.ok)
2533
+ throw new y(
2534
+ "SCENE_PACKAGE_DOCUMENT_INVALID",
2535
+ t.diagnostics.map((n) => n.message).join(`
2536
+ `)
2537
+ );
2538
+ }
2539
+ function At(e) {
2540
+ try {
2541
+ Bt(e);
2542
+ } catch (t) {
2543
+ throw new y(
2544
+ "SCENE_PACKAGE_ASSET_CATALOG_INVALID",
2545
+ `Asset catalog validation failed: ${oe(t)}`
2546
+ );
2547
+ }
2548
+ }
2549
+ function bt(e, t) {
2550
+ try {
2551
+ return Zn(e, t);
2552
+ } catch (n) {
2553
+ throw new y(
2554
+ "SCENE_PACKAGE_SCENE_INVALID",
2555
+ `Scene package projection is invalid: ${oe(n)}`
2556
+ );
2557
+ }
2558
+ }
2559
+ function ne(e, t) {
2560
+ try {
2561
+ return JSON.parse(e);
2562
+ } catch (n) {
2563
+ throw new y(
2564
+ "SCENE_PACKAGE_DOCUMENT_INVALID",
2565
+ `${t} is not valid JSON: ${n instanceof Error ? n.message : String(n)}`
2566
+ );
2567
+ }
2568
+ }
2569
+ function B(e) {
2570
+ return typeof e == "object" && e !== null && !Array.isArray(e);
2571
+ }
2572
+ function oe(e) {
2573
+ return e instanceof Error ? e.message : String(e);
2574
+ }
2575
+ function ps(e) {
2576
+ return e.resources.filter((t) => t.storage.kind === "embedded").sort((t, n) => de(t).localeCompare(de(n)));
2577
+ }
2578
+ function de(e) {
2579
+ if (e.storage.kind !== "embedded") throw new Error("Resource is not embedded.");
2580
+ return e.storage.packagePath;
2581
+ }
2582
+ async function gs(e) {
2583
+ if (e instanceof Uint8Array) return e;
2584
+ if (e instanceof ArrayBuffer) return new Uint8Array(e);
2585
+ if (typeof Blob < "u" && e instanceof Blob)
2586
+ return new Uint8Array(await e.arrayBuffer());
2587
+ throw new Error("Remote resource resolver returned an unsupported value.");
2588
+ }
2589
+ export {
2590
+ Yn as ASSET_CATALOG_FORMAT,
2591
+ jo as ASSET_CATEGORIES,
2592
+ Ks as COMMAND_DIAGNOSTIC,
2593
+ Hs as CREATE_NODE_DIAGNOSTIC,
2594
+ ha as DEFAULT_NODE_ORIGIN,
2595
+ zi as DEFAULT_PLACEMENT_POLICY,
2596
+ ji as DEFAULT_SNAP,
2597
+ ks as DELIVERY_EVIDENCE_FORMAT,
2598
+ Us as DELIVERY_PROFILE_FORMAT,
2599
+ Ys as DiagnosticBag,
2600
+ Hn as EDITORIAL_STATE_FORMAT,
2601
+ Bn as EMPTY_SELECTION,
2602
+ Ko as GAUSSIAN_VISUAL_FORMATS,
2603
+ Ho as ID_PREFIX,
2604
+ Yo as INSTANCE_ROLES,
2605
+ Jo as INSTANCE_ROLE_LABELS,
2606
+ Yr as INTAKE_DIAGNOSTIC,
2607
+ Jr as ISAAC_SIM_M1_PROFILE,
2608
+ pa as NODE_ORIGIN_PRESETS,
2609
+ Kn as PACKAGE_SCENE_FORMAT,
2610
+ ht as RESOURCE_MANIFEST_FORMAT,
2611
+ Js as SCENE_DIAGNOSTIC,
2612
+ Zr as SCENE_DOCUMENT_FILE_NAME,
2613
+ Wr as SCENE_DOCUMENT_FORMAT,
2614
+ Xr as SCENE_FILE_DIAGNOSTIC,
2615
+ mt as SCENE_PACKAGE_FORMAT,
2616
+ Ds as SCENE_PACKAGE_SCHEMA_VERSION,
2617
+ Dt as SCENE_SCHEMA_VERSION,
2618
+ Mr as STUDIO_ASSET_SOURCE_ERROR,
2619
+ Zs as STUDIO_DOCUMENT_DOMAIN_API_VERSION,
2620
+ Ws as STUDIO_DOMAIN_DIAGNOSTIC,
2621
+ qr as SceneHistory,
2622
+ y as ScenePackageError,
2623
+ Xs as SimStudioError,
2624
+ Ls as USD_DELIVERY_PLAN_FORMAT,
2625
+ $s as USD_EXPORT_EVIDENCE_FORMAT,
2626
+ Yt as VISUAL_ASSET_CAPABILITIES,
2627
+ Ki as adaptiveGridStepForBounds,
2628
+ Qr as anchorReferences,
2629
+ xs as applyAiCommands,
2630
+ Os as applyAiCommandsToHost,
2631
+ Pt as applyCommand,
2632
+ Nt as applyCommandBatch,
2633
+ Fs as applyDeliveryEvidenceFreshness,
2634
+ Hi as applyDelta,
2635
+ Yi as applyRotate,
2636
+ Ji as applyScale,
2637
+ Zi as applyTranslate,
2638
+ at as assertEditorialState,
2639
+ ei as assertExplicitDependenciesCoverDerived,
2640
+ pt as assertSceneCatalogConsistency,
2641
+ xr as assertStudioAssetSourceMatchesRevision,
2642
+ ti as assertUsdDeliveryPlanV4,
2643
+ qs as assertValidSceneDoc,
2644
+ w as assetResourceLocatorKey,
2645
+ Zo as assetRevisionForNode,
2646
+ ni as assignPrimNames,
2647
+ Qs as buildAddAsset,
2648
+ _t as buildAddNode,
2649
+ eo as buildAddVisualAsset,
2650
+ to as buildCoordinateSystemUpdate,
2651
+ no as buildDomainUpdate,
2652
+ so as buildDuplicateNode,
2653
+ oo as buildEnvironmentUpdate,
2654
+ ro as buildGroupNodes,
2655
+ io as buildMetaUpdate,
2656
+ ao as buildRemoveAsset,
2657
+ co as buildRemoveNode,
2658
+ lo as buildRemoveVisualAsset,
2659
+ uo as buildRenameNode,
2660
+ fo as buildReparentNode,
2661
+ mo as buildReplaceModel,
2662
+ ho as buildSceneSemanticUpdate,
2663
+ po as buildSetAppearance,
2664
+ go as buildSetDomainNodeData,
2665
+ So as buildSetExtension,
2666
+ Eo as buildSetInitialPose,
2667
+ yo as buildSetNodeOrigin,
2668
+ Io as buildSetNodeSemantic,
2669
+ Co as buildSetPhysics,
2670
+ Ao as buildSetPlaceholderBinding,
2671
+ bo as buildSetRole,
2672
+ _o as buildSetVariants,
2673
+ vo as buildSetVisible,
2674
+ Ro as buildSetVisualAppearance,
2675
+ No as buildSetVisualRenderLayer,
2676
+ Po as buildSetVisualSelectionMode,
2677
+ To as buildTransformNode,
2678
+ wo as buildUngroupNode,
2679
+ si as buildUsdDeliveryPlan,
2680
+ Mo as calculateAssetFactsHash,
2681
+ it as calculateDeliveryProfileDigest,
2682
+ oi as calculateSceneContentHash,
2683
+ ri as calculateUsdDeliveryPlanDigest,
2684
+ ii as calculateUsdPackageDigest,
2685
+ Gs as calculateValidatorOptionsDigest,
2686
+ vt as calculateVisualAssetFactsHash,
2687
+ ai as canonicalDocumentHash,
2688
+ Or as canonicalEntryUrl,
2689
+ Lt as canonicalRemoteResourceUrl,
2690
+ Ke as cloneData,
2691
+ Wo as collectReferencedRevisionIds,
2692
+ xo as compareStrings,
2693
+ Xo as composeLocalTransforms,
2694
+ Dr as copyStudioAssetSource,
2695
+ ci as createAssetCatalog,
2696
+ li as createAssetInterpretation,
2697
+ Oo as createAssetNodeFromRevision,
2698
+ ui as createAssetRevision,
2699
+ Do as createBoundingBoxPlaceholderNode,
2700
+ Tt as createCommandRecord,
2701
+ qo as createDefaultCoordinateSystem,
2702
+ Qo as createDefaultEnvironment,
2703
+ ss as createDeliveryValidationEvidence,
2704
+ la as createEditorialState,
2705
+ er as createIdentityTransform,
2706
+ tr as createSceneAssetNode,
2707
+ nr as createSceneDocument,
2708
+ sr as createSceneDomainNode,
2709
+ or as createSceneGroupNode,
2710
+ as as createScenePackage,
2711
+ Vs as createScenePackageFromHost,
2712
+ Mt as createScenePlaceholderNode,
2713
+ Ms as createSceneReader,
2714
+ rr as createSceneVisualNode,
2715
+ As as createSeededPlaceholderBatch,
2716
+ Rt as createUlid,
2717
+ di as createUsdExportEvidence,
2718
+ Jt as createVisualAssetRevision,
2719
+ Uo as createVisualNodeFromRevision,
2720
+ ir as deepEqualData,
2721
+ je as deepFreeze,
2722
+ Lo as defaultPhysicsForAsset,
2723
+ ar as defaultRoleForCategory,
2724
+ fi as deriveSourceDependencies,
2725
+ mi as detectLayout,
2726
+ bs as diffAssetRevisions,
2727
+ ua as editorialNodeState,
2728
+ da as editorialStateToHost,
2729
+ Wi as effectiveGridStep,
2730
+ Xi as evaluatePlacement,
2731
+ hi as extensionOf,
2732
+ pi as extractReferences,
2733
+ cr as findAssetRevision,
2734
+ lr as findAssetRevisionByAssetId,
2735
+ gi as findCatalogEntryByRuntimeRevision,
2736
+ ur as findSceneAssetNode,
2737
+ dr as findSceneDomainNode,
2738
+ fr as findSceneNode,
2739
+ mr as findSceneNodeLocation,
2740
+ hr as findScenePlaceholderNode,
2741
+ pr as findSceneVisualNode,
2742
+ gr as findVisualAssetRevision,
2743
+ Sr as findVisualAssetRevisionByAssetId,
2744
+ qi as footprintOverlaps,
2745
+ ga as getStudioAssetDimensions,
2746
+ Sa as getStudioNodeFrame,
2747
+ Ea as getStudioPhysicsFacts,
2748
+ ya as getStudioSelectionFrame,
2749
+ Er as insertSceneNode,
2750
+ Ns as inspectPublicUsd,
2751
+ ot as instanceIdFromName,
2752
+ Si as intakePackage,
2753
+ vs as intakeVisualFiles,
2754
+ Ei as invertCommand,
2755
+ os as isDeliveryEvidenceCurrent,
2756
+ Qi as isSupportSurfaceNormal,
2757
+ yi as isTextualLayer,
2758
+ Ie as isTextualLayerBytes,
2759
+ Ii as isUsdPath,
2760
+ xt as listSceneAssetNodes,
2761
+ yr as listSceneDomainNodes,
2762
+ Ir as listScenePlaceholderNodes,
2763
+ Cr as listSceneVisualNodes,
2764
+ Ar as localTransformFromWorld,
2765
+ Ci as makeRepair,
2766
+ ea as multiplyQuaternions,
2767
+ ko as nextCopyLabel,
2768
+ Ia as nodeOriginPivot,
2769
+ Ca as nodeOriginPresetLocal,
2770
+ $o as normalizeDocumentDomains,
2771
+ fa as normalizeEditorialCamera,
2772
+ zt as normalizePackagePath,
2773
+ Ur as normalizePackageResourcePath,
2774
+ Ce as normalizePath,
2775
+ ta as normalizePlacementPolicy,
2776
+ na as normalizeQuaternion,
2777
+ Lr as normalizeRemoteSource,
2778
+ ue as normalizeResourceLocator,
2779
+ Ai as normalizeSceneDocument,
2780
+ kr as normalizeScopes,
2781
+ bi as normalizeSourceBundle,
2782
+ $r as packagePathFromLocator,
2783
+ br as parentWorldTransformForNode,
2784
+ _i as parseSceneDocument,
2785
+ Fr as pathMatchesPrefix,
2786
+ Ps as pickInstance,
2787
+ sa as placeAtPoint,
2788
+ oa as placementVolumesOverlap,
2789
+ ft as prepareAiCommands,
2790
+ Gr as prepareStudioAssetSource,
2791
+ Jn as projectSceneDocument,
2792
+ ws as pruneSelection,
2793
+ vi as readManifestText,
2794
+ Ri as readSceneDocument,
2795
+ Bs as readScenePackage,
2796
+ Fo as referencedRevisionIds,
2797
+ Vr as remoteUrlFromLocator,
2798
+ Ni as removeReference,
2799
+ _r as removeSceneNode,
2800
+ Pi as replaceReferenceTarget,
2801
+ Ti as requiresUsdCompilation,
2802
+ wi as resolveExportVariantSelection,
2803
+ Mi as resolveFrom,
2804
+ Aa as resolveNodeOriginLocal,
2805
+ Zn as restoreSceneDocument,
2806
+ He as revisionEntryResource,
2807
+ xi as revisionResourceByLocator,
2808
+ Oi as revisionResourceLocatorKeys,
2809
+ Go as roundDecimals,
2810
+ Rs as runModelInspection,
2811
+ Di as sanitizeIdentifier,
2812
+ $t as scanDependencies,
2813
+ ra as seatOnFloor,
2814
+ Ts as selectAt,
2815
+ Ui as serializeSceneDocument,
2816
+ jt as simStudioVersion,
2817
+ Li as slugFromRoot,
2818
+ ia as snapValue,
2819
+ ki as sortRepairs,
2820
+ Vo as sortStable,
2821
+ Br as sourceBundleFromLocalSource,
2822
+ zr as sourceRevisionIdOf,
2823
+ vr as stableStringify,
2824
+ $i as stripExternalReferences,
2825
+ jr as studioAssetSourceFingerprint,
2826
+ Fi as toSlug,
2827
+ aa as unionBounds,
2828
+ Rr as updateSceneAssetNode,
2829
+ Nr as updateSceneNode,
2830
+ Gi as validateDeliveryProfile,
2831
+ Bo as validateDocumentDomains,
2832
+ Ae as validateSceneDoc,
2833
+ Kr as verifyStudioAssetSourceFacts,
2834
+ _s as visualRevisionEntryResource,
2835
+ Pr as visualRevisionForNode,
2836
+ Ot as walkSceneNodes,
2837
+ Tr as worldTransformForNode,
2838
+ Vi as writeSceneDocument
2839
+ };