@uptimizr/dashboard 0.4.6 → 0.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (383) hide show
  1. package/out/404.html +1 -1
  2. package/out/__next.__PAGE__.txt +19 -5
  3. package/out/__next._full.txt +10 -10
  4. package/out/__next._tree.txt +1 -1
  5. package/out/_next/static/chunks/{2-_a-v1xeo5hb.js → 0-_j1khfoib6l.js} +116 -115
  6. package/out/_next/static/chunks/{25brs445bjbik.js → 005bbq_px7lke.js} +2 -2
  7. package/out/_next/static/chunks/00fbhtmui-yxg.js +1 -0
  8. package/out/_next/static/chunks/017pn-pen381_.js +1 -0
  9. package/out/_next/static/chunks/01vov6inx1zzt.js +1 -0
  10. package/out/_next/static/chunks/{2x-7kbwq8tl-o.js → 02qk_wmkf9at-.js} +196 -196
  11. package/out/_next/static/chunks/03bd5plut08tg.js +1 -0
  12. package/out/_next/static/chunks/03dwfqmo73w_z.js +1 -0
  13. package/out/_next/static/chunks/03sn4419dam-h.js +5 -0
  14. package/out/_next/static/chunks/05ere0-228syf.js +1 -0
  15. package/out/_next/static/chunks/{1jjw9hxgi2vzi.js → 05h8u5lrypn5m.js} +1 -1
  16. package/out/_next/static/chunks/{23-y1f_zw56vo.js → 05v-nubi896jg.js} +1 -1
  17. package/out/_next/static/chunks/05z79zh625ezu.js +1 -0
  18. package/out/_next/static/chunks/{2xe4bgir5l-9b.js → 060iult6f68_e.js} +504 -504
  19. package/out/_next/static/chunks/08lvtnv7b1cxp.js +1 -0
  20. package/out/_next/static/chunks/0_v2luu_qmeid.js +1 -0
  21. package/out/_next/static/chunks/0ai0zgbgjqb92.js +1 -0
  22. package/out/_next/static/chunks/0boov9mwycanf.js +1 -0
  23. package/out/_next/static/chunks/{2mrkv0z2i74pv.js → 0btmk0wmekl02.js} +2 -2
  24. package/out/_next/static/chunks/0d8x8m2x6ca_m.js +1 -0
  25. package/out/_next/static/chunks/0dmrdrwtd093b.js +1 -0
  26. package/out/_next/static/chunks/0e1jfrmioeuws.js +1 -0
  27. package/out/_next/static/chunks/0e7nlxmneb2j_.js +1 -0
  28. package/out/_next/static/chunks/0es97pusfxupl.js +1 -0
  29. package/out/_next/static/chunks/{2fspbfbxbswzd.js → 0fd-0i1yt23kz.js} +1 -1
  30. package/out/_next/static/chunks/0fxdyvb1w23d1.js +1 -0
  31. package/out/_next/static/chunks/0fxhc24djjcgq.js +1 -0
  32. package/out/_next/static/chunks/0gf-ztg86zd80.js +1 -0
  33. package/out/_next/static/chunks/{287hakn2ijupp.js → 0grasqqf5dw7r.js} +2 -2
  34. package/out/_next/static/chunks/{161yjxmdz9obc.js → 0hajwk2yd-rwr.js} +1 -1
  35. package/out/_next/static/chunks/0hk1wg7h4araz.js +1 -0
  36. package/out/_next/static/chunks/{1aa9g197l4twm.js → 0j74ipw4fps-n.js} +1 -1
  37. package/out/_next/static/chunks/{1s0dpdqy480hg.js → 0kj-vckdn7t5p.js} +1 -1
  38. package/out/_next/static/chunks/0lbs5xdyjuzuo.js +1 -0
  39. package/out/_next/static/chunks/0lep3_bqwfuin.js +1 -0
  40. package/out/_next/static/chunks/0mp0jh1gj7290.js +1 -0
  41. package/out/_next/static/chunks/0ngpoj2g5i4kz.js +1 -0
  42. package/out/_next/static/chunks/0nhljhguceh66.js +1 -0
  43. package/out/_next/static/chunks/0p6z73afb9dj2.js +1 -0
  44. package/out/_next/static/chunks/0p9zfmidzqkps.js +1 -0
  45. package/out/_next/static/chunks/0q75860p8u_ii.js +1 -0
  46. package/out/_next/static/chunks/{3mmy9zsb7zo-m.js → 0rracz73p38mo.js} +23 -23
  47. package/out/_next/static/chunks/{3_dm45k0vk1aa.js → 0sw-8gxbg4x0l.js} +565 -565
  48. package/out/_next/static/chunks/0sx-6rf3eteqn.js +1 -0
  49. package/out/_next/static/chunks/0thw099xk3_0p.js +3 -0
  50. package/out/_next/static/chunks/0u85f0dhb4i8e.js +1 -0
  51. package/out/_next/static/chunks/0uk7kigzm4vi2.js +31 -0
  52. package/out/_next/static/chunks/0ulufxnsrou61.js +1 -0
  53. package/out/_next/static/chunks/0xa9dyg6ezzyd.js +2 -0
  54. package/out/_next/static/chunks/0xvrfvur0p534.js +1 -0
  55. package/out/_next/static/chunks/{2clevl_9ayd0x.js → 0ybs1u66q26su.js} +1 -1
  56. package/out/_next/static/chunks/0ydfhk-p6zvm0.js +1 -0
  57. package/out/_next/static/chunks/{0j2ygtc_-bo3m.js → 0z004fn14pbcu.js} +1 -1
  58. package/out/_next/static/chunks/{2c8rmxz151fxa.js → 0z9erbl3llr_b.js} +224 -224
  59. package/out/_next/static/chunks/0zcsxvcvog9ue.js +1 -0
  60. package/out/_next/static/chunks/0zqgq0lwtz9tn.js +1 -0
  61. package/out/_next/static/chunks/1-ogak5u00kwa.js +1 -0
  62. package/out/_next/static/chunks/{3si3migsmvz9o.js → 10_5p5-xf2aoo.js} +1 -1
  63. package/out/_next/static/chunks/118qlrzdwpfmo.js +1 -0
  64. package/out/_next/static/chunks/11km5p4gd0ut4.js +1 -0
  65. package/out/_next/static/chunks/120rl4l29q9xs.js +1 -0
  66. package/out/_next/static/chunks/{44m1ijc5cv80x.js → 129m5i93ltoym.js} +1 -1
  67. package/out/_next/static/chunks/12n73o884lyyl.js +1 -0
  68. package/out/_next/static/chunks/{27z7j17kcrty_.js → 13zcn4lv0qj76.js} +11 -11
  69. package/out/_next/static/chunks/15jlgfcaeaki9.js +1 -0
  70. package/out/_next/static/chunks/{374lzksboll-t.js → 15o4_2t-l3rj5.js} +1 -1
  71. package/out/_next/static/chunks/175st2ogkg_1o.js +1 -0
  72. package/out/_next/static/chunks/19rsodtu91ja_.js +1 -0
  73. package/out/_next/static/chunks/1a2ouhup611bz.js +1 -0
  74. package/out/_next/static/chunks/{2117sv2qzo6yq.js → 1by60_b14x-3o.js} +1 -1
  75. package/out/_next/static/chunks/{2al9dh3_1ixhv.js → 1cyq7i39885sl.js} +1 -1
  76. package/out/_next/static/chunks/1d9it6yocgt54.js +1 -0
  77. package/out/_next/static/chunks/{29_n5j-hg_gsa.js → 1dp1s1t-y7gal.js} +1 -1
  78. package/out/_next/static/chunks/1dr7gh6xgypl8.js +1 -0
  79. package/out/_next/static/chunks/{1eirucr9s6-h5.js → 1dt30s_sp8415.js} +1 -1
  80. package/out/_next/static/chunks/{3vtmucpx25o7q.js → 1e8_jl2cxd3rp.js} +584 -584
  81. package/out/_next/static/chunks/1f1rek_fxk3of.js +1 -0
  82. package/out/_next/static/chunks/1f2mna0k5efeq.js +1 -0
  83. package/out/_next/static/chunks/1gfz3sxwkkg3d.js +1 -0
  84. package/out/_next/static/chunks/1gr35qeguuws0.js +1 -0
  85. package/out/_next/static/chunks/{3p03l0z65c8vc.js → 1gttu-n9am66k.js} +253 -253
  86. package/out/_next/static/chunks/1imi0xwi9hd99.js +1 -0
  87. package/out/_next/static/chunks/1ka5v5zu0cstt.js +1 -0
  88. package/out/_next/static/chunks/{3my05px5mv_s5.js → 1l_3oidssbhns.js} +235 -235
  89. package/out/_next/static/chunks/{0r-x702_jvhud.js → 1m9zc5gm-327d.js} +12 -12
  90. package/out/_next/static/chunks/1n9nhz-6azcp3.js +3 -0
  91. package/out/_next/static/chunks/1ncqwe81t_9_x.js +1 -0
  92. package/out/_next/static/chunks/{3un-w6wutw1qn.js → 1nix_lulkpklo.js} +1 -1
  93. package/out/_next/static/chunks/1ntqovuz2c217.js +1 -0
  94. package/out/_next/static/chunks/1pgs-98tfkq9_.js +1 -0
  95. package/out/_next/static/chunks/1q2z0aeopo8t8.js +1 -0
  96. package/out/_next/static/chunks/{1x0j78ohufpul.js → 1q4lkgxfnqnew.js} +1 -1
  97. package/out/_next/static/chunks/{0yd4_xh476fjn.js → 1qg1l7t00nyib.js} +97 -97
  98. package/out/_next/static/chunks/{2wgh5i70bzelt.js → 1rcdimhu0qhlu.js} +392 -392
  99. package/out/_next/static/chunks/1rlfg62jxqj3z.js +1 -0
  100. package/out/_next/static/chunks/1ses023uud001.js +1 -0
  101. package/out/_next/static/chunks/1t5oynmttpfsw.js +1 -0
  102. package/out/_next/static/chunks/{39cou9lia_g7l.js → 1t9i20i5-f8ze.js} +1 -1
  103. package/out/_next/static/chunks/{0rykrf_vofbad.js → 1tgj55b305g4h.js} +1 -1
  104. package/out/_next/static/chunks/{3rj-5v0j_2-_2.js → 1u8snlm6a7uhi.js} +4 -4
  105. package/out/_next/static/chunks/{2neieeo9g2u56.js → 1ug4k-1zhr63a.js} +1 -1
  106. package/out/_next/static/chunks/{3ioxfi3bvznhh.js → 1uh9zgsy69g92.js} +1 -1
  107. package/out/_next/static/chunks/1vrpzlif-z_p0.js +1 -0
  108. package/out/_next/static/chunks/{0lwjmr8efrlbt.js → 1vurgl6oz2qey.js} +1 -1
  109. package/out/_next/static/chunks/1w-qc09n9ijtq.js +1 -0
  110. package/out/_next/static/chunks/1ycqxcht6x54p.js +1 -0
  111. package/out/_next/static/chunks/1zj4307ugq0qz.js +1 -0
  112. package/out/_next/static/chunks/{14e4k-718qadd.js → 1zkd8v-qka--j.js} +163 -168
  113. package/out/_next/static/chunks/1zm52cjrfrq7c.js +1 -0
  114. package/out/_next/static/chunks/{3-yhe6rcsjh88.js → 1zm6eo861i3c8.js} +1 -1
  115. package/out/_next/static/chunks/{06fbalmyyfpsy.js → 1zp9363yfhpom.js} +1 -1
  116. package/out/_next/static/chunks/1zt1xxovnjhkm.js +1 -0
  117. package/out/_next/static/chunks/2-3hk_db5fpok.js +1 -0
  118. package/out/_next/static/chunks/2-bv9a_0zgw1f.js +1 -0
  119. package/out/_next/static/chunks/{3cp5nmtwxq4gr.js → 209sxygecny37.js} +1 -1
  120. package/out/_next/static/chunks/{133dqp8_7_yo6.js → 216uiih3_vdfd.js} +1 -1
  121. package/out/_next/static/chunks/21kfpd_bityxt.js +1 -0
  122. package/out/_next/static/chunks/{3yk0hzfq5rcs6.js → 22yqh0zlo_vwr.js} +1 -1
  123. package/out/_next/static/chunks/24ecas0m9tao7.js +3 -0
  124. package/out/_next/static/chunks/24pq9210rng3f.js +1 -0
  125. package/out/_next/static/chunks/{184pz6z3dflfm.js → 267prao6fyt22.js} +20 -20
  126. package/out/_next/static/chunks/26skkagvj1z96.js +1 -0
  127. package/out/_next/static/chunks/{0i9wa8hjd-5tc.js → 26y9sv8_-ykxf.js} +1 -1
  128. package/out/_next/static/chunks/2701xfv_07wz_.js +1 -0
  129. package/out/_next/static/chunks/{39rhmj_32ujyj.js → 271333m8y3k0e.js} +1 -1
  130. package/out/_next/static/chunks/29rkmguzky-bp.js +1 -0
  131. package/out/_next/static/chunks/{3qo7e6b73mfxq.js → 2a07so920b6aa.js} +1 -1
  132. package/out/_next/static/chunks/{1z790xxb46gxy.js → 2a2oy8ryz2tsk.js} +1 -1
  133. package/out/_next/static/chunks/{2-i29-jdbwww6.js → 2ao-3jzz7yw3p.js} +111 -111
  134. package/out/_next/static/chunks/2apihn9ra2ufp.js +1 -0
  135. package/out/_next/static/chunks/2apnpj0-fs9ks.js +1 -0
  136. package/out/_next/static/chunks/2b481pitl4k85.js +1 -0
  137. package/out/_next/static/chunks/2bettxaqt3d2p.js +1 -0
  138. package/out/_next/static/chunks/{1bv-jzy_2jiqs.js → 2c721vfva711t.js} +1 -1
  139. package/out/_next/static/chunks/{17_jjyx4jz9dd.js → 2d2kl_m64j9cb.js} +1 -1
  140. package/out/_next/static/chunks/2droqjmvmgj13.js +1 -0
  141. package/out/_next/static/chunks/2dxbvwbbgpzoq.js +1 -0
  142. package/out/_next/static/chunks/2eqbsut829r5l.js +1 -0
  143. package/out/_next/static/chunks/2f3_mzxjh3gso.js +1 -0
  144. package/out/_next/static/chunks/2fsde0jwi5qtt.js +1 -0
  145. package/out/_next/static/chunks/{0jap7l5-bskj4.js → 2h249uvhh2sij.js} +12 -12
  146. package/out/_next/static/chunks/{2as_br1awqk6k.js → 2izok2otbk8-2.js} +496 -496
  147. package/out/_next/static/chunks/2j120dkh7q3uf.js +1 -0
  148. package/out/_next/static/chunks/2j2ynchpqh34-.js +1 -0
  149. package/out/_next/static/chunks/2kj6pzs_wap1v.js +1 -0
  150. package/out/_next/static/chunks/{2epukrz6paj9n.js → 2kok6zedeeltw.js} +1 -1
  151. package/out/_next/static/chunks/2lnj9jruy4nrv.js +1 -0
  152. package/out/_next/static/chunks/{0j0a0wvmmghxj.js → 2lsvk7xcfkarc.js} +1 -1
  153. package/out/_next/static/chunks/2n-pveub8b_5t.js +1 -0
  154. package/out/_next/static/chunks/{3puu2_-t0lln9.js → 2n3xu_wbvtj7h.js} +12 -12
  155. package/out/_next/static/chunks/{1lu7rjfvxj8yj.js → 2of8q0kaeqpf0.js} +1 -1
  156. package/out/_next/static/chunks/2ofwtw6p08sfz.js +1 -0
  157. package/out/_next/static/chunks/{1t-yolk97lmot.js → 2phl5ta4iim7l.js} +1 -1
  158. package/out/_next/static/chunks/2q6l-xdqzgmpf.js +1 -0
  159. package/out/_next/static/chunks/2q8yg63br2jc9.js +1 -0
  160. package/out/_next/static/chunks/2r5qgieqldcd9.js +1 -0
  161. package/out/_next/static/chunks/2r7y401cvjc1s.js +1 -0
  162. package/out/_next/static/chunks/{1a94whad0y57f.js → 2r96kyeehsji9.js} +1 -1
  163. package/out/_next/static/chunks/{1gvu5a6ffbs7l.js → 2rmc6ru7mc-kg.js} +1 -1
  164. package/out/_next/static/chunks/{3_gfl66zf638s.js → 2s6kpclh6ie7o.js} +901 -906
  165. package/out/_next/static/chunks/{0xzamrecplwzw.js → 2sys9nj8lo3uk.js} +1 -1
  166. package/out/_next/static/chunks/{336ckqpboqmbn.js → 2tc3e-iqv71y_.js} +1 -1
  167. package/out/_next/static/chunks/{1t2g1v0ubcsam.js → 2uo6vm7mfgrbf.js} +1 -1
  168. package/out/_next/static/chunks/{2kmmk9coo9_b0.js → 2urx6fow8c8c9.js} +143 -143
  169. package/out/_next/static/chunks/2w2k1gveljyb7.js +1 -0
  170. package/out/_next/static/chunks/{1zmx71cvc6ksk.js → 2w99knknr5i8c.js} +1 -1
  171. package/out/_next/static/chunks/2w_ptlw-ad8-9.js +4 -0
  172. package/out/_next/static/chunks/2ws1s9d52ayv8.js +1 -0
  173. package/out/_next/static/chunks/2x7enks3ydgai.js +1 -0
  174. package/out/_next/static/chunks/{2_6b9lraq-exh.js → 2y8i7_nxm4r05.js} +5 -5
  175. package/out/_next/static/chunks/2ydub0t01728d.js +1 -0
  176. package/out/_next/static/chunks/{29hkkj9raxte9.js → 2z_iab7ozohhq.js} +77 -77
  177. package/out/_next/static/chunks/3-m_vzabs1uez.js +1 -0
  178. package/out/_next/static/chunks/{1h1gixjbjkbsl.js → 302qk2fjdrthp.js} +5 -5
  179. package/out/_next/static/chunks/30bhz7czzs4mf.js +1 -0
  180. package/out/_next/static/chunks/{3d43gd91r06y6.js → 30n4y_uu8chbh.js} +507 -505
  181. package/out/_next/static/chunks/{0o0qtv35dqv3i.js → 32_c4mbb6j1l6.js} +239 -239
  182. package/out/_next/static/chunks/33hp-khdfohdq.js +1 -0
  183. package/out/_next/static/chunks/{3zv5kyos9vtmm.js → 33i36o_l69sm5.js} +1 -1
  184. package/out/_next/static/chunks/3527r3jo5fj3i.js +1 -0
  185. package/out/_next/static/chunks/355dg8yaa94hr.js +1 -0
  186. package/out/_next/static/chunks/{2h9i_adbqaxs4.js → 35ntbr_c-yx44.js} +1 -1
  187. package/out/_next/static/chunks/{0cmyc-uvk93kl.js → 35sne1llxnc-m.js} +74 -74
  188. package/out/_next/static/chunks/36enkx1skkv2-.js +4 -0
  189. package/out/_next/static/chunks/{0e5dcxmkprebg.js → 3772oce1n3t_g.js} +1 -1
  190. package/out/_next/static/chunks/37cnbm5ft1mqf.js +1 -0
  191. package/out/_next/static/chunks/38xdo3cifphut.js +1 -0
  192. package/out/_next/static/chunks/{0o73w0cn5n_vl.js → 3_dgblylldcgb.js} +1 -1
  193. package/out/_next/static/chunks/3beawo-qwuk8k.js +1 -0
  194. package/out/_next/static/chunks/3cj_6sl9kr3e9.js +1 -0
  195. package/out/_next/static/chunks/3d-i_skta_wes.js +1 -0
  196. package/out/_next/static/chunks/3df_l2we755bb.js +1 -0
  197. package/out/_next/static/chunks/{0o1vph7x9shzu.js → 3eve5y7fpzx2h.js} +1 -1
  198. package/out/_next/static/chunks/3ewgyb4y19w-3.js +1 -0
  199. package/out/_next/static/chunks/3f3789eh18_oy.js +1 -0
  200. package/out/_next/static/chunks/{0gk5rnci1hznh.js → 3f8qelpscqfym.js} +2 -2
  201. package/out/_next/static/chunks/3g3-e9m1en45q.js +1 -0
  202. package/out/_next/static/chunks/{2kk_vvmr2xm3d.js → 3h6akt2uu05ku.js} +12 -12
  203. package/out/_next/static/chunks/{2_lw4d7t-xcqi.js → 3huu0tqmxwowu.js} +523 -522
  204. package/out/_next/static/chunks/3i239y-1hbkm-.js +1 -0
  205. package/out/_next/static/chunks/{2mjjo0yj-4ro4.js → 3ipx7xbxchsq9.js} +1 -1
  206. package/out/_next/static/chunks/{3txu-i5qn183a.js → 3j9xvdz55bi4p.js} +321 -321
  207. package/out/_next/static/chunks/3kp8qmhoi24oz.js +1 -0
  208. package/out/_next/static/chunks/3ksq69yq-40_r.js +1 -0
  209. package/out/_next/static/chunks/{3nwaovnpiyrt8.js → 3njwfothmmg7u.js} +3 -3
  210. package/out/_next/static/chunks/{2iu0_3cx-ny74.js → 3oqxl46ukaojj.js} +11 -11
  211. package/out/_next/static/chunks/{2oacwtbslo90t.js → 3qn6r8-0u6dij.js} +360 -360
  212. package/out/_next/static/chunks/3qye1lytea2i8.js +1 -0
  213. package/out/_next/static/chunks/{0gsh_d0m5xss1.js → 3rlp9yr75liz7.js} +1 -1
  214. package/out/_next/static/chunks/{3j3ol_d1vsdhx.js → 3sa_hlx3konc7.js} +1 -1
  215. package/out/_next/static/chunks/3tyo643l62h3m.js +1 -0
  216. package/out/_next/static/chunks/3tz2tpqa9uvwm.js +1 -0
  217. package/out/_next/static/chunks/{0_jrfk2u1u3fi.js → 3utpc-fc6_y0f.js} +1 -1
  218. package/out/_next/static/chunks/3v-0c2aj6c0on.js +1 -0
  219. package/out/_next/static/chunks/3v6nxa28rxngq.js +1 -0
  220. package/out/_next/static/chunks/{3twr9ds68-9us.js → 3vbamaoiuk9yj.js} +1 -1
  221. package/out/_next/static/chunks/3vv99btjc-mky.js +1 -0
  222. package/out/_next/static/chunks/{22yht3s7c-xih.js → 3w59kt5ztyvoq.js} +1 -1
  223. package/out/_next/static/chunks/3x02lxdo28u9i.js +1 -0
  224. package/out/_next/static/chunks/{1my968s78he8g.js → 3xl-op0hwxytg.js} +15 -15
  225. package/out/_next/static/chunks/3ydnxyc4rvad_.js +1 -0
  226. package/out/_next/static/chunks/3ylg4gfetwgxw.js +1 -0
  227. package/out/_next/static/chunks/{0a475u_q5i_dd.js → 3zdtteq-r2fs5.js} +2 -2
  228. package/out/_next/static/chunks/3zkwt0gybqtgm.js +1 -0
  229. package/out/_next/static/chunks/{3nr48h9zwum-3.js → 3zs7l4362msjd.js} +1 -1
  230. package/out/_next/static/chunks/40etabvml_71y.js +1 -0
  231. package/out/_next/static/chunks/{2xujlsx3stqig.js → 417jkzz0slv9m.js} +1 -1
  232. package/out/_next/static/chunks/{0ypejzd74ixbw.js → 41b5gpyqbj58m.js} +15 -15
  233. package/out/_next/static/chunks/41u2-5jayyajf.js +22 -0
  234. package/out/_next/static/chunks/42gcpy51w7lk1.js +1 -0
  235. package/out/_next/static/chunks/{2h07np207nlx7.js → 42ymanq326mo7.js} +1 -1
  236. package/out/_next/static/chunks/{36pz_ews7u0xb.js → 43fp64xnfy646.js} +1 -1
  237. package/out/_next/static/chunks/43v4y2gu5z9_h.js +1 -0
  238. package/out/_next/static/chunks/44cer242u-f8v.js +1 -0
  239. package/out/_next/static/chunks/{0d9pxx1w_zqr9.js → 44zi0gl0a6a8w.js} +1 -1
  240. package/out/_next/static/chunks/turbopack-0n2o5_bkskckx.js +1 -0
  241. package/out/_not-found/__next._full.txt +11 -11
  242. package/out/_not-found/__next._not-found.__PAGE__.txt +19 -2
  243. package/out/_not-found/__next._tree.txt +1 -1
  244. package/out/_not-found.html +1 -1
  245. package/out/_not-found.txt +11 -11
  246. package/out/index.html +1 -1
  247. package/out/index.txt +10 -10
  248. package/package.json +9 -9
  249. package/out/__next._head.txt +0 -6
  250. package/out/__next._index.txt +0 -5
  251. package/out/_next/static/chunks/0-k4hp87gwues.js +0 -1
  252. package/out/_next/static/chunks/0-laj-bivzp4x.js +0 -1
  253. package/out/_next/static/chunks/04zj0yf1qhk1o.js +0 -1
  254. package/out/_next/static/chunks/07hgbbqksqd1g.js +0 -1
  255. package/out/_next/static/chunks/08ou2nvy48e0u.js +0 -1
  256. package/out/_next/static/chunks/08y5-irjbsiy8.js +0 -1
  257. package/out/_next/static/chunks/0aad2r4s4wl1x.js +0 -5
  258. package/out/_next/static/chunks/0gnjtwq-474uc.js +0 -1
  259. package/out/_next/static/chunks/0ibzpjo0h731v.js +0 -1
  260. package/out/_next/static/chunks/0j_3k5qhv_mdx.js +0 -1
  261. package/out/_next/static/chunks/0jis2w2mfx062.js +0 -1
  262. package/out/_next/static/chunks/0jjvp2slpf7d6.js +0 -1
  263. package/out/_next/static/chunks/0ko10wo4rc9-b.js +0 -1
  264. package/out/_next/static/chunks/0lqmvz6k2h_of.js +0 -1
  265. package/out/_next/static/chunks/0noxyupihh8dk.js +0 -1
  266. package/out/_next/static/chunks/0p6phe9kjlxn8.js +0 -1
  267. package/out/_next/static/chunks/0ptxb9dcwsw3o.js +0 -1
  268. package/out/_next/static/chunks/0q0i4pdyq66gb.js +0 -1
  269. package/out/_next/static/chunks/0q8pt8fd0ma30.js +0 -1
  270. package/out/_next/static/chunks/0qqx9aoz8l5d2.js +0 -1
  271. package/out/_next/static/chunks/0tsk32q-88t_7.js +0 -1
  272. package/out/_next/static/chunks/0u7577db_ivyr.js +0 -1
  273. package/out/_next/static/chunks/0unnrt0un064x.js +0 -1
  274. package/out/_next/static/chunks/0uygtr4mo3h0v.js +0 -1
  275. package/out/_next/static/chunks/0vf3facit951s.js +0 -1
  276. package/out/_next/static/chunks/0vzo-8t8c26k9.js +0 -1
  277. package/out/_next/static/chunks/0xx7_7y5jdlh4.js +0 -1
  278. package/out/_next/static/chunks/0xyija62b6txc.js +0 -1
  279. package/out/_next/static/chunks/0zeb37703zcz3.js +0 -1
  280. package/out/_next/static/chunks/0zu5ato7-1-q9.js +0 -1
  281. package/out/_next/static/chunks/0zydv7y47dxgh.js +0 -1
  282. package/out/_next/static/chunks/103x4jwovb6d-.js +0 -1
  283. package/out/_next/static/chunks/107wfq84g9-kn.js +0 -1
  284. package/out/_next/static/chunks/10afagk8yn__n.js +0 -1
  285. package/out/_next/static/chunks/12ory_c78yl31.js +0 -1
  286. package/out/_next/static/chunks/1365lgwdd4vuo.js +0 -1
  287. package/out/_next/static/chunks/146ou-ohb_qhs.js +0 -1
  288. package/out/_next/static/chunks/14orr68xgdykd.js +0 -1
  289. package/out/_next/static/chunks/15qfoj-vl9thu.js +0 -1
  290. package/out/_next/static/chunks/166yqx3_qvbpy.js +0 -1
  291. package/out/_next/static/chunks/16gwjao676ieb.js +0 -1
  292. package/out/_next/static/chunks/16rmmzhy2p7bw.js +0 -1
  293. package/out/_next/static/chunks/18h9ugdz6igdb.js +0 -1
  294. package/out/_next/static/chunks/19d8n5t7ka2fb.js +0 -1
  295. package/out/_next/static/chunks/1_4hh3dfop93j.js +0 -1
  296. package/out/_next/static/chunks/1_rbzw3n4fk0g.js +0 -1
  297. package/out/_next/static/chunks/1bq0fcnt1wy86.js +0 -1
  298. package/out/_next/static/chunks/1c6mho7e0enta.js +0 -1
  299. package/out/_next/static/chunks/1dfaheve77dhi.js +0 -1
  300. package/out/_next/static/chunks/1dgf112ehnhm1.js +0 -1
  301. package/out/_next/static/chunks/1f07l3q77zat1.js +0 -1
  302. package/out/_next/static/chunks/1fervgvgv10r-.js +0 -1
  303. package/out/_next/static/chunks/1fsof7un7igrn.js +0 -1
  304. package/out/_next/static/chunks/1iel4pzhhh-c3.js +0 -1
  305. package/out/_next/static/chunks/1iojfx3-g4_n9.js +0 -1
  306. package/out/_next/static/chunks/1j4c0nvdo5q68.js +0 -3
  307. package/out/_next/static/chunks/1j4jt5q7px8sy.js +0 -1
  308. package/out/_next/static/chunks/1k_8olnprvi8r.js +0 -1
  309. package/out/_next/static/chunks/1l0rt7d4m-xdk.js +0 -5
  310. package/out/_next/static/chunks/1mt4cnd_d6jvf.js +0 -1
  311. package/out/_next/static/chunks/1tbes2sv-qzcx.js +0 -1
  312. package/out/_next/static/chunks/1upy8a5cb75kt.js +0 -1
  313. package/out/_next/static/chunks/1xed71f608m4b.js +0 -1
  314. package/out/_next/static/chunks/219n3q-_eengm.js +0 -1
  315. package/out/_next/static/chunks/21wo3vdr_uby8.js +0 -1
  316. package/out/_next/static/chunks/25gep78-izw79.js +0 -4
  317. package/out/_next/static/chunks/26i7dn31afdtm.js +0 -1
  318. package/out/_next/static/chunks/27hbplu797elx.js +0 -1
  319. package/out/_next/static/chunks/28i3wgvgn_at1.js +0 -1
  320. package/out/_next/static/chunks/2992eiy52nazj.js +0 -1
  321. package/out/_next/static/chunks/29bxq-67oazfg.js +0 -1
  322. package/out/_next/static/chunks/29ings58w7kp1.js +0 -1
  323. package/out/_next/static/chunks/2_n0cpkdsjzli.js +0 -1
  324. package/out/_next/static/chunks/2a3iy701j4r_y.js +0 -1
  325. package/out/_next/static/chunks/2awr1c_vfsutb.js +0 -1
  326. package/out/_next/static/chunks/2b5nt7yn-pq3a.js +0 -1
  327. package/out/_next/static/chunks/2bxe3kjr17tdp.js +0 -1
  328. package/out/_next/static/chunks/2dvbzar93ooc-.js +0 -1
  329. package/out/_next/static/chunks/2e-vp0e11g9ew.js +0 -1
  330. package/out/_next/static/chunks/2exj9-0p6n9x-.js +0 -1
  331. package/out/_next/static/chunks/2gf8l6hbmt7v3.js +0 -1
  332. package/out/_next/static/chunks/2jio3sio-_43z.js +0 -1
  333. package/out/_next/static/chunks/2laz1v9fg2a2z.js +0 -1
  334. package/out/_next/static/chunks/2pb_uosb-aa8x.js +0 -1
  335. package/out/_next/static/chunks/2qu-gpm3ux1l6.js +0 -1
  336. package/out/_next/static/chunks/2rsi6v7qmqx2b.js +0 -1
  337. package/out/_next/static/chunks/2s4fzgzkwjluu.js +0 -2
  338. package/out/_next/static/chunks/2tdvuc-27khif.js +0 -1
  339. package/out/_next/static/chunks/2trolrgd7neax.js +0 -1
  340. package/out/_next/static/chunks/2uyuafmoe5wi0.js +0 -3
  341. package/out/_next/static/chunks/2w2e0pxgs-n8f.js +0 -1
  342. package/out/_next/static/chunks/30y71dxdpv52d.js +0 -1
  343. package/out/_next/static/chunks/32c-e_v8_2xkf.js +0 -1
  344. package/out/_next/static/chunks/32oj0iudhp8bm.js +0 -1
  345. package/out/_next/static/chunks/33p9du6y9eegg.js +0 -1
  346. package/out/_next/static/chunks/38om-j0h0rryk.js +0 -1
  347. package/out/_next/static/chunks/38q0enmlg5q9o.js +0 -3
  348. package/out/_next/static/chunks/39pkya0_bvcaj.js +0 -1
  349. package/out/_next/static/chunks/3_1zzmx92j9c0.js +0 -1
  350. package/out/_next/static/chunks/3_earszshuz4n.js +0 -1
  351. package/out/_next/static/chunks/3ap_uxc8lx7ni.js +0 -1
  352. package/out/_next/static/chunks/3b6na8zrex8jo.js +0 -1
  353. package/out/_next/static/chunks/3c0cxt72vilyz.js +0 -1
  354. package/out/_next/static/chunks/3g78x0pdaoi_4.js +0 -1
  355. package/out/_next/static/chunks/3gjvl1p-tugfe.js +0 -4
  356. package/out/_next/static/chunks/3i8iro1gas1vx.js +0 -1
  357. package/out/_next/static/chunks/3kpqfqr99vo7z.js +0 -1
  358. package/out/_next/static/chunks/3lladf_wemm-2.js +0 -1
  359. package/out/_next/static/chunks/3n62hbywoknop.js +0 -1
  360. package/out/_next/static/chunks/3o_dmzpahx-5g.js +0 -1
  361. package/out/_next/static/chunks/3r7v7un976sn7.js +0 -1
  362. package/out/_next/static/chunks/3rl_nhqwew40w.js +0 -1
  363. package/out/_next/static/chunks/3s7hqij6xp_4e.js +0 -1
  364. package/out/_next/static/chunks/3t4ys6th6gf2w.js +0 -1
  365. package/out/_next/static/chunks/3uarw1i1ij1er.js +0 -1
  366. package/out/_next/static/chunks/3v8kgnjk27wbe.js +0 -1
  367. package/out/_next/static/chunks/3vu5y270muh-7.js +0 -1
  368. package/out/_next/static/chunks/3we1khqfexh3x.js +0 -1
  369. package/out/_next/static/chunks/3z35loj4i-id4.js +0 -1
  370. package/out/_next/static/chunks/415g3asdds1ac.js +0 -1
  371. package/out/_next/static/chunks/42lqt7ig40wk5.js +0 -1
  372. package/out/_next/static/chunks/42s6ghsurq5q7.js +0 -1
  373. package/out/_next/static/chunks/42yctcfi2rfwr.js +0 -1
  374. package/out/_next/static/chunks/43_fau1gg69eo.js +0 -1
  375. package/out/_next/static/chunks/43ywrdzg_7af8.js +0 -31
  376. package/out/_next/static/chunks/453_bg0lgesmp.js +0 -1
  377. package/out/_next/static/chunks/turbopack-1s36ieuku1ds3.js +0 -1
  378. package/out/_not-found/__next._head.txt +0 -6
  379. package/out/_not-found/__next._index.txt +0 -5
  380. package/out/_not-found/__next._not-found.txt +0 -5
  381. /package/out/_next/static/{5UjNvd7WCk97iC2cSmEGH → A1hxMz783bIWo0Q9qqV3L}/_buildManifest.js +0 -0
  382. /package/out/_next/static/{5UjNvd7WCk97iC2cSmEGH → A1hxMz783bIWo0Q9qqV3L}/_clientMiddlewareManifest.js +0 -0
  383. /package/out/_next/static/{5UjNvd7WCk97iC2cSmEGH → A1hxMz783bIWo0Q9qqV3L}/_ssgManifest.js +0 -0
