@splinetool/runtime 2.0.3 → 2.0.5

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 (334) hide show
  1. package/build/hana-ui.js +46 -31
  2. package/build/hana-ui.js.br +0 -0
  3. package/build/hana-ui.js.gz +0 -0
  4. package/build/hana-ui.wasm +0 -0
  5. package/build/hana-ui.wasm.br +0 -0
  6. package/build/hana-ui.wasm.gz +0 -0
  7. package/build/runtime-aiAssistant-RMA2DMFU.js +1 -0
  8. package/build/runtime-aiAssistant-RMA2DMFU.js.br +0 -0
  9. package/build/runtime-aiAssistant-RMA2DMFU.js.gz +0 -0
  10. package/build/runtime-apiServices-KA4FEP5Y.js +1 -0
  11. package/build/runtime-apiServices-KA4FEP5Y.js.br +0 -0
  12. package/build/runtime-apiServices-KA4FEP5Y.js.gz +0 -0
  13. package/build/{runtime-audio-Y3GYW4YQ.js → runtime-audio-BQSRM3W2.js} +1 -1
  14. package/build/runtime-audio-BQSRM3W2.js.br +0 -0
  15. package/build/runtime-audio-BQSRM3W2.js.gz +0 -0
  16. package/build/{runtime-chunk-RAAW7WHN.js → runtime-chunk-243VQV5T.js} +1 -1
  17. package/build/runtime-chunk-243VQV5T.js.br +0 -0
  18. package/build/runtime-chunk-243VQV5T.js.gz +0 -0
  19. package/build/{runtime-chunk-W7THORYR.js → runtime-chunk-2657LZHS.js} +1 -1
  20. package/build/runtime-chunk-2657LZHS.js.br +0 -0
  21. package/build/runtime-chunk-2657LZHS.js.gz +0 -0
  22. package/build/{runtime-chunk-Z5OH244S.js → runtime-chunk-5XUI4Z6R.js} +1 -1
  23. package/build/runtime-chunk-5XUI4Z6R.js.br +0 -0
  24. package/build/runtime-chunk-5XUI4Z6R.js.gz +0 -0
  25. package/build/{runtime-chunk-MC3OVJQU.js → runtime-chunk-6WHNEYAL.js} +1 -1
  26. package/build/runtime-chunk-6WHNEYAL.js.br +0 -0
  27. package/build/runtime-chunk-6WHNEYAL.js.gz +0 -0
  28. package/build/{runtime-chunk-D2IFC55F.js → runtime-chunk-CDZQF4NV.js} +1 -1
  29. package/build/runtime-chunk-CDZQF4NV.js.br +0 -0
  30. package/build/runtime-chunk-CDZQF4NV.js.gz +0 -0
  31. package/build/{runtime-chunk-ZHNGVKGZ.js → runtime-chunk-DNWPGXEC.js} +1 -1
  32. package/build/runtime-chunk-DNWPGXEC.js.br +0 -0
  33. package/build/runtime-chunk-DNWPGXEC.js.gz +0 -0
  34. package/build/{runtime-chunk-TQBPVLGB.js → runtime-chunk-DSGSWXCQ.js} +1 -1
  35. package/build/runtime-chunk-DSGSWXCQ.js.br +0 -0
  36. package/build/runtime-chunk-DSGSWXCQ.js.gz +0 -0
  37. package/build/{runtime-chunk-6UQ4Z4JG.js → runtime-chunk-DZOSSY2K.js} +1 -1
  38. package/build/runtime-chunk-DZOSSY2K.js.br +0 -0
  39. package/build/runtime-chunk-DZOSSY2K.js.gz +0 -0
  40. package/build/{runtime-chunk-BCJEHBXX.js → runtime-chunk-EGI7ABC6.js} +1 -1
  41. package/build/runtime-chunk-EGI7ABC6.js.br +0 -0
  42. package/build/runtime-chunk-EGI7ABC6.js.gz +0 -0
  43. package/build/{runtime-chunk-D6NWJJTR.js → runtime-chunk-F7OUYIT6.js} +1 -1
  44. package/build/runtime-chunk-F7OUYIT6.js.br +0 -0
  45. package/build/runtime-chunk-F7OUYIT6.js.gz +0 -0
  46. package/build/{runtime-chunk-4FAMJWEB.js → runtime-chunk-IGBRWWDI.js} +1 -1
  47. package/build/runtime-chunk-IGBRWWDI.js.br +0 -0
  48. package/build/runtime-chunk-IGBRWWDI.js.gz +0 -0
  49. package/build/{runtime-chunk-Y2GFSK5L.js → runtime-chunk-IK4H7UNI.js} +1 -1
  50. package/build/runtime-chunk-IK4H7UNI.js.br +0 -0
  51. package/build/runtime-chunk-IK4H7UNI.js.gz +0 -0
  52. package/build/{runtime-chunk-SQKBNW2G.js → runtime-chunk-J4FFQBNR.js} +1 -1
  53. package/build/runtime-chunk-J4FFQBNR.js.br +0 -0
  54. package/build/runtime-chunk-J4FFQBNR.js.gz +0 -0
  55. package/build/runtime-chunk-LALFWESO.js +1 -0
  56. package/build/runtime-chunk-LALFWESO.js.br +0 -0
  57. package/build/runtime-chunk-LALFWESO.js.gz +0 -0
  58. package/build/{runtime-chunk-PXPQZ7SX.js → runtime-chunk-NIDXMSZY.js} +1 -1
  59. package/build/runtime-chunk-NIDXMSZY.js.br +0 -0
  60. package/build/runtime-chunk-NIDXMSZY.js.gz +0 -0
  61. package/build/{runtime-chunk-U5ACSO5E.js → runtime-chunk-OTAMLWBD.js} +1 -1
  62. package/build/runtime-chunk-OTAMLWBD.js.br +0 -0
  63. package/build/runtime-chunk-OTAMLWBD.js.gz +0 -0
  64. package/build/{runtime-chunk-NGWM5WPD.js → runtime-chunk-P2QJHRIH.js} +1 -1
  65. package/build/runtime-chunk-P2QJHRIH.js.br +0 -0
  66. package/build/runtime-chunk-P2QJHRIH.js.gz +0 -0
  67. package/build/runtime-chunk-PLJ25O2X.js +1 -0
  68. package/build/runtime-chunk-PLJ25O2X.js.br +0 -0
  69. package/build/runtime-chunk-PLJ25O2X.js.gz +0 -0
  70. package/build/runtime-chunk-PRQYD4EW.js +1 -0
  71. package/build/runtime-chunk-PRQYD4EW.js.br +0 -0
  72. package/build/runtime-chunk-PRQYD4EW.js.gz +0 -0
  73. package/build/runtime-chunk-QPB2TL3G.js +1 -0
  74. package/build/runtime-chunk-QPB2TL3G.js.br +0 -0
  75. package/build/runtime-chunk-QPB2TL3G.js.gz +0 -0
  76. package/build/runtime-chunk-QVC5UDJO.js +1 -0
  77. package/build/runtime-chunk-QVC5UDJO.js.br +0 -0
  78. package/build/runtime-chunk-QVC5UDJO.js.gz +0 -0
  79. package/build/{runtime-chunk-MVRGHRTL.js → runtime-chunk-RSPDUS6G.js} +1 -1
  80. package/build/runtime-chunk-RSPDUS6G.js.br +0 -0
  81. package/build/runtime-chunk-RSPDUS6G.js.gz +0 -0
  82. package/build/{runtime-chunk-EXHPAC6T.js → runtime-chunk-RWL6KR5S.js} +1 -1
  83. package/build/runtime-chunk-RWL6KR5S.js.br +0 -0
  84. package/build/runtime-chunk-RWL6KR5S.js.gz +0 -0
  85. package/build/{runtime-chunk-ZULFQKQK.js → runtime-chunk-SXDO5LXF.js} +1 -1
  86. package/build/runtime-chunk-SXDO5LXF.js.br +0 -0
  87. package/build/runtime-chunk-SXDO5LXF.js.gz +0 -0
  88. package/build/{runtime-chunk-Q4H7PFTE.js → runtime-chunk-U6S2BBR7.js} +1 -1
  89. package/build/runtime-chunk-U6S2BBR7.js.br +0 -0
  90. package/build/runtime-chunk-U6S2BBR7.js.gz +0 -0
  91. package/build/{runtime-chunk-G5XH52BM.js → runtime-chunk-V3U2TPGQ.js} +1 -1
  92. package/build/runtime-chunk-V3U2TPGQ.js.br +0 -0
  93. package/build/runtime-chunk-V3U2TPGQ.js.gz +0 -0
  94. package/build/{runtime-chunk-32ZE2X4C.js → runtime-chunk-Y365A3K5.js} +1 -1
  95. package/build/runtime-chunk-Y365A3K5.js.br +0 -0
  96. package/build/runtime-chunk-Y365A3K5.js.gz +0 -0
  97. package/build/runtime-chunk-YWT6AWL4.js +1 -0
  98. package/build/runtime-chunk-YWT6AWL4.js.br +0 -0
  99. package/build/runtime-chunk-YWT6AWL4.js.gz +0 -0
  100. package/build/{runtime-classicRuntime-IFIIFBNS.js → runtime-classicRuntime-BD2WFYXF.js} +1 -1
  101. package/build/runtime-classicRuntime-BD2WFYXF.js.br +0 -0
  102. package/build/runtime-classicRuntime-BD2WFYXF.js.gz +0 -0
  103. package/build/runtime-cloners-ST66KGZH.js +1 -0
  104. package/build/runtime-cloners-ST66KGZH.js.br +1 -0
  105. package/build/runtime-cloners-ST66KGZH.js.gz +0 -0
  106. package/build/{runtime-components-LNJJ3QLB.js → runtime-components-RLXFVT5A.js} +1 -1
  107. package/build/runtime-components-RLXFVT5A.js.br +0 -0
  108. package/build/runtime-components-RLXFVT5A.js.gz +0 -0
  109. package/build/runtime-conditional-DCOFCW5I.js +1 -0
  110. package/build/runtime-conditional-DCOFCW5I.js.br +0 -0
  111. package/build/runtime-conditional-DCOFCW5I.js.gz +0 -0
  112. package/build/{runtime-createDestroy-DWI7C4WO.js → runtime-createDestroy-4PG4ZWLI.js} +1 -1
  113. package/build/runtime-createDestroy-4PG4ZWLI.js.br +0 -0
  114. package/build/runtime-createDestroy-4PG4ZWLI.js.gz +0 -0
  115. package/build/{runtime-dragDrop-46CHKTIE.js → runtime-dragDrop-CTXPZ6OW.js} +1 -1
  116. package/build/runtime-dragDrop-CTXPZ6OW.js.br +0 -0
  117. package/build/runtime-dragDrop-CTXPZ6OW.js.gz +0 -0
  118. package/build/runtime-gameControls-LUALVLF5.js +1 -0
  119. package/build/runtime-gameControls-LUALVLF5.js.br +0 -0
  120. package/build/runtime-gameControls-LUALVLF5.js.gz +0 -0
  121. package/build/runtime-hair-JNRT3G3X.js +1 -0
  122. package/build/runtime-hair-JNRT3G3X.js.br +1 -0
  123. package/build/runtime-hair-JNRT3G3X.js.gz +0 -0
  124. package/build/{runtime-mergeStaticGeometries-O5XKFANJ.js → runtime-mergeStaticGeometries-QDKIDV27.js} +1 -1
  125. package/build/runtime-mergeStaticGeometries-QDKIDV27.js.br +0 -0
  126. package/build/runtime-mergeStaticGeometries-QDKIDV27.js.gz +0 -0
  127. package/build/{runtime-miscActions-IRARI4E6.js → runtime-miscActions-FCQTXDEH.js} +1 -1
  128. package/build/runtime-miscActions-FCQTXDEH.js.br +0 -0
  129. package/build/runtime-miscActions-FCQTXDEH.js.gz +0 -0
  130. package/build/runtime-mouseHover-GP5TEPLG.js +1 -0
  131. package/build/runtime-mouseHover-GP5TEPLG.js.br +0 -0
  132. package/build/runtime-mouseHover-GP5TEPLG.js.gz +0 -0
  133. package/build/{runtime-particles-INK4LA4P.js → runtime-particles-VMYZZSAL.js} +1 -1
  134. package/build/runtime-particles-VMYZZSAL.js.br +0 -0
  135. package/build/runtime-particles-VMYZZSAL.js.gz +0 -0
  136. package/build/{runtime-paths-LRTW3RNL.js → runtime-paths-TGU7JOOY.js} +1 -1
  137. package/build/runtime-paths-TGU7JOOY.js.br +0 -0
  138. package/build/runtime-paths-TGU7JOOY.js.gz +0 -0
  139. package/build/runtime-resize-O3Y2XS2Q.js +1 -0
  140. package/build/runtime-resize-O3Y2XS2Q.js.br +0 -0
  141. package/build/runtime-resize-O3Y2XS2Q.js.gz +0 -0
  142. package/build/{runtime-sceneTransition-X7RGRC3W.js → runtime-sceneTransition-4DDTFDJN.js} +1 -1
  143. package/build/runtime-sceneTransition-4DDTFDJN.js.br +0 -0
  144. package/build/runtime-sceneTransition-4DDTFDJN.js.gz +0 -0
  145. package/build/{runtime-scroll-VK7XXJPE.js → runtime-scroll-ET44H7JC.js} +1 -1
  146. package/build/runtime-scroll-ET44H7JC.js.br +0 -0
  147. package/build/runtime-scroll-ET44H7JC.js.gz +0 -0
  148. package/build/runtime-shapeBlends-3FCSH6PN.js +1 -0
  149. package/build/runtime-shapeBlends-3FCSH6PN.js.br +2 -0
  150. package/build/runtime-shapeBlends-3FCSH6PN.js.gz +0 -0
  151. package/build/{runtime-text-KC66JGLC.js → runtime-text-UQIUL5X6.js} +1 -1
  152. package/build/runtime-text-UQIUL5X6.js.br +0 -0
  153. package/build/runtime-text-UQIUL5X6.js.gz +0 -0
  154. package/build/{runtime-textInputs-Y7CREUMS.js → runtime-textInputs-E72WPYQU.js} +1 -1
  155. package/build/runtime-textInputs-E72WPYQU.js.br +0 -0
  156. package/build/runtime-textInputs-E72WPYQU.js.gz +0 -0
  157. package/build/runtime-timeline-2VAMFUOE.js +1 -0
  158. package/build/runtime-timeline-2VAMFUOE.js.br +0 -0
  159. package/build/runtime-timeline-2VAMFUOE.js.gz +0 -0
  160. package/build/{runtime-tracking-FA45SGZJ.js → runtime-tracking-E72XXGER.js} +1 -1
  161. package/build/runtime-tracking-E72XXGER.js.br +0 -0
  162. package/build/runtime-tracking-E72XXGER.js.gz +0 -0
  163. package/build/{runtime-transitions-A7UP5OMB.js → runtime-transitions-JOHZRI2L.js} +1 -1
  164. package/build/runtime-transitions-JOHZRI2L.js.br +0 -0
  165. package/build/runtime-transitions-JOHZRI2L.js.gz +0 -0
  166. package/build/runtime-ui2d-PJKKRE32.js +1 -0
  167. package/build/runtime-ui2d-PJKKRE32.js.br +0 -0
  168. package/build/runtime-ui2d-PJKKRE32.js.gz +0 -0
  169. package/build/{runtime-variables-U36KPJ5V.js → runtime-variables-Q6Q2JCGI.js} +1 -1
  170. package/build/runtime-variables-Q6Q2JCGI.js.br +0 -0
  171. package/build/runtime-variables-Q6Q2JCGI.js.gz +0 -0
  172. package/build/{runtime-vectorShapes-MA6PKTF5.js → runtime-vectorShapes-FKC6EQWI.js} +1 -1
  173. package/build/runtime-vectorShapes-FKC6EQWI.js.br +0 -0
  174. package/build/runtime-vectorShapes-FKC6EQWI.js.gz +0 -0
  175. package/build/{runtime-video-7GHZOZRJ.js → runtime-video-DUDXGADJ.js} +1 -1
  176. package/build/runtime-video-DUDXGADJ.js.br +0 -0
  177. package/build/runtime-video-DUDXGADJ.js.gz +0 -0
  178. package/build/runtime-webgpu-TBHSGHNI.js +1 -0
  179. package/build/runtime-webgpu-TBHSGHNI.js.br +0 -0
  180. package/build/runtime-webgpu-TBHSGHNI.js.gz +0 -0
  181. package/build/runtime.cjs +325 -325
  182. package/build/runtime.js +1 -1
  183. package/build/runtime.js.br +0 -0
  184. package/build/runtime.js.gz +0 -0
  185. package/build/runtime.standalone.js +1 -1
  186. package/build/runtime.standalone.js.br +0 -0
  187. package/build/runtime.standalone.js.gz +0 -0
  188. package/build/runtime.standalone.webgl.js +1 -1
  189. package/build/runtime.standalone.webgl.js.br +0 -0
  190. package/build/runtime.standalone.webgl.js.gz +0 -0
  191. package/build/runtime.standalone.webgpu.js +1 -1
  192. package/build/runtime.standalone.webgpu.js.br +0 -0
  193. package/build/runtime.standalone.webgpu.js.gz +0 -0
  194. package/build/runtime.standalone.webgpu.micro.js +1 -1
  195. package/build/runtime.standalone.webgpu.micro.js.br +0 -0
  196. package/build/runtime.standalone.webgpu.micro.js.gz +0 -0
  197. package/build/runtime.standalone.webgpu.min.js +1 -1
  198. package/build/runtime.standalone.webgpu.min.js.br +0 -0
  199. package/build/runtime.standalone.webgpu.min.js.gz +0 -0
  200. package/package.json +1 -1
  201. package/build/runtime-aiAssistant-XJVJ7TQB.js +0 -1
  202. package/build/runtime-aiAssistant-XJVJ7TQB.js.br +0 -0
  203. package/build/runtime-aiAssistant-XJVJ7TQB.js.gz +0 -0
  204. package/build/runtime-apiServices-KAO5SQJZ.js +0 -1
  205. package/build/runtime-apiServices-KAO5SQJZ.js.br +0 -0
  206. package/build/runtime-apiServices-KAO5SQJZ.js.gz +0 -0
  207. package/build/runtime-audio-Y3GYW4YQ.js.br +0 -0
  208. package/build/runtime-audio-Y3GYW4YQ.js.gz +0 -0
  209. package/build/runtime-chunk-32ZE2X4C.js.br +0 -0
  210. package/build/runtime-chunk-32ZE2X4C.js.gz +0 -0
  211. package/build/runtime-chunk-4FAMJWEB.js.br +0 -0
  212. package/build/runtime-chunk-4FAMJWEB.js.gz +0 -0
  213. package/build/runtime-chunk-6UQ4Z4JG.js.br +0 -0
  214. package/build/runtime-chunk-6UQ4Z4JG.js.gz +0 -0
  215. package/build/runtime-chunk-BCJEHBXX.js.br +0 -0
  216. package/build/runtime-chunk-BCJEHBXX.js.gz +0 -0
  217. package/build/runtime-chunk-D2IFC55F.js.br +0 -0
  218. package/build/runtime-chunk-D2IFC55F.js.gz +0 -0
  219. package/build/runtime-chunk-D6NWJJTR.js.br +0 -0
  220. package/build/runtime-chunk-D6NWJJTR.js.gz +0 -0
  221. package/build/runtime-chunk-EXHPAC6T.js.br +0 -0
  222. package/build/runtime-chunk-EXHPAC6T.js.gz +0 -0
  223. package/build/runtime-chunk-G5XH52BM.js.br +0 -0
  224. package/build/runtime-chunk-G5XH52BM.js.gz +0 -0
  225. package/build/runtime-chunk-MC3OVJQU.js.br +0 -0
  226. package/build/runtime-chunk-MC3OVJQU.js.gz +0 -0
  227. package/build/runtime-chunk-MM75L5X4.js +0 -1
  228. package/build/runtime-chunk-MM75L5X4.js.br +0 -0
  229. package/build/runtime-chunk-MM75L5X4.js.gz +0 -0
  230. package/build/runtime-chunk-MVRGHRTL.js.br +0 -0
  231. package/build/runtime-chunk-MVRGHRTL.js.gz +0 -0
  232. package/build/runtime-chunk-NGWM5WPD.js.br +0 -0
  233. package/build/runtime-chunk-NGWM5WPD.js.gz +0 -0
  234. package/build/runtime-chunk-NRJDJMQZ.js +0 -1
  235. package/build/runtime-chunk-NRJDJMQZ.js.br +0 -0
  236. package/build/runtime-chunk-NRJDJMQZ.js.gz +0 -0
  237. package/build/runtime-chunk-PXPQZ7SX.js.br +0 -0
  238. package/build/runtime-chunk-PXPQZ7SX.js.gz +0 -0
  239. package/build/runtime-chunk-Q4H7PFTE.js.br +0 -0
  240. package/build/runtime-chunk-Q4H7PFTE.js.gz +0 -0
  241. package/build/runtime-chunk-QFGFABLH.js +0 -1
  242. package/build/runtime-chunk-QFGFABLH.js.br +0 -0
  243. package/build/runtime-chunk-QFGFABLH.js.gz +0 -0
  244. package/build/runtime-chunk-RAAW7WHN.js.br +0 -0
  245. package/build/runtime-chunk-RAAW7WHN.js.gz +0 -0
  246. package/build/runtime-chunk-SQKBNW2G.js.br +0 -0
  247. package/build/runtime-chunk-SQKBNW2G.js.gz +0 -0
  248. package/build/runtime-chunk-TQBPVLGB.js.br +0 -0
  249. package/build/runtime-chunk-TQBPVLGB.js.gz +0 -0
  250. package/build/runtime-chunk-U5ACSO5E.js.br +0 -0
  251. package/build/runtime-chunk-U5ACSO5E.js.gz +0 -0
  252. package/build/runtime-chunk-W7THORYR.js.br +0 -0
  253. package/build/runtime-chunk-W7THORYR.js.gz +0 -0
  254. package/build/runtime-chunk-XTKPUDRE.js +0 -1
  255. package/build/runtime-chunk-XTKPUDRE.js.br +0 -0
  256. package/build/runtime-chunk-XTKPUDRE.js.gz +0 -0
  257. package/build/runtime-chunk-XV2ZLRKD.js +0 -1
  258. package/build/runtime-chunk-XV2ZLRKD.js.br +0 -0
  259. package/build/runtime-chunk-XV2ZLRKD.js.gz +0 -0
  260. package/build/runtime-chunk-Y2GFSK5L.js.br +0 -0
  261. package/build/runtime-chunk-Y2GFSK5L.js.gz +0 -0
  262. package/build/runtime-chunk-Z5OH244S.js.br +0 -0
  263. package/build/runtime-chunk-Z5OH244S.js.gz +0 -0
  264. package/build/runtime-chunk-ZHNGVKGZ.js.br +0 -0
  265. package/build/runtime-chunk-ZHNGVKGZ.js.gz +0 -0
  266. package/build/runtime-chunk-ZLW3UWOA.js +0 -1
  267. package/build/runtime-chunk-ZLW3UWOA.js.br +0 -0
  268. package/build/runtime-chunk-ZLW3UWOA.js.gz +0 -0
  269. package/build/runtime-chunk-ZULFQKQK.js.br +0 -0
  270. package/build/runtime-chunk-ZULFQKQK.js.gz +0 -0
  271. package/build/runtime-classicRuntime-IFIIFBNS.js.br +0 -0
  272. package/build/runtime-classicRuntime-IFIIFBNS.js.gz +0 -0
  273. package/build/runtime-cloners-WEF7XIM4.js +0 -1
  274. package/build/runtime-cloners-WEF7XIM4.js.br +0 -2
  275. package/build/runtime-cloners-WEF7XIM4.js.gz +0 -0
  276. package/build/runtime-components-LNJJ3QLB.js.br +0 -0
  277. package/build/runtime-components-LNJJ3QLB.js.gz +0 -0
  278. package/build/runtime-conditional-3A423CXW.js +0 -1
  279. package/build/runtime-conditional-3A423CXW.js.br +0 -0
  280. package/build/runtime-conditional-3A423CXW.js.gz +0 -0
  281. package/build/runtime-createDestroy-DWI7C4WO.js.br +0 -0
  282. package/build/runtime-createDestroy-DWI7C4WO.js.gz +0 -0
  283. package/build/runtime-dragDrop-46CHKTIE.js.br +0 -0
  284. package/build/runtime-dragDrop-46CHKTIE.js.gz +0 -0
  285. package/build/runtime-gameControls-YA2YP4UH.js +0 -1
  286. package/build/runtime-gameControls-YA2YP4UH.js.br +0 -0
  287. package/build/runtime-gameControls-YA2YP4UH.js.gz +0 -0
  288. package/build/runtime-hair-XVWLJEZC.js +0 -1
  289. package/build/runtime-hair-XVWLJEZC.js.br +0 -3
  290. package/build/runtime-hair-XVWLJEZC.js.gz +0 -0
  291. package/build/runtime-mergeStaticGeometries-O5XKFANJ.js.br +0 -0
  292. package/build/runtime-mergeStaticGeometries-O5XKFANJ.js.gz +0 -0
  293. package/build/runtime-miscActions-IRARI4E6.js.br +0 -0
  294. package/build/runtime-miscActions-IRARI4E6.js.gz +0 -0
  295. package/build/runtime-mouseHover-3LVJJIFG.js +0 -1
  296. package/build/runtime-mouseHover-3LVJJIFG.js.br +0 -0
  297. package/build/runtime-mouseHover-3LVJJIFG.js.gz +0 -0
  298. package/build/runtime-particles-INK4LA4P.js.br +0 -0
  299. package/build/runtime-particles-INK4LA4P.js.gz +0 -0
  300. package/build/runtime-paths-LRTW3RNL.js.br +0 -0
  301. package/build/runtime-paths-LRTW3RNL.js.gz +0 -0
  302. package/build/runtime-resize-4OIVU46M.js +0 -1
  303. package/build/runtime-resize-4OIVU46M.js.br +0 -0
  304. package/build/runtime-resize-4OIVU46M.js.gz +0 -0
  305. package/build/runtime-sceneTransition-X7RGRC3W.js.br +0 -0
  306. package/build/runtime-sceneTransition-X7RGRC3W.js.gz +0 -0
  307. package/build/runtime-scroll-VK7XXJPE.js.br +0 -0
  308. package/build/runtime-scroll-VK7XXJPE.js.gz +0 -0
  309. package/build/runtime-shapeBlends-VLITROES.js +0 -1
  310. package/build/runtime-shapeBlends-VLITROES.js.br +0 -2
  311. package/build/runtime-shapeBlends-VLITROES.js.gz +0 -0
  312. package/build/runtime-text-KC66JGLC.js.br +0 -0
  313. package/build/runtime-text-KC66JGLC.js.gz +0 -0
  314. package/build/runtime-textInputs-Y7CREUMS.js.br +0 -0
  315. package/build/runtime-textInputs-Y7CREUMS.js.gz +0 -0
  316. package/build/runtime-timeline-KTMKRAZU.js +0 -1
  317. package/build/runtime-timeline-KTMKRAZU.js.br +0 -0
  318. package/build/runtime-timeline-KTMKRAZU.js.gz +0 -0
  319. package/build/runtime-tracking-FA45SGZJ.js.br +0 -0
  320. package/build/runtime-tracking-FA45SGZJ.js.gz +0 -0
  321. package/build/runtime-transitions-A7UP5OMB.js.br +0 -0
  322. package/build/runtime-transitions-A7UP5OMB.js.gz +0 -0
  323. package/build/runtime-ui2d-XLYMHVMW.js +0 -1
  324. package/build/runtime-ui2d-XLYMHVMW.js.br +0 -0
  325. package/build/runtime-ui2d-XLYMHVMW.js.gz +0 -0
  326. package/build/runtime-variables-U36KPJ5V.js.br +0 -0
  327. package/build/runtime-variables-U36KPJ5V.js.gz +0 -0
  328. package/build/runtime-vectorShapes-MA6PKTF5.js.br +0 -0
  329. package/build/runtime-vectorShapes-MA6PKTF5.js.gz +0 -0
  330. package/build/runtime-video-7GHZOZRJ.js.br +0 -0
  331. package/build/runtime-video-7GHZOZRJ.js.gz +0 -0
  332. package/build/runtime-webgpu-JPQ4VPBY.js +0 -1
  333. package/build/runtime-webgpu-JPQ4VPBY.js.br +0 -0
  334. package/build/runtime-webgpu-JPQ4VPBY.js.gz +0 -0
