@splinetool/runtime 2.0.7 → 2.0.8

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 (272) hide show
  1. package/build/{runtime-chunk-RDQUMMBI.js → runtime-chunk-23QXG35G.js} +1 -1
  2. package/build/runtime-chunk-23QXG35G.js.br +0 -0
  3. package/build/runtime-chunk-23QXG35G.js.gz +0 -0
  4. package/build/{runtime-chunk-WZWD2YIG.js → runtime-chunk-32KZP4YN.js} +1 -1
  5. package/build/runtime-chunk-32KZP4YN.js.br +0 -0
  6. package/build/runtime-chunk-32KZP4YN.js.gz +0 -0
  7. package/build/{runtime-chunk-5P3HUPT4.js → runtime-chunk-3GRN37GY.js} +1 -1
  8. package/build/runtime-chunk-3GRN37GY.js.br +0 -0
  9. package/build/runtime-chunk-3GRN37GY.js.gz +0 -0
  10. package/build/{runtime-chunk-BR3T7PBD.js → runtime-chunk-557KVSJL.js} +1 -1
  11. package/build/runtime-chunk-557KVSJL.js.br +0 -0
  12. package/build/runtime-chunk-557KVSJL.js.gz +0 -0
  13. package/build/{runtime-chunk-UYADWI5Q.js → runtime-chunk-5JEZ42OM.js} +1 -1
  14. package/build/runtime-chunk-5JEZ42OM.js.br +0 -0
  15. package/build/runtime-chunk-5JEZ42OM.js.gz +0 -0
  16. package/build/{runtime-chunk-TONK22EB.js → runtime-chunk-5RXW5MNJ.js} +1 -1
  17. package/build/runtime-chunk-5RXW5MNJ.js.br +0 -0
  18. package/build/runtime-chunk-5RXW5MNJ.js.gz +0 -0
  19. package/build/{runtime-chunk-XL37JGAH.js → runtime-chunk-AELTGHV2.js} +1 -1
  20. package/build/runtime-chunk-AELTGHV2.js.br +0 -0
  21. package/build/runtime-chunk-AELTGHV2.js.gz +0 -0
  22. package/build/{runtime-chunk-NPNRGCX3.js → runtime-chunk-BMA5KYBS.js} +1 -1
  23. package/build/runtime-chunk-BMA5KYBS.js.br +0 -0
  24. package/build/runtime-chunk-BMA5KYBS.js.gz +0 -0
  25. package/build/{runtime-chunk-DCPBSRSM.js → runtime-chunk-CKT62HES.js} +1 -1
  26. package/build/runtime-chunk-CKT62HES.js.br +0 -0
  27. package/build/runtime-chunk-CKT62HES.js.gz +0 -0
  28. package/build/{runtime-chunk-EKVJUEYP.js → runtime-chunk-DHWGP6NU.js} +1 -1
  29. package/build/runtime-chunk-DHWGP6NU.js.br +0 -0
  30. package/build/runtime-chunk-DHWGP6NU.js.gz +0 -0
  31. package/build/{runtime-chunk-LX7POLY3.js → runtime-chunk-DK66VKWP.js} +1 -1
  32. package/build/runtime-chunk-DK66VKWP.js.br +0 -0
  33. package/build/runtime-chunk-DK66VKWP.js.gz +0 -0
  34. package/build/{runtime-chunk-QPWV26TX.js → runtime-chunk-E3IEBR27.js} +1 -1
  35. package/build/runtime-chunk-E3IEBR27.js.br +0 -0
  36. package/build/runtime-chunk-E3IEBR27.js.gz +0 -0
  37. package/build/{runtime-chunk-3LIYAJXD.js → runtime-chunk-EJJZJ5MV.js} +1 -1
  38. package/build/runtime-chunk-EJJZJ5MV.js.br +0 -0
  39. package/build/runtime-chunk-EJJZJ5MV.js.gz +0 -0
  40. package/build/{runtime-chunk-H7J7NLSC.js → runtime-chunk-F3ZACLZW.js} +1 -1
  41. package/build/runtime-chunk-F3ZACLZW.js.br +0 -0
  42. package/build/runtime-chunk-F3ZACLZW.js.gz +0 -0
  43. package/build/{runtime-chunk-E3ZOKGVW.js → runtime-chunk-GZ7C2GJM.js} +1 -1
  44. package/build/runtime-chunk-GZ7C2GJM.js.br +0 -0
  45. package/build/runtime-chunk-GZ7C2GJM.js.gz +0 -0
  46. package/build/{runtime-chunk-XYRJFDFM.js → runtime-chunk-HK23JJVH.js} +1 -1
  47. package/build/runtime-chunk-HK23JJVH.js.br +0 -0
  48. package/build/runtime-chunk-HK23JJVH.js.gz +0 -0
  49. package/build/{runtime-chunk-BHBI2VFL.js → runtime-chunk-HZ6FL5GH.js} +1 -1
  50. package/build/runtime-chunk-HZ6FL5GH.js.br +0 -0
  51. package/build/runtime-chunk-HZ6FL5GH.js.gz +0 -0
  52. package/build/{runtime-chunk-JVRISZP3.js → runtime-chunk-KE6HNYUL.js} +1 -1
  53. package/build/runtime-chunk-KE6HNYUL.js.br +0 -0
  54. package/build/runtime-chunk-KE6HNYUL.js.gz +0 -0
  55. package/build/runtime-chunk-KNL33WN7.js +1 -0
  56. package/build/runtime-chunk-KNL33WN7.js.br +0 -0
  57. package/build/runtime-chunk-KNL33WN7.js.gz +0 -0
  58. package/build/runtime-chunk-OUXEWX5Z.js +1 -0
  59. package/build/runtime-chunk-OUXEWX5Z.js.br +0 -0
  60. package/build/runtime-chunk-OUXEWX5Z.js.gz +0 -0
  61. package/build/{runtime-chunk-72GELULA.js → runtime-chunk-PDASWDVC.js} +1 -1
  62. package/build/{runtime-chunk-72GELULA.js.br → runtime-chunk-PDASWDVC.js.br} +0 -0
  63. package/build/runtime-chunk-PDASWDVC.js.gz +0 -0
  64. package/build/{runtime-chunk-O5TGJH3R.js → runtime-chunk-RLYG5YBB.js} +1 -1
  65. package/build/runtime-chunk-RLYG5YBB.js.br +1 -0
  66. package/build/runtime-chunk-RLYG5YBB.js.gz +0 -0
  67. package/build/{runtime-chunk-SBMXYV5Q.js → runtime-chunk-TAY7IXEZ.js} +1 -1
  68. package/build/runtime-chunk-TAY7IXEZ.js.br +0 -0
  69. package/build/runtime-chunk-TAY7IXEZ.js.gz +0 -0
  70. package/build/{runtime-chunk-ITMHVNES.js → runtime-chunk-UIM3XKIT.js} +1 -1
  71. package/build/runtime-chunk-UIM3XKIT.js.br +0 -0
  72. package/build/runtime-chunk-UIM3XKIT.js.gz +0 -0
  73. package/build/{runtime-chunk-O37H7LZI.js → runtime-chunk-USGQ26QU.js} +1 -1
  74. package/build/{runtime-chunk-O37H7LZI.js.br → runtime-chunk-USGQ26QU.js.br} +0 -0
  75. package/build/runtime-chunk-USGQ26QU.js.gz +0 -0
  76. package/build/{runtime-chunk-PEOLFGBX.js → runtime-chunk-YULW5JRE.js} +1 -1
  77. package/build/runtime-chunk-YULW5JRE.js.br +0 -0
  78. package/build/runtime-chunk-YULW5JRE.js.gz +0 -0
  79. package/build/{runtime-classicRuntime-T2PZUVVV.js → runtime-classicRuntime-U672GAGM.js} +1 -1
  80. package/build/runtime-classicRuntime-U672GAGM.js.br +0 -0
  81. package/build/runtime-classicRuntime-U672GAGM.js.gz +0 -0
  82. package/build/{runtime-cloners-TRZ7JQLO.js → runtime-cloners-2AC7OZRC.js} +1 -1
  83. package/build/runtime-cloners-2AC7OZRC.js.br +0 -0
  84. package/build/runtime-cloners-2AC7OZRC.js.gz +0 -0
  85. package/build/{runtime-components-VZOXPM65.js → runtime-components-L63NUGAO.js} +1 -1
  86. package/build/runtime-components-L63NUGAO.js.br +0 -0
  87. package/build/runtime-components-L63NUGAO.js.gz +0 -0
  88. package/build/{runtime-createDestroy-AXHU4HXJ.js → runtime-createDestroy-QHHQ6LYS.js} +1 -1
  89. package/build/runtime-createDestroy-QHHQ6LYS.js.br +0 -0
  90. package/build/runtime-createDestroy-QHHQ6LYS.js.gz +0 -0
  91. package/build/{runtime-dragDrop-CKSSHBJ2.js → runtime-dragDrop-YBSWK3ET.js} +1 -1
  92. package/build/runtime-dragDrop-YBSWK3ET.js.br +0 -0
  93. package/build/runtime-dragDrop-YBSWK3ET.js.gz +0 -0
  94. package/build/{runtime-gameControls-Y42GYPNR.js → runtime-gameControls-DSJRSTW5.js} +1 -1
  95. package/build/runtime-gameControls-DSJRSTW5.js.br +0 -0
  96. package/build/runtime-gameControls-DSJRSTW5.js.gz +0 -0
  97. package/build/{runtime-hair-FXERW4BM.js → runtime-hair-V4RTCES2.js} +1 -1
  98. package/build/runtime-hair-V4RTCES2.js.br +2 -0
  99. package/build/runtime-hair-V4RTCES2.js.gz +0 -0
  100. package/build/{runtime-mergeStaticGeometries-7CWREJDS.js → runtime-mergeStaticGeometries-VXENKMD4.js} +1 -1
  101. package/build/runtime-mergeStaticGeometries-VXENKMD4.js.br +0 -0
  102. package/build/runtime-mergeStaticGeometries-VXENKMD4.js.gz +0 -0
  103. package/build/{runtime-miscActions-UBT3FDIC.js → runtime-miscActions-RPUPHHGJ.js} +1 -1
  104. package/build/runtime-miscActions-RPUPHHGJ.js.br +0 -0
  105. package/build/runtime-miscActions-RPUPHHGJ.js.gz +0 -0
  106. package/build/{runtime-mouseHover-GDKHMRYT.js → runtime-mouseHover-HG6AHA2L.js} +1 -1
  107. package/build/runtime-mouseHover-HG6AHA2L.js.br +0 -0
  108. package/build/runtime-mouseHover-HG6AHA2L.js.gz +0 -0
  109. package/build/{runtime-particles-H6ZGTDQ3.js → runtime-particles-ZHE2MC33.js} +1 -1
  110. package/build/runtime-particles-ZHE2MC33.js.br +0 -0
  111. package/build/runtime-particles-ZHE2MC33.js.gz +0 -0
  112. package/build/{runtime-paths-HN53AEBL.js → runtime-paths-GN6E6ZYL.js} +1 -1
  113. package/build/runtime-paths-GN6E6ZYL.js.br +0 -0
  114. package/build/runtime-paths-GN6E6ZYL.js.gz +0 -0
  115. package/build/{runtime-resize-TUVUJVJY.js → runtime-resize-LACR4RFK.js} +1 -1
  116. package/build/runtime-resize-LACR4RFK.js.br +0 -0
  117. package/build/runtime-resize-LACR4RFK.js.gz +0 -0
  118. package/build/{runtime-sceneTransition-DTM34VVE.js → runtime-sceneTransition-QLPFYHHY.js} +1 -1
  119. package/build/runtime-sceneTransition-QLPFYHHY.js.br +0 -0
  120. package/build/runtime-sceneTransition-QLPFYHHY.js.gz +0 -0
  121. package/build/{runtime-scroll-AFN3LCAC.js → runtime-scroll-WZZBT2XR.js} +1 -1
  122. package/build/runtime-scroll-WZZBT2XR.js.br +0 -0
  123. package/build/runtime-scroll-WZZBT2XR.js.gz +0 -0
  124. package/build/runtime-shapeBlends-O6ATLCCA.js +1 -0
  125. package/build/runtime-shapeBlends-O6ATLCCA.js.br +0 -0
  126. package/build/runtime-shapeBlends-O6ATLCCA.js.gz +0 -0
  127. package/build/{runtime-text-HV7E4TSW.js → runtime-text-UADJSRL4.js} +1 -1
  128. package/build/runtime-text-UADJSRL4.js.br +0 -0
  129. package/build/runtime-text-UADJSRL4.js.gz +0 -0
  130. package/build/{runtime-textInputs-77LAXHNH.js → runtime-textInputs-7U3TTJ4X.js} +1 -1
  131. package/build/runtime-textInputs-7U3TTJ4X.js.br +0 -0
  132. package/build/runtime-textInputs-7U3TTJ4X.js.gz +0 -0
  133. package/build/runtime-timeline-JXKHKUAC.js +1 -0
  134. package/build/runtime-timeline-JXKHKUAC.js.br +0 -0
  135. package/build/runtime-timeline-JXKHKUAC.js.gz +0 -0
  136. package/build/{runtime-tracking-XZCI3RKR.js → runtime-tracking-MC74576T.js} +1 -1
  137. package/build/runtime-tracking-MC74576T.js.br +0 -0
  138. package/build/runtime-tracking-MC74576T.js.gz +0 -0
  139. package/build/{runtime-transitions-SBVQ7DIZ.js → runtime-transitions-S22YS7E6.js} +1 -1
  140. package/build/runtime-transitions-S22YS7E6.js.br +0 -0
  141. package/build/runtime-transitions-S22YS7E6.js.gz +0 -0
  142. package/build/{runtime-ui2d-KEK4JA3H.js → runtime-ui2d-EX3RBXPP.js} +1 -1
  143. package/build/runtime-ui2d-EX3RBXPP.js.br +0 -0
  144. package/build/runtime-ui2d-EX3RBXPP.js.gz +0 -0
  145. package/build/{runtime-vectorShapes-U7BI3CMD.js → runtime-vectorShapes-J5Y3LMND.js} +1 -1
  146. package/build/runtime-vectorShapes-J5Y3LMND.js.br +0 -0
  147. package/build/runtime-vectorShapes-J5Y3LMND.js.gz +0 -0
  148. package/build/{runtime-webgpu-3QIPQDJ4.js → runtime-webgpu-LDZ3N2D5.js} +1 -1
  149. package/build/runtime-webgpu-LDZ3N2D5.js.br +0 -0
  150. package/build/runtime-webgpu-LDZ3N2D5.js.gz +0 -0
  151. package/build/runtime.cjs +102 -102
  152. package/build/runtime.js +1 -1
  153. package/build/runtime.js.br +0 -0
  154. package/build/runtime.js.gz +0 -0
  155. package/build/runtime.standalone.js +1 -1
  156. package/build/runtime.standalone.js.br +0 -0
  157. package/build/runtime.standalone.js.gz +0 -0
  158. package/build/runtime.standalone.webgl.js +1 -1
  159. package/build/runtime.standalone.webgl.js.br +0 -0
  160. package/build/runtime.standalone.webgl.js.gz +0 -0
  161. package/build/runtime.standalone.webgpu.js +1 -1
  162. package/build/runtime.standalone.webgpu.js.br +0 -0
  163. package/build/runtime.standalone.webgpu.js.gz +0 -0
  164. package/build/runtime.standalone.webgpu.micro.js +1 -1
  165. package/build/runtime.standalone.webgpu.micro.js.br +0 -0
  166. package/build/runtime.standalone.webgpu.micro.js.gz +0 -0
  167. package/build/runtime.standalone.webgpu.min.js +1 -1
  168. package/build/runtime.standalone.webgpu.min.js.br +0 -0
  169. package/build/runtime.standalone.webgpu.min.js.gz +0 -0
  170. package/package.json +1 -1
  171. package/build/runtime-chunk-3LIYAJXD.js.br +0 -0
  172. package/build/runtime-chunk-3LIYAJXD.js.gz +0 -0
  173. package/build/runtime-chunk-4DM3XFSJ.js +0 -1
  174. package/build/runtime-chunk-4DM3XFSJ.js.br +0 -0
  175. package/build/runtime-chunk-4DM3XFSJ.js.gz +0 -0
  176. package/build/runtime-chunk-5P3HUPT4.js.br +0 -0
  177. package/build/runtime-chunk-5P3HUPT4.js.gz +0 -0
  178. package/build/runtime-chunk-72GELULA.js.gz +0 -0
  179. package/build/runtime-chunk-BHBI2VFL.js.br +0 -0
  180. package/build/runtime-chunk-BHBI2VFL.js.gz +0 -0
  181. package/build/runtime-chunk-BR3T7PBD.js.br +0 -0
  182. package/build/runtime-chunk-BR3T7PBD.js.gz +0 -0
  183. package/build/runtime-chunk-DCPBSRSM.js.br +0 -0
  184. package/build/runtime-chunk-DCPBSRSM.js.gz +0 -0
  185. package/build/runtime-chunk-E3ZOKGVW.js.br +0 -0
  186. package/build/runtime-chunk-E3ZOKGVW.js.gz +0 -0
  187. package/build/runtime-chunk-EKVJUEYP.js.br +0 -0
  188. package/build/runtime-chunk-EKVJUEYP.js.gz +0 -0
  189. package/build/runtime-chunk-H7J7NLSC.js.br +0 -0
  190. package/build/runtime-chunk-H7J7NLSC.js.gz +0 -0
  191. package/build/runtime-chunk-HDFBDUFX.js +0 -1
  192. package/build/runtime-chunk-HDFBDUFX.js.br +0 -0
  193. package/build/runtime-chunk-HDFBDUFX.js.gz +0 -0
  194. package/build/runtime-chunk-ITMHVNES.js.br +0 -0
  195. package/build/runtime-chunk-ITMHVNES.js.gz +0 -0
  196. package/build/runtime-chunk-JVRISZP3.js.br +0 -0
  197. package/build/runtime-chunk-JVRISZP3.js.gz +0 -0
  198. package/build/runtime-chunk-LX7POLY3.js.br +0 -0
  199. package/build/runtime-chunk-LX7POLY3.js.gz +0 -0
  200. package/build/runtime-chunk-NPNRGCX3.js.br +0 -0
  201. package/build/runtime-chunk-NPNRGCX3.js.gz +0 -0
  202. package/build/runtime-chunk-O37H7LZI.js.gz +0 -0
  203. package/build/runtime-chunk-O5TGJH3R.js.br +0 -0
  204. package/build/runtime-chunk-O5TGJH3R.js.gz +0 -0
  205. package/build/runtime-chunk-PEOLFGBX.js.br +0 -0
  206. package/build/runtime-chunk-PEOLFGBX.js.gz +0 -0
  207. package/build/runtime-chunk-QPWV26TX.js.br +0 -0
  208. package/build/runtime-chunk-QPWV26TX.js.gz +0 -0
  209. package/build/runtime-chunk-RDQUMMBI.js.br +0 -0
  210. package/build/runtime-chunk-RDQUMMBI.js.gz +0 -0
  211. package/build/runtime-chunk-SBMXYV5Q.js.br +0 -0
  212. package/build/runtime-chunk-SBMXYV5Q.js.gz +0 -0
  213. package/build/runtime-chunk-TONK22EB.js.br +0 -0
  214. package/build/runtime-chunk-TONK22EB.js.gz +0 -0
  215. package/build/runtime-chunk-UYADWI5Q.js.br +0 -0
  216. package/build/runtime-chunk-UYADWI5Q.js.gz +0 -0
  217. package/build/runtime-chunk-WZWD2YIG.js.br +0 -0
  218. package/build/runtime-chunk-WZWD2YIG.js.gz +0 -0
  219. package/build/runtime-chunk-XL37JGAH.js.br +0 -0
  220. package/build/runtime-chunk-XL37JGAH.js.gz +0 -0
  221. package/build/runtime-chunk-XYRJFDFM.js.br +0 -0
  222. package/build/runtime-chunk-XYRJFDFM.js.gz +0 -0
  223. package/build/runtime-classicRuntime-T2PZUVVV.js.br +0 -0
  224. package/build/runtime-classicRuntime-T2PZUVVV.js.gz +0 -0
  225. package/build/runtime-cloners-TRZ7JQLO.js.br +0 -0
  226. package/build/runtime-cloners-TRZ7JQLO.js.gz +0 -0
  227. package/build/runtime-components-VZOXPM65.js.br +0 -0
  228. package/build/runtime-components-VZOXPM65.js.gz +0 -0
  229. package/build/runtime-createDestroy-AXHU4HXJ.js.br +0 -0
  230. package/build/runtime-createDestroy-AXHU4HXJ.js.gz +0 -0
  231. package/build/runtime-dragDrop-CKSSHBJ2.js.br +0 -0
  232. package/build/runtime-dragDrop-CKSSHBJ2.js.gz +0 -0
  233. package/build/runtime-gameControls-Y42GYPNR.js.br +0 -0
  234. package/build/runtime-gameControls-Y42GYPNR.js.gz +0 -0
  235. package/build/runtime-hair-FXERW4BM.js.br +0 -2
  236. package/build/runtime-hair-FXERW4BM.js.gz +0 -0
  237. package/build/runtime-mergeStaticGeometries-7CWREJDS.js.br +0 -0
  238. package/build/runtime-mergeStaticGeometries-7CWREJDS.js.gz +0 -0
  239. package/build/runtime-miscActions-UBT3FDIC.js.br +0 -0
  240. package/build/runtime-miscActions-UBT3FDIC.js.gz +0 -0
  241. package/build/runtime-mouseHover-GDKHMRYT.js.br +0 -0
  242. package/build/runtime-mouseHover-GDKHMRYT.js.gz +0 -0
  243. package/build/runtime-particles-H6ZGTDQ3.js.br +0 -0
  244. package/build/runtime-particles-H6ZGTDQ3.js.gz +0 -0
  245. package/build/runtime-paths-HN53AEBL.js.br +0 -0
  246. package/build/runtime-paths-HN53AEBL.js.gz +0 -0
  247. package/build/runtime-resize-TUVUJVJY.js.br +0 -0
  248. package/build/runtime-resize-TUVUJVJY.js.gz +0 -0
  249. package/build/runtime-sceneTransition-DTM34VVE.js.br +0 -0
  250. package/build/runtime-sceneTransition-DTM34VVE.js.gz +0 -0
  251. package/build/runtime-scroll-AFN3LCAC.js.br +0 -0
  252. package/build/runtime-scroll-AFN3LCAC.js.gz +0 -0
  253. package/build/runtime-shapeBlends-DOVFXT5Z.js +0 -1
  254. package/build/runtime-shapeBlends-DOVFXT5Z.js.br +0 -0
  255. package/build/runtime-shapeBlends-DOVFXT5Z.js.gz +0 -0
  256. package/build/runtime-text-HV7E4TSW.js.br +0 -0
  257. package/build/runtime-text-HV7E4TSW.js.gz +0 -0
  258. package/build/runtime-textInputs-77LAXHNH.js.br +0 -0
  259. package/build/runtime-textInputs-77LAXHNH.js.gz +0 -0
  260. package/build/runtime-timeline-GUSMJD46.js +0 -1
  261. package/build/runtime-timeline-GUSMJD46.js.br +0 -0
  262. package/build/runtime-timeline-GUSMJD46.js.gz +0 -0
  263. package/build/runtime-tracking-XZCI3RKR.js.br +0 -0
  264. package/build/runtime-tracking-XZCI3RKR.js.gz +0 -0
  265. package/build/runtime-transitions-SBVQ7DIZ.js.br +0 -0
  266. package/build/runtime-transitions-SBVQ7DIZ.js.gz +0 -0
  267. package/build/runtime-ui2d-KEK4JA3H.js.br +0 -0
  268. package/build/runtime-ui2d-KEK4JA3H.js.gz +0 -0
  269. package/build/runtime-vectorShapes-U7BI3CMD.js.br +0 -0
  270. package/build/runtime-vectorShapes-U7BI3CMD.js.gz +0 -0
  271. package/build/runtime-webgpu-3QIPQDJ4.js.br +0 -0
  272. package/build/runtime-webgpu-3QIPQDJ4.js.gz +0 -0
