@volter/cyclotron 0.5.211 → 0.5.213

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 (888) hide show
  1. package/BUNDLED_NOTICES +232 -1964
  2. package/LICENSE +2 -3
  3. package/LICENSE-BLENDER +9 -8
  4. package/NOTICE +8 -3
  5. package/README.md +39 -30
  6. package/dist/.vite/manifest.json +1215 -4338
  7. package/dist/assets/AudioViewer-B5pkIGXS.js +1 -0
  8. package/dist/assets/ImageViewer-BPVLEEQ2.js +1 -0
  9. package/dist/assets/JsonAssetDocument-DuVW9del.js +2 -0
  10. package/dist/assets/ProjectAuthoringBootstrap-CZJz4Svb.js +2 -0
  11. package/dist/assets/SourceAssetViewer-LwHBW53R.js +1 -0
  12. package/dist/assets/VideoViewer-Bfjjp4zH.js +1 -0
  13. package/dist/assets/client-BLXKEWrR.js +25 -0
  14. package/dist/assets/index-BKjLHm6K.js +483 -0
  15. package/dist/assets/index-CJcVFJ-l.css +1 -0
  16. package/dist/assets/product-CaIfLQVS.js +1 -0
  17. package/dist/assets/story-capture-C3xmgE62.js +1 -0
  18. package/dist/assets/volter-sdk-DT0xmh2J.js +1407 -0
  19. package/dist/assets/volter-sdk-activation-events-B-WERmWU.js +1 -0
  20. package/dist/assets/volter-sdk-active-project-DvEsy8Q6.js +1 -0
  21. package/dist/assets/volter-sdk-adapter-editor-config-CQ5V6W-o.js +1 -0
  22. package/dist/assets/volter-sdk-animation-animation-clock-Cy7j_2qF.js +1 -0
  23. package/dist/assets/volter-sdk-animation-stage-transport-DoUDq6Gb.js +1 -0
  24. package/dist/assets/volter-sdk-api-base-Dr1bx5e0.js +1 -0
  25. package/dist/assets/volter-sdk-api-project-open-D4nPvIPU.js +1 -0
  26. package/dist/assets/volter-sdk-api-project-source-DoO7WBwQ.js +1 -0
  27. package/dist/assets/volter-sdk-api-settings-BEHgO5wf.js +1 -0
  28. package/dist/assets/volter-sdk-asset-capabilities-CGkNwaAe.js +1 -0
  29. package/dist/assets/volter-sdk-asset-document-write-policy-CzWM1HhK.js +1 -0
  30. package/dist/assets/volter-sdk-asset-editor-context-BkSK1vL1.js +1 -0
  31. package/dist/assets/volter-sdk-asset-thumbnails-zSmJgI_x.js +1 -0
  32. package/dist/assets/volter-sdk-asset-viewers-B-ICvlkR.js +1 -0
  33. package/dist/assets/volter-sdk-asset-workflow-project-content-C6Ow0R-F.js +1 -0
  34. package/dist/assets/volter-sdk-authoring-active-adapter-CKuWwxgH.js +1 -0
  35. package/dist/assets/volter-sdk-authoring-boundary-authoring-adapter-DTwFKBkS.js +1 -0
  36. package/dist/assets/volter-sdk-authoring-composite-authoring-adapter-iRSbSHpV.js +1 -0
  37. package/dist/assets/volter-sdk-authoring-consumer-actions-DK9-B-wg.js +1 -0
  38. package/dist/assets/volter-sdk-authoring-design-time-mount-registry-BQnWcBVe.js +1 -0
  39. package/dist/assets/volter-sdk-authoring-design-time-roots-BKSmkD7_.js +1 -0
  40. package/dist/assets/volter-sdk-authoring-layered-pick-C-YvuxEG.js +1 -0
  41. package/dist/assets/volter-sdk-authoring-no-authoring-adapter-Cv9DD6G0.js +1 -0
  42. package/dist/assets/volter-sdk-authoring-panel-authoring-BLOrFs8L.js +1 -0
  43. package/dist/assets/volter-sdk-authoring-react-design-canvas-style-Dr9i31o5.js +1 -0
  44. package/dist/assets/volter-sdk-authoring-react-story-board-BlCQQM-8.js +1 -0
  45. package/dist/assets/volter-sdk-authoring-seam-evidence-CjetY_ZG.js +1 -0
  46. package/dist/assets/volter-sdk-authoring-selection-scope-BxmbC71H.js +1 -0
  47. package/dist/assets/volter-sdk-authoring-shell-document-ops-DDb8oGx9.js +1 -0
  48. package/dist/assets/volter-sdk-authoring-stage-root-B50LLhnJ.js +1 -0
  49. package/dist/assets/volter-sdk-authoring-story-board-chrome-fit-BVV9fbcw.js +1 -0
  50. package/dist/assets/volter-sdk-authoring-viewport-tool-context-cQafPSkT.js +1 -0
  51. package/dist/assets/volter-sdk-authoring-viewport-tool-owner-BppqL4f_.js +1 -0
  52. package/dist/assets/volter-sdk-authoring-world-session-state-BlpdiKod.js +1 -0
  53. package/dist/assets/volter-sdk-bitmap-label-BbtGPWgP.js +1 -0
  54. package/dist/assets/volter-sdk-breakpoint-state-DCFuSvgm.js +1 -0
  55. package/dist/assets/volter-sdk-bytes-codec-CrNeVT4e.js +1 -0
  56. package/dist/assets/volter-sdk-cancellation-reason-ByOH3mlF.js +1 -0
  57. package/dist/assets/volter-sdk-canvas-frames-BU8Rqr4J.js +1 -0
  58. package/dist/assets/volter-sdk-capture-size-D4cNT2XC.js +1 -0
  59. package/dist/assets/volter-sdk-chrome-registry-qHUiDauw.js +1 -0
  60. package/dist/assets/volter-sdk-command-result-text-2wzEhQ5t.js +1 -0
  61. package/dist/assets/volter-sdk-commands-C4RgHEOa.js +1 -0
  62. package/dist/assets/volter-sdk-component-board-registry-6gFZBkTP.js +1 -0
  63. package/dist/assets/volter-sdk-components-AssetEditorShell-CQVLedvW.js +1 -0
  64. package/dist/assets/volter-sdk-components-InspectorCanvasPreview-CN5ROhNT.js +1 -0
  65. package/dist/assets/volter-sdk-components-SurfaceStateOverlay-Cc9Ov1Ol.js +1 -0
  66. package/dist/assets/volter-sdk-components-Toolbar-ZoV9Yq_A.js +1 -0
  67. package/dist/assets/volter-sdk-components-TransientHint-BML2V3uu.js +1 -0
  68. package/dist/assets/volter-sdk-components-inspector-preview-section-BhDjhUyz.js +1 -0
  69. package/dist/assets/volter-sdk-components-use-after-paint-BVSO4qjV.js +1 -0
  70. package/dist/assets/volter-sdk-components-workspace-history-CThvGfsY.js +1 -0
  71. package/dist/assets/volter-sdk-content-entry-source-registry-CJLVq3tC.js +1 -0
  72. package/dist/assets/volter-sdk-contribution-surfaces-CeEDmriM.js +1 -0
  73. package/dist/assets/volter-sdk-contributions-x6j41XZp.js +1 -0
  74. package/dist/assets/volter-sdk-coverage-design-time-surfaces-D-tNGazo.js +1 -0
  75. package/dist/assets/volter-sdk-creation-site-registry-64gyrZPD.js +1 -0
  76. package/dist/assets/volter-sdk-css-numeric-style-CXeWqAoG.js +1 -0
  77. package/dist/assets/volter-sdk-declared-tools-BAzHxyUW.js +1 -0
  78. package/dist/assets/volter-sdk-document-areas-4DXjy0el.js +1 -0
  79. package/dist/assets/volter-sdk-document-layer-B4VYMPZ9.js +1 -0
  80. package/dist/assets/volter-sdk-document-open-registry-BLDMaEoN.js +1 -0
  81. package/dist/assets/volter-sdk-document-play-extension-Dv3fyS6K.js +1 -0
  82. package/dist/assets/volter-sdk-document-probe-drBhAyza.js +1 -0
  83. package/dist/assets/volter-sdk-document-stage-sessions-CtI9anAf.js +1 -0
  84. package/dist/assets/volter-sdk-document-viewports-BO0N7VyN.js +1 -0
  85. package/dist/assets/volter-sdk-editor-commands-BJ9Otxzu.js +1 -0
  86. package/dist/assets/volter-sdk-editor-console-BaGgfWmH.js +1 -0
  87. package/dist/assets/volter-sdk-editor-document-probe-D0ZhaXHx.js +1 -0
  88. package/dist/assets/volter-sdk-editor-mode-B07FDozS.js +1 -0
  89. package/dist/assets/volter-sdk-editor-runtime-D00Du7hG.js +1 -0
  90. package/dist/assets/volter-sdk-editor-server-response-C6kOPAsW.js +1 -0
  91. package/dist/assets/volter-sdk-editor-session-attribution-CggpIFb4.js +1 -0
  92. package/dist/assets/volter-sdk-editor-view-DEMsxlaT.js +1 -0
  93. package/dist/assets/volter-sdk-environment-images-OQtFG1kA.js +1 -0
  94. package/dist/assets/volter-sdk-extension-script-DanTHcyo.js +1 -0
  95. package/dist/assets/volter-sdk-eyedropper-session-BfVXtjzc.js +1 -0
  96. package/dist/assets/volter-sdk-files-file-provider-CXL6oCMd.js +1 -0
  97. package/dist/assets/volter-sdk-files-project-files-SBAE37py.js +1 -0
  98. package/dist/assets/volter-sdk-framed-document-capture-7TnE8pn1.js +1 -0
  99. package/dist/assets/volter-sdk-framed-document-driver-C0K3-SRt.js +1 -0
  100. package/dist/assets/volter-sdk-hierarchy-component-marks-BmJEMvvO.js +1 -0
  101. package/dist/assets/volter-sdk-hierarchy-kind-icon-CrwdpecY.js +1 -0
  102. package/dist/assets/volter-sdk-hierarchy-node-rows-FcK7_ULi.js +1 -0
  103. package/dist/assets/volter-sdk-hierarchy-projection-CKzUOZUa.js +1 -0
  104. package/dist/assets/volter-sdk-hierarchy-row-media-Czg40Ddi.js +1 -0
  105. package/dist/assets/volter-sdk-hierarchy-row-model-BGzmcywF.js +1 -0
  106. package/dist/assets/volter-sdk-hierarchy-rows-VAI0psTR.js +1 -0
  107. package/dist/assets/volter-sdk-hierarchy-walk-CaVqG7v2.js +1 -0
  108. package/dist/assets/volter-sdk-history-history-delegate-DH_xBvdh.js +1 -0
  109. package/dist/assets/volter-sdk-history-history-service-D0n0Gl5Z.js +1 -0
  110. package/dist/assets/volter-sdk-history-persistence-coordinator-CcywAFdm.js +1 -0
  111. package/dist/assets/volter-sdk-history-resource-registry-DMTlnwGv.js +1 -0
  112. package/dist/assets/volter-sdk-history-snapshot-store-BVh1DtBp.js +1 -0
  113. package/dist/assets/volter-sdk-history-source-history-backend-ulJ-65tX.js +1 -0
  114. package/dist/assets/volter-sdk-hmr-registration-group-DvMQVKyO.js +1 -0
  115. package/dist/assets/volter-sdk-hmr-stable-react-context-BMVr5YVk.js +1 -0
  116. package/dist/assets/volter-sdk-host-D765Py2w.js +1 -0
  117. package/dist/assets/volter-sdk-hotkeys-TesTKdAZ.js +1 -0
  118. package/dist/assets/volter-sdk-index-BABXozHr.js +1 -0
  119. package/dist/assets/volter-sdk-inference-diagnostics-CsDbQ0M5.js +1 -0
  120. package/dist/assets/volter-sdk-inspection-document-subject-BMRD77Va.js +1 -0
  121. package/dist/assets/volter-sdk-inspection-group-icons-Wpz-YhkE.js +1 -0
  122. package/dist/assets/volter-sdk-inspection-model-BVOyStdc.js +1 -0
  123. package/dist/assets/volter-sdk-inspection-node-media-B8AL8_3F.js +1 -0
  124. package/dist/assets/volter-sdk-inspection-null-subject-d5bQZCbS.js +1 -0
  125. package/dist/assets/volter-sdk-inspector-property-grouping-BqrZkwo4.js +1 -0
  126. package/dist/assets/volter-sdk-inspector-section-registry-C6U15zvC.js +1 -0
  127. package/dist/assets/volter-sdk-js-heap-CcOnY0kf.js +1 -0
  128. package/dist/assets/volter-sdk-keymap-presets-CSM-jVcZ.js +1 -0
  129. package/dist/assets/volter-sdk-layout-arrangements-DHA3uifx.js +1 -0
  130. package/dist/assets/volter-sdk-layouts-4v9ECCn9.js +1 -0
  131. package/dist/assets/volter-sdk-light-explorer-model-CPuZjpiR.js +1 -0
  132. package/dist/assets/volter-sdk-live-seam-evidence-B_RyDaOp.js +1 -0
  133. package/dist/assets/volter-sdk-live-session-registry-C6gHroaH.js +1 -0
  134. package/dist/assets/volter-sdk-manifest-project-CVVUDDuL.js +1 -0
  135. package/dist/assets/volter-sdk-mount-css-scope-DaJoEo3v.js +1 -0
  136. package/dist/assets/volter-sdk-mount-failure-report-Cm92oiGJ.js +1 -0
  137. package/dist/assets/volter-sdk-native-selection-style-Bp4IBnA4.js +1 -0
  138. package/dist/assets/volter-sdk-photograph-notice-C6_gZGpW.js +1 -0
  139. package/dist/assets/volter-sdk-play-camera-flight-SwlYhOxW.js +1 -0
  140. package/dist/assets/volter-sdk-product-command-G8kKVJ-i.js +1 -0
  141. package/dist/assets/volter-sdk-progress-4GGmPvZn.js +1 -0
  142. package/dist/assets/volter-sdk-project-module-changes-DIrDIHeD.js +1 -0
  143. package/dist/assets/volter-sdk-project-module-url-BuAUWpus.js +1 -0
  144. package/dist/assets/volter-sdk-project-output-roots-BON7FOwQ.js +1 -0
  145. package/dist/assets/volter-sdk-project-tab-census-CO06UOh-.js +1 -0
  146. package/dist/assets/volter-sdk-renderer-resource-counts-2kLiD8_S.js +1 -0
  147. package/dist/assets/volter-sdk-scoped-project-css-DA63CYkM.js +1 -0
  148. package/dist/assets/volter-sdk-selection-CSUq7EiY.js +1 -0
  149. package/dist/assets/volter-sdk-served-url-B_MypeId.js +1 -0
  150. package/dist/assets/volter-sdk-settings-settings-provider-CJuWxTB5.js +1 -0
  151. package/dist/assets/volter-sdk-settings-store-CEFKDj0h.js +1 -0
  152. package/dist/assets/volter-sdk-shell-store-Cl4sX9p4.js +1 -0
  153. package/dist/assets/volter-sdk-shell-store-door-DGjybg0J.js +1 -0
  154. package/dist/assets/volter-sdk-source-conflict-CV8Gk053.js +1 -0
  155. package/dist/assets/volter-sdk-stage-context-Cb0SaYhi.js +1 -0
  156. package/dist/assets/volter-sdk-stage-invalidation-VlBciYA0.js +1 -0
  157. package/dist/assets/volter-sdk-stage-store-registry-BpIy_QKq.js +1 -0
  158. package/dist/assets/volter-sdk-startup-failure-C_8H4xuP.js +1 -0
  159. package/dist/assets/volter-sdk-stories-StoryPreviewMount-BUX42gIR.js +1 -0
  160. package/dist/assets/volter-sdk-stories-compose-project-stories-CkSd4Si5.js +1 -0
  161. package/dist/assets/volter-sdk-stories-scope-Dndn7MD8.js +1 -0
  162. package/dist/assets/volter-sdk-stories-story-declared-medium-Byi4XWeJ.js +1 -0
  163. package/dist/assets/volter-sdk-stories-story-dom-runtime-BS1VPvJ6.js +1 -0
  164. package/dist/assets/volter-sdk-stories-story-grouping-CpNh4cUf.js +1 -0
  165. package/dist/assets/volter-sdk-story-document-openers-Ba5jQqay.js +1 -0
  166. package/dist/assets/volter-sdk-surface-state-BhQ45ars.js +1 -0
  167. package/dist/assets/volter-sdk-tab-census-D0r0s37y.js +1 -0
  168. package/dist/assets/volter-sdk-tool-contribution-convention-JCXL6f2w.js +1 -0
  169. package/dist/assets/volter-sdk-transform-mode-request-Cwk_Kyty.js +1 -0
  170. package/dist/assets/volter-sdk-transient-hint-BOfFzAV8.js +1 -0
  171. package/dist/assets/volter-sdk-types-CkT8l5N_.js +1 -0
  172. package/dist/assets/volter-sdk-ui-source-file-region-resolver-Cfza3eEl.js +1 -0
  173. package/dist/assets/volter-sdk-ui-source-inspect-CEjmAN75.js +1 -0
  174. package/dist/assets/volter-sdk-ui-source-source-write-backend-0njgRdI6.js +1 -0
  175. package/dist/assets/volter-sdk-ui-source-tier-source-write-backend-CpsxorYU.js +1 -0
  176. package/dist/assets/volter-sdk-viewport-activation-timings-B3hRTu3A.js +1 -0
  177. package/dist/assets/volter-sdk-viewport-editor-controls-DDBd-VqO.js +1 -0
  178. package/dist/assets/volter-sdk-viewport-presentation-DRhiAH1h.js +1 -0
  179. package/dist/assets/volter-sdk-volter-contributions-nlGXjgJZ.js +1 -0
  180. package/dist/assets/volter-sdk-wait-until-CMvYQmO8.js +1 -0
  181. package/dist/assets/volter-sdk-widgets-design-system-BJOyO8sO.js +1 -0
  182. package/dist/assets/volter-sdk-widgets-editor-appearance-eVtkxsIm.js +1 -0
  183. package/dist/assets/volter-sdk-widgets-editor-material-BoQP_5SK.js +1 -0
  184. package/dist/assets/volter-sdk-widgets-icon-set-registry-CP0D74kc.js +1 -0
  185. package/dist/assets/volter-sdk-widgets-index-De34FpYu.js +1 -0
  186. package/dist/assets/volter-sdk-widgets-inspector-widgets-AlignmentGrid-_GjMjIGb.js +1 -0
  187. package/dist/assets/volter-sdk-widgets-inspector-widgets-AssetSlotPicker-B7vN7BEd.js +1 -0
  188. package/dist/assets/volter-sdk-widgets-inspector-widgets-BorderEditor-E2J8cpyT.js +1 -0
  189. package/dist/assets/volter-sdk-widgets-inspector-widgets-ColorPicker-D6TERGKs.js +1 -0
  190. package/dist/assets/volter-sdk-widgets-inspector-widgets-CurveEditor-CXR8n-CA.js +1 -0
  191. package/dist/assets/volter-sdk-widgets-inspector-widgets-FilterEditor-CDvfWY4Q.js +1 -0
  192. package/dist/assets/volter-sdk-widgets-inspector-widgets-FontPicker-BgpW8FW8.js +1 -0
  193. package/dist/assets/volter-sdk-widgets-inspector-widgets-GradientEditor-DOOBkXjY.js +1 -0
  194. package/dist/assets/volter-sdk-widgets-inspector-widgets-ScrubbableInput-1NXWR_gB.js +1 -0
  195. package/dist/assets/volter-sdk-widgets-inspector-widgets-ShadowEditor-Cd2-HwFn.js +1 -0
  196. package/dist/assets/volter-sdk-widgets-inspector-widgets-color-utils-C4HuSjFu.js +1 -0
  197. package/dist/assets/volter-sdk-widgets-inspector-widgets-curve-utils-DUU2CCtc.js +1 -0
  198. package/dist/assets/volter-sdk-widgets-inspector-widgets-index-D5kwrOUQ.js +1 -0
  199. package/dist/assets/volter-sdk-widgets-inspector-widgets-shared-CkFN2SUn.js +1 -0
  200. package/dist/assets/volter-sdk-widgets-interactive-edit-scope-DynpKMMZ.js +1 -0
  201. package/dist/assets/volter-sdk-widgets-palette-colors-DhL1I42R.js +1 -0
  202. package/dist/assets/volter-sdk-widgets-patterns-Dialog-EUtcZi0Y.js +1 -0
  203. package/dist/assets/volter-sdk-widgets-patterns-Fields-Bl_eaBej.js +1 -0
  204. package/dist/assets/volter-sdk-widgets-patterns-List--NE_1N5-.js +1 -0
  205. package/dist/assets/volter-sdk-widgets-patterns-StateSurface-BHXpv7qi.js +1 -0
  206. package/dist/assets/volter-sdk-widgets-patterns-Surfaces-BdKa5HGV.js +1 -0
  207. package/dist/assets/volter-sdk-widgets-patterns-Tabs-sFV7f1UP.js +1 -0
  208. package/dist/assets/volter-sdk-widgets-patterns-Toolbar-CIr5Cs49.js +1 -0
  209. package/dist/assets/volter-sdk-widgets-patterns-Tree-C2YHfddf.js +1 -0
  210. package/dist/assets/volter-sdk-widgets-primitives-AnchoredMenu-DCclspnW.js +1 -0
  211. package/dist/assets/volter-sdk-widgets-primitives-Button-B0YxR4ea.js +1 -0
  212. package/dist/assets/volter-sdk-widgets-primitives-ColorInput-B1_SLTuc.js +1 -0
  213. package/dist/assets/volter-sdk-widgets-primitives-DraftTextInput-CpHzPdt8.js +1 -0
  214. package/dist/assets/volter-sdk-widgets-primitives-EditorIcon-Dw4knhya.js +1 -0
  215. package/dist/assets/volter-sdk-widgets-primitives-FormControls-BAbRanmE.js +1 -0
  216. package/dist/assets/volter-sdk-widgets-primitives-HoverPreview-Cj7jKNd4.js +1 -0
  217. package/dist/assets/volter-sdk-widgets-primitives-JsonInput-C0DCI5bE.js +1 -0
  218. package/dist/assets/volter-sdk-widgets-primitives-Layout-gT4Z6mtt.js +1 -0
  219. package/dist/assets/volter-sdk-widgets-primitives-Menu-9EESAp9m.js +1 -0
  220. package/dist/assets/volter-sdk-widgets-primitives-NumberInput-Dk-5zqJ8.js +1 -0
  221. package/dist/assets/volter-sdk-widgets-primitives-Panel-BQWJF-Pb.js +1 -0
  222. package/dist/assets/volter-sdk-widgets-primitives-SectionHeader-DXvmafCK.js +1 -0
  223. package/dist/assets/volter-sdk-widgets-primitives-Text-yBrdWK2w.js +1 -0
  224. package/dist/assets/volter-sdk-widgets-primitives-ThemeRootPortal-CRhefpUL.js +1 -0
  225. package/dist/assets/volter-sdk-widgets-primitives-Tooltip-D5Kcb-ZC.js +1 -0
  226. package/dist/assets/volter-sdk-widgets-primitives-Vec3Input-DiG6PEIe.js +1 -0
  227. package/dist/assets/volter-sdk-widgets-primitives-clamp-to-viewport-DhnSxXVK.js +1 -0
  228. package/dist/assets/volter-sdk-widgets-primitives-editor-icons-e65mgyAk.js +1 -0
  229. package/dist/assets/volter-sdk-widgets-primitives-panel-header-styles-BVL0mN8g.js +1 -0
  230. package/dist/assets/volter-sdk-widgets-theme-C-_RU9Ov.js +1 -0
  231. package/dist/assets/volter-sdk-widgets-z-index-CrJJXeKL.js +1 -0
  232. package/dist/assets/volter-sdk-worker-call-metrics-BTfmngck.js +1 -0
  233. package/dist/assets/volter-sdk-workspace-core-utilities-DtHGK9PF.js +1 -0
  234. package/dist/assets/volter-sdk-workspace-document-ids-COULA7c6.js +1 -0
  235. package/dist/assets/volter-sdk-workspace-document-registry-6m5csVP7.js +1 -0
  236. package/dist/assets/volter-sdk-workspace-document-restore-M8ifJMou.js +1 -0
  237. package/dist/assets/volter-sdk-workspace-host-commands-8Qzej--P.js +1 -0
  238. package/dist/assets/volter-sdk-workspace-static-panels-Ckk7qUuS.js +1 -0
  239. package/dist/assets/volter-sdk-workspace-status-registry-BdU0dZAt.js +1 -0
  240. package/dist/assets/volter-sdk-workspace-utility-registry-BHxymD2l.js +1 -0
  241. package/dist/assets/volter-sdk-world-canvas-viewport-state-CHO8s9gE.js +1 -0
  242. package/dist/assets/volter-sdk-world-pan-state-C-9xgzAh.js +1 -0
  243. package/dist/assets/volter-sdk-write-pipe-CJHg7J4i.js +1 -0
  244. package/dist/assets/volter-shared-fontawesome-BEv9WEZj.js +1 -0
  245. package/dist/assets/volter-shared-jsx-dev-runtime-domcKDU3.js +1 -0
  246. package/dist/assets/volter-shared-jsx-runtime-Cu7pVW-1.js +1 -0
  247. package/dist/assets/volter-shared-react-BLHga76C.js +1 -0
  248. package/dist/assets/volter-shared-react-dom-client-vi6WsWu2.js +1 -0
  249. package/dist/assets/volter-shared-react-dom-kzJVGsQd.js +1 -0
  250. package/dist/assets/volter-shared-three-BWbOWtM5.js +4220 -0
  251. package/dist/assets/volter-shared-three-core-DEsIwtOu.js +9 -0
  252. package/dist/volter-shared-modules.json +227 -0
  253. package/dist/volter-shared-react.json +6 -6
  254. package/dist/volter-shared-three.json +2 -1
  255. package/dist-node/cli.js +2962 -6245
  256. package/dist-node/create.js +350 -278
  257. package/package.json +51 -31
  258. package/src/index.ts +4 -6
  259. package/src/product-id.d.ts +4 -0
  260. package/src/styles/maya.style.ts +14 -0
  261. package/src/styles/substance.style.ts +15 -0
  262. package/starter/AGENTS.md +216 -156
  263. package/starter/cube.py +3 -9
  264. package/starter/film/boards/title.png +0 -0
  265. package/starter/film/cut.json +12 -0
  266. package/starter/film/film.json +7 -0
  267. package/starter/film/music/.gitkeep +0 -0
  268. package/starter/film/music.json +4 -0
  269. package/starter/film/script.fountain +16 -0
  270. package/starter/film/shots.json +26 -0
  271. package/starter/film/sounds/whoosh.wav +0 -0
  272. package/starter/film/src/graphics/title.css +33 -0
  273. package/starter/film/src/graphics/title.stories.tsx +6 -0
  274. package/starter/film/src/graphics/title.tsx +14 -0
  275. package/starter/film/src/models/opening.blend +0 -0
  276. package/starter/film/src/models/opening.py +87 -0
  277. package/starter/film/story.md +14 -0
  278. package/starter/film/takes/.gitkeep +0 -0
  279. package/starter/film/takes.json +4 -0
  280. package/starter/film-skills/film-cut/SKILL.md +31 -0
  281. package/starter/film-skills/film-shots/SKILL.md +32 -0
  282. package/starter/film-skills/film-story/SKILL.md +19 -0
  283. package/starter/game/levels/MainLevel.tsx +24 -0
  284. package/starter/game/prefabs/ground/Ground.tsx +24 -0
  285. package/starter/game/prefabs/ground/ground.blend +0 -0
  286. package/starter/game/prefabs/ground/ground.glb +0 -0
  287. package/starter/game/prefabs/ground/ground.py +106 -0
  288. package/starter/package.json +3 -2
  289. package/starter/sounds/mix.json +10 -0
  290. package/dist/assets/BVHLoader-V9f-EnYd.js +0 -1
  291. package/dist/assets/ColladaLoader-Cp-E7iiV.js +0 -3
  292. package/dist/assets/EntityModelDocument-DxdGehCz.js +0 -1
  293. package/dist/assets/EnvironmentAssetDocument-DSTdQdSt.js +0 -1
  294. package/dist/assets/FBXLoader-CpZqH4xx.js +0 -1
  295. package/dist/assets/InspectorObjectPreview-De6zT2B7.js +0 -1
  296. package/dist/assets/LiveModuleDocument-Do5YRpzB.js +0 -2
  297. package/dist/assets/LutAssetDocument-BjZgLVjR.js +0 -1
  298. package/dist/assets/MTLLoader-JK_iLZsm.js +0 -2
  299. package/dist/assets/ModelAssetDocument-Bb5UYcrj.js +0 -1
  300. package/dist/assets/NonThreeAuthoringBootstrap-CVri610U.js +0 -1
  301. package/dist/assets/OBJLoader-eGO6iVw8.js +0 -5
  302. package/dist/assets/Object3DDocumentToolbar-C7HT5nHi.js +0 -1
  303. package/dist/assets/Object3DPreview-CaOEIIdC.js +0 -2
  304. package/dist/assets/OrbitControls-DrHRrSFA.js +0 -1
  305. package/dist/assets/PLYLoader-BCSN1tYw.js +0 -2
  306. package/dist/assets/QuarksAssetDocument-DzS5h2Bc.js +0 -2
  307. package/dist/assets/RectAreaLightUniformsLib-HqHjURQQ.js +0 -1
  308. package/dist/assets/STLLoader-vhCvZeOF.js +0 -1
  309. package/dist/assets/ShaderAssetDocument-DYXX7aw5.js +0 -1
  310. package/dist/assets/StageHost-DVnv4TcF.js +0 -1179
  311. package/dist/assets/TDSLoader-DbUHSEO9.js +0 -1
  312. package/dist/assets/ToolObject3DPreview-Dad57oap.js +0 -1
  313. package/dist/assets/ViewportShadingMenu-Bl8IlWGh.js +0 -1
  314. package/dist/assets/animation-mixers.service-qJ4SNabd.js +0 -1
  315. package/dist/assets/animation-timeline.utility-wNtZO_cS.js +0 -1
  316. package/dist/assets/anthropic-DwpKRVGM.svg +0 -1
  317. package/dist/assets/asset-preview-OYr2sUbO.js +0 -4
  318. package/dist/assets/blender-display-shaders-BpnqnkG8.lut +0 -0
  319. package/dist/assets/blender-emscripten-engine-CTeOMKcG.js +0 -2
  320. package/dist/assets/blender-motion-worker-CtT2cV3V.js +0 -1
  321. package/dist/assets/blender-node-editor.document-pEhp9MZH.js +0 -1
  322. package/dist/assets/blender-properties-model-B7O1AR0g.js +0 -1
  323. package/dist/assets/blender-properties-tab-CBdCQseg.js +0 -3
  324. package/dist/assets/blender-runtime-host-swgDAdoy.js +0 -7221
  325. package/dist/assets/blender-runtime.document-BbtLLRrN.js +0 -13
  326. package/dist/assets/blender-screenshot.menu-CD1Bg0Z-.js +0 -1
  327. package/dist/assets/blender-timeline.document-DT_mWXnn.js +0 -1
  328. package/dist/assets/blender-uv-editor.document-9j_SUkf7.js +0 -1
  329. package/dist/assets/blender-version.status-Z13Xgrj-.js +0 -1
  330. package/dist/assets/blender-wali-engine-kfyCxO_U.js +0 -2
  331. package/dist/assets/blender.command-zp1Oe3pY.js +0 -1
  332. package/dist/assets/blender.environment-CG-pC7sk.js +0 -1
  333. package/dist/assets/blender.keymap-BmOBRY7p.js +0 -1
  334. package/dist/assets/blender.status-MRiv-9Ju.js +0 -1
  335. package/dist/assets/blender.style--aBP5V1k.js +0 -1
  336. package/dist/assets/city-EkhAOo5s.exr +0 -0
  337. package/dist/assets/courtyard-DqlebbpC.exr +0 -0
  338. package/dist/assets/forest-P_CQY3b_.exr +0 -0
  339. package/dist/assets/icon-BkiLD9ed.png +0 -0
  340. package/dist/assets/index-C8BwtQGN.js +0 -952
  341. package/dist/assets/interior-Bo_lba15.exr +0 -0
  342. package/dist/assets/linear-resolve-Cuka7Ypb.js +0 -377
  343. package/dist/assets/live-mixers-B-bwLZ7c.js +0 -1
  344. package/dist/assets/model-inspection-DVE8f3Dj.js +0 -1
  345. package/dist/assets/model.layout-BpZE1W9V.js +0 -1
  346. package/dist/assets/models.finder-5z7xbsOu.js +0 -1
  347. package/dist/assets/night-CvV4Gybt.exr +0 -0
  348. package/dist/assets/object3d-document-session-registry-DDpmVmir.js +0 -2
  349. package/dist/assets/openai-DHNKzFtc.svg +0 -1
  350. package/dist/assets/output-pass-j4dAGrPY.js +0 -85
  351. package/dist/assets/play-live-BBkOuWQn.js +0 -1
  352. package/dist/assets/product-CUU4-nDZ.js +0 -14
  353. package/dist/assets/product-DPOIZgKM.css +0 -1
  354. package/dist/assets/properties-bone-constraints.inspector-D8CtPu9c.js +0 -1
  355. package/dist/assets/properties-bone.inspector-j9aNQrP9.js +0 -1
  356. package/dist/assets/properties-collection.inspector-CaMveBur.js +0 -1
  357. package/dist/assets/properties-constraints.inspector-DB9bBgqn.js +0 -1
  358. package/dist/assets/properties-data.inspector-C7dh_XTe.js +0 -1
  359. package/dist/assets/properties-material.inspector-DWC5NJkW.js +0 -1
  360. package/dist/assets/properties-modifiers.inspector-CBUxUSB0.js +0 -1
  361. package/dist/assets/properties-object.inspector-wvO8nuGD.js +0 -1
  362. package/dist/assets/properties-output.inspector-CFyAZn9F.js +0 -1
  363. package/dist/assets/properties-particles.inspector-zEaTW3U7.js +0 -1
  364. package/dist/assets/properties-physics.inspector-CO-4UZbX.js +0 -1
  365. package/dist/assets/properties-render.inspector-DoJ1BMKP.js +0 -1
  366. package/dist/assets/properties-scene.inspector-BOhaiC0_.js +0 -1
  367. package/dist/assets/properties-texture.inspector-1JoYUWiR.js +0 -1
  368. package/dist/assets/properties-view-layer.inspector-DuRkFWtq.js +0 -1
  369. package/dist/assets/properties-world.inspector-Csfv-x0A.js +0 -1
  370. package/dist/assets/react-18-Dh4gvPqw.js +0 -1
  371. package/dist/assets/regions-DWeEBnE2.js +0 -1
  372. package/dist/assets/sculpt.layout-D-K5cLw6.js +0 -1
  373. package/dist/assets/session-CvHLFvpx.js +0 -6056
  374. package/dist/assets/shading.layout-CZZHKBer.js +0 -1
  375. package/dist/assets/sky-precompute-worker-CPGW9t_C.js +0 -1
  376. package/dist/assets/spark.module-CTTm62aa.js +0 -12120
  377. package/dist/assets/stage-keyboard-BvTth28t.js +0 -1
  378. package/dist/assets/stage-overlay-set-Dt6IH1xC.js +0 -1
  379. package/dist/assets/stage-presence-markers-DszBO9B1.js +0 -1
  380. package/dist/assets/stage-transform-tools-D6H_SBLV.js +0 -1
  381. package/dist/assets/standard-viewport-dressing-BSYojdsQ.js +0 -24
  382. package/dist/assets/studio-CysTBGIb.exr +0 -0
  383. package/dist/assets/sunrise-Dj0psFrf.exr +0 -0
  384. package/dist/assets/sunset-Bw3x2Bot.exr +0 -0
  385. package/dist/assets/texture.layout-DASpHVht.js +0 -1
  386. package/dist/assets/three-integration.service-DvOyomjh.js +0 -2
  387. package/dist/assets/three.module-CtVjCPcj.js +0 -3840
  388. package/dist/assets/uv-editing.layout-A8RA-cbM.js +0 -1
  389. package/dist/assets/volter-sdk-account-fYMnFHfe.js +0 -1
  390. package/dist/assets/volter-sdk-client-JmBOIwGe.js +0 -1
  391. package/dist/assets/volter-sdk-contributions-l9HrPjwW.js +0 -1
  392. package/dist/assets/volter-sdk-css-numeric-style-ud28AcW3.js +0 -1
  393. package/dist/assets/volter-sdk-document-probe-C4RhslOI.js +0 -1
  394. package/dist/assets/volter-sdk-editor-view-B_mScT1w.js +0 -1
  395. package/dist/assets/volter-sdk-host-B9QOINsX.js +0 -1
  396. package/dist/assets/volter-sdk-http-transport.browser-6a_cUtge.js +0 -1
  397. package/dist/assets/volter-sdk-index-DDdgpWqc.js +0 -1
  398. package/dist/assets/volter-sdk-kit-CapabilityCoverageSection-CRc93EXv.js +0 -1
  399. package/dist/assets/volter-sdk-kit-account-client-ByjTbat7.js +0 -1
  400. package/dist/assets/volter-sdk-kit-action-registry-J5l20B9X.js +0 -1
  401. package/dist/assets/volter-sdk-kit-active-product-BTHzjkrh.js +0 -1
  402. package/dist/assets/volter-sdk-kit-active-project-CgXmYhKx.js +0 -1
  403. package/dist/assets/volter-sdk-kit-adapter-editor-config-CcSGBUF1.js +0 -1
  404. package/dist/assets/volter-sdk-kit-adapter-module-CqkP49hA.js +0 -1
  405. package/dist/assets/volter-sdk-kit-adapter-observation-MWNd8Bmj.js +0 -1
  406. package/dist/assets/volter-sdk-kit-animation-animation-clock-C5QhnLuY.js +0 -1
  407. package/dist/assets/volter-sdk-kit-animation-stage-transport-DFbbJ80P.js +0 -1
  408. package/dist/assets/volter-sdk-kit-api-assets-Dtg4_1jX.js +0 -1
  409. package/dist/assets/volter-sdk-kit-api-base-De8oXkY8.js +0 -1
  410. package/dist/assets/volter-sdk-kit-api-build-Cgmw35Ng.js +0 -1
  411. package/dist/assets/volter-sdk-kit-api-logs-B1mQlcPQ.js +0 -1
  412. package/dist/assets/volter-sdk-kit-api-project-identity-DEZz1U5_.js +0 -1
  413. package/dist/assets/volter-sdk-kit-api-project-open-DuXZ6vyn.js +0 -1
  414. package/dist/assets/volter-sdk-kit-api-project-source-DMnPoTP2.js +0 -1
  415. package/dist/assets/volter-sdk-kit-api-project-state-6Lu0Vxdr.js +0 -1
  416. package/dist/assets/volter-sdk-kit-api-relay-BuCkenvE.js +0 -1
  417. package/dist/assets/volter-sdk-kit-api-settings-CkFO_pMP.js +0 -1
  418. package/dist/assets/volter-sdk-kit-api-themes-D5J6TiAR.js +0 -1
  419. package/dist/assets/volter-sdk-kit-api-worktrees-de1U7-9B.js +0 -1
  420. package/dist/assets/volter-sdk-kit-asset-capabilities-IBJRDoU_.js +0 -1
  421. package/dist/assets/volter-sdk-kit-asset-compare-core-qeWQI0-1.js +0 -1
  422. package/dist/assets/volter-sdk-kit-asset-editor-context-JZ2T8xhF.js +0 -1
  423. package/dist/assets/volter-sdk-kit-asset-events-wfq-jH9_.js +0 -1
  424. package/dist/assets/volter-sdk-kit-asset-inspector-actions-NlF3CeMC.js +0 -1
  425. package/dist/assets/volter-sdk-kit-asset-selection-BUXGqut1.js +0 -1
  426. package/dist/assets/volter-sdk-kit-asset-selection-viewer-registry-DNj4RggW.js +0 -1
  427. package/dist/assets/volter-sdk-kit-asset-thumbnails-CPp1sS_w.js +0 -1
  428. package/dist/assets/volter-sdk-kit-asset-viewers-PKilU3Lm.js +0 -1
  429. package/dist/assets/volter-sdk-kit-asset-workflow-asset-import-jobs-DHDfKVAJ.js +0 -1
  430. package/dist/assets/volter-sdk-kit-asset-workflow-asset-ledger-Ch0TDXil.js +0 -1
  431. package/dist/assets/volter-sdk-kit-asset-workflow-asset-ledger-backend-Cb0-daSo.js +0 -1
  432. package/dist/assets/volter-sdk-kit-asset-workflow-asset-materialization-report-Bznr7T6d.js +0 -1
  433. package/dist/assets/volter-sdk-kit-asset-workflow-asset-pack-manifest-BriZZqYC.js +0 -1
  434. package/dist/assets/volter-sdk-kit-asset-workflow-audio-preview-player-5K3HN4kg.js +0 -1
  435. package/dist/assets/volter-sdk-kit-asset-workflow-audio-waveform-F65PsmIZ.js +0 -1
  436. package/dist/assets/volter-sdk-kit-asset-workflow-cloud-asset-client-DzxVbaeb.js +0 -1
  437. package/dist/assets/volter-sdk-kit-asset-workflow-hosted-asset-materialization-B2Oxd31D.js +0 -1
  438. package/dist/assets/volter-sdk-kit-asset-workflow-image-view-scale-BmPO24SY.js +0 -1
  439. package/dist/assets/volter-sdk-kit-asset-workflow-ledger-write-lock-BPRq-xQf.js +0 -1
  440. package/dist/assets/volter-sdk-kit-asset-workflow-pixi-spritesheet-CM64IwuA.js +0 -1
  441. package/dist/assets/volter-sdk-kit-asset-workflow-preview-resource-lifetime-BIKxorKS.js +0 -1
  442. package/dist/assets/volter-sdk-kit-asset-workflow-project-asset-commands-7CNTmzBZ.js +0 -1
  443. package/dist/assets/volter-sdk-kit-asset-workflow-project-content-C3EJl866.js +0 -1
  444. package/dist/assets/volter-sdk-kit-asset-workflow-thumbnail-system-CQrbYiAp.js +0 -1
  445. package/dist/assets/volter-sdk-kit-authoring-active-adapter-BC9Cf4yx.js +0 -1
  446. package/dist/assets/volter-sdk-kit-authoring-active-systems-GZm33tOS.js +0 -1
  447. package/dist/assets/volter-sdk-kit-authoring-adapter-key-C4-d6xt1.js +0 -1
  448. package/dist/assets/volter-sdk-kit-authoring-authoring-asset-url-CEEw_XEg.js +0 -1
  449. package/dist/assets/volter-sdk-kit-authoring-bootstrap-state-BJsS0bnj.js +0 -1
  450. package/dist/assets/volter-sdk-kit-authoring-boundary-authoring-adapter-1NA63Idp.js +0 -1
  451. package/dist/assets/volter-sdk-kit-authoring-canvas-scene-guides-BlbGyg38.js +0 -1
  452. package/dist/assets/volter-sdk-kit-authoring-composite-authoring-adapter-D0FSf6DM.js +0 -1
  453. package/dist/assets/volter-sdk-kit-authoring-consumer-actions-J7MnHWK3.js +0 -1
  454. package/dist/assets/volter-sdk-kit-authoring-design-time-layers-CnLS2erF.js +0 -1
  455. package/dist/assets/volter-sdk-kit-authoring-design-time-mount-registry-BrmHkPuP.js +0 -1
  456. package/dist/assets/volter-sdk-kit-authoring-edit-mode-authoring-HQAxbCiB.js +0 -1
  457. package/dist/assets/volter-sdk-kit-authoring-empty-project-authoring-CdLSRvO0.js +0 -1
  458. package/dist/assets/volter-sdk-kit-authoring-instance-source-menu-EWM45v6y.js +0 -1
  459. package/dist/assets/volter-sdk-kit-authoring-layered-pick-BX3K3GR7.js +0 -1
  460. package/dist/assets/volter-sdk-kit-authoring-mounted-root-subjects-BGatqFLR.js +0 -1
  461. package/dist/assets/volter-sdk-kit-authoring-no-authoring-adapter-CerY6qmy.js +0 -1
  462. package/dist/assets/volter-sdk-kit-authoring-object3d-document-persistence-DxZ-V-ys.js +0 -1
  463. package/dist/assets/volter-sdk-kit-authoring-panel-authoring-Bbv7lJc5.js +0 -1
  464. package/dist/assets/volter-sdk-kit-authoring-project-authoring-session-C5rP-I6e.js +0 -1
  465. package/dist/assets/volter-sdk-kit-authoring-provenance-BNVk0DFH.js +0 -1
  466. package/dist/assets/volter-sdk-kit-authoring-react-canvas-navigation-BqUskgSb.js +0 -1
  467. package/dist/assets/volter-sdk-kit-authoring-react-design-canvas-style-DB8S6Vfi.js +0 -1
  468. package/dist/assets/volter-sdk-kit-authoring-react-story-board-M-VqCWKu.js +0 -1
  469. package/dist/assets/volter-sdk-kit-authoring-seam-evidence-Qbbz8M6t.js +0 -1
  470. package/dist/assets/volter-sdk-kit-authoring-selection-scope-CkblMrR8.js +0 -1
  471. package/dist/assets/volter-sdk-kit-authoring-shell-document-ops-B9Y9p91j.js +0 -1
  472. package/dist/assets/volter-sdk-kit-authoring-story-board-chrome-fit-7umaPaVS.js +0 -1
  473. package/dist/assets/volter-sdk-kit-authoring-three-root-M5Gj55-Z.js +0 -1
  474. package/dist/assets/volter-sdk-kit-authoring-viewport-tool-context-CH5NA-YI.js +0 -1
  475. package/dist/assets/volter-sdk-kit-authoring-viewport-tool-owner-CzTEMmzx.js +0 -1
  476. package/dist/assets/volter-sdk-kit-authoring-world-session-state-BjKbimsg.js +0 -1
  477. package/dist/assets/volter-sdk-kit-availability-tick-C7I6Zrut.js +0 -1
  478. package/dist/assets/volter-sdk-kit-bitmap-label-DPmffd8g.js +0 -1
  479. package/dist/assets/volter-sdk-kit-boot-routing-CaKypcBx.js +0 -1
  480. package/dist/assets/volter-sdk-kit-breakpoint-state-5m0qTYvY.js +0 -1
  481. package/dist/assets/volter-sdk-kit-build-identity-HQ0VWGG8.js +0 -1
  482. package/dist/assets/volter-sdk-kit-bytes-codec-BJDqylNg.js +0 -1
  483. package/dist/assets/volter-sdk-kit-cancellation-reason-B0z-IzQ9.js +0 -1
  484. package/dist/assets/volter-sdk-kit-canvas-frames-BtkS3lNe.js +0 -1
  485. package/dist/assets/volter-sdk-kit-capture-camera-pose-CUejcTcV.js +0 -1
  486. package/dist/assets/volter-sdk-kit-capture-size-Uyb3uqXA.js +0 -1
  487. package/dist/assets/volter-sdk-kit-chrome-registry-cc3AZlnV.js +0 -1
  488. package/dist/assets/volter-sdk-kit-chrome-slot-registry-C4g-na11.js +0 -1
  489. package/dist/assets/volter-sdk-kit-collaboration-client-Cd6918QC.js +0 -1
  490. package/dist/assets/volter-sdk-kit-collaboration-presence-qXC7JfS2.js +0 -1
  491. package/dist/assets/volter-sdk-kit-command-dispatch-D07Pn7pe.js +0 -1
  492. package/dist/assets/volter-sdk-kit-command-listener-Bm2sgP0i.js +0 -1
  493. package/dist/assets/volter-sdk-kit-command-registry-CJoVRu6V.js +0 -1
  494. package/dist/assets/volter-sdk-kit-component-board-registry-D7xm8cFr.js +0 -1
  495. package/dist/assets/volter-sdk-kit-component-states-registry-DtippeT3.js +0 -1
  496. package/dist/assets/volter-sdk-kit-components-AlignToolbar-BporX2iz.js +0 -1
  497. package/dist/assets/volter-sdk-kit-components-ApplicationMenus-DfmKRYtb.js +0 -1
  498. package/dist/assets/volter-sdk-kit-components-AssetEditorShell-B-_vx-Jb.js +0 -1
  499. package/dist/assets/volter-sdk-kit-components-AssetInspectorToolSection-CyEcoLKv.js +0 -1
  500. package/dist/assets/volter-sdk-kit-components-BoardRulers-CjoDr2Ak.js +0 -1
  501. package/dist/assets/volter-sdk-kit-components-CanvasAddNodeDialogs-Bz4W0Y2g.js +0 -1
  502. package/dist/assets/volter-sdk-kit-components-CanvasSceneViewport-Cyd5bYha.js +0 -1
  503. package/dist/assets/volter-sdk-kit-components-ChromeSlot-q_wsahlZ.js +0 -1
  504. package/dist/assets/volter-sdk-kit-components-CodeView-COOHbFef.js +0 -1
  505. package/dist/assets/volter-sdk-kit-components-CompactInspectorShell-F5yS9e4v.js +0 -1
  506. package/dist/assets/volter-sdk-kit-components-ConsolePanel-Dnnq15qj.js +0 -1
  507. package/dist/assets/volter-sdk-kit-components-GameplaySessionTimeline-CFCva8sQ.js +0 -1
  508. package/dist/assets/volter-sdk-kit-components-InspectionProjection-Cj0eqFPF.js +0 -1
  509. package/dist/assets/volter-sdk-kit-components-Inspector-DhnEEQ_5.js +0 -1
  510. package/dist/assets/volter-sdk-kit-components-InspectorCanvasPreview-ljsWq41X.js +0 -1
  511. package/dist/assets/volter-sdk-kit-components-InspectorFieldsSection-pUp0DKhG.js +0 -1
  512. package/dist/assets/volter-sdk-kit-components-InspectorStoriesSection-BJKmp0B3.js +0 -1
  513. package/dist/assets/volter-sdk-kit-components-InspectorToolSection-DBDxp3Ir.js +0 -1
  514. package/dist/assets/volter-sdk-kit-components-InspectorTransformSection-eGVZo2ph.js +0 -1
  515. package/dist/assets/volter-sdk-kit-components-LightExplorerPanel-jKqvAsdL.js +0 -1
  516. package/dist/assets/volter-sdk-kit-components-MediaProperties-DEn9gV9T.js +0 -1
  517. package/dist/assets/volter-sdk-kit-components-ProjectHeader-CtsMXibh.js +0 -1
  518. package/dist/assets/volter-sdk-kit-components-ReactCanvasControls-Bdu_gdRF.js +0 -1
  519. package/dist/assets/volter-sdk-kit-components-RootSelectionOverlay-8PYXBIYy.js +0 -1
  520. package/dist/assets/volter-sdk-kit-components-RootTextEditor-DFkpwNlX.js +0 -1
  521. package/dist/assets/volter-sdk-kit-components-SaveStatus-BP1Q1tfu.js +0 -1
  522. package/dist/assets/volter-sdk-kit-components-SurfaceCrashBoundary-C_FxlEvS.js +0 -1
  523. package/dist/assets/volter-sdk-kit-components-SurfaceStateOverlay-C_O4-zsY.js +0 -1
  524. package/dist/assets/volter-sdk-kit-components-ToolContributionSurfaces-DAoNJ2KS.js +0 -1
  525. package/dist/assets/volter-sdk-kit-components-ToolHost-z-CSuvra.js +0 -1
  526. package/dist/assets/volter-sdk-kit-components-Toolbar-CUsODOE2.js +0 -1
  527. package/dist/assets/volter-sdk-kit-components-TransientHint-BsejPKYD.js +0 -1
  528. package/dist/assets/volter-sdk-kit-components-VersionControlSection-ldwCuasW.js +0 -1
  529. package/dist/assets/volter-sdk-kit-components-ViewportOverlaysMenu-DjfcwDPM.js +0 -1
  530. package/dist/assets/volter-sdk-kit-components-VolterLogo-wmAjAypV.js +0 -1
  531. package/dist/assets/volter-sdk-kit-components-WorktreeSwitcher-JN-eaFqo.js +0 -1
  532. package/dist/assets/volter-sdk-kit-components-account-documents-BcgknOsj.js +0 -1
  533. package/dist/assets/volter-sdk-kit-components-asset-documents-B2W4TjZO.js +0 -1
  534. package/dist/assets/volter-sdk-kit-components-asset-editor-persistence-NTgC5Ngq.js +0 -1
  535. package/dist/assets/volter-sdk-kit-components-asset-selection-section-CLS4gJUE.js +0 -1
  536. package/dist/assets/volter-sdk-kit-components-asset-thumbnails-CaYPgAtN.js +0 -1
  537. package/dist/assets/volter-sdk-kit-components-asset-viewers-AudioViewer-DbLUYMKF.js +0 -1
  538. package/dist/assets/volter-sdk-kit-components-asset-viewers-GenericJsonViewer-B3ieuK68.js +0 -1
  539. package/dist/assets/volter-sdk-kit-components-asset-viewers-ImageViewer-DicJ06Cl.js +0 -1
  540. package/dist/assets/volter-sdk-kit-components-asset-viewers-JsonAssetDocument-DRBY_95W.js +0 -1
  541. package/dist/assets/volter-sdk-kit-components-asset-viewers-OnlineAssetDetail-BR14tR5R.js +0 -1
  542. package/dist/assets/volter-sdk-kit-components-asset-viewers-SourceAssetViewer-BI9bFeTE.js +0 -1
  543. package/dist/assets/volter-sdk-kit-components-asset-viewers-SpritesheetSpriteView-d7Wqtjxk.js +0 -1
  544. package/dist/assets/volter-sdk-kit-components-asset-viewers-VideoViewer-Ykl90edA.js +0 -1
  545. package/dist/assets/volter-sdk-kit-components-asset-viewers-shader-source-BmwRhUts.js +0 -1
  546. package/dist/assets/volter-sdk-kit-components-board-guides-Dw7AT-AY.js +0 -1
  547. package/dist/assets/volter-sdk-kit-components-canvas-scene-hotkeys-s3AK_b58.js +0 -1
  548. package/dist/assets/volter-sdk-kit-components-canvas-temporary-pivot-DKdXJcd9.js +0 -1
  549. package/dist/assets/volter-sdk-kit-components-core-utilities-C5ZKnxiW.js +0 -1
  550. package/dist/assets/volter-sdk-kit-components-inspector-preview-section-BHsR6Ljx.js +0 -1
  551. package/dist/assets/volter-sdk-kit-components-inspector-revert-label-BcItYP-3.js +0 -1
  552. package/dist/assets/volter-sdk-kit-components-inspector-selection-DnVCu9NI.js +0 -1
  553. package/dist/assets/volter-sdk-kit-components-inspector-stories-gating-BbWmsm9H.js +0 -1
  554. package/dist/assets/volter-sdk-kit-components-inspector-transform-BCj8sqj5.js +0 -1
  555. package/dist/assets/volter-sdk-kit-components-inspector-transform-subject-DmyQlGz0.js +0 -1
  556. package/dist/assets/volter-sdk-kit-components-kind-documents-BECHMIFC.js +0 -1
  557. package/dist/assets/volter-sdk-kit-components-primitives-DraftColorInput-BB28QlBb.js +0 -1
  558. package/dist/assets/volter-sdk-kit-components-project-tool-documents-CrMMOzM5.js +0 -1
  559. package/dist/assets/volter-sdk-kit-components-scene-documents-B3yfDsBz.js +0 -1
  560. package/dist/assets/volter-sdk-kit-components-status-contributions-CDzNj8Hu.js +0 -1
  561. package/dist/assets/volter-sdk-kit-components-tool-documents-BpEG-ABF.js +0 -1
  562. package/dist/assets/volter-sdk-kit-components-tool-schema-form-BOiPCwKc.js +0 -1
  563. package/dist/assets/volter-sdk-kit-components-use-after-paint-AcvAjLMf.js +0 -1
  564. package/dist/assets/volter-sdk-kit-components-use-project-image-assets-CRFbWY4e.js +0 -1
  565. package/dist/assets/volter-sdk-kit-components-workspace-history-DTgNtIrO.js +0 -1
  566. package/dist/assets/volter-sdk-kit-components-world-documents-N9ea5nLy.js +0 -1
  567. package/dist/assets/volter-sdk-kit-components-world-overlay-gestures-CvVXrTkV.js +0 -1
  568. package/dist/assets/volter-sdk-kit-composite-screenshot-BsiNQIxC.js +0 -1
  569. package/dist/assets/volter-sdk-kit-content-entry-source-registry-BX8YW40L.js +0 -1
  570. package/dist/assets/volter-sdk-kit-contribution-surfaces-CMblNYDG.js +0 -1
  571. package/dist/assets/volter-sdk-kit-coverage-canvas-reveal-BtPYs0AY.js +0 -1
  572. package/dist/assets/volter-sdk-kit-coverage-design-time-surfaces-BCRK-uUC.js +0 -1
  573. package/dist/assets/volter-sdk-kit-coverage-ontology-invariants-3YuOn0LN.js +0 -1
  574. package/dist/assets/volter-sdk-kit-coverage-session-vitals-BpsIwBM0.js +0 -1
  575. package/dist/assets/volter-sdk-kit-creation-site-registry-C1_mEFTL.js +0 -1
  576. package/dist/assets/volter-sdk-kit-delegate-harness-registry-V07K9odj.js +0 -1
  577. package/dist/assets/volter-sdk-kit-document-areas-TQELDKqa.js +0 -1
  578. package/dist/assets/volter-sdk-kit-document-context-registry-BaPLLOGQ.js +0 -1
  579. package/dist/assets/volter-sdk-kit-document-open-registry-D-zxkb7y.js +0 -1
  580. package/dist/assets/volter-sdk-kit-document-play-extension-F8i5xdiU.js +0 -1
  581. package/dist/assets/volter-sdk-kit-document-preview-source-DgDf2lpD.js +0 -1
  582. package/dist/assets/volter-sdk-kit-document-renderer-session-YWnbpDFE.js +0 -1
  583. package/dist/assets/volter-sdk-kit-document-stage-sessions-BKZBGbit.js +0 -1
  584. package/dist/assets/volter-sdk-kit-document-viewports-DNuE6MQl.js +0 -1
  585. package/dist/assets/volter-sdk-kit-editor-api-DZDj3o86.js +0 -1
  586. package/dist/assets/volter-sdk-kit-editor-chrome-capture-De6DmSgV.js +0 -1
  587. package/dist/assets/volter-sdk-kit-editor-commands-CImZE1nE.js +0 -1
  588. package/dist/assets/volter-sdk-kit-editor-console-nzCbsR0U.js +0 -1
  589. package/dist/assets/volter-sdk-kit-editor-current-view-POB-DPkt.js +0 -1
  590. package/dist/assets/volter-sdk-kit-editor-document-probe-B5tRXCfR.js +0 -1
  591. package/dist/assets/volter-sdk-kit-editor-git-client-SsYoNC6J.js +0 -1
  592. package/dist/assets/volter-sdk-kit-editor-hotkeys-B4ocILot.js +0 -1
  593. package/dist/assets/volter-sdk-kit-editor-lease-CBvYmCsH.js +0 -1
  594. package/dist/assets/volter-sdk-kit-editor-lease-view-DVuaJEec.js +0 -1
  595. package/dist/assets/volter-sdk-kit-editor-mode-B2vWMS-_.js +0 -1
  596. package/dist/assets/volter-sdk-kit-editor-notifications-DgsalU9q.js +0 -1
  597. package/dist/assets/volter-sdk-kit-editor-presence-BQiXcYKf.js +0 -1
  598. package/dist/assets/volter-sdk-kit-editor-presentation-activity-DO7YpI0H.js +0 -1
  599. package/dist/assets/volter-sdk-kit-editor-presentation-notice-BZtrnX57.js +0 -1
  600. package/dist/assets/volter-sdk-kit-editor-runtime-C8mqfYkM.js +0 -1
  601. package/dist/assets/volter-sdk-kit-editor-server-response-qipqMDto.js +0 -1
  602. package/dist/assets/volter-sdk-kit-editor-session-attribution-_PNhRyeQ.js +0 -1
  603. package/dist/assets/volter-sdk-kit-editor-session-mode-BcDn3FZY.js +0 -1
  604. package/dist/assets/volter-sdk-kit-editor-state-facets-3r455vYW.js +0 -1
  605. package/dist/assets/volter-sdk-kit-editor-view-presentation-Dovw_-H_.js +0 -1
  606. package/dist/assets/volter-sdk-kit-environment-images-DNJU9lPC.js +0 -1
  607. package/dist/assets/volter-sdk-kit-eyedropper-session-DJMkT_IO.js +0 -1
  608. package/dist/assets/volter-sdk-kit-files-file-provider-BnmRHNTp.js +0 -1
  609. package/dist/assets/volter-sdk-kit-files-project-files-CiKUZlIY.js +0 -1
  610. package/dist/assets/volter-sdk-kit-finders-index-qZKU8xjn.js +0 -1
  611. package/dist/assets/volter-sdk-kit-finders-scenes-from-entrypoint-selection-DBTnLBhQ.js +0 -1
  612. package/dist/assets/volter-sdk-kit-frame-frame-parts-DY-_uCea.js +0 -1
  613. package/dist/assets/volter-sdk-kit-framed-document-capture-CsprF9Ct.js +0 -1
  614. package/dist/assets/volter-sdk-kit-game-surface-defaults-Dz1sExNZ.js +0 -1
  615. package/dist/assets/volter-sdk-kit-gameplay-export-state-BwkWHkY-.js +0 -1
  616. package/dist/assets/volter-sdk-kit-gameplay-replay-CgF6vM6H.js +0 -1
  617. package/dist/assets/volter-sdk-kit-gameplay-session-time-BrdLX9MN.js +0 -1
  618. package/dist/assets/volter-sdk-kit-gameplay-sessions-0YRBcIBD.js +0 -1
  619. package/dist/assets/volter-sdk-kit-hierarchy-component-marks-pwxcueeL.js +0 -1
  620. package/dist/assets/volter-sdk-kit-hierarchy-internals-qxAC9Yyz.js +0 -1
  621. package/dist/assets/volter-sdk-kit-hierarchy-kind-icon-Bguy3R2P.js +0 -1
  622. package/dist/assets/volter-sdk-kit-hierarchy-menu-registry-CQ_dm6ZG.js +0 -1
  623. package/dist/assets/volter-sdk-kit-hierarchy-node-rows-BJliwGW1.js +0 -1
  624. package/dist/assets/volter-sdk-kit-hierarchy-panel-view-C6zK-ewB.js +0 -1
  625. package/dist/assets/volter-sdk-kit-hierarchy-projection-q1LvhfSm.js +0 -1
  626. package/dist/assets/volter-sdk-kit-hierarchy-row-media-jZ989Tvr.js +0 -1
  627. package/dist/assets/volter-sdk-kit-hierarchy-row-model-BmrBiFlP.js +0 -1
  628. package/dist/assets/volter-sdk-kit-hierarchy-rows-BMI3XBi-.js +0 -1
  629. package/dist/assets/volter-sdk-kit-hierarchy-walk-oEWRF-Iz.js +0 -1
  630. package/dist/assets/volter-sdk-kit-history-editor-session-CdficO7Z.js +0 -1
  631. package/dist/assets/volter-sdk-kit-history-history-commands-D7VwYk3h.js +0 -1
  632. package/dist/assets/volter-sdk-kit-history-history-delegate-DgIAPV-4.js +0 -1
  633. package/dist/assets/volter-sdk-kit-history-history-limit-notices-Bu07tHVz.js +0 -1
  634. package/dist/assets/volter-sdk-kit-history-history-service-BzbUb6oV.js +0 -1
  635. package/dist/assets/volter-sdk-kit-history-persistence-coordinator-DuWeeacm.js +0 -1
  636. package/dist/assets/volter-sdk-kit-history-project-file-history-C7m0teYF.js +0 -1
  637. package/dist/assets/volter-sdk-kit-history-project-root-history-backends-mip7BKbu.js +0 -1
  638. package/dist/assets/volter-sdk-kit-history-resource-registry-CZoZX7pJ.js +0 -1
  639. package/dist/assets/volter-sdk-kit-history-snapshot-store-DFlmQKjf.js +0 -1
  640. package/dist/assets/volter-sdk-kit-history-source-history-backend-C1tXQx-3.js +0 -1
  641. package/dist/assets/volter-sdk-kit-hmr-registration-group-CdWSrJkL.js +0 -1
  642. package/dist/assets/volter-sdk-kit-hmr-stable-react-context-B_NNyLJr.js +0 -1
  643. package/dist/assets/volter-sdk-kit-hotkeys-9UuVecd2.js +0 -1
  644. package/dist/assets/volter-sdk-kit-inference-diagnostics-Bp6UhMrh.js +0 -1
  645. package/dist/assets/volter-sdk-kit-initial-project-mIrJ1z4F.js +0 -1
  646. package/dist/assets/volter-sdk-kit-inspection-active-subject-Ci13od8C.js +0 -1
  647. package/dist/assets/volter-sdk-kit-inspection-active-surface-BbND9Nn7.js +0 -1
  648. package/dist/assets/volter-sdk-kit-inspection-compose-subject-Cruyx55P.js +0 -1
  649. package/dist/assets/volter-sdk-kit-inspection-display-Ckb72SDN.js +0 -1
  650. package/dist/assets/volter-sdk-kit-inspection-document-subject-Dd7sTsiM.js +0 -1
  651. package/dist/assets/volter-sdk-kit-inspection-game-subject-Zye7SfKC.js +0 -1
  652. package/dist/assets/volter-sdk-kit-inspection-model-B6kt5U5M.js +0 -1
  653. package/dist/assets/volter-sdk-kit-inspection-node-media-3WYK4mrg.js +0 -1
  654. package/dist/assets/volter-sdk-kit-inspection-null-subject-j5MU6Bqp.js +0 -1
  655. package/dist/assets/volter-sdk-kit-inspection-serialize-C5ElmYGd.js +0 -1
  656. package/dist/assets/volter-sdk-kit-inspection-use-active-inspection-Dqr8YOfV.js +0 -1
  657. package/dist/assets/volter-sdk-kit-inspector-presentation-Bxm_mJug.js +0 -1
  658. package/dist/assets/volter-sdk-kit-inspector-property-grouping-DGsJwl0r.js +0 -1
  659. package/dist/assets/volter-sdk-kit-inspector-section-registry-BTw0xKeK.js +0 -1
  660. package/dist/assets/volter-sdk-kit-instance-source-actions-B_SYfHzK.js +0 -1
  661. package/dist/assets/volter-sdk-kit-js-heap-CMHIxDFc.js +0 -1
  662. package/dist/assets/volter-sdk-kit-key-actions-npGWeBwX.js +0 -1
  663. package/dist/assets/volter-sdk-kit-keymap-presets-Dgo5jMVc.js +0 -1
  664. package/dist/assets/volter-sdk-kit-layout-policy-D6cqDneT.js +0 -1
  665. package/dist/assets/volter-sdk-kit-light-explorer-model-D9220Fr3.js +0 -1
  666. package/dist/assets/volter-sdk-kit-live-canvas-frame-CQvRrTp5.js +0 -1
  667. package/dist/assets/volter-sdk-kit-live-document-StECWB5n.js +0 -1
  668. package/dist/assets/volter-sdk-kit-live-gesture-lock-DpKIl8Kh.js +0 -1
  669. package/dist/assets/volter-sdk-kit-live-seam-evidence-WkwVMDpm.js +0 -1
  670. package/dist/assets/volter-sdk-kit-live-session-registry-DmaGkq5x.js +0 -1
  671. package/dist/assets/volter-sdk-kit-live-transition-B5jM4iFM.js +0 -1
  672. package/dist/assets/volter-sdk-kit-manifest-project-amCdVxUh.js +0 -1
  673. package/dist/assets/volter-sdk-kit-module-fetch-diagnosis-CpTsYq8x.js +0 -1
  674. package/dist/assets/volter-sdk-kit-mount-failure-report-DcYXxWwN.js +0 -1
  675. package/dist/assets/volter-sdk-kit-native-selection-style-bMu0TkER.js +0 -1
  676. package/dist/assets/volter-sdk-kit-object3d-document-write-policy-DCtXUN3w.js +0 -1
  677. package/dist/assets/volter-sdk-kit-packaged-runtime-8FNZVNB9.js +0 -1
  678. package/dist/assets/volter-sdk-kit-performance-profiler-DKuyDNq0.js +0 -1
  679. package/dist/assets/volter-sdk-kit-performance-sources-CUq2AYlp.js +0 -1
  680. package/dist/assets/volter-sdk-kit-photograph-notice-CJC3RuIs.js +0 -1
  681. package/dist/assets/volter-sdk-kit-play-boot-phase-CvmjrYem.js +0 -1
  682. package/dist/assets/volter-sdk-kit-play-camera-flight-Dp3bYFl4.js +0 -1
  683. package/dist/assets/volter-sdk-kit-presentation-surface-DDAJLzOO.js +0 -1
  684. package/dist/assets/volter-sdk-kit-product-command-CevBP_kA.js +0 -1
  685. package/dist/assets/volter-sdk-kit-project-adapter-DZMJa9qO.js +0 -1
  686. package/dist/assets/volter-sdk-kit-project-asset-refresh-BlzSWFsZ.js +0 -1
  687. package/dist/assets/volter-sdk-kit-project-asset-roots-ByJUql0c.js +0 -1
  688. package/dist/assets/volter-sdk-kit-project-local-state-CzuDIgqm.js +0 -1
  689. package/dist/assets/volter-sdk-kit-project-manager-KiOTeJwI.js +0 -1
  690. package/dist/assets/volter-sdk-kit-project-module-changes-BDLfMwF6.js +0 -1
  691. package/dist/assets/volter-sdk-kit-project-module-split-DVZB3699.js +0 -1
  692. package/dist/assets/volter-sdk-kit-project-provenance-GZJY3tis.js +0 -1
  693. package/dist/assets/volter-sdk-kit-project-ready-EtjRqua9.js +0 -1
  694. package/dist/assets/volter-sdk-kit-project-shape-Jb91qwQJ.js +0 -1
  695. package/dist/assets/volter-sdk-kit-project-tools-n1IzvKJM.js +0 -1
  696. package/dist/assets/volter-sdk-kit-readiness-j18YadCv.js +0 -1
  697. package/dist/assets/volter-sdk-kit-renderer-resource-counts-BjvWDcz5.js +0 -1
  698. package/dist/assets/volter-sdk-kit-reported-play-state-BdYUBkLM.js +0 -1
  699. package/dist/assets/volter-sdk-kit-resolve-contributed-command-7ZIwPRlj.js +0 -1
  700. package/dist/assets/volter-sdk-kit-resolve-relative-specifier-BEqx2z44.js +0 -1
  701. package/dist/assets/volter-sdk-kit-retained-document-states-BWSvbm_C.js +0 -1
  702. package/dist/assets/volter-sdk-kit-scene-document-plan-B8Q6NbgU.js +0 -1
  703. package/dist/assets/volter-sdk-kit-scene-live-open-PVToaH1e.js +0 -1
  704. package/dist/assets/volter-sdk-kit-scoped-game-css-DOF-inf1.js +0 -1
  705. package/dist/assets/volter-sdk-kit-served-url-C3OFjtsJ.js +0 -1
  706. package/dist/assets/volter-sdk-kit-session-close-CfqKNfrE.js +0 -1
  707. package/dist/assets/volter-sdk-kit-session-tombstone-wgZaXyq-.js +0 -1
  708. package/dist/assets/volter-sdk-kit-settings-settings-provider-CkU3sFW7.js +0 -1
  709. package/dist/assets/volter-sdk-kit-settings-store-vv_SoMfR.js +0 -1
  710. package/dist/assets/volter-sdk-kit-shell-store-DTExcaKL.js +0 -1
  711. package/dist/assets/volter-sdk-kit-shell-store-door-Y-FBGkmI.js +0 -1
  712. package/dist/assets/volter-sdk-kit-source-conflict-CnIJpwkZ.js +0 -1
  713. package/dist/assets/volter-sdk-kit-stage-context-q9FWjN1-.js +0 -1
  714. package/dist/assets/volter-sdk-kit-stage-invalidation-43bhizXB.js +0 -1
  715. package/dist/assets/volter-sdk-kit-stage-store-registry-BQo-SIuU.js +0 -1
  716. package/dist/assets/volter-sdk-kit-startup-failure-B7USi1FF.js +0 -1
  717. package/dist/assets/volter-sdk-kit-state-report-deferral-Cur6y3FE.js +0 -1
  718. package/dist/assets/volter-sdk-kit-storage-host-files-storage-C9d8xXNc.js +0 -1
  719. package/dist/assets/volter-sdk-kit-storage-http-storage-MuV46OcN.js +0 -1
  720. package/dist/assets/volter-sdk-kit-storage-index-CcMXaj5N.js +0 -1
  721. package/dist/assets/volter-sdk-kit-storage-mem-storage-CaZsvmox.js +0 -1
  722. package/dist/assets/volter-sdk-kit-storage-path-lock-ClaJ7vSM.js +0 -1
  723. package/dist/assets/volter-sdk-kit-storage-paths-Ci2ZChlj.js +0 -1
  724. package/dist/assets/volter-sdk-kit-stories-StoryPreviewMount-OjN0fncW.js +0 -1
  725. package/dist/assets/volter-sdk-kit-stories-compose-project-stories-BlKWWJmk.js +0 -1
  726. package/dist/assets/volter-sdk-kit-stories-prefabs-finder-CcmeyBzg.js +0 -1
  727. package/dist/assets/volter-sdk-kit-stories-prefabs-from-stories-CA_oKZKb.js +0 -1
  728. package/dist/assets/volter-sdk-kit-stories-project-story-regions-CFAyIdjW.js +0 -1
  729. package/dist/assets/volter-sdk-kit-stories-scope-XvZpLAc5.js +0 -1
  730. package/dist/assets/volter-sdk-kit-stories-story-capture-K4eH6MMa.js +0 -1
  731. package/dist/assets/volter-sdk-kit-stories-story-declared-medium-e8MXBoO_.js +0 -1
  732. package/dist/assets/volter-sdk-kit-stories-story-discovery-DViKEE-J.js +0 -1
  733. package/dist/assets/volter-sdk-kit-stories-story-dom-runtime-DdlXu5tN.js +0 -1
  734. package/dist/assets/volter-sdk-kit-stories-story-grouping-BbgkS2Kl.js +0 -1
  735. package/dist/assets/volter-sdk-kit-stories-story-presentation-Bw39PGHN.js +0 -1
  736. package/dist/assets/volter-sdk-kit-stories-story-registry-DpouLkjB.js +0 -1
  737. package/dist/assets/volter-sdk-kit-story-document-openers-DckbFGIr.js +0 -1
  738. package/dist/assets/volter-sdk-kit-story-thumbnails-ruZKvQPb.js +0 -1
  739. package/dist/assets/volter-sdk-kit-surface-keyboard-ChQta2gu.js +0 -1
  740. package/dist/assets/volter-sdk-kit-surface-state-CUbH0mE7.js +0 -1
  741. package/dist/assets/volter-sdk-kit-system-seam-evidence-hHuyimda.js +0 -1
  742. package/dist/assets/volter-sdk-kit-tab-census-BKO-Cotm.js +0 -1
  743. package/dist/assets/volter-sdk-kit-tab-lifecycle-client--HEzpfrP.js +0 -1
  744. package/dist/assets/volter-sdk-kit-theme-library-cooHZE2t.js +0 -1
  745. package/dist/assets/volter-sdk-kit-theme-preference-BfzIz8X4.js +0 -1
  746. package/dist/assets/volter-sdk-kit-three-viewport-presentation-DJQ6GD49.js +0 -1
  747. package/dist/assets/volter-sdk-kit-tool-contribution-play-B1vfLya9.js +0 -1
  748. package/dist/assets/volter-sdk-kit-tool-loader-C_B2N1As.js +0 -1
  749. package/dist/assets/volter-sdk-kit-transform-mode-request-tOzI-V8h.js +0 -1
  750. package/dist/assets/volter-sdk-kit-transient-hint-qly8UT5T.js +0 -1
  751. package/dist/assets/volter-sdk-kit-transport-strip-CrqMX70b.js +0 -1
  752. package/dist/assets/volter-sdk-kit-ui-source-file-region-resolver-CjFRrSBS.js +0 -1
  753. package/dist/assets/volter-sdk-kit-ui-source-inspect-CPbxbbEw.js +0 -1
  754. package/dist/assets/volter-sdk-kit-ui-source-source-write-backend-Ci45ai4Y.js +0 -1
  755. package/dist/assets/volter-sdk-kit-ui-source-tier-source-write-backend-B_pwEKI_.js +0 -1
  756. package/dist/assets/volter-sdk-kit-user-local-state-CZtLuAED.js +0 -1
  757. package/dist/assets/volter-sdk-kit-viewport-activation-timings-DtO34FL_.js +0 -1
  758. package/dist/assets/volter-sdk-kit-viewport-editor-controls-C4eYemqw.js +0 -1
  759. package/dist/assets/volter-sdk-kit-viewport-presentation-D1_lvqyl.js +0 -1
  760. package/dist/assets/volter-sdk-kit-viewport-surface-status-BsGJAuRu.js +0 -1
  761. package/dist/assets/volter-sdk-kit-wait-until-DlHFfLUu.js +0 -1
  762. package/dist/assets/volter-sdk-kit-worker-call-metrics-FsK4U-gz.js +0 -1
  763. package/dist/assets/volter-sdk-kit-workspace-areas-CvTSMn-H.js +0 -1
  764. package/dist/assets/volter-sdk-kit-workspace-aux-commands-CrxEUAQx.js +0 -1
  765. package/dist/assets/volter-sdk-kit-workspace-available-documents-Cl8CigSt.js +0 -1
  766. package/dist/assets/volter-sdk-kit-workspace-core-utilities-rQQcVO5n.js +0 -1
  767. package/dist/assets/volter-sdk-kit-workspace-document-ids-CisQDpex.js +0 -1
  768. package/dist/assets/volter-sdk-kit-workspace-document-registry-D4w40sGe.js +0 -1
  769. package/dist/assets/volter-sdk-kit-workspace-document-restore-B0s9617k.js +0 -1
  770. package/dist/assets/volter-sdk-kit-workspace-host-commands-DLqH47QQ.js +0 -1
  771. package/dist/assets/volter-sdk-kit-workspace-persistence-gate-eeXMeNbc.js +0 -1
  772. package/dist/assets/volter-sdk-kit-workspace-play-utilities-sGc6TcaG.js +0 -1
  773. package/dist/assets/volter-sdk-kit-workspace-presets-D-OZK4QQ.js +0 -1
  774. package/dist/assets/volter-sdk-kit-workspace-regions-CLU4KicA.js +0 -1
  775. package/dist/assets/volter-sdk-kit-workspace-static-panels-BtUQumTF.js +0 -1
  776. package/dist/assets/volter-sdk-kit-workspace-status-registry-BlOrc7aA.js +0 -1
  777. package/dist/assets/volter-sdk-kit-workspace-storage-B1cvxes9.js +0 -1
  778. package/dist/assets/volter-sdk-kit-workspace-style-Czyy_uk2.js +0 -1
  779. package/dist/assets/volter-sdk-kit-workspace-utility-commands-D7ToZCgr.js +0 -1
  780. package/dist/assets/volter-sdk-kit-workspace-utility-registry-Czk_iMpg.js +0 -1
  781. package/dist/assets/volter-sdk-kit-world-adoption-CvxzEI8V.js +0 -1
  782. package/dist/assets/volter-sdk-kit-world-canvas-viewport-state-CjG34H8g.js +0 -1
  783. package/dist/assets/volter-sdk-kit-world-document-routing-B3yT1rzx.js +0 -1
  784. package/dist/assets/volter-sdk-kit-world-pan-state-Co5VSMOo.js +0 -1
  785. package/dist/assets/volter-sdk-kit-write-pipe-GbyDlxkJ.js +0 -1
  786. package/dist/assets/volter-sdk-layout-arrangements-DmBix6Gx.js +0 -1
  787. package/dist/assets/volter-sdk-layouts-CQccgb8u.js +0 -1
  788. package/dist/assets/volter-sdk-mgLi8_Cw.js +0 -2364
  789. package/dist/assets/volter-sdk-selection-wggwzLen.js +0 -1
  790. package/dist/assets/volter-sdk-session-command-table-HilHgL7-.js +0 -1
  791. package/dist/assets/volter-sdk-session-editor-brand-CnZ3VbR-.js +0 -1
  792. package/dist/assets/volter-sdk-session-editor-compatibility-BOYTGttq.js +0 -1
  793. package/dist/assets/volter-sdk-session-editor-control-protocol-DG79HI_x.js +0 -1
  794. package/dist/assets/volter-sdk-session-entrypoint-selection-readers-D9FXlkS2.js +0 -1
  795. package/dist/assets/volter-sdk-session-game-css-scope-CZmonWfe.js +0 -1
  796. package/dist/assets/volter-sdk-session-limited-view-KNOq_tYc.js +0 -1
  797. package/dist/assets/volter-sdk-session-project-module-url-D7htWtkD.js +0 -1
  798. package/dist/assets/volter-sdk-session-relative-path-guard-DYa5PL0U.js +0 -1
  799. package/dist/assets/volter-sdk-session-tool-contribution-convention-GC2AWVch.js +0 -1
  800. package/dist/assets/volter-sdk-types-Couxbiwa.js +0 -1
  801. package/dist/assets/volter-sdk-views-D8qvTyCn.js +0 -1
  802. package/dist/assets/volter-sdk-widgets-design-system-DOW3sA7o.js +0 -1
  803. package/dist/assets/volter-sdk-widgets-editor-appearance-iH79zcxr.js +0 -1
  804. package/dist/assets/volter-sdk-widgets-editor-material-D-LB0zxr.js +0 -1
  805. package/dist/assets/volter-sdk-widgets-icon-set-registry-ylLmSwSr.js +0 -1
  806. package/dist/assets/volter-sdk-widgets-index-DMo0Rqvn.js +0 -1
  807. package/dist/assets/volter-sdk-widgets-inspector-widgets-AlignmentGrid-DhdNVPDu.js +0 -1
  808. package/dist/assets/volter-sdk-widgets-inspector-widgets-AssetSlotPicker-BEDX8viW.js +0 -1
  809. package/dist/assets/volter-sdk-widgets-inspector-widgets-BorderEditor-9Vk3QrCy.js +0 -1
  810. package/dist/assets/volter-sdk-widgets-inspector-widgets-ColorPicker-rhGdxW0L.js +0 -1
  811. package/dist/assets/volter-sdk-widgets-inspector-widgets-CurveEditor-BXu0Q3-y.js +0 -1
  812. package/dist/assets/volter-sdk-widgets-inspector-widgets-FilterEditor-C49uoql_.js +0 -1
  813. package/dist/assets/volter-sdk-widgets-inspector-widgets-FontPicker-BoRWZylN.js +0 -1
  814. package/dist/assets/volter-sdk-widgets-inspector-widgets-GradientEditor-GxINOtYX.js +0 -1
  815. package/dist/assets/volter-sdk-widgets-inspector-widgets-ScrubbableInput-rvCzzMDI.js +0 -1
  816. package/dist/assets/volter-sdk-widgets-inspector-widgets-ShadowEditor-DG-MGXQX.js +0 -1
  817. package/dist/assets/volter-sdk-widgets-inspector-widgets-color-utils-Cy4AI76M.js +0 -1
  818. package/dist/assets/volter-sdk-widgets-inspector-widgets-curve-utils-ncKgVdwJ.js +0 -1
  819. package/dist/assets/volter-sdk-widgets-inspector-widgets-index-BtW7A1an.js +0 -1
  820. package/dist/assets/volter-sdk-widgets-inspector-widgets-shared-lOZ7oJLL.js +0 -1
  821. package/dist/assets/volter-sdk-widgets-interactive-edit-scope-BbS6qOlJ.js +0 -1
  822. package/dist/assets/volter-sdk-widgets-patterns-Dialog-BqcAE1N1.js +0 -1
  823. package/dist/assets/volter-sdk-widgets-patterns-Fields-CD2kSMcv.js +0 -1
  824. package/dist/assets/volter-sdk-widgets-patterns-List-CZyrvaL-.js +0 -1
  825. package/dist/assets/volter-sdk-widgets-patterns-StateSurface-D8L-se9D.js +0 -1
  826. package/dist/assets/volter-sdk-widgets-patterns-Surfaces-sW43gM3D.js +0 -1
  827. package/dist/assets/volter-sdk-widgets-patterns-Tabs-CTEQRAHE.js +0 -1
  828. package/dist/assets/volter-sdk-widgets-patterns-Toolbar-CF8cj2Xd.js +0 -1
  829. package/dist/assets/volter-sdk-widgets-patterns-Tree-KffO8vo1.js +0 -1
  830. package/dist/assets/volter-sdk-widgets-primitives-AnchoredMenu-D2my2vjj.js +0 -1
  831. package/dist/assets/volter-sdk-widgets-primitives-Button-CiaR71jI.js +0 -1
  832. package/dist/assets/volter-sdk-widgets-primitives-ColorInput-DAxGHgoQ.js +0 -1
  833. package/dist/assets/volter-sdk-widgets-primitives-DraftTextInput-CCZYI-j9.js +0 -1
  834. package/dist/assets/volter-sdk-widgets-primitives-EditorIcon-Fn9aFuF_.js +0 -1
  835. package/dist/assets/volter-sdk-widgets-primitives-FormControls-BMxlOety.js +0 -1
  836. package/dist/assets/volter-sdk-widgets-primitives-HoverPreview-BzwvyU3c.js +0 -1
  837. package/dist/assets/volter-sdk-widgets-primitives-JsonInput-CTc6p9EQ.js +0 -1
  838. package/dist/assets/volter-sdk-widgets-primitives-Layout-CE-beP_c.js +0 -1
  839. package/dist/assets/volter-sdk-widgets-primitives-Menu-DfNc6W9I.js +0 -1
  840. package/dist/assets/volter-sdk-widgets-primitives-NumberInput-Cyjw5Lzx.js +0 -1
  841. package/dist/assets/volter-sdk-widgets-primitives-Panel-LGno17LT.js +0 -1
  842. package/dist/assets/volter-sdk-widgets-primitives-SectionHeader-Cljf9N48.js +0 -1
  843. package/dist/assets/volter-sdk-widgets-primitives-Text-B4gPva4d.js +0 -1
  844. package/dist/assets/volter-sdk-widgets-primitives-ThemeRootPortal-CXqwIkjb.js +0 -1
  845. package/dist/assets/volter-sdk-widgets-primitives-Tooltip-DjwM-P34.js +0 -1
  846. package/dist/assets/volter-sdk-widgets-primitives-Vec3Input-DWMZJklN.js +0 -1
  847. package/dist/assets/volter-sdk-widgets-primitives-banner-tones-bbpLeXlG.js +0 -1
  848. package/dist/assets/volter-sdk-widgets-primitives-clamp-to-viewport-DB06CYVu.js +0 -1
  849. package/dist/assets/volter-sdk-widgets-primitives-editor-icons-FxdDZA6W.js +0 -1
  850. package/dist/assets/volter-sdk-widgets-primitives-panel-header-styles-CEiBBzGS.js +0 -1
  851. package/dist/assets/volter-sdk-widgets-theme-BysNs-Ha.js +0 -1
  852. package/dist/assets/volter-sdk-widgets-z-index-CQdgvLGF.js +0 -1
  853. package/dist/assets/volter-shared-fontawesome-BiNKLNA8.js +0 -1
  854. package/dist/assets/volter-shared-jsx-dev-runtime-BgDFKHr4.js +0 -1
  855. package/dist/assets/volter-shared-jsx-runtime-B6IXdFn7.js +0 -1
  856. package/dist/assets/volter-shared-react-dom-DOBDwT0W.js +0 -1
  857. package/dist/assets/volter-shared-react-dom-client-DxxNJanr.js +0 -1
  858. package/dist/assets/volter-shared-react-wgC9wOqr.js +0 -1
  859. package/dist/assets/volter-shared-three-CUSZKPWM.js +0 -1
  860. package/dist/assets/worker-DvJ796ja.js +0 -8
  861. package/dist/volter-shared-sdk.json +0 -465
  862. package/src/contributions.d.ts +0 -4
  863. package/starter/add-play/game-state.ts +0 -25
  864. package/starter/add-play/game.tsx +0 -16
  865. package/starter/add-play/model.play.ts +0 -77
  866. package/starter/playable/src/models/canyon.blend +0 -0
  867. package/starter/playable/src/models/canyon.play.ts +0 -107
  868. package/starter/playable/src/models/canyon.py +0 -55
  869. package/starter/playable/src/models/circuit.py +0 -131
  870. package/starter/playable/src/models/complete_environment.py +0 -35
  871. package/starter/playable/src/models/course.ts +0 -12
  872. package/starter/playable/src/models/detail.py +0 -44
  873. package/starter/playable/src/models/driver_details.py +0 -25
  874. package/starter/playable/src/models/environment.py +0 -87
  875. package/starter/playable/src/models/finish_scene.py +0 -13
  876. package/starter/playable/src/models/kart_finish.py +0 -31
  877. package/starter/playable/src/models/polish.py +0 -75
  878. package/starter/playable/src/models/race-state.ts +0 -15
  879. package/starter/playable/src/models/refine.py +0 -69
  880. package/starter/playable/src/models/scene_helpers.py +0 -54
  881. package/starter/playable/src/models/scenery_ao.py +0 -114
  882. package/starter/playable/src/textures/asphalt.png +0 -0
  883. package/starter/playable/src/textures/generate.py +0 -16
  884. package/starter/playable/src/textures/sandstone.png +0 -0
  885. package/starter/playable/src/ui/game.stories.tsx +0 -16
  886. package/starter/playable/src/ui/game.tsx +0 -6
  887. package/starter/playable/src/ui/race-hud.tsx +0 -29
  888. package/starter/playable/src/ui/race-widgets.tsx +0 -29
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2010-2026 Three.js Authors
4
+ * SPDX-License-Identifier: MIT
5
+ */const vd="186",Sd={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Ad={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},Td=0,Cd=1,Id=2,zd=3,Bd=0,Fd=1,kd=2,Pd=3,go=0,ah=1,Rd=2,Od=0,oh=1,Ed=2,Nd=3,Ld=4,Vd=5,Dd=6,hh=100,Ud=101,Wd=102,Gd=103,Hd=104,qd=200,Jd=201,Xd=202,Yd=203,lh=204,ch=205,Zd=206,$d=207,Qd=208,jd=209,Kd=210,tp=211,ep=212,ip=213,sp=214,Jr=0,Xr=1,Yr=2,Yn=3,Zr=4,$r=5,Qr=6,jr=7,nr=0,np=1,rp=2,ap=0,op=1,hp=2,lp=3,cp=4,up=5,dp=6,pp=7,Kr="attached",uh="detached",rr=300,en=301,dh=302,ph=303,fh=304,mh=306,Zn=1e3,$t=1001,$n=1002,Nt=1003,yh=1004,fp=1004,gh=1005,mp=1005,Jt=1006,xh=1007,yp=1007,ar=1008,gp=1008,or=1009,bh=1010,Mh=1011,wh=1012,_h=1013,sn=1014,xi=1015,vh=1016,Sh=1017,Ah=1018,xp=1020,Th=35902,Ch=35899,Ih=1021,zh=1022,Ji=1023,Qn=1026,Bh=1027,xo=1028,bo=1029,Fh=1030,kh=1031,bp=1032,Ph=1033,Rh=33776,Oh=33777,Eh=33778,Nh=33779,Lh=35840,Vh=35841,Dh=35842,Uh=35843,Wh=36196,Gh=37492,Hh=37496,qh=37488,Jh=37489,Xh=37490,Yh=37491,Zh=37808,$h=37809,Qh=37810,jh=37811,Kh=37812,tl=37813,el=37814,il=37815,sl=37816,nl=37817,rl=37818,al=37819,ol=37820,hl=37821,ll=36492,cl=36494,ul=36495,dl=36283,pl=36284,fl=36285,ml=36286,yl=2200,gl=2201,xl=2202,qs=2300,jn=2301,ln=2302,ta=2303,fi=2400,mi=2401,Js=2402,hr=2500,Mo=2501,Mp=0,wp=1,_p=2,bl=3200,vp=3201,Sp=3202,Ap=3203,_i=0,Tp=1,wo="",Dt="srgb",ea="srgb-linear",ia="linear",cn="srgb",Cp="",Ip="rg",zp="ga",Bp=0,un=7680,Fp=7681,kp=7682,Pp=7683,Rp=34055,Op=34056,Ep=5386,Np=512,Lp=513,Vp=514,Dp=515,Up=516,Wp=517,Gp=518,Ml=519,Hp=512,qp=513,Jp=514,Xp=515,Yp=516,Zp=517,$p=518,Qp=519,lr=35044,jp=35048,Kp=35040,tf=35045,ef=35049,sf=35041,nf=35046,rf=35050,af=35042,of="100",hf="300 es",Qt=2e3,bi=2001,lf={COMPUTE:"compute",RENDER:"render"},cf={PERSPECTIVE:"perspective",LINEAR:"linear",FLAT:"flat"},uf={NORMAL:"normal",CENTROID:"centroid",SAMPLE:"sample",FIRST:"first",EITHER:"either"},df={TEXTURE_COMPARE:"depthTextureCompare"},pf={NONE:0,SHARED:1,FULL:2};function wl(l){for(let t=l.length-1;t>=0;--t)if(l[t]>=65535)return!0;return!1}const _l={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function yi(l,t){return new _l[l](t)}function _o(l){return ArrayBuffer.isView(l)&&!(l instanceof DataView)}function Xs(l){return document.createElementNS("http://www.w3.org/1999/xhtml",l)}function ff(){const l=Xs("canvas");return l.style.display="block",l}const sa={};let Te=null;function mf(l){Te=l}function yf(){return Te}function na(...l){const t="THREE."+l.shift();Te?Te("log",t,...l):console.log(t,...l)}function vo(l){const t=l[0];if(typeof t=="string"&&t.startsWith("TSL:")){const e=l[1];e&&e.isStackTrace?l[0]+=" "+e.getLocation():l[1]='Stack trace not available. Enable "THREE.Node.captureStackTrace" to capture stack traces.'}return l}function V(...l){l=vo(l);const t="THREE."+l.shift();if(Te)Te("warn",t,...l);else{const e=l[0];e&&e.isStackTrace?console.warn(e.getError(t)):console.warn(t,...l)}}function X(...l){l=vo(l);const t="THREE."+l.shift();if(Te)Te("error",t,...l);else{const e=l[0];e&&e.isStackTrace?console.error(e.getError(t)):console.error(t,...l)}}function We(...l){const t=l.join(" ");t in sa||(sa[t]=!0,V(...l))}function gf(){return typeof self<"u"&&typeof self.scheduler<"u"&&typeof self.scheduler.yield<"u"?self.scheduler.yield():new Promise(l=>{requestAnimationFrame(l)})}function xf(l,t,e){return new Promise(function(i,s){function n(){switch(l.clientWaitSync(t,l.SYNC_FLUSH_COMMANDS_BIT,0)){case l.WAIT_FAILED:s();break;case l.TIMEOUT_EXPIRED:setTimeout(n,e);break;default:i()}}setTimeout(n,e)})}const bf={[Jr]:Xr,[Yr]:Qr,[Zr]:jr,[Yn]:$r,[Xr]:Jr,[Qr]:Yr,[jr]:Zr,[$r]:Yn};class me{addEventListener(t,e){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[t]===void 0&&(i[t]=[]),i[t].indexOf(e)===-1&&i[t].push(e)}hasEventListener(t,e){const i=this._listeners;return i===void 0?!1:i[t]!==void 0&&i[t].indexOf(e)!==-1}removeEventListener(t,e){const i=this._listeners;if(i===void 0)return;const s=i[t];if(s!==void 0){const n=s.indexOf(e);n!==-1&&s.splice(n,1)}}dispatchEvent(t){const e=this._listeners;if(e===void 0)return;const i=e[t.type];if(i!==void 0){t.target=this;const s=i.slice(0);for(let n=0,r=s.length;n<r;n++)s[n].call(this,t);t.target=null}}}const pt=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let ra=1234567;const Ge=Math.PI/180,Xi=180/Math.PI;function Et(){const l=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(pt[l&255]+pt[l>>8&255]+pt[l>>16&255]+pt[l>>24&255]+"-"+pt[t&255]+pt[t>>8&255]+"-"+pt[t>>16&15|64]+pt[t>>24&255]+"-"+pt[e&63|128]+pt[e>>8&255]+"-"+pt[e>>16&255]+pt[e>>24&255]+pt[i&255]+pt[i>>8&255]+pt[i>>16&255]+pt[i>>24&255]).toLowerCase()}function D(l,t,e){return Math.max(t,Math.min(e,l))}function cr(l,t){return(l%t+t)%t}function vl(l,t,e,i,s){return i+(l-t)*(s-i)/(e-t)}function Sl(l,t,e){return l!==t?(e-l)/(t-l):0}function Wi(l,t,e){return(1-e)*l+e*t}function Al(l,t,e,i){return Wi(l,t,1-Math.exp(-e*i))}function Tl(l,t=1){return t-Math.abs(cr(l,t*2)-t)}function Cl(l,t,e){return l<=t?0:l>=e?1:(l=(l-t)/(e-t),l*l*(3-2*l))}function Il(l,t,e){return l<=t?0:l>=e?1:(l=(l-t)/(e-t),l*l*l*(l*(l*6-15)+10))}function zl(l,t){return l+Math.floor(Math.random()*(t-l+1))}function Bl(l,t){return l+Math.random()*(t-l)}function Fl(l){return l*(.5-Math.random())}function kl(l){l!==void 0&&(ra=l);let t=ra+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function Pl(l){return l*Ge}function Rl(l){return l*Xi}function Ol(l){return l>0&&Number.isInteger(l)&&2**Math.round(Math.log2(l))===l}function El(l){return Math.pow(2,Math.ceil(Math.log(l)/Math.LN2))}function Nl(l){return Math.pow(2,Math.floor(Math.log(l)/Math.LN2))}function Ll(l,t,e,i,s){const n=Math.cos,r=Math.sin,a=n(e/2),o=r(e/2),h=n((t+i)/2),c=r((t+i)/2),u=n((t-i)/2),d=r((t-i)/2),p=n((i-t)/2),f=r((i-t)/2);switch(s){case"XYX":l.set(a*c,o*u,o*d,a*h);break;case"YZY":l.set(o*d,a*c,o*u,a*h);break;case"ZXZ":l.set(o*u,o*d,a*c,a*h);break;case"XZX":l.set(a*c,o*f,o*p,a*h);break;case"YXY":l.set(o*p,a*c,o*f,a*h);break;case"ZYZ":l.set(o*f,o*p,a*c,a*h);break;default:V("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+s)}}function wt(l,t){switch(t.constructor){case Float32Array:return l;case Uint32Array:return l/4294967295;case Uint16Array:return l/65535;case Uint8Array:case Uint8ClampedArray:return l/255;case Int32Array:return Math.max(l/2147483647,-1);case Int16Array:return Math.max(l/32767,-1);case Int8Array:return Math.max(l/127,-1);default:throw new Error("THREE.MathUtils: Invalid component type.")}}function W(l,t){switch(t.constructor){case Float32Array:return l;case Uint32Array:return Math.round(l*4294967295);case Uint16Array:return Math.round(l*65535);case Uint8Array:case Uint8ClampedArray:return Math.round(l*255);case Int32Array:return Math.round(l*2147483647);case Int16Array:return Math.round(l*32767);case Int8Array:return Math.round(l*127);default:throw new Error("THREE.MathUtils: Invalid component type.")}}const Mf={DEG2RAD:Ge,RAD2DEG:Xi,generateUUID:Et,clamp:D,euclideanModulo:cr,mapLinear:vl,inverseLerp:Sl,lerp:Wi,damp:Al,pingpong:Tl,smoothstep:Cl,smootherstep:Il,randInt:zl,randFloat:Bl,randFloatSpread:Fl,seededRandom:kl,degToRad:Pl,radToDeg:Rl,isPowerOfTwo:Ol,ceilPowerOfTwo:El,floorPowerOfTwo:Nl,setQuaternionFromProperEuler:Ll,normalize:W,denormalize:wt};class I{static{I.prototype.isVector2=!0}constructor(t=0,e=0){this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("THREE.Vector2: index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("THREE.Vector2: index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,i=this.y,s=t.elements;return this.x=s[0]*e+s[3]*i+s[6],this.y=s[1]*e+s[4]*i+s[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=D(this.x,t.x,e.x),this.y=D(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=D(this.x,t,e),this.y=D(this.y,t,e),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(D(i,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const i=this.dot(t)/e;return Math.acos(D(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,i=this.y-t.y;return e*e+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const i=Math.cos(e),s=Math.sin(e),n=this.x-t.x,r=this.y-t.y;return this.x=n*i-r*s+t.x,this.y=n*s+r*i+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Tt{constructor(t=0,e=0,i=0,s=1){this.isQuaternion=!0,this._x=t,this._y=e,this._z=i,this._w=s}static slerpFlat(t,e,i,s,n,r,a){let o=i[s+0],h=i[s+1],c=i[s+2],u=i[s+3],d=n[r+0],p=n[r+1],f=n[r+2],m=n[r+3];if(u!==m||o!==d||h!==p||c!==f){let y=o*d+h*p+c*f+u*m;y<0&&(d=-d,p=-p,f=-f,m=-m,y=-y);let g=1-a;if(y<.9995){const x=Math.acos(y),b=Math.sin(x);g=Math.sin(g*x)/b,a=Math.sin(a*x)/b,o=o*g+d*a,h=h*g+p*a,c=c*g+f*a,u=u*g+m*a}else{o=o*g+d*a,h=h*g+p*a,c=c*g+f*a,u=u*g+m*a;const x=1/Math.sqrt(o*o+h*h+c*c+u*u);o*=x,h*=x,c*=x,u*=x}}t[e]=o,t[e+1]=h,t[e+2]=c,t[e+3]=u}static multiplyQuaternionsFlat(t,e,i,s,n,r){const a=i[s],o=i[s+1],h=i[s+2],c=i[s+3],u=n[r],d=n[r+1],p=n[r+2],f=n[r+3];return t[e]=a*f+c*u+o*p-h*d,t[e+1]=o*f+c*d+h*u-a*p,t[e+2]=h*f+c*p+a*d-o*u,t[e+3]=c*f-a*u-o*d-h*p,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,i,s){return this._x=t,this._y=e,this._z=i,this._w=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const i=t._x,s=t._y,n=t._z,r=t._order,a=Math.cos,o=Math.sin,h=a(i/2),c=a(s/2),u=a(n/2),d=o(i/2),p=o(s/2),f=o(n/2);switch(r){case"XYZ":this._x=d*c*u+h*p*f,this._y=h*p*u-d*c*f,this._z=h*c*f+d*p*u,this._w=h*c*u-d*p*f;break;case"YXZ":this._x=d*c*u+h*p*f,this._y=h*p*u-d*c*f,this._z=h*c*f-d*p*u,this._w=h*c*u+d*p*f;break;case"ZXY":this._x=d*c*u-h*p*f,this._y=h*p*u+d*c*f,this._z=h*c*f+d*p*u,this._w=h*c*u-d*p*f;break;case"ZYX":this._x=d*c*u-h*p*f,this._y=h*p*u+d*c*f,this._z=h*c*f-d*p*u,this._w=h*c*u+d*p*f;break;case"YZX":this._x=d*c*u+h*p*f,this._y=h*p*u+d*c*f,this._z=h*c*f-d*p*u,this._w=h*c*u-d*p*f;break;case"XZY":this._x=d*c*u-h*p*f,this._y=h*p*u-d*c*f,this._z=h*c*f+d*p*u,this._w=h*c*u+d*p*f;break;default:V("Quaternion: .setFromEuler() encountered an unknown order: "+r)}return e===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const i=e/2,s=Math.sin(i);return this._x=t.x*s,this._y=t.y*s,this._z=t.z*s,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,i=e[0],s=e[4],n=e[8],r=e[1],a=e[5],o=e[9],h=e[2],c=e[6],u=e[10],d=i+a+u;if(d>0){const p=.5/Math.sqrt(d+1);this._w=.25/p,this._x=(c-o)*p,this._y=(n-h)*p,this._z=(r-s)*p}else if(i>a&&i>u){const p=2*Math.sqrt(1+i-a-u);this._w=(c-o)/p,this._x=.25*p,this._y=(s+r)/p,this._z=(n+h)/p}else if(a>u){const p=2*Math.sqrt(1+a-i-u);this._w=(n-h)/p,this._x=(s+r)/p,this._y=.25*p,this._z=(o+c)/p}else{const p=2*Math.sqrt(1+u-i-a);this._w=(r-s)/p,this._x=(n+h)/p,this._y=(o+c)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let i=t.dot(e)+1;return i<1e-8?(i=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=i):(this._x=0,this._y=-t.z,this._z=t.y,this._w=i)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=i),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(D(this.dot(t),-1,1)))}rotateTowards(t,e){const i=this.angleTo(t);if(i===0)return this;const s=Math.min(1,e/i);return this.slerp(t,s),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const i=t._x,s=t._y,n=t._z,r=t._w,a=e._x,o=e._y,h=e._z,c=e._w;return this._x=i*c+r*a+s*h-n*o,this._y=s*c+r*o+n*a-i*h,this._z=n*c+r*h+i*o-s*a,this._w=r*c-i*a-s*o-n*h,this._onChangeCallback(),this}slerp(t,e){let i=t._x,s=t._y,n=t._z,r=t._w,a=this.dot(t);a<0&&(i=-i,s=-s,n=-n,r=-r,a=-a);let o=1-e;if(a<.9995){const h=Math.acos(a),c=Math.sin(h);o=Math.sin(o*h)/c,e=Math.sin(e*h)/c,this._x=this._x*o+i*e,this._y=this._y*o+s*e,this._z=this._z*o+n*e,this._w=this._w*o+r*e,this._onChangeCallback()}else this._x=this._x*o+i*e,this._y=this._y*o+s*e,this._z=this._z*o+n*e,this._w=this._w*o+r*e,this.normalize();return this}slerpQuaternions(t,e,i){return this.copy(t).slerp(e,i)}random(){const t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),i=Math.random(),s=Math.sqrt(1-i),n=Math.sqrt(i);return this.set(s*Math.sin(t),s*Math.cos(t),n*Math.sin(e),n*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class w{static{w.prototype.isVector3=!0}constructor(t=0,e=0,i=0){this.x=t,this.y=e,this.z=i}set(t,e,i){return i===void 0&&(i=this.z),this.x=t,this.y=e,this.z=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("THREE.Vector3: index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("THREE.Vector3: index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(aa.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(aa.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,i=this.y,s=this.z,n=t.elements;return this.x=n[0]*e+n[3]*i+n[6]*s,this.y=n[1]*e+n[4]*i+n[7]*s,this.z=n[2]*e+n[5]*i+n[8]*s,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,i=this.y,s=this.z,n=t.elements,r=1/(n[3]*e+n[7]*i+n[11]*s+n[15]);return this.x=(n[0]*e+n[4]*i+n[8]*s+n[12])*r,this.y=(n[1]*e+n[5]*i+n[9]*s+n[13])*r,this.z=(n[2]*e+n[6]*i+n[10]*s+n[14])*r,this}applyQuaternion(t){const e=this.x,i=this.y,s=this.z,n=t.x,r=t.y,a=t.z,o=t.w,h=2*(r*s-a*i),c=2*(a*e-n*s),u=2*(n*i-r*e);return this.x=e+o*h+r*u-a*c,this.y=i+o*c+a*h-n*u,this.z=s+o*u+n*c-r*h,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,i=this.y,s=this.z,n=t.elements;return this.x=n[0]*e+n[4]*i+n[8]*s,this.y=n[1]*e+n[5]*i+n[9]*s,this.z=n[2]*e+n[6]*i+n[10]*s,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=D(this.x,t.x,e.x),this.y=D(this.y,t.y,e.y),this.z=D(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=D(this.x,t,e),this.y=D(this.y,t,e),this.z=D(this.z,t,e),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(D(i,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this.z=t.z+(e.z-t.z)*i,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const i=t.x,s=t.y,n=t.z,r=e.x,a=e.y,o=e.z;return this.x=s*o-n*a,this.y=n*r-i*o,this.z=i*a-s*r,this}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0);const i=t.dot(this)/e;return this.copy(t).multiplyScalar(i)}projectOnPlane(t){return dn.copy(this).projectOnVector(t),this.sub(dn)}reflect(t){return this.sub(dn.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const i=this.dot(t)/e;return Math.acos(D(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,i=this.y-t.y,s=this.z-t.z;return e*e+i*i+s*s}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,i){const s=Math.sin(e)*t;return this.x=s*Math.sin(i),this.y=Math.cos(e)*t,this.z=s*Math.cos(i),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,i){return this.x=t*Math.sin(e),this.y=i,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),i=this.setFromMatrixColumn(t,1).length(),s=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=i,this.z=s,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,e*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,e=Math.random()*2-1,i=Math.sqrt(1-e*e);return this.x=i*Math.cos(t),this.y=e,this.z=i*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const dn=new w,aa=new Tt;class ee{static{ee.prototype.isMatrix3=!0}constructor(t,e,i,s,n,r,a,o,h){this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,e,i,s,n,r,a,o,h)}set(t,e,i,s,n,r,a,o,h){const c=this.elements;return c[0]=t,c[1]=s,c[2]=a,c[3]=e,c[4]=n,c[5]=o,c[6]=i,c[7]=r,c[8]=h,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this}extractBasis(t,e,i){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const i=t.elements,s=e.elements,n=this.elements,r=i[0],a=i[3],o=i[6],h=i[1],c=i[4],u=i[7],d=i[2],p=i[5],f=i[8],m=s[0],y=s[3],g=s[6],x=s[1],b=s[4],M=s[7],_=s[2],v=s[5],A=s[8];return n[0]=r*m+a*x+o*_,n[3]=r*y+a*b+o*v,n[6]=r*g+a*M+o*A,n[1]=h*m+c*x+u*_,n[4]=h*y+c*b+u*v,n[7]=h*g+c*M+u*A,n[2]=d*m+p*x+f*_,n[5]=d*y+p*b+f*v,n[8]=d*g+p*M+f*A,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){const t=this.elements,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],a=t[5],o=t[6],h=t[7],c=t[8];return e*r*c-e*a*h-i*n*c+i*a*o+s*n*h-s*r*o}invert(){const t=this.elements,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],a=t[5],o=t[6],h=t[7],c=t[8],u=c*r-a*h,d=a*o-c*n,p=h*n-r*o,f=e*u+i*d+s*p;if(f===0)return this.set(0,0,0,0,0,0,0,0,0);const m=1/f;return t[0]=u*m,t[1]=(s*h-c*i)*m,t[2]=(a*i-s*r)*m,t[3]=d*m,t[4]=(c*e-s*o)*m,t[5]=(s*n-a*e)*m,t[6]=p*m,t[7]=(i*o-h*e)*m,t[8]=(r*e-i*n)*m,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,i,s,n,r,a){const o=Math.cos(n),h=Math.sin(n);return this.set(i*o,i*h,-i*(o*r+h*a)+r+t,-s*h,s*o,-s*(-h*r+o*a)+a+e,0,0,1),this}scale(t,e){return We("Matrix3: .scale() is deprecated. Use .makeScale() instead."),this.premultiply(pn.makeScale(t,e)),this}rotate(t){return We("Matrix3: .rotate() is deprecated. Use .makeRotation() instead."),this.premultiply(pn.makeRotation(-t)),this}translate(t,e){return We("Matrix3: .translate() is deprecated. Use .makeTranslation() instead."),this.premultiply(pn.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,i,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){const e=this.elements,i=t.elements;for(let s=0;s<9;s++)if(e[s]!==i[s])return!1;return!0}fromArray(t,e=0){for(let i=0;i<9;i++)this.elements[i]=t[i+e];return this}toArray(t=[],e=0){const i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t}clone(){return new this.constructor().fromArray(this.elements)}}const pn=new ee,oa=new ee().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),ha=new ee().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function Vl(){const l={enabled:!0,workingColorSpace:ea,spaces:{},convert:function(s,n,r){return this.enabled===!1||n===r||!n||!r||(this.spaces[n].transfer===cn&&(s.r=fe(s.r),s.g=fe(s.g),s.b=fe(s.b)),this.spaces[n].primaries!==this.spaces[r].primaries&&(s.applyMatrix3(this.spaces[n].toXYZ),s.applyMatrix3(this.spaces[r].fromXYZ)),this.spaces[r].transfer===cn&&(s.r=gi(s.r),s.g=gi(s.g),s.b=gi(s.b))),s},workingToColorSpace:function(s,n){return this.convert(s,this.workingColorSpace,n)},colorSpaceToWorking:function(s,n){return this.convert(s,n,this.workingColorSpace)},getPrimaries:function(s){return this.spaces[s].primaries},getTransfer:function(s){return s===wo?ia:this.spaces[s].transfer},getToneMappingMode:function(s){return this.spaces[s].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(s,n=this.workingColorSpace){return s.fromArray(this.spaces[n].luminanceCoefficients)},define:function(s){Object.assign(this.spaces,s)},_getMatrix:function(s,n,r){return s.copy(this.spaces[n].toXYZ).multiply(this.spaces[r].fromXYZ)},_getDrawingBufferColorSpace:function(s){return this.spaces[s].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(s=this.workingColorSpace){return this.spaces[s].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(s,n){return We("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),l.workingToColorSpace(s,n)},toWorkingColorSpace:function(s,n){return We("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),l.colorSpaceToWorking(s,n)}},t=[.64,.33,.3,.6,.15,.06],e=[.2126,.7152,.0722],i=[.3127,.329];return l.define({[ea]:{primaries:t,whitePoint:i,transfer:ia,toXYZ:oa,fromXYZ:ha,luminanceCoefficients:e,workingColorSpaceConfig:{unpackColorSpace:Dt},outputColorSpaceConfig:{drawingBufferColorSpace:Dt}},[Dt]:{primaries:t,whitePoint:i,transfer:cn,toXYZ:oa,fromXYZ:ha,luminanceCoefficients:e,outputColorSpaceConfig:{drawingBufferColorSpace:Dt}}}),l}const Rt=Vl();function fe(l){return l<.04045?l*.0773993808:Math.pow(l*.9478672986+.0521327014,2.4)}function gi(l){return l<.0031308?l*12.92:1.055*Math.pow(l,.41666)-.055}let Ye;class Dl{static getDataURL(t,e="image/png"){if(/^data:/i.test(t.src)||typeof HTMLCanvasElement>"u")return t.src;let i;if(t instanceof HTMLCanvasElement)i=t;else{Ye===void 0&&(Ye=Xs("canvas")),Ye.width=t.width,Ye.height=t.height;const s=Ye.getContext("2d");t instanceof ImageData?s.putImageData(t,0,0):s.drawImage(t,0,0,t.width,t.height),i=Ye}return i.toDataURL(e)}static sRGBToLinear(t){if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap){const e=Xs("canvas");e.width=t.width,e.height=t.height;const i=e.getContext("2d");i.drawImage(t,0,0,t.width,t.height);const s=i.getImageData(0,0,t.width,t.height),n=s.data;for(let r=0;r<n.length;r++)n[r]=fe(n[r]/255)*255;return i.putImageData(s,0,0),e}else if(t.data){const e=t.data.slice(0);for(let i=0;i<e.length;i++)e instanceof Uint8Array||e instanceof Uint8ClampedArray?e[i]=Math.floor(fe(e[i]/255)*255):e[i]=fe(e[i]);return{data:e,width:t.width,height:t.height}}else return V("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}}let Ul=0;class Ae{constructor(t=null){this.isTextureSource=!0,Object.defineProperty(this,"id",{value:Ul++}),this.uuid=Et(),this.data=t,this.dataReady=!0,this.version=0}getSize(t){const e=this.data;return typeof HTMLVideoElement<"u"&&e instanceof HTMLVideoElement?t.set(e.videoWidth,e.videoHeight,0):typeof VideoFrame<"u"&&e instanceof VideoFrame?t.set(e.displayWidth,e.displayHeight,0):e!==null?t.set(e.width,e.height,e.depth||0):t.set(0,0,0),t}set needsUpdate(t){t===!0&&this.version++}toJSON(t){const e=t===void 0||typeof t=="string";if(!e&&t.images[this.uuid]!==void 0)return t.images[this.uuid];const i={uuid:this.uuid,url:""},s=this.data;if(s!==null){let n;if(Array.isArray(s)){n=[];for(let r=0,a=s.length;r<a;r++)s[r].isDataTexture?n.push(fn(s[r].image)):n.push(fn(s[r]))}else n=fn(s);i.url=n}return e||(t.images[this.uuid]=i),i}}function fn(l){return typeof HTMLImageElement<"u"&&l instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&l instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&l instanceof ImageBitmap?Dl.getDataURL(l):l.data?{data:Array.from(l.data),width:l.width,height:l.height,type:l.data.constructor.name}:(V("Texture: Unable to serialize Texture."),{})}class wf extends Ae{constructor(t=null){We('Source: "Source" has been renamed to "TextureSource". Please update your code to use "THREE.TextureSource" instead.'),super(t),this.isSource=!0}}let Wl=0;const mn=new w;class ht extends me{constructor(t=ht.DEFAULT_IMAGE,e=ht.DEFAULT_MAPPING,i=$t,s=$t,n=Jt,r=ar,a=Ji,o=or,h=ht.DEFAULT_ANISOTROPY,c=wo){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:Wl++}),this.uuid=Et(),this.name="",this.source=new Ae(t),this.mipmaps=[],this.mapping=e,this.channel=0,this.wrapS=i,this.wrapT=s,this.magFilter=n,this.minFilter=r,this.anisotropy=h,this.format=a,this.internalFormat=null,this.type=o,this.offset=new I(0,0),this.repeat=new I(1,1),this.center=new I(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new ee,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=c,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(t&&t.depth&&t.depth>1),this.pmremVersion=0,this.normalized=!1}get width(){return this.source.getSize(mn).x}get height(){return this.source.getSize(mn).y}get depth(){return this.source.getSize(mn).z}get image(){return this.source.data}set image(t){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.normalized=t.normalized,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.renderTarget=t.renderTarget,this.isRenderTargetTexture=t.isRenderTargetTexture,this.isArrayTexture=t.isArrayTexture,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}setValues(t){for(const e in t){const i=t[e];if(i===void 0){V(`Texture.setValues(): parameter '${e}' has value of undefined.`);continue}const s=this[e];if(s===void 0){V(`Texture.setValues(): property '${e}' does not exist.`);continue}s&&i&&s.isVector2&&i.isVector2||s&&i&&s.isVector3&&i.isVector3||s&&i&&s.isMatrix3&&i.isMatrix3?s.copy(i):this[e]=i}}toJSON(t){const e=t===void 0||typeof t=="string";if(!e&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];const i={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,normalized:this.normalized,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(i.userData=this.userData),e||(t.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==rr)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Zn:t.x=t.x-Math.floor(t.x);break;case $t:t.x=t.x<0?0:1;break;case $n:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case Zn:t.y=t.y-Math.floor(t.y);break;case $t:t.y=t.y<0?0:1;break;case $n:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}}ht.DEFAULT_IMAGE=null;ht.DEFAULT_MAPPING=rr;ht.DEFAULT_ANISOTROPY=1;class Ct{static{Ct.prototype.isVector4=!0}constructor(t=0,e=0,i=0,s=1){this.x=t,this.y=e,this.z=i,this.w=s}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,i,s){return this.x=t,this.y=e,this.z=i,this.w=s,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("THREE.Vector4: index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("THREE.Vector4: index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,i=this.y,s=this.z,n=this.w,r=t.elements;return this.x=r[0]*e+r[4]*i+r[8]*s+r[12]*n,this.y=r[1]*e+r[5]*i+r[9]*s+r[13]*n,this.z=r[2]*e+r[6]*i+r[10]*s+r[14]*n,this.w=r[3]*e+r[7]*i+r[11]*s+r[15]*n,this}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this.w/=t.w,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,i,s,n;const o=t.elements,h=o[0],c=o[4],u=o[8],d=o[1],p=o[5],f=o[9],m=o[2],y=o[6],g=o[10];if(Math.abs(c-d)<.01&&Math.abs(u-m)<.01&&Math.abs(f-y)<.01){if(Math.abs(c+d)<.1&&Math.abs(u+m)<.1&&Math.abs(f+y)<.1&&Math.abs(h+p+g-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const b=(h+1)/2,M=(p+1)/2,_=(g+1)/2,v=(c+d)/4,A=(u+m)/4,S=(f+y)/4;return b>M&&b>_?b<.01?(i=0,s=.707106781,n=.707106781):(i=Math.sqrt(b),s=v/i,n=A/i):M>_?M<.01?(i=.707106781,s=0,n=.707106781):(s=Math.sqrt(M),i=v/s,n=S/s):_<.01?(i=.707106781,s=.707106781,n=0):(n=Math.sqrt(_),i=A/n,s=S/n),this.set(i,s,n,e),this}let x=Math.sqrt((y-f)*(y-f)+(u-m)*(u-m)+(d-c)*(d-c));return Math.abs(x)<.001&&(x=1),this.x=(y-f)/x,this.y=(u-m)/x,this.z=(d-c)/x,this.w=Math.acos((h+p+g-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=D(this.x,t.x,e.x),this.y=D(this.y,t.y,e.y),this.z=D(this.z,t.z,e.z),this.w=D(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=D(this.x,t,e),this.y=D(this.y,t,e),this.z=D(this.z,t,e),this.w=D(this.w,t,e),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(D(i,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this.z=t.z+(e.z-t.z)*i,this.w=t.w+(e.w-t.w)*i,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class So extends me{constructor(t=1,e=1,i={}){super(),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Jt,depthBuffer:!0,stencilBuffer:!1,resolveColorBuffer:!0,resolveDepthBuffer:!0,resolveStencilBuffer:!0,storeMultisampledColorBuffer:!0,storeMultisampledDepthBuffer:!0,storeMultisampledStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1,useArrayDepthTexture:!1},i),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=i.depth,this.scissor=new Ct(0,0,t,e),this.scissorTest=!1,this.viewport=new Ct(0,0,t,e),this.textures=[];const s={width:t,height:e,depth:i.depth},n=new ht(s),r=i.count;for(let a=0;a<r;a++)this.textures[a]=n.clone(),this.textures[a].isRenderTargetTexture=!0,this.textures[a].renderTarget=this;this._setTextureOptions(i),this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.resolveColorBuffer=i.resolveColorBuffer,this.resolveDepthBuffer=i.resolveDepthBuffer,this.resolveStencilBuffer=i.resolveStencilBuffer,this.storeMultisampledColorBuffer=i.storeMultisampledColorBuffer,this.storeMultisampledDepthBuffer=i.storeMultisampledDepthBuffer,this.storeMultisampledStencilBuffer=i.storeMultisampledStencilBuffer,this._depthTexture=null,this.depthTexture=i.depthTexture,this.samples=i.samples,this.multiview=i.multiview,this.useArrayDepthTexture=i.useArrayDepthTexture}_setTextureOptions(t={}){const e={minFilter:Jt,generateMipmaps:!1,flipY:!1,internalFormat:null};t.mapping!==void 0&&(e.mapping=t.mapping),t.wrapS!==void 0&&(e.wrapS=t.wrapS),t.wrapT!==void 0&&(e.wrapT=t.wrapT),t.wrapR!==void 0&&(e.wrapR=t.wrapR),t.magFilter!==void 0&&(e.magFilter=t.magFilter),t.minFilter!==void 0&&(e.minFilter=t.minFilter),t.format!==void 0&&(e.format=t.format),t.type!==void 0&&(e.type=t.type),t.anisotropy!==void 0&&(e.anisotropy=t.anisotropy),t.colorSpace!==void 0&&(e.colorSpace=t.colorSpace),t.flipY!==void 0&&(e.flipY=t.flipY),t.generateMipmaps!==void 0&&(e.generateMipmaps=t.generateMipmaps),t.internalFormat!==void 0&&(e.internalFormat=t.internalFormat);for(let i=0;i<this.textures.length;i++)this.textures[i].setValues(e)}get texture(){return this.textures[0]}set texture(t){this.textures[0]=t}set depthTexture(t){this._depthTexture!==null&&this._depthTexture.renderTarget===this&&(this._depthTexture.renderTarget=null),t!==null&&t.renderTarget===null&&(t.renderTarget=this),this._depthTexture=t}get depthTexture(){return this._depthTexture}setSize(t,e,i=1){if(this.width!==t||this.height!==e||this.depth!==i){this.width=t,this.height=e,this.depth=i;for(let s=0,n=this.textures.length;s<n;s++)this.textures[s].image.width=t,this.textures[s].image.height=e,this.textures[s].image.depth=i,this.textures[s].isData3DTexture!==!0&&(this.textures[s].isArrayTexture=this.textures[s].image.depth>1);this.dispose()}this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)}clone(){return new this.constructor().copy(this)}copy(t){this.width=t.width,this.height=t.height,this.depth=t.depth,this.scissor.copy(t.scissor),this.scissorTest=t.scissorTest,this.viewport.copy(t.viewport),this.textures.length=0;for(let e=0,i=t.textures.length;e<i;e++){this.textures[e]=t.textures[e].clone(),this.textures[e].isRenderTargetTexture=!0,this.textures[e].renderTarget=this;const s=Object.assign({},t.textures[e].image);this.textures[e].source=new Ae(s)}if(this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.resolveColorBuffer=t.resolveColorBuffer,this.resolveDepthBuffer=t.resolveDepthBuffer,this.resolveStencilBuffer=t.resolveStencilBuffer,this.storeMultisampledColorBuffer=t.storeMultisampledColorBuffer,this.storeMultisampledDepthBuffer=t.storeMultisampledDepthBuffer,this.storeMultisampledStencilBuffer=t.storeMultisampledStencilBuffer,t.depthTexture!==null)if(t.depthTexture.renderTarget===t){const e=t.depthTexture.clone();e.renderTarget=null,this.depthTexture=e}else this.depthTexture=t.depthTexture;return this.samples=t.samples,this.multiview=t.multiview,this.useArrayDepthTexture=t.useArrayDepthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Ao extends So{constructor(t=1,e=1,i={}){super(t,e,i),this.isWebGLRenderTarget=!0}}class Gl extends ht{constructor(t=null,e=1,i=1,s=1){super(null),this.isDataArrayTexture=!0,this.image={data:t,width:e,height:i,depth:s},this.magFilter=Nt,this.minFilter=Nt,this.wrapR=$t,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}copy(t){return super.copy(t),this.wrapR=t.wrapR,this}addLayerUpdate(t){this.layerUpdates.add(t)}clearLayerUpdates(){this.layerUpdates.clear()}}class _f extends Ao{constructor(t=1,e=1,i=1,s={}){super(t,e,s),this.isWebGLArrayRenderTarget=!0,this.depth=i,this.texture=new Gl(null,t,e,i),this._setTextureOptions(s),this.texture.isRenderTargetTexture=!0}}class To extends ht{constructor(t=null,e=1,i=1,s=1){super(null),this.isData3DTexture=!0,this.image={data:t,width:e,height:i,depth:s},this.magFilter=Nt,this.minFilter=Nt,this.wrapR=$t,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}copy(t){return super.copy(t),this.wrapR=t.wrapR,this}}class vf extends Ao{constructor(t=1,e=1,i=1,s={}){super(t,e,s),this.isWebGL3DRenderTarget=!0,this.depth=i,this.texture=new To(null,t,e,i),this._setTextureOptions(s),this.texture.isRenderTargetTexture=!0}}class G{static{G.prototype.isMatrix4=!0}constructor(t,e,i,s,n,r,a,o,h,c,u,d,p,f,m,y){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,e,i,s,n,r,a,o,h,c,u,d,p,f,m,y)}set(t,e,i,s,n,r,a,o,h,c,u,d,p,f,m,y){const g=this.elements;return g[0]=t,g[4]=e,g[8]=i,g[12]=s,g[1]=n,g[5]=r,g[9]=a,g[13]=o,g[2]=h,g[6]=c,g[10]=u,g[14]=d,g[3]=p,g[7]=f,g[11]=m,g[15]=y,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new G().fromArray(this.elements)}copy(t){const e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this}copyPosition(t){const e=this.elements,i=t.elements;return e[12]=i[12],e[13]=i[13],e[14]=i[14],this}setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,i){return this.determinantAffine()===0?(t.set(1,0,0),e.set(0,1,0),i.set(0,0,1),this):(t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this)}makeBasis(t,e,i){return this.set(t.x,e.x,i.x,0,t.y,e.y,i.y,0,t.z,e.z,i.z,0,0,0,0,1),this}extractRotation(t){if(t.determinantAffine()===0)return this.identity();const e=this.elements,i=t.elements,s=1/Ze.setFromMatrixColumn(t,0).length(),n=1/Ze.setFromMatrixColumn(t,1).length(),r=1/Ze.setFromMatrixColumn(t,2).length();return e[0]=i[0]*s,e[1]=i[1]*s,e[2]=i[2]*s,e[3]=0,e[4]=i[4]*n,e[5]=i[5]*n,e[6]=i[6]*n,e[7]=0,e[8]=i[8]*r,e[9]=i[9]*r,e[10]=i[10]*r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.elements,i=t.x,s=t.y,n=t.z,r=Math.cos(i),a=Math.sin(i),o=Math.cos(s),h=Math.sin(s),c=Math.cos(n),u=Math.sin(n);if(t.order==="XYZ"){const d=r*c,p=r*u,f=a*c,m=a*u;e[0]=o*c,e[4]=-o*u,e[8]=h,e[1]=p+f*h,e[5]=d-m*h,e[9]=-a*o,e[2]=m-d*h,e[6]=f+p*h,e[10]=r*o}else if(t.order==="YXZ"){const d=o*c,p=o*u,f=h*c,m=h*u;e[0]=d+m*a,e[4]=f*a-p,e[8]=r*h,e[1]=r*u,e[5]=r*c,e[9]=-a,e[2]=p*a-f,e[6]=m+d*a,e[10]=r*o}else if(t.order==="ZXY"){const d=o*c,p=o*u,f=h*c,m=h*u;e[0]=d-m*a,e[4]=-r*u,e[8]=f+p*a,e[1]=p+f*a,e[5]=r*c,e[9]=m-d*a,e[2]=-r*h,e[6]=a,e[10]=r*o}else if(t.order==="ZYX"){const d=r*c,p=r*u,f=a*c,m=a*u;e[0]=o*c,e[4]=f*h-p,e[8]=d*h+m,e[1]=o*u,e[5]=m*h+d,e[9]=p*h-f,e[2]=-h,e[6]=a*o,e[10]=r*o}else if(t.order==="YZX"){const d=r*o,p=r*h,f=a*o,m=a*h;e[0]=o*c,e[4]=m-d*u,e[8]=f*u+p,e[1]=u,e[5]=r*c,e[9]=-a*c,e[2]=-h*c,e[6]=p*u+f,e[10]=d-m*u}else if(t.order==="XZY"){const d=r*o,p=r*h,f=a*o,m=a*h;e[0]=o*c,e[4]=-u,e[8]=h*c,e[1]=d*u+m,e[5]=r*c,e[9]=p*u-f,e[2]=f*u-p,e[6]=a*c,e[10]=m*u+d}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(Hl,t,ql)}lookAt(t,e,i){const s=this.elements;return kt.subVectors(t,e),kt.lengthSq()===0&&(kt.z=1),kt.normalize(),be.crossVectors(i,kt),be.lengthSq()===0&&(Math.abs(i.z)===1?kt.x+=1e-4:kt.z+=1e-4,kt.normalize(),be.crossVectors(i,kt)),be.normalize(),is.crossVectors(kt,be),s[0]=be.x,s[4]=is.x,s[8]=kt.x,s[1]=be.y,s[5]=is.y,s[9]=kt.y,s[2]=be.z,s[6]=is.z,s[10]=kt.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const i=t.elements,s=e.elements,n=this.elements,r=i[0],a=i[4],o=i[8],h=i[12],c=i[1],u=i[5],d=i[9],p=i[13],f=i[2],m=i[6],y=i[10],g=i[14],x=i[3],b=i[7],M=i[11],_=i[15],v=s[0],A=s[4],S=s[8],T=s[12],C=s[1],B=s[5],R=s[9],L=s[13],J=s[2],N=s[6],Q=s[10],K=s[14],ut=s[3],j=s[7],tt=s[11],et=s[15];return n[0]=r*v+a*C+o*J+h*ut,n[4]=r*A+a*B+o*N+h*j,n[8]=r*S+a*R+o*Q+h*tt,n[12]=r*T+a*L+o*K+h*et,n[1]=c*v+u*C+d*J+p*ut,n[5]=c*A+u*B+d*N+p*j,n[9]=c*S+u*R+d*Q+p*tt,n[13]=c*T+u*L+d*K+p*et,n[2]=f*v+m*C+y*J+g*ut,n[6]=f*A+m*B+y*N+g*j,n[10]=f*S+m*R+y*Q+g*tt,n[14]=f*T+m*L+y*K+g*et,n[3]=x*v+b*C+M*J+_*ut,n[7]=x*A+b*B+M*N+_*j,n[11]=x*S+b*R+M*Q+_*tt,n[15]=x*T+b*L+M*K+_*et,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){const t=this.elements,e=t[0],i=t[4],s=t[8],n=t[12],r=t[1],a=t[5],o=t[9],h=t[13],c=t[2],u=t[6],d=t[10],p=t[14],f=t[3],m=t[7],y=t[11],g=t[15],x=o*p-h*d,b=a*p-h*u,M=a*d-o*u,_=r*p-h*c,v=r*d-o*c,A=r*u-a*c;return e*(m*x-y*b+g*M)-i*(f*x-y*_+g*v)+s*(f*b-m*_+g*A)-n*(f*M-m*v+y*A)}determinantAffine(){const t=this.elements,e=t[0],i=t[4],s=t[8],n=t[1],r=t[5],a=t[9],o=t[2],h=t[6],c=t[10];return e*(r*c-a*h)-i*(n*c-a*o)+s*(n*h-r*o)}transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,i){const s=this.elements;return t.isVector3?(s[12]=t.x,s[13]=t.y,s[14]=t.z):(s[12]=t,s[13]=e,s[14]=i),this}invert(){const t=this.elements,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],a=t[5],o=t[6],h=t[7],c=t[8],u=t[9],d=t[10],p=t[11],f=t[12],m=t[13],y=t[14],g=t[15],x=e*a-i*r,b=e*o-s*r,M=e*h-n*r,_=i*o-s*a,v=i*h-n*a,A=s*h-n*o,S=c*m-u*f,T=c*y-d*f,C=c*g-p*f,B=u*y-d*m,R=u*g-p*m,L=d*g-p*y,J=x*L-b*R+M*B+_*C-v*T+A*S;if(J===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const N=1/J;return t[0]=(a*L-o*R+h*B)*N,t[1]=(s*R-i*L-n*B)*N,t[2]=(m*A-y*v+g*_)*N,t[3]=(d*v-u*A-p*_)*N,t[4]=(o*C-r*L-h*T)*N,t[5]=(e*L-s*C+n*T)*N,t[6]=(y*M-f*A-g*b)*N,t[7]=(c*A-d*M+p*b)*N,t[8]=(r*R-a*C+h*S)*N,t[9]=(i*C-e*R-n*S)*N,t[10]=(f*v-m*M+g*x)*N,t[11]=(u*M-c*v-p*x)*N,t[12]=(a*T-r*B-o*S)*N,t[13]=(e*B-i*T+s*S)*N,t[14]=(m*b-f*_-y*x)*N,t[15]=(c*_-u*b+d*x)*N,this}scale(t){const e=this.elements,i=t.x,s=t.y,n=t.z;return e[0]*=i,e[4]*=s,e[8]*=n,e[1]*=i,e[5]*=s,e[9]*=n,e[2]*=i,e[6]*=s,e[10]*=n,e[3]*=i,e[7]*=s,e[11]*=n,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],s=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,i,s))}makeTranslation(t,e,i){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,i,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),i=Math.sin(t);return this.set(1,0,0,0,0,e,-i,0,0,i,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,0,i,0,0,1,0,0,-i,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const i=Math.cos(e),s=Math.sin(e),n=1-i,r=t.x,a=t.y,o=t.z,h=n*r,c=n*a;return this.set(h*r+i,h*a-s*o,h*o+s*a,0,h*a+s*o,c*a+i,c*o-s*r,0,h*o-s*a,c*o+s*r,n*o*o+i,0,0,0,0,1),this}makeScale(t,e,i){return this.set(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1),this}makeShear(t,e,i,s,n,r){return this.set(1,i,n,0,t,1,r,0,e,s,1,0,0,0,0,1),this}compose(t,e,i){const s=this.elements,n=e._x,r=e._y,a=e._z,o=e._w,h=n+n,c=r+r,u=a+a,d=n*h,p=n*c,f=n*u,m=r*c,y=r*u,g=a*u,x=o*h,b=o*c,M=o*u,_=i.x,v=i.y,A=i.z;return s[0]=(1-(m+g))*_,s[1]=(p+M)*_,s[2]=(f-b)*_,s[3]=0,s[4]=(p-M)*v,s[5]=(1-(d+g))*v,s[6]=(y+x)*v,s[7]=0,s[8]=(f+b)*A,s[9]=(y-x)*A,s[10]=(1-(d+m))*A,s[11]=0,s[12]=t.x,s[13]=t.y,s[14]=t.z,s[15]=1,this}decompose(t,e,i){const s=this.elements;t.x=s[12],t.y=s[13],t.z=s[14];const n=this.determinantAffine();if(n===0)return i.set(1,1,1),e.identity(),this;let r=Ze.set(s[0],s[1],s[2]).length();const a=Ze.set(s[4],s[5],s[6]).length(),o=Ze.set(s[8],s[9],s[10]).length();n<0&&(r=-r),Wt.copy(this);const h=1/r,c=1/a,u=1/o;return Wt.elements[0]*=h,Wt.elements[1]*=h,Wt.elements[2]*=h,Wt.elements[4]*=c,Wt.elements[5]*=c,Wt.elements[6]*=c,Wt.elements[8]*=u,Wt.elements[9]*=u,Wt.elements[10]*=u,e.setFromRotationMatrix(Wt),i.x=r,i.y=a,i.z=o,this}makePerspective(t,e,i,s,n,r,a=Qt,o=!1){const h=this.elements,c=2*n/(e-t),u=2*n/(i-s),d=(e+t)/(e-t),p=(i+s)/(i-s);let f,m;if(o)f=n/(r-n),m=r*n/(r-n);else if(a===Qt)f=-(r+n)/(r-n),m=-2*r*n/(r-n);else if(a===bi)f=-r/(r-n),m=-r*n/(r-n);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return h[0]=c,h[4]=0,h[8]=d,h[12]=0,h[1]=0,h[5]=u,h[9]=p,h[13]=0,h[2]=0,h[6]=0,h[10]=f,h[14]=m,h[3]=0,h[7]=0,h[11]=-1,h[15]=0,this}makeOrthographic(t,e,i,s,n,r,a=Qt,o=!1){const h=this.elements,c=2/(e-t),u=2/(i-s),d=-(e+t)/(e-t),p=-(i+s)/(i-s);let f,m;if(o)f=1/(r-n),m=r/(r-n);else if(a===Qt)f=-2/(r-n),m=-(r+n)/(r-n);else if(a===bi)f=-1/(r-n),m=-n/(r-n);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return h[0]=c,h[4]=0,h[8]=0,h[12]=d,h[1]=0,h[5]=u,h[9]=0,h[13]=p,h[2]=0,h[6]=0,h[10]=f,h[14]=m,h[3]=0,h[7]=0,h[11]=0,h[15]=1,this}equals(t){const e=this.elements,i=t.elements;for(let s=0;s<16;s++)if(e[s]!==i[s])return!1;return!0}fromArray(t,e=0){for(let i=0;i<16;i++)this.elements[i]=t[i+e];return this}toArray(t=[],e=0){const i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t[e+9]=i[9],t[e+10]=i[10],t[e+11]=i[11],t[e+12]=i[12],t[e+13]=i[13],t[e+14]=i[14],t[e+15]=i[15],t}}const Ze=new w,Wt=new G,Hl=new w(0,0,0),ql=new w(1,1,1),be=new w,is=new w,kt=new w,la=new G,ca=new Tt;class te{constructor(t=0,e=0,i=0,s=te.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=i,this._order=s}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,i,s=this._order){return this._x=t,this._y=e,this._z=i,this._order=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,i=!0){const s=t.elements,n=s[0],r=s[4],a=s[8],o=s[1],h=s[5],c=s[9],u=s[2],d=s[6],p=s[10];switch(e){case"XYZ":this._y=Math.asin(D(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,p),this._z=Math.atan2(-r,n)):(this._x=Math.atan2(d,h),this._z=0);break;case"YXZ":this._x=Math.asin(-D(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(a,p),this._z=Math.atan2(o,h)):(this._y=Math.atan2(-u,n),this._z=0);break;case"ZXY":this._x=Math.asin(D(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-u,p),this._z=Math.atan2(-r,h)):(this._y=0,this._z=Math.atan2(o,n));break;case"ZYX":this._y=Math.asin(-D(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(d,p),this._z=Math.atan2(o,n)):(this._x=0,this._z=Math.atan2(-r,h));break;case"YZX":this._z=Math.asin(D(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-c,h),this._y=Math.atan2(-u,n)):(this._x=0,this._y=Math.atan2(a,p));break;case"XZY":this._z=Math.asin(-D(r,-1,1)),Math.abs(r)<.9999999?(this._x=Math.atan2(d,h),this._y=Math.atan2(a,n)):(this._x=Math.atan2(-c,p),this._y=0);break;default:V("Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,i===!0&&this._onChangeCallback(),this}setFromQuaternion(t,e,i){return la.makeRotationFromQuaternion(t),this.setFromRotationMatrix(la,e,i)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return ca.setFromEuler(this),this.setFromQuaternion(ca,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}te.DEFAULT_ORDER="XYZ";class Co{constructor(){this.mask=1}set(t){this.mask=(1<<t|0)>>>0}enable(t){this.mask|=1<<t|0}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t|0}disable(t){this.mask&=~(1<<t|0)}disableAll(){this.mask=0}test(t){return(this.mask&t.mask)!==0}isEnabled(t){return(this.mask&(1<<t|0))!==0}}let Jl=0;const ua=new w,$e=new Tt,ae=new G,ss=new w,Ci=new w,Xl=new w,Yl=new Tt,da=new w(1,0,0),pa=new w(0,1,0),fa=new w(0,0,1),ma={type:"added"},Zl={type:"removed"},Qe={type:"childadded",child:null},yn={type:"childremoved",child:null};class $ extends me{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:Jl++}),this.uuid=Et(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=$.DEFAULT_UP.clone();const t=new w,e=new te,i=new Tt,s=new w(1,1,1);function n(){i.setFromEuler(e,!1)}function r(){e.setFromQuaternion(i,void 0,!1)}e._onChange(n),i._onChange(r),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:s},modelViewMatrix:{value:new G},normalMatrix:{value:new ee}}),this.matrix=new G,this.matrixWorld=new G,this.matrixAutoUpdate=$.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=$.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Co,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.static=!1,this.userData={},this.pivot=null}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,e){this.quaternion.setFromAxisAngle(t,e)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,e){return $e.setFromAxisAngle(t,e),this.quaternion.multiply($e),this}rotateOnWorldAxis(t,e){return $e.setFromAxisAngle(t,e),this.quaternion.premultiply($e),this}rotateX(t){return this.rotateOnAxis(da,t)}rotateY(t){return this.rotateOnAxis(pa,t)}rotateZ(t){return this.rotateOnAxis(fa,t)}translateOnAxis(t,e){return ua.copy(t).applyQuaternion(this.quaternion),this.position.add(ua.multiplyScalar(e)),this}translateX(t){return this.translateOnAxis(da,t)}translateY(t){return this.translateOnAxis(pa,t)}translateZ(t){return this.translateOnAxis(fa,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(ae.copy(this.matrixWorld).invert())}lookAt(t,e,i){t.isVector3?ss.copy(t):ss.set(t,e,i);const s=this.parent;this.updateWorldMatrix(!0,!1),Ci.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ae.lookAt(Ci,ss,this.up):ae.lookAt(ss,Ci,this.up),this.quaternion.setFromRotationMatrix(ae),s&&(ae.extractRotation(s.matrixWorld),$e.setFromRotationMatrix(ae),this.quaternion.premultiply($e.invert()))}add(t){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(X("Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(ma),Qe.child=t,this.dispatchEvent(Qe),Qe.child=null):X("Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.remove(arguments[i]);return this}const e=this.children.indexOf(t);return e!==-1&&(t.parent=null,this.children.splice(e,1),t.dispatchEvent(Zl),yn.child=t,this.dispatchEvent(yn),yn.child=null),this}removeFromParent(){const t=this.parent;return t!==null&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),ae.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),ae.multiply(t.parent.matrixWorld)),t.applyMatrix4(ae),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(ma),Qe.child=t,this.dispatchEvent(Qe),Qe.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let i=0,s=this.children.length;i<s;i++){const r=this.children[i].getObjectByProperty(t,e);if(r!==void 0)return r}}getObjectsByProperty(t,e,i=[]){this[t]===e&&i.push(this);const s=this.children;for(let n=0,r=s.length;n<r;n++)s[n].getObjectsByProperty(t,e,i);return i}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ci,t,Xl),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ci,Yl,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}intersectsFrustum(){}traverse(t){t(this);const e=this.children;for(let i=0,s=e.length;i<s;i++)e[i].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);const e=this.children;for(let i=0,s=e.length;i<s;i++)e[i].traverseVisible(t)}traverseAncestors(t){const e=this.parent;e!==null&&(t(e),e.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale);const t=this.pivot;if(t!==null){const e=t.x,i=t.y,s=t.z,n=this.matrix.elements;n[12]+=e-n[0]*e-n[4]*i-n[8]*s,n[13]+=i-n[1]*e-n[5]*i-n[9]*s,n[14]+=s-n[2]*e-n[6]*i-n[10]*s}this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);const e=this.children;for(let i=0,s=e.length;i<s;i++)e[i].updateMatrixWorld(t)}updateWorldMatrix(t,e,i=!1){const s=this.parent;if(t===!0&&s!==null&&s.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||i)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,i=!0),e===!0){const n=this.children;for(let r=0,a=n.length;r<a;r++)n[r].updateWorldMatrix(!1,!0,i)}}toJSON(t){const e=t===void 0||typeof t=="string",i={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},i.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const s={};s.uuid=this.uuid,s.type=this.type,s.name=this.name,s.castShadow=this.castShadow,s.receiveShadow=this.receiveShadow,s.visible=this.visible,s.frustumCulled=this.frustumCulled,s.renderOrder=this.renderOrder,s.static=this.static,s.matrixAutoUpdate=this.matrixAutoUpdate,Object.keys(this.userData).length>0&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),s.up=this.up.toArray(),this.pivot!==null&&(s.pivot=this.pivot.toArray()),this.morphTargetDictionary!==void 0&&(s.morphTargetDictionary=Object.assign({},this.morphTargetDictionary)),this.morphTargetInfluences!==void 0&&(s.morphTargetInfluences=this.morphTargetInfluences.slice()),this.isInstancedMesh&&(s.type="InstancedMesh",s.count=this.count,s.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(s.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(s.type="BatchedMesh",s.perObjectFrustumCulled=this.perObjectFrustumCulled,s.sortObjects=this.sortObjects,s.drawRanges=this._drawRanges,s.reservedRanges=this._reservedRanges,s.geometryInfo=this._geometryInfo.map(a=>({...a,boundingBox:a.boundingBox?a.boundingBox.toJSON():void 0,boundingSphere:a.boundingSphere?a.boundingSphere.toJSON():void 0})),s.instanceInfo=this._instanceInfo.map(a=>({...a})),s.availableInstanceIds=this._availableInstanceIds.slice(),s.availableGeometryIds=this._availableGeometryIds.slice(),s.nextIndexStart=this._nextIndexStart,s.nextVertexStart=this._nextVertexStart,s.geometryCount=this._geometryCount,s.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.matricesTexture=this._matricesTexture.toJSON(t),s.indirectTexture=this._indirectTexture.toJSON(t),this._colorsTexture!==null&&(s.colorsTexture=this._colorsTexture.toJSON(t)),this.boundingSphere!==null&&(s.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(s.boundingBox=this.boundingBox.toJSON()));function n(a,o){return a[o.uuid]===void 0&&(a[o.uuid]=o.toJSON(t)),o.uuid}if(this.isScene)this.background&&(this.background.isColor?s.background=this.background.toJSON():this.background.isTexture&&(s.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(s.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){s.geometry=n(t.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const o=a.shapes;if(Array.isArray(o))for(let h=0,c=o.length;h<c;h++){const u=o[h];n(t.shapes,u)}else n(t.shapes,o)}}if(this.isSkinnedMesh&&(s.bindMode=this.bindMode,s.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(n(t.skeletons,this.skeleton),s.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const a=[];for(let o=0,h=this.material.length;o<h;o++)a.push(n(t.materials,this.material[o]));s.material=a}else s.material=n(t.materials,this.material);if(this.children.length>0){s.children=[];for(let a=0;a<this.children.length;a++)s.children.push(this.children[a].toJSON(t).object)}if(this.animations.length>0){s.animations=[];for(let a=0;a<this.animations.length;a++){const o=this.animations[a];s.animations.push(n(t.animations,o))}}if(e){const a=r(t.geometries),o=r(t.materials),h=r(t.textures),c=r(t.images),u=r(t.shapes),d=r(t.skeletons),p=r(t.animations),f=r(t.nodes);a.length>0&&(i.geometries=a),o.length>0&&(i.materials=o),h.length>0&&(i.textures=h),c.length>0&&(i.images=c),u.length>0&&(i.shapes=u),d.length>0&&(i.skeletons=d),p.length>0&&(i.animations=p),f.length>0&&(i.nodes=f)}return i.object=s,i;function r(a){const o=[];for(const h in a){const c=a[h];delete c.metadata,o.push(c)}return o}}clone(t){return new this.constructor().copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.pivot=t.pivot!==null?t.pivot.clone():null,this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.static=t.static,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(let i=0;i<t.children.length;i++){const s=t.children[i];this.add(s.clone())}return this}dispose(){this.dispatchEvent({type:"dispose"})}}$.DEFAULT_UP=new w(0,1,0);$.DEFAULT_MATRIX_AUTO_UPDATE=!0;$.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;class Vi extends ${constructor(){super(),this.isGroup=!0,this.type="Group"}}const $l={type:"move"};class Sf{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Vi,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Vi,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new w,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new w),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Vi,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new w,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new w,this._grip.eventsEnabled=!1),this._grip}dispatchEvent(t){return this._targetRay!==null&&this._targetRay.dispatchEvent(t),this._grip!==null&&this._grip.dispatchEvent(t),this._hand!==null&&this._hand.dispatchEvent(t),this}connect(t){if(t&&t.hand){const e=this._hand;if(e)for(const i of t.hand.values())this._getHandJoint(e,i)}return this.dispatchEvent({type:"connected",data:t}),this}disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(t,e,i){let s=null,n=null,r=null;const a=this._targetRay,o=this._grip,h=this._hand;if(t&&e.session.visibilityState!=="visible-blurred"){if(h&&t.hand){r=!0;for(const m of t.hand.values()){const y=e.getJointPose(m,i),g=this._getHandJoint(h,m);y!==null&&(g.matrix.fromArray(y.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=y.radius),g.visible=y!==null}const c=h.joints["index-finger-tip"],u=h.joints["thumb-tip"],d=c.position.distanceTo(u.position),p=.02,f=.005;h.inputState.pinching&&d>p+f?(h.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!h.inputState.pinching&&d<=p-f&&(h.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else o!==null&&t.gripSpace&&(n=e.getPose(t.gripSpace,i),n!==null&&(o.matrix.fromArray(n.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,n.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(n.linearVelocity)):o.hasLinearVelocity=!1,n.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(n.angularVelocity)):o.hasAngularVelocity=!1,o.eventsEnabled&&o.dispatchEvent({type:"gripUpdated",data:t,target:this})));a!==null&&(s=e.getPose(t.targetRaySpace,i),s===null&&n!==null&&(s=n),s!==null&&(a.matrix.fromArray(s.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,s.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(s.linearVelocity)):a.hasLinearVelocity=!1,s.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(s.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent($l)))}return a!==null&&(a.visible=s!==null),o!==null&&(o.visible=n!==null),h!==null&&(h.visible=r!==null),this}_getHandJoint(t,e){if(t.joints[e.jointName]===void 0){const i=new Vi;i.matrixAutoUpdate=!1,i.visible=!1,t.joints[e.jointName]=i,t.add(i)}return t.joints[e.jointName]}}const Io={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Me={h:0,s:0,l:0},ns={h:0,s:0,l:0};function gn(l,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?l+(t-l)*6*e:e<1/2?t:e<2/3?l+(t-l)*6*(2/3-e):l}class U{constructor(t,e,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,i)}set(t,e,i){if(e===void 0&&i===void 0){const s=t;s&&s.isColor?this.copy(s):typeof s=="number"?this.setHex(s):typeof s=="string"&&this.setStyle(s)}else this.setRGB(t,e,i);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=Dt){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,Rt.colorSpaceToWorking(this,e),this}setRGB(t,e,i,s=Rt.workingColorSpace){return this.r=t,this.g=e,this.b=i,Rt.colorSpaceToWorking(this,s),this}setHSL(t,e,i,s=Rt.workingColorSpace){if(t=cr(t,1),e=D(e,0,1),i=D(i,0,1),e===0)this.r=this.g=this.b=i;else{const n=i<=.5?i*(1+e):i+e-i*e,r=2*i-n;this.r=gn(r,n,t+1/3),this.g=gn(r,n,t),this.b=gn(r,n,t-1/3)}return Rt.colorSpaceToWorking(this,s),this}setStyle(t,e=Dt){function i(n){n!==void 0&&parseFloat(n)<1&&V("Color: Alpha component of "+t+" will be ignored.")}let s;if(s=/^(\w+)\(([^\)]*)\)/.exec(t)){let n;const r=s[1],a=s[2];switch(r){case"rgb":case"rgba":if(n=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(n[4]),this.setRGB(Math.min(255,parseInt(n[1],10))/255,Math.min(255,parseInt(n[2],10))/255,Math.min(255,parseInt(n[3],10))/255,e);if(n=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(n[4]),this.setRGB(Math.min(100,parseInt(n[1],10))/100,Math.min(100,parseInt(n[2],10))/100,Math.min(100,parseInt(n[3],10))/100,e);break;case"hsl":case"hsla":if(n=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(n[4]),this.setHSL(parseFloat(n[1])/360,parseFloat(n[2])/100,parseFloat(n[3])/100,e);break;default:V("Color: Unknown color model "+t)}}else if(s=/^\#([A-Fa-f\d]+)$/.exec(t)){const n=s[1],r=n.length;if(r===3)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,e);if(r===6)return this.setHex(parseInt(n,16),e);V("Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=Dt){const i=Io[t.toLowerCase()];return i!==void 0?this.setHex(i,e):V("Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=fe(t.r),this.g=fe(t.g),this.b=fe(t.b),this}copyLinearToSRGB(t){return this.r=gi(t.r),this.g=gi(t.g),this.b=gi(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=Dt){return Rt.workingToColorSpace(ft.copy(this),t),Math.round(D(ft.r*255,0,255))*65536+Math.round(D(ft.g*255,0,255))*256+Math.round(D(ft.b*255,0,255))}getHexString(t=Dt){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=Rt.workingColorSpace){Rt.workingToColorSpace(ft.copy(this),e);const i=ft.r,s=ft.g,n=ft.b,r=Math.max(i,s,n),a=Math.min(i,s,n);let o,h;const c=(a+r)/2;if(a===r)o=0,h=0;else{const u=r-a;switch(h=c<=.5?u/(r+a):u/(2-r-a),r){case i:o=(s-n)/u+(s<n?6:0);break;case s:o=(n-i)/u+2;break;case n:o=(i-s)/u+4;break}o/=6}return t.h=o,t.s=h,t.l=c,t}getRGB(t,e=Rt.workingColorSpace){return Rt.workingToColorSpace(ft.copy(this),e),t.r=ft.r,t.g=ft.g,t.b=ft.b,t}getStyle(t=Dt){Rt.workingToColorSpace(ft.copy(this),t);const e=ft.r,i=ft.g,s=ft.b;return t!==Dt?`color(${t} ${e.toFixed(3)} ${i.toFixed(3)} ${s.toFixed(3)})`:`rgb(${Math.round(e*255)},${Math.round(i*255)},${Math.round(s*255)})`}offsetHSL(t,e,i){return this.getHSL(Me),this.setHSL(Me.h+t,Me.s+e,Me.l+i)}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,i){return this.r=t.r+(e.r-t.r)*i,this.g=t.g+(e.g-t.g)*i,this.b=t.b+(e.b-t.b)*i,this}lerpHSL(t,e){this.getHSL(Me),t.getHSL(ns);const i=Wi(Me.h,ns.h,e),s=Wi(Me.s,ns.s,e),n=Wi(Me.l,ns.l,e);return this.setHSL(i,s,n),this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){const e=this.r,i=this.g,s=this.b,n=t.elements;return this.r=n[0]*e+n[3]*i+n[6]*s,this.g=n[1]*e+n[4]*i+n[7]*s,this.b=n[2]*e+n[5]*i+n[8]*s,this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const ft=new U;U.NAMES=Io;class ur{constructor(t,e=25e-5){this.isFogExp2=!0,this.name="",this.color=new U(t),this.density=e}clone(){return new ur(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class dr{constructor(t,e=1,i=1e3){this.isFog=!0,this.name="",this.color=new U(t),this.near=e,this.far=i}clone(){return new dr(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class Ql extends ${constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new te,this.environmentIntensity=1,this.environmentRotation=new te,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),t.background!==null&&(this.background=t.background.clone()),t.environment!==null&&(this.environment=t.environment.clone()),t.fog!==null&&(this.fog=t.fog.clone()),this.backgroundBlurriness=t.backgroundBlurriness,this.backgroundIntensity=t.backgroundIntensity,this.backgroundRotation.copy(t.backgroundRotation),this.environmentIntensity=t.environmentIntensity,this.environmentRotation.copy(t.environmentRotation),t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){const e=super.toJSON(t);return this.fog!==null&&(e.object.fog=this.fog.toJSON()),e.object.backgroundBlurriness=this.backgroundBlurriness,e.object.backgroundIntensity=this.backgroundIntensity,e.object.backgroundRotation=this.backgroundRotation.toArray(),e.object.environmentIntensity=this.environmentIntensity,e.object.environmentRotation=this.environmentRotation.toArray(),e}}const Gt=new w,oe=new w,xn=new w,he=new w,je=new w,Ke=new w,ya=new w,bn=new w,Mn=new w,wn=new w,_n=new Ct,vn=new Ct,Sn=new Ct;class Ot{constructor(t=new w,e=new w,i=new w){this.a=t,this.b=e,this.c=i}static getNormal(t,e,i,s){s.subVectors(i,e),Gt.subVectors(t,e),s.cross(Gt);const n=s.lengthSq();return n>0?s.multiplyScalar(1/Math.sqrt(n)):s.set(0,0,0)}static getBarycoord(t,e,i,s,n){Gt.subVectors(s,e),oe.subVectors(i,e),xn.subVectors(t,e);const r=Gt.dot(Gt),a=Gt.dot(oe),o=Gt.dot(xn),h=oe.dot(oe),c=oe.dot(xn),u=r*h-a*a;if(u===0)return n.set(0,0,0),null;const d=1/u,p=(h*o-a*c)*d,f=(r*c-a*o)*d;return n.set(1-p-f,f,p)}static containsPoint(t,e,i,s){return this.getBarycoord(t,e,i,s,he)===null?!1:he.x>=0&&he.y>=0&&he.x+he.y<=1}static getInterpolation(t,e,i,s,n,r,a,o){return this.getBarycoord(t,e,i,s,he)===null?(o.x=0,o.y=0,"z"in o&&(o.z=0),"w"in o&&(o.w=0),null):(o.setScalar(0),o.addScaledVector(n,he.x),o.addScaledVector(r,he.y),o.addScaledVector(a,he.z),o)}static getInterpolatedAttribute(t,e,i,s,n,r){return _n.setScalar(0),vn.setScalar(0),Sn.setScalar(0),_n.fromBufferAttribute(t,e),vn.fromBufferAttribute(t,i),Sn.fromBufferAttribute(t,s),r.setScalar(0),r.addScaledVector(_n,n.x),r.addScaledVector(vn,n.y),r.addScaledVector(Sn,n.z),r}static isFrontFacing(t,e,i,s){return Gt.subVectors(i,e),oe.subVectors(t,e),Gt.cross(oe).dot(s)<0}set(t,e,i){return this.a.copy(t),this.b.copy(e),this.c.copy(i),this}setFromPointsAndIndices(t,e,i,s){return this.a.copy(t[e]),this.b.copy(t[i]),this.c.copy(t[s]),this}setFromAttributeAndIndices(t,e,i,s){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,i),this.c.fromBufferAttribute(t,s),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return Gt.subVectors(this.c,this.b),oe.subVectors(this.a,this.b),Gt.cross(oe).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Ot.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Ot.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,i,s,n){return Ot.getInterpolation(t,this.a,this.b,this.c,e,i,s,n)}containsPoint(t){return Ot.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Ot.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){const i=this.a,s=this.b,n=this.c;let r,a;je.subVectors(s,i),Ke.subVectors(n,i),bn.subVectors(t,i);const o=je.dot(bn),h=Ke.dot(bn);if(o<=0&&h<=0)return e.copy(i);Mn.subVectors(t,s);const c=je.dot(Mn),u=Ke.dot(Mn);if(c>=0&&u<=c)return e.copy(s);const d=o*u-c*h;if(d<=0&&o>=0&&c<=0)return r=o/(o-c),e.copy(i).addScaledVector(je,r);wn.subVectors(t,n);const p=je.dot(wn),f=Ke.dot(wn);if(f>=0&&p<=f)return e.copy(n);const m=p*h-o*f;if(m<=0&&h>=0&&f<=0)return a=h/(h-f),e.copy(i).addScaledVector(Ke,a);const y=c*f-p*u;if(y<=0&&u-c>=0&&p-f>=0)return ya.subVectors(n,s),a=(u-c)/(u-c+(p-f)),e.copy(s).addScaledVector(ya,a);const g=1/(y+m+d);return r=m*g,a=d*g,e.copy(i).addScaledVector(je,r).addScaledVector(Ke,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}class _t{constructor(t=new w(1/0,1/0,1/0),e=new w(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,i=t.length;e<i;e+=3)this.expandByPoint(Ht.fromArray(t,e));return this}setFromBufferAttribute(t){this.makeEmpty();for(let e=0,i=t.count;e<i;e++)this.expandByPoint(Ht.fromBufferAttribute(t,e));return this}setFromPoints(t){this.makeEmpty();for(let e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){const i=Ht.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(i),this.max.copy(t).add(i),this}setFromObject(t,e=!1){return this.makeEmpty(),this.expandByObject(t,e)}clone(){return new this.constructor().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(t){return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t,e=!1){t.updateWorldMatrix(!1,!1);const i=t.geometry;if(i!==void 0){const n=i.getAttribute("position");if(e===!0&&n!==void 0&&t.isInstancedMesh!==!0)for(let r=0,a=n.count;r<a;r++)t.isMesh===!0?t.getVertexPosition(r,Ht):Ht.fromBufferAttribute(n,r),Ht.applyMatrix4(t.matrixWorld),this.expandByPoint(Ht);else t.boundingBox!==void 0?(t.boundingBox===null&&t.computeBoundingBox(),rs.copy(t.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),rs.copy(i.boundingBox)),rs.applyMatrix4(t.matrixWorld),this.union(rs)}const s=t.children;for(let n=0,r=s.length;n<r;n++)this.expandByObject(s[n],e);return this}containsPoint(t){return t.x>=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.max.z}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return t.max.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,Ht),Ht.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,i;return t.normal.x>0?(e=t.normal.x*this.min.x,i=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,i=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,i+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,i+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,i+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,i+=t.normal.z*this.min.z),e<=-t.constant&&i>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(Ii),as.subVectors(this.max,Ii),ti.subVectors(t.a,Ii),ei.subVectors(t.b,Ii),ii.subVectors(t.c,Ii),we.subVectors(ei,ti),_e.subVectors(ii,ei),ze.subVectors(ti,ii);let e=[0,-we.z,we.y,0,-_e.z,_e.y,0,-ze.z,ze.y,we.z,0,-we.x,_e.z,0,-_e.x,ze.z,0,-ze.x,-we.y,we.x,0,-_e.y,_e.x,0,-ze.y,ze.x,0];return!An(e,ti,ei,ii,as)||(e=[1,0,0,0,1,0,0,0,1],!An(e,ti,ei,ii,as))?!1:(os.crossVectors(we,_e),e=[os.x,os.y,os.z],An(e,ti,ei,ii,as))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,Ht).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=this.getSize(Ht).length()*.5),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()?this:(le[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),le[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),le[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),le[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),le[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),le[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),le[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),le[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(le),this)}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(t){return this.min.fromArray(t.min),this.max.fromArray(t.max),this}}const le=[new w,new w,new w,new w,new w,new w,new w,new w],Ht=new w,rs=new _t,ti=new w,ei=new w,ii=new w,we=new w,_e=new w,ze=new w,Ii=new w,as=new w,os=new w,Be=new w;function An(l,t,e,i,s){for(let n=0,r=l.length-3;n<=r;n+=3){Be.fromArray(l,n);const a=s.x*Math.abs(Be.x)+s.y*Math.abs(Be.y)+s.z*Math.abs(Be.z),o=t.dot(Be),h=e.dot(Be),c=i.dot(Be);if(Math.max(-Math.max(o,h,c),Math.min(o,h,c))>a)return!1}return!0}const de=jl();function jl(){const l=new ArrayBuffer(4),t=new Float32Array(l),e=new Uint32Array(l),i=new Uint32Array(512),s=new Uint32Array(512);for(let o=0;o<256;++o){const h=o-127;h<-27?(i[o]=0,i[o|256]=32768,s[o]=24,s[o|256]=24):h<-14?(i[o]=1024>>-h-14,i[o|256]=1024>>-h-14|32768,s[o]=-h-1,s[o|256]=-h-1):h<=15?(i[o]=h+15<<10,i[o|256]=h+15<<10|32768,s[o]=13,s[o|256]=13):h<128?(i[o]=31744,i[o|256]=64512,s[o]=24,s[o|256]=24):(i[o]=31744,i[o|256]=64512,s[o]=13,s[o|256]=13)}const n=new Uint32Array(2048),r=new Uint32Array(64),a=new Uint32Array(64);for(let o=1;o<1024;++o){let h=o<<13,c=0;for(;(h&8388608)===0;)h<<=1,c-=8388608;h&=-8388609,c+=947912704,n[o]=h|c}for(let o=1024;o<2048;++o)n[o]=939524096+(o-1024<<13);for(let o=1;o<31;++o)r[o]=o<<23;r[31]=1199570944,r[32]=2147483648;for(let o=33;o<63;++o)r[o]=2147483648+(o-32<<23);r[63]=3347054592;for(let o=1;o<64;++o)o!==32&&(a[o]=1024);return{floatView:t,uint32View:e,baseTable:i,shiftTable:s,mantissaTable:n,exponentTable:r,offsetTable:a}}function At(l){Math.abs(l)>65504&&V("DataUtils.toHalfFloat(): Value out of range."),l=D(l,-65504,65504),de.floatView[0]=l;const t=de.uint32View[0],e=t>>23&511;return de.baseTable[e]+((t&8388607)>>de.shiftTable[e])}function Di(l){const t=l>>10;return de.uint32View[0]=de.mantissaTable[de.offsetTable[t]+(l&1023)]+de.exponentTable[t],de.floatView[0]}class Af{static toHalfFloat(t){return At(t)}static fromHalfFloat(t){return Di(t)}}const lt=new w,hs=new I;let Kl=0;class rt extends me{constructor(t,e,i=!1){if(super(),Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:Kl++}),this.name="",this.array=t,this.itemSize=e,this.count=t!==void 0?t.length/e:0,this.normalized=i,this.usage=lr,this.updateRanges=[],this.gpuType=xi,this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,e,i){t*=this.itemSize,i*=e.itemSize;for(let s=0,n=this.itemSize;s<n;s++)this.array[t+s]=e.array[i+s];return this}copyArray(t){return this.array.set(t),this}applyMatrix3(t){if(this.itemSize===2)for(let e=0,i=this.count;e<i;e++)hs.fromBufferAttribute(this,e),hs.applyMatrix3(t),this.setXY(e,hs.x,hs.y);else if(this.itemSize===3)for(let e=0,i=this.count;e<i;e++)lt.fromBufferAttribute(this,e),lt.applyMatrix3(t),this.setXYZ(e,lt.x,lt.y,lt.z);return this}applyMatrix4(t){for(let e=0,i=this.count;e<i;e++)lt.fromBufferAttribute(this,e),lt.applyMatrix4(t),this.setXYZ(e,lt.x,lt.y,lt.z);return this}applyNormalMatrix(t){for(let e=0,i=this.count;e<i;e++)lt.fromBufferAttribute(this,e),lt.applyNormalMatrix(t),this.setXYZ(e,lt.x,lt.y,lt.z);return this}transformDirection(t){for(let e=0,i=this.count;e<i;e++)lt.fromBufferAttribute(this,e),lt.transformDirection(t),this.setXYZ(e,lt.x,lt.y,lt.z);return this}set(t,e=0){return this.array.set(t,e),this}getComponent(t,e){let i=this.array[t*this.itemSize+e];return this.normalized&&(i=wt(i,this.array)),i}setComponent(t,e,i){return this.normalized&&(i=W(i,this.array)),this.array[t*this.itemSize+e]=i,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=wt(e,this.array)),e}setX(t,e){return this.normalized&&(e=W(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=wt(e,this.array)),e}setY(t,e){return this.normalized&&(e=W(e,this.array)),this.array[t*this.itemSize+1]=e,this}getZ(t){let e=this.array[t*this.itemSize+2];return this.normalized&&(e=wt(e,this.array)),e}setZ(t,e){return this.normalized&&(e=W(e,this.array)),this.array[t*this.itemSize+2]=e,this}getW(t){let e=this.array[t*this.itemSize+3];return this.normalized&&(e=wt(e,this.array)),e}setW(t,e){return this.normalized&&(e=W(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,i){return t*=this.itemSize,this.normalized&&(e=W(e,this.array),i=W(i,this.array)),this.array[t+0]=e,this.array[t+1]=i,this}setXYZ(t,e,i,s){return t*=this.itemSize,this.normalized&&(e=W(e,this.array),i=W(i,this.array),s=W(s,this.array)),this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=s,this}setXYZW(t,e,i,s,n){return t*=this.itemSize,this.normalized&&(e=W(e,this.array),i=W(i,this.array),s=W(s,this.array),n=W(n,this.array)),this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=s,this.array[t+3]=n,this}onUpload(t){return this.onUploadCallback=t,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const t={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return t.name=this.name,t.usage=this.usage,t.gpuType=this.gpuType,t}dispose(){this.dispatchEvent({type:"dispose"})}}class Tf extends rt{constructor(t,e,i){super(new Int8Array(t),e,i)}}class Cf extends rt{constructor(t,e,i){super(new Uint8Array(t),e,i)}}class If extends rt{constructor(t,e,i){super(new Uint8ClampedArray(t),e,i)}}class zf extends rt{constructor(t,e,i){super(new Int16Array(t),e,i)}}class tc extends rt{constructor(t,e,i){super(new Uint16Array(t),e,i)}}class Bf extends rt{constructor(t,e,i){super(new Int32Array(t),e,i)}}class ec extends rt{constructor(t,e,i){super(new Uint32Array(t),e,i)}}class Ff extends rt{constructor(t,e,i){super(new Uint16Array(t),e,i),this.isFloat16BufferAttribute=!0}getX(t){let e=Di(this.array[t*this.itemSize]);return this.normalized&&(e=wt(e,this.array)),e}setX(t,e){return this.normalized&&(e=W(e,this.array)),this.array[t*this.itemSize]=At(e),this}getY(t){let e=Di(this.array[t*this.itemSize+1]);return this.normalized&&(e=wt(e,this.array)),e}setY(t,e){return this.normalized&&(e=W(e,this.array)),this.array[t*this.itemSize+1]=At(e),this}getZ(t){let e=Di(this.array[t*this.itemSize+2]);return this.normalized&&(e=wt(e,this.array)),e}setZ(t,e){return this.normalized&&(e=W(e,this.array)),this.array[t*this.itemSize+2]=At(e),this}getW(t){let e=Di(this.array[t*this.itemSize+3]);return this.normalized&&(e=wt(e,this.array)),e}setW(t,e){return this.normalized&&(e=W(e,this.array)),this.array[t*this.itemSize+3]=At(e),this}setXY(t,e,i){return t*=this.itemSize,this.normalized&&(e=W(e,this.array),i=W(i,this.array)),this.array[t+0]=At(e),this.array[t+1]=At(i),this}setXYZ(t,e,i,s){return t*=this.itemSize,this.normalized&&(e=W(e,this.array),i=W(i,this.array),s=W(s,this.array)),this.array[t+0]=At(e),this.array[t+1]=At(i),this.array[t+2]=At(s),this}setXYZW(t,e,i,s,n){return t*=this.itemSize,this.normalized&&(e=W(e,this.array),i=W(i,this.array),s=W(s,this.array),n=W(n,this.array)),this.array[t+0]=At(e),this.array[t+1]=At(i),this.array[t+2]=At(s),this.array[t+3]=At(n),this}}class P extends rt{constructor(t,e,i){super(new Float32Array(t),e,i)}}const ic=new _t,zi=new w,Tn=new w;class yt{constructor(t=new w,e=-1){this.isSphere=!0,this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){const i=this.center;e!==void 0?i.copy(e):ic.setFromPoints(t).getCenter(i);let s=0;for(let n=0,r=t.length;n<r;n++)s=Math.max(s,i.distanceToSquared(t[n]));return this.radius=Math.sqrt(s),this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(t){return t.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(t){return t.distanceTo(this.center)-this.radius}intersectsSphere(t){const e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e}intersectsBox(t){return t.intersectsSphere(this)}intersectsPlane(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius}clampPoint(t,e){const i=this.center.distanceToSquared(t);return e.copy(t),i>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;zi.subVectors(t,this.center);const e=zi.lengthSq();if(e>this.radius*this.radius){const i=Math.sqrt(e),s=(i-this.radius)*.5;this.center.addScaledVector(zi,s/i),this.radius+=s}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(this.center.equals(t.center)===!0?this.radius=Math.max(this.radius,t.radius):(Tn.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(zi.copy(t.center).add(Tn)),this.expandByPoint(zi.copy(t.center).sub(Tn))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(t){return this.radius=t.radius,this.center.fromArray(t.center),this}}let sc=0;const Vt=new G,Cn=new $,si=new w,Pt=new _t,Bi=new _t,dt=new w;class q extends me{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:sc++}),this.uuid=Et(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={},this._transformed=!1}getIndex(){return this.index}setIndex(t){return Array.isArray(t)?this.index=new(wl(t)?ec:tc)(t,1):this.index=t,this}setIndirect(t,e=0){return this.indirect=t,this.indirectOffset=e,this}getIndirect(){return this.indirect}getAttribute(t){return this.attributes[t]}setAttribute(t,e){return this.attributes[t]=e,this}deleteAttribute(t){return delete this.attributes[t],this}hasAttribute(t){return this.attributes[t]!==void 0}addGroup(t,e,i=0){this.groups.push({start:t,count:e,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(t,e){this.drawRange.start=t,this.drawRange.count=e}applyMatrix4(t){const e=this.attributes.position;e!==void 0&&(e.applyMatrix4(t),e.needsUpdate=!0);const i=this.attributes.normal;if(i!==void 0){const n=new ee().getNormalMatrix(t);i.applyNormalMatrix(n),i.needsUpdate=!0}const s=this.attributes.tangent;return s!==void 0&&(s.transformDirection(t),s.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this._transformed=!0,this}applyQuaternion(t){return Vt.makeRotationFromQuaternion(t),this.applyMatrix4(Vt),this}rotateX(t){return Vt.makeRotationX(t),this.applyMatrix4(Vt),this}rotateY(t){return Vt.makeRotationY(t),this.applyMatrix4(Vt),this}rotateZ(t){return Vt.makeRotationZ(t),this.applyMatrix4(Vt),this}translate(t,e,i){return Vt.makeTranslation(t,e,i),this.applyMatrix4(Vt),this}scale(t,e,i){return Vt.makeScale(t,e,i),this.applyMatrix4(Vt),this}lookAt(t){return Cn.lookAt(t),Cn.updateMatrix(),this.applyMatrix4(Cn.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(si).negate(),this.translate(si.x,si.y,si.z),this}setFromPoints(t){const e=this.getAttribute("position");if(e===void 0){const i=[];for(let s=0,n=t.length;s<n;s++){const r=t[s];i.push(r.x,r.y,r.z||0)}this.setAttribute("position",new P(i,3))}else{const i=Math.min(t.length,e.count);for(let s=0;s<i;s++){const n=t[s];e.setXYZ(s,n.x,n.y,n.z||0)}t.length>e.count&&V("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),e.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new _t);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){X("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new w(-1/0,-1/0,-1/0),new w(1/0,1/0,1/0));return}if(t!==void 0){if(this.boundingBox.setFromBufferAttribute(t),e)for(let i=0,s=e.length;i<s;i++){const n=e[i];Pt.setFromBufferAttribute(n),this.morphTargetsRelative?(dt.addVectors(this.boundingBox.min,Pt.min),this.boundingBox.expandByPoint(dt),dt.addVectors(this.boundingBox.max,Pt.max),this.boundingBox.expandByPoint(dt)):(this.boundingBox.expandByPoint(Pt.min),this.boundingBox.expandByPoint(Pt.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&X('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new yt);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){X("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new w,1/0);return}if(t){const i=this.boundingSphere.center;if(Pt.setFromBufferAttribute(t),e)for(let n=0,r=e.length;n<r;n++){const a=e[n];Bi.setFromBufferAttribute(a),this.morphTargetsRelative?(dt.addVectors(Pt.min,Bi.min),Pt.expandByPoint(dt),dt.addVectors(Pt.max,Bi.max),Pt.expandByPoint(dt)):(Pt.expandByPoint(Bi.min),Pt.expandByPoint(Bi.max))}Pt.getCenter(i);let s=0;for(let n=0,r=t.count;n<r;n++)dt.fromBufferAttribute(t,n),s=Math.max(s,i.distanceToSquared(dt));if(e)for(let n=0,r=e.length;n<r;n++){const a=e[n],o=this.morphTargetsRelative;for(let h=0,c=a.count;h<c;h++)dt.fromBufferAttribute(a,h),o&&(si.fromBufferAttribute(t,h),dt.add(si)),s=Math.max(s,i.distanceToSquared(dt))}this.boundingSphere.radius=Math.sqrt(s),isNaN(this.boundingSphere.radius)&&X('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const t=this.index,e=this.attributes;if(t===null||e.position===void 0||e.normal===void 0||e.uv===void 0){X("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const i=e.position,s=e.normal,n=e.uv;let r=this.getAttribute("tangent");(r===void 0||r.count!==i.count)&&(r=new rt(new Float32Array(4*i.count),4),this.setAttribute("tangent",r));const a=[],o=[];for(let S=0;S<i.count;S++)a[S]=new w,o[S]=new w;const h=new w,c=new w,u=new w,d=new I,p=new I,f=new I,m=new w,y=new w;function g(S,T,C){h.fromBufferAttribute(i,S),c.fromBufferAttribute(i,T),u.fromBufferAttribute(i,C),d.fromBufferAttribute(n,S),p.fromBufferAttribute(n,T),f.fromBufferAttribute(n,C),c.sub(h),u.sub(h),p.sub(d),f.sub(d);const B=1/(p.x*f.y-f.x*p.y);isFinite(B)&&(m.copy(c).multiplyScalar(f.y).addScaledVector(u,-p.y).multiplyScalar(B),y.copy(u).multiplyScalar(p.x).addScaledVector(c,-f.x).multiplyScalar(B),a[S].add(m),a[T].add(m),a[C].add(m),o[S].add(y),o[T].add(y),o[C].add(y))}let x=this.groups;x.length===0&&(x=[{start:0,count:t.count}]);for(let S=0,T=x.length;S<T;++S){const C=x[S],B=C.start,R=C.count;for(let L=B,J=B+R;L<J;L+=3)g(t.getX(L+0),t.getX(L+1),t.getX(L+2))}const b=new w,M=new w,_=new w,v=new w;function A(S){_.fromBufferAttribute(s,S),v.copy(_);const T=a[S];b.copy(T),b.sub(_.multiplyScalar(_.dot(T))).normalize(),M.crossVectors(v,T);const B=M.dot(o[S])<0?-1:1;r.setXYZW(S,b.x,b.y,b.z,B)}for(let S=0,T=x.length;S<T;++S){const C=x[S],B=C.start,R=C.count;for(let L=B,J=B+R;L<J;L+=3)A(t.getX(L+0)),A(t.getX(L+1)),A(t.getX(L+2))}this._transformed=!0}computeVertexNormals(){const t=this.index,e=this.getAttribute("position");if(e!==void 0){let i=this.getAttribute("normal");if(i===void 0||i.count!==e.count)i=new rt(new Float32Array(e.count*3),3),this.setAttribute("normal",i);else for(let d=0,p=i.count;d<p;d++)i.setXYZ(d,0,0,0);const s=new w,n=new w,r=new w,a=new w,o=new w,h=new w,c=new w,u=new w;if(t)for(let d=0,p=t.count;d<p;d+=3){const f=t.getX(d+0),m=t.getX(d+1),y=t.getX(d+2);s.fromBufferAttribute(e,f),n.fromBufferAttribute(e,m),r.fromBufferAttribute(e,y),c.subVectors(r,n),u.subVectors(s,n),c.cross(u),a.fromBufferAttribute(i,f),o.fromBufferAttribute(i,m),h.fromBufferAttribute(i,y),a.add(c),o.add(c),h.add(c),i.setXYZ(f,a.x,a.y,a.z),i.setXYZ(m,o.x,o.y,o.z),i.setXYZ(y,h.x,h.y,h.z)}else for(let d=0,p=e.count;d<p;d+=3)s.fromBufferAttribute(e,d+0),n.fromBufferAttribute(e,d+1),r.fromBufferAttribute(e,d+2),c.subVectors(r,n),u.subVectors(s,n),c.cross(u),i.setXYZ(d+0,c.x,c.y,c.z),i.setXYZ(d+1,c.x,c.y,c.z),i.setXYZ(d+2,c.x,c.y,c.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){const t=this.attributes.normal;for(let e=0,i=t.count;e<i;e++)dt.fromBufferAttribute(t,e),dt.normalize(),t.setXYZ(e,dt.x,dt.y,dt.z)}toNonIndexed(){function t(a,o){const h=a.array,c=a.itemSize,u=a.normalized,d=new h.constructor(o.length*c);let p=0,f=0;for(let m=0,y=o.length;m<y;m++){a.isInterleavedBufferAttribute?p=o[m]*a.data.stride+a.offset:p=o[m]*c;for(let g=0;g<c;g++)d[f++]=h[p++]}return new rt(d,c,u)}if(this.index===null)return V("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const e=new q,i=this.index.array,s=this.attributes;for(const a in s){const o=s[a],h=t(o,i);e.setAttribute(a,h)}const n=this.morphAttributes;for(const a in n){const o=[],h=n[a];for(let c=0,u=h.length;c<u;c++){const d=h[c],p=t(d,i);o.push(p)}e.morphAttributes[a]=o}e.morphTargetsRelative=this.morphTargetsRelative;const r=this.groups;for(let a=0,o=r.length;a<o;a++){const h=r[a];e.addGroup(h.start,h.count,h.materialIndex)}return e}toJSON(){const t={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.parameters!==void 0&&this._transformed===!0?"BufferGeometry":this.type,t.name=this.name,Object.keys(this.userData).length>0&&(t.userData=this.userData),this.parameters!==void 0&&this._transformed!==!0){const o=this.parameters;for(const h in o)o[h]!==void 0&&(t[h]=o[h]);return t}t.data={attributes:{}};const e=this.index;e!==null&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});const i=this.attributes;for(const o in i){const h=i[o];t.data.attributes[o]=h.toJSON(t.data)}const s={};let n=!1;for(const o in this.morphAttributes){const h=this.morphAttributes[o],c=[];for(let u=0,d=h.length;u<d;u++){const p=h[u];c.push(p.toJSON(t.data))}c.length>0&&(s[o]=c,n=!0)}n&&(t.data.morphAttributes=s,t.data.morphTargetsRelative=this.morphTargetsRelative);const r=this.groups;r.length>0&&(t.data.groups=JSON.parse(JSON.stringify(r)));const a=this.boundingSphere;return a!==null&&(t.data.boundingSphere=a.toJSON()),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const e={};this.name=t.name;const i=t.index;i!==null&&this.setIndex(i.clone());const s=t.attributes;for(const h in s){const c=s[h];this.setAttribute(h,c.clone(e))}const n=t.morphAttributes;for(const h in n){const c=[],u=n[h];for(let d=0,p=u.length;d<p;d++)c.push(u[d].clone(e));this.morphAttributes[h]=c}this.morphTargetsRelative=t.morphTargetsRelative;const r=t.groups;for(let h=0,c=r.length;h<c;h++){const u=r[h];this.addGroup(u.start,u.count,u.materialIndex)}const a=t.boundingBox;a!==null&&(this.boundingBox=a.clone());const o=t.boundingSphere;return o!==null&&(this.boundingSphere=o.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this._transformed=t._transformed,this}dispose(){this.dispatchEvent({type:"dispose"})}}class pr{constructor(t,e){this.isInterleavedBuffer=!0,this.array=t,this.stride=e,this.count=t!==void 0?t.length/e:0,this.usage=lr,this.updateRanges=[],this.version=0,this.uuid=Et()}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,e,i){t*=this.stride,i*=e.stride;for(let s=0,n=this.stride;s<n;s++)this.array[t+s]=e.array[i+s];return this}set(t,e=0){return this.array.set(t,e),this}clone(t){t.arrayBuffers===void 0&&(t.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Et()),t.arrayBuffers[this.array.buffer._uuid]===void 0&&(t.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const e=new this.array.constructor(t.arrayBuffers[this.array.buffer._uuid]),i=new this.constructor(e,this.stride);return i.setUsage(this.usage),i}onUpload(t){return this.onUploadCallback=t,this}toJSON(t){t.arrayBuffers===void 0&&(t.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Et()),t.arrayBuffers[this.array.buffer._uuid]===void 0&&(t.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer)));const e={uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride};return e.usage=this.usage,e}}const Mt=new w;class Mi{constructor(t,e,i,s=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=t,this.itemSize=e,this.offset=i,this.normalized=s}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(t){this.data.needsUpdate=t}applyMatrix4(t){for(let e=0,i=this.data.count;e<i;e++)Mt.fromBufferAttribute(this,e),Mt.applyMatrix4(t),this.setXYZ(e,Mt.x,Mt.y,Mt.z);return this}applyNormalMatrix(t){for(let e=0,i=this.count;e<i;e++)Mt.fromBufferAttribute(this,e),Mt.applyNormalMatrix(t),this.setXYZ(e,Mt.x,Mt.y,Mt.z);return this}transformDirection(t){for(let e=0,i=this.count;e<i;e++)Mt.fromBufferAttribute(this,e),Mt.transformDirection(t),this.setXYZ(e,Mt.x,Mt.y,Mt.z);return this}getComponent(t,e){let i=this.array[t*this.data.stride+this.offset+e];return this.normalized&&(i=wt(i,this.array)),i}setComponent(t,e,i){return this.normalized&&(i=W(i,this.array)),this.data.array[t*this.data.stride+this.offset+e]=i,this}setX(t,e){return this.normalized&&(e=W(e,this.array)),this.data.array[t*this.data.stride+this.offset]=e,this}setY(t,e){return this.normalized&&(e=W(e,this.array)),this.data.array[t*this.data.stride+this.offset+1]=e,this}setZ(t,e){return this.normalized&&(e=W(e,this.array)),this.data.array[t*this.data.stride+this.offset+2]=e,this}setW(t,e){return this.normalized&&(e=W(e,this.array)),this.data.array[t*this.data.stride+this.offset+3]=e,this}getX(t){let e=this.data.array[t*this.data.stride+this.offset];return this.normalized&&(e=wt(e,this.array)),e}getY(t){let e=this.data.array[t*this.data.stride+this.offset+1];return this.normalized&&(e=wt(e,this.array)),e}getZ(t){let e=this.data.array[t*this.data.stride+this.offset+2];return this.normalized&&(e=wt(e,this.array)),e}getW(t){let e=this.data.array[t*this.data.stride+this.offset+3];return this.normalized&&(e=wt(e,this.array)),e}setXY(t,e,i){return t=t*this.data.stride+this.offset,this.normalized&&(e=W(e,this.array),i=W(i,this.array)),this.data.array[t+0]=e,this.data.array[t+1]=i,this}setXYZ(t,e,i,s){return t=t*this.data.stride+this.offset,this.normalized&&(e=W(e,this.array),i=W(i,this.array),s=W(s,this.array)),this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=s,this}setXYZW(t,e,i,s,n){return t=t*this.data.stride+this.offset,this.normalized&&(e=W(e,this.array),i=W(i,this.array),s=W(s,this.array),n=W(n,this.array)),this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=s,this.data.array[t+3]=n,this}clone(t){if(t===void 0){na("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let i=0;i<this.count;i++){const s=i*this.data.stride+this.offset;for(let n=0;n<this.itemSize;n++)e.push(this.data.array[s+n])}return new rt(new this.array.constructor(e),this.itemSize,this.normalized)}else return t.interleavedBuffers===void 0&&(t.interleavedBuffers={}),t.interleavedBuffers[this.data.uuid]===void 0&&(t.interleavedBuffers[this.data.uuid]=this.data.clone(t)),new Mi(t.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(t){if(t===void 0){na("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let i=0;i<this.count;i++){const s=i*this.data.stride+this.offset;for(let n=0;n<this.itemSize;n++)e.push(this.data.array[s+n])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}else return t.interleavedBuffers===void 0&&(t.interleavedBuffers={}),t.interleavedBuffers[this.data.uuid]===void 0&&(t.interleavedBuffers[this.data.uuid]=this.data.toJSON(t)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}const In=new w,nc=new w,rc=new ee;class Ue{constructor(t=new w(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,i,s){return this.normal.set(t,e,i),this.constant=s,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,i){const s=In.subVectors(i,e).cross(nc.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(s,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}intersectLine(t,e,i=!0){const s=t.delta(In),n=this.normal.dot(s);if(n===0)return this.distanceToPoint(t.start)===0?e.copy(t.start):null;const r=-(t.start.dot(this.normal)+this.constant)/n;return i===!0&&(r<0||r>1)?null:e.copy(t.start).addScaledVector(s,r)}intersectsLine(t){const e=this.distanceToPoint(t.start),i=this.distanceToPoint(t.end);return e<0&&i>0||i<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){const i=e||rc.getNormalMatrix(t),s=this.coplanarPoint(In).applyMatrix4(t),n=this.normal.applyMatrix3(i).normalize();return this.constant=-s.dot(n),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return new this.constructor().copy(this)}toJSON(){return{normal:this.normal.toArray(),constant:this.constant}}fromJSON(t){return this.normal.fromArray(t.normal),this.constant=t.constant,this}}let ac=0;class gt extends me{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:ac++}),this.uuid=Et(),this.name="",this.type="Material",this.blending=oh,this.side=go,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=lh,this.blendDst=ch,this.blendEquation=hh,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new U(0,0,0),this.blendAlpha=0,this.depthFunc=Yn,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Ml,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=un,this.stencilZFail=un,this.stencilZPass=un,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(t!==void 0)for(const e in t){const i=t[e];if(i===void 0){V(`Material: parameter '${e}' has value of undefined.`);continue}const s=this[e];if(s===void 0){V(`Material: '${e}' is not a property of THREE.${this.type}.`);continue}s&&s.isColor?s.set(i):s&&s.isVector2&&i&&i.isVector2||s&&s.isEuler&&i&&i.isEuler||s&&s.isVector3&&i&&i.isVector3?s.copy(i):this[e]=i}}toJSON(t){const e=t===void 0||typeof t=="string";e&&(t={textures:{},images:{}});const i={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,i.blending=this.blending,i.side=this.side,i.shadowSide=this.shadowSide,i.vertexColors=this.vertexColors,i.opacity=this.opacity,i.transparent=this.transparent,i.blendSrc=this.blendSrc,i.blendDst=this.blendDst,i.blendEquation=this.blendEquation,i.blendSrcAlpha=this.blendSrcAlpha,i.blendDstAlpha=this.blendDstAlpha,i.blendEquationAlpha=this.blendEquationAlpha,i.blendColor=this.blendColor.getHex(),i.blendAlpha=this.blendAlpha,i.depthFunc=this.depthFunc,i.depthTest=this.depthTest,i.depthWrite=this.depthWrite,i.colorWrite=this.colorWrite,i.clipIntersection=this.clipIntersection,i.clipShadows=this.clipShadows,i.stencilWriteMask=this.stencilWriteMask,i.stencilFunc=this.stencilFunc,i.stencilRef=this.stencilRef,i.stencilFuncMask=this.stencilFuncMask,i.stencilFail=this.stencilFail,i.stencilZFail=this.stencilZFail,i.stencilZPass=this.stencilZPass,i.stencilWrite=this.stencilWrite,i.polygonOffset=this.polygonOffset,i.polygonOffsetFactor=this.polygonOffsetFactor,i.polygonOffsetUnits=this.polygonOffsetUnits,i.dithering=this.dithering,i.alphaTest=this.alphaTest,i.alphaHash=this.alphaHash,i.alphaToCoverage=this.alphaToCoverage,i.premultipliedAlpha=this.premultipliedAlpha,i.forceSinglePass=this.forceSinglePass,i.allowOverride=this.allowOverride,i.visible=this.visible,i.toneMapped=this.toneMapped,i.name=this.name,this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(i.sheenColorMap=this.sheenColorMap.toJSON(t).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(i.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(t).uuid),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.retroreflectivity!==void 0&&(i.retroreflectivity=this.retroreflectivity),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(t).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(t).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(t).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(t).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(t).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(t).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(t).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(t).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(t).uuid),this.attenuationDistance!==void 0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),Array.isArray(this.clippingPlanes)&&this.clippingPlanes.length>0&&(i.clippingPlanes=this.clippingPlanes.map(n=>n.toJSON())),this.rotation!==void 0&&(i.rotation=this.rotation),this.depthPacking!==void 0&&(i.depthPacking=this.depthPacking),this.linewidth!==void 0&&(i.linewidth=this.linewidth),this.linecap!==void 0&&(i.linecap=this.linecap),this.linejoin!==void 0&&(i.linejoin=this.linejoin),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.wireframe!==void 0&&(i.wireframe=this.wireframe),this.wireframeLinewidth!==void 0&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!==void 0&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!==void 0&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading!==void 0&&(i.flatShading=this.flatShading),this.fog!==void 0&&(i.fog=this.fog),Object.keys(this.userData).length>0&&(i.userData=this.userData);function s(n){const r=[];for(const a in n){const o=n[a];delete o.metadata,r.push(o)}return r}if(e){const n=s(t.textures),r=s(t.images);n.length>0&&(i.textures=n),r.length>0&&(i.images=r)}return i}fromJSON(t,e){if(t.uuid!==void 0&&(this.uuid=t.uuid),t.name!==void 0&&(this.name=t.name),t.color!==void 0&&this.color!==void 0&&this.color.setHex(t.color),t.roughness!==void 0&&(this.roughness=t.roughness),t.metalness!==void 0&&(this.metalness=t.metalness),t.sheen!==void 0&&(this.sheen=t.sheen),t.sheenColor!==void 0&&(this.sheenColor=new U().setHex(t.sheenColor)),t.sheenRoughness!==void 0&&(this.sheenRoughness=t.sheenRoughness),t.emissive!==void 0&&this.emissive!==void 0&&this.emissive.setHex(t.emissive),t.specular!==void 0&&this.specular!==void 0&&this.specular.setHex(t.specular),t.specularIntensity!==void 0&&(this.specularIntensity=t.specularIntensity),t.specularColor!==void 0&&this.specularColor!==void 0&&this.specularColor.setHex(t.specularColor),t.shininess!==void 0&&(this.shininess=t.shininess),t.clearcoat!==void 0&&(this.clearcoat=t.clearcoat),t.clearcoatRoughness!==void 0&&(this.clearcoatRoughness=t.clearcoatRoughness),t.dispersion!==void 0&&(this.dispersion=t.dispersion),t.retroreflectivity!==void 0&&(this.retroreflectivity=t.retroreflectivity),t.iridescence!==void 0&&(this.iridescence=t.iridescence),t.iridescenceIOR!==void 0&&(this.iridescenceIOR=t.iridescenceIOR),t.iridescenceThicknessRange!==void 0&&(this.iridescenceThicknessRange=t.iridescenceThicknessRange),t.transmission!==void 0&&(this.transmission=t.transmission),t.thickness!==void 0&&(this.thickness=t.thickness),t.attenuationDistance!==void 0&&(this.attenuationDistance=t.attenuationDistance),t.attenuationColor!==void 0&&this.attenuationColor!==void 0&&this.attenuationColor.setHex(t.attenuationColor),t.anisotropy!==void 0&&(this.anisotropy=t.anisotropy),t.anisotropyRotation!==void 0&&(this.anisotropyRotation=t.anisotropyRotation),t.fog!==void 0&&(this.fog=t.fog),t.flatShading!==void 0&&(this.flatShading=t.flatShading),t.blending!==void 0&&(this.blending=t.blending),t.combine!==void 0&&(this.combine=t.combine),t.side!==void 0&&(this.side=t.side),t.shadowSide!==void 0&&(this.shadowSide=t.shadowSide),t.opacity!==void 0&&(this.opacity=t.opacity),t.transparent!==void 0&&(this.transparent=t.transparent),t.alphaTest!==void 0&&(this.alphaTest=t.alphaTest),t.alphaHash!==void 0&&(this.alphaHash=t.alphaHash),t.depthFunc!==void 0&&(this.depthFunc=t.depthFunc),t.depthTest!==void 0&&(this.depthTest=t.depthTest),t.depthWrite!==void 0&&(this.depthWrite=t.depthWrite),t.colorWrite!==void 0&&(this.colorWrite=t.colorWrite),t.clippingPlanes!==void 0&&(this.clippingPlanes=t.clippingPlanes.map(i=>new Ue().fromJSON(i))),t.clipIntersection!==void 0&&(this.clipIntersection=t.clipIntersection),t.clipShadows!==void 0&&(this.clipShadows=t.clipShadows),t.depthPacking!==void 0&&(this.depthPacking=t.depthPacking),t.blendSrc!==void 0&&(this.blendSrc=t.blendSrc),t.blendDst!==void 0&&(this.blendDst=t.blendDst),t.blendEquation!==void 0&&(this.blendEquation=t.blendEquation),t.blendSrcAlpha!==void 0&&(this.blendSrcAlpha=t.blendSrcAlpha),t.blendDstAlpha!==void 0&&(this.blendDstAlpha=t.blendDstAlpha),t.blendEquationAlpha!==void 0&&(this.blendEquationAlpha=t.blendEquationAlpha),t.blendColor!==void 0&&this.blendColor!==void 0&&this.blendColor.setHex(t.blendColor),t.blendAlpha!==void 0&&(this.blendAlpha=t.blendAlpha),t.stencilWriteMask!==void 0&&(this.stencilWriteMask=t.stencilWriteMask),t.stencilFunc!==void 0&&(this.stencilFunc=t.stencilFunc),t.stencilRef!==void 0&&(this.stencilRef=t.stencilRef),t.stencilFuncMask!==void 0&&(this.stencilFuncMask=t.stencilFuncMask),t.stencilFail!==void 0&&(this.stencilFail=t.stencilFail),t.stencilZFail!==void 0&&(this.stencilZFail=t.stencilZFail),t.stencilZPass!==void 0&&(this.stencilZPass=t.stencilZPass),t.stencilWrite!==void 0&&(this.stencilWrite=t.stencilWrite),t.wireframe!==void 0&&(this.wireframe=t.wireframe),t.wireframeLinewidth!==void 0&&(this.wireframeLinewidth=t.wireframeLinewidth),t.wireframeLinecap!==void 0&&(this.wireframeLinecap=t.wireframeLinecap),t.wireframeLinejoin!==void 0&&(this.wireframeLinejoin=t.wireframeLinejoin),t.rotation!==void 0&&(this.rotation=t.rotation),t.linewidth!==void 0&&(this.linewidth=t.linewidth),t.linecap!==void 0&&(this.linecap=t.linecap),t.linejoin!==void 0&&(this.linejoin=t.linejoin),t.dashSize!==void 0&&(this.dashSize=t.dashSize),t.gapSize!==void 0&&(this.gapSize=t.gapSize),t.scale!==void 0&&(this.scale=t.scale),t.polygonOffset!==void 0&&(this.polygonOffset=t.polygonOffset),t.polygonOffsetFactor!==void 0&&(this.polygonOffsetFactor=t.polygonOffsetFactor),t.polygonOffsetUnits!==void 0&&(this.polygonOffsetUnits=t.polygonOffsetUnits),t.dithering!==void 0&&(this.dithering=t.dithering),t.alphaToCoverage!==void 0&&(this.alphaToCoverage=t.alphaToCoverage),t.premultipliedAlpha!==void 0&&(this.premultipliedAlpha=t.premultipliedAlpha),t.forceSinglePass!==void 0&&(this.forceSinglePass=t.forceSinglePass),t.allowOverride!==void 0&&(this.allowOverride=t.allowOverride),t.visible!==void 0&&(this.visible=t.visible),t.toneMapped!==void 0&&(this.toneMapped=t.toneMapped),t.userData!==void 0&&(this.userData=t.userData),t.vertexColors!==void 0&&(typeof t.vertexColors=="number"?this.vertexColors=t.vertexColors>0:this.vertexColors=t.vertexColors),t.size!==void 0&&(this.size=t.size),t.sizeAttenuation!==void 0&&(this.sizeAttenuation=t.sizeAttenuation),t.map!==void 0&&(this.map=e[t.map]||null),t.matcap!==void 0&&(this.matcap=e[t.matcap]||null),t.alphaMap!==void 0&&(this.alphaMap=e[t.alphaMap]||null),t.bumpMap!==void 0&&(this.bumpMap=e[t.bumpMap]||null),t.bumpScale!==void 0&&(this.bumpScale=t.bumpScale),t.normalMap!==void 0&&(this.normalMap=e[t.normalMap]||null),t.normalMapType!==void 0&&(this.normalMapType=t.normalMapType),t.normalScale!==void 0){let i=t.normalScale;Array.isArray(i)===!1&&(i=[i,i]),this.normalScale=new I().fromArray(i)}return t.displacementMap!==void 0&&(this.displacementMap=e[t.displacementMap]||null),t.displacementScale!==void 0&&(this.displacementScale=t.displacementScale),t.displacementBias!==void 0&&(this.displacementBias=t.displacementBias),t.roughnessMap!==void 0&&(this.roughnessMap=e[t.roughnessMap]||null),t.metalnessMap!==void 0&&(this.metalnessMap=e[t.metalnessMap]||null),t.emissiveMap!==void 0&&(this.emissiveMap=e[t.emissiveMap]||null),t.emissiveIntensity!==void 0&&(this.emissiveIntensity=t.emissiveIntensity),t.specularMap!==void 0&&(this.specularMap=e[t.specularMap]||null),t.specularIntensityMap!==void 0&&(this.specularIntensityMap=e[t.specularIntensityMap]||null),t.specularColorMap!==void 0&&(this.specularColorMap=e[t.specularColorMap]||null),t.envMap!==void 0&&(this.envMap=e[t.envMap]||null),t.envMapRotation!==void 0&&this.envMapRotation.fromArray(t.envMapRotation),t.envMapIntensity!==void 0&&(this.envMapIntensity=t.envMapIntensity),t.reflectivity!==void 0&&(this.reflectivity=t.reflectivity),t.refractionRatio!==void 0&&(this.refractionRatio=t.refractionRatio),t.lightMap!==void 0&&(this.lightMap=e[t.lightMap]||null),t.lightMapIntensity!==void 0&&(this.lightMapIntensity=t.lightMapIntensity),t.aoMap!==void 0&&(this.aoMap=e[t.aoMap]||null),t.aoMapIntensity!==void 0&&(this.aoMapIntensity=t.aoMapIntensity),t.gradientMap!==void 0&&(this.gradientMap=e[t.gradientMap]||null),t.clearcoatMap!==void 0&&(this.clearcoatMap=e[t.clearcoatMap]||null),t.clearcoatRoughnessMap!==void 0&&(this.clearcoatRoughnessMap=e[t.clearcoatRoughnessMap]||null),t.clearcoatNormalMap!==void 0&&(this.clearcoatNormalMap=e[t.clearcoatNormalMap]||null),t.clearcoatNormalScale!==void 0&&(this.clearcoatNormalScale=new I().fromArray(t.clearcoatNormalScale)),t.iridescenceMap!==void 0&&(this.iridescenceMap=e[t.iridescenceMap]||null),t.iridescenceThicknessMap!==void 0&&(this.iridescenceThicknessMap=e[t.iridescenceThicknessMap]||null),t.transmissionMap!==void 0&&(this.transmissionMap=e[t.transmissionMap]||null),t.thicknessMap!==void 0&&(this.thicknessMap=e[t.thicknessMap]||null),t.anisotropyMap!==void 0&&(this.anisotropyMap=e[t.anisotropyMap]||null),t.sheenColorMap!==void 0&&(this.sheenColorMap=e[t.sheenColorMap]||null),t.sheenRoughnessMap!==void 0&&(this.sheenRoughnessMap=e[t.sheenRoughnessMap]||null),this}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const e=t.clippingPlanes;let i=null;if(e!==null){const s=e.length;i=new Array(s);for(let n=0;n!==s;++n)i[n]=e[n].clone()}return this.clippingPlanes=i,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.allowOverride=t.allowOverride,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){t===!0&&this.version++}}class zo extends gt{constructor(t){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new U(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this.fog=t.fog,this}}let ni;const Fi=new w,ri=new w,ai=new w,oi=new I,ki=new I,Bo=new G,ls=new w,Pi=new w,cs=new w,ga=new I,zn=new I,xa=new I;class oc extends ${constructor(t=new zo){if(super(),this.isSprite=!0,this.type="Sprite",ni===void 0){ni=new q;const e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),i=new pr(e,5);ni.setIndex([0,1,2,0,2,3]),ni.setAttribute("position",new Mi(i,3,0,!1)),ni.setAttribute("uv",new Mi(i,2,3,!1))}this.geometry=ni,this.material=t,this.center=new I(.5,.5),this.count=1}intersectsFrustum(t){return t.intersectsSprite(this)}raycast(t,e){t.camera===null&&X('Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),ri.setFromMatrixScale(this.matrixWorld),Bo.copy(t.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(t.camera.matrixWorldInverse,this.matrixWorld),ai.setFromMatrixPosition(this.modelViewMatrix),t.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&ri.multiplyScalar(-ai.z);const i=this.material.rotation;let s,n;i!==0&&(n=Math.cos(i),s=Math.sin(i));const r=this.center;us(ls.set(-.5,-.5,0),ai,r,ri,s,n),us(Pi.set(.5,-.5,0),ai,r,ri,s,n),us(cs.set(.5,.5,0),ai,r,ri,s,n),ga.set(0,0),zn.set(1,0),xa.set(1,1);let a=t.ray.intersectTriangle(ls,Pi,cs,!1,Fi);if(a===null&&(us(Pi.set(-.5,.5,0),ai,r,ri,s,n),zn.set(0,1),a=t.ray.intersectTriangle(ls,cs,Pi,!1,Fi),a===null))return;const o=t.ray.origin.distanceTo(Fi);o<t.near||o>t.far||e.push({distance:o,point:Fi.clone(),uv:Ot.getInterpolation(Fi,ls,Pi,cs,ga,zn,xa,new I),face:null,object:this})}copy(t,e){return super.copy(t,e),t.center!==void 0&&this.center.copy(t.center),this.material=t.material,this}}function us(l,t,e,i,s,n){oi.subVectors(l,e).addScalar(.5).multiply(i),s!==void 0?(ki.x=n*oi.x-s*oi.y,ki.y=s*oi.x+n*oi.y):ki.copy(oi),l.copy(t),l.x+=ki.x,l.y+=ki.y,l.applyMatrix4(Bo)}const ds=new w,ba=new w;class hc extends ${constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(t){super.copy(t,!1);const e=t.levels;for(let i=0,s=e.length;i<s;i++){const n=e[i];this.addLevel(n.object.clone(),n.distance,n.hysteresis)}return this.autoUpdate=t.autoUpdate,this}addLevel(t,e=0,i=0){e=Math.abs(e);const s=this.levels;let n;for(n=0;n<s.length&&!(e<s[n].distance);n++);return s.splice(n,0,{distance:e,hysteresis:i,object:t}),this.add(t),this}removeLevel(t){const e=this.levels;for(let i=0;i<e.length;i++)if(e[i].distance===t){const s=e.splice(i,1);return this.remove(s[0].object),!0}return!1}getCurrentLevel(){return this._currentLevel}getObjectForDistance(t){const e=this.levels;if(e.length>0){let i,s;for(i=1,s=e.length;i<s;i++){let n=e[i].distance;if(e[i].object.visible&&(n-=n*e[i].hysteresis),t<n)break}return e[i-1].object}return null}raycast(t,e){if(this.levels.length>0){ds.setFromMatrixPosition(this.matrixWorld);const s=t.ray.origin.distanceTo(ds);this.getObjectForDistance(s).raycast(t,e)}}update(t){const e=this.levels;if(e.length>1){ds.setFromMatrixPosition(t.matrixWorld),ba.setFromMatrixPosition(this.matrixWorld);const i=ds.distanceTo(ba)/t.zoom;e[0].object.visible=!0;let s,n;for(s=1,n=e.length;s<n;s++){let r=e[s].distance;if(e[s].object.visible&&(r-=r*e[s].hysteresis),i>=r)e[s-1].object.visible=!1,e[s].object.visible=!0;else break}for(this._currentLevel=s-1;s<n;s++)e[s].object.visible=!1}}toJSON(t){const e=super.toJSON(t);e.object.autoUpdate=this.autoUpdate,e.object.levels=[];const i=this.levels;for(let s=0,n=i.length;s<n;s++){const r=i[s];e.object.levels.push({object:r.object.uuid,distance:r.distance,hysteresis:r.hysteresis})}return e}}const ce=new w,Bn=new w,ps=new w,fs=new w;class ji{constructor(t=new w,e=new w(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,ce)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);const i=e.dot(this.direction);return i<0?e.copy(this.origin):e.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const e=ce.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(ce.copy(this.origin).addScaledVector(this.direction,e),ce.distanceToSquared(t))}distanceSqToSegment(t,e,i,s){Bn.copy(t).add(e).multiplyScalar(.5),ps.copy(e).sub(t).normalize(),fs.copy(this.origin).sub(Bn);const n=t.distanceTo(e)*.5,r=-this.direction.dot(ps),a=fs.dot(this.direction),o=-fs.dot(ps),h=fs.lengthSq(),c=Math.abs(1-r*r);let u,d,p,f;if(c>0)if(u=r*o-a,d=r*a-o,f=n*c,u>=0)if(d>=-f)if(d<=f){const m=1/c;u*=m,d*=m,p=u*(u+r*d+2*a)+d*(r*u+d+2*o)+h}else d=n,u=Math.max(0,-(r*d+a)),p=-u*u+d*(d+2*o)+h;else d=-n,u=Math.max(0,-(r*d+a)),p=-u*u+d*(d+2*o)+h;else d<=-f?(u=Math.max(0,-(-r*n+a)),d=u>0?-n:Math.min(Math.max(-n,-o),n),p=-u*u+d*(d+2*o)+h):d<=f?(u=0,d=Math.min(Math.max(-n,-o),n),p=d*(d+2*o)+h):(u=Math.max(0,-(r*n+a)),d=u>0?n:Math.min(Math.max(-n,-o),n),p=-u*u+d*(d+2*o)+h);else d=r>0?-n:n,u=Math.max(0,-(r*d+a)),p=-u*u+d*(d+2*o)+h;return i&&i.copy(this.origin).addScaledVector(this.direction,u),s&&s.copy(Bn).addScaledVector(ps,d),p}intersectSphere(t,e){if(t.radius<0)return null;ce.subVectors(t.center,this.origin);const i=ce.dot(this.direction),s=ce.dot(ce)-i*i,n=t.radius*t.radius;if(s>n)return null;const r=Math.sqrt(n-s),a=i-r,o=i+r;return o<0?null:a<0?this.at(o,e):this.at(a,e)}intersectsSphere(t){return t.radius<0?!1:this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const e=t.normal.dot(this.direction);if(e===0)return t.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(t.normal)+t.constant)/e;return i>=0?i:null}intersectPlane(t,e){const i=this.distanceToPlane(t);return i===null?null:this.at(i,e)}intersectsPlane(t){const e=t.distanceToPoint(this.origin);return e===0||t.normal.dot(this.direction)*e<0}intersectBox(t,e){let i,s,n,r,a,o;const h=1/this.direction.x,c=1/this.direction.y,u=1/this.direction.z,d=this.origin;return h>=0?(i=(t.min.x-d.x)*h,s=(t.max.x-d.x)*h):(i=(t.max.x-d.x)*h,s=(t.min.x-d.x)*h),c>=0?(n=(t.min.y-d.y)*c,r=(t.max.y-d.y)*c):(n=(t.max.y-d.y)*c,r=(t.min.y-d.y)*c),i>r||n>s||((n>i||isNaN(i))&&(i=n),(r<s||isNaN(s))&&(s=r),u>=0?(a=(t.min.z-d.z)*u,o=(t.max.z-d.z)*u):(a=(t.max.z-d.z)*u,o=(t.min.z-d.z)*u),i>o||a>s)||((a>i||i!==i)&&(i=a),(o<s||s!==s)&&(s=o),s<0)?null:this.at(i>=0?i:s,e)}intersectsBox(t){return this.intersectBox(t,ce)!==null}intersectTriangle(t,e,i,s,n){const r=this.origin,a=this.direction,o=a.x,h=a.y,c=a.z,u=t.x-r.x,d=t.y-r.y,p=t.z-r.z,f=e.x-r.x,m=e.y-r.y,y=e.z-r.z,g=i.x-r.x,x=i.y-r.y,b=i.z-r.z,M=Math.abs(o),_=Math.abs(h),v=Math.abs(c);let A,S,T,C,B,R,L,J,N,Q,K,ut;if(M>=_&&M>=v?(T=o,R=u,N=f,ut=g,o>=0?(A=h,S=c,C=d,B=p,L=m,J=y,Q=x,K=b):(A=c,S=h,C=p,B=d,L=y,J=m,Q=b,K=x)):_>=v?(T=h,R=d,N=m,ut=x,h>=0?(A=c,S=o,C=p,B=u,L=y,J=f,Q=b,K=g):(A=o,S=c,C=u,B=p,L=f,J=y,Q=g,K=b)):(T=c,R=p,N=y,ut=b,c>=0?(A=o,S=h,C=u,B=d,L=f,J=m,Q=g,K=x):(A=h,S=o,C=d,B=u,L=m,J=f,Q=x,K=g)),T===0)return null;const j=A/T,tt=S/T,et=1/T,vt=C-j*R,xt=B-tt*R,ne=L-j*N,ge=J-tt*N,ts=Q-j*ut,es=K-tt*ut,xe=ts*ge-es*ne,bt=vt*es-xt*ts,Yt=ne*xt-ge*vt;if(s){if(xe<0||bt<0||Yt<0)return null}else if((xe<0||bt<0||Yt<0)&&(xe>0||bt>0||Yt>0))return null;const Ti=xe+bt+Yt;if(Ti===0)return null;const zt=et*(xe*R+bt*N+Yt*ut);return(Ti>0?zt<0:zt>0)?null:this.at(zt/Ti,n)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class vi extends gt{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new U(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new te,this.combine=nr,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}const Ma=new G,Fe=new ji,ms=new yt,wa=new w,ys=new w,gs=new w,xs=new w,Fn=new w,bs=new w,_a=new w,Ms=new w;class ie extends ${constructor(t=new q,e=new vi){super(),this.isMesh=!0,this.type="Mesh",this.geometry=t,this.material=e,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),t.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),t.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}updateMorphTargets(){const e=this.geometry.morphAttributes,i=Object.keys(e);if(i.length>0){const s=e[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let n=0,r=s.length;n<r;n++){const a=s[n].name||String(n);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=n}}}}getVertexPosition(t,e){const i=this.geometry,s=i.attributes.position,n=i.morphAttributes.position,r=i.morphTargetsRelative;e.fromBufferAttribute(s,t);const a=this.morphTargetInfluences;if(n&&a){bs.set(0,0,0);for(let o=0,h=n.length;o<h;o++){const c=a[o],u=n[o];c!==0&&(Fn.fromBufferAttribute(u,t),r?bs.addScaledVector(Fn,c):bs.addScaledVector(Fn.sub(e),c))}e.add(bs)}return e}intersectsFrustum(t){return t.intersectsObject(this)}raycast(t,e){const i=this.geometry,s=this.material,n=this.matrixWorld;s!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),ms.copy(i.boundingSphere),ms.applyMatrix4(n),Fe.copy(t.ray).recast(t.near),!(ms.containsPoint(Fe.origin)===!1&&(Fe.intersectSphere(ms,wa)===null||Fe.origin.distanceToSquared(wa)>(t.far-t.near)**2))&&(Ma.copy(n).invert(),Fe.copy(t.ray).applyMatrix4(Ma),!(i.boundingBox!==null&&Fe.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(t,e,Fe)))}_computeIntersections(t,e,i){let s;const n=this.geometry,r=this.material,a=n.index,o=n.attributes.position,h=n.attributes.uv,c=n.attributes.uv1,u=n.attributes.normal,d=n.groups,p=n.drawRange;if(a!==null)if(Array.isArray(r))for(let f=0,m=d.length;f<m;f++){const y=d[f],g=r[y.materialIndex],x=Math.max(y.start,p.start),b=Math.min(a.count,Math.min(y.start+y.count,p.start+p.count));for(let M=x,_=b;M<_;M+=3){const v=a.getX(M),A=a.getX(M+1),S=a.getX(M+2);s=ws(this,g,t,i,h,c,u,v,A,S),s&&(s.faceIndex=Math.floor(M/3),s.face.materialIndex=y.materialIndex,e.push(s))}}else{const f=Math.max(0,p.start),m=Math.min(a.count,p.start+p.count);for(let y=f,g=m;y<g;y+=3){const x=a.getX(y),b=a.getX(y+1),M=a.getX(y+2);s=ws(this,r,t,i,h,c,u,x,b,M),s&&(s.faceIndex=Math.floor(y/3),e.push(s))}}else if(o!==void 0)if(Array.isArray(r))for(let f=0,m=d.length;f<m;f++){const y=d[f],g=r[y.materialIndex],x=Math.max(y.start,p.start),b=Math.min(o.count,Math.min(y.start+y.count,p.start+p.count));for(let M=x,_=b;M<_;M+=3){const v=M,A=M+1,S=M+2;s=ws(this,g,t,i,h,c,u,v,A,S),s&&(s.faceIndex=Math.floor(M/3),s.face.materialIndex=y.materialIndex,e.push(s))}}else{const f=Math.max(0,p.start),m=Math.min(o.count,p.start+p.count);for(let y=f,g=m;y<g;y+=3){const x=y,b=y+1,M=y+2;s=ws(this,r,t,i,h,c,u,x,b,M),s&&(s.faceIndex=Math.floor(y/3),e.push(s))}}}}function lc(l,t,e,i,s,n,r,a){let o;if(t.side===ah?o=i.intersectTriangle(r,n,s,!0,a):o=i.intersectTriangle(s,n,r,t.side===go,a),o===null)return null;Ms.copy(a),Ms.applyMatrix4(l.matrixWorld);const h=e.ray.origin.distanceTo(Ms);return h<e.near||h>e.far?null:{distance:h,point:Ms.clone(),object:l}}function ws(l,t,e,i,s,n,r,a,o,h){l.getVertexPosition(a,ys),l.getVertexPosition(o,gs),l.getVertexPosition(h,xs);const c=lc(l,t,e,i,ys,gs,xs,_a);if(c){const u=new w;Ot.getBarycoord(_a,ys,gs,xs,u),s&&(c.uv=Ot.getInterpolatedAttribute(s,a,o,h,u,new I)),n&&(c.uv1=Ot.getInterpolatedAttribute(n,a,o,h,u,new I)),r&&(c.normal=Ot.getInterpolatedAttribute(r,a,o,h,u,new w),c.normal.dot(i.direction)>0&&c.normal.multiplyScalar(-1));const d={a,b:o,c:h,normal:new w,materialIndex:0};Ot.getNormal(ys,gs,xs,d.normal),c.face=d,c.barycoord=u}return c}const Ri=new Ct,va=new Ct,Sa=new Ct,cc=new Ct,Aa=new G,_s=new w,kn=new yt,Ta=new G,Pn=new ji;class uc extends ie{constructor(t,e){super(t,e),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=Kr,this.bindMatrix=new G,this.bindMatrixInverse=new G,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const t=this.geometry;this.boundingBox===null&&(this.boundingBox=new _t),this.boundingBox.makeEmpty();const e=t.getAttribute("position");for(let i=0;i<e.count;i++)this.getVertexPosition(i,_s),this.boundingBox.expandByPoint(_s)}computeBoundingSphere(){const t=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new yt),this.boundingSphere.makeEmpty();const e=t.getAttribute("position");for(let i=0;i<e.count;i++)this.getVertexPosition(i,_s),this.boundingSphere.expandByPoint(_s)}copy(t,e){return super.copy(t,e),this.bindMode=t.bindMode,this.bindMatrix.copy(t.bindMatrix),this.bindMatrixInverse.copy(t.bindMatrixInverse),this.skeleton=t.skeleton,t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),this}raycast(t,e){const i=this.material,s=this.matrixWorld;i!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),kn.copy(this.boundingSphere),kn.applyMatrix4(s),t.ray.intersectsSphere(kn)!==!1&&(Ta.copy(s).invert(),Pn.copy(t.ray).applyMatrix4(Ta),!(this.boundingBox!==null&&Pn.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(t,e,Pn)))}getVertexPosition(t,e){return super.getVertexPosition(t,e),this.applyBoneTransform(t,e),e}bind(t,e){this.skeleton=t,e===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.copy(e).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const t=new Ct,e=this.geometry.attributes.skinWeight;for(let i=0,s=e.count;i<s;i++){t.fromBufferAttribute(e,i);const n=1/t.manhattanLength();n!==1/0?t.multiplyScalar(n):t.set(1,0,0,0),e.setXYZW(i,t.x,t.y,t.z,t.w)}}updateMatrixWorld(t){super.updateMatrixWorld(t),this.bindMode===Kr?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===uh?this.bindMatrixInverse.copy(this.bindMatrix).invert():V("SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(t,e){const i=this.skeleton,s=this.geometry;va.fromBufferAttribute(s.attributes.skinIndex,t),Sa.fromBufferAttribute(s.attributes.skinWeight,t),e.isVector4?(Ri.copy(e),e.set(0,0,0,0)):(Ri.set(...e,1),e.set(0,0,0)),Ri.applyMatrix4(this.bindMatrix);for(let n=0;n<4;n++){const r=Sa.getComponent(n);if(r!==0){const a=va.getComponent(n);Aa.multiplyMatrices(i.bones[a].matrixWorld,i.boneInverses[a]),e.addScaledVector(cc.copy(Ri).applyMatrix4(Aa),r)}}return e.isVector4&&(e.w=Ri.w),e.applyMatrix4(this.bindMatrixInverse)}}class Fo extends ${constructor(){super(),this.isBone=!0,this.type="Bone"}}class Kt extends ht{constructor(t=null,e=1,i=1,s,n,r,a,o,h=Nt,c=Nt,u,d){super(null,r,a,o,h,c,s,n,u,d),this.isDataTexture=!0,this.image={data:t,width:e,height:i},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const Ca=new G,dc=new G;class fr{constructor(t=[],e=[]){this.uuid=Et(),this.bones=t.slice(0),this.boneInverses=e,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const t=this.bones,e=this.boneInverses;if(this.boneMatrices=new Float32Array(t.length*16),e.length===0)this.calculateInverses();else if(t.length!==e.length){V("Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let i=0,s=this.bones.length;i<s;i++)this.boneInverses.push(new G)}}calculateInverses(){this.boneInverses.length=0;for(let t=0,e=this.bones.length;t<e;t++){const i=new G;this.bones[t]&&i.copy(this.bones[t].matrixWorld).invert(),this.boneInverses.push(i)}}pose(){for(let t=0,e=this.bones.length;t<e;t++){const i=this.bones[t];i&&i.matrixWorld.copy(this.boneInverses[t]).invert()}for(let t=0,e=this.bones.length;t<e;t++){const i=this.bones[t];i&&(i.parent&&i.parent.isBone?(i.matrix.copy(i.parent.matrixWorld).invert(),i.matrix.multiply(i.matrixWorld)):i.matrix.copy(i.matrixWorld),i.matrix.decompose(i.position,i.quaternion,i.scale))}}update(){const t=this.bones,e=this.boneInverses,i=this.boneMatrices,s=this.boneTexture;for(let n=0,r=t.length;n<r;n++){const a=t[n]?t[n].matrixWorld:dc;Ca.multiplyMatrices(a,e[n]),Ca.toArray(i,n*16)}s!==null&&(s.needsUpdate=!0)}clone(){return new fr(this.bones,this.boneInverses)}computeBoneTexture(){let t=Math.sqrt(this.bones.length*4);t=Math.ceil(t/4)*4,t=Math.max(t,4);const e=new Float32Array(t*t*4);e.set(this.boneMatrices);const i=new Kt(e,t,t,Ji,xi);return i.needsUpdate=!0,this.boneMatrices=e,this.boneTexture=i,this}getBoneByName(t){for(let e=0,i=this.bones.length;e<i;e++){const s=this.bones[e];if(s.name===t)return s}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(t,e){this.uuid=t.uuid;for(let i=0,s=t.bones.length;i<s;i++){const n=t.bones[i];let r=e[n];r===void 0&&(V("Skeleton: No bone found with UUID:",n),r=new Fo),this.bones.push(r),this.boneInverses.push(new G().fromArray(t.boneInverses[i]))}return this.init(),this}toJSON(){const t={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};t.uuid=this.uuid;const e=this.bones,i=this.boneInverses;for(let s=0,n=e.length;s<n;s++){const r=e[s];t.bones.push(r.uuid);const a=i[s];t.boneInverses.push(a.toArray())}return t}}class Yi extends rt{constructor(t,e,i,s=1){super(t,e,i),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=s}copy(t){return super.copy(t),this.meshPerAttribute=t.meshPerAttribute,this}toJSON(){const t=super.toJSON();return t.meshPerAttribute=this.meshPerAttribute,t.isInstancedBufferAttribute=!0,t}}const hi=new G,Ia=new G,vs=[],za=new _t,pc=new G,Oi=new ie,Ei=new yt;class fc extends ie{constructor(t,e,i){super(t,e),this.isInstancedMesh=!0,this.instanceMatrix=new Yi(new Float32Array(i*16),16),this.instanceColor=null,this.morphTexture=null,this.count=i,this.boundingBox=null,this.boundingSphere=null;for(let s=0;s<i;s++)this.setMatrixAt(s,pc)}computeBoundingBox(){const t=this.geometry,e=this.count;this.boundingBox===null&&(this.boundingBox=new _t),t.boundingBox===null&&t.computeBoundingBox(),this.boundingBox.makeEmpty();for(let i=0;i<e;i++)this.getMatrixAt(i,hi),za.copy(t.boundingBox).applyMatrix4(hi),this.boundingBox.union(za)}computeBoundingSphere(){const t=this.geometry,e=this.count;this.boundingSphere===null&&(this.boundingSphere=new yt),t.boundingSphere===null&&t.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let i=0;i<e;i++)this.getMatrixAt(i,hi),Ei.copy(t.boundingSphere).applyMatrix4(hi),this.boundingSphere.union(Ei)}copy(t,e){return super.copy(t,e),this.instanceMatrix.copy(t.instanceMatrix),t.morphTexture!==null&&(this.morphTexture=t.morphTexture.clone()),t.instanceColor!==null&&(this.instanceColor=t.instanceColor.clone()),this.count=t.count,t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),this}getColorAt(t,e){return this.instanceColor===null?e.setRGB(1,1,1):e.fromArray(this.instanceColor.array,t*3)}getMatrixAt(t,e){return e.fromArray(this.instanceMatrix.array,t*16)}getMorphAt(t,e){const i=e.morphTargetInfluences,s=this.morphTexture.source.data.data,n=i.length+1,r=t*n+1;for(let a=0;a<i.length;a++)i[a]=s[r+a]}raycast(t,e){const i=this.matrixWorld,s=this.count;if(Oi.geometry=this.geometry,Oi.material=this.material,Oi.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),Ei.copy(this.boundingSphere),Ei.applyMatrix4(i),t.ray.intersectsSphere(Ei)!==!1))for(let n=0;n<s;n++){this.getMatrixAt(n,hi),Ia.multiplyMatrices(i,hi),Oi.matrixWorld=Ia,Oi.raycast(t,vs);for(let r=0,a=vs.length;r<a;r++){const o=vs[r];o.instanceId=n,o.object=this,e.push(o)}vs.length=0}}setColorAt(t,e){return this.instanceColor===null&&(this.instanceColor=new Yi(new Float32Array(this.instanceMatrix.count*3).fill(1),3)),e.toArray(this.instanceColor.array,t*3),this}setMatrixAt(t,e){return e.toArray(this.instanceMatrix.array,t*16),this}setMorphAt(t,e){const i=e.morphTargetInfluences,s=i.length+1;this.morphTexture===null&&(this.morphTexture=new Kt(new Float32Array(s*this.count),s,this.count,xo,xi));const n=this.morphTexture.source.data.data;let r=0;for(let h=0;h<i.length;h++)r+=i[h];const a=this.geometry.morphTargetsRelative?1:1-r,o=s*t;return n[o]=a,n.set(i,o+1),this}updateMorphTargets(){}dispose(){super.dispose(),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null)}}const ke=new yt,mc=new I(.5,.5),Ss=new w;class Ys{constructor(t=new Ue,e=new Ue,i=new Ue,s=new Ue,n=new Ue,r=new Ue){this.planes=[t,e,i,s,n,r]}set(t,e,i,s,n,r){const a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(i),a[3].copy(s),a[4].copy(n),a[5].copy(r),this}copy(t){const e=this.planes;for(let i=0;i<6;i++)e[i].copy(t.planes[i]);return this}setFromProjectionMatrix(t,e=Qt,i=!1){const s=this.planes,n=t.elements,r=n[0],a=n[1],o=n[2],h=n[3],c=n[4],u=n[5],d=n[6],p=n[7],f=n[8],m=n[9],y=n[10],g=n[11],x=n[12],b=n[13],M=n[14],_=n[15];if(s[0].setComponents(h-r,p-c,g-f,_-x).normalize(),s[1].setComponents(h+r,p+c,g+f,_+x).normalize(),s[2].setComponents(h+a,p+u,g+m,_+b).normalize(),s[3].setComponents(h-a,p-u,g-m,_-b).normalize(),i)s[4].setComponents(o,d,y,M).normalize(),s[5].setComponents(h-o,p-d,g-y,_-M).normalize();else if(s[4].setComponents(h-o,p-d,g-y,_-M).normalize(),e===Qt)s[5].setComponents(h+o,p+d,g+y,_+M).normalize();else if(e===bi)s[5].setComponents(o,d,y,M).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+e);return this}intersectsObject(t){if(t.boundingSphere!==void 0)t.boundingSphere===null&&t.computeBoundingSphere(),ke.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;e.boundingSphere===null&&e.computeBoundingSphere(),ke.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(ke)}intersectsSprite(t){ke.center.set(0,0,0);const e=mc.distanceTo(t.center);return ke.radius=.7071067811865476+e,ke.applyMatrix4(t.matrixWorld),this.intersectsSphere(ke)}intersectsSphere(t){const e=this.planes,i=t.center,s=-t.radius;for(let n=0;n<6;n++)if(e[n].distanceToPoint(i)<s)return!1;return!0}intersectsBox(t){const e=this.planes;for(let i=0;i<6;i++){const s=e[i];if(Ss.x=s.normal.x>0?t.max.x:t.min.x,Ss.y=s.normal.y>0?t.max.y:t.min.y,Ss.z=s.normal.z>0?t.max.z:t.min.z,s.distanceToPoint(Ss)<0)return!1}return!0}containsPoint(t){const e=this.planes;for(let i=0;i<6;i++)if(e[i].distanceToPoint(t)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}const Ba=new G;class mr{constructor(){this.coordinateSystem=Qt,this._frustums=[],this._count=0}setFromArrayCamera(t){const e=t.cameras,i=this._frustums;for(let s=0;s<e.length;s++){const n=e[s];Ba.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),i[s]===void 0&&(i[s]=new Ys),i[s].setFromProjectionMatrix(Ba,n.coordinateSystem,n.reversedDepth)}return this._count=e.length,this}intersectsObject(t){const e=this._frustums;for(let i=0;i<this._count;i++)if(e[i].intersectsObject(t))return!0;return!1}intersectsSprite(t){const e=this._frustums;for(let i=0;i<this._count;i++)if(e[i].intersectsSprite(t))return!0;return!1}intersectsSphere(t){const e=this._frustums;for(let i=0;i<this._count;i++)if(e[i].intersectsSphere(t))return!0;return!1}intersectsBox(t){const e=this._frustums;for(let i=0;i<this._count;i++)if(e[i].intersectsBox(t))return!0;return!1}containsPoint(t){const e=this._frustums;for(let i=0;i<this._count;i++)if(e[i].containsPoint(t))return!0;return!1}copy(t){this.coordinateSystem=t.coordinateSystem;const e=this._frustums,i=t._frustums;for(let s=0;s<t._count;s++)e[s]===void 0&&(e[s]=new Ys),e[s].copy(i[s]);return this._count=t._count,this}clone(){return new mr().copy(this)}}function Rn(l,t){return l-t}function yc(l,t){return l.z-t.z}function gc(l,t){return t.z-l.z}class xc{constructor(){this.index=0,this.pool=[],this.list=[]}push(t,e,i,s){const n=this.pool,r=this.list;this.index>=n.length&&n.push({start:-1,count:-1,z:-1,index:-1});const a=n[this.index];r.push(a),this.index++,a.start=t,a.count=e,a.z=i,a.index=s}reset(){this.list.length=0,this.index=0}}const St=new G,bc=new U(1,1,1),Mc=new Ys,wc=new mr,As=new _t,Pe=new yt,Ni=new w,Fa=new w,_c=new w,On=new xc,mt=new ie,Ts=[];function vc(l,t,e=0){const i=t.itemSize;if(l.isInterleavedBufferAttribute||l.array.constructor!==t.array.constructor){const s=l.count;for(let n=0;n<s;n++)for(let r=0;r<i;r++)t.setComponent(n+e,r,l.getComponent(n,r))}else t.array.set(l.array,e*i);t.needsUpdate=!0}function Re(l,t){if(l.constructor!==t.constructor){const e=Math.min(l.length,t.length);for(let i=0;i<e;i++)t[i]=l[i]}else{const e=Math.min(l.length,t.length);t.set(new l.constructor(l.buffer,0,e))}}class Sc extends ie{constructor(t,e,i=e*2,s){super(new q,s),this.isBatchedMesh=!0,this.perObjectFrustumCulled=!0,this.sortObjects=!0,this.boundingBox=null,this.boundingSphere=null,this.customSort=null,this._instanceInfo=[],this._geometryInfo=[],this._availableInstanceIds=[],this._availableGeometryIds=[],this._nextIndexStart=0,this._nextVertexStart=0,this._geometryCount=0,this._visibilityChanged=!0,this._geometryInitialized=!1,this._maxInstanceCount=t,this._maxVertexCount=e,this._maxIndexCount=i,this._multiDrawCounts=new Int32Array(t),this._multiDrawStarts=new Int32Array(t),this._multiDrawCount=0,this._multiDrawBytesPerElement=1,this._matricesTexture=null,this._indirectTexture=null,this._colorsTexture=null,this._initMatricesTexture(),this._initIndirectTexture()}get maxInstanceCount(){return this._maxInstanceCount}get instanceCount(){return this._instanceInfo.length-this._availableInstanceIds.length}get unusedVertexCount(){return this._maxVertexCount-this._nextVertexStart}get unusedIndexCount(){return this._maxIndexCount-this._nextIndexStart}_initMatricesTexture(){let t=Math.sqrt(this._maxInstanceCount*4);t=Math.ceil(t/4)*4,t=Math.max(t,4);const e=new Float32Array(t*t*4),i=new Kt(e,t,t,Ji,xi);this._matricesTexture=i}_initIndirectTexture(){let t=Math.sqrt(this._maxInstanceCount);t=Math.ceil(t);const e=new Uint32Array(t*t),i=new Kt(e,t,t,bo,sn);this._indirectTexture=i}_initColorsTexture(){let t=Math.sqrt(this._maxInstanceCount);t=Math.ceil(t);const e=new Float32Array(t*t*4).fill(1),i=new Kt(e,t,t,Ji,xi);i.colorSpace=Rt.workingColorSpace,this._colorsTexture=i}_initializeGeometry(t){const e=this.geometry,i=this._maxVertexCount,s=this._maxIndexCount;if(this._geometryInitialized===!1){for(const n in t.attributes){const r=t.getAttribute(n),{array:a,itemSize:o,normalized:h}=r,c=new a.constructor(i*o),u=new rt(c,o,h);e.setAttribute(n,u)}if(t.getIndex()!==null){const n=i>65535?new Uint32Array(s):new Uint16Array(s);e.setIndex(new rt(n,1))}this._geometryInitialized=!0}}_validateGeometry(t){const e=this.geometry;if(!!t.getIndex()!=!!e.getIndex())throw new Error('THREE.BatchedMesh: All geometries must consistently have "index".');for(const i in e.attributes){if(!t.hasAttribute(i))throw new Error(`THREE.BatchedMesh: Added geometry missing "${i}". All geometries must have consistent attributes.`);const s=t.getAttribute(i),n=e.getAttribute(i);if(s.itemSize!==n.itemSize||s.normalized!==n.normalized)throw new Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(t){const e=this._instanceInfo;if(t<0||t>=e.length||e[t].active===!1)throw new Error(`THREE.BatchedMesh: Invalid instanceId ${t}. Instance is either out of range or has been deleted.`)}validateGeometryId(t){const e=this._geometryInfo;if(t<0||t>=e.length||e[t].active===!1)throw new Error(`THREE.BatchedMesh: Invalid geometryId ${t}. Geometry is either out of range or has been deleted.`)}setCustomSort(t){return this.customSort=t,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new _t);const t=this.boundingBox,e=this._instanceInfo;t.makeEmpty();for(let i=0,s=e.length;i<s;i++){if(e[i].active===!1)continue;const n=e[i].geometryIndex;this.getMatrixAt(i,St),this.getBoundingBoxAt(n,As).applyMatrix4(St),t.union(As)}}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new yt);const t=this.boundingSphere,e=this._instanceInfo;t.makeEmpty();for(let i=0,s=e.length;i<s;i++){if(e[i].active===!1)continue;const n=e[i].geometryIndex;this.getMatrixAt(i,St),this.getBoundingSphereAt(n,Pe).applyMatrix4(St),t.union(Pe)}}addInstance(t){if(this._instanceInfo.length>=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("THREE.BatchedMesh: Maximum item count reached.");const i={visible:!0,active:!0,geometryIndex:t};let s=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(Rn),s=this._availableInstanceIds.shift(),this._instanceInfo[s]=i):(s=this._instanceInfo.length,this._instanceInfo.push(i));const n=this._matricesTexture;St.identity().toArray(n.image.data,s*16),n.needsUpdate=!0;const r=this._colorsTexture;return r&&(bc.toArray(r.image.data,s*4),r.needsUpdate=!0),this._visibilityChanged=!0,s}addGeometry(t,e=-1,i=-1){this._initializeGeometry(t),this._validateGeometry(t);const s={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},n=this._geometryInfo;s.vertexStart=this._nextVertexStart,s.reservedVertexCount=e===-1?t.getAttribute("position").count:e;const r=t.getIndex();if(r!==null&&(s.indexStart=this._nextIndexStart,s.reservedIndexCount=i===-1?r.count:i),s.indexStart!==-1&&s.indexStart+s.reservedIndexCount>this._maxIndexCount||s.vertexStart+s.reservedVertexCount>this._maxVertexCount)throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");let o;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(Rn),o=this._availableGeometryIds.shift(),n[o]=s):(o=this._geometryCount,this._geometryCount++,n.push(s)),this.setGeometryAt(o,t),this._nextIndexStart=s.indexStart+s.reservedIndexCount,this._nextVertexStart=s.vertexStart+s.reservedVertexCount,o}setGeometryAt(t,e){if(t>=this._geometryCount)throw new Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(e);const i=this.geometry,s=i.getIndex()!==null,n=i.getIndex(),r=e.getIndex(),a=this._geometryInfo[t];if(s&&r.count>a.reservedIndexCount||e.attributes.position.count>a.reservedVertexCount)throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");const o=a.vertexStart,h=a.reservedVertexCount;a.vertexCount=e.getAttribute("position").count;for(const c in i.attributes){const u=e.getAttribute(c),d=i.getAttribute(c);vc(u,d,o);const p=u.itemSize;for(let f=u.count,m=h;f<m;f++){const y=o+f;for(let g=0;g<p;g++)d.setComponent(y,g,0)}d.needsUpdate=!0,d.addUpdateRange(o*p,h*p)}if(s){const c=a.indexStart,u=a.reservedIndexCount;a.indexCount=e.getIndex().count;for(let d=0;d<r.count;d++)n.setX(c+d,o+r.getX(d));for(let d=r.count,p=u;d<p;d++)n.setX(c+d,o);n.needsUpdate=!0,n.addUpdateRange(c,a.reservedIndexCount)}return a.start=s?a.indexStart:a.vertexStart,a.count=s?a.indexCount:a.vertexCount,a.boundingBox=null,e.boundingBox!==null&&(a.boundingBox=e.boundingBox.clone()),a.boundingSphere=null,e.boundingSphere!==null&&(a.boundingSphere=e.boundingSphere.clone()),this._visibilityChanged=!0,t}deleteGeometry(t){const e=this._geometryInfo;if(t>=e.length||e[t].active===!1)return this;const i=this._instanceInfo;for(let s=0,n=i.length;s<n;s++)i[s].active&&i[s].geometryIndex===t&&this.deleteInstance(s);return e[t].active=!1,this._availableGeometryIds.push(t),this._visibilityChanged=!0,this}deleteInstance(t){return this.validateInstanceId(t),this._instanceInfo[t].active=!1,this._availableInstanceIds.push(t),this._visibilityChanged=!0,this}optimize(){let t=0,e=0;const i=this._geometryInfo,s=i.map((r,a)=>a).sort((r,a)=>i[r].vertexStart-i[a].vertexStart),n=this.geometry;for(let r=0,a=i.length;r<a;r++){const o=s[r],h=i[o];if(h.active!==!1){if(n.index!==null){if(h.indexStart!==e){const{indexStart:c,vertexStart:u,reservedIndexCount:d}=h,p=n.index,f=p.array,m=t-u;for(let y=c;y<c+d;y++)f[y]=f[y]+m;p.array.copyWithin(e,c,c+d),p.addUpdateRange(e,d),p.needsUpdate=!0,h.indexStart=e}e+=h.reservedIndexCount}if(h.vertexStart!==t){const{vertexStart:c,reservedVertexCount:u}=h,d=n.attributes;for(const p in d){const f=d[p],{array:m,itemSize:y}=f;m.copyWithin(t*y,c*y,(c+u)*y),f.addUpdateRange(t*y,u*y),f.needsUpdate=!0}h.vertexStart=t}t+=h.reservedVertexCount,h.start=n.index?h.indexStart:h.vertexStart}}return this._nextIndexStart=e,this._nextVertexStart=t,this._visibilityChanged=!0,this}getBoundingBoxAt(t,e){if(t>=this._geometryCount)return null;const i=this.geometry,s=this._geometryInfo[t];if(s.boundingBox===null){const n=new _t,r=i.index,a=i.attributes.position;for(let o=s.start,h=s.start+s.count;o<h;o++){let c=o;r&&(c=r.getX(c)),n.expandByPoint(Ni.fromBufferAttribute(a,c))}s.boundingBox=n}return e.copy(s.boundingBox),e}getBoundingSphereAt(t,e){if(t>=this._geometryCount)return null;const i=this.geometry,s=this._geometryInfo[t];if(s.boundingSphere===null){const n=new yt;this.getBoundingBoxAt(t,As),As.getCenter(n.center);const r=i.index,a=i.attributes.position;let o=0;for(let h=s.start,c=s.start+s.count;h<c;h++){let u=h;r&&(u=r.getX(u)),Ni.fromBufferAttribute(a,u),o=Math.max(o,n.center.distanceToSquared(Ni))}n.radius=Math.sqrt(o),s.boundingSphere=n}return e.copy(s.boundingSphere),e}setMatrixAt(t,e){this.validateInstanceId(t);const i=this._matricesTexture,s=this._matricesTexture.image.data;return e.toArray(s,t*16),i.needsUpdate=!0,this}getMatrixAt(t,e){return this.validateInstanceId(t),e.fromArray(this._matricesTexture.image.data,t*16)}setColorAt(t,e){return this.validateInstanceId(t),this._colorsTexture===null&&this._initColorsTexture(),e.toArray(this._colorsTexture.image.data,t*4),this._colorsTexture.needsUpdate=!0,this}getColorAt(t,e){return this.validateInstanceId(t),this._colorsTexture===null?e.isVector4?e.set(1,1,1,1):e.setRGB(1,1,1):e.fromArray(this._colorsTexture.image.data,t*4)}setVisibleAt(t,e){return this.validateInstanceId(t),this._instanceInfo[t].visible===e?this:(this._instanceInfo[t].visible=e,this._visibilityChanged=!0,this)}getVisibleAt(t){return this.validateInstanceId(t),this._instanceInfo[t].visible}setGeometryIdAt(t,e){return this.validateInstanceId(t),this.validateGeometryId(e),this._instanceInfo[t].geometryIndex=e,this._visibilityChanged=!0,this}getGeometryIdAt(t){return this.validateInstanceId(t),this._instanceInfo[t].geometryIndex}getGeometryRangeAt(t,e={}){this.validateGeometryId(t);const i=this._geometryInfo[t];return e.vertexStart=i.vertexStart,e.vertexCount=i.vertexCount,e.reservedVertexCount=i.reservedVertexCount,e.indexStart=i.indexStart,e.indexCount=i.indexCount,e.reservedIndexCount=i.reservedIndexCount,e.start=i.start,e.count=i.count,e}setInstanceCount(t){const e=this._availableInstanceIds,i=this._instanceInfo;for(e.sort(Rn);e[e.length-1]===i.length-1;)i.pop(),e.pop();if(t<i.length)throw new Error(`THREE.BatchedMesh: Instance ids outside the range ${t} are being used. Cannot shrink instance count.`);const s=new Int32Array(t),n=new Int32Array(t);Re(this._multiDrawCounts,s),Re(this._multiDrawStarts,n),this._multiDrawCounts=s,this._multiDrawStarts=n,this._maxInstanceCount=t;const r=this._indirectTexture,a=this._matricesTexture,o=this._colorsTexture;r.dispose(),this._initIndirectTexture(),Re(r.image.data,this._indirectTexture.image.data),a.dispose(),this._initMatricesTexture(),Re(a.image.data,this._matricesTexture.image.data),o&&(o.dispose(),this._initColorsTexture(),Re(o.image.data,this._colorsTexture.image.data))}setGeometrySize(t,e){const i=[...this._geometryInfo].filter(a=>a.active);if(Math.max(...i.map(a=>a.vertexStart+a.reservedVertexCount))>t)throw new Error(`THREE.BatchedMesh: Geometry vertex values are being used outside the range ${e}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...i.map(o=>o.indexStart+o.reservedIndexCount))>e)throw new Error(`THREE.BatchedMesh: Geometry index values are being used outside the range ${e}. Cannot shrink further.`);const n=this.geometry;n.dispose(),this._maxVertexCount=t,this._maxIndexCount=e,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new q,this._initializeGeometry(n));const r=this.geometry;n.index&&Re(n.index.array,r.index.array);for(const a in n.attributes)Re(n.attributes[a].array,r.attributes[a].array)}raycast(t,e){const i=this._instanceInfo,s=this._geometryInfo,n=this.matrixWorld,r=this.geometry;mt.material=this.material,mt.geometry.index=r.index,mt.geometry.attributes=r.attributes,mt.geometry.boundingBox===null&&(mt.geometry.boundingBox=new _t),mt.geometry.boundingSphere===null&&(mt.geometry.boundingSphere=new yt);for(let a=0,o=i.length;a<o;a++){if(!i[a].visible||!i[a].active)continue;const h=i[a].geometryIndex,c=s[h];mt.geometry.setDrawRange(c.start,c.count),this.getMatrixAt(a,mt.matrixWorld).premultiply(n),this.getBoundingBoxAt(h,mt.geometry.boundingBox),this.getBoundingSphereAt(h,mt.geometry.boundingSphere),mt.raycast(t,Ts);for(let u=0,d=Ts.length;u<d;u++){const p=Ts[u];p.object=this,p.batchId=a,e.push(p)}Ts.length=0}mt.material=null,mt.geometry.index=null,mt.geometry.attributes={},mt.geometry.setDrawRange(0,1/0)}copy(t){return super.copy(t),this.geometry=t.geometry.clone(),this.perObjectFrustumCulled=t.perObjectFrustumCulled,this.sortObjects=t.sortObjects,this.boundingBox=t.boundingBox!==null?t.boundingBox.clone():null,this.boundingSphere=t.boundingSphere!==null?t.boundingSphere.clone():null,this._geometryInfo=t._geometryInfo.map(e=>({...e,boundingBox:e.boundingBox!==null?e.boundingBox.clone():null,boundingSphere:e.boundingSphere!==null?e.boundingSphere.clone():null})),this._instanceInfo=t._instanceInfo.map(e=>({...e})),this._availableInstanceIds=t._availableInstanceIds.slice(),this._availableGeometryIds=t._availableGeometryIds.slice(),this._nextIndexStart=t._nextIndexStart,this._nextVertexStart=t._nextVertexStart,this._geometryCount=t._geometryCount,this._maxInstanceCount=t._maxInstanceCount,this._maxVertexCount=t._maxVertexCount,this._maxIndexCount=t._maxIndexCount,this._geometryInitialized=t._geometryInitialized,this._multiDrawCounts=t._multiDrawCounts.slice(),this._multiDrawStarts=t._multiDrawStarts.slice(),this._multiDrawBytesPerElement=t._multiDrawBytesPerElement,this._indirectTexture=t._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=t._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=t._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){super.dispose(),this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(t,e,i,s,n){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const r=s.getIndex();let a=r===null?1:r.array.BYTES_PER_ELEMENT,o=1;n.wireframe&&(o=2,a=s.attributes.position.count>65535?4:2);const h=this._instanceInfo,c=this._multiDrawStarts,u=this._multiDrawCounts,d=this._geometryInfo,p=this.perObjectFrustumCulled,f=this._indirectTexture,m=f.image.data,y=i.isArrayCamera?wc:Mc;p&&(i.isArrayCamera?y.setFromArrayCamera(i):(St.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse).multiply(this.matrixWorld),y.setFromProjectionMatrix(St,i.coordinateSystem,i.reversedDepth)));let g=0;if(this.sortObjects){St.copy(this.matrixWorld).invert(),Ni.setFromMatrixPosition(i.matrixWorld).applyMatrix4(St),Fa.set(0,0,-1).transformDirection(i.matrixWorld).transformDirection(St);for(let M=0,_=h.length;M<_;M++)if(h[M].visible&&h[M].active){const v=h[M].geometryIndex;this.getMatrixAt(M,St),this.getBoundingSphereAt(v,Pe).applyMatrix4(St);let A=!1;if(p&&(A=!y.intersectsSphere(Pe)),!A){const S=d[v],T=_c.subVectors(Pe.center,Ni).dot(Fa);On.push(S.start,S.count,T,M)}}const x=On.list,b=this.customSort;b===null?x.sort(n.transparent?gc:yc):b.call(this,x,i);for(let M=0,_=x.length;M<_;M++){const v=x[M];c[g]=v.start*a*o,u[g]=v.count*o,m[g]=v.index,g++}On.reset()}else for(let x=0,b=h.length;x<b;x++)if(h[x].visible&&h[x].active){const M=h[x].geometryIndex;let _=!1;if(p&&(this.getMatrixAt(x,St),this.getBoundingSphereAt(M,Pe).applyMatrix4(St),_=!y.intersectsSphere(Pe)),!_){const v=d[M];c[g]=v.start*a*o,u[g]=v.count*o,m[g]=x,g++}}f.needsUpdate=!0,this._multiDrawCount=g,this._multiDrawBytesPerElement=a,this._visibilityChanged=!1}onBeforeShadow(t,e,i,s,n,r){this.onBeforeRender(t,null,s,n,r)}}class It extends gt{constructor(t){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new U(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this.fog=t.fog,this}}const Zs=new w,$s=new w,ka=new G,Li=new ji,Cs=new yt,En=new w,Pa=new w;class He extends ${constructor(t=new q,e=new It){super(),this.isLine=!0,this.type="Line",this.geometry=t,this.material=e,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}computeLineDistances(){const t=this.geometry;if(t.index===null){const e=t.attributes.position,i=[0];for(let s=1,n=e.count;s<n;s++)Zs.fromBufferAttribute(e,s-1),$s.fromBufferAttribute(e,s),i[s]=i[s-1],i[s]+=Zs.distanceTo($s);t.setAttribute("lineDistance",new P(i,1))}else V("Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}intersectsFrustum(t){return t.intersectsObject(this)}raycast(t,e){const i=this.geometry,s=this.matrixWorld,n=t.params.Line.threshold,r=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),Cs.copy(i.boundingSphere),Cs.applyMatrix4(s),Cs.radius+=n,t.ray.intersectsSphere(Cs)===!1)return;ka.copy(s).invert(),Li.copy(t.ray).applyMatrix4(ka);const a=n/((this.scale.x+this.scale.y+this.scale.z)/3),o=a*a,h=this.isLineSegments?2:1,c=i.index,d=i.attributes.position;if(c!==null){const p=Math.max(0,r.start),f=Math.min(c.count,r.start+r.count);for(let m=p,y=f-1;m<y;m+=h){const g=c.getX(m),x=c.getX(m+1),b=Is(this,t,Li,o,g,x,m);b&&e.push(b)}if(this.isLineLoop){const m=c.getX(f-1),y=c.getX(p),g=Is(this,t,Li,o,m,y,f-1);g&&e.push(g)}}else{const p=Math.max(0,r.start),f=Math.min(d.count,r.start+r.count);for(let m=p,y=f-1;m<y;m+=h){const g=Is(this,t,Li,o,m,m+1,m);g&&e.push(g)}if(this.isLineLoop){const m=Is(this,t,Li,o,f-1,p,f-1);m&&e.push(m)}}}updateMorphTargets(){const e=this.geometry.morphAttributes,i=Object.keys(e);if(i.length>0){const s=e[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let n=0,r=s.length;n<r;n++){const a=s[n].name||String(n);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=n}}}}}function Is(l,t,e,i,s,n,r){const a=l.geometry.attributes.position;if(Zs.fromBufferAttribute(a,s),$s.fromBufferAttribute(a,n),e.distanceSqToSegment(Zs,$s,En,Pa)>i)return;En.applyMatrix4(l.matrixWorld);const h=t.ray.origin.distanceTo(En);if(!(h<t.near||h>t.far))return{distance:h,point:Pa.clone().applyMatrix4(l.matrixWorld),index:r,face:null,faceIndex:null,barycoord:null,object:l}}const Ra=new w,Oa=new w;class ye extends He{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(t.index===null){const e=t.attributes.position,i=[];for(let s=0,n=e.count;s<n;s+=2)Ra.fromBufferAttribute(e,s),Oa.fromBufferAttribute(e,s+1),i[s]=s===0?0:i[s-1],i[s+1]=i[s]+Ra.distanceTo(Oa);t.setAttribute("lineDistance",new P(i,1))}else V("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class Ac extends He{constructor(t,e){super(t,e),this.isLineLoop=!0,this.type="LineLoop"}}class ko extends gt{constructor(t){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new U(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this.fog=t.fog,this}}const Ea=new G,Kn=new ji,zs=new yt,Bs=new w;class Tc extends ${constructor(t=new q,e=new ko){super(),this.isPoints=!0,this.type="Points",this.geometry=t,this.material=e,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}intersectsFrustum(t){return t.intersectsObject(this)}raycast(t,e){const i=this.geometry,s=this.matrixWorld,n=t.params.Points.threshold,r=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),zs.copy(i.boundingSphere),zs.applyMatrix4(s),zs.radius+=n,t.ray.intersectsSphere(zs)===!1)return;Ea.copy(s).invert(),Kn.copy(t.ray).applyMatrix4(Ea);const a=n/((this.scale.x+this.scale.y+this.scale.z)/3),o=a*a,h=i.index,u=i.attributes.position;if(h!==null){const d=Math.max(0,r.start),p=Math.min(h.count,r.start+r.count);for(let f=d,m=p;f<m;f++){const y=h.getX(f);Bs.fromBufferAttribute(u,y),Na(Bs,y,o,s,t,e,this)}}else{const d=Math.max(0,r.start),p=Math.min(u.count,r.start+r.count);for(let f=d,m=p;f<m;f++)Bs.fromBufferAttribute(u,f),Na(Bs,f,o,s,t,e,this)}}updateMorphTargets(){const e=this.geometry.morphAttributes,i=Object.keys(e);if(i.length>0){const s=e[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let n=0,r=s.length;n<r;n++){const a=s[n].name||String(n);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=n}}}}}function Na(l,t,e,i,s,n,r){const a=Kn.distanceSqToPoint(l);if(a<e){const o=new w;Kn.closestPointToPoint(l,o),o.applyMatrix4(i);const h=s.ray.origin.distanceTo(o);if(h<s.near||h>s.far)return;n.push({distance:h,distanceToRay:Math.sqrt(a),point:o,index:t,face:null,faceIndex:null,barycoord:null,object:r})}}class Cc extends ht{constructor(t,e,i,s,n=Jt,r=Jt,a,o,h){super(t,e,i,s,n,r,a,o,h),this.isVideoTexture=!0,this.generateMipmaps=!1,this._requestVideoFrameCallbackId=0;const c=this;function u(){c.needsUpdate=!0,c._requestVideoFrameCallbackId=t.requestVideoFrameCallback(u)}"requestVideoFrameCallback"in t&&(this._requestVideoFrameCallbackId=t.requestVideoFrameCallback(u))}clone(){return new this.constructor(this.image).copy(this)}update(){const t=this.image;"requestVideoFrameCallback"in t===!1&&t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}dispose(){this._requestVideoFrameCallbackId!==0&&(this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId),this._requestVideoFrameCallbackId=0),super.dispose()}}class kf extends Cc{constructor(t,e,i,s,n,r,a,o){super({},t,e,i,s,n,r,a,o),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(t){this.image=t,this.needsUpdate=!0}}class Pf extends ht{constructor(t,e){super({width:t,height:e}),this.isFramebufferTexture=!0,this.magFilter=Nt,this.minFilter=Nt,this.generateMipmaps=!1,this.needsUpdate=!0}}class yr extends ht{constructor(t,e,i,s,n,r,a,o,h,c,u,d){super(null,r,a,o,h,c,s,n,u,d),this.isCompressedTexture=!0,this.image={width:e,height:i},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}}class Rf extends yr{constructor(t,e,i,s,n,r){super(t,e,i,n,r),this.isCompressedArrayTexture=!0,this.image.depth=s,this.wrapR=$t,this.layerUpdates=new Set}copy(t){return super.copy(t),this.wrapR=t.wrapR,this}addLayerUpdate(t){this.layerUpdates.add(t)}clearLayerUpdates(){this.layerUpdates.clear()}}class Of extends yr{constructor(t,e,i){super(void 0,t[0].width,t[0].height,e,i,en),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=t}}class Po extends ht{constructor(t=[],e=en,i,s,n,r,a,o,h,c){super(t,e,i,s,n,r,a,o,h,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class Ef extends ht{constructor(t,e,i,s,n,r,a,o,h){super(t,e,i,s,n,r,a,o,h),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Nf extends ht{constructor(t,e,i,s,n,r,a,o,h){super(t,e,i,s,n,r,a,o,h),this.isHTMLTexture=!0,this.generateMipmaps=!1,this.needsUpdate=!0;const c=t?t.parentNode:null;c!==null&&"requestPaint"in c&&(c.onpaint=()=>{this.needsUpdate=!0},c.requestPaint())}dispose(){const t=this.image?this.image.parentNode:null;t!==null&&"onpaint"in t&&(t.onpaint=null),super.dispose()}}class Ic extends ht{constructor(t,e,i=sn,s,n,r,a=Nt,o=Nt,h,c=Qn,u=1){if(c!==Qn&&c!==Bh)throw new Error("THREE.DepthTexture: format must be either THREE.DepthFormat or THREE.DepthStencilFormat");const d={width:t,height:e,depth:u};super(d,s,n,r,a,o,c,i,h),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(t){return super.copy(t),this.source=new Ae(Object.assign({},t.image)),this.compareFunction=t.compareFunction,this}toJSON(t){const e=super.toJSON(t);return e.compareFunction=this.compareFunction,e}}class Lf extends Ic{constructor(t,e=sn,i=en,s,n,r=Nt,a=Nt,o,h=Qn){const c={width:t,height:t,depth:1},u=[c,c,c,c,c,c];super(t,t,e,i,s,n,r,a,o,h),this.image=u,this.isCubeDepthTexture=!0,this.isCubeTexture=!0}get images(){return this.image}set images(t){this.image=t}}class Vf extends ht{constructor(t=null){super(),this.sourceTexture=t,this.isExternalTexture=!0}copy(t){return super.copy(t),this.sourceTexture=t.sourceTexture,this}}class gr extends q{constructor(t=1,e=1,i=1,s=1,n=1,r=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:s,heightSegments:n,depthSegments:r};const a=this;s=Math.floor(s),n=Math.floor(n),r=Math.floor(r);const o=[],h=[],c=[],u=[];let d=0,p=0;f("z","y","x",-1,-1,i,e,t,r,n,0),f("z","y","x",1,-1,i,e,-t,r,n,1),f("x","z","y",1,1,t,i,e,s,r,2),f("x","z","y",1,-1,t,i,-e,s,r,3),f("x","y","z",1,-1,t,e,i,s,n,4),f("x","y","z",-1,-1,t,e,-i,s,n,5),this.setIndex(o),this.setAttribute("position",new P(h,3)),this.setAttribute("normal",new P(c,3)),this.setAttribute("uv",new P(u,2));function f(m,y,g,x,b,M,_,v,A,S,T){const C=M/A,B=_/S,R=M/2,L=_/2,J=v/2,N=A+1,Q=S+1;let K=0,ut=0;const j=new w;for(let tt=0;tt<Q;tt++){const et=tt*B-L;for(let vt=0;vt<N;vt++){const xt=vt*C-R;j[m]=xt*x,j[y]=et*b,j[g]=J,h.push(j.x,j.y,j.z),j[m]=0,j[y]=0,j[g]=v>0?1:-1,c.push(j.x,j.y,j.z),u.push(vt/A),u.push(1-tt/S),K+=1}}for(let tt=0;tt<S;tt++)for(let et=0;et<A;et++){const vt=d+et+N*tt,xt=d+et+N*(tt+1),ne=d+(et+1)+N*(tt+1),ge=d+(et+1)+N*tt;o.push(vt,xt,ge),o.push(xt,ne,ge),ut+=6}a.addGroup(p,ut,T),p+=ut,d+=K}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new gr(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}}class xr extends q{constructor(t=1,e=1,i=4,s=8,n=1){super(),this.type="CapsuleGeometry",this.parameters={radius:t,height:e,capSegments:i,radialSegments:s,heightSegments:n},e=Math.max(0,e),i=Math.max(1,Math.floor(i)),s=Math.max(3,Math.floor(s)),n=Math.max(1,Math.floor(n));const r=[],a=[],o=[],h=[],c=e/2,u=Math.PI/2*t,d=e,p=2*u+d,f=i*2+n,m=s+1,y=new w,g=new w;for(let x=0;x<=f;x++){let b=0,M=0,_=0,v=0;if(x<=i){const T=x/i,C=T*Math.PI/2;M=-c-t*Math.cos(C),_=t*Math.sin(C),v=-t*Math.cos(C),b=T*u}else if(x<=i+n){const T=(x-i)/n;M=-c+T*e,_=t,v=0,b=u+T*d}else{const T=(x-i-n)/i,C=T*Math.PI/2;M=c+t*Math.sin(C),_=t*Math.cos(C),v=t*Math.sin(C),b=u+d+T*u}const A=Math.max(0,Math.min(1,b/p));let S=0;x===0?S=.5/s:x===f&&(S=-.5/s);for(let T=0;T<=s;T++){const C=T/s,B=C*Math.PI*2,R=Math.sin(B),L=Math.cos(B);g.x=-_*L,g.y=M,g.z=_*R,a.push(g.x,g.y,g.z),y.set(-_*L,v,_*R),y.normalize(),o.push(y.x,y.y,y.z),h.push(C+S,A)}if(x>0){const T=(x-1)*m;for(let C=0;C<s;C++){const B=T+C,R=T+C+1,L=x*m+C,J=x*m+C+1;r.push(B,R,L),r.push(R,J,L)}}}this.setIndex(r),this.setAttribute("position",new P(a,3)),this.setAttribute("normal",new P(o,3)),this.setAttribute("uv",new P(h,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new xr(t.radius,t.height,t.capSegments,t.radialSegments,t.heightSegments)}}class br extends q{constructor(t=1,e=32,i=0,s=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:s},e=Math.max(3,e);const n=[],r=[],a=[],o=[],h=new w,c=new I;r.push(0,0,0),a.push(0,0,1),o.push(.5,.5);for(let u=0,d=3;u<=e;u++,d+=3){const p=i+u/e*s;h.x=t*Math.cos(p),h.y=t*Math.sin(p),r.push(h.x,h.y,h.z),a.push(0,0,1),c.x=(r[d]/t+1)/2,c.y=(r[d+1]/t+1)/2,o.push(c.x,c.y)}for(let u=1;u<=e;u++)n.push(u,u+1,0);this.setIndex(n),this.setAttribute("position",new P(r,3)),this.setAttribute("normal",new P(a,3)),this.setAttribute("uv",new P(o,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new br(t.radius,t.segments,t.thetaStart,t.thetaLength)}}class nn extends q{constructor(t=1,e=1,i=1,s=32,n=1,r=!1,a=0,o=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:s,heightSegments:n,openEnded:r,thetaStart:a,thetaLength:o};const h=this;s=Math.floor(s),n=Math.floor(n);const c=[],u=[],d=[],p=[];let f=0;const m=[],y=i/2;let g=0;x(),r===!1&&(t>0&&b(!0),e>0&&b(!1)),this.setIndex(c),this.setAttribute("position",new P(u,3)),this.setAttribute("normal",new P(d,3)),this.setAttribute("uv",new P(p,2));function x(){const M=new w,_=new w;let v=0;const A=(e-t)/i;for(let S=0;S<=n;S++){const T=[],C=S/n,B=C*(e-t)+t;for(let R=0;R<=s;R++){const L=R/s,J=L*o+a,N=Math.sin(J),Q=Math.cos(J);_.x=B*N,_.y=-C*i+y,_.z=B*Q,u.push(_.x,_.y,_.z),M.set(N,A,Q).normalize(),d.push(M.x,M.y,M.z),p.push(L,1-C),T.push(f++)}m.push(T)}for(let S=0;S<s;S++)for(let T=0;T<n;T++){const C=m[T][S],B=m[T+1][S],R=m[T+1][S+1],L=m[T][S+1];(t>0||T!==0)&&(c.push(C,B,L),v+=3),(e>0||T!==n-1)&&(c.push(B,R,L),v+=3)}h.addGroup(g,v,0),g+=v}function b(M){const _=f,v=new I,A=new w;let S=0;const T=M===!0?t:e,C=M===!0?1:-1;for(let R=1;R<=s;R++)u.push(0,y*C,0),d.push(0,C,0),p.push(.5,.5),f++;const B=f;for(let R=0;R<=s;R++){const J=R/s*o+a,N=Math.cos(J),Q=Math.sin(J);A.x=T*Q,A.y=y*C,A.z=T*N,u.push(A.x,A.y,A.z),d.push(0,C,0),v.x=N*.5+.5,v.y=Q*.5*C+.5,p.push(v.x,v.y),f++}for(let R=0;R<s;R++){const L=_+R,J=B+R;M===!0?c.push(J,J+1,L):c.push(J+1,J,L),S+=3}h.addGroup(g,S,M===!0?1:2),g+=S}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new nn(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class rn extends nn{constructor(t=1,e=1,i=32,s=1,n=!1,r=0,a=Math.PI*2){super(0,t,e,i,s,n,r,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:s,openEnded:n,thetaStart:r,thetaLength:a}}static fromJSON(t){return new rn(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class Je extends q{constructor(t=[],e=[],i=1,s=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:i,detail:s};const n=[],r=[];a(s),h(i),c(),this.setAttribute("position",new P(n,3)),this.setAttribute("normal",new P(n.slice(),3)),this.setAttribute("uv",new P(r,2)),s===0?this.computeVertexNormals():this.normalizeNormals();function a(x){const b=new w,M=new w,_=new w;for(let v=0;v<e.length;v+=3)p(e[v+0],b),p(e[v+1],M),p(e[v+2],_),o(b,M,_,x)}function o(x,b,M,_){const v=_+1,A=[];for(let S=0;S<=v;S++){A[S]=[];const T=x.clone().lerp(M,S/v),C=b.clone().lerp(M,S/v),B=v-S;for(let R=0;R<=B;R++)R===0&&S===v?A[S][R]=T:A[S][R]=T.clone().lerp(C,R/B)}for(let S=0;S<v;S++)for(let T=0;T<2*(v-S)-1;T++){const C=Math.floor(T/2);T%2===0?(d(A[S][C+1]),d(A[S+1][C]),d(A[S][C])):(d(A[S][C+1]),d(A[S+1][C+1]),d(A[S+1][C]))}}function h(x){const b=new w;for(let M=0;M<n.length;M+=3)b.x=n[M+0],b.y=n[M+1],b.z=n[M+2],b.normalize().multiplyScalar(x),n[M+0]=b.x,n[M+1]=b.y,n[M+2]=b.z}function c(){const x=new w;for(let b=0;b<n.length;b+=3){x.x=n[b+0],x.y=n[b+1],x.z=n[b+2];const M=y(x)/2/Math.PI+.5,_=g(x)/Math.PI+.5;r.push(M,1-_)}f(),u()}function u(){for(let x=0;x<r.length;x+=6){const b=r[x+0],M=r[x+2],_=r[x+4],v=Math.max(b,M,_),A=Math.min(b,M,_);v>.9&&A<.1&&(b<.2&&(r[x+0]+=1),M<.2&&(r[x+2]+=1),_<.2&&(r[x+4]+=1))}}function d(x){n.push(x.x,x.y,x.z)}function p(x,b){const M=x*3;b.x=t[M+0],b.y=t[M+1],b.z=t[M+2]}function f(){const x=new w,b=new w,M=new w,_=new w,v=new I,A=new I,S=new I;for(let T=0,C=0;T<n.length;T+=9,C+=6){x.set(n[T+0],n[T+1],n[T+2]),b.set(n[T+3],n[T+4],n[T+5]),M.set(n[T+6],n[T+7],n[T+8]),v.set(r[C+0],r[C+1]),A.set(r[C+2],r[C+3]),S.set(r[C+4],r[C+5]),_.copy(x).add(b).add(M).divideScalar(3);const B=y(_);m(v,C+0,x,B),m(A,C+2,b,B),m(S,C+4,M,B)}}function m(x,b,M,_){_<0&&x.x===1&&(r[b]=x.x-1),M.x===0&&M.z===0&&(r[b]=_/2/Math.PI+.5)}function y(x){return Math.atan2(x.z,-x.x)}function g(x){return Math.atan2(-x.y,Math.sqrt(x.x*x.x+x.z*x.z))}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Je(t.vertices,t.indices,t.radius,t.detail)}}class Mr extends Je{constructor(t=1,e=0){const i=(1+Math.sqrt(5))/2,s=1/i,n=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-s,-i,0,-s,i,0,s,-i,0,s,i,-s,-i,0,-s,i,0,s,-i,0,s,i,0,-i,0,-s,i,0,-s,-i,0,s,i,0,s],r=[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];super(n,r,t,e),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e}}static fromJSON(t){return new Mr(t.radius,t.detail)}}const Fs=new w,ks=new w,Nn=new w,Ps=new Ot;class zc extends q{constructor(t=null,e=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:t,thresholdAngle:e},t!==null){const s=Math.pow(10,4),n=Math.cos(Ge*e),r=t.getIndex(),a=t.getAttribute("position"),o=r?r.count:a.count,h=[0,0,0],c=["a","b","c"],u=new Array(3),d={},p=[];for(let f=0;f<o;f+=3){r?(h[0]=r.getX(f),h[1]=r.getX(f+1),h[2]=r.getX(f+2)):(h[0]=f,h[1]=f+1,h[2]=f+2);const{a:m,b:y,c:g}=Ps;if(m.fromBufferAttribute(a,h[0]),y.fromBufferAttribute(a,h[1]),g.fromBufferAttribute(a,h[2]),Ps.getNormal(Nn),u[0]=`${Math.round(m.x*s)},${Math.round(m.y*s)},${Math.round(m.z*s)}`,u[1]=`${Math.round(y.x*s)},${Math.round(y.y*s)},${Math.round(y.z*s)}`,u[2]=`${Math.round(g.x*s)},${Math.round(g.y*s)},${Math.round(g.z*s)}`,!(u[0]===u[1]||u[1]===u[2]||u[2]===u[0]))for(let x=0;x<3;x++){const b=(x+1)%3,M=u[x],_=u[b],v=Ps[c[x]],A=Ps[c[b]],S=`${M}_${_}`,T=`${_}_${M}`;T in d&&d[T]?(Nn.dot(d[T].normal)<=n&&(p.push(v.x,v.y,v.z),p.push(A.x,A.y,A.z)),d[T]=null):S in d||(d[S]={index0:h[x],index1:h[b],normal:Nn.clone()})}}for(const f in d)if(d[f]){const{index0:m,index1:y}=d[f];Fs.fromBufferAttribute(a,m),ks.fromBufferAttribute(a,y),p.push(Fs.x,Fs.y,Fs.z),p.push(ks.x,ks.y,ks.z)}this.setAttribute("position",new P(p,3))}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}}class se{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){V("Curve: .getPoint() not implemented.")}getPointAt(t,e){const i=this.getUtoTmapping(t);return this.getPoint(i,e)}getPoints(t=5){const e=[];for(let i=0;i<=t;i++)e.push(this.getPoint(i/t));return e}getSpacedPoints(t=5){const e=[];for(let i=0;i<=t;i++)e.push(this.getPointAt(i/t));return e}getLength(){const t=this.getLengths();return t[t.length-1]}getLengths(t=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const e=[];let i,s=this.getPoint(0),n=0;e.push(0);for(let r=1;r<=t;r++)i=this.getPoint(r/t),n+=i.distanceTo(s),e.push(n),s=i;return this.cacheArcLengths=e,e}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(t,e=null){const i=this.getLengths();let s=0;const n=i.length;let r;e?r=e:r=t*i[n-1];let a=0,o=n-1,h;for(;a<=o;)if(s=Math.floor(a+(o-a)/2),h=i[s]-r,h<0)a=s+1;else if(h>0)o=s-1;else{o=s;break}if(s=o,i[s]===r)return s/(n-1);const c=i[s],d=i[s+1]-c,p=(r-c)/d;return(s+p)/(n-1)}getTangent(t,e){let s=t-1e-4,n=t+1e-4;s<0&&(s=0),n>1&&(n=1);const r=this.getPoint(s),a=this.getPoint(n),o=e||(r.isVector2?new I:new w);return o.copy(a).sub(r).normalize(),o}getTangentAt(t,e){const i=this.getUtoTmapping(t);return this.getTangent(i,e)}computeFrenetFrames(t,e=!1){const i=new w,s=[],n=[],r=[],a=new w,o=new G;for(let p=0;p<=t;p++){const f=p/t;s[p]=this.getTangentAt(f,new w)}n[0]=new w,r[0]=new w;let h=Number.MAX_VALUE;const c=Math.abs(s[0].x),u=Math.abs(s[0].y),d=Math.abs(s[0].z);c<=h&&(h=c,i.set(1,0,0)),u<=h&&(h=u,i.set(0,1,0)),d<=h&&i.set(0,0,1),a.crossVectors(s[0],i).normalize(),n[0].crossVectors(s[0],a),r[0].crossVectors(s[0],n[0]);for(let p=1;p<=t;p++){if(n[p]=n[p-1].clone(),r[p]=r[p-1].clone(),a.crossVectors(s[p-1],s[p]),a.length()>Number.EPSILON){a.normalize();const f=Math.acos(D(s[p-1].dot(s[p]),-1,1));n[p].applyMatrix4(o.makeRotationAxis(a,f))}r[p].crossVectors(s[p],n[p])}if(e===!0){let p=Math.acos(D(n[0].dot(n[t]),-1,1));p/=t,s[0].dot(a.crossVectors(n[0],n[t]))>0&&(p=-p);for(let f=1;f<=t;f++)n[f].applyMatrix4(o.makeRotationAxis(s[f],p*f)),r[f].crossVectors(s[f],n[f])}return{tangents:s,normals:n,binormals:r}}clone(){return new this.constructor().copy(this)}copy(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}toJSON(){const t={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t}fromJSON(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}class wr extends se{constructor(t=0,e=0,i=1,s=1,n=0,r=Math.PI*2,a=!1,o=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=t,this.aY=e,this.xRadius=i,this.yRadius=s,this.aStartAngle=n,this.aEndAngle=r,this.aClockwise=a,this.aRotation=o}getPoint(t,e=new I){const i=e,s=Math.PI*2;let n=this.aEndAngle-this.aStartAngle;const r=Math.abs(n)<Number.EPSILON;for(;n<0;)n+=s;for(;n>s;)n-=s;n<Number.EPSILON&&(r?n=0:n=s),this.aClockwise===!0&&!r&&(n===s?n=-s:n=n-s);const a=this.aStartAngle+t*n;let o=this.aX+this.xRadius*Math.cos(a),h=this.aY+this.yRadius*Math.sin(a);if(this.aRotation!==0){const c=Math.cos(this.aRotation),u=Math.sin(this.aRotation),d=o-this.aX,p=h-this.aY;o=d*c-p*u+this.aX,h=d*u+p*c+this.aY}return i.set(o,h)}copy(t){return super.copy(t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this}toJSON(){const t=super.toJSON();return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t}fromJSON(t){return super.fromJSON(t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this}}class Bc extends wr{constructor(t,e,i,s,n,r){super(t,e,i,i,s,n,r),this.isArcCurve=!0,this.type="ArcCurve"}}function _r(){let l=0,t=0,e=0,i=0;function s(n,r,a,o){l=n,t=a,e=-3*n+3*r-2*a-o,i=2*n-2*r+a+o}return{initCatmullRom:function(n,r,a,o,h){s(r,a,h*(a-n),h*(o-r))},initNonuniformCatmullRom:function(n,r,a,o,h,c,u){let d=(r-n)/h-(a-n)/(h+c)+(a-r)/c,p=(a-r)/c-(o-r)/(c+u)+(o-a)/u;d*=c,p*=c,s(r,a,d,p)},calc:function(n){const r=n*n,a=r*n;return l+t*n+e*r+i*a}}}const La=new w,Va=new w,Ln=new _r,Vn=new _r,Dn=new _r;class Fc extends se{constructor(t=[],e=!1,i="centripetal",s=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=t,this.closed=e,this.curveType=i,this.tension=s}getPoint(t,e=new w){const i=e,s=this.points,n=s.length,r=(n-(this.closed?0:1))*t;let a=Math.floor(r),o=r-a;this.closed?a+=a>0?0:(Math.floor(Math.abs(a)/n)+1)*n:o===0&&a===n-1&&(a=n-2,o=1);let h,c;this.closed||a>0?h=s[(a-1)%n]:(Va.subVectors(s[0],s[1]).add(s[0]),h=Va);const u=s[a%n],d=s[(a+1)%n];if(this.closed||a+2<n?c=s[(a+2)%n]:(La.subVectors(s[n-1],s[n-2]).add(s[n-1]),c=La),this.curveType==="centripetal"||this.curveType==="chordal"){const p=this.curveType==="chordal"?.5:.25;let f=Math.pow(h.distanceToSquared(u),p),m=Math.pow(u.distanceToSquared(d),p),y=Math.pow(d.distanceToSquared(c),p);m<1e-4&&(m=1),f<1e-4&&(f=m),y<1e-4&&(y=m),Ln.initNonuniformCatmullRom(h.x,u.x,d.x,c.x,f,m,y),Vn.initNonuniformCatmullRom(h.y,u.y,d.y,c.y,f,m,y),Dn.initNonuniformCatmullRom(h.z,u.z,d.z,c.z,f,m,y)}else this.curveType==="catmullrom"&&(Ln.initCatmullRom(h.x,u.x,d.x,c.x,this.tension),Vn.initCatmullRom(h.y,u.y,d.y,c.y,this.tension),Dn.initCatmullRom(h.z,u.z,d.z,c.z,this.tension));return i.set(Ln.calc(o),Vn.calc(o),Dn.calc(o)),i}copy(t){super.copy(t),this.points=[];for(let e=0,i=t.points.length;e<i;e++){const s=t.points[e];this.points.push(s.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this}toJSON(){const t=super.toJSON();t.points=[];for(let e=0,i=this.points.length;e<i;e++){const s=this.points[e];t.points.push(s.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t}fromJSON(t){super.fromJSON(t),this.points=[];for(let e=0,i=t.points.length;e<i;e++){const s=t.points[e];this.points.push(new w().fromArray(s))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this}}function Da(l,t,e,i,s){const n=(i-t)*.5,r=(s-e)*.5,a=l*l,o=l*a;return(2*e-2*i+n+r)*o+(-3*e+3*i-2*n-r)*a+n*l+e}function kc(l,t){const e=1-l;return e*e*t}function Pc(l,t){return 2*(1-l)*l*t}function Rc(l,t){return l*l*t}function Gi(l,t,e,i){return kc(l,t)+Pc(l,e)+Rc(l,i)}function Oc(l,t){const e=1-l;return e*e*e*t}function Ec(l,t){const e=1-l;return 3*e*e*l*t}function Nc(l,t){return 3*(1-l)*l*l*t}function Lc(l,t){return l*l*l*t}function Hi(l,t,e,i,s){return Oc(l,t)+Ec(l,e)+Nc(l,i)+Lc(l,s)}class Ro extends se{constructor(t=new I,e=new I,i=new I,s=new I){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=t,this.v1=e,this.v2=i,this.v3=s}getPoint(t,e=new I){const i=e,s=this.v0,n=this.v1,r=this.v2,a=this.v3;return i.set(Hi(t,s.x,n.x,r.x,a.x),Hi(t,s.y,n.y,r.y,a.y)),i}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this}toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this}}class Vc extends se{constructor(t=new w,e=new w,i=new w,s=new w){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=t,this.v1=e,this.v2=i,this.v3=s}getPoint(t,e=new w){const i=e,s=this.v0,n=this.v1,r=this.v2,a=this.v3;return i.set(Hi(t,s.x,n.x,r.x,a.x),Hi(t,s.y,n.y,r.y,a.y),Hi(t,s.z,n.z,r.z,a.z)),i}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this}toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this}}class Oo extends se{constructor(t=new I,e=new I){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=t,this.v2=e}getPoint(t,e=new I){const i=e;return t===1?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(t).add(this.v1)),i}getPointAt(t,e){return this.getPoint(t,e)}getTangent(t,e=new I){return e.subVectors(this.v2,this.v1).normalize()}getTangentAt(t,e){return this.getTangent(t,e)}copy(t){return super.copy(t),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){const t=super.toJSON();return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}class Dc extends se{constructor(t=new w,e=new w){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=t,this.v2=e}getPoint(t,e=new w){const i=e;return t===1?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(t).add(this.v1)),i}getPointAt(t,e){return this.getPoint(t,e)}getTangent(t,e=new w){return e.subVectors(this.v2,this.v1).normalize()}getTangentAt(t,e){return this.getTangent(t,e)}copy(t){return super.copy(t),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){const t=super.toJSON();return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}class Eo extends se{constructor(t=new I,e=new I,i=new I){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=t,this.v1=e,this.v2=i}getPoint(t,e=new I){const i=e,s=this.v0,n=this.v1,r=this.v2;return i.set(Gi(t,s.x,n.x,r.x),Gi(t,s.y,n.y,r.y)),i}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}class No extends se{constructor(t=new w,e=new w,i=new w){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=t,this.v1=e,this.v2=i}getPoint(t,e=new w){const i=e,s=this.v0,n=this.v1,r=this.v2;return i.set(Gi(t,s.x,n.x,r.x),Gi(t,s.y,n.y,r.y),Gi(t,s.z,n.z,r.z)),i}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}class Lo extends se{constructor(t=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=t}getPoint(t,e=new I){const i=e,s=this.points,n=(s.length-1)*t,r=Math.floor(n),a=n-r,o=s[r===0?r:r-1],h=s[r],c=s[r>s.length-2?s.length-1:r+1],u=s[r>s.length-3?s.length-1:r+2];return i.set(Da(a,o.x,h.x,c.x,u.x),Da(a,o.y,h.y,c.y,u.y)),i}copy(t){super.copy(t),this.points=[];for(let e=0,i=t.points.length;e<i;e++){const s=t.points[e];this.points.push(s.clone())}return this}toJSON(){const t=super.toJSON();t.points=[];for(let e=0,i=this.points.length;e<i;e++){const s=this.points[e];t.points.push(s.toArray())}return t}fromJSON(t){super.fromJSON(t),this.points=[];for(let e=0,i=t.points.length;e<i;e++){const s=t.points[e];this.points.push(new I().fromArray(s))}return this}}var Qs=Object.freeze({__proto__:null,ArcCurve:Bc,CatmullRomCurve3:Fc,CubicBezierCurve:Ro,CubicBezierCurve3:Vc,EllipseCurve:wr,LineCurve:Oo,LineCurve3:Dc,QuadraticBezierCurve:Eo,QuadraticBezierCurve3:No,SplineCurve:Lo});class Uc extends se{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(t){this.curves.push(t)}closePath(){const t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);if(!t.equals(e)){const i=t.isVector2===!0?"LineCurve":"LineCurve3";this.curves.push(new Qs[i](e,t))}return this}getPoint(t,e){const i=t*this.getLength(),s=this.getCurveLengths();let n=0;for(;n<s.length;){if(s[n]>=i){const r=s[n]-i,a=this.curves[n],o=a.getLength(),h=o===0?0:1-r/o;return a.getPointAt(h,e)}n++}return null}getLength(){const t=this.getCurveLengths();return t[t.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const t=[];let e=0;for(let i=0,s=this.curves.length;i<s;i++)e+=this.curves[i].getLength(),t.push(e);return this.cacheLengths=t,t}getSpacedPoints(t=40){const e=[];for(let i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e}getPoints(t=12){const e=[];let i;for(let s=0,n=this.curves;s<n.length;s++){const r=n[s],a=r.isEllipseCurve?t*2:r.isLineCurve||r.isLineCurve3?1:r.isSplineCurve?t*r.points.length:t,o=r.getPoints(a);for(let h=0;h<o.length;h++){const c=o[h];i&&i.equals(c)||(e.push(c),i=c)}}return this.autoClose&&e.length>1&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e}copy(t){super.copy(t),this.curves=[];for(let e=0,i=t.curves.length;e<i;e++){const s=t.curves[e];this.curves.push(s.clone())}return this.autoClose=t.autoClose,this}toJSON(){const t=super.toJSON();t.autoClose=this.autoClose,t.curves=[];for(let e=0,i=this.curves.length;e<i;e++){const s=this.curves[e];t.curves.push(s.toJSON())}return t}fromJSON(t){super.fromJSON(t),this.autoClose=t.autoClose,this.curves=[];for(let e=0,i=t.curves.length;e<i;e++){const s=t.curves[e];this.curves.push(new Qs[s.type]().fromJSON(s))}return this}}class js extends Uc{constructor(t){super(),this.type="Path",this.currentPoint=new I,t&&this.setFromPoints(t)}setFromPoints(t){this.moveTo(t[0].x,t[0].y);for(let e=1,i=t.length;e<i;e++)this.lineTo(t[e].x,t[e].y);return this}moveTo(t,e){return this.currentPoint.set(t,e),this}lineTo(t,e){const i=new Oo(this.currentPoint.clone(),new I(t,e));return this.curves.push(i),this.currentPoint.set(t,e),this}quadraticCurveTo(t,e,i,s){const n=new Eo(this.currentPoint.clone(),new I(t,e),new I(i,s));return this.curves.push(n),this.currentPoint.set(i,s),this}bezierCurveTo(t,e,i,s,n,r){const a=new Ro(this.currentPoint.clone(),new I(t,e),new I(i,s),new I(n,r));return this.curves.push(a),this.currentPoint.set(n,r),this}splineThru(t){const e=[this.currentPoint.clone()].concat(t),i=new Lo(e);return this.curves.push(i),this.currentPoint.copy(t[t.length-1]),this}arc(t,e,i,s,n,r){const a=this.currentPoint.x,o=this.currentPoint.y;return this.absarc(t+a,e+o,i,s,n,r),this}absarc(t,e,i,s,n,r){return this.absellipse(t,e,i,i,s,n,r),this}ellipse(t,e,i,s,n,r,a,o){const h=this.currentPoint.x,c=this.currentPoint.y;return this.absellipse(t+h,e+c,i,s,n,r,a,o),this}absellipse(t,e,i,s,n,r,a,o){const h=new wr(t,e,i,s,n,r,a,o);if(this.curves.length>0){const u=h.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(h);const c=h.getPoint(1);return this.currentPoint.copy(c),this}copy(t){return super.copy(t),this.currentPoint.copy(t.currentPoint),this}toJSON(){const t=super.toJSON();return t.currentPoint=this.currentPoint.toArray(),t}fromJSON(t){return super.fromJSON(t),this.currentPoint.fromArray(t.currentPoint),this}}class an extends js{constructor(t){super(t),this.uuid=Et(),this.type="Shape",this.holes=[]}getPointsHoles(t){const e=[];for(let i=0,s=this.holes.length;i<s;i++)e[i]=this.holes[i].getPoints(t);return e}extractPoints(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}}copy(t){super.copy(t),this.holes=[];for(let e=0,i=t.holes.length;e<i;e++){const s=t.holes[e];this.holes.push(s.clone())}return this}toJSON(){const t=super.toJSON();t.uuid=this.uuid,t.holes=[];for(let e=0,i=this.holes.length;e<i;e++){const s=this.holes[e];t.holes.push(s.toJSON())}return t}fromJSON(t){super.fromJSON(t),this.uuid=t.uuid,this.holes=[];for(let e=0,i=t.holes.length;e<i;e++){const s=t.holes[e];this.holes.push(new js().fromJSON(s))}return this}}function Wc(l,t,e=2){const i=t&&t.length,s=i?t[0]*e:l.length;let n=Vo(l,0,s,e,!0);const r=[];if(!n||n.next===n.prev)return r;let a,o,h;if(i&&(n=Xc(l,t,n,e)),l.length>80*e){a=l[0],o=l[1];let c=a,u=o;for(let d=e;d<s;d+=e){const p=l[d],f=l[d+1];p<a&&(a=p),f<o&&(o=f),p>c&&(c=p),f>u&&(u=f)}h=Math.max(c-a,u-o),h=h!==0?32767/h:0}return Zi(n,r,e,a,o,h,0),r}function Vo(l,t,e,i,s){let n;if(s===nu(l,t,e,i)>0)for(let r=t;r<e;r+=i)n=Ua(r/i|0,l[r],l[r+1],n);else for(let r=e-i;r>=t;r-=i)n=Ua(r/i|0,l[r],l[r+1],n);return n&&wi(n,n.next)&&(Qi(n),n=n.next),n}function qe(l,t){if(!l)return l;t||(t=l);let e=l,i;do if(i=!1,!e.steiner&&(wi(e,e.next)||nt(e.prev,e,e.next)===0)){if(Qi(e),e=t=e.prev,e===e.next)break;i=!0}else e=e.next;while(i||e!==t);return t}function Zi(l,t,e,i,s,n,r){if(!l)return;!r&&n&&jc(l,i,s,n);let a=l;for(;l.prev!==l.next;){const o=l.prev,h=l.next;if(n?Hc(l,i,s,n):Gc(l)){t.push(o.i,l.i,h.i),Qi(l),l=h.next,a=h.next;continue}if(l=h,l===a){r?r===1?(l=qc(qe(l),t),Zi(l,t,e,i,s,n,2)):r===2&&Jc(l,t,e,i,s,n):Zi(qe(l),t,e,i,s,n,1);break}}}function Gc(l){const t=l.prev,e=l,i=l.next;if(nt(t,e,i)>=0)return!1;const s=t.x,n=e.x,r=i.x,a=t.y,o=e.y,h=i.y,c=Math.min(s,n,r),u=Math.min(a,o,h),d=Math.max(s,n,r),p=Math.max(a,o,h);let f=i.next;for(;f!==t;){if(f.x>=c&&f.x<=d&&f.y>=u&&f.y<=p&&Ui(s,a,n,o,r,h,f.x,f.y)&&nt(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function Hc(l,t,e,i){const s=l.prev,n=l,r=l.next;if(nt(s,n,r)>=0)return!1;const a=s.x,o=n.x,h=r.x,c=s.y,u=n.y,d=r.y,p=Math.min(a,o,h),f=Math.min(c,u,d),m=Math.max(a,o,h),y=Math.max(c,u,d),g=tr(p,f,t,e,i),x=tr(m,y,t,e,i);let b=l.prevZ,M=l.nextZ;for(;b&&b.z>=g&&M&&M.z<=x;){if(b.x>=p&&b.x<=m&&b.y>=f&&b.y<=y&&b!==s&&b!==r&&Ui(a,c,o,u,h,d,b.x,b.y)&&nt(b.prev,b,b.next)>=0||(b=b.prevZ,M.x>=p&&M.x<=m&&M.y>=f&&M.y<=y&&M!==s&&M!==r&&Ui(a,c,o,u,h,d,M.x,M.y)&&nt(M.prev,M,M.next)>=0))return!1;M=M.nextZ}for(;b&&b.z>=g;){if(b.x>=p&&b.x<=m&&b.y>=f&&b.y<=y&&b!==s&&b!==r&&Ui(a,c,o,u,h,d,b.x,b.y)&&nt(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;M&&M.z<=x;){if(M.x>=p&&M.x<=m&&M.y>=f&&M.y<=y&&M!==s&&M!==r&&Ui(a,c,o,u,h,d,M.x,M.y)&&nt(M.prev,M,M.next)>=0)return!1;M=M.nextZ}return!0}function qc(l,t){let e=l;do{const i=e.prev,s=e.next.next;!wi(i,s)&&Uo(i,e,e.next,s)&&$i(i,s)&&$i(s,i)&&(t.push(i.i,e.i,s.i),Qi(e),Qi(e.next),e=l=s),e=e.next}while(e!==l);return qe(e)}function Jc(l,t,e,i,s,n){let r=l;do{let a=r.next.next;for(;a!==r.prev;){if(r.i!==a.i&&eu(r,a)){let o=Wo(r,a);r=qe(r,r.next),o=qe(o,o.next),Zi(r,t,e,i,s,n,0),Zi(o,t,e,i,s,n,0);return}a=a.next}r=r.next}while(r!==l)}function Xc(l,t,e,i){const s=[];for(let n=0,r=t.length;n<r;n++){const a=t[n]*i,o=n<r-1?t[n+1]*i:l.length,h=Vo(l,a,o,i,!1);h===h.next&&(h.steiner=!0),s.push(tu(h))}s.sort(Yc);for(let n=0;n<s.length;n++)e=Zc(s[n],e);return e}function Yc(l,t){let e=l.x-t.x;if(e===0&&(e=l.y-t.y,e===0)){const i=(l.next.y-l.y)/(l.next.x-l.x),s=(t.next.y-t.y)/(t.next.x-t.x);e=i-s}return e}function Zc(l,t){const e=$c(l,t);if(!e)return t;const i=Wo(e,l);return qe(i,i.next),qe(e,e.next)}function $c(l,t){let e=t;const i=l.x,s=l.y;let n=-1/0,r;if(wi(l,e))return e;do{if(wi(l,e.next))return e.next;if(s<=e.y&&s>=e.next.y&&e.next.y!==e.y){const u=e.x+(s-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(u<=i&&u>n&&(n=u,r=e.x<e.next.x?e:e.next,u===i))return r}e=e.next}while(e!==t);if(!r)return null;const a=r,o=r.x,h=r.y;let c=1/0;e=r;do{if(i>=e.x&&e.x>=o&&i!==e.x&&Do(s<h?i:n,s,o,h,s<h?n:i,s,e.x,e.y)){const u=Math.abs(s-e.y)/(i-e.x);$i(e,l)&&(u<c||u===c&&(e.x>r.x||e.x===r.x&&Qc(r,e)))&&(r=e,c=u)}e=e.next}while(e!==a);return r}function Qc(l,t){return nt(l.prev,l,t.prev)<0&&nt(t.next,l,l.next)<0}function jc(l,t,e,i){let s=l;do s.z===0&&(s.z=tr(s.x,s.y,t,e,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==l);s.prevZ.nextZ=null,s.prevZ=null,Kc(s)}function Kc(l){let t,e=1;do{let i=l,s;l=null;let n=null;for(t=0;i;){t++;let r=i,a=0;for(let h=0;h<e&&(a++,r=r.nextZ,!!r);h++);let o=e;for(;a>0||o>0&&r;)a!==0&&(o===0||!r||i.z<=r.z)?(s=i,i=i.nextZ,a--):(s=r,r=r.nextZ,o--),n?n.nextZ=s:l=s,s.prevZ=n,n=s;i=r}n.nextZ=null,e*=2}while(t>1);return l}function tr(l,t,e,i,s){return l=(l-e)*s|0,t=(t-i)*s|0,l=(l|l<<8)&16711935,l=(l|l<<4)&252645135,l=(l|l<<2)&858993459,l=(l|l<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,l|t<<1}function tu(l){let t=l,e=l;do(t.x<e.x||t.x===e.x&&t.y<e.y)&&(e=t),t=t.next;while(t!==l);return e}function Do(l,t,e,i,s,n,r,a){return(s-r)*(t-a)>=(l-r)*(n-a)&&(l-r)*(i-a)>=(e-r)*(t-a)&&(e-r)*(n-a)>=(s-r)*(i-a)}function Ui(l,t,e,i,s,n,r,a){return!(l===r&&t===a)&&Do(l,t,e,i,s,n,r,a)}function eu(l,t){return l.next.i!==t.i&&l.prev.i!==t.i&&!iu(l,t)&&($i(l,t)&&$i(t,l)&&su(l,t)&&(nt(l.prev,l,t.prev)||nt(l,t.prev,t))||wi(l,t)&&nt(l.prev,l,l.next)>0&&nt(t.prev,t,t.next)>0)}function nt(l,t,e){return(t.y-l.y)*(e.x-t.x)-(t.x-l.x)*(e.y-t.y)}function wi(l,t){return l.x===t.x&&l.y===t.y}function Uo(l,t,e,i){const s=Os(nt(l,t,e)),n=Os(nt(l,t,i)),r=Os(nt(e,i,l)),a=Os(nt(e,i,t));return!!(s!==n&&r!==a||s===0&&Rs(l,e,t)||n===0&&Rs(l,i,t)||r===0&&Rs(e,l,i)||a===0&&Rs(e,t,i))}function Rs(l,t,e){return t.x<=Math.max(l.x,e.x)&&t.x>=Math.min(l.x,e.x)&&t.y<=Math.max(l.y,e.y)&&t.y>=Math.min(l.y,e.y)}function Os(l){return l>0?1:l<0?-1:0}function iu(l,t){let e=l;do{if(e.i!==l.i&&e.next.i!==l.i&&e.i!==t.i&&e.next.i!==t.i&&Uo(e,e.next,l,t))return!0;e=e.next}while(e!==l);return!1}function $i(l,t){return nt(l.prev,l,l.next)<0?nt(l,t,l.next)>=0&&nt(l,l.prev,t)>=0:nt(l,t,l.prev)<0||nt(l,l.next,t)<0}function su(l,t){let e=l,i=!1;const s=(l.x+t.x)/2,n=(l.y+t.y)/2;do e.y>n!=e.next.y>n&&e.next.y!==e.y&&s<(e.next.x-e.x)*(n-e.y)/(e.next.y-e.y)+e.x&&(i=!i),e=e.next;while(e!==l);return i}function Wo(l,t){const e=er(l.i,l.x,l.y),i=er(t.i,t.x,t.y),s=l.next,n=t.prev;return l.next=t,t.prev=l,e.next=s,s.prev=e,i.next=e,e.prev=i,n.next=i,i.prev=n,i}function Ua(l,t,e,i){const s=er(l,t,e);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function Qi(l){l.next.prev=l.prev,l.prev.next=l.next,l.prevZ&&(l.prevZ.nextZ=l.nextZ),l.nextZ&&(l.nextZ.prevZ=l.prevZ)}function er(l,t,e){return{i:l,x:t,y:e,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function nu(l,t,e,i){let s=0;for(let n=t,r=e-i;n<e;n+=i)s+=(l[r]-l[n])*(l[n+1]+l[r+1]),r=n;return s}class ru{static triangulate(t,e,i=2){return Wc(t,e,i)}}class jt{static area(t){const e=t.length;let i=0;for(let s=e-1,n=0;n<e;s=n++)i+=t[s].x*t[n].y-t[n].x*t[s].y;return i*.5}static isClockWise(t){return jt.area(t)<0}static triangulateShape(t,e){const i=[],s=[],n=[];Wa(t),Ga(i,t);let r=t.length;e.forEach(Wa);for(let o=0;o<e.length;o++)s.push(r),r+=e[o].length,Ga(i,e[o]);const a=ru.triangulate(i,s);for(let o=0;o<a.length;o+=3)n.push(a.slice(o,o+3));return n}}function Wa(l){const t=l.length;t>2&&l[t-1].equals(l[0])&&l.pop()}function Ga(l,t){for(let e=0;e<t.length;e++)l.push(t[e].x),l.push(t[e].y)}class vr extends q{constructor(t=new an([new I(.5,.5),new I(-.5,.5),new I(-.5,-.5),new I(.5,-.5)]),e={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},t=Array.isArray(t)?t:[t];const i=this,s=[],n=[];for(let a=0,o=t.length;a<o;a++){const h=t[a];r(h)}this.setAttribute("position",new P(s,3)),this.setAttribute("uv",new P(n,2)),this.computeVertexNormals();function r(a){const o=[],h=e.curveSegments!==void 0?e.curveSegments:12,c=e.steps!==void 0?e.steps:1,u=e.depth!==void 0?e.depth:1;let d=e.bevelEnabled!==void 0?e.bevelEnabled:!0,p=e.bevelThickness!==void 0?e.bevelThickness:.2,f=e.bevelSize!==void 0?e.bevelSize:p-.1,m=e.bevelOffset!==void 0?e.bevelOffset:0,y=e.bevelSegments!==void 0?e.bevelSegments:3;const g=e.extrudePath,x=e.UVGenerator!==void 0?e.UVGenerator:au;let b,M=!1,_,v,A,S;if(g){b=g.getSpacedPoints(c),M=!0,d=!1;const z=g.isCatmullRomCurve3?g.closed:!1;_=g.computeFrenetFrames(c,z),v=new w,A=new w,S=new w}d||(y=0,p=0,f=0,m=0);const T=a.extractPoints(h);let C=T.shape;const B=T.holes;if(!jt.isClockWise(C)){C=C.reverse();for(let z=0,F=B.length;z<F;z++){const k=B[z];jt.isClockWise(k)&&(B[z]=k.reverse())}}function L(z){const k=10000000000000001e-36;let E=z[0];for(let O=1;O<=z.length;O++){const Y=O%z.length,H=z[Y],it=H.x-E.x,st=H.y-E.y,ct=it*it+st*st,Bt=Math.max(Math.abs(H.x),Math.abs(H.y),Math.abs(E.x),Math.abs(E.y)),Ie=k*Bt*Bt;if(ct<=Ie){z.splice(Y,1),O--;continue}E=H}}L(C),B.forEach(L);const J=B.length,N=C;for(let z=0;z<J;z++){const F=B[z];C=C.concat(F)}function Q(z,F,k){return F||X("ExtrudeGeometry: vec does not exist"),z.clone().addScaledVector(F,k)}const K=C.length;function ut(z,F,k){let E,O,Y;const H=z.x-F.x,it=z.y-F.y,st=k.x-z.x,ct=k.y-z.y,Bt=H*H+it*it,Ie=H*ct-it*st;if(Math.abs(Ie)>Number.EPSILON){const Ft=Math.sqrt(Bt),Ur=Math.sqrt(st*st+ct*ct),Wr=F.x-it/Ft,Gr=F.y+H/Ft,nh=k.x-ct/Ur,rh=k.y+st/Ur,Hr=((nh-Wr)*ct-(rh-Gr)*st)/(H*ct-it*st);E=Wr+H*Hr-z.x,O=Gr+it*Hr-z.y;const qr=E*E+O*O;if(qr<=2)return new I(E,O);Y=Math.sqrt(qr/2)}else{let Ft=!1;H>Number.EPSILON?st>Number.EPSILON&&(Ft=!0):H<-Number.EPSILON?st<-Number.EPSILON&&(Ft=!0):Math.sign(it)===Math.sign(ct)&&(Ft=!0),Ft?(E=-it,O=H,Y=Math.sqrt(Bt)):(E=H,O=it,Y=Math.sqrt(Bt/2))}return new I(E/Y,O/Y)}const j=[];for(let z=0,F=N.length,k=F-1,E=z+1;z<F;z++,k++,E++)k===F&&(k=0),E===F&&(E=0),j[z]=ut(N[z],N[k],N[E]);const tt=[];let et,vt=j.concat();for(let z=0,F=J;z<F;z++){const k=B[z];et=[];for(let E=0,O=k.length,Y=O-1,H=E+1;E<O;E++,Y++,H++)Y===O&&(Y=0),H===O&&(H=0),et[E]=ut(k[E],k[Y],k[H]);tt.push(et),vt=vt.concat(et)}let xt;if(y===0)xt=jt.triangulateShape(N,B);else{const z=[],F=[];for(let k=0;k<y;k++){const E=k/y,O=p*Math.cos(E*Math.PI/2),Y=f*Math.sin(E*Math.PI/2)+m;for(let H=0,it=N.length;H<it;H++){const st=Q(N[H],j[H],Y);bt(st.x,st.y,-O),E===0&&z.push(st)}for(let H=0,it=J;H<it;H++){const st=B[H];et=tt[H];const ct=[];for(let Bt=0,Ie=st.length;Bt<Ie;Bt++){const Ft=Q(st[Bt],et[Bt],Y);bt(Ft.x,Ft.y,-O),E===0&&ct.push(Ft)}E===0&&F.push(ct)}}xt=jt.triangulateShape(z,F)}const ne=xt.length,ge=f+m;for(let z=0;z<K;z++){const F=d?Q(C[z],vt[z],ge):C[z];M?(A.copy(_.normals[0]).multiplyScalar(F.x),v.copy(_.binormals[0]).multiplyScalar(F.y),S.copy(b[0]).add(A).add(v),bt(S.x,S.y,S.z)):bt(F.x,F.y,0)}for(let z=1;z<=c;z++)for(let F=0;F<K;F++){const k=d?Q(C[F],vt[F],ge):C[F];M?(A.copy(_.normals[z]).multiplyScalar(k.x),v.copy(_.binormals[z]).multiplyScalar(k.y),S.copy(b[z]).add(A).add(v),bt(S.x,S.y,S.z)):bt(k.x,k.y,u/c*z)}for(let z=y-1;z>=0;z--){const F=z/y,k=p*Math.cos(F*Math.PI/2),E=f*Math.sin(F*Math.PI/2)+m;for(let O=0,Y=N.length;O<Y;O++){const H=Q(N[O],j[O],E);bt(H.x,H.y,u+k)}for(let O=0,Y=B.length;O<Y;O++){const H=B[O];et=tt[O];for(let it=0,st=H.length;it<st;it++){const ct=Q(H[it],et[it],E);M?bt(ct.x,ct.y+b[c-1].y,b[c-1].x+k):bt(ct.x,ct.y,u+k)}}}ts(),es();function ts(){const z=s.length/3;if(d){let F=0,k=K*F;for(let E=0;E<ne;E++){const O=xt[E];Yt(O[2]+k,O[1]+k,O[0]+k)}F=c+y*2,k=K*F;for(let E=0;E<ne;E++){const O=xt[E];Yt(O[0]+k,O[1]+k,O[2]+k)}}else{for(let F=0;F<ne;F++){const k=xt[F];Yt(k[2],k[1],k[0])}for(let F=0;F<ne;F++){const k=xt[F];Yt(k[0]+K*c,k[1]+K*c,k[2]+K*c)}}i.addGroup(z,s.length/3-z,0)}function es(){const z=s.length/3;let F=0;xe(N,F),F+=N.length;for(let k=0,E=B.length;k<E;k++){const O=B[k];xe(O,F),F+=O.length}i.addGroup(z,s.length/3-z,1)}function xe(z,F){let k=z.length;for(;--k>=0;){const E=k;let O=k-1;O<0&&(O=z.length-1);for(let Y=0,H=c+y*2;Y<H;Y++){const it=K*Y,st=K*(Y+1),ct=F+E+it,Bt=F+O+it,Ie=F+O+st,Ft=F+E+st;Ti(ct,Bt,Ie,Ft)}}}function bt(z,F,k){o.push(z),o.push(F),o.push(k)}function Yt(z,F,k){zt(z),zt(F),zt(k);const E=s.length/3,O=x.generateTopUV(i,s,E-3,E-2,E-1);re(O[0]),re(O[1]),re(O[2])}function Ti(z,F,k,E){zt(z),zt(F),zt(E),zt(F),zt(k),zt(E);const O=s.length/3,Y=x.generateSideWallUV(i,s,O-6,O-3,O-2,O-1);re(Y[0]),re(Y[1]),re(Y[3]),re(Y[1]),re(Y[2]),re(Y[3])}function zt(z){s.push(o[z*3+0]),s.push(o[z*3+1]),s.push(o[z*3+2])}function re(z){n.push(z.x),n.push(z.y)}}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}toJSON(){const t=super.toJSON(),e=this.parameters.shapes,i=this.parameters.options;return ou(e,i,t)}static fromJSON(t,e){const i=[];for(let n=0,r=t.shapes.length;n<r;n++){const a=e[t.shapes[n]];i.push(a)}const s=t.options.extrudePath;return s!==void 0&&(t.options.extrudePath=new Qs[s.type]().fromJSON(s)),new vr(i,t.options)}}const au={generateTopUV:function(l,t,e,i,s){const n=t[e*3],r=t[e*3+1],a=t[i*3],o=t[i*3+1],h=t[s*3],c=t[s*3+1];return[new I(n,r),new I(a,o),new I(h,c)]},generateSideWallUV:function(l,t,e,i,s,n){const r=t[e*3],a=t[e*3+1],o=t[e*3+2],h=t[i*3],c=t[i*3+1],u=t[i*3+2],d=t[s*3],p=t[s*3+1],f=t[s*3+2],m=t[n*3],y=t[n*3+1],g=t[n*3+2];return Math.abs(a-c)<Math.abs(r-h)?[new I(r,1-o),new I(h,1-u),new I(d,1-f),new I(m,1-g)]:[new I(a,1-o),new I(c,1-u),new I(p,1-f),new I(y,1-g)]}};function ou(l,t,e){if(e.shapes=[],Array.isArray(l))for(let i=0,s=l.length;i<s;i++){const n=l[i];e.shapes.push(n.uuid)}else e.shapes.push(l.uuid);return e.options=Object.assign({},t),t.extrudePath!==void 0&&(e.options.extrudePath=t.extrudePath.toJSON()),e}class Sr extends Je{constructor(t=1,e=0){const i=(1+Math.sqrt(5))/2,s=[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,0,1],n=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1];super(s,n,t,e),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e}}static fromJSON(t){return new Sr(t.radius,t.detail)}}class Ar extends q{constructor(t=[new I(0,-.5),new I(.5,0),new I(0,.5)],e=12,i=0,s=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:i,phiLength:s},e=Math.floor(e),s=D(s,0,Math.PI*2);const n=[],r=[],a=[],o=[],h=[],c=1/e,u=new w,d=new I,p=new w,f=new w,m=new w;let y=0,g=0;for(let x=0;x<=t.length-1;x++)switch(x){case 0:y=t[x+1].x-t[x].x,g=t[x+1].y-t[x].y,p.x=g*1,p.y=-y,p.z=g*0,m.copy(p),p.normalize(),o.push(p.x,p.y,p.z);break;case t.length-1:o.push(m.x,m.y,m.z);break;default:y=t[x+1].x-t[x].x,g=t[x+1].y-t[x].y,p.x=g*1,p.y=-y,p.z=g*0,f.copy(p),p.x+=m.x,p.y+=m.y,p.z+=m.z,p.normalize(),o.push(p.x,p.y,p.z),m.copy(f)}for(let x=0;x<=e;x++){const b=i+x*c*s,M=Math.sin(b),_=Math.cos(b);for(let v=0;v<=t.length-1;v++){u.x=t[v].x*M,u.y=t[v].y,u.z=t[v].x*_,r.push(u.x,u.y,u.z),d.x=x/e,d.y=v/(t.length-1),a.push(d.x,d.y);const A=o[3*v+0]*M,S=o[3*v+1],T=o[3*v+0]*_;h.push(A,S,T)}}for(let x=0;x<e;x++)for(let b=0;b<t.length-1;b++){const M=b+x*t.length,_=M,v=M+t.length,A=M+t.length+1,S=M+1;n.push(_,v,S),n.push(A,S,v)}this.setIndex(n),this.setAttribute("position",new P(r,3)),this.setAttribute("uv",new P(a,2)),this.setAttribute("normal",new P(h,3))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Ar(t.points,t.segments,t.phiStart,t.phiLength)}}class on extends Je{constructor(t=1,e=0){const i=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],s=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];super(i,s,t,e),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e}}static fromJSON(t){return new on(t.radius,t.detail)}}class Tr extends q{constructor(t=1,e=1,i=1,s=1){super(),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:s};const n=t/2,r=e/2,a=Math.floor(i),o=Math.floor(s),h=a+1,c=o+1,u=t/a,d=e/o,p=[],f=[],m=[],y=[];for(let g=0;g<c;g++){const x=g*d-r;for(let b=0;b<h;b++){const M=b*u-n;f.push(M,-x,0),m.push(0,0,1),y.push(b/a),y.push(1-g/o)}}for(let g=0;g<o;g++)for(let x=0;x<a;x++){const b=x+h*g,M=x+h*(g+1),_=x+1+h*(g+1),v=x+1+h*g;p.push(b,M,v),p.push(M,_,v)}this.setIndex(p),this.setAttribute("position",new P(f,3)),this.setAttribute("normal",new P(m,3)),this.setAttribute("uv",new P(y,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Tr(t.width,t.height,t.widthSegments,t.heightSegments)}}class Cr extends q{constructor(t=.5,e=1,i=32,s=1,n=0,r=Math.PI*2){super(),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:s,thetaStart:n,thetaLength:r},i=Math.max(3,i),s=Math.max(1,s);const a=[],o=[],h=[],c=[];let u=t;const d=(e-t)/s,p=new w,f=new I;for(let m=0;m<=s;m++){for(let y=0;y<=i;y++){const g=n+y/i*r;p.x=u*Math.cos(g),p.y=u*Math.sin(g),o.push(p.x,p.y,p.z),h.push(0,0,1),f.x=(p.x/e+1)/2,f.y=(p.y/e+1)/2,c.push(f.x,f.y)}u+=d}for(let m=0;m<s;m++){const y=m*(i+1);for(let g=0;g<i;g++){const x=g+y,b=x,M=x+i+1,_=x+i+2,v=x+1;a.push(b,M,v),a.push(M,_,v)}}this.setIndex(a),this.setAttribute("position",new P(o,3)),this.setAttribute("normal",new P(h,3)),this.setAttribute("uv",new P(c,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Cr(t.innerRadius,t.outerRadius,t.thetaSegments,t.phiSegments,t.thetaStart,t.thetaLength)}}class Ir extends q{constructor(t=new an([new I(0,.5),new I(-.5,-.5),new I(.5,-.5)]),e=12){super(),this.type="ShapeGeometry",this.parameters={shapes:t,curveSegments:e};const i=[],s=[],n=[],r=[];let a=0,o=0;if(Array.isArray(t)===!1)h(t);else for(let c=0;c<t.length;c++)h(t[c]),this.addGroup(a,o,c),a+=o,o=0;this.setIndex(i),this.setAttribute("position",new P(s,3)),this.setAttribute("normal",new P(n,3)),this.setAttribute("uv",new P(r,2));function h(c){const u=s.length/3,d=c.extractPoints(e);let p=d.shape;const f=d.holes;jt.isClockWise(p)===!1&&(p=p.reverse());for(let y=0,g=f.length;y<g;y++){const x=f[y];jt.isClockWise(x)===!0&&(f[y]=x.reverse())}const m=jt.triangulateShape(p,f);for(let y=0,g=f.length;y<g;y++){const x=f[y];p=p.concat(x)}for(let y=0,g=p.length;y<g;y++){const x=p[y];s.push(x.x,x.y,0),n.push(0,0,1),r.push(x.x,x.y)}for(let y=0,g=m.length;y<g;y++){const x=m[y],b=x[0]+u,M=x[1]+u,_=x[2]+u;i.push(b,M,_),o+=3}}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}toJSON(){const t=super.toJSON(),e=this.parameters.shapes;return hu(e,t)}static fromJSON(t,e){const i=[];for(let s=0,n=t.shapes.length;s<n;s++){const r=e[t.shapes[s]];i.push(r)}return new Ir(i,t.curveSegments)}}function hu(l,t){if(t.shapes=[],Array.isArray(l))for(let e=0,i=l.length;e<i;e++){const s=l[e];t.shapes.push(s.uuid)}else t.shapes.push(l.uuid);return t}class hn extends q{constructor(t=1,e=32,i=16,s=0,n=Math.PI*2,r=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:s,phiLength:n,thetaStart:r,thetaLength:a},e=Math.max(3,Math.floor(e)),i=Math.max(2,Math.floor(i));const o=Math.min(r+a,Math.PI);let h=0;const c=[],u=new w,d=new w,p=[],f=[],m=[],y=[];for(let g=0;g<=i;g++){const x=[],b=g/i,M=r+b*a,_=t*Math.cos(M),v=Math.sqrt(t*t-_*_);let A=0;g===0&&r===0?A=.5/e:g===i&&o===Math.PI&&(A=-.5/e);for(let S=0;S<=e;S++){const T=S/e,C=s+T*n;u.x=-v*Math.cos(C),u.y=_,u.z=v*Math.sin(C),f.push(u.x,u.y,u.z),d.copy(u).normalize(),m.push(d.x,d.y,d.z),y.push(T+A,1-b),x.push(h++)}c.push(x)}for(let g=0;g<i;g++)for(let x=0;x<e;x++){const b=c[g][x+1],M=c[g][x],_=c[g+1][x],v=c[g+1][x+1];(g!==0||r>0)&&p.push(b,M,v),(g!==i-1||o<Math.PI)&&p.push(M,_,v)}this.setIndex(p),this.setAttribute("position",new P(f,3)),this.setAttribute("normal",new P(m,3)),this.setAttribute("uv",new P(y,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new hn(t.radius,t.widthSegments,t.heightSegments,t.phiStart,t.phiLength,t.thetaStart,t.thetaLength)}}class zr extends Je{constructor(t=1,e=0){const i=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],s=[2,1,0,0,3,2,1,3,0,2,3,1];super(i,s,t,e),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e}}static fromJSON(t){return new zr(t.radius,t.detail)}}class Br extends q{constructor(t=1,e=.4,i=12,s=48,n=Math.PI*2,r=0,a=Math.PI*2){super(),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:i,tubularSegments:s,arc:n,thetaStart:r,thetaLength:a},i=Math.floor(i),s=Math.floor(s);const o=[],h=[],c=[],u=[],d=new w,p=new w,f=new w;for(let m=0;m<=i;m++){const y=r+m/i*a;for(let g=0;g<=s;g++){const x=g/s*n;p.x=(t+e*Math.cos(y))*Math.cos(x),p.y=(t+e*Math.cos(y))*Math.sin(x),p.z=e*Math.sin(y),h.push(p.x,p.y,p.z),d.x=t*Math.cos(x),d.y=t*Math.sin(x),f.subVectors(p,d).normalize(),c.push(f.x,f.y,f.z),u.push(g/s),u.push(m/i)}}for(let m=1;m<=i;m++)for(let y=1;y<=s;y++){const g=(s+1)*m+y-1,x=(s+1)*(m-1)+y-1,b=(s+1)*(m-1)+y,M=(s+1)*m+y;o.push(g,x,M),o.push(x,b,M)}this.setIndex(o),this.setAttribute("position",new P(h,3)),this.setAttribute("normal",new P(c,3)),this.setAttribute("uv",new P(u,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Br(t.radius,t.tube,t.radialSegments,t.tubularSegments,t.arc,t.thetaStart,t.thetaLength)}}class Fr extends q{constructor(t=1,e=.4,i=64,s=8,n=2,r=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:i,radialSegments:s,p:n,q:r},i=Math.floor(i),s=Math.floor(s);const a=[],o=[],h=[],c=[],u=new w,d=new w,p=new w,f=new w,m=new w,y=new w,g=new w;for(let b=0;b<=i;++b){const M=b/i*n*Math.PI*2;x(M,n,r,t,p),x(M+.01,n,r,t,f),y.subVectors(f,p),g.addVectors(f,p),m.crossVectors(y,g),g.crossVectors(m,y),m.normalize(),g.normalize();for(let _=0;_<=s;++_){const v=_/s*Math.PI*2,A=-e*Math.cos(v),S=e*Math.sin(v);u.x=p.x+(A*g.x+S*m.x),u.y=p.y+(A*g.y+S*m.y),u.z=p.z+(A*g.z+S*m.z),o.push(u.x,u.y,u.z),d.subVectors(u,p).normalize(),h.push(d.x,d.y,d.z),c.push(b/i),c.push(_/s)}}for(let b=1;b<=i;b++)for(let M=1;M<=s;M++){const _=(s+1)*(b-1)+(M-1),v=(s+1)*b+(M-1),A=(s+1)*b+M,S=(s+1)*(b-1)+M;a.push(_,v,S),a.push(v,A,S)}this.setIndex(a),this.setAttribute("position",new P(o,3)),this.setAttribute("normal",new P(h,3)),this.setAttribute("uv",new P(c,2));function x(b,M,_,v,A){const S=Math.cos(b),T=Math.sin(b),C=_/M*b,B=Math.cos(C);A.x=v*(2+B)*.5*S,A.y=v*(2+B)*T*.5,A.z=v*Math.sin(C)*.5}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Fr(t.radius,t.tube,t.tubularSegments,t.radialSegments,t.p,t.q)}}class kr extends q{constructor(t=new No(new w(-1,-1,0),new w(-1,1,0),new w(1,1,0)),e=64,i=1,s=8,n=!1){super(),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:i,radialSegments:s,closed:n};const r=t.computeFrenetFrames(e,n);this.tangents=r.tangents,this.normals=r.normals,this.binormals=r.binormals;const a=new w,o=new w,h=new I;let c=new w;const u=[],d=[],p=[],f=[];m(),this.setIndex(f),this.setAttribute("position",new P(u,3)),this.setAttribute("normal",new P(d,3)),this.setAttribute("uv",new P(p,2));function m(){for(let b=0;b<e;b++)y(b);y(n===!1?e:0),x(),g()}function y(b){c=t.getPointAt(b/e,c);const M=r.normals[b],_=r.binormals[b];for(let v=0;v<=s;v++){const A=v/s*Math.PI*2,S=Math.sin(A),T=-Math.cos(A);o.x=T*M.x+S*_.x,o.y=T*M.y+S*_.y,o.z=T*M.z+S*_.z,o.normalize(),d.push(o.x,o.y,o.z),a.x=c.x+i*o.x,a.y=c.y+i*o.y,a.z=c.z+i*o.z,u.push(a.x,a.y,a.z)}}function g(){for(let b=1;b<=e;b++)for(let M=1;M<=s;M++){const _=(s+1)*(b-1)+(M-1),v=(s+1)*b+(M-1),A=(s+1)*b+M,S=(s+1)*(b-1)+M;f.push(_,v,S),f.push(v,A,S)}}function x(){for(let b=0;b<=e;b++)for(let M=0;M<=s;M++)h.x=b/e,h.y=M/s,p.push(h.x,h.y)}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}toJSON(){const t=super.toJSON();return t.path=this.parameters.path.toJSON(),t}static fromJSON(t){return new kr(new Qs[t.path.type]().fromJSON(t.path),t.tubularSegments,t.radius,t.radialSegments,t.closed)}}class lu extends q{constructor(t=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:t},t!==null){const e=[],i=new Set,s=new w,n=new w;if(t.index!==null){const r=t.attributes.position,a=t.index;let o=t.groups;o.length===0&&(o=[{start:0,count:a.count,materialIndex:0}]);for(let h=0,c=o.length;h<c;++h){const u=o[h],d=u.start,p=u.count;for(let f=d,m=d+p;f<m;f+=3)for(let y=0;y<3;y++){const g=a.getX(f+y),x=a.getX(f+(y+1)%3);s.fromBufferAttribute(r,g),n.fromBufferAttribute(r,x),Ha(s,n,i)===!0&&(e.push(s.x,s.y,s.z),e.push(n.x,n.y,n.z))}}}else{const r=t.attributes.position;for(let a=0,o=r.count/3;a<o;a++)for(let h=0;h<3;h++){const c=3*a+h,u=3*a+(h+1)%3;s.fromBufferAttribute(r,c),n.fromBufferAttribute(r,u),Ha(s,n,i)===!0&&(e.push(s.x,s.y,s.z),e.push(n.x,n.y,n.z))}}this.setAttribute("position",new P(e,3))}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}}function Ha(l,t,e){const i=`${l.x},${l.y},${l.z}-${t.x},${t.y},${t.z}`,s=`${t.x},${t.y},${t.z}-${l.x},${l.y},${l.z}`;return e.has(i)===!0||e.has(s)===!0?!1:(e.add(i),e.add(s),!0)}var qa=Object.freeze({__proto__:null,BoxGeometry:gr,CapsuleGeometry:xr,CircleGeometry:br,ConeGeometry:rn,CylinderGeometry:nn,DodecahedronGeometry:Mr,EdgesGeometry:zc,ExtrudeGeometry:vr,IcosahedronGeometry:Sr,LatheGeometry:Ar,OctahedronGeometry:on,PlaneGeometry:Tr,PolyhedronGeometry:Je,RingGeometry:Cr,ShapeGeometry:Ir,SphereGeometry:hn,TetrahedronGeometry:zr,TorusGeometry:Br,TorusKnotGeometry:Fr,TubeGeometry:kr,WireframeGeometry:lu});class cu extends gt{constructor(t){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new U(0),this.transparent=!0,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.fog=t.fog,this}}function Pr(l){const t={};for(const e in l){t[e]={};for(const i in l[e]){const s=l[e][i];if(Ja(s))s.isRenderTargetTexture?(V("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),t[e][i]=null):t[e][i]=s.clone();else if(Array.isArray(s))if(Ja(s[0])){const n=[];for(let r=0,a=s.length;r<a;r++)n[r]=s[r].clone();t[e][i]=n}else t[e][i]=s.slice();else t[e][i]=s}}return t}function uu(l){const t={};for(let e=0;e<l.length;e++){const i=Pr(l[e]);for(const s in i)t[s]=i[s]}return t}function Ja(l){return l&&(l.isColor||l.isMatrix3||l.isMatrix4||l.isVector2||l.isVector3||l.isVector4||l.isTexture||l.isQuaternion)}function du(l){const t=[];for(let e=0;e<l.length;e++)t.push(l[e].clone());return t}function Df(l){const t=l.getRenderTarget();return t===null?l.outputColorSpace:t.isXRRenderTarget===!0?t.texture.colorSpace:Rt.workingColorSpace}const Uf={clone:Pr,merge:uu};var pu=`void main() {
6
+ gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
7
+ }`,fu=`void main() {
8
+ gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
9
+ }`;class Go extends gt{constructor(t){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=pu,this.fragmentShader=fu,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,t!==void 0&&this.setValues(t)}copy(t){return super.copy(t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=Pr(t.uniforms),this.uniformsGroups=du(t.uniformsGroups),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.fog=t.fog,this.lights=t.lights,this.clipping=t.clipping,this.extensions=Object.assign({},t.extensions),this.glslVersion=t.glslVersion,this.defaultAttributeValues=Object.assign({},t.defaultAttributeValues),this.index0AttributeName=t.index0AttributeName,this.uniformsNeedUpdate=t.uniformsNeedUpdate,this}toJSON(t){const e=super.toJSON(t);e.glslVersion=this.glslVersion,e.uniforms={};for(const s in this.uniforms){const r=this.uniforms[s].value;r&&r.isTexture?e.uniforms[s]={type:"t",value:r.toJSON(t).uuid}:r&&r.isColor?e.uniforms[s]={type:"c",value:r.getHex()}:r&&r.isVector2?e.uniforms[s]={type:"v2",value:r.toArray()}:r&&r.isVector3?e.uniforms[s]={type:"v3",value:r.toArray()}:r&&r.isVector4?e.uniforms[s]={type:"v4",value:r.toArray()}:r&&r.isMatrix3?e.uniforms[s]={type:"m3",value:r.toArray()}:r&&r.isMatrix4?e.uniforms[s]={type:"m4",value:r.toArray()}:e.uniforms[s]={value:r}}Object.keys(this.defines).length>0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e.lights=this.lights,e.clipping=this.clipping;const i={};for(const s in this.extensions)this.extensions[s]===!0&&(i[s]=!0);return Object.keys(i).length>0&&(e.extensions=i),e}fromJSON(t,e){if(super.fromJSON(t,e),t.uniforms!==void 0)for(const i in t.uniforms){const s=t.uniforms[i];switch(this.uniforms[i]={},s.type){case"t":this.uniforms[i].value=e[s.value]||null;break;case"c":this.uniforms[i].value=new U().setHex(s.value);break;case"v2":this.uniforms[i].value=new I().fromArray(s.value);break;case"v3":this.uniforms[i].value=new w().fromArray(s.value);break;case"v4":this.uniforms[i].value=new Ct().fromArray(s.value);break;case"m3":this.uniforms[i].value=new ee().fromArray(s.value);break;case"m4":this.uniforms[i].value=new G().fromArray(s.value);break;default:this.uniforms[i].value=s.value}}if(t.defines!==void 0&&(this.defines=t.defines),t.vertexShader!==void 0&&(this.vertexShader=t.vertexShader),t.fragmentShader!==void 0&&(this.fragmentShader=t.fragmentShader),t.glslVersion!==void 0&&(this.glslVersion=t.glslVersion),t.extensions!==void 0)for(const i in t.extensions)this.extensions[i]=t.extensions[i];return t.lights!==void 0&&(this.lights=t.lights),t.clipping!==void 0&&(this.clipping=t.clipping),this}}class mu extends Go{constructor(t){super(t),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class Ho extends gt{constructor(t){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new U(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new U(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=_i,this.normalScale=new I(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new te,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.envMapIntensity=t.envMapIntensity,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class yu extends Ho{constructor(t){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new I(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return D(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new U(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new U(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new U(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._dispersion=0,this._iridescence=0,this._retroreflectivity=0,this._sheen=0,this._transmission=0,this.setValues(t)}get anisotropy(){return this._anisotropy}set anisotropy(t){this._anisotropy>0!=t>0&&this.version++,this._anisotropy=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get iridescence(){return this._iridescence}set iridescence(t){this._iridescence>0!=t>0&&this.version++,this._iridescence=t}get dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=t}get retroreflectivity(){return this._retroreflectivity}set retroreflectivity(t){this._retroreflectivity>0!=t>0&&this.version++,this._retroreflectivity=t}get sheen(){return this._sheen}set sheen(t){this._sheen>0!=t>0&&this.version++,this._sheen=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(t),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=t.anisotropy,this.anisotropyRotation=t.anisotropyRotation,this.anisotropyMap=t.anisotropyMap,this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.dispersion=t.dispersion,this.ior=t.ior,this.iridescence=t.iridescence,this.iridescenceMap=t.iridescenceMap,this.iridescenceIOR=t.iridescenceIOR,this.iridescenceThicknessRange=[...t.iridescenceThicknessRange],this.iridescenceThicknessMap=t.iridescenceThicknessMap,this.retroreflectivity=t.retroreflectivity,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}}class gu extends gt{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new U(16777215),this.specular=new U(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new U(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=_i,this.normalScale=new I(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new te,this.combine=nr,this.reflectivity=1,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class xu extends gt{constructor(t){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new U(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new U(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=_i,this.normalScale=new I(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.gradientMap=t.gradientMap,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}class bu extends gt{constructor(t){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=_i,this.normalScale=new I(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.flatShading=t.flatShading,this}}class Mu extends gt{constructor(t){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new U(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new U(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=_i,this.normalScale=new I(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new te,this.combine=nr,this.reflectivity=1,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class wu extends gt{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=bl,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}}class _u extends gt{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}}class vu extends gt{constructor(t){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new U(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=_i,this.normalScale=new I(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.flatShading=t.flatShading,this.fog=t.fog,this}}class Su extends It{constructor(t){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}copy(t){return super.copy(t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this}}function qt(l,t){return!l||l.constructor===t?l:typeof t.BYTES_PER_ELEMENT=="number"?new t(l):Array.prototype.slice.call(l)}function qi(l){return l!==void 0&&l.inTangents!==void 0&&l.outTangents!==void 0}function qo(l){function t(s,n){return l[s]-l[n]}const e=l.length,i=new Array(e);for(let s=0;s!==e;++s)i[s]=s;return i.sort(t),i}function ir(l,t,e){const i=l.length,s=new l.constructor(i);for(let n=0,r=0;r!==i;++n){const a=e[n]*t;for(let o=0;o!==t;++o)s[r++]=l[a+o]}return s}function Jo(l,t,e,i){let s=1,n=l[0];for(;n!==void 0&&n[i]===void 0;)n=l[s++];if(n===void 0)return;let r=n[i];if(r!==void 0)if(Array.isArray(r))do r=n[i],r!==void 0&&(t.push(n.time),e.push(...r)),n=l[s++];while(n!==void 0);else if(r.toArray!==void 0)do r=n[i],r!==void 0&&(t.push(n.time),r.toArray(e,e.length)),n=l[s++];while(n!==void 0);else do r=n[i],r!==void 0&&(t.push(n.time),e.push(r)),n=l[s++];while(n!==void 0)}function Au(l,t,e,i,s=30){const n=l.clone();n.name=t;const r=[];for(let o=0;o<n.tracks.length;++o){const h=n.tracks[o],c=h.getValueSize(),u=[],d=[];for(let p=0;p<h.times.length;++p){const f=h.times[p]*s;if(!(f<e||f>=i)){u.push(h.times[p]);for(let m=0;m<c;++m)d.push(h.values[p*c+m])}}u.length!==0&&(h.times=qt(u,h.times.constructor),h.values=qt(d,h.values.constructor),r.push(h))}n.tracks=r;let a=1/0;for(let o=0;o<n.tracks.length;++o)a>n.tracks[o].times[0]&&(a=n.tracks[o].times[0]);for(let o=0;o<n.tracks.length;++o)n.tracks[o].shift(-1*a);return n.resetDuration(),n}function Tu(l,t=0,e=l,i=30){i<=0&&(i=30);const s=e.tracks.length,n=t/i;for(let r=0;r<s;++r){const a=e.tracks[r],o=a.ValueTypeName;if(o==="bool"||o==="string")continue;const h=l.tracks.find(function(g){return g.name===a.name&&g.ValueTypeName===o});if(h===void 0)continue;let c=0;const u=a.getValueSize();a.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(c=u/3);let d=0;const p=h.getValueSize();h.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(d=p/3);const f=a.times.length-1;let m;if(n<=a.times[0]){const g=c,x=u-c;m=a.values.slice(g,x)}else if(n>=a.times[f]){const g=f*u+c,x=g+u-c;m=a.values.slice(g,x)}else{const g=a.createInterpolant(),x=c,b=u-c;g.evaluate(n),m=g.resultBuffer.slice(x,b)}o==="quaternion"&&new Tt().fromArray(m).normalize().conjugate().toArray(m);const y=h.times.length;for(let g=0;g<y;++g){const x=g*p+d;if(o==="quaternion")Tt.multiplyQuaternionsFlat(h.values,x,m,0,h.values,x);else{const b=p-d*2;for(let M=0;M<b;++M)h.values[x+M]-=m[M]}}}return l.blendMode=Mo,l}class Wf{static convertArray(t,e){return qt(t,e)}static isTypedArray(t){return _o(t)}static hasTangents(t){return qi(t)}static getKeyframeOrder(t){return qo(t)}static sortedArray(t,e,i){return ir(t,e,i)}static flattenJSON(t,e,i,s){Jo(t,e,i,s)}static subclip(t,e,i,s,n=30){return Au(t,e,i,s,n)}static makeClipAdditive(t,e=0,i=t,s=30){return Tu(t,e,i,s)}}class Ki{constructor(t,e,i,s){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=s!==void 0?s:new e.constructor(i),this.sampleValues=e,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(t){const e=this.parameterPositions;let i=this._cachedIndex,s=e[i],n=e[i-1];t:{e:{let r;i:{s:if(!(t<s)){for(let a=i+2;;){if(s===void 0){if(t<n)break s;return i=e.length,this._cachedIndex=i,this.copySampleValue_(i-1)}if(i===a)break;if(n=s,s=e[++i],t<s)break e}r=e.length;break i}if(!(t>=n)){const a=e[1];t<a&&(i=2,n=a);for(let o=i-2;;){if(n===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===o)break;if(s=n,n=e[--i-1],t>=n)break e}r=i,i=0;break i}break t}for(;i<r;){const a=i+r>>>1;t<e[a]?r=a:i=a+1}if(s=e[i],n=e[i-1],n===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(s===void 0)return i=e.length,this._cachedIndex=i,this.copySampleValue_(i-1)}this._cachedIndex=i,this.intervalChanged_(i,n,s)}return this.interpolate_(i,n,t,s)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(t){const e=this.resultBuffer,i=this.sampleValues,s=this.valueSize,n=t*s;for(let r=0;r!==s;++r)e[r]=i[n+r];return e}interpolate_(){throw new Error("THREE.Interpolant: Call to abstract method.")}intervalChanged_(){}}class Cu extends Ki{constructor(t,e,i,s){super(t,e,i,s),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:fi,endingEnd:fi}}intervalChanged_(t,e,i){const s=this.parameterPositions;let n=t-2,r=t+1,a=s[n],o=s[r];if(a===void 0)switch(this.getSettings_().endingStart){case mi:n=t,a=2*e-i;break;case Js:n=s.length-2,a=e+s[n]-s[n+1];break;default:n=t,a=i}if(o===void 0)switch(this.getSettings_().endingEnd){case mi:r=t,o=2*i-e;break;case Js:r=1,o=i+s[1]-s[0];break;default:r=t-1,o=e}const h=(i-e)*.5,c=this.valueSize;this._weightPrev=h/(e-a),this._weightNext=h/(o-i),this._offsetPrev=n*c,this._offsetNext=r*c}interpolate_(t,e,i,s){const n=this.resultBuffer,r=this.sampleValues,a=this.valueSize,o=t*a,h=o-a,c=this._offsetPrev,u=this._offsetNext,d=this._weightPrev,p=this._weightNext,f=(i-e)/(s-e),m=f*f,y=m*f,g=-d*y+2*d*m-d*f,x=(1+d)*y+(-1.5-2*d)*m+(-.5+d)*f+1,b=(-1-p)*y+(1.5+p)*m+.5*f,M=p*y-p*m;for(let _=0;_!==a;++_)n[_]=g*r[c+_]+x*r[h+_]+b*r[o+_]+M*r[u+_];return n}}class Xo extends Ki{constructor(t,e,i,s){super(t,e,i,s)}interpolate_(t,e,i,s){const n=this.resultBuffer,r=this.sampleValues,a=this.valueSize,o=t*a,h=o-a,c=(i-e)/(s-e),u=1-c;for(let d=0;d!==a;++d)n[d]=r[h+d]*u+r[o+d]*c;return n}}class Iu extends Ki{constructor(t,e,i,s){super(t,e,i,s)}interpolate_(t){return this.copySampleValue_(t-1)}}class zu extends Ki{interpolate_(t,e,i,s){const n=this.resultBuffer,r=this.sampleValues,a=this.valueSize,o=t*a,h=o-a,c=this.inTangents,u=this.outTangents;if(!c||!u){const f=(i-e)/(s-e),m=1-f;for(let y=0;y!==a;++y)n[y]=r[h+y]*m+r[o+y]*f;return n}const d=a*2,p=t-1;for(let f=0;f!==a;++f){const m=r[h+f],y=r[o+f],g=p*d+f*2,x=u[g],b=u[g+1],M=t*d+f*2,_=c[M],v=c[M+1],A=Fu(i,e,x,_,s);n[f]=Yo(A,m,b,v,y)}return n}}function Yo(l,t,e,i,s){const n=1-l;return n*n*n*t+3*n*n*l*e+3*n*l*l*i+l*l*l*s}function Bu(l,t,e,i,s){const n=1-l;return 3*n*n*(e-t)+6*n*l*(i-e)+3*l*l*(s-i)}function Fu(l,t,e,i,s){let n=(l-t)/(s-t);for(let r=0;r<8;r++){const a=Yo(n,t,e,i,s)-l;if(Math.abs(a)<1e-10)break;const o=Bu(n,t,e,i,s);if(Math.abs(o)<1e-10)break;n=Math.max(0,Math.min(1,n-a/o))}return n}class Xt{constructor(t,e,i,s){if(t===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(e===void 0||e.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=qt(e,this.TimeBufferType),this.values=qt(i,this.ValueBufferType),this.setInterpolation(s||this.DefaultInterpolation)}static toJSON(t){const e=t.constructor;let i;if(e.toJSON!==this.toJSON)i=e.toJSON(t);else{i={name:t.name,times:qt(t.times,Array),values:qt(t.values,Array)};const s=t.getInterpolation();s!==t.DefaultInterpolation&&(i.interpolation=s),qi(t.settings)&&(i.settings={inTangents:qt(t.settings.inTangents,Array),outTangents:qt(t.settings.outTangents,Array)})}return i.type=t.ValueTypeName,i}InterpolantFactoryMethodDiscrete(t){return new Iu(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new Xo(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new Cu(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodBezier(t){const e=new zu(this.times,this.values,this.getValueSize(),t);return this.settings&&(e.inTangents=this.settings.inTangents,e.outTangents=this.settings.outTangents),e}setInterpolation(t){let e;switch(t){case qs:e=this.InterpolantFactoryMethodDiscrete;break;case jn:e=this.InterpolantFactoryMethodLinear;break;case ln:e=this.InterpolantFactoryMethodSmooth;break;case ta:e=this.InterpolantFactoryMethodBezier;break}if(e===void 0){const i="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(t!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(i);return V("KeyframeTrack:",i),this}return this.createInterpolant=e,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return qs;case this.InterpolantFactoryMethodLinear:return jn;case this.InterpolantFactoryMethodSmooth:return ln;case this.InterpolantFactoryMethodBezier:return ta}}getValueSize(){return this.values.length/this.times.length}shift(t){if(t!==0){const e=this.times;for(let i=0,s=e.length;i!==s;++i)e[i]+=t}return this}scale(t){if(t!==1){const e=this.times;for(let i=0,s=e.length;i!==s;++i)e[i]*=t;qi(this.settings)&&(Xa(this.settings.inTangents,t),Xa(this.settings.outTangents,t))}return this}trim(t,e){const i=this.times,s=i.length;let n=0,r=s-1;for(;n!==s&&i[n]<t;)++n;for(;r!==-1&&i[r]>e;)--r;if(++r,n!==0||r!==s){n>=r&&(r=Math.max(r,1),n=r-1);const a=this.getValueSize();this.times=i.slice(n,r),this.values=this.values.slice(n*a,r*a)}return this}validate(){let t=!0;const e=this.getValueSize();e-Math.floor(e)!==0&&(X("KeyframeTrack: Invalid value size in track.",this),t=!1);const i=this.times,s=this.values,n=i.length;n===0&&(X("KeyframeTrack: Track is empty.",this),t=!1);let r=null;for(let a=0;a!==n;a++){const o=i[a];if(typeof o=="number"&&isNaN(o)){X("KeyframeTrack: Time is not a valid number.",this,a,o),t=!1;break}if(r!==null&&r>o){X("KeyframeTrack: Out of order keys.",this,a,o,r),t=!1;break}r=o}if(s!==void 0&&_o(s))for(let a=0,o=s.length;a!==o;++a){const h=s[a];if(isNaN(h)){X("KeyframeTrack: Value is not a valid number.",this,a,h),t=!1;break}}return t}optimize(){const t=this.times.slice(),e=this.values.slice(),i=this.getValueSize(),s=this.getInterpolation()===ln,n=t.length-1;let r=1;for(let a=1;a<n;++a){let o=!1;const h=t[a],c=t[a+1];if(h!==c&&(a!==1||h!==t[0]))if(s)o=!0;else{const u=a*i,d=u-i,p=u+i;for(let f=0;f!==i;++f){const m=e[u+f];if(m!==e[d+f]||m!==e[p+f]){o=!0;break}}}if(o){if(a!==r){t[r]=t[a];const u=a*i,d=r*i;for(let p=0;p!==i;++p)e[d+p]=e[u+p]}++r}}if(n>0){t[r]=t[n];for(let a=n*i,o=r*i,h=0;h!==i;++h)e[o+h]=e[a+h];++r}return r!==t.length?(this.times=t.slice(0,r),this.values=e.slice(0,r*i)):(this.times=t,this.values=e),this}clone(){const t=this.times.slice(),e=this.values.slice(),i=this.constructor,s=new i(this.name,t,e);return s.createInterpolant=this.createInterpolant,qi(this.settings)&&(s.settings={inTangents:this.settings.inTangents.slice(),outTangents:this.settings.outTangents.slice()}),s}}function Xa(l,t){for(let e=0,i=l.length;e!==i;e+=2)l[e]*=t}Xt.prototype.ValueTypeName="";Xt.prototype.TimeBufferType=Float32Array;Xt.prototype.ValueBufferType=Float32Array;Xt.prototype.DefaultInterpolation=jn;class Si extends Xt{constructor(t,e,i){super(t,e,i)}}Si.prototype.ValueTypeName="bool";Si.prototype.ValueBufferType=Array;Si.prototype.DefaultInterpolation=qs;Si.prototype.InterpolantFactoryMethodLinear=void 0;Si.prototype.InterpolantFactoryMethodSmooth=void 0;class Zo extends Xt{constructor(t,e,i,s){super(t,e,i,s)}}Zo.prototype.ValueTypeName="color";class Rr extends Xt{constructor(t,e,i,s){super(t,e,i,s)}}Rr.prototype.ValueTypeName="number";class ku extends Ki{constructor(t,e,i,s){super(t,e,i,s)}interpolate_(t,e,i,s){const n=this.resultBuffer,r=this.sampleValues,a=this.valueSize,o=(i-e)/(s-e);let h=t*a;for(let c=h+a;h!==c;h+=4)Tt.slerpFlat(n,0,r,h-a,r,h,o);return n}}class Or extends Xt{constructor(t,e,i,s){super(t,e,i,s)}InterpolantFactoryMethodLinear(t){return new ku(this.times,this.values,this.getValueSize(),t)}}Or.prototype.ValueTypeName="quaternion";Or.prototype.InterpolantFactoryMethodSmooth=void 0;class Ai extends Xt{constructor(t,e,i){super(t,e,i)}}Ai.prototype.ValueTypeName="string";Ai.prototype.ValueBufferType=Array;Ai.prototype.DefaultInterpolation=qs;Ai.prototype.InterpolantFactoryMethodLinear=void 0;Ai.prototype.InterpolantFactoryMethodSmooth=void 0;class $o extends Xt{constructor(t,e,i,s){super(t,e,i,s)}}$o.prototype.ValueTypeName="vector";class Ks{constructor(t="",e=-1,i=[],s=hr){this.name=t,this.tracks=i,this.duration=e,this.blendMode=s,this.uuid=Et(),this.userData={},this.duration<0&&this.resetDuration()}static parse(t){const e=[],i=t.tracks,s=1/(t.fps||1);for(let r=0,a=i.length;r!==a;++r)e.push(Ru(i[r]).scale(s));const n=new this(t.name,t.duration,e,t.blendMode);return n.uuid=t.uuid,n.userData=JSON.parse(t.userData||"{}"),n}static toJSON(t){const e=[],i=t.tracks,s={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid,blendMode:t.blendMode,userData:JSON.stringify(t.userData)};for(let n=0,r=i.length;n!==r;++n)e.push(Xt.toJSON(i[n]));return s}static CreateFromMorphTargetSequence(t,e,i,s){const n=e.length,r=[];for(let a=0;a<n;a++){let o=[],h=[];o.push((a+n-1)%n,a,(a+1)%n),h.push(0,1,0);const c=qo(o);o=ir(o,1,c),h=ir(h,1,c),!s&&o[0]===0&&(o.push(n),h.push(h[0])),r.push(new Rr(".morphTargetInfluences["+e[a].name+"]",o,h).scale(1/i))}return new this(t,-1,r)}static findByName(t,e){let i=t;if(!Array.isArray(t)){const s=t;i=s.geometry&&s.geometry.animations||s.animations}for(let s=0;s<i.length;s++)if(i[s].name===e)return i[s];return null}static CreateClipsFromMorphTargetSequences(t,e,i){const s={},n=/^([\w-]*?)([\d]+)$/;for(let a=0,o=t.length;a<o;a++){const h=t[a],c=h.name.match(n);if(c&&c.length>1){const u=c[1];let d=s[u];d||(s[u]=d=[]),d.push(h)}}const r=[];for(const a in s)r.push(this.CreateFromMorphTargetSequence(a,s[a],e,i));return r}resetDuration(){const t=this.tracks;let e=0;for(let i=0,s=t.length;i!==s;++i){const n=this.tracks[i];e=Math.max(e,n.times[n.times.length-1])}return this.duration=e,this}trim(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this}validate(){let t=!0;for(let e=0;e<this.tracks.length;e++)t=t&&this.tracks[e].validate();return t}optimize(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}clone(){const t=[];for(let i=0;i<this.tracks.length;i++)t.push(this.tracks[i].clone());const e=new this.constructor(this.name,this.duration,t,this.blendMode);return e.userData=JSON.parse(JSON.stringify(this.userData)),e}toJSON(){return this.constructor.toJSON(this)}}function Pu(l){switch(l.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Rr;case"vector":case"vector2":case"vector3":case"vector4":return $o;case"color":return Zo;case"quaternion":return Or;case"bool":case"boolean":return Si;case"string":return Ai}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+l)}function Ru(l){if(l.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const t=Pu(l.type);if(l.times===void 0){const i=[],s=[];Jo(l.keys,i,s,"value"),l.times=i,l.values=s}let e;return t.parse!==void 0?e=t.parse(l):e=new t(l.name,l.times,l.values,l.interpolation),qi(l.settings)&&(e.settings={inTangents:qt(l.settings.inTangents,Float32Array),outTangents:qt(l.settings.outTangents,Float32Array)}),e}const pe={enabled:!1,files:{},add:function(l,t){this.enabled!==!1&&(Ya(l)||(this.files[l]=t))},get:function(l){if(this.enabled!==!1&&!Ya(l))return this.files[l]},remove:function(l){delete this.files[l]},clear:function(){this.files={}}};function Ya(l){try{const t=l.slice(l.indexOf(":")+1);return new URL(t).protocol==="blob:"}catch{return!1}}class Qo{constructor(t,e,i){const s=this;let n=!1,r=0,a=0,o;const h=[];this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=i,this._abortController=null,this.itemStart=function(c){a++,n===!1&&s.onStart!==void 0&&s.onStart(c,r,a),n=!0},this.itemEnd=function(c){r++,s.onProgress!==void 0&&s.onProgress(c,r,a),r===a&&(n=!1,s.onLoad!==void 0&&s.onLoad())},this.itemError=function(c){s.onError!==void 0&&s.onError(c)},this.resolveURL=function(c){return c=c.normalize("NFC"),o?o(c):c},this.setURLModifier=function(c){return o=c,this},this.addHandler=function(c,u){return h.push(c,u),this},this.removeHandler=function(c){const u=h.indexOf(c);return u!==-1&&h.splice(u,2),this},this.getHandler=function(c){for(let u=0,d=h.length;u<d;u+=2){const p=h[u],f=h[u+1];if(p.global&&(p.lastIndex=0),p.test(c))return f}return null},this.abort=function(){return this.abortController.abort(),this._abortController=null,this}}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}}const Ou=new Qo;class Lt{constructor(t){this.manager=t!==void 0?t:Ou,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}load(){}loadAsync(t,e){const i=this;return new Promise(function(s,n){i.load(t,s,e,n)})}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}abort(){return this}}Lt.DEFAULT_MATERIAL_NAME="__DEFAULT";const ue={};class Eu extends Error{constructor(t,e){super(t),this.response=e}}class Ce extends Lt{constructor(t){super(t),this.mimeType="",this.responseType="",this._abortController=new AbortController}load(t,e,i,s){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const n=pe.get(`file:${t}`);if(n!==void 0){this.manager.itemStart(t),setTimeout(()=>{e&&e(n),this.manager.itemEnd(t)},0);return}if(ue[t]!==void 0){ue[t].push({onLoad:e,onProgress:i,onError:s});return}ue[t]=[],ue[t].push({onLoad:e,onProgress:i,onError:s});const r=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),a=this.mimeType,o=this.responseType;fetch(r).then(h=>{if(h.status===200||h.status===0){if(h.status===0&&V("FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||h.body===void 0||h.body.getReader===void 0)return h;const c=ue[t],u=h.body.getReader(),d=h.headers.get("X-File-Size")||h.headers.get("Content-Length"),p=d?parseInt(d):0,f=p!==0;let m=0;const y=new ReadableStream({start(g){x();function x(){u.read().then(({done:b,value:M})=>{if(b)g.close();else{m+=M.byteLength;const _=new ProgressEvent("progress",{lengthComputable:f,loaded:m,total:p});for(let v=0,A=c.length;v<A;v++){const S=c[v];S.onProgress&&S.onProgress(_)}g.enqueue(M),x()}},b=>{g.error(b)})}}});return new Response(y)}else throw new Eu(`fetch for "${h.url}" responded with ${h.status}: ${h.statusText}`,h)}).then(h=>{switch(o){case"arraybuffer":return h.arrayBuffer();case"blob":return h.blob();case"document":return h.text().then(c=>new DOMParser().parseFromString(c,a));case"json":return h.json();default:if(a==="")return h.text();{const u=/charset="?([^;"\s]*)"?/i.exec(a),d=u&&u[1]?u[1].toLowerCase():void 0,p=new TextDecoder(d);return h.arrayBuffer().then(f=>p.decode(f))}}}).then(h=>{pe.add(`file:${t}`,h);const c=ue[t];delete ue[t];for(let u=0,d=c.length;u<d;u++){const p=c[u];p.onLoad&&p.onLoad(h)}}).catch(h=>{const c=ue[t];if(c===void 0)throw this.manager.itemError(t),h;delete ue[t];for(let u=0,d=c.length;u<d;u++){const p=c[u];p.onError&&p.onError(h)}this.manager.itemError(t)}).finally(()=>{this.manager.itemEnd(t)}),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}class Gf extends Lt{constructor(t){super(t)}load(t,e,i,s){const n=this,r=new Ce(this.manager);r.setPath(this.path),r.setRequestHeader(this.requestHeader),r.setWithCredentials(this.withCredentials),r.load(t,function(a){try{e(n.parse(JSON.parse(a)))}catch(o){s?s(o):X(o),n.manager.itemError(t)}},i,s)}parse(t){const e=[];for(let i=0;i<t.length;i++){const s=Ks.parse(t[i]);e.push(s)}return e}}class Hf extends Lt{constructor(t){super(t)}load(t,e,i,s){const n=this,r=[],a=new yr,o=new Ce(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(n.withCredentials);let h=0;function c(u){o.load(t[u],function(d){const p=n.parse(d,!0);r[u]={width:p.width,height:p.height,format:p.format,mipmaps:p.mipmaps},h+=1,h===6&&(p.mipmapCount===1&&(a.minFilter=Jt),a.image=r,a.format=p.format,a.needsUpdate=!0,e&&e(a))},i,s)}if(Array.isArray(t))for(let u=0,d=t.length;u<d;++u)c(u);else o.load(t,function(u){const d=n.parse(u,!0);if(d.isCubemap){const p=d.mipmaps.length/d.mipmapCount;for(let f=0;f<p;f++){r[f]={mipmaps:[]};for(let m=0;m<d.mipmapCount;m++)r[f].mipmaps.push(d.mipmaps[f*d.mipmapCount+m]),r[f].format=d.format,r[f].width=d.width,r[f].height=d.height}a.image=r}else a.image.width=d.width,a.image.height=d.height,a.mipmaps=d.mipmaps;d.mipmapCount===1&&(a.minFilter=Jt),a.format=d.format,a.needsUpdate=!0,e&&e(a)},i,s);return a}}const li=new WeakMap;class tn extends Lt{constructor(t){super(t)}load(t,e,i,s){this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const n=this,r=pe.get(`image:${t}`);if(r!==void 0){if(r.complete===!0)n.manager.itemStart(t),setTimeout(function(){e&&e(r),n.manager.itemEnd(t)},0);else{let u=li.get(r);u===void 0&&(u=[],li.set(r,u)),u.push({onLoad:e,onError:s})}return r}const a=Xs("img");function o(){c(),e&&e(this);const u=li.get(this)||[];for(let d=0;d<u.length;d++){const p=u[d];p.onLoad&&p.onLoad(this)}li.delete(this),n.manager.itemEnd(t)}function h(u){c(),s&&s(u),pe.remove(`image:${t}`);const d=li.get(this)||[];for(let p=0;p<d.length;p++){const f=d[p];f.onError&&f.onError(u)}li.delete(this),n.manager.itemError(t),n.manager.itemEnd(t)}function c(){a.removeEventListener("load",o,!1),a.removeEventListener("error",h,!1)}return a.addEventListener("load",o,!1),a.addEventListener("error",h,!1),t.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),pe.add(`image:${t}`,a),n.manager.itemStart(t),a.src=t,a}}class qf extends Lt{constructor(t){super(t)}load(t,e,i,s){const n=new Po;n.colorSpace=Dt;const r=new tn(this.manager);r.setCrossOrigin(this.crossOrigin),r.setPath(this.path);let a=0;function o(h){r.load(t[h],function(c){n.images[h]=c,a++,a===6&&(n.needsUpdate=!0,e&&e(n))},void 0,s)}for(let h=0;h<t.length;++h)o(h);return n}}class Jf extends Lt{constructor(t){super(t)}load(t,e,i,s){const n=this,r=new Kt,a=new Ce(this.manager);return a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setPath(this.path),a.setWithCredentials(n.withCredentials),a.load(t,function(o){let h;try{h=n.parse(o)}catch(c){s!==void 0?s(c):X(c);return}n._applyTexData(r,h),e&&e(r,h)},i,s),r}createDataTexture(t){const e=new Kt;return this._applyTexData(e,this.parse(t)),e}_applyTexData(t,e){e.image!==void 0?t.image=e.image:e.data!==void 0&&(t.image.width=e.width,t.image.height=e.height,t.image.data=e.data),t.wrapS=e.wrapS!==void 0?e.wrapS:$t,t.wrapT=e.wrapT!==void 0?e.wrapT:$t,t.magFilter=e.magFilter!==void 0?e.magFilter:Jt,t.minFilter=e.minFilter!==void 0?e.minFilter:Jt,t.anisotropy=e.anisotropy!==void 0?e.anisotropy:1,e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.mipmaps!==void 0&&(t.mipmaps=e.mipmaps,t.minFilter=ar),e.mipmapCount===1&&(t.minFilter=Jt),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),t.needsUpdate=!0}}class Xf extends Lt{constructor(t){super(t)}load(t,e,i,s){const n=new ht,r=new tn(this.manager);return r.setCrossOrigin(this.crossOrigin),r.setPath(this.path),r.load(t,function(a){n.image=a,n.needsUpdate=!0,e!==void 0&&e(n)},i,s),n}}class Xe extends ${constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new U(t),this.intensity=e}copy(t,e){return super.copy(t,e),this.color.copy(t.color),this.intensity=t.intensity,this}toJSON(t){const e=super.toJSON(t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,e}}class Nu extends Xe{constructor(t,e,i){super(t,i),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy($.DEFAULT_UP),this.updateMatrix(),this.groundColor=new U(e)}copy(t,e){return super.copy(t,e),this.groundColor.copy(t.groundColor),this}toJSON(t){const e=super.toJSON(t);return e.object.groundColor=this.groundColor.getHex(),e}}const Un=new G,Za=new w,$a=new w;class Er{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.biasNode=null,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new I(512,512),this.mapType=or,this.map=null,this.mapPass=null,this.matrix=new G,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Ys,this._frameExtents=new I(1,1),this._viewportCount=1,this._viewports=[new Ct(0,0,1,1)]}getViewportCount(){return this._viewportCount}getCamera(){return this.camera}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera;Za.setFromMatrixPosition(t.matrixWorld),e.position.copy(Za),$a.setFromMatrixPosition(t.target.matrixWorld),e.lookAt($a),e.updateMatrixWorld(),this._updateMatrix(e,this.matrix,this._frustum)}_updateMatrix(t,e,i,s){Un.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),i.setFromProjectionMatrix(Un,t.coordinateSystem,t.reversedDepth);const n=this._frameExtents,r=s?s.z/n.x:1,a=s?s.w/n.y:1,o=s?s.x/n.x:0,h=s?s.y/n.y:0;t.coordinateSystem===bi||t.reversedDepth?e.set(.5*r,0,0,.5*r+o,0,.5*a,0,.5*a+h,0,0,1,0,0,0,0,1):e.set(.5*r,0,0,.5*r+o,0,.5*a,0,.5*a+h,0,0,.5,.5,0,0,0,1),e.multiply(Un)}getViewport(t){return this._viewports[t]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(t){return this.camera=t.camera.clone(),this.intensity=t.intensity,this.bias=t.bias,this.radius=t.radius,this.autoUpdate=t.autoUpdate,this.needsUpdate=t.needsUpdate,this.normalBias=t.normalBias,this.blurSamples=t.blurSamples,this.mapSize.copy(t.mapSize),this.biasNode=t.biasNode,this}clone(){return new this.constructor().copy(this)}toJSON(){const t={};return t.intensity=this.intensity,t.bias=this.bias,t.normalBias=this.normalBias,t.radius=this.radius,t.blurSamples=this.blurSamples,t.mapSize=this.mapSize.toArray(),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}const Es=new w,Ns=new Tt,Zt=new w;class Nr extends ${constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new G,this.projectionMatrix=new G,this.projectionMatrixInverse=new G,this.coordinateSystem=Qt,this._reversedDepth=!1}get reversedDepth(){return this._reversedDepth}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.coordinateSystem=t.coordinateSystem,this}getWorldDirection(t){return super.getWorldDirection(t).negate()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorld.decompose(Es,Ns,Zt),Zt.x===1&&Zt.y===1&&Zt.z===1?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(Es,Ns,Zt.set(1,1,1)).invert()}updateWorldMatrix(t,e,i=!1){super.updateWorldMatrix(t,e,i),this.matrixWorld.decompose(Es,Ns,Zt),Zt.x===1&&Zt.y===1&&Zt.z===1?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(Es,Ns,Zt.set(1,1,1)).invert()}clone(){return new this.constructor().copy(this)}}const ve=new w,Qa=new I,ja=new I;class Ut extends Nr{constructor(t=50,e=1,i=.1,s=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=i,this.far=s,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const e=.5*this.getFilmHeight()/t;this.fov=Xi*2*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(Ge*.5*this.fov);return .5*this.getFilmHeight()/t}getEffectiveFOV(){return Xi*2*Math.atan(Math.tan(Ge*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(t,e,i){ve.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(ve.x,ve.y).multiplyScalar(-t/ve.z),ve.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(ve.x,ve.y).multiplyScalar(-t/ve.z)}getViewSize(t,e){return this.getViewBounds(t,Qa,ja),e.subVectors(ja,Qa)}setViewOffset(t,e,i,s,n,r){this.aspect=t/e,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=s,this.view.width=n,this.view.height=r,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let e=t*Math.tan(Ge*.5*this.fov)/this.zoom,i=2*e,s=this.aspect*i,n=-.5*s;const r=this.view;if(this.view!==null&&this.view.enabled){const o=r.fullWidth,h=r.fullHeight;n+=r.offsetX*s/o,e-=r.offsetY*i/h,s*=r.width/o,i*=r.height/h}const a=this.filmOffset;a!==0&&(n+=t*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(n,n+s,e,e-i,t,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,this.view!==null&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}class Lu extends Er{constructor(){super(new Ut(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(t){const e=this.camera,i=Xi*2*t.angle*this.focus,s=this.mapSize.width/this.mapSize.height*this.aspect,n=t.distance||e.far;(i!==e.fov||s!==e.aspect||n!==e.far)&&(e.fov=i,e.aspect=s,e.far=n,e.updateProjectionMatrix()),super.updateMatrices(t)}copy(t){return super.copy(t),this.focus=t.focus,this.aspect=t.aspect,this}toJSON(){const t=super.toJSON();return t.focus=this.focus,t.aspect=this.aspect,t}}class Vu extends Xe{constructor(t,e,i=0,s=Math.PI/3,n=0,r=2){super(t,e),this.isSpotLight=!0,this.type="SpotLight",this.position.copy($.DEFAULT_UP),this.updateMatrix(),this.target=new $,this.distance=i,this.angle=s,this.penumbra=n,this.decay=r,this.map=null,this.shadow=new Lu}get power(){return this.intensity*Math.PI}set power(t){this.intensity=t/Math.PI}dispose(){super.dispose(),this.shadow.dispose()}copy(t,e){return super.copy(t,e),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.map=t.map,this.shadow=t.shadow.clone(),this}toJSON(t){const e=super.toJSON(t);return e.object.distance=this.distance,e.object.angle=this.angle,e.object.decay=this.decay,e.object.penumbra=this.penumbra,e.object.target=this.target.uuid,this.map&&this.map.isTexture&&(e.object.map=this.map.toJSON(t).uuid),e.object.shadow=this.shadow.toJSON(),e}}class Du extends Er{constructor(){super(new Ut(90,1,.5,500)),this.isPointLightShadow=!0}}class Uu extends Xe{constructor(t,e,i=0,s=2){super(t,e),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=s,this.shadow=new Du}get power(){return this.intensity*4*Math.PI}set power(t){this.intensity=t/(4*Math.PI)}dispose(){super.dispose(),this.shadow.dispose()}copy(t,e){return super.copy(t,e),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}toJSON(t){const e=super.toJSON(t);return e.object.distance=this.distance,e.object.decay=this.decay,e.object.shadow=this.shadow.toJSON(),e}}class jo extends Nr{constructor(t=-1,e=1,i=1,s=-1,n=.1,r=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=i,this.bottom=s,this.near=n,this.far=r,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this}setViewOffset(t,e,i,s,n,r){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=s,this.view.width=n,this.view.height=r,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,s=(this.top+this.bottom)/2;let n=i-t,r=i+t,a=s+e,o=s-e;if(this.view!==null&&this.view.enabled){const h=(this.right-this.left)/this.view.fullWidth/this.zoom,c=(this.top-this.bottom)/this.view.fullHeight/this.zoom;n+=h*this.view.offsetX,r=n+h*this.view.width,a-=c*this.view.offsetY,o=a-c*this.view.height}this.projectionMatrix.makeOrthographic(n,r,a,o,this.near,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,this.view!==null&&(e.object.view=Object.assign({},this.view)),e}}class Wu extends Er{constructor(){super(new jo(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class Gu extends Xe{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy($.DEFAULT_UP),this.updateMatrix(),this.target=new $,this.shadow=new Wu}dispose(){super.dispose(),this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}toJSON(t){const e=super.toJSON(t);return e.object.shadow=this.shadow.toJSON(),e.object.target=this.target.uuid,e}}class Hu extends Xe{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class qu extends Xe{constructor(t,e,i=10,s=10){super(t,e),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=i,this.height=s}get power(){return this.intensity*this.width*this.height*Math.PI}set power(t){this.intensity=t/(this.width*this.height*Math.PI)}copy(t){return super.copy(t),this.width=t.width,this.height=t.height,this}toJSON(t){const e=super.toJSON(t);return e.object.width=this.width,e.object.height=this.height,e}}class Ko{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let t=0;t<9;t++)this.coefficients.push(new w)}set(t){for(let e=0;e<9;e++)this.coefficients[e].copy(t[e]);return this}zero(){for(let t=0;t<9;t++)this.coefficients[t].set(0,0,0);return this}getAt(t,e){const i=t.x,s=t.y,n=t.z,r=this.coefficients;return e.copy(r[0]).multiplyScalar(.282095),e.addScaledVector(r[1],.488603*s),e.addScaledVector(r[2],.488603*n),e.addScaledVector(r[3],.488603*i),e.addScaledVector(r[4],1.092548*(i*s)),e.addScaledVector(r[5],1.092548*(s*n)),e.addScaledVector(r[6],.315392*(3*n*n-1)),e.addScaledVector(r[7],1.092548*(i*n)),e.addScaledVector(r[8],.546274*(i*i-s*s)),e}getIrradianceAt(t,e){const i=t.x,s=t.y,n=t.z,r=this.coefficients;return e.copy(r[0]).multiplyScalar(.886227),e.addScaledVector(r[1],2*.511664*s),e.addScaledVector(r[2],2*.511664*n),e.addScaledVector(r[3],2*.511664*i),e.addScaledVector(r[4],2*.429043*i*s),e.addScaledVector(r[5],2*.429043*s*n),e.addScaledVector(r[6],.743125*n*n-.247708),e.addScaledVector(r[7],2*.429043*i*n),e.addScaledVector(r[8],.429043*(i*i-s*s)),e}add(t){for(let e=0;e<9;e++)this.coefficients[e].add(t.coefficients[e]);return this}addScaledSH(t,e){for(let i=0;i<9;i++)this.coefficients[i].addScaledVector(t.coefficients[i],e);return this}scale(t){for(let e=0;e<9;e++)this.coefficients[e].multiplyScalar(t);return this}lerp(t,e){for(let i=0;i<9;i++)this.coefficients[i].lerp(t.coefficients[i],e);return this}equals(t){for(let e=0;e<9;e++)if(!this.coefficients[e].equals(t.coefficients[e]))return!1;return!0}copy(t){return this.set(t.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(t,e=0){const i=this.coefficients;for(let s=0;s<9;s++)i[s].fromArray(t,e+s*3);return this}toArray(t=[],e=0){const i=this.coefficients;for(let s=0;s<9;s++)i[s].toArray(t,e+s*3);return t}static getBasisAt(t,e){const i=t.x,s=t.y,n=t.z;e[0]=.282095,e[1]=.488603*s,e[2]=.488603*n,e[3]=.488603*i,e[4]=1.092548*i*s,e[5]=1.092548*s*n,e[6]=.315392*(3*n*n-1),e[7]=1.092548*i*n,e[8]=.546274*(i*i-s*s)}}class Ju extends Xe{constructor(t=new Ko,e=1){super(void 0,e),this.isLightProbe=!0,this.sh=t}copy(t){return super.copy(t),this.sh.copy(t.sh),this}toJSON(t){const e=super.toJSON(t);return e.object.sh=this.sh.toArray(),e}}const Ka={};class Lr extends Lt{constructor(t){super(t),this.textures={}}load(t,e,i,s){const n=this,r=new Ce(n.manager);r.setPath(n.path),r.setRequestHeader(n.requestHeader),r.setWithCredentials(n.withCredentials),r.load(t,function(a){try{e(n.parse(JSON.parse(a)))}catch(o){s?s(o):X(o),n.manager.itemError(t)}},i,s)}parse(t){const e=this.createMaterialFromType(t.type);return e.fromJSON(t,this.textures),e}setTextures(t){return this.textures=t,this}createMaterialFromType(t){return Lr.createMaterialFromType(t)}static createMaterialFromType(t){const i={ShadowMaterial:cu,SpriteMaterial:zo,RawShaderMaterial:mu,ShaderMaterial:Go,PointsMaterial:ko,MeshPhysicalMaterial:yu,MeshStandardMaterial:Ho,MeshPhongMaterial:gu,MeshToonMaterial:xu,MeshNormalMaterial:bu,MeshLambertMaterial:Mu,MeshDepthMaterial:wu,MeshDistanceMaterial:_u,MeshBasicMaterial:vi,MeshMatcapMaterial:vu,LineDashedMaterial:Su,LineBasicMaterial:It,Material:gt,...Ka}[t];let s;return i===void 0?(We(`MaterialLoader: Unknown material type "${t}". Use .registerMaterial() before starting the deserialization process.`),s=new gt):s=new i,s}static registerMaterial(t,e){Ka[t]=e}}class to{static extractUrlBase(t){const e=t.lastIndexOf("/");return e===-1?"./":t.slice(0,e+1)}static resolveURL(t,e){return typeof t!="string"||t===""?"":(/^https?:\/\//i.test(e)&&/^\//.test(t)&&(e=e.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(t)||/^data:.*,.*$/i.test(t)||/^blob:.*$/i.test(t)?t:e+t)}}class Xu extends q{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(t){return super.copy(t),this.instanceCount=t.instanceCount,this}toJSON(){const t=super.toJSON();return t.instanceCount=this.instanceCount,t.isInstancedBufferGeometry=!0,t}}class Yu extends Lt{constructor(t){super(t)}load(t,e,i,s){const n=this,r=new Ce(n.manager);r.setPath(n.path),r.setRequestHeader(n.requestHeader),r.setWithCredentials(n.withCredentials),r.load(t,function(a){try{e(n.parse(JSON.parse(a)))}catch(o){s?s(o):X(o),n.manager.itemError(t)}},i,s)}parse(t){const e={},i={};function s(p,f){if(e[f]!==void 0)return e[f];const y=p.interleavedBuffers[f],g=n(p,y.buffer),x=yi(y.type,g),b=new pr(x,y.stride);return b.uuid=y.uuid,y.usage!==void 0&&b.setUsage(y.usage),e[f]=b,b}function n(p,f){if(i[f]!==void 0)return i[f];const y=p.arrayBuffers[f],g=new Uint32Array(y).buffer;return i[f]=g,g}const r=t.isInstancedBufferGeometry?new Xu:new q,a=t.data.index;if(a!==void 0){const p=yi(a.type,a.array);r.setIndex(new rt(p,1))}const o=t.data.attributes;for(const p in o){const f=o[p];let m;if(f.isInterleavedBufferAttribute){const y=s(t.data,f.data);m=new Mi(y,f.itemSize,f.offset,f.normalized)}else{const y=yi(f.type,f.array),g=f.isInstancedBufferAttribute?Yi:rt;m=new g(y,f.itemSize,f.normalized)}f.name!==void 0&&(m.name=f.name),f.usage!==void 0&&m.setUsage(f.usage),f.gpuType!==void 0&&(m.gpuType=f.gpuType),r.setAttribute(p,m)}const h=t.data.morphAttributes;if(h)for(const p in h){const f=h[p],m=[];for(let y=0,g=f.length;y<g;y++){const x=f[y];let b;if(x.isInterleavedBufferAttribute){const M=s(t.data,x.data);b=new Mi(M,x.itemSize,x.offset,x.normalized)}else{const M=yi(x.type,x.array);b=new rt(M,x.itemSize,x.normalized)}x.name!==void 0&&(b.name=x.name),x.usage!==void 0&&b.setUsage(x.usage),x.gpuType!==void 0&&(b.gpuType=x.gpuType),m.push(b)}r.morphAttributes[p]=m}t.data.morphTargetsRelative&&(r.morphTargetsRelative=!0);const u=t.data.groups||t.data.drawcalls||t.data.offsets;if(u!==void 0)for(let p=0,f=u.length;p!==f;++p){const m=u[p];r.addGroup(m.start,m.count,m.materialIndex)}const d=t.data.boundingSphere;return d!==void 0&&(r.boundingSphere=new yt().fromJSON(d)),t.name&&(r.name=t.name),t.userData&&(r.userData=t.userData),r}}const Wn={};class Yf extends Lt{constructor(t){super(t)}load(t,e,i,s){const n=this,r=this.path===""?to.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||r;const a=new Ce(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(t,function(o){let h=null;try{h=JSON.parse(o)}catch(u){s!==void 0&&s(u),X("ObjectLoader: Can't parse "+t+".",u.message);return}const c=h.metadata;if(c===void 0||c.type===void 0||c.type.toLowerCase()==="geometry"){s!==void 0&&s(new Error("THREE.ObjectLoader: Can't load "+t)),X("ObjectLoader: Can't load "+t);return}n.parse(h,e)},i,s)}async loadAsync(t,e){const i=this,s=this.path===""?to.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||s;const n=new Ce(this.manager);n.setPath(this.path),n.setRequestHeader(this.requestHeader),n.setWithCredentials(this.withCredentials);const r=await n.loadAsync(t,e);let a;try{a=JSON.parse(r)}catch(h){throw new Error("THREE.ObjectLoader: Can't parse "+t+". "+h.message)}const o=a.metadata;if(o===void 0||o.type===void 0||o.type.toLowerCase()==="geometry")throw new Error("THREE.ObjectLoader: Can't load "+t);return await i.parseAsync(a)}parse(t,e){const i=this.parseAnimations(t.animations),s=this.parseShapes(t.shapes),n=this.parseGeometries(t.geometries,s),r=this.parseImages(t.images,function(){e!==void 0&&e(h)}),a=this.parseTextures(t.textures,r),o=this.parseMaterials(t.materials,a),h=this.parseObject(t.object,n,o,a,i),c=this.parseSkeletons(t.skeletons,h);if(this.bindSkeletons(h,c),this.bindLightTargets(h),e!==void 0){let u=!1;for(const d in r)if(r[d].data instanceof HTMLImageElement){u=!0;break}u===!1&&e(h)}return h}async parseAsync(t){const e=this.parseAnimations(t.animations),i=this.parseShapes(t.shapes),s=this.parseGeometries(t.geometries,i),n=await this.parseImagesAsync(t.images),r=this.parseTextures(t.textures,n),a=this.parseMaterials(t.materials,r),o=this.parseObject(t.object,s,a,r,e),h=this.parseSkeletons(t.skeletons,o);return this.bindSkeletons(o,h),this.bindLightTargets(o),o}static registerGeometry(t,e){Wn[t]=e}parseShapes(t){const e={};if(t!==void 0)for(let i=0,s=t.length;i<s;i++){const n=new an().fromJSON(t[i]);e[n.uuid]=n}return e}parseSkeletons(t,e){const i={},s={};if(e.traverse(function(n){n.isBone&&(s[n.uuid]=n)}),t!==void 0)for(let n=0,r=t.length;n<r;n++){const a=new fr().fromJSON(t[n],s);i[a.uuid]=a}return i}parseGeometries(t,e){const i={};if(t!==void 0){const s=new Yu;for(let n=0,r=t.length;n<r;n++){let a;const o=t[n];switch(o.type){case"BufferGeometry":case"InstancedBufferGeometry":a=s.parse(o);break;default:o.type in qa?a=qa[o.type].fromJSON(o,e):o.type in Wn?a=Wn[o.type].fromJSON(o,e):V(`ObjectLoader: Unknown geometry type "${o.type}". Use .registerGeometry() before starting the deserialization process.`)}a.uuid=o.uuid,o.name!==void 0&&(a.name=o.name),o.userData!==void 0&&(a.userData=o.userData),i[o.uuid]=a}}return i}parseMaterials(t,e){const i={},s={};if(t!==void 0){const n=new Lr;n.setTextures(e);for(let r=0,a=t.length;r<a;r++){const o=t[r];i[o.uuid]===void 0&&(i[o.uuid]=n.parse(o)),s[o.uuid]=i[o.uuid]}}return s}parseAnimations(t){const e={};if(t!==void 0)for(let i=0;i<t.length;i++){const s=t[i],n=Ks.parse(s);e[n.uuid]=n}return e}parseImages(t,e){const i=this,s={};let n;function r(o){return o=i.manager.resolveURL(o),i.manager.itemStart(o),n.load(o,function(){i.manager.itemEnd(o)},void 0,function(){i.manager.itemError(o),i.manager.itemEnd(o)})}function a(o){if(typeof o=="string"){const h=o,c=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(h)?h:i.resourcePath+h;return r(c)}else return o.data?{data:yi(o.type,o.data),width:o.width,height:o.height}:null}if(t!==void 0&&t.length>0){const o=new Qo(e);n=new tn(o),n.setCrossOrigin(this.crossOrigin);for(let h=0,c=t.length;h<c;h++){const u=t[h],d=u.url;if(Array.isArray(d)){const p=[];for(let f=0,m=d.length;f<m;f++){const y=d[f],g=a(y);g!==null&&(g instanceof HTMLImageElement?p.push(g):p.push(new Kt(g.data,g.width,g.height)))}s[u.uuid]=new Ae(p)}else{const p=a(u.url);s[u.uuid]=new Ae(p)}}}return s}async parseImagesAsync(t){const e=this,i={};let s;async function n(r){if(typeof r=="string"){const a=r,o=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(a)?a:e.resourcePath+a;return await s.loadAsync(o)}else return r.data?{data:yi(r.type,r.data),width:r.width,height:r.height}:null}if(t!==void 0&&t.length>0){s=new tn(this.manager),s.setCrossOrigin(this.crossOrigin);for(let r=0,a=t.length;r<a;r++){const o=t[r],h=o.url;if(Array.isArray(h)){const c=[];for(let u=0,d=h.length;u<d;u++){const p=h[u],f=await n(p);f!==null&&(f instanceof HTMLImageElement?c.push(f):c.push(new Kt(f.data,f.width,f.height)))}i[o.uuid]=new Ae(c)}else{const c=await n(o.url);i[o.uuid]=new Ae(c)}}}return i}parseTextures(t,e){function i(n,r){return typeof n=="number"?n:(V("ObjectLoader.parseTexture: Constant should be in numeric form.",n),r[n])}const s={};if(t!==void 0)for(let n=0,r=t.length;n<r;n++){const a=t[n];a.image===void 0&&V('ObjectLoader: No "image" specified for',a.uuid),e[a.image]===void 0&&V("ObjectLoader: Undefined image",a.image);const o=e[a.image],h=o.data;let c;Array.isArray(h)?(c=new Po,h.length===6&&(c.needsUpdate=!0)):(h&&h.data?c=new Kt:c=new ht,h&&(c.needsUpdate=!0)),c.source=o,c.uuid=a.uuid,a.name!==void 0&&(c.name=a.name),a.mapping!==void 0&&(c.mapping=i(a.mapping,Zu)),a.channel!==void 0&&(c.channel=a.channel),a.offset!==void 0&&c.offset.fromArray(a.offset),a.repeat!==void 0&&c.repeat.fromArray(a.repeat),a.center!==void 0&&c.center.fromArray(a.center),a.rotation!==void 0&&(c.rotation=a.rotation),a.wrap!==void 0&&(c.wrapS=i(a.wrap[0],eo),c.wrapT=i(a.wrap[1],eo)),a.format!==void 0&&(c.format=a.format),a.internalFormat!==void 0&&(c.internalFormat=a.internalFormat),a.type!==void 0&&(c.type=a.type),a.colorSpace!==void 0&&(c.colorSpace=a.colorSpace),a.minFilter!==void 0&&(c.minFilter=i(a.minFilter,io)),a.magFilter!==void 0&&(c.magFilter=i(a.magFilter,io)),a.anisotropy!==void 0&&(c.anisotropy=a.anisotropy),a.flipY!==void 0&&(c.flipY=a.flipY),a.generateMipmaps!==void 0&&(c.generateMipmaps=a.generateMipmaps),a.premultiplyAlpha!==void 0&&(c.premultiplyAlpha=a.premultiplyAlpha),a.unpackAlignment!==void 0&&(c.unpackAlignment=a.unpackAlignment),a.compareFunction!==void 0&&(c.compareFunction=a.compareFunction),a.normalized!==void 0&&(c.normalized=a.normalized),a.userData!==void 0&&(c.userData=a.userData),s[a.uuid]=c}return s}parseObject(t,e,i,s,n){let r;function a(d){return e[d]===void 0&&V("ObjectLoader: Undefined geometry",d),e[d]}function o(d){if(d!==void 0){if(Array.isArray(d)){const p=[];for(let f=0,m=d.length;f<m;f++){const y=d[f];i[y]===void 0&&V("ObjectLoader: Undefined material",y),p.push(i[y])}return p}return i[d]===void 0&&V("ObjectLoader: Undefined material",d),i[d]}}function h(d){return s[d]===void 0&&V("ObjectLoader: Undefined texture",d),s[d]}let c,u;switch(t.type){case"Scene":r=new Ql,t.background!==void 0&&(Number.isInteger(t.background)?r.background=new U(t.background):r.background=h(t.background)),t.environment!==void 0&&(r.environment=h(t.environment)),t.fog!==void 0&&(t.fog.type==="Fog"?r.fog=new dr(t.fog.color,t.fog.near,t.fog.far):t.fog.type==="FogExp2"&&(r.fog=new ur(t.fog.color,t.fog.density)),t.fog.name!==""&&(r.fog.name=t.fog.name)),t.backgroundBlurriness!==void 0&&(r.backgroundBlurriness=t.backgroundBlurriness),t.backgroundIntensity!==void 0&&(r.backgroundIntensity=t.backgroundIntensity),t.backgroundRotation!==void 0&&r.backgroundRotation.fromArray(t.backgroundRotation),t.environmentIntensity!==void 0&&(r.environmentIntensity=t.environmentIntensity),t.environmentRotation!==void 0&&r.environmentRotation.fromArray(t.environmentRotation);break;case"PerspectiveCamera":r=new Ut(t.fov,t.aspect,t.near,t.far),t.focus!==void 0&&(r.focus=t.focus),t.zoom!==void 0&&(r.zoom=t.zoom),t.filmGauge!==void 0&&(r.filmGauge=t.filmGauge),t.filmOffset!==void 0&&(r.filmOffset=t.filmOffset),t.view!==void 0&&(r.view=Object.assign({},t.view));break;case"OrthographicCamera":r=new jo(t.left,t.right,t.top,t.bottom,t.near,t.far),t.zoom!==void 0&&(r.zoom=t.zoom),t.view!==void 0&&(r.view=Object.assign({},t.view));break;case"AmbientLight":r=new Hu(t.color,t.intensity);break;case"DirectionalLight":r=new Gu(t.color,t.intensity),r.target=t.target||"";break;case"PointLight":r=new Uu(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":r=new qu(t.color,t.intensity,t.width,t.height);break;case"SpotLight":r=new Vu(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay),r.target=t.target||"";break;case"HemisphereLight":r=new Nu(t.color,t.groundColor,t.intensity);break;case"LightProbe":const d=new Ko().fromArray(t.sh);r=new Ju(d,t.intensity);break;case"SkinnedMesh":c=a(t.geometry),u=o(t.material),r=new uc(c,u),t.bindMode!==void 0&&(r.bindMode=t.bindMode),t.bindMatrix!==void 0&&r.bindMatrix.fromArray(t.bindMatrix),t.skeleton!==void 0&&(r.skeleton=t.skeleton);break;case"Mesh":c=a(t.geometry),u=o(t.material),r=new ie(c,u);break;case"InstancedMesh":c=a(t.geometry),u=o(t.material);const p=t.count,f=t.instanceMatrix,m=t.instanceColor;r=new fc(c,u,p),r.instanceMatrix=new Yi(new Float32Array(f.array),16),m!==void 0&&(r.instanceColor=new Yi(new Float32Array(m.array),m.itemSize));break;case"BatchedMesh":c=a(t.geometry),u=o(t.material),r=new Sc(t.maxInstanceCount,t.maxVertexCount,t.maxIndexCount,u),r.geometry=c,r.perObjectFrustumCulled=t.perObjectFrustumCulled,r.sortObjects=t.sortObjects,r._drawRanges=t.drawRanges,r._reservedRanges=t.reservedRanges,r._geometryInfo=t.geometryInfo.map(y=>{let g=null,x=null;return y.boundingBox!==void 0&&(g=new _t().fromJSON(y.boundingBox)),y.boundingSphere!==void 0&&(x=new yt().fromJSON(y.boundingSphere)),{...y,boundingBox:g,boundingSphere:x}}),r._instanceInfo=t.instanceInfo,r._availableInstanceIds=t._availableInstanceIds,r._availableGeometryIds=t._availableGeometryIds,r._nextIndexStart=t.nextIndexStart,r._nextVertexStart=t.nextVertexStart,r._geometryCount=t.geometryCount,r._maxInstanceCount=t.maxInstanceCount,r._maxVertexCount=t.maxVertexCount,r._maxIndexCount=t.maxIndexCount,r._geometryInitialized=t.geometryInitialized,r._matricesTexture=h(t.matricesTexture.uuid),r._indirectTexture=h(t.indirectTexture.uuid),t.colorsTexture!==void 0&&(r._colorsTexture=h(t.colorsTexture.uuid)),t.boundingSphere!==void 0&&(r.boundingSphere=new yt().fromJSON(t.boundingSphere)),t.boundingBox!==void 0&&(r.boundingBox=new _t().fromJSON(t.boundingBox));break;case"LOD":r=new hc;break;case"Line":r=new He(a(t.geometry),o(t.material));break;case"LineLoop":r=new Ac(a(t.geometry),o(t.material));break;case"LineSegments":r=new ye(a(t.geometry),o(t.material));break;case"PointCloud":case"Points":r=new Tc(a(t.geometry),o(t.material));break;case"Sprite":r=new oc(o(t.material));break;case"Group":r=new Vi;break;case"Bone":r=new Fo;break;default:r=new $}if(r.uuid=t.uuid,t.name!==void 0&&(r.name=t.name),t.matrix!==void 0?(r.matrix.fromArray(t.matrix),t.matrixAutoUpdate!==void 0&&(r.matrixAutoUpdate=t.matrixAutoUpdate),r.matrixAutoUpdate&&r.matrix.decompose(r.position,r.quaternion,r.scale)):(t.position!==void 0&&r.position.fromArray(t.position),t.rotation!==void 0&&r.rotation.fromArray(t.rotation),t.quaternion!==void 0&&r.quaternion.fromArray(t.quaternion),t.scale!==void 0&&r.scale.fromArray(t.scale)),t.up!==void 0&&r.up.fromArray(t.up),t.pivot!==void 0&&(r.pivot=new w().fromArray(t.pivot)),t.morphTargetDictionary!==void 0&&(r.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),t.morphTargetInfluences!==void 0&&(r.morphTargetInfluences=t.morphTargetInfluences.slice()),t.castShadow!==void 0&&(r.castShadow=t.castShadow),t.receiveShadow!==void 0&&(r.receiveShadow=t.receiveShadow),t.shadow&&(t.shadow.intensity!==void 0&&(r.shadow.intensity=t.shadow.intensity),t.shadow.bias!==void 0&&(r.shadow.bias=t.shadow.bias),t.shadow.normalBias!==void 0&&(r.shadow.normalBias=t.shadow.normalBias),t.shadow.radius!==void 0&&(r.shadow.radius=t.shadow.radius),t.shadow.blurSamples!==void 0&&(r.shadow.blurSamples=t.shadow.blurSamples),t.shadow.focus!==void 0&&(r.shadow.focus=t.shadow.focus),t.shadow.aspect!==void 0&&(r.shadow.aspect=t.shadow.aspect),t.shadow.mapSize!==void 0&&r.shadow.mapSize.fromArray(t.shadow.mapSize),t.shadow.camera!==void 0&&(r.shadow.camera=this.parseObject(t.shadow.camera))),t.visible!==void 0&&(r.visible=t.visible),t.frustumCulled!==void 0&&(r.frustumCulled=t.frustumCulled),t.renderOrder!==void 0&&(r.renderOrder=t.renderOrder),t.static!==void 0&&(r.static=t.static),t.userData!==void 0&&(r.userData=t.userData),t.layers!==void 0&&(r.layers.mask=t.layers),t.children!==void 0){const d=t.children;for(let p=0;p<d.length;p++)r.add(this.parseObject(d[p],e,i,s,n))}if(t.animations!==void 0){const d=t.animations;for(let p=0;p<d.length;p++){const f=d[p];r.animations.push(n[f])}}if(t.type==="LOD"){t.autoUpdate!==void 0&&(r.autoUpdate=t.autoUpdate);const d=t.levels;for(let p=0;p<d.length;p++){const f=d[p],m=r.getObjectByProperty("uuid",f.object);m!==void 0&&r.addLevel(m,f.distance,f.hysteresis)}}return r}bindSkeletons(t,e){Object.keys(e).length!==0&&t.traverse(function(i){if(i.isSkinnedMesh===!0&&i.skeleton!==void 0){const s=e[i.skeleton];s===void 0?V("ObjectLoader: No skeleton found with UUID:",i.skeleton):i.bind(s,i.bindMatrix)}})}bindLightTargets(t){t.traverse(function(e){if(e.isDirectionalLight||e.isSpotLight){const i=e.target,s=t.getObjectByProperty("uuid",i);s!==void 0?e.target=s:e.target=new $}})}}const Zu={UVMapping:rr,CubeReflectionMapping:en,CubeRefractionMapping:dh,EquirectangularReflectionMapping:ph,EquirectangularRefractionMapping:fh,CubeUVReflectionMapping:mh},eo={RepeatWrapping:Zn,ClampToEdgeWrapping:$t,MirroredRepeatWrapping:$n},io={NearestFilter:Nt,NearestMipmapNearestFilter:yh,NearestMipmapLinearFilter:gh,LinearFilter:Jt,LinearMipmapNearestFilter:xh,LinearMipmapLinearFilter:ar},Gn=new WeakMap;class Zf extends Lt{constructor(t){super(t),this.isImageBitmapLoader=!0,typeof createImageBitmap>"u"&&V("ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&V("ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"},this._abortController=new AbortController}setOptions(t){return this.options=t,this}load(t,e,i,s){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const n=this,r=pe.get(`image-bitmap:${t}`);if(r!==void 0){if(n.manager.itemStart(t),r.then){r.then(h=>{Gn.has(r)===!0?(s&&s(Gn.get(r)),n.manager.itemError(t),n.manager.itemEnd(t)):(e&&e(h),n.manager.itemEnd(t))});return}setTimeout(function(){e&&e(r),n.manager.itemEnd(t)},0);return}const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,a.signal=typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;const o=fetch(t,a).then(function(h){return h.blob()}).then(function(h){return createImageBitmap(h,Object.assign({},n.options,{colorSpaceConversion:"none"}))}).then(function(h){return pe.add(`image-bitmap:${t}`,h),e&&e(h),n.manager.itemEnd(t),h}).catch(function(h){s&&s(h),Gn.set(o,h),pe.remove(`image-bitmap:${t}`),n.manager.itemError(t),n.manager.itemEnd(t)});pe.add(`image-bitmap:${t}`,o),n.manager.itemStart(t)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}let Ls;class th{static getContext(){return Ls===void 0&&(Ls=new(window.AudioContext||window.webkitAudioContext)),Ls}static setContext(t){Ls=t}}class $f extends Lt{constructor(t){super(t)}load(t,e,i,s){const n=this,r=new Ce(this.manager);r.setResponseType("arraybuffer"),r.setPath(this.path),r.setRequestHeader(this.requestHeader),r.setWithCredentials(this.withCredentials),r.load(t,function(o){try{const h=o.slice(0),c=th.getContext(),u=t+"#decode";n.manager.itemStart(u),c.decodeAudioData(h,function(d){e(d),n.manager.itemEnd(u)}).catch(function(d){a(d),n.manager.itemEnd(u)})}catch(h){a(h)}},i,s);function a(o){s?s(o):X(o),n.manager.itemError(t)}}}const so=new G,no=new G,Oe=new G;class Qf{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Ut,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Ut,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(t){const e=this._cache;if(e.focus!==t.focus||e.fov!==t.fov||e.aspect!==t.aspect*this.aspect||e.near!==t.near||e.far!==t.far||e.zoom!==t.zoom||e.eyeSep!==this.eyeSep){e.focus=t.focus,e.fov=t.fov,e.aspect=t.aspect*this.aspect,e.near=t.near,e.far=t.far,e.zoom=t.zoom,e.eyeSep=this.eyeSep,Oe.copy(t.projectionMatrix);const s=e.eyeSep/2,n=s*e.near/e.focus,r=e.near*Math.tan(Ge*e.fov*.5)/e.zoom;let a,o;no.elements[12]=-s,so.elements[12]=s,a=-r*e.aspect+n,o=r*e.aspect+n,Oe.elements[0]=2*e.near/(o-a),Oe.elements[8]=(o+a)/(o-a),this.cameraL.projectionMatrix.copy(Oe),a=-r*e.aspect-n,o=r*e.aspect-n,Oe.elements[0]=2*e.near/(o-a),Oe.elements[8]=(o+a)/(o-a),this.cameraR.projectionMatrix.copy(Oe)}this.cameraL.matrix.copy(t.matrixWorld).multiply(no),this.cameraL.matrixWorldNeedsUpdate=!0,this.cameraR.matrix.copy(t.matrixWorld).multiply(so),this.cameraR.matrixWorldNeedsUpdate=!0}}const ci=-90,ui=1;class jf extends ${constructor(t,e,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const s=new Ut(ci,ui,t,e);s.layers=this.layers,this.add(s);const n=new Ut(ci,ui,t,e);n.layers=this.layers,this.add(n);const r=new Ut(ci,ui,t,e);r.layers=this.layers,this.add(r);const a=new Ut(ci,ui,t,e);a.layers=this.layers,this.add(a);const o=new Ut(ci,ui,t,e);o.layers=this.layers,this.add(o);const h=new Ut(ci,ui,t,e);h.layers=this.layers,this.add(h)}updateCoordinateSystem(){const t=this.coordinateSystem,e=this.children.concat(),[i,s,n,r,a,o]=e;for(const h of e)this.remove(h);if(t===Qt)i.up.set(0,1,0),i.lookAt(1,0,0),s.up.set(0,1,0),s.lookAt(-1,0,0),n.up.set(0,0,-1),n.lookAt(0,1,0),r.up.set(0,0,1),r.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),o.up.set(0,1,0),o.lookAt(0,0,-1);else if(t===bi)i.up.set(0,-1,0),i.lookAt(-1,0,0),s.up.set(0,-1,0),s.lookAt(1,0,0),n.up.set(0,0,1),n.lookAt(0,1,0),r.up.set(0,0,-1),r.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),o.up.set(0,-1,0),o.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+t);for(const h of e)this.add(h),h.updateMatrixWorld()}update(t,e){this.parent===null&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:s}=this;this.coordinateSystem!==t.coordinateSystem&&(this.coordinateSystem=t.coordinateSystem,this.updateCoordinateSystem());const[n,r,a,o,h,c]=this.children,u=t.getRenderTarget(),d=t.getActiveCubeFace(),p=t.getActiveMipmapLevel(),f=t.xr.enabled;t.xr.enabled=!1;const m=i.texture.generateMipmaps;i.texture.generateMipmaps=!1;let y=!1;t.isWebGLRenderer===!0?y=t.state.buffers.depth.getReversed():y=t.reversedDepthBuffer,t.setRenderTarget(i,0,s),y&&t.autoClear===!1&&t.clearDepth(),t.render(e,n),t.setRenderTarget(i,1,s),y&&t.autoClear===!1&&t.clearDepth(),t.render(e,r),t.setRenderTarget(i,2,s),y&&t.autoClear===!1&&t.clearDepth(),t.render(e,a),t.setRenderTarget(i,3,s),y&&t.autoClear===!1&&t.clearDepth(),t.render(e,o),t.setRenderTarget(i,4,s),y&&t.autoClear===!1&&t.clearDepth(),t.render(e,h),i.texture.generateMipmaps=m,t.setRenderTarget(i,5,s),y&&t.autoClear===!1&&t.clearDepth(),t.render(e,c),t.setRenderTarget(u,d,p),t.xr.enabled=f,i.texture.needsPMREMUpdate=!0}}class Kf extends Ut{constructor(t=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=t}}class $u{constructor(){this._previousTime=0,this._currentTime=0,this._startTime=performance.now(),this._delta=0,this._elapsed=0,this._timescale=1,this._document=null,this._pageVisibilityHandler=null}connect(t){this._document=t,t.hidden!==void 0&&(this._pageVisibilityHandler=Qu.bind(this),t.addEventListener("visibilitychange",this._pageVisibilityHandler,!1))}disconnect(){this._pageVisibilityHandler!==null&&(this._document.removeEventListener("visibilitychange",this._pageVisibilityHandler),this._pageVisibilityHandler=null),this._document=null}getDelta(){return this._delta/1e3}getElapsed(){return this._elapsed/1e3}getTimescale(){return this._timescale}setTimescale(t){return this._timescale=t,this}reset(){return this._currentTime=performance.now()-this._startTime,this}dispose(){this.disconnect()}update(t){return this._pageVisibilityHandler!==null&&this._document.hidden===!0?this._delta=0:(this._previousTime=this._currentTime,this._currentTime=(t!==void 0?t:performance.now())-this._startTime,this._delta=(this._currentTime-this._previousTime)*this._timescale,this._elapsed+=this._delta),this}}function Qu(){this._document.hidden===!1&&this.reset()}const Ee=new w,Hn=new Tt,ju=new w,Ne=new w,Le=new w;class tm extends ${constructor(){super(),this.type="AudioListener",this.context=th.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._timer=new $u}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(t){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}updateMatrixWorld(t){super.updateMatrixWorld(t),this._timer.update();const e=this.context.listener;if(this.timeDelta=this._timer.getDelta(),this.matrixWorld.decompose(Ee,Hn,ju),Ne.set(0,0,-1).applyQuaternion(Hn),Le.set(0,1,0).applyQuaternion(Hn),e.positionX){const i=this.context.currentTime+this.timeDelta;e.positionX.linearRampToValueAtTime(Ee.x,i),e.positionY.linearRampToValueAtTime(Ee.y,i),e.positionZ.linearRampToValueAtTime(Ee.z,i),e.forwardX.linearRampToValueAtTime(Ne.x,i),e.forwardY.linearRampToValueAtTime(Ne.y,i),e.forwardZ.linearRampToValueAtTime(Ne.z,i),e.upX.linearRampToValueAtTime(Le.x,i),e.upY.linearRampToValueAtTime(Le.y,i),e.upZ.linearRampToValueAtTime(Le.z,i)}else e.setPosition(Ee.x,Ee.y,Ee.z),e.setOrientation(Ne.x,Ne.y,Ne.z,Le.x,Le.y,Le.z)}}class Ku extends ${constructor(t){super(),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this}setMediaElementSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this}setMediaStreamSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(t),this.connect(),this}setBuffer(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this}play(t=0){if(this.isPlaying===!0){V("Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){V("Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+t;const e=this.context.createBufferSource();return e.buffer=this.buffer,e.loop=this.loop,e.loopStart=this.loopStart,e.loopEnd=this.loopEnd,e.onended=this.onEnded.bind(this),e.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=e,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){V("Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(t=0){if(this.hasPlaybackControl===!1){V("Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(this.context.currentTime+t),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this._connected!==!1){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}}getFilters(){return this.filters}setFilters(t){return t||(t=[]),this._connected===!0?(this.disconnect(),this.filters=t.slice(),this.connect()):this.filters=t.slice(),this}setDetune(t){return this.detune=t,this.isPlaying===!0&&this.source.detune!==void 0&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(t){return this.setFilters(t?[t]:[])}setPlaybackRate(t){if(this.hasPlaybackControl===!1){V("Audio: this Audio has no playback control.");return}return this.playbackRate=t,this.isPlaying===!0&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1,this._progress=0}getLoop(){return this.hasPlaybackControl===!1?(V("Audio: this Audio has no playback control."),!1):this.loop}setLoop(t){if(this.hasPlaybackControl===!1){V("Audio: this Audio has no playback control.");return}return this.loop=t,this.isPlaying===!0&&(this.source.loop=this.loop),this}setLoopStart(t){return this.loopStart=t,this}setLoopEnd(t){return this.loopEnd=t,this}getVolume(){return this.gain.gain.value}setVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}copy(t,e){return super.copy(t,e),t.sourceType!=="buffer"?(V("Audio: Audio source type cannot be copied."),this):(this.autoplay=t.autoplay,this.buffer=t.buffer,this.detune=t.detune,this.loop=t.loop,this.loopStart=t.loopStart,this.loopEnd=t.loopEnd,this.offset=t.offset,this.duration=t.duration,this.playbackRate=t.playbackRate,this.hasPlaybackControl=t.hasPlaybackControl,this.sourceType=t.sourceType,this.filters=t.filters.slice(),this)}clone(t){return new this.constructor(this.listener).copy(this,t)}}const Ve=new w,ro=new Tt,td=new w,De=new w;class em extends Ku{constructor(t){super(t),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}connect(){return super.connect(),this.panner.connect(this.gain),this}disconnect(){return super.disconnect(),this.panner.disconnect(this.gain),this}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(t){return this.panner.refDistance=t,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(t){return this.panner.rolloffFactor=t,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(t){return this.panner.distanceModel=t,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(t){return this.panner.maxDistance=t,this}setDirectionalCone(t,e,i){return this.panner.coneInnerAngle=t,this.panner.coneOuterAngle=e,this.panner.coneOuterGain=i,this}updateMatrixWorld(t){if(super.updateMatrixWorld(t),this.hasPlaybackControl===!0&&this.isPlaying===!1)return;this.matrixWorld.decompose(Ve,ro,td),De.set(0,0,1).applyQuaternion(ro);const e=this.panner;if(e.positionX){const i=this.context.currentTime+this.listener.timeDelta;e.positionX.linearRampToValueAtTime(Ve.x,i),e.positionY.linearRampToValueAtTime(Ve.y,i),e.positionZ.linearRampToValueAtTime(Ve.z,i),e.orientationX.linearRampToValueAtTime(De.x,i),e.orientationY.linearRampToValueAtTime(De.y,i),e.orientationZ.linearRampToValueAtTime(De.z,i)}else e.setPosition(Ve.x,Ve.y,Ve.z),e.setOrientation(De.x,De.y,De.z)}}class im{constructor(t,e=2048){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=e,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let t=0;const e=this.getFrequencyData();for(let i=0;i<e.length;i++)t+=e[i];return t/e.length}}class ed{constructor(t,e,i){this.binding=t,this.valueSize=i;let s,n,r;switch(e){case"quaternion":s=this._slerp,n=this._slerpAdditive,r=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(i*6),this._workIndex=5;break;case"string":case"bool":s=this._select,n=this._select,r=this._setAdditiveIdentityOther,this.buffer=new Array(i*5);break;default:s=this._lerp,n=this._lerpAdditive,r=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(i*5)}this._mixBufferRegion=s,this._mixBufferRegionAdditive=n,this._setIdentity=r,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(t,e){const i=this.buffer,s=this.valueSize,n=t*s+s;let r=this.cumulativeWeight;if(r===0){for(let a=0;a!==s;++a)i[n+a]=i[a];r=e}else{r+=e;const a=e/r;this._mixBufferRegion(i,n,0,a,s)}this.cumulativeWeight=r}accumulateAdditive(t){const e=this.buffer,i=this.valueSize,s=i*this._addIndex;this.cumulativeWeightAdditive===0&&this._setIdentity(),this._mixBufferRegionAdditive(e,s,0,t,i),this.cumulativeWeightAdditive+=t}apply(t){const e=this.valueSize,i=this.buffer,s=t*e+e,n=this.cumulativeWeight,r=this.cumulativeWeightAdditive,a=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,n<1){const o=e*this._origIndex;this._mixBufferRegion(i,s,o,1-n,e)}r>0&&this._mixBufferRegionAdditive(i,s,this._addIndex*e,1,e);for(let o=e,h=e+e;o!==h;++o)if(i[o]!==i[o+e]){a.setValue(i,s);break}}saveOriginalState(){const t=this.binding,e=this.buffer,i=this.valueSize,s=i*this._origIndex;t.getValue(e,s);for(let n=i,r=s;n!==r;++n)e[n]=e[s+n%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const t=this.valueSize*3;this.binding.setValue(this.buffer,t)}_setAdditiveIdentityNumeric(){const t=this._addIndex*this.valueSize,e=t+this.valueSize;for(let i=t;i<e;i++)this.buffer[i]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const t=this._origIndex*this.valueSize,e=this._addIndex*this.valueSize;for(let i=0;i<this.valueSize;i++)this.buffer[e+i]=this.buffer[t+i]}_select(t,e,i,s,n){if(s>=.5)for(let r=0;r!==n;++r)t[e+r]=t[i+r]}_slerp(t,e,i,s){Tt.slerpFlat(t,e,t,e,t,i,s)}_slerpAdditive(t,e,i,s,n){const r=this._workIndex*n;Tt.multiplyQuaternionsFlat(t,r,t,e,t,i),Tt.slerpFlat(t,e,t,e,t,r,s)}_lerp(t,e,i,s,n){const r=1-s;for(let a=0;a!==n;++a){const o=e+a;t[o]=t[o]*r+t[i+a]*s}}_lerpAdditive(t,e,i,s,n){for(let r=0;r!==n;++r){const a=e+r;t[a]=t[a]+t[i+r]*s}}}const Vr="\\[\\]\\.:\\/",id=new RegExp("["+Vr+"]","g"),Dr="[^"+Vr+"]",sd="[^"+Vr.replace("\\.","")+"]",nd=/((?:WC+[\/:])*)/.source.replace("WC",Dr),rd=/(WCOD+)?/.source.replace("WCOD",sd),ad=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Dr),od=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Dr),hd=new RegExp("^"+nd+rd+ad+od+"$"),ld=["material","materials","bones","map"];class cd{constructor(t,e,i){const s=i||Z.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,s)}getValue(t,e){this.bind();const i=this._targetGroup.nCachedObjects_,s=this._bindings[i];s!==void 0&&s.getValue(t,e)}setValue(t,e){const i=this._bindings;for(let s=this._targetGroup.nCachedObjects_,n=i.length;s!==n;++s)i[s].setValue(t,e)}bind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].bind()}unbind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].unbind()}}class Z{constructor(t,e,i){this.path=e,this.parsedPath=i||Z.parseTrackName(e),this.node=Z.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,i){return t&&t.isAnimationObjectGroup?new Z.Composite(t,e,i):new Z(t,e,i)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(id,"")}static parseTrackName(t){const e=hd.exec(t);if(e===null)throw new Error("THREE.PropertyBinding: Cannot parse trackName: "+t);const i={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},s=i.nodeName&&i.nodeName.lastIndexOf(".");if(s!==void 0&&s!==-1){const n=i.nodeName.substring(s+1);ld.indexOf(n)!==-1&&(i.nodeName=i.nodeName.substring(0,s),i.objectName=n)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("THREE.PropertyBinding: can not parse propertyName from trackName: "+t);return i}static findNode(t,e){if(e===void 0||e===""||e==="."||e===-1||e===t.name||e===t.uuid)return t;if(t.skeleton){const i=t.skeleton.getBoneByName(e);if(i!==void 0)return i}if(t.children){const i=function(n){for(let r=0;r<n.length;r++){const a=n[r];if(a.name===e||a.uuid===e)return a;const o=i(a.children);if(o)return o}return null},s=i(t.children);if(s)return s}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(t,e){t[e]=this.targetObject[this.propertyName]}_getValue_array(t,e){const i=this.resolvedProperty;for(let s=0,n=i.length;s!==n;++s)t[e++]=i[s]}_getValue_arrayElement(t,e){t[e]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(t,e){this.resolvedProperty.toArray(t,e)}_setValue_direct(t,e){this.targetObject[this.propertyName]=t[e]}_setValue_direct_setNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(t,e){const i=this.resolvedProperty;for(let s=0,n=i.length;s!==n;++s)i[s]=t[e++]}_setValue_array_setNeedsUpdate(t,e){const i=this.resolvedProperty;for(let s=0,n=i.length;s!==n;++s)i[s]=t[e++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(t,e){const i=this.resolvedProperty;for(let s=0,n=i.length;s!==n;++s)i[s]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(t,e){this.resolvedProperty[this.propertyIndex]=t[e]}_setValue_arrayElement_setNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(t,e){this.resolvedProperty.fromArray(t,e)}_setValue_fromArray_setNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(t,e){this.bind(),this.getValue(t,e)}_setValue_unbound(t,e){this.bind(),this.setValue(t,e)}bind(){let t=this.node;const e=this.parsedPath,i=e.objectName,s=e.propertyName;let n=e.propertyIndex;if(t||(t=Z.findNode(this.rootNode,e.nodeName),this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t){V("PropertyBinding: No target node found for track: "+this.path+".");return}if(i){let h=e.objectIndex;switch(i){case"materials":if(!t.material){X("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.materials){X("PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}t=t.material.materials;break;case"bones":if(!t.skeleton){X("PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}t=t.skeleton.bones;for(let c=0;c<t.length;c++)if(t[c].name===h){h=c;break}break;case"map":if("map"in t){t=t.map;break}if(!t.material){X("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.map){X("PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}t=t.material.map;break;default:if(t[i]===void 0){X("PropertyBinding: Can not bind to objectName of node undefined.",this);return}t=t[i]}if(h!==void 0){if(t[h]===void 0){X("PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);return}t=t[h]}}const r=t[s];if(r===void 0){const h=e.nodeName;X("PropertyBinding: Trying to update property for track: "+h+"."+s+" but it wasn't found.",t);return}let a=this.Versioning.None;this.targetObject=t,t.isMaterial===!0?a=this.Versioning.NeedsUpdate:t.isObject3D===!0&&(a=this.Versioning.MatrixWorldNeedsUpdate);let o=this.BindingType.Direct;if(n!==void 0){if(s==="morphTargetInfluences"){if(!t.geometry){X("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!t.geometry.morphAttributes){X("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}t.morphTargetDictionary[n]!==void 0&&(n=t.morphTargetDictionary[n])}o=this.BindingType.ArrayElement,this.resolvedProperty=r,this.propertyIndex=n}else r.fromArray!==void 0&&r.toArray!==void 0?(o=this.BindingType.HasFromToArray,this.resolvedProperty=r):Array.isArray(r)?(o=this.BindingType.EntireArray,this.resolvedProperty=r):this.propertyName=s;this.getValue=this.GetterByBindingType[o],this.setValue=this.SetterByBindingTypeAndVersioning[o][a]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Z.Composite=cd;Z.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};Z.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};Z.prototype.GetterByBindingType=[Z.prototype._getValue_direct,Z.prototype._getValue_array,Z.prototype._getValue_arrayElement,Z.prototype._getValue_toArray];Z.prototype.SetterByBindingTypeAndVersioning=[[Z.prototype._setValue_direct,Z.prototype._setValue_direct_setNeedsUpdate,Z.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Z.prototype._setValue_array,Z.prototype._setValue_array_setNeedsUpdate,Z.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Z.prototype._setValue_arrayElement,Z.prototype._setValue_arrayElement_setNeedsUpdate,Z.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Z.prototype._setValue_fromArray,Z.prototype._setValue_fromArray_setNeedsUpdate,Z.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class sm{constructor(){this.isAnimationObjectGroup=!0,this.uuid=Et(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const t={};this._indicesByUUID=t;for(let i=0,s=arguments.length;i!==s;++i)t[arguments[i].uuid]=i;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const e=this;this.stats={objects:{get total(){return e._objects.length},get inUse(){return this.total-e.nCachedObjects_}},get bindingsPerObject(){return e._bindings.length}}}add(){const t=this._objects,e=this._indicesByUUID,i=this._paths,s=this._parsedPaths,n=this._bindings,r=n.length;let a,o=t.length,h=this.nCachedObjects_;for(let c=0,u=arguments.length;c!==u;++c){const d=arguments[c],p=d.uuid;let f=e[p];if(f===void 0){f=o++,e[p]=f,t.push(d);for(let m=0,y=r;m!==y;++m)n[m].push(new Z(d,i[m],s[m]))}else if(f<h){a=t[f];const m=--h,y=t[m];e[y.uuid]=f,t[f]=y,e[p]=m,t[m]=d;for(let g=0,x=r;g!==x;++g){const b=n[g],M=b[m];let _=b[f];b[f]=M,_===void 0&&(_=new Z(d,i[g],s[g])),b[m]=_}}else t[f]!==a&&X("AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=h}remove(){const t=this._objects,e=this._indicesByUUID,i=this._bindings,s=i.length;let n=this.nCachedObjects_;for(let r=0,a=arguments.length;r!==a;++r){const o=arguments[r],h=o.uuid,c=e[h];if(c!==void 0&&c>=n){const u=n++,d=t[u];e[d.uuid]=c,t[c]=d,e[h]=u,t[u]=o;for(let p=0,f=s;p!==f;++p){const m=i[p],y=m[u],g=m[c];m[c]=y,m[u]=g}}}this.nCachedObjects_=n}uncache(){const t=this._objects,e=this._indicesByUUID,i=this._bindings,s=i.length;let n=this.nCachedObjects_,r=t.length;for(let a=0,o=arguments.length;a!==o;++a){const h=arguments[a],c=h.uuid,u=e[c];if(u!==void 0)if(delete e[c],u<n){const d=--n,p=t[d],f=--r,m=t[f];u!==d&&(e[p.uuid]=u),t[u]=p,d!==f&&(e[m.uuid]=d),t[d]=m,t.pop();for(let y=0,g=s;y!==g;++y){const x=i[y],b=x[d],M=x[f];x[u]=b,x[d]=M,x.pop()}}else{const d=--r,p=t[d];u!==d&&(e[p.uuid]=u),t[u]=p,t.pop();for(let f=0,m=s;f!==m;++f){const y=i[f];y[u]=y[d],y.pop()}}}this.nCachedObjects_=n}subscribe_(t,e){const i=this._bindingsIndicesByPath;let s=i[t];const n=this._bindings;if(s!==void 0)return n[s];const r=this._paths,a=this._parsedPaths,o=this._objects,h=o.length,c=this.nCachedObjects_,u=new Array(h);s=n.length,i[t]=s,r.push(t),a.push(e),n.push(u);for(let d=c,p=o.length;d!==p;++d){const f=o[d];u[d]=new Z(f,t,e)}return u}unsubscribe_(t){const e=this._bindingsIndicesByPath,i=e[t];if(i!==void 0){const s=this._paths,n=this._parsedPaths,r=this._bindings,a=r.length-1,o=r[a],h=s[a];e[h]=i,r[i]=o,r.pop(),n[i]=n[a],n.pop(),s[i]=s[a],s.pop()}}}class ud{constructor(t,e,i=null,s=e.blendMode){this._mixer=t,this._clip=e,this._localRoot=i,this.blendMode=s;const n=e.tracks,r=n.length,a=new Array(r),o={endingStart:fi,endingEnd:fi};for(let h=0;h!==r;++h){const c=n[h].createInterpolant(null);a[h]=c,c.settings=o}this._interpolantSettings=o,this._interpolants=a,this._propertyBindings=new Array(r),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._restoreTimeScale=null,this._weightInterpolant=null,this.loop=gl,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(t){return this._startTime=t,this}setLoop(t,e){return this.loop=t,this.repetitions=e,this}setEffectiveWeight(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(t){return this._scheduleFading(t,0,1)}fadeOut(t){return this._scheduleFading(t,1,0)}crossFadeFrom(t,e,i=!1){if(t.fadeOut(e),this.fadeIn(e),i===!0){const s=this._clip.duration,n=t._clip.duration,r=n/s,a=s/n;t._restoreTimeScale=t.timeScale,this._restoreTimeScale=this.timeScale,t.warp(1,r,e),this.warp(a,1,e)}return this}crossFadeTo(t,e,i=!1){return t.crossFadeFrom(this,e,i)}stopFading(){const t=this._weightInterpolant;return t!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}setEffectiveTimeScale(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(t){return this.timeScale=this._clip.duration/t,this.stopWarping()}syncWith(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()}halt(t){return this.warp(this._effectiveTimeScale,0,t)}warp(t,e,i){const s=this._mixer,n=s.time,r=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=s._lendControlInterpolant(),this._timeScaleInterpolant=a);const o=a.parameterPositions,h=a.sampleValues;return o[0]=n,o[1]=n+i,h[0]=t/r,h[1]=e/r,this}stopWarping(){const t=this._timeScaleInterpolant;return t!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this._restoreTimeScale=null,this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(t,e,i,s){if(!this.enabled){this._updateWeight(t);return}const n=this._startTime;if(n!==null){const o=(t-n)*i;o<0||i===0?e=0:(this._startTime=null,e=i*o)}e*=this._updateTimeScale(t);const r=this._updateTime(e),a=this._updateWeight(t);if(a>0){const o=this._interpolants,h=this._propertyBindings;switch(this.blendMode){case Mo:for(let c=0,u=o.length;c!==u;++c)o[c].evaluate(r),h[c].accumulateAdditive(a);break;case hr:default:for(let c=0,u=o.length;c!==u;++c)o[c].evaluate(r),h[c].accumulate(s,a)}}}_updateWeight(t){let e=0;if(this.enabled){e=this.weight;const i=this._weightInterpolant;if(i!==null){const s=i.evaluate(t)[0];e*=s,t>i.parameterPositions[1]&&(this.stopFading(),s===0&&(this.enabled=!1))}}return this._effectiveWeight=e,e}_updateTimeScale(t){let e=0;if(!this.paused){e=this.timeScale;const i=this._timeScaleInterpolant;if(i!==null){const s=i.evaluate(t)[0];e*=s,t>i.parameterPositions[1]&&(e===0?this.paused=!0:(this._restoreTimeScale!==null&&(e=this._restoreTimeScale),this.timeScale=e),this.stopWarping())}}return this._effectiveTimeScale=e,e}_updateTime(t){const e=this._clip.duration,i=this.loop;let s=this.time+t,n=this._loopCount;const r=i===xl;if(t===0)return n===-1?s:r&&(n&1)===1?e-s:s;if(i===yl){n===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(s>=e)s=e;else if(s<0)s=0;else{this.time=s;break t}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=s,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(n===-1&&(t>=0?(n=0,this._setEndings(!0,this.repetitions===0,r)):this._setEndings(this.repetitions===0,!0,r)),s>=e||s<0){const a=Math.floor(s/e);s-=e*a,n+=Math.abs(a);const o=this.repetitions-n;if(o<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,s=t>0?e:0,this.time=s,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(o===1){const h=t<0;this._setEndings(h,!h,r)}else this._setEndings(!1,!1,r);this._loopCount=n,this.time=s,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this._loopCount=n,this.time=s;if(r&&(n&1)===1)return e-s}return s}_setEndings(t,e,i){const s=this._interpolantSettings;i?(s.endingStart=mi,s.endingEnd=mi):(t?s.endingStart=this.zeroSlopeAtStart?mi:fi:s.endingStart=Js,e?s.endingEnd=this.zeroSlopeAtEnd?mi:fi:s.endingEnd=Js)}_scheduleFading(t,e,i){const s=this._mixer,n=s.time;let r=this._weightInterpolant;r===null&&(r=s._lendControlInterpolant(),this._weightInterpolant=r);const a=r.parameterPositions,o=r.sampleValues;return a[0]=n,o[0]=e,a[1]=n+t,o[1]=i,this}}const dd=new Float32Array(1);class nm extends me{constructor(t){super(),this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}_bindAction(t,e){const i=t._localRoot||this._root,s=t._clip.tracks,n=s.length,r=t._propertyBindings,a=t._interpolants,o=i.uuid,h=this._bindingsByRootAndName;let c=h[o];c===void 0&&(c={},h[o]=c);for(let u=0;u!==n;++u){const d=s[u],p=d.name;let f=c[p];if(f!==void 0)++f.referenceCount,r[u]=f;else{if(f=r[u],f!==void 0){f._cacheIndex===null&&(++f.referenceCount,this._addInactiveBinding(f,o,p));continue}const m=e&&e._propertyBindings[u].binding.parsedPath;f=new ed(Z.create(i,p,m),d.ValueTypeName,d.getValueSize()),++f.referenceCount,this._addInactiveBinding(f,o,p),r[u]=f}a[u].resultBuffer=f.buffer}}_activateAction(t){if(!this._isActiveAction(t)){if(t._cacheIndex===null){const i=(t._localRoot||this._root).uuid,s=t._clip.uuid,n=this._actionsByClip[s];this._bindAction(t,n&&n.knownActions[0]),this._addInactiveAction(t,s,i)}const e=t._propertyBindings;for(let i=0,s=e.length;i!==s;++i){const n=e[i];n.useCount++===0&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(t)}}_deactivateAction(t){if(this._isActiveAction(t)){const e=t._propertyBindings;for(let i=0,s=e.length;i!==s;++i){const n=e[i];--n.useCount===0&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(t)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}}_isActiveAction(t){const e=t._cacheIndex;return e!==null&&e<this._nActiveActions}_addInactiveAction(t,e,i){const s=this._actions,n=this._actionsByClip;let r=n[e];if(r===void 0)r={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,n[e]=r;else{const a=r.knownActions;t._byClipCacheIndex=a.length,a.push(t)}t._cacheIndex=s.length,s.push(t),r.actionByRoot[i]=t}_removeInactiveAction(t){const e=this._actions,i=e[e.length-1],s=t._cacheIndex;i._cacheIndex=s,e[s]=i,e.pop(),t._cacheIndex=null;const n=t._clip.uuid,r=this._actionsByClip,a=r[n],o=a.knownActions,h=o[o.length-1],c=t._byClipCacheIndex;h._byClipCacheIndex=c,o[c]=h,o.pop(),t._byClipCacheIndex=null;const u=a.actionByRoot,d=(t._localRoot||this._root).uuid;delete u[d],o.length===0&&delete r[n],this._removeInactiveBindingsForAction(t)}_removeInactiveBindingsForAction(t){const e=t._propertyBindings;for(let i=0,s=e.length;i!==s;++i){const n=e[i];--n.referenceCount===0&&this._removeInactiveBinding(n)}}_lendAction(t){const e=this._actions,i=t._cacheIndex,s=this._nActiveActions++,n=e[s];t._cacheIndex=s,e[s]=t,n._cacheIndex=i,e[i]=n}_takeBackAction(t){const e=this._actions,i=t._cacheIndex,s=--this._nActiveActions,n=e[s];t._cacheIndex=s,e[s]=t,n._cacheIndex=i,e[i]=n}_addInactiveBinding(t,e,i){const s=this._bindingsByRootAndName,n=this._bindings;let r=s[e];r===void 0&&(r={},s[e]=r),r[i]=t,t._cacheIndex=n.length,n.push(t)}_removeInactiveBinding(t){const e=this._bindings,i=t.binding,s=i.rootNode.uuid,n=i.path,r=this._bindingsByRootAndName,a=r[s],o=e[e.length-1],h=t._cacheIndex;o._cacheIndex=h,e[h]=o,e.pop(),delete a[n],Object.keys(a).length===0&&delete r[s]}_lendBinding(t){const e=this._bindings,i=t._cacheIndex,s=this._nActiveBindings++,n=e[s];t._cacheIndex=s,e[s]=t,n._cacheIndex=i,e[i]=n}_takeBackBinding(t){const e=this._bindings,i=t._cacheIndex,s=--this._nActiveBindings,n=e[s];t._cacheIndex=s,e[s]=t,n._cacheIndex=i,e[i]=n}_lendControlInterpolant(){const t=this._controlInterpolants,e=this._nActiveControlInterpolants++;let i=t[e];return i===void 0&&(i=new Xo(new Float32Array(2),new Float32Array(2),1,dd),i.__cacheIndex=e,t[e]=i),i}_takeBackControlInterpolant(t){const e=this._controlInterpolants,i=t.__cacheIndex,s=--this._nActiveControlInterpolants,n=e[s];t.__cacheIndex=s,e[s]=t,n.__cacheIndex=i,e[i]=n}clipAction(t,e,i){const s=e||this._root,n=s.uuid;let r=typeof t=="string"?Ks.findByName(s,t):t;const a=r!==null?r.uuid:t,o=this._actionsByClip[a];let h=null;if(i===void 0&&(r!==null?i=r.blendMode:i=hr),o!==void 0){const u=o.actionByRoot[n];if(u!==void 0&&u.blendMode===i)return u;h=o.knownActions[0],r===null&&(r=h._clip)}if(r===null)return null;const c=new ud(this,r,e,i);return this._bindAction(c,h),this._addInactiveAction(c,a,n),c}existingAction(t,e){const i=e||this._root,s=i.uuid,n=typeof t=="string"?Ks.findByName(i,t):t,r=n?n.uuid:t,a=this._actionsByClip[r];return a!==void 0&&a.actionByRoot[s]||null}stopAllAction(){const t=this._actions,e=this._nActiveActions;for(let i=e-1;i>=0;--i)t[i].stop();return this}update(t){t*=this.timeScale;const e=this._actions,i=this._nActiveActions,s=this.time+=t,n=Math.sign(t),r=this._accuIndex^=1;for(let h=0;h!==i;++h)e[h]._update(s,t,n,r);const a=this._bindings,o=this._nActiveBindings;for(let h=0;h!==o;++h)a[h].apply(r);return this}setTime(t){this.time=0;for(let e=0;e<this._actions.length;e++)this._actions[e].time=0;return this.update(t)}getRoot(){return this._root}uncacheClip(t){const e=this._actions,i=t.uuid,s=this._actionsByClip,n=s[i];if(n!==void 0){const r=n.knownActions;for(let a=0,o=r.length;a!==o;++a){const h=r[a];this._deactivateAction(h);const c=h._cacheIndex,u=e[e.length-1];h._cacheIndex=null,h._byClipCacheIndex=null,u._cacheIndex=c,e[c]=u,e.pop(),this._removeInactiveBindingsForAction(h)}delete s[i]}}uncacheRoot(t){const e=t.uuid,i=this._actionsByClip;for(const r in i){const a=i[r].actionByRoot,o=a[e];o!==void 0&&(this._deactivateAction(o),this._removeInactiveAction(o))}const s=this._bindingsByRootAndName,n=s[e];if(n!==void 0)for(const r in n){const a=n[r];a.restoreOriginalState(),this._removeInactiveBinding(a)}}uncacheAction(t,e){const i=this.existingAction(t,e);i!==null&&(this._deactivateAction(i),this._removeInactiveAction(i))}}class rm extends So{constructor(t=1,e=1,i=1,s={}){super(t,e,s),this.isRenderTarget3D=!0,this.depth=i;for(let n=0;n<this.textures.length;n++){const r=new To(null,t,e,i);r.isRenderTargetTexture=!0,r.renderTarget=this,this.textures[n]=r}this._setTextureOptions(s)}}class eh{constructor(t){this.value=t}clone(){return new eh(this.value.clone===void 0?this.value:this.value.clone())}}let pd=0;class am extends me{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:pd++}),this.name="",this.usage=lr,this.uniforms=[]}add(t){return this.uniforms.push(t),this}remove(t){const e=this.uniforms.indexOf(t);return e!==-1&&this.uniforms.splice(e,1),this}setName(t){return this.name=t,this}setUsage(t){return this.usage=t,this}dispose(){this.dispatchEvent({type:"dispose"})}copy(t){this.name=t.name,this.usage=t.usage;const e=t.uniforms;this.uniforms.length=0;for(let i=0,s=e.length;i<s;i++){const n=Array.isArray(e[i])?e[i]:[e[i]];for(let r=0;r<n.length;r++)this.uniforms.push(n[r].clone())}return this}clone(){return new this.constructor().copy(this)}}class om extends pr{constructor(t,e,i=1){super(t,e),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=i}copy(t){return super.copy(t),this.meshPerAttribute=t.meshPerAttribute,this}clone(t){const e=super.clone(t);return e.meshPerAttribute=this.meshPerAttribute,e}toJSON(t){const e=super.toJSON(t);return e.isInstancedInterleavedBuffer=!0,e.meshPerAttribute=this.meshPerAttribute,e}}class hm{constructor(t,e,i,s,n,r=!1){this.isGLBufferAttribute=!0,this.name="",this.buffer=t,this.type=e,this.itemSize=i,this.elementSize=s,this.count=n,this.normalized=r,this.version=0}set needsUpdate(t){t===!0&&this.version++}setBuffer(t){return this.buffer=t,this}setType(t,e){return this.type=t,this.elementSize=e,this}setItemSize(t){return this.itemSize=t,this}setCount(t){return this.count=t,this}}const ao=new G;class lm{constructor(t,e,i=0,s=1/0){this.ray=new ji(t,e),this.near=i,this.far=s,this.camera=null,this.layers=new Co,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(t,e){this.ray.set(t,e)}setFromCamera(t,e){e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize(),this.camera=e):e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,e.projectionMatrix.elements[14]).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld),this.camera=e):X("Raycaster: Unsupported camera type: "+e.type)}setFromXRController(t){return ao.identity().extractRotation(t.matrixWorld),this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(ao),this}intersectObject(t,e=!0,i=[]){return sr(t,this,i,e),i.sort(oo),i}intersectObjects(t,e=!0,i=[]){for(let s=0,n=t.length;s<n;s++)sr(t[s],this,i,e);return i.sort(oo),i}}function oo(l,t){return l.distance-t.distance}function sr(l,t,e,i){let s=!0;if(l.layers.test(t.layers)&&l.raycast(t,e)===!1&&(s=!1),s===!0&&i===!0){const n=l.children;for(let r=0,a=n.length;r<a;r++)sr(n[r],t,e,!0)}}class cm{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1,V("Clock: This module has been deprecated. Please use THREE.Timer instead.")}start(){this.startTime=performance.now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=performance.now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}class um{constructor(t=1,e=0,i=0){this.radius=t,this.phi=e,this.theta=i}set(t,e,i){return this.radius=t,this.phi=e,this.theta=i,this}copy(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this}makeSafe(){return this.phi=D(this.phi,1e-6,Math.PI-1e-6),this}setFromVector3(t){return this.setFromCartesianCoords(t.x,t.y,t.z)}setFromCartesianCoords(t,e,i){return this.radius=Math.sqrt(t*t+e*e+i*i),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t,i),this.phi=Math.acos(D(e/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}class dm{constructor(t=1,e=0,i=0){this.radius=t,this.theta=e,this.y=i}set(t,e,i){return this.radius=t,this.theta=e,this.y=i,this}copy(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this}setFromVector3(t){return this.setFromCartesianCoords(t.x,t.y,t.z)}setFromCartesianCoords(t,e,i){return this.radius=Math.sqrt(t*t+i*i),this.theta=Math.atan2(t,i),this.y=e,this}clone(){return new this.constructor().copy(this)}}class ih{static{ih.prototype.isMatrix2=!0}constructor(t,e,i,s){this.elements=[1,0,0,1],t!==void 0&&this.set(t,e,i,s)}identity(){return this.set(1,0,0,1),this}fromArray(t,e=0){for(let i=0;i<4;i++)this.elements[i]=t[i+e];return this}set(t,e,i,s){const n=this.elements;return n[0]=t,n[2]=e,n[1]=i,n[3]=s,this}}const ho=new I;class fd{constructor(t=new I(1/0,1/0),e=new I(-1/0,-1/0)){this.isBox2=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromPoints(t){this.makeEmpty();for(let e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){const i=ho.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(i),this.max.copy(t).add(i),this}clone(){return new this.constructor().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(t){return this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}containsPoint(t){return t.x>=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(t){return t.max.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,ho).distanceTo(t)}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const lo=new w,Vs=new w,di=new w,pi=new w,qn=new w,md=new w,yd=new w;class pm{constructor(t=new w,e=new w){this.start=t,this.end=e}set(t,e){return this.start.copy(t),this.end.copy(e),this}copy(t){return this.start.copy(t.start),this.end.copy(t.end),this}getCenter(t){return t.addVectors(this.start,this.end).multiplyScalar(.5)}delta(t){return t.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t,e){return this.delta(e).multiplyScalar(t).add(this.start)}closestPointToPointParameter(t,e){lo.subVectors(t,this.start),Vs.subVectors(this.end,this.start);const i=Vs.dot(Vs);if(i===0)return 0;let n=Vs.dot(lo)/i;return e&&(n=D(n,0,1)),n}closestPointToPoint(t,e,i){const s=this.closestPointToPointParameter(t,e);return this.delta(i).multiplyScalar(s).add(this.start)}distanceSqToLine3(t,e=md,i=yd){const s=10000000000000001e-32;let n,r;const a=this.start,o=t.start,h=this.end,c=t.end;di.subVectors(h,a),pi.subVectors(c,o),qn.subVectors(a,o);const u=di.dot(di),d=pi.dot(pi),p=pi.dot(qn);if(u<=s&&d<=s)return e.copy(a),i.copy(o),e.sub(i),e.dot(e);if(u<=s)n=0,r=p/d,r=D(r,0,1);else{const f=di.dot(qn);if(d<=s)r=0,n=D(-f/u,0,1);else{const m=di.dot(pi),y=u*d-m*m;y!==0?n=D((m*p-f*d)/y,0,1):n=0,r=(m*n+p)/d,r<0?(r=0,n=D(-f/u,0,1)):r>1&&(r=1,n=D((m-f)/u,0,1))}}return e.copy(a).addScaledVector(di,n),i.copy(o).addScaledVector(pi,r),e.distanceToSquared(i)}applyMatrix4(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this}equals(t){return t.start.equals(this.start)&&t.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const co=new w;class fm extends ${constructor(t,e){super(),this.light=t,this.matrixAutoUpdate=!1,this.color=e,this.type="SpotLightHelper";const i=new q,s=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let r=0,a=1,o=32;r<o;r++,a++){const h=r/o*Math.PI*2,c=a/o*Math.PI*2;s.push(Math.cos(h),Math.sin(h),1,Math.cos(c),Math.sin(c),1)}i.setAttribute("position",new P(s,3));const n=new It({fog:!1,toneMapped:!1});this.cone=new ye(i,n),this.add(this.cone),this.update()}dispose(){super.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),this.parent?(this.parent.updateWorldMatrix(!0),this.matrix.copy(this.parent.matrixWorld).invert().multiply(this.light.matrixWorld)):this.matrix.copy(this.light.matrixWorld),this.matrixWorldNeedsUpdate=!0;const t=this.light.distance?this.light.distance:1e3,e=t*Math.tan(this.light.angle);this.cone.scale.set(e,e,t),co.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(co),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const Se=new w,Ds=new G,Jn=new G;class mm extends ye{constructor(t){const e=sh(t),i=new q,s=[],n=[];for(let h=0;h<e.length;h++){const c=e[h];c.parent&&c.parent.isBone&&(s.push(0,0,0),s.push(0,0,0),n.push(0,0,0),n.push(0,0,0))}i.setAttribute("position",new P(s,3)),i.setAttribute("color",new P(n,3));const r=new It({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});super(i,r),this.isSkeletonHelper=!0,this.type="SkeletonHelper",this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1;const a=new U(255),o=new U(65280);this.setColors(a,o)}updateMatrixWorld(t){const e=this.bones,i=this.geometry,s=i.getAttribute("position");Jn.copy(this.root.matrixWorld).invert();for(let n=0,r=0;n<e.length;n++){const a=e[n];a.parent&&a.parent.isBone&&(Ds.multiplyMatrices(Jn,a.matrixWorld),Se.setFromMatrixPosition(Ds),s.setXYZ(r,Se.x,Se.y,Se.z),Ds.multiplyMatrices(Jn,a.parent.matrixWorld),Se.setFromMatrixPosition(Ds),s.setXYZ(r+1,Se.x,Se.y,Se.z),r+=2)}i.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(t)}setColors(t,e){const s=this.geometry.getAttribute("color");for(let n=0;n<s.count;n+=2)s.setXYZ(n,t.r,t.g,t.b),s.setXYZ(n+1,e.r,e.g,e.b);return s.needsUpdate=!0,this}dispose(){super.dispose(),this.geometry.dispose(),this.material.dispose()}}function sh(l){const t=[];l.isBone===!0&&t.push(l);for(let e=0;e<l.children.length;e++)t.push(...sh(l.children[e]));return t}class ym extends ie{constructor(t,e,i){const s=new hn(e,4,2),n=new vi({wireframe:!0,fog:!1,toneMapped:!1});super(s,n),this.light=t,this.color=i,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){super.dispose(),this.geometry.dispose(),this.material.dispose()}update(){this.matrixWorldNeedsUpdate=!0,this.light.updateWorldMatrix(!0,!1),this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)}}const gd=new w,uo=new U,po=new U;class gm extends ${constructor(t,e,i){super(),this.light=t,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,this.type="HemisphereLightHelper";const s=new on(e);s.rotateY(Math.PI*.5),this.material=new vi({wireframe:!0,fog:!1,toneMapped:!1}),this.color===void 0&&(this.material.vertexColors=!0);const n=s.getAttribute("position"),r=new Float32Array(n.count*3);s.setAttribute("color",new rt(r,3)),this.add(new ie(s,this.material)),this.update()}dispose(){super.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const t=this.children[0];if(this.color!==void 0)this.material.color.set(this.color);else{const e=t.geometry.getAttribute("color");uo.copy(this.light.color),po.copy(this.light.groundColor);for(let i=0,s=e.count;i<s;i++){const n=i<s/2?uo:po;e.setXYZ(i,n.r,n.g,n.b)}e.needsUpdate=!0}this.matrixWorldNeedsUpdate=!0,this.light.updateWorldMatrix(!0,!1),t.lookAt(gd.setFromMatrixPosition(this.light.matrixWorld).negate())}}class xm extends ye{constructor(t=10,e=10,i=4473924,s=8947848){i=new U(i),s=new U(s);const n=e/2,r=t/e,a=t/2,o=[],h=[];for(let d=0,p=0,f=-a;d<=e;d++,f+=r){o.push(-a,0,f,a,0,f),o.push(f,0,-a,f,0,a);const m=d===n?i:s;m.toArray(h,p),p+=3,m.toArray(h,p),p+=3,m.toArray(h,p),p+=3,m.toArray(h,p),p+=3}const c=new q;c.setAttribute("position",new P(o,3)),c.setAttribute("color",new P(h,3));const u=new It({vertexColors:!0,toneMapped:!1});super(c,u),this.type="GridHelper"}dispose(){super.dispose(),this.geometry.dispose(),this.material.dispose()}}class bm extends ye{constructor(t=10,e=16,i=8,s=64,n=4473924,r=8947848){n=new U(n),r=new U(r);const a=[],o=[];if(e>1)for(let u=0;u<e;u++){const d=u/e*(Math.PI*2),p=Math.sin(d)*t,f=Math.cos(d)*t;a.push(0,0,0),a.push(p,0,f);const m=u&1?n:r;o.push(m.r,m.g,m.b),o.push(m.r,m.g,m.b)}for(let u=0;u<i;u++){const d=u&1?n:r,p=t-t/i*u;for(let f=0;f<s;f++){let m=f/s*(Math.PI*2),y=Math.sin(m)*p,g=Math.cos(m)*p;a.push(y,0,g),o.push(d.r,d.g,d.b),m=(f+1)/s*(Math.PI*2),y=Math.sin(m)*p,g=Math.cos(m)*p,a.push(y,0,g),o.push(d.r,d.g,d.b)}}const h=new q;h.setAttribute("position",new P(a,3)),h.setAttribute("color",new P(o,3));const c=new It({vertexColors:!0,toneMapped:!1});super(h,c),this.type="PolarGridHelper"}dispose(){super.dispose(),this.geometry.dispose(),this.material.dispose()}}const fo=new w,Us=new w,mo=new w;class Mm extends ${constructor(t,e,i){super(),this.light=t,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,this.type="DirectionalLightHelper",e===void 0&&(e=1);let s=new q;s.setAttribute("position",new P([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));const n=new It({fog:!1,toneMapped:!1});this.lightPlane=new He(s,n),this.add(this.lightPlane),s=new q,s.setAttribute("position",new P([0,0,0,0,0,1],3)),this.targetLine=new He(s,n),this.add(this.targetLine),this.update()}dispose(){super.dispose(),this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){this.matrixWorldNeedsUpdate=!0,this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),fo.setFromMatrixPosition(this.light.matrixWorld),Us.setFromMatrixPosition(this.light.target.matrixWorld),mo.subVectors(Us,fo),this.lightPlane.lookAt(Us),this.color!==void 0?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(Us),this.targetLine.scale.z=mo.length()}}const Ws=new w,at=new Nr;class wm extends ye{constructor(t){const e=new q,i=new It({color:16777215,vertexColors:!0,toneMapped:!1}),s=[],n=[],r={};a("n1","n2"),a("n2","n4"),a("n4","n3"),a("n3","n1"),a("f1","f2"),a("f2","f4"),a("f4","f3"),a("f3","f1"),a("n1","f1"),a("n2","f2"),a("n3","f3"),a("n4","f4"),a("p","n1"),a("p","n2"),a("p","n3"),a("p","n4"),a("u1","u2"),a("u2","u3"),a("u3","u1"),a("c","t"),a("p","c"),a("cn1","cn2"),a("cn3","cn4"),a("cf1","cf2"),a("cf3","cf4");function a(f,m){o(f),o(m)}function o(f){s.push(0,0,0),n.push(0,0,0),r[f]===void 0&&(r[f]=[]),r[f].push(s.length/3-1)}e.setAttribute("position",new P(s,3)),e.setAttribute("color",new P(n,3)),super(e,i),this.type="CameraHelper",this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=r,this.update();const h=new U(16755200),c=new U(16711680),u=new U(43775),d=new U(16777215),p=new U(3355443);this.setColors(h,c,u,d,p)}setColors(t,e,i,s,n){const a=this.geometry.getAttribute("color");return a.setXYZ(0,t.r,t.g,t.b),a.setXYZ(1,t.r,t.g,t.b),a.setXYZ(2,t.r,t.g,t.b),a.setXYZ(3,t.r,t.g,t.b),a.setXYZ(4,t.r,t.g,t.b),a.setXYZ(5,t.r,t.g,t.b),a.setXYZ(6,t.r,t.g,t.b),a.setXYZ(7,t.r,t.g,t.b),a.setXYZ(8,t.r,t.g,t.b),a.setXYZ(9,t.r,t.g,t.b),a.setXYZ(10,t.r,t.g,t.b),a.setXYZ(11,t.r,t.g,t.b),a.setXYZ(12,t.r,t.g,t.b),a.setXYZ(13,t.r,t.g,t.b),a.setXYZ(14,t.r,t.g,t.b),a.setXYZ(15,t.r,t.g,t.b),a.setXYZ(16,t.r,t.g,t.b),a.setXYZ(17,t.r,t.g,t.b),a.setXYZ(18,t.r,t.g,t.b),a.setXYZ(19,t.r,t.g,t.b),a.setXYZ(20,t.r,t.g,t.b),a.setXYZ(21,t.r,t.g,t.b),a.setXYZ(22,t.r,t.g,t.b),a.setXYZ(23,t.r,t.g,t.b),a.setXYZ(24,e.r,e.g,e.b),a.setXYZ(25,e.r,e.g,e.b),a.setXYZ(26,e.r,e.g,e.b),a.setXYZ(27,e.r,e.g,e.b),a.setXYZ(28,e.r,e.g,e.b),a.setXYZ(29,e.r,e.g,e.b),a.setXYZ(30,e.r,e.g,e.b),a.setXYZ(31,e.r,e.g,e.b),a.setXYZ(32,i.r,i.g,i.b),a.setXYZ(33,i.r,i.g,i.b),a.setXYZ(34,i.r,i.g,i.b),a.setXYZ(35,i.r,i.g,i.b),a.setXYZ(36,i.r,i.g,i.b),a.setXYZ(37,i.r,i.g,i.b),a.setXYZ(38,s.r,s.g,s.b),a.setXYZ(39,s.r,s.g,s.b),a.setXYZ(40,n.r,n.g,n.b),a.setXYZ(41,n.r,n.g,n.b),a.setXYZ(42,n.r,n.g,n.b),a.setXYZ(43,n.r,n.g,n.b),a.setXYZ(44,n.r,n.g,n.b),a.setXYZ(45,n.r,n.g,n.b),a.setXYZ(46,n.r,n.g,n.b),a.setXYZ(47,n.r,n.g,n.b),a.setXYZ(48,n.r,n.g,n.b),a.setXYZ(49,n.r,n.g,n.b),a.needsUpdate=!0,this}update(){const t=this.geometry,e=this.pointMap,i=1,s=1;let n,r;if(at.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),this.camera.reversedDepth===!0)n=1,r=0;else if(this.camera.coordinateSystem===Qt)n=-1,r=1;else if(this.camera.coordinateSystem===bi)n=0,r=1;else throw new Error("THREE.CameraHelper.update(): Invalid coordinate system: "+this.camera.coordinateSystem);ot("c",e,t,at,0,0,n),ot("t",e,t,at,0,0,r),ot("n1",e,t,at,-i,-s,n),ot("n2",e,t,at,i,-s,n),ot("n3",e,t,at,-i,s,n),ot("n4",e,t,at,i,s,n),ot("f1",e,t,at,-i,-s,r),ot("f2",e,t,at,i,-s,r),ot("f3",e,t,at,-i,s,r),ot("f4",e,t,at,i,s,r),ot("u1",e,t,at,i*.7,s*1.1,n),ot("u2",e,t,at,-i*.7,s*1.1,n),ot("u3",e,t,at,0,s*2,n),ot("cf1",e,t,at,-i,0,r),ot("cf2",e,t,at,i,0,r),ot("cf3",e,t,at,0,-s,r),ot("cf4",e,t,at,0,s,r),ot("cn1",e,t,at,-i,0,n),ot("cn2",e,t,at,i,0,n),ot("cn3",e,t,at,0,-s,n),ot("cn4",e,t,at,0,s,n),t.getAttribute("position").needsUpdate=!0}dispose(){super.dispose(),this.geometry.dispose(),this.material.dispose()}}function ot(l,t,e,i,s,n,r){Ws.set(s,n,r).unproject(i);const a=t[l];if(a!==void 0){const o=e.getAttribute("position");for(let h=0,c=a.length;h<c;h++)o.setXYZ(a[h],Ws.x,Ws.y,Ws.z)}}const Gs=new _t;class _m extends ye{constructor(t,e=16776960){const i=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),s=new Float32Array(24),n=new q;n.setIndex(new rt(i,1)),n.setAttribute("position",new rt(s,3)),super(n,new It({color:e,toneMapped:!1})),this.object=t,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(){if(this.object!==void 0&&Gs.setFromObject(this.object),Gs.isEmpty())return;const t=Gs.min,e=Gs.max,i=this.geometry.attributes.position,s=i.array;s[0]=e.x,s[1]=e.y,s[2]=e.z,s[3]=t.x,s[4]=e.y,s[5]=e.z,s[6]=t.x,s[7]=t.y,s[8]=e.z,s[9]=e.x,s[10]=t.y,s[11]=e.z,s[12]=e.x,s[13]=e.y,s[14]=t.z,s[15]=t.x,s[16]=e.y,s[17]=t.z,s[18]=t.x,s[19]=t.y,s[20]=t.z,s[21]=e.x,s[22]=t.y,s[23]=t.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(t){return this.object=t,this.update(),this}copy(t,e){return super.copy(t,e),this.object=t.object,this}dispose(){super.dispose(),this.geometry.dispose(),this.material.dispose()}}class vm extends ye{constructor(t,e=16776960){const i=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),s=[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],n=new q;n.setIndex(new rt(i,1)),n.setAttribute("position",new P(s,3)),super(n,new It({color:e,toneMapped:!1})),this.box=t,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(t){const e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(t))}dispose(){super.dispose(),this.geometry.dispose(),this.material.dispose()}}class Sm extends He{constructor(t,e=1,i=16776960){const s=i,n=[1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],r=new q;r.setAttribute("position",new P(n,3)),r.computeBoundingSphere(),super(r,new It({color:s,toneMapped:!1})),this.type="PlaneHelper",this.plane=t,this.size=e;const a=[1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],o=new q;o.setAttribute("position",new P(a,3)),o.computeBoundingSphere(),this.add(new ie(o,new vi({color:s,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(t){this.position.set(0,0,0),this.scale.set(.5*this.size,.5*this.size,1),this.lookAt(this.plane.normal),this.translateZ(-this.plane.constant),super.updateMatrixWorld(t)}dispose(){super.dispose(),this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()}}const yo=new w;let Hs,Xn;class Am extends ${constructor(t=new w(0,0,1),e=new w(0,0,0),i=1,s=16776960,n=i*.2,r=n*.2){super(),this.type="ArrowHelper",Hs===void 0&&(Hs=new q,Hs.setAttribute("position",new P([0,0,0,0,1,0],3)),Xn=new rn(.5,1,5,1),Xn.translate(0,-.5,0)),this.position.copy(e),this.line=new He(Hs,new It({color:s,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new ie(Xn,new vi({color:s,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(i,n,r)}setDirection(t){if(t.y>.99999)this.quaternion.set(0,0,0,1);else if(t.y<-.99999)this.quaternion.set(1,0,0,0);else{yo.set(t.z,0,-t.x).normalize();const e=Math.acos(t.y);this.quaternion.setFromAxisAngle(yo,e)}}setLength(t,e=t*.2,i=e*.2){this.line.scale.set(1,Math.max(1e-4,t-e),1),this.line.updateMatrix(),this.cone.scale.set(i,e,i),this.cone.position.y=t,this.cone.updateMatrix()}setColor(t){this.line.material.color.set(t),this.cone.material.color.set(t)}copy(t){return super.copy(t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this}dispose(){super.dispose(),this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class Tm extends ye{constructor(t=1){const e=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t],i=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],s=new q;s.setAttribute("position",new P(e,3)),s.setAttribute("color",new P(i,3));const n=new It({vertexColors:!0,toneMapped:!1});super(s,n),this.type="AxesHelper"}setColors(t,e,i){const s=new U,n=this.geometry.attributes.color.array;return s.set(t),s.toArray(n,0),s.toArray(n,3),s.set(e),s.toArray(n,6),s.toArray(n,9),s.set(i),s.toArray(n,12),s.toArray(n,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){super.dispose(),this.geometry.dispose(),this.material.dispose()}}class Cm{constructor(){this.type="ShapePath",this.color=new U,this.subPaths=[],this.currentPath=null,this.userData={}}moveTo(t,e){return this.currentPath=new js,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e),this}lineTo(t,e){return this.currentPath.lineTo(t,e),this}quadraticCurveTo(t,e,i,s){return this.currentPath.quadraticCurveTo(t,e,i,s),this}bezierCurveTo(t,e,i,s,n,r){return this.currentPath.bezierCurveTo(t,e,i,s,n,r),this}splineThru(t){return this.currentPath.splineThru(t),this}toShapes(){function t(o,h){let c=!1;const u=h.length;for(let d=0,p=u-1;d<u;p=d++){const f=h[d],m=h[p];f.y>o.y!=m.y>o.y&&o.x<(m.x-f.x)*(o.y-f.y)/(m.y-f.y)+f.x&&(c=!c)}return c}function e(o,h){const c=h.getCenter(new I);if(t(c,o))return c;const u=c.y,d=[],p=o.length;for(let f=0;f<p;f++){const m=o[f],y=o[(f+1)%p];if(m.y>u!=y.y>u){const g=m.x+(u-m.y)*(y.x-m.x)/(y.y-m.y);d.push(g)}}return d.length>1&&(d.sort((f,m)=>f-m),c.x=(d[0]+d[1])/2),c}let i=this.userData.style&&this.userData.style.fillRule||"nonzero";i!=="nonzero"&&i!=="evenodd"&&(V('Fill-rule "'+i+'" is not supported, falling back to "nonzero".'),i="nonzero");const s=i==="nonzero"?(o=>o!==0):(o=>(o&1)!==0),n=[];for(const o of this.subPaths){const h=o.getPoints();if(h.length<3)continue;const c=jt.area(h);if(c===0)continue;const u=new fd;for(let d=0;d<h.length;d++)u.expandByPoint(h[d]);n.push({subPath:o,points:h,boundingBox:u,interiorPoint:e(h,u),absArea:Math.abs(c),winding:c<0?-1:1,container:null,exclude:!1,role:null})}n.sort((o,h)=>h.absArea-o.absArea);for(let o=0;o<n.length;o++){const h=n[o];let c=0;for(let u=o-1;u>=0;u--){const d=n[u];if(d.boundingBox.containsBox(h.boundingBox)&&t(h.interiorPoint,d.points)){h.container=d.exclude?d.container:d,c=d.winding,h.winding+=c;break}}s(h.winding)===s(c)&&(h.exclude=!0)}for(const o of n)o.exclude||(o.role=o.container===null||o.container.role==="hole"?"outer":"hole");const r=[],a=new Map;for(const o of n){if(o.exclude||o.role!=="outer")continue;const h=new an;h.curves=o.subPath.curves,r.push(h),a.set(o,h)}for(const o of n){if(o.exclude||o.role!=="hole")continue;const h=a.get(o.container);if(!h)continue;const c=new js;c.curves=o.subPath.curves,h.holes.push(c)}return r}}class Im extends me{constructor(t,e=null){super(),this.object=t,this.domElement=e,this.enabled=!0,this.state=-1,this.keys={},this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null},this.touches={ONE:null,TWO:null}}connect(t){this.domElement!==null&&this.disconnect(),this.domElement=t}disconnect(){}dispose(){}update(){}}function xd(l,t){const e=l.image&&l.image.width?l.image.width/l.image.height:1;return e>t?(l.repeat.x=1,l.repeat.y=e/t,l.offset.x=0,l.offset.y=(1-l.repeat.y)/2):(l.repeat.x=t/e,l.repeat.y=1,l.offset.x=(1-l.repeat.x)/2,l.offset.y=0),l}function bd(l,t){const e=l.image&&l.image.width?l.image.width/l.image.height:1;return e>t?(l.repeat.x=t/e,l.repeat.y=1,l.offset.x=(1-l.repeat.x)/2,l.offset.y=0):(l.repeat.x=1,l.repeat.y=e/t,l.offset.x=0,l.offset.y=(1-l.repeat.y)/2),l}function Md(l){return l.repeat.x=1,l.repeat.y=1,l.offset.x=0,l.offset.y=0,l}function wd(l,t,e,i){const s=_d(i);switch(e){case Ih:return l*t;case xo:return l*t/s.components*s.byteLength;case bo:return l*t/s.components*s.byteLength;case Fh:return l*t*2/s.components*s.byteLength;case kh:return l*t*2/s.components*s.byteLength;case zh:return l*t*3/s.components*s.byteLength;case Ji:return l*t*4/s.components*s.byteLength;case Ph:return l*t*4/s.components*s.byteLength;case Rh:case Oh:return Math.floor((l+3)/4)*Math.floor((t+3)/4)*8;case Eh:case Nh:return Math.floor((l+3)/4)*Math.floor((t+3)/4)*16;case Vh:case Uh:return Math.max(l,16)*Math.max(t,8)/4;case Lh:case Dh:return Math.max(l,8)*Math.max(t,8)/2;case Wh:case Gh:case qh:case Jh:return Math.floor((l+3)/4)*Math.floor((t+3)/4)*8;case Hh:case Xh:case Yh:return Math.floor((l+3)/4)*Math.floor((t+3)/4)*16;case Zh:return Math.floor((l+3)/4)*Math.floor((t+3)/4)*16;case $h:return Math.floor((l+4)/5)*Math.floor((t+3)/4)*16;case Qh:return Math.floor((l+4)/5)*Math.floor((t+4)/5)*16;case jh:return Math.floor((l+5)/6)*Math.floor((t+4)/5)*16;case Kh:return Math.floor((l+5)/6)*Math.floor((t+5)/6)*16;case tl:return Math.floor((l+7)/8)*Math.floor((t+4)/5)*16;case el:return Math.floor((l+7)/8)*Math.floor((t+5)/6)*16;case il:return Math.floor((l+7)/8)*Math.floor((t+7)/8)*16;case sl:return Math.floor((l+9)/10)*Math.floor((t+4)/5)*16;case nl:return Math.floor((l+9)/10)*Math.floor((t+5)/6)*16;case rl:return Math.floor((l+9)/10)*Math.floor((t+7)/8)*16;case al:return Math.floor((l+9)/10)*Math.floor((t+9)/10)*16;case ol:return Math.floor((l+11)/12)*Math.floor((t+9)/10)*16;case hl:return Math.floor((l+11)/12)*Math.floor((t+11)/12)*16;case ll:case cl:case ul:return Math.ceil(l/4)*Math.ceil(t/4)*16;case dl:case pl:return Math.ceil(l/4)*Math.ceil(t/4)*8;case fl:case ml:return Math.ceil(l/4)*Math.ceil(t/4)*16}throw new Error(`Unable to determine texture byte length for ${e} format.`)}function _d(l){switch(l){case or:case bh:return{byteLength:1,components:1};case wh:case Mh:case vh:return{byteLength:2,components:1};case Sh:case Ah:return{byteLength:2,components:4};case sn:case _h:case xi:return{byteLength:4,components:1};case Th:case Ch:return{byteLength:4,components:3}}throw new Error(`THREE.TextureUtils: Unknown texture type ${l}.`)}class zm{static contain(t,e){return xd(t,e)}static cover(t,e){return bd(t,e)}static fill(t){return Md(t)}static getByteLength(t,e,i,s){return wd(t,e,i,s)}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"186"}}));typeof window<"u"&&(window.__THREE__?V("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="186");export{cp as ACESFilmicToneMapping,hh as AddEquation,rp as AddOperation,Mo as AdditiveAnimationBlendMode,Ed as AdditiveBlending,dp as AgXToneMapping,Ih as AlphaFormat,Qp as AlwaysCompare,Xr as AlwaysDepth,Ml as AlwaysStencilFunc,Hu as AmbientLight,ud as AnimationAction,Ks as AnimationClip,Gf as AnimationLoader,nm as AnimationMixer,sm as AnimationObjectGroup,Wf as AnimationUtils,Bc as ArcCurve,Kf as ArrayCamera,Am as ArrowHelper,Kr as AttachedBindMode,Ku as Audio,im as AudioAnalyser,th as AudioContext,tm as AudioListener,$f as AudioLoader,Tm as AxesHelper,ah as BackSide,bl as BasicDepthPacking,Bd as BasicShadowMap,Sc as BatchedMesh,zu as BezierInterpolant,Fo as Bone,Si as BooleanKeyframeTrack,fd as Box2,_t as Box3,vm as Box3Helper,gr as BoxGeometry,_m as BoxHelper,rt as BufferAttribute,q as BufferGeometry,Yu as BufferGeometryLoader,bh as ByteType,pe as Cache,Nr as Camera,wm as CameraHelper,Ef as CanvasTexture,xr as CapsuleGeometry,Fc as CatmullRomCurve3,lp as CineonToneMapping,br as CircleGeometry,$t as ClampToEdgeWrapping,cm as Clock,U as Color,Zo as ColorKeyframeTrack,Rt as ColorManagement,df as Compatibility,Rf as CompressedArrayTexture,Of as CompressedCubeTexture,yr as CompressedTexture,Hf as CompressedTextureLoader,rn as ConeGeometry,ip as ConstantAlphaFactor,tp as ConstantColorFactor,Im as Controls,jf as CubeCamera,Lf as CubeDepthTexture,en as CubeReflectionMapping,dh as CubeRefractionMapping,Po as CubeTexture,qf as CubeTextureLoader,mh as CubeUVReflectionMapping,Ro as CubicBezierCurve,Vc as CubicBezierCurve3,Cu as CubicInterpolant,Cd as CullFaceBack,Id as CullFaceFront,zd as CullFaceFrontBack,Td as CullFaceNone,se as Curve,Uc as CurvePath,Vd as CustomBlending,up as CustomToneMapping,nn as CylinderGeometry,dm as Cylindrical,To as Data3DTexture,Gl as DataArrayTexture,Kt as DataTexture,Jf as DataTextureLoader,Af as DataUtils,Pp as DecrementStencilOp,Op as DecrementWrapStencilOp,Ou as DefaultLoadingManager,Qn as DepthFormat,Bh as DepthStencilFormat,Ic as DepthTexture,uh as DetachedBindMode,Gu as DirectionalLight,Mm as DirectionalLightHelper,Iu as DiscreteInterpolant,Mr as DodecahedronGeometry,Rd as DoubleSide,Zd as DstAlphaFactor,Qd as DstColorFactor,rf as DynamicCopyUsage,jp as DynamicDrawUsage,ef as DynamicReadUsage,zc as EdgesGeometry,wr as EllipseCurve,Jp as EqualCompare,Zr as EqualDepth,Vp as EqualStencilFunc,ph as EquirectangularReflectionMapping,fh as EquirectangularRefractionMapping,te as Euler,me as EventDispatcher,Vf as ExternalTexture,vr as ExtrudeGeometry,Ce as FileLoader,Ff as Float16BufferAttribute,P as Float32BufferAttribute,xi as FloatType,dr as Fog,ur as FogExp2,Pf as FramebufferTexture,go as FrontSide,Ys as Frustum,mr as FrustumArray,hm as GLBufferAttribute,of as GLSL1,hf as GLSL3,Yp as GreaterCompare,Qr as GreaterDepth,$p as GreaterEqualCompare,$r as GreaterEqualDepth,Gp as GreaterEqualStencilFunc,Up as GreaterStencilFunc,xm as GridHelper,Vi as Group,Nf as HTMLTexture,vh as HalfFloatType,Nu as HemisphereLight,gm as HemisphereLightHelper,Sr as IcosahedronGeometry,Zf as ImageBitmapLoader,tn as ImageLoader,Dl as ImageUtils,kp as IncrementStencilOp,Rp as IncrementWrapStencilOp,Yi as InstancedBufferAttribute,Xu as InstancedBufferGeometry,om as InstancedInterleavedBuffer,fc as InstancedMesh,zf as Int16BufferAttribute,Bf as Int32BufferAttribute,Tf as Int8BufferAttribute,_h as IntType,pr as InterleavedBuffer,Mi as InterleavedBufferAttribute,Ki as Interpolant,ta as InterpolateBezier,qs as InterpolateDiscrete,jn as InterpolateLinear,ln as InterpolateSmooth,uf as InterpolationSamplingMode,cf as InterpolationSamplingType,Ep as InvertStencilOp,un as KeepStencilOp,Xt as KeyframeTrack,hc as LOD,Ar as LatheGeometry,Co as Layers,qp as LessCompare,Yr as LessDepth,Xp as LessEqualCompare,Yn as LessEqualDepth,Dp as LessEqualStencilFunc,Lp as LessStencilFunc,Xe as Light,Ju as LightProbe,Er as LightShadow,He as Line,pm as Line3,It as LineBasicMaterial,Oo as LineCurve,Dc as LineCurve3,Su as LineDashedMaterial,Ac as LineLoop,ye as LineSegments,Jt as LinearFilter,Xo as LinearInterpolant,gp as LinearMipMapLinearFilter,yp as LinearMipMapNearestFilter,ar as LinearMipmapLinearFilter,xh as LinearMipmapNearestFilter,ea as LinearSRGBColorSpace,op as LinearToneMapping,ia as LinearTransfer,Lt as Loader,to as LoaderUtils,Qo as LoadingManager,yl as LoopOnce,xl as LoopPingPong,gl as LoopRepeat,Sd as MOUSE,gt as Material,Dd as MaterialBlending,Lr as MaterialLoader,Mf as MathUtils,ih as Matrix2,ee as Matrix3,G as Matrix4,Hd as MaxEquation,ie as Mesh,vi as MeshBasicMaterial,wu as MeshDepthMaterial,_u as MeshDistanceMaterial,Mu as MeshLambertMaterial,vu as MeshMatcapMaterial,bu as MeshNormalMaterial,gu as MeshPhongMaterial,yu as MeshPhysicalMaterial,Ho as MeshStandardMaterial,xu as MeshToonMaterial,Gd as MinEquation,$n as MirroredRepeatWrapping,np as MixOperation,Ld as MultiplyBlending,nr as MultiplyOperation,Nt as NearestFilter,mp as NearestMipMapLinearFilter,fp as NearestMipMapNearestFilter,gh as NearestMipmapLinearFilter,yh as NearestMipmapNearestFilter,pp as NeutralToneMapping,Hp as NeverCompare,Jr as NeverDepth,Np as NeverStencilFunc,Od as NoBlending,wo as NoColorSpace,Cp as NoNormalPacking,ap as NoToneMapping,hr as NormalAnimationBlendMode,oh as NormalBlending,zp as NormalGAPacking,Ip as NormalRGPacking,Zp as NotEqualCompare,jr as NotEqualDepth,Wp as NotEqualStencilFunc,Rr as NumberKeyframeTrack,$ as Object3D,Yf as ObjectLoader,Tp as ObjectSpaceNormalMap,on as OctahedronGeometry,Jd as OneFactor,sp as OneMinusConstantAlphaFactor,ep as OneMinusConstantColorFactor,$d as OneMinusDstAlphaFactor,jd as OneMinusDstColorFactor,ch as OneMinusSrcAlphaFactor,Yd as OneMinusSrcColorFactor,jo as OrthographicCamera,Fd as PCFShadowMap,kd as PCFSoftShadowMap,js as Path,Ut as PerspectiveCamera,Ue as Plane,Tr as PlaneGeometry,Sm as PlaneHelper,Uu as PointLight,ym as PointLightHelper,Tc as Points,ko as PointsMaterial,bm as PolarGridHelper,Je as PolyhedronGeometry,em as PositionalAudio,Z as PropertyBinding,ed as PropertyMixer,Eo as QuadraticBezierCurve,No as QuadraticBezierCurve3,Tt as Quaternion,Or as QuaternionKeyframeTrack,ku as QuaternionLinearInterpolant,qh as R11_EAC_Format,Xi as RAD2DEG,fl as RED_GREEN_RGTC2_Format,dl as RED_RGTC1_Format,vd as REVISION,Xh as RG11_EAC_Format,vp as RGBADepthPacking,Ji as RGBAFormat,Ph as RGBAIntegerFormat,al as RGBA_ASTC_10x10_Format,sl as RGBA_ASTC_10x5_Format,nl as RGBA_ASTC_10x6_Format,rl as RGBA_ASTC_10x8_Format,ol as RGBA_ASTC_12x10_Format,hl as RGBA_ASTC_12x12_Format,Zh as RGBA_ASTC_4x4_Format,$h as RGBA_ASTC_5x4_Format,Qh as RGBA_ASTC_5x5_Format,jh as RGBA_ASTC_6x5_Format,Kh as RGBA_ASTC_6x6_Format,tl as RGBA_ASTC_8x5_Format,el as RGBA_ASTC_8x6_Format,il as RGBA_ASTC_8x8_Format,ll as RGBA_BPTC_Format,Hh as RGBA_ETC2_EAC_Format,Uh as RGBA_PVRTC_2BPPV1_Format,Dh as RGBA_PVRTC_4BPPV1_Format,Oh as RGBA_S3TC_DXT1_Format,Eh as RGBA_S3TC_DXT3_Format,Nh as RGBA_S3TC_DXT5_Format,Sp as RGBDepthPacking,zh as RGBFormat,bp as RGBIntegerFormat,cl as RGB_BPTC_SIGNED_Format,ul as RGB_BPTC_UNSIGNED_Format,Wh as RGB_ETC1_Format,Gh as RGB_ETC2_Format,Vh as RGB_PVRTC_2BPPV1_Format,Lh as RGB_PVRTC_4BPPV1_Format,Rh as RGB_S3TC_DXT1_Format,Ap as RGDepthPacking,Fh as RGFormat,kh as RGIntegerFormat,mu as RawShaderMaterial,ji as Ray,lm as Raycaster,qu as RectAreaLight,xo as RedFormat,bo as RedIntegerFormat,hp as ReinhardToneMapping,pf as RenderObjectRefreshType,So as RenderTarget,rm as RenderTarget3D,Zn as RepeatWrapping,Fp as ReplaceStencilOp,Wd as ReverseSubtractEquation,bf as ReversedDepthFuncs,Cr as RingGeometry,Jh as SIGNED_R11_EAC_Format,ml as SIGNED_RED_GREEN_RGTC2_Format,pl as SIGNED_RED_RGTC1_Format,Yh as SIGNED_RG11_EAC_Format,Dt as SRGBColorSpace,cn as SRGBTransfer,Ql as Scene,Go as ShaderMaterial,cu as ShadowMaterial,an as Shape,Ir as ShapeGeometry,Cm as ShapePath,jt as ShapeUtils,Mh as ShortType,fr as Skeleton,mm as SkeletonHelper,uc as SkinnedMesh,wf as Source,yt as Sphere,hn as SphereGeometry,um as Spherical,Ko as SphericalHarmonics3,Lo as SplineCurve,Vu as SpotLight,fm as SpotLightHelper,oc as Sprite,zo as SpriteMaterial,lh as SrcAlphaFactor,Kd as SrcAlphaSaturateFactor,Xd as SrcColorFactor,nf as StaticCopyUsage,lr as StaticDrawUsage,tf as StaticReadUsage,Qf as StereoCamera,af as StreamCopyUsage,Kp as StreamDrawUsage,sf as StreamReadUsage,Ai as StringKeyframeTrack,Ud as SubtractEquation,Nd as SubtractiveBlending,Ad as TOUCH,_i as TangentSpaceNormalMap,zr as TetrahedronGeometry,ht as Texture,Xf as TextureLoader,Ae as TextureSource,zm as TextureUtils,$u as Timer,lf as TimestampQuery,Br as TorusGeometry,Fr as TorusKnotGeometry,Ot as Triangle,_p as TriangleFanDrawMode,wp as TriangleStripDrawMode,Mp as TrianglesDrawMode,kr as TubeGeometry,rr as UVMapping,tc as Uint16BufferAttribute,ec as Uint32BufferAttribute,Cf as Uint8BufferAttribute,If as Uint8ClampedBufferAttribute,eh as Uniform,am as UniformsGroup,Uf as UniformsUtils,or as UnsignedByteType,Ch as UnsignedInt101111Type,xp as UnsignedInt248Type,Th as UnsignedInt5999Type,sn as UnsignedIntType,Sh as UnsignedShort4444Type,Ah as UnsignedShort5551Type,wh as UnsignedShortType,Pd as VSMShadowMap,I as Vector2,w as Vector3,Ct as Vector4,$o as VectorKeyframeTrack,kf as VideoFrameTexture,Cc as VideoTexture,vf as WebGL3DRenderTarget,_f as WebGLArrayRenderTarget,Qt as WebGLCoordinateSystem,Ao as WebGLRenderTarget,bi as WebGPUCoordinateSystem,Sf as WebXRController,lu as WireframeGeometry,Js as WrapAroundEnding,fi as ZeroCurvatureEnding,qd as ZeroFactor,mi as ZeroSlopeEnding,Bp as ZeroStencilOp,Pr as cloneUniforms,ff as createCanvasElement,Xs as createElementNS,X as error,wd as getByteLength,yf as getConsoleFunction,Df as getUnlitUniformColorSpace,_o as isTypedArray,na as log,uu as mergeUniforms,xf as probeAsync,mf as setConsoleFunction,V as warn,We as warnOnce,gf as yieldToMain};