@uptimizr/dashboard 0.4.7 → 1.0.0
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/out/404.html +1 -1
- package/out/__next.__PAGE__.txt +9 -9
- package/out/__next._full.txt +10 -10
- package/out/__next._tree.txt +1 -1
- package/out/_next/static/chunks/{209sxygecny37.js → 0-6mdj5wxsfid.js} +1 -1
- package/out/_next/static/chunks/{0ybs1u66q26su.js → 0-qthfqvm1jyj.js} +1 -1
- package/out/_next/static/chunks/01viyuclp2gm9.js +1 -0
- package/out/_next/static/chunks/02aym4t2hgo5c.js +1 -0
- package/out/_next/static/chunks/02ic9b5ejugow.js +1 -0
- package/out/_next/static/chunks/03p70i4c7qt0v.js +1 -0
- package/out/_next/static/chunks/{33i36o_l69sm5.js → 03pjr-ivdicng.js} +1 -1
- package/out/_next/static/chunks/041a06-lxipy5.js +1 -0
- package/out/_next/static/chunks/{1zm6eo861i3c8.js → 06dzkwetqis-5.js} +1 -1
- package/out/_next/static/chunks/{3ipx7xbxchsq9.js → 06kvanz5-fo52.js} +1 -1
- package/out/_next/static/chunks/07y8ke_iy59dn.js +1 -0
- package/out/_next/static/chunks/09jukc-4jl735.js +1 -0
- package/out/_next/static/chunks/{35sne1llxnc-m.js → 09khmdgez3t0a.js} +18 -18
- package/out/_next/static/chunks/{02qk_wmkf9at-.js → 0_dca4876jshu.js} +38 -38
- package/out/_next/static/chunks/0axcgnl5qzr6e.js +1 -0
- package/out/_next/static/chunks/0ay4fjomijs3n.js +1 -0
- package/out/_next/static/chunks/0c7fy79wlccat.js +1 -0
- package/out/_next/static/chunks/0cqe4-l3imct3.js +1 -0
- package/out/_next/static/chunks/0cssvelju788j.js +1 -0
- package/out/_next/static/chunks/{0-_j1khfoib6l.js → 0ctain5xq2wsd.js} +12 -12
- package/out/_next/static/chunks/{22yqh0zlo_vwr.js → 0df-dr3otg_4w.js} +1 -1
- package/out/_next/static/chunks/{26y9sv8_-ykxf.js → 0endw997j7ao9.js} +1 -1
- package/out/_next/static/chunks/0ev_pbit1v_qg.js +1 -0
- package/out/_next/static/chunks/0eyw9oiwipywb.js +1 -0
- package/out/_next/static/chunks/0fkzbuo1tex4u.js +1 -0
- package/out/_next/static/chunks/0govas0u0t4w3.js +1 -0
- package/out/_next/static/chunks/{0grasqqf5dw7r.js → 0guzhnususp3-.js} +2 -2
- package/out/_next/static/chunks/0h7bq_ysu17q7.js +3 -0
- package/out/_next/static/chunks/0hneh_3xzlo28.js +1 -0
- package/out/_next/static/chunks/0iaqwme19z_0s.js +1 -0
- package/out/_next/static/chunks/0ibmar10xndpn.js +1 -0
- package/out/_next/static/chunks/0ii8mqoteppgh.js +11 -0
- package/out/_next/static/chunks/{1uh9zgsy69g92.js → 0ip6v64di_l6x.js} +1 -1
- package/out/_next/static/chunks/{267prao6fyt22.js → 0ixymgjgz3grn.js} +10 -10
- package/out/_next/static/chunks/0kuah8g7lt5ox.js +1 -0
- package/out/_next/static/chunks/0l3k4j19vxm17.js +1 -0
- package/out/_next/static/chunks/0l6hg0ohwh9-m.js +1 -0
- package/out/_next/static/chunks/0m4um4ylhlfan.js +1 -0
- package/out/_next/static/chunks/0mj837d4h0ddq.js +1 -0
- package/out/_next/static/chunks/0nyn-f4905o91.js +1 -0
- package/out/_next/static/chunks/0og6i9rsgkuif.js +1 -0
- package/out/_next/static/chunks/0os1x-fxzgnxs.js +1 -0
- package/out/_next/static/chunks/0otnra7mp0hog.js +1 -0
- package/out/_next/static/chunks/{1gttu-n9am66k.js → 0oyf2xzv8ofkk.js} +21 -21
- package/out/_next/static/chunks/0qvsy3gcqjm12.js +1 -0
- package/out/_next/static/chunks/{1qg1l7t00nyib.js → 0rl4ddh2vgxyl.js} +14 -14
- package/out/_next/static/chunks/0rwpttmsmqvn_.js +1 -0
- package/out/_next/static/chunks/0so3wjp9ch93y.js +1 -0
- package/out/_next/static/chunks/{43fp64xnfy646.js → 0te4g160_rb5d.js} +1 -1
- package/out/_next/static/chunks/0uby-zvu799ef.js +1 -0
- package/out/_next/static/chunks/{3h6akt2uu05ku.js → 0uvn0op2mlr2u.js} +12 -12
- package/out/_next/static/chunks/0vwj4hxjm0igv.js +1 -0
- package/out/_next/static/chunks/{1m9zc5gm-327d.js → 0w7c30w07uct2.js} +10 -10
- package/out/_next/static/chunks/0wm38z3u2133a.js +1 -0
- package/out/_next/static/chunks/0y7yk5al7_p8q.js +4 -0
- package/out/_next/static/chunks/0ywvahq9t0tki.js +1 -0
- package/out/_next/static/chunks/0zh6nslagkby-.js +1 -0
- package/out/_next/static/chunks/{3vbamaoiuk9yj.js → 0zo8xa0nej3ex.js} +1 -1
- package/out/_next/static/chunks/{2of8q0kaeqpf0.js → 0zsir95gpf3xw.js} +1 -1
- package/out/_next/static/chunks/0zu6ryyj0ig-j.js +3 -0
- package/out/_next/static/chunks/{2c721vfva711t.js → 1-jv8k10q_1uw.js} +1 -1
- package/out/_next/static/chunks/1-s5ioie9a94e.js +1 -0
- package/out/_next/static/chunks/{13zcn4lv0qj76.js → 1-yos1h0qws5e.js} +11 -11
- package/out/_next/static/chunks/10o7brc3x027r.js +1 -0
- package/out/_next/static/chunks/{060iult6f68_e.js → 10pae4gb9i929.js} +29 -29
- package/out/_next/static/chunks/13p93itm8a3ym.js +1 -0
- package/out/_next/static/chunks/{0btmk0wmekl02.js → 147s8i_lktp4_.js} +2 -2
- package/out/_next/static/chunks/{3njwfothmmg7u.js → 14tgo5xt_3j4w.js} +1 -1
- package/out/_next/static/chunks/1699hx-vlak0n.js +22 -0
- package/out/_next/static/chunks/16d6n9e77rqti.js +1 -0
- package/out/_next/static/chunks/{3zs7l4362msjd.js → 16f3d5dv83rsr.js} +1 -1
- package/out/_next/static/chunks/16i_tpwn_cmr-.js +1 -0
- package/out/_next/static/chunks/{1by60_b14x-3o.js → 16rfr165nbha0.js} +1 -1
- package/out/_next/static/chunks/{0zqgq0lwtz9tn.js → 16sl51pvzo4tf.js} +1 -1
- package/out/_next/static/chunks/{2n-pveub8b_5t.js → 1760s-32qpwgg.js} +1 -1
- package/out/_next/static/chunks/{1u8snlm6a7uhi.js → 18kq07c5xy_4g.js} +4 -4
- package/out/_next/static/chunks/{1rcdimhu0qhlu.js → 190tbzt861ao3.js} +39 -39
- package/out/_next/static/chunks/19bhv6cupnnyj.js +1 -0
- package/out/_next/static/chunks/1_14pn2wwebxy.js +1 -0
- package/out/_next/static/chunks/{3huu0tqmxwowu.js → 1_kikmeubh0wq.js} +30 -30
- package/out/_next/static/chunks/1ay3z6agelsvz.js +1 -0
- package/out/_next/static/chunks/1b-fi3bfmpe31.js +1 -0
- package/out/_next/static/chunks/1bae3tqv53x9_.js +1 -0
- package/out/_next/static/chunks/1bf421g4peccx.js +2 -0
- package/out/_next/static/chunks/1bfony5qsc5tp.js +1 -0
- package/out/_next/static/chunks/{1e8_jl2cxd3rp.js → 1ddt0ot7kl8vq.js} +40 -40
- package/out/_next/static/chunks/1emz2vjkgck4z.js +1 -0
- package/out/_next/static/chunks/1eogzzw8i1wsg.js +1 -0
- package/out/_next/static/chunks/{2apihn9ra2ufp.js → 1g9p2h1-31q8o.js} +1 -1
- package/out/_next/static/chunks/1gcz1k1v1woca.js +1 -0
- package/out/_next/static/chunks/{3v-0c2aj6c0on.js → 1h8lyicgqhpxa.js} +1 -1
- package/out/_next/static/chunks/{3772oce1n3t_g.js → 1hot663akaepl.js} +1 -1
- package/out/_next/static/chunks/1i7pgl3ks5ye0.js +1 -0
- package/out/_next/static/chunks/{2sys9nj8lo3uk.js → 1i8sk_qgpdjhs.js} +1 -1
- package/out/_next/static/chunks/1k8erl2uygr8g.js +1 -0
- package/out/_next/static/chunks/{30bhz7czzs4mf.js → 1kk3ct7pkpf3b.js} +1 -1
- package/out/_next/static/chunks/{33hp-khdfohdq.js → 1kq9o8del67le.js} +1 -1
- package/out/_next/static/chunks/{3d-i_skta_wes.js → 1l7tzyx2mumlq.js} +1 -1
- package/out/_next/static/chunks/1n_uwed9o--go.js +1 -0
- package/out/_next/static/chunks/1o351eldttogn.js +1 -0
- package/out/_next/static/chunks/1ogs4_aj84bfn.js +1 -0
- package/out/_next/static/chunks/{0sw-8gxbg4x0l.js → 1p206txlluipi.js} +18 -18
- package/out/_next/static/chunks/1p2bt1w845v6c.js +1 -0
- package/out/_next/static/chunks/1p3rgz4aef1gk.js +1 -0
- package/out/_next/static/chunks/{41b5gpyqbj58m.js → 1qcgdx9yl0gfx.js} +4 -4
- package/out/_next/static/chunks/1ql3mm2w5r-m8.js +1 -0
- package/out/_next/static/chunks/1qvcyuyshi3ll.js +53 -0
- package/out/_next/static/chunks/1r0yyg5a_0knc.js +1 -0
- package/out/_next/static/chunks/{15o4_2t-l3rj5.js → 1sa6qiidtcyk2.js} +1 -1
- package/out/_next/static/chunks/1t-9vrdrsi8le.js +1 -0
- package/out/_next/static/chunks/{1rlfg62jxqj3z.js → 1t97zo0tlpbnz.js} +1 -1
- package/out/_next/static/chunks/1te2tinzqnwck.js +1 -0
- package/out/_next/static/chunks/{3sa_hlx3konc7.js → 1trt-m2nrck0v.js} +1 -1
- package/out/_next/static/chunks/1ty9jpwr3o_st.js +1 -0
- package/out/_next/static/chunks/1u6w6veke8rze.js +1 -0
- package/out/_next/static/chunks/1u900urmrbv73.js +1 -0
- package/out/_next/static/chunks/{3_dgblylldcgb.js → 1vz2gd8k74lpi.js} +1 -1
- package/out/_next/static/chunks/1wkpl9bfb0wn7.js +1 -0
- package/out/_next/static/chunks/1wrly9a9c3teq.js +1 -0
- package/out/_next/static/chunks/1x0m05155yy4e.js +1 -0
- package/out/_next/static/chunks/{3xl-op0hwxytg.js → 1xf1wfow43ekc.js} +5 -5
- package/out/_next/static/chunks/1y10o40v9odam.js +1 -0
- package/out/_next/static/chunks/{2s6kpclh6ie7o.js → 1y_zykt3fpen4.js} +29 -29
- package/out/_next/static/chunks/1ye6xtbm16pg4.js +1 -0
- package/out/_next/static/chunks/{1t5oynmttpfsw.js → 1z6_57k5h31u7.js} +1 -1
- package/out/_next/static/chunks/{0lep3_bqwfuin.js → 1zboqft0h6mop.js} +1 -1
- package/out/_next/static/chunks/{43v4y2gu5z9_h.js → 1zr3c351x0ri5.js} +1 -1
- package/out/_next/static/chunks/2-5p2lcedvrli.js +1 -0
- package/out/_next/static/chunks/206hxrq60f1_e.js +1 -0
- package/out/_next/static/chunks/20r05k3-studj.js +1 -0
- package/out/_next/static/chunks/221j_mhvdpitn.js +1 -0
- package/out/_next/static/chunks/22gs24kj2du56.js +1 -0
- package/out/_next/static/chunks/22x5pd1gyp7sf.js +1 -0
- package/out/_next/static/chunks/{2a07so920b6aa.js → 22z-2t_yp1jzs.js} +1 -1
- package/out/_next/static/chunks/{30n4y_uu8chbh.js → 23hmfdw6z5zfy.js} +30 -30
- package/out/_next/static/chunks/23y1krqnc-8sm.js +1 -0
- package/out/_next/static/chunks/{3f8qelpscqfym.js → 24tbkj1qkux88.js} +2 -2
- package/out/_next/static/chunks/{2ao-3jzz7yw3p.js → 26cmri51v7497.js} +11 -11
- package/out/_next/static/chunks/27jalbk9zu-2b.js +1 -0
- package/out/_next/static/chunks/285d2s9096ryc.js +1 -0
- package/out/_next/static/chunks/296ykep2nvppv.js +1 -0
- package/out/_next/static/chunks/29nehg5cal-ug.js +1 -0
- package/out/_next/static/chunks/2_a56_k3x7to6.js +1 -0
- package/out/_next/static/chunks/2a-0l6eb1blh3.js +4 -0
- package/out/_next/static/chunks/{3qn6r8-0u6dij.js → 2a31-txop1jzg.js} +38 -38
- package/out/_next/static/chunks/2aanowvpmkmvj.js +1 -0
- package/out/_next/static/chunks/2bse5vll1o-x0.js +1 -0
- package/out/_next/static/chunks/2ct40spu9wfj7.js +1 -0
- package/out/_next/static/chunks/{2kok6zedeeltw.js → 2ept01b7t-e03.js} +1 -1
- package/out/_next/static/chunks/{3w59kt5ztyvoq.js → 2ey5dqelco_g5.js} +1 -1
- package/out/_next/static/chunks/2fd_009hw7y0m.js +1 -0
- package/out/_next/static/chunks/{0fd-0i1yt23kz.js → 2ftz9kaxrsgxh.js} +1 -1
- package/out/_next/static/chunks/2gefdnozflr7p.js +1 -0
- package/out/_next/static/chunks/{2izok2otbk8-2.js → 2gs-u1n5uv7iz.js} +37 -37
- package/out/_next/static/chunks/{2r96kyeehsji9.js → 2hizqql79u-54.js} +1 -1
- package/out/_next/static/chunks/2iqf2dpdg_vfl.js +1 -0
- package/out/_next/static/chunks/2j7z127s_ycjd.js +1 -0
- package/out/_next/static/chunks/2kax7uslfxdnx.js +31 -0
- package/out/_next/static/chunks/2lh_w9rzy3vek.js +1 -0
- package/out/_next/static/chunks/{0rracz73p38mo.js → 2ln1na26qwp-3.js} +9 -9
- package/out/_next/static/chunks/2n08l1q5o_27e.js +1 -0
- package/out/_next/static/chunks/2n7268gyd9z-6.js +1 -0
- package/out/_next/static/chunks/2nq9cgjmtqwvp.js +1 -0
- package/out/_next/static/chunks/{005bbq_px7lke.js → 2oj8qc_pv14nk.js} +2 -2
- package/out/_next/static/chunks/2q24e72-olbe8.js +1 -0
- package/out/_next/static/chunks/2qc4hscs26cro.js +1 -0
- package/out/_next/static/chunks/{0gf-ztg86zd80.js → 2qe46redkqhfg.js} +1 -1
- package/out/_next/static/chunks/2qtc0nbl_521e.js +1 -0
- package/out/_next/static/chunks/{0e1jfrmioeuws.js → 2rofu6gu1xzuq.js} +1 -1
- package/out/_next/static/chunks/2tdi94rkq739i.js +1 -0
- package/out/_next/static/chunks/2u_2sacqa9xa7.js +1 -0
- package/out/_next/static/chunks/2ujqz6088shm5.js +1 -0
- package/out/_next/static/chunks/{1l_3oidssbhns.js → 2urh9qafp3fiw.js} +17 -17
- package/out/_next/static/chunks/{05v-nubi896jg.js → 2v06n4z8wsmn9.js} +1 -1
- package/out/_next/static/chunks/2vp-5skbk1nfu.js +1 -0
- package/out/_next/static/chunks/2vu973j_n6cpx.js +1 -0
- package/out/_next/static/chunks/{37cnbm5ft1mqf.js → 2wwra56rehfcj.js} +1 -1
- package/out/_next/static/chunks/2xpwr97h2asal.js +1 -0
- package/out/_next/static/chunks/3000-0b8n9t_2.js +1 -0
- package/out/_next/static/chunks/30t3203d7p2da.js +1 -0
- package/out/_next/static/chunks/31kto7-dxkt3z.js +1 -0
- package/out/_next/static/chunks/{2lsvk7xcfkarc.js → 32oflcl79d8mu.js} +1 -1
- package/out/_next/static/chunks/32ovg81ae0l03.js +1 -0
- package/out/_next/static/chunks/{0z9erbl3llr_b.js → 331kthnvoma7n.js} +16 -16
- package/out/_next/static/chunks/{0q75860p8u_ii.js → 337kn1mn34rc6.js} +1 -1
- package/out/_next/static/chunks/{2tc3e-iqv71y_.js → 33xug8kf0-a1o.js} +1 -1
- package/out/_next/static/chunks/{1-ogak5u00kwa.js → 34dcb7_flbrvo.js} +1 -1
- package/out/_next/static/chunks/34g070edw165e.js +3 -0
- package/out/_next/static/chunks/34zotyeqrz_nq.js +1 -0
- package/out/_next/static/chunks/351wsmi75l8db.js +1 -0
- package/out/_next/static/chunks/{15jlgfcaeaki9.js → 36yv-ialtpx98.js} +1 -1
- package/out/_next/static/chunks/37hwasxtee5e0.js +1 -0
- package/out/_next/static/chunks/37t0iclgxes05.js +1 -0
- package/out/_next/static/chunks/{1q4lkgxfnqnew.js → 37xnvnx1jxfaf.js} +1 -1
- package/out/_next/static/chunks/{2z_iab7ozohhq.js → 38w74ixqt-9co.js} +16 -16
- package/out/_next/static/chunks/{2h249uvhh2sij.js → 39t2x_9zd2rst.js} +10 -10
- package/out/_next/static/chunks/{2n3xu_wbvtj7h.js → 3_xqc3658d8sw.js} +12 -12
- package/out/_next/static/chunks/3ba8eudvlczwe.js +1 -0
- package/out/_next/static/chunks/{2q6l-xdqzgmpf.js → 3buezhxqc8n6n.js} +1 -1
- package/out/_next/static/chunks/{1zt1xxovnjhkm.js → 3c5iwwj-fhbue.js} +1 -1
- package/out/_next/static/chunks/{2urx6fow8c8c9.js → 3d8ot2tw6yqfq.js} +12 -12
- package/out/_next/static/chunks/3dc057ffe7ij-.js +1 -0
- package/out/_next/static/chunks/3djnlzwj9869o.js +1 -0
- package/out/_next/static/chunks/{2y8i7_nxm4r05.js → 3fuqxjjf8o1v9.js} +5 -5
- package/out/_next/static/chunks/{0z004fn14pbcu.js → 3gt6rzg9qw-an.js} +1 -1
- package/out/_next/static/chunks/{1tgj55b305g4h.js → 3h_05w5j8x538.js} +1 -1
- package/out/_next/static/chunks/{3j9xvdz55bi4p.js → 3hkhd1_k8xohv.js} +33 -33
- package/out/_next/static/chunks/{42ymanq326mo7.js → 3ijcc5tfisfnj.js} +1 -1
- package/out/_next/static/chunks/3j0dbpd9zop3p.js +1 -0
- package/out/_next/static/chunks/{1zkd8v-qka--j.js → 3ju83xk-ca7ma.js} +21 -21
- package/out/_next/static/chunks/3jxhl4apmhbm1.js +13 -0
- package/out/_next/static/chunks/{302qk2fjdrthp.js → 3la99oz_0p0r6.js} +5 -5
- package/out/_next/static/chunks/3n1b34fd5fdrh.js +1 -0
- package/out/_next/static/chunks/{2j120dkh7q3uf.js → 3nq_hq4x3rn3r.js} +1 -1
- package/out/_next/static/chunks/3pgb1kkqrdl9t.js +1 -0
- package/out/_next/static/chunks/3pik_-jj-zkfl.js +1 -0
- package/out/_next/static/chunks/{2w99knknr5i8c.js → 3q38kdbzd2nbd.js} +1 -1
- package/out/_next/static/chunks/3q5zl4ks17au2.js +1 -0
- package/out/_next/static/chunks/{2uo6vm7mfgrbf.js → 3qr10445lte-n.js} +1 -1
- package/out/_next/static/chunks/3r-8bnguvxsyo.js +1 -0
- package/out/_next/static/chunks/3sg56j8boe-3o.js +1 -0
- package/out/_next/static/chunks/{2q8yg63br2jc9.js → 3u7zj1-jdg781.js} +1 -1
- package/out/_next/static/chunks/{32_c4mbb6j1l6.js → 3wj5dmf6cywz8.js} +22 -22
- package/out/_next/static/chunks/{3oqxl46ukaojj.js → 3wr_oijfsq8lr.js} +11 -11
- package/out/_next/static/chunks/3xu0dh1ikzwj2.js +1 -0
- package/out/_next/static/chunks/3y5tpixt23-fl.js +1 -0
- package/out/_next/static/chunks/40gjf-_jt8upu.js +5 -0
- package/out/_next/static/chunks/41f12o_5lf-i9.js +1 -0
- package/out/_next/static/chunks/42ma8lqduohlc.js +1 -0
- package/out/_next/static/chunks/{0ai0zgbgjqb92.js → 43usshq2nc125.js} +1 -1
- package/out/_next/static/chunks/{0hajwk2yd-rwr.js → 44bl4ufopbmyh.js} +1 -1
- package/out/_next/static/chunks/44iutzkw9r21x.js +1 -0
- package/out/_next/static/chunks/turbopack-1xrxa3noq196-.js +1 -0
- package/out/_not-found/__next._full.txt +8 -8
- package/out/_not-found/__next._not-found.__PAGE__.txt +7 -7
- package/out/_not-found/__next._tree.txt +1 -1
- package/out/_not-found.html +1 -1
- package/out/_not-found.txt +8 -8
- package/out/index.html +1 -1
- package/out/index.txt +10 -10
- package/package.json +10 -10
- package/out/_next/static/chunks/00fbhtmui-yxg.js +0 -1
- package/out/_next/static/chunks/017pn-pen381_.js +0 -1
- package/out/_next/static/chunks/01vov6inx1zzt.js +0 -1
- package/out/_next/static/chunks/03bd5plut08tg.js +0 -1
- package/out/_next/static/chunks/03dwfqmo73w_z.js +0 -1
- package/out/_next/static/chunks/03sn4419dam-h.js +0 -5
- package/out/_next/static/chunks/05ere0-228syf.js +0 -1
- package/out/_next/static/chunks/05h8u5lrypn5m.js +0 -1
- package/out/_next/static/chunks/05z79zh625ezu.js +0 -1
- package/out/_next/static/chunks/08lvtnv7b1cxp.js +0 -1
- package/out/_next/static/chunks/0_v2luu_qmeid.js +0 -1
- package/out/_next/static/chunks/0boov9mwycanf.js +0 -1
- package/out/_next/static/chunks/0d8x8m2x6ca_m.js +0 -1
- package/out/_next/static/chunks/0dmrdrwtd093b.js +0 -1
- package/out/_next/static/chunks/0e7nlxmneb2j_.js +0 -1
- package/out/_next/static/chunks/0es97pusfxupl.js +0 -1
- package/out/_next/static/chunks/0fxdyvb1w23d1.js +0 -1
- package/out/_next/static/chunks/0fxhc24djjcgq.js +0 -1
- package/out/_next/static/chunks/0hk1wg7h4araz.js +0 -1
- package/out/_next/static/chunks/0j74ipw4fps-n.js +0 -1
- package/out/_next/static/chunks/0kj-vckdn7t5p.js +0 -1
- package/out/_next/static/chunks/0lbs5xdyjuzuo.js +0 -1
- package/out/_next/static/chunks/0mp0jh1gj7290.js +0 -1
- package/out/_next/static/chunks/0ngpoj2g5i4kz.js +0 -1
- package/out/_next/static/chunks/0nhljhguceh66.js +0 -1
- package/out/_next/static/chunks/0p6z73afb9dj2.js +0 -1
- package/out/_next/static/chunks/0p9zfmidzqkps.js +0 -1
- package/out/_next/static/chunks/0sx-6rf3eteqn.js +0 -1
- package/out/_next/static/chunks/0thw099xk3_0p.js +0 -3
- package/out/_next/static/chunks/0u85f0dhb4i8e.js +0 -1
- package/out/_next/static/chunks/0uk7kigzm4vi2.js +0 -31
- package/out/_next/static/chunks/0ulufxnsrou61.js +0 -1
- package/out/_next/static/chunks/0xa9dyg6ezzyd.js +0 -2
- package/out/_next/static/chunks/0xvrfvur0p534.js +0 -1
- package/out/_next/static/chunks/0ydfhk-p6zvm0.js +0 -1
- package/out/_next/static/chunks/0zcsxvcvog9ue.js +0 -1
- package/out/_next/static/chunks/10_5p5-xf2aoo.js +0 -1
- package/out/_next/static/chunks/118qlrzdwpfmo.js +0 -1
- package/out/_next/static/chunks/11km5p4gd0ut4.js +0 -1
- package/out/_next/static/chunks/120rl4l29q9xs.js +0 -1
- package/out/_next/static/chunks/129m5i93ltoym.js +0 -1
- package/out/_next/static/chunks/12n73o884lyyl.js +0 -1
- package/out/_next/static/chunks/133glnfos64oo.js +0 -1
- package/out/_next/static/chunks/175st2ogkg_1o.js +0 -1
- package/out/_next/static/chunks/19rsodtu91ja_.js +0 -1
- package/out/_next/static/chunks/1a2ouhup611bz.js +0 -1
- package/out/_next/static/chunks/1cyq7i39885sl.js +0 -1
- package/out/_next/static/chunks/1d9it6yocgt54.js +0 -1
- package/out/_next/static/chunks/1dp1s1t-y7gal.js +0 -1
- package/out/_next/static/chunks/1dr7gh6xgypl8.js +0 -1
- package/out/_next/static/chunks/1dt30s_sp8415.js +0 -1
- package/out/_next/static/chunks/1f1rek_fxk3of.js +0 -1
- package/out/_next/static/chunks/1f2mna0k5efeq.js +0 -1
- package/out/_next/static/chunks/1gfz3sxwkkg3d.js +0 -1
- package/out/_next/static/chunks/1gr35qeguuws0.js +0 -1
- package/out/_next/static/chunks/1imi0xwi9hd99.js +0 -1
- package/out/_next/static/chunks/1ka5v5zu0cstt.js +0 -1
- package/out/_next/static/chunks/1n9nhz-6azcp3.js +0 -3
- package/out/_next/static/chunks/1ncqwe81t_9_x.js +0 -1
- package/out/_next/static/chunks/1nix_lulkpklo.js +0 -1
- package/out/_next/static/chunks/1ntqovuz2c217.js +0 -1
- package/out/_next/static/chunks/1pgs-98tfkq9_.js +0 -1
- package/out/_next/static/chunks/1q2z0aeopo8t8.js +0 -1
- package/out/_next/static/chunks/1ses023uud001.js +0 -1
- package/out/_next/static/chunks/1t9i20i5-f8ze.js +0 -1
- package/out/_next/static/chunks/1ug4k-1zhr63a.js +0 -1
- package/out/_next/static/chunks/1vrpzlif-z_p0.js +0 -1
- package/out/_next/static/chunks/1vurgl6oz2qey.js +0 -17
- package/out/_next/static/chunks/1w-qc09n9ijtq.js +0 -1
- package/out/_next/static/chunks/1ycqxcht6x54p.js +0 -1
- package/out/_next/static/chunks/1zj4307ugq0qz.js +0 -1
- package/out/_next/static/chunks/1zm52cjrfrq7c.js +0 -1
- package/out/_next/static/chunks/1zp9363yfhpom.js +0 -1
- package/out/_next/static/chunks/2-3hk_db5fpok.js +0 -1
- package/out/_next/static/chunks/2-bv9a_0zgw1f.js +0 -1
- package/out/_next/static/chunks/216uiih3_vdfd.js +0 -1
- package/out/_next/static/chunks/21kfpd_bityxt.js +0 -1
- package/out/_next/static/chunks/24ecas0m9tao7.js +0 -3
- package/out/_next/static/chunks/24pq9210rng3f.js +0 -1
- package/out/_next/static/chunks/26skkagvj1z96.js +0 -1
- package/out/_next/static/chunks/2701xfv_07wz_.js +0 -1
- package/out/_next/static/chunks/271333m8y3k0e.js +0 -1
- package/out/_next/static/chunks/29rkmguzky-bp.js +0 -1
- package/out/_next/static/chunks/2a2oy8ryz2tsk.js +0 -1
- package/out/_next/static/chunks/2apnpj0-fs9ks.js +0 -1
- package/out/_next/static/chunks/2b481pitl4k85.js +0 -1
- package/out/_next/static/chunks/2bettxaqt3d2p.js +0 -1
- package/out/_next/static/chunks/2d2kl_m64j9cb.js +0 -1
- package/out/_next/static/chunks/2droqjmvmgj13.js +0 -1
- package/out/_next/static/chunks/2dxbvwbbgpzoq.js +0 -1
- package/out/_next/static/chunks/2eqbsut829r5l.js +0 -1
- package/out/_next/static/chunks/2f3_mzxjh3gso.js +0 -1
- package/out/_next/static/chunks/2fsde0jwi5qtt.js +0 -1
- package/out/_next/static/chunks/2j2ynchpqh34-.js +0 -1
- package/out/_next/static/chunks/2kj6pzs_wap1v.js +0 -1
- package/out/_next/static/chunks/2lnj9jruy4nrv.js +0 -1
- package/out/_next/static/chunks/2ofwtw6p08sfz.js +0 -1
- package/out/_next/static/chunks/2phl5ta4iim7l.js +0 -12
- package/out/_next/static/chunks/2r5qgieqldcd9.js +0 -1
- package/out/_next/static/chunks/2r7y401cvjc1s.js +0 -1
- package/out/_next/static/chunks/2rmc6ru7mc-kg.js +0 -1
- package/out/_next/static/chunks/2w2k1gveljyb7.js +0 -1
- package/out/_next/static/chunks/2w_ptlw-ad8-9.js +0 -4
- package/out/_next/static/chunks/2ws1s9d52ayv8.js +0 -1
- package/out/_next/static/chunks/2x7enks3ydgai.js +0 -1
- package/out/_next/static/chunks/2ydub0t01728d.js +0 -1
- package/out/_next/static/chunks/3-m_vzabs1uez.js +0 -1
- package/out/_next/static/chunks/3527r3jo5fj3i.js +0 -1
- package/out/_next/static/chunks/355dg8yaa94hr.js +0 -1
- package/out/_next/static/chunks/35ntbr_c-yx44.js +0 -1
- package/out/_next/static/chunks/36enkx1skkv2-.js +0 -4
- package/out/_next/static/chunks/38xdo3cifphut.js +0 -1
- package/out/_next/static/chunks/3beawo-qwuk8k.js +0 -1
- package/out/_next/static/chunks/3cj_6sl9kr3e9.js +0 -1
- package/out/_next/static/chunks/3df_l2we755bb.js +0 -1
- package/out/_next/static/chunks/3eve5y7fpzx2h.js +0 -1
- package/out/_next/static/chunks/3ewgyb4y19w-3.js +0 -1
- package/out/_next/static/chunks/3f3789eh18_oy.js +0 -1
- package/out/_next/static/chunks/3g3-e9m1en45q.js +0 -1
- package/out/_next/static/chunks/3i239y-1hbkm-.js +0 -1
- package/out/_next/static/chunks/3kp8qmhoi24oz.js +0 -1
- package/out/_next/static/chunks/3ksq69yq-40_r.js +0 -1
- package/out/_next/static/chunks/3qye1lytea2i8.js +0 -1
- package/out/_next/static/chunks/3rlp9yr75liz7.js +0 -1
- package/out/_next/static/chunks/3tyo643l62h3m.js +0 -1
- package/out/_next/static/chunks/3tz2tpqa9uvwm.js +0 -1
- package/out/_next/static/chunks/3utpc-fc6_y0f.js +0 -1
- package/out/_next/static/chunks/3v6nxa28rxngq.js +0 -1
- package/out/_next/static/chunks/3vv99btjc-mky.js +0 -1
- package/out/_next/static/chunks/3x02lxdo28u9i.js +0 -1
- package/out/_next/static/chunks/3ydnxyc4rvad_.js +0 -1
- package/out/_next/static/chunks/3ylg4gfetwgxw.js +0 -1
- package/out/_next/static/chunks/3zdtteq-r2fs5.js +0 -62
- package/out/_next/static/chunks/3zkwt0gybqtgm.js +0 -1
- package/out/_next/static/chunks/40etabvml_71y.js +0 -1
- package/out/_next/static/chunks/417jkzz0slv9m.js +0 -1
- package/out/_next/static/chunks/41u2-5jayyajf.js +0 -22
- package/out/_next/static/chunks/42gcpy51w7lk1.js +0 -1
- package/out/_next/static/chunks/44cer242u-f8v.js +0 -1
- package/out/_next/static/chunks/44zi0gl0a6a8w.js +0 -1
- package/out/_next/static/chunks/turbopack-0n2o5_bkskckx.js +0 -1
- /package/out/_next/static/{A1hxMz783bIWo0Q9qqV3L → ThV8NNsoOCsJ6Q9-7H2dV}/_buildManifest.js +0 -0
- /package/out/_next/static/{A1hxMz783bIWo0Q9qqV3L → ThV8NNsoOCsJ6Q9-7H2dV}/_clientMiddlewareManifest.js +0 -0
- /package/out/_next/static/{A1hxMz783bIWo0Q9qqV3L → ThV8NNsoOCsJ6Q9-7H2dV}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,45756,e=>{"use strict";var t=e.i(69552),s=e.i(8697),r=e.i(10977),a=e.i(22961),i=e.i(36918),n=e.i(21796),o=e.i(32866),l=e.i(30820),h=e.i(70081),u=e.i(61133),_=e.i(71829);class d{constructor(){this.mm=new Map}get(e,t){let s=this.mm.get(e);if(void 0!==s)return s.get(t)}set(e,t,s){let r=this.mm.get(e);void 0===r&&this.mm.set(e,r=new Map),r.set(t,s)}}class p{get standalone(){return this._options?.standalone??!1}get baseMaterial(){return this._baseMaterial}get doNotInjectCode(){return this._options?.doNotInjectCode??!1}constructor(e,t,s){this._baseMaterial=e,this._scene=t??_.EngineStore.LastCreatedScene,this._options=s,this._subMeshToEffect=new Map,this._subMeshToDepthWrapper=new d,this._meshes=new Map,this._onEffectCreatedObserver=this._baseMaterial.onEffectCreatedObservable.add(e=>{let t=e.subMesh?.getMesh();t&&!this._meshes.has(t)&&this._meshes.set(t,t.onDisposeObservable.add(e=>{let t=this._subMeshToEffect.keys();for(let s=t.next();!0!==s.done;s=t.next()){let t=s.value;t?.getMesh()===e&&(this._subMeshToEffect.delete(t),this._deleteDepthWrapperEffect(t))}})),this._subMeshToEffect.get(e.subMesh)?.[0]!==e.effect&&(this._subMeshToEffect.set(e.subMesh,[e.effect,this._scene.getEngine().currentRenderPassId]),this._deleteDepthWrapperEffect(e.subMesh))})}_deleteDepthWrapperEffect(e){let t=this._subMeshToDepthWrapper.mm.get(e);t&&(t.forEach(e=>{e.mainDrawWrapper.effect?.dispose()}),this._subMeshToDepthWrapper.mm.delete(e))}getEffect(e,t,s){let r=this._subMeshToDepthWrapper.mm.get(e)?.get(t);if(!r)return null;let a=r.drawWrapper[s];return a||(a=r.drawWrapper[s]=new u.DrawWrapper(this._scene.getEngine())).setEffect(r.mainDrawWrapper.effect,r.mainDrawWrapper.defines),a}isReadyForSubMesh(e,t,s,r,a){return(!this.standalone||!!this._baseMaterial.isReadyForSubMesh(e.getMesh(),e,r))&&(this._makeEffect(e,t,s,a)?.isReady()??!1)}dispose(){this._baseMaterial.onEffectCreatedObservable.remove(this._onEffectCreatedObserver),this._onEffectCreatedObserver=null;let e=this._meshes.entries();for(let t=e.next();!0!==t.done;t=e.next()){let[e,s]=t.value;e.onDisposeObservable.remove(s)}}_makeEffect(e,t,s,r){let a=this._scene.getEngine(),i=this._subMeshToEffect.get(e);if(!i)return null;let[n,o]=i;if(!n.isReady())return null;let _=this._subMeshToDepthWrapper.get(e,s);if(!_){let t=new u.DrawWrapper(a),i=e._getDrawWrapper(o)?.defines;t.defines="string"==typeof i?null:i??null,(_={drawWrapper:[],mainDrawWrapper:t,depthDefines:"",token:(0,h.RandomGUID)()}).drawWrapper[r]=t,this._subMeshToDepthWrapper.set(e,s,_)}let d=t.join("\n");if(_.mainDrawWrapper.effect&&d===_.depthDefines)return _.mainDrawWrapper.effect;_.depthDefines=d;let p=n.getUniformNames().slice(),c=n.vertexSourceCodeBeforeMigration,f=n.fragmentSourceCodeBeforeMigration;if(!c&&!f)return null;if(!this.doNotInjectCode){let e=this._options&&this._options.remappedVariables?`#include<shadowMapVertexNormalBias>(${this._options.remappedVariables.join(",")})`:"#include<shadowMapVertexNormalBias>",t=this._options&&this._options.remappedVariables?`#include<shadowMapVertexMetric>(${this._options.remappedVariables.join(",")})`:"#include<shadowMapVertexMetric>",s=this._options&&this._options.remappedVariables?`#include<shadowMapFragmentSoftTransparentShadow>(${this._options.remappedVariables.join(",")})`:"#include<shadowMapFragmentSoftTransparentShadow>",r="#include<shadowMapFragment>",a="#include<shadowMapVertexExtraDeclaration>";c=(c=-1!==(c=(c=0===n.shaderLanguage?c.replace(/void\s+?main/g,`
|
|
2
|
+
${a}
|
|
3
|
+
void main`):c.replace(/@vertex/g,`
|
|
4
|
+
${a}
|
|
5
|
+
@vertex`)).replace(/#define SHADOWDEPTH_NORMALBIAS|#define CUSTOM_VERTEX_UPDATE_WORLDPOS/g,e)).indexOf("#define SHADOWDEPTH_METRIC")?c.replace(/#define SHADOWDEPTH_METRIC/g,t):c.replace(/}\s*$/g,t+"\n}")).replace(/#define SHADER_NAME.*?\n|out vec4 glFragColor;\n/g,"");let i=f.indexOf("#define SHADOWDEPTH_SOFTTRANSPARENTSHADOW")>=0||f.indexOf("#define CUSTOM_FRAGMENT_BEFORE_FOG")>=0,o=-1!==f.indexOf("#define SHADOWDEPTH_FRAGMENT"),h="";i?f=f.replace(/#define SHADOWDEPTH_SOFTTRANSPARENTSHADOW|#define CUSTOM_FRAGMENT_BEFORE_FOG/g,s):h=s+"\n",f=f.replace(/void\s+?main/g,l.Effect.IncludesShadersStore.shadowMapFragmentExtraDeclaration+"\nvoid main"),o?f=f.replace(/#define SHADOWDEPTH_FRAGMENT/g,r):h+=r+"\n",h&&(f=f.replace(/}\s*$/g,h+"}")),p.push("biasAndScaleSM","depthValuesSM","lightDataSM","softTransparentShadowSM")}_.mainDrawWrapper.effect=a.createEffect({vertexSource:c,fragmentSource:f,vertexToken:_.token,fragmentToken:_.token},{attributes:n.getAttributesNames(),uniformsNames:p,uniformBuffersNames:n.getUniformBuffersNames(),samplers:n.getSamplers(),defines:d+"\n"+n.defines.replace("#define SHADOWS","").replace(/#define SHADOW\d/g,""),indexParameters:n.getIndexParameters(),shaderLanguage:n.shaderLanguage},a);for(let e=0;e<_.drawWrapper.length;++e)e!==r&&_.drawWrapper[e]?.setEffect(_.mainDrawWrapper.effect,_.mainDrawWrapper.defines);return _.mainDrawWrapper.effect}}var c=e.i(28054),f=e.i(13279),x=e.i(26053),g=e.i(27239);function m(e){return Math.min(Math.max(Math.floor(Math.max(e.getCaps().maxVertexUniformVectors-40,0)/5),1),256)}class T extends a.MaterialDefines{constructor(e){super(e),this.FOG=!1,this.THIN_INSTANCES=!0,this.LOGARITHMICDEPTH=!1,this.CLIPPLANE=!1,this.CLIPPLANE2=!1,this.CLIPPLANE3=!1,this.CLIPPLANE4=!1,this.CLIPPLANE5=!1,this.CLIPPLANE6=!1,this.SH_DEGREE=0,this.COMPENSATION=!1,this.IS_COMPOUND=!1,this.MAX_PART_COUNT=128,this.USE_SOG=!1,this.USE_SOG_V2=!1,this.rebuild()}hasDefine(e){return -1!==this._keys.indexOf(e)}}class S extends i.PushMaterial{constructor(e,t){super(e,t),this.kernelSize=S.KernelSize,this.minPixelSize=S.MinPixelSize,this._compensation=S.Compensation,this._isDirty=!1,this._sourceMesh=null,this._voxelMissingTextureWarned=new Set,this._voxelPartWorldData=new Float32Array(0),this._voxelPartVisibilityData=[],this.backFaceCulling=!1,this.shadowDepthWrapper=S._MakeGaussianSplattingShadowDepthWrapper(t,this.shaderLanguage)}set compensation(e){this._isDirty=this._isDirty!=e,this._compensation=e}get compensation(){return this._compensation}get hasRenderTargetTextures(){return!1}needAlphaTesting(){return!1}needAlphaBlending(){return!0}isReadyForSubMesh(t,s){let r=s._drawWrapper,a=s.materialDefines;if(a&&this._isDirty&&a.markAsUnprocessed(),r.effect&&this.isFrozen&&r._wasPreviouslyReady&&!0===r._wasPreviouslyUsingInstances)return!0;if(!s.materialDefines||this.pluginManager){this._callbackPluginEventGeneric(4,this._eventInfo);let e=this._eventInfo.defineNames;(!s.materialDefines||e&&Object.keys(e).some(e=>!a.hasDefine(e)))&&(a=s.materialDefines=new T(e))}let i=this.getScene();if(this._isReadyForSubMesh(s))return!0;if(this._eventInfo.isReadyForSubMesh=!0,this._eventInfo.defines=a,this._eventInfo.subMesh=s,this._callbackPluginEventIsReadyForSubMesh(this._eventInfo),!this._eventInfo.isReadyForSubMesh||!this._sourceMesh)return!1;let o=i.getEngine(),l=this._sourceMesh;(0,x.PrepareDefinesForMisc)(t,i,this._useLogarithmicDepth,this.pointsCloud,this.fogEnabled,!1,a,void 0,void 0,void 0,this._isVertexOutputInvariant),(0,x.PrepareDefinesForFrameBoundValues)(i,o,this,a,!0,null,!0),this._eventInfo.defines=a,this._eventInfo.mesh=t,this._callbackPluginEventPrepareDefinesBeforeAttributes(this._eventInfo),(0,x.PrepareDefinesForAttributes)(t,a,!1,!1),this._callbackPluginEventPrepareDefines(this._eventInfo),(o.version>1||o.isWebGPU)&&(a.SH_DEGREE=l.shDegree),a.IS_COMPOUND=l.isCompound,a.MAX_PART_COUNT=m(o),a.USE_SOG=l.useSog,a.USE_SOG_V2=l.useSog&&l.sogParams?.version===2;let h=l.material;if(a.COMPENSATION=h&&h.compensation?h.compensation:S.Compensation,a.isDirty){a.markAsProcessed(),i.resetCachedMaterial(),(0,x.PrepareAttributesForInstances)(S._Attribs,a);let r=S._Attribs.slice(),l=S._Uniforms.slice(),h=S._Samplers.slice(),u=S._UniformBuffers.slice();(0,x.PrepareUniformsAndSamplersList)({uniformsNames:l,uniformBuffersNames:u,samplers:h,defines:a}),(0,n.AddClipPlaneUniforms)(l),this._uniformBufferLayoutBuilt||this.buildUniformLayout(),this._eventInfo.fallbackRank=0,this._eventInfo.defines=a,this._eventInfo.attributes=r,this._eventInfo.uniforms=l,this._eventInfo.samplers=h,this._eventInfo.uniformBuffersNames=u,this._eventInfo.customCode=void 0,this._eventInfo.mesh=t,this._callbackPluginEventGeneric(128,this._eventInfo);let _=a.toString(),d=i.getEngine().createEffect("gaussianSplatting",{attributes:r,uniformsNames:l,uniformBuffersNames:u,samplers:h,defines:_,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{},processCodeAfterIncludes:this._eventInfo.customCode,shaderLanguage:this._shaderLanguage,extraInitializationsAsync:async()=>{1===this._shaderLanguage?await Promise.all([e.A(89061),e.A(32361)]):await Promise.all([e.A(18157),e.A(66641)])}},o);s.setEffect(d,a,this._materialContext)}return!!s.effect&&!!s.effect.isReady()&&(a._renderId=i.getRenderId(),r._wasPreviouslyReady=!0,r._wasPreviouslyUsingInstances=!0,this._isDirty=!1,!0)}setSourceMesh(e){this._sourceMesh=e}getSourceMesh(){return this._sourceMesh}static BindEffect(e,t,s){let r=s.getEngine(),a=s.activeCamera,i=r.getRenderWidth()*a.viewport.width,n=r.getRenderHeight()*a.viewport.height,l=e.material;if(!l._sourceMesh)return;let h=l._sourceMesh,u=a?.rigParent?.rigCameras.length||1;t.setFloat2("invViewport",1/(i/u),1/n);let _=1e3;if(a){let e=a.getProjectionMatrix().m[5];_=a.fovMode==o.Camera.FOVMODE_VERTICAL_FIXED?n*e/2:i*e/2}if(t.setFloat2("focal",_,_),t.setFloat("kernelSize",l&&l.kernelSize?l.kernelSize:S.KernelSize),t.setFloat("minPixelSize",l?l.minPixelSize:S.MinPixelSize),t.setFloat("alpha",l.alpha),s.bindEyePosition(t,"eyePosition",!0),h.covariancesATexture){let e=h.covariancesATexture.getSize();if(t.setFloat2("dataTextureSize",e.width,e.height),t.setTexture("covariancesATexture",h.covariancesATexture),t.setTexture("covariancesBTexture",h.covariancesBTexture),t.setTexture("centersTexture",h.centersTexture),t.setTexture("colorsTexture",h.colorsTexture),h.useSog)S._BindSogUniforms(h,t);else if(h.shTextures)for(let e=0;e<h.shTextures.length;e++)t.setTexture(`shTexture${e}`,h.shTextures[e]);h.bindExtraEffectUniforms(t)}}static _BindSogUniforms(e,t){let s=e.sogParams;s&&(t.setTexture("sogQuatsTexture",e.rotationsATexture),e.shTextures&&e.shTextures.length>=2&&(t.setTexture("sogShNCentroidsTexture",e.shTextures[0]),t.setTexture("sogShNLabelsTexture",e.shTextures[1])),s.codebookTexture&&t.setTexture("sogCodebookTexture",s.codebookTexture),t.setFloat3("sogMeansMin",s.meansMin[0],s.meansMin[1],s.meansMin[2]),t.setFloat3("sogMeansMax",s.meansMax[0],s.meansMax[1],s.meansMax[2]),s.scalesMin&&s.scalesMax&&(t.setFloat3("sogScalesMin",s.scalesMin[0],s.scalesMin[1],s.scalesMin[2]),t.setFloat3("sogScalesMax",s.scalesMax[0],s.scalesMax[1],s.scalesMax[2])),s.sh0Min&&s.sh0Max&&(t.setFloat4("sogSh0Min",s.sh0Min[0],s.sh0Min[1],s.sh0Min[2],s.sh0Min[3]),t.setFloat4("sogSh0Max",s.sh0Max[0],s.sh0Max[1],s.sh0Max[2],s.sh0Max[3])),t.setFloat("sogShnMin",s.shnMin??0),t.setFloat("sogShnMax",s.shnMax??0),t.setFloat("sogShCoeffCount",s.shCoeffCount??0))}bindForSubMesh(e,t,s){let r=this.getScene(),a=s.materialDefines;if(!a)return;let i=s.effect;i&&(this._activeEffect=i,t.getMeshUniformBuffer().bindToEffect(i,"Mesh"),t.transferToEffect(e),this._mustRebind(r,i,s,t.visibility)?(this.bindView(i),this.bindViewProjection(i),S.BindEffect(t,this._activeEffect,r),(0,n.BindClipPlane)(i,this,r)):r.getEngine()._features.needToAlwaysBindUniformBuffers&&(this._needToBindSceneUbo=!0),(0,x.BindFogParameters)(r,t,i),this.useLogarithmicDepth&&(0,x.BindLogDepth)(a,i,r),this._eventInfo.subMesh=s,this._callbackPluginEventBindForSubMesh(this._eventInfo),this._afterBind(t,this._activeEffect,s))}static _BindEffectUniforms(e,t,s,r){let a,i,n=r.getEngine(),l=s.getEffect(),h=r.activeCamera;if(!h)return;e.getMeshUniformBuffer().bindToEffect(l,"Mesh"),s.bindView(l),s.bindViewProjection(l);let u=n.getRenderWidth()*h.viewport.width,_=n.getRenderHeight()*h.viewport.height;l.setFloat2("invViewport",1/u,1/_);let d=1e3;if(h){let e=h.getProjectionMatrix().m[5];d=h.fovMode==o.Camera.FOVMODE_VERTICAL_FIXED?_*e/2:u*e/2}if(l.setFloat2("focal",d,d),l.setFloat("kernelSize",t&&t.kernelSize?t.kernelSize:S.KernelSize),l.setFloat("minPixelSize",t?t.minPixelSize:S.MinPixelSize),l.setFloat("alpha",t.alpha),h.mode===o.Camera.ORTHOGRAPHIC_CAMERA?(a=!n.useReverseDepthBuffer&&n.isNDCHalfZRange?0:1,i=n.useReverseDepthBuffer&&n.isNDCHalfZRange?0:1):(a=n.useReverseDepthBuffer&&n.isNDCHalfZRange?h.minZ:n.isNDCHalfZRange?0:h.minZ,i=n.useReverseDepthBuffer&&n.isNDCHalfZRange?0:h.maxZ),l.setFloat2("depthValues",a,a+i),e.covariancesATexture){let t=e.covariancesATexture.getSize();l.setFloat2("dataTextureSize",t.width,t.height),l.setTexture("covariancesATexture",e.covariancesATexture),l.setTexture("covariancesBTexture",e.covariancesBTexture),l.setTexture("centersTexture",e.centersTexture),l.setTexture("colorsTexture",e.colorsTexture),e.bindExtraEffectUniforms(l)}}_bindVoxelEffectUniforms(e,t,r){if(!e.rotationsATexture&&(e.needsRotationScaleTextures=!0,!e.rotationsATexture))return!e.centersTexture||e.splatsData||this._voxelMissingTextureWarned.has(e.uniqueId)||(this._voxelMissingTextureWarned.add(e.uniqueId),s.Logger.Error("IBL voxelization: GaussianSplattingMesh rotation/scale textures are not available. Create the mesh either with keepInRam=true or needsRotationScaleTextures=true to enable IBL shadow voxelization.")),!1;this._voxelMissingTextureWarned.delete(e.uniqueId);let a=r.getEffect();e.getMeshUniformBuffer().bindToEffect(a,"Mesh");let i=e.rotationsATexture.getSize();if(a.setFloat("alpha",t.alpha),a.setFloat2("dataTextureSize",i.width,i.height),a.setTexture("rotationsATexture",e.rotationsATexture),a.setTexture("rotationsBTexture",e.rotationsBTexture),a.setTexture("rotationScaleTexture",e.rotationScaleTexture),a.setTexture("centersTexture",e.centersTexture),a.setTexture("colorsTexture",e.colorsTexture),e.partIndicesTexture){a.setTexture("partIndicesTexture",e.partIndicesTexture);let t=16*e.partCount;this._voxelPartWorldData.length!==t&&(this._voxelPartWorldData=new Float32Array(t));let s=this._voxelPartWorldData;for(let t=0;t<e.partCount;t++)e.getWorldMatrixForPart(t).toArray(s,16*t);a.setMatrices("partWorld",s);let r=this._voxelPartVisibilityData;r.length=e.partCount;for(let t=0;t<e.partCount;t++)r[t]=e.partVisibility[t]??1;a.setArray("partVisibility",r)}return!0}makeVoxelRenderingMaterial(t,s,r,a=!1){let i=[`#define MAX_DRAW_BUFFERS ${r}`];i.push("#define IS_FOR_VOXELIZATION"),a&&(i.push("#define IS_COMPOUND 1"),i.push(`#define MAX_PART_COUNT ${m(t.getEngine())}`));let n=new c.ShaderMaterial("gaussianSplattingVoxelRender",t,{vertex:"gaussianSplattingVoxel",fragment:"gaussianSplattingVoxel"},{attributes:S._Attribs,uniforms:S._VoxelUniforms,samplers:S._VoxelSamplers,uniformBuffers:S._UniformBuffers,storageBuffers:1===s?["voxelOpacityBuffer"]:[],shaderLanguage:s,defines:i,needAlphaBlending:!1,extraInitializationsAsync:async()=>{1===s?await Promise.all([e.A(56968),e.A(80629)]):await Promise.all([e.A(18897),e.A(4083)])}});return n.cullBackFaces=!1,n.backFaceCulling=!1,n.depthFunction=g.Engine.ALWAYS,n.onBindObservable.add(e=>{let t=e.material;this._bindVoxelEffectUniforms(e,t,n)}),n}makeDepthRenderingMaterial(e,t,s=!1,r=!1){let a=["#define DEPTH_RENDER"];s&&a.push("#define ALPHA_BLENDED_DEPTH"),r&&(a.push("#define IS_COMPOUND 1"),a.push(`#define MAX_PART_COUNT ${m(e.getEngine())}`));let i=new c.ShaderMaterial("gaussianSplattingDepthRender",e,{vertex:"gaussianSplattingDepth",fragment:"gaussianSplattingDepth"},{attributes:S._Attribs,uniforms:S._Uniforms,samplers:S._Samplers,uniformBuffers:S._UniformBuffers,shaderLanguage:t,defines:a,needAlphaBlending:s});return i.doNotSerialize=!0,i.backFaceCulling=!1,i.onBindObservable.add(t=>{let s=t.material,r=s?.getSourceMesh()??t;S._BindEffectUniforms(r,s,i,e)}),i}static _MakeGaussianSplattingShadowDepthWrapper(e,t){let s=new c.ShaderMaterial("gaussianSplattingDepth",e,{vertex:"gaussianSplattingDepth",fragment:"gaussianSplattingDepth"},{attributes:S._Attribs,uniforms:S._Uniforms,samplers:S._Samplers,uniformBuffers:S._UniformBuffers,shaderLanguage:t});s.doNotSerialize=!0,s.backFaceCulling=!1;let r=new p(s,e,{standalone:!0});return s.onBindObservable.add(t=>{let r=t.material,a=r?.getSourceMesh()??t;S._BindEffectUniforms(a,r,s,e)}),r}clone(e){let s=t.SerializationHelper.Clone(()=>new S(e,this.getScene()),this);return s.id=e,s.name=e,this._clonePlugins(s,""),s}serialize(){let e=super.serialize();return e.customType="BABYLON.GaussianSplattingMaterial",e}getClassName(){return"GaussianSplattingMaterial"}static Parse(e,s,r){let a=t.SerializationHelper.Parse(()=>new S(e.name,s),e,s,r);return f.Material._ParsePlugins(e,a,s,r),a}}S.KernelSize=.3,S.Compensation=!1,S.MinPixelSize=0,S._Attribs=[r.VertexBuffer.PositionKind,"splatIndex0","splatIndex1","splatIndex2","splatIndex3"],S._Samplers=["covariancesATexture","covariancesBTexture","centersTexture","colorsTexture","shTexture0","shTexture1","shTexture2","shTexture3","shTexture4","partIndicesTexture","sogQuatsTexture","sogShNCentroidsTexture","sogShNLabelsTexture","sogCodebookTexture"],S._UniformBuffers=["Scene","Mesh"],S._VoxelUniforms=["world","dataTextureSize","alpha","invWorldScale","viewMatrix","nearPlane","farPlane","stepSize","partWorld","partVisibility","axis"],S._VoxelSamplers=["rotationsATexture","rotationsBTexture","rotationScaleTexture","centersTexture","colorsTexture","partIndicesTexture"],S._Uniforms=["world","view","projection","vFogInfos","vFogColor","logarithmicDepthConstant","invViewport","dataTextureSize","focal","eyePosition","kernelSize","minPixelSize","alpha","depthValues","partWorld","partVisibility","sogMeansMin","sogMeansMax","sogScalesMin","sogScalesMax","sogSh0Min","sogSh0Max","sogShnMin","sogShnMax","sogShCoeffCount"],e.s(["GaussianSplattingMaterial",0,S,"GetGaussianSplattingMaxPartCount",0,m],45756)},50728,e=>{"use strict";var t=e.i(80603),s=e.i(93414),r=e.i(58724),a=e.i(8697),i=e.i(476);let n=!1;class o extends s.RenderTargetTexture{get isSupported(){return this._engine?.getCaps().drawBuffersExtension??!1}get textures(){return this._textures}get count(){return this._count}get depthTexture(){return this._textures[this._textures.length-1]}set wrapU(e){if(this._textures)for(let t=0;t<this._textures.length;t++)this._textures[t].wrapU=e}set wrapV(e){if(this._textures)for(let t=0;t<this._textures.length;t++)this._textures[t].wrapV=e}constructor(e,t,s,o,l,h){const u=!!l&&!!l.generateMipMaps&&l.generateMipMaps,_=!!l&&!!l.generateDepthTexture&&l.generateDepthTexture,d=l&&l.depthTextureFormat?l.depthTextureFormat:15,p=!l||void 0===l.doNotChangeAspectRatio||l.doNotChangeAspectRatio,c=!!l&&!!l.drawOnlyOnFirstAttachmentByDefault&&l.drawOnlyOnFirstAttachmentByDefault;if(super(e,t,o,u,p,void 0,void 0,void 0,void 0,void 0,void 0,void 0,!0),n||(n=!0,i.ThinEngine.prototype.restoreSingleAttachment=function(){let e=this._gl;this.bindAttachments([e.BACK])},i.ThinEngine.prototype.restoreSingleAttachmentForRenderTarget=function(){let e=this._gl;this.bindAttachments([e.COLOR_ATTACHMENT0])},i.ThinEngine.prototype.buildTextureLayout=function(e,t=!1){let s=this._gl,r=[];if(t)r.push(s.BACK);else for(let t=0;t<e.length;t++)e[t]?r.push(s["COLOR_ATTACHMENT"+t]):r.push(s.NONE);return r},i.ThinEngine.prototype.bindAttachments=function(e){this._gl.drawBuffers(e)},i.ThinEngine.prototype.unBindMultiColorAttachmentFramebuffer=function(e,t=!1,s){this._currentRenderTarget=null,e.disableAutomaticMSAAResolve||this.resolveMultiFramebuffer(e),t||this.generateMipMapsMultiFramebuffer(e),s&&(e._MSAAFramebuffer&&this._bindUnboundFramebuffer(e._framebuffer),s()),this._bindUnboundFramebuffer(null)},i.ThinEngine.prototype.createMultipleRenderTarget=function(e,t,s=!0){let i,n=!1,o=!0,l=!1,h=!1,u=1,_=1,d=[],p=[],c=[],f=[],x=[],g=[],m=[],T=[],S=[],M=!1,b=this._createHardwareRenderTargetWrapper(!0,!1,e);void 0!==t&&(n=void 0!==t.generateMipMaps&&t.generateMipMaps,o=void 0===t.generateDepthBuffer||t.generateDepthBuffer,l=void 0!==t.generateStencilBuffer&&t.generateStencilBuffer,h=void 0!==t.generateDepthTexture&&t.generateDepthTexture,u=t.textureCount??1,_=t.samples??_,d=t.types||d,p=t.samplingModes||p,c=t.useSRGBBuffers||c,f=t.formats||f,x=t.targetTypes||x,g=t.faceIndex||g,m=t.layerIndex||m,T=t.layerCounts||T,S=t.labels||S,M=t.dontCreateTextures??!1,this.webGLVersion>1&&(13===t.depthTextureFormat||17===t.depthTextureFormat||16===t.depthTextureFormat||14===t.depthTextureFormat||18===t.depthTextureFormat)&&(i=t.depthTextureFormat)),void 0===i&&(i=l?13:14);let A=this._gl,y=this._currentFramebuffer,D=A.createFramebuffer();this._bindUnboundFramebuffer(D);let I=e.width??e,v=e.height??e,C=[],w=[],E=this.webGLVersion>1&&(13===i||17===i||18===i);b.label=t?.label??"MultiRenderTargetWrapper",b._framebuffer=D,b._generateDepthBuffer=h||o,b._generateStencilBuffer=h?E:l,b._depthStencilBuffer=this._setupFramebufferDepthAttachments(b._generateStencilBuffer,b._generateDepthBuffer,I,v,1,i),b._attachments=w;for(let e=0;e<u;e++){let t=p[e]||3,s=d[e]||0,i=c[e]||!1,o=f[e]||5,l=x[e]||3553,h=T[e]??1;(1!==s||this._caps.textureFloatLinearFiltering)&&(2!==s||this._caps.textureHalfFloatLinearFiltering)||(t=1);let u=this._getSamplingParameters(t,n);1!==s||this._caps.textureFloat||(s=0,a.Logger.Warn("Float textures are not supported. Render target forced to TEXTURETYPE_UNSIGNED_BYTE type")),i=i&&this._caps.supportSRGBBuffers&&(this.webGLVersion>1||this.isWebGPU);let _=this.webGLVersion>1,g=A[_?"COLOR_ATTACHMENT"+e:"COLOR_ATTACHMENT"+e+"_WEBGL"];if(w.push(g),-1===l||M)continue;let m=new r.InternalTexture(this,6);C[e]=m,A.activeTexture(A["TEXTURE"+e]),A.bindTexture(l,m._hardwareTexture.underlyingResource),A.texParameteri(l,A.TEXTURE_MAG_FILTER,u.mag),A.texParameteri(l,A.TEXTURE_MIN_FILTER,u.min),A.texParameteri(l,A.TEXTURE_WRAP_S,A.CLAMP_TO_EDGE),A.texParameteri(l,A.TEXTURE_WRAP_T,A.CLAMP_TO_EDGE);let y=this._getRGBABufferInternalSizedFormat(s,o,i),D=this._getInternalFormat(o),E=this._getWebGLTextureType(s);if(_&&(35866===l||32879===l))35866===l?m.is2DArray=!0:m.is3D=!0,m.baseDepth=m.depth=h,A.texImage3D(l,0,y,I,v,h,0,D,E,null);else if(34067===l){for(let e=0;e<6;e++)A.texImage2D(A.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,y,I,v,0,D,E,null);m.isCube=!0}else A.texImage2D(A.TEXTURE_2D,0,y,I,v,0,D,E,null);n&&A.generateMipmap(l),this._bindTextureDirectly(l,null),m.baseWidth=I,m.baseHeight=v,m.width=I,m.height=v,m.isReady=!0,m.samples=1,m.generateMipMaps=n,m.samplingMode=t,m.type=s,m._useSRGBBuffer=i,m.format=o,m.label=S[e]??b.label+"-Texture"+e,this._internalTexturesCache.push(m)}if(h&&this._caps.depthTextureExtension&&!M){let e=new r.InternalTexture(this,14),t=5,s=A.DEPTH_COMPONENT16,a=A.DEPTH_COMPONENT,o=A.UNSIGNED_SHORT,l=A.DEPTH_ATTACHMENT;this.webGLVersion<2?s=A.DEPTH_COMPONENT:14===i?(t=1,o=A.FLOAT,s=A.DEPTH_COMPONENT32F):18===i?(t=0,o=A.FLOAT_32_UNSIGNED_INT_24_8_REV,s=A.DEPTH32F_STENCIL8,a=A.DEPTH_STENCIL,l=A.DEPTH_STENCIL_ATTACHMENT):16===i?(t=0,o=A.UNSIGNED_INT,s=A.DEPTH_COMPONENT24,l=A.DEPTH_ATTACHMENT):(13===i||17===i)&&(t=12,o=A.UNSIGNED_INT_24_8,s=A.DEPTH24_STENCIL8,a=A.DEPTH_STENCIL,l=A.DEPTH_STENCIL_ATTACHMENT),this._bindTextureDirectly(A.TEXTURE_2D,e,!0),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MAG_FILTER,A.NEAREST),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MIN_FILTER,A.NEAREST),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_S,A.CLAMP_TO_EDGE),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_T,A.CLAMP_TO_EDGE),A.texImage2D(A.TEXTURE_2D,0,s,I,v,0,a,o,null),A.framebufferTexture2D(A.FRAMEBUFFER,l,A.TEXTURE_2D,e._hardwareTexture.underlyingResource,0),this._bindTextureDirectly(A.TEXTURE_2D,null),b._depthStencilTexture=e,b._depthStencilTextureWithStencil=E,e.baseWidth=I,e.baseHeight=v,e.width=I,e.height=v,e.isReady=!0,e.samples=1,e.generateMipMaps=n,e.samplingMode=1,e.format=i,e.type=t,e.label=b.label+"-DepthStencil",C[u]=e,this._internalTexturesCache.push(e)}if(b.setTextures(C),s&&A.drawBuffers(w),this._bindUnboundFramebuffer(y),b.setLayerAndFaceIndices(m,g),this.resetTextureCache(),M){if(_>1){let e=A.createFramebuffer();if(!e)throw Error("Unable to create multi sampled framebuffer");b._samples=_,b._MSAAFramebuffer=e,u>0&&s&&(this._bindUnboundFramebuffer(e),A.drawBuffers(w),this._bindUnboundFramebuffer(y))}}else this.updateMultipleRenderTargetTextureSampleCount(b,_,s);return b},i.ThinEngine.prototype.updateMultipleRenderTargetTextureSampleCount=function(e,t,s=!0){if(this.webGLVersion<2||!e)return 1;if(e.samples===t)return t;let r=this._gl;t=Math.min(t,this.getCaps().maxMSAASamples),e._depthStencilBuffer&&(r.deleteRenderbuffer(e._depthStencilBuffer),e._depthStencilBuffer=null),e._MSAAFramebuffer&&(r.deleteFramebuffer(e._MSAAFramebuffer),e._MSAAFramebuffer=null);let a=e._attachments.length;for(let t=0;t<a;t++){let s=e.textures[t]._hardwareTexture;s?.releaseMSAARenderBuffers()}if(t>1&&"function"==typeof r.renderbufferStorageMultisample){let i=r.createFramebuffer();if(!i)throw Error("Unable to create multi sampled framebuffer");e._MSAAFramebuffer=i,this._bindUnboundFramebuffer(i);let n=[];for(let s=0;s<a;s++){let a=e.textures[s],i=a._hardwareTexture,o=r[this.webGLVersion>1?"COLOR_ATTACHMENT"+s:"COLOR_ATTACHMENT"+s+"_WEBGL"],l=this._createRenderBuffer(a.width,a.height,t,-1,this._getRGBABufferInternalSizedFormat(a.type,a.format,a._useSRGBBuffer),o);if(!l)throw Error("Unable to create multi sampled framebuffer");i.addMSAARenderBuffer(l),a.samples=t,n.push(o)}s&&r.drawBuffers(n)}else this._bindUnboundFramebuffer(e._framebuffer);let i=e._depthStencilTexture?e._depthStencilTexture.format:void 0;return e._depthStencilBuffer=this._setupFramebufferDepthAttachments(e._generateStencilBuffer,e._generateDepthBuffer,e.width,e.height,t,i),this._bindUnboundFramebuffer(null),e._samples=t,t},i.ThinEngine.prototype.generateMipMapsMultiFramebuffer=function(e){let t=this._gl;if(e.isMulti)for(let s=0;s<e._attachments.length;s++){let r=e.textures[s];!r?.generateMipMaps||r?.isCube||r?.is3D||(this._bindTextureDirectly(t.TEXTURE_2D,r,!0),t.generateMipmap(t.TEXTURE_2D),this._bindTextureDirectly(t.TEXTURE_2D,null))}},i.ThinEngine.prototype.resolveMultiFramebuffer=function(e){let t=this._gl;if(!e._MSAAFramebuffer||!e.isMulti)return;let s=e.resolveMSAAColors?t.COLOR_BUFFER_BIT:0;s|=e._generateDepthBuffer&&e.resolveMSAADepth?t.DEPTH_BUFFER_BIT:0,s|=e._generateStencilBuffer&&e.resolveMSAAStencil?t.STENCIL_BUFFER_BIT:0;let r=e._attachments,a=r.length;t.bindFramebuffer(t.READ_FRAMEBUFFER,e._MSAAFramebuffer),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,e._framebuffer);for(let i=0;i<a;i++){let n=e.textures[i];for(let e=0;e<a;e++)r[e]=t.NONE;r[i]=t[this.webGLVersion>1?"COLOR_ATTACHMENT"+i:"COLOR_ATTACHMENT"+i+"_WEBGL"],t.readBuffer(r[i]),t.drawBuffers(r),t.blitFramebuffer(0,0,n.width,n.height,0,0,n.width,n.height,s,t.NEAREST)}for(let e=0;e<a;e++)r[e]=t[this.webGLVersion>1?"COLOR_ATTACHMENT"+e:"COLOR_ATTACHMENT"+e+"_WEBGL"];t.drawBuffers(r),t.bindFramebuffer(this._gl.FRAMEBUFFER,e._MSAAFramebuffer)}),!this.isSupported)return void this.dispose();this._textureNames=h;const f=[],x=[],g=[],m=[],T=[],S=[],M=[],b=[];this._initTypes(s,f,x,g,m,T,S,M,b,l);const A=!l||void 0===l.generateDepthBuffer||l.generateDepthBuffer,y=!!l&&void 0!==l.generateStencilBuffer&&l.generateStencilBuffer,D=l&&l.samples?l.samples:1;this._multiRenderTargetOptions={samplingModes:x,generateMipMaps:u,generateDepthBuffer:A,generateStencilBuffer:y,generateDepthTexture:_,depthTextureFormat:d,types:f,textureCount:s,useSRGBBuffers:g,samples:D,formats:m,targetTypes:T,faceIndex:S,layerIndex:M,layerCounts:b,labels:h,label:e},this._count=s,this._drawOnlyOnFirstAttachmentByDefault=c,s>0&&(this._createInternalTextures(),this._createTextures(h))}_initTypes(e,s,r,a,i,n,o,l,h,u){for(let _=0;_<e;_++)u&&u.types&&void 0!==u.types[_]?s.push(u.types[_]):s.push(u&&u.defaultType?u.defaultType:0),u&&u.samplingModes&&void 0!==u.samplingModes[_]?r.push(u.samplingModes[_]):r.push(t.Texture.BILINEAR_SAMPLINGMODE),u&&u.useSRGBBuffers&&void 0!==u.useSRGBBuffers[_]?a.push(u.useSRGBBuffers[_]):a.push(!1),u&&u.formats&&void 0!==u.formats[_]?i.push(u.formats[_]):i.push(5),u&&u.targetTypes&&void 0!==u.targetTypes[_]?n.push(u.targetTypes[_]):n.push(3553),u&&u.faceIndex&&void 0!==u.faceIndex[_]?o.push(u.faceIndex[_]):o.push(0),u&&u.layerIndex&&void 0!==u.layerIndex[_]?l.push(u.layerIndex[_]):l.push(0),u&&u.layerCounts&&void 0!==u.layerCounts[_]?h.push(u.layerCounts[_]):h.push(1)}_createInternaTextureIndexMapping(){let e={},t=[];if(!this._renderTarget)return t;let s=this._renderTarget.textures;for(let r=0;r<s.length;r++){let a=s[r];if(!a)continue;let i=e[a.uniqueId];void 0!==i?t[r]=i:e[a.uniqueId]=r}return t}_rebuild(e=!1,t=!1,s){if(this._count<1||e)return;let r=this._createInternaTextureIndexMapping();this.releaseInternalTextures(),this._createInternalTextures(),t&&(this._releaseTextures(),this._createTextures(s));let a=this._renderTarget.textures;for(let e=0;e<a.length;e++){let t=this._textures[e];void 0!==r[e]&&this._renderTarget.setTexture(a[r[e]],e),t._texture=a[e],t._texture&&(t._noMipmap=!t._texture.useMipMaps,t._useSRGBBuffer=t._texture._useSRGBBuffer)}1!==this.samples&&this._renderTarget.setSamples(this.samples,!this._drawOnlyOnFirstAttachmentByDefault,!0)}_createInternalTextures(){this._renderTarget=this._getEngine().createMultipleRenderTarget(this._size,this._multiRenderTargetOptions,!this._drawOnlyOnFirstAttachmentByDefault),this._texture=this._renderTarget.texture}_releaseTextures(){if(this._textures)for(let e=0;e<this._textures.length;e++)this._textures[e]._texture=null,this._textures[e].dispose()}_createTextures(e){let s=this._renderTarget.textures;this._textures=[];for(let r=0;r<s.length;r++){let a=new t.Texture(null,this.getScene());e?.[r]&&(a.name=e[r]),a._texture=s[r],a._texture&&(a._noMipmap=!a._texture.useMipMaps,a._useSRGBBuffer=a._texture._useSRGBBuffer),this._textures.push(a)}}setInternalTexture(e,s,r=!0){if(this.renderTarget&&(0===s&&(this._texture=e),this.renderTarget.setTexture(e,s,r),this.textures[s]||(this.textures[s]=new t.Texture(null,this.getScene()),this.textures[s].name=this._textureNames?.[s]??this.textures[s].name),this.textures[s]._texture=e,this.textures[s]._noMipmap=!e.useMipMaps,this.textures[s]._useSRGBBuffer=e._useSRGBBuffer,this._count=this.renderTarget.textures?this.renderTarget.textures.length:0,this._multiRenderTargetOptions.types&&(this._multiRenderTargetOptions.types[s]=e.type),this._multiRenderTargetOptions.samplingModes&&(this._multiRenderTargetOptions.samplingModes[s]=e.samplingMode),this._multiRenderTargetOptions.useSRGBBuffers&&(this._multiRenderTargetOptions.useSRGBBuffers[s]=e._useSRGBBuffer),this._multiRenderTargetOptions.targetTypes&&-1!==this._multiRenderTargetOptions.targetTypes[s])){let t;t=e.is2DArray?35866:e.isCube?34067:e.is3D?32879:3553,this._multiRenderTargetOptions.targetTypes[s]=t}}setLayerAndFaceIndex(e,t=-1,s=-1){this.textures[e]&&this.renderTarget&&(this._multiRenderTargetOptions.layerIndex&&(this._multiRenderTargetOptions.layerIndex[e]=t),this._multiRenderTargetOptions.faceIndex&&(this._multiRenderTargetOptions.faceIndex[e]=s),this.renderTarget.setLayerAndFaceIndex(e,t,s))}setLayerAndFaceIndices(e,t){this.renderTarget&&(this._multiRenderTargetOptions.layerIndex=e,this._multiRenderTargetOptions.faceIndex=t,this.renderTarget.setLayerAndFaceIndices(e,t))}get samples(){return this._samples}set samples(e){this._renderTarget?this._samples=this._renderTarget.setSamples(e):this._samples=e}resize(e){this._processSizeParameter(e),this._rebuild(!1,void 0,this._textureNames)}updateCount(e,t,s){this._multiRenderTargetOptions.textureCount=e,this._count=e;let r=[],a=[],i=[],n=[],o=[],l=[],h=[],u=[];this._textureNames=s,this._initTypes(e,r,a,i,n,o,l,h,u,t),this._multiRenderTargetOptions.types=r,this._multiRenderTargetOptions.samplingModes=a,this._multiRenderTargetOptions.useSRGBBuffers=i,this._multiRenderTargetOptions.formats=n,this._multiRenderTargetOptions.targetTypes=o,this._multiRenderTargetOptions.faceIndex=l,this._multiRenderTargetOptions.layerIndex=h,this._multiRenderTargetOptions.layerCounts=u,this._multiRenderTargetOptions.labels=s,this._rebuild(!1,!0,s)}_unbindFrameBuffer(e,t){this._renderTarget&&e.unBindMultiColorAttachmentFramebuffer(this._renderTarget,this.isCube,()=>{this.onAfterRenderObservable.notifyObservers(t)})}dispose(e=!1){this._releaseTextures(),e?this._texture=null:this.releaseInternalTextures(),super.dispose()}releaseInternalTextures(){let e=this._renderTarget?.textures;if(e){for(let t=e.length-1;t>=0;t--)this._textures[t]._texture=null;this._renderTarget?.dispose(),this._renderTarget=null}}}e.s(["MultiRenderTarget",0,o],50728)},58180,e=>{"use strict";var t=e.i(80603);class s extends t.Texture{constructor(e,s,r,a,i,n=!0,o=!1,l=3,h=0,u,_,d,p){if(super(null,i,!n,o,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,u),this.format=a,!this._engine)return;this._engine._caps.textureFloatLinearFiltering||1!==h||(l=1),this._engine._caps.textureHalfFloatLinearFiltering||2!==h||(l=1),this._texture=this._engine.createRawTexture(e,s,r,a,n,o,l,null,h,u??0,_??!1,p),this.wrapU=t.Texture.CLAMP_ADDRESSMODE,this.wrapV=t.Texture.CLAMP_ADDRESSMODE,this._waitingForData=!!d&&!e}update(e){this.updateMipLevel(e,0)}updateMipLevel(e,t){this._getEngine().updateRawTexture(this._texture,e,this._texture.format,this._texture.invertY,null,this._texture.type,this._texture._useSRGBBuffer,t),this._waitingForData=!1}clone(){if(!this._texture)return super.clone();let e=new s(null,this.getSize().width,this.getSize().height,this.format,this.getScene(),this._texture.generateMipMaps,this._invertY,this.samplingMode,this._texture.type,this._texture._creationFlags,this._useSRGBBuffer);return e._texture=this._texture,this._texture.incrementReferences(),e}isReady(){return super.isReady()&&!this._waitingForData}static CreateLuminanceTexture(e,t,r,a,i=!0,n=!1,o=3){return new s(e,t,r,1,a,i,n,o)}static CreateLuminanceAlphaTexture(e,t,r,a,i=!0,n=!1,o=3){return new s(e,t,r,2,a,i,n,o)}static CreateAlphaTexture(e,t,r,a,i=!0,n=!1,o=3){return new s(e,t,r,0,a,i,n,o)}static CreateRGBTexture(e,t,r,a,i=!0,n=!1,o=3,l=0,h=0,u=!1){return new s(e,t,r,4,a,i,n,o,l,h,u)}static CreateRGBATexture(e,t,r,a,i=!0,n=!1,o=3,l=0,h=0,u=!1,_=!1){return new s(e,t,r,5,a,i,n,o,l,h,u,_)}static CreateRGBAStorageTexture(e,t,r,a,i=!0,n=!1,o=3,l=0,h=!1){return new s(e,t,r,5,a,i,n,o,l,1,h)}static CreateRTexture(e,r,a,i,n=!0,o=!1,l=t.Texture.TRILINEAR_SAMPLINGMODE,h=1){return new s(e,r,a,6,i,n,o,l,h)}static CreateRStorageTexture(e,r,a,i,n=!0,o=!1,l=t.Texture.TRILINEAR_SAMPLINGMODE,h=1){return new s(e,r,a,6,i,n,o,l,h,1)}}e.s(["RawTexture",0,s])},29706,43375,e=>{"use strict";var t,s,r,a,i=e.i(56173),n=e.i(45756),o=e.i(81210),l=e.i(10332),h=e.i(82901),u=e.i(8697),_=e.i(97991),d=e.i(58180),p=e.i(50728),c=e.i(24617),f=e.i(61654),x=e.i(76197);let g=x.HighestCommonFactor,m={...x,TwoPi:2*Math.PI,Sign:Math.sign,Log2:Math.log2,HCF:g};var T=e.i(36401),S=e.i(71829),M=e.i(57605);let b="positions",A="partMatrices",y="partIndices",D=function(e){let t,s,r,a,i,n,o,l,h=0,u=null;e.onmessage=_=>{let d=_.data.command;if("positions"===d)t=_.data.positions,h=_.data.vertexCount;else if("positionsUpdate"===d)t&&_.data.data&&t.set(_.data.data,_.data.offset);else if("partMatrices"===d)a=_.data.partMatrices;else if("partIndices"===d)r=_.data.partIndices;else if("intervals"===d)u=_.data.intervals;else if("sort"===d){let d=_.data.cameraId,p=_.data.sortRequestId,c=_.data.rangeVersion,f=_.data.worldMatrix,x=_.data.cameraForward,g=_.data.cameraPosition;if(s=_.data.depthMix,!t||!x)return void e.postMessage({command:"sorted",depthMix:s,cameraId:d,sortRequestId:p,rangeVersion:c},[s.buffer]);let m=!1!==_.data.useCountingSort,T=!!_.data.logSortPerformance,S=_.data.rightHanded?-1:1,M=u,b=t.length/4,A=h,y=b;if(M){y=0;for(let e=1;e<M.length;e+=2)y+=M[e]}let D=Math.max(y+15&-16,16),I=x[0]*g[0]+x[1]*g[1]+x[2]*g[2],v=e=>[x[0]*e[0]+x[1]*e[1]+x[2]*e[2],x[0]*e[4]+x[1]*e[5]+x[2]*e[6],x[0]*e[8]+x[1]*e[9]+x[2]*e[10],x[0]*e[12]+x[1]*e[13]+x[2]*e[14]-I],C=globalThis.performance,w=T&&C?C.now():0;try{if(m){let h=new Uint32Array(s.buffer);if(!i||i.length<y){let e=Math.max(y,16);i=new Uint32Array(e),n=new Float32Array(e),o=new Uint32Array(e)}let u=!!(a&&a.length>0&&r&&r.length>0),_=[],x=0,g=0,m=0,T=0,I=0;if(u)_=a.map(e=>{let t=v(e);return t[0]*=S,t[1]*=S,t[2]*=S,t[3]*=S,t}),x=r.length;else{let e=v(f);g=e[0]*S,m=e[1]*S,T=e[2]*S,I=e[3]*S}let C=0,w=1/0,E=-1/0,R=_.length,P=!1,B=M?M.length:2;e:for(let e=0;e<B;e+=2){let s=M?M[e]:0,a=s+(M?M[e+1]:b);if(u)for(let e=s;e<a;e++){let s=4*e,a=r[e<x?e:x-1];if(a>=R){P=!0;break e}let o=_[a],l=o[0]*t[s]+o[1]*t[s+1]+o[2]*t[s+2]+o[3];i[C]=e,n[C]=l,C++,l<w&&(w=l),l>E&&(E=l)}else for(let e=s;e<a;e++){let s=4*e,r=g*t[s]+m*t[s+1]+T*t[s+2]+I;i[C]=e,n[C]=r,C++,r<w&&(w=r),r>E&&(E=r)}}if(P)return void e.postMessage({command:"sorted",depthMix:s,cameraId:d,sortRequestId:p,rangeVersion:c},[s.buffer]);let F=Math.max(10,Math.min(20,Math.round(Math.log2(Math.max(1,y)/4)))),U=2**F+1;l&&l.length===U?l.fill(0):l=new Uint32Array(U);let O=E-w;if(O>1e-12){let e=(U-1)/O,t=U-1;for(let s=0;s<y;s++){let r=(E-n[s])*e>>>0;r>t&&(r=t),o[s]=r,l[r]++}}else{for(let e=0;e<y;e++)o[e]=0;l[0]=y}for(let e=1;e<U;e++)l[e]+=l[e-1];for(let e=0;e<y;e++){let t=--l[o[e]];h[2*t]=i[e]}for(let e=y;e<D;e++)h[2*e]=A}else{let e=new Uint32Array(s.buffer),i=new Float32Array(s.buffer);if(M){let t=0;for(let s=0;s<M.length;s+=2){let r=M[s],a=M[s+1];for(let s=r;s<r+a;s++)e[2*t++]=s}for(;t<D;t++)e[2*t]=A}else for(let t=0;t<D;t++)e[2*t]=t;let n=!1;if(a&&a.length>0&&r&&r.length>0){let s=a.map(e=>v(e)),o=r.length;for(let a=0;a<D;a++){let l=e[2*a],h=r[Math.min(l,o-1)];if(h>=s.length){n=!0;break}let u=s[h];i[2*a+1]=u[0]*t[4*l+0]+u[1]*t[4*l+1]+u[2]*t[4*l+2]+u[3],e[2*a+1]=~e[2*a+1]}}else{let[s,r,a,n]=v(f);for(let o=0;o<D;o++){let l=e[2*o];i[2*o+1]=s*t[4*l+0]+r*t[4*l+1]+a*t[4*l+2]+n,e[2*o+1]=~e[2*o+1]}}n||s.sort()}}catch(e){console.error("Gaussian splat sort worker encountered an error (will retry next frame):",e)}T&&C&&console.log(`[GaussianSplatting] ${m?"counting":"legacy"} sort: ${y} splats in ${(C.now()-w).toFixed(2)}ms`),e.postMessage({command:"sorted",depthMix:s,cameraId:d,sortRequestId:p,rangeVersion:c},[s.buffer])}}},I="u">typeof _native,v=I?_native:null,C=(e,t)=>{let s=(1<<t)-1;return(e&s)/s},w=(e,t)=>{t.x=C(e>>>21,11),t.y=C(e>>>11,10),t.z=C(e,11)},E=(e,t)=>{t[0]=255*C(e>>>24,8),t[1]=255*C(e>>>16,8),t[2]=255*C(e>>>8,8),t[3]=255*C(e,8)},R=(e,t)=>{let s=1/(.5*Math.sqrt(2)),r=(C(e>>>20,10)-.5)*s,a=(C(e>>>10,10)-.5)*s,i=(C(e,10)-.5)*s,n=Math.sqrt(1-(r*r+a*a+i*i));switch(e>>>30){case 0:t.set(n,r,a,i);break;case 1:t.set(r,n,a,i);break;case 2:t.set(r,a,n,i);break;case 3:t.set(r,a,i,n)}};(t=r||(r={}))[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT",t[t.DOUBLE=3]="DOUBLE",t[t.UCHAR=4]="UCHAR",t[t.USHORT=5]="USHORT",t[t.UNDEFINED=6]="UNDEFINED",(s=a||(a={}))[s.MIN_X=0]="MIN_X",s[s.MIN_Y=1]="MIN_Y",s[s.MIN_Z=2]="MIN_Z",s[s.MAX_X=3]="MAX_X",s[s.MAX_Y=4]="MAX_Y",s[s.MAX_Z=5]="MAX_Z",s[s.MIN_SCALE_X=6]="MIN_SCALE_X",s[s.MIN_SCALE_Y=7]="MIN_SCALE_Y",s[s.MIN_SCALE_Z=8]="MIN_SCALE_Z",s[s.MAX_SCALE_X=9]="MAX_SCALE_X",s[s.MAX_SCALE_Y=10]="MAX_SCALE_Y",s[s.MAX_SCALE_Z=11]="MAX_SCALE_Z",s[s.PACKED_POSITION=12]="PACKED_POSITION",s[s.PACKED_ROTATION=13]="PACKED_ROTATION",s[s.PACKED_SCALE=14]="PACKED_SCALE",s[s.PACKED_COLOR=15]="PACKED_COLOR",s[s.X=16]="X",s[s.Y=17]="Y",s[s.Z=18]="Z",s[s.SCALE_0=19]="SCALE_0",s[s.SCALE_1=20]="SCALE_1",s[s.SCALE_2=21]="SCALE_2",s[s.DIFFUSE_RED=22]="DIFFUSE_RED",s[s.DIFFUSE_GREEN=23]="DIFFUSE_GREEN",s[s.DIFFUSE_BLUE=24]="DIFFUSE_BLUE",s[s.OPACITY=25]="OPACITY",s[s.F_DC_0=26]="F_DC_0",s[s.F_DC_1=27]="F_DC_1",s[s.F_DC_2=28]="F_DC_2",s[s.F_DC_3=29]="F_DC_3",s[s.ROT_0=30]="ROT_0",s[s.ROT_1=31]="ROT_1",s[s.ROT_2=32]="ROT_2",s[s.ROT_3=33]="ROT_3",s[s.MIN_COLOR_R=34]="MIN_COLOR_R",s[s.MIN_COLOR_G=35]="MIN_COLOR_G",s[s.MIN_COLOR_B=36]="MIN_COLOR_B",s[s.MAX_COLOR_R=37]="MAX_COLOR_R",s[s.MAX_COLOR_G=38]="MAX_COLOR_G",s[s.MAX_COLOR_B=39]="MAX_COLOR_B",s[s.SH_0=40]="SH_0",s[s.SH_1=41]="SH_1",s[s.SH_2=42]="SH_2",s[s.SH_3=43]="SH_3",s[s.SH_4=44]="SH_4",s[s.SH_5=45]="SH_5",s[s.SH_6=46]="SH_6",s[s.SH_7=47]="SH_7",s[s.SH_8=48]="SH_8",s[s.SH_9=49]="SH_9",s[s.SH_10=50]="SH_10",s[s.SH_11=51]="SH_11",s[s.SH_12=52]="SH_12",s[s.SH_13=53]="SH_13",s[s.SH_14=54]="SH_14",s[s.SH_15=55]="SH_15",s[s.SH_16=56]="SH_16",s[s.SH_17=57]="SH_17",s[s.SH_18=58]="SH_18",s[s.SH_19=59]="SH_19",s[s.SH_20=60]="SH_20",s[s.SH_21=61]="SH_21",s[s.SH_22=62]="SH_22",s[s.SH_23=63]="SH_23",s[s.SH_24=64]="SH_24",s[s.SH_25=65]="SH_25",s[s.SH_26=66]="SH_26",s[s.SH_27=67]="SH_27",s[s.SH_28=68]="SH_28",s[s.SH_29=69]="SH_29",s[s.SH_30=70]="SH_30",s[s.SH_31=71]="SH_31",s[s.SH_32=72]="SH_32",s[s.SH_33=73]="SH_33",s[s.SH_34=74]="SH_34",s[s.SH_35=75]="SH_35",s[s.SH_36=76]="SH_36",s[s.SH_37=77]="SH_37",s[s.SH_38=78]="SH_38",s[s.SH_39=79]="SH_39",s[s.SH_40=80]="SH_40",s[s.SH_41=81]="SH_41",s[s.SH_42=82]="SH_42",s[s.SH_43=83]="SH_43",s[s.SH_44=84]="SH_44",s[s.SH_45=85]="SH_45",s[s.SH_46=86]="SH_46",s[s.SH_47=87]="SH_47",s[s.SH_48=88]="SH_48",s[s.SH_49=89]="SH_49",s[s.SH_50=90]="SH_50",s[s.SH_51=91]="SH_51",s[s.SH_52=92]="SH_52",s[s.SH_53=93]="SH_53",s[s.SH_54=94]="SH_54",s[s.SH_55=95]="SH_55",s[s.SH_56=96]="SH_56",s[s.SH_57=97]="SH_57",s[s.SH_58=98]="SH_58",s[s.SH_59=99]="SH_59",s[s.SH_60=100]="SH_60",s[s.SH_61=101]="SH_61",s[s.SH_62=102]="SH_62",s[s.SH_63=103]="SH_63",s[s.SH_64=104]="SH_64",s[s.SH_65=105]="SH_65",s[s.SH_66=106]="SH_66",s[s.SH_67=107]="SH_67",s[s.SH_68=108]="SH_68",s[s.SH_69=109]="SH_69",s[s.SH_70=110]="SH_70",s[s.SH_71=111]="SH_71",s[s.UNDEFINED=112]="UNDEFINED";class P extends l.Mesh{static _GetSplatDataBytes(e){return ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}static _GetSplatDataFloats(e){let t=P._GetSplatDataBytes(e),s=Float32Array.BYTES_PER_ELEMENT;if(t.byteLength%s!=0)throw Error(`Gaussian splat data byte length (${t.byteLength}) is not divisible by ${s} and cannot be reinterpreted as Float32 data.`);if(t.byteOffset%s!=0){let e=new Uint8Array(t.byteLength);return e.set(t),new Float32Array(e.buffer,0,t.byteLength/s)}return new Float32Array(t.buffer,t.byteOffset,t.byteLength/s)}static _BuildSplatRangeData(e,t){if(null===e)return{ranges:null,count:t,key:""};let s=[],r=0,a="";for(let i of e){let e=Math.max(0,Math.floor(i.offset)),n=Math.max(0,Math.min(t,e+Math.max(0,Math.floor(i.count)))-e);0!==n&&(s.push(e,n),r+=n,a+=`${e}:${n};`)}return{ranges:new Uint32Array(s),count:r,key:a}}get disableDepthSort(){return this._disableDepthSort}set disableDepthSort(e){!this._disableDepthSort&&e?(this._worker?.terminate(),this._worker=null,this._disableDepthSort=!0):this._disableDepthSort&&!e&&(this._disableDepthSort=!1,this._sortIsDirty=!0,this._instantiateWorker())}get viewDirectionFactor(){return i.Vector3.OneReadOnly}get shDegree(){return this._shDegree}set shDegree(e){let t=Math.max(0,Math.min(Math.round(e),this._maxShDegree));this._shDegree!==t&&(this._shDegree=t,this.material?.resetDrawCache())}get maxShDegree(){return this._maxShDegree}get splatCount(){return this._splatIndex?.length}get renderedSplatCount(){return this._activeSplatRanges?this._activeSplatRenderCount:this._vertexCount}setSplatIndexRanges(e){this._setSplatIndexRanges(e)}_setSplatIndexRanges(e){let t=P._BuildSplatRangeData(e,this._vertexCount);(null===this._activeSplatRanges?null===t.ranges:null!==t.ranges&&this._activeSplatRangeKey===t.key)||(this._activeSplatRanges=t.ranges,this._activeSplatRangeKey=t.key,this._activeSplatRenderCount=t.count,this._activeRangeVersion++,this._postIntervalsToWorker(),this._worker?(this._ensureDepthMixSize(Math.max(this._activeSplatRenderCount+15&-16,16)),this._sortIsDirty=!0):this._updateSplatIndexBuffer(this._vertexCount),this._postToWorker(!0))}get _isDepthSortSettled(){return this._readyToDisplay&&!this._sortIsDirty&&this._canPostToWorker}_ensureDepthMixSize(e){!I&&(this._depthMix&&this._depthMix.length===e&&0!==this._depthMix.buffer.byteLength||(this._depthMix=new BigInt64Array(e)))}_postIntervalsToWorker(){if(!this._worker)return;let e=new Uint32Array(this._activeSplatRanges?this._activeSplatRanges:[0,this._vertexCount]);this._worker.postMessage({command:"intervals",intervals:e},[e.buffer])}_setExternalWorkBuffer(e,t,s,r,a,i,n,o=0,l){this._covariancesATexture=t,this._covariancesBTexture=s,this._centersTexture=e,this._colorsTexture=r,this._splatPositions=a,this._vertexCount=i,n&&n.length&&(this._shTextures=n,this._maxShDegree=o,this._shDegree=o),l&&l.length>=3&&(this._rotationsATexture=l[0],this._rotationsBTexture=l[1],this._rotationScaleTexture=l[2],this._needsRotationScaleTextures=!0),this._activeSplatRanges=null,this._activeSplatRangeKey="",this._activeSplatRenderCount=0,this._readyToDisplay=!1,this._instantiateWorker(),this.setEnabled(!0)}get splatsData(){return this._keepInRam?this._splatsData:null}get shData(){return this._keepInRam?this._shData:null}get splatSizeRange(){return isFinite(this._splatSizeMin)&&isFinite(this._splatSizeMax)?{min:this._splatSizeMin,max:this._splatSizeMax}:null}get covariancesATexture(){return this._covariancesATexture}get covariancesBTexture(){return this._covariancesBTexture}get centersTexture(){return this._centersTexture}get colorsTexture(){return this._colorsTexture}get rotationsATexture(){return this._rotationsATexture}get rotationsBTexture(){return this._rotationsBTexture}get rotationScaleTexture(){return this._rotationScaleTexture}get needsRotationScaleTextures(){return this._needsRotationScaleTextures}set needsRotationScaleTextures(e){this._needsRotationScaleTextures!==e&&(this._needsRotationScaleTextures=e,e&&this._covariancesATexture&&(this._splatsData?this.updateData(this._splatsData,this._shData??void 0,{flipY:!1},void 0,this._shDegree):u.Logger.Error("GaussianSplattingMeshBase: needsRotationScaleTextures was enabled after the mesh was already loaded, but the splat data is not kept in RAM. The rotation and scale matrix textures cannot be initialized. Please reload the mesh data via updateData() or construct with keepInRam=true.")))}get shTextures(){return this._shTextures}get useSog(){return this._useSog}get sogParams(){return this._sogParams}setSogTextureData(e){if(this._useSog=!0,this._sogParams?.codebookTexture?.dispose(),this._sogParams=e,this._vertexCount=e.splatCount,this._shDegree=e.shDegree??0,this._maxShDegree=this._shDegree,this._splatPositions=e.positions,this._covariancesATexture?.dispose(),this._covariancesBTexture?.dispose(),this._centersTexture?.dispose(),this._colorsTexture?.dispose(),this._rotationsATexture?.dispose(),this._shTextures)for(let e of this._shTextures)e.dispose();this._centersTexture=e.meansTextureL,this._covariancesATexture=e.meansTextureU,this._covariancesBTexture=e.scalesTexture,this._rotationsATexture=e.quatsTexture,this._colorsTexture=e.sh0Texture;let t=[];e.shCentroidsTexture&&t.push(e.shCentroidsTexture),e.shLabelsTexture&&t.push(e.shLabelsTexture),this._shTextures=t.length?t:null,this._material?.resetDrawCache();let s=e.meansTextureL.getSize();this._textureSize.x=s.width,this._textureSize.y=s.height,this._updateSplatIndexBuffer(this._vertexCount),this._instantiateWorker();let r=e.positions,a=new i.Vector3(1/0,1/0,1/0),n=new i.Vector3(-1/0,-1/0,-1/0);for(let e=0;e<this._vertexCount;e++){let t=r[4*e+0],s=r[4*e+1],i=r[4*e+2];t<a.x&&(a.x=t),s<a.y&&(a.y=s),i<a.z&&(a.z=i),t>n.x&&(n.x=t),s>n.y&&(n.y=s),i>n.z&&(n.z=i)}this.getBoundingInfo().reConstruct(a,n,this.getWorldMatrix()),this.setEnabled(!0),this._sortIsDirty=!0}get kernelSize(){return this._material instanceof n.GaussianSplattingMaterial?this._material.kernelSize:0}get compensation(){return this._material instanceof n.GaussianSplattingMaterial&&this._material.compensation}get minPixelSize(){return this._material instanceof n.GaussianSplattingMaterial?this._material.minPixelSize:0}set minPixelSize(e){this._material instanceof n.GaussianSplattingMaterial&&(this._material.minPixelSize=Math.max(0,e))}set material(e){this._material=e,this._material.backFaceCulling=!1,this._material.cullBackFaces=!1,e.resetDrawCache()}get material(){return this._material}static _MakeSplatGeometryForMesh(e){let t=new h.VertexData,s=[-2,-2,0,2,-2,0,2,2,0,-2,2,0],r=[0,1,2,0,2,3],a=[],i=[];for(let e=0;e<P._BatchSize;e++){for(let t=0;t<12;t++)2==t||5==t||8==t||11==t?a.push(e):a.push(s[t]);i.push(r.map(t=>t+4*e))}t.positions=a,t.indices=i.flat(),t.applyToMesh(e)}constructor(e,t=null,s=null,r=!1){super(e,s),this.safeOrbitCameraLimits=null,this._vertexCount=0,this._worker=null,this._modelViewProjectionMatrix=i.Matrix.Identity(),this._canPostToWorker=!0,this._readyToDisplay=!1,this._sortRequestId=0,this._activeRangeVersion=0,this._hasRenderedOnce=!1,this._covariancesATexture=null,this._covariancesBTexture=null,this._centersTexture=null,this._colorsTexture=null,this._mrtAtlas=null,this._useMrtAtlas=!1,this._shMrtAtlas=null,this._useShMrtAtlas=!1,this._shMrtAtlasTextureCount=0,this._rotationsATexture=null,this._rotationsBTexture=null,this._rotationScaleTexture=null,this._rotMrtAtlas=null,this._useRotMrtAtlas=!1,this._rotationDataA=null,this._rotationDataB=null,this._rotationScaleData=null,this._needsRotationScaleTextures=!1,this._splatPositions=null,this._splatIndex=null,this._shTextures=null,this._splatsData=null,this._shData=null,this._textureSize=new i.Vector2(0,0),this._keepInRam=!1,this._alwaysRetainSplatsData=!1,this._flipY=!1,this._delayedTextureUpdate=null,this._useRGBACovariants=!1,this._useSog=!1,this._sogParams=null,this._material=null,this._tmpCovariances=[0,0,0,0,0,0],this._splatSizeMin=1/0,this._splatSizeMax=-1/0,this._sortIsDirty=!1,this._activeSplatRanges=null,this._activeSplatRangeKey="",this._activeSplatRenderCount=0,this._cachedBoundingMin=null,this._cachedBoundingMax=null,this._shDegree=0,this._maxShDegree=0,this._cameraViewInfos=new Map,this.onPartCountChangedObservable=new _.Observable,this.onPartRemovedObservable=new _.Observable,this._onBeforeAtlasRebuildObservable=new _.Observable,this._onAfterAtlasRebuildObservable=new _.Observable,this.viewUpdateThreshold=P._DefaultViewUpdateThreshold,this._disableDepthSort=!1,this._loadingPromise=null,this._updateTextureFromData=(e,t,s,r,a)=>{this._getTextureDataUpdateEngine().updateTextureData(e.getInternalTexture(),t,0,r,s,a,0,0,!1)},this._updateTextureFromDataRect=(e,t,s,r,a,i)=>{this._getTextureDataUpdateEngine().updateTextureData(e.getInternalTexture(),t,s,r,a,i,0,0,!1)},this.subMeshes=[],new o.SubMesh(0,0,4*P._BatchSize,0,6*P._BatchSize,this),this.setEnabled(!1),this._useRGBACovariants=!this.getEngine().isWebGPU&&1===this.getEngine().version,function(e){if(I)return;let t=e.customAnimationFrameRequester;if(t?._gsInterFrameYield)return t._refCount++;if(t)return;let s=0,r=0;e.customAnimationFrameRequester={_gsInterFrameYield:!0,_refCount:1,requestAnimationFrame:e=>s=setTimeout(()=>{r=requestAnimationFrame(e)},0),cancelAnimationFrame:e=>{clearTimeout(s),r>0&&cancelAnimationFrame(r),s=0,r=0}}}(this.getEngine()),this._keepInRam=r,t&&(this._loadingPromise=this.loadFileAsync(t));const a=new n.GaussianSplattingMaterial(this.name+"_material",this._scene);a.setSourceMesh(this),a.doNotSerialize=!0,this._material=a,this._scene.onCameraRemovedObservable.add(e=>{let t=e.uniqueId,s=this._cameraViewInfos.get(t);s&&(this._geometry===s.mesh.geometry&&(this._geometry=null),s.mesh.dispose(),this._cameraViewInfos.delete(t))})}getLoadingPromise(){return this._loadingPromise}getClassName(){return"GaussianSplattingMeshBase"}getTotalVertices(){return this._vertexCount}isReady(e=!1){if(!super.isReady(e,!0))return!1;if(!this._readyToDisplay)return this._postToWorker(!0),!1;if(!this._hasRenderedOnce&&!this._disableDepthSort){let e=this._scene.activeCameras?.length?this._scene.activeCameras:[this._scene.activeCamera],t=this._scene._isInRenderingMeshEvaluation()&&1===e.filter(e=>null!==e).length,s=this.computeWorldMatrix(!0),r=!1,a=!1,i=!1;for(let t of e){if(!t)continue;let e=this._cameraViewInfos.get(t.uniqueId);if(!e||!e.splatIndexBufferSet||0===e.sortAppliedId){r=!0;continue}if(e.sortAppliedId!==e.sortRequestId){a=!0;continue}this._isSortStateDirty(e,s,t,!0)&&(i=!0)}if((r||a||i)&&(this._postToWorker(!0),r||!t))return!1}if(!this._geometry&&this._cameraViewInfos.size&&(this._geometry=this._cameraViewInfos.values().next().value.mesh.geometry),this.material&&this.material.shadowDepthWrapper){let e=this._scene.getEngine(),t=e.currentRenderPassId;try{for(let t of this._scene.lights){let s=t.getShadowGenerator();if(!s)continue;let r=s.getShadowMap(),a=r?.renderPassIds;if(a&&0!==a.length){for(let t=0;t<a.length;++t)for(let r of(e.currentRenderPassId=a[t],this.subMeshes))if(!s.isReady(r,!0,!1))return!1}}}finally{e.currentRenderPassId=t}}return!0}_getCameraDirection(e){let t=e.getViewMatrix(),s=e.getProjectionMatrix(),r=i.TmpVectors.Matrix[0];t.multiplyToRef(s,r);let a=this.computeWorldMatrix(!0),n=i.TmpVectors.Matrix[1];a.multiplyToRef(t,n),a.multiplyToRef(r,this._modelViewProjectionMatrix);let o=i.TmpVectors.Vector3[1];return o.set(n.m[2],n.m[6],n.m[10]),o.normalize(),o}_isSortStateDirty(e,t,s,r=!1){let a=t.m,i=e.sortWorldMatrix.m;for(let e=0;e<i.length;e++)if(!m.WithinEpsilon(i[e],a[e],this.viewUpdateThreshold))return!0;if(r)return!1;let n=s.getViewMatrix();if(!m.WithinEpsilon(e.sortCameraForward.x,n.m[2],this.viewUpdateThreshold)||!m.WithinEpsilon(e.sortCameraForward.y,n.m[6],this.viewUpdateThreshold)||!m.WithinEpsilon(e.sortCameraForward.z,n.m[10],this.viewUpdateThreshold))return!0;let o=s.globalPosition;return!m.WithinEpsilon(e.sortCameraPosition.x,o.x,this.viewUpdateThreshold)||!m.WithinEpsilon(e.sortCameraPosition.y,o.y,this.viewUpdateThreshold)||!m.WithinEpsilon(e.sortCameraPosition.z,o.z,this.viewUpdateThreshold)}_postToWorker(e=!1){let t=this._scene.getFrameId(),s=!1;this._cameraViewInfos.forEach(e=>{e.frameIdLastUpdate!==t&&(s=!0)});let r=this._scene.activeCameras?.length?this._scene.activeCameras:[this._scene.activeCamera],a=[];r.forEach(e=>{if(!e)return;let s=e.uniqueId,r=this._cameraViewInfos.get(s);if(r)a.push(r);else{let r=new l.Mesh(this.name+"_cameraMesh_"+s,this._scene);if(r.doNotSerialize=!0,r.reservedDataStore={hidden:!0},r.setEnabled(!1),r.material=this.material,r.material&&r.material instanceof n.GaussianSplattingMaterial){let e=r.material;e.getSourceMesh()||e.setSourceMesh(this)}P._MakeSplatGeometryForMesh(r);let o={camera:e,cameraDirection:new i.Vector3(0,0,0),sortWorldMatrix:i.Matrix.Identity(),sortCameraForward:new i.Vector3(0,0,0),sortCameraPosition:new i.Vector3(0,0,0),sortRequestId:0,sortAppliedId:0,mesh:r,frameIdLastUpdate:t,splatIndexBufferSet:!1};a.push(o),this._cameraViewInfos.set(s,o)}}),a.sort((e,t)=>0===e.sortAppliedId!=(0===t.sortAppliedId)?0===e.sortAppliedId?-1:1:e.splatIndexBufferSet!==t.splatIndexBufferSet?e.splatIndexBufferSet?1:-1:e.frameIdLastUpdate-t.frameIdLastUpdate);let o=!!v?.sortSplats&&!!this._splatPositions&&!!this._splatIndex,h=!this._disableDepthSort&&(this._worker||o);if((e||s)&&h&&(this._scene.activeCameras?.length||this._scene.activeCamera)&&this._canPostToWorker){let s=this.computeWorldMatrix(!0);a.forEach(r=>{let a=r.camera,i=this._getCameraDirection(a);if((e||this._isSortStateDirty(r,s,a))&&this._canPostToWorker){let e=a.getViewMatrix();r.cameraDirection.copyFrom(i),r.sortWorldMatrix.copyFrom(s),r.sortCameraForward.set(e.m[2],e.m[6],e.m[10]),r.sortCameraPosition.copyFrom(a.globalPosition),r.sortRequestId=++this._sortRequestId,r.frameIdLastUpdate=t,this._canPostToWorker=!1,this._worker?this._worker.postMessage({command:"sort",worldMatrix:s.m,cameraForward:[e.m[2],e.m[6],e.m[10]],cameraPosition:[a.globalPosition.x,a.globalPosition.y,a.globalPosition.z],depthMix:this._depthMix,cameraId:a.uniqueId,sortRequestId:r.sortRequestId,rangeVersion:this._activeRangeVersion,useCountingSort:P.UseCountingSort,rightHanded:this._scene.useRightHandedSystem,logSortPerformance:P.LogSortPerformance},[this._depthMix.buffer]):v?.sortSplats&&(this._activeSplatRanges?this._updateSplatIndexBuffer(this._vertexCount):v.sortSplats(this._modelViewProjectionMatrix,this._splatPositions,this._splatIndex,this._scene.useRightHandedSystem),r.splatIndexBufferSet?r.mesh.thinInstanceBufferUpdated("splatIndex"):(r.mesh.thinInstanceSetBuffer("splatIndex",this._splatIndex,16,!1),r.splatIndexBufferSet=!0),r.sortAppliedId=r.sortRequestId,this._canPostToWorker=!0,this._readyToDisplay=!0)}})}else this._disableDepthSort&&(this._splatIndex&&(a.forEach(e=>{e.splatIndexBufferSet||(e.mesh.thinInstanceSetBuffer("splatIndex",this._splatIndex,16,!1),e.splatIndexBufferSet=!0)}),this._readyToDisplay=!0),this._canPostToWorker=!0)}render(e,t,s){this._postToWorker(),!this._geometry&&this._cameraViewInfos.size&&(this._geometry=this._cameraViewInfos.values().next().value.mesh.geometry);let r=this._scene.activeCamera.uniqueId,a=this._cameraViewInfos.get(r);if(!a||!a.splatIndexBufferSet)return this;this.onBeforeRenderObservable&&this.onBeforeRenderObservable.notifyObservers(this);let i=a.mesh;i.getWorldMatrix().copyFrom(this.getWorldMatrix());let n=this._scene.getEngine().currentRenderPassId,o=this.getMaterialForRenderPass(n);o&&i.setMaterialForRenderPass(n,o);let l=i.render(e,t,s);return this._hasRenderedOnce=!0,o&&i.setMaterialForRenderPass(n,void 0),this.onAfterRenderObservable&&this.onAfterRenderObservable.notifyObservers(this),l}static _TypeNameToEnum(e){switch(e){case"float":return 0;case"int":return 1;case"uint":return 2;case"double":return 3;case"uchar":return 4;case"ushort":case"uint16":return 5}return 6}static _ValueNameToEnum(e){switch(e){case"min_x":return 0;case"min_y":return 1;case"min_z":return 2;case"max_x":return 3;case"max_y":return 4;case"max_z":return 5;case"min_scale_x":return 6;case"min_scale_y":return 7;case"min_scale_z":return 8;case"max_scale_x":return 9;case"max_scale_y":return 10;case"max_scale_z":return 11;case"packed_position":return 12;case"packed_rotation":return 13;case"packed_scale":return 14;case"packed_color":return 15;case"x":return 16;case"y":return 17;case"z":return 18;case"scale_0":return 19;case"scale_1":return 20;case"scale_2":return 21;case"diffuse_red":case"red":return 22;case"diffuse_green":case"green":return 23;case"diffuse_blue":case"blue":return 24;case"f_dc_0":return 26;case"f_dc_1":return 27;case"f_dc_2":return 28;case"f_dc_3":return 29;case"opacity":return 25;case"rot_0":return 30;case"rot_1":return 31;case"rot_2":return 32;case"rot_3":return 33;case"min_r":return 34;case"min_g":return 35;case"min_b":return 36;case"max_r":return 37;case"max_g":return 38;case"max_b":return 39;case"f_rest_0":return 40;case"f_rest_1":return 41;case"f_rest_2":return 42;case"f_rest_3":return 43;case"f_rest_4":return 44;case"f_rest_5":return 45;case"f_rest_6":return 46;case"f_rest_7":return 47;case"f_rest_8":return 48;case"f_rest_9":return 49;case"f_rest_10":return 50;case"f_rest_11":return 51;case"f_rest_12":return 52;case"f_rest_13":return 53;case"f_rest_14":return 54;case"f_rest_15":return 55;case"f_rest_16":return 56;case"f_rest_17":return 57;case"f_rest_18":return 58;case"f_rest_19":return 59;case"f_rest_20":return 60;case"f_rest_21":return 61;case"f_rest_22":return 62;case"f_rest_23":return 63;case"f_rest_24":return 64;case"f_rest_25":return 65;case"f_rest_26":return 66;case"f_rest_27":return 67;case"f_rest_28":return 68;case"f_rest_29":return 69;case"f_rest_30":return 70;case"f_rest_31":return 71;case"f_rest_32":return 72;case"f_rest_33":return 73;case"f_rest_34":return 74;case"f_rest_35":return 75;case"f_rest_36":return 76;case"f_rest_37":return 77;case"f_rest_38":return 78;case"f_rest_39":return 79;case"f_rest_40":return 80;case"f_rest_41":return 81;case"f_rest_42":return 82;case"f_rest_43":return 83;case"f_rest_44":return 84;case"f_rest_45":return 85;case"f_rest_46":return 86;case"f_rest_47":return 87;case"f_rest_48":return 88;case"f_rest_49":return 89;case"f_rest_50":return 90;case"f_rest_51":return 91;case"f_rest_52":return 92;case"f_rest_53":return 93;case"f_rest_54":return 94;case"f_rest_55":return 95;case"f_rest_56":return 96;case"f_rest_57":return 97;case"f_rest_58":return 98;case"f_rest_59":return 99;case"f_rest_60":return 100;case"f_rest_61":return 101;case"f_rest_62":return 102;case"f_rest_63":return 103;case"f_rest_64":return 104;case"f_rest_65":return 105;case"f_rest_66":return 106;case"f_rest_67":return 107;case"f_rest_68":return 108;case"f_rest_69":return 109;case"f_rest_70":return 110;case"f_rest_71":return 111}return 112}static ParseHeader(e){var t;let s,r=new Uint8Array(e),a=new TextDecoder().decode(r.slice(0,10240)),i="end_header\n",n=a.indexOf(i);if(n<0||!a)return null;let o=parseInt(/element vertex (\d+)\n/.exec(a)[1]),l=/element chunk (\d+)\n/.exec(a),h=0;l&&(h=parseInt(l[1]));let _=0,d=0,p={double:8,int:4,uint:4,float:4,short:2,ushort:2,uint16:2,uchar:1,list:0};(t=s||(s={}))[t.Vertex=0]="Vertex",t[t.Chunk=1]="Chunk",t[t.SH=2]="SH",t[t.Unused=3]="Unused";let c=1,f=[],x=[],g=a.slice(0,n).split("\n"),m=0;for(let e of g)if(e.startsWith("property ")){let[,t,s]=e.split(" "),r=P._ValueNameToEnum(s);112!=r&&(r>=111?m=4:r>=84?m=Math.max(m,3):r>=63?m=Math.max(m,2):r>=48&&(m=Math.max(m,1)));let a=P._TypeNameToEnum(t);1==c?(x.push({value:r,type:a,offset:d}),d+=p[t]):0==c?(f.push({value:r,type:a,offset:_}),_+=p[t]):2==c&&f.push({value:r,type:a,offset:_}),p[t]||u.Logger.Warn(`Unsupported property type: ${t}.`)}else if(e.startsWith("element ")){let[,t]=e.split(" ");c="chunk"==t?1:"vertex"==t?0:"sh"==t?2:3}let T=new DataView(e,n+i.length),S=new ArrayBuffer(P._RowOutputLength*o),M=null,b=0;return m&&(M=new ArrayBuffer((b=3*((m+1)*(m+1)-1))*o)),{vertexCount:o,chunkCount:h,rowVertexLength:_,rowChunkLength:d,vertexProperties:f,chunkProperties:x,dataView:T,buffer:S,shDegree:m,shCoefficientCount:b,shBuffer:M}}static _GetCompressedChunks(e,t){if(!e.chunkCount)return null;let s=e.dataView,r=Array(e.chunkCount);for(let a=0;a<e.chunkCount;a++){let n={min:new i.Vector3,max:new i.Vector3,minScale:new i.Vector3,maxScale:new i.Vector3,minColor:new i.Vector3(0,0,0),maxColor:new i.Vector3(1,1,1)};r[a]=n;for(let r=0;r<e.chunkProperties.length;r++){let a,i=e.chunkProperties[r];if(0===i.type)switch(a=s.getFloat32(i.offset+t.value,!0),i.value){case 0:n.min.x=a;break;case 1:n.min.y=a;break;case 2:n.min.z=a;break;case 3:n.max.x=a;break;case 4:n.max.y=a;break;case 5:n.max.z=a;break;case 6:n.minScale.x=a;break;case 7:n.minScale.y=a;break;case 8:n.minScale.z=a;break;case 9:n.maxScale.x=a;break;case 10:n.maxScale.y=a;break;case 11:n.maxScale.z=a;break;case 34:n.minColor.x=a;break;case 35:n.minColor.y=a;break;case 36:n.minColor.z=a;break;case 37:n.maxColor.x=a;break;case 38:n.maxColor.y=a;break;case 39:n.maxColor.z=a}}t.value+=e.rowChunkLength}return r}static _GetSplat(e,t,s,r){let a=i.TmpVectors.Quaternion[0],n=i.TmpVectors.Vector3[0],o=P._RowOutputLength,l=e.buffer,h=e.dataView,u=new Float32Array(l,t*o,3),_=new Float32Array(l,t*o+12,3),d=new Uint8ClampedArray(l,t*o+24,4),p=new Uint8ClampedArray(l,t*o+28,4),c=null;e.shBuffer&&(c=new Uint8ClampedArray(e.shBuffer,t*e.shCoefficientCount,e.shCoefficientCount));let x=t>>8,g=255,T=0,S=0,M=0,b=[];for(let i=0;i<e.vertexProperties.length;i++){let o,l=e.vertexProperties[i];switch(l.type){case 0:o=h.getFloat32(r.value+l.offset,!0);break;case 1:o=h.getInt32(r.value+l.offset,!0);break;case 2:o=h.getUint32(r.value+l.offset,!0);break;case 3:o=h.getFloat64(r.value+l.offset,!0);break;case 4:o=h.getUint8(r.value+l.offset);break;case 5:o=(0,f.FromHalfFloat)(h.getUint16(r.value+l.offset,!0));break;default:continue}switch(l.value){case 12:{let e=s[x];w(o,n),u[0]=m.Lerp(e.min.x,e.max.x,n.x),u[1]=m.Lerp(e.min.y,e.max.y,n.y),u[2]=m.Lerp(e.min.z,e.max.z,n.z)}break;case 13:R(o,a),g=a.x,T=a.y,S=a.z,M=a.w;break;case 14:{let e=s[x];w(o,n),_[0]=Math.exp(m.Lerp(e.minScale.x,e.maxScale.x,n.x)),_[1]=Math.exp(m.Lerp(e.minScale.y,e.maxScale.y,n.y)),_[2]=Math.exp(m.Lerp(e.minScale.z,e.maxScale.z,n.z))}break;case 15:{let e=s[x];E(o,d),d[0]=255*m.Lerp(e.minColor.x,e.maxColor.x,d[0]/255),d[1]=255*m.Lerp(e.minColor.y,e.maxColor.y,d[1]/255),d[2]=255*m.Lerp(e.minColor.z,e.maxColor.z,d[2]/255)}break;case 16:u[0]=o;break;case 17:u[1]=o;break;case 18:u[2]=o;break;case 19:_[0]=Math.exp(o);break;case 20:_[1]=Math.exp(o);break;case 21:_[2]=Math.exp(o);break;case 22:d[0]=o;break;case 23:d[1]=o;break;case 24:d[2]=o;break;case 26:d[0]=(.5+P._SH_C0*o)*255;break;case 27:d[1]=(.5+P._SH_C0*o)*255;break;case 28:d[2]=(.5+P._SH_C0*o)*255;break;case 29:d[3]=(.5+P._SH_C0*o)*255;break;case 25:d[3]=1/(1+Math.exp(-o))*255;break;case 30:g=o;break;case 31:T=o;break;case 32:S=o;break;case 33:M=o}if(c&&l.value>=40&&l.value<=111){let s=l.value-40;if(4==l.type&&e.chunkCount){let r=h.getUint8(e.rowChunkLength*e.chunkCount+e.vertexCount*e.rowVertexLength+t*e.shCoefficientCount+s);b[s]=(8/255*r-4)*127.5+127.5}else{let e=m.Clamp(127.5*o+127.5,0,255);b[s]=e}}}if(c){let t=1==e.shDegree?3:2==e.shDegree?8:3==e.shDegree?15:24;for(let e=0;e<t;e++)c[3*e+0]=b[e],c[3*e+1]=b[e+t],c[3*e+2]=b[e+2*t]}a.set(T,S,M,g),a.normalize(),p[0]=127.5*a.w+127.5,p[1]=127.5*a.x+127.5,p[2]=127.5*a.y+127.5,p[3]=127.5*a.z+127.5,r.value+=e.rowVertexLength}static*ConvertPLYWithSHToSplat(e,t=!1){let s=P.ParseHeader(e);if(!s)return{buffer:e};let r={value:0},a=P._GetCompressedChunks(s,r);for(let e=0;e<s.vertexCount;e++)P._GetSplat(s,e,a,r),e%P._PlyConversionBatchSize==0&&t&&(yield);let i=null;if(s.shDegree&&s.shBuffer){let e=Math.ceil(s.shCoefficientCount/16),t=0,r=new Uint8Array(s.shBuffer);i=[];let a=s.vertexCount,n=S.EngineStore.LastCreatedEngine;if(n){let o=n.getCaps().maxTextureSize;i=B(e,Math.ceil(a/o)*o*16);for(let e=0;e<a;e++)for(let a=0;a<s.shCoefficientCount;a++){let s=r[t++];i[Math.floor(a/16)][a%16+16*e]=s}}}return{buffer:s.buffer,sh:i,shDegree:s.shDegree}}static*ConvertPLYToSplat(e,t=!1){let s=P.ParseHeader(e);if(!s)return e;let r={value:0},a=P._GetCompressedChunks(s,r);for(let e=0;e<s.vertexCount;e++)P._GetSplat(s,e,a,r),e%P._PlyConversionBatchSize==0&&t&&(yield);return s.buffer}static async ConvertPLYToSplatAsync(e){return await (0,T.runCoroutineAsync)(P.ConvertPLYToSplat(e,!0),(0,T.createYieldingScheduler)())}static async ConvertPLYWithSHToSplatAsync(e){return await (0,T.runCoroutineAsync)(P.ConvertPLYWithSHToSplat(e,!0),(0,T.createYieldingScheduler)())}async loadDataAsync(e){return await this.updateDataAsync(e)}async loadFileAsync(e,t){await (0,M.ImportMeshAsync)(e,t||S.EngineStore.LastCreatedScene,{pluginOptions:{splat:{gaussianSplattingMesh:this}}})}dispose(e){var t;let s;if(this._mrtAtlas?(this._mrtAtlas.dispose(),this._mrtAtlas=null,this._covariancesATexture=this._covariancesBTexture=this._centersTexture=this._colorsTexture=null):(this._covariancesATexture?.dispose(),this._covariancesBTexture?.dispose(),this._centersTexture?.dispose(),this._colorsTexture?.dispose()),this._shMrtAtlas){for(let e of this._shMrtAtlas)e.dispose();if(this._shTextures)for(let e=this._shMrtAtlas.length;e<this._shTextures.length;e++)this._shTextures[e].dispose();this._shMrtAtlas=null}else if(this._shTextures)for(let e of this._shTextures)e.dispose();this._shTextures=null,this._rotMrtAtlas?(this._rotMrtAtlas.dispose(),this._rotMrtAtlas=null):(this._rotationsATexture?.dispose(),this._rotationsBTexture?.dispose(),this._rotationScaleTexture?.dispose()),this._sogParams?.codebookTexture?.dispose(),this._rotationsATexture=null,this._rotationsBTexture=null,this._rotationScaleTexture=null,this._rotationDataA=null,this._rotationDataB=null,this._rotationScaleData=null,this._covariancesATexture=null,this._covariancesBTexture=null,this._centersTexture=null,this._colorsTexture=null,this._shTextures=null,this._cachedBoundingMin=null,this._cachedBoundingMax=null,s=(t=this.getEngine()).customAnimationFrameRequester,s?._gsInterFrameYield&&(s._refCount--,0===s._refCount&&(t.customAnimationFrameRequester=null)),this._worker?.terminate(),this._worker=null,this.onPartCountChangedObservable.clear(),this.onPartRemovedObservable.clear(),this._cameraViewInfos.forEach(e=>{e.mesh.dispose()}),super.dispose(e,!0)}_copyTextures(e){if(this._covariancesATexture=e.covariancesATexture?.clone(),this._covariancesBTexture=e.covariancesBTexture?.clone(),this._centersTexture=e.centersTexture?.clone(),this._colorsTexture=e.colorsTexture?.clone(),e._shTextures)for(let t of(this._shTextures=[],e._shTextures))this._shTextures?.push(t.clone());e._rotationsATexture&&(this._rotationsATexture=e._rotationsATexture.clone(),this._rotationsBTexture=e._rotationsBTexture?.clone(),this._rotationScaleTexture=e._rotationScaleTexture?.clone())}clone(e=""){let t=new P(e,void 0,this.getScene());t._copySource(this),t.makeGeometryUnique(),t._vertexCount=this._vertexCount,t._copyTextures(this),t._modelViewProjectionMatrix=i.Matrix.Identity(),t._splatPositions=this._splatPositions,t._readyToDisplay=!1,t._hasRenderedOnce=!1,t._disableDepthSort=this._disableDepthSort,t._instantiateWorker();let s=this.getBoundingInfo();return t.getBoundingInfo().reConstruct(s.minimum,s.maximum,this.getWorldMatrix()),t.forcedInstanceCount=this.forcedInstanceCount,t.setEnabled(!0),t}_makeEmptySplat(e,t,s,r){let a=this._useRGBACovariants?4:2;this._splatPositions[4*e+0]=0,this._splatPositions[4*e+1]=0,this._splatPositions[4*e+2]=0,t[4*e+0]=(0,f.ToHalfFloat)(0),t[4*e+1]=(0,f.ToHalfFloat)(0),t[4*e+2]=(0,f.ToHalfFloat)(0),t[4*e+3]=(0,f.ToHalfFloat)(0),s[e*a+0]=(0,f.ToHalfFloat)(0),s[e*a+1]=(0,f.ToHalfFloat)(0),r[4*e+3]=0}_makeSplat(e,t,s,r,a,n,o,l,h,u=e,_=e){let d=i.TmpVectors.Matrix[0],p=i.TmpVectors.Matrix[1],c=i.TmpVectors.Quaternion[0],x=this._useRGBACovariants?4:2,g=t[8*u+0],m=t[8*u+1]*(h?-1:1),T=t[8*u+2];if(this._splatPositions[4*e+0]=g,this._splatPositions[4*e+1]=m,this._splatPositions[4*e+2]=T,o.minimizeInPlaceFromFloats(g,m,T),l.maximizeInPlaceFromFloats(g,m,T),c.set((s[32*u+28+1]-127.5)/127.5,(s[32*u+28+2]-127.5)/127.5,(s[32*u+28+3]-127.5)/127.5,-(s[32*u+28+0]-127.5)/127.5),c.normalize(),c.toRotationMatrix(d),i.Matrix.ScalingToRef(2*t[8*u+3+0],2*t[8*u+3+1],2*t[8*u+3+2],p),this._needsRotationScaleTextures){let t=this._splatPositions.length;(!this._rotationDataA||this._rotationDataA.length<t)&&(this._rotationDataA=new Uint16Array(t),this._rotationDataB=new Uint16Array(t),this._rotationScaleData=new Uint16Array(t));let s=this._rotationDataA,r=this._rotationDataB,a=this._rotationScaleData,i=d.m,n=p.m;s[4*e+0]=(0,f.ToHalfFloat)(i[0]),s[4*e+1]=(0,f.ToHalfFloat)(i[1]),s[4*e+2]=(0,f.ToHalfFloat)(i[2]),s[4*e+3]=(0,f.ToHalfFloat)(i[4]),r[4*e+0]=(0,f.ToHalfFloat)(i[5]),r[4*e+1]=(0,f.ToHalfFloat)(i[6]),r[4*e+2]=(0,f.ToHalfFloat)(i[8]),r[4*e+3]=(0,f.ToHalfFloat)(i[9]),a[4*e+0]=(0,f.ToHalfFloat)(i[10]),a[4*e+1]=(0,f.ToHalfFloat)(n[0]),a[4*e+2]=(0,f.ToHalfFloat)(n[5]),a[4*e+3]=(0,f.ToHalfFloat)(n[10])}let S=d.multiplyToRef(p,i.TmpVectors.Matrix[0]).m,M=this._tmpCovariances;M[0]=S[0]*S[0]+S[1]*S[1]+S[2]*S[2],M[1]=S[0]*S[4]+S[1]*S[5]+S[2]*S[6],M[2]=S[0]*S[8]+S[1]*S[9]+S[2]*S[10],M[3]=S[4]*S[4]+S[5]*S[5]+S[6]*S[6],M[4]=S[4]*S[8]+S[5]*S[9]+S[6]*S[10],M[5]=S[8]*S[8]+S[9]*S[9]+S[10]*S[10];let b=-1e4;for(let e=0;e<6;e++)b=Math.max(b,Math.abs(M[e]));this._splatPositions[4*e+3]=b;let A=b;r[4*_+0]=(0,f.ToHalfFloat)(M[0]/A),r[4*_+1]=(0,f.ToHalfFloat)(M[1]/A),r[4*_+2]=(0,f.ToHalfFloat)(M[2]/A),r[4*_+3]=(0,f.ToHalfFloat)(M[3]/A),a[_*x+0]=(0,f.ToHalfFloat)(M[4]/A),a[_*x+1]=(0,f.ToHalfFloat)(M[5]/A);let y=M[0],D=M[1],I=M[2],v=M[3],C=M[4],w=M[5],E=Math.pow(Math.abs(y*(v*w-C*C)-D*(D*w-C*I)+I*(D*C-v*I)),1/6);E<this._splatSizeMin&&(this._splatSizeMin=E),E>this._splatSizeMax&&(this._splatSizeMax=E),n[4*_+0]=s[32*u+24+0],n[4*_+1]=s[32*u+24+1],n[4*_+2]=s[32*u+24+2],n[4*_+3]=s[32*u+24+3]}_onUpdateTextures(e){}_onIndexDataReceived(e,t){}_onIncrementalUpdateStart(e){}get isCompound(){return!1}_setDelayedTextureUpdate(e,t,s,r){this._delayedTextureUpdate={covA:e,covB:t,colors:s,centers:this._splatPositions,sh:r}}_createMrtAtlas(e){this._useRGBACovariants=!0;let t=this.getEngine(),s=this._getTextureDataUpdateEngine();if(!s._gl&&!s.isWebGPU)return;let r=t.getCaps().textureHalfFloatRender?2:1,a=new p.MultiRenderTarget(this.name+"_gsAtlas",{width:e.x,height:e.y},4,this._scene,{types:[1,r,r,0],formats:[5,5,5,5],samplingModes:[1,1,1,1],generateDepthBuffer:!1,generateDepthTexture:!1,generateMipMaps:!1},[this.name+"_gsCenters",this.name+"_gsCovA",this.name+"_gsCovB",this.name+"_gsColors"]);a.clearColor=new c.Color4(0,0,0,0),a.renderList=[],a.onClearObservable.add(()=>{}),a.render(),this._mrtAtlas=a,this._centersTexture=a.textures[0],this._covariancesATexture=a.textures[1],this._covariancesBTexture=a.textures[2],this._colorsTexture=a.textures[3]}_createShMrtAtlas(e){let t=this._getTextureDataUpdateEngine();if(!t._gl&&!t.isWebGPU)return;let s=this._shMrtAtlasTextureCount;if(s<=0)return;let r=[],a=[];for(let t=0;t<s;t++){let s=`${this.name}_gsShAtlas${t}`,i=new p.MultiRenderTarget(s,{width:e.x,height:e.y},1,this._scene,{types:[7],formats:[11],samplingModes:[1],generateDepthBuffer:!1,generateDepthTexture:!1,generateMipMaps:!1},[s]);i.clearColor=new c.Color4(0,0,0,0),i.renderList=[],i.onClearObservable.add(()=>{});let n=i.textures[0];n.wrapU=0,n.wrapV=0,i.render(),r.push(i),a.push(n)}this._shMrtAtlas=r,this._shTextures=a}_createRotMrtAtlas(e){let t=this._getTextureDataUpdateEngine();if(!t._gl&&!t.isWebGPU)return;let s=this.getEngine().getCaps().textureHalfFloatRender?2:1,r=this.name+"_gsRotAtlas",a=new p.MultiRenderTarget(r,{width:e.x,height:e.y},3,this._scene,{types:[s,s,s],formats:[5,5,5],samplingModes:[1,1,1],generateDepthBuffer:!1,generateDepthTexture:!1,generateMipMaps:!1},[r+"A",r+"B",r+"Scale"]);for(let e of(a.clearColor=new c.Color4(0,0,0,0),a.renderList=[],a.onClearObservable.add(()=>{}),a.textures))e.wrapU=0,e.wrapV=0;a.render(),this._rotMrtAtlas=a,this._rotationsATexture=a.textures[0],this._rotationsBTexture=a.textures[1],this._rotationScaleTexture=a.textures[2]}_updateTextures(e,t,s,r){let a=this._getTextureSize(this._vertexCount),i=(e,t,s,r)=>new d.RawTexture(e,t,s,r,this._scene,!1,!1,2,1),n=(e,t,s,r)=>new d.RawTexture(e,t,s,r,this._scene,!1,!1,2,0),o=(e,t,s)=>new d.RawTexture(null,e,t,s,this._scene,!1,!1,1,7),l=(e,t,s,r)=>new d.RawTexture(e,t,s,r,this._scene,!1,!1,2,2),h=null===this._covariancesATexture,u=this._textureSize.y!=a.y;this._useShMrtAtlas&&r&&(this._shMrtAtlasTextureCount=r.length);let _=this._useMrtAtlas&&!this._mrtAtlas||this._useShMrtAtlas&&(!this._shMrtAtlas||this._shMrtAtlas.length!==this._shMrtAtlasTextureCount)||this._useRotMrtAtlas&&!this._rotMrtAtlas;if(h||u||_){let u=this._useMrtAtlas&&!!this._mrtAtlas;if(u&&this._onBeforeAtlasRebuildObservable.notifyObservers(this._mrtAtlas),this._mrtAtlas?(this._mrtAtlas.dispose(),this._mrtAtlas=null,this._covariancesATexture=this._covariancesBTexture=this._centersTexture=this._colorsTexture=null):(this._covariancesATexture?.dispose(),this._covariancesBTexture?.dispose(),this._centersTexture?.dispose(),this._colorsTexture?.dispose()),this._rotMrtAtlas?(this._rotMrtAtlas.dispose(),this._rotMrtAtlas=null,this._rotationsATexture=null,this._rotationsBTexture=null,this._rotationScaleTexture=null):this._rotationsATexture&&(this._rotationsATexture.dispose(),this._rotationsBTexture?.dispose(),this._rotationScaleTexture?.dispose(),this._rotationsATexture=null,this._rotationsBTexture=null,this._rotationScaleTexture=null),this._shTextures){if(this._shMrtAtlas){for(let e of this._shMrtAtlas)e.dispose();for(let e=this._shMrtAtlas.length;e<this._shTextures.length;e++)this._shTextures[e].dispose();this._shMrtAtlas=null}else for(let e of this._shTextures)e.dispose();this._shTextures=null}if(this._textureSize=a,this._useMrtAtlas){if(this._createMrtAtlas(a),this._useShMrtAtlas&&this._createShMrtAtlas(a),this._useRotMrtAtlas&&this._createRotMrtAtlas(a),this._mrtAtlas){if(this._updateSubTextures(this._splatPositions,e,t,s,0,a.y),this._useShMrtAtlas&&r){let e=this._shTextures;if(e)for(let t=0;t<r.length&&t<e.length;t++)this._updateShTextureData(e[t],r[t],a.x,0,a.y)}u&&this._onAfterAtlasRebuildObservable.notifyObservers(this._mrtAtlas)}}else this._covariancesATexture=l(e,a.x,a.y,5),this._covariancesBTexture=l(t,a.x,a.y,this._useRGBACovariants?5:7),this._centersTexture=i(this._splatPositions,a.x,a.y,5),this._colorsTexture=n(s,a.x,a.y,5);if(r&&!this._useShMrtAtlas){this._shTextures=[];for(let e=0;e<r.length;e++){let e=o(a.x,a.y,11);e.wrapU=0,e.wrapV=0,this._shTextures.push(e)}for(let e=0;e<r.length;e++)this._updateShTextureData(this._shTextures[e],r[e],a.x,0,a.y)}if(this._needsRotationScaleTextures&&!this._useRotMrtAtlas){let t=this._rotationDataA??new Uint16Array(e.length),s=this._rotationDataB??new Uint16Array(e.length),r=this._rotationScaleData??new Uint16Array(e.length);this._rotationsATexture=l(t,a.x,a.y,5),this._rotationsBTexture=l(s,a.x,a.y,5),this._rotationScaleTexture=l(r,a.x,a.y,5),this._rotationsATexture.wrapU=0,this._rotationsATexture.wrapV=0,this._rotationsBTexture.wrapU=0,this._rotationsBTexture.wrapV=0,this._rotationScaleTexture.wrapU=0,this._rotationScaleTexture.wrapV=0}if(this._onUpdateTextures(a),h)this._instantiateWorker();else{if(this._worker){let e=Float32Array.from(this._splatPositions),t=this._vertexCount;this._worker.postMessage({command:b,positions:e,vertexCount:t},[e.buffer]),this._postIntervalsToWorker()}this._postToWorker(!0)}}else{this._setDelayedTextureUpdate(e,t,s,r);let i=Float32Array.from(this._splatPositions),n=this._vertexCount;if(this._worker&&(this._worker.postMessage({command:b,positions:i,vertexCount:n},[i.buffer]),this._postIntervalsToWorker()),r&&!this._shTextures&&!this._useShMrtAtlas){this._shTextures=[];for(let e=0;e<r.length;e++){let t=o(a.x,a.y,11);t.wrapU=0,t.wrapV=0,this._shTextures.push(t),this._updateShTextureData(t,r[e],a.x,0,a.y)}}this._needsRotationScaleTextures&&this._rotationDataA&&(this._rotationsATexture?(this._updateTextureFromData(this._rotationsATexture,this._rotationDataA,a.x,0,a.y),this._updateTextureFromData(this._rotationsBTexture,this._rotationDataB,a.x,0,a.y),this._updateTextureFromData(this._rotationScaleTexture,this._rotationScaleData,a.x,0,a.y)):(this._rotationsATexture=l(this._rotationDataA,a.x,a.y,5),this._rotationsBTexture=l(this._rotationDataB,a.x,a.y,5),this._rotationScaleTexture=l(this._rotationScaleData,a.x,a.y,5),this._rotationsATexture.wrapU=0,this._rotationsATexture.wrapV=0,this._rotationsBTexture.wrapU=0,this._rotationsBTexture.wrapV=0,this._rotationScaleTexture.wrapU=0,this._rotationScaleTexture.wrapV=0)),this._onUpdateTextures(a),this._postToWorker(!0)}}_canReuseCachedData(e,t,s=0){return!(e<=0)&&!(e>t)&&null!==this._splatPositions&&null!==this._cachedBoundingMin&&null!==this._cachedBoundingMax&&null!==this._covariancesATexture&&(!this._useMrtAtlas||!!this._mrtAtlas)&&(!this._useShMrtAtlas||!!this._shMrtAtlas&&this._shMrtAtlas.length===s)&&(!this._useRotMrtAtlas||!!this._rotMrtAtlas)&&this._getTextureSize(t).y===this._textureSize.y}_notifyWorkerNewData(){if(this._worker){let e=Float32Array.from(this._splatPositions),t=this._vertexCount;this._worker.postMessage({command:b,positions:e,vertexCount:t},[e.buffer]),this._postIntervalsToWorker()}this._sortIsDirty=!0}_postWorkerPositionsRange(e,t){if(!this._worker||!this._splatPositions||t<=0)return;let s=4*e,r=this._splatPositions.slice(s,s+4*t);this._worker.postMessage({command:"positionsUpdate",offset:s,data:r},[r.buffer]),this._sortIsDirty=!0}_writeStreamingSplats(e,t,s,r,a){if(!this._splatPositions)return;let n=this._splatPositions.length/4,o=P._GetSplatDataBytes(s);if(!Number.isInteger(e)||!Number.isInteger(t)||e<0||t<0||e+t>n)throw Error(`_writeStreamingSplats: range [${e}, ${e+t}) is outside the atlas bounds [0, ${n})`);if(o.length<32*t)throw Error(`_writeStreamingSplats: splatsData has ${o.length} bytes, need ${32*t} for ${t} splats (stride 32)`);if(0===t||!this._covariancesATexture)return;let l=this._getTextureSize(this._vertexCount).x,h=this._useRGBACovariants?4:2,u=e+t,_=P._GetSplatDataFloats(s),d=new Uint16Array(4*t),p=new Uint16Array(t*h),c=new Uint8Array(4*t),f=r??new i.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),x=a??new i.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(let s=0;s<t;s++)this._makeSplat(e+s,_,o,d,p,c,f,x,this._flipY,s,s);this._splatsData&&new Uint8Array(P._GetSplatDataBytes(this._splatsData).buffer).set(o.subarray(0,32*t),32*e);let g=this._splatPositions,m=e;for(;m<u;){let t=Math.floor(m/l),s=Math.min(u,(t+1)*l),r=m-t*l,a=s-m,i=m-e;this._updateTextureFromDataRect(this._covariancesATexture,new Uint16Array(d.buffer,4*i*2,4*a),r,t,a,1),this._updateTextureFromDataRect(this._covariancesBTexture,new Uint16Array(p.buffer,i*h*2,a*h),r,t,a,1),this._updateTextureFromDataRect(this._centersTexture,new Float32Array(g.buffer,4*m*4,4*a),r,t,a,1),this._updateTextureFromDataRect(this._colorsTexture,new Uint8Array(c.buffer,4*i,4*a),r,t,a,1),m=s}this._postWorkerPositionsRange(e,t)}*_updateData(e,t,s,r,{flipY:a=!1,previousVertexCount:n=0}={},o){this._covariancesATexture||(this._readyToDisplay=!1),this._flipY=a;let l=new Uint8Array(e),h=new Float32Array(l.buffer);this._keepInRam||this._alwaysRetainSplatsData?(this._splatsData=l.buffer,this._shData=s?s.map(e=>new Uint8Array(e)):null):(this._splatsData=null,this._shData=null);let u=l.length/P._RowOutputLength;u!=this._vertexCount&&(this._activeSplatRanges=null,this._activeSplatRangeKey="",this._activeSplatRenderCount=0,this._updateSplatIndexBuffer(u)),this._vertexCount=u,this._maxShDegree=s?o??0:0,this._shDegree=this._maxShDegree;let _=this._getTextureSize(u),d=_.x*_.y,p=P.ProgressiveUpdateAmount??_.y;r&&this._onIndexDataReceived(r,d);let c=new i.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),f=new i.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),x=this._useRGBACovariants?4:2,g=new Uint16Array(4*d),m=new Uint16Array(x*d),T=new Uint8Array(4*d),S=this._canReuseCachedData(n,u,s?.length??0);S||(this._splatSizeMin=1/0,this._splatSizeMax=-1/0);let M=S?Math.floor(n/_.x):0,b=M*_.x,A=this._splatPositions;if(this._splatPositions=new Float32Array(4*d),S&&(this._splatPositions.set(A.subarray(0,4*n)),c.copyFrom(this._cachedBoundingMin),f.copyFrom(this._cachedBoundingMax),this._onIncrementalUpdateStart(_)),P.ProgressiveUpdateAmount){S||this._updateTextures(g,m,T,s),this.setEnabled(!0);let e=Math.ceil(_.y/p);for(let r=0;r<e;r++){let e=r*p,i=Math.min(e+p,_.y);if(i<=M)continue;let n=Math.max(e,M),o=n*_.x,d=i*_.x;for(let e=o;e<d;e++)e<u?this._makeSplat(e,h,l,g,m,T,c,f,a):this._makeEmptySplat(e,g,m,T);this._updateSubTextures(this._splatPositions,g,m,T,n,i-n,s),this.getBoundingInfo().reConstruct(c,f,this.getWorldMatrix()),t&&(yield)}this._notifyWorkerNewData()}else{for(let e=b;e<u;e++)this._makeSplat(e,h,l,g,m,T,c,f,a),t&&e%P._SplatBatchSize==0&&(yield);let e=S?d:u+15&-16;for(let t=u;t<e;t++)this._makeEmptySplat(t,g,m,T);S?(this._updateSubTextures(this._splatPositions,g,m,T,M,_.y-M,s),this.getBoundingInfo().reConstruct(c,f,this.getWorldMatrix()),this.setEnabled(!0),this._notifyWorkerNewData()):(this._updateTextures(g,m,T,s),this.getBoundingInfo().reConstruct(c,f,this.getWorldMatrix()),this.setEnabled(!0),this._sortIsDirty=!0)}this._cachedBoundingMin=c.clone(),this._cachedBoundingMax=f.clone(),this._postToWorker(!0)}async updateDataAsync(e,t,s,r){return await (0,T.runCoroutineAsync)(this._updateData(e,!0,t,s,void 0,r),(0,T.createYieldingScheduler)())}updateData(e,t,s={flipY:!0},r,a){(0,T.runCoroutineSync)(this._updateData(e,!1,t,r,s,a))}refreshBoundingInfo(){return this.thinInstanceRefreshBoundingInfo(!1),this}_updateSplatIndexBuffer(e){let t=Math.max((this._activeSplatRanges?this._activeSplatRenderCount:e)+15&-16,16),s=this._splatIndex;s&&t===s.length||(this._splatIndex=new Float32Array(t),this._cameraViewInfos.forEach(e=>{e.mesh.thinInstanceSetBuffer("splatIndex",this._splatIndex,16,!1)}));let r=this._splatIndex;if(this._activeSplatRanges){let s=0;for(let e=0;e<this._activeSplatRanges.length;e+=2){let t=this._activeSplatRanges[e],a=this._activeSplatRanges[e+1];for(let e=t;e<t+a;e++)r[s++]=e}for(;s<t;s++)r[s]=e}else for(let e=0;e<t;e++)r[e]=e;this._depthMix&&t===this._depthMix.length||I||(this._depthMix=new BigInt64Array(t)),this.forcedInstanceCount=Math.max(t>>4,1)}_getTextureDataUpdateEngine(){return this.getEngine()}_updateShTextureData(e,t,s,r,a){let i=this._getTextureDataUpdateEngine();if(!i._gl&&!i.isWebGPU){let r,a=e.getInternalTexture(),n=s*a.height*16;if(t.byteLength===n&&t.byteOffset%Uint32Array.BYTES_PER_ELEMENT==0)r=new Uint32Array(t.buffer,t.byteOffset,t.byteLength/Uint32Array.BYTES_PER_ELEMENT);else{let e=new Uint8Array(n);e.set(t.subarray(0,Math.min(t.byteLength,n))),r=new Uint32Array(e.buffer)}i.updateRawTexture(a,r,a.format,a.invertY,null,a.type,a._useSRGBBuffer);return}let n=r*s,o=Math.floor(t.byteLength/16);if(n>=o)return;let l=Math.min(a*s,o-n);if(l<=0)return;let h=(e,s)=>new Uint32Array(t.buffer,t.byteOffset+e,4*s),u=Math.floor(l/s);if(u>0){let t=u*s;this._updateTextureFromData(e,h(16*n,t),s,r,u),l-=t}l>0&&this._updateTextureFromDataRect(e,h((n+u*s)*16,l),0,r+u,l,1)}_updateSubTextures(e,t,s,r,a,i,n){let o=this._getTextureSize(this._vertexCount),l=this._useRGBACovariants?4:2,h=a*o.x,u=i*o.x,_=new Uint16Array(t.buffer,4*h*Uint16Array.BYTES_PER_ELEMENT,4*u),d=new Uint16Array(s.buffer,h*l*Uint16Array.BYTES_PER_ELEMENT,u*l),p=new Uint8Array(r.buffer,4*h,4*u),c=new Float32Array(e.buffer,4*h*Float32Array.BYTES_PER_ELEMENT,4*u);if(this._updateTextureFromData(this._covariancesATexture,_,o.x,a,i),this._updateTextureFromData(this._covariancesBTexture,d,o.x,a,i),this._updateTextureFromData(this._centersTexture,c,o.x,a,i),this._updateTextureFromData(this._colorsTexture,p,o.x,a,i),this._rotationsATexture&&this._rotationDataA){let e=new Uint16Array(this._rotationDataA.buffer,4*h*Uint16Array.BYTES_PER_ELEMENT,4*u),t=new Uint16Array(this._rotationDataB.buffer,4*h*Uint16Array.BYTES_PER_ELEMENT,4*u),s=new Uint16Array(this._rotationScaleData.buffer,4*h*Uint16Array.BYTES_PER_ELEMENT,4*u);this._updateTextureFromData(this._rotationsATexture,e,o.x,a,i),this._updateTextureFromData(this._rotationsBTexture,t,o.x,a,i),this._updateTextureFromData(this._rotationScaleTexture,s,o.x,a,i)}if(n)for(let e=0;e<n.length;e++)this._updateShTextureData(this._shTextures[e],n[e],o.x,a,i)}_instantiateWorker(){if(!this._vertexCount||(this._updateSplatIndexBuffer(this._vertexCount),this._disableDepthSort||I))return;this._worker?.terminate(),this._canPostToWorker=!0,this._worker=new Worker(URL.createObjectURL(new Blob(["(",D.toString(),")(self)"],{type:"application/javascript"})));let e=Float32Array.from(this._splatPositions),t=this._vertexCount;this._worker.postMessage({command:b,positions:e,vertexCount:t},[e.buffer]),this._postIntervalsToWorker(),this._onWorkerCreated(this._worker),this._worker.onerror=()=>{this._canPostToWorker=!0},this._worker.onmessage=e=>{let t=Math.max(this.renderedSplatCount+15&-16,16);if(e.data.depthMix.length!=t||e.data.rangeVersion!==this._activeRangeVersion){this._depthMix.buffer.byteLength>0&&(this._canPostToWorker=!0,this._postToWorker(!0),this._sortIsDirty=!1);return}this._depthMix=e.data.depthMix;let s=e.data.cameraId,r=e.data.sortRequestId;this._splatIndex&&this._splatIndex.length===t||(this._splatIndex=new Float32Array(t),this._cameraViewInfos.forEach(e=>{e.mesh.thinInstanceSetBuffer("splatIndex",this._splatIndex,16,!1),e.splatIndexBufferSet=!0}));let a=new Uint32Array(e.data.depthMix.buffer);if(this._splatIndex)for(let e=0;e<t;e++)this._splatIndex[e]=a[2*e];if(this.forcedInstanceCount=Math.max(t>>4,1),this._delayedTextureUpdate){let e=this._vertexCount+15&-16,t=this._getTextureSize(e);this._updateSubTextures(this._delayedTextureUpdate.centers,this._delayedTextureUpdate.covA,this._delayedTextureUpdate.covB,this._delayedTextureUpdate.colors,0,t.y,this._delayedTextureUpdate.sh),this._delayedTextureUpdate=null}let i=this._cameraViewInfos.get(s);i&&(i.splatIndexBufferSet?i.mesh.thinInstanceBufferUpdated("splatIndex"):(i.mesh.thinInstanceSetBuffer("splatIndex",this._splatIndex,16,!1),i.splatIndexBufferSet=!0),i.sortAppliedId=r),this._canPostToWorker=!0,this._readyToDisplay=!0,this._sortIsDirty&&(this._postToWorker(!0),this._sortIsDirty=!1)}}_getTextureSize(e){let t=this._scene.getEngine(),s=t.getCaps().maxTextureSize,r=1;if(1!==t.version||t.isWebGPU)r=Math.ceil(e/s),e>0&&r*s===e&&(r+=1);else{for(;s*r<e;)r*=2;e>0&&s*r===e&&(r*=2)}return r>s&&(u.Logger.Error("GaussianSplatting texture size: ("+s+", "+r+"), maxTextureSize: "+s),r=s),new i.Vector2(s,r)}_onWorkerCreated(e){}bindExtraEffectUniforms(e){}_appendSourceToArrays(e,t,s,r,a,i,n,o){let l=e._vertexCount,h=e._splatsData;if(!h||0===l)return;let u=P._GetSplatDataBytes(h),_=P._GetSplatDataFloats(h);for(let e=0;e<l;e++)this._makeSplat(t+e,_,u,s,r,a,n,o,!1,e);if(i&&e._shData)for(let s=0;s<i.length;s++)s<e._shData.length&&i[s].set(e._shData[s].subarray(0,16*l),16*t)}bakeTransformIntoVertices(e){let t,s=this.splatsData;if(!s)return u.Logger.Error("Cannot bake transform into vertices if splatsData is not kept in RAM"),this;let r=e.m,a=Math.sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]),n=Math.sqrt(r[4]*r[4]+r[5]*r[5]+r[6]*r[6]),o=Math.sqrt(r[8]*r[8]+r[9]*r[9]+r[10]*r[10]);if(Math.abs(a-n)>.001||Math.abs(a-o)>.001)return u.Logger.Error("Gaussian Splatting bakeTransformIntoVertices does not support non-uniform scaling"),this;let l=new Uint8Array(s),h=new Float32Array(s),_=i.TmpVectors.Vector3[0],d=i.TmpVectors.Quaternion[0],p=i.TmpVectors.Quaternion[1];for(e.decompose(_,p,_),t=0;t<this._vertexCount;t++){let s=8*t;i.Vector3.TransformCoordinatesFromFloatsToRef(h[s],h[s+1],h[s+2],e,_),h[s]=_.x,h[s+1]=_.y,h[s+2]=_.z,h[s+3]*=a,h[s+4]*=a,h[s+5]*=a,d.set((l[32*t+28+1]-127.5)/127.5,(l[32*t+28+2]-127.5)/127.5,(l[32*t+28+3]-127.5)/127.5,(l[32*t+28+0]-127.5)/127.5),d.normalize(),this.scaling.x<0&&(d.x=-d.x,d.w=-d.w),this.scaling.y<0&&(d.y=-d.y,d.w=-d.w),this.scaling.z<0&&(d.z=-d.z,d.w=-d.w),p.multiplyToRef(d,d),d.normalize(),l[32*t+28+0]=Math.round(127.5*d.w+127.5),l[32*t+28+1]=Math.round(127.5*d.x+127.5),l[32*t+28+2]=Math.round(127.5*d.y+127.5),l[32*t+28+3]=Math.round(127.5*d.z+127.5)}return this.updateData(s,this.shData??void 0,{flipY:!1}),this}}function B(e,t){let s=[];for(let r=0;r<e;r++){let e=new Uint8Array(t);e.fill(128),s.push(e)}return s}P.UseCountingSort=!0,P.LogSortPerformance=!1,P._RowOutputLength=32,P._SH_C0=.28209479177387814,P._SplatBatchSize=327680,P._PlyConversionBatchSize=32768,P._BatchSize=16,P._DefaultViewUpdateThreshold=1e-4,P.ProgressiveUpdateAmount=0,e.s(["AllocateShBuffers",0,B,"GaussianSplattingMeshBase",0,P],43375);var F=e.i(64781),U=l,O=e.i(72716),L=e.i(68987);class H extends U.Mesh{get partIndex(){return this._partIndex}get proxiedMesh(){return this.compoundSplatMesh}constructor(e,t,s,r,a,i,n,o=n){super(e,t),this._disabledVisibility=null,this._partIndex=r,this._vertexCount=i,this._splatsDataOffset=n,this._shDataOffset=o,this._minimum=a.minimum.clone(),this._maximum=a.maximum.clone(),this.compoundSplatMesh=s,this._applyBoundingInfo(),this.compoundSplatMesh.setWorldMatrixForPart(this.partIndex,this.getWorldMatrix()),this.onAfterWorldMatrixUpdateObservable.add(()=>{this.compoundSplatMesh.setWorldMatrixForPart(this.partIndex,this.getWorldMatrix())}),this.onEffectiveEnabledStateChangedObservable.add(e=>{e?(this.compoundSplatMesh.setPartVisibility(this.partIndex,this._disabledVisibility??this.compoundSplatMesh.getPartVisibility(this.partIndex)),this._disabledVisibility=null):(this._disabledVisibility=this.compoundSplatMesh.getPartVisibility(this.partIndex),this.compoundSplatMesh.setPartVisibility(this.partIndex,0))})}updateBoundingInfoFromPartData(){this._applyBoundingInfo()}updateBoundingInfoFromProxiedMesh(){this.updateBoundingInfoFromPartData()}_applyBoundingInfo(){this.setBoundingInfo(new O.BoundingInfo(this._minimum.clone(),this._maximum.clone()))}getClassName(){return"GaussianSplattingPartProxyMesh"}getHierarchyBoundingVectors(e=!0,t=null){let s=super.getHierarchyBoundingVectors(e,t),r=this.getBoundingInfo();return r.update(this.getWorldMatrix()),i.Vector3.CheckExtends(r.boundingBox.minimumWorld,s.min,s.max),i.Vector3.CheckExtends(r.boundingBox.maximumWorld,s.min,s.max),s}updatePartIndex(e){this._partIndex=e}updatePartMetadata(e,t,s=t){this._vertexCount=e,this._splatsDataOffset=t,this._shDataOffset=s}get isVisible(){return this.visibility>0}set isVisible(e){this.visibility=+!!e}get visibility(){return this._disabledVisibility??this.compoundSplatMesh.getPartVisibility(this.partIndex)}set visibility(e){let t=Math.max(0,Math.min(1,e));this.isEnabled()?this.compoundSplatMesh.setPartVisibility(this.partIndex,t):this._disabledVisibility=t}intersects(e){let t=new L.PickingInfo,s=this.getBoundingInfo();return s&&e.intersectsSphere(s.boundingSphere)&&e.intersectsBox(s.boundingBox)&&(t.hit=!0,t.pickedMesh=this,t.distance=i.Vector3.Distance(e.origin,s.boundingSphere.center),t.subMeshId=0),t}serialize(e={}){(e=super.serialize(e)).subMeshes=[],e.geometryUniqueId=void 0,e.geometryId=void 0,e.materialUniqueId=void 0,e.materialId=void 0,e.instances=[],e.actions=void 0,e.type=this.getClassName(),e.compoundSplatMeshId=this.compoundSplatMesh.id,e.partIndex=this._partIndex,e.vertexCount=this._vertexCount,e.splatsDataOffset=this._splatsDataOffset,e.shDataOffset=this._shDataOffset;let t=this.getBoundingInfo();return e.boundingInfo={minimum:t.minimum.asArray(),maximum:t.maximum.asArray()},e}static Parse(e,t){let s=e.partIndex,r=e.compoundSplatMesh??t.getLastMeshById(e.compoundSplatMeshId);if(!r)throw Error(`GaussianSplattingPartProxyMesh: compound mesh not found with ID ${e.compoundSplatMeshId}`);let a=i.Vector3.FromArray(e.boundingInfo.minimum),n=i.Vector3.FromArray(e.boundingInfo.maximum),o=new O.BoundingInfo(a,n),l=e.vertexCount??0,h=e.splatsDataOffset??0,u=e.shDataOffset??h;return new H(e.name,t,r,s,o,l,h,u)}}class k extends P{get partIndicesTexture(){return this._partIndicesTexture}constructor(e,t=null,s=null,r=!1,a=!1){super(e,t,s,r),this._partProxies=[],this._part0LocalMin=null,this._part0LocalMax=null,this._partMatrices=[],this._rebuilding=!1,this._partVisibility=[],this._partSplatRanges=[],this._hasStreamingPart=!1,this._streamingStates=[],this._splatBudget=0,this._lodBudgetParticipants=[],this._budgetObserver=null,this._budgetDemands=[],this._budgetAlloc=[],this._budgetSettled=[],this._streamingShDegree=0,this._tombstonedPartIndices=new Set,this._partIndicesTexture=null,this._partIndices=null,this._alwaysRetainSplatsData=!0,this._needsRotationScaleTextures=a}getClassName(){return"GaussianSplattingMesh"}isReady(e=!1){for(let e of this._partProxies)e&&e.computeWorldMatrix(!0);return super.isReady(e)}_updateBoundingInfoFromProxies(){let e=this.getWorldMatrix(),t=i.Matrix.Invert(e),s=this._part0LocalMin?this._part0LocalMin.clone():new i.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),r=this._part0LocalMax?this._part0LocalMax.clone():new i.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),a=new i.Vector3;for(let e of this._partProxies){if(!e||this._tombstonedPartIndices.has(e.partIndex))continue;e.computeWorldMatrix(!1);let n=e.getBoundingInfo().boundingBox,o=n.minimumWorld,l=n.maximumWorld;for(let e=0;e<8;e++)a.set(1&e?l.x:o.x,2&e?l.y:o.y,4&e?l.z:o.z),i.Vector3.TransformCoordinatesToRef(a,t,a),s.minimizeInPlace(a),r.maximizeInPlace(a)}s.x<=r.x&&(this._boundingInfo?this._boundingInfo.reConstruct(s,r,e):this._boundingInfo=new O.BoundingInfo(s,r,e),this._cachedBoundingMin=s.clone(),this._cachedBoundingMax=r.clone())}_updateBoundingInfo(){return this.isCompound?(this._updateBoundingInfoFromProxies(),this._updateSubMeshesBoundingInfo(this.worldMatrixFromCache),this):super._updateBoundingInfo()}getHierarchyBoundingVectors(e=!0,t=null){if(!this.isCompound)return super.getHierarchyBoundingVectors(e,t);let s=new i.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),r=new i.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);if(this._part0LocalMin&&(this._partVisibility[0]??1)>0){let e=this.getWorldMatrix(),t=this._part0LocalMin,a=this._part0LocalMax,n=new i.Vector3;for(let o=0;o<8;o++)n.set(1&o?a.x:t.x,2&o?a.y:t.y,4&o?a.z:t.z),i.Vector3.TransformCoordinatesToRef(n,e,n),s.minimizeInPlace(n),r.maximizeInPlace(n)}for(let e=0;e<this._partProxies.length;e++){let t=this._partProxies[e];if(!t||(this._partVisibility[e]??1)===0)continue;t.computeWorldMatrix(!1);let a=t.getBoundingInfo().boundingBox;s.minimizeInPlace(a.minimumWorld),r.maximizeInPlace(a.maximumWorld)}return{min:s,max:r}}dispose(e){for(let e of(this._budgetObserver&&(this.getScene().onBeforeRenderObservable.remove(this._budgetObserver),this._budgetObserver=null),this._lodBudgetParticipants=[],this._partProxies))e.dispose();this._partIndicesTexture?.dispose(),this._partProxies=[],this._partMatrices=[],this._partVisibility=[],this._partIndicesTexture=null,this._part0LocalMin=null,this._part0LocalMax=null,super.dispose(e)}_onWorkerCreated(e){e.postMessage({command:A,partMatrices:this._partMatrices.map(e=>new Float32Array(e.m))}),e.postMessage({command:y,partIndices:this._partIndices?new Uint8Array(this._partIndices):null})}_onIndexDataReceived(e,t){this._partIndices=new Uint8Array(t),this._partIndices.set(e)}get isCompound(){return this._partMatrices.length>0}_instantiateWorker(){this._rebuilding&&this._worker?this._updateSplatIndexBuffer(this._vertexCount):super._instantiateWorker()}_onIncrementalUpdateStart(e){this._ensurePartIndicesTexture(e,this._partIndices??void 0)}_notifyWorkerNewData(){super._notifyWorkerNewData(),this._worker&&this._worker.postMessage({command:y,partIndices:this._partIndices??null})}bindExtraEffectUniforms(e){if(!this._partIndicesTexture)return;e.setTexture("partIndicesTexture",this._partIndicesTexture);let t=new Float32Array(16*this.partCount);for(let e=0;e<this.partCount;e++)this._partMatrices[e].toArray(t,16*e);e.setMatrices("partWorld",t);let s=[];for(let e=0;e<this.partCount;e++)s.push(this._partVisibility[e]??1);e.setArray("partVisibility",s)}get partCount(){return this._partMatrices.length}get splatBudget(){return this._splatBudget}set splatBudget(e){let t=e>0?Math.floor(e):0;t!==this._splatBudget&&(this._splatBudget=t,this._updateBudgetCoordination())}registerLodBudgetParticipant(e){-1===this._lodBudgetParticipants.indexOf(e)&&(this._lodBudgetParticipants.push(e),this._updateBudgetCoordination())}unregisterLodBudgetParticipant(e){let t=this._lodBudgetParticipants.indexOf(e);-1!==t&&(this._lodBudgetParticipants.splice(t,1),e.setBudgetAllocation(null),this._updateBudgetCoordination())}_staticSplatCount(){let e=0,t=0;for(let s of this._partProxies)s&&(e+=s._vertexCount,this._streamingStates.some(e=>e.proxy===s)||this._tombstonedPartIndices.has(s.partIndex)||(t+=s._vertexCount));return this._partProxies[0]||this._tombstonedPartIndices.has(0)||(t+=Math.max(0,this._vertexCount-e)),t}_updateBudgetCoordination(){let e=this._splatBudget>0&&this._lodBudgetParticipants.length>0;if(e&&!this._budgetObserver)this._budgetObserver=this.getScene().onBeforeRenderObservable.add(()=>this._apportionBudget());else if(!e&&this._budgetObserver)for(let e of(this.getScene().onBeforeRenderObservable.remove(this._budgetObserver),this._budgetObserver=null,this._lodBudgetParticipants))e.setBudgetAllocation(null)}_apportionBudget(){let e=this._lodBudgetParticipants;if(this._splatBudget<=0||0===e.length)return;let t=Math.max(0,this._splatBudget-this._staticSplatCount()),s=e.length,r=this._budgetDemands,a=this._budgetAlloc,i=this._budgetSettled;r.length=s,a.length=s,i.length=s;for(let t=0;t<s;t++)r[t]=Math.max(0,e[t].getBudgetDemand()),a[t]=0,i[t]=!1;let n=t,o=e.length;for(let t=0;t<e.length&&o>0&&n>0;t++){let t=n/o,s=!1;for(let l=0;l<e.length;l++)!i[l]&&r[l]<=t&&(a[l]=r[l],n-=r[l],i[l]=!0,o--,s=!0);if(!s){for(let s=0;s<e.length;s++)i[s]||(a[s]=t);break}}for(let t=0;t<e.length;t++)e[t].setBudgetAllocation(Math.floor(a[t]))}get partVisibility(){return this._partVisibility}setWorldMatrixForPart(e,t){if(this._partMatrices.length<=e){this.computeWorldMatrix(!0);let t=this.getWorldMatrix();for(;this._partMatrices.length<=e;)this._partMatrices.push(t.clone()),this._partVisibility.push(1)}!this._partMatrices[e].equals(t)&&(this._partMatrices[e].copyFrom(t),this._rebuilding||(this._worker&&this._worker.postMessage({command:A,partMatrices:this._partMatrices.map(e=>new Float32Array(e.m))}),this._postToWorker(!0)))}getWorldMatrixForPart(e){return this._partMatrices[e]??this.getWorldMatrix()}getPartVisibility(e){return this._partVisibility[e]??1}setPartVisibility(e,t){this._partVisibility[e]=Math.max(0,Math.min(1,t))}setPartSplatRanges(e,t){e<0||(this._partSplatRanges[e]=t?t.map(e=>({offset:e.offset,count:e.count})):null,this._refreshPartRangeUnion())}_refreshPartRangeUnion(){let e=!1;for(let t=0;t<this._partSplatRanges.length;t++)if(this._partSplatRanges[t]){e=!0;break}if(!e)return void this.setSplatIndexRanges(null);let t=[],s=this.partCount;for(let e=0;e<s;e++){let s=this._partSplatRanges[e];if(s){for(let e of s)e.count>0&&t.push({offset:e.offset,count:e.count});continue}let r=this._partProxies[e];r&&r._vertexCount>0&&t.push({offset:r._splatsDataOffset,count:r._vertexCount})}this.setSplatIndexRanges(k._CoalesceSplatRanges(t))}static _CoalesceSplatRanges(e){if(e.length<=1)return e;let t=e.slice().sort((e,t)=>e.offset-t.offset),s=[{offset:t[0].offset,count:t[0].count}];for(let e=1;e<t.length;e++){let r=s[s.length-1],a=t[e],i=r.offset+r.count;a.offset<=i?r.count=Math.max(i,a.offset+a.count)-r.offset:s.push({offset:a.offset,count:a.count})}return s}_copyTextures(e){super._copyTextures(e),this._partIndicesTexture=e._partIndicesTexture?.clone()}_onUpdateTextures(e){let t=(e,t,s,r)=>new d.RawTexture(e,t,s,r,this._scene,!1,!1,2,0);if(this._partIndices){let s=new Uint8Array(this._partIndices);if(this._partIndicesTexture){let r=this._partIndicesTexture.getSize();r.width!==e.x||r.height!==e.y?(this._partIndicesTexture.dispose(),this._partIndicesTexture=t(s,e.x,e.y,6),this._partIndicesTexture.wrapU=0,this._partIndicesTexture.wrapV=0):this._updateTextureFromData(this._partIndicesTexture,s,e.x,0,e.y)}else this._partIndicesTexture=t(s,e.x,e.y,6),this._partIndicesTexture.wrapU=0,this._partIndicesTexture.wrapV=0}}_updateSubTextures(e,t,s,r,a,i,n,o){if(super._updateSubTextures(e,t,s,r,a,i,n),o&&this._partIndicesTexture){let e=this._getTextureSize(this._vertexCount),t=a*e.x,s=i*e.x,r=new Uint8Array(o.buffer,t,s);this._updateTextureFromData(this._partIndicesTexture,r,e.x,a,i),this._worker&&this._worker.postMessage({command:y,partIndices:o})}}_ensurePartIndicesTexture(e,t){if(!t||this._partIndicesTexture)return;let s=new Uint8Array(this._partIndices);this._partIndicesTexture=new d.RawTexture(s,e.x,e.y,6,this._scene,!1,!1,2,0),this._partIndicesTexture.wrapU=0,this._partIndicesTexture.wrapV=0,this._worker&&this._worker.postMessage({command:y,partIndices:t??null})}_appendPartSourceToArrays(e,t,s,r,a,i,n,o){this._appendSourceToArrays(e,t,s,r,a,i,n,o)}_createRetainedPartSource(e){if(!this._splatsData||this._shDegree>0&&!this._shData)return null;let t=32*e._splatsDataOffset,s=32*e._vertexCount,r=16*e._shDataOffset,a=16*e._vertexCount,i=P._GetSplatDataBytes(this._splatsData);return{name:e.name,_vertexCount:e._vertexCount,_splatsData:i.subarray(t,t+s),_shData:this._shData?.map(e=>e.subarray(r,r+a))??null,_shDegree:this._shData?this._shDegree:0,isCompound:!1,getWorldMatrix:()=>e.getWorldMatrix(),getBoundingInfo:()=>e.getBoundingInfo(),dispose:()=>{}}}_retainMergedPartData(e,t,s,r){if(!this._keepInRam&&!this._alwaysRetainSplatsData){this._splatsData=null,this._shData=null;return}let a=new Uint8Array(32*t),i=0;for(let t of(this._splatsData&&e>0&&(a.set(P._GetSplatDataBytes(this._splatsData).subarray(0,32*e),i),i+=32*e),s)){if(!t._splatsData)continue;let e=32*t._vertexCount;a.set(P._GetSplatDataBytes(t._splatsData).subarray(0,e),i),i+=e}if(this._splatsData=a.buffer,r<=0){this._shData=null;return}let n=B(Math.ceil(((r+1)*(r+1)-1)*3/16),16*t),o=0;if(this._shData&&e>0){let t=16*e;for(let e=0;e<n.length;e++)e<this._shData.length&&n[e].set(this._shData[e].subarray(0,t),o);o+=t}for(let e of s){let t=16*e._vertexCount;if(e._shData)for(let s=0;s<n.length;s++)s<e._shData.length&&n[s].set(e._shData[s].subarray(0,t),o);o+=t}this._shData=n}_addPartsInternal(e,t){let s;if(0===e.length)return{proxyMeshes:[],assignedPartIndices:[]};for(let t of e){if(!t._splatsData&&!t._isReservedEmpty)throw Error("To call addPart()/addParts(), each source mesh must be fully loaded");if(t.isCompound)throw Error("To call addPart()/addParts(), each source mesh must not be a compound")}let r=this._vertexCount,a=r+e.reduce((e,t)=>e+t._vertexCount,0),o=this._getTextureSize(a),l=o.x*o.y,h=this._useRGBACovariants?4:2,u=new Uint16Array(4*l),_=new Uint16Array(h*l),p=new Uint8Array(4*l),c=this._streamingShDegree,f=this._shDegree>0||e.some(e=>null!==e._shData),x=f||c>0,g=x?Math.max(this._shDegree,c,...e.map(e=>e._shDegree)):0;x&&g>0&&(s=B(Math.ceil(((g+1)*(g+1)-1)*3/16),16*l));let m=this._canReuseCachedData(r,a,s?.length??0),T=m?Math.floor(r/o.x):0,S=m?this._cachedBoundingMin.clone():new i.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),M=m?this._cachedBoundingMax.clone():new i.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),b=this._splatPositions;this._splatPositions=new Float32Array(4*l),m&&b&&this._splatPositions.set(b.subarray(0,4*r));let y=this.partCount,D=this._partIndices;D||(D=new Uint8Array(r),y=+(r>0)),this._partIndices=new Uint8Array(l),this._partIndices.set(D.subarray(0,r));let I=[],v=[],C=r,w=(0,n.GetGaussianSplattingMaxPartCount)(this._scene.getEngine());for(let t of e){if(y>=w)throw Error(`Cannot add part, as the maximum part count (${w}) has been reached`);let e=y++;I.push(e),v.push(C),this._partIndices.fill(e,C,C+t._vertexCount),C+=t._vertexCount}if(!m&&r>0){if(this._partProxies.length>0){let e=0;if(!this._partProxies[0]&&this._splatsData){let t=r-this._partProxies.reduce((e,t)=>e+(t?t._vertexCount:0),0);if(t>0){let r=P._GetSplatDataBytes(this._splatsData),a=P._GetSplatDataFloats(this._splatsData);for(let e=0;e<t;e++)this._makeSplat(e,a,r,u,_,p,S,M,!1);if(s&&this._shData)for(let e=0;e<s.length;e++)e<this._shData.length&&s[e].set(this._shData[e].subarray(0,16*t),0);e+=t}}for(let t=0;t<this._partProxies.length;t++){let r=this._partProxies[t];if(!r)continue;if(this._streamingStates.some(e=>e.proxy===r)){e+=r._vertexCount;continue}let a=this._createRetainedPartSource(r);if(!a)throw Error(`Cannot rebuild compound part "${r.name}": the retained compound source data is not available.`);this._appendPartSourceToArrays(a,e,u,_,p,s,S,M),e+=a._vertexCount}}else if(this._splatsData){let e=P._GetSplatDataBytes(this._splatsData),t=P._GetSplatDataFloats(this._splatsData);for(let s=0;s<r;s++)this._makeSplat(s,t,e,u,_,p,S,M,!1);if(s&&this._shData)for(let e=0;e<s.length;e++)e<this._shData.length&&s[e].set(this._shData[e].subarray(0,16*r),0)}}if(m){let e=T*o.x;if(e<r)if(0===this._partProxies.length){if(this._splatsData){let t=P._GetSplatDataBytes(this._splatsData),s=P._GetSplatDataFloats(this._splatsData);for(let a=e;a<r;a++)this._makeSplat(a,s,t,u,_,p,S,M,!1,a)}}else{let t=r-this._partProxies.reduce((e,t)=>e+(t?t._vertexCount:0),0),s=Array(this._partProxies.length).fill(null),a=Array(this._partProxies.length).fill(null),i=Array(this._partProxies.length).fill(0);!this._partProxies[0]&&this._splatsData&&t>0&&(s[0]=P._GetSplatDataBytes(this._splatsData),a[0]=P._GetSplatDataFloats(this._splatsData),i[0]=0);let n=t;for(let e=0;e<this._partProxies.length;e++){let t=this._partProxies[e];if(!t)continue;if(this._streamingStates.some(e=>e.proxy===t)){i[e]=n,n+=t._vertexCount;continue}let r=this._createRetainedPartSource(t);if(!r||!r._splatsData)throw Error(`Cannot rebuild compound part "${t.name}": the retained compound source data is not available.`);s[e]=P._GetSplatDataBytes(r._splatsData),a[e]=P._GetSplatDataFloats(r._splatsData),i[e]=n,n+=r._vertexCount}for(let t=e;t<r;t++){let e=this._partIndices?this._partIndices[t]:0,r=e<s.length?s[e]:null,n=e<a.length?a[e]:null;r&&n&&this._makeSplat(t,n,r,u,_,p,S,M,!1,t-(i[e]??0))}}}for(let t of(C=r,e))this._appendPartSourceToArrays(t,C,u,_,p,s,S,M),C+=t._vertexCount;let E=a+15&-16;for(let e=a;e<E;e++)this._makeEmptySplat(e,u,_,p);a!==this._vertexCount&&this._updateSplatIndexBuffer(a),this._retainMergedPartData(r,a,e,f?g:0),this._vertexCount=a,this._shDegree=g,this._maxShDegree=g;let R=!this._rebuilding;R&&(this._canPostToWorker=!1,this._rebuilding=!0);try{if(m){if(s&&(!this._shTextures||s.length>this._shTextures.length))for(this._shTextures||(this._shTextures=[]);this._shTextures.length<s.length;){let e=this._shTextures.length,t=new d.RawTexture(null,o.x,o.y,11,this._scene,!1,!1,1,7);t.wrapU=0,t.wrapV=0,this._shTextures.push(t);let r=this._shData&&e<this._shData.length?this._shData[e]:s[e];this._updateShTextureData(t,r,o.x,0,o.y)}if(s&&this._shData){let e=T*o.x;if(e<r){let t=16*e,a=16*r;for(let e=0;e<s.length;e++)e<this._shData.length&&s[e].set(this._shData[e].subarray(t,a),t)}}this._onUpdateTextures(o),this._updateSubTextures(this._splatPositions,u,_,p,T,o.y-T,s)}else this._updateTextures(u,_,p,s);this.setEnabled(!0),this._notifyWorkerNewData(),this._partProxies[0]||!(r>0)||this._part0LocalMin||(this._part0LocalMin=this.getBoundingInfo().minimum.clone(),this._part0LocalMax=this.getBoundingInfo().maximum.clone());let a=[];for(let s=0;s<e.length;s++){let r=e[s],n=I[s],o=r.getWorldMatrix();this.setWorldMatrixForPart(n,o);let l=new H(r.name,this.getScene(),this,n,r.getBoundingInfo(),r._vertexCount,v[s],v[s]);t&&r.dispose();let h=new i.Quaternion;o.decompose(l.scaling,h,l.position),l.rotationQuaternion=h,l.computeWorldMatrix(!0),this._partProxies[n]=l,a.push(l)}return this._updateBoundingInfoFromProxies(),R&&(this._rebuilding=!1,this._worker&&this._worker.postMessage({command:A,partMatrices:this._partMatrices.map(e=>new Float32Array(e.m))}),this._canPostToWorker=!0,this._hasStreamingPart&&this._refreshPartRangeUnion(),this._postToWorker(!0)),this.onPartCountChangedObservable.notifyObservers(this.partCount),{proxyMeshes:a,assignedPartIndices:I}}catch(e){throw R&&(this._rebuilding=!1,this._canPostToWorker=!0),e}}addPart(e,t=!0){let{proxyMeshes:s}=this._addPartsInternal([e],t);return s[0]}_refreshStreamingShState(){let e=0,t=0,s=!1;for(let r of this._streamingStates)!this._tombstonedPartIndices.has(r.partIndex)&&(r.shTextureCount>e&&(e=r.shTextureCount),r.shDegree>t&&(t=r.shDegree),r.needsRotationScale&&(s=!0));this._shMrtAtlasTextureCount=e,this._useShMrtAtlas=e>0,this._streamingShDegree=t,this._useRotMrtAtlas=s}_tombstonePart(e){this.onPartRemovedObservable.notifyObservers(e);let t=this._partProxies[e];t&&(t.setEnabled(!1),t.visibility=0),this._partVisibility[e]=0;let s=this._streamingStates.find(t=>t.partIndex===e);s&&(s.removed=!0),this._partSplatRanges[e]=[],this._tombstonedPartIndices.add(e),this._refreshPartRangeUnion(),this._updateBoundingInfoFromProxies()}_resetForRebuild(){if(this._worker&&(this._worker.terminate(),this._worker=null),this._mrtAtlas?(this._mrtAtlas.dispose(),this._mrtAtlas=null,this._covariancesATexture=this._covariancesBTexture=this._centersTexture=this._colorsTexture=null):(this._covariancesATexture?.dispose(),this._covariancesBTexture?.dispose(),this._centersTexture?.dispose(),this._colorsTexture?.dispose(),this._covariancesATexture=null,this._covariancesBTexture=null,this._centersTexture=null,this._colorsTexture=null),this._rotMrtAtlas?(this._rotMrtAtlas.dispose(),this._rotMrtAtlas=null):(this._rotationsATexture?.dispose(),this._rotationsBTexture?.dispose(),this._rotationScaleTexture?.dispose()),this._rotationsATexture=null,this._rotationsBTexture=null,this._rotationScaleTexture=null,this._shMrtAtlas){for(let e of this._shMrtAtlas)e.dispose();this._shMrtAtlas=null,this._shTextures=null}else if(this._shTextures){for(let e of this._shTextures)e.dispose();this._shTextures=null}this._partIndicesTexture&&(this._partIndicesTexture.dispose(),this._partIndicesTexture=null),this._vertexCount=0,this._splatPositions=null,this._partIndices=null,this._partMatrices=[],this._partVisibility=[],this._cachedBoundingMin=null,this._cachedBoundingMax=null,this._part0LocalMin=null,this._part0LocalMax=null,this._splatsData=null,this._shData=null,this._shDegree=0,this._partProxies=[],this._partSplatRanges=[]}compactAtlas(){if(0===this._tombstonedPartIndices.size)return;let e=this._getTextureSize(1).x,t=[],s=0;for(let r=0;r<this._partProxies.length;r++){let a=this._partProxies[r];if(!a||this._tombstonedPartIndices.has(r))continue;let n=this._streamingStates.find(e=>e.proxy===a)??null,o=a.getWorldMatrix().clone(),l=this._partVisibility[r]??1;if(n){let r=Math.ceil(s/e)*e,h=r-s,u=h+n.capacity,_={name:a.name,_vertexCount:u,_splatsData:null,_shData:null,_shDegree:0,isCompound:!1,getWorldMatrix:()=>o,getBoundingInfo:()=>new O.BoundingInfo(i.Vector3.ZeroReadOnly,i.Vector3.ZeroReadOnly),dispose:()=>{},_isReservedEmpty:!0};t.push({oldProxy:a,source:_,worldMatrix:o,visibility:l,state:n,newBase:r,frontPad:h}),s+=u}else{let e=this._createRetainedPartSource(a);if(!e||!e._splatsData)throw Error(`compactAtlas: the retained source data for static part "${a.name}" is not available.`);t.push({oldProxy:a,source:e,worldMatrix:o,visibility:l,state:null,newBase:0,frontPad:0}),s+=e._vertexCount}}for(let e of(this._mrtAtlas&&this._onBeforeAtlasRebuildObservable.notifyObservers(this._mrtAtlas),this._tombstonedPartIndices))this._partProxies[e]?.dispose();if(this._resetForRebuild(),0===t.length){this._streamingStates.length=0,this._hasStreamingPart=!1,this._tombstonedPartIndices.clear(),this._refreshStreamingShState(),this._useMrtAtlas=!1,this._useRGBACovariants=!this.getEngine().isWebGPU&&1===this.getEngine().version,this.setEnabled(!1),this.onPartCountChangedObservable.notifyObservers(0);return}this._refreshStreamingShState(),this._rebuilding=!0,this._canPostToWorker=!1;try{let{proxyMeshes:e}=this._addPartsInternal(t.map(e=>e.source),!1);for(let s=0;s<t.length;s++){let r=t[s],a=e[s],n=a.partIndex;this.setWorldMatrixForPart(n,r.worldMatrix),this.setPartVisibility(n,r.visibility);let o=new i.Quaternion;r.worldMatrix.decompose(a.scaling,o,a.position),a.rotationQuaternion=o,a.computeWorldMatrix(!0),r.oldProxy.updatePartIndex(n),r.oldProxy.updatePartMetadata(a._vertexCount,a._splatsDataOffset,a._shDataOffset),this._partProxies[n]=r.oldProxy,a.dispose(),r.state?(r.state.partIndex=n,r.state.base=a._splatsDataOffset+r.frontPad,this._partSplatRanges[n]=r.state.localRanges?r.state.localRanges.map(e=>({offset:r.state.base+e.offset,count:e.count})):null):this._partSplatRanges[n]=null}this._mrtAtlas&&this._onAfterAtlasRebuildObservable.notifyObservers(this._mrtAtlas),this._streamingStates=t.filter(e=>e.state).map(e=>e.state),this._hasStreamingPart=this._streamingStates.length>0,this._tombstonedPartIndices.clear(),this._updateBoundingInfoFromProxies(),this._rebuilding=!1,this._canPostToWorker=!0,this._refreshPartRangeUnion(),this._notifyWorkerNewData();let s=this._worker;s?.postMessage({command:A,partMatrices:this._partMatrices.map(e=>new Float32Array(e.m))}),this._postToWorker(!0),this.onPartCountChangedObservable.notifyObservers(this.partCount)}catch(e){throw this._rebuilding=!1,this._canPostToWorker=!0,e}}removePart(e){if(e<0||e>=this.partCount)throw Error(`Part index ${e} is out of range [0, ${this.partCount})`);if(this._hasStreamingPart)return void this._tombstonePart(e);let t=[];for(let s=0;s<this._partProxies.length;s++){let r=this._partProxies[s];if(!r||s===e)continue;let a=this._createRetainedPartSource(r);if(!a)throw Error(`Cannot remove part: the retained compound source data is not available for part "${r.name}".`);t.push({proxyMesh:r,source:a,oldIndex:s,worldMatrix:r.getWorldMatrix().clone(),visibility:this._partVisibility[s]??1})}for(let{proxyMesh:e,source:s}of(t.sort((e,t)=>e.oldIndex-t.oldIndex),t)){if(!s._splatsData)throw Error(`Cannot remove part: the source data for part "${e.name}" is not available.`);if(s._shDegree>0&&!s._shData)throw Error(`Cannot remove part: the SH data for part "${e.name}" is not available.`)}if(this.onPartRemovedObservable.notifyObservers(e),this._partProxies[e]?.dispose(),this._resetForRebuild(),0===t.length){this.setEnabled(!1),this.onPartCountChangedObservable.notifyObservers(0);return}this._rebuilding=!0,this._canPostToWorker=!1;try{let e=t.map(e=>e.source),{proxyMeshes:s}=this._addPartsInternal(e,!1);for(let e=0;e<t.length;e++){let r=t[e].proxyMesh,a=s[e],n=a.partIndex;this.setWorldMatrixForPart(n,t[e].worldMatrix),this.setPartVisibility(n,t[e].visibility);let o=new i.Quaternion;t[e].worldMatrix.decompose(a.scaling,o,a.position),a.rotationQuaternion=o,a.computeWorldMatrix(!0),r.updatePartIndex(n),r.updatePartMetadata(a._vertexCount,a._splatsDataOffset,a._shDataOffset),this._partProxies[n]=r,a.dispose()}this._rebuilding=!1;let r=this._worker;r?.postMessage({command:A,partMatrices:this._partMatrices.map(e=>new Float32Array(e.m))}),this._canPostToWorker=!0,this._postToWorker(!0)}catch(e){throw this._rebuilding=!1,this._canPostToWorker=!0,e}}reserveStreamingPart(e,t=i.Matrix.Identity(),s=this.name+"_streamingPart",r=0,a=0,n=!1){if(!Number.isSafeInteger(e)||e<1)throw Error("reserveStreamingPart: capacity must be a positive integer");if(!Number.isSafeInteger(a)||a<0||a>4)throw Error("reserveStreamingPart: shDegree must be an integer in [0, 4]");if(!Number.isSafeInteger(r)||r<0)throw Error("reserveStreamingPart: shTextureCount must be a non-negative integer");if(a>0!=r>0)throw Error("reserveStreamingPart: shDegree and shTextureCount must both be positive (SH) or both zero (no SH)");if(a>0){let e=Math.ceil(((a+1)*(a+1)-1)*3/16);if(r!==e)throw Error(`reserveStreamingPart: shTextureCount ${r} does not match shDegree ${a} (expected ${e})`)}let o=this._scene.getEngine().getCaps().maxTextureSize,l=o*o,h=this._getTextureSize(1).x,u=this._vertexCount,_=Math.ceil(u/h)*h,d=Math.ceil(e/h)*h,p=_-u+d,c=u+p;if(c+1>l)throw Error(`reserveStreamingPart: capacity ${e} would grow the atlas to ${c} splats (plus a sentinel), exceeding the maximum atlas capacity ${l}`);this._useMrtAtlas=!0,this._useRGBACovariants=!0,r>0&&a>0&&(this._useShMrtAtlas=!0,this._shMrtAtlasTextureCount=Math.max(this._shMrtAtlasTextureCount,r),this._streamingShDegree=Math.max(this._streamingShDegree,a)),n&&(this._useRotMrtAtlas=!0,this._needsRotationScaleTextures=!0);let f=new i.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),x=new i.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),{proxyMeshes:g,assignedPartIndices:m}=this._addPartsInternal([{name:s,_vertexCount:p,_splatsData:null,_shData:null,_shDegree:0,isCompound:!1,getWorldMatrix:()=>t,getBoundingInfo:()=>new O.BoundingInfo(i.Vector3.ZeroReadOnly,i.Vector3.ZeroReadOnly),dispose:()=>{},_isReservedEmpty:!0}],!1),T=g[0],S={proxy:T,base:_,partIndex:m[0],capacity:d,boundsMin:f,boundsMax:x,localRanges:null,shTextureCount:r>0&&a>0?r:0,shDegree:r>0&&a>0?a:0,needsRotationScale:n,removed:!1};this._streamingStates.push(S);let M=this,b=()=>{f.x<=x.x&&(T.setBoundingInfo(new O.BoundingInfo(f.clone(),x.clone())),M._updateBoundingInfoFromProxies())},A=e=>{if(S.removed)throw Error(`${e}: this streaming part has been removed`)},y=(e,t,s)=>{if(!Number.isInteger(t)||!Number.isInteger(s)||t<0||s<0||t+s>S.capacity)throw Error(`${e}: local range [${t}, ${t+s}) is outside the reserved region [0, ${S.capacity})`)},D={proxy:T,capacity:e=d,get partIndex(){return S.partIndex},get base(){return S.base},get centersTexture(){return M.centersTexture},get covariancesATexture(){return M.covariancesATexture},get covariancesBTexture(){return M.covariancesBTexture},get colorsTexture(){return M.colorsTexture},get splatPositions(){return M._splatPositions},get mrtAtlas(){return M._mrtAtlas},get shMrtAtlas(){return M._shMrtAtlas},get rotMrtAtlas(){return M._rotMrtAtlas},get atlasWidth(){return M._getTextureSize(M._vertexCount).x},get isDepthSortSettled(){return M._isDepthSortSettled},setActiveRanges:e=>{if(A("setActiveRanges"),e)for(let t of e)y("setActiveRanges",t.offset,t.count);S.localRanges=e?e.map(e=>({offset:e.offset,count:e.count})):null;let t=e?e.map(e=>({offset:S.base+e.offset,count:e.count})):null;M.setPartSplatRanges(S.partIndex,t)},writeSplats:(e,t,s)=>{A("writeSplats"),y("writeSplats",e,t),M._writeStreamingSplats(S.base+e,t,s,f,x),b()},postPositionsRange:(e,t)=>{A("postPositionsRange"),y("postPositionsRange",e,t),M._postWorkerPositionsRange(S.base+e,t)},expandBounds:(e,t)=>{A("expandBounds"),f.minimizeInPlace(e),x.maximizeInPlace(t),b()},notifyDataChanged:()=>{A("notifyDataChanged"),M._notifyWorkerNewData()},onBeforeAtlasRebuild:e=>{let t=M._onBeforeAtlasRebuildObservable.add(e);return()=>M._onBeforeAtlasRebuildObservable.remove(t)},onAfterAtlasRebuild:e=>{let t=M._onAfterAtlasRebuildObservable.add(e);return()=>M._onAfterAtlasRebuildObservable.remove(t)}};return this._hasStreamingPart=!0,D}serialize(e={},t="base64"){if((e=super.serialize(e)).subMeshes=[],e.geometryUniqueId=void 0,e.geometryId=void 0,e.materialUniqueId=void 0,e.materialId=void 0,e.instances=[],e.actions=void 0,e.type=this.getClassName(),e.keepInRam=this._keepInRam,e.disableDepthSort=this._disableDepthSort,e.viewUpdateThreshold=this.viewUpdateThreshold,e._flipY=this._flipY,this._splatsData&&(e.splatsData="base64"===t?(0,F.EncodeArrayBufferToBase64)(this._splatsData):this._splatsData),this._shData&&(e.shData="base64"===t?this._shData.map(F.EncodeArrayBufferToBase64):this._shData,e.shDegree=this._shDegree),this._partIndices){let s=function(e){let t=[],s=e.length,r=0;for(;r<s;){let a=e[r],i=1;for(;r+i<s&&e[r+i]===a;)i++;t.push(i,a),r+=i}return new Uint32Array(t)}(this._partIndices.subarray(0,this._vertexCount));e.partIndices="base64"===t?(0,F.EncodeArrayBufferToBase64)(s):s}return this._partProxies.length&&(e.partProxies=this._partProxies.filter(e=>!!e).map(e=>e.serialize())),e}static _ParseInternal(e,t,s){let r,a,i=new s(e.name,null,t,e.keepInRam);i.disableDepthSort=e.disableDepthSort??!1,i.viewUpdateThreshold=e.viewUpdateThreshold??P._DefaultViewUpdateThreshold;let n=e.splatsData;"string"==typeof n&&(n=(0,F.DecodeBase64ToBinary)(n));let o=e.shData;if(Array.isArray(o)&&o.length){let e=[];for(let t=0,s=o.length;t<s;t++){let s=o[t];"string"==typeof s?e[t]=new Uint8Array((0,F.DecodeBase64ToBinary)(s)):e[t]=s}r=e}let h=e.partIndices;if("string"==typeof h&&(h=new Uint32Array((0,F.DecodeBase64ToBinary)(h))),h&&(a=function(e){let t=0,s=e.length;for(let r=0;r<s;r+=2)t+=e[r];let r=new Uint8Array(t),a=0;for(let t=0;t<s;t+=2){let s=e[t],i=e[t+1];r.fill(i,a,a+s),a+=s}return r}(h)),n){let t=e._flipY??!1;i.updateData(n,r,{flipY:t},a,e.shDegree)}if(e.partProxies)for(let s of e.partProxies){let e=Object.assign({},s);e.compoundSplatMesh=i;let r=l.Mesh.Parse(e,t,""),a=r.partIndex;i._partProxies[a]=r,i.setWorldMatrixForPart(a,r.getWorldMatrix()),i.setPartVisibility(a,r.isEnabled()?r.visibility:0)}return i}static Parse(e,t){return k._ParseInternal(e,t,k)}}e.s(["GaussianSplattingMesh",0,k,"IsGaussianSplattingClassName",0,function(e){return"GaussianSplattingMesh"===e||"GaussianSplattingStream"===e}],29706)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,634,t=>{"use strict";var e=t.i(23422),i=t.i(65678),o=t.i(68282);class l extends e.FlowGraphExecutionBlockWithOutSignal{constructor(t){super(t),this.body=this.registerDataInput("body",i.RichTypeAny),this.velocity=this.registerDataInput("velocity",i.RichTypeVector3)}_execute(t,e){let i=this.body.getValue(t);if(!i){this._reportError(t,"No physics body provided"),this.out._activateSignal(t);return}i.setAngularVelocity(this.velocity.getValue(t)),this.out._activateSignal(t)}getClassName(){return"FlowGraphSetAngularVelocityBlock"}}let r=!1;t.s(["FlowGraphSetAngularVelocityBlock",0,l,"RegisterFlowGraphSetAngularVelocityBlock",0,function(){r||(r=!0,(0,o.RegisterClass)("FlowGraphSetAngularVelocityBlock",l))}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,20969,48685,e=>{"use strict";var t=e.i(49399);let r={};function s(e,t,r,s){if(e){t?e.IS_NDC_HALF_ZRANGE="":delete e.IS_NDC_HALF_ZRANGE,r?e.USE_REVERSE_DEPTHBUFFER="":delete e.USE_REVERSE_DEPTHBUFFER,s?e.USE_EXACT_SRGB_CONVERSIONS="":delete e.USE_EXACT_SRGB_CONVERSIONS;return}{let e="";return t&&(e+="#define IS_NDC_HALF_ZRANGE"),r&&(e&&(e+="\n"),e+="#define USE_REVERSE_DEPTHBUFFER"),s&&(e&&(e+="\n"),e+="#define USE_EXACT_SRGB_CONVERSIONS"),e}}e.s(["EngineFunctionContext",0,r,"_ConcatenateShader",0,function(e,t,r=""){return r+(t?t+"\n":"")+e},"_GetGlobalDefines",0,s,"_LoadFile",0,function(e,s,n,i,o,a,l){let c=l||r.loadFile;if(!c)throw(0,t._WarnImport)("FileTools");return c(e,s,n,i,o,a)},"allocateAndCopyTypedBuffer",0,function(e,t,r=!1,s){switch(e){case 3:{let e=new Int8Array(t);return s&&e.set(new Int8Array(s)),e}case 0:{let e=new Uint8Array(t);return s&&e.set(new Uint8Array(s)),e}case 4:{let e=new Int16Array("number"!=typeof t?t:r?t/2:t);return s&&e.set(new Int16Array(s)),e}case 5:case 8:case 9:case 10:case 2:{let e=new Uint16Array("number"!=typeof t?t:r?t/2:t);return s&&e.set(new Uint16Array(s)),e}case 6:{let e=new Int32Array("number"!=typeof t?t:r?t/4:t);return s&&e.set(new Int32Array(s)),e}case 7:case 11:case 12:case 13:case 14:case 15:{let e=new Uint32Array("number"!=typeof t?t:r?t/4:t);return s&&e.set(new Uint32Array(s)),e}case 1:{let e=new Float32Array("number"!=typeof t?t:r?t/4:t);return s&&e.set(new Float32Array(s)),e}}let n=new Uint8Array(t);return s&&n.set(new Uint8Array(s)),n}],20969);class n{constructor(){this.children=[]}isValid(e){return!0}process(e,t,r){let s="";if(this.line){let r=this.line,n=t.processor;if(n){n.lineProcessor&&(r=n.lineProcessor(r,t.isFragment,t.processingContext));let s=t.processor?.attributeKeywordName??"attribute",i=t.isFragment&&t.processor?.varyingFragmentKeywordName?t.processor?.varyingFragmentKeywordName:!t.isFragment&&t.processor?.varyingVertexKeywordName?t.processor?.varyingVertexKeywordName:"varying";!t.isFragment&&n.attributeProcessor&&this.line.startsWith(s)?r=n.attributeProcessor(this.line,e,t.processingContext):n.varyingProcessor&&(n.varyingCheck?.(this.line,t.isFragment)||!n.varyingCheck&&this.line.startsWith(i))?r=n.varyingProcessor(this.line,t.isFragment,e,t.processingContext):n.uniformProcessor&&n.uniformRegexp&&n.uniformRegexp.test(this.line)?t.lookForClosingBracketForUniformBuffer||(r=n.uniformProcessor(this.line,t.isFragment,e,t.processingContext)):n.uniformBufferProcessor&&n.uniformBufferRegexp&&n.uniformBufferRegexp.test(this.line)?t.lookForClosingBracketForUniformBuffer||(r=n.uniformBufferProcessor(this.line,t.isFragment,t.processingContext),t.lookForClosingBracketForUniformBuffer=!0):n.textureProcessor&&n.textureRegexp&&n.textureRegexp.test(this.line)?r=n.textureProcessor(this.line,t.isFragment,e,t.processingContext):(n.uniformProcessor||n.uniformBufferProcessor)&&this.line.startsWith("uniform")&&!t.lookForClosingBracketForUniformBuffer&&(/uniform\s+(?:(?:highp)?|(?:lowp)?)\s*(\S+)\s+(\S+)\s*;/.test(this.line)?n.uniformProcessor&&(r=n.uniformProcessor(this.line,t.isFragment,e,t.processingContext)):n.uniformBufferProcessor&&(r=n.uniformBufferProcessor(this.line,t.isFragment,t.processingContext),t.lookForClosingBracketForUniformBuffer=!0)),t.lookForClosingBracketForUniformBuffer&&-1!==this.line.indexOf("}")&&(t.lookForClosingBracketForUniformBuffer=!1,n.endOfUniformBufferProcessor&&(r=n.endOfUniformBufferProcessor(this.line,t.isFragment,t.processingContext)))}s+=r+"\n"}for(let n of this.children)s+=n.process(e,t,r);return this.additionalDefineKey&&(e[this.additionalDefineKey]=this.additionalDefineValue||"true",r[this.additionalDefineKey]=e[this.additionalDefineKey]),s}}class i{constructor(){this._lines=[]}get currentLine(){return this._lines[this.lineIndex]}get canRead(){return this.lineIndex<this._lines.length-1}set lines(e){for(let t of(this._lines.length=0,e)){if(!t||"\r"===t)continue;if("#"===t[0]){this._lines.push(t);continue}let e=t.trim();if(!e)continue;if(e.startsWith("//")){this._lines.push(t);continue}let r=e.indexOf(";");if(-1===r)this._lines.push(e);else if(r===e.length-1)e.length>1&&this._lines.push(e);else{let e=t.split(";");for(let t=0;t<e.length;t++){let r=e[t];r&&(r=r.trim())&&this._lines.push(r+(t!==e.length-1?";":""))}}}}}class o extends n{process(e,t,r){for(let s=0;s<this.children.length;s++){let n=this.children[s];if(n.isValid(e))return n.process(e,t,r)}return""}}class a extends n{isValid(e){return this.testExpression.isTrue(e)}}class l{isTrue(e){return!0}static postfixToInfix(e){let t=[];for(let r of e)if(void 0===l._OperatorPriority[r])t.push(r);else{let e=t[t.length-1],s=t[t.length-2];t.length-=2,t.push(`(${s}${r}${e})`)}return t[t.length-1]}static infixToPostfix(e){let t=l._InfixToPostfixCache.get(e);if(t)return t.accessTime=Date.now(),t.result;if(!e.includes("&&")&&!e.includes("||")&&!e.includes(")")&&!e.includes("("))return[e];let r=[],s=-1,n=()=>{""!==(u=u.trim())&&(r.push(u),u="")},i=e=>{s<l._Stack.length-1&&(l._Stack[++s]=e)},o=()=>l._Stack[s],a=()=>-1===s?"!!INVALID EXPRESSION!!":l._Stack[s--],c=0,u="";for(;c<e.length;){let t=e.charAt(c),f=c<e.length-1?e.substring(c,2+c):"";if("("===t)u="",i(t);else if(")"===t){for(n();-1!==s&&"("!==o();)r.push(a());a()}else if(l._OperatorPriority[f]>1){for(n();-1!==s&&l._OperatorPriority[o()]>=l._OperatorPriority[f];)r.push(a());i(f),c++}else u+=t;c++}for(n();-1!==s;)"("===o()?a():r.push(a());return l._InfixToPostfixCache.size>=l.InfixToPostfixCacheLimitSize&&l.ClearCache(),l._InfixToPostfixCache.set(e,{result:r,accessTime:Date.now()}),r}static ClearCache(){let e=Array.from(l._InfixToPostfixCache.entries()).sort((e,t)=>e[1].accessTime-t[1].accessTime);for(let t=0;t<l.InfixToPostfixCacheCleanupSize;t++)l._InfixToPostfixCache.delete(e[t][0])}}l.InfixToPostfixCacheLimitSize=5e4,l.InfixToPostfixCacheCleanupSize=25e3,l._InfixToPostfixCache=new Map,l._OperatorPriority={")":0,"(":1,"||":2,"&&":3},l._Stack=["","","","","","","","","","","","","","","","","","","",""];class c extends l{constructor(e,t=!1){super(),this.define=e,this.not=t}isTrue(e){let t=void 0!==e[this.define];return this.not&&(t=!t),t}}class u extends l{isTrue(e){return this.leftOperand.isTrue(e)||this.rightOperand.isTrue(e)}}class f extends l{isTrue(e){return this.leftOperand.isTrue(e)&&this.rightOperand.isTrue(e)}}class d extends l{constructor(e,t,r){super(),this.define=e,this.operand=t,this.testValue=r}toString(){return`${this.define} ${this.operand} ${this.testValue}`}isTrue(e){let t=!1,r=parseInt(void 0!=e[this.define]?e[this.define]:this.define),s=parseInt(void 0!=e[this.testValue]?e[this.testValue]:this.testValue);if(isNaN(r)||isNaN(s))return!1;switch(this.operand){case">":t=r>s;break;case"<":t=r<s;break;case"<=":t=r<=s;break;case">=":t=r>=s;break;case"==":t=r===s;break;case"!=":t=r!==s}return t}}let g=/defined\s*?\((.+?)\)/g,h=/defined\s*?\[(.+?)\]/g,p=/#include\s?<(.+)>(\((.*)\))*(\[(.*)\])*/g,m=/__decl__/,y=/light\{X\}.(\w*)/g,_=/\{X\}/g,x=[],b=/(#ifdef)|(#else)|(#elif)|(#endif)|(#ifndef)|(#if)/;function w(e){let t=/defined\((.+)\)/.exec(e);if(t&&t.length)return new c(t[1].trim(),"!"===e[0]);let r="",s=0;for(r of["==","!=",">=","<=","<",">"])if((s=e.indexOf(r))>-1)break;if(-1===s)return new c(e);let n=e.substring(0,s).trim(),i=e.substring(s+r.length).trim();return new d(n,r,i)}function T(e,t){let r=new a,s=e.substring(0,t),n=e.substring(t);return n=n.substring(0,(n.indexOf("//")+1||n.length+1)-1).trim(),"#ifdef"===s?r.testExpression=new c(n):"#ifndef"===s?r.testExpression=new c(n,!0):r.testExpression=function(e){e=e.replace(g,"defined[$1]");let t=l.infixToPostfix(e),r=[];for(let e of t)if("||"!==e&&"&&"!==e)r.push(e);else if(r.length>=2){let t=r[r.length-1],s=r[r.length-2];r.length-=2;let n="&&"==e?new f:new u;"string"==typeof t&&(t=t.replace(h,"defined($1)")),"string"==typeof s&&(s=s.replace(h,"defined($1)")),n.leftOperand="string"==typeof s?w(s):s,n.rightOperand="string"==typeof t?w(t):t,r.push(n)}let s=r[r.length-1];return"string"==typeof s&&(s=s.replace(h,"defined($1)")),"string"==typeof s?w(s):s}(n),r}function C(e,t,r,s){let i;for(;v(e,r,s);){let o=(i=e.currentLine).substring(0,5).toLowerCase();if("#else"===o){let r=new n;t.children.push(r),v(e,r,s);return}if("#elif"===o){let e=T(i,5);t.children.push(e),r=e}}}function v(e,t,r){for(;e.canRead;){e.lineIndex++;let s=e.currentLine;if(s.indexOf("#")>=0){let n=b.exec(s);if(n&&n.length){switch(n[0]){case"#ifdef":{let n=new o;t.children.push(n);let i=T(s,6);n.children.push(i),C(e,n,i,r);break}case"#else":case"#elif":return!0;case"#endif":return!1;case"#ifndef":{let n=new o;t.children.push(n);let i=T(s,7);n.children.push(i),C(e,n,i,r);break}case"#if":{let n=new o,i=T(s,3);t.children.push(n),n.children.push(i),C(e,n,i,r)}}continue}}let i=new n;if(i.line=s,t.children.push(i),"#"===s[0]&&"d"===s[1]){let e=s.replace(";","").split(" ");i.additionalDefineKey=e[1],3===e.length&&(i.additionalDefineValue=e[2])}}return!1}function P(e,t,r){let s;for(x.length=0;null!==(s=p.exec(e));)x.push(s);let n=[e],i=!1;for(let e of x){let s=e[1];if(-1!==s.indexOf("__decl__")&&(s=s.replace(m,""),t.supportsUniformBuffers&&(s=s.replace("Vertex","Ubo").replace("Fragment","Ubo")),s+="Declaration"),t.includesShadersStore[s]){let r=t.includesShadersStore[s];if(e[2]){let t=e[3].split(",");for(let e=0;e<t.length;e+=2){let s=RegExp(t[e],"g"),n=t[e+1];r=r.replace(s,n)}}if(e[4]){let s=e[5];if(-1!==s.indexOf("..")){let e=s.split(".."),n=parseInt(e[0]),i=parseInt(e[1]),o=r.slice(0);r="",isNaN(i)&&(i=t.indexParameters[e[1]]);for(let e=n;e<i;e++)t.supportsUniformBuffers||(o=o.replace(y,(e,t)=>t+"{X}")),r+=o.replace(_,e.toString())+"\n"}else t.supportsUniformBuffers||(r=r.replace(y,(e,t)=>t+"{X}")),r=r.replace(_,s)}let o=[];for(let t of n){let s=t.split(e[0]);for(let e=0;e<s.length-1;e++)o.push(s[e]),o.push(r);o.push(s[s.length-1])}n=o,i=i||r.indexOf("#include<")>=0||r.indexOf("#include <")>=0}else{let e=t.shadersRepository+"ShadersInclude/"+s+".fx";S.loadFile(e,e=>{t.includesShadersStore[s]=e,P(n.join(""),t,r)});return}}x.length=0;let o=n.join("");i?P(o.toString(),t,r):r(o)}let S={loadFile:(e,r,s,n,i,o)=>{throw(0,t._WarnImport)("FileTools")}};e.s(["Finalize",0,function(e,t,r){return r.processor&&r.processor.finalizeShaders?r.processor.finalizeShaders(e,t,r.processingContext):{vertexCode:e,fragmentCode:t}},"Initialize",0,function(e){e.processor&&e.processor.initializeShaders&&e.processor.initializeShaders(e.processingContext)},"Process",0,function(e,t,r,o){t.processor?.preProcessShaderCode&&(e=t.processor.preProcessShaderCode(e,t.isFragment)),P(e,t,e=>{t.processCodeAfterIncludes&&(e=t.processCodeAfterIncludes(t.isFragment?"fragment":"vertex",e,t.defines)),r(function(e,t,r){var o;let a,l,c=function(e,t){if(t.processor?.noPrecision)return e;let r=t.shouldUseHighPrecisionShader;return -1===e.indexOf("precision highp float")?e=r?"precision highp float;\n"+e:"precision mediump float;\n"+e:r||(e=e.replace("precision highp float","precision mediump float")),e}(e,t);if(!t.processor||0===t.processor.shaderLanguage&&-1!==c.indexOf("#version 3")&&(c=c.replace("#version 300 es",""),!t.processor.parseGLES3))return c;let u=t.defines,f=function(e,t){let r=e.defines,n={};for(let e of r){let t=e.replace("#define","").replace(";","").trim().split(" ");n[t[0]]=t.length>1?t[1]:""}return e.processor?.shaderLanguage===0&&(n.GL_ES="true"),n.__VERSION__=e.version,n[e.platformName]="true",s(n,t?.isNDCHalfZRange,t?.useReverseDepthBuffer,t?.useExactSrgbConversions),n}(t,r);t.processor.preProcessor&&(c=t.processor.preProcessor(c,u,f,t.isFragment,t.processingContext));let d={};return o=c,a=new n,(l=new i).lineIndex=-1,l.lines=o.split("\n"),v(l,a,d),c=a.process(f,t,d),t.processor.postProcessor&&(c=t.processor.postProcessor(c,u,t.isFragment,t.processingContext,r?{drawBuffersExtensionDisabled:!r.getCaps().drawBuffersExtension}:{},f,d)),r?._features.needShaderCodeInlining&&(c=r.inlineShaderCode(c)),c}(e,t,o),e)})},"ProcessIncludes",0,P,"_FunctionContainer",0,S],48685)},69552,88362,e=>{"use strict";var t=e.i(49399);class r{static Eval(e,t){return"true"===(e=e.match(/\([^()]*\)/g)?e.replace(/\([^()]*\)/g,e=>(e=e.slice(1,e.length-1),r._HandleParenthesisContent(e,t))):r._HandleParenthesisContent(e,t))||"false"!==e&&r.Eval(e,t)}static _HandleParenthesisContent(e,t){let s;t=t||(e=>"true"===e);let n=e.split("||");for(let e in n)if(Object.prototype.hasOwnProperty.call(n,e)){let i=r._SimplifyNegation(n[e].trim()),o=i.split("&&");if(o.length>1)for(let e=0;e<o.length;++e){let n=r._SimplifyNegation(o[e].trim());if(!(s="true"!==n&&"false"!==n?"!"===n[0]?!t(n.substring(1)):t(n):"true"===n)){i="false";break}}if(s||"true"===i){s=!0;break}s="true"!==i&&"false"!==i?"!"===i[0]?!t(i.substring(1)):t(i):"true"===i}return s?"true":"false"}static _SimplifyNegation(e){return"!true"===(e=(e=e.replace(/^[\s!]+/,e=>(e=e.replace(/[\s]/g,()=>"")).length%2?"!":"")).trim())?e="false":"!false"===e&&(e="true"),e}}class s{static EnableFor(e){e._tags=e._tags||{},e.hasTags=()=>s.HasTags(e),e.addTags=t=>s.AddTagsTo(e,t),e.removeTags=t=>s.RemoveTagsFrom(e,t),e.matchesTagsQuery=t=>s.MatchesQuery(e,t)}static DisableFor(e){delete e._tags,delete e.hasTags,delete e.addTags,delete e.removeTags,delete e.matchesTagsQuery}static HasTags(e){if(!e._tags)return!1;let t=e._tags;for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!0;return!1}static GetTags(e,t=!0){if(!e._tags)return null;if(!t)return e._tags;{let t=[];for(let r in e._tags)Object.prototype.hasOwnProperty.call(e._tags,r)&&!0===e._tags[r]&&t.push(r);return t.join(" ")}}static AddTagsTo(e,t){if(t&&"string"==typeof t)for(let r of t.split(" "))s._AddTagTo(e,r)}static _AddTagTo(e,t){""===(t=t.trim())||"true"===t||"false"===t||t.match(/[\s]/)||t.match(/^([!]|([|]|[&]){2})/)||(s.EnableFor(e),e._tags[t]=!0)}static RemoveTagsFrom(e,t){if(!s.HasTags(e))return;let r=t.split(" ");for(let t in r)s._RemoveTagFrom(e,r[t])}static _RemoveTagFrom(e,t){delete e._tags[t]}static MatchesQuery(e,t){return void 0===t||(""===t?s.HasTags(e):r.Eval(t,t=>s.HasTags(e)&&e._tags[t]))}}e.s(["Tags",0,s],88362);var n=e.i(24617),i=e.i(56173),o=e.i(42898);let a=function(e,t,r,n={}){let i=e();s&&s.HasTags(t)&&s.AddTagsTo(i,s.GetTags(t,!0));let a=(0,o.GetMergedStore)(i),c={};for(let e in a){let s=a[e],o=t[e],u=s.type;if(null!=o&&("uniqueId"!==e||l.AllowLoadingUniqueId))switch(u){case 0:case 6:case 9:case 11:"function"==typeof o.slice?i[e]=o.slice():i[e]=o;break;case 1:n.cloneTexturesOnlyOnce&&c[o.uniqueId]?i[e]=c[o.uniqueId]:(i[e]=r||o.isRenderTarget?o:o.clone(),c[o.uniqueId]=i[e]);break;case 2:case 3:case 4:case 5:case 7:case 8:case 10:case 12:case 13:i[e]=r?o:o.clone()}}return i};class l{static AppendSerializedAnimations(e,t){if(e.animations){t.animations=[];for(let r=0;r<e.animations.length;r++){let s=e.animations[r];t.animations.push(s.serialize())}}}static Serialize(e,t){t||(t={}),s&&(t.tags=s.GetTags(e));let r=(0,o.GetMergedStore)(e);for(let s in r){let n=r[s],i=n.sourceName||s,o=n.type,a=e[s];if(null!=a&&("uniqueId"!==s||l.AllowLoadingUniqueId))switch(o){case 0:Array.isArray(a)?t[i]=a.slice():t[i]=a;break;case 1:case 3:case 7:case 9:t[i]=a.serialize();break;case 2:case 4:case 5:case 8:case 10:case 12:case 13:t[i]=a.asArray();break;case 6:case 11:t[i]=a.id}}return t}static ParseProperties(e,t,r,s){s||(s="");let a=(0,o.GetMergedStore)(t);for(let o in a){let c=a[o],u=e[c.sourceName||o],f=c.type;if(null!=u&&("uniqueId"!==o||l.AllowLoadingUniqueId))switch(f){case 0:t[o]=u;break;case 1:r&&(t[o]=l._TextureParser(u,r,s));break;case 2:t[o]=n.Color3.FromArray(u);break;case 3:t[o]=l._FresnelParametersParser(u);break;case 4:t[o]=i.Vector2.FromArray(u);break;case 5:t[o]=i.Vector3.FromArray(u);break;case 6:r&&(t[o]=r.getLastMeshById(u));break;case 7:t[o]=l._ColorCurvesParser(u);break;case 8:t[o]=n.Color4.FromArray(u);break;case 9:t[o]=l._ImageProcessingConfigurationParser(u);break;case 10:t[o]=i.Quaternion.FromArray(u);break;case 11:r&&(t[o]=r.getCameraById(u));break;case 12:t[o]=i.Matrix.FromArray(u);break;case 13:t[o]=i.Vector4.FromArray(u)}}}static Parse(e,t,r,n=null){let i=e();return s&&s.AddTagsTo(i,t.tags),l.ParseProperties(t,i,r,n),i}static Clone(e,t,r={}){return a(e,t,!1,r)}static Instanciate(e,t){return a(e,t,!0)}}l.AllowLoadingUniqueId=!1,l._ImageProcessingConfigurationParser=e=>{throw(0,t._WarnImport)("ImageProcessingConfiguration")},l._FresnelParametersParser=e=>{throw(0,t._WarnImport)("FresnelParameters")},l._ColorCurvesParser=e=>{throw(0,t._WarnImport)("ColorCurves")},l._TextureParser=(e,r,s)=>{throw(0,t._WarnImport)("Texture")},e.s(["SerializationHelper",0,l],69552)},49399,e=>{"use strict";let t={},r={};e.s(["_IsSideEffectImplemented",0,function(e){return!!e&&!e.__isSideEffectStub},"_MissingSideEffect",0,function(e,t,s=!1){let n=function(){if(s&&1){let s=`${e}.${t}`;r[s]||(r[s]=!0,console.warn(`[Babylon.js] ${s}() requires a side-effect import. See: https://doc.babylonjs.com/setup/treeshaking`))}};return n.__isSideEffectStub=!0,n},"_MissingSideEffectProperty",0,function(e,t){return{get(){},set(e){Object.defineProperty(this,t,{value:e,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0}},"_WarnImport",0,function(e,r=!1){if(!r||!t[e])return t[e]=!0,`${e} needs to be imported before as it contains a side-effect required by your code.`}])},45735,e=>{"use strict";e.s(["GetDOMTextContent",0,function(e){let t="",r=e.firstChild;for(;r;)3===r.nodeType&&(t+=r.textContent),r=r.nextSibling;return t},"IsDocumentAvailable",0,function(){return"u">typeof document},"IsNavigatorAvailable",0,function(){return"u">typeof navigator},"IsWindowObjectExist",0,function(){return"u">typeof window}])},70081,e=>{"use strict";e.s(["RandomGUID",0,function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}])},93561,e=>{"use strict";var t=e.i(8697),r=e.i(68282);class s{static Instantiate(e){if(this.RegisteredExternalClasses&&this.RegisteredExternalClasses[e])return this.RegisteredExternalClasses[e];let s=(0,r.GetClass)(e);if(s)return s;t.Logger.Warn(e+" not found, you may have missed an import.");let n=e.split("."),i="u">typeof window?window:"u">typeof globalThis?globalThis:this;for(let e=0,t=n.length;e<t;e++)i=i[n[e]];return"function"!=typeof i?null:i}}s.RegisteredExternalClasses={},e.s(["InstantiationTools",0,s])},8697,e=>{"use strict";class t{static _CheckLimit(e,r){let s=t._LogLimitOutputs[e];return s?s.current++:(s={limit:r,current:1},t._LogLimitOutputs[e]=s),s.current<=s.limit}static _GenerateLimitMessage(e,r=1){let s=t._LogLimitOutputs[e];if(!s||!t.MessageLimitReached)return;let n=this._Levels[r];s.current===s.limit&&t[n.name](t.MessageLimitReached.replace(/%LIMIT%/g,""+s.limit).replace(/%TYPE%/g,n.name??""))}static _AddLogEntry(e){t._LogCache=e+t._LogCache,t.OnNewCacheEntry&&t.OnNewCacheEntry(e)}static _FormatMessage(e){let t=e=>e<10?"0"+e:""+e,r=new Date;return"["+t(r.getHours())+":"+t(r.getMinutes())+":"+t(r.getSeconds())+"]: "+e}static _LogDisabled(e,t){}static _LogEnabled(e=1,r,s){let n=Array.isArray(r)?r[0]:r;if(void 0!==s&&!t._CheckLimit(n,s))return;let i=t._FormatMessage(n),o=this._Levels[e],a=Array.isArray(r)?r.slice(1):[];o.logFunc&&o.logFunc("BJS - "+i,...a);let l=`<div style='color:${o.color}'>${i}</div><br>`;t._AddLogEntry(l),t._GenerateLimitMessage(n,e)}static get LogCache(){return t._LogCache}static ClearLogCache(){t._LogCache="",t._LogLimitOutputs={},t.errorsCount=0}static set LogLevels(e){for(let r of(t.Log=t._LogDisabled,t.Warn=t._LogDisabled,t.Error=t._LogDisabled,[t.MessageLogLevel,t.WarningLogLevel,t.ErrorLogLevel]))(e&r)===r&&(t[this._Levels[r].name]=t._LogEnabled.bind(t,r))}}t.NoneLogLevel=0,t.MessageLogLevel=1,t.WarningLogLevel=2,t.ErrorLogLevel=4,t.AllLogLevel=7,t.MessageLimitReached="Too many %TYPE%s (%LIMIT%), no more %TYPE%s will be reported for this message.",t._LogCache="",t._LogLimitOutputs={},t._Levels=[{},{color:"white",logFunc:console.log,name:"Log"},{color:"orange",logFunc:console.warn,name:"Warn"},{},{color:"red",logFunc:console.error,name:"Error"}],t.errorsCount=0,t.Log=t._LogEnabled.bind(t,t.MessageLogLevel),t.Warn=t._LogEnabled.bind(t,t.WarningLogLevel),t.Error=t._LogEnabled.bind(t,t.ErrorLogLevel),e.s(["Logger",0,t])},2103,e=>{"use strict";var t=e.i(45735);e.s(["PrecisionDate",0,class{static get Now(){return(0,t.IsWindowObjectExist)()&&window.performance&&window.performance.now?window.performance.now():Date.now()}}])},64781,e=>{"use strict";let t=e=>atob(e);e.s(["Decode",0,e=>{if("u">typeof TextDecoder)return new TextDecoder().decode(e);let t="";for(let r=0;r<e.byteLength;r++)t+=String.fromCharCode(e[r]);return t},"DecodeBase64ToBinary",0,e=>"function"==typeof Uint8Array.fromBase64?Uint8Array.fromBase64(e).buffer:function(e){let r=t(e),s=r.length,n=new Uint8Array(new ArrayBuffer(s));for(let e=0;e<s;e++)n[e]=r.charCodeAt(e);return n.buffer}(e),"DecodeBase64ToString",0,t,"EncodeArrayBufferToBase64",0,e=>{let t=ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e);return"function"==typeof t.toBase64?t.toBase64():function(e){let t,r,s,n,i,o,a,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c="",u=0;for(;u<e.length;)t=e[u++],r=u<e.length?e[u++]:NaN,s=u<e.length?e[u++]:NaN,n=t>>2,i=(3&t)<<4|r>>4,o=(15&r)<<2|s>>6,a=63&s,isNaN(r)?o=a=64:isNaN(s)&&(a=64),c+=l.charAt(n)+l.charAt(i)+l.charAt(o)+l.charAt(a);return c}(t)}])},89435,e=>{"use strict";let t=[];function r(e,t,r){try{if(e())return t(),!0}catch(e){return r?.(e),!0}return!1}e.s(["TimingTools",0,class{static SetImmediate(e){0===t.length&&setTimeout(()=>{let e=t;for(let r of(t=[],e))r()},1),t.push(e)}},"_RetryWithInterval",0,(e,t,s,n=16,i=3e4,o=!0,a)=>{if(o&&r(e,t,s))return null;let l=setInterval(()=>{r(e,t,s)?clearInterval(l):(i-=n)<0&&(clearInterval(l),s?.(Error("Operation timed out after maximum retries. "+(a||"")),!0))},n);return()=>clearInterval(l)}])},4696,e=>{"use strict";function t(e){let t=r(e),n=s(e);return t-e>e-n?n:t}function r(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e}function s(e){return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,(e|=e>>16)-(e>>1)}e.s(["FloorPOT",0,s,"GetExponentOfTwo",0,function(e,n,i=2){let o;switch(i){case 1:o=s(e);break;case 2:o=t(e);break;default:o=r(e)}return Math.min(o,n)},"IsExponentOfTwo",0,function(e){let t=1;do t*=2;while(t<e)return t===e},"Mix",0,function(e,t,r){return e*(1-r)+t*r},"NearestPOT",0,t])},73403,42898,5207,e=>{"use strict";let t;"function"==typeof SuppressedError&&SuppressedError,e.s(["__classPrivateFieldGet",0,function(e,t,r,s){if("a"===r&&!s)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(e):s?s.value:t.get(e)},"__classPrivateFieldSet",0,function(e,t,r,s,n){if("m"===s)throw TypeError("Private method is not writable");if("a"===s&&!n)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,r):n?n.value=r:t.set(e,r),r},"__esDecorate",0,function(e,t,r,s,n,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var a,l=s.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?s.static?e:e.prototype:null,f=t||(u?Object.getOwnPropertyDescriptor(u,s.name):{}),d=!1,g=r.length-1;g>=0;g--){var h={};for(var p in s)h[p]="access"===p?{}:s[p];for(var p in s.access)h.access[p]=s.access[p];h.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var m=(0,r[g])("accessor"===l?{get:f.get,set:f.set}:f[c],h);if("accessor"===l){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(a=o(m.get))&&(f.get=a),(a=o(m.set))&&(f.set=a),(a=o(m.init))&&n.unshift(a)}else(a=o(m))&&("field"===l?n.unshift(a):f[c]=a)}u&&Object.defineProperty(u,s.name,f),d=!0},"__runInitializers",0,function(e,t,r){for(var s=arguments.length>2,n=0;n<t.length;n++)r=s?t[n].call(e,r):t[n].call(e);return s?r:void 0}],73403);let r="__bjs_serializable__",s=new WeakMap;function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}let i=((t=Symbol.metadata)||Object.defineProperty(Symbol,"metadata",{configurable:!0,writable:!0,value:t=Symbol("Symbol.metadata")}),t);function o(e){if(!e)throw Error(`Decorator metadata is unavailable; the Symbol.metadata (${String(i)}) polyfill must run before decorated classes are evaluated.`);return n(e,r)||(e[r]={}),e[r]}function a(e,t){return(r,s)=>{if(!s.metadata)return;let n=String(s.name),i=o(s.metadata);i[n]||(i[n]={type:e,sourceName:t})}}function l(e,t,r){let s=String(t.name),n=null,i=function(...o){if(null===n){n=e,"u">typeof _native&&_native[s]&&(n=r(_native[s],e));let o=this&&(t.static?this:Object.getPrototypeOf(this));o?.[s]===i&&(o[s]=n)}return n.apply(this,o)};return i}function c(e,t){return l(e,t,e=>e)}e.s(["GetDirectStoreFromMetadata",0,o,"GetMergedStore",0,function(e){let t="function"==typeof e?e:e?.constructor,o=t?t[i]:void 0;if(!o)return{};let a=s.get(o);if(a)return a;let l={},c=[],u=o;for(;u;)c.push(u),u=Object.getPrototypeOf(u);for(let e of c)if(n(e,r)){let t=e[r];for(let e in t)l[e]=t[e]}return s.set(o,l),l}],42898),c.filter=function(e){return(t,r)=>l(t,r,(t,r)=>function(...s){return e(...s)?t(...s):r.apply(this,s)})},e.s(["addAccessorsForMaterialProperty",0,function(e,t=null){return(r,s)=>{let n=t||"_"+String(s.name);return{get(){return this[n]?.value},set(t){"function"==typeof this[n]?.value?.equals&&this[n].value.equals(t)||this[n].value!==t&&(this[n].value=t,this[e]())}}}},"expandToProperty",0,function(e,t=null){return function(e,t=null){return(r,s)=>{let n=t||"_"+String(s.name);return{init(e){return void 0===e&&n in this||(this[n]=e),e},get(){return this[n]},set(t){"function"==typeof this[n]?.equals&&this[n].equals(t)||this[n]!==t&&(this[n]=t,this[e]())}}}}(e,t)},"nativeOverride",0,c,"serialize",0,function(e){return a(0,e)},"serializeAsColor3",0,function(e){return a(2,e)},"serializeAsColor4",0,function(e){return a(8,e)},"serializeAsColorCurves",0,function(e){return a(7,e)},"serializeAsFresnelParameters",0,function(e){return a(3,e)},"serializeAsMatrix",0,function(e){return a(12,e)},"serializeAsMeshReference",0,function(e){return a(6,e)},"serializeAsQuaternion",0,function(e){return a(10,e)},"serializeAsTexture",0,function(e){return a(1,e)},"serializeAsVector2",0,function(e){return a(4,e)},"serializeAsVector3",0,function(e){return a(5,e)}],5207)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,20880,e=>{"use strict";class t extends Error{status;constructor(e,t){super(e),this.status=t,this.name="ApiError"}}async function n(e,t,n){let s=e.getReader(),r=new TextDecoder,i="";for(t.addEventListener("abort",()=>void s.cancel().catch(()=>{}));;){let{done:e,value:t}=await s.read();if(e)return;let a=(i+=r.decode(t,{stream:!0})).indexOf("\n\n");for(;a>=0;){let e=i.slice(0,a);i=i.slice(a+2);let t="message",s=[];for(let n of e.split("\n"))!n.startsWith(":")&&(n.startsWith("event:")?t=n.slice(6).trim():n.startsWith("data:")&&s.push(n.slice(5).replace(/^ /,"")));"event"===t&&s.length>0&&n(s.join("\n")),a=i.indexOf("\n\n")}}}function s(e){return e.endsWith("/")?e:`${e}/`}e.s(["ApiError",0,t,"CollectorApi",0,class{baseUrl;apiKey;constructor(e,t){this.baseUrl=e,this.apiKey=t}async get(e,n={}){let r=new URL(e,s(this.baseUrl));for(let[e,t]of Object.entries(n))null!=t&&r.searchParams.set(e,String(t));let i=await fetch(r,{headers:{"x-api-key":this.apiKey},cache:"no-store"});if(!i.ok)throw new t(await i.text().catch(()=>"")||i.statusText,i.status);return await i.json()}read(e,t){return this.get(e,t)}sessions(e){return this.get("api/v1/sessions",e).then(e=>e.map(e=>({...e,events:Number(e.events)})))}pointerHeatmap(e){return this.get("api/v1/heatmaps/pointer",e)}meshUvHeatmap(e){return this.get("api/v1/heatmaps/mesh-uv",e)}cameraHeatmap(e){return this.get("api/v1/heatmaps/camera",e)}viewCoverageHistogram(e){return this.get("api/v1/coverage/view-histogram",e).then(e=>e.map(e=>({bucket:Number(e.bucket??0),sessions:Number(e.sessions??0)})))}topMeshes(e){return this.get("api/v1/meshes/top",e).then(e=>e.map(e=>({...e,count:Number(e.count)})))}meshBlindSpots(e){return this.get("api/v1/meshes/blind-spots",e).then(e=>e.map(e=>({mesh:String(e.mesh??""),visible_ms:Number(e.visible_ms??0),vis_samples:Number(e.vis_samples??0),interactions:Number(e.interactions??0),hover_ms:Number(e.hover_ms??0),hover_episodes:Number(e.hover_episodes??0)})))}meshKinds(e){return this.get("api/v1/meshes/kinds",e).then(e=>e.map(e=>({mesh:String(e.mesh??""),kind:String(e.kind??""),count:Number(e.count??0)})))}reachability(e){return this.get("api/v1/meshes/reachability",e).then(e=>e.map(e=>({mesh:String(e.mesh??""),bucket:Number(e.bucket??0),count:Number(e.count??0),avg_distance:Number(e.avg_distance??0)})))}topMeshesBySource(e){return this.get("api/v1/meshes/sources",e).then(e=>e.map(e=>({mesh:String(e.mesh??""),source:String(e.source??""),count:Number(e.count??0)})))}topMeshesTrend(e){return this.get("api/v1/meshes/trend",e).then(e=>e.map(e=>({mesh:String(e.mesh??""),bucket:Number(e.bucket??0),count:Number(e.count??0)})))}topInputActions(e){return this.get("api/v1/input-actions/top",e).then(e=>e.map(e=>({action:String(e.action??""),source:String(e.source??""),count:Number(e.count??0)})))}perf(e){return this.get("api/v1/perf",e).then(e=>({samples:Number(e.samples??0),avg_fps:Number(e.avg_fps??0),min_fps:Number(e.min_fps??0),p50_fps:Number(e.p50_fps??0)}))}renderScale(e){return this.get("api/v1/perf/render-scale",e).then(e=>{let t=e[0]??{},n=Number(t.downscaled_samples??0),s=Number(t.scale_samples??0);return{samples:Number(t.samples??0),avg_fps:Number(t.avg_fps??0),p50_fps:Number(t.p50_fps??0),avg_render_scale:Number(t.avg_render_scale??0),p50_render_scale:Number(t.p50_render_scale??0),downscaled_samples:n,scale_samples:s,downscaled_share:s>0?n/s:0}})}perfDistribution(e){return this.get("api/v1/perf/distribution",e).then(e=>{let t=e[0]??{};return{sessions:Number(t.sessions??0),samples:Number(t.samples??0),p05_fps:Number(t.p05_fps??0),p50_fps:Number(t.p50_fps??0),p95_fps:Number(t.p95_fps??0)}})}fpsHistogram(e){return this.get("api/v1/perf/fps-histogram",e).then(e=>e.map(e=>({bucket:Number(e.bucket??0),sessions:Number(e.sessions??0)})))}arPlacementTimeToPlace(e){return this.get("api/v1/ar/placement/time-to-place",e).then(e=>e.map(e=>({bucket:Number(e.bucket??0),placements:Number(e.placements??0)})))}arPlacementAttempts(e){return this.get("api/v1/ar/placement/attempts",e).then(e=>e.map(e=>({attempts:Number(e.attempts??0),placements:Number(e.placements??0)})))}arPlacementSurfaces(e){return this.get("api/v1/ar/placement/surfaces",e).then(e=>e.map(e=>({surface:String(e.surface??"unknown"),placements:Number(e.placements??0),avg_scale:Number(e.avg_scale??0)})))}frameTimePercentiles(e){return this.get("api/v1/perf/frame-time",e).then(e=>{let t=e[0]??{};return{sessions:Number(t.sessions??0),samples:Number(t.samples??0),p50_ms:Number(t.p50_ms??0),p95_ms:Number(t.p95_ms??0)}})}jankRate(e){return this.get("api/v1/perf/jank",e).then(e=>{let t=e[0]??{};return{sessions:Number(t.sessions??0),total_long_frames:Number(t.total_long_frames??0),median_rate:Number(t.median_rate??0),worst_decile_rate:Number(t.worst_decile_rate??0)}})}perfChurn(e){return this.get("api/v1/perf/churn",e).then(e=>{let t=e[0]??{};return{sessions:Number(t.sessions??0),churn_sessions:Number(t.churn_sessions??0),fps_churn_sessions:Number(t.fps_churn_sessions??0),stall_churn_sessions:Number(t.stall_churn_sessions??0)}})}perfByDevice(e){return this.get("api/v1/perf/by-device",e).then(e=>e.map(e=>({engine:String(e.engine??""),is_mobile:String(e.is_mobile??""),renderer:String(e.renderer??""),browser:String(e.browser??""),os:String(e.os??""),sessions:Number(e.sessions??0),samples:Number(e.samples??0),p50_fps:Number(e.p50_fps??0)})))}perfByScene(e){return this.get("api/v1/perf/by-scene",e).then(e=>e.map(e=>({scene_id:String(e.scene_id??""),sessions:Number(e.sessions??0),samples:Number(e.samples??0),p50_fps:Number(e.p50_fps??0)})))}resourcePercentiles(e){return this.get("api/v1/perf/resource-percentiles",e).then(e=>{let t=e[0]??{};return{sessions:Number(t.sessions??0),samples:Number(t.samples??0),p50_js_heap_bytes:Number(t.p50_js_heap_bytes??0),p95_js_heap_bytes:Number(t.p95_js_heap_bytes??0),p50_texture_bytes:Number(t.p50_texture_bytes??0),p95_texture_bytes:Number(t.p95_texture_bytes??0),p50_triangles:Number(t.p50_triangles??0),p95_triangles:Number(t.p95_triangles??0)}})}stabilityCounts(e){return this.get("api/v1/perf/stability",e).then(e=>{let t=e[0]??{};return{context_losses:Number(t.context_losses??0),compile_stalls:Number(t.compile_stalls??0),incidents:Number(t.incidents??0)}})}graphicsDiagnosticCounts(e){return this.get("api/v1/graphics-diagnostics",e).then(e=>e.map(e=>({severity:String(e.severity??""),category:String(e.category??""),backend:String(e.backend??""),incidents:Number(e.incidents??0)})))}renderingTechnology(e){return this.get("api/v1/rendering-technology",e).then(e=>e.map(e=>({api:String(e.api??""),backend:String(e.backend??""),apiVersion:String(e.api_version??""),shadingLanguage:String(e.shading_language??""),sessions:Number(e.sessions??0)})))}worldHeatmap(e){return this.get("api/v1/heatmaps/world",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),count:Number(e.count)})))}gazeHeatmap(e){return this.get("api/v1/heatmaps/gaze",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),count:Number(e.count)})))}errorHeatmap(e){return this.get("api/v1/heatmaps/errors",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),count:Number(e.count)})))}boundaryHeatmap(e){return this.get("api/v1/heatmaps/boundary",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),count:Number(e.count)})))}boundaryHeatmapStats(e){return this.get("api/v1/heatmaps/boundary/stats",e).then(e=>({cellSize:Number(e.cellSize??0),cells:Number(e.cells??0),hits:Number(e.hits??0)}))}worldHeatmapStats(e){return this.get("api/v1/heatmaps/world/stats",e).then(e=>({cellSize:Number(e.cellSize??0),cells:Number(e.cells??0),hits:Number(e.hits??0)}))}gazeHeatmapStats(e){return this.get("api/v1/heatmaps/gaze/stats",e).then(e=>({cellSize:Number(e.cellSize??0),cells:Number(e.cells??0),hits:Number(e.hits??0)}))}cameraPositionHeatmap(e){return this.get("api/v1/heatmaps/position",e).then(e=>e.map(e=>({gx:Number(e.gx),gz:Number(e.gz),avg_y:Number(e.avg_y??0),count:Number(e.count??0)})))}sessionTrajectory(e,t){return this.get(`api/v1/sessions/${encodeURIComponent(e)}/trajectory`,t).then(e=>e.map(e=>({ts:Number(e.ts),x:Number(e.x),y:Number(e.y),z:Number(e.z)})))}aggregatePaths(e){return this.get("api/v1/paths",e).then(e=>e.map(e=>({session_id:String(e.session_id??""),ts:Number(e.ts),gx:Number(e.gx),gz:Number(e.gz)})))}clickRays(e){return this.get("api/v1/heatmaps/click-rays",e).then(e=>e.map(e=>({camVoxel:[Number(e.cam_vx),Number(e.cam_vy),Number(e.cam_vz)],origin:[Number(e.origin_x),Number(e.origin_y),Number(e.origin_z)],hitVoxel:[Number(e.hit_vx),Number(e.hit_vy),Number(e.hit_vz)],hit:[Number(e.hit_x),Number(e.hit_y),Number(e.hit_z)],mesh:String(e.mesh??""),count:Number(e.count)})))}flowHeatmap(e){return this.get("api/v1/heatmaps/flow",e).then(e=>e.map(e=>{let t={azimuth_bin:Number(e.azimuth_bin),elevation_bin:Number(e.elevation_bin),mesh:String(e.mesh??""),count:Number(e.count)};return null!=e.origin_vx&&(t.originVoxel=[Number(e.origin_vx),Number(e.origin_vy),Number(e.origin_vz)],t.origin=[Number(e.origin_x),Number(e.origin_y),Number(e.origin_z)]),t}))}scenes(e){return this.get("api/v1/scenes",e).then(e=>e.map(e=>({...e,events:Number(e.events)})))}timeseries(e){return this.get("api/v1/timeseries",e).then(e=>e.map(e=>({bucket:Number(e.bucket),events:Number(e.events??0),avg_fps:Number(e.avg_fps??0)})))}eventCounts(e){return this.get("api/v1/event-counts",e).then(e=>e.map(e=>({event_type:String(e.event_type),count:Number(e.count??0)})))}funnel(e,t){return this.get("api/v1/funnel",{...t,steps:JSON.stringify(e)}).then(e=>e.map(e=>({step:Number(e.step),sessions:Number(e.sessions??0)})))}sceneRetention(e){return this.get("api/v1/scene-retention",e).then(e=>e.map(e=>({from:String(e.from_scene??""),to:String(e.to_scene??""),sessions:Number(e.sessions??0)})))}loadBounce(e){let{bands:t,...n}=e??{};return this.get("api/v1/load-bounce",{...n,...null!=t&&t.length>0?{bands:t.join(",")}:{}}).then(e=>e.map(e=>({band:Number(e.band??0),sessions:Number(e.sessions??0),bounced:Number(e.bounced??0)})))}variantLeaderboard(e={},t){return this.get("api/v1/variant-leaderboard",{...t,variant:e.variant?JSON.stringify(e.variant):void 0,conversion:e.conversion?JSON.stringify(e.conversion):void 0}).then(e=>e.map(e=>{let t=Number(e.sessions??0),n=Number(e.conversions??0);return{variant:String(e.variant),views:Number(e.views??0),sessions:t,conversions:n,avgDwellMs:Number(e.avg_dwell_ms??0),conversionRate:t>0?n/t:0}}))}coverage(e){return this.get("api/v1/coverage",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),count:Number(e.count??0)})))}perfHeatmap(e){return this.get("api/v1/heatmaps/perf",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),samples:Number(e.samples??0),avgFps:Number(e.avg_fps??0),minFps:Number(e.min_fps??0)})))}cameraDistance(e){return this.get("api/v1/camera/distance",e).then(e=>e.map(e=>({bucket:Number(e.bucket),count:Number(e.count??0)})))}navigation(e){return this.get("api/v1/navigation",e).then(e=>e.map(e=>({session_id:String(e.session_id??""),segments:Number(e.segments??0),total_distance:Number(e.total_distance??0),active_segments:Number(e.active_segments??0),active_distance:Number(e.active_distance??0)})))}backtrackRatio(e){return this.get("api/v1/backtrack",e).then(e=>e.map(e=>({scene:String(e.scene??""),sessions:Number(e.sessions??0),entries:Number(e.entries??0),revisits:Number(e.revisits??0),backtrack_ratio:Number(e.backtrack_ratio??0)})))}cameraGestures(e){return this.get("api/v1/camera-gestures",e).then(e=>e.map(e=>({kind:String(e.kind??""),gestures:Number(e.gestures??0),total_ms:Number(e.total_ms??0),avg_ms:Number(e.avg_ms??0),max_ms:Number(e.max_ms??0)})))}interactionsBySource(e){return this.get("api/v1/interactions/sources",e).then(e=>e.map(e=>({event_type:String(e.event_type??""),source:String(e.source??""),count:Number(e.count??0),sessions:Number(e.sessions??0)})))}xrLocomotion(e){return this.get("api/v1/xr/locomotion",e).then(e=>e.map(e=>({session_id:String(e.session_id??""),fly_gestures:Number(e.fly_gestures??0),navigate_gestures:Number(e.navigate_gestures??0),teleports:Number(e.teleports??0),locomotion_ms:Number(e.locomotion_ms??0),started_at:String(e.started_at??""),ended_at:String(e.ended_at??"")})))}boundaryContacts(e){return this.get("api/v1/xr/boundary-contacts",e).then(e=>e.map(e=>({session_id:String(e.session_id??""),contacts:Number(e.contacts??0),near_ms:Number(e.near_ms??0)})))}trackingQuality(e){return this.get("api/v1/xr/tracking",e).then(e=>e.map(e=>({session_id:String(e.session_id??""),degraded_ms:Number(e.degraded_ms??0),hand_degraded_ms:Number(e.hand_degraded_ms??0),controller_degraded_ms:Number(e.controller_degraded_ms??0),degraded_episodes:Number(e.degraded_episodes??0),started_at:String(e.started_at??""),ended_at:String(e.ended_at??"")})))}sessionMeta(e){return this.get(`api/v1/sessions/${encodeURIComponent(e)}/meta`)}async sceneRepresentation(e){try{return await this.get(`api/v1/scenes/${encodeURIComponent(e)}/representation`)}catch(e){if(e instanceof t&&404===e.status)return null;throw e}}async liveToken(){let e=new URL("api/v1/live/token",s(this.baseUrl)),n=await fetch(e,{method:"POST",headers:{"x-api-key":this.apiKey},cache:"no-store"});if(!n.ok)throw new t(await n.text().catch(()=>"")||n.statusText,n.status);return await n.json()}livePresenceUrl(e){let t=new URL("api/v1/live/presence",s(this.baseUrl));return t.searchParams.set("token",e),t.toString()}liveStreamUrl(e,t){let n=new URL("api/v1/live/stream",s(this.baseUrl));return n.searchParams.set("token",e),t&&t.length>0&&n.searchParams.set("types",t.join(",")),n.toString()}liveSessionUrl(e,t){let n=new URL(`api/v1/live/sessions/${encodeURIComponent(t)}`,s(this.baseUrl));return n.searchParams.set("token",e),n.toString()}async sessionEvents(t){let{fetchSessionEvents:n}=await e.A(85461);return n({endpoint:this.baseUrl,apiKey:this.apiKey,sessionId:t})}liveSession(e,t,s){if(!this.apiKey||!this.baseUrl||!e)return s?.onState?.({status:"idle",gated:!1,count:0}),()=>{};let r=!1,i=0,a=null,o=null,m=0,u="idle",l=!1,p=()=>s?.onState?.({status:u,gated:l,count:m}),c=e=>{u=e,p()},h=()=>{if(r)return;c("reconnecting");let e=Math.min(1e3*2**i,15e3);i+=1,o=setTimeout(()=>void b(),e)},b=async()=>{let o;if(!r){c(0===i?"connecting":"reconnecting"),s?.onReset?.(),m=0,p();try{({token:o}=await this.liveToken())}catch{h();return}if(!r){a=new AbortController;try{let s=await fetch(this.liveSessionUrl(o,e),{headers:{accept:"text/event-stream"},cache:"no-store",signal:a.signal});if(403===s.status){l=!0,c("idle");return}if(!s.ok||!s.body)return void h();i=0,c("open"),await n(s.body,a.signal,e=>{try{t(JSON.parse(e)),m+=1,p()}catch{}}),r||h()}catch{r||h()}}}};return b(),()=>{r=!0,o&&clearTimeout(o),a?.abort()}}}])},60614,e=>{"use strict";async function t(e,t){let n=await e.scenes(t).catch(()=>[]);if(0===n.length)return[];let s=await Promise.all(n.map(t=>e.sceneRepresentation(t.scene_id).catch(()=>null))),r=new Set,i=[];for(let e of s)for(let t of e?.proxy?.meshes??[])r.has(t.name)||(r.add(t.name),i.push(t));return i}e.s(["mergeSceneProxies",0,t])},18637,e=>{"use strict";var t=e.i(61284),n=e.i(56054);e.s(["HeatLegend",0,function({title:e,lowLabel:s="low",highLabel:r="high",note:i}){return(0,t.jsxs)("div",{className:"pointer-events-none absolute bottom-3 left-3 rounded-md border border-edge bg-ink/80 px-3 py-2 text-fg backdrop-blur-sm",children:[(0,t.jsx)("div",{className:"mb-1 text-xs font-medium text-fg",children:e}),(0,t.jsx)("div",{className:"h-2 w-36 rounded-sm",style:{background:n.HEAT_GRADIENT}}),(0,t.jsxs)("div",{className:"mt-1 flex w-36 justify-between text-[10px] text-fg-muted",children:[(0,t.jsx)("span",{children:s}),(0,t.jsx)("span",{children:r})]}),i?(0,t.jsx)("div",{className:"mt-1 max-w-44 text-[10px] leading-tight text-fg-muted",children:i}):null]})}])},37215,e=>{"use strict";var t=e.i(61284);let n=(0,t.jsxs)(t.Fragment,{children:["Each ",(0,t.jsx)("strong",{children:"source"})," is a camera ",(0,t.jsx)("em",{children:"gaze-direction bin"})," — a cell on the sphere of where viewers were looking (grouped by azimuth/elevation). Each ",(0,t.jsx)("strong",{children:"target"})," is a"," ",(0,t.jsx)("em",{children:"mesh that was clicked"}),". A ribbon's thickness is how many clicks on that mesh happened while viewers looked from that direction, so you can see which viewpoints drive interaction with which objects. When the scene reports ",(0,t.jsx)("em",{children:"standpoints"}),' (where the viewer stood, §7.8), pick one to gate the flow to clicks made from that vantage — a pin marks it in the scene. "All standpoints" is the aggregate view. Switch to ',(0,t.jsx)("strong",{children:"Two-stage"})," ","for a three-column ",(0,t.jsx)("em",{children:"standpoint → gaze sector → mesh"}),' flow with a birdview minimap; the busiest standpoints/meshes are kept and the tail folds into an "Other" node.']});e.s(["BOUNDARY_HEATMAP_SUBTITLE",0,"Where headsets neared their play-space boundary, voxel-binned in world space — computed on-device, no room geometry captured. Drag to orbit, double-click to focus","BOUNDARY_HEATMAP_TITLE",0,"Guardian boundary heatmap (3D)","CAMERA_DOME_SUBTITLE",0,"Where the audience looked, mapped onto a sphere — drag to orbit, +/- to zoom, double-click to focus","CAMERA_DOME_TITLE",0,"View-direction dome (3D)","CLICK_RAYS_SUBTITLE",0,"Each click joined to the view it was made from — gate by viewpoint or focus a mesh; double-click to recenter","CLICK_RAYS_TITLE",0,"Click rays (3D)","ERROR_HEATMAP_SUBTITLE",0,"Where errors & engine diagnostics fired, voxel-binned by the camera position at the moment they hit — drag to orbit, double-click to focus","ERROR_HEATMAP_TITLE",0,"Error heatmap (3D)","FLOW_SANKEY_HELP",0,n,"FLOW_SANKEY_SUBTITLE",0,"Direction-bin → mesh links (aggregate), or standpoint → gaze → mesh (two-stage) — double-click to focus","FLOW_SANKEY_TITLE",0,"Flow Sankey (3D)","GAZE_CLICK_SUBTITLE",0,"Where viewers look (gaze) vs. where they act (clicks), voxel-binned in world space — double-click to focus","GAZE_CLICK_TITLE",0,"Gaze vs. click divergence","PERF_HEATMAP_SUBTITLE",0,"Where FPS is bad in your scene — frame_perf samples voxel-binned by camera position; hot = slow. Drag to orbit, +/- to zoom, double-click to focus","PERF_HEATMAP_TITLE",0,"Performance heatmap (3D)","SESSION_REPLAY_TITLE",0,"Session replay","WORLD_HEATMAP_SUBTITLE",0,"Pointer hit-points voxel-binned in world space — drag to orbit, +/- to zoom, double-click to focus","WORLD_HEATMAP_TITLE",0,"World heatmap (3D)","sessionReplaySubtitle",0,function(e){return e?"Following this session live — new camera moves and interactions stream in and the timeline grows. Scrub back to review, then press ● LIVE to return to the edge.":"Scrub the camera path and interaction rays; every click stays marked and glows as the playhead passes it. The color-coded strip marks when each event fired (click to seek)."},"sessionReplayTitle",0,function(e){return e?"Session replay · live":"Session replay (birdview timeline)"}])},56054,e=>{"use strict";e.s(["HEAT_GRADIENT",0,"linear-gradient(to right, rgb(178,47,38), rgb(224,123,57), rgb(244,200,75))","heatRgb",0,function(e){let t=Math.max(0,Math.min(1,e)),n=[.878,.482,.224],s=(e,t,n)=>[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n,e[2]+(t[2]-e[2])*n];return t<.5?s([.698,.184,.149],n,t/.5):s(n,[.957,.784,.294],(t-.5)/.5)},"percentileMax",0,function(e,t=.95){if(0===e.length)return 1;let n=[...e].sort((e,t)=>e-t),s=Math.max(0,Math.min(1,t))*(n.length-1),r=Math.floor(s),i=Math.ceil(s);return Math.max(1,r===i?n[r]:n[r]+(n[i]-n[r])*(s-r))}])},19761,e=>{"use strict";var t=e.i(17422);let n=t.z.tuple([t.z.number(),t.z.number(),t.z.number()]),s=t.z.tuple([t.z.number(),t.z.number(),t.z.number(),t.z.number()]),r=t.z.tuple([t.z.number(),t.z.number()]),i=t.z.tuple([t.z.number().min(0).max(1),t.z.number().min(0).max(1)]),a=t.z.number().int().nonnegative(),o=t.z.string().regex(/^[A-Za-z0-9._:-]{1,64}$/,"sceneId must be 1-64 chars of [A-Za-z0-9._:-]");function m(e,n){return t.z.record(t.z.string(),e).refine(e=>Object.keys(e).length<=n,{message:`must have at most ${n} entries`})}let u=t.z.object({title:t.z.string().max(512).optional(),referrer:t.z.string().max(2048).optional(),viewport:t.z.tuple([t.z.number(),t.z.number()]).optional(),devicePixelRatio:t.z.number().positive().optional(),language:t.z.string().max(35).optional()}).passthrough(),l={projectId:t.z.string().min(1).max(128),visitorId:t.z.string().optional(),sessionId:t.z.string().min(1).max(128),ts:a,sdkVersion:t.z.string().min(1).max(64),url:t.z.string().max(2048).optional(),sceneId:o.optional(),pageMeta:u.optional()};function p(e,n){return t.z.object({type:t.z.literal(e),...l,...n})}t.z.object(l);let c=t.z.enum(["left","right"]),h=t.z.enum(["y","z"]),b=t.z.object({handedness:c,upAxis:h.default("y"),unitScale:t.z.number().positive().default(1)}).passthrough(),g=t.z.object({engine:t.z.enum(["webgl2","webgpu","webgl","unknown"]).optional(),vendor:t.z.string().optional(),renderer:t.z.string().optional(),maxTextureSize:t.z.number().optional(),hardwareConcurrency:t.z.number().optional(),deviceMemoryGb:t.z.number().optional(),isMobile:t.z.boolean().optional(),browser:t.z.string().optional(),os:t.z.string().optional()}).passthrough(),d=t.z.enum(["arc-rotate","free","follow","static","other"]),v=t.z.object({description:t.z.string().max(256).optional(),cameraType:d.optional(),cameraName:t.z.string().max(128).optional(),meshCount:t.z.number().int().nonnegative().optional()}).passthrough(),_=t.z.union([t.z.string().max(1024),t.z.number(),t.z.boolean(),t.z.null()]),z=t.z.object({id:t.z.string().max(128).optional(),traits:m(_,64).optional()}).passthrough(),N=t.z.object({name:t.z.string(),version:t.z.string().optional(),coordinateSystem:b.optional()}).passthrough(),f=t.z.enum(["webgl","webgl2","webgpu","opengl","opengles","d3d11","d3d12","vulkan","metal","unknown"]),y=t.z.enum(["metal","d3d11","d3d12","vulkan","opengl","opengles","unknown"]),x=t.z.enum(["glsl","glsl-es","wgsl","hlsl","msl","spirv","unknown"]),w=t.z.object({api:f.optional(),backend:y.optional(),apiVersion:t.z.string().optional(),shadingLanguage:x.optional()}).passthrough(),k=p("session_start",{device:g.optional(),graphics:w.optional(),scene:v.optional(),user:z.optional(),connector:N.optional()}),S=p("session_end",{durationMs:t.z.number().nonnegative().optional(),reason:t.z.enum(["unload","hidden","manual","timeout"]).optional()}),T=p("frame_perf",{fps:t.z.number().nonnegative(),frameTimeMs:t.z.number().nonnegative().optional(),frameTimeP95Ms:t.z.number().nonnegative().optional(),frameTimeP99Ms:t.z.number().nonnegative().optional(),longFrames:t.z.number().int().nonnegative().optional(),drawCalls:t.z.number().nonnegative().optional(),dpr:t.z.number().positive().optional(),renderScale:t.z.number().positive().optional(),position:n.optional()}),E=p("camera_sample",{position:n,direction:n,target:n.optional(),fov:t.z.number().optional(),aspect:t.z.number().positive().optional(),near:t.z.number().positive().optional(),hitPoint:n.optional(),hitMesh:t.z.string().optional()}),j=p("node_transform",{nodeId:t.z.string().min(1).max(128),boneId:t.z.string().min(1).max(128).optional(),childPath:t.z.string().min(1).max(512).optional(),position:n,rotation:s,scale:n.optional()}),A=t.z.enum(["mouse","touch","stylus","pen","keyboard","gamepad","xr-controller","hand","gaze","transient","other"]),M=t.z.enum(["left","right","none"]),R=t.z.object({origin:n,direction:n}),P={source:A.optional(),handedness:M.optional(),sourceId:t.z.string().min(1).max(64).optional(),ray:R.optional()},I=p("pointer_move",{screen:i.optional(),hitPoint:n.optional(),hitMesh:t.z.string().optional(),...P}),L=p("pointer_click",{screen:i.optional(),hitPoint:n.optional(),hitMesh:t.z.string().optional(),uv:r.optional(),button:t.z.number().int().min(0).optional(),...P}),U={screen:i.optional(),hitPoint:n.optional(),hitMesh:t.z.string().optional(),button:t.z.number().int().min(0).optional(),...P},C=p("pointer_down",U),H=p("pointer_up",U),D=p("camera_gesture",{kind:t.z.enum(["orbit","pan","dolly","zoom","roll","fly","navigate"]),durationMs:t.z.number().nonnegative(),orbitDeg:t.z.number().nonnegative().optional(),rollDeg:t.z.number().nonnegative().optional(),zoomRatio:t.z.number().positive().optional(),panDist:t.z.number().nonnegative().optional(),...P}),O=t.z.enum(["hover","pick","click","drag","select","squeeze","grab","release","teleport"]),B=p("mesh_interaction",{mesh:t.z.string().min(1).max(256),kind:O,point:n.optional(),uv:r.optional(),...P}),K=t.z.tuple([t.z.number(),t.z.number(),t.z.number(),t.z.number(),t.z.number(),t.z.number()]),W=t.z.literal("aabb"),$=t.z.object({position:n,rotation:s,scale:n}),F=t.z.object({name:t.z.string().max(256),aabb:K,triangles:t.z.number().int().nonnegative().optional(),path:t.z.string().min(1).max(512).optional(),world:$.optional()});t.z.object({version:t.z.literal(1),sceneId:o,kind:W,bounds:K,upAxis:h,handedness:c.optional(),unitScale:t.z.number().positive(),meshes:t.z.array(F).max(1e4),meshCount:t.z.number().int().nonnegative(),contentHash:t.z.string().min(1),capturedAt:a,sdkVersion:t.z.string().min(1)});let V=p("mesh_visibility",{mesh:t.z.string().min(1).max(256),visibleMs:t.z.number().nonnegative(),centeredMs:t.z.number().nonnegative().optional(),maxScreenFraction:t.z.number().min(0).max(1).optional(),bounds:K.optional()}),G=p("hover_dwell",{mesh:t.z.string().min(1),dwellMs:t.z.number().nonnegative(),uv:r.optional(),...P}),Y=t.z.enum(["shader","pipeline","material","other"]),J=p("compile_stall",{durationMs:t.z.number().nonnegative(),phase:Y.optional()}),Z=p("resource_sample",{textureBytes:t.z.number().nonnegative().optional(),geometryBytes:t.z.number().nonnegative().optional(),triangles:t.z.number().int().nonnegative().optional(),vertices:t.z.number().int().nonnegative().optional(),jsHeapBytes:t.z.number().nonnegative().optional()}),q=p("capability_change",{kind:t.z.enum(["graphics-backend","quality","device-recovery","tracking","feature","other"]),from:t.z.string().max(64).optional(),to:t.z.string().max(64).optional(),reason:t.z.string().max(120).optional(),durationMs:t.z.number().nonnegative().optional(),...P}),Q=p("asset_load",{name:t.z.string().max(1024),bytes:t.z.number().nonnegative().optional(),loadMs:t.z.number().nonnegative(),ttffMs:t.z.number().nonnegative().optional(),ttiMs:t.z.number().nonnegative().optional()}),X=p("scene_change",{}),ee=p("viewport_resize",{width:t.z.number().positive(),height:t.z.number().positive(),dpr:t.z.number().positive().optional()}),et=p("visibility_change",{state:t.z.enum(["visible","hidden"])}),en=p("focus_change",{focused:t.z.boolean()}),es=p("context_lost",{reason:t.z.string().max(512).optional()}),er=p("context_restored",{}),ei=p("graphics_diagnostic",{severity:t.z.enum(["info","warning","error","fatal"]),category:t.z.enum(["context-loss","validation","out-of-memory","shader-compile","device-lost","fallback"]),backend:f.optional(),message:t.z.string().max(1024).optional(),code:t.z.string().max(64).optional(),count:t.z.number().int().positive().optional(),position:n.optional()}),ea=p("runtime_error",{kind:t.z.enum(["error","unhandledrejection"]),message:t.z.string().max(1024),source:t.z.string().max(1024).optional(),lineno:t.z.number().int().nonnegative().optional(),colno:t.z.number().int().nonnegative().optional(),stack:t.z.string().max(4096).optional(),position:n.optional()}),eo=p("input_action",{action:t.z.string().min(1).max(64),code:t.z.string().min(1).max(64).optional(),button:t.z.number().int().nonnegative().optional(),pressed:t.z.boolean().optional(),...P}),em=p("xr_boundary_proximity",{position:n,durationMs:t.z.number().nonnegative()}),eu=t.z.enum(["floor","wall","table","ceiling","unknown"]),el=p("ar_placement",{mesh:t.z.string().min(1).max(256),position:n,surface:eu.optional(),attempts:t.z.number().int().positive(),timeToPlaceMs:t.z.number().nonnegative(),scale:t.z.number().positive(),final:t.z.boolean()}),ep=t.z.union([t.z.string().max(1024),t.z.number(),t.z.boolean(),t.z.null()]),ec=p("custom",{name:t.z.string().min(1).max(128),props:m(ep,64).optional()}),eh=t.z.discriminatedUnion("type",[k,S,T,E,j,I,L,C,H,D,B,V,G,J,Z,q,Q,X,ee,et,en,es,er,ei,ea,eo,em,el,ec]),eb=t.z.array(eh);async function eg(e){let t=e.fetchImpl??fetch,n=`${e.endpoint}/api/v1/sessions/${encodeURIComponent(e.sessionId)}/events`,s=await t(n,{headers:{"x-api-key":e.apiKey}});if(!s.ok)throw Error(`replay fetch failed: ${s.status}`);let r=eb.safeParse(await s.json());if(!r.success)throw Error("replay fetch returned an invalid session payload");return r.data.sort((e,t)=>e.ts-t.ts)}async function*ed(e){let t=e.fetchImpl??fetch,n=`${e.endpoint}/api/v1/sessions/${encodeURIComponent(e.sessionId)}/events`,s=await t(`${n}?format=ndjson`,{headers:{"x-api-key":e.apiKey,accept:"application/x-ndjson"}});if(!s.ok)throw Error(`replay fetch failed: ${s.status}`);if(!(s.headers.get("content-type")??"").includes("application/x-ndjson")){let e=eb.safeParse(await s.json());if(!e.success)throw Error("replay fetch returned an invalid session payload");for(let t of e.data.sort((e,t)=>e.ts-t.ts))yield t;return}if(!s.body)throw Error("replay stream returned no body");let r=0,i=()=>e.onMalformedLine?.(++r),a=s.body.getReader(),o=new TextDecoder,m="",u=function*(e){let t,n=e.trim();if(0===n.length)return;try{t=JSON.parse(n)}catch{i();return}let s=eh.safeParse(t);s.success?yield s.data:i()};for(;;){let{done:e,value:t}=await a.read();if(e)break;let n=(m+=o.decode(t,{stream:!0})).indexOf("\n");for(;n>=0;){let e=m.slice(0,n);m=m.slice(n+1),yield*u(e),n=m.indexOf("\n")}}yield*u(m)}e.s(["fetchSessionEvents",0,eg,"fetchSessionEventsStream",0,ed],19761)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,20880,e=>{"use strict";class t extends Error{status;constructor(e,t){super(e),this.status=t,this.name="ApiError"}}async function n(e,t,n){let s=e.getReader(),r=new TextDecoder,i="";for(t.addEventListener("abort",()=>void s.cancel().catch(()=>{}));;){let{done:e,value:t}=await s.read();if(e)return;let a=(i+=r.decode(t,{stream:!0})).indexOf("\n\n");for(;a>=0;){let e=i.slice(0,a);i=i.slice(a+2);let t="message",s=[];for(let n of e.split("\n"))!n.startsWith(":")&&(n.startsWith("event:")?t=n.slice(6).trim():n.startsWith("data:")&&s.push(n.slice(5).replace(/^ /,"")));"event"===t&&s.length>0&&n(s.join("\n")),a=i.indexOf("\n\n")}}}function s(e){return e.endsWith("/")?e:`${e}/`}e.s(["ApiError",0,t,"CollectorApi",0,class{baseUrl;apiKey;constructor(e,t){this.baseUrl=e,this.apiKey=t}async get(e,n={}){let r=new URL(e,s(this.baseUrl));for(let[e,t]of Object.entries(n))null!=t&&r.searchParams.set(e,String(t));let i=await fetch(r,{headers:{"x-api-key":this.apiKey},cache:"no-store"});if(!i.ok)throw new t(await i.text().catch(()=>"")||i.statusText,i.status);return await i.json()}read(e,t){return this.get(e,t)}sessions(e){return this.get("api/v1/sessions",e).then(e=>e.map(e=>({...e,events:Number(e.events)})))}pointerHeatmap(e){return this.get("api/v1/heatmaps/pointer",e)}meshUvHeatmap(e){return this.get("api/v1/heatmaps/mesh-uv",e)}cameraHeatmap(e){return this.get("api/v1/heatmaps/camera",e)}viewCoverageHistogram(e){return this.get("api/v1/coverage/view-histogram",e).then(e=>e.map(e=>({bucket:Number(e.bucket??0),sessions:Number(e.sessions??0)})))}topMeshes(e){return this.get("api/v1/meshes/top",e).then(e=>e.map(e=>({...e,count:Number(e.count)})))}meshBlindSpots(e){return this.get("api/v1/meshes/blind-spots",e).then(e=>e.map(e=>({mesh:String(e.mesh??""),visible_ms:Number(e.visible_ms??0),vis_samples:Number(e.vis_samples??0),interactions:Number(e.interactions??0),hover_ms:Number(e.hover_ms??0),hover_episodes:Number(e.hover_episodes??0)})))}meshKinds(e){return this.get("api/v1/meshes/kinds",e).then(e=>e.map(e=>({mesh:String(e.mesh??""),kind:String(e.kind??""),count:Number(e.count??0)})))}reachability(e){return this.get("api/v1/meshes/reachability",e).then(e=>e.map(e=>({mesh:String(e.mesh??""),bucket:Number(e.bucket??0),count:Number(e.count??0),avg_distance:Number(e.avg_distance??0)})))}topMeshesBySource(e){return this.get("api/v1/meshes/sources",e).then(e=>e.map(e=>({mesh:String(e.mesh??""),source:String(e.source??""),count:Number(e.count??0)})))}topMeshesTrend(e){return this.get("api/v1/meshes/trend",e).then(e=>e.map(e=>({mesh:String(e.mesh??""),bucket:Number(e.bucket??0),count:Number(e.count??0)})))}topInputActions(e){return this.get("api/v1/input-actions/top",e).then(e=>e.map(e=>({action:String(e.action??""),source:String(e.source??""),count:Number(e.count??0)})))}perf(e){return this.get("api/v1/perf",e).then(e=>({samples:Number(e.samples??0),avg_fps:Number(e.avg_fps??0),min_fps:Number(e.min_fps??0),p50_fps:Number(e.p50_fps??0)}))}renderScale(e){return this.get("api/v1/perf/render-scale",e).then(e=>{let t=e[0]??{},n=Number(t.downscaled_samples??0),s=Number(t.scale_samples??0);return{samples:Number(t.samples??0),avg_fps:Number(t.avg_fps??0),p50_fps:Number(t.p50_fps??0),avg_render_scale:Number(t.avg_render_scale??0),p50_render_scale:Number(t.p50_render_scale??0),downscaled_samples:n,scale_samples:s,downscaled_share:s>0?n/s:0}})}perfDistribution(e){return this.get("api/v1/perf/distribution",e).then(e=>{let t=e[0]??{};return{sessions:Number(t.sessions??0),samples:Number(t.samples??0),p05_fps:Number(t.p05_fps??0),p50_fps:Number(t.p50_fps??0),p95_fps:Number(t.p95_fps??0)}})}fpsHistogram(e){return this.get("api/v1/perf/fps-histogram",e).then(e=>e.map(e=>({bucket:Number(e.bucket??0),sessions:Number(e.sessions??0)})))}arPlacementTimeToPlace(e){return this.get("api/v1/ar/placement/time-to-place",e).then(e=>e.map(e=>({bucket:Number(e.bucket??0),placements:Number(e.placements??0)})))}arPlacementAttempts(e){return this.get("api/v1/ar/placement/attempts",e).then(e=>e.map(e=>({attempts:Number(e.attempts??0),placements:Number(e.placements??0)})))}arPlacementSurfaces(e){return this.get("api/v1/ar/placement/surfaces",e).then(e=>e.map(e=>({surface:String(e.surface??"unknown"),placements:Number(e.placements??0),avg_scale:Number(e.avg_scale??0)})))}frameTimePercentiles(e){return this.get("api/v1/perf/frame-time",e).then(e=>{let t=e[0]??{};return{sessions:Number(t.sessions??0),samples:Number(t.samples??0),p50_ms:Number(t.p50_ms??0),p95_ms:Number(t.p95_ms??0)}})}jankRate(e){return this.get("api/v1/perf/jank",e).then(e=>{let t=e[0]??{};return{sessions:Number(t.sessions??0),total_long_frames:Number(t.total_long_frames??0),median_rate:Number(t.median_rate??0),worst_decile_rate:Number(t.worst_decile_rate??0)}})}perfChurn(e){return this.get("api/v1/perf/churn",e).then(e=>{let t=e[0]??{};return{sessions:Number(t.sessions??0),churn_sessions:Number(t.churn_sessions??0),fps_churn_sessions:Number(t.fps_churn_sessions??0),stall_churn_sessions:Number(t.stall_churn_sessions??0)}})}perfByDevice(e){return this.get("api/v1/perf/by-device",e).then(e=>e.map(e=>({engine:String(e.engine??""),is_mobile:String(e.is_mobile??""),renderer:String(e.renderer??""),browser:String(e.browser??""),os:String(e.os??""),sessions:Number(e.sessions??0),samples:Number(e.samples??0),p50_fps:Number(e.p50_fps??0)})))}perfByScene(e){return this.get("api/v1/perf/by-scene",e).then(e=>e.map(e=>({scene_id:String(e.scene_id??""),sessions:Number(e.sessions??0),samples:Number(e.samples??0),p50_fps:Number(e.p50_fps??0)})))}resourcePercentiles(e){return this.get("api/v1/perf/resource-percentiles",e).then(e=>{let t=e[0]??{};return{sessions:Number(t.sessions??0),samples:Number(t.samples??0),p50_js_heap_bytes:Number(t.p50_js_heap_bytes??0),p95_js_heap_bytes:Number(t.p95_js_heap_bytes??0),p50_texture_bytes:Number(t.p50_texture_bytes??0),p95_texture_bytes:Number(t.p95_texture_bytes??0),p50_triangles:Number(t.p50_triangles??0),p95_triangles:Number(t.p95_triangles??0)}})}stabilityCounts(e){return this.get("api/v1/perf/stability",e).then(e=>{let t=e[0]??{};return{context_losses:Number(t.context_losses??0),compile_stalls:Number(t.compile_stalls??0),incidents:Number(t.incidents??0)}})}graphicsDiagnosticCounts(e){return this.get("api/v1/graphics-diagnostics",e).then(e=>e.map(e=>({severity:String(e.severity??""),category:String(e.category??""),backend:String(e.backend??""),incidents:Number(e.incidents??0)})))}renderingTechnology(e){return this.get("api/v1/rendering-technology",e).then(e=>e.map(e=>({api:String(e.api??""),backend:String(e.backend??""),apiVersion:String(e.api_version??""),shadingLanguage:String(e.shading_language??""),sessions:Number(e.sessions??0)})))}worldHeatmap(e){return this.get("api/v1/heatmaps/world",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),count:Number(e.count)})))}gazeHeatmap(e){return this.get("api/v1/heatmaps/gaze",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),count:Number(e.count)})))}errorHeatmap(e){return this.get("api/v1/heatmaps/errors",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),count:Number(e.count)})))}boundaryHeatmap(e){return this.get("api/v1/heatmaps/boundary",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),count:Number(e.count)})))}boundaryHeatmapStats(e){return this.get("api/v1/heatmaps/boundary/stats",e).then(e=>({cellSize:Number(e.cellSize??0),cells:Number(e.cells??0),hits:Number(e.hits??0)}))}worldHeatmapStats(e){return this.get("api/v1/heatmaps/world/stats",e).then(e=>({cellSize:Number(e.cellSize??0),cells:Number(e.cells??0),hits:Number(e.hits??0)}))}gazeHeatmapStats(e){return this.get("api/v1/heatmaps/gaze/stats",e).then(e=>({cellSize:Number(e.cellSize??0),cells:Number(e.cells??0),hits:Number(e.hits??0)}))}cameraPositionHeatmap(e){return this.get("api/v1/heatmaps/position",e).then(e=>e.map(e=>({gx:Number(e.gx),gz:Number(e.gz),avg_y:Number(e.avg_y??0),count:Number(e.count??0)})))}sessionTrajectory(e,t){return this.get(`api/v1/sessions/${encodeURIComponent(e)}/trajectory`,t).then(e=>e.map(e=>({ts:Number(e.ts),x:Number(e.x),y:Number(e.y),z:Number(e.z)})))}aggregatePaths(e){return this.get("api/v1/paths",e).then(e=>e.map(e=>({session_id:String(e.session_id??""),ts:Number(e.ts),gx:Number(e.gx),gz:Number(e.gz)})))}clickRays(e){return this.get("api/v1/heatmaps/click-rays",e).then(e=>e.map(e=>({camVoxel:[Number(e.cam_vx),Number(e.cam_vy),Number(e.cam_vz)],origin:[Number(e.origin_x),Number(e.origin_y),Number(e.origin_z)],hitVoxel:[Number(e.hit_vx),Number(e.hit_vy),Number(e.hit_vz)],hit:[Number(e.hit_x),Number(e.hit_y),Number(e.hit_z)],mesh:String(e.mesh??""),count:Number(e.count)})))}flowHeatmap(e){return this.get("api/v1/heatmaps/flow",e).then(e=>e.map(e=>{let t={azimuth_bin:Number(e.azimuth_bin),elevation_bin:Number(e.elevation_bin),mesh:String(e.mesh??""),count:Number(e.count)};return null!=e.origin_vx&&(t.originVoxel=[Number(e.origin_vx),Number(e.origin_vy),Number(e.origin_vz)],t.origin=[Number(e.origin_x),Number(e.origin_y),Number(e.origin_z)]),t}))}scenes(e){return this.get("api/v1/scenes",e).then(e=>e.map(e=>({...e,events:Number(e.events)})))}timeseries(e){return this.get("api/v1/timeseries",e).then(e=>e.map(e=>({bucket:Number(e.bucket),events:Number(e.events??0),avg_fps:Number(e.avg_fps??0)})))}eventCounts(e){return this.get("api/v1/event-counts",e).then(e=>e.map(e=>({event_type:String(e.event_type),count:Number(e.count??0)})))}funnel(e,t){return this.get("api/v1/funnel",{...t,steps:JSON.stringify(e)}).then(e=>e.map(e=>({step:Number(e.step),sessions:Number(e.sessions??0)})))}sceneRetention(e){return this.get("api/v1/scene-retention",e).then(e=>e.map(e=>({from:String(e.from_scene??""),to:String(e.to_scene??""),sessions:Number(e.sessions??0)})))}loadBounce(e){let{bands:t,...n}=e??{};return this.get("api/v1/load-bounce",{...n,...null!=t&&t.length>0?{bands:t.join(",")}:{}}).then(e=>e.map(e=>({band:Number(e.band??0),sessions:Number(e.sessions??0),bounced:Number(e.bounced??0)})))}variantLeaderboard(e={},t){return this.get("api/v1/variant-leaderboard",{...t,variant:e.variant?JSON.stringify(e.variant):void 0,conversion:e.conversion?JSON.stringify(e.conversion):void 0}).then(e=>e.map(e=>{let t=Number(e.sessions??0),n=Number(e.conversions??0);return{variant:String(e.variant),views:Number(e.views??0),sessions:t,conversions:n,avgDwellMs:Number(e.avg_dwell_ms??0),conversionRate:t>0?n/t:0}}))}coverage(e){return this.get("api/v1/coverage",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),count:Number(e.count??0)})))}perfHeatmap(e){return this.get("api/v1/heatmaps/perf",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),samples:Number(e.samples??0),avgFps:Number(e.avg_fps??0),minFps:Number(e.min_fps??0)})))}cameraDistance(e){return this.get("api/v1/camera/distance",e).then(e=>e.map(e=>({bucket:Number(e.bucket),count:Number(e.count??0)})))}navigation(e){return this.get("api/v1/navigation",e).then(e=>e.map(e=>({session_id:String(e.session_id??""),segments:Number(e.segments??0),total_distance:Number(e.total_distance??0),active_segments:Number(e.active_segments??0),active_distance:Number(e.active_distance??0)})))}backtrackRatio(e){return this.get("api/v1/backtrack",e).then(e=>e.map(e=>({scene:String(e.scene??""),sessions:Number(e.sessions??0),entries:Number(e.entries??0),revisits:Number(e.revisits??0),backtrack_ratio:Number(e.backtrack_ratio??0)})))}cameraGestures(e){return this.get("api/v1/camera-gestures",e).then(e=>e.map(e=>({kind:String(e.kind??""),gestures:Number(e.gestures??0),total_ms:Number(e.total_ms??0),avg_ms:Number(e.avg_ms??0),max_ms:Number(e.max_ms??0)})))}interactionsBySource(e){return this.get("api/v1/interactions/sources",e).then(e=>e.map(e=>({event_type:String(e.event_type??""),source:String(e.source??""),count:Number(e.count??0),sessions:Number(e.sessions??0)})))}xrLocomotion(e){return this.get("api/v1/xr/locomotion",e).then(e=>e.map(e=>({session_id:String(e.session_id??""),fly_gestures:Number(e.fly_gestures??0),navigate_gestures:Number(e.navigate_gestures??0),teleports:Number(e.teleports??0),locomotion_ms:Number(e.locomotion_ms??0),started_at:String(e.started_at??""),ended_at:String(e.ended_at??"")})))}boundaryContacts(e){return this.get("api/v1/xr/boundary-contacts",e).then(e=>e.map(e=>({session_id:String(e.session_id??""),contacts:Number(e.contacts??0),near_ms:Number(e.near_ms??0)})))}trackingQuality(e){return this.get("api/v1/xr/tracking",e).then(e=>e.map(e=>({session_id:String(e.session_id??""),degraded_ms:Number(e.degraded_ms??0),hand_degraded_ms:Number(e.hand_degraded_ms??0),controller_degraded_ms:Number(e.controller_degraded_ms??0),degraded_episodes:Number(e.degraded_episodes??0),started_at:String(e.started_at??""),ended_at:String(e.ended_at??"")})))}sessionMeta(e){return this.get(`api/v1/sessions/${encodeURIComponent(e)}/meta`)}async sceneRepresentation(e){try{return await this.get(`api/v1/scenes/${encodeURIComponent(e)}/representation`)}catch(e){if(e instanceof t&&404===e.status)return null;throw e}}async liveToken(){let e=new URL("api/v1/live/token",s(this.baseUrl)),n=await fetch(e,{method:"POST",headers:{"x-api-key":this.apiKey},cache:"no-store"});if(!n.ok)throw new t(await n.text().catch(()=>"")||n.statusText,n.status);return await n.json()}livePresenceUrl(e){let t=new URL("api/v1/live/presence",s(this.baseUrl));return t.searchParams.set("token",e),t.toString()}liveStreamUrl(e,t){let n=new URL("api/v1/live/stream",s(this.baseUrl));return n.searchParams.set("token",e),t&&t.length>0&&n.searchParams.set("types",t.join(",")),n.toString()}liveSessionUrl(e,t){let n=new URL(`api/v1/live/sessions/${encodeURIComponent(t)}`,s(this.baseUrl));return n.searchParams.set("token",e),n.toString()}async sessionEvents(t){let{fetchSessionEvents:n}=await e.A(85461);return n({endpoint:this.baseUrl,apiKey:this.apiKey,sessionId:t})}liveSession(e,t,s){if(!this.apiKey||!this.baseUrl||!e)return s?.onState?.({status:"idle",gated:!1,count:0}),()=>{};let r=!1,i=0,a=null,o=null,m=0,u="idle",l=!1,p=()=>s?.onState?.({status:u,gated:l,count:m}),c=e=>{u=e,p()},h=()=>{if(r)return;c("reconnecting");let e=Math.min(1e3*2**i,15e3);i+=1,o=setTimeout(()=>void b(),e)},b=async()=>{let o;if(!r){c(0===i?"connecting":"reconnecting"),s?.onReset?.(),m=0,p();try{({token:o}=await this.liveToken())}catch{h();return}if(!r){a=new AbortController;try{let s=await fetch(this.liveSessionUrl(o,e),{headers:{accept:"text/event-stream"},cache:"no-store",signal:a.signal});if(403===s.status){l=!0,c("idle");return}if(!s.ok||!s.body)return void h();i=0,c("open"),await n(s.body,a.signal,e=>{try{t(JSON.parse(e)),m+=1,p()}catch{}}),r||h()}catch{r||h()}}}};return b(),()=>{r=!0,o&&clearTimeout(o),a?.abort()}}}])},60614,e=>{"use strict";async function t(e,t){let n=await e.scenes(t).catch(()=>[]);if(0===n.length)return[];let s=await Promise.all(n.map(t=>e.sceneRepresentation(t.scene_id).catch(()=>null))),r=new Set,i=[];for(let e of s)for(let t of e?.proxy?.meshes??[])r.has(t.name)||(r.add(t.name),i.push(t));return i}e.s(["mergeSceneProxies",0,t])},18637,e=>{"use strict";var t=e.i(63671),n=e.i(56054);e.s(["HeatLegend",0,function({title:e,lowLabel:s="low",highLabel:r="high",note:i}){return(0,t.jsxs)("div",{className:"pointer-events-none absolute bottom-3 left-3 rounded-md border border-edge bg-ink/80 px-3 py-2 text-fg backdrop-blur-sm",children:[(0,t.jsx)("div",{className:"mb-1 text-xs font-medium text-fg",children:e}),(0,t.jsx)("div",{className:"h-2 w-36 rounded-sm",style:{background:n.HEAT_GRADIENT}}),(0,t.jsxs)("div",{className:"mt-1 flex w-36 justify-between text-[10px] text-fg-muted",children:[(0,t.jsx)("span",{children:s}),(0,t.jsx)("span",{children:r})]}),i?(0,t.jsx)("div",{className:"mt-1 max-w-44 text-[10px] leading-tight text-fg-muted",children:i}):null]})}])},37215,e=>{"use strict";var t=e.i(63671);let n=(0,t.jsxs)(t.Fragment,{children:["Each ",(0,t.jsx)("strong",{children:"source"})," is a camera ",(0,t.jsx)("em",{children:"gaze-direction bin"})," — a cell on the sphere of where viewers were looking (grouped by azimuth/elevation). Each ",(0,t.jsx)("strong",{children:"target"})," is a"," ",(0,t.jsx)("em",{children:"mesh that was clicked"}),". A ribbon's thickness is how many clicks on that mesh happened while viewers looked from that direction, so you can see which viewpoints drive interaction with which objects. When the scene reports ",(0,t.jsx)("em",{children:"standpoints"}),' (where the viewer stood, §7.8), pick one to gate the flow to clicks made from that vantage — a pin marks it in the scene. "All standpoints" is the aggregate view. Switch to ',(0,t.jsx)("strong",{children:"Two-stage"})," ","for a three-column ",(0,t.jsx)("em",{children:"standpoint → gaze sector → mesh"}),' flow with a birdview minimap; the busiest standpoints/meshes are kept and the tail folds into an "Other" node.']});e.s(["BOUNDARY_HEATMAP_SUBTITLE",0,"Where headsets neared their play-space boundary, voxel-binned in world space — computed on-device, no room geometry captured. Drag to orbit, double-click to focus","BOUNDARY_HEATMAP_TITLE",0,"Guardian boundary heatmap (3D)","CAMERA_DOME_SUBTITLE",0,"Where the audience looked, mapped onto a sphere — drag to orbit, +/- to zoom, double-click to focus","CAMERA_DOME_TITLE",0,"View-direction dome (3D)","CLICK_RAYS_SUBTITLE",0,"Each click joined to the view it was made from — gate by viewpoint or focus a mesh; double-click to recenter","CLICK_RAYS_TITLE",0,"Click rays (3D)","ERROR_HEATMAP_SUBTITLE",0,"Where errors & engine diagnostics fired, voxel-binned by the camera position at the moment they hit — drag to orbit, double-click to focus","ERROR_HEATMAP_TITLE",0,"Error heatmap (3D)","FLOW_SANKEY_HELP",0,n,"FLOW_SANKEY_SUBTITLE",0,"Direction-bin → mesh links (aggregate), or standpoint → gaze → mesh (two-stage) — double-click to focus","FLOW_SANKEY_TITLE",0,"Flow Sankey (3D)","GAZE_CLICK_SUBTITLE",0,"Where viewers look (gaze) vs. where they act (clicks), voxel-binned in world space — double-click to focus","GAZE_CLICK_TITLE",0,"Gaze vs. click divergence","PERF_HEATMAP_SUBTITLE",0,"Where FPS is bad in your scene — frame_perf samples voxel-binned by camera position; hot = slow. Drag to orbit, +/- to zoom, double-click to focus","PERF_HEATMAP_TITLE",0,"Performance heatmap (3D)","SESSION_REPLAY_TITLE",0,"Session replay","WORLD_HEATMAP_SUBTITLE",0,"Pointer hit-points voxel-binned in world space — drag to orbit, +/- to zoom, double-click to focus","WORLD_HEATMAP_TITLE",0,"World heatmap (3D)","sessionReplaySubtitle",0,function(e){return e?"Following this session live — new camera moves and interactions stream in and the timeline grows. Scrub back to review, then press ● LIVE to return to the edge.":"Scrub the camera path and interaction rays; every click stays marked and glows as the playhead passes it. The color-coded strip marks when each event fired (click to seek)."},"sessionReplayTitle",0,function(e){return e?"Session replay · live":"Session replay (birdview timeline)"}])},56054,e=>{"use strict";e.s(["HEAT_GRADIENT",0,"linear-gradient(to right, rgb(178,47,38), rgb(224,123,57), rgb(244,200,75))","heatRgb",0,function(e){let t=Math.max(0,Math.min(1,e)),n=[.878,.482,.224],s=(e,t,n)=>[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n,e[2]+(t[2]-e[2])*n];return t<.5?s([.698,.184,.149],n,t/.5):s(n,[.957,.784,.294],(t-.5)/.5)},"percentileMax",0,function(e,t=.95){if(0===e.length)return 1;let n=[...e].sort((e,t)=>e-t),s=Math.max(0,Math.min(1,t))*(n.length-1),r=Math.floor(s),i=Math.ceil(s);return Math.max(1,r===i?n[r]:n[r]+(n[i]-n[r])*(s-r))}])},19761,e=>{"use strict";var t=e.i(52731);let n=t.z.tuple([t.z.number(),t.z.number(),t.z.number()]),s=t.z.tuple([t.z.number(),t.z.number(),t.z.number(),t.z.number()]),r=t.z.tuple([t.z.number(),t.z.number()]),i=t.z.tuple([t.z.number().min(0).max(1),t.z.number().min(0).max(1)]),a=t.z.number().int().nonnegative(),o=t.z.string().regex(/^[A-Za-z0-9._:-]{1,64}$/,"sceneId must be 1-64 chars of [A-Za-z0-9._:-]");function m(e,n){return t.z.record(t.z.string(),e).refine(e=>Object.keys(e).length<=n,{message:`must have at most ${n} entries`})}let u=t.z.object({title:t.z.string().max(512).optional(),referrer:t.z.string().max(2048).optional(),viewport:t.z.tuple([t.z.number(),t.z.number()]).optional(),devicePixelRatio:t.z.number().positive().optional(),language:t.z.string().max(35).optional()}).passthrough(),l={projectId:t.z.string().min(1).max(128),visitorId:t.z.string().optional(),sessionId:t.z.string().min(1).max(128),ts:a,sdkVersion:t.z.string().min(1).max(64),url:t.z.string().max(2048).optional(),sceneId:o.optional(),pageMeta:u.optional()};function p(e,n){return t.z.object({type:t.z.literal(e),...l,...n})}t.z.object(l);let c=t.z.enum(["left","right"]),h=t.z.enum(["y","z"]),b=t.z.object({handedness:c,upAxis:h.default("y"),unitScale:t.z.number().positive().default(1)}).passthrough(),g=t.z.object({engine:t.z.enum(["webgl2","webgpu","webgl","unknown"]).optional(),vendor:t.z.string().optional(),renderer:t.z.string().optional(),maxTextureSize:t.z.number().optional(),hardwareConcurrency:t.z.number().optional(),deviceMemoryGb:t.z.number().optional(),isMobile:t.z.boolean().optional(),browser:t.z.string().optional(),os:t.z.string().optional()}).passthrough(),d=t.z.enum(["arc-rotate","free","follow","static","other"]),v=t.z.object({description:t.z.string().max(256).optional(),cameraType:d.optional(),cameraName:t.z.string().max(128).optional(),meshCount:t.z.number().int().nonnegative().optional()}).passthrough(),_=t.z.union([t.z.string().max(1024),t.z.number(),t.z.boolean(),t.z.null()]),z=t.z.object({id:t.z.string().max(128).optional(),traits:m(_,64).optional()}).passthrough(),N=t.z.object({name:t.z.string(),version:t.z.string().optional(),coordinateSystem:b.optional()}).passthrough(),f=t.z.enum(["webgl","webgl2","webgpu","opengl","opengles","d3d11","d3d12","vulkan","metal","unknown"]),y=t.z.enum(["metal","d3d11","d3d12","vulkan","opengl","opengles","unknown"]),x=t.z.enum(["glsl","glsl-es","wgsl","hlsl","msl","spirv","unknown"]),w=t.z.object({api:f.optional(),backend:y.optional(),apiVersion:t.z.string().optional(),shadingLanguage:x.optional()}).passthrough(),k=p("session_start",{device:g.optional(),graphics:w.optional(),scene:v.optional(),user:z.optional(),connector:N.optional()}),S=p("session_end",{durationMs:t.z.number().nonnegative().optional(),reason:t.z.enum(["unload","hidden","manual","timeout"]).optional()}),T=p("frame_perf",{fps:t.z.number().nonnegative(),frameTimeMs:t.z.number().nonnegative().optional(),frameTimeP95Ms:t.z.number().nonnegative().optional(),frameTimeP99Ms:t.z.number().nonnegative().optional(),longFrames:t.z.number().int().nonnegative().optional(),drawCalls:t.z.number().nonnegative().optional(),dpr:t.z.number().positive().optional(),renderScale:t.z.number().positive().optional(),position:n.optional()}),E=p("camera_sample",{position:n,direction:n,target:n.optional(),fov:t.z.number().optional(),aspect:t.z.number().positive().optional(),near:t.z.number().positive().optional(),hitPoint:n.optional(),hitMesh:t.z.string().optional()}),j=p("node_transform",{nodeId:t.z.string().min(1).max(128),boneId:t.z.string().min(1).max(128).optional(),childPath:t.z.string().min(1).max(512).optional(),position:n,rotation:s,scale:n.optional()}),A=t.z.enum(["mouse","touch","stylus","pen","keyboard","gamepad","xr-controller","hand","gaze","transient","other"]),M=t.z.enum(["left","right","none"]),R=t.z.object({origin:n,direction:n}),P={source:A.optional(),handedness:M.optional(),sourceId:t.z.string().min(1).max(64).optional(),ray:R.optional()},I=p("pointer_move",{screen:i.optional(),hitPoint:n.optional(),hitMesh:t.z.string().optional(),...P}),L=p("pointer_click",{screen:i.optional(),hitPoint:n.optional(),hitMesh:t.z.string().optional(),uv:r.optional(),button:t.z.number().int().min(0).optional(),...P}),U={screen:i.optional(),hitPoint:n.optional(),hitMesh:t.z.string().optional(),button:t.z.number().int().min(0).optional(),...P},C=p("pointer_down",U),H=p("pointer_up",U),D=p("camera_gesture",{kind:t.z.enum(["orbit","pan","dolly","zoom","roll","fly","navigate"]),durationMs:t.z.number().nonnegative(),orbitDeg:t.z.number().nonnegative().optional(),rollDeg:t.z.number().nonnegative().optional(),zoomRatio:t.z.number().positive().optional(),panDist:t.z.number().nonnegative().optional(),...P}),O=t.z.enum(["hover","pick","click","drag","select","squeeze","grab","release","teleport"]),B=p("mesh_interaction",{mesh:t.z.string().min(1).max(256),kind:O,point:n.optional(),uv:r.optional(),...P}),K=t.z.tuple([t.z.number(),t.z.number(),t.z.number(),t.z.number(),t.z.number(),t.z.number()]),W=t.z.literal("aabb"),$=t.z.object({position:n,rotation:s,scale:n}),F=t.z.object({name:t.z.string().max(256),aabb:K,triangles:t.z.number().int().nonnegative().optional(),path:t.z.string().min(1).max(512).optional(),world:$.optional()});t.z.object({version:t.z.literal(1),sceneId:o,kind:W,bounds:K,upAxis:h,handedness:c.optional(),unitScale:t.z.number().positive(),meshes:t.z.array(F).max(1e4),meshCount:t.z.number().int().nonnegative(),contentHash:t.z.string().min(1),capturedAt:a,sdkVersion:t.z.string().min(1)});let V=p("mesh_visibility",{mesh:t.z.string().min(1).max(256),visibleMs:t.z.number().nonnegative(),centeredMs:t.z.number().nonnegative().optional(),maxScreenFraction:t.z.number().min(0).max(1).optional(),bounds:K.optional()}),G=p("hover_dwell",{mesh:t.z.string().min(1),dwellMs:t.z.number().nonnegative(),uv:r.optional(),...P}),Y=t.z.enum(["shader","pipeline","material","other"]),J=p("compile_stall",{durationMs:t.z.number().nonnegative(),phase:Y.optional()}),Z=p("resource_sample",{textureBytes:t.z.number().nonnegative().optional(),geometryBytes:t.z.number().nonnegative().optional(),triangles:t.z.number().int().nonnegative().optional(),vertices:t.z.number().int().nonnegative().optional(),jsHeapBytes:t.z.number().nonnegative().optional()}),q=p("capability_change",{kind:t.z.enum(["graphics-backend","quality","device-recovery","tracking","feature","other"]),from:t.z.string().max(64).optional(),to:t.z.string().max(64).optional(),reason:t.z.string().max(120).optional(),durationMs:t.z.number().nonnegative().optional(),...P}),Q=p("asset_load",{name:t.z.string().max(1024),bytes:t.z.number().nonnegative().optional(),loadMs:t.z.number().nonnegative(),ttffMs:t.z.number().nonnegative().optional(),ttiMs:t.z.number().nonnegative().optional()}),X=p("scene_change",{}),ee=p("viewport_resize",{width:t.z.number().positive(),height:t.z.number().positive(),dpr:t.z.number().positive().optional()}),et=p("visibility_change",{state:t.z.enum(["visible","hidden"])}),en=p("focus_change",{focused:t.z.boolean()}),es=p("context_lost",{reason:t.z.string().max(512).optional()}),er=p("context_restored",{}),ei=p("graphics_diagnostic",{severity:t.z.enum(["info","warning","error","fatal"]),category:t.z.enum(["context-loss","validation","out-of-memory","shader-compile","device-lost","fallback"]),backend:f.optional(),message:t.z.string().max(1024).optional(),code:t.z.string().max(64).optional(),count:t.z.number().int().positive().optional(),position:n.optional()}),ea=p("runtime_error",{kind:t.z.enum(["error","unhandledrejection"]),message:t.z.string().max(1024),source:t.z.string().max(1024).optional(),lineno:t.z.number().int().nonnegative().optional(),colno:t.z.number().int().nonnegative().optional(),stack:t.z.string().max(4096).optional(),position:n.optional()}),eo=p("input_action",{action:t.z.string().min(1).max(64),code:t.z.string().min(1).max(64).optional(),button:t.z.number().int().nonnegative().optional(),pressed:t.z.boolean().optional(),...P}),em=p("xr_boundary_proximity",{position:n,durationMs:t.z.number().nonnegative()}),eu=t.z.enum(["floor","wall","table","ceiling","unknown"]),el=p("ar_placement",{mesh:t.z.string().min(1).max(256),position:n,surface:eu.optional(),attempts:t.z.number().int().positive(),timeToPlaceMs:t.z.number().nonnegative(),scale:t.z.number().positive(),final:t.z.boolean()}),ep=t.z.union([t.z.string().max(1024),t.z.number(),t.z.boolean(),t.z.null()]),ec=p("custom",{name:t.z.string().min(1).max(128),props:m(ep,64).optional()}),eh=t.z.discriminatedUnion("type",[k,S,T,E,j,I,L,C,H,D,B,V,G,J,Z,q,Q,X,ee,et,en,es,er,ei,ea,eo,em,el,ec]),eb=t.z.array(eh);async function eg(e){let t=e.fetchImpl??fetch,n=`${e.endpoint}/api/v1/sessions/${encodeURIComponent(e.sessionId)}/events`,s=await t(n,{headers:{"x-api-key":e.apiKey}});if(!s.ok)throw Error(`replay fetch failed: ${s.status}`);let r=eb.safeParse(await s.json());if(!r.success)throw Error("replay fetch returned an invalid session payload");return r.data.sort((e,t)=>e.ts-t.ts)}async function*ed(e){let t=e.fetchImpl??fetch,n=`${e.endpoint}/api/v1/sessions/${encodeURIComponent(e.sessionId)}/events`,s=await t(`${n}?format=ndjson`,{headers:{"x-api-key":e.apiKey,accept:"application/x-ndjson"}});if(!s.ok)throw Error(`replay fetch failed: ${s.status}`);if(!(s.headers.get("content-type")??"").includes("application/x-ndjson")){let e=eb.safeParse(await s.json());if(!e.success)throw Error("replay fetch returned an invalid session payload");for(let t of e.data.sort((e,t)=>e.ts-t.ts))yield t;return}if(!s.body)throw Error("replay stream returned no body");let r=0,i=()=>e.onMalformedLine?.(++r),a=s.body.getReader(),o=new TextDecoder,m="",u=function*(e){let t,n=e.trim();if(0===n.length)return;try{t=JSON.parse(n)}catch{i();return}let s=eh.safeParse(t);s.success?yield s.data:i()};for(;;){let{done:e,value:t}=await a.read();if(e)break;let n=(m+=o.decode(t,{stream:!0})).indexOf("\n");for(;n>=0;){let e=m.slice(0,n);m=m.slice(n+1),yield*u(e),n=m.indexOf("\n")}}yield*u(m)}e.s(["fetchSessionEvents",0,eg,"fetchSessionEventsStream",0,ed],19761)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,66933,t=>{"use strict";var i=t.i(23422),e=t.i(65678),n=t.i(69194),s=t.i(68282);class l extends i.FlowGraphExecutionBlockWithOutSignal{constructor(t){super(t),this.config=t,this.inFlows=[],this._cachedActivationState=[],this.reset=this._registerSignalInput("reset"),this.completed=this._registerSignalOutput("completed"),this.remainingInputs=this.registerDataOutput("remainingInputs",e.RichTypeFlowGraphInteger,new n.FlowGraphInteger(this.config.inputSignalCount||0));for(let t=0;t<this.config.inputSignalCount;t++)this.inFlows.push(this._registerSignalInput(`in_${t}`));this._unregisterSignalInput("in")}_getCurrentActivationState(t){let i=this._cachedActivationState;if(i.length=0,t._hasExecutionVariable(this,"activationState")){let e=t._getExecutionVariable(this,"activationState",[]);for(let t=0;t<e.length;t++)i.push(e[t])}else for(let t=0;t<this.config.inputSignalCount;t++)i.push(!1);return i}_execute(t,i){let e=this._getCurrentActivationState(t);if(i===this.reset)for(let t=0;t<this.config.inputSignalCount;t++)e[t]=!1;else{let t=this.inFlows.indexOf(i);t>=0&&(e[t]=!0)}if(this.remainingInputs.setValue(new n.FlowGraphInteger(e.filter(t=>!t).length),t),t._setExecutionVariable(this,"activationState",e.slice()),e.includes(!1))i!==this.reset&&this.out._activateSignal(t);else{this.completed._activateSignal(t);for(let t=0;t<this.config.inputSignalCount;t++)e[t]=!1}}getClassName(){return"FlowGraphWaitAllBlock"}serialize(t){super.serialize(t),t.config.inputFlows=this.config.inputSignalCount}}let a=!1;t.s(["FlowGraphWaitAllBlock",0,l,"RegisterFlowGraphWaitAllBlock",0,function(){a||(a=!0,(0,s.RegisterClass)("FlowGraphWaitAllBlock",l))}])}]);
|