@@ -0,0 +1 @@
1
+ import{a as t,b as e,c as i,d as a,e as n,f as s,h as r,i as o}from"./runtime-chunk-OTAMLWBD.js";import"./runtime-chunk-YWT6AWL4.js";import"./runtime-chunk-NTUTXO7Q.js";import{a as l}from"./runtime-chunk-R43XZP65.js";import{a as d}from"./runtime-chunk-J4FFQBNR.js";import{a as h,b as u}from"./runtime-chunk-IGBRWWDI.js";import"./runtime-chunk-DNWPGXEC.js";import"./runtime-chunk-FTVQTRM7.js";import{a as c}from"./runtime-chunk-2657LZHS.js";import"./runtime-chunk-F7OUYIT6.js";import"./runtime-chunk-6WHNEYAL.js";import"./runtime-chunk-CDZQF4NV.js";import{Y as m,ca as p}from"./runtime-chunk-LALFWESO.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{b as g,e as f}from"./runtime-chunk-QVC5UDJO.js";import"./runtime-chunk-PLJ25O2X.js";import{d as y}from"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import{g as v,h as x,i as M}from"./runtime-chunk-5XUI4Z6R.js";import{a as N}from"./runtime-chunk-TZCHGFVF.js";import{A as b,B as C,C as T,D as k,E as j,q as O,z as F}from"./runtime-chunk-OW6T4XFV.js";import{Bc as w,Cc as A}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var E=0;function L(){E++}function P(t,e){return(e.epoch!==E||e.t!==t.t||e.index!==t.index)&&(e.epoch=E,e.t=t.t,e.index=t.index,!0)}function D(t,e,i,a){if(e){let n={},s=[...e.keyframes??[]].sort((t,e)=>t.data.time-e.data.time);if("data"in t){let e=s[0];e&&i?.(e.data.value,t),n={index:[],t:[]};for(let t=0;t<s.length-1;t++){let e=s[t],i=s[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*s[0].data.time:0};n.t.push({...a,value:t%2==0?1:0,easing:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),n.index.push({...a,value:t,easing:"linear"})}if(s.length>1){let e={t:0,index:0},r={t:NaN,index:NaN};return{targets:e,...n,update:()=>{if(!P(e,r))return;let n=Math.ceil(e.index),o=n%2==0?e.t:1-e.t,l=s?.[Math.min(n,s.length-1)].data.value,d=s?.[Math.min(n,s.length-1)+1]?.data.value,h={},u={};if(Object.keys(l).length>0&&Object.keys(d).length>0)for(let e in t.data)if(e in l&&e in d){let t=I(l[e],d[e],o,a);void 0!==t&&(h[e]=t,u[e]={start:l,end:d,t:o})}i?.({...h},t,u)}}}}}}function I(t,e,i,a){if("string"==typeof t&&a&&(t=a.color(t)),"string"==typeof e&&a&&(e=a.color(e)),"number"==typeof t)return A.lerp(t,e,i);if(j.is(t))return j.lerp(t,e,i);if(k.is(t))return k.lerp(t,e,i);if(Array.isArray(t))return(t.length>e.length?e:t).map((a,n)=>{if(Array.isArray(a)){let a=t[n].length>e[n].length?e[n].length:t[n].length;return(4===a?C:3===a?b:F).lerp(t[n],e[n],i)}return A.lerp(t[n],e[n],i)});if("object"==typeof t&&null!==t){let n={};for(let s in t){let r=I(t[s],e[s],i,a);void 0!==r&&(n[s]=r)}return n}}var _=new Map,H=new Map,S=class extends w{constructor(s,g,f,N,b,C,k){super(),this.id=s,this.data=g,this.scene=f,this.sharedAssets=N,this.object=b,this.eventType=C,this.actionCondition=k,this.toggleIsForward=!1,this._finished=!1,this.hasPlayedOnce=!1,this._shouldForwardLoop=!1,this._shouldPauseOnNextLoopComplete=!1,this.hiddenMatrixOverrides=[],this._onLoopComplete=()=>{this._shouldPauseOnNextLoopComplete&&(this.timeline.pause(),this._shouldPauseOnNextLoopComplete=!1)};try{let s=r(this.data);"number"==typeof s.loop&&s.loop--,this.timeline=l.timeline({...s,autoplay:!1}),this._shouldForwardLoop=!0===s.loop||"number"==typeof s.loop&&s.loop>1;let g=this.sharedAssets.data.timelineAnimations[this.data.timeline].mapping;Object.entries(g).forEach(([s,r])=>{let o=this.scene.find(s);if(!o)return;let l=o.data.timelineAnimations[r];if(!l)return;let g=o.data.states.data(r);g?.hiddenMatrix&&16===g.hiddenMatrix.length&&!T.isEqual(g.hiddenMatrix,o.data.hiddenMatrix)&&this.hiddenMatrixOverrides.push({objId:s,original:o.hiddenMatrix.clone(),state:g.hiddenMatrix});let b=function(n,s,r,o){let l=[];return s.properties.forEach(s=>{let g=s.data.path?.[0];if(g&&["position","rotation","scale"].includes(g)){let t=function(t,e=()=>{}){let i=[];for(let a of M){let n=[...t.keyframes??[]].filter(t=>void 0!==t.data.value[a]).sort((t,e)=>t.data.time-e.data.time),s=n[0];s&&e?.(s.data.value);let r={index:[],t:[]};for(let t=0;t<n.length-1;t++){let e=n[t],i=n[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*n[0].data.time:0};r.t.push({...a,value:t%2==0?1:0,easing:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),r.index.push({...a,value:t,easing:"linear"})}if(n.length>1){let t={t:0,index:0},s={t:NaN,index:NaN};i.push({targets:t,...r,update:()=>{if(!P(t,s))return;let i=Math.ceil(t.index),r=i%2==0?t.t:1-t.t,o=n?.[i].data.value,l=n?.[i+1]?.data.value;void 0!==o&&void 0!==l&&e?.({[a]:o[a]+(l[a]-o[a])*r})}})}}return i}(s.data,r?.[g]);t&&l.push(...t)}if(g&&"shape size"===g&&"geometry"in n){let t=function(t,e,i){let a=[];for(let t of M){let n={},s=[...e.keyframes??[]].filter(e=>void 0!==e.data.value[t]).sort((t,e)=>t.data.time-e.data.time),r=s[0];r&&i?.(r.data.value),n={index:[],t:[]};for(let t=0;t<s.length-1;t++){let e=s[t],i=s[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*s[0].data.time:0};n.t.push({...a,value:t%2==0?1:0,easing:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),n.index.push({...a,value:t,easing:"linear"})}if(s.length>1){let e={t:0,index:0},r={t:NaN,index:NaN};a.push({targets:e,...n,update:()=>{if(!P(e,r))return;let a=Math.ceil(e.index),n=a%2==0?e.t:1-e.t,o=s?.[a].data.value,l=s?.[a+1]?.data.value;void 0!==o&&void 0!==l&&i?.({[t]:o[t]+(l[t]-o[t])*n})}})}}return a}(0,s.data,r?.shapeSize);t&&l.push(...t)}if(g&&"path extrusion"===g&&y(n)){let e=function(e,i,a){let n={},s=[...i.keyframes??[]].sort((t,e)=>t.data.time-e.data.time),r=s[0];r&&a?.(e,r.data.value),n={index:[],t:[]};for(let t=0;t<s.length-1;t++){let e=s[t],i=s[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*s[0].data.time:0};n.t.push({...a,value:t%2==0?1:0,easing:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),n.index.push({...a,value:t,easing:"linear"})}if(s.length>1){let i={t:0,index:0},r={t:NaN,index:NaN};return{targets:i,...n,update:()=>{if(!P(i,r))return;let n=Math.ceil(i.index),o=n%2==0?i.t:1-i.t,l=s?.[Math.min(n,s.length-1)].data.value,d=s?.[Math.min(n,s.length-1)+1]?.data.value;a?.(e,t(e,l,d,o))}}}}(n,s.data,r?.pathExtrusion);e&&l.push(e)}if(g&&"path snapping"===g&&n.data.pathSnapping){let t=function(t,i,a){let n={},s=[...i.keyframes??[]].sort((t,e)=>t.data.time-e.data.time),r=s[0];r&&a?.(r.data.value),n={index:[],t:[]};for(let t=0;t<s.length-1;t++){let e=s[t],i=s[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*s[0].data.time:0};n.t.push({...a,value:t%2==0?1:0,easing:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),n.index.push({...a,value:t,easing:"linear"})}if(s.length>1){let i={t:0,index:0},r={t:NaN,index:NaN};return{targets:i,...n,update:()=>{if(!P(i,r))return;let n=Math.ceil(i.index),o=n%2==0?i.t:1-i.t,l=s?.[Math.min(n,s.length-1)].data.value,d=s?.[Math.min(n,s.length-1)+1]?.data.value;a?.(e(t,l,d,o))}}}}(n,s.data,r?.pathSnapping);t&&l.push(t)}if(g&&"material"===g&&"Mesh"===n.type&&"material"in n){let t=p(n.material)?n.material:void 0;if(t){let e=s.data.id;if(e){let i=(s.data.keyframes??[]).some(t=>m(t.data.value?.noiseStrength)),a=t.ensureRainbowNoiseCompiled,n=e=>{i&&"function"==typeof a&&a.call(t,e)};n(e);let d=t.getLayerByUuid(e);if(d){let t=D(d,s.data,r?.material,o);t&&l.push(t)}else{let e=s.data.type;for(let i of t.getLayersOfType(e))n(i.uuid);let i=t.getLayersOfType(e);if(i)for(let t of i){let e=D(t,s.data,r?.material,o);e&&l.push(e)}}}}}if(g&&"opacity"===g&&"Mesh"===n.type&&"material"in n){let t=function(t,e){if(t){let i={},a=[...t.keyframes??[]].sort((t,e)=>t.data.time-e.data.time),n=a[0];n&&e?.(n.data.value),i={index:[],t:[]};for(let t=0;t<a.length-1;t++){let e=a[t],n=a[t+1]??e,s={duration:1e3*(n?.data?.time-e.data.time),delay:0===t?1e3*a[0].data.time:0};i.t.push({...s,value:t%2==0?1:0,easing:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(n.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),i.index.push({...s,value:t,easing:"linear"})}if(a.length>1){let t={t:0,index:0},n={t:NaN,index:NaN};return{targets:t,...i,update:()=>{if(!P(t,n))return;let i=Math.ceil(t.index),s=i%2==0?t.t:1-t.t,r=a?.[Math.min(i,a.length-1)].data.value,o=a?.[Math.min(i,a.length-1)+1]?.data.value;e?.(A.lerp(r,o,s))}}}}}(s.data,r?.opacity);t&&l.push(t)}if(g&&"cloner"===g){let t=function(t,e,n){let s={},r=[...e.keyframes??[]].sort((t,e)=>t.data.time-e.data.time),o=r[0];o&&n?.(t,o.data.value,o.data.value),s={index:[],t:[]};for(let t=0;t<r.length-1;t++){let e=r[t],i=r[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*r[0].data.time:0};s.t.push({...a,value:t%2==0?1:0,easing:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),s.index.push({...a,value:t,easing:"linear"})}if(r.length>1){let e={t:0,index:0},o={t:NaN,index:NaN};return{targets:e,...s,update:()=>{if(!P(e,o))return;let s=Math.ceil(e.index),l=s%2==0?e.t:1-e.t,d=r?.[Math.min(s,r.length-1)].data.value,h=r?.[Math.min(s,r.length-1)+1]?.data.value;n?.(t,d.randomnessObject?void 0:i(d,h,l,t),d.randomnessObject?a(d,h,l,t):void 0)}}}}(n,s.data,r?.cloner);t&&l.push(t)}if(g&&"camera"===g&&n instanceof c){let t=function(t,e,i,a){if(e){let n={[a]:[]},s=[...e.keyframes??[]].sort((t,e)=>t.data.time-e.data.time),r=s[0];r&&(t[a]=r.data.value,i?.(a,r.data.value));for(let t=0;t<s.length-1;t++){let e=s[t];if(!Number.isFinite(e.data.value))continue;let i=s[t+1]??e;n[a].push({value:i.data.value,easing:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters),duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*s[0].data.time:0})}if(s.length>1)return{targets:t,...n,update:()=>{i?.(a,t[a])}}}}(n,s.data,r?.camera,"zoom");t&&l.push(t)}if(g&&"light"===g&&(n instanceof h||n instanceof d||n instanceof u)){let t=function(t,e,i,a,n){if(e){let s={},r=[...e.keyframes??[]].sort((t,e)=>t.data.time-e.data.time),o=r[0];if(o){let e=o.data.value;t[a]=e,i?.(a,e)}s={index:[],t:[]};for(let t=0;t<r.length-1;t++){let e=r[t],i=r[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*r[0].data.time:0};s.t.push({...a,value:t%2==0?1:0,easing:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),s.index.push({...a,value:t,easing:"linear"})}if(r.length>1){let t={t:0,index:0},e={t:NaN,index:NaN};return{targets:t,...s,update:()=>{if(!P(t,e))return;let s=Math.ceil(t.index),o=s%2==0?t.t:1-t.t,l=r?.[Math.min(s,r.length-1)].data.value,d=r?.[Math.min(s,r.length-1)+1]?.data.value;i?.(a,I(l,d,o,n))}}}}}(n,s.data,r?.light,s.data.path[1],o);t&&l.push(t)}}),l}(o,{...l},n(o,{scene:f,shared:N}),this.sharedAssets),C=("start"===this.data.delayDirection?this.data.delay:0)+("start-end"===this.data.delayDirection?this.data.delay:0)+("start-once"===this.data.delayDirection?this.data.delay:0);b.forEach(t=>{this.timeline.add(t,C)}),this.timeline.duration=1e3*l.to+C}),this.timeline.delay=0,this.timeline.duration+=("start"===this.data.delayDirection?this.data.delay:0)+("end"===this.data.delayDirection?this.data.delay:0)+("start-end"===this.data.delayDirection?2*this.data.delay:0)+("start-once"===this.data.delayDirection?2*this.data.delay:0),this.timeline.finished.then(()=>{Object.keys(g).forEach(t=>{let e=this.scene.find(t);e instanceof c&&e.dispatchEvent(o)}),this._finished=!0}),this.timeline.loopComplete=this._onLoopComplete}catch(t){throw new Error("Missing property")}b&&(H.has(b.uuid)?H.get(b.uuid).push(this):H.set(b.uuid,[this])),_.set(s,this)}get playing(){return!1===this.timeline.paused}get finished(){return this._finished}get paused(){return this.timeline.paused}applyStateHiddenMatrices(){for(let{objId:t,state:e}of this.hiddenMatrixOverrides){let i=this.scene.find(t);i&&i.hiddenMatrix.fromArray(e)}}restoreOriginalHiddenMatrices(){for(let{objId:t,original:e}of this.hiddenMatrixOverrides){let i=this.scene.find(t);i&&i.hiddenMatrix.copy(e)}}play(){let t=void 0!==this.eventType&&O(this.eventType)&&"Once"===this.data.runMode&&this.hasPlayedOnce&&this.paused&&this.timeline.currentTime>0&&!this._finished;if(void 0!==this.eventType&&O(this.eventType)&&"Once"===this.data.runMode&&this.hasPlayedOnce&&!t||void 0===this.eventType&&this._finished)return!1;this.hasPlayedOnce=!0,this.applyStateHiddenMatrices();let e=this.sharedAssets.data.timelineAnimations[this.data.timeline].mapping;Object.keys(e).forEach(t=>{let e=this.scene.find(t);e instanceof c&&e.dispatchEvent(s)}),L(),this.paused&&this.timeline.currentTime>0?this.timeline.play():this.timeline.restart()}pauseTimeline(){this.paused||this.timeline.pause()}pause(){this.pauseTimeline()}stop(){this.pauseTimeline(),this.seek(0),this.timeline.reset(),this.restoreOriginalHiddenMatrices(),this._finished=!1}seek(t){this.timeline.seek(t*this.timeline.duration,!0)}toggle(t){let e=this.paused&&this.timeline.currentTime>0&&this.timeline.currentTime<this.timeline.duration;if(void 0!==t?this.toggleIsForward=t:e||(this.toggleIsForward=!this.toggleIsForward),this.playing){if(!this.toggleIsForward&&this.timeline.reversed&&this._shouldForwardLoop&&this.timeline.remaining%2==1)return void(this._shouldPauseOnNextLoopComplete=!0);this.timeline.reverse(this.timeline.duration-this.timeline.currentTime),this._shouldForwardLoop&&this.timeline.loop&&this.timeline.reversed&&(this._shouldPauseOnNextLoopComplete=!0)}else this.applyStateHiddenMatrices(),L(),(!this.toggleIsForward!==this.timeline.reversed||!this.toggleIsForward&&this.timeline.reversed&&"alternate"===this.timeline.direction)&&this.timeline.reverse(),"number"==typeof this.timeline.loop&&"number"==typeof this.timeline.remaining&&this.timeline.remaining<this.timeline.loop&&this.toggleIsForward&&(this.timeline.remaining=this.timeline.loop),this.timeline.play()}playFromCurrent(){this.toggle(!0)}reverseFromCurrent(){this.toggle(!1)}dispose(){this.pauseTimeline(),this.restoreOriginalHiddenMatrices()}},W=class{constructor(t){this.data=t}dispatch(){this.data.playTimeline?this.pauseTimeline(this.data.playTimeline):this.data.object?this.pauseAllTimelinesFromObject(this.data.object):this.pauseAllTimelines()}pauseTimeline(t){let e=this.getTimelineActions(t);!e.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{e.forEach(t=>{t[this.data.interaction]()}),this.disposeDelay()},this.data.delay)):e.forEach(t=>{t[this.data.interaction]()}))}getTimelineActions(t){let e=_.get(t);return e?[e]:[..._.values()].filter(e=>e.data.timeline===t)}pauseAllTimelinesFromObject(t){let e=H.get(t);!e?.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{e.forEach(t=>t[this.data.interaction]()),this.disposeDelay()},this.data.delay)):e.forEach(t=>t[this.data.interaction]()))}pauseAllTimelines(){let t=[...H.values()];!t.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{t.forEach(t=>{t.forEach(t=>{t[this.data.interaction]()})}),this.disposeDelay()},this.data.delay)):t.forEach(t=>{t.forEach(t=>{t[this.data.interaction]()})}))}disposeDelay(){clearTimeout(this.timeoutId),delete this.timeoutId}dispose(){clearTimeout(this.timeoutId),delete this.timeoutId}},B=class{constructor(t,e,i,a,n,s,r){this.data=e;let o="interaction"in e?e.interaction:"play";if("play"===o||void 0===o)this.interaction=new S(t,e,i,a,n,s,r);else{if("pause"!==o&&"stop"!==o)throw new Error("Missing property");this.interaction=new W(e)}}get playing(){return this.interaction instanceof S&&this.interaction.playing}get finished(){return!(this.interaction instanceof S)||this.interaction.finished}get paused(){return!(this.interaction instanceof S)||this.interaction.paused}play(){if(this.interaction instanceof S)return this.interaction.play();this.interaction.dispatch()}stop(){this.interaction instanceof S&&this.interaction.stop()}seek(t){this.interaction instanceof S&&this.interaction.seek(t)}toggle(t){this.interaction instanceof S?this.interaction.toggle(t):this.interaction.dispatch()}playFromCurrent(){this.interaction instanceof S?this.interaction.playFromCurrent():this.interaction.dispatch()}dispatchConditional(){this.interaction instanceof S?f(this.interaction.sharedAssets,this.interaction.actionCondition)&&this.interaction.playFromCurrent():this.interaction.dispatch()}reverseFromCurrent(){this.interaction instanceof S&&this.interaction.reverseFromCurrent()}dispose(){this.interaction.dispose()}};g("TimelineAnimation",({id:t,data:e,page:i,shared:a,object:n,eventType:s,actionCondition:r})=>new B(t,e,i.scene,a,n,s,r)),N("timeline");
@@ -1 +1 @@
1
- import{a as e}from"./runtime-chunk-NBYTQLIB.js";import{f as t}from"./runtime-chunk-ZHNGVKGZ.js";import{a as n,b as i}from"./runtime-chunk-DZNU62CT.js";import{a as s}from"./runtime-chunk-VAVYZ35B.js";import{e as a}from"./runtime-chunk-FQNSP44B.js";import"./runtime-chunk-W7THORYR.js";import"./runtime-chunk-MC3OVJQU.js";import"./runtime-chunk-D2IFC55F.js";import"./runtime-chunk-NRJDJMQZ.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{f as o,g as r}from"./runtime-chunk-MM75L5X4.js";import{d,v as l}from"./runtime-chunk-ZLW3UWOA.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-Z5OH244S.js";import{a as u}from"./runtime-chunk-TZCHGFVF.js";import{s as h,t as c}from"./runtime-chunk-OW6T4XFV.js";import{Ec as p,Fc as m,Oc as v,rd as g}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var f=new m,E=new m,w=new m,y=new m,M=new g,F={type:"requestRender"},L=function(){let e=new m,t=new m;return(n,i,s)=>s>0?(e.subVectors(n,i),e.length()<=s?n:t.copy(i).add(e.normalize().multiplyScalar(s))):i}(),x=function(){let e=new v;return(n,i)=>{n.position.copy(i),null!==n.parent&&(e.copy(n.parent.matrixWorld).invert(),n.position.applyMatrix4(e)),e.copy(n.hiddenMatrix).invert(),n.position.applyMatrix4(e),n.updateMatrix(),n.hasNonUniformScale&&(n.updateMatrixWorld(),n.updateMatrixWorldRigid()),n instanceof l&&t(n.parent)&&n.invalidateDownstreamBooleanData(!0)}}(),D=class{constructor(e,t,n,i,s,a){this.data=e,this.id=t,this.object=n,this.paused=!1,this.currentDampingFactor=1,this.snapComplete=!1,this.isReset=!1,this.worldPosition0=new m,this.timeoutId=null,this.delayFinished=!0,this.wasOutside=!1,this.data={...h.defaultData,...e,...void 0===e.resetOnPointerLeave&&{resetOnPointerLeave:!1}},void 0===e.target||"cursor"===e.target||(this.target=i.find(e.target)),this.data.dampingFactor&&(this.currentDampingFactor=this.data.dampingFactor),this.resetDampingFactor=80/this.data.resetSpeed+1,this.object.getWorldPosition(this.worldPosition0),this.actions=o(e,e.actions,i,s,a,n)}},b=class extends n{constructor(e,t){super(e),this.eventManager=t,this.events=[],this.pairOfEventListeners=[],this.onMouseMove=e=>{if(!(s.length>1)){this.eventContext.updateRaycaster(e);for(let e of this.events)void 0===e.target&&this.updateSingleEvent(e)}},this.onMouseEnter=e=>{for(let e of this.events)void 0===e.target&&(e.isReset=!1,e.currentDampingFactor=e.data.dampingFactor)},this.onMouseLeave=e=>{for(let e of this.events)void 0===e.target&&(e.data.resetOnPointerLeave&&(e.isReset=!0,e.currentDampingFactor=e.resetDampingFactor),this.updateSingleEvent(e))},this.onTargetChange=e=>()=>{this.updateSingleEvent(e)}}connect(){let{page:e}=this.eventContext;if(e.traverseEntity(t=>{let n=t.data?.events.find(e=>"Follow"===e.data.type&&!e.data.disabled);n&&(!e.data.globalPhysics.usePhysics||"dynamic"!==t.dataPatched.physics?.rigidBody)&&this.events.push(new D(n.data,n.id,t,e,this.eventContext.sharedAssets,this.eventManager))}),!this.events.length)return;let{domElement:t,eventElement:n}=this.eventContext;this.domEventsNeeded.clear(),a&&(this.domEventsNeeded.add("pointerdown"),t.addEventListener("pointerdown",this.onMouseMove)),this.domEventsNeeded.add("pointermove"),n.addEventListener("pointermove",this.onMouseMove),this.eventContext.useWindowEvents||(t.addEventListener("pointerenter",this.onMouseEnter),t.addEventListener("pointerleave",this.onMouseLeave));for(let e of this.events)if(void 0!==e.target){let t=e.target,n=this.onTargetChange(e);this.pairOfEventListeners.push([t,n]),t.addEventListener("requestRender",n)}}disconnect(){if(!this.events.length)return;let{domElement:e,eventElement:t}=this.eventContext;this.domEventsNeeded.clear(),a&&e.removeEventListener("pointerdown",this.onMouseMove),t.removeEventListener("pointermove",this.onMouseMove),e.removeEventListener("pointerenter",this.onMouseEnter),e.removeEventListener("pointerleave",this.onMouseLeave);for(let[e,t]of this.pairOfEventListeners)e.removeEventListener("requestRender",t);for(let e of this.events)e.paused=!0,e.isReset=!1,r(e.actions)}onAnimationFrameDamping(){for(let e of this.events)e.paused||this.updateSingleEvent(e,!0)}updateSingleEvent(e,t=!1){this.events.forEach(e=>{e.actions.Create.forEach(e=>{e.dispatchThrottled()})});let{plane:n,limitDistance:i,limitDistanceEnabled:s}=e.data;if(e.object.getWorldPosition(w),e.isReset)y.copy(e.worldPosition0);else if(e.target)e.target.getWorldPosition(y);else{let{getCamera:e,raycaster:t}=this.eventContext;if("custom"===n?(e().getWorldDirection(E),E.negate(),f.copy(E)):"xy"===n?f.set(0,0,1):"xz"===n?f.set(0,1,0):"yz"===n&&f.set(1,0,0),M.setFromNormalAndCoplanarPoint(f,w),!t.ray.intersectPlane(M,y))return}if(!e.isReset)if(y.distanceTo(e.worldPosition0)>i&&s&&e.target){if(e.snapComplete=!1,e.data.snapDelay&&(e.delayFinished=!1,typeof window<"u"&&null!==e.timeoutId&&(window.clearTimeout(e.timeoutId),e.timeoutId=null)),e.wasOutside=!0,!e.data.resetAfterDistanceLimit)return;y.copy(e.worldPosition0),e.currentDampingFactor=e.resetDampingFactor}else if(e.wasOutside&&(e.data.snapDelay&&typeof window<"u"&&(e.timeoutId=window.setTimeout(()=>{e.delayFinished=!0,e.paused=!1,this.updateSingleEvent(e)},1e3*e.data.snapDelay)),e.currentDampingFactor=e.data.dampingFactor,e.wasOutside=!1),!1===e.delayFinished)return;!1===e.data.enabledTranslation[0]&&(y.x=w.x),!1===e.data.enabledTranslation[1]&&(y.y=w.y),!1===e.data.enabledTranslation[2]&&(y.z=w.z);let a=L(w,y,e.wasOutside?0:e.data.maxDelta);if(e.currentDampingFactor>1){let n=f.subVectors(a,w).divideScalar(e.currentDampingFactor);w.add(n),t&&x(e.object,w),e.paused=n.length()<.01}else x(e.object,a),e.paused=!0;e.object?.dispatchEvent({type:"beginEvent",eventName:"Follow"}),e.object.dispatchEvent(F)}},R=new m,j=new m,C=new v,P=new p,N=new p,O=new m,S=new m,k=new m,Q=new m,z=new g,W={type:"requestRender"},T={type:"changeRotation"},V=function(){let e=new v;return function(n,i){null!==n.parent?e.multiplyMatrices(n.parent.matrixWorld,n.hiddenMatrix):e.copy(n.hiddenMatrix),i.premultiply(d(e).invert()),n.rotation.setFromRotationMatrix(i),n.updateMatrix(),n instanceof l&&t(n.parent)&&n.invalidateDownstreamBooleanData(!0)}}(),A=class{constructor(e,t,n,i){this.id=t,this.object=n,this.paused=!1,this.currentDampingFactor=1,this.isReset=!1,this.worldQuaternion0=new p,this.timeoutId=null,this.delayFinished=!0,this.wasOutside=!1,this.data={...c.defaultData,...e,...void 0===e.resetOnPointerLeave&&{resetOnPointerLeave:!1}},void 0===e.target||"cursor"===e.target||(this.target=i.find(e.target)),this.data.dampingFactor&&(this.currentDampingFactor=this.data.dampingFactor),this.object.getWorldQuaternion(this.worldQuaternion0),isNaN(this.worldQuaternion0.x)&&(this.worldQuaternion0.x=0),isNaN(this.worldQuaternion0.y)&&(this.worldQuaternion0.y=0),isNaN(this.worldQuaternion0.z)&&(this.worldQuaternion0.z=0),isNaN(this.worldQuaternion0.w)&&(this.worldQuaternion0.w=1),this.resetDampingFactor=80/this.data.resetSpeed+1}},U=class extends n{constructor(){super(...arguments),this.events=[],this.pairOfEventListeners=[],this.pairOfUserEventListeners=[],this.onMouseMove=e=>{if(!(s.length>1)){this._lastMouseEvent=e,this.eventContext.updateRaycaster(e);for(let e of this.events)void 0===e.target&&this.updateSingleEvent(e)}},this.onMouseEnter=e=>{for(let e of this.events)void 0===e.target&&(e.isReset=!1,e.currentDampingFactor=e.data.dampingFactor)},this.onMouseLeave=e=>{for(let e of this.events)void 0===e.target&&(e.data.resetOnPointerLeave&&(e.isReset=!0,e.currentDampingFactor=e.resetDampingFactor),this.updateSingleEvent(e))},this.onScroll=e=>{if(this._lastMouseEvent){let e=new PointerEvent("pointermove",{clientX:this._lastMouseEvent.clientX,clientY:this._lastMouseEvent.clientY,bubbles:!0,cancelable:!0,view:window});this.eventContext.eventElement.dispatchEvent(e)}},this.onTargetChange=e=>()=>{this.updateSingleEvent(e)},this.createUserEventListener=t=>({eventName:n,target:i})=>{if(!n||!i)return;let s=e(n);s&&"LookAt"===s&&this.updateSingleEvent(t)}}connect(){let{page:e}=this.eventContext;if(e.traverseEntity(t=>{let n=t.data?.events.find(e=>"LookAt"===e.data.type&&!e.data.disabled);n&&(!e.data.globalPhysics.usePhysics||"dynamic"!==t.dataPatched.physics?.rigidBody)&&this.events.push(new A(n.data,n.id,t,e))}),!this.events.length)return;let{domElement:t,eventElement:n}=this.eventContext;this.domEventsNeeded.clear(),a&&(this.domEventsNeeded.add("pointerdown"),t.addEventListener("pointerdown",this.onMouseMove)),this.domEventsNeeded.add("pointermove"),n.addEventListener("pointermove",this.onMouseMove),this.eventContext.useWindowEvents?n.addEventListener("scroll",this.onScroll):(t.addEventListener("pointerenter",this.onMouseEnter),t.addEventListener("pointerleave",this.onMouseLeave));for(let e of this.events){if(void 0!==e.target){let t=this.onTargetChange(e),n=e.target;this.pairOfEventListeners.push([n,t]),n.addEventListener("requestRender",t)}let t=this.createUserEventListener(e),n=e.object;this.pairOfUserEventListeners.push([n,t]),n.addEventListener("userEvent",t)}}disconnect(){if(!this.events.length)return;let{domElement:e,eventElement:t}=this.eventContext;this.domEventsNeeded.clear(),a&&e.removeEventListener("pointerdown",this.onMouseMove),t.removeEventListener("pointermove",this.onMouseMove),e.removeEventListener("pointerenter",this.onMouseEnter),e.removeEventListener("pointerleave",this.onMouseLeave),t.removeEventListener("scroll",this.onScroll);for(let[e,t]of this.pairOfEventListeners)e.removeEventListener("requestRender",t);for(let[e,t]of this.pairOfUserEventListeners)e.removeEventListener("userEvent",t);for(let e of this.events)e.paused=!0,e.isReset=!1}onAnimationFrameDamping(){for(let e of this.events)e.paused||this.updateSingleEvent(e)}updateSingleEvent(e){let{tilt:t,axis:n,distance:i,plane:s,limitDistance:a,enabledRotation:o,limitDistanceEnabled:r}=e.data,{getCamera:l,raycaster:u}=this.eventContext,{object:h,target:c}=e;if(h.getWorldPosition(O),!e.isReset)if(e.target)e.target.getWorldPosition(S);else{if("custom"===s?(l().getWorldDirection(j),j.negate(),z.setFromNormalAndCoplanarPoint(j,O)):("xy"===s?R.set(0,0,1):"xz"===s?R.set(0,1,0):"yz"===s&&R.set(1,0,0),z.setFromNormalAndCoplanarPoint(R,O)),!u.ray.intersectPlane(z,S))return;i>0&&("custom"===s||void 0===s)&&S.addScaledVector(j,i)}if(e.isReset||(c?"target"===t?k.copy(c.up).applyMatrix4(C.extractRotation(c.matrixWorld)).normalize():o.some(e=>!1===e)?("x"===n?(Q.set(0,0,1),!1===o[2]&&Q.set(0,1,0)):"y"===n?(Q.set(1,0,0),!1===o[0]&&Q.set(0,0,1)):(Q.set(0,1,0),!1===o[1]&&Q.set(1,0,0)),k.copy(Q).applyQuaternion(e.worldQuaternion0).normalize()):k.set(0,1,0):"custom"===s?k.set(0,1,0):k.copy(R)),e.isReset)N.copy(e.worldQuaternion0);else if(O.distanceTo(S)>a&&r&&c){if(e.data.snapDelay&&(e.delayFinished=!1,typeof window<"u"&&null!==e.timeoutId&&(window.clearTimeout(e.timeoutId),e.timeoutId=null)),e.wasOutside=!0,!e.data.resetAfterDistanceLimit)return;N.copy(e.worldQuaternion0),e.currentDampingFactor=e.resetDampingFactor}else{if(e.wasOutside&&(e.data.snapDelay&&typeof window<"u"&&(e.timeoutId=window.setTimeout(()=>{e.delayFinished=!0,e.paused=!1,this.updateSingleEvent(e)},1e3*e.data.snapDelay)),e.currentDampingFactor=e.data.dampingFactor,e.wasOutside=!1),!1===e.delayFinished)return;(function(e,t,n,i,s,a){let o=C.elements;Z.subVectors(t,n),0===Z.lengthSq()&&(Z.z=1),Z.normalize(),B.crossVectors(i,Z),0===B.lengthSq()&&(1===Math.abs(i.z)?Z.x+=1e-4:Z.z+=1e-4,Z.normalize(),B.crossVectors(i,Z)),B.normalize(),I.crossVectors(Z,B),"x"===s?1===a.z?[B,I,Z]=[Z,B,I]:(B.negate(),[B,Z]=[Z,B]):"y"===s?1===a.x?[B,I,Z]=[I,Z,B]:(B.negate(),[I,Z]=[Z,I]):1===a.x&&(B.negate(),[B,I]=[I,B]),o[0]=B.x,o[4]=I.x,o[8]=Z.x,o[1]=B.y,o[5]=I.y,o[9]=Z.y,o[2]=B.z,o[6]=I.z,o[10]=Z.z})(0,S,O,k,n,Q),N.setFromRotationMatrix(C),P.setFromUnitVectors(Q.applyQuaternion(N),k),o.some(e=>!1===e)&&"target"!==t&&N.premultiply(P).normalize()}e.currentDampingFactor>1?(h.updateWorldMatrix(!0,!1),P.setFromRotationMatrix(d(h.matrixWorld)),P.slerp(N,1/e.currentDampingFactor),V(h,C.makeRotationFromQuaternion(P)),e.paused=8*(1-P.dot(N))<1e-6):(V(h,C.makeRotationFromQuaternion(N)),e.paused=!0),e.object?.dispatchEvent({type:"beginEvent",eventName:"LookAt"}),h.dispatchEvent(W),h.dispatchEvent(T)}},I=new m,B=new m,Z=new m;i("Follow",({eventContext:e,eventManager:t})=>new b(e,t)),i("LookAt",({eventContext:e})=>new U(e)),u("tracking");
1
+ import{a as e}from"./runtime-chunk-NBYTQLIB.js";import{f as t}from"./runtime-chunk-DNWPGXEC.js";import{a as n,b as i}from"./runtime-chunk-DZNU62CT.js";import{a as s}from"./runtime-chunk-VAVYZ35B.js";import{e as a}from"./runtime-chunk-FQNSP44B.js";import"./runtime-chunk-2657LZHS.js";import"./runtime-chunk-6WHNEYAL.js";import"./runtime-chunk-CDZQF4NV.js";import"./runtime-chunk-LALFWESO.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{f as o,g as r}from"./runtime-chunk-QVC5UDJO.js";import{d,v as l}from"./runtime-chunk-PLJ25O2X.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-5XUI4Z6R.js";import{a as u}from"./runtime-chunk-TZCHGFVF.js";import{s as h,t as c}from"./runtime-chunk-OW6T4XFV.js";import{Ec as p,Fc as m,Oc as v,rd as g}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var E=new m,f=new m,w=new m,y=new m,L=new g,F={type:"requestRender"},M=function(){let e=new m,t=new m;return(n,i,s)=>s>0?(e.subVectors(n,i),e.length()<=s?n:t.copy(i).add(e.normalize().multiplyScalar(s))):i}(),x=function(){let e=new v;return(n,i)=>{n.position.copy(i),null!==n.parent&&(e.copy(n.parent.matrixWorld).invert(),n.position.applyMatrix4(e)),e.copy(n.hiddenMatrix).invert(),n.position.applyMatrix4(e),n.updateMatrix(),n.hasNonUniformScale&&(n.updateMatrixWorld(),n.updateMatrixWorldRigid()),n instanceof l&&t(n.parent)&&n.invalidateDownstreamBooleanData(!0)}}(),D=class{constructor(e,t,n,i,s,a){this.data=e,this.id=t,this.object=n,this.paused=!1,this.currentDampingFactor=1,this.snapComplete=!1,this.isReset=!1,this.worldPosition0=new m,this.timeoutId=null,this.delayFinished=!0,this.wasOutside=!1,this.data={...h.defaultData,...e,...void 0===e.resetOnPointerLeave&&{resetOnPointerLeave:!1}},void 0===e.target||"cursor"===e.target||(this.target=i.find(e.target)),this.data.dampingFactor&&(this.currentDampingFactor=this.data.dampingFactor),this.resetDampingFactor=80/this.data.resetSpeed+1,this.object.getWorldPosition(this.worldPosition0),this.actions=o(e,e.actions,i,s,a,n)}},b=class extends n{constructor(e,t){super(e),this.eventManager=t,this.events=[],this.pairOfEventListeners=[],this.onMouseMove=e=>{if(!(s.length>1)){this.eventContext.updateRaycaster(e);for(let e of this.events)void 0===e.target&&this.updateSingleEvent(e)}},this.onMouseEnter=e=>{for(let e of this.events)void 0===e.target&&(e.isReset=!1,e.currentDampingFactor=e.data.dampingFactor)},this.onMouseLeave=e=>{for(let e of this.events)void 0===e.target&&(e.data.resetOnPointerLeave&&(e.isReset=!0,e.currentDampingFactor=e.resetDampingFactor),this.updateSingleEvent(e))},this.onTargetChange=e=>()=>{this.updateSingleEvent(e)}}connect(){let{page:e}=this.eventContext;if(e.traverseEntity(t=>{let n=t.data?.events.find(e=>"Follow"===e.data.type&&!e.data.disabled);n&&(!e.data.globalPhysics.usePhysics||"dynamic"!==t.dataPatched.physics?.rigidBody)&&this.events.push(new D(n.data,n.id,t,e,this.eventContext.sharedAssets,this.eventManager))}),!this.events.length)return;let{domElement:t,eventElement:n}=this.eventContext;this.domEventsNeeded.clear(),a&&(this.domEventsNeeded.add("pointerdown"),t.addEventListener("pointerdown",this.onMouseMove)),this.domEventsNeeded.add("pointermove"),n.addEventListener("pointermove",this.onMouseMove),this.eventContext.useWindowEvents||(t.addEventListener("pointerenter",this.onMouseEnter),t.addEventListener("pointerleave",this.onMouseLeave));for(let e of this.events)if(void 0!==e.target){let t=e.target,n=this.onTargetChange(e);this.pairOfEventListeners.push([t,n]),t.addEventListener("requestRender",n)}}disconnect(){if(!this.events.length)return;let{domElement:e,eventElement:t}=this.eventContext;this.domEventsNeeded.clear(),a&&e.removeEventListener("pointerdown",this.onMouseMove),t.removeEventListener("pointermove",this.onMouseMove),e.removeEventListener("pointerenter",this.onMouseEnter),e.removeEventListener("pointerleave",this.onMouseLeave);for(let[e,t]of this.pairOfEventListeners)e.removeEventListener("requestRender",t);for(let e of this.events)e.paused=!0,e.isReset=!1,r(e.actions)}onAnimationFrameDamping(){for(let e of this.events)e.paused||this.updateSingleEvent(e,!0)}updateSingleEvent(e,t=!1){this.events.forEach(e=>{e.actions.Create.forEach(e=>{e.dispatchThrottled()})});let{plane:n,limitDistance:i,limitDistanceEnabled:s}=e.data;if(e.object.getWorldPosition(w),e.isReset)y.copy(e.worldPosition0);else if(e.target)e.target.getWorldPosition(y);else{let{getCamera:e,raycaster:t}=this.eventContext;if("custom"===n?(e().getWorldDirection(f),f.negate(),E.copy(f)):"xy"===n?E.set(0,0,1):"xz"===n?E.set(0,1,0):"yz"===n&&E.set(1,0,0),L.setFromNormalAndCoplanarPoint(E,w),!t.ray.intersectPlane(L,y))return}if(!e.isReset)if(y.distanceTo(e.worldPosition0)>i&&s&&e.target){if(e.snapComplete=!1,e.data.snapDelay&&(e.delayFinished=!1,typeof window<"u"&&null!==e.timeoutId&&(window.clearTimeout(e.timeoutId),e.timeoutId=null)),e.wasOutside=!0,!e.data.resetAfterDistanceLimit)return;y.copy(e.worldPosition0),e.currentDampingFactor=e.resetDampingFactor}else if(e.wasOutside&&(e.data.snapDelay&&typeof window<"u"&&(e.timeoutId=window.setTimeout(()=>{e.delayFinished=!0,e.paused=!1,this.updateSingleEvent(e)},1e3*e.data.snapDelay)),e.currentDampingFactor=e.data.dampingFactor,e.wasOutside=!1),!1===e.delayFinished)return;!1===e.data.enabledTranslation[0]&&(y.x=w.x),!1===e.data.enabledTranslation[1]&&(y.y=w.y),!1===e.data.enabledTranslation[2]&&(y.z=w.z);let a=M(w,y,e.wasOutside?0:e.data.maxDelta);if(e.currentDampingFactor>1){let n=E.subVectors(a,w).divideScalar(e.currentDampingFactor);w.add(n),t&&x(e.object,w),e.paused=n.length()<.01}else x(e.object,a),e.paused=!0;e.object?.dispatchEvent({type:"beginEvent",eventName:"Follow"}),e.object.dispatchEvent(F)}},C=new m,P=new m,j=new v,N=new p,R=new p,O=new m,S=new m,k=new m,Q=new m,z=new g,W={type:"requestRender"},T={type:"changeRotation"},V=function(){let e=new v;return function(n,i){null!==n.parent?e.multiplyMatrices(n.parent.matrixWorld,n.hiddenMatrix):e.copy(n.hiddenMatrix),i.premultiply(d(e).invert()),n.rotation.setFromRotationMatrix(i),n.updateMatrix(),n instanceof l&&t(n.parent)&&n.invalidateDownstreamBooleanData(!0)}}(),A=class{constructor(e,t,n,i){this.id=t,this.object=n,this.paused=!1,this.currentDampingFactor=1,this.isReset=!1,this.worldQuaternion0=new p,this.timeoutId=null,this.delayFinished=!0,this.wasOutside=!1,this.data={...c.defaultData,...e,...void 0===e.resetOnPointerLeave&&{resetOnPointerLeave:!1}},void 0===e.target||"cursor"===e.target||(this.target=i.find(e.target)),this.data.dampingFactor&&(this.currentDampingFactor=this.data.dampingFactor),this.object.getWorldQuaternion(this.worldQuaternion0),isNaN(this.worldQuaternion0.x)&&(this.worldQuaternion0.x=0),isNaN(this.worldQuaternion0.y)&&(this.worldQuaternion0.y=0),isNaN(this.worldQuaternion0.z)&&(this.worldQuaternion0.z=0),isNaN(this.worldQuaternion0.w)&&(this.worldQuaternion0.w=1),this.resetDampingFactor=80/this.data.resetSpeed+1}},U=class extends n{constructor(){super(...arguments),this.events=[],this.pairOfEventListeners=[],this.pairOfUserEventListeners=[],this.onMouseMove=e=>{if(!(s.length>1)){this._lastMouseEvent=e,this.eventContext.updateRaycaster(e);for(let e of this.events)void 0===e.target&&this.updateSingleEvent(e)}},this.onMouseEnter=e=>{for(let e of this.events)void 0===e.target&&(e.isReset=!1,e.currentDampingFactor=e.data.dampingFactor)},this.onMouseLeave=e=>{for(let e of this.events)void 0===e.target&&(e.data.resetOnPointerLeave&&(e.isReset=!0,e.currentDampingFactor=e.resetDampingFactor),this.updateSingleEvent(e))},this.onScroll=e=>{if(this._lastMouseEvent){let e=new PointerEvent("pointermove",{clientX:this._lastMouseEvent.clientX,clientY:this._lastMouseEvent.clientY,bubbles:!0,cancelable:!0,view:window});this.eventContext.eventElement.dispatchEvent(e)}},this.onTargetChange=e=>()=>{this.updateSingleEvent(e)},this.createUserEventListener=t=>({eventName:n,target:i})=>{if(!n||!i)return;let s=e(n);s&&"LookAt"===s&&this.updateSingleEvent(t)}}connect(){let{page:e}=this.eventContext;if(e.traverseEntity(t=>{let n=t.data?.events.find(e=>"LookAt"===e.data.type&&!e.data.disabled);n&&(!e.data.globalPhysics.usePhysics||"dynamic"!==t.dataPatched.physics?.rigidBody)&&this.events.push(new A(n.data,n.id,t,e))}),!this.events.length)return;let{domElement:t,eventElement:n}=this.eventContext;this.domEventsNeeded.clear(),a&&(this.domEventsNeeded.add("pointerdown"),t.addEventListener("pointerdown",this.onMouseMove)),this.domEventsNeeded.add("pointermove"),n.addEventListener("pointermove",this.onMouseMove),this.eventContext.useWindowEvents?n.addEventListener("scroll",this.onScroll):(t.addEventListener("pointerenter",this.onMouseEnter),t.addEventListener("pointerleave",this.onMouseLeave));for(let e of this.events){if(void 0!==e.target){let t=this.onTargetChange(e),n=e.target;this.pairOfEventListeners.push([n,t]),n.addEventListener("requestRender",t)}let t=this.createUserEventListener(e),n=e.object;this.pairOfUserEventListeners.push([n,t]),n.addEventListener("userEvent",t)}}disconnect(){if(!this.events.length)return;let{domElement:e,eventElement:t}=this.eventContext;this.domEventsNeeded.clear(),a&&e.removeEventListener("pointerdown",this.onMouseMove),t.removeEventListener("pointermove",this.onMouseMove),e.removeEventListener("pointerenter",this.onMouseEnter),e.removeEventListener("pointerleave",this.onMouseLeave),t.removeEventListener("scroll",this.onScroll);for(let[e,t]of this.pairOfEventListeners)e.removeEventListener("requestRender",t);for(let[e,t]of this.pairOfUserEventListeners)e.removeEventListener("userEvent",t);for(let e of this.events)e.paused=!0,e.isReset=!1}onAnimationFrameDamping(){for(let e of this.events)e.paused||this.updateSingleEvent(e)}updateSingleEvent(e){let{tilt:t,axis:n,distance:i,plane:s,limitDistance:a,enabledRotation:o,limitDistanceEnabled:r}=e.data,{getCamera:l,raycaster:u}=this.eventContext,{object:h,target:c}=e;if(h.getWorldPosition(O),!e.isReset)if(e.target)e.target.getWorldPosition(S);else{if("custom"===s?(l().getWorldDirection(P),P.negate(),z.setFromNormalAndCoplanarPoint(P,O)):("xy"===s?C.set(0,0,1):"xz"===s?C.set(0,1,0):"yz"===s&&C.set(1,0,0),z.setFromNormalAndCoplanarPoint(C,O)),!u.ray.intersectPlane(z,S))return;i>0&&("custom"===s||void 0===s)&&S.addScaledVector(P,i)}if(e.isReset||(c?"target"===t?k.copy(c.up).applyMatrix4(j.extractRotation(c.matrixWorld)).normalize():o.some(e=>!1===e)?("x"===n?(Q.set(0,0,1),!1===o[2]&&Q.set(0,1,0)):"y"===n?(Q.set(1,0,0),!1===o[0]&&Q.set(0,0,1)):(Q.set(0,1,0),!1===o[1]&&Q.set(1,0,0)),k.copy(Q).applyQuaternion(e.worldQuaternion0).normalize()):k.set(0,1,0):"custom"===s?k.set(0,1,0):k.copy(C)),e.isReset)R.copy(e.worldQuaternion0);else if(O.distanceTo(S)>a&&r&&c){if(e.data.snapDelay&&(e.delayFinished=!1,typeof window<"u"&&null!==e.timeoutId&&(window.clearTimeout(e.timeoutId),e.timeoutId=null)),e.wasOutside=!0,!e.data.resetAfterDistanceLimit)return;R.copy(e.worldQuaternion0),e.currentDampingFactor=e.resetDampingFactor}else{if(e.wasOutside&&(e.data.snapDelay&&typeof window<"u"&&(e.timeoutId=window.setTimeout(()=>{e.delayFinished=!0,e.paused=!1,this.updateSingleEvent(e)},1e3*e.data.snapDelay)),e.currentDampingFactor=e.data.dampingFactor,e.wasOutside=!1),!1===e.delayFinished)return;(function(e,t,n,i,s,a){let o=j.elements;q.subVectors(t,n),0===q.lengthSq()&&(q.z=1),q.normalize(),B.crossVectors(i,q),0===B.lengthSq()&&(1===Math.abs(i.z)?q.x+=1e-4:q.z+=1e-4,q.normalize(),B.crossVectors(i,q)),B.normalize(),I.crossVectors(q,B),"x"===s?1===a.z?[B,I,q]=[q,B,I]:(B.negate(),[B,q]=[q,B]):"y"===s?1===a.x?[B,I,q]=[I,q,B]:(B.negate(),[I,q]=[q,I]):1===a.x&&(B.negate(),[B,I]=[I,B]),o[0]=B.x,o[4]=I.x,o[8]=q.x,o[1]=B.y,o[5]=I.y,o[9]=q.y,o[2]=B.z,o[6]=I.z,o[10]=q.z})(0,S,O,k,n,Q),R.setFromRotationMatrix(j),N.setFromUnitVectors(Q.applyQuaternion(R),k),o.some(e=>!1===e)&&"target"!==t&&R.premultiply(N).normalize()}e.currentDampingFactor>1?(h.updateWorldMatrix(!0,!1),N.setFromRotationMatrix(d(h.matrixWorld)),N.slerp(R,1/e.currentDampingFactor),V(h,j.makeRotationFromQuaternion(N)),e.paused=8*(1-N.dot(R))<1e-6):(V(h,j.makeRotationFromQuaternion(R)),e.paused=!0),e.object?.dispatchEvent({type:"beginEvent",eventName:"LookAt"}),h.dispatchEvent(W),h.dispatchEvent(T)}},I=new m,B=new m,q=new m;i("Follow",({eventContext:e,eventManager:t})=>new b(e,t)),i("LookAt",({eventContext:e})=>new U(e)),u("tracking");
@@ -1 +1 @@
1
- import{a as t}from"./runtime-chunk-NGWM5WPD.js";import{k as i}from"./runtime-chunk-U5ACSO5E.js";import"./runtime-chunk-XV2ZLRKD.js";import"./runtime-chunk-NTUTXO7Q.js";import{a as e,b as n}from"./runtime-chunk-KGZNRID6.js";import"./runtime-chunk-R43XZP65.js";import"./runtime-chunk-SQKBNW2G.js";import"./runtime-chunk-4FAMJWEB.js";import"./runtime-chunk-ZHNGVKGZ.js";import"./runtime-chunk-FTVQTRM7.js";import"./runtime-chunk-W7THORYR.js";import"./runtime-chunk-D6NWJJTR.js";import"./runtime-chunk-MC3OVJQU.js";import"./runtime-chunk-D2IFC55F.js";import"./runtime-chunk-NRJDJMQZ.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{b as r,e as s}from"./runtime-chunk-MM75L5X4.js";import"./runtime-chunk-ZLW3UWOA.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-Z5OH244S.js";import{a as h}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import{Bc as o,Cc as m}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var a=class extends o{constructor(t,i,n,r,s){super(),this.data=t,this.page=i,this.animationControls=n,this.shared=r,this.condition=s,this.startOnceDelay=0,this.toggleIsForward=!1;let h=t.object,o=i.scene.find(t.object);o&&Array.isArray(o.identity)&&(h=o.identity[0]),this.data={...t,object:h};let m=this.animationControls.clipIdToAction[t.clipId+"/"+h];if(this.duration=m?.getClip()?.duration??1,this.data.crop2){let t=e(m?.getClip());this.leftFrameTime=this.data.crop2[0]/(t-1)*this.duration,this.rightFrameTime=this.data.crop2[1]/(t-1)*this.duration}else{let t=m?.getClip()?.tracks[0]?.times.length;t&&t>1?(this.leftFrameTime=this.data.crop[0]/t*this.duration,this.rightFrameTime=this.data.crop[1]/t*this.duration):(this.leftFrameTime=0,this.rightFrameTime=this.duration)}this.startOnceDelay=t.delay}get playing(){return this.threeAnimAction?.isRunning()??!1}play(t=!1){if(!1===s(this.shared,this.condition))return!1;window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(()=>{if(this.threeAnimAction=this.animationControls.play(this.data),!this.threeAnimAction)return;this.threeAnimAction.reset(),this.threeAnimAction.time=this.leftFrameTime,this.threeAnimAction._clip.start=this.leftFrameTime,this.threeAnimAction._clip.duration=this.rightFrameTime;let i=this.data.object;Object.entries(this.animationControls.clipIdToAction).forEach(([e,n])=>{let r=e.split("/")[1];this.threeAnimAction!==n&&r===i&&(t?n.fadeOut(.2):n.stop())}),t&&this.threeAnimAction?.fadeIn(.2)},this.startOnceDelay)}pause(){this.threeAnimAction&&(this.threeAnimAction.paused=!0),window.clearTimeout(this.timeoutId),delete this.timeoutId}stop(){this.threeAnimAction?.fadeOut(.2)}seek(t){this.threeAnimAction=this.animationControls.play(this.data),this.threeAnimAction&&(this.threeAnimAction.paused=!0,this.threeAnimAction.time=m.clamp(this.threeAnimAction.time+1/60*t,this.leftFrameTime,this.rightFrameTime-16e-5),this.animationControls.needsUpdate=!0,this.animationControls.requestRender())}toggle(t,i=!1){if(!1===s(this.shared,this.condition))return!1;this.toggleIsForward=t??!this.toggleIsForward,this.threeAnimAction&&(this.threeAnimAction._loopCount=0),this.playing?this.threeAnimAction&&(this.threeAnimAction.timeScale=this.toggleIsForward?1:-1,this.toggleIsForward?(this.threeAnimAction._clip.start=this.leftFrameTime,this.threeAnimAction._clip.duration=this.rightFrameTime):(this.threeAnimAction._clip.start=this.rightFrameTime,this.threeAnimAction._clip.duration=this.leftFrameTime)):this.timeoutId=window.setTimeout(()=>{if(this.threeAnimAction=this.animationControls.play(this.data),this.threeAnimAction){this.toggleIsForward?(this.threeAnimAction.time=this.leftFrameTime,this.threeAnimAction._clip.start=this.leftFrameTime,this.threeAnimAction._clip.duration=this.rightFrameTime):(this.threeAnimAction.time=this.rightFrameTime,this.threeAnimAction._clip.start=this.rightFrameTime,this.threeAnimAction._clip.duration=this.leftFrameTime),this.threeAnimAction.paused=!1,this.threeAnimAction.timeScale=this.toggleIsForward?1:-1;let t=this.data.clipId.split("/")[1];Object.entries(this.animationControls.clipIdToAction).forEach(([e,n])=>{let r=e.split("/")[1];this.threeAnimAction!==n&&r===t&&n.isRunning()&&(i?n.fadeOut(.2):n.stop())}),i&&this.threeAnimAction?.fadeIn(.2)}},this.startOnceDelay)}playFromCurrent(){this.toggle(!0)}reverseFromCurrent(){this.toggle(!1)}dispose(){let t=this.animationControls.clipIdToAction[this.data.clipId+"/"+this.data.object]?.getClip();t&&(t.duration=this.duration),this.pause()}};n(i),r("Transition",({eventType:i,data:e,page:n,shared:r,actionCondition:s})=>new t(i,e,n,r,s)),r("Animation",({data:t,page:i,eventManager:e,shared:n,actionCondition:r})=>new a(t,i,e.animationControls,n,r)),h("transitions");
1
+ import{a as t}from"./runtime-chunk-P2QJHRIH.js";import{k as i}from"./runtime-chunk-OTAMLWBD.js";import"./runtime-chunk-YWT6AWL4.js";import"./runtime-chunk-NTUTXO7Q.js";import{a as e,b as n}from"./runtime-chunk-KGZNRID6.js";import"./runtime-chunk-R43XZP65.js";import"./runtime-chunk-J4FFQBNR.js";import"./runtime-chunk-IGBRWWDI.js";import"./runtime-chunk-DNWPGXEC.js";import"./runtime-chunk-FTVQTRM7.js";import"./runtime-chunk-2657LZHS.js";import"./runtime-chunk-F7OUYIT6.js";import"./runtime-chunk-6WHNEYAL.js";import"./runtime-chunk-CDZQF4NV.js";import"./runtime-chunk-LALFWESO.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{b as r,e as s}from"./runtime-chunk-QVC5UDJO.js";import"./runtime-chunk-PLJ25O2X.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-5XUI4Z6R.js";import{a as h}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import{Bc as o,Cc as m}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var a=class extends o{constructor(t,i,n,r,s){super(),this.data=t,this.page=i,this.animationControls=n,this.shared=r,this.condition=s,this.startOnceDelay=0,this.toggleIsForward=!1;let h=t.object,o=i.scene.find(t.object);o&&Array.isArray(o.identity)&&(h=o.identity[0]),this.data={...t,object:h};let m=this.animationControls.clipIdToAction[t.clipId+"/"+h];if(this.duration=m?.getClip()?.duration??1,this.data.crop2){let t=e(m?.getClip());this.leftFrameTime=this.data.crop2[0]/(t-1)*this.duration,this.rightFrameTime=this.data.crop2[1]/(t-1)*this.duration}else{let t=m?.getClip()?.tracks[0]?.times.length;t&&t>1?(this.leftFrameTime=this.data.crop[0]/t*this.duration,this.rightFrameTime=this.data.crop[1]/t*this.duration):(this.leftFrameTime=0,this.rightFrameTime=this.duration)}this.startOnceDelay=t.delay}get playing(){return this.threeAnimAction?.isRunning()??!1}play(t=!1){if(!1===s(this.shared,this.condition))return!1;window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(()=>{if(this.threeAnimAction=this.animationControls.play(this.data),!this.threeAnimAction)return;this.threeAnimAction.reset(),this.threeAnimAction.time=this.leftFrameTime,this.threeAnimAction._clip.start=this.leftFrameTime,this.threeAnimAction._clip.duration=this.rightFrameTime;let i=this.data.object;Object.entries(this.animationControls.clipIdToAction).forEach(([e,n])=>{let r=e.split("/")[1];this.threeAnimAction!==n&&r===i&&(t?n.fadeOut(.2):n.stop())}),t&&this.threeAnimAction?.fadeIn(.2)},this.startOnceDelay)}pause(){this.threeAnimAction&&(this.threeAnimAction.paused=!0),window.clearTimeout(this.timeoutId),delete this.timeoutId}stop(){this.threeAnimAction?.fadeOut(.2)}seek(t){this.threeAnimAction=this.animationControls.play(this.data),this.threeAnimAction&&(this.threeAnimAction.paused=!0,this.threeAnimAction.time=m.clamp(this.threeAnimAction.time+1/60*t,this.leftFrameTime,this.rightFrameTime-16e-5),this.animationControls.needsUpdate=!0,this.animationControls.requestRender())}toggle(t,i=!1){if(!1===s(this.shared,this.condition))return!1;this.toggleIsForward=t??!this.toggleIsForward,this.threeAnimAction&&(this.threeAnimAction._loopCount=0),this.playing?this.threeAnimAction&&(this.threeAnimAction.timeScale=this.toggleIsForward?1:-1,this.toggleIsForward?(this.threeAnimAction._clip.start=this.leftFrameTime,this.threeAnimAction._clip.duration=this.rightFrameTime):(this.threeAnimAction._clip.start=this.rightFrameTime,this.threeAnimAction._clip.duration=this.leftFrameTime)):this.timeoutId=window.setTimeout(()=>{if(this.threeAnimAction=this.animationControls.play(this.data),this.threeAnimAction){this.toggleIsForward?(this.threeAnimAction.time=this.leftFrameTime,this.threeAnimAction._clip.start=this.leftFrameTime,this.threeAnimAction._clip.duration=this.rightFrameTime):(this.threeAnimAction.time=this.rightFrameTime,this.threeAnimAction._clip.start=this.rightFrameTime,this.threeAnimAction._clip.duration=this.leftFrameTime),this.threeAnimAction.paused=!1,this.threeAnimAction.timeScale=this.toggleIsForward?1:-1;let t=this.data.clipId.split("/")[1];Object.entries(this.animationControls.clipIdToAction).forEach(([e,n])=>{let r=e.split("/")[1];this.threeAnimAction!==n&&r===t&&n.isRunning()&&(i?n.fadeOut(.2):n.stop())}),i&&this.threeAnimAction?.fadeIn(.2)}},this.startOnceDelay)}playFromCurrent(){this.toggle(!0)}reverseFromCurrent(){this.toggle(!1)}dispose(){let t=this.animationControls.clipIdToAction[this.data.clipId+"/"+this.data.object]?.getClip();t&&(t.duration=this.duration),this.pause()}};n(i),r("Transition",({eventType:i,data:e,page:n,shared:r,actionCondition:s})=>new t(i,e,n,r,s)),r("Animation",({data:t,page:i,eventManager:e,shared:n,actionCondition:r})=>new a(t,i,e.animationControls,n,r)),h("transitions");
@@ -0,0 +1 @@
1
+ import{a as e}from"./runtime-chunk-CVUJ3GMH.js";import{a as t,b as i,c as r,d as a,f as s,g as n,h,i as d,j as o,k as m,l as c,m as u,n as l}from"./runtime-chunk-YWT6AWL4.js";import"./runtime-chunk-NTUTXO7Q.js";import"./runtime-chunk-FTVQTRM7.js";import{I as p,ea as f}from"./runtime-chunk-LALFWESO.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{b as v}from"./runtime-chunk-PLJ25O2X.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import{e as g,f as y}from"./runtime-chunk-5XUI4Z6R.js";import{a as w,f as O,j as P}from"./runtime-chunk-TZCHGFVF.js";import{E as j}from"./runtime-chunk-OW6T4XFV.js";import{Ae as b,Ba as x,Bd as R,Cc as S,Lc as F,Le as T,bd as H,ce as W,dd as I,ld as D}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";function U(e,t,i,r){return r?i:2048/Math.max(1,e,t)}var E=new b(-1,1,1,-1,0,1),M=new class extends I{constructor(){super(),this.setAttribute("position",new H([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new H([0,2,0,0,2,0],2))}},B=new W({defines:{},uniforms:{tDiffuse:new T(null)},vertexShader:"\n\tvarying vec2 vUv;\n\tvoid main() {\n\t\tvUv = uv;\n\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t}",fragmentShader:"\n\tuniform sampler2D tDiffuse;\n\tvarying vec2 vUv;\n\tvoid main() {\n\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\tgl_FragColor = texel;\n\t}"}),z=new class{constructor(e){this._mesh=new D(M,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,E)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}(B),G=null,k=null,_=t.identity(),C=class{constructor(t,i,r,s){var n;this.uuid=t,this.width=i,this.height=r,this.context=s,this.enabled=!0,this.isScreenSpace=!1,this.dpr=window.devicePixelRatio,this.isFrameDirty=!1,this.onRenderRequestedDownstream=()=>{this.isFrameDirty=!0,this.isScreenSpace||e(this),this.context.shared.requestRender()},this._innerApplySize=()=>{let e=this.width,t=this.height;this.renderer.dpr=U(e,t,this.dpr,this.isScreenSpace),this.renderer.setSize(e,t)},this.onFrameOverrideObjectEvent=e=>{if(void 0!==e.target?.uuid){let t=this.frameRoot?.find(e.target.uuid);t&&t.dispatchEvent({...e,target:t})}},this.scene2d=new u(S.generateUUID(),y.defaultData,{dpr:window.devicePixelRatio,shared:s.shared}),this.canvas=(null===G&&(G=document.createElement("canvas")),G),this.renderer=(n=this.canvas,null===k&&(k=new a(n)),k),this.promise=this.init(),this.renderTarget=new F(1,1,{type:x,stencilBuffer:!1,depthBuffer:!1}),s.shared.addUIBuffer(this.uuid,this.renderTarget),this.textureHolder=s.shared.uiBuffer(this.uuid)}get canvasTexture(){return this._canvasTexture||(this._canvasTexture=new R(this.canvas)),this._canvasTexture}async init(){await this.renderer.init(),this.renderer.uiFontReady?.then(()=>{this.frameOverride&&this.onRenderRequestedDownstream()})}render(e){if(this.isFrameDirty){if(this.isFrameDirty=!1,this._innerApplySize(),this.renderer.clear(),this.frameOverride?.draw(this.renderer),this.renderer.render(),this.canvasTexture.needsUpdate=!0,e.blitTextureToTarget)e.blitTextureToTarget(this.canvasTexture,this.renderTarget);else{B.uniforms.tDiffuse.value=this.canvasTexture;let t=e.getRenderTarget();e.setRenderTarget(this.renderTarget),e.clear(),z.render(e),e.setRenderTarget(t)}this.textureHolder?.setNeedsUpdate(!0)}}updateEntity2DByOp(e,t,i,r){this.scene2d.updateEntityByOp(e,t,i,r),this.applySize()}updateTreeByOp(e,t){this.scene2d.updateTreeByOp(e,t),this.applySize()}applyOverrides(e){if(this.frameOverride&&this.frameRoot){this.frameOverride.position=[0,0],this.frameOverride.rotation=0;let t=e?.width??this.width,i=e?.height??this.height;this.frameOverride.width=t,this.frameOverride.height=i,this.frameOverride.localMatrix=_,this.isScreenSpace&&(this.frameOverride.fill.color=j.from0to1([0,0,0,0])),this.frameOverride.data={...this.frameOverride.data,width:t,height:i},L({objectOverride:this.frameOverride,objectRoot:this.frameRoot,newParentWidth:this.frameOverride.width,newParentHeight:this.frameOverride.height,initialParentWidth:this.frameRoot.width,initialParentHeight:this.frameRoot.height}),this.frameOverride.updateWorldMatrix(!0,!1,!0)}}applySize(e,t=window.devicePixelRatio){let i=Math.max(1,e?.width??this.width),r=Math.max(1,e?.height??this.height);this.dpr=t,this.width=i,this.height=r,this._innerApplySize();let a=function(e,t,i,r){let a=U(e,t,i,r),s=Math.max(i,512/Math.min(e,t)),n=Math.min(s,a);return{width:Math.max(1,Math.ceil(e*n)),height:Math.max(1,Math.ceil(t*n))}}(i,r,t,this.isScreenSpace);this.renderTarget.setSize(a.width,a.height),this._canvasTexture?.dispose(),this._canvasTexture=void 0,this.applyOverrides(e),this.frameOverride?.requestRender()}applyFrame(e){let t=this.context.scene.find2D(e);if(t&&t instanceof o)return this.disposeFrameOverride(),this.frameRoot=t,this.frameOverride=t.clone({dpr:this.renderer.dpr,shared:this.context.shared}),this.scene2d.add(this.frameOverride),this.applySize(),this.frame?.addEventListener("render",this.onRenderRequestedDownstream),this.frameOverride.traverse(e=>{e.addEventListener("beginState",this.onFrameOverrideObjectEvent)}),this.frameOverride.traverse(e=>{e.addEventListener("completeState",this.onFrameOverrideObjectEvent)}),this.frame?.requestRender(),t}get frame(){return this.frameOverride}get frameId(){return this.frame?.uuid}find(e){return this.scene2d.find(e)}get texture(){return this.textureHolder?.getTexture(1001)}disposeFrameOverride(){this.frameOverride?.removeEventListener("render",this.onRenderRequestedDownstream),this.frameOverride?.traverse(e=>{e.removeEventListener("beginStateChange",this.onFrameOverrideObjectEvent)}),this.frameOverride?.traverse(e=>{e.removeEventListener("completeState",this.onFrameOverrideObjectEvent)}),this.frameOverride&&this.scene2d.remove(this.frameOverride)}};function L({objectOverride:e,objectRoot:t,newParentWidth:i,newParentHeight:r,initialParentWidth:a,initialParentHeight:s}){if(e instanceof o&&t instanceof o||e instanceof d&&t instanceof d)for(let n=0,h=e.children.length;n<h;n++){let h=e.children[n],d=t.children[n];h&&d&&h.uuid===d.uuid&&A({objectOverride:h,objectRoot:d,newParentWidth:i,newParentHeight:r,initialParentWidth:a,initialParentHeight:s})}}function A({objectOverride:e,objectRoot:t,newParentWidth:i,newParentHeight:r,initialParentWidth:a,initialParentHeight:s}){let[n,h]=function(e){if(V(e))return[e.width,e.height];if(e instanceof m){let[t,i]=e.getHalfSize();return[2*t,2*i]}if(e instanceof d){let[t,i]=e.recursiveBBox.getHalfSize();return[2*t,2*i]}return[0,0]}(t),{width:o,height:u,position:p}=l({constraints:e.data,newParentWidth:i,newParentHeight:r,initialParentWidth:a,initialParentHeight:s,objectInitialWidth:n,objectInitialHeight:h,objectInitialPosition:t.position});if(e.position=p,e.data={...e.data,position:p},e.states)for(let n in e.states)q({stateId:n,objectOverride:e,objectRoot:t,newParentWidth:i,newParentHeight:r,initialParentWidth:a,initialParentHeight:s});if(V(e)||e instanceof d)V(e)&&(e.width=o,e.height=u,e.data={...e.data,width:o,height:u}),L({objectOverride:e,objectRoot:t,newParentWidth:o,newParentHeight:u,initialParentWidth:n,initialParentHeight:h});else if(e instanceof m){let i=t,r=0!==n?o/n:1,a=0!==h?u/h:1;e.path=c(i.path,r,a),e.data={...e.data,path:e.path}}}function q({stateId:e,objectOverride:t,objectRoot:i,newParentWidth:r,newParentHeight:a,initialParentWidth:s,initialParentHeight:n}){let h=t.states?.[e],d=i.states?.[e];if(h&&d){let{width:i,height:o,position:m}=l({constraints:t.data,newParentWidth:r,newParentHeight:a,initialParentWidth:s,initialParentHeight:n,objectInitialWidth:g.isResizeable(d)?d.width:0,objectInitialHeight:g.isResizeable(d)?d.height:0,objectInitialPosition:d.position});Object.assign(t.states[e],{position:m}),g.isResizeable(h)&&Object.assign(t.states[e],{width:i,height:o})}}function V(e){return e instanceof n||e instanceof o||e instanceof s||e instanceof h}var X=class extends f{constructor(e,t,i){super(e,t,i),this.isUIObject=!0,this.uiCanvas=new C(e+"-canvas",t.geometry.width,t.geometry.height,i),this.uiCanvas.promise.then(()=>{this.applyFrame(this.dataPatched.geometry.frame,i.shared)})}updateByPatchedOpGeometry(e,t,i){super.updateByPatchedOpGeometry(e,t,i),0===e.type&&(void 0!==e.props.frame&&this.applyFrame(e.props.frame,i.shared),(void 0!==e.props.width||void 0!==e.props.height)&&this.applySize(e.props,i.shared))}applySize(e,t){let i=e?.width??this.dataPatched.geometry.width,r=e?.height??this.dataPatched.geometry.height;this.uiCanvas.applySize({width:i,height:r}),this.applyGeometryParametersFromFrame(t)}applyFrame(e,t){this.uiCanvas.applyFrame(e),this.applyGeometryParametersFromFrame(t),this.applyMaterialParametersFromFrame({shared:t})}applyGeometryParametersFromFrame(e){let t=this.frame;t&&(Object.assign(this.data,{geometry:Object.assign(this.data.geometry,{cornerRadius:t.cornerRadius,cornerType:0})}),Object.assign(this.dataPatched,{geometry:Object.assign(this.dataPatched.geometry,{cornerRadius:t.cornerRadius,cornerType:0})}),this.localGeometry?.dispose(),this.localGeometry=p(this.dataPatched.geometry,e,this.data.flatShading,this))}applyMaterialParametersFromFrame(e){let t=this.frame;if(t){let i=t.data.backgroundBlur;Object.assign(this.data.material.layers[0].data.texture,{image:this.uiCanvas.uuid}),Object.assign(this.data.material.layers[1].data,{roughness:i.radius,alpha:i.enabled?1:0}),Object.assign(this.dataPatched.material.layers[0].data.texture,{image:this.uiCanvas.uuid}),Object.assign(this.dataPatched.material.layers[1].data,{roughness:i.radius,alpha:i.enabled?1:0}),this.material.reset?.(this.dataPatched.material,e,!0)}}updateEntity2DByOp(e,t,i,r){this.uiCanvas.updateEntity2DByOp(e,t,i,r),e===this.frameId&&0===t.type&&(void 0!==t.props.cornerRadius?this.applyGeometryParametersFromFrame(r):v(t.path,["backgroundBlur"])&&this.applyMaterialParametersFromFrame({shared:r}))}get frame(){return this.uiCanvas.frame}get frameId(){return this.frame?.uuid}removeInteractionGeometry(e){super.removeInteractionGeometry(e),this.applySize({},e)}updateGeometryInteractions(e,t){super.updateGeometryInteractions(e,t),this.applySize({width:e.width,height:e.height},t);let i={...this.data.geometry,...e};this.localGeometry?.dispose(),this.localGeometry=p(i,t,this.data.flatShading,this)}};O("UIGeometry",(e,t,i)=>new X(e,t,i)),P({Scene2D:u,UICanvas:C,loadHanaUIRUNTIME:r,setHanaUIWasmUrl:i}),w("ui-2d");
@@ -1 +1 @@
1
- import{b as e}from"./runtime-chunk-TU4KDRKR.js";import{a,b as t}from"./runtime-chunk-DZNU62CT.js";import{a as i,b as s,e as r,f as n,g as d}from"./runtime-chunk-MM75L5X4.js";import"./runtime-chunk-Z5OH244S.js";import{a as o}from"./runtime-chunk-TZCHGFVF.js";import{Ha as h,Ia as l,v as c}from"./runtime-chunk-OW6T4XFV.js";import{Cc as m,Ec as p,Fc as u,Oc as y,Pc as V}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var b=new y,v=new u,f=new p,g=new u,T=new V,I=class extends a{constructor(a,t,i,s,r){super(a),this.sharedVariables=t,this.eventManager=i,this.needsMouse=s,this.needsRaycast=r,this.dynamicVars=[],this.variablesToWatch=[],this.prevMouseProperty=null,this.prevRaycastProperty=null,this.pauseTime=0,this.isOutOfFocus=!1,this.events=[],this.onFrame=a=>{let t=this.eventContext.sharedAssets;if(this.rafId=window.requestAnimationFrame(this.onFrame),this.isOutOfFocus)return;let i=new Date,s=[],r=[];for(let e=0;e<this.propertiesToWatch.length;e++){let{objectId:a,property:t,prevValue:i}=this.propertiesToWatch[e],s=this.eventContext.scene.find(a),n=c.propertyPaths[t];if("width"===n[0]||"height"===n[0]||"depth"===n[0])s=s.geometry.userData.parameters[n[0]];else if(("position"===n[0]||"rotation"===n[0]&&n.length>1)&&s.getPhysicsLocalMatrix?.(b))b.decompose(v,f,g),"position"===n[0]?s=n.length>1?v[n[1]]:v:(T.setFromQuaternion(f,s.rotation.order),s=T[n[1]]);else for(let e=0;e<n.length;e++)s=s[n[e]];null===i?this.propertiesToWatch[e].prevValue=s instanceof u?s.clone():s:(s instanceof u?!s.equals(i):i!==s)&&(r.push({objId:a,property:t}),s instanceof u?this.propertiesToWatch[e].prevValue.copy(s):this.propertiesToWatch[e].prevValue=s)}for(let e=0;e<this.variablesToWatch.length;e++){let{id:a,prevValue:i}=this.variablesToWatch[e],r=t.getVariable(a);r!==i&&(s.push(a),this.variablesToWatch[e].prevValue=r)}for(let r=0;r<this.dynamicVars.length;r++){let{id:n,expectedTime:d,last:o,data:c,timerSeconds:p,startValue:u}=this.dynamicVars[r],y=1e3;if("timer"!==c.dynamicVariableType&&"stopwatch"!==c.dynamicVariableType||"number3decimal"!==c.format?"counter"===c.dynamicVariableType?y=c.updateInterval:"random"===c.dynamicVariableType&&(y=c.isStatic?1/0:c.updateInterval):y=1,-1!==d){if("Stopped"!==t.getDynamicVariablePlayState(n)&&"Restarted"!==t.getDynamicVariablePlayState(n)||(this.dynamicVars[r].last=a,this.dynamicVars[r].expectedTime=a+y,"counter"===c.dynamicVariableType&&t.getVariable(n)!==u&&(t.updateVariable(n,u),this.eventManager.requestRender()),("timer"===c.dynamicVariableType||"stopwatch"===c.dynamicVariableType)&&this.dynamicVars[r].timerSeconds!==u&&(this.dynamicVars[r].timerSeconds=u,t.updateVariable(n,l.getFormattedTimerTime(u,c)),this.eventManager.requestRender()),"Restarted"===t.getDynamicVariablePlayState(n)&&t.setDynamicVariablePlayState(n,"Playing"),"Stopped"!==t.getDynamicVariablePlayState(n))){if("Paused"===t.getDynamicVariablePlayState(n)){void 0===this.dynamicVars[r].deltaToExpectedTime&&(this.dynamicVars[r].deltaToExpectedTime=Math.max(this.dynamicVars[r].expectedTime-a,0)),this.dynamicVars[r].last=a-(y-this.dynamicVars[r].deltaToExpectedTime),this.dynamicVars[r].expectedTime=a+this.dynamicVars[r].deltaToExpectedTime;continue}if(this.dynamicVars[r].deltaToExpectedTime=void 0,a>=d)if(this.dynamicVars[r].last=a,this.dynamicVars[r].expectedTime+=y,"random"===c.dynamicVariableType){let e=c.min+Math.random()*(c.max-c.min),a=c.decimals;e=Math.round(e*Math.pow(10,a))/Math.pow(10,a),t.updateVariable(n,e),s.push(n),this.eventManager.requestRender()}else if("counter"===c.dynamicVariableType){let e=t.getVariable(n),a=t.getDynamicVariableToggleIsForward(n)??!0,i=t.getVariable(n)+c.increment*(a?1:-1);c.hasEnd&&(i=c.increment>0?m.clamp(i,u,c.endValue):m.clamp(i,c.endValue,u),i===u&&t.setDynamicVariableToggleIsForward(n,void 0),c.repeat?i===c.endValue&&(i=u):(i===u||i===c.endValue)&&t.setDynamicVariablePlayState(n,"Paused")),i!==e&&(s.push(n),t.updateVariable(n,i),this.eventManager.requestRender())}else if("time"===c.dynamicVariableType){let a=t.getVariable(n),r=e(i,c);if("object"==typeof a&&"textValue"in a&&"object"==typeof r&&"textValue"in r){if(Array.isArray(a.textValue)&&Array.isArray(r.textValue)){if(a.textValue.every((e,a)=>e===r.textValue[a]))continue}else if(a.textValue===r.textValue)continue}else if(a===r)continue;t.updateVariable(n,r),s.push(n),this.eventManager.requestRender()}else{let e=h.isTextValue(c.endValue)?w(c.endValue.textValue):c.endValue,i=t.getDynamicVariableToggleIsForward(n)??!0,d=p+(a-o)/1e3*("timer"===c.dynamicVariableType?-1:1)*(i?1:-1);d=Math.max(d,0),c.hasEnd&&(d="stopwatch"===c.dynamicVariableType?m.clamp(d,u,e):m.clamp(d,e,u),d===u&&t.setDynamicVariableToggleIsForward(n,void 0),c.repeat?Math.abs(d-e)<("number3decimal"===c.format?1e-4:.1)&&(d=u):(Math.abs(d-u)<("number3decimal"===c.format?1e-4:.1)||Math.abs(d-e)<("number3decimal"===c.format?1e-4:.1))&&t.setDynamicVariablePlayState(n,"Paused")),d!==p&&(s.push(n),this.dynamicVars[r].timerSeconds=d,t.updateVariable(n,l.getFormattedTimerTime(d,c)),this.eventManager.requestRender())}}}else this.dynamicVars[r].last=a,this.dynamicVars[r].expectedTime=a+y}let n=!1;t.mouseProperty!==this.prevMouseProperty&&(this.prevMouseProperty=t.mouseProperty,n=!0);let d=!1;t.raycastProperty!==this.prevRaycastProperty&&(this.prevRaycastProperty=t.raycastProperty,d=!0),this.events.forEach(e=>{(s.includes(e.data.variableId)||r.find(a=>a.objId===e.data.objectId&&a.property===e.data.property)||"mouseProperty"===e.data.variableId&&n||"raycastProperty"===e.data.variableId&&d)&&(e.dispatch(),this.eventManager.requestRender())})},this.onBlur=()=>{this.pause()},this.onFocus=()=>{this.resume()}}pause(){this.isOutOfFocus||(this.isOutOfFocus=!0,this.pauseTime=Date.now())}resume(){if(!this.isOutOfFocus)return;this.isOutOfFocus=!1;let e=Date.now()-this.pauseTime;for(let a=0;a<this.dynamicVars.length;a++)this.dynamicVars[a].last+=e,this.dynamicVars[a].expectedTime+=e}connect(){this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"VariableChange"===e.data.type&&!e.data.disabled).forEach(a=>{this.events.push(new P(a.id,a.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),this.propertiesToWatch=this.events.filter(e=>"objectProperty"===e.data.variableId&&null!==e.data.objectId).map(e=>({objectId:e.data.objectId,property:e.data.property,prevValue:null}));let a=this.eventContext.sharedAssets;this.sharedVariables.forEach(({id:t,data:i})=>{if(!("dynamicVariableType"in i))return void(this.events.find(e=>e.data.variableId===t)&&this.variablesToWatch.push({id:t,prevValue:a.getVariable(t)}));let s;if("timer"===i.dynamicVariableType||"stopwatch"===i.dynamicVariableType){let e;if(h.isTextValue(i.value)&&Array.isArray(i.value.textValue)){let a=i.value.textValue;e=3===a.length?a[2]+60*a[1]+3600*a[0]:a[1]+60*a[0]}else e=i.value;s=e,this.dynamicVars.push({id:t,last:-1,expectedTime:-1,data:i,timerSeconds:e,startValue:s})}else"time"===i.dynamicVariableType&&a.updateVariable(t,e(new Date,i)),"counter"===i.dynamicVariableType&&(s=h.isTextValue(i.value)?w(i.value.textValue):i.value),this.dynamicVars.push({id:t,last:-1,expectedTime:-1,data:i,startValue:s})}),this.rafId=window.requestAnimationFrame(this.onFrame),window.addEventListener("blur",this.onBlur),window.addEventListener("focus",this.onFocus)}disconnect(){window.removeEventListener("blur",this.onBlur),window.removeEventListener("focus",this.onFocus),this.rafId&&(window.cancelAnimationFrame(this.rafId),this.rafId=void 0),this.events.forEach(e=>e.dispose())}},P=class{constructor(e,a,t,i,s,r){this.id=e,this.data=a,this.object=t,this.actions=n(a,a.actions,i,s,r,t)}dispatch(){let e=this.actions;e.Audio.forEach(e=>e.dispatchConditional()),e.Particles.forEach(e=>e.dispatchConditional()),e.Video.forEach(e=>e.dispatchConditional()),e.Create.forEach(e=>e.dispatch()),e.Destroy.forEach(e=>e.dispatch()),e.Reset.forEach(e=>e.dispatch()),e.Transition.forEach(e=>{e.object.currentTransitionEvent!==this&&(e.object.currentTransitionEvent=this),e.init()}),e.Transition.forEach(e=>e.play()),e.Animation.forEach(e=>e.play()),e.TimelineAnimation.forEach(e=>e.dispatchConditional()),e.SwitchCamera.forEach(e=>e.play()),e.SceneTransition.forEach(e=>e.dispatch()),e.SetVariable.forEach(e=>e.checkConditions()),e.SetVariable.forEach(e=>e.dispatch()),e.DynamicVariablePlay.forEach(e=>e.dispatch()),e.ClearLocalStorage.forEach(e=>e.dispatch()),e.UserAPI.forEach(e=>e.dispatch())}dispose(){d(this.actions)}};function w(e){return 3===e.length?e[2]+60*e[1]+3600*e[0]:e[1]+60*e[0]}var x=class{constructor(e,a,t,i){this.data=e,this.page=a,this.shared=t,this.condition=i,this.evaluatedCondition=!1}checkConditions(){this.evaluatedCondition=r(this.shared,this.condition)}dispatch(){if(!1===this.evaluatedCondition)return!1;let e=this.shared.getVariable(this.data.variableId),a=i(this.data.expression,this.shared,h.typeOfVariable(e));void 0!==a&&this.shared.updateVariable(this.data.variableId,"string"==typeof a?{textValue:a}:a)}dispose(){}},D=class{constructor(e,a,t,i){this.data=e,this.page=a,this.shared=t,this.condition=i,this.timeoutId=null}dispatchInner(){if(!1===r(this.shared,this.condition))return!1;let e=this.shared.getDynamicVariablePlayState(this.data.variableId);if("PlayPause"===this.data.mode)void 0===this.shared.getDynamicVariableToggleIsForward(this.data.variableId)&&this.shared.setDynamicVariableToggleIsForward(this.data.variableId,!0),this.shared.setDynamicVariablePlayState(this.data.variableId,"Playing"===e?"Paused":"Playing");else if("Play"===this.data.mode&&"Playing"!==e)void 0===this.shared.getDynamicVariableToggleIsForward(this.data.variableId)&&this.shared.setDynamicVariableToggleIsForward(this.data.variableId,!0),this.shared.setDynamicVariablePlayState(this.data.variableId,"Playing");else if("Stop"===this.data.mode&&"Stopped"!==e)this.shared.setDynamicVariablePlayState(this.data.variableId,"Stopped");else if("Pause"===this.data.mode&&"Paused"!==e)this.shared.setDynamicVariablePlayState(this.data.variableId,"Paused");else if("Restart"===this.data.mode)this.shared.setDynamicVariablePlayState(this.data.variableId,"Restarted");else if("Toggle"===this.data.mode){let a=this.shared.getDynamicVariableToggleIsForward(this.data.variableId);"Playing"===e?this.shared.setDynamicVariableToggleIsForward(this.data.variableId,void 0!==a&&!a):(this.shared.setDynamicVariableToggleIsForward(this.data.variableId,!a),this.shared.setDynamicVariablePlayState(this.data.variableId,"Playing"))}}dispatch(){let e=this.data.delay,a=this.shared.getDynamicVariablePlayState(this.data.variableId);"PlayPause"===this.data.mode&&"Playing"===a&&(e=this.data.pauseDelay),0!==e?(this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(()=>{this.timeoutId=null,this.dispatchInner()},e)):this.dispatchInner()}dispose(){this.timeoutId&&window.clearTimeout(this.timeoutId)}};t("VariableChange",({eventContext:e,sharedVariables:a,eventManager:t,needsMouse:i,needsRaycast:s})=>new I(e,a,t,i,s)),s("SetVariable",({data:e,page:a,shared:t,actionCondition:i})=>new x(e,a,t,i)),s("DynamicVariablePlay",({data:e,page:a,shared:t,actionCondition:i})=>new D(e,a,t,i)),o("variables");
1
+ import{b as e}from"./runtime-chunk-TU4KDRKR.js";import{a,b as t}from"./runtime-chunk-DZNU62CT.js";import{a as i,b as s,e as r,f as n,g as d}from"./runtime-chunk-QVC5UDJO.js";import"./runtime-chunk-5XUI4Z6R.js";import{a as o}from"./runtime-chunk-TZCHGFVF.js";import{Ha as h,Ia as l,v as c}from"./runtime-chunk-OW6T4XFV.js";import{Cc as m,Ec as p,Fc as u,Oc as y,Pc as V}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var b=new y,v=new u,f=new p,g=new u,T=new V,I=class extends a{constructor(a,t,i,s,r){super(a),this.sharedVariables=t,this.eventManager=i,this.needsMouse=s,this.needsRaycast=r,this.dynamicVars=[],this.variablesToWatch=[],this.prevMouseProperty=null,this.prevRaycastProperty=null,this.pauseTime=0,this.isOutOfFocus=!1,this.events=[],this.onFrame=a=>{let t=this.eventContext.sharedAssets;if(this.rafId=window.requestAnimationFrame(this.onFrame),this.isOutOfFocus)return;let i=new Date,s=[],r=[];for(let e=0;e<this.propertiesToWatch.length;e++){let{objectId:a,property:t,prevValue:i}=this.propertiesToWatch[e],s=this.eventContext.scene.find(a),n=c.propertyPaths[t];if("width"===n[0]||"height"===n[0]||"depth"===n[0])s=s.geometry.userData.parameters[n[0]];else if(("position"===n[0]||"rotation"===n[0]&&n.length>1)&&s.getPhysicsLocalMatrix?.(b))b.decompose(v,f,g),"position"===n[0]?s=n.length>1?v[n[1]]:v:(T.setFromQuaternion(f,s.rotation.order),s=T[n[1]]);else for(let e=0;e<n.length;e++)s=s[n[e]];null===i?this.propertiesToWatch[e].prevValue=s instanceof u?s.clone():s:(s instanceof u?!s.equals(i):i!==s)&&(r.push({objId:a,property:t}),s instanceof u?this.propertiesToWatch[e].prevValue.copy(s):this.propertiesToWatch[e].prevValue=s)}for(let e=0;e<this.variablesToWatch.length;e++){let{id:a,prevValue:i}=this.variablesToWatch[e],r=t.getVariable(a);r!==i&&(s.push(a),this.variablesToWatch[e].prevValue=r)}for(let r=0;r<this.dynamicVars.length;r++){let{id:n,expectedTime:d,last:o,data:c,timerSeconds:p,startValue:u}=this.dynamicVars[r],y=1e3;if("timer"!==c.dynamicVariableType&&"stopwatch"!==c.dynamicVariableType||"number3decimal"!==c.format?"counter"===c.dynamicVariableType?y=c.updateInterval:"random"===c.dynamicVariableType&&(y=c.isStatic?1/0:c.updateInterval):y=1,-1!==d){if("Stopped"!==t.getDynamicVariablePlayState(n)&&"Restarted"!==t.getDynamicVariablePlayState(n)||(this.dynamicVars[r].last=a,this.dynamicVars[r].expectedTime=a+y,"counter"===c.dynamicVariableType&&t.getVariable(n)!==u&&(t.updateVariable(n,u),this.eventManager.requestRender()),("timer"===c.dynamicVariableType||"stopwatch"===c.dynamicVariableType)&&this.dynamicVars[r].timerSeconds!==u&&(this.dynamicVars[r].timerSeconds=u,t.updateVariable(n,l.getFormattedTimerTime(u,c)),this.eventManager.requestRender()),"Restarted"===t.getDynamicVariablePlayState(n)&&t.setDynamicVariablePlayState(n,"Playing"),"Stopped"!==t.getDynamicVariablePlayState(n))){if("Paused"===t.getDynamicVariablePlayState(n)){void 0===this.dynamicVars[r].deltaToExpectedTime&&(this.dynamicVars[r].deltaToExpectedTime=Math.max(this.dynamicVars[r].expectedTime-a,0)),this.dynamicVars[r].last=a-(y-this.dynamicVars[r].deltaToExpectedTime),this.dynamicVars[r].expectedTime=a+this.dynamicVars[r].deltaToExpectedTime;continue}if(this.dynamicVars[r].deltaToExpectedTime=void 0,a>=d)if(this.dynamicVars[r].last=a,this.dynamicVars[r].expectedTime+=y,"random"===c.dynamicVariableType){let e=c.min+Math.random()*(c.max-c.min),a=c.decimals;e=Math.round(e*Math.pow(10,a))/Math.pow(10,a),t.updateVariable(n,e),s.push(n),this.eventManager.requestRender()}else if("counter"===c.dynamicVariableType){let e=t.getVariable(n),a=t.getDynamicVariableToggleIsForward(n)??!0,i=t.getVariable(n)+c.increment*(a?1:-1);c.hasEnd&&(i=c.increment>0?m.clamp(i,u,c.endValue):m.clamp(i,c.endValue,u),i===u&&t.setDynamicVariableToggleIsForward(n,void 0),c.repeat?i===c.endValue&&(i=u):(i===u||i===c.endValue)&&t.setDynamicVariablePlayState(n,"Paused")),i!==e&&(s.push(n),t.updateVariable(n,i),this.eventManager.requestRender())}else if("time"===c.dynamicVariableType){let a=t.getVariable(n),r=e(i,c);if("object"==typeof a&&"textValue"in a&&"object"==typeof r&&"textValue"in r){if(Array.isArray(a.textValue)&&Array.isArray(r.textValue)){if(a.textValue.every((e,a)=>e===r.textValue[a]))continue}else if(a.textValue===r.textValue)continue}else if(a===r)continue;t.updateVariable(n,r),s.push(n),this.eventManager.requestRender()}else{let e=h.isTextValue(c.endValue)?w(c.endValue.textValue):c.endValue,i=t.getDynamicVariableToggleIsForward(n)??!0,d=p+(a-o)/1e3*("timer"===c.dynamicVariableType?-1:1)*(i?1:-1);d=Math.max(d,0),c.hasEnd&&(d="stopwatch"===c.dynamicVariableType?m.clamp(d,u,e):m.clamp(d,e,u),d===u&&t.setDynamicVariableToggleIsForward(n,void 0),c.repeat?Math.abs(d-e)<("number3decimal"===c.format?1e-4:.1)&&(d=u):(Math.abs(d-u)<("number3decimal"===c.format?1e-4:.1)||Math.abs(d-e)<("number3decimal"===c.format?1e-4:.1))&&t.setDynamicVariablePlayState(n,"Paused")),d!==p&&(s.push(n),this.dynamicVars[r].timerSeconds=d,t.updateVariable(n,l.getFormattedTimerTime(d,c)),this.eventManager.requestRender())}}}else this.dynamicVars[r].last=a,this.dynamicVars[r].expectedTime=a+y}let n=!1;t.mouseProperty!==this.prevMouseProperty&&(this.prevMouseProperty=t.mouseProperty,n=!0);let d=!1;t.raycastProperty!==this.prevRaycastProperty&&(this.prevRaycastProperty=t.raycastProperty,d=!0),this.events.forEach(e=>{(s.includes(e.data.variableId)||r.find(a=>a.objId===e.data.objectId&&a.property===e.data.property)||"mouseProperty"===e.data.variableId&&n||"raycastProperty"===e.data.variableId&&d)&&(e.dispatch(),this.eventManager.requestRender())})},this.onBlur=()=>{this.pause()},this.onFocus=()=>{this.resume()}}pause(){this.isOutOfFocus||(this.isOutOfFocus=!0,this.pauseTime=Date.now())}resume(){if(!this.isOutOfFocus)return;this.isOutOfFocus=!1;let e=Date.now()-this.pauseTime;for(let a=0;a<this.dynamicVars.length;a++)this.dynamicVars[a].last+=e,this.dynamicVars[a].expectedTime+=e}connect(){this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"VariableChange"===e.data.type&&!e.data.disabled).forEach(a=>{this.events.push(new P(a.id,a.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),this.propertiesToWatch=this.events.filter(e=>"objectProperty"===e.data.variableId&&null!==e.data.objectId).map(e=>({objectId:e.data.objectId,property:e.data.property,prevValue:null}));let a=this.eventContext.sharedAssets;this.sharedVariables.forEach(({id:t,data:i})=>{if(!("dynamicVariableType"in i))return void(this.events.find(e=>e.data.variableId===t)&&this.variablesToWatch.push({id:t,prevValue:a.getVariable(t)}));let s;if("timer"===i.dynamicVariableType||"stopwatch"===i.dynamicVariableType){let e;if(h.isTextValue(i.value)&&Array.isArray(i.value.textValue)){let a=i.value.textValue;e=3===a.length?a[2]+60*a[1]+3600*a[0]:a[1]+60*a[0]}else e=i.value;s=e,this.dynamicVars.push({id:t,last:-1,expectedTime:-1,data:i,timerSeconds:e,startValue:s})}else"time"===i.dynamicVariableType&&a.updateVariable(t,e(new Date,i)),"counter"===i.dynamicVariableType&&(s=h.isTextValue(i.value)?w(i.value.textValue):i.value),this.dynamicVars.push({id:t,last:-1,expectedTime:-1,data:i,startValue:s})}),this.rafId=window.requestAnimationFrame(this.onFrame),window.addEventListener("blur",this.onBlur),window.addEventListener("focus",this.onFocus)}disconnect(){window.removeEventListener("blur",this.onBlur),window.removeEventListener("focus",this.onFocus),this.rafId&&(window.cancelAnimationFrame(this.rafId),this.rafId=void 0),this.events.forEach(e=>e.dispose())}},P=class{constructor(e,a,t,i,s,r){this.id=e,this.data=a,this.object=t,this.actions=n(a,a.actions,i,s,r,t)}dispatch(){let e=this.actions;e.Audio.forEach(e=>e.dispatchConditional()),e.Particles.forEach(e=>e.dispatchConditional()),e.Video.forEach(e=>e.dispatchConditional()),e.Create.forEach(e=>e.dispatch()),e.Destroy.forEach(e=>e.dispatch()),e.Reset.forEach(e=>e.dispatch()),e.Transition.forEach(e=>{e.object.currentTransitionEvent!==this&&(e.object.currentTransitionEvent=this),e.init()}),e.Transition.forEach(e=>e.play()),e.Animation.forEach(e=>e.play()),e.TimelineAnimation.forEach(e=>e.dispatchConditional()),e.SwitchCamera.forEach(e=>e.play()),e.SceneTransition.forEach(e=>e.dispatch()),e.SetVariable.forEach(e=>e.checkConditions()),e.SetVariable.forEach(e=>e.dispatch()),e.DynamicVariablePlay.forEach(e=>e.dispatch()),e.ClearLocalStorage.forEach(e=>e.dispatch()),e.UserAPI.forEach(e=>e.dispatch())}dispose(){d(this.actions)}};function w(e){return 3===e.length?e[2]+60*e[1]+3600*e[0]:e[1]+60*e[0]}var x=class{constructor(e,a,t,i){this.data=e,this.page=a,this.shared=t,this.condition=i,this.evaluatedCondition=!1}checkConditions(){this.evaluatedCondition=r(this.shared,this.condition)}dispatch(){if(!1===this.evaluatedCondition)return!1;let e=this.shared.getVariable(this.data.variableId),a=i(this.data.expression,this.shared,h.typeOfVariable(e));void 0!==a&&this.shared.updateVariable(this.data.variableId,"string"==typeof a?{textValue:a}:a)}dispose(){}},D=class{constructor(e,a,t,i){this.data=e,this.page=a,this.shared=t,this.condition=i,this.timeoutId=null}dispatchInner(){if(!1===r(this.shared,this.condition))return!1;let e=this.shared.getDynamicVariablePlayState(this.data.variableId);if("PlayPause"===this.data.mode)void 0===this.shared.getDynamicVariableToggleIsForward(this.data.variableId)&&this.shared.setDynamicVariableToggleIsForward(this.data.variableId,!0),this.shared.setDynamicVariablePlayState(this.data.variableId,"Playing"===e?"Paused":"Playing");else if("Play"===this.data.mode&&"Playing"!==e)void 0===this.shared.getDynamicVariableToggleIsForward(this.data.variableId)&&this.shared.setDynamicVariableToggleIsForward(this.data.variableId,!0),this.shared.setDynamicVariablePlayState(this.data.variableId,"Playing");else if("Stop"===this.data.mode&&"Stopped"!==e)this.shared.setDynamicVariablePlayState(this.data.variableId,"Stopped");else if("Pause"===this.data.mode&&"Paused"!==e)this.shared.setDynamicVariablePlayState(this.data.variableId,"Paused");else if("Restart"===this.data.mode)this.shared.setDynamicVariablePlayState(this.data.variableId,"Restarted");else if("Toggle"===this.data.mode){let a=this.shared.getDynamicVariableToggleIsForward(this.data.variableId);"Playing"===e?this.shared.setDynamicVariableToggleIsForward(this.data.variableId,void 0!==a&&!a):(this.shared.setDynamicVariableToggleIsForward(this.data.variableId,!a),this.shared.setDynamicVariablePlayState(this.data.variableId,"Playing"))}}dispatch(){let e=this.data.delay,a=this.shared.getDynamicVariablePlayState(this.data.variableId);"PlayPause"===this.data.mode&&"Playing"===a&&(e=this.data.pauseDelay),0!==e?(this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(()=>{this.timeoutId=null,this.dispatchInner()},e)):this.dispatchInner()}dispose(){this.timeoutId&&window.clearTimeout(this.timeoutId)}};t("VariableChange",({eventContext:e,sharedVariables:a,eventManager:t,needsMouse:i,needsRaycast:s})=>new I(e,a,t,i,s)),s("SetVariable",({data:e,page:a,shared:t,actionCondition:i})=>new x(e,a,t,i)),s("DynamicVariablePlay",({data:e,page:a,shared:t,actionCondition:i})=>new D(e,a,t,i)),o("variables");
@@ -1 +1 @@
1
- import{ea as t}from"./runtime-chunk-NRJDJMQZ.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{u as e}from"./runtime-chunk-ZLW3UWOA.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-Z5OH244S.js";import{a as r,f as i}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var n=class extends t{get forceComputeSize(){return!0}get shape(){return this.geometry.userData.shape}updateEntityBoxSize(t,r){let i=this.geometry.getAttribute("position");void 0!==i?e(i,this.geometry.drawRange.start,this.geometry.drawRange.count<1/0?this.geometry.drawRange.count:i.count,t,r):super.updateEntityBoxSize(t,r)}};i("VectorGeometry",(t,e,r)=>new n(t,e,r)),r("vector-shapes");
1
+ import{ea as t}from"./runtime-chunk-LALFWESO.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{u as e}from"./runtime-chunk-PLJ25O2X.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-5XUI4Z6R.js";import{a as r,f as i}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var n=class extends t{get forceComputeSize(){return!0}get shape(){return this.geometry.userData.shape}updateEntityBoxSize(t,r){let i=this.geometry.getAttribute("position");void 0!==i?e(i,this.geometry.drawRange.start,this.geometry.drawRange.count<1/0?this.geometry.drawRange.count:i.count,t,r):super.updateEntityBoxSize(t,r)}};i("VectorGeometry",(t,e,r)=>new n(t,e,r)),r("vector-shapes");
@@ -1 +1 @@
1
- import{c as t}from"./runtime-chunk-FQNSP44B.js";import{b as i,e}from"./runtime-chunk-MM75L5X4.js";import{e as s}from"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-Z5OH244S.js";import{a}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var o=new Map,d=new Map,n=class{constructor(i,e,s){this.data=e,this.isPlayVideoAction=!0,this.delay=0,this.status="stopped";let{layerId:a,loop:n,volume:h,delay:l}=e;if(this.object=s,void 0===a)throw new Error("Missing property");let r=function(t,i){let e;if("material"in t){let s=t.material;e=Array.isArray(s)?t.material[0].layers.find(t=>t.uuid===i):t.material.layers.find(t=>t.uuid===i)}if(!e)return;let s=e.color?.texture?.image?.img??e.holders?.find(t=>t.isVideo)?.img;return s instanceof HTMLVideoElement?s:void 0}(s,a);r&&(this.videoElement=r,this.videoElement.loop=n===1/0,t&&(this.videoElement.autoplay=!0),void 0!==h&&(this.videoElement.volume=h)),void 0!==l&&(this.delay=l),d.has(s.uuid)?d.get(s.uuid).push(this):d.set(s.uuid,[this]),o.set(i,this),this.pause()}mute(){!this.videoElement||(this.videoElement.muted=!0)}unMute(){!this.videoElement||(this.videoElement.muted=!1)}play(t){if(!this.videoElement)return;let i=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);t?(this.mute(),this.delay+=150):i?(this.mute(),window.setTimeout(()=>{this.unMute()},100)):this.unMute(),this.delayTimerId=window.setTimeout(()=>{if(!this.videoElement)return;let t=this.videoElement.play();void 0!==t&&t.then(t=>{}).catch(t=>{this.play()}),this.clearDelay()},this.delay),this.status="playing"}clearDelay(){this.delayTimerId&&(clearTimeout(this.delayTimerId),delete this.delayTimerId)}pause(){!this.videoElement||(this.videoElement.pause(),this.status="paused")}stop(){!this.videoElement||(this.videoElement.pause(),this.videoElement.currentTime=0,this.status="stopped",this.clearDelay())}seek(t){return new Promise(i=>{if(!this.videoElement)return i();let e=this.videoElement.duration;if(e>0){let i=t%e;this.videoElement.currentTime=i}this.videoElement.addEventListener("seeked",()=>i(),{once:!0})})}playByToggle(){"stop"===this.data.toggle?"playing"===this.status?this.stop():(this.stop(),this.play()):"pause"===this.data.toggle?"playing"===this.status?this.pause():this.play():(this.stop(),this.play())}dispose(){!this.videoElement||(this.stop(),this.videoElement.muted=!0)}},h=class{constructor(t){this.data=t,this.isPauseVideoAction=!0}dispatch(){this.data.playVideo?this.pauseVideo(this.data.playVideo):this.data.object?this.pauseAllVideosFromObject(this.data.object):this.pauseAllVideos()}pauseVideo(t){let i=o.get(t);!i||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{i[this.data.interaction](),this.disposeDelay()},this.data.delay)):i[this.data.interaction]())}pauseAllVideosFromObject(t){let i=d.get(t);!i?.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{i.forEach(t=>t[this.data.interaction]()),this.disposeDelay()},this.data.delay)):i.forEach(t=>t[this.data.interaction]()))}pauseAllVideos(){let t=[...d.values()];!t.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{t.forEach(t=>{t.forEach(t=>{t[this.data.interaction]()})}),this.disposeDelay()},this.data.delay)):t.forEach(t=>{t.forEach(t=>{t[this.data.interaction]()})}))}disposeDelay(){clearTimeout(this.timeoutId),delete this.timeoutId}dispose(){clearTimeout(this.timeoutId),delete this.timeoutId}},l=class{constructor(t,i,e,s,a){if(this.data=i,this.shared=s,this.condition=a,"play"===i.interaction)this.interaction=new n(t,i,e);else{if("pause"!==i.interaction&&"stop"!==i.interaction)throw new Error("Missing property");this.interaction=new h(i)}}dispatchBasic(){if(!1===e(this.shared,this.condition))return!1;this.interaction instanceof n?this.interaction.playByToggle():this.interaction.dispatch()}dispatchConditional(){if(!1===e(this.shared,this.condition))return!1;this.interaction instanceof n?this.interaction.play():this.interaction.dispatch()}dispose(){this.interaction.dispose()}};i("Video",({id:t,data:i,object:e,shared:a,actionCondition:o})=>s(e)?null:new l(t,i,e,a,o)),a("video");
1
+ import{c as t}from"./runtime-chunk-FQNSP44B.js";import{b as i,e}from"./runtime-chunk-QVC5UDJO.js";import{e as s}from"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-5XUI4Z6R.js";import{a}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var o=new Map,d=new Map,n=class{constructor(i,e,s){this.data=e,this.isPlayVideoAction=!0,this.delay=0,this.status="stopped";let{layerId:a,loop:n,volume:h,delay:l}=e;if(this.object=s,void 0===a)throw new Error("Missing property");let r=function(t,i){let e;if("material"in t){let s=t.material;e=Array.isArray(s)?t.material[0].layers.find(t=>t.uuid===i):t.material.layers.find(t=>t.uuid===i)}if(!e)return;let s=e.color?.texture?.image?.img??e.holders?.find(t=>t.isVideo)?.img;return s instanceof HTMLVideoElement?s:void 0}(s,a);r&&(this.videoElement=r,this.videoElement.loop=n===1/0,t&&(this.videoElement.autoplay=!0),void 0!==h&&(this.videoElement.volume=h)),void 0!==l&&(this.delay=l),d.has(s.uuid)?d.get(s.uuid).push(this):d.set(s.uuid,[this]),o.set(i,this),this.pause()}mute(){!this.videoElement||(this.videoElement.muted=!0)}unMute(){!this.videoElement||(this.videoElement.muted=!1)}play(t){if(!this.videoElement)return;let i=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);t?(this.mute(),this.delay+=150):i?(this.mute(),window.setTimeout(()=>{this.unMute()},100)):this.unMute(),this.delayTimerId=window.setTimeout(()=>{if(!this.videoElement)return;let t=this.videoElement.play();void 0!==t&&t.then(t=>{}).catch(t=>{this.play()}),this.clearDelay()},this.delay),this.status="playing"}clearDelay(){this.delayTimerId&&(clearTimeout(this.delayTimerId),delete this.delayTimerId)}pause(){!this.videoElement||(this.videoElement.pause(),this.status="paused")}stop(){!this.videoElement||(this.videoElement.pause(),this.videoElement.currentTime=0,this.status="stopped",this.clearDelay())}seek(t){return new Promise(i=>{if(!this.videoElement)return i();let e=this.videoElement.duration;if(e>0){let i=t%e;this.videoElement.currentTime=i}this.videoElement.addEventListener("seeked",()=>i(),{once:!0})})}playByToggle(){"stop"===this.data.toggle?"playing"===this.status?this.stop():(this.stop(),this.play()):"pause"===this.data.toggle?"playing"===this.status?this.pause():this.play():(this.stop(),this.play())}dispose(){!this.videoElement||(this.stop(),this.videoElement.muted=!0)}},h=class{constructor(t){this.data=t,this.isPauseVideoAction=!0}dispatch(){this.data.playVideo?this.pauseVideo(this.data.playVideo):this.data.object?this.pauseAllVideosFromObject(this.data.object):this.pauseAllVideos()}pauseVideo(t){let i=o.get(t);!i||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{i[this.data.interaction](),this.disposeDelay()},this.data.delay)):i[this.data.interaction]())}pauseAllVideosFromObject(t){let i=d.get(t);!i?.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{i.forEach(t=>t[this.data.interaction]()),this.disposeDelay()},this.data.delay)):i.forEach(t=>t[this.data.interaction]()))}pauseAllVideos(){let t=[...d.values()];!t.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{t.forEach(t=>{t.forEach(t=>{t[this.data.interaction]()})}),this.disposeDelay()},this.data.delay)):t.forEach(t=>{t.forEach(t=>{t[this.data.interaction]()})}))}disposeDelay(){clearTimeout(this.timeoutId),delete this.timeoutId}dispose(){clearTimeout(this.timeoutId),delete this.timeoutId}},l=class{constructor(t,i,e,s,a){if(this.data=i,this.shared=s,this.condition=a,"play"===i.interaction)this.interaction=new n(t,i,e);else{if("pause"!==i.interaction&&"stop"!==i.interaction)throw new Error("Missing property");this.interaction=new h(i)}}dispatchBasic(){if(!1===e(this.shared,this.condition))return!1;this.interaction instanceof n?this.interaction.playByToggle():this.interaction.dispatch()}dispatchConditional(){if(!1===e(this.shared,this.condition))return!1;this.interaction instanceof n?this.interaction.play():this.interaction.dispatch()}dispose(){this.interaction.dispose()}};i("Video",({id:t,data:i,object:e,shared:a,actionCondition:o})=>s(e)?null:new l(t,i,e,a,o)),a("video");