@splinetool/runtime 2.0.90 → 2.0.92

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 (398) hide show
  1. package/build/{runtime-aiAssistant-DBCVWUEB.js → runtime-aiAssistant-5ECVEZLI.js} +1 -1
  2. package/build/runtime-aiAssistant-5ECVEZLI.js.br +0 -0
  3. package/build/runtime-aiAssistant-5ECVEZLI.js.gz +0 -0
  4. package/build/{runtime-apiServices-JU3DOVOS.js → runtime-apiServices-J4QEEJ2S.js} +1 -1
  5. package/build/runtime-apiServices-J4QEEJ2S.js.br +0 -0
  6. package/build/runtime-apiServices-J4QEEJ2S.js.gz +0 -0
  7. package/build/{runtime-audio-LJOR4W23.js → runtime-audio-P56XBVSL.js} +1 -1
  8. package/build/runtime-audio-P56XBVSL.js.br +7 -0
  9. package/build/runtime-audio-P56XBVSL.js.gz +0 -0
  10. package/build/{runtime-bloom-QSFMSJ75.js → runtime-bloom-5BWRSKXE.js} +1 -1
  11. package/build/runtime-bloom-5BWRSKXE.js.br +0 -0
  12. package/build/runtime-bloom-5BWRSKXE.js.gz +0 -0
  13. package/build/{runtime-brightnessContrast-RCY3ODPF.js → runtime-brightnessContrast-GBILAHY5.js} +1 -1
  14. package/build/runtime-brightnessContrast-GBILAHY5.js.br +0 -0
  15. package/build/runtime-brightnessContrast-GBILAHY5.js.gz +0 -0
  16. package/build/{runtime-chromaticAberration-SY5X27ML.js → runtime-chromaticAberration-XNVWJQWI.js} +1 -1
  17. package/build/runtime-chromaticAberration-XNVWJQWI.js.br +0 -0
  18. package/build/runtime-chromaticAberration-XNVWJQWI.js.gz +0 -0
  19. package/build/runtime-chunk-36CLBSQD.js +1 -0
  20. package/build/runtime-chunk-36CLBSQD.js.br +0 -0
  21. package/build/runtime-chunk-36CLBSQD.js.gz +0 -0
  22. package/build/{runtime-chunk-U44V7VUP.js → runtime-chunk-3AHB3XAD.js} +1 -1
  23. package/build/runtime-chunk-3AHB3XAD.js.br +0 -0
  24. package/build/runtime-chunk-3AHB3XAD.js.gz +0 -0
  25. package/build/{runtime-chunk-X2RYY6RX.js → runtime-chunk-3H2EF32R.js} +1 -1
  26. package/build/runtime-chunk-3H2EF32R.js.br +2 -0
  27. package/build/runtime-chunk-3H2EF32R.js.gz +0 -0
  28. package/build/{runtime-chunk-FUG375TP.js → runtime-chunk-66HDBRK4.js} +1 -1
  29. package/build/runtime-chunk-66HDBRK4.js.br +0 -0
  30. package/build/runtime-chunk-66HDBRK4.js.gz +0 -0
  31. package/build/{runtime-chunk-ZVGRIWWN.js → runtime-chunk-ACJIWRIH.js} +1 -1
  32. package/build/runtime-chunk-ACJIWRIH.js.br +0 -0
  33. package/build/runtime-chunk-ACJIWRIH.js.gz +0 -0
  34. package/build/{runtime-chunk-5NERARRS.js → runtime-chunk-AUIS3MRY.js} +1 -1
  35. package/build/runtime-chunk-AUIS3MRY.js.br +0 -0
  36. package/build/runtime-chunk-AUIS3MRY.js.gz +0 -0
  37. package/build/{runtime-chunk-NW3DVKBD.js → runtime-chunk-CKYSGX2V.js} +1 -1
  38. package/build/runtime-chunk-CKYSGX2V.js.br +0 -0
  39. package/build/runtime-chunk-CKYSGX2V.js.gz +0 -0
  40. package/build/{runtime-chunk-LOTNSNJT.js → runtime-chunk-DSXX6SLP.js} +1 -1
  41. package/build/runtime-chunk-DSXX6SLP.js.br +0 -0
  42. package/build/runtime-chunk-DSXX6SLP.js.gz +0 -0
  43. package/build/{runtime-chunk-RLNFCXMS.js → runtime-chunk-FAESWIXG.js} +1 -1
  44. package/build/runtime-chunk-FAESWIXG.js.br +0 -0
  45. package/build/runtime-chunk-FAESWIXG.js.gz +0 -0
  46. package/build/runtime-chunk-GXEXRQ6S.js +1 -0
  47. package/build/runtime-chunk-GXEXRQ6S.js.br +0 -0
  48. package/build/runtime-chunk-GXEXRQ6S.js.gz +0 -0
  49. package/build/{runtime-chunk-R6NZ3XSG.js → runtime-chunk-HEEYURNH.js} +1 -1
  50. package/build/runtime-chunk-HEEYURNH.js.br +0 -0
  51. package/build/runtime-chunk-HEEYURNH.js.gz +0 -0
  52. package/build/runtime-chunk-J53RQDYR.js +1 -0
  53. package/build/runtime-chunk-J53RQDYR.js.br +0 -0
  54. package/build/runtime-chunk-J53RQDYR.js.gz +0 -0
  55. package/build/{runtime-chunk-NEOF7SBZ.js → runtime-chunk-JKFC5GFF.js} +1 -1
  56. package/build/runtime-chunk-JKFC5GFF.js.br +0 -0
  57. package/build/runtime-chunk-JKFC5GFF.js.gz +0 -0
  58. package/build/runtime-chunk-JPQPMU3J.js +1 -0
  59. package/build/runtime-chunk-JPQPMU3J.js.br +0 -0
  60. package/build/runtime-chunk-JPQPMU3J.js.gz +0 -0
  61. package/build/{runtime-chunk-K5Q5TON3.js → runtime-chunk-K7TL4PIJ.js} +1 -1
  62. package/build/runtime-chunk-K7TL4PIJ.js.br +0 -0
  63. package/build/runtime-chunk-K7TL4PIJ.js.gz +0 -0
  64. package/build/runtime-chunk-KARVJCBP.js +1 -0
  65. package/build/runtime-chunk-KARVJCBP.js.br +0 -0
  66. package/build/runtime-chunk-KARVJCBP.js.gz +0 -0
  67. package/build/runtime-chunk-KHCWX7UM.js +1 -0
  68. package/build/runtime-chunk-KHCWX7UM.js.br +0 -0
  69. package/build/runtime-chunk-KHCWX7UM.js.gz +0 -0
  70. package/build/{runtime-chunk-S2A55QI5.js → runtime-chunk-KOR4TIQN.js} +1 -1
  71. package/build/runtime-chunk-KOR4TIQN.js.br +0 -0
  72. package/build/runtime-chunk-KOR4TIQN.js.gz +0 -0
  73. package/build/runtime-chunk-LSRIE5CU.js +1 -0
  74. package/build/runtime-chunk-LSRIE5CU.js.br +0 -0
  75. package/build/runtime-chunk-LSRIE5CU.js.gz +0 -0
  76. package/build/runtime-chunk-MTXG5LUQ.js +1 -0
  77. package/build/runtime-chunk-MTXG5LUQ.js.br +0 -0
  78. package/build/runtime-chunk-MTXG5LUQ.js.gz +0 -0
  79. package/build/runtime-chunk-PONAD3UD.js +1 -0
  80. package/build/runtime-chunk-PONAD3UD.js.br +0 -0
  81. package/build/runtime-chunk-PONAD3UD.js.gz +0 -0
  82. package/build/{runtime-chunk-EX3V3BQE.js → runtime-chunk-PYCMOG7D.js} +1 -1
  83. package/build/runtime-chunk-PYCMOG7D.js.br +0 -0
  84. package/build/runtime-chunk-PYCMOG7D.js.gz +0 -0
  85. package/build/{runtime-chunk-HUXCP2PU.js → runtime-chunk-QSWZYIFB.js} +1 -1
  86. package/build/runtime-chunk-QSWZYIFB.js.br +0 -0
  87. package/build/runtime-chunk-QSWZYIFB.js.gz +0 -0
  88. package/build/{runtime-chunk-QFWOD7KO.js → runtime-chunk-R6L7MCY3.js} +1 -1
  89. package/build/runtime-chunk-R6L7MCY3.js.br +0 -0
  90. package/build/runtime-chunk-R6L7MCY3.js.gz +0 -0
  91. package/build/{runtime-chunk-LUNJ7SLO.js → runtime-chunk-RUQ6SJPM.js} +1 -1
  92. package/build/runtime-chunk-RUQ6SJPM.js.br +0 -0
  93. package/build/runtime-chunk-RUQ6SJPM.js.gz +0 -0
  94. package/build/runtime-chunk-TEGAP3DX.js +1 -0
  95. package/build/runtime-chunk-TEGAP3DX.js.br +0 -0
  96. package/build/runtime-chunk-TEGAP3DX.js.gz +0 -0
  97. package/build/runtime-chunk-UI6FZJSE.js +1 -0
  98. package/build/runtime-chunk-UI6FZJSE.js.br +0 -0
  99. package/build/runtime-chunk-UI6FZJSE.js.gz +0 -0
  100. package/build/runtime-chunk-WHEALKAN.js +1 -0
  101. package/build/runtime-chunk-WHEALKAN.js.br +0 -0
  102. package/build/runtime-chunk-WHEALKAN.js.gz +0 -0
  103. package/build/{runtime-chunk-ABZUBC4Q.js → runtime-chunk-WMPEU73G.js} +1 -1
  104. package/build/runtime-chunk-WMPEU73G.js.br +0 -0
  105. package/build/runtime-chunk-WMPEU73G.js.gz +0 -0
  106. package/build/{runtime-chunk-F7Z2PGG5.js → runtime-chunk-XXDLMDCN.js} +1 -1
  107. package/build/runtime-chunk-XXDLMDCN.js.br +0 -0
  108. package/build/runtime-chunk-XXDLMDCN.js.gz +0 -0
  109. package/build/runtime-classicRuntime-OKLTCERD.js +1 -0
  110. package/build/runtime-classicRuntime-OKLTCERD.js.br +0 -0
  111. package/build/runtime-classicRuntime-OKLTCERD.js.gz +0 -0
  112. package/build/runtime-cloners-W6DM7SHL.js +1 -0
  113. package/build/runtime-cloners-W6DM7SHL.js.br +1 -0
  114. package/build/runtime-cloners-W6DM7SHL.js.gz +0 -0
  115. package/build/{runtime-components-BK66NQJV.js → runtime-components-64WWNUFT.js} +1 -1
  116. package/build/runtime-components-64WWNUFT.js.br +0 -0
  117. package/build/runtime-components-64WWNUFT.js.gz +0 -0
  118. package/build/{runtime-conditional-NND2FHP6.js → runtime-conditional-SK6JLPTN.js} +1 -1
  119. package/build/runtime-conditional-SK6JLPTN.js.br +0 -0
  120. package/build/runtime-conditional-SK6JLPTN.js.gz +0 -0
  121. package/build/runtime-createDestroy-TRMSN4GV.js +1 -0
  122. package/build/runtime-createDestroy-TRMSN4GV.js.br +0 -0
  123. package/build/runtime-createDestroy-TRMSN4GV.js.gz +0 -0
  124. package/build/{runtime-depthOfField-DGZKNDXA.js → runtime-depthOfField-V2X263JE.js} +1 -1
  125. package/build/runtime-depthOfField-V2X263JE.js.br +0 -0
  126. package/build/runtime-depthOfField-V2X263JE.js.gz +0 -0
  127. package/build/runtime-dragDrop-YPF34K77.js +1 -0
  128. package/build/runtime-dragDrop-YPF34K77.js.br +0 -0
  129. package/build/runtime-dragDrop-YPF34K77.js.gz +0 -0
  130. package/build/runtime-gameControls-TZIFAJNU.js +1 -0
  131. package/build/runtime-gameControls-TZIFAJNU.js.br +0 -0
  132. package/build/runtime-gameControls-TZIFAJNU.js.gz +0 -0
  133. package/build/runtime-hair-ZA7YFZ6E.js +1 -0
  134. package/build/runtime-hair-ZA7YFZ6E.js.br +1 -0
  135. package/build/runtime-hair-ZA7YFZ6E.js.gz +0 -0
  136. package/build/{runtime-hueSaturation-GPYT2K2E.js → runtime-hueSaturation-YSHDI5JV.js} +1 -1
  137. package/build/runtime-hueSaturation-YSHDI5JV.js.br +0 -0
  138. package/build/runtime-hueSaturation-YSHDI5JV.js.gz +0 -0
  139. package/build/{runtime-mergeStaticGeometries-O7VWNRBZ.js → runtime-mergeStaticGeometries-Y65NWJFJ.js} +1 -1
  140. package/build/runtime-mergeStaticGeometries-Y65NWJFJ.js.br +0 -0
  141. package/build/runtime-mergeStaticGeometries-Y65NWJFJ.js.gz +0 -0
  142. package/build/runtime-miscActions-MOVRBNCH.js +1 -0
  143. package/build/runtime-miscActions-MOVRBNCH.js.br +0 -0
  144. package/build/runtime-miscActions-MOVRBNCH.js.gz +0 -0
  145. package/build/runtime-mouseHover-GER5PBUZ.js +1 -0
  146. package/build/runtime-mouseHover-GER5PBUZ.js.br +0 -0
  147. package/build/runtime-mouseHover-GER5PBUZ.js.gz +0 -0
  148. package/build/{runtime-noise-6E6M63VS.js → runtime-noise-QZ2I3334.js} +1 -1
  149. package/build/runtime-noise-QZ2I3334.js.br +0 -0
  150. package/build/runtime-noise-QZ2I3334.js.gz +0 -0
  151. package/build/{runtime-particles-MD7UPOIE.js → runtime-particles-CHBC6DAR.js} +1 -1
  152. package/build/runtime-particles-CHBC6DAR.js.br +0 -0
  153. package/build/runtime-particles-CHBC6DAR.js.gz +0 -0
  154. package/build/{runtime-paths-7ACRUYG4.js → runtime-paths-PVIXWENH.js} +1 -1
  155. package/build/runtime-paths-PVIXWENH.js.br +0 -0
  156. package/build/runtime-paths-PVIXWENH.js.gz +0 -0
  157. package/build/{runtime-pixelation-NWN63YGU.js → runtime-pixelation-VQFF744B.js} +1 -1
  158. package/build/runtime-pixelation-VQFF744B.js.br +0 -0
  159. package/build/runtime-pixelation-VQFF744B.js.gz +0 -0
  160. package/build/runtime-resize-BXJTXBND.js +1 -0
  161. package/build/runtime-resize-BXJTXBND.js.br +0 -0
  162. package/build/runtime-resize-BXJTXBND.js.gz +0 -0
  163. package/build/runtime-sceneTransition-M7OWS6T4.js +1 -0
  164. package/build/runtime-sceneTransition-M7OWS6T4.js.br +0 -0
  165. package/build/runtime-sceneTransition-M7OWS6T4.js.gz +0 -0
  166. package/build/runtime-scroll-XEQZHHLW.js +1 -0
  167. package/build/runtime-scroll-XEQZHHLW.js.br +0 -0
  168. package/build/runtime-scroll-XEQZHHLW.js.gz +0 -0
  169. package/build/runtime-shapeBlends-OPZDOAMP.js +1 -0
  170. package/build/runtime-shapeBlends-OPZDOAMP.js.br +0 -0
  171. package/build/runtime-shapeBlends-OPZDOAMP.js.gz +0 -0
  172. package/build/{runtime-text-DFWD2SPU.js → runtime-text-NV4Q5BBQ.js} +1 -1
  173. package/build/runtime-text-NV4Q5BBQ.js.br +0 -0
  174. package/build/runtime-text-NV4Q5BBQ.js.gz +0 -0
  175. package/build/runtime-textInputs-COZOCG5V.js +1 -0
  176. package/build/runtime-textInputs-COZOCG5V.js.br +0 -0
  177. package/build/runtime-textInputs-COZOCG5V.js.gz +0 -0
  178. package/build/runtime-timeline-MPAYKXWO.js +1 -0
  179. package/build/runtime-timeline-MPAYKXWO.js.br +0 -0
  180. package/build/runtime-timeline-MPAYKXWO.js.gz +0 -0
  181. package/build/runtime-tracking-M7CHXAE5.js +1 -0
  182. package/build/runtime-tracking-M7CHXAE5.js.br +0 -0
  183. package/build/runtime-tracking-M7CHXAE5.js.gz +0 -0
  184. package/build/runtime-transitions-OBLPSHIH.js +1 -0
  185. package/build/runtime-transitions-OBLPSHIH.js.br +0 -0
  186. package/build/runtime-transitions-OBLPSHIH.js.gz +0 -0
  187. package/build/{runtime-ui2d-2JS74EKD.js → runtime-ui2d-OV6PGPLG.js} +1 -1
  188. package/build/runtime-ui2d-OV6PGPLG.js.br +0 -0
  189. package/build/runtime-ui2d-OV6PGPLG.js.gz +0 -0
  190. package/build/{runtime-updater-KWRKWDYN.js → runtime-updater-RCOMZLTB.js} +1 -1
  191. package/build/runtime-updater-RCOMZLTB.js.br +3 -0
  192. package/build/runtime-updater-RCOMZLTB.js.gz +0 -0
  193. package/build/runtime-variables-DJUQPZDB.js +1 -0
  194. package/build/runtime-variables-DJUQPZDB.js.br +0 -0
  195. package/build/runtime-variables-DJUQPZDB.js.gz +0 -0
  196. package/build/{runtime-vectorShapes-YCCEKO2X.js → runtime-vectorShapes-2N52XZYF.js} +1 -1
  197. package/build/runtime-vectorShapes-2N52XZYF.js.br +0 -0
  198. package/build/runtime-vectorShapes-2N52XZYF.js.gz +0 -0
  199. package/build/{runtime-video-BMREJ4XX.js → runtime-video-U5RS7HHJ.js} +1 -1
  200. package/build/runtime-video-U5RS7HHJ.js.br +0 -0
  201. package/build/runtime-video-U5RS7HHJ.js.gz +0 -0
  202. package/build/{runtime-vignette-TU2E5T6G.js → runtime-vignette-TYITST5S.js} +1 -1
  203. package/build/runtime-vignette-TYITST5S.js.br +0 -0
  204. package/build/runtime-vignette-TYITST5S.js.gz +0 -0
  205. package/build/runtime-webgpu-CBYAHAHI.js +1 -0
  206. package/build/runtime-webgpu-CBYAHAHI.js.br +0 -0
  207. package/build/runtime-webgpu-CBYAHAHI.js.gz +0 -0
  208. package/build/runtime.cjs +369 -369
  209. package/build/runtime.js +1 -1
  210. package/build/runtime.js.br +0 -0
  211. package/build/runtime.js.gz +0 -0
  212. package/build/runtime.standalone.js +1 -1
  213. package/build/runtime.standalone.js.br +0 -0
  214. package/build/runtime.standalone.js.gz +0 -0
  215. package/build/runtime.standalone.webgl.js +1 -1
  216. package/build/runtime.standalone.webgl.js.br +0 -0
  217. package/build/runtime.standalone.webgl.js.gz +0 -0
  218. package/build/runtime.standalone.webgpu.js +1 -1
  219. package/build/runtime.standalone.webgpu.js.br +0 -0
  220. package/build/runtime.standalone.webgpu.js.gz +0 -0
  221. package/build/runtime.standalone.webgpu.micro.js +1 -1
  222. package/build/runtime.standalone.webgpu.micro.js.br +0 -0
  223. package/build/runtime.standalone.webgpu.micro.js.gz +0 -0
  224. package/build/runtime.standalone.webgpu.min.js +1 -1
  225. package/build/runtime.standalone.webgpu.min.js.br +0 -0
  226. package/build/runtime.standalone.webgpu.min.js.gz +0 -0
  227. package/package.json +1 -1
  228. package/build/runtime-aiAssistant-DBCVWUEB.js.br +0 -0
  229. package/build/runtime-aiAssistant-DBCVWUEB.js.gz +0 -0
  230. package/build/runtime-apiServices-JU3DOVOS.js.br +0 -0
  231. package/build/runtime-apiServices-JU3DOVOS.js.gz +0 -0
  232. package/build/runtime-audio-LJOR4W23.js.br +0 -0
  233. package/build/runtime-audio-LJOR4W23.js.gz +0 -0
  234. package/build/runtime-bloom-QSFMSJ75.js.br +0 -0
  235. package/build/runtime-bloom-QSFMSJ75.js.gz +0 -0
  236. package/build/runtime-brightnessContrast-RCY3ODPF.js.br +0 -0
  237. package/build/runtime-brightnessContrast-RCY3ODPF.js.gz +0 -0
  238. package/build/runtime-chromaticAberration-SY5X27ML.js.br +0 -0
  239. package/build/runtime-chromaticAberration-SY5X27ML.js.gz +0 -0
  240. package/build/runtime-chunk-2AEIM2G4.js +0 -1
  241. package/build/runtime-chunk-2AEIM2G4.js.br +0 -0
  242. package/build/runtime-chunk-2AEIM2G4.js.gz +0 -0
  243. package/build/runtime-chunk-5CZ6MFAW.js +0 -1
  244. package/build/runtime-chunk-5CZ6MFAW.js.br +0 -0
  245. package/build/runtime-chunk-5CZ6MFAW.js.gz +0 -0
  246. package/build/runtime-chunk-5NERARRS.js.br +0 -0
  247. package/build/runtime-chunk-5NERARRS.js.gz +0 -0
  248. package/build/runtime-chunk-ABZUBC4Q.js.br +0 -0
  249. package/build/runtime-chunk-ABZUBC4Q.js.gz +0 -0
  250. package/build/runtime-chunk-AL2HGNMV.js +0 -1
  251. package/build/runtime-chunk-AL2HGNMV.js.br +0 -0
  252. package/build/runtime-chunk-AL2HGNMV.js.gz +0 -0
  253. package/build/runtime-chunk-EX3V3BQE.js.br +0 -0
  254. package/build/runtime-chunk-EX3V3BQE.js.gz +0 -0
  255. package/build/runtime-chunk-F7Z2PGG5.js.br +0 -0
  256. package/build/runtime-chunk-F7Z2PGG5.js.gz +0 -0
  257. package/build/runtime-chunk-FUG375TP.js.br +0 -0
  258. package/build/runtime-chunk-FUG375TP.js.gz +0 -0
  259. package/build/runtime-chunk-HEZ7K3CW.js +0 -1
  260. package/build/runtime-chunk-HEZ7K3CW.js.br +0 -0
  261. package/build/runtime-chunk-HEZ7K3CW.js.gz +0 -0
  262. package/build/runtime-chunk-HUXCP2PU.js.br +0 -0
  263. package/build/runtime-chunk-HUXCP2PU.js.gz +0 -0
  264. package/build/runtime-chunk-JBTA64YE.js +0 -1
  265. package/build/runtime-chunk-JBTA64YE.js.br +0 -0
  266. package/build/runtime-chunk-JBTA64YE.js.gz +0 -0
  267. package/build/runtime-chunk-JRDX2TFU.js +0 -1
  268. package/build/runtime-chunk-JRDX2TFU.js.br +0 -0
  269. package/build/runtime-chunk-JRDX2TFU.js.gz +0 -0
  270. package/build/runtime-chunk-K5Q5TON3.js.br +0 -0
  271. package/build/runtime-chunk-K5Q5TON3.js.gz +0 -0
  272. package/build/runtime-chunk-LOTNSNJT.js.br +0 -0
  273. package/build/runtime-chunk-LOTNSNJT.js.gz +0 -0
  274. package/build/runtime-chunk-LUNJ7SLO.js.br +0 -0
  275. package/build/runtime-chunk-LUNJ7SLO.js.gz +0 -0
  276. package/build/runtime-chunk-NEOF7SBZ.js.br +0 -0
  277. package/build/runtime-chunk-NEOF7SBZ.js.gz +0 -0
  278. package/build/runtime-chunk-NW3DVKBD.js.br +0 -0
  279. package/build/runtime-chunk-NW3DVKBD.js.gz +0 -0
  280. package/build/runtime-chunk-ODYXBVNJ.js +0 -1
  281. package/build/runtime-chunk-ODYXBVNJ.js.br +0 -0
  282. package/build/runtime-chunk-ODYXBVNJ.js.gz +0 -0
  283. package/build/runtime-chunk-OKPYRW23.js +0 -1
  284. package/build/runtime-chunk-OKPYRW23.js.br +0 -0
  285. package/build/runtime-chunk-OKPYRW23.js.gz +0 -0
  286. package/build/runtime-chunk-PNJ7AF7H.js +0 -1
  287. package/build/runtime-chunk-PNJ7AF7H.js.br +0 -0
  288. package/build/runtime-chunk-PNJ7AF7H.js.gz +0 -0
  289. package/build/runtime-chunk-QFWOD7KO.js.br +0 -0
  290. package/build/runtime-chunk-QFWOD7KO.js.gz +0 -0
  291. package/build/runtime-chunk-R6NZ3XSG.js.br +0 -0
  292. package/build/runtime-chunk-R6NZ3XSG.js.gz +0 -0
  293. package/build/runtime-chunk-RLNFCXMS.js.br +0 -0
  294. package/build/runtime-chunk-RLNFCXMS.js.gz +0 -0
  295. package/build/runtime-chunk-S2A55QI5.js.br +0 -0
  296. package/build/runtime-chunk-S2A55QI5.js.gz +0 -0
  297. package/build/runtime-chunk-S6IQT6ZF.js +0 -1
  298. package/build/runtime-chunk-S6IQT6ZF.js.br +0 -0
  299. package/build/runtime-chunk-S6IQT6ZF.js.gz +0 -0
  300. package/build/runtime-chunk-U44V7VUP.js.br +0 -0
  301. package/build/runtime-chunk-U44V7VUP.js.gz +0 -0
  302. package/build/runtime-chunk-VKXOW65P.js +0 -1
  303. package/build/runtime-chunk-VKXOW65P.js.br +0 -0
  304. package/build/runtime-chunk-VKXOW65P.js.gz +0 -0
  305. package/build/runtime-chunk-WL2OAQWT.js +0 -1
  306. package/build/runtime-chunk-WL2OAQWT.js.br +0 -0
  307. package/build/runtime-chunk-WL2OAQWT.js.gz +0 -0
  308. package/build/runtime-chunk-X2RYY6RX.js.br +0 -2
  309. package/build/runtime-chunk-X2RYY6RX.js.gz +0 -0
  310. package/build/runtime-chunk-ZGFKGE5W.js +0 -1
  311. package/build/runtime-chunk-ZGFKGE5W.js.br +0 -0
  312. package/build/runtime-chunk-ZGFKGE5W.js.gz +0 -0
  313. package/build/runtime-chunk-ZVGRIWWN.js.br +0 -2
  314. package/build/runtime-chunk-ZVGRIWWN.js.gz +0 -0
  315. package/build/runtime-classicRuntime-BHVGEBZ6.js +0 -1
  316. package/build/runtime-classicRuntime-BHVGEBZ6.js.br +0 -0
  317. package/build/runtime-classicRuntime-BHVGEBZ6.js.gz +0 -0
  318. package/build/runtime-cloners-FJTKSHFU.js +0 -1
  319. package/build/runtime-cloners-FJTKSHFU.js.br +0 -0
  320. package/build/runtime-cloners-FJTKSHFU.js.gz +0 -0
  321. package/build/runtime-components-BK66NQJV.js.br +0 -0
  322. package/build/runtime-components-BK66NQJV.js.gz +0 -0
  323. package/build/runtime-conditional-NND2FHP6.js.br +0 -0
  324. package/build/runtime-conditional-NND2FHP6.js.gz +0 -0
  325. package/build/runtime-createDestroy-3IH64YKQ.js +0 -1
  326. package/build/runtime-createDestroy-3IH64YKQ.js.br +0 -0
  327. package/build/runtime-createDestroy-3IH64YKQ.js.gz +0 -0
  328. package/build/runtime-depthOfField-DGZKNDXA.js.br +0 -0
  329. package/build/runtime-depthOfField-DGZKNDXA.js.gz +0 -0
  330. package/build/runtime-dragDrop-7Z2LIYWZ.js +0 -1
  331. package/build/runtime-dragDrop-7Z2LIYWZ.js.br +0 -0
  332. package/build/runtime-dragDrop-7Z2LIYWZ.js.gz +0 -0
  333. package/build/runtime-gameControls-RTBNWQU7.js +0 -1
  334. package/build/runtime-gameControls-RTBNWQU7.js.br +0 -0
  335. package/build/runtime-gameControls-RTBNWQU7.js.gz +0 -0
  336. package/build/runtime-hair-OMZLXFFY.js +0 -1
  337. package/build/runtime-hair-OMZLXFFY.js.br +0 -2
  338. package/build/runtime-hair-OMZLXFFY.js.gz +0 -0
  339. package/build/runtime-hueSaturation-GPYT2K2E.js.br +0 -0
  340. package/build/runtime-hueSaturation-GPYT2K2E.js.gz +0 -0
  341. package/build/runtime-mergeStaticGeometries-O7VWNRBZ.js.br +0 -0
  342. package/build/runtime-mergeStaticGeometries-O7VWNRBZ.js.gz +0 -0
  343. package/build/runtime-miscActions-F5VEWDWC.js +0 -1
  344. package/build/runtime-miscActions-F5VEWDWC.js.br +0 -0
  345. package/build/runtime-miscActions-F5VEWDWC.js.gz +0 -0
  346. package/build/runtime-mouseHover-C4JRDB5P.js +0 -1
  347. package/build/runtime-mouseHover-C4JRDB5P.js.br +0 -0
  348. package/build/runtime-mouseHover-C4JRDB5P.js.gz +0 -0
  349. package/build/runtime-noise-6E6M63VS.js.br +0 -0
  350. package/build/runtime-noise-6E6M63VS.js.gz +0 -0
  351. package/build/runtime-particles-MD7UPOIE.js.br +0 -0
  352. package/build/runtime-particles-MD7UPOIE.js.gz +0 -0
  353. package/build/runtime-paths-7ACRUYG4.js.br +0 -0
  354. package/build/runtime-paths-7ACRUYG4.js.gz +0 -0
  355. package/build/runtime-pixelation-NWN63YGU.js.br +0 -0
  356. package/build/runtime-pixelation-NWN63YGU.js.gz +0 -0
  357. package/build/runtime-resize-PLIXP66B.js +0 -1
  358. package/build/runtime-resize-PLIXP66B.js.br +0 -0
  359. package/build/runtime-resize-PLIXP66B.js.gz +0 -0
  360. package/build/runtime-sceneTransition-KU7DBITG.js +0 -1
  361. package/build/runtime-sceneTransition-KU7DBITG.js.br +0 -0
  362. package/build/runtime-sceneTransition-KU7DBITG.js.gz +0 -0
  363. package/build/runtime-scroll-NOD7PULW.js +0 -1
  364. package/build/runtime-scroll-NOD7PULW.js.br +0 -0
  365. package/build/runtime-scroll-NOD7PULW.js.gz +0 -0
  366. package/build/runtime-shapeBlends-LADW256G.js +0 -1
  367. package/build/runtime-shapeBlends-LADW256G.js.br +0 -0
  368. package/build/runtime-shapeBlends-LADW256G.js.gz +0 -0
  369. package/build/runtime-text-DFWD2SPU.js.br +0 -0
  370. package/build/runtime-text-DFWD2SPU.js.gz +0 -0
  371. package/build/runtime-textInputs-KLOOCJ3R.js +0 -1
  372. package/build/runtime-textInputs-KLOOCJ3R.js.br +0 -0
  373. package/build/runtime-textInputs-KLOOCJ3R.js.gz +0 -0
  374. package/build/runtime-timeline-GAOPWXAQ.js +0 -1
  375. package/build/runtime-timeline-GAOPWXAQ.js.br +0 -0
  376. package/build/runtime-timeline-GAOPWXAQ.js.gz +0 -0
  377. package/build/runtime-tracking-T7KJ7NF7.js +0 -1
  378. package/build/runtime-tracking-T7KJ7NF7.js.br +0 -0
  379. package/build/runtime-tracking-T7KJ7NF7.js.gz +0 -0
  380. package/build/runtime-transitions-QQX2X2NI.js +0 -1
  381. package/build/runtime-transitions-QQX2X2NI.js.br +0 -0
  382. package/build/runtime-transitions-QQX2X2NI.js.gz +0 -0
  383. package/build/runtime-ui2d-2JS74EKD.js.br +0 -0
  384. package/build/runtime-ui2d-2JS74EKD.js.gz +0 -0
  385. package/build/runtime-updater-KWRKWDYN.js.br +0 -1
  386. package/build/runtime-updater-KWRKWDYN.js.gz +0 -0
  387. package/build/runtime-variables-S6VNWBXR.js +0 -1
  388. package/build/runtime-variables-S6VNWBXR.js.br +0 -0
  389. package/build/runtime-variables-S6VNWBXR.js.gz +0 -0
  390. package/build/runtime-vectorShapes-YCCEKO2X.js.br +0 -0
  391. package/build/runtime-vectorShapes-YCCEKO2X.js.gz +0 -0
  392. package/build/runtime-video-BMREJ4XX.js.br +0 -0
  393. package/build/runtime-video-BMREJ4XX.js.gz +0 -0
  394. package/build/runtime-vignette-TU2E5T6G.js.br +0 -0
  395. package/build/runtime-vignette-TU2E5T6G.js.gz +0 -0
  396. package/build/runtime-webgpu-5MIPMGNR.js +0 -1
  397. package/build/runtime-webgpu-5MIPMGNR.js.br +0 -0
  398. package/build/runtime-webgpu-5MIPMGNR.js.gz +0 -0
