@uptimizr/dashboard 0.2.0 → 0.3.1

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 (355) hide show
  1. package/README.md +1 -1
  2. package/out/404.html +1 -1
  3. package/out/__next.__PAGE__.txt +4 -4
  4. package/out/__next._full.txt +11 -11
  5. package/out/__next._head.txt +4 -4
  6. package/out/__next._index.txt +4 -4
  7. package/out/__next._tree.txt +2 -2
  8. package/out/_next/static/chunks/0-29qf-q72olu.js +1 -0
  9. package/out/_next/static/chunks/0-tk5ptli--r0.js +1 -0
  10. package/out/_next/static/chunks/006nix8mv66z_.js +1 -0
  11. package/out/_next/static/chunks/01aeari2x_tlz.js +1 -0
  12. package/out/_next/static/chunks/0296l8lzd69ns.js +1 -0
  13. package/out/_next/static/chunks/02tc9r3sc7fgc.js +1 -0
  14. package/out/_next/static/chunks/{256k1jw1m--l7.js → 03st_hmor6qju.js} +1 -1
  15. package/out/_next/static/chunks/{2ue1wo4ryk87z.js → 04pk6n3z75dcy.js} +1 -1
  16. package/out/_next/static/chunks/05l3dluxivcor.js +1 -0
  17. package/out/_next/static/chunks/06ljadw2-i91-.js +1 -0
  18. package/out/_next/static/chunks/{2ycvtdd68gub7.js → 08bm3ye5govev.js} +1 -1
  19. package/out/_next/static/chunks/{32ahba5ezp467.js → 08rk1dp1wb-gm.js} +38 -38
  20. package/out/_next/static/chunks/091ll-lp6spu3.js +1 -0
  21. package/out/_next/static/chunks/09p5fltt7o3to.js +1 -0
  22. package/out/_next/static/chunks/{3mbnfpufs2-7e.js → 0_tqu60oxaj7q.js} +1 -1
  23. package/out/_next/static/chunks/{3riekaxl3uxfb.js → 0_ux41xcoea3u.js} +40 -40
  24. package/out/_next/static/chunks/0b7-mrrg7ryj2.js +1 -0
  25. package/out/_next/static/chunks/{29tfeb6amdkjb.js → 0c2k-gvwph4qs.js} +1 -1
  26. package/out/_next/static/chunks/0e7xuupmrw4-e.js +1 -0
  27. package/out/_next/static/chunks/0f_nv15a8q415.js +1 -0
  28. package/out/_next/static/chunks/0fxfsshoxnnh6.js +4 -0
  29. package/out/_next/static/chunks/0g6u34xkzrpjn.js +1 -0
  30. package/out/_next/static/chunks/0g7p8zp2kxve5.js +1 -0
  31. package/out/_next/static/chunks/0gblbgw7w7r9w.js +1 -0
  32. package/out/_next/static/chunks/0gwa154w_0wuh.js +1 -0
  33. package/out/_next/static/chunks/0h-ohf4gntwtj.js +1 -0
  34. package/out/_next/static/chunks/0h1o0cr3327tt.js +1 -0
  35. package/out/_next/static/chunks/0i9oqg-xbq-a9.js +1 -0
  36. package/out/_next/static/chunks/0ioyy42h35hnd.js +1 -0
  37. package/out/_next/static/chunks/{242xhzxxetctz.js → 0jf3n5n5yrr4o.js} +1 -1
  38. package/out/_next/static/chunks/{3idaz_s77e-j_.js → 0jxklh_ayjd4b.js} +12 -12
  39. package/out/_next/static/chunks/{07eeopuufsqp-.js → 0k79ryqehst0b.js} +11 -11
  40. package/out/_next/static/chunks/{3be6s4_kn9q-o.js → 0kcbdjbdxu_wa.js} +1 -1
  41. package/out/_next/static/chunks/0kr-bd6fuqc2s.js +1 -0
  42. package/out/_next/static/chunks/0l3wwyl93sqh9.js +1 -0
  43. package/out/_next/static/chunks/{3l1dr_qm_x5kp.js → 0m0n7kjzscx0y.js} +1 -1
  44. package/out/_next/static/chunks/0m3yjobjg36ce.js +1 -0
  45. package/out/_next/static/chunks/{1a9l89j7e6mqu.js → 0mk8tangq9equ.js} +1 -1
  46. package/out/_next/static/chunks/0mqi0xn_c010j.js +1 -0
  47. package/out/_next/static/chunks/0msckddycfy76.js +1 -0
  48. package/out/_next/static/chunks/0ngai1_zxwsk8.js +1 -0
  49. package/out/_next/static/chunks/0ngiuj5k-or6g.js +1 -0
  50. package/out/_next/static/chunks/0nx_t8iq-324h.js +1 -0
  51. package/out/_next/static/chunks/0oap0o8a8a_cl.js +1 -0
  52. package/out/_next/static/chunks/{3tm-pqpmq_ppw.js → 0ostjlqtwkhqr.js} +1 -1
  53. package/out/_next/static/chunks/{1uu-rt_8p1edp.js → 0ptp4ne7j6yg6.js} +11 -11
  54. package/out/_next/static/chunks/0rruvj1cyflrh.js +1 -0
  55. package/out/_next/static/chunks/{0o_mp98xzqfyf.js → 0tl8j9f8lt0yf.js} +1 -1
  56. package/out/_next/static/chunks/{0sqys6o2pbe1q.js → 0ufakw529sr9d.js} +38 -38
  57. package/out/_next/static/chunks/{3ne77mjdz2y7o.js → 0vddljjnmozzx.js} +1 -1
  58. package/out/_next/static/chunks/{0dm32-jq30tg8.js → 0w0sx062qmcsh.js} +1 -1
  59. package/out/_next/static/chunks/{0rys92_73hdb0.js → 0x4-zyy8pzmlq.js} +1 -1
  60. package/out/_next/static/chunks/0x6i6e6863tir.js +1 -0
  61. package/out/_next/static/chunks/{3k9d4ylc3li2t.js → 0zcdc17ie6lmh.js} +10 -10
  62. package/out/_next/static/chunks/{44nxswtahaq4w.js → 0zo4x1j8ug-kb.js} +5 -5
  63. package/out/_next/static/chunks/{0jmn7u31w95ly.js → 0zwkmsojeuekb.js} +2 -2
  64. package/out/_next/static/chunks/{3m6nmp2dca6un.js → 1--aypw9o8yng.js} +37 -37
  65. package/out/_next/static/chunks/1--kelnig7pxx.js +1 -0
  66. package/out/_next/static/chunks/1-ud6hztxiazp.js +1 -0
  67. package/out/_next/static/chunks/10v4rskkrjgd_.js +1 -0
  68. package/out/_next/static/chunks/117ys3lltfmcu.js +1 -0
  69. package/out/_next/static/chunks/14klj_i6-l-10.js +1 -0
  70. package/out/_next/static/chunks/159u-hx80yfaw.js +1 -0
  71. package/out/_next/static/chunks/{3gimb3z_mteou.js → 168r9r65o9jnc.js} +1 -1
  72. package/out/_next/static/chunks/{0w8_1yjvol1f0.js → 16d4a4iopj2if.js} +5 -5
  73. package/out/_next/static/chunks/{2z_jn9ud28fk7.js → 17d1isrw8gtnb.js} +1 -1
  74. package/out/_next/static/chunks/17dabmbnkkplu.js +1 -0
  75. package/out/_next/static/chunks/17dmbt396_tyq.js +1 -0
  76. package/out/_next/static/chunks/17ev44x54_jrd.js +1 -0
  77. package/out/_next/static/chunks/17svumd4o0qnc.js +1 -0
  78. package/out/_next/static/chunks/17v12p4sfraa0.js +1 -0
  79. package/out/_next/static/chunks/18avgwx9nlxp9.js +1 -0
  80. package/out/_next/static/chunks/{0tw4dyl-cp-hd.js → 18k-0jn63_5ie.js} +1 -1
  81. package/out/_next/static/chunks/18r387bj9iv0j.js +1 -0
  82. package/out/_next/static/chunks/18ss4ls60s31e.js +1 -0
  83. package/out/_next/static/chunks/1a7cup181rjod.js +1 -0
  84. package/out/_next/static/chunks/1ajmblsp0wj0_.js +1 -0
  85. package/out/_next/static/chunks/{1dsy2ngmfflis.js → 1b2tkk7e_2o0k.js} +2 -2
  86. package/out/_next/static/chunks/{1ltux4lwz7muf.js → 1bv97vf67p_ri.js} +33 -33
  87. package/out/_next/static/chunks/1e1zozntzsx42.js +1 -0
  88. package/out/_next/static/chunks/1ek5rtpo6rxev.js +1 -0
  89. package/out/_next/static/chunks/1evp209qbr4cr.js +5 -0
  90. package/out/_next/static/chunks/1f1vq3goue1w4.js +1 -0
  91. package/out/_next/static/chunks/{296w2ke-v5tbm.js → 1f92k-xa0pl-3.js} +1 -1
  92. package/out/_next/static/chunks/1fa265388524p.js +1 -0
  93. package/out/_next/static/chunks/{1_qzlkuxukhpq.js → 1fvlbwp6r93wo.js} +22 -22
  94. package/out/_next/static/chunks/1g3z43o3h-024.js +31 -0
  95. package/out/_next/static/chunks/1g_27texazqcj.js +1 -0
  96. package/out/_next/static/chunks/1iaxzjly2pap1.js +1 -0
  97. package/out/_next/static/chunks/{0c83pe1mpx456.js → 1j--a56ji33_x.js} +1 -1
  98. package/out/_next/static/chunks/{112hws17nz665.js → 1kl5xxohpr6-4.js} +1 -1
  99. package/out/_next/static/chunks/1kmsg9ef5djl3.js +1 -0
  100. package/out/_next/static/chunks/1kq86iv41cet4.js +1 -0
  101. package/out/_next/static/chunks/1l12hkz1g7uhf.js +1 -0
  102. package/out/_next/static/chunks/{3figbil1t4ssj.js → 1ll0ta8a2qx1p.js} +16 -16
  103. package/out/_next/static/chunks/1my2rhysaxjw4.js +3 -0
  104. package/out/_next/static/chunks/{1ynju1jqfrcv0.js → 1oara6fkfvgs3.js} +1 -1
  105. package/out/_next/static/chunks/1par9m038tiov.js +1 -0
  106. package/out/_next/static/chunks/1rcfy_gzean3n.js +1 -0
  107. package/out/_next/static/chunks/{35h5n42wxwgzk.js → 1rne-b-ktit5c.js} +2 -2
  108. package/out/_next/static/chunks/1t60cososq7b0.js +1 -0
  109. package/out/_next/static/chunks/1tdg_eolxlcdl.js +1 -0
  110. package/out/_next/static/chunks/1vkww9l6lgqag.js +1 -0
  111. package/out/_next/static/chunks/1vpcaaf-0dn7q.js +1 -0
  112. package/out/_next/static/chunks/1vuq3dos1406d.css +3 -0
  113. package/out/_next/static/chunks/1vzmzrjhlm1q5.js +1 -0
  114. package/out/_next/static/chunks/1w9xu1qa9-wmv.js +1 -0
  115. package/out/_next/static/chunks/1wyr4at61q29n.js +1 -0
  116. package/out/_next/static/chunks/{3_mu-4rdjajna.js → 1y12bjsbq18_t.js} +34 -34
  117. package/out/_next/static/chunks/1y20bv6vl4ylk.js +1 -0
  118. package/out/_next/static/chunks/{0tnlbw78tgaxp.js → 1zcrrq1fx8g2y.js} +2 -2
  119. package/out/_next/static/chunks/229mkx-mtfcgf.js +1 -0
  120. package/out/_next/static/chunks/{3yfrsm8lfi6ls.js → 22qzld31fbhbv.js} +1 -1
  121. package/out/_next/static/chunks/245h82k-g1nxr.js +1 -0
  122. package/out/_next/static/chunks/24cqjhy669845.js +1 -0
  123. package/out/_next/static/chunks/25ctnyh7njp-d.js +4 -0
  124. package/out/_next/static/chunks/2716si10ouwu-.js +1 -0
  125. package/out/_next/static/chunks/286ggpetqnwyo.js +3 -0
  126. package/out/_next/static/chunks/28f1onw3nywbz.js +1 -0
  127. package/out/_next/static/chunks/28ycc-1519hl2.js +1 -0
  128. package/out/_next/static/chunks/{17xd8hnazzr0g.js → 29v8falcmjvev.js} +34 -33
  129. package/out/_next/static/chunks/{0o6ayai0s01js.js → 2_7dp91937mqi.js} +1 -1
  130. package/out/_next/static/chunks/2ab-99frxpah-.js +1 -0
  131. package/out/_next/static/chunks/2apt1vh-7rl2l.js +1 -0
  132. package/out/_next/static/chunks/2bn9u9r0rfhvc.js +1 -0
  133. package/out/_next/static/chunks/{45bwefvdpztfs.js → 2btqzk0tj0gz6.js} +1 -1
  134. package/out/_next/static/chunks/2cvvxifoedn6j.js +1 -0
  135. package/out/_next/static/chunks/2dhv35o59yzao.js +1 -0
  136. package/out/_next/static/chunks/{17q0c2h5ui10r.js → 2dolerz81xb52.js} +1 -1
  137. package/out/_next/static/chunks/{2xwy0-qfho1iz.js → 2dqg85hsevk3c.js} +2 -2
  138. package/out/_next/static/chunks/{41wt50z9tx9cx.js → 2enlv4yy0t-9j.js} +12 -12
  139. package/out/_next/static/chunks/2ey30qeaob985.js +1 -0
  140. package/out/_next/static/chunks/2f0r-df7tb3pu.js +1 -0
  141. package/out/_next/static/chunks/2gh4z57fem0_v.js +1 -0
  142. package/out/_next/static/chunks/2gtebfttq1v0o.js +1 -0
  143. package/out/_next/static/chunks/{1ua15kzid0_8p.js → 2h051-1hu4co_.js} +9 -9
  144. package/out/_next/static/chunks/2h1uw3cluvmmo.js +1 -0
  145. package/out/_next/static/chunks/2ib62lnqqaf4p.js +1 -0
  146. package/out/_next/static/chunks/2j-sax2xfdv7l.js +1 -0
  147. package/out/_next/static/chunks/{3z84au-mitjjw.js → 2k4s5rt7-l8jr.js} +1 -1
  148. package/out/_next/static/chunks/2kje_jvmwsvwo.js +1 -0
  149. package/out/_next/static/chunks/{2cbmf9m7lqv6k.js → 2kn_dqzbyabtn.js} +1 -1
  150. package/out/_next/static/chunks/2l_oqx9idxcs8.js +1 -0
  151. package/out/_next/static/chunks/{1xpwp4m1tqugp.js → 2mleh3pbge181.js} +1 -1
  152. package/out/_next/static/chunks/{31u5lbu1vxznh.js → 2npk7tr63h7rl.js} +1 -1
  153. package/out/_next/static/chunks/2op88btas-hl8.js +1 -0
  154. package/out/_next/static/chunks/{1gs-5722l4u59.js → 2p8dbh81chhon.js} +1 -1
  155. package/out/_next/static/chunks/{2yph6f7khgqii.js → 2reukv9c7cq_9.js} +1 -1
  156. package/out/_next/static/chunks/{14ggsmqwej_tt.js → 2rjc8yn50ducj.js} +34 -34
  157. package/out/_next/static/chunks/2s0dwzg7kq36n.js +1 -0
  158. package/out/_next/static/chunks/2vaoftqgc44cg.js +1 -0
  159. package/out/_next/static/chunks/{3_gku1pwluoo0.js → 2vmybybb3dvia.js} +1 -1
  160. package/out/_next/static/chunks/2w7yf7ouyrlkb.js +1 -0
  161. package/out/_next/static/chunks/{3218lp8l0a5g_.js → 2y75diyxqlhzl.js} +1 -1
  162. package/out/_next/static/chunks/{0fh-9h9ylxskr.js → 2yr9wt421xdjr.js} +17 -17
  163. package/out/_next/static/chunks/{0otsec99kdkt7.js → 2yzui3v-besdu.js} +4 -4
  164. package/out/_next/static/chunks/{3wi9gzq2mtr_q.js → 2z9ot-w1x60fv.js} +1 -1
  165. package/out/_next/static/chunks/2zljunurdji0q.js +1 -0
  166. package/out/_next/static/chunks/{38x3c1ra5slhe.js → 3043pprgv9ors.js} +23 -23
  167. package/out/_next/static/chunks/31nbg0n1q43p2.js +1 -0
  168. package/out/_next/static/chunks/340pg0qkv5tqq.js +1 -0
  169. package/out/_next/static/chunks/{37epa8fz59vba.js → 348hdbpkkcq_2.js} +22 -21
  170. package/out/_next/static/chunks/34gp3hvr3j6um.js +1 -0
  171. package/out/_next/static/chunks/38ea9kqlbxt86.js +1 -0
  172. package/out/_next/static/chunks/38g9jpxjoxn2x.js +1 -0
  173. package/out/_next/static/chunks/390fogn9oz13i.js +1 -0
  174. package/out/_next/static/chunks/{3w9go565cjhq3.js → 39lxb7c--3_2u.js} +30 -30
  175. package/out/_next/static/chunks/{2bjlls8-qe05r.js → 3_bzxvqtk1t53.js} +12 -12
  176. package/out/_next/static/chunks/3ajhvedcs_lzb.js +1 -0
  177. package/out/_next/static/chunks/3bsvp8qhjqdu0.js +1 -0
  178. package/out/_next/static/chunks/{023axeoslq39i.js → 3d0ejsnhbzi-j.js} +1 -1
  179. package/out/_next/static/chunks/3d5yb9ybkz7hx.js +1 -0
  180. package/out/_next/static/chunks/{0echnagbkyx79.js → 3efuvh_35yhes.js} +39 -39
  181. package/out/_next/static/chunks/3fx3sriw1w3sa.js +1 -0
  182. package/out/_next/static/chunks/{2qq3uzsbiicw3.js → 3fz7tc-4j13uv.js} +21 -21
  183. package/out/_next/static/chunks/3g4e2txsrb2p2.js +1 -0
  184. package/out/_next/static/chunks/{1m_buecgcq67j.js → 3g5ae-38cepwm.js} +199 -199
  185. package/out/_next/static/chunks/3g_h_00xs9u59.js +1 -0
  186. package/out/_next/static/chunks/3gi0f1kg72xsf.js +1 -0
  187. package/out/_next/static/chunks/{38fhw7fatsyvd.js → 3he9bxsc67ivq.js} +1 -1
  188. package/out/_next/static/chunks/3hr-mlwi78nov.js +1 -0
  189. package/out/_next/static/chunks/3kr1polwvt6o_.js +1 -0
  190. package/out/_next/static/chunks/{0j__xaq_8_di1.js → 3mwoauxszd3mn.js} +1 -1
  191. package/out/_next/static/chunks/3ovd8o_usay7j.js +1 -0
  192. package/out/_next/static/chunks/3pdpaqzwhhijn.js +1 -0
  193. package/out/_next/static/chunks/3pyggl13glbdc.js +1 -0
  194. package/out/_next/static/chunks/{0927l-ygd5c8d.js → 3qw6q7d74g5wp.js} +1 -1
  195. package/out/_next/static/chunks/3rl45k759wfi1.js +1 -0
  196. package/out/_next/static/chunks/3s2d9ymcd0l4e.js +1 -0
  197. package/out/_next/static/chunks/{0flc7nppbmsl1.js → 3sbm1ak54_2ep.js} +1 -1
  198. package/out/_next/static/chunks/3sg4zff4-h3t1.js +1 -0
  199. package/out/_next/static/chunks/3urd7r018nel4.js +1 -0
  200. package/out/_next/static/chunks/3v0td-ziuai2i.js +1 -0
  201. package/out/_next/static/chunks/3vaho-xrtuchd.js +2 -0
  202. package/out/_next/static/chunks/3vxkkhs0vi_xa.js +1 -0
  203. package/out/_next/static/chunks/{1g7emwu85bifo.js → 3w1a2o8nevap8.js} +18 -18
  204. package/out/_next/static/chunks/3wqs57qehored.js +1 -0
  205. package/out/_next/static/chunks/3x6wpv_z5m6rz.js +1 -0
  206. package/out/_next/static/chunks/{1qg_etglhvp9h.js → 3y9c26fv1poq_.js} +199 -199
  207. package/out/_next/static/chunks/{0ql-s-tsmel_u.js → 404f_93w2e8ty.js} +1 -1
  208. package/out/_next/static/chunks/40acif2eh_unv.js +1 -0
  209. package/out/_next/static/chunks/{1hatz-jlztrn0.js → 4227p7752rnny.js} +1 -1
  210. package/out/_next/static/chunks/42oyfkhdvb-u3.js +1 -0
  211. package/out/_next/static/chunks/44gsjajjdhf51.js +1 -0
  212. package/out/_next/static/chunks/{turbopack-19105pdhzxp1x.js → turbopack-16ab30_1p4vhq.js} +1 -1
  213. package/out/_not-found/__next._full.txt +9 -9
  214. package/out/_not-found/__next._head.txt +4 -4
  215. package/out/_not-found/__next._index.txt +4 -4
  216. package/out/_not-found/__next._not-found.__PAGE__.txt +2 -2
  217. package/out/_not-found/__next._not-found.txt +3 -3
  218. package/out/_not-found/__next._tree.txt +2 -2
  219. package/out/_not-found.html +1 -1
  220. package/out/_not-found.txt +9 -9
  221. package/out/index.html +1 -1
  222. package/out/index.txt +11 -11
  223. package/package.json +8 -8
  224. package/out/_next/static/chunks/002cjeoit6-up.js +0 -1
  225. package/out/_next/static/chunks/02n1uiltexy3w.js +0 -1
  226. package/out/_next/static/chunks/03ab2khhe8-x5.js +0 -1
  227. package/out/_next/static/chunks/04_yytpc2paxy.js +0 -1
  228. package/out/_next/static/chunks/06qot1qvlsqaz.js +0 -1
  229. package/out/_next/static/chunks/08a5xek662n8n.js +0 -1
  230. package/out/_next/static/chunks/08wuc9--s8zn_.js +0 -1
  231. package/out/_next/static/chunks/09510356f0lad.js +0 -1
  232. package/out/_next/static/chunks/0_eu72k69lxj7.js +0 -1
  233. package/out/_next/static/chunks/0beajlqy8p8b5.js +0 -1
  234. package/out/_next/static/chunks/0dn0yx0rn6mpf.js +0 -1
  235. package/out/_next/static/chunks/0eh1ml86u8dh7.js +0 -1
  236. package/out/_next/static/chunks/0fzmc1up21g1i.js +0 -1
  237. package/out/_next/static/chunks/0grlb9lo8e502.js +0 -1
  238. package/out/_next/static/chunks/0h22pg-0xrxnm.js +0 -1
  239. package/out/_next/static/chunks/0j6p1pmc14t96.js +0 -1
  240. package/out/_next/static/chunks/0j_6dx-sttgsy.js +0 -1
  241. package/out/_next/static/chunks/0kfd-cvj5fvtz.js +0 -1
  242. package/out/_next/static/chunks/0r47gs_e93cka.js +0 -1
  243. package/out/_next/static/chunks/0titqrn1qmcsv.js +0 -1
  244. package/out/_next/static/chunks/0tl_moiyi2txt.js +0 -1
  245. package/out/_next/static/chunks/0v82oqyoy9zol.js +0 -1
  246. package/out/_next/static/chunks/0vbce-8omgurc.js +0 -1
  247. package/out/_next/static/chunks/0vfsg5byzep_0.js +0 -1
  248. package/out/_next/static/chunks/0xh144a5fz58h.js +0 -1
  249. package/out/_next/static/chunks/0xjltg_pph0c8.js +0 -1
  250. package/out/_next/static/chunks/0yeqgh0dnas8d.js +0 -1
  251. package/out/_next/static/chunks/101-7e_7up7rk.js +0 -1
  252. package/out/_next/static/chunks/128e51hj_04r0.js +0 -1
  253. package/out/_next/static/chunks/12kv810lohbsx.js +0 -5
  254. package/out/_next/static/chunks/137xbvd4nd41j.js +0 -3
  255. package/out/_next/static/chunks/14bws-suyy5zu.js +0 -1
  256. package/out/_next/static/chunks/15s7425ffrec9.js +0 -3
  257. package/out/_next/static/chunks/17genz6pkmty_.js +0 -1
  258. package/out/_next/static/chunks/18dczy9ylt2s_.js +0 -1
  259. package/out/_next/static/chunks/18xs_kvsaolb0.js +0 -1
  260. package/out/_next/static/chunks/19016f8-ry0z6.js +0 -1
  261. package/out/_next/static/chunks/1_6oejyxj39li.js +0 -1
  262. package/out/_next/static/chunks/1_aon8nz9p1fr.js +0 -1
  263. package/out/_next/static/chunks/1akaj5rhgitn3.js +0 -1
  264. package/out/_next/static/chunks/1bvl1ws7b_3gn.js +0 -1
  265. package/out/_next/static/chunks/1cdbk6kxyr1c9.js +0 -1
  266. package/out/_next/static/chunks/1fbjkk55uu4_g.js +0 -1
  267. package/out/_next/static/chunks/1furcfsgrw_3g.js +0 -1
  268. package/out/_next/static/chunks/1g0-f1g3gn_rs.js +0 -1
  269. package/out/_next/static/chunks/1gt4kh0_xmigy.js +0 -1
  270. package/out/_next/static/chunks/1h8xzuuhhglu9.js +0 -1
  271. package/out/_next/static/chunks/1iioifo7i0t0_.js +0 -1
  272. package/out/_next/static/chunks/1iiz7jqgj20z0.js +0 -1
  273. package/out/_next/static/chunks/1kujmd5n0j9nk.js +0 -1
  274. package/out/_next/static/chunks/1n9sy0yt5d2vq.js +0 -1
  275. package/out/_next/static/chunks/1nj82er7msdto.js +0 -2
  276. package/out/_next/static/chunks/1p1gz6dseck--.js +0 -1
  277. package/out/_next/static/chunks/1p1xtsfwvpuqo.js +0 -1
  278. package/out/_next/static/chunks/1p8f6okk2ewbz.js +0 -1
  279. package/out/_next/static/chunks/1pdep2_c530sg.js +0 -1
  280. package/out/_next/static/chunks/1th_t5ujeqlkf.js +0 -1
  281. package/out/_next/static/chunks/1thr-mdzbu96v.js +0 -1
  282. package/out/_next/static/chunks/1tta1a064979p.js +0 -1
  283. package/out/_next/static/chunks/1u_riwm0nfww7.js +0 -1
  284. package/out/_next/static/chunks/1uu93wuxigx4k.js +0 -1
  285. package/out/_next/static/chunks/1zfojlgb15okk.js +0 -1
  286. package/out/_next/static/chunks/1zj8x5wbgnzz-.js +0 -1
  287. package/out/_next/static/chunks/1zl6t15gh34nn.js +0 -1
  288. package/out/_next/static/chunks/223vrr_4sfhsj.js +0 -1
  289. package/out/_next/static/chunks/22cr2b04btguf.js +0 -1
  290. package/out/_next/static/chunks/24essz5mmvx-6.js +0 -1
  291. package/out/_next/static/chunks/259obyrpxcv6r.js +0 -1
  292. package/out/_next/static/chunks/26v9yqicofqba.js +0 -1
  293. package/out/_next/static/chunks/2712627rfsmwn.js +0 -1
  294. package/out/_next/static/chunks/290d93hmm_e8b.js +0 -1
  295. package/out/_next/static/chunks/2_2fk7iddrs43.js +0 -1
  296. package/out/_next/static/chunks/2ckd7f1wbfod-.js +0 -1
  297. package/out/_next/static/chunks/2d6hru4qo23tt.js +0 -1
  298. package/out/_next/static/chunks/2ejvntxtvf5o9.js +0 -1
  299. package/out/_next/static/chunks/2f7_3tzf7xhps.js +0 -1
  300. package/out/_next/static/chunks/2gxd_o1g89_bv.js +0 -1
  301. package/out/_next/static/chunks/2hd2txb4-m9k1.js +0 -1
  302. package/out/_next/static/chunks/2hpxou_cnp4f_.js +0 -1
  303. package/out/_next/static/chunks/2izioctrfc0s5.js +0 -1
  304. package/out/_next/static/chunks/2jhnk4h4n0udv.js +0 -1
  305. package/out/_next/static/chunks/2jpkhkk9zi8-f.js +0 -1
  306. package/out/_next/static/chunks/2kpet_l1kq2sx.js +0 -1
  307. package/out/_next/static/chunks/2mdbvf1b5h00_.css +0 -3
  308. package/out/_next/static/chunks/2nck5w4c7leb7.js +0 -1
  309. package/out/_next/static/chunks/2our10fwtj87e.js +0 -1
  310. package/out/_next/static/chunks/2qqqpu0ahfdda.js +0 -1
  311. package/out/_next/static/chunks/2u-f7mmxvk8wj.js +0 -1
  312. package/out/_next/static/chunks/2uk-vwlxe9-xr.js +0 -1
  313. package/out/_next/static/chunks/2ur5-lxdvv1jm.js +0 -1
  314. package/out/_next/static/chunks/2veqsohwfhfqc.js +0 -1
  315. package/out/_next/static/chunks/2vqlv9wnewhu9.js +0 -1
  316. package/out/_next/static/chunks/2wzshintp5lf8.js +0 -1
  317. package/out/_next/static/chunks/2x-00glogc485.js +0 -1
  318. package/out/_next/static/chunks/2yfxy0f5fqs4o.js +0 -1
  319. package/out/_next/static/chunks/2z88mt3ixktu3.js +0 -1
  320. package/out/_next/static/chunks/3-eswqjobiqk1.js +0 -1
  321. package/out/_next/static/chunks/30-tbi7pys6fp.js +0 -4
  322. package/out/_next/static/chunks/30c-nsedy_ce0.js +0 -1
  323. package/out/_next/static/chunks/337hn35kts7ud.js +0 -1
  324. package/out/_next/static/chunks/33dgpebv-tf73.js +0 -1
  325. package/out/_next/static/chunks/36jkdhq6kb-cf.js +0 -1
  326. package/out/_next/static/chunks/3833xfnz0a-ub.js +0 -1
  327. package/out/_next/static/chunks/38awrh_qxn22k.js +0 -1
  328. package/out/_next/static/chunks/39idqlqlcp5b9.js +0 -1
  329. package/out/_next/static/chunks/3coacc4-g-g5c.js +0 -1
  330. package/out/_next/static/chunks/3e00fzdfkclzq.js +0 -1
  331. package/out/_next/static/chunks/3e8fmlq0k5wkg.js +0 -1
  332. package/out/_next/static/chunks/3e9tzyrt4_98z.js +0 -1
  333. package/out/_next/static/chunks/3edelqkq92pil.js +0 -1
  334. package/out/_next/static/chunks/3j-4wuhs5weba.js +0 -1
  335. package/out/_next/static/chunks/3jjfnwvybayy7.js +0 -1
  336. package/out/_next/static/chunks/3jwm5dfk_78gc.js +0 -1
  337. package/out/_next/static/chunks/3l3_0ack3gy4k.js +0 -1
  338. package/out/_next/static/chunks/3lwhs5ja7tun3.js +0 -1
  339. package/out/_next/static/chunks/3mcd08gmt038z.js +0 -1
  340. package/out/_next/static/chunks/3mt5th7b1i_u9.js +0 -1
  341. package/out/_next/static/chunks/3puhrqtujktyv.js +0 -1
  342. package/out/_next/static/chunks/3rdifucupcgkg.js +0 -1
  343. package/out/_next/static/chunks/3sdoskq_buttj.js +0 -1
  344. package/out/_next/static/chunks/3sjq_xoi4rbyg.js +0 -31
  345. package/out/_next/static/chunks/3tg-ma9tv9xu4.js +0 -1
  346. package/out/_next/static/chunks/3xagd_2_9zft2.js +0 -1
  347. package/out/_next/static/chunks/3xsq_anpad-fb.js +0 -1
  348. package/out/_next/static/chunks/3ycv2qq7vpbua.js +0 -1
  349. package/out/_next/static/chunks/4030dhur2h70-.js +0 -1
  350. package/out/_next/static/chunks/40ffffml4h_3r.js +0 -4
  351. package/out/_next/static/chunks/431slrqh0wa0g.js +0 -1
  352. package/out/_next/static/chunks/43s_lbd1i2krj.js +0 -1
  353. /package/out/_next/static/{M9ZSIaKJeBgkjz1qktYio → -UlF345C3V4TG3ZtvR-5_}/_buildManifest.js +0 -0
  354. /package/out/_next/static/{M9ZSIaKJeBgkjz1qktYio → -UlF345C3V4TG3ZtvR-5_}/_clientMiddlewareManifest.js +0 -0
  355. /package/out/_next/static/{M9ZSIaKJeBgkjz1qktYio → -UlF345C3V4TG3ZtvR-5_}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94755,e=>{"use strict";var t,s,i=e.i(42561),a=e.i(82350),r=e.i(57554);(t=s||(s={}))[t.INIT=0]="INIT",t[t.STARTED=1]="STARTED",t[t.ENDED=2]="ENDED";class n{constructor(e){this.onEachCountObservable=new r.Observable,this.onTimerAbortedObservable=new r.Observable,this.onTimerEndedObservable=new r.Observable,this.onStateChangedObservable=new r.Observable,this._observer=null,this._breakOnNextTick=!1,this._tick=e=>{let t=Date.now();this._timer=t-this._startTime;let s={startTime:this._startTime,currentTime:t,deltaTime:this._timer,completeRate:this._timer/this._timeToEnd,payload:e},i=this._breakOnNextTick||this._breakCondition(s);i||this._timer>=this._timeToEnd?this._stop(s,i):this.onEachCountObservable.notifyObservers(s)},this._setState(0),this._contextObservable=e.contextObservable,this._observableParameters=e.observableParameters??{},this._breakCondition=e.breakCondition??(()=>!1),this._timeToEnd=e.timeout,e.onEnded&&this.onTimerEndedObservable.add(e.onEnded),e.onTick&&this.onEachCountObservable.add(e.onTick),e.onAborted&&this.onTimerAbortedObservable.add(e.onAborted)}set breakCondition(e){this._breakCondition=e}clearObservables(){this.onEachCountObservable.clear(),this.onTimerAbortedObservable.clear(),this.onTimerEndedObservable.clear(),this.onStateChangedObservable.clear()}start(e=this._timeToEnd){if(1===this._state)throw Error("Timer already started. Please stop it before starting again");this._timeToEnd=e,this._startTime=Date.now(),this._timer=0,this._observer=this._contextObservable.add(this._tick,this._observableParameters.mask,this._observableParameters.insertFirst,this._observableParameters.scope),this._setState(1)}stop(){1===this._state&&(this._breakOnNextTick=!0)}dispose(){this._observer&&this._contextObservable.remove(this._observer),this.clearObservables()}_setState(e){this._state=e,this.onStateChangedObservable.notifyObservers(this._state)}_stop(e,t=!1){this._contextObservable.remove(this._observer),this._setState(2),t?this.onTimerAbortedObservable.notifyObservers(e):this.onTimerEndedObservable.notifyObservers(e)}}var l=e.i(83464),o=e.i(14831),b=e.i(48477);class h extends i.FlowGraphAsyncExecutionBlock{constructor(e){super(e),this.cancel=this._registerSignalInput("cancel"),this.duration=this.registerDataInput("duration",a.RichTypeNumber),this.lastDelayIndex=this.registerDataOutput("lastDelayIndex",a.RichTypeFlowGraphInteger,new o.FlowGraphInteger(-1))}_preparePendingTasks(e){let t=this.duration.getValue(e);if(t<0||isNaN(t)||!isFinite(t))return this._reportError(e,"Invalid duration in SetDelay block");if(e._getGlobalContextVariable("activeDelays",0)>=h.MaxParallelDelayCount)return this._reportError(e,"Max parallel delays reached");let s=e._getGlobalContextVariable("lastDelayIndex",-1),i=e._getExecutionVariable(this,"pendingDelays",[]),a=new n({timeout:1e3*t,contextObservable:e.configuration.scene.onBeforeRenderObservable,onEnded:()=>this._onEnded(a,e)});a.start();let r=s+1;this.lastDelayIndex.setValue(new o.FlowGraphInteger(r),e),e._setGlobalContextVariable("lastDelayIndex",r),i[r]=a,e._setExecutionVariable(this,"pendingDelays",i),this._updateGlobalTimers(e)}_cancelPendingTasks(e){for(let t of e._getExecutionVariable(this,"pendingDelays",[]))t?.dispose();e._deleteExecutionVariable(this,"pendingDelays"),this.lastDelayIndex.setValue(new o.FlowGraphInteger(-1),e),this._updateGlobalTimers(e)}_execute(e,t){t===this.cancel?this._cancelPendingTasks(e):(this._preparePendingTasks(e),this.out._activateSignal(e))}getClassName(){return"FlowGraphSetDelayBlock"}_onEnded(e,t){let s=t._getExecutionVariable(this,"pendingDelays",[]),i=s.indexOf(e);-1!==i?s.splice(i,1):l.Logger.Warn("FlowGraphTimerBlock: Timer ended but was not found in the running timers list"),t._removePendingBlock(this),this.done._activateSignal(t),this._updateGlobalTimers(t)}_updateGlobalTimers(e){let t=e._getExecutionVariable(this,"pendingDelays",[]),s=e._getGlobalContextVariable("pendingDelays",[]);for(let e=0;e<t.length;e++){if(!t[e])continue;let i=t[e];s[e]&&s[e]!==i?l.Logger.Warn("FlowGraphTimerBlock: Timer ended but was not found in the running timers list"):s[e]=i}e._setGlobalContextVariable("pendingDelays",s)}}h.MaxParallelDelayCount=100;let d=!1;function c(){d||(d=!0,(0,b.RegisterClass)("FlowGraphSetDelayBlock",h))}e.s(["FlowGraphSetDelayBlock",0,h,"RegisterFlowGraphSetDelayBlock",0,c],74320),c(),e.s([],89394),e.i(89394),e.i(74320),e.s(["FlowGraphSetDelayBlock",0,h],94755)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94080,e=>{"use strict";var t,r,i,n,s,a,l,u,h,o,_,c=e.i(71379);let E=!1;E=!0,c.ThinEngine.prototype.setAlphaMode=function(e,t=!1,r=0){if(this._alphaMode[r]===e){if(!t){let t=0===e;this.depthCullingState.depthMask!==t&&(this.depthCullingState.depthMask=t)}return}let i=0===e;this._alphaState.setAlphaBlend(!i,r),this._alphaState.setAlphaMode(e,r),t||(this.depthCullingState.depthMask=i),this._alphaMode[r]=e};var T=e.i(84201),f=e.i(13379),p=e.i(68179);let d=!1;function g(e,t,r,i){let n,s=1;1===i?n=new Float32Array(t*r*4):2===i?(n=new Uint16Array(t*r*4),s=15360):n=7===i?new Uint32Array(t*r*4):new Uint8Array(t*r*4);for(let i=0;i<t;i++)for(let a=0;a<r;a++){let r=(a*t+i)*3,l=(a*t+i)*4;n[l+0]=e[r+0],n[l+1]=e[r+1],n[l+2]=e[r+2],n[l+3]=s}return n}function R(e){return function(t,r,i,n,s,a,l,u,h=null,o=0){let _=e?this._gl.TEXTURE_3D:this._gl.TEXTURE_2D_ARRAY,c=new T.InternalTexture(this,e?10:11);c.baseWidth=r,c.baseHeight=i,c.baseDepth=n,c.width=r,c.height=i,c.depth=n,c.format=s,c.type=o,c.generateMipMaps=a,c.samplingMode=u,e?c.is3D=!0:c.is2DArray=!0,this._doNotHandleContextLost||(c._bufferView=t),e?this.updateRawTexture3D(c,t,s,l,h,o):this.updateRawTexture2DArray(c,t,s,l,h,o),this._bindTextureDirectly(_,c,!0);let E=this._getSamplingParameters(u,a);return this._gl.texParameteri(_,this._gl.TEXTURE_MAG_FILTER,E.mag),this._gl.texParameteri(_,this._gl.TEXTURE_MIN_FILTER,E.min),a&&this._gl.generateMipmap(_),this._bindTextureDirectly(_,null),this._internalTexturesCache.push(c),c}}function m(e){return function(t,r,i,n,s=null,a=0){let l=e?this._gl.TEXTURE_3D:this._gl.TEXTURE_2D_ARRAY,u=this._getWebGLTextureType(a),h=this._getInternalFormat(i),o=this._getRGBABufferInternalSizedFormat(a,i);this._bindTextureDirectly(l,t,!0),this._unpackFlipY(void 0===n||!!n),this._doNotHandleContextLost||(t._bufferView=r,t.format=i,t.invertY=n,t._compression=s),t.width%4!=0&&this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT,1),s&&r?this._gl.compressedTexImage3D(l,0,this.getCaps().s3tc[s],t.width,t.height,t.depth,0,r):this._gl.texImage3D(l,0,o,t.width,t.height,t.depth,0,h,u,r),t.generateMipMaps&&this._gl.generateMipmap(l),this._bindTextureDirectly(l,null),t.isReady=!0}}d=!0,c.ThinEngine.prototype.updateRawTexture=function(e,t,r,i,n=null,s=0,a=!1){if(!e)return;let l=this._getRGBABufferInternalSizedFormat(s,r,a),u=this._getInternalFormat(r),h=this._getWebGLTextureType(s);this._bindTextureDirectly(this._gl.TEXTURE_2D,e,!0),this._unpackFlipY(void 0===i||!!i),this._doNotHandleContextLost||(e._bufferView=t,e.format=r,e.type=s,e.invertY=i,e._compression=n),e.width%4!=0&&this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT,1),n&&t?this._gl.compressedTexImage2D(this._gl.TEXTURE_2D,0,this.getCaps().s3tc[n],e.width,e.height,0,t):this._gl.texImage2D(this._gl.TEXTURE_2D,0,l,e.width,e.height,0,u,h,t),e.generateMipMaps&&this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(this._gl.TEXTURE_2D,null),e.isReady=!0},c.ThinEngine.prototype.createRawTexture=function(e,t,r,i,n,s,a,l=null,u=0,h=0,o=!1){let _=new T.InternalTexture(this,3);_.baseWidth=t,_.baseHeight=r,_.width=t,_.height=r,_.format=i,_.generateMipMaps=n,_.samplingMode=a,_.invertY=s,_._compression=l,_.type=u,_._useSRGBBuffer=this._getUseSRGBBuffer(o,!n),this._doNotHandleContextLost||(_._bufferView=e),this.updateRawTexture(_,e,i,s,l,u,_._useSRGBBuffer),this._bindTextureDirectly(this._gl.TEXTURE_2D,_,!0);let c=this._getSamplingParameters(a,n);return this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MAG_FILTER,c.mag),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MIN_FILTER,c.min),n&&this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._internalTexturesCache.push(_),_},c.ThinEngine.prototype.createRawCubeTexture=function(e,t,r,i,n,s,a,l=null){let u=this._gl,h=new T.InternalTexture(this,8);h.isCube=!0,h.format=r,h.type=i,this._doNotHandleContextLost||(h._bufferViewArray=e);let o=this._getWebGLTextureType(i),_=this._getInternalFormat(r);if(_===u.RGB&&(_=u.RGBA),o!==u.FLOAT||this._caps.textureFloatLinearFiltering?o!==this._gl.HALF_FLOAT_OES||this._caps.textureHalfFloatLinearFiltering?o!==u.FLOAT||this._caps.textureFloatRender?o!==u.HALF_FLOAT||this._caps.colorBufferFloat||(n=!1,f.Logger.Warn("Render to half float textures is not supported. Mipmap generation forced to false.")):(n=!1,f.Logger.Warn("Render to float textures is not supported. Mipmap generation forced to false.")):(n=!1,a=1,f.Logger.Warn("Half float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.")):(n=!1,a=1,f.Logger.Warn("Float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.")),h.width=t,h.height=t,h.invertY=s,h._compression=l,!this.needPOTTextures||(0,p.IsExponentOfTwo)(h.width)&&(0,p.IsExponentOfTwo)(h.height)||(n=!1),e)this.updateRawCubeTexture(h,e,r,i,s,l);else{let e=this._getRGBABufferInternalSizedFormat(i);this._bindTextureDirectly(u.TEXTURE_CUBE_MAP,h,!0);for(let t=0;t<6;t++)l?u.compressedTexImage2D(u.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,this.getCaps().s3tc[l],h.width,h.height,0,void 0):u.texImage2D(u.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,e,h.width,h.height,0,_,o,null);this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null)}this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,h,!0),e&&n&&this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP);let c=this._getSamplingParameters(a,n);return u.texParameteri(u.TEXTURE_CUBE_MAP,u.TEXTURE_MAG_FILTER,c.mag),u.texParameteri(u.TEXTURE_CUBE_MAP,u.TEXTURE_MIN_FILTER,c.min),u.texParameteri(u.TEXTURE_CUBE_MAP,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(u.TEXTURE_CUBE_MAP,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE),this._bindTextureDirectly(u.TEXTURE_CUBE_MAP,null),h.generateMipMaps=n,h.samplingMode=a,h.isReady=!0,h},c.ThinEngine.prototype.updateRawCubeTexture=function(e,t,r,i,n,s=null,a=0){e._bufferViewArray=t,e.format=r,e.type=i,e.invertY=n,e._compression=s;let l=this._gl,u=this._getWebGLTextureType(i),h=this._getInternalFormat(r),o=this._getRGBABufferInternalSizedFormat(i),_=!1;h===l.RGB&&(h=l.RGBA,_=!0),this._bindTextureDirectly(l.TEXTURE_CUBE_MAP,e,!0),this._unpackFlipY(void 0===n||!!n),e.width%4!=0&&l.pixelStorei(l.UNPACK_ALIGNMENT,1);for(let r=0;r<6;r++){let n=t[r];s?l.compressedTexImage2D(l.TEXTURE_CUBE_MAP_POSITIVE_X+r,a,this.getCaps().s3tc[s],e.width,e.height,0,n):(_&&(n=g(n,e.width,e.height,i)),l.texImage2D(l.TEXTURE_CUBE_MAP_POSITIVE_X+r,a,o,e.width,e.height,0,h,u,n))}(!this.needPOTTextures||(0,p.IsExponentOfTwo)(e.width)&&(0,p.IsExponentOfTwo)(e.height))&&e.generateMipMaps&&0===a&&this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),e.isReady=!0},c.ThinEngine.prototype.createRawCubeTextureFromUrl=function(e,t,r,i,n,s,a,l,u=null,h=null,o=3,_=!1){let c=this._gl,E=this.createRawCubeTexture(null,r,i,n,!s,_,o,null);t?.addPendingData(E),E.url=e,E.isReady=!1,this._internalTexturesCache.push(E);let T=(e,r)=>{t?.removePendingData(E),h&&h(e?e.status+" "+e.statusText:"Failed to parse texture data",r)},f=async e=>{if(!E._hardwareTexture)return;let r=a(e);if(!r)return;let s=r instanceof Promise?await r:r,h=E.width;if(l){let e=this._getWebGLTextureType(n),t=this._getInternalFormat(i),r=this._getRGBABufferInternalSizedFormat(n),a=!1;t===c.RGB&&(t=c.RGBA,a=!0),this._bindTextureDirectly(c.TEXTURE_CUBE_MAP,E,!0),this._unpackFlipY(!1);let u=l(s);for(let i=0;i<u.length;i++){let s=h>>i;for(let l=0;l<6;l++){let h=u[i][l];a&&(h=g(h,s,s,n)),c.texImage2D(l,i,r,s,s,0,t,e,h)}}this._bindTextureDirectly(c.TEXTURE_CUBE_MAP,null)}else this.updateRawCubeTexture(E,s,i,n,_);E.isReady=!0,t?.removePendingData(E),E.onLoadedObservable.notifyObservers(E),E.onLoadedObservable.clear(),u&&u()};return this._loadFile(e,e=>{f(e).catch(e=>{T(void 0,e)})},void 0,t?.offlineProvider,!0,T),E},c.ThinEngine.prototype.createRawTexture2DArray=R(!1),c.ThinEngine.prototype.createRawTexture3D=R(!0),c.ThinEngine.prototype.updateRawTexture2DArray=m(!1),c.ThinEngine.prototype.updateRawTexture3D=m(!0);var A=e.i(75017);let b=!1;b=!0,c.ThinEngine.prototype._readTexturePixelsSync=function(e,t,r,i=-1,n=0,s=null,a=!0,l=!1,u=0,h=0){let o=this._gl;if(!o)throw Error("Engine does not have gl rendering context.");if(!this._dummyFramebuffer){let e=o.createFramebuffer();if(!e)throw Error("Unable to create dummy framebuffer");this._dummyFramebuffer=e}o.bindFramebuffer(o.FRAMEBUFFER,this._dummyFramebuffer),i>-1&&(e.is2DArray||e.is3D)?o.framebufferTextureLayer(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,e._hardwareTexture?.underlyingResource,n,i):i>-1?o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_CUBE_MAP_POSITIVE_X+i,e._hardwareTexture?.underlyingResource,n):o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_2D,e._hardwareTexture?.underlyingResource,n);let _=void 0!==e.type?this._getWebGLTextureType(e.type):o.UNSIGNED_BYTE;return l?s||(s=(0,A.allocateAndCopyTypedBuffer)(e.type,4*t*r)):_===o.UNSIGNED_BYTE?(s||(s=new Uint8Array(4*t*r)),_=o.UNSIGNED_BYTE):(s||(s=new Float32Array(4*t*r)),_=o.FLOAT),a&&this.flushFramebuffer(),o.readPixels(u,h,t,r,o.RGBA,_,s),o.bindFramebuffer(o.FRAMEBUFFER,this._currentFramebuffer),s},c.ThinEngine.prototype._readTexturePixels=function(e,t,r,i=-1,n=0,s=null,a=!0,l=!1,u=0,h=0){return Promise.resolve(this._readTexturePixelsSync(e,t,r,i,n,s,a,l,u,h))},(0,e.i(55069).RegisterEngineDynamicBuffer)();let S=!1;S=!0,c.ThinEngine.prototype._createDepthStencilCubeTexture=function(e,t){let r=new T.InternalTexture(this,12);if(r.isCube=!0,1===this.webGLVersion)return f.Logger.Error("Depth cube texture is not supported by WebGL 1."),r;let i={bilinearFiltering:!1,comparisonFunction:0,generateStencil:!1,...t},n=this._gl;this._bindTextureDirectly(n.TEXTURE_CUBE_MAP,r,!0),this._setupDepthStencilTexture(r,e,i.bilinearFiltering,i.comparisonFunction);for(let t=0;t<6;t++)i.generateStencil?n.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,n.DEPTH24_STENCIL8,e,e,0,n.DEPTH_STENCIL,n.UNSIGNED_INT_24_8,null):n.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,n.DEPTH_COMPONENT24,e,e,0,n.DEPTH_COMPONENT,n.UNSIGNED_INT,null);return this._bindTextureDirectly(n.TEXTURE_CUBE_MAP,null),this._internalTexturesCache.push(r),r},c.ThinEngine.prototype._setCubeMapTextureParams=function(e,t,r){let i=this._gl;i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_MIN_FILTER,t?i.LINEAR_MIPMAP_LINEAR:i.LINEAR),i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),e.samplingMode=t?3:2,t&&this.getCaps().textureMaxLevel&&void 0!==r&&r>0&&(i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_MAX_LEVEL,r),e._maxLodLevel=r),this._bindTextureDirectly(i.TEXTURE_CUBE_MAP,null)},c.ThinEngine.prototype.createCubeTexture=function(e,t,r,i,n=null,s=null,a,l=null,u=!1,h=0,o=0,_=null,c,E=!1,T=null){let d=this._gl;return this.createCubeTextureBase(e,t,r,!!i,n,s,a,l,u,h,o,_,e=>this._bindTextureDirectly(d.TEXTURE_CUBE_MAP,e,!0),(e,t)=>{let r=this.needPOTTextures?(0,p.GetExponentOfTwo)(t[0].width,this._caps.maxCubemapTextureSize):t[0].width,s=[d.TEXTURE_CUBE_MAP_POSITIVE_X,d.TEXTURE_CUBE_MAP_POSITIVE_Y,d.TEXTURE_CUBE_MAP_POSITIVE_Z,d.TEXTURE_CUBE_MAP_NEGATIVE_X,d.TEXTURE_CUBE_MAP_NEGATIVE_Y,d.TEXTURE_CUBE_MAP_NEGATIVE_Z];this._bindTextureDirectly(d.TEXTURE_CUBE_MAP,e,!0),this._unpackFlipY(!1);let l=a?this._getInternalFormat(a,e._useSRGBBuffer):e._useSRGBBuffer?this._glSRGBExtensionValues.SRGB8_ALPHA8:d.RGBA,u=a?this._getInternalFormat(a):d.RGBA;e._useSRGBBuffer&&1===this.webGLVersion&&(u=l);for(let e=0;e<s.length;e++)if(t[e].width!==r||t[e].height!==r){if(this._prepareWorkingCanvas(),!this._workingCanvas||!this._workingContext)return void f.Logger.Warn("Cannot create canvas to resize texture.");this._workingCanvas.width=r,this._workingCanvas.height=r,this._workingContext.drawImage(t[e],0,0,t[e].width,t[e].height,0,0,r,r),d.texImage2D(s[e],0,l,u,d.UNSIGNED_BYTE,this._workingCanvas)}else d.texImage2D(s[e],0,l,u,d.UNSIGNED_BYTE,t[e]);i||d.generateMipmap(d.TEXTURE_CUBE_MAP),this._setCubeMapTextureParams(e,!i),e.width=r,e.height=r,e.isReady=!0,a&&(e.format=a),e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear(),n&&n()},!!E,T)},c.ThinEngine.prototype.generateMipMapsForCubemap=function(e,t=!0){if(e.generateMipMaps){let r=this._gl;this._bindTextureDirectly(r.TEXTURE_CUBE_MAP,e,!0),r.generateMipmap(r.TEXTURE_CUBE_MAP),t&&this._bindTextureDirectly(r.TEXTURE_CUBE_MAP,null)}};var F=e.i(79814);class x{get depthStencilTexture(){return this._depthStencilTexture}setDepthStencilTexture(e,t=!0){t&&this._depthStencilTexture&&this._depthStencilTexture.dispose(),this._depthStencilTexture=e,this._generateDepthBuffer=this._generateStencilBuffer=this._depthStencilTextureWithStencil=!1,e&&(this._generateDepthBuffer=!0,this._generateStencilBuffer=this._depthStencilTextureWithStencil=(0,F.HasStencilAspect)(e.format))}get depthStencilTextureWithStencil(){return this._depthStencilTextureWithStencil}get isCube(){return this._isCube}get isMulti(){return this._isMulti}get is2DArray(){return this.layers>0}get is3D(){return this.depth>0}get size(){return this.width}get width(){return this._size.width??this._size}get height(){return this._size.height??this._size}get layers(){return this._size.layers||0}get depth(){return this._size.depth||0}get texture(){return this._textures?.[0]??null}get textures(){return this._textures}get faceIndices(){return this._faceIndices}get layerIndices(){return this._layerIndices}getBaseArrayLayer(e){if(!this._textures)return -1;let t=this._textures[e],r=this._layerIndices?.[e]??0,i=this._faceIndices?.[e]??0;return t.isCube?6*r+i:t.is3D?0:r}get samples(){return this._samples}setSamples(e,t=!0,r=!1){if(this.samples===e&&!r)return e;let i=this._isMulti?this._engine.updateMultipleRenderTargetTextureSampleCount(this,e,t):this._engine.updateRenderTargetTextureSampleCount(this,e);return this._samples=e,i}resolveMSAATextures(){this.isMulti?this._engine.resolveMultiFramebuffer(this):this._engine.resolveFramebuffer(this)}generateMipMaps(){this._engine._currentRenderTarget===this&&(this.isMulti?this._engine.unBindMultiColorAttachmentFramebuffer(this,!0):this._engine.unBindFramebuffer(this,!0)),this.isMulti?this._engine.generateMipMapsMultiFramebuffer(this):this._engine.generateMipMapsFramebuffer(this)}constructor(e,t,r,i,n){this._textures=null,this._faceIndices=null,this._layerIndices=null,this._samples=1,this._attachments=null,this._generateStencilBuffer=!1,this._generateDepthBuffer=!1,this._depthStencilTextureWithStencil=!1,this.disableAutomaticMSAAResolve=!1,this.resolveMSAAColors=!0,this.resolveMSAADepth=!1,this.resolveMSAAStencil=!1,this.depthReadOnly=!1,this.stencilReadOnly=!1,this._isMulti=e,this._isCube=t,this._size=r,this._engine=i,this._depthStencilTexture=null,this.label=n}setTextures(e){Array.isArray(e)?this._textures=e:e?this._textures=[e]:this._textures=null}setTexture(e,t=0,r=!0){this._textures||(this._textures=[]),this._textures[t]!==e&&(this._textures[t]&&r&&this._textures[t].dispose(),this._textures[t]=e)}setLayerAndFaceIndices(e,t){this._layerIndices=e,this._faceIndices=t}setLayerAndFaceIndex(e=0,t,r){this._layerIndices||(this._layerIndices=[]),this._faceIndices||(this._faceIndices=[]),void 0!==t&&t>=0&&(this._layerIndices[e]=t),void 0!==r&&r>=0&&(this._faceIndices[e]=r)}createDepthStencilTexture(e=0,t=!0,r=!1,i=1,n=14,s){return this._depthStencilTexture?.dispose(),this._depthStencilTextureWithStencil=r,this._depthStencilTextureLabel=s,this._depthStencilTexture=this._engine.createDepthStencilTexture(this._size,{bilinearFiltering:t,comparisonFunction:e,generateStencil:r,isCube:this._isCube,samples:i,depthTextureFormat:n,label:s},this),this._depthStencilTexture}_shareDepth(e){this.shareDepth(e)}shareDepth(e){this._depthStencilTexture&&(e._depthStencilTexture&&e._depthStencilTexture.dispose(),e._depthStencilTexture=this._depthStencilTexture,e._depthStencilTextureWithStencil=this._depthStencilTextureWithStencil,this._depthStencilTexture.incrementReferences())}_swapAndDie(e){this.texture&&this.texture._swapAndDie(e),this._textures=null,this.dispose(!0)}_cloneRenderTargetWrapper(){let e=null;if(this._isMulti){let t=this.textures;if(t&&t.length>0){let r=!1,i=t.length,n=-1,s=t[t.length-1]._source;(14===s||12===s)&&(r=!0,n=t[t.length-1].format,i--);let a=[],l=[],u=[],h=[],o=[],_=[],c=[],E={};for(let e=0;e<i;++e){let r=t[e];a.push(r.samplingMode),l.push(r.type),u.push(r.format),void 0!==E[r.uniqueId]?(h.push(-1),c.push(0)):(E[r.uniqueId]=e,r.is2DArray?(h.push(35866),c.push(r.depth)):r.isCube?(h.push(34067),c.push(0)):r.is3D?(h.push(32879),c.push(r.depth)):(h.push(3553),c.push(0))),this._faceIndices&&o.push(this._faceIndices[e]??0),this._layerIndices&&_.push(this._layerIndices[e]??0)}let T={samplingModes:a,generateMipMaps:t[0].generateMipMaps,generateDepthBuffer:this._generateDepthBuffer,generateStencilBuffer:this._generateStencilBuffer,generateDepthTexture:r,depthTextureFormat:n,types:l,formats:u,textureCount:i,targetTypes:h,faceIndex:o,layerIndex:_,layerCounts:c,label:this.label},f={width:this.width,height:this.height,depth:this.depth};e=this._engine.createMultipleRenderTarget(f,T);for(let r=0;r<i;++r){if(-1!==h[r])continue;let i=E[t[r].uniqueId];e.setTexture(e.textures[i],r)}}}else{let t={};if(t.generateDepthBuffer=this._generateDepthBuffer,t.generateMipMaps=this.texture?.generateMipMaps??!1,t.generateStencilBuffer=this._generateStencilBuffer,t.samplingMode=this.texture?.samplingMode,t.type=this.texture?.type,t.format=this.texture?.format,t.noColorAttachment=!this._textures,t.label=this.label,this.isCube)e=this._engine.createRenderTargetCubeTexture(this.width,t);else{let r={width:this.width,height:this.height,layers:this.is2DArray||this.is3D?this.texture?.depth:void 0};e=this._engine.createRenderTargetTexture(r,t)}e.texture&&(e.texture.isReady=!0)}return e}_swapRenderTargetWrapper(e){if(this._textures&&e._textures)for(let t=0;t<this._textures.length;++t)this._textures[t]._swapAndDie(e._textures[t],!1),e._textures[t].isReady=!0;this._depthStencilTexture&&e._depthStencilTexture&&(this._depthStencilTexture._swapAndDie(e._depthStencilTexture),e._depthStencilTexture.isReady=!0),this._textures=null,this._depthStencilTexture=null}_rebuild(){let e=this._cloneRenderTargetWrapper();if(e){if(this._depthStencilTexture){let t=this._depthStencilTexture.samplingMode,r=this._depthStencilTexture.format;e.createDepthStencilTexture(this._depthStencilTexture._comparisonFunction,2===t||3===t||11===t,this._depthStencilTextureWithStencil,this._depthStencilTexture.samples,r,this._depthStencilTextureLabel)}this.samples>1&&e.setSamples(this.samples),e._swapRenderTargetWrapper(this),e.dispose()}}releaseTextures(){if(this._textures)for(let e=0;e<this._textures.length;++e)this._textures[e].dispose();this._textures=null}dispose(e=!1){e||(this._depthStencilTexture?.dispose(),this._depthStencilTexture=null,this.releaseTextures()),this._engine._releaseRenderTargetWrapper(this)}}class M extends x{setDepthStencilTexture(e,t=!0){if(super.setDepthStencilTexture(e,t),!e)return;let r=this._engine,i=this._context,n=e._hardwareTexture;if(n&&e._autoMSAAManagement&&this._MSAAFramebuffer){let t=r._currentFramebuffer;r._bindUnboundFramebuffer(this._MSAAFramebuffer),i.framebufferRenderbuffer(i.FRAMEBUFFER,(0,F.HasStencilAspect)(e.format)?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,i.RENDERBUFFER,n.getMSAARenderBuffer()),r._bindUnboundFramebuffer(t)}}constructor(e,t,r,i,n){super(e,t,r,i),this._framebuffer=null,this._depthStencilBuffer=null,this._MSAAFramebuffer=null,this._colorTextureArray=null,this._depthStencilTextureArray=null,this._disposeOnlyFramebuffers=!1,this._currentLOD=0,this._context=n}_cloneRenderTargetWrapper(){let e;return this._colorTextureArray&&this._depthStencilTextureArray?(e=this._engine.createMultiviewRenderTargetTexture(this.width,this.height)).texture.isReady=!0:e=super._cloneRenderTargetWrapper(),e}_swapRenderTargetWrapper(e){super._swapRenderTargetWrapper(e),e._framebuffer=this._framebuffer,e._depthStencilBuffer=this._depthStencilBuffer,e._MSAAFramebuffer=this._MSAAFramebuffer,e._colorTextureArray=this._colorTextureArray,e._depthStencilTextureArray=this._depthStencilTextureArray,this._framebuffer=this._depthStencilBuffer=this._MSAAFramebuffer=this._colorTextureArray=this._depthStencilTextureArray=null}createDepthStencilTexture(e=0,t=!0,r=!1,i=1,n=14,s){if(this._depthStencilBuffer){let e=this._engine,t=e._currentFramebuffer,r=this._context;e._bindUnboundFramebuffer(this._framebuffer),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,null),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.RENDERBUFFER,null),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.STENCIL_ATTACHMENT,r.RENDERBUFFER,null),e._bindUnboundFramebuffer(t),r.deleteRenderbuffer(this._depthStencilBuffer),this._depthStencilBuffer=null}return super.createDepthStencilTexture(e,t,r,i,n,s)}shareDepth(e){super.shareDepth(e);let t=this._context,r=this._depthStencilBuffer,i=e._MSAAFramebuffer||e._framebuffer,n=this._engine;e._depthStencilBuffer&&e._depthStencilBuffer!==r&&t.deleteRenderbuffer(e._depthStencilBuffer),e._depthStencilBuffer=r;let s=e._generateStencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT;n._bindUnboundFramebuffer(i),t.framebufferRenderbuffer(t.FRAMEBUFFER,s,t.RENDERBUFFER,r),n._bindUnboundFramebuffer(null)}_bindTextureRenderTarget(e,t=0,r,i=0){let n,s=e._hardwareTexture;if(!s)return;let a=this._framebuffer,l=this._engine,u=l._currentFramebuffer;if(l._bindUnboundFramebuffer(a),l.webGLVersion>1){let a=this._context;n=a["COLOR_ATTACHMENT"+t],e.is2DArray||e.is3D?(r=r??this.layerIndices?.[t]??0,a.framebufferTextureLayer(a.FRAMEBUFFER,n,s.underlyingResource,i,r)):e.isCube?(r=r??this.faceIndices?.[t]??0,a.framebufferTexture2D(a.FRAMEBUFFER,n,a.TEXTURE_CUBE_MAP_POSITIVE_X+r,s.underlyingResource,i)):a.framebufferTexture2D(a.FRAMEBUFFER,n,a.TEXTURE_2D,s.underlyingResource,i)}else{let e=this._context;n=e["COLOR_ATTACHMENT"+t+"_WEBGL"];let a=void 0!==r?e.TEXTURE_CUBE_MAP_POSITIVE_X+r:e.TEXTURE_2D;e.framebufferTexture2D(e.FRAMEBUFFER,n,a,s.underlyingResource,i)}if(e._autoMSAAManagement&&this._MSAAFramebuffer){let e=this._context;l._bindUnboundFramebuffer(this._MSAAFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,s.getMSAARenderBuffer())}l._bindUnboundFramebuffer(u)}setTexture(e,t=0,r=!0){super.setTexture(e,t,r),this._bindTextureRenderTarget(e,t)}setLayerAndFaceIndices(e,t){if(super.setLayerAndFaceIndices(e,t),!this.textures||!this.layerIndices||!this.faceIndices)return;let r=this._attachments?.length??this.textures.length;for(let e=0;e<r;e++){let t=this.textures[e];t&&(t.is2DArray||t.is3D?this._bindTextureRenderTarget(t,e,this.layerIndices[e]):t.isCube?this._bindTextureRenderTarget(t,e,this.faceIndices[e]):this._bindTextureRenderTarget(t,e))}}setLayerAndFaceIndex(e=0,t,r){if(super.setLayerAndFaceIndex(e,t,r),!this.textures||!this.layerIndices||!this.faceIndices)return;let i=this.textures[e];i.is2DArray||i.is3D?this._bindTextureRenderTarget(this.textures[e],e,this.layerIndices[e]):i.isCube&&this._bindTextureRenderTarget(this.textures[e],e,this.faceIndices[e])}resolveMSAATextures(){let e=this._engine,t=e._currentFramebuffer;e._bindUnboundFramebuffer(this._MSAAFramebuffer),super.resolveMSAATextures(),e._bindUnboundFramebuffer(t)}dispose(e=this._disposeOnlyFramebuffers){let t=this._context;!e&&(this._colorTextureArray&&(this._context.deleteTexture(this._colorTextureArray),this._colorTextureArray=null),this._depthStencilTextureArray&&(this._context.deleteTexture(this._depthStencilTextureArray),this._depthStencilTextureArray=null)),this._framebuffer&&(t.deleteFramebuffer(this._framebuffer),this._framebuffer=null),this._depthStencilBuffer&&(t.deleteRenderbuffer(this._depthStencilBuffer),this._depthStencilBuffer=null),this._MSAAFramebuffer&&(t.deleteFramebuffer(this._MSAAFramebuffer),this._MSAAFramebuffer=null),super.dispose(e)}}let U=!1;U=!0,c.ThinEngine.prototype._createHardwareRenderTargetWrapper=function(e,t,r){let i=new M(e,t,r,this,this._gl);return this._renderTargetWrapperCache.push(i),i},c.ThinEngine.prototype.createRenderTargetTexture=function(e,t){let r,i,n=this._createHardwareRenderTargetWrapper(!1,!1,e),s=!0,a=!1,l=!1,u=1;void 0!==t&&"object"==typeof t&&(s=t.generateDepthBuffer??!0,a=!!t.generateStencilBuffer,l=!!t.noColorAttachment,r=t.colorAttachment,u=t.samples??1,i=t.label);let h=r||(l?null:this._createInternalTexture(e,t,!0,5)),o=e.width||e,_=e.height||e,c=this._currentFramebuffer,E=this._gl,T=E.createFramebuffer();if(this._bindUnboundFramebuffer(T),n._depthStencilBuffer=this._setupFramebufferDepthAttachments(a,s,o,_),!h||h.is2DArray||h.is3D||E.framebufferTexture2D(E.FRAMEBUFFER,E.COLOR_ATTACHMENT0,E.TEXTURE_2D,h._hardwareTexture.underlyingResource,0),this._bindUnboundFramebuffer(c),n.label=i??"RenderTargetWrapper",n._framebuffer=T,n._generateDepthBuffer=s,n._generateStencilBuffer=a,n.setTextures(h),r){if(n._samples=r.samples,r.samples>1){let e=r._hardwareTexture.getMSAARenderBuffer(0);n._MSAAFramebuffer=E.createFramebuffer(),this._bindUnboundFramebuffer(n._MSAAFramebuffer),E.framebufferRenderbuffer(E.FRAMEBUFFER,E.COLOR_ATTACHMENT0,E.RENDERBUFFER,e),this._bindUnboundFramebuffer(null)}}else this.updateRenderTargetTextureSampleCount(n,u);return n},c.ThinEngine.prototype._createDepthStencilTexture=function(e,t,r){let i=this._gl,n=e.layers||0,s=e.depth||0,a=i.TEXTURE_2D;0!==n?a=i.TEXTURE_2D_ARRAY:0!==s&&(a=i.TEXTURE_3D);let l=new T.InternalTexture(this,12);if(l.label=t.label,!this._caps.depthTextureExtension)return f.Logger.Error("Depth texture is not supported by your browser or hardware."),l;let u={bilinearFiltering:!1,comparisonFunction:0,generateStencil:!1,...t};if(this._bindTextureDirectly(a,l,!0),this._setupDepthStencilTexture(l,e,0!==u.comparisonFunction&&u.bilinearFiltering,u.comparisonFunction,u.samples),void 0!==u.depthTextureFormat){if(15!==u.depthTextureFormat&&16!==u.depthTextureFormat&&17!==u.depthTextureFormat&&13!==u.depthTextureFormat&&14!==u.depthTextureFormat&&18!==u.depthTextureFormat)return f.Logger.Error(`Depth texture ${u.depthTextureFormat} format is not supported.`),l;l.format=u.depthTextureFormat}else l.format=u.generateStencil?13:16;let h=(0,F.HasStencilAspect)(l.format),o=this._getWebGLTextureTypeFromDepthTextureFormat(l.format),_=h?i.DEPTH_STENCIL:i.DEPTH_COMPONENT,c=this._getInternalFormatFromDepthTextureFormat(l.format,!0,h);return l.is2DArray?i.texImage3D(a,0,c,l.width,l.height,n,0,_,o,null):l.is3D?i.texImage3D(a,0,c,l.width,l.height,s,0,_,o,null):i.texImage2D(a,0,c,l.width,l.height,0,_,o,null),this._bindTextureDirectly(a,null),this._internalTexturesCache.push(l),r._depthStencilBuffer&&(i.deleteRenderbuffer(r._depthStencilBuffer),r._depthStencilBuffer=null),this._bindUnboundFramebuffer(r._MSAAFramebuffer??r._framebuffer),r._generateStencilBuffer=h,r._depthStencilTextureWithStencil=h,r._depthStencilBuffer=this._setupFramebufferDepthAttachments(r._generateStencilBuffer,r._generateDepthBuffer,r.width,r.height,r.samples,l.format),this._bindUnboundFramebuffer(null),l},c.ThinEngine.prototype.updateRenderTargetTextureSampleCount=function(e,t){if(this.webGLVersion<2||!e)return 1;if(e.samples===t)return t;let r=this._gl;t=Math.min(t,this.getCaps().maxMSAASamples),e._depthStencilBuffer&&(r.deleteRenderbuffer(e._depthStencilBuffer),e._depthStencilBuffer=null),e._MSAAFramebuffer&&(r.deleteFramebuffer(e._MSAAFramebuffer),e._MSAAFramebuffer=null);let i=e.texture?._hardwareTexture;if(i?.releaseMSAARenderBuffers(),e.texture&&t>1&&"function"==typeof r.renderbufferStorageMultisample){let n=r.createFramebuffer();if(!n)throw Error("Unable to create multi sampled framebuffer");e._MSAAFramebuffer=n,this._bindUnboundFramebuffer(e._MSAAFramebuffer);let s=this._createRenderBuffer(e.texture.width,e.texture.height,t,-1,this._getRGBABufferInternalSizedFormat(e.texture.type,e.texture.format,e.texture._useSRGBBuffer),r.COLOR_ATTACHMENT0,!1);if(!s)throw Error("Unable to create multi sampled framebuffer");i?.addMSAARenderBuffer(s)}this._bindUnboundFramebuffer(e._MSAAFramebuffer??e._framebuffer),e.texture&&(e.texture.samples=t),e._samples=t;let n=e._depthStencilTexture?e._depthStencilTexture.format:void 0;return e._depthStencilBuffer=this._setupFramebufferDepthAttachments(e._generateStencilBuffer,e._generateDepthBuffer,e.width,e.height,t,n),this._bindUnboundFramebuffer(null),t},c.ThinEngine.prototype._setupDepthStencilTexture=function(e,t,r,i,n=1){let s=t.width??t,a=t.height??t,l=t.layers||0,u=t.depth||0;e.baseWidth=s,e.baseHeight=a,e.width=s,e.height=a,e.is2DArray=l>0,e.depth=l||u,e.isReady=!0,e.samples=n,e.generateMipMaps=!1,e.samplingMode=r?2:1,e.type=0,e._comparisonFunction=i;let h=this._gl,o=this._getTextureTarget(e),_=this._getSamplingParameters(e.samplingMode,!1);h.texParameteri(o,h.TEXTURE_MAG_FILTER,_.mag),h.texParameteri(o,h.TEXTURE_MIN_FILTER,_.min),h.texParameteri(o,h.TEXTURE_WRAP_S,h.CLAMP_TO_EDGE),h.texParameteri(o,h.TEXTURE_WRAP_T,h.CLAMP_TO_EDGE),this.webGLVersion>1&&(0===i?(h.texParameteri(o,h.TEXTURE_COMPARE_FUNC,515),h.texParameteri(o,h.TEXTURE_COMPARE_MODE,h.NONE)):(h.texParameteri(o,h.TEXTURE_COMPARE_FUNC,i),h.texParameteri(o,h.TEXTURE_COMPARE_MODE,h.COMPARE_REF_TO_TEXTURE)))};let D=!1;D=!0,c.ThinEngine.prototype.setDepthStencilTexture=function(e,t,r,i){void 0!==e&&(t&&(this._boundUniforms[e]=t),r&&r.depthStencilTexture?this._setTexture(e,r,!1,!0,i):this._setTexture(e,null,void 0,void 0,i))};let P=!1;P=!0,c.ThinEngine.prototype.createRenderTargetCubeTexture=function(e,t){let r=this._createHardwareRenderTargetWrapper(!1,!0,e),i={generateMipMaps:!0,generateDepthBuffer:!0,generateStencilBuffer:!1,type:0,samplingMode:3,format:5,...t};i.generateStencilBuffer=i.generateDepthBuffer&&i.generateStencilBuffer,(1!==i.type||this._caps.textureFloatLinearFiltering)&&(2!==i.type||this._caps.textureHalfFloatLinearFiltering)||(i.samplingMode=1);let n=this._gl,s=new T.InternalTexture(this,5);this._bindTextureDirectly(n.TEXTURE_CUBE_MAP,s,!0);let a=this._getSamplingParameters(i.samplingMode,i.generateMipMaps);1!==i.type||this._caps.textureFloat||(i.type=0,f.Logger.Warn("Float textures are not supported. Cube render target forced to TEXTURETYPE_UNESIGNED_BYTE type")),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_MAG_FILTER,a.mag),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_MIN_FILTER,a.min),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE);for(let t=0;t<6;t++)n.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,this._getRGBABufferInternalSizedFormat(i.type,i.format),e,e,0,this._getInternalFormat(i.format),this._getWebGLTextureType(i.type),null);let l=n.createFramebuffer();return this._bindUnboundFramebuffer(l),r._depthStencilBuffer=this._setupFramebufferDepthAttachments(i.generateStencilBuffer,i.generateDepthBuffer,e,e),i.generateMipMaps&&n.generateMipmap(n.TEXTURE_CUBE_MAP),this._bindTextureDirectly(n.TEXTURE_CUBE_MAP,null),this._bindUnboundFramebuffer(null),r._framebuffer=l,r._generateDepthBuffer=i.generateDepthBuffer,r._generateStencilBuffer=i.generateStencilBuffer,s.width=e,s.height=e,s.isReady=!0,s.isCube=!0,s.samples=1,s.generateMipMaps=i.generateMipMaps,s.samplingMode=i.samplingMode,s.type=i.type,s.format=i.format,this._internalTexturesCache.push(s),r.setTextures(s),r};var y=e.i(14953),C=e.i(52153);let B=!1;B=!0,c.ThinEngine.prototype.createPrefilteredCubeTexture=function(t,r,i,n,s=null,a=null,l,u=null,h=!0){let o=async t=>{if(!t){s&&s(null);return}let a=t.texture;if(h?t.info.sphericalPolynomial&&(a._sphericalPolynomial=t.info.sphericalPolynomial):a._sphericalPolynomial=a._sphericalPolynomial??new y.SphericalPolynomial,a._source=9,this.getCaps().textureLOD){s&&s(a);return}let l=this._gl,u=t.width;if(!u)return;let{DDSTools:o}=await e.A(98673),_=[];for(let e=0;e<3;e++){let s=Math.log2(u)*i+n,h=Math.round(Math.min(Math.max(n+(s-n)*(1-e/2),0),s)),c=new T.InternalTexture(this,2);if(c.type=a.type,c.format=a.format,c.width=Math.pow(2,Math.max(Math.log2(u)-h,0)),c.height=c.width,c.isCube=!0,c._cachedWrapU=0,c._cachedWrapV=0,this._bindTextureDirectly(l.TEXTURE_CUBE_MAP,c,!0),c.samplingMode=2,l.texParameteri(l.TEXTURE_CUBE_MAP,l.TEXTURE_MAG_FILTER,l.LINEAR),l.texParameteri(l.TEXTURE_CUBE_MAP,l.TEXTURE_MIN_FILTER,l.LINEAR),l.texParameteri(l.TEXTURE_CUBE_MAP,l.TEXTURE_WRAP_S,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_CUBE_MAP,l.TEXTURE_WRAP_T,l.CLAMP_TO_EDGE),t.isDDS){let e=t.info,r=t.data;this._unpackFlipY(e.isCompressed),o.UploadDDSLevels(this,c,r,e,!0,6,h)}else f.Logger.Warn("DDS is the only prefiltered cube map supported so far.");this._bindTextureDirectly(l.TEXTURE_CUBE_MAP,null);let E=new C.BaseTexture(r);E._isCube=!0,E._texture=c,c.isReady=!0,_.push(E)}a._lodTextureHigh=_[2],a._lodTextureMid=_[1],a._lodTextureLow=_[0],s&&s(a)};return this.createCubeTexture(t,r,null,!1,o,a,l,u,h,i,n)};var I=e.i(20483);let L=!1;L=!0,c.ThinEngine.prototype.createUniformBuffer=function(e,t){let r=this._gl.createBuffer();if(!r)throw Error("Unable to create uniform buffer");let i=new I.WebGLDataBuffer(r);return this.bindUniformBuffer(i),e instanceof Float32Array?this._gl.bufferData(this._gl.UNIFORM_BUFFER,e,this._gl.STATIC_DRAW):this._gl.bufferData(this._gl.UNIFORM_BUFFER,new Float32Array(e),this._gl.STATIC_DRAW),this.bindUniformBuffer(null),i.references=1,i},c.ThinEngine.prototype.createDynamicUniformBuffer=function(e,t){let r=this._gl.createBuffer();if(!r)throw Error("Unable to create dynamic uniform buffer");let i=new I.WebGLDataBuffer(r);return this.bindUniformBuffer(i),e instanceof Float32Array?this._gl.bufferData(this._gl.UNIFORM_BUFFER,e,this._gl.DYNAMIC_DRAW):this._gl.bufferData(this._gl.UNIFORM_BUFFER,new Float32Array(e),this._gl.DYNAMIC_DRAW),this.bindUniformBuffer(null),i.references=1,i},c.ThinEngine.prototype.updateUniformBuffer=function(e,t,r,i){this.bindUniformBuffer(e),void 0===r&&(r=0),void 0===i?t instanceof Float32Array?this._gl.bufferSubData(this._gl.UNIFORM_BUFFER,r,t):this._gl.bufferSubData(this._gl.UNIFORM_BUFFER,r,new Float32Array(t)):t instanceof Float32Array?this._gl.bufferSubData(this._gl.UNIFORM_BUFFER,0,t.subarray(r,r+i)):this._gl.bufferSubData(this._gl.UNIFORM_BUFFER,0,new Float32Array(t).subarray(r,r+i)),this.bindUniformBuffer(null)},c.ThinEngine.prototype.bindUniformBuffer=function(e){this._gl.bindBuffer(this._gl.UNIFORM_BUFFER,e?e.underlyingResource:null)},c.ThinEngine.prototype.bindUniformBufferBase=function(e,t,r){this._gl.bindBufferBase(this._gl.UNIFORM_BUFFER,t,e?e.underlyingResource:null)},c.ThinEngine.prototype.bindUniformBlock=function(e,t,r){let i=e.program,n=this._gl.getUniformBlockIndex(i,t);0xffffffff!==n&&this._gl.uniformBlockBinding(i,n,r)};var O=e.i(64545),X=e.i(76535);let N=!1;N=!0,X.AbstractEngine.prototype.displayLoadingUI=function(){if(!(0,O.IsWindowObjectExist)())return;let e=this.loadingScreen;e&&e.displayLoadingUI()},X.AbstractEngine.prototype.hideLoadingUI=function(){if(!(0,O.IsWindowObjectExist)())return;let e=this._loadingScreen;e&&e.hideLoadingUI()},Object.defineProperty(X.AbstractEngine.prototype,"loadingScreen",{get:function(){return!this._loadingScreen&&this._renderingCanvas&&(this._loadingScreen=X.AbstractEngine.DefaultLoadingScreenFactory(this._renderingCanvas)),this._loadingScreen},set:function(e){this._loadingScreen=e},enumerable:!0,configurable:!0}),Object.defineProperty(X.AbstractEngine.prototype,"loadingUIText",{set:function(e){this.loadingScreen.loadingUIText=e},enumerable:!0,configurable:!0}),Object.defineProperty(X.AbstractEngine.prototype,"loadingUIBackgroundColor",{set:function(e){this.loadingScreen.loadingUIBackgroundColor=e},enumerable:!0,configurable:!0});let w=!1;function v(){w||(w=!0,X.AbstractEngine.prototype.getInputElement=function(){return this._renderingCanvas},X.AbstractEngine.prototype.getRenderingCanvasClientRect=function(){return this._renderingCanvas?this._renderingCanvas.getBoundingClientRect():null},X.AbstractEngine.prototype.getInputElementClientRect=function(){return this._renderingCanvas?this.getInputElement().getBoundingClientRect():null},X.AbstractEngine.prototype.getAspectRatio=function(e,t=!1){let r=e.viewport;return this.getRenderWidth(t)*r.width/(this.getRenderHeight(t)*r.height)},X.AbstractEngine.prototype.getScreenAspectRatio=function(){return this.getRenderWidth(!0)/this.getRenderHeight(!0)},X.AbstractEngine.prototype._verifyPointerLock=function(){this._onPointerLockChange?.()})}v();let G=!1;G=!0,X.AbstractEngine.prototype.getInputElement=function(){return this._renderingCanvas},X.AbstractEngine.prototype.getDepthFunction=function(){return this._depthCullingState.depthFunc},X.AbstractEngine.prototype.setDepthFunction=function(e){this._depthCullingState.depthFunc=e},X.AbstractEngine.prototype.setDepthFunctionToGreater=function(){this.setDepthFunction(516)},X.AbstractEngine.prototype.setDepthFunctionToGreaterOrEqual=function(){this.setDepthFunction(518)},X.AbstractEngine.prototype.setDepthFunctionToLess=function(){this.setDepthFunction(513)},X.AbstractEngine.prototype.setDepthFunctionToLessOrEqual=function(){this.setDepthFunction(515)},X.AbstractEngine.prototype.getDepthWrite=function(){return this._depthCullingState.depthMask},X.AbstractEngine.prototype.setDepthWrite=function(e){this._depthCullingState.depthMask=e},X.AbstractEngine.prototype.setAlphaConstants=function(e,t,r,i){this._alphaState.setAlphaBlendConstants(e,t,r,i)},X.AbstractEngine.prototype.getAlphaMode=function(e=0){return this._alphaMode[e]},X.AbstractEngine.prototype.getAlphaEquation=function(e=0){return this._alphaEquation[e]};let k=!1;k=!0,X.AbstractEngine.prototype.getStencilBuffer=function(){return this._stencilState.stencilTest},X.AbstractEngine.prototype.setStencilBuffer=function(e){this._stencilState.stencilTest=e},X.AbstractEngine.prototype.getStencilMask=function(){return this._stencilState.stencilMask},X.AbstractEngine.prototype.setStencilMask=function(e){this._stencilState.stencilMask=e},X.AbstractEngine.prototype.getStencilFunction=function(){return this._stencilState.stencilFunc},X.AbstractEngine.prototype.getStencilBackFunction=function(){return this._stencilState.stencilBackFunc},X.AbstractEngine.prototype.getStencilFunctionReference=function(){return this._stencilState.stencilFuncRef},X.AbstractEngine.prototype.getStencilFunctionMask=function(){return this._stencilState.stencilFuncMask},X.AbstractEngine.prototype.setStencilFunction=function(e){this._stencilState.stencilFunc=e},X.AbstractEngine.prototype.setStencilBackFunction=function(e){this._stencilState.stencilBackFunc=e},X.AbstractEngine.prototype.setStencilFunctionReference=function(e){this._stencilState.stencilFuncRef=e},X.AbstractEngine.prototype.setStencilFunctionMask=function(e){this._stencilState.stencilFuncMask=e},X.AbstractEngine.prototype.getStencilOperationFail=function(){return this._stencilState.stencilOpStencilFail},X.AbstractEngine.prototype.getStencilBackOperationFail=function(){return this._stencilState.stencilBackOpStencilFail},X.AbstractEngine.prototype.getStencilOperationDepthFail=function(){return this._stencilState.stencilOpDepthFail},X.AbstractEngine.prototype.getStencilBackOperationDepthFail=function(){return this._stencilState.stencilBackOpDepthFail},X.AbstractEngine.prototype.getStencilOperationPass=function(){return this._stencilState.stencilOpStencilDepthPass},X.AbstractEngine.prototype.getStencilBackOperationPass=function(){return this._stencilState.stencilBackOpStencilDepthPass},X.AbstractEngine.prototype.setStencilOperationFail=function(e){this._stencilState.stencilOpStencilFail=e},X.AbstractEngine.prototype.setStencilBackOperationFail=function(e){this._stencilState.stencilBackOpStencilFail=e},X.AbstractEngine.prototype.setStencilOperationDepthFail=function(e){this._stencilState.stencilOpDepthFail=e},X.AbstractEngine.prototype.setStencilBackOperationDepthFail=function(e){this._stencilState.stencilBackOpDepthFail=e},X.AbstractEngine.prototype.setStencilOperationPass=function(e){this._stencilState.stencilOpStencilDepthPass=e},X.AbstractEngine.prototype.setStencilBackOperationPass=function(e){this._stencilState.stencilBackOpStencilDepthPass=e},X.AbstractEngine.prototype.cacheStencilState=function(){this._cachedStencilBuffer=this.getStencilBuffer(),this._cachedStencilFunction=this.getStencilFunction(),this._cachedStencilMask=this.getStencilMask(),this._cachedStencilOperationPass=this.getStencilOperationPass(),this._cachedStencilOperationFail=this.getStencilOperationFail(),this._cachedStencilOperationDepthFail=this.getStencilOperationDepthFail(),this._cachedStencilReference=this.getStencilFunctionReference()},X.AbstractEngine.prototype.restoreStencilState=function(){this.setStencilFunction(this._cachedStencilFunction),this.setStencilMask(this._cachedStencilMask),this.setStencilBuffer(this._cachedStencilBuffer),this.setStencilOperationPass(this._cachedStencilOperationPass),this.setStencilOperationFail(this._cachedStencilOperationFail),this.setStencilOperationDepthFail(this._cachedStencilOperationDepthFail),this.setStencilFunctionReference(this._cachedStencilReference)};var W=e.i(69938);(0,W.RegisterAbstractEngineRenderPass)();let H=!1;H=!0,X.AbstractEngine.prototype.createDepthStencilTexture=function(e,t,r){if(!t.isCube)return this._createDepthStencilTexture(e,t,r);{let r=e.width||e;return this._createDepthStencilCubeTexture(r,t)}};let Y=!1;Y=!0,X.AbstractEngine.prototype._loadFileAsync=async function(e,t,r){return await new Promise((i,n)=>{this._loadFile(e,e=>{i(e)},void 0,t,r,(e,t)=>{n(t)})})};var V=e.i(53730);X.AbstractEngine.GetCompatibleTextureLoader=V._GetCompatibleTextureLoader;let z=!1;z=!0,c.ThinEngine.prototype.enableScissor=function(e,t,r,i){let n=this._gl;n.enable(n.SCISSOR_TEST),n.scissor(e,t,r,i)},c.ThinEngine.prototype.disableScissor=function(){let e=this._gl;e.disable(e.SCISSOR_TEST)},e.s([],52617),e.i(52617);var q=e.i(81623),K=c,j=e.i(36395);class Q{constructor(e=30){this._enabled=!0,this._rollingFrameTime=new Z(e)}sampleFrame(e=j.PrecisionDate.Now){if(this._enabled){if(null!=this._lastFrameTimeMs){let t=e-this._lastFrameTimeMs;this._rollingFrameTime.add(t)}this._lastFrameTimeMs=e}}get averageFrameTime(){return this._rollingFrameTime.average}get averageFrameTimeVariance(){return this._rollingFrameTime.variance}get instantaneousFrameTime(){return this._rollingFrameTime.history(0)}get averageFPS(){return 1e3/this._rollingFrameTime.average}get instantaneousFPS(){let e=this._rollingFrameTime.history(0);return 0===e?0:1e3/e}get isSaturated(){return this._rollingFrameTime.isSaturated()}enable(){this._enabled=!0}disable(){this._enabled=!1,this._lastFrameTimeMs=null}get isEnabled(){return this._enabled}reset(){this._lastFrameTimeMs=null,this._rollingFrameTime.reset()}}class Z{constructor(e){this._samples=Array(e),this.reset()}add(e){let t;if(this.isSaturated()){let e=this._samples[this._pos];t=e-this.average,this.average-=t/(this._sampleCount-1),this._m2-=t*(e-this.average)}else this._sampleCount++;t=e-this.average,this.average+=t/this._sampleCount,this._m2+=t*(e-this.average),this.variance=this._m2/(this._sampleCount-1),this._samples[this._pos]=e,this._pos++,this._pos%=this._samples.length}history(e){if(e>=this._sampleCount||e>=this._samples.length)return 0;let t=this._wrapPosition(this._pos-1);return this._samples[this._wrapPosition(t-e)]}isSaturated(){return this._sampleCount>=this._samples.length}reset(){this.average=0,this.variance=0,this._sampleCount=0,this._pos=0,this._m2=0}_wrapPosition(e){let t=this._samples.length;return(e%t+t)%t}}var $=e.i(40462);function J(e){return Number.isFinite(e.ascent)&&Number.isFinite(e.height)&&Number.isFinite(e.descent)&&e.height>0}async function ee(e,t,r){return await new Promise((i,n)=>{let s=new Image;s.onload=()=>{s.decode().then(()=>{e.createImageBitmap(s,r).then(e=>{i(e)})})},s.onerror=()=>{n(`Error loading image ${s.src}`)},s.src=t})}function et(e){if(e.requestPointerLock){let t=e.requestPointerLock();t instanceof Promise?t.then(()=>{e.focus()}).catch(()=>{}):e.focus()}}var er=e.i(67359),ei=e.i(23240),en=e.i(75405);class es extends K.ThinEngine{static get NpmPackage(){return X.AbstractEngine.NpmPackage}static get Version(){return X.AbstractEngine.Version}static get Instances(){return q.EngineStore.Instances}static get LastCreatedEngine(){return q.EngineStore.LastCreatedEngine}static get LastCreatedScene(){return q.EngineStore.LastCreatedScene}static DefaultLoadingScreenFactory(e){return X.AbstractEngine.DefaultLoadingScreenFactory(e)}get _supportsHardwareTextureRescaling(){return!!es._RescalePostProcessFactory}_measureFps(){this._performanceMonitor.sampleFrame(),this._fps=this._performanceMonitor.averageFPS,this._deltaTime=this._performanceMonitor.instantaneousFrameTime||0}get performanceMonitor(){return this._performanceMonitor}constructor(e,t,r,i=!1){if(v(),(0,W.RegisterAbstractEngineRenderPass)(),super(e,t,r,i),this._performanceMonitor=new Q,this._drawCalls=new er.PerfCounter,!e)return;this._features.supportRenderPasses=!0}_initGLContext(){super._initGLContext(),this._rescalePostProcess=null}_sharedInit(e){var t,r;let i;super._sharedInit(e),t=this,r=this._creationOptions,t._onCanvasFocus=()=>{t.onCanvasFocusObservable.notifyObservers(t)},t._onCanvasBlur=()=>{t.onCanvasBlurObservable.notifyObservers(t)},t._onCanvasContextMenu=e=>{t.disableContextMenu&&e.preventDefault()},e.addEventListener("focus",t._onCanvasFocus),e.addEventListener("blur",t._onCanvasBlur),e.addEventListener("contextmenu",t._onCanvasContextMenu),t._onBlur=()=>{t.disablePerformanceMonitorInBackground&&t.performanceMonitor.disable(),t._windowIsBackground=!0},t._onFocus=()=>{t.disablePerformanceMonitorInBackground&&t.performanceMonitor.enable(),t._windowIsBackground=!1},t._onCanvasPointerOut=r=>{document.elementFromPoint(r.clientX,r.clientY)!==e&&t.onCanvasPointerOutObservable.notifyObservers(r)},(i=t.getHostWindow())&&"function"==typeof i.addEventListener&&(i.addEventListener("blur",t._onBlur),i.addEventListener("focus",t._onFocus)),e.addEventListener("pointerout",t._onCanvasPointerOut),!r.doNotHandleTouchAction&&e&&e.setAttribute&&(e.setAttribute("touch-action","none"),e.style.touchAction="none",e.style.webkitTapHighlightColor="transparent"),!X.AbstractEngine.audioEngine&&r.audioEngine&&X.AbstractEngine.AudioEngineFactory&&(X.AbstractEngine.audioEngine=X.AbstractEngine.AudioEngineFactory(t.getRenderingCanvas(),t.getAudioContext(),t.getAudioDestination())),(0,O.IsDocumentAvailable)()&&(t._onFullscreenChange=()=>{t.isFullscreen=!!document.fullscreenElement,t.isFullscreen&&t._pointerLockRequested&&e&&et(e)},document.addEventListener("fullscreenchange",t._onFullscreenChange,!1),document.addEventListener("webkitfullscreenchange",t._onFullscreenChange,!1),t._onPointerLockChange=()=>{t.isPointerLock=document.pointerLockElement===e},document.addEventListener("pointerlockchange",t._onPointerLockChange,!1),document.addEventListener("webkitpointerlockchange",t._onPointerLockChange,!1)),t.enableOfflineSupport=void 0!==X.AbstractEngine.OfflineProviderFactory,t._deterministicLockstep=!!r.deterministicLockstep,t._lockstepMaxSteps=r.lockstepMaxSteps||0,t._timeStep=r.timeStep||1/60}resizeImageBitmap(e,t,r){let i=this.createCanvas(t,r).getContext("2d");if(!i)throw Error("Unable to get 2d context for resizeImageBitmap");return i.drawImage(e,0,0),i.getImageData(0,0,t,r).data}async _createImageBitmapFromSource(e,t){return await ee(this,e,t)}switchFullscreen(e){this.isFullscreen?this.exitFullscreen():this.enterFullscreen(e)}enterFullscreen(e){if(!this.isFullscreen){var t;let r;this._pointerLockRequested=e,this._renderingCanvas&&(r=(t=this._renderingCanvas).requestFullscreen||t.webkitRequestFullscreen)&&r.call(t)}}exitFullscreen(){let e;this.isFullscreen&&(e=document,document.exitFullscreen?document.exitFullscreen():e.webkitCancelFullScreen&&e.webkitCancelFullScreen())}setDitheringState(e){e?this._gl.enable(this._gl.DITHER):this._gl.disable(this._gl.DITHER)}setRasterizerState(e){e?this._gl.disable(this._gl.RASTERIZER_DISCARD):this._gl.enable(this._gl.RASTERIZER_DISCARD)}setDirectViewport(e,t,r,i){let n=this._cachedViewport;return this._cachedViewport=null,this._viewport(e,t,r,i),n}scissorClear(e,t,r,i,n){this.enableScissor(e,t,r,i),this.clear(n,!0,!0,!0),this.disableScissor()}getVertexShaderSource(e){let t=this._gl.getAttachedShaders(e);return t?this._gl.getShaderSource(t[0]):null}getFragmentShaderSource(e){let t=this._gl.getAttachedShaders(e);return t?this._gl.getShaderSource(t[1]):null}set framebufferDimensionsObject(e){this._framebufferDimensionsObject=e,this._framebufferDimensionsObject&&this.onResizeObservable.notifyObservers(this)}_rebuildBuffers(){for(let e of this.scenes)e.resetCachedMaterial(),e._rebuildGeometries();for(let e of this._virtualScenes)e.resetCachedMaterial(),e._rebuildGeometries();super._rebuildBuffers()}getFontOffset(e){var t;let r,i,n,s,a=function(e){let t,r;if(!(0,O.IsDocumentAvailable)()||!document.body)return null;let i=document.createElement("span");i.textContent="Hg",i.style.font=e;let n=document.createElement("div");n.style.display="inline-block",n.style.width="1px",n.style.height="0px",n.style.verticalAlign="bottom";let s=document.createElement("div");s.style.whiteSpace="nowrap",s.appendChild(i),s.appendChild(n),document.body.appendChild(s);try{r=n.getBoundingClientRect().top-i.getBoundingClientRect().top,n.style.verticalAlign="baseline",t=n.getBoundingClientRect().top-i.getBoundingClientRect().top}finally{document.body.removeChild(s)}let a={ascent:t,height:r,descent:r-t};return J(a)?a:null}(e);if(a)return a;let l=function(e){let t=null;try{"u">typeof OffscreenCanvas?t=new OffscreenCanvas(64,64):(0,O.IsDocumentAvailable)()&&"function"==typeof document.createElement&&((t=document.createElement("canvas")).width=64,t.height=64);let r=t?.getContext("2d");if(!r)return null;r.font=e;let i=r.measureText("Hg"),n=Number(i.actualBoundingBoxAscent??i.fontBoundingBoxAscent),s=Number(i.actualBoundingBoxDescent??i.fontBoundingBoxDescent),a={ascent:n,height:n+s,descent:s};return J(a)?a:null}catch{return null}finally{let e=t;"function"==typeof e?.dispose&&e.dispose()}}(e);return l||(n=.8*(i=Math.max(1,(t=e,(r=/(?:^|\s)([0-9]+(?:\.[0-9]+)?)px(?:\/|\s|$)/.exec(String(t||"")))?Number(r[1]):16))),{ascent:n,height:n+(s=.2*i),descent:s})}enterPointerlock(){this._renderingCanvas&&et(this._renderingCanvas)}exitPointerlock(){document.exitPointerLock&&document.exitPointerLock()}beginFrame(){this._measureFps(),super.beginFrame()}_deletePipelineContext(e){e&&e.program&&e.transformFeedback&&(this.deleteTransformFeedback(e.transformFeedback),e.transformFeedback=null),super._deletePipelineContext(e)}createShaderProgram(e,t,r,i,n,s=null){n=n||this._gl,this.onBeforeShaderCompilationObservable.notifyObservers(this);let a=super.createShaderProgram(e,t,r,i,n,s);return this.onAfterShaderCompilationObservable.notifyObservers(this),a}_createShaderProgram(e,t,r,i,n=null){let s=i.createProgram();if(e.program=s,!s)throw Error("Unable to create program");if(i.attachShader(s,t),i.attachShader(s,r),this.webGLVersion>1&&n){let t=this.createTransformFeedback();this.bindTransformFeedback(t),this.setTranformFeedbackVaryings(s,n),e.transformFeedback=t}return i.linkProgram(s),this.webGLVersion>1&&n&&this.bindTransformFeedback(null),e.context=i,e.vertexShader=t,e.fragmentShader=r,e.isParallelCompiled||this._finalizePipelineContext(e),s}_releaseTexture(e){super._releaseTexture(e)}_releaseRenderTargetWrapper(e){for(let t of(super._releaseRenderTargetWrapper(e),this.scenes)){for(let r of t.postProcesses)r._outputTexture===e&&(r._outputTexture=null);for(let r of t.cameras)for(let t of r._postProcesses)t&&t._outputTexture===e&&(t._outputTexture=null)}}_rescaleTexture(e,t,r,i,n){this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MAG_FILTER,this._gl.LINEAR),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MIN_FILTER,this._gl.LINEAR),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_WRAP_S,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_WRAP_T,this._gl.CLAMP_TO_EDGE);let s=this.createRenderTargetTexture({width:t.width,height:t.height},{generateMipMaps:!1,type:0,samplingMode:2,generateDepthBuffer:!1,generateStencilBuffer:!1});if(!this._rescalePostProcess&&es._RescalePostProcessFactory&&(this._rescalePostProcess=es._RescalePostProcessFactory(this)),this._rescalePostProcess){this._rescalePostProcess.externalTextureSamplerBinding=!0;let a=()=>{this._rescalePostProcess.onApply=function(t){t._bindTexture("textureSampler",e)};let a=r;a||(a=this.scenes[this.scenes.length-1]),a.postProcessManager.directRender([this._rescalePostProcess],s,!0),this._bindTextureDirectly(this._gl.TEXTURE_2D,t,!0),this._gl.copyTexImage2D(this._gl.TEXTURE_2D,0,i,0,0,t.width,t.height,0),this.unBindFramebuffer(s),s.dispose(),n&&n()},l=this._rescalePostProcess.getEffect();l?l.executeWhenCompiled(a):this._rescalePostProcess.onEffectCreatedObservable.addOnce(e=>{e.executeWhenCompiled(a)})}}wrapWebGLTexture(e,t=!1,r=3,i=0,n=0){let s=new $.WebGLHardwareTexture(e,this._gl),a=new T.InternalTexture(this,15,!0);return a._hardwareTexture=s,a.baseWidth=i,a.baseHeight=n,a.width=i,a.height=n,a.isReady=!0,a.useMipMaps=t,this.updateTextureSamplingMode(r,a),a}updateWrappedWebGLTexture(e,t){if(15!==e.source)throw Error("updateWrappedWebGLTexture: target InternalTexture was not produced by wrapWebGLTexture.");for(let t of this._renderTargetWrapperCache)if(t.textures?.includes(e)){if(t.isMulti)throw Error("updateWrappedWebGLTexture: wrapped texture is part of a multi render-target; not supported. Dispose and re-wrap.");if(t._depthStencilTexture)throw Error("updateWrappedWebGLTexture: wrapped texture's render-target wrapper has a depth/stencil texture; not supported. Dispose and re-wrap.")}for(let r in e._hardwareTexture=new $.WebGLHardwareTexture(t,this._gl),e.isReady=!0,e._cachedCoordinatesMode=null,e._cachedWrapU=null,e._cachedWrapV=null,e._cachedWrapR=null,e._cachedAnisotropicFilteringLevel=null,this._boundTexturesCache)this._boundTexturesCache[r]===e&&(this._boundTexturesCache[r]=null);this.updateTextureSamplingMode(e.samplingMode,e);let r=this._gl;for(let i of this._renderTargetWrapperCache){if(i.texture!==e)continue;let n=i.samples,s=n>1;i._framebuffer&&r.deleteFramebuffer(i._framebuffer),!s&&i._depthStencilBuffer&&(r.deleteRenderbuffer(i._depthStencilBuffer),i._depthStencilBuffer=null);let a=this._currentFramebuffer,l=r.createFramebuffer();this._bindUnboundFramebuffer(l),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,t,0),s||(i._depthStencilBuffer=this._setupFramebufferDepthAttachments(i._generateStencilBuffer,i._generateDepthBuffer,i.width,i.height)),this._bindUnboundFramebuffer(a),i._framebuffer=l,s&&(i._samples=1,this.updateRenderTargetTextureSampleCount(i,n))}}_uploadImageToTexture(e,t,r=0,i=0){let n=this._gl,s=this._getWebGLTextureType(e.type),a=this._getInternalFormat(e.format),l=this._getRGBABufferInternalSizedFormat(e.type,a),u=e.isCube?n.TEXTURE_CUBE_MAP:n.TEXTURE_2D;this._bindTextureDirectly(u,e,!0),this._unpackFlipY(e.invertY);let h=n.TEXTURE_2D;e.isCube&&(h=n.TEXTURE_CUBE_MAP_POSITIVE_X+r),n.texImage2D(h,i,l,a,s,t),this._bindTextureDirectly(u,null,!0)}updateTextureComparisonFunction(e,t){if(1===this.webGLVersion)return void f.Logger.Error("WebGL 1 does not support texture comparison.");let r=this._gl;e.isCube?(this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,e,!0),0===t?(r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_COMPARE_FUNC,515),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_COMPARE_MODE,r.NONE)):(r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_COMPARE_FUNC,t),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_COMPARE_MODE,r.COMPARE_REF_TO_TEXTURE)),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null)):(this._bindTextureDirectly(this._gl.TEXTURE_2D,e,!0),0===t?(r.texParameteri(r.TEXTURE_2D,r.TEXTURE_COMPARE_FUNC,515),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_COMPARE_MODE,r.NONE)):(r.texParameteri(r.TEXTURE_2D,r.TEXTURE_COMPARE_FUNC,t),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_COMPARE_MODE,r.COMPARE_REF_TO_TEXTURE)),this._bindTextureDirectly(this._gl.TEXTURE_2D,null)),e._comparisonFunction=t}createInstancesBuffer(e){let t=this._gl.createBuffer();if(!t)throw Error("Unable to create instance buffer");let r=new I.WebGLDataBuffer(t);return r.capacity=e,this.bindArrayBuffer(r),this._gl.bufferData(this._gl.ARRAY_BUFFER,e,this._gl.DYNAMIC_DRAW),r.references=1,r}deleteInstancesBuffer(e){this._gl.deleteBuffer(e)}async _clientWaitAsync(e,t=0,r=10){let i=this._gl;return await new Promise((n,s)=>{(0,ei._RetryWithInterval)(()=>{let r=i.clientWaitSync(e,t,0);if(r==i.WAIT_FAILED)throw Error("clientWaitSync failed");return r!=i.TIMEOUT_EXPIRED},n,s,r)})}_readPixelsAsync(e,t,r,i,n,s,a){if(this._webGLVersion<2)throw Error("_readPixelsAsync only work on WebGL2+");let l=this._gl,u=l.createBuffer();l.bindBuffer(l.PIXEL_PACK_BUFFER,u),l.bufferData(l.PIXEL_PACK_BUFFER,a.byteLength,l.STREAM_READ),l.readPixels(e,t,r,i,n,s,0),l.bindBuffer(l.PIXEL_PACK_BUFFER,null);let h=l.fenceSync(l.SYNC_GPU_COMMANDS_COMPLETE,0);return h?(l.flush(),this._clientWaitAsync(h,0,10).then(()=>(l.deleteSync(h),l.bindBuffer(l.PIXEL_PACK_BUFFER,u),l.getBufferSubData(l.PIXEL_PACK_BUFFER,0,a),l.bindBuffer(l.PIXEL_PACK_BUFFER,null),l.deleteBuffer(u),a))):null}dispose(){var e;let t;this.hideLoadingUI(),this._rescalePostProcess&&this._rescalePostProcess.dispose(),e=this._renderingCanvas,1===q.EngineStore.Instances.length&&X.AbstractEngine.audioEngine&&(X.AbstractEngine.audioEngine.dispose(),X.AbstractEngine.audioEngine=null),(t=this.getHostWindow())&&"function"==typeof t.removeEventListener&&(t.removeEventListener("blur",this._onBlur),t.removeEventListener("focus",this._onFocus)),e&&(e.removeEventListener("focus",this._onCanvasFocus),e.removeEventListener("blur",this._onCanvasBlur),e.removeEventListener("pointerout",this._onCanvasPointerOut),e.removeEventListener("contextmenu",this._onCanvasContextMenu)),(0,O.IsDocumentAvailable)()&&(document.removeEventListener("fullscreenchange",this._onFullscreenChange),document.removeEventListener("mozfullscreenchange",this._onFullscreenChange),document.removeEventListener("webkitfullscreenchange",this._onFullscreenChange),document.removeEventListener("msfullscreenchange",this._onFullscreenChange),document.removeEventListener("pointerlockchange",this._onPointerLockChange),document.removeEventListener("mspointerlockchange",this._onPointerLockChange),document.removeEventListener("mozpointerlockchange",this._onPointerLockChange),document.removeEventListener("webkitpointerlockchange",this._onPointerLockChange)),super.dispose()}}es.ALPHA_DISABLE=0,es.ALPHA_ADD=1,es.ALPHA_COMBINE=2,es.ALPHA_SUBTRACT=3,es.ALPHA_MULTIPLY=4,es.ALPHA_MAXIMIZED=5,es.ALPHA_ONEONE=6,es.ALPHA_PREMULTIPLIED=7,es.ALPHA_PREMULTIPLIED_PORTERDUFF=8,es.ALPHA_INTERPOLATE=9,es.ALPHA_SCREENMODE=10,es.DELAYLOADSTATE_NONE=0,es.DELAYLOADSTATE_LOADED=1,es.DELAYLOADSTATE_LOADING=2,es.DELAYLOADSTATE_NOTLOADED=4,es.NEVER=512,es.ALWAYS=519,es.LESS=513,es.EQUAL=514,es.LEQUAL=515,es.GREATER=516,es.GEQUAL=518,es.NOTEQUAL=517,es.KEEP=7680,es.REPLACE=7681,es.INCR=7682,es.DECR=7683,es.INVERT=5386,es.INCR_WRAP=34055,es.DECR_WRAP=34056,es.TEXTURE_CLAMP_ADDRESSMODE=0,es.TEXTURE_WRAP_ADDRESSMODE=1,es.TEXTURE_MIRROR_ADDRESSMODE=2,es.TEXTUREFORMAT_ALPHA=0,es.TEXTUREFORMAT_LUMINANCE=1,es.TEXTUREFORMAT_LUMINANCE_ALPHA=2,es.TEXTUREFORMAT_RGB=4,es.TEXTUREFORMAT_RGBA=5,es.TEXTUREFORMAT_RED=6,es.TEXTUREFORMAT_R=6,es.TEXTUREFORMAT_R16_UNORM=33322,es.TEXTUREFORMAT_RG16_UNORM=33324,es.TEXTUREFORMAT_RGB16_UNORM=32852,es.TEXTUREFORMAT_RGBA16_UNORM=32859,es.TEXTUREFORMAT_R16_SNORM=36760,es.TEXTUREFORMAT_RG16_SNORM=36761,es.TEXTUREFORMAT_RGB16_SNORM=36762,es.TEXTUREFORMAT_RGBA16_SNORM=36763,es.TEXTUREFORMAT_RG=7,es.TEXTUREFORMAT_RED_INTEGER=8,es.TEXTUREFORMAT_R_INTEGER=8,es.TEXTUREFORMAT_RG_INTEGER=9,es.TEXTUREFORMAT_RGB_INTEGER=10,es.TEXTUREFORMAT_RGBA_INTEGER=11,es.TEXTURETYPE_UNSIGNED_BYTE=0,es.TEXTURETYPE_UNSIGNED_INT=0,es.TEXTURETYPE_FLOAT=1,es.TEXTURETYPE_HALF_FLOAT=2,es.TEXTURETYPE_BYTE=3,es.TEXTURETYPE_SHORT=4,es.TEXTURETYPE_UNSIGNED_SHORT=5,es.TEXTURETYPE_INT=6,es.TEXTURETYPE_UNSIGNED_INTEGER=7,es.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4=8,es.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1=9,es.TEXTURETYPE_UNSIGNED_SHORT_5_6_5=10,es.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV=11,es.TEXTURETYPE_UNSIGNED_INT_24_8=12,es.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV=13,es.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV=14,es.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV=15,es.TEXTURE_NEAREST_SAMPLINGMODE=1,es.TEXTURE_BILINEAR_SAMPLINGMODE=2,es.TEXTURE_TRILINEAR_SAMPLINGMODE=3,es.TEXTURE_NEAREST_NEAREST_MIPLINEAR=8,es.TEXTURE_LINEAR_LINEAR_MIPNEAREST=11,es.TEXTURE_LINEAR_LINEAR_MIPLINEAR=3,es.TEXTURE_NEAREST_NEAREST_MIPNEAREST=4,es.TEXTURE_NEAREST_LINEAR_MIPNEAREST=5,es.TEXTURE_NEAREST_LINEAR_MIPLINEAR=6,es.TEXTURE_NEAREST_LINEAR=7,es.TEXTURE_NEAREST_NEAREST=1,es.TEXTURE_LINEAR_NEAREST_MIPNEAREST=9,es.TEXTURE_LINEAR_NEAREST_MIPLINEAR=10,es.TEXTURE_LINEAR_LINEAR=2,es.TEXTURE_LINEAR_NEAREST=12,es.TEXTURE_EXPLICIT_MODE=0,es.TEXTURE_SPHERICAL_MODE=1,es.TEXTURE_PLANAR_MODE=2,es.TEXTURE_CUBIC_MODE=3,es.TEXTURE_PROJECTION_MODE=4,es.TEXTURE_SKYBOX_MODE=5,es.TEXTURE_INVCUBIC_MODE=6,es.TEXTURE_EQUIRECTANGULAR_MODE=7,es.TEXTURE_FIXED_EQUIRECTANGULAR_MODE=8,es.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE=9,es.SCALEMODE_FLOOR=1,es.SCALEMODE_NEAREST=2,es.SCALEMODE_CEILING=3,(t=es.prototype).createMultiviewRenderTargetTexture??(t.createMultiviewRenderTargetTexture=(0,en._MissingSideEffect)("Engine","createMultiviewRenderTargetTexture")),(r=es.prototype).bindMultiviewFramebuffer??(r.bindMultiviewFramebuffer=(0,en._MissingSideEffect)("Engine","bindMultiviewFramebuffer")),(i=es.prototype).bindSpaceWarpFramebuffer??(i.bindSpaceWarpFramebuffer=(0,en._MissingSideEffect)("Engine","bindSpaceWarpFramebuffer")),(n=es.prototype).createTransformFeedback??(n.createTransformFeedback=(0,en._MissingSideEffect)("Engine","createTransformFeedback")),(s=es.prototype).deleteTransformFeedback??(s.deleteTransformFeedback=(0,en._MissingSideEffect)("Engine","deleteTransformFeedback")),(a=es.prototype).bindTransformFeedback??(a.bindTransformFeedback=(0,en._MissingSideEffect)("Engine","bindTransformFeedback")),(l=es.prototype).beginTransformFeedback??(l.beginTransformFeedback=(0,en._MissingSideEffect)("Engine","beginTransformFeedback")),(u=es.prototype).endTransformFeedback??(u.endTransformFeedback=(0,en._MissingSideEffect)("Engine","endTransformFeedback")),(h=es.prototype).setTranformFeedbackVaryings??(h.setTranformFeedbackVaryings=(0,en._MissingSideEffect)("Engine","setTranformFeedbackVaryings")),(o=es.prototype).bindTransformFeedbackBuffer??(o.bindTransformFeedbackBuffer=(0,en._MissingSideEffect)("Engine","bindTransformFeedbackBuffer")),(_=es.prototype).readTransformFeedbackBuffer??(_.readTransformFeedbackBuffer=(0,en._MissingSideEffect)("Engine","readTransformFeedbackBuffer")),e.s(["Engine",0,es],95769),e.i(95769),e.s(["Engine",0,es],94080)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,66232,e=>{"use strict";var t,r,i,n,s,a,l,u,h,o,_,c=e.i(25282);let E=!1;E=!0,c.ThinEngine.prototype.setAlphaMode=function(e,t=!1,r=0){if(this._alphaMode[r]===e){if(!t){let t=0===e;this.depthCullingState.depthMask!==t&&(this.depthCullingState.depthMask=t)}return}let i=0===e;this._alphaState.setAlphaBlend(!i,r),this._alphaState.setAlphaMode(e,r),t||(this.depthCullingState.depthMask=i),this._alphaMode[r]=e};var T=e.i(58727),f=e.i(83464),p=e.i(65679);let d=!1;function g(e,t,r,i){let n,s=1;1===i?n=new Float32Array(t*r*4):2===i?(n=new Uint16Array(t*r*4),s=15360):n=7===i?new Uint32Array(t*r*4):new Uint8Array(t*r*4);for(let i=0;i<t;i++)for(let a=0;a<r;a++){let r=(a*t+i)*3,l=(a*t+i)*4;n[l+0]=e[r+0],n[l+1]=e[r+1],n[l+2]=e[r+2],n[l+3]=s}return n}function R(e){return function(t,r,i,n,s,a,l,u,h=null,o=0){let _=e?this._gl.TEXTURE_3D:this._gl.TEXTURE_2D_ARRAY,c=new T.InternalTexture(this,e?10:11);c.baseWidth=r,c.baseHeight=i,c.baseDepth=n,c.width=r,c.height=i,c.depth=n,c.format=s,c.type=o,c.generateMipMaps=a,c.samplingMode=u,e?c.is3D=!0:c.is2DArray=!0,this._doNotHandleContextLost||(c._bufferView=t),e?this.updateRawTexture3D(c,t,s,l,h,o):this.updateRawTexture2DArray(c,t,s,l,h,o),this._bindTextureDirectly(_,c,!0);let E=this._getSamplingParameters(u,a);return this._gl.texParameteri(_,this._gl.TEXTURE_MAG_FILTER,E.mag),this._gl.texParameteri(_,this._gl.TEXTURE_MIN_FILTER,E.min),a&&this._gl.generateMipmap(_),this._bindTextureDirectly(_,null),this._internalTexturesCache.push(c),c}}function m(e){return function(t,r,i,n,s=null,a=0){let l=e?this._gl.TEXTURE_3D:this._gl.TEXTURE_2D_ARRAY,u=this._getWebGLTextureType(a),h=this._getInternalFormat(i),o=this._getRGBABufferInternalSizedFormat(a,i);this._bindTextureDirectly(l,t,!0),this._unpackFlipY(void 0===n||!!n),this._doNotHandleContextLost||(t._bufferView=r,t.format=i,t.invertY=n,t._compression=s),t.width%4!=0&&this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT,1),s&&r?this._gl.compressedTexImage3D(l,0,this.getCaps().s3tc[s],t.width,t.height,t.depth,0,r):this._gl.texImage3D(l,0,o,t.width,t.height,t.depth,0,h,u,r),t.generateMipMaps&&this._gl.generateMipmap(l),this._bindTextureDirectly(l,null),t.isReady=!0}}d=!0,c.ThinEngine.prototype.updateRawTexture=function(e,t,r,i,n=null,s=0,a=!1){if(!e)return;let l=this._getRGBABufferInternalSizedFormat(s,r,a),u=this._getInternalFormat(r),h=this._getWebGLTextureType(s);this._bindTextureDirectly(this._gl.TEXTURE_2D,e,!0),this._unpackFlipY(void 0===i||!!i),this._doNotHandleContextLost||(e._bufferView=t,e.format=r,e.type=s,e.invertY=i,e._compression=n),e.width%4!=0&&this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT,1),n&&t?this._gl.compressedTexImage2D(this._gl.TEXTURE_2D,0,this.getCaps().s3tc[n],e.width,e.height,0,t):this._gl.texImage2D(this._gl.TEXTURE_2D,0,l,e.width,e.height,0,u,h,t),e.generateMipMaps&&this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(this._gl.TEXTURE_2D,null),e.isReady=!0},c.ThinEngine.prototype.createRawTexture=function(e,t,r,i,n,s,a,l=null,u=0,h=0,o=!1){let _=new T.InternalTexture(this,3);_.baseWidth=t,_.baseHeight=r,_.width=t,_.height=r,_.format=i,_.generateMipMaps=n,_.samplingMode=a,_.invertY=s,_._compression=l,_.type=u,_._useSRGBBuffer=this._getUseSRGBBuffer(o,!n),this._doNotHandleContextLost||(_._bufferView=e),this.updateRawTexture(_,e,i,s,l,u,_._useSRGBBuffer),this._bindTextureDirectly(this._gl.TEXTURE_2D,_,!0);let c=this._getSamplingParameters(a,n);return this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MAG_FILTER,c.mag),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MIN_FILTER,c.min),n&&this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._internalTexturesCache.push(_),_},c.ThinEngine.prototype.createRawCubeTexture=function(e,t,r,i,n,s,a,l=null){let u=this._gl,h=new T.InternalTexture(this,8);h.isCube=!0,h.format=r,h.type=i,this._doNotHandleContextLost||(h._bufferViewArray=e);let o=this._getWebGLTextureType(i),_=this._getInternalFormat(r);if(_===u.RGB&&(_=u.RGBA),o!==u.FLOAT||this._caps.textureFloatLinearFiltering?o!==this._gl.HALF_FLOAT_OES||this._caps.textureHalfFloatLinearFiltering?o!==u.FLOAT||this._caps.textureFloatRender?o!==u.HALF_FLOAT||this._caps.colorBufferFloat||(n=!1,f.Logger.Warn("Render to half float textures is not supported. Mipmap generation forced to false.")):(n=!1,f.Logger.Warn("Render to float textures is not supported. Mipmap generation forced to false.")):(n=!1,a=1,f.Logger.Warn("Half float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.")):(n=!1,a=1,f.Logger.Warn("Float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.")),h.width=t,h.height=t,h.invertY=s,h._compression=l,!this.needPOTTextures||(0,p.IsExponentOfTwo)(h.width)&&(0,p.IsExponentOfTwo)(h.height)||(n=!1),e)this.updateRawCubeTexture(h,e,r,i,s,l);else{let e=this._getRGBABufferInternalSizedFormat(i);this._bindTextureDirectly(u.TEXTURE_CUBE_MAP,h,!0);for(let t=0;t<6;t++)l?u.compressedTexImage2D(u.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,this.getCaps().s3tc[l],h.width,h.height,0,void 0):u.texImage2D(u.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,e,h.width,h.height,0,_,o,null);this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null)}this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,h,!0),e&&n&&this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP);let c=this._getSamplingParameters(a,n);return u.texParameteri(u.TEXTURE_CUBE_MAP,u.TEXTURE_MAG_FILTER,c.mag),u.texParameteri(u.TEXTURE_CUBE_MAP,u.TEXTURE_MIN_FILTER,c.min),u.texParameteri(u.TEXTURE_CUBE_MAP,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(u.TEXTURE_CUBE_MAP,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE),this._bindTextureDirectly(u.TEXTURE_CUBE_MAP,null),h.generateMipMaps=n,h.samplingMode=a,h.isReady=!0,h},c.ThinEngine.prototype.updateRawCubeTexture=function(e,t,r,i,n,s=null,a=0){e._bufferViewArray=t,e.format=r,e.type=i,e.invertY=n,e._compression=s;let l=this._gl,u=this._getWebGLTextureType(i),h=this._getInternalFormat(r),o=this._getRGBABufferInternalSizedFormat(i),_=!1;h===l.RGB&&(h=l.RGBA,_=!0),this._bindTextureDirectly(l.TEXTURE_CUBE_MAP,e,!0),this._unpackFlipY(void 0===n||!!n),e.width%4!=0&&l.pixelStorei(l.UNPACK_ALIGNMENT,1);for(let r=0;r<6;r++){let n=t[r];s?l.compressedTexImage2D(l.TEXTURE_CUBE_MAP_POSITIVE_X+r,a,this.getCaps().s3tc[s],e.width,e.height,0,n):(_&&(n=g(n,e.width,e.height,i)),l.texImage2D(l.TEXTURE_CUBE_MAP_POSITIVE_X+r,a,o,e.width,e.height,0,h,u,n))}(!this.needPOTTextures||(0,p.IsExponentOfTwo)(e.width)&&(0,p.IsExponentOfTwo)(e.height))&&e.generateMipMaps&&0===a&&this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),e.isReady=!0},c.ThinEngine.prototype.createRawCubeTextureFromUrl=function(e,t,r,i,n,s,a,l,u=null,h=null,o=3,_=!1){let c=this._gl,E=this.createRawCubeTexture(null,r,i,n,!s,_,o,null);t?.addPendingData(E),E.url=e,E.isReady=!1,this._internalTexturesCache.push(E);let T=(e,r)=>{t?.removePendingData(E),h&&h(e?e.status+" "+e.statusText:"Failed to parse texture data",r)},f=async e=>{if(!E._hardwareTexture)return;let r=a(e);if(!r)return;let s=r instanceof Promise?await r:r,h=E.width;if(l){let e=this._getWebGLTextureType(n),t=this._getInternalFormat(i),r=this._getRGBABufferInternalSizedFormat(n),a=!1;t===c.RGB&&(t=c.RGBA,a=!0),this._bindTextureDirectly(c.TEXTURE_CUBE_MAP,E,!0),this._unpackFlipY(!1);let u=l(s);for(let i=0;i<u.length;i++){let s=h>>i;for(let l=0;l<6;l++){let h=u[i][l];a&&(h=g(h,s,s,n)),c.texImage2D(l,i,r,s,s,0,t,e,h)}}this._bindTextureDirectly(c.TEXTURE_CUBE_MAP,null)}else this.updateRawCubeTexture(E,s,i,n,_);E.isReady=!0,t?.removePendingData(E),E.onLoadedObservable.notifyObservers(E),E.onLoadedObservable.clear(),u&&u()};return this._loadFile(e,e=>{f(e).catch(e=>{T(void 0,e)})},void 0,t?.offlineProvider,!0,T),E},c.ThinEngine.prototype.createRawTexture2DArray=R(!1),c.ThinEngine.prototype.createRawTexture3D=R(!0),c.ThinEngine.prototype.updateRawTexture2DArray=m(!1),c.ThinEngine.prototype.updateRawTexture3D=m(!0);var A=e.i(31008);let b=!1;b=!0,c.ThinEngine.prototype._readTexturePixelsSync=function(e,t,r,i=-1,n=0,s=null,a=!0,l=!1,u=0,h=0){let o=this._gl;if(!o)throw Error("Engine does not have gl rendering context.");if(!this._dummyFramebuffer){let e=o.createFramebuffer();if(!e)throw Error("Unable to create dummy framebuffer");this._dummyFramebuffer=e}o.bindFramebuffer(o.FRAMEBUFFER,this._dummyFramebuffer),i>-1&&(e.is2DArray||e.is3D)?o.framebufferTextureLayer(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,e._hardwareTexture?.underlyingResource,n,i):i>-1?o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_CUBE_MAP_POSITIVE_X+i,e._hardwareTexture?.underlyingResource,n):o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_2D,e._hardwareTexture?.underlyingResource,n);let _=void 0!==e.type?this._getWebGLTextureType(e.type):o.UNSIGNED_BYTE;return l?s||(s=(0,A.allocateAndCopyTypedBuffer)(e.type,4*t*r)):_===o.UNSIGNED_BYTE?(s||(s=new Uint8Array(4*t*r)),_=o.UNSIGNED_BYTE):(s||(s=new Float32Array(4*t*r)),_=o.FLOAT),a&&this.flushFramebuffer(),o.readPixels(u,h,t,r,o.RGBA,_,s),o.bindFramebuffer(o.FRAMEBUFFER,this._currentFramebuffer),s},c.ThinEngine.prototype._readTexturePixels=function(e,t,r,i=-1,n=0,s=null,a=!0,l=!1,u=0,h=0){return Promise.resolve(this._readTexturePixelsSync(e,t,r,i,n,s,a,l,u,h))},(0,e.i(13794).RegisterEngineDynamicBuffer)();let S=!1;S=!0,c.ThinEngine.prototype._createDepthStencilCubeTexture=function(e,t){let r=new T.InternalTexture(this,12);if(r.isCube=!0,1===this.webGLVersion)return f.Logger.Error("Depth cube texture is not supported by WebGL 1."),r;let i={bilinearFiltering:!1,comparisonFunction:0,generateStencil:!1,...t},n=this._gl;this._bindTextureDirectly(n.TEXTURE_CUBE_MAP,r,!0),this._setupDepthStencilTexture(r,e,i.bilinearFiltering,i.comparisonFunction);for(let t=0;t<6;t++)i.generateStencil?n.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,n.DEPTH24_STENCIL8,e,e,0,n.DEPTH_STENCIL,n.UNSIGNED_INT_24_8,null):n.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,n.DEPTH_COMPONENT24,e,e,0,n.DEPTH_COMPONENT,n.UNSIGNED_INT,null);return this._bindTextureDirectly(n.TEXTURE_CUBE_MAP,null),this._internalTexturesCache.push(r),r},c.ThinEngine.prototype._setCubeMapTextureParams=function(e,t,r){let i=this._gl;i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_MIN_FILTER,t?i.LINEAR_MIPMAP_LINEAR:i.LINEAR),i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),e.samplingMode=t?3:2,t&&this.getCaps().textureMaxLevel&&void 0!==r&&r>0&&(i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_MAX_LEVEL,r),e._maxLodLevel=r),this._bindTextureDirectly(i.TEXTURE_CUBE_MAP,null)},c.ThinEngine.prototype.createCubeTexture=function(e,t,r,i,n=null,s=null,a,l=null,u=!1,h=0,o=0,_=null,c,E=!1,T=null){let d=this._gl;return this.createCubeTextureBase(e,t,r,!!i,n,s,a,l,u,h,o,_,e=>this._bindTextureDirectly(d.TEXTURE_CUBE_MAP,e,!0),(e,t)=>{let r=this.needPOTTextures?(0,p.GetExponentOfTwo)(t[0].width,this._caps.maxCubemapTextureSize):t[0].width,s=[d.TEXTURE_CUBE_MAP_POSITIVE_X,d.TEXTURE_CUBE_MAP_POSITIVE_Y,d.TEXTURE_CUBE_MAP_POSITIVE_Z,d.TEXTURE_CUBE_MAP_NEGATIVE_X,d.TEXTURE_CUBE_MAP_NEGATIVE_Y,d.TEXTURE_CUBE_MAP_NEGATIVE_Z];this._bindTextureDirectly(d.TEXTURE_CUBE_MAP,e,!0),this._unpackFlipY(!1);let l=a?this._getInternalFormat(a,e._useSRGBBuffer):e._useSRGBBuffer?this._glSRGBExtensionValues.SRGB8_ALPHA8:d.RGBA,u=a?this._getInternalFormat(a):d.RGBA;e._useSRGBBuffer&&1===this.webGLVersion&&(u=l);for(let e=0;e<s.length;e++)if(t[e].width!==r||t[e].height!==r){if(this._prepareWorkingCanvas(),!this._workingCanvas||!this._workingContext)return void f.Logger.Warn("Cannot create canvas to resize texture.");this._workingCanvas.width=r,this._workingCanvas.height=r,this._workingContext.drawImage(t[e],0,0,t[e].width,t[e].height,0,0,r,r),d.texImage2D(s[e],0,l,u,d.UNSIGNED_BYTE,this._workingCanvas)}else d.texImage2D(s[e],0,l,u,d.UNSIGNED_BYTE,t[e]);i||d.generateMipmap(d.TEXTURE_CUBE_MAP),this._setCubeMapTextureParams(e,!i),e.width=r,e.height=r,e.isReady=!0,a&&(e.format=a),e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear(),n&&n()},!!E,T)},c.ThinEngine.prototype.generateMipMapsForCubemap=function(e,t=!0){if(e.generateMipMaps){let r=this._gl;this._bindTextureDirectly(r.TEXTURE_CUBE_MAP,e,!0),r.generateMipmap(r.TEXTURE_CUBE_MAP),t&&this._bindTextureDirectly(r.TEXTURE_CUBE_MAP,null)}};var F=e.i(57879);class x{get depthStencilTexture(){return this._depthStencilTexture}setDepthStencilTexture(e,t=!0){t&&this._depthStencilTexture&&this._depthStencilTexture.dispose(),this._depthStencilTexture=e,this._generateDepthBuffer=this._generateStencilBuffer=this._depthStencilTextureWithStencil=!1,e&&(this._generateDepthBuffer=!0,this._generateStencilBuffer=this._depthStencilTextureWithStencil=(0,F.HasStencilAspect)(e.format))}get depthStencilTextureWithStencil(){return this._depthStencilTextureWithStencil}get isCube(){return this._isCube}get isMulti(){return this._isMulti}get is2DArray(){return this.layers>0}get is3D(){return this.depth>0}get size(){return this.width}get width(){return this._size.width??this._size}get height(){return this._size.height??this._size}get layers(){return this._size.layers||0}get depth(){return this._size.depth||0}get texture(){return this._textures?.[0]??null}get textures(){return this._textures}get faceIndices(){return this._faceIndices}get layerIndices(){return this._layerIndices}getBaseArrayLayer(e){if(!this._textures)return -1;let t=this._textures[e],r=this._layerIndices?.[e]??0,i=this._faceIndices?.[e]??0;return t.isCube?6*r+i:t.is3D?0:r}get samples(){return this._samples}setSamples(e,t=!0,r=!1){if(this.samples===e&&!r)return e;let i=this._isMulti?this._engine.updateMultipleRenderTargetTextureSampleCount(this,e,t):this._engine.updateRenderTargetTextureSampleCount(this,e);return this._samples=e,i}resolveMSAATextures(){this.isMulti?this._engine.resolveMultiFramebuffer(this):this._engine.resolveFramebuffer(this)}generateMipMaps(){this._engine._currentRenderTarget===this&&(this.isMulti?this._engine.unBindMultiColorAttachmentFramebuffer(this,!0):this._engine.unBindFramebuffer(this,!0)),this.isMulti?this._engine.generateMipMapsMultiFramebuffer(this):this._engine.generateMipMapsFramebuffer(this)}constructor(e,t,r,i,n){this._textures=null,this._faceIndices=null,this._layerIndices=null,this._samples=1,this._attachments=null,this._generateStencilBuffer=!1,this._generateDepthBuffer=!1,this._depthStencilTextureWithStencil=!1,this.disableAutomaticMSAAResolve=!1,this.resolveMSAAColors=!0,this.resolveMSAADepth=!1,this.resolveMSAAStencil=!1,this.depthReadOnly=!1,this.stencilReadOnly=!1,this._isMulti=e,this._isCube=t,this._size=r,this._engine=i,this._depthStencilTexture=null,this.label=n}setTextures(e){Array.isArray(e)?this._textures=e:e?this._textures=[e]:this._textures=null}setTexture(e,t=0,r=!0){this._textures||(this._textures=[]),this._textures[t]!==e&&(this._textures[t]&&r&&this._textures[t].dispose(),this._textures[t]=e)}setLayerAndFaceIndices(e,t){this._layerIndices=e,this._faceIndices=t}setLayerAndFaceIndex(e=0,t,r){this._layerIndices||(this._layerIndices=[]),this._faceIndices||(this._faceIndices=[]),void 0!==t&&t>=0&&(this._layerIndices[e]=t),void 0!==r&&r>=0&&(this._faceIndices[e]=r)}createDepthStencilTexture(e=0,t=!0,r=!1,i=1,n=14,s){return this._depthStencilTexture?.dispose(),this._depthStencilTextureWithStencil=r,this._depthStencilTextureLabel=s,this._depthStencilTexture=this._engine.createDepthStencilTexture(this._size,{bilinearFiltering:t,comparisonFunction:e,generateStencil:r,isCube:this._isCube,samples:i,depthTextureFormat:n,label:s},this),this._depthStencilTexture}_shareDepth(e){this.shareDepth(e)}shareDepth(e){this._depthStencilTexture&&(e._depthStencilTexture&&e._depthStencilTexture.dispose(),e._depthStencilTexture=this._depthStencilTexture,e._depthStencilTextureWithStencil=this._depthStencilTextureWithStencil,this._depthStencilTexture.incrementReferences())}_swapAndDie(e){this.texture&&this.texture._swapAndDie(e),this._textures=null,this.dispose(!0)}_cloneRenderTargetWrapper(){let e=null;if(this._isMulti){let t=this.textures;if(t&&t.length>0){let r=!1,i=t.length,n=-1,s=t[t.length-1]._source;(14===s||12===s)&&(r=!0,n=t[t.length-1].format,i--);let a=[],l=[],u=[],h=[],o=[],_=[],c=[],E={};for(let e=0;e<i;++e){let r=t[e];a.push(r.samplingMode),l.push(r.type),u.push(r.format),void 0!==E[r.uniqueId]?(h.push(-1),c.push(0)):(E[r.uniqueId]=e,r.is2DArray?(h.push(35866),c.push(r.depth)):r.isCube?(h.push(34067),c.push(0)):r.is3D?(h.push(32879),c.push(r.depth)):(h.push(3553),c.push(0))),this._faceIndices&&o.push(this._faceIndices[e]??0),this._layerIndices&&_.push(this._layerIndices[e]??0)}let T={samplingModes:a,generateMipMaps:t[0].generateMipMaps,generateDepthBuffer:this._generateDepthBuffer,generateStencilBuffer:this._generateStencilBuffer,generateDepthTexture:r,depthTextureFormat:n,types:l,formats:u,textureCount:i,targetTypes:h,faceIndex:o,layerIndex:_,layerCounts:c,label:this.label},f={width:this.width,height:this.height,depth:this.depth};e=this._engine.createMultipleRenderTarget(f,T);for(let r=0;r<i;++r){if(-1!==h[r])continue;let i=E[t[r].uniqueId];e.setTexture(e.textures[i],r)}}}else{let t={};if(t.generateDepthBuffer=this._generateDepthBuffer,t.generateMipMaps=this.texture?.generateMipMaps??!1,t.generateStencilBuffer=this._generateStencilBuffer,t.samplingMode=this.texture?.samplingMode,t.type=this.texture?.type,t.format=this.texture?.format,t.noColorAttachment=!this._textures,t.label=this.label,this.isCube)e=this._engine.createRenderTargetCubeTexture(this.width,t);else{let r={width:this.width,height:this.height,layers:this.is2DArray||this.is3D?this.texture?.depth:void 0};e=this._engine.createRenderTargetTexture(r,t)}e.texture&&(e.texture.isReady=!0)}return e}_swapRenderTargetWrapper(e){if(this._textures&&e._textures)for(let t=0;t<this._textures.length;++t)this._textures[t]._swapAndDie(e._textures[t],!1),e._textures[t].isReady=!0;this._depthStencilTexture&&e._depthStencilTexture&&(this._depthStencilTexture._swapAndDie(e._depthStencilTexture),e._depthStencilTexture.isReady=!0),this._textures=null,this._depthStencilTexture=null}_rebuild(){let e=this._cloneRenderTargetWrapper();if(e){if(this._depthStencilTexture){let t=this._depthStencilTexture.samplingMode,r=this._depthStencilTexture.format;e.createDepthStencilTexture(this._depthStencilTexture._comparisonFunction,2===t||3===t||11===t,this._depthStencilTextureWithStencil,this._depthStencilTexture.samples,r,this._depthStencilTextureLabel)}this.samples>1&&e.setSamples(this.samples),e._swapRenderTargetWrapper(this),e.dispose()}}releaseTextures(){if(this._textures)for(let e=0;e<this._textures.length;++e)this._textures[e].dispose();this._textures=null}dispose(e=!1){e||(this._depthStencilTexture?.dispose(),this._depthStencilTexture=null,this.releaseTextures()),this._engine._releaseRenderTargetWrapper(this)}}class M extends x{setDepthStencilTexture(e,t=!0){if(super.setDepthStencilTexture(e,t),!e)return;let r=this._engine,i=this._context,n=e._hardwareTexture;if(n&&e._autoMSAAManagement&&this._MSAAFramebuffer){let t=r._currentFramebuffer;r._bindUnboundFramebuffer(this._MSAAFramebuffer),i.framebufferRenderbuffer(i.FRAMEBUFFER,(0,F.HasStencilAspect)(e.format)?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,i.RENDERBUFFER,n.getMSAARenderBuffer()),r._bindUnboundFramebuffer(t)}}constructor(e,t,r,i,n){super(e,t,r,i),this._framebuffer=null,this._depthStencilBuffer=null,this._MSAAFramebuffer=null,this._colorTextureArray=null,this._depthStencilTextureArray=null,this._disposeOnlyFramebuffers=!1,this._currentLOD=0,this._context=n}_cloneRenderTargetWrapper(){let e;return this._colorTextureArray&&this._depthStencilTextureArray?(e=this._engine.createMultiviewRenderTargetTexture(this.width,this.height)).texture.isReady=!0:e=super._cloneRenderTargetWrapper(),e}_swapRenderTargetWrapper(e){super._swapRenderTargetWrapper(e),e._framebuffer=this._framebuffer,e._depthStencilBuffer=this._depthStencilBuffer,e._MSAAFramebuffer=this._MSAAFramebuffer,e._colorTextureArray=this._colorTextureArray,e._depthStencilTextureArray=this._depthStencilTextureArray,this._framebuffer=this._depthStencilBuffer=this._MSAAFramebuffer=this._colorTextureArray=this._depthStencilTextureArray=null}createDepthStencilTexture(e=0,t=!0,r=!1,i=1,n=14,s){if(this._depthStencilBuffer){let e=this._engine,t=e._currentFramebuffer,r=this._context;e._bindUnboundFramebuffer(this._framebuffer),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,null),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.RENDERBUFFER,null),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.STENCIL_ATTACHMENT,r.RENDERBUFFER,null),e._bindUnboundFramebuffer(t),r.deleteRenderbuffer(this._depthStencilBuffer),this._depthStencilBuffer=null}return super.createDepthStencilTexture(e,t,r,i,n,s)}shareDepth(e){super.shareDepth(e);let t=this._context,r=this._depthStencilBuffer,i=e._MSAAFramebuffer||e._framebuffer,n=this._engine;e._depthStencilBuffer&&e._depthStencilBuffer!==r&&t.deleteRenderbuffer(e._depthStencilBuffer),e._depthStencilBuffer=r;let s=e._generateStencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT;n._bindUnboundFramebuffer(i),t.framebufferRenderbuffer(t.FRAMEBUFFER,s,t.RENDERBUFFER,r),n._bindUnboundFramebuffer(null)}_bindTextureRenderTarget(e,t=0,r,i=0){let n,s=e._hardwareTexture;if(!s)return;let a=this._framebuffer,l=this._engine,u=l._currentFramebuffer;if(l._bindUnboundFramebuffer(a),l.webGLVersion>1){let a=this._context;n=a["COLOR_ATTACHMENT"+t],e.is2DArray||e.is3D?(r=r??this.layerIndices?.[t]??0,a.framebufferTextureLayer(a.FRAMEBUFFER,n,s.underlyingResource,i,r)):e.isCube?(r=r??this.faceIndices?.[t]??0,a.framebufferTexture2D(a.FRAMEBUFFER,n,a.TEXTURE_CUBE_MAP_POSITIVE_X+r,s.underlyingResource,i)):a.framebufferTexture2D(a.FRAMEBUFFER,n,a.TEXTURE_2D,s.underlyingResource,i)}else{let e=this._context;n=e["COLOR_ATTACHMENT"+t+"_WEBGL"];let a=void 0!==r?e.TEXTURE_CUBE_MAP_POSITIVE_X+r:e.TEXTURE_2D;e.framebufferTexture2D(e.FRAMEBUFFER,n,a,s.underlyingResource,i)}if(e._autoMSAAManagement&&this._MSAAFramebuffer){let e=this._context;l._bindUnboundFramebuffer(this._MSAAFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,s.getMSAARenderBuffer())}l._bindUnboundFramebuffer(u)}setTexture(e,t=0,r=!0){super.setTexture(e,t,r),this._bindTextureRenderTarget(e,t)}setLayerAndFaceIndices(e,t){if(super.setLayerAndFaceIndices(e,t),!this.textures||!this.layerIndices||!this.faceIndices)return;let r=this._attachments?.length??this.textures.length;for(let e=0;e<r;e++){let t=this.textures[e];t&&(t.is2DArray||t.is3D?this._bindTextureRenderTarget(t,e,this.layerIndices[e]):t.isCube?this._bindTextureRenderTarget(t,e,this.faceIndices[e]):this._bindTextureRenderTarget(t,e))}}setLayerAndFaceIndex(e=0,t,r){if(super.setLayerAndFaceIndex(e,t,r),!this.textures||!this.layerIndices||!this.faceIndices)return;let i=this.textures[e];i.is2DArray||i.is3D?this._bindTextureRenderTarget(this.textures[e],e,this.layerIndices[e]):i.isCube&&this._bindTextureRenderTarget(this.textures[e],e,this.faceIndices[e])}resolveMSAATextures(){let e=this._engine,t=e._currentFramebuffer;e._bindUnboundFramebuffer(this._MSAAFramebuffer),super.resolveMSAATextures(),e._bindUnboundFramebuffer(t)}dispose(e=this._disposeOnlyFramebuffers){let t=this._context;!e&&(this._colorTextureArray&&(this._context.deleteTexture(this._colorTextureArray),this._colorTextureArray=null),this._depthStencilTextureArray&&(this._context.deleteTexture(this._depthStencilTextureArray),this._depthStencilTextureArray=null)),this._framebuffer&&(t.deleteFramebuffer(this._framebuffer),this._framebuffer=null),this._depthStencilBuffer&&(t.deleteRenderbuffer(this._depthStencilBuffer),this._depthStencilBuffer=null),this._MSAAFramebuffer&&(t.deleteFramebuffer(this._MSAAFramebuffer),this._MSAAFramebuffer=null),super.dispose(e)}}let U=!1;U=!0,c.ThinEngine.prototype._createHardwareRenderTargetWrapper=function(e,t,r){let i=new M(e,t,r,this,this._gl);return this._renderTargetWrapperCache.push(i),i},c.ThinEngine.prototype.createRenderTargetTexture=function(e,t){let r,i,n=this._createHardwareRenderTargetWrapper(!1,!1,e),s=!0,a=!1,l=!1,u=1;void 0!==t&&"object"==typeof t&&(s=t.generateDepthBuffer??!0,a=!!t.generateStencilBuffer,l=!!t.noColorAttachment,r=t.colorAttachment,u=t.samples??1,i=t.label);let h=r||(l?null:this._createInternalTexture(e,t,!0,5)),o=e.width||e,_=e.height||e,c=this._currentFramebuffer,E=this._gl,T=E.createFramebuffer();if(this._bindUnboundFramebuffer(T),n._depthStencilBuffer=this._setupFramebufferDepthAttachments(a,s,o,_),!h||h.is2DArray||h.is3D||E.framebufferTexture2D(E.FRAMEBUFFER,E.COLOR_ATTACHMENT0,E.TEXTURE_2D,h._hardwareTexture.underlyingResource,0),this._bindUnboundFramebuffer(c),n.label=i??"RenderTargetWrapper",n._framebuffer=T,n._generateDepthBuffer=s,n._generateStencilBuffer=a,n.setTextures(h),r){if(n._samples=r.samples,r.samples>1){let e=r._hardwareTexture.getMSAARenderBuffer(0);n._MSAAFramebuffer=E.createFramebuffer(),this._bindUnboundFramebuffer(n._MSAAFramebuffer),E.framebufferRenderbuffer(E.FRAMEBUFFER,E.COLOR_ATTACHMENT0,E.RENDERBUFFER,e),this._bindUnboundFramebuffer(null)}}else this.updateRenderTargetTextureSampleCount(n,u);return n},c.ThinEngine.prototype._createDepthStencilTexture=function(e,t,r){let i=this._gl,n=e.layers||0,s=e.depth||0,a=i.TEXTURE_2D;0!==n?a=i.TEXTURE_2D_ARRAY:0!==s&&(a=i.TEXTURE_3D);let l=new T.InternalTexture(this,12);if(l.label=t.label,!this._caps.depthTextureExtension)return f.Logger.Error("Depth texture is not supported by your browser or hardware."),l;let u={bilinearFiltering:!1,comparisonFunction:0,generateStencil:!1,...t};if(this._bindTextureDirectly(a,l,!0),this._setupDepthStencilTexture(l,e,0!==u.comparisonFunction&&u.bilinearFiltering,u.comparisonFunction,u.samples),void 0!==u.depthTextureFormat){if(15!==u.depthTextureFormat&&16!==u.depthTextureFormat&&17!==u.depthTextureFormat&&13!==u.depthTextureFormat&&14!==u.depthTextureFormat&&18!==u.depthTextureFormat)return f.Logger.Error(`Depth texture ${u.depthTextureFormat} format is not supported.`),l;l.format=u.depthTextureFormat}else l.format=u.generateStencil?13:16;let h=(0,F.HasStencilAspect)(l.format),o=this._getWebGLTextureTypeFromDepthTextureFormat(l.format),_=h?i.DEPTH_STENCIL:i.DEPTH_COMPONENT,c=this._getInternalFormatFromDepthTextureFormat(l.format,!0,h);return l.is2DArray?i.texImage3D(a,0,c,l.width,l.height,n,0,_,o,null):l.is3D?i.texImage3D(a,0,c,l.width,l.height,s,0,_,o,null):i.texImage2D(a,0,c,l.width,l.height,0,_,o,null),this._bindTextureDirectly(a,null),this._internalTexturesCache.push(l),r._depthStencilBuffer&&(i.deleteRenderbuffer(r._depthStencilBuffer),r._depthStencilBuffer=null),this._bindUnboundFramebuffer(r._MSAAFramebuffer??r._framebuffer),r._generateStencilBuffer=h,r._depthStencilTextureWithStencil=h,r._depthStencilBuffer=this._setupFramebufferDepthAttachments(r._generateStencilBuffer,r._generateDepthBuffer,r.width,r.height,r.samples,l.format),this._bindUnboundFramebuffer(null),l},c.ThinEngine.prototype.updateRenderTargetTextureSampleCount=function(e,t){if(this.webGLVersion<2||!e)return 1;if(e.samples===t)return t;let r=this._gl;t=Math.min(t,this.getCaps().maxMSAASamples),e._depthStencilBuffer&&(r.deleteRenderbuffer(e._depthStencilBuffer),e._depthStencilBuffer=null),e._MSAAFramebuffer&&(r.deleteFramebuffer(e._MSAAFramebuffer),e._MSAAFramebuffer=null);let i=e.texture?._hardwareTexture;if(i?.releaseMSAARenderBuffers(),e.texture&&t>1&&"function"==typeof r.renderbufferStorageMultisample){let n=r.createFramebuffer();if(!n)throw Error("Unable to create multi sampled framebuffer");e._MSAAFramebuffer=n,this._bindUnboundFramebuffer(e._MSAAFramebuffer);let s=this._createRenderBuffer(e.texture.width,e.texture.height,t,-1,this._getRGBABufferInternalSizedFormat(e.texture.type,e.texture.format,e.texture._useSRGBBuffer),r.COLOR_ATTACHMENT0,!1);if(!s)throw Error("Unable to create multi sampled framebuffer");i?.addMSAARenderBuffer(s)}this._bindUnboundFramebuffer(e._MSAAFramebuffer??e._framebuffer),e.texture&&(e.texture.samples=t),e._samples=t;let n=e._depthStencilTexture?e._depthStencilTexture.format:void 0;return e._depthStencilBuffer=this._setupFramebufferDepthAttachments(e._generateStencilBuffer,e._generateDepthBuffer,e.width,e.height,t,n),this._bindUnboundFramebuffer(null),t},c.ThinEngine.prototype._setupDepthStencilTexture=function(e,t,r,i,n=1){let s=t.width??t,a=t.height??t,l=t.layers||0,u=t.depth||0;e.baseWidth=s,e.baseHeight=a,e.width=s,e.height=a,e.is2DArray=l>0,e.depth=l||u,e.isReady=!0,e.samples=n,e.generateMipMaps=!1,e.samplingMode=r?2:1,e.type=0,e._comparisonFunction=i;let h=this._gl,o=this._getTextureTarget(e),_=this._getSamplingParameters(e.samplingMode,!1);h.texParameteri(o,h.TEXTURE_MAG_FILTER,_.mag),h.texParameteri(o,h.TEXTURE_MIN_FILTER,_.min),h.texParameteri(o,h.TEXTURE_WRAP_S,h.CLAMP_TO_EDGE),h.texParameteri(o,h.TEXTURE_WRAP_T,h.CLAMP_TO_EDGE),this.webGLVersion>1&&(0===i?(h.texParameteri(o,h.TEXTURE_COMPARE_FUNC,515),h.texParameteri(o,h.TEXTURE_COMPARE_MODE,h.NONE)):(h.texParameteri(o,h.TEXTURE_COMPARE_FUNC,i),h.texParameteri(o,h.TEXTURE_COMPARE_MODE,h.COMPARE_REF_TO_TEXTURE)))};let D=!1;D=!0,c.ThinEngine.prototype.setDepthStencilTexture=function(e,t,r,i){void 0!==e&&(t&&(this._boundUniforms[e]=t),r&&r.depthStencilTexture?this._setTexture(e,r,!1,!0,i):this._setTexture(e,null,void 0,void 0,i))};let P=!1;P=!0,c.ThinEngine.prototype.createRenderTargetCubeTexture=function(e,t){let r=this._createHardwareRenderTargetWrapper(!1,!0,e),i={generateMipMaps:!0,generateDepthBuffer:!0,generateStencilBuffer:!1,type:0,samplingMode:3,format:5,...t};i.generateStencilBuffer=i.generateDepthBuffer&&i.generateStencilBuffer,(1!==i.type||this._caps.textureFloatLinearFiltering)&&(2!==i.type||this._caps.textureHalfFloatLinearFiltering)||(i.samplingMode=1);let n=this._gl,s=new T.InternalTexture(this,5);this._bindTextureDirectly(n.TEXTURE_CUBE_MAP,s,!0);let a=this._getSamplingParameters(i.samplingMode,i.generateMipMaps);1!==i.type||this._caps.textureFloat||(i.type=0,f.Logger.Warn("Float textures are not supported. Cube render target forced to TEXTURETYPE_UNESIGNED_BYTE type")),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_MAG_FILTER,a.mag),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_MIN_FILTER,a.min),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE);for(let t=0;t<6;t++)n.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,this._getRGBABufferInternalSizedFormat(i.type,i.format),e,e,0,this._getInternalFormat(i.format),this._getWebGLTextureType(i.type),null);let l=n.createFramebuffer();return this._bindUnboundFramebuffer(l),r._depthStencilBuffer=this._setupFramebufferDepthAttachments(i.generateStencilBuffer,i.generateDepthBuffer,e,e),i.generateMipMaps&&n.generateMipmap(n.TEXTURE_CUBE_MAP),this._bindTextureDirectly(n.TEXTURE_CUBE_MAP,null),this._bindUnboundFramebuffer(null),r._framebuffer=l,r._generateDepthBuffer=i.generateDepthBuffer,r._generateStencilBuffer=i.generateStencilBuffer,s.width=e,s.height=e,s.isReady=!0,s.isCube=!0,s.samples=1,s.generateMipMaps=i.generateMipMaps,s.samplingMode=i.samplingMode,s.type=i.type,s.format=i.format,this._internalTexturesCache.push(s),r.setTextures(s),r};var y=e.i(12247),C=e.i(68061);let B=!1;B=!0,c.ThinEngine.prototype.createPrefilteredCubeTexture=function(t,r,i,n,s=null,a=null,l,u=null,h=!0){let o=async t=>{if(!t){s&&s(null);return}let a=t.texture;if(h?t.info.sphericalPolynomial&&(a._sphericalPolynomial=t.info.sphericalPolynomial):a._sphericalPolynomial=a._sphericalPolynomial??new y.SphericalPolynomial,a._source=9,this.getCaps().textureLOD){s&&s(a);return}let l=this._gl,u=t.width;if(!u)return;let{DDSTools:o}=await e.A(690),_=[];for(let e=0;e<3;e++){let s=Math.log2(u)*i+n,h=Math.round(Math.min(Math.max(n+(s-n)*(1-e/2),0),s)),c=new T.InternalTexture(this,2);if(c.type=a.type,c.format=a.format,c.width=Math.pow(2,Math.max(Math.log2(u)-h,0)),c.height=c.width,c.isCube=!0,c._cachedWrapU=0,c._cachedWrapV=0,this._bindTextureDirectly(l.TEXTURE_CUBE_MAP,c,!0),c.samplingMode=2,l.texParameteri(l.TEXTURE_CUBE_MAP,l.TEXTURE_MAG_FILTER,l.LINEAR),l.texParameteri(l.TEXTURE_CUBE_MAP,l.TEXTURE_MIN_FILTER,l.LINEAR),l.texParameteri(l.TEXTURE_CUBE_MAP,l.TEXTURE_WRAP_S,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_CUBE_MAP,l.TEXTURE_WRAP_T,l.CLAMP_TO_EDGE),t.isDDS){let e=t.info,r=t.data;this._unpackFlipY(e.isCompressed),o.UploadDDSLevels(this,c,r,e,!0,6,h)}else f.Logger.Warn("DDS is the only prefiltered cube map supported so far.");this._bindTextureDirectly(l.TEXTURE_CUBE_MAP,null);let E=new C.BaseTexture(r);E._isCube=!0,E._texture=c,c.isReady=!0,_.push(E)}a._lodTextureHigh=_[2],a._lodTextureMid=_[1],a._lodTextureLow=_[0],s&&s(a)};return this.createCubeTexture(t,r,null,!1,o,a,l,u,h,i,n)};var I=e.i(42424);let L=!1;L=!0,c.ThinEngine.prototype.createUniformBuffer=function(e,t){let r=this._gl.createBuffer();if(!r)throw Error("Unable to create uniform buffer");let i=new I.WebGLDataBuffer(r);return this.bindUniformBuffer(i),e instanceof Float32Array?this._gl.bufferData(this._gl.UNIFORM_BUFFER,e,this._gl.STATIC_DRAW):this._gl.bufferData(this._gl.UNIFORM_BUFFER,new Float32Array(e),this._gl.STATIC_DRAW),this.bindUniformBuffer(null),i.references=1,i},c.ThinEngine.prototype.createDynamicUniformBuffer=function(e,t){let r=this._gl.createBuffer();if(!r)throw Error("Unable to create dynamic uniform buffer");let i=new I.WebGLDataBuffer(r);return this.bindUniformBuffer(i),e instanceof Float32Array?this._gl.bufferData(this._gl.UNIFORM_BUFFER,e,this._gl.DYNAMIC_DRAW):this._gl.bufferData(this._gl.UNIFORM_BUFFER,new Float32Array(e),this._gl.DYNAMIC_DRAW),this.bindUniformBuffer(null),i.references=1,i},c.ThinEngine.prototype.updateUniformBuffer=function(e,t,r,i){this.bindUniformBuffer(e),void 0===r&&(r=0),void 0===i?t instanceof Float32Array?this._gl.bufferSubData(this._gl.UNIFORM_BUFFER,r,t):this._gl.bufferSubData(this._gl.UNIFORM_BUFFER,r,new Float32Array(t)):t instanceof Float32Array?this._gl.bufferSubData(this._gl.UNIFORM_BUFFER,0,t.subarray(r,r+i)):this._gl.bufferSubData(this._gl.UNIFORM_BUFFER,0,new Float32Array(t).subarray(r,r+i)),this.bindUniformBuffer(null)},c.ThinEngine.prototype.bindUniformBuffer=function(e){this._gl.bindBuffer(this._gl.UNIFORM_BUFFER,e?e.underlyingResource:null)},c.ThinEngine.prototype.bindUniformBufferBase=function(e,t,r){this._gl.bindBufferBase(this._gl.UNIFORM_BUFFER,t,e?e.underlyingResource:null)},c.ThinEngine.prototype.bindUniformBlock=function(e,t,r){let i=e.program,n=this._gl.getUniformBlockIndex(i,t);0xffffffff!==n&&this._gl.uniformBlockBinding(i,n,r)};var O=e.i(75865),X=e.i(20307);let N=!1;N=!0,X.AbstractEngine.prototype.displayLoadingUI=function(){if(!(0,O.IsWindowObjectExist)())return;let e=this.loadingScreen;e&&e.displayLoadingUI()},X.AbstractEngine.prototype.hideLoadingUI=function(){if(!(0,O.IsWindowObjectExist)())return;let e=this._loadingScreen;e&&e.hideLoadingUI()},Object.defineProperty(X.AbstractEngine.prototype,"loadingScreen",{get:function(){return!this._loadingScreen&&this._renderingCanvas&&(this._loadingScreen=X.AbstractEngine.DefaultLoadingScreenFactory(this._renderingCanvas)),this._loadingScreen},set:function(e){this._loadingScreen=e},enumerable:!0,configurable:!0}),Object.defineProperty(X.AbstractEngine.prototype,"loadingUIText",{set:function(e){this.loadingScreen.loadingUIText=e},enumerable:!0,configurable:!0}),Object.defineProperty(X.AbstractEngine.prototype,"loadingUIBackgroundColor",{set:function(e){this.loadingScreen.loadingUIBackgroundColor=e},enumerable:!0,configurable:!0});let w=!1;function v(){w||(w=!0,X.AbstractEngine.prototype.getInputElement=function(){return this._renderingCanvas},X.AbstractEngine.prototype.getRenderingCanvasClientRect=function(){return this._renderingCanvas?this._renderingCanvas.getBoundingClientRect():null},X.AbstractEngine.prototype.getInputElementClientRect=function(){return this._renderingCanvas?this.getInputElement().getBoundingClientRect():null},X.AbstractEngine.prototype.getAspectRatio=function(e,t=!1){let r=e.viewport;return this.getRenderWidth(t)*r.width/(this.getRenderHeight(t)*r.height)},X.AbstractEngine.prototype.getScreenAspectRatio=function(){return this.getRenderWidth(!0)/this.getRenderHeight(!0)},X.AbstractEngine.prototype._verifyPointerLock=function(){this._onPointerLockChange?.()})}v();let G=!1;G=!0,X.AbstractEngine.prototype.getInputElement=function(){return this._renderingCanvas},X.AbstractEngine.prototype.getDepthFunction=function(){return this._depthCullingState.depthFunc},X.AbstractEngine.prototype.setDepthFunction=function(e){this._depthCullingState.depthFunc=e},X.AbstractEngine.prototype.setDepthFunctionToGreater=function(){this.setDepthFunction(516)},X.AbstractEngine.prototype.setDepthFunctionToGreaterOrEqual=function(){this.setDepthFunction(518)},X.AbstractEngine.prototype.setDepthFunctionToLess=function(){this.setDepthFunction(513)},X.AbstractEngine.prototype.setDepthFunctionToLessOrEqual=function(){this.setDepthFunction(515)},X.AbstractEngine.prototype.getDepthWrite=function(){return this._depthCullingState.depthMask},X.AbstractEngine.prototype.setDepthWrite=function(e){this._depthCullingState.depthMask=e},X.AbstractEngine.prototype.setAlphaConstants=function(e,t,r,i){this._alphaState.setAlphaBlendConstants(e,t,r,i)},X.AbstractEngine.prototype.getAlphaMode=function(e=0){return this._alphaMode[e]},X.AbstractEngine.prototype.getAlphaEquation=function(e=0){return this._alphaEquation[e]};let k=!1;k=!0,X.AbstractEngine.prototype.getStencilBuffer=function(){return this._stencilState.stencilTest},X.AbstractEngine.prototype.setStencilBuffer=function(e){this._stencilState.stencilTest=e},X.AbstractEngine.prototype.getStencilMask=function(){return this._stencilState.stencilMask},X.AbstractEngine.prototype.setStencilMask=function(e){this._stencilState.stencilMask=e},X.AbstractEngine.prototype.getStencilFunction=function(){return this._stencilState.stencilFunc},X.AbstractEngine.prototype.getStencilBackFunction=function(){return this._stencilState.stencilBackFunc},X.AbstractEngine.prototype.getStencilFunctionReference=function(){return this._stencilState.stencilFuncRef},X.AbstractEngine.prototype.getStencilFunctionMask=function(){return this._stencilState.stencilFuncMask},X.AbstractEngine.prototype.setStencilFunction=function(e){this._stencilState.stencilFunc=e},X.AbstractEngine.prototype.setStencilBackFunction=function(e){this._stencilState.stencilBackFunc=e},X.AbstractEngine.prototype.setStencilFunctionReference=function(e){this._stencilState.stencilFuncRef=e},X.AbstractEngine.prototype.setStencilFunctionMask=function(e){this._stencilState.stencilFuncMask=e},X.AbstractEngine.prototype.getStencilOperationFail=function(){return this._stencilState.stencilOpStencilFail},X.AbstractEngine.prototype.getStencilBackOperationFail=function(){return this._stencilState.stencilBackOpStencilFail},X.AbstractEngine.prototype.getStencilOperationDepthFail=function(){return this._stencilState.stencilOpDepthFail},X.AbstractEngine.prototype.getStencilBackOperationDepthFail=function(){return this._stencilState.stencilBackOpDepthFail},X.AbstractEngine.prototype.getStencilOperationPass=function(){return this._stencilState.stencilOpStencilDepthPass},X.AbstractEngine.prototype.getStencilBackOperationPass=function(){return this._stencilState.stencilBackOpStencilDepthPass},X.AbstractEngine.prototype.setStencilOperationFail=function(e){this._stencilState.stencilOpStencilFail=e},X.AbstractEngine.prototype.setStencilBackOperationFail=function(e){this._stencilState.stencilBackOpStencilFail=e},X.AbstractEngine.prototype.setStencilOperationDepthFail=function(e){this._stencilState.stencilOpDepthFail=e},X.AbstractEngine.prototype.setStencilBackOperationDepthFail=function(e){this._stencilState.stencilBackOpDepthFail=e},X.AbstractEngine.prototype.setStencilOperationPass=function(e){this._stencilState.stencilOpStencilDepthPass=e},X.AbstractEngine.prototype.setStencilBackOperationPass=function(e){this._stencilState.stencilBackOpStencilDepthPass=e},X.AbstractEngine.prototype.cacheStencilState=function(){this._cachedStencilBuffer=this.getStencilBuffer(),this._cachedStencilFunction=this.getStencilFunction(),this._cachedStencilMask=this.getStencilMask(),this._cachedStencilOperationPass=this.getStencilOperationPass(),this._cachedStencilOperationFail=this.getStencilOperationFail(),this._cachedStencilOperationDepthFail=this.getStencilOperationDepthFail(),this._cachedStencilReference=this.getStencilFunctionReference()},X.AbstractEngine.prototype.restoreStencilState=function(){this.setStencilFunction(this._cachedStencilFunction),this.setStencilMask(this._cachedStencilMask),this.setStencilBuffer(this._cachedStencilBuffer),this.setStencilOperationPass(this._cachedStencilOperationPass),this.setStencilOperationFail(this._cachedStencilOperationFail),this.setStencilOperationDepthFail(this._cachedStencilOperationDepthFail),this.setStencilFunctionReference(this._cachedStencilReference)};var W=e.i(9768);(0,W.RegisterAbstractEngineRenderPass)();let H=!1;H=!0,X.AbstractEngine.prototype.createDepthStencilTexture=function(e,t,r){if(!t.isCube)return this._createDepthStencilTexture(e,t,r);{let r=e.width||e;return this._createDepthStencilCubeTexture(r,t)}};let Y=!1;Y=!0,X.AbstractEngine.prototype._loadFileAsync=async function(e,t,r){return await new Promise((i,n)=>{this._loadFile(e,e=>{i(e)},void 0,t,r,(e,t)=>{n(t)})})};var V=e.i(34736);X.AbstractEngine.GetCompatibleTextureLoader=V._GetCompatibleTextureLoader;let z=!1;z=!0,c.ThinEngine.prototype.enableScissor=function(e,t,r,i){let n=this._gl;n.enable(n.SCISSOR_TEST),n.scissor(e,t,r,i)},c.ThinEngine.prototype.disableScissor=function(){let e=this._gl;e.disable(e.SCISSOR_TEST)},e.s([],99815),e.i(99815);var q=e.i(47867),K=c,j=e.i(85240);class Q{constructor(e=30){this._enabled=!0,this._rollingFrameTime=new Z(e)}sampleFrame(e=j.PrecisionDate.Now){if(this._enabled){if(null!=this._lastFrameTimeMs){let t=e-this._lastFrameTimeMs;this._rollingFrameTime.add(t)}this._lastFrameTimeMs=e}}get averageFrameTime(){return this._rollingFrameTime.average}get averageFrameTimeVariance(){return this._rollingFrameTime.variance}get instantaneousFrameTime(){return this._rollingFrameTime.history(0)}get averageFPS(){return 1e3/this._rollingFrameTime.average}get instantaneousFPS(){let e=this._rollingFrameTime.history(0);return 0===e?0:1e3/e}get isSaturated(){return this._rollingFrameTime.isSaturated()}enable(){this._enabled=!0}disable(){this._enabled=!1,this._lastFrameTimeMs=null}get isEnabled(){return this._enabled}reset(){this._lastFrameTimeMs=null,this._rollingFrameTime.reset()}}class Z{constructor(e){this._samples=Array(e),this.reset()}add(e){let t;if(this.isSaturated()){let e=this._samples[this._pos];t=e-this.average,this.average-=t/(this._sampleCount-1),this._m2-=t*(e-this.average)}else this._sampleCount++;t=e-this.average,this.average+=t/this._sampleCount,this._m2+=t*(e-this.average),this.variance=this._m2/(this._sampleCount-1),this._samples[this._pos]=e,this._pos++,this._pos%=this._samples.length}history(e){if(e>=this._sampleCount||e>=this._samples.length)return 0;let t=this._wrapPosition(this._pos-1);return this._samples[this._wrapPosition(t-e)]}isSaturated(){return this._sampleCount>=this._samples.length}reset(){this.average=0,this.variance=0,this._sampleCount=0,this._pos=0,this._m2=0}_wrapPosition(e){let t=this._samples.length;return(e%t+t)%t}}var $=e.i(69178);function J(e){return Number.isFinite(e.ascent)&&Number.isFinite(e.height)&&Number.isFinite(e.descent)&&e.height>0}async function ee(e,t,r){return await new Promise((i,n)=>{let s=new Image;s.onload=()=>{s.decode().then(()=>{e.createImageBitmap(s,r).then(e=>{i(e)})})},s.onerror=()=>{n(`Error loading image ${s.src}`)},s.src=t})}function et(e){if(e.requestPointerLock){let t=e.requestPointerLock();t instanceof Promise?t.then(()=>{e.focus()}).catch(()=>{}):e.focus()}}var er=e.i(3367),ei=e.i(4775),en=e.i(54670);class es extends K.ThinEngine{static get NpmPackage(){return X.AbstractEngine.NpmPackage}static get Version(){return X.AbstractEngine.Version}static get Instances(){return q.EngineStore.Instances}static get LastCreatedEngine(){return q.EngineStore.LastCreatedEngine}static get LastCreatedScene(){return q.EngineStore.LastCreatedScene}static DefaultLoadingScreenFactory(e){return X.AbstractEngine.DefaultLoadingScreenFactory(e)}get _supportsHardwareTextureRescaling(){return!!es._RescalePostProcessFactory}_measureFps(){this._performanceMonitor.sampleFrame(),this._fps=this._performanceMonitor.averageFPS,this._deltaTime=this._performanceMonitor.instantaneousFrameTime||0}get performanceMonitor(){return this._performanceMonitor}constructor(e,t,r,i=!1){if(v(),(0,W.RegisterAbstractEngineRenderPass)(),super(e,t,r,i),this._performanceMonitor=new Q,this._drawCalls=new er.PerfCounter,!e)return;this._features.supportRenderPasses=!0}_initGLContext(){super._initGLContext(),this._rescalePostProcess=null}_sharedInit(e){var t,r;let i;super._sharedInit(e),t=this,r=this._creationOptions,t._onCanvasFocus=()=>{t.onCanvasFocusObservable.notifyObservers(t)},t._onCanvasBlur=()=>{t.onCanvasBlurObservable.notifyObservers(t)},t._onCanvasContextMenu=e=>{t.disableContextMenu&&e.preventDefault()},e.addEventListener("focus",t._onCanvasFocus),e.addEventListener("blur",t._onCanvasBlur),e.addEventListener("contextmenu",t._onCanvasContextMenu),t._onBlur=()=>{t.disablePerformanceMonitorInBackground&&t.performanceMonitor.disable(),t._windowIsBackground=!0},t._onFocus=()=>{t.disablePerformanceMonitorInBackground&&t.performanceMonitor.enable(),t._windowIsBackground=!1},t._onCanvasPointerOut=r=>{document.elementFromPoint(r.clientX,r.clientY)!==e&&t.onCanvasPointerOutObservable.notifyObservers(r)},(i=t.getHostWindow())&&"function"==typeof i.addEventListener&&(i.addEventListener("blur",t._onBlur),i.addEventListener("focus",t._onFocus)),e.addEventListener("pointerout",t._onCanvasPointerOut),!r.doNotHandleTouchAction&&e&&e.setAttribute&&(e.setAttribute("touch-action","none"),e.style.touchAction="none",e.style.webkitTapHighlightColor="transparent"),!X.AbstractEngine.audioEngine&&r.audioEngine&&X.AbstractEngine.AudioEngineFactory&&(X.AbstractEngine.audioEngine=X.AbstractEngine.AudioEngineFactory(t.getRenderingCanvas(),t.getAudioContext(),t.getAudioDestination())),(0,O.IsDocumentAvailable)()&&(t._onFullscreenChange=()=>{t.isFullscreen=!!document.fullscreenElement,t.isFullscreen&&t._pointerLockRequested&&e&&et(e)},document.addEventListener("fullscreenchange",t._onFullscreenChange,!1),document.addEventListener("webkitfullscreenchange",t._onFullscreenChange,!1),t._onPointerLockChange=()=>{t.isPointerLock=document.pointerLockElement===e},document.addEventListener("pointerlockchange",t._onPointerLockChange,!1),document.addEventListener("webkitpointerlockchange",t._onPointerLockChange,!1)),t.enableOfflineSupport=void 0!==X.AbstractEngine.OfflineProviderFactory,t._deterministicLockstep=!!r.deterministicLockstep,t._lockstepMaxSteps=r.lockstepMaxSteps||0,t._timeStep=r.timeStep||1/60}resizeImageBitmap(e,t,r){let i=this.createCanvas(t,r).getContext("2d");if(!i)throw Error("Unable to get 2d context for resizeImageBitmap");return i.drawImage(e,0,0),i.getImageData(0,0,t,r).data}async _createImageBitmapFromSource(e,t){return await ee(this,e,t)}switchFullscreen(e){this.isFullscreen?this.exitFullscreen():this.enterFullscreen(e)}enterFullscreen(e){if(!this.isFullscreen){var t;let r;this._pointerLockRequested=e,this._renderingCanvas&&(r=(t=this._renderingCanvas).requestFullscreen||t.webkitRequestFullscreen)&&r.call(t)}}exitFullscreen(){let e;this.isFullscreen&&(e=document,document.exitFullscreen?document.exitFullscreen():e.webkitCancelFullScreen&&e.webkitCancelFullScreen())}setDitheringState(e){e?this._gl.enable(this._gl.DITHER):this._gl.disable(this._gl.DITHER)}setRasterizerState(e){e?this._gl.disable(this._gl.RASTERIZER_DISCARD):this._gl.enable(this._gl.RASTERIZER_DISCARD)}setDirectViewport(e,t,r,i){let n=this._cachedViewport;return this._cachedViewport=null,this._viewport(e,t,r,i),n}scissorClear(e,t,r,i,n){this.enableScissor(e,t,r,i),this.clear(n,!0,!0,!0),this.disableScissor()}getVertexShaderSource(e){let t=this._gl.getAttachedShaders(e);return t?this._gl.getShaderSource(t[0]):null}getFragmentShaderSource(e){let t=this._gl.getAttachedShaders(e);return t?this._gl.getShaderSource(t[1]):null}set framebufferDimensionsObject(e){this._framebufferDimensionsObject=e,this._framebufferDimensionsObject&&this.onResizeObservable.notifyObservers(this)}_rebuildBuffers(){for(let e of this.scenes)e.resetCachedMaterial(),e._rebuildGeometries();for(let e of this._virtualScenes)e.resetCachedMaterial(),e._rebuildGeometries();super._rebuildBuffers()}getFontOffset(e){var t;let r,i,n,s,a=function(e){let t,r;if(!(0,O.IsDocumentAvailable)()||!document.body)return null;let i=document.createElement("span");i.textContent="Hg",i.style.font=e;let n=document.createElement("div");n.style.display="inline-block",n.style.width="1px",n.style.height="0px",n.style.verticalAlign="bottom";let s=document.createElement("div");s.style.whiteSpace="nowrap",s.appendChild(i),s.appendChild(n),document.body.appendChild(s);try{r=n.getBoundingClientRect().top-i.getBoundingClientRect().top,n.style.verticalAlign="baseline",t=n.getBoundingClientRect().top-i.getBoundingClientRect().top}finally{document.body.removeChild(s)}let a={ascent:t,height:r,descent:r-t};return J(a)?a:null}(e);if(a)return a;let l=function(e){let t=null;try{"u">typeof OffscreenCanvas?t=new OffscreenCanvas(64,64):(0,O.IsDocumentAvailable)()&&"function"==typeof document.createElement&&((t=document.createElement("canvas")).width=64,t.height=64);let r=t?.getContext("2d");if(!r)return null;r.font=e;let i=r.measureText("Hg"),n=Number(i.actualBoundingBoxAscent??i.fontBoundingBoxAscent),s=Number(i.actualBoundingBoxDescent??i.fontBoundingBoxDescent),a={ascent:n,height:n+s,descent:s};return J(a)?a:null}catch{return null}finally{let e=t;"function"==typeof e?.dispose&&e.dispose()}}(e);return l||(n=.8*(i=Math.max(1,(t=e,(r=/(?:^|\s)([0-9]+(?:\.[0-9]+)?)px(?:\/|\s|$)/.exec(String(t||"")))?Number(r[1]):16))),{ascent:n,height:n+(s=.2*i),descent:s})}enterPointerlock(){this._renderingCanvas&&et(this._renderingCanvas)}exitPointerlock(){document.exitPointerLock&&document.exitPointerLock()}beginFrame(){this._measureFps(),super.beginFrame()}_deletePipelineContext(e){e&&e.program&&e.transformFeedback&&(this.deleteTransformFeedback(e.transformFeedback),e.transformFeedback=null),super._deletePipelineContext(e)}createShaderProgram(e,t,r,i,n,s=null){n=n||this._gl,this.onBeforeShaderCompilationObservable.notifyObservers(this);let a=super.createShaderProgram(e,t,r,i,n,s);return this.onAfterShaderCompilationObservable.notifyObservers(this),a}_createShaderProgram(e,t,r,i,n=null){let s=i.createProgram();if(e.program=s,!s)throw Error("Unable to create program");if(i.attachShader(s,t),i.attachShader(s,r),this.webGLVersion>1&&n){let t=this.createTransformFeedback();this.bindTransformFeedback(t),this.setTranformFeedbackVaryings(s,n),e.transformFeedback=t}return i.linkProgram(s),this.webGLVersion>1&&n&&this.bindTransformFeedback(null),e.context=i,e.vertexShader=t,e.fragmentShader=r,e.isParallelCompiled||this._finalizePipelineContext(e),s}_releaseTexture(e){super._releaseTexture(e)}_releaseRenderTargetWrapper(e){for(let t of(super._releaseRenderTargetWrapper(e),this.scenes)){for(let r of t.postProcesses)r._outputTexture===e&&(r._outputTexture=null);for(let r of t.cameras)for(let t of r._postProcesses)t&&t._outputTexture===e&&(t._outputTexture=null)}}_rescaleTexture(e,t,r,i,n){this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MAG_FILTER,this._gl.LINEAR),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MIN_FILTER,this._gl.LINEAR),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_WRAP_S,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_WRAP_T,this._gl.CLAMP_TO_EDGE);let s=this.createRenderTargetTexture({width:t.width,height:t.height},{generateMipMaps:!1,type:0,samplingMode:2,generateDepthBuffer:!1,generateStencilBuffer:!1});if(!this._rescalePostProcess&&es._RescalePostProcessFactory&&(this._rescalePostProcess=es._RescalePostProcessFactory(this)),this._rescalePostProcess){this._rescalePostProcess.externalTextureSamplerBinding=!0;let a=()=>{this._rescalePostProcess.onApply=function(t){t._bindTexture("textureSampler",e)};let a=r;a||(a=this.scenes[this.scenes.length-1]),a.postProcessManager.directRender([this._rescalePostProcess],s,!0),this._bindTextureDirectly(this._gl.TEXTURE_2D,t,!0),this._gl.copyTexImage2D(this._gl.TEXTURE_2D,0,i,0,0,t.width,t.height,0),this.unBindFramebuffer(s),s.dispose(),n&&n()},l=this._rescalePostProcess.getEffect();l?l.executeWhenCompiled(a):this._rescalePostProcess.onEffectCreatedObservable.addOnce(e=>{e.executeWhenCompiled(a)})}}wrapWebGLTexture(e,t=!1,r=3,i=0,n=0){let s=new $.WebGLHardwareTexture(e,this._gl),a=new T.InternalTexture(this,15,!0);return a._hardwareTexture=s,a.baseWidth=i,a.baseHeight=n,a.width=i,a.height=n,a.isReady=!0,a.useMipMaps=t,this.updateTextureSamplingMode(r,a),a}updateWrappedWebGLTexture(e,t){if(15!==e.source)throw Error("updateWrappedWebGLTexture: target InternalTexture was not produced by wrapWebGLTexture.");for(let t of this._renderTargetWrapperCache)if(t.textures?.includes(e)){if(t.isMulti)throw Error("updateWrappedWebGLTexture: wrapped texture is part of a multi render-target; not supported. Dispose and re-wrap.");if(t._depthStencilTexture)throw Error("updateWrappedWebGLTexture: wrapped texture's render-target wrapper has a depth/stencil texture; not supported. Dispose and re-wrap.")}for(let r in e._hardwareTexture=new $.WebGLHardwareTexture(t,this._gl),e.isReady=!0,e._cachedCoordinatesMode=null,e._cachedWrapU=null,e._cachedWrapV=null,e._cachedWrapR=null,e._cachedAnisotropicFilteringLevel=null,this._boundTexturesCache)this._boundTexturesCache[r]===e&&(this._boundTexturesCache[r]=null);this.updateTextureSamplingMode(e.samplingMode,e);let r=this._gl;for(let i of this._renderTargetWrapperCache){if(i.texture!==e)continue;let n=i.samples,s=n>1;i._framebuffer&&r.deleteFramebuffer(i._framebuffer),!s&&i._depthStencilBuffer&&(r.deleteRenderbuffer(i._depthStencilBuffer),i._depthStencilBuffer=null);let a=this._currentFramebuffer,l=r.createFramebuffer();this._bindUnboundFramebuffer(l),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,t,0),s||(i._depthStencilBuffer=this._setupFramebufferDepthAttachments(i._generateStencilBuffer,i._generateDepthBuffer,i.width,i.height)),this._bindUnboundFramebuffer(a),i._framebuffer=l,s&&(i._samples=1,this.updateRenderTargetTextureSampleCount(i,n))}}_uploadImageToTexture(e,t,r=0,i=0){let n=this._gl,s=this._getWebGLTextureType(e.type),a=this._getInternalFormat(e.format),l=this._getRGBABufferInternalSizedFormat(e.type,a),u=e.isCube?n.TEXTURE_CUBE_MAP:n.TEXTURE_2D;this._bindTextureDirectly(u,e,!0),this._unpackFlipY(e.invertY);let h=n.TEXTURE_2D;e.isCube&&(h=n.TEXTURE_CUBE_MAP_POSITIVE_X+r),n.texImage2D(h,i,l,a,s,t),this._bindTextureDirectly(u,null,!0)}updateTextureComparisonFunction(e,t){if(1===this.webGLVersion)return void f.Logger.Error("WebGL 1 does not support texture comparison.");let r=this._gl;e.isCube?(this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,e,!0),0===t?(r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_COMPARE_FUNC,515),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_COMPARE_MODE,r.NONE)):(r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_COMPARE_FUNC,t),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_COMPARE_MODE,r.COMPARE_REF_TO_TEXTURE)),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null)):(this._bindTextureDirectly(this._gl.TEXTURE_2D,e,!0),0===t?(r.texParameteri(r.TEXTURE_2D,r.TEXTURE_COMPARE_FUNC,515),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_COMPARE_MODE,r.NONE)):(r.texParameteri(r.TEXTURE_2D,r.TEXTURE_COMPARE_FUNC,t),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_COMPARE_MODE,r.COMPARE_REF_TO_TEXTURE)),this._bindTextureDirectly(this._gl.TEXTURE_2D,null)),e._comparisonFunction=t}createInstancesBuffer(e){let t=this._gl.createBuffer();if(!t)throw Error("Unable to create instance buffer");let r=new I.WebGLDataBuffer(t);return r.capacity=e,this.bindArrayBuffer(r),this._gl.bufferData(this._gl.ARRAY_BUFFER,e,this._gl.DYNAMIC_DRAW),r.references=1,r}deleteInstancesBuffer(e){this._gl.deleteBuffer(e)}async _clientWaitAsync(e,t=0,r=10){let i=this._gl;return await new Promise((n,s)=>{(0,ei._RetryWithInterval)(()=>{let r=i.clientWaitSync(e,t,0);if(r==i.WAIT_FAILED)throw Error("clientWaitSync failed");return r!=i.TIMEOUT_EXPIRED},n,s,r)})}_readPixelsAsync(e,t,r,i,n,s,a){if(this._webGLVersion<2)throw Error("_readPixelsAsync only work on WebGL2+");let l=this._gl,u=l.createBuffer();l.bindBuffer(l.PIXEL_PACK_BUFFER,u),l.bufferData(l.PIXEL_PACK_BUFFER,a.byteLength,l.STREAM_READ),l.readPixels(e,t,r,i,n,s,0),l.bindBuffer(l.PIXEL_PACK_BUFFER,null);let h=l.fenceSync(l.SYNC_GPU_COMMANDS_COMPLETE,0);return h?(l.flush(),this._clientWaitAsync(h,0,10).then(()=>(l.deleteSync(h),l.bindBuffer(l.PIXEL_PACK_BUFFER,u),l.getBufferSubData(l.PIXEL_PACK_BUFFER,0,a),l.bindBuffer(l.PIXEL_PACK_BUFFER,null),l.deleteBuffer(u),a))):null}dispose(){var e;let t;this.hideLoadingUI(),this._rescalePostProcess&&this._rescalePostProcess.dispose(),e=this._renderingCanvas,1===q.EngineStore.Instances.length&&X.AbstractEngine.audioEngine&&(X.AbstractEngine.audioEngine.dispose(),X.AbstractEngine.audioEngine=null),(t=this.getHostWindow())&&"function"==typeof t.removeEventListener&&(t.removeEventListener("blur",this._onBlur),t.removeEventListener("focus",this._onFocus)),e&&(e.removeEventListener("focus",this._onCanvasFocus),e.removeEventListener("blur",this._onCanvasBlur),e.removeEventListener("pointerout",this._onCanvasPointerOut),e.removeEventListener("contextmenu",this._onCanvasContextMenu)),(0,O.IsDocumentAvailable)()&&(document.removeEventListener("fullscreenchange",this._onFullscreenChange),document.removeEventListener("mozfullscreenchange",this._onFullscreenChange),document.removeEventListener("webkitfullscreenchange",this._onFullscreenChange),document.removeEventListener("msfullscreenchange",this._onFullscreenChange),document.removeEventListener("pointerlockchange",this._onPointerLockChange),document.removeEventListener("mspointerlockchange",this._onPointerLockChange),document.removeEventListener("mozpointerlockchange",this._onPointerLockChange),document.removeEventListener("webkitpointerlockchange",this._onPointerLockChange)),super.dispose()}}es.ALPHA_DISABLE=0,es.ALPHA_ADD=1,es.ALPHA_COMBINE=2,es.ALPHA_SUBTRACT=3,es.ALPHA_MULTIPLY=4,es.ALPHA_MAXIMIZED=5,es.ALPHA_ONEONE=6,es.ALPHA_PREMULTIPLIED=7,es.ALPHA_PREMULTIPLIED_PORTERDUFF=8,es.ALPHA_INTERPOLATE=9,es.ALPHA_SCREENMODE=10,es.DELAYLOADSTATE_NONE=0,es.DELAYLOADSTATE_LOADED=1,es.DELAYLOADSTATE_LOADING=2,es.DELAYLOADSTATE_NOTLOADED=4,es.NEVER=512,es.ALWAYS=519,es.LESS=513,es.EQUAL=514,es.LEQUAL=515,es.GREATER=516,es.GEQUAL=518,es.NOTEQUAL=517,es.KEEP=7680,es.REPLACE=7681,es.INCR=7682,es.DECR=7683,es.INVERT=5386,es.INCR_WRAP=34055,es.DECR_WRAP=34056,es.TEXTURE_CLAMP_ADDRESSMODE=0,es.TEXTURE_WRAP_ADDRESSMODE=1,es.TEXTURE_MIRROR_ADDRESSMODE=2,es.TEXTUREFORMAT_ALPHA=0,es.TEXTUREFORMAT_LUMINANCE=1,es.TEXTUREFORMAT_LUMINANCE_ALPHA=2,es.TEXTUREFORMAT_RGB=4,es.TEXTUREFORMAT_RGBA=5,es.TEXTUREFORMAT_RED=6,es.TEXTUREFORMAT_R=6,es.TEXTUREFORMAT_R16_UNORM=33322,es.TEXTUREFORMAT_RG16_UNORM=33324,es.TEXTUREFORMAT_RGB16_UNORM=32852,es.TEXTUREFORMAT_RGBA16_UNORM=32859,es.TEXTUREFORMAT_R16_SNORM=36760,es.TEXTUREFORMAT_RG16_SNORM=36761,es.TEXTUREFORMAT_RGB16_SNORM=36762,es.TEXTUREFORMAT_RGBA16_SNORM=36763,es.TEXTUREFORMAT_RG=7,es.TEXTUREFORMAT_RED_INTEGER=8,es.TEXTUREFORMAT_R_INTEGER=8,es.TEXTUREFORMAT_RG_INTEGER=9,es.TEXTUREFORMAT_RGB_INTEGER=10,es.TEXTUREFORMAT_RGBA_INTEGER=11,es.TEXTURETYPE_UNSIGNED_BYTE=0,es.TEXTURETYPE_UNSIGNED_INT=0,es.TEXTURETYPE_FLOAT=1,es.TEXTURETYPE_HALF_FLOAT=2,es.TEXTURETYPE_BYTE=3,es.TEXTURETYPE_SHORT=4,es.TEXTURETYPE_UNSIGNED_SHORT=5,es.TEXTURETYPE_INT=6,es.TEXTURETYPE_UNSIGNED_INTEGER=7,es.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4=8,es.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1=9,es.TEXTURETYPE_UNSIGNED_SHORT_5_6_5=10,es.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV=11,es.TEXTURETYPE_UNSIGNED_INT_24_8=12,es.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV=13,es.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV=14,es.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV=15,es.TEXTURE_NEAREST_SAMPLINGMODE=1,es.TEXTURE_BILINEAR_SAMPLINGMODE=2,es.TEXTURE_TRILINEAR_SAMPLINGMODE=3,es.TEXTURE_NEAREST_NEAREST_MIPLINEAR=8,es.TEXTURE_LINEAR_LINEAR_MIPNEAREST=11,es.TEXTURE_LINEAR_LINEAR_MIPLINEAR=3,es.TEXTURE_NEAREST_NEAREST_MIPNEAREST=4,es.TEXTURE_NEAREST_LINEAR_MIPNEAREST=5,es.TEXTURE_NEAREST_LINEAR_MIPLINEAR=6,es.TEXTURE_NEAREST_LINEAR=7,es.TEXTURE_NEAREST_NEAREST=1,es.TEXTURE_LINEAR_NEAREST_MIPNEAREST=9,es.TEXTURE_LINEAR_NEAREST_MIPLINEAR=10,es.TEXTURE_LINEAR_LINEAR=2,es.TEXTURE_LINEAR_NEAREST=12,es.TEXTURE_EXPLICIT_MODE=0,es.TEXTURE_SPHERICAL_MODE=1,es.TEXTURE_PLANAR_MODE=2,es.TEXTURE_CUBIC_MODE=3,es.TEXTURE_PROJECTION_MODE=4,es.TEXTURE_SKYBOX_MODE=5,es.TEXTURE_INVCUBIC_MODE=6,es.TEXTURE_EQUIRECTANGULAR_MODE=7,es.TEXTURE_FIXED_EQUIRECTANGULAR_MODE=8,es.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE=9,es.SCALEMODE_FLOOR=1,es.SCALEMODE_NEAREST=2,es.SCALEMODE_CEILING=3,(t=es.prototype).createMultiviewRenderTargetTexture??(t.createMultiviewRenderTargetTexture=(0,en._MissingSideEffect)("Engine","createMultiviewRenderTargetTexture")),(r=es.prototype).bindMultiviewFramebuffer??(r.bindMultiviewFramebuffer=(0,en._MissingSideEffect)("Engine","bindMultiviewFramebuffer")),(i=es.prototype).bindSpaceWarpFramebuffer??(i.bindSpaceWarpFramebuffer=(0,en._MissingSideEffect)("Engine","bindSpaceWarpFramebuffer")),(n=es.prototype).createTransformFeedback??(n.createTransformFeedback=(0,en._MissingSideEffect)("Engine","createTransformFeedback")),(s=es.prototype).deleteTransformFeedback??(s.deleteTransformFeedback=(0,en._MissingSideEffect)("Engine","deleteTransformFeedback")),(a=es.prototype).bindTransformFeedback??(a.bindTransformFeedback=(0,en._MissingSideEffect)("Engine","bindTransformFeedback")),(l=es.prototype).beginTransformFeedback??(l.beginTransformFeedback=(0,en._MissingSideEffect)("Engine","beginTransformFeedback")),(u=es.prototype).endTransformFeedback??(u.endTransformFeedback=(0,en._MissingSideEffect)("Engine","endTransformFeedback")),(h=es.prototype).setTranformFeedbackVaryings??(h.setTranformFeedbackVaryings=(0,en._MissingSideEffect)("Engine","setTranformFeedbackVaryings")),(o=es.prototype).bindTransformFeedbackBuffer??(o.bindTransformFeedbackBuffer=(0,en._MissingSideEffect)("Engine","bindTransformFeedbackBuffer")),(_=es.prototype).readTransformFeedbackBuffer??(_.readTransformFeedbackBuffer=(0,en._MissingSideEffect)("Engine","readTransformFeedbackBuffer")),e.s(["Engine",0,es],50739),e.i(50739),e.s(["Engine",0,es],66232)}]);