@@ -1 +1 @@
1
- import{h as t}from"./runtime-chunk-2PT2WH66.js";import{g as e}from"./runtime-chunk-4KZXQGUQ.js";import{c as i}from"./runtime-chunk-TZCHGFVF.js";import{Ba as r,C as s,Ca as a,Ea as n,K as o,j as l,k as h,l as p,o as d}from"./runtime-chunk-VPEJ5BFD.js";import{$c as c,Cc as u,Ec as m,Fc as f,Kd as y,Oc as g,Pc as v,Pd as x,Rc as S,Re as w,Xc as M,bd as b,cd as B,dd as P,kd as E,ld as A}from"./runtime-chunk-VGN7YHB7.js";var C={Cloner:null,changeEntityProptotype:()=>{},createEntity:()=>{}};function D(t,e){let i=[];if(e.length!==t.length)return null;{let r=0;for(;r<t.length;){if("*"===e[r])i.push(t[r]);else if(t[r]!==e[r])return null;r+=1}}return i}function O(t,e){let i=[];if(!(e.length<=t.length))return null;{let r=0;for(;r<e.length;){if("*"===e[r])i.push(t[r]);else if(t[r]!==e[r])return null;r+=1}}return i}var V=new f,W=new f,_=new g,T=[new f(-1,1,1),new f(-1,-1,1),new f(1,-1,1),new f(1,1,1),new f(-1,1,-1),new f(-1,-1,-1),new f(1,-1,-1),new f(1,1,-1)],U=[[0,3],[1,2],[5,6],[4,7],[0,1],[3,2],[7,6],[4,5],[0,4],[1,5],[2,6],[3,7]],R=[[0,2],[7,5],[4,1],[3,6],[4,3],[1,6]],z=(t,e,i)=>{t.updateEntityBoxSize(V,W),_.copy(e).multiply(t.matrixWorld),0===W.x&&0===W.y&&0===W.z?i.push(new f(V.x,V.y,V.z).applyMatrix4(_)):T.forEach(t=>{i.push(t.clone().multiply(W).add(V).applyMatrix4(_))})},I=class extends M{constructor(){super(...arguments),this.matrix=new g,this.vertices=[],this.faces=[],this.edges=[],this.centerEdges=[]}copy(t){return super.copy(t),this.matrix.copy(t.matrix),this.vertices=t.vertices.map(t=>t.clone()),this.faces=t.faces.map(t=>t.clone()),this.edges=t.edges.map(t=>t.clone()),this.centerEdges=t.centerEdges.map(t=>t.clone()),this}setFromObjectSize(t,e=!1){t.updateWorldMatrix(!1,e),this.makeEmpty(),this.matrix.copy(t.matrixWorld);let i=(new g).copy(t.matrixWorld).invert();return this.expandByObjectSize(t,i,e)}expandByObjectSize(t,e,i=!1){let r=[];if(!0===i){let i=[];t.traverseEntity(t=>{if(t.visible||t.cloner&&t.data.visible){if(!("geometry"in t))return _.copy(e).multiply(t.matrixWorld),void i.push((new f).applyMatrix4(_));z(t,e,r)}}),0===r.length&&r.push(...i)}else z(t,e,r);return this.setFromPoints(r)}getCenter(t){return(t=super.getCenter(t)).applyMatrix4(this.matrix),t}getPositionToCenter(t){return(t=super.getCenter(t)).applyMatrix4(_.copy(this.matrix).setPosition(0,0,0)),t}computeVertices(){this.getSize(W).multiplyScalar(.5),this.getCenter(V),_.copy(this.matrix).setPosition(V),this.vertices=T.map(t=>t.clone().multiply(W).applyMatrix4(_))}computeEdges(){this.vertices.length>0&&this.computeVertices(),this.edges=U.map(([t,e])=>new w(this.vertices[t],this.vertices[e])),this.centerEdges=this.edges.map(t=>t.getCenter(new f))}computeFaces(){this.vertices.length>0&&this.computeVertices(),this.faces=R.map(([t,e])=>this.vertices[t].clone().add(this.vertices[e]).multiplyScalar(.5))}},L=new f,N=new f,F=new f,j=new f,k=new f,q=new f,G=new g,H=1e-12,K=.01;function X(t){let e=t.elements;L.set(e[0],e[1],e[2]),N.set(e[4],e[5],e[6]),F.set(e[8],e[9],e[10])}function Z(){let t=Math.max(L.lengthSq(),N.lengthSq(),F.lengthSq());L.lengthSq()>H*t?j.copy(L).normalize():j.set(1,0,0),k.crossVectors(F,j),k.lengthSq()<=H*t&&(k.copy(N).addScaledVector(j,-N.dot(j)),k.lengthSq()<=H*t&&function(t,e){t.set(1,0,0).cross(e),t.lengthSq()<=H&&t.set(0,1,0).cross(e),t.normalize()}(k,j)),k.normalize(),q.crossVectors(j,k)}function Q(t){return X(t),Z(),G.makeBasis(j,k,q)}var Y,$=new g;(Y||(Y={})).is=function(t){return t&&t.__isSPEObject};var J=t=>class extends t{constructor(){super(...arguments),this.previousModelViewMatrix=new g,this.copyPreviousMatrix=!0,this.hiddenMatrix=new g,this.pivotMatrix=new g,this.matrixWorldRigid=new g,this.shearScale=new g,this.shearScaleInv=new g}get __isSPEObject(){return!0}getPhysicsLocalMatrix(t){return!!this.rigidBody?.isDynamic()&&(t.copy(this.matrixWorld),this.hasNonUniformScale&&t.multiply(this.shearScaleInv),this.parent&&t.premultiply($.copy(this.parent.matrixWorld).invert()),t.premultiply($.copy(this.hiddenMatrix).invert()),t.multiply($.copy(this.pivotMatrix).invert()),!0)}isDescendantOf(t){t instanceof S&&(t=t.uuid);let e=this;for(;e.parent;){if(e.parent.uuid===t)return!0;e=e.parent}return!1}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.multiplyMatrices(this.hiddenMatrix,this.matrix):(this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.hiddenMatrix),this.matrixWorld.multiplyMatrices(this.matrixWorld,this.matrix)),this.matrixWorld.multiply(this.pivotMatrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(let e of this.children)e.updateMatrixWorld(t)}updateWorldMatrix(t,e){let i=this.parent;if(t&&null!==i&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.multiplyMatrices(this.hiddenMatrix,this.matrix):(this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.hiddenMatrix),this.matrixWorld.multiplyMatrices(this.matrixWorld,this.matrix)),this.matrixWorld.multiply(this.pivotMatrix),e)for(let t of this.children)t.updateWorldMatrix(!1,!0)}traverseChildren(t,e=0){for(let i of this.children)Y.is(i)&&i.traverseObject(t,e+1)}traverseObject(t,e=0){if(!0!==t(this,e))for(let i of this.children)Y.is(i)&&i.traverseObject(t,e+1)}updateMatrixWorldRigid(){this.hasNonUniformScale=function(t,e,i){return X(t),Z(),e.makeBasis(j,k,q),i.set(j.dot(L),j.dot(N),j.dot(F),0,k.dot(L),k.dot(N),k.dot(F),0,q.dot(L),q.dot(N),q.dot(F),0,0,0,0,1),function(){let t=L.length(),e=N.length(),i=F.length(),r=Math.max(t,e,i);if(r-t>K||r-e>K||r-i>K)return!0;let s=K*r*r;return Math.abs(L.dot(N))>s||Math.abs(L.dot(F))>s||Math.abs(N.dot(F))>s}()}(this.matrixWorld,this.matrixWorldRigid,this.shearScale),this.matrixWorldRigid.copyPosition(this.matrixWorld),this.shearScaleInv.copy(this.shearScale).invert()}attach(t,e){this.updateWorldMatrix(!0,!1);let i=(new g).copy(this.matrixWorld).invert();return null!==t.parent&&(t.parent.updateWorldMatrix(!0,!1),i.multiply(t.parent.matrixWorld)),"hiddenMatrix"in t&&t.hiddenMatrix instanceof g?t.hiddenMatrix.premultiply(i):t.applyMatrix4(i),t.updateWorldMatrix(!1,!1),this.add(t),void 0!==e&&(this.children.pop(),this.children.splice(e,0,t)),this}copy(t,e=!1){return super.copy(t,e),this.hasNonUniformScale=t.hasNonUniformScale,this}onAfterRender(t,e,i,r,s,a){this.copyPreviousMatrix&&this.previousModelViewMatrix.copy(this.modelViewMatrix)}},tt=class extends x{constructor(){super()}getPoints(t=12){let e,i=[],r=this.getCurveLengths(),s=r[r.length-1]/r.length;for(let a=0,n=this.curves;a<n.length;a++){let o=n[a],l=0===a?r[a]:r[a]-r[a-1],h=Math.ceil(t*l/s),p=o.getPoints(h);for(let t=0;t<p.length;t++){let r=p[t];e&&e.equals(r)||(i.push(r),e=r)}}return this.autoClose&&i.length>1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i}},et=.001,it=new f,rt=new f,st=new f,at=new f,nt=new f,ot=new f,lt=new f,ht=new f,pt=new f;function dt(t,e,i){return it.subVectors(e,t),rt.subVectors(e,i),it.cross(rt).length()<=et}var ct,ut=new WeakMap;function mt(t){let e=ut.get(t.points);if(void 0!==e&&e.isClosed===t.isClosed)return e.curve;let i=function(t){let e=t.points,i=[e[0]],r=[new f(...e[0].data.position)];st.copy(r[0]);for(let t=0;t<e.length-1;t++)it.fromArray(e[t].data.position),rt.fromArray(e[t+1].data.position),nt.subVectors(it,st),lt.subVectors(it,rt),nt.cross(lt).length()>et&&(i.push(e[t]),r.push((new f).copy(it)),st.copy(it));let s=e[e.length-1];i.push(s),r.push(new f(...s.data.position));let a=t.isClosed,n=i.length-(a?0:1),o=i.length,l=[],h=[];for(let t=0;t<o;t++){let e=i[t].data;l.push(new f(...e.controlPrevious.position)),h.push(new f(...e.controlNext.position))}let p=[];for(let t=0;t<n;t++){let e=t===o-1?0:t+1;p.push(dt(r[t],h[t],r[e])&&dt(r[t],l[e],r[e]))}let d=[];for(let t=0;t<o;t++){let e=i[t].data,s=r[t],n={position:s,prevDir:void 0,nextDir:void 0,controlPrevious:l[t],controlNext:h[t],tan:void 0,baseRoundness:e.roundness,removedLength:0};if(d.push(n),0===e.roundness||!a&&(0===t||t===o-1))continue;let c=a&&0==t?o-1:t-1,u=a&&t==o-1?0:t+1,m=(new f).subVectors(r[c],s).normalize(),y=(new f).subVectors(r[u],s).normalize();n.prevDir=m,n.nextDir=y;let g=p[a&&0===t?o-1:t-1],v=p[t];if(g&&v){at.addVectors(m,y).normalize();let t=st.crossVectors(at,m).length()/m.dot(at);n.tan=t,n.removedLength=e.roundness/t}}for(let t=0;t<n;t++){let e=a&&t===o-1?0:t+1,i=d[t],r=d[e];if(0!==i.removedLength||0!==r.removedLength){let t=i.position.distanceTo(r.position);i.removedLength=Math.min(i.removedLength,t/2),r.removedLength=Math.min(r.removedLength,t/2)}}let c=new Array(2*o).fill(null);for(let t=0;t<n;t++){let e=a&&t===o-1?0:t+1,i=d[t],r=d[e],s=null;if(p[t]){let t=i.position.clone(),e=r.position.clone();(0!==i.removedLength||0!==r.removedLength)&&(i.nextDir&&t.add(st.copy(i.nextDir).setLength(i.removedLength)),r.prevDir&&e.add(st.copy(r.prevDir).setLength(r.removedLength))),t.distanceTo(e)>et&&(s=new y(t,t.clone().lerp(e,.3),e.clone().lerp(t,.3),e))}else i.position.distanceTo(r.position)>et&&(s=new y(i.position,i.controlNext,r.controlPrevious,r.position));c[2*t+1]=s}for(let t=0;t<o;t++){let e=d[t];if(0===e.removedLength)continue;let i=e.position,r=e.prevDir.clone().multiplyScalar(e.removedLength).add(i),s=e.nextDir.clone().multiplyScalar(e.removedLength).add(i),a=e.tan*e.removedLength;at.addVectors(e.prevDir,e.nextDir).normalize(),nt.copy(r).lerp(s,.5);let n=r.distanceTo(s)/2;pt.copy(at).multiplyScalar(Math.sqrt(Math.pow(a,2)-Math.pow(n,2))).add(nt),ot.copy(at).multiplyScalar(-a).add(pt);let o=i.distanceTo(ot)/i.distanceTo(nt);lt.copy(e.prevDir).multiplyScalar(o*i.distanceTo(r)).add(i),ht.copy(lt).lerp(ot,2);let l=r.clone().lerp(lt,4/3),h=s.clone().lerp(ht,4/3);c[2*t]=new y(r,l,h,s)}let u=new tt;for(let t=0;t<c.length;t++){let e=c[t];e&&u.add(e)}return u}(t);return ut.set(t.points,{isClosed:t.isClosed,curve:i}),i}(ct||(ct={})).is=function(t){return t&&t.__isEntity};var ft=t=>ct.is(t),yt={type:"completeState",isfromEntity:!0},gt=["x","y","z"],vt=new f,xt=new f(1,1,1),St=new m,wt=new v,Mt=(new f).set(0,1,0),bt=new g,Bt=new g,Pt=c=>class extends(J(c)){constructor(){super(...arguments),this.raycastLock=!1,this.scaleLock=!1,this.disposed=!1,this.stateSelection=null,this.destroyedInAction=!1,this.instances=[],this.prevState=null,this.currentState=null,this.currentAnimationAction=null,this.reversibleToState=null,this.currentTransitionEvent=null,this.previousAction=null,this._singleBBox=new I,this._recursiveBBox=new I,this.singleBBoxNeedsUpdate=!0,this.recursiveBBoxNeedsUpdate=!0,this._needApplyPathSnapping=!0,this.attachedPaths=new Set}get __isEntity(){return!0}entityChildren(t){let e=this.children[t];if(ct.is(e))return e}entityChildrenCount(){let t=this.children.length;for(;t--;)if(ct.is(this.children[t]))return t+1;return 0}get isConcreteEntity(){return"string"==typeof this.identity}get isVirtualEntity(){return"string"!=typeof this.identity}get isInstanceRoot(){return this.isConcreteEntity&&"Instance"===this.data.type}nearestInstanceSelfOrParent(){let t=this;for(;"Instance"!==t.data.type;){let e=t.parent;if(!ct.is(e))return;t=e}return t}forInstancesRec(t){this.instances.forEach(e=>{e.disposed||t(e),e.forInstancesRec(t)})}super_Entity(t,e){"string"==typeof t&&(this.uuid=t),this.identity=t,this.data=e,this.matrixAutoUpdate=!1,this.dataPatched=this.data}changeSelectedState(t,e,i=!1){if(0!==this.data.states.length||i){for(let t of this.data.states)n.toOps(this.data,t.data).forEach(t=>{let i=h.replaceProps(t,this.data);this.dataPatched=this.data,this.updateByPatchedOp(i,this.data,e)});if(null!==t){let i=this.data.states.data(t);i&&(this.dataPatched=n.patch(this.data,i),n.toOps(this.data,i).forEach(t=>{this.updateByPatchedOp(t,this.dataPatched,e)}))}i&&this.updateTransformState(this.dataPatched,e),this.stateSelection=t,this.updatePathSnapping(this.dataPatched.pathSnapping)}}get singleBBox(){return this.singleBBoxNeedsUpdate&&(this.singleBBoxNeedsUpdate=!1,this._singleBBox.setFromObjectSize(this,!1),this._singleBBox.computeVertices(),this._singleBBox.computeEdges(),this._singleBBox.computeFaces()),this._singleBBox}get recursiveBBox(){return this.recursiveBBoxNeedsUpdate&&(this.recursiveBBoxNeedsUpdate=!1,this._recursiveBBox.setFromObjectSize(this,!0),this._recursiveBBox.computeVertices(),this._recursiveBBox.computeEdges(),this._recursiveBBox.computeFaces()),this._recursiveBBox}updateEntityBoxSize(t,e){t.setScalar(0),e.setScalar(0)}resetBBoxNeedsUpdateSelf(){this.singleBBoxNeedsUpdate=!0,this.recursiveBBoxNeedsUpdate=!0}resetBBoxNeedsUpdate(){this.resetBBoxNeedsUpdateSelf(),this.traverseAncestors(t=>{ft(t)&&t.resetBBoxNeedsUpdateSelf()}),this.traverseEntity(t=>{t.resetBBoxNeedsUpdateSelf()})}find(t){let e;return this.traverseEntity(i=>{i.uuid===t&&(e=i)}),e}traverseSortNextHelper(){let t=this.parent;if(t){let e=t.children,i=e.indexOf(this)+1;if(ct.is(e[i]))return e[i];if(ct.is(t))return t.traverseSortNextHelper()}}sortNext(){let t=this.children;return this.children.length>0&&ct.is(this.children[0])?t[0]:this.traverseSortNextHelper()}goUp(t){let e=this;for(;t>0&&null!==e;)e=e.parent,t-=1;return e}hasAnccestorOrSelf(t){return this===t||this.hasAnccestor(t)}hasAnccestor(t){let e=this.parent;for(;e;){if(t===e)return!0;e=e.parent}return!1}countToAccestor(t){let e=0,i=this;for(;i!==t;){if(null===i)return-1;i=i.parent,e+=1}return e}forEachEntity(t){for(let e of this.children)ft(e)&&t(e)}traverseEntityAncestors(t){this.traverseAncestors(e=>{ct.is(e)&&t(e)})}traverseConcreteEntity(t,e=0){if(!0!==t(this,e))for(let i of this.children)ft(i)&&i.isConcreteEntity&&i.traverseEntity(t,e+1)}traverseEntity(t,e=0){if(!0!==t(this,e))for(let i of this.children)ft(i)&&i.traverseEntity(t,e+1)}traverseVisibleEntity(t){t(this);for(let e of this.children)ft(e)&&e.visible&&e.traverseVisibleEntity(t)}updateMatrix(){super.updateMatrix(),this.cloner&&this.cloner.onObjUpdateMatrix(),this.dispatchEvent({type:"updateMatrix"})}updateMatrixWorld(t){super.updateMatrixWorld(t),this.dispatchEvent({type:"updateMatrixWorld"})}copy(t,e=!1){return super.copy(t,e),this.dataPatched=t.dataPatched,this.raycastLock=t.raycastLock,this.scaleLock=t.scaleLock,this.hiddenMatrix.copy(t.hiddenMatrix),this}hasEntityChild(){return this.children.some(t=>ft(t))}isAncestorOf(t){if(this.uuid===t)return!1;let e=!1;return this.traverseEntity(i=>{i.uuid===t&&(e=!0)}),e}toObjectTransformState(t=[]){this.updateWorldMatrix(!0,!1);let i={position:this.position.toArray(),rotation:[this.rotation.x*u.RAD2DEG,this.rotation.y*u.RAD2DEG,this.rotation.z*u.RAD2DEG],scale:this.scale.toArray(),hiddenMatrix:this.hiddenMatrix.toArray(),pivot:[0,0,0],pivotRotation:[0,0,0]};return e(i,t)}getTransformValues(t,e,i){return e[t].map((e,r)=>i?.shared.getVariable(e,[this.uuid,t,gt[r]])??e)}updateTransformState(t,e){let i=!1;if(t.position&&(this.position.fromArray(this.getTransformValues("position",t,e)),i=!0),t.rotation&&(vt.fromArray(this.getTransformValues("rotation",t,e)).multiplyScalar(u.DEG2RAD),this.rotation.setFromVector3(vt),i=!0),t.scale&&(this.scale.fromArray(this.getTransformValues("scale",t,e)),i=!0),void 0!==t.hiddenMatrix&&(i=!0,this.hiddenMatrix.fromArray(t.hiddenMatrix??s.identity)),void 0!==t.pivot||void 0!==t.pivotRotation)if(i=!0,void 0!==t.pivot&&void 0!==t.pivotRotation)this.pivotMatrix.compose(vt.fromArray(t.pivot).negate(),St.setFromEuler(wt.fromArray(t.pivotRotation.map(t=>t*u.DEG2RAD))).invert(),xt);else if(void 0!==t.pivot)this.pivotMatrix.setPosition(-t.pivot[0],-t.pivot[1],-t.pivot[2]);else if(void 0!==t.pivotRotation){let e=vt.setFromMatrixPosition(this.pivotMatrix);St.setFromEuler(wt.fromArray(t.pivotRotation.map(t=>t*u.DEG2RAD))).invert(),this.pivotMatrix.compose(e,St,xt)}return i&&(this.updateMatrix(),this.resetBBoxNeedsUpdate(),this.invalidateClonerTransform(this),this.traverseEntityAncestors(t=>{t.invalidateClonerTransform(this)})),t.position&&t.rotation&&t.scale&&void 0!==t.hiddenMatrix&&this.updateWorldMatrix(!1,!0),i}onVariableUpdate(t=!1){t?this.resetBBoxNeedsUpdate():(this.updateMatrix(),this.resetBBoxNeedsUpdate(),this.invalidateClonerTransform(this),this.traverseEntityAncestors(t=>{t.invalidateClonerTransform(this)}),this.requestRender())}dispose(){this.disposed=!0,this.cloner&&(this.cloner.dispose(),this.cloner=void 0)}disposeChildrenRecursively(){for(let t of this.children)ct.is(t)&&t.disposeRecursively()}disposeRecursively(){this.dispose(),this.children.forEach(t=>{ct.is(t)&&t.disposeRecursively()})}toState(t=[]){let i={name:this.name,visible:this.visible,raycastLock:this.raycastLock,...this.toObjectTransformState(t)};return e(i,t)}updateByObjUpdateOp(t,e){void 0!==t&&this.updateByOp({type:0,props:t,path:[]},{...this.data,...t},e,!1)}updateByOp(t,e,i,s){let o=this.data;this.data=e;let h=t,c=O(t.path,["states","*"]);if(null!==c){if(0===t.type){let[e]=c;if(this?.stateSelection===e){let e={...t.props};if(delete e.name,Object.values(t.props).some(t=>void 0===t)){let i=this.data;if(void 0!==i){let r=d.zoom(i,t.path.slice(2));if(r)for(let i in t.props)void 0===t.props[i]&&i in r&&(e[i]=r[i])}}h={...t,props:e,path:t.path.slice(2)}}}}else if(0===t.type){let e=this.stateSelection?this.data.states.data(this.stateSelection):void 0;if(void 0!==e){if(void 0!==t.props.name&&e.name){let{name:t,...i}=e;e=i}if(void 0!==t.props.material&&"material"in e){let{material:t,...i}=e;e=i}let i=d.removeOverridden(t.path,t.props,e);h={...t,props:i}}}if(this.updateByPatchedOpBase(h,n.patch(this.data,this.stateSelection?this.data.states.data(this.stateSelection):void 0),i),O(t.path,["overrides"])){let s=[],a=[...t.path];for(s.push(a[1]),a.splice(0,2);a.length>0&&"descendants"===a[0];)s.push(a[1]),a.splice(0,2);if(void 0===s[s.length-1]){if(0===t.type)for(let e of Object.keys(t.props)){s[s.length-1]=e;let r=i.scene.findInstance([this.uuid,...s]);r&&(r.overrideData=t.props[e],r.updateState(l.apply(r.component.data,r.overrideData),i))}}else{let n=i.scene.findInstance([this.uuid,...s]);if(n){let o=d.zoom(n.component.data,a);if(0===(t={...t,path:a}).type){let e=t.props;if(o)for(let[i,r]of Object.entries(t.props))void 0===r&&(e===t.props&&(e={...t.props}),e[i]=o[i]);t={...t,props:e}}n.overrideData=r.resolve(e.overrides,s),n.updateByOp(t,p.applySimple(n.data,t),i,!1)}}}else if(this.instances.length>0){let r;if(0===t.path.length&&0===t.type){let e;for(let i of a.rootOverrideProps)i in t.props&&(void 0===e&&(e={}),e[i]=t.props[i]);e&&(r={...t,props:e})}else for(let e of a.rootOverrideProps)if(O(t.path,[e])){r=t;break}void 0!==r&&this.instances.forEach(t=>{if(t.isInstanceRoot){let e=l.filterOp(t.overrideData,r);e&&t.updateByOp(e,p.applySimple(t.data,e),i,!0)}}),this.instances.forEach(r=>{if(!r.isInstanceRoot){let s=l.filterOp(r.overrideData,t);if(s){let a;a=o===r.data&&t===s?e:p.applySimple(r.data,s),r.updateByOp(s,a,i,!0)}}})}}updateByPatchedOpBase(t,e,i){if(this.dataPatched=e,0===t.path.length&&0===t.type)void 0!==t.props.type&&!o.is(t.props.type)&&C.changeEntityProptotype(this,e,i);else if(1===t.path.length&&"geometry"===t.path[0]&&0===t.type&&"type"in t.props){C.changeEntityProptotype(this,e,i);for(let t of this.children)ct.is(t)&&t.updateVisible(i.scene)}this.updateByPatchedOp(t,e,i)}updateByPatchedOp(t,e,i){if(0===t.path.length&&0===t.type?this.updateState(t.props,i):0===t.type&&("resolutionLevel"in t.props||"useChildrenColors"in t.props)&&this.updateState(e,i),"morphTargetInfluences"===t.path[0]&&0===t.type){let r=e.morphTargetInfluences.get(t.path[1])?.data.name;r&&this.updateMorphInfluences(r,i.shared.getVariable(t.props.value,[this.uuid,"morphTargetInfluences",r]))}if(null!==O(t.path,["pathSnapping"])&&this.updatePathSnapping(e.pathSnapping),null!==O(t.path,["cloner"])){let r=p.drop(t,1);0===r.path.length&&0===r.type&&!0===r.props.disabled?this.setFromClonerState(null,i):this.cloner?this.cloner.updateState(e.cloner,i):(this.setFromClonerState(e.cloner,i),this.expandCloner(i)),this.updateVisible(i.scene)}}updatePathSnapping(t=this.dataPatched.pathSnapping){this._updatedPathSnapping=t,this._needApplyPathSnapping=!0}get updatedPathSnapping(){return this._updatedPathSnapping}applyPathSnapping(t){if(!1===this._needApplyPathSnapping)return;let e=this._updatedPathSnapping?.pathId??this.dataPatched.pathSnapping.pathId,i=this._updatedPathSnapping?.slide??this.dataPatched.pathSnapping.slide??0,r=this._updatedPathSnapping?.offset??this.dataPatched.pathSnapping.offset??0,s=this._updatedPathSnapping?.orientation??this.dataPatched.pathSnapping.orientation;if(null===e)return;let a=t.find(e);if(!a)return;this._needApplyPathSnapping=!1;let n=a.data;if(n.geometry.path.points.length<=1)return;let o=mt(n.geometry.path),l=(i+r)%1;i+r===1&&0===l&&(l=1);let h=null;try{h=o.curves.length?o.getPointAt(l):null}catch(t){}if(null===h)return;a.updateMatrixWorld();let p=this.parent?bt.copy(this.parent.matrixWorld).invert():bt.identity();p.multiply(a.matrixWorld),h.applyMatrix4(p);let d={position:h.toArray(),rotation:n.rotation};if("tangential"===s){let t=Bt.extractRotation(a.matrixWorld),e=o.getTangentAt(l).applyMatrix4(t).add(h),i=Bt.lookAt(h,e,Mt),r=vt.setFromEuler(wt.setFromRotationMatrix(i)).multiplyScalar(u.RAD2DEG);d={...d,rotation:r.toArray()}}this.updateTransformState(d),this.traverseEntity(t=>{t._cameraType&&t.dispatchEvent(yt)})}updateVisible(t){if(this.visible=this.dataPatched.visible&&(!this.dataPatched.cloner||(this.dataPatched.cloner.disabled??!1)||!0!==this.dataPatched.cloner?.hideBase),!t)return;let e=!1;this.traverseEntity(t=>{if("Splat"===t.data.type)return e=!0,!0}),e&&t.reloadSplats()}updateState_Entity(t,e){void 0!==t.name&&(this.name=t.name),void 0!==t.raycastLock&&(this.raycastLock=t.raycastLock),void 0!==t.visible&&(this.updateVisible(e?.scene),this.resetBBoxNeedsUpdate()),e&&"cloner"in t&&void 0!==t.cloner&&(this.setFromClonerState(t.cloner,e),this.updateVisible(e.scene)),this.updateTransformState(t,e)}get attachedSurfaceCloners(){return this.children.filter(e=>t(e)&&"toObject"===e.parameters.type)}setFromClonerState(t,e){if(!this.disposed)if(null===t||t.disabled)this.cloner&&this.cloner.dispose(),this.cloner=void 0;else if(void 0===this.cloner){if(null===C.Cloner)return void i("cloners","a cloner");this.cloner=new C.Cloner(this,t),e.scene.addPendingExpandCloner(this)}else this.cloner.updateState(t,e)}expandCloner(t){!this.disposed&&this.cloner&&this.cloner.expandClones(t)}invalidateClonerTransform(t){this.cloner&&this.cloner.invalidateTransform(t)}requestRender(){this.dispatchEvent({type:"requestRender"})}},Et=class{static create(t){return this.build(this.normalizeInputs(t))}static normalizeInputs(t,e){let i=Object.assign({},e?.parameters??{width:100,revolutions:2,segments:40,pathRadius:10,pathType:0,pathSegments:30,cornerRadius:30,cornerSegments:4},t.parameters),r=Math.abs(i.width),s=Math.abs(i.height??r),a=Math.abs(i.depth??r),n=Math.abs(Math.min(r,a))/2;return{parameters:Object.assign(i,{width:r,height:s,depth:a,radius:n,segments:Math.round(i.segments),pathSegments:Math.round(i.pathSegments),cornerSegments:Math.round(i.cornerSegments)})}}static build(t){let{width:e,height:i,depth:r,radius:s,revolutions:a,segments:n,pathRadius:o,pathType:l,pathSegments:h,cornerRadius:p,cornerSegments:d}=t.parameters,c=new Vt(!1,e,i,r,s,a,n,o,l,h,p,d);return Object.assign(c,{userData:{...t,type:"HelixGeometry"}})}},At=new c([0,0,0],1);function Ct(t){return"TorusGeometry"===t.type&&360===t.arc}var Dt,Ot,Vt=class extends P{constructor(t=!0,e=1,i=1,r=1,s=1,a=1,n=1,o=1,l=1,h=1,p=1,d=1){if(super(),0===a)return;let c=t&&1===a;c&&(d=0),p>100&&(p=100),0===p&&(d=0);let u,m,y,g,v,x,S,w,M=()=>new f,B=new f,P=M(),E=M(),A=M(),C=M(),D=M(),O=M(),V=M(),W=M(),_=M(),T=M(),U=M(),R=i-2*o+.001,z=R/a,I=Math.ceil(n*a),L=I+1,N=R/I,F=-R/2,j=h+1,k=2*Math.PI/h,q=Math.PI/2/d,G=Math.min((1-p/100)*o,o-.01),H=o-G,K=0,X=2*d+2,Z=j*X/2,Q=Z+j*L,Y=Math.max(0,j*(L+X)),[$,J,tt]=[3,3,2].map(t=>Array(Y*t).fill(0)),et=[],it=s-o;function rt(e,i){let r=Math.PI/2;x=i*N,w=2*Math.PI*(x%z)/z+r,x+=F,S=Math.sin(w)*it,v=Math.cos(w)*it,t?e.set(v,S,x):e.set(v,x,S)}rt(B,-1e-10),rt(P,0),C.copy(B),rt(B,1);let st=B.distanceTo(P),at=c?0:H+G,nt=st*I+2*at,ot=G,lt=nt-at;for(let e=0;e<=I;e++){rt(E,e),U.subVectors(E,C).normalize(),C.copy(E),_.copy(E).setComponent(+t+1,0).normalize(),T.crossVectors(U,_).normalize();let i=0===e,r=e===I,s=i?3*Math.PI/2:q,a=i?ot:lt,n=i?j:Q,l=i?0:Y-j,p=U.clone().multiplyScalar(i?-H:H).add(E),u=U.clone().multiplyScalar(i?-1:1).normalize();for(let t=0;t<j;t++){let m=t*k;if(D.addVectors(B.copy(_).multiplyScalar(o*Math.cos(m)),P.copy(T).multiplyScalar(o*Math.sin(m))),O.copy(D).normalize(),i||r){c||(K=l+t,[0,1,2].forEach(t=>{$[3*K+t]=p.getComponent(t),J[3*K+t]=u.getComponent(t)}),tt[2*K]=+r,tt[2*K+1]=t/h),P.copy(O).multiplyScalar(G),A.addVectors(E,P);for(let e=0;e<d;e++){let r=e*q+s;V.addVectors(B.copy(U).multiplyScalar(H*Math.sin(r)),P.copy(O).multiplyScalar(H*Math.cos(r))),W.copy(V).normalize(),P.addVectors(A,V),V.normalize(),K=n+e*j+t,[0,1,2].forEach(t=>{$[3*K+t]=P.getComponent(t),J[3*K+t]=W.getComponent(t)});let o=+i+Math.sin(r);tt[2*K]=(a+H*o)/nt,tt[2*K+1]=t/h}}P.addVectors(E,D),K=Z+e*j+t,[0,1,2].forEach(t=>{$[3*K+t]=P.getComponent(t),J[3*K+t]=O.getComponent(t)}),tt[2*K]=(at+e*st)/nt,tt[2*K+1]=t/h}}let ht=L+2*d+2,[pt,dt]=[+c,ht-1];for(let t=pt;t<=dt-1;t++){let e=c&&t===dt-1;for(let i=0;i<j-1;i++)u=t*j+i,m=u+1,y=(e?i:u)+j,g=(e?i+1:m)+j,0===t?et.push(m,g,y):t===ht-2?et.push(u,m,y):et.push(u,m,y,m,g,y)}this.setIndex(et),this.setAttribute("position",new b($,3)),this.setAttribute("normal",new b(J,3)),this.setAttribute("uv",new b(tt,2))}getClosedTorusIndicesForBooleanOrSubdiv(){let t,e,i,r,s=this.userData.parameters,a=Math.ceil(s.tubularSegments),n=s.radialSegments,o=n+1,l=[];for(let s=1;s<a;s++)for(let a=0;a<n;a++)t=s*o+a,e=t+1,i=t+o,r=e+o,l.push(t,e,i,e,r,i);for(let s=0;s<n;s++)t=a*o+s,e=t+1,i=s+o,r=s+1+o,l.push(t,e,i,e,r,i);return At.array=new Uint32Array(l),At.count=l.length,At}},Wt=new Map,_t=0;function Tt(t){return Ot||(Ot=async function(){let e=t??"https://cdn.spline.design/@splinetool/runtime@2.0.7/build",i=import("./boolean.js"),[r,s]=await Promise.all([i,fetch(`${e}/boolean.wasm`).then(t=>t.arrayBuffer())]);await r.default({module_or_path:s}),Dt=r}())}function Ut(){if(void 0===Dt)throw new Error("boolean-wasm is not loaded");return Dt}function Rt(t){let e=Wt.get(t);if(void 0===e)throw new Error("Unknown csg mesh set handle "+t);return e}function zt(t){return Wt.set(++_t,t),_t}var It={0:0,1:1,2:2};function Lt(t,e,i){if(void 0===Dt)return-1;let{positions:r,indices:s,normals:a}=function(t,e){if(e&&void 0!==t.userData.positions){let e=t.userData,i=[];for(let t=0,r=0;t<e.verticesPerFace.length;t++){let s=e.verticesPerFace[t];for(let t=1;t<s-1;t++)i.push(e.indices[r],e.indices[r+t],e.indices[r+t+1]);r+=s}return{positions:e.positions instanceof Float32Array?e.positions:new Float32Array(e.positions),indices:new Uint32Array(i)}}let i;i=Ct(t.userData.parameters)?t.getClosedTorusIndicesForBooleanOrSubdiv():t.getIndex();let r,s=t.getAttribute("position");if(null===i){r=new Uint32Array(s.count);for(let t=0;t<r.length;t++)r[t]=t}else r=i.array instanceof Uint32Array?i.array:new Uint32Array(i.array);let a=t.getAttribute("normal"),n=void 0!==a&&3===a.itemSize&&a.count===s.count&&a.array instanceof Float32Array&&!0!==a.isInterleavedBufferAttribute?a.array:void 0;return{positions:s.array,indices:r,normals:n}}(t,e);return zt(new Dt.CsgMesh(r,s,a))}function Nt(t,e){let i=Ut(),r=It[e];if(void 0===r)throw new Error("Unknown boolean operation "+e);let s=t.map(Rt);if(1===s.length)return i.clone_mesh(s[0]);let a,n=[];if(2===e&&s.length>2){let t=s[0];for(let e=1;e<s.length-1;e++)t=i.boolean_mesh(t,s[e],0),n.push(t);a=i.boolean_mesh(s[s.length-1],t,2)}else if(2===e)a=i.boolean_mesh(s[1],s[0],2);else{let t=s[s.length-1];for(let e=0;e<s.length-1&&(t=i.boolean_mesh(t,s[e],r),n.push(t),0!==t.tri_count());e++);a=t,n.pop()}for(let t of n)t.free();return a}function Ft(t,e,i,r){let s=Ut(),a=Nt(t,e),n=s.mesh_render_data(a,Math.max(r,0));if(i.setAttribute("position",new b(n.positions(),3)),i.setAttribute("normal",new b(n.normals(),3)),n.free(),null===i.boundingSphere&&(i.boundingSphere=new B),0===a.tri_count())i.boundingSphere.center.set(0,0,0),i.boundingSphere.radius=0,i.userData.parameters={width:0,height:0,depth:0};else{let t=a.bounds();i.boundingSphere.center.set(t[0],t[1],t[2]),i.boundingSphere.radius=(t[3]**2+t[4]**2+t[5]**2)**.5,i.userData.parameters={width:2*t[3],height:2*t[4],depth:2*t[5]}}return zt(a)}function jt(t,e){let i=Ut(),r=Nt(t,e),s=i.mesh_topological_data(r),a=s.positions(),n=s.indices();return s.free(),r.free(),{positions:a,indices:n,verticesPerFace:new Uint8Array(n.length/3).fill(3)}}function kt(t,e){Rt(t).transform(new Float32Array(e.elements))}function qt(t){let e=Wt.get(t);void 0!==e&&(e.free(),Wt.delete(t))}function Gt(t,e){return zt(Ut().instanced_union(Rt(t),e))}function Ht(t){return null!==t&&"booleanOp"in t}var Kt=class extends(Pt(A)){constructor(){super(...arguments),this.booleanMeshSetAddress=-1,this.booleanWasTransformed=!1,this.booleanMatrixInvOld=new g}updateVisible(t){super.updateVisible(t),this.visible=!Ht(this.parent)&&this.visible,Ht(this.parent)&&this.parent.invalidateDownstreamBooleanData()}onClonerLayoutUpdated(){Ht(this.parent)&&this.invalidateDownstreamBooleanData()}freeBooleanPointer(){-1!==this.booleanMeshSetAddress&&(qt(this.booleanMeshSetAddress),this.booleanMeshSetAddress=-1)}invalidateDownstreamBooleanData(t=!1){return t?this.booleanWasTransformed=!0:this.freeBooleanPointer(),Ht(this.parent)?this.parent.invalidateDownstreamBooleanData():this}invalidateUpstreamBooleanData(){this.freeBooleanPointer();for(let t of this.children)t instanceof Kt&&(t.freeBooleanPointer(),Ht(t)&&t.invalidateUpstreamBooleanData())}updateTransformState(t,e){let i=super.updateTransformState(t,e);return i&&Ht(this.parent)&&this.invalidateDownstreamBooleanData(!0),i}onVariableUpdate(t=!1){super.onVariableUpdate(t),Ht(this.parent)&&this.invalidateDownstreamBooleanData(!0)}},Xt=new M;function Zt(t,e=0,i=t.count,r,s){let a=1/0,n=1/0,o=1/0,l=-1/0,h=-1/0,p=-1/0;for(let r=e;r<i;r++){let e=t.getX(r),i=t.getY(r),s=t.getZ(r);e<a&&(a=e),i<n&&(n=i),s<o&&(o=s),e>l&&(l=e),i>h&&(h=i),s>p&&(p=s)}Xt.min.set(a,n,o),Xt.max.set(l,h,p),Xt.getCenter(r),Xt.getSize(s).multiplyScalar(.5)}var Qt=new P,Yt=new E,$t=class extends Kt{constructor(t,e){super(Qt,Yt),this.super_Entity(t,e)}updateState(t,e){this.updateState_Entity(t,e)}raycast(t,e){super.raycast(t,e)}updateEntityBoxSize(t,e){let i=this.geometry.getAttribute("position");void 0!==i?Zt(i,this.geometry.drawRange.start,this.geometry.drawRange.count<1/0?this.geometry.drawRange.count:i.count,t,e):super.updateEntityBoxSize(t,e)}};export{D as a,O as b,C as c,Q as d,Y as e,J as f,mt as g,ct as h,ft as i,Pt as j,Et as k,Ct as l,Vt as m,Tt as n,Lt as o,Ft as p,jt as q,kt as r,qt as s,Gt as t,Zt as u,$t as v};
1
+ import{h as t}from"./runtime-chunk-2PT2WH66.js";import{g as e}from"./runtime-chunk-4KZXQGUQ.js";import{c as i}from"./runtime-chunk-TZCHGFVF.js";import{Ba as r,C as s,Ca as a,Ea as n,K as o,j as l,k as h,l as p,o as d}from"./runtime-chunk-VPEJ5BFD.js";import{$c as c,Cc as u,Ec as m,Fc as f,Kd as y,Oc as g,Pc as v,Pd as x,Rc as S,Re as w,Xc as M,bd as b,cd as B,dd as P,kd as E,ld as A}from"./runtime-chunk-VGN7YHB7.js";var C={Cloner:null,changeEntityProptotype:()=>{},createEntity:()=>{}};function D(t,e){let i=[];if(e.length!==t.length)return null;{let r=0;for(;r<t.length;){if("*"===e[r])i.push(t[r]);else if(t[r]!==e[r])return null;r+=1}}return i}function O(t,e){let i=[];if(!(e.length<=t.length))return null;{let r=0;for(;r<e.length;){if("*"===e[r])i.push(t[r]);else if(t[r]!==e[r])return null;r+=1}}return i}var V=new f,W=new f,_=new g,T=[new f(-1,1,1),new f(-1,-1,1),new f(1,-1,1),new f(1,1,1),new f(-1,1,-1),new f(-1,-1,-1),new f(1,-1,-1),new f(1,1,-1)],U=[[0,3],[1,2],[5,6],[4,7],[0,1],[3,2],[7,6],[4,5],[0,4],[1,5],[2,6],[3,7]],R=[[0,2],[7,5],[4,1],[3,6],[4,3],[1,6]],z=(t,e,i)=>{t.updateEntityBoxSize(V,W),_.copy(e).multiply(t.matrixWorld),0===W.x&&0===W.y&&0===W.z?i.push(new f(V.x,V.y,V.z).applyMatrix4(_)):T.forEach(t=>{i.push(t.clone().multiply(W).add(V).applyMatrix4(_))})},I=class extends M{constructor(){super(...arguments),this.matrix=new g,this.vertices=[],this.faces=[],this.edges=[],this.centerEdges=[]}copy(t){return super.copy(t),this.matrix.copy(t.matrix),this.vertices=t.vertices.map(t=>t.clone()),this.faces=t.faces.map(t=>t.clone()),this.edges=t.edges.map(t=>t.clone()),this.centerEdges=t.centerEdges.map(t=>t.clone()),this}setFromObjectSize(t,e=!1){t.updateWorldMatrix(!1,e),this.makeEmpty(),this.matrix.copy(t.matrixWorld);let i=(new g).copy(t.matrixWorld).invert();return this.expandByObjectSize(t,i,e)}expandByObjectSize(t,e,i=!1){let r=[];if(!0===i){let i=[];t.traverseEntity(t=>{if(t.visible||t.cloner&&t.data.visible){if(!("geometry"in t))return _.copy(e).multiply(t.matrixWorld),void i.push((new f).applyMatrix4(_));z(t,e,r)}}),0===r.length&&r.push(...i)}else z(t,e,r);return this.setFromPoints(r)}getCenter(t){return(t=super.getCenter(t)).applyMatrix4(this.matrix),t}getPositionToCenter(t){return(t=super.getCenter(t)).applyMatrix4(_.copy(this.matrix).setPosition(0,0,0)),t}computeVertices(){this.getSize(W).multiplyScalar(.5),this.getCenter(V),_.copy(this.matrix).setPosition(V),this.vertices=T.map(t=>t.clone().multiply(W).applyMatrix4(_))}computeEdges(){this.vertices.length>0&&this.computeVertices(),this.edges=U.map(([t,e])=>new w(this.vertices[t],this.vertices[e])),this.centerEdges=this.edges.map(t=>t.getCenter(new f))}computeFaces(){this.vertices.length>0&&this.computeVertices(),this.faces=R.map(([t,e])=>this.vertices[t].clone().add(this.vertices[e]).multiplyScalar(.5))}},L=new f,N=new f,F=new f,j=new f,k=new f,q=new f,G=new g,H=1e-12,K=.01;function X(t){let e=t.elements;L.set(e[0],e[1],e[2]),N.set(e[4],e[5],e[6]),F.set(e[8],e[9],e[10])}function Z(){let t=Math.max(L.lengthSq(),N.lengthSq(),F.lengthSq());L.lengthSq()>H*t?j.copy(L).normalize():j.set(1,0,0),k.crossVectors(F,j),k.lengthSq()<=H*t&&(k.copy(N).addScaledVector(j,-N.dot(j)),k.lengthSq()<=H*t&&function(t,e){t.set(1,0,0).cross(e),t.lengthSq()<=H&&t.set(0,1,0).cross(e),t.normalize()}(k,j)),k.normalize(),q.crossVectors(j,k)}function Q(t){return X(t),Z(),G.makeBasis(j,k,q)}var Y,$=new g;(Y||(Y={})).is=function(t){return t&&t.__isSPEObject};var J=t=>class extends t{constructor(){super(...arguments),this.previousModelViewMatrix=new g,this.copyPreviousMatrix=!0,this.hiddenMatrix=new g,this.pivotMatrix=new g,this.matrixWorldRigid=new g,this.shearScale=new g,this.shearScaleInv=new g}get __isSPEObject(){return!0}getPhysicsLocalMatrix(t){return!!this.rigidBody?.isDynamic()&&(t.copy(this.matrixWorld),this.hasNonUniformScale&&t.multiply(this.shearScaleInv),this.parent&&t.premultiply($.copy(this.parent.matrixWorld).invert()),t.premultiply($.copy(this.hiddenMatrix).invert()),t.multiply($.copy(this.pivotMatrix).invert()),!0)}isDescendantOf(t){t instanceof S&&(t=t.uuid);let e=this;for(;e.parent;){if(e.parent.uuid===t)return!0;e=e.parent}return!1}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.multiplyMatrices(this.hiddenMatrix,this.matrix):(this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.hiddenMatrix),this.matrixWorld.multiplyMatrices(this.matrixWorld,this.matrix)),this.matrixWorld.multiply(this.pivotMatrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(let e of this.children)e.updateMatrixWorld(t)}updateWorldMatrix(t,e){let i=this.parent;if(t&&null!==i&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.multiplyMatrices(this.hiddenMatrix,this.matrix):(this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.hiddenMatrix),this.matrixWorld.multiplyMatrices(this.matrixWorld,this.matrix)),this.matrixWorld.multiply(this.pivotMatrix),e)for(let t of this.children)t.updateWorldMatrix(!1,!0)}traverseChildren(t,e=0){for(let i of this.children)Y.is(i)&&i.traverseObject(t,e+1)}traverseObject(t,e=0){if(!0!==t(this,e))for(let i of this.children)Y.is(i)&&i.traverseObject(t,e+1)}updateMatrixWorldRigid(){this.hasNonUniformScale=function(t,e,i){return X(t),Z(),e.makeBasis(j,k,q),i.set(j.dot(L),j.dot(N),j.dot(F),0,k.dot(L),k.dot(N),k.dot(F),0,q.dot(L),q.dot(N),q.dot(F),0,0,0,0,1),function(){let t=L.length(),e=N.length(),i=F.length(),r=Math.max(t,e,i);if(r-t>K||r-e>K||r-i>K)return!0;let s=K*r*r;return Math.abs(L.dot(N))>s||Math.abs(L.dot(F))>s||Math.abs(N.dot(F))>s}()}(this.matrixWorld,this.matrixWorldRigid,this.shearScale),this.matrixWorldRigid.copyPosition(this.matrixWorld),this.shearScaleInv.copy(this.shearScale).invert()}attach(t,e){this.updateWorldMatrix(!0,!1);let i=(new g).copy(this.matrixWorld).invert();return null!==t.parent&&(t.parent.updateWorldMatrix(!0,!1),i.multiply(t.parent.matrixWorld)),"hiddenMatrix"in t&&t.hiddenMatrix instanceof g?t.hiddenMatrix.premultiply(i):t.applyMatrix4(i),t.updateWorldMatrix(!1,!1),this.add(t),void 0!==e&&(this.children.pop(),this.children.splice(e,0,t)),this}copy(t,e=!1){return super.copy(t,e),this.hasNonUniformScale=t.hasNonUniformScale,this}onAfterRender(t,e,i,r,s,a){this.copyPreviousMatrix&&this.previousModelViewMatrix.copy(this.modelViewMatrix)}},tt=class extends x{constructor(){super()}getPoints(t=12){let e,i=[],r=this.getCurveLengths(),s=r[r.length-1]/r.length;for(let a=0,n=this.curves;a<n.length;a++){let o=n[a],l=0===a?r[a]:r[a]-r[a-1],h=Math.ceil(t*l/s),p=o.getPoints(h);for(let t=0;t<p.length;t++){let r=p[t];e&&e.equals(r)||(i.push(r),e=r)}}return this.autoClose&&i.length>1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i}},et=.001,it=new f,rt=new f,st=new f,at=new f,nt=new f,ot=new f,lt=new f,ht=new f,pt=new f;function dt(t,e,i){return it.subVectors(e,t),rt.subVectors(e,i),it.cross(rt).length()<=et}var ct,ut=new WeakMap;function mt(t){let e=ut.get(t.points);if(void 0!==e&&e.isClosed===t.isClosed)return e.curve;let i=function(t){let e=t.points,i=[e[0]],r=[new f(...e[0].data.position)];st.copy(r[0]);for(let t=0;t<e.length-1;t++)it.fromArray(e[t].data.position),rt.fromArray(e[t+1].data.position),nt.subVectors(it,st),lt.subVectors(it,rt),nt.cross(lt).length()>et&&(i.push(e[t]),r.push((new f).copy(it)),st.copy(it));let s=e[e.length-1];i.push(s),r.push(new f(...s.data.position));let a=t.isClosed,n=i.length-(a?0:1),o=i.length,l=[],h=[];for(let t=0;t<o;t++){let e=i[t].data;l.push(new f(...e.controlPrevious.position)),h.push(new f(...e.controlNext.position))}let p=[];for(let t=0;t<n;t++){let e=t===o-1?0:t+1;p.push(dt(r[t],h[t],r[e])&&dt(r[t],l[e],r[e]))}let d=[];for(let t=0;t<o;t++){let e=i[t].data,s=r[t],n={position:s,prevDir:void 0,nextDir:void 0,controlPrevious:l[t],controlNext:h[t],tan:void 0,baseRoundness:e.roundness,removedLength:0};if(d.push(n),0===e.roundness||!a&&(0===t||t===o-1))continue;let c=a&&0==t?o-1:t-1,u=a&&t==o-1?0:t+1,m=(new f).subVectors(r[c],s).normalize(),y=(new f).subVectors(r[u],s).normalize();n.prevDir=m,n.nextDir=y;let g=p[a&&0===t?o-1:t-1],v=p[t];if(g&&v){at.addVectors(m,y).normalize();let t=st.crossVectors(at,m).length()/m.dot(at);n.tan=t,n.removedLength=e.roundness/t}}for(let t=0;t<n;t++){let e=a&&t===o-1?0:t+1,i=d[t],r=d[e];if(0!==i.removedLength||0!==r.removedLength){let t=i.position.distanceTo(r.position);i.removedLength=Math.min(i.removedLength,t/2),r.removedLength=Math.min(r.removedLength,t/2)}}let c=new Array(2*o).fill(null);for(let t=0;t<n;t++){let e=a&&t===o-1?0:t+1,i=d[t],r=d[e],s=null;if(p[t]){let t=i.position.clone(),e=r.position.clone();(0!==i.removedLength||0!==r.removedLength)&&(i.nextDir&&t.add(st.copy(i.nextDir).setLength(i.removedLength)),r.prevDir&&e.add(st.copy(r.prevDir).setLength(r.removedLength))),t.distanceTo(e)>et&&(s=new y(t,t.clone().lerp(e,.3),e.clone().lerp(t,.3),e))}else i.position.distanceTo(r.position)>et&&(s=new y(i.position,i.controlNext,r.controlPrevious,r.position));c[2*t+1]=s}for(let t=0;t<o;t++){let e=d[t];if(0===e.removedLength)continue;let i=e.position,r=e.prevDir.clone().multiplyScalar(e.removedLength).add(i),s=e.nextDir.clone().multiplyScalar(e.removedLength).add(i),a=e.tan*e.removedLength;at.addVectors(e.prevDir,e.nextDir).normalize(),nt.copy(r).lerp(s,.5);let n=r.distanceTo(s)/2;pt.copy(at).multiplyScalar(Math.sqrt(Math.pow(a,2)-Math.pow(n,2))).add(nt),ot.copy(at).multiplyScalar(-a).add(pt);let o=i.distanceTo(ot)/i.distanceTo(nt);lt.copy(e.prevDir).multiplyScalar(o*i.distanceTo(r)).add(i),ht.copy(lt).lerp(ot,2);let l=r.clone().lerp(lt,4/3),h=s.clone().lerp(ht,4/3);c[2*t]=new y(r,l,h,s)}let u=new tt;for(let t=0;t<c.length;t++){let e=c[t];e&&u.add(e)}return u}(t);return ut.set(t.points,{isClosed:t.isClosed,curve:i}),i}(ct||(ct={})).is=function(t){return t&&t.__isEntity};var ft=t=>ct.is(t),yt={type:"completeState",isfromEntity:!0},gt=["x","y","z"],vt=new f,xt=new f(1,1,1),St=new m,wt=new v,Mt=(new f).set(0,1,0),bt=new g,Bt=new g,Pt=c=>class extends(J(c)){constructor(){super(...arguments),this.raycastLock=!1,this.scaleLock=!1,this.disposed=!1,this.stateSelection=null,this.destroyedInAction=!1,this.instances=[],this.prevState=null,this.currentState=null,this.currentAnimationAction=null,this.reversibleToState=null,this.currentTransitionEvent=null,this.previousAction=null,this._singleBBox=new I,this._recursiveBBox=new I,this.singleBBoxNeedsUpdate=!0,this.recursiveBBoxNeedsUpdate=!0,this._needApplyPathSnapping=!0,this.attachedPaths=new Set}get __isEntity(){return!0}entityChildren(t){let e=this.children[t];if(ct.is(e))return e}entityChildrenCount(){let t=this.children.length;for(;t--;)if(ct.is(this.children[t]))return t+1;return 0}get isConcreteEntity(){return"string"==typeof this.identity}get isVirtualEntity(){return"string"!=typeof this.identity}get isInstanceRoot(){return this.isConcreteEntity&&"Instance"===this.data.type}nearestInstanceSelfOrParent(){let t=this;for(;"Instance"!==t.data.type;){let e=t.parent;if(!ct.is(e))return;t=e}return t}forInstancesRec(t){this.instances.forEach(e=>{e.disposed||t(e),e.forInstancesRec(t)})}super_Entity(t,e){"string"==typeof t&&(this.uuid=t),this.identity=t,this.data=e,this.matrixAutoUpdate=!1,this.dataPatched=this.data}changeSelectedState(t,e,i=!1){if(0!==this.data.states.length||i){for(let t of this.data.states)n.toOps(this.data,t.data).forEach(t=>{let i=h.replaceProps(t,this.data);this.dataPatched=this.data,this.updateByPatchedOp(i,this.data,e)});if(null!==t){let i=this.data.states.data(t);i&&(this.dataPatched=n.patch(this.data,i),n.toOps(this.data,i).forEach(t=>{this.updateByPatchedOp(t,this.dataPatched,e)}))}i&&this.updateTransformState(this.dataPatched,e),this.stateSelection=t,this.updatePathSnapping(this.dataPatched.pathSnapping)}}get singleBBox(){return this.singleBBoxNeedsUpdate&&(this.singleBBoxNeedsUpdate=!1,this._singleBBox.setFromObjectSize(this,!1),this._singleBBox.computeVertices(),this._singleBBox.computeEdges(),this._singleBBox.computeFaces()),this._singleBBox}get recursiveBBox(){return this.recursiveBBoxNeedsUpdate&&(this.recursiveBBoxNeedsUpdate=!1,this._recursiveBBox.setFromObjectSize(this,!0),this._recursiveBBox.computeVertices(),this._recursiveBBox.computeEdges(),this._recursiveBBox.computeFaces()),this._recursiveBBox}updateEntityBoxSize(t,e){t.setScalar(0),e.setScalar(0)}resetBBoxNeedsUpdateSelf(){this.singleBBoxNeedsUpdate=!0,this.recursiveBBoxNeedsUpdate=!0}resetBBoxNeedsUpdate(){this.resetBBoxNeedsUpdateSelf(),this.traverseAncestors(t=>{ft(t)&&t.resetBBoxNeedsUpdateSelf()}),this.traverseEntity(t=>{t.resetBBoxNeedsUpdateSelf()})}find(t){let e;return this.traverseEntity(i=>{i.uuid===t&&(e=i)}),e}traverseSortNextHelper(){let t=this.parent;if(t){let e=t.children,i=e.indexOf(this)+1;if(ct.is(e[i]))return e[i];if(ct.is(t))return t.traverseSortNextHelper()}}sortNext(){let t=this.children;return this.children.length>0&&ct.is(this.children[0])?t[0]:this.traverseSortNextHelper()}goUp(t){let e=this;for(;t>0&&null!==e;)e=e.parent,t-=1;return e}hasAnccestorOrSelf(t){return this===t||this.hasAnccestor(t)}hasAnccestor(t){let e=this.parent;for(;e;){if(t===e)return!0;e=e.parent}return!1}countToAccestor(t){let e=0,i=this;for(;i!==t;){if(null===i)return-1;i=i.parent,e+=1}return e}forEachEntity(t){for(let e of this.children)ft(e)&&t(e)}traverseEntityAncestors(t){this.traverseAncestors(e=>{ct.is(e)&&t(e)})}traverseConcreteEntity(t,e=0){if(!0!==t(this,e))for(let i of this.children)ft(i)&&i.isConcreteEntity&&i.traverseEntity(t,e+1)}traverseEntity(t,e=0){if(!0!==t(this,e))for(let i of this.children)ft(i)&&i.traverseEntity(t,e+1)}traverseVisibleEntity(t){t(this);for(let e of this.children)ft(e)&&e.visible&&e.traverseVisibleEntity(t)}updateMatrix(){super.updateMatrix(),this.cloner&&this.cloner.onObjUpdateMatrix(),this.dispatchEvent({type:"updateMatrix"})}updateMatrixWorld(t){super.updateMatrixWorld(t),this.dispatchEvent({type:"updateMatrixWorld"})}copy(t,e=!1){return super.copy(t,e),this.dataPatched=t.dataPatched,this.raycastLock=t.raycastLock,this.scaleLock=t.scaleLock,this.hiddenMatrix.copy(t.hiddenMatrix),this}hasEntityChild(){return this.children.some(t=>ft(t))}isAncestorOf(t){if(this.uuid===t)return!1;let e=!1;return this.traverseEntity(i=>{i.uuid===t&&(e=!0)}),e}toObjectTransformState(t=[]){this.updateWorldMatrix(!0,!1);let i={position:this.position.toArray(),rotation:[this.rotation.x*u.RAD2DEG,this.rotation.y*u.RAD2DEG,this.rotation.z*u.RAD2DEG],scale:this.scale.toArray(),hiddenMatrix:this.hiddenMatrix.toArray(),pivot:[0,0,0],pivotRotation:[0,0,0]};return e(i,t)}getTransformValues(t,e,i){return e[t].map((e,r)=>i?.shared.getVariable(e,[this.uuid,t,gt[r]])??e)}updateTransformState(t,e){let i=!1;if(t.position&&(this.position.fromArray(this.getTransformValues("position",t,e)),i=!0),t.rotation&&(vt.fromArray(this.getTransformValues("rotation",t,e)).multiplyScalar(u.DEG2RAD),this.rotation.setFromVector3(vt),i=!0),t.scale&&(this.scale.fromArray(this.getTransformValues("scale",t,e)),i=!0),void 0!==t.hiddenMatrix&&(i=!0,this.hiddenMatrix.fromArray(t.hiddenMatrix??s.identity)),void 0!==t.pivot||void 0!==t.pivotRotation)if(i=!0,void 0!==t.pivot&&void 0!==t.pivotRotation)this.pivotMatrix.compose(vt.fromArray(t.pivot).negate(),St.setFromEuler(wt.fromArray(t.pivotRotation.map(t=>t*u.DEG2RAD))).invert(),xt);else if(void 0!==t.pivot)this.pivotMatrix.setPosition(-t.pivot[0],-t.pivot[1],-t.pivot[2]);else if(void 0!==t.pivotRotation){let e=vt.setFromMatrixPosition(this.pivotMatrix);St.setFromEuler(wt.fromArray(t.pivotRotation.map(t=>t*u.DEG2RAD))).invert(),this.pivotMatrix.compose(e,St,xt)}return i&&(this.updateMatrix(),this.resetBBoxNeedsUpdate(),this.invalidateClonerTransform(this),this.traverseEntityAncestors(t=>{t.invalidateClonerTransform(this)})),t.position&&t.rotation&&t.scale&&void 0!==t.hiddenMatrix&&this.updateWorldMatrix(!1,!0),i}onVariableUpdate(t=!1){t?this.resetBBoxNeedsUpdate():(this.updateMatrix(),this.resetBBoxNeedsUpdate(),this.invalidateClonerTransform(this),this.traverseEntityAncestors(t=>{t.invalidateClonerTransform(this)}),this.requestRender())}dispose(){this.disposed=!0,this.cloner&&(this.cloner.dispose(),this.cloner=void 0)}disposeChildrenRecursively(){for(let t of this.children)ct.is(t)&&t.disposeRecursively()}disposeRecursively(){this.dispose(),this.children.forEach(t=>{ct.is(t)&&t.disposeRecursively()})}toState(t=[]){let i={name:this.name,visible:this.visible,raycastLock:this.raycastLock,...this.toObjectTransformState(t)};return e(i,t)}updateByObjUpdateOp(t,e){void 0!==t&&this.updateByOp({type:0,props:t,path:[]},{...this.data,...t},e,!1)}updateByOp(t,e,i,s){let o=this.data;this.data=e;let h=t,c=O(t.path,["states","*"]);if(null!==c){if(0===t.type){let[e]=c;if(this?.stateSelection===e){let e={...t.props};if(delete e.name,Object.values(t.props).some(t=>void 0===t)){let i=this.data;if(void 0!==i){let r=d.zoom(i,t.path.slice(2));if(r)for(let i in t.props)void 0===t.props[i]&&i in r&&(e[i]=r[i])}}h={...t,props:e,path:t.path.slice(2)}}}}else if(0===t.type){let e=this.stateSelection?this.data.states.data(this.stateSelection):void 0;if(void 0!==e){if(void 0!==t.props.name&&e.name){let{name:t,...i}=e;e=i}if(void 0!==t.props.material&&"material"in e){let{material:t,...i}=e;e=i}let i=d.removeOverridden(t.path,t.props,e);h={...t,props:i}}}if(this.updateByPatchedOpBase(h,n.patch(this.data,this.stateSelection?this.data.states.data(this.stateSelection):void 0),i),O(t.path,["overrides"])){let s=[],a=[...t.path];for(s.push(a[1]),a.splice(0,2);a.length>0&&"descendants"===a[0];)s.push(a[1]),a.splice(0,2);if(void 0===s[s.length-1]){if(0===t.type)for(let e of Object.keys(t.props)){s[s.length-1]=e;let r=i.scene.findInstance([this.uuid,...s]);r&&(r.overrideData=t.props[e],r.updateState(l.apply(r.component.data,r.overrideData),i))}}else{let n=i.scene.findInstance([this.uuid,...s]);if(n){let o=d.zoom(n.component.data,a);if(0===(t={...t,path:a}).type){let e=t.props;if(o)for(let[i,r]of Object.entries(t.props))void 0===r&&(e===t.props&&(e={...t.props}),e[i]=o[i]);t={...t,props:e}}n.overrideData=r.resolve(e.overrides,s),n.updateByOp(t,p.applySimple(n.data,t),i,!1)}}}else if(this.instances.length>0){let r;if(0===t.path.length&&0===t.type){let e;for(let i of a.rootOverrideProps)i in t.props&&(void 0===e&&(e={}),e[i]=t.props[i]);e&&(r={...t,props:e})}else for(let e of a.rootOverrideProps)if(O(t.path,[e])){r=t;break}void 0!==r&&this.instances.forEach(t=>{if(t.isInstanceRoot){let e=l.filterOp(t.overrideData,r);e&&t.updateByOp(e,p.applySimple(t.data,e),i,!0)}}),this.instances.forEach(r=>{if(!r.isInstanceRoot){let s=l.filterOp(r.overrideData,t);if(s){let a;a=o===r.data&&t===s?e:p.applySimple(r.data,s),r.updateByOp(s,a,i,!0)}}})}}updateByPatchedOpBase(t,e,i){if(this.dataPatched=e,0===t.path.length&&0===t.type)void 0!==t.props.type&&!o.is(t.props.type)&&C.changeEntityProptotype(this,e,i);else if(1===t.path.length&&"geometry"===t.path[0]&&0===t.type&&"type"in t.props){C.changeEntityProptotype(this,e,i);for(let t of this.children)ct.is(t)&&t.updateVisible(i.scene)}this.updateByPatchedOp(t,e,i)}updateByPatchedOp(t,e,i){if(0===t.path.length&&0===t.type?this.updateState(t.props,i):0===t.type&&("resolutionLevel"in t.props||"useChildrenColors"in t.props)&&this.updateState(e,i),"morphTargetInfluences"===t.path[0]&&0===t.type){let r=e.morphTargetInfluences.get(t.path[1])?.data.name;r&&this.updateMorphInfluences(r,i.shared.getVariable(t.props.value,[this.uuid,"morphTargetInfluences",r]))}if(null!==O(t.path,["pathSnapping"])&&this.updatePathSnapping(e.pathSnapping),null!==O(t.path,["cloner"])){let r=p.drop(t,1);0===r.path.length&&0===r.type&&!0===r.props.disabled?this.setFromClonerState(null,i):this.cloner?this.cloner.updateState(e.cloner,i):(this.setFromClonerState(e.cloner,i),this.expandCloner(i)),this.updateVisible(i.scene)}}updatePathSnapping(t=this.dataPatched.pathSnapping){this._updatedPathSnapping=t,this._needApplyPathSnapping=!0}get updatedPathSnapping(){return this._updatedPathSnapping}applyPathSnapping(t){if(!1===this._needApplyPathSnapping)return;let e=this._updatedPathSnapping?.pathId??this.dataPatched.pathSnapping.pathId,i=this._updatedPathSnapping?.slide??this.dataPatched.pathSnapping.slide??0,r=this._updatedPathSnapping?.offset??this.dataPatched.pathSnapping.offset??0,s=this._updatedPathSnapping?.orientation??this.dataPatched.pathSnapping.orientation;if(null===e)return;let a=t.find(e);if(!a)return;this._needApplyPathSnapping=!1;let n=a.data;if(n.geometry.path.points.length<=1)return;let o=mt(n.geometry.path),l=(i+r)%1;i+r===1&&0===l&&(l=1);let h=null;try{h=o.curves.length?o.getPointAt(l):null}catch(t){}if(null===h)return;a.updateMatrixWorld();let p=this.parent?bt.copy(this.parent.matrixWorld).invert():bt.identity();p.multiply(a.matrixWorld),h.applyMatrix4(p);let d={position:h.toArray(),rotation:n.rotation};if("tangential"===s){let t=Bt.extractRotation(a.matrixWorld),e=o.getTangentAt(l).applyMatrix4(t).add(h),i=Bt.lookAt(h,e,Mt),r=vt.setFromEuler(wt.setFromRotationMatrix(i)).multiplyScalar(u.RAD2DEG);d={...d,rotation:r.toArray()}}this.updateTransformState(d),this.traverseEntity(t=>{t._cameraType&&t.dispatchEvent(yt)})}updateVisible(t){if(this.visible=this.dataPatched.visible&&(!this.dataPatched.cloner||(this.dataPatched.cloner.disabled??!1)||!0!==this.dataPatched.cloner?.hideBase),!t)return;let e=!1;this.traverseEntity(t=>{if("Splat"===t.data.type)return e=!0,!0}),e&&t.reloadSplats()}updateState_Entity(t,e){void 0!==t.name&&(this.name=t.name),void 0!==t.raycastLock&&(this.raycastLock=t.raycastLock),void 0!==t.visible&&(this.updateVisible(e?.scene),this.resetBBoxNeedsUpdate()),e&&"cloner"in t&&void 0!==t.cloner&&(this.setFromClonerState(t.cloner,e),this.updateVisible(e.scene)),this.updateTransformState(t,e)}get attachedSurfaceCloners(){return this.children.filter(e=>t(e)&&"toObject"===e.parameters.type)}setFromClonerState(t,e){if(!this.disposed)if(null===t||t.disabled)this.cloner&&this.cloner.dispose(),this.cloner=void 0;else if(void 0===this.cloner){if(null===C.Cloner)return void i("cloners","a cloner");this.cloner=new C.Cloner(this,t),e.scene.addPendingExpandCloner(this)}else this.cloner.updateState(t,e)}expandCloner(t){!this.disposed&&this.cloner&&this.cloner.expandClones(t)}invalidateClonerTransform(t){this.cloner&&this.cloner.invalidateTransform(t)}requestRender(){this.dispatchEvent({type:"requestRender"})}},Et=class{static create(t){return this.build(this.normalizeInputs(t))}static normalizeInputs(t,e){let i=Object.assign({},e?.parameters??{width:100,revolutions:2,segments:40,pathRadius:10,pathType:0,pathSegments:30,cornerRadius:30,cornerSegments:4},t.parameters),r=Math.abs(i.width),s=Math.abs(i.height??r),a=Math.abs(i.depth??r),n=Math.abs(Math.min(r,a))/2;return{parameters:Object.assign(i,{width:r,height:s,depth:a,radius:n,segments:Math.round(i.segments),pathSegments:Math.round(i.pathSegments),cornerSegments:Math.round(i.cornerSegments)})}}static build(t){let{width:e,height:i,depth:r,radius:s,revolutions:a,segments:n,pathRadius:o,pathType:l,pathSegments:h,cornerRadius:p,cornerSegments:d}=t.parameters,c=new Vt(!1,e,i,r,s,a,n,o,l,h,p,d);return Object.assign(c,{userData:{...t,type:"HelixGeometry"}})}},At=new c([0,0,0],1);function Ct(t){return"TorusGeometry"===t.type&&360===t.arc}var Dt,Ot,Vt=class extends P{constructor(t=!0,e=1,i=1,r=1,s=1,a=1,n=1,o=1,l=1,h=1,p=1,d=1){if(super(),0===a)return;let c=t&&1===a;c&&(d=0),p>100&&(p=100),0===p&&(d=0);let u,m,y,g,v,x,S,w,M=()=>new f,B=new f,P=M(),E=M(),A=M(),C=M(),D=M(),O=M(),V=M(),W=M(),_=M(),T=M(),U=M(),R=i-2*o+.001,z=R/a,I=Math.ceil(n*a),L=I+1,N=R/I,F=-R/2,j=h+1,k=2*Math.PI/h,q=Math.PI/2/d,G=Math.min((1-p/100)*o,o-.01),H=o-G,K=0,X=2*d+2,Z=j*X/2,Q=Z+j*L,Y=Math.max(0,j*(L+X)),[$,J,tt]=[3,3,2].map(t=>Array(Y*t).fill(0)),et=[],it=s-o;function rt(e,i){let r=Math.PI/2;x=i*N,w=2*Math.PI*(x%z)/z+r,x+=F,S=Math.sin(w)*it,v=Math.cos(w)*it,t?e.set(v,S,x):e.set(v,x,S)}rt(B,-1e-10),rt(P,0),C.copy(B),rt(B,1);let st=B.distanceTo(P),at=c?0:H+G,nt=st*I+2*at,ot=G,lt=nt-at;for(let e=0;e<=I;e++){rt(E,e),U.subVectors(E,C).normalize(),C.copy(E),_.copy(E).setComponent(+t+1,0).normalize(),T.crossVectors(U,_).normalize();let i=0===e,r=e===I,s=i?3*Math.PI/2:q,a=i?ot:lt,n=i?j:Q,l=i?0:Y-j,p=U.clone().multiplyScalar(i?-H:H).add(E),u=U.clone().multiplyScalar(i?-1:1).normalize();for(let t=0;t<j;t++){let m=t*k;if(D.addVectors(B.copy(_).multiplyScalar(o*Math.cos(m)),P.copy(T).multiplyScalar(o*Math.sin(m))),O.copy(D).normalize(),i||r){c||(K=l+t,[0,1,2].forEach(t=>{$[3*K+t]=p.getComponent(t),J[3*K+t]=u.getComponent(t)}),tt[2*K]=+r,tt[2*K+1]=t/h),P.copy(O).multiplyScalar(G),A.addVectors(E,P);for(let e=0;e<d;e++){let r=e*q+s;V.addVectors(B.copy(U).multiplyScalar(H*Math.sin(r)),P.copy(O).multiplyScalar(H*Math.cos(r))),W.copy(V).normalize(),P.addVectors(A,V),V.normalize(),K=n+e*j+t,[0,1,2].forEach(t=>{$[3*K+t]=P.getComponent(t),J[3*K+t]=W.getComponent(t)});let o=+i+Math.sin(r);tt[2*K]=(a+H*o)/nt,tt[2*K+1]=t/h}}P.addVectors(E,D),K=Z+e*j+t,[0,1,2].forEach(t=>{$[3*K+t]=P.getComponent(t),J[3*K+t]=O.getComponent(t)}),tt[2*K]=(at+e*st)/nt,tt[2*K+1]=t/h}}let ht=L+2*d+2,[pt,dt]=[+c,ht-1];for(let t=pt;t<=dt-1;t++){let e=c&&t===dt-1;for(let i=0;i<j-1;i++)u=t*j+i,m=u+1,y=(e?i:u)+j,g=(e?i+1:m)+j,0===t?et.push(m,g,y):t===ht-2?et.push(u,m,y):et.push(u,m,y,m,g,y)}this.setIndex(et),this.setAttribute("position",new b($,3)),this.setAttribute("normal",new b(J,3)),this.setAttribute("uv",new b(tt,2))}getClosedTorusIndicesForBooleanOrSubdiv(){let t,e,i,r,s=this.userData.parameters,a=Math.ceil(s.tubularSegments),n=s.radialSegments,o=n+1,l=[];for(let s=1;s<a;s++)for(let a=0;a<n;a++)t=s*o+a,e=t+1,i=t+o,r=e+o,l.push(t,e,i,e,r,i);for(let s=0;s<n;s++)t=a*o+s,e=t+1,i=s+o,r=s+1+o,l.push(t,e,i,e,r,i);return At.array=new Uint32Array(l),At.count=l.length,At}},Wt=new Map,_t=0;function Tt(t){return Ot||(Ot=async function(){let e=t??"https://cdn.spline.design/@splinetool/runtime@2.0.8/build",i=import("./boolean.js"),[r,s]=await Promise.all([i,fetch(`${e}/boolean.wasm`).then(t=>t.arrayBuffer())]);await r.default({module_or_path:s}),Dt=r}())}function Ut(){if(void 0===Dt)throw new Error("boolean-wasm is not loaded");return Dt}function Rt(t){let e=Wt.get(t);if(void 0===e)throw new Error("Unknown csg mesh set handle "+t);return e}function zt(t){return Wt.set(++_t,t),_t}var It={0:0,1:1,2:2};function Lt(t,e,i){if(void 0===Dt)return-1;let{positions:r,indices:s,normals:a}=function(t,e){if(e&&void 0!==t.userData.positions){let e=t.userData,i=[];for(let t=0,r=0;t<e.verticesPerFace.length;t++){let s=e.verticesPerFace[t];for(let t=1;t<s-1;t++)i.push(e.indices[r],e.indices[r+t],e.indices[r+t+1]);r+=s}return{positions:e.positions instanceof Float32Array?e.positions:new Float32Array(e.positions),indices:new Uint32Array(i)}}let i;i=Ct(t.userData.parameters)?t.getClosedTorusIndicesForBooleanOrSubdiv():t.getIndex();let r,s=t.getAttribute("position");if(null===i){r=new Uint32Array(s.count);for(let t=0;t<r.length;t++)r[t]=t}else r=i.array instanceof Uint32Array?i.array:new Uint32Array(i.array);let a=t.getAttribute("normal"),n=void 0!==a&&3===a.itemSize&&a.count===s.count&&a.array instanceof Float32Array&&!0!==a.isInterleavedBufferAttribute?a.array:void 0;return{positions:s.array,indices:r,normals:n}}(t,e);return zt(new Dt.CsgMesh(r,s,a))}function Nt(t,e){let i=Ut(),r=It[e];if(void 0===r)throw new Error("Unknown boolean operation "+e);let s=t.map(Rt);if(1===s.length)return i.clone_mesh(s[0]);let a,n=[];if(2===e&&s.length>2){let t=s[0];for(let e=1;e<s.length-1;e++)t=i.boolean_mesh(t,s[e],0),n.push(t);a=i.boolean_mesh(s[s.length-1],t,2)}else if(2===e)a=i.boolean_mesh(s[1],s[0],2);else{let t=s[s.length-1];for(let e=0;e<s.length-1&&(t=i.boolean_mesh(t,s[e],r),n.push(t),0!==t.tri_count());e++);a=t,n.pop()}for(let t of n)t.free();return a}function Ft(t,e,i,r){let s=Ut(),a=Nt(t,e),n=s.mesh_render_data(a,Math.max(r,0));if(i.setAttribute("position",new b(n.positions(),3)),i.setAttribute("normal",new b(n.normals(),3)),n.free(),null===i.boundingSphere&&(i.boundingSphere=new B),0===a.tri_count())i.boundingSphere.center.set(0,0,0),i.boundingSphere.radius=0,i.userData.parameters={width:0,height:0,depth:0};else{let t=a.bounds();i.boundingSphere.center.set(t[0],t[1],t[2]),i.boundingSphere.radius=(t[3]**2+t[4]**2+t[5]**2)**.5,i.userData.parameters={width:2*t[3],height:2*t[4],depth:2*t[5]}}return zt(a)}function jt(t,e){let i=Ut(),r=Nt(t,e),s=i.mesh_topological_data(r),a=s.positions(),n=s.indices();return s.free(),r.free(),{positions:a,indices:n,verticesPerFace:new Uint8Array(n.length/3).fill(3)}}function kt(t,e){Rt(t).transform(new Float32Array(e.elements))}function qt(t){let e=Wt.get(t);void 0!==e&&(e.free(),Wt.delete(t))}function Gt(t,e){return zt(Ut().instanced_union(Rt(t),e))}function Ht(t){return null!==t&&"booleanOp"in t}var Kt=class extends(Pt(A)){constructor(){super(...arguments),this.booleanMeshSetAddress=-1,this.booleanWasTransformed=!1,this.booleanMatrixInvOld=new g}updateVisible(t){super.updateVisible(t),this.visible=!Ht(this.parent)&&this.visible,Ht(this.parent)&&this.parent.invalidateDownstreamBooleanData()}onClonerLayoutUpdated(){Ht(this.parent)&&this.invalidateDownstreamBooleanData()}freeBooleanPointer(){-1!==this.booleanMeshSetAddress&&(qt(this.booleanMeshSetAddress),this.booleanMeshSetAddress=-1)}invalidateDownstreamBooleanData(t=!1){return t?this.booleanWasTransformed=!0:this.freeBooleanPointer(),Ht(this.parent)?this.parent.invalidateDownstreamBooleanData():this}invalidateUpstreamBooleanData(){this.freeBooleanPointer();for(let t of this.children)t instanceof Kt&&(t.freeBooleanPointer(),Ht(t)&&t.invalidateUpstreamBooleanData())}updateTransformState(t,e){let i=super.updateTransformState(t,e);return i&&Ht(this.parent)&&this.invalidateDownstreamBooleanData(!0),i}onVariableUpdate(t=!1){super.onVariableUpdate(t),Ht(this.parent)&&this.invalidateDownstreamBooleanData(!0)}},Xt=new M;function Zt(t,e=0,i=t.count,r,s){let a=1/0,n=1/0,o=1/0,l=-1/0,h=-1/0,p=-1/0;for(let r=e;r<i;r++){let e=t.getX(r),i=t.getY(r),s=t.getZ(r);e<a&&(a=e),i<n&&(n=i),s<o&&(o=s),e>l&&(l=e),i>h&&(h=i),s>p&&(p=s)}Xt.min.set(a,n,o),Xt.max.set(l,h,p),Xt.getCenter(r),Xt.getSize(s).multiplyScalar(.5)}var Qt=new P,Yt=new E,$t=class extends Kt{constructor(t,e){super(Qt,Yt),this.super_Entity(t,e)}updateState(t,e){this.updateState_Entity(t,e)}raycast(t,e){super.raycast(t,e)}updateEntityBoxSize(t,e){let i=this.geometry.getAttribute("position");void 0!==i?Zt(i,this.geometry.drawRange.start,this.geometry.drawRange.count<1/0?this.geometry.drawRange.count:i.count,t,e):super.updateEntityBoxSize(t,e)}};export{D as a,O as b,C as c,Q as d,Y as e,J as f,mt as g,ct as h,ft as i,Pt as j,Et as k,Ct as l,Vt as m,Tt as n,Lt as o,Ft as p,jt as q,kt as r,qt as s,Gt as t,Zt as u,$t as v};
@@ -1 +1 @@
1
- import{a as t}from"./runtime-chunk-TONK22EB.js";import{e}from"./runtime-chunk-PEOLFGBX.js";import{c as i}from"./runtime-chunk-LX7POLY3.js";import{i as r}from"./runtime-chunk-DCPBSRSM.js";import{j as s}from"./runtime-chunk-2PT2WH66.js";import{Fc as n,Ne as o,dd as a,ud as h,vd as c}from"./runtime-chunk-VGN7YHB7.js";var d=class extends o{constructor(){super(),i(this.layers)}setFromCamera(t,e){e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,-1).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld),this.camera=e):e.isPerspectiveCamera?(this.ray.origin.set(t.x,t.y,-1).unproject(e),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize(),this.camera=e):console.error("Raycaster: Unsupported camera type.")}intersectVisibleObjects(t,e=!0,i=[]){return t.forEach(t=>{t.visible&&this.intersectObject(t,e,i)}),i}createRaycastLineHelper(){let t=new h({color:65280,linewidth:10}),e=new n(this.ray.origin.x,this.ray.origin.y,this.ray.origin.z),i=new n(this.ray.direction.x,this.ray.direction.y,this.ray.direction.z),r=this.camera.far-this.camera.near,s=(new n).addVectors(e,i.multiplyScalar(r)),o=new a;return o.setFromPoints([e,s]),new c(o,t)}},u=e=>e instanceof t||s(e);function l(t,e){return t.distance-e.distance}function m(t,i,s){if(r(i)&&i.visible){e(i)&&i.raycast(t,s);for(let e of i.children)m(t,e,s)}}function f(t,e,i,r=!1){if(!r&&!i.some(e=>void 0!==w(t,e)))return[];let s=[];return e.children.forEach(e=>m(t,e,s)),s.sort(l),s}function p(t){let e=[];if(t.length){let i=t[0].object;r(i)&&e.push(i);let s=i.parent;for(;s;)u(s)&&e.push(s),s=s.parent}return e}function y(t,e,i,r){let s=t.frame;if(s){let t=e[0]*s.width,n=(1-e[1])*s.height;for(let e of i){let i=e===s.uuid?s:s.find(e);if(i?.intersects(t,n))return r(i),!0}}return!1}function w(t,i){if(e(i)){if(i.visible){let e=[];return i.raycast(t,e),e.length?e[0]:void 0}}else if(u(i))return g(t,i)}function g(t,i){if(r(i)&&i.visible){if(e(i)){let e=[];if(i.raycast(t,e),e.length)return e[0]}for(let e of i.children){let i=g(t,e);if(i)return i}}}var v=class{constructor(t,e,i,r,s,n,o,a){this.renderer=t,this.publish=e,this.scene=i,this.getCamera=r,this.sharedAssets=s,this.requestRender=n,this.isExport=o,this.frame=a,this.raycaster=new d,this._useWindowEvents=!1,this.pointerWorld={x:0,y:0},this.pointerScreen={x:0,y:0},this._useWindowEvents="window"===e.mouseEventTarget,this.domElement=t.domElement,this.eventElement=this._useWindowEvents?window:t.domElement,this._domRect=this.domElement.getBoundingClientRect()}get stopRaycast(){return this.publish.stopRaycast}get page(){return this.scene.activePage}set useWindowEvents(t){this._useWindowEvents=t,this.eventElement=t?window:this.renderer.domElement}get useWindowEvents(){return this._useWindowEvents}set domRect(t){this._domRect=t}get domRect(){return this._domRect}updateRaycaster(t){let{pageX:e,pageY:i}=t.touches?.length>0?t.touches[0]:t;this.pointerWorld=function(t,e,i){return{x:(t-(i.left+window.scrollX))/i.width*2-1,y:-(e-(i.top+window.scrollY))/i.height*2+1}}(e,i,this._domRect),this.pointerScreen=function(t,e,i){return{x:(t-(i.left+window.scrollX))/i.width,y:1-(e-(i.top+window.scrollY))/i.height}}(e,i,this._domRect),this.raycaster.setFromCamera(this.pointerWorld,this.getCamera())}dispose(){this.scene=void 0,this.sharedAssets=void 0,this.publish=void 0,this.getCamera=void 0,this.requestRender=void 0,this.frame=void 0,this.isExport=void 0}};export{f as a,p as b,y as c,w as d,v as e};
1
+ import{a as t}from"./runtime-chunk-5RXW5MNJ.js";import{e}from"./runtime-chunk-YULW5JRE.js";import{c as i}from"./runtime-chunk-DK66VKWP.js";import{i as r}from"./runtime-chunk-CKT62HES.js";import{j as s}from"./runtime-chunk-2PT2WH66.js";import{Fc as n,Ne as o,dd as a,ud as h,vd as c}from"./runtime-chunk-VGN7YHB7.js";var d=class extends o{constructor(){super(),i(this.layers)}setFromCamera(t,e){e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,-1).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld),this.camera=e):e.isPerspectiveCamera?(this.ray.origin.set(t.x,t.y,-1).unproject(e),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize(),this.camera=e):console.error("Raycaster: Unsupported camera type.")}intersectVisibleObjects(t,e=!0,i=[]){return t.forEach(t=>{t.visible&&this.intersectObject(t,e,i)}),i}createRaycastLineHelper(){let t=new h({color:65280,linewidth:10}),e=new n(this.ray.origin.x,this.ray.origin.y,this.ray.origin.z),i=new n(this.ray.direction.x,this.ray.direction.y,this.ray.direction.z),r=this.camera.far-this.camera.near,s=(new n).addVectors(e,i.multiplyScalar(r)),o=new a;return o.setFromPoints([e,s]),new c(o,t)}},u=e=>e instanceof t||s(e);function l(t,e){return t.distance-e.distance}function m(t,i,s){if(r(i)&&i.visible){e(i)&&i.raycast(t,s);for(let e of i.children)m(t,e,s)}}function f(t,e,i,r=!1){if(!r&&!i.some(e=>void 0!==w(t,e)))return[];let s=[];return e.children.forEach(e=>m(t,e,s)),s.sort(l),s}function p(t){let e=[];if(t.length){let i=t[0].object;r(i)&&e.push(i);let s=i.parent;for(;s;)u(s)&&e.push(s),s=s.parent}return e}function y(t,e,i,r){let s=t.frame;if(s){let t=e[0]*s.width,n=(1-e[1])*s.height;for(let e of i){let i=e===s.uuid?s:s.find(e);if(i?.intersects(t,n))return r(i),!0}}return!1}function w(t,i){if(e(i)){if(i.visible){let e=[];return i.raycast(t,e),e.length?e[0]:void 0}}else if(u(i))return g(t,i)}function g(t,i){if(r(i)&&i.visible){if(e(i)){let e=[];if(i.raycast(t,e),e.length)return e[0]}for(let e of i.children){let i=g(t,e);if(i)return i}}}var v=class{constructor(t,e,i,r,s,n,o,a){this.renderer=t,this.publish=e,this.scene=i,this.getCamera=r,this.sharedAssets=s,this.requestRender=n,this.isExport=o,this.frame=a,this.raycaster=new d,this._useWindowEvents=!1,this.pointerWorld={x:0,y:0},this.pointerScreen={x:0,y:0},this._useWindowEvents="window"===e.mouseEventTarget,this.domElement=t.domElement,this.eventElement=this._useWindowEvents?window:t.domElement,this._domRect=this.domElement.getBoundingClientRect()}get stopRaycast(){return this.publish.stopRaycast}get page(){return this.scene.activePage}set useWindowEvents(t){this._useWindowEvents=t,this.eventElement=t?window:this.renderer.domElement}get useWindowEvents(){return this._useWindowEvents}set domRect(t){this._domRect=t}get domRect(){return this._domRect}updateRaycaster(t){let{pageX:e,pageY:i}=t.touches?.length>0?t.touches[0]:t;this.pointerWorld=function(t,e,i){return{x:(t-(i.left+window.scrollX))/i.width*2-1,y:-(e-(i.top+window.scrollY))/i.height*2+1}}(e,i,this._domRect),this.pointerScreen=function(t,e,i){return{x:(t-(i.left+window.scrollX))/i.width,y:1-(e-(i.top+window.scrollY))/i.height}}(e,i,this._domRect),this.raycaster.setFromCamera(this.pointerWorld,this.getCamera())}dispose(){this.scene=void 0,this.sharedAssets=void 0,this.publish=void 0,this.getCamera=void 0,this.requestRender=void 0,this.frame=void 0,this.isExport=void 0}};export{f as a,p as b,y as c,w as d,v as e};