@@ -0,0 +1 @@
1
+ import{a as t}from"./runtime-chunk-AUIS3MRY.js";import{b as e}from"./runtime-chunk-J53RQDYR.js";import{H as r,ea as i}from"./runtime-chunk-WMPEU73G.js";import{f as n,v as s}from"./runtime-chunk-KARVJCBP.js";import{c as o}from"./runtime-chunk-RTLL6WIB.js";import{c as a}from"./runtime-chunk-2PT2WH66.js";import{L as l}from"./runtime-chunk-KHCWX7UM.js";import{Cc as h,Ec as c,Fc as d,Oc as u,Pc as p,Rc as m,Wc as f,qd as y}from"./runtime-chunk-BVVSZMXD.js";import{a as b,b as g}from"./runtime-chunk-ML3Z74BL.js";var x=g(b((t,e)=>{var r,i;r=t,i=function(){return t.importState=function(e){var r=new t;return r.importState(e),r},t;function t(){return function(t){var e=0,r=0,i=0,n=1;0==t.length&&(t=[+new Date]);var s=function(){var t=4022871197,e=function(e){e=e.toString();for(var r=0;r<e.length;r++){var i=.02519603282416938*(t+=e.charCodeAt(r));i-=t=i>>>0,t=(i*=t)>>>0,t+=4294967296*(i-=t)}return 2.3283064365386963e-10*(t>>>0)};return e.version="Mash 0.9",e}();e=s(" "),r=s(" "),i=s(" ");for(var o=0;o<t.length;o++)(e-=s(t[o]))<0&&(e+=1),(r-=s(t[o]))<0&&(r+=1),(i-=s(t[o]))<0&&(i+=1);s=null;var a=function(){var t=2091639*e+2.3283064365386963e-10*n;return e=r,r=i,i=t-(n=0|t)};return a.next=a,a.uint32=function(){return 4294967296*a()},a.fract53=function(){return a()+11102230246251565e-32*(2097152*a()|0)},a.version="Alea 0.9",a.args=t,a.exportState=function(){return[e,r,i,n]},a.importState=function(t){e=+t[0]||0,r=+t[1]||0,i=+t[2]||0,n=+t[3]||0},a}(Array.prototype.slice.call(arguments))}},"object"==typeof t?e.exports=i():"function"==typeof define&&define.amd?define(i):r.Alea=i()})()),v=.5*(Math.sqrt(3)-1),M=(3-Math.sqrt(3))/6,w=1/3,A=1/6,S=(Math.sqrt(5),Math.sqrt(5),t=>0|Math.floor(t)),j=new Float64Array([1,1,-1,1,1,-1,-1,-1,1,0,-1,0,1,0,-1,0,0,1,0,-1,0,1,0,-1]),F=new Float64Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0,1,0,1,-1,0,1,1,0,-1,-1,0,-1,0,1,1,0,-1,1,0,1,-1,0,-1,-1]);function _(t){let e=new Uint8Array(512);for(let t=0;t<256;t++)e[t]=t;for(let r=0;r<255;r++){let i=r+~~(t()*(256-r)),n=e[r];e[r]=e[i],e[i]=n}for(let t=256;t<512;t++)e[t]=e[t-256];return e}var z=new f,C=class{constructor(t){this.weightAttribute=null;let e=t.geometry;if(!e.isBufferGeometry||3!==e.attributes.position.itemSize)throw new Error("THREE.MeshSurfaceSampler: Requires BufferGeometry triangle mesh.");e.index&&(e=e.toNonIndexed()),this.geometry=e,this.randomFunction=Math.random,this.positionAttribute=this.geometry.getAttribute("position"),this.distribution=null}build(){let t=this.positionAttribute,e=new Float32Array(t.count/3);for(let r=0;r<t.count;r+=3){let i=1;z.a.fromBufferAttribute(t,r),z.b.fromBufferAttribute(t,r+1),z.c.fromBufferAttribute(t,r+2),i*=z.getArea(),e[r/3]=i}this.distribution=new Float32Array(t.count/3);let r=0;for(let t=0;t<e.length;t++)r+=e[t],this.distribution[t]=r;return this}setRandomGenerator(t){return this.randomFunction=t,this}sample(t,e){if(this.distribution){let r=this.distribution[this.distribution.length-1],i=this.binarySearch(this.randomFunction()*r);return this.sampleFace(i,t,e)}}binarySearch(t){if(!this.distribution)return 0;let e=this.distribution,r=0,i=e.length-1,n=-1;for(;r<=i;){let s=Math.ceil((r+i)/2);if(0===s||e[s-1]<=t&&e[s]>t){n=s;break}t<e[s]?i=s-1:r=s+1}return n}sampleFace(t,e,r){let i=this.randomFunction(),n=this.randomFunction();return i+n>1&&(i=1-i,n=1-n),z.a.fromBufferAttribute(this.positionAttribute,3*t),z.b.fromBufferAttribute(this.positionAttribute,3*t+1),z.c.fromBufferAttribute(this.positionAttribute,3*t+2),e.set(0,0,0).addScaledVector(z.a,i).addScaledVector(z.b,n).addScaledVector(z.c,1-(i+n)),z.getNormal(r),this}},W={x:[1,0,0],"-x":[-1,0,0],y:[0,1,0],"-y":[0,-1,0],z:[0,0,1],"-z":[0,0,-1]},O={polygon_center:0,edge:1,vertex:2},P=(t,e)=>(r,i)=>e&&0!==r&&0!==t?t*i/100:0,N=(t,e)=>{let r=Math.abs(e),i=-1*r;return(t- -1)*(r-i)/2+i},R=new d,T=new d,V=new d,B=new d;function k(t,e){let r=V.fromArray(t),i=B.fromArray(e);T.copy(i).sub(r);let n=T.length();return T.normalize().multiplyScalar(.5*n),R.copy(r).add(T).toArray()}var U,I,D,q,E=new f,L=new d,G=new d,$=new d,H=class extends y{},J=class extends H{constructor(t,e){super(void 0,void 0,e),this.source=t,this.isClonerInstancedMesh=!0,this.pivotMatrix=new u,this.previousModelViewMatrix=new u,this.copyPreviousMatrix=!0,this.capacity=e,this.count=0,this.matrixAutoUpdate=!1}raycast(t,e){}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.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 r=this.parent;if(t&&null!==r&&r.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorld.multiply(this.pivotMatrix),e)for(let t of this.children)t.updateWorldMatrix(!1,!0)}onAfterRender(t,e,r,i,n,s){this.copyPreviousMatrix&&this.previousModelViewMatrix.copy(this.modelViewMatrix)}get visible(){return!0!==this.source.cloner?.insideBoolean&&(this.source.visible||this.source.dataPatched.visible&&!0===this.source.dataPatched.cloner?.hideBase)}set visible(t){}get castShadow(){return this.source.castShadow}set castShadow(t){}get receiveShadow(){return this.source.receiveShadow}set receiveShadow(t){}get layers(){return this.source.layers}set layers(t){}get geometry(){return this.source.geometry}set geometry(t){}get material(){return this.source.material}set material(t){}get morphTargetInfluences(){return this.source.morphTargetInfluences}set morphTargetInfluences(t){}},K=t=>.5*(1-Math.cos(t*Math.PI)),Q=class{constructor(){this.perlin=new Array(4096)}noise(t,e=0,r=0){if(null==this.perlin){this.perlin=new Array(4096);for(let t=0;t<4096;t++)this.perlin[t]=Math.random()}t<0&&(t=-t),e<0&&(e=-e),r<0&&(r=-r);let i,n,s,o,a,l=Math.floor(t),h=Math.floor(e),c=Math.floor(r),d=t-l,u=e-h,p=r-c,m=0,f=.5;for(let t=0;t<4;t++){let t=l+(h<<4)+(c<<8);i=K(d),n=K(u),s=this.perlin[4095&t],s+=i*(this.perlin[t+1&4095]-s),o=this.perlin[t+16&4095],o+=i*(this.perlin[t+16+1&4095]-o),s+=n*(o-s),t+=256,o=this.perlin[4095&t],o+=i*(this.perlin[t+1&4095]-o),a=this.perlin[t+16&4095],a+=i*(this.perlin[t+16+1&4095]-a),o+=n*(a-o),s+=K(p)*(o-s),m+=s*f,f*=.5,l<<=1,d*=2,h<<=1,u*=2,c<<=1,p*=2,d>=1&&(l++,d--),u>=1&&(h++,u--),p>=1&&(c++,p--)}return m}noiseSeed(t){let e=(()=>{let t,e;return{setSeed(r){e=t=(r??4294967296*Math.random())>>>0},getSeed:()=>t,rand:()=>(e=(1664525*e+1013904223)%4294967296,e/4294967296)}})();e.setSeed(t),this.perlin=new Array(4096);for(let t=0;t<4096;t++)this.perlin[t]=e.rand()}},X=1e-4,Y=new d,Z=new d;r.then(t=>{I=[(U=t).get_face_center,U.get_edge_midpoint,U.get_vertex_position],D=[U.get_face_normal,U.get_edge_normal,U.get_vertex_normal],q=[U.face_count,U.edge_count,U.vertex_count]}),new u;var tt=new u,et=new u,rt=new u,it=new u,nt=new u,st=new u,ot=new d,at=new d,lt=new d,ht=new d,ct=new d,dt=new d,ut=new d,pt=new d,mt=new d,ft=new d,yt=new d,bt=new p,gt=new c;function xt(t){return t?t.version??t.data?.version??0:-1}function vt(t,e){return["number"==typeof t?.[0]?t[0]:"string"==typeof t?.[0]&&e?parseFloat(String(e.shared.getVariable(t[0])??"0")):0,"number"==typeof t?.[1]?t[1]:"string"==typeof t?.[1]&&e?parseFloat(String(e.shared.getVariable(t[1])??"0")):0,"number"==typeof t?.[2]?t[2]:"string"==typeof t?.[2]&&e?parseFloat(String(e.shared.getVariable(t[2])??"0")):0]}var Mt=class{constructor(t,e){this.data=t,this.is3D=e,this.perlin=new Q,"perlin"===t.noiseType?(this.perlin.noiseSeed(t.seed),this.noise=e?(t,e,r)=>this.perlin.noise(t,e,r):t=>this.perlin.noise(t)):this.noise=e?function(t=Math.random){let e=_(t),r=new Float64Array(e).map(t=>F[t%12*3]),i=new Float64Array(e).map(t=>F[t%12*3+1]),n=new Float64Array(e).map(t=>F[t%12*3+2]);return function(t,s,o){let a,l,h,c,d,u,p,m,f,y,b=(t+s+o)*w,g=S(t+b),x=S(s+b),v=S(o+b),M=(g+x+v)*A,j=t-(g-M),F=s-(x-M),_=o-(v-M);j>=F?F>=_?(d=1,u=0,p=0,m=1,f=1,y=0):j>=_?(d=1,u=0,p=0,m=1,f=0,y=1):(d=0,u=0,p=1,m=1,f=0,y=1):F<_?(d=0,u=0,p=1,m=0,f=1,y=1):j<_?(d=0,u=1,p=0,m=0,f=1,y=1):(d=0,u=1,p=0,m=1,f=1,y=0);let z=j-d+A,C=F-u+A,W=_-p+A,O=j-m+2*A,P=F-f+2*A,N=_-y+2*A,R=j-1+.5,T=F-1+.5,V=_-1+.5,B=255&g,k=255&x,U=255&v,I=.6-j*j-F*F-_*_;if(I<0)a=0;else{let t=B+e[k+e[U]];I*=I,a=I*I*(r[t]*j+i[t]*F+n[t]*_)}let D=.6-z*z-C*C-W*W;if(D<0)l=0;else{let t=B+d+e[k+u+e[U+p]];D*=D,l=D*D*(r[t]*z+i[t]*C+n[t]*W)}let q=.6-O*O-P*P-N*N;if(q<0)h=0;else{let t=B+m+e[k+f+e[U+y]];q*=q,h=q*q*(r[t]*O+i[t]*P+n[t]*N)}let E=.6-R*R-T*T-V*V;if(E<0)c=0;else{let t=B+1+e[k+1+e[U+1]];E*=E,c=E*E*(r[t]*R+i[t]*T+n[t]*V)}return 32*(a+l+h+c)}}((0,x.default)(t.seed)):function(t=Math.random){let e=_(t),r=new Float64Array(e).map(t=>j[t%12*2]),i=new Float64Array(e).map(t=>j[t%12*2+1]);return function(t,n){let s,o,a=0,l=0,h=0,c=(t+n)*v,d=S(t+c),u=S(n+c),p=(d+u)*M,m=t-(d-p),f=n-(u-p);m>f?(s=1,o=0):(s=0,o=1);let y=m-s+M,b=f-o+M,g=m-1+2*M,x=f-1+2*M,w=255&d,A=255&u,j=.5-m*m-f*f;if(j>=0){let t=w+e[A];j*=j,a=j*j*(r[t]*m+i[t]*f)}let F=.5-y*y-b*b;if(F>=0){let t=w+s+e[A+o];F*=F,l=F*F*(r[t]*y+i[t]*b)}let _=.5-g*g-x*x;if(_>=0){let t=w+1+e[A+1];_*=_,h=_*_*(r[t]*g+i[t]*x)}return 70*(a+l+h)}}((0,x.default)(t.seed??""))}},wt=class extends(n(m)){constructor(t,e){super(),this.parameters=e,this.isCloner=!0,this.objectForSample=void 0,this._pendingMediaLoad=!1,this.random=null,this.surfaceSamplerCache=null,this.surfacePointsCache=null,this.object=t}resetOnMove(){this.removeFromParent(),this.parent=null}removeFromParent(){return super.removeFromParent(),this.instancedMesh?.removeFromParent(),this}dispose(){this.removeFromParent(),this._disposeInstancedMesh(),this._invalidateBoolean()}_invalidateBoolean(){this.object instanceof s&&this.object.onClonerLayoutUpdated()}expandClones(t){if(null===this.parent)this.updateState(this.parameters,t);else{for(let t of this.children)t instanceof i&&t.expand();this._syncInstancedMesh()}}invalidateTransform(t){this.matrixWorldNeedsUpdate=!0}onObjUpdateMatrix(){"toObject"!==this.parameters.type&&(this.matrixWorldNeedsUpdate=!0)}update(t){switch(this._updateCount(t),this.parameters.type){case"radial":this._updateRadial(this.parameters,t);break;case"linear":this._updateLinear(this.parameters,t);break;case"grid":this._updateGrid(this.parameters,t);break;case"toObject":this._updateToObject(this.parameters,t)}for(let t of this.children){let e=t.transformOverride;void 0!==e&&(t.position.fromArray(e.position),t.rotation.fromArray(e.rotation),t.scale.fromArray(e.scale)),t.updateMatrix(),t.hasNonUniformScale&&(t.updateMatrixWorld(),t.updateMatrixWorldRigid())}this._syncInstancedMesh(),this._invalidateBoolean()}get instancingActive(){return void 0!==this.instancedMesh}get insideBoolean(){return null!==this.parent&&"booleanOp"in this.parent}_instancingEligible(){if(!0!==this.parameters.instanced)return!1;let t=this.object;return!(t.entityChildrenCount()>0||!0!==t.isMesh||a(t)||!0===t.isDecalObject)}_syncInstancedMesh(){if(!this._instancingEligible())return void this._disposeInstancedMesh();let t=this.instancedMesh;if(void 0!==t&&t.capacity<this.children.length&&(this._disposeInstancedMesh(),t=void 0),void 0===t){let e=Math.max(8,Math.ceil(1.5*this.children.length));t=this.instancedMesh=new J(this.object,e)}t.matrix=this.matrix,t.matrixWorldNeedsUpdate=!0,t.parent!==this.parent&&(t.removeFromParent(),this.parent?.add(t)),this.syncInstanceMatrices()}syncInstanceMatrices(){this._invalidateBoolean();let t=this.instancedMesh;if(void 0===t)return;let e=0;for(let r of this.children)!1!==r.playModeVisible&&(et.copy(r.matrix).multiply(r.pivotMatrix),t.setMatrixAt(e++,et));t.count=e,t.instanceMatrix.needsUpdate=!0,t.boundingSphere=null}_disposeInstancedMesh(){let t=this.instancedMesh;void 0!==t&&(this.instancedMesh=void 0,t.removeFromParent(),t.dispose())}_updateCount(t,e){let r;if(void 0!==e)r=e;else{let e=vt(this.parameters.grid.count,t);r="grid"===this.parameters.type?Math.round(e[0])*Math.round(e[1])*Math.round(e[2]):this.parameters.count}if("toObject"===this.parameters.type)if(this.parameters.toObject.object){if(void 0===e&&"random"!==this.parameters.toObject.spreadType)return}else r=0;if(this.children.length!==r)if(this.children.length<r)for(let t=0,e=r-this.children.length;t<e;++t){let t=new i(this.object);t.expand(),this.add(t)}else for(;this.children.length>r;){let t=this.children.pop();t.parent=null,t.dispatchEvent({type:"removed"}),this.dispatchEvent({type:"childremoved",child:t})}}getRandom(t,e=!1){return(null===this.random||this.random.data.seed!==t.seed||this.random.data.noiseType!==t.noiseType||this.random.is3D!==e)&&(this.random=new Mt(t,e)),this.random}_updateRadial(t,e){let r,i=t.radial,n=i.start*h.DEG2RAD,s=n-i.end*h.DEG2RAD,o=vt(i.rotation,e),a=new p(o[0],o[1],o[2]);switch(i.axis){case"z":r=new d(0,0,1);break;case"y":r=new d(0,1,0);break;default:r=new d(1,0,0)}let c=t.randomnessObject??l.defaultData([1,1,1]).randomnessObject,u=!0===this.parameters.randomness&&0!==c.strength?this.getRandom(c):null,m=vt(i.scale,e),f=vt(i.position,e),y=vt(c.scale,e),b=vt(c.position,e),g=vt(c.rotation,e),x=s/t.count,v=P(c.strength,this.parameters.randomness);for(let[t,e]of this.children.entries()){let s=t*(c.freqScale/10)+c.movement,o=null===u?0:u.noise(s,s,s),l=t+1;e.scale.x=m[0]+v(l,N(o,y[0]))||X,e.scale.y=m[1]+v(l,N(o,y[1]))||X,e.scale.z=m[2]+v(l,N(o,y[2]))||X;let h=x*t-n;switch(i.axis){default:case"x":bt.set(0,h,0);break;case"y":bt.set(0,0,h);break;case"z":bt.set(h,0,0)}ut.copy(r).applyQuaternion(gt.setFromEuler(bt)).multiplyScalar(i.radius),e.position.set(ut.x+(f[0]+v(l,N(o,b[0]))),ut.y+(f[1]+v(l,N(o,b[1]))),ut.z+(f[2]+v(l,N(o,b[2]))));let d=v(l,N(o,g[0])),p=v(l,N(o,g[1])),M=v(l,N(o,g[2]));!0===i.alignment?e.rotation.set(bt.x+(a.x+d),bt.y+(a.y+p),bt.z+(a.z+M)):e.rotation.set(a.x+d,a.y+p,a.z+M)}}_updateLinear(t,e){if("linear"!==t.type)throw new Error;let r=t.linear,i=vt(r.rotation,e),n=vt(r.scale,e),s=vt(r.position,e),o=new p(i[0]??0,i[1]??0,i[2]??0),a=t.randomnessObject??l.defaultData([1,1,1]).randomnessObject,h=vt(a.rotation,e),c=vt(a.scale,e),d=vt(a.position,e),u=!0===this.parameters.randomness&&0!==a.strength?this.getRandom(a):null,m=P(a.strength,this.parameters.randomness);for(let[t,e]of this.children.entries()){let r=t*(a.freqScale/10)+a.movement,i=null===u?0:u.noise(r,r,r),l=t+1,p=m(l,N(i,h[0])),f=m(l,N(i,h[1])),y=m(l,N(i,h[2]));e.scale.x=1+(n[0]-1)*t+m(l,N(i,c[0]))||X,e.scale.y=1+(n[1]-1)*t+m(l,N(i,c[1]))||X,e.scale.z=1+(n[2]-1)*t+m(l,N(i,c[2]))||X,e.rotation.set(o.x*t+p,o.y*t+f,o.z*t+y),e.position.x=s[0]*t+m(l,N(i,d[0])),e.position.y=s[1]*t+m(l,N(i,d[1])),e.position.z=s[2]*t+m(l,N(i,d[2]))}}_updateGrid(t,e){let r=0,i=t.grid,n=t.randomnessObject??l.defaultData([1,1,1]).randomnessObject,s=vt(n.scale,e),o=vt(n.rotation,e),a=vt(n.position,e),h=!0===this.parameters.randomness&&0!==n.strength?this.getRandom(n,!0):null,c=P(n.strength,this.parameters.randomness),u=vt(i.count,e),p=vt(i.size,e);if(!0===i.useCenter){let t={x:u[0]%2==0?2:1,y:u[1]%2==0?2:1,z:u[2]%2==0?2:1},e=new d(p[0]*(u[0]-t.x)*.5,p[1]*(u[1]-t.y)*.5,p[2]*(u[2]-t.z)*.5);for(let t=0;t<u[0];t++)for(let i=0;i<u[1];i++)for(let l=0;l<u[2];l++){let d=this.children[r++];if(!d)continue;let u=null===h?0:h.noise((t+1)*(n.freqScale/10)+n.movement,(i+1)*(n.freqScale/10)+n.movement,(l+1)*(n.freqScale/10)+n.movement);d.scale.x=1+c(r,N(u,s[0]))||X,d.scale.y=1+c(r,N(u,s[1]))||X,d.scale.z=1+c(r,N(u,s[2]))||X;let m=c(r,N(u,o[0])),f=c(r,N(u,o[1])),y=c(r,N(u,o[2]));d.rotation.set(m,f,y),d.position.x=p[0]*t-e.x+c(r,N(u,a[0])),d.position.y=p[1]*i-e.y+c(r,N(u,a[1])),d.position.z=p[2]*l-e.z+c(r,N(u,a[2]))}}else for(let t=0;t<u[0];t++)for(let e=0;e<u[1];e++)for(let i=0;i<u[2];i++){let l=this.children[r++];if(!l)continue;let d=null===h?0:h.noise((t+1)*(n.freqScale/10)+n.movement,(e+1)*(n.freqScale/10)+n.movement,(i+1)*(n.freqScale/10)+n.movement);l.scale.x=1+c(r,N(d,s[0]))||X,l.scale.y=1+c(r,N(d,s[1]))||X,l.scale.z=1+c(r,N(d,s[2]))||X;let u=c(r,N(d,o[0])),m=c(r,N(d,o[1])),f=c(r,N(d,o[2]));l.rotation.set(u,m,f),l.position.x=p[0]*t+c(r,N(d,a[0])),l.position.y=-p[1]*e+c(r,N(d,a[1])),l.position.z=-p[2]*i+c(r,N(d,a[2]))}}_updateToObject(r,i){if("toObject"!==r.type)throw new Error;let{toObject:n}=r,s=vt(n.rotation,i),o=vt(n.position,i),a=vt(n.scale,i),h=new p(s[0],s[1],s[2]),c=r.randomnessObject??l.defaultData([1,1,1]).randomnessObject,d=vt(c.rotation,i),u=vt(c.position,i),m=vt(c.scale,i),f=!0===this.parameters.randomness&&0!==c.strength?this.getRandom(c):null,y=P(c.strength,this.parameters.randomness);if(!n.object){for(let[,t]of this.children.entries())t.position.set(0,0,0),t.scale.setScalar(1),t.rotation.set(0,0,0);return this.objectForSample=void 0,void this.invalidateSurfaceCaches()}if(!this.objectForSample)return;if(this.objectForSample instanceof t){if(!this.objectForSample.font?.isLoaded||void 0===this.objectForSample.geometry.attributes.position)return void(this._pendingMediaLoad=!0);this._pendingMediaLoad=!1}if(void 0===this.objectForSample.geometry&&this.objectForSample.isAncestorOf(this.object.uuid))return void console.warn(`Oh no! The object "${this.object.name}" (${this.object.uuid}) seem to be a child/descendant of the object it's being cloned to. Please re-parent it so that they are siblings instead.`);let b=this.getSubdivData();if(b.length>0){let t=Math.round(b.length*n.count/100);this._updateCount(i,t)}else{let t=this.objectForSample.geometry.getAttribute("position");if(!t||isNaN(t.count)||0===t.count)return void console.warn(`Oh no! The object "${this.object.name}" (${this.object.uuid}) cannot be cloned on the surface of "${this.objectForSample.name}" (${this.objectForSample.uuid}) because the latter does not have a valid geometry.`)}this.objectForSample.updateMatrixWorld();let g="random"===n.spreadType,v=null;g&&(v=this.getSurfaceSampler(),v.setRandomGenerator((0,x.default)(this.object.uuid+n.seed)));let M=W[n.axis],w=this.children;ot.fromArray(M);let A=this.objectForSample instanceof e;A&&rt.copy(this.objectForSample.matrixWorld).invert(),"normal"!==n.align&&this.object.getWorldDirection(dt),ft.set(ot.y,ot.z,ot.x).normalize(),yt.copy(ft).cross(ot).normalize(),nt.makeBasis(ft,ot,yt).invert();for(let[t,e]of w.entries()){let r=t*(c.freqScale/10)+c.movement,i=null===f?0:f.noise(r,r,r),s=t+1,l=y(s,N(i,d[0])),p=y(s,N(i,d[1])),x=y(s,N(i,d[2]));g?v.sample(lt,ht):(b.length&&(lt.fromArray(b[t].pos),ht.fromArray(b[t].norm)),A&&lt.applyMatrix4(rt)),e.position.copy(lt);let M="normal"===n.align?ht:dt,w=at.fromArray(o);at.x+=y(s,N(i,u[0])),at.y+=y(s,N(i,u[1])),at.z+=y(s,N(i,u[2]));let S=Math.acos(M.dot(ot)),j=ct.crossVectors(ot,M).normalize(),F=tt.makeRotationAxis(j,S);pt.copy(M).cross(this.object.up).normalize(),mt.copy(pt).cross(M).normalize(),it.makeBasis(pt,M,mt),st.multiplyMatrices(it,nt),bt.setFromRotationMatrix(st),w.applyMatrix4(F),e.position.add(w),e.rotation.set(bt.x+h.x+l,bt.y+h.y+p,bt.z+h.z+x),e.scale.set(1+a[0]+y(s,N(i,m[0]))||X,1+a[1]+y(s,N(i,m[1]))||X,1+a[2]+y(s,N(i,m[2]))||X),e.scale.multiply(this.object.scale)}}getSurfaceSampler(){let t=this.objectForSample,e=t.geometry,r=e.getAttribute("position"),i=e.index,n=this.surfaceSamplerCache;if(null!==n&&n.geometry===e&&n.position===r&&n.positionVersion===xt(r)&&n.index===i&&n.indexVersion===(null===i?-1:i.version))return n.sampler;let s=new C(t).build();return this.surfaceSamplerCache={geometry:e,position:r,positionVersion:xt(r),index:i,indexVersion:null===i?-1:i.version,sampler:s},s}invalidateSurfaceCaches(){this.surfaceSamplerCache=null,this.surfacePointsCache=null}getSubdivData(){if(!this.objectForSample)return[];let t=this.parameters.toObject.spreadType;if("random"===t)return[];let r=this.objectForSample instanceof e,i=this.objectForSample.geometry;if(!r&&i){let e=this.surfacePointsCache,r=i.getAttribute("position");if(null!==e&&e.spreadType===t&&e.geometry===i&&e.position===r&&e.positionVersion===xt(r)&&e.index===i.index&&e.indexVersion===(null===i.index?-1:i.index.version))return e.points}let n=new Map,s=(t,e)=>{let r=Math.round(1e4*t[0])+"_"+Math.round(1e4*t[1])+"_"+Math.round(1e4*t[2]),i=n.get(r);i?(i.pos[0]+=t[0],i.pos[1]+=t[1],i.pos[2]+=t[2],i.norm[0]+=e[0],i.norm[1]+=e[1],i.norm[2]+=e[2],i.count+=1):n.set(r,{pos:[...t],norm:[...e],count:1})};if(r){let e=this.objectForSample,r=O[t],i=q[r],n=I[r],o=D[r],a=i(e.subdivPointerNew);for(let t=0;t<=a-1;t++){let r=n(e.subdivPointerNew,t),i=o(e.subdivPointerNew,t);Y.fromArray(r).applyMatrix4(e.matrixWorld),Z.fromArray(i),s(Y.toArray(),Z.toArray())}}else(i.index?function(t){let e=[],r=Math.floor(t.index.count/3);for(let i=0;i<r;i++)if(L.fromArray(t.index.array,3*i),E.setFromAttributeAndIndices(t.attributes.position,L.x,L.y,L.z),E.getNormal(G),E.getMidpoint($),!(isNaN($.x)||isNaN($.y)||isNaN($.z))){let{a:t,b:r,c:i}=E,n=t.toArray(),s=r.toArray(),o=i.toArray(),a=t.distanceTo(r),l=r.distanceTo(i),h=i.distanceTo(t),c=k(n,s),d=k(s,o),u=k(o,n),p=[a,l,h],m=Math.max(...p),f=p.filter(t=>Math.round(t)===Math.round(m)).length>1,y=[],b=E.getMidpoint($).toArray();m===a&&!f&&(y=[d,u,u],b=c),m===l&&!f&&(y=[c,u,u],b=d),m===h&&!f&&(y=[c,d,d],b=u),f&&(y=[c,d,u]),e.push({vertices:[n,s,o],faceCenters:y,midpoint:b,norm:E.getNormal(G).toArray()})}return e}(i):function(t){let e=[],{position:r}=t.attributes;for(let t=0;t<r.count;t++){E.setFromAttributeAndIndices(r,3*t,3*t+1,3*t+2),E.getNormal(G),E.getMidpoint($);let i=E.a.toArray(),n=E.b.toArray(),s=E.c.toArray();e.push({vertices:[i,n,s],faceCenters:[k(i,n),k(n,s),k(s,i)],midpoint:$.toArray(),norm:G.toArray()})}return e}(i)).forEach((e,r)=>{"polygon_center"===t&&s(e.midpoint,e.norm),"vertex"===t&&(s(e.vertices[0],e.norm),s(e.vertices[1],e.norm),s(e.vertices[2],e.norm)),"edge"===t&&(s(e.faceCenters[0],e.norm),s(e.faceCenters[1],e.norm),s(e.faceCenters[2],e.norm))});let o=Array.from(n.values());for(let t of o)t.pos[0]/=t.count,t.pos[1]/=t.count,t.pos[2]/=t.count,t.norm[0]/=t.count,t.norm[1]/=t.count,t.norm[2]/=t.count;if(!r&&i){let e=i.getAttribute("position");this.surfacePointsCache={spreadType:t,geometry:i,position:e,positionVersion:xt(e),index:i.index,indexVersion:null===i.index?-1:i.index.version,points:o}}return o}updateState(t,e){if(this.parameters=o(t),"toObject"!==this.parameters.type)this.invalidateSurfaceCaches(),(null===this.parent||this.parent!==this.object)&&(this.removeFromParent(),this.object.parent?.add(this),this.matrix=this.object.matrix,this.matrixWorldNeedsUpdate=!0,this.matrixAutoUpdate=!1);else if(null===this.parent||this.parent.uuid!==this.parameters.toObject.object){this.removeFromParent(),this.invalidateSurfaceCaches();let t=e.scene.find(this.parameters.toObject.object);this.objectForSample=t instanceof s?t:void 0,this.matrix=new u,this.matrixWorldNeedsUpdate=!0,this.matrixAutoUpdate=!1,t&&t.add(this)}this.update(e)}get pendingMediaLoad(){return this._pendingMediaLoad}};export{wt as a};
@@ -1 +1 @@
1
- import{v as e}from"./runtime-chunk-S6IQT6ZF.js";import{Ec as t,Fc as s,Fd as a,Gc as i,Ge as r,Ib as n,Oc as h,Tc as o,Wd as l,Xd as d,Zc as c,kd as u,ld as g}from"./runtime-chunk-BVVSZMXD.js";var p=null;function b(e){p=e}function S(){return p}var m=null;function f(e){m=e}function M(){return m}var y=new o;function R(e,t,s){return y.setRGB(e,t,s,n),{r:y.r,g:y.g,b:y.b}}var w=(e,t)=>"number"==typeof e&&Number.isFinite(e)?e:t,x=e=>Array.isArray(e)&&"number"==typeof e[0]&&"number"==typeof e[1]?[e[0],e[1]]:[0,0];function v(e,t,s){let a,i=w(e.angle,0),[r,n]=x(e.offset),[h,o]=x(e.morph),l=e.colors??[],d=e.steps??[],c=Math.min(10,l.length,d.length);if(0===c)return[1,1,1,1];if(1===e.gradientType){let e=3*(t+h)-(t+r)-1,l=3*(s+o)-(s+n)-1;a=Math.hypot(e,l)+i}else if(2===e.gradientType){let e=-1*Math.atan2(t+h-.5+r,s+o-.5+n),l=i/Math.PI/-2+.5*e/Math.PI;a=l-Math.floor(l)}else{let e=.5+h/(0!==t?t:1e-6),l=o/(0!==s?s:1e-6),d=Math.cos(i)*e-Math.sin(i)*l,c=Math.sin(i)*e+Math.cos(i)*l,u=d*d+c*c;a=u>1e-12?(((t-.5+r)/2+d/2)*d+((s-.5+n)/2+c/2)*c)/u:0}let u=l[0][0],g=l[0][1],p=l[0][2],b=l[0][3];for(let t=1;t<c;t++){let s=d[t-1],i=d[t]-s,r=0!==i?Math.min(1,Math.max(0,(a-s)/i)):a>=s?1:0;e.smooth&&(r=r*r*(3-2*r)),u+=(l[t][0]-u)*r,g+=(l[t][1]-g)*r,p+=(l[t][2]-p)*r,b+=(l[t][3]-b)*r}return[u,g,p,b]}function A(e,t){let s=e,a=s?.data?.layers;if(a&&"function"==typeof a.forEach){let e=t,s=[];return a.forEach(t=>{let a=t.data;if(!1===a.visible||!0===a.isMask)return;let i=w(a.alpha,1);if(!(i<=0))if("color"===a.type){let t,r=a.color;"string"==typeof r?t="function"==typeof e?.color?e.color(r):void 0:r&&"number"==typeof r.r&&(t=r),t&&s.push({kind:"color",layer:a,rgb:{...R(t.r,t.g,t.b),a:t.a??1},alpha:i})}else"gradient"===a.type&&s.push({kind:"gradient",layer:a,alpha:i})}),0===s.length?null:(e,t)=>{let a=1,i=1,r=1,n=!0;for(let h of s){let s,o,l,d;if("color"===h.kind)({r:s,g:o,b:l}=h.rgb),d=h.rgb.a;else{let[a,i,r,n]=v(h.layer,e,t);({r:s,g:o,b:l}=R(a,i,r)),d=n}let c=n?1:Math.min(1,Math.max(0,d*h.alpha));a+=(s-a)*c,i+=(o-i)*c,r+=(l-r)*c,n=!1}return{r:a,g:i,b:r}}}if(s?.color&&!0===s.color.isColor){let{r:e,g:t,b:a}=s.color;return()=>({r:e,g:t,b:a})}return null}var j=32,I=16384,F=32*I,B=100;function W(e,t){if("torus"===e){let e=t()*Math.PI*2,s=t()*Math.PI*2,a=Math.cos(e),i=Math.sin(e),r=Math.cos(s),n=Math.sin(s);return{x:(1.4+.7*r)*a,y:-(1.4+.7*r)*i,z:.7*n,nx:r*a,ny:-r*i,nz:n,cr:1,cg:1,cb:1}}if("cylinder"===e){let e=t()*Math.PI*2,s=Math.cos(e),a=Math.sin(e);return{x:.8*s,y:1.6*(t()-.5),z:.8*a,nx:s,ny:0,nz:a,cr:1,cg:1,cb:1}}let s=t()*Math.PI*2,a=2*t()-1,i=Math.acos(a),r=Math.sin(i)*Math.cos(s),n=Math.cos(i),h=Math.sin(i)*Math.sin(s);return{x:r,y:n,z:h,nx:r,ny:n,nz:h,cr:1,cg:1,cb:1}}function k(e){let{geometry:t,matrix:s}=e,a=t.getAttribute("position");if(!a||a.count<3)return null;let r=t.getAttribute("normal"),n=t.getAttribute("uv"),h=t.getAttribute("color"),o=t.getIndex(),l=o?o.count/3:a.count/3;if(l<1)return null;let d=(e,t)=>o?o.getX(3*e+t):3*e+t,c=s?s.elements:null,u=s?(new i).getNormalMatrix(s).elements:null,g=e=>{let t=a.getX(e),s=a.getY(e),i=a.getZ(e);return c?c[0]*t+c[4]*s+c[8]*i+c[12]:t},p=e=>{let t=a.getX(e),s=a.getY(e),i=a.getZ(e);return c?c[1]*t+c[5]*s+c[9]*i+c[13]:s},b=e=>{let t=a.getX(e),s=a.getY(e),i=a.getZ(e);return c?c[2]*t+c[6]*s+c[10]*i+c[14]:i},S=new Float64Array(l),m=0;for(let e=0;e<l;e++){let t=d(e,0),s=d(e,1),a=d(e,2),i=g(t),r=p(t),n=b(t),h=g(s)-i,o=p(s)-r,l=b(s)-n,c=g(a)-i,u=p(a)-r,f=b(a)-n,M=o*f-l*u,y=l*c-h*f,R=h*u-o*c;m+=.5*Math.sqrt(M*M+y*y+R*R),S[e]=m}return m<=0?null:{total:m,sample:(t,s)=>{let a=0,i=l-1;for(;a<i;){let e=a+i>>1;S[e]<t?a=e+1:i=e}let o=a,c=d(o,0),m=d(o,1),f=d(o,2),M=s(),y=s();M+y>1&&(M=1-M,y=1-y);let R,w,x,v=1-M-y,A=g(c)*v+g(m)*M+g(f)*y,j=p(c)*v+p(m)*M+p(f)*y,I=b(c)*v+b(m)*M+b(f)*y;if(r){if(R=r.getX(c)*v+r.getX(m)*M+r.getX(f)*y,w=r.getY(c)*v+r.getY(m)*M+r.getY(f)*y,x=r.getZ(c)*v+r.getZ(m)*M+r.getZ(f)*y,u){let e=u[0]*R+u[3]*w+u[6]*x,t=u[1]*R+u[4]*w+u[7]*x,s=u[2]*R+u[5]*w+u[8]*x;R=e,w=t,x=s}}else{let e=g(c),t=p(c),s=b(c),a=g(m)-e,i=p(m)-t,r=b(m)-s,n=g(f)-e,h=p(f)-t,o=b(f)-s;R=i*o-r*h,w=r*n-a*o,x=a*h-i*n}let F=Math.sqrt(R*R+w*w+x*x)||1,B=1,W=1,k=1;if(h)B=h.getX(c)*v+h.getX(m)*M+h.getX(f)*y,W=h.getY(c)*v+h.getY(m)*M+h.getY(f)*y,k=h.getZ(c)*v+h.getZ(m)*M+h.getZ(f)*y;else if(e.sampleColor){let t=n?n.getX(c)*v+n.getX(m)*M+n.getX(f)*y:.5,s=n?n.getY(c)*v+n.getY(m)*M+n.getY(f)*y:.5,a=e.sampleColor(t,s);a&&(B=a.r,W=a.g,k=a.b)}return{x:A,y:j,z:I,nx:R/F,ny:w/F,nz:x/F,cr:B,cg:W,cb:k}}}}function C(e){let t=Math.min(Math.max(1,Math.floor(e.guideStrands)),I),s=function(e){let t=e>>>0;return()=>{t|=0,t=t+1831565813|0;let e=Math.imul(t^t>>>15,1|t);return e=e+Math.imul(e^e>>>7,61|e)^e,((e^e>>>14)>>>0)/4294967296}}(e.seed??1337),a="object"===e.shape&&e.sampler,i=a?e.samplerRadius??B:B,r=new Float32Array(4*F),n=new Float32Array(F),h=new Float32Array(4*I).fill(1);for(let o=0;o<t;o++){let t=a?e.sampler(s):W(e.shape,s),l=a?t.x:t.x*i,d=a?t.y:t.y*i,c=a?t.z:t.z*i,{nx:u,ny:g,nz:p}=t;h[4*o+0]=t.cr,h[4*o+1]=t.cg,h[4*o+2]=t.cb;let b,S,m,f=32*o,M=(1.8+.8*s())*e.hairLength*i/31,y=.5+1.5*s(),R=(.02+.06*s())*i;Math.abs(g)<.99?(b=-p,S=0,m=u):(b=1,S=0,m=0);let w=Math.sqrt(b*b+S*S+m*m)||1;for(let e=0;e<32;e++){let t=e/31,s=t*t*.4*i,a=R*Math.sin(t*y*Math.PI*2),h=4*(f+e);r[h+0]=l+u*M*e+a*b/w,r[h+1]=d+g*M*e-s+a*S/w,r[h+2]=c+p*M*e+a*m/w,r[h+3]=0===e?0:1,e<31&&(n[f+e]=M)}}return{initialPositions:r,restLengths:n,unitScale:i,rootColors:h}}var H=1/60,O=4,L=new h,P=new t,z=new s,X=new s,q=class extends e{constructor(e,a,i){super(e,a),this.type="HairSystem",this.isHairSystem=!0,this.simRunning=!1,this.previewRequested=!1,this.playModeActive=!1,this.pendingSimSeconds=0,this.simTime=0,this.resetRequested=!0,this.generation=0,this.settledSimSeconds=0,this.lastMotionFingerprint=0,this.lastBoneQuat=new t,this.lastBonePos=new s,this.hasLastBone=!1,this.baseFoundAtRegen=!1,this.baseSourceGeomsAtRegen=[],this.baseSourceHashesAtRegen=[],this.baseColorHashAtRegen=0,this.baseScaleAtRegen=0,this.classicFallbackWarned=!1,this.regenSnapshot=null,this.context=i,this.data=a,this.geometry.setAttribute("position",new c(new Float32Array(0),3)),this.material=new u({colorWrite:!1,depthWrite:!1}),this.frustumCulled=!1,this.scalpMesh=new g(new l(B,48,32),new u({color:5448477})),this.scalpMesh.name="HairScalp",this.add(this.scalpMesh);let n=new r;n.setAttribute("position",new c(new Float32Array(12),3)),n.setIndex([0,2,1,2,3,1]),n.instanceCount=0,this.ribbonMesh=new g(n,new u({visible:!1})),this.ribbonMesh.name="HairRibbons",this.ribbonMesh.frustumCulled=!1,this.ribbonMesh.visible=!1,this.ribbonMesh.matrixAutoUpdate=!1,this.ribbonMesh.updateMatrixWorld=()=>{this.ribbonMesh.matrixWorld.identity()},this.ribbonMesh.updateWorldMatrix=()=>{this.ribbonMesh.matrixWorld.identity()},this.add(this.ribbonMesh),this.activeGuideStrands=a.guideStrands,this.roots=this.buildRoots(),this.regenSnapshot={guideStrands:a.guideStrands,hairLength:a.hairLength,spreadRadius:a.spreadRadius,headShape:a.headShape,baseObjectId:a.baseObjectId},this.applyScalpState(),this.applyShadowState(),this.syncSimRunning()}update(e){!this.simRunning||(this.pendingSimSeconds=Math.min(this.pendingSimSeconds+e/1e3,4*H*2),this.trackMotionRest(e/1e3))}trackMotionRest(e){this.boneTransform(P,z);let t=this.hasLastBone&&(Math.abs(this.lastBoneQuat.dot(P))<.9999995||this.lastBonePos.distanceToSquared(z)>1e-8),s=this.motionFingerprint(),a=!this.hasLastBone||t||this.resetRequested||s!==this.lastMotionFingerprint||this.data.windStrength>.001;this.lastBoneQuat.copy(P),this.lastBonePos.copy(z),this.lastMotionFingerprint=s,this.hasLastBone=!0,this.settledSimSeconds=a?0:this.settledSimSeconds+e}motionFingerprint(){let e=this.data;return e.gravity+2*e.damping+3*e.localStiffness+4*e.globalStiffness+5*e.globalRange+6*e.stiffnessFalloff+7*e.windStrength+8*e.vspCoefficient+9*e.kink+10*e.kinkFrequency+11*e.clumpStrength+12*e.clumpSize+13*e.clumpTipScale}get isSimulating(){return(this.simRunning||this.resetRequested)&&this.visible}get isMotionSettled(){return this.settledSimSeconds>6}get isVisiblyAnimating(){return this.isSimulating&&!this.isMotionSettled}startPreview(){this.previewRequested=!0,this.syncSimRunning()}stopPreview(){this.previewRequested=!1,this.syncSimRunning()}setPlayMode(e){this.playModeActive=e,e&&this.resetSimulation(),this.syncSimRunning()}resetSimulation(){this.resetRequested=!0,this.pendingSimSeconds=0,this.simTime=0,this.settledSimSeconds=0}warnClassicFallbackOnce(){this.classicFallbackWarned||(this.classicFallbackWarned=!0,console.warn("[spline] Hair System strands require the WebGPU renderer — the WebGL fallback shows only the scalp. Reload with ?renderer=webgpu in a WebGPU-capable browser."))}syncSimRunning(){this.simRunning=this.playModeActive||this.previewRequested||this.data.autoPlay}updateState(e,t){super.updateState(e,t),this.updateHairState(e)}updateHairState(e){if((void 0!==e.guideStrands||void 0!==e.hairLength||void 0!==e.spreadRadius||void 0!==e.headShape||void 0!==e.baseObjectId)&&this.regenerate(),(void 0!==e.headShape||void 0!==e.baseObjectId)&&this.applyScalpState(),void 0!==e.headColor){let t=this.scalpMesh.material;!0===t.isMeshBasicMaterial&&t.color.setRGB(e.headColor.r,e.headColor.g,e.headColor.b,n)}(void 0!==e.castShadow||void 0!==e.receiveShadow)&&this.applyShadowState(),void 0!==e.autoPlay&&this.syncSimRunning()}applyShadowState(){let e=this.data.castShadow??!0,t=this.data.receiveShadow??!0;this.castShadow=e,this.receiveShadow=t,this.scalpMesh.castShadow=e,this.scalpMesh.receiveShadow=t,this.ribbonMesh.castShadow=e,this.ribbonMesh.receiveShadow=t}regenerate(){this.activeGuideStrands=Math.max(1,Math.min(Math.floor(this.data.guideStrands),16384)),this.roots=this.buildRoots(),this.generation++,this.regenSnapshot={guideStrands:this.data.guideStrands,hairLength:this.data.hairLength,spreadRadius:this.data.spreadRadius,headShape:this.data.headShape,baseObjectId:this.data.baseObjectId},this.resetSimulation()}checkDataDrift(){let e=this.data,t=this.regenSnapshot;if(null===t||t.guideStrands!==e.guideStrands||t.hairLength!==e.hairLength||t.spreadRadius!==e.spreadRadius||t.headShape!==e.headShape||t.baseObjectId!==e.baseObjectId){let s=null===t||t.headShape!==e.headShape||t.baseObjectId!==e.baseObjectId;this.regenerate(),s&&this.applyScalpState()}this.syncSimRunning(),this.applyShadowState(),this.checkBaseDrift()}buildRoots(){let{headShape:e,baseObjectId:t,guideStrands:s,hairLength:a}=this.data;if(this.baseFoundAtRegen=!1,this.baseSourceGeomsAtRegen=[],this.baseSourceHashesAtRegen=[],this.baseColorHashAtRegen=0,this.baseScaleAtRegen=0,"object"===e&&t){let e=this.context.scene.find(t);if(e){this.baseFoundAtRegen=!0,e.updateWorldMatrix(!0,!0);let t=this.collectBaseSources(e),i=t?function(e){let t=[];for(let s of e){let e=k(s);e&&t.push(e)}if(0===t.length)return null;let s=new Float64Array(t.length),a=0;for(let e=0;e<t.length;e++)a+=t[e].total,s[e]=a;return a<=0?null:e=>{let i=e()*a,r=0,n=t.length-1;for(;r<n;){let e=r+n>>1;s[e]<i?r=e+1:n=e}let h=0===r?i:i-s[r-1];return t[r].sample(h,e)}}(t.sources):null;if(this.baseSourceGeomsAtRegen=t?.sources.map(e=>e.geometry)??[],this.baseSourceHashesAtRegen=t?.hashes??[],this.baseColorHashAtRegen=t?.colorHash??0,t&&i){let r=this.baseWorldScale(e),n=Math.max(t.radius*r,.001);this.baseScaleAtRegen=r;let h=r;return C({shape:"object",guideStrands:s,hairLength:a,sampler:e=>{let t=i(e);return{...t,x:t.x*h,y:t.y*h,z:t.z*h}},samplerRadius:n})}}}return C({shape:"object"===e?"sphere":e,guideStrands:s,hairLength:a})}collectBaseSources(e){let t=[],s=[],a=0,i=0;L.copy(e.matrixWorld).invert();let r=L.clone(),n=o=>{if(!0===o.isHairSystem||o!==e&&!1===o.visible)return;let l=o.geometry;if(!0===o.isMesh&&l&&(l.getAttribute("position")?.count??0)>=3){let n=o===e?void 0:(new h).multiplyMatrices(r,o.matrixWorld),d=Array.isArray(o.material)?o.material[0]:o.material;t.push({geometry:l,matrix:n,sampleColor:A(d,this.context.shared)??void 0}),s.push(q.matrixHash(n)),i+=function(e,t){let s=e,a=0,i=1,r=e=>{a+=e*i,i+=1},n=s?.data?.layers;if(n&&"function"==typeof n.forEach){let e=t;n.forEach(t=>{let s=t.data;if(!1!==s.visible)if("color"===s.type){let t=s.color,a="string"==typeof t?"function"==typeof e?.color?e.color(t):void 0:t;a&&"number"==typeof a.r&&(r(a.r),r(a.g),r(a.b)),r(w(s.alpha,1))}else if("gradient"===s.type){let e=s;for(let t of e.colors??[])r(t[0]),r(t[1]),r(t[2]),r(t[3]);for(let t of e.steps??[])r(t);r(w(e.angle,0)),r(e.gradientType),r(e.smooth?1:0)}})}else s?.color&&!0===s.color.isColor&&(r(s.color.r),r(s.color.g),r(s.color.b));return a}(d,this.context.shared),null===l.boundingSphere&&l.computeBoundingSphere();let c=l.boundingSphere;if(c){let e=0,t=1;n?(z.copy(c.center).applyMatrix4(n),e=z.length(),t=q.matrixMaxScale(n)):e=c.center.length(),a=Math.max(a,e+c.radius*t)}}for(let e of o.children)n(e)};return n(e),0===t.length?null:{sources:t,hashes:s,radius:Math.max(a,.001),colorHash:i}}static matrixHash(e){if(!e)return 0;let t=e.elements,s=0;for(let e=0;e<16;e++)s+=t[e]*(e+1);return s}static matrixMaxScale(e){let t=e.elements,s=Math.hypot(t[0],t[1],t[2]),a=Math.hypot(t[4],t[5],t[6]),i=Math.hypot(t[8],t[9],t[10]);return Math.max(s,a,i,1e-6)}baseWorldScale(e){return L.copy(e.matrixWorld).decompose(z,P,X),Math.max(Math.abs(X.x),Math.abs(X.y),Math.abs(X.z),1e-6)}get widthWorldScale(){return"object"===this.data.headShape&&this.data.baseObjectId&&this.baseScaleAtRegen>0?this.baseScaleAtRegen:1}checkBaseDrift(){if("object"!==this.data.headShape||!this.data.baseObjectId)return;let e=this.context.scene.find(this.data.baseObjectId);if(!e)return;if(!this.baseFoundAtRegen)return void this.regenerate();e.updateWorldMatrix(!0,!0);let t=this.collectBaseSources(e),s=t?.sources??[],a=t?.hashes??[],i=this.baseSourceGeomsAtRegen,r=this.baseSourceHashesAtRegen,n=s.length!==i.length;if(!n)for(let e=0;e<s.length;e++)if(s[e].geometry!==i[e]||Math.abs(a[e]-r[e])>1e-4*Math.max(Math.abs(r[e]),1)){n=!0;break}if(!n&&"object"===this.data.hairColorSource&&(t?.colorHash??0)!==this.baseColorHashAtRegen&&(n=!0),!n&&s.length>0){let t=this.baseWorldScale(e);n=Math.abs(t-this.baseScaleAtRegen)>.001*Math.max(this.baseScaleAtRegen,1e-6)}n&&this.regenerate()}applyScalpState(){let e=this.data.headShape,t="object"===e&&null!==this.data.baseObjectId;this.scalpMesh.visible=!t,!t&&(this.scalpMesh.geometry.dispose(),this.scalpMesh.geometry="torus"===e?new d(140,70,24,48):"cylinder"===e?new a(80,80,160,48,1):new l(B,48,32))}boneTransform(e,t){let s=this.matrixWorld;if("object"===this.data.headShape&&this.data.baseObjectId){let e=this.context.scene.find(this.data.baseObjectId)?.matrixWorld;e&&(s=e)}L.copy(s).decompose(t,e,X)}raycast(e,t){if(!this.scalpMesh.visible)return;let s=[];this.scalpMesh.raycast(e,s);for(let e of s)e.object=this,t.push(e)}get shadowBoundsRadius(){let e="torus"===this.data.headShape?2.6:1.5;return this.roots.unitScale*(e+2.6*Math.max(this.data.hairLength,0))}getShadowBoundsCenter(e){return this.boneTransform(P,e),e}updateEntityBoxSize(e,t){let s=this.shadowBoundsRadius;e.set(0,0,0),t.set(s,s,s)}dispose(){super.dispose(),this.scalpMesh.geometry.dispose(),this.scalpMesh.material.dispose(),this.ribbonMesh.geometry.dispose(),this.ribbonMesh.material.dispose?.(),M()?.release(this)}};export{b as a,S as b,f as c,M as d,j as e,I as f,F as g,B as h,H as i,O as j,q as k};
1
+ import{v as e}from"./runtime-chunk-KARVJCBP.js";import{Ec as t,Fc as s,Fd as a,Gc as i,Ge as r,Ib as n,Oc as h,Tc as o,Wd as l,Xd as d,Zc as c,kd as u,ld as g}from"./runtime-chunk-BVVSZMXD.js";var p=null;function b(e){p=e}function S(){return p}var m=null;function f(e){m=e}function M(){return m}var y=new o;function R(e,t,s){return y.setRGB(e,t,s,n),{r:y.r,g:y.g,b:y.b}}var w=(e,t)=>"number"==typeof e&&Number.isFinite(e)?e:t,x=e=>Array.isArray(e)&&"number"==typeof e[0]&&"number"==typeof e[1]?[e[0],e[1]]:[0,0];function v(e,t,s){let a,i=w(e.angle,0),[r,n]=x(e.offset),[h,o]=x(e.morph),l=e.colors??[],d=e.steps??[],c=Math.min(10,l.length,d.length);if(0===c)return[1,1,1,1];if(1===e.gradientType){let e=3*(t+h)-(t+r)-1,l=3*(s+o)-(s+n)-1;a=Math.hypot(e,l)+i}else if(2===e.gradientType){let e=-1*Math.atan2(t+h-.5+r,s+o-.5+n),l=i/Math.PI/-2+.5*e/Math.PI;a=l-Math.floor(l)}else{let e=.5+h/(0!==t?t:1e-6),l=o/(0!==s?s:1e-6),d=Math.cos(i)*e-Math.sin(i)*l,c=Math.sin(i)*e+Math.cos(i)*l,u=d*d+c*c;a=u>1e-12?(((t-.5+r)/2+d/2)*d+((s-.5+n)/2+c/2)*c)/u:0}let u=l[0][0],g=l[0][1],p=l[0][2],b=l[0][3];for(let t=1;t<c;t++){let s=d[t-1],i=d[t]-s,r=0!==i?Math.min(1,Math.max(0,(a-s)/i)):a>=s?1:0;e.smooth&&(r=r*r*(3-2*r)),u+=(l[t][0]-u)*r,g+=(l[t][1]-g)*r,p+=(l[t][2]-p)*r,b+=(l[t][3]-b)*r}return[u,g,p,b]}function A(e,t){let s=e,a=s?.data?.layers;if(a&&"function"==typeof a.forEach){let e=t,s=[];return a.forEach(t=>{let a=t.data;if(!1===a.visible||!0===a.isMask)return;let i=w(a.alpha,1);if(!(i<=0))if("color"===a.type){let t,r=a.color;"string"==typeof r?t="function"==typeof e?.color?e.color(r):void 0:r&&"number"==typeof r.r&&(t=r),t&&s.push({kind:"color",layer:a,rgb:{...R(t.r,t.g,t.b),a:t.a??1},alpha:i})}else"gradient"===a.type&&s.push({kind:"gradient",layer:a,alpha:i})}),0===s.length?null:(e,t)=>{let a=1,i=1,r=1,n=!0;for(let h of s){let s,o,l,d;if("color"===h.kind)({r:s,g:o,b:l}=h.rgb),d=h.rgb.a;else{let[a,i,r,n]=v(h.layer,e,t);({r:s,g:o,b:l}=R(a,i,r)),d=n}let c=n?1:Math.min(1,Math.max(0,d*h.alpha));a+=(s-a)*c,i+=(o-i)*c,r+=(l-r)*c,n=!1}return{r:a,g:i,b:r}}}if(s?.color&&!0===s.color.isColor){let{r:e,g:t,b:a}=s.color;return()=>({r:e,g:t,b:a})}return null}var j=32,I=16384,B=32*I,F=100;function W(e,t){if("torus"===e){let e=t()*Math.PI*2,s=t()*Math.PI*2,a=Math.cos(e),i=Math.sin(e),r=Math.cos(s),n=Math.sin(s);return{x:(1.4+.7*r)*a,y:-(1.4+.7*r)*i,z:.7*n,nx:r*a,ny:-r*i,nz:n,cr:1,cg:1,cb:1}}if("cylinder"===e){let e=t()*Math.PI*2,s=Math.cos(e),a=Math.sin(e);return{x:.8*s,y:1.6*(t()-.5),z:.8*a,nx:s,ny:0,nz:a,cr:1,cg:1,cb:1}}let s=t()*Math.PI*2,a=2*t()-1,i=Math.acos(a),r=Math.sin(i)*Math.cos(s),n=Math.cos(i),h=Math.sin(i)*Math.sin(s);return{x:r,y:n,z:h,nx:r,ny:n,nz:h,cr:1,cg:1,cb:1}}function k(e){let{geometry:t,matrix:s}=e,a=t.getAttribute("position");if(!a||a.count<3)return null;let r=t.getAttribute("normal"),n=t.getAttribute("uv"),h=t.getAttribute("color"),o=t.getIndex(),l=o?o.count/3:a.count/3;if(l<1)return null;let d=(e,t)=>o?o.getX(3*e+t):3*e+t,c=s?s.elements:null,u=s?(new i).getNormalMatrix(s).elements:null,g=e=>{let t=a.getX(e),s=a.getY(e),i=a.getZ(e);return c?c[0]*t+c[4]*s+c[8]*i+c[12]:t},p=e=>{let t=a.getX(e),s=a.getY(e),i=a.getZ(e);return c?c[1]*t+c[5]*s+c[9]*i+c[13]:s},b=e=>{let t=a.getX(e),s=a.getY(e),i=a.getZ(e);return c?c[2]*t+c[6]*s+c[10]*i+c[14]:i},S=new Float64Array(l),m=0;for(let e=0;e<l;e++){let t=d(e,0),s=d(e,1),a=d(e,2),i=g(t),r=p(t),n=b(t),h=g(s)-i,o=p(s)-r,l=b(s)-n,c=g(a)-i,u=p(a)-r,f=b(a)-n,M=o*f-l*u,y=l*c-h*f,R=h*u-o*c;m+=.5*Math.sqrt(M*M+y*y+R*R),S[e]=m}return m<=0?null:{total:m,sample:(t,s)=>{let a=0,i=l-1;for(;a<i;){let e=a+i>>1;S[e]<t?a=e+1:i=e}let o=a,c=d(o,0),m=d(o,1),f=d(o,2),M=s(),y=s();M+y>1&&(M=1-M,y=1-y);let R,w,x,v=1-M-y,A=g(c)*v+g(m)*M+g(f)*y,j=p(c)*v+p(m)*M+p(f)*y,I=b(c)*v+b(m)*M+b(f)*y;if(r){if(R=r.getX(c)*v+r.getX(m)*M+r.getX(f)*y,w=r.getY(c)*v+r.getY(m)*M+r.getY(f)*y,x=r.getZ(c)*v+r.getZ(m)*M+r.getZ(f)*y,u){let e=u[0]*R+u[3]*w+u[6]*x,t=u[1]*R+u[4]*w+u[7]*x,s=u[2]*R+u[5]*w+u[8]*x;R=e,w=t,x=s}}else{let e=g(c),t=p(c),s=b(c),a=g(m)-e,i=p(m)-t,r=b(m)-s,n=g(f)-e,h=p(f)-t,o=b(f)-s;R=i*o-r*h,w=r*n-a*o,x=a*h-i*n}let B=Math.sqrt(R*R+w*w+x*x)||1,F=1,W=1,k=1;if(h)F=h.getX(c)*v+h.getX(m)*M+h.getX(f)*y,W=h.getY(c)*v+h.getY(m)*M+h.getY(f)*y,k=h.getZ(c)*v+h.getZ(m)*M+h.getZ(f)*y;else if(e.sampleColor){let t=n?n.getX(c)*v+n.getX(m)*M+n.getX(f)*y:.5,s=n?n.getY(c)*v+n.getY(m)*M+n.getY(f)*y:.5,a=e.sampleColor(t,s);a&&(F=a.r,W=a.g,k=a.b)}return{x:A,y:j,z:I,nx:R/B,ny:w/B,nz:x/B,cr:F,cg:W,cb:k}}}}function C(e){let t=Math.min(Math.max(1,Math.floor(e.guideStrands)),I),s=function(e){let t=e>>>0;return()=>{t|=0,t=t+1831565813|0;let e=Math.imul(t^t>>>15,1|t);return e=e+Math.imul(e^e>>>7,61|e)^e,((e^e>>>14)>>>0)/4294967296}}(e.seed??1337),a="object"===e.shape&&e.sampler,i=a?e.samplerRadius??F:F,r=new Float32Array(4*B),n=new Float32Array(B),h=new Float32Array(4*I).fill(1);for(let o=0;o<t;o++){let t=a?e.sampler(s):W(e.shape,s),l=a?t.x:t.x*i,d=a?t.y:t.y*i,c=a?t.z:t.z*i,{nx:u,ny:g,nz:p}=t;h[4*o+0]=t.cr,h[4*o+1]=t.cg,h[4*o+2]=t.cb;let b,S,m,f=32*o,M=(1.8+.8*s())*e.hairLength*i/31,y=.5+1.5*s(),R=(.02+.06*s())*i;Math.abs(g)<.99?(b=-p,S=0,m=u):(b=1,S=0,m=0);let w=Math.sqrt(b*b+S*S+m*m)||1;for(let e=0;e<32;e++){let t=e/31,s=t*t*.4*i,a=R*Math.sin(t*y*Math.PI*2),h=4*(f+e);r[h+0]=l+u*M*e+a*b/w,r[h+1]=d+g*M*e-s+a*S/w,r[h+2]=c+p*M*e+a*m/w,r[h+3]=0===e?0:1,e<31&&(n[f+e]=M)}}return{initialPositions:r,restLengths:n,unitScale:i,rootColors:h}}var H=1/60,O=4,P=new h,L=new t,z=new s,X=new s,q=class extends e{constructor(e,a,i){super(e,a),this.type="HairSystem",this.isHairSystem=!0,this.simRunning=!1,this.previewRequested=!1,this.playModeActive=!1,this.pendingSimSeconds=0,this.simTime=0,this.resetRequested=!0,this.generation=0,this.settledSimSeconds=0,this.lastMotionFingerprint=0,this.lastBoneQuat=new t,this.lastBonePos=new s,this.hasLastBone=!1,this.baseFoundAtRegen=!1,this.baseSourceGeomsAtRegen=[],this.baseSourceHashesAtRegen=[],this.baseColorHashAtRegen=0,this.baseScaleAtRegen=0,this.classicFallbackWarned=!1,this.regenSnapshot=null,this.context=i,this.data=a,this.geometry.setAttribute("position",new c(new Float32Array(0),3)),this.material=new u({colorWrite:!1,depthWrite:!1}),this.frustumCulled=!1,this.scalpMesh=new g(new l(F,48,32),new u({color:5448477})),this.scalpMesh.name="HairScalp",this.add(this.scalpMesh);let n=new r;n.setAttribute("position",new c(new Float32Array(12),3)),n.setIndex([0,2,1,2,3,1]),n.instanceCount=0,this.ribbonMesh=new g(n,new u({visible:!1})),this.ribbonMesh.name="HairRibbons",this.ribbonMesh.frustumCulled=!1,this.ribbonMesh.visible=!1,this.ribbonMesh.matrixAutoUpdate=!1,this.ribbonMesh.updateMatrixWorld=()=>{this.ribbonMesh.matrixWorld.identity()},this.ribbonMesh.updateWorldMatrix=()=>{this.ribbonMesh.matrixWorld.identity()},this.add(this.ribbonMesh),this.activeGuideStrands=a.guideStrands,this.roots=this.buildRoots(),this.regenSnapshot={guideStrands:a.guideStrands,hairLength:a.hairLength,spreadRadius:a.spreadRadius,headShape:a.headShape,baseObjectId:a.baseObjectId},this.applyScalpState(),this.applyShadowState(),this.syncSimRunning()}update(e){!this.simRunning||(this.pendingSimSeconds=Math.min(this.pendingSimSeconds+e/1e3,4*H*2),this.trackMotionRest(e/1e3))}trackMotionRest(e){this.boneTransform(L,z);let t=this.hasLastBone&&(Math.abs(this.lastBoneQuat.dot(L))<.9999995||this.lastBonePos.distanceToSquared(z)>1e-8),s=this.motionFingerprint(),a=!this.hasLastBone||t||this.resetRequested||s!==this.lastMotionFingerprint||this.data.windStrength>.001;this.lastBoneQuat.copy(L),this.lastBonePos.copy(z),this.lastMotionFingerprint=s,this.hasLastBone=!0,this.settledSimSeconds=a?0:this.settledSimSeconds+e}motionFingerprint(){let e=this.data;return e.gravity+2*e.damping+3*e.localStiffness+4*e.globalStiffness+5*e.globalRange+6*e.stiffnessFalloff+7*e.windStrength+8*e.vspCoefficient+9*e.kink+10*e.kinkFrequency+11*e.clumpStrength+12*e.clumpSize+13*e.clumpTipScale}get isSimulating(){return(this.simRunning||this.resetRequested)&&this.visible}get isMotionSettled(){return this.settledSimSeconds>6}get isVisiblyAnimating(){return this.isSimulating&&!this.isMotionSettled}startPreview(){this.previewRequested=!0,this.syncSimRunning()}stopPreview(){this.previewRequested=!1,this.syncSimRunning()}setPlayMode(e){this.playModeActive=e,e&&this.resetSimulation(),this.syncSimRunning()}resetSimulation(){this.resetRequested=!0,this.pendingSimSeconds=0,this.simTime=0,this.settledSimSeconds=0}warnClassicFallbackOnce(){this.classicFallbackWarned||(this.classicFallbackWarned=!0,console.warn("[spline] Hair System strands require the WebGPU renderer — the WebGL fallback shows only the scalp. Reload with ?renderer=webgpu in a WebGPU-capable browser."))}syncSimRunning(){this.simRunning=this.playModeActive||this.previewRequested||this.data.autoPlay}updateState(e,t){super.updateState(e,t),this.updateHairState(e)}updateHairState(e){if((void 0!==e.guideStrands||void 0!==e.hairLength||void 0!==e.spreadRadius||void 0!==e.headShape||void 0!==e.baseObjectId)&&this.regenerate(),(void 0!==e.headShape||void 0!==e.baseObjectId)&&this.applyScalpState(),void 0!==e.headColor){let t=this.scalpMesh.material;!0===t.isMeshBasicMaterial&&t.color.setRGB(e.headColor.r,e.headColor.g,e.headColor.b,n)}(void 0!==e.castShadow||void 0!==e.receiveShadow)&&this.applyShadowState(),void 0!==e.autoPlay&&this.syncSimRunning()}applyShadowState(){let e=this.data.castShadow??!0,t=this.data.receiveShadow??!0;this.castShadow=e,this.receiveShadow=t,this.scalpMesh.castShadow=e,this.scalpMesh.receiveShadow=t,this.ribbonMesh.castShadow=e,this.ribbonMesh.receiveShadow=t}regenerate(){this.activeGuideStrands=Math.max(1,Math.min(Math.floor(this.data.guideStrands),16384)),this.roots=this.buildRoots(),this.generation++,this.regenSnapshot={guideStrands:this.data.guideStrands,hairLength:this.data.hairLength,spreadRadius:this.data.spreadRadius,headShape:this.data.headShape,baseObjectId:this.data.baseObjectId},this.resetSimulation()}checkDataDrift(){let e=this.data,t=this.regenSnapshot;if(null===t||t.guideStrands!==e.guideStrands||t.hairLength!==e.hairLength||t.spreadRadius!==e.spreadRadius||t.headShape!==e.headShape||t.baseObjectId!==e.baseObjectId){let s=null===t||t.headShape!==e.headShape||t.baseObjectId!==e.baseObjectId;this.regenerate(),s&&this.applyScalpState()}this.syncSimRunning(),this.applyShadowState(),this.checkBaseDrift()}buildRoots(){let{headShape:e,baseObjectId:t,guideStrands:s,hairLength:a}=this.data;if(this.baseFoundAtRegen=!1,this.baseSourceGeomsAtRegen=[],this.baseSourceHashesAtRegen=[],this.baseColorHashAtRegen=0,this.baseScaleAtRegen=0,"object"===e&&t){let e=this.context.scene.find(t);if(e){this.baseFoundAtRegen=!0,e.updateWorldMatrix(!0,!0);let t=this.collectBaseSources(e),i=t?function(e){let t=[];for(let s of e){let e=k(s);e&&t.push(e)}if(0===t.length)return null;let s=new Float64Array(t.length),a=0;for(let e=0;e<t.length;e++)a+=t[e].total,s[e]=a;return a<=0?null:e=>{let i=e()*a,r=0,n=t.length-1;for(;r<n;){let e=r+n>>1;s[e]<i?r=e+1:n=e}let h=0===r?i:i-s[r-1];return t[r].sample(h,e)}}(t.sources):null;if(this.baseSourceGeomsAtRegen=t?.sources.map(e=>e.geometry)??[],this.baseSourceHashesAtRegen=t?.hashes??[],this.baseColorHashAtRegen=t?.colorHash??0,t&&i){let r=this.baseWorldScale(e),n=Math.max(t.radius*r,.001);this.baseScaleAtRegen=r;let h=r;return C({shape:"object",guideStrands:s,hairLength:a,sampler:e=>{let t=i(e);return{...t,x:t.x*h,y:t.y*h,z:t.z*h}},samplerRadius:n})}}}return C({shape:"object"===e?"sphere":e,guideStrands:s,hairLength:a})}collectBaseSources(e){let t=[],s=[],a=0,i=0;P.copy(e.matrixWorld).invert();let r=P.clone(),n=o=>{if(!0===o.isHairSystem||o!==e&&!1===o.visible)return;let l=o.geometry;if(!0===o.isMesh&&l&&(l.getAttribute("position")?.count??0)>=3){let n=o===e?void 0:(new h).multiplyMatrices(r,o.matrixWorld),d=Array.isArray(o.material)?o.material[0]:o.material;t.push({geometry:l,matrix:n,sampleColor:A(d,this.context.shared)??void 0}),s.push(q.matrixHash(n)),i+=function(e,t){let s=e,a=0,i=1,r=e=>{a+=e*i,i+=1},n=s?.data?.layers;if(n&&"function"==typeof n.forEach){let e=t;n.forEach(t=>{let s=t.data;if(!1!==s.visible)if("color"===s.type){let t=s.color,a="string"==typeof t?"function"==typeof e?.color?e.color(t):void 0:t;a&&"number"==typeof a.r&&(r(a.r),r(a.g),r(a.b)),r(w(s.alpha,1))}else if("gradient"===s.type){let e=s;for(let t of e.colors??[])r(t[0]),r(t[1]),r(t[2]),r(t[3]);for(let t of e.steps??[])r(t);r(w(e.angle,0)),r(e.gradientType),r(e.smooth?1:0)}})}else s?.color&&!0===s.color.isColor&&(r(s.color.r),r(s.color.g),r(s.color.b));return a}(d,this.context.shared),null===l.boundingSphere&&l.computeBoundingSphere();let c=l.boundingSphere;if(c){let e=0,t=1;n?(z.copy(c.center).applyMatrix4(n),e=z.length(),t=q.matrixMaxScale(n)):e=c.center.length(),a=Math.max(a,e+c.radius*t)}}for(let e of o.children)n(e)};return n(e),0===t.length?null:{sources:t,hashes:s,radius:Math.max(a,.001),colorHash:i}}static matrixHash(e){if(!e)return 0;let t=e.elements,s=0;for(let e=0;e<16;e++)s+=t[e]*(e+1);return s}static matrixMaxScale(e){let t=e.elements,s=Math.hypot(t[0],t[1],t[2]),a=Math.hypot(t[4],t[5],t[6]),i=Math.hypot(t[8],t[9],t[10]);return Math.max(s,a,i,1e-6)}baseWorldScale(e){return P.copy(e.matrixWorld).decompose(z,L,X),Math.max(Math.abs(X.x),Math.abs(X.y),Math.abs(X.z),1e-6)}get widthWorldScale(){return"object"===this.data.headShape&&this.data.baseObjectId&&this.baseScaleAtRegen>0?this.baseScaleAtRegen:1}checkBaseDrift(){if("object"!==this.data.headShape||!this.data.baseObjectId)return;let e=this.context.scene.find(this.data.baseObjectId);if(!e)return;if(!this.baseFoundAtRegen)return void this.regenerate();e.updateWorldMatrix(!0,!0);let t=this.collectBaseSources(e),s=t?.sources??[],a=t?.hashes??[],i=this.baseSourceGeomsAtRegen,r=this.baseSourceHashesAtRegen,n=s.length!==i.length;if(!n)for(let e=0;e<s.length;e++)if(s[e].geometry!==i[e]||Math.abs(a[e]-r[e])>1e-4*Math.max(Math.abs(r[e]),1)){n=!0;break}if(!n&&"object"===this.data.hairColorSource&&(t?.colorHash??0)!==this.baseColorHashAtRegen&&(n=!0),!n&&s.length>0){let t=this.baseWorldScale(e);n=Math.abs(t-this.baseScaleAtRegen)>.001*Math.max(this.baseScaleAtRegen,1e-6)}n&&this.regenerate()}applyScalpState(){let e=this.data.headShape,t="object"===e&&null!==this.data.baseObjectId;this.scalpMesh.visible=!t,!t&&(this.scalpMesh.geometry.dispose(),this.scalpMesh.geometry="torus"===e?new d(140,70,24,48):"cylinder"===e?new a(80,80,160,48,1):new l(F,48,32))}boneTransform(e,t){let s=this.matrixWorld;if("object"===this.data.headShape&&this.data.baseObjectId){let e=this.context.scene.find(this.data.baseObjectId)?.matrixWorld;e&&(s=e)}P.copy(s).decompose(t,e,X)}raycast(e,t){if(!this.scalpMesh.visible)return;let s=[];this.scalpMesh.raycast(e,s);for(let e of s)e.object=this,t.push(e)}get shadowBoundsRadius(){let e="torus"===this.data.headShape?2.6:1.5;return this.roots.unitScale*(e+2.6*Math.max(this.data.hairLength,0))}getShadowBoundsCenter(e){return this.boneTransform(L,e),e}updateEntityBoxSize(e,t){let s=this.shadowBoundsRadius;e.set(0,0,0),t.set(s,s,s)}dispose(){super.dispose(),this.scalpMesh.geometry.dispose(),this.scalpMesh.material.dispose(),this.ribbonMesh.geometry.dispose(),this.ribbonMesh.material.dispose?.(),M()?.release(this)}};export{b as a,S as b,f as c,M as d,j as e,I as f,B as g,F as h,H as i,O as j,q as k};
@@ -0,0 +1 @@
1
+ import{f as t}from"./runtime-chunk-RTLL6WIB.js";import{h as e}from"./runtime-chunk-2PT2WH66.js";import{c as i}from"./runtime-chunk-TZCHGFVF.js";import{Aa as r,Ba as s,C as a,Da as n,J as o,Oa as l,i as h,j as p,k as d,n as c}from"./runtime-chunk-KHCWX7UM.js";import{$c as u,Cc as m,Ec as f,Fc as y,Kd as v,Oc as g,Pc as x,Pd as S,Rc as w,Re as M,Xc as B,bd as b,cd as P,dd as E,kd as A,ld as D}from"./runtime-chunk-BVVSZMXD.js";var C={Cloner:null,changeEntityProptotype:()=>{},createEntity:()=>{}};function O(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 _(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 W=new y,R=new y,V=new g,T=[new y(-1,1,1),new y(-1,-1,1),new y(1,-1,1),new y(1,1,1),new y(-1,1,-1),new y(-1,-1,-1),new y(1,-1,-1),new y(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]],L=[[0,2],[7,5],[4,1],[3,6],[4,3],[1,6]],I=(t,e,i)=>{t.updateEntityBoxSize(W,R),V.copy(e).multiply(t.matrixWorld),0===R.x&&0===R.y&&0===R.z?i.push(new y(W.x,W.y,W.z).applyMatrix4(V)):T.forEach(t=>{i.push(t.clone().multiply(R).add(W).applyMatrix4(V))})},F=class extends B{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 V.copy(e).multiply(t.matrixWorld),void i.push((new y).applyMatrix4(V));I(t,e,r)}}),0===r.length&&r.push(...i)}else I(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(V.copy(this.matrix).setPosition(0,0,0)),t}computeVertices(){this.getSize(R).multiplyScalar(.5),this.getCenter(W),V.copy(this.matrix).setPosition(W),this.vertices=T.map(t=>t.clone().multiply(R).applyMatrix4(V))}computeEdges(){this.vertices.length>0&&this.computeVertices(),this.edges=U.map(([t,e])=>new M(this.vertices[t],this.vertices[e])),this.centerEdges=this.edges.map(t=>t.getCenter(new y))}computeFaces(){this.vertices.length>0&&this.computeVertices(),this.faces=L.map(([t,e])=>this.vertices[t].clone().add(this.vertices[e]).multiplyScalar(.5))}},z=new y(1,1,1);function j(t,e,i,r,s=new g){return s.compose(t,e,z).multiply(i).scale(r)}var N,k=new g;(N||(N={})).is=function(t){return t&&t.__isSPEObject};var G=t=>class extends t{constructor(){super(...arguments),this.previousModelViewMatrix=new g,this.copyPreviousMatrix=!0,this.pivotMatrix=new g,this.matrixWorldRigid=new g,this.shearScale=new g,this.shearScaleInv=new g,this.shearMatrix=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(k.copy(this.parent.matrixWorld).invert()),t.multiply(k.copy(this.pivotMatrix).invert()),!0)}isDescendantOf(t){t instanceof w&&(t=t.uuid);let e=this;for(;e.parent;){if(e.parent.uuid===t)return!0;e=e.parent}return!1}updateMatrix(){!this.shearMatrix||(j(this.position,this.quaternion,this.shearMatrix,this.scale,this.matrix),this.matrixWorldNeedsUpdate=!0)}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.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.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.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)N.is(i)&&i.traverseObject(t,e+1)}traverseObject(t,e=0){if(!0!==t(this,e))for(let i of this.children)N.is(i)&&i.traverseObject(t,e+1)}updateMatrixWorldRigid(){this.hasNonUniformScale=l(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)),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}onAfterRender(t,e,i,r,s,a){this.copyPreviousMatrix&&this.previousModelViewMatrix.copy(this.modelViewMatrix)}},q=class extends S{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}},H=.001,X=new y,Z=new y,K=new y,$=new y,J=new y,Q=new y,Y=new y,tt=new y,et=new y;function it(t,e,i){return X.subVectors(e,t),Z.subVectors(e,i),X.cross(Z).length()<=H}var rt=new WeakMap;function st(t){let e=rt.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 y(...e[0].data.position)];K.copy(r[0]);for(let t=0;t<e.length-1;t++)X.fromArray(e[t].data.position),Z.fromArray(e[t+1].data.position),J.subVectors(X,K),Y.subVectors(X,Z),J.cross(Y).length()>H&&(i.push(e[t]),r.push((new y).copy(X)),K.copy(X));let s=e[e.length-1];i.push(s),r.push(new y(...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 y(...e.controlPrevious.position)),h.push(new y(...e.controlNext.position))}let p=[];for(let t=0;t<n;t++){let e=t===o-1?0:t+1;p.push(it(r[t],h[t],r[e])&&it(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 y).subVectors(r[c],s).normalize(),f=(new y).subVectors(r[u],s).normalize();n.prevDir=m,n.nextDir=f;let v=p[a&&0===t?o-1:t-1],g=p[t];if(v&&g){$.addVectors(m,f).normalize();let t=K.crossVectors($,m).length()/m.dot($);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(K.copy(i.nextDir).setLength(i.removedLength)),r.prevDir&&e.add(K.copy(r.prevDir).setLength(r.removedLength))),t.distanceTo(e)>H&&(s=new v(t,t.clone().lerp(e,.3),e.clone().lerp(t,.3),e))}else i.position.distanceTo(r.position)>H&&(s=new v(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;$.addVectors(e.prevDir,e.nextDir).normalize(),J.copy(r).lerp(s,.5);let n=r.distanceTo(s)/2;et.copy($).multiplyScalar(Math.sqrt(Math.pow(a,2)-Math.pow(n,2))).add(J),Q.copy($).multiplyScalar(-a).add(et);let o=i.distanceTo(Q)/i.distanceTo(J);Y.copy(e.prevDir).multiplyScalar(o*i.distanceTo(r)).add(i),tt.copy(Y).lerp(Q,2);let l=r.clone().lerp(Y,4/3),h=s.clone().lerp(tt,4/3);c[2*t]=new v(r,l,h,s)}let u=new q;for(let t=0;t<c.length;t++){let e=c[t];e&&u.add(e)}return u}(t);return rt.set(t.points,{isClosed:t.isClosed,curve:i}),i}var at,nt=new g,ot=new f,lt=new f,ht=new x,pt=new y,dt=new y(0,1,0);(at||(at={})).is=function(t){return t&&t.__isEntity};var ct=t=>at.is(t),ut={type:"completeState",isfromEntity:!0},mt=["x","y","z"],ft=new y,yt=new y(1,1,1),vt=new f,gt=new x,xt=new g,St=l=>class extends(G(l)){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.transitionState={settled:!0,state:null},this.currentTransitionEvent=null,this.previousAction=null,this._singleBBox=new F,this._recursiveBBox=new F,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(at.is(e))return e}entityChildrenCount(){let t=this.children.length;for(;t--;)if(at.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(!at.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=p.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=>{ct(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(at.is(e[i]))return e[i];if(at.is(t))return t.traverseSortNextHelper()}}sortNext(){let t=this.children;return this.children.length>0&&at.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)ct(e)&&t(e)}traverseEntityAncestors(t){this.traverseAncestors(e=>{at.is(e)&&t(e)})}traverseConcreteEntity(t,e=0){if(!0!==t(this,e))for(let i of this.children)ct(i)&&i.isConcreteEntity&&i.traverseEntity(t,e+1)}traverseEntity(t,e=0){if(!0!==t(this,e))for(let i of this.children)ct(i)&&i.traverseEntity(t,e+1)}traverseVisibleEntity(t){t(this);for(let e of this.children)ct(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}hasEntityChild(){return this.children.some(t=>ct(t))}isAncestorOf(t){if(this.uuid===t)return!1;let e=!1;return this.traverseEntity(i=>{i.uuid===t&&(e=!0)}),e}toObjectTransformState(e=[]){this.updateWorldMatrix(!0,!1);let i={position:this.position.toArray(),rotation:[this.rotation.x*m.RAD2DEG,this.rotation.y*m.RAD2DEG,this.rotation.z*m.RAD2DEG],scale:this.scale.toArray(),shear:a.fromMatrix(this.shearMatrix.toArray()),pivot:[0,0,0],pivotRotation:[0,0,0]};return t(i,e)}getTransformValues(t,e,i){return e[t].map((e,r)=>i?.shared.getVariable(e,[this.uuid,t,mt[r]])??e)}updateTransformState(t,e){let i=!1;if(t.position&&(this.position.fromArray(this.getTransformValues("position",t,e)),i=!0),t.rotation&&(ft.fromArray(this.getTransformValues("rotation",t,e)).multiplyScalar(m.DEG2RAD),this.rotation.setFromVector3(ft),i=!0),t.scale&&(this.scale.fromArray(this.getTransformValues("scale",t,e)),i=!0),t.shear&&(this.shearMatrix.fromArray(a.toMatrix(t.shear)),i=!0),void 0!==t.pivot||void 0!==t.pivotRotation)if(i=!0,void 0!==t.pivot&&void 0!==t.pivotRotation)this.pivotMatrix.compose(ft.fromArray(t.pivot).negate(),vt.setFromEuler(gt.fromArray(t.pivotRotation.map(t=>t*m.DEG2RAD))).invert(),yt);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=ft.setFromMatrixPosition(this.pivotMatrix);vt.setFromEuler(gt.fromArray(t.pivotRotation.map(t=>t*m.DEG2RAD))).invert(),this.pivotMatrix.compose(e,vt,yt)}return i&&(this.updateMatrix(),this.resetBBoxNeedsUpdate(),this.invalidateClonerTransform(this),this.traverseEntityAncestors(t=>{t.invalidateClonerTransform(this)})),t.position&&t.rotation&&t.scale&&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)at.is(t)&&t.disposeRecursively()}disposeRecursively(){this.dispose(),this.children.forEach(t=>{at.is(t)&&t.disposeRecursively()})}toState(e=[]){let i={name:this.name,visible:this.visible,raycastLock:this.raycastLock,...this.toObjectTransformState(e)};return t(i,e)}updateByObjUpdateOp(t,e){void 0!==t&&this.updateByOp({type:0,props:t,path:[]},{...this.data,...t},e,!1)}updateByOp(t,e,i,a){let o=this.data;this.data=e;let l=t,p=_(t.path,["states","*"]);if(null!==p){if(0===t.type){let[e]=p;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=c.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])}}l={...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=c.removeOverridden(t.path,t.props,e);l={...t,props:i}}}if(this.updateByPatchedOpBase(l,n.patch(this.data,this.stateSelection?this.data.states.data(this.stateSelection):void 0),i),_(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(h.apply(r.component.data,r.overrideData),i))}}else{let n=i.scene.findInstance([this.uuid,...s]);if(n){let o=c.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,d.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 s.rootOverrideProps)i in t.props&&(void 0===e&&(e={}),e[i]=t.props[i]);e&&(r={...t,props:e})}else for(let e of s.rootOverrideProps)if(_(t.path,[e])){r=t;break}void 0!==r&&this.instances.forEach(t=>{if(t.isInstanceRoot){let e=h.filterOp(t.overrideData,r);e&&t.updateByOp(e,d.applySimple(t.data,e),i,!0)}}),this.instances.forEach(r=>{if(!r.isInstanceRoot){let s=h.filterOp(r.overrideData,t);if(s){let a;a=o===r.data&&t===s?e:d.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)at.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!==_(t.path,["pathSnapping"])&&this.updatePathSnapping(e.pathSnapping),null!==_(t.path,["cloner"])){let r=d.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=st(n.geometry.path),l=function(t){let e=t%1;return e<0?e+1:0===e&&t>0?1:e}(i+r),h=null;try{h=o.curves.length?o.getPointAt(l):null}catch(t){}if(null===h)return;a.updateMatrixWorld();let p=this.parent?xt.copy(this.parent.matrixWorld):xt.identity(),d=function(t,e,i,r){ot.setFromRotationMatrix(nt.extractRotation(r));let s=t.clone().applyMatrix4(nt.copy(r).invert().multiply(i));if(null===e)lt.setFromRotationMatrix(nt.extractRotation(i));else{let t=e.clone().applyMatrix4(nt.extractRotation(i));lt.setFromRotationMatrix(nt.lookAt(pt.set(0,0,0),t,dt))}return{position:s,rotation:(new y).setFromEuler(ht.setFromQuaternion(ot.invert().multiply(lt))).multiplyScalar(m.RAD2DEG)}}(h,"tangential"===s?o.getTangentAt(l):null,a.matrixWorld,p);this.updateTransformState({position:d.position.toArray(),rotation:d.rotation.toArray()}),this.traverseEntity(t=>{t._cameraType&&t.dispatchEvent(ut)})}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(t=>e(t)&&"toObject"===t.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"})}},wt=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 Et(!1,e,i,r,s,a,n,o,l,h,p,d);return Object.assign(c,{userData:{...t,type:"HelixGeometry"}})}},Mt=new u([0,0,0],1);function Bt(t){return"TorusGeometry"===t.type&&360===t.arc}var bt,Pt,Et=class extends E{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,f,v,g,x,S,w,M=()=>new y,B=new y,P=M(),E=M(),A=M(),D=M(),C=M(),O=M(),_=M(),W=M(),R=M(),V=M(),T=M(),U=i-2*o+.001,L=U/a,I=Math.ceil(n*a),F=I+1,z=U/I,j=-U/2,N=h+1,k=2*Math.PI/h,G=Math.PI/2/d,q=Math.min((1-p/100)*o,o-.01),H=o-q,X=0,Z=2*d+2,K=N*Z/2,$=K+N*F,J=Math.max(0,N*(F+Z)),[Q,Y,tt]=[3,3,2].map(t=>Array(J*t).fill(0)),et=[],it=s-o;function rt(e,i){let r=Math.PI/2;x=i*z,w=2*Math.PI*(x%L)/L+r,x+=j,S=Math.sin(w)*it,g=Math.cos(w)*it,t?e.set(g,S,x):e.set(g,x,S)}rt(B,-1e-10),rt(P,0),D.copy(B),rt(B,1);let st=B.distanceTo(P),at=c?0:H+q,nt=st*I+2*at,ot=q,lt=nt-at;for(let e=0;e<=I;e++){rt(E,e),T.subVectors(E,D).normalize(),D.copy(E),R.copy(E).setComponent(+t+1,0).normalize(),V.crossVectors(T,R).normalize();let i=0===e,r=e===I,s=i?3*Math.PI/2:G,a=i?ot:lt,n=i?N:$,l=i?0:J-N,p=T.clone().multiplyScalar(i?-H:H).add(E),u=T.clone().multiplyScalar(i?-1:1).normalize();for(let t=0;t<N;t++){let m=t*k;if(C.addVectors(B.copy(R).multiplyScalar(o*Math.cos(m)),P.copy(V).multiplyScalar(o*Math.sin(m))),O.copy(C).normalize(),i||r){c||(X=l+t,[0,1,2].forEach(t=>{Q[3*X+t]=p.getComponent(t),Y[3*X+t]=u.getComponent(t)}),tt[2*X]=+r,tt[2*X+1]=t/h),P.copy(O).multiplyScalar(q),A.addVectors(E,P);for(let e=0;e<d;e++){let r=e*G+s;_.addVectors(B.copy(T).multiplyScalar(H*Math.sin(r)),P.copy(O).multiplyScalar(H*Math.cos(r))),W.copy(_).normalize(),P.addVectors(A,_),_.normalize(),X=n+e*N+t,[0,1,2].forEach(t=>{Q[3*X+t]=P.getComponent(t),Y[3*X+t]=W.getComponent(t)});let o=+i+Math.sin(r);tt[2*X]=(a+H*o)/nt,tt[2*X+1]=t/h}}P.addVectors(E,C),X=K+e*N+t,[0,1,2].forEach(t=>{Q[3*X+t]=P.getComponent(t),Y[3*X+t]=O.getComponent(t)}),tt[2*X]=(at+e*st)/nt,tt[2*X+1]=t/h}}let ht=F+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<N-1;i++)u=t*N+i,m=u+1,f=(e?i:u)+N,v=(e?i+1:m)+N,0===t?et.push(m,v,f):t===ht-2?et.push(u,m,f):et.push(u,m,f,m,v,f)}this.setIndex(et),this.setAttribute("position",new b(Q,3)),this.setAttribute("normal",new b(Y,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 Mt.array=new Uint32Array(l),Mt.count=l.length,Mt}},At=new Map,Dt=0;function Ct(t){return Pt||(Pt=async function(){let e=t??"https://cdn.spline.design/@splinetool/runtime@2.0.92/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}),bt=r}())}function Ot(){if(void 0===bt)throw new Error("boolean-wasm is not loaded");return bt}function _t(t){let e=At.get(t);if(void 0===e)throw new Error("Unknown csg mesh set handle "+t);return e}function Wt(t){return At.set(++Dt,t),Dt}var Rt={0:0,1:1,2:2};function Vt(t,e,i){if(void 0===bt)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=Bt(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 Wt(new bt.CsgMesh(r,s,a))}function Tt(t,e){let i=Ot(),r=Rt[e];if(void 0===r)throw new Error("Unknown boolean operation "+e);let s=t.map(_t);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 Ut(t,e,i,r){let s=Ot(),a=Tt(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 P),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 Wt(a)}function Lt(t,e){let i=Ot(),r=Tt(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 It(t,e){_t(t).transform(new Float32Array(e.elements))}function Ft(t){let e=At.get(t);void 0!==e&&(e.free(),At.delete(t))}function zt(t,e){return Wt(Ot().instanced_union(_t(t),e))}function jt(t){return null!==t&&"booleanOp"in t}var Nt=class extends(St(D)){constructor(){super(...arguments),this.booleanMeshSetAddress=-1,this.booleanWasTransformed=!1,this.booleanMatrixInvOld=new g}updateVisible(t){super.updateVisible(t),this.visible=!jt(this.parent)&&this.visible,jt(this.parent)&&this.parent.invalidateDownstreamBooleanData()}onClonerLayoutUpdated(){jt(this.parent)&&this.invalidateDownstreamBooleanData()}freeBooleanPointer(){-1!==this.booleanMeshSetAddress&&(Ft(this.booleanMeshSetAddress),this.booleanMeshSetAddress=-1)}invalidateDownstreamBooleanData(t=!1){return t?this.booleanWasTransformed=!0:this.freeBooleanPointer(),jt(this.parent)?this.parent.invalidateDownstreamBooleanData():this}invalidateUpstreamBooleanData(){this.freeBooleanPointer();for(let t of this.children)t instanceof Nt&&(t.freeBooleanPointer(),jt(t)&&t.invalidateUpstreamBooleanData())}updateTransformState(t,e){let i=super.updateTransformState(t,e);return i&&jt(this.parent)&&this.invalidateDownstreamBooleanData(!0),i}onVariableUpdate(t=!1){super.onVariableUpdate(t),jt(this.parent)&&this.invalidateDownstreamBooleanData(!0)}},kt=new B;function Gt(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)}kt.min.set(a,n,o),kt.max.set(l,h,p),kt.getCenter(r),kt.getSize(s).multiplyScalar(.5)}var qt=new E,Ht=new A,Xt=class extends Nt{constructor(t,e){super(qt,Ht),this.super_Entity(t,e)}updateState(t,e){this.updateState_Entity(t,e)}raycast(t,e){if(this.raycastDeformed(t,e))return;super.raycast(t,e)}raycastDeformed(t,e){return!1}updateEntityBoxSize(t,e){let i=this.geometry.getAttribute("position");void 0!==i?Gt(i,this.geometry.drawRange.start,this.geometry.drawRange.count<1/0?this.geometry.drawRange.count:i.count,t,e):super.updateEntityBoxSize(t,e)}};export{O as a,_ as b,C as c,j as d,N as e,G as f,st as g,at as h,ct as i,St as j,wt as k,Bt as l,Et as m,Ct as n,Vt as o,Ut as p,Lt as q,It as r,Ft as s,zt as t,Gt as u,Xt as v};
@@ -0,0 +1 @@
1
+ import{Cc as e,Ec as t,Fc as r,Oc as a,Pc as n}from"./runtime-chunk-BVVSZMXD.js";import{c as i}from"./runtime-chunk-ML3Z74BL.js";function o(e){return Array.isArray(e)?e:[e]}function s(e,t){let r=0;for(;r<e.length&&r<t.length;){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1;r+=1}return r!==t.length?-1:r!==e.length?1:0}function l(e,t){return Object.setPrototypeOf(e,t),e}function c(e){let t={...e};return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),t}function u(e,t,r){if(void 0===e?void 0===t?(e=0,t=10):e=t-10:void 0===t&&(t=e+10),e>t){let r=e;e=t,t=r}let a=[],n=1/(r+1);for(let i=0;i<r;i++){let r=e+(t-e)*(i+.75+.5*Math.random())*n;a.push(r)}return a}function d(e){return e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Float32Array||e instanceof Float64Array}function f(e){if(void 0!==e.deepFreeze)return void e.deepFreeze(e);let t=Object.getOwnPropertyNames(e);for(let r of t){let t=e[r];t&&"object"==typeof t&&f(t)}return Object.freeze(e)}function p(e){for(let t of Object.keys(e))void 0===e[t]&&delete e[t];return e}var h=class{},y=class extends h{constructor(e){super(),this.id=e}},m=class extends h{constructor(e){super(),this.data=e}},g=class{modifyById(e,t){let r=this;if(void 0===r[e])throw new Error("not expected");{let a={...r,[e]:t};return Object.setPrototypeOf(a,g.prototype),a}}add(e,t){return this.runOp({type:1,id:e,data:t})?.data??this}runOp(e){let t=this;if(1===e.type){let r,a=t[e.id];r=void 0===a?{type:2,id:e.id}:{type:1,id:e.id,data:a};let{id:n,data:i}=e,o={...t,[n]:i};return Object.setPrototypeOf(o,g.prototype),{data:o,actual:e,reverse:r}}if(2===e.type){let{id:r}=e,a=t[r];if(void 0===a)return null;{let n={...t};return Object.setPrototypeOf(n,g.prototype),delete n[r],{data:n,actual:e,reverse:{type:1,id:r,data:a}}}}return null}},b=class extends Error{};function v(e,t){for(let r of e)!0!==t(r.id,r.data)&&v(r.children,t)}function w(e,t){if(!0!==t(e.id,e.data))for(let r of e.children)w(r,t)}var D,S,O=class extends Array{constructor(...e){super(...e),i(this,"partialObjectCaches"),i(this,"objCaches"),i(this,"parentCaches"),Object.setPrototypeOf(this,O.prototype)}deepFreeze(){let e=0;for(;e<this.length;)f(this[e]),e++}fillCaches0(e,t){this.objCaches.set(e.id,e),this.parentCaches.set(e.id,t);for(let t of e.children)this.fillCaches0(t,e.id)}fillCaches(){if(void 0===this.objCaches){this.objCaches=new Map,this.parentCaches=new Map;for(let e of this)this.fillCaches0(e,null)}}randomId(){this.fillCaches();let e=Array.from(this.objCaches.keys());if(0!==e.length)return e[Math.max(0,Math.floor(Math.random()*e.length)-1)]}nonExistOrDescendantOf(e,t){if(!this.has(e))return!0;for(;e;){let r=this.parent(e);if(r===t)return!0;e=r}return!1}rootAcestor(e){for(;e;){let t=this.parent(e);if(!t)return e;e=t}return e}isDescendantOf(e,t){for(;e;){let r=this.parent(e);if(r===t)return!0;e=r}return!1}data(e){return this.get(e)?.data}has(e){return void 0!==this.childrenOf(e)}partialCache(e){void 0===this.partialObjectCaches&&(this.partialObjectCaches=new Map);let t=this.get(e);void 0!==t&&this.partialObjectCaches.set(e,t)}get(e){if(void 0!==this.partialObjectCaches){let t=this.partialObjectCaches.get(e);if(void 0!==t)return t}return this.fillCaches(),this.objCaches.get(e)}childrenOf(e){return null===e?this:this.get(e)?.children}traverseFrom(e,t){if(null===e)this.traverse(t);else{let r=this.get(e);r&&w(r,t)}}traverse(e){v(this,e)}totalSize(){return this.fillCaches(),this.objCaches.size}parent(e){return this.fillCaches(),this.parentCaches.get(e)}childrenArray(e){return null===e?this:this.get(e).children}modifyById(e,t){if(void 0===this.get(e))throw new Error("not expected");{let r=this.parent(e),a=this.childrenArray(r),n=a.findIndex(t=>t.id===e);if(n<0)throw new Error("not expected");let i=a[n];a=[...a],a[n]={...i,data:t};let o=new Map;return o.set(e,a[n]),this.modifyArrayBy(r,a,o)}}modifyArrayBy(e,t,r=void 0){let a=e,n=t;for(;null!==a;){let e=n,t=a;if(a=this.parent(a),void 0===a)throw new Error;n=this.childrenArray(a);let i=n.findIndex(e=>e.id===t);if(i<0)throw new Error;n=[...n],n[i]={...n[i],children:e},r&&r.set(t,n[i])}Object.setPrototypeOf(n,O.prototype);let i=n;if(r&&void 0!==this.objCaches&&void 0!==this.parentCaches){i.objCaches=this.objCaches;for(let[e,t]of r)i.objCaches.set(e,t);i.parentCaches=this.parentCaches,this.objCaches=void 0,this.parentCaches=void 0}else i.fillCaches();return i}runOp(e){switch(e.type){case 7:return this.addOp(e);case 8:return this.deleteOp(e);case 9:return this.moveOp(e)}return null}checkDuplicatedIdRec({id:e,children:t}){if(void 0!==this.get(e))return!0;for(let e of t)if(this.checkDuplicatedIdRec(e))return!0;return!1}addOp(e){let{parent:t,fi:r,id:a,data:n,children:i}=e;if(null!==t&&void 0===this.get(t))return null;if(this.checkDuplicatedIdRec(e))return null;{let o=t,s=this.childrenArray(o),l={fi:r,id:a,data:n,children:i};return s=[...s,l],s.sort((e,t)=>e.fi-t.fi),e.localIndex=s.indexOf(l),{data:this.modifyArrayBy(o,s),actual:e,reverse:{type:8,id:a}}}}deleteOp(e){let{id:t}=e;if(null===this.get(t))return null;{let r=this.parent(t);if(void 0===r)return null;let a=this.childrenArray(r),n=a.findIndex(e=>e.id===t);e.localIndex=n,a=[...a];let i=a.splice(n,1)[0];return{data:this.modifyArrayBy(r,a),actual:e,reverse:{type:7,...i,parent:r}}}}moveOp(e){let{parent:t,fi:r,id:a}=e;if(null!==t&&void 0===this.get(t))return this.deleteOp({type:8,id:a});if(null!==t){let e=t;for(;null!==e;){if(void 0===e)throw new Error;if(e===a)throw new b("cyclic tree");e=this.parent(e)}}let n=this.parent(a);if(void 0===n)return null;let i=n,o=this.childrenArray(n),s=o.findIndex(e=>e.id===a);o=[...o];let l=o.splice(s,1)[0],c=this.modifyArrayBy(n,o);n=t,o=c.childrenArray(n);let u=l.fi;return l={...l,fi:r},o=[...o,l],o.sort((e,t)=>e.fi-t.fi),e.localIndex=o.indexOf(l),c=c.modifyArrayBy(n,o),{data:c,actual:e,reverse:{type:9,parent:i,fi:u,id:a}}}previous(e,t){if(null===t){let t=this.childrenArray(e);return 0===t.length?null:t[t.length-1].id}let r=null;for(let a of this.childrenArray(e)){if(a.id===t)return r;r=a.id}return null}traverseSortNext(e){let t=this.parent(e);if(void 0!==t){let r=this.childrenArray(t),a=r.findIndex(t=>t.id===e)+1;if(a<r.length)return r[a].id;if(t)return this.traverseSortNext(t)}}sortNext(e){let t=this.childrenArray(e);return t.length>0?t[0].id:this.traverseSortNext(e)}traverseSortPrevious(e){let t=this.childrenArray(e);return t.length>0?this.traverseSortPrevious(t[t.length-1].id):e}sortPrevious(e){let t=this.parent(e);if(void 0!==t){let r=this.childrenArray(t),a=r.findIndex(t=>t.id===e)-1;return a>=0?this.traverseSortPrevious(r[a].id):t}}getAllSorted(e){let t=[];for(let r of e){let e=this.getWithSortKey(r.id);void 0!==e&&t.push({...r,...e})}t.sort((e,t)=>s(e.sortKey,t.sortKey));for(let e of t)delete e.sortKey;return t}getAllIdSorted(e){let t=[];for(let r of e){let e=this.getWithSortKey(r);void 0!==e&&t.push(e)}t.sort((e,t)=>s(e.sortKey,t.sortKey));for(let e of t)delete e.sortKey;return t.map(e=>e.id)}getWithSortKey(e){let t=e,r=[],a=this.get(t),n=a;if(void 0!==a){for(;t;)r.splice(0,0,a.fi),t=this.parent(t),null!==t&&(a=this.get(t));return{...n,sortKey:r}}}insertBeforeHelper(e,t,r){return this.insertAfterHelper(e,this.previous(e,t),r)}insertAfterHelper(e,t,r){let a=this.childrenArray(e);if(null===t){if(0===a.length)return u(0,r,r);{let e=a[0].fi;return u(e-r,e,r)}}{let n=this.get(t);if(void 0===n||this.parent(t)!==e)throw new Error("illegal args");let i=a.find(e=>e.fi>n.fi);if(void 0===i){let e=a[a.length-1].fi;return u(e,e+r,r)}return u(n.fi,i.fi,r)}}},A=null;(S=D||(D={})).setPreservePrototype=function(e){A=e},S.tryPreservePrototype=function(e,t){return Object.getPrototypeOf(e)===A&&Object.setPrototypeOf(t,A),t},S.runOp=function(e,t){if(0!==t.type)return null;if(Array.isArray(e)||d(e)){let r=t.props,a={},n=d(e)?e.slice():[...e],i=!1;if(r)for(let e of Object.keys(r)){let t=parseInt(e);if(isNaN(t))throw new Error("wrong index");a[e]=n[t],n[t]=r[e],i=!0}return i?{data:n,actual:t,reverse:{type:0,props:a}}:null}{let r=t.props,a={},n={...e},i=!1;if(r)for(let e of Object.keys(r)){a[e]=n[e];let t=r[e];void 0===t?delete n[e]:n[e]=t,i=!0}return i?{data:S.tryPreservePrototype(e,n),actual:t,reverse:{type:0,props:a}}:null}};var j=class extends Array{constructor(...e){super(...e),i(this,"objCaches"),Object.setPrototypeOf(this,j.prototype)}deepFreeze(){let e=0;for(;e<this.length;)f(this[e]),e++}fillCaches0(e){this.objCaches.set(e.id,e)}fillCaches(){if(void 0===this.objCaches){this.objCaches=new Map,Object.getOwnPropertyDescriptor(this,"objCaches").enumerable=!1;for(let e of this)this.fillCaches0(e)}}randomId(){this.fillCaches();let e=Array.from(this.objCaches.keys());if(0!==e.length)return e[Math.max(0,Math.floor(Math.random()*e.length)-1)]}data(e){return this.get(e)?.data}get(e){return this.fillCaches(),this.objCaches.get(e)}modifyById(e,t){if(void 0===this.get(e))throw new Error("not expected");{let r=this,a=r.findIndex(t=>t.id===e);if(a<0)throw new Error("not expected");let n=r[a];return r=[...r],r[a]={...n,data:t},this.modifyArrayBy(r)}}modifyArrayBy(e){Object.setPrototypeOf(e,j.prototype);let t=e;return typeof process<"u"||t.fillCaches(),t}runOp(e){switch(e.type){case 4:return this.addOp(e);case 5:return this.deleteOp(e);case 6:return this.moveOp(e)}return null}addOp(e){let{fi:t,id:r,data:a}=e,n=this,i={fi:t,id:r,data:a};return n=[...n,i],n.sort((e,t)=>e.fi-t.fi),e.localIndex=n.indexOf(i),{data:this.modifyArrayBy(n),actual:e,reverse:{type:5,id:r}}}deleteOp(e){let{id:t}=e,r=this,a=r.findIndex(e=>e.id===t);if(-1===a)return null;e.localIndex=a,r=[...r];let n=r.splice(a,1)[0];return{data:this.modifyArrayBy(r),actual:e,reverse:{type:4,...n}}}moveOp(e){let{fi:t,id:r}=e,a=this;a=[...a];let n=a.findIndex(e=>e.id===r);if(-1===n)return null;let i=a[n].fi,o={...a[n],fi:t};return a[n]=o,a.sort((e,t)=>e.fi-t.fi),e.localIndex=a.indexOf(o),{data:this.modifyArrayBy(a),actual:e,reverse:{type:6,fi:i,id:r}}}previous(e){if(null===e)return 0===this.length?null:this[this.length-1].id;let t=null;for(let r of this){if(r.id===e)return t;t=r.id}return null}insertBeforeHelper(e,t){return this.insertAfterHelper(this.previous(e),t)}insertAfterHelper(e,t){let r=this;if(null===e){if(0===r.length)return u(0,t,t);{let e=r[0].fi;return u(e-t,e,t)}}{let a=this.get(e);if(void 0===a)throw new Error("illegal args");let n=r.find(e=>e.fi>a.fi);if(void 0===n){let e=r[r.length-1].fi;return u(e,e+t,t)}return u(a.fi,n.fi,t)}}};function C(e,t){return T(e,t,null)??e}function P(e,t){let r={cur:[],result:[],len:0};return[e=T(e,t,r)??e,r.result]}function M(e,t){return null===e?null:(e.cur[e.len]=t,e.len+=1,e)}function x(e){e&&(e.len-=1)}function E(e,t,r){let a=!1,n=e.map(e=>{let n=e.id,i=t[n];if(void 0!==i&&"string"==typeof i&&(a=!0,n=i,null!==r))throw new Error("not supported");let o=T(e.data,t,M(r,n));x(r),a=a||void 0!==o,void 0===o&&(o=e.data);let s=E(e.children,t,r);return void 0!==s?a=!0:s=e.children,{...e,id:n,data:o,children:s}});if(a)return n}function T(e,t,r){if(e instanceof O){let a=E(e,t,r);return void 0!==a&&Object.setPrototypeOf(a,Object.getPrototypeOf(e)),a}if(e instanceof j)return function(e,t,r){let a=!1,n=e.map(e=>{let n=e.id,i=t[n];if(void 0!==i&&"string"==typeof i&&(a=!0,n=i,null!==r))throw new Error("not supported");let o=T(e.data,t,M(r,n));return x(r),a=a||void 0!==o,void 0===o&&(o=e.data),{...e,id:n,data:o}});if(a)return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),n}(e,t,r);if(Array.isArray(e)){let a=!1,n=e.map((e,n)=>{let i=T(e,t,M(r,n));return x(r),a=a||void 0!==i,void 0===i&&(i=e),i});return a?(Object.setPrototypeOf(n,Object.getPrototypeOf(e)),n):void 0}if(e&&"object"==typeof e&&!d(e)){let a={},n=!1;for(let[i,o]of Object.entries(e))if("name"!==i&&"variableId"!==i){let e=t[i];if("string"==typeof e){if(null!==r)throw new Error("not supported");n=!0,i=e}let s=T(o,t,M(r,i));x(r),n=n||void 0!==s,void 0===s&&(s=o),a[i]=s}else a[i]=o;return n?(Object.setPrototypeOf(a,Object.getPrototypeOf(e)),a):void 0}if("string"==typeof e){let a=t[e];return void 0!==a&&function(e){if(null===e)return null;e.result.push(e.cur.slice(0,e.len))}(r),a}}function I(e){return e&&"object"==typeof e&&e instanceof L}var _,R,k,z,L=class{unusedFunOverridesTable(e){}runOp(e){let t=[],r=this,a=0,n={};for(;a<e.path.length;){if(t.push(r),r=void 0===r?void 0:r[e.path[a]],void 0!==r&&!I(r))return null;a+=1}r=r?c(r):new L;for(let[t,a]of Object.entries(e.props)){let e=r[t];n[t]=e,void 0===a?delete r[t]:r[t]=a}for(;a>0;){if(0===Object.keys(r).length){let n=t[a-1];n&&(r=c(n),delete r[e.path[a-1]])}else{let n=t[a-1];if(n){let t=c(n);t[e.path[a-1]]=r,r=t}else{let t=new L;t[e.path[a-1]]=r,r=t}}a-=1}return{data:Object.setPrototypeOf(r,L.prototype),actual:e,reverse:{...e,props:n}}}};function B(e,t){if(void 0===t)return;let r=!1,a=e.map(e=>{let a=e.id,n=U(e.data,t[a]);if(r=r||void 0!==n,void 0===n&&(n=e.data),e.children){let i=B(e.children,t);return void 0!==i?r=!0:i=e.children,{...e,id:a,data:n,children:i}}return{...e,id:a,data:n}});return r?a:void 0}function U(e,t){if(!I(t))return t;if(e instanceof O){let r=B(e,t);return void 0!==r&&Object.setPrototypeOf(r,Object.getPrototypeOf(e)),r}if(e instanceof j)return function(e,t){if(void 0===t)return;let r=!1,a=e.map(e=>{let a=e.id,n=U(e.data,t[a]);return r=r||void 0!==n,void 0===n&&(n=e.data),{...e,id:a,data:n}});return r?(Object.setPrototypeOf(a,Object.getPrototypeOf(e)),a):void 0}(e,t);if(Array.isArray(e)){let r=!1,a=e.map((e,a)=>{let n=U(e,t[a]);return r=r||void 0!==n,void 0===n&&(n=e),n});return r?(Object.setPrototypeOf(a,Object.getPrototypeOf(e)),a):void 0}if(e instanceof L)return G(e,t);if(e&&"object"==typeof e){let r={},a=!1;for(let[n,i]of Object.entries(e)){let e=U(i,t[n]);a=a||void 0!==e,void 0===e&&(e=i),r[n]=e}return a?(Object.setPrototypeOf(r,Object.getPrototypeOf(e)),r):void 0}}function G(e,t){if(void 0===e)return t;if(void 0===t)return e;if(!I(t))return t;if(!I(e))return _.apply(e,t);let r=new Set;for(let t of Object.keys(e))r.add(t);for(let e of Object.keys(t))r.add(e);let a=new L;for(let n of r){let r=G(void 0===e?void 0:e[n],void 0===t?void 0:t[n]);a[n]=r}return a}(e=>{e.apply=function(e,t){return U(e,t)??e},e.merge=function(e,t){return G(e,t)},e.filterOp=function(e,t){let r=0,a=t.path,n=e;for(;r<a.length&&void 0!==n;){if(n=ee.zoomOnce(n,a[r]),void 0===n)return t;if(!I(n))return;r+=1}if(void 0===n)return t;if(I(n)){if(0===t.type){let e={...t.props};for(let t of Object.keys(n))delete e[t];return{...t,props:e}}if(1===t.type||4===t.type||7===t.type){let e=B([t],n);return e?e[0]:t}return t}}})(_||(_={})),(R||(R={})).replaceProps=function(e,t){let r=ee.zoom(t,e.path);if("object"==typeof r){let t={};for(let a of Object.keys(e.props))t[a]=r[a];return{...e,props:t}}return{...e,props:{}}},(e=>{function t(e,t){let r=t.path,a=[];for(;;){let n;if(e instanceof L&&0===t.type&&(n=e.runOp({...t,path:r.slice(a.length)}),null===n&&(n=void 0)),void 0===n&&a.length===r.length&&(n=e instanceof O||e instanceof j||e instanceof g?e.runOp(t):D.runOp(e,t)),void 0!==n){if(null!==n){let e=n.data;for(let t=a.length-1;t>=0;t--){let n=r[t],i=a[t];if(i instanceof O){if("number"==typeof n)throw new Error("illegal arg");e=i.modifyById(n,e)}else if(i instanceof j){if("number"==typeof n)throw new Error("illegal arg");e=i.modifyById(n,e)}else if(i instanceof g){if("number"==typeof n)throw new Error("illegal arg");e=i.modifyById(n,e)}else if(i instanceof L){let t={...i,[n]:e};e=Object.setPrototypeOf(t,L.prototype)}else{if("object"!=typeof i)return null;if(Array.isArray(i)||d(i)){if("string"==typeof n&&(n=parseInt(n),isNaN(n)))throw new Error("Invalid path");let t=e;e=d(i)?i.slice():[...i],e[n]=t}else e=D.tryPreservePrototype(i,{...i,[n]:e})}}return{data:e,actual:{...n.actual,path:r},reverse:{...n.reverse,path:r}}}return null}let i,o=r[a.length];if(e instanceof O){if("number"==typeof o)throw new Error("");i=e.get(o)?.data}else if(e instanceof j){if("number"==typeof o)throw new Error("");i=e.get(o)?.data}else null!==e&&(i=e[o]);if(void 0===i)return null;a.push(e),e=i}}function r(e,t){for(let r=0;r<e.length&&r<t.length;r++)if(e[r]!==t[r])return!0;return!1}function a(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}e.drop=function(e,t){return{...e,path:e.path.slice(t)}},e.applySimple=function(e,r){return t(e,r)?.data??e},e.apply=t,e.pathDisjoint=r,e.pathEq=a,e.commutative=function(e,t){return r(e.path,t.path)},e.subsumed=function(e,t){return!(0!==e.type||0!==t.type||!a(e.path,t.path))&&Object.keys(e.props).every(e=>void 0!==t.props[e])}})(k||(k={})),(e=>{function t(e,t){let r=e,a=[],n=[];for(let e of t)try{if(3===e.type||5===e.type&&"variables"===e.path[e.path.length-1]){let t,i,o;if(3===e.type?(t=ee.zoom(r,[...e.path,e.id]),o=k.apply(r,{...e,type:2})):(t=ee.zoom(r,[...e.path,e.id,"value"]),o=k.apply(r,e)),null!==o){r=o.data;let[s,l]=P(r,{[e.id]:t});r=s;for(let o=0;o<l.length;o++){let s=l[o],c=s.pop();if("number"==typeof c){let a=[c];for(let e=o+1;e<l.length;e++){let t=l[e],r=t[t.length-1];if("number"!=typeof r||!ee.equal(s,t.slice(0,t.length-1)))break;a.push(r),l.splice(e,1)}let n=ee.zoom(r,s);i=n.map((t,r)=>a.includes(r)?e.id:t),t=n,c=s.pop()}else{if("alphaOverride"===c||"alpha"===c){t/=100;let e=t,a=ee.zoom(r,s.slice(0,s.length-2)),n=a.layers.map(t=>t.id===s[s.length-1]?{...t,data:{...t.data,[c]:e}}:t);Object.setPrototypeOf(n,Object.getPrototypeOf(a.layers)),a.layers=n}i=e.id}a.push({type:0,path:s,props:{[c]:t}}),n.push({type:0,path:s,props:{[c]:i}})}n.push(o.reverse),a.push(o.actual)}}else{let t=k.apply(r,e);null!==t&&(a.push(t.actual),r=t.data,n.push(t.reverse))}}catch(e){if(e instanceof b)return null;throw e}return{data:r,actual:a,reverse:n.reverse()}}e.empty=function(){return[]},e.removePrefix=function(e,t){let r=[];for(let a of e){let[e,...n]=a.path;e===t&&r.push({...a,path:n})}return r},e.addPrefix=function(e,t){return e.map(e=>({...e,path:[t,...e.path]}))},e.concat=function(e,t){return[...e,...t]},e.compress=function(e,t){return[...e.filter(e=>!t.some(t=>k.subsumed(e,t))),...t]},e.commutative=function(e,t){return e.every(e=>t.every(t=>k.commutative(e,t)))},e.applyAll=function(e,r){for(let a of r){let r=t(e,a);null!==r&&(e=r.data)}return e},e.apply=t})(z||(z={}));var V=Symbol(),F=Symbol(),H=Symbol(),N=class{reportOp(e,t,r=[]){let a=this;if(null===t)return;a._current=t.data;let n=r;for(;!(a instanceof re);){let e=a._path,t=a._current;if(""!==e&&n.splice(0,0,e),a=a._parent,null===a)return;a.update(e,t)}a.push(n,e,t.actual,t.reverse)}deleteChildren(e){if(this._children){let t=this._children[e];if(t){let r=t[H];r&&r(),delete this._children[e]}}}};function K(e,t){return e instanceof L?Object.setPrototypeOf(t,L.prototype):D.tryPreservePrototype(e,t)}var q=class extends N{constructor(e,t,r){super(),this._parent=e,this._path=t,this._current=r}update(e,t){if(Array.isArray(this._current)){if("string"==typeof e&&(e=parseInt(e),isNaN(e)))throw new Error("Invalid path");this._current=[...this._current],this._current[e]=t}else this._current=K(this._current,{...this._current,[e]:t})}runOp(e){let t=D.runOp(this._current,e);null!==t&&(t.data=K(this._current,t.data)),this.reportOp(e,t,e.path)}},W=class extends N{constructor(e,t,r){super(),this._parent=e,this._path=t,this._current=r}update(e,t){this._current={...this._current,[e]:t},Object.setPrototypeOf(this._current,g.prototype)}runOp(e){this.reportOp(e,this._current.runOp(e))}},X={get(e,t){if(t===H)return()=>{e._parent=null};if(t===V)return e._current;if(t===F)return e;let{_current:r,_children:a}=e;if("push"===t&&Array.isArray(r))throw new Error("not supported to expand array");let n=void 0===a?void 0:a[t];if(void 0!==n)return n;let i=r[t],o=ae(e,t,i);return o!==i?(void 0===a&&(a={},e._children=a),a[t]=o,o):i},has:(e,t)=>t in e._current,ownKeys:e=>Reflect.ownKeys(e._current),defineProperty(){throw Error("not supported")},getPrototypeOf:e=>Object.getPrototypeOf(e._current),setPrototypeOf(){throw Error("not supported")},getOwnPropertyDescriptor(e,t){let r=e._current,a=Reflect.getOwnPropertyDescriptor(r,t);return a&&{writable:!0,configurable:!0,enumerable:a.enumerable,value:r[t]}}},Z={...X,set(e,t,r){let a={type:0,props:{[t]:oe(r)??r}};return e.deleteChildren(t),e.runOp(a),!0},deleteProperty(e,t){let r={type:0,props:{[t]:void 0}};return e.deleteChildren(t),e.runOp(r),!0}},Y={...X,set(e,t,r){return void 0===r?this.deleteProperty(e,t):(e.deleteChildren(t),e.runOp({type:1,id:t,data:r})),!0},deleteProperty:(e,t)=>(e.runOp({type:2,id:t}),!0)},$=class extends N{constructor(e,t,r){super(),this._children={},this._parent=e,this._path=t,this._current=r,this[H]=()=>{this._parent=null}}unproxy(){return this._current}update(e,t){this._current=this._current.modifyById(e,t)}runOp(e){this.reportOp(e,this._current.runOp(e))}randomId(){return this._current.randomId()}isDescendantOf(e,t){return this._current.isDescendantOf(e,t)}childrenOf(e){return this._current.childrenOf(e)}get(e){return this._current.get(e)}parent(e){return this._current.parent(e)}traverse(e){this._current.traverse((t,r)=>{e(t,this.data(t))})}data(e){let{_current:t,_children:r}=this,a=void 0===r?void 0:r[e];if(void 0!==a)return a;let n=t.get(e)?.data,i=ae(this,e,n);return i!==n?(void 0===r&&(r={},this._children=r),r[e]=i,i):n}add(e,t,r,a,n){this.runOp({type:7,parent:e,fi:t,id:r,data:a,children:n})}move(e,t,r){this.runOp({type:9,parent:e,fi:t,id:r})}insertAfter(e,t,r){let a=this._current.insertAfterHelper(e,t,r.length);for(let t=0;t<r.length;t++){let n=r[t];this.add(e,a[t],n.id,n.data,n.children)}}insertBefore(e,t,r){let a=this._current.insertBeforeHelper(e,t,r.length);for(let t=0;t<r.length;t++){let n=r[t];this.add(e,a[t],n.id,n.data,n.children)}}moveAfter(e,t,r){let a=this._current.insertAfterHelper(e,t,r.length);for(let t=0;t<r.length;t++){let n=r[t];this.move(e,a[t],n)}}moveBefore(e,t,r){let a=this._current.insertBeforeHelper(e,t,r.length);for(let t=0;t<r.length;t++){let n=r[t];this.move(e,a[t],n)}}delete(e){this.deleteChildren(e),this.runOp({type:8,id:e})}sortNext(e){return this._current.sortNext(e)}sortPrevious(e){return this._current.sortPrevious(e)}getAllSorted(e){return this._current.getAllSorted(e)}},Q=class extends N{constructor(e,t,r){super(),this._children={},this._parent=e,this._path=t,this._current=r,this[H]=()=>{this._parent=null}}unproxy(){return this._current}get length(){return this._current.length}forEach(e){let t=this.length;for(let r=0;r<t;r++){let t=this._current[r].id,a=this._current[r].fi;e(this.data(this._current[r].id),t,a,r)}}find(e){let t=this.length;for(let r=0;r<t;r++){let t=this._current[r].id;if(e(this.data(t),t))return this.get(t)}}update(e,t){this._current=this._current.modifyById(e,t)}randomId(){return this._current.randomId()}get(e){return{...this._current.get(e),data:this.data(e)}}at(e){let{id:t,fi:r}=this._current.at(e);return{id:t,fi:r,data:this.data(t)}}data(e){let{_current:t,_children:r}=this,a=void 0===r?void 0:r[e];if(void 0!==a)return a;let n=t.get(e)?.data,i=ae(this,e,n);return i!==n?(void 0===r&&(r={},this._children=r),r[e]=i,i):n}runOp(e){this.reportOp(e,this._current.runOp(e))}add(e,t,r){this.runOp({type:4,fi:e,id:t,data:r})}move(e,t){this.runOp({type:6,fi:e,id:t})}insertAfter(e,t){let r=this._current.insertAfterHelper(e,t.length);for(let e=0;e<t.length;e++){let a=t[e];this.add(r[e],a.id,a.data)}}insertBefore(e,t){let r=this._current.insertBeforeHelper(e,t.length);for(let e=0;e<t.length;e++){let a=t[e];this.add(r[e],a.id,a.data)}}moveAfter(e,t){let r=this._current.insertAfterHelper(e,t.length);for(let e=0;e<t.length;e++){let a=t[e];this.move(r[e],a)}}moveBefore(e,t){let r=this._current.insertBeforeHelper(e,t.length);for(let e=0;e<t.length;e++){let a=t[e];this.move(r[e],a)}}delete(e){this.deleteChildren(e),this.runOp({type:5,id:e})}};function J(e,t,r){if(e.length>0){let a=e[e.length-1];if(0===a.type&&0===t.type&&ee.equal(a.path,r))return void Object.assign(a.props,t.props)}e.push({...t,path:r})}var ee,te,re=class extends N{constructor(e){super(),this.ts=[],this.actual=[],this.reverse=[],this._current=e}update(e,t){if(""!==e)throw new Error("");this._current=t}push(e,t,r,a){J(this.ts,t,e),J(this.actual,r,e),J(this.reverse,a,e)}result(){return{data:this._current,ts:this.ts,actual:this.actual,reverse:this.reverse.reverse()}}};function ae(e,t,r){return r instanceof O?new $(e,t,r):r instanceof j?new Q(e,t,r):r instanceof g?new Proxy(new W(e,t,r),Y):null!==r&&"object"==typeof r?d(r)?r:new Proxy(new q(e,t,r),Z):r}function ne(e){let t=new re(e);return[ae(t,"",e),t]}function ie(e,t){let[r,a]=ne(e);return t(r),a.result()}function oe(e){return e instanceof $||e instanceof Q?e._current:null!==e&&"object"==typeof e?e[V]:e}(e=>{function t(e,t){return(e instanceof O||e instanceof $)&&"string"==typeof t||(e instanceof j||e instanceof Q)&&"string"==typeof t?e.data(t):"number"==typeof t&&Array.isArray(e)||"string"==typeof t&&"object"==typeof e&&null!==e?e[t]:void 0}function r(e,r,a=0){for(;a<r.length&&void 0!==e;)e=t(e,r[a]),a+=1;return e}e.equal=function(e,t){if(t.length!==e.length)return!1;{let r=0;for(;r<e.length;){if(e[r]!==t[r])return!1;r+=1}}return!0},e.removeOverridden=function(e,t,a){let n=r(a,e);if(void 0!==n&&"object"==typeof n&&null!==n){let e={...t};return Object.keys(n).forEach(t=>{delete e[t]}),e}return t},e.zoomOnce=t,e.zoom=r,e.findPathes=function(e,t){let r=[];return function e(a,n){if(a instanceof y&&a.id===t.id)r.push(n);else if(a instanceof j)for(let t=0;t<a.length;t++)e(a[t].data,[...n,a[t].id]);else if(a instanceof O)a.traverse((t,r)=>{e(r,[...n,t])});else if(Array.isArray(a)){if("number"==typeof a[0])return;for(let t=0;t<a.length;t++)e(a[t],[...n,t])}else{if(d(a))return;if("object"==typeof a&&null!==a)for(let t in a)e(a[t],[...n,t])}}(e,[]),r}})(ee||(ee={}));try{te=new TextDecoder}catch{}var se,le,ce,ue,de,fe,pe,he=0,ye=[],me=ye,ge=0,be={},ve=0,we=0,De=[],Se={useRecords:!1,mapsAsObjects:!0},Oe=new class{};Oe.name="MessagePack 0xC1";var Ae=!1,je=2,Ce=class{constructor(e){e&&(!1===e.useRecords&&void 0===e.mapsAsObjects&&(e.mapsAsObjects=!0),e.sequential&&!1!==e.trusted&&(e.trusted=!0,!e.structures&&0!=e.useRecords&&(e.structures=[],e.maxSharedStructures||(e.maxSharedStructures=0))),e.structures?e.structures.sharedLength=e.structures.length:e.getStructures&&((e.structures=[]).uninitialized=!0,e.structures.sharedLength=0),e.int64AsNumber&&(e.int64AsType="number")),Object.assign(this,e)}unpack(e,t){if(se)return tt(()=>(rt(),this?this.unpack(e,t):Ce.prototype.unpack.call(Se,e,t)));!e.buffer&&e.constructor===ArrayBuffer&&(e=typeof Buffer<"u"?Buffer.from(e):new Uint8Array(e)),"object"==typeof t?(le=t.end||e.length,he=t.start||0):(he=0,le=t>-1?t:e.length),ge=0,we=0,ue=null,me=ye,de=null,se=e;try{pe=e.dataView||(e.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength))}catch(t){throw se=null,e instanceof Uint8Array?t:new Error("Source must be a Uint8Array or Buffer but was a "+(e&&"object"==typeof e?e.constructor.name:typeof e))}if(this instanceof Ce){if(be=this,this.structures)return ce=this.structures,Pe();(!ce||ce.length>0)&&(ce=[])}else be=Se,(!ce||ce.length>0)&&(ce=[]);return Pe()}unpackMultiple(e,t){let r,a=0;try{Ae=!0;let n=e.length,i=this?this.unpack(e,n):it.unpack(e,n);if(!t){for(r=[i];he<n;)a=he,r.push(Pe());return r}if(!1===t(i,a,he))return;for(;he<n;)if(a=he,!1===t(Pe(),a,he))return}catch(e){throw e.lastPosition=a,e.values=r,e}finally{Ae=!1,rt()}}_mergeStructures(e,t){e=e||[],Object.isFrozen(e)&&(e=e.map(e=>e.slice(0)));for(let t=0,r=e.length;t<r;t++){let r=e[t];r&&(r.isShared=!0,t>=32&&(r.highByte=t-32>>5))}e.sharedLength=e.length;for(let r in t||[])if(r>=0){let a=e[r],n=t[r];n&&(a&&((e.restoreStructures||(e.restoreStructures=[]))[r]=a),e[r]=n)}return this.structures=e}decode(e,t){return this.unpack(e,t)}};function Pe(e){try{if(!be.trusted&&!Ae){let e=ce.sharedLength||0;e<ce.length&&(ce.length=e)}let e;if(be.randomAccessStructure&&se[he]<64&&se[he],e=xe(),de&&(he=de.postBundlePosition,de=null),Ae&&(ce.restoreStructures=null),he==le)ce&&ce.restoreStructures&&Me(),ce=null,se=null,fe&&(fe=null);else{if(he>le)throw new Error("Unexpected end of MessagePack data");if(!Ae){let t;try{t=JSON.stringify(e,(e,t)=>"bigint"==typeof t?`${t}n`:t).slice(0,100)}catch(e){t="(JSON view not available "+e+")"}throw new Error("Data read, but end of buffer not reached "+t)}}return e}catch(e){throw ce&&ce.restoreStructures&&Me(),rt(),(e instanceof RangeError||e.message.startsWith("Unexpected end of buffer")||he>le)&&(e.incomplete=!0),e}}function Me(){for(let e in ce.restoreStructures)ce[e]=ce.restoreStructures[e];ce.restoreStructures=null}function xe(){let e=se[he++];if(e<160){if(e<128){if(e<64)return e;{let t=ce[63&e]||be.getStructures&&_e()[63&e];return t?(t.read||(t.read=Te(t,63&e)),t.read()):e}}if(e<144){if(e-=128,be.mapsAsObjects){let t={};for(let r=0;r<e;r++){let e=Xe();"__proto__"===e&&(e="__proto_"),t[e]=xe()}return t}{let t=new Map;for(let r=0;r<e;r++)t.set(xe(),xe());return t}}{e-=144;let t=new Array(e);for(let r=0;r<e;r++)t[r]=xe();return be.freezeData?Object.freeze(t):t}}if(e<192){let t=e-160;if(we>=he)return ue.slice(he-ve,(he+=t)-ve);if(0==we&&le<140){let e=t<16?He(t):Fe(t);if(null!=e)return e}return Re(t)}{let t;switch(e){case 192:return null;case 193:return de?(t=xe(),t>0?de[1].slice(de.position1,de.position1+=t):de[0].slice(de.position0,de.position0-=t)):Oe;case 194:return!1;case 195:return!0;case 196:if(t=se[he++],void 0===t)throw new Error("Unexpected end of buffer");return Ke(t);case 197:return t=pe.getUint16(he),he+=2,Ke(t);case 198:return t=pe.getUint32(he),he+=4,Ke(t);case 199:return qe(se[he++]);case 200:return t=pe.getUint16(he),he+=2,qe(t);case 201:return t=pe.getUint32(he),he+=4,qe(t);case 202:if(t=pe.getFloat32(he),be.useFloat32>2){let e=nt[(127&se[he])<<1|se[he+1]>>7];return he+=4,(e*t+(t>0?.5:-.5)|0)/e}return he+=4,t;case 203:return t=pe.getFloat64(he),he+=8,t;case 204:return se[he++];case 205:return t=pe.getUint16(he),he+=2,t;case 206:return t=pe.getUint32(he),he+=4,t;case 207:return"number"===be.int64AsType?(t=4294967296*pe.getUint32(he),t+=pe.getUint32(he+4)):"string"===be.int64AsType?t=pe.getBigUint64(he).toString():"auto"===be.int64AsType?(t=pe.getBigUint64(he),t<=BigInt(2)<<BigInt(52)&&(t=Number(t))):t=pe.getBigUint64(he),he+=8,t;case 208:return pe.getInt8(he++);case 209:return t=pe.getInt16(he),he+=2,t;case 210:return t=pe.getInt32(he),he+=4,t;case 211:return"number"===be.int64AsType?(t=4294967296*pe.getInt32(he),t+=pe.getUint32(he+4)):"string"===be.int64AsType?t=pe.getBigInt64(he).toString():"auto"===be.int64AsType?(t=pe.getBigInt64(he),t>=BigInt(-2)<<BigInt(52)&&t<=BigInt(2)<<BigInt(52)&&(t=Number(t))):t=pe.getBigInt64(he),he+=8,t;case 212:if(t=se[he++],114==t)return Ye(63&se[he++]);{let e=De[t];if(e)return e.read?(he++,e.read(xe())):e.noBuffer?(he++,e()):e(se.subarray(he,++he));throw new Error("Unknown extension "+t)}case 213:return t=se[he],114==t?(he++,Ye(63&se[he++],se[he++])):qe(2);case 214:return qe(4);case 215:return qe(8);case 216:return qe(16);case 217:return t=se[he++],we>=he?ue.slice(he-ve,(he+=t)-ve):ke(t);case 218:return t=pe.getUint16(he),we>=(he+=2)?ue.slice(he-ve,(he+=t)-ve):ze(t);case 219:return t=pe.getUint32(he),we>=(he+=4)?ue.slice(he-ve,(he+=t)-ve):Le(t);case 220:return t=pe.getUint16(he),he+=2,Ue(t);case 221:return t=pe.getUint32(he),he+=4,Ue(t);case 222:return t=pe.getUint16(he),he+=2,Ge(t);case 223:return t=pe.getUint32(he),he+=4,Ge(t);default:if(e>=224)return e-256;if(void 0===e){let e=new Error("Unexpected end of MessagePack data");throw e.incomplete=!0,e}throw new Error("Unknown MessagePack token "+e)}}}var Ee=/^[a-zA-Z_$][a-zA-Z\d_$]*$/;function Te(e,t){function r(){if(r.count++>je){let a;try{a=e.read=new Function("r","return function(){return "+(be.freezeData?"Object.freeze":"")+"({"+e.map(e=>"__proto__"===e?"__proto_:r()":Ee.test(e)?e+":r()":"["+JSON.stringify(e)+"]:r()").join(",")+"})}")(xe)}catch{return je=1/0,r()}return e.read0=a,0===e.highByte&&(e.read=Ie(t,e.read)),a()}let a={};for(let t=0,r=e.length;t<r;t++){let r=e[t];"__proto__"===r&&(r="__proto_"),a[r]=xe()}return be.freezeData?Object.freeze(a):a}return r.count=0,e.read0=r,0===e.highByte?Ie(t,r):r}var Ie=(e,t)=>function(){let r=se[he++];if(0===r)return t();let a=e<32?-(e+(r<<5)):e+(r<<5),n=ce[a]||_e()[a];if(!n)throw new Error("Record id is not defined for "+a);return n.read||(n.read=Te(n,e)),n.read()};function _e(){let e=tt(()=>(se=null,be.getStructures()));return ce=be._mergeStructures(e,ce)}var Re=Be,ke=Be,ze=Be,Le=Be;function Be(e){let t;if(e<16&&(t=He(e)))return t;if(e>64&&te)return te.decode(se.subarray(he,he+=e));let r=he+e,a=[];for(t="";he<r;){let e=se[he++];if(128&e)if(192==(224&e)){let t=(31&e)<<6|63&se[he++];t<128?a.push(65533):a.push(t)}else if(224==(240&e)){let t=(31&e)<<12|(63&se[he++])<<6|63&se[he++];t<2048||t>=55296&&t<=57343?a.push(65533):a.push(t)}else if(240==(248&e)){let t=(7&e)<<18|(63&se[he++])<<12|(63&se[he++])<<6|63&se[he++];t<65536||t>1114111?a.push(65533):(t>65535&&(t-=65536,a.push(t>>>10&1023|55296),t=56320|1023&t),a.push(t))}else a.push(65533);else a.push(e);a.length>=4096&&(t+=Ve.apply(String,a),a.length=0)}return a.length>0&&(t+=Ve.apply(String,a)),t}function Ue(e){let t=new Array(e);for(let r=0;r<e;r++)t[r]=xe();return be.freezeData?Object.freeze(t):t}function Ge(e){if(be.mapsAsObjects){let t={};for(let r=0;r<e;r++){let e=Xe();"__proto__"===e&&(e="__proto_"),t[e]=xe()}return t}{let t=new Map;for(let r=0;r<e;r++)t.set(xe(),xe());return t}}var Ve=String.fromCharCode;function Fe(e){let t=he,r=new Array(e);for(let a=0;a<e;a++){let e=se[he++];if((128&e)>0)return void(he=t);r[a]=e}return Ve.apply(String,r)}function He(e){if(e<4){if(e<2){if(0===e)return"";{let e=se[he++];return(128&e)>1?void(he-=1):Ve(e)}}{let t=se[he++],r=se[he++];if((128&t)>0||(128&r)>0)return void(he-=2);if(e<3)return Ve(t,r);let a=se[he++];return(128&a)>0?void(he-=3):Ve(t,r,a)}}{let t=se[he++],r=se[he++],a=se[he++],n=se[he++];if((128&t)>0||(128&r)>0||(128&a)>0||(128&n)>0)return void(he-=4);if(e<6){if(4===e)return Ve(t,r,a,n);{let e=se[he++];return(128&e)>0?void(he-=5):Ve(t,r,a,n,e)}}if(e<8){let i=se[he++],o=se[he++];if((128&i)>0||(128&o)>0)return void(he-=6);if(e<7)return Ve(t,r,a,n,i,o);let s=se[he++];return(128&s)>0?void(he-=7):Ve(t,r,a,n,i,o,s)}{let i=se[he++],o=se[he++],s=se[he++],l=se[he++];if((128&i)>0||(128&o)>0||(128&s)>0||(128&l)>0)return void(he-=8);if(e<10){if(8===e)return Ve(t,r,a,n,i,o,s,l);{let e=se[he++];return(128&e)>0?void(he-=9):Ve(t,r,a,n,i,o,s,l,e)}}if(e<12){let c=se[he++],u=se[he++];if((128&c)>0||(128&u)>0)return void(he-=10);if(e<11)return Ve(t,r,a,n,i,o,s,l,c,u);let d=se[he++];return(128&d)>0?void(he-=11):Ve(t,r,a,n,i,o,s,l,c,u,d)}{let c=se[he++],u=se[he++],d=se[he++],f=se[he++];if((128&c)>0||(128&u)>0||(128&d)>0||(128&f)>0)return void(he-=12);if(e<14){if(12===e)return Ve(t,r,a,n,i,o,s,l,c,u,d,f);{let e=se[he++];return(128&e)>0?void(he-=13):Ve(t,r,a,n,i,o,s,l,c,u,d,f,e)}}{let p=se[he++],h=se[he++];if((128&p)>0||(128&h)>0)return void(he-=14);if(e<15)return Ve(t,r,a,n,i,o,s,l,c,u,d,f,p,h);let y=se[he++];return(128&y)>0?void(he-=15):Ve(t,r,a,n,i,o,s,l,c,u,d,f,p,h,y)}}}}}function Ne(){let e,t=se[he++];if(t<192)e=t-160;else switch(t){case 217:e=se[he++];break;case 218:e=pe.getUint16(he),he+=2;break;case 219:e=pe.getUint32(he),he+=4;break;default:throw new Error("Expected string")}return Be(e)}function Ke(e){return be.copyBuffers?Uint8Array.prototype.slice.call(se,he,he+=e):se.subarray(he,he+=e)}function qe(e){let t=se[he++];if(De[t]){let r;return De[t](se.subarray(he,r=he+=e),e=>{he=e;try{return xe()}finally{he=r}})}throw new Error("Unknown extension type "+t)}var We=new Array(4096);function Xe(){let e=se[he++];if(!(e>=160&&e<192))return he--,Ze(xe());if(e-=160,we>=he)return ue.slice(he-ve,(he+=e)-ve);if(!(0==we&&le<180))return Re(e);let t,r=4095&(e<<5^(e>1?pe.getUint16(he):e>0?se[he]:0)),a=We[r],n=he,i=he+e-3,o=0;if(a&&a.bytes==e){for(;n<i;){if(t=pe.getUint32(n),t!=a[o++]){n=1879048192;break}n+=4}for(i+=3;n<i;)if(t=se[n++],t!=a[o++]){n=1879048192;break}if(n===i)return he=n,a.string;i-=3,n=he}for(a=[],We[r]=a,a.bytes=e;n<i;)t=pe.getUint32(n),a.push(t),n+=4;for(i+=3;n<i;)t=se[n++],a.push(t);let s=e<16?He(e):Fe(e);return a.string=null!=s?s:Re(e)}function Ze(e){if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e||"bigint"==typeof e)return e.toString();if(null==e)return e+"";if(be.allowArraysInMapKeys&&Array.isArray(e)&&e.flat().every(e=>["string","number","boolean","bigint"].includes(typeof e)))return e.flat().toString();throw new Error("Invalid property type for record: "+typeof e)}var Ye=(e,t)=>{let r=xe().map(Ze),a=e;void 0!==t&&(e=e<32?-((t<<5)+e):(t<<5)+e,r.highByte=t);let n=ce[e];return n&&(n.isShared||Ae)&&((ce.restoreStructures||(ce.restoreStructures=[]))[e]=n),ce[e]=r,r.read=Te(r,a),(r.read0||r.read)()};De[0]=()=>{},De[0].noBuffer=!0,De[66]=e=>{let t=e.byteLength%8||8,r=BigInt(128&e[0]?e[0]-256:e[0]);for(let a=1;a<t;a++)r<<=BigInt(8),r+=BigInt(e[a]);if(e.byteLength!==t){let a=new DataView(e.buffer,e.byteOffset,e.byteLength),n=(e,t)=>{let r=t-e;if(r<=40){let r=a.getBigUint64(e);for(let n=e+8;n<t;n+=8)r<<=BigInt(64),r|=a.getBigUint64(n);return r}let i=e+(r>>4<<3),o=n(e,i),s=n(i,t);return o<<BigInt(8*(t-i))|s};r=r<<BigInt(8*(a.byteLength-t))|n(t,a.byteLength)}return r};var $e={Error:Error,EvalError:EvalError,RangeError:RangeError,ReferenceError:ReferenceError,SyntaxError:SyntaxError,TypeError:TypeError,URIError:URIError,AggregateError:"function"==typeof AggregateError?AggregateError:null};De[101]=()=>{let e=xe();if(!$e[e[0]]){let t=Error(e[1],{cause:e[2]});return t.name=e[0],t}return $e[e[0]](e[1],{cause:e[2]})},De[105]=e=>{if(!1===be.structuredClone)throw new Error("Structured clone extension is disabled");let t=pe.getUint32(he-4);fe||(fe=new Map);let r,a=se[he];r=a>=144&&a<160||220==a||221==a?[]:a>=128&&a<144||222==a||223==a?new Map:(a>=199&&a<=201||a>=212&&a<=216)&&115===se[he+1]?new Set:{};let n={target:r};fe.set(t,n);let i=xe();if(!n.used)return n.target=i;if(Object.assign(r,i),r instanceof Map)for(let[e,t]of i.entries())r.set(e,t);if(r instanceof Set)for(let e of Array.from(i))r.add(e);return r},De[112]=e=>{if(!1===be.structuredClone)throw new Error("Structured clone extension is disabled");let t=pe.getUint32(he-4),r=fe.get(t);return r.used=!0,r.target},De[115]=()=>new Set(xe());var Qe=["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64","BigInt64","BigUint64"].map(e=>e+"Array"),Je="object"==typeof globalThis?globalThis:window;De[116]=e=>{let t=e[0],r=Uint8Array.prototype.slice.call(e,1).buffer,a=Qe[t];if(!a){if(16===t)return r;if(17===t)return new DataView(r);throw new Error("Could not find typed array for code "+t)}return new Je[a](r)},De[120]=()=>{let e=xe();return new RegExp(e[0],e[1])};var et=[];function tt(e){let t=le,r=he,a=ge,n=ve,i=we,o=ue,s=me,l=fe,c=de,u=new Uint8Array(se.slice(0,le)),d=ce,f=ce.slice(0,ce.length),p=be,h=Ae,y=e();return le=t,he=r,ge=a,ve=n,we=i,ue=o,me=s,fe=l,de=c,se=u,Ae=h,(ce=d).splice(0,ce.length,...f),be=p,pe=new DataView(se.buffer,se.byteOffset,se.byteLength),y}function rt(){se=null,fe=null,ce=null}function at(e){e.unpack?De[e.type]=e.unpack:De[e.type]=e}De[98]=e=>{let t=(e[0]<<24)+(e[1]<<16)+(e[2]<<8)+e[3],r=he;return he+=t-e.length,de=et,(de=[Ne(),Ne()]).position0=0,de.position1=0,de.postBundlePosition=he,he=r,xe()},De[255]=e=>4==e.length?new Date(1e3*(16777216*e[0]+(e[1]<<16)+(e[2]<<8)+e[3])):8==e.length?new Date(((e[0]<<22)+(e[1]<<14)+(e[2]<<6)+(e[3]>>2))/1e6+1e3*(4294967296*(3&e[3])+16777216*e[4]+(e[5]<<16)+(e[6]<<8)+e[7])):12==e.length?new Date(((e[0]<<24)+(e[1]<<16)+(e[2]<<8)+e[3])/1e6+1e3*((128&e[4]?-281474976710656:0)+1099511627776*e[6]+4294967296*e[7]+16777216*e[8]+(e[9]<<16)+(e[10]<<8)+e[11])):new Date("invalid");var nt=new Array(147);for(let e=0;e<256;e++)nt[e]=+("1e"+Math.floor(45.15-.30103*e));var it=new Ce({useRecords:!1}),ot=(it.unpack,it.unpackMultiple,it.unpack,new Float32Array(1)),st=(new Uint8Array(ot.buffer,0,4),[{Class:g.prototype.constructor,type:1,write:e=>({...e}),read:e=>(Object.setPrototypeOf(e,g.prototype),e)},{Class:j.prototype.constructor,type:2,write:e=>[...e],read:e=>(Object.setPrototypeOf(e,j.prototype),e)},{Class:O.prototype.constructor,type:3,write:e=>[...e],read:e=>(Object.setPrototypeOf(e,O.prototype),e)},{Class:y.prototype.constructor,type:4,write:e=>e.id,read:e=>new y(e)},{Class:m.prototype.constructor,type:5,write:e=>e.data,read:e=>new m(e)},{Class:L.prototype.constructor,type:6,write:e=>({...e}),read:e=>(Object.setPrototypeOf(e,L.prototype),e)}]);for(let e of st)at(e);var lt,ct=new Ce({structuredClone:!0});(lt||(lt={})).deserialize=function(e){return ct.unpack(e)};var ut,dt,ft,pt=e=>()=>{throw new Error(e+" is not available in the runtime build (decode-only CollabSerialize)")},ht={deserialize:lt.deserialize,serialize:pt("CollabSerialize.serialize"),checksum:pt("CollabSerialize.checksum")};function yt(e){let t=typeof e;return null!==e&&("object"===t||"function"===t)}(dt=ut||(ut={})).all=["PerspectiveCamera","OrthographicCamera"],dt.is=function(e){return dt.all.includes(e)},(e=>{e.DefaultUp=[0,1,0],e.DefaultTargetOffset=1e3,e.MinTargetOffset=.001,e.sanitizeTargetOffset=function(t){return void 0===t||!Number.isFinite(t)||t<e.MinTargetOffset?e.DefaultTargetOffset:t},e.DefaultAzimuth=-24,e.DefaultElevation=15;let t=e.DefaultAzimuth*Math.PI/180,r=e.DefaultElevation*Math.PI/180,a=180/Math.PI;e.DefaultPosition=[e.DefaultTargetOffset*Math.sin(t)*Math.cos(r),e.DefaultTargetOffset*Math.sin(r),e.DefaultTargetOffset*Math.cos(t)*Math.cos(r)],e.DefaultRotation=[Math.atan2(-Math.sin(r),Math.cos(t)*Math.cos(r))*a,Math.asin(Math.sin(t)*Math.cos(r))*a,Math.atan2(Math.sin(t)*Math.sin(r),Math.cos(t))*a],e.defaultData={far:1e5,type:"PerspectiveCamera",perspective:{near:70,fov:45,zoom:1},orthographic:{near:-1e5,zoom:1},up:e.DefaultUp,isUpVectorFlipped:!1,targetOffset:e.DefaultTargetOffset},e.getZoom=function(e){return"PerspectiveCamera"===e.type?e.perspective?.zoom??1:e.orthographic?.zoom??1}})(ft||(ft={}));var mt,gt,bt,vt,wt,Dt,St,Ot,At,jt,Ct,Pt,Mt,xt="personal camera",Et="a218fcc3-276b-49b9-b485-49037fd14f5f",Tt=5526619,It=(e=>(e.x="x",e.y="y",e.z="z",e))(It||{});(e=>{function t(e,t){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function r(e,r){return Math.sqrt(t(e,r))}function a(t,r,a){let n=e.sub(r,t),i=e.sub(a,t),o=e.dot(n,i)/e.dot(n,n),s=e.scalarMultiply(n,o);return e.add(t,s)}e.isEqual=function(e,t){return e[0]===t[0]&&e[1]===t[1]},e.lerp=function(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]},e.add=function(e,t){return[e[0]+t[0],e[1]+t[1]]},e.sub=function(e,t){return[e[0]-t[0],e[1]-t[1]]},e.multiply=function(e,t){return[e[0]*t[0],e[1]*t[1]]},e.divide=function(e,t){return[e[0]/t[0],e[1]/t[1]]},e.distanceSquared=t,e.distance=r,e.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]},e.scalarMultiply=function(e,t){return[e[0]*t,e[1]*t]},e.projectionOnto=a,e.projectionOntoDistance=function(e,t,n){return r(e,a(e,t,n))},e.center=function(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}})(mt||(mt={})),(bt=gt||(gt={})).isEqual=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]},bt.add=function(e,t){return[e[0]+t[0],e[1]+t[1],e[2]+t[2]]},bt.sub=function(e,t){return[e[0]-t[0],e[1]-t[1],e[2]-t[2]]},bt.div=function(e,t){return[e[0]/t[0],e[1]/t[1],e[2]/t[2]]},bt.mul=function(e,t){return[e[0]*t[0],e[1]*t[1],e[2]*t[2]]},bt.dist=function(e,t){return Math.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2])},bt.lerp=function(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r,e[2]+(t[2]-e[2])*r]},(e=>{e.isEqual=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},e.lerp=function(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r,e[2]+(t[2]-e[2])*r,e[3]+(t[3]-e[3])*r]}})(vt||(vt={})),(e=>{let t=180/Math.PI,r=Math.PI/180;function a(e){return"number"==typeof e?e*t:e}function n(e){return"number"==typeof e?e*r:e}e.radToDeg=function(e){return[a(e[0]),a(e[1]),a(e[2])]},e.degToRad=function(e){return[n(e[0]),n(e[1]),n(e[2])]}})(wt||(wt={})),(St=Dt||(Dt={})).identity=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],St.isEqual=function(e,t){for(let r=0;r<16;r++)if(e[r]!==t[r])return!1;return!0},St.simplify=function(e){return e??St.identity},St.applyMatrix4=function(e,t){let r=t.slice(0);for(let a=0,n=t.length;a<n;a+=3){let n=e[3]*t[a]+e[7]*t[a+1]+e[11]*t[a+2]+e[15];r[a]=(e[0]*t[a]+e[4]*t[a+1]+e[8]*t[a+2]+e[12])/n,r[a+1]=(e[1]*t[a]+e[5]*t[a+1]+e[9]*t[a+2]+e[13])/n,r[a+2]=(e[2]*t[a]+e[6]*t[a+1]+e[10]*t[a+2]+e[14])/n}return r},(e=>{e.zero=[0,0,0,0,0,0],e.INDEX_MAP=[4,8,1,9,2,6],e.toMatrix=function(t){let r=[...Dt.identity];for(let a=0;a<6;a++)r[e.INDEX_MAP[a]]=t[a];return r},e.fromMatrix=function(t){return[t[e.INDEX_MAP[0]],t[e.INDEX_MAP[1]],t[e.INDEX_MAP[2]],t[e.INDEX_MAP[3]],t[e.INDEX_MAP[4]],t[e.INDEX_MAP[5]]]}})(Ot||(Ot={})),(jt=At||(At={})).isRGB=function(e){return"object"==typeof e&&"number"==typeof e.r&&"number"==typeof e.g&&"number"==typeof e.b},jt.white={r:1,g:1,b:1},jt.red={r:1,g:0,b:0},jt.black={r:0,g:0,b:0},jt.toRgb255a1=function(e){return{r:Math.round(255*e.r),g:Math.round(255*e.g),b:Math.round(255*e.b),a:1}},jt.clone=function(e){return{r:e.r,g:e.g,b:e.b}},jt.fromHex=function(e){return{r:((e=Math.floor(e))>>16&255)/255,g:(e>>8&255)/255,b:(255&e)/255}},jt.toHex=function(e){return 65536*Math.round(255*e.r)+256*Math.round(255*e.g)+Math.round(255*e.b)},jt.equals=function(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b},jt.equalsFixed=function(e,t){return e.r.toFixed(2)===t.r.toFixed(2)&&e.g.toFixed(2)===t.g.toFixed(2)&&e.b.toFixed(2)===t.b.toFixed(2)},jt.lerp=function(e,t,r){return{r:e.r+(t.r-e.r)*r,g:e.g+(t.g-e.g)*r,b:e.b+(t.b-e.b)*r}},jt.is=function(e){return!!yt(e)&&"r"in e&&"g"in e&&"b"in e&&!("a"in e)},(Pt=Ct||(Ct={})).white={...At.white,a:1},Pt.is=function(e){return!!yt(e)&&"r"in e&&"g"in e&&"b"in e&&"a"in e},Pt.transparent={...At.white,a:0},Pt.from0to1=function(e){return{r:e[0],g:e[1],b:e[2],a:e[3]}},Pt.fromHexAndA=function(e,t){return{...At.fromHex(e),a:t}},Pt.toRgb255a1=function(e){return{r:Math.round(255*e.r),g:Math.round(255*e.g),b:Math.round(255*e.b),a:e.a}},Pt.equals=function(e,t){return At.equals(e,t)&&e.a===t.a},Pt.equalsFixed=function(e,t){return At.equalsFixed(e,t)&&e.a.toFixed(2)===t.a.toFixed(2)},Pt.lerp=function(e,t,r){return{r:e.r+(t.r-e.r)*r,g:e.g+(t.g-e.g)*r,b:e.b+(t.b-e.b)*r,a:e.a+(t.a-e.a)*r}},Pt.toStyle=function({r:e,g:t,b:r,a:a}=Pt.white){return`rgba(${255*e}, ${255*t}, ${255*r}, ${a})`},(Mt||(Mt={})).identity={position:[0,0,0],rotation:[0,0,0],scale:[1,1,1],pivot:[0,0,0],pivotRotation:[0,0,0]};var _t,Rt,kt,zt,Lt,Bt,Ut,Gt,Vt,Ft,Ht=((Rt=Ht||{})[Rt.LINEAR=0]="LINEAR",Rt[Rt.EASE=1]="EASE",Rt[Rt.EASE_IN=2]="EASE_IN",Rt[Rt.EASE_OUT=3]="EASE_OUT",Rt[Rt.EASE_IN_OUT=4]="EASE_IN_OUT",Rt[Rt.CUBIC=5]="CUBIC",Rt[Rt.SPRING=6]="SPRING",Rt[Rt.ARC=7]="ARC",Rt[Rt.NONE=8]="NONE",Rt);function Nt(e){return"string"==typeof e&&36===e.length&&/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)}(_t||(_t={})).defaultData={mass:1,stiffness:80,damping:10,velocity:0},(kt||(kt={})).defaultData={control1:[.5,0],control2:[.5,1]},(Lt=zt||(zt={})).linear=[0,0,1,1],Lt.ease=[.25,.1,.25,1],Lt.easeIn=[.42,0,1,1],Lt.easeOut=[0,0,.58,1],Lt.easeInOut=[.42,0,.58,1],(e=>{e.all=["PointLight","SpotLight","DirectionalLight","HemisphereLight"],e.is=function(t){return e.all.includes(t)}})(Bt||(Bt={})),(Ut||(Ut={})).defaultData=function(e){return function(e){if("PointLight"===e)return{type:e,color:Ct.white,intensity:1,distance:2e3,decay:1,shadows:!0,shadowResolution:1024,shadowRadius:1,penumbraSize:.5,depth:1e5};if("SpotLight"===e)return{type:e,color:Ct.white,intensity:1,distance:2e3,decay:1,shadows:!0,penumbra:0,angle:30/180*Math.PI,depth:1e5,penumbraSize:.5,shadowResolution:1024,shadowRadius:1};if("DirectionalLight"===e)return{type:e,color:Ct.white,intensity:1,shadows:!0,size:2e3,depth:1e5,penumbraSize:.5,shadowResolution:1024,shadowRadius:1};throw new Error("not implemented")}(e)},(e=>{e.defaultShapeData={type:"PlaneEmitterShape",size:[100,100,100]},e.defaultCollisionData={colliderEntityId:null,collisionBounce:.75},e.defaultData={renderMaterial:{type:"particleMaterial",color:{r:1,g:.2,b:.545,a:1},color2:{r:.945,g:.714,b:.184,a:1},coloring:"gradient",ease:"linearFadeOut",easeSize:"linearFadeOut",transparent:!0,size:[40,40],texture:"pt_default_particle",spriteRotation:[0,0]},birthRatePerSec:50,gravity:1,noiseStrength:0,noiseScale:0,noiseSeed:1,noiseType:"curl",randomRotation:0,randomScale:.2,randomMass:.5,rootObjectType:"instancedMesh",life:1,direction:[0,0,0],directionMode:"axis",speed:10,shape:e.defaultShapeData,autoPlay:!0,emitTimeDelay:0,emitTimeCycle:"infinity",emitTimeDuration:1,...e.defaultCollisionData}})(Gt||(Gt={})),(e=>{e.defaultData={gravity:10,damping:.03,localStiffness:.67,globalStiffness:.5,globalRange:.15,stiffnessFalloff:.1,windStrength:0,vspCoefficient:.01,elasticity:.15,hairLength:.75,tipSeparation:.8,kink:0,kinkFrequency:0,clumpStrength:0,clumpSize:32,clumpTipScale:1.5,spreadRadius:.03,guideStrands:8192,headShape:"sphere",baseObjectId:null,hairColorSource:"custom",hairShadeRoot:.6,hairShadeTip:1.15,hairRootColor:{r:.29,g:.102,b:.039,a:1},hairMidColor:{r:.8,g:.267,b:.133,a:1},hairTipColor:{r:.545,g:.18,b:.18,a:1},headColor:{r:.325,g:.137,b:.114,a:1},noiseEnabled:!1,noiseColorA:{r:.545,g:.184,b:.788,a:1},noiseColorB:{r:.914,g:.188,b:.914,a:1},noiseColorC:{r:.2,g:.4,b:1,a:1},noiseColorD:{r:.2,g:1,b:.6,a:1},noiseScale:1.8,noiseMixHair:.75,noiseMixHead:.8,castShadow:!0,receiveShadow:!0,hairWidth:1.75,specularPower:40,specularIntensity:.4,diffuseIntensity:.6,ambientIntensity:.25,opacity:1,tipFade:.4,autoPlay:!0},e.regenProps=["hairLength","spreadRadius","guideStrands","headShape","baseObjectId"]})(Vt||(Vt={})),(Ft||(Ft={})).defaultData={enabled:"visibility",fusedBody:!0,rigidBody:"positioned",density:1,pointMass:0,gravityScale:1,friction:.5,damping:0,restitution:.2,colliderType:"convex",enabledRotation:[!0,!0,!0],enabledTranslation:[!0,!0,!0]};var Kt,qt,Wt,Xt,Zt,Yt,$t,Qt,Jt,er=(e=>(e[e.Front=0]="Front",e[e.Back=1]="Back",e[e.Double=2]="Double",e))(er||{});(e=>{e.defaultData={castShadow:!0,receiveShadow:!0},e.equals=function(e,t){return e.castShadow===t.castShadow&&e.receiveShadow===t.receiveShadow}})(Kt||(Kt={})),(e=>{e.defaultData={flatShading:!1,wireframe:!1,side:0},e.equals=function(e,t){return e.flatShading===t.flatShading&&e.side===t.side&&e.wireframe===t.wireframe&&(e.shadowCatcher??!1)===(t.shadowCatcher??!1)}})(qt||(qt={})),(Wt||(Wt={})).defaultData={...qt.defaultData,...Kt.defaultData},(Xt||(Xt={})).getMaterialData=function(e,t){let r=[];if("material"in e){let a="string"==typeof e.material?t.materials[e.material]??t.lib.materials[e.material]?.asset:e.material;a&&r.push(a)}else if("materials"in e)for(let a of e.materials){let e="string"==typeof a?t.materials[a]??t.lib.materials[a]?.asset:a;e&&r.push(e)}return r},(e=>{e.defaultVideo={data:"",thumb:"/_assets/_videos/catThumb.png",type:"video",name:"Cat video"},e.maxSize=3e7})(Zt||(Zt={})),(Yt||(Yt={})).is=function(e){return"texture"===e||"video"===e||"color"===e||"depth"===e||"normal"===e||"gradient"===e||"noise"===e||"fresnel"===e||"cavity"===e||"dust"===e||"rainbow"===e||"toon"===e||"outline"===e||"particle"===e||"transmission"===e||"reflection"===e||"matcap"===e||"displace"===e||"pattern"===e||"vertexColor"===e||"light"===e},($t||($t={})).is=function(e){return"luminance"===e||"r"===e||"g"===e||"b"===e||"a"===e},(Qt||(Qt={})).is=function(e){return"object"==typeof e&&null!==e&&null!=e.image},(Jt||(Jt={})).is=function(e){return"phong"===e||"toon"===e||"lambert"===e||"physical"===e};var tr,rr,ar,nr,ir=(e=>(e[e.Linear=0]="Linear",e[e.Radial=1]="Radial",e[e.Polar=2]="Polar",e))(ir||{}),or=(e=>(e[e.RepeatWrapping=1e3]="RepeatWrapping",e[e.ClampToEdgeWrapping=1001]="ClampToEdgeWrapping",e[e.MirroredRepeatWrapping=1002]="MirroredRepeatWrapping",e))(or||{}),sr=(e=>(e[e.NearestFilter=1003]="NearestFilter",e[e.LinearFilter=1006]="LinearFilter",e[e.LinearMipmapLinearFilter=1008]="LinearMipmapLinearFilter",e))(sr||{}),lr=(e=>(e[e.UV=0]="UV",e[e.Planar=1]="Planar",e[e.Spherical=2]="Spherical",e[e.Cylindrical=3]="Cylindrical",e[e.Triplanar=4]="Triplanar",e))(lr||{}),cr=((ar=cr||{})[ar.Simplex=0]="Simplex",ar[ar.SimplexFractal=1]="SimplexFractal",ar[ar.Ashima=2]="Ashima",ar[ar.Fbm=3]="Fbm",ar[ar.Perlin=4]="Perlin",ar[ar.Voronoi=5]="Voronoi",ar),ur=((rr=ur||{})[rr.F1=0]="F1",rr[rr.F2=1]="F2",rr[rr.F2MinusF1=2]="F2MinusF1",rr[rr.SmoothBlend=3]="SmoothBlend",rr[rr.Edge=4]="Edge",rr[rr.Power=5]="Power",rr[rr.Lines=6]="Lines",rr[rr.Cells=7]="Cells",rr),dr=(e=>(e[e.Lights=0]="Lights",e[e.Static=1]="Static",e[e.Camera=2]="Camera",e))(dr||{}),fr=(e=>(e[e.Circle=0]="Circle",e[e.Ring=1]="Ring",e[e.Polygon=2]="Polygon",e[e.Cross=3]="Cross",e[e.Diamond=4]="Diamond",e[e.Checkerboard=5]="Checkerboard",e[e.Line=6]="Line",e[e.Wave=7]="Wave",e))(fr||{}),pr=["mode","gradientType","noiseType","tracingMode","mirror","displacementType","projection","cnormal","crop","axis","side","roughnessMapChannel","metalnessMap","metalnessMapChannel","normalMap","aoMap","aoMapChannel","emissiveMap","style"],hr=["wrapping","image","video","name","minFilter","magFilter"];(e=>{e.patch=function(e,t){let{texture:r,...a}=t;if(Object.assign(e,a),r){let t=e.texture;t&&Object.assign(t,r)}},e.defaultColorLayer=function(t){return{...e.defaultData("color"),color:t}},e.defaultData=function(e,t){return"light"===e&&t?function(e){let t={mode:0,isMask:!1,visible:!0,bumpMap:void 0,bumpMapIntensity:5,roughnessMap:void 0,alphaOverride:1};switch(e){case"phong":return{...t,category:"phong",specular:{r:.2,g:.2,b:.2},shininess:5,type:"light",visible:!0,mode:0,occlusion:!0,alpha:.6};case"toon":return{...t,category:"toon",specular:{r:.2,g:.2,b:.2},shininess:10,type:"light",alpha:1};case"lambert":return{...t,category:"lambert",emissive:{r:0,g:0,b:0},type:"light",alpha:1,visible:!0,mode:0,occlusion:!0};case"physical":return{...t,category:"physical",roughness:.6,metalness:.2,reflectivity:.2,type:"light",alpha:.6,visible:!0,mode:0,occlusion:!0}}}(t):function(e){let t={alpha:1,mode:0,isMask:!1,visible:!0};switch(e){case"texture":return{...t,type:"texture",size:[128,128],blending:0,axis:"x",side:2,projection:0,texture:{image:"image_0",wrapping:1e3,repeat:[1,1],offset:[0,0],rotation:0,minFilter:1008,magFilter:1006},crop:!1};case"video":return{...t,type:"video",size:[128,128],blending:0,axis:"x",side:2,projection:0,texture:{video:Zt.defaultVideo,wrapping:1001,repeat:[1,1],offset:[0,0],rotation:0,minFilter:1008,magFilter:1006},crop:!1};case"color":return{...t,type:"color",color:At.fromHex(Tt)};case"vertexColor":return{...t,type:"vertexColor"};case"depth":return{...t,type:"depth",gradientType:1,smooth:!1,isVector:!0,isWorldSpace:!1,origin:[0,0,0],direction:[1,0,0],colors:[[1,1,1,1],[0,0,0,1]],steps:[0,1],near:50,far:200};case"normal":return{...t,type:"normal",cnormal:[1,1,1]};case"gradient":return{...t,type:"gradient",gradientType:0,smooth:!1,colors:[[0,0,0,1],[1,1,1,1],[1,1,1,1],[1,1,1,1],[1,1,1,1],[1,1,1,1],[1,1,1,1],[1,1,1,1],[1,1,1,1],[1,1,1,1]],steps:[0,1,1,1,1,1,1,1,1,1],num:2,angle:0,offset:[0,0],morph:[0,0]};case"noise":return{...t,type:"noise",size:[100,100,100],noiseType:0,scale:1,move:1,colorA:{...At.fromHex(6710886),a:1},colorB:{...At.fromHex(6710886),a:1},colorC:{...At.fromHex(16777215),a:1},colorD:{...At.fromHex(16777215),a:1},distortion:[1,1],fA:[1.7,9.2],fB:[8.3,2.8],voronoiStyle:0,highCut:1,lowCut:0,smoothness:.3,seed:0,quality:1};case"cavity":return{...t,type:"cavity",mode:3,ridge:1,valley:1};case"fresnel":return{...t,type:"fresnel",color:Ct.fromHexAndA(16777215,1),bias:.1,scale:1,intensity:2,factor:1};case"dust":return{...t,type:"dust",color:Ct.fromHexAndA(10323813,1),coverage:.2,softness:.2,noiseStrength:.2,noiseScale:1};case"rainbow":return{...t,type:"rainbow",filmThickness:30,movement:0,wavelengths:[0,0,0],noiseStrength:0,noiseScale:1,offset:[0,0,0]};case"toon":return{...t,type:"toon",positioning:2,colors:[[0,0,0,1],[.5,.5,.5,1],[.5,.5,.5,1],[1,1,1,1],[1,1,1,1],[1,1,1,1],[1,1,1,1],[1,1,1,1],[1,1,1,1],[1,1,1,1]],steps:[0,.475,.525,1,1,1,1,1,1,1],num:4,source:[0,1e3,0],isWorldSpace:!0,noiseStrength:0,noiseScale:1,shadowColor:Ct.fromHexAndA(0,0),offset:[0,0,0]};case"outline":return{...t,type:"outline",outlineColor:Ct.fromHexAndA(0,1),contourColor:Ct.fromHexAndA(0,1),outlineWidth:2,contourWidth:5,outlineThreshold:.4,contourThreshold:0,outlineSmoothing:0,contourFrequency:10,contourDirection:[0,1,0],positionalLines:!1,compensation:!0};case"matcap":return{...t,type:"matcap",texture:{image:"matcap_0",wrapping:1001,repeat:[1,1],offset:[0,0],rotation:0,minFilter:1008,magFilter:1006}};case"transmission":return{...t,type:"transmission",thickness:10,ior:1.5,roughness:1};case"reflection":return{...t,type:"reflection",blur:0,thickness:.001,steps:60,stepSize:.005,tracingMode:1,mirror:0};case"displace":return{visible:!0,type:"displace",displacementType:"noise",noiseType:0,scale:10,movement:1,offset:[0,0,0],intensity:8,voronoiStyle:0,smoothness:.3,seed:0,highCut:1,lowCut:0,quality:1};case"pattern":return{...t,type:"pattern",style:0,projection:0,axis:"y",blending:0,offset:[0,0],colorA:{...At.fromHex(0),a:1},colorB:{...At.fromHex(16777215),a:1},frequency:[10,10],size:.5,variation:0,smoothness:.5,zigzag:0,rotation:0,vertical:[0,1],horizontal:[0,1],sides:6}}}(e)}})(tr||(tr={})),(e=>{function t(e,t="layer1",r="layer2",a=At.fromHex(16777215)){let n=new j;return n.push({fi:0,data:tr.defaultData("light",e),id:t}),n.push({fi:1,data:tr.defaultData("color"),id:r}),{layers:n}}e.isMergable=function(e){return!e.layers.some(e=>"texture"===e.data.type&&0!==e.data.projection||"depth"===e.data.type&&!e.data.isWorldSpace||"noise"===e.data.type||"dust"===e.data.type&&0!==e.data.noiseStrength||"displace"===e.data.type)},e.getHash=function(e){let t="";return e.layers.forEach(e=>{Object.entries(e.data).forEach(([e,r])=>{t+=`${e}${r}`,Array.isArray(r)?r.forEach(e=>t+=`${e}`):"object"==typeof r?Object.values(r).forEach(e=>{t+="number"==typeof e?`${e.toFixed(4)}`:`${e}`}):t+=`${r}`})}),t},e.defaultEmptyData=function(){return{layers:new j}},e.defaultData=function(e="layer1",r="layer2"){return t("physical",e,r)},e.withName=function(e,t){return{...e,name:t}},e.defaultTwoLayerData=t,e.defaultColorMaterial=function(e,t,r="layer1",a="layer2"){let n=new j;return n.push({fi:0,data:tr.defaultData("light",t),id:r}),n.push({fi:1,data:tr.defaultColorLayer(e),id:a}),{layers:n}},e.defaultUIObjectMaterial=function(e){let t=tr.defaultData("texture");e&&Object.assign(t.texture,{image:e});let r=new j;return r.push({fi:0,data:t,id:"layer1"}),r.push({fi:1,data:{...tr.defaultData("transmission"),alpha:1},id:"layer2"}),r.push({fi:2,data:{...tr.defaultData("light","lambert"),alpha:0},id:"layer3"}),{layers:r}},e.defaultTwoLayerTextureData=function(e,t="physical",r="layer1",a="layer2"){let n=tr.defaultData("texture");Object.assign(n.texture,{image:e});let i=new j;return i.push({fi:0,data:n,id:r}),i.push({fi:1,data:tr.defaultData("light",t),id:a}),{layers:i}},e.defaultTwoLayerVideoTextureData=function(e,t="physical",r="layer1",a="layer2"){let n=tr.defaultData("video");Object.assign(n.texture,{video:e});let i=new j;return i.push({fi:0,data:n,id:r}),i.push({fi:1,data:tr.defaultData("light",t),id:a}),{layers:i}}})(nr||(nr={}));var yr,mr,gr="Roboto_regular",br="https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Me5WZLCzYlKw.ttf";(yr||(yr={})).defaultData=function(){return{points:new j,roundness:0,shapeHoles:[],isClosed:!1}},(mr||(mr={})).defaultData=function(){return{points:new j,lastInsertionPlane:null,subdivisions:12,isClosed:!1,subdivisionMode:"parametric"}};var vr,wr={type:"Ellipse",width:50,height:50,spikes:16,angle:360,innerRadius:0};(vr||(vr={})).merge=function(e,t){let r={...e};return Cr.forEach(a=>{Object.assign(r,{[a]:t[a]??e[a]})}),r};var Dr,Sr,Or,Ar,jr={shape:wr,depth:1,offset:0,bevel:50,bevelSides:6,angle:0,twist:0,startScale:1,endScale:1,capType:"flat"},Cr=["depth","offset","angle","twist","startScale","endScale"];(e=>{e.is2DParametricMesh=function(e){return"PolygonGeometry"===e||"RectangleGeometry"===e||"StarGeometry"===e||"TriangleGeometry"===e||"EllipseGeometry"===e||"UIGeometry"===e},e.isParametricMesh=function(e){return"PolygonGeometry"===e||"RectangleGeometry"===e||"StarGeometry"===e||"TriangleGeometry"===e||"EllipseGeometry"===e||"PathGeometry"===e||"VectorGeometry"===e||"ConeGeometry"===e||"CubeGeometry"===e||"CylinderGeometry"===e||"DodecahedronGeometry"===e||"HelixGeometry"===e||"IcosahedronGeometry"===e||"LatheGeometry"===e||"PyramidGeometry"===e||"SphereGeometry"===e||"PlaneGeometry"===e||"BackdropGeometry"===e||"TorusGeometry"===e||"TorusKnotGeometry"===e||"BooleanGeometry"===e||"TextGeometry"===e||"InputGeometry"===e||"DecalGeometry"===e},e.isSwappableGeometry=function(e){return"PolygonGeometry"===e||"RectangleGeometry"===e||"StarGeometry"===e||"TriangleGeometry"===e||"EllipseGeometry"===e||"PathGeometry"===e||"VectorGeometry"===e||"ConeGeometry"===e||"CubeGeometry"===e||"CylinderGeometry"===e||"DodecahedronGeometry"===e||"HelixGeometry"===e||"IcosahedronGeometry"===e||"LatheGeometry"===e||"PyramidGeometry"===e||"SphereGeometry"===e||"PlaneGeometry"===e||"BackdropGeometry"===e||"TorusGeometry"===e||"TorusKnotGeometry"===e||"TextGeometry"===e||"SubdivGeometry"===e||"NonParametricGeometry"===e}})(Dr||(Dr={})),(Sr||(Sr={})).merge=function(e,t){let r={...e};return Object.assign(r,t),"PathGeometry"===r.type&&"extrusion"in t&&t.extrusion&&(r.extrusion={...e.extrusion},Object.assign(r.extrusion,vr.merge(r.extrusion,t.extrusion))),r},(Ar=Or||(Or={})).defaultData=function(e){if("RectangleGeometry"===e)return{width:320,height:320,type:e,cornerRadius:[0,0,0,0],cornerType:0,depth:0,extrudeBevelSize:0,extrudeBevelSegments:1};if("UIGeometry"===e)return{type:e,frame:"",cornerRadius:[0,0,0,0],cornerType:0,width:1,height:1};if("PathGeometry"===e)return{type:e,width:1,height:1,depth:1,path:mr.defaultData(),extrusion:jr};if("VectorGeometry"===e)return{width:1,height:1,type:e,subdivisions:12,shape:yr.defaultData(),depth:0,extrudeBevelSize:0,extrudeBevelSegments:1};if("BooleanGeometry"===e)return{type:e,operation:2,width:0,height:0,depth:0,phongAngle:35};if("ShapeBlendGeometry"===e)return{type:e,width:0,height:0,depth:0,resolutionLevel:6,blendRange:100,useChildrenColors:!1};if("DecalGeometry"===e)return{type:e,width:200,height:200,depth:200,offset:1,projection:"all",projectionTargets:[]};if("TextGeometry"===e)return{type:e,width:100,height:100,depth:0,horizontalAlign:1,verticalAlign:1,fontSize:16,lineHeight:1.2,letterSpacing:0,text:{textValue:""},textTransform:1,font:"Roboto_regular",editable:!1,extrudeBevelSize:0,extrudeBevelSegments:1};if("InputGeometry"===e)return{...Ar.defaultData("TextGeometry"),type:e,editable:!0};if("SphereGeometry"===e)return{type:"SphereGeometry",width:100,height:100,depth:100,widthSegments:64,heightSegments:64,phiStart:0,phiLength:2*Math.PI,thetaStart:0,thetaLength:180};throw new Error("not implemented")};var Pr,Mr,xr=["width","height","depth"];(e=>{e.defaultData=function(e,t=.1){return{disabled:!1,type:"linear",hideBase:!1,instanced:!1,count:3,radial:{radius:2*Math.max("number"==typeof e[0]?e[0]:1,"number"==typeof e[1]?e[1]:1),start:0,end:360,alignment:!1,axis:"y",scale:[1,1,1],rotation:[0,0,0],position:[0,0,0],pivot:[0,0,0],pivotRotation:[0,0,0]},toObject:{object:"",spreadType:"random",scale:[0,0,0],rotation:[0,0,0],position:[0,0,0],axis:"x",seed:0,count:99,align:"normal",pivot:[0,0,0],pivotRotation:[0,0,0]},linear:{scale:[1,1,1],rotation:[0,0,0],position:[("number"==typeof e[0]?e[0]+e[0]:1)*t,0,0],pivot:[0,0,0],pivotRotation:[0,0,0]},grid:{count:[2,2,2],size:e.map(e=>("number"==typeof e?e:1)*(1+t)),useCenter:!0},randomness:!1,randomnessObject:{strength:100,scale:[0,0,0],rotation:[0,0,0],position:[0,0,0],movement:1,seed:0,freqScale:10,noiseType:"perlin"}}},e.merge=function(e,t){let r={...e};if(Nr.forEach(a=>{Object.assign(r,{[a]:t[a]??e[a]})}),r.radial={...e.radial},t.radial){let a=e.radial,n=t.radial;Kr.forEach(e=>{Object.assign(r.radial,{[e]:n[e]??a[e]})})}if(r.linear={...e.linear},t.linear){let a=e.linear,n=t.linear;qr.forEach(e=>{Object.assign(r.linear,{[e]:n[e]??a[e]})})}if(r.grid={...e.grid},t.grid){let a=e.grid,n=t.grid;Wr.forEach(e=>{Object.assign(r.grid,{[e]:n[e]??a[e]})})}if(r.toObject={...e.toObject},t.toObject){let a=e.toObject,n=t.toObject;Xr.forEach(e=>{Object.assign(r.toObject,{[e]:n[e]??a[e]})})}if(r.randomnessObject={...e.randomnessObject},t.randomnessObject){let a=e.randomnessObject,n=t.randomnessObject;Zr.forEach(e=>{Object.assign(r.randomnessObject,{[e]:n[e]??a[e]})})}return r},e.isPartial=function(e){return!(!e.randomnessObject&&!e.toObject)}})(Pr||(Pr={})),(e=>{e.defaultData={radial:{},linear:{},grid:{},toObject:{},randomnessObject:{}};let t=["radial","linear","grid","toObject","randomnessObject"];e.toOps=function(e,r){let a=[];void 0!==e.count&&a.push({type:0,path:r,props:{count:e.count}});for(let n of t){let t=e[n];t&&Object.keys(t).length>0&&a.push({type:0,path:[...r,n],props:t})}return a}})(Mr||(Mr={}));var Er,Tr,Ir,_r,Rr,kr,zr,Lr,Br,Ur,Gr,Vr,Fr,Hr,Nr=["count"],Kr=["radius","start","end","position","scale","rotation"],qr=["position","scale","rotation"],Wr=["count","size"],Xr=["count","position","scale","rotation"],Zr=["strength","scale","rotation","position","movement","seed","freqScale"];function Yr(e){let t="string"==typeof e?Number.parseInt(e,10):e;return"number"==typeof t&&Number.isFinite(t)?Math.min(5,Math.max(0,Math.round(t))):3}(e=>{function t(e){return e.mode??"linear"}e.defaultData={enabled:!1,useBackgroundColor:!1,color:At.white,near:.1,far:2e3,mode:"linear",density:.005,heightFalloff:.01,heightBase:0},e.getMode=t,e.getModeIndex=function(e){let r=t(e);return"height"===r?1:"both"===r?2:0},e.getDensity=function(t){return t.density??e.defaultData.density},e.getHeightFalloff=function(t){return t.heightFalloff??e.defaultData.heightFalloff},e.getHeightBase=function(t){return t.heightBase??e.defaultData.heightBase}})(Er||(Er={})),(Tr||(Tr={})).defaultData={image:null,rotation:0,blur:32,showBackground:!0},(Ir||(Ir={})).defaultData={enabled:!1,mode:"hdri",hdri:Tr.defaultData,timeOfDay:10,weather:"partlyCloudy",lighting:!0,lightingIntensity:1,lightingQuality:"full",clouds:!0,windSpeed:2,animateWind:!0,exposure:1,seed:2},(()=>{let e={opacity:1,blendFunction:13,enabled:!1};(_r||(_r={})).defaultData={enabled:!1,pixelation:{...e,blendFunction:16,granularity:15},bloom:{...e,blendFunction:16,intensity:1,blurScale:1,luminanceThreshold:.25,luminanceSmoothing:.025,kernelSize:3},chromaticAberration:{...e,offset:[2,2]},vignette:{...e,darkness:1,offset:0},hueSaturation:{...e,hue:3,saturation:0},brightnessContrast:{...e,brightness:.25,contrast:0},depthOfField:{...e,focusDistance:100,focalLength:20,bokehScale:5},noise:{...e,blendFunction:16}}})(),(e=>{e.defaultData={type:"normal",softShadowQuality:"low"},e.isSoft=function(e){return null!=e&&(void 0===e.type||"soft"===e.type)}})(Rr||(Rr={})),(kr||(kr={})).defaultData={enabled:!0,color:{r:.8274509803921568,g:.8274509803921568,b:.8274509803921568},intensity:.75},(zr||(zr={})).defaultData={occlusion:!1,aoFullRes:!1,radius:256,bias:.5,aoColor:{r:.19607843137254902,g:.19607843137254902,b:.19607843137254902}},(e=>{e.defaultData={pipeline:"classic",toneMapping:"aces",exposure:1},e.isUntouched=function(e){return void 0===e||"classic"===e.pipeline&&("none"===e.toneMapping||"aces"===e.toneMapping)&&1===e.exposure}})(Lr||(Lr={})),(Br||(Br={})).defaultData={usePhysics:!1,gravity:-10},(Ur||(Ur={})).defaultData={playCamera:xt,gameControlObject:null},(Gr||(Gr={})).defaultData={backgroundColor:Ct.fromHexAndA(2500134,1),postprocessing:_r.defaultData,fog:Er.defaultData,sky:Ir.defaultData,globalPhysics:Br.defaultData,ambient:kr.defaultData,ao:zr.defaultData,shadow:Rr.defaultData,publish:Ur.defaultData,grading:Lr.defaultData},(Vr||(Vr={})).defaultData={colliderType:"box",size:[100,100,100],colliderHelperVisible:!0,forceType:"collider",forceRange:"global",forceIntensity:.5,forceDambing:.95},(e=>{e.isComponentRelated=function(e){return"Component"===e||"Instance"===e},e.isEmptyOrComponent=function(e){return"Empty"===e||"Instance"===e}})(Fr||(Fr={})),(e=>{e.identity={...Mt.identity,shear:Ot.zero},e.fromObject=function(e){return{position:e.position,rotation:e.rotation,scale:e.scale,pivot:e.pivot,pivotRotation:e.pivotRotation,shear:e.shear}},e.merge=function(e,t){return{position:t?.position||e.position,rotation:t?.rotation||e.rotation,pivot:t?.pivot||e.pivot,pivotRotation:t?.pivotRotation||e.pivotRotation,scale:t?.scale||e.scale,shear:t?.shear||e.shear}},e.diff=function(e,t){return p({position:gt.isEqual(e.position,t.position)?void 0:t.position,rotation:gt.isEqual(e.rotation,t.rotation)?void 0:t.rotation,scale:gt.isEqual(e.scale,t.scale)?null:t.scale,shear:t.shear?.every((t,r)=>t===e.shear?.[r])?void 0:t.shear})}})(Hr||(Hr={}));var $r,Qr,Jr,ea,ta,ra,aa,na,ia,oa,sa,la,ca,ua,da,fa,pa,ha,ya,ma,ga,ba,va,wa,Da,Sa,Oa,Aa,ja,Ca,Pa,Ma,xa,Ea,Ta=["slide","offset"];function Ia(e,t=[0,0]){return[e&&!isNaN(e[0])?e[0]:t[0],e&&!isNaN(e[1])?e[1]:t[1]]}function _a(e,t,r){switch(e){case 0:return"cubicBezier( 0, 0, 1, 1 )";case 1:return"cubicBezier( .25, .1, .25, 1 )";case 2:return"cubicBezier( .42, 0, 1, 1 )";case 3:return"cubicBezier( 0, 0, .58, 1 )";case 4:return"cubicBezier( .42, 0, .58, 1 )";case 7:return"cubicBezier( .25, 1, .5, 1 )";case 5:{let{control1:e,control2:r}=t??{...kt.defaultData};return`cubicBezier( ${e[0]}, ${e[1]}, ${r[0]}, ${r[1]} )`}case 6:{let{mass:e,stiffness:t,damping:a,velocity:n}=r??{..._t.defaultData},i=new za(e,t,a,n),o=i.solve(1);return()=>e=>i.solve(e)/o}case 8:return()=>e=>Math.floor(e)}}($r||($r={})).defaultData={states:new j,events:new j,visible:!0,raycastLock:!1,physics:Ft.defaultData,pathSnapping:{pathId:null,slide:0,offset:0,orientation:"tangential"},...Hr.identity,cloner:null},(Qr||(Qr={})).defaultData={type:"Empty",...$r.defaultData},(Jr||(Jr={})).defaultData={type:"ParticleCollider",...Vr.defaultData,...$r.defaultData},(ea||(ea={})).defaultData={type:"Component",...$r.defaultData},(ta||(ta={})).defaultData={type:"Particle",...$r.defaultData,...Gt.defaultData},(ra||(ra={})).defaultData={type:"Hair",...$r.defaultData,...Vt.defaultData},(aa||(aa={})).defaultData={type:"Mesh",...$r.defaultData,...Wt.defaultData},(na||(na={})).defaultData={...$r.defaultData,...Hr.identity,position:ft.DefaultPosition,rotation:ft.DefaultRotation,...ft.defaultData},(e=>{e.defaultData=function(e){return{...$r.defaultData,...Ut.defaultData(e)}},e.defaultDirectionalLightData={...e.defaultData("DirectionalLight"),position:[200,300,300],name:"Directional Light",intensity:.7}})(ia||(ia={})),(e=>{function t(e,t,r=0){for(;r<t.length;){let a=e?e[t[r]]:void 0;if(t.length===r+1)return a;if(!a)return;e=a.descendants,r+=1}}e.resolveWithDes=t,e.resolve=function(e,r,a=0){let n=t(e,r,a);if(n){let e=Object.keys(n);if(1===e.length&&"descendants"===e[0])return}return n}})(oa||(oa={})),(e=>{function t(e,t){return{...$r.defaultData,...t,component:e,overrides:new L,physics:void 0,events:void 0,type:"Instance"}}e.rootOverrideProps=["physics","events"],e.compositeNonOptionalOverrideProps=["geometry"],e.compositeEntireOverrideOverrideProps=["material"],e.ofComponent=t,e.fromComponentData=function(e){let r=Hr.fromObject(e.data);return t(e.id,r)}})(sa||(sa={})),(e=>{e.defaultData={type:"Page",...$r.defaultData,physics:{...Ft.defaultData,fusedBody:!1},...Gr.defaultData,camera:na.defaultData,timelines:new g},e.isUIPage=function(e){return void 0!==e.uiScene}})(la||(la={})),(e=>{e.defaultCamera={position:[0,0,1e3],scale:[1,1,1],rotation:[0,0,0],pivot:[0,0,0],pivotRotation:[0,0,0],shear:Ot.zero,name:"Play Camera",visible:!0,raycastLock:!1,physics:Ft.defaultData,states:new j,events:new j,cloner:null,pathSnapping:{pathId:null,orientation:"tangential",slide:0,offset:0},...ft.defaultData},e.KeysByResetCategory={States:["states"],Events:["events"],Material:["material","materials"],Geometry:["geometry"],Position:["position"],Rotation:["rotation"],Scale:["scale"],Transform:["position","scale","rotation","shear"],Name:["name"],Visibility:["visible","raycastLock","flatShading","wireframe","side","shadowCatcher"],Shadows:["castShadow","receiveShadow"],Cloner:["cloner"],Physics:["physics"]},e.defaultMeshObject={name:"Rectangle",...$r.defaultData,...aa.defaultData,geometry:Or.defaultData("RectangleGeometry"),material:nr.defaultTwoLayerData("physical","layer1","layer2")},e.defaultBooleanObject={name:"Boolean",...$r.defaultData,...aa.defaultData,geometry:Or.defaultData("BooleanGeometry"),material:nr.defaultTwoLayerData("physical","layer1","layer2")},e.defaultShapeBlendObject={name:"Shape Blend",...$r.defaultData,...aa.defaultData,geometry:Or.defaultData("ShapeBlendGeometry"),material:nr.defaultTwoLayerData("physical","layer1","layer2")},e.defaultTextObject={name:"Text",...$r.defaultData,...aa.defaultData,geometry:Or.defaultData("TextGeometry"),material:nr.defaultTwoLayerData("physical","layer1","layer2")},e.defaultInputObject={name:"Input",...$r.defaultData,...aa.defaultData,geometry:Or.defaultData("InputGeometry"),material:nr.defaultTwoLayerData("physical","layer1","layer2")}})(ca||(ca={})),(e=>{e.newEmpty=function(e,t){let r={name:t};return"Mesh"===e.type?(r.geometry={},"material"in e&&(r.material={layers:new L}),"materials"in e&&(r.materials=e.materials.map(e=>({layers:new L})))):ut.is(e.type)&&(r.perspective={},r.orthographic={}),r},e.toOps=function(e,t){let r,a=[],n={orthographic:0,perspective:0,geometry:0};function i(e,t){for(let[r,n]of Object.entries(t.layers)){let{texture:t,...i}=n;if(void 0!==t&&Object.keys(t).length>0){let n={path:[...e,"layers",r,"texture"],props:t,type:0};a.push(n)}if(Object.keys(i).length>0){let t={path:[...e,"layers",r],props:i,type:0};a.push(t)}}}for(let[e,o]of Object.entries(t)){let t=o;if("name"!==e)if("cloner"===e)a.push(...Mr.toOps(t,["cloner"]));else if("pathSnapping"===e)a.push({path:[e],props:{slide:t.slide,offset:t.offset},type:0});else if("material"===e)i(["material"],t);else if("materials"===e)for(let[e,r]of Object.entries(t))i(["materials",e],r);else if(0===n[e]){if("geometry"===e&&void 0!==t.extrusion){let r={path:[e,"extrusion"],props:t.extrusion,type:0};a.push(r),t={...t},delete t.extrusion}if(Object.keys(t).length>0){let r={path:[e],props:t,type:0};a.push(r)}}else void 0===r&&(r={path:[],props:{},type:0},a.push(r)),r.props[e]=t}return a},e.patch=function(e,t){if(void 0===t)return e;let r={...e};if(Object.assign(r,Hr.merge(r,t)),Object.assign(r,{pathSnapping:Object.assign({},r.pathSnapping,{slide:t.pathSnapping?.slide??r.pathSnapping?.slide??0,offset:t.pathSnapping?.offset??r.pathSnapping?.offset??0})}),ut.is(e.type)){r.orthographic={...r.orthographic},r.perspective={...r.perspective};let e=t;void 0!==e.orthographic?.zoom&&(r.orthographic.zoom=e.orthographic.zoom),void 0!==e.perspective?.zoom&&(r.perspective.zoom=e.perspective.zoom),void 0!==e.isUpVectorFlipped&&(r.isUpVectorFlipped=e.isUpVectorFlipped),void 0!==e.targetOffset&&(r.targetOffset=e.targetOffset)}else if("Mesh"===e.type)"geometry"in t&&Object.assign(r,{geometry:Sr.merge(r.geometry,t.geometry)}),(t.material||t.materials)&&(r=function(e,t){if(void 0===t)return e;let r={...e};return"material"in r&&"material"in t&&t.material&&(r.material=ie(r.material,e=>{if("string"!=typeof e)for(let[r,a]of Object.entries(t.material.layers)){let t=e.layers.data(r);t&&tr.patch(t,a)}}).data),r.materials&&t.materials&&(r.materials=ie(r.materials,e=>{for(let a=0;a<r.materials.length;a++){let r=t.materials[a];if("string"!=typeof r)for(let[t,n]of Object.entries(r.layers)){let r=e[a]?.layers?.data(t);r&&tr.patch(r,n)}}}).data),r}(r,t)),r.cloner&&"cloner"in t&&Object.assign(r,{cloner:Pr.merge(r.cloner,t.cloner)});else if("Empty"===e.type)r.cloner&&"cloner"in t&&Object.assign(r,{cloner:Pr.merge(r.cloner,t.cloner)});else if(Bt.is(e.type)){let e=t;void 0!==e.intensity&&(r.intensity=e.intensity),void 0!==e.color&&("string"==typeof e.color?r.color=e.color:r.color=At.clone(e.color))}return r}})(ua||(ua={})),(da||(da={})).defaultData={enablePan:!0,enableZoom:!0,enableRotate:!0,enableDamping:!0,rotationLimitsMode:0,rotationVerticalOffset:{min:Math.PI/4,max:Math.PI/4},rotationHorizontalOffset:{min:Math.PI/4,max:Math.PI/4},rotationSoftLimit:2,rotationSpeed:1,panLimitsMode:0,panVerticalOffset:{min:250,max:250},panHorizontalOffset:{min:250,max:250},panSoftLimit:2,zoomLimitsEnabled:!1,zoomLimits:{min:.1,max:2},autoRotate:!1,autoRotateSpeed:2,autoRotateClockwise:!0,hoverRotatePanMode:0,hoverRotatePanStrength:20,hoverRotateDamping:.125,isTouchZoom:!0,orbitTouches:2,panTouches:3,resetHoverEffectOnPointerLeave:!0},(fa||(fa={})).defaultData={orbitControls:da.defaultData,playPage:Et,withBackground:!0,preventScroll:!1,preventTouchScroll:!1,hideCursor:!1,mouseEventTarget:"canvas",joystickSizeAndXYOffset:Array(12).fill(0).map((e,t)=>{let r=0,a=0;return t<5?a=-30:t<10&&(a=30),0===t||10===t||5===t?r=30:(4===t||11===t||9===t)&&(r=-30),[120,[r,a],"show"]}),settings:{image:{format:"jpg",ratio:1,colorSpace:"display-p3"},videoStatic:{fps:60,mbps:150,ratio:1,duration:1e3,format:"mp4",imageFormat:"jpg",activeTimeline:null,colorSpace:"display-p3"},web:{logo:!0,compress:!0,preset:1,preload:!0,hint:!1,imageQuality:70,pixelRatioMobile:0,pixelRatioDesktop:0}},stopRaycast:!0,hdTransmission:!1,renderer:"webgpu",asyncShaderCompilation:!0},(pa||(pa={})).defaultData={id:"basic",label:"Basic",style:"None",prompt:""},(ha||(ha={})).defaultData={weather:0,shadows:0,lightOrigin:0,temperature:0,sun:0,camera:0,environment:0,particles:0,nature:0,floor:0},(e=>{e.defaultData=()=>({mode:"line-art-both",prompt:"",negativePrompt:"",style:{...pa.defaultData},isRandomSeed:!0,seed:e.generateSeed(),guessMode:!1,advanced:!1,steps:20,guidanceScale:7.5,controlNetScale:1,modifiers:ha.defaultData}),e.generateSeed=()=>Math.round(1e5*Math.random())})(ya||(ya={})),(e=>{function t(e,t){let r=e.scene.objects.get(t);if(r&&"Component"===r.data.type)return r;{let r=e.shared.lib.components[t];if(r)return{...r.asset,id:t}}}e.physicsEnabled=function(e){return void 0!==e.find(e=>"Page"===e.data.type&&e.data.globalPhysics.usePhysics)},e.findTimeline=function(e,t){let r=e.find(e=>"Page"===e.data.type&&void 0!==e.data.timelines?.[t]);return r&&r.data.timelines?.[t]},e.getComponentData=t,e.traverseModuleInstances=function(e,r,a){e.scene.objects.traverseFrom(r,(r,n)=>{if("Instance"===n.type){let i=t(e,n.component)?.data;i&&a(r,n,i.events)}else a(r,n,n.events)})}})(ma||(ma={})),(e=>{function t(t=!0,r=[]){let a=[];t&&a.push({...e.defaultLight}),a.push(...r);let n=new O;return n.push({fi:1,id:Et,data:{...la.defaultData,name:"Scene 1"},children:a}),n}function r(t){return{...e.defaultData,objects:l(t,O.prototype)}}e.TRASH_CAN_ID="830a2708-8ed9-49cf-a68e-085299892222",e.defaultLight={fi:-1,data:ia.defaultDirectionalLightData,id:"830a2708-8ed9-49cf-a68e-085299899103",children:[]},e.createDefaultObjectTreeWithPage=t,e.defaultData={objects:t(),publish:fa.defaultData,styles:ya.defaultData()},e.emptyDataWithoutPage=function(){return{objects:new O,publish:fa.defaultData,styles:ya.defaultData()}},e.emptyDataWithPage=function(e=!0){return{objects:t(e),publish:fa.defaultData,styles:ya.defaultData()}},e.emptyData=function(){return{objects:new O,publish:{...fa.defaultData},styles:ya.defaultData()}},e.withObjs=r,e.withObj=function(e,t){return r([{id:e,data:t,children:[],fi:0}])}})(ga||(ga={})),(ba||(ba={})).defaultData={preset:"fullscreen",allowResponsive:!1,size:[512,512],coords:[0,0],sceneScale:1,color:{r:0,g:0,b:0,a:.5}},(e=>{e.defaultData=e=>({url:e,name:"New Webhook",parametersSchemas:new j}),e.defaultParameterValueByType=e=>"number"===e?0:"boolean"!==e&&""})(va||(va={})),(wa||(wa={})).defaultData=(e,t="GET")=>({url:e,method:t,name:"New API",headers:new j,queries:new j,autoStart:!0}),(e=>{function t(e){return void 0!==e.textValue}function r(e){return"boolean"==typeof e}e.isTextValue=t,e.isNumber=function(e){return"number"==typeof e},e.isBoolean=r,e.typeOfVariable=function(e){return t(e)?"string":r(e)?"boolean":"number"},e.getDisplayedValue=function(t){return e.isTextValue(t)?Array.isArray(t.textValue)?t.textValue.map(e=>e.toString().padStart(t.padding??2,"0")).join(t.deliminator??":")+(void 0!==t.suffix?" "+t.suffix:""):t.textValue.toString():e.isBoolean(t)?t?"True":"False":e.isNumber(t)?parseFloat(t.toFixed(3)).toString():t.toString()}})(Da||(Da={})),(Sa||(Sa={})).all=["images","videos","colors","audios","particles","fonts","materials","variables"],(Oa||(Oa={})).all=[...Sa.all,"components"],(Aa||(Aa={})).defaultData=function(){return{images:new g,videos:new g,colors:new g,audios:new g,particles:new g,fonts:new g,materials:new g,components:new g,variables:new g,userAPIs:new g,userWebhooks:new g}},(ja||(ja={})).defaultData=function(){return{images:new g,videos:new g,colors:new g,audios:new g,particles:new g,fonts:new g,materials:new g,components:new g,variables:new g,userAPIs:new g,userWebhooks:new g}},(e=>{e.defaultColors=function(){return l({"89b10010-844c-11ec-a8a3-0242ac120002":{r:.5,g:.5,b:.5,a:1,name:"Default Color"}},g.prototype)},e.defaultImages=function(){return l({},g.prototype)},e.emptyData=function(){return{catelogs:new g,materials:new g,images:new g,videos:new g,colors:new g,audios:new g,particles:new g,fonts:new g,variables:new j,userAPIs:new g,userWebhooks:new g,lib:ja.defaultData()}},e.defaultVariables=function(e){switch(e){case"number":return{value:0,name:"Number"};case"boolean":return{value:!1,name:"Boolean"};case"string":return{value:{textValue:"String value"},name:"String"};case"time":{let e=[0,0,0];return{name:"Time",value:{textValue:e,deliminator:":",padding:2,suffix:"AM"},dynamicVariableType:"time",format:"HH:mm:ss",format12h24h:"12ampm",timeZone:null,hasEnd:!1,endValue:{textValue:e,deliminator:":",padding:2,suffix:"AM"},autoStart:!0,repeat:!1}}case"counter":return{name:"Counter",value:0,dynamicVariableType:"counter",updateInterval:1e3,increment:1,autoStart:!0,hasEnd:!0,endValue:60,repeat:!0,randomStart:!1,range:[0,100],decimals:0};case"random":return{name:"Random",value:0,dynamicVariableType:"random",updateInterval:1e3,increment:1,autoStart:!0,isStatic:!1,hasEnd:!0,endValue:60,repeat:!0,min:0,max:100,decimals:0};default:console.error("Unknown variable type",e)}},e.getFormattedTimerTime=function(e,t){if("HH:mm:ss"===t.format){let t=Math.floor(e/3600),r=Math.floor((e-3600*t)/60);return{textValue:[t,r,Math.round(e-3600*t-60*r)]}}if("mm:ss"===t.format){let t=Math.floor(e/60);return{textValue:[t,Math.round(e-60*t)]}}return"number"===t.format?Math.round(e):Math.round(1e3*e)/1e3}})(Ca||(Ca={})),(e=>{e.defaultData={schema:133,scene:ga.defaultData,frames:(new g).add("72fc2993-2da3-4b6b-96ac-2879db3a28bd",ba.defaultData),shared:{...Ca.emptyData(),colors:Ca.defaultColors()}},e.createDefaultData=function(){return ht.deserialize(ht.serialize(e.defaultData))},e.emptyDataForImports=function(){return{schema:133,scene:ga.emptyDataWithPage(),frames:(new g).add("72fc2993-2da3-4b6b-96ac-2879db3a28bd",ba.defaultData),shared:{...Ca.emptyData(),colors:Ca.defaultColors(),images:Ca.defaultImages()}}},e.emptyData=function(){return{schema:133,scene:ga.emptyDataWithPage(),frames:(new g).add("72fc2993-2da3-4b6b-96ac-2879db3a28bd",ba.defaultData),shared:Ca.emptyData()}},e.clipboard2dData=function(){return{schema:133,scene:ga.emptyData(),frames:new g,shared:Ca.emptyData()}},e.withoutLib=function(e){return{...e,shared:{...e.shared,lib:ja.defaultData()}}},e.getComponentData=function(e,t){return ma.getComponentData(e,t)},e.hasSensitiveData=function(e){let t=Object.values(e.shared.userAPIs);for(let e of t){let t=e.headers;for(let e of t)if("authorization"===e.data.key.toLowerCase()&&""!==e.data.value)return!0}return!1}})(Pa||(Pa={})),(Ma||(Ma={})).defaultData=function(e,t){return{id:e,name:t,duration:5,objectTimelines:new g}},(xa||(xa={})).is=function(e){return e&&"number"==typeof e.x&&"number"==typeof e.y&&"number"==typeof e.z},(e=>{function t(e,t){let r=[0,0],a=[1,1];if(e?.cubicControls)r=Ia(e.cubicControls.control1,r);else switch(e?.type){case 2:case 4:r=[.42,0];break;case 3:case 0:r=[0,0];break;case 1:r=[.25,.1];break;case 7:r=[.25,1]}if(t?.cubicControls)a=Ia(t.cubicControls.control2,a);else switch(t?.type){case 2:case 0:a=[1,1];break;case 3:case 4:a=[.58,1];break;case 1:a=[.25,1];break;case 7:a=[.5,1]}return{control1:r,control2:a}}function r(r){if(!e.BEZIER_PRESETS.includes(r))return;let a={type:r};return{control1:t(a).control1,control2:t(void 0,a).control2}}function a(e,t){return Math.abs(e[0]-t[0])<.001&&Math.abs(e[1]-t[1])<.001}function n(t){let r=e.ROOT_PROPERTY_ORDER.indexOf(t[0]);return-1===r?e.ROOT_PROPERTY_ORDER.length:r}function i(e){return e.layerId??e.path.join(".")}function o(e){let t=e[e.length-1];return ka.includes(t)?t:void 0}function s(e){return e.layerId?e.layerId:(o(e.path)?e.path.slice(0,-1):e.path).join(".")}function l(e){return["material","light"===e.type?`${e.category} lighting`:e.type]}function c(e,t,r){return{id:e,data:{id:e,time:r?.time??0,path:t,value:{},layerId:r?.layerId,index:r?.index,isPlaceholder:!0,easing:{type:5,cubicControls:{control1:[.42,0],control2:[.58,1]}}}}}e.getControlsWithDefault=t,e.BEZIER_PRESETS=[0,1,2,3,4,7],e.presetHandles=r,e.presetForHandles=function(t){return e.BEZIER_PRESETS.find(e=>{let n=r(e);return void 0!==n&&a(n.control1,t.control1)&&a(n.control2,t.control2)})},e.defaultData=function(e){return{id:e,keyframes:new j}},e.ROOT_PROPERTY_ORDER=["position","rotation","scale","shape size","material","opacity","camera","light","cloner","path extrusion","path snapping"],e.rowOrder=n,e.propertyKey=i,e.groupKeyframes=function(e,t){let r=new Map;for(let a of e){let e=a.data;if(t?.(e))continue;let n=i(e),o=r.get(n);o||(o={id:n,path:e.path,keyframes:[],layerId:e.layerId,index:e.index},r.set(n,o)),e.isPlaceholder?o.placeholder=a.id:o.keyframes.push(a)}return[...r.values()].sort((e,t)=>{let r=n(e.path)-n(t.path);return 0!==r?r:(e.index??0)-(t.index??0)})},e.rowAxis=o,e.drawnRowKey=s,e.drawnRows=function(e){let t=new Map;for(let r of e){let e=o(r.path),a=e?r.path.slice(0,-1):r.path,n=s(r),i=t.get(n);i||(i={id:n,path:a,layerId:r.layerId,index:r.index,tracks:[]},t.set(n,i)),i.tracks.push({axis:e,property:r})}return[...t.values()]},e.sortedKeyframes=function(e){return[...e].sort((e,t)=>e.data.time-t.data.time)},e.materialLayerPath=l,e.createMaterialGroup=function(e,t){return e.map(({data:e,id:r},a)=>c(t(),l(e),{layerId:r,index:a}))},e.placeholderKeyframe=c,e.createName=function(e){return Object.entries(e).reduce((e,[t,r])=>("string"!=typeof r&&e.push({name:r.name}),e),[])},e.Presets=[{name:"Slide in",animationParams:{translateX:{value:[-20,0],easing:_a(3),duration:1e3},opacity:{value:[0,1],easing:_a(3),duration:1e3},endDelay:250,loop:!0}},{name:"Rotate",animationParams:{rotate:{value:[0,"1turn"],easing:_a(5),duration:700},endDelay:250,loop:!0}},{name:"Scale Out",animationParams:{scale:{value:[1,1.5],easing:_a(4),duration:1e3},endDelay:250,loop:!0}},{name:"Jump",animationParams:{translateY:[{value:0,duration:200,easing:"linear"},{value:-20,easing:"linear",duration:200},{value:0,easing:"linear",duration:100}],endDelay:500,loop:!0}},{name:"Jump Rotate",animationParams:{translateY:[{value:0,duration:200,easing:"linear"},{value:-20,easing:"linear",duration:200},{value:0,easing:"linear",duration:100}],rotate:{value:[0,"1turn"],easing:_a(5),duration:500},endDelay:500,loop:!0}},{name:"Bounce",animationParams:{translateY:{value:["20px","-20px"],duration:575,easing:"easeOutQuad"},direction:"alternate",loop:!0}}]})(Ea||(Ea={}));var Ra,ka=["x","y","z"],za=class{constructor(e=1,t=100,r=10,a=0){this.mass=e,this.stiffness=t,this.damping=r,this.initialVelocity=a,this.m_w0=Math.sqrt(t/e),this.m_zeta=r/(2*Math.sqrt(t*e)),this.m_zeta<1?(this.m_wd=this.m_w0*Math.sqrt(1-this.m_zeta*this.m_zeta),this.m_A=1,this.m_B=(this.m_zeta*this.m_w0-a)/this.m_wd):(this.m_wd=0,this.m_A=1,this.m_B=-a+this.m_w0)}solve(e){return 1-(this.m_zeta<1?Math.exp(-e*this.m_zeta*this.m_w0)*(this.m_A*Math.cos(this.m_wd*e)+this.m_B*Math.sin(this.m_wd*e)):(this.m_A+this.m_B*e)*Math.exp(-e*this.m_w0))}getDuration(){let e=.16666666666666666,t=0,r=0;for(;;)if(t+=e,1===this.solve(t)){if(r++,r>=16)break}else r=0;return t*e*1e3}};function La(e){return"MouseDown"===e||"MouseUp"===e||"KeyDown"===e||"KeyUp"===e||"Collision"===e||"Trigger"===e}(e=>{e.toEventUIType=function(e){return"Conditional"===e.type?"Distance"===e.condition.type?"Distance":"StateChange":e.type},e.fromEventUIType=function(e){return"Distance"===e||"StateChange"===e?"Conditional":e}})(Ra||(Ra={}));var Ba,Ua,Ga,Va,Fa,Ha,Na,Ka,qa,Wa,Xa,Za,Ya,$a,Qa,Ja,en,tn,rn,an,nn,on={LookAt:[],Follow:["Create"],DragDrop:["Transition","Animation","Audio","Particles","Create","SetVariable","DynamicVariablePlay","Conditional","ClearLocalStorage","UserAPI"],MouseHover:["Transition","Animation","TimelineAnimation","Particles","Create","Destroy","SwitchCamera","SceneTransition","SetVariable","DynamicVariablePlay","Conditional","ClearLocalStorage","UserAPI"],Scroll:["Transition","Animation","TimelineAnimation","Create","SetVariable","DynamicVariablePlay","Conditional","ClearLocalStorage","UserAPI"],Start:["Transition","Animation","TimelineAnimation","Audio","Particles","Video","Create","Destroy","SwitchCamera","SceneTransition","Reset","SetVariable","DynamicVariablePlay","Conditional","ClearLocalStorage","UserAPI"],Conditional:["Transition","Animation","TimelineAnimation","Audio","Particles","Video","Link","Create","Destroy","SwitchCamera","SceneTransition","Reset","SetVariable","DynamicVariablePlay","Conditional","ClearLocalStorage","UserAPI"],MouseDown:["Transition","Animation","TimelineAnimation","Audio","Particles","Video","Link","Create","Destroy","SwitchCamera","SceneTransition","Reset","SetVariable","DynamicVariablePlay","Conditional","ClearLocalStorage","UserAPI"],MouseUp:["Transition","Animation","TimelineAnimation","Audio","Particles","Video","Link","Create","Destroy","SwitchCamera","SceneTransition","Reset","SetVariable","DynamicVariablePlay","Conditional","ClearLocalStorage","UserAPI"],MousePress:["Transition","Animation","TimelineAnimation","Audio","Particles","Video","Link","Create","SwitchCamera","SceneTransition","Reset","SetVariable","DynamicVariablePlay","Conditional","ClearLocalStorage","UserAPI"],KeyDown:["Transition","Animation","TimelineAnimation","Audio","Particles","Video","Link","Create","Destroy","SwitchCamera","SceneTransition","Reset","SetVariable","DynamicVariablePlay","Conditional","ClearLocalStorage","UserAPI"],KeyUp:["Transition","Animation","TimelineAnimation","Audio","Particles","Video","Link","Create","Destroy","SwitchCamera","SceneTransition","Reset","SetVariable","DynamicVariablePlay","Conditional","ClearLocalStorage","UserAPI"],KeyPress:["Transition","Animation","Audio","Particles","Video","Link","Create","SwitchCamera","Reset","SetVariable","DynamicVariablePlay","Conditional","ClearLocalStorage","UserAPI"],GameControl:["Transition","Animation","TimelineAnimation","Audio","Particles","Create","Conditional"],Collision:["Transition","Animation","TimelineAnimation","Audio","Particles","Video","Create","Destroy","Reset","SetVariable","DynamicVariablePlay","Conditional","ClearLocalStorage","UserAPI"],Trigger:["Transition","Audio","Particles","Video","Link","Create","Destroy","SwitchCamera","SceneTransition","Reset","SetVariable","DynamicVariablePlay","Conditional","ClearLocalStorage","UserAPI"],Resize:["Transition","Animation","Audio","Particles","Video","Create","Destroy","SwitchCamera","SceneTransition","Reset","SetVariable","DynamicVariablePlay","Conditional","ClearLocalStorage","UserAPI"],VariableChange:["Transition","Animation","TimelineAnimation","Audio","Particles","Video","Link","Create","Destroy","SwitchCamera","SceneTransition","Reset","SetVariable","DynamicVariablePlay","Conditional","ClearLocalStorage","UserAPI"],API:["Transition","Animation","Audio","Particles","Video","Link","Create","Destroy","SwitchCamera","SceneTransition","Reset","SetVariable","DynamicVariablePlay","Conditional","ClearLocalStorage","UserAPI"],WEBHOOK:["Transition","Animation","Audio","Particles","Video","Link","Create","Destroy","SwitchCamera","SceneTransition","Reset","SetVariable","DynamicVariablePlay","Conditional","ClearLocalStorage","UserAPI"],AIAssistantListener:["SetVariable"],AIAssistantTrigger:["Transition","Animation","Audio","Particles","Video","Link","Create","Destroy","SwitchCamera","SceneTransition","Reset","SetVariable","DynamicVariablePlay","Conditional","ClearLocalStorage","UserAPI"]};function sn(e,...t){let r={};for(let a of t.flat())null!=e&&a in e&&(r[a]=e[a]);return r}function ln(e){e.layers.forEach(e=>{if("depth"===e.type&&void 0!==e.colorA){let t=e.colorA,r=e.colorB,a=[[t.r,t.g,t.b,t.a],[r.r,r.g,r.b,r.a]],n=[0,1];for(let e=2;e<10;e++)a.push(a[1]),n.push(1);let i={...sn(oe(e),"type","visible","isVector","isWorldSpace","origin","alpha","mode"),near:Math.max(0,e.near),far:Math.max(0,e.far),colors:a,steps:n,num:2,direction:[1,0,0],smooth:!1,gradientType:1};Object.assign(e,i)}else if("depth"===e.type&&1===e.gradientType&&(e.near<0||e.far<0)){let t={...oe(e),near:Math.max(e.near,0),far:Math.max(e.far,0)};Object.assign(e,t)}})}function cn(e,t){Object.values(e.shared.materials).forEach(e=>t(e))}function un(e,t){e.scene.objects.traverse((e,r)=>{"materials"in r?r.materials.forEach((e,a)=>{void 0===e&&(r.materials[a]=nr.defaultTwoLayerData("phong"),e=r.materials[a]),"string"!=typeof e&&t(e)}):"material"in r?"string"!=typeof r.material&&(void 0===r.material&&(r.material=nr.defaultTwoLayerData("phong")),t(r.material)):"Mesh"===r.type&&(void 0===r.material&&(r.material=nr.defaultTwoLayerData("phong")),t(r.material)),"overrides"in r&&Object.values(r.overrides).forEach(e=>{e.material&&"string"!=typeof e.material&&Object.getPrototypeOf(e.material)!==L.prototype&&t(e.material)})})}function dn(e){void 0===e.layers&&Object.assign(e,nr.defaultTwoLayerData("lambert"))}function fn(e){!e.layers||e.layers.forEach(e=>{if("depth"===e.type&&10===e.colors.length){let t=[...e.colors];t.push(e.colors[9]);let r=[...e.steps];r.push(e.steps[9]);let a={...oe(e),colors:t,steps:r};Object.assign(e,a)}})}function pn(e){e.scene.objects.traverse((e,t)=>{"materials"in t?t.materials.forEach(e=>{"string"!=typeof e&&fn(e)}):"material"in t&&"string"!=typeof t.material&&fn(t.material)}),Object.values(e.shared.materials).forEach(e=>fn(e))}function hn(e){e.layers&&e.layers.forEach(e=>{"depth"===e.type&&void 0!==e.num&&(e.colors=e.colors.slice(0,e.num),e.steps=e.steps.slice(0,e.num),delete e.num)})}function yn(e){e.layers&&e.layers.forEach(e=>{(function(e){return"displace"!==e.type})(e)&&void 0===e.isMask&&(e.isMask=!1),("texture"===e.type||"video"===e.type)&&void 0===e.blending&&(e.blending=0),("noise"===e.type||"displace"===e.type&&"noise"===e.displacementType)&&(void 0===e.voronoiStyle&&(e.voronoiStyle=0),void 0===e.highCut&&(e.highCut=1),void 0===e.lowCut&&(e.lowCut=0),void 0===e.smoothness&&(e.smoothness=.3),void 0===e.seed&&(e.seed=0),void 0===e.quality&&(e.quality=1))})}function mn(e){let t=e.layers.find(e=>"light"===e.type)?.data;if("basic"===t?.category){let e=tr.defaultData("light","phong"),r=t;Object.assign(r,e),r.visible=!1}}function gn(e){cn(e,mn),un(e,mn)}function bn(e){e.layers.forEach(e=>{"light"===e.type&&"toon"!==e.category&&void 0===e.occlusion&&(e.occlusion=!0)})}function vn(e){e.layers&&e.layers.forEach(e=>{"light"===e.type&&void 0===e.bumpMapIntensity&&(e.bumpMapIntensity=5)})}(e=>{e.is=function(e){return"MouseDown"===e.type||"MouseUp"===e.type||"MousePress"===e.type||"KeyDown"===e.type||"KeyUp"===e.type||"KeyPress"===e.type},e.defaultData=function(e){return"MouseDown"===e||"MouseUp"===e||"MousePress"===e?{type:e,mode:"Object",disabled:!1,name:"",actions:new j}:{type:e,disabled:!1,name:"",key:void 0,actions:new j}}})(Ba||(Ba={})),(e=>{e.propertyDefaultData=function(e){return{type:"Property",value:[e??null,"position","x"]}},e.valueDefaultData={type:"Literal",value:0}})(Ua||(Ua={})),(e=>{e.comparisonDefaultData=function(e){return{type:"Comparison",operator:"==",lOperand:Ua.propertyDefaultData(e),rOperand:{...Ua.valueDefaultData}}},e.distanceDefaultData=function(e){return{type:"Distance",toObject:e??null,fromObject:e??null,distance:200}},e.stateDefaultData=function(e,t){return{type:"State",object:e??null,state:t??null}}})(Ga||(Ga={})),(Va||(Va={})).isConditionalSubActions=function(e){return void 0!==e.find(e=>"ifActions"===e||"elseActions"===e)},(e=>{e.is=function(e){return"Conditional"===e.type},e.defaultData=function(e){return{type:"Conditional",disabled:!1,name:"",inActions:new j,outActions:new j,condition:Ga.distanceDefaultData(e)}}})(Fa||(Fa={})),(Ha||(Ha={})).defaultData={type:"DragDrop",name:"",cursor:"hand",disabled:!1,dampingFactor:1,objects:[],snapTo:"center",snapSurfaceMode:"bbox",snapSurfaceOffset:0,dropOn:"all",autoOrient:!0,dropDestinations:[],plane:"adaptive",planeMode:"locked",referenceFrame:"global",limits:[-1/0,1/0,-1/0,1/0,-1/0,1/0],drop:!1,resetOnSnapFail:!1,snapSpeed:20,resetSpeed:20,dragDropActions:{drag:new j,drop:new j}},(Na||(Na={})).defaultData={type:"Follow",disabled:!1,name:"",maxDelta:0,dampingFactor:1,target:"cursor",plane:"custom",resetOnPointerLeave:!0,resetAfterDistanceLimit:!0,enabledTranslation:[!0,!0,!0],limitDistanceEnabled:!1,limitDistance:1e3,snapDelay:0,resetSpeed:5,actions:new j},(Ka||(Ka={})).defaultData={type:"LookAt",disabled:!1,name:"",distance:1e3,dampingFactor:1,target:"cursor",tilt:"up",axis:"z",plane:"custom",resetOnPointerLeave:!0,resetAfterDistanceLimit:!0,enabledRotation:[!0,!0,!0],limitDistanceEnabled:!1,limitDistance:1e3,snapDelay:0,resetSpeed:5},(e=>{e.is=function(e){return"MouseHover"===e.type},e.defaultData=function(){return{type:"MouseHover",disabled:!1,name:"",actions:new j}}})(qa||(qa={})),(e=>{e.is=function(e){return"Scroll"===e.type},e.defaultData=function(){return{type:"Scroll",disabled:!1,name:"",steps:100,trigger:"load",startFrom:"enter",enterAnchor:"top",startOffset:0,endAfter:400,actions:new j}}})(Wa||(Wa={})),(e=>{e.is=function(e){return"Start"===e.type},e.defaultData=function(){return{type:"Start",disabled:!1,name:"",actions:new j}}})(Xa||(Xa={})),(e=>{e.is=function(e){return"Collision"===e.type},e.defaultData=function(){return{type:"Collision",disabled:!1,name:"",target:"character",actions:new j}}})(Za||(Za={})),(e=>{e.is=function(e){return"Trigger"===e.type},e.defaultData=function(e,t){return{type:"Trigger",name:"",disabled:!1,target:"all",triggeringObjects:[],actions:new j,triggerZone:"box",position:t.toArray(),rotation:[0,0,0],size:e.toArray(),radius:e.length()/2,helperVisible:!0}}})(Ya||(Ya={})),(t=>{t.defaultSizes={mobile:[480,480],tablet:[768,768],desktop:[1200,1200],custom:[769,1200]},t.is=function(e){return"Resize"===e.type},t.sizeToDevice=function(e){return"string"==typeof e?e:"custom"},t.deviceToSize=function(e){return"string"==typeof e?[...t.defaultSizes[e]]:[...e]},t.defaultData=function(){let r={size:"mobile",operator:"<",actions:new j},a={size:"tablet",operator:"<",actions:new j},n={size:[...t.defaultSizes.custom],operator:"<>",actions:new j},i=new j;return i.push({id:e.generateUUID(),fi:0,data:r},{id:e.generateUUID(),fi:1,data:a},{id:e.generateUUID(),fi:2,data:n}),{type:"Resize",disabled:!1,name:"",orientation:"horizontal",breakpoints:i}},t.defaultBreakpointData=function(){return{size:[...t.defaultSizes.custom],operator:"<>",actions:new j}}})($a||($a={})),(e=>{e.propertyPaths={Position:["position"],"Position X":["position","x"],"Position Y":["position","y"],"Position Z":["position","z"],Rotation:["rotation"],"Rotation X":["rotation","x"],"Rotation Y":["rotation","y"],"Rotation Z":["rotation","z"],Scale:["scale"],"Scale X":["scale","x"],"Scale Y":["scale","y"],"Scale Z":["scale","z"],Width:["width"],Height:["height"],Depth:["depth"],"Mouse Position X":["mouse","x"],"Mouse Position Y":["mouse","y"],"Mouse Pressed":["mouse","pressed"],"Screen Width":["mouse","width"],"Screen Height":["mouse","height"],"Hit Position X":["raycast","x"],"Hit Position Y":["raycast","y"],"Hit Position Z":["raycast","z"],"Hit Object Position X":["raycast","objX"],"Hit Object Position Y":["raycast","objY"],"Hit Object Position Z":["raycast","objZ"]},e.is=function(e){return"VariableChange"===e.type},e.defaultData=function(){return{disabled:!1,type:"VariableChange",name:"",actions:new j,variableId:"",objectId:null,property:"Position X"}}})(Qa||(Qa={})),(e=>{e.is=function(e){return"API"===e.type},e.defaultData=function(){return{disabled:!1,type:"API",name:"",successActions:new j,errorActions:new j,userAPIId:""}}})(Ja||(Ja={})),(e=>{e.is=function(e){return"WEBHOOK"===e.type},e.defaultData=function(){return{disabled:!1,type:"WEBHOOK",name:"",actions:new j,userWebhookId:""}}})(en||(en={})),(e=>{e.is=function(e){return"AIAssistantListener"===e.type},e.defaultData=function(){return{disabled:!1,type:"AIAssistantListener",name:"",actions:new j,analysis:"average",analysisRange:[0,71],analysisSingle:0}}})(tn||(tn={})),(e=>{e.is=function(e){return"AIAssistantTrigger"===e.type},e.defaultData=function(){return{disabled:!1,description:"",name:"",type:"AIAssistantTrigger",actions:new j}}})(rn||(rn={})),(an||(an={})).list=["idle","move","jump","run"],(e=>{e.defaultColliderData={type:"capsule",height:200,radius:50,position:[0,0,0],rotation:[0,0,0]},e.defaultDataThirdPerson={moveMode:"walk",forwardDirection:"+z",speedTranslate:1e3,speedRotate:100,runMultiplier:2,rotationMode:"normal",rotBy:"keys",rotByTouch:"drag",delayPos:[.3,.3],delayRot:[.3,.3],keyAssignments:[["moveNegZ","W"],["moveNegX","A"],["movePosZ","S"],["movePosX","D"],["rotPosX","▲"],["rotPosY","◀"],["rotNegX","▼"],["rotNegY","▶"],["jump","Space"],["run","⇧"],["none","Ctrl"]],touchControl:!0,joystickPosLoc:5,joystickRotLoc:11,jumpTouchButtonLoc:9,collider:e.defaultColliderData,colliderHelperVisible:!0,collisionEnabled:!0,jumpPower:100,resetYPosition:3e3,alignToGround:!1,autoOrientMove:!0,orientWith:"camera",orientMode:"radial",delayPosCamera:.3,delayRotCamera:.3,camera:"",cameraXAxis:"Limit",cameraYAxis:"Free",cameraRotXLimits:[0,Math.PI/2],cameraRotYLimits:[-Math.PI/2,Math.PI/2],gameActions:{idle:new j,move:new j,jump:new j,run:new j},navmesh:{enabled:!1,ch:6,cs:6,walkableClimb:5,walkableHeight:1,walkableRadius:0,zones:"all",objects:[],helperVisible:!0,destinationHelperRadius:0,destinationHelperColor:Ct.fromHexAndA(3728051,1)}}})(nn||(nn={}));var wn=new r,Dn=new r,Sn=new r,On=new r,An=new r,jn=new r,Cn=new a,Pn=1e-12,Mn=.01;function xn(e){let t=e.elements;wn.set(t[0],t[1],t[2]),Dn.set(t[4],t[5],t[6]),Sn.set(t[8],t[9],t[10])}function En(){let e=Math.max(wn.lengthSq(),Dn.lengthSq(),Sn.lengthSq());wn.lengthSq()>Pn*e?On.copy(wn).normalize():On.set(1,0,0),An.crossVectors(Sn,On),An.lengthSq()<=Pn*e&&(An.copy(Dn).addScaledVector(On,-Dn.dot(On)),An.lengthSq()<=Pn*e&&function(e,t){e.set(1,0,0).cross(t),e.lengthSq()<=Pn&&e.set(0,1,0).cross(t),e.normalize()}(An,On)),An.normalize(),jn.crossVectors(On,An)}function Tn(e,t,r){return xn(e),En(),t.makeBasis(On,An,jn),r.set(On.dot(wn),On.dot(Dn),On.dot(Sn),0,An.dot(wn),An.dot(Dn),An.dot(Sn),0,jn.dot(wn),jn.dot(Dn),jn.dot(Sn),0,0,0,0,1),function(){let e=wn.length(),t=Dn.length(),r=Sn.length(),a=Math.max(e,t,r);if(a-e>Mn||a-t>Mn||a-r>Mn)return!0;let n=Mn*a*a;return Math.abs(wn.dot(Dn))>n||Math.abs(wn.dot(Sn))>n||Math.abs(Dn.dot(Sn))>n}()}function In(e){return xn(e),En(),Cn.makeBasis(On,An,jn)}var _n=new a,Rn=new a,kn=new n;function zn(e,t){return 0===t?0:e/t}function Ln(t){Tn(t,Rn,_n),kn.setFromRotationMatrix(Rn);let r=function(e,t,r){let a=2*Math.PI,n=e=>e-a*Math.round(e/a),i=n(e+Math.PI),o=n(Math.PI-t),s=n(r+Math.PI);return Math.abs(i)+Math.abs(s)<Math.abs(e)+Math.abs(r)-1e-9?[i,o,s]:[e,t,r]}(kn.x,kn.y,kn.z),a=_n.elements;return{position:[t.elements[12],t.elements[13],t.elements[14]],rotation:[r[0]*e.RAD2DEG,r[1]*e.RAD2DEG,r[2]*e.RAD2DEG],scale:[a[0],a[5],a[10]],shear:[zn(a[4],a[5]),zn(a[8],a[10]),zn(a[1],a[0]),zn(a[9],a[10]),zn(a[2],a[0]),zn(a[6],a[5])]}}function Bn(t,{translation:r,quaternion:a,scale:n,shearMatrix:i}={}){let o=Ln(t);if(void 0!==r&&r.fromArray(o.position),void 0!==a){let t=o.rotation;a.setFromEuler(kn.set(t[0]*e.DEG2RAD,t[1]*e.DEG2RAD,t[2]*e.DEG2RAD))}void 0!==n&&n.fromArray(o.scale),void 0!==i&&i.fromArray(Ot.toMatrix(o.shear))}function Un(e){e.layers&&e.layers.forEach(e=>{"light"===e.type&&void 0===e.alphaOverride&&(e.alphaOverride=1)})}var Gn=new Set(["RectangleGeometry","EllipseGeometry","StarGeometry","PolygonGeometry","TriangleGeometry","VectorGeometry","TextGeometry","InputGeometry","PathGeometry"]);function Vn(e){let t=e.geometry;void 0!==t&&Gn.has(t.type)&&void 0===t.extrusionVersion&&(t.extrusionVersion=1)}var Fn=180/Math.PI,Hn=Math.PI/180;function Nn(e,t){let[r,a,n]=e,i=Math.cos(r),o=Math.sin(r),s=Math.cos(a),l=Math.sin(a),c=Math.cos(n),u=Math.sin(n),d=[s*c,i*u+o*c*l,o*u-i*c*l],f=Math.hypot(t[0],t[1],t[2])||1;return Math.abs((d[0]*t[0]+d[1]*t[1]+d[2]*t[2])/f)}function Kn(e){(function(e){e.rotation=e.rotation.slice(0,3).map(e=>e*Fn)})(e),"Page"===e.type&&function(e){let t=e.rotation.slice(0,3);!function(e,t){let r=Array.isArray(t)&&t.length>=3&&t.every(e=>"number"==typeof e&&Number.isFinite(e))?t:[0,1,0],a=Nn(e,r),n=Nn(e.map(e=>e*Hn),r);return Math.abs(a-n)<1e-6?e.some(e=>Math.abs(e)>Math.PI):n<a}(t,e.up)?e.rotation=t.map(e=>e*Fn):e.rotation=t}(e.camera),e.states?.forEach(e=>{void 0===e.rotation||null===e.rotation||(e.rotation=e.rotation.slice(0,3).map(e=>e*Fn))});let t=e.geometry;t&&"SphereGeometry"===t.type&&(t.thetaLength=(t.thetaLength??180)*Fn),t&&"TorusGeometry"===t.type&&(t.arc=t.arc*Fn),t&&"PathGeometry"===t.type&&(t.extrusion.angle*=Fn,t.extrusion.twist*=Fn),"Mesh"===e.type&&"TextGeometry"===e.geometry.type&&(e.geometry.text={textValue:e.geometry.text}),Array.isArray(oe(e.events))&&e.events?.forEach(e=>{("MouseDown"===e.type||"MouseUp"===e.type||"MousePress"===e.type||"KeyDown"===e.type||"KeyUp"===e.type||"KeyPress"===e.type||"Collision"===e.type||"Trigger"===e.type)&&(e.runMode=e.toggle?"Toggle":"Repeat")})}function qn(e){e.scene.objects.traverse((e,t)=>{})}function Wn(e){let t=e.schema??104;133!==t&&t<130&&($n(e.asset),e.schema=130)}function Xn(e,t){t(e.data);for(let r of e.children)Xn(r,t)}function Zn(e){let t=e.schema??104;133!==t&&(t<105&&(Xn(e.asset,Kn),e.schema=105),t<118&&(Xn(e.asset,Jn),e.schema=118),t<121&&(Xn(e.asset,li),e.schema=121),t<130&&(Xn(e.asset,Qn),e.schema=130),t<132&&(Xn(e.asset,Vn),e.schema=132),t<133&&(Xn(e.asset,e=>ci(e,()=>{})),e.schema=133))}function Yn(e,t){un(e,t),cn(e,t),Object.values(e.shared.lib.materials).forEach(e=>t(e.asset))}function $n(e){void 0===e.layers&&Object.assign(e,nr.defaultTwoLayerData("phong"))}function Qn(e){"materials"in e?e.materials.forEach(e=>{void 0!==e&&"string"!=typeof e&&$n(e)}):"material"in e&&void 0!==e.material&&"string"!=typeof e.material&&$n(e.material)}function Jn(e){e.timelineAnimations=l({},g.prototype)}function ei(e){let t=[];return e?(e.forEach((e,r)=>{let{path:a,keyframes:n}=e.data,i="material"===a[0]?e.id:void 0;n?.length?n.forEach(({id:e,data:n})=>{t.push({id:e,data:{...n,path:a,layerId:i,index:r}})}):t.push(Ea.placeholderKeyframe(e.id,a,{layerId:i,index:r}))}),t.sort((e,t)=>e.data.time-t.data.time),new j(...t.map((e,t)=>({...e,fi:t})))):new j}var ti=["position","rotation","scale","shape size"];function ri(t){for(let{id:r,data:a}of[...t.unproxy()]){let n=a.path?.[0];if(!n||!ti.includes(n))continue;let i=ai(a.value);if(!i.length)continue;let o=t.data(r);if(!o)continue;let s=a.value,[l,...c]=i;for(let r of c){let i=e.generateUUID();t.insertBefore(null,[{id:i,data:{...a,id:i,path:[n,r],value:s[r],easing:ni(a.easing)}}])}o.path=[n,l],o.value=s[l]}}function ai(e){return null===e||"object"!=typeof e?[]:ka.filter(t=>t in e)}function ni(e){let t=e?.cubicControls;return{...e,cubicControls:{control1:[...t?.control1??[0,0]],control2:[...t?.control2??[1,1]]},...e?.springParameters?{springParameters:{...e.springParameters}}:{}}}function ii(e,t){return Math.abs(e[0]-t[0])<1e-6&&Math.abs(e[1]-t[1])<1e-6}function oi(e){let t=function(e){let t=[];for(let r of Ea.groupKeyframes(e)){let e=new Set(r.keyframes.flatMap(e=>ai(e.data.value))),a=e.size?[...e].map(e=>r.keyframes.filter(t=>ai(t.data.value).includes(e))):[r.keyframes];for(let e of a){let r=[...e].sort((e,t)=>e.data.time-t.data.time);for(let e=0;e+1<r.length;e++)t.push({left:r[e],right:r[e+1]})}}return t}([...e.unproxy()]),r=new Map,a=new Set;for(let{left:e,right:n}of t){let t=e.data.easing?.type,i=(void 0===t?void 0:Ea.presetHandles(t))?.control2??(5===t?Ia(n.data.easing?.cubicControls?.control2,[1,1]):void 0);if(!i)continue;let o=r.get(n.id);o?ii(o,i)||a.add(n.id):r.set(n.id,i)}let n=new Map;for(let{id:t,data:r}of e.unproxy()){let e=r.easing?.type,a=void 0===e?void 0:Ea.presetHandles(e);a&&n.set(t,a.control1)}for(let{left:e,right:r}of t)a.has(r.id)&&n.delete(e.id);for(let[t,r]of n){let a=e.data(t);!a?.easing||(a.easing.cubicControls={control1:r,control2:Ia(a.easing.cubicControls?.control2,[1,1])},a.easing.type=5)}for(let{left:a,right:i}of t){if(!n.has(a.id))continue;let t=e.data(i.id),o=r.get(i.id);!t?.easing||!o||(t.easing.cubicControls={control1:Ia(t.easing.cubicControls?.control1,[0,0]),control2:o})}}function si(e,t){e.scene.objects.traverse((e,r)=>{let a=r;if("Page"===a.type&&a.timelines)for(let e of Object.values(a.timelines))for(let r of Object.values(e.objectTimelines??{}))t(r.keyframes)})}function li(e){e.pivot=[0,0,0],e.pivotRotation=[0,0,0]}function ci(i,o){let s=["position","rotation","scale","shear"];function l(e,t,r){return e?.map(e=>"string"==typeof e?o(e)??r:e)??[...t]}function c(i,o){if(i&&!function(e){return e.every((e,t)=>Math.abs(e-(t%5==0?1:0))<1e-6)}(i))return Ln((new a).fromArray(i).multiply((new a).compose((new r).fromArray(o.position),(new t).setFromEuler(new n(o.rotation[0]*e.DEG2RAD,o.rotation[1]*e.DEG2RAD,o.rotation[2]*e.DEG2RAD)),(new r).fromArray(o.scale))))}function u(e,t){return e.length===t.length&&e.every((e,r)=>e===t[r])}i.shear=Ot.zero;let d=i,f=d.hiddenMatrix;void 0!==f&&delete d.hiddenMatrix;let p={position:l(d.position,[0,0,0],0),rotation:l(d.rotation,[0,0,0],0),scale:l(d.scale,[1,1,1],1)},h=c(f,p);h&&Object.assign(d,h);let y=h??{...p,shear:[...Ot.zero]};d.states?.forEach(e=>{let t=e.hiddenMatrix;if(void 0!==t&&delete e.hiddenMatrix,void 0===t&&null==e.position&&null==e.rotation&&null==e.scale)return;let r={position:l(e.position,p.position,0),rotation:l(e.rotation,p.rotation,0),scale:l(e.scale,p.scale,1)},a=c(t??f,r);if(!h&&!a)return;let n=a??{...r,shear:[...Ot.zero]};for(let t of s)u(n[t],y[t])||(e[t]=n[t])})}function ui(e){}function di(t){let r=t.schema??0;if(133!==r){if(r>133)return void console.error(`This scene was created with a newer version of Spline (file format ${r}, this runtime reads 133). Update @splinetool/runtime to the latest version to load it correctly.`);console.warn("updating from ",r,"to ",133),function(t,r){if(r<1&&(un(t,ln),cn(t,ln),t.schema=1),r<2&&(function(e){Object.assign(e.scene.publish,{orbitControls:{...da.defaultData,...oe(e.scene.publish.orbitControls)}})}(t),t.schema=2),r<3&&(function(e){function t(e){if(e.layers)for(let t of Object.values(e.layers))if(t)for(let[e,r]of Object.entries(t))if((pr.includes(e)||"boolean"==typeof r)&&delete t[e],"texture"===e)for(let[e,t]of Object.entries(r))(hr.includes(e)||"boolean"==typeof t)&&delete r[e]}e.scene.objects.traverse((e,r)=>{r.states.forEach(e=>{let r=e;r.material?t(r.material):r.materials&&r.materials.forEach(e=>{t(e)})})})}(t),t.schema=3),r<4&&(function(e){e.scene.publish.withBackground=!0}(t),t.schema=4),r<5&&(function(e){e.scene.publish.settings.web={compress:!0,preload:!0,preset:1,logo:!0,hint:!1}}(t),t.schema=5),r<6&&(function(e){e.scene.objects.traverse((e,t)=>{let r=t.cloner;r&&(r.radial.scale=r.radial.scale.map(e=>e+1),r.linear.scale=r.linear.scale.map(e=>e+1))})}(t),t.schema=6),r<7&&(function(e){e.scene.objects.traverse((e,t)=>{let r=t.geometry;r&&("DodecahedronGeometry"===r.type||"IcosahedronGeometry"===r.type)&&(r.detail=Math.round(r.detail))})}(t),t.schema=7),r<8&&(t.schema=8),r<9&&(pn(t),t.schema=9),r<10&&(function(e){e.scene.objects.traverse((e,t)=>{"Mesh"===t.type&&("BooleanGeometry"===t.geometry.type||"SubdivGeometry"===t.geometry.type)&&(t.geometry.phongAngle=35)})}(t),t.schema=10),r<11&&(function(e){e.scene.environment.ambientLight.softShadows=!1,e.scene.environment.ambientLight.softShadowQuality="low",e.scene.objects.traverse((e,t)=>{("DirectionalLight"===t.type||"SpotLight"===t.type)&&(t.shadowResolution=1024,t.shadowRadius=1,t.depth=1e5)}),e.shared.penumbraSize=new Array(5).fill(.5)}(t),t.schema=11),r<12&&(pn(t),t.schema=12),r<13&&(function(e){e.shared.audios=l({},g.prototype)}(t),t.schema=13),r<14&&(function(e){let t=e.shared.materials;Object.entries(t).forEach(([e,r])=>{if(!r.layers){let r={name:"Untitled Material",layers:[{fi:0,data:{type:"light",category:"phong",alpha:.6,visible:!0,mode:0,specular:{r:.2,g:.2,b:.2},shininess:5},id:"layer1"},{fi:1,data:{type:"color",alpha:1,visible:!0,mode:0,color:{r:.2823529411764706,g:.2823529411764706,b:.30196078431372547}},id:"layer2"}]};Object.assign(t,{[e]:r})}})}(t),t.schema=14),r<15&&(function(e){Object.entries(oe(e.shared.images)).filter(e=>!1===e[1].asset).map(e=>e[0]).forEach(t=>{delete e.shared.images[t]}),Object.entries(oe(e.shared.audios)).filter(e=>!1===e[1].asset).map(e=>e[0]).forEach(t=>{delete e.shared.audios[t]})}(t),t.schema=15),r<16&&(function(e){e.scene.publish.settings.web.preload=!1}(t),t.schema=16),r<17&&(un(t,hn),cn(t,hn),t.schema=17),r<18&&(un(t,dn),cn(t,dn),t.schema=18),r<19&&(function(e){Object.assign(e.scene.publish.settings,{video:{...fa.defaultData.settings.video,...oe(e.scene.publish.settings.video)}})}(t),t.schema=19),r<20&&(function(e){e.shared.fonts=l({},g.prototype)}(t),function(e){let t=[];e.scene.objects.traverse((r,a)=>{let n=a;if("TextFrame"===n.type){let a=nr.defaultTwoLayerData("phong"),i="string"==typeof n.color?e.shared.colors[n.color]:n.color;a.layers[1].data.color={r:i.r,g:i.g,b:i.b},a.layers[1].data.alpha=n.alpha;let o=function(e){return e.replace(".typeface","").replace(/optimer/gi,"open sans").replace("space_mono","space mono").replace(/alma_mono/gi,"varela round").replace(/droid_sans_mono/gi,"noto sans mono").replace(/droid_sans|gentilis|gnomon_(simple|foreground)|helvetiker/gi,"roboto").replace(/droid_serif/gi,"roboto slab").replace("_sans"," sans").replace("crimson_text","crimson text").replace("medium_medium","medium").replace("fatface_fatface","fatface").replace("100hairline","thin").replace("200thin","extralight").replace("300light","light").replace("500medium","medium").replace("600semi","semibold").replace("800heavy","extrabold").replace("900black","black").replace(/bodoni_(11|16|24|36|48|72|96)([^_])/gi,"bodoni_$1_$2").replace(/bodoni_(11|16|24|36|48|72|96)/gi,"bodoni moda").replace(/(thin|hairline)(_regular)?/gi,"100").replace(/(extra|ultra)light(_regular)?/gi,"200").replace(/light(_regular)?/gi,"300").replace(/_book|_normal|_roman/gi,"_regular").replace(/medium(_regular)?/gi,"500").replace(/(semi|demi)bold(_regular)?/gi,"600").replace(/(extra|ultra)bold(_regular)?/gi,"800").replace(/bold(_regular)?/gi,"700").replace(/(black|heavy|fatface)(_regular)?/gi,"900").replace(/([1-9]00)_italic/gi,"$1italic").replace(/regularitalic/gi,"italic").replace(/regularitalic/gi,"italic").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}(n.font);void 0===e.shared.fonts[o]&&(e.shared.fonts[o]={name:o});let s={name:n.name,...$r.defaultData,...aa.defaultData,flatShading:!1,wireframe:!1,geometry:{...Or.defaultData("TextGeometry"),width:n.width,height:n.height,font:o,depth:0,horizontalAlign:n.horizontalAlign,verticalAlign:n.verticalAlign,fontSize:1.40625*n.fontSize,lineHeight:n.lineHeight/1.40625,letterSpacing:n.letterSpacing-1,text:n.text,textTransform:n.textTransform,extrudeBevelSize:0,extrudeBevelSegments:1},material:a,states:oe(n.states),events:oe(n.events),visible:n.visible,raycastLock:n.raycastLock,position:n.position,rotation:n.rotation,scale:n.scale,hiddenMatrix:n.hiddenMatrix},l=oe(e.scene.objects).parent(r);e.scene.objects.insertAfter(l??null,r,[{id:r+"new",data:s,children:[]}]),t.push(r)}}),t.forEach(t=>{e.scene.objects.delete(t)})}(t),t.schema=20),r<21&&(function(t){let r={0:"MouseDown",1:"MouseUp",2:"MouseHover",5:"KeyDown",6:"KeyUp",7:"Start",9:"LookAt",10:"Follow",11:"Scroll",12:"Audio",13:"GameControl"};t.scene.objects.traverse((t,a)=>{a.events.forEach(t=>{if(r[Number(t.type)])if(Object.assign(t,{type:r[Number(t.type)]}),"Audio"===t.type&&"audioEvent"in t&&(Object.assign(t,{playAudio:t.audioEvent}),delete t.audioEvent),"GameControl"===t.type)Object.assign(t,{gameActions:{idle:new j,move:new j,jump:new j}});else{let r=new j;Object.assign(t,{actions:r}),("MouseDown"===t.type||"MouseUp"===t.type||"KeyDown"===t.type||"KeyUp"===t.type)&&"url"in t&&r.push({fi:0,id:e.generateUUID(),data:{type:"Link",url:t.url,delay:0}}),"targets"in t&&(t.targets.forEach((t,a,n)=>{let i={easing:t.easing,duration:t.duration};6===t.easing?Object.assign(i,sn(t,"mass","stiffness","damping","velocity")):5===t.easing&&Object.assign(i,{control1:{...t.control1},control2:{...t.control2}});let o={repeat:t.repeat?-1:0,delay:t.delay,delayDirection:t.delayDirection,direction:t.cycle&&t.rewind?"pingpong-rewind":t.cycle?"pingpong":"normal"},s={state:t.state,...o,...i},l={allowSlerp:!0,type:"Transition",object:t.object,repeat:0,delay:0,delayDirection:void 0,direction:"normal",tweens:new j({fi:0,id:e.generateUUID(),data:{state:void 0,repeat:0,delay:0,delayDirection:void 0,direction:"normal",duration:0,easing:4}},{fi:1,id:e.generateUUID(),data:s})};r.push({fi:n,id:a,data:l})}),delete t.targets)}})})}(t),function(t){t.scene.objects.traverse((t,r)=>{function a(t,a){let n=new j,i=[];if(r.events.forEach((e,t,r)=>{if("Audio"===e.type&&e.trigger===a){let a;i.push(t),"play"===e.interaction?a={...sn(e,"interaction","audio","delay","volume","loop"),triggerAfter:"after"in e?e.after:void 0,toggle:"after"in e?e.toggle:void 0,type:"Audio"}:("pause"===e.interaction||"stop"===e.interaction)&&(a={...sn(e,"interaction","delay","object","playAudio"),type:"Audio"}),a&&n.push({fi:r,id:t,data:a})}}),i.forEach(e=>r.events.delete(e)),n.length){let a=r.events.find(e=>e.type===t)?.data;a?"actions"in a&&a.actions.insertBefore(null,n):r.events.insertBefore(null,[{id:e.generateUUID(),data:{type:t,actions:n}}])}}a("Start","start"),a("MouseDown","mouseDown"),a("MouseUp","mouseUp"),a("KeyDown","keyDown"),a("KeyUp","keyUp")})}(t),t.schema=21),r<22&&(gn(t),t.schema=22),r<23&&(function(e){e.scene.objects.traverse((e,t)=>{"Mesh"===t.type&&"SubdivGeometry"===t.geometry.type&&(t.geometry.scaleBaked||(t.geometry.scaleBaked=[1,1,1]))})}(t),t.schema=23),r<24&&(function(e){e.scene.objects.traverse((e,t)=>{("Empty"===t.type||"Mesh"===t.type)&&t.cloner&&!t.cloner.randomnessObject&&!t.cloner.toObject&&!t.cloner.randomness&&(t.cloner={...t.cloner,toObject:{object:"",spreadType:"random",scale:[0,0,0],rotation:[0,0,0],position:[0,0,0],axis:"x",seed:0,count:99,align:"normal"},randomness:!1,randomnessObject:{strength:100,scale:[0,0,0],rotation:[0,0,0],position:[0,0,0],movement:1,seed:0,freqScale:10,noiseType:"perlin"}})})}(t),t.schema=24),(r<25||void 0===t.shared.videos)&&(function(e){e.shared.videos=l({},g.prototype)}(t),r<25&&(t.schema=25)),r<26&&(function(e){e.scene.objects.traverse((t,r)=>{let a=e.scene.objects.unproxy().parent(t);if(a){let t=oe(e.scene.objects.data(a));t&&"Mesh"===t.type&&"BooleanGeometry"===t.geometry.type&&"Mesh"===r.type&&(r.visible=!0!==oe(r).booleanExclude)}})}(t),t.schema=26),r<27&&(function(e){e.scene.objects.traverse((e,t)=>{if("Mesh"===t.type){let e=t;"NonParametricGeometry"===t.geometry.type?void 0!==e.material&&delete e.material:void 0!==e.materials&&delete e.materials}})}(t),t.schema=27),r<28&&(gn(t),t.schema=28),r<29&&(function(e){function t(e){Object.setPrototypeOf(e,L.prototype),e.texture&&Object.setPrototypeOf(e.texture,L.prototype)}function r(e){Object.setPrototypeOf(e,L.prototype);for(let r in e)t(e[r])}e.scene.objects.traverse((e,t)=>{t.states.forEach(e=>{let t=e;if(t.material){let e=oe(t.material).layers;r(e),t.material.layers=e}if(t.materials)for(let e=0;e<t.materials.length;e++){let a=t.materials[e],n=oe(a).layers;r(n),a.layers=n}})})}(t),t.schema=29),r<30&&(function(e){e.scene.objects.traverse((e,t)=>{"Mesh"===t.type&&"NonParametricGeometry"===t.geometry.type&&!("material"in t)&&!("materials"in t)&&(t.material=nr.defaultTwoLayerData("phong"))})}(t),t.schema=30),r<31&&(function(e){void 0===e.scene.publish.orbitControls.autoZoom&&(e.scene.publish.orbitControls.autoZoom=!1),e.scene.objects.traverse((e,t)=>{("OrthographicCamera"===t.type||"PerspectiveCamera"===t.type)&&(void 0===t.orthographic.autoZoom&&(t.orthographic.autoZoom=!1),void 0===t.orthographic.autoZoomFrustumSize&&(t.orthographic.autoZoomFrustumSize=790))})}(t),t.schema=31),r<33&&(function(e){e.scene.objects.traverse((e,t)=>{void 0===t.pathSnapping&&(t.pathSnapping={pathId:null,slide:0,offset:0,orientation:"tangential"}),void 0===t.pathSnapping.offset&&(t.pathSnapping.offset=0)})}(t),t.schema=33),r<34&&(function(e){void 0===e.scene.publish.mouseEventTarget&&(e.scene.publish.mouseEventTarget="canvas"),void 0===e.scene.publish.settings.web.hint&&(e.scene.publish.settings.web.hint=!1)}(t),t.schema=34),r<35&&(function(e){let{video:t}=e.scene.publish.settings;"gif"===t.format&&t.fps>48&&(t.fps=15)}(t),t.schema=35),r<36&&(function(e){e.scene.objects.traverse((e,t)=>{t.events.forEach(e=>{"GameControl"===e.type&&(e.resetYPosition=Math.abs(e.resetYPosition-t.position[1]))})})}(t),t.schema=36),r<37&&(function(e){let t=e.scene.environment.usePhysics;e.scene.objects.traverse((e,r)=>{t&&null===r.physics?r.collision=!1:r.collision="visibility"})}(t),t.schema=37),r<38&&(un(t,yn),cn(t,yn),t.schema=38),r<39&&(function(e){e.scene.objects.traverse((e,t)=>{t.events.forEach(e=>{"GameControl"===e.type&&(e.navmesh=nn.defaultDataThirdPerson.navmesh)})})}(t),t.schema=39),r<40&&(function(e){e.scene.styles||(e.scene.styles=ya.defaultData())}(t),t.schema=40),r<41&&(function(e){void 0===e.scene.environment.ambientLight.occlusion&&(e.scene.environment.ambientLight.occlusion=!1),void 0===e.scene.environment.ambientLight.aoFullRes&&(e.scene.environment.ambientLight.aoFullRes=!1),void 0===e.scene.environment.ambientLight.radius&&(e.scene.environment.ambientLight.radius=256),void 0===e.scene.environment.ambientLight.bias&&(e.scene.environment.ambientLight.bias=.5),void 0===e.scene.environment.ambientLight.aoColor&&(e.scene.environment.ambientLight.aoColor={r:.19607843137254902,g:.19607843137254902,b:.19607843137254902}),un(e,bn),cn(e,bn)}(t),t.schema=41),r<42&&(function(e){e.scene.objects.traverse((e,t)=>{t.events.forEach(e=>{"GameControl"===e.type&&Object.assign(e.gameActions,{run:new j})})})}(t),t.schema=42),r<43&&(function(e){e.scene.objects.traverse((e,t)=>{t.events.forEach(e=>{"GameControl"===e.type&&(e.keyAssignments=[...e.keyAssignments,["run","⇧"],["none","Ctrl"]])})})}(t),t.schema=43),r<99){un(t,vn),cn(t,vn),null===t.scene.publish.playCamera&&(t.scene.publish.playCamera=xt);let e=oe(t.scene.objects),r=t.scene.objects;t.scene.publish.playPage=Et,r.insertBefore(null,null,[{id:Et,data:{...la.defaultData,backgroundColor:t.scene.backgroundColor,fog:t.scene.fog,postprocessing:t.scene.postprocessing,ao:sn(t.scene.environment.ambientLight,"occlusion","aoFullRes","radius","bias","aoColor"),publish:{playCamera:t.scene.publish.playCamera,gameControlObject:t.scene.publish.gameControlObject},shadow:sn(t.scene.environment.ambientLight,"softShadowQuality"),globalPhysics:{...Br.defaultData,...sn(t.scene.environment,"usePhysics","gravity")},camera:oe(t.scene.ownerCamera)??la.defaultData.camera,name:"Scene"},children:[]}]);for(let t of e)t.id!==ga.TRASH_CAN_ID&&r.move(Et,t.fi,t.id);let a=0,n=0;t.shared.penumbraSize&&t.scene.objects.traverse((e,r)=>{"DirectionalLight"===r.type?(r.penumbraSize=t.shared.penumbraSize[Math.min(a,2)],a+=1):"SpotLight"===r.type&&(r.penumbraSize=t.shared.penumbraSize[3+Math.min(n,1)],n+=1),(void 0===r.physics||null===r.physics)&&"Instance"!==r.type&&(r.physics={},Object.assign(r.physics,Ft.defaultData)),void 0!==r.physics&&null!==r.physics&&(r.physics.enabled=r.collision??"visibility",delete r.collision)}),t.schema=99}}(t,r),r<100&&(void 0===t.scene.publish.joystickSizeAndXYOffset&&(t.scene.publish.joystickSizeAndXYOffset=fa.defaultData.joystickSizeAndXYOffset),t.schema=100),r<101&&(un(t,Un),cn(t,Un),t.schema=101),r<102&&(function(e){e.scene.objects.traverse((e,t)=>{let r=t.geometry;r&&"PathGeometry"===r.type&&(r.extrusion.capType="flat",r.extrusion.bevel=50,r.extrusion.bevelSides=6,"Custom"===r.extrusion.shape.type&&(r.extrusion.shape.shapeQuality="low"))})}(t),t.schema=102),r<104&&(t.shared.catelogs=new g,t.shared.lib=ja.defaultData(),t.schema=104),r<105&&(function(e){e.shared.variables=l({},g.prototype)}(t),t.scene.objects.traverse((e,t)=>{Kn(t)}),t.schema=105);for(let e of Object.values(t.shared.lib.components))Zn(e);if(r<106&&(function(e){let t=oe(e.shared.variables);e.shared.variables=l(Object.entries(t??{}).map(([e,t],r)=>({fi:r,id:e,data:t})),j.prototype)}(t),t.schema=106),r<107&&(t.shared.lib.variables=ja.defaultData().variables,t.schema=107),r<109&&(function(e){e.shared.particles=l({},g.prototype),e.shared.lib&&(e.shared.lib.particles=ja.defaultData().particles)}(t),t.schema=109),r<110&&(function(e){e.scene.objects.traverse((e,t)=>{"Particle"===t.type&&"number"==typeof t.renderMaterial.size&&Object.assign(t.renderMaterial,{size:[t.renderMaterial.size,t.renderMaterial.size]})})}(t),t.schema=110),r<111&&(t.scene.objects.traverse((e,t)=>{!function(e){Array.isArray(oe(e.events))&&e.events?.forEach(e=>{"disabled"in e||(e.disabled=!1),("MouseDown"===e.type||"MouseUp"===e.type||"MousePress"===e.type)&&(e.mode=e.mode||"Object")})}(t)}),t.schema=111),r<112&&(function(e){e.scene.objects.traverse((e,t)=>{"Page"===t.type&&(t.postprocessing.depthOfField.focusDistance=100,t.postprocessing.depthOfField.focalLength=20,t.postprocessing.depthOfField.bokehScale=5)})}(t),t.schema=112),r<113&&(function(e){e.scene.objects.traverse((e,t)=>{!1!==Array.isArray(oe(t.events))&&t.events?.forEach(e=>{let t=e.runMode;"MouseDown"===e.type||"MouseUp"===e.type||"KeyDown"===e.type||"KeyUp"===e.type||"Collision"===e.type||"Trigger"===e.type?e.actions?.forEach(e=>{"Transition"===e.type&&(e.runMode=t??"Repeat"),("Animation"===e.type&&"runMode"in e||"SwitchCamera"===e.type)&&(e.runMode="Toggle"===t?"Toggle":"Normal")}):"MouseHover"===e.type||"MousePress"===e.type||"KeyPress"===e.type?e.actions?.forEach(e=>{("Transition"===e.type||"Animation"===e.type&&"runMode"in e||"SwitchCamera"===e.type)&&(e.runMode="Toggle")}):"GameControl"===e.type?(delete e.actions,Object.keys(e.gameActions).forEach(t=>{e.gameActions[t]?.forEach(e=>{"Transition"===e.type&&(e.runMode="Repeat"),"Animation"===e.type&&"runMode"in e&&(e.runMode="Normal")})})):"DragDrop"===e.type?(delete e.actions,e.dragDropActions?.drag?.forEach(e=>{("Transition"===e.type||"Animation"===e.type&&"runMode"in e||"SwitchCamera"===e.type)&&(e.runMode="Toggle")}),e.dragDropActions?.drop?.forEach(e=>{("Transition"===e.type||"Animation"===e.type&&"runMode"in e||"SwitchCamera"===e.type)&&(e.runMode="Toggle")})):"Resize"===e.type?(delete e.actions,e.breakpoints?.forEach(e=>{e.actions?.forEach(e=>{("Transition"===e.type||"Animation"===e.type&&"runMode"in e||"SwitchCamera"===e.type)&&(e.runMode="Toggle")})})):"Start"===e.type?e.actions?.forEach(e=>{"Transition"===e.type&&(e.runMode="Once"),("Animation"===e.type&&"runMode"in e||"SwitchCamera"===e.type)&&(e.runMode="Normal")}):"VariableChange"===e.type||"Scroll"===e.type?e.actions?.forEach(e=>{"Transition"===e.type&&(e.runMode="Repeat"),("Animation"===e.type&&"runMode"in e||"SwitchCamera"===e.type)&&(e.runMode="Normal")}):"Conditional"===e.type&&(delete e.actions,e.inActions?.forEach(e=>{"Transition"===e.type&&(e.runMode="Repeat"),("Animation"===e.type&&"runMode"in e||"SwitchCamera"===e.type)&&(e.runMode="Normal")}),e.outActions?.forEach(e=>{"Transition"===e.type&&(e.runMode="Repeat"),("Animation"===e.type&&"runMode"in e||"SwitchCamera"===e.type)&&(e.runMode="Normal")}))})})}(t),t.schema=113),r<114&&(void 0===t.scene.publish.settings.web.imageQuality&&(t.scene.publish.settings.web.imageQuality=70),t.schema=114),r<115&&(function(e){e.shared.userAPIs=l({},g.prototype),e.shared.userWebhooks=l({},g.prototype),e.shared.lib&&(e.shared.lib.userAPIs=ja.defaultData().userAPIs,e.shared.lib.userWebhooks=ja.defaultData().userWebhooks)}(t),t.schema=115),r<116&&(function(e){void 0===e.scene.publish.settings.videoStatic&&(e.scene.publish.settings.videoStatic=fa.defaultData.settings.videoStatic)}(t),t.schema=116),r<117&&(void 0===t.scene.publish.settings.web.pixelRatioMobile&&(t.scene.publish.settings.web.pixelRatioMobile=0),void 0===t.scene.publish.settings.web.pixelRatioDesktop&&(t.scene.publish.settings.web.pixelRatioDesktop=0),t.schema=117),r<118&&(t.shared.timelineAnimations=l({},g.prototype),t.scene.objects.traverse((e,t)=>{Jn(t)}),t.schema=118),r<119&&(t.scene.publish.settings.videoStatic.format=Pa.defaultData.scene.publish.settings.videoStatic.format,t.scene.publish.settings.videoStatic.imageFormat=Pa.defaultData.scene.publish.settings.videoStatic.imageFormat,t.schema=119),r<120&&(t.scene.publish.settings.image.colorSpace="display-p3",t.scene.publish.settings.videoStatic.colorSpace="display-p3",t.schema=120),r<121&&(t.scene.objects.traverse((e,t)=>{li(t),"Page"===t.type&&void 0!==t.camera&&li(t.camera)}),t.schema=121),r<122&&(delete t.scene.publish.settings.video,t.scene.publish.orbitControls.rotationSpeed=Pa.defaultData.scene.publish.orbitControls.rotationSpeed,t.schema=122),r<123&&(t.scene.objects.traverse((e,t)=>{"Page"===t.type&&void 0===t.sky&&(t.sky=Ir.defaultData)}),t.schema=123),r<124&&(r>=123&&t.scene.objects.traverse((e,t)=>{let r=t.sky;"Page"===t.type&&void 0!==r&&("number"==typeof r.exposure&&(r.exposure=Math.round(r.exposure/5e-4*1e4)/1e4),void 0===r.lighting&&(r.lighting=Ir.defaultData.lighting))}),t.schema=124),r<125&&(t.scene.objects.traverse((e,t)=>{let r=t.sky;"Page"===t.type&&void 0!==r&&void 0===r.lightingIntensity&&(r.lightingIntensity=Ir.defaultData.lightingIntensity)}),t.schema=125),r<126&&(t.scene.objects.traverse((e,t)=>{let r=t.sky;"Page"===t.type&&void 0!==r&&(void 0===r.mode&&(r.mode="physical"),void 0===r.hdri?r.hdri={...Ir.defaultData.hdri}:(void 0===r.hdri.blur&&(r.hdri.blur=Ir.defaultData.hdri.blur),Array.isArray(r.hdri.rotation)&&(r.hdri.rotation=r.hdri.rotation[1]??0)))}),t.schema=126),r<127&&(t.scene.objects.traverse((e,t)=>{let r=t.sky;"Page"===t.type&&void 0!==r?.hdri&&void 0===r.hdri.showBackground&&(r.hdri.showBackground=!0)}),t.schema=127),r<128&&(t.scene.objects.traverse((e,t)=>{let r=t.sky;"Page"===t.type&&void 0!==r&&void 0===r.lightingQuality&&(r.lightingQuality="full")}),t.schema=128),r<129&&(t.scene.objects.traverse((e,t)=>{if("Page"===t.type){void 0===t.camera&&(t.camera=la.defaultData.camera);let e=t.camera;e.far=1e5,e.perspective?e.perspective.near=70:e.perspective={near:70,fov:45,zoom:1}}}),t.schema=129),r<130&&(Yn(t,$n),t.schema=130),r<131&&(function(e){e.scene.objects.traverse((e,t)=>{let r=t.states;if(!r)return;let a=t.timelineAnimations,n=[];r.forEach((e,t)=>{(e.isAnimation||a?.[t])&&n.push(t)}),n.forEach(e=>r.delete(e))})}(t),function(e){let t=e.shared,r=t.timelineAnimations;if(!r)return;let a=e.scene.objects,n=a.unproxy().find(e=>"Page"===e.data.type)?.id;for(let[e,t]of Object.entries(r)){let r=l({},g.prototype),i=0,o=Boolean(t.loop);for(let[e,n]of Object.entries(t.mapping??{})){let t=a.data(e)?.timelineAnimations?.[n];!t||(i=Math.max(i,t.to??0),o=o||Boolean(t.loop),r[e]={id:e,keyframes:ei(t.properties?.unproxy())})}let s=t.page??n,c=s?a.data(s):void 0;c&&"Page"===c.type&&((c.timelines??(c.timelines=l({},g.prototype)))[e]={id:e,name:t.name,duration:i||5,...o?{loop:o}:{},objectTimelines:r})}delete t.timelineAnimations,a.traverse((e,t)=>{delete t.timelineAnimations})}(t),si(t,ri),si(t,oi),t.schema=131),r<132&&(t.scene.objects.traverse((e,t)=>Vn(t)),t.schema=132),r<133){let e=function(e){return t=>e.get(t)?.data?.value}(t.shared.variables);t.scene.objects.traverse((t,r)=>ci(r,e)),t.schema=133}}}export{o as a,s as b,l as c,p as d,O as e,j as f,C as g,L as h,_ as i,R as j,k,ne as l,ie as m,ee as n,ht as o,La as p,on as q,Ba as r,Na as s,Ka as t,$a as u,Qa as v,xt as w,Tt as x,It as y,mt as z,gt as A,vt as B,Ot as C,At as D,Ct as E,Ht as F,_t as G,kt as H,Nt as I,ut as J,ft as K,Pr as L,Nr as M,Kr as N,qr as O,Wr as P,Xr as Q,Zr as R,Gt as S,er as T,Zt as U,Qt as V,ir as W,or as X,sr as Y,lr as Z,cr as _,ur as $,dr as aa,fr as ba,pr as ca,tr as da,nr as ea,gr as fa,br as ga,yr as ha,mr as ia,wr as ja,jr as ka,Cr as la,Dr as ma,Or as na,xr as oa,Er as pa,Yr as qa,_r as ra,Rr as sa,Br as ta,Ta as ua,$r as va,Qr as wa,aa as xa,na as ya,ia as za,oa as Aa,sa as Ba,la as Ca,ua as Da,ma as Ea,va as Fa,Da as Ga,Ca as Ha,Pa as Ia,Ia as Ja,Ea as Ka,ka as La,an as Ma,nn as Na,Tn as Oa,In as Pa,Bn as Qa,qn as Ra,Wn as Sa,Xn as Ta,Zn as Ua,Yn as Va,ui as Wa,di as Xa};