@uptimizr/dashboard 0.4.6 → 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 +19 -5
- package/out/__next._full.txt +10 -10
- package/out/__next._tree.txt +1 -1
- package/out/_next/static/chunks/{3cp5nmtwxq4gr.js → 0-6mdj5wxsfid.js} +1 -1
- package/out/_next/static/chunks/{2clevl_9ayd0x.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/{1fervgvgv10r-.js → 02ic9b5ejugow.js} +1 -1
- package/out/_next/static/chunks/03p70i4c7qt0v.js +1 -0
- package/out/_next/static/chunks/{3zv5kyos9vtmm.js → 03pjr-ivdicng.js} +1 -1
- package/out/_next/static/chunks/041a06-lxipy5.js +1 -0
- package/out/_next/static/chunks/{3-yhe6rcsjh88.js → 06dzkwetqis-5.js} +1 -1
- package/out/_next/static/chunks/{2mjjo0yj-4ro4.js → 06kvanz5-fo52.js} +1 -1
- package/out/_next/static/chunks/{28i3wgvgn_at1.js → 07y8ke_iy59dn.js} +1 -1
- package/out/_next/static/chunks/09jukc-4jl735.js +1 -0
- package/out/_next/static/chunks/{0cmyc-uvk93kl.js → 09khmdgez3t0a.js} +74 -74
- package/out/_next/static/chunks/{2x-7kbwq8tl-o.js → 0_dca4876jshu.js} +196 -196
- 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/{2-_a-v1xeo5hb.js → 0ctain5xq2wsd.js} +116 -115
- package/out/_next/static/chunks/{3yk0hzfq5rcs6.js → 0df-dr3otg_4w.js} +1 -1
- package/out/_next/static/chunks/{0i9wa8hjd-5tc.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/{287hakn2ijupp.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/{3ioxfi3bvznhh.js → 0ip6v64di_l6x.js} +1 -1
- package/out/_next/static/chunks/{184pz6z3dflfm.js → 0ixymgjgz3grn.js} +20 -20
- 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/{3p03l0z65c8vc.js → 0oyf2xzv8ofkk.js} +253 -253
- package/out/_next/static/chunks/0qvsy3gcqjm12.js +1 -0
- package/out/_next/static/chunks/{0yd4_xh476fjn.js → 0rl4ddh2vgxyl.js} +97 -97
- package/out/_next/static/chunks/0rwpttmsmqvn_.js +1 -0
- package/out/_next/static/chunks/0so3wjp9ch93y.js +1 -0
- package/out/_next/static/chunks/{36pz_ews7u0xb.js → 0te4g160_rb5d.js} +1 -1
- package/out/_next/static/chunks/0uby-zvu799ef.js +1 -0
- package/out/_next/static/chunks/{2kk_vvmr2xm3d.js → 0uvn0op2mlr2u.js} +12 -12
- package/out/_next/static/chunks/0vwj4hxjm0igv.js +1 -0
- package/out/_next/static/chunks/{0r-x702_jvhud.js → 0w7c30w07uct2.js} +12 -12
- 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/{3twr9ds68-9us.js → 0zo8xa0nej3ex.js} +1 -1
- package/out/_next/static/chunks/{1lu7rjfvxj8yj.js → 0zsir95gpf3xw.js} +1 -1
- package/out/_next/static/chunks/{1j4c0nvdo5q68.js → 0zu6ryyj0ig-j.js} +1 -1
- package/out/_next/static/chunks/{1bv-jzy_2jiqs.js → 1-jv8k10q_1uw.js} +1 -1
- package/out/_next/static/chunks/{0xx7_7y5jdlh4.js → 1-s5ioie9a94e.js} +1 -1
- package/out/_next/static/chunks/{27z7j17kcrty_.js → 1-yos1h0qws5e.js} +11 -11
- package/out/_next/static/chunks/10o7brc3x027r.js +1 -0
- package/out/_next/static/chunks/{2xe4bgir5l-9b.js → 10pae4gb9i929.js} +504 -504
- package/out/_next/static/chunks/13p93itm8a3ym.js +1 -0
- package/out/_next/static/chunks/{2mrkv0z2i74pv.js → 147s8i_lktp4_.js} +2 -2
- package/out/_next/static/chunks/{3nwaovnpiyrt8.js → 14tgo5xt_3j4w.js} +3 -3
- package/out/_next/static/chunks/1699hx-vlak0n.js +22 -0
- package/out/_next/static/chunks/{2b5nt7yn-pq3a.js → 16d6n9e77rqti.js} +1 -1
- package/out/_next/static/chunks/{3nr48h9zwum-3.js → 16f3d5dv83rsr.js} +1 -1
- package/out/_next/static/chunks/16i_tpwn_cmr-.js +1 -0
- package/out/_next/static/chunks/{2117sv2qzo6yq.js → 16rfr165nbha0.js} +1 -1
- package/out/_next/static/chunks/16sl51pvzo4tf.js +1 -0
- package/out/_next/static/chunks/1760s-32qpwgg.js +1 -0
- package/out/_next/static/chunks/{3rj-5v0j_2-_2.js → 18kq07c5xy_4g.js} +4 -4
- package/out/_next/static/chunks/{2wgh5i70bzelt.js → 190tbzt861ao3.js} +392 -392
- package/out/_next/static/chunks/19bhv6cupnnyj.js +1 -0
- package/out/_next/static/chunks/1_14pn2wwebxy.js +1 -0
- package/out/_next/static/chunks/{2_lw4d7t-xcqi.js → 1_kikmeubh0wq.js} +523 -522
- 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/{2s4fzgzkwjluu.js → 1bf421g4peccx.js} +2 -2
- package/out/_next/static/chunks/1bfony5qsc5tp.js +1 -0
- package/out/_next/static/chunks/{3vtmucpx25o7q.js → 1ddt0ot7kl8vq.js} +584 -584
- package/out/_next/static/chunks/1emz2vjkgck4z.js +1 -0
- package/out/_next/static/chunks/1eogzzw8i1wsg.js +1 -0
- package/out/_next/static/chunks/1g9p2h1-31q8o.js +1 -0
- package/out/_next/static/chunks/1gcz1k1v1woca.js +1 -0
- package/out/_next/static/chunks/1h8lyicgqhpxa.js +1 -0
- package/out/_next/static/chunks/{0e5dcxmkprebg.js → 1hot663akaepl.js} +1 -1
- package/out/_next/static/chunks/1i7pgl3ks5ye0.js +1 -0
- package/out/_next/static/chunks/{0xzamrecplwzw.js → 1i8sk_qgpdjhs.js} +1 -1
- package/out/_next/static/chunks/1kk3ct7pkpf3b.js +1 -0
- package/out/_next/static/chunks/1kq9o8del67le.js +1 -0
- package/out/_next/static/chunks/1l7tzyx2mumlq.js +1 -0
- 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/{1f07l3q77zat1.js → 1ogs4_aj84bfn.js} +1 -1
- package/out/_next/static/chunks/{3_dm45k0vk1aa.js → 1p206txlluipi.js} +565 -565
- package/out/_next/static/chunks/1p2bt1w845v6c.js +1 -0
- package/out/_next/static/chunks/1p3rgz4aef1gk.js +1 -0
- package/out/_next/static/chunks/{0ypejzd74ixbw.js → 1qcgdx9yl0gfx.js} +15 -15
- 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/{374lzksboll-t.js → 1sa6qiidtcyk2.js} +1 -1
- package/out/_next/static/chunks/1t-9vrdrsi8le.js +1 -0
- package/out/_next/static/chunks/1t97zo0tlpbnz.js +1 -0
- package/out/_next/static/chunks/1te2tinzqnwck.js +1 -0
- package/out/_next/static/chunks/{3j3ol_d1vsdhx.js → 1trt-m2nrck0v.js} +1 -1
- package/out/_next/static/chunks/{3vu5y270muh-7.js → 1ty9jpwr3o_st.js} +1 -1
- package/out/_next/static/chunks/{415g3asdds1ac.js → 1u6w6veke8rze.js} +1 -1
- package/out/_next/static/chunks/{0-laj-bivzp4x.js → 1u900urmrbv73.js} +1 -1
- package/out/_next/static/chunks/{0o73w0cn5n_vl.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/{1my968s78he8g.js → 1xf1wfow43ekc.js} +15 -15
- package/out/_next/static/chunks/1y10o40v9odam.js +1 -0
- package/out/_next/static/chunks/{3_gfl66zf638s.js → 1y_zykt3fpen4.js} +901 -906
- package/out/_next/static/chunks/1ye6xtbm16pg4.js +1 -0
- package/out/_next/static/chunks/1z6_57k5h31u7.js +1 -0
- package/out/_next/static/chunks/1zboqft0h6mop.js +1 -0
- package/out/_next/static/chunks/1zr3c351x0ri5.js +1 -0
- package/out/_next/static/chunks/2-5p2lcedvrli.js +1 -0
- package/out/_next/static/chunks/{1_4hh3dfop93j.js → 206hxrq60f1_e.js} +1 -1
- 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/{3qo7e6b73mfxq.js → 22z-2t_yp1jzs.js} +1 -1
- package/out/_next/static/chunks/{3d43gd91r06y6.js → 23hmfdw6z5zfy.js} +507 -505
- package/out/_next/static/chunks/23y1krqnc-8sm.js +1 -0
- package/out/_next/static/chunks/{0gk5rnci1hznh.js → 24tbkj1qkux88.js} +2 -2
- package/out/_next/static/chunks/{2-i29-jdbwww6.js → 26cmri51v7497.js} +111 -111
- 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/{2oacwtbslo90t.js → 2a31-txop1jzg.js} +360 -360
- package/out/_next/static/chunks/2bse5vll1o-x0.js +1 -0
- package/out/_next/static/chunks/2ct40spu9wfj7.js +1 -0
- package/out/_next/static/chunks/{2epukrz6paj9n.js → 2ept01b7t-e03.js} +1 -1
- package/out/_next/static/chunks/{22yht3s7c-xih.js → 2ey5dqelco_g5.js} +1 -1
- package/out/_next/static/chunks/2fd_009hw7y0m.js +1 -0
- package/out/_next/static/chunks/{2fspbfbxbswzd.js → 2ftz9kaxrsgxh.js} +1 -1
- package/out/_next/static/chunks/2gefdnozflr7p.js +1 -0
- package/out/_next/static/chunks/{2as_br1awqk6k.js → 2gs-u1n5uv7iz.js} +496 -496
- package/out/_next/static/chunks/{1a94whad0y57f.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/{2laz1v9fg2a2z.js → 2lh_w9rzy3vek.js} +1 -1
- package/out/_next/static/chunks/{3mmy9zsb7zo-m.js → 2ln1na26qwp-3.js} +23 -23
- 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/{25brs445bjbik.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/2qe46redkqhfg.js +1 -0
- package/out/_next/static/chunks/2qmfe0mqw150h.js +1 -0
- package/out/_next/static/chunks/2qtc0nbl_521e.js +1 -0
- package/out/_next/static/chunks/2rofu6gu1xzuq.js +1 -0
- 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/{3my05px5mv_s5.js → 2urh9qafp3fiw.js} +235 -235
- package/out/_next/static/chunks/{23-y1f_zw56vo.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/2wwra56rehfcj.js +1 -0
- 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/{0q0i4pdyq66gb.js → 30t3203d7p2da.js} +1 -1
- package/out/_next/static/chunks/{3t4ys6th6gf2w.js → 31kto7-dxkt3z.js} +1 -1
- package/out/_next/static/chunks/{0j0a0wvmmghxj.js → 32oflcl79d8mu.js} +1 -1
- package/out/_next/static/chunks/32ovg81ae0l03.js +1 -0
- package/out/_next/static/chunks/{2c8rmxz151fxa.js → 331kthnvoma7n.js} +224 -224
- package/out/_next/static/chunks/337kn1mn34rc6.js +1 -0
- package/out/_next/static/chunks/{336ckqpboqmbn.js → 33xug8kf0-a1o.js} +1 -1
- package/out/_next/static/chunks/34dcb7_flbrvo.js +1 -0
- package/out/_next/static/chunks/34zotyeqrz_nq.js +1 -0
- package/out/_next/static/chunks/351wsmi75l8db.js +1 -0
- package/out/_next/static/chunks/36yv-ialtpx98.js +1 -0
- package/out/_next/static/chunks/37hwasxtee5e0.js +1 -0
- package/out/_next/static/chunks/37t0iclgxes05.js +1 -0
- package/out/_next/static/chunks/{1x0j78ohufpul.js → 37xnvnx1jxfaf.js} +1 -1
- package/out/_next/static/chunks/{29hkkj9raxte9.js → 38w74ixqt-9co.js} +77 -77
- package/out/_next/static/chunks/{0jap7l5-bskj4.js → 39t2x_9zd2rst.js} +12 -12
- package/out/_next/static/chunks/{38q0enmlg5q9o.js → 39v73timmzwny.js} +2 -2
- package/out/_next/static/chunks/{3puu2_-t0lln9.js → 3_xqc3658d8sw.js} +12 -12
- package/out/_next/static/chunks/3ba8eudvlczwe.js +1 -0
- package/out/_next/static/chunks/3buezhxqc8n6n.js +1 -0
- package/out/_next/static/chunks/3c5iwwj-fhbue.js +1 -0
- package/out/_next/static/chunks/{2kmmk9coo9_b0.js → 3d8ot2tw6yqfq.js} +143 -143
- package/out/_next/static/chunks/3dc057ffe7ij-.js +1 -0
- package/out/_next/static/chunks/3djnlzwj9869o.js +1 -0
- package/out/_next/static/chunks/{2_6b9lraq-exh.js → 3fuqxjjf8o1v9.js} +5 -5
- package/out/_next/static/chunks/{0j2ygtc_-bo3m.js → 3gt6rzg9qw-an.js} +1 -1
- package/out/_next/static/chunks/{0rykrf_vofbad.js → 3h_05w5j8x538.js} +1 -1
- package/out/_next/static/chunks/{3txu-i5qn183a.js → 3hkhd1_k8xohv.js} +321 -321
- package/out/_next/static/chunks/{2h07np207nlx7.js → 3ijcc5tfisfnj.js} +1 -1
- package/out/_next/static/chunks/3j0dbpd9zop3p.js +1 -0
- package/out/_next/static/chunks/{14e4k-718qadd.js → 3ju83xk-ca7ma.js} +163 -168
- package/out/_next/static/chunks/3jxhl4apmhbm1.js +13 -0
- package/out/_next/static/chunks/{1h1gixjbjkbsl.js → 3la99oz_0p0r6.js} +5 -5
- package/out/_next/static/chunks/{1mt4cnd_d6jvf.js → 3n1b34fd5fdrh.js} +1 -1
- package/out/_next/static/chunks/3nq_hq4x3rn3r.js +1 -0
- 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/{1zmx71cvc6ksk.js → 3q38kdbzd2nbd.js} +1 -1
- package/out/_next/static/chunks/3q5zl4ks17au2.js +1 -0
- package/out/_next/static/chunks/{1t2g1v0ubcsam.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/3u7zj1-jdg781.js +1 -0
- package/out/_next/static/chunks/{0o0qtv35dqv3i.js → 3wj5dmf6cywz8.js} +239 -239
- package/out/_next/static/chunks/{2iu0_3cx-ny74.js → 3wr_oijfsq8lr.js} +11 -11
- package/out/_next/static/chunks/3xu0dh1ikzwj2.js +1 -0
- package/out/_next/static/chunks/{0vzo-8t8c26k9.js → 3y5tpixt23-fl.js} +1 -1
- 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/43usshq2nc125.js +1 -0
- package/out/_next/static/chunks/{161yjxmdz9obc.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 +11 -11
- package/out/_not-found/__next._not-found.__PAGE__.txt +19 -2
- package/out/_not-found/__next._tree.txt +1 -1
- package/out/_not-found.html +1 -1
- package/out/_not-found.txt +11 -11
- package/out/index.html +1 -1
- package/out/index.txt +10 -10
- package/package.json +11 -11
- package/out/__next._head.txt +0 -6
- package/out/__next._index.txt +0 -5
- package/out/_next/static/chunks/0-k4hp87gwues.js +0 -1
- package/out/_next/static/chunks/04zj0yf1qhk1o.js +0 -1
- package/out/_next/static/chunks/06fbalmyyfpsy.js +0 -1
- package/out/_next/static/chunks/07hgbbqksqd1g.js +0 -1
- package/out/_next/static/chunks/08ou2nvy48e0u.js +0 -1
- package/out/_next/static/chunks/08y5-irjbsiy8.js +0 -1
- package/out/_next/static/chunks/0_jrfk2u1u3fi.js +0 -1
- package/out/_next/static/chunks/0a475u_q5i_dd.js +0 -62
- package/out/_next/static/chunks/0aad2r4s4wl1x.js +0 -5
- package/out/_next/static/chunks/0d9pxx1w_zqr9.js +0 -1
- package/out/_next/static/chunks/0gnjtwq-474uc.js +0 -1
- package/out/_next/static/chunks/0gsh_d0m5xss1.js +0 -1
- package/out/_next/static/chunks/0ibzpjo0h731v.js +0 -1
- package/out/_next/static/chunks/0j_3k5qhv_mdx.js +0 -1
- package/out/_next/static/chunks/0jis2w2mfx062.js +0 -1
- package/out/_next/static/chunks/0jjvp2slpf7d6.js +0 -1
- package/out/_next/static/chunks/0ko10wo4rc9-b.js +0 -1
- package/out/_next/static/chunks/0lqmvz6k2h_of.js +0 -1
- package/out/_next/static/chunks/0lwjmr8efrlbt.js +0 -17
- package/out/_next/static/chunks/0noxyupihh8dk.js +0 -1
- package/out/_next/static/chunks/0o1vph7x9shzu.js +0 -1
- package/out/_next/static/chunks/0p6phe9kjlxn8.js +0 -1
- package/out/_next/static/chunks/0ptxb9dcwsw3o.js +0 -1
- package/out/_next/static/chunks/0q8pt8fd0ma30.js +0 -1
- package/out/_next/static/chunks/0qqx9aoz8l5d2.js +0 -1
- package/out/_next/static/chunks/0tsk32q-88t_7.js +0 -1
- package/out/_next/static/chunks/0u7577db_ivyr.js +0 -1
- package/out/_next/static/chunks/0unnrt0un064x.js +0 -1
- package/out/_next/static/chunks/0uygtr4mo3h0v.js +0 -1
- package/out/_next/static/chunks/0vf3facit951s.js +0 -1
- package/out/_next/static/chunks/0xyija62b6txc.js +0 -1
- package/out/_next/static/chunks/0zeb37703zcz3.js +0 -1
- package/out/_next/static/chunks/0zu5ato7-1-q9.js +0 -1
- package/out/_next/static/chunks/0zydv7y47dxgh.js +0 -1
- package/out/_next/static/chunks/103x4jwovb6d-.js +0 -1
- package/out/_next/static/chunks/107wfq84g9-kn.js +0 -1
- package/out/_next/static/chunks/10afagk8yn__n.js +0 -1
- package/out/_next/static/chunks/12ory_c78yl31.js +0 -1
- package/out/_next/static/chunks/133dqp8_7_yo6.js +0 -1
- package/out/_next/static/chunks/1365lgwdd4vuo.js +0 -1
- package/out/_next/static/chunks/146ou-ohb_qhs.js +0 -1
- package/out/_next/static/chunks/14orr68xgdykd.js +0 -1
- package/out/_next/static/chunks/15qfoj-vl9thu.js +0 -1
- package/out/_next/static/chunks/166yqx3_qvbpy.js +0 -1
- package/out/_next/static/chunks/16gwjao676ieb.js +0 -1
- package/out/_next/static/chunks/16rmmzhy2p7bw.js +0 -1
- package/out/_next/static/chunks/17_jjyx4jz9dd.js +0 -1
- package/out/_next/static/chunks/18h9ugdz6igdb.js +0 -1
- package/out/_next/static/chunks/19d8n5t7ka2fb.js +0 -1
- package/out/_next/static/chunks/1_rbzw3n4fk0g.js +0 -1
- package/out/_next/static/chunks/1aa9g197l4twm.js +0 -1
- package/out/_next/static/chunks/1bq0fcnt1wy86.js +0 -1
- package/out/_next/static/chunks/1c6mho7e0enta.js +0 -1
- package/out/_next/static/chunks/1dfaheve77dhi.js +0 -1
- package/out/_next/static/chunks/1dgf112ehnhm1.js +0 -1
- package/out/_next/static/chunks/1eirucr9s6-h5.js +0 -1
- package/out/_next/static/chunks/1fsof7un7igrn.js +0 -1
- package/out/_next/static/chunks/1gvu5a6ffbs7l.js +0 -1
- package/out/_next/static/chunks/1iel4pzhhh-c3.js +0 -1
- package/out/_next/static/chunks/1iojfx3-g4_n9.js +0 -1
- package/out/_next/static/chunks/1j4jt5q7px8sy.js +0 -1
- package/out/_next/static/chunks/1jjw9hxgi2vzi.js +0 -1
- package/out/_next/static/chunks/1k_8olnprvi8r.js +0 -1
- package/out/_next/static/chunks/1l0rt7d4m-xdk.js +0 -5
- package/out/_next/static/chunks/1s0dpdqy480hg.js +0 -1
- package/out/_next/static/chunks/1t-yolk97lmot.js +0 -12
- package/out/_next/static/chunks/1tbes2sv-qzcx.js +0 -1
- package/out/_next/static/chunks/1upy8a5cb75kt.js +0 -1
- package/out/_next/static/chunks/1xed71f608m4b.js +0 -1
- package/out/_next/static/chunks/1z790xxb46gxy.js +0 -1
- package/out/_next/static/chunks/219n3q-_eengm.js +0 -1
- package/out/_next/static/chunks/21wo3vdr_uby8.js +0 -1
- package/out/_next/static/chunks/25gep78-izw79.js +0 -4
- package/out/_next/static/chunks/26i7dn31afdtm.js +0 -1
- package/out/_next/static/chunks/27hbplu797elx.js +0 -1
- package/out/_next/static/chunks/2992eiy52nazj.js +0 -1
- package/out/_next/static/chunks/29_n5j-hg_gsa.js +0 -1
- package/out/_next/static/chunks/29bxq-67oazfg.js +0 -1
- package/out/_next/static/chunks/29ings58w7kp1.js +0 -1
- package/out/_next/static/chunks/2_n0cpkdsjzli.js +0 -1
- package/out/_next/static/chunks/2a3iy701j4r_y.js +0 -1
- package/out/_next/static/chunks/2al9dh3_1ixhv.js +0 -1
- package/out/_next/static/chunks/2awr1c_vfsutb.js +0 -1
- package/out/_next/static/chunks/2bxe3kjr17tdp.js +0 -1
- package/out/_next/static/chunks/2dvbzar93ooc-.js +0 -1
- package/out/_next/static/chunks/2e-vp0e11g9ew.js +0 -1
- package/out/_next/static/chunks/2exj9-0p6n9x-.js +0 -1
- package/out/_next/static/chunks/2gf8l6hbmt7v3.js +0 -1
- package/out/_next/static/chunks/2h9i_adbqaxs4.js +0 -1
- package/out/_next/static/chunks/2jio3sio-_43z.js +0 -1
- package/out/_next/static/chunks/2neieeo9g2u56.js +0 -1
- package/out/_next/static/chunks/2pb_uosb-aa8x.js +0 -1
- package/out/_next/static/chunks/2qu-gpm3ux1l6.js +0 -1
- package/out/_next/static/chunks/2rsi6v7qmqx2b.js +0 -1
- package/out/_next/static/chunks/2tdvuc-27khif.js +0 -1
- package/out/_next/static/chunks/2trolrgd7neax.js +0 -1
- package/out/_next/static/chunks/2uyuafmoe5wi0.js +0 -3
- package/out/_next/static/chunks/2w2e0pxgs-n8f.js +0 -1
- package/out/_next/static/chunks/2xujlsx3stqig.js +0 -1
- package/out/_next/static/chunks/30y71dxdpv52d.js +0 -1
- package/out/_next/static/chunks/32c-e_v8_2xkf.js +0 -1
- package/out/_next/static/chunks/32oj0iudhp8bm.js +0 -1
- package/out/_next/static/chunks/33p9du6y9eegg.js +0 -1
- package/out/_next/static/chunks/38om-j0h0rryk.js +0 -1
- package/out/_next/static/chunks/39cou9lia_g7l.js +0 -1
- package/out/_next/static/chunks/39pkya0_bvcaj.js +0 -1
- package/out/_next/static/chunks/39rhmj_32ujyj.js +0 -1
- package/out/_next/static/chunks/3_1zzmx92j9c0.js +0 -1
- package/out/_next/static/chunks/3_earszshuz4n.js +0 -1
- package/out/_next/static/chunks/3ap_uxc8lx7ni.js +0 -1
- package/out/_next/static/chunks/3b6na8zrex8jo.js +0 -1
- package/out/_next/static/chunks/3c0cxt72vilyz.js +0 -1
- package/out/_next/static/chunks/3g78x0pdaoi_4.js +0 -1
- package/out/_next/static/chunks/3gjvl1p-tugfe.js +0 -4
- package/out/_next/static/chunks/3i8iro1gas1vx.js +0 -1
- package/out/_next/static/chunks/3kpqfqr99vo7z.js +0 -1
- package/out/_next/static/chunks/3lladf_wemm-2.js +0 -1
- package/out/_next/static/chunks/3n62hbywoknop.js +0 -1
- package/out/_next/static/chunks/3o_dmzpahx-5g.js +0 -1
- package/out/_next/static/chunks/3r7v7un976sn7.js +0 -1
- package/out/_next/static/chunks/3rl_nhqwew40w.js +0 -1
- package/out/_next/static/chunks/3s7hqij6xp_4e.js +0 -1
- package/out/_next/static/chunks/3si3migsmvz9o.js +0 -1
- package/out/_next/static/chunks/3uarw1i1ij1er.js +0 -1
- package/out/_next/static/chunks/3un-w6wutw1qn.js +0 -1
- package/out/_next/static/chunks/3v8kgnjk27wbe.js +0 -1
- package/out/_next/static/chunks/3we1khqfexh3x.js +0 -1
- package/out/_next/static/chunks/3z35loj4i-id4.js +0 -1
- package/out/_next/static/chunks/42lqt7ig40wk5.js +0 -1
- package/out/_next/static/chunks/42s6ghsurq5q7.js +0 -1
- package/out/_next/static/chunks/42yctcfi2rfwr.js +0 -1
- package/out/_next/static/chunks/43_fau1gg69eo.js +0 -1
- package/out/_next/static/chunks/43ywrdzg_7af8.js +0 -31
- package/out/_next/static/chunks/44m1ijc5cv80x.js +0 -1
- package/out/_next/static/chunks/453_bg0lgesmp.js +0 -1
- package/out/_next/static/chunks/turbopack-1s36ieuku1ds3.js +0 -1
- package/out/_not-found/__next._head.txt +0 -6
- package/out/_not-found/__next._index.txt +0 -5
- package/out/_not-found/__next._not-found.txt +0 -5
- /package/out/_next/static/{5UjNvd7WCk97iC2cSmEGH → 4r0L0ZMJeBwOJCVDsvvZ4}/_buildManifest.js +0 -0
- /package/out/_next/static/{5UjNvd7WCk97iC2cSmEGH → 4r0L0ZMJeBwOJCVDsvvZ4}/_clientMiddlewareManifest.js +0 -0
- /package/out/_next/static/{5UjNvd7WCk97iC2cSmEGH → 4r0L0ZMJeBwOJCVDsvvZ4}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,66303,e=>{"use strict";class t{get underlyingResource(){return null}constructor(){this.references=0,this.capacity=0,this.is32Bits=!1,this.uniqueId=t._Counter++}}t._Counter=0,e.s(["DataBuffer",0,t])},37731,40722,37492,e=>{"use strict";e.s(["IsWrapper",0,function(e){return void 0===e.getPipelineContext}],37731),e.s(["WebGLShaderProcessor",0,class{constructor(){this.shaderLanguage=0}postProcessor(e,t,r,s,i){return i.drawBuffersExtensionDisabled&&(e=e.replace(/#extension.+GL_EXT_draw_buffers.+(enable|require)/g,"")),e}}],40722);let t=/(flat\s)?\s*varying\s*.*/;e.s(["WebGL2ShaderProcessor",0,class{constructor(){this.shaderLanguage=0}attributeProcessor(e){return e.replace("attribute","in")}varyingCheck(e,r){return t.test(e)}varyingProcessor(e,t){return e.replace("varying",t?"in":"out")}postProcessor(e,t,r){let s=-1!==e.search(/#extension.+GL_EXT_draw_buffers.+require/);if(e=(e=e.replace(/#extension.+(GL_OVR_multiview2|GL_OES_standard_derivatives|GL_EXT_shader_texture_lod|GL_EXT_frag_depth|GL_EXT_draw_buffers).+(enable|require)/g,"")).replace(/texture2D\s*\(/g,"texture("),r){let r=-1!==e.search(/layout *\(location *= *0\) *out/g),i=-1!==t.indexOf("#define DUAL_SOURCE_BLENDING");i&&(e="#extension GL_EXT_blend_func_extended : require\n"+e),e=(e=(e=(e=(e=(e=(e=e.replace(/texture2DLodEXT\s*\(/g,"textureLod(")).replace(/textureCubeLodEXT\s*\(/g,"textureLod(")).replace(/textureCube\s*\(/g,"texture(")).replace(/gl_FragDepthEXT/g,"gl_FragDepth")).replace(/gl_FragColor/g,"glFragColor")).replace(/gl_FragData/g,"glFragData")).replace(/void\s+?main\s*\(/g,(s||r?"":i?"layout(location = 0, index = 0) out vec4 glFragColor;\nlayout(location = 0, index = 1) out vec4 glFragColor2;\n":"layout(location = 0) out vec4 glFragColor;\n")+"void main(")}else if(t.indexOf("#define VERTEXOUTPUT_INVARIANT")>=0&&(e="invariant gl_Position;\n"+e),-1!==t.indexOf("#define MULTIVIEW"))return"#extension GL_OVR_multiview2 : require\nlayout (num_views = 2) in;\n"+e;return e}}],37492)},94559,26220,52951,43695,e=>{"use strict";var t=e.i(59052),r=e.i(36093),s=e.i(51843),i=e.i(37731),a=e.i(16347),n=e.i(36460),_=e.i(40722),l=e.i(37492),h=e.i(66303);class u extends h.DataBuffer{constructor(e){super(),this._buffer=e}get underlyingResource(){return this._buffer}}e.s(["WebGLDataBuffer",0,u],26220);var o=e.i(44265);class c{get underlyingResource(){return this._webGLTexture}constructor(e=null,t){if(this._MSAARenderBuffers=null,this._context=t,!e&&!(e=t.createTexture()))throw Error("Unable to create webGL texture");this.set(e)}setUsage(){}set(e){this._webGLTexture=e}reset(){this._webGLTexture=null,this._MSAARenderBuffers=null}addMSAARenderBuffer(e){this._MSAARenderBuffers||(this._MSAARenderBuffers=[]),this._MSAARenderBuffers.push(e)}releaseMSAARenderBuffers(){if(this._MSAARenderBuffers){for(let e of this._MSAARenderBuffers)this._context.deleteRenderbuffer(e);this._MSAARenderBuffers=null}}getMSAARenderBuffer(e=0){return this._MSAARenderBuffers?.[e]??null}release(){this.releaseMSAARenderBuffers(),this._webGLTexture&&this._context.deleteTexture(this._webGLTexture),this.reset()}}e.s(["WebGLHardwareTexture",0,c],52951);var g=e.i(8636),f=e.i(98955),d=e.i(79057);function E(e){return 13===e||14===e||15===e||16===e||17===e||18===e||19===e}function T(e){return 13===e||17===e||18===e||19===e}e.s(["HasStencilAspect",0,T,"IsDepthTexture",0,E],43695);var R=e.i(73630);class A{}class p extends s.AbstractEngine{get name(){return this._name}set name(e){this._name=e}get version(){return this._webGLVersion}static get ShadersRepository(){return t.Effect.ShadersRepository}static set ShadersRepository(e){t.Effect.ShadersRepository=e}get supportsUniformBuffers(){return this.webGLVersion>1&&!this.disableUniformBuffers}get needPOTTextures(){return this._webGLVersion<2||this.forcePOTTextures}get _supportsHardwareTextureRescaling(){return!1}snapshotRenderingReset(){this.snapshotRendering=!1}constructor(e,t,s,i){let n;if(s=s||{},super(t??s.antialias,s,i),this._name="WebGL",this.forcePOTTextures=!1,this.validateShaderPrograms=!1,this.disableUniformBuffers=!1,this._webGLVersion=1,this._vertexAttribArraysEnabled=[],this._uintIndicesCurrentlySet=!1,this._currentBoundBuffer=[],this._currentFramebuffer=null,this._dummyFramebuffer=null,this._currentBufferPointers=[],this._currentInstanceLocations=[],this._currentInstanceBuffers=[],this._vaoRecordInProgress=!1,this._mustWipeVertexAttributes=!1,this._nextFreeTextureSlots=[],this._maxSimultaneousTextures=0,this._maxMSAASamplesOverride=null,this._unpackFlipYCached=null,this.enableUnpackFlipYCached=!0,this._boundUniforms={},!e)return;if(e.getContext){if(n=e,void 0===s.preserveDrawingBuffer&&(s.preserveDrawingBuffer=!1),void 0===s.xrCompatible&&(s.xrCompatible=!1),navigator&&navigator.userAgent){this._setupMobileChecks();const e=navigator.userAgent;for(const t of p.ExceptionList){const r=t.key,i=t.targets;if(new RegExp(r).test(e)){if(t.capture&&t.captureConstraint){const r=t.capture,s=t.captureConstraint,i=new RegExp(r).exec(e);if(i&&i.length>0&&parseInt(i[i.length-1])>=s)continue}for(const e of i)switch(e){case"uniformBuffer":this.disableUniformBuffers=!0;break;case"vao":this.disableVertexArrayObjects=!0;break;case"antialias":s.antialias=!1;break;case"maxMSAASamples":this._maxMSAASamplesOverride=1}}}}if(this._doNotHandleContextLost?this._onContextLost=()=>{(0,r.deleteStateObject)(this._gl)}:(this._onContextLost=e=>{e.preventDefault(),this._contextWasLost=!0,(0,r.deleteStateObject)(this._gl),a.Logger.Warn("WebGL context lost."),this.onContextLostObservable.notifyObservers(this)},this._onContextRestored=()=>{this._restoreEngineAfterContextLost(()=>this._initGLContext())},n.addEventListener("webglcontextrestored",this._onContextRestored,!1),s.powerPreference=s.powerPreference||"high-performance"),n.addEventListener("webglcontextlost",this._onContextLost,!1),this._badDesktopOS&&(s.xrCompatible=!1),!s.disableWebGL2Support)try{this._gl=n.getContext("webgl2",s)||n.getContext("experimental-webgl2",s),this._gl&&(this._webGLVersion=2,this._shaderPlatformName="WEBGL2",this._gl.deleteQuery||(this._webGLVersion=1,this._shaderPlatformName="WEBGL1"))}catch(e){}if(!this._gl){if(!n)throw Error("The provided canvas is null or undefined.");try{this._gl=n.getContext("webgl",s)||n.getContext("experimental-webgl",s)}catch(e){throw Error("WebGL not supported",{cause:e})}}if(!this._gl)throw Error("WebGL not supported")}else{this._gl=e,n=this._gl.canvas,this._gl.renderbufferStorageMultisample?(this._webGLVersion=2,this._shaderPlatformName="WEBGL2"):this._shaderPlatformName="WEBGL1";const t=this._gl.getContextAttributes();t&&(s.stencil=t.stencil)}this._sharedInit(n),this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL,this._gl.NONE),void 0!==s.useHighPrecisionFloats&&(this._highPrecisionShadersAllowed=s.useHighPrecisionFloats),this.resize(),this._initGLContext(),this._initFeatures();for(let e=0;e<this._caps.maxVertexAttribs;e++)this._currentBufferPointers[e]=new A;this._shaderProcessor=this.webGLVersion>1?new l.WebGL2ShaderProcessor:new _.WebGLShaderProcessor;const h=`Babylon.js v${p.Version}`;a.Logger.Log(h+` - ${this.description}`),this._renderingCanvas&&this._renderingCanvas.setAttribute&&this._renderingCanvas.setAttribute("data-engine",h);const u=(0,r.getStateObject)(this._gl);u.validateShaderPrograms=this.validateShaderPrograms,u.parallelShaderCompile=this._caps.parallelShaderCompile}_clearEmptyResources(){this._dummyFramebuffer=null,super._clearEmptyResources()}_getShaderProcessingContext(e){return null}areAllEffectsReady(){for(let e in this._compiledEffects)if(!this._compiledEffects[e].isReady())return!1;return!0}_initGLContext(){this._caps={maxTexturesImageUnits:this._gl.getParameter(this._gl.MAX_TEXTURE_IMAGE_UNITS),maxCombinedTexturesImageUnits:this._gl.getParameter(this._gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),maxVertexTextureImageUnits:this._gl.getParameter(this._gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS),maxTextureSize:this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),maxSamples:this._webGLVersion>1?this._gl.getParameter(this._gl.MAX_SAMPLES):1,maxCubemapTextureSize:this._gl.getParameter(this._gl.MAX_CUBE_MAP_TEXTURE_SIZE),maxRenderTextureSize:this._gl.getParameter(this._gl.MAX_RENDERBUFFER_SIZE),maxVertexAttribs:this._gl.getParameter(this._gl.MAX_VERTEX_ATTRIBS),maxVaryingVectors:this._gl.getParameter(this._gl.MAX_VARYING_VECTORS),maxFragmentUniformVectors:this._gl.getParameter(this._gl.MAX_FRAGMENT_UNIFORM_VECTORS),maxVertexUniformVectors:this._gl.getParameter(this._gl.MAX_VERTEX_UNIFORM_VECTORS),shaderFloatPrecision:0,parallelShaderCompile:this._gl.getExtension("KHR_parallel_shader_compile")||void 0,standardDerivatives:this._webGLVersion>1||null!==this._gl.getExtension("OES_standard_derivatives"),maxAnisotropy:1,astc:this._gl.getExtension("WEBGL_compressed_texture_astc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_astc"),bptc:this._gl.getExtension("EXT_texture_compression_bptc")||this._gl.getExtension("WEBKIT_EXT_texture_compression_bptc"),s3tc:this._gl.getExtension("WEBGL_compressed_texture_s3tc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc"),s3tc_srgb:this._gl.getExtension("WEBGL_compressed_texture_s3tc_srgb")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc_srgb"),pvrtc:this._gl.getExtension("WEBGL_compressed_texture_pvrtc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),etc1:this._gl.getExtension("WEBGL_compressed_texture_etc1")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc1"),etc2:this._gl.getExtension("WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBGL_compressed_texture_es3_0"),textureAnisotropicFilterExtension:this._gl.getExtension("EXT_texture_filter_anisotropic")||this._gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||this._gl.getExtension("MOZ_EXT_texture_filter_anisotropic"),uintIndices:this._webGLVersion>1||null!==this._gl.getExtension("OES_element_index_uint"),fragmentDepthSupported:this._webGLVersion>1||null!==this._gl.getExtension("EXT_frag_depth"),highPrecisionShaderSupported:!1,timerQuery:this._gl.getExtension("EXT_disjoint_timer_query_webgl2")||this._gl.getExtension("EXT_disjoint_timer_query"),supportOcclusionQuery:this._webGLVersion>1,canUseTimestampForTimerQuery:!1,drawBuffersExtension:!1,maxMSAASamples:1,colorBufferFloat:!!(this._webGLVersion>1&&this._gl.getExtension("EXT_color_buffer_float")),blendFloat:null!==this._gl.getExtension("EXT_float_blend"),supportFloatTexturesResolve:!1,rg11b10ufColorRenderable:!1,colorBufferHalfFloat:!!(this._webGLVersion>1&&this._gl.getExtension("EXT_color_buffer_half_float")),textureFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_float")),textureHalfFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_half_float")),textureHalfFloatRender:!1,textureFloatLinearFiltering:!1,textureFloatRender:!1,textureHalfFloatLinearFiltering:!1,vertexArrayObject:!1,instancedArrays:!1,textureLOD:!!(this._webGLVersion>1||this._gl.getExtension("EXT_shader_texture_lod")),texelFetch:1!==this._webGLVersion,blendMinMax:!1,multiview:this._gl.getExtension("OVR_multiview2"),oculusMultiview:this._gl.getExtension("OCULUS_multiview"),depthTextureExtension:!1,canUseGLInstanceID:this._webGLVersion>1,canUseGLVertexID:this._webGLVersion>1,supportComputeShaders:!1,supportSRGBBuffers:!1,supportTransformFeedbacks:this._webGLVersion>1,textureMaxLevel:this._webGLVersion>1,texture2DArrayMaxLayerCount:this._webGLVersion>1?this._gl.getParameter(this._gl.MAX_ARRAY_TEXTURE_LAYERS):128,disableMorphTargetTexture:!1,textureNorm16:!!this._gl.getExtension("EXT_texture_norm16"),blendParametersPerTarget:!1,dualSourceBlending:!1,supportReadWriteStorageTextures:!1},this._caps.supportFloatTexturesResolve=this._caps.colorBufferFloat,this._caps.rg11b10ufColorRenderable=this._caps.colorBufferFloat,this._glVersion=this._gl.getParameter(this._gl.VERSION);let e=this._gl.getExtension("WEBGL_debug_renderer_info");null!=e&&(this._glRenderer=this._gl.getParameter(e.UNMASKED_RENDERER_WEBGL),this._glVendor=this._gl.getParameter(e.UNMASKED_VENDOR_WEBGL)),this._glVendor||(this._glVendor=this._gl.getParameter(this._gl.VENDOR)||"Unknown vendor"),this._glRenderer||(this._glRenderer=this._gl.getParameter(this._gl.RENDERER)||"Unknown renderer"),36193!==this._gl.HALF_FLOAT_OES&&(this._gl.HALF_FLOAT_OES=36193),34842!==this._gl.RGBA16F&&(this._gl.RGBA16F=34842),34836!==this._gl.RGBA32F&&(this._gl.RGBA32F=34836),35056!==this._gl.DEPTH24_STENCIL8&&(this._gl.DEPTH24_STENCIL8=35056),this._caps.timerQuery&&(1===this._webGLVersion&&(this._gl.getQuery=this._caps.timerQuery.getQueryEXT.bind(this._caps.timerQuery)),this._caps.canUseTimestampForTimerQuery=(this._gl.getQuery(this._caps.timerQuery.TIMESTAMP_EXT,this._caps.timerQuery.QUERY_COUNTER_BITS_EXT)??0)>0),this._caps.maxAnisotropy=this._caps.textureAnisotropicFilterExtension?this._gl.getParameter(this._caps.textureAnisotropicFilterExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0,this._caps.textureFloatLinearFiltering=!!(this._caps.textureFloat&&this._gl.getExtension("OES_texture_float_linear")),this._caps.textureFloatRender=!!(this._caps.textureFloat&&this._canRenderToFloatFramebuffer()),this._caps.textureHalfFloatLinearFiltering=!!(this._webGLVersion>1||this._caps.textureHalfFloat&&this._gl.getExtension("OES_texture_half_float_linear")),this._caps.textureNorm16&&(this._gl.R16_EXT=33322,this._gl.RG16_EXT=33324,this._gl.RGB16_EXT=32852,this._gl.RGBA16_EXT=32859,this._gl.R16_SNORM_EXT=36760,this._gl.RG16_SNORM_EXT=36761,this._gl.RGB16_SNORM_EXT=36762,this._gl.RGBA16_SNORM_EXT=36763);let t=this._gl.getExtension("OES_draw_buffers_indexed");if(this._caps.blendParametersPerTarget=!!t,this._alphaState=new R.AlphaState(this._caps.blendParametersPerTarget),t&&(this._gl.blendEquationSeparateIndexed=t.blendEquationSeparateiOES.bind(t),this._gl.blendEquationIndexed=t.blendEquationiOES.bind(t),this._gl.blendFuncSeparateIndexed=t.blendFuncSeparateiOES.bind(t),this._gl.blendFuncIndexed=t.blendFunciOES.bind(t),this._gl.colorMaskIndexed=t.colorMaskiOES.bind(t),this._gl.disableIndexed=t.disableiOES.bind(t),this._gl.enableIndexed=t.enableiOES.bind(t)),this._caps.dualSourceBlending=!!this._gl.getExtension("WEBGL_blend_func_extended"),this._caps.astc&&(this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR),this._caps.bptc&&(this._gl.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT=this._caps.bptc.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT),this._caps.s3tc_srgb&&(this._gl.COMPRESSED_SRGB_S3TC_DXT1_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_S3TC_DXT1_EXT,this._gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,this._gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT),this._caps.etc2&&(this._gl.COMPRESSED_SRGB8_ETC2=this._caps.etc2.COMPRESSED_SRGB8_ETC2,this._gl.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=this._caps.etc2.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC),this._webGLVersion>1&&5131!==this._gl.HALF_FLOAT_OES&&(this._gl.HALF_FLOAT_OES=5131),this._caps.textureHalfFloatRender=this._caps.textureHalfFloat&&this._canRenderToHalfFloatFramebuffer(),this._webGLVersion>1)this._caps.drawBuffersExtension=!0,this._caps.maxMSAASamples=null!==this._maxMSAASamplesOverride?this._maxMSAASamplesOverride:this._gl.getParameter(this._gl.MAX_SAMPLES),this._caps.maxDrawBuffers=this._gl.getParameter(this._gl.MAX_DRAW_BUFFERS);else{let e=this._gl.getExtension("WEBGL_draw_buffers");if(null!==e){this._caps.drawBuffersExtension=!0,this._gl.drawBuffers=e.drawBuffersWEBGL.bind(e),this._caps.maxDrawBuffers=this._gl.getParameter(e.MAX_DRAW_BUFFERS_WEBGL),this._gl.DRAW_FRAMEBUFFER=this._gl.FRAMEBUFFER;for(let t=0;t<16;t++)this._gl["COLOR_ATTACHMENT"+t+"_WEBGL"]=e["COLOR_ATTACHMENT"+t+"_WEBGL"]}}if(this._webGLVersion>1)this._caps.depthTextureExtension=!0;else{let e=this._gl.getExtension("WEBGL_depth_texture");null!=e&&(this._caps.depthTextureExtension=!0,this._gl.UNSIGNED_INT_24_8=e.UNSIGNED_INT_24_8_WEBGL)}if(this.disableVertexArrayObjects)this._caps.vertexArrayObject=!1;else if(this._webGLVersion>1)this._caps.vertexArrayObject=!0;else{let e=this._gl.getExtension("OES_vertex_array_object");null!=e&&(this._caps.vertexArrayObject=!0,this._gl.createVertexArray=e.createVertexArrayOES.bind(e),this._gl.bindVertexArray=e.bindVertexArrayOES.bind(e),this._gl.deleteVertexArray=e.deleteVertexArrayOES.bind(e))}if(this._webGLVersion>1)this._caps.instancedArrays=!0;else{let e=this._gl.getExtension("ANGLE_instanced_arrays");null!=e?(this._caps.instancedArrays=!0,this._gl.drawArraysInstanced=e.drawArraysInstancedANGLE.bind(e),this._gl.drawElementsInstanced=e.drawElementsInstancedANGLE.bind(e),this._gl.vertexAttribDivisor=e.vertexAttribDivisorANGLE.bind(e)):this._caps.instancedArrays=!1}if(this._gl.getShaderPrecisionFormat){let e=this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER,this._gl.HIGH_FLOAT),t=this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER,this._gl.HIGH_FLOAT);if(e&&t&&(this._caps.highPrecisionShaderSupported=0!==e.precision&&0!==t.precision,this._caps.shaderFloatPrecision=Math.min(e.precision,t.precision)),!this._shouldUseHighPrecisionShader){let e=this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER,this._gl.MEDIUM_FLOAT),t=this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER,this._gl.MEDIUM_FLOAT);e&&t&&(this._caps.shaderFloatPrecision=Math.min(e.precision,t.precision))}this._caps.shaderFloatPrecision<10&&(this._caps.shaderFloatPrecision=10)}if(this._webGLVersion>1)this._caps.blendMinMax=!0;else{let e=this._gl.getExtension("EXT_blend_minmax");null!=e&&(this._caps.blendMinMax=!0,this._gl.MAX=e.MAX_EXT,this._gl.MIN=e.MIN_EXT)}if(!this._caps.supportSRGBBuffers){if(this._webGLVersion>1)this._caps.supportSRGBBuffers=!0,this._glSRGBExtensionValues={SRGB:WebGL2RenderingContext.SRGB,SRGB8:WebGL2RenderingContext.SRGB8,SRGB8_ALPHA8:WebGL2RenderingContext.SRGB8_ALPHA8};else{let e=this._gl.getExtension("EXT_sRGB");null!=e&&(this._caps.supportSRGBBuffers=!0,this._glSRGBExtensionValues={SRGB:e.SRGB_EXT,SRGB8:e.SRGB_ALPHA_EXT,SRGB8_ALPHA8:e.SRGB_ALPHA_EXT})}if(this._creationOptions){let e=this._creationOptions.forceSRGBBufferSupportState;void 0!==e&&(this._caps.supportSRGBBuffers=this._caps.supportSRGBBuffers&&e)}}this._depthCullingState.depthTest=!0,this._depthCullingState.depthFunc=this._gl.LEQUAL,this._depthCullingState.depthMask=!0,this._maxSimultaneousTextures=this._caps.maxCombinedTexturesImageUnits;for(let e=0;e<this._maxSimultaneousTextures;e++)this._nextFreeTextureSlots.push(e);"Mali-G72"===this._glRenderer&&(this._caps.disableMorphTargetTexture=!0)}_initFeatures(){this._features={forceBitmapOverHTMLImageElement:"u"<typeof HTMLImageElement,supportRenderAndCopyToLodForFloatTextures:1!==this._webGLVersion,supportDepthStencilTexture:1!==this._webGLVersion,supportShadowSamplers:1!==this._webGLVersion,uniformBufferHardCheckMatrix:!1,allowTexturePrefiltering:1!==this._webGLVersion,trackUbosInFrame:!1,checkUbosContentBeforeUpload:!1,supportCSM:1!==this._webGLVersion,basisNeedsPOT:1===this._webGLVersion,support3DTextures:1!==this._webGLVersion,needTypeSuffixInShaderConstants:1!==this._webGLVersion,supportMSAA:1!==this._webGLVersion,supportSSAO2:1!==this._webGLVersion,supportIBLShadows:1!==this._webGLVersion,supportExtendedTextureFormats:1!==this._webGLVersion,supportSwitchCaseInShader:1!==this._webGLVersion,supportSyncTextureRead:!0,needsInvertingBitmap:!0,useUBOBindingCache:!0,needShaderCodeInlining:!1,needToAlwaysBindUniformBuffers:!1,supportRenderPasses:!1,supportSpriteInstancing:!0,forceVertexBufferStrideAndOffsetMultiple4Bytes:!1,_checkNonFloatVertexBuffersDontRecreatePipelineContext:!1}}get webGLVersion(){return this._webGLVersion}getClassName(){return"ThinEngine"}_prepareWorkingCanvas(){if(this._workingCanvas)return;this._workingCanvas=this.createCanvas(1,1);let e=this._workingCanvas.getContext("2d");e&&(this._workingContext=e)}getInfo(){return this.getGlInfo()}getGlInfo(){return{vendor:this._glVendor,renderer:this._glRenderer,version:this._glVersion}}extractDriverInfo(){let e=this.getGlInfo();return e&&e.renderer?e.renderer:""}getRenderWidth(e=!1){return!e&&this._currentRenderTarget?this._currentRenderTarget.width:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferWidth:this._gl.drawingBufferWidth}getRenderHeight(e=!1){return!e&&this._currentRenderTarget?this._currentRenderTarget.height:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferHeight:this._gl.drawingBufferHeight}clear(e,t,r,s=!1,i=0){let a=this.stencilStateComposer.useStencilGlobalOnly;this.stencilStateComposer.useStencilGlobalOnly=!0,this.applyStates(),this.stencilStateComposer.useStencilGlobalOnly=a;let n=0;if(t&&e){let t=!0;if(this._currentRenderTarget){let r=this._currentRenderTarget.texture?.format;if(8===r||9===r||10===r||11===r){let r=this._currentRenderTarget.texture?.type;7===r||5===r?(p._TempClearColorUint32[0]=255*e.r,p._TempClearColorUint32[1]=255*e.g,p._TempClearColorUint32[2]=255*e.b,p._TempClearColorUint32[3]=255*e.a,this._gl.clearBufferuiv(this._gl.COLOR,0,p._TempClearColorUint32)):(p._TempClearColorInt32[0]=255*e.r,p._TempClearColorInt32[1]=255*e.g,p._TempClearColorInt32[2]=255*e.b,p._TempClearColorInt32[3]=255*e.a,this._gl.clearBufferiv(this._gl.COLOR,0,p._TempClearColorInt32)),t=!1}}t&&(this._gl.clearColor(e.r,e.g,e.b,void 0!==e.a?e.a:1),n|=this._gl.COLOR_BUFFER_BIT)}r&&(this.useReverseDepthBuffer?(this._depthCullingState.depthFunc=this._gl.GEQUAL,this._gl.clearDepth(0)):this._gl.clearDepth(1),n|=this._gl.DEPTH_BUFFER_BIT),s&&(this._gl.clearStencil(i),n|=this._gl.STENCIL_BUFFER_BIT),this._gl.clear(n)}_viewport(e,t,r,s){(e!==this._viewportCached.x||t!==this._viewportCached.y||r!==this._viewportCached.z||s!==this._viewportCached.w)&&(this._viewportCached.x=e,this._viewportCached.y=t,this._viewportCached.z=r,this._viewportCached.w=s,this._gl.viewport(e,t,r,s))}endFrame(){super.endFrame(),this._badOS&&this.flushFramebuffer()}get performanceMonitor(){throw Error("Not Supported by ThinEngine")}bindFramebuffer(e,t=0,r,s,i,n=0,_=0){this._currentRenderTarget&&this._resolveAndGenerateMipMapsFramebuffer(this._currentRenderTarget),this._currentRenderTarget=e,this._bindUnboundFramebuffer(e._framebuffer);let l=this._gl;e.isMulti||(e.is2DArray||e.is3D?(l.framebufferTextureLayer(l.FRAMEBUFFER,l.COLOR_ATTACHMENT0,e.texture._hardwareTexture?.underlyingResource,n,_),e._currentLOD=n):e.isCube?l.framebufferTexture2D(l.FRAMEBUFFER,l.COLOR_ATTACHMENT0,l.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.texture._hardwareTexture?.underlyingResource,n):e._currentLOD!==n&&(l.framebufferTexture2D(l.FRAMEBUFFER,l.COLOR_ATTACHMENT0,l.TEXTURE_2D,e.texture._hardwareTexture?.underlyingResource,n),e._currentLOD=n));let h=e._depthStencilTexture;if(h){e.is3D&&(e.texture.width!==h.width||e.texture.height!==h.height||e.texture.depth!==h.depth)&&a.Logger.Warn("Depth/Stencil attachment for 3D target must have same dimensions as color attachment");let r=e._depthStencilTextureWithStencil?l.DEPTH_STENCIL_ATTACHMENT:l.DEPTH_ATTACHMENT;e.is2DArray||e.is3D?l.framebufferTextureLayer(l.FRAMEBUFFER,r,h._hardwareTexture?.underlyingResource,n,_):e.isCube?l.framebufferTexture2D(l.FRAMEBUFFER,r,l.TEXTURE_CUBE_MAP_POSITIVE_X+t,h._hardwareTexture?.underlyingResource,n):l.framebufferTexture2D(l.FRAMEBUFFER,r,l.TEXTURE_2D,h._hardwareTexture?.underlyingResource,n)}e._MSAAFramebuffer&&this._bindUnboundFramebuffer(e._MSAAFramebuffer),this._cachedViewport&&!i?this.setViewport(this._cachedViewport,r,s):(!r&&(r=e.width,n&&(r/=Math.pow(2,n))),!s&&(s=e.height,n&&(s/=Math.pow(2,n))),this._viewport(0,0,r,s)),this.wipeCaches()}setStateCullFaceType(e,t){let r=this.cullBackFaces??e??!0?this._gl.BACK:this._gl.FRONT;(this._depthCullingState.cullFace!==r||t)&&(this._depthCullingState.cullFace=r)}setState(e,t=0,r,s=!1,i,a,n=0){(this._depthCullingState.cull!==e||r)&&(this._depthCullingState.cull=e),this.setStateCullFaceType(i,r),this.setZOffset(t),this.setZOffsetUnits(n);let _=s?this._gl.CW:this._gl.CCW;(this._depthCullingState.frontFace!==_||r)&&(this._depthCullingState.frontFace=_),this._stencilStateComposer.stencilMaterial=a}_resolveAndGenerateMipMapsFramebuffer(e,t=!1){e.disableAutomaticMSAAResolve||(e.isMulti?this.resolveMultiFramebuffer(e):this.resolveFramebuffer(e)),t||(e.isMulti?this.generateMipMapsMultiFramebuffer(e):this.generateMipMapsFramebuffer(e))}_bindUnboundFramebuffer(e){this._currentFramebuffer!==e&&(this._gl.bindFramebuffer(this._gl.FRAMEBUFFER,e),this._currentFramebuffer=e)}_currentFrameBufferIsDefaultFrameBuffer(){return null===this._currentFramebuffer}generateMipmaps(e){let t=this._getTextureTarget(e);this._bindTextureDirectly(t,e,!0),this._gl.generateMipmap(t),this._bindTextureDirectly(t,null)}unBindFramebuffer(e,t,r){this._currentRenderTarget=null,this._resolveAndGenerateMipMapsFramebuffer(e,t),r&&(e._MSAAFramebuffer&&this._bindUnboundFramebuffer(e._framebuffer),r()),this._bindUnboundFramebuffer(null)}generateMipMapsFramebuffer(e){!e.isMulti&&e.texture?.generateMipMaps&&!e.isCube&&this.generateMipmaps(e.texture)}resolveFramebuffer(e){let t=this._gl;if(!e._MSAAFramebuffer||e.isMulti)return;let r=e.resolveMSAAColors?t.COLOR_BUFFER_BIT:0;r|=e._generateDepthBuffer&&e.resolveMSAADepth?t.DEPTH_BUFFER_BIT:0,r|=e._generateStencilBuffer&&e.resolveMSAAStencil?t.STENCIL_BUFFER_BIT:0,t.bindFramebuffer(t.READ_FRAMEBUFFER,e._MSAAFramebuffer),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,e._framebuffer),t.blitFramebuffer(0,0,e.width,e.height,0,0,e.width,e.height,r,t.NEAREST)}flushFramebuffer(){this._gl.flush()}restoreDefaultFramebuffer(){this._currentRenderTarget?this.unBindFramebuffer(this._currentRenderTarget):this._bindUnboundFramebuffer(null),this._cachedViewport&&this.setViewport(this._cachedViewport),this.wipeCaches()}_resetVertexBufferBinding(){this.bindArrayBuffer(null),this._cachedVertexBuffers=null}createVertexBuffer(e,t,r){return this._createVertexBuffer(e,this._gl.STATIC_DRAW)}_createVertexBuffer(e,t){let r=this._gl.createBuffer();if(!r)throw Error("Unable to create vertex buffer");let s=new u(r);return this.bindArrayBuffer(s),"number"!=typeof e?e instanceof Array?(this._gl.bufferData(this._gl.ARRAY_BUFFER,new Float32Array(e),t),s.capacity=4*e.length):(this._gl.bufferData(this._gl.ARRAY_BUFFER,e,t),s.capacity=e.byteLength):(this._gl.bufferData(this._gl.ARRAY_BUFFER,new Uint8Array(e),t),s.capacity=e),this._resetVertexBufferBinding(),s.references=1,s}createDynamicVertexBuffer(e,t){return this._createVertexBuffer(e,this._gl.DYNAMIC_DRAW)}_resetIndexBufferBinding(){this.bindIndexBuffer(null),this._cachedIndexBuffer=null}createIndexBuffer(e,t,r){let s=this._gl.createBuffer(),i=new u(s);if(!s)throw Error("Unable to create index buffer");this.bindIndexBuffer(i);let a=this._normalizeIndexData(e);return this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,a,t?this._gl.DYNAMIC_DRAW:this._gl.STATIC_DRAW),this._resetIndexBufferBinding(),i.references=1,i.is32Bits=4===a.BYTES_PER_ELEMENT,i}_normalizeIndexData(e){if(2===e.BYTES_PER_ELEMENT)return e;if(this._caps.uintIndices){if(e instanceof Uint32Array)return e;else for(let t=0;t<e.length;t++)if(e[t]>=65535)return new Uint32Array(e)}return new Uint16Array(e)}bindArrayBuffer(e){this._vaoRecordInProgress||this._unbindVertexArrayObject(),this._bindBuffer(e,this._gl.ARRAY_BUFFER)}bindUniformBlock(e,t,r){let s=e.program,i=this._gl.getUniformBlockIndex(s,t);this._gl.uniformBlockBinding(s,i,r)}bindIndexBuffer(e){this._vaoRecordInProgress||this._unbindVertexArrayObject(),this._bindBuffer(e,this._gl.ELEMENT_ARRAY_BUFFER)}_bindBuffer(e,t){(this._vaoRecordInProgress||this._currentBoundBuffer[t]!==e)&&(this._gl.bindBuffer(t,e?e.underlyingResource:null),this._currentBoundBuffer[t]=e)}updateArrayBuffer(e){this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,e)}_vertexAttribPointer(e,t,r,s,i,a,n){let _=this._currentBufferPointers[t];if(!_)return;let l=!1;_.active?(_.buffer!==e&&(_.buffer=e,l=!0),_.size!==r&&(_.size=r,l=!0),_.type!==s&&(_.type=s,l=!0),_.normalized!==i&&(_.normalized=i,l=!0),_.stride!==a&&(_.stride=a,l=!0),_.offset!==n&&(_.offset=n,l=!0)):(l=!0,_.active=!0,_.index=t,_.size=r,_.type=s,_.normalized=i,_.stride=a,_.offset=n,_.buffer=e),(l||this._vaoRecordInProgress)&&(this.bindArrayBuffer(e),s===this._gl.UNSIGNED_INT||s===this._gl.INT?this._gl.vertexAttribIPointer(t,r,s,a,n):this._gl.vertexAttribPointer(t,r,s,i,a,n))}_bindIndexBufferWithCache(e){null!=e&&this._cachedIndexBuffer!==e&&(this._cachedIndexBuffer=e,this.bindIndexBuffer(e),this._uintIndicesCurrentlySet=e.is32Bits)}_bindVertexBuffersAttributes(e,t,r){let s=t.getAttributesNames();this._vaoRecordInProgress||this._unbindVertexArrayObject(),this.unbindAllAttributes();for(let i=0;i<s.length;i++){let a=t.getAttributeLocation(i);if(a>=0){let t=s[i],n=null;if(r&&(n=r[t]),n||(n=e[t]),!n)continue;this._gl.enableVertexAttribArray(a),this._vaoRecordInProgress||(this._vertexAttribArraysEnabled[a]=!0);let _=n.getBuffer();_&&(this._vertexAttribPointer(_,a,n.getSize(),n.type,n.normalized,n.byteStride,n.byteOffset),n.getIsInstanced()&&(this._gl.vertexAttribDivisor(a,n.getInstanceDivisor()),this._vaoRecordInProgress||(this._currentInstanceLocations.push(a),this._currentInstanceBuffers.push(_))))}}}recordVertexArrayObject(e,t,r,s){let i=this._gl.createVertexArray();if(!i)throw Error("Unable to create VAO");return this._vaoRecordInProgress=!0,this._gl.bindVertexArray(i),this._mustWipeVertexAttributes=!0,this._bindVertexBuffersAttributes(e,r,s),this.bindIndexBuffer(t),this._vaoRecordInProgress=!1,this._gl.bindVertexArray(null),i}bindVertexArrayObject(e,t){this._cachedVertexArrayObject!==e&&(this._cachedVertexArrayObject=e,this._gl.bindVertexArray(e),this._cachedVertexBuffers=null,this._cachedIndexBuffer=null,this._uintIndicesCurrentlySet=null!=t&&t.is32Bits,this._mustWipeVertexAttributes=!0)}bindBuffersDirectly(e,t,r,s,i){if(this._cachedVertexBuffers!==e||this._cachedEffectForVertexBuffers!==i){this._cachedVertexBuffers=e,this._cachedEffectForVertexBuffers=i;let t=i.getAttributesCount();this._unbindVertexArrayObject(),this.unbindAllAttributes();let a=0;for(let n=0;n<t;n++)if(n<r.length){let t=i.getAttributeLocation(n);t>=0&&(this._gl.enableVertexAttribArray(t),this._vertexAttribArraysEnabled[t]=!0,this._vertexAttribPointer(e,t,r[n],this._gl.FLOAT,!1,s,a)),a+=4*r[n]}}this._bindIndexBufferWithCache(t)}_unbindVertexArrayObject(){this._cachedVertexArrayObject&&(this._cachedVertexArrayObject=null,this._gl.bindVertexArray(null))}bindBuffers(e,t,r,s){(this._cachedVertexBuffers!==e||this._cachedEffectForVertexBuffers!==r)&&(this._cachedVertexBuffers=e,this._cachedEffectForVertexBuffers=r,this._bindVertexBuffersAttributes(e,r,s)),this._bindIndexBufferWithCache(t)}unbindInstanceAttributes(){let e;for(let t=0,r=this._currentInstanceLocations.length;t<r;t++){let r=this._currentInstanceBuffers[t];e!=r&&r.references&&(e=r,this.bindArrayBuffer(r));let s=this._currentInstanceLocations[t];this._gl.vertexAttribDivisor(s,0)}this._currentInstanceBuffers.length=0,this._currentInstanceLocations.length=0}releaseVertexArrayObject(e){this._gl.deleteVertexArray(e)}_releaseBuffer(e){return e.references--,0===e.references&&(this._deleteBuffer(e),!0)}_deleteBuffer(e){this._gl.deleteBuffer(e.underlyingResource)}updateAndBindInstancesBuffer(e,t,r){if(this.bindArrayBuffer(e),t&&this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,t),void 0!==r[0].index)this.bindInstancesBuffer(e,r,!0);else for(let t=0;t<4;t++){let s=r[t];this._vertexAttribArraysEnabled[s]||(this._gl.enableVertexAttribArray(s),this._vertexAttribArraysEnabled[s]=!0),this._vertexAttribPointer(e,s,4,this._gl.FLOAT,!1,64,16*t),this._gl.vertexAttribDivisor(s,1),this._currentInstanceLocations.push(s),this._currentInstanceBuffers.push(e)}}bindInstancesBuffer(e,t,r=!0){this.bindArrayBuffer(e);let s=0;if(r)for(let e=0;e<t.length;e++)s+=4*t[e].attributeSize;for(let r=0;r<t.length;r++){let i=t[r];void 0===i.index&&(i.index=this._currentEffect.getAttributeLocationByName(i.attributeName)),i.index<0||(this._vertexAttribArraysEnabled[i.index]||(this._gl.enableVertexAttribArray(i.index),this._vertexAttribArraysEnabled[i.index]=!0),this._vertexAttribPointer(e,i.index,i.attributeSize,i.attributeType||this._gl.FLOAT,i.normalized||!1,s,i.offset),this._gl.vertexAttribDivisor(i.index,void 0===i.divisor?1:i.divisor),this._currentInstanceLocations.push(i.index),this._currentInstanceBuffers.push(e))}}disableInstanceAttributeByName(e){if(!this._currentEffect)return;let t=this._currentEffect.getAttributeLocationByName(e);this.disableInstanceAttribute(t)}disableInstanceAttribute(e){let t,r=!1;for(;-1!==(t=this._currentInstanceLocations.indexOf(e));)this._currentInstanceLocations.splice(t,1),this._currentInstanceBuffers.splice(t,1),r=!0;r&&(this._gl.vertexAttribDivisor(e,0),this.disableAttributeByIndex(e))}disableAttributeByIndex(e){this._gl.disableVertexAttribArray(e),this._vertexAttribArraysEnabled[e]=!1,this._currentBufferPointers[e].active=!1}draw(e,t,r,s){this.drawElementsType(+!e,t,r,s)}drawPointClouds(e,t,r){this.drawArraysType(2,e,t,r)}drawUnIndexed(e,t,r,s){this.drawArraysType(+!e,t,r,s)}drawElementsType(e,t,r,s){this.applyStates(),this._reportDrawCall();let i=this._drawMode(e),a=this._uintIndicesCurrentlySet?this._gl.UNSIGNED_INT:this._gl.UNSIGNED_SHORT,n=this._uintIndicesCurrentlySet?4:2;s?this._gl.drawElementsInstanced(i,r,a,t*n,s):this._gl.drawElements(i,r,a,t*n)}drawArraysType(e,t,r,s){this.applyStates(),this._reportDrawCall();let i=this._drawMode(e);s?this._gl.drawArraysInstanced(i,t,r,s):this._gl.drawArrays(i,t,r)}_drawMode(e){switch(e){case 0:default:return this._gl.TRIANGLES;case 2:case 3:return this._gl.POINTS;case 1:case 4:return this._gl.LINES;case 5:return this._gl.LINE_LOOP;case 6:return this._gl.LINE_STRIP;case 7:return this._gl.TRIANGLE_STRIP;case 8:return this._gl.TRIANGLE_FAN}}_releaseEffect(e){this._compiledEffects[e._key]&&delete this._compiledEffects[e._key];let t=e.getPipelineContext();t&&this._deletePipelineContext(t)}_deletePipelineContext(e){e&&e.program&&(e.program.__SPECTOR_rebuildProgram=null,(0,d.resetCachedPipeline)(e),this._gl&&(this._currentProgram===e.program&&this._setProgram(null),this._gl.deleteProgram(e.program)))}_getGlobalDefines(e){return(0,f._GetGlobalDefines)(e,this.isNDCHalfZRange,this.useReverseDepthBuffer,this.useExactSrgbConversions)}createEffect(e,s,i,a,n,_,l,h,u,o=0,c){let g="string"==typeof e?e:e.vertexToken||e.vertexSource||e.vertexElement||e.vertex,f="string"==typeof e?e:e.fragmentToken||e.fragmentSource||e.fragmentElement||e.fragment,d=this._getGlobalDefines(),E=void 0!==s.attributes,T=n??s.defines??"";d&&(T+=d);let R=g+"+"+f+"@"+T;if(this._compiledEffects[R]){let e=this._compiledEffects[R];return l&&e.isReady()&&l(e),e._refCount++,e}this._gl&&(0,r.getStateObject)(this._gl);let A=new t.Effect(e,s,E?this:i,a,this,n,_,l,h,u,R,s.shaderLanguage??o,s.extraInitializationsAsync??c);return this._compiledEffects[R]=A,A}_getShaderSource(e){return this._gl.getShaderSource(e)}createRawShaderProgram(e,t,s,i,a=null){let n=(0,r.getStateObject)(this._gl);return n._contextWasLost=this._contextWasLost,n.validateShaderPrograms=this.validateShaderPrograms,(0,r.createRawShaderProgram)(e,t,s,i||this._gl,a)}createShaderProgram(e,t,s,i,a,n=null){let _=(0,r.getStateObject)(this._gl);return _._contextWasLost=this._contextWasLost,_.validateShaderPrograms=this.validateShaderPrograms,(0,r.createShaderProgram)(e,t,s,i,a||this._gl,n)}inlineShaderCode(e){return e}createPipelineContext(e){this._gl&&((0,r.getStateObject)(this._gl).parallelShaderCompile=this._caps.parallelShaderCompile);let t=(0,r.createPipelineContext)(this._gl,e);return t.engine=this,t}createMaterialContext(){}createDrawContext(){}_finalizePipelineContext(e){return(0,r._finalizePipelineContext)(e,this._gl,this.validateShaderPrograms)}_preparePipelineContextAsync(e,t,s,i,a,n,_,l,h,u,o){let c=(0,r.getStateObject)(this._gl);return c._contextWasLost=this._contextWasLost,c.validateShaderPrograms=this.validateShaderPrograms,c._createShaderProgramInjection=this._createShaderProgram.bind(this),c.createRawShaderProgramInjection=this.createRawShaderProgram.bind(this),c.createShaderProgramInjection=this.createShaderProgram.bind(this),c.loadFileInjection=this._loadFile.bind(this),(0,r._preparePipelineContext)(e,t,s,i,a,n,_,l,h,u,o)}_createShaderProgram(e,t,s,i,a=null){return(0,r._createShaderProgram)(e,t,s,i,a)}_isRenderingStateCompiled(e){return!this._isDisposed&&(0,r._isRenderingStateCompiled)(e,this._gl,this.validateShaderPrograms)}_executeWhenRenderingStateIsCompiled(e,t){(0,r._executeWhenRenderingStateIsCompiled)(e,t)}getUniforms(e,t){let r=[];for(let s=0;s<t.length;s++)r.push(this._gl.getUniformLocation(e.program,t[s]));return r}getAttributes(e,t){let r=[];for(let s=0;s<t.length;s++)try{r.push(this._gl.getAttribLocation(e.program,t[s]))}catch(e){r.push(-1)}return r}enableEffect(e){(e=null!==e&&(0,i.IsWrapper)(e)?e.effect:e)&&e!==this._currentEffect&&(this._stencilStateComposer.stencilMaterial=void 0,this.bindSamplers(e),this._currentEffect=e,e.onBind&&e.onBind(e),e._onBindObservable&&e._onBindObservable.notifyObservers(e))}setInt(e,t){return!!e&&(this._gl.uniform1i(e,t),!0)}setInt2(e,t,r){return!!e&&(this._gl.uniform2i(e,t,r),!0)}setInt3(e,t,r,s){return!!e&&(this._gl.uniform3i(e,t,r,s),!0)}setInt4(e,t,r,s,i){return!!e&&(this._gl.uniform4i(e,t,r,s,i),!0)}setIntArray(e,t){return!!e&&(this._gl.uniform1iv(e,t),!0)}setIntArray2(e,t){return!!e&&t.length%2==0&&(this._gl.uniform2iv(e,t),!0)}setIntArray3(e,t){return!!e&&t.length%3==0&&(this._gl.uniform3iv(e,t),!0)}setIntArray4(e,t){return!!e&&t.length%4==0&&(this._gl.uniform4iv(e,t),!0)}setUInt(e,t){return!!e&&(this._gl.uniform1ui(e,t),!0)}setUInt2(e,t,r){return!!e&&(this._gl.uniform2ui(e,t,r),!0)}setUInt3(e,t,r,s){return!!e&&(this._gl.uniform3ui(e,t,r,s),!0)}setUInt4(e,t,r,s,i){return!!e&&(this._gl.uniform4ui(e,t,r,s,i),!0)}setUIntArray(e,t){return!!e&&(this._gl.uniform1uiv(e,t),!0)}setUIntArray2(e,t){return!!e&&t.length%2==0&&(this._gl.uniform2uiv(e,t),!0)}setUIntArray3(e,t){return!!e&&t.length%3==0&&(this._gl.uniform3uiv(e,t),!0)}setUIntArray4(e,t){return!!e&&t.length%4==0&&(this._gl.uniform4uiv(e,t),!0)}setArray(e,t){return!!e&&!(t.length<1)&&(this._gl.uniform1fv(e,t),!0)}setArray2(e,t){return!!e&&t.length%2==0&&(this._gl.uniform2fv(e,t),!0)}setArray3(e,t){return!!e&&t.length%3==0&&(this._gl.uniform3fv(e,t),!0)}setArray4(e,t){return!!e&&t.length%4==0&&(this._gl.uniform4fv(e,t),!0)}setMatrices(e,t){return!!e&&(this._gl.uniformMatrix4fv(e,!1,t),!0)}setMatrix3x3(e,t){return!!e&&(this._gl.uniformMatrix3fv(e,!1,t),!0)}setMatrix2x2(e,t){return!!e&&(this._gl.uniformMatrix2fv(e,!1,t),!0)}setFloat(e,t){return!!e&&(this._gl.uniform1f(e,t),!0)}setFloat2(e,t,r){return!!e&&(this._gl.uniform2f(e,t,r),!0)}setFloat3(e,t,r,s){return!!e&&(this._gl.uniform3f(e,t,r,s),!0)}setFloat4(e,t,r,s,i){return!!e&&(this._gl.uniform4f(e,t,r,s,i),!0)}applyStates(){if(this._depthCullingState.apply(this._gl),this._stencilStateComposer.apply(this._gl),this._alphaState.apply(this._gl,this._currentRenderTarget&&this._currentRenderTarget.textures?this._currentRenderTarget.textures.length:1),this._colorWriteChanged){this._colorWriteChanged=!1;let e=this._colorWrite;this._gl.colorMask(e,e,e,e)}}wipeCaches(e){(!this.preventCacheWipeBetweenFrames||e)&&(this._currentEffect=null,this._viewportCached.x=0,this._viewportCached.y=0,this._viewportCached.z=0,this._viewportCached.w=0,this._unbindVertexArrayObject(),e&&(this._currentProgram=null,this.resetTextureCache(),this._stencilStateComposer.reset(),this._depthCullingState.reset(),this._depthCullingState.depthFunc=this._gl.LEQUAL,this._alphaState.reset(),this._resetAlphaMode(),this._colorWrite=!0,this._colorWriteChanged=!0,this._unpackFlipYCached=null,this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL,this._gl.NONE),this._gl.pixelStorei(this._gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),this._mustWipeVertexAttributes=!0,this.unbindAllAttributes()),this._resetVertexBufferBinding(),this._cachedIndexBuffer=null,this._cachedEffectForVertexBuffers=null,this.bindIndexBuffer(null))}_getSamplingParameters(e,t){let r=this._gl,s=r.NEAREST,i=r.NEAREST,a=!1;switch(e){case 11:s=r.LINEAR,i=t?r.LINEAR_MIPMAP_NEAREST:r.LINEAR;break;case 3:s=r.LINEAR,a=!0,i=t?r.LINEAR_MIPMAP_LINEAR:r.LINEAR;break;case 8:a=!0,s=r.NEAREST,i=t?r.NEAREST_MIPMAP_LINEAR:r.NEAREST;break;case 4:s=r.NEAREST,i=t?r.NEAREST_MIPMAP_NEAREST:r.NEAREST;break;case 5:s=r.NEAREST,i=t?r.LINEAR_MIPMAP_NEAREST:r.LINEAR;break;case 6:a=!0,s=r.NEAREST,i=t?r.LINEAR_MIPMAP_LINEAR:r.LINEAR;break;case 7:s=r.NEAREST,i=r.LINEAR;break;case 1:s=r.NEAREST,i=r.NEAREST;break;case 9:s=r.LINEAR,i=t?r.NEAREST_MIPMAP_NEAREST:r.NEAREST;break;case 10:a=!0,s=r.LINEAR,i=t?r.NEAREST_MIPMAP_LINEAR:r.NEAREST;break;case 2:s=r.LINEAR,i=r.LINEAR;break;case 12:s=r.LINEAR,i=r.NEAREST}return{min:i,mag:s,hasMipMaps:a}}_createTexture(){let e=this._gl.createTexture();if(!e)throw Error("Unable to create texture");return e}_createHardwareTexture(){return new c(this._createTexture(),this._gl)}_createInternalTexture(e,t,r=!0,s=0){let i,n,_=!1,l=0,h=3,u=5,o=!1,c=1,f=!1,d=0,R=!1;void 0!==t&&"object"==typeof t?(i=!!t.generateMipMaps,_=!!t.createMipMaps,l=void 0===t.type?0:t.type,h=void 0===t.samplingMode?3:t.samplingMode,u=void 0===t.format?5:t.format,o=void 0!==t.useSRGBBuffer&&t.useSRGBBuffer,c=t.samples??1,n=t.label,f=!!t.createMSAATexture,d=t.comparisonFunction||0,R=!!t.isCube):i=!!t,o&&(o=this._caps.supportSRGBBuffers&&(this.webGLVersion>1||this.isWebGPU)),(1!==l||this._caps.textureFloatLinearFiltering)&&(2!==l||this._caps.textureHalfFloatLinearFiltering)||(h=1),1!==l||this._caps.textureFloat||(l=0,a.Logger.Warn("Float textures are not supported. Type forced to TEXTURETYPE_UNSIGNED_BYTE"));let A=E(u),p=T(u),x=this._gl,S=new g.InternalTexture(this,s),b=e.width||e,m=e.height||e,C=e.depth||0,B=e.layers||0,P=this._getSamplingParameters(h,(i||_)&&!A),L=0!==B?x.TEXTURE_2D_ARRAY:0!==C?x.TEXTURE_3D:R?x.TEXTURE_CUBE_MAP:x.TEXTURE_2D,G=A?this._getInternalFormatFromDepthTextureFormat(u,!0,p):this._getRGBABufferInternalSizedFormat(l,u,o),I=A?p?x.DEPTH_STENCIL:x.DEPTH_COMPONENT:this._getInternalFormat(u),M=A?this._getWebGLTextureTypeFromDepthTextureFormat(u):this._getWebGLTextureType(l);if(this._bindTextureDirectly(L,S),0!==B)S.is2DArray=!0,x.texImage3D(L,0,G,b,m,B,0,I,M,null);else if(0!==C)S.is3D=!0,x.texImage3D(L,0,G,b,m,C,0,I,M,null);else if(R){S.isCube=!0;for(let e=0;e<6;e++)x.texImage2D(x.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,G,b,m,0,I,M,null)}else x.texImage2D(L,0,G,b,m,0,I,M,null);if(x.texParameteri(L,x.TEXTURE_MAG_FILTER,P.mag),x.texParameteri(L,x.TEXTURE_MIN_FILTER,P.min),x.texParameteri(L,x.TEXTURE_WRAP_S,x.CLAMP_TO_EDGE),x.texParameteri(L,x.TEXTURE_WRAP_T,x.CLAMP_TO_EDGE),A&&this.webGLVersion>1&&(0===d?(x.texParameteri(L,x.TEXTURE_COMPARE_FUNC,515),x.texParameteri(L,x.TEXTURE_COMPARE_MODE,x.NONE)):(x.texParameteri(L,x.TEXTURE_COMPARE_FUNC,d),x.texParameteri(L,x.TEXTURE_COMPARE_MODE,x.COMPARE_REF_TO_TEXTURE))),(i||_)&&this._gl.generateMipmap(L),this._bindTextureDirectly(L,null),S._useSRGBBuffer=o,S.baseWidth=b,S.baseHeight=m,S.width=b,S.height=m,S.depth=B||C,S.isReady=!0,S.samples=c,S.generateMipMaps=i,S.samplingMode=h,S.type=l,S.format=u,S.label=n,S.comparisonFunction=d,this._internalTexturesCache.push(S),f){let e;if(!(e=E(S.format)?this._setupFramebufferDepthAttachments(T(S.format),19!==S.format,S.width,S.height,c,S.format,!0):this._createRenderBuffer(S.width,S.height,c,-1,this._getRGBABufferInternalSizedFormat(S.type,S.format,S._useSRGBBuffer),-1)))throw Error("Unable to create render buffer");S._autoMSAAManagement=!0;let t=S._hardwareTexture;t||(t=S._hardwareTexture=this._createHardwareTexture()),t.addMSAARenderBuffer(e)}return S}_getUseSRGBBuffer(e,t){return e&&this._caps.supportSRGBBuffers&&(this.webGLVersion>1||t)}createTexture(e,t,r,s,i=3,a=null,n=null,_=null,l=null,h=null,u=null,o,c,f,d){return this._createTextureBase(e,t,r,s,i,a,n,(...e)=>this._prepareWebGLTexture(...e,h),(e,t,r,i,a,n)=>{let _=this._gl,l=r.width===e&&r.height===t;a._creationFlags=f??0;let h=this._getTexImageParametersForCreateTexture(a.format,a._useSRGBBuffer);if(l)return _.texImage2D(_.TEXTURE_2D,0,h.internalFormat,h.format,h.type,r),!1;let u=this._caps.maxTextureSize;if(r.width>u||r.height>u||!this._supportsHardwareTextureRescaling)return this._prepareWorkingCanvas(),!!this._workingCanvas&&!!this._workingContext&&(this._workingCanvas.width=e,this._workingCanvas.height=t,this._workingContext.drawImage(r,0,0,r.width,r.height,0,0,e,t),_.texImage2D(_.TEXTURE_2D,0,h.internalFormat,h.format,h.type,this._workingCanvas),a.width=e,a.height=t,!1);{let e=new g.InternalTexture(this,2);this._bindTextureDirectly(_.TEXTURE_2D,e,!0),_.texImage2D(_.TEXTURE_2D,0,h.internalFormat,h.format,h.type,r),this._rescaleTexture(e,a,s,h.format,()=>{this._releaseTexture(e),this._bindTextureDirectly(_.TEXTURE_2D,a,!0),n()})}return!0},_,l,h,u,o,c,d)}_getTexImageParametersForCreateTexture(e,t){let r,s;return 1===this.webGLVersion?s=r=this._getInternalFormat(e,t):(r=this._getInternalFormat(e,!1),s=this._getRGBABufferInternalSizedFormat(0,e,t)),{internalFormat:s,format:r,type:this._gl.UNSIGNED_BYTE}}_rescaleTexture(e,t,r,s,i){}_unpackFlipY(e){this._unpackFlipYCached!==e&&(this._gl.pixelStorei(this._gl.UNPACK_FLIP_Y_WEBGL,+!!e),this.enableUnpackFlipYCached&&(this._unpackFlipYCached=e))}_getUnpackAlignement(){return this._gl.getParameter(this._gl.UNPACK_ALIGNMENT)}_getTextureTarget(e){return e.isCube?this._gl.TEXTURE_CUBE_MAP:e.is3D?this._gl.TEXTURE_3D:e.is2DArray||e.isMultiview?this._gl.TEXTURE_2D_ARRAY:this._gl.TEXTURE_2D}updateTextureSamplingMode(e,t,r=!1){let s=this._getTextureTarget(t),i=this._getSamplingParameters(e,t.useMipMaps||r);this._setTextureParameterInteger(s,this._gl.TEXTURE_MAG_FILTER,i.mag,t),this._setTextureParameterInteger(s,this._gl.TEXTURE_MIN_FILTER,i.min),r&&i.hasMipMaps&&(t.generateMipMaps=!0,this._gl.generateMipmap(s)),this._bindTextureDirectly(s,null),t.samplingMode=e}updateTextureDimensions(e,t,r,s=1){}updateTextureWrappingMode(e,t,r=null,s=null){let i=this._getTextureTarget(e);null!==t&&(this._setTextureParameterInteger(i,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(t),e),e._cachedWrapU=t),null!==r&&(this._setTextureParameterInteger(i,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(r),e),e._cachedWrapV=r),(e.is2DArray||e.is3D)&&null!==s&&(this._setTextureParameterInteger(i,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(s),e),e._cachedWrapR=s),this._bindTextureDirectly(i,null)}_uploadCompressedDataToTextureDirectly(e,t,r,s,i,a=0,n=0){let _=this._gl,l=_.TEXTURE_2D;if(e.isCube&&(l=_.TEXTURE_CUBE_MAP_POSITIVE_X+a),e._useSRGBBuffer)switch(t){case 37492:case 36196:this._caps.etc2?t=_.COMPRESSED_SRGB8_ETC2:e._useSRGBBuffer=!1;break;case 37496:this._caps.etc2?t=_.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:e._useSRGBBuffer=!1;break;case 36492:t=_.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT;break;case 37808:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR;break;case 37809:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR;break;case 37810:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR;break;case 37811:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR;break;case 37812:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR;break;case 37813:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR;break;case 37814:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR;break;case 37815:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR;break;case 37816:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR;break;case 37817:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR;break;case 37818:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR;break;case 37819:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR;break;case 37820:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR;break;case 37821:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR;break;case 33776:this._caps.s3tc_srgb?t=_.COMPRESSED_SRGB_S3TC_DXT1_EXT:e._useSRGBBuffer=!1;break;case 33777:this._caps.s3tc_srgb?t=_.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:e._useSRGBBuffer=!1;break;case 33779:this._caps.s3tc_srgb?t=_.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:e._useSRGBBuffer=!1;break;default:e._useSRGBBuffer=!1}if(e.generateMipMaps){let a=e._hardwareTexture;a.memoryAllocated||(_.texStorage2D(e.isCube?_.TEXTURE_CUBE_MAP:_.TEXTURE_2D,Math.floor(Math.log2(Math.max(r,s)))+1,t,e.width,e.height),a.memoryAllocated=!0),this._gl.compressedTexSubImage2D(l,n,0,0,r,s,t,i)}else this._gl.compressedTexImage2D(l,n,t,r,s,0,i)}_uploadDataToTextureDirectly(e,t,r=0,s=0,i,a=!1){let n=this._gl,_=this._getWebGLTextureType(e.type),l=this._getInternalFormat(e.format),h=void 0===i?this._getRGBABufferInternalSizedFormat(e.type,e.format,e._useSRGBBuffer):this._getInternalFormat(i,e._useSRGBBuffer);this._unpackFlipY(e.invertY);let u=n.TEXTURE_2D;e.isCube&&(u=n.TEXTURE_CUBE_MAP_POSITIVE_X+r);let o=Math.round(Math.log(e.width)*Math.LOG2E),c=Math.round(Math.log(e.height)*Math.LOG2E),g=a?e.width:Math.pow(2,Math.max(o-s,0)),f=a?e.height:Math.pow(2,Math.max(c-s,0));n.texImage2D(u,s,h,g,f,0,l,_,t)}updateTextureData(e,t,r,s,i,a,n=0,_=0,l=!1){let h=this._gl,u=this._getWebGLTextureType(e.type),o=this._getInternalFormat(e.format);this._unpackFlipY(e.invertY);let c=h.TEXTURE_2D,g=h.TEXTURE_2D;e.isCube&&(g=h.TEXTURE_CUBE_MAP_POSITIVE_X+n,c=h.TEXTURE_CUBE_MAP),this._bindTextureDirectly(c,e,!0),h.texSubImage2D(g,_,r,s,i,a,o,u,t),l&&this._gl.generateMipmap(g),this._bindTextureDirectly(c,null)}_uploadArrayBufferViewToTexture(e,t,r=0,s=0){let i=this._gl,a=e.isCube?i.TEXTURE_CUBE_MAP:i.TEXTURE_2D;this._bindTextureDirectly(a,e,!0),this._uploadDataToTextureDirectly(e,t,r,s),this._bindTextureDirectly(a,null,!0)}_prepareWebGLTextureContinuation(e,t,r,s,i){let a=this._gl;if(!a)return;let n=this._getSamplingParameters(i,!r);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,n.mag),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,n.min),r||s||a.generateMipmap(a.TEXTURE_2D),this._bindTextureDirectly(a.TEXTURE_2D,null),t&&t.removePendingData(e),e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear()}_prepareWebGLTexture(e,t,r,s,i,a,n,_,l,h){let u=this.getCaps().maxTextureSize,c=Math.min(u,this.needPOTTextures?(0,o.GetExponentOfTwo)(s.width,u):s.width),g=Math.min(u,this.needPOTTextures?(0,o.GetExponentOfTwo)(s.height,u):s.height),f=this._gl;if(f){if(!e._hardwareTexture){r&&r.removePendingData(e);return}this._bindTextureDirectly(f.TEXTURE_2D,e,!0),this._unpackFlipY(void 0===i||!!i),e.baseWidth=s.width,e.baseHeight=s.height,e.width=c,e.height=g,e.isReady=!0,e.type=-1!==e.type?e.type:0,e.format=-1!==e.format?e.format:h??(".jpg"!==t||e._useSRGBBuffer?5:4),_(c,g,s,t,e,()=>{this._prepareWebGLTextureContinuation(e,r,a,n,l)})||this._prepareWebGLTextureContinuation(e,r,a,n,l)}}_getInternalFormatFromDepthTextureFormat(e,t,r){let s=this._gl;if(!t)return s.STENCIL_INDEX8;let i=r?s.DEPTH_STENCIL:s.DEPTH_COMPONENT;return this.webGLVersion>1?15===e?i=s.DEPTH_COMPONENT16:16===e?i=s.DEPTH_COMPONENT24:17===e||13===e?i=r?s.DEPTH24_STENCIL8:s.DEPTH_COMPONENT24:14===e?i=s.DEPTH_COMPONENT32F:18===e&&(i=r?s.DEPTH32F_STENCIL8:s.DEPTH_COMPONENT32F):i=s.DEPTH_COMPONENT16,i}_getWebGLTextureTypeFromDepthTextureFormat(e){let t=this._gl,r=t.UNSIGNED_INT;return 15===e?r=t.UNSIGNED_SHORT:17===e||13===e?r=t.UNSIGNED_INT_24_8:14===e?r=t.FLOAT:18===e?r=t.FLOAT_32_UNSIGNED_INT_24_8_REV:19===e&&(r=t.UNSIGNED_BYTE),r}_setupFramebufferDepthAttachments(e,t,r,s,i=1,a,n=!1){let _=this._gl;a=a??(e?13:14);let l=this._getInternalFormatFromDepthTextureFormat(a,t,e);return e&&t?this._createRenderBuffer(r,s,i,_.DEPTH_STENCIL,l,n?-1:_.DEPTH_STENCIL_ATTACHMENT):t?this._createRenderBuffer(r,s,i,l,l,n?-1:_.DEPTH_ATTACHMENT):e?this._createRenderBuffer(r,s,i,l,l,n?-1:_.STENCIL_ATTACHMENT):null}_createRenderBuffer(e,t,r,s,i,a,n=!0){let _=this._gl.createRenderbuffer();return this._updateRenderBuffer(_,e,t,r,s,i,a,n)}_updateRenderBuffer(e,t,r,s,i,a,n,_=!0){let l=this._gl;return l.bindRenderbuffer(l.RENDERBUFFER,e),s>1&&l.renderbufferStorageMultisample?l.renderbufferStorageMultisample(l.RENDERBUFFER,s,a,t,r):l.renderbufferStorage(l.RENDERBUFFER,i,t,r),-1!==n&&l.framebufferRenderbuffer(l.FRAMEBUFFER,n,l.RENDERBUFFER,e),_&&l.bindRenderbuffer(l.RENDERBUFFER,null),e}_releaseTexture(e){this._deleteTexture(e._hardwareTexture),this.unbindAllTextures();let t=this._internalTexturesCache.indexOf(e);-1!==t&&this._internalTexturesCache.splice(t,1),e._lodTextureHigh&&e._lodTextureHigh.dispose(),e._lodTextureMid&&e._lodTextureMid.dispose(),e._lodTextureLow&&e._lodTextureLow.dispose(),e._irradianceTexture&&e._irradianceTexture.dispose()}_deleteTexture(e){e?.release()}_setProgram(e){this._currentProgram!==e&&((0,r._setProgram)(e,this._gl),this._currentProgram=e)}bindSamplers(e){let t=e.getPipelineContext();this._setProgram(t.program);let r=e.getSamplers();for(let t=0;t<r.length;t++){let s=e.getUniform(r[t]);s&&(this._boundUniforms[t]=s)}this._currentEffect=null}_activateCurrentTexture(){this._currentTextureChannel!==this._activeChannel&&(this._gl.activeTexture(this._gl.TEXTURE0+this._activeChannel),this._currentTextureChannel=this._activeChannel)}_bindTextureDirectly(e,t,r=!1,s=!1){let i=!1,n=t&&t._associatedChannel>-1;if(r&&n&&(this._activeChannel=t._associatedChannel),this._boundTexturesCache[this._activeChannel]!==t||s){if(this._activateCurrentTexture(),t&&t.isMultiview)throw a.Logger.Error(["_bindTextureDirectly called with a multiview texture!",e,t]),"_bindTextureDirectly called with a multiview texture!";this._gl.bindTexture(e,t?._hardwareTexture?.underlyingResource??null),this._boundTexturesCache[this._activeChannel]=t,t&&(t._associatedChannel=this._activeChannel)}else r&&(i=!0,this._activateCurrentTexture());return n&&!r&&this._bindSamplerUniformToChannel(t._associatedChannel,this._activeChannel),i}_bindTexture(e,t,r){if(void 0===e)return;t&&(t._associatedChannel=e),this._activeChannel=e;let s=t?this._getTextureTarget(t):this._gl.TEXTURE_2D;this._bindTextureDirectly(s,t)}unbindAllTextures(){for(let e=0;e<this._maxSimultaneousTextures;e++)this._activeChannel=e,this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),this.webGLVersion>1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))}setTexture(e,t,r,s){void 0!==e&&(t&&(this._boundUniforms[e]=t),this._setTexture(e,r))}_bindSamplerUniformToChannel(e,t){let r=this._boundUniforms[e];r&&r._currentState!==t&&(this._gl.uniform1i(r,t),r._currentState=t)}_getTextureWrapMode(e){switch(e){case 1:break;case 0:return this._gl.CLAMP_TO_EDGE;case 2:return this._gl.MIRRORED_REPEAT}return this._gl.REPEAT}_setTexture(e,t,r=!1,s=!1,i=""){let a;if(!t)return null!=this._boundTexturesCache[e]&&(this._activeChannel=e,this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),this.webGLVersion>1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))),!1;if(t.video){this._activeChannel=e;let r=t.getInternalTexture();r&&(r._associatedChannel=e),t.update()}else if(4===t.delayLoadState)return t.delayLoad(),!1;a=s?t.depthStencilTexture:t.isReady()?t.getInternalTexture():t.isCube?this.emptyCubeTexture:t.is3D?this.emptyTexture3D:t.is2DArray?this.emptyTexture2DArray:this.emptyTexture,!r&&a&&(a._associatedChannel=e);let n=!0;this._boundTexturesCache[e]===a&&(r||this._bindSamplerUniformToChannel(a._associatedChannel,e),n=!1),this._activeChannel=e;let _=this._getTextureTarget(a);if(n&&this._bindTextureDirectly(_,a,r),a&&!a.isMultiview){if(a.isCube&&a._cachedCoordinatesMode!==t.coordinatesMode){a._cachedCoordinatesMode=t.coordinatesMode;let e=+(3!==t.coordinatesMode&&5!==t.coordinatesMode);t.wrapU=e,t.wrapV=e}a._cachedWrapU!==t.wrapU&&(a._cachedWrapU=t.wrapU,this._setTextureParameterInteger(_,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(t.wrapU),a)),a._cachedWrapV!==t.wrapV&&(a._cachedWrapV=t.wrapV,this._setTextureParameterInteger(_,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(t.wrapV),a)),a.is3D&&a._cachedWrapR!==t.wrapR&&(a._cachedWrapR=t.wrapR,this._setTextureParameterInteger(_,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(t.wrapR),a)),this._setAnisotropicLevel(_,a,t.anisotropicFilteringLevel)}return!0}setTextureArray(e,t,r,s){if(void 0!==e&&t){this._textureUnits&&this._textureUnits.length===r.length||(this._textureUnits=new Int32Array(r.length));for(let t=0;t<r.length;t++){let s=r[t].getInternalTexture();s?(this._textureUnits[t]=e+t,s._associatedChannel=e+t):this._textureUnits[t]=-1}this._gl.uniform1iv(t,this._textureUnits);for(let e=0;e<r.length;e++)this._setTexture(this._textureUnits[e],r[e],!0)}}_setAnisotropicLevel(e,t,r){let s=this._caps.textureAnisotropicFilterExtension;11!==t.samplingMode&&3!==t.samplingMode&&2!==t.samplingMode&&(r=1),s&&t._cachedAnisotropicFilteringLevel!==r&&(this._setTextureParameterFloat(e,s.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(r,this._caps.maxAnisotropy),t),t._cachedAnisotropicFilteringLevel=r)}_setTextureParameterFloat(e,t,r,s){this._bindTextureDirectly(e,s,!0,!0),this._gl.texParameterf(e,t,r)}_setTextureParameterInteger(e,t,r,s){s&&this._bindTextureDirectly(e,s,!0,!0),this._gl.texParameteri(e,t,r)}unbindAllAttributes(){if(this._mustWipeVertexAttributes){this._mustWipeVertexAttributes=!1;for(let e=0;e<this._caps.maxVertexAttribs;e++)this.disableAttributeByIndex(e);return}for(let e=0,t=this._vertexAttribArraysEnabled.length;e<t;e++)!(e>=this._caps.maxVertexAttribs)&&this._vertexAttribArraysEnabled[e]&&this.disableAttributeByIndex(e)}releaseEffects(){this._compiledEffects={},this.onReleaseEffectsObservable.notifyObservers(this)}dispose(){(0,n.IsWindowObjectExist)()&&this._renderingCanvas&&(this._renderingCanvas.removeEventListener("webglcontextlost",this._onContextLost),this._onContextRestored&&this._renderingCanvas.removeEventListener("webglcontextrestored",this._onContextRestored)),super.dispose(),this._dummyFramebuffer&&this._gl.deleteFramebuffer(this._dummyFramebuffer),this.unbindAllAttributes(),this._boundUniforms={},this._workingCanvas=null,this._workingContext=null,this._currentBufferPointers.length=0,this._currentProgram=null,this._creationOptions.loseContextOnDispose&&this._gl.getExtension("WEBGL_lose_context")?.loseContext(),(0,r.deleteStateObject)(this._gl)}attachContextLostEvent(e){this._renderingCanvas&&this._renderingCanvas.addEventListener("webglcontextlost",e,!1)}attachContextRestoredEvent(e){this._renderingCanvas&&this._renderingCanvas.addEventListener("webglcontextrestored",e,!1)}getError(){return this._gl.getError()}_canRenderToFloatFramebuffer(){return this._webGLVersion>1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(1)}_canRenderToHalfFloatFramebuffer(){return this._webGLVersion>1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(2)}_canRenderToFramebuffer(e){let t=this._gl;for(;t.getError()!==t.NO_ERROR;);let r=!0,s=t.createTexture();t.bindTexture(t.TEXTURE_2D,s),t.texImage2D(t.TEXTURE_2D,0,this._getRGBABufferInternalSizedFormat(e),1,1,0,t.RGBA,this._getWebGLTextureType(e),null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST);let i=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,i),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,s,0);let a=t.checkFramebufferStatus(t.FRAMEBUFFER);if((r=(r=r&&a===t.FRAMEBUFFER_COMPLETE)&&t.getError()===t.NO_ERROR)&&(t.clear(t.COLOR_BUFFER_BIT),r=r&&t.getError()===t.NO_ERROR),r){t.bindFramebuffer(t.FRAMEBUFFER,null);let e=t.RGBA,s=t.UNSIGNED_BYTE,i=new Uint8Array(4);t.readPixels(0,0,1,1,e,s,i),r=r&&t.getError()===t.NO_ERROR}for(t.deleteTexture(s),t.deleteFramebuffer(i),t.bindFramebuffer(t.FRAMEBUFFER,null);!r&&t.getError()!==t.NO_ERROR;);return r}_getWebGLTextureType(e){if(1===this._webGLVersion){switch(e){case 1:return this._gl.FLOAT;case 2:return this._gl.HALF_FLOAT_OES;case 0:break;case 8:return this._gl.UNSIGNED_SHORT_4_4_4_4;case 9:return this._gl.UNSIGNED_SHORT_5_5_5_1;case 10:return this._gl.UNSIGNED_SHORT_5_6_5}return this._gl.UNSIGNED_BYTE}switch(e){case 3:return this._gl.BYTE;case 0:break;case 4:return this._gl.SHORT;case 5:return this._gl.UNSIGNED_SHORT;case 6:return this._gl.INT;case 7:return this._gl.UNSIGNED_INT;case 1:return this._gl.FLOAT;case 2:return this._gl.HALF_FLOAT;case 8:return this._gl.UNSIGNED_SHORT_4_4_4_4;case 9:return this._gl.UNSIGNED_SHORT_5_5_5_1;case 10:return this._gl.UNSIGNED_SHORT_5_6_5;case 11:return this._gl.UNSIGNED_INT_2_10_10_10_REV;case 12:return this._gl.UNSIGNED_INT_24_8;case 13:return this._gl.UNSIGNED_INT_10F_11F_11F_REV;case 14:return this._gl.UNSIGNED_INT_5_9_9_9_REV;case 15:return this._gl.FLOAT_32_UNSIGNED_INT_24_8_REV}return this._gl.UNSIGNED_BYTE}_getInternalFormat(e,t=!1){let r=t?this._glSRGBExtensionValues.SRGB8_ALPHA8:this._gl.RGBA;switch(e){case 0:r=this._gl.ALPHA;break;case 1:r=this._gl.LUMINANCE;break;case 2:r=this._gl.LUMINANCE_ALPHA;break;case 6:case 33322:case 36760:r=this._gl.RED;break;case 7:case 33324:case 36761:r=this._gl.RG;break;case 4:case 32852:case 36762:r=t?this._glSRGBExtensionValues.SRGB:this._gl.RGB;break;case 5:case 32859:case 36763:r=t?this._glSRGBExtensionValues.SRGB8_ALPHA8:this._gl.RGBA}if(this._webGLVersion>1)switch(e){case 8:r=this._gl.RED_INTEGER;break;case 9:r=this._gl.RG_INTEGER;break;case 10:r=this._gl.RGB_INTEGER;break;case 11:r=this._gl.RGBA_INTEGER}return r}_getRGBABufferInternalSizedFormat(e,t,r=!1){if(1===this._webGLVersion){if(void 0!==t)switch(t){case 0:return this._gl.ALPHA;case 1:return this._gl.LUMINANCE;case 2:return this._gl.LUMINANCE_ALPHA;case 4:return r?this._glSRGBExtensionValues.SRGB:this._gl.RGB}return this._gl.RGBA}switch(e){case 3:switch(t){case 6:return this._gl.R8_SNORM;case 7:return this._gl.RG8_SNORM;case 4:return this._gl.RGB8_SNORM;case 8:return this._gl.R8I;case 9:return this._gl.RG8I;case 10:return this._gl.RGB8I;case 11:return this._gl.RGBA8I;default:return this._gl.RGBA8_SNORM}case 0:switch(t){case 6:return this._gl.R8;case 7:return this._gl.RG8;case 4:return r?this._glSRGBExtensionValues.SRGB8:this._gl.RGB8;case 5:return r?this._glSRGBExtensionValues.SRGB8_ALPHA8:this._gl.RGBA8;case 8:return this._gl.R8UI;case 9:return this._gl.RG8UI;case 10:return this._gl.RGB8UI;case 11:return this._gl.RGBA8UI;case 0:return this._gl.ALPHA;case 1:return this._gl.LUMINANCE;case 2:return this._gl.LUMINANCE_ALPHA;default:return this._gl.RGBA8}case 4:switch(t){case 8:return this._gl.R16I;case 36760:return this._gl.R16_SNORM_EXT;case 36761:return this._gl.RG16_SNORM_EXT;case 36762:return this._gl.RGB16_SNORM_EXT;case 36763:return this._gl.RGBA16_SNORM_EXT;case 9:return this._gl.RG16I;case 10:return this._gl.RGB16I;default:return this._gl.RGBA16I}case 5:switch(t){case 8:return this._gl.R16UI;case 33322:return this._gl.R16_EXT;case 33324:return this._gl.RG16_EXT;case 32852:return this._gl.RGB16_EXT;case 32859:return this._gl.RGBA16_EXT;case 9:return this._gl.RG16UI;case 10:return this._gl.RGB16UI;default:return this._gl.RGBA16UI}case 6:switch(t){case 8:return this._gl.R32I;case 9:return this._gl.RG32I;case 10:return this._gl.RGB32I;default:return this._gl.RGBA32I}case 7:switch(t){case 8:return this._gl.R32UI;case 9:return this._gl.RG32UI;case 10:return this._gl.RGB32UI;default:return this._gl.RGBA32UI}case 1:switch(t){case 6:return this._gl.R32F;case 7:return this._gl.RG32F;case 4:return this._gl.RGB32F;default:return this._gl.RGBA32F}case 2:switch(t){case 6:return this._gl.R16F;case 7:return this._gl.RG16F;case 4:return this._gl.RGB16F;default:return this._gl.RGBA16F}case 10:return this._gl.RGB565;case 13:return this._gl.R11F_G11F_B10F;case 14:return this._gl.RGB9_E5;case 8:return this._gl.RGBA4;case 9:return this._gl.RGB5_A1;case 11:switch(t){case 5:default:return this._gl.RGB10_A2;case 11:return this._gl.RGB10_A2UI}}return r?this._glSRGBExtensionValues.SRGB8_ALPHA8:this._gl.RGBA8}readPixels(e,t,r,s,i=!0,n=!0,_=null){let l=i?this._gl.RGBA:this._gl.RGB,h=r*s*(i?4:3);if(_){if(_.length<h)return a.Logger.Error(`Data buffer is too small to store the read pixels (${_.length} should be more than ${h})`),Promise.resolve(_)}else _=new Uint8Array(h);return n&&this.flushFramebuffer(),this._gl.readPixels(e,t,r,s,l,this._gl.UNSIGNED_BYTE,_),Promise.resolve(_)}static get IsSupportedAsync(){return Promise.resolve(this.isSupported())}static get IsSupported(){return this.isSupported()}static isSupported(){if(null!==this._HasMajorPerformanceCaveat)return!this._HasMajorPerformanceCaveat;if(null===this._IsSupported)try{let e=s.AbstractEngine._CreateCanvas(1,1),t=e.getContext("webgl")||e.getContext("experimental-webgl");this._IsSupported=null!=t&&!!globalThis.WebGLRenderingContext}catch(e){this._IsSupported=!1}return this._IsSupported}static get HasMajorPerformanceCaveat(){if(null===this._HasMajorPerformanceCaveat)try{let e=s.AbstractEngine._CreateCanvas(1,1),t=e.getContext("webgl",{failIfMajorPerformanceCaveat:!0})||e.getContext("experimental-webgl",{failIfMajorPerformanceCaveat:!0});this._HasMajorPerformanceCaveat=!t}catch(e){this._HasMajorPerformanceCaveat=!1}return this._HasMajorPerformanceCaveat}}p._TempClearColorUint32=new Uint32Array(4),p._TempClearColorInt32=new Int32Array(4),p.ExceptionList=[{key:"Chrome/63.0",capture:"63\\.0\\.3239\\.(\\d+)",captureConstraint:108,targets:["uniformBuffer"]},{key:"Firefox/58",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Firefox/59",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Chrome/72.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/73.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/74.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/71",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/72",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Chrome/12\\d\\..+?Mobile",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:".*AppleWebKit.*(15.4).*Safari",capture:null,captureConstraint:null,targets:["antialias","maxMSAASamples"]},{key:".*(15.4).*AppleWebKit.*Safari",capture:null,captureConstraint:null,targets:["antialias","maxMSAASamples"]}],p._ConcatenateShader=f._ConcatenateShader,p._IsSupported=null,p._HasMajorPerformanceCaveat=null,e.s(["ThinEngine",0,p],94559)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,62750,e=>{"use strict";var t=e.i(17884),i=e.i(75105);let a="cachedOperationValue",l="cachedExecutionId";class s extends t.FlowGraphBlock{constructor(e,t){super(t),this.value=this.registerDataOutput("value",e),this.isValid=this.registerDataOutput("isValid",i.RichTypeBoolean)}_updateOutputs(e){let t=e._getExecutionVariable(this,l,-1),i=e._getExecutionVariable(this,a,null);if(null!=i&&t===e.executionId)this.isValid.setValue(!0,e),this.value.setValue(i,e);else try{let t=this._doOperation(e);if(null==t)return void this.isValid.setValue(!1,e);e._setExecutionVariable(this,a,t),e._setExecutionVariable(this,l,e.executionId),this.value.setValue(t,e),this.isValid.setValue(!0,e)}catch(t){this.isValid.setValue(!1,e)}}}e.s(["FlowGraphCachedOperationBlock",0,s])},8981,e=>{"use strict";var t=e.i(75105),i=e.i(62750),a=e.i(69400),l=e.i(44520);class s extends i.FlowGraphCachedOperationBlock{constructor(e){super(t.RichTypeVector3,e),this.body=this.registerDataInput("body",t.RichTypeAny)}_doOperation(e){let t=this.body.getValue(e);if(!t)return;let i=e._getExecutionVariable(this,"_cachedVelocity",null);return i||(i=new a.Vector3,e._setExecutionVariable(this,"_cachedVelocity",i)),t.getLinearVelocityToRef(i),i}getClassName(){return"FlowGraphGetLinearVelocityBlock"}}let o=!1;function r(){o||(o=!0,(0,l.RegisterClass)("FlowGraphGetLinearVelocityBlock",s))}e.s(["FlowGraphGetLinearVelocityBlock",0,s,"RegisterFlowGraphGetLinearVelocityBlock",0,r],4119),r(),e.s([],62600),e.i(62600),e.i(4119),e.s(["FlowGraphGetLinearVelocityBlock",0,s],8981)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52624,e=>{"use strict";let t,i,s,a,r,n,o,h,l,_,c,d,u,g,m,p;var f,b=e.i(57575),R=e.i(69400),v=e.i(9855),M=e.i(3864),C=e.i(23003),P=e.i(85050),S=e.i(2060);class x{constructor(){this._doNotSerialize=!1,this._isDisposed=!1,this._sceneRootNodesIndex=-1,this._isEnabled=!0,this._isParentEnabled=!0,this._isReady=!0,this._onEnabledStateChangedObservable=new M.Observable,this._onEffectiveEnabledStateChangedObservable=null,this._onClonedObservable=new M.Observable,this._inheritVisibility=!1,this._isVisible=!0}}let D=(n=[],o=[],h=[],l=[],_=[],c=[],d=[],u=[],g=[],m=[],f=class{static AddNodeConstructor(e,t){this._NodeConstructors[e]=t}static Construct(e,t,i,s){let a=this._NodeConstructors[e];return a?a(t,i,s):null}set accessibilityTag(e){this._accessibilityTag=e,this.onAccessibilityTagChangedObservable.notifyObservers(e)}get accessibilityTag(){return this._accessibilityTag}get doNotSerialize(){return!!this._nodeDataStorage._doNotSerialize||!!this._parentNode&&this._parentNode.doNotSerialize}set doNotSerialize(e){this._nodeDataStorage._doNotSerialize=e}isDisposed(){return this._nodeDataStorage._isDisposed}set parent(e){if(this._parentNode===e)return;let t=this._parentNode;if(this._parentNode&&void 0!==this._parentNode._children&&null!==this._parentNode._children){let t=this._parentNode._children.indexOf(this);-1!==t&&this._parentNode._children.splice(t,1),e||this._nodeDataStorage._isDisposed||this._addToSceneRootNodes()}this._parentNode=e,this._isDirty=!0,this._parentNode&&((void 0===this._parentNode._children||null===this._parentNode._children)&&(this._parentNode._children=[]),this._parentNode._children.push(this),t||this._removeFromSceneRootNodes()),this._syncParentEnabledState()}get parent(){return this._parentNode}get inheritVisibility(){return this._nodeDataStorage._inheritVisibility}set inheritVisibility(e){this._nodeDataStorage._inheritVisibility=e}get isVisible(){return(!this.inheritVisibility||!this._parentNode||!!this._parentNode.isVisible)&&this._nodeDataStorage._isVisible}set isVisible(e){this._nodeDataStorage._isVisible=e}_serializeAsParent(e){e.parentId=this.uniqueId}_addToSceneRootNodes(){-1===this._nodeDataStorage._sceneRootNodesIndex&&(this._nodeDataStorage._sceneRootNodesIndex=this._scene.rootNodes.length,this._scene.rootNodes.push(this))}_removeFromSceneRootNodes(){if(-1!==this._nodeDataStorage._sceneRootNodesIndex){let e=this._scene.rootNodes,t=e.length-1;e[this._nodeDataStorage._sceneRootNodesIndex]=e[t],e[this._nodeDataStorage._sceneRootNodesIndex]._nodeDataStorage._sceneRootNodesIndex=this._nodeDataStorage._sceneRootNodesIndex,this._scene.rootNodes.pop(),this._nodeDataStorage._sceneRootNodesIndex=-1}}get animationPropertiesOverride(){return this._animationPropertiesOverride?this._animationPropertiesOverride:this._scene.animationPropertiesOverride}set animationPropertiesOverride(e){this._animationPropertiesOverride=e}getClassName(){return"Node"}set onDispose(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)}get onEnabledStateChangedObservable(){return this._nodeDataStorage._onEnabledStateChangedObservable}get onEffectiveEnabledStateChangedObservable(){var e;return(e=this._nodeDataStorage)._onEffectiveEnabledStateChangedObservable??(e._onEffectiveEnabledStateChangedObservable=new M.Observable)}get onClonedObservable(){return this._nodeDataStorage._onClonedObservable}constructor(e,t=null,i=!0){this._isDirty=!1,this._nodeDataStorage=new x,this.name=(0,b.__runInitializers)(this,n,void 0),this.id=((0,b.__runInitializers)(this,o),(0,b.__runInitializers)(this,h,void 0)),this.uniqueId=((0,b.__runInitializers)(this,l),(0,b.__runInitializers)(this,_,void 0)),this.state=((0,b.__runInitializers)(this,c),(0,b.__runInitializers)(this,d,"")),this.metadata=((0,b.__runInitializers)(this,u),(0,b.__runInitializers)(this,g,null)),this._internalMetadata=(0,b.__runInitializers)(this,m),this.reservedDataStore=null,this._accessibilityTag=null,this.onAccessibilityTagChangedObservable=new M.Observable,this._parentContainer=null,this.animations=[],this._ranges={},this.onReady=null,this._currentRenderId=-1,this._parentUpdateId=-1,this._childUpdateId=-1,this._waitingParentId=null,this._waitingParentInstanceIndex=null,this._waitingParsedUniqueId=null,this._cache={},this._parentNode=null,this._children=null,this._worldMatrix=R.Matrix.Identity(),this._worldMatrixDeterminant=0,this._worldMatrixDeterminantIsDirty=!0,this._animationPropertiesOverride=null,this._isNode=!0,this.onDisposeObservable=new M.Observable,this._onDisposeObserver=null,this._behaviors=[],this.name=e,this.id=e,this._scene=t||C.EngineStore.LastCreatedScene,this.uniqueId=this._scene.getUniqueId(),this._initCache(),i&&this._addToSceneRootNodes()}getScene(){return this._scene}getEngine(){return this._scene.getEngine()}addBehavior(e,t=!1){return -1!==this._behaviors.indexOf(e)||(e.init(),this._scene.isLoading&&!t?this._scene.onDataLoadedObservable.addOnce(()=>{this._behaviors.includes(e)&&e.attach(this)}):e.attach(this),this._behaviors.push(e)),this}removeBehavior(e){let t=this._behaviors.indexOf(e);return -1===t||(this._behaviors.splice(t,1),e.detach()),this}get behaviors(){return this._behaviors}getBehaviorByName(e){for(let t of this._behaviors)if(t.name===e)return t;return null}getWorldMatrix(){return this._currentRenderId!==this._scene.getRenderId()&&this.computeWorldMatrix(),this._worldMatrix}_getWorldMatrixDeterminant(){return this._worldMatrixDeterminantIsDirty&&(this._worldMatrixDeterminantIsDirty=!1,this._worldMatrixDeterminant=this._worldMatrix.determinant()),this._worldMatrixDeterminant}get worldMatrixFromCache(){return this._worldMatrix}_initCache(){this._cache={}}updateCache(e){!e&&this.isSynchronized()||this._updateCache()}_getActionManagerForTrigger(e,t=!0){return this.parent?this.parent._getActionManagerForTrigger(e,!1):null}_updateCache(e){}_isSynchronized(){return!0}_markSyncedWithParent(){this._parentNode&&(this._parentUpdateId=this._parentNode._childUpdateId)}isSynchronizedWithParent(){return!this._parentNode||!this._parentNode._isDirty&&this._parentUpdateId===this._parentNode._childUpdateId&&this._parentNode.isSynchronized()}isSynchronized(){return(!this._parentNode||!!this.isSynchronizedWithParent())&&this._isSynchronized()}isReady(e=!1){return this._nodeDataStorage._isReady}markAsDirty(e){return this._currentRenderId=Number.MAX_VALUE,this._isDirty=!0,this}isEnabled(e=!0){return!1===e?this._nodeDataStorage._isEnabled:!!this._nodeDataStorage._isEnabled&&this._nodeDataStorage._isParentEnabled}_hasEffectiveEnabledStateObservers(){let e=this._nodeDataStorage._onEffectiveEnabledStateChangedObservable;return!!e&&e.hasObservers()}_syncParentEnabledState(){let e=this._hasEffectiveEnabledStateObservers(),t=e?this.isEnabled():null;if(this._nodeDataStorage._isParentEnabled=!this._parentNode||this._parentNode.isEnabled(),this._children)for(let e of this._children)e._syncParentEnabledState();if(e){let e=this.isEnabled();e!==t&&this._nodeDataStorage._onEffectiveEnabledStateChangedObservable.notifyObservers(e)}}setEnabled(e){if(this._nodeDataStorage._isEnabled===e)return;let t=this._hasEffectiveEnabledStateObservers(),i=t?this.isEnabled():null;if(this._nodeDataStorage._isEnabled=e,this._syncParentEnabledState(),this._nodeDataStorage._onEnabledStateChangedObservable.notifyObservers(e),t){let e=this.isEnabled();e!==i&&this._nodeDataStorage._onEffectiveEnabledStateChangedObservable.notifyObservers(e)}}isDescendantOf(e){return!!this.parent&&(this.parent===e||this.parent.isDescendantOf(e))}_getDescendants(e,t=!1,i){if(this._children)for(let s=0;s<this._children.length;s++){let a=this._children[s];(!i||i(a))&&e.push(a),t||a._getDescendants(e,!1,i)}}getDescendants(e,t){let i=[];return this._getDescendants(i,e,t),i}getChildMeshes(e,t){let i=[];return this._getDescendants(i,e,e=>(!t||t(e))&&void 0!==e.cullingStrategy),i}getChildren(e,t=!0){return this.getDescendants(t,e)}_setReady(e){if(e!==this._nodeDataStorage._isReady){if(!e){this._nodeDataStorage._isReady=!1;return}this.onReady&&this.onReady(this),this._nodeDataStorage._isReady=!0}}getAnimationByName(e){for(let t=0;t<this.animations.length;t++){let i=this.animations[t];if(i.name===e)return i}return null}createAnimationRange(e,t,i){if(!this._ranges[e]){this._ranges[e]=f._AnimationRangeFactory(e,t,i);for(let s=0,a=this.animations.length;s<a;s++)this.animations[s]&&this.animations[s].createRange(e,t,i)}}deleteAnimationRange(e,t=!0){for(let i=0,s=this.animations.length;i<s;i++)this.animations[i]&&this.animations[i].deleteRange(e,t);this._ranges[e]=null}getAnimationRange(e){return this._ranges[e]||null}clone(e,t,i){let s=S.SerializationHelper.Clone(()=>new f(e,this.getScene()),this);if(t&&(s.parent=t),!i){let t=this.getDescendants(!0);for(let i=0;i<t.length;i++){let a=t[i];a.clone(e+"."+a.name,s)}}return s}getAnimationRanges(){let e,t=[];for(e in this._ranges)t.push(this._ranges[e]);return t}beginAnimation(e,t,i,s){let a=this.getAnimationRange(e);return a?this._scene.beginAnimation(this,a.from,a.to,t,i,s):null}serializeAnimationRanges(){let e=[];for(let t in this._ranges){let i=this._ranges[t];if(!i)continue;let s={};s.name=t,s.from=i.from,s.to=i.to,e.push(s)}return e}computeWorldMatrix(e){return this._worldMatrix||(this._worldMatrix=R.Matrix.Identity()),this._worldMatrix}dispose(e,t=!1){if(this._nodeDataStorage._isDisposed=!0,!e)for(let i of this.getDescendants(!0))i.dispose(e,t);for(let e of(this.parent?this.parent=null:this._removeFromSceneRootNodes(),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.onEnabledStateChangedObservable.clear(),this._nodeDataStorage._onEffectiveEnabledStateChangedObservable?.clear(),this.onClonedObservable.clear(),this._behaviors))e.detach();this._behaviors.length=0,this.metadata=null}static ParseAnimationRanges(e,t,i){if(t.ranges)for(let i=0;i<t.ranges.length;i++){let s=t.ranges[i];e.createAnimationRange(s.name,s.from,s.to)}}getHierarchyBoundingVectors(e=!0,t=null){let i,s;if(this.getScene().incrementRenderId(),this.computeWorldMatrix(!0),this.getBoundingInfo&&this.subMeshes){let e=this.getBoundingInfo();i=e.boundingBox.minimumWorld.clone(),s=e.boundingBox.maximumWorld.clone()}else i=new R.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),s=new R.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);if(e)for(let e of this.getDescendants(!1)){if(e.computeWorldMatrix(!0),t&&!t(e)||!e.getBoundingInfo||0===e.getTotalVertices())continue;let a=e.getBoundingInfo().boundingBox,r=a.minimumWorld,n=a.maximumWorld;R.Vector3.CheckExtends(r,i,s),R.Vector3.CheckExtends(n,i,s)}return{min:i,max:s}}},p="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0,t=[(0,v.serialize)()],i=[(0,v.serialize)()],s=[(0,v.serialize)()],a=[(0,v.serialize)()],r=[(0,v.serialize)()],(0,b.__esDecorate)(null,null,t,{kind:"field",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:p},n,o),(0,b.__esDecorate)(null,null,i,{kind:"field",name:"id",static:!1,private:!1,access:{has:e=>"id"in e,get:e=>e.id,set:(e,t)=>{e.id=t}},metadata:p},h,l),(0,b.__esDecorate)(null,null,s,{kind:"field",name:"uniqueId",static:!1,private:!1,access:{has:e=>"uniqueId"in e,get:e=>e.uniqueId,set:(e,t)=>{e.uniqueId=t}},metadata:p},_,c),(0,b.__esDecorate)(null,null,a,{kind:"field",name:"state",static:!1,private:!1,access:{has:e=>"state"in e,get:e=>e.state,set:(e,t)=>{e.state=t}},metadata:p},d,u),(0,b.__esDecorate)(null,null,r,{kind:"field",name:"metadata",static:!1,private:!1,access:{has:e=>"metadata"in e,get:e=>e.metadata,set:(e,t)=>{e.metadata=t}},metadata:p},g,m),p&&Object.defineProperty(f,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:p}),f._AnimationRangeFactory=(e,t,i)=>{throw(0,P._WarnImport)("AnimationRange")},f._NodeConstructors={},f);e.s(["Node",0,D])},12877,e=>{"use strict";class t{constructor(e,t,i,s){this.x=e,this.y=t,this.width=i,this.height=s}toGlobal(e,i){return new t(this.x*e,this.y*i,this.width*e,this.height*i)}toGlobalToRef(e,t,i){return i.x=this.x*e,i.y=this.y*t,i.width=this.width*e,i.height=this.height*t,this}clone(){return new t(this.x,this.y,this.width,this.height)}}e.s(["Viewport",0,t])},67213,e=>{"use strict";var t=e.i(51843);let i=!1;e.s(["RegisterAbstractEngineRenderPass",0,function(){i||(i=!0,t.AbstractEngine.prototype.getRenderPassNames=function(){return this._renderPassNames},t.AbstractEngine.prototype.getCurrentRenderPassName=function(){return this._renderPassNames[this.currentRenderPassId]},t.AbstractEngine.prototype.createRenderPassId=function(e){let i=++t.AbstractEngine._RenderPassIdCounter;return this._renderPassNames[i]=e??"NONAME",i},t.AbstractEngine.prototype.releaseRenderPassId=function(e){this._renderPassNames[e]=void 0;for(let t=0;t<this.scenes.length;++t){let i=this.scenes[t];for(let t=0;t<i.meshes.length;++t){let s=i.meshes[t];if(s._releaseRenderPassId(e),s.subMeshes)for(let t=0;t<s.subMeshes.length;++t)s.subMeshes[t]._removeDrawWrapper(e)}}})}])},55288,e=>{"use strict";let t,i,s,a,r,n,o,h,l,_,c,d,u,g,m,p,f,b,R,v,M,C,P,S,x,D,I,E,O,y,A,N,V,T,z,w,L,Z,F,B,k,j,q,H,W;var U,G=e.i(57575),X=e.i(9855),Y=e.i(32451),K=e.i(3864),Q=e.i(69400),$=e.i(52624),J=e.i(16347),ee=e.i(44520),et=e.i(85050),ei=e.i(12877),es=e.i(57660),ea=e.i(67213),er=e.i(2060);let en=(R=$.Node,v=[],M=[],C=[],P=[],S=[],x=[],D=[],I=[],E=[],O=[],y=[],A=[],N=[],V=[],T=[],z=[],w=[],L=[],Z=[],F=[],B=[],k=[],j=[],q=[],H=[],U=class extends R{get position(){return this._position}set position(e){this._position=e}set upVector(e){this._upVector=e}get upVector(){return this._upVector}get screenArea(){let e,t;if(this.mode===U.PERSPECTIVE_CAMERA)this.fovMode===U.FOVMODE_VERTICAL_FIXED?(t=2*this.minZ*Math.tan(this.fov/2),e=this.getEngine().getAspectRatio(this)*t):t=(e=2*this.minZ*Math.tan(this.fov/2))/this.getEngine().getAspectRatio(this);else{let i=this.getEngine().getRenderWidth()/2,s=this.getEngine().getRenderHeight()/2;e=(this.orthoRight??i)-(this.orthoLeft??-i),t=(this.orthoTop??s)-(this.orthoBottom??-s)}return e*t}set orthoLeft(e){for(let t of(this._orthoLeft=e,this._rigCameras))t.orthoLeft=e}get orthoLeft(){return this._orthoLeft}set orthoRight(e){for(let t of(this._orthoRight=e,this._rigCameras))t.orthoRight=e}get orthoRight(){return this._orthoRight}set orthoBottom(e){for(let t of(this._orthoBottom=e,this._rigCameras))t.orthoBottom=e}get orthoBottom(){return this._orthoBottom}set orthoTop(e){for(let t of(this._orthoTop=e,this._rigCameras))t.orthoTop=e}get orthoTop(){return this._orthoTop}setFocalLength(e,t=36){this.fov=2*Math.atan(t/(2*e))}get inertia(){return this._baseInertia}set inertia(e){this._baseInertia=e}set mode(e){for(let t of(this._mode=e,this._rigCameras))t.mode=e}get mode(){return this._mode}get hasMoved(){return this._hasMoved}constructor(e,t,i,s=!0){(0,ea.RegisterAbstractEngineRenderPass)(),super(e,i,!1),this.inputs=(0,G.__runInitializers)(this,v),this._position=(0,G.__runInitializers)(this,M,Q.Vector3.Zero()),this._upVector=((0,G.__runInitializers)(this,C),(0,G.__runInitializers)(this,P,Q.Vector3.Up())),this.oblique=((0,G.__runInitializers)(this,S),null),this._orthoLeft=null,this._orthoRight=null,this._orthoBottom=null,this._orthoTop=null,this.fov=(0,G.__runInitializers)(this,x,.8),this.projectionPlaneTilt=((0,G.__runInitializers)(this,D),(0,G.__runInitializers)(this,I,0)),this.minZ=((0,G.__runInitializers)(this,E),(0,G.__runInitializers)(this,O,1)),this.maxZ=((0,G.__runInitializers)(this,y),(0,G.__runInitializers)(this,A,1e4)),this._baseInertia=((0,G.__runInitializers)(this,N),.9),this._mode=U.PERSPECTIVE_CAMERA,this.isIntermediate=!1,this.viewport=new ei.Viewport(0,0,1,1),this.layerMask=(0,G.__runInitializers)(this,V,0xfffffff),this.fovMode=((0,G.__runInitializers)(this,T),(0,G.__runInitializers)(this,z,U.FOVMODE_VERTICAL_FIXED)),this.cameraRigMode=((0,G.__runInitializers)(this,w),(0,G.__runInitializers)(this,L,U.RIG_MODE_NONE)),this.interaxialDistance=((0,G.__runInitializers)(this,Z),(0,G.__runInitializers)(this,F,void 0)),this.isStereoscopicSideBySide=((0,G.__runInitializers)(this,B),(0,G.__runInitializers)(this,k,void 0)),this.ignoreCameraMaxZ=((0,G.__runInitializers)(this,j),(0,G.__runInitializers)(this,q,!1)),this.customRenderTargets=((0,G.__runInitializers)(this,H),[]),this.outputRenderTarget=null,this.onViewMatrixChangedObservable=new K.Observable,this.onProjectionMatrixChangedObservable=new K.Observable,this.onAfterCheckInputsObservable=new K.Observable,this.onRestoreStateObservable=new K.Observable,this.isRigCamera=!1,this._hasMoved=!1,this._rigCameras=[],this._skipRendering=!1,this._projectionMatrix=new Q.Matrix,this._postProcesses=[],this._activeMeshes=new Y.SmartArray(256),this._globalPosition=Q.Vector3.Zero(),this._computedViewMatrix=Q.Matrix.Identity(),this._doNotComputeProjectionMatrix=!1,this._transformMatrix=Q.Matrix.Zero(),this._refreshFrustumPlanes=!0,this._absoluteRotation=Q.Quaternion.Identity(),this._isCamera=!0,this._isLeftCamera=!1,this._isRightCamera=!1,this.layerMask=this.getScene().defaultCameraLayerMask,this.getScene().addCamera(this),s&&!this.getScene().activeCamera&&(this.getScene().activeCamera=this),this.position=t,this.renderPassId=this.getScene().getEngine().createRenderPassId(`Camera ${e}`)}storeState(){return this._stateStored=!0,this._storedFov=this.fov,this}hasStateStored(){return!!this._stateStored}_restoreStateValues(){return!!this._stateStored&&(this.fov=this._storedFov,!0)}restoreState(){return!!this._restoreStateValues()&&(this.onRestoreStateObservable.notifyObservers(this),!0)}getClassName(){return"Camera"}toString(e){let t="Name: "+this.name;if(t+=", type: "+this.getClassName(),this.animations)for(let i=0;i<this.animations.length;i++)t+=", animation[0]: "+this.animations[i].toString(e);return t}applyVerticalCorrection(){let e=this.absoluteRotation.toEulerAngles();this.projectionPlaneTilt=this._scene.useRightHandedSystem?-e.x:e.x}get globalPosition(){return this._globalPosition}getActiveMeshes(){return this._activeMeshes}isActiveMesh(e){return -1!==this._activeMeshes.indexOf(e)}isReady(e=!1){if(e){for(let e of this._postProcesses)if(e&&!e.isReady())return!1}return super.isReady(e)}_initCache(){super._initCache(),this._cache.position=new Q.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.upVector=new Q.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.mode=void 0,this._cache.minZ=void 0,this._cache.maxZ=void 0,this._cache.fov=void 0,this._cache.fovMode=void 0,this._cache.aspectRatio=void 0,this._cache.orthoLeft=void 0,this._cache.orthoRight=void 0,this._cache.orthoBottom=void 0,this._cache.orthoTop=void 0,this._cache.obliqueAngle=void 0,this._cache.obliqueLength=void 0,this._cache.obliqueOffset=void 0,this._cache.renderWidth=void 0,this._cache.renderHeight=void 0}_updateCache(e){e||super._updateCache(),this._cache.position.copyFrom(this.position),this._cache.upVector.copyFrom(this.upVector)}_isSynchronized(){return this._isSynchronizedViewMatrix()&&this._isSynchronizedProjectionMatrix()}_isSynchronizedViewMatrix(){return!!super._isSynchronized()&&this._cache.position.equals(this.position)&&this._cache.upVector.equals(this.upVector)&&this.isSynchronizedWithParent()}_isSynchronizedProjectionMatrix(){let e=this.ignoreCameraMaxZ?0:this.maxZ,t=this._cache.mode===this.mode&&this._cache.minZ===this.minZ&&this._cache.maxZ===e;if(!t)return!1;let i=this.getEngine();return this.mode===U.PERSPECTIVE_CAMERA?t=this._cache.fov===this.fov&&this._cache.fovMode===this.fovMode&&this._cache.aspectRatio===i.getAspectRatio(this)&&this._cache.projectionPlaneTilt===this.projectionPlaneTilt:(t=this._cache.orthoLeft===this.orthoLeft&&this._cache.orthoRight===this.orthoRight&&this._cache.orthoBottom===this.orthoBottom&&this._cache.orthoTop===this.orthoTop&&this._cache.renderWidth===i.getRenderWidth()&&this._cache.renderHeight===i.getRenderHeight(),this.oblique&&(t=t&&this._cache.obliqueAngle===this.oblique.angle&&this._cache.obliqueLength===this.oblique.length&&this._cache.obliqueOffset===this.oblique.offset)),t}attachControl(e,t){}detachControl(e){}update(){this._hasMoved=!1,this._checkInputs(),this.cameraRigMode!==U.RIG_MODE_NONE&&this._updateRigCameras(),this.getViewMatrix(),this.getProjectionMatrix()}_checkInputs(){this.onAfterCheckInputsObservable.notifyObservers(this)}get rigCameras(){return this._rigCameras}get rigPostProcess(){return this._rigPostProcess}_getFirstPostProcess(){for(let e=0;e<this._postProcesses.length;e++)if(null!==this._postProcesses[e])return this._postProcesses[e];return null}_cascadePostProcessesToRigCams(){let e=this._getFirstPostProcess();e&&e.markTextureDirty();for(let e=0,t=this._rigCameras.length;e<t;e++){let t=this._rigCameras[e],i=t._rigPostProcess;i?("pass"===i.getEffectName()&&(t.isIntermediate=0===this._postProcesses.length),t._postProcesses=this._postProcesses.slice(0).concat(i),i.markTextureDirty()):t._postProcesses=this._postProcesses.slice(0)}}attachPostProcess(e,t=null){return!e.isReusable()&&this._postProcesses.indexOf(e)>-1?(J.Logger.Error("You're trying to reuse a post process not defined as reusable."),0):(null==t||t<0?this._postProcesses.push(e):null===this._postProcesses[t]?this._postProcesses[t]=e:this._postProcesses.splice(t,0,e),this._cascadePostProcessesToRigCams(),this._scene.prePassRenderer&&this._scene.prePassRenderer.markAsDirty(),this._postProcesses.indexOf(e))}detachPostProcess(e){let t=this._postProcesses.indexOf(e);-1!==t&&(this._postProcesses[t]=null),this._scene.prePassRenderer&&this._scene.prePassRenderer.markAsDirty(),this._cascadePostProcessesToRigCams()}getWorldMatrix(){return this._isSynchronizedViewMatrix()||this.getViewMatrix(),this._worldMatrix}_getViewMatrix(){return Q.Matrix.Identity()}getViewMatrix(e){return!e&&this._isSynchronizedViewMatrix()||(this._hasMoved=!0,this.updateCache(),this._computedViewMatrix=this._getViewMatrix(),this._currentRenderId=this.getScene().getRenderId(),this._childUpdateId++,this._refreshFrustumPlanes=!0,this._cameraRigParams&&this._cameraRigParams.vrPreViewMatrix&&this._computedViewMatrix.multiplyToRef(this._cameraRigParams.vrPreViewMatrix,this._computedViewMatrix),this.parent&&this.parent.onViewMatrixChangedObservable&&this.parent.onViewMatrixChangedObservable.notifyObservers(this.parent),this.onViewMatrixChangedObservable.notifyObservers(this),this._computedViewMatrix.invertToRef(this._worldMatrix),this._worldMatrix.getTranslationToRef(this._globalPosition)),this._computedViewMatrix}freezeProjectionMatrix(e){this._doNotComputeProjectionMatrix=!0,void 0!==e&&(this._projectionMatrix=e)}unfreezeProjectionMatrix(){this._doNotComputeProjectionMatrix=!1}getProjectionMatrix(e){if(this._doNotComputeProjectionMatrix||!e&&this._isSynchronizedProjectionMatrix())return this._projectionMatrix;let t=this.ignoreCameraMaxZ?0:this.maxZ;this._cache.mode=this.mode,this._cache.minZ=this.minZ,this._cache.maxZ=t,this._refreshFrustumPlanes=!0;let i=this.getEngine(),s=this.getScene(),a=i.useReverseDepthBuffer;if(this.mode===U.PERSPECTIVE_CAMERA)this._cache.fov=this.fov,this._cache.fovMode=this.fovMode,this._cache.aspectRatio=i.getAspectRatio(this),this._cache.projectionPlaneTilt=this.projectionPlaneTilt,this.minZ<=0&&(this.minZ=.1),(s.useRightHandedSystem?Q.Matrix.PerspectiveFovRHToRef:Q.Matrix.PerspectiveFovLHToRef)(this.fov,i.getAspectRatio(this),a?t:this.minZ,a?this.minZ:t,this._projectionMatrix,this.fovMode===U.FOVMODE_VERTICAL_FIXED,i.isNDCHalfZRange,this.projectionPlaneTilt,a);else{let e=i.getRenderWidth()/2,r=i.getRenderHeight()/2;s.useRightHandedSystem?this.oblique?Q.Matrix.ObliqueOffCenterRHToRef(this.orthoLeft??-e,this.orthoRight??e,this.orthoBottom??-r,this.orthoTop??r,a?t:this.minZ,a?this.minZ:t,this.oblique.length,this.oblique.angle,this._computeObliqueDistance(this.oblique.offset),this._projectionMatrix,i.isNDCHalfZRange):Q.Matrix.OrthoOffCenterRHToRef(this.orthoLeft??-e,this.orthoRight??e,this.orthoBottom??-r,this.orthoTop??r,a?t:this.minZ,a?this.minZ:t,this._projectionMatrix,i.isNDCHalfZRange):this.oblique?Q.Matrix.ObliqueOffCenterLHToRef(this.orthoLeft??-e,this.orthoRight??e,this.orthoBottom??-r,this.orthoTop??r,a?t:this.minZ,a?this.minZ:t,this.oblique.length,this.oblique.angle,this._computeObliqueDistance(this.oblique.offset),this._projectionMatrix,i.isNDCHalfZRange):Q.Matrix.OrthoOffCenterLHToRef(this.orthoLeft??-e,this.orthoRight??e,this.orthoBottom??-r,this.orthoTop??r,a?t:this.minZ,a?this.minZ:t,this._projectionMatrix,i.isNDCHalfZRange),this._cache.orthoLeft=this.orthoLeft,this._cache.orthoRight=this.orthoRight,this._cache.orthoBottom=this.orthoBottom,this._cache.orthoTop=this.orthoTop,this._cache.obliqueAngle=this.oblique?.angle,this._cache.obliqueLength=this.oblique?.length,this._cache.obliqueOffset=this.oblique?.offset,this._cache.renderWidth=i.getRenderWidth(),this._cache.renderHeight=i.getRenderHeight()}return this.onProjectionMatrixChangedObservable.notifyObservers(this),this._projectionMatrix}getTransformationMatrix(){return this._computedViewMatrix.multiplyToRef(this._projectionMatrix,this._transformMatrix),this._transformMatrix}_computeObliqueDistance(e){return(this.radius||(this.target?Q.Vector3.Distance(this.position,this.target):this.position.length()))+e}_updateFrustumPlanes(){this._refreshFrustumPlanes&&(this.getTransformationMatrix(),this._frustumPlanes?es.Frustum.GetPlanesToRef(this._transformMatrix,this._frustumPlanes):this._frustumPlanes=es.Frustum.GetPlanes(this._transformMatrix),this._refreshFrustumPlanes=!1)}isInFrustum(e,t=!1){if(this._updateFrustumPlanes(),!t||!(this.rigCameras.length>0))return e.isInFrustum(this._frustumPlanes);{let t=!1;for(let i of this.rigCameras)i._updateFrustumPlanes(),t=t||e.isInFrustum(i._frustumPlanes);return t}}isCompletelyInFrustum(e){return this._updateFrustumPlanes(),e.isCompletelyInFrustum(this._frustumPlanes)}getForwardRay(e=100,t,i){throw(0,et._WarnImport)("Ray")}getForwardRayToRef(e,t=100,i,s){throw(0,et._WarnImport)("Ray")}dispose(e,t=!1){for(this.onViewMatrixChangedObservable.clear(),this.onProjectionMatrixChangedObservable.clear(),this.onAfterCheckInputsObservable.clear(),this.onRestoreStateObservable.clear(),this.inputs&&this.inputs.clear(),this.getScene().stopAnimation(this),this.getScene().removeCamera(this);this._rigCameras.length>0;){let e=this._rigCameras.pop();e&&e.dispose()}if(this._parentContainer){let e=this._parentContainer.cameras.indexOf(this);e>-1&&this._parentContainer.cameras.splice(e,1),this._parentContainer=null}if(this._rigPostProcess)this._rigPostProcess.dispose(this),this._rigPostProcess=null,this._postProcesses.length=0;else if(this.cameraRigMode!==U.RIG_MODE_NONE)this._rigPostProcess=null,this._postProcesses.length=0;else{let e=this._postProcesses.length;for(;--e>=0;){let t=this._postProcesses[e];t&&t.dispose(this)}}let i=this.customRenderTargets.length;for(;--i>=0;)this.customRenderTargets[i].dispose();this.customRenderTargets.length=0,this._activeMeshes.dispose(),this.getScene().getEngine().releaseRenderPassId(this.renderPassId),super.dispose(e,t)}get isLeftCamera(){return this._isLeftCamera}get isRightCamera(){return this._isRightCamera}get leftCamera(){return this._rigCameras.length<1?null:this._rigCameras[0]}get rightCamera(){return this._rigCameras.length<2?null:this._rigCameras[1]}getLeftTarget(){return this._rigCameras.length<1?null:this._rigCameras[0].getTarget()}getRightTarget(){return this._rigCameras.length<2?null:this._rigCameras[1].getTarget()}setCameraRigMode(e,t){if(this.cameraRigMode!==e){for(;this._rigCameras.length>0;){let e=this._rigCameras.pop();e&&e.dispose()}if(this.cameraRigMode=e,this._cameraRigParams={},this._cameraRigParams.interaxialDistance=t.interaxialDistance||.0637,this._cameraRigParams.stereoHalfAngle=this._cameraRigParams.interaxialDistance/.0637*(Math.PI/180),this.cameraRigMode!==U.RIG_MODE_NONE){let e=this.createRigCamera(this.name+"_L",0);e&&(e._isLeftCamera=!0);let t=this.createRigCamera(this.name+"_R",1);t&&(t._isRightCamera=!0),e&&t&&(this._rigCameras.push(e),this._rigCameras.push(t))}this._setRigMode(t),this._cascadePostProcessesToRigCams(),this.update()}}_setRigMode(e){}_getVRProjectionMatrix(){return Q.Matrix.PerspectiveFovLHToRef(this._cameraRigParams.vrMetrics.aspectRatioFov,this._cameraRigParams.vrMetrics.aspectRatio,this.minZ,this.ignoreCameraMaxZ?0:this.maxZ,this._cameraRigParams.vrWorkMatrix,!0,this.getEngine().isNDCHalfZRange),this._cameraRigParams.vrWorkMatrix.multiplyToRef(this._cameraRigParams.vrHMatrix,this._projectionMatrix),this._projectionMatrix}setCameraRigParameter(e,t){this._cameraRigParams||(this._cameraRigParams={}),this._cameraRigParams[e]=t,"interaxialDistance"===e&&(this._cameraRigParams.stereoHalfAngle=t/.0637*(Math.PI/180))}createRigCamera(e,t){return null}_updateRigCameras(){for(let e=0;e<this._rigCameras.length;e++)this._rigCameras[e].minZ=this.minZ,this._rigCameras[e].maxZ=this.ignoreCameraMaxZ?0:this.maxZ,this._rigCameras[e].fov=this.fov,this._rigCameras[e].upVector.copyFrom(this.upVector);this.cameraRigMode===U.RIG_MODE_STEREOSCOPIC_ANAGLYPH&&(this._rigCameras[0].viewport=this._rigCameras[1].viewport=this.viewport)}_setupInputs(){}serialize(){let e=er.SerializationHelper.Serialize(this);return e.uniqueId=this.uniqueId,e.type=this.getClassName(),this.parent&&this.parent._serializeAsParent(e),this.inputs&&this.inputs.serialize(e),er.SerializationHelper.AppendSerializedAnimations(this,e),e.ranges=this.serializeAnimationRanges(),e.isEnabled=this.isEnabled(),e}clone(e,t=null){let i=er.SerializationHelper.Clone(U.GetConstructorFromName(this.getClassName(),e,this.getScene(),this.interaxialDistance,this.isStereoscopicSideBySide),this);return i.name=e,i.parent=t,this.onClonedObservable.notifyObservers(i),i}getDirection(e){let t=Q.Vector3.Zero();return this.getDirectionToRef(e,t),t}get absoluteRotation(){return this.getWorldMatrix().decompose(void 0,this._absoluteRotation),this._absoluteRotation}getDirectionToRef(e,t){Q.Vector3.TransformNormalToRef(e,this.getWorldMatrix(),t)}static GetConstructorFromName(e,t,i,s=0,a=!0){let r=$.Node.Construct(e,t,i,{interaxial_distance:s,isStereoscopicSideBySide:a});return r||(()=>U._CreateDefaultParsedCamera(t,i))}computeWorldMatrix(){return this.getWorldMatrix()}_calculateHandednessMultiplier(){let e=this.getScene().useRightHandedSystem?-1:1;return this.parent&&0>this.parent._getWorldMatrixDeterminant()&&(e*=-1),e}},W="function"==typeof Symbol&&Symbol.metadata?Object.create(R[Symbol.metadata]??null):void 0,t=[(0,X.serializeAsVector3)("position")],i=[(0,X.serializeAsVector3)("upVector")],s=[(0,X.serialize)()],a=[(0,X.serialize)()],r=[(0,X.serialize)()],n=[(0,X.serialize)()],o=[(0,X.serialize)()],h=[(0,X.serialize)()],l=[(0,X.serialize)()],_=[(0,X.serialize)()],c=[(0,X.serialize)()],d=[(0,X.serialize)()],u=[(0,X.serialize)()],g=[(0,X.serialize)()],m=[(0,X.serialize)()],p=[(0,X.serialize)()],f=[(0,X.serialize)()],b=[(0,X.serialize)()],(0,G.__esDecorate)(U,null,s,{kind:"getter",name:"orthoLeft",static:!1,private:!1,access:{has:e=>"orthoLeft"in e,get:e=>e.orthoLeft},metadata:W},null,v),(0,G.__esDecorate)(U,null,a,{kind:"getter",name:"orthoRight",static:!1,private:!1,access:{has:e=>"orthoRight"in e,get:e=>e.orthoRight},metadata:W},null,v),(0,G.__esDecorate)(U,null,r,{kind:"getter",name:"orthoBottom",static:!1,private:!1,access:{has:e=>"orthoBottom"in e,get:e=>e.orthoBottom},metadata:W},null,v),(0,G.__esDecorate)(U,null,n,{kind:"getter",name:"orthoTop",static:!1,private:!1,access:{has:e=>"orthoTop"in e,get:e=>e.orthoTop},metadata:W},null,v),(0,G.__esDecorate)(U,null,c,{kind:"getter",name:"inertia",static:!1,private:!1,access:{has:e=>"inertia"in e,get:e=>e.inertia},metadata:W},null,v),(0,G.__esDecorate)(U,null,d,{kind:"getter",name:"mode",static:!1,private:!1,access:{has:e=>"mode"in e,get:e=>e.mode},metadata:W},null,v),(0,G.__esDecorate)(null,null,t,{kind:"field",name:"_position",static:!1,private:!1,access:{has:e=>"_position"in e,get:e=>e._position,set:(e,t)=>{e._position=t}},metadata:W},M,C),(0,G.__esDecorate)(null,null,i,{kind:"field",name:"_upVector",static:!1,private:!1,access:{has:e=>"_upVector"in e,get:e=>e._upVector,set:(e,t)=>{e._upVector=t}},metadata:W},P,S),(0,G.__esDecorate)(null,null,o,{kind:"field",name:"fov",static:!1,private:!1,access:{has:e=>"fov"in e,get:e=>e.fov,set:(e,t)=>{e.fov=t}},metadata:W},x,D),(0,G.__esDecorate)(null,null,h,{kind:"field",name:"projectionPlaneTilt",static:!1,private:!1,access:{has:e=>"projectionPlaneTilt"in e,get:e=>e.projectionPlaneTilt,set:(e,t)=>{e.projectionPlaneTilt=t}},metadata:W},I,E),(0,G.__esDecorate)(null,null,l,{kind:"field",name:"minZ",static:!1,private:!1,access:{has:e=>"minZ"in e,get:e=>e.minZ,set:(e,t)=>{e.minZ=t}},metadata:W},O,y),(0,G.__esDecorate)(null,null,_,{kind:"field",name:"maxZ",static:!1,private:!1,access:{has:e=>"maxZ"in e,get:e=>e.maxZ,set:(e,t)=>{e.maxZ=t}},metadata:W},A,N),(0,G.__esDecorate)(null,null,u,{kind:"field",name:"layerMask",static:!1,private:!1,access:{has:e=>"layerMask"in e,get:e=>e.layerMask,set:(e,t)=>{e.layerMask=t}},metadata:W},V,T),(0,G.__esDecorate)(null,null,g,{kind:"field",name:"fovMode",static:!1,private:!1,access:{has:e=>"fovMode"in e,get:e=>e.fovMode,set:(e,t)=>{e.fovMode=t}},metadata:W},z,w),(0,G.__esDecorate)(null,null,m,{kind:"field",name:"cameraRigMode",static:!1,private:!1,access:{has:e=>"cameraRigMode"in e,get:e=>e.cameraRigMode,set:(e,t)=>{e.cameraRigMode=t}},metadata:W},L,Z),(0,G.__esDecorate)(null,null,p,{kind:"field",name:"interaxialDistance",static:!1,private:!1,access:{has:e=>"interaxialDistance"in e,get:e=>e.interaxialDistance,set:(e,t)=>{e.interaxialDistance=t}},metadata:W},F,B),(0,G.__esDecorate)(null,null,f,{kind:"field",name:"isStereoscopicSideBySide",static:!1,private:!1,access:{has:e=>"isStereoscopicSideBySide"in e,get:e=>e.isStereoscopicSideBySide,set:(e,t)=>{e.isStereoscopicSideBySide=t}},metadata:W},k,j),(0,G.__esDecorate)(null,null,b,{kind:"field",name:"ignoreCameraMaxZ",static:!1,private:!1,access:{has:e=>"ignoreCameraMaxZ"in e,get:e=>e.ignoreCameraMaxZ,set:(e,t)=>{e.ignoreCameraMaxZ=t}},metadata:W},q,H),W&&Object.defineProperty(U,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:W}),U._CreateDefaultParsedCamera=(e,t)=>{throw(0,et._WarnImport)("UniversalCamera")},U.PERSPECTIVE_CAMERA=0,U.ORTHOGRAPHIC_CAMERA=1,U.FOVMODE_VERTICAL_FIXED=0,U.FOVMODE_HORIZONTAL_FIXED=1,U.RIG_MODE_NONE=0,U.RIG_MODE_STEREOSCOPIC_ANAGLYPH=10,U.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL=11,U.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED=12,U.RIG_MODE_STEREOSCOPIC_OVERUNDER=13,U.RIG_MODE_STEREOSCOPIC_INTERLACED=14,U.RIG_MODE_VR=20,U.RIG_MODE_CUSTOM=22,U.ForceAttachControlToAlwaysPreventDefault=!1,U);function eo(e,t){let i=e.type,s=en.GetConstructorFromName(i,e.name,t,e.interaxial_distance,e.isStereoscopicSideBySide),a=er.SerializationHelper.Parse(s,e,t);if(void 0!==e.parentId&&(a._waitingParentId=e.parentId),void 0!==e.parentInstanceIndex&&(a._waitingParentInstanceIndex=e.parentInstanceIndex),a.inputs&&(a.inputs.parse(e),a._setupInputs()),e.upVector&&(a.upVector=Q.Vector3.FromArray(e.upVector)),a.setPosition&&(a.position.copyFromFloats(0,0,0),a.setPosition(Q.Vector3.FromArray(e.position))),e.target&&a.setTarget&&a.setTarget(Q.Vector3.FromArray(e.target)),e.cameraRigMode){let t=e.interaxial_distance?{interaxialDistance:e.interaxial_distance}:{};a.setCameraRigMode(e.cameraRigMode,t)}if(e.animations){for(let t=0;t<e.animations.length;t++){let i=e.animations[t],s=(0,ee.GetClass)("BABYLON.Animation");s&&a.animations.push(s.Parse(i))}$.Node.ParseAnimationRanges(a,e,t)}return e.autoAnimate&&t.beginAnimation(a,e.autoAnimateFrom,e.autoAnimateTo,e.autoAnimateLoop,e.autoAnimateSpeed||1),void 0!==e.isEnabled&&a.setEnabled(e.isEnabled),a}let eh=!1;e.s(["Camera",0,en,"RegisterCamera",0,function(){eh||(eh=!0,en.Parse=eo)}])}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,98207,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 o={...r};if(t._ShouldSkipRequestModifications(e))return{url:e,headers:o};for(let e in t.CustomRequestHeaders){let r=t.CustomRequestHeaders[e];r&&(o[e]=r)}let i={setRequestHeader:(e,t)=>{o[e]=t}};for(let r of t.CustomRequestModifiers){if(t._ShouldSkipRequestModifications(e))break;let o=r(i,e);"string"==typeof o&&(e=o)}return{url:e,headers:o}}static async FetchAsync(e,r={}){let o=r.method??"GET";if("u">typeof fetch){let{url:i,headers:s}=t._CollectCustomizations(t._CleanUrl(e),r.headers??{});return await fetch(i,{method:o,headers:s,body:r.body??void 0})}return await new Promise((i,s)=>{let n=new t;n.responseType="arraybuffer",n.addEventListener("readystatechange",()=>{if(4===n.readyState)if(n.status>=200&&n.status<300){let e="u">typeof Headers?new Headers:void 0,t=n.getResponseHeader("Content-Type");t&&e&&e.set("Content-Type",t),"u">typeof Response?i(new Response(n.response,{status:n.status,statusText:n.statusText,headers:e})):i({ok:!0,status:n.status,statusText:n.statusText,headers:{get:e=>n.getResponseHeader(e)},arrayBuffer:async()=>await Promise.resolve(n.response)})}else s(Error(`HTTP ${n.status} loading '${n.requestURL}': ${n.statusText}`))}),n.open(o,e,r.headers),n.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,o){let{url:i,headers:s}=t._CollectCustomizations(r,o);for(let r in this._requestURL=t._CleanUrl(i),this._xhr.open(e,this._requestURL,!0),s)this._xhr.setRequestHeader(r,s[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])},16347,e=>{"use strict";class t{static _CheckLimit(e,r){let o=t._LogLimitOutputs[e];return o?o.current++:(o={limit:r,current:1},t._LogLimitOutputs[e]=o),o.current<=o.limit}static _GenerateLimitMessage(e,r=1){let o=t._LogLimitOutputs[e];if(!o||!t.MessageLimitReached)return;let i=this._Levels[r];o.current===o.limit&&t[i.name](t.MessageLimitReached.replace(/%LIMIT%/g,""+o.limit).replace(/%TYPE%/g,i.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,o){let i=Array.isArray(r)?r[0]:r;if(void 0!==o&&!t._CheckLimit(i,o))return;let s=t._FormatMessage(i),n=this._Levels[e],a=Array.isArray(r)?r.slice(1):[];n.logFunc&&n.logFunc("BJS - "+s,...a);let l=`<div style='color:${n.color}'>${s}</div><br>`;t._AddLogEntry(l),t._GenerateLimitMessage(i,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])},80065,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)})}])},36460,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}])},1229,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),o=r.length,i=new Uint8Array(new ArrayBuffer(o));for(let e=0;e<o;e++)i[e]=r.charCodeAt(e);return i.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,o,i,s,n,a,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c="",u=0;for(;u<e.length;)t=e[u++],r=u<e.length?e[u++]:NaN,o=u<e.length?e[u++]:NaN,i=t>>2,s=(3&t)<<4|r>>4,n=(15&r)<<2|o>>6,a=63&o,isNaN(r)?n=a=64:isNaN(o)&&(a=64),c+=l.charAt(i)+l.charAt(s)+l.charAt(n)+l.charAt(a);return c}(t)}])},6563,e=>{"use strict";let t=null;function r(){if(t)return t;let e=new ArrayBuffer(4),r=new Float32Array(e),o=new Uint32Array(e),i=new Uint32Array(512),s=new Uint32Array(512);for(let e=0;e<256;++e){let t=e-127;t<-24?(i[e]=0,i[256|e]=32768,s[e]=24,s[256|e]=24):t<-14?(i[e]=1024>>-t-14,i[256|e]=1024>>-t-14|32768,s[e]=-t-1,s[256|e]=-t-1):t<=15?(i[e]=t+15<<10,i[256|e]=t+15<<10|32768,s[e]=13,s[256|e]=13):t<128?(i[e]=31744,i[256|e]=64512,s[e]=24,s[256|e]=24):(i[e]=31744,i[256|e]=64512,s[e]=13,s[256|e]=13)}let n=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,n[e]=t|r}for(let e=1024;e<2048;++e)n[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:o,baseTable:i,shiftTable:s,mantissaTable:n,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 o=t.uint32View[0],i=o>>23&511;return t.baseTable[i]+((8388607&o)>>t.shiftTable[i])}])},24340,4064,49165,e=>{"use strict";class t{}t.FilesToLoad={},e.s(["FilesInputStore",0,t],24340),e.s(["RetryStrategy",0,class{static ExponentialBackoff(e=3,t=500){return(r,o,i)=>0!==o.status||i>=e||-1!==r.indexOf("file:")?-1:Math.pow(2,i)*t}}],4064);class r extends Error{}r._setPrototypeOf=Object.setPrototypeOf||((e,t)=>(e.__proto__=t,e));class o extends r{constructor(e,t,i){super(e),this.errorCode=t,this.innerError=i,this.name="RuntimeError",r._setPrototypeOf(this,o.prototype)}}e.s(["BaseError",0,r,"ErrorCodes",0,{MeshInvalidPositionsError:0,UnsupportedTextureError:1e3,GLTFLoaderUnexpectedMagicError:2e3,SceneLoaderError:3e3,LoadFileError:4e3,RequestFileError:4001,ReadFileError:4002},"RuntimeError",0,o],49165)},83592,e=>{"use strict";var t=e.i(16347),r=e.i(6563);function o(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 i(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 s(e,t,i,s,n,a,l,c){let u=Array(s),f=Array(s);if(e instanceof Array){let r=t/4,o=i/4;for(let t=0;t<a;t+=s){for(let t=0;t<s;t++)u[t]=f[t]=e[r+t];c(f,t);for(let t=0;t<s;t++)u[t]!==f[t]&&(e[r+t]=f[t]);r+=o}}else{let d=ArrayBuffer.isView(e)?new DataView(e.buffer,e.byteOffset,e.byteLength):new DataView(e),g=o(n);for(let e=0;e<a;e+=s){for(let e=0,o=t;e<s;e++,o+=g)u[e]=f[e]=function(e,t,o,i){switch(t){case 5120:{let t=e.getInt8(o);return i&&(t=Math.max(t/127,-1)),t}case 5121:{let t=e.getUint8(o);return i&&(t/=255),t}case 5122:{let t=e.getInt16(o,!0);return i&&(t=Math.max(t/32767,-1)),t}case 5123:{let t=e.getUint16(o,!0);return i&&(t/=65535),t}case 5131:return(0,r.FromHalfFloat)(e.getUint16(o,!0));case 5124:return e.getInt32(o,!0);case 5125:return e.getUint32(o,!0);case 5126:return e.getFloat32(o,!0);default:throw Error(`Invalid component type ${t}`)}}(d,n,o,l);c(f,e);for(let e=0,o=t;e<s;e++,o+=g)u[e]!==f[e]&&function(e,t,o,i,s){switch(t){case 5120:i&&(s=Math.round(127*s)),e.setInt8(o,s);break;case 5121:i&&(s=Math.round(255*s)),e.setUint8(o,s);break;case 5122:i&&(s=Math.round(32767*s)),e.setInt16(o,s,!0);break;case 5123:i&&(s=Math.round(65535*s)),e.setUint16(o,s,!0);break;case 5131:e.setUint16(o,(0,r.ToHalfFloat)(s),!0);break;case 5124:e.setInt32(o,s,!0);break;case 5125:e.setUint32(o,s,!0);break;case 5126:e.setFloat32(o,s,!0);break;default:throw Error(`Invalid component type ${t}`)}}(d,n,o,l,f[e]);t+=i}}}e.s(["CopyFloatData",0,function(e,r,i,n,a,l,c,u){let f=r*o(i),d=c*r;if(u.length!==d)throw Error("Output length is not valid");if(5126!==i||a!==f)return void s(e,n,a,r,i,d,l,(e,t)=>{for(let o=0;o<r;o++)u[t+o]=e[o]});if(e instanceof Array){let t=n/4;u.set(e,t)}else if(ArrayBuffer.isView(e)){let r=e.byteOffset+n;if((3&r)!=0){t.Logger.Warn("Float array must be aligned to 4-bytes border"),u.set(new Float32Array(e.buffer.slice(r,r+d*Float32Array.BYTES_PER_ELEMENT)));return}let o=new Float32Array(e.buffer,r,d);u.set(o)}else{let t=new Float32Array(e,n,d);u.set(t)}},"EnumerateFloatValues",0,s,"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,i,n,a,l,c,u){let f=r*o(i),d=c*r;if(5126!==i||a!==f){let t=new Float32Array(d);return s(e,n,a,r,i,d,l,(e,o)=>{for(let i=0;i<r;i++)t[o+i]=e[i]}),t}if(!(e instanceof Array||e instanceof Float32Array)||0!==n||e.length!==d)if(e instanceof Array){let t=n/4;return e.slice(t,t+d)}else{if(!ArrayBuffer.isView(e))return new Float32Array(e,n,d);let r=e.byteOffset+n;return((3&r)!=0&&(t.Logger.Warn("Float array must be aligned to 4-bytes border"),u=!0),u)?new Float32Array(e.buffer.slice(r,r+d*Float32Array.BYTES_PER_ELEMENT)):new Float32Array(e.buffer,r,d)}return u?e.slice():e},"GetTypeByteLength",0,o,"GetTypedArrayConstructor",0,i,"GetTypedArrayData",0,function(e,r,n,a,l,c,u){let f,d=o(n),g=i(n),p=c*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,o=l/4;if(t+(c-1)*o+r>e.length)throw Error("Last accessed index is out of bounds.");if(o<r)throw Error("Data stride cannot be smaller than the component size.");if(o!==r){let t=new g(p);return s(e,a,l,r,n,p,!1,(e,o)=>{for(let i=0;i<r;i++)t[o+i]=e[i]}),t}return new g(e.slice(t,t+p))}let h=a;if(ArrayBuffer.isView(e)?(f=e.buffer,h+=e.byteOffset):f=e,h+(c-1)*l+r*d>f.byteLength)throw Error("Last accessed byte is out of bounds.");let m=r*d;if(l<m)throw Error("Byte stride cannot be smaller than the component's byte size.");if(l!==m){let e=new g(p),t=new Uint8Array(f,h),o=new Uint8Array(e.buffer),i=r*d;for(let e=0,r=0,s=0;e<c;e++,r+=l,s+=i)o.set(t.subarray(r,r+i),s);return e}return(1!==d&&(h&d-1)!=0&&(t.Logger.Warn("Array must be aligned to border of element size. Data will be copied."),u=!0),u)?new g(f.slice(h,h+p*d)):new g(f,h,p)}])},14958,e=>{"use strict";let t;var r=e.i(98207),o=e.i(36460),i=e.i(3864),s=e.i(24340),n=e.i(4064),a=e.i(49165),l=e.i(1229),c=e.i(23003),u=e.i(98955),f=e.i(55644),d=e.i(16347),g=e.i(44816),p=e.i(83592);let h=new RegExp(/^data:([^,]+\/[^,]+)?;base64,/i);class m extends a.RuntimeError{constructor(e,t){super(e,a.ErrorCodes.LoadFileError),this.name="LoadFileError",a.BaseError._setPrototypeOf(this,m.prototype),t instanceof r.WebRequest?this.request=t:this.file=t}}class y extends a.RuntimeError{constructor(e,t){super(e,a.ErrorCodes.RequestFileError),this.request=t,this.name="RequestFileError",a.BaseError._setPrototypeOf(this,y.prototype)}}class v extends a.RuntimeError{constructor(e,t){super(e,a.ErrorCodes.ReadFileError),this.file=t,this.name="ReadFileError",a.BaseError._setPrototypeOf(this,v.prototype)}}let b={DefaultRetryStrategy:n.RetryStrategy.ExponentialBackoff(),BaseUrl:"",CorsBehavior:"anonymous",PreprocessUrl:e=>e,ScriptBaseUrl:"",ScriptPreprocessUrl:e=>e,CleanUrl:e=>e=e.replace(/#/gm,"%23")},P=(e,t)=>{if((!e||0!==e.indexOf("data:"))&&b.CorsBehavior)if("string"==typeof b.CorsBehavior||b.CorsBehavior instanceof String)t.crossOrigin=b.CorsBehavior;else{let r=b.CorsBehavior(e);r&&(t.crossOrigin=r)}},A=(e,t,o,i,n="",a,u=c.EngineStore.LastCreatedEngine)=>{let f;if("u"<typeof HTMLImageElement&&!u?._features.forceBitmapOverHTMLImageElement)return o("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,p.GetBlobBufferSource)(e),f=URL.createObjectURL(new Blob([t],{type:n})),d=!0}else f=`data:${n};base64,`+(0,l.EncodeArrayBufferToBase64)(e);else e instanceof Blob?(f=URL.createObjectURL(e),d=!0):(f=b.CleanUrl(e),f=b.PreprocessUrl(f));let g=t=>{if(o){let r=f||e.toString();o(`Error while trying to load image: ${0===r.indexOf("http")||r.length<=128?r:r.slice(0,128)+"..."}`,t)}};if(u?._features.forceBitmapOverHTMLImageElement)return U(f,r=>{u.createImageBitmap(new Blob([r],{type:n}),{premultiplyAlpha:"none",colorSpaceConversion:"none",...a}).then(e=>{t(e),d&&URL.revokeObjectURL(f)}).catch(t=>{o&&o("Error while trying to load image: "+e,t)})},void 0,i||void 0,!0,(e,t)=>{g(t)}),null;let h=new Image;!1;P(f,h);let m=[],y=()=>{for(let e of m)e.target.removeEventListener(e.name,e.handler);m.length=0};for(let e of(m.push({target:h,name:"load",handler:()=>{y(),t(h),d&&h.src&&URL.revokeObjectURL(h.src)}}),m.push({target:h,name:"error",handler:e=>{y(),g(e),d&&h.src&&URL.revokeObjectURL(h.src)}}),m.push({target:document,name:"securitypolicyviolation",handler:e=>{if(e.blockedURI!==h.src||"report"===e.disposition)return;y();let t=Error(`CSP violation of policy ${e.effectiveDirective} ${e.blockedURI}. Current policy is ${e.originalPolicy}`);c.EngineStore.UseFallbackTexture=!1,g(t),d&&h.src&&URL.revokeObjectURL(h.src),h.src=""}}),m))e.target.addEventListener(e.name,e.handler);let v="blob:"===f.substring(0,5),A="data:"===f.substring(0,5),C=()=>{v||A||!r.WebRequest.IsCustomRequestAvailable?h.src=f:U(f,(e,t,r)=>{let o=new Blob([e],{type:!n&&r?r:n}),i=URL.createObjectURL(o);d=!0,h.src=i},void 0,i||void 0,!0,(e,t)=>{g(t)})};if(!v&&!A&&i&&i.enableTexturesOffline)i.open(()=>{i&&i.loadImage(f,h)},C);else{if(-1!==f.indexOf("file:")){let e=decodeURIComponent(f.substring(5).toLowerCase());if(s.FilesInputStore.FilesToLoad[e]&&"u">typeof URL){try{let t;try{t=URL.createObjectURL(s.FilesInputStore.FilesToLoad[e])}catch(r){t=URL.createObjectURL(s.FilesInputStore.FilesToLoad[e])}h.src=t,d=!0}catch(e){h.src=""}return h}}C()}return h},C=(e,t,r,o,s)=>{let n=new FileReader,a={onCompleteObservable:new i.Observable,abort:()=>n.abort()};return n.onloadend=()=>a.onCompleteObservable.notifyObservers(a),s&&(n.onerror=()=>{s(new v(`Unable to read ${e.name}`,e))}),n.onload=e=>{t(e.target.result)},r&&(n.onprogress=r),o?n.readAsArrayBuffer(e):n.readAsText(e),a},U=(e,t,r,o,n,a,l)=>{if(e.name)return C(e,t,r,n,a?e=>{a(void 0,e)}:void 0);if(-1!==e.indexOf("file:")){let o=decodeURIComponent(e.substring(5).toLowerCase());0===o.indexOf("./")&&(o=o.substring(2));let i=s.FilesInputStore.FilesToLoad[o];if(i)return C(i,t,r,n,a?e=>a(void 0,new m(e.message,e.file)):void 0)}let{match:c,type:u}=T(e);if(c){let r={onCompleteObservable:new i.Observable,abort:()=>()=>{}};try{let r=n?x(e):E(e);t(r,void 0,u)}catch(e){a?a(void 0,e):d.Logger.Error(e.message||"Failed to parse the Data URL")}return g.TimingTools.SetImmediate(()=>{r.onCompleteObservable.notifyObservers(r)}),r}return K(e,(e,r)=>{t(e,r?.responseURL,r?.getResponseHeader("content-type"))},r,o,n,a?e=>{a(e.request,new m(e.message,e.request))}:void 0,l)},K=(e,t,s,n,a,l,u)=>{null!==n&&(n??(n=c.EngineStore.LastCreatedScene?.offlineProvider)),e=b.CleanUrl(e),e=b.PreprocessUrl(e);let f=b.BaseUrl+e,g=!1,p={onCompleteObservable:new i.Observable,abort:()=>g=!0},h=()=>{let e,i=new r.WebRequest,n=null,c=()=>{i&&(s&&i.removeEventListener("progress",s),e&&i.removeEventListener("readystatechange",e),i.removeEventListener("loadend",h))},h=()=>{c(),p.onCompleteObservable.notifyObservers(p),p.onCompleteObservable.clear(),s=void 0,e=null,h=null,l=void 0,u=void 0,t=void 0};p.abort=()=>{g=!0,h&&h(),i&&i.readyState!==(XMLHttpRequest.DONE||4)&&i.abort(),null!==n&&(clearTimeout(n),n=null),i=null};let m=e=>{let t=e.message||"Unknown error";l&&i?l(new y(t,i)):d.Logger.Error(t)},v=d=>{if(i){if(i.open("GET",f),u)try{u(i)}catch(e){m(e);return}a&&(i.responseType="arraybuffer"),s&&i.addEventListener("progress",s),h&&i.addEventListener("loadend",h),e=()=>{if(!g&&i&&i.readyState===(XMLHttpRequest.DONE||4)){if(e&&i.removeEventListener("readystatechange",e),i.status>=200&&i.status<300||0===i.status&&(!(0,o.IsWindowObjectExist)()||L())){let e=a?i.response:i.responseText;if(null!==e){try{t&&t(e,i)}catch(e){m(e)}return}}let s=b.DefaultRetryStrategy;if(s){let e=s(f,i,d);if(-1!==e){c(),i=new r.WebRequest,n=setTimeout(()=>v(d+1),e);return}}let u=new y("Error status: "+i.status+" "+i.statusText+" - Unable to load "+f,i);l&&l(u)}},i.addEventListener("readystatechange",e),i.send()}};v(0)};if(n&&n.enableSceneOffline&&!e.startsWith("blob:")){let r=e=>{e&&e.status>400?l&&l(e):h()};n.open(()=>{n&&n.loadFile(b.BaseUrl+e,e=>{!g&&t&&t(e),p.onCompleteObservable.notifyObservers(p)},s?e=>{!g&&s&&s(e)}:void 0,r,a)},r)}else h();return p},L=()=>"u">typeof location&&"file:"===location.protocol,F=e=>h.test(e),T=e=>{let t=h.exec(e);return null===t||0===t.length?{match:!1,type:""}:{match:!0,type:t[0].replace("data:","").replace(";base64,","")}};function x(e){return(0,l.DecodeBase64ToBinary)(e.split(",")[1])}let E=e=>(0,l.DecodeBase64ToString)(e.split(",")[1]),B=!1;e.s(["DecodeBase64UrlToBinary",0,x,"FileToolsOptions",0,b,"GetMimeType",0,e=>{let{match:t,type:r}=T(e);if(t)return r||void 0;let o=e.lastIndexOf(".");switch(e.substring(o+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,F,"LoadFile",0,U,"LoadFileError",0,m,"LoadImage",0,A,"ReadFile",0,C,"RegisterFileTools",0,function(){!B&&(B=!0,Object.defineProperty(t={DecodeBase64UrlToBinary:x,DecodeBase64UrlToString:E,DefaultRetryStrategy:b.DefaultRetryStrategy,BaseUrl:b.BaseUrl,CorsBehavior:b.CorsBehavior,PreprocessUrl:b.PreprocessUrl,IsBase64DataUrl:F,IsFileURL:L,LoadFile:U,LoadImage:A,ReadFile:C,RequestFile:K,SetCorsBehavior:P},"DefaultRetryStrategy",{get:function(){return b.DefaultRetryStrategy},set:function(e){b.DefaultRetryStrategy=e}}),Object.defineProperty(t,"BaseUrl",{get:function(){return b.BaseUrl},set:function(e){b.BaseUrl=e}}),Object.defineProperty(t,"PreprocessUrl",{get:function(){return b.PreprocessUrl},set:function(e){b.PreprocessUrl=e}}),Object.defineProperty(t,"CorsBehavior",{get:function(){return b.CorsBehavior},set:function(e){b.CorsBehavior=e}}),u.EngineFunctionContext.loadFile=U,u.EngineFunctionContext.loadImage=A,f._FunctionContainer.loadFile=U)},"RequestFile",0,K,"SetCorsBehavior",0,P])},85050,e=>{"use strict";let t={},r={};e.s(["_IsSideEffectImplemented",0,function(e){return!!e&&!e.__isSideEffectStub},"_MissingSideEffect",0,function(e,t,o=!1){let i=function(){if(o&&1){let o=`${e}.${t}`;r[o]||(r[o]=!0,console.warn(`[Babylon.js] ${o}() requires a side-effect import. See: https://doc.babylonjs.com/setup/treeshaking`))}};return i.__isSideEffectStub=!0,i},"_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.`}])},87627,e=>{"use strict";var t=e.i(36460);e.s(["PrecisionDate",0,class{static get Now(){return(0,t.IsWindowObjectExist)()&&window.performance&&window.performance.now?window.performance.now():Date.now()}}])},98955,55644,e=>{"use strict";var t=e.i(85050);let r={};function o(e,t,r,o){if(e){t?e.IS_NDC_HALF_ZRANGE="":delete e.IS_NDC_HALF_ZRANGE,r?e.USE_REVERSE_DEPTHBUFFER="":delete e.USE_REVERSE_DEPTHBUFFER,o?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"),o&&(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,o,"_LoadFile",0,function(e,o,i,s,n,a,l){let c=l||r.loadFile;if(!c)throw(0,t._WarnImport)("FileTools");return c(e,o,i,s,n,a)},"allocateAndCopyTypedBuffer",0,function(e,t,r=!1,o){switch(e){case 3:{let e=new Int8Array(t);return o&&e.set(new Int8Array(o)),e}case 0:{let e=new Uint8Array(t);return o&&e.set(new Uint8Array(o)),e}case 4:{let e=new Int16Array("number"!=typeof t?t:r?t/2:t);return o&&e.set(new Int16Array(o)),e}case 5:case 8:case 9:case 10:case 2:{let e=new Uint16Array("number"!=typeof t?t:r?t/2:t);return o&&e.set(new Uint16Array(o)),e}case 6:{let e=new Int32Array("number"!=typeof t?t:r?t/4:t);return o&&e.set(new Int32Array(o)),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 o&&e.set(new Uint32Array(o)),e}case 1:{let e=new Float32Array("number"!=typeof t?t:r?t/4:t);return o&&e.set(new Float32Array(o)),e}}let i=new Uint8Array(t);return o&&i.set(new Uint8Array(o)),i}],98955);class i{constructor(){this.children=[]}isValid(e){return!0}process(e,t,r){let o="";if(this.line){let r=this.line,i=t.processor;if(i){i.lineProcessor&&(r=i.lineProcessor(r,t.isFragment,t.processingContext));let o=t.processor?.attributeKeywordName??"attribute",s=t.isFragment&&t.processor?.varyingFragmentKeywordName?t.processor?.varyingFragmentKeywordName:!t.isFragment&&t.processor?.varyingVertexKeywordName?t.processor?.varyingVertexKeywordName:"varying";!t.isFragment&&i.attributeProcessor&&this.line.startsWith(o)?r=i.attributeProcessor(this.line,e,t.processingContext):i.varyingProcessor&&(i.varyingCheck?.(this.line,t.isFragment)||!i.varyingCheck&&this.line.startsWith(s))?r=i.varyingProcessor(this.line,t.isFragment,e,t.processingContext):i.uniformProcessor&&i.uniformRegexp&&i.uniformRegexp.test(this.line)?t.lookForClosingBracketForUniformBuffer||(r=i.uniformProcessor(this.line,t.isFragment,e,t.processingContext)):i.uniformBufferProcessor&&i.uniformBufferRegexp&&i.uniformBufferRegexp.test(this.line)?t.lookForClosingBracketForUniformBuffer||(r=i.uniformBufferProcessor(this.line,t.isFragment,t.processingContext),t.lookForClosingBracketForUniformBuffer=!0):i.textureProcessor&&i.textureRegexp&&i.textureRegexp.test(this.line)?r=i.textureProcessor(this.line,t.isFragment,e,t.processingContext):(i.uniformProcessor||i.uniformBufferProcessor)&&this.line.startsWith("uniform")&&!t.lookForClosingBracketForUniformBuffer&&(/uniform\s+(?:(?:highp)?|(?:lowp)?)\s*(\S+)\s+(\S+)\s*;/.test(this.line)?i.uniformProcessor&&(r=i.uniformProcessor(this.line,t.isFragment,e,t.processingContext)):i.uniformBufferProcessor&&(r=i.uniformBufferProcessor(this.line,t.isFragment,t.processingContext),t.lookForClosingBracketForUniformBuffer=!0)),t.lookForClosingBracketForUniformBuffer&&-1!==this.line.indexOf("}")&&(t.lookForClosingBracketForUniformBuffer=!1,i.endOfUniformBufferProcessor&&(r=i.endOfUniformBufferProcessor(this.line,t.isFragment,t.processingContext)))}o+=r+"\n"}for(let i of this.children)o+=i.process(e,t,r);return this.additionalDefineKey&&(e[this.additionalDefineKey]=this.additionalDefineValue||"true",r[this.additionalDefineKey]=e[this.additionalDefineKey]),o}}class s{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 n extends i{process(e,t,r){for(let o=0;o<this.children.length;o++){let i=this.children[o];if(i.isValid(e))return i.process(e,t,r)}return""}}class a extends i{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],o=t[t.length-2];t.length-=2,t.push(`(${o}${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=[],o=-1,i=()=>{""!==(u=u.trim())&&(r.push(u),u="")},s=e=>{o<l._Stack.length-1&&(l._Stack[++o]=e)},n=()=>l._Stack[o],a=()=>-1===o?"!!INVALID EXPRESSION!!":l._Stack[o--],c=0,u="";for(;c<e.length;){let t=e.charAt(c),f=c<e.length-1?e.substring(c,2+c):"";if("("===t)u="",s(t);else if(")"===t){for(i();-1!==o&&"("!==n();)r.push(a());a()}else if(l._OperatorPriority[f]>1){for(i();-1!==o&&l._OperatorPriority[n()]>=l._OperatorPriority[f];)r.push(a());s(f),c++}else u+=t;c++}for(i();-1!==o;)"("===n()?a():r.push(a());return l._InfixToPostfixCache.size>=l.InfixToPostfixCacheLimitSize&&l.ClearCache(),l._InfixToPostfixCache.set(e,{result:r,accessTime:Date.now()}),r}static ClearCache(){let e=Array.from(l._InfixToPostfixCache.entries()).sort((e,t)=>e[1].accessTime-t[1].accessTime);for(let t=0;t<l.InfixToPostfixCacheCleanupSize;t++)l._InfixToPostfixCache.delete(e[t][0])}}l.InfixToPostfixCacheLimitSize=5e4,l.InfixToPostfixCacheCleanupSize=25e3,l._InfixToPostfixCache=new Map,l._OperatorPriority={")":0,"(":1,"||":2,"&&":3},l._Stack=["","","","","","","","","","","","","","","","","","","",""];class c extends l{constructor(e,t=!1){super(),this.define=e,this.not=t}isTrue(e){let t=void 0!==e[this.define];return this.not&&(t=!t),t}}class u extends l{isTrue(e){return this.leftOperand.isTrue(e)||this.rightOperand.isTrue(e)}}class f extends l{isTrue(e){return this.leftOperand.isTrue(e)&&this.rightOperand.isTrue(e)}}class d extends l{constructor(e,t,r){super(),this.define=e,this.operand=t,this.testValue=r}toString(){return`${this.define} ${this.operand} ${this.testValue}`}isTrue(e){let t=!1,r=parseInt(void 0!=e[this.define]?e[this.define]:this.define),o=parseInt(void 0!=e[this.testValue]?e[this.testValue]:this.testValue);if(isNaN(r)||isNaN(o))return!1;switch(this.operand){case">":t=r>o;break;case"<":t=r<o;break;case"<=":t=r<=o;break;case">=":t=r>=o;break;case"==":t=r===o;break;case"!=":t=r!==o}return t}}let g=/defined\s*?\((.+?)\)/g,p=/defined\s*?\[(.+?)\]/g,h=/#include\s?<(.+)>(\((.*)\))*(\[(.*)\])*/g,m=/__decl__/,y=/light\{X\}.(\w*)/g,v=/\{X\}/g,b=[],P=/(#ifdef)|(#else)|(#elif)|(#endif)|(#ifndef)|(#if)/;function A(e){let t=/defined\((.+)\)/.exec(e);if(t&&t.length)return new c(t[1].trim(),"!"===e[0]);let r="",o=0;for(r of["==","!=",">=","<=","<",">"])if((o=e.indexOf(r))>-1)break;if(-1===o)return new c(e);let i=e.substring(0,o).trim(),s=e.substring(o+r.length).trim();return new d(i,r,s)}function C(e,t){let r=new a,o=e.substring(0,t),i=e.substring(t);return i=i.substring(0,(i.indexOf("//")+1||i.length+1)-1).trim(),"#ifdef"===o?r.testExpression=new c(i):"#ifndef"===o?r.testExpression=new c(i,!0):r.testExpression=function(e){e=e.replace(g,"defined[$1]");let t=l.infixToPostfix(e),r=[];for(let e of t)if("||"!==e&&"&&"!==e)r.push(e);else if(r.length>=2){let t=r[r.length-1],o=r[r.length-2];r.length-=2;let i="&&"==e?new f:new u;"string"==typeof t&&(t=t.replace(p,"defined($1)")),"string"==typeof o&&(o=o.replace(p,"defined($1)")),i.leftOperand="string"==typeof o?A(o):o,i.rightOperand="string"==typeof t?A(t):t,r.push(i)}let o=r[r.length-1];return"string"==typeof o&&(o=o.replace(p,"defined($1)")),"string"==typeof o?A(o):o}(i),r}function U(e,t,r,o){let s;for(;K(e,r,o);){let n=(s=e.currentLine).substring(0,5).toLowerCase();if("#else"===n){let r=new i;t.children.push(r),K(e,r,o);return}if("#elif"===n){let e=C(s,5);t.children.push(e),r=e}}}function K(e,t,r){for(;e.canRead;){e.lineIndex++;let o=e.currentLine;if(o.indexOf("#")>=0){let i=P.exec(o);if(i&&i.length){switch(i[0]){case"#ifdef":{let i=new n;t.children.push(i);let s=C(o,6);i.children.push(s),U(e,i,s,r);break}case"#else":case"#elif":return!0;case"#endif":return!1;case"#ifndef":{let i=new n;t.children.push(i);let s=C(o,7);i.children.push(s),U(e,i,s,r);break}case"#if":{let i=new n,s=C(o,3);t.children.push(i),i.children.push(s),U(e,i,s,r)}}continue}}let s=new i;if(s.line=o,t.children.push(s),"#"===o[0]&&"d"===o[1]){let e=o.replace(";","").split(" ");s.additionalDefineKey=e[1],3===e.length&&(s.additionalDefineValue=e[2])}}return!1}function L(e,t,r){let o;for(b.length=0;null!==(o=h.exec(e));)b.push(o);let i=[e],s=!1;for(let e of b){let o=e[1];if(-1!==o.indexOf("__decl__")&&(o=o.replace(m,""),t.supportsUniformBuffers&&(o=o.replace("Vertex","Ubo").replace("Fragment","Ubo")),o+="Declaration"),t.includesShadersStore[o]){let r=t.includesShadersStore[o];if(e[2]){let t=e[3].split(",");for(let e=0;e<t.length;e+=2){let o=RegExp(t[e],"g"),i=t[e+1];r=r.replace(o,i)}}if(e[4]){let o=e[5];if(-1!==o.indexOf("..")){let e=o.split(".."),i=parseInt(e[0]),s=parseInt(e[1]),n=r.slice(0);r="",isNaN(s)&&(s=t.indexParameters[e[1]]);for(let e=i;e<s;e++)t.supportsUniformBuffers||(n=n.replace(y,(e,t)=>t+"{X}")),r+=n.replace(v,e.toString())+"\n"}else t.supportsUniformBuffers||(r=r.replace(y,(e,t)=>t+"{X}")),r=r.replace(v,o)}let n=[];for(let t of i){let o=t.split(e[0]);for(let e=0;e<o.length-1;e++)n.push(o[e]),n.push(r);n.push(o[o.length-1])}i=n,s=s||r.indexOf("#include<")>=0||r.indexOf("#include <")>=0}else{let e=t.shadersRepository+"ShadersInclude/"+o+".fx";F.loadFile(e,e=>{t.includesShadersStore[o]=e,L(i.join(""),t,r)});return}}b.length=0;let n=i.join("");s?L(n.toString(),t,r):r(n)}let F={loadFile:(e,r,o,i,s,n)=>{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,n){t.processor?.preProcessShaderCode&&(e=t.processor.preProcessShaderCode(e,t.isFragment)),L(e,t,e=>{t.processCodeAfterIncludes&&(e=t.processCodeAfterIncludes(t.isFragment?"fragment":"vertex",e,t.defines)),r(function(e,t,r){var n;let a,l,c=function(e,t){if(t.processor?.noPrecision)return e;let r=t.shouldUseHighPrecisionShader;return -1===e.indexOf("precision highp float")?e=r?"precision highp float;\n"+e:"precision mediump float;\n"+e:r||(e=e.replace("precision highp float","precision mediump float")),e}(e,t);if(!t.processor||0===t.processor.shaderLanguage&&-1!==c.indexOf("#version 3")&&(c=c.replace("#version 300 es",""),!t.processor.parseGLES3))return c;let u=t.defines,f=function(e,t){let r=e.defines,i={};for(let e of r){let t=e.replace("#define","").replace(";","").trim().split(" ");i[t[0]]=t.length>1?t[1]:""}return e.processor?.shaderLanguage===0&&(i.GL_ES="true"),i.__VERSION__=e.version,i[e.platformName]="true",o(i,t?.isNDCHalfZRange,t?.useReverseDepthBuffer,t?.useExactSrgbConversions),i}(t,r);t.processor.preProcessor&&(c=t.processor.preProcessor(c,u,f,t.isFragment,t.processingContext));let d={};return n=c,a=new i,(l=new s).lineIndex=-1,l.lines=n.split("\n"),K(l,a,d),c=a.process(f,t,d),t.processor.postProcessor&&(c=t.processor.postProcessor(c,u,t.isFragment,t.processingContext,r?{drawBuffersExtensionDisabled:!r.getCaps().drawBuffersExtension}:{},f,d)),r?._features.needShaderCodeInlining&&(c=r.inlineShaderCode(c)),c}(e,t,n),e)})},"ProcessIncludes",0,L,"_FunctionContainer",0,F],55644)},44816,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,o,i=16,s=3e4,n=!0,a)=>{if(n&&r(e,t,o))return null;let l=setInterval(()=>{r(e,t,o)?clearInterval(l):(s-=i)<0&&(clearInterval(l),o?.(Error("Operation timed out after maximum retries. "+(a||"")),!0))},i);return()=>clearInterval(l)}])},44265,e=>{"use strict";function t(e){let t=r(e),i=o(e);return t-e>e-i?i:t}function r(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e}function o(e){return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,(e|=e>>16)-(e>>1)}e.s(["FloorPOT",0,o,"GetExponentOfTwo",0,function(e,i,s=2){let n;switch(s){case 1:n=o(e);break;case 2:n=t(e);break;default:n=r(e)}return Math.min(n,i)},"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])},78755,e=>{"use strict";var t=e.i(16347),r=e.i(44520);class o{static Instantiate(e){if(this.RegisteredExternalClasses&&this.RegisteredExternalClasses[e])return this.RegisteredExternalClasses[e];let o=(0,r.GetClass)(e);if(o)return o;t.Logger.Warn(e+" not found, you may have missed an import.");let i=e.split("."),s="u">typeof window?window:"u">typeof globalThis?globalThis:this;for(let e=0,t=i.length;e<t;e++)s=s[i[e]];return"function"!=typeof s?null:s}}o.RegisteredExternalClasses={},e.s(["InstantiationTools",0,o])},92180,6252,e=>{"use strict";var t,r=e.i(3864),o=e.i(36460),i=e.i(16347);let s=(e,t,r)=>!e||e.getClassName&&"Mesh"===e.getClassName()?null:e.getClassName&&("SubMesh"===e.getClassName()||"PhysicsBody"===e.getClassName())?e.clone(t):e.clone?e.clone():Array.isArray(e)?e.slice():r&&"object"==typeof e?{...e}:null;class n{static DeepCopy(e,t,r,o,n=!1){for(let a of function(e){let t=[];do for(let r of Object.getOwnPropertyNames(e))-1===t.indexOf(r)&&t.push(r);while(e=Object.getPrototypeOf(e))return t}(e)){if("_"===a[0]&&(!o||-1===o.indexOf(a))||a.endsWith("Observable")||r&&-1!==r.indexOf(a))continue;let l=e[a],c=typeof l;if("function"!==c)try{if("object"===c)if(l instanceof Uint8Array)t[a]=Uint8Array.from(l);else if(l instanceof Array){if(t[a]=[],l.length>0)if("object"==typeof l[0])for(let e=0;e<l.length;e++){let r=s(l[e],t,n);-1===t[a].indexOf(r)&&t[a].push(r)}else t[a]=l.slice(0)}else t[a]=s(l,t,n);else t[a]=l}catch(e){i.Logger.Warn(e.message)}}}}e.s(["DeepCopier",0,n],6252);var a=e.i(87627),l=e.i(85050),c=e.i(98207),u=e.i(23003),f=e.i(14958),d=e.i(44816),g=e.i(78755),p=e.i(80065),h=e.i(44265);class m{static get BaseUrl(){return f.FileToolsOptions.BaseUrl}static set BaseUrl(e){f.FileToolsOptions.BaseUrl=e}static get CleanUrl(){return f.FileToolsOptions.CleanUrl}static set CleanUrl(e){f.FileToolsOptions.CleanUrl=e}static IsAbsoluteUrl(e){return 0===e.indexOf("//")||!(-1===e.indexOf("://")||-1===e.indexOf(".")||-1===e.indexOf("/")||e.indexOf(":")>e.indexOf("/"))&&(!!(e.indexOf("://")<e.indexOf("."))||0===e.indexOf("data:")||0===e.indexOf("blob:"))}static set ScriptBaseUrl(e){f.FileToolsOptions.ScriptBaseUrl=e}static get ScriptBaseUrl(){return f.FileToolsOptions.ScriptBaseUrl}static set CDNBaseUrl(e){t.ScriptBaseUrl=e,t.AssetBaseUrl=e}static set ScriptPreprocessUrl(e){f.FileToolsOptions.ScriptPreprocessUrl=e}static get ScriptPreprocessUrl(){return f.FileToolsOptions.ScriptPreprocessUrl}static get DefaultRetryStrategy(){return f.FileToolsOptions.DefaultRetryStrategy}static set DefaultRetryStrategy(e){f.FileToolsOptions.DefaultRetryStrategy=e}static get CorsBehavior(){return f.FileToolsOptions.CorsBehavior}static set CorsBehavior(e){f.FileToolsOptions.CorsBehavior=e}static get UseFallbackTexture(){return u.EngineStore.UseFallbackTexture}static set UseFallbackTexture(e){u.EngineStore.UseFallbackTexture=e}static get RegisteredExternalClasses(){return g.InstantiationTools.RegisteredExternalClasses}static set RegisteredExternalClasses(e){g.InstantiationTools.RegisteredExternalClasses=e}static get fallbackTexture(){return u.EngineStore.FallbackTexture}static set fallbackTexture(e){u.EngineStore.FallbackTexture=e}static FetchToRef(e,t,r,o,i,s){let n=((Math.abs(e)*r%r|0)+(Math.abs(t)*o%o|0)*r)*4;s.r=i[n]/255,s.g=i[n+1]/255,s.b=i[n+2]/255,s.a=i[n+3]/255}static Mix(e,t,r){return 0}static Instantiate(e){return g.InstantiationTools.Instantiate(e)}static SetImmediate(e){d.TimingTools.SetImmediate(e)}static IsExponentOfTwo(e){return!0}static FloatRound(e){return Math.fround(e)}static GetFilename(e){let t=e.lastIndexOf("/");return t<0?e:e.substring(t+1)}static GetFolderPath(e,t=!1){let r=e.lastIndexOf("/");return r<0?t?e:"":e.substring(0,r+1)}static ToDegrees(e){return 180*e/Math.PI}static ToRadians(e){return e*Math.PI/180}static SmoothAngleChange(e,t,r=.9){let o=this.ToRadians(e),i=this.ToRadians(t);return this.ToDegrees(Math.atan2((1-r)*Math.sin(i)+r*Math.sin(o),(1-r)*Math.cos(i)+r*Math.cos(o)))}static MakeArray(e,t){return!0!==t&&(void 0===e||null==e)?null:Array.isArray(e)?e:[e]}static GetPointerPrefix(e){return(0,o.IsWindowObjectExist)()&&!window.PointerEvent?"mouse":"pointer"}static SetCorsBehavior(e,t){(0,f.SetCorsBehavior)(e,t)}static SetReferrerPolicyBehavior(e,t){t.referrerPolicy=e}static get PreprocessUrl(){return f.FileToolsOptions.PreprocessUrl}static set PreprocessUrl(e){f.FileToolsOptions.PreprocessUrl=e}static LoadImage(e,t,r,o,i,s){return(0,f.LoadImage)(e,t,r,o,i,s)}static LoadFile(e,t,r,o,i,s){return(0,f.LoadFile)(e,t,r,o,i,s)}static async LoadFileAsync(e,t=!0){return await new Promise((r,o)=>{(0,f.LoadFile)(e,e=>{r(e)},void 0,void 0,t,(e,t)=>{o(t)})})}static GetAssetUrl(e){if(!e)return"";if(t.AssetBaseUrl&&e.startsWith(t._DefaultAssetsUrl)){let r=t.AssetBaseUrl.endsWith("/")?t.AssetBaseUrl.slice(0,-1):t.AssetBaseUrl;return e.replace(t._DefaultAssetsUrl,r)}return e}static GetBabylonScriptURL(e,r){if(!e)return"";if(e.startsWith(t._DefaultCdnUrl)){if(t.ScriptBaseUrl){let r=t.ScriptBaseUrl.endsWith("/")?t.ScriptBaseUrl.slice(0,-1):t.ScriptBaseUrl;e=e.replace(t._DefaultCdnUrl,r)}else if(t._CdnVersion){let r=`${t._DefaultCdnUrl}/v${t._CdnVersion}`;e.startsWith(r)||(e=e.replace(t._DefaultCdnUrl,r))}}return e=t.ScriptPreprocessUrl(e),r&&!t.IsAbsoluteUrl(e)&&(e=t.GetAbsoluteUrl(e)),e}static LoadBabylonScript(e,r,o,i){e=t.GetBabylonScriptURL(e),t.LoadScript(e,r,o)}static async LoadBabylonScriptAsync(e){return e=t.GetBabylonScriptURL(e),await t.LoadScriptAsync(e)}static _LoadScriptNative(e,r,o){_native&&t.LoadFile(e,e=>{try{Function(e).apply(null),r&&r()}catch(e){o&&o("LoadScript Error",e)}},void 0,void 0,!1,(e,t)=>{o&&o("LoadScript Error",t)})}static _LoadScriptWeb(e,t,r,i,s=!1){if("function"==typeof importScripts){try{importScripts(e),t&&t()}catch(t){r?.(`Unable to load script '${e}' in worker`,t)}return}if(!(0,o.IsWindowObjectExist)())return void r?.(`Cannot load script '${e}' outside of a window or a worker`);let n=document.getElementsByTagName("head")[0],a=document.createElement("script");s?(a.setAttribute("type","module"),a.innerText=e):(a.setAttribute("type","text/javascript"),a.setAttribute("src",e)),i&&(a.id=i),a.onload=()=>{t&&t()},a.onerror=t=>{r&&r(`Unable to load script '${e}'`,t)},n.appendChild(a)}static async LoadScriptAsync(e,t){return await new Promise((r,o)=>{this.LoadScript(e,()=>{r()},(e,t)=>{o(t||Error(e))},t)})}static ReadFileAsDataURL(e,t,o){let i=new FileReader,s={onCompleteObservable:new r.Observable,abort:()=>i.abort()};return i.onloadend=()=>{s.onCompleteObservable.notifyObservers(s)},i.onload=e=>{t(e.target.result)},i.onprogress=o,i.readAsDataURL(e),s}static ReadFile(e,t,r,o,i){return(0,f.ReadFile)(e,t,r,o,i)}static FileAsURL(e){let t=new Blob([e]);return window.URL.createObjectURL(t)}static Format(e,t=2){return e.toFixed(t)}static DeepCopy(e,t,r,o){n.DeepCopy(e,t,r,o)}static IsEmpty(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}static RegisterTopRootEvents(e,t){for(let r=0;r<t.length;r++){let o=t[r];e.addEventListener(o.name,o.handler,!1);try{window.parent&&window.parent.addEventListener(o.name,o.handler,!1)}catch(e){}}}static UnregisterTopRootEvents(e,t){for(let r=0;r<t.length;r++){let o=t[r];e.removeEventListener(o.name,o.handler);try{e.parent&&e.parent.removeEventListener(o.name,o.handler)}catch(e){}}}static async DumpFramebuffer(e,t,r,o,i="image/png",s,n){throw(0,l._WarnImport)("DumpTools")}static DumpData(e,t,r,o,i="image/png",s,n=!1,a=!1,c){throw(0,l._WarnImport)("DumpTools")}static async DumpDataAsync(e,t,r,o="image/png",i,s=!1,n=!1,a){throw(0,l._WarnImport)("DumpTools")}static _IsOffScreenCanvas(e){return void 0!==e.convertToBlob}static ToBlob(e,r,o="image/png",i){t._IsOffScreenCanvas(e)||e.toBlob||(e.toBlob=function(e,t,r){setTimeout(()=>{let o=atob(this.toDataURL(t,r).split(",")[1]),i=o.length,s=new Uint8Array(i);for(let e=0;e<i;e++)s[e]=o.charCodeAt(e);e(new Blob([s]))})}),t._IsOffScreenCanvas(e)?e.convertToBlob({type:o,quality:i}).then(e=>r(e)):e.toBlob(function(e){r(e)},o,i)}static DownloadBlob(e,r){if("download"in document.createElement("a")){if(!r){let e=new Date;r="screenshot_"+((e.getFullYear()+"-"+(e.getMonth()+1)).slice(2)+"-"+e.getDate()+"_"+e.getHours()+"-")+("0"+e.getMinutes()).slice(-2)+".png"}t.Download(e,r)}else if(e&&"u">typeof URL){let t=URL.createObjectURL(e),r=window.open("");if(!r)return;let o=r.document.createElement("img");o.onload=function(){URL.revokeObjectURL(t)},o.src=t,r.document.body.appendChild(o)}}static EncodeScreenshotCanvasData(e,r,o="image/png",i,s){if("string"!=typeof i&&r){if(r){if(t._IsOffScreenCanvas(e))return void e.convertToBlob({type:o,quality:s}).then(e=>{let t=new FileReader;t.readAsDataURL(e),t.onloadend=()=>{r(t.result)}});r(e.toDataURL(o,s))}}else this.ToBlob(e,function(e){e&&t.DownloadBlob(e,i),r&&r("")},o,s)}static Download(e,t){if("u"<typeof URL)return;let r=window.URL.createObjectURL(e),o=document.createElement("a");document.body.appendChild(o),o.style.display="none",o.href=r,o.download=t,o.addEventListener("click",()=>{o.parentElement&&o.parentElement.removeChild(o)}),o.click(),window.URL.revokeObjectURL(r)}static BackCompatCameraNoPreventDefault(e){return"boolean"==typeof e[0]?e[0]:"boolean"==typeof e[1]&&e[1]}static CreateScreenshot(e,t,r,o,i="image/png",s=!1,n){throw(0,l._WarnImport)("ScreenshotTools")}static async CreateScreenshotAsync(e,t,r,o="image/png",i){throw(0,l._WarnImport)("ScreenshotTools")}static CreateScreenshotUsingRenderTarget(e,t,r,o,i="image/png",s=1,n=!1,a,c=!1,u=!1,f=!0,d,g){throw(0,l._WarnImport)("ScreenshotTools")}static async CreateScreenshotUsingRenderTargetAsync(e,t,r,o="image/png",i=1,s=!1,n,a=!1,c=!1,u=!0,f,d){throw(0,l._WarnImport)("ScreenshotTools")}static RandomId(){return(0,p.RandomGUID)()}static IsBase64(e){return(0,f.IsBase64DataUrl)(e)}static DecodeBase64(e){return(0,f.DecodeBase64UrlToBinary)(e)}static get errorsCount(){return i.Logger.errorsCount}static Log(e){i.Logger.Log(e)}static Warn(e){i.Logger.Warn(e)}static Error(e){i.Logger.Error(e)}static get LogCache(){return i.Logger.LogCache}static ClearLogCache(){i.Logger.ClearLogCache()}static set LogLevels(e){i.Logger.LogLevels=e}static set PerformanceLogLevel(e){(e&t.PerformanceUserMarkLogLevel)===t.PerformanceUserMarkLogLevel?_native?.enablePerformanceLogging?(_native.enablePerformanceLogging(1),t.StartPerformanceCounter=t._StartMarkNative,t.EndPerformanceCounter=t._EndMarkNative):(t.StartPerformanceCounter=t._StartUserMark,t.EndPerformanceCounter=t._EndUserMark):(e&t.PerformanceConsoleLogLevel)===t.PerformanceConsoleLogLevel?_native?.enablePerformanceLogging?(_native.enablePerformanceLogging(2),t.StartPerformanceCounter=t._StartMarkNative,t.EndPerformanceCounter=t._EndMarkNative):(t.StartPerformanceCounter=t._StartPerformanceConsole,t.EndPerformanceCounter=t._EndPerformanceConsole):(t.StartPerformanceCounter=t._StartPerformanceCounterDisabled,t.EndPerformanceCounter=t._EndPerformanceCounterDisabled,_native?.disablePerformanceLogging?.())}static _StartPerformanceCounterDisabled(e,t){}static _EndPerformanceCounterDisabled(e,t){}static _StartUserMark(e,r=!0){if(!t._Performance){if(!(0,o.IsWindowObjectExist)())return;t._Performance=window.performance}r&&t._Performance.mark&&t._Performance.mark(e+"-Begin")}static _EndUserMark(e,r=!0){r&&t._Performance.mark&&(t._Performance.mark(e+"-End"),t._Performance.measure(e,e+"-Begin",e+"-End"))}static _StartPerformanceConsole(e,r=!0){r&&(t._StartUserMark(e,r),console.time&&console.time(e))}static _EndPerformanceConsole(e,r=!0){r&&(t._EndUserMark(e,r),console.timeEnd(e))}static _StartMarkNative(e,r=!0){if(r&&_native?.startPerformanceCounter)if(t._NativePerformanceCounterHandles.has(e))t.Warn(`Performance counter with name ${e} is already started.`);else{let r=_native.startPerformanceCounter(e);t._NativePerformanceCounterHandles.set(e,r)}}static _EndMarkNative(e,r=!0){if(r&&_native?.endPerformanceCounter){let r=t._NativePerformanceCounterHandles.get(e);r?(_native.endPerformanceCounter(r),t._NativePerformanceCounterHandles.delete(e)):t.Warn(`Performance counter with name ${e} was not started.`)}}static get Now(){return a.PrecisionDate.Now}static GetClassName(e,t=!1){let r=null;return!t&&e.getClassName?r=e.getClassName():(e instanceof Object&&(r=(t?e:Object.getPrototypeOf(e)).constructor.__bjsclassName__),r||(r=typeof e)),r}static First(e,t){for(let r of e)if(t(r))return r;return null}static getFullClassName(e,t=!1){let r=null,o=null;if(!t&&e.getClassName)r=e.getClassName();else{if(e instanceof Object){let i=t?e:Object.getPrototypeOf(e);r=i.constructor.__bjsclassName__,o=i.constructor.__bjsmoduleName__}r||(r=typeof e)}return r?(null!=o?o+".":"")+r:null}static async DelayAsync(e){await new Promise(t=>{setTimeout(()=>{t()},e)})}static IsSafari(){return!!(0,o.IsNavigatorAvailable)()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}}t=m,m.AssetBaseUrl="",m.UseCustomRequestHeaders=!1,m.CustomRequestHeaders=c.WebRequest.CustomRequestHeaders,m.GetDOMTextContent=o.GetDOMTextContent,m._DefaultCdnUrl="https://cdn.babylonjs.com",m._CdnVersion="9.19.0",m._DefaultAssetsUrl="https://assets.babylonjs.com/core",m.LoadScript="u"<typeof _native?t._LoadScriptWeb:t._LoadScriptNative,m.GetAbsoluteUrl="object"==typeof document?e=>{let t=document.createElement("a");return t.href=e,t.href}:"function"==typeof URL&&"object"==typeof location?e=>new URL(e,location.origin).href:()=>{throw Error("Unable to get absolute URL. Override BABYLON.Tools.GetAbsoluteUrl to a custom implementation for the current context.")},m.NoneLogLevel=i.Logger.NoneLogLevel,m.MessageLogLevel=i.Logger.MessageLogLevel,m.WarningLogLevel=i.Logger.WarningLogLevel,m.ErrorLogLevel=i.Logger.ErrorLogLevel,m.AllLogLevel=i.Logger.AllLogLevel,m.IsWindowObjectExist=o.IsWindowObjectExist,m.PerformanceNoneLogLevel=0,m.PerformanceUserMarkLogLevel=1,m.PerformanceConsoleLogLevel=2,m._NativePerformanceCounterHandles=new Map,m.StartPerformanceCounter=t._StartPerformanceCounterDisabled,m.EndPerformanceCounter=t._EndPerformanceCounterDisabled;class y{constructor(e,t,r,o=0){this.iterations=e,this.index=o-1,this._done=!1,this._fn=t,this._successCallback=r}executeNext(){this._done||(this.index+1<this.iterations?(++this.index,this._fn(this)):this.breakLoop())}breakLoop(){this._done=!0,this._successCallback()}static Run(e,t,r,o=0){let i=new y(e,t,r,o);return i.executeNext(),i}static SyncAsyncForLoop(e,t,r,o,i,s=0){return y.Run(Math.ceil(e/t),o=>{i&&i()?o.breakLoop():setTimeout(()=>{for(let s=0;s<t;++s){let n=o.index*t+s;if(n>=e)break;if(r(n),i&&i()){o.breakLoop();break}}o.executeNext()},s)},o)}}let v=!1;e.s(["AsyncLoop",0,y,"RegisterTools",0,function(){v||(v=!0,m.Mix=h.Mix,m.IsExponentOfTwo=h.IsExponentOfTwo,u.EngineStore.FallbackTexture="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QBmRXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAAExAAIAAAAQAAAATgAAAAAAAABgAAAAAQAAAGAAAAABcGFpbnQubmV0IDQuMC41AP/bAEMABAIDAwMCBAMDAwQEBAQFCQYFBQUFCwgIBgkNCw0NDQsMDA4QFBEODxMPDAwSGBITFRYXFxcOERkbGRYaFBYXFv/bAEMBBAQEBQUFCgYGChYPDA8WFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFv/AABEIAQABAAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2gAMAwEAAhEDEQA/APH6KKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76CiiigD5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BQooooA+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/voKKKKAPl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76CiiigD5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BQooooA+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/voKKKKAPl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76P//Z")},"Tools",0,m],92180)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,74006,e=>{"use strict";var t=e.i(8636),r=e.i(16347),a=e.i(14958),o=e.i(80065),l=e.i(28854),n=e.i(51843);let i=!1;e.s(["RegisterAbstractEngineCubeTexture",0,function(){i||(i=!0,n.AbstractEngine.prototype._partialLoadFile=function(e,t,r,a,o=null){this._loadFile(e,e=>{r[t]=e,r._internalCount++,6===r._internalCount&&a(r)},void 0,void 0,!0,(e,t)=>{o&&e&&o(e.status+" "+e.statusText,t)})},n.AbstractEngine.prototype._cascadeLoadFiles=function(e,t,r,a=null){let o=[];o._internalCount=0;for(let e=0;e<6;e++)this._partialLoadFile(r[e],e,o,t,a)},n.AbstractEngine.prototype._cascadeLoadImgs=function(e,t,r,a,o=null,l){let n=[];n._internalCount=0;for(let i=0;i<6;i++)this._partialLoadImg(a[i],i,n,e,t,r,o,l)},n.AbstractEngine.prototype._partialLoadImg=function(e,t,r,l,n,i,s=null,f){let u=(0,o.RandomGUID)();(0,a.LoadImage)(e,e=>{r[t]=e,r._internalCount++,l&&l.removePendingData(u),6===r._internalCount&&i&&i(n,r)},(e,t)=>{l&&l.removePendingData(u),s&&s(e,t)},l?l.offlineProvider:null,f),l&&l.addPendingData(u)},n.AbstractEngine.prototype.createCubeTextureBase=function(e,a,o,n,i=null,s=null,f,u=null,c=!1,p=0,d=0,A=null,h=null,m=null,F=!1,y=null){let _,w,C=A||new t.InternalTexture(this,7);C.isCube=!0,C.url=e,C.generateMipMaps=!n,C._lodGenerationScale=p,C._lodGenerationOffset=d,C._useSRGBBuffer=!!F&&this._caps.supportSRGBBuffers&&(this.version>1||this.isWebGPU||!!n),C!==A&&(C.label=e.substring(0,60)),this._doNotHandleContextLost||(C._extension=u,C._files=o,C._buffer=y);let b=e;this._transformTextureUrl&&!A&&(e=this._transformTextureUrl(e));let g=u??((w=(_=e.split("?")[0]).lastIndexOf("."))>-1?_.substring(w).toLowerCase():""),B=(0,l._GetCompatibleTextureLoader)(g),G=(e,t)=>{C.dispose(),s?s(e,t):e&&r.Logger.Warn(e)},x=(t,l)=>{e===b?t&&G(t.status+" "+t.statusText,l):(r.Logger.Warn(`Failed to load ${e}, falling back to the ${b}`),this.createCubeTextureBase(b,a,o,!!n,i,G,f,u,c,p,d,C,h,m,F,y))};if(B)B.then(t=>{let r=e=>{h&&h(C,e),t.loadCubeData(e,C,c,i,(e,t)=>{G(e,t)})};y?r(y):o&&6===o.length?t.supportCascades?this._cascadeLoadFiles(a,e=>r(e.map(e=>new Uint8Array(e))),o,G):G("Textures type does not support cascades."):this._loadFile(e,e=>r(new Uint8Array(e)),void 0,a?a.offlineProvider||null:void 0,!0,x)});else{if(!o||0===o.length)throw Error("Cannot load cubemap because files were not defined, or the correct loader was not found.");this._cascadeLoadImgs(a,C,(e,t)=>{m&&m(e,t)},o,G)}return this._internalTexturesCache.push(C),C})}],74006)},84684,e=>{"use strict";var t=e.i(69400),r=e.i(63235),a=e.i(88),o=e.i(84106),l=e.i(19919);class n{constructor(e,t,r,a){this.name=e,this.worldAxisForNormal=t,this.worldAxisForFileX=r,this.worldAxisForFileY=a}}class i{static _NearestPow2Floor(e){return e<=1?1:1<<Math.floor(Math.log2(e))}static ConvertCubeMapTextureToSphericalPolynomial(e){let t,r;if(!e.isCube)return null;e.getScene()?.getEngine().flushFramebuffer();let a=e.getSize().width,o=e._sphericalPolynomialTargetSize,l=o>0?this._NearestPow2Floor(o):0,n=!e.noMipmap&&e._texture?.generateMipMaps===!0,i=l>0&&l<a&&n,s=i?Math.max(0,Math.round(Math.log2(a/l))):0,f=i?Math.max(1,Math.floor(a/Math.pow(2,s))):a,u=e.readPixels(0,s,void 0,!1),c=e.readPixels(1,s,void 0,!1);e.isRenderTarget?(t=e.readPixels(3,s,void 0,!1),r=e.readPixels(2,s,void 0,!1)):(t=e.readPixels(2,s,void 0,!1),r=e.readPixels(3,s,void 0,!1));let p=e.readPixels(4,s,void 0,!1),d=e.readPixels(5,s,void 0,!1),A=e.gammaSpace,h=l>0&&l<a&&!i;return new Promise(e=>{Promise.all([c,u,t,r,p,d]).then(([t,r,o,n,i,s])=>{let u=f;h&&(t=this._DownsampleFace(t,a,l,4),r=this._DownsampleFace(r,a,l,4),o=this._DownsampleFace(o,a,l,4),n=this._DownsampleFace(n,a,l,4),i=this._DownsampleFace(i,a,l,4),s=this._DownsampleFace(s,a,l,4),u=l);let c={size:u,right:r,left:t,up:o,down:n,front:i,back:s,format:5,type:+(t instanceof Float32Array),gammaSpace:A};e(this.ConvertCubeMapToSphericalPolynomial(c))})})}static _AreaElement(e,t){return Math.atan2(e*t,Math.sqrt(e*e+t*t+1))}static _DownsampleFace(e,t,r,a){let o=e instanceof Float32Array?e:Float32Array.from(e),l=r*r*a,n=new Float32Array(l),i=t/r,s=1/(i*i);for(let e=0;e<r;e++){let l=Math.floor(e*i),f=Math.floor((e+1)*i);for(let u=0;u<r;u++){let c=Math.floor(u*i),p=Math.floor((u+1)*i),d=(e*r+u)*a;for(let e=0;e<a;e++){let r=0;for(let n=l;n<f;n++)for(let l=c;l<p;l++)r+=o[(n*t+l)*a+e];n[d+e]=r*s}}}if(e instanceof Float32Array)return n;let f=new e.constructor(l);for(let e=0;e<l;e++)f[e]=n[e]+.5|0;return f}static ConvertCubeMapToSphericalPolynomial(e,t=0){let n=t>0?this._NearestPow2Floor(t):0;if(n>0&&e.size>n){let t=5===e.format?4:3,r={};for(let a of["right","left","up","down","front","back"])r[a]=this._DownsampleFace(e[a],e.size,n,t);e={...e,...r,size:n}}let i=new a.SphericalHarmonics,s=0,f=2/e.size,u=.5*f,c=u-1;for(let t=0;t<6;t++){let a=this._FileFaces[t],n=e[a.name],p=c,d=5===e.format?4:3;for(let t=0;t<e.size;t++){let A=c;for(let c=0;c<e.size;c++){let h=a.worldAxisForFileX.scale(A).add(a.worldAxisForFileY.scale(p)).add(a.worldAxisForNormal);h.normalize();let m=this._AreaElement(A-u,p-u)-this._AreaElement(A-u,p+u)-this._AreaElement(A+u,p-u)+this._AreaElement(A+u,p+u),F=n[t*e.size*d+c*d+0],y=n[t*e.size*d+c*d+1],_=n[t*e.size*d+c*d+2];isNaN(F)&&(F=0),isNaN(y)&&(y=0),isNaN(_)&&(_=0),0===e.type&&(F/=255,y/=255,_/=255),e.gammaSpace&&(F=Math.pow((0,r.Clamp)(F),o.ToLinearSpace),y=Math.pow((0,r.Clamp)(y),o.ToLinearSpace),_=Math.pow((0,r.Clamp)(_),o.ToLinearSpace));let w=this.MAX_HDRI_VALUE;if(this.PRESERVE_CLAMPED_COLORS){let e=Math.max(F,y,_);if(e>w){let t=w/e;F*=t,y*=t,_*=t}}else F=(0,r.Clamp)(F,0,w),y=(0,r.Clamp)(y,0,w),_=(0,r.Clamp)(_,0,w);let C=new l.Color3(F,y,_);i.addLight(h,C,m),s+=m,A+=f}p+=f}}let p=4*Math.PI*6/6/s;return i.scaleInPlace(p),i.convertIncidentRadianceToIrradiance(),i.convertIrradianceToLambertianRadiance(),a.SphericalPolynomial.FromHarmonics(i)}}i._FileFaces=[new n("right",new t.Vector3(1,0,0),new t.Vector3(0,0,-1),new t.Vector3(0,-1,0)),new n("left",new t.Vector3(-1,0,0),new t.Vector3(0,0,1),new t.Vector3(0,-1,0)),new n("up",new t.Vector3(0,1,0),new t.Vector3(1,0,0),new t.Vector3(0,0,1)),new n("down",new t.Vector3(0,-1,0),new t.Vector3(1,0,0),new t.Vector3(0,0,-1)),new n("front",new t.Vector3(0,0,1),new t.Vector3(1,0,0),new t.Vector3(0,-1,0)),new n("back",new t.Vector3(0,0,-1),new t.Vector3(-1,0,0),new t.Vector3(0,-1,0))],i.MAX_HDRI_VALUE=4096,i.PRESERVE_CLAMPED_COLORS=!1,e.s(["CubeMapToSphericalPolynomialTools",0,i])},84467,e=>{"use strict";var t=e.i(63235),r=e.i(16347),a=e.i(84684),o=e.i(6563);function l(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}let n=l("DXT1"),i=l("DXT3"),s=l("DXT5"),f=l("DX10");class u{static GetDDSInfo(e){let t=new Int32Array(e.buffer,e.byteOffset,31),r=new Int32Array(e.buffer,e.byteOffset,35),a=1;131072&t[2]&&(a=Math.max(1,t[7]));let o=t[21],l=o===f?r[32]:0,u=0;switch(o){case 113:u=2;break;case 116:u=1;break;case f:if(10===l){u=2;break}2===l&&(u=1)}return{width:t[4],height:t[3],mipmapCount:a,isFourCC:(4&t[20])==4,isRGB:(64&t[20])==64,isLuminance:(131072&t[20])==131072,isCube:(512&t[28])==512,isCompressed:o===n||o===i||o===s,dxgiFormat:l,textureType:u}}static _GetHalfFloatAsFloatRGBAArrayBuffer(e,t,r,a,l,n){let i=new Float32Array(a),s=new Uint16Array(l,r),f=0;for(let r=0;r<t;r++)for(let t=0;t<e;t++){let a=(t+r*e)*4;i[f]=(0,o.FromHalfFloat)(s[a]),i[f+1]=(0,o.FromHalfFloat)(s[a+1]),i[f+2]=(0,o.FromHalfFloat)(s[a+2]),u.StoreLODInAlphaChannel?i[f+3]=n:i[f+3]=(0,o.FromHalfFloat)(s[a+3]),f+=4}return i}static _GetHalfFloatRGBAArrayBuffer(e,t,r,a,l,n){if(u.StoreLODInAlphaChannel){let i=new Uint16Array(a),s=new Uint16Array(l,r),f=0;for(let r=0;r<t;r++)for(let t=0;t<e;t++){let a=(t+r*e)*4;i[f]=s[a],i[f+1]=s[a+1],i[f+2]=s[a+2],i[f+3]=(0,o.ToHalfFloat)(n),f+=4}return i}return new Uint16Array(l,r,a)}static _GetFloatRGBAArrayBuffer(e,t,r,a,o,l){if(u.StoreLODInAlphaChannel){let n=new Float32Array(a),i=new Float32Array(o,r),s=0;for(let r=0;r<t;r++)for(let t=0;t<e;t++){let a=(t+r*e)*4;n[s]=i[a],n[s+1]=i[a+1],n[s+2]=i[a+2],n[s+3]=l,s+=4}return n}return new Float32Array(o,r,a)}static _GetFloatAsHalfFloatRGBAArrayBuffer(e,t,r,a,l,n){let i=new Uint16Array(a),s=new Float32Array(l,r),f=0;for(let r=0;r<t;r++)for(let t=0;t<e;t++)i[f]=(0,o.ToHalfFloat)(s[f]),i[f+1]=(0,o.ToHalfFloat)(s[f+1]),i[f+2]=(0,o.ToHalfFloat)(s[f+2]),u.StoreLODInAlphaChannel?i[f+3]=(0,o.ToHalfFloat)(n):i[f+3]=(0,o.ToHalfFloat)(s[f+3]),f+=4;return i}static _GetFloatAsUIntRGBAArrayBuffer(e,r,a,o,l,n){let i=new Uint8Array(o),s=new Float32Array(l,a),f=0;for(let a=0;a<r;a++)for(let r=0;r<e;r++){let o=(r+a*e)*4;i[f]=255*(0,t.Clamp)(s[o]),i[f+1]=255*(0,t.Clamp)(s[o+1]),i[f+2]=255*(0,t.Clamp)(s[o+2]),u.StoreLODInAlphaChannel?i[f+3]=n:i[f+3]=255*(0,t.Clamp)(s[o+3]),f+=4}return i}static _GetHalfFloatAsUIntRGBAArrayBuffer(e,r,a,l,n,i){let s=new Uint8Array(l),f=new Uint16Array(n,a),c=0;for(let a=0;a<r;a++)for(let r=0;r<e;r++){let l=(r+a*e)*4;s[c]=255*(0,t.Clamp)((0,o.FromHalfFloat)(f[l])),s[c+1]=255*(0,t.Clamp)((0,o.FromHalfFloat)(f[l+1])),s[c+2]=255*(0,t.Clamp)((0,o.FromHalfFloat)(f[l+2])),u.StoreLODInAlphaChannel?s[c+3]=i:s[c+3]=255*(0,t.Clamp)((0,o.FromHalfFloat)(f[l+3])),c+=4}return s}static _GetRGBAArrayBuffer(e,t,r,a,o,l,n,i,s){let f=new Uint8Array(a),u=new Uint8Array(o,r),c=0;for(let r=0;r<t;r++)for(let t=0;t<e;t++){let a=(t+r*e)*4;f[c]=u[a+l],f[c+1]=u[a+n],f[c+2]=u[a+i],f[c+3]=u[a+s],c+=4}return f}static _ExtractLongWordOrder(e){return 0===e||255===e||-0x1000000===e?0:1+u._ExtractLongWordOrder(e>>8)}static _GetRGBArrayBuffer(e,t,r,a,o,l,n,i){let s=new Uint8Array(a),f=new Uint8Array(o,r),u=0;for(let r=0;r<t;r++)for(let t=0;t<e;t++){let a=(t+r*e)*3;s[u]=f[a+l],s[u+1]=f[a+n],s[u+2]=f[a+i],u+=3}return s}static _GetLuminanceArrayBuffer(e,t,r,a,o){let l=new Uint8Array(a),n=new Uint8Array(o,r),i=0;for(let r=0;r<t;r++)for(let t=0;t<e;t++){let a=t+r*e;l[i]=n[a],i++}return l}static UploadDDSLevels(e,t,o,l,c,p,d=-1,A,h=!0){let m,F,y,_=null;l.sphericalPolynomial&&(_=[]);let w=!!e.getCaps().s3tc;t.generateMipMaps=c;let C=new Int32Array(o.buffer,o.byteOffset,31),b,g,B,G=0,x,T=0,L=1;if(0x20534444!==C[0])return void r.Logger.Error("Invalid magic number in DDS header");if(!l.isFourCC&&!l.isRGB&&!l.isLuminance)return void r.Logger.Error("Unsupported format, must contain a FourCC, RGB or LUMINANCE code");if(l.isCompressed&&!w)return void r.Logger.Error("Compressed textures are not supported on this platform.");let D=C[22];x=C[1]+4;let R=!1;if(l.isFourCC)switch(b=C[21]){case n:L=8,T=33777;break;case i:L=16,T=33778;break;case s:L=16,T=33779;break;case 113:R=!0,D=64;break;case 116:R=!0,D=128;break;case f:{x+=20;let e=!1;switch(l.dxgiFormat){case 10:R=!0,D=64,e=!0;break;case 2:R=!0,D=128,e=!0;break;case 88:l.isRGB=!0,l.isFourCC=!1,D=32,e=!0}if(e)break}default:r.Logger.Error(["Unsupported FourCC code:",String.fromCharCode(255&b,b>>8&255,b>>16&255,b>>24&255)]);return}let M=u._ExtractLongWordOrder(C[23]),S=u._ExtractLongWordOrder(C[24]),P=u._ExtractLongWordOrder(C[25]),O=u._ExtractLongWordOrder(C[26]);R&&(T=e._getRGBABufferInternalSizedFormat(l.textureType)),F=1,131072&C[2]&&!1!==c&&(F=Math.max(1,C[7]));let U=A||0,v=e.getCaps();for(let r=U;r<p;r++){for(y=0,g=C[4],B=C[3];y<F;++y){if(-1===d||d===y){let a=-1===d?y:0;if(!l.isCompressed&&l.isFourCC){t.format=5,G=g*B*4;let l=null;if(e._badOS||e._badDesktopOS||!v.textureHalfFloat&&!v.textureFloat)128===D?(l=u._GetFloatAsUIntRGBAArrayBuffer(g,B,o.byteOffset+x,G,o.buffer,a),_&&0==a&&_.push(u._GetFloatRGBAArrayBuffer(g,B,o.byteOffset+x,G,o.buffer,a))):64===D&&(l=u._GetHalfFloatAsUIntRGBAArrayBuffer(g,B,o.byteOffset+x,G,o.buffer,a),_&&0==a&&_.push(u._GetHalfFloatAsFloatRGBAArrayBuffer(g,B,o.byteOffset+x,G,o.buffer,a))),t.type=0;else{let e,r=v.textureFloat&&(h&&v.textureFloatLinearFiltering||!h),n=v.textureHalfFloat&&(h&&v.textureHalfFloatLinearFiltering||!h),i=(128===D||64===D&&!n)&&r?1:(64===D||128===D&&!r)&&n?2:0,s=null;if(128===D)switch(i){case 1:e=u._GetFloatRGBAArrayBuffer,s=null;break;case 2:e=u._GetFloatAsHalfFloatRGBAArrayBuffer,s=u._GetFloatRGBAArrayBuffer;break;case 0:e=u._GetFloatAsUIntRGBAArrayBuffer,s=u._GetFloatRGBAArrayBuffer}else switch(i){case 1:e=u._GetHalfFloatAsFloatRGBAArrayBuffer,s=null;break;case 2:e=u._GetHalfFloatRGBAArrayBuffer,s=u._GetHalfFloatAsFloatRGBAArrayBuffer;break;case 0:e=u._GetHalfFloatAsUIntRGBAArrayBuffer,s=u._GetHalfFloatAsFloatRGBAArrayBuffer}t.type=i,l=e(g,B,o.byteOffset+x,G,o.buffer,a),_&&0==a&&_.push(s?s(g,B,o.byteOffset+x,G,o.buffer,a):l)}l&&e._uploadDataToTextureDirectly(t,l,r,a)}else if(l.isRGB)t.type=0,24===D?(t.format=4,G=g*B*3,m=u._GetRGBArrayBuffer(g,B,o.byteOffset+x,G,o.buffer,M,S,P)):(t.format=5,G=g*B*4,m=u._GetRGBAArrayBuffer(g,B,o.byteOffset+x,G,o.buffer,M,S,P,O)),e._uploadDataToTextureDirectly(t,m,r,a);else if(l.isLuminance){let l=e._getUnpackAlignement(),n=g;G=Math.floor((g+l-1)/l)*l*(B-1)+n,m=u._GetLuminanceArrayBuffer(g,B,o.byteOffset+x,G,o.buffer),t.format=1,t.type=0,e._uploadDataToTextureDirectly(t,m,r,a)}else G=Math.max(4,g)/4*Math.max(4,B)/4*L,m=new Uint8Array(o.buffer,o.byteOffset+x,G),t.type=0,e._uploadCompressedDataToTextureDirectly(t,T,g,B,m,r,a)}x+=D?g*B*(D/8):G,g*=.5,B*=.5,g=Math.max(1,g),B=Math.max(1,B)}if(void 0!==A)break}_&&_.length>0?l.sphericalPolynomial=a.CubeMapToSphericalPolynomialTools.ConvertCubeMapToSphericalPolynomial({size:C[4],right:_[0],left:_[1],up:_[2],down:_[3],front:_[4],back:_[5],format:5,type:1,gammaSpace:!1}):l.sphericalPolynomial=void 0}}u.StoreLODInAlphaChannel=!1,e.s(["DDSTools",0,u])},8813,e=>{"use strict";(0,e.i(74006).RegisterAbstractEngineCubeTexture)(),e.s([],55694),e.i(55694);var t=e.i(84467);e.s(["DDSTools",()=>t.DDSTools],8813)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,29667,t=>{"use strict";var e,s,i=t.i(63235),n=t.i(69400),r=t.i(84106);(e=s||(s={}))[e.CW=0]="CW",e[e.CCW=1]="CCW";class a{constructor(t){this._radians=t,this._radians<0&&(this._radians+=2*Math.PI)}degrees(){return 180*this._radians/Math.PI}radians(){return this._radians}static BetweenTwoPoints(t,e){let s=e.subtract(t);return new a(Math.atan2(s.y,s.x))}static BetweenTwoVectors(t,e){let s=t.lengthSquared()*e.lengthSquared();if(0===s)return new a(Math.PI/2);s=Math.sqrt(s);let n=t.dot(e)/s;return new a(Math.acos(n=(0,i.Clamp)(n,-1,1)))}static FromRadians(t){return new a(t)}static FromDegrees(t){return new a(t*Math.PI/180)}}class o{constructor(t,e,s){this.startPoint=t,this.midPoint=e,this.endPoint=s;const i=Math.pow(e.x,2)+Math.pow(e.y,2),r=(Math.pow(t.x,2)+Math.pow(t.y,2)-i)/2,o=(i-Math.pow(s.x,2)-Math.pow(s.y,2))/2,h=(t.x-e.x)*(e.y-s.y)-(e.x-s.x)*(t.y-e.y);this.centerPoint=new n.Vector2((r*(e.y-s.y)-o*(t.y-e.y))/h,((t.x-e.x)*o-(e.x-s.x)*r)/h),this.radius=this.centerPoint.subtract(this.startPoint).length(),this.startAngle=a.BetweenTwoPoints(this.centerPoint,this.startPoint);const l=this.startAngle.degrees();let u=a.BetweenTwoPoints(this.centerPoint,this.midPoint).degrees(),c=a.BetweenTwoPoints(this.centerPoint,this.endPoint).degrees();u-l>180&&(u-=360),u-l<-180&&(u+=360),c-u>180&&(c-=360),c-u<-180&&(c+=360),this.orientation=u-l<0?0:1,this.angle=a.FromDegrees(0===this.orientation?l-c:c-l)}}class h{constructor(t,e){this._points=[],this._length=0,this.closed=!1,this._points.push(new n.Vector2(t,e))}addLineTo(t,e){if(this.closed)return this;let s=new n.Vector2(t,e),i=this._points[this._points.length-1];return this._points.push(s),this._length+=s.subtract(i).length(),this}addArcTo(t,e,s,i,r=36){if(this.closed)return this;let a=new o(this._points[this._points.length-1],new n.Vector2(t,e),new n.Vector2(s,i)),h=a.angle.radians()/r;0===a.orientation&&(h*=-1);let l=a.startAngle.radians()+h;for(let t=0;t<r;t++){let t=Math.cos(l)*a.radius+a.centerPoint.x,e=Math.sin(l)*a.radius+a.centerPoint.y;this.addLineTo(t,e),l+=h}return this}addQuadraticCurveTo(t,e,s,i,n=36){if(this.closed)return this;let r=(t,e,s,i)=>(1-t)*(1-t)*e+2*t*(1-t)*s+t*t*i,a=this._points[this._points.length-1];for(let o=0;o<=n;o++){let h=o/n,l=r(h,a.x,t,s),u=r(h,a.y,e,i);this.addLineTo(l,u)}return this}addBezierCurveTo(t,e,s,i,n,r,a=36){if(this.closed)return this;let o=(t,e,s,i,n)=>(1-t)*(1-t)*(1-t)*e+3*t*(1-t)*(1-t)*s+3*t*t*(1-t)*i+t*t*t*n,h=this._points[this._points.length-1];for(let l=0;l<=a;l++){let u=l/a,c=o(u,h.x,t,s,n),p=o(u,h.y,e,i,r);this.addLineTo(c,p)}return this}isPointInside(t){let e=!1,s=this._points.length;for(let i=s-1,n=0;n<s;i=n++){let s=this._points[i],r=this._points[n],a=r.x-s.x,o=r.y-s.y;if(Math.abs(o)>Number.EPSILON){if(o<0&&(s=this._points[n],a=-a,r=this._points[i],o=-o),t.y<s.y||t.y>r.y)continue;if(t.y===s.y&&t.x===s.x)return!0;{let i=o*(t.x-s.x)-a*(t.y-s.y);if(0===i)return!0;if(i<0)continue;e=!e}}else{if(t.y!==s.y)continue;if(r.x<=t.x&&t.x<=s.x||s.x<=t.x&&t.x<=r.x)return!0}}return e}close(){return this.closed=!0,this}length(){let t=this._length;if(this.closed){let e=this._points[this._points.length-1];t+=this._points[0].subtract(e).length()}return t}area(){let t=this._points.length,e=0;for(let s=t-1,i=0;i<t;s=i++)e+=this._points[s].x*this._points[i].y-this._points[i].x*this._points[s].y;return .5*e}getPoints(){return this._points}getPointAtLengthPosition(t){if(t<0||t>1)return n.Vector2.Zero();let e=t*this.length(),s=0;for(let t=0;t<this._points.length;t++){let i=(t+1)%this._points.length,r=this._points[t],a=this._points[i].subtract(r),o=a.length()+s;if(e>=s&&e<=o){let t=a.normalize(),i=e-s;return new n.Vector2(r.x+t.x*i,r.y+t.y*i)}s=o}return n.Vector2.Zero()}static StartingAt(t,e){return new h(t,e)}}class l{constructor(t,e=null,s,i=!1){this.path=t,this._curve=[],this._distances=[],this._tangents=[],this._normals=[],this._binormals=[],this._pointAtData={id:0,point:n.Vector3.Zero(),previousPointArrayIndex:0,position:0,subPosition:0,interpolateReady:!1,interpolationMatrix:n.Matrix.Identity()};for(let e=0;e<t.length;e++)this._curve[e]=t[e].clone();this._raw=s||!1,this._alignTangentsWithPath=i,this._compute(e,i)}getCurve(){return this._curve}getPoints(){return this._curve}length(){return this._distances[this._distances.length-1]}getTangents(){return this._tangents}getNormals(){return this._normals}getBinormals(){return this._binormals}getDistances(){return this._distances}getPointAt(t){return this._updatePointAtData(t).point}getTangentAt(t,e=!1){return this._updatePointAtData(t,e),e?n.Vector3.TransformCoordinates(n.Vector3.Forward(),this._pointAtData.interpolationMatrix):this._tangents[this._pointAtData.previousPointArrayIndex]}getNormalAt(t,e=!1){return this._updatePointAtData(t,e),e?n.Vector3.TransformCoordinates(n.Vector3.Right(),this._pointAtData.interpolationMatrix):this._normals[this._pointAtData.previousPointArrayIndex]}getBinormalAt(t,e=!1){return this._updatePointAtData(t,e),e?n.Vector3.TransformCoordinates(n.Vector3.UpReadOnly,this._pointAtData.interpolationMatrix):this._binormals[this._pointAtData.previousPointArrayIndex]}getDistanceAt(t){return this.length()*t}getPreviousPointIndexAt(t){return this._updatePointAtData(t),this._pointAtData.previousPointArrayIndex}getSubPositionAt(t){return this._updatePointAtData(t),this._pointAtData.subPosition}getClosestPositionTo(t){let e=Number.MAX_VALUE,s=0;for(let i=0;i<this._curve.length-1;i++){let r=this._curve[i+0],a=this._curve[i+1].subtract(r).normalize(),o=this._distances[i+1]-this._distances[i+0],h=Math.min(Math.max(n.Vector3.Dot(a,t.subtract(r).normalize()),0)*n.Vector3.Distance(r,t)/o,1),l=n.Vector3.Distance(r.add(a.scale(h*o)),t);l<e&&(e=l,s=(this._distances[i+0]+o*h)/this.length())}return s}slice(t=0,e=1){if(t<0&&(t=1- -1*t%1),e<0&&(e=1- -1*e%1),t>e){let s=t;t=e,e=s}let s=this.getCurve(),i=this.getPointAt(t),n=this.getPreviousPointIndexAt(t),r=this.getPointAt(e),a=this.getPreviousPointIndexAt(e)+1,o=[];return 0!==t&&(n++,o.push(i)),o.push(...s.slice(n,a)),(1!==e||1===t)&&o.push(r),new l(o,this.getNormalAt(t),this._raw,this._alignTangentsWithPath)}update(t,e=null,s=!1){for(let e=0;e<t.length;e++)this._curve[e].x=t[e].x,this._curve[e].y=t[e].y,this._curve[e].z=t[e].z;return this._compute(e,s),this}_compute(t,e=!1){let s,i,r,a,o,h=this._curve.length;if(h<2)return;this._tangents[0]=this._getFirstNonNullVector(0),this._raw||this._tangents[0].normalize(),this._tangents[h-1]=this._curve[h-1].subtract(this._curve[h-2]),this._raw||this._tangents[h-1].normalize();let l=this._tangents[0],u=this._normalVector(l,t);this._normals[0]=u,this._raw||this._normals[0].normalize(),this._binormals[0]=n.Vector3.Cross(l,this._normals[0]),this._raw||this._binormals[0].normalize(),this._distances[0]=0;for(let t=1;t<h;t++)s=this._getLastNonNullVector(t),t<h-1&&(i=this._getFirstNonNullVector(t),this._tangents[t]=e?i:s.add(i),this._tangents[t].normalize()),this._distances[t]=this._distances[t-1]+this._curve[t].subtract(this._curve[t-1]).length(),r=this._tangents[t],o=this._binormals[t-1],this._normals[t]=n.Vector3.Cross(o,r),this._raw||(0===this._normals[t].length()?(a=this._normals[t-1],this._normals[t]=a.clone()):this._normals[t].normalize()),this._binormals[t]=n.Vector3.Cross(r,this._normals[t]),this._raw||this._binormals[t].normalize();this._pointAtData.id=NaN}_getFirstNonNullVector(t){let e=1,s=this._curve[t+e].subtract(this._curve[t]);for(;0===s.length()&&t+e+1<this._curve.length;)e++,s=this._curve[t+e].subtract(this._curve[t]);return s}_getLastNonNullVector(t){let e=1,s=this._curve[t].subtract(this._curve[t-e]);for(;0===s.length()&&t>e+1;)e++,s=this._curve[t].subtract(this._curve[t-e]);return s}_normalVector(t,e){let s,a=t.length();if(0===a&&(a=1),null==e){let e;e=(0,i.WithinEpsilon)(Math.abs(t.y)/a,1,r.Epsilon)?(0,i.WithinEpsilon)(Math.abs(t.x)/a,1,r.Epsilon)?(0,i.WithinEpsilon)(Math.abs(t.z)/a,1,r.Epsilon)?n.Vector3.Zero():new n.Vector3(0,0,1):new n.Vector3(1,0,0):new n.Vector3(0,-1,0),s=n.Vector3.Cross(t,e)}else s=n.Vector3.Cross(t,e),n.Vector3.CrossToRef(s,t,s);return s.normalize(),s}_updatePointAtData(t,e=!1){let s;if(this._pointAtData.id===t)return this._pointAtData.interpolateReady||this._updateInterpolationMatrix(),this._pointAtData;this._pointAtData.id=t;let i=this.getPoints();if(t<=0)return this._setPointAtData(0,0,i[0],0,e);if(t>=1)return this._setPointAtData(1,1,i[i.length-1],i.length-1,e);let r=i[0],a=0,o=t*this.length();for(let h=1;h<i.length;h++){s=i[h];let l=n.Vector3.Distance(r,s);if((a+=l)===o)return this._setPointAtData(t,1,s,h,e);if(a>o){let i=(a-o)/l,n=r.subtract(s),u=s.add(n.scaleInPlace(i));return this._setPointAtData(t,1-i,u,h-1,e)}r=s}return this._pointAtData}_setPointAtData(t,e,s,i,n){return this._pointAtData.point=s,this._pointAtData.position=t,this._pointAtData.subPosition=e,this._pointAtData.previousPointArrayIndex=i,this._pointAtData.interpolateReady=n,n&&this._updateInterpolationMatrix(),this._pointAtData}_updateInterpolationMatrix(){this._pointAtData.interpolationMatrix=n.Matrix.Identity();let t=this._pointAtData.previousPointArrayIndex;if(t!==this._tangents.length-1){let e=t+1,s=this._tangents[t].clone(),i=this._normals[t].clone(),r=this._binormals[t].clone(),a=this._tangents[e].clone(),o=this._normals[e].clone(),h=this._binormals[e].clone(),l=n.Quaternion.RotationQuaternionFromAxis(i,r,s),u=n.Quaternion.RotationQuaternionFromAxis(o,h,a);n.Quaternion.Slerp(l,u,this._pointAtData.subPosition).toRotationMatrix(this._pointAtData.interpolationMatrix)}}}class u{static CreateQuadraticBezier(t,e,s,i){i=i>2?i:3;let r=[],a=(t,e,s,i)=>(1-t)*(1-t)*e+2*t*(1-t)*s+t*t*i;for(let o=0;o<=i;o++)r.push(new n.Vector3(a(o/i,t.x,e.x,s.x),a(o/i,t.y,e.y,s.y),a(o/i,t.z,e.z,s.z)));return new u(r)}static CreateCubicBezier(t,e,s,i,r){r=r>3?r:4;let a=[],o=(t,e,s,i,n)=>(1-t)*(1-t)*(1-t)*e+3*t*(1-t)*(1-t)*s+3*t*t*(1-t)*i+t*t*t*n;for(let h=0;h<=r;h++)a.push(new n.Vector3(o(h/r,t.x,e.x,s.x,i.x),o(h/r,t.y,e.y,s.y,i.y),o(h/r,t.z,e.z,s.z,i.z)));return new u(a)}static CreateHermiteSpline(t,e,s,i,r){let a=[],o=1/r;for(let h=0;h<=r;h++)a.push(n.Vector3.Hermite(t,e,s,i,h*o));return new u(a)}static CreateCatmullRomSpline(t,e,s){let i=[],r=1/e,a=0;if(s){let s=t.length;for(let o=0;o<s;o++){a=0;for(let h=0;h<e;h++)i.push(n.Vector3.CatmullRom(t[o%s],t[(o+1)%s],t[(o+2)%s],t[(o+3)%s],a)),a+=r}i.push(i[0])}else{let s=[];s.push(t[0].clone()),s.push(...t),s.push(t[t.length-1].clone());let o=0;for(;o<s.length-3;o++){a=0;for(let t=0;t<e;t++)i.push(n.Vector3.CatmullRom(s[o],s[o+1],s[o+2],s[o+3],a)),a+=r}o--,i.push(n.Vector3.CatmullRom(s[o],s[o+1],s[o+2],s[o+3],a))}return new u(i)}static ArcThru3Points(t,e,s,i=32,r=!1,a=!1){let o=[],h=e.subtract(t),l=s.subtract(e),c=t.subtract(s),p=n.Vector3.Cross(h,l),_=p.length();if(_<1e-8)return new u(o);let g=h.lengthSquared(),d=l.lengthSquared(),m=c.lengthSquared(),x=p.lengthSquared(),E=.5*h.length()*l.length()*c.length()/_,A=n.Vector3.Dot(h,c),M=n.Vector3.Dot(h,l),w=n.Vector3.Dot(l,c),P=t.scale(-.5*d*A/x).add(e.scale(-.5*m*M/x)).add(s.scale(-.5*g*w/x)),y=t.subtract(P).normalize(),f=n.Vector3.Cross(p,y).normalize();if(a){let e=2*Math.PI/i;for(let t=0;t<=2*Math.PI;t+=e)o.push(P.add(y.scale(E*Math.cos(t)).add(f.scale(E*Math.sin(t)))));o.push(t)}else{let e,n=1/i,a=0;do e=P.add(y.scale(E*Math.cos(a)).add(f.scale(E*Math.sin(a)))),o.push(e),a+=n;while(!e.equalsWithEpsilon(s,E*n*1.1))o.push(s),r&&o.push(t)}return new u(o)}constructor(t){this._length=0,this._points=t,this._length=this._computeLength(t)}getPoints(){return this._points}length(){return this._length}continue(t){let e=this._points[this._points.length-1],s=this._points.slice(),i=t.getPoints();for(let t=1;t<i.length;t++)s.push(i[t].subtract(i[0]).add(e));return new u(s)}_computeLength(t){let e=0;for(let s=1;s<t.length;s++)e+=t[s].subtract(t[s-1]).length();return e}}t.s(["Angle",0,a,"Arc2",0,o,"BezierCurve",0,class{static Interpolate(t,e,s,i,n){if(0===t)return 0;let r=1-3*i+3*e,a=3*i-6*e,o=3*e,h=t;for(let e=0;e<5;e++){let e=h*h,s=e*h*r+a*e+o*h,i=1/(3*r*e+2*a*h+o);h-=(s-t)*i,h=Math.min(1,Math.max(0,h))}return 3*Math.pow(1-h,2)*h*s+3*(1-h)*Math.pow(h,2)*n+Math.pow(h,3)}},"Curve3",0,u,"Orientation",0,s,"Path2",0,h,"Path3D",0,l])},40780,t=>{"use strict";var e=t.i(29667);class s{constructor(){this._easingMode=s.EASINGMODE_EASEIN}setEasingMode(t){let e=Math.min(Math.max(t,0),2);this._easingMode=e}getEasingMode(){return this._easingMode}easeInCore(t){throw Error("You must implement this method")}ease(t){switch(this._easingMode){case s.EASINGMODE_EASEIN:return this.easeInCore(t);case s.EASINGMODE_EASEOUT:return 1-this.easeInCore(1-t)}return t>=.5?(1-this.easeInCore((1-t)*2))*.5+.5:.5*this.easeInCore(2*t)}}s.EASINGMODE_EASEIN=0,s.EASINGMODE_EASEOUT=1,s.EASINGMODE_EASEINOUT=2,t.s(["BackEase",0,class extends s{constructor(t=1){super(),this.amplitude=t}easeInCore(t){return Math.pow(t,3)-t*Math.max(0,this.amplitude)*Math.sin(3.141592653589793*t)}},"BezierCurveEase",0,class extends s{constructor(t=0,e=0,s=1,i=1){super(),this.x1=t,this.y1=e,this.x2=s,this.y2=i}easeInCore(t){return e.BezierCurve.Interpolate(t,this.x1,this.y1,this.x2,this.y2)}},"BounceEase",0,class extends s{constructor(t=3,e=2){super(),this.bounces=t,this.bounciness=e}easeInCore(t){let e=Math.max(0,this.bounces),s=this.bounciness;s<=1&&(s=1.001);let i=Math.pow(s,e),n=1-s,r=(1-i)/n+.5*i,a=Math.floor(Math.log(-(t*r)*(1-s)+1)/Math.log(s)),o=(1-Math.pow(s,a))/(n*r),h=(o+(1-Math.pow(s,a+1))/(n*r))*.5,l=t-h,u=h-o;return-Math.pow(1/s,e-a)/(u*u)*(l-u)*(l+u)}},"CircleEase",0,class extends s{easeInCore(t){return 1-Math.sqrt(1-(t=Math.max(0,Math.min(1,t)))*t)}},"CubicEase",0,class extends s{easeInCore(t){return t*t*t}},"EasingFunction",0,s,"ElasticEase",0,class extends s{constructor(t=3,e=3){super(),this.oscillations=t,this.springiness=e}easeInCore(t){let e=Math.max(0,this.oscillations),s=Math.max(0,this.springiness);return(0===s?t:(Math.exp(s*t)-1)/(Math.exp(s)-1))*Math.sin((6.283185307179586*e+1.5707963267948966)*t)}},"ExponentialEase",0,class extends s{constructor(t=2){super(),this.exponent=t}easeInCore(t){return this.exponent<=0?t:(Math.exp(this.exponent*t)-1)/(Math.exp(this.exponent)-1)}}])},63912,t=>{"use strict";var e,s,i=t.i(40780),n=t.i(17884),r=t.i(75105),a=t.i(44520);(e=s||(s={}))[e.CircleEase=0]="CircleEase",e[e.BackEase=1]="BackEase",e[e.BounceEase=2]="BounceEase",e[e.CubicEase=3]="CubicEase",e[e.ElasticEase=4]="ElasticEase",e[e.ExponentialEase=5]="ExponentialEase",e[e.PowerEase=6]="PowerEase",e[e.QuadraticEase=7]="QuadraticEase",e[e.QuarticEase=8]="QuarticEase",e[e.QuinticEase=9]="QuinticEase",e[e.SineEase=10]="SineEase",e[e.BezierCurveEase=11]="BezierCurveEase";class o extends n.FlowGraphBlock{constructor(t){super(t),this.config=t,this._easingFunctions={},this.type=this.registerDataInput("type",r.RichTypeAny,11),this.mode=this.registerDataInput("mode",r.RichTypeNumber,0),this.parameters=this.registerDataInput("parameters",r.RichTypeAny,[1,0,0,1]),this.easingFunction=this.registerDataOutput("easingFunction",r.RichTypeAny)}_updateOutputs(t){let e=this.type.getValue(t),s=this.mode.getValue(t),n=this.parameters.getValue(t);if(void 0===e||void 0===s)return;let r=`${e}-${s}-${n.join("-")}`;if(!this._easingFunctions[r]){let t=function(t,...e){switch(t){case 11:return new i.BezierCurveEase(...e);case 0:return new i.CircleEase;case 1:return new i.BackEase(...e);case 2:return new i.BounceEase(...e);case 3:return new i.CubicEase;case 4:return new i.ElasticEase(...e);case 5:return new i.ExponentialEase(...e);default:throw Error("Easing type not yet implemented")}}(e,...n);t.setEasingMode(s),this._easingFunctions[r]=t}this.easingFunction.setValue(this._easingFunctions[r],t)}getClassName(){return"FlowGraphEasingBlock"}}let h=!1;function l(){h||(h=!0,(0,a.RegisterClass)("FlowGraphEasingBlock",o))}t.s(["EasingFunctionType",0,s,"FlowGraphEasingBlock",0,o,"RegisterFlowGraphEasingBlock",0,l],99463),l(),t.s([],19035),t.i(19035),t.i(99463),t.s(["FlowGraphEasingBlock",0,o],63912)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,22001,18718,42166,41991,e=>{"use strict";let t,r,i,o,n,a,s,l,g,c,h,u,_,m,p,y,T,x,b,f,d,M;var j,P,L=e.i(8265),C=e.i(69400),N=e.i(8829),v=e.i(19919),R=e.i(57575),w=e.i(9855),A=e.i(90160),D=e.i(26924);let S=(n=A.Light,a=[],j=class extends n{constructor(){super(...arguments),this._position=(0,R.__runInitializers)(this,a),this._needProjectionMatrixCompute=!0,this._viewMatrix=C.Matrix.Identity(),this._projectionMatrix=C.Matrix.Identity()}_setPosition(e){this._position=e}get position(){return this._position}set position(e){this._setPosition(e)}_setDirection(e){this._direction=e}get direction(){return this._direction}set direction(e){this._setDirection(e)}get shadowMinZ(){return this._shadowMinZ}set shadowMinZ(e){this._shadowMinZ=e,this.forceProjectionMatrixCompute()}get shadowMaxZ(){return this._shadowMaxZ}set shadowMaxZ(e){this._shadowMaxZ=e,this.forceProjectionMatrixCompute()}computeTransformedInformation(){return!!this.parent&&!!this.parent.getWorldMatrix&&(this.transformedPosition||(this.transformedPosition=C.Vector3.Zero()),C.Vector3.TransformCoordinatesToRef(this.position,this.parent.getWorldMatrix(),this.transformedPosition),this.direction&&(this.transformedDirection||(this.transformedDirection=C.Vector3.Zero()),C.Vector3.TransformNormalToRef(this.direction,this.parent.getWorldMatrix(),this.transformedDirection)),!0)}getDepthScale(){return 50}getShadowDirection(e){return this.transformedDirection?this.transformedDirection:this.direction}getAbsolutePosition(){return this.transformedPosition?this.transformedPosition:this.position}setDirectionToTarget(e){return this.direction=C.Vector3.Normalize(e.subtract(this.position)),this.direction}getRotation(){this.direction.normalize();let e=C.Vector3.Cross(this.direction,D.Axis.Y),t=C.Vector3.Cross(e,this.direction);return C.Vector3.RotationFromAxis(e,t,this.direction)}needCube(){return!1}needProjectionMatrixCompute(){return this._needProjectionMatrixCompute}forceProjectionMatrixCompute(){this._needProjectionMatrixCompute=!0}_initCache(){super._initCache(),this._cache.position=C.Vector3.Zero()}_isSynchronized(){return!!this._cache.position.equals(this.position)}computeWorldMatrix(e){return!e&&this.isSynchronized()?this._currentRenderId=this.getScene().getRenderId():(this._updateCache(),this._cache.position.copyFrom(this.position),this._worldMatrix||(this._worldMatrix=C.Matrix.Identity()),C.Matrix.TranslationToRef(this.position.x,this.position.y,this.position.z,this._worldMatrix),this.parent&&this.parent.getWorldMatrix&&(this._worldMatrix.multiplyToRef(this.parent.getWorldMatrix(),this._worldMatrix),this._markSyncedWithParent()),this._worldMatrixDeterminantIsDirty=!0),this._worldMatrix}getDepthMinZ(e){return void 0!==this.shadowMinZ?this.shadowMinZ:e?.minZ||0}getDepthMaxZ(e){return void 0!==this.shadowMaxZ?this.shadowMaxZ:e?.maxZ||1e4}setShadowProjectionMatrix(e,t,r){return this.customProjectionMatrixBuilder?this.customProjectionMatrixBuilder(t,r,e):this._setDefaultShadowProjectionMatrix(e,t,r),this}_syncParentEnabledState(){super._syncParentEnabledState(),this.parent&&this.parent.getWorldMatrix||(this.transformedPosition=null,this.transformedDirection=null)}getViewMatrix(e){let t=C.TmpVectors.Vector3[0],r=this.position;this.computeTransformedInformation()&&(r=this.transformedPosition),C.Vector3.NormalizeToRef(this.getShadowDirection(e),t),1===Math.abs(C.Vector3.Dot(t,C.Vector3.Up()))&&(t.z=1e-13);let i=C.TmpVectors.Vector3[1];return r.addToRef(t,i),C.Matrix.LookAtLHToRef(r,i,C.Vector3.Up(),this._viewMatrix),this._viewMatrix}getProjectionMatrix(e,t){return this.setShadowProjectionMatrix(this._projectionMatrix,e??this._viewMatrix,t??[]),this._projectionMatrix}},s="function"==typeof Symbol&&Symbol.metadata?Object.create(n[Symbol.metadata]??null):void 0,t=[(0,w.serializeAsVector3)()],r=[(0,w.serializeAsVector3)()],i=[(0,w.serialize)()],o=[(0,w.serialize)()],(0,R.__esDecorate)(j,null,t,{kind:"getter",name:"position",static:!1,private:!1,access:{has:e=>"position"in e,get:e=>e.position},metadata:s},null,a),(0,R.__esDecorate)(j,null,r,{kind:"getter",name:"direction",static:!1,private:!1,access:{has:e=>"direction"in e,get:e=>e.direction},metadata:s},null,a),(0,R.__esDecorate)(j,null,i,{kind:"getter",name:"shadowMinZ",static:!1,private:!1,access:{has:e=>"shadowMinZ"in e,get:e=>e.shadowMinZ},metadata:s},null,a),(0,R.__esDecorate)(j,null,o,{kind:"getter",name:"shadowMaxZ",static:!1,private:!1,access:{has:e=>"shadowMaxZ"in e,get:e=>e.shadowMaxZ},metadata:s},null,a),s&&Object.defineProperty(j,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:s}),j);e.s(["ShadowLight",0,S],18718);var V=e.i(20363),F=e.i(52624),Z=e.i(44520);let I=(y=S,T=[],x=[],b=[],f=[],d=[],P=class extends y{get iesProfileTexture(){return this._iesProfileTexture}set iesProfileTexture(e){this._iesProfileTexture!==e&&(this._iesProfileTexture=e,this._iesProfileTexture&&P._IsTexture(this._iesProfileTexture)&&this._iesProfileTexture.onLoadObservable.addOnce(()=>{this._markMeshesAsLightDirty()}))}get angle(){return this._angle}set angle(e){this._angle=e,this._cosHalfAngle=Math.cos(.5*e),this._projectionTextureProjectionLightDirty=!0,this.forceProjectionMatrixCompute(),this._computeAngleValues()}get innerAngle(){return this._innerAngle}set innerAngle(e){this._innerAngle=e,this._computeAngleValues()}get shadowAngleScale(){return this._shadowAngleScale}set shadowAngleScale(e){this._shadowAngleScale=e,this.forceProjectionMatrixCompute()}get projectionTextureMatrix(){return this._projectionTextureMatrix}get projectionTextureLightNear(){return this._projectionTextureLightNear}set projectionTextureLightNear(e){this._projectionTextureLightNear=e,this._projectionTextureProjectionLightDirty=!0}get projectionTextureLightFar(){return this._projectionTextureLightFar}set projectionTextureLightFar(e){this._projectionTextureLightFar=e,this._projectionTextureProjectionLightDirty=!0}get projectionTextureUpDirection(){return this._projectionTextureUpDirection}set projectionTextureUpDirection(e){this._projectionTextureUpDirection=e,this._projectionTextureProjectionLightDirty=!0}get projectionTexture(){return this._projectionTexture}set projectionTexture(e){this._projectionTexture!==e&&(this._projectionTexture=e,this._projectionTextureDirty=!0,this._projectionTexture&&!this._projectionTexture.isReady()&&(P._IsProceduralTexture(this._projectionTexture)?this._projectionTexture.getEffect().executeWhenCompiled(()=>{this._markMeshesAsLightDirty()}):P._IsTexture(this._projectionTexture)&&this._projectionTexture.onLoadObservable.addOnce(()=>{this._markMeshesAsLightDirty()})))}static _IsProceduralTexture(e){return void 0!==e.onGeneratedObservable}static _IsTexture(e){return void 0!==e.onLoadObservable}get projectionTextureProjectionLightMatrix(){return this._projectionTextureProjectionLightMatrix}set projectionTextureProjectionLightMatrix(e){this._projectionTextureProjectionLightMatrix=e,this._projectionTextureProjectionLightDirty=!1,this._projectionTextureDirty=!0}constructor(e,t,r,i,o,n,a){super(e,n,a),this._angle=(0,R.__runInitializers)(this,T),this._innerAngle=0,this._iesProfileTexture=null,this.exponent=(0,R.__runInitializers)(this,x,void 0),this._projectionTextureMatrix=((0,R.__runInitializers)(this,b),C.Matrix.Zero()),this._projectionTextureLightNear=1e-6,this._projectionTextureLightFar=1e3,this._projectionTextureUpDirection=C.Vector3.Up(),this._projectionTexture=(0,R.__runInitializers)(this,f,void 0),this._projectionTextureViewLightDirty=((0,R.__runInitializers)(this,d),!0),this._projectionTextureProjectionLightDirty=!0,this._projectionTextureDirty=!0,this._projectionTextureViewTargetVector=C.Vector3.Zero(),this._projectionTextureViewLightMatrix=C.Matrix.Zero(),this._projectionTextureProjectionLightMatrix=C.Matrix.Zero(),this._projectionTextureScalingMatrix=C.Matrix.FromValues(.5,0,0,0,0,.5,0,0,0,0,.5,0,.5,.5,.5,1),this.position=t,this.direction=r,this.angle=i,this.exponent=o}getClassName(){return"SpotLight"}getTypeID(){return A.Light.LIGHTTYPEID_SPOTLIGHT}_setDirection(e){super._setDirection(e),this._projectionTextureViewLightDirty=!0}_setPosition(e){super._setPosition(e),this._projectionTextureViewLightDirty=!0}_setDefaultShadowProjectionMatrix(e,t,r){let i=this.getScene().activeCamera;if(!i)return;this._shadowAngleScale=this._shadowAngleScale||1;let o=this._shadowAngleScale*this._angle,n=void 0!==this.shadowMinZ?this.shadowMinZ:i.minZ,a=void 0!==this.shadowMaxZ?this.shadowMaxZ:i.maxZ,s=this.getScene().getEngine().useReverseDepthBuffer;C.Matrix.PerspectiveFovLHToRef(o,1,s?a:n,s?n:a,e,!0,this._scene.getEngine().isNDCHalfZRange,void 0,s)}_computeProjectionTextureViewLightMatrix(){this._projectionTextureViewLightDirty=!1,this._projectionTextureDirty=!0,this.getAbsolutePosition().addToRef(this.getShadowDirection(),this._projectionTextureViewTargetVector),C.Matrix.LookAtLHToRef(this.getAbsolutePosition(),this._projectionTextureViewTargetVector,this._projectionTextureUpDirection,this._projectionTextureViewLightMatrix)}_computeProjectionTextureProjectionLightMatrix(){this._projectionTextureProjectionLightDirty=!1,this._projectionTextureDirty=!0;let e=this.projectionTextureLightFar,t=this.projectionTextureLightNear,r=e/(e-t),i=1/Math.tan(this._angle/2);C.Matrix.FromValuesToRef(i/1,0,0,0,0,i,0,0,0,0,r,1,0,0,-r*t,0,this._projectionTextureProjectionLightMatrix)}_computeProjectionTextureMatrix(){if(this._projectionTextureDirty=!1,this._projectionTextureViewLightMatrix.multiplyToRef(this._projectionTextureProjectionLightMatrix,this._projectionTextureMatrix),this._projectionTexture instanceof V.Texture){let e=this._projectionTexture.uScale/2,t=this._projectionTexture.vScale/2;C.Matrix.FromValuesToRef(e,0,0,0,0,t,0,0,0,0,.5,0,.5,.5,.5,1,this._projectionTextureScalingMatrix)}this._projectionTextureMatrix.multiplyToRef(this._projectionTextureScalingMatrix,this._projectionTextureMatrix)}_buildUniformLayout(){this._uniformBuffer.addUniform("vLightData",4),this._uniformBuffer.addUniform("vLightDiffuse",4),this._uniformBuffer.addUniform("vLightSpecular",4),this._uniformBuffer.addUniform("vLightDirection",3),this._uniformBuffer.addUniform("vLightFalloff",4),this._uniformBuffer.addUniform("shadowsInfo",3),this._uniformBuffer.addUniform("depthValues",2),this._uniformBuffer.create()}_computeAngleValues(){this._lightAngleScale=1/Math.max(.001,Math.cos(.5*this._innerAngle)-this._cosHalfAngle),this._lightAngleOffset=-this._cosHalfAngle*this._lightAngleScale}transferTexturesToEffect(e,t){return this.projectionTexture&&this.projectionTexture.isReady()&&(this._projectionTextureViewLightDirty&&this._computeProjectionTextureViewLightMatrix(),this._projectionTextureProjectionLightDirty&&this._computeProjectionTextureProjectionLightMatrix(),this._projectionTextureDirty&&this._computeProjectionTextureMatrix(),e.setMatrix("textureProjectionMatrix"+t,this._projectionTextureMatrix),e.setTexture("projectionLightTexture"+t,this.projectionTexture)),this._iesProfileTexture&&this._iesProfileTexture.isReady()&&e.setTexture("iesLightTexture"+t,this._iesProfileTexture),this}transferToEffect(e,t){let r,i=this._scene.floatingOriginOffset;return this.computeTransformedInformation()?(this._uniformBuffer.updateFloat4("vLightData",this.transformedPosition.x-i.x,this.transformedPosition.y-i.y,this.transformedPosition.z-i.z,this.exponent,t),r=C.Vector3.Normalize(this.transformedDirection)):(this._uniformBuffer.updateFloat4("vLightData",this.position.x-i.x,this.position.y-i.y,this.position.z-i.z,this.exponent,t),r=C.Vector3.Normalize(this.direction)),this._uniformBuffer.updateFloat4("vLightDirection",r.x,r.y,r.z,this._cosHalfAngle,t),this._uniformBuffer.updateFloat4("vLightFalloff",this.range,this._inverseSquaredRange,this._lightAngleScale,this._lightAngleOffset,t),this}transferToNodeMaterialEffect(e,t){let r;return r=this.computeTransformedInformation()?C.Vector3.Normalize(this.transformedDirection):C.Vector3.Normalize(this.direction),this.getScene().useRightHandedSystem?e.setFloat3(t,-r.x,-r.y,-r.z):e.setFloat3(t,r.x,r.y,r.z),this}dispose(){super.dispose(),this._projectionTexture&&this._projectionTexture.dispose(),this._iesProfileTexture&&(this._iesProfileTexture.dispose(),this._iesProfileTexture=null)}getDepthMinZ(e){let t=this._scene.getEngine(),r=void 0!==this.shadowMinZ?this.shadowMinZ:e?.minZ??0;return t.useReverseDepthBuffer&&t.isNDCHalfZRange?r:this._scene.getEngine().isNDCHalfZRange?0:r}getDepthMaxZ(e){let t=this._scene.getEngine(),r=void 0!==this.shadowMaxZ?this.shadowMaxZ:e?.maxZ??1e4;return t.useReverseDepthBuffer&&t.isNDCHalfZRange?0:r}areLightTexturesReady(){return(!this._projectionTexture||!!this._projectionTexture.isReadyOrNotBlocking())&&(!this._iesProfileTexture||!!this._iesProfileTexture.isReadyOrNotBlocking())}prepareLightSpecificDefines(e,t){e["SPOTLIGHT"+t]=!0,e["PROJECTEDLIGHTTEXTURE"+t]=!!(this.projectionTexture&&this.projectionTexture.isReady()),e["IESLIGHTTEXTURE"+t]=!!(this._iesProfileTexture&&this._iesProfileTexture.isReady())}},M="function"==typeof Symbol&&Symbol.metadata?Object.create(y[Symbol.metadata]??null):void 0,l=[(0,w.serialize)()],g=[(0,w.serialize)()],c=[(0,w.serialize)()],h=[(0,w.serialize)()],u=[(0,w.serialize)()],_=[(0,w.serialize)()],m=[(0,w.serialize)()],p=[(0,w.serializeAsTexture)("projectedLightTexture")],(0,R.__esDecorate)(P,null,l,{kind:"getter",name:"angle",static:!1,private:!1,access:{has:e=>"angle"in e,get:e=>e.angle},metadata:M},null,T),(0,R.__esDecorate)(P,null,g,{kind:"getter",name:"innerAngle",static:!1,private:!1,access:{has:e=>"innerAngle"in e,get:e=>e.innerAngle},metadata:M},null,T),(0,R.__esDecorate)(P,null,c,{kind:"getter",name:"shadowAngleScale",static:!1,private:!1,access:{has:e=>"shadowAngleScale"in e,get:e=>e.shadowAngleScale},metadata:M},null,T),(0,R.__esDecorate)(P,null,u,{kind:"getter",name:"projectionTextureLightNear",static:!1,private:!1,access:{has:e=>"projectionTextureLightNear"in e,get:e=>e.projectionTextureLightNear},metadata:M},null,T),(0,R.__esDecorate)(P,null,_,{kind:"getter",name:"projectionTextureLightFar",static:!1,private:!1,access:{has:e=>"projectionTextureLightFar"in e,get:e=>e.projectionTextureLightFar},metadata:M},null,T),(0,R.__esDecorate)(P,null,m,{kind:"getter",name:"projectionTextureUpDirection",static:!1,private:!1,access:{has:e=>"projectionTextureUpDirection"in e,get:e=>e.projectionTextureUpDirection},metadata:M},null,T),(0,R.__esDecorate)(null,null,h,{kind:"field",name:"exponent",static:!1,private:!1,access:{has:e=>"exponent"in e,get:e=>e.exponent,set:(e,t)=>{e.exponent=t}},metadata:M},x,b),(0,R.__esDecorate)(null,null,p,{kind:"field",name:"_projectionTexture",static:!1,private:!1,access:{has:e=>"_projectionTexture"in e,get:e=>e._projectionTexture,set:(e,t)=>{e._projectionTexture=t}},metadata:M},f,d),M&&Object.defineProperty(P,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:M}),P),H=!1;e.s(["RegisterSpotLight",0,function(){H||(H=!0,F.Node.AddNodeConstructor("Light_Type_2",(e,t)=>()=>new I(e,C.Vector3.Zero(),C.Vector3.Zero(),0,0,t)),(0,Z.RegisterClass)("BABYLON.SpotLight",I))},"SpotLight",0,I],42166);let O=[{regex:RegExp("^/nodes/\\d+/extensions/")}];class z{constructor(e,t){this._gltf=e,this._infoTree=t}convert(e){let t,r=this._gltf,i=this._infoTree;if(!e.startsWith("/"))throw Error("Path must start with a /");let o=e.split("/");if(o.shift(),o[o.length-1].includes(".length")){let e=o[o.length-1].split(".");o.pop(),o.push(...e)}let n=!1;for(let a of o){let o="length"===a;if(o&&!i.__array__)throw Error(`Path ${e} is invalid`);if(i.__ignoreObjectTree__&&(n=!0),i.__array__&&!o)i=i.__array__;else if(!(i=i[a]))throw Error(`Path ${e} is invalid`);if(!n)if(void 0===r){if(!O.find(t=>t.regex.test(e)))throw Error(`Path ${e} is invalid`)}else o||(r=r?.[a]);(i.__target__||o)&&(t=r)}return{object:t,info:i}}}function K(e,t,r,i){let o=E(e,t);return i?o[r][i]:o[r]}function E(e,t,r){return e._data?.[r?.fillMode??N.Constants.MATERIAL_TriangleFillMode]?.babylonMaterial}function k(e,t){return{offset:{componentsCount:2,type:"Vector2",get:(r,i,o)=>{let n=K(r,o,e,t);return new C.Vector2(n?.uOffset,n?.vOffset)},getTarget:E,set:(r,i,o,n)=>{let a=K(i,n,e,t);a.uOffset=r.x,a.vOffset=r.y},getPropertyName:[()=>`${e}${t?"."+t:""}.uOffset`,()=>`${e}${t?"."+t:""}.vOffset`]},rotation:{type:"number",get:(r,i,o)=>K(r,o,e,t)?.wAng,getTarget:E,set:(r,i,o,n)=>K(i,n,e,t).wAng=r,getPropertyName:[()=>`${e}${t?"."+t:""}.wAng`]},scale:{componentsCount:2,type:"Vector2",get:(r,i,o)=>{let n=K(r,o,e,t);return new C.Vector2(n?.uScale,n?.vScale)},getTarget:E,set:(r,i,o,n)=>{let a=K(i,n,e,t);a.uScale=r.x,a.vScale=r.y},getPropertyName:[()=>`${e}${t?"."+t:""}.uScale`,()=>`${e}${t?"."+t:""}.vScale`]}}}let B={cameras:{__array__:{__target__:!0,orthographic:{xmag:{componentsCount:2,type:"Vector2",get:e=>new C.Vector2(e._babylonCamera?.orthoLeft??0,e._babylonCamera?.orthoRight??0),set:(e,t)=>{t._babylonCamera&&(t._babylonCamera.orthoLeft=e.x,t._babylonCamera.orthoRight=e.y)},getTarget:e=>e,getPropertyName:[()=>"orthoLeft",()=>"orthoRight"]},ymag:{componentsCount:2,type:"Vector2",get:e=>new C.Vector2(e._babylonCamera?.orthoBottom??0,e._babylonCamera?.orthoTop??0),set:(e,t)=>{t._babylonCamera&&(t._babylonCamera.orthoBottom=e.x,t._babylonCamera.orthoTop=e.y)},getTarget:e=>e,getPropertyName:[()=>"orthoBottom",()=>"orthoTop"]},zfar:{type:"number",get:e=>e._babylonCamera?.maxZ,set:(e,t)=>{t._babylonCamera&&(t._babylonCamera.maxZ=e)},getTarget:e=>e,getPropertyName:[()=>"maxZ"]},znear:{type:"number",get:e=>e._babylonCamera?.minZ,set:(e,t)=>{t._babylonCamera&&(t._babylonCamera.minZ=e)},getTarget:e=>e,getPropertyName:[()=>"minZ"]}},perspective:{aspectRatio:{type:"number",get:e=>e._babylonCamera?.getEngine().getAspectRatio(e._babylonCamera),getTarget:e=>e,getPropertyName:[()=>"aspectRatio"],isReadOnly:!0},yfov:{type:"number",get:e=>e._babylonCamera?.fov,set:(e,t)=>{t._babylonCamera&&(t._babylonCamera.fov=e)},getTarget:e=>e,getPropertyName:[()=>"fov"]},zfar:{type:"number",get:e=>e._babylonCamera?.maxZ,set:(e,t)=>{t._babylonCamera&&(t._babylonCamera.maxZ=e)},getTarget:e=>e,getPropertyName:[()=>"maxZ"]},znear:{type:"number",get:e=>e._babylonCamera?.minZ,set:(e,t)=>{t._babylonCamera&&(t._babylonCamera.minZ=e)},getTarget:e=>e,getPropertyName:[()=>"minZ"]}}}},nodes:{length:{type:"number",get:e=>e.length,getTarget:e=>e.map(e=>e._babylonTransformNode),getPropertyName:[()=>"length"]},__array__:{__target__:!0,translation:{type:"Vector3",get:e=>e._babylonTransformNode?.position,set:(e,t)=>t._babylonTransformNode?.position.copyFrom(e),getTarget:e=>e._babylonTransformNode,getPropertyName:[()=>"position"]},rotation:{type:"Quaternion",get:e=>e._babylonTransformNode?.rotationQuaternion,set:(e,t)=>t._babylonTransformNode?.rotationQuaternion?.copyFrom(e),getTarget:e=>e._babylonTransformNode,getPropertyName:[()=>"rotationQuaternion"]},scale:{type:"Vector3",get:e=>e._babylonTransformNode?.scaling,set:(e,t)=>t._babylonTransformNode?.scaling.copyFrom(e),getTarget:e=>e._babylonTransformNode,getPropertyName:[()=>"scaling"]},weights:{length:{type:"number",get:e=>e._numMorphTargets,getTarget:e=>e._babylonTransformNode,getPropertyName:[()=>"influence"]},__array__:{__target__:!0,type:"number",get:(e,t)=>void 0!==t?e._primitiveBabylonMeshes?.[0].morphTargetManager?.getTarget(t).influence:void 0,getTarget:e=>e._babylonTransformNode,getPropertyName:[()=>"influence"]},type:"number[]",get:(e,t)=>[0],getTarget:e=>e._babylonTransformNode,getPropertyName:[()=>"influence"]},matrix:{type:"Matrix",get:e=>C.Matrix.Compose(e._babylonTransformNode?.scaling,e._babylonTransformNode?.rotationQuaternion,e._babylonTransformNode?.position),getTarget:e=>e._babylonTransformNode,isReadOnly:!0},globalMatrix:{type:"Matrix",get:e=>{let t=C.Matrix.Identity(),r=e.parent;for(;r&&r.parent;)r=r.parent;let i=e._babylonTransformNode?.position._isDirty||e._babylonTransformNode?.rotationQuaternion?._isDirty||e._babylonTransformNode?.scaling._isDirty;if(r){let o=r._babylonTransformNode?.computeWorldMatrix(!0).invert();o&&e._babylonTransformNode?.computeWorldMatrix(i)?.multiplyToRef(o,t)}else e._babylonTransformNode&&t.copyFrom(e._babylonTransformNode.computeWorldMatrix(i));return t},getTarget:e=>e._babylonTransformNode,isReadOnly:!0},extensions:{EXT_lights_ies:{multiplier:{type:"number",get:e=>e._babylonTransformNode?.getChildren(e=>e instanceof I,!0)[0]?.intensity,getTarget:e=>e._babylonTransformNode?.getChildren(e=>e instanceof I,!0)[0],set:(e,t)=>{if(t._babylonTransformNode){let r=t._babylonTransformNode.getChildren(e=>e instanceof I,!0)[0];r&&(r.intensity=e)}}},color:{type:"Color3",get:e=>e._babylonTransformNode?.getChildren(e=>e instanceof I,!0)[0]?.diffuse,getTarget:e=>e._babylonTransformNode?.getChildren(e=>e instanceof I,!0)[0],set:(e,t)=>{if(t._babylonTransformNode){let r=t._babylonTransformNode.getChildren(e=>e instanceof I,!0)[0];r&&(r.diffuse=e)}}}},KHR_node_visibility:{visible:{type:"boolean",get:e=>!!e._primitiveBabylonMeshes&&e._primitiveBabylonMeshes[0].isVisible,getTarget:()=>void 0,set:(e,t)=>{t._primitiveBabylonMeshes&&t._primitiveBabylonMeshes.forEach(t=>t.isVisible=e)}}}}}},materials:{__array__:{__target__:!0,emissiveFactor:{type:"Color3",get:(e,t,r)=>E(e,t,r).emissiveColor,set:(e,t,r,i)=>E(t,r,i).emissiveColor.copyFrom(e),getTarget:(e,t,r)=>E(e,t,r),getPropertyName:[()=>"emissiveColor"]},emissiveTexture:{extensions:{KHR_texture_transform:k("emissiveTexture")}},normalTexture:{scale:{type:"number",get:(e,t,r)=>K(e,r,"bumpTexture")?.level,set:(e,t,r,i)=>{let o=K(t,i,"bumpTexture");o&&(o.level=e)},getTarget:(e,t,r)=>E(e,t,r),getPropertyName:[()=>"level"]},extensions:{KHR_texture_transform:k("bumpTexture")}},occlusionTexture:{strength:{type:"number",get:(e,t,r)=>E(e,t,r).ambientTextureStrength,set:(e,t,r,i)=>{let o=E(t,r,i);o&&(o.ambientTextureStrength=e)},getTarget:(e,t,r)=>E(e,t,r),getPropertyName:[()=>"ambientTextureStrength"]},extensions:{KHR_texture_transform:k("ambientTexture")}},pbrMetallicRoughness:{baseColorFactor:{type:"Color4",get:(e,t,r)=>{let i=E(e,t,r);return v.Color4.FromColor3(i.albedoColor,i.alpha)},set:(e,t,r,i)=>{let o=E(t,r,i);o.albedoColor.set(e.r,e.g,e.b),o.alpha=e.a},getTarget:(e,t,r)=>E(e,t,r),getPropertyName:[()=>"albedoColor",()=>"alpha"]},baseColorTexture:{extensions:{KHR_texture_transform:k("albedoTexture")}},metallicFactor:{type:"number",get:(e,t,r)=>E(e,t,r).metallic,set:(e,t,r,i)=>{let o=E(t,r,i);o&&(o.metallic=e)},getTarget:(e,t,r)=>E(e,t,r),getPropertyName:[()=>"metallic"]},roughnessFactor:{type:"number",get:(e,t,r)=>E(e,t,r).roughness,set:(e,t,r,i)=>{let o=E(t,r,i);o&&(o.roughness=e)},getTarget:(e,t,r)=>E(e,t,r),getPropertyName:[()=>"roughness"]},metallicRoughnessTexture:{extensions:{KHR_texture_transform:k("metallicTexture")}}},extensions:{KHR_materials_anisotropy:{anisotropyStrength:{type:"number",get:(e,t,r)=>E(e,t,r).anisotropy.intensity,set:(e,t,r,i)=>{E(t,r,i).anisotropy.intensity=e},getTarget:(e,t,r)=>E(e,t,r),getPropertyName:[()=>"anisotropy.intensity"]},anisotropyRotation:{type:"number",get:(e,t,r)=>E(e,t,r).anisotropy.angle,set:(e,t,r,i)=>{E(t,r,i).anisotropy.angle=e},getTarget:(e,t,r)=>E(e,t,r),getPropertyName:[()=>"anisotropy.angle"]},anisotropyTexture:{extensions:{KHR_texture_transform:k("anisotropy","texture")}}},KHR_materials_clearcoat:{clearcoatFactor:{type:"number",get:(e,t,r)=>E(e,t,r).clearCoat.intensity,set:(e,t,r,i)=>{E(t,r,i).clearCoat.intensity=e},getTarget:(e,t,r)=>E(e,t,r),getPropertyName:[()=>"clearCoat.intensity"]},clearcoatRoughnessFactor:{type:"number",get:(e,t,r)=>E(e,t,r).clearCoat.roughness,set:(e,t,r,i)=>{E(t,r,i).clearCoat.roughness=e},getTarget:(e,t,r)=>E(e,t,r),getPropertyName:[()=>"clearCoat.roughness"]},clearcoatTexture:{extensions:{KHR_texture_transform:k("clearCoat","texture")}},clearcoatNormalTexture:{scale:{type:"number",get:(e,t,r)=>E(e,t,r).clearCoat.bumpTexture?.level,getTarget:E,set:(e,t,r,i)=>E(t,r,i).clearCoat.bumpTexture.level=e},extensions:{KHR_texture_transform:k("clearCoat","bumpTexture")}},clearcoatRoughnessTexture:{extensions:{KHR_texture_transform:k("clearCoat","textureRoughness")}}},KHR_materials_dispersion:{dispersion:{type:"number",get:(e,t,r)=>E(e,t,r).subSurface.dispersion,getTarget:E,set:(e,t,r,i)=>E(t,r,i).subSurface.dispersion=e}},KHR_materials_emissive_strength:{emissiveStrength:{type:"number",get:(e,t,r)=>E(e,t,r).emissiveIntensity,getTarget:E,set:(e,t,r,i)=>E(t,r,i).emissiveIntensity=e}},KHR_materials_ior:{ior:{type:"number",get:(e,t,r)=>E(e,t,r).indexOfRefraction,getTarget:E,set:(e,t,r,i)=>E(t,r,i).indexOfRefraction=e}},KHR_materials_iridescence:{iridescenceFactor:{type:"number",get:(e,t,r)=>E(e,t,r).iridescence.intensity,getTarget:E,set:(e,t,r,i)=>E(t,r,i).iridescence.intensity=e},iridescenceIor:{type:"number",get:(e,t,r)=>E(e,t,r).iridescence.indexOfRefraction,getTarget:E,set:(e,t,r,i)=>E(t,r,i).iridescence.indexOfRefraction=e},iridescenceTexture:{extensions:{KHR_texture_transform:k("iridescence","texture")}},iridescenceThicknessMaximum:{type:"number",get:(e,t,r)=>E(e,t,r).iridescence.maximumThickness,getTarget:E,set:(e,t,r,i)=>E(t,r,i).iridescence.maximumThickness=e},iridescenceThicknessMinimum:{type:"number",get:(e,t,r)=>E(e,t,r).iridescence.minimumThickness,getTarget:E,set:(e,t,r,i)=>E(t,r,i).iridescence.minimumThickness=e},iridescenceThicknessTexture:{extensions:{KHR_texture_transform:k("iridescence","thicknessTexture")}}},KHR_materials_sheen:{sheenColorFactor:{type:"Color3",get:(e,t,r)=>E(e,t,r).sheen.color,getTarget:E,set:(e,t,r,i)=>E(t,r,i).sheen.color.copyFrom(e)},sheenColorTexture:{extensions:{KHR_texture_transform:k("sheen","texture")}},sheenRoughnessFactor:{type:"number",get:(e,t,r)=>E(e,t,r).sheen.intensity,getTarget:E,set:(e,t,r,i)=>E(t,r,i).sheen.intensity=e},sheenRoughnessTexture:{extensions:{KHR_texture_transform:k("sheen","thicknessTexture")}}},KHR_materials_specular:{specularFactor:{type:"number",get:(e,t,r)=>E(e,t,r).metallicF0Factor,getTarget:E,set:(e,t,r,i)=>E(t,r,i).metallicF0Factor=e,getPropertyName:[()=>"metallicF0Factor"]},specularColorFactor:{type:"Color3",get:(e,t,r)=>E(e,t,r).metallicReflectanceColor,getTarget:E,set:(e,t,r,i)=>E(t,r,i).metallicReflectanceColor.copyFrom(e),getPropertyName:[()=>"metallicReflectanceColor"]},specularTexture:{extensions:{KHR_texture_transform:k("metallicReflectanceTexture")}},specularColorTexture:{extensions:{KHR_texture_transform:k("reflectanceTexture")}}},KHR_materials_transmission:{transmissionFactor:{type:"number",get:(e,t,r)=>E(e,t,r).subSurface.refractionIntensity,getTarget:E,set:(e,t,r,i)=>E(t,r,i).subSurface.refractionIntensity=e,getPropertyName:[()=>"subSurface.refractionIntensity"]},transmissionTexture:{extensions:{KHR_texture_transform:k("subSurface","refractionIntensityTexture")}}},KHR_materials_diffuse_transmission:{diffuseTransmissionFactor:{type:"number",get:(e,t,r)=>E(e,t,r).subSurface.translucencyIntensity,getTarget:E,set:(e,t,r,i)=>E(t,r,i).subSurface.translucencyIntensity=e},diffuseTransmissionTexture:{extensions:{KHR_texture_transform:k("subSurface","translucencyIntensityTexture")}},diffuseTransmissionColorFactor:{type:"Color3",get:(e,t,r)=>E(e,t,r).subSurface.translucencyColor,getTarget:E,set:(e,t,r,i)=>e&&E(t,r,i).subSurface.translucencyColor?.copyFrom(e)},diffuseTransmissionColorTexture:{extensions:{KHR_texture_transform:k("subSurface","translucencyColorTexture")}}},KHR_materials_volume:{attenuationColor:{type:"Color3",get:(e,t,r)=>E(e,t,r).subSurface.tintColor,getTarget:E,set:(e,t,r,i)=>E(t,r,i).subSurface.tintColor.copyFrom(e)},attenuationDistance:{type:"number",get:(e,t,r)=>E(e,t,r).subSurface.tintColorAtDistance,getTarget:E,set:(e,t,r,i)=>E(t,r,i).subSurface.tintColorAtDistance=e},thicknessFactor:{type:"number",get:(e,t,r)=>E(e,t,r).subSurface.maximumThickness,getTarget:E,set:(e,t,r,i)=>E(t,r,i).subSurface.maximumThickness=e},thicknessTexture:{extensions:{KHR_texture_transform:k("subSurface","thicknessTexture")}}}}}},extensions:{KHR_lights_punctual:{lights:{length:{type:"number",get:e=>e.length,getTarget:e=>e.map(e=>e._babylonLight),getPropertyName:[e=>"length"]},__array__:{__target__:!0,color:{type:"Color3",get:e=>e._babylonLight?.diffuse,set:(e,t)=>t._babylonLight?.diffuse.copyFrom(e),getTarget:e=>e._babylonLight,getPropertyName:[e=>"diffuse"]},intensity:{type:"number",get:e=>e._babylonLight?.intensity,set:(e,t)=>t._babylonLight?t._babylonLight.intensity=e:void 0,getTarget:e=>e._babylonLight,getPropertyName:[e=>"intensity"]},range:{type:"number",get:e=>e._babylonLight?.range,set:(e,t)=>t._babylonLight?t._babylonLight.range=e:void 0,getTarget:e=>e._babylonLight,getPropertyName:[e=>"range"]},spot:{innerConeAngle:{type:"number",get:e=>e._babylonLight?.innerAngle,set:(e,t)=>t._babylonLight?t._babylonLight.innerAngle=e:void 0,getTarget:e=>e._babylonLight,getPropertyName:[e=>"innerConeAngle"]},outerConeAngle:{type:"number",get:e=>e._babylonLight?.angle,set:(e,t)=>t._babylonLight?t._babylonLight.angle=e:void 0,getTarget:e=>e._babylonLight,getPropertyName:[e=>"outerConeAngle"]}}}}},EXT_lights_area:{lights:{length:{type:"number",get:e=>e.length,getTarget:e=>e.map(e=>e._babylonLight),getPropertyName:[e=>"length"]},__array__:{__target__:!0,color:{type:"Color3",get:e=>e._babylonLight?.diffuse,set:(e,t)=>t._babylonLight?.diffuse.copyFrom(e),getTarget:e=>e._babylonLight,getPropertyName:[e=>"diffuse"]},intensity:{type:"number",get:e=>e._babylonLight?.intensity,set:(e,t)=>t._babylonLight?t._babylonLight.intensity=e:void 0,getTarget:e=>e._babylonLight,getPropertyName:[e=>"intensity"]},size:{type:"number",get:e=>e._babylonLight?.height,set:(e,t)=>t._babylonLight?t._babylonLight.height=e:void 0,getTarget:e=>e._babylonLight,getPropertyName:[e=>"size"]},rect:{aspect:{type:"number",get:e=>e._babylonLight?.width/e._babylonLight?.height,set:(e,t)=>t._babylonLight?t._babylonLight.width=e*t._babylonLight.height:void 0,getTarget:e=>e._babylonLight,getPropertyName:[e=>"aspect"]}}}}},EXT_lights_ies:{lights:{length:{type:"number",get:e=>e.length,getTarget:e=>e.map(e=>e._babylonLight),getPropertyName:[e=>"length"]}}},EXT_lights_image_based:{lights:{length:{type:"number",get:e=>e.length,getTarget:e=>e.map(e=>e._babylonTexture),getPropertyName:[e=>"length"]},__array__:{__target__:!0,intensity:{type:"number",get:e=>e._babylonTexture?.level,set:(e,t)=>{t._babylonTexture&&(t._babylonTexture.level=e)},getTarget:e=>e._babylonTexture},rotation:{type:"Quaternion",get:e=>e._babylonTexture&&C.Quaternion.FromRotationMatrix(e._babylonTexture?.getReflectionTextureMatrix()),set:(e,t)=>{t._babylonTexture&&(t._babylonTexture.getScene()?.useRightHandedSystem||(e=C.Quaternion.Inverse(e)),C.Matrix.FromQuaternionToRef(e,t._babylonTexture.getReflectionTextureMatrix()))},getTarget:e=>e._babylonTexture}}}}},animations:{length:{type:"number",get:e=>e.length,getTarget:e=>e.map(e=>e._babylonAnimationGroup),getPropertyName:[()=>"length"]},__array__:{}},meshes:{length:{type:"number",get:e=>e.length,getTarget:e=>e.map(e=>e.primitives[0]._instanceData?.babylonSourceMesh),getPropertyName:[()=>"length"]},__array__:{}}};function U(e,t){let r=e.split("/").map(e=>e.replace(/{}/g,"__array__")),i=B;for(let e of r)e&&(i=i[e]);i&&i.type&&i.get&&(i.interpolation=t)}function W(e,t,r,i){return C.Vector3.FromArray(t,r).scaleInPlace(i)}function $(e,t,r,i){return C.Quaternion.FromArray(t,r).scaleInPlace(i)}function Q(e,t,r,i){let o=Array(e._numMorphTargets);for(let e=0;e<o.length;e++)o[e]=t[r++]*i;return o}e.s(["AddObjectAccessorToKey",0,function(e,t){let r=e.split("/").map(e=>e.replace(/{}/g,"__array__")),i=B;for(let e of r)if(e){if(!i[e]){if("?"===e){i.__ignoreObjectTree__=!0;continue}i[e]={},"__array__"===e&&(i[e].__target__=!0)}i=i[e]}Object.assign(i,t)},"GetMappingForKey",0,function(e){let t=e.split("/").map(e=>e.replace(/{}/g,"__array__")),r=B;for(let e of t)e&&(r=r[e]);if(r&&r.type&&r.get)return r},"GetPathToObjectConverter",0,function(e){return new z(e,B)},"SetInterpolationForKey",0,U],41991);class G{constructor(e,t,r,i){this.type=e,this.name=t,this.getValue=r,this.getStride=i}_buildAnimation(e,t,r){let i=new L.Animation(e,this.name,t,this.type);return i.setKeys(r,!0),i}}class Y extends G{buildAnimations(e,t,r,i){let o=[];return o.push({babylonAnimatable:e._babylonTransformNode,babylonAnimation:this._buildAnimation(t,r,i)}),o}}class X extends G{buildAnimations(e,t,r,i){let o=[];if(e._numMorphTargets)for(let n=0;n<e._numMorphTargets;n++){let a=new L.Animation(`${t}_${n}`,this.name,r,this.type);if(a.setKeys(i.map(e=>({frame:e.frame,inTangent:e.inTangent?e.inTangent[n]:void 0,value:e.value[n],outTangent:e.outTangent?e.outTangent[n]:void 0,interpolation:e.interpolation})),!0),e._primitiveBabylonMeshes){for(let t of e._primitiveBabylonMeshes)if(t.morphTargetManager){let e=t.morphTargetManager.getTarget(n),r=a.clone();e.animations.push(r),o.push({babylonAnimatable:e,babylonAnimation:r})}}}return o}}U("/nodes/{}/translation",[new Y(L.Animation.ANIMATIONTYPE_VECTOR3,"position",W,()=>3)]),U("/nodes/{}/rotation",[new Y(L.Animation.ANIMATIONTYPE_QUATERNION,"rotationQuaternion",$,()=>4)]),U("/nodes/{}/scale",[new Y(L.Animation.ANIMATIONTYPE_VECTOR3,"scaling",W,()=>3)]),U("/nodes/{}/weights",[new X(L.Animation.ANIMATIONTYPE_FLOAT,"influence",Q,e=>e._numMorphTargets)]),e.s(["AnimationPropertyInfo",0,G,"TransformNodeAnimationPropertyInfo",0,Y,"WeightAnimationPropertyInfo",0,X,"getQuaternion",0,$,"getVector3",0,W,"getWeights",0,Q],22001)}]);
|