@@ -1,10 +1,10 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,44661,e=>{"use strict";var i=e.i(12423);e.i(85668),e.i(6232);let r="defaultUboDeclaration",t=`layout(std140,column_major) uniform;uniform Material
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,49452,e=>{"use strict";var i=e.i(1719);e.i(12209),e.i(81108);let r="defaultUboDeclaration",t=`layout(std140,column_major) uniform;uniform Material
2
2
  {vec4 diffuseLeftColor;vec4 diffuseRightColor;vec4 opacityParts;vec4 reflectionLeftColor;vec4 reflectionRightColor;vec4 refractionLeftColor;vec4 refractionRightColor;vec4 emissiveLeftColor;vec4 emissiveRightColor;vec2 vDiffuseInfos;vec2 vAmbientInfos;vec2 vOpacityInfos;vec2 vEmissiveInfos;vec2 vLightmapInfos;vec2 vSpecularInfos;vec3 vBumpInfos;mat4 diffuseMatrix;mat4 ambientMatrix;mat4 opacityMatrix;mat4 emissiveMatrix;mat4 lightmapMatrix;mat4 specularMatrix;mat4 bumpMatrix;vec2 vTangentSpaceParams;float pointSize;float alphaCutOff;mat4 refractionMatrix;vec4 vRefractionInfos;vec3 vRefractionPosition;vec3 vRefractionSize;vec4 vSpecularColor;vec3 vEmissiveColor;vec4 vDiffuseColor;vec3 vAmbientColor;vec4 cameraInfo;vec4 vTextureRepetitionHexTilingParams;vec2 vReflectionInfos;mat4 reflectionMatrix;vec3 vReflectionPosition;vec3 vReflectionSize;
3
3
  #define ADDITIONAL_UBO_DECLARATION
4
4
  };
5
5
  #include<sceneUboDeclaration>
6
6
  #include<meshUboDeclaration>
7
- `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["defaultUboDeclaration",0,{name:r,shader:t}])},65296,e=>{"use strict";var i=e.i(12423);let r="helperFunctions",t=`const float PI=3.1415926535897932384626433832795;const float TWO_PI=6.283185307179586;const float HALF_PI=1.5707963267948966;const float RECIPROCAL_PI=0.3183098861837907;const float RECIPROCAL_PI2=0.15915494309189535;const float RECIPROCAL_PI4=0.07957747154594767;const float HALF_MIN=5.96046448e-08;
7
+ `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["defaultUboDeclaration",0,{name:r,shader:t}])},1609,e=>{"use strict";var i=e.i(1719);let r="helperFunctions",t=`const float PI=3.1415926535897932384626433832795;const float TWO_PI=6.283185307179586;const float HALF_PI=1.5707963267948966;const float RECIPROCAL_PI=0.3183098861837907;const float RECIPROCAL_PI2=0.15915494309189535;const float RECIPROCAL_PI4=0.07957747154594767;const float HALF_MIN=5.96046448e-08;
8
8
  const float LinearEncodePowerApprox=2.2;const float GammaEncodePowerApprox=1.0/LinearEncodePowerApprox;const vec3 LuminanceEncodeApprox=vec3(0.2126,0.7152,0.0722);const float Epsilon=0.0000001;
9
9
  #define saturate(x) clamp(x,0.0,1.0)
10
10
  #define absEps(x) abs(x)+Epsilon
@@ -122,25 +122,25 @@ float uint2float(uint i) {return uintBitsToFloat(0x3F800000u | (i>>9u))-1.0;}
122
122
  vec2 plasticSequence(const uint rstate) {return vec2(uint2float(rstate*3242174889u),
123
123
  uint2float(rstate*2447445414u));}
124
124
  #endif
125
- `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["helperFunctions",0,{name:r,shader:t}])},85668,e=>{"use strict";var i=e.i(12423);let r="sceneUboDeclaration",t=`layout(std140,column_major) uniform;uniform Scene {mat4 viewProjection;
125
+ `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["helperFunctions",0,{name:r,shader:t}])},12209,e=>{"use strict";var i=e.i(1719);let r="sceneUboDeclaration",t=`layout(std140,column_major) uniform;uniform Scene {mat4 viewProjection;
126
126
  #ifdef MULTIVIEW
127
127
  mat4 viewProjectionR;
128
128
  #endif
129
129
  mat4 view;mat4 projection;vec4 vEyePosition;mat4 inverseProjection;};
130
- `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["sceneUboDeclaration",0,{name:r,shader:t}])},6232,92692,97226,e=>{"use strict";var i=e.i(12423);let r="meshUboDeclaration",t=`#ifdef WEBGL2
130
+ `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["sceneUboDeclaration",0,{name:r,shader:t}])},81108,57972,30964,e=>{"use strict";var i=e.i(1719);let r="meshUboDeclaration",t=`#ifdef WEBGL2
131
131
  uniform mat4 world;uniform float visibility;
132
132
  #else
133
133
  layout(std140,column_major) uniform;uniform Mesh
134
134
  {mat4 world;float visibility;};
135
135
  #endif
136
136
  #define WORLD_UBO
137
- `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["meshUboDeclaration",0,{name:r,shader:t}],6232);let a="mainUVVaryingDeclaration",n=`#ifdef MAINUV{X}
137
+ `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["meshUboDeclaration",0,{name:r,shader:t}],81108);let a="mainUVVaryingDeclaration",n=`#ifdef MAINUV{X}
138
138
  varying vec2 vMainUV{X};
139
139
  #endif
140
- `;i.ShaderStore.IncludesShadersStore[a]||(i.ShaderStore.IncludesShadersStore[a]=n),e.s(["mainUVVaryingDeclaration",0,{name:a,shader:n}],92692);let o="logDepthDeclaration",d=`#ifdef LOGARITHMICDEPTH
140
+ `;i.ShaderStore.IncludesShadersStore[a]||(i.ShaderStore.IncludesShadersStore[a]=n),e.s(["mainUVVaryingDeclaration",0,{name:a,shader:n}],57972);let o="logDepthDeclaration",d=`#ifdef LOGARITHMICDEPTH
141
141
  uniform float logarithmicDepthConstant;varying float vFragmentDepth;
142
142
  #endif
143
- `;i.ShaderStore.IncludesShadersStore[o]||(i.ShaderStore.IncludesShadersStore[o]=d),e.s(["logDepthDeclaration",0,{name:o,shader:d}],97226)},39067,15420,e=>{"use strict";var i=e.i(12423);let r="bonesDeclaration",t=`#if NUM_BONE_INFLUENCERS>0
143
+ `;i.ShaderStore.IncludesShadersStore[o]||(i.ShaderStore.IncludesShadersStore[o]=d),e.s(["logDepthDeclaration",0,{name:o,shader:d}],30964)},88774,78263,e=>{"use strict";var i=e.i(1719);let r="bonesDeclaration",t=`#if NUM_BONE_INFLUENCERS>0
144
144
  attribute vec4 matricesIndices;attribute vec4 matricesWeights;
145
145
  #if NUM_BONE_INFLUENCERS>4
146
146
  attribute vec4 matricesIndicesExtra;attribute vec4 matricesWeightsExtra;
@@ -169,7 +169,7 @@ return mat4(m0,m1,m2,m3);
169
169
  #endif
170
170
  #endif
171
171
  #endif
172
- `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["bonesDeclaration",0,{name:r,shader:t}],39067);let a="bakedVertexAnimationDeclaration",n=`#ifdef BAKED_VERTEX_ANIMATION_TEXTURE
172
+ `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["bonesDeclaration",0,{name:r,shader:t}],88774);let a="bakedVertexAnimationDeclaration",n=`#ifdef BAKED_VERTEX_ANIMATION_TEXTURE
173
173
  uniform float bakedVertexAnimationTime;
174
174
  #if !defined(WEBGL2) && !defined(WEBGPU)
175
175
  uniform vec2 bakedVertexAnimationTextureSizeInverted;
@@ -188,7 +188,7 @@ float offset=index*4.0;float frameUV=(frame+0.5)*bakedVertexAnimationTextureSize
188
188
  #endif
189
189
  }
190
190
  #endif
191
- `;i.ShaderStore.IncludesShadersStore[a]||(i.ShaderStore.IncludesShadersStore[a]=n),e.s(["bakedVertexAnimationDeclaration",0,{name:a,shader:n}],15420)},85863,e=>{"use strict";var i=e.i(12423);let r="instancesDeclaration",t=`#ifdef INSTANCES
191
+ `;i.ShaderStore.IncludesShadersStore[a]||(i.ShaderStore.IncludesShadersStore[a]=n),e.s(["bakedVertexAnimationDeclaration",0,{name:a,shader:n}],78263)},82059,e=>{"use strict";var i=e.i(1719);let r="instancesDeclaration",t=`#ifdef INSTANCES
192
192
  attribute vec4 world0;attribute vec4 world1;attribute vec4 world2;attribute vec4 world3;
193
193
  #ifdef INSTANCESCOLOR
194
194
  attribute vec4 instanceColor;
@@ -210,7 +210,7 @@ uniform mat4 world;
210
210
  uniform mat4 previousWorld;
211
211
  #endif
212
212
  #endif
213
- `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["instancesDeclaration",0,{name:r,shader:t}])},42927,e=>{"use strict";var i=e.i(12423);let r="clipPlaneVertexDeclaration",t=`#ifdef CLIPPLANE
213
+ `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["instancesDeclaration",0,{name:r,shader:t}])},92125,e=>{"use strict";var i=e.i(1719);let r="clipPlaneVertexDeclaration",t=`#ifdef CLIPPLANE
214
214
  uniform vec4 vClipPlane;varying float fClipDistance;
215
215
  #endif
216
216
  #ifdef CLIPPLANE2
@@ -228,7 +228,7 @@ uniform vec4 vClipPlane5;varying float fClipDistance5;
228
228
  #ifdef CLIPPLANE6
229
229
  uniform vec4 vClipPlane6;varying float fClipDistance6;
230
230
  #endif
231
- `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["clipPlaneVertexDeclaration",0,{name:r,shader:t}])},40805,30667,76955,16607,e=>{"use strict";var i=e.i(12423);let r="instancesVertex",t=`#ifdef INSTANCES
231
+ `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["clipPlaneVertexDeclaration",0,{name:r,shader:t}])},99136,1e4,65474,14518,e=>{"use strict";var i=e.i(1719);let r="instancesVertex",t=`#ifdef INSTANCES
232
232
  mat4 finalWorld=mat4(world0,world1,world2,world3);
233
233
  #if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
234
234
  mat4 finalPreviousWorld=mat4(previousWorld0,previousWorld1,
@@ -246,7 +246,7 @@ mat4 finalWorld=world;
246
246
  mat4 finalPreviousWorld=previousWorld;
247
247
  #endif
248
248
  #endif
249
- `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["instancesVertex",0,{name:r,shader:t}],40805);let a="bonesVertex",n=`#ifndef BAKED_VERTEX_ANIMATION_TEXTURE
249
+ `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["instancesVertex",0,{name:r,shader:t}],99136);let a="bonesVertex",n=`#ifndef BAKED_VERTEX_ANIMATION_TEXTURE
250
250
  #if NUM_BONE_INFLUENCERS>0
251
251
  mat4 influence;
252
252
  #ifdef BONETEXTURE
@@ -299,7 +299,7 @@ influence+=mBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3];
299
299
  finalWorld=finalWorld*influence;
300
300
  #endif
301
301
  #endif
302
- `;i.ShaderStore.IncludesShadersStore[a]||(i.ShaderStore.IncludesShadersStore[a]=n),e.s(["bonesVertex",0,{name:a,shader:n}],30667);let o="bakedVertexAnimation",d=`#ifdef BAKED_VERTEX_ANIMATION_TEXTURE
302
+ `;i.ShaderStore.IncludesShadersStore[a]||(i.ShaderStore.IncludesShadersStore[a]=n),e.s(["bonesVertex",0,{name:a,shader:n}],1e4);let o="bakedVertexAnimation",d=`#ifdef BAKED_VERTEX_ANIMATION_TEXTURE
303
303
  {
304
304
  #ifdef INSTANCES
305
305
  #define BVASNAME bakedVertexAnimationSettingsInstanced
@@ -330,7 +330,7 @@ VATInfluence+=readMatrixFromRawSamplerVAT(bakedVertexAnimationTexture,matricesIn
330
330
  #endif
331
331
  finalWorld=finalWorld*VATInfluence;}
332
332
  #endif
333
- `;i.ShaderStore.IncludesShadersStore[o]||(i.ShaderStore.IncludesShadersStore[o]=d),e.s(["bakedVertexAnimation",0,{name:o,shader:d}],76955);let f="clipPlaneVertex",l=`#ifdef CLIPPLANE
333
+ `;i.ShaderStore.IncludesShadersStore[o]||(i.ShaderStore.IncludesShadersStore[o]=d),e.s(["bakedVertexAnimation",0,{name:o,shader:d}],65474);let f="clipPlaneVertex",l=`#ifdef CLIPPLANE
334
334
  fClipDistance=dot(worldPos,vClipPlane);
335
335
  #endif
336
336
  #ifdef CLIPPLANE2
@@ -348,13 +348,13 @@ fClipDistance5=dot(worldPos,vClipPlane5);
348
348
  #ifdef CLIPPLANE6
349
349
  fClipDistance6=dot(worldPos,vClipPlane6);
350
350
  #endif
351
- `;i.ShaderStore.IncludesShadersStore[f]||(i.ShaderStore.IncludesShadersStore[f]=l),e.s(["clipPlaneVertex",0,{name:f,shader:l}],16607)},57828,29231,17464,e=>{"use strict";var i=e.i(12423);let r="fogVertexDeclaration",t=`#ifdef FOG
351
+ `;i.ShaderStore.IncludesShadersStore[f]||(i.ShaderStore.IncludesShadersStore[f]=l),e.s(["clipPlaneVertex",0,{name:f,shader:l}],14518)},72482,68852,94672,e=>{"use strict";var i=e.i(1719);let r="fogVertexDeclaration",t=`#ifdef FOG
352
352
  varying vec3 vFogDistance;
353
353
  #endif
354
- `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["fogVertexDeclaration",0,{name:r,shader:t}],57828);let a="fogVertex",n=`#ifdef FOG
354
+ `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["fogVertexDeclaration",0,{name:r,shader:t}],72482);let a="fogVertex",n=`#ifdef FOG
355
355
  vFogDistance=(view*worldPos).xyz;
356
356
  #endif
357
- `;i.ShaderStore.IncludesShadersStore[a]||(i.ShaderStore.IncludesShadersStore[a]=n),e.s(["fogVertex",0,{name:a,shader:n}],29231);let o="vertexColorMixing",d=`#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)
357
+ `;i.ShaderStore.IncludesShadersStore[a]||(i.ShaderStore.IncludesShadersStore[a]=n),e.s(["fogVertex",0,{name:a,shader:n}],68852);let o="vertexColorMixing",d=`#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)
358
358
  vColor=vec4(1.0);
359
359
  #ifdef VERTEXCOLOR
360
360
  #ifdef VERTEXALPHA
@@ -367,13 +367,13 @@ vColor.rgb*=colorUpdated.rgb;
367
367
  vColor*=instanceColor;
368
368
  #endif
369
369
  #endif
370
- `;i.ShaderStore.IncludesShadersStore[o]||(i.ShaderStore.IncludesShadersStore[o]=d),e.s(["vertexColorMixing",0,{name:o,shader:d}],17464)},74747,78119,23131,39962,41527,50010,91440,43842,61981,55212,23689,e=>{"use strict";var i=e.i(12423);let r="decalVertexDeclaration",t=`#ifdef DECAL
370
+ `;i.ShaderStore.IncludesShadersStore[o]||(i.ShaderStore.IncludesShadersStore[o]=d),e.s(["vertexColorMixing",0,{name:o,shader:d}],94672)},58283,656,9269,23116,44560,94874,57837,57472,65073,93481,97063,e=>{"use strict";var i=e.i(1719);let r="decalVertexDeclaration",t=`#ifdef DECAL
371
371
  uniform vec4 vDecalInfos;uniform mat4 decalMatrix;
372
372
  #endif
373
- `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["decalVertexDeclaration",0,{name:r,shader:t}],74747);let a="uvAttributeDeclaration",n=`#ifdef UV{X}
373
+ `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["decalVertexDeclaration",0,{name:r,shader:t}],58283);let a="uvAttributeDeclaration",n=`#ifdef UV{X}
374
374
  attribute vec2 uv{X};
375
375
  #endif
376
- `;i.ShaderStore.IncludesShadersStore[a]||(i.ShaderStore.IncludesShadersStore[a]=n),e.s(["uvAttributeDeclaration",0,{name:a,shader:n}],78119);let o="prePassVertexDeclaration",d=`#ifdef PREPASS
376
+ `;i.ShaderStore.IncludesShadersStore[a]||(i.ShaderStore.IncludesShadersStore[a]=n),e.s(["uvAttributeDeclaration",0,{name:a,shader:n}],656);let o="prePassVertexDeclaration",d=`#ifdef PREPASS
377
377
  #ifdef PREPASS_LOCAL_POSITION
378
378
  varying vec3 vPosition;
379
379
  #endif
@@ -387,10 +387,10 @@ varying float vNormViewDepth;
387
387
  uniform mat4 previousViewProjection;varying vec4 vCurrentPosition;varying vec4 vPreviousPosition;
388
388
  #endif
389
389
  #endif
390
- `;i.ShaderStore.IncludesShadersStore[o]||(i.ShaderStore.IncludesShadersStore[o]=d),e.s(["prePassVertexDeclaration",0,{name:o,shader:d}],23131);let f="samplerVertexDeclaration",l=`#if defined(_DEFINENAME_) && _DEFINENAME_DIRECTUV==0
390
+ `;i.ShaderStore.IncludesShadersStore[o]||(i.ShaderStore.IncludesShadersStore[o]=d),e.s(["prePassVertexDeclaration",0,{name:o,shader:d}],9269);let f="samplerVertexDeclaration",l=`#if defined(_DEFINENAME_) && _DEFINENAME_DIRECTUV==0
391
391
  varying vec2 v_VARYINGNAME_UV;
392
392
  #endif
393
- `;i.ShaderStore.IncludesShadersStore[f]||(i.ShaderStore.IncludesShadersStore[f]=l),e.s(["samplerVertexDeclaration",0,{name:f,shader:l}],39962);let c="lightVxFragmentDeclaration",s=`#ifdef LIGHT{X}
393
+ `;i.ShaderStore.IncludesShadersStore[f]||(i.ShaderStore.IncludesShadersStore[f]=l),e.s(["samplerVertexDeclaration",0,{name:f,shader:l}],23116);let c="lightVxFragmentDeclaration",s=`#ifdef LIGHT{X}
394
394
  uniform vec4 vLightData{X};uniform vec4 vLightDiffuse{X};
395
395
  #ifdef SPECULARTERM
396
396
  uniform vec4 vLightSpecular{X};
@@ -417,7 +417,7 @@ uniform vec3 vLightGround{X};
417
417
  uniform vec4 vLightWidth{X};uniform vec4 vLightHeight{X};
418
418
  #endif
419
419
  #endif
420
- `;i.ShaderStore.IncludesShadersStore[c]||(i.ShaderStore.IncludesShadersStore[c]=s),e.s(["lightVxFragmentDeclaration",0,{name:c,shader:s}],41527);let m="lightVxUboDeclaration",S=`#ifdef LIGHT{X}
420
+ `;i.ShaderStore.IncludesShadersStore[c]||(i.ShaderStore.IncludesShadersStore[c]=s),e.s(["lightVxFragmentDeclaration",0,{name:c,shader:s}],44560);let m="lightVxUboDeclaration",S=`#ifdef LIGHT{X}
421
421
  uniform Light{X}
422
422
  {vec4 vLightData;vec4 vLightDiffuse;vec4 vLightSpecular;
423
423
  #ifdef SPOTLIGHT{X}
@@ -442,7 +442,7 @@ varying vec4 vPositionFromLight{X};varying float vDepthMetric{X};uniform mat4 li
442
442
  #endif
443
443
  #endif
444
444
  #endif
445
- `;i.ShaderStore.IncludesShadersStore[m]||(i.ShaderStore.IncludesShadersStore[m]=S),e.s(["lightVxUboDeclaration",0,{name:m,shader:S}],50010);let E="prePassVertex",v=`#ifdef PREPASS_DEPTH
445
+ `;i.ShaderStore.IncludesShadersStore[m]||(i.ShaderStore.IncludesShadersStore[m]=S),e.s(["lightVxUboDeclaration",0,{name:m,shader:S}],94874);let E="prePassVertex",v=`#ifdef PREPASS_DEPTH
446
446
  vViewPos=(view*worldPos).rgb;
447
447
  #endif
448
448
  #ifdef PREPASS_NORMALIZED_VIEW_DEPTH
@@ -481,13 +481,13 @@ vPreviousPosition=previousViewProjection*finalPreviousWorld*previousInfluence*ve
481
481
  vPreviousPosition=previousViewProjection*finalPreviousWorld*vec4(positionUpdated,1.0);
482
482
  #endif
483
483
  #endif
484
- `;i.ShaderStore.IncludesShadersStore[E]||(i.ShaderStore.IncludesShadersStore[E]=v),e.s(["prePassVertex",0,{name:E,shader:v}],91440);let u="uvVariableDeclaration",I=`#if !defined(UV{X}) && defined(MAINUV{X})
484
+ `;i.ShaderStore.IncludesShadersStore[E]||(i.ShaderStore.IncludesShadersStore[E]=v),e.s(["prePassVertex",0,{name:E,shader:v}],57837);let u="uvVariableDeclaration",I=`#if !defined(UV{X}) && defined(MAINUV{X})
485
485
  vec2 uv{X}=vec2(0.,0.);
486
486
  #endif
487
487
  #ifdef MAINUV{X}
488
488
  vMainUV{X}=uv{X};
489
489
  #endif
490
- `;i.ShaderStore.IncludesShadersStore[u]||(i.ShaderStore.IncludesShadersStore[u]=I),e.s(["uvVariableDeclaration",0,{name:u,shader:I}],43842);let A="samplerVertexImplementation",N=`#if defined(_DEFINENAME_) && _DEFINENAME_DIRECTUV==0
490
+ `;i.ShaderStore.IncludesShadersStore[u]||(i.ShaderStore.IncludesShadersStore[u]=I),e.s(["uvVariableDeclaration",0,{name:u,shader:I}],57472);let A="samplerVertexImplementation",N=`#if defined(_DEFINENAME_) && _DEFINENAME_DIRECTUV==0
491
491
  if (v_INFONAME_==0.)
492
492
  {v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uvUpdated,1.0,0.0));}
493
493
  #ifdef UV2
@@ -511,7 +511,7 @@ else if (v_INFONAME_==5.)
511
511
  {v_VARYINGNAME_UV=vec2(_MATRIXNAME_Matrix*vec4(uv6,1.0,0.0));}
512
512
  #endif
513
513
  #endif
514
- `;i.ShaderStore.IncludesShadersStore[A]||(i.ShaderStore.IncludesShadersStore[A]=N),e.s(["samplerVertexImplementation",0,{name:A,shader:N}],61981);let x="shadowsVertex",T=`#ifdef SHADOWS
514
+ `;i.ShaderStore.IncludesShadersStore[A]||(i.ShaderStore.IncludesShadersStore[A]=N),e.s(["samplerVertexImplementation",0,{name:A,shader:N}],65073);let x="shadowsVertex",T=`#ifdef SHADOWS
515
515
  #if defined(SHADOWCSM{X})
516
516
  vPositionFromCamera{X}=view*worldPos;for (int i=0; i<SHADOWCSMNUM_CASCADES{X}; i++) {vPositionFromLight{X}[i]=lightMatrix{X}[i]*worldPos;
517
517
  #ifdef USE_REVERSE_DEPTHBUFFER
@@ -529,10 +529,10 @@ vDepthMetric{X}=(vPositionFromLight{X}.z+light{X}.depthValues.x)/light{X}.depthV
529
529
  #endif
530
530
  #endif
531
531
  #endif
532
- `;i.ShaderStore.IncludesShadersStore[x]||(i.ShaderStore.IncludesShadersStore[x]=T),e.s(["shadowsVertex",0,{name:x,shader:T}],55212);let h="logDepthVertex",p=`#ifdef LOGARITHMICDEPTH
532
+ `;i.ShaderStore.IncludesShadersStore[x]||(i.ShaderStore.IncludesShadersStore[x]=T),e.s(["shadowsVertex",0,{name:x,shader:T}],93481);let h="logDepthVertex",p=`#ifdef LOGARITHMICDEPTH
533
533
  vFragmentDepth=1.0+gl_Position.w;gl_Position.z=log2(max(0.000001,vFragmentDepth))*logarithmicDepthConstant;
534
534
  #endif
535
- `;i.ShaderStore.IncludesShadersStore[h]||(i.ShaderStore.IncludesShadersStore[h]=p),e.s(["logDepthVertex",0,{name:h,shader:p}],23689)},32936,32235,61193,99838,e=>{"use strict";var i=e.i(12423);let r="morphTargetsVertexGlobalDeclaration",t=`#ifdef MORPHTARGETS
535
+ `;i.ShaderStore.IncludesShadersStore[h]||(i.ShaderStore.IncludesShadersStore[h]=p),e.s(["logDepthVertex",0,{name:h,shader:p}],97063)},90426,32122,61241,48921,e=>{"use strict";var i=e.i(1719);let r="morphTargetsVertexGlobalDeclaration",t=`#ifdef MORPHTARGETS
536
536
  uniform float morphTargetInfluences[NUM_MORPH_INFLUENCERS];
537
537
  #ifdef MORPHTARGETS_TEXTURE
538
538
  uniform float morphTargetTextureIndices[NUM_MORPH_INFLUENCERS];uniform vec3 morphTargetTextureInfo;uniform highp sampler2DArray morphTargets;vec3 readVector3FromRawSampler(int targetIndex,float vertexIndex)
@@ -553,7 +553,7 @@ float y=floor(vertexIndex/morphTargetTextureInfo.y);float x=vertexIndex-y*morphT
553
553
  }
554
554
  #endif
555
555
  #endif
556
- `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["morphTargetsVertexGlobalDeclaration",0,{name:r,shader:t}],32936);let a="morphTargetsVertexDeclaration",n=`#ifdef MORPHTARGETS
556
+ `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["morphTargetsVertexGlobalDeclaration",0,{name:r,shader:t}],90426);let a="morphTargetsVertexDeclaration",n=`#ifdef MORPHTARGETS
557
557
  #ifndef MORPHTARGETS_TEXTURE
558
558
  #ifdef MORPHTARGETS_POSITION
559
559
  attribute vec3 position{X};
@@ -577,12 +577,12 @@ attribute vec4 color{X};
577
577
  uniform float morphTargetCount;
578
578
  #endif
579
579
  #endif
580
- `;i.ShaderStore.IncludesShadersStore[a]||(i.ShaderStore.IncludesShadersStore[a]=n),e.s(["morphTargetsVertexDeclaration",0,{name:a,shader:n}],32235);let o="morphTargetsVertexGlobal",d=`#ifdef MORPHTARGETS
580
+ `;i.ShaderStore.IncludesShadersStore[a]||(i.ShaderStore.IncludesShadersStore[a]=n),e.s(["morphTargetsVertexDeclaration",0,{name:a,shader:n}],32122);let o="morphTargetsVertexGlobal",d=`#ifdef MORPHTARGETS
581
581
  #ifdef MORPHTARGETS_TEXTURE
582
582
  float vertexID;
583
583
  #endif
584
584
  #endif
585
- `;i.ShaderStore.IncludesShadersStore[o]||(i.ShaderStore.IncludesShadersStore[o]=d),e.s(["morphTargetsVertexGlobal",0,{name:o,shader:d}],61193);let f="morphTargetsVertex",l=`#ifdef MORPHTARGETS
585
+ `;i.ShaderStore.IncludesShadersStore[o]||(i.ShaderStore.IncludesShadersStore[o]=d),e.s(["morphTargetsVertexGlobal",0,{name:o,shader:d}],61241);let f="morphTargetsVertex",l=`#ifdef MORPHTARGETS
586
586
  #ifdef MORPHTARGETS_TEXTURE
587
587
  #if {X}==0
588
588
  for (int i=0; i<NUM_MORPH_INFLUENCERS; i++) {if (float(i)>=morphTargetCount) break;vertexID=float(gl_VertexID)*morphTargetTextureInfo.x;
@@ -642,17 +642,17 @@ colorUpdated+=(color{X}-color)*morphTargetInfluences[{X}];
642
642
  #endif
643
643
  #endif
644
644
  #endif
645
- `;i.ShaderStore.IncludesShadersStore[f]||(i.ShaderStore.IncludesShadersStore[f]=l),e.s(["morphTargetsVertex",0,{name:f,shader:l}],99838)},50503,e=>{"use strict";var i=e.i(12423);let r="bumpVertex",t=`#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC)
645
+ `;i.ShaderStore.IncludesShadersStore[f]||(i.ShaderStore.IncludesShadersStore[f]=l),e.s(["morphTargetsVertex",0,{name:f,shader:l}],48921)},5872,e=>{"use strict";var i=e.i(1719);let r="bumpVertex",t=`#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC)
646
646
  #if defined(TANGENT) && defined(NORMAL)
647
647
  vec3 tbnNormal=normalize(normalUpdated);vec3 tbnTangent=normalize(tangentUpdated.xyz);vec3 tbnBitangent=cross(tbnNormal,tbnTangent)*tangentUpdated.w;vTBN=mat3(finalWorld)*mat3(tbnTangent,tbnBitangent,tbnNormal);
648
648
  #endif
649
649
  #endif
650
- `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["bumpVertex",0,{name:r,shader:t}])},19436,e=>{"use strict";var i=e.i(12423);let r="bumpVertexDeclaration",t=`#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC)
650
+ `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["bumpVertex",0,{name:r,shader:t}])},72199,e=>{"use strict";var i=e.i(1719);let r="bumpVertexDeclaration",t=`#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC)
651
651
  #if defined(TANGENT) && defined(NORMAL)
652
652
  varying mat3 vTBN;
653
653
  #endif
654
654
  #endif
655
- `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["bumpVertexDeclaration",0,{name:r,shader:t}])},44237,e=>{"use strict";var i=e.i(12423),r=e.i(74747);let t="defaultVertexDeclaration",a=`uniform mat4 viewProjection;
655
+ `;i.ShaderStore.IncludesShadersStore[r]||(i.ShaderStore.IncludesShadersStore[r]=t),e.s(["bumpVertexDeclaration",0,{name:r,shader:t}])},55414,e=>{"use strict";var i=e.i(1719),r=e.i(58283);let t="defaultVertexDeclaration",a=`uniform mat4 viewProjection;
656
656
  #ifdef MULTIVIEW
657
657
  mat4 viewProjectionR;
658
658
  #endif
@@ -690,10 +690,10 @@ uniform vec4 vDetailInfos;uniform mat4 detailMatrix;
690
690
  uniform vec4 cameraInfo;uniform vec4 vTextureRepetitionHexTilingParams;
691
691
  #include<decalVertexDeclaration>
692
692
  #define ADDITIONAL_VERTEX_DECLARATION
693
- `;i.ShaderStore.IncludesShadersStore[t]||(i.ShaderStore.IncludesShadersStore[t]=a);var n=e.i(85668),o=e.i(6232),d=e.i(44661),f=e.i(78119),l=e.i(65296),c=e.i(39067),s=e.i(15420),m=e.i(85863),S=e.i(23131),E=e.i(92692),v=e.i(39962),u=e.i(19436),I=e.i(42927),A=e.i(57828),N=e.i(41527),x=e.i(50010),T=e.i(32936),h=e.i(32235),p=e.i(97226),_=e.i(61193),V=e.i(99838),R=e.i(40805),M=e.i(30667),P=e.i(76955),g=e.i(91440),D=e.i(43842),U=e.i(61981),O=e.i(50503),L=e.i(16607),C=e.i(29231),F=e.i(55212),b=e.i(17464);let X="pointCloudVertex",G=`#if defined(POINTSIZE) && !defined(WEBGPU)
693
+ `;i.ShaderStore.IncludesShadersStore[t]||(i.ShaderStore.IncludesShadersStore[t]=a);var n=e.i(12209),o=e.i(81108),d=e.i(49452),f=e.i(656),l=e.i(1609),c=e.i(88774),s=e.i(78263),m=e.i(82059),S=e.i(9269),E=e.i(57972),v=e.i(23116),u=e.i(72199),I=e.i(92125),A=e.i(72482),N=e.i(44560),x=e.i(94874),T=e.i(90426),h=e.i(32122),p=e.i(30964),_=e.i(61241),V=e.i(48921),R=e.i(99136),M=e.i(1e4),P=e.i(65474),g=e.i(57837),D=e.i(57472),U=e.i(65073),O=e.i(5872),L=e.i(14518),C=e.i(68852),F=e.i(93481),b=e.i(94672);let X="pointCloudVertex",G=`#if defined(POINTSIZE) && !defined(WEBGPU)
694
694
  gl_PointSize=pointSize;
695
695
  #endif
696
- `;i.ShaderStore.IncludesShadersStore[X]||(i.ShaderStore.IncludesShadersStore[X]=G);var W=e.i(23689);let B="defaultVertexShader",w=`#define CUSTOM_VERTEX_EXTENSION
696
+ `;i.ShaderStore.IncludesShadersStore[X]||(i.ShaderStore.IncludesShadersStore[X]=G);var W=e.i(97063);let B="defaultVertexShader",w=`#define CUSTOM_VERTEX_EXTENSION
697
697
  #include<__decl__defaultVertex>
698
698
  #define CUSTOM_VERTEX_BEGIN
699
699
  attribute vec3 position;
@@ -847,4 +847,4 @@ vMainUV2=uv2Updated;
847
847
  #include<logDepthVertex>
848
848
  #define CUSTOM_VERTEX_MAIN_END
849
849
  }
850
- `;for(let e of(i.ShaderStore.ShadersStore[B]||(i.ShaderStore.ShadersStore[B]=w),[r.decalVertexDeclaration,{name:t,shader:a},n.sceneUboDeclaration,o.meshUboDeclaration,d.defaultUboDeclaration,f.uvAttributeDeclaration,l.helperFunctions,c.bonesDeclaration,s.bakedVertexAnimationDeclaration,m.instancesDeclaration,S.prePassVertexDeclaration,E.mainUVVaryingDeclaration,v.samplerVertexDeclaration,u.bumpVertexDeclaration,I.clipPlaneVertexDeclaration,A.fogVertexDeclaration,N.lightVxFragmentDeclaration,x.lightVxUboDeclaration,T.morphTargetsVertexGlobalDeclaration,h.morphTargetsVertexDeclaration,p.logDepthDeclaration,_.morphTargetsVertexGlobal,V.morphTargetsVertex,R.instancesVertex,M.bonesVertex,P.bakedVertexAnimation,g.prePassVertex,D.uvVariableDeclaration,U.samplerVertexImplementation,O.bumpVertex,L.clipPlaneVertex,C.fogVertex,F.shadowsVertex,b.vertexColorMixing,{name:X,shader:G},W.logDepthVertex]))i.ShaderStore.IncludesShadersStore[e.name]||(i.ShaderStore.IncludesShadersStore[e.name]=e.shader);e.s(["defaultVertexShader",0,{name:B,shader:w}],44237)}]);
850
+ `;for(let e of(i.ShaderStore.ShadersStore[B]||(i.ShaderStore.ShadersStore[B]=w),[r.decalVertexDeclaration,{name:t,shader:a},n.sceneUboDeclaration,o.meshUboDeclaration,d.defaultUboDeclaration,f.uvAttributeDeclaration,l.helperFunctions,c.bonesDeclaration,s.bakedVertexAnimationDeclaration,m.instancesDeclaration,S.prePassVertexDeclaration,E.mainUVVaryingDeclaration,v.samplerVertexDeclaration,u.bumpVertexDeclaration,I.clipPlaneVertexDeclaration,A.fogVertexDeclaration,N.lightVxFragmentDeclaration,x.lightVxUboDeclaration,T.morphTargetsVertexGlobalDeclaration,h.morphTargetsVertexDeclaration,p.logDepthDeclaration,_.morphTargetsVertexGlobal,V.morphTargetsVertex,R.instancesVertex,M.bonesVertex,P.bakedVertexAnimation,g.prePassVertex,D.uvVariableDeclaration,U.samplerVertexImplementation,O.bumpVertex,L.clipPlaneVertex,C.fogVertex,F.shadowsVertex,b.vertexColorMixing,{name:X,shader:G},W.logDepthVertex]))i.ShaderStore.IncludesShadersStore[e.name]||(i.ShaderStore.IncludesShadersStore[e.name]=e.shader);e.s(["defaultVertexShader",0,{name:B,shader:w}],55414)}]);