@uptimizr/dashboard 0.4.7 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/0ycr0gi6fn6bt.js +1 -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/{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/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/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/2qmfe0mqw150h.js +1 -0
- 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/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/{0thw099xk3_0p.js → 39v73timmzwny.js} +2 -2
- 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 +9 -9
- 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/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/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 → 4r0L0ZMJeBwOJCVDsvvZ4}/_buildManifest.js +0 -0
- /package/out/_next/static/{A1hxMz783bIWo0Q9qqV3L → 4r0L0ZMJeBwOJCVDsvvZ4}/_clientMiddlewareManifest.js +0 -0
- /package/out/_next/static/{A1hxMz783bIWo0Q9qqV3L → 4r0L0ZMJeBwOJCVDsvvZ4}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,11822,98651,22427,2262,e=>{"use strict";let t,i,r,s,n,a,o,h,l,c,u,d,f,p;var _,m=e.i(4112),g=e.i(91679),I=e.i(51509),y=e.i(72003),x=e.i(26747),T=e.i(92356);class M{constructor(e,t,i){this._cameraPosition=t,this._behavior=i,this.activeInput=!1,this.speed=1,this.zoomSpeed=1,this.panSpeed=1,this.rotationXSpeed=1,this.rotationYSpeed=1,this._zoomSpeedMultiplier=1,this._panSpeedMultiplier=1,this.zoomInertia=.9,this.panInertia=.9,this.rotationInertia=.9,this.zoomAccumulatedPixels=0,this.panAccumulatedPixels=new y.Vector3,this.rotationAccumulatedPixels=new y.Vector3,this.zoomDeltaCurrentFrame=0,this.panDeltaCurrentFrame=y.Vector3.Zero(),this.rotationDeltaCurrentFrame=y.Vector3.Zero(),this._zoomVelocity=0,this._panVelocity=new y.Vector3,this.referenceFrameRate=60,this._rotationVelocity=new y.Vector3,this._prevFrameTimeMs=0,this._scene=e}computeCurrentFrameDeltas(){let e=this._scene.getEngine().getDeltaTime(),t=this._getEffectiveDeltaMs(e);if(0===this._zoomVelocity&&0===this.zoomAccumulatedPixels&&0===this._panVelocity.x&&0===this._panVelocity.y&&0===this._panVelocity.z&&0===this.panAccumulatedPixels.x&&0===this.panAccumulatedPixels.y&&0===this.panAccumulatedPixels.z&&0===this._rotationVelocity.x&&0===this._rotationVelocity.y&&0===this._rotationVelocity.z&&0===this.rotationAccumulatedPixels.x&&0===this.rotationAccumulatedPixels.y&&0===this.rotationAccumulatedPixels.z&&!this.activeInput){this.panDeltaCurrentFrame.setAll(0),this.rotationDeltaCurrentFrame.setAll(0),this.zoomDeltaCurrentFrame=0,e>0&&(this._prevFrameTimeMs=e);return}this.panDeltaCurrentFrame.setAll(0),this.rotationDeltaCurrentFrame.setAll(0),this.zoomDeltaCurrentFrame=0,(this.panAccumulatedPixels.lengthSquared()>0||this.rotationAccumulatedPixels.lengthSquared()>0||0!==this.zoomAccumulatedPixels)&&this._behavior?.isInterpolating&&this._behavior.stopAllAnimations(),this._panVelocity.copyFromFloats(this._calculateCurrentVelocity(this._panVelocity.x,this.panAccumulatedPixels.x,this.panInertia),this._calculateCurrentVelocity(this._panVelocity.y,this.panAccumulatedPixels.y,this.panInertia),this._calculateCurrentVelocity(this._panVelocity.z,this.panAccumulatedPixels.z,this.panInertia)),this._panVelocity.scaleToRef(this.speed*this.panSpeed*this._panSpeedMultiplier*t,this.panDeltaCurrentFrame),this._rotationVelocity.copyFromFloats(this._calculateCurrentVelocity(this._rotationVelocity.x,this.rotationAccumulatedPixels.x,this.rotationInertia),this._calculateCurrentVelocity(this._rotationVelocity.y,this.rotationAccumulatedPixels.y,this.rotationInertia),this._calculateCurrentVelocity(this._rotationVelocity.z,this.rotationAccumulatedPixels.z,this.rotationInertia)),this.rotationDeltaCurrentFrame.copyFromFloats(this._rotationVelocity.x*this.speed*this.rotationXSpeed*t,this._rotationVelocity.y*this.speed*this.rotationYSpeed*t,0),this._zoomVelocity=this._calculateCurrentVelocity(this._zoomVelocity,this.zoomAccumulatedPixels,this.zoomInertia),this.zoomDeltaCurrentFrame=this._zoomVelocity*(this.speed*this.zoomSpeed*this._zoomSpeedMultiplier)*t,e>0&&(this._prevFrameTimeMs=e),this.zoomAccumulatedPixels=0,this.panAccumulatedPixels.setAll(0),this.rotationAccumulatedPixels.setAll(0),this.activeInput=!1}resetRotationVelocity(){this._rotationVelocity.setAll(0),this.rotationAccumulatedPixels.setAll(0)}resetPanVelocity(){this._panVelocity.setAll(0),this.panAccumulatedPixels.setAll(0)}resetZoomVelocity(){this._zoomVelocity=0,this.zoomAccumulatedPixels=0}get isInterpolating(){return!!this._behavior?.isInterpolating}getFrameIndependentDecay(e){let t=this._scene.getEngine().getDeltaTime();return Math.pow(e,this._getEffectiveDeltaMs(t)/(1e3/this.referenceFrameRate))}getFrameIndependentInputScale(e){let t=1-e;return t<=0?1:(1-this.getFrameIndependentDecay(e))/t}_getEffectiveDeltaMs(e){return e>0?e:this._prevFrameTimeMs>0?this._prevFrameTimeMs:1e3/this.referenceFrameRate}_calculateCurrentVelocity(e,t,i){let r=e,s=this._scene.getEngine().getDeltaTime(),n=this._getEffectiveDeltaMs(s);if(0===n)return r;let a=this.getFrameIndependentDecay(i);if(r*=a,0!==t||this.activeInput){let e=1-i;r+=t/n*(e>0?(1-a)/e:1)}else 1e-6>Math.abs(r)&&(r=0);return r}}e.s(["CameraMovement",0,M],98651);class S{constructor(e,t){this.inputMap=[],this.handlers=e,this._createDefaultEntries=t,this.resetInputMap()}resolveInteraction(e,t){for(let i of this.inputMap)if(i.source===e&&this._entryMatches(i,t))return i;return null}resetInputMap(){this.inputMap=this._createDefaultEntries?.()??[]}getEntry(e,t,i){let r=this.inputMap;for(let s=0;s<r.length;s++){let n=r[s];if(n.source===e&&n.interaction===t&&this._entryConditionsMatch(n,i))return n}}getEntries(e,t,i){let r=[],s=this.inputMap;for(let n=0;n<s.length;n++){let a=s[n];a.source===e&&a.interaction===t&&this._entryConditionsMatch(a,i)&&r.push(a)}return r}addEntry(e){let t=this._entrySpecificity(e),i=this.inputMap.length;for(let e=0;e<this.inputMap.length;e++)if(this._entrySpecificity(this.inputMap[e])<t){i=e;break}this.inputMap.splice(i,0,e)}setInteraction(e,t,i){let r=this.resolveInteraction(e,t);return r&&this._entryCoversAllConditionsOf(r,t)?r.interaction=i:this.addEntry({source:e,...t??{},interaction:i}),!0}_entryCoversAllConditionsOf(e,t){if(!t)return!0;for(let i of Object.keys(t)){let r=t[i];if(void 0!==r){if("modifiers"===i){let t=e.modifiers??{};for(let e of Object.keys(r))if(void 0!==r[e]&&void 0===t[e])return!1}else if(void 0===e[i])return!1}}return!0}setInteractions(e,t,i){let r=0,s=this.inputMap;for(let n=0;n<s.length;n++){let a=s[n];a.source===e&&this._entryMatches(a,t)&&(a.interaction=i,r++)}return r}_entryMatches(e,t){switch(e.source){case"pointer":if(void 0!==e.button&&e.button!==t?.button)return!1;return this._matchModifiers(e.modifiers,t?.modifiers);case"wheel":return this._matchModifiers(e.modifiers,t?.modifiers);case"touch":if(void 0!==e.touchCount&&e.touchCount!==t?.touchCount)return!1;return!0;case"keyboard":if(void 0!==e.key&&(Array.isArray(e.key)?-1===e.key.indexOf(t?.key??-1):e.key!==t?.key))return!1;return this._matchModifiers(e.modifiers,t?.modifiers)}}_entryConditionsMatch(e,t){if(!t)return!0;switch(e.source){case"pointer":if("button"in t&&e.button!==t.button)return!1;return!("modifiers"in t)||this._entryModifiersMatch(e.modifiers,t.modifiers);case"wheel":return!("modifiers"in t)||this._entryModifiersMatch(e.modifiers,t.modifiers);case"touch":return!("touchCount"in t)||e.touchCount===t.touchCount;case"keyboard":if("key"in t){if(void 0===e.key)return void 0===t.key;if(void 0===t.key||(Array.isArray(e.key)?-1===e.key.indexOf(t.key):e.key!==t.key))return!1}return!("modifiers"in t)||this._entryModifiersMatch(e.modifiers,t.modifiers)}}_entrySpecificity(e){let t=0;return"button"in e&&void 0!==e.button&&t++,"key"in e&&void 0!==e.key&&t++,"touchCount"in e&&void 0!==e.touchCount&&t++,"modifiers"in e&&e.modifiers&&t++,t}_matchModifiers(e,t){return!e||(void 0===e.ctrl||e.ctrl===(t?.ctrl??!1))&&(void 0===e.shift||e.shift===(t?.shift??!1))&&(void 0===e.alt||e.alt===(t?.alt??!1))}_entryModifiersMatch(e,t){return t?void 0===t.ctrl&&void 0===t.shift&&void 0===t.alt?!e||void 0===e.ctrl&&void 0===e.shift&&void 0===e.alt:(void 0===t.ctrl||e?.ctrl===t.ctrl)&&(void 0===t.shift||e?.shift===t.shift)&&(void 0===t.alt||e?.alt===t.alt):!e}}e.s(["InputMapper",0,S],22427);class v extends M{constructor(e,t,i){super(e,t,i),this.input=new S({translate:(e,t,i)=>{this.panAccumulatedPixels.x+=e,this.panAccumulatedPixels.y+=t,this.panAccumulatedPixels.z+=i},rotate:(e,t)=>{this.rotationAccumulatedPixels.x+=e,this.rotationAccumulatedPixels.y+=t}},()=>this._createDefaultInputMap())}_createDefaultInputMap(){return[{source:"pointer",interaction:"rotate"},{source:"keyboard",interaction:"translate"},{source:"keyboard",interaction:"rotate"},{source:"touch",interaction:"rotate"},{source:"touch",interaction:"translate"}]}}let b=y.Matrix.Zero(),D=y.Quaternion.Identity(),A=(n=I.Camera,a=[],o=[],h=[],l=[],c=[],u=[],d=[],f=[],_=class extends n{get inertia(){return this._targetInertia}set inertia(e){this._targetInertia=e,this.movement&&(this.movement.panInertia=e,this.movement.rotationInertia=e)}constructor(e,t,i,r=!0){super(e,t,i,r),this.cameraDirection=new y.Vector3(0,0,0),this.cameraRotation=new y.Vector2(0,0),this._targetInertia=.9,this.updateUpVectorFromRotation=(0,m.__runInitializers)(this,a,!1),this.rotation=((0,m.__runInitializers)(this,o),(0,m.__runInitializers)(this,h,void 0)),this.rotationQuaternion=(0,m.__runInitializers)(this,l),this.speed=(0,m.__runInitializers)(this,c,2),this.noRotationConstraint=((0,m.__runInitializers)(this,u),!1),this.invertRotation=!1,this.inverseRotationSpeed=.2,this._panningEpsilon=x.Epsilon,this._rotationEpsilon=x.Epsilon,this.lockedTarget=(0,m.__runInitializers)(this,d,null),this._currentTarget=((0,m.__runInitializers)(this,f),y.Vector3.Zero()),this._initialFocalDistance=1,this._viewMatrix=y.Matrix.Zero(),this._cameraTransformMatrix=y.Matrix.Zero(),this._cameraRotationMatrix=y.Matrix.Zero(),this._transformedReferencePoint=y.Vector3.Zero(),this._deferredPositionUpdate=new y.Vector3,this._deferredRotationQuaternionUpdate=new y.Quaternion,this._deferredRotationUpdate=new y.Vector3,this._deferredUpdated=!1,this._deferOnly=!1,this._cachedRotationZ=0,this._cachedQuaternionRotationZ=0,this._referencePoint=y.Vector3.Forward(this.getScene().useRightHandedSystem),this.rotation=new y.Vector3(0,this.getScene().useRightHandedSystem?Math.PI:0,0),this.movement=new v(this.getScene(),this.position),this.movement.panInertia=this.inertia,this.movement.rotationInertia=this.inertia}getFrontPosition(e){this.getWorldMatrix();let t=y.TmpVectors.Vector3[0],i=y.TmpVectors.Vector3[1];return i.set(0,0,this._scene.useRightHandedSystem?-1:1),this.getDirectionToRef(i,t),t.scaleInPlace(e),this.globalPosition.add(t)}_getLockedTargetPosition(){if(!this.lockedTarget)return null;if(this.lockedTarget.absolutePosition){let e=this.lockedTarget;e.computeWorldMatrix().getTranslationToRef(e.absolutePosition)}return this.lockedTarget.absolutePosition||this.lockedTarget}storeState(){return this._storedPosition=this.position.clone(),this._storedRotation=this.rotation.clone(),this.rotationQuaternion&&(this._storedRotationQuaternion=this.rotationQuaternion.clone()),super.storeState()}_restoreStateValues(){return!!super._restoreStateValues()&&(this.position=this._storedPosition.clone(),this.rotation=this._storedRotation.clone(),this.rotationQuaternion&&this._storedRotationQuaternion&&(this.rotationQuaternion=this._storedRotationQuaternion.clone()),this.cameraDirection.copyFromFloats(0,0,0),this.cameraRotation.copyFromFloats(0,0),!0)}_initCache(){super._initCache(),this._cache.lockedTarget=new y.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.rotation=new y.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.rotationQuaternion=new y.Quaternion(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE)}_updateCache(e){e||super._updateCache();let t=this._getLockedTargetPosition();t?this._cache.lockedTarget?this._cache.lockedTarget.copyFrom(t):this._cache.lockedTarget=t.clone():this._cache.lockedTarget=null,this._cache.rotation.copyFrom(this.rotation),this.rotationQuaternion&&this._cache.rotationQuaternion.copyFrom(this.rotationQuaternion)}_isSynchronizedViewMatrix(){if(!super._isSynchronizedViewMatrix())return!1;let e=this._getLockedTargetPosition();return(this._cache.lockedTarget?this._cache.lockedTarget.equals(e):!e)&&(this.rotationQuaternion?this.rotationQuaternion.equals(this._cache.rotationQuaternion):this._cache.rotation.equals(this.rotation))}_computeLocalCameraSpeed(){let e=this.getEngine();return this.speed*Math.sqrt(e.getDeltaTime()/(100*e.getFps()))}setTarget(e){this.upVector.normalize(),this._initialFocalDistance=e.subtract(this.position).length(),this.position.z===e.z&&(this.position.z+=x.Epsilon),this._referencePoint.normalize().scaleInPlace(this._initialFocalDistance),this.getScene().useRightHandedSystem?y.Matrix.LookAtRHToRef(this.position,e,y.Vector3.UpReadOnly,b):y.Matrix.LookAtLHToRef(this.position,e,y.Vector3.UpReadOnly,b),b.invert();let t=this.rotationQuaternion||D;y.Quaternion.FromRotationMatrixToRef(b,t),t.toEulerAnglesToRef(this.rotation),this.rotation.z=0}get target(){return this.getTarget()}set target(e){this.setTarget(e)}getTarget(){return this._currentTarget}_decideIfNeedsToMove(){return Math.abs(this.cameraDirection.x)>0||Math.abs(this.cameraDirection.y)>0||Math.abs(this.cameraDirection.z)>0}_updatePosition(){if(this.parent){this.parent.getWorldMatrix().invertToRef(y.TmpVectors.Matrix[0]),y.Vector3.TransformNormalToRef(this.cameraDirection,y.TmpVectors.Matrix[0],y.TmpVectors.Vector3[0]),this._deferredPositionUpdate.addInPlace(y.TmpVectors.Vector3[0]),this._deferOnly?this._deferredUpdated=!0:this.position.copyFrom(this._deferredPositionUpdate);return}this._deferredPositionUpdate.addInPlace(this.cameraDirection),this._deferOnly?this._deferredUpdated=!0:this.position.copyFrom(this._deferredPositionUpdate)}_checkInputs(){let e=this.movement,t=0!==this.cameraDirection.x||0!==this.cameraDirection.y||0!==this.cameraDirection.z;e.panAccumulatedPixels.addInPlace(this.cameraDirection),e.rotationAccumulatedPixels.x+=this.cameraRotation.x,e.rotationAccumulatedPixels.y+=this.cameraRotation.y,e.computeCurrentFrameDeltas(),this.cameraDirection.copyFrom(e.panDeltaCurrentFrame),this.cameraRotation.set(e.rotationDeltaCurrentFrame.x,e.rotationDeltaCurrentFrame.y);let i=this.speed*this._panningEpsilon;!t&&Math.abs(this.cameraDirection.x)<i&&Math.abs(this.cameraDirection.y)<i&&Math.abs(this.cameraDirection.z)<i&&(this.cameraDirection.setAll(0),e.resetPanVelocity());let r=this.invertRotation?-this.inverseRotationSpeed:1,s=this._decideIfNeedsToMove(),n=!!(this.cameraRotation.x||this.cameraRotation.y);this._deferredUpdated=!1,this._deferredRotationUpdate.copyFrom(this.rotation),this._deferredPositionUpdate.copyFrom(this.position),this.rotationQuaternion&&this._deferredRotationQuaternionUpdate.copyFrom(this.rotationQuaternion),s&&this._updatePosition(),n&&(this.rotationQuaternion&&this.rotationQuaternion.toEulerAnglesToRef(this._deferredRotationUpdate),this._deferredRotationUpdate.x+=this.cameraRotation.x*r,this._deferredRotationUpdate.y+=this.cameraRotation.y*r,!this.noRotationConstraint&&(this._deferredRotationUpdate.x>1.570796&&(this._deferredRotationUpdate.x=1.570796),this._deferredRotationUpdate.x<-1.570796&&(this._deferredRotationUpdate.x=-1.570796)),this._deferOnly?this._deferredUpdated=!0:this.rotation.copyFrom(this._deferredRotationUpdate),this.rotationQuaternion&&this._deferredRotationUpdate.lengthSquared()&&(y.Quaternion.RotationYawPitchRollToRef(this._deferredRotationUpdate.y,this._deferredRotationUpdate.x,this._deferredRotationUpdate.z,this._deferredRotationQuaternionUpdate),this._deferOnly?this._deferredUpdated=!0:this.rotationQuaternion.copyFrom(this._deferredRotationQuaternionUpdate))),this.cameraDirection.setAll(0),this.cameraRotation.set(0,0),super._checkInputs()}_updateCameraRotationMatrix(){this.rotationQuaternion?this.rotationQuaternion.toRotationMatrix(this._cameraRotationMatrix):y.Matrix.RotationYawPitchRollToRef(this.rotation.y,this.rotation.x,this.rotation.z,this._cameraRotationMatrix)}_rotateUpVectorWithCameraRotationMatrix(){return y.Vector3.TransformNormalToRef(y.Vector3.UpReadOnly,this._cameraRotationMatrix,this.upVector),this}_getViewMatrix(){return this.lockedTarget&&this.setTarget(this._getLockedTargetPosition()),this._updateCameraRotationMatrix(),this.rotationQuaternion&&this._cachedQuaternionRotationZ!=this.rotationQuaternion.z?(this._rotateUpVectorWithCameraRotationMatrix(),this._cachedQuaternionRotationZ=this.rotationQuaternion.z):this._cachedRotationZ!==this.rotation.z&&(this._rotateUpVectorWithCameraRotationMatrix(),this._cachedRotationZ=this.rotation.z),y.Vector3.TransformCoordinatesToRef(this._referencePoint,this._cameraRotationMatrix,this._transformedReferencePoint),this.position.addToRef(this._transformedReferencePoint,this._currentTarget),this.updateUpVectorFromRotation&&(this.rotationQuaternion?T.Axis.Y.rotateByQuaternionToRef(this.rotationQuaternion,this.upVector):(y.Quaternion.FromEulerVectorToRef(this.rotation,D),T.Axis.Y.rotateByQuaternionToRef(D,this.upVector))),this._computeViewMatrix(this.position,this._currentTarget,this.upVector),this._viewMatrix}_computeViewMatrix(e,t,i){if(this.getScene().useRightHandedSystem?y.Matrix.LookAtRHToRef(e,t,i,this._viewMatrix):y.Matrix.LookAtLHToRef(e,t,i,this._viewMatrix),this.parent){let e=this.parent.getWorldMatrix();this._viewMatrix.invert(),this._viewMatrix.multiplyToRef(e,this._viewMatrix),this._viewMatrix.invert(),this._markSyncedWithParent()}}createRigCamera(e,t){if(this.cameraRigMode!==I.Camera.RIG_MODE_NONE){let t=new _(e,this.position.clone(),this.getScene());return t.isRigCamera=!0,t.rigParent=this,this.cameraRigMode===I.Camera.RIG_MODE_VR&&(this.rotationQuaternion||(this.rotationQuaternion=new y.Quaternion),t._cameraRigParams={},t.rotationQuaternion=new y.Quaternion),t.mode=this.mode,t.orthoLeft=this.orthoLeft,t.orthoRight=this.orthoRight,t.orthoTop=this.orthoTop,t.orthoBottom=this.orthoBottom,t}return null}_updateRigCameras(){let e=this._rigCameras[0],t=this._rigCameras[1];switch(this.computeWorldMatrix(),this.cameraRigMode){case I.Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH:case I.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:case I.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:case I.Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER:case I.Camera.RIG_MODE_STEREOSCOPIC_INTERLACED:{let i=this.cameraRigMode===I.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED?1:-1,r=this.cameraRigMode===I.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED?-1:1;this._getRigCamPositionAndTarget(this._cameraRigParams.stereoHalfAngle*i,e),this._getRigCamPositionAndTarget(this._cameraRigParams.stereoHalfAngle*r,t);break}case I.Camera.RIG_MODE_VR:e.rotationQuaternion&&t.rotationQuaternion&&this.rotationQuaternion?(e.rotationQuaternion.copyFrom(this.rotationQuaternion),t.rotationQuaternion.copyFrom(this.rotationQuaternion)):(e.rotation.copyFrom(this.rotation),t.rotation.copyFrom(this.rotation)),e.position.copyFrom(this.position),t.position.copyFrom(this.position)}super._updateRigCameras()}_getRigCamPositionAndTarget(e,t){this.getTarget().subtractToRef(this.position,_._TargetFocalPoint),_._TargetFocalPoint.normalize().scaleInPlace(this._initialFocalDistance);let i=_._TargetFocalPoint.addInPlace(this.position);y.Matrix.TranslationToRef(-i.x,-i.y,-i.z,_._TargetTransformMatrix),_._TargetTransformMatrix.multiplyToRef(y.Matrix.RotationAxis(t.upVector,e),_._RigCamTransformMatrix),y.Matrix.TranslationToRef(i.x,i.y,i.z,_._TargetTransformMatrix),_._RigCamTransformMatrix.multiplyToRef(_._TargetTransformMatrix,_._RigCamTransformMatrix),y.Vector3.TransformCoordinatesToRef(this.position,_._RigCamTransformMatrix,t.position),t.setTarget(i)}getClassName(){return"TargetCamera"}},p="function"==typeof Symbol&&Symbol.metadata?Object.create(n[Symbol.metadata]??null):void 0,t=[(0,g.serialize)()],i=[(0,g.serializeAsVector3)()],r=[(0,g.serialize)()],s=[(0,g.serializeAsMeshReference)("lockedTargetId")],(0,m.__esDecorate)(null,null,t,{kind:"field",name:"updateUpVectorFromRotation",static:!1,private:!1,access:{has:e=>"updateUpVectorFromRotation"in e,get:e=>e.updateUpVectorFromRotation,set:(e,t)=>{e.updateUpVectorFromRotation=t}},metadata:p},a,o),(0,m.__esDecorate)(null,null,i,{kind:"field",name:"rotation",static:!1,private:!1,access:{has:e=>"rotation"in e,get:e=>e.rotation,set:(e,t)=>{e.rotation=t}},metadata:p},h,l),(0,m.__esDecorate)(null,null,r,{kind:"field",name:"speed",static:!1,private:!1,access:{has:e=>"speed"in e,get:e=>e.speed,set:(e,t)=>{e.speed=t}},metadata:p},c,u),(0,m.__esDecorate)(null,null,s,{kind:"field",name:"lockedTarget",static:!1,private:!1,access:{has:e=>"lockedTarget"in e,get:e=>e.lockedTarget,set:(e,t)=>{e.lockedTarget=t}},metadata:p},d,f),p&&Object.defineProperty(_,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:p}),_._RigCamTransformMatrix=new y.Matrix,_._TargetTransformMatrix=new y.Matrix,_._TargetFocalPoint=new y.Vector3,_);e.s(["TargetCamera",0,A],11822);var C=e.i(85789),P=e.i(22832),V={};e.s(["CameraInputTypes",0,V,"CameraInputsManager",0,class{constructor(e){this.attachedToElement=!1,this.attached={},this.camera=e,this.checkInputs=()=>{}}add(e){let t=e.getSimpleName();this.attached[t]?C.Logger.Warn("camera input of type "+t+" already exists on camera"):(this.attached[t]=e,e.camera=this.camera,e.checkInputs&&(this.checkInputs=this._addCheckInputs(e.checkInputs.bind(e))),this.attachedToElement&&e.attachControl(this.noPreventDefault))}remove(e){for(let t in this.attached){let i=this.attached[t];if(i===e){i.detachControl(),i.camera=null,delete this.attached[t],this.rebuildInputCheck();return}}}removeByType(e){for(let t in this.attached){let i=this.attached[t];i.getClassName()===e&&(i.detachControl(),i.camera=null,delete this.attached[t],this.rebuildInputCheck())}}_addCheckInputs(e){let t=this.checkInputs;return()=>{t(),e()}}attachInput(e){this.attachedToElement&&e.attachControl(this.noPreventDefault)}attachElement(e=!1){if(!this.attachedToElement)for(let t in e=!I.Camera.ForceAttachControlToAlwaysPreventDefault&&e,this.attachedToElement=!0,this.noPreventDefault=e,this.attached)this.attached[t].attachControl(e)}detachElement(e=!1){for(let t in this.attached)this.attached[t].detachControl(),e&&(this.attached[t].camera=null);this.attachedToElement=!1}rebuildInputCheck(){for(let e in this.checkInputs=()=>{},this.attached){let t=this.attached[e];t.checkInputs&&(this.checkInputs=this._addCheckInputs(t.checkInputs.bind(t)))}}clear(){this.attachedToElement&&this.detachElement(!0),this.attached={},this.attachedToElement=!1,this.checkInputs=()=>{}}serialize(e){let t={};for(let e in this.attached){let i=this.attached[e],r=P.SerializationHelper.Serialize(i);t[i.getClassName()]=r}e.inputsmgr=t}parse(e){let t=e.inputsmgr;if(t)for(let e in this.clear(),t){let i=V[e];if(i){let r=t[e],s=P.SerializationHelper.Parse(()=>new i,r,null);this.add(s)}}else for(let t in this.attached){let i=V[this.attached[t].getClassName()];if(i){let r=P.SerializationHelper.Parse(()=>new i,e,null);this.remove(this.attached[t]),this.add(r)}}}}],2262)},57494,e=>{"use strict";var t=e.i(55080),i=e.i(85789),r=e.i(33169),s=e.i(6939),n=e.i(2596),a=e.i(99429);let o=!1;e.s(["RegisterAbstractEngineCubeTexture",0,function(){o||(o=!0,a.AbstractEngine.prototype._partialLoadFile=function(e,t,i,r,s=null){this._loadFile(e,e=>{i[t]=e,i._internalCount++,6===i._internalCount&&r(i)},void 0,void 0,!0,(e,t)=>{s&&e&&s(e.status+" "+e.statusText,t)})},a.AbstractEngine.prototype._cascadeLoadFiles=function(e,t,i,r=null){let s=[];s._internalCount=0;for(let e=0;e<6;e++)this._partialLoadFile(i[e],e,s,t,r)},a.AbstractEngine.prototype._cascadeLoadImgs=function(e,t,i,r,s=null,n){let a=[];a._internalCount=0;for(let o=0;o<6;o++)this._partialLoadImg(r[o],o,a,e,t,i,s,n)},a.AbstractEngine.prototype._partialLoadImg=function(e,t,i,n,a,o,h=null,l){let c=(0,s.RandomGUID)();(0,r.LoadImage)(e,e=>{i[t]=e,i._internalCount++,n&&n.removePendingData(c),6===i._internalCount&&o&&o(a,i)},(e,t)=>{n&&n.removePendingData(c),h&&h(e,t)},n?n.offlineProvider:null,l),n&&n.addPendingData(c)},a.AbstractEngine.prototype.createCubeTextureBase=function(e,r,s,a,o=null,h=null,l,c=null,u=!1,d=0,f=0,p=null,_=null,m=null,g=!1,I=null){let y,x,T=p||new t.InternalTexture(this,7);T.isCube=!0,T.url=e,T.generateMipMaps=!a,T._lodGenerationScale=d,T._lodGenerationOffset=f,T._useSRGBBuffer=!!g&&this._caps.supportSRGBBuffers&&(this.version>1||this.isWebGPU||!!a),T!==p&&(T.label=e.substring(0,60)),this._doNotHandleContextLost||(T._extension=c,T._files=s,T._buffer=I);let M=e;this._transformTextureUrl&&!p&&(e=this._transformTextureUrl(e));let S=c??((x=(y=e.split("?")[0]).lastIndexOf("."))>-1?y.substring(x).toLowerCase():""),v=(0,n._GetCompatibleTextureLoader)(S),b=(e,t)=>{T.dispose(),h?h(e,t):e&&i.Logger.Warn(e)},D=(t,n)=>{e===M?t&&b(t.status+" "+t.statusText,n):(i.Logger.Warn(`Failed to load ${e}, falling back to the ${M}`),this.createCubeTextureBase(M,r,s,!!a,o,b,l,c,u,d,f,T,_,m,g,I))};if(v)v.then(t=>{let i=e=>{_&&_(T,e),t.loadCubeData(e,T,u,o,(e,t)=>{b(e,t)})};I?i(I):s&&6===s.length?t.supportCascades?this._cascadeLoadFiles(r,e=>i(e.map(e=>new Uint8Array(e))),s,b):b("Textures type does not support cascades."):this._loadFile(e,e=>i(new Uint8Array(e)),void 0,r?r.offlineProvider||null:void 0,!0,D)});else{if(!s||0===s.length)throw Error("Cannot load cubemap because files were not defined, or the correct loader was not found.");this._cascadeLoadImgs(r,T,(e,t)=>{m&&m(e,t)},s,b)}return this._internalTexturesCache.push(T),T})}],57494)},42192,e=>{"use strict";var t=e.i(99429);let i=!1;e.s(["RegisterAbstractEngineTexture",0,function(){i||(i=!0,t.AbstractEngine.prototype.createDepthStencilTexture=function(e,t,i){if(!t.isCube)return this._createDepthStencilTexture(e,t,i);{let i=e.width||e;return this._createDepthStencilCubeTexture(i,t)}})}])},59012,e=>{"use strict";var t=e.i(99493);class i{constructor(e){this.value=this._toInt(e)}_toInt(e){return 0|e}add(e){return new i(this.value+e.value)}subtract(e){return new i(this.value-e.value)}multiply(e){return new i(Math.imul(this.value,e.value))}divide(e){return new i(this.value/e.value)}getClassName(){return i.ClassName}equals(e){return this.value===e.value}static FromValue(e){return new i(e)}toString(){return this.value.toString()}}i.ClassName="FlowGraphInteger";let r=!1;e.s(["FlowGraphInteger",0,i,"RegisterFlowGraphInteger",0,function(){r||(r=!0,(0,t.RegisterClass)("FlowGraphInteger",i))}])},40871,e=>{"use strict";var t,i;(i=t||(t={})).Animation="Animation",i.AnimationGroup="AnimationGroup",i.Mesh="Mesh",i.Material="Material",i.Camera="Camera",i.Light="Light",e.s(["GetFlowGraphAssetWithType",0,function(e,t,i,r){switch(t){case"Animation":return r?e.animations.find(e=>e.uniqueId===i)??null:e.animations[i]??null;case"AnimationGroup":return r?e.animationGroups.find(e=>e.uniqueId===i)??null:e.animationGroups[i]??null;case"Mesh":return r?e.meshes.find(e=>e.uniqueId===i)??null:e.meshes[i]??null;case"Material":return r?e.materials.find(e=>e.uniqueId===i)??null:e.materials[i]??null;case"Camera":return r?e.cameras.find(e=>e.uniqueId===i)??null:e.cameras[i]??null;case"Light":return r?e.lights.find(e=>e.uniqueId===i)??null:e.lights[i]??null;default:return null}}])},60219,e=>{"use strict";var t=e.i(20552);class i extends t.FlowGraphExecutionBlockWithOutSignal{constructor(e,t){if(super(e),this._eventsSignalOutputs={},this.done=this._registerSignalOutput("done"),t)for(const e of t)this._eventsSignalOutputs[e]=this._registerSignalOutput(e+"Event")}_executeOnTick(e){}_startPendingTasks(e){e._getExecutionVariable(this,"_initialized",!1)&&(this._cancelPendingTasks(e),this._resetAfterCanceled(e)),this._preparePendingTasks(e),e._addPendingBlock(this),this.out._activateSignal(e),e._setExecutionVariable(this,"_initialized",!0)}_resetAfterCanceled(e){e._deleteExecutionVariable(this,"_initialized"),e._removePendingBlock(this)}}e.s(["FlowGraphAsyncExecutionBlock",0,i])},37096,e=>{"use strict";var t=e.i(6939),i=e.i(43328),r=e.i(42704),s=e.i(50137);class n extends i.FlowGraphConnection{constructor(e,t,i,s,n=s.defaultValue,a=!1){super(e,t,i),this.richType=s,this._defaultValue=n,this._optional=a,this._isDisabled=!1,this._lastValue=null,this.dataTransformer=null,this.onValueChangedObservable=new r.Observable}get optional(){return this._optional}get isDisabled(){return this._isDisabled}set isDisabled(e){this._isDisabled!==e&&(this._isDisabled=e,this._isDisabled&&this.disconnectFromAll())}_isSingularConnection(){return 0===this.connectionType}setValue(e,t){t._getConnectionValue(this)!==e&&(t._setConnectionValue(this,e),this.onValueChangedObservable.notifyObservers(e))}resetToDefaultValue(e){e._setConnectionValue(this,this._defaultValue)}_reresolveDefaultValueForScene(e){let t,i=this._defaultValue;if(!i||"object"!=typeof i)return;if("function"==typeof i.getClassName&&"function"==typeof i.getScene){if(i.getScene()===e)return;t={id:i.id,name:i.name,className:i.getClassName(),uniqueId:i.uniqueId}}else{if("string"!=typeof i.className||!i.id&&!i.name||void 0!==i.value)return;t=i}let r=(0,s.GetSceneNodeFromSerializedReference)(t,e);r&&(this._defaultValue=r)}connectTo(e){this._isDisabled||super.connectTo(e)}_getValueOrDefault(e){let t=e._getConnectionValue(this)??this._defaultValue;return this.dataTransformer?this.dataTransformer(t):t}getValue(e){if(1===this.connectionType){e._notifyExecuteNode(this._ownerBlock),this._ownerBlock._updateOutputs(e);let t=this._getValueOrDefault(e);return this._lastValue=t,this.richType.typeTransformer?this.richType.typeTransformer(t):t}let t=this.isConnected()?this._connectedPoint[0].getValue(e):this._getValueOrDefault(e);return this._lastValue=t,this.richType.typeTransformer?this.richType.typeTransformer(t):t}_getLastValue(){return this._lastValue}getClassName(){return"FlowGraphDataConnection"}serialize(e={}){super.serialize(e),e.richType={},this.richType.serialize(e.richType),e.optional=this._optional,(0,s.defaultValueSerializationFunction)("defaultValue",this._defaultValue,e)}}e.s(["FlowGraphBlock",0,class{constructor(e){this.config=e,this.uniqueId=(0,t.RandomGUID)(),this.name=this.config?.name??this.getClassName(),this.dataInputs=[],this.dataOutputs=[]}_updateOutputs(e){}registerDataInput(e,t,i){let r=new n(e,0,this,t,i);return this.dataInputs.push(r),r}registerDataOutput(e,t,i){let r=new n(e,1,this,t,i);return this.dataOutputs.push(r),r}getDataInput(e){return this.dataInputs.find(t=>t.name===e)}getDataOutput(e){return this.dataOutputs.find(t=>t.name===e)}serialize(e={},t=s.defaultValueSerializationFunction){if(e.uniqueId=this.uniqueId,e.config={},this.config){let i=this.config;for(let r of Object.keys(i))t(r,i[r],e.config)}for(let t of(e.dataInputs=[],e.dataOutputs=[],e.className=this.getClassName(),this.dataInputs)){let i={};t.serialize(i),e.dataInputs.push(i)}for(let t of this.dataOutputs){let i={};t.serialize(i),e.dataOutputs.push(i)}}deserialize(e){}_log(e,t,i){e.logger?.addLogItem({action:t,payload:i,className:this.getClassName(),uniqueId:this.uniqueId})}getClassName(){return"FlowGraphBlock"}}],37096)},43328,e=>{"use strict";var t,i,r=e.i(6939);(t=i||(i={}))[t.Input=0]="Input",t[t.Output=1]="Output",e.s(["FlowGraphConnection",0,class{constructor(e,t,i){this._ownerBlock=i,this._connectedPoint=[],this.uniqueId=(0,r.RandomGUID)(),this.connectedPointIds=[],this.name=e,this._connectionType=t}get connectionType(){return this._connectionType}_isSingularConnection(){return!0}isConnected(){return this._connectedPoint.length>0}connectTo(e){if(this._connectionType===e._connectionType)throw Error(`Cannot connect two points of type ${this.connectionType}`);if(this._isSingularConnection()&&this._connectedPoint.length>0||e._isSingularConnection()&&e._connectedPoint.length>0)throw Error("Max number of connections for point reached");this._connectedPoint.push(e),e._connectedPoint.push(this)}disconnectFrom(e,t=!0){let i=this._connectedPoint.indexOf(e),r=e._connectedPoint.indexOf(this);-1!==i&&-1!==r&&(t&&this._connectedPoint.splice(i,1),e._connectedPoint.splice(r,1))}disconnectFromAll(){for(let e of this._connectedPoint)this.disconnectFrom(e,!1);this._connectedPoint.length=0}dispose(){for(let e of this._connectedPoint)this.disconnectFrom(e)}serialize(e={}){for(let t of(e.uniqueId=this.uniqueId,e.name=this.name,e._connectionType=this._connectionType,e.connectedPointIds=[],e.className=this.getClassName(),this._connectedPoint))e.connectedPointIds.push(t.uniqueId)}getClassName(){return"FGConnection"}deserialize(e){this.uniqueId=e.uniqueId,this.name=e.name,this._connectionType=e._connectionType,this.connectedPointIds=e.connectedPointIds}}])},12752,e=>{"use strict";let t="activeDelayIndices";e.s(["IsDelayActive",0,function(e,i){return e._getGlobalContextVariable(t,null)?.has(i)??!1},"MarkDelayActive",0,function(e,i){let r;(!(r=e._getGlobalContextVariable(t,null))&&(r=new Set,e._setGlobalContextVariable(t,r)),r).add(i)},"MarkDelayInactive",0,function(e,i){e._getGlobalContextVariable(t,null)?.delete(i)}])},57011,e=>{"use strict";var t=e.i(60219);class i extends t.FlowGraphAsyncExecutionBlock{constructor(e){super(e),this.initPriority=0,this.type="NoTrigger",this._unregisterSignalInput("in")}deserialize(e){let t={...e};t.signalInputs=(e.signalInputs??[]).filter(e=>"in"!==e.name),super.deserialize(t)}_execute(e){e._notifyExecuteNode(this),this.done._activateSignal(e),this.out._activateSignal(e)}_startPendingTasks(e){e._getExecutionVariable(this,"_initialized",!1)&&(this._cancelPendingTasks(e),this._resetAfterCanceled(e)),this._preparePendingTasks(e),e._addPendingBlock(this),e._setExecutionVariable(this,"_initialized",!0)}}e.s(["FlowGraphEventBlock",0,i])},95754,e=>{"use strict";var t=e.i(37096),i=e.i(43328);class r extends i.FlowGraphConnection{constructor(){super(...arguments),this.priority=0,this._lastActivationTime=-1}_isSingularConnection(){return!1}connectTo(e){super.connectTo(e),this._connectedPoint.sort((e,t)=>t.priority-e.priority)}_activateSignal(e){if(this._lastActivationTime=performance.now(),e.logger?.addLogItem({action:"ActivateSignal",className:this._ownerBlock.getClassName(),uniqueId:this._ownerBlock.uniqueId,payload:{connectionType:this.connectionType,name:this.name}}),0===this.connectionType){if(e._shouldBreak(this._ownerBlock,this))return;e._increaseExecutionId(),e._notifyExecuteNode(this._ownerBlock);let t=performance.now();this._ownerBlock._execute(e,this),this._ownerBlock._lastExecutionTime=performance.now()-t}else for(let t of this._connectedPoint)t._activateSignal(e)}}class s extends t.FlowGraphBlock{constructor(e){super(e),this.priority=0,this._lastExecutionTime=-1,this.signalInputs=[],this.signalOutputs=[],this.in=this._registerSignalInput("in"),this.error=this._registerSignalOutput("error")}_registerSignalInput(e){let t=new r(e,0,this);return this.signalInputs.push(t),t}_registerSignalOutput(e){let t=new r(e,1,this);return this.signalOutputs.push(t),t}_unregisterSignalInput(e){let t=this.signalInputs.findIndex(t=>t.name===e);-1!==t&&(this.signalInputs[t].dispose(),this.signalInputs.splice(t,1))}_unregisterSignalOutput(e){let t=this.signalOutputs.findIndex(t=>t.name===e);-1!==t&&(this.signalOutputs[t].dispose(),this.signalOutputs.splice(t,1))}_reportError(e,t){this.error.payload="string"==typeof t?Error(t):t,this.error._activateSignal(e)}getSignalInput(e){return this.signalInputs.find(t=>t.name===e)}getSignalOutput(e){return this.signalOutputs.find(t=>t.name===e)}serialize(e={}){for(let t of(super.serialize(e),e.signalInputs=[],e.signalOutputs=[],this.signalInputs)){let i={};t.serialize(i),e.signalInputs.push(i)}for(let t of this.signalOutputs){let i={};t.serialize(i),e.signalOutputs.push(i)}}deserialize(e){for(let t=0;t<e.signalInputs.length;t++){let i=this.getSignalInput(e.signalInputs[t].name);if(i)i.deserialize(e.signalInputs[t]);else throw Error("Could not find signal input with name "+e.signalInputs[t].name+" in block "+e.className)}for(let t=0;t<e.signalOutputs.length;t++){let i=this.getSignalOutput(e.signalOutputs[t].name);if(i)i.deserialize(e.signalOutputs[t]);else throw Error("Could not find signal output with name "+e.signalOutputs[t].name+" in block "+e.className)}}getClassName(){return"FlowGraphExecutionBlock"}}e.s(["FlowGraphExecutionBlock",0,s],95754)},20552,e=>{"use strict";var t=e.i(95754);class i extends t.FlowGraphExecutionBlock{constructor(e){super(e),this.out=this._registerSignalOutput("out")}}e.s(["FlowGraphExecutionBlockWithOutSignal",0,i])},13870,e=>{"use strict";(0,e.i(97009).RegisterFlowGraphRichTypes)(),e.s([])},97009,47487,e=>{"use strict";var t,i,r=e.i(72003),s=e.i(64073),n=e.i(59012);class a{constructor(e=[1,0,0,1]){this._m=e}get m(){return this._m}transformVector(e){return this.transformVectorToRef(e,new r.Vector2)}transformVectorToRef(e,t){return t.x=e.x*this._m[0]+e.y*this._m[2],t.y=e.x*this._m[1]+e.y*this._m[3],t}asArray(){return this.toArray()}toArray(e=[]){for(let t=0;t<4;t++)e[t]=this._m[t];return e}fromArray(e){for(let t=0;t<4;t++)this._m[t]=e[t];return this}multiplyToRef(e,t){let i=e._m,r=this._m,s=t._m;return s[0]=r[0]*i[0]+r[1]*i[2],s[1]=r[0]*i[1]+r[1]*i[3],s[2]=r[2]*i[0]+r[3]*i[2],s[3]=r[2]*i[1]+r[3]*i[3],t}multiply(e){return this.multiplyToRef(e,new a)}divideToRef(e,t){let i=this._m,r=e._m,s=t._m;return s[0]=i[0]/r[0],s[1]=i[1]/r[1],s[2]=i[2]/r[2],s[3]=i[3]/r[3],t}divide(e){return this.divideToRef(e,new a)}addToRef(e,t){let i=this._m,r=e.m,s=t.m;return s[0]=i[0]+r[0],s[1]=i[1]+r[1],s[2]=i[2]+r[2],s[3]=i[3]+r[3],t}add(e){return this.addToRef(e,new a)}subtractToRef(e,t){let i=this._m,r=e.m,s=t.m;return s[0]=i[0]-r[0],s[1]=i[1]-r[1],s[2]=i[2]-r[2],s[3]=i[3]-r[3],t}subtract(e){return this.subtractToRef(e,new a)}transpose(){let e=this._m;return new a([e[0],e[2],e[1],e[3]])}determinant(){let e=this._m;return e[0]*e[3]-e[1]*e[2]}inverse(){let e=this.determinant();if(0===e)throw Error("Matrix is not invertible");let t=this._m,i=1/e;return new a([t[3]*i,-t[1]*i,-t[2]*i,t[0]*i])}equals(e,t=0){let i=this._m,r=e.m;return 0===t?i[0]===r[0]&&i[1]===r[1]&&i[2]===r[2]&&i[3]===r[3]:Math.abs(i[0]-r[0])<t&&Math.abs(i[1]-r[1])<t&&Math.abs(i[2]-r[2])<t&&Math.abs(i[3]-r[3])<t}getClassName(){return"FlowGraphMatrix2D"}toString(){return`FlowGraphMatrix2D(${this._m.join(", ")})`}}class o{constructor(e=[1,0,0,0,1,0,0,0,1]){this._m=e}get m(){return this._m}transformVector(e){return this.transformVectorToRef(e,new r.Vector3)}transformVectorToRef(e,t){let i=this._m;return t.x=e.x*i[0]+e.y*i[3]+e.z*i[6],t.y=e.x*i[1]+e.y*i[4]+e.z*i[7],t.z=e.x*i[2]+e.y*i[5]+e.z*i[8],t}multiplyToRef(e,t){let i=e._m,r=this._m,s=t.m;return s[0]=r[0]*i[0]+r[1]*i[3]+r[2]*i[6],s[1]=r[0]*i[1]+r[1]*i[4]+r[2]*i[7],s[2]=r[0]*i[2]+r[1]*i[5]+r[2]*i[8],s[3]=r[3]*i[0]+r[4]*i[3]+r[5]*i[6],s[4]=r[3]*i[1]+r[4]*i[4]+r[5]*i[7],s[5]=r[3]*i[2]+r[4]*i[5]+r[5]*i[8],s[6]=r[6]*i[0]+r[7]*i[3]+r[8]*i[6],s[7]=r[6]*i[1]+r[7]*i[4]+r[8]*i[7],s[8]=r[6]*i[2]+r[7]*i[5]+r[8]*i[8],t}multiply(e){return this.multiplyToRef(e,new o)}divideToRef(e,t){let i=this._m,r=e.m,s=t.m;return s[0]=i[0]/r[0],s[1]=i[1]/r[1],s[2]=i[2]/r[2],s[3]=i[3]/r[3],s[4]=i[4]/r[4],s[5]=i[5]/r[5],s[6]=i[6]/r[6],s[7]=i[7]/r[7],s[8]=i[8]/r[8],t}divide(e){return this.divideToRef(e,new o)}addToRef(e,t){let i=this._m,r=e.m,s=t.m;return s[0]=i[0]+r[0],s[1]=i[1]+r[1],s[2]=i[2]+r[2],s[3]=i[3]+r[3],s[4]=i[4]+r[4],s[5]=i[5]+r[5],s[6]=i[6]+r[6],s[7]=i[7]+r[7],s[8]=i[8]+r[8],t}add(e){return this.addToRef(e,new o)}subtractToRef(e,t){let i=this._m,r=e.m,s=t.m;return s[0]=i[0]-r[0],s[1]=i[1]-r[1],s[2]=i[2]-r[2],s[3]=i[3]-r[3],s[4]=i[4]-r[4],s[5]=i[5]-r[5],s[6]=i[6]-r[6],s[7]=i[7]-r[7],s[8]=i[8]-r[8],t}subtract(e){return this.subtractToRef(e,new o)}toArray(e=[]){for(let t=0;t<9;t++)e[t]=this._m[t];return e}asArray(){return this.toArray()}fromArray(e){for(let t=0;t<9;t++)this._m[t]=e[t];return this}transpose(){let e=this._m;return new o([e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8]])}determinant(){let e=this._m;return e[0]*(e[4]*e[8]-e[5]*e[7])-e[1]*(e[3]*e[8]-e[5]*e[6])+e[2]*(e[3]*e[7]-e[4]*e[6])}inverse(){let e=this.determinant();if(0===e)throw Error("Matrix is not invertible");let t=this._m,i=1/e;return new o([(t[4]*t[8]-t[5]*t[7])*i,(t[2]*t[7]-t[1]*t[8])*i,(t[1]*t[5]-t[2]*t[4])*i,(t[5]*t[6]-t[3]*t[8])*i,(t[0]*t[8]-t[2]*t[6])*i,(t[2]*t[3]-t[0]*t[5])*i,(t[3]*t[7]-t[4]*t[6])*i,(t[1]*t[6]-t[0]*t[7])*i,(t[0]*t[4]-t[1]*t[3])*i])}equals(e,t=0){let i=this._m,r=e.m;return 0===t?i[0]===r[0]&&i[1]===r[1]&&i[2]===r[2]&&i[3]===r[3]&&i[4]===r[4]&&i[5]===r[5]&&i[6]===r[6]&&i[7]===r[7]&&i[8]===r[8]:Math.abs(i[0]-r[0])<t&&Math.abs(i[1]-r[1])<t&&Math.abs(i[2]-r[2])<t&&Math.abs(i[3]-r[3])<t&&Math.abs(i[4]-r[4])<t&&Math.abs(i[5]-r[5])<t&&Math.abs(i[6]-r[6])<t&&Math.abs(i[7]-r[7])<t&&Math.abs(i[8]-r[8])<t}getClassName(){return"FlowGraphMatrix3D"}toString(){return`FlowGraphMatrix3D(${this._m.join(", ")})`}}e.s(["FlowGraphMatrix2D",0,a,"FlowGraphMatrix3D",0,o],47487),(t=i||(i={})).Any="any",t.String="string",t.Number="number",t.Boolean="boolean",t.Object="object",t.Integer="FlowGraphInteger",t.Vector2="Vector2",t.Vector3="Vector3",t.Vector4="Vector4",t.Quaternion="Quaternion",t.Matrix="Matrix",t.Matrix2D="Matrix2D",t.Matrix3D="Matrix3D",t.Color3="Color3",t.Color4="Color4";class h{constructor(e,t,i=-1){this.typeName=e,this.defaultValue=t,this.animationType=i}serialize(e){e.typeName=this.typeName,e.defaultValue=this.defaultValue}}let l=new h("any",void 0),c=new h("string",""),u=new h("number",0,0),d=new h("boolean",!1),f=new h("Vector2",r.Vector2.Zero(),5),p=new h("Vector3",r.Vector3.Zero(),1),_=new h("Vector4",r.Vector4.Zero()),m=new h("Matrix",r.Matrix.Identity(),3),g=new h("Matrix2D",new a),I=new h("Matrix3D",new o),y=new h("Color3",s.Color3.Black(),4),x=new h("Color4",new s.Color4(0,0,0,0),7),T=new h("Quaternion",r.Quaternion.Identity(),2),M=new h("FlowGraphInteger",new n.FlowGraphInteger(0),0),S=!1;e.s(["RegisterFlowGraphRichTypes",0,function(){S||(S=!0,T.typeTransformer=e=>{if(e.getClassName){if("Vector4"===e.getClassName())return r.Quaternion.FromArray(e.asArray());else if("Vector3"===e.getClassName())return r.Quaternion.FromEulerVector(e);else if("Matrix"===e.getClassName())return r.Quaternion.FromRotationMatrix(e)}return e})},"RichTypeAny",0,l,"RichTypeBoolean",0,d,"RichTypeFlowGraphInteger",0,M,"RichTypeMatrix",0,m,"RichTypeMatrix2D",0,g,"RichTypeMatrix3D",0,I,"RichTypeNumber",0,u,"RichTypeQuaternion",0,T,"RichTypeString",0,c,"RichTypeVector2",0,f,"RichTypeVector3",0,p,"RichTypeVector4",0,_,"getAnimationTypeByFlowGraphType",0,function(e){switch(e){case"number":default:return 0;case"Vector2":return 5;case"Vector3":return 1;case"Matrix":return 3;case"Color3":return 4;case"Color4":return 7;case"Quaternion":return 2}},"getRichTypeByAnimationType",0,function(e){switch(e){case 0:return u;case 5:return f;case 1:return p;case 3:return m;case 4:return y;case 7:return x;case 2:return T;default:return l}},"getRichTypeByFlowGraphType",0,function(e){switch(e){case"string":return c;case"number":return u;case"boolean":return d;case"Vector2":return f;case"Vector3":return p;case"Vector4":return _;case"Matrix":return m;case"Color3":return y;case"Color4":return x;case"Quaternion":return T;case"FlowGraphInteger":return M;case"Matrix2D":return g;case"Matrix3D":return I;default:return l}},"getRichTypeFromValue",0,function(e){switch(typeof e){case"string":return c;case"number":return u;case"boolean":return d;case"object":if(e.getClassName)switch(e.getClassName()){case"Vector2":return f;case"Vector3":return p;case"Vector4":return _;case"Matrix":return m;case"Color3":return y;case"Color4":return x;case"Quaternion":return T;case"FlowGraphInteger":return M;case"Matrix2D":return g;case"Matrix3D":return I}return l;default:return l}}],97009)},50137,e=>{"use strict";var t=e.i(85789),i=e.i(64073),r=e.i(72003),s=e.i(59012),n=e.i(97009),a=e.i(47487);function o(e){return"Vector2"===e||"Vector3"===e||"Vector4"===e||"Quaternion"===e||"Color3"===e||"Color4"===e}function h(e,t){if(!e||!e.id&&!e.name)return;let i=t.getNodes().filter(t=>e.id?t.id===e.id:t.name===e.name);if(0===i.length)return;let r=e.type??e.className,s=r?i.filter(e=>e.getClassName()===r):[],n=s.length>0?s:i;return(e.uniqueId?n.find(t=>t.uniqueId===e.uniqueId):void 0)??n[0]}e.s(["GetSceneNodeFromSerializedReference",0,h,"defaultValueParseFunction",0,function e(t,l,c,u){let d,f=l[t],p=f?.type??f?.className,_=h(f,u);if(_)d=_;else if(o(p))d=function(e,t,s=!1){if("Vector2"===e)return r.Vector2.FromArray(t);if("Vector3"===e)return s&&(t[2]*=-1),r.Vector3.FromArray(t);if("Vector4"===e)return r.Vector4.FromArray(t);if("Quaternion"===e)return s&&(t[2]*=-1,t[3]*=-1),r.Quaternion.FromArray(t);if("Color3"===e)return new i.Color3(t[0],t[1],t[2]);else if("Color4"===e)return new i.Color4(t[0],t[1],t[2],t[3]);else throw Error(`Unknown vector class name ${e}`)}(p,f.value);else if("AnimationGroup"===p){let e=u.animationGroups.filter(e=>e.name===f.name);d=1===e.length?e[0]:e.find(e=>e.uniqueId===f.uniqueId)}else d="Matrix"===p?r.Matrix.FromArray(f.value):"Matrix2D"===p?new a.FlowGraphMatrix2D(f.value):"Matrix3D"===p?new a.FlowGraphMatrix3D(f.value):"FlowGraphInteger"===p?s.FlowGraphInteger.FromValue(f.value):"number"===p||"string"===p||"boolean"===p?f.value[0]:f&&void 0!==f.value?f.value:Array.isArray(f)&&f.length>0&&"object"==typeof f[0]&&null!==f[0]&&"eventData"in f[0]?f.reduce((t,i)=>(i.eventData&&(t[i.id]={type:(0,n.getRichTypeByFlowGraphType)(i.type)},void 0!==i.value&&(t[i.id].value=e("value",i,c,u))),t),{}):f;return d},"defaultValueSerializationFunction",0,function(e,i,r){var s;let n=i?.getClassName?.()??"";if(o(n)||"Matrix"===(s=n)||"Matrix2D"===s||"Matrix3D"===s)r[e]={value:i.asArray(),className:n};else if("FlowGraphInteger"===n)r[e]={value:i.value,className:n};else if(n&&(i.id||i.name))r[e]={id:i.id,name:i.name,className:n,uniqueId:i.uniqueId};else if("object"!=typeof i||null===i)r[e]=i;else{if("pathConverter"===e||Object.values(i).some(e=>"function"==typeof e))return;try{r[e]=JSON.parse(JSON.stringify(i))}catch{t.Logger.Warn(`FlowGraph serialization: value for key "${e}" is not JSON-serializable and was skipped.`)}}},"needsPathConverter",0,function(e){return"FlowGraphJsonPointerParserBlock"===e}])},5573,e=>{"use strict";let t=(0,e.i(7484).IsNavigatorAvailable)()&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform);function i(e){return"number"==typeof e?e:e.value}e.s(["_AreSameIntegerClass",0,function(e,t){return"FlowGraphInteger"===e&&"FlowGraphInteger"===t},"_AreSameMatrixClass",0,function(e,t){return e===t&&("Matrix"===e||"Matrix2D"===e||"Matrix3D"===e)},"_AreSameVectorOrQuaternionClass",0,function(e,t){return e===t&&("Vector2"===e||"Vector3"===e||"Vector4"===e||"Quaternion"===e)},"_GetClassNameOf",0,function(e){if(e.getClassName)return e.getClassName()},"_IsDescendantOf",0,function e(t,i){return!!(t.parent&&(t.parent===i||e(t.parent,i)))},"_IsMacPlatform",0,t,"getNumericValue",0,i,"isNumeric",0,function(e,t){let r="number"==typeof e||"number"==typeof e?.value;return r&&!t?!isNaN(i(e)):r}])},63147,27240,e=>{"use strict";let t,i,r,s,n,a,o,h;var l,c=e.i(4112),u=e.i(91679),d=e.i(72003),f=e.i(64073),p=e.i(89170),_=e.i(75481),m=e.i(99493);let g=(r=p.Light,s=[],n=[],a=[],o=[],l=class extends r{constructor(e,t,i,r){super(e,i,r),this.groundColor=(0,c.__runInitializers)(this,s,new f.Color3(0,0,0)),this.direction=((0,c.__runInitializers)(this,n),(0,c.__runInitializers)(this,a,void 0)),(0,c.__runInitializers)(this,o),this.direction=t||d.Vector3.Up()}_buildUniformLayout(){this._uniformBuffer.addUniform("vLightData",4),this._uniformBuffer.addUniform("vLightDiffuse",4),this._uniformBuffer.addUniform("vLightSpecular",4),this._uniformBuffer.addUniform("vLightGround",3),this._uniformBuffer.addUniform("shadowsInfo",3),this._uniformBuffer.addUniform("depthValues",2),this._uniformBuffer.create()}getClassName(){return"HemisphericLight"}setDirectionToTarget(e){return this.direction=d.Vector3.Normalize(e.subtract(d.Vector3.Zero())),this.direction}getShadowGenerator(){return null}transferToEffect(e,t){let i=d.Vector3.Normalize(this.direction);return this._uniformBuffer.updateFloat4("vLightData",i.x,i.y,i.z,0,t),this._uniformBuffer.updateColor3("vLightGround",this.groundColor.scale(this.intensity),t),this}transferToNodeMaterialEffect(e,t){let i=d.Vector3.Normalize(this.direction);return e.setFloat3(t,i.x,i.y,i.z),this}computeWorldMatrix(){return this._worldMatrix||(this._worldMatrix=d.Matrix.Identity()),this._worldMatrix}getTypeID(){return p.Light.LIGHTTYPEID_HEMISPHERICLIGHT}prepareLightSpecificDefines(e,t){e["HEMILIGHT"+t]=!0}},h="function"==typeof Symbol&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0,t=[(0,u.serializeAsColor3)()],i=[(0,u.serializeAsVector3)()],(0,c.__esDecorate)(null,null,t,{kind:"field",name:"groundColor",static:!1,private:!1,access:{has:e=>"groundColor"in e,get:e=>e.groundColor,set:(e,t)=>{e.groundColor=t}},metadata:h},s,n),(0,c.__esDecorate)(null,null,i,{kind:"field",name:"direction",static:!1,private:!1,access:{has:e=>"direction"in e,get:e=>e.direction,set:(e,t)=>{e.direction=t}},metadata:h},a,o),h&&Object.defineProperty(l,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:h}),l),I=!1;function y(){I||(I=!0,_.Node.AddNodeConstructor("Light_Type_3",(e,t)=>()=>new g(e,d.Vector3.Zero(),t)),(0,m.RegisterClass)("BABYLON.HemisphericLight",g))}e.s(["HemisphericLight",0,g,"RegisterHemisphericLight",0,y],27240),y(),e.s([],63147)},89170,e=>{"use strict";let t,i,r,s,n,a,o,h,l,c,u,d,f,p,_,m,g,I,y,x,T,M,S,v,b,D,A,C,P,V,w,B,R,L,E,F;var O,z,k=e.i(4112),N=e.i(91679),G=e.i(72003),U=e.i(64073),W=e.i(75481),H=e.i(81127),Q=e.i(99493),Y=e.i(26801),q=e.i(22832);let j=(p=W.Node,_=[],m=[],g=[],I=[],y=[],x=[],T=[],M=[],S=[],v=[],b=[],D=[],A=[],C=[],P=[],V=[],w=[],B=[],R=[],L=[],E=[],O=class extends p{get range(){return this._range}set range(e){this._range=e,this._inverseSquaredRange=1/(this.range*this.range)}get intensityMode(){return this._intensityMode}set intensityMode(e){this._intensityMode=e,this._computePhotometricScale()}get radius(){return this._radius}set radius(e){this._radius=e,this._computePhotometricScale()}get renderPriority(){return(0,k.__classPrivateFieldGet)(this,z,"f")}set renderPriority(e){(0,k.__classPrivateFieldSet)(this,z,e,"f")}get shadowEnabled(){return this._shadowEnabled}set shadowEnabled(e){this._shadowEnabled!==e&&(this._shadowEnabled=e,this._markMeshesAsLightDirty())}get includedOnlyMeshes(){return this._includedOnlyMeshes}set includedOnlyMeshes(e){this._includedOnlyMeshes=e,this._hookArrayForIncludedOnly(e)}get excludedMeshes(){return this._excludedMeshes}set excludedMeshes(e){this._excludedMeshes=e,this._hookArrayForExcluded(e)}get excludeWithLayerMask(){return this._excludeWithLayerMask}set excludeWithLayerMask(e){this._excludeWithLayerMask=e,this._resyncMeshes()}get includeOnlyWithLayerMask(){return this._includeOnlyWithLayerMask}set includeOnlyWithLayerMask(e){this._includeOnlyWithLayerMask=e,this._resyncMeshes()}get lightmapMode(){return this._lightmapMode}set lightmapMode(e){this._lightmapMode!==e&&(this._lightmapMode=e,this._markMeshesAsLightDirty())}getViewMatrix(e){return null}getProjectionMatrix(e,t){return null}constructor(e,t,i){super(e,t,!1),this.diffuse=((0,k.__runInitializers)(this,_),(0,k.__runInitializers)(this,m,new U.Color3(1,1,1))),this.specular=((0,k.__runInitializers)(this,g),(0,k.__runInitializers)(this,I,new U.Color3(1,1,1))),this.falloffType=((0,k.__runInitializers)(this,y),(0,k.__runInitializers)(this,x,O.FALLOFF_DEFAULT)),this.intensity=((0,k.__runInitializers)(this,T),(0,k.__runInitializers)(this,M,1)),this._range=((0,k.__runInitializers)(this,S),Number.MAX_VALUE),this._inverseSquaredRange=0,this._photometricScale=1,this._intensityMode=O.INTENSITYMODE_AUTOMATIC,this._radius=1e-5,this._renderPriority=(0,k.__runInitializers)(this,v,void 0),z.set(this,((0,k.__runInitializers)(this,b),(0,k.__runInitializers)(this,D,0))),this._shadowEnabled=((0,k.__runInitializers)(this,A),(0,k.__runInitializers)(this,C,!0)),this._includedOnlyMeshes=(0,k.__runInitializers)(this,P),this._excludeWithLayerMask=(0,k.__runInitializers)(this,V,0),this._includeOnlyWithLayerMask=((0,k.__runInitializers)(this,w),(0,k.__runInitializers)(this,B,0)),this._lightmapMode=((0,k.__runInitializers)(this,R),(0,k.__runInitializers)(this,L,0)),this._shadowGenerators=((0,k.__runInitializers)(this,E),null),this._excludedMeshesIds=[],this._includedOnlyMeshesIds=[],this._currentViewDepth=0,this._clusteredContainer=null,this._isLight=!0,i||this.getScene().addLight(this),this._uniformBuffer=new H.UniformBuffer(this.getScene().getEngine(),void 0,void 0,e),this._buildUniformLayout(),this.includedOnlyMeshes=[],this.excludedMeshes=[],i||this._resyncMeshes()}transferTexturesToEffect(e,t){return this}_bindLight(e,t,i,r,s=!0){let n=e.toString(),a=!1;if(this._uniformBuffer.bindToEffect(i,"Light"+n),this._renderId!==t.getRenderId()||this._lastUseSpecular!==r||!this._uniformBuffer.useUbo){this._renderId=t.getRenderId(),this._lastUseSpecular=r;let e=this.getScaledIntensity();this.transferToEffect(i,n),this.diffuse.scaleToRef(e,U.TmpColors.Color3[0]),this._uniformBuffer.updateColor4("vLightDiffuse",U.TmpColors.Color3[0],this.range,n),r&&(this.specular.scaleToRef(e,U.TmpColors.Color3[1]),this._uniformBuffer.updateColor4("vLightSpecular",U.TmpColors.Color3[1],this.radius,n)),a=!0}if(this.transferTexturesToEffect(i,n),t.shadowsEnabled&&this.shadowEnabled&&s){let e=this.getShadowGenerator(t.activeCamera)??this.getShadowGenerator();e&&(e.bindShadowLight(n,i),a=!0)}a?this._uniformBuffer.update():this._uniformBuffer.bindUniformBuffer()}getClassName(){return"Light"}toString(e){let t="Name: "+this.name;if(t+=", type: "+["Point","Directional","Spot","Hemispheric","Clustered"][this.getTypeID()],this.animations)for(let i=0;i<this.animations.length;i++)t+=", animation[0]: "+this.animations[i].toString(e);return t}_syncParentEnabledState(){super._syncParentEnabledState(),this.isDisposed()||this._resyncMeshes()}setEnabled(e){super.setEnabled(e),this._resyncMeshes()}getShadowGenerator(e=null){return null===this._shadowGenerators?null:this._shadowGenerators.get(e)??null}getShadowGenerators(){return this._shadowGenerators}getAbsolutePosition(){return G.Vector3.Zero()}canAffectMesh(e){return!e||(!this.includedOnlyMeshes||!(this.includedOnlyMeshes.length>0)||-1!==this.includedOnlyMeshes.indexOf(e))&&(!this.excludedMeshes||!(this.excludedMeshes.length>0)||-1===this.excludedMeshes.indexOf(e))&&(0===this.includeOnlyWithLayerMask||(this.includeOnlyWithLayerMask&e.layerMask)!=0)&&(0===this.excludeWithLayerMask||!(this.excludeWithLayerMask&e.layerMask))}dispose(e,t=!1){if(this._shadowGenerators){let e=this._shadowGenerators.values();for(let t=e.next();!0!==t.done;t=e.next())t.value.dispose();this._shadowGenerators=null}if(this.getScene().stopAnimation(this),this._parentContainer){let e=this._parentContainer.lights.indexOf(this);e>-1&&this._parentContainer.lights.splice(e,1),this._parentContainer=null}for(let e of this.getScene().meshes)e._removeLightSource(this,!0);this._uniformBuffer.dispose(),this.getScene().removeLight(this),super.dispose(e,t)}getTypeID(){return 0}getScaledIntensity(){return this._photometricScale*this.intensity}clone(e,t=null){let i=O.GetConstructorFromName(this.getTypeID(),e,this.getScene());if(!i)return null;let r=q.SerializationHelper.Clone(i,this);return e&&(r.name=e),t&&(r.parent=t),r.setEnabled(this.isEnabled()),this.onClonedObservable.notifyObservers(r),r}serialize(){let e=q.SerializationHelper.Serialize(this);if(e.uniqueId=this.uniqueId,e.type=this.getTypeID(),this.parent&&this.parent._serializeAsParent(e),this.excludedMeshes.length>0)for(let t of(e.excludedMeshesIds=[],this.excludedMeshes))e.excludedMeshesIds.push(t.id);if(this.includedOnlyMeshes.length>0)for(let t of(e.includedOnlyMeshesIds=[],this.includedOnlyMeshes))e.includedOnlyMeshesIds.push(t.id);return q.SerializationHelper.AppendSerializedAnimations(this,e),e.ranges=this.serializeAnimationRanges(),e.isEnabled=this.isEnabled(),e}static GetConstructorFromName(e,t,i){let r=W.Node.Construct("Light_Type_"+e,t,i);return r||null}static Parse(e,t,i=""){let r=O.GetConstructorFromName(e.type,e.name,t);if(!r)return null;let s=q.SerializationHelper.Parse(r,e,t,i);if(e.excludedMeshesIds&&(s._excludedMeshesIds=e.excludedMeshesIds),e.includedOnlyMeshesIds&&(s._includedOnlyMeshesIds=e.includedOnlyMeshesIds),void 0!==e.parentId&&(s._waitingParentId=e.parentId),void 0!==e.parentInstanceIndex&&(s._waitingParentInstanceIndex=e.parentInstanceIndex),void 0!==e.falloffType&&(s.falloffType=e.falloffType),void 0!==e.lightmapMode&&(s.lightmapMode=e.lightmapMode),e.animations){for(let t=0;t<e.animations.length;t++){let i=e.animations[t],r=(0,Q.GetClass)("BABYLON.Animation");r&&s.animations.push(r.Parse(i))}W.Node.ParseAnimationRanges(s,e,t)}return e.autoAnimate&&t.beginAnimation(s,e.autoAnimateFrom,e.autoAnimateTo,e.autoAnimateLoop,e.autoAnimateSpeed||1),void 0!==e.isEnabled&&s.setEnabled(e.isEnabled),s._onParsed(e,t,i),s}_onParsed(e,t,i=""){}_hookArrayForExcluded(e){let t=e.push;e.push=(...i)=>{let r=t.apply(e,i);if(this._clusteredContainer)return r;for(let e of i)e._resyncLightSource(this);return r};let i=e.splice;if(e.splice=(t,r)=>{let s=i.call(e,t,r??e.length);if(this._clusteredContainer)return s;for(let e of s)e._resyncLightSource(this);return s},!this._clusteredContainer)for(let t of e)t._resyncLightSource(this)}_hookArrayForIncludedOnly(e){let t=e.push;e.push=(...i)=>{let r=t.apply(e,i);return this._resyncMeshes(),r};let i=e.splice;e.splice=(t,r)=>{let s=i.call(e,t,r??e.length);return this._resyncMeshes(),s},this._resyncMeshes()}_resyncMeshes(){if(!this._clusteredContainer)for(let e of this.getScene().meshes)e._resyncLightSource(this)}_markMeshesAsLightDirty(){for(let e of this.getScene().meshes)-1!==e.lightSources.indexOf(this)&&e._markSubMeshesAsLightDirty()}_computePhotometricScale(){this._photometricScale=this._getPhotometricScale(),this.getScene().resetCachedMaterial()}_getPhotometricScale(){let e=0,t=this.getTypeID(),i=this.intensityMode;switch(i===O.INTENSITYMODE_AUTOMATIC&&(i=t===O.LIGHTTYPEID_DIRECTIONALLIGHT?O.INTENSITYMODE_ILLUMINANCE:O.INTENSITYMODE_LUMINOUSINTENSITY),t){case O.LIGHTTYPEID_POINTLIGHT:case O.LIGHTTYPEID_SPOTLIGHT:switch(i){case O.INTENSITYMODE_LUMINOUSPOWER:e=1/(4*Math.PI);break;case O.INTENSITYMODE_LUMINOUSINTENSITY:e=1;break;case O.INTENSITYMODE_LUMINANCE:e=this.radius*this.radius}break;case O.LIGHTTYPEID_DIRECTIONALLIGHT:switch(i){case O.INTENSITYMODE_ILLUMINANCE:e=1;break;case O.INTENSITYMODE_LUMINANCE:{let t=this.radius;e=2*Math.PI*(1-Math.cos(t=Math.max(t,.001)))}}break;case O.LIGHTTYPEID_HEMISPHERICLIGHT:case O.LIGHTTYPEID_RECT_AREALIGHT:e=1}return e}_reorderLightsInScene(){let e=this.getScene();0!=this._renderPriority&&(e.requireLightSorting=!0),this.getScene().sortLightsByPriority()}areLightTexturesReady(){return!0}_isReady(){return!0}},z=new WeakMap,F="function"==typeof Symbol&&Symbol.metadata?Object.create(p[Symbol.metadata]??null):void 0,t=[(0,N.serializeAsColor3)()],i=[(0,N.serializeAsColor3)()],r=[(0,N.serialize)()],s=[(0,N.serialize)()],n=[(0,N.serialize)()],a=[(0,N.serialize)()],o=[(0,N.serialize)()],h=[(0,N.serialize)()],l=[(0,N.expandToProperty)("_reorderLightsInScene")],c=[(0,N.serialize)("shadowEnabled")],u=[(0,N.serialize)("excludeWithLayerMask")],d=[(0,N.serialize)("includeOnlyWithLayerMask")],f=[(0,N.serialize)("lightmapMode")],(0,k.__esDecorate)(O,null,n,{kind:"getter",name:"range",static:!1,private:!1,access:{has:e=>"range"in e,get:e=>e.range},metadata:F},null,_),(0,k.__esDecorate)(O,null,a,{kind:"getter",name:"intensityMode",static:!1,private:!1,access:{has:e=>"intensityMode"in e,get:e=>e.intensityMode},metadata:F},null,_),(0,k.__esDecorate)(O,null,o,{kind:"getter",name:"radius",static:!1,private:!1,access:{has:e=>"radius"in e,get:e=>e.radius},metadata:F},null,_),(0,k.__esDecorate)(O,null,l,{kind:"accessor",name:"renderPriority",static:!1,private:!1,access:{has:e=>"renderPriority"in e,get:e=>e.renderPriority,set:(e,t)=>{e.renderPriority=t}},metadata:F},D,A),(0,k.__esDecorate)(null,null,t,{kind:"field",name:"diffuse",static:!1,private:!1,access:{has:e=>"diffuse"in e,get:e=>e.diffuse,set:(e,t)=>{e.diffuse=t}},metadata:F},m,g),(0,k.__esDecorate)(null,null,i,{kind:"field",name:"specular",static:!1,private:!1,access:{has:e=>"specular"in e,get:e=>e.specular,set:(e,t)=>{e.specular=t}},metadata:F},I,y),(0,k.__esDecorate)(null,null,r,{kind:"field",name:"falloffType",static:!1,private:!1,access:{has:e=>"falloffType"in e,get:e=>e.falloffType,set:(e,t)=>{e.falloffType=t}},metadata:F},x,T),(0,k.__esDecorate)(null,null,s,{kind:"field",name:"intensity",static:!1,private:!1,access:{has:e=>"intensity"in e,get:e=>e.intensity,set:(e,t)=>{e.intensity=t}},metadata:F},M,S),(0,k.__esDecorate)(null,null,h,{kind:"field",name:"_renderPriority",static:!1,private:!1,access:{has:e=>"_renderPriority"in e,get:e=>e._renderPriority,set:(e,t)=>{e._renderPriority=t}},metadata:F},v,b),(0,k.__esDecorate)(null,null,c,{kind:"field",name:"_shadowEnabled",static:!1,private:!1,access:{has:e=>"_shadowEnabled"in e,get:e=>e._shadowEnabled,set:(e,t)=>{e._shadowEnabled=t}},metadata:F},C,P),(0,k.__esDecorate)(null,null,u,{kind:"field",name:"_excludeWithLayerMask",static:!1,private:!1,access:{has:e=>"_excludeWithLayerMask"in e,get:e=>e._excludeWithLayerMask,set:(e,t)=>{e._excludeWithLayerMask=t}},metadata:F},V,w),(0,k.__esDecorate)(null,null,d,{kind:"field",name:"_includeOnlyWithLayerMask",static:!1,private:!1,access:{has:e=>"_includeOnlyWithLayerMask"in e,get:e=>e._includeOnlyWithLayerMask,set:(e,t)=>{e._includeOnlyWithLayerMask=t}},metadata:F},B,R),(0,k.__esDecorate)(null,null,f,{kind:"field",name:"_lightmapMode",static:!1,private:!1,access:{has:e=>"_lightmapMode"in e,get:e=>e._lightmapMode,set:(e,t)=>{e._lightmapMode=t}},metadata:F},L,E),F&&Object.defineProperty(O,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:F}),O.FALLOFF_DEFAULT=Y.LightConstants.FALLOFF_DEFAULT,O.FALLOFF_PHYSICAL=Y.LightConstants.FALLOFF_PHYSICAL,O.FALLOFF_GLTF=Y.LightConstants.FALLOFF_GLTF,O.FALLOFF_STANDARD=Y.LightConstants.FALLOFF_STANDARD,O.LIGHTMAP_DEFAULT=Y.LightConstants.LIGHTMAP_DEFAULT,O.LIGHTMAP_SPECULAR=Y.LightConstants.LIGHTMAP_SPECULAR,O.LIGHTMAP_SHADOWSONLY=Y.LightConstants.LIGHTMAP_SHADOWSONLY,O.INTENSITYMODE_AUTOMATIC=Y.LightConstants.INTENSITYMODE_AUTOMATIC,O.INTENSITYMODE_LUMINOUSPOWER=Y.LightConstants.INTENSITYMODE_LUMINOUSPOWER,O.INTENSITYMODE_LUMINOUSINTENSITY=Y.LightConstants.INTENSITYMODE_LUMINOUSINTENSITY,O.INTENSITYMODE_ILLUMINANCE=Y.LightConstants.INTENSITYMODE_ILLUMINANCE,O.INTENSITYMODE_LUMINANCE=Y.LightConstants.INTENSITYMODE_LUMINANCE,O.LIGHTTYPEID_POINTLIGHT=Y.LightConstants.LIGHTTYPEID_POINTLIGHT,O.LIGHTTYPEID_DIRECTIONALLIGHT=Y.LightConstants.LIGHTTYPEID_DIRECTIONALLIGHT,O.LIGHTTYPEID_SPOTLIGHT=Y.LightConstants.LIGHTTYPEID_SPOTLIGHT,O.LIGHTTYPEID_HEMISPHERICLIGHT=Y.LightConstants.LIGHTTYPEID_HEMISPHERICLIGHT,O.LIGHTTYPEID_RECT_AREALIGHT=Y.LightConstants.LIGHTTYPEID_RECT_AREALIGHT,O);e.s(["Light",0,j])},2596,e=>{"use strict";var t=e.i(85789);let i=new Map;function r(e,r){var s;s=e,i.delete(s)&&t.Logger.Warn(`Extension with the name '${e}' already exists`),i.set(e,r)}e.s(["_GetCompatibleTextureLoader",0,function(t,s){("image/ktx"===s||"image/ktx2"===s)&&(t=".ktx"),!i.has(t)&&(t.endsWith(".ies")&&r(".ies",async()=>await e.A(17247).then(e=>new e._IESTextureLoader)),t.endsWith(".dds")&&r(".dds",async()=>await e.A(80539).then(e=>new e._DDSTextureLoader)),t.endsWith(".basis")&&r(".basis",async()=>await e.A(3994).then(e=>new e._BasisTextureLoader)),t.endsWith(".env")&&r(".env",async()=>await e.A(40215).then(e=>new e._ENVTextureLoader)),t.endsWith(".hdr")&&r(".hdr",async()=>await e.A(35808).then(e=>new e._HDRTextureLoader)),(t.endsWith(".ktx")||t.endsWith(".ktx2"))&&(r(".ktx",async()=>await e.A(10289).then(e=>new e._KTXTextureLoader)),r(".ktx2",async()=>await e.A(10289).then(e=>new e._KTXTextureLoader))),t.endsWith(".tga")&&r(".tga",async()=>await e.A(79329).then(e=>new e._TGATextureLoader)),t.endsWith(".exr")&&r(".exr",async()=>await e.A(97437).then(e=>new e._ExrTextureLoader)));let n=i.get(t);return n?Promise.resolve(n(s)):null}])},94810,e=>{"use strict";var t=e.i(56145),i=e.i(11296),r=e.i(42704),s=e.i(80592),n=e.i(9977);let a={positions:[1,1,-1,1,-1,-1,1,-1],indices:[0,1,2,0,2,3]};class o{static RegisterShaderCodeProcessing(e,t){t?o._CustomShaderCodeProcessing[e??""]=t:delete o._CustomShaderCodeProcessing[e??""]}static _GetShaderCodeProcessing(e){return o._CustomShaderCodeProcessing[e]??o._CustomShaderCodeProcessing[""]}get name(){return this.options.name}set name(e){this.options.name=e}isReady(){return this._drawWrapper.effect?.isReady()??!1}get drawWrapper(){return this._drawWrapper}get effect(){return this._drawWrapper.effect}set effect(e){this._drawWrapper.effect=e}constructor(e){this.alphaMode=0,this.onEffectCreatedObservable=new r.Observable(void 0,!0),this.onApplyObservable=new r.Observable,this._shadersLoaded=!1,this._webGPUReady=!1,this._importPromises=[],this.options={...e,name:e.name||"effectWrapper",engine:e.engine,uniforms:e.uniforms||e.uniformNames||[],uniformNames:void 0,samplers:e.samplers||e.samplerNames||[],samplerNames:void 0,attributeNames:e.attributeNames||["position"],uniformBuffers:e.uniformBuffers||[],defines:e.defines||"",useShaderStore:e.useShaderStore||!1,vertexUrl:e.vertexUrl||e.vertexShader||"postprocess",vertexShader:void 0,fragmentShader:e.fragmentShader||"pass",indexParameters:e.indexParameters,blockCompilation:e.blockCompilation||!1,shaderLanguage:e.shaderLanguage||0,onCompiled:e.onCompiled||void 0,extraInitializations:e.extraInitializations||void 0,extraInitializationsAsync:e.extraInitializationsAsync||void 0,useAsPostProcess:e.useAsPostProcess??!1,allowEmptySourceTexture:e.allowEmptySourceTexture??!1},this.options.uniformNames=this.options.uniforms,this.options.samplerNames=this.options.samplers,this.options.vertexShader=this.options.vertexUrl,this.options.useAsPostProcess&&(this.options.allowEmptySourceTexture||-1!==this.options.samplers.indexOf("textureSampler")||this.options.samplers.push("textureSampler"),-1===this.options.uniforms.indexOf("scale")&&this.options.uniforms.push("scale")),e.vertexUrl||e.vertexShader?this._shaderPath={vertexSource:this.options.vertexShader}:(this.options.useAsPostProcess||(this.options.uniforms.push("scale"),this.onApplyObservable.add(()=>{this.effect.setFloat2("scale",1,1)})),this._shaderPath={vertex:this.options.vertexShader}),this._shaderPath.fragmentSource=this.options.fragmentShader,this._shaderPath.spectorName=this.options.name,this.options.useShaderStore&&(this._shaderPath.fragment=this._shaderPath.fragmentSource,this._shaderPath.vertex||(this._shaderPath.vertex=this._shaderPath.vertexSource),delete this._shaderPath.fragmentSource,delete this._shaderPath.vertexSource),this.onApplyObservable.add(()=>{this.bind()}),this.options.useShaderStore||(this._onContextRestoredObserver=this.options.engine.onContextRestoredObservable.add(()=>{this.effect._pipelineContext=null,this.effect._prepareEffect()})),this._drawWrapper=new n.DrawWrapper(this.options.engine),this._webGPUReady=1===this.options.shaderLanguage;const t=Array.isArray(this.options.defines)?this.options.defines.join("\n"):this.options.defines;this._postConstructor(this.options.blockCompilation,t,this.options.extraInitializations)}_gatherImports(e=!1,t){}_postConstructor(t,i=null,r,s){this._importPromises.length=0,s&&this._importPromises.push(...s);let n=this.options.engine.isWebGPU&&!o.ForceGLSL;this._gatherImports(n,this._importPromises),this.options.useShaderStore&&"postprocess"===this._shaderPath.vertex&&this._importPromises.push(n&&this._webGPUReady?e.A(83572):e.A(19011)),void 0!==r&&r(n,this._importPromises),n&&this._webGPUReady&&(this.options.shaderLanguage=1),t||this.updateEffect(i)}updateEffect(e=null,t=null,i=null,r,n,a,h,l){let c,u=o._GetShaderCodeProcessing(this.name);if(u?.defineCustomBindings){let r=t?.slice()??[];r.push(...this.options.uniforms);let s=i?.slice()??[];s.push(...this.options.samplers),e=u.defineCustomBindings(this.name,e,r,s),t=r,i=s}this.options.defines=e||"";let d=this._shadersLoaded||0===this._importPromises.length?void 0:async()=>{await Promise.all(this._importPromises),this._shadersLoaded=!0};c=this.options.extraInitializationsAsync?async()=>{await d?.(),await this.options.extraInitializationsAsync()}:d,this.options.useShaderStore?this._drawWrapper.effect=this.options.engine.createEffect({vertex:h??this._shaderPath.vertex,fragment:l??this._shaderPath.fragment},{attributes:this.options.attributeNames,uniformsNames:t||this.options.uniforms,uniformBuffersNames:this.options.uniformBuffers,samplers:i||this.options.samplers,defines:null!==e?e:"",fallbacks:null,onCompiled:n??this.options.onCompiled,onError:a??null,indexParameters:r||this.options.indexParameters,processCodeAfterIncludes:u?.processCodeAfterIncludes?(e,t)=>u.processCodeAfterIncludes(this.name,e,t):null,processFinalCode:u?.processFinalCode?(e,t)=>u.processFinalCode(this.name,e,t):null,shaderLanguage:this.options.shaderLanguage,extraInitializationsAsync:c},this.options.engine):this._drawWrapper.effect=new s.Effect(this._shaderPath,this.options.attributeNames,t||this.options.uniforms,i||this.options.samplerNames,this.options.engine,e,void 0,n||this.options.onCompiled,void 0,void 0,void 0,this.options.shaderLanguage,c),this.onEffectCreatedObservable.notifyObservers(this._drawWrapper.effect)}bind(e=!1){this.options.useAsPostProcess&&!e&&(this.options.engine.setAlphaMode(this.alphaMode),this.drawWrapper.effect.setFloat2("scale",1,1)),o._GetShaderCodeProcessing(this.name)?.bindCustomBindings?.(this.name,this._drawWrapper.effect)}dispose(e=!1){this._onContextRestoredObserver&&(this.effect.getEngine().onContextRestoredObservable.remove(this._onContextRestoredObserver),this._onContextRestoredObserver=null),this.onEffectCreatedObservable.clear(),this._drawWrapper.dispose(!0)}}o.ForceGLSL=!1,o._CustomShaderCodeProcessing={},e.s(["EffectRenderer",0,class{constructor(e,r=a){this._fullscreenViewport=new i.Viewport(0,0,1,1);const s=r.positions??a.positions,n=r.indices??a.indices;this.engine=e,this._vertexBuffers={[t.VertexBuffer.PositionKind]:new t.VertexBuffer(e,s,t.VertexBuffer.PositionKind,!1,!1,2)},this._indexBuffer=e.createIndexBuffer(n),this._indexBufferLength=n.length,this._onContextRestoredObserver=e.onContextRestoredObservable.add(()=>{for(let t in this._indexBuffer=e.createIndexBuffer(n),this._vertexBuffers)this._vertexBuffers[t]._rebuild()})}setViewport(e=this._fullscreenViewport){this.engine.setViewport(e)}bindBuffers(e){this.engine.bindBuffers(this._vertexBuffers,this._indexBuffer,e)}applyEffectWrapper(e,t=!1,i=!1){this.engine.setState(!0),this.engine.depthCullingState.depthTest=t,this.engine.stencilState.stencilTest=i,this.engine.enableEffect(e.drawWrapper),this.bindBuffers(e.effect),e.onApplyObservable.notifyObservers({})}saveStates(){this._savedStateDepthTest=this.engine.depthCullingState.depthTest,this._savedStateStencilTest=this.engine.stencilState.stencilTest}restoreStates(){this.engine.depthCullingState.depthTest=this._savedStateDepthTest,this.engine.stencilState.stencilTest=this._savedStateStencilTest}draw(){this.engine.drawElementsType(0,0,this._indexBufferLength)}_isRenderTargetTexture(e){return void 0!==e.renderTarget}render(e,t=null){if(!e.effect.isReady())return;this.saveStates(),this.setViewport();let i=null===t?null:this._isRenderTargetTexture(t)?t.renderTarget:t;i&&this.engine.bindFramebuffer(i),this.applyEffectWrapper(e),this.draw(),i&&this.engine.unBindFramebuffer(i),this.restoreStates()}dispose(){let e=this._vertexBuffers[t.VertexBuffer.PositionKind];e&&(e.dispose(),delete this._vertexBuffers[t.VertexBuffer.PositionKind]),this._indexBuffer&&this.engine._releaseBuffer(this._indexBuffer),this._onContextRestoredObserver&&(this.engine.onContextRestoredObservable.remove(this._onContextRestoredObserver),this._onContextRestoredObserver=null)}},"EffectWrapper",0,o])},76608,e=>{"use strict";(0,e.i(72003).RegisterMathVector)(),e.s([])},27952,e=>{"use strict";var t=e.i(72003);let i=[Math.sqrt(1/(4*Math.PI)),-Math.sqrt(3/(4*Math.PI)),Math.sqrt(3/(4*Math.PI)),-Math.sqrt(3/(4*Math.PI)),Math.sqrt(15/(4*Math.PI)),-Math.sqrt(15/(4*Math.PI)),Math.sqrt(5/(16*Math.PI)),-Math.sqrt(15/(4*Math.PI)),Math.sqrt(15/(16*Math.PI))],r=[()=>1,e=>e.y,e=>e.z,e=>e.x,e=>e.x*e.y,e=>e.y*e.z,e=>3*e.z*e.z-1,e=>e.x*e.z,e=>e.x*e.x-e.y*e.y],s=(e,t)=>i[e]*r[e](t),n=[Math.PI,2*Math.PI/3,2*Math.PI/3,2*Math.PI/3,Math.PI/4,Math.PI/4,Math.PI/4,Math.PI/4,Math.PI/4];class a{constructor(){this.preScaled=!1,this.l00=t.Vector3.Zero(),this.l1_1=t.Vector3.Zero(),this.l10=t.Vector3.Zero(),this.l11=t.Vector3.Zero(),this.l2_2=t.Vector3.Zero(),this.l2_1=t.Vector3.Zero(),this.l20=t.Vector3.Zero(),this.l21=t.Vector3.Zero(),this.l22=t.Vector3.Zero()}addLight(e,i,r){t.TmpVectors.Vector3[0].set(i.r,i.g,i.b);let n=t.TmpVectors.Vector3[0],a=t.TmpVectors.Vector3[1];n.scaleToRef(r,a),a.scaleToRef(s(0,e),t.TmpVectors.Vector3[2]),this.l00.addInPlace(t.TmpVectors.Vector3[2]),a.scaleToRef(s(1,e),t.TmpVectors.Vector3[2]),this.l1_1.addInPlace(t.TmpVectors.Vector3[2]),a.scaleToRef(s(2,e),t.TmpVectors.Vector3[2]),this.l10.addInPlace(t.TmpVectors.Vector3[2]),a.scaleToRef(s(3,e),t.TmpVectors.Vector3[2]),this.l11.addInPlace(t.TmpVectors.Vector3[2]),a.scaleToRef(s(4,e),t.TmpVectors.Vector3[2]),this.l2_2.addInPlace(t.TmpVectors.Vector3[2]),a.scaleToRef(s(5,e),t.TmpVectors.Vector3[2]),this.l2_1.addInPlace(t.TmpVectors.Vector3[2]),a.scaleToRef(s(6,e),t.TmpVectors.Vector3[2]),this.l20.addInPlace(t.TmpVectors.Vector3[2]),a.scaleToRef(s(7,e),t.TmpVectors.Vector3[2]),this.l21.addInPlace(t.TmpVectors.Vector3[2]),a.scaleToRef(s(8,e),t.TmpVectors.Vector3[2]),this.l22.addInPlace(t.TmpVectors.Vector3[2])}scaleInPlace(e){this.l00.scaleInPlace(e),this.l1_1.scaleInPlace(e),this.l10.scaleInPlace(e),this.l11.scaleInPlace(e),this.l2_2.scaleInPlace(e),this.l2_1.scaleInPlace(e),this.l20.scaleInPlace(e),this.l21.scaleInPlace(e),this.l22.scaleInPlace(e)}convertIncidentRadianceToIrradiance(){this.l00.scaleInPlace(n[0]),this.l1_1.scaleInPlace(n[1]),this.l10.scaleInPlace(n[2]),this.l11.scaleInPlace(n[3]),this.l2_2.scaleInPlace(n[4]),this.l2_1.scaleInPlace(n[5]),this.l20.scaleInPlace(n[6]),this.l21.scaleInPlace(n[7]),this.l22.scaleInPlace(n[8])}convertIrradianceToLambertianRadiance(){this.scaleInPlace(1/Math.PI)}preScaleForRendering(){this.preScaled=!0,this.l00.scaleInPlace(i[0]),this.l1_1.scaleInPlace(i[1]),this.l10.scaleInPlace(i[2]),this.l11.scaleInPlace(i[3]),this.l2_2.scaleInPlace(i[4]),this.l2_1.scaleInPlace(i[5]),this.l20.scaleInPlace(i[6]),this.l21.scaleInPlace(i[7]),this.l22.scaleInPlace(i[8])}updateFromArray(e){return t.Vector3.FromArrayToRef(e[0],0,this.l00),t.Vector3.FromArrayToRef(e[1],0,this.l1_1),t.Vector3.FromArrayToRef(e[2],0,this.l10),t.Vector3.FromArrayToRef(e[3],0,this.l11),t.Vector3.FromArrayToRef(e[4],0,this.l2_2),t.Vector3.FromArrayToRef(e[5],0,this.l2_1),t.Vector3.FromArrayToRef(e[6],0,this.l20),t.Vector3.FromArrayToRef(e[7],0,this.l21),t.Vector3.FromArrayToRef(e[8],0,this.l22),this}updateFromFloatsArray(e){return t.Vector3.FromFloatsToRef(e[0],e[1],e[2],this.l00),t.Vector3.FromFloatsToRef(e[3],e[4],e[5],this.l1_1),t.Vector3.FromFloatsToRef(e[6],e[7],e[8],this.l10),t.Vector3.FromFloatsToRef(e[9],e[10],e[11],this.l11),t.Vector3.FromFloatsToRef(e[12],e[13],e[14],this.l2_2),t.Vector3.FromFloatsToRef(e[15],e[16],e[17],this.l2_1),t.Vector3.FromFloatsToRef(e[18],e[19],e[20],this.l20),t.Vector3.FromFloatsToRef(e[21],e[22],e[23],this.l21),t.Vector3.FromFloatsToRef(e[24],e[25],e[26],this.l22),this}static FromArray(e){return new a().updateFromArray(e)}static FromPolynomial(e){let t=new a;return t.l00=e.xx.scale(.376127).add(e.yy.scale(.376127)).add(e.zz.scale(.376126)),t.l1_1=e.y.scale(.977204),t.l10=e.z.scale(.977204),t.l11=e.x.scale(.977204),t.l2_2=e.xy.scale(1.16538),t.l2_1=e.yz.scale(1.16538),t.l20=e.zz.scale(1.34567).subtract(e.xx.scale(.672834)).subtract(e.yy.scale(.672834)),t.l21=e.zx.scale(1.16538),t.l22=e.xx.scale(1.16538).subtract(e.yy.scale(1.16538)),t.l1_1.scaleInPlace(-1),t.l11.scaleInPlace(-1),t.l2_1.scaleInPlace(-1),t.l21.scaleInPlace(-1),t.scaleInPlace(Math.PI),t}}e.s(["SphericalHarmonics",0,a,"SphericalPolynomial",0,class e{constructor(){this.x=t.Vector3.Zero(),this.y=t.Vector3.Zero(),this.z=t.Vector3.Zero(),this.xx=t.Vector3.Zero(),this.yy=t.Vector3.Zero(),this.zz=t.Vector3.Zero(),this.xy=t.Vector3.Zero(),this.yz=t.Vector3.Zero(),this.zx=t.Vector3.Zero()}get preScaledHarmonics(){return this._harmonics||(this._harmonics=a.FromPolynomial(this)),this._harmonics.preScaled||this._harmonics.preScaleForRendering(),this._harmonics}addAmbient(e){t.TmpVectors.Vector3[0].copyFromFloats(e.r,e.g,e.b);let i=t.TmpVectors.Vector3[0];this.xx.addInPlace(i),this.yy.addInPlace(i),this.zz.addInPlace(i)}scaleInPlace(e){this.x.scaleInPlace(e),this.y.scaleInPlace(e),this.z.scaleInPlace(e),this.xx.scaleInPlace(e),this.yy.scaleInPlace(e),this.zz.scaleInPlace(e),this.yz.scaleInPlace(e),this.zx.scaleInPlace(e),this.xy.scaleInPlace(e)}updateFromHarmonics(e){return this._harmonics=e,this.x.copyFrom(e.l11),this.x.scaleInPlace(1.02333).scaleInPlace(-1),this.y.copyFrom(e.l1_1),this.y.scaleInPlace(1.02333).scaleInPlace(-1),this.z.copyFrom(e.l10),this.z.scaleInPlace(1.02333),this.xx.copyFrom(e.l00),t.TmpVectors.Vector3[0].copyFrom(e.l20).scaleInPlace(.247708),t.TmpVectors.Vector3[1].copyFrom(e.l22).scaleInPlace(.429043),this.xx.scaleInPlace(.886277).subtractInPlace(t.TmpVectors.Vector3[0]).addInPlace(t.TmpVectors.Vector3[1]),this.yy.copyFrom(e.l00),this.yy.scaleInPlace(.886277).subtractInPlace(t.TmpVectors.Vector3[0]).subtractInPlace(t.TmpVectors.Vector3[1]),this.zz.copyFrom(e.l00),t.TmpVectors.Vector3[0].copyFrom(e.l20).scaleInPlace(.495417),this.zz.scaleInPlace(.886277).addInPlace(t.TmpVectors.Vector3[0]),this.yz.copyFrom(e.l2_1),this.yz.scaleInPlace(.858086).scaleInPlace(-1),this.zx.copyFrom(e.l21),this.zx.scaleInPlace(.858086).scaleInPlace(-1),this.xy.copyFrom(e.l2_2),this.xy.scaleInPlace(.858086),this.scaleInPlace(1/Math.PI),this}static FromHarmonics(t){return new e().updateFromHarmonics(t)}static FromArray(i){let r=new e;return t.Vector3.FromArrayToRef(i[0],0,r.x),t.Vector3.FromArrayToRef(i[1],0,r.y),t.Vector3.FromArrayToRef(i[2],0,r.z),t.Vector3.FromArrayToRef(i[3],0,r.xx),t.Vector3.FromArrayToRef(i[4],0,r.yy),t.Vector3.FromArrayToRef(i[5],0,r.zz),t.Vector3.FromArrayToRef(i[6],0,r.yz),t.Vector3.FromArrayToRef(i[7],0,r.zx),t.Vector3.FromArrayToRef(i[8],0,r.xy),r}}])},45930,e=>{"use strict";var t=e.i(72003),i=e.i(85789),r=e.i(87659),s=e.i(55206),n=e.i(13645),a=e.i(17462),o=e.i(56145),h=e.i(99493);class l extends r.AbstractMesh{constructor(e,t){for(const i of(super(e,t.getScene()),this._indexInSourceMeshInstanceArray=-1,this._distanceToCamera=0,t.addInstance(this),this._sourceMesh=t,this._unIndexed=t._unIndexed,this.position.copyFrom(t.position),this.rotation.copyFrom(t.rotation),this.scaling.copyFrom(t.scaling),t.rotationQuaternion&&(this.rotationQuaternion=t.rotationQuaternion.clone()),this.animations=t.animations.slice(),t.getAnimationRanges()))null!=i&&this.createAnimationRange(i.name,i.from,i.to);if(this.infiniteDistance=t.infiniteDistance,this.setPivotMatrix(t.getPivotMatrix()),t.skeleton||t.morphTargetManager||!t.hasBoundingInfo)this.refreshBoundingInfo(!0,!0);else{const e=t.getBoundingInfo();this.buildBoundingInfo(e.minimum,e.maximum)}this._syncSubMeshes()}getClassName(){return"InstancedMesh"}get lightSources(){return this._sourceMesh._lightSources}_resyncLightSources(){}_resyncLightSource(){}_removeLightSource(){}get receiveShadows(){return this._sourceMesh.receiveShadows}set receiveShadows(e){this._sourceMesh?.receiveShadows!==e&&i.Logger.Warn("Setting receiveShadows on an instanced mesh has no effect")}get material(){return this._sourceMesh.material}set material(e){this._sourceMesh?.material!==e&&i.Logger.Warn("Setting material on an instanced mesh has no effect")}get visibility(){return this._sourceMesh.visibility}set visibility(e){this._sourceMesh?.visibility!==e&&i.Logger.Warn("Setting visibility on an instanced mesh has no effect")}get skeleton(){return this._sourceMesh.skeleton}set skeleton(e){this._sourceMesh?.skeleton!==e&&i.Logger.Warn("Setting skeleton on an instanced mesh has no effect")}get renderingGroupId(){return this._sourceMesh.renderingGroupId}set renderingGroupId(e){this._sourceMesh&&e!==this._sourceMesh.renderingGroupId&&i.Logger.Warn("Note - setting renderingGroupId of an instanced mesh has no effect on the scene")}getTotalVertices(){return this._sourceMesh?this._sourceMesh.getTotalVertices():0}getTotalIndices(){return this._sourceMesh.getTotalIndices()}get sourceMesh(){return this._sourceMesh}get geometry(){return this._sourceMesh._geometry}createInstance(e){return this._sourceMesh.createInstance(e)}isReady(e=!1){return this._sourceMesh.isReady(e,!0)}getVerticesData(e,t,i){return this._sourceMesh.getVerticesData(e,t,i)}copyVerticesData(e,t){this._sourceMesh.copyVerticesData(e,t)}getVertexBuffer(e,t){return this._sourceMesh.getVertexBuffer(e,t)}setVerticesData(e,t,i,r){return this.sourceMesh&&this.sourceMesh.setVerticesData(e,t,i,r),this.sourceMesh}updateVerticesData(e,t,i,r){return this.sourceMesh&&this.sourceMesh.updateVerticesData(e,t,i,r),this.sourceMesh}setIndices(e,t=null){return this.sourceMesh&&this.sourceMesh.setIndices(e,t),this.sourceMesh}isVerticesDataPresent(e){return this._sourceMesh.isVerticesDataPresent(e)}getIndices(){return this._sourceMesh.getIndices()}get _positions(){return this._sourceMesh._positions}refreshBoundingInfo(e=!1,t=!1){if(this.hasBoundingInfo&&this.getBoundingInfo().isLocked)return this;let i=this._sourceMesh.geometry?this._sourceMesh.geometry.boundingBias:null;return this._refreshBoundingInfo(this._sourceMesh._getData("object"==typeof e?e:{applySkeleton:e,applyMorph:t},null,o.VertexBuffer.PositionKind),i),this}_preActivate(){return this._currentLOD&&this._currentLOD._preActivate(),this}_activate(e,t){if(super._activate(e,t),this._sourceMesh.subMeshes||i.Logger.Warn("Instances should only be created for meshes with geometry."),this._currentLOD){if(this._currentLOD._getWorldMatrixDeterminant()>=0!=this._getWorldMatrixDeterminant()>=0)return this._internalAbstractMeshDataInfo._actAsRegularMesh=!0,!0;if(this._internalAbstractMeshDataInfo._actAsRegularMesh=!1,this._currentLOD._registerInstanceForRenderId(this,e),t){if(!this._currentLOD._internalAbstractMeshDataInfo._isActiveIntermediate)return this._currentLOD._internalAbstractMeshDataInfo._onlyForInstancesIntermediate=!0,!0}else if(!this._currentLOD._internalAbstractMeshDataInfo._isActive)return this._currentLOD._internalAbstractMeshDataInfo._onlyForInstances=!0,!0}return!1}_postActivate(){this._sourceMesh.edgesShareWithInstances&&this._sourceMesh._edgesRenderer&&this._sourceMesh._edgesRenderer.isEnabled&&this._sourceMesh._renderingGroup?(this._sourceMesh._renderingGroup._edgesRenderers.pushNoDuplicate(this._sourceMesh._edgesRenderer),this._sourceMesh._edgesRenderer.customInstances.push(this.getWorldMatrix())):this._edgesRenderer&&this._edgesRenderer.isEnabled&&this._sourceMesh._renderingGroup&&this._sourceMesh._renderingGroup._edgesRenderers.push(this._edgesRenderer)}getWorldMatrix(){if(this._currentLOD&&this._currentLOD!==this._sourceMesh&&this._currentLOD.billboardMode!==a.TransformNode.BILLBOARDMODE_NONE&&this._currentLOD._masterMesh!==this){this._billboardWorldMatrix||(this._billboardWorldMatrix=new t.Matrix);let e=this._currentLOD._masterMesh;return this._currentLOD._masterMesh=this,t.TmpVectors.Vector3[7].copyFrom(this._currentLOD.position),this._currentLOD.position.set(0,0,0),this._billboardWorldMatrix.copyFrom(this._currentLOD.computeWorldMatrix(!0)),this._currentLOD.position.copyFrom(t.TmpVectors.Vector3[7]),this._currentLOD._masterMesh=e,this._billboardWorldMatrix}return super.getWorldMatrix()}get isAnInstance(){return!0}getLOD(e){if(!e)return this;let t=this.sourceMesh.getLODLevels();if(t&&0!==t.length){let t=this.getBoundingInfo();this._currentLOD=this.sourceMesh.getLOD(e,t.boundingSphere)}else this._currentLOD=this.sourceMesh;return this._currentLOD}_preActivateForIntermediateRendering(e){return this.sourceMesh._preActivateForIntermediateRendering(e)}_syncSubMeshes(){if(this.releaseSubMeshes(),this._sourceMesh.subMeshes)for(let e=0;e<this._sourceMesh.subMeshes.length;e++)this._sourceMesh.subMeshes[e].clone(this,this._sourceMesh);return this}_generatePointsArray(){return this._sourceMesh._generatePointsArray()}_updateBoundingInfo(){return this.hasBoundingInfo?this.getBoundingInfo().update(this.worldMatrixFromCache):this.buildBoundingInfo(this.absolutePosition,this.absolutePosition,this.worldMatrixFromCache),this._updateSubMeshesBoundingInfo(this.worldMatrixFromCache),this}clone(e,t=null,i,r){let s=(r||this._sourceMesh).createInstance(e);if(n.DeepCopier.DeepCopy(this,s,["name","subMeshes","uniqueId","parent","lightSources","receiveShadows","material","visibility","skeleton","sourceMesh","isAnInstance","facetNb","isFacetDataEnabled","isBlocked","useBones","hasInstances","collider","edgesRenderer","forward","up","right","absolutePosition","absoluteScaling","absoluteRotationQuaternion","isWorldMatrixFrozen","nonUniformScaling","behaviors","worldMatrixFromCache","hasThinInstances","hasBoundingInfo","geometry"],[]),t&&(s.parent=t),!i)for(let e=0;e<this.getScene().meshes.length;e++){let t=this.getScene().meshes[e];t.parent===this&&t.clone(t.name,s)}return s.computeWorldMatrix(!0),this.onClonedObservable.notifyObservers(s),s}dispose(e,t=!1){this._sourceMesh.removeInstance(this),super.dispose(e,t)}_serializeAsParent(e){super._serializeAsParent(e),e.parentId=this._sourceMesh.uniqueId,e.parentInstanceIndex=this._indexInSourceMeshInstanceArray}instantiateHierarchy(e=null,t,i){let r=this.clone("Clone of "+(this.name||this.id),e||this.parent,!0,t&&t.newSourcedMesh);for(let e of(r&&i&&i(this,r),this.getChildTransformNodes(!0)))e.instantiateHierarchy(r,t,i);return r}}let c=!1;e.s(["InstancedMesh",0,l,"RegisterInstancedMesh",0,function(){c||(c=!0,s.Mesh._instancedMeshFactory=(e,t)=>{let i=new l(e,t);if(t.instancedBuffers)for(let e in i.instancedBuffers={},t.instancedBuffers)i.instancedBuffers[e]=t.instancedBuffers[e];return i},s.Mesh.prototype.registerInstancedBuffer=function(e,t){if(this._userInstancedBuffersStorage?.vertexBuffers[e]?.dispose(),this._userInstancedBuffersStorage?.renderPasses)for(let t in this._userInstancedBuffersStorage.renderPasses){let i=this._userInstancedBuffersStorage.renderPasses[t];i[e]?.dispose(),delete i[e]}if(!this.instancedBuffers)for(let e of(this.instancedBuffers={},this.instances))e.instancedBuffers={};for(let i of(this._userInstancedBuffersStorage||(this._userInstancedBuffersStorage={data:{},vertexBuffers:{},strides:{},sizes:{},vertexArrayObjects:this.getEngine().getCaps().vertexArrayObject?{}:void 0}),this.instancedBuffers[e]=null,this._userInstancedBuffersStorage.strides[e]=t,this._userInstancedBuffersStorage.sizes[e]=32*t,this._userInstancedBuffersStorage.data[e]=new Float32Array(this._userInstancedBuffersStorage.sizes[e]),this._userInstancedBuffersStorage.vertexBuffers[e]=this._instanceDataStorage.useMonoDataStorageRenderPass?new o.VertexBuffer(this.getEngine(),this._userInstancedBuffersStorage.data[e],e,!0,!1,t,!0):null,this.instances))i.instancedBuffers[e]=null;this._invalidateInstanceVertexArrayObject(),this._markSubMeshesAsAttributesDirty()},s.Mesh.prototype._processInstancedBuffers=function(e,t){let i,r=e?e.length:0,s=!this._instanceDataStorage.useMonoDataStorageRenderPass;if(s){let e=this._instanceDataStorage.engine.currentRenderPassId;this._userInstancedBuffersStorage.renderPasses||(this._userInstancedBuffersStorage.renderPasses={}),this._userInstancedBuffersStorage.renderPasses[e]||(this._userInstancedBuffersStorage.renderPasses[e]={}),i=this._userInstancedBuffersStorage.renderPasses[e]}for(let n in this.instancedBuffers){let a=this._userInstancedBuffersStorage.sizes[n],h=this._userInstancedBuffersStorage.strides[n],l=(r+1)*h;for(;a<l;)a*=2;this._userInstancedBuffersStorage.data[n].length!=a&&(this._userInstancedBuffersStorage.data[n]=new Float32Array(a),this._userInstancedBuffersStorage.sizes[n]=a,s?i[n]&&(i[n].dispose(),i[n]=null):this._userInstancedBuffersStorage.vertexBuffers[n]&&(this._userInstancedBuffersStorage.vertexBuffers[n].dispose(),this._userInstancedBuffersStorage.vertexBuffers[n]=null));let c=this._userInstancedBuffersStorage.data[n],u=0;if(t){let e=this.instancedBuffers[n]??0;e.toArray?e.toArray(c,u):e.copyToArray?e.copyToArray(c,u):c[u]=e,u+=h}for(let t=0;t<r;t++){let i=e[t].instancedBuffers[n]??0;i.toArray?i.toArray(c,u):i.copyToArray?i.copyToArray(c,u):c[u]=i,u+=h}s?i[n]?i[n].updateDirectly(c,0):(i[n]=new o.VertexBuffer(this.getEngine(),this._userInstancedBuffersStorage.data[n],n,!0,!1,h,!0),this._invalidateInstanceVertexArrayObject()):this._userInstancedBuffersStorage.vertexBuffers[n]?this._userInstancedBuffersStorage.vertexBuffers[n].updateDirectly(c,0):(this._userInstancedBuffersStorage.vertexBuffers[n]=new o.VertexBuffer(this.getEngine(),this._userInstancedBuffersStorage.data[n],n,!0,!1,h,!0),this._invalidateInstanceVertexArrayObject())}},s.Mesh.prototype._invalidateInstanceVertexArrayObject=function(){if(this._userInstancedBuffersStorage&&void 0!==this._userInstancedBuffersStorage.vertexArrayObjects){for(let e in this._userInstancedBuffersStorage.vertexArrayObjects)this.getEngine().releaseVertexArrayObject(this._userInstancedBuffersStorage.vertexArrayObjects[e]);this._userInstancedBuffersStorage.vertexArrayObjects={}}},s.Mesh.prototype._disposeInstanceSpecificData=function(){for(let e in this._instanceDataStorage.renderPasses)this._instanceDataStorage.renderPasses[e].instancesBuffer?.dispose();for(this._instanceDataStorage.renderPasses={},this._instanceDataStorage.dataStorageRenderPass?.instancesBuffer?.dispose();this.instances.length;)this.instances[0].dispose();for(let e in this.instancedBuffers)this._userInstancedBuffersStorage.vertexBuffers[e]&&this._userInstancedBuffersStorage.vertexBuffers[e].dispose();this._invalidateInstanceVertexArrayObject(),this.instancedBuffers={}},(0,h.RegisterClass)("BABYLON.InstancedMesh",l))}])},22889,e=>{"use strict";(0,e.i(55206).RegisterMesh)(),e.s([])},90753,73458,5761,e=>{"use strict";e.s([],73458);var t=e.i(72003),i=e.i(85789),r=e.i(97363),s=e.i(55206),n=e.i(56145);let a="bakedVertexAnimationSettingsInstanced";function o(e){let t=e.bakedVertexAnimationManager?.texture?.getInternalTexture()?._bufferView;return t instanceof Float32Array||t instanceof Uint16Array}let h=!1;function l(){h||(h=!0,s.Mesh.prototype.thinInstanceAdd=function(e,t=!0){if(!this.getScene().getEngine().getCaps().instancedArrays)return i.Logger.Error("Thin Instances are not supported on this device as Instanced Array extension not supported"),-1;this._thinInstanceUpdateBufferSize("matrix",Array.isArray(e)?e.length:1);let r=this._thinInstanceDataStorage.instancesCount;if(Array.isArray(e))for(let i=0;i<e.length;++i)this.thinInstanceSetMatrixAt(this._thinInstanceDataStorage.instancesCount++,e[i],i===e.length-1&&t);else this.thinInstanceSetMatrixAt(this._thinInstanceDataStorage.instancesCount++,e,t);return r},s.Mesh.prototype.thinInstanceAddSelf=function(e=!0){return this.thinInstanceAdd(t.Matrix.IdentityReadOnly,e)},s.Mesh.prototype.thinInstanceRegisterAttribute=function(e,t){e===n.VertexBuffer.ColorKind&&(e=n.VertexBuffer.ColorInstanceKind),this.removeVerticesData(e),this._thinInstanceInitializeUserStorage(),this._userThinInstanceBuffersStorage.strides[e]=t,this._userThinInstanceBuffersStorage.sizes[e]=t*Math.max(32,this._thinInstanceDataStorage.instancesCount),this._userThinInstanceBuffersStorage.data[e]=new Float32Array(this._userThinInstanceBuffersStorage.sizes[e]),this._userThinInstanceBuffersStorage.vertexBuffers[e]=new n.VertexBuffer(this.getEngine(),this._userThinInstanceBuffersStorage.data[e],e,!0,!1,t,!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[e])},s.Mesh.prototype.thinInstanceSetMatrixAt=function(e,t,i=!0){if(!this._thinInstanceDataStorage.matrixData||e>=this._thinInstanceDataStorage.instancesCount)return!1;let r=this._thinInstanceDataStorage.matrixData;return t.copyToArray(r,16*e),this._thinInstanceDataStorage.worldMatrices&&(this._thinInstanceDataStorage.worldMatrices[e]=t),i&&(this.thinInstanceBufferUpdated("matrix"),this.doNotSyncBoundingInfo||this.thinInstanceRefreshBoundingInfo(!1)),!0},s.Mesh.prototype.thinInstanceSetAttributeAt=function(e,t,i,r=!0){return e===n.VertexBuffer.ColorKind&&(e=n.VertexBuffer.ColorInstanceKind),!!this._userThinInstanceBuffersStorage&&!!this._userThinInstanceBuffersStorage.data[e]&&!(t>=this._thinInstanceDataStorage.instancesCount)&&(this._thinInstanceUpdateBufferSize(e,0),this._userThinInstanceBuffersStorage.data[e].set(i,t*this._userThinInstanceBuffersStorage.strides[e]),r&&this.thinInstanceBufferUpdated(e),!0)},Object.defineProperty(s.Mesh.prototype,"thinInstanceCount",{get:function(){return this._thinInstanceDataStorage.instancesCount},set:function(e){let t=this._thinInstanceDataStorage.matrixData??this.source?._thinInstanceDataStorage.matrixData;e<=(t?t.length/16:0)&&(this._thinInstanceDataStorage.instancesCount=e)},enumerable:!0,configurable:!0}),s.Mesh.prototype._thinInstanceCreateMatrixBuffer=function(e,t,i=!0){let r=new n.Buffer(this.getEngine(),t,!i,16,!1,!0);for(let t=0;t<4;t++)this.setVerticesBuffer(r.createVertexBuffer(e+t,4*t,4));return r},s.Mesh.prototype.thinInstanceSetBuffer=function(e,t,i=0,r=!0){if(i=i||16,"matrix"===e)this._thinInstanceDataStorage.matrixBuffer?.dispose(),this._thinInstanceDataStorage.matrixBuffer=null,this._thinInstanceDataStorage.matrixBufferSize=t?t.length:32*i,this._thinInstanceDataStorage.matrixData=t,this._thinInstanceDataStorage.worldMatrices=null,null!==t?(this._thinInstanceDataStorage.instancesCount=t.length/i,this._thinInstanceDataStorage.matrixBuffer=this._thinInstanceCreateMatrixBuffer("world",t,r),this.doNotSyncBoundingInfo||this.thinInstanceRefreshBoundingInfo(!1)):(this._thinInstanceDataStorage.instancesCount=0,this.doNotSyncBoundingInfo||this.refreshBoundingInfo());else if("previousMatrix"===e)this._thinInstanceDataStorage.previousMatrixBuffer?.dispose(),this._thinInstanceDataStorage.previousMatrixBuffer=null,this._thinInstanceDataStorage.previousMatrixData=t,null!==t&&(this._thinInstanceDataStorage.previousMatrixBuffer=this._thinInstanceCreateMatrixBuffer("previousWorld",t,r));else if("splatIndex"===e&&t){this._thinInstanceInitializeUserStorage(),this._thinInstanceDataStorage.instancesCount=t.length/i,this._userThinInstanceBuffersStorage.data[e]=t,this._userThinInstanceBuffersStorage.strides[e]=i,this._userThinInstanceBuffersStorage.sizes[e]=t.length;let r=new n.Buffer(this.getEngine(),t,!0,16,!1,!0);this._thinInstanceDataStorage.matrixBuffer=r;for(let t=0;t<4;t++)this.setVerticesBuffer(r.createVertexBuffer(e+t,4*t,4))}else e===n.VertexBuffer.ColorKind&&(e=n.VertexBuffer.ColorInstanceKind),null===t?this._userThinInstanceBuffersStorage?.data[e]&&(this.removeVerticesData(e),delete this._userThinInstanceBuffersStorage.data[e],delete this._userThinInstanceBuffersStorage.strides[e],delete this._userThinInstanceBuffersStorage.sizes[e],delete this._userThinInstanceBuffersStorage.vertexBuffers[e]):(this._thinInstanceInitializeUserStorage(),this._userThinInstanceBuffersStorage.data[e]=t,this._userThinInstanceBuffersStorage.strides[e]=i,this._userThinInstanceBuffersStorage.sizes[e]=t.length,this._userThinInstanceBuffersStorage.vertexBuffers[e]=new n.VertexBuffer(this.getEngine(),t,e,!r,!1,i,!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[e]))},s.Mesh.prototype.thinInstanceBufferUpdated=function(e){"matrix"===e?(this.thinInstanceAllowAutomaticStaticBufferRecreation&&this._thinInstanceDataStorage.matrixBuffer&&!this._thinInstanceDataStorage.matrixBuffer.isUpdatable()&&this._thinInstanceRecreateBuffer(e),this._thinInstanceDataStorage.matrixBuffer?.updateDirectly(this._thinInstanceDataStorage.matrixData,0,this._thinInstanceDataStorage.instancesCount)):"previousMatrix"===e?(this.thinInstanceAllowAutomaticStaticBufferRecreation&&this._thinInstanceDataStorage.previousMatrixBuffer&&!this._thinInstanceDataStorage.previousMatrixBuffer.isUpdatable()&&this._thinInstanceRecreateBuffer(e),this._thinInstanceDataStorage.previousMatrixBuffer?.updateDirectly(this._thinInstanceDataStorage.previousMatrixData,0,this._thinInstanceDataStorage.instancesCount)):"splatIndex"===e?this._thinInstanceDataStorage.matrixBuffer?.updateDirectly(this._userThinInstanceBuffersStorage.data[e],0,this._thinInstanceDataStorage.instancesCount):(e===n.VertexBuffer.ColorKind&&(e=n.VertexBuffer.ColorInstanceKind),this._userThinInstanceBuffersStorage?.vertexBuffers[e]&&(this.thinInstanceAllowAutomaticStaticBufferRecreation&&!this._userThinInstanceBuffersStorage.vertexBuffers[e].isUpdatable()&&this._thinInstanceRecreateBuffer(e),this._userThinInstanceBuffersStorage.vertexBuffers[e].updateDirectly(this._userThinInstanceBuffersStorage.data[e],0)))},s.Mesh.prototype.thinInstancePartialBufferUpdate=function(e,t,i){if("matrix"===e)this._thinInstanceDataStorage.matrixBuffer&&("number"==typeof t?this._thinInstanceDataStorage.matrixBuffer.updateDirectly(new Float32Array(this._thinInstanceDataStorage.matrixData.buffer,this._thinInstanceDataStorage.matrixData.byteOffset+16*i*Float32Array.BYTES_PER_ELEMENT,16*t),16*i):this._thinInstanceDataStorage.matrixBuffer.updateDirectly(t,i));else if(e===n.VertexBuffer.ColorKind&&(e=n.VertexBuffer.ColorInstanceKind),this._userThinInstanceBuffersStorage?.vertexBuffers[e]){let r=this._userThinInstanceBuffersStorage.vertexBuffers[e];if("number"==typeof t){let r=new Float32Array(this._userThinInstanceBuffersStorage.data[e].buffer,this._userThinInstanceBuffersStorage.data[e].byteOffset+i*this._userThinInstanceBuffersStorage.strides[e]*Float32Array.BYTES_PER_ELEMENT,t*this._userThinInstanceBuffersStorage.strides[e]);this._userThinInstanceBuffersStorage.vertexBuffers[e].updateDirectly(r,i*this._userThinInstanceBuffersStorage.strides[e])}else r.updateDirectly(t,i)}},s.Mesh.prototype.thinInstanceGetWorldMatrices=function(){if(!this._thinInstanceDataStorage.matrixData||!this._thinInstanceDataStorage.matrixBuffer)return[];let e=this._thinInstanceDataStorage.matrixData;if(!this._thinInstanceDataStorage.worldMatrices){this._thinInstanceDataStorage.worldMatrices=[];for(let i=0;i<this._thinInstanceDataStorage.instancesCount;++i)this._thinInstanceDataStorage.worldMatrices[i]=t.Matrix.FromArray(e,16*i)}return this._thinInstanceDataStorage.worldMatrices},s.Mesh.prototype.thinInstanceRefreshBoundingInfo=function(e=!1,i=!1,s=!1,h=!1){if(!this._thinInstanceDataStorage.matrixData||!this._thinInstanceDataStorage.matrixBuffer)return;let l=this._thinInstanceDataStorage.boundingVectors;if(e||!this.rawBoundingInfo){if(l.length=0,h&&function(e,i,s){let h=e._userThinInstanceBuffersStorage,l=h?.data[a],c=h?.strides[a];if(!l||!c||c<4||!o(e))return!1;let u=e._thinInstanceDataStorage.matrixData;if(!u)return!1;let d={},f=t.TmpVectors.Vector4[0],p=t.TmpVectors.Vector3[1],_=t.TmpVectors.Vector3[2],m=t.TmpVectors.Vector3[3],g=t.TmpVectors.Vector3[4],I=t.TmpVectors.Vector3[5],y=t.TmpVectors.Vector3[6],x=t.TmpVectors.Matrix[2],T=e.geometry?e.geometry.boundingBias:null,M=e.getTotalVertices();p.setAll(1/0),_.setAll(-1/0),m.setAll(1/0),g.setAll(-1/0);for(let i=0;i<e._thinInstanceDataStorage.instancesCount;++i){let r=i*c;f.set(l[r],l[r+1],l[r+2],l[r+3]);let a=e._getData({applyMorph:s,applyBakedVertexAnimation:!0,bakedVertexAnimationSettings:f,updatePositionsArray:!1,cache:d},null,n.VertexBuffer.PositionKind);if(!a)return!1;I.setAll(1/0),y.setAll(-1/0);for(let e=0;e<3*M;e+=3){let t=a[e],i=a[e+1],r=a[e+2];t<I.x&&(I.x=t),i<I.y&&(I.y=i),r<I.z&&(I.z=r),t>y.x&&(y.x=t),i>y.y&&(y.y=i),r>y.z&&(y.z=r)}T&&(I.x-=I.x*T.x+T.y,I.y-=I.y*T.x+T.y,I.z-=I.z*T.x+T.y,y.x+=y.x*T.x+T.y,y.y+=y.y*T.x+T.y,y.z+=y.z*T.x+T.y),p.minimizeInPlace(I),_.maximizeInPlace(y),t.Matrix.FromArrayToRef(u,16*i,x),T?function(e,i,r,s,n){let a=t.TmpVectors.Vector3[7],o=t.TmpVectors.Vector3[8];for(let h=0;h<2;++h)for(let l=0;l<2;++l)for(let c=0;c<2;++c)a.set(h?i.x:e.x,l?i.y:e.y,c?i.z:e.z),t.Vector3.TransformCoordinatesToRef(a,r,o),s.minimizeInPlace(o),n.maximizeInPlace(o)}(I,y,x,m,g):function(e,i,r,s,n){let a=t.TmpVectors.Vector3[7];for(let o=0;o<3*i;o+=3)t.Vector3.TransformCoordinatesFromFloatsToRef(e[o],e[o+1],e[o+2],r,a),s.minimizeInPlace(a),n.maximizeInPlace(a)}(a,M,x,m,g)}if(!isFinite(p.x)||!isFinite(m.x))return!1;e.getBoundingInfo().reConstruct(m,g),e.rawBoundingInfo=new r.BoundingInfo(p,_);var S=e.rawBoundingInfo;i.length=0;for(let e=0;e<S.boundingBox.vectors.length;++e)i.push(S.boundingBox.vectors[e].clone());return e._updateBoundingInfo(),!0}(this,l,s))return;h&&this.bakedVertexAnimationManager?.isEnabled&&o(this)?this.refreshBoundingInfo({applySkeleton:i,applyMorph:s,applyBakedVertexAnimation:!0,updatePositionsArray:!1}):this.refreshBoundingInfo(i,s);let e=this.getBoundingInfo();this.rawBoundingInfo=new r.BoundingInfo(e.minimum,e.maximum)}let c=this.getBoundingInfo(),u=this._thinInstanceDataStorage.matrixData;if(0===l.length)for(let e=0;e<c.boundingBox.vectors.length;++e)l.push(c.boundingBox.vectors[e].clone());t.TmpVectors.Vector3[0].setAll(1/0),t.TmpVectors.Vector3[1].setAll(-1/0);for(let e=0;e<this._thinInstanceDataStorage.instancesCount;++e){t.Matrix.FromArrayToRef(u,16*e,t.TmpVectors.Matrix[0]);for(let e=0;e<l.length;++e)t.Vector3.TransformCoordinatesToRef(l[e],t.TmpVectors.Matrix[0],t.TmpVectors.Vector3[2]),t.TmpVectors.Vector3[0].minimizeInPlace(t.TmpVectors.Vector3[2]),t.TmpVectors.Vector3[1].maximizeInPlace(t.TmpVectors.Vector3[2])}c.reConstruct(t.TmpVectors.Vector3[0],t.TmpVectors.Vector3[1]),this._updateBoundingInfo()},s.Mesh.prototype._thinInstanceRecreateBuffer=function(e,t=!0){"matrix"===e?(this._thinInstanceDataStorage.matrixBuffer?.dispose(),this._thinInstanceDataStorage.matrixBuffer=this._thinInstanceCreateMatrixBuffer("world",this._thinInstanceDataStorage.matrixData,t)):"previousMatrix"===e?this._scene.needsPreviousWorldMatrices&&(this._thinInstanceDataStorage.previousMatrixBuffer?.dispose(),this._thinInstanceDataStorage.previousMatrixBuffer=this._thinInstanceCreateMatrixBuffer("previousWorld",this._thinInstanceDataStorage.previousMatrixData??this._thinInstanceDataStorage.matrixData,t)):(e===n.VertexBuffer.ColorKind&&(e=n.VertexBuffer.ColorInstanceKind),this._userThinInstanceBuffersStorage.vertexBuffers[e]?.dispose(),this._userThinInstanceBuffersStorage.vertexBuffers[e]=new n.VertexBuffer(this.getEngine(),this._userThinInstanceBuffersStorage.data[e],e,!t,!1,this._userThinInstanceBuffersStorage.strides[e],!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[e]))},s.Mesh.prototype._thinInstanceUpdateBufferSize=function(e,t=1){e===n.VertexBuffer.ColorKind&&(e=n.VertexBuffer.ColorInstanceKind);let i="matrix"===e;if(!i&&(!this._userThinInstanceBuffersStorage||!this._userThinInstanceBuffersStorage.strides[e]))return;let r=i?16:this._userThinInstanceBuffersStorage.strides[e],s=i?this._thinInstanceDataStorage.matrixBufferSize:this._userThinInstanceBuffersStorage.sizes[e],a=i?this._thinInstanceDataStorage.matrixData:this._userThinInstanceBuffersStorage.data[e],o=(this._thinInstanceDataStorage.instancesCount+t)*r,h=s;for(;h<o;)h*=2;if(!a||s!=h){if(a){let e=new Float32Array(h);e.set(a,0),a=e}else a=new Float32Array(h);i?(this._thinInstanceDataStorage.matrixBuffer?.dispose(),this._thinInstanceDataStorage.matrixBuffer=this._thinInstanceCreateMatrixBuffer("world",a,!1),this._thinInstanceDataStorage.matrixData=a,this._thinInstanceDataStorage.matrixBufferSize=h,this._scene.needsPreviousWorldMatrices&&!this._thinInstanceDataStorage.previousMatrixData&&(this._thinInstanceDataStorage.previousMatrixBuffer?.dispose(),this._thinInstanceDataStorage.previousMatrixBuffer=this._thinInstanceCreateMatrixBuffer("previousWorld",a,!1))):(this._userThinInstanceBuffersStorage.vertexBuffers[e]?.dispose(),this._userThinInstanceBuffersStorage.data[e]=a,this._userThinInstanceBuffersStorage.sizes[e]=h,this._userThinInstanceBuffersStorage.vertexBuffers[e]=new n.VertexBuffer(this.getEngine(),a,e,!0,!1,r,!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[e]))}},s.Mesh.prototype._thinInstanceInitializeUserStorage=function(){this._userThinInstanceBuffersStorage||(this._userThinInstanceBuffersStorage={data:{},sizes:{},vertexBuffers:{},strides:{}})},s.Mesh.prototype._disposeThinInstanceSpecificData=function(){this._thinInstanceDataStorage?.matrixBuffer&&(this._thinInstanceDataStorage.matrixBuffer.dispose(),this._thinInstanceDataStorage.matrixBuffer=null),this._thinInstanceDataStorage?.previousMatrixBuffer&&(this._thinInstanceDataStorage.previousMatrixBuffer.dispose(),this._thinInstanceDataStorage.previousMatrixBuffer=null)})}e.s(["RegisterThinInstanceMesh",0,l],5761),l(),e.s([],90753)},3739,e=>{"use strict";let t,i,r;var s,n=e.i(4112),a=e.i(94810),o=e.i(40379),h=e.i(46202),l=e.i(72986),c=e.i(85789),u=e.i(95708),d=e.i(91679);let f=null;async function p(){let t=l.EngineStore.LastCreatedEngine?.createCanvas(100,100)??new OffscreenCanvas(100,100);t instanceof OffscreenCanvas&&c.Logger.Warn("DumpData: OffscreenCanvas will be used for dumping data. This may result in lossy alpha values.");let{ThinEngine:i}=await e.A(46040);if(!i.IsSupported)throw Error("DumpData: No WebGL context available. Cannot dump data.");let r=new i(t,!1,{preserveDrawingBuffer:!0,depth:!1,stencil:!1,alpha:!0,premultipliedAlpha:!1,antialias:!1,failIfMajorPerformanceCaveat:!1});l.EngineStore.Instances.pop(),l.EngineStore.OnEnginesDisposedObservable.add(e=>{r&&e!==r&&!r.isDisposed&&0===l.EngineStore.Instances.length&&T()}),r.getCaps().parallelShaderCompile=void 0;let s=new a.EffectRenderer(r),{passPixelShader:n}=await e.A(78757),o=new a.EffectWrapper({engine:r,name:n.name,fragmentShader:n.shader,samplerNames:["textureSampler"]});return{canvas:t,dumpEngine:{engine:r,renderer:s,wrapper:o}}}async function _(){return f||(f=p()),await f}let m=(i=[],s=class{static async EncodeImageAsync(e,t,i,r,s,n){let a=await _(),h=a.dumpEngine;h.engine.setSize(t,i,!0);let l=h.engine.createRawTexture(e,t,i,5,!1,!s,1);return h.renderer.setViewport(),h.renderer.applyEffectWrapper(h.wrapper),h.wrapper.effect._bindTexture("textureSampler",l),h.renderer.draw(),l.dispose(),await new Promise((e,t)=>{o.Tools.ToBlob(a.canvas,i=>{i?e(i):t(Error("EncodeImageAsync: Failed to convert canvas to blob."))},r,n)})}},r="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0,t=[d.nativeOverride],(0,n.__esDecorate)(s,null,t,{kind:"method",name:"EncodeImageAsync",static:!0,private:!1,access:{has:e=>"EncodeImageAsync"in e,get:e=>e.EncodeImageAsync},metadata:r},null,i),r&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),(0,n.__runInitializers)(s,i),s),g=m.EncodeImageAsync;async function I(e,t,i,r,s="image/png",n,a){let o=new Uint8Array((await i.readPixels(0,0,e,t)).buffer);x(e,t,o,r,s,n,!0,void 0,a)}async function y(e,t,i,r="image/png",s,n=!1,a=!1,l){if(i instanceof Float32Array){let e=new Uint8Array(i.length),t=i.length;for(;t--;){let r=i[t];e[t]=Math.round(255*(0,h.Clamp)(r))}i=e}let d=await m.EncodeImageAsync(i,e,t,r,n,l);void 0!==s&&o.Tools.DownloadBlob(d,s),d.type!==r&&c.Logger.Warn(`DumpData: The requested mimeType '${r}' is not supported. The result has mimeType '${d.type}' instead.`);let f=await d.arrayBuffer();return a?f:`data:${r};base64,${(0,u.EncodeArrayBufferToBase64)(f)}`}function x(e,t,i,r,s="image/png",n,a=!1,o=!1,h){void 0!==n||r||(n=""),y(e,t,i,s,n,a,o,h).then(e=>{r&&r(e)})}function T(){f&&(f?.then(e=>{e.canvas instanceof HTMLCanvasElement&&e.canvas.remove(),e.dumpEngine&&(e.dumpEngine.engine.dispose(),e.dumpEngine.renderer.dispose(),e.dumpEngine.wrapper.dispose())}),f=null)}let M=!1;e.s(["Dispose",0,T,"DumpData",0,x,"DumpDataAsync",0,y,"DumpFramebuffer",0,I,"DumpTools",0,{DumpData:x,DumpDataAsync:y,DumpFramebuffer:I,Dispose:T},"EncodeImageAsync",0,g,"RegisterDumpTools",0,function(){M||(M=!0,o.Tools.DumpData=x,o.Tools.DumpDataAsync=y,o.Tools.DumpFramebuffer=I)}])},95358,e=>{"use strict";var t=e.i(92929),i=e.i(72003),r=e.i(46202),s=e.i(27952),n=e.i(55080),a=e.i(79452),o=(e.i(87710),e.i(33760)),h=e.i(85789),l=e.i(41339),c=e.i(3739),u=e.i(63615);let d="image/png",f=[134,22,135,150,246,214,150,54];function p(e){if(e.version>2)throw Error(`Unsupported babylon environment map version "${e.version}". Latest supported version is "2".`);return 2===e.version?e:e={...e,version:2,imageType:d}}async function _(e,t,i,r,s,n,a,o,h,l,c){return await new Promise((u,d)=>{if(i){let i=t.createTexture(null,!0,!0,null,1,null,e=>{d(e)},e);r?.onEffectCreatedObservable.addOnce(o=>{o.executeWhenCompiled(()=>{r.externalTextureSamplerBinding=!0,r.onApply=r=>{r._bindTexture("textureSampler",i),r.setFloat2("scale",1,t._features.needsInvertingBitmap&&e instanceof ImageBitmap?-1:1)},t.scenes.length&&(t.scenes[0].postProcessManager.directRender([r],l,!0,n,a),t.restoreDefaultFramebuffer(),i.dispose(),URL.revokeObjectURL(s),u())})})}else{if(t._uploadImageToTexture(c,e,n,a),o){let i=h[a];i&&t._uploadImageToTexture(i._texture,e,n,0)}u()}})}async function m(e,t,i=d){let r=e.getEngine();e.format=5,e.type=0,e.generateMipMaps=!0,e._cachedAnisotropicFilteringLevel=null,r.updateTextureSamplingMode(3,e),await I(e,t,!0,i),e.isReady=!0}async function g(e,t,i,r=d,s=null){let o=e.getEngine(),h=new n.InternalTexture(o,5),l=new a.BaseTexture(o,h);e._irradianceTexture=l,l._dominantDirection=s,h.isCube=!0,h.format=5,h.type=0,h.generateMipMaps=!0,h._cachedAnisotropicFilteringLevel=null,h.generateMipMaps=!0,h.width=i,h.height=i,o.updateTextureSamplingMode(3,h),await I(h,[t],!1,r),o.generateMipMapsForCubemap(h),h.isReady=!0}async function I(i,s,h,l=d){if(!(0,t.IsExponentOfTwo)(i.width))throw Error("Texture size must be a power of two");let c=(0,r.ILog2)(i.width)+1,f=i.getEngine(),p=!1,m=!1,g=null,y=null,x=null,T=f.getCaps();T.textureLOD?f._features.supportRenderAndCopyToLodForFloatTextures?T.textureHalfFloatRender&&T.textureHalfFloatLinearFiltering?(p=!0,i.type=2):T.textureFloatRender&&T.textureFloatLinearFiltering&&(p=!0,i.type=1):p=!1:(p=!1,m=h);let M=0;if(p)f.isWebGPU?(M=1,await e.A(1084)):await e.A(42032),g=new o.PostProcess("rgbdDecode","rgbdDecode",null,null,1,null,3,f,!1,void 0,i.type,void 0,null,!1,void 0,M),i._isRGBD=!1,i.invertY=!1,y=f.createRenderTargetCubeTexture(i.width,{generateDepthBuffer:!1,generateMipMaps:!0,generateStencilBuffer:!1,samplingMode:3,type:i.type,format:5});else if(i._isRGBD=!0,i.invertY=!0,m){x={};let e=i._lodGenerationScale,t=i._lodGenerationOffset;for(let r=0;r<3;r++){let s=(c-1)*e+t,o=Math.round(Math.min(Math.max(t+(s-t)*(1-r/2),0),s)),h=new n.InternalTexture(f,2);h.isCube=!0,h.invertY=!0,h.generateMipMaps=!1,f.updateTextureSamplingMode(2,h);let l=new a.BaseTexture(null);switch(l._isCube=!0,l._texture=h,x[o]=l,r){case 0:i._lodTextureLow=l;break;case 1:i._lodTextureMid=l;break;case 2:i._lodTextureHigh=l}}}let S=[];for(let e=0;e<s.length;e++)for(let t=0;t<6;t++){let r,n=s[e][t],a=new Blob([(0,u.GetBlobBufferSource)(n)],{type:l}),o=URL.createObjectURL(a);if(f._features.forceBitmapOverHTMLImageElement)r=f.createImageBitmap(a,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then(async r=>await _(r,f,p,g,o,t,e,m,x,y,i));else{let s=new Image;s.src=o,r=new Promise((r,n)=>{s.onload=()=>{_(s,f,p,g,o,t,e,m,x,y,i).then(()=>r()).catch(e=>{n(e)})},s.onerror=e=>{n(e)}})}S.push(r)}if(await Promise.all(S),s.length<c){let e,t=Math.pow(2,c-1-s.length),r=t*t*4;switch(i.type){case 0:e=new Uint8Array(r);break;case 2:e=new Uint16Array(r);break;case 1:e=new Float32Array(r)}for(let t=s.length;t<c;t++)for(let r=0;r<6;r++)f._uploadArrayBufferViewToTexture(y?.texture||i,e,r,t)}if(y){let e=i._irradianceTexture;i._irradianceTexture=null,f._releaseTexture(i),y._swapAndDie(i),i._irradianceTexture=e}g&&g.dispose(),m&&(i._lodTextureHigh&&i._lodTextureHigh._texture&&(i._lodTextureHigh._texture.isReady=!0),i._lodTextureMid&&i._lodTextureMid._texture&&(i._lodTextureMid._texture.isReady=!0),i._lodTextureLow&&i._lodTextureLow._texture&&(i._lodTextureLow._texture.isReady=!0))}e.s(["GetEnvInfo",0,function(e){let t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),r=0;for(let e=0;e<f.length;e++)if(i.getUint8(r++)!==f[e])return h.Logger.Error("Not a babylon environment map"),null;let s="";for(;t=i.getUint8(r++);)s+=String.fromCharCode(t);let n=JSON.parse(s);return(n=p(n)).binaryDataPosition=r,n.specular&&(n.specular.lodGenerationScale=n.specular.lodGenerationScale||.8),n},"UploadEnvLevelsAsync",0,function(e,t,r){let s=(r=p(r)).specular;if(!s)return Promise.resolve([]);e._lodGenerationScale=s.lodGenerationScale;let n=[],a=function(e,t){let i=(t=p(t)).specular,r=Math.log2(t.width);if(r=Math.round(r)+1,i.mipmaps.length!==6*r)throw Error(`Unsupported specular mipmaps number "${i.mipmaps.length}"`);let s=Array(r);for(let n=0;n<r;n++){s[n]=Array(6);for(let r=0;r<6;r++){let a=i.mipmaps[6*n+r];s[n][r]=new Uint8Array(e.buffer,e.byteOffset+t.binaryDataPosition+a.position,a.length)}}return s}(t,r);n.push(m(e,a,r.imageType));let o=r.irradiance?.irradianceTexture;if(o){let s=function(e,t){t=p(t);let i=Array(6),r=t.irradiance?.irradianceTexture;if(r){if(6!==r.faces.length)throw Error(`Incorrect irradiance texture faces number "${r.faces.length}"`);for(let s=0;s<6;s++){let n=r.faces[s];i[s]=new Uint8Array(e.buffer,e.byteOffset+t.binaryDataPosition+n.position,n.length)}}return i}(t,r),a=null;r.irradiance?.irradianceTexture?.dominantDirection&&(a=i.Vector3.FromArray(r.irradiance.irradianceTexture.dominantDirection)),n.push(g(e,s,o.size,r.imageType,a))}return Promise.all(n)},"UploadEnvSpherical",0,function(e,t){let r=(t=p(t)).irradiance;if(!r)return;let n=new s.SphericalPolynomial;i.Vector3.FromArrayToRef(r.x,0,n.x),i.Vector3.FromArrayToRef(r.y,0,n.y),i.Vector3.FromArrayToRef(r.z,0,n.z),i.Vector3.FromArrayToRef(r.xx,0,n.xx),i.Vector3.FromArrayToRef(r.yy,0,n.yy),i.Vector3.FromArrayToRef(r.zz,0,n.zz),i.Vector3.FromArrayToRef(r.yz,0,n.yz),i.Vector3.FromArrayToRef(r.zx,0,n.zx),i.Vector3.FromArrayToRef(r.xy,0,n.xy),e._sphericalPolynomial=n},"_UpdateRGBDAsync",0,function(e,t,i,r,s){let n=m(e.getEngine().createRawCubeTexture(null,e.width,e.format,e.type,e.generateMipMaps,e.invertY,e.samplingMode,e._compression),t).then(()=>e);return e.onRebuildCallback=e=>({proxy:n,isReady:!0,isAsync:!0}),e._source=13,e._bufferViewArrayArray=t,e._lodGenerationScale=r,e._lodGenerationOffset=s,e._sphericalPolynomial=i,m(e,t).then(()=>(e.isReady=!0,e))}])},6939,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)})}])},85789,e=>{"use strict";class t{static _CheckLimit(e,i){let r=t._LogLimitOutputs[e];return r?r.current++:(r={limit:i,current:1},t._LogLimitOutputs[e]=r),r.current<=r.limit}static _GenerateLimitMessage(e,i=1){let r=t._LogLimitOutputs[e];if(!r||!t.MessageLimitReached)return;let s=this._Levels[i];r.current===r.limit&&t[s.name](t.MessageLimitReached.replace(/%LIMIT%/g,""+r.limit).replace(/%TYPE%/g,s.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,i=new Date;return"["+t(i.getHours())+":"+t(i.getMinutes())+":"+t(i.getSeconds())+"]: "+e}static _LogDisabled(e,t){}static _LogEnabled(e=1,i,r){let s=Array.isArray(i)?i[0]:i;if(void 0!==r&&!t._CheckLimit(s,r))return;let n=t._FormatMessage(s),a=this._Levels[e],o=Array.isArray(i)?i.slice(1):[];a.logFunc&&a.logFunc("BJS - "+n,...o);let h=`<div style='color:${a.color}'>${n}</div><br>`;t._AddLogEntry(h),t._GenerateLimitMessage(s,e)}static get LogCache(){return t._LogCache}static ClearLogCache(){t._LogCache="",t._LogLimitOutputs={},t.errorsCount=0}static set LogLevels(e){for(let i of(t.Log=t._LogDisabled,t.Warn=t._LogDisabled,t.Error=t._LogDisabled,[t.MessageLogLevel,t.WarningLogLevel,t.ErrorLogLevel]))(e&i)===i&&(t[this._Levels[i].name]=t._LogEnabled.bind(t,i))}}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])},69874,e=>{"use strict";class t{constructor(e){this._pendingActions=[],this._workerInfos=e.map(e=>({workerPromise:Promise.resolve(e),idle:!0}))}dispose(){for(let e of this._workerInfos)e.workerPromise.then(e=>{e.terminate()});this._workerInfos.length=0,this._pendingActions.length=0}push(e){this._executeOnIdleWorker(e)||this._pendingActions.push(e)}_executeOnIdleWorker(e){for(let t of this._workerInfos)if(t.idle)return this._execute(t,e),!0;return!1}_execute(e,t){e.idle=!1,e.workerPromise.then(i=>{t(i,()=>{let t=this._pendingActions.shift();t?this._execute(e,t):e.idle=!0})})}}class i extends t{constructor(e,t,r=i.DefaultOptions){super([]),this._maxWorkers=e,this._createWorkerAsync=t,this._options=r}push(e){if(!this._executeOnIdleWorker(e))if(this._workerInfos.length<this._maxWorkers){let t={workerPromise:this._createWorkerAsync(),idle:!1};this._workerInfos.push(t),this._execute(t,e)}else this._pendingActions.push(e)}_execute(e,t){e.timeoutId&&(clearTimeout(e.timeoutId),delete e.timeoutId),super._execute(e,(i,r)=>{t(i,()=>{r(),e.idle&&(e.timeoutId=setTimeout(()=>{e.workerPromise.then(e=>{e.terminate()});let t=this._workerInfos.indexOf(e);-1!==t&&this._workerInfos.splice(t,1)},this._options.idleTimeElapsedBeforeRelease))})})}}i.DefaultOptions={idleTimeElapsedBeforeRelease:1e3},e.s(["AutoReleaseWorkerPool",0,i])},76723,e=>{"use strict";var t=e.i(37096);e.i(13870);var i=e.i(97009);class r extends t.FlowGraphBlock{constructor(e){super(e);const t=e.glTF,r=t?.animations?.map(e=>e._babylonAnimationGroup)||[];this.animationGroups=this.registerDataOutput("animationGroups",i.RichTypeAny,r);const s=t?.nodes?.map(e=>e._babylonTransformNode)||[];this.nodes=this.registerDataOutput("nodes",i.RichTypeAny,s)}getClassName(){return"FlowGraphGLTFDataProvider"}}e.s(["FlowGraphGLTFDataProvider",0,r])}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33015,s=>{s.v(t=>Promise.all(["static/chunks/3qye1lytea2i8.js","static/chunks/0thw099xk3_0p.js"].map(t=>s.l(t))).then(()=>t(55810)))},78573,s=>{s.v(t=>Promise.all(["static/chunks/11km5p4gd0ut4.js"].map(t=>s.l(t))).then(()=>t(48939)))},70162,s=>{s.v(t=>Promise.all(["static/chunks/2ws1s9d52ayv8.js"].map(t=>s.l(t))).then(()=>t(19399)))},21269,s=>{s.v(t=>Promise.all(["static/chunks/24pq9210rng3f.js"].map(t=>s.l(t))).then(()=>t(39592)))},44113,s=>{s.v(t=>Promise.all(["static/chunks/2x7enks3ydgai.js","static/chunks/3beawo-qwuk8k.js"].map(t=>s.l(t))).then(()=>t(76421)))},47410,s=>{s.v(t=>Promise.all(["static/chunks/0dmrdrwtd093b.js"].map(t=>s.l(t))).then(()=>t(53993)))},19723,s=>{s.v(t=>Promise.all(["static/chunks/3g3-e9m1en45q.js","static/chunks/3-m_vzabs1uez.js"].map(t=>s.l(t))).then(()=>t(94452)))},85461,s=>{s.v(t=>Promise.all(["static/chunks/0n8n481szj90g.js"].map(t=>s.l(t))).then(()=>t(57092)))}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,25346,t=>{t.v(e=>Promise.all(["static/chunks/43v4y2gu5z9_h.js","static/chunks/0q75860p8u_ii.js","static/chunks/1vrpzlif-z_p0.js","static/chunks/2701xfv_07wz_.js","static/chunks/0nhljhguceh66.js","static/chunks/2bettxaqt3d2p.js","static/chunks/0xa9dyg6ezzyd.js","static/chunks/2apnpj0-fs9ks.js","static/chunks/08lvtnv7b1cxp.js","static/chunks/3zkwt0gybqtgm.js","static/chunks/2ofwtw6p08sfz.js","static/chunks/36enkx1skkv2-.js","static/chunks/3rlp9yr75liz7.js"].map(e=>t.l(e))).then(()=>e(61238)))},8179,t=>{t.v(e=>Promise.all(["static/chunks/1vrpzlif-z_p0.js","static/chunks/3d-i_skta_wes.js","static/chunks/0q75860p8u_ii.js","static/chunks/2ofwtw6p08sfz.js","static/chunks/0nhljhguceh66.js","static/chunks/03bd5plut08tg.js","static/chunks/2701xfv_07wz_.js","static/chunks/36enkx1skkv2-.js","static/chunks/0xa9dyg6ezzyd.js","static/chunks/08lvtnv7b1cxp.js"].map(e=>t.l(e))).then(()=>e(86790)))},45852,t=>{t.v(e=>Promise.all(["static/chunks/0u85f0dhb4i8e.js","static/chunks/2ydub0t01728d.js","static/chunks/0q75860p8u_ii.js","static/chunks/0fxdyvb1w23d1.js","static/chunks/0xa9dyg6ezzyd.js","static/chunks/08lvtnv7b1cxp.js","static/chunks/0e7nlxmneb2j_.js","static/chunks/36enkx1skkv2-.js","static/chunks/0fxhc24djjcgq.js"].map(e=>t.l(e))).then(()=>e(69260)))},19257,t=>{t.v(e=>Promise.all(["static/chunks/15jlgfcaeaki9.js","static/chunks/1pgs-98tfkq9_.js","static/chunks/0q75860p8u_ii.js","static/chunks/36enkx1skkv2-.js","static/chunks/0lbs5xdyjuzuo.js","static/chunks/2701xfv_07wz_.js"].map(e=>t.l(e))).then(()=>e(33738)))},76269,t=>{t.v(e=>Promise.all(["static/chunks/1ncqwe81t_9_x.js","static/chunks/3ksq69yq-40_r.js","static/chunks/1vrpzlif-z_p0.js","static/chunks/2701xfv_07wz_.js","static/chunks/0q75860p8u_ii.js","static/chunks/2w_ptlw-ad8-9.js","static/chunks/1f2mna0k5efeq.js","static/chunks/36enkx1skkv2-.js","static/chunks/08lvtnv7b1cxp.js","static/chunks/03bd5plut08tg.js","static/chunks/0nhljhguceh66.js","static/chunks/2apnpj0-fs9ks.js","static/chunks/0xa9dyg6ezzyd.js"].map(e=>t.l(e))).then(()=>e(37719)))},69819,t=>{t.v(e=>Promise.all(["static/chunks/1gr35qeguuws0.js","static/chunks/36enkx1skkv2-.js","static/chunks/0q75860p8u_ii.js"].map(e=>t.l(e))).then(()=>e(81591)))},67116,t=>{t.v(e=>Promise.all(["static/chunks/0p6z73afb9dj2.js","static/chunks/1vrpzlif-z_p0.js","static/chunks/0lep3_bqwfuin.js","static/chunks/0xvrfvur0p534.js","static/chunks/0nhljhguceh66.js","static/chunks/2q6l-xdqzgmpf.js","static/chunks/1d9it6yocgt54.js","static/chunks/0q75860p8u_ii.js","static/chunks/08lvtnv7b1cxp.js","static/chunks/2apnpj0-fs9ks.js","static/chunks/2701xfv_07wz_.js","static/chunks/36enkx1skkv2-.js","static/chunks/21kfpd_bityxt.js","static/chunks/03bd5plut08tg.js","static/chunks/2ofwtw6p08sfz.js","static/chunks/3zkwt0gybqtgm.js","static/chunks/0xa9dyg6ezzyd.js"].map(e=>t.l(e))).then(()=>e(36995)))},21020,t=>{t.v(e=>Promise.all(["static/chunks/1dr7gh6xgypl8.js","static/chunks/1vrpzlif-z_p0.js","static/chunks/2701xfv_07wz_.js","static/chunks/0nhljhguceh66.js","static/chunks/0q75860p8u_ii.js","static/chunks/3zkwt0gybqtgm.js","static/chunks/0xa9dyg6ezzyd.js","static/chunks/2apnpj0-fs9ks.js","static/chunks/08lvtnv7b1cxp.js","static/chunks/36enkx1skkv2-.js","static/chunks/26skkagvj1z96.js"].map(e=>t.l(e))).then(()=>e(21931)))},32502,t=>{t.v(e=>Promise.all(["static/chunks/44cer242u-f8v.js","static/chunks/1vrpzlif-z_p0.js","static/chunks/0q75860p8u_ii.js","static/chunks/0nhljhguceh66.js","static/chunks/36enkx1skkv2-.js","static/chunks/08lvtnv7b1cxp.js","static/chunks/2701xfv_07wz_.js","static/chunks/03bd5plut08tg.js","static/chunks/0xa9dyg6ezzyd.js"].map(e=>t.l(e))).then(()=>e(13455)))},2348,2413,t=>{"use strict";let e=1/1.2;t.s(["ZOOM_IN_FACTOR",0,e,"ZOOM_OUT_FACTOR",0,1.2,"attachDoubleClickFocus",0,function(t,e,s){let n=()=>{let e=t.pick(t.pointerX,t.pointerY);e?.hit&&e.pickedPoint&&s.setTarget(e.pickedPoint)};return e.addEventListener("dblclick",n),()=>e.removeEventListener("dblclick",n)},"disableWheelZoom",0,function(t){t.inputs.removeByType("ArcRotateCameraMouseWheelInput")},"resetFocus",0,function(t,e){t.setTarget(e.target),t.alpha=e.alpha,t.beta=e.beta,t.radius=e.radius},"stepZoom",0,function(t,e){let s=t.lowerRadiusLimit??.01,n=t.upperRadiusLimit??1/0;t.radius=Math.min(n,Math.max(s,t.radius*e))}],2348);var s=t.i(61284);t.s(["ZoomButtons",0,function({onZoom:t,onReset:n}){let a="grid h-8 w-8 place-items-center rounded-md border border-edge bg-ink/80 text-lg leading-none text-fg backdrop-blur transition hover:bg-ink hover:text-white";return(0,s.jsxs)("div",{className:"absolute right-3 top-3 flex flex-col gap-1",children:[(0,s.jsx)("button",{type:"button","aria-label":"Zoom in",className:a,onClick:()=>t(e),children:"+"}),(0,s.jsx)("button",{type:"button","aria-label":"Zoom out",className:a,onClick:()=>t(1.2),children:"−"}),n?(0,s.jsx)("button",{type:"button","aria-label":"Reset camera focus to center",title:"Reset focus to center",className:a,onClick:n,children:(0,s.jsxs)("svg",{viewBox:"0 0 16 16",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round","aria-hidden":"true",children:[(0,s.jsx)("circle",{cx:"8",cy:"8",r:"3"}),(0,s.jsx)("path",{d:"M8 1v2.5M8 12.5V15M1 8h2.5M12.5 8H15"})]})}):null]})}],2413)},87456,t=>{"use strict";t.s(["attachMeshHover",0,function(t,e,s){let n=0,a=null,i=e=>{let i=e.offsetX,c=e.offsetY;n||(n=requestAnimationFrame(()=>{var e,l;let r;n=0;let u=t.pick(i,c,t=>t.isPickable&&t.isEnabled()),o=u?.pickedMesh?(e=u.pickedMesh,l=u.thinInstanceIndex??-1,(r=e.metadata)?l>=0&&r.hoverLabels?r.hoverLabels[l]??null:r.hoverLabel??null:null):null;o?s({label:o,x:i,y:c}):null!==a&&s(null),a=o}))},c=()=>{n&&(cancelAnimationFrame(n),n=0),null!==a&&(a=null,s(null))};return e.addEventListener("pointermove",i),e.addEventListener("pointerleave",c),()=>{e.removeEventListener("pointermove",i),e.removeEventListener("pointerleave",c),n&&cancelAnimationFrame(n)}}])},53993,t=>{"use strict";var e=t.i(61284),s=t.i(60951),n=t.i(56054),a=t.i(2348),i=t.i(87456),c=t.i(18637),l=t.i(2413);function r({shape:t,onChange:s}){let n=t=>`h-8 px-2.5 text-xs font-medium leading-none transition first:rounded-l-md last:rounded-r-md ${t?"bg-ink text-white":"bg-ink/80 text-fg hover:text-white"}`,a="sphere"===t,i="cube"===t;return(0,e.jsxs)("div",{className:"absolute left-3 top-3 flex overflow-hidden rounded-md border border-edge backdrop-blur",role:"group","aria-label":"Voxel marker shape",children:[(0,e.jsx)("button",{type:"button",className:n(a),"aria-pressed":a,onClick:()=>s("sphere"),children:"Spheres"}),(0,e.jsx)("button",{type:"button",className:n(i),"aria-pressed":i,onClick:()=>s("cube"),children:"Cubes"})]})}t.s(["WorldHeatmap3DView",0,function({voxels:u,cellSize:o,proxyMeshes:h=[],legendTitle:d="Pointer-hit density",legendLow:k="few hits",legendHigh:p="most hits",legendNote:b="Each marker is a voxel where the pointer hit your scene. Color & size scale with hits, normalized to the 95th-percentile cell so a few hotspots don't wash out the rest.",emptyLabel:j="No 3D hit-points in range.",totals:m,voxelLabels:f}){let v=(0,s.useRef)(null),x=(0,s.useRef)(null),g=(0,s.useRef)(null),[w,y]=(0,s.useState)("loading"),[z,_]=(0,s.useState)(null),[M,q]=(0,s.useState)("sphere"),[L,A]=(0,s.useState)(null),C=(0,s.useRef)(u),P=(0,s.useRef)(h),R=(0,s.useRef)(f);C.current=u,P.current=h,R.current=f;let S=(0,s.useRef)(null),F=u.length>0||h.length>0;(0,s.useEffect)(()=>{let e=v.current;if(!e)return;if(!F)return void y("empty");let s=!1,c=null;return y("loading"),_(null),(async()=>{try{let[{Engine:l},{Scene:r},{ArcRotateCamera:u},{HemisphericLight:h},{Vector3:d,Color3:k,Color4:p,Matrix:b},{MeshBuilder:j},{StandardMaterial:m}]=await Promise.all([t.A(45852),t.A(32502),t.A(25346),t.A(19257),t.A(69819),t.A(67116),t.A(76269),t.A(21020),t.A(8179)]);if(s)return;let f=C.current,v=P.current,w=0,z=0,_=0,q=0;for(let t of f)w+=(t.vx+.5)*o,z+=(t.vy+.5)*o,_+=(t.vz+.5)*o,q++;if(0===q)for(let t of v)w+=(t.aabb[0]+t.aabb[3])/2,z+=(t.aabb[1]+t.aabb[4])/2,_+=(t.aabb[2]+t.aabb[5])/2,q++;let L=new d(w/q,z/q,_/q),F=4*o;for(let t of f){let e=(t.vx+.5)*o-L.x,s=(t.vy+.5)*o-L.y,n=(t.vz+.5)*o-L.z;F=Math.max(F,Math.sqrt(e*e+s*s+n*n))}for(let t of v){let e=(t.aabb[0]+t.aabb[3])/2-L.x,s=(t.aabb[1]+t.aabb[4])/2-L.y,n=(t.aabb[2]+t.aabb[5])/2-L.z;F=Math.max(F,Math.sqrt(e*e+s*s+n*n))}let E=new l(e,!0,{preserveDrawingBuffer:!1}),B=new r(E);B.clearColor=new p(.04,.05,.07,1);let T=new u("world-cam",Math.PI/4,Math.PI/3,2.4*F,L,B);T.attachControl(e,!0),(0,a.disableWheelZoom)(T),x.current=T,g.current={target:L,alpha:T.alpha,beta:T.beta,radius:T.radius},new h("world-light",new d(.4,1,.3),B);let N=Math.max(.02*F,.25*o)/(.9*o),I=T.radius,Z="cube"===M?j.CreateBox("world-voxel",{size:.9*o},B):j.CreateSphere("world-voxel",{diameter:.9*o,segments:6},B),O=new m("world-voxel-mat",B);O.diffuseColor=new k(1,1,1),O.specularColor=new k(0,0,0),Z.material=O;let $=0,H=new Float32Array(0),D=new Float32Array(0),V=-1,W=()=>{if(0===$)return;let t=Math.min(8,Math.max(.6,T.radius/I));if(!(.01>Math.abs(t-V))){V=t;for(let e=0;e<$;e++){let s=D[e]*t,n=16*e;H[n]=s,H[n+5]=s,H[n+10]=s}Z.thinInstanceBufferUpdated("matrix")}};B.onBeforeRenderObservable.add(W);let U=null,K="\0",X=()=>{(()=>{let t=P.current,e=t.map(t=>`${t.name}:${t.aabb.join(",")}`).join("|");if(e===K||(K=e,U&&(U.dispose(!1,!0),U=null),0===t.length))return;U=j.CreateBox("scene-proxy",{size:1},B);let s=new m("scene-proxy-mat",B);s.wireframe=!0,s.disableLighting=!0,s.emissiveColor=new k(.32,.4,.52),s.alpha=.35,U.material=s,U.isPickable=!0,U.thinInstanceEnablePicking=!0,U.metadata={hoverLabels:t.map(t=>t.name)};let n=t.length,a=new Float32Array(16*n);for(let e=0;e<n;e++){let s=t[e].aabb,n=Math.max(s[3]-s[0],.001),i=Math.max(s[4]-s[1],.001),c=Math.max(s[5]-s[2],.001);b.Scaling(n,i,c).multiply(b.Translation((s[0]+s[3])/2,(s[1]+s[4])/2,(s[2]+s[5])/2)).copyToArray(a,16*e)}U.thinInstanceSetBuffer("matrix",a,16,!0)})(),(()=>{let t=C.current,e=R.current,s=t.length;if(0===s){$=0,Z.isVisible=!1;return}let a=(0,n.percentileMax)(t.map(t=>t.count),.95),i=new Float32Array(16*s),c=new Float32Array(4*s),l=new Float32Array(s);for(let e=0;e<s;e++){let s=t[e],r=Math.min(1,s.count/a),u=N*(.5+.5*r);l[e]=u,b.Scaling(u,u,u).multiply(b.Translation((s.vx+.5)*o,(s.vy+.5)*o,(s.vz+.5)*o)).copyToArray(i,16*e);let[h,d,k]=(0,n.heatRgb)(r);c[4*e]=h,c[4*e+1]=d,c[4*e+2]=k,c[4*e+3]=1}$=s,H=i,D=l,Z.isVisible=!0,Z.isPickable=!!e,Z.thinInstanceEnablePicking=!!e,Z.metadata=e?{hoverLabels:e}:null,Z.thinInstanceSetBuffer("matrix",H,16,!1),Z.thinInstanceSetBuffer("color",c,4,!0),V=-1,W()})()};S.current=X,X(),E.runRenderLoop(()=>B.render());let Y=()=>E.resize();window.addEventListener("resize",Y);let G=(0,i.attachMeshHover)(B,e,A),J=(0,a.attachDoubleClickFocus)(B,e,T);y("ready"),c=()=>{window.removeEventListener("resize",Y),G(),J(),A(null),S.current=null,x.current=null,g.current=null,B.dispose(),E.dispose()}}catch(t){if(s)return;y("error"),_(t instanceof Error?t.message:"Failed to render heatmap.")}})(),()=>{s=!0,c?.()}},[M,o,F]),(0,s.useEffect)(()=>{S.current?.()},[u,h,f]);let E=m?m.cells>u.length?` Showing the ${u.length.toLocaleString()} busiest of ${m.cells.toLocaleString()} occupied cells (${m.hits.toLocaleString()} total hits).`:` ${m.cells.toLocaleString()} occupied cells, ${m.hits.toLocaleString()} total hits.`:"";return(0,e.jsxs)("div",{className:"relative",children:[(0,e.jsx)("canvas",{ref:v,className:"aspect-video w-full rounded-lg border border-edge bg-ink"}),L?(0,e.jsx)("div",{className:"pointer-events-none absolute z-10 max-w-[16rem] truncate rounded border border-edge bg-ink/90 px-1.5 py-0.5 text-xs text-white shadow backdrop-blur",style:{left:L.x+12,top:L.y+12},children:L.label}):null,"ready"===w?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(r,{shape:M,onChange:q}),(0,e.jsx)(l.ZoomButtons,{onZoom:t=>x.current&&(0,a.stepZoom)(x.current,t),onReset:()=>x.current&&g.current&&(0,a.resetFocus)(x.current,g.current)}),(0,e.jsx)(c.HeatLegend,{title:d,lowLabel:k,highLabel:p,note:b+E})]}):(0,e.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center text-sm text-fg-muted",children:"loading"===w?"Rendering…":"empty"===w?j:"error"===w?z??"Heatmap unavailable.":null})]})}])}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,63615,e=>{"use strict";var t=e.i(85789),r=e.i(66464);function s(e){switch(e){case 5120:case 5121:return 1;case 5122:case 5123:case 5131:return 2;case 5124:case 5125:case 5126:return 4;default:throw Error(`Invalid type '${e}'`)}}function n(e){switch(e){case 5120:return Int8Array;case 5121:return Uint8Array;case 5122:return Int16Array;case 5123:case 5131:return Uint16Array;case 5124:return Int32Array;case 5125:return Uint32Array;case 5126:return Float32Array;default:throw Error(`Invalid component type '${e}'`)}}function o(e,t,n,o,i,a,l,u){let c=Array(o),f=Array(o);if(e instanceof Array){let r=t/4,s=n/4;for(let t=0;t<a;t+=o){for(let t=0;t<o;t++)c[t]=f[t]=e[r+t];u(f,t);for(let t=0;t<o;t++)c[t]!==f[t]&&(e[r+t]=f[t]);r+=s}}else{let d=ArrayBuffer.isView(e)?new DataView(e.buffer,e.byteOffset,e.byteLength):new DataView(e),p=s(i);for(let e=0;e<a;e+=o){for(let e=0,s=t;e<o;e++,s+=p)c[e]=f[e]=function(e,t,s,n){switch(t){case 5120:{let t=e.getInt8(s);return n&&(t=Math.max(t/127,-1)),t}case 5121:{let t=e.getUint8(s);return n&&(t/=255),t}case 5122:{let t=e.getInt16(s,!0);return n&&(t=Math.max(t/32767,-1)),t}case 5123:{let t=e.getUint16(s,!0);return n&&(t/=65535),t}case 5131:return(0,r.FromHalfFloat)(e.getUint16(s,!0));case 5124:return e.getInt32(s,!0);case 5125:return e.getUint32(s,!0);case 5126:return e.getFloat32(s,!0);default:throw Error(`Invalid component type ${t}`)}}(d,i,s,l);u(f,e);for(let e=0,s=t;e<o;e++,s+=p)c[e]!==f[e]&&function(e,t,s,n,o){switch(t){case 5120:n&&(o=Math.round(127*o)),e.setInt8(s,o);break;case 5121:n&&(o=Math.round(255*o)),e.setUint8(s,o);break;case 5122:n&&(o=Math.round(32767*o)),e.setInt16(s,o,!0);break;case 5123:n&&(o=Math.round(65535*o)),e.setUint16(s,o,!0);break;case 5131:e.setUint16(s,(0,r.ToHalfFloat)(o),!0);break;case 5124:e.setInt32(s,o,!0);break;case 5125:e.setUint32(s,o,!0);break;case 5126:e.setFloat32(s,o,!0);break;default:throw Error(`Invalid component type ${t}`)}}(d,i,s,l,f[e]);t+=n}}}e.s(["CopyFloatData",0,function(e,r,n,i,a,l,u,c){let f=r*s(n),d=u*r;if(c.length!==d)throw Error("Output length is not valid");if(5126!==n||a!==f)return void o(e,i,a,r,n,d,l,(e,t)=>{for(let s=0;s<r;s++)c[t+s]=e[s]});if(e instanceof Array){let t=i/4;c.set(e,t)}else if(ArrayBuffer.isView(e)){let r=e.byteOffset+i;if((3&r)!=0){t.Logger.Warn("Float array must be aligned to 4-bytes border"),c.set(new Float32Array(e.buffer.slice(r,r+d*Float32Array.BYTES_PER_ELEMENT)));return}let s=new Float32Array(e.buffer,r,d);c.set(s)}else{let t=new Float32Array(e,i,d);c.set(t)}},"EnumerateFloatValues",0,o,"GetBlobBufferSource",0,function(e){let t=e.buffer;if(t instanceof ArrayBuffer)return e;let r=new ArrayBuffer(e.byteLength);return new Uint8Array(r).set(new Uint8Array(t,e.byteOffset,e.byteLength)),r},"GetFloatData",0,function(e,r,n,i,a,l,u,c){let f=r*s(n),d=u*r;if(5126!==n||a!==f){let t=new Float32Array(d);return o(e,i,a,r,n,d,l,(e,s)=>{for(let n=0;n<r;n++)t[s+n]=e[n]}),t}if(!(e instanceof Array||e instanceof Float32Array)||0!==i||e.length!==d)if(e instanceof Array){let t=i/4;return e.slice(t,t+d)}else{if(!ArrayBuffer.isView(e))return new Float32Array(e,i,d);let r=e.byteOffset+i;return((3&r)!=0&&(t.Logger.Warn("Float array must be aligned to 4-bytes border"),c=!0),c)?new Float32Array(e.buffer.slice(r,r+d*Float32Array.BYTES_PER_ELEMENT)):new Float32Array(e.buffer,r,d)}return c?e.slice():e},"GetTypeByteLength",0,s,"GetTypedArrayConstructor",0,n,"GetTypedArrayData",0,function(e,r,i,a,l,u,c){let f,d=s(i),p=n(i),h=u*r;if(Array.isArray(e)){if((3&a)!=0||(3&l)!=0)throw Error("byteOffset and byteStride must be a multiple of 4 for number[] data.");let t=a/4,s=l/4;if(t+(u-1)*s+r>e.length)throw Error("Last accessed index is out of bounds.");if(s<r)throw Error("Data stride cannot be smaller than the component size.");if(s!==r){let t=new p(h);return o(e,a,l,r,i,h,!1,(e,s)=>{for(let n=0;n<r;n++)t[s+n]=e[n]}),t}return new p(e.slice(t,t+h))}let g=a;if(ArrayBuffer.isView(e)?(f=e.buffer,g+=e.byteOffset):f=e,g+(u-1)*l+r*d>f.byteLength)throw Error("Last accessed byte is out of bounds.");let y=r*d;if(l<y)throw Error("Byte stride cannot be smaller than the component's byte size.");if(l!==y){let e=new p(h),t=new Uint8Array(f,g),s=new Uint8Array(e.buffer),n=r*d;for(let e=0,r=0,o=0;e<u;e++,r+=l,o+=n)s.set(t.subarray(r,r+n),o);return e}return(1!==d&&(g&d-1)!=0&&(t.Logger.Warn("Array must be aligned to border of element size. Data will be copied."),c=!0),c)?new p(f.slice(g,g+h*d)):new p(f,g,h)}])},4385,94712,e=>{"use strict";var t=e.i(43880);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,o,i,a,l){let u=l||r.loadFile;if(!u)throw(0,t._WarnImport)("FileTools");return u(e,s,n,o,i,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}],4385);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",o=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(o))?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 o{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 i 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=()=>{""!==(c=c.trim())&&(r.push(c),c="")},o=e=>{s<l._Stack.length-1&&(l._Stack[++s]=e)},i=()=>l._Stack[s],a=()=>-1===s?"!!INVALID EXPRESSION!!":l._Stack[s--],u=0,c="";for(;u<e.length;){let t=e.charAt(u),f=u<e.length-1?e.substring(u,2+u):"";if("("===t)c="",o(t);else if(")"===t){for(n();-1!==s&&"("!==i();)r.push(a());a()}else if(l._OperatorPriority[f]>1){for(n();-1!==s&&l._OperatorPriority[i()]>=l._OperatorPriority[f];)r.push(a());o(f),u++}else c+=t;u++}for(n();-1!==s;)"("===i()?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 u 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 c 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 p=/defined\s*?\((.+?)\)/g,h=/defined\s*?\[(.+?)\]/g,g=/#include\s?<(.+)>(\((.*)\))*(\[(.*)\])*/g,y=/__decl__/,m=/light\{X\}.(\w*)/g,b=/\{X\}/g,x=[],L=/(#ifdef)|(#else)|(#elif)|(#endif)|(#ifndef)|(#if)/;function w(e){let t=/defined\((.+)\)/.exec(e);if(t&&t.length)return new u(t[1].trim(),"!"===e[0]);let r="",s=0;for(r of["==","!=",">=","<=","<",">"])if((s=e.indexOf(r))>-1)break;if(-1===s)return new u(e);let n=e.substring(0,s).trim(),o=e.substring(s+r.length).trim();return new d(n,r,o)}function E(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 u(n):"#ifndef"===s?r.testExpression=new u(n,!0):r.testExpression=function(e){e=e.replace(p,"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 c;"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 _(e,t,r,s){let o;for(;v(e,r,s);){let i=(o=e.currentLine).substring(0,5).toLowerCase();if("#else"===i){let r=new n;t.children.push(r),v(e,r,s);return}if("#elif"===i){let e=E(o,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=L.exec(s);if(n&&n.length){switch(n[0]){case"#ifdef":{let n=new i;t.children.push(n);let o=E(s,6);n.children.push(o),_(e,n,o,r);break}case"#else":case"#elif":return!0;case"#endif":return!1;case"#ifndef":{let n=new i;t.children.push(n);let o=E(s,7);n.children.push(o),_(e,n,o,r);break}case"#if":{let n=new i,o=E(s,3);t.children.push(n),n.children.push(o),_(e,n,o,r)}}continue}}let o=new n;if(o.line=s,t.children.push(o),"#"===s[0]&&"d"===s[1]){let e=s.replace(";","").split(" ");o.additionalDefineKey=e[1],3===e.length&&(o.additionalDefineValue=e[2])}}return!1}function C(e,t,r){let s;for(x.length=0;null!==(s=g.exec(e));)x.push(s);let n=[e],o=!1;for(let e of x){let s=e[1];if(-1!==s.indexOf("__decl__")&&(s=s.replace(y,""),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]),o=parseInt(e[1]),i=r.slice(0);r="",isNaN(o)&&(o=t.indexParameters[e[1]]);for(let e=n;e<o;e++)t.supportsUniformBuffers||(i=i.replace(m,(e,t)=>t+"{X}")),r+=i.replace(b,e.toString())+"\n"}else t.supportsUniformBuffers||(r=r.replace(m,(e,t)=>t+"{X}")),r=r.replace(b,s)}let i=[];for(let t of n){let s=t.split(e[0]);for(let e=0;e<s.length-1;e++)i.push(s[e]),i.push(r);i.push(s[s.length-1])}n=i,o=o||r.indexOf("#include<")>=0||r.indexOf("#include <")>=0}else{let e=t.shadersRepository+"ShadersInclude/"+s+".fx";R.loadFile(e,e=>{t.includesShadersStore[s]=e,C(n.join(""),t,r)});return}}x.length=0;let i=n.join("");o?C(i.toString(),t,r):r(i)}let R={loadFile:(e,r,s,n,o,i)=>{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,i){t.processor?.preProcessShaderCode&&(e=t.processor.preProcessShaderCode(e,t.isFragment)),C(e,t,e=>{t.processCodeAfterIncludes&&(e=t.processCodeAfterIncludes(t.isFragment?"fragment":"vertex",e,t.defines)),r(function(e,t,r){var i;let a,l,u=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!==u.indexOf("#version 3")&&(u=u.replace("#version 300 es",""),!t.processor.parseGLES3))return u;let c=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&&(u=t.processor.preProcessor(u,c,f,t.isFragment,t.processingContext));let d={};return i=u,a=new n,(l=new o).lineIndex=-1,l.lines=i.split("\n"),v(l,a,d),u=a.process(f,t,d),t.processor.postProcessor&&(u=t.processor.postProcessor(u,c,t.isFragment,t.processingContext,r?{drawBuffersExtensionDisabled:!r.getCaps().drawBuffersExtension}:{},f,d)),r?._features.needShaderCodeInlining&&(u=r.inlineShaderCode(u)),u}(e,t,i),e)})},"ProcessIncludes",0,C,"_FunctionContainer",0,R],94712)},43880,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.`}])},7484,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}])},33169,e=>{"use strict";let t;var r=e.i(16635),s=e.i(7484),n=e.i(42704),o=e.i(88605),i=e.i(72888),a=e.i(30465),l=e.i(95708),u=e.i(72986),c=e.i(4385),f=e.i(94712),d=e.i(85789),p=e.i(32945),h=e.i(63615);let g=new RegExp(/^data:([^,]+\/[^,]+)?;base64,/i);class y extends a.RuntimeError{constructor(e,t){super(e,a.ErrorCodes.LoadFileError),this.name="LoadFileError",a.BaseError._setPrototypeOf(this,y.prototype),t instanceof r.WebRequest?this.request=t:this.file=t}}class m extends a.RuntimeError{constructor(e,t){super(e,a.ErrorCodes.RequestFileError),this.request=t,this.name="RequestFileError",a.BaseError._setPrototypeOf(this,m.prototype)}}class b extends a.RuntimeError{constructor(e,t){super(e,a.ErrorCodes.ReadFileError),this.file=t,this.name="ReadFileError",a.BaseError._setPrototypeOf(this,b.prototype)}}let x={DefaultRetryStrategy:i.RetryStrategy.ExponentialBackoff(),BaseUrl:"",CorsBehavior:"anonymous",PreprocessUrl:e=>e,ScriptBaseUrl:"",ScriptPreprocessUrl:e=>e,CleanUrl:e=>e=e.replace(/#/gm,"%23")},L=(e,t)=>{if((!e||0!==e.indexOf("data:"))&&x.CorsBehavior)if("string"==typeof x.CorsBehavior||x.CorsBehavior instanceof String)t.crossOrigin=x.CorsBehavior;else{let r=x.CorsBehavior(e);r&&(t.crossOrigin=r)}},w=(e,t,s,n,i="",a,c=u.EngineStore.LastCreatedEngine)=>{let f;if("u"<typeof HTMLImageElement&&!c?._features.forceBitmapOverHTMLImageElement)return s("LoadImage is only supported in web or BabylonNative environments."),null;let d=!1;if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))if("u">typeof Blob&&"u">typeof URL){let t;t=e instanceof ArrayBuffer?e:(0,h.GetBlobBufferSource)(e),f=URL.createObjectURL(new Blob([t],{type:i})),d=!0}else f=`data:${i};base64,`+(0,l.EncodeArrayBufferToBase64)(e);else e instanceof Blob?(f=URL.createObjectURL(e),d=!0):(f=x.CleanUrl(e),f=x.PreprocessUrl(f));let p=t=>{if(s){let r=f||e.toString();s(`Error while trying to load image: ${0===r.indexOf("http")||r.length<=128?r:r.slice(0,128)+"..."}`,t)}};if(c?._features.forceBitmapOverHTMLImageElement)return _(f,r=>{c.createImageBitmap(new Blob([r],{type:i}),{premultiplyAlpha:"none",colorSpaceConversion:"none",...a}).then(e=>{t(e),d&&URL.revokeObjectURL(f)}).catch(t=>{s&&s("Error while trying to load image: "+e,t)})},void 0,n||void 0,!0,(e,t)=>{p(t)}),null;let g=new Image;!1;L(f,g);let y=[],m=()=>{for(let e of y)e.target.removeEventListener(e.name,e.handler);y.length=0};for(let e of(y.push({target:g,name:"load",handler:()=>{m(),t(g),d&&g.src&&URL.revokeObjectURL(g.src)}}),y.push({target:g,name:"error",handler:e=>{m(),p(e),d&&g.src&&URL.revokeObjectURL(g.src)}}),y.push({target:document,name:"securitypolicyviolation",handler:e=>{if(e.blockedURI!==g.src||"report"===e.disposition)return;m();let t=Error(`CSP violation of policy ${e.effectiveDirective} ${e.blockedURI}. Current policy is ${e.originalPolicy}`);u.EngineStore.UseFallbackTexture=!1,p(t),d&&g.src&&URL.revokeObjectURL(g.src),g.src=""}}),y))e.target.addEventListener(e.name,e.handler);let b="blob:"===f.substring(0,5),w="data:"===f.substring(0,5),E=()=>{b||w||!r.WebRequest.IsCustomRequestAvailable?g.src=f:_(f,(e,t,r)=>{let s=new Blob([e],{type:!i&&r?r:i}),n=URL.createObjectURL(s);d=!0,g.src=n},void 0,n||void 0,!0,(e,t)=>{p(t)})};if(!b&&!w&&n&&n.enableTexturesOffline)n.open(()=>{n&&n.loadImage(f,g)},E);else{if(-1!==f.indexOf("file:")){let e=decodeURIComponent(f.substring(5).toLowerCase());if(o.FilesInputStore.FilesToLoad[e]&&"u">typeof URL){try{let t;try{t=URL.createObjectURL(o.FilesInputStore.FilesToLoad[e])}catch(r){t=URL.createObjectURL(o.FilesInputStore.FilesToLoad[e])}g.src=t,d=!0}catch(e){g.src=""}return g}}E()}return g},E=(e,t,r,s,o)=>{let i=new FileReader,a={onCompleteObservable:new n.Observable,abort:()=>i.abort()};return i.onloadend=()=>a.onCompleteObservable.notifyObservers(a),o&&(i.onerror=()=>{o(new b(`Unable to read ${e.name}`,e))}),i.onload=e=>{t(e.target.result)},r&&(i.onprogress=r),s?i.readAsArrayBuffer(e):i.readAsText(e),a},_=(e,t,r,s,i,a,l)=>{if(e.name)return E(e,t,r,i,a?e=>{a(void 0,e)}:void 0);if(-1!==e.indexOf("file:")){let s=decodeURIComponent(e.substring(5).toLowerCase());0===s.indexOf("./")&&(s=s.substring(2));let n=o.FilesInputStore.FilesToLoad[s];if(n)return E(n,t,r,i,a?e=>a(void 0,new y(e.message,e.file)):void 0)}let{match:u,type:c}=U(e);if(u){let r={onCompleteObservable:new n.Observable,abort:()=>()=>{}};try{let r=i?F(e):S(e);t(r,void 0,c)}catch(e){a?a(void 0,e):d.Logger.Error(e.message||"Failed to parse the Data URL")}return p.TimingTools.SetImmediate(()=>{r.onCompleteObservable.notifyObservers(r)}),r}return v(e,(e,r)=>{t(e,r?.responseURL,r?.getResponseHeader("content-type"))},r,s,i,a?e=>{a(e.request,new y(e.message,e.request))}:void 0,l)},v=(e,t,o,i,a,l,c)=>{null!==i&&(i??(i=u.EngineStore.LastCreatedScene?.offlineProvider)),e=x.CleanUrl(e),e=x.PreprocessUrl(e);let f=x.BaseUrl+e,p=!1,h={onCompleteObservable:new n.Observable,abort:()=>p=!0},g=()=>{let e,n=new r.WebRequest,i=null,u=()=>{n&&(o&&n.removeEventListener("progress",o),e&&n.removeEventListener("readystatechange",e),n.removeEventListener("loadend",g))},g=()=>{u(),h.onCompleteObservable.notifyObservers(h),h.onCompleteObservable.clear(),o=void 0,e=null,g=null,l=void 0,c=void 0,t=void 0};h.abort=()=>{p=!0,g&&g(),n&&n.readyState!==(XMLHttpRequest.DONE||4)&&n.abort(),null!==i&&(clearTimeout(i),i=null),n=null};let y=e=>{let t=e.message||"Unknown error";l&&n?l(new m(t,n)):d.Logger.Error(t)},b=d=>{if(n){if(n.open("GET",f),c)try{c(n)}catch(e){y(e);return}a&&(n.responseType="arraybuffer"),o&&n.addEventListener("progress",o),g&&n.addEventListener("loadend",g),e=()=>{if(!p&&n&&n.readyState===(XMLHttpRequest.DONE||4)){if(e&&n.removeEventListener("readystatechange",e),n.status>=200&&n.status<300||0===n.status&&(!(0,s.IsWindowObjectExist)()||C())){let e=a?n.response:n.responseText;if(null!==e){try{t&&t(e,n)}catch(e){y(e)}return}}let o=x.DefaultRetryStrategy;if(o){let e=o(f,n,d);if(-1!==e){u(),n=new r.WebRequest,i=setTimeout(()=>b(d+1),e);return}}let c=new m("Error status: "+n.status+" "+n.statusText+" - Unable to load "+f,n);l&&l(c)}},n.addEventListener("readystatechange",e),n.send()}};b(0)};if(i&&i.enableSceneOffline&&!e.startsWith("blob:")){let r=e=>{e&&e.status>400?l&&l(e):g()};i.open(()=>{i&&i.loadFile(x.BaseUrl+e,e=>{!p&&t&&t(e),h.onCompleteObservable.notifyObservers(h)},o?e=>{!p&&o&&o(e)}:void 0,r,a)},r)}else g();return h},C=()=>"u">typeof location&&"file:"===location.protocol,R=e=>g.test(e),U=e=>{let t=g.exec(e);return null===t||0===t.length?{match:!1,type:""}:{match:!0,type:t[0].replace("data:","").replace(";base64,","")}};function F(e){return(0,l.DecodeBase64ToBinary)(e.split(",")[1])}let S=e=>(0,l.DecodeBase64ToString)(e.split(",")[1]),T=!1;e.s(["DecodeBase64UrlToBinary",0,F,"FileToolsOptions",0,x,"GetMimeType",0,e=>{let{match:t,type:r}=U(e);if(t)return r||void 0;let s=e.lastIndexOf(".");switch(e.substring(s+1).toLowerCase()){case"glb":return"model/gltf-binary";case"bin":return"application/octet-stream";case"gltf":return"model/gltf+json";case"jpg":case"jpeg":return"image/jpeg";case"png":return"image/png";case"webp":return"image/webp";case"ktx":return"image/ktx";case"ktx2":return"image/ktx2";case"avif":return"image/avif";default:return}},"IsBase64DataUrl",0,R,"LoadFile",0,_,"LoadFileError",0,y,"LoadImage",0,w,"ReadFile",0,E,"RegisterFileTools",0,function(){!T&&(T=!0,Object.defineProperty(t={DecodeBase64UrlToBinary:F,DecodeBase64UrlToString:S,DefaultRetryStrategy:x.DefaultRetryStrategy,BaseUrl:x.BaseUrl,CorsBehavior:x.CorsBehavior,PreprocessUrl:x.PreprocessUrl,IsBase64DataUrl:R,IsFileURL:C,LoadFile:_,LoadImage:w,ReadFile:E,RequestFile:v,SetCorsBehavior:L},"DefaultRetryStrategy",{get:function(){return x.DefaultRetryStrategy},set:function(e){x.DefaultRetryStrategy=e}}),Object.defineProperty(t,"BaseUrl",{get:function(){return x.BaseUrl},set:function(e){x.BaseUrl=e}}),Object.defineProperty(t,"PreprocessUrl",{get:function(){return x.PreprocessUrl},set:function(e){x.PreprocessUrl=e}}),Object.defineProperty(t,"CorsBehavior",{get:function(){return x.CorsBehavior},set:function(e){x.CorsBehavior=e}}),c.EngineFunctionContext.loadFile=_,c.EngineFunctionContext.loadImage=w,f._FunctionContainer.loadFile=_)},"RequestFile",0,v,"SetCorsBehavior",0,L])},88605,72888,30465,e=>{"use strict";class t{}t.FilesToLoad={},e.s(["FilesInputStore",0,t],88605),e.s(["RetryStrategy",0,class{static ExponentialBackoff(e=3,t=500){return(r,s,n)=>0!==s.status||n>=e||-1!==r.indexOf("file:")?-1:Math.pow(2,n)*t}}],72888);class r extends Error{}r._setPrototypeOf=Object.setPrototypeOf||((e,t)=>(e.__proto__=t,e));class s extends r{constructor(e,t,n){super(e),this.errorCode=t,this.innerError=n,this.name="RuntimeError",r._setPrototypeOf(this,s.prototype)}}e.s(["BaseError",0,r,"ErrorCodes",0,{MeshInvalidPositionsError:0,UnsupportedTextureError:1e3,GLTFLoaderUnexpectedMagicError:2e3,SceneLoaderError:3e3,LoadFileError:4e3,RequestFileError:4001,ReadFileError:4002},"RuntimeError",0,s],30465)},6939,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)})}])},66464,e=>{"use strict";let t=null;function r(){if(t)return t;let e=new ArrayBuffer(4),r=new Float32Array(e),s=new Uint32Array(e),n=new Uint32Array(512),o=new Uint32Array(512);for(let e=0;e<256;++e){let t=e-127;t<-24?(n[e]=0,n[256|e]=32768,o[e]=24,o[256|e]=24):t<-14?(n[e]=1024>>-t-14,n[256|e]=1024>>-t-14|32768,o[e]=-t-1,o[256|e]=-t-1):t<=15?(n[e]=t+15<<10,n[256|e]=t+15<<10|32768,o[e]=13,o[256|e]=13):t<128?(n[e]=31744,n[256|e]=64512,o[e]=24,o[256|e]=24):(n[e]=31744,n[256|e]=64512,o[e]=13,o[256|e]=13)}let i=new Uint32Array(2048),a=new Uint32Array(64),l=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,r=0;for(;(8388608&t)==0;)t<<=1,r-=8388608;t&=-8388609,r+=0x38800000,i[e]=t|r}for(let e=1024;e<2048;++e)i[e]=0x38000000+(e-1024<<13);for(let e=1;e<31;++e)a[e]=e<<23;a[31]=0x47800000,a[32]=0x80000000;for(let e=33;e<63;++e)a[e]=0x80000000+(e-32<<23);a[63]=0xc7800000;for(let e=1;e<64;++e)32!==e&&(l[e]=1024);return t={floatView:r,uint32View:s,baseTable:n,shiftTable:o,mantissaTable:i,exponentTable:a,offsetTable:l}}e.s(["FromHalfFloat",0,function(e){let t=r();return t.uint32View[0]=t.mantissaTable[t.offsetTable[e>>10]+(1023&e)]+t.exponentTable[e>>10],t.floatView[0]},"MaxHalfFloat",0,65504,"ToHalfFloat",0,function(e){let t=r();t.floatView[0]=e;let s=t.uint32View[0],n=s>>23&511;return t.baseTable[n]+((8388607&s)>>t.shiftTable[n])}])},85789,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 o=t._FormatMessage(n),i=this._Levels[e],a=Array.isArray(r)?r.slice(1):[];i.logFunc&&i.logFunc("BJS - "+o,...a);let l=`<div style='color:${i.color}'>${o}</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])},63391,e=>{"use strict";var t=e.i(7484);e.s(["PrecisionDate",0,class{static get Now(){return(0,t.IsWindowObjectExist)()&&window.performance&&window.performance.now?window.performance.now():Date.now()}}])},95708,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,o,i,a,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u="",c=0;for(;c<e.length;)t=e[c++],r=c<e.length?e[c++]:NaN,s=c<e.length?e[c++]:NaN,n=t>>2,o=(3&t)<<4|r>>4,i=(15&r)<<2|s>>6,a=63&s,isNaN(r)?i=a=64:isNaN(s)&&(a=64),u+=l.charAt(n)+l.charAt(o)+l.charAt(i)+l.charAt(a);return u}(t)}])},32945,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,o=3e4,i=!0,a)=>{if(i&&r(e,t,s))return null;let l=setInterval(()=>{r(e,t,s)?clearInterval(l):(o-=n)<0&&(clearInterval(l),s?.(Error("Operation timed out after maximum retries. "+(a||"")),!0))},n);return()=>clearInterval(l)}])},92929,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,o=2){let i;switch(o){case 1:i=s(e);break;case 2:i=t(e);break;default:i=r(e)}return Math.min(i,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])},16635,e=>{"use strict";class t{constructor(){this._xhr="u">typeof _native&&_native.XMLHttpRequest?new _native.XMLHttpRequest:new XMLHttpRequest,this._requestURL=""}static get IsCustomRequestAvailable(){return Object.keys(t.CustomRequestHeaders).length>0||t.CustomRequestModifiers.length>0}static _CleanUrl(e){return e=(e=e.replace("file:http:","http:")).replace("file:https:","https:")}static _ShouldSkipRequestModifications(e){return t.SkipRequestModificationForBabylonCDN&&(e.includes("preview.babylonjs.com")||e.includes("cdn.babylonjs.com"))}static _CollectCustomizations(e,r={}){let s={...r};if(t._ShouldSkipRequestModifications(e))return{url:e,headers:s};for(let e in t.CustomRequestHeaders){let r=t.CustomRequestHeaders[e];r&&(s[e]=r)}let n={setRequestHeader:(e,t)=>{s[e]=t}};for(let r of t.CustomRequestModifiers){if(t._ShouldSkipRequestModifications(e))break;let s=r(n,e);"string"==typeof s&&(e=s)}return{url:e,headers:s}}static async FetchAsync(e,r={}){let s=r.method??"GET";if("u">typeof fetch){let{url:n,headers:o}=t._CollectCustomizations(t._CleanUrl(e),r.headers??{});return await fetch(n,{method:s,headers:o,body:r.body??void 0})}return await new Promise((n,o)=>{let i=new t;i.responseType="arraybuffer",i.addEventListener("readystatechange",()=>{if(4===i.readyState)if(i.status>=200&&i.status<300){let e="u">typeof Headers?new Headers:void 0,t=i.getResponseHeader("Content-Type");t&&e&&e.set("Content-Type",t),"u">typeof Response?n(new Response(i.response,{status:i.status,statusText:i.statusText,headers:e})):n({ok:!0,status:i.status,statusText:i.statusText,headers:{get:e=>i.getResponseHeader(e)},arrayBuffer:async()=>await Promise.resolve(i.response)})}else o(Error(`HTTP ${i.status} loading '${i.requestURL}': ${i.statusText}`))}),i.open(s,e,r.headers),i.send(r.body??null)})}get requestURL(){return this._requestURL}get onprogress(){return this._xhr.onprogress}set onprogress(e){this._xhr.onprogress=e}get readyState(){return this._xhr.readyState}get status(){return this._xhr.status}get statusText(){return this._xhr.statusText}get response(){return this._xhr.response}get responseURL(){return this._xhr.responseURL}get responseText(){return this._xhr.responseText}get responseType(){return this._xhr.responseType}set responseType(e){this._xhr.responseType=e}get timeout(){return this._xhr.timeout}set timeout(e){this._xhr.timeout=e}addEventListener(e,t,r){this._xhr.addEventListener(e,t,r)}removeEventListener(e,t,r){this._xhr.removeEventListener(e,t,r)}abort(){this._xhr.abort()}send(e){this._xhr.send(e)}open(e,r,s){let{url:n,headers:o}=t._CollectCustomizations(r,s);for(let r in this._requestURL=t._CleanUrl(n),this._xhr.open(e,this._requestURL,!0),o)this._xhr.setRequestHeader(r,o[r])}setRequestHeader(e,t){this._xhr.setRequestHeader(e,t)}getResponseHeader(e){return this._xhr.getResponseHeader(e)}}t.CustomRequestHeaders={},t.CustomRequestModifiers=[],t.SkipRequestModificationForBabylonCDN=!0,e.s(["WebRequest",0,t])}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,29435,t=>{"use strict";var e=t.i(37096),s=t.i(97009),a=t.i(5573),i=t.i(99493);class u extends e.FlowGraphBlock{constructor(t){for(let e of(super(t),this.config=t,this._inputCases=new Map,this.case=this.registerDataInput("case",s.RichTypeAny,NaN),this.default=this.registerDataInput("default",s.RichTypeAny),this.value=this.registerDataOutput("value",s.RichTypeAny),this.config.cases||[])){if(e=(0,a.getNumericValue)(e),this.config.treatCasesAsIntegers&&(e|=0,this._inputCases.has(e)))return;this._inputCases.set(e,this.registerDataInput(`in_${e}`,s.RichTypeAny))}}_updateOutputs(t){let e,s=this.case.getValue(t);(0,a.isNumeric)(s)&&(e=this._getOutputValueForCase((0,a.getNumericValue)(s),t)),e||(e=this.default.getValue(t)),this.value.setValue(e,t)}_getOutputValueForCase(t,e){return this._inputCases.get(t)?.getValue(e)}getClassName(){return"FlowGraphDataSwitchBlock"}}let r=!1;function h(){r||(r=!0,(0,i.RegisterClass)("FlowGraphDataSwitchBlock",u))}t.s(["FlowGraphDataSwitchBlock",0,u,"RegisterFlowGraphDataSwitchBlock",0,h],29503),h(),t.s([],18930),t.i(18930),t.i(29503),t.s(["FlowGraphDataSwitchBlock",0,u],29435)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,69260,e=>{"use strict";var t=e.i(76256);let i=!1;i=!0,t.ThinEngine.prototype.setAlphaMode=function(e,t=!1,i=0){if(this._alphaMode[i]===e){if(!t){let t=0===e;this.depthCullingState.depthMask!==t&&(this.depthCullingState.depthMask=t)}return}let r=0===e;this._alphaState.setAlphaBlend(!r,i),this._alphaState.setAlphaMode(e,i),t||(this.depthCullingState.depthMask=r),this._alphaMode[i]=e};let r=!1;!function(){if(r)return;r=!0;let e=new WeakMap,i=new WeakMap,n=new WeakMap,s=new WeakMap;t.ThinEngine.prototype.getAlphaToCoverage=function(){return e.get(this)??!1},t.ThinEngine.prototype.setAlphaToCoverage=function(t){e.get(this)===t&&(!this._gl||i.get(this)===this._gl)||(e.set(this,t),this._gl&&(t?this._gl.enable(this._gl.SAMPLE_ALPHA_TO_COVERAGE):this._gl.disable(this._gl.SAMPLE_ALPHA_TO_COVERAGE),i.set(this,this._gl)))},Object.defineProperty(t.ThinEngine.prototype,"currentSampleCount",{get:function(){return this._currentRenderTarget?this._currentRenderTarget.samples:this._gl?(s.get(this)!==this._gl&&(n.set(this,this._gl.getContextAttributes()?.antialias?Math.max(1,this._gl.getParameter(this._gl.SAMPLES)):1),s.set(this,this._gl)),n.get(this)):1},enumerable:!1,configurable:!0})}();var n=e.i(55080),s=e.i(85789),a=e.i(92929);let l=!1;function h(e,t,i,r){let n,s=1;1===r?n=new Float32Array(t*i*4):2===r?(n=new Uint16Array(t*i*4),s=15360):n=7===r?new Uint32Array(t*i*4):new Uint8Array(t*i*4);for(let r=0;r<t;r++)for(let a=0;a<i;a++){let i=(a*t+r)*3,l=(a*t+r)*4;n[l+0]=e[i+0],n[l+1]=e[i+1],n[l+2]=e[i+2],n[l+3]=s}return n}function u(e){return function(t,i,r,s,a,l,h,u,_=null,o=0){let f=e?this._gl.TEXTURE_3D:this._gl.TEXTURE_2D_ARRAY,c=new n.InternalTexture(this,e?10:11);c.baseWidth=i,c.baseHeight=r,c.baseDepth=s,c.width=i,c.height=r,c.depth=s,c.format=a,c.type=o,c.generateMipMaps=l,c.samplingMode=u,e?c.is3D=!0:c.is2DArray=!0,this._doNotHandleContextLost||(c._bufferView=t),e?this.updateRawTexture3D(c,t,a,h,_,o):this.updateRawTexture2DArray(c,t,a,h,_,o),this._bindTextureDirectly(f,c,!0);let p=this._getSamplingParameters(u,l);return this._gl.texParameteri(f,this._gl.TEXTURE_MAG_FILTER,p.mag),this._gl.texParameteri(f,this._gl.TEXTURE_MIN_FILTER,p.min),l&&this._gl.generateMipmap(f),this._bindTextureDirectly(f,null),this._internalTexturesCache.push(c),c}}function _(e){return function(t,i,r,n,s=null,a=0){let l=e?this._gl.TEXTURE_3D:this._gl.TEXTURE_2D_ARRAY,h=this._getWebGLTextureType(a),u=this._getInternalFormat(r),_=this._getRGBABufferInternalSizedFormat(a,r);this._bindTextureDirectly(l,t,!0),this._unpackFlipY(void 0===n||!!n),this._doNotHandleContextLost||(t._bufferView=i,t.format=r,t.invertY=n,t._compression=s),t.width%4!=0&&this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT,1),s&&i?this._gl.compressedTexImage3D(l,0,this.getCaps().s3tc[s],t.width,t.height,t.depth,0,i):this._gl.texImage3D(l,0,_,t.width,t.height,t.depth,0,u,h,i),t.generateMipMaps&&this._gl.generateMipmap(l),this._bindTextureDirectly(l,null),t.isReady=!0}}l=!0,t.ThinEngine.prototype.updateRawTexture=function(e,t,i,r,n=null,s=0,a=!1){if(!e)return;let l=this._getRGBABufferInternalSizedFormat(s,i,a),h=this._getInternalFormat(i),u=this._getWebGLTextureType(s);this._bindTextureDirectly(this._gl.TEXTURE_2D,e,!0),this._unpackFlipY(void 0===r||!!r),this._doNotHandleContextLost||(e._bufferView=t,e.format=i,e.type=s,e.invertY=r,e._compression=n),e.width%4!=0&&this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT,1),n&&t?this._gl.compressedTexImage2D(this._gl.TEXTURE_2D,0,this.getCaps().s3tc[n],e.width,e.height,0,t):this._gl.texImage2D(this._gl.TEXTURE_2D,0,l,e.width,e.height,0,h,u,t),e.generateMipMaps&&this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(this._gl.TEXTURE_2D,null),e.isReady=!0},t.ThinEngine.prototype.createRawTexture=function(e,t,i,r,s,a,l,h=null,u=0,_=0,o=!1){let f=new n.InternalTexture(this,3);f.baseWidth=t,f.baseHeight=i,f.width=t,f.height=i,f.format=r,f.generateMipMaps=s,f.samplingMode=l,f.invertY=a,f._compression=h,f.type=u,f._useSRGBBuffer=this._getUseSRGBBuffer(o,!s),this._doNotHandleContextLost||(f._bufferView=e),this.updateRawTexture(f,e,r,a,h,u,f._useSRGBBuffer),this._bindTextureDirectly(this._gl.TEXTURE_2D,f,!0);let c=this._getSamplingParameters(l,s);return this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MAG_FILTER,c.mag),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MIN_FILTER,c.min),s&&this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._internalTexturesCache.push(f),f},t.ThinEngine.prototype.createRawCubeTexture=function(e,t,i,r,l,h,u,_=null){let o=this._gl,f=new n.InternalTexture(this,8);f.isCube=!0,f.format=i,f.type=r,this._doNotHandleContextLost||(f._bufferViewArray=e);let c=this._getWebGLTextureType(r),p=this._getInternalFormat(i);if(p===o.RGB&&(p=o.RGBA),c!==o.FLOAT||this._caps.textureFloatLinearFiltering?c!==this._gl.HALF_FLOAT_OES||this._caps.textureHalfFloatLinearFiltering?c!==o.FLOAT||this._caps.textureFloatRender?c!==o.HALF_FLOAT||this._caps.colorBufferFloat||(l=!1,s.Logger.Warn("Render to half float textures is not supported. Mipmap generation forced to false.")):(l=!1,s.Logger.Warn("Render to float textures is not supported. Mipmap generation forced to false.")):(l=!1,u=1,s.Logger.Warn("Half float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.")):(l=!1,u=1,s.Logger.Warn("Float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.")),f.width=t,f.height=t,f.invertY=h,f._compression=_,!this.needPOTTextures||(0,a.IsExponentOfTwo)(f.width)&&(0,a.IsExponentOfTwo)(f.height)||(l=!1),e)this.updateRawCubeTexture(f,e,i,r,h,_);else{let e=this._getRGBABufferInternalSizedFormat(r);this._bindTextureDirectly(o.TEXTURE_CUBE_MAP,f,!0);for(let t=0;t<6;t++)_?o.compressedTexImage2D(o.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,this.getCaps().s3tc[_],f.width,f.height,0,void 0):o.texImage2D(o.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,e,f.width,f.height,0,p,c,null);this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null)}this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,f,!0),e&&l&&this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP);let T=this._getSamplingParameters(u,l);return o.texParameteri(o.TEXTURE_CUBE_MAP,o.TEXTURE_MAG_FILTER,T.mag),o.texParameteri(o.TEXTURE_CUBE_MAP,o.TEXTURE_MIN_FILTER,T.min),o.texParameteri(o.TEXTURE_CUBE_MAP,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_CUBE_MAP,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),this._bindTextureDirectly(o.TEXTURE_CUBE_MAP,null),f.generateMipMaps=l,f.samplingMode=u,f.isReady=!0,f},t.ThinEngine.prototype.updateRawCubeTexture=function(e,t,i,r,n,s=null,l=0){e._bufferViewArray=t,e.format=i,e.type=r,e.invertY=n,e._compression=s;let u=this._gl,_=this._getWebGLTextureType(r),o=this._getInternalFormat(i),f=this._getRGBABufferInternalSizedFormat(r),c=!1;o===u.RGB&&(o=u.RGBA,c=!0),this._bindTextureDirectly(u.TEXTURE_CUBE_MAP,e,!0),this._unpackFlipY(void 0===n||!!n),e.width%4!=0&&u.pixelStorei(u.UNPACK_ALIGNMENT,1);for(let i=0;i<6;i++){let n=t[i];s?u.compressedTexImage2D(u.TEXTURE_CUBE_MAP_POSITIVE_X+i,l,this.getCaps().s3tc[s],e.width,e.height,0,n):(c&&(n=h(n,e.width,e.height,r)),u.texImage2D(u.TEXTURE_CUBE_MAP_POSITIVE_X+i,l,f,e.width,e.height,0,o,_,n))}(!this.needPOTTextures||(0,a.IsExponentOfTwo)(e.width)&&(0,a.IsExponentOfTwo)(e.height))&&e.generateMipMaps&&0===l&&this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),e.isReady=!0},t.ThinEngine.prototype.createRawCubeTextureFromUrl=function(e,t,i,r,n,s,a,l,u=null,_=null,o=3,f=!1){let c=this._gl,p=this.createRawCubeTexture(null,i,r,n,!s,f,o,null);t?.addPendingData(p),p.url=e,p.isReady=!1,this._internalTexturesCache.push(p);let T=(e,i)=>{t?.removePendingData(p),_&&_(e?e.status+" "+e.statusText:"Failed to parse texture data",i)},d=async e=>{if(!p._hardwareTexture)return;let i=a(e);if(!i)return;let s=i instanceof Promise?await i:i,_=p.width;if(l){let e=this._getWebGLTextureType(n),t=this._getInternalFormat(r),i=this._getRGBABufferInternalSizedFormat(n),a=!1;t===c.RGB&&(t=c.RGBA,a=!0),this._bindTextureDirectly(c.TEXTURE_CUBE_MAP,p,!0),this._unpackFlipY(!1);let u=l(s);for(let r=0;r<u.length;r++){let s=_>>r;for(let l=0;l<6;l++){let _=u[r][l];a&&(_=h(_,s,s,n)),c.texImage2D(l,r,i,s,s,0,t,e,_)}}this._bindTextureDirectly(c.TEXTURE_CUBE_MAP,null)}else this.updateRawCubeTexture(p,s,r,n,f);p.isReady=!0,t?.removePendingData(p),p.onLoadedObservable.notifyObservers(p),p.onLoadedObservable.clear(),u&&u()};return this._loadFile(e,e=>{d(e).catch(e=>{T(void 0,e)})},void 0,t?.offlineProvider,!0,T),p},t.ThinEngine.prototype.createRawTexture2DArray=u(!1),t.ThinEngine.prototype.createRawTexture3D=u(!0),t.ThinEngine.prototype.updateRawTexture2DArray=_(!1),t.ThinEngine.prototype.updateRawTexture3D=_(!0);var o=e.i(4385);let f=!1;f=!0,t.ThinEngine.prototype._readTexturePixelsSync=function(e,t,i,r=-1,n=0,s=null,a=!0,l=!1,h=0,u=0){let _=this._gl;if(!_)throw Error("Engine does not have gl rendering context.");if(!this._dummyFramebuffer){let e=_.createFramebuffer();if(!e)throw Error("Unable to create dummy framebuffer");this._dummyFramebuffer=e}_.bindFramebuffer(_.FRAMEBUFFER,this._dummyFramebuffer),r>-1&&(e.is2DArray||e.is3D)?_.framebufferTextureLayer(_.FRAMEBUFFER,_.COLOR_ATTACHMENT0,e._hardwareTexture?.underlyingResource,n,r):r>-1?_.framebufferTexture2D(_.FRAMEBUFFER,_.COLOR_ATTACHMENT0,_.TEXTURE_CUBE_MAP_POSITIVE_X+r,e._hardwareTexture?.underlyingResource,n):_.framebufferTexture2D(_.FRAMEBUFFER,_.COLOR_ATTACHMENT0,_.TEXTURE_2D,e._hardwareTexture?.underlyingResource,n);let f=void 0!==e.type?this._getWebGLTextureType(e.type):_.UNSIGNED_BYTE;return l?s||(s=(0,o.allocateAndCopyTypedBuffer)(e.type,4*t*i)):f===_.UNSIGNED_BYTE?(s||(s=new Uint8Array(4*t*i)),f=_.UNSIGNED_BYTE):(s||(s=new Float32Array(4*t*i)),f=_.FLOAT),a&&this.flushFramebuffer(),_.readPixels(h,u,t,i,_.RGBA,f,s),_.bindFramebuffer(_.FRAMEBUFFER,this._currentFramebuffer),s},t.ThinEngine.prototype._readTexturePixels=function(e,t,i,r=-1,n=0,s=null,a=!0,l=!1,h=0,u=0){return Promise.resolve(this._readTexturePixelsSync(e,t,i,r,n,s,a,l,h,u))},(0,e.i(5554).RegisterEngineDynamicBuffer)();let c=!1;c=!0,t.ThinEngine.prototype._createDepthStencilCubeTexture=function(e,t){let i=new n.InternalTexture(this,12);if(i.isCube=!0,1===this.webGLVersion)return s.Logger.Error("Depth cube texture is not supported by WebGL 1."),i;let r={bilinearFiltering:!1,comparisonFunction:0,generateStencil:!1,...t},a=this._gl;this._bindTextureDirectly(a.TEXTURE_CUBE_MAP,i,!0),this._setupDepthStencilTexture(i,e,r.bilinearFiltering,r.comparisonFunction);for(let t=0;t<6;t++)r.generateStencil?a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,a.DEPTH24_STENCIL8,e,e,0,a.DEPTH_STENCIL,a.UNSIGNED_INT_24_8,null):a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,a.DEPTH_COMPONENT24,e,e,0,a.DEPTH_COMPONENT,a.UNSIGNED_INT,null);return this._bindTextureDirectly(a.TEXTURE_CUBE_MAP,null),this._internalTexturesCache.push(i),i},t.ThinEngine.prototype._setCubeMapTextureParams=function(e,t,i){let r=this._gl;r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_MAG_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_MIN_FILTER,t?r.LINEAR_MIPMAP_LINEAR:r.LINEAR),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),e.samplingMode=t?3:2,t&&this.getCaps().textureMaxLevel&&void 0!==i&&i>0&&(r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_MAX_LEVEL,i),e._maxLodLevel=i),this._bindTextureDirectly(r.TEXTURE_CUBE_MAP,null)},t.ThinEngine.prototype.createCubeTexture=function(e,t,i,r,n=null,l=null,h,u=null,_=!1,o=0,f=0,c=null,p,T=!1,d=null){let g=this._gl;return this.createCubeTextureBase(e,t,i,!!r,n,l,h,u,_,o,f,c,e=>this._bindTextureDirectly(g.TEXTURE_CUBE_MAP,e,!0),(e,t)=>{let i=this.needPOTTextures?(0,a.GetExponentOfTwo)(t[0].width,this._caps.maxCubemapTextureSize):t[0].width,l=[g.TEXTURE_CUBE_MAP_POSITIVE_X,g.TEXTURE_CUBE_MAP_POSITIVE_Y,g.TEXTURE_CUBE_MAP_POSITIVE_Z,g.TEXTURE_CUBE_MAP_NEGATIVE_X,g.TEXTURE_CUBE_MAP_NEGATIVE_Y,g.TEXTURE_CUBE_MAP_NEGATIVE_Z];this._bindTextureDirectly(g.TEXTURE_CUBE_MAP,e,!0),this._unpackFlipY(!1);let u=h?this._getInternalFormat(h,e._useSRGBBuffer):e._useSRGBBuffer?this._glSRGBExtensionValues.SRGB8_ALPHA8:g.RGBA,_=h?this._getInternalFormat(h):g.RGBA;e._useSRGBBuffer&&1===this.webGLVersion&&(_=u);for(let e=0;e<l.length;e++)if(t[e].width!==i||t[e].height!==i){if(this._prepareWorkingCanvas(),!this._workingCanvas||!this._workingContext)return void s.Logger.Warn("Cannot create canvas to resize texture.");this._workingCanvas.width=i,this._workingCanvas.height=i,this._workingContext.drawImage(t[e],0,0,t[e].width,t[e].height,0,0,i,i),g.texImage2D(l[e],0,u,_,g.UNSIGNED_BYTE,this._workingCanvas)}else g.texImage2D(l[e],0,u,_,g.UNSIGNED_BYTE,t[e]);r||g.generateMipmap(g.TEXTURE_CUBE_MAP),this._setCubeMapTextureParams(e,!r),e.width=i,e.height=i,e.isReady=!0,h&&(e.format=h),e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear(),n&&n()},!!T,d)},t.ThinEngine.prototype.generateMipMapsForCubemap=function(e,t=!0){if(e.generateMipMaps){let i=this._gl;this._bindTextureDirectly(i.TEXTURE_CUBE_MAP,e,!0),i.generateMipmap(i.TEXTURE_CUBE_MAP),t&&this._bindTextureDirectly(i.TEXTURE_CUBE_MAP,null)}};var p=e.i(1205);class T{get depthStencilTexture(){return this._depthStencilTexture}setDepthStencilTexture(e,t=!0){t&&this._depthStencilTexture&&this._depthStencilTexture.dispose(),this._depthStencilTexture=e,this._generateDepthBuffer=this._generateStencilBuffer=this._depthStencilTextureWithStencil=!1,e&&(this._generateDepthBuffer=!0,this._generateStencilBuffer=this._depthStencilTextureWithStencil=(0,p.HasStencilAspect)(e.format))}get depthStencilTextureWithStencil(){return this._depthStencilTextureWithStencil}get isCube(){return this._isCube}get isMulti(){return this._isMulti}get is2DArray(){return this.layers>0}get is3D(){return this.depth>0}get size(){return this.width}get width(){return this._size.width??this._size}get height(){return this._size.height??this._size}get layers(){return this._size.layers||0}get depth(){return this._size.depth||0}get texture(){return this._textures?.[0]??null}get textures(){return this._textures}get faceIndices(){return this._faceIndices}get layerIndices(){return this._layerIndices}getBaseArrayLayer(e){if(!this._textures)return -1;let t=this._textures[e],i=this._layerIndices?.[e]??0,r=this._faceIndices?.[e]??0;return t.isCube?6*i+r:t.is3D?0:i}get samples(){return this._samples}setSamples(e,t=!0,i=!1){if(this.samples===e&&!i)return e;let r=this._isMulti?this._engine.updateMultipleRenderTargetTextureSampleCount(this,e,t):this._engine.updateRenderTargetTextureSampleCount(this,e);return this._samples=e,r}resolveMSAATextures(){this.isMulti?this._engine.resolveMultiFramebuffer(this):this._engine.resolveFramebuffer(this)}generateMipMaps(){this._engine._currentRenderTarget===this&&(this.isMulti?this._engine.unBindMultiColorAttachmentFramebuffer(this,!0):this._engine.unBindFramebuffer(this,!0)),this.isMulti?this._engine.generateMipMapsMultiFramebuffer(this):this._engine.generateMipMapsFramebuffer(this)}constructor(e,t,i,r,n){this._textures=null,this._faceIndices=null,this._layerIndices=null,this._samples=1,this._attachments=null,this._generateStencilBuffer=!1,this._generateDepthBuffer=!1,this._depthStencilTextureWithStencil=!1,this.disableAutomaticMSAAResolve=!1,this.resolveMSAAColors=!0,this.resolveMSAADepth=!1,this.resolveMSAAStencil=!1,this.depthReadOnly=!1,this.stencilReadOnly=!1,this._isMulti=e,this._isCube=t,this._size=i,this._engine=r,this._depthStencilTexture=null,this.label=n}setTextures(e){Array.isArray(e)?this._textures=e:e?this._textures=[e]:this._textures=null}setTexture(e,t=0,i=!0){this._textures||(this._textures=[]),this._textures[t]!==e&&(this._textures[t]&&i&&this._textures[t].dispose(),this._textures[t]=e)}setLayerAndFaceIndices(e,t){this._layerIndices=e,this._faceIndices=t}setLayerAndFaceIndex(e=0,t,i){this._layerIndices||(this._layerIndices=[]),this._faceIndices||(this._faceIndices=[]),void 0!==t&&t>=0&&(this._layerIndices[e]=t),void 0!==i&&i>=0&&(this._faceIndices[e]=i)}createDepthStencilTexture(e=0,t=!0,i=!1,r=1,n=14,s){return this._depthStencilTexture?.dispose(),this._depthStencilTextureWithStencil=i,this._depthStencilTextureLabel=s,this._depthStencilTexture=this._engine.createDepthStencilTexture(this._size,{bilinearFiltering:t,comparisonFunction:e,generateStencil:i,isCube:this._isCube,samples:r,depthTextureFormat:n,label:s},this),this._depthStencilTexture}_shareDepth(e){this.shareDepth(e)}shareDepth(e){this._depthStencilTexture&&(e._depthStencilTexture&&e._depthStencilTexture.dispose(),e._depthStencilTexture=this._depthStencilTexture,e._depthStencilTextureWithStencil=this._depthStencilTextureWithStencil,this._depthStencilTexture.incrementReferences())}_swapAndDie(e){this.texture&&this.texture._swapAndDie(e),this._textures=null,this.dispose(!0)}_cloneRenderTargetWrapper(){let e=null;if(this._isMulti){let t=this.textures;if(t&&t.length>0){let i=!1,r=t.length,n=-1,s=t[t.length-1]._source;(14===s||12===s)&&(i=!0,n=t[t.length-1].format,r--);let a=[],l=[],h=[],u=[],_=[],o=[],f=[],c={};for(let e=0;e<r;++e){let i=t[e];a.push(i.samplingMode),l.push(i.type),h.push(i.format),void 0!==c[i.uniqueId]?(u.push(-1),f.push(0)):(c[i.uniqueId]=e,i.is2DArray?(u.push(35866),f.push(i.depth)):i.isCube?(u.push(34067),f.push(0)):i.is3D?(u.push(32879),f.push(i.depth)):(u.push(3553),f.push(0))),this._faceIndices&&_.push(this._faceIndices[e]??0),this._layerIndices&&o.push(this._layerIndices[e]??0)}let p={samplingModes:a,generateMipMaps:t[0].generateMipMaps,generateDepthBuffer:this._generateDepthBuffer,generateStencilBuffer:this._generateStencilBuffer,generateDepthTexture:i,depthTextureFormat:n,types:l,formats:h,textureCount:r,targetTypes:u,faceIndex:_,layerIndex:o,layerCounts:f,label:this.label},T={width:this.width,height:this.height,depth:this.depth};e=this._engine.createMultipleRenderTarget(T,p);for(let i=0;i<r;++i){if(-1!==u[i])continue;let r=c[t[i].uniqueId];e.setTexture(e.textures[r],i)}}}else{let t={};if(t.generateDepthBuffer=this._generateDepthBuffer,t.generateMipMaps=this.texture?.generateMipMaps??!1,t.generateStencilBuffer=this._generateStencilBuffer,t.samplingMode=this.texture?.samplingMode,t.type=this.texture?.type,t.format=this.texture?.format,t.noColorAttachment=!this._textures,t.label=this.label,this.isCube)e=this._engine.createRenderTargetCubeTexture(this.width,t);else{let i={width:this.width,height:this.height,layers:this.is2DArray||this.is3D?this.texture?.depth:void 0};e=this._engine.createRenderTargetTexture(i,t)}e.texture&&(e.texture.isReady=!0)}return e}_swapRenderTargetWrapper(e){if(this._textures&&e._textures)for(let t=0;t<this._textures.length;++t)this._textures[t]._swapAndDie(e._textures[t],!1),e._textures[t].isReady=!0;this._depthStencilTexture&&e._depthStencilTexture&&(this._depthStencilTexture._swapAndDie(e._depthStencilTexture),e._depthStencilTexture.isReady=!0),this._textures=null,this._depthStencilTexture=null}_rebuild(){let e=this._cloneRenderTargetWrapper();if(e){if(this._depthStencilTexture){let t=this._depthStencilTexture.samplingMode,i=this._depthStencilTexture.format;e.createDepthStencilTexture(this._depthStencilTexture._comparisonFunction,2===t||3===t||11===t,this._depthStencilTextureWithStencil,this._depthStencilTexture.samples,i,this._depthStencilTextureLabel)}this.samples>1&&e.setSamples(this.samples),e._swapRenderTargetWrapper(this),e.dispose()}}releaseTextures(){if(this._textures)for(let e=0;e<this._textures.length;++e)this._textures[e].dispose();this._textures=null}dispose(e=!1){e||(this._depthStencilTexture?.dispose(),this._depthStencilTexture=null,this.releaseTextures()),this._engine._releaseRenderTargetWrapper(this)}}class d extends T{setDepthStencilTexture(e,t=!0){if(super.setDepthStencilTexture(e,t),!e)return;let i=this._engine,r=this._context,n=e._hardwareTexture;if(n&&e._autoMSAAManagement&&this._MSAAFramebuffer){let t=i._currentFramebuffer;i._bindUnboundFramebuffer(this._MSAAFramebuffer),r.framebufferRenderbuffer(r.FRAMEBUFFER,(0,p.HasStencilAspect)(e.format)?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,r.RENDERBUFFER,n.getMSAARenderBuffer()),i._bindUnboundFramebuffer(t)}}constructor(e,t,i,r,n){super(e,t,i,r),this._framebuffer=null,this._depthStencilBuffer=null,this._MSAAFramebuffer=null,this._colorTextureArray=null,this._depthStencilTextureArray=null,this._disposeOnlyFramebuffers=!1,this._currentLOD=0,this._context=n}_cloneRenderTargetWrapper(){let e;return this._colorTextureArray&&this._depthStencilTextureArray?(e=this._engine.createMultiviewRenderTargetTexture(this.width,this.height)).texture.isReady=!0:e=super._cloneRenderTargetWrapper(),e}_swapRenderTargetWrapper(e){super._swapRenderTargetWrapper(e),e._framebuffer=this._framebuffer,e._depthStencilBuffer=this._depthStencilBuffer,e._MSAAFramebuffer=this._MSAAFramebuffer,e._colorTextureArray=this._colorTextureArray,e._depthStencilTextureArray=this._depthStencilTextureArray,this._framebuffer=this._depthStencilBuffer=this._MSAAFramebuffer=this._colorTextureArray=this._depthStencilTextureArray=null}createDepthStencilTexture(e=0,t=!0,i=!1,r=1,n=14,s){if(this._depthStencilBuffer){let e=this._engine,t=e._currentFramebuffer,i=this._context;e._bindUnboundFramebuffer(this._framebuffer),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.RENDERBUFFER,null),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.RENDERBUFFER,null),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.STENCIL_ATTACHMENT,i.RENDERBUFFER,null),e._bindUnboundFramebuffer(t),i.deleteRenderbuffer(this._depthStencilBuffer),this._depthStencilBuffer=null}return super.createDepthStencilTexture(e,t,i,r,n,s)}shareDepth(e){super.shareDepth(e);let t=this._context,i=this._depthStencilBuffer,r=e._MSAAFramebuffer||e._framebuffer,n=this._engine;e._depthStencilBuffer&&e._depthStencilBuffer!==i&&t.deleteRenderbuffer(e._depthStencilBuffer),e._depthStencilBuffer=i;let s=e._generateStencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT;n._bindUnboundFramebuffer(r),t.framebufferRenderbuffer(t.FRAMEBUFFER,s,t.RENDERBUFFER,i),n._bindUnboundFramebuffer(null)}_bindTextureRenderTarget(e,t=0,i,r=0){let n,s=e._hardwareTexture;if(!s)return;let a=this._framebuffer,l=this._engine,h=l._currentFramebuffer;if(l._bindUnboundFramebuffer(a),l.webGLVersion>1){let a=this._context;n=a["COLOR_ATTACHMENT"+t],e.is2DArray||e.is3D?(i=i??this.layerIndices?.[t]??0,a.framebufferTextureLayer(a.FRAMEBUFFER,n,s.underlyingResource,r,i)):e.isCube?(i=i??this.faceIndices?.[t]??0,a.framebufferTexture2D(a.FRAMEBUFFER,n,a.TEXTURE_CUBE_MAP_POSITIVE_X+i,s.underlyingResource,r)):a.framebufferTexture2D(a.FRAMEBUFFER,n,a.TEXTURE_2D,s.underlyingResource,r)}else{let e=this._context;n=e["COLOR_ATTACHMENT"+t+"_WEBGL"];let a=void 0!==i?e.TEXTURE_CUBE_MAP_POSITIVE_X+i:e.TEXTURE_2D;e.framebufferTexture2D(e.FRAMEBUFFER,n,a,s.underlyingResource,r)}if(e._autoMSAAManagement&&this._MSAAFramebuffer){let e=this._context;l._bindUnboundFramebuffer(this._MSAAFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,s.getMSAARenderBuffer())}l._bindUnboundFramebuffer(h)}setTexture(e,t=0,i=!0){super.setTexture(e,t,i),this._bindTextureRenderTarget(e,t)}setLayerAndFaceIndices(e,t){if(super.setLayerAndFaceIndices(e,t),!this.textures||!this.layerIndices||!this.faceIndices)return;let i=this._attachments?.length??this.textures.length;for(let e=0;e<i;e++){let t=this.textures[e];t&&(t.is2DArray||t.is3D?this._bindTextureRenderTarget(t,e,this.layerIndices[e]):t.isCube?this._bindTextureRenderTarget(t,e,this.faceIndices[e]):this._bindTextureRenderTarget(t,e))}}setLayerAndFaceIndex(e=0,t,i){if(super.setLayerAndFaceIndex(e,t,i),!this.textures||!this.layerIndices||!this.faceIndices)return;let r=this.textures[e];r.is2DArray||r.is3D?this._bindTextureRenderTarget(this.textures[e],e,this.layerIndices[e]):r.isCube&&this._bindTextureRenderTarget(this.textures[e],e,this.faceIndices[e])}resolveMSAATextures(){let e=this._engine,t=e._currentFramebuffer;e._bindUnboundFramebuffer(this._MSAAFramebuffer),super.resolveMSAATextures(),e._bindUnboundFramebuffer(t)}dispose(e=this._disposeOnlyFramebuffers){let t=this._context;!e&&(this._colorTextureArray&&(this._context.deleteTexture(this._colorTextureArray),this._colorTextureArray=null),this._depthStencilTextureArray&&(this._context.deleteTexture(this._depthStencilTextureArray),this._depthStencilTextureArray=null)),this._framebuffer&&(t.deleteFramebuffer(this._framebuffer),this._framebuffer=null),this._depthStencilBuffer&&(t.deleteRenderbuffer(this._depthStencilBuffer),this._depthStencilBuffer=null),this._MSAAFramebuffer&&(t.deleteFramebuffer(this._MSAAFramebuffer),this._MSAAFramebuffer=null),super.dispose(e)}}let g=!1;g=!0,t.ThinEngine.prototype._createHardwareRenderTargetWrapper=function(e,t,i){let r=new d(e,t,i,this,this._gl);return this._renderTargetWrapperCache.push(r),r},t.ThinEngine.prototype.createRenderTargetTexture=function(e,t){let i,r,n=this._createHardwareRenderTargetWrapper(!1,!1,e),s=!0,a=!1,l=!1,h=1;void 0!==t&&"object"==typeof t&&(s=t.generateDepthBuffer??!0,a=!!t.generateStencilBuffer,l=!!t.noColorAttachment,i=t.colorAttachment,h=t.samples??1,r=t.label);let u=i||(l?null:this._createInternalTexture(e,t,!0,5)),_=e.width||e,o=e.height||e,f=this._currentFramebuffer,c=this._gl,p=c.createFramebuffer();if(this._bindUnboundFramebuffer(p),n._depthStencilBuffer=this._setupFramebufferDepthAttachments(a,s,_,o),!u||u.is2DArray||u.is3D||c.framebufferTexture2D(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.TEXTURE_2D,u._hardwareTexture.underlyingResource,0),this._bindUnboundFramebuffer(f),n.label=r??"RenderTargetWrapper",n._framebuffer=p,n._generateDepthBuffer=s,n._generateStencilBuffer=a,n.setTextures(u),i){if(n._samples=i.samples,i.samples>1){let e=i._hardwareTexture.getMSAARenderBuffer(0);n._MSAAFramebuffer=c.createFramebuffer(),this._bindUnboundFramebuffer(n._MSAAFramebuffer),c.framebufferRenderbuffer(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.RENDERBUFFER,e),this._bindUnboundFramebuffer(null)}}else this.updateRenderTargetTextureSampleCount(n,h);return n},t.ThinEngine.prototype._createDepthStencilTexture=function(e,t,i){let r=this._gl,a=e.layers||0,l=e.depth||0,h=r.TEXTURE_2D;0!==a?h=r.TEXTURE_2D_ARRAY:0!==l&&(h=r.TEXTURE_3D);let u=new n.InternalTexture(this,12);if(u.label=t.label,!this._caps.depthTextureExtension)return s.Logger.Error("Depth texture is not supported by your browser or hardware."),u;let _={bilinearFiltering:!1,comparisonFunction:0,generateStencil:!1,...t};if(this._bindTextureDirectly(h,u,!0),this._setupDepthStencilTexture(u,e,0!==_.comparisonFunction&&_.bilinearFiltering,_.comparisonFunction,_.samples),void 0!==_.depthTextureFormat){if(15!==_.depthTextureFormat&&16!==_.depthTextureFormat&&17!==_.depthTextureFormat&&13!==_.depthTextureFormat&&14!==_.depthTextureFormat&&18!==_.depthTextureFormat)return s.Logger.Error(`Depth texture ${_.depthTextureFormat} format is not supported.`),u;u.format=_.depthTextureFormat}else u.format=_.generateStencil?13:16;let o=(0,p.HasStencilAspect)(u.format),f=this._getWebGLTextureTypeFromDepthTextureFormat(u.format),c=o?r.DEPTH_STENCIL:r.DEPTH_COMPONENT,T=this._getInternalFormatFromDepthTextureFormat(u.format,!0,o);return u.is2DArray?r.texImage3D(h,0,T,u.width,u.height,a,0,c,f,null):u.is3D?r.texImage3D(h,0,T,u.width,u.height,l,0,c,f,null):r.texImage2D(h,0,T,u.width,u.height,0,c,f,null),this._bindTextureDirectly(h,null),this._internalTexturesCache.push(u),i._depthStencilBuffer&&(r.deleteRenderbuffer(i._depthStencilBuffer),i._depthStencilBuffer=null),this._bindUnboundFramebuffer(i._MSAAFramebuffer??i._framebuffer),i._generateStencilBuffer=o,i._depthStencilTextureWithStencil=o,i._depthStencilBuffer=this._setupFramebufferDepthAttachments(i._generateStencilBuffer,i._generateDepthBuffer,i.width,i.height,i.samples,u.format),this._bindUnboundFramebuffer(null),u},t.ThinEngine.prototype.updateRenderTargetTextureSampleCount=function(e,t){if(this.webGLVersion<2||!e)return 1;if(e.samples===t)return t;let i=this._gl;t=Math.min(t,this.getCaps().maxMSAASamples),e._depthStencilBuffer&&(i.deleteRenderbuffer(e._depthStencilBuffer),e._depthStencilBuffer=null),e._MSAAFramebuffer&&(i.deleteFramebuffer(e._MSAAFramebuffer),e._MSAAFramebuffer=null);let r=e.texture?._hardwareTexture;if(r?.releaseMSAARenderBuffers(),e.texture&&t>1&&"function"==typeof i.renderbufferStorageMultisample){let n=i.createFramebuffer();if(!n)throw Error("Unable to create multi sampled framebuffer");e._MSAAFramebuffer=n,this._bindUnboundFramebuffer(e._MSAAFramebuffer);let s=this._createRenderBuffer(e.texture.width,e.texture.height,t,-1,this._getRGBABufferInternalSizedFormat(e.texture.type,e.texture.format,e.texture._useSRGBBuffer),i.COLOR_ATTACHMENT0,!1);if(!s)throw Error("Unable to create multi sampled framebuffer");r?.addMSAARenderBuffer(s)}this._bindUnboundFramebuffer(e._MSAAFramebuffer??e._framebuffer),e.texture&&(e.texture.samples=t),e._samples=t;let n=e._depthStencilTexture?e._depthStencilTexture.format:void 0;return e._depthStencilBuffer=this._setupFramebufferDepthAttachments(e._generateStencilBuffer,e._generateDepthBuffer,e.width,e.height,t,n),this._bindUnboundFramebuffer(null),t},t.ThinEngine.prototype._setupDepthStencilTexture=function(e,t,i,r,n=1){let s=t.width??t,a=t.height??t,l=t.layers||0,h=t.depth||0;e.baseWidth=s,e.baseHeight=a,e.width=s,e.height=a,e.is2DArray=l>0,e.depth=l||h,e.isReady=!0,e.samples=n,e.generateMipMaps=!1,e.samplingMode=i?2:1,e.type=0,e._comparisonFunction=r;let u=this._gl,_=this._getTextureTarget(e),o=this._getSamplingParameters(e.samplingMode,!1);u.texParameteri(_,u.TEXTURE_MAG_FILTER,o.mag),u.texParameteri(_,u.TEXTURE_MIN_FILTER,o.min),u.texParameteri(_,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(_,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE),this.webGLVersion>1&&(0===r?(u.texParameteri(_,u.TEXTURE_COMPARE_FUNC,515),u.texParameteri(_,u.TEXTURE_COMPARE_MODE,u.NONE)):(u.texParameteri(_,u.TEXTURE_COMPARE_FUNC,r),u.texParameteri(_,u.TEXTURE_COMPARE_MODE,u.COMPARE_REF_TO_TEXTURE)))};let E=!1;E=!0,t.ThinEngine.prototype.setDepthStencilTexture=function(e,t,i,r){void 0!==e&&(t&&(this._boundUniforms[e]=t),i&&i.depthStencilTexture?this._setTexture(e,i,!1,!0,r):this._setTexture(e,null,void 0,void 0,r))};let A=!1;A=!0,t.ThinEngine.prototype.createRenderTargetCubeTexture=function(e,t){let i=this._createHardwareRenderTargetWrapper(!1,!0,e),r={generateMipMaps:!0,generateDepthBuffer:!0,generateStencilBuffer:!1,type:0,samplingMode:3,format:5,...t};r.generateStencilBuffer=r.generateDepthBuffer&&r.generateStencilBuffer,(1!==r.type||this._caps.textureFloatLinearFiltering)&&(2!==r.type||this._caps.textureHalfFloatLinearFiltering)||(r.samplingMode=1);let a=this._gl,l=new n.InternalTexture(this,5);this._bindTextureDirectly(a.TEXTURE_CUBE_MAP,l,!0);let h=this._getSamplingParameters(r.samplingMode,r.generateMipMaps);1!==r.type||this._caps.textureFloat||(r.type=0,s.Logger.Warn("Float textures are not supported. Cube render target forced to TEXTURETYPE_UNESIGNED_BYTE type")),a.texParameteri(a.TEXTURE_CUBE_MAP,a.TEXTURE_MAG_FILTER,h.mag),a.texParameteri(a.TEXTURE_CUBE_MAP,a.TEXTURE_MIN_FILTER,h.min),a.texParameteri(a.TEXTURE_CUBE_MAP,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_CUBE_MAP,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE);for(let t=0;t<6;t++)a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,this._getRGBABufferInternalSizedFormat(r.type,r.format),e,e,0,this._getInternalFormat(r.format),this._getWebGLTextureType(r.type),null);let u=a.createFramebuffer();return this._bindUnboundFramebuffer(u),i._depthStencilBuffer=this._setupFramebufferDepthAttachments(r.generateStencilBuffer,r.generateDepthBuffer,e,e),r.generateMipMaps&&a.generateMipmap(a.TEXTURE_CUBE_MAP),this._bindTextureDirectly(a.TEXTURE_CUBE_MAP,null),this._bindUnboundFramebuffer(null),i._framebuffer=u,i._generateDepthBuffer=r.generateDepthBuffer,i._generateStencilBuffer=r.generateStencilBuffer,l.width=e,l.height=e,l.isReady=!0,l.isCube=!0,l.samples=1,l.generateMipMaps=r.generateMipMaps,l.samplingMode=r.samplingMode,l.type=r.type,l.format=r.format,this._internalTexturesCache.push(l),i.setTextures(l),i};var b=e.i(27952),m=e.i(79452);let x=!1;x=!0,t.ThinEngine.prototype.createPrefilteredCubeTexture=function(t,i,r,a,l=null,h=null,u,_=null,o=!0){let f=async t=>{if(!t){l&&l(null);return}let h=t.texture;if(o?t.info.sphericalPolynomial&&(h._sphericalPolynomial=t.info.sphericalPolynomial):h._sphericalPolynomial=h._sphericalPolynomial??new b.SphericalPolynomial,h._source=9,this.getCaps().textureLOD){l&&l(h);return}let u=this._gl,_=t.width;if(!_)return;let{DDSTools:f}=await e.A(72061),c=[];for(let e=0;e<3;e++){let l=Math.log2(_)*r+a,o=Math.round(Math.min(Math.max(a+(l-a)*(1-e/2),0),l)),p=new n.InternalTexture(this,2);if(p.type=h.type,p.format=h.format,p.width=Math.pow(2,Math.max(Math.log2(_)-o,0)),p.height=p.width,p.isCube=!0,p._cachedWrapU=0,p._cachedWrapV=0,this._bindTextureDirectly(u.TEXTURE_CUBE_MAP,p,!0),p.samplingMode=2,u.texParameteri(u.TEXTURE_CUBE_MAP,u.TEXTURE_MAG_FILTER,u.LINEAR),u.texParameteri(u.TEXTURE_CUBE_MAP,u.TEXTURE_MIN_FILTER,u.LINEAR),u.texParameteri(u.TEXTURE_CUBE_MAP,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(u.TEXTURE_CUBE_MAP,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE),t.isDDS){let e=t.info,i=t.data;this._unpackFlipY(e.isCompressed),f.UploadDDSLevels(this,p,i,e,!0,6,o)}else s.Logger.Warn("DDS is the only prefiltered cube map supported so far.");this._bindTextureDirectly(u.TEXTURE_CUBE_MAP,null);let T=new m.BaseTexture(i);T._isCube=!0,T._texture=p,p.isReady=!0,c.push(T)}h._lodTextureHigh=c[2],h._lodTextureMid=c[1],h._lodTextureLow=c[0],l&&l(h)};return this.createCubeTexture(t,i,null,!1,f,h,u,_,o,r,a)};var R=e.i(23733);let S=!1;S=!0,t.ThinEngine.prototype.createUniformBuffer=function(e,t){let i=this._gl.createBuffer();if(!i)throw Error("Unable to create uniform buffer");let r=new R.WebGLDataBuffer(i);return this.bindUniformBuffer(r),e instanceof Float32Array?this._gl.bufferData(this._gl.UNIFORM_BUFFER,e,this._gl.STATIC_DRAW):this._gl.bufferData(this._gl.UNIFORM_BUFFER,new Float32Array(e),this._gl.STATIC_DRAW),this.bindUniformBuffer(null),r.references=1,r},t.ThinEngine.prototype.createDynamicUniformBuffer=function(e,t){let i=this._gl.createBuffer();if(!i)throw Error("Unable to create dynamic uniform buffer");let r=new R.WebGLDataBuffer(i);return this.bindUniformBuffer(r),e instanceof Float32Array?this._gl.bufferData(this._gl.UNIFORM_BUFFER,e,this._gl.DYNAMIC_DRAW):this._gl.bufferData(this._gl.UNIFORM_BUFFER,new Float32Array(e),this._gl.DYNAMIC_DRAW),this.bindUniformBuffer(null),r.references=1,r},t.ThinEngine.prototype.updateUniformBuffer=function(e,t,i,r){this.bindUniformBuffer(e),void 0===i&&(i=0),void 0===r?t instanceof Float32Array?this._gl.bufferSubData(this._gl.UNIFORM_BUFFER,i,t):this._gl.bufferSubData(this._gl.UNIFORM_BUFFER,i,new Float32Array(t)):t instanceof Float32Array?this._gl.bufferSubData(this._gl.UNIFORM_BUFFER,0,t.subarray(i,i+r)):this._gl.bufferSubData(this._gl.UNIFORM_BUFFER,0,new Float32Array(t).subarray(i,i+r)),this.bindUniformBuffer(null)},t.ThinEngine.prototype.bindUniformBuffer=function(e){this._gl.bindBuffer(this._gl.UNIFORM_BUFFER,e?e.underlyingResource:null)},t.ThinEngine.prototype.bindUniformBufferBase=function(e,t,i){this._gl.bindBufferBase(this._gl.UNIFORM_BUFFER,t,e?e.underlyingResource:null)},t.ThinEngine.prototype.bindUniformBlock=function(e,t,i){let r=e.program,n=this._gl.getUniformBlockIndex(r,t);0xffffffff!==n&&this._gl.uniformBlockBinding(r,n,i)};var F=e.i(7484),M=e.i(99429);let y=!1;y=!0,M.AbstractEngine.prototype.displayLoadingUI=function(){if(!(0,F.IsWindowObjectExist)())return;let e=this.loadingScreen;e&&e.displayLoadingUI()},M.AbstractEngine.prototype.hideLoadingUI=function(){if(!(0,F.IsWindowObjectExist)())return;let e=this._loadingScreen;e&&e.hideLoadingUI()},Object.defineProperty(M.AbstractEngine.prototype,"loadingScreen",{get:function(){return!this._loadingScreen&&this._renderingCanvas&&(this._loadingScreen=M.AbstractEngine.DefaultLoadingScreenFactory(this._renderingCanvas)),this._loadingScreen},set:function(e){this._loadingScreen=e},enumerable:!0,configurable:!0}),Object.defineProperty(M.AbstractEngine.prototype,"loadingUIText",{set:function(e){this.loadingScreen.loadingUIText=e},enumerable:!0,configurable:!0}),Object.defineProperty(M.AbstractEngine.prototype,"loadingUIBackgroundColor",{set:function(e){this.loadingScreen.loadingUIBackgroundColor=e},enumerable:!0,configurable:!0}),(0,e.i(85303).RegisterAbstractEngineDom)();let U=!1;U=!0,M.AbstractEngine.prototype.getInputElement=function(){return this._renderingCanvas},M.AbstractEngine.prototype.getDepthFunction=function(){return this._depthCullingState.depthFunc},M.AbstractEngine.prototype.setDepthFunction=function(e){this._depthCullingState.depthFunc=e},M.AbstractEngine.prototype.setDepthFunctionToGreater=function(){this.setDepthFunction(516)},M.AbstractEngine.prototype.setDepthFunctionToGreaterOrEqual=function(){this.setDepthFunction(518)},M.AbstractEngine.prototype.setDepthFunctionToLess=function(){this.setDepthFunction(513)},M.AbstractEngine.prototype.setDepthFunctionToLessOrEqual=function(){this.setDepthFunction(515)},M.AbstractEngine.prototype.getDepthWrite=function(){return this._depthCullingState.depthMask},M.AbstractEngine.prototype.setDepthWrite=function(e){this._depthCullingState.depthMask=e},M.AbstractEngine.prototype.setAlphaConstants=function(e,t,i,r){this._alphaState.setAlphaBlendConstants(e,t,i,r)},M.AbstractEngine.prototype.getAlphaMode=function(e=0){return this._alphaMode[e]},M.AbstractEngine.prototype.getAlphaEquation=function(e=0){return this._alphaEquation[e]};let B=!1;B=!0,M.AbstractEngine.prototype.getStencilBuffer=function(){return this._stencilState.stencilTest},M.AbstractEngine.prototype.setStencilBuffer=function(e){this._stencilState.stencilTest=e},M.AbstractEngine.prototype.getStencilMask=function(){return this._stencilState.stencilMask},M.AbstractEngine.prototype.setStencilMask=function(e){this._stencilState.stencilMask=e},M.AbstractEngine.prototype.getStencilFunction=function(){return this._stencilState.stencilFunc},M.AbstractEngine.prototype.getStencilBackFunction=function(){return this._stencilState.stencilBackFunc},M.AbstractEngine.prototype.getStencilFunctionReference=function(){return this._stencilState.stencilFuncRef},M.AbstractEngine.prototype.getStencilFunctionMask=function(){return this._stencilState.stencilFuncMask},M.AbstractEngine.prototype.setStencilFunction=function(e){this._stencilState.stencilFunc=e},M.AbstractEngine.prototype.setStencilBackFunction=function(e){this._stencilState.stencilBackFunc=e},M.AbstractEngine.prototype.setStencilFunctionReference=function(e){this._stencilState.stencilFuncRef=e},M.AbstractEngine.prototype.setStencilFunctionMask=function(e){this._stencilState.stencilFuncMask=e},M.AbstractEngine.prototype.getStencilOperationFail=function(){return this._stencilState.stencilOpStencilFail},M.AbstractEngine.prototype.getStencilBackOperationFail=function(){return this._stencilState.stencilBackOpStencilFail},M.AbstractEngine.prototype.getStencilOperationDepthFail=function(){return this._stencilState.stencilOpDepthFail},M.AbstractEngine.prototype.getStencilBackOperationDepthFail=function(){return this._stencilState.stencilBackOpDepthFail},M.AbstractEngine.prototype.getStencilOperationPass=function(){return this._stencilState.stencilOpStencilDepthPass},M.AbstractEngine.prototype.getStencilBackOperationPass=function(){return this._stencilState.stencilBackOpStencilDepthPass},M.AbstractEngine.prototype.setStencilOperationFail=function(e){this._stencilState.stencilOpStencilFail=e},M.AbstractEngine.prototype.setStencilBackOperationFail=function(e){this._stencilState.stencilBackOpStencilFail=e},M.AbstractEngine.prototype.setStencilOperationDepthFail=function(e){this._stencilState.stencilOpDepthFail=e},M.AbstractEngine.prototype.setStencilBackOperationDepthFail=function(e){this._stencilState.stencilBackOpDepthFail=e},M.AbstractEngine.prototype.setStencilOperationPass=function(e){this._stencilState.stencilOpStencilDepthPass=e},M.AbstractEngine.prototype.setStencilBackOperationPass=function(e){this._stencilState.stencilBackOpStencilDepthPass=e},M.AbstractEngine.prototype.cacheStencilState=function(){this._cachedStencilBuffer=this.getStencilBuffer(),this._cachedStencilFunction=this.getStencilFunction(),this._cachedStencilMask=this.getStencilMask(),this._cachedStencilOperationPass=this.getStencilOperationPass(),this._cachedStencilOperationFail=this.getStencilOperationFail(),this._cachedStencilOperationDepthFail=this.getStencilOperationDepthFail(),this._cachedStencilReference=this.getStencilFunctionReference()},M.AbstractEngine.prototype.restoreStencilState=function(){this.setStencilFunction(this._cachedStencilFunction),this.setStencilMask(this._cachedStencilMask),this.setStencilBuffer(this._cachedStencilBuffer),this.setStencilOperationPass(this._cachedStencilOperationPass),this.setStencilOperationFail(this._cachedStencilOperationFail),this.setStencilOperationDepthFail(this._cachedStencilOperationDepthFail),this.setStencilFunctionReference(this._cachedStencilReference)},(0,e.i(60272).RegisterAbstractEngineRenderPass)(),(0,e.i(42192).RegisterAbstractEngineTexture)();var D=e.i(33169);let C=!1;C=!0,(0,D.RegisterFileTools)(),M.AbstractEngine.prototype._loadFileAsync=async function(e,t,i){return await new Promise((r,n)=>{this._loadFile(e,e=>{r(e)},void 0,t,i,(e,t)=>{n(t)})})};var P=e.i(2596);M.AbstractEngine.GetCompatibleTextureLoader=P._GetCompatibleTextureLoader;let I=!1;I=!0,t.ThinEngine.prototype.enableScissor=function(e,t,i,r){let n=this._gl;n.enable(n.SCISSOR_TEST),n.scissor(e,t,i,r)},t.ThinEngine.prototype.disableScissor=function(){let e=this._gl;e.disable(e.SCISSOR_TEST)},e.s([],62855),e.i(62855);var w=e.i(88975);e.s(["Engine",()=>w.Engine],69260)}]);
|