@@ -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)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,57009,e=>{"use strict";var t,r,n,l,a,i,o=e.i(16347),u=e.i(63235),s=e.i(6563);function f(e,t){let r=new Uint8Array(e),n=0;for(;0!=r[t.value+n];)n+=1;let l=new TextDecoder().decode(r.slice(t.value,t.value+n));return t.value=t.value+n+1,l}function c(e,t){let r=e.getInt32(t.value,!0);return t.value+=4,r}function h(e,t){let r=e.getUint32(t.value,!0);return t.value+=4,r}function d(e,t){let r=e.getUint8(t.value);return t.value+=1,r}function p(e,t){let r=e.getUint16(t.value,!0);return t.value+=2,r}function y(e,t){let r=e[t.value];return t.value+=1,r}function w(e,t){let r=e.getFloat32(t.value,!0);return t.value+=4,r}function v(e,t){return(0,s.FromHalfFloat)(p(e,t))}function b(e,t){return(0,s.ToHalfFloat)((0,u.Clamp)(w(e,t),-s.MaxHalfFloat,s.MaxHalfFloat))}function S(e){for(let t=1;t<e.length;t++){let r=e[t-1]+e[t]-128;e[t]=r}}function E(e,t){let r=0,n=Math.floor((e.length+1)/2),l=0,a=e.length-1;for(;!(l>a)&&(t[l++]=e[r++],!(l>a));){;t[l++]=e[n++]}}function g(e,t){if(0x1312f76!=e.getUint32(0,!0))throw Error("Incorrect OpenEXR format");let r=e.getUint8(4),n=e.getUint8(5);t.value=8;let l={},i=!0;for(;i;){let r=f(e.buffer,t);if(r){let n=f(e.buffer,t),i=h(e,t),u=function(e,t,r,n){var l;switch(r){case"string":case"stringvector":case"iccProfile":let i;return l=e.buffer,i=new TextDecoder().decode(new Uint8Array(l).slice(t.value,t.value+n)),t.value=t.value+n,i;case"chlist":return function(e,t,r){let n=t.value,l=[];for(;t.value<n+r-1;){let r=f(e.buffer,t),n=c(e,t),a=d(e,t);t.value+=3;let i=c(e,t),o=c(e,t);l.push({name:r,pixelType:n,pLinear:a,xSampling:i,ySampling:o})}return t.value+=1,l}(e,t,n);case"chromaticities":let o,u,s,p,y,v;return o=w(e,t),u=w(e,t),s=w(e,t),p=w(e,t),y=w(e,t),v=w(e,t),{redX:o,redY:u,greenX:s,greenY:p,blueX:y,blueY:v,whiteX:w(e,t),whiteY:w(e,t)};case"compression":return d(e,t);case"box2i":let b,S;return b=c(e,t),S=c(e,t),{xMin:b,yMin:S,xMax:c(e,t),yMax:c(e,t)};case"lineOrder":return a[d(e,t)];case"float":return w(e,t);case"v2f":return[w(e,t),w(e,t)];case"v3f":let E;return E=w(e,t),[E,w(e,t),w(e,t)];case"int":return c(e,t);case"rational":return[c(e,t),h(e,t)];case"timecode":return[h(e,t),h(e,t)];case"preview":return t.value+=n,"skipped";default:t.value+=n;return}}(e,t,n,i);void 0===u?o.Logger.Warn(`Unknown header attribute type ${n}'.`):l[r]=u}else i=!1}if((-5&n)!=0)throw Error("Unsupported file format");return{version:r,spec:{singleTile:!!(2&n),longName:!!(4&n),deepFormat:!!(8&n),multiPart:!!(16&n)},...l}}(t=l||(l={}))[t.NO_COMPRESSION=0]="NO_COMPRESSION",t[t.RLE_COMPRESSION=1]="RLE_COMPRESSION",t[t.ZIPS_COMPRESSION=2]="ZIPS_COMPRESSION",t[t.ZIP_COMPRESSION=3]="ZIP_COMPRESSION",t[t.PIZ_COMPRESSION=4]="PIZ_COMPRESSION",t[t.PXR24_COMPRESSION=5]="PXR24_COMPRESSION",(r=a||(a={}))[r.INCREASING_Y=0]="INCREASING_Y",r[r.DECREASING_Y=1]="DECREASING_Y";function O(e,t,r,n,l){for(;r<e;)t=t<<8|y(n,l),r+=8;return{l:t>>(r-=e)&(1<<e)-1,c:t,lc:r}}function A(e,t,r,n){return{c:e=e<<8|y(r,n),lc:t+=8}}function C(e,t,r,n,l,a,i,o,u){if(e==t){if(n<8){let e=A(r,n,l,a);r=e.c,n=e.lc}let e=r>>(n-=8);if(e=new Uint8Array([e])[0],o.value+e>u)return null;let t=i[o.value-1];for(;e-- >0;)i[o.value++]=t}else{if(!(o.value<u))return null;i[o.value++]=e}return{c:r,lc:n}}let I=Array(59);function R(e){let t=65535&e;return t>32767?t-65536:t}function M(e,t){let r=R(e),n=R(t),l=r+(1&n)+(n>>1);return{a:l,b:l-n}}function x(e,t){let r=65535&t,n=(65535&e)-(r>>1)&65535;return{a:r+n-32768&65535,b:n}}function m(e){return new DataView(e.array.buffer,e.offset.value,e.size)}function P(e){let t=new Uint8Array(function(e){let t=e.byteLength,r=[],n=0,l=new DataView(e);for(;t>0;){let e=l.getInt8(n++);if(e<0){let a=-e;t-=a+1;for(let e=0;e<a;e++)r.push(l.getUint8(n++))}else{t-=2;let a=l.getUint8(n++);for(let t=0;t<e+1;t++)r.push(a)}}return r}(e.viewer.buffer.slice(e.offset.value,e.offset.value+e.size))),r=new Uint8Array(t.length);return S(t),E(t,r),new DataView(r.buffer)}function U(e){let t=e.array.slice(e.offset.value,e.offset.value+e.size),r=fflate.unzlibSync(t),n=new Uint8Array(r.length);return S(r),E(r,n),new DataView(n.buffer)}function F(e){let t=e.array.slice(e.offset.value,e.offset.value+e.size),r=fflate.unzlibSync(t),n=e.lines*e.channels*e.width,l=1==e.type?new Uint16Array(n):new Uint32Array(n),a=0,i=0,o=[,,,,];for(let t=0;t<e.lines;t++)for(let t=0;t<e.channels;t++){let t=0;switch(e.type){case 1:o[0]=a,o[1]=o[0]+e.width,a=o[1]+e.width;for(let n=0;n<e.width;++n)t+=r[o[0]++]<<8|r[o[1]++],l[i]=t,i++;break;case 2:o[0]=a,o[1]=o[0]+e.width,o[2]=o[1]+e.width,a=o[2]+e.width;for(let n=0;n<e.width;++n)t+=r[o[0]++]<<24|r[o[1]++]<<16|r[o[2]++]<<8,l[i]=t,i++}}return new DataView(l.buffer)}function N(e){let t=e.viewer,r={value:e.offset.value},n=new Uint16Array(e.width*e.scanlineBlockSize*(e.channels*e.type)),l=new Uint8Array(8192),a=0,i=Array(e.channels);for(let t=0;t<e.channels;t++)i[t]={},i[t].start=a,i[t].end=i[t].start,i[t].nx=e.width,i[t].ny=e.lines,i[t].size=e.type,a+=i[t].nx*i[t].ny*i[t].size;let o=p(t,r),u=p(t,r);if(u>=8192)throw Error("Wrong PIZ_COMPRESSION BITMAP_SIZE");if(o<=u)for(let e=0;e<u-o+1;e++)l[e+o]=d(t,r);let s=new Uint16Array(65536),f=function(e,t){let r=0;for(let n=0;n<65536;++n)(0==n||e[n>>3]&1<<(7&n))&&(t[r++]=n);let n=r-1;for(;r<65536;)t[r++]=0;return n}(l,s),c=h(t,r);!function(e,t,r,n,l,a){let i=r.value,o=h(t,r),u=h(t,r);r.value+=4;let s=h(t,r);if(r.value+=4,o<0||o>=65537||u<0||u>=65537)throw Error("Wrong HUF_ENCSIZE");let f=Array(65537),c=Array(16384);for(let e=0;e<16384;e++)c[e]={},c[e].len=0,c[e].lit=0,c[e].p=null;let d=n-(r.value-i);if(!function(e,t,r,n,l,a){let i=0,o=0;for(;n<=l;n++){if(t.value-t.value>r)return;let u=O(6,i,o,e,t),s=u.l;if(i=u.c,o=u.lc,a[n]=s,63==s){if(t.value-t.value>r)throw Error("Error in HufUnpackEncTable");let s=(u=O(8,i,o,e,t)).l+6;if(i=u.c,o=u.lc,n+s>l+1)throw Error("Error in HufUnpackEncTable");for(;s--;)a[n++]=0;n--}else if(s>=59){let e=s-59+2;if(n+e>l+1)throw Error("Error in HufUnpackEncTable");for(;e--;)a[n++]=0;n--}}!function(e){for(let e=0;e<=58;++e)I[e]=0;for(let t=0;t<65537;++t)I[e[t]]+=1;let t=0;for(let e=58;e>0;--e){let r=t+I[e]>>1;I[e]=t,t=r}for(let t=0;t<65537;++t){let r=e[t];r>0&&(e[t]=r|I[r]++<<6)}}(a)}(e,r,d,o,u,f),s>8*(n-(r.value-i)))throw Error("Wrong hufUncompress");!function(e,t,r,n){for(;t<=r;t++){let r=e[t]>>6,l=63&e[t];if(r>>l)throw Error("Invalid table entry");if(l>14){let e=n[r>>l-14];if(e.len)throw Error("Invalid table entry");if(e.lit++,e.p){let t=e.p;e.p=Array(e.lit);for(let r=0;r<e.lit-1;++r)e.p[r]=t[r]}else e.p=[,];e.p[e.lit-1]=t}else if(l){let e=0;for(let a=1<<14-l;a>0;a--){let a=n[(r<<14-l)+e];if(a.len||a.p)throw Error("Invalid table entry");a.len=l,a.lit=t,e++}}}}(f,o,u,c),function(e,t,r,n,l,a,i,o,u){let s=0,f=0,c=Math.trunc(n.value+(l+7)/8);for(;n.value<c;){let l=A(s,f,r,n);for(s=l.c,f=l.lc;f>=14;){let h=t[s>>f-14&16383];if(h.len){f-=h.len;let e=C(h.lit,a,s,f,r,n,o,u,i);e&&(s=e.c,f=e.lc)}else{let t;if(!h.p)throw Error("hufDecode issues");for(t=0;t<h.lit;t++){let d=63&e[h.p[t]];for(;f<d&&n.value<c;)s=(l=A(s,f,r,n)).c,f=l.lc;if(f>=d&&e[h.p[t]]>>6==(s>>f-d&(1<<d)-1)){f-=d;let e=C(h.p[t],a,s,f,r,n,o,u,i);e&&(s=e.c,f=e.lc);break}}if(t==h.lit)throw Error("HufDecode issues")}}}let h=8-l&7;for(s>>=h,f-=h;f>0;){let e=t[s<<14-f&16383];if(e.len){f-=e.len;let t=C(e.lit,a,s,f,r,n,o,u,i);t&&(s=t.c,f=t.lc)}else throw Error("HufDecode issues")}}(f,c,e,r,s,u,a,l,{value:0})}(e.array,t,r,c,n,a);for(let t=0;t<e.channels;++t){let e=i[t];for(let r=0;r<i[t].size;++r)!function(e,t,r,n,l,a,i){let o,u,s=i<16384,f=r>l?l:r,c=1;for(;c<=f;)c<<=1;for(c>>=1,o=c,c>>=1;c>=1;){let i,f,h,d,p=(u=0)+a*(l-o),y=a*c,w=a*o,v=n*c,b=n*o;for(;u<=p;u+=w){let l=u,a=u+n*(r-o);for(;l<=a;l+=b){let r=l+v,n=l+y,a=n+v;if(s){let o=M(e[l+t],e[n+t]);i=o.a,h=o.b,f=(o=M(e[r+t],e[a+t])).a,d=o.b,o=M(i,f),e[l+t]=o.a,e[r+t]=o.b,o=M(h,d),e[n+t]=o.a,e[a+t]=o.b}else{let o=x(e[l+t],e[n+t]);i=o.a,h=o.b,f=(o=x(e[r+t],e[a+t])).a,d=o.b,o=x(i,f),e[l+t]=o.a,e[r+t]=o.b,o=x(h,d),e[n+t]=o.a,e[a+t]=o.b}}if(r&c){let r,n=l+y;i=(r=s?M(e[l+t],e[n+t]):x(e[l+t],e[n+t])).a,e[n+t]=r.b,e[l+t]=i}}if(l&c){let l=u,a=u+n*(r-o);for(;l<=a;l+=b){let r,n=l+v;i=(r=s?M(e[l+t],e[n+t]):x(e[l+t],e[n+t])).a,e[n+t]=r.b,e[l+t]=i}}o=c,c>>=1}}(n,e.start+r,e.nx,e.size,e.ny,e.nx*e.size,f)}var y=a;for(let e=0;e<y;++e)n[e]=s[n[e]];let w=0,v=new Uint8Array(n.buffer.byteLength);for(let t=0;t<e.lines;t++)for(let t=0;t<e.channels;t++){let e=i[t],r=e.nx*e.size,l=new Uint8Array(n.buffer,2*e.end,2*r);v.set(l,w),w+=2*r,e.end+=r}return new DataView(v.buffer)}var T=e.i(92180);(n=i||(i={}))[n.Float=0]="Float",n[n.HalfFloat=1]="HalfFloat";class k{}async function z(e,t,r,n){let a={size:0,viewer:t,array:new Uint8Array(t.buffer),offset:r,width:e.dataWindow.xMax-e.dataWindow.xMin+1,height:e.dataWindow.yMax-e.dataWindow.yMin+1,channels:e.channels.length,channelLineOffsets:{},scanOrder:()=>0,bytesPerLine:0,outLineWidth:0,lines:0,scanlineBlockSize:0,inputSize:null,type:0,uncompress:null,getter:()=>0,format:5,outputChannels:0,decodeChannels:{},blockCount:null,byteArray:null,linearSpace:!1,textureType:0};switch(e.compression){case l.NO_COMPRESSION:a.lines=1,a.uncompress=m;break;case l.RLE_COMPRESSION:a.lines=1,a.uncompress=P;break;case l.ZIPS_COMPRESSION:a.lines=1,a.uncompress=U,await T.Tools.LoadScriptAsync(k.FFLATEUrl);break;case l.ZIP_COMPRESSION:a.lines=16,a.uncompress=U,await T.Tools.LoadScriptAsync(k.FFLATEUrl);break;case l.PIZ_COMPRESSION:a.lines=32,a.uncompress=N;break;case l.PXR24_COMPRESSION:a.lines=16,a.uncompress=F,await T.Tools.LoadScriptAsync(k.FFLATEUrl);break;default:throw Error(l[e.compression]+" is unsupported")}a.scanlineBlockSize=a.lines;let o={};for(let t of e.channels)switch(t.name){case"R":case"G":case"B":case"A":case"Y":o[t.name]=!0,a.type=t.pixelType}let u=!1;if(o.R&&o.G&&o.B&&o.A)a.outputChannels=4,a.decodeChannels={R:0,G:1,B:2,A:3};else if(o.R&&o.G&&o.B)u=!0,a.outputChannels=4,a.decodeChannels={R:0,G:1,B:2,A:3};else if(o.R&&o.G)a.outputChannels=2,a.decodeChannels={R:0,G:1};else if(o.R)a.outputChannels=1,a.decodeChannels={R:0};else if(o.Y)a.outputChannels=1,a.decodeChannels={Y:0};else throw Error("EXRLoader.parse: file contains unsupported data channels.");if(1===a.type)switch(n){case i.Float:a.getter=v,a.inputSize=2;break;case i.HalfFloat:a.getter=p,a.inputSize=2}else if(2===a.type)switch(n){case i.Float:a.getter=w,a.inputSize=4;break;case i.HalfFloat:a.getter=b,a.inputSize=4}else throw Error("Unsupported pixelType "+a.type+" for "+e.compression);a.blockCount=a.height/a.scanlineBlockSize;for(let e=0;e<a.blockCount;e++)!function(e,t){"getBigInt64"in DataView.prototype?e.getBigInt64(t.value,!0):(e.getUint32(t.value+4,!0),e.getUint32(t.value,!0)),t.value+=8}(t,r);let s=a.width*a.height*a.outputChannels;switch(n){case i.Float:a.byteArray=new Float32Array(s),a.textureType=1,u&&a.byteArray.fill(1,0,s);break;case i.HalfFloat:a.byteArray=new Uint16Array(s),a.textureType=2,u&&a.byteArray.fill(15360,0,s);break;default:throw Error("Unsupported type: "+n)}let f=0;for(let t of e.channels)void 0!==a.decodeChannels[t.name]&&(a.channelLineOffsets[t.name]=f*a.width),f+=2*t.pixelType;return a.bytesPerLine=a.width*f,a.outLineWidth=a.width*a.outputChannels,"INCREASING_Y"===e.lineOrder?a.scanOrder=e=>e:a.scanOrder=e=>a.height-1-e,4==a.outputChannels?(a.format=5,a.linearSpace=!0):(a.format=6,a.linearSpace=!1),a}function L(e,t,r,n){let l={value:0};for(let a=0;a<e.height/e.scanlineBlockSize;a++){let i=c(r,n)-t.dataWindow.yMin;e.size=h(r,n),e.lines=i+e.scanlineBlockSize>e.height?e.height-i:e.scanlineBlockSize;let o=e.size<e.lines*e.bytesPerLine&&e.uncompress?e.uncompress(e):m(e);n.value+=e.size;for(let r=0;r<e.scanlineBlockSize;r++){let n=a*e.scanlineBlockSize,i=r+e.scanOrder(n);if(i>=e.height)continue;let u=r*e.bytesPerLine,s=(e.height-1-i)*e.outLineWidth;for(let r=0;r<e.channels;r++){let n=t.channels[r].name,a=e.channelLineOffsets[n],i=e.decodeChannels[n];if(void 0!==i){l.value=u+a;for(let t=0;t<e.width;t++){let r=s+t*e.outputChannels+i;e.byteArray&&(e.byteArray[r]=e.getter(o,l))}}}}}}async function _(e){let t=new DataView(e),r={value:0},n=g(t,r);try{let e=await z(n,t,r,i.Float);if(L(e,n,t,r),!e.byteArray)return o.Logger.Error("Failed to decode EXR data: No byte array available."),{width:0,height:0,data:null};return{width:n.dataWindow.xMax-n.dataWindow.xMin+1,height:n.dataWindow.yMax-n.dataWindow.yMin+1,data:new Float32Array(e.byteArray)}}catch(e){o.Logger.Error("Failed to load EXR data: ",e)}return{width:0,height:0,data:null}}k.DefaultOutputType=i.HalfFloat,k.FFLATEUrl="https://unpkg.com/fflate@0.8.2",e.s(["ReadExrDataAsync",0,_,"_ExrTextureLoader",0,class{constructor(){this.supportCascades=!1}loadCubeData(e,t,r,n,l){throw".exr not supported in Cube."}loadData(e,t,r){let n=new DataView(e.buffer),l={value:0},a=g(n,l);z(a,n,l,k.DefaultOutputType).then(e=>{L(e,a,n,l),r(a.dataWindow.xMax-a.dataWindow.xMin+1,a.dataWindow.yMax-a.dataWindow.yMin+1,t.generateMipMaps,!1,()=>{let r=t.getEngine();t.format=a.format,t.type=e.textureType,t.invertY=!1,t._gammaSpace=!a.linearSpace,e.byteArray&&r._uploadDataToTextureDirectly(t,e.byteArray,0,0,void 0,!0)})}).catch(e=>{o.Logger.Error("Failed to load EXR texture: ",e)})}}],57009)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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 i{constructor(e,t,r,a){this.name=e,this.worldAxisForNormal=t,this.worldAxisForFileX=r,this.worldAxisForFileY=a}}class n{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,i=!e.noMipmap&&e._texture?.generateMipMaps===!0,n=l>0&&l<a&&i,s=n?Math.max(0,Math.round(Math.log2(a/l))):0,f=n?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),m=e.readPixels(5,s,void 0,!1),h=e.gammaSpace,A=l>0&&l<a&&!n;return new Promise(e=>{Promise.all([c,u,t,r,p,m]).then(([t,r,o,i,n,s])=>{let u=f;A&&(t=this._DownsampleFace(t,a,l,4),r=this._DownsampleFace(r,a,l,4),o=this._DownsampleFace(o,a,l,4),i=this._DownsampleFace(i,a,l,4),n=this._DownsampleFace(n,a,l,4),s=this._DownsampleFace(s,a,l,4),u=l);let c={size:u,right:r,left:t,up:o,down:i,front:n,back:s,format:5,type:+(t instanceof Float32Array),gammaSpace:h};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,i=new Float32Array(l),n=t/r,s=1/(n*n);for(let e=0;e<r;e++){let l=Math.floor(e*n),f=Math.floor((e+1)*n);for(let u=0;u<r;u++){let c=Math.floor(u*n),p=Math.floor((u+1)*n),m=(e*r+u)*a;for(let e=0;e<a;e++){let r=0;for(let i=l;i<f;i++)for(let l=c;l<p;l++)r+=o[(i*t+l)*a+e];i[m+e]=r*s}}}if(e instanceof Float32Array)return i;let f=new e.constructor(l);for(let e=0;e<l;e++)f[e]=i[e]+.5|0;return f}static ConvertCubeMapToSphericalPolynomial(e,t=0){let i=t>0?this._NearestPow2Floor(t):0;if(i>0&&e.size>i){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,i,t);e={...e,...r,size:i}}let n=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],i=e[a.name],p=c,m=5===e.format?4:3;for(let t=0;t<e.size;t++){let h=c;for(let c=0;c<e.size;c++){let A=a.worldAxisForFileX.scale(h).add(a.worldAxisForFileY.scale(p)).add(a.worldAxisForNormal);A.normalize();let F=this._AreaElement(h-u,p-u)-this._AreaElement(h-u,p+u)-this._AreaElement(h+u,p-u)+this._AreaElement(h+u,p+u),d=i[t*e.size*m+c*m+0],y=i[t*e.size*m+c*m+1],w=i[t*e.size*m+c*m+2];isNaN(d)&&(d=0),isNaN(y)&&(y=0),isNaN(w)&&(w=0),0===e.type&&(d/=255,y/=255,w/=255),e.gammaSpace&&(d=Math.pow((0,r.Clamp)(d),o.ToLinearSpace),y=Math.pow((0,r.Clamp)(y),o.ToLinearSpace),w=Math.pow((0,r.Clamp)(w),o.ToLinearSpace));let C=this.MAX_HDRI_VALUE;if(this.PRESERVE_CLAMPED_COLORS){let e=Math.max(d,y,w);if(e>C){let t=C/e;d*=t,y*=t,w*=t}}else d=(0,r.Clamp)(d,0,C),y=(0,r.Clamp)(y,0,C),w=(0,r.Clamp)(w,0,C);let _=new l.Color3(d,y,w);n.addLight(A,_,F),s+=F,h+=f}p+=f}}let p=4*Math.PI*6/6/s;return n.scaleInPlace(p),n.convertIncidentRadianceToIrradiance(),n.convertIrradianceToLambertianRadiance(),a.SphericalPolynomial.FromHarmonics(n)}}n._FileFaces=[new i("right",new t.Vector3(1,0,0),new t.Vector3(0,0,-1),new t.Vector3(0,-1,0)),new i("left",new t.Vector3(-1,0,0),new t.Vector3(0,0,1),new t.Vector3(0,-1,0)),new i("up",new t.Vector3(0,1,0),new t.Vector3(1,0,0),new t.Vector3(0,0,1)),new i("down",new t.Vector3(0,-1,0),new t.Vector3(1,0,0),new t.Vector3(0,0,-1)),new i("front",new t.Vector3(0,0,1),new t.Vector3(1,0,0),new t.Vector3(0,-1,0)),new i("back",new t.Vector3(0,0,-1),new t.Vector3(-1,0,0),new t.Vector3(0,-1,0))],n.MAX_HDRI_VALUE=4096,n.PRESERVE_CLAMPED_COLORS=!1,e.s(["CubeMapToSphericalPolynomialTools",0,n])},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 i=l("DXT1"),n=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===i||o===n||o===s,dxgiFormat:l,textureType:u}}static _GetHalfFloatAsFloatRGBAArrayBuffer(e,t,r,a,l,i){let n=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;n[f]=(0,o.FromHalfFloat)(s[a]),n[f+1]=(0,o.FromHalfFloat)(s[a+1]),n[f+2]=(0,o.FromHalfFloat)(s[a+2]),u.StoreLODInAlphaChannel?n[f+3]=i:n[f+3]=(0,o.FromHalfFloat)(s[a+3]),f+=4}return n}static _GetHalfFloatRGBAArrayBuffer(e,t,r,a,l,i){if(u.StoreLODInAlphaChannel){let n=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;n[f]=s[a],n[f+1]=s[a+1],n[f+2]=s[a+2],n[f+3]=(0,o.ToHalfFloat)(i),f+=4}return n}return new Uint16Array(l,r,a)}static _GetFloatRGBAArrayBuffer(e,t,r,a,o,l){if(u.StoreLODInAlphaChannel){let i=new Float32Array(a),n=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;i[s]=n[a],i[s+1]=n[a+1],i[s+2]=n[a+2],i[s+3]=l,s+=4}return i}return new Float32Array(o,r,a)}static _GetFloatAsHalfFloatRGBAArrayBuffer(e,t,r,a,l,i){let n=new Uint16Array(a),s=new Float32Array(l,r),f=0;for(let r=0;r<t;r++)for(let t=0;t<e;t++)n[f]=(0,o.ToHalfFloat)(s[f]),n[f+1]=(0,o.ToHalfFloat)(s[f+1]),n[f+2]=(0,o.ToHalfFloat)(s[f+2]),u.StoreLODInAlphaChannel?n[f+3]=(0,o.ToHalfFloat)(i):n[f+3]=(0,o.ToHalfFloat)(s[f+3]),f+=4;return n}static _GetFloatAsUIntRGBAArrayBuffer(e,r,a,o,l,i){let n=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;n[f]=255*(0,t.Clamp)(s[o]),n[f+1]=255*(0,t.Clamp)(s[o+1]),n[f+2]=255*(0,t.Clamp)(s[o+2]),u.StoreLODInAlphaChannel?n[f+3]=i:n[f+3]=255*(0,t.Clamp)(s[o+3]),f+=4}return n}static _GetHalfFloatAsUIntRGBAArrayBuffer(e,r,a,l,i,n){let s=new Uint8Array(l),f=new Uint16Array(i,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]=n: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,i,n,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+i],f[c+2]=u[a+n],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,i,n){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+i],s[u+2]=f[a+n],u+=3}return s}static _GetLuminanceArrayBuffer(e,t,r,a,o){let l=new Uint8Array(a),i=new Uint8Array(o,r),n=0;for(let r=0;r<t;r++)for(let t=0;t<e;t++){let a=t+r*e;l[n]=i[a],n++}return l}static UploadDDSLevels(e,t,o,l,c,p,m=-1,h,A=!0){let F,d,y,w=null;l.sphericalPolynomial&&(w=[]);let C=!!e.getCaps().s3tc;t.generateMipMaps=c;let _=new Int32Array(o.buffer,o.byteOffset,31),b,D,G,g=0,B,M=0,S=1;if(0x20534444!==_[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&&!C)return void r.Logger.Error("Compressed textures are not supported on this platform.");let x=_[22];B=_[1]+4;let T=!1;if(l.isFourCC)switch(b=_[21]){case i:S=8,M=33777;break;case n:S=16,M=33778;break;case s:S=16,M=33779;break;case 113:T=!0,x=64;break;case 116:T=!0,x=128;break;case f:{B+=20;let e=!1;switch(l.dxgiFormat){case 10:T=!0,x=64,e=!0;break;case 2:T=!0,x=128,e=!0;break;case 88:l.isRGB=!0,l.isFourCC=!1,x=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 R=u._ExtractLongWordOrder(_[23]),L=u._ExtractLongWordOrder(_[24]),O=u._ExtractLongWordOrder(_[25]),P=u._ExtractLongWordOrder(_[26]);T&&(M=e._getRGBABufferInternalSizedFormat(l.textureType)),d=1,131072&_[2]&&!1!==c&&(d=Math.max(1,_[7]));let H=h||0,U=e.getCaps();for(let r=H;r<p;r++){for(y=0,D=_[4],G=_[3];y<d;++y){if(-1===m||m===y){let a=-1===m?y:0;if(!l.isCompressed&&l.isFourCC){t.format=5,g=D*G*4;let l=null;if(e._badOS||e._badDesktopOS||!U.textureHalfFloat&&!U.textureFloat)128===x?(l=u._GetFloatAsUIntRGBAArrayBuffer(D,G,o.byteOffset+B,g,o.buffer,a),w&&0==a&&w.push(u._GetFloatRGBAArrayBuffer(D,G,o.byteOffset+B,g,o.buffer,a))):64===x&&(l=u._GetHalfFloatAsUIntRGBAArrayBuffer(D,G,o.byteOffset+B,g,o.buffer,a),w&&0==a&&w.push(u._GetHalfFloatAsFloatRGBAArrayBuffer(D,G,o.byteOffset+B,g,o.buffer,a))),t.type=0;else{let e,r=U.textureFloat&&(A&&U.textureFloatLinearFiltering||!A),i=U.textureHalfFloat&&(A&&U.textureHalfFloatLinearFiltering||!A),n=(128===x||64===x&&!i)&&r?1:(64===x||128===x&&!r)&&i?2:0,s=null;if(128===x)switch(n){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(n){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=n,l=e(D,G,o.byteOffset+B,g,o.buffer,a),w&&0==a&&w.push(s?s(D,G,o.byteOffset+B,g,o.buffer,a):l)}l&&e._uploadDataToTextureDirectly(t,l,r,a)}else if(l.isRGB)t.type=0,24===x?(t.format=4,g=D*G*3,F=u._GetRGBArrayBuffer(D,G,o.byteOffset+B,g,o.buffer,R,L,O)):(t.format=5,g=D*G*4,F=u._GetRGBAArrayBuffer(D,G,o.byteOffset+B,g,o.buffer,R,L,O,P)),e._uploadDataToTextureDirectly(t,F,r,a);else if(l.isLuminance){let l=e._getUnpackAlignement(),i=D;g=Math.floor((D+l-1)/l)*l*(G-1)+i,F=u._GetLuminanceArrayBuffer(D,G,o.byteOffset+B,g,o.buffer),t.format=1,t.type=0,e._uploadDataToTextureDirectly(t,F,r,a)}else g=Math.max(4,D)/4*Math.max(4,G)/4*S,F=new Uint8Array(o.buffer,o.byteOffset+B,g),t.type=0,e._uploadCompressedDataToTextureDirectly(t,M,D,G,F,r,a)}B+=x?D*G*(x/8):g,D*=.5,G*=.5,D=Math.max(1,D),G=Math.max(1,G)}if(void 0!==h)break}w&&w.length>0?l.sphericalPolynomial=a.CubeMapToSphericalPolynomialTools.ConvertCubeMapToSphericalPolynomial({size:_[4],right:w[0],left:w[1],up:w[2],down:w[3],front:w[4],back:w[5],format:5,type:1,gammaSpace:!1}):l.sphericalPolynomial=void 0}}u.StoreLODInAlphaChannel=!1,e.s(["DDSTools",0,u])},98134,e=>{"use strict";var t=e.i(88),r=e.i(84467);e.s(["_DDSTextureLoader",0,class{constructor(){this.supportCascades=!0}loadCubeData(e,a,o,l){let i,n=a.getEngine(),s=!1,f=1e3;if(Array.isArray(e))for(let t=0;t<e.length;t++){let o=e[t];a.width=(i=r.DDSTools.GetDDSInfo(o)).width,a.height=i.height,s=(i.isRGB||i.isLuminance||i.mipmapCount>1)&&a.generateMipMaps,n._unpackFlipY(i.isCompressed),r.DDSTools.UploadDDSLevels(n,a,o,i,s,6,-1,t),i.isFourCC||1!==i.mipmapCount?f=i.mipmapCount-1:n.generateMipMapsForCubemap(a)}else a.width=(i=r.DDSTools.GetDDSInfo(e)).width,a.height=i.height,o&&(i.sphericalPolynomial=new t.SphericalPolynomial),s=(i.isRGB||i.isLuminance||i.mipmapCount>1)&&a.generateMipMaps,n._unpackFlipY(i.isCompressed),r.DDSTools.UploadDDSLevels(n,a,e,i,s,6),i.isFourCC||1!==i.mipmapCount?f=i.mipmapCount-1:n.generateMipMapsForCubemap(a,!1);n._setCubeMapTextureParams(a,s,f),a.isReady=!0,a.onLoadedObservable.notifyObservers(a),a.onLoadedObservable.clear(),l&&l({isDDS:!0,width:a.width,info:i,data:e,texture:a})}loadData(e,t,a){let o=r.DDSTools.GetDDSInfo(e),l=(o.isRGB||o.isLuminance||o.mipmapCount>1)&&t.generateMipMaps&&Math.max(o.width,o.height)>>o.mipmapCount-1==1;a(o.width,o.height,l,o.isFourCC,()=>{r.DDSTools.UploadDDSLevels(t.getEngine(),t,e,o,l,1)})}}])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,47150,e=>{"use strict";class t{static GetShadersRepository(e=0){return 0===e?t.ShadersRepository:t.ShadersRepositoryWGSL}static GetShadersStore(e=0){return 0===e?t.ShadersStore:t.ShadersStoreWGSL}static GetIncludesShadersStore(e=0){return 0===e?t.IncludesShadersStore:t.IncludesShadersStoreWGSL}}t.ShadersRepository="src/Shaders/",t.ShadersStore={},t.IncludesShadersStore={},t.ShadersRepositoryWGSL="src/ShadersWGSL/",t.ShadersStoreWGSL={},t.IncludesShadersStoreWGSL={},e.s(["ShaderStore",0,t])},8636,e=>{"use strict";var t,i,s=e.i(3864);class r{get wrapU(){return this._cachedWrapU}set wrapU(e){this._cachedWrapU=e}get wrapV(){return this._cachedWrapV}set wrapV(e){this._cachedWrapV=e}get wrapR(){return this._cachedWrapR}set wrapR(e){this._cachedWrapR=e}get anisotropicFilteringLevel(){return this._cachedAnisotropicFilteringLevel}set anisotropicFilteringLevel(e){this._cachedAnisotropicFilteringLevel=e}get comparisonFunction(){return this._comparisonFunction}set comparisonFunction(e){this._comparisonFunction=e}get useMipMaps(){return this._useMipMaps}set useMipMaps(e){this._useMipMaps=e}constructor(){this.samplingMode=-1,this._useMipMaps=!0,this._cachedWrapU=null,this._cachedWrapV=null,this._cachedWrapR=null,this._cachedAnisotropicFilteringLevel=null,this._comparisonFunction=0}setParameters(e=1,t=1,i=1,s=1,r=2,a=0){return this._cachedWrapU=e,this._cachedWrapV=t,this._cachedWrapR=i,this._cachedAnisotropicFilteringLevel=s,this.samplingMode=r,this._comparisonFunction=a,this}compareSampler(e){return this._cachedWrapU===e._cachedWrapU&&this._cachedWrapV===e._cachedWrapV&&this._cachedWrapR===e._cachedWrapR&&this._cachedAnisotropicFilteringLevel===e._cachedAnisotropicFilteringLevel&&this.samplingMode===e.samplingMode&&this._comparisonFunction===e._comparisonFunction&&this._useMipMaps===e._useMipMaps}}(t=i||(i={}))[t.Unknown=0]="Unknown",t[t.Url=1]="Url",t[t.Temp=2]="Temp",t[t.Raw=3]="Raw",t[t.Dynamic=4]="Dynamic",t[t.RenderTarget=5]="RenderTarget",t[t.MultiRenderTarget=6]="MultiRenderTarget",t[t.Cube=7]="Cube",t[t.CubeRaw=8]="CubeRaw",t[t.CubePrefiltered=9]="CubePrefiltered",t[t.Raw3D=10]="Raw3D",t[t.Raw2DArray=11]="Raw2DArray",t[t.DepthStencil=12]="DepthStencil",t[t.CubeRawRGBD=13]="CubeRawRGBD",t[t.Depth=14]="Depth",t[t.External=15]="External";class a extends r{get useMipMaps(){return null===this._useMipMaps?this.generateMipMaps:this._useMipMaps}set useMipMaps(e){this._useMipMaps=e}get uniqueId(){return this._uniqueId}_setUniqueId(e){this._uniqueId=e}getEngine(){return this._engine}get source(){return this._source}constructor(e,t,i=!1){super(),this.isReady=!1,this.isCube=!1,this.is3D=!1,this.is2DArray=!1,this.isMultiview=!1,this.url="",this.generateMipMaps=!1,this._useMipMaps=null,this.mipLevelCount=1,this.samples=0,this.type=-1,this.format=-1,this.onLoadedObservable=new s.Observable,this.onErrorObservable=new s.Observable,this.onRebuildCallback=null,this.width=0,this.height=0,this.depth=0,this.baseWidth=0,this.baseHeight=0,this.baseDepth=0,this.invertY=!1,this._invertVScale=!1,this._associatedChannel=-1,this._source=0,this._buffer=null,this._bufferView=null,this._bufferViewArray=null,this._bufferViewArrayArray=null,this._size=0,this._extension="",this._files=null,this._workingCanvas=null,this._workingContext=null,this._cachedCoordinatesMode=null,this._isDisabled=!1,this._compression=null,this._sphericalPolynomial=null,this._sphericalPolynomialPromise=null,this._sphericalPolynomialComputed=!1,this._lodGenerationScale=0,this._lodGenerationOffset=0,this._useSRGBBuffer=!1,this._creationFlags=0,this._lodTextureHigh=null,this._lodTextureMid=null,this._lodTextureLow=null,this._isRGBD=!1,this._linearSpecularLOD=!1,this._irradianceTexture=null,this._hardwareTexture=null,this._maxLodLevel=null,this._references=1,this._gammaSpace=null,this._premulAlpha=!1,this._dynamicTextureSource=null,this._autoMSAAManagement=!1,this._engine=e,this._source=t,this._uniqueId=a._Counter++,i||(this._hardwareTexture=e._createHardwareTexture())}incrementReferences(){this._references++}updateSize(e,t,i=1){this._engine.updateTextureDimensions(this,e,t,i),this.width=e,this.height=t,this.depth=i,this.baseWidth=e,this.baseHeight=t,this.baseDepth=i,this._size=e*t*i}_rebuild(){let e;if(this.isReady=!1,this._cachedCoordinatesMode=null,this._cachedWrapU=null,this._cachedWrapV=null,this._cachedWrapR=null,this._cachedAnisotropicFilteringLevel=null,this.onRebuildCallback){let e=this.onRebuildCallback(this),t=t=>{t._swapAndDie(this,!1),this.isReady=e.isReady};e.isAsync?e.proxy.then(t):t(e.proxy);return}switch(this.source){case 2:case 12:case 14:break;case 1:e=this._engine.createTexture(this._originalUrl??this.url,!this.generateMipMaps,this.invertY,null,this.samplingMode,e=>{e._swapAndDie(this,!1),this.isReady=!0},null,this._buffer,void 0,this.format,this._extension,void 0,void 0,void 0,this._useSRGBBuffer);return;case 3:if((e=this._engine.createRawTexture(this._bufferView,this.baseWidth,this.baseHeight,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression,this.type,this._creationFlags,this._useSRGBBuffer,this.mipLevelCount))._swapAndDie(this,!1),this._bufferViewArray)for(let e=0;e<this._bufferViewArray.length;e++){let t=this._bufferViewArray[e];t&&this._engine.updateRawTexture(this,t,this.format,this.invertY,this._compression,this.type,this._useSRGBBuffer,e)}this.isReady=!0;break;case 10:(e=this._engine.createRawTexture3D(this._bufferView,this.baseWidth,this.baseHeight,this.baseDepth,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression,this.type))._swapAndDie(this,!1),this.isReady=!0;break;case 11:if((e=this._engine.createRawTexture2DArray(this._bufferView,this.baseWidth,this.baseHeight,this.baseDepth,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression,this.type,this._creationFlags,this.mipLevelCount))._swapAndDie(this,!1),this._bufferViewArray)for(let e=0;e<this._bufferViewArray.length;e++){let t=this._bufferViewArray[e];t&&this._engine.updateRawTexture2DArray(this,t,this.format,this.invertY,this._compression,this.type,e)}this.isReady=!0;break;case 4:(e=this._engine.createDynamicTexture(this.baseWidth,this.baseHeight,this.generateMipMaps,this.samplingMode))._swapAndDie(this,!1),this._dynamicTextureSource&&this._engine.updateDynamicTexture(this,this._dynamicTextureSource,this.invertY,this._premulAlpha,this.format,!0);break;case 7:e=this._engine.createCubeTexture(this.url,null,this._files,!this.generateMipMaps,()=>{e._swapAndDie(this,!1),this.isReady=!0},null,this.format,this._extension,!1,0,0,null,void 0,this._useSRGBBuffer,ArrayBuffer.isView(this._buffer)?this._buffer:null);return;case 8:(e=this._engine.createRawCubeTexture(this._bufferViewArray,this.width,this._originalFormat??this.format,this.type,this.generateMipMaps,this.invertY,this.samplingMode,this._compression))._swapAndDie(this,!1),this.isReady=!0;break;case 13:return;case 9:(e=this._engine.createPrefilteredCubeTexture(this.url,null,this._lodGenerationScale,this._lodGenerationOffset,e=>{e&&e._swapAndDie(this,!1),this.isReady=!0},null,this.format,this._extension))._sphericalPolynomial=this._sphericalPolynomial;return}}_swapAndDie(e,t=!0){this._hardwareTexture?.setUsage(e._source,this.generateMipMaps,this.is2DArray,this.isCube,this.is3D,this.width,this.height,this.depth),e._hardwareTexture=this._hardwareTexture,e._setUniqueId(a._Counter++),t&&(e._isRGBD=this._isRGBD),this._lodTextureHigh&&(e._lodTextureHigh&&e._lodTextureHigh.dispose(),e._lodTextureHigh=this._lodTextureHigh),this._lodTextureMid&&(e._lodTextureMid&&e._lodTextureMid.dispose(),e._lodTextureMid=this._lodTextureMid),this._lodTextureLow&&(e._lodTextureLow&&e._lodTextureLow.dispose(),e._lodTextureLow=this._lodTextureLow),this._irradianceTexture&&(e._irradianceTexture&&e._irradianceTexture.dispose(),e._irradianceTexture=this._irradianceTexture);let i=this._engine.getLoadedTexturesCache(),s=i.indexOf(this);-1!==s&&i.splice(s,1),-1===(s=i.indexOf(e))&&i.push(e)}dispose(){this._references--,0===this._references&&(this.onLoadedObservable.clear(),this.onErrorObservable.clear(),this._engine._releaseTexture(this),this._hardwareTexture=null,this._dynamicTextureSource=null)}}a._Counter=0,e.s(["InternalTexture",0,a],8636)},96042,e=>{"use strict";var t=e.i(69400);class i{constructor(e,i,s,r){this.normal=new t.Vector3(e,i,s),this.d=r}asArray(){return[this.normal.x,this.normal.y,this.normal.z,this.d]}clone(){return new i(this.normal.x,this.normal.y,this.normal.z,this.d)}getClassName(){return"Plane"}getHashCode(){let e=this.normal.getHashCode();return 397*e^this.d}normalize(){let e=Math.sqrt(this.normal.x*this.normal.x+this.normal.y*this.normal.y+this.normal.z*this.normal.z),t=0;return 0!==e&&(t=1/e),this.normal.x*=t,this.normal.y*=t,this.normal.z*=t,this.d*=t,this}transform(e){let t=i._TmpMatrix;e.invertToRef(t);let s=t.m,r=this.normal.x,a=this.normal.y,h=this.normal.z,n=this.d;return new i(r*s[0]+a*s[1]+h*s[2]+n*s[3],r*s[4]+a*s[5]+h*s[6]+n*s[7],r*s[8]+a*s[9]+h*s[10]+n*s[11],r*s[12]+a*s[13]+h*s[14]+n*s[15])}dotCoordinate(e){return this.normal.x*e.x+this.normal.y*e.y+this.normal.z*e.z+this.d}copyFromPoints(e,t,i){let s,r=t.x-e.x,a=t.y-e.y,h=t.z-e.z,n=i.x-e.x,o=i.y-e.y,l=i.z-e.z,u=a*l-h*o,c=h*n-r*l,d=r*o-a*n,_=Math.sqrt(u*u+c*c+d*d);return s=0!==_?1/_:0,this.normal.x=u*s,this.normal.y=c*s,this.normal.z=d*s,this.d=-(this.normal.x*e.x+this.normal.y*e.y+this.normal.z*e.z),this}isFrontFacingTo(e,i){return t.Vector3.Dot(this.normal,e)<=i}signedDistanceTo(e){return t.Vector3.Dot(e,this.normal)+this.d}static FromArray(e){return new i(e[0],e[1],e[2],e[3])}static FromPoints(e,t,s){let r=new i(0,0,0,0);return r.copyFromPoints(e,t,s),r}static FromPositionAndNormal(e,t){let s=new i(0,0,0,0);return this.FromPositionAndNormalToRef(e,t,s)}static FromPositionAndNormalToRef(e,t,i){return i.normal.copyFrom(t),i.normal.normalize(),i.d=-e.dot(i.normal),i}static SignedDistanceToPlaneFromPositionAndNormal(e,i,s){let r=-(i.x*e.x+i.y*e.y+i.z*e.z);return t.Vector3.Dot(s,i)+r}}i._TmpMatrix=t.Matrix.Identity(),e.s(["Plane",0,i])},372,e=>{"use strict";e.s(["useOpenGLOrientationForUV",()=>!1])},88725,e=>{"use strict";e.s([],49110),e.i(49110);var t=e.i(16347),i=e.i(20363),s=e.i(44265),r=e.i(94559),a=e.i(8636);let h=!1;class n extends i.Texture{constructor(e,t,n,o=!1,l=3,u=5,c){const d=!n||n._isScene;super(null,d?n:n?.scene,d?!o:n,c,l,void 0,void 0,void 0,void 0,u),h||(h=!0,r.ThinEngine.prototype.createDynamicTexture=function(e,t,i,r){let h=new a.InternalTexture(this,4);return h.baseWidth=e,h.baseHeight=t,i&&(e=this.needPOTTextures?(0,s.GetExponentOfTwo)(e,this._caps.maxTextureSize):e,t=this.needPOTTextures?(0,s.GetExponentOfTwo)(t,this._caps.maxTextureSize):t),h.width=e,h.height=t,h.isReady=!1,h.generateMipMaps=i,h.samplingMode=r,this.updateTextureSamplingMode(r,h),this._internalTexturesCache.push(h),h},r.ThinEngine.prototype.updateDynamicTexture=function(e,t,i,s=!1,r,a=!1,h=!1){if(!e)return;let n=this._gl,o=n.TEXTURE_2D,l=this._bindTextureDirectly(o,e,!0,a);this._unpackFlipY(void 0===i?e.invertY:i),s&&n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1);let u=this._getWebGLTextureType(e.type),c=this._getInternalFormat(r||e.format),d=this._getRGBABufferInternalSizedFormat(e.type,c);n.texImage2D(o,0,d,c,u,t),e.generateMipMaps&&n.generateMipmap(o),l||this._bindTextureDirectly(o,null),s&&n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),r&&(e.format=r),e._dynamicTextureSource=t,e._premulAlpha=s,e.invertY=i||!1,e.isReady=!0}),this.name=e,this.wrapU=i.Texture.CLAMP_ADDRESSMODE,this.wrapV=i.Texture.CLAMP_ADDRESSMODE,this._generateMipMaps=o;const _=this._getEngine();if(!_)return;t.getContext?(this._canvas=t,this._ownCanvas=!1,this._texture=_.createDynamicTexture(this._canvas.width,this._canvas.height,o,l)):(this._canvas=_.createCanvas(1,1),this._ownCanvas=!0,t.width||0===t.width?this._texture=_.createDynamicTexture(t.width,t.height,o,l):this._texture=_.createDynamicTexture(t,t,o,l));const p=this.getSize();this._canvas.width!==p.width&&(this._canvas.width=p.width),this._canvas.height!==p.height&&(this._canvas.height=p.height),this._context=this._canvas.getContext("2d")}getClassName(){return"DynamicTexture"}get canRescale(){return!0}_recreate(e){this._canvas.width=e.width,this._canvas.height=e.height,this.releaseInternalTexture(),this._texture=this._getEngine().createDynamicTexture(e.width,e.height,this._generateMipMaps,this.samplingMode)}scale(e){let t=this.getSize();t.width*=e,t.height*=e,this._recreate(t)}scaleTo(e,t){let i=this.getSize();i.width=e,i.height=t,this._recreate(i)}getContext(){return this._context}clear(e){let t=this.getSize();e&&(this._context.fillStyle=e),this._context.clearRect(0,0,t.width,t.height)}update(e,t=!1,i=!1){this._texture&&this._getEngine().updateDynamicTexture(this._texture,this._canvas,void 0===e||e,t,this._format||void 0,void 0,i)}drawText(e,t,i,s,r,a,h,n=!0){let o=this.getSize();if(a&&(this._context.fillStyle=a,this._context.fillRect(0,0,o.width,o.height)),this._context.font=s,null==t){let i=this._context.measureText(e);t=(o.width-i.width)/2}if(null==i){let e=parseInt(s.replace(/\D/g,""));i=o.height/2+e/3.65}this._context.fillStyle=r||"",this._context.fillText(e,t,i),n&&this.update(h)}dispose(){super.dispose(),this._ownCanvas&&this._canvas?.remove?.(),this._canvas=null,this._context=null}clone(){let e=this.getScene();if(!e)return this;let t=this.getSize(),i=new n(this.name,t,e,this._generateMipMaps);return i.hasAlpha=this.hasAlpha,i.level=this.level,i.wrapU=this.wrapU,i.wrapV=this.wrapV,i}serialize(){let e=this.getScene();e&&!e.isReady()&&t.Logger.Warn("The scene must be ready before serializing the dynamic texture");let i=super.serialize();return n._IsCanvasElement(this._canvas)&&(i.base64String=this._canvas.toDataURL()),i.invertY=this._invertY,i.samplingMode=this.samplingMode,i}static _IsCanvasElement(e){return void 0!==e.toDataURL}_rebuild(){this.update()}}e.s(["DynamicTexture",0,n],10037),e.i(10037),e.s(["DynamicTexture",0,n],88725)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,96042,e=>{"use strict";var t=e.i(69400);class i{constructor(e,i,a,r){this.normal=new t.Vector3(e,i,a),this.d=r}asArray(){return[this.normal.x,this.normal.y,this.normal.z,this.d]}clone(){return new i(this.normal.x,this.normal.y,this.normal.z,this.d)}getClassName(){return"Plane"}getHashCode(){let e=this.normal.getHashCode();return 397*e^this.d}normalize(){let e=Math.sqrt(this.normal.x*this.normal.x+this.normal.y*this.normal.y+this.normal.z*this.normal.z),t=0;return 0!==e&&(t=1/e),this.normal.x*=t,this.normal.y*=t,this.normal.z*=t,this.d*=t,this}transform(e){let t=i._TmpMatrix;e.invertToRef(t);let a=t.m,r=this.normal.x,s=this.normal.y,n=this.normal.z,o=this.d;return new i(r*a[0]+s*a[1]+n*a[2]+o*a[3],r*a[4]+s*a[5]+n*a[6]+o*a[7],r*a[8]+s*a[9]+n*a[10]+o*a[11],r*a[12]+s*a[13]+n*a[14]+o*a[15])}dotCoordinate(e){return this.normal.x*e.x+this.normal.y*e.y+this.normal.z*e.z+this.d}copyFromPoints(e,t,i){let a,r=t.x-e.x,s=t.y-e.y,n=t.z-e.z,o=i.x-e.x,h=i.y-e.y,l=i.z-e.z,c=s*l-n*h,u=n*o-r*l,_=r*h-s*o,d=Math.sqrt(c*c+u*u+_*_);return a=0!==d?1/d:0,this.normal.x=c*a,this.normal.y=u*a,this.normal.z=_*a,this.d=-(this.normal.x*e.x+this.normal.y*e.y+this.normal.z*e.z),this}isFrontFacingTo(e,i){return t.Vector3.Dot(this.normal,e)<=i}signedDistanceTo(e){return t.Vector3.Dot(e,this.normal)+this.d}static FromArray(e){return new i(e[0],e[1],e[2],e[3])}static FromPoints(e,t,a){let r=new i(0,0,0,0);return r.copyFromPoints(e,t,a),r}static FromPositionAndNormal(e,t){let a=new i(0,0,0,0);return this.FromPositionAndNormalToRef(e,t,a)}static FromPositionAndNormalToRef(e,t,i){return i.normal.copyFrom(t),i.normal.normalize(),i.d=-e.dot(i.normal),i}static SignedDistanceToPlaneFromPositionAndNormal(e,i,a){let r=-(i.x*e.x+i.y*e.y+i.z*e.z);return t.Vector3.Dot(a,i)+r}}i._TmpMatrix=t.Matrix.Identity(),e.s(["Plane",0,i])},372,e=>{"use strict";e.s(["useOpenGLOrientationForUV",()=>!1])},20363,38329,e=>{"use strict";let t,i,a,r,s,n,o,h,l,c,u,_,d,f,m,x,R,g,T,M,p,S,I,O,E,A,v,y,b,C,L,z,U,V,N,P,B,w,D,F;var G,W=e.i(57575),k=e.i(9855),Y=e.i(3864),j=e.i(69400),q=e.i(74868),H=e.i(44520),Z=e.i(85050),X=e.i(44816),J=e.i(78755),K=e.i(96042),Q=e.i(1229);function $(e,t,i=!1){let a=t.width,r=t.height;if(e instanceof Float32Array){let t=e.byteLength/e.BYTES_PER_ELEMENT,i=new Uint8Array(t);for(;--t>=0;){let a=e[t];a<0?a=0:a>1&&(a=1),i[t]=255*a}e=i}let s=document.createElement("canvas");s.width=a,s.height=r;let n=s.getContext("2d");if(!n)return null;let o=n.createImageData(a,r);if(o.data.set(e),n.putImageData(o,0,0),i){let e=document.createElement("canvas");e.width=a,e.height=r;let t=e.getContext("2d");return t?(t.translate(0,r),t.scale(1,-1),t.drawImage(s,0,0),e.toDataURL("image/png")):null}return s.toDataURL("image/png")}function ee(e,t=0,i=0){let a=e.getInternalTexture();if(!a)return null;let r=e._readPixelsSync(t,i);return r?$(r,e.getSize(),a.invertY):null}async function et(e,t=0,i=0){let a=e.getInternalTexture();if(!a)return null;let r=await e.readPixels(t,i);return r?$(r,e.getSize(),a.invertY):null}e.s(["GenerateBase64StringFromTexture",0,ee,"GenerateBase64StringFromTextureAsync",0,et],38329);var ei=e.i(372),ea=e.i(2060);let er=(f=q.BaseTexture,m=[],x=[],R=[],g=[],T=[],M=[],p=[],S=[],I=[],O=[],E=[],A=[],v=[],y=[],b=[],C=[],L=[],z=[],U=[],V=[],N=[],P=[],B=[],w=[],D=[],G=class extends f{static _CreateVideoTexture(e,t,i,a=!1,r=!1,s=G.TRILINEAR_SAMPLINGMODE,n={},o,h=5){throw(0,Z._WarnImport)("VideoTexture")}get noMipmap(){return this._noMipmap}get mimeType(){return this._mimeType}set isBlocking(e){this._isBlocking=e}get isBlocking(){return this._isBlocking}get invertY(){return this._invertY}constructor(e,t,i,a,r=G.TRILINEAR_SAMPLINGMODE,s=null,n=null,o=null,h=!1,l,c,u,_,d){let f;super(t),this.url=((0,W.__runInitializers)(this,m),(0,W.__runInitializers)(this,x,null)),this.uOffset=((0,W.__runInitializers)(this,R),(0,W.__runInitializers)(this,g,0)),this.vOffset=((0,W.__runInitializers)(this,T),(0,W.__runInitializers)(this,M,0)),this.uScale=((0,W.__runInitializers)(this,p),(0,W.__runInitializers)(this,S,1)),this.vScale=((0,W.__runInitializers)(this,I),(0,W.__runInitializers)(this,O,1)),this.uAng=((0,W.__runInitializers)(this,E),(0,W.__runInitializers)(this,A,0)),this.vAng=((0,W.__runInitializers)(this,v),(0,W.__runInitializers)(this,y,0)),this.wAng=((0,W.__runInitializers)(this,b),(0,W.__runInitializers)(this,C,0)),this.uRotationCenter=((0,W.__runInitializers)(this,L),(0,W.__runInitializers)(this,z,.5)),this.vRotationCenter=((0,W.__runInitializers)(this,U),(0,W.__runInitializers)(this,V,.5)),this.wRotationCenter=((0,W.__runInitializers)(this,N),(0,W.__runInitializers)(this,P,.5)),this.homogeneousRotationInUVTransform=((0,W.__runInitializers)(this,B),(0,W.__runInitializers)(this,w,!1)),this.inspectableCustomProperties=((0,W.__runInitializers)(this,D),null),this._noMipmap=!1,this._invertY=!1,this._rowGenerationMatrix=null,this._cachedTextureMatrix=null,this._projectionModeMatrix=null,this._t0=null,this._t1=null,this._t2=null,this._cachedUOffset=-1,this._cachedVOffset=-1,this._cachedUScale=0,this._cachedVScale=0,this._cachedUAng=-1,this._cachedVAng=-1,this._cachedWAng=-1,this._cachedReflectionProjectionMatrixId=-1,this._cachedURotationCenter=-1,this._cachedVRotationCenter=-1,this._cachedWRotationCenter=-1,this._cachedHomogeneousRotationInUVTransform=!1,this._cachedIdentity3x2=!0,this._cachedReflectionTextureMatrix=null,this._cachedReflectionUOffset=-1,this._cachedReflectionVOffset=-1,this._cachedReflectionUScale=0,this._cachedReflectionVScale=0,this._cachedReflectionCoordinatesMode=-1,this._buffer=null,this._deleteBuffer=!1,this._format=null,this._delayedOnLoad=null,this._delayedOnError=null,this.onLoadObservable=new Y.Observable,this._isBlocking=!0,this.name=e||"",this.url=e;let F=!1,k=null,j=!0;"object"==typeof i&&null!==i?(f=i.noMipmap??!1,a=i.invertY??!ei.useOpenGLOrientationForUV,r=i.samplingMode??G.TRILINEAR_SAMPLINGMODE,s=i.onLoad??null,n=i.onError??null,o=i.buffer??null,h=i.deleteBuffer??!1,l=i.format,c=i.mimeType,u=i.loaderOptions,_=i.creationFlags,F=i.useSRGBBuffer??!1,k=i.internalTexture??null,j=i.gammaSpace??j,d=i.forcedExtension??d):f=!!i,this._gammaSpace=j,this._noMipmap=f,this._invertY=void 0===a?!ei.useOpenGLOrientationForUV:a,this._initialSamplingMode=r,this._buffer=o,this._deleteBuffer=h,this._mimeType=c,this._loaderOptions=u,this._creationFlags=_,this._useSRGBBuffer=F,this._forcedExtension=d,void 0!==l&&(this._format=l);const q=this.getScene(),H=this._getEngine();if(!H)return;H.onBeforeTextureInitObservable.notifyObservers(this);const Z=()=>{this._texture&&(this._texture._invertVScale&&(this.vScale*=-1,this.vOffset+=1),null!==this._texture._cachedWrapU&&(this.wrapU=this._texture._cachedWrapU,this._texture._cachedWrapU=null),null!==this._texture._cachedWrapV&&(this.wrapV=this._texture._cachedWrapV,this._texture._cachedWrapV=null),null!==this._texture._cachedWrapR&&(this.wrapR=this._texture._cachedWrapR,this._texture._cachedWrapR=null)),this.onLoadObservable.hasObservers()&&this.onLoadObservable.notifyObservers(this),s&&s(),!this.isBlocking&&q&&q.resetCachedMaterial()},J=(e,t)=>{this._loadingError=!0,this._errorObject={message:e,exception:t},n&&n(e,t),G.OnTextureLoadErrorObservable.notifyObservers(this)};if(!this.url&&!k){this._delayedOnLoad=Z,this._delayedOnError=J;return}if(this._texture=k??this._getFromCache(this.url,f,r,this._invertY,F,this.isCube),this._texture)if(this._texture.isReady)X.TimingTools.SetImmediate(()=>Z());else{const e=this._texture.onLoadedObservable.add(Z);this._texture.onErrorObservable.add(t=>{J(t.message,t.exception),this._texture?.onLoadedObservable.remove(e)})}else if(q&&q.useDelayedTextureLoading)this.delayLoadState=4,this._delayedOnLoad=Z,this._delayedOnError=J;else{try{this._texture=H.createTexture(this.url,f,this._invertY,q,r,Z,J,this._buffer,void 0,this._format,this._forcedExtension,c,u,_,F)}catch(e){throw J("error loading",e),e}h&&(this._buffer=null)}}updateURL(e,t=null,i,a){this.url&&(this.releaseInternalTexture(),this.getScene().markAllMaterialsAsDirty(1,e=>e.hasTexture(this))),(!this.name||this.name.startsWith("data:"))&&(this.name=e),this.url=e,this._buffer=t,this._forcedExtension=a,this.delayLoadState=4;let r=this._delayedOnLoad,s=()=>{r?r():this.onLoadObservable.hasObservers()&&this.onLoadObservable.notifyObservers(this),i&&i()};this._delayedOnLoad=s,this.delayLoad()}delayLoad(){if(4!==this.delayLoadState)return;let e=this.getScene();if(!e)return;let t=this.url;!t&&(this.name.indexOf("://")>0||this.name.startsWith("data:"))&&(t=this.name),this.delayLoadState=1,this._texture=this._getFromCache(t,this._noMipmap,this.samplingMode,this._invertY,this._useSRGBBuffer,this.isCube),this._texture?this._delayedOnLoad&&(this._texture.isReady?X.TimingTools.SetImmediate(this._delayedOnLoad):this._texture.onLoadedObservable.add(this._delayedOnLoad)):(this._texture=e.getEngine().createTexture(t,this._noMipmap,this._invertY,e,this.samplingMode,this._delayedOnLoad,this._delayedOnError,this._buffer,null,this._format,this._forcedExtension,this._mimeType,this._loaderOptions,this._creationFlags,this._useSRGBBuffer),this._deleteBuffer&&(this._buffer=null)),this._delayedOnLoad=null,this._delayedOnError=null}_prepareRowForTextureGeneration(e,t,i,a){e*=this._cachedUScale,t*=this._cachedVScale,e-=this.uRotationCenter*this._cachedUScale,t-=this.vRotationCenter*this._cachedVScale,i-=this.wRotationCenter,j.Vector3.TransformCoordinatesFromFloatsToRef(e,t,i,this._rowGenerationMatrix,a),a.x+=this.uRotationCenter*this._cachedUScale+this._cachedUOffset,a.y+=this.vRotationCenter*this._cachedVScale+this._cachedVOffset,a.z+=this.wRotationCenter}getTextureMatrix(e=1){if(this.uOffset===this._cachedUOffset&&this.vOffset===this._cachedVOffset&&this.uScale*e===this._cachedUScale&&this.vScale===this._cachedVScale&&this.uAng===this._cachedUAng&&this.vAng===this._cachedVAng&&this.wAng===this._cachedWAng&&this.uRotationCenter===this._cachedURotationCenter&&this.vRotationCenter===this._cachedVRotationCenter&&this.wRotationCenter===this._cachedWRotationCenter&&this.homogeneousRotationInUVTransform===this._cachedHomogeneousRotationInUVTransform)return this._cachedTextureMatrix;this._cachedUOffset=this.uOffset,this._cachedVOffset=this.vOffset,this._cachedUScale=this.uScale*e,this._cachedVScale=this.vScale,this._cachedUAng=this.uAng,this._cachedVAng=this.vAng,this._cachedWAng=this.wAng,this._cachedURotationCenter=this.uRotationCenter,this._cachedVRotationCenter=this.vRotationCenter,this._cachedWRotationCenter=this.wRotationCenter,this._cachedHomogeneousRotationInUVTransform=this.homogeneousRotationInUVTransform,this._cachedTextureMatrix&&this._rowGenerationMatrix||(this._cachedTextureMatrix=j.Matrix.Zero(),this._rowGenerationMatrix=new j.Matrix,this._t0=j.Vector3.Zero(),this._t1=j.Vector3.Zero(),this._t2=j.Vector3.Zero()),j.Matrix.RotationYawPitchRollToRef(this.vAng,this.uAng,this.wAng,this._rowGenerationMatrix),this.homogeneousRotationInUVTransform?(j.Matrix.TranslationToRef(-this._cachedURotationCenter,-this._cachedVRotationCenter,-this._cachedWRotationCenter,j.TmpVectors.Matrix[0]),j.Matrix.TranslationToRef(this._cachedURotationCenter,this._cachedVRotationCenter,this._cachedWRotationCenter,j.TmpVectors.Matrix[1]),j.Matrix.ScalingToRef(this._cachedUScale,this._cachedVScale,0,j.TmpVectors.Matrix[2]),j.Matrix.TranslationToRef(this._cachedUOffset,this._cachedVOffset,0,j.TmpVectors.Matrix[3]),j.TmpVectors.Matrix[0].multiplyToRef(this._rowGenerationMatrix,this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(j.TmpVectors.Matrix[1],this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(j.TmpVectors.Matrix[2],this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(j.TmpVectors.Matrix[3],this._cachedTextureMatrix),this._cachedTextureMatrix.setRowFromFloats(2,this._cachedTextureMatrix.m[12],this._cachedTextureMatrix.m[13],this._cachedTextureMatrix.m[14],1)):(this._prepareRowForTextureGeneration(0,0,0,this._t0),this._prepareRowForTextureGeneration(1,0,0,this._t1),this._prepareRowForTextureGeneration(0,1,0,this._t2),this._t1.subtractInPlace(this._t0),this._t2.subtractInPlace(this._t0),j.Matrix.FromValuesToRef(this._t1.x,this._t1.y,this._t1.z,0,this._t2.x,this._t2.y,this._t2.z,0,this._t0.x,this._t0.y,this._t0.z,0,0,0,0,1,this._cachedTextureMatrix));let t=this.getScene();if(!t)return this._cachedTextureMatrix;let i=this._cachedIdentity3x2;return this._cachedIdentity3x2=this._cachedTextureMatrix.isIdentityAs3x2(),this.optimizeUVAllocation&&i!==this._cachedIdentity3x2&&t.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)),this._cachedTextureMatrix}getReflectionTextureMatrix(){let e=this.getScene();if(!e)return this._cachedReflectionTextureMatrix;if(this.uOffset===this._cachedReflectionUOffset&&this.vOffset===this._cachedReflectionVOffset&&this.uScale===this._cachedReflectionUScale&&this.vScale===this._cachedReflectionVScale&&this.coordinatesMode===this._cachedReflectionCoordinatesMode){if(this.coordinatesMode!==G.PROJECTION_MODE)return this._cachedReflectionTextureMatrix;else if(this._cachedReflectionProjectionMatrixId===e.getProjectionMatrix().updateFlag)return this._cachedReflectionTextureMatrix}this._cachedReflectionTextureMatrix||(this._cachedReflectionTextureMatrix=j.Matrix.Zero()),this._projectionModeMatrix||(this._projectionModeMatrix=j.Matrix.Zero());let t=this._cachedReflectionCoordinatesMode!==this.coordinatesMode;switch(this._cachedReflectionUOffset=this.uOffset,this._cachedReflectionVOffset=this.vOffset,this._cachedReflectionUScale=this.uScale,this._cachedReflectionVScale=this.vScale,this._cachedReflectionCoordinatesMode=this.coordinatesMode,this.coordinatesMode){case G.PLANAR_MODE:j.Matrix.IdentityToRef(this._cachedReflectionTextureMatrix),this._cachedReflectionTextureMatrix[0]=this.uScale,this._cachedReflectionTextureMatrix[5]=this.vScale,this._cachedReflectionTextureMatrix[12]=this.uOffset,this._cachedReflectionTextureMatrix[13]=this.vOffset;break;case G.PROJECTION_MODE:{j.Matrix.FromValuesToRef(.5,0,0,0,0,-.5,0,0,0,0,0,0,.5,.5,1,1,this._projectionModeMatrix);let t=e.getProjectionMatrix();this._cachedReflectionProjectionMatrixId=t.updateFlag,t.multiplyToRef(this._projectionModeMatrix,this._cachedReflectionTextureMatrix);break}default:j.Matrix.IdentityToRef(this._cachedReflectionTextureMatrix)}return t&&e.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)),this._cachedReflectionTextureMatrix}clone(){let e={noMipmap:this._noMipmap,invertY:this._invertY,samplingMode:this.samplingMode,onLoad:void 0,onError:void 0,buffer:this._texture?this._texture._buffer:void 0,deleteBuffer:this._deleteBuffer,format:this.textureFormat,mimeType:this.mimeType,loaderOptions:this._loaderOptions,creationFlags:this._creationFlags,useSRGBBuffer:this._useSRGBBuffer};return ea.SerializationHelper.Clone(()=>new G(this._texture?this._texture.url:null,this.getScene(),e),this)}serialize(){let e=this.name;!G.SerializeBuffers&&this.name.startsWith("data:")&&(this.name=""),this.name.startsWith("data:")&&this.url===this.name&&(this.url="");let t=super.serialize(G._SerializeInternalTextureUniqueId);if(!t)return null;if(G.SerializeBuffers||G.ForceSerializeBuffers)if("string"==typeof this._buffer&&this._buffer.startsWith("data:"))t.base64String=this._buffer,t.name=t.name.replace("data:","");else if(this.url&&this.url.startsWith("data:")&&this._buffer instanceof Uint8Array){let e=this.mimeType||"image/png";t.base64String=`data:${e};base64,${(0,Q.EncodeArrayBufferToBase64)(this._buffer)}`}else(G.ForceSerializeBuffers||this.url&&this.url.startsWith("blob:")||this._forceSerialize)&&(t.base64String=!this._engine||this._engine._features.supportSyncTextureRead?ee(this):et(this));return t.invertY=this._invertY,t.samplingMode=this.samplingMode,t._creationFlags=this._creationFlags,t._useSRGBBuffer=this._useSRGBBuffer,G._SerializeInternalTextureUniqueId&&(t.internalTextureUniqueId=this._texture?.uniqueId),t.internalTextureLabel=this._texture?.label,t.noMipmap=this._noMipmap,this.name=e,t}getClassName(){return"Texture"}dispose(){super.dispose(),this.onLoadObservable.clear(),this._delayedOnLoad=null,this._delayedOnError=null,this._buffer=null}static Parse(e,t,i){let a;if(e.customType){let a=J.InstantiationTools.Instantiate(e.customType).Parse(e,t,i);return e.samplingMode&&a.updateSamplingMode&&a._samplingMode&&a._samplingMode!==e.samplingMode&&a.updateSamplingMode(e.samplingMode),a}if(e.isCube&&!e.isRenderTarget)return G._CubeTextureParser(e,t,i);let r=void 0!==e.internalTextureUniqueId;if(!e.name&&!e.isRenderTarget&&!r)return null;if(r){for(let i of t.getEngine().getLoadedTexturesCache())if(i.uniqueId===e.internalTextureUniqueId){a=i;break}}let s=t=>{if(t&&t._texture&&(t._texture._cachedWrapU=null,t._texture._cachedWrapV=null,t._texture._cachedWrapR=null),e.samplingMode){let i=e.samplingMode;t&&t.samplingMode!==i&&t.updateSamplingMode(i)}if(t&&e.animations)for(let i=0;i<e.animations.length;i++){let a=e.animations[i],r=(0,H.GetClass)("BABYLON.Animation");r&&t.animations.push(r.Parse(a))}t&&t._texture&&(r&&!a&&t._texture._setUniqueId(e.internalTextureUniqueId),t._texture.label=e.internalTextureLabel)};return ea.SerializationHelper.Parse(()=>{let r=!0;if(e.noMipmap&&(r=!1),e.mirrorPlane){let i=G._CreateMirror(e.name,e.renderTargetSize,t,r);return i._waitingRenderList=e.renderList,i.mirrorPlane=K.Plane.FromArray(e.mirrorPlane),s(i),i}if(e.isRenderTarget&&!e.base64String){let i=null;if(e.isCube){if(t.reflectionProbes)for(let i=0;i<t.reflectionProbes.length;i++){let a=t.reflectionProbes[i];if(a.name===e.name)return a.cubeTexture}}else(i=G._CreateRenderTargetTexture(e.name,e.renderTargetSize,t,r,e._creationFlags??0))._waitingRenderList=e.renderList;return s(i),i}if(e.isVideo){let a=G._CreateVideoTexture(i+(e.url||e.name),i+(e.src||e.url),t,r,e.invertY,e.samplingMode,e.settings||{});return s(a),a}{let n;if("string"==typeof e.base64String&&e.base64String&&!a){let i={buffer:e.base64String,noMipmap:!r,invertY:e.invertY,samplingMode:e.samplingMode,useSRGBBuffer:e._useSRGBBuffer??!1,creationFlags:e._creationFlags??0,onLoad:()=>{s(n)}},a=e.base64String,o=a.startsWith("data:")?a.substring(5):a;(n=G.CreateFromBase64String("",o,t,i)).name=e.name}else{let o;o=e.name&&(e.name.indexOf("://")>0||e.name.startsWith("data:"))?e.name:i+e.name,e.url&&(e.url.startsWith("data:")||G.UseSerializedUrlIfAny)&&(o=e.url);let h={noMipmap:!r,invertY:e.invertY,samplingMode:e.samplingMode,useSRGBBuffer:e._useSRGBBuffer??!1,creationFlags:e._creationFlags??0,onLoad:()=>{s(n)},internalTexture:a};n=new G(o,t,h)}return n}},e,t)}static CreateFromBase64String(e,t,i,a,r,s=G.TRILINEAR_SAMPLINGMODE,n=null,o=null,h=5,l,c){return new G("data:"+t,i,a,r,s,n,o,e,!1,h,void 0,void 0,l,c)}static LoadFromDataString(e,t,i,a=!1,r,s=!0,n=G.TRILINEAR_SAMPLINGMODE,o=null,h=null,l=5,c,u){return"data:"!==e.substring(0,5)&&(e="data:"+e),new G(e,i,r,s,n,o,h,t,a,l,void 0,void 0,c,u)}},F="function"==typeof Symbol&&Symbol.metadata?Object.create(f[Symbol.metadata]??null):void 0,t=[(0,k.serialize)()],i=[(0,k.serialize)()],a=[(0,k.serialize)()],r=[(0,k.serialize)()],s=[(0,k.serialize)()],n=[(0,k.serialize)()],o=[(0,k.serialize)()],h=[(0,k.serialize)()],l=[(0,k.serialize)()],c=[(0,k.serialize)()],u=[(0,k.serialize)()],_=[(0,k.serialize)()],d=[(0,k.serialize)()],(0,W.__esDecorate)(G,null,d,{kind:"getter",name:"isBlocking",static:!1,private:!1,access:{has:e=>"isBlocking"in e,get:e=>e.isBlocking},metadata:F},null,m),(0,W.__esDecorate)(null,null,t,{kind:"field",name:"url",static:!1,private:!1,access:{has:e=>"url"in e,get:e=>e.url,set:(e,t)=>{e.url=t}},metadata:F},x,R),(0,W.__esDecorate)(null,null,i,{kind:"field",name:"uOffset",static:!1,private:!1,access:{has:e=>"uOffset"in e,get:e=>e.uOffset,set:(e,t)=>{e.uOffset=t}},metadata:F},g,T),(0,W.__esDecorate)(null,null,a,{kind:"field",name:"vOffset",static:!1,private:!1,access:{has:e=>"vOffset"in e,get:e=>e.vOffset,set:(e,t)=>{e.vOffset=t}},metadata:F},M,p),(0,W.__esDecorate)(null,null,r,{kind:"field",name:"uScale",static:!1,private:!1,access:{has:e=>"uScale"in e,get:e=>e.uScale,set:(e,t)=>{e.uScale=t}},metadata:F},S,I),(0,W.__esDecorate)(null,null,s,{kind:"field",name:"vScale",static:!1,private:!1,access:{has:e=>"vScale"in e,get:e=>e.vScale,set:(e,t)=>{e.vScale=t}},metadata:F},O,E),(0,W.__esDecorate)(null,null,n,{kind:"field",name:"uAng",static:!1,private:!1,access:{has:e=>"uAng"in e,get:e=>e.uAng,set:(e,t)=>{e.uAng=t}},metadata:F},A,v),(0,W.__esDecorate)(null,null,o,{kind:"field",name:"vAng",static:!1,private:!1,access:{has:e=>"vAng"in e,get:e=>e.vAng,set:(e,t)=>{e.vAng=t}},metadata:F},y,b),(0,W.__esDecorate)(null,null,h,{kind:"field",name:"wAng",static:!1,private:!1,access:{has:e=>"wAng"in e,get:e=>e.wAng,set:(e,t)=>{e.wAng=t}},metadata:F},C,L),(0,W.__esDecorate)(null,null,l,{kind:"field",name:"uRotationCenter",static:!1,private:!1,access:{has:e=>"uRotationCenter"in e,get:e=>e.uRotationCenter,set:(e,t)=>{e.uRotationCenter=t}},metadata:F},z,U),(0,W.__esDecorate)(null,null,c,{kind:"field",name:"vRotationCenter",static:!1,private:!1,access:{has:e=>"vRotationCenter"in e,get:e=>e.vRotationCenter,set:(e,t)=>{e.vRotationCenter=t}},metadata:F},V,N),(0,W.__esDecorate)(null,null,u,{kind:"field",name:"wRotationCenter",static:!1,private:!1,access:{has:e=>"wRotationCenter"in e,get:e=>e.wRotationCenter,set:(e,t)=>{e.wRotationCenter=t}},metadata:F},P,B),(0,W.__esDecorate)(null,null,_,{kind:"field",name:"homogeneousRotationInUVTransform",static:!1,private:!1,access:{has:e=>"homogeneousRotationInUVTransform"in e,get:e=>e.homogeneousRotationInUVTransform,set:(e,t)=>{e.homogeneousRotationInUVTransform=t}},metadata:F},w,D),F&&Object.defineProperty(G,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:F}),G.SerializeBuffers=!0,G.ForceSerializeBuffers=!1,G.OnTextureLoadErrorObservable=new Y.Observable,G._SerializeInternalTextureUniqueId=!1,G._CubeTextureParser=(e,t,i)=>{throw(0,Z._WarnImport)("CubeTexture")},G._CreateMirror=(e,t,i,a)=>{throw(0,Z._WarnImport)("MirrorTexture")},G._CreateRenderTargetTexture=(e,t,i,a,r)=>{throw(0,Z._WarnImport)("RenderTargetTexture")},G.NEAREST_SAMPLINGMODE=1,G.NEAREST_NEAREST_MIPLINEAR=8,G.BILINEAR_SAMPLINGMODE=2,G.LINEAR_LINEAR_MIPNEAREST=11,G.TRILINEAR_SAMPLINGMODE=3,G.LINEAR_LINEAR_MIPLINEAR=3,G.NEAREST_NEAREST_MIPNEAREST=4,G.NEAREST_LINEAR_MIPNEAREST=5,G.NEAREST_LINEAR_MIPLINEAR=6,G.NEAREST_LINEAR=7,G.NEAREST_NEAREST=1,G.LINEAR_NEAREST_MIPNEAREST=9,G.LINEAR_NEAREST_MIPLINEAR=10,G.LINEAR_LINEAR=2,G.LINEAR_NEAREST=12,G.EXPLICIT_MODE=0,G.SPHERICAL_MODE=1,G.PLANAR_MODE=2,G.CUBIC_MODE=3,G.PROJECTION_MODE=4,G.SKYBOX_MODE=5,G.INVCUBIC_MODE=6,G.EQUIRECTANGULAR_MODE=7,G.FIXED_EQUIRECTANGULAR_MODE=8,G.FIXED_EQUIRECTANGULAR_MIRRORED_MODE=9,G.CLAMP_ADDRESSMODE=0,G.WRAP_ADDRESSMODE=1,G.MIRROR_ADDRESSMODE=2,G.UseSerializedUrlIfAny=!1,G),es=!1;e.s(["RegisterTexture",0,function(){es||(es=!0,(0,H.RegisterClass)("BABYLON.Texture",er),ea.SerializationHelper._TextureParser=er.Parse)},"Texture",0,er],20363)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,13600,i=>{"use strict";i.s([],71615),i.i(71615);var n=i.i(94559);i.s(["ThinEngine",()=>n.ThinEngine],13600)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,3524,69680,e=>{"use strict";var t=e.i(41041),s=e.i(3864);e.s(["PostProcessManager",0,class{constructor(e){this._vertexBuffers={},this._activePostProcesses=[],this.onBeforeRenderObservable=new s.Observable,this._scene=e}_prepareBuffers(){if(this._vertexBuffers[t.VertexBuffer.PositionKind])return;let e=[];e.push(1,1),e.push(-1,1),e.push(-1,-1),e.push(1,-1),this._vertexBuffers[t.VertexBuffer.PositionKind]=new t.VertexBuffer(this._scene.getEngine(),e,t.VertexBuffer.PositionKind,!1,!1,2),this._buildIndexBuffer()}_buildIndexBuffer(){let e=[];e.push(0),e.push(1),e.push(2),e.push(0),e.push(2),e.push(3),this._indexBuffer=this._scene.getEngine().createIndexBuffer(e)}_getActivePostProcesses(e){let t=this._activePostProcesses;t.length=0;for(let s=0;s<e.length;s++){let r=e[s];r&&t.push(r)}return t}_rebuild(){let e=this._vertexBuffers[t.VertexBuffer.PositionKind];e&&(e._rebuild(),this._buildIndexBuffer())}_prepareFrame(e=null,t=null){let s=this._scene.activeCamera;return!!s&&!!(t=t||this._getActivePostProcesses(s._postProcesses))&&0!==t.length&&!!this._scene.postProcessesEnabled&&(t[0].activate(s,e,null!=t),!0)}directRender(e,t=null,s=!1,r=0,i=0,n=!1,a=e.length){let h=this._scene.getEngine();for(let o=0;o<a;o++){o<e.length-1?e[o+1].activate(this._scene.activeCamera||this._scene,t?.texture):(t?h.bindFramebuffer(t,r,void 0,void 0,s,i):n||h.restoreDefaultFramebuffer(),h._debugInsertMarker?.(`post process ${e[o].name} output`));let a=e[o],l=a.apply();l&&(a.onBeforeRenderObservable.notifyObservers(l),this._prepareBuffers(),h.bindBuffers(this._vertexBuffers,this._indexBuffer,l),h.drawElementsType(0,0,6),a.onAfterRenderObservable.notifyObservers(l))}h.setDepthBuffer(!0),h.setDepthWrite(!0)}_finalizeFrame(e,t,s,r,i=!1){let n=this._scene.activeCamera;if(!n||(this.onBeforeRenderObservable.notifyObservers(this),0===(r=r||this._getActivePostProcesses(n._postProcesses)).length||!this._scene.postProcessesEnabled))return;let a=this._scene.getEngine();for(let h=0,o=r.length;h<o;h++){let l=r[h];if(h<o-1?l._outputTexture=r[h+1].activate(n,t?.texture):(t?(a.bindFramebuffer(t,s,void 0,void 0,i),l._outputTexture=t):(a.restoreDefaultFramebuffer(),l._outputTexture=null),a._debugInsertMarker?.(`post process ${r[h].name} output`)),e)break;let c=l.apply();c&&(l.onBeforeRenderObservable.notifyObservers(c),this._prepareBuffers(),a.bindBuffers(this._vertexBuffers,this._indexBuffer,c),a.drawElementsType(0,0,6),l.onAfterRenderObservable.notifyObservers(c))}a.setDepthBuffer(!0),a.setDepthWrite(!0),a.setAlphaMode(0)}dispose(){let e=this._vertexBuffers[t.VertexBuffer.PositionKind];e&&(e.dispose(),this._vertexBuffers[t.VertexBuffer.PositionKind]=null),this._indexBuffer&&(this._scene.getEngine()._releaseBuffer(this._indexBuffer),this._indexBuffer=null)}}],3524);var r=e.i(32451),i=e.i(69400);class n{set opaqueSortCompareFn(e){e?this._opaqueSortCompareFn=e:this._opaqueSortCompareFn=n.PainterSortCompare,this._renderOpaque=this._renderOpaqueSorted}set alphaTestSortCompareFn(e){e?this._alphaTestSortCompareFn=e:this._alphaTestSortCompareFn=n.PainterSortCompare,this._renderAlphaTest=this._renderAlphaTestSorted}set transparentSortCompareFn(e){e?this._transparentSortCompareFn=e:this._transparentSortCompareFn=n.defaultTransparentSortCompare,this._renderTransparent=this._renderTransparentSorted}constructor(e,t,s=null,i=null,n=null){this.index=e,this._opaqueSubMeshes=new r.SmartArray(256),this._transparentSubMeshes=new r.SmartArray(256),this._alphaTestSubMeshes=new r.SmartArray(256),this._depthOnlySubMeshes=new r.SmartArray(256),this._particleSystems=new r.SmartArray(256),this._spriteManagers=new r.SmartArray(256),this._empty=!0,this._edgesRenderers=new r.SmartArrayNoDuplicate(16),this.disableDepthPrePass=!1,this._scene=t,this.opaqueSortCompareFn=s,this.alphaTestSortCompareFn=i,this.transparentSortCompareFn=n}render(e,t,s,r,i=!0,n=!0,a=!0,h=!0,o){if(e)return void e(this._opaqueSubMeshes,this._alphaTestSubMeshes,this._transparentSubMeshes,this._depthOnlySubMeshes);let l=this._scene.getEngine();i&&0!==this._depthOnlySubMeshes.length&&(l.setColorWrite(!1),this._renderAlphaTest(this._depthOnlySubMeshes),l.setColorWrite(!0)),n&&0!==this._opaqueSubMeshes.length&&this._renderOpaque(this._opaqueSubMeshes),a&&0!==this._alphaTestSubMeshes.length&&this._renderAlphaTest(this._alphaTestSubMeshes);let c=l.getStencilBuffer();if(l.setStencilBuffer(!1),t&&this._renderSprites(),s&&this._renderParticles(r),this.onBeforeTransparentRendering&&this.onBeforeTransparentRendering(),h&&(o||0!==this._transparentSubMeshes.length||this._scene.useOrderIndependentTransparency)){if(l.setStencilBuffer(c),o)o(this._transparentSubMeshes,this);else if(this._scene.useOrderIndependentTransparency){let e=this._scene.depthPeelingRenderer.render(this._transparentSubMeshes);e.length&&this._renderTransparent(e)}else this._renderTransparent(this._transparentSubMeshes);l.setAlphaMode(0)}if(l.setStencilBuffer(!1),n&&this._edgesRenderers.length){for(let e=0;e<this._edgesRenderers.length;e++)this._edgesRenderers.data[e].render();l.setAlphaMode(0)}l.setStencilBuffer(c)}_renderOpaqueSorted(e){n._RenderSorted(e,this._opaqueSortCompareFn,this._scene.activeCamera,!1,this.disableDepthPrePass)}_renderAlphaTestSorted(e){n._RenderSorted(e,this._alphaTestSortCompareFn,this._scene.activeCamera,!1,this.disableDepthPrePass)}_renderTransparentSorted(e){n._RenderSorted(e,this._transparentSortCompareFn,this._scene.activeCamera,!0,this.disableDepthPrePass)}static _RenderSorted(e,t,s,r,a){let h,o=0,l=s?s.globalPosition:n._ZeroVector;if(r)for(;o<e.length;o++)(h=e.data[o])._alphaIndex=h.getMesh().alphaIndex,h._distanceToCamera=i.Vector3.Distance(h.getBoundingInfo().boundingSphere.centerWorld,l);let c=e.length===e.data.length?e.data:e.data.slice(0,e.length);t&&c.sort(t);let u=c[0].getMesh().getScene();for(o=0;o<c.length;o++)if(h=c[o],!u._activeMeshesFrozenButKeepClipping||h.isInFrustum(u._frustumPlanes)){if(r){let e=h.getMaterial();if(e&&e.needDepthPrePass&&!a){let t=e.getScene().getEngine();t.setColorWrite(!1),t.setAlphaMode(0),h.render(!1),t.setColorWrite(!0)}}h.render(r)}}static defaultTransparentSortCompare(e,t){return e._alphaIndex>t._alphaIndex?1:e._alphaIndex<t._alphaIndex?-1:n.backToFrontSortCompare(e,t)}static backToFrontSortCompare(e,t){return e._distanceToCamera<t._distanceToCamera?1:e._distanceToCamera>t._distanceToCamera?-1:0}static frontToBackSortCompare(e,t){return e._distanceToCamera<t._distanceToCamera?-1:+(e._distanceToCamera>t._distanceToCamera)}static PainterSortCompare(e,t){let s=e.getMesh(),r=t.getMesh();return s.material&&r.material?s.material.uniqueId-r.material.uniqueId:s.uniqueId-r.uniqueId}prepare(){this._opaqueSubMeshes.reset(),this._transparentSubMeshes.reset(),this._alphaTestSubMeshes.reset(),this._depthOnlySubMeshes.reset(),this._particleSystems.reset(),this.prepareSprites(),this._edgesRenderers.reset(),this._empty=!0}prepareSprites(){this._spriteManagers.reset()}dispose(){this._opaqueSubMeshes.dispose(),this._transparentSubMeshes.dispose(),this._alphaTestSubMeshes.dispose(),this._depthOnlySubMeshes.dispose(),this._particleSystems.dispose(),this._spriteManagers.dispose(),this._edgesRenderers.dispose()}dispatch(e,t,s){void 0===t&&(t=e.getMesh()),void 0===s&&(s=e.getMaterial()),null!=s&&(s.needAlphaBlendingForMesh(t)?this._transparentSubMeshes.push(e):s.needAlphaTestingForMesh(t)?(s.needDepthPrePass&&!this.disableDepthPrePass&&this._depthOnlySubMeshes.push(e),this._alphaTestSubMeshes.push(e)):(s.needDepthPrePass&&!this.disableDepthPrePass&&this._depthOnlySubMeshes.push(e),this._opaqueSubMeshes.push(e)),t._renderingGroup=this,t._edgesRenderer&&t.isEnabled()&&t.isVisible&&t._edgesRenderer.isEnabled&&this._edgesRenderers.pushNoDuplicate(t._edgesRenderer),this._empty=!1)}dispatchSprites(e){this._spriteManagers.push(e),this._empty=!1}dispatchParticles(e){this._particleSystems.push(e),this._empty=!1}_renderParticles(e){if(0===this._particleSystems.length)return;let t=this._scene.activeCamera;this._scene.onBeforeParticlesRenderingObservable.notifyObservers(this._scene);for(let s=0;s<this._particleSystems.length;s++){let r=this._particleSystems.data[s];if(0===(t&&t.layerMask&r.layerMask))continue;let i=r.emitter;i.position&&e&&-1===e.indexOf(i)||this._scene._activeParticles.addCount(r.render(),!1)}this._scene.onAfterParticlesRenderingObservable.notifyObservers(this._scene)}_renderSprites(){if(!this._scene.spritesEnabled||0===this._spriteManagers.length)return;let e=this._scene.activeCamera;this._scene.onBeforeSpritesRenderingObservable.notifyObservers(this._scene);for(let t=0;t<this._spriteManagers.length;t++){let s=this._spriteManagers.data[t];0!==(e&&e.layerMask&s.layerMask)&&s.render()}this._scene.onAfterSpritesRenderingObservable.notifyObservers(this._scene)}}n._ZeroVector=i.Vector3.Zero();class a{}class h{get disableDepthPrePass(){return this._disableDepthPrePass}set disableDepthPrePass(e){for(let t of(this._disableDepthPrePass=e,this._renderingGroups))t.disableDepthPrePass=e}get maintainStateBetweenFrames(){return this._maintainStateBetweenFrames}set maintainStateBetweenFrames(e){e!==this._maintainStateBetweenFrames&&(this._maintainStateBetweenFrames=e,this._maintainStateBetweenFrames||this.restoreDispachedFlags())}restoreDispachedFlags(){for(let e of this._scene.meshes)if(e.subMeshes)for(let t of e.subMeshes)t._wasDispatched=!1;if(this._scene.spriteManagers)for(let e of this._scene.spriteManagers)e._wasDispatched=!1;for(let e of this._scene.particleSystems)e._wasDispatched=!1}constructor(e){this._useSceneAutoClearSetup=!1,this._disableDepthPrePass=!1,this._renderingGroups=[],this._autoClearDepthStencil={},this._customOpaqueSortCompareFn={},this._customAlphaTestSortCompareFn={},this._customTransparentSortCompareFn={},this._renderingGroupInfo=new a,this._maintainStateBetweenFrames=!1,this._scene=e;for(let e=h.MIN_RENDERINGGROUPS;e<h.MAX_RENDERINGGROUPS;e++)this._autoClearDepthStencil[e]={autoClear:!0,depth:!0,stencil:!0}}get renderingGroups(){return this._renderingGroups}getRenderingGroup(e){let t=e||0;return this._prepareRenderingGroup(t),this._renderingGroups[t]}_clearDepthStencilBuffer(e=!0,t=!0){this._depthStencilBufferAlreadyCleaned||(this._scene.getEngine().clear(null,!1,e,t),this._depthStencilBufferAlreadyCleaned=!0)}render(e,t,s,r,i=!0,n=!0,a=!0,o=!0,l){let c=this._renderingGroupInfo;if(c.scene=this._scene,c.camera=this._scene.activeCamera,c.renderingManager=this,this._scene.spriteManagers&&r)for(let e=0;e<this._scene.spriteManagers.length;e++){let t=this._scene.spriteManagers[e];this.dispatchSprites(t)}for(let u=h.MIN_RENDERINGGROUPS;u<h.MAX_RENDERINGGROUPS;u++){this._depthStencilBufferAlreadyCleaned=u===h.MIN_RENDERINGGROUPS;let p=this._renderingGroups[u];if(!p||p._empty)continue;let d=1<<u;if(c.renderingGroupId=u,this._scene.onBeforeRenderingGroupObservable.notifyObservers(c,d),h.AUTOCLEAR){let e=this._useSceneAutoClearSetup?this._scene.getAutoClearDepthStencilSetup(u):this._autoClearDepthStencil[u];e&&e.autoClear&&this._clearDepthStencilBuffer(e.depth,e.stencil)}for(let e of this._scene._beforeRenderingGroupDrawStage)e.action(u);for(let h of(p.render(e,r,s,t,i,n,a,o,l),this._scene._afterRenderingGroupDrawStage))h.action(u);this._scene.onAfterRenderingGroupObservable.notifyObservers(c,d)}}reset(){if(!this.maintainStateBetweenFrames)for(let e=h.MIN_RENDERINGGROUPS;e<h.MAX_RENDERINGGROUPS;e++){let t=this._renderingGroups[e];t&&t.prepare()}}resetSprites(){if(!this.maintainStateBetweenFrames)for(let e=h.MIN_RENDERINGGROUPS;e<h.MAX_RENDERINGGROUPS;e++){let t=this._renderingGroups[e];t&&t.prepareSprites()}}dispose(){this.freeRenderingGroups(),this._renderingGroups.length=0,this._renderingGroupInfo=null}freeRenderingGroups(){for(let e=h.MIN_RENDERINGGROUPS;e<h.MAX_RENDERINGGROUPS;e++){let t=this._renderingGroups[e];t&&t.dispose()}}_prepareRenderingGroup(e){void 0===this._renderingGroups[e]&&(this._renderingGroups[e]=new n(e,this._scene,this._customOpaqueSortCompareFn[e],this._customAlphaTestSortCompareFn[e],this._customTransparentSortCompareFn[e]),this._renderingGroups[e].disableDepthPrePass=this._disableDepthPrePass)}dispatchSprites(e){this.maintainStateBetweenFrames&&e._wasDispatched||(e._wasDispatched=!0,this.getRenderingGroup(e.renderingGroupId).dispatchSprites(e))}dispatchParticles(e){this.maintainStateBetweenFrames&&e._wasDispatched||(e._wasDispatched=!0,this.getRenderingGroup(e.renderingGroupId).dispatchParticles(e))}dispatch(e,t,s){void 0===t&&(t=e.getMesh()),this.maintainStateBetweenFrames&&e._wasDispatched||(e._wasDispatched=!0,this.getRenderingGroup(t.renderingGroupId).dispatch(e,t,s))}setRenderingOrder(e,t=null,s=null,r=null){if(this._customOpaqueSortCompareFn[e]=t,this._customAlphaTestSortCompareFn[e]=s,this._customTransparentSortCompareFn[e]=r,this._renderingGroups[e]){let t=this._renderingGroups[e];t.opaqueSortCompareFn=this._customOpaqueSortCompareFn[e],t.alphaTestSortCompareFn=this._customAlphaTestSortCompareFn[e],t.transparentSortCompareFn=this._customTransparentSortCompareFn[e]}}setRenderingAutoClearDepthStencil(e,t,s=!0,r=!0){this._autoClearDepthStencil[e]={autoClear:t,depth:s,stencil:r}}getAutoClearDepthStencilSetup(e){return this._autoClearDepthStencil[e]}}h.MAX_RENDERINGGROUPS=4,h.MIN_RENDERINGGROUPS=0,h.AUTOCLEAR=!0,e.s(["RenderingManager",0,h],69680)},11267,e=>{"use strict";var t=e.i(87627);class s{get min(){return this._min}get max(){return this._max}get average(){return this._average}get lastSecAverage(){return this._lastSecAverage}get current(){return this._current}get total(){return this._totalAccumulated}get count(){return this._totalValueCount}constructor(){this._startMonitoringTime=0,this._min=0,this._max=0,this._hasResult=!1,this._hasCurrentValue=!1,this._average=0,this._lastSecAverage=0,this._current=0,this._totalValueCount=0,this._totalAccumulated=0,this._lastSecAccumulated=0,this._lastSecTime=0,this._lastSecValueCount=0}fetchNewFrame(){this._totalValueCount++,this._current=0,this._hasCurrentValue=s.Enabled,this._lastSecValueCount++}addCount(e,t){s.Enabled&&(this._current+=e,this._hasCurrentValue=!0,t&&this._fetchResult())}beginMonitoring(){s.Enabled&&(this._startMonitoringTime=t.PrecisionDate.Now)}endMonitoring(e=!0){if(!s.Enabled)return;e&&this.fetchNewFrame();let r=t.PrecisionDate.Now;this._current=r-this._startMonitoringTime,this._hasCurrentValue=!0,e&&this._fetchResult()}endFrame(){this._fetchResult()}_fetchResult(){if(!this._hasCurrentValue)return;this._totalAccumulated+=this._current,this._lastSecAccumulated+=this._current,this._hasResult?(this._min=Math.min(this._min,this._current),this._max=Math.max(this._max,this._current)):(this._min=this._current,this._max=this._current,this._hasResult=!0),this._average=this._totalAccumulated/this._totalValueCount;let e=t.PrecisionDate.Now;e-this._lastSecTime>1e3&&(this._lastSecAverage=this._lastSecAccumulated/this._lastSecValueCount,this._lastSecTime=e,this._lastSecAccumulated=0,this._lastSecValueCount=0)}}s.Enabled=!0,e.s(["PerfCounter",0,s])},57660,e=>{"use strict";var t=e.i(96042);class s{static GetPlanes(e){let r=[];for(let e=0;e<6;e++)r.push(new t.Plane(0,0,0,0));return s.GetPlanesToRef(e,r),r}static GetNearPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]+s[2],t.normal.y=s[7]+s[6],t.normal.z=s[11]+s[10],t.d=s[15]+s[14],t.normalize()}static GetFarPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]-s[2],t.normal.y=s[7]-s[6],t.normal.z=s[11]-s[10],t.d=s[15]-s[14],t.normalize()}static GetLeftPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]+s[0],t.normal.y=s[7]+s[4],t.normal.z=s[11]+s[8],t.d=s[15]+s[12],t.normalize()}static GetRightPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]-s[0],t.normal.y=s[7]-s[4],t.normal.z=s[11]-s[8],t.d=s[15]-s[12],t.normalize()}static GetTopPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]-s[1],t.normal.y=s[7]-s[5],t.normal.z=s[11]-s[9],t.d=s[15]-s[13],t.normalize()}static GetBottomPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]+s[1],t.normal.y=s[7]+s[5],t.normal.z=s[11]+s[9],t.d=s[15]+s[13],t.normalize()}static GetPlanesToRef(e,t){s.GetNearPlaneToRef(e,t[0]),s.GetFarPlaneToRef(e,t[1]),s.GetLeftPlaneToRef(e,t[2]),s.GetRightPlaneToRef(e,t[3]),s.GetTopPlaneToRef(e,t[4]),s.GetBottomPlaneToRef(e,t[5])}static IsPointInFrustum(e,t){for(let s=0;s<6;s++)if(0>t[s].dotCoordinate(e))return!1;return!0}}e.s(["Frustum",0,s])},92247,e=>{"use strict";var t=e.i(69400),s=e.i(41041);e.s(["PickingInfo",0,class{constructor(){this.hit=!1,this.distance=0,this.pickedPoint=null,this.pickedMesh=null,this.bu=0,this.bv=0,this.faceId=-1,this.subMeshFaceId=-1,this.subMeshId=0,this.pickedSprite=null,this.thinInstanceIndex=-1,this.ray=null,this.originMesh=null,this.aimTransform=null,this.gripTransform=null}getNormal(e=!1,r=!0){let i;if(!this.pickedMesh||r&&!this.pickedMesh.isVerticesDataPresent(s.VertexBuffer.NormalKind))return null;let n=this.pickedMesh.getIndices();n?.length===0&&(n=null);let a=t.TmpVectors.Vector3[0],h=t.TmpVectors.Vector3[1],o=t.TmpVectors.Vector3[2];if(r){let e=this.pickedMesh.getVerticesData(s.VertexBuffer.NormalKind),r=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId],a):a.copyFromFloats(e[3*this.faceId*3],e[3*this.faceId*3+1],e[3*this.faceId*3+2]),l=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId+1],h):h.copyFromFloats(e[(3*this.faceId+1)*3],e[(3*this.faceId+1)*3+1],e[(3*this.faceId+1)*3+2]),c=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId+2],o):o.copyFromFloats(e[(3*this.faceId+2)*3],e[(3*this.faceId+2)*3+1],e[(3*this.faceId+2)*3+2]);r=r.scale(this.bu),l=l.scale(this.bv),c=c.scale(1-this.bu-this.bv),i=new t.Vector3(r.x+l.x+c.x,r.y+l.y+c.y,r.z+l.z+c.z)}else{let e=this.pickedMesh.getVerticesData(s.VertexBuffer.PositionKind),r=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId],a):a.copyFromFloats(e[3*this.faceId*3],e[3*this.faceId*3+1],e[3*this.faceId*3+2]),l=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId+1],h):h.copyFromFloats(e[(3*this.faceId+1)*3],e[(3*this.faceId+1)*3+1],e[(3*this.faceId+1)*3+2]),c=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId+2],o):o.copyFromFloats(e[(3*this.faceId+2)*3],e[(3*this.faceId+2)*3+1],e[(3*this.faceId+2)*3+2]),u=r.subtract(l),p=c.subtract(l);i=t.Vector3.Cross(u,p)}let l=(e,s)=>{if(-1!==this.thinInstanceIndex){let r=e._thinInstanceDataStorage.matrixData,i=this.thinInstanceIndex<<4;if(r&&r.length>i){let e=t.TmpVectors.Matrix[0];t.Matrix.FromArrayToRef(r,i,e),t.Vector3.TransformNormalToRef(s,e,s)}}let r=e.getWorldMatrix();e.nonUniformScaling&&(t.TmpVectors.Matrix[0].copyFrom(r),(r=t.TmpVectors.Matrix[0]).setTranslationFromFloats(0,0,0),r.invert(),r.transposeToRef(t.TmpVectors.Matrix[1]),r=t.TmpVectors.Matrix[1]),t.Vector3.TransformNormalToRef(s,r,s)};if(e&&l(this.pickedMesh,i),this.ray){let s=t.TmpVectors.Vector3[0].copyFrom(i);e||l(this.pickedMesh,s),t.Vector3.Dot(s,this.ray.direction)>0&&i.negateInPlace()}return i.normalize(),i}getTextureCoordinates(e=s.VertexBuffer.UVKind){if(!this.pickedMesh||!this.pickedMesh.isVerticesDataPresent(e))return null;let r=this.pickedMesh.getIndices();if(!r)return null;let i=this.pickedMesh.getVerticesData(e);if(!i)return null;let n=t.Vector2.FromArray(i,2*r[3*this.faceId]),a=t.Vector2.FromArray(i,2*r[3*this.faceId+1]),h=t.Vector2.FromArray(i,2*r[3*this.faceId+2]);return n=n.scale(this.bu),a=a.scale(this.bv),h=h.scale(1-this.bu-this.bv),new t.Vector2(n.x+a.x+h.x,n.y+a.y+h.y)}}])},84964,e=>{"use strict";var t=e.i(69400);class s{}s.POINTERDOWN=1,s.POINTERUP=2,s.POINTERMOVE=4,s.POINTERWHEEL=8,s.POINTERPICK=16,s.POINTERTAP=32,s.POINTERDOUBLETAP=64;class r{constructor(e,t){this.type=e,this.event=t}}e.s(["PointerEventTypes",0,s,"PointerInfo",0,class extends r{get pickInfo(){return this._pickInfo||this._generatePickInfo(),this._pickInfo}constructor(e,t,s,r=null){super(e,t),this._pickInfo=s,this._inputManager=r}_generatePickInfo(){this._inputManager&&(this._pickInfo=this._inputManager._pickMove(this.event),this._inputManager._setRayOnPointerInfo(this._pickInfo,this.event),this._inputManager=null)}},"PointerInfoPre",0,class extends r{constructor(e,s,r,i){super(e,s),this.ray=null,this.originalPickingInfo=null,this.skipOnPointerObservable=!1,this.localPosition=new t.Vector2(r,i)}}])},71092,e=>{"use strict";class t{}t.KEYDOWN=1,t.KEYUP=2;class s{constructor(e,t){this.type=e,this.event=t}}e.s(["KeyboardEventTypes",0,t,"KeyboardInfo",0,s,"KeyboardInfoPre",0,class extends s{get skipOnPointerObservable(){return this.skipOnKeyboardObservable}set skipOnPointerObservable(e){this.skipOnKeyboardObservable=e}constructor(e,t){super(e,t),this.type=e,this.event=t,this.skipOnKeyboardObservable=!1}}])},4021,e=>{"use strict";var t,s;(s=t||(t={}))[s.PointerMove=0]="PointerMove",s[s.PointerDown=1]="PointerDown",s[s.PointerUp=2]="PointerUp";class r{}r.DOM_DELTA_PIXEL=0,r.DOM_DELTA_LINE=1,r.DOM_DELTA_PAGE=2,e.s(["EventConstants",0,r])},65493,e=>{"use strict";e.s(["EffectFallbacks",0,class{constructor(){this._defines={},this._currentRank=32,this._maxRank=-1,this._mesh=null}unBindMesh(){this._mesh=null}addFallback(e,t){this._defines[e]||(e<this._currentRank&&(this._currentRank=e),e>this._maxRank&&(this._maxRank=e),this._defines[e]=[]),this._defines[e].push(t)}addCPUSkinningFallback(e,t){this._mesh=t,e<this._currentRank&&(this._currentRank=e),e>this._maxRank&&(this._maxRank=e)}get hasMoreFallbacks(){return this._currentRank<=this._maxRank}reduce(e,t){if(this._mesh&&this._mesh.computeBonesUsingShaders&&this._mesh.numBoneInfluencers>0){this._mesh.computeBonesUsingShaders=!1,e=e.replace("#define NUM_BONE_INFLUENCERS "+this._mesh.numBoneInfluencers,"#define NUM_BONE_INFLUENCERS 0"),t._bonesComputationForcedToCPU=!0;let s=this._mesh.getScene();for(let e=0;e<s.meshes.length;e++){let r=s.meshes[e];if(!r.material){!this._mesh.material&&r.computeBonesUsingShaders&&r.numBoneInfluencers>0&&(r.computeBonesUsingShaders=!1);continue}if(r.computeBonesUsingShaders&&0!==r.numBoneInfluencers){if(r.material.getEffect()===t)r.computeBonesUsingShaders=!1;else if(r.subMeshes){for(let e of r.subMeshes)if(e.effect===t){r.computeBonesUsingShaders=!1;break}}}}}else{let t=this._defines[this._currentRank];if(t)for(let s=0;s<t.length;s++)e=e.replace("#define "+t[s],"");this._currentRank++}return e}}])},13099,e=>{"use strict";var t=e.i(69400),s=e.i(46533);class r extends s.Material{constructor(e,s,r=!0,i=!1){super(e,s,void 0,i),this._normalMatrix=new t.Matrix,this._storeEffectOnSubMeshes=r}getEffect(){return this._storeEffectOnSubMeshes?this._activeEffect:super.getEffect()}isReady(e,t){return!!e&&(!this._storeEffectOnSubMeshes||!e.subMeshes||0===e.subMeshes.length||this.isReadyForSubMesh(e,e.subMeshes[0],t))}_isReadyForSubMesh(e){let t=e.materialDefines;return!this.checkReadyOnEveryCall&&!!e.effect&&!!t&&t._renderId===this.getScene().getRenderId()}bindOnlyWorldMatrix(e){this._activeEffect.setMatrix("world",e)}bindOnlyNormalMatrix(e){this._activeEffect.setMatrix("normalMatrix",e)}bind(e,t){t&&this.bindForSubMesh(e,t,t.subMeshes[0])}_afterBind(e,t=null,s){super._afterBind(e,t,s),this.getScene()._cachedEffect=t,s?s._drawWrapper._forceRebindOnNextCall=!1:this._drawWrapper._forceRebindOnNextCall=!1}_mustRebind(e,t,s,r=1){return s._drawWrapper._forceRebindOnNextCall||e.isCachedMaterialInvalid(this,t,r)}dispose(e,t,s){this._activeEffect=void 0,super.dispose(e,t,s)}}e.s(["PushMaterial",0,r])},24904,e=>{"use strict";let t=new WeakMap;e.s(["BindVertexPullingUniforms",0,function(e,t){t.forEach((t,s)=>{let r=`vp_${s}_info`;e.setFloat4(r,t.offset,t.stride,t.type,+!!t.normalized)})},"PrepareVertexPullingUniforms",0,function(e){let s=e.getVertexBuffers();if(!s)return null;let r=t.get(e);if(r){let e=!1;for(let t in s)if(!r.has(t)){e=!0;break}if(!e)return r}else r=new Map,t.set(e,r);for(let e in s){let t=s[e];if(t){let s=t.byteOffset,i=t.byteStride,n=t.type,a=t.normalized;r.set(e,{offset:s,stride:i,type:n,normalized:a})}}return r}])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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)},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])},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)}]);