@splinetool/runtime 2.0.6 → 2.0.7
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.
- package/build/hana-ui.js +44 -40
- package/build/hana-ui.js.br +0 -0
- package/build/hana-ui.js.gz +0 -0
- package/build/hana-ui.wasm +0 -0
- package/build/hana-ui.wasm.br +0 -0
- package/build/hana-ui.wasm.gz +0 -0
- package/build/{runtime-aiAssistant-KA7ZJ3F6.js → runtime-aiAssistant-KCI2YU3F.js} +1 -1
- package/build/runtime-aiAssistant-KCI2YU3F.js.br +0 -0
- package/build/runtime-aiAssistant-KCI2YU3F.js.gz +0 -0
- package/build/{runtime-apiServices-CGMAW2B4.js → runtime-apiServices-EYRJ5E55.js} +1 -1
- package/build/runtime-apiServices-EYRJ5E55.js.br +0 -0
- package/build/runtime-apiServices-EYRJ5E55.js.gz +0 -0
- package/build/{runtime-audio-GCUGVRQ3.js → runtime-audio-TEHDPDRZ.js} +1 -1
- package/build/runtime-audio-TEHDPDRZ.js.br +4 -0
- package/build/runtime-audio-TEHDPDRZ.js.gz +0 -0
- package/build/{runtime-chunk-ITLS6YIC.js → runtime-chunk-3LIYAJXD.js} +1 -1
- package/build/runtime-chunk-3LIYAJXD.js.br +0 -0
- package/build/runtime-chunk-3LIYAJXD.js.gz +0 -0
- package/build/{runtime-chunk-3KIZF7P5.js → runtime-chunk-4DM3XFSJ.js} +1 -1
- package/build/runtime-chunk-4DM3XFSJ.js.br +0 -0
- package/build/runtime-chunk-4DM3XFSJ.js.gz +0 -0
- package/build/{runtime-chunk-MM2G3DLE.js → runtime-chunk-5P3HUPT4.js} +1 -1
- package/build/runtime-chunk-5P3HUPT4.js.br +0 -0
- package/build/runtime-chunk-5P3HUPT4.js.gz +0 -0
- package/build/{runtime-chunk-RRXSRYPQ.js → runtime-chunk-72GELULA.js} +1 -1
- package/build/{runtime-chunk-RRXSRYPQ.js.br → runtime-chunk-72GELULA.js.br} +0 -0
- package/build/runtime-chunk-72GELULA.js.gz +0 -0
- package/build/{runtime-chunk-4DNX5FPP.js → runtime-chunk-BHBI2VFL.js} +1 -1
- package/build/runtime-chunk-BHBI2VFL.js.br +0 -0
- package/build/runtime-chunk-BHBI2VFL.js.gz +0 -0
- package/build/{runtime-chunk-LX3KCQF6.js → runtime-chunk-BR3T7PBD.js} +1 -1
- package/build/runtime-chunk-BR3T7PBD.js.br +0 -0
- package/build/runtime-chunk-BR3T7PBD.js.gz +0 -0
- package/build/{runtime-chunk-4KX4KQWR.js → runtime-chunk-DCPBSRSM.js} +1 -1
- package/build/runtime-chunk-DCPBSRSM.js.br +0 -0
- package/build/runtime-chunk-DCPBSRSM.js.gz +0 -0
- package/build/{runtime-chunk-PUBEJSJO.js → runtime-chunk-E3ZOKGVW.js} +1 -1
- package/build/runtime-chunk-E3ZOKGVW.js.br +0 -0
- package/build/runtime-chunk-E3ZOKGVW.js.gz +0 -0
- package/build/{runtime-chunk-CEAWQBAS.js → runtime-chunk-EKVJUEYP.js} +1 -1
- package/build/runtime-chunk-EKVJUEYP.js.br +0 -0
- package/build/runtime-chunk-EKVJUEYP.js.gz +0 -0
- package/build/{runtime-chunk-NWCLOXDY.js → runtime-chunk-EPHVY3XO.js} +1 -1
- package/build/runtime-chunk-EPHVY3XO.js.br +0 -0
- package/build/runtime-chunk-EPHVY3XO.js.gz +0 -0
- package/build/{runtime-chunk-GN3HDYV2.js → runtime-chunk-H7J7NLSC.js} +1 -1
- package/build/runtime-chunk-H7J7NLSC.js.br +0 -0
- package/build/runtime-chunk-H7J7NLSC.js.gz +0 -0
- package/build/{runtime-chunk-CCJD7IX7.js → runtime-chunk-HDFBDUFX.js} +1 -1
- package/build/runtime-chunk-HDFBDUFX.js.br +0 -0
- package/build/runtime-chunk-HDFBDUFX.js.gz +0 -0
- package/build/{runtime-chunk-GO25U5WN.js → runtime-chunk-ITMHVNES.js} +1 -1
- package/build/runtime-chunk-ITMHVNES.js.br +0 -0
- package/build/runtime-chunk-ITMHVNES.js.gz +0 -0
- package/build/{runtime-chunk-FY3XD5P2.js → runtime-chunk-JVRISZP3.js} +1 -1
- package/build/runtime-chunk-JVRISZP3.js.br +0 -0
- package/build/runtime-chunk-JVRISZP3.js.gz +0 -0
- package/build/{runtime-chunk-SXPM42HJ.js → runtime-chunk-LX7POLY3.js} +1 -1
- package/build/runtime-chunk-LX7POLY3.js.br +0 -0
- package/build/runtime-chunk-LX7POLY3.js.gz +0 -0
- package/build/{runtime-chunk-NAJSQF6K.js → runtime-chunk-NPNRGCX3.js} +1 -1
- package/build/runtime-chunk-NPNRGCX3.js.br +0 -0
- package/build/runtime-chunk-NPNRGCX3.js.gz +0 -0
- package/build/{runtime-chunk-4E4NQ6GS.js → runtime-chunk-O37H7LZI.js} +1 -1
- package/build/{runtime-chunk-4E4NQ6GS.js.br → runtime-chunk-O37H7LZI.js.br} +0 -0
- package/build/runtime-chunk-O37H7LZI.js.gz +0 -0
- package/build/{runtime-chunk-JQ3A6ENO.js → runtime-chunk-O5TGJH3R.js} +1 -1
- package/build/runtime-chunk-O5TGJH3R.js.br +0 -0
- package/build/runtime-chunk-O5TGJH3R.js.gz +0 -0
- package/build/{runtime-chunk-XXRCB3ME.js → runtime-chunk-PEOLFGBX.js} +1 -1
- package/build/runtime-chunk-PEOLFGBX.js.br +0 -0
- package/build/runtime-chunk-PEOLFGBX.js.gz +0 -0
- package/build/{runtime-chunk-XUM5HEC6.js → runtime-chunk-QPWV26TX.js} +1 -1
- package/build/runtime-chunk-QPWV26TX.js.br +0 -0
- package/build/runtime-chunk-QPWV26TX.js.gz +0 -0
- package/build/{runtime-chunk-HUFJRFTO.js → runtime-chunk-RDQUMMBI.js} +1 -1
- package/build/runtime-chunk-RDQUMMBI.js.br +0 -0
- package/build/runtime-chunk-RDQUMMBI.js.gz +0 -0
- package/build/{runtime-chunk-OF7IZ6BI.js → runtime-chunk-SBMXYV5Q.js} +1 -1
- package/build/runtime-chunk-SBMXYV5Q.js.br +0 -0
- package/build/runtime-chunk-SBMXYV5Q.js.gz +0 -0
- package/build/{runtime-chunk-KYA2CB5O.js → runtime-chunk-TONK22EB.js} +1 -1
- package/build/runtime-chunk-TONK22EB.js.br +0 -0
- package/build/runtime-chunk-TONK22EB.js.gz +0 -0
- package/build/{runtime-chunk-R34HNX2O.js → runtime-chunk-U4QOT2PX.js} +1 -1
- package/build/runtime-chunk-U4QOT2PX.js.br +0 -0
- package/build/runtime-chunk-U4QOT2PX.js.gz +0 -0
- package/build/{runtime-chunk-CX2MRLZA.js → runtime-chunk-UYADWI5Q.js} +1 -1
- package/build/runtime-chunk-UYADWI5Q.js.br +0 -0
- package/build/runtime-chunk-UYADWI5Q.js.gz +0 -0
- package/build/{runtime-chunk-RBM3UDQF.js → runtime-chunk-VPEJ5BFD.js} +1 -1
- package/build/runtime-chunk-VPEJ5BFD.js.br +0 -0
- package/build/{runtime-chunk-RBM3UDQF.js.gz → runtime-chunk-VPEJ5BFD.js.gz} +0 -0
- package/build/{runtime-chunk-H7D3VFTJ.js → runtime-chunk-WZWD2YIG.js} +1 -1
- package/build/runtime-chunk-WZWD2YIG.js.br +0 -0
- package/build/runtime-chunk-WZWD2YIG.js.gz +0 -0
- package/build/{runtime-chunk-AKWBEROQ.js → runtime-chunk-XL37JGAH.js} +1 -1
- package/build/runtime-chunk-XL37JGAH.js.br +0 -0
- package/build/runtime-chunk-XL37JGAH.js.gz +0 -0
- package/build/{runtime-chunk-BPYFB4BD.js → runtime-chunk-XYRJFDFM.js} +1 -1
- package/build/runtime-chunk-XYRJFDFM.js.br +0 -0
- package/build/runtime-chunk-XYRJFDFM.js.gz +0 -0
- package/build/{runtime-classicRuntime-PJ7JLKSY.js → runtime-classicRuntime-T2PZUVVV.js} +1 -1
- package/build/runtime-classicRuntime-T2PZUVVV.js.br +0 -0
- package/build/runtime-classicRuntime-T2PZUVVV.js.gz +0 -0
- package/build/runtime-cloners-TRZ7JQLO.js +1 -0
- package/build/runtime-cloners-TRZ7JQLO.js.br +0 -0
- package/build/runtime-cloners-TRZ7JQLO.js.gz +0 -0
- package/build/{runtime-components-VRLLFORJ.js → runtime-components-VZOXPM65.js} +1 -1
- package/build/runtime-components-VZOXPM65.js.br +0 -0
- package/build/runtime-components-VZOXPM65.js.gz +0 -0
- package/build/{runtime-conditional-VA7AKA6O.js → runtime-conditional-HGOAXTBF.js} +1 -1
- package/build/runtime-conditional-HGOAXTBF.js.br +0 -0
- package/build/runtime-conditional-HGOAXTBF.js.gz +0 -0
- package/build/{runtime-createDestroy-IQVBLQ24.js → runtime-createDestroy-AXHU4HXJ.js} +1 -1
- package/build/runtime-createDestroy-AXHU4HXJ.js.br +0 -0
- package/build/runtime-createDestroy-AXHU4HXJ.js.gz +0 -0
- package/build/{runtime-dragDrop-XFI62H3C.js → runtime-dragDrop-CKSSHBJ2.js} +1 -1
- package/build/runtime-dragDrop-CKSSHBJ2.js.br +0 -0
- package/build/runtime-dragDrop-CKSSHBJ2.js.gz +0 -0
- package/build/{runtime-gameControls-W3YS7OS2.js → runtime-gameControls-Y42GYPNR.js} +1 -1
- package/build/runtime-gameControls-Y42GYPNR.js.br +0 -0
- package/build/runtime-gameControls-Y42GYPNR.js.gz +0 -0
- package/build/runtime-hair-FXERW4BM.js +1 -0
- package/build/runtime-hair-FXERW4BM.js.br +2 -0
- package/build/runtime-hair-FXERW4BM.js.gz +0 -0
- package/build/{runtime-mergeStaticGeometries-KJFDZ7TP.js → runtime-mergeStaticGeometries-7CWREJDS.js} +1 -1
- package/build/runtime-mergeStaticGeometries-7CWREJDS.js.br +0 -0
- package/build/runtime-mergeStaticGeometries-7CWREJDS.js.gz +0 -0
- package/build/{runtime-miscActions-UGVVC2QC.js → runtime-miscActions-UBT3FDIC.js} +1 -1
- package/build/runtime-miscActions-UBT3FDIC.js.br +0 -0
- package/build/runtime-miscActions-UBT3FDIC.js.gz +0 -0
- package/build/{runtime-mouseHover-O7Y26SM5.js → runtime-mouseHover-GDKHMRYT.js} +1 -1
- package/build/runtime-mouseHover-GDKHMRYT.js.br +0 -0
- package/build/runtime-mouseHover-GDKHMRYT.js.gz +0 -0
- package/build/{runtime-particles-GFRULQXO.js → runtime-particles-H6ZGTDQ3.js} +1 -1
- package/build/runtime-particles-H6ZGTDQ3.js.br +0 -0
- package/build/runtime-particles-H6ZGTDQ3.js.gz +0 -0
- package/build/{runtime-paths-Q7I56BAX.js → runtime-paths-HN53AEBL.js} +1 -1
- package/build/runtime-paths-HN53AEBL.js.br +0 -0
- package/build/runtime-paths-HN53AEBL.js.gz +0 -0
- package/build/{runtime-resize-2ZFLSK2M.js → runtime-resize-TUVUJVJY.js} +1 -1
- package/build/runtime-resize-TUVUJVJY.js.br +0 -0
- package/build/runtime-resize-TUVUJVJY.js.gz +0 -0
- package/build/{runtime-sceneTransition-Z65VROHI.js → runtime-sceneTransition-DTM34VVE.js} +1 -1
- package/build/runtime-sceneTransition-DTM34VVE.js.br +0 -0
- package/build/runtime-sceneTransition-DTM34VVE.js.gz +0 -0
- package/build/{runtime-scroll-NWKW6A6L.js → runtime-scroll-AFN3LCAC.js} +1 -1
- package/build/runtime-scroll-AFN3LCAC.js.br +0 -0
- package/build/runtime-scroll-AFN3LCAC.js.gz +0 -0
- package/build/runtime-shapeBlends-DOVFXT5Z.js +1 -0
- package/build/runtime-shapeBlends-DOVFXT5Z.js.br +0 -0
- package/build/runtime-shapeBlends-DOVFXT5Z.js.gz +0 -0
- package/build/{runtime-text-VK3OGBSY.js → runtime-text-HV7E4TSW.js} +1 -1
- package/build/runtime-text-HV7E4TSW.js.br +0 -0
- package/build/runtime-text-HV7E4TSW.js.gz +0 -0
- package/build/{runtime-textInputs-JJQSKO3C.js → runtime-textInputs-77LAXHNH.js} +1 -1
- package/build/runtime-textInputs-77LAXHNH.js.br +0 -0
- package/build/runtime-textInputs-77LAXHNH.js.gz +0 -0
- package/build/{runtime-timeline-WRAEBCRZ.js → runtime-timeline-GUSMJD46.js} +1 -1
- package/build/runtime-timeline-GUSMJD46.js.br +0 -0
- package/build/runtime-timeline-GUSMJD46.js.gz +0 -0
- package/build/{runtime-tracking-KYP5WOMH.js → runtime-tracking-XZCI3RKR.js} +1 -1
- package/build/runtime-tracking-XZCI3RKR.js.br +0 -0
- package/build/runtime-tracking-XZCI3RKR.js.gz +0 -0
- package/build/{runtime-transitions-FDRKYMVP.js → runtime-transitions-SBVQ7DIZ.js} +1 -1
- package/build/runtime-transitions-SBVQ7DIZ.js.br +0 -0
- package/build/runtime-transitions-SBVQ7DIZ.js.gz +0 -0
- package/build/{runtime-ui2d-YO6M74VQ.js → runtime-ui2d-KEK4JA3H.js} +1 -1
- package/build/runtime-ui2d-KEK4JA3H.js.br +0 -0
- package/build/runtime-ui2d-KEK4JA3H.js.gz +0 -0
- package/build/{runtime-updater-FS5YHXO4.js → runtime-updater-GOXAMNAK.js} +1 -1
- package/build/runtime-updater-GOXAMNAK.js.br +5 -0
- package/build/runtime-updater-GOXAMNAK.js.gz +0 -0
- package/build/{runtime-variables-CYDDC6HF.js → runtime-variables-36KLHNE5.js} +1 -1
- package/build/runtime-variables-36KLHNE5.js.br +0 -0
- package/build/runtime-variables-36KLHNE5.js.gz +0 -0
- package/build/{runtime-vectorShapes-VMDJ36X2.js → runtime-vectorShapes-U7BI3CMD.js} +1 -1
- package/build/runtime-vectorShapes-U7BI3CMD.js.br +0 -0
- package/build/runtime-vectorShapes-U7BI3CMD.js.gz +0 -0
- package/build/{runtime-video-MTXK33PT.js → runtime-video-XIULR4BY.js} +1 -1
- package/build/runtime-video-XIULR4BY.js.br +0 -0
- package/build/runtime-video-XIULR4BY.js.gz +0 -0
- package/build/runtime-webgpu-3QIPQDJ4.js +1 -0
- package/build/runtime-webgpu-3QIPQDJ4.js.br +0 -0
- package/build/runtime-webgpu-3QIPQDJ4.js.gz +0 -0
- package/build/runtime.cjs +5 -5
- package/build/runtime.js +1 -1
- package/build/runtime.js.br +0 -0
- package/build/runtime.js.gz +0 -0
- package/build/runtime.standalone.js +1 -1
- package/build/runtime.standalone.js.br +0 -0
- package/build/runtime.standalone.js.gz +0 -0
- package/build/runtime.standalone.webgl.js +1 -1
- package/build/runtime.standalone.webgl.js.br +0 -0
- package/build/runtime.standalone.webgl.js.gz +0 -0
- package/build/runtime.standalone.webgpu.js +1 -1
- package/build/runtime.standalone.webgpu.js.br +0 -0
- package/build/runtime.standalone.webgpu.js.gz +0 -0
- package/build/runtime.standalone.webgpu.micro.js +1 -1
- package/build/runtime.standalone.webgpu.micro.js.br +0 -0
- package/build/runtime.standalone.webgpu.micro.js.gz +0 -0
- package/build/runtime.standalone.webgpu.min.js +1 -1
- package/build/runtime.standalone.webgpu.min.js.br +0 -0
- package/build/runtime.standalone.webgpu.min.js.gz +0 -0
- package/package.json +1 -1
- package/build/runtime-aiAssistant-KA7ZJ3F6.js.br +0 -0
- package/build/runtime-aiAssistant-KA7ZJ3F6.js.gz +0 -0
- package/build/runtime-apiServices-CGMAW2B4.js.br +0 -0
- package/build/runtime-apiServices-CGMAW2B4.js.gz +0 -0
- package/build/runtime-audio-GCUGVRQ3.js.br +0 -0
- package/build/runtime-audio-GCUGVRQ3.js.gz +0 -0
- package/build/runtime-chunk-3KIZF7P5.js.br +0 -0
- package/build/runtime-chunk-3KIZF7P5.js.gz +0 -0
- package/build/runtime-chunk-4DNX5FPP.js.br +0 -0
- package/build/runtime-chunk-4DNX5FPP.js.gz +0 -0
- package/build/runtime-chunk-4E4NQ6GS.js.gz +0 -0
- package/build/runtime-chunk-4KX4KQWR.js.br +0 -0
- package/build/runtime-chunk-4KX4KQWR.js.gz +0 -0
- package/build/runtime-chunk-AKWBEROQ.js.br +0 -0
- package/build/runtime-chunk-AKWBEROQ.js.gz +0 -0
- package/build/runtime-chunk-BPYFB4BD.js.br +0 -0
- package/build/runtime-chunk-BPYFB4BD.js.gz +0 -0
- package/build/runtime-chunk-CCJD7IX7.js.br +0 -0
- package/build/runtime-chunk-CCJD7IX7.js.gz +0 -0
- package/build/runtime-chunk-CEAWQBAS.js.br +0 -0
- package/build/runtime-chunk-CEAWQBAS.js.gz +0 -0
- package/build/runtime-chunk-CX2MRLZA.js.br +0 -0
- package/build/runtime-chunk-CX2MRLZA.js.gz +0 -0
- package/build/runtime-chunk-FY3XD5P2.js.br +0 -0
- package/build/runtime-chunk-FY3XD5P2.js.gz +0 -0
- package/build/runtime-chunk-GN3HDYV2.js.br +0 -0
- package/build/runtime-chunk-GN3HDYV2.js.gz +0 -0
- package/build/runtime-chunk-GO25U5WN.js.br +0 -0
- package/build/runtime-chunk-GO25U5WN.js.gz +0 -0
- package/build/runtime-chunk-H7D3VFTJ.js.br +0 -0
- package/build/runtime-chunk-H7D3VFTJ.js.gz +0 -0
- package/build/runtime-chunk-HUFJRFTO.js.br +0 -0
- package/build/runtime-chunk-HUFJRFTO.js.gz +0 -0
- package/build/runtime-chunk-ITLS6YIC.js.br +0 -0
- package/build/runtime-chunk-ITLS6YIC.js.gz +0 -0
- package/build/runtime-chunk-JQ3A6ENO.js.br +0 -1
- package/build/runtime-chunk-JQ3A6ENO.js.gz +0 -0
- package/build/runtime-chunk-KYA2CB5O.js.br +0 -0
- package/build/runtime-chunk-KYA2CB5O.js.gz +0 -0
- package/build/runtime-chunk-LX3KCQF6.js.br +0 -0
- package/build/runtime-chunk-LX3KCQF6.js.gz +0 -0
- package/build/runtime-chunk-MM2G3DLE.js.br +0 -0
- package/build/runtime-chunk-MM2G3DLE.js.gz +0 -0
- package/build/runtime-chunk-NAJSQF6K.js.br +0 -0
- package/build/runtime-chunk-NAJSQF6K.js.gz +0 -0
- package/build/runtime-chunk-NWCLOXDY.js.br +0 -0
- package/build/runtime-chunk-NWCLOXDY.js.gz +0 -0
- package/build/runtime-chunk-OF7IZ6BI.js.br +0 -0
- package/build/runtime-chunk-OF7IZ6BI.js.gz +0 -0
- package/build/runtime-chunk-PUBEJSJO.js.br +0 -0
- package/build/runtime-chunk-PUBEJSJO.js.gz +0 -0
- package/build/runtime-chunk-R34HNX2O.js.br +0 -0
- package/build/runtime-chunk-R34HNX2O.js.gz +0 -0
- package/build/runtime-chunk-RBM3UDQF.js.br +0 -0
- package/build/runtime-chunk-RRXSRYPQ.js.gz +0 -0
- package/build/runtime-chunk-SXPM42HJ.js.br +0 -0
- package/build/runtime-chunk-SXPM42HJ.js.gz +0 -0
- package/build/runtime-chunk-XUM5HEC6.js.br +0 -0
- package/build/runtime-chunk-XUM5HEC6.js.gz +0 -0
- package/build/runtime-chunk-XXRCB3ME.js.br +0 -0
- package/build/runtime-chunk-XXRCB3ME.js.gz +0 -0
- package/build/runtime-classicRuntime-PJ7JLKSY.js.br +0 -0
- package/build/runtime-classicRuntime-PJ7JLKSY.js.gz +0 -0
- package/build/runtime-cloners-SM2IKR3Q.js +0 -1
- package/build/runtime-cloners-SM2IKR3Q.js.br +0 -3
- package/build/runtime-cloners-SM2IKR3Q.js.gz +0 -0
- package/build/runtime-components-VRLLFORJ.js.br +0 -0
- package/build/runtime-components-VRLLFORJ.js.gz +0 -0
- package/build/runtime-conditional-VA7AKA6O.js.br +0 -0
- package/build/runtime-conditional-VA7AKA6O.js.gz +0 -0
- package/build/runtime-createDestroy-IQVBLQ24.js.br +0 -0
- package/build/runtime-createDestroy-IQVBLQ24.js.gz +0 -0
- package/build/runtime-dragDrop-XFI62H3C.js.br +0 -0
- package/build/runtime-dragDrop-XFI62H3C.js.gz +0 -0
- package/build/runtime-gameControls-W3YS7OS2.js.br +0 -0
- package/build/runtime-gameControls-W3YS7OS2.js.gz +0 -0
- package/build/runtime-hair-CWPDHNZF.js +0 -1
- package/build/runtime-hair-CWPDHNZF.js.br +0 -1
- package/build/runtime-hair-CWPDHNZF.js.gz +0 -0
- package/build/runtime-mergeStaticGeometries-KJFDZ7TP.js.br +0 -0
- package/build/runtime-mergeStaticGeometries-KJFDZ7TP.js.gz +0 -0
- package/build/runtime-miscActions-UGVVC2QC.js.br +0 -0
- package/build/runtime-miscActions-UGVVC2QC.js.gz +0 -0
- package/build/runtime-mouseHover-O7Y26SM5.js.br +0 -0
- package/build/runtime-mouseHover-O7Y26SM5.js.gz +0 -0
- package/build/runtime-particles-GFRULQXO.js.br +0 -0
- package/build/runtime-particles-GFRULQXO.js.gz +0 -0
- package/build/runtime-paths-Q7I56BAX.js.br +0 -0
- package/build/runtime-paths-Q7I56BAX.js.gz +0 -0
- package/build/runtime-resize-2ZFLSK2M.js.br +0 -0
- package/build/runtime-resize-2ZFLSK2M.js.gz +0 -0
- package/build/runtime-sceneTransition-Z65VROHI.js.br +0 -0
- package/build/runtime-sceneTransition-Z65VROHI.js.gz +0 -0
- package/build/runtime-scroll-NWKW6A6L.js.br +0 -0
- package/build/runtime-scroll-NWKW6A6L.js.gz +0 -0
- package/build/runtime-shapeBlends-QB7JKEHC.js +0 -1
- package/build/runtime-shapeBlends-QB7JKEHC.js.br +0 -5
- package/build/runtime-shapeBlends-QB7JKEHC.js.gz +0 -0
- package/build/runtime-text-VK3OGBSY.js.br +0 -0
- package/build/runtime-text-VK3OGBSY.js.gz +0 -0
- package/build/runtime-textInputs-JJQSKO3C.js.br +0 -0
- package/build/runtime-textInputs-JJQSKO3C.js.gz +0 -0
- package/build/runtime-timeline-WRAEBCRZ.js.br +0 -0
- package/build/runtime-timeline-WRAEBCRZ.js.gz +0 -0
- package/build/runtime-tracking-KYP5WOMH.js.br +0 -0
- package/build/runtime-tracking-KYP5WOMH.js.gz +0 -0
- package/build/runtime-transitions-FDRKYMVP.js.br +0 -0
- package/build/runtime-transitions-FDRKYMVP.js.gz +0 -0
- package/build/runtime-ui2d-YO6M74VQ.js.br +0 -0
- package/build/runtime-ui2d-YO6M74VQ.js.gz +0 -0
- package/build/runtime-updater-FS5YHXO4.js.br +0 -1
- package/build/runtime-updater-FS5YHXO4.js.gz +0 -0
- package/build/runtime-variables-CYDDC6HF.js.br +0 -0
- package/build/runtime-variables-CYDDC6HF.js.gz +0 -0
- package/build/runtime-vectorShapes-VMDJ36X2.js.br +0 -0
- package/build/runtime-vectorShapes-VMDJ36X2.js.gz +0 -0
- package/build/runtime-video-MTXK33PT.js.br +0 -0
- package/build/runtime-video-MTXK33PT.js.gz +0 -0
- package/build/runtime-webgpu-WDY6L7BV.js +0 -1
- package/build/runtime-webgpu-WDY6L7BV.js.br +0 -0
- package/build/runtime-webgpu-WDY6L7BV.js.gz +0 -0
package/build/hana-ui.js
CHANGED
|
@@ -2002,6 +2002,10 @@ function __wbg_get_imports() {
|
|
|
2002
2002
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
2003
2003
|
return addHeapObject(ret);
|
|
2004
2004
|
}, arguments); },
|
|
2005
|
+
__wbg_get_index_ab123d64c89e3156: function(arg0, arg1) {
|
|
2006
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
2007
|
+
return ret;
|
|
2008
|
+
},
|
|
2005
2009
|
__wbg_get_unchecked_33f6e5c9e2f2d6b2: function(arg0, arg1) {
|
|
2006
2010
|
const ret = getObject(arg0)[arg1 >>> 0];
|
|
2007
2011
|
return addHeapObject(ret);
|
|
@@ -2406,7 +2410,7 @@ function __wbg_get_imports() {
|
|
|
2406
2410
|
const a = state0.a;
|
|
2407
2411
|
state0.a = 0;
|
|
2408
2412
|
try {
|
|
2409
|
-
return
|
|
2413
|
+
return __wasm_bindgen_func_elem_14112(a, state0.b, arg0, arg1);
|
|
2410
2414
|
} finally {
|
|
2411
2415
|
state0.a = a;
|
|
2412
2416
|
}
|
|
@@ -2452,7 +2456,7 @@ function __wbg_get_imports() {
|
|
|
2452
2456
|
const a = state0.a;
|
|
2453
2457
|
state0.a = 0;
|
|
2454
2458
|
try {
|
|
2455
|
-
return
|
|
2459
|
+
return __wasm_bindgen_func_elem_14112(a, state0.b, arg0, arg1);
|
|
2456
2460
|
} finally {
|
|
2457
2461
|
state0.a = a;
|
|
2458
2462
|
}
|
|
@@ -3552,48 +3556,48 @@ function __wbg_get_imports() {
|
|
|
3552
3556
|
getObject(arg0).writeTexture(getObject(arg1), getArrayU8FromWasm0(arg2, arg3), getObject(arg4), getObject(arg5));
|
|
3553
3557
|
}, arguments); },
|
|
3554
3558
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
3555
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
3556
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3559
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1052, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3560
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_14110);
|
|
3557
3561
|
return addHeapObject(ret);
|
|
3558
3562
|
},
|
|
3559
3563
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
3560
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx:
|
|
3561
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3564
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 32, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3565
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_5086);
|
|
3562
3566
|
return addHeapObject(ret);
|
|
3563
3567
|
},
|
|
3564
3568
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
3565
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUComputePipeline")], shim_idx:
|
|
3566
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3569
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUComputePipeline")], shim_idx: 927, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3570
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11070);
|
|
3567
3571
|
return addHeapObject(ret);
|
|
3568
3572
|
},
|
|
3569
3573
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
3570
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx:
|
|
3571
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3574
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx: 927, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3575
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11070_3);
|
|
3572
3576
|
return addHeapObject(ret);
|
|
3573
3577
|
},
|
|
3574
3578
|
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
3575
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx:
|
|
3576
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3579
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx: 928, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3580
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11071);
|
|
3577
3581
|
return addHeapObject(ret);
|
|
3578
3582
|
},
|
|
3579
3583
|
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
3580
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPURenderPipeline")], shim_idx:
|
|
3581
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3584
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPURenderPipeline")], shim_idx: 927, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3585
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11070_5);
|
|
3582
3586
|
return addHeapObject(ret);
|
|
3583
3587
|
},
|
|
3584
3588
|
__wbindgen_cast_0000000000000007: function(arg0, arg1) {
|
|
3585
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx:
|
|
3586
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3589
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx: 927, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3590
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11070_6);
|
|
3587
3591
|
return addHeapObject(ret);
|
|
3588
3592
|
},
|
|
3589
3593
|
__wbindgen_cast_0000000000000008: function(arg0, arg1) {
|
|
3590
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx:
|
|
3591
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3594
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx: 927, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3595
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11070_7);
|
|
3592
3596
|
return addHeapObject(ret);
|
|
3593
3597
|
},
|
|
3594
3598
|
__wbindgen_cast_0000000000000009: function(arg0, arg1) {
|
|
3595
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
3596
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3599
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 1035, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3600
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_12477);
|
|
3597
3601
|
return addHeapObject(ret);
|
|
3598
3602
|
},
|
|
3599
3603
|
__wbindgen_cast_000000000000000a: function(arg0) {
|
|
@@ -3667,22 +3671,22 @@ function __wbg_get_imports() {
|
|
|
3667
3671
|
};
|
|
3668
3672
|
}
|
|
3669
3673
|
|
|
3670
|
-
function
|
|
3671
|
-
wasm.
|
|
3674
|
+
function __wasm_bindgen_func_elem_12477(arg0, arg1) {
|
|
3675
|
+
wasm.__wasm_bindgen_func_elem_12477(arg0, arg1);
|
|
3672
3676
|
}
|
|
3673
3677
|
|
|
3674
|
-
function
|
|
3675
|
-
wasm.
|
|
3678
|
+
function __wasm_bindgen_func_elem_5086(arg0, arg1, arg2) {
|
|
3679
|
+
wasm.__wasm_bindgen_func_elem_5086(arg0, arg1, addHeapObject(arg2));
|
|
3676
3680
|
}
|
|
3677
3681
|
|
|
3678
|
-
function
|
|
3679
|
-
wasm.
|
|
3682
|
+
function __wasm_bindgen_func_elem_11071(arg0, arg1, arg2) {
|
|
3683
|
+
wasm.__wasm_bindgen_func_elem_11071(arg0, arg1, addHeapObject(arg2));
|
|
3680
3684
|
}
|
|
3681
3685
|
|
|
3682
|
-
function
|
|
3686
|
+
function __wasm_bindgen_func_elem_14110(arg0, arg1, arg2) {
|
|
3683
3687
|
try {
|
|
3684
3688
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3685
|
-
wasm.
|
|
3689
|
+
wasm.__wasm_bindgen_func_elem_14110(retptr, arg0, arg1, addHeapObject(arg2));
|
|
3686
3690
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3687
3691
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3688
3692
|
if (r1) {
|
|
@@ -3693,10 +3697,10 @@ function __wasm_bindgen_func_elem_12877(arg0, arg1, arg2) {
|
|
|
3693
3697
|
}
|
|
3694
3698
|
}
|
|
3695
3699
|
|
|
3696
|
-
function
|
|
3700
|
+
function __wasm_bindgen_func_elem_11070(arg0, arg1, arg2) {
|
|
3697
3701
|
try {
|
|
3698
3702
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3699
|
-
wasm.
|
|
3703
|
+
wasm.__wasm_bindgen_func_elem_11070(retptr, arg0, arg1, addHeapObject(arg2));
|
|
3700
3704
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3701
3705
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3702
3706
|
if (r1) {
|
|
@@ -3707,10 +3711,10 @@ function __wasm_bindgen_func_elem_9853(arg0, arg1, arg2) {
|
|
|
3707
3711
|
}
|
|
3708
3712
|
}
|
|
3709
3713
|
|
|
3710
|
-
function
|
|
3714
|
+
function __wasm_bindgen_func_elem_11070_3(arg0, arg1, arg2) {
|
|
3711
3715
|
try {
|
|
3712
3716
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3713
|
-
wasm.
|
|
3717
|
+
wasm.__wasm_bindgen_func_elem_11070_3(retptr, arg0, arg1, addHeapObject(arg2));
|
|
3714
3718
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3715
3719
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3716
3720
|
if (r1) {
|
|
@@ -3721,10 +3725,10 @@ function __wasm_bindgen_func_elem_9853_3(arg0, arg1, arg2) {
|
|
|
3721
3725
|
}
|
|
3722
3726
|
}
|
|
3723
3727
|
|
|
3724
|
-
function
|
|
3728
|
+
function __wasm_bindgen_func_elem_11070_5(arg0, arg1, arg2) {
|
|
3725
3729
|
try {
|
|
3726
3730
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3727
|
-
wasm.
|
|
3731
|
+
wasm.__wasm_bindgen_func_elem_11070_5(retptr, arg0, arg1, addHeapObject(arg2));
|
|
3728
3732
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3729
3733
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3730
3734
|
if (r1) {
|
|
@@ -3735,10 +3739,10 @@ function __wasm_bindgen_func_elem_9853_5(arg0, arg1, arg2) {
|
|
|
3735
3739
|
}
|
|
3736
3740
|
}
|
|
3737
3741
|
|
|
3738
|
-
function
|
|
3742
|
+
function __wasm_bindgen_func_elem_11070_6(arg0, arg1, arg2) {
|
|
3739
3743
|
try {
|
|
3740
3744
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3741
|
-
wasm.
|
|
3745
|
+
wasm.__wasm_bindgen_func_elem_11070_6(retptr, arg0, arg1, addHeapObject(arg2));
|
|
3742
3746
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3743
3747
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3744
3748
|
if (r1) {
|
|
@@ -3749,10 +3753,10 @@ function __wasm_bindgen_func_elem_9853_6(arg0, arg1, arg2) {
|
|
|
3749
3753
|
}
|
|
3750
3754
|
}
|
|
3751
3755
|
|
|
3752
|
-
function
|
|
3756
|
+
function __wasm_bindgen_func_elem_11070_7(arg0, arg1, arg2) {
|
|
3753
3757
|
try {
|
|
3754
3758
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3755
|
-
wasm.
|
|
3759
|
+
wasm.__wasm_bindgen_func_elem_11070_7(retptr, arg0, arg1, addHeapObject(arg2));
|
|
3756
3760
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3757
3761
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3758
3762
|
if (r1) {
|
|
@@ -3763,8 +3767,8 @@ function __wasm_bindgen_func_elem_9853_7(arg0, arg1, arg2) {
|
|
|
3763
3767
|
}
|
|
3764
3768
|
}
|
|
3765
3769
|
|
|
3766
|
-
function
|
|
3767
|
-
wasm.
|
|
3770
|
+
function __wasm_bindgen_func_elem_14112(arg0, arg1, arg2, arg3) {
|
|
3771
|
+
wasm.__wasm_bindgen_func_elem_14112(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
3768
3772
|
}
|
|
3769
3773
|
|
|
3770
3774
|
|
package/build/hana-ui.js.br
CHANGED
|
Binary file
|
package/build/hana-ui.js.gz
CHANGED
|
Binary file
|
package/build/hana-ui.wasm
CHANGED
|
Binary file
|
package/build/hana-ui.wasm.br
CHANGED
|
Binary file
|
package/build/hana-ui.wasm.gz
CHANGED
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./runtime-chunk-NTUTXO7Q.js";import{a as t,b as s}from"./runtime-chunk-DZNU62CT.js";import{c as i}from"./runtime-chunk-4YV3EXSU.js";import{f as a}from"./runtime-chunk-NWCLOXDY.js";import"./runtime-chunk-R34HNX2O.js";import{a as n}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-RBM3UDQF.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var r=class extends t{constructor(e,t){super(e),this.eventManager=t,this.events=[],this.onVoice=({value:e,frequencies:t})=>{this.events.forEach(e=>{e.dispatch()})}}connect(){this.openAIRealtime=this.eventContext.sharedAssets.openAIRealtime,this.openAIRealtime&&(this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"AIAssistantListener"===e.data.type&&!e.data.disabled).forEach(t=>{this.events.push(new o(t.id,t.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),this.openAIRealtime.on("voice",this.onVoice))}disconnect(){this.openAIRealtime?.off("voice",this.onVoice)}},o=class{constructor(e,t,s,i,n,r){this.id=e,this.data=t,this.object=s,this.actions=a(t,t.actions,i,n,r,s)}dispatch(){this.dispatchActions(this.actions)}dispatchActions(e){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.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())}},c=class extends t{constructor(e,t){super(e),this.eventManager=t,this.events=[],this.onTriggerEvent=({description:e,direction:t})=>{let s=this.events.find(t=>t.data.description===e);s&&("backward"===t?s.dispatchReverse():s.dispatch())}}connect(){this.openAIRealtime=this.eventContext.sharedAssets.openAIRealtime,this.openAIRealtime&&(this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"AIAssistantTrigger"===e.data.type&&!e.data.disabled).forEach(t=>{this.events.push(new h(t.id,t.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),this.openAIRealtime.on("trigger_event",this.onTriggerEvent))}disconnect(){this.openAIRealtime?.off("trigger_event",this.onTriggerEvent)}},h=class{constructor(e,t,s,i,n,r){this.id=e,this.data=t,this.object=s,this.actions=a(t,t.actions,i,n,r,s)}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.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())}dispatchReverse(){let e=this.actions;e.Transition.forEach(e=>e.reverseFromCurrent()),e.Particles.forEach(e=>e.reverseFromCurrent()),e.Animation.forEach(e=>e.reverseFromCurrent()),e.SwitchCamera.forEach(e=>e.reverseFromCurrent()),e.Create.forEach(e=>e.dispatchStop())}},l=function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(e,t,s,i)=>String(t+t+s+s+i+i));let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},d=[4186.01,4434.92,4698.63,4978.03,5274.04,5587.65,5919.91,6271.93,6644.88,7040,7458.62,7902.13],p=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],u=[],f=[];for(let e=1;e<=8;e++)for(let t=0;t<d.length;t++){let s=d[t];u.push(s/Math.pow(2,8-e)),f.push(p[t]+e)}var v=[32,2e3],m=u.filter((e,t)=>u[t]>v[0]&&u[t]<v[1]),y=f.filter((e,t)=>u[t]>v[0]&&u[t]<v[1]),g=class{static getFrequencies(e,t,s,i="frequency",a=-100,n=-30){s||(s=new Float32Array(e.frequencyBinCount),e.getFloatFrequencyData(s));let r,o,c,h=t/2,l=1/s.length*h;if("music"===i||"voice"===i){let e="voice"===i?m:u,t=Array(e.length).fill(a);for(let i=0;i<s.length;i++){let a=i*l,n=s[i];for(let s=e.length-1;s>=0;s--)if(a>e[s]){t[s]=Math.max(t[s],n);break}}r=t,o="voice"===i?m:u,c="voice"===i?y:f}else r=Array.from(s),o=r.map((e,t)=>l*t),c=o.map(e=>`${e.toFixed(2)} Hz`);let d=r.map(e=>Math.max(0,Math.min((e-a)/(n-a),1)));return{values:new Float32Array(d),frequencies:o,labels:c}}},E=class{constructor(e){this.value=0,this.frequencies=new Float32Array(0);let t=new AudioContext;this.source=t.createMediaStreamSource(e),this.analyser=t.createAnalyser(),this.source.connect(this.analyser),this.analyser.fftSize=8192,this.analyser.smoothingTimeConstant=.1}getFrequencies(e=-100,t=-30){if(!this.analyser)throw new Error("Not connected, please call .connect() first");return g.getFrequencies(this.analyser,44100,void 0,"voice",e,t)}update(){let e=this.getFrequencies(),t=e.values.reduce((e,t)=>e+t,0)/e.values.length;this.value=t,this.frequencies=e.values}disconnect(){this.source.disconnect(),this.analyser.disconnect()}},b=class{constructor(e){this.callbacks=e,this.rafId=0,this.isOpen=!1,this.onMessage=e=>{this.callbacks.onMessage(e.data)},this.onOpen=()=>{this.isOpen=!0,this.callbacks.onOpen()},this.animate=()=>{this.rafId=requestAnimationFrame(this.animate),this.isOpen&&this.analyser&&(this.analyser.update(),this.callbacks.onVoice(this.analyser.value,this.analyser.frequencies))}}async connect(e){let t=await async function(e){try{return(await(await fetch("https://relayserver.spline.design/session?uuidfile="+e)).json()).token}catch(e){console.error("Token generation error:",e)}}(e);this.pc=new RTCPeerConnection,this.audioElement=document.createElement("audio"),this.audioElement.autoplay=!0,this.pc.ontrack=e=>{let t=e.streams[0];this.audioElement.srcObject=t,this.analyser=new E(t)};let s=await navigator.mediaDevices.getUserMedia({audio:!0});this.pc.addTrack(s.getTracks()[0]),this.dc=this.pc.createDataChannel("oai-events"),this.dc.addEventListener("message",this.onMessage),this.dc.addEventListener("open",this.onOpen);let i=await this.pc.createOffer();await this.pc.setLocalDescription(i);let a={type:"answer",sdp:await(await fetch("https://api.openai.com/v1/realtime/calls?model=gpt-realtime",{method:"POST",body:i.sdp,headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/sdp"}})).text()};await this.pc.setRemoteDescription(a),this.animate()}send(e){return!!this.dc&&(this.dc.send(e),!0)}disconnect(){cancelAnimationFrame(this.rafId),this.analyser?.disconnect(),this.isOpen=!1,this.dc?.removeEventListener("message",this.onMessage),this.dc?.removeEventListener("open",this.onOpen),this.dc?.close(),this.pc?.getSenders().forEach(e=>{e.track&&e.track.stop()}),this.pc?.close(),this.pc=void 0}};var w=class{constructor(t,s,i){this.data=t,this.id=s,this.shared=i,this.emitter=e(),this.voice=0,this.frequencies=new Float32Array([0]),this.events=[],this.isConnected=!1,this.isToolsAdded=!1,this.tools=[],this.onServerEvent=e=>{let t=JSON.parse(e);if(this.appendEvent(t),"session.created"===t.type&&this.onSessionCreated(),"response.done"===t.type&&t.response?.output)for(let e of t.response.output)if("function_call"===e.type)for(let[t,s]of this.tools)e.name===t.name&&(s(JSON.parse(e.arguments)),setTimeout(()=>{this.sendClientEvent({type:"response.create",response:{instructions:"notice the user about what you just did"}})}))},this.onSessionCreated=()=>{this.isToolsAdded||this.registerTools()},this.onOpen=()=>{this.events=[],this.isConnected=!0,this.sendClientEvent({type:"response.create",response:{instructions:"Say hi"}})}}update(e){this.data=e}setColorByName(e,t){let s=this.shared.getColorByName(e);if(s){let{id:e}=s,{r:i,g:a,b:n}=l(t)??{r:0,g:0,b:0};this.shared.updateColor(e,{r:i/255,g:a/255,b:n/255})}}async connect(){if(this.isConnected||this.session||this.hosted)return;let e={onMessage:this.onServerEvent,onOpen:this.onOpen,onVoice:(e,t)=>{this.voice=e,this.frequencies=t,this.emitter.emit("voice",{value:e,frequencies:t})}};this.hosted=function(e,t,s){if(!function(){try{return!0===window.__SPLINE_PLAY_VOICE_HOST__&&window.parent!==window}catch{return!1}}())return null;let i=!1,a=e=>{window.parent.postMessage({__splinePlayFrame:!0,...e},"*")},n=t=>{if(t.source!==window.parent)return;let a=t.data;!a||!0!==a.__splinePlayFrameHost||a.id!==e||("voice-open"===a.type?(i=!0,s.onOpen()):"voice-message"===a.type&&"string"==typeof a.data?s.onMessage(a.data):"voice-level"===a.type&&"number"==typeof a.value?s.onVoice(a.value,a.frequencies instanceof Float32Array?a.frequencies:new Float32Array(0)):"voice-error"===a.type&&console.error("Voice assistant host error:",a.message))};return window.addEventListener("message",n),a({type:"voice-connect",id:e,hash:t}),{send:t=>!!i&&(a({type:"voice-send",id:e,message:t}),!0),disconnect:()=>{i=!1,window.removeEventListener("message",n),a({type:"voice-disconnect",id:e})}}}(this.id,this.data.integration.hash,e),!this.hosted&&(this.session=new b(e),await this.session.connect(this.data.integration.hash))}appendEvent(e){this.events=[e,...this.events]}sendClientEvent(e){e.event_id=e.event_id||crypto.randomUUID();let t=JSON.stringify(e);(this.hosted?this.hosted.send(t):this.session?.send(t))?this.appendEvent(e):console.error("Failed to send message - no data channel available",e)}registerTools(){this.isToolsAdded=!0,this.registerTool({type:"function",name:"set_personality_color",description:"returns a color based on the voice personality of the ai assistant. This should be called by the voice assistant each time it is asks to speak differently. If a color cannot be associated to the personality, the color should be a neutral color.",parameters:{type:"object",properties:{color:{type:"string",description:"css hex color string, reflecting the personality"},personality:{type:"string",description:"the personality of the voice assistant"}},required:["color","personality"]}},({color:e})=>{this.setColorByName("Voice Assistant Color",e)});let e=this.shared.getVariablesNames().join(", ");this.registerTool({type:"function",name:"set_variable",description:"Sets a Spline variable value when asked by the user.",parameters:{type:"object",properties:{name:{type:"string",description:`The name of the variable that needs to be set. Here's a list of available variables: ${e}. It the variable does not exist, don't call the function and warn the user about it.`},value:{type:"string",description:"The new value for this variable, should always be a string even for number and boolean variables, assume that the value will be cast to the proper type afterwards."}},required:["name","value","type"]}},({name:e,value:t})=>{let s=this.shared.getVariableByName(e);if(s){let e,i=this.shared.getVariable(s.id);e="number"==typeof i?parseFloat(t):"boolean"==typeof i?"true"===t.toLowerCase():{textValue:t},this.shared.updateVariable(s.id,e)}});let t=this.shared.getColorNames().join(", ");this.registerTool({type:"function",name:"set_color",description:"Sets a Spline color asset value when asked by the user.",parameters:{type:"object",properties:{name:{type:"string",description:`The name of the color asset that needs to be set. Here's a list of available color assets: ${t}. It the color asset does not exist, don't call the function and warn the user about it.`},value:{type:"string",description:"css hex color string"}},required:["name","value"]}},({name:e,value:t})=>{this.setColorByName(e,t)});let s=this.shared.scene,i=[];s.traverseEntity(e=>{e.data.events.forEach(e=>{if("AIAssistantTrigger"===e.data.type){let{description:t}=e.data;i.push(t)}})}),this.registerTool({type:"function",name:"trigger_event",description:"Trigger an event by name, here are the available events, please match what the user is asking for to one of these if it applies, otherwise don't call the function and warn the user.",parameters:{type:"object",properties:{description:{type:"string",description:`The name of the event that needs to be triggered. Here's a list of available events: ${JSON.stringify(i)}.`},direction:{type:"string",description:"default is forward, but can be forward or backward. Always set to forward unless the user ask to reverse or cancel the event, then set to backward."}},required:["description","direction"]}},({description:e,direction:t})=>{this.emitter.emit("trigger_event",{description:e,direction:t})}),this.sendClientEvent({type:"session.update",session:{type:"realtime",tools:this.tools.map(([e])=>e)}})}registerTool(e,t){this.tools.push([e,t])}disconnect(){this.voice=0,this.isConnected=!1,this.isToolsAdded=!1,this.session?.disconnect(),this.session=void 0,this.hosted?.disconnect(),this.hosted=null}computeAnalysisForListenerEvent(e){if("range"===e.analysis){let t=this.frequencies.slice(...e.analysisRange);return t.reduce((e,t)=>e+t,0)/t.length}return"single"===e.analysis?this.frequencies[e.analysisSingle]:this.voice}on(e,t){this.emitter.on(e,t)}off(e,t){this.emitter.off(e,t)}};s("AIAssistantListener",({eventContext:e,eventManager:t})=>new r(e,t)),s("AIAssistantTrigger",({eventContext:e,eventManager:t})=>new c(e,t)),i((e,t,s)=>new w(e,t,s)),n("ai-assistant");
|
|
1
|
+
import{a as e}from"./runtime-chunk-NTUTXO7Q.js";import{a as t,b as s}from"./runtime-chunk-DZNU62CT.js";import{c as i}from"./runtime-chunk-4YV3EXSU.js";import{f as a}from"./runtime-chunk-EPHVY3XO.js";import"./runtime-chunk-U4QOT2PX.js";import{a as n}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-VPEJ5BFD.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var r=class extends t{constructor(e,t){super(e),this.eventManager=t,this.events=[],this.onVoice=({value:e,frequencies:t})=>{this.events.forEach(e=>{e.dispatch()})}}connect(){this.openAIRealtime=this.eventContext.sharedAssets.openAIRealtime,this.openAIRealtime&&(this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"AIAssistantListener"===e.data.type&&!e.data.disabled).forEach(t=>{this.events.push(new o(t.id,t.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),this.openAIRealtime.on("voice",this.onVoice))}disconnect(){this.openAIRealtime?.off("voice",this.onVoice)}},o=class{constructor(e,t,s,i,n,r){this.id=e,this.data=t,this.object=s,this.actions=a(t,t.actions,i,n,r,s)}dispatch(){this.dispatchActions(this.actions)}dispatchActions(e){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.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())}},c=class extends t{constructor(e,t){super(e),this.eventManager=t,this.events=[],this.onTriggerEvent=({description:e,direction:t})=>{let s=this.events.find(t=>t.data.description===e);s&&("backward"===t?s.dispatchReverse():s.dispatch())}}connect(){this.openAIRealtime=this.eventContext.sharedAssets.openAIRealtime,this.openAIRealtime&&(this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"AIAssistantTrigger"===e.data.type&&!e.data.disabled).forEach(t=>{this.events.push(new h(t.id,t.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),this.openAIRealtime.on("trigger_event",this.onTriggerEvent))}disconnect(){this.openAIRealtime?.off("trigger_event",this.onTriggerEvent)}},h=class{constructor(e,t,s,i,n,r){this.id=e,this.data=t,this.object=s,this.actions=a(t,t.actions,i,n,r,s)}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.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())}dispatchReverse(){let e=this.actions;e.Transition.forEach(e=>e.reverseFromCurrent()),e.Particles.forEach(e=>e.reverseFromCurrent()),e.Animation.forEach(e=>e.reverseFromCurrent()),e.SwitchCamera.forEach(e=>e.reverseFromCurrent()),e.Create.forEach(e=>e.dispatchStop())}},l=function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(e,t,s,i)=>String(t+t+s+s+i+i));let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},d=[4186.01,4434.92,4698.63,4978.03,5274.04,5587.65,5919.91,6271.93,6644.88,7040,7458.62,7902.13],p=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],u=[],f=[];for(let e=1;e<=8;e++)for(let t=0;t<d.length;t++){let s=d[t];u.push(s/Math.pow(2,8-e)),f.push(p[t]+e)}var v=[32,2e3],m=u.filter((e,t)=>u[t]>v[0]&&u[t]<v[1]),y=f.filter((e,t)=>u[t]>v[0]&&u[t]<v[1]),g=class{static getFrequencies(e,t,s,i="frequency",a=-100,n=-30){s||(s=new Float32Array(e.frequencyBinCount),e.getFloatFrequencyData(s));let r,o,c,h=t/2,l=1/s.length*h;if("music"===i||"voice"===i){let e="voice"===i?m:u,t=Array(e.length).fill(a);for(let i=0;i<s.length;i++){let a=i*l,n=s[i];for(let s=e.length-1;s>=0;s--)if(a>e[s]){t[s]=Math.max(t[s],n);break}}r=t,o="voice"===i?m:u,c="voice"===i?y:f}else r=Array.from(s),o=r.map((e,t)=>l*t),c=o.map(e=>`${e.toFixed(2)} Hz`);let d=r.map(e=>Math.max(0,Math.min((e-a)/(n-a),1)));return{values:new Float32Array(d),frequencies:o,labels:c}}},E=class{constructor(e){this.value=0,this.frequencies=new Float32Array(0);let t=new AudioContext;this.source=t.createMediaStreamSource(e),this.analyser=t.createAnalyser(),this.source.connect(this.analyser),this.analyser.fftSize=8192,this.analyser.smoothingTimeConstant=.1}getFrequencies(e=-100,t=-30){if(!this.analyser)throw new Error("Not connected, please call .connect() first");return g.getFrequencies(this.analyser,44100,void 0,"voice",e,t)}update(){let e=this.getFrequencies(),t=e.values.reduce((e,t)=>e+t,0)/e.values.length;this.value=t,this.frequencies=e.values}disconnect(){this.source.disconnect(),this.analyser.disconnect()}},b=class{constructor(e){this.callbacks=e,this.rafId=0,this.isOpen=!1,this.onMessage=e=>{this.callbacks.onMessage(e.data)},this.onOpen=()=>{this.isOpen=!0,this.callbacks.onOpen()},this.animate=()=>{this.rafId=requestAnimationFrame(this.animate),this.isOpen&&this.analyser&&(this.analyser.update(),this.callbacks.onVoice(this.analyser.value,this.analyser.frequencies))}}async connect(e){let t=await async function(e){try{return(await(await fetch("https://relayserver.spline.design/session?uuidfile="+e)).json()).token}catch(e){console.error("Token generation error:",e)}}(e);this.pc=new RTCPeerConnection,this.audioElement=document.createElement("audio"),this.audioElement.autoplay=!0,this.pc.ontrack=e=>{let t=e.streams[0];this.audioElement.srcObject=t,this.analyser=new E(t)};let s=await navigator.mediaDevices.getUserMedia({audio:!0});this.pc.addTrack(s.getTracks()[0]),this.dc=this.pc.createDataChannel("oai-events"),this.dc.addEventListener("message",this.onMessage),this.dc.addEventListener("open",this.onOpen);let i=await this.pc.createOffer();await this.pc.setLocalDescription(i);let a={type:"answer",sdp:await(await fetch("https://api.openai.com/v1/realtime/calls?model=gpt-realtime",{method:"POST",body:i.sdp,headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/sdp"}})).text()};await this.pc.setRemoteDescription(a),this.animate()}send(e){return!!this.dc&&(this.dc.send(e),!0)}disconnect(){cancelAnimationFrame(this.rafId),this.analyser?.disconnect(),this.isOpen=!1,this.dc?.removeEventListener("message",this.onMessage),this.dc?.removeEventListener("open",this.onOpen),this.dc?.close(),this.pc?.getSenders().forEach(e=>{e.track&&e.track.stop()}),this.pc?.close(),this.pc=void 0}};var w=class{constructor(t,s,i){this.data=t,this.id=s,this.shared=i,this.emitter=e(),this.voice=0,this.frequencies=new Float32Array([0]),this.events=[],this.isConnected=!1,this.isToolsAdded=!1,this.tools=[],this.onServerEvent=e=>{let t=JSON.parse(e);if(this.appendEvent(t),"session.created"===t.type&&this.onSessionCreated(),"response.done"===t.type&&t.response?.output)for(let e of t.response.output)if("function_call"===e.type)for(let[t,s]of this.tools)e.name===t.name&&(s(JSON.parse(e.arguments)),setTimeout(()=>{this.sendClientEvent({type:"response.create",response:{instructions:"notice the user about what you just did"}})}))},this.onSessionCreated=()=>{this.isToolsAdded||this.registerTools()},this.onOpen=()=>{this.events=[],this.isConnected=!0,this.sendClientEvent({type:"response.create",response:{instructions:"Say hi"}})}}update(e){this.data=e}setColorByName(e,t){let s=this.shared.getColorByName(e);if(s){let{id:e}=s,{r:i,g:a,b:n}=l(t)??{r:0,g:0,b:0};this.shared.updateColor(e,{r:i/255,g:a/255,b:n/255})}}async connect(){if(this.isConnected||this.session||this.hosted)return;let e={onMessage:this.onServerEvent,onOpen:this.onOpen,onVoice:(e,t)=>{this.voice=e,this.frequencies=t,this.emitter.emit("voice",{value:e,frequencies:t})}};this.hosted=function(e,t,s){if(!function(){try{return!0===window.__SPLINE_PLAY_VOICE_HOST__&&window.parent!==window}catch{return!1}}())return null;let i=!1,a=e=>{window.parent.postMessage({__splinePlayFrame:!0,...e},"*")},n=t=>{if(t.source!==window.parent)return;let a=t.data;!a||!0!==a.__splinePlayFrameHost||a.id!==e||("voice-open"===a.type?(i=!0,s.onOpen()):"voice-message"===a.type&&"string"==typeof a.data?s.onMessage(a.data):"voice-level"===a.type&&"number"==typeof a.value?s.onVoice(a.value,a.frequencies instanceof Float32Array?a.frequencies:new Float32Array(0)):"voice-error"===a.type&&console.error("Voice assistant host error:",a.message))};return window.addEventListener("message",n),a({type:"voice-connect",id:e,hash:t}),{send:t=>!!i&&(a({type:"voice-send",id:e,message:t}),!0),disconnect:()=>{i=!1,window.removeEventListener("message",n),a({type:"voice-disconnect",id:e})}}}(this.id,this.data.integration.hash,e),!this.hosted&&(this.session=new b(e),await this.session.connect(this.data.integration.hash))}appendEvent(e){this.events=[e,...this.events]}sendClientEvent(e){e.event_id=e.event_id||crypto.randomUUID();let t=JSON.stringify(e);(this.hosted?this.hosted.send(t):this.session?.send(t))?this.appendEvent(e):console.error("Failed to send message - no data channel available",e)}registerTools(){this.isToolsAdded=!0,this.registerTool({type:"function",name:"set_personality_color",description:"returns a color based on the voice personality of the ai assistant. This should be called by the voice assistant each time it is asks to speak differently. If a color cannot be associated to the personality, the color should be a neutral color.",parameters:{type:"object",properties:{color:{type:"string",description:"css hex color string, reflecting the personality"},personality:{type:"string",description:"the personality of the voice assistant"}},required:["color","personality"]}},({color:e})=>{this.setColorByName("Voice Assistant Color",e)});let e=this.shared.getVariablesNames().join(", ");this.registerTool({type:"function",name:"set_variable",description:"Sets a Spline variable value when asked by the user.",parameters:{type:"object",properties:{name:{type:"string",description:`The name of the variable that needs to be set. Here's a list of available variables: ${e}. It the variable does not exist, don't call the function and warn the user about it.`},value:{type:"string",description:"The new value for this variable, should always be a string even for number and boolean variables, assume that the value will be cast to the proper type afterwards."}},required:["name","value","type"]}},({name:e,value:t})=>{let s=this.shared.getVariableByName(e);if(s){let e,i=this.shared.getVariable(s.id);e="number"==typeof i?parseFloat(t):"boolean"==typeof i?"true"===t.toLowerCase():{textValue:t},this.shared.updateVariable(s.id,e)}});let t=this.shared.getColorNames().join(", ");this.registerTool({type:"function",name:"set_color",description:"Sets a Spline color asset value when asked by the user.",parameters:{type:"object",properties:{name:{type:"string",description:`The name of the color asset that needs to be set. Here's a list of available color assets: ${t}. It the color asset does not exist, don't call the function and warn the user about it.`},value:{type:"string",description:"css hex color string"}},required:["name","value"]}},({name:e,value:t})=>{this.setColorByName(e,t)});let s=this.shared.scene,i=[];s.traverseEntity(e=>{e.data.events.forEach(e=>{if("AIAssistantTrigger"===e.data.type){let{description:t}=e.data;i.push(t)}})}),this.registerTool({type:"function",name:"trigger_event",description:"Trigger an event by name, here are the available events, please match what the user is asking for to one of these if it applies, otherwise don't call the function and warn the user.",parameters:{type:"object",properties:{description:{type:"string",description:`The name of the event that needs to be triggered. Here's a list of available events: ${JSON.stringify(i)}.`},direction:{type:"string",description:"default is forward, but can be forward or backward. Always set to forward unless the user ask to reverse or cancel the event, then set to backward."}},required:["description","direction"]}},({description:e,direction:t})=>{this.emitter.emit("trigger_event",{description:e,direction:t})}),this.sendClientEvent({type:"session.update",session:{type:"realtime",tools:this.tools.map(([e])=>e)}})}registerTool(e,t){this.tools.push([e,t])}disconnect(){this.voice=0,this.isConnected=!1,this.isToolsAdded=!1,this.session?.disconnect(),this.session=void 0,this.hosted?.disconnect(),this.hosted=null}computeAnalysisForListenerEvent(e){if("range"===e.analysis){let t=this.frequencies.slice(...e.analysisRange);return t.reduce((e,t)=>e+t,0)/t.length}return"single"===e.analysis?this.frequencies[e.analysisSingle]:this.voice}on(e,t){this.emitter.on(e,t)}off(e,t){this.emitter.off(e,t)}};s("AIAssistantListener",({eventContext:e,eventManager:t})=>new r(e,t)),s("AIAssistantTrigger",({eventContext:e,eventManager:t})=>new c(e,t)),i((e,t,s)=>new w(e,t,s)),n("ai-assistant");
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./runtime-chunk-NTUTXO7Q.js";import{a as t,b as s}from"./runtime-chunk-DZNU62CT.js";import{a as r}from"./runtime-chunk-4YV3EXSU.js";import{b as i,e as n,f as o}from"./runtime-chunk-NWCLOXDY.js";import{a}from"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-R34HNX2O.js";import{a as h}from"./runtime-chunk-TZCHGFVF.js";import{Ga as c,Ha as d,o as u}from"./runtime-chunk-RBM3UDQF.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var l=class extends t{constructor(e,t){super(e),this.eventManager=t,this.userAPIs={},this.events=[],this.onSuccess=({userAPIId:e})=>{this.events.forEach(t=>{t.data.userAPIId===e&&t.dispatchSuccess()})},this.onError=({userAPIId:e})=>{this.events.forEach(t=>{t.data.userAPIId===e&&t.dispatchError()})},this.userAPIs=e.sharedAssets.getUserAPIs()}connect(){this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"API"===e.data.type&&!e.data.disabled).forEach(t=>{this.events.push(new p(t.id,t.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),Object.entries(this.userAPIs).forEach(([e,t])=>{t.on("success",this.onSuccess),t.on("error",this.onError),t.autostart&&t.callUserAPI(this.eventContext.sharedAssets)})}disconnect(){Object.entries(this.userAPIs).forEach(([e,t])=>{t.off("success",this.onSuccess),t.off("error",this.onError)})}},p=class{constructor(e,t,s,r,i,n){this.id=e,this.data=t,this.object=s,this.successActions=o(t,t.successActions,r,i,n,s),this.errorActions=o(t,t.errorActions,r,i,n,s)}dispatchSuccess(){this.dispatchActions(this.successActions)}dispatchError(){this.dispatchActions(this.errorActions)}dispatchActions(e){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.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())}},f=class extends t{constructor(e,t){super(e),this.eventManager=t,this.userWebhooks={},this.events=[],this.onMessage=({userWebhookId:e})=>{this.events.forEach(t=>{t.data.userWebhookId===e&&t.dispatch()})},this.userWebhooks=e.sharedAssets.getUserWebhooks()}connect(){this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"WEBHOOK"===e.data.type&&!e.data.disabled).forEach(t=>{this.events.push(new m(t.id,t.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),Object.entries(this.userWebhooks).forEach(([e,t])=>{t.connect(),t.on("message",this.onMessage)})}disconnect(){Object.entries(this.userWebhooks).forEach(([e,t])=>{t.off("message",this.onMessage),t.disconnect()})}},m=class{constructor(e,t,s,r,i,n){this.id=e,this.data=t,this.object=s,this.actions=o(t,t.actions,r,i,n,s)}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.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())}},v=class{constructor(e,t,s,r){this.data=e,this.page=t,this.shared=s,this.condition=r}dispatch(){if(!1===n(this.shared,this.condition))return!1;if(this.data.userAPIId){let e=this.shared.getUserAPI(this.data.userAPIId);e&&"callUserAPI"in e&&e.callUserAPI(this.shared)}}dispose(){}},E=class{constructor(t,s,r){this.id=t,this.userAPI=s,this.result=void 0,this.error="null",this.isPrefetched=!1,this.isLoading=!1,this.isLoaded=!1,this.prefetchPromise=new Promise(e=>e()),this.emitter=e(),this._innerCallUserAPI=async e=>{this.emitter.emit("start",{userAPIId:this.id}),this.isLoading=!0,this.isLoading=!1;try{this.result=await async function(e,t,s=new AbortController){let r,i,n=e.url,o=e.proxy?.enabled??!1;if("OpenAI"===e.integration?.type){let s=b(""===e.integration.prompt?[]:JSON.parse(e.integration.prompt),t),r=""===e.integration.behavior?[]:b(JSON.parse(e.integration.behavior),t);i=`{\n\t\t"model": "${e.integration.model}",\n\t\t"messages": [${e.integration.useBehavior?`\n\t\t{\n\t\t\t"role": "system",\n\t\t\t"content": "${r}"\n\t\t},`:""}\n\t\t{\n\t\t\t"role": "user",\n\t\t\t"content": "${s}"\n\t\t}\n\t\t]\n\t}`}if(o){let s;n=`https://apis.spline.design/file/${e.proxy.fileId}/external-api/request?uuidexternalapi=${e.proxy.proxyId}`,void 0!==i?s=i:"POST"===e.method&&e.body&&(s=b(JSON.parse(e.body),t)),void 0!==s&&(n+=`&data=${encodeURIComponent(s.replace(/(\r\n|\n|\r|\t)/gm,""))}`)}else"OpenAI"===e.integration?.type?r=i:"POST"===e.method&&e.body&&(r=b(JSON.parse(e.body),t));let a=await fetch(n,{method:o?"GET":e.method,headers:o?void 0:g(e),signal:s.signal,body:r});if(!a.ok)throw new Error("status:"+a.status+"_:_"+a.statusText);if("OpenAI"===e.integration?.type){let e=await a.json();return o&&(e=e.response),{content:e.choices[0].message.content}}{let e=await a.json();return o&&(e=e.response),e}}(this.userAPI,e),this.error="null",this.emitter.emit("success",{userAPIId:this.id})}catch(e){let t=e.message?.split("_:_")?.[0]?.replace("status:","")??"null";this.error=t,this.result=null,this.emitter.emit("error",{userAPIId:this.id})}this.isLoading=!1,this.isPrefetched=!0,this.isLoaded=!0},"OpenAI"===s?.integration?.type?this.result={content:""}:"GET"===s.method&&""!==s.url&&(this.prefetchPromise=this.prefetch(r)),this._debouncedCallUserAPI=this._innerCallUserAPI,this._updateDebouncedCallUserAPI(),this._debouncedPrefetch=a(this.prefetch,1e3,{trailing:!0})}_updateDebouncedCallUserAPI(){this._debouncedCallUserAPI=void 0!==this.userAPI.debounce&&this.userAPI.debounce>0?a(this._innerCallUserAPI,this.userAPI.debounce,{leading:!0,trailing:!0}):this._innerCallUserAPI}async prefetch(e){await this.callUserAPI(e)}async callUserAPI(e){await this._debouncedCallUserAPI(e)}update(e,t,s=!0){this.userAPI=e,this._updateDebouncedCallUserAPI(),""!==this.userAPI.url&&"GET"===this.userAPI.method&&s&&this._debouncedPrefetch(t)}retrieveValue(e){if(this.result)try{return u.zoom(this.result,e)}catch(e){console.error(e)}}retrieveZoomedKeyValues(e){if(this.result){let s=e&&e.length?u.zoom(this.result,e):this.result;if("object"==typeof(t=s)&&null!==t)return Object.entries(s);if(function(e){return Array.isArray(e)}(s))return s.map((e,t)=>[t.toString(),e]);throw function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null===e}(s)?new Error("This path points to a value, use retrieveValue() instead. "+e?.join(".")):new Error("Path error"+e?.join("."))}var t}dispose(){}on(e,t){this.emitter.on(e,t)}off(e,t){this.emitter.off(e,t)}get autostart(){return this.userAPI.autoStart}};function g(e){let t=new Headers;return e.headers.forEach(e=>{""!==e.data.key&&t.append(e.data.key,e.data.value)}),t}var A=(e,t)=>{if("string"==typeof e){let s=t.getVariable(e);if(s)return A(s,t)}return d.isBoolean(e)?d.getDisplayedValue(e).toLowerCase():d.getDisplayedValue(e)},b=(e,t)=>e.map((e,s)=>{if("text"in e)return e.text;if("type"in e){if("paragraph"===e.type)return(s>0?"\n":"")+b(e.children,t);if("variable"===e.type){let s=t.getVariable(e.variableId);if(void 0!==s)return A(s,t)}}return""}).join(""),I=1e3,P=512*I,y=class{constructor(t,s){this.id=t,this.userWebhook=s,this.result=void 0,this._connected=!1,this.emitter=e(),this.reconnectWaitFor=I,this._onError=e=>{this.eventSource?.removeEventListener("message",this._onMessage),this.eventSource?.removeEventListener("error",this._onError),this.eventSource?.removeEventListener("open",this._onConnected),this._scheduleReconnect()},this._onConnected=e=>{clearTimeout(this.scheduledReconnectHandle),this.reconnectWaitFor=I,this._connected=!0},this._onDisconnected=()=>{clearTimeout(this.scheduledReconnectHandle),this.reconnectWaitFor=I,this._connected=!1},this._onMessage=e=>{let t,s=e.data;try{t=JSON.parse(s)}catch(e){console.error("Error parsing webhook message",e)}if(t){let e=!1;this.userWebhook.parametersSchemas.forEach(({data:s})=>{void 0!==t[s.name]&&function(e,t){let s=typeof e;return!!(("string"===t||"number"===t)&&s===t||"boolean"===t&&("true"===e||"false"===e||!0===e||!1===e)||"image"===t&&"string"===s&&e.startsWith("http"))}(t[s.name],s.type)&&(void 0===this.result&&(this.result={}),this.result[s.name]=t[s.name],e=!0)}),e&&this.emitter.emit("message",{userWebhookId:this.id})}}}connect(){clearTimeout(this.scheduledReconnectHandle),this.userWebhook.url&&(this.eventSource=new EventSource("https://hooks.spline.design/events?hashFile="+this.userWebhook.url),this.eventSource.addEventListener("message",this._onMessage),this.eventSource.addEventListener("error",this._onError),this.eventSource.addEventListener("open",this._onConnected))}disconnect(){this.eventSource?.removeEventListener("message",this._onMessage),this.eventSource?.removeEventListener("error",this._onError),this.eventSource?.removeEventListener("open",this._onConnected),this.eventSource?.close(),this._onDisconnected(),clearTimeout(this.scheduledReconnectHandle)}_scheduleReconnect(){this.reconnectWaitFor*=2,this.reconnectWaitFor>P&&(this.reconnectWaitFor=P),clearTimeout(this.scheduledReconnectHandle),this.scheduledReconnectHandle=setTimeout(()=>{this.scheduledReconnectHandle=void 0,this.connect()},this.reconnectWaitFor)}update(e){this.userWebhook=e}dispose(){this._connected&&this.disconnect()}get connected(){return this._connected}on(e,t){this.emitter.on(e,t)}off(e,t){this.emitter.off(e,t)}getParametersKeys(){return this.userWebhook.parametersSchemas.map(e=>e.data.name)}getParameterValue(e){if(this.getParametersKeys().includes(e)){if(this.result)return this.result?.[e];for(let t of this.userWebhook.parametersSchemas)if(t.data.name===e)return c.defaultParameterValueByType(t.data.type)}}};s("API",({eventContext:e,eventManager:t})=>new l(e,t)),s("WEBHOOK",({eventContext:e,eventManager:t})=>new f(e,t)),i("UserAPI",({data:e,page:t,shared:s,actionCondition:r})=>new v(e,t,s,r)),r({createUserAPI:(e,t,s)=>new E(e,t,s),createUserWebhook:(e,t)=>new y(e,t)}),h("api-services");
|
|
1
|
+
import{a as e}from"./runtime-chunk-NTUTXO7Q.js";import{a as t,b as s}from"./runtime-chunk-DZNU62CT.js";import{a as r}from"./runtime-chunk-4YV3EXSU.js";import{b as i,e as n,f as o}from"./runtime-chunk-EPHVY3XO.js";import{a}from"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-U4QOT2PX.js";import{a as h}from"./runtime-chunk-TZCHGFVF.js";import{Ga as c,Ha as d,o as u}from"./runtime-chunk-VPEJ5BFD.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var l=class extends t{constructor(e,t){super(e),this.eventManager=t,this.userAPIs={},this.events=[],this.onSuccess=({userAPIId:e})=>{this.events.forEach(t=>{t.data.userAPIId===e&&t.dispatchSuccess()})},this.onError=({userAPIId:e})=>{this.events.forEach(t=>{t.data.userAPIId===e&&t.dispatchError()})},this.userAPIs=e.sharedAssets.getUserAPIs()}connect(){this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"API"===e.data.type&&!e.data.disabled).forEach(t=>{this.events.push(new p(t.id,t.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),Object.entries(this.userAPIs).forEach(([e,t])=>{t.on("success",this.onSuccess),t.on("error",this.onError),t.autostart&&t.callUserAPI(this.eventContext.sharedAssets)})}disconnect(){Object.entries(this.userAPIs).forEach(([e,t])=>{t.off("success",this.onSuccess),t.off("error",this.onError)})}},p=class{constructor(e,t,s,r,i,n){this.id=e,this.data=t,this.object=s,this.successActions=o(t,t.successActions,r,i,n,s),this.errorActions=o(t,t.errorActions,r,i,n,s)}dispatchSuccess(){this.dispatchActions(this.successActions)}dispatchError(){this.dispatchActions(this.errorActions)}dispatchActions(e){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.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())}},f=class extends t{constructor(e,t){super(e),this.eventManager=t,this.userWebhooks={},this.events=[],this.onMessage=({userWebhookId:e})=>{this.events.forEach(t=>{t.data.userWebhookId===e&&t.dispatch()})},this.userWebhooks=e.sharedAssets.getUserWebhooks()}connect(){this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"WEBHOOK"===e.data.type&&!e.data.disabled).forEach(t=>{this.events.push(new m(t.id,t.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),Object.entries(this.userWebhooks).forEach(([e,t])=>{t.connect(),t.on("message",this.onMessage)})}disconnect(){Object.entries(this.userWebhooks).forEach(([e,t])=>{t.off("message",this.onMessage),t.disconnect()})}},m=class{constructor(e,t,s,r,i,n){this.id=e,this.data=t,this.object=s,this.actions=o(t,t.actions,r,i,n,s)}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.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())}},v=class{constructor(e,t,s,r){this.data=e,this.page=t,this.shared=s,this.condition=r}dispatch(){if(!1===n(this.shared,this.condition))return!1;if(this.data.userAPIId){let e=this.shared.getUserAPI(this.data.userAPIId);e&&"callUserAPI"in e&&e.callUserAPI(this.shared)}}dispose(){}},E=class{constructor(t,s,r){this.id=t,this.userAPI=s,this.result=void 0,this.error="null",this.isPrefetched=!1,this.isLoading=!1,this.isLoaded=!1,this.prefetchPromise=new Promise(e=>e()),this.emitter=e(),this._innerCallUserAPI=async e=>{this.emitter.emit("start",{userAPIId:this.id}),this.isLoading=!0,this.isLoading=!1;try{this.result=await async function(e,t,s=new AbortController){let r,i,n=e.url,o=e.proxy?.enabled??!1;if("OpenAI"===e.integration?.type){let s=b(""===e.integration.prompt?[]:JSON.parse(e.integration.prompt),t),r=""===e.integration.behavior?[]:b(JSON.parse(e.integration.behavior),t);i=`{\n\t\t"model": "${e.integration.model}",\n\t\t"messages": [${e.integration.useBehavior?`\n\t\t{\n\t\t\t"role": "system",\n\t\t\t"content": "${r}"\n\t\t},`:""}\n\t\t{\n\t\t\t"role": "user",\n\t\t\t"content": "${s}"\n\t\t}\n\t\t]\n\t}`}if(o){let s;n=`https://apis.spline.design/file/${e.proxy.fileId}/external-api/request?uuidexternalapi=${e.proxy.proxyId}`,void 0!==i?s=i:"POST"===e.method&&e.body&&(s=b(JSON.parse(e.body),t)),void 0!==s&&(n+=`&data=${encodeURIComponent(s.replace(/(\r\n|\n|\r|\t)/gm,""))}`)}else"OpenAI"===e.integration?.type?r=i:"POST"===e.method&&e.body&&(r=b(JSON.parse(e.body),t));let a=await fetch(n,{method:o?"GET":e.method,headers:o?void 0:g(e),signal:s.signal,body:r});if(!a.ok)throw new Error("status:"+a.status+"_:_"+a.statusText);if("OpenAI"===e.integration?.type){let e=await a.json();return o&&(e=e.response),{content:e.choices[0].message.content}}{let e=await a.json();return o&&(e=e.response),e}}(this.userAPI,e),this.error="null",this.emitter.emit("success",{userAPIId:this.id})}catch(e){let t=e.message?.split("_:_")?.[0]?.replace("status:","")??"null";this.error=t,this.result=null,this.emitter.emit("error",{userAPIId:this.id})}this.isLoading=!1,this.isPrefetched=!0,this.isLoaded=!0},"OpenAI"===s?.integration?.type?this.result={content:""}:"GET"===s.method&&""!==s.url&&(this.prefetchPromise=this.prefetch(r)),this._debouncedCallUserAPI=this._innerCallUserAPI,this._updateDebouncedCallUserAPI(),this._debouncedPrefetch=a(this.prefetch,1e3,{trailing:!0})}_updateDebouncedCallUserAPI(){this._debouncedCallUserAPI=void 0!==this.userAPI.debounce&&this.userAPI.debounce>0?a(this._innerCallUserAPI,this.userAPI.debounce,{leading:!0,trailing:!0}):this._innerCallUserAPI}async prefetch(e){await this.callUserAPI(e)}async callUserAPI(e){await this._debouncedCallUserAPI(e)}update(e,t,s=!0){this.userAPI=e,this._updateDebouncedCallUserAPI(),""!==this.userAPI.url&&"GET"===this.userAPI.method&&s&&this._debouncedPrefetch(t)}retrieveValue(e){if(this.result)try{return u.zoom(this.result,e)}catch(e){console.error(e)}}retrieveZoomedKeyValues(e){if(this.result){let s=e&&e.length?u.zoom(this.result,e):this.result;if("object"==typeof(t=s)&&null!==t)return Object.entries(s);if(function(e){return Array.isArray(e)}(s))return s.map((e,t)=>[t.toString(),e]);throw function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null===e}(s)?new Error("This path points to a value, use retrieveValue() instead. "+e?.join(".")):new Error("Path error"+e?.join("."))}var t}dispose(){}on(e,t){this.emitter.on(e,t)}off(e,t){this.emitter.off(e,t)}get autostart(){return this.userAPI.autoStart}};function g(e){let t=new Headers;return e.headers.forEach(e=>{""!==e.data.key&&t.append(e.data.key,e.data.value)}),t}var A=(e,t)=>{if("string"==typeof e){let s=t.getVariable(e);if(s)return A(s,t)}return d.isBoolean(e)?d.getDisplayedValue(e).toLowerCase():d.getDisplayedValue(e)},b=(e,t)=>e.map((e,s)=>{if("text"in e)return e.text;if("type"in e){if("paragraph"===e.type)return(s>0?"\n":"")+b(e.children,t);if("variable"===e.type){let s=t.getVariable(e.variableId);if(void 0!==s)return A(s,t)}}return""}).join(""),P=1e3,I=512*P,y=class{constructor(t,s){this.id=t,this.userWebhook=s,this.result=void 0,this._connected=!1,this.emitter=e(),this.reconnectWaitFor=P,this._onError=e=>{this.eventSource?.removeEventListener("message",this._onMessage),this.eventSource?.removeEventListener("error",this._onError),this.eventSource?.removeEventListener("open",this._onConnected),this._scheduleReconnect()},this._onConnected=e=>{clearTimeout(this.scheduledReconnectHandle),this.reconnectWaitFor=P,this._connected=!0},this._onDisconnected=()=>{clearTimeout(this.scheduledReconnectHandle),this.reconnectWaitFor=P,this._connected=!1},this._onMessage=e=>{let t,s=e.data;try{t=JSON.parse(s)}catch(e){console.error("Error parsing webhook message",e)}if(t){let e=!1;this.userWebhook.parametersSchemas.forEach(({data:s})=>{void 0!==t[s.name]&&function(e,t){let s=typeof e;return!!(("string"===t||"number"===t)&&s===t||"boolean"===t&&("true"===e||"false"===e||!0===e||!1===e)||"image"===t&&"string"===s&&e.startsWith("http"))}(t[s.name],s.type)&&(void 0===this.result&&(this.result={}),this.result[s.name]=t[s.name],e=!0)}),e&&this.emitter.emit("message",{userWebhookId:this.id})}}}connect(){clearTimeout(this.scheduledReconnectHandle),this.userWebhook.url&&(this.eventSource=new EventSource("https://hooks.spline.design/events?hashFile="+this.userWebhook.url),this.eventSource.addEventListener("message",this._onMessage),this.eventSource.addEventListener("error",this._onError),this.eventSource.addEventListener("open",this._onConnected))}disconnect(){this.eventSource?.removeEventListener("message",this._onMessage),this.eventSource?.removeEventListener("error",this._onError),this.eventSource?.removeEventListener("open",this._onConnected),this.eventSource?.close(),this._onDisconnected(),clearTimeout(this.scheduledReconnectHandle)}_scheduleReconnect(){this.reconnectWaitFor*=2,this.reconnectWaitFor>I&&(this.reconnectWaitFor=I),clearTimeout(this.scheduledReconnectHandle),this.scheduledReconnectHandle=setTimeout(()=>{this.scheduledReconnectHandle=void 0,this.connect()},this.reconnectWaitFor)}update(e){this.userWebhook=e}dispose(){this._connected&&this.disconnect()}get connected(){return this._connected}on(e,t){this.emitter.on(e,t)}off(e,t){this.emitter.off(e,t)}getParametersKeys(){return this.userWebhook.parametersSchemas.map(e=>e.data.name)}getParameterValue(e){if(this.getParametersKeys().includes(e)){if(this.result)return this.result?.[e];for(let t of this.userWebhook.parametersSchemas)if(t.data.name===e)return c.defaultParameterValueByType(t.data.type)}}};s("API",({eventContext:e,eventManager:t})=>new l(e,t)),s("WEBHOOK",({eventContext:e,eventManager:t})=>new f(e,t)),i("UserAPI",({data:e,page:t,shared:s,actionCondition:r})=>new v(e,t,s,r)),r({createUserAPI:(e,t,s)=>new E(e,t,s),createUserWebhook:(e,t)=>new y(e,t)}),h("api-services");
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as t}from"./runtime-chunk-NSD7DU3P.js";import{b as i,e as a}from"./runtime-chunk-
|
|
1
|
+
import{c as t}from"./runtime-chunk-NSD7DU3P.js";import{b as i,e as a}from"./runtime-chunk-EPHVY3XO.js";import"./runtime-chunk-U4QOT2PX.js";import{a as s}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-VPEJ5BFD.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var e=new Map,o=new Map,d=class{constructor(i,a,s,d){this.data=a,this.isPlayAudioAction=!0;let{audio:n,volume:r,delay:h,loop:u}=a;if(!n)throw new Error("Missing property");try{let i="string"==typeof n?d.getAudio(n).src:n.data;this.audioPlayer=new t({src:i,volume:r,delay:h,loop:u})}catch{console.warn(`Could not create an audio player for this object: "${s.name}" and this audio: "${n}"`)}o.has(s.uuid)?o.get(s.uuid).push(this):o.set(s.uuid,[this]),e.set(i,this)}playByToggle(){"stop"===this.data.toggle?"playing"===this.audioPlayer?.status?this.audioPlayer.stop():(this.audioPlayer?.stop(),this.audioPlayer?.play()):"pause"===this.data.toggle?"playing"===this.audioPlayer?.status?this.audioPlayer?.pause():this.audioPlayer?.play():(this.audioPlayer?.stop(),this.audioPlayer?.play())}dispose(){this.audioPlayer?.stop()}},n=class{constructor(t){this.data=t,this.isPauseAudioAction=!0}dispatch(){this.data.playAudio?this.pauseAudio(this.data.playAudio):this.data.object?this.pauseAllAudiosFromObject(this.data.object):this.pauseAllAudios()}pauseAudio(t){let i=e.get(t);!i||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{i.audioPlayer?.[this.data.interaction](),this.disposeDelay()},this.data.delay)):i.audioPlayer?.[this.data.interaction]())}pauseAllAudiosFromObject(t){let i=o.get(t);!i?.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{i.forEach(t=>t.audioPlayer?.[this.data.interaction]()),this.disposeDelay()},this.data.delay)):i.forEach(t=>t.audioPlayer?.[this.data.interaction]()))}pauseAllAudios(){let t=[...o.values()];!t.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{t.forEach(t=>{t.forEach(t=>{t.audioPlayer?.[this.data.interaction]()})}),this.disposeDelay()},this.data.delay)):t.forEach(t=>{t.forEach(t=>{t.audioPlayer?.[this.data.interaction]()})}))}disposeDelay(){clearTimeout(this.timeoutId),delete this.timeoutId}dispose(){clearTimeout(this.timeoutId),delete this.timeoutId}},r=class{constructor(t,i,a,s,e){if(this.data=i,this.shared=s,this.condition=e,"play"===i.interaction)this.interaction=new d(t,i,a,s);else{if("pause"!==i.interaction&&"stop"!==i.interaction)throw new Error("Missing property");this.interaction=new n(i)}}dispatchBasic(){if(!1===a(this.shared,this.condition))return!1;this.interaction instanceof d?this.interaction.playByToggle():this.interaction.dispatch()}dispatchConditional(){if(!1===a(this.shared,this.condition))return!1;this.interaction instanceof d?this.interaction.audioPlayer?.play():this.interaction.dispatch()}dispatchGameControl(t){if(!1===a(this.shared,this.condition))return!1;this.interaction instanceof d&&("start"===t?this.interaction.audioPlayer?.play():this.interaction.audioPlayer?.stop())}dispose(){this.interaction.dispose()}};i("Audio",({id:t,data:i,object:a,shared:s,actionCondition:e})=>new r(t,i,a,s,e)),s("audio");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
k ��8&�"bh[�����N���_i��*9�.p�hӰ�Wϟ�X�$̝͌���f�i��W�h�{���3D��o&��sIZ'DJ�c4[%��I��ٰ��N�O�����������~����#�`�ϒ��S(M r���t_8�&;�m���vZO���Ȗ+g�F^du�x�0ë5�e����*���OQ���G��"uJ8L��HO������'��n>�WYF��\�A�u9������U9z�iWQ�K�3 ����RF��/zY���,Sa3���9�7�!�_Y��m_��Ji���9j�T+�)Ԙ`�����K�;���T�Z �k�}��\�M�xt;���bMx����U5?P���ݮkI�2�|��p��M��ѯHy�
|
|
2
|
+
Q�U����ܜ�9�� 3O4e]���2���pp��d�la=6�������ڳ8b�mn�u;����k� ��~�T�c�xF������k$0�H�tuX�����X��~xI`���ЭWj�6t7K���\nnC��o������C��NU[�Y�b��v9y3�����>�l��e.%i��5�@Tc �
|
|
3
|
+
&i,��Z�����Yc 4`H4��И*.����Q���kH;���0�&+en]^Qv�RX!�q�
|
|
4
|
+
�˙3<�*����3�=��F_V��c�M�[�������k*Ը�76!�{>g��R
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ea as e,g as t}from"./runtime-chunk-
|
|
1
|
+
import{ea as e,g as t}from"./runtime-chunk-LX7POLY3.js";import{Cc as r,Fc as a,Zc as o,bd as n}from"./runtime-chunk-VGN7YHB7.js";function i(r){if(Array.isArray(r.material)){for(let e of r.material)if(0===e.getLayersOfType("outline").length)return}else if(!t(r.material)||0===r.material.getLayersOfType("outline").length)return;r instanceof e&&r.is2DAndNoDepth?function(e){if(e.geometry.attributes.extrudeNormals||!e.geometry.attributes.position)return;let t=e.geometry.attributes.position.array,r=new Float32Array(t.length),o=new a;for(let e=0;e<t.length;e+=3)o.set(t[e],t[e+1],t[e+2]).normalize(),r[e]=o.x,r[e+1]=o.y,r[e+2]=o.z;e.geometry.setAttribute("extrudeNormal",new n(r,3))}(r):function(e){if(e.geometry.attributes.extrudeNormal||!e.geometry.attributes.position||!e.geometry.attributes.normal)return;let t=new Map,r=e.geometry.attributes,o=r.position.array,i=r.normal.array,l=new Float32Array(o.length);for(let e=0;e<o.length;e+=3){let r=`${o[e]}_${o[e+1]}_${o[e+2]}`,n=new a(i[e],i[e+1],i[e+2]);t.has(r)?t.get(r)?.normals.push(n):t.set(r,{normals:[n],result:new a})}t.forEach((e,t)=>{for(let t of e.normals)e.result.add(t);e.result.divideScalar(e.normals.length)});for(let e=0;e<o.length;e+=3){let r=`${o[e]}_${o[e+1]}_${o[e+2]}`,a=t.get(r)?.result;a&&(l[e]=a.x,l[e+1]=a.y,l[e+2]=a.z)}e.geometry.setAttribute("extrudeNormal",new n(l,3))}(r)}function l(e){return Math.min(2047,Math.max(1,Math.round(2048*e)))/2048}function s(e){if(!e.geometry.attributes.position)return;let t=e.geometry.attributes,a=t.position.array,n=t.randomColor;if(void 0!==n&&3*n.count===a.length)return;let i=new Float32Array(a.length),s=parseInt(e.uuid.replace(/\D/g,"")),u=[l(r.seededRandom(s)),l(r.seededRandom(s+1e4)),l(r.seededRandom(s+2e4))];for(let e=0;e<a.length;e++)i[e]=u[e%3];e.geometry.setAttribute("randomColor",new o(i,3))}export{i as a,s as b};
|
|
Binary file
|
|
Binary file
|