@uptimizr/dashboard 0.4.5 → 0.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (384) hide show
  1. package/out/404.html +1 -1
  2. package/out/__next.__PAGE__.txt +19 -5
  3. package/out/__next._full.txt +11 -11
  4. package/out/__next._tree.txt +2 -2
  5. package/out/_next/static/chunks/{3kalvwsf11-ss.js → 0-_j1khfoib6l.js} +119 -115
  6. package/out/_next/static/chunks/{0-tzsd_n-ywom.js → 005bbq_px7lke.js} +2 -2
  7. package/out/_next/static/chunks/00fbhtmui-yxg.js +1 -0
  8. package/out/_next/static/chunks/017pn-pen381_.js +1 -0
  9. package/out/_next/static/chunks/01vov6inx1zzt.js +1 -0
  10. package/out/_next/static/chunks/{3d76e_yd8l_0x.js → 02qk_wmkf9at-.js} +211 -211
  11. package/out/_next/static/chunks/03bd5plut08tg.js +1 -0
  12. package/out/_next/static/chunks/03dwfqmo73w_z.js +1 -0
  13. package/out/_next/static/chunks/03sn4419dam-h.js +5 -0
  14. package/out/_next/static/chunks/05ere0-228syf.js +1 -0
  15. package/out/_next/static/chunks/{2g_1ov-0j2kwd.js → 05h8u5lrypn5m.js} +1 -1
  16. package/out/_next/static/chunks/05s0t-besbvu1.css +3 -0
  17. package/out/_next/static/chunks/{3go-mst7n3udd.js → 05v-nubi896jg.js} +1 -1
  18. package/out/_next/static/chunks/05z79zh625ezu.js +1 -0
  19. package/out/_next/static/chunks/{1t2exh89lnazc.js → 060iult6f68_e.js} +504 -571
  20. package/out/_next/static/chunks/08lvtnv7b1cxp.js +1 -0
  21. package/out/_next/static/chunks/0_v2luu_qmeid.js +1 -0
  22. package/out/_next/static/chunks/0ai0zgbgjqb92.js +1 -0
  23. package/out/_next/static/chunks/0boov9mwycanf.js +1 -0
  24. package/out/_next/static/chunks/{0av6n_6q6kzo3.js → 0btmk0wmekl02.js} +2 -2
  25. package/out/_next/static/chunks/0d8x8m2x6ca_m.js +1 -0
  26. package/out/_next/static/chunks/0dmrdrwtd093b.js +1 -0
  27. package/out/_next/static/chunks/0e1jfrmioeuws.js +1 -0
  28. package/out/_next/static/chunks/0e7nlxmneb2j_.js +1 -0
  29. package/out/_next/static/chunks/0es97pusfxupl.js +1 -0
  30. package/out/_next/static/chunks/{05uqfgf-hh-p5.js → 0fd-0i1yt23kz.js} +1 -1
  31. package/out/_next/static/chunks/0fxdyvb1w23d1.js +1 -0
  32. package/out/_next/static/chunks/0fxhc24djjcgq.js +1 -0
  33. package/out/_next/static/chunks/0gf-ztg86zd80.js +1 -0
  34. package/out/_next/static/chunks/{380ivzcfb4o_3.js → 0grasqqf5dw7r.js} +2 -2
  35. package/out/_next/static/chunks/{0okbyggxe6mx5.js → 0hajwk2yd-rwr.js} +1 -1
  36. package/out/_next/static/chunks/0hk1wg7h4araz.js +1 -0
  37. package/out/_next/static/chunks/{1vmpltnr0cyos.js → 0j74ipw4fps-n.js} +1 -1
  38. package/out/_next/static/chunks/{03zip1uidm6x9.js → 0kj-vckdn7t5p.js} +1 -1
  39. package/out/_next/static/chunks/0lbs5xdyjuzuo.js +1 -0
  40. package/out/_next/static/chunks/0lep3_bqwfuin.js +1 -0
  41. package/out/_next/static/chunks/0mp0jh1gj7290.js +1 -0
  42. package/out/_next/static/chunks/0ngpoj2g5i4kz.js +1 -0
  43. package/out/_next/static/chunks/0nhljhguceh66.js +1 -0
  44. package/out/_next/static/chunks/0p6z73afb9dj2.js +1 -0
  45. package/out/_next/static/chunks/0p9zfmidzqkps.js +1 -0
  46. package/out/_next/static/chunks/0q75860p8u_ii.js +1 -0
  47. package/out/_next/static/chunks/{0-0hui1_v3h8b.js → 0rracz73p38mo.js} +26 -23
  48. package/out/_next/static/chunks/{3z4suna4kq4j5.js → 0sw-8gxbg4x0l.js} +568 -569
  49. package/out/_next/static/chunks/0sx-6rf3eteqn.js +1 -0
  50. package/out/_next/static/chunks/0thw099xk3_0p.js +3 -0
  51. package/out/_next/static/chunks/0u85f0dhb4i8e.js +1 -0
  52. package/out/_next/static/chunks/0uk7kigzm4vi2.js +31 -0
  53. package/out/_next/static/chunks/0ulufxnsrou61.js +1 -0
  54. package/out/_next/static/chunks/0xa9dyg6ezzyd.js +2 -0
  55. package/out/_next/static/chunks/0xvrfvur0p534.js +1 -0
  56. package/out/_next/static/chunks/{35aagg46wp139.js → 0ybs1u66q26su.js} +1 -1
  57. package/out/_next/static/chunks/0ydfhk-p6zvm0.js +1 -0
  58. package/out/_next/static/chunks/{29gv2swsp7tzu.js → 0z004fn14pbcu.js} +1 -1
  59. package/out/_next/static/chunks/{2z9mdtudj8crz.js → 0z9erbl3llr_b.js} +226 -224
  60. package/out/_next/static/chunks/0zcsxvcvog9ue.js +1 -0
  61. package/out/_next/static/chunks/0zqgq0lwtz9tn.js +1 -0
  62. package/out/_next/static/chunks/1-ogak5u00kwa.js +1 -0
  63. package/out/_next/static/chunks/{1ng-fqh2_n984.js → 10_5p5-xf2aoo.js} +1 -1
  64. package/out/_next/static/chunks/118qlrzdwpfmo.js +1 -0
  65. package/out/_next/static/chunks/11km5p4gd0ut4.js +1 -0
  66. package/out/_next/static/chunks/120rl4l29q9xs.js +1 -0
  67. package/out/_next/static/chunks/{1ho02fc091nj2.js → 129m5i93ltoym.js} +1 -1
  68. package/out/_next/static/chunks/12n73o884lyyl.js +1 -0
  69. package/out/_next/static/chunks/{3n-7bcmfbh299.js → 13zcn4lv0qj76.js} +11 -11
  70. package/out/_next/static/chunks/15jlgfcaeaki9.js +1 -0
  71. package/out/_next/static/chunks/{1ux1rpe-n1mai.js → 15o4_2t-l3rj5.js} +1 -1
  72. package/out/_next/static/chunks/{00o9hr_3hd0r8.js → 175st2ogkg_1o.js} +1 -1
  73. package/out/_next/static/chunks/19rsodtu91ja_.js +1 -0
  74. package/out/_next/static/chunks/1a2ouhup611bz.js +1 -0
  75. package/out/_next/static/chunks/{1solqr18og2ot.js → 1by60_b14x-3o.js} +1 -1
  76. package/out/_next/static/chunks/1cyq7i39885sl.js +1 -0
  77. package/out/_next/static/chunks/1d9it6yocgt54.js +1 -0
  78. package/out/_next/static/chunks/1dp1s1t-y7gal.js +1 -0
  79. package/out/_next/static/chunks/1dr7gh6xgypl8.js +1 -0
  80. package/out/_next/static/chunks/{32vaw89wdwv5_.js → 1dt30s_sp8415.js} +1 -1
  81. package/out/_next/static/chunks/{1t7nl8rx7mabd.js → 1e8_jl2cxd3rp.js} +576 -576
  82. package/out/_next/static/chunks/1f1rek_fxk3of.js +1 -0
  83. package/out/_next/static/chunks/1f2mna0k5efeq.js +1 -0
  84. package/out/_next/static/chunks/1gfz3sxwkkg3d.js +1 -0
  85. package/out/_next/static/chunks/1gr35qeguuws0.js +1 -0
  86. package/out/_next/static/chunks/{0g2wngc6oe7fd.js → 1gttu-n9am66k.js} +255 -253
  87. package/out/_next/static/chunks/1imi0xwi9hd99.js +1 -0
  88. package/out/_next/static/chunks/1ka5v5zu0cstt.js +1 -0
  89. package/out/_next/static/chunks/{17aahvhpls1l7.js → 1l_3oidssbhns.js} +298 -231
  90. package/out/_next/static/chunks/1m9zc5gm-327d.js +112 -0
  91. package/out/_next/static/chunks/1n9nhz-6azcp3.js +3 -0
  92. package/out/_next/static/chunks/1ncqwe81t_9_x.js +1 -0
  93. package/out/_next/static/chunks/1nix_lulkpklo.js +1 -0
  94. package/out/_next/static/chunks/{141tngxsk32hq.js → 1ntqovuz2c217.js} +1 -1
  95. package/out/_next/static/chunks/1pgs-98tfkq9_.js +1 -0
  96. package/out/_next/static/chunks/1q2z0aeopo8t8.js +1 -0
  97. package/out/_next/static/chunks/{2zpn7010iqgsy.js → 1q4lkgxfnqnew.js} +1 -1
  98. package/out/_next/static/chunks/{2khh_pmm224k5.js → 1qg1l7t00nyib.js} +97 -300
  99. package/out/_next/static/chunks/{1qxhgauuomthl.js → 1rcdimhu0qhlu.js} +407 -407
  100. package/out/_next/static/chunks/1rlfg62jxqj3z.js +1 -0
  101. package/out/_next/static/chunks/1ses023uud001.js +1 -0
  102. package/out/_next/static/chunks/1t5oynmttpfsw.js +1 -0
  103. package/out/_next/static/chunks/{25gf6xn9u1c57.js → 1t9i20i5-f8ze.js} +1 -1
  104. package/out/_next/static/chunks/{2h5nvlgky7fpa.js → 1tgj55b305g4h.js} +1 -1
  105. package/out/_next/static/chunks/{255knovck7pv2.js → 1u8snlm6a7uhi.js} +4 -4
  106. package/out/_next/static/chunks/{04_3ri5emyfcu.js → 1ug4k-1zhr63a.js} +1 -1
  107. package/out/_next/static/chunks/{3-_08i4_7yhno.js → 1uh9zgsy69g92.js} +1 -1
  108. package/out/_next/static/chunks/1vrpzlif-z_p0.js +1 -0
  109. package/out/_next/static/chunks/1vurgl6oz2qey.js +17 -0
  110. package/out/_next/static/chunks/1w-qc09n9ijtq.js +1 -0
  111. package/out/_next/static/chunks/1ycqxcht6x54p.js +1 -0
  112. package/out/_next/static/chunks/{2zyjw8g4tiu51.js → 1zj4307ugq0qz.js} +1 -1
  113. package/out/_next/static/chunks/{425epvuw3yy-n.js → 1zkd8v-qka--j.js} +169 -174
  114. package/out/_next/static/chunks/1zm52cjrfrq7c.js +1 -0
  115. package/out/_next/static/chunks/{267q_eg-c6f6m.js → 1zm6eo861i3c8.js} +1 -1
  116. package/out/_next/static/chunks/{1e_-_7biavwmb.js → 1zp9363yfhpom.js} +1 -1
  117. package/out/_next/static/chunks/1zt1xxovnjhkm.js +1 -0
  118. package/out/_next/static/chunks/2-3hk_db5fpok.js +1 -0
  119. package/out/_next/static/chunks/2-bv9a_0zgw1f.js +1 -0
  120. package/out/_next/static/chunks/209sxygecny37.js +1 -0
  121. package/out/_next/static/chunks/{1ccn725by19i1.js → 216uiih3_vdfd.js} +1 -1
  122. package/out/_next/static/chunks/21kfpd_bityxt.js +1 -0
  123. package/out/_next/static/chunks/22yqh0zlo_vwr.js +1 -0
  124. package/out/_next/static/chunks/24ecas0m9tao7.js +3 -0
  125. package/out/_next/static/chunks/24pq9210rng3f.js +1 -0
  126. package/out/_next/static/chunks/{0zf26k6juhlzo.js → 267prao6fyt22.js} +23 -20
  127. package/out/_next/static/chunks/26skkagvj1z96.js +1 -0
  128. package/out/_next/static/chunks/26y9sv8_-ykxf.js +1 -0
  129. package/out/_next/static/chunks/2701xfv_07wz_.js +1 -0
  130. package/out/_next/static/chunks/{1x99m91nt1m3b.js → 271333m8y3k0e.js} +1 -1
  131. package/out/_next/static/chunks/29rkmguzky-bp.js +1 -0
  132. package/out/_next/static/chunks/{077eo-0dhbxz-.js → 2a07so920b6aa.js} +1 -1
  133. package/out/_next/static/chunks/2a2oy8ryz2tsk.js +1 -0
  134. package/out/_next/static/chunks/2ao-3jzz7yw3p.js +532 -0
  135. package/out/_next/static/chunks/2apihn9ra2ufp.js +1 -0
  136. package/out/_next/static/chunks/2apnpj0-fs9ks.js +1 -0
  137. package/out/_next/static/chunks/2b481pitl4k85.js +1 -0
  138. package/out/_next/static/chunks/2bettxaqt3d2p.js +1 -0
  139. package/out/_next/static/chunks/{1fyh50hjt7hi_.js → 2c721vfva711t.js} +1 -1
  140. package/out/_next/static/chunks/{442e2l3jzxd-_.js → 2d2kl_m64j9cb.js} +1 -1
  141. package/out/_next/static/chunks/2droqjmvmgj13.js +1 -0
  142. package/out/_next/static/chunks/2dxbvwbbgpzoq.js +1 -0
  143. package/out/_next/static/chunks/2eqbsut829r5l.js +1 -0
  144. package/out/_next/static/chunks/2f3_mzxjh3gso.js +1 -0
  145. package/out/_next/static/chunks/2fsde0jwi5qtt.js +1 -0
  146. package/out/_next/static/chunks/2h249uvhh2sij.js +114 -0
  147. package/out/_next/static/chunks/{1gvdmbr65lpud.js → 2izok2otbk8-2.js} +505 -505
  148. package/out/_next/static/chunks/{0yvevihll7sz-.js → 2j120dkh7q3uf.js} +1 -1
  149. package/out/_next/static/chunks/2j2ynchpqh34-.js +1 -0
  150. package/out/_next/static/chunks/2kj6pzs_wap1v.js +1 -0
  151. package/out/_next/static/chunks/{2-p206i_ihx09.js → 2kok6zedeeltw.js} +1 -1
  152. package/out/_next/static/chunks/2lnj9jruy4nrv.js +1 -0
  153. package/out/_next/static/chunks/{41yy4p3-rtyz1.js → 2lsvk7xcfkarc.js} +1 -1
  154. package/out/_next/static/chunks/2n-pveub8b_5t.js +1 -0
  155. package/out/_next/static/chunks/{00xc-0pj7on2s.js → 2n3xu_wbvtj7h.js} +29 -29
  156. package/out/_next/static/chunks/{1oljzgz5jistn.js → 2of8q0kaeqpf0.js} +1 -1
  157. package/out/_next/static/chunks/2ofwtw6p08sfz.js +1 -0
  158. package/out/_next/static/chunks/2phl5ta4iim7l.js +12 -0
  159. package/out/_next/static/chunks/2q6l-xdqzgmpf.js +1 -0
  160. package/out/_next/static/chunks/2q8yg63br2jc9.js +1 -0
  161. package/out/_next/static/chunks/2r5qgieqldcd9.js +1 -0
  162. package/out/_next/static/chunks/2r7y401cvjc1s.js +1 -0
  163. package/out/_next/static/chunks/{22ja7c3gk0_ko.js → 2r96kyeehsji9.js} +1 -1
  164. package/out/_next/static/chunks/{3gyyjsot8mdav.js → 2rmc6ru7mc-kg.js} +1 -1
  165. package/out/_next/static/chunks/{1ephzzweysylq.js → 2s6kpclh6ie7o.js} +901 -973
  166. package/out/_next/static/chunks/{0vso09vdz38sr.js → 2sys9nj8lo3uk.js} +1 -1
  167. package/out/_next/static/chunks/{0w-hm7g7trtjg.js → 2tc3e-iqv71y_.js} +1 -1
  168. package/out/_next/static/chunks/2uo6vm7mfgrbf.js +1 -0
  169. package/out/_next/static/chunks/2urx6fow8c8c9.js +505 -0
  170. package/out/_next/static/chunks/2w2k1gveljyb7.js +1 -0
  171. package/out/_next/static/chunks/{22rl_arnzs-ve.js → 2w99knknr5i8c.js} +1 -1
  172. package/out/_next/static/chunks/2w_ptlw-ad8-9.js +4 -0
  173. package/out/_next/static/chunks/2ws1s9d52ayv8.js +1 -0
  174. package/out/_next/static/chunks/2x7enks3ydgai.js +1 -0
  175. package/out/_next/static/chunks/{2e46-2ubc90do.js → 2y8i7_nxm4r05.js} +5 -5
  176. package/out/_next/static/chunks/2ydub0t01728d.js +1 -0
  177. package/out/_next/static/chunks/{309f81l5ucsb_.js → 2z_iab7ozohhq.js} +60 -60
  178. package/out/_next/static/chunks/3-m_vzabs1uez.js +1 -0
  179. package/out/_next/static/chunks/{0t89-lfct-7m6.js → 302qk2fjdrthp.js} +5 -5
  180. package/out/_next/static/chunks/30bhz7czzs4mf.js +1 -0
  181. package/out/_next/static/chunks/{0tn-9w46cwydp.js → 30n4y_uu8chbh.js} +515 -514
  182. package/out/_next/static/chunks/{2-hdejef-mpka.js → 32_c4mbb6j1l6.js} +372 -169
  183. package/out/_next/static/chunks/33hp-khdfohdq.js +1 -0
  184. package/out/_next/static/chunks/{28ndw4nsw2t_4.js → 33i36o_l69sm5.js} +1 -1
  185. package/out/_next/static/chunks/3527r3jo5fj3i.js +1 -0
  186. package/out/_next/static/chunks/355dg8yaa94hr.js +1 -0
  187. package/out/_next/static/chunks/{11p92pnn5el0v.js → 35ntbr_c-yx44.js} +1 -1
  188. package/out/_next/static/chunks/{2rjfrjhp4kjev.js → 35sne1llxnc-m.js} +57 -57
  189. package/out/_next/static/chunks/36enkx1skkv2-.js +4 -0
  190. package/out/_next/static/chunks/{3-x7522okdy-7.js → 3772oce1n3t_g.js} +1 -1
  191. package/out/_next/static/chunks/{1rb8wewjbdisv.js → 37cnbm5ft1mqf.js} +1 -1
  192. package/out/_next/static/chunks/38xdo3cifphut.js +1 -0
  193. package/out/_next/static/chunks/{1tt1bbry-4f-6.js → 3_dgblylldcgb.js} +1 -1
  194. package/out/_next/static/chunks/3beawo-qwuk8k.js +1 -0
  195. package/out/_next/static/chunks/3cj_6sl9kr3e9.js +1 -0
  196. package/out/_next/static/chunks/3d-i_skta_wes.js +1 -0
  197. package/out/_next/static/chunks/3df_l2we755bb.js +1 -0
  198. package/out/_next/static/chunks/{43hwl25uke0l_.js → 3eve5y7fpzx2h.js} +1 -1
  199. package/out/_next/static/chunks/3ewgyb4y19w-3.js +1 -0
  200. package/out/_next/static/chunks/3f3789eh18_oy.js +1 -0
  201. package/out/_next/static/chunks/{1n_gxvu31aofy.js → 3f8qelpscqfym.js} +2 -2
  202. package/out/_next/static/chunks/3g3-e9m1en45q.js +1 -0
  203. package/out/_next/static/chunks/{0uxdbfa8gv6tk.js → 3h6akt2uu05ku.js} +29 -29
  204. package/out/_next/static/chunks/{3w4qettzp7khe.js → 3huu0tqmxwowu.js} +523 -522
  205. package/out/_next/static/chunks/3i239y-1hbkm-.js +1 -0
  206. package/out/_next/static/chunks/{1qsut_e3msg0l.js → 3ipx7xbxchsq9.js} +1 -1
  207. package/out/_next/static/chunks/{2ftp5xmq_w23j.js → 3j9xvdz55bi4p.js} +345 -345
  208. package/out/_next/static/chunks/3kp8qmhoi24oz.js +1 -0
  209. package/out/_next/static/chunks/3ksq69yq-40_r.js +1 -0
  210. package/out/_next/static/chunks/{2x83vs8ns4pww.js → 3njwfothmmg7u.js} +3 -3
  211. package/out/_next/static/chunks/{0bj_310rugcn1.js → 3oqxl46ukaojj.js} +11 -11
  212. package/out/_next/static/chunks/{1upkv4ltuh3s5.js → 3qn6r8-0u6dij.js} +352 -352
  213. package/out/_next/static/chunks/3qye1lytea2i8.js +1 -0
  214. package/out/_next/static/chunks/3rlp9yr75liz7.js +1 -0
  215. package/out/_next/static/chunks/{2i82rmjta9ijs.js → 3sa_hlx3konc7.js} +1 -1
  216. package/out/_next/static/chunks/3tyo643l62h3m.js +1 -0
  217. package/out/_next/static/chunks/3tz2tpqa9uvwm.js +1 -0
  218. package/out/_next/static/chunks/{2pbgsq7vvtk8_.js → 3utpc-fc6_y0f.js} +1 -1
  219. package/out/_next/static/chunks/3v-0c2aj6c0on.js +1 -0
  220. package/out/_next/static/chunks/3v6nxa28rxngq.js +1 -0
  221. package/out/_next/static/chunks/{1og49_atcksim.js → 3vbamaoiuk9yj.js} +1 -1
  222. package/out/_next/static/chunks/3vv99btjc-mky.js +1 -0
  223. package/out/_next/static/chunks/{1nqojcig-0m3c.js → 3w59kt5ztyvoq.js} +1 -1
  224. package/out/_next/static/chunks/3x02lxdo28u9i.js +1 -0
  225. package/out/_next/static/chunks/3xl-op0hwxytg.js +272 -0
  226. package/out/_next/static/chunks/3ydnxyc4rvad_.js +1 -0
  227. package/out/_next/static/chunks/3ylg4gfetwgxw.js +1 -0
  228. package/out/_next/static/chunks/{1-4v8oivkgnyl.js → 3zdtteq-r2fs5.js} +3 -3
  229. package/out/_next/static/chunks/3zkwt0gybqtgm.js +1 -0
  230. package/out/_next/static/chunks/{0wq_9f98weoe3.js → 3zs7l4362msjd.js} +1 -1
  231. package/out/_next/static/chunks/40etabvml_71y.js +1 -0
  232. package/out/_next/static/chunks/417jkzz0slv9m.js +1 -0
  233. package/out/_next/static/chunks/41b5gpyqbj58m.js +338 -0
  234. package/out/_next/static/chunks/41u2-5jayyajf.js +22 -0
  235. package/out/_next/static/chunks/42gcpy51w7lk1.js +1 -0
  236. package/out/_next/static/chunks/{1ph0tfo-4hl-f.js → 42ymanq326mo7.js} +1 -1
  237. package/out/_next/static/chunks/{3w_umk1xtj6to.js → 43fp64xnfy646.js} +1 -1
  238. package/out/_next/static/chunks/43v4y2gu5z9_h.js +1 -0
  239. package/out/_next/static/chunks/44cer242u-f8v.js +1 -0
  240. package/out/_next/static/chunks/{1ozi46t8jajqh.js → 44zi0gl0a6a8w.js} +1 -1
  241. package/out/_next/static/chunks/turbopack-0n2o5_bkskckx.js +1 -0
  242. package/out/_not-found/__next._full.txt +12 -12
  243. package/out/_not-found/__next._not-found.__PAGE__.txt +19 -2
  244. package/out/_not-found/__next._tree.txt +2 -2
  245. package/out/_not-found.html +1 -1
  246. package/out/_not-found.txt +12 -12
  247. package/out/index.html +1 -1
  248. package/out/index.txt +11 -11
  249. package/package.json +15 -15
  250. package/out/__next._head.txt +0 -6
  251. package/out/__next._index.txt +0 -5
  252. package/out/_next/static/chunks/00g5suuoa-_wn.js +0 -1
  253. package/out/_next/static/chunks/01fh3_bncbe5u.js +0 -1
  254. package/out/_next/static/chunks/01urdkl1j8o6l.js +0 -1
  255. package/out/_next/static/chunks/026vw95s88gsy.js +0 -1
  256. package/out/_next/static/chunks/02eui3ctddbd2.js +0 -1
  257. package/out/_next/static/chunks/04c4nksb5y9r-.js +0 -1
  258. package/out/_next/static/chunks/04g-l-_b4payc.js +0 -1
  259. package/out/_next/static/chunks/04j9pexbmysdy.js +0 -1
  260. package/out/_next/static/chunks/055baac5e-c2o.js +0 -1
  261. package/out/_next/static/chunks/05bdni_jrobq1.js +0 -1
  262. package/out/_next/static/chunks/05o0tb8l_htmw.js +0 -1
  263. package/out/_next/static/chunks/07z6p262h5hgl.js +0 -1
  264. package/out/_next/static/chunks/08m_4cihfmik8.js +0 -1
  265. package/out/_next/static/chunks/08obqw64faj8j.js +0 -1
  266. package/out/_next/static/chunks/099ilz3dmm1jw.js +0 -1
  267. package/out/_next/static/chunks/09ppu_k464q-n.js +0 -1
  268. package/out/_next/static/chunks/0bgcaf2x51kms.js +0 -1
  269. package/out/_next/static/chunks/0c5d3qn2mb3ew.js +0 -1
  270. package/out/_next/static/chunks/0dck67in84de0.js +0 -1
  271. package/out/_next/static/chunks/0dg4wxz-6u5lo.js +0 -1
  272. package/out/_next/static/chunks/0dva036n8ab62.js +0 -1
  273. package/out/_next/static/chunks/0erga_bzezbza.js +0 -1
  274. package/out/_next/static/chunks/0f0-i105odxqd.js +0 -1
  275. package/out/_next/static/chunks/0gyeqz9pagssf.js +0 -1
  276. package/out/_next/static/chunks/0i82k-t0fbn8f.js +0 -1
  277. package/out/_next/static/chunks/0kzw45f61wm3j.js +0 -1
  278. package/out/_next/static/chunks/0l8bfa2xewq69.js +0 -1
  279. package/out/_next/static/chunks/0n-zml1gn0o1u.js +0 -1
  280. package/out/_next/static/chunks/0n92hec_jb_-_.js +0 -1
  281. package/out/_next/static/chunks/0pv2wirx45e1m.js +0 -1
  282. package/out/_next/static/chunks/0qxd_8t3nca36.js +0 -1
  283. package/out/_next/static/chunks/0s1jghzw8jufz.js +0 -1
  284. package/out/_next/static/chunks/0s84ekz_f9ngx.js +0 -1
  285. package/out/_next/static/chunks/0ti58h622yo-_.js +0 -2
  286. package/out/_next/static/chunks/0u8yr4k1y6m2t.js +0 -1
  287. package/out/_next/static/chunks/0ubxyut5rr600.js +0 -1
  288. package/out/_next/static/chunks/0wbw9h7rsis2r.js +0 -1
  289. package/out/_next/static/chunks/0y4e49hpuucdi.js +0 -1
  290. package/out/_next/static/chunks/1-b44873bjsdw.js +0 -1
  291. package/out/_next/static/chunks/1-c3a1vnl8v1q.js +0 -1
  292. package/out/_next/static/chunks/1-xf86jgea22y.js +0 -1
  293. package/out/_next/static/chunks/10b0qqdnb_nox.js +0 -1
  294. package/out/_next/static/chunks/12kdmh0h_mboy.js +0 -1
  295. package/out/_next/static/chunks/14ijcpo72av4r.js +0 -1
  296. package/out/_next/static/chunks/16hdip1drt8o-.js +0 -1
  297. package/out/_next/static/chunks/18txc1wwwu9f9.js +0 -1
  298. package/out/_next/static/chunks/18wa83g0qfh-b.js +0 -1
  299. package/out/_next/static/chunks/19dp8nr4uygg2.js +0 -5
  300. package/out/_next/static/chunks/1_8acnu6_-qe-.js +0 -1
  301. package/out/_next/static/chunks/1__nujzr9e352.js +0 -3
  302. package/out/_next/static/chunks/1bmyq1b0by7ug.js +0 -1
  303. package/out/_next/static/chunks/1d1tpj9nm1nhf.js +0 -1
  304. package/out/_next/static/chunks/1dfwa563iciz3.js +0 -1
  305. package/out/_next/static/chunks/1di5enkavl9vx.js +0 -4
  306. package/out/_next/static/chunks/1fwsjnd1y-lx_.js +0 -1
  307. package/out/_next/static/chunks/1gaexq_suxai0.js +0 -1
  308. package/out/_next/static/chunks/1gnggc6370ji-.js +0 -1
  309. package/out/_next/static/chunks/1gtj_l5ame5mw.js +0 -1
  310. package/out/_next/static/chunks/1hsvckd0sgdgr.js +0 -1
  311. package/out/_next/static/chunks/1i4f3n_2_3ery.js +0 -1
  312. package/out/_next/static/chunks/1j7e3qpjuj89a.js +0 -1
  313. package/out/_next/static/chunks/1mrvp94tietcv.js +0 -1
  314. package/out/_next/static/chunks/1mvadj46owrck.js +0 -1
  315. package/out/_next/static/chunks/1nasz7q3tvb53.js +0 -1
  316. package/out/_next/static/chunks/1o3ggu95lfu6i.js +0 -1
  317. package/out/_next/static/chunks/1qjsgebn9m-0l.js +0 -1
  318. package/out/_next/static/chunks/1rr74xxjtckyv.js +0 -1
  319. package/out/_next/static/chunks/1uu55ejvi7q5u.js +0 -1
  320. package/out/_next/static/chunks/1xbzxfeq9789f.js +0 -1
  321. package/out/_next/static/chunks/1ybiu-rkt50_1.js +0 -1
  322. package/out/_next/static/chunks/20qelrstvz9_n.js +0 -1
  323. package/out/_next/static/chunks/21at65obnoo8z.js +0 -1
  324. package/out/_next/static/chunks/21ko5mxfderw0.js +0 -1
  325. package/out/_next/static/chunks/21muzwu43o8xg.js +0 -1
  326. package/out/_next/static/chunks/23d-hvrwpixpm.js +0 -1
  327. package/out/_next/static/chunks/2569rrrffvm2w.js +0 -31
  328. package/out/_next/static/chunks/29o74k0d6hkdf.js +0 -1
  329. package/out/_next/static/chunks/2bm95r0011asw.js +0 -1
  330. package/out/_next/static/chunks/2btabnibkm0db.js +0 -1
  331. package/out/_next/static/chunks/2c--awgkdcikq.js +0 -1
  332. package/out/_next/static/chunks/2c2dspoukng-5.js +0 -1
  333. package/out/_next/static/chunks/2ep7mjbaoeou0.js +0 -1
  334. package/out/_next/static/chunks/2ezgqm7atphi6.js +0 -1
  335. package/out/_next/static/chunks/2gfjzq_vjea4w.js +0 -1
  336. package/out/_next/static/chunks/2h5hase6ewoyc.js +0 -1
  337. package/out/_next/static/chunks/2hghi41nhdww2.css +0 -3
  338. package/out/_next/static/chunks/2ies66gmou203.js +0 -1
  339. package/out/_next/static/chunks/2jenu2eek9viz.js +0 -1
  340. package/out/_next/static/chunks/2luaj_cf5f19-.js +0 -1
  341. package/out/_next/static/chunks/2mgmvz66gh5ub.js +0 -1
  342. package/out/_next/static/chunks/2nwlqtv3vrzcv.js +0 -1
  343. package/out/_next/static/chunks/2o8k8x5zcepfy.js +0 -1
  344. package/out/_next/static/chunks/2pcdnd4nzcw4c.js +0 -1
  345. package/out/_next/static/chunks/2q0rz76kj6h5z.js +0 -1
  346. package/out/_next/static/chunks/2si5cg3hl5dtf.js +0 -4
  347. package/out/_next/static/chunks/2uhrhq35bki6u.js +0 -1
  348. package/out/_next/static/chunks/2wi7y3sfqyqdo.js +0 -3
  349. package/out/_next/static/chunks/2ymtumj-hfrjo.js +0 -1
  350. package/out/_next/static/chunks/2zdzgmacaoor9.js +0 -1
  351. package/out/_next/static/chunks/3-irhmtm1q5qw.js +0 -1
  352. package/out/_next/static/chunks/3-k74vn9exnb6.js +0 -1
  353. package/out/_next/static/chunks/31ei992g8gqz9.js +0 -1
  354. package/out/_next/static/chunks/34845aqksy1dl.js +0 -3
  355. package/out/_next/static/chunks/34y7nx6qmat06.js +0 -1
  356. package/out/_next/static/chunks/36rqw8h6ildpl.js +0 -1
  357. package/out/_next/static/chunks/3a_khw6q6pyh1.js +0 -1
  358. package/out/_next/static/chunks/3c_31f20z4jrl.js +0 -1
  359. package/out/_next/static/chunks/3ckp70rgr63u9.js +0 -1
  360. package/out/_next/static/chunks/3ed24zmt8qfys.js +0 -1
  361. package/out/_next/static/chunks/3ez20hi1mxw0w.js +0 -1
  362. package/out/_next/static/chunks/3fdx-rnos5ft-.js +0 -1
  363. package/out/_next/static/chunks/3fgfbxxb-j_bn.js +0 -4
  364. package/out/_next/static/chunks/3k-gz8qf-mj-p.js +0 -1
  365. package/out/_next/static/chunks/3lehc5pujwhsz.js +0 -1
  366. package/out/_next/static/chunks/3m0ytnc241yfz.js +0 -1
  367. package/out/_next/static/chunks/3mpe7c3iyxn5h.js +0 -1
  368. package/out/_next/static/chunks/3mvaub8qjdyuc.js +0 -1
  369. package/out/_next/static/chunks/3nw7u4bie0-g6.js +0 -1
  370. package/out/_next/static/chunks/3qatb38-tk_gd.js +0 -1
  371. package/out/_next/static/chunks/3tdcdi_utmoy_.js +0 -1
  372. package/out/_next/static/chunks/3tdzweqszru4y.js +0 -1
  373. package/out/_next/static/chunks/3tt_ir_va6262.js +0 -1
  374. package/out/_next/static/chunks/3y_51bmdnc0ey.js +0 -1
  375. package/out/_next/static/chunks/3yr66ufoli71t.js +0 -1
  376. package/out/_next/static/chunks/41qxc142snm22.js +0 -1
  377. package/out/_next/static/chunks/43qmngblcab8f.js +0 -1
  378. package/out/_next/static/chunks/turbopack-3r8yn0j92tqw_.js +0 -1
  379. package/out/_not-found/__next._head.txt +0 -6
  380. package/out/_not-found/__next._index.txt +0 -5
  381. package/out/_not-found/__next._not-found.txt +0 -5
  382. /package/out/_next/static/{BvOGdrl2Cfw-jVV73WY6a → A1hxMz783bIWo0Q9qqV3L}/_buildManifest.js +0 -0
  383. /package/out/_next/static/{BvOGdrl2Cfw-jVV73WY6a → A1hxMz783bIWo0Q9qqV3L}/_clientMiddlewareManifest.js +0 -0
  384. /package/out/_next/static/{BvOGdrl2Cfw-jVV73WY6a → A1hxMz783bIWo0Q9qqV3L}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,56054,e=>{"use strict";e.s(["HEAT_GRADIENT",0,"linear-gradient(to right, rgb(178,47,38), rgb(224,123,57), rgb(244,200,75))","heatRgb",0,function(e){let t=Math.max(0,Math.min(1,e)),n=[.878,.482,.224],s=(e,t,n)=>[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n,e[2]+(t[2]-e[2])*n];return t<.5?s([.698,.184,.149],n,t/.5):s(n,[.957,.784,.294],(t-.5)/.5)},"percentileMax",0,function(e,t=.95){if(0===e.length)return 1;let n=[...e].sort((e,t)=>e-t),s=Math.max(0,Math.min(1,t))*(n.length-1),i=Math.floor(s),r=Math.ceil(s);return Math.max(1,i===r?n[i]:n[i]+(n[r]-n[i])*(s-i))}])},18637,e=>{"use strict";var t=e.i(46369),n=e.i(56054);e.s(["HeatLegend",0,function({title:e,lowLabel:s="low",highLabel:i="high",note:r}){return(0,t.jsxs)("div",{className:"pointer-events-none absolute bottom-3 left-3 rounded-md border border-edge bg-ink/80 px-3 py-2 text-fg backdrop-blur-sm",children:[(0,t.jsx)("div",{className:"mb-1 text-xs font-medium text-fg",children:e}),(0,t.jsx)("div",{className:"h-2 w-36 rounded-sm",style:{background:n.HEAT_GRADIENT}}),(0,t.jsxs)("div",{className:"mt-1 flex w-36 justify-between text-[10px] text-fg-muted",children:[(0,t.jsx)("span",{children:s}),(0,t.jsx)("span",{children:i})]}),r?(0,t.jsx)("div",{className:"mt-1 max-w-44 text-[10px] leading-tight text-fg-muted",children:r}):null]})}])},60614,e=>{"use strict";async function t(e,t){let n=await e.scenes(t).catch(()=>[]);if(0===n.length)return[];let s=await Promise.all(n.map(t=>e.sceneRepresentation(t.scene_id).catch(()=>null))),i=new Set,r=[];for(let e of s)for(let t of e?.proxy?.meshes??[])i.has(t.name)||(i.add(t.name),r.push(t));return r}e.s(["mergeSceneProxies",0,t])},37215,e=>{"use strict";var t=e.i(46369);let n=(0,t.jsxs)(t.Fragment,{children:["Each ",(0,t.jsx)("strong",{children:"source"})," is a camera ",(0,t.jsx)("em",{children:"gaze-direction bin"})," — a cell on the sphere of where viewers were looking (grouped by azimuth/elevation). Each ",(0,t.jsx)("strong",{children:"target"})," is a"," ",(0,t.jsx)("em",{children:"mesh that was clicked"}),". A ribbon's thickness is how many clicks on that mesh happened while viewers looked from that direction, so you can see which viewpoints drive interaction with which objects. When the scene reports ",(0,t.jsx)("em",{children:"standpoints"}),' (where the viewer stood, §7.8), pick one to gate the flow to clicks made from that vantage — a pin marks it in the scene. "All standpoints" is the aggregate view. Switch to ',(0,t.jsx)("strong",{children:"Two-stage"})," ","for a three-column ",(0,t.jsx)("em",{children:"standpoint → gaze sector → mesh"}),' flow with a birdview minimap; the busiest standpoints/meshes are kept and the tail folds into an "Other" node.']});e.s(["CAMERA_DOME_SUBTITLE",0,"Where the audience looked, mapped onto a sphere — drag to orbit, +/- to zoom, double-click to focus","CAMERA_DOME_TITLE",0,"View-direction dome (3D)","CLICK_RAYS_SUBTITLE",0,"Each click joined to the view it was made from — gate by viewpoint or focus a mesh; double-click to recenter","CLICK_RAYS_TITLE",0,"Click rays (3D)","ERROR_HEATMAP_SUBTITLE",0,"Where errors & engine diagnostics fired, voxel-binned by the camera position at the moment they hit — drag to orbit, double-click to focus","ERROR_HEATMAP_TITLE",0,"Error heatmap (3D)","FLOW_SANKEY_HELP",0,n,"FLOW_SANKEY_SUBTITLE",0,"Direction-bin → mesh links (aggregate), or standpoint → gaze → mesh (two-stage) — double-click to focus","FLOW_SANKEY_TITLE",0,"Flow Sankey (3D)","GAZE_CLICK_SUBTITLE",0,"Where viewers look (gaze) vs. where they act (clicks), voxel-binned in world space — double-click to focus","GAZE_CLICK_TITLE",0,"Gaze vs. click divergence","PERF_HEATMAP_SUBTITLE",0,"Where FPS is bad in your scene — frame_perf samples voxel-binned by camera position; hot = slow. Drag to orbit, +/- to zoom, double-click to focus","PERF_HEATMAP_TITLE",0,"Performance heatmap (3D)","SESSION_REPLAY_TITLE",0,"Session replay","WORLD_HEATMAP_SUBTITLE",0,"Pointer hit-points voxel-binned in world space — drag to orbit, +/- to zoom, double-click to focus","WORLD_HEATMAP_TITLE",0,"World heatmap (3D)","sessionReplaySubtitle",0,function(e){return e?"Following this session live — new camera moves and interactions stream in and the timeline grows. Scrub back to review, then press ● LIVE to return to the edge.":"Scrub the camera path and interaction rays; every click stays marked and glows as the playhead passes it. The color-coded strip marks when each event fired (click to seek)."},"sessionReplayTitle",0,function(e){return e?"Session replay · live":"Session replay (birdview timeline)"}])},20880,e=>{"use strict";class t extends Error{status;constructor(e,t){super(e),this.status=t,this.name="ApiError"}}async function n(e,t,n){let s=e.getReader(),i=new TextDecoder,r="";for(t.addEventListener("abort",()=>void s.cancel().catch(()=>{}));;){let{done:e,value:t}=await s.read();if(e)return;let a=(r+=i.decode(t,{stream:!0})).indexOf("\n\n");for(;a>=0;){let e=r.slice(0,a);r=r.slice(a+2);let t="message",s=[];for(let n of e.split("\n"))!n.startsWith(":")&&(n.startsWith("event:")?t=n.slice(6).trim():n.startsWith("data:")&&s.push(n.slice(5).replace(/^ /,"")));"event"===t&&s.length>0&&n(s.join("\n")),a=r.indexOf("\n\n")}}}function s(e){return e.endsWith("/")?e:`${e}/`}e.s(["ApiError",0,t,"CollectorApi",0,class{baseUrl;apiKey;constructor(e,t){this.baseUrl=e,this.apiKey=t}async get(e,n={}){let i=new URL(e,s(this.baseUrl));for(let[e,t]of Object.entries(n))null!=t&&i.searchParams.set(e,String(t));let r=await fetch(i,{headers:{"x-api-key":this.apiKey},cache:"no-store"});if(!r.ok)throw new t(await r.text().catch(()=>"")||r.statusText,r.status);return await r.json()}read(e,t){return this.get(e,t)}sessions(e){return this.get("api/v1/sessions",e).then(e=>e.map(e=>({...e,events:Number(e.events)})))}pointerHeatmap(e){return this.get("api/v1/heatmaps/pointer",e)}meshUvHeatmap(e){return this.get("api/v1/heatmaps/mesh-uv",e)}cameraHeatmap(e){return this.get("api/v1/heatmaps/camera",e)}viewCoverageHistogram(e){return this.get("api/v1/coverage/view-histogram",e).then(e=>e.map(e=>({bucket:Number(e.bucket??0),sessions:Number(e.sessions??0)})))}topMeshes(e){return this.get("api/v1/meshes/top",e).then(e=>e.map(e=>({...e,count:Number(e.count)})))}meshBlindSpots(e){return this.get("api/v1/meshes/blind-spots",e).then(e=>e.map(e=>({mesh:String(e.mesh??""),visible_ms:Number(e.visible_ms??0),vis_samples:Number(e.vis_samples??0),interactions:Number(e.interactions??0),hover_ms:Number(e.hover_ms??0),hover_episodes:Number(e.hover_episodes??0)})))}meshKinds(e){return this.get("api/v1/meshes/kinds",e).then(e=>e.map(e=>({mesh:String(e.mesh??""),kind:String(e.kind??""),count:Number(e.count??0)})))}reachability(e){return this.get("api/v1/meshes/reachability",e).then(e=>e.map(e=>({mesh:String(e.mesh??""),bucket:Number(e.bucket??0),count:Number(e.count??0),avg_distance:Number(e.avg_distance??0)})))}topMeshesBySource(e){return this.get("api/v1/meshes/sources",e).then(e=>e.map(e=>({mesh:String(e.mesh??""),source:String(e.source??""),count:Number(e.count??0)})))}topMeshesTrend(e){return this.get("api/v1/meshes/trend",e).then(e=>e.map(e=>({mesh:String(e.mesh??""),bucket:Number(e.bucket??0),count:Number(e.count??0)})))}topInputActions(e){return this.get("api/v1/input-actions/top",e).then(e=>e.map(e=>({action:String(e.action??""),source:String(e.source??""),count:Number(e.count??0)})))}perf(e){return this.get("api/v1/perf",e).then(e=>({samples:Number(e.samples??0),avg_fps:Number(e.avg_fps??0),min_fps:Number(e.min_fps??0),p50_fps:Number(e.p50_fps??0)}))}renderScale(e){return this.get("api/v1/perf/render-scale",e).then(e=>{let t=e[0]??{},n=Number(t.downscaled_samples??0),s=Number(t.scale_samples??0);return{samples:Number(t.samples??0),avg_fps:Number(t.avg_fps??0),p50_fps:Number(t.p50_fps??0),avg_render_scale:Number(t.avg_render_scale??0),p50_render_scale:Number(t.p50_render_scale??0),downscaled_samples:n,scale_samples:s,downscaled_share:s>0?n/s:0}})}perfDistribution(e){return this.get("api/v1/perf/distribution",e).then(e=>{let t=e[0]??{};return{sessions:Number(t.sessions??0),samples:Number(t.samples??0),p05_fps:Number(t.p05_fps??0),p50_fps:Number(t.p50_fps??0),p95_fps:Number(t.p95_fps??0)}})}fpsHistogram(e){return this.get("api/v1/perf/fps-histogram",e).then(e=>e.map(e=>({bucket:Number(e.bucket??0),sessions:Number(e.sessions??0)})))}frameTimePercentiles(e){return this.get("api/v1/perf/frame-time",e).then(e=>{let t=e[0]??{};return{sessions:Number(t.sessions??0),samples:Number(t.samples??0),p50_ms:Number(t.p50_ms??0),p95_ms:Number(t.p95_ms??0)}})}jankRate(e){return this.get("api/v1/perf/jank",e).then(e=>{let t=e[0]??{};return{sessions:Number(t.sessions??0),total_long_frames:Number(t.total_long_frames??0),median_rate:Number(t.median_rate??0),worst_decile_rate:Number(t.worst_decile_rate??0)}})}perfChurn(e){return this.get("api/v1/perf/churn",e).then(e=>{let t=e[0]??{};return{sessions:Number(t.sessions??0),churn_sessions:Number(t.churn_sessions??0),fps_churn_sessions:Number(t.fps_churn_sessions??0),stall_churn_sessions:Number(t.stall_churn_sessions??0)}})}perfByDevice(e){return this.get("api/v1/perf/by-device",e).then(e=>e.map(e=>({engine:String(e.engine??""),is_mobile:String(e.is_mobile??""),renderer:String(e.renderer??""),browser:String(e.browser??""),os:String(e.os??""),sessions:Number(e.sessions??0),samples:Number(e.samples??0),p50_fps:Number(e.p50_fps??0)})))}perfByScene(e){return this.get("api/v1/perf/by-scene",e).then(e=>e.map(e=>({scene_id:String(e.scene_id??""),sessions:Number(e.sessions??0),samples:Number(e.samples??0),p50_fps:Number(e.p50_fps??0)})))}resourcePercentiles(e){return this.get("api/v1/perf/resource-percentiles",e).then(e=>{let t=e[0]??{};return{sessions:Number(t.sessions??0),samples:Number(t.samples??0),p50_js_heap_bytes:Number(t.p50_js_heap_bytes??0),p95_js_heap_bytes:Number(t.p95_js_heap_bytes??0),p50_texture_bytes:Number(t.p50_texture_bytes??0),p95_texture_bytes:Number(t.p95_texture_bytes??0),p50_triangles:Number(t.p50_triangles??0),p95_triangles:Number(t.p95_triangles??0)}})}stabilityCounts(e){return this.get("api/v1/perf/stability",e).then(e=>{let t=e[0]??{};return{context_losses:Number(t.context_losses??0),compile_stalls:Number(t.compile_stalls??0),incidents:Number(t.incidents??0)}})}graphicsDiagnosticCounts(e){return this.get("api/v1/graphics-diagnostics",e).then(e=>e.map(e=>({severity:String(e.severity??""),category:String(e.category??""),backend:String(e.backend??""),incidents:Number(e.incidents??0)})))}renderingTechnology(e){return this.get("api/v1/rendering-technology",e).then(e=>e.map(e=>({api:String(e.api??""),backend:String(e.backend??""),apiVersion:String(e.api_version??""),shadingLanguage:String(e.shading_language??""),sessions:Number(e.sessions??0)})))}worldHeatmap(e){return this.get("api/v1/heatmaps/world",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),count:Number(e.count)})))}gazeHeatmap(e){return this.get("api/v1/heatmaps/gaze",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),count:Number(e.count)})))}errorHeatmap(e){return this.get("api/v1/heatmaps/errors",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),count:Number(e.count)})))}worldHeatmapStats(e){return this.get("api/v1/heatmaps/world/stats",e).then(e=>({cellSize:Number(e.cellSize??0),cells:Number(e.cells??0),hits:Number(e.hits??0)}))}gazeHeatmapStats(e){return this.get("api/v1/heatmaps/gaze/stats",e).then(e=>({cellSize:Number(e.cellSize??0),cells:Number(e.cells??0),hits:Number(e.hits??0)}))}cameraPositionHeatmap(e){return this.get("api/v1/heatmaps/position",e).then(e=>e.map(e=>({gx:Number(e.gx),gz:Number(e.gz),avg_y:Number(e.avg_y??0),count:Number(e.count??0)})))}sessionTrajectory(e,t){return this.get(`api/v1/sessions/${encodeURIComponent(e)}/trajectory`,t).then(e=>e.map(e=>({ts:Number(e.ts),x:Number(e.x),y:Number(e.y),z:Number(e.z)})))}aggregatePaths(e){return this.get("api/v1/paths",e).then(e=>e.map(e=>({session_id:String(e.session_id??""),ts:Number(e.ts),gx:Number(e.gx),gz:Number(e.gz)})))}clickRays(e){return this.get("api/v1/heatmaps/click-rays",e).then(e=>e.map(e=>({camVoxel:[Number(e.cam_vx),Number(e.cam_vy),Number(e.cam_vz)],origin:[Number(e.origin_x),Number(e.origin_y),Number(e.origin_z)],hitVoxel:[Number(e.hit_vx),Number(e.hit_vy),Number(e.hit_vz)],hit:[Number(e.hit_x),Number(e.hit_y),Number(e.hit_z)],mesh:String(e.mesh??""),count:Number(e.count)})))}flowHeatmap(e){return this.get("api/v1/heatmaps/flow",e).then(e=>e.map(e=>{let t={azimuth_bin:Number(e.azimuth_bin),elevation_bin:Number(e.elevation_bin),mesh:String(e.mesh??""),count:Number(e.count)};return null!=e.origin_vx&&(t.originVoxel=[Number(e.origin_vx),Number(e.origin_vy),Number(e.origin_vz)],t.origin=[Number(e.origin_x),Number(e.origin_y),Number(e.origin_z)]),t}))}scenes(e){return this.get("api/v1/scenes",e).then(e=>e.map(e=>({...e,events:Number(e.events)})))}timeseries(e){return this.get("api/v1/timeseries",e).then(e=>e.map(e=>({bucket:Number(e.bucket),events:Number(e.events??0),avg_fps:Number(e.avg_fps??0)})))}eventCounts(e){return this.get("api/v1/event-counts",e).then(e=>e.map(e=>({event_type:String(e.event_type),count:Number(e.count??0)})))}funnel(e,t){return this.get("api/v1/funnel",{...t,steps:JSON.stringify(e)}).then(e=>e.map(e=>({step:Number(e.step),sessions:Number(e.sessions??0)})))}sceneRetention(e){return this.get("api/v1/scene-retention",e).then(e=>e.map(e=>({from:String(e.from_scene??""),to:String(e.to_scene??""),sessions:Number(e.sessions??0)})))}loadBounce(e){let{bands:t,...n}=e??{};return this.get("api/v1/load-bounce",{...n,...null!=t&&t.length>0?{bands:t.join(",")}:{}}).then(e=>e.map(e=>({band:Number(e.band??0),sessions:Number(e.sessions??0),bounced:Number(e.bounced??0)})))}variantLeaderboard(e={},t){return this.get("api/v1/variant-leaderboard",{...t,variant:e.variant?JSON.stringify(e.variant):void 0,conversion:e.conversion?JSON.stringify(e.conversion):void 0}).then(e=>e.map(e=>{let t=Number(e.sessions??0),n=Number(e.conversions??0);return{variant:String(e.variant),views:Number(e.views??0),sessions:t,conversions:n,avgDwellMs:Number(e.avg_dwell_ms??0),conversionRate:t>0?n/t:0}}))}coverage(e){return this.get("api/v1/coverage",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),count:Number(e.count??0)})))}perfHeatmap(e){return this.get("api/v1/heatmaps/perf",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),samples:Number(e.samples??0),avgFps:Number(e.avg_fps??0),minFps:Number(e.min_fps??0)})))}cameraDistance(e){return this.get("api/v1/camera/distance",e).then(e=>e.map(e=>({bucket:Number(e.bucket),count:Number(e.count??0)})))}navigation(e){return this.get("api/v1/navigation",e).then(e=>e.map(e=>({session_id:String(e.session_id??""),segments:Number(e.segments??0),total_distance:Number(e.total_distance??0),active_segments:Number(e.active_segments??0),active_distance:Number(e.active_distance??0)})))}backtrackRatio(e){return this.get("api/v1/backtrack",e).then(e=>e.map(e=>({scene:String(e.scene??""),sessions:Number(e.sessions??0),entries:Number(e.entries??0),revisits:Number(e.revisits??0),backtrack_ratio:Number(e.backtrack_ratio??0)})))}cameraGestures(e){return this.get("api/v1/camera-gestures",e).then(e=>e.map(e=>({kind:String(e.kind??""),gestures:Number(e.gestures??0),total_ms:Number(e.total_ms??0),avg_ms:Number(e.avg_ms??0),max_ms:Number(e.max_ms??0)})))}interactionsBySource(e){return this.get("api/v1/interactions/sources",e).then(e=>e.map(e=>({event_type:String(e.event_type??""),source:String(e.source??""),count:Number(e.count??0),sessions:Number(e.sessions??0)})))}xrLocomotion(e){return this.get("api/v1/xr/locomotion",e).then(e=>e.map(e=>({session_id:String(e.session_id??""),fly_gestures:Number(e.fly_gestures??0),navigate_gestures:Number(e.navigate_gestures??0),teleports:Number(e.teleports??0),locomotion_ms:Number(e.locomotion_ms??0),started_at:String(e.started_at??""),ended_at:String(e.ended_at??"")})))}sessionMeta(e){return this.get(`api/v1/sessions/${encodeURIComponent(e)}/meta`)}async sceneRepresentation(e){try{return await this.get(`api/v1/scenes/${encodeURIComponent(e)}/representation`)}catch(e){if(e instanceof t&&404===e.status)return null;throw e}}async liveToken(){let e=new URL("api/v1/live/token",s(this.baseUrl)),n=await fetch(e,{method:"POST",headers:{"x-api-key":this.apiKey},cache:"no-store"});if(!n.ok)throw new t(await n.text().catch(()=>"")||n.statusText,n.status);return await n.json()}livePresenceUrl(e){let t=new URL("api/v1/live/presence",s(this.baseUrl));return t.searchParams.set("token",e),t.toString()}liveStreamUrl(e,t){let n=new URL("api/v1/live/stream",s(this.baseUrl));return n.searchParams.set("token",e),t&&t.length>0&&n.searchParams.set("types",t.join(",")),n.toString()}liveSessionUrl(e,t){let n=new URL(`api/v1/live/sessions/${encodeURIComponent(t)}`,s(this.baseUrl));return n.searchParams.set("token",e),n.toString()}async sessionEvents(t){let{fetchSessionEvents:n}=await e.A(85461);return n({endpoint:this.baseUrl,apiKey:this.apiKey,sessionId:t})}liveSession(e,t,s){if(!this.apiKey||!this.baseUrl||!e)return s?.onState?.({status:"idle",gated:!1,count:0}),()=>{};let i=!1,r=0,a=null,o=null,m=0,u="idle",l=!1,p=()=>s?.onState?.({status:u,gated:l,count:m}),c=e=>{u=e,p()},h=()=>{if(i)return;c("reconnecting");let e=Math.min(1e3*2**r,15e3);r+=1,o=setTimeout(()=>void b(),e)},b=async()=>{let o;if(!i){c(0===r?"connecting":"reconnecting"),s?.onReset?.(),m=0,p();try{({token:o}=await this.liveToken())}catch{h();return}if(!i){a=new AbortController;try{let s=await fetch(this.liveSessionUrl(o,e),{headers:{accept:"text/event-stream"},cache:"no-store",signal:a.signal});if(403===s.status){l=!0,c("idle");return}if(!s.ok||!s.body)return void h();r=0,c("open"),await n(s.body,a.signal,e=>{try{t(JSON.parse(e)),m+=1,p()}catch{}}),i||h()}catch{i||h()}}}};return b(),()=>{i=!0,o&&clearTimeout(o),a?.abort()}}}])},19761,e=>{"use strict";var t=e.i(17422);let n=t.z.tuple([t.z.number(),t.z.number(),t.z.number()]),s=t.z.tuple([t.z.number(),t.z.number(),t.z.number(),t.z.number()]),i=t.z.tuple([t.z.number(),t.z.number()]),r=t.z.tuple([t.z.number().min(0).max(1),t.z.number().min(0).max(1)]),a=t.z.number().int().nonnegative(),o=t.z.string().regex(/^[A-Za-z0-9._:-]{1,64}$/,"sceneId must be 1-64 chars of [A-Za-z0-9._:-]");function m(e,n){return t.z.record(t.z.string(),e).refine(e=>Object.keys(e).length<=n,{message:`must have at most ${n} entries`})}let u=t.z.object({title:t.z.string().max(512).optional(),referrer:t.z.string().max(2048).optional(),viewport:t.z.tuple([t.z.number(),t.z.number()]).optional(),devicePixelRatio:t.z.number().positive().optional(),language:t.z.string().max(35).optional()}).passthrough(),l={projectId:t.z.string().min(1).max(128),visitorId:t.z.string().optional(),sessionId:t.z.string().min(1).max(128),ts:a,sdkVersion:t.z.string().min(1).max(64),url:t.z.string().max(2048).optional(),sceneId:o.optional(),pageMeta:u.optional()};function p(e,n){return t.z.object({type:t.z.literal(e),...l,...n})}t.z.object(l);let c=t.z.enum(["left","right"]),h=t.z.enum(["y","z"]),b=t.z.object({handedness:c,upAxis:h.default("y"),unitScale:t.z.number().positive().default(1)}).passthrough(),g=t.z.object({engine:t.z.enum(["webgl2","webgpu","webgl","unknown"]).optional(),vendor:t.z.string().optional(),renderer:t.z.string().optional(),maxTextureSize:t.z.number().optional(),hardwareConcurrency:t.z.number().optional(),deviceMemoryGb:t.z.number().optional(),isMobile:t.z.boolean().optional(),browser:t.z.string().optional(),os:t.z.string().optional()}).passthrough(),d=t.z.enum(["arc-rotate","free","follow","static","other"]),v=t.z.object({description:t.z.string().max(256).optional(),cameraType:d.optional(),cameraName:t.z.string().max(128).optional(),meshCount:t.z.number().int().nonnegative().optional()}).passthrough(),_=t.z.union([t.z.string().max(1024),t.z.number(),t.z.boolean(),t.z.null()]),z=t.z.object({id:t.z.string().max(128).optional(),traits:m(_,64).optional()}).passthrough(),f=t.z.object({name:t.z.string(),version:t.z.string().optional(),coordinateSystem:b.optional()}).passthrough(),N=t.z.enum(["webgl","webgl2","webgpu","opengl","opengles","d3d11","d3d12","vulkan","metal","unknown"]),y=t.z.enum(["metal","d3d11","d3d12","vulkan","opengl","opengles","unknown"]),x=t.z.enum(["glsl","glsl-es","wgsl","hlsl","msl","spirv","unknown"]),w=t.z.object({api:N.optional(),backend:y.optional(),apiVersion:t.z.string().optional(),shadingLanguage:x.optional()}).passthrough(),k=p("session_start",{device:g.optional(),graphics:w.optional(),scene:v.optional(),user:z.optional(),connector:f.optional()}),S=p("session_end",{durationMs:t.z.number().nonnegative().optional(),reason:t.z.enum(["unload","hidden","manual","timeout"]).optional()}),j=p("frame_perf",{fps:t.z.number().nonnegative(),frameTimeMs:t.z.number().nonnegative().optional(),frameTimeP95Ms:t.z.number().nonnegative().optional(),frameTimeP99Ms:t.z.number().nonnegative().optional(),longFrames:t.z.number().int().nonnegative().optional(),drawCalls:t.z.number().nonnegative().optional(),dpr:t.z.number().positive().optional(),renderScale:t.z.number().positive().optional(),position:n.optional()}),T=p("camera_sample",{position:n,direction:n,target:n.optional(),fov:t.z.number().optional(),aspect:t.z.number().positive().optional(),near:t.z.number().positive().optional(),hitPoint:n.optional(),hitMesh:t.z.string().optional()}),E=p("node_transform",{nodeId:t.z.string().min(1).max(128),boneId:t.z.string().min(1).max(128).optional(),childPath:t.z.string().min(1).max(512).optional(),position:n,rotation:s,scale:n.optional()}),P=t.z.enum(["mouse","touch","stylus","pen","keyboard","gamepad","xr-controller","hand","gaze","transient","other"]),R=t.z.enum(["left","right","none"]),M=t.z.object({origin:n,direction:n}),A={source:P.optional(),handedness:R.optional(),sourceId:t.z.string().min(1).max(64).optional(),ray:M.optional()},I=p("pointer_move",{screen:r.optional(),hitPoint:n.optional(),hitMesh:t.z.string().optional(),...A}),L=p("pointer_click",{screen:r.optional(),hitPoint:n.optional(),hitMesh:t.z.string().optional(),uv:i.optional(),button:t.z.number().int().min(0).optional(),...A}),U={screen:r.optional(),hitPoint:n.optional(),hitMesh:t.z.string().optional(),button:t.z.number().int().min(0).optional(),...A},C=p("pointer_down",U),H=p("pointer_up",U),O=p("camera_gesture",{kind:t.z.enum(["orbit","pan","dolly","zoom","roll","fly","navigate"]),durationMs:t.z.number().nonnegative(),orbitDeg:t.z.number().nonnegative().optional(),rollDeg:t.z.number().nonnegative().optional(),zoomRatio:t.z.number().positive().optional(),panDist:t.z.number().nonnegative().optional(),...A}),D=t.z.enum(["hover","pick","click","drag","select","squeeze","grab","release","teleport"]),K=p("mesh_interaction",{mesh:t.z.string().min(1).max(256),kind:D,point:n.optional(),uv:i.optional(),...A}),B=t.z.tuple([t.z.number(),t.z.number(),t.z.number(),t.z.number(),t.z.number(),t.z.number()]),W=t.z.literal("aabb"),$=t.z.object({position:n,rotation:s,scale:n}),F=t.z.object({name:t.z.string().max(256),aabb:B,triangles:t.z.number().int().nonnegative().optional(),path:t.z.string().min(1).max(512).optional(),world:$.optional()});t.z.object({version:t.z.literal(1),sceneId:o,kind:W,bounds:B,upAxis:h,handedness:c.optional(),unitScale:t.z.number().positive(),meshes:t.z.array(F).max(1e4),meshCount:t.z.number().int().nonnegative(),contentHash:t.z.string().min(1),capturedAt:a,sdkVersion:t.z.string().min(1)});let V=p("mesh_visibility",{mesh:t.z.string().min(1).max(256),visibleMs:t.z.number().nonnegative(),centeredMs:t.z.number().nonnegative().optional(),maxScreenFraction:t.z.number().min(0).max(1).optional(),bounds:B.optional()}),G=p("hover_dwell",{mesh:t.z.string().min(1),dwellMs:t.z.number().nonnegative(),uv:i.optional(),...A}),q=t.z.enum(["shader","pipeline","material","other"]),Y=p("compile_stall",{durationMs:t.z.number().nonnegative(),phase:q.optional()}),J=p("resource_sample",{textureBytes:t.z.number().nonnegative().optional(),geometryBytes:t.z.number().nonnegative().optional(),triangles:t.z.number().int().nonnegative().optional(),vertices:t.z.number().int().nonnegative().optional(),jsHeapBytes:t.z.number().nonnegative().optional()}),Z=p("capability_change",{kind:t.z.enum(["graphics-backend","quality","device-recovery","feature","other"]),from:t.z.string().max(64).optional(),to:t.z.string().max(64).optional(),reason:t.z.string().max(120).optional()}),Q=p("asset_load",{name:t.z.string().max(1024),bytes:t.z.number().nonnegative().optional(),loadMs:t.z.number().nonnegative(),ttffMs:t.z.number().nonnegative().optional(),ttiMs:t.z.number().nonnegative().optional()}),X=p("scene_change",{}),ee=p("viewport_resize",{width:t.z.number().positive(),height:t.z.number().positive(),dpr:t.z.number().positive().optional()}),et=p("visibility_change",{state:t.z.enum(["visible","hidden"])}),en=p("focus_change",{focused:t.z.boolean()}),es=p("context_lost",{reason:t.z.string().max(512).optional()}),ei=p("context_restored",{}),er=p("graphics_diagnostic",{severity:t.z.enum(["info","warning","error","fatal"]),category:t.z.enum(["context-loss","validation","out-of-memory","shader-compile","device-lost","fallback"]),backend:N.optional(),message:t.z.string().max(1024).optional(),code:t.z.string().max(64).optional(),count:t.z.number().int().positive().optional(),position:n.optional()}),ea=p("runtime_error",{kind:t.z.enum(["error","unhandledrejection"]),message:t.z.string().max(1024),source:t.z.string().max(1024).optional(),lineno:t.z.number().int().nonnegative().optional(),colno:t.z.number().int().nonnegative().optional(),stack:t.z.string().max(4096).optional(),position:n.optional()}),eo=p("input_action",{action:t.z.string().min(1).max(64),code:t.z.string().min(1).max(64).optional(),button:t.z.number().int().nonnegative().optional(),pressed:t.z.boolean().optional(),...A}),em=t.z.union([t.z.string().max(1024),t.z.number(),t.z.boolean(),t.z.null()]),eu=p("custom",{name:t.z.string().min(1).max(128),props:m(em,64).optional()}),el=t.z.discriminatedUnion("type",[k,S,j,T,E,I,L,C,H,O,K,V,G,Y,J,Z,Q,X,ee,et,en,es,ei,er,ea,eo,eu]),ep=t.z.array(el);async function ec(e){let t=e.fetchImpl??fetch,n=`${e.endpoint}/api/v1/sessions/${encodeURIComponent(e.sessionId)}/events`,s=await t(n,{headers:{"x-api-key":e.apiKey}});if(!s.ok)throw Error(`replay fetch failed: ${s.status}`);let i=ep.safeParse(await s.json());if(!i.success)throw Error("replay fetch returned an invalid session payload");return i.data.sort((e,t)=>e.ts-t.ts)}async function*eh(e){let t=e.fetchImpl??fetch,n=`${e.endpoint}/api/v1/sessions/${encodeURIComponent(e.sessionId)}/events`,s=await t(`${n}?format=ndjson`,{headers:{"x-api-key":e.apiKey,accept:"application/x-ndjson"}});if(!s.ok)throw Error(`replay fetch failed: ${s.status}`);if(!(s.headers.get("content-type")??"").includes("application/x-ndjson")){let e=ep.safeParse(await s.json());if(!e.success)throw Error("replay fetch returned an invalid session payload");for(let t of e.data.sort((e,t)=>e.ts-t.ts))yield t;return}if(!s.body)throw Error("replay stream returned no body");let i=0,r=()=>e.onMalformedLine?.(++i),a=s.body.getReader(),o=new TextDecoder,m="",u=function*(e){let t,n=e.trim();if(0===n.length)return;try{t=JSON.parse(n)}catch{r();return}let s=el.safeParse(t);s.success?yield s.data:r()};for(;;){let{done:e,value:t}=await a.read();if(e)break;let n=(m+=o.decode(t,{stream:!0})).indexOf("\n");for(;n>=0;){let e=m.slice(0,n);m=m.slice(n+1),yield*u(e),n=m.indexOf("\n")}}yield*u(m)}e.s(["fetchSessionEvents",0,ec,"fetchSessionEventsStream",0,eh],19761)},85461,e=>{e.v(t=>Promise.all(["static/chunks/0n8n481szj90g.js"].map(t=>e.l(t))).then(()=>t(57092)))},78573,e=>{e.v(t=>Promise.all(["static/chunks/23d-hvrwpixpm.js"].map(t=>e.l(t))).then(()=>t(48939)))},47410,e=>{e.v(t=>Promise.all(["static/chunks/1gaexq_suxai0.js"].map(t=>e.l(t))).then(()=>t(53993)))},70162,e=>{e.v(t=>Promise.all(["static/chunks/0kzw45f61wm3j.js"].map(t=>e.l(t))).then(()=>t(19399)))},21269,e=>{e.v(t=>Promise.all(["static/chunks/1fwsjnd1y-lx_.js"].map(t=>e.l(t))).then(()=>t(39592)))},44113,e=>{e.v(t=>Promise.all(["static/chunks/01fh3_bncbe5u.js"].map(t=>e.l(t))).then(()=>t(76421)))},33015,e=>{e.v(t=>Promise.all(["static/chunks/2wi7y3sfqyqdo.js"].map(t=>e.l(t))).then(()=>t(55810)))},15867,e=>{e.v(t=>Promise.all(["static/chunks/0l8bfa2xewq69.js"].map(t=>e.l(t))).then(()=>t(94452)))}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,59157,62589,72056,e=>{"use strict";e.s(["IsWrapper",0,function(e){return void 0===e.getPipelineContext}],59157),e.s(["WebGLShaderProcessor",0,class{constructor(){this.shaderLanguage=0}postProcessor(e,t,r,i,s){return s.drawBuffersExtensionDisabled&&(e=e.replace(/#extension.+GL_EXT_draw_buffers.+(enable|require)/g,"")),e}}],62589);let t=/(flat\s)?\s*varying\s*.*/;e.s(["WebGL2ShaderProcessor",0,class{constructor(){this.shaderLanguage=0}attributeProcessor(e){return e.replace("attribute","in")}varyingCheck(e,r){return t.test(e)}varyingProcessor(e,t){return e.replace("varying",t?"in":"out")}postProcessor(e,t,r){let i=-1!==e.search(/#extension.+GL_EXT_draw_buffers.+require/);if(e=(e=e.replace(/#extension.+(GL_OVR_multiview2|GL_OES_standard_derivatives|GL_EXT_shader_texture_lod|GL_EXT_frag_depth|GL_EXT_draw_buffers).+(enable|require)/g,"")).replace(/texture2D\s*\(/g,"texture("),r){let r=-1!==e.search(/layout *\(location *= *0\) *out/g),s=-1!==t.indexOf("#define DUAL_SOURCE_BLENDING");s&&(e="#extension GL_EXT_blend_func_extended : require\n"+e),e=(e=(e=(e=(e=(e=(e=e.replace(/texture2DLodEXT\s*\(/g,"textureLod(")).replace(/textureCubeLodEXT\s*\(/g,"textureLod(")).replace(/textureCube\s*\(/g,"texture(")).replace(/gl_FragDepthEXT/g,"gl_FragDepth")).replace(/gl_FragColor/g,"glFragColor")).replace(/gl_FragData/g,"glFragData")).replace(/void\s+?main\s*\(/g,(i||r?"":s?"layout(location = 0, index = 0) out vec4 glFragColor;\nlayout(location = 0, index = 1) out vec4 glFragColor2;\n":"layout(location = 0) out vec4 glFragColor;\n")+"void main(")}else if(t.indexOf("#define VERTEXOUTPUT_INVARIANT")>=0&&(e="invariant gl_Position;\n"+e),-1!==t.indexOf("#define MULTIVIEW"))return"#extension GL_OVR_multiview2 : require\nlayout (num_views = 2) in;\n"+e;return e}}],72056)},43615,e=>{"use strict";class t{get underlyingResource(){return null}constructor(){this.references=0,this.capacity=0,this.is32Bits=!1,this.uniqueId=t._Counter++}}t._Counter=0,e.s(["DataBuffer",0,t])},35160,28636,63613,23949,e=>{"use strict";var t,r,i,s,a,n,_,l,h=e.i(7540),u=e.i(47432),o=e.i(32622),c=e.i(59157),g=e.i(80434),f=e.i(55018),d=e.i(62589),E=e.i(72056),T=e.i(43615);class R extends T.DataBuffer{constructor(e){super(),this._buffer=e}get underlyingResource(){return this._buffer}}e.s(["WebGLDataBuffer",0,R],28636);var p=e.i(98551);class A{get underlyingResource(){return this._webGLTexture}constructor(e=null,t){if(this._MSAARenderBuffers=null,this._context=t,!e&&!(e=t.createTexture()))throw Error("Unable to create webGL texture");this.set(e)}setUsage(){}set(e){this._webGLTexture=e}reset(){this._webGLTexture=null,this._MSAARenderBuffers=null}addMSAARenderBuffer(e){this._MSAARenderBuffers||(this._MSAARenderBuffers=[]),this._MSAARenderBuffers.push(e)}releaseMSAARenderBuffers(){if(this._MSAARenderBuffers){for(let e of this._MSAARenderBuffers)this._context.deleteRenderbuffer(e);this._MSAARenderBuffers=null}}getMSAARenderBuffer(e=0){return this._MSAARenderBuffers?.[e]??null}release(){this.releaseMSAARenderBuffers(),this._webGLTexture&&this._context.deleteTexture(this._webGLTexture),this.reset()}}e.s(["WebGLHardwareTexture",0,A],63613);var x=e.i(93298),S=e.i(61599),b=e.i(21296);function m(e){return 13===e||14===e||15===e||16===e||17===e||18===e||19===e}function B(e){return 13===e||17===e||18===e||19===e}e.s(["HasStencilAspect",0,B,"IsDepthTexture",0,m],23949);var C=e.i(29309),P=e.i(33945);class L{}class M extends o.AbstractEngine{get name(){return this._name}set name(e){this._name=e}get version(){return this._webGLVersion}static get ShadersRepository(){return h.Effect.ShadersRepository}static set ShadersRepository(e){h.Effect.ShadersRepository=e}get supportsUniformBuffers(){return this.webGLVersion>1&&!this.disableUniformBuffers}get needPOTTextures(){return this._webGLVersion<2||this.forcePOTTextures}get _supportsHardwareTextureRescaling(){return!1}set framebufferDimensionsObject(e){this._framebufferDimensionsObject=e}snapshotRenderingReset(){this.snapshotRendering=!1}constructor(e,t,r,i){let s;if(r=r||{},super(t??r.antialias,r,i),this._name="WebGL",this.forcePOTTextures=!1,this.validateShaderPrograms=!1,this.disableUniformBuffers=!1,this._webGLVersion=1,this._vertexAttribArraysEnabled=[],this._uintIndicesCurrentlySet=!1,this._currentBoundBuffer=[],this._currentFramebuffer=null,this._dummyFramebuffer=null,this._currentBufferPointers=[],this._currentInstanceLocations=[],this._currentInstanceBuffers=[],this._vaoRecordInProgress=!1,this._mustWipeVertexAttributes=!1,this._nextFreeTextureSlots=[],this._maxSimultaneousTextures=0,this._maxMSAASamplesOverride=null,this._unpackFlipYCached=null,this.enableUnpackFlipYCached=!0,this._boundUniforms={},!e)return;if(e.getContext){if(s=e,void 0===r.preserveDrawingBuffer&&(r.preserveDrawingBuffer=!1),void 0===r.xrCompatible&&(r.xrCompatible=!1),navigator&&navigator.userAgent){this._setupMobileChecks();const e=navigator.userAgent;for(const t of M.ExceptionList){const i=t.key,s=t.targets;if(new RegExp(i).test(e)){if(t.capture&&t.captureConstraint){const r=t.capture,i=t.captureConstraint,s=new RegExp(r).exec(e);if(s&&s.length>0&&parseInt(s[s.length-1])>=i)continue}for(const e of s)switch(e){case"uniformBuffer":this.disableUniformBuffers=!0;break;case"vao":this.disableVertexArrayObjects=!0;break;case"antialias":r.antialias=!1;break;case"maxMSAASamples":this._maxMSAASamplesOverride=1}}}}if(this._doNotHandleContextLost?this._onContextLost=()=>{(0,u.deleteStateObject)(this._gl)}:(this._onContextLost=e=>{e.preventDefault(),this._contextWasLost=!0,(0,u.deleteStateObject)(this._gl),g.Logger.Warn("WebGL context lost."),this.onContextLostObservable.notifyObservers(this)},this._onContextRestored=()=>{this._restoreEngineAfterContextLost(()=>this._initGLContext())},s.addEventListener("webglcontextrestored",this._onContextRestored,!1),r.powerPreference=r.powerPreference||"high-performance"),s.addEventListener("webglcontextlost",this._onContextLost,!1),this._badDesktopOS&&(r.xrCompatible=!1),!r.disableWebGL2Support)try{this._gl=s.getContext("webgl2",r)||s.getContext("experimental-webgl2",r),this._gl&&(this._webGLVersion=2,this._shaderPlatformName="WEBGL2",this._gl.deleteQuery||(this._webGLVersion=1,this._shaderPlatformName="WEBGL1"))}catch(e){}if(!this._gl){if(!s)throw Error("The provided canvas is null or undefined.");try{this._gl=s.getContext("webgl",r)||s.getContext("experimental-webgl",r)}catch(e){throw Error("WebGL not supported",{cause:e})}}if(!this._gl)throw Error("WebGL not supported")}else{this._gl=e,s=this._gl.canvas,this._gl.renderbufferStorageMultisample?(this._webGLVersion=2,this._shaderPlatformName="WEBGL2"):this._shaderPlatformName="WEBGL1";const t=this._gl.getContextAttributes();t&&(r.stencil=t.stencil)}this._sharedInit(s),this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL,this._gl.NONE),void 0!==r.useHighPrecisionFloats&&(this._highPrecisionShadersAllowed=r.useHighPrecisionFloats),this.resize(),this._initGLContext(),this._initFeatures();for(let e=0;e<this._caps.maxVertexAttribs;e++)this._currentBufferPointers[e]=new L;this._shaderProcessor=this.webGLVersion>1?new E.WebGL2ShaderProcessor:new d.WebGLShaderProcessor;const a=`Babylon.js v${M.Version}`;g.Logger.Log(a+` - ${this.description}`),this._renderingCanvas&&this._renderingCanvas.setAttribute&&this._renderingCanvas.setAttribute("data-engine",a);const n=(0,u.getStateObject)(this._gl);n.validateShaderPrograms=this.validateShaderPrograms,n.parallelShaderCompile=this._caps.parallelShaderCompile}_clearEmptyResources(){this._dummyFramebuffer=null,super._clearEmptyResources()}_getShaderProcessingContext(e){return null}areAllEffectsReady(){for(let e in this._compiledEffects)if(!this._compiledEffects[e].isReady())return!1;return!0}_initGLContext(){this._caps={maxTexturesImageUnits:this._gl.getParameter(this._gl.MAX_TEXTURE_IMAGE_UNITS),maxCombinedTexturesImageUnits:this._gl.getParameter(this._gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),maxVertexTextureImageUnits:this._gl.getParameter(this._gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS),maxTextureSize:this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),maxSamples:this._webGLVersion>1?this._gl.getParameter(this._gl.MAX_SAMPLES):1,maxCubemapTextureSize:this._gl.getParameter(this._gl.MAX_CUBE_MAP_TEXTURE_SIZE),maxRenderTextureSize:this._gl.getParameter(this._gl.MAX_RENDERBUFFER_SIZE),maxVertexAttribs:this._gl.getParameter(this._gl.MAX_VERTEX_ATTRIBS),maxVaryingVectors:this._gl.getParameter(this._gl.MAX_VARYING_VECTORS),maxFragmentUniformVectors:this._gl.getParameter(this._gl.MAX_FRAGMENT_UNIFORM_VECTORS),maxVertexUniformVectors:this._gl.getParameter(this._gl.MAX_VERTEX_UNIFORM_VECTORS),shaderFloatPrecision:0,parallelShaderCompile:this._gl.getExtension("KHR_parallel_shader_compile")||void 0,standardDerivatives:this._webGLVersion>1||null!==this._gl.getExtension("OES_standard_derivatives"),maxAnisotropy:1,astc:this._gl.getExtension("WEBGL_compressed_texture_astc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_astc"),bptc:this._gl.getExtension("EXT_texture_compression_bptc")||this._gl.getExtension("WEBKIT_EXT_texture_compression_bptc"),s3tc:this._gl.getExtension("WEBGL_compressed_texture_s3tc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc"),s3tc_srgb:this._gl.getExtension("WEBGL_compressed_texture_s3tc_srgb")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc_srgb"),pvrtc:this._gl.getExtension("WEBGL_compressed_texture_pvrtc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),etc1:this._gl.getExtension("WEBGL_compressed_texture_etc1")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc1"),etc2:this._gl.getExtension("WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBGL_compressed_texture_es3_0"),textureAnisotropicFilterExtension:this._gl.getExtension("EXT_texture_filter_anisotropic")||this._gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||this._gl.getExtension("MOZ_EXT_texture_filter_anisotropic"),uintIndices:this._webGLVersion>1||null!==this._gl.getExtension("OES_element_index_uint"),fragmentDepthSupported:this._webGLVersion>1||null!==this._gl.getExtension("EXT_frag_depth"),highPrecisionShaderSupported:!1,timerQuery:this._gl.getExtension("EXT_disjoint_timer_query_webgl2")||this._gl.getExtension("EXT_disjoint_timer_query"),supportOcclusionQuery:this._webGLVersion>1,canUseTimestampForTimerQuery:!1,drawBuffersExtension:!1,maxMSAASamples:1,colorBufferFloat:!!(this._webGLVersion>1&&this._gl.getExtension("EXT_color_buffer_float")),blendFloat:null!==this._gl.getExtension("EXT_float_blend"),supportFloatTexturesResolve:!1,rg11b10ufColorRenderable:!1,colorBufferHalfFloat:!!(this._webGLVersion>1&&this._gl.getExtension("EXT_color_buffer_half_float")),textureFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_float")),textureHalfFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_half_float")),textureHalfFloatRender:!1,textureFloatLinearFiltering:!1,textureFloatRender:!1,textureHalfFloatLinearFiltering:!1,vertexArrayObject:!1,instancedArrays:!1,textureLOD:!!(this._webGLVersion>1||this._gl.getExtension("EXT_shader_texture_lod")),texelFetch:1!==this._webGLVersion,blendMinMax:!1,multiview:this._gl.getExtension("OVR_multiview2"),oculusMultiview:this._gl.getExtension("OCULUS_multiview"),depthTextureExtension:!1,canUseGLInstanceID:this._webGLVersion>1,canUseGLVertexID:this._webGLVersion>1,supportComputeShaders:!1,supportSRGBBuffers:!1,supportTransformFeedbacks:this._webGLVersion>1,textureMaxLevel:this._webGLVersion>1,texture2DArrayMaxLayerCount:this._webGLVersion>1?this._gl.getParameter(this._gl.MAX_ARRAY_TEXTURE_LAYERS):128,disableMorphTargetTexture:!1,textureNorm16:!!this._gl.getExtension("EXT_texture_norm16"),blendParametersPerTarget:!1,dualSourceBlending:!1,supportReadWriteStorageTextures:!1},this._caps.supportFloatTexturesResolve=this._caps.colorBufferFloat,this._caps.rg11b10ufColorRenderable=this._caps.colorBufferFloat,this._glVersion=this._gl.getParameter(this._gl.VERSION);let e=this._gl.getExtension("WEBGL_debug_renderer_info");null!=e&&(this._glRenderer=this._gl.getParameter(e.UNMASKED_RENDERER_WEBGL),this._glVendor=this._gl.getParameter(e.UNMASKED_VENDOR_WEBGL)),this._glVendor||(this._glVendor=this._gl.getParameter(this._gl.VENDOR)||"Unknown vendor"),this._glRenderer||(this._glRenderer=this._gl.getParameter(this._gl.RENDERER)||"Unknown renderer"),36193!==this._gl.HALF_FLOAT_OES&&(this._gl.HALF_FLOAT_OES=36193),34842!==this._gl.RGBA16F&&(this._gl.RGBA16F=34842),34836!==this._gl.RGBA32F&&(this._gl.RGBA32F=34836),35056!==this._gl.DEPTH24_STENCIL8&&(this._gl.DEPTH24_STENCIL8=35056),this._caps.timerQuery&&(1===this._webGLVersion&&(this._gl.getQuery=this._caps.timerQuery.getQueryEXT.bind(this._caps.timerQuery)),this._caps.canUseTimestampForTimerQuery=(this._gl.getQuery(this._caps.timerQuery.TIMESTAMP_EXT,this._caps.timerQuery.QUERY_COUNTER_BITS_EXT)??0)>0),this._caps.maxAnisotropy=this._caps.textureAnisotropicFilterExtension?this._gl.getParameter(this._caps.textureAnisotropicFilterExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0,this._caps.textureFloatLinearFiltering=!!(this._caps.textureFloat&&this._gl.getExtension("OES_texture_float_linear")),this._caps.textureFloatRender=!!(this._caps.textureFloat&&this._canRenderToFloatFramebuffer()),this._caps.textureHalfFloatLinearFiltering=!!(this._webGLVersion>1||this._caps.textureHalfFloat&&this._gl.getExtension("OES_texture_half_float_linear")),this._caps.textureNorm16&&(this._gl.R16_EXT=33322,this._gl.RG16_EXT=33324,this._gl.RGB16_EXT=32852,this._gl.RGBA16_EXT=32859,this._gl.R16_SNORM_EXT=36760,this._gl.RG16_SNORM_EXT=36761,this._gl.RGB16_SNORM_EXT=36762,this._gl.RGBA16_SNORM_EXT=36763);let t=this._gl.getExtension("OES_draw_buffers_indexed");if(this._caps.blendParametersPerTarget=!!t,this._alphaState=new C.AlphaState(this._caps.blendParametersPerTarget),t&&(this._gl.blendEquationSeparateIndexed=t.blendEquationSeparateiOES.bind(t),this._gl.blendEquationIndexed=t.blendEquationiOES.bind(t),this._gl.blendFuncSeparateIndexed=t.blendFuncSeparateiOES.bind(t),this._gl.blendFuncIndexed=t.blendFunciOES.bind(t),this._gl.colorMaskIndexed=t.colorMaskiOES.bind(t),this._gl.disableIndexed=t.disableiOES.bind(t),this._gl.enableIndexed=t.enableiOES.bind(t)),this._caps.dualSourceBlending=!!this._gl.getExtension("WEBGL_blend_func_extended"),this._caps.astc&&(this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR),this._caps.bptc&&(this._gl.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT=this._caps.bptc.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT),this._caps.s3tc_srgb&&(this._gl.COMPRESSED_SRGB_S3TC_DXT1_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_S3TC_DXT1_EXT,this._gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,this._gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT),this._caps.etc2&&(this._gl.COMPRESSED_SRGB8_ETC2=this._caps.etc2.COMPRESSED_SRGB8_ETC2,this._gl.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=this._caps.etc2.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC),this._webGLVersion>1&&5131!==this._gl.HALF_FLOAT_OES&&(this._gl.HALF_FLOAT_OES=5131),this._caps.textureHalfFloatRender=this._caps.textureHalfFloat&&this._canRenderToHalfFloatFramebuffer(),this._webGLVersion>1)this._caps.drawBuffersExtension=!0,this._caps.maxMSAASamples=null!==this._maxMSAASamplesOverride?this._maxMSAASamplesOverride:this._gl.getParameter(this._gl.MAX_SAMPLES),this._caps.maxDrawBuffers=this._gl.getParameter(this._gl.MAX_DRAW_BUFFERS);else{let e=this._gl.getExtension("WEBGL_draw_buffers");if(null!==e){this._caps.drawBuffersExtension=!0,this._gl.drawBuffers=e.drawBuffersWEBGL.bind(e),this._caps.maxDrawBuffers=this._gl.getParameter(e.MAX_DRAW_BUFFERS_WEBGL),this._gl.DRAW_FRAMEBUFFER=this._gl.FRAMEBUFFER;for(let t=0;t<16;t++)this._gl["COLOR_ATTACHMENT"+t+"_WEBGL"]=e["COLOR_ATTACHMENT"+t+"_WEBGL"]}}if(this._webGLVersion>1)this._caps.depthTextureExtension=!0;else{let e=this._gl.getExtension("WEBGL_depth_texture");null!=e&&(this._caps.depthTextureExtension=!0,this._gl.UNSIGNED_INT_24_8=e.UNSIGNED_INT_24_8_WEBGL)}if(this.disableVertexArrayObjects)this._caps.vertexArrayObject=!1;else if(this._webGLVersion>1)this._caps.vertexArrayObject=!0;else{let e=this._gl.getExtension("OES_vertex_array_object");null!=e&&(this._caps.vertexArrayObject=!0,this._gl.createVertexArray=e.createVertexArrayOES.bind(e),this._gl.bindVertexArray=e.bindVertexArrayOES.bind(e),this._gl.deleteVertexArray=e.deleteVertexArrayOES.bind(e))}if(this._webGLVersion>1)this._caps.instancedArrays=!0;else{let e=this._gl.getExtension("ANGLE_instanced_arrays");null!=e?(this._caps.instancedArrays=!0,this._gl.drawArraysInstanced=e.drawArraysInstancedANGLE.bind(e),this._gl.drawElementsInstanced=e.drawElementsInstancedANGLE.bind(e),this._gl.vertexAttribDivisor=e.vertexAttribDivisorANGLE.bind(e)):this._caps.instancedArrays=!1}if(this._gl.getShaderPrecisionFormat){let e=this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER,this._gl.HIGH_FLOAT),t=this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER,this._gl.HIGH_FLOAT);if(e&&t&&(this._caps.highPrecisionShaderSupported=0!==e.precision&&0!==t.precision,this._caps.shaderFloatPrecision=Math.min(e.precision,t.precision)),!this._shouldUseHighPrecisionShader){let e=this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER,this._gl.MEDIUM_FLOAT),t=this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER,this._gl.MEDIUM_FLOAT);e&&t&&(this._caps.shaderFloatPrecision=Math.min(e.precision,t.precision))}this._caps.shaderFloatPrecision<10&&(this._caps.shaderFloatPrecision=10)}if(this._webGLVersion>1)this._caps.blendMinMax=!0;else{let e=this._gl.getExtension("EXT_blend_minmax");null!=e&&(this._caps.blendMinMax=!0,this._gl.MAX=e.MAX_EXT,this._gl.MIN=e.MIN_EXT)}if(!this._caps.supportSRGBBuffers){if(this._webGLVersion>1)this._caps.supportSRGBBuffers=!0,this._glSRGBExtensionValues={SRGB:WebGL2RenderingContext.SRGB,SRGB8:WebGL2RenderingContext.SRGB8,SRGB8_ALPHA8:WebGL2RenderingContext.SRGB8_ALPHA8};else{let e=this._gl.getExtension("EXT_sRGB");null!=e&&(this._caps.supportSRGBBuffers=!0,this._glSRGBExtensionValues={SRGB:e.SRGB_EXT,SRGB8:e.SRGB_ALPHA_EXT,SRGB8_ALPHA8:e.SRGB_ALPHA_EXT})}if(this._creationOptions){let e=this._creationOptions.forceSRGBBufferSupportState;void 0!==e&&(this._caps.supportSRGBBuffers=this._caps.supportSRGBBuffers&&e)}}this._depthCullingState.depthTest=!0,this._depthCullingState.depthFunc=this._gl.LEQUAL,this._depthCullingState.depthMask=!0,this._maxSimultaneousTextures=this._caps.maxCombinedTexturesImageUnits;for(let e=0;e<this._maxSimultaneousTextures;e++)this._nextFreeTextureSlots.push(e);"Mali-G72"===this._glRenderer&&(this._caps.disableMorphTargetTexture=!0)}_initFeatures(){this._features={forceBitmapOverHTMLImageElement:"u"<typeof HTMLImageElement,supportRenderAndCopyToLodForFloatTextures:1!==this._webGLVersion,supportDepthStencilTexture:1!==this._webGLVersion,supportShadowSamplers:1!==this._webGLVersion,uniformBufferHardCheckMatrix:!1,allowTexturePrefiltering:1!==this._webGLVersion,trackUbosInFrame:!1,checkUbosContentBeforeUpload:!1,supportCSM:1!==this._webGLVersion,basisNeedsPOT:1===this._webGLVersion,support3DTextures:1!==this._webGLVersion,needTypeSuffixInShaderConstants:1!==this._webGLVersion,supportMSAA:1!==this._webGLVersion,supportSSAO2:1!==this._webGLVersion,supportIBLShadows:1!==this._webGLVersion,supportExtendedTextureFormats:1!==this._webGLVersion,supportSwitchCaseInShader:1!==this._webGLVersion,supportSyncTextureRead:!0,needsInvertingBitmap:!0,useUBOBindingCache:!0,needShaderCodeInlining:!1,needToAlwaysBindUniformBuffers:!1,supportRenderPasses:!1,supportSpriteInstancing:!0,forceVertexBufferStrideAndOffsetMultiple4Bytes:!1,_checkNonFloatVertexBuffersDontRecreatePipelineContext:!1}}get webGLVersion(){return this._webGLVersion}getClassName(){return"ThinEngine"}_prepareWorkingCanvas(){if(this._workingCanvas)return;this._workingCanvas=this.createCanvas(1,1);let e=this._workingCanvas.getContext("2d");e&&(this._workingContext=e)}getInfo(){return this.getGlInfo()}getGlInfo(){return{vendor:this._glVendor,renderer:this._glRenderer,version:this._glVersion}}extractDriverInfo(){let e=this.getGlInfo();return e&&e.renderer?e.renderer:""}getRenderWidth(e=!1){return!e&&this._currentRenderTarget?this._currentRenderTarget.width:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferWidth:this._gl.drawingBufferWidth}getRenderHeight(e=!1){return!e&&this._currentRenderTarget?this._currentRenderTarget.height:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferHeight:this._gl.drawingBufferHeight}clear(e,t,r,i=!1,s=0){let a=this.stencilStateComposer.useStencilGlobalOnly;this.stencilStateComposer.useStencilGlobalOnly=!0,this.applyStates(),this.stencilStateComposer.useStencilGlobalOnly=a;let n=0;if(t&&e){let t=!0;if(this._currentRenderTarget){let r=this._currentRenderTarget.texture?.format;if(8===r||9===r||10===r||11===r){let r=this._currentRenderTarget.texture?.type;7===r||5===r?(M._TempClearColorUint32[0]=255*e.r,M._TempClearColorUint32[1]=255*e.g,M._TempClearColorUint32[2]=255*e.b,M._TempClearColorUint32[3]=255*e.a,this._gl.clearBufferuiv(this._gl.COLOR,0,M._TempClearColorUint32)):(M._TempClearColorInt32[0]=255*e.r,M._TempClearColorInt32[1]=255*e.g,M._TempClearColorInt32[2]=255*e.b,M._TempClearColorInt32[3]=255*e.a,this._gl.clearBufferiv(this._gl.COLOR,0,M._TempClearColorInt32)),t=!1}}t&&(this._gl.clearColor(e.r,e.g,e.b,void 0!==e.a?e.a:1),n|=this._gl.COLOR_BUFFER_BIT)}r&&(this.useReverseDepthBuffer?(this._depthCullingState.depthFunc=this._gl.GEQUAL,this._gl.clearDepth(0)):this._gl.clearDepth(1),n|=this._gl.DEPTH_BUFFER_BIT),i&&(this._gl.clearStencil(s),n|=this._gl.STENCIL_BUFFER_BIT),this._gl.clear(n)}_viewport(e,t,r,i){(e!==this._viewportCached.x||t!==this._viewportCached.y||r!==this._viewportCached.z||i!==this._viewportCached.w)&&(this._viewportCached.x=e,this._viewportCached.y=t,this._viewportCached.z=r,this._viewportCached.w=i,this._gl.viewport(e,t,r,i))}endFrame(){super.endFrame(),this._badOS&&this.flushFramebuffer()}get performanceMonitor(){throw Error("Not Supported by ThinEngine")}bindFramebuffer(e,t=0,r,i,s,a=0,n=0){this._currentRenderTarget&&this._resolveAndGenerateMipMapsFramebuffer(this._currentRenderTarget),this._currentRenderTarget=e,this._bindUnboundFramebuffer(e._framebuffer);let _=this._gl;e.isMulti||(e.is2DArray||e.is3D?(_.framebufferTextureLayer(_.FRAMEBUFFER,_.COLOR_ATTACHMENT0,e.texture._hardwareTexture?.underlyingResource,a,n),e._currentLOD=a):e.isCube?_.framebufferTexture2D(_.FRAMEBUFFER,_.COLOR_ATTACHMENT0,_.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.texture._hardwareTexture?.underlyingResource,a):e._currentLOD!==a&&(_.framebufferTexture2D(_.FRAMEBUFFER,_.COLOR_ATTACHMENT0,_.TEXTURE_2D,e.texture._hardwareTexture?.underlyingResource,a),e._currentLOD=a));let l=e._depthStencilTexture;if(l){e.is3D&&(e.texture.width!==l.width||e.texture.height!==l.height||e.texture.depth!==l.depth)&&g.Logger.Warn("Depth/Stencil attachment for 3D target must have same dimensions as color attachment");let r=e._depthStencilTextureWithStencil?_.DEPTH_STENCIL_ATTACHMENT:_.DEPTH_ATTACHMENT;e.is2DArray||e.is3D?_.framebufferTextureLayer(_.FRAMEBUFFER,r,l._hardwareTexture?.underlyingResource,a,n):e.isCube?_.framebufferTexture2D(_.FRAMEBUFFER,r,_.TEXTURE_CUBE_MAP_POSITIVE_X+t,l._hardwareTexture?.underlyingResource,a):_.framebufferTexture2D(_.FRAMEBUFFER,r,_.TEXTURE_2D,l._hardwareTexture?.underlyingResource,a)}e._MSAAFramebuffer&&this._bindUnboundFramebuffer(e._MSAAFramebuffer),this._cachedViewport&&!s?this.setViewport(this._cachedViewport,r,i):(!r&&(r=e.width,a&&(r/=Math.pow(2,a))),!i&&(i=e.height,a&&(i/=Math.pow(2,a))),this._viewport(0,0,r,i)),this.wipeCaches()}setStateCullFaceType(e,t){let r=this.cullBackFaces??e??!0?this._gl.BACK:this._gl.FRONT;(this._depthCullingState.cullFace!==r||t)&&(this._depthCullingState.cullFace=r)}setState(e,t=0,r,i=!1,s,a,n=0){(this._depthCullingState.cull!==e||r)&&(this._depthCullingState.cull=e),this.setStateCullFaceType(s,r),this.setZOffset(t),this.setZOffsetUnits(n);let _=i?this._gl.CW:this._gl.CCW;(this._depthCullingState.frontFace!==_||r)&&(this._depthCullingState.frontFace=_),this._stencilStateComposer.stencilMaterial=a}_resolveAndGenerateMipMapsFramebuffer(e,t=!1){e.disableAutomaticMSAAResolve||(e.isMulti?this.resolveMultiFramebuffer(e):this.resolveFramebuffer(e)),t||(e.isMulti?this.generateMipMapsMultiFramebuffer(e):this.generateMipMapsFramebuffer(e))}_bindUnboundFramebuffer(e){this._currentFramebuffer!==e&&(this._gl.bindFramebuffer(this._gl.FRAMEBUFFER,e),this._currentFramebuffer=e)}_currentFrameBufferIsDefaultFrameBuffer(){return null===this._currentFramebuffer}generateMipmaps(e){let t=this._getTextureTarget(e);this._bindTextureDirectly(t,e,!0),this._gl.generateMipmap(t),this._bindTextureDirectly(t,null)}unBindFramebuffer(e,t,r){this._currentRenderTarget=null,this._resolveAndGenerateMipMapsFramebuffer(e,t),r&&(e._MSAAFramebuffer&&this._bindUnboundFramebuffer(e._framebuffer),r()),this._bindUnboundFramebuffer(null)}generateMipMapsFramebuffer(e){!e.isMulti&&e.texture?.generateMipMaps&&!e.isCube&&this.generateMipmaps(e.texture)}resolveFramebuffer(e){let t=this._gl;if(!e._MSAAFramebuffer||e.isMulti)return;let r=e.resolveMSAAColors?t.COLOR_BUFFER_BIT:0;r|=e._generateDepthBuffer&&e.resolveMSAADepth?t.DEPTH_BUFFER_BIT:0,r|=e._generateStencilBuffer&&e.resolveMSAAStencil?t.STENCIL_BUFFER_BIT:0,t.bindFramebuffer(t.READ_FRAMEBUFFER,e._MSAAFramebuffer),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,e._framebuffer),t.blitFramebuffer(0,0,e.width,e.height,0,0,e.width,e.height,r,t.NEAREST)}flushFramebuffer(){this._gl.flush()}restoreDefaultFramebuffer(){this._currentRenderTarget?this.unBindFramebuffer(this._currentRenderTarget):this._bindUnboundFramebuffer(null),this._cachedViewport&&this.setViewport(this._cachedViewport),this.wipeCaches()}_resetVertexBufferBinding(){this.bindArrayBuffer(null),this._cachedVertexBuffers=null}createVertexBuffer(e,t,r){return this._createVertexBuffer(e,this._gl.STATIC_DRAW)}_createVertexBuffer(e,t){let r=this._gl.createBuffer();if(!r)throw Error("Unable to create vertex buffer");let i=new R(r);return this.bindArrayBuffer(i),"number"!=typeof e?e instanceof Array?(this._gl.bufferData(this._gl.ARRAY_BUFFER,new Float32Array(e),t),i.capacity=4*e.length):(this._gl.bufferData(this._gl.ARRAY_BUFFER,e,t),i.capacity=e.byteLength):(this._gl.bufferData(this._gl.ARRAY_BUFFER,new Uint8Array(e),t),i.capacity=e),this._resetVertexBufferBinding(),i.references=1,i}createDynamicVertexBuffer(e,t){return this._createVertexBuffer(e,this._gl.DYNAMIC_DRAW)}_resetIndexBufferBinding(){this.bindIndexBuffer(null),this._cachedIndexBuffer=null}createIndexBuffer(e,t,r){let i=this._gl.createBuffer(),s=new R(i);if(!i)throw Error("Unable to create index buffer");this.bindIndexBuffer(s);let a=this._normalizeIndexData(e);return this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,a,t?this._gl.DYNAMIC_DRAW:this._gl.STATIC_DRAW),this._resetIndexBufferBinding(),s.references=1,s.is32Bits=4===a.BYTES_PER_ELEMENT,s}_normalizeIndexData(e){if(2===e.BYTES_PER_ELEMENT)return e;if(this._caps.uintIndices){if(e instanceof Uint32Array)return e;else for(let t=0;t<e.length;t++)if(e[t]>=65535)return new Uint32Array(e)}return new Uint16Array(e)}bindArrayBuffer(e){this._vaoRecordInProgress||this._unbindVertexArrayObject(),this._bindBuffer(e,this._gl.ARRAY_BUFFER)}bindUniformBlock(e,t,r){let i=e.program,s=this._gl.getUniformBlockIndex(i,t);this._gl.uniformBlockBinding(i,s,r)}bindIndexBuffer(e){this._vaoRecordInProgress||this._unbindVertexArrayObject(),this._bindBuffer(e,this._gl.ELEMENT_ARRAY_BUFFER)}_bindBuffer(e,t){(this._vaoRecordInProgress||this._currentBoundBuffer[t]!==e)&&(this._gl.bindBuffer(t,e?e.underlyingResource:null),this._currentBoundBuffer[t]=e)}updateArrayBuffer(e){this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,e)}_vertexAttribPointer(e,t,r,i,s,a,n){let _=this._currentBufferPointers[t];if(!_)return;let l=!1;_.active?(_.buffer!==e&&(_.buffer=e,l=!0),_.size!==r&&(_.size=r,l=!0),_.type!==i&&(_.type=i,l=!0),_.normalized!==s&&(_.normalized=s,l=!0),_.stride!==a&&(_.stride=a,l=!0),_.offset!==n&&(_.offset=n,l=!0)):(l=!0,_.active=!0,_.index=t,_.size=r,_.type=i,_.normalized=s,_.stride=a,_.offset=n,_.buffer=e),(l||this._vaoRecordInProgress)&&(this.bindArrayBuffer(e),i===this._gl.UNSIGNED_INT||i===this._gl.INT?this._gl.vertexAttribIPointer(t,r,i,a,n):this._gl.vertexAttribPointer(t,r,i,s,a,n))}_bindIndexBufferWithCache(e){null!=e&&this._cachedIndexBuffer!==e&&(this._cachedIndexBuffer=e,this.bindIndexBuffer(e),this._uintIndicesCurrentlySet=e.is32Bits)}_bindVertexBuffersAttributes(e,t,r){let i=t.getAttributesNames();this._vaoRecordInProgress||this._unbindVertexArrayObject(),this.unbindAllAttributes();for(let s=0;s<i.length;s++){let a=t.getAttributeLocation(s);if(a>=0){let t=i[s],n=null;if(r&&(n=r[t]),n||(n=e[t]),!n)continue;this._gl.enableVertexAttribArray(a),this._vaoRecordInProgress||(this._vertexAttribArraysEnabled[a]=!0);let _=n.getBuffer();_&&(this._vertexAttribPointer(_,a,n.getSize(),n.type,n.normalized,n.byteStride,n.byteOffset),n.getIsInstanced()&&(this._gl.vertexAttribDivisor(a,n.getInstanceDivisor()),this._vaoRecordInProgress||(this._currentInstanceLocations.push(a),this._currentInstanceBuffers.push(_))))}}}recordVertexArrayObject(e,t,r,i){let s=this._gl.createVertexArray();if(!s)throw Error("Unable to create VAO");return this._vaoRecordInProgress=!0,this._gl.bindVertexArray(s),this._mustWipeVertexAttributes=!0,this._bindVertexBuffersAttributes(e,r,i),this.bindIndexBuffer(t),this._vaoRecordInProgress=!1,this._gl.bindVertexArray(null),s}bindVertexArrayObject(e,t){this._cachedVertexArrayObject!==e&&(this._cachedVertexArrayObject=e,this._gl.bindVertexArray(e),this._cachedVertexBuffers=null,this._cachedIndexBuffer=null,this._uintIndicesCurrentlySet=null!=t&&t.is32Bits,this._mustWipeVertexAttributes=!0)}bindBuffersDirectly(e,t,r,i,s){if(this._cachedVertexBuffers!==e||this._cachedEffectForVertexBuffers!==s){this._cachedVertexBuffers=e,this._cachedEffectForVertexBuffers=s;let t=s.getAttributesCount();this._unbindVertexArrayObject(),this.unbindAllAttributes();let a=0;for(let n=0;n<t;n++)if(n<r.length){let t=s.getAttributeLocation(n);t>=0&&(this._gl.enableVertexAttribArray(t),this._vertexAttribArraysEnabled[t]=!0,this._vertexAttribPointer(e,t,r[n],this._gl.FLOAT,!1,i,a)),a+=4*r[n]}}this._bindIndexBufferWithCache(t)}_unbindVertexArrayObject(){this._cachedVertexArrayObject&&(this._cachedVertexArrayObject=null,this._gl.bindVertexArray(null))}bindBuffers(e,t,r,i){(this._cachedVertexBuffers!==e||this._cachedEffectForVertexBuffers!==r)&&(this._cachedVertexBuffers=e,this._cachedEffectForVertexBuffers=r,this._bindVertexBuffersAttributes(e,r,i)),this._bindIndexBufferWithCache(t)}unbindInstanceAttributes(){let e;for(let t=0,r=this._currentInstanceLocations.length;t<r;t++){let r=this._currentInstanceBuffers[t];e!=r&&r.references&&(e=r,this.bindArrayBuffer(r));let i=this._currentInstanceLocations[t];this._gl.vertexAttribDivisor(i,0)}this._currentInstanceBuffers.length=0,this._currentInstanceLocations.length=0}releaseVertexArrayObject(e){this._gl.deleteVertexArray(e)}_releaseBuffer(e){return e.references--,0===e.references&&(this._deleteBuffer(e),!0)}_deleteBuffer(e){this._gl.deleteBuffer(e.underlyingResource)}updateAndBindInstancesBuffer(e,t,r){if(this.bindArrayBuffer(e),t&&this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,t),void 0!==r[0].index)this.bindInstancesBuffer(e,r,!0);else for(let t=0;t<4;t++){let i=r[t];this._vertexAttribArraysEnabled[i]||(this._gl.enableVertexAttribArray(i),this._vertexAttribArraysEnabled[i]=!0),this._vertexAttribPointer(e,i,4,this._gl.FLOAT,!1,64,16*t),this._gl.vertexAttribDivisor(i,1),this._currentInstanceLocations.push(i),this._currentInstanceBuffers.push(e)}}bindInstancesBuffer(e,t,r=!0){this.bindArrayBuffer(e);let i=0;if(r)for(let e=0;e<t.length;e++)i+=4*t[e].attributeSize;for(let r=0;r<t.length;r++){let s=t[r];void 0===s.index&&(s.index=this._currentEffect.getAttributeLocationByName(s.attributeName)),s.index<0||(this._vertexAttribArraysEnabled[s.index]||(this._gl.enableVertexAttribArray(s.index),this._vertexAttribArraysEnabled[s.index]=!0),this._vertexAttribPointer(e,s.index,s.attributeSize,s.attributeType||this._gl.FLOAT,s.normalized||!1,i,s.offset),this._gl.vertexAttribDivisor(s.index,void 0===s.divisor?1:s.divisor),this._currentInstanceLocations.push(s.index),this._currentInstanceBuffers.push(e))}}disableInstanceAttributeByName(e){if(!this._currentEffect)return;let t=this._currentEffect.getAttributeLocationByName(e);this.disableInstanceAttribute(t)}disableInstanceAttribute(e){let t,r=!1;for(;-1!==(t=this._currentInstanceLocations.indexOf(e));)this._currentInstanceLocations.splice(t,1),this._currentInstanceBuffers.splice(t,1),r=!0;r&&(this._gl.vertexAttribDivisor(e,0),this.disableAttributeByIndex(e))}disableAttributeByIndex(e){this._gl.disableVertexAttribArray(e),this._vertexAttribArraysEnabled[e]=!1,this._currentBufferPointers[e].active=!1}draw(e,t,r,i){this.drawElementsType(+!e,t,r,i)}drawPointClouds(e,t,r){this.drawArraysType(2,e,t,r)}drawUnIndexed(e,t,r,i){this.drawArraysType(+!e,t,r,i)}drawElementsType(e,t,r,i){this.applyStates(),this._reportDrawCall();let s=this._drawMode(e),a=this._uintIndicesCurrentlySet?this._gl.UNSIGNED_INT:this._gl.UNSIGNED_SHORT,n=this._uintIndicesCurrentlySet?4:2;i?this._gl.drawElementsInstanced(s,r,a,t*n,i):this._gl.drawElements(s,r,a,t*n)}drawArraysType(e,t,r,i){this.applyStates(),this._reportDrawCall();let s=this._drawMode(e);i?this._gl.drawArraysInstanced(s,t,r,i):this._gl.drawArrays(s,t,r)}_drawMode(e){switch(e){case 0:default:return this._gl.TRIANGLES;case 2:case 3:return this._gl.POINTS;case 1:case 4:return this._gl.LINES;case 5:return this._gl.LINE_LOOP;case 6:return this._gl.LINE_STRIP;case 7:return this._gl.TRIANGLE_STRIP;case 8:return this._gl.TRIANGLE_FAN}}_releaseEffect(e){this._compiledEffects[e._key]&&delete this._compiledEffects[e._key];let t=e.getPipelineContext();t&&this._deletePipelineContext(t)}_deletePipelineContext(e){e&&e.program&&(e.program.__SPECTOR_rebuildProgram=null,(0,b.resetCachedPipeline)(e),this._gl&&(this._currentProgram===e.program&&this._setProgram(null),this._gl.deleteProgram(e.program)))}_getGlobalDefines(e){return(0,S._GetGlobalDefines)(e,this.isNDCHalfZRange,this.useReverseDepthBuffer,this.useExactSrgbConversions)}createEffect(e,t,r,i,s,a,n,_,l,o=0,c){let g="string"==typeof e?e:e.vertexToken||e.vertexSource||e.vertexElement||e.vertex,f="string"==typeof e?e:e.fragmentToken||e.fragmentSource||e.fragmentElement||e.fragment,d=this._getGlobalDefines(),E=void 0!==t.attributes,T=s??t.defines??"";d&&(T+=d);let R=g+"+"+f+"@"+T;if(this._compiledEffects[R]){let e=this._compiledEffects[R];return n&&e.isReady()&&n(e),e._refCount++,e}this._gl&&(0,u.getStateObject)(this._gl);let p=new h.Effect(e,t,E?this:r,i,this,s,a,n,_,l,R,t.shaderLanguage??o,t.extraInitializationsAsync??c);return this._compiledEffects[R]=p,p}_getShaderSource(e){return this._gl.getShaderSource(e)}createRawShaderProgram(e,t,r,i,s=null){let a=(0,u.getStateObject)(this._gl);return a._contextWasLost=this._contextWasLost,a.validateShaderPrograms=this.validateShaderPrograms,(0,u.createRawShaderProgram)(e,t,r,i||this._gl,s)}createShaderProgram(e,t,r,i,s,a=null){let n=(0,u.getStateObject)(this._gl);return n._contextWasLost=this._contextWasLost,n.validateShaderPrograms=this.validateShaderPrograms,(0,u.createShaderProgram)(e,t,r,i,s||this._gl,a)}inlineShaderCode(e){return e}createPipelineContext(e){this._gl&&((0,u.getStateObject)(this._gl).parallelShaderCompile=this._caps.parallelShaderCompile);let t=(0,u.createPipelineContext)(this._gl,e);return t.engine=this,t}createMaterialContext(){}createDrawContext(){}_finalizePipelineContext(e){return(0,u._finalizePipelineContext)(e,this._gl,this.validateShaderPrograms)}_preparePipelineContextAsync(e,t,r,i,s,a,n,_,l,h,o){let c=(0,u.getStateObject)(this._gl);return c._contextWasLost=this._contextWasLost,c.validateShaderPrograms=this.validateShaderPrograms,c._createShaderProgramInjection=this._createShaderProgram.bind(this),c.createRawShaderProgramInjection=this.createRawShaderProgram.bind(this),c.createShaderProgramInjection=this.createShaderProgram.bind(this),c.loadFileInjection=this._loadFile.bind(this),(0,u._preparePipelineContext)(e,t,r,i,s,a,n,_,l,h,o)}_createShaderProgram(e,t,r,i,s=null){return(0,u._createShaderProgram)(e,t,r,i,s)}_isRenderingStateCompiled(e){return!this._isDisposed&&(0,u._isRenderingStateCompiled)(e,this._gl,this.validateShaderPrograms)}_executeWhenRenderingStateIsCompiled(e,t){(0,u._executeWhenRenderingStateIsCompiled)(e,t)}getUniforms(e,t){let r=[];for(let i=0;i<t.length;i++)r.push(this._gl.getUniformLocation(e.program,t[i]));return r}getAttributes(e,t){let r=[];for(let i=0;i<t.length;i++)try{r.push(this._gl.getAttribLocation(e.program,t[i]))}catch(e){r.push(-1)}return r}enableEffect(e){(e=null!==e&&(0,c.IsWrapper)(e)?e.effect:e)&&e!==this._currentEffect&&(this._stencilStateComposer.stencilMaterial=void 0,this.bindSamplers(e),this._currentEffect=e,e.onBind&&e.onBind(e),e._onBindObservable&&e._onBindObservable.notifyObservers(e))}setInt(e,t){return!!e&&(this._gl.uniform1i(e,t),!0)}setInt2(e,t,r){return!!e&&(this._gl.uniform2i(e,t,r),!0)}setInt3(e,t,r,i){return!!e&&(this._gl.uniform3i(e,t,r,i),!0)}setInt4(e,t,r,i,s){return!!e&&(this._gl.uniform4i(e,t,r,i,s),!0)}setIntArray(e,t){return!!e&&(this._gl.uniform1iv(e,t),!0)}setIntArray2(e,t){return!!e&&t.length%2==0&&(this._gl.uniform2iv(e,t),!0)}setIntArray3(e,t){return!!e&&t.length%3==0&&(this._gl.uniform3iv(e,t),!0)}setIntArray4(e,t){return!!e&&t.length%4==0&&(this._gl.uniform4iv(e,t),!0)}setUInt(e,t){return!!e&&(this._gl.uniform1ui(e,t),!0)}setUInt2(e,t,r){return!!e&&(this._gl.uniform2ui(e,t,r),!0)}setUInt3(e,t,r,i){return!!e&&(this._gl.uniform3ui(e,t,r,i),!0)}setUInt4(e,t,r,i,s){return!!e&&(this._gl.uniform4ui(e,t,r,i,s),!0)}setUIntArray(e,t){return!!e&&(this._gl.uniform1uiv(e,t),!0)}setUIntArray2(e,t){return!!e&&t.length%2==0&&(this._gl.uniform2uiv(e,t),!0)}setUIntArray3(e,t){return!!e&&t.length%3==0&&(this._gl.uniform3uiv(e,t),!0)}setUIntArray4(e,t){return!!e&&t.length%4==0&&(this._gl.uniform4uiv(e,t),!0)}setArray(e,t){return!!e&&!(t.length<1)&&(this._gl.uniform1fv(e,t),!0)}setArray2(e,t){return!!e&&t.length%2==0&&(this._gl.uniform2fv(e,t),!0)}setArray3(e,t){return!!e&&t.length%3==0&&(this._gl.uniform3fv(e,t),!0)}setArray4(e,t){return!!e&&t.length%4==0&&(this._gl.uniform4fv(e,t),!0)}setMatrices(e,t){return!!e&&(this._gl.uniformMatrix4fv(e,!1,t),!0)}setMatrix3x3(e,t){return!!e&&(this._gl.uniformMatrix3fv(e,!1,t),!0)}setMatrix2x2(e,t){return!!e&&(this._gl.uniformMatrix2fv(e,!1,t),!0)}setFloat(e,t){return!!e&&(this._gl.uniform1f(e,t),!0)}setFloat2(e,t,r){return!!e&&(this._gl.uniform2f(e,t,r),!0)}setFloat3(e,t,r,i){return!!e&&(this._gl.uniform3f(e,t,r,i),!0)}setFloat4(e,t,r,i,s){return!!e&&(this._gl.uniform4f(e,t,r,i,s),!0)}applyStates(){if(this._depthCullingState.apply(this._gl),this._stencilStateComposer.apply(this._gl),this._alphaState.apply(this._gl,this._currentRenderTarget&&this._currentRenderTarget.textures?this._currentRenderTarget.textures.length:1),this._colorWriteChanged){this._colorWriteChanged=!1;let e=this._colorWrite;this._gl.colorMask(e,e,e,e)}}wipeCaches(e){(!this.preventCacheWipeBetweenFrames||e)&&(this._currentEffect=null,this._viewportCached.x=0,this._viewportCached.y=0,this._viewportCached.z=0,this._viewportCached.w=0,this._unbindVertexArrayObject(),e&&(this._currentProgram=null,this.resetTextureCache(),this._stencilStateComposer.reset(),this._depthCullingState.reset(),this._depthCullingState.depthFunc=this._gl.LEQUAL,this._alphaState.reset(),this._resetAlphaMode(),this._colorWrite=!0,this._colorWriteChanged=!0,this._unpackFlipYCached=null,this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL,this._gl.NONE),this._gl.pixelStorei(this._gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),this._mustWipeVertexAttributes=!0,this.unbindAllAttributes()),this._resetVertexBufferBinding(),this._cachedIndexBuffer=null,this._cachedEffectForVertexBuffers=null,this.bindIndexBuffer(null))}_getSamplingParameters(e,t){let r=this._gl,i=r.NEAREST,s=r.NEAREST,a=!1;switch(e){case 11:i=r.LINEAR,s=t?r.LINEAR_MIPMAP_NEAREST:r.LINEAR;break;case 3:i=r.LINEAR,a=!0,s=t?r.LINEAR_MIPMAP_LINEAR:r.LINEAR;break;case 8:a=!0,i=r.NEAREST,s=t?r.NEAREST_MIPMAP_LINEAR:r.NEAREST;break;case 4:i=r.NEAREST,s=t?r.NEAREST_MIPMAP_NEAREST:r.NEAREST;break;case 5:i=r.NEAREST,s=t?r.LINEAR_MIPMAP_NEAREST:r.LINEAR;break;case 6:a=!0,i=r.NEAREST,s=t?r.LINEAR_MIPMAP_LINEAR:r.LINEAR;break;case 7:i=r.NEAREST,s=r.LINEAR;break;case 1:i=r.NEAREST,s=r.NEAREST;break;case 9:i=r.LINEAR,s=t?r.NEAREST_MIPMAP_NEAREST:r.NEAREST;break;case 10:a=!0,i=r.LINEAR,s=t?r.NEAREST_MIPMAP_LINEAR:r.NEAREST;break;case 2:i=r.LINEAR,s=r.LINEAR;break;case 12:i=r.LINEAR,s=r.NEAREST}return{min:s,mag:i,hasMipMaps:a}}_createTexture(){let e=this._gl.createTexture();if(!e)throw Error("Unable to create texture");return e}_createHardwareTexture(){return new A(this._createTexture(),this._gl)}_createInternalTexture(e,t,r=!0,i=0){let s,a,n=!1,_=0,l=3,h=5,u=!1,o=1,c=!1,f=0,d=!1;void 0!==t&&"object"==typeof t?(s=!!t.generateMipMaps,n=!!t.createMipMaps,_=void 0===t.type?0:t.type,l=void 0===t.samplingMode?3:t.samplingMode,h=void 0===t.format?5:t.format,u=void 0!==t.useSRGBBuffer&&t.useSRGBBuffer,o=t.samples??1,a=t.label,c=!!t.createMSAATexture,f=t.comparisonFunction||0,d=!!t.isCube):s=!!t,u&&(u=this._caps.supportSRGBBuffers&&(this.webGLVersion>1||this.isWebGPU)),(1!==_||this._caps.textureFloatLinearFiltering)&&(2!==_||this._caps.textureHalfFloatLinearFiltering)||(l=1),1!==_||this._caps.textureFloat||(_=0,g.Logger.Warn("Float textures are not supported. Type forced to TEXTURETYPE_UNSIGNED_BYTE"));let E=m(h),T=B(h),R=this._gl,p=new x.InternalTexture(this,i),A=e.width||e,S=e.height||e,b=e.depth||0,C=e.layers||0,P=this._getSamplingParameters(l,(s||n)&&!E),L=0!==C?R.TEXTURE_2D_ARRAY:0!==b?R.TEXTURE_3D:d?R.TEXTURE_CUBE_MAP:R.TEXTURE_2D,M=E?this._getInternalFormatFromDepthTextureFormat(h,!0,T):this._getRGBABufferInternalSizedFormat(_,h,u),G=E?T?R.DEPTH_STENCIL:R.DEPTH_COMPONENT:this._getInternalFormat(h),I=E?this._getWebGLTextureTypeFromDepthTextureFormat(h):this._getWebGLTextureType(_);if(this._bindTextureDirectly(L,p),0!==C)p.is2DArray=!0,R.texImage3D(L,0,M,A,S,C,0,G,I,null);else if(0!==b)p.is3D=!0,R.texImage3D(L,0,M,A,S,b,0,G,I,null);else if(d){p.isCube=!0;for(let e=0;e<6;e++)R.texImage2D(R.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,M,A,S,0,G,I,null)}else R.texImage2D(L,0,M,A,S,0,G,I,null);if(R.texParameteri(L,R.TEXTURE_MAG_FILTER,P.mag),R.texParameteri(L,R.TEXTURE_MIN_FILTER,P.min),R.texParameteri(L,R.TEXTURE_WRAP_S,R.CLAMP_TO_EDGE),R.texParameteri(L,R.TEXTURE_WRAP_T,R.CLAMP_TO_EDGE),E&&this.webGLVersion>1&&(0===f?(R.texParameteri(L,R.TEXTURE_COMPARE_FUNC,515),R.texParameteri(L,R.TEXTURE_COMPARE_MODE,R.NONE)):(R.texParameteri(L,R.TEXTURE_COMPARE_FUNC,f),R.texParameteri(L,R.TEXTURE_COMPARE_MODE,R.COMPARE_REF_TO_TEXTURE))),(s||n)&&this._gl.generateMipmap(L),this._bindTextureDirectly(L,null),p._useSRGBBuffer=u,p.baseWidth=A,p.baseHeight=S,p.width=A,p.height=S,p.depth=C||b,p.isReady=!0,p.samples=o,p.generateMipMaps=s,p.samplingMode=l,p.type=_,p.format=h,p.label=a,p.comparisonFunction=f,this._internalTexturesCache.push(p),c){let e;if(!(e=m(p.format)?this._setupFramebufferDepthAttachments(B(p.format),19!==p.format,p.width,p.height,o,p.format,!0):this._createRenderBuffer(p.width,p.height,o,-1,this._getRGBABufferInternalSizedFormat(p.type,p.format,p._useSRGBBuffer),-1)))throw Error("Unable to create render buffer");p._autoMSAAManagement=!0;let t=p._hardwareTexture;t||(t=p._hardwareTexture=this._createHardwareTexture()),t.addMSAARenderBuffer(e)}return p}_getUseSRGBBuffer(e,t){return e&&this._caps.supportSRGBBuffers&&(this.webGLVersion>1||t)}createTexture(e,t,r,i,s=3,a=null,n=null,_=null,l=null,h=null,u=null,o,c,g,f){return this._createTextureBase(e,t,r,i,s,a,n,(...e)=>this._prepareWebGLTexture(...e,h),(e,t,r,s,a,n)=>{let _=this._gl,l=r.width===e&&r.height===t;a._creationFlags=g??0;let h=this._getTexImageParametersForCreateTexture(a.format,a._useSRGBBuffer);if(l)return _.texImage2D(_.TEXTURE_2D,0,h.internalFormat,h.format,h.type,r),!1;let u=this._caps.maxTextureSize;if(r.width>u||r.height>u||!this._supportsHardwareTextureRescaling)return this._prepareWorkingCanvas(),!!this._workingCanvas&&!!this._workingContext&&(this._workingCanvas.width=e,this._workingCanvas.height=t,this._workingContext.drawImage(r,0,0,r.width,r.height,0,0,e,t),_.texImage2D(_.TEXTURE_2D,0,h.internalFormat,h.format,h.type,this._workingCanvas),a.width=e,a.height=t,!1);{let e=new x.InternalTexture(this,2);this._bindTextureDirectly(_.TEXTURE_2D,e,!0),_.texImage2D(_.TEXTURE_2D,0,h.internalFormat,h.format,h.type,r),this._rescaleTexture(e,a,i,h.format,()=>{this._releaseTexture(e),this._bindTextureDirectly(_.TEXTURE_2D,a,!0),n()})}return!0},_,l,h,u,o,c,f)}_getTexImageParametersForCreateTexture(e,t){let r,i;return 1===this.webGLVersion?i=r=this._getInternalFormat(e,t):(r=this._getInternalFormat(e,!1),i=this._getRGBABufferInternalSizedFormat(0,e,t)),{internalFormat:i,format:r,type:this._gl.UNSIGNED_BYTE}}_rescaleTexture(e,t,r,i,s){}_unpackFlipY(e){this._unpackFlipYCached!==e&&(this._gl.pixelStorei(this._gl.UNPACK_FLIP_Y_WEBGL,+!!e),this.enableUnpackFlipYCached&&(this._unpackFlipYCached=e))}_getUnpackAlignement(){return this._gl.getParameter(this._gl.UNPACK_ALIGNMENT)}_getTextureTarget(e){return e.isCube?this._gl.TEXTURE_CUBE_MAP:e.is3D?this._gl.TEXTURE_3D:e.is2DArray||e.isMultiview?this._gl.TEXTURE_2D_ARRAY:this._gl.TEXTURE_2D}updateTextureSamplingMode(e,t,r=!1){let i=this._getTextureTarget(t),s=this._getSamplingParameters(e,t.useMipMaps||r);this._setTextureParameterInteger(i,this._gl.TEXTURE_MAG_FILTER,s.mag,t),this._setTextureParameterInteger(i,this._gl.TEXTURE_MIN_FILTER,s.min),r&&s.hasMipMaps&&(t.generateMipMaps=!0,this._gl.generateMipmap(i)),this._bindTextureDirectly(i,null),t.samplingMode=e}updateTextureDimensions(e,t,r,i=1){}updateTextureWrappingMode(e,t,r=null,i=null){let s=this._getTextureTarget(e);null!==t&&(this._setTextureParameterInteger(s,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(t),e),e._cachedWrapU=t),null!==r&&(this._setTextureParameterInteger(s,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(r),e),e._cachedWrapV=r),(e.is2DArray||e.is3D)&&null!==i&&(this._setTextureParameterInteger(s,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(i),e),e._cachedWrapR=i),this._bindTextureDirectly(s,null)}_uploadCompressedDataToTextureDirectly(e,t,r,i,s,a=0,n=0){let _=this._gl,l=_.TEXTURE_2D;if(e.isCube&&(l=_.TEXTURE_CUBE_MAP_POSITIVE_X+a),e._useSRGBBuffer)switch(t){case 37492:case 36196:this._caps.etc2?t=_.COMPRESSED_SRGB8_ETC2:e._useSRGBBuffer=!1;break;case 37496:this._caps.etc2?t=_.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:e._useSRGBBuffer=!1;break;case 36492:t=_.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT;break;case 37808:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR;break;case 37809:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR;break;case 37810:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR;break;case 37811:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR;break;case 37812:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR;break;case 37813:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR;break;case 37814:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR;break;case 37815:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR;break;case 37816:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR;break;case 37817:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR;break;case 37818:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR;break;case 37819:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR;break;case 37820:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR;break;case 37821:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR;break;case 33776:this._caps.s3tc_srgb?t=_.COMPRESSED_SRGB_S3TC_DXT1_EXT:e._useSRGBBuffer=!1;break;case 33777:this._caps.s3tc_srgb?t=_.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:e._useSRGBBuffer=!1;break;case 33779:this._caps.s3tc_srgb?t=_.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:e._useSRGBBuffer=!1;break;default:e._useSRGBBuffer=!1}if(e.generateMipMaps){let a=e._hardwareTexture;a.memoryAllocated||(_.texStorage2D(e.isCube?_.TEXTURE_CUBE_MAP:_.TEXTURE_2D,Math.floor(Math.log2(Math.max(r,i)))+1,t,e.width,e.height),a.memoryAllocated=!0),this._gl.compressedTexSubImage2D(l,n,0,0,r,i,t,s)}else this._gl.compressedTexImage2D(l,n,t,r,i,0,s)}_uploadDataToTextureDirectly(e,t,r=0,i=0,s,a=!1){let n=this._gl,_=this._getWebGLTextureType(e.type),l=this._getInternalFormat(e.format),h=void 0===s?this._getRGBABufferInternalSizedFormat(e.type,e.format,e._useSRGBBuffer):this._getInternalFormat(s,e._useSRGBBuffer);this._unpackFlipY(e.invertY);let u=n.TEXTURE_2D;e.isCube&&(u=n.TEXTURE_CUBE_MAP_POSITIVE_X+r);let o=Math.round(Math.log(e.width)*Math.LOG2E),c=Math.round(Math.log(e.height)*Math.LOG2E),g=a?e.width:Math.pow(2,Math.max(o-i,0)),f=a?e.height:Math.pow(2,Math.max(c-i,0));n.texImage2D(u,i,h,g,f,0,l,_,t)}updateTextureData(e,t,r,i,s,a,n=0,_=0,l=!1){let h=this._gl,u=this._getWebGLTextureType(e.type),o=this._getInternalFormat(e.format);this._unpackFlipY(e.invertY);let c=h.TEXTURE_2D,g=h.TEXTURE_2D;e.isCube&&(g=h.TEXTURE_CUBE_MAP_POSITIVE_X+n,c=h.TEXTURE_CUBE_MAP),this._bindTextureDirectly(c,e,!0),h.texSubImage2D(g,_,r,i,s,a,o,u,t),l&&this._gl.generateMipmap(g),this._bindTextureDirectly(c,null)}_uploadArrayBufferViewToTexture(e,t,r=0,i=0){let s=this._gl,a=e.isCube?s.TEXTURE_CUBE_MAP:s.TEXTURE_2D;this._bindTextureDirectly(a,e,!0),this._uploadDataToTextureDirectly(e,t,r,i),this._bindTextureDirectly(a,null,!0)}_prepareWebGLTextureContinuation(e,t,r,i,s){let a=this._gl;if(!a)return;let n=this._getSamplingParameters(s,!r);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,n.mag),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,n.min),r||i||a.generateMipmap(a.TEXTURE_2D),this._bindTextureDirectly(a.TEXTURE_2D,null),t&&t.removePendingData(e),e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear()}_prepareWebGLTexture(e,t,r,i,s,a,n,_,l,h){let u=this.getCaps().maxTextureSize,o=Math.min(u,this.needPOTTextures?(0,p.GetExponentOfTwo)(i.width,u):i.width),c=Math.min(u,this.needPOTTextures?(0,p.GetExponentOfTwo)(i.height,u):i.height),g=this._gl;if(g){if(!e._hardwareTexture){r&&r.removePendingData(e);return}this._bindTextureDirectly(g.TEXTURE_2D,e,!0),this._unpackFlipY(void 0===s||!!s),e.baseWidth=i.width,e.baseHeight=i.height,e.width=o,e.height=c,e.isReady=!0,e.type=-1!==e.type?e.type:0,e.format=-1!==e.format?e.format:h??(".jpg"!==t||e._useSRGBBuffer?5:4),_(o,c,i,t,e,()=>{this._prepareWebGLTextureContinuation(e,r,a,n,l)})||this._prepareWebGLTextureContinuation(e,r,a,n,l)}}_getInternalFormatFromDepthTextureFormat(e,t,r){let i=this._gl;if(!t)return i.STENCIL_INDEX8;let s=r?i.DEPTH_STENCIL:i.DEPTH_COMPONENT;return this.webGLVersion>1?15===e?s=i.DEPTH_COMPONENT16:16===e?s=i.DEPTH_COMPONENT24:17===e||13===e?s=r?i.DEPTH24_STENCIL8:i.DEPTH_COMPONENT24:14===e?s=i.DEPTH_COMPONENT32F:18===e&&(s=r?i.DEPTH32F_STENCIL8:i.DEPTH_COMPONENT32F):s=i.DEPTH_COMPONENT16,s}_getWebGLTextureTypeFromDepthTextureFormat(e){let t=this._gl,r=t.UNSIGNED_INT;return 15===e?r=t.UNSIGNED_SHORT:17===e||13===e?r=t.UNSIGNED_INT_24_8:14===e?r=t.FLOAT:18===e?r=t.FLOAT_32_UNSIGNED_INT_24_8_REV:19===e&&(r=t.UNSIGNED_BYTE),r}_setupFramebufferDepthAttachments(e,t,r,i,s=1,a,n=!1){let _=this._gl;a=a??(e?13:14);let l=this._getInternalFormatFromDepthTextureFormat(a,t,e);return e&&t?this._createRenderBuffer(r,i,s,_.DEPTH_STENCIL,l,n?-1:_.DEPTH_STENCIL_ATTACHMENT):t?this._createRenderBuffer(r,i,s,l,l,n?-1:_.DEPTH_ATTACHMENT):e?this._createRenderBuffer(r,i,s,l,l,n?-1:_.STENCIL_ATTACHMENT):null}_createRenderBuffer(e,t,r,i,s,a,n=!0){let _=this._gl.createRenderbuffer();return this._updateRenderBuffer(_,e,t,r,i,s,a,n)}_updateRenderBuffer(e,t,r,i,s,a,n,_=!0){let l=this._gl;return l.bindRenderbuffer(l.RENDERBUFFER,e),i>1&&l.renderbufferStorageMultisample?l.renderbufferStorageMultisample(l.RENDERBUFFER,i,a,t,r):l.renderbufferStorage(l.RENDERBUFFER,s,t,r),-1!==n&&l.framebufferRenderbuffer(l.FRAMEBUFFER,n,l.RENDERBUFFER,e),_&&l.bindRenderbuffer(l.RENDERBUFFER,null),e}_releaseTexture(e){this._deleteTexture(e._hardwareTexture),this.unbindAllTextures();let t=this._internalTexturesCache.indexOf(e);-1!==t&&this._internalTexturesCache.splice(t,1),e._lodTextureHigh&&e._lodTextureHigh.dispose(),e._lodTextureMid&&e._lodTextureMid.dispose(),e._lodTextureLow&&e._lodTextureLow.dispose(),e._irradianceTexture&&e._irradianceTexture.dispose()}_deleteTexture(e){e?.release()}_setProgram(e){this._currentProgram!==e&&((0,u._setProgram)(e,this._gl),this._currentProgram=e)}bindSamplers(e){let t=e.getPipelineContext();this._setProgram(t.program);let r=e.getSamplers();for(let t=0;t<r.length;t++){let i=e.getUniform(r[t]);i&&(this._boundUniforms[t]=i)}this._currentEffect=null}_activateCurrentTexture(){this._currentTextureChannel!==this._activeChannel&&(this._gl.activeTexture(this._gl.TEXTURE0+this._activeChannel),this._currentTextureChannel=this._activeChannel)}_bindTextureDirectly(e,t,r=!1,i=!1){let s=!1,a=t&&t._associatedChannel>-1;if(r&&a&&(this._activeChannel=t._associatedChannel),this._boundTexturesCache[this._activeChannel]!==t||i){if(this._activateCurrentTexture(),t&&t.isMultiview)throw g.Logger.Error(["_bindTextureDirectly called with a multiview texture!",e,t]),"_bindTextureDirectly called with a multiview texture!";this._gl.bindTexture(e,t?._hardwareTexture?.underlyingResource??null),this._boundTexturesCache[this._activeChannel]=t,t&&(t._associatedChannel=this._activeChannel)}else r&&(s=!0,this._activateCurrentTexture());return a&&!r&&this._bindSamplerUniformToChannel(t._associatedChannel,this._activeChannel),s}_bindTexture(e,t,r){if(void 0===e)return;t&&(t._associatedChannel=e),this._activeChannel=e;let i=t?this._getTextureTarget(t):this._gl.TEXTURE_2D;this._bindTextureDirectly(i,t)}unbindAllTextures(){for(let e=0;e<this._maxSimultaneousTextures;e++)this._activeChannel=e,this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),this.webGLVersion>1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))}setTexture(e,t,r,i){void 0!==e&&(t&&(this._boundUniforms[e]=t),this._setTexture(e,r))}_bindSamplerUniformToChannel(e,t){let r=this._boundUniforms[e];r&&r._currentState!==t&&(this._gl.uniform1i(r,t),r._currentState=t)}_getTextureWrapMode(e){switch(e){case 1:break;case 0:return this._gl.CLAMP_TO_EDGE;case 2:return this._gl.MIRRORED_REPEAT}return this._gl.REPEAT}_setTexture(e,t,r=!1,i=!1,s=""){let a;if(!t)return null!=this._boundTexturesCache[e]&&(this._activeChannel=e,this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),this.webGLVersion>1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))),!1;if(t.video){this._activeChannel=e;let r=t.getInternalTexture();r&&(r._associatedChannel=e),t.update()}else if(4===t.delayLoadState)return t.delayLoad(),!1;a=i?t.depthStencilTexture:t.isReady()?t.getInternalTexture():t.isCube?this.emptyCubeTexture:t.is3D?this.emptyTexture3D:t.is2DArray?this.emptyTexture2DArray:this.emptyTexture,!r&&a&&(a._associatedChannel=e);let n=!0;this._boundTexturesCache[e]===a&&(r||this._bindSamplerUniformToChannel(a._associatedChannel,e),n=!1),this._activeChannel=e;let _=this._getTextureTarget(a);if(n&&this._bindTextureDirectly(_,a,r),a&&!a.isMultiview){if(a.isCube&&a._cachedCoordinatesMode!==t.coordinatesMode){a._cachedCoordinatesMode=t.coordinatesMode;let e=+(3!==t.coordinatesMode&&5!==t.coordinatesMode);t.wrapU=e,t.wrapV=e}a._cachedWrapU!==t.wrapU&&(a._cachedWrapU=t.wrapU,this._setTextureParameterInteger(_,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(t.wrapU),a)),a._cachedWrapV!==t.wrapV&&(a._cachedWrapV=t.wrapV,this._setTextureParameterInteger(_,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(t.wrapV),a)),a.is3D&&a._cachedWrapR!==t.wrapR&&(a._cachedWrapR=t.wrapR,this._setTextureParameterInteger(_,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(t.wrapR),a)),this._setAnisotropicLevel(_,a,t.anisotropicFilteringLevel)}return!0}setTextureArray(e,t,r,i){if(void 0!==e&&t){this._textureUnits&&this._textureUnits.length===r.length||(this._textureUnits=new Int32Array(r.length));for(let t=0;t<r.length;t++){let i=r[t].getInternalTexture();i?(this._textureUnits[t]=e+t,i._associatedChannel=e+t):this._textureUnits[t]=-1}this._gl.uniform1iv(t,this._textureUnits);for(let e=0;e<r.length;e++)this._setTexture(this._textureUnits[e],r[e],!0)}}_setAnisotropicLevel(e,t,r){let i=this._caps.textureAnisotropicFilterExtension;11!==t.samplingMode&&3!==t.samplingMode&&2!==t.samplingMode&&(r=1),i&&t._cachedAnisotropicFilteringLevel!==r&&(this._setTextureParameterFloat(e,i.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(r,this._caps.maxAnisotropy),t),t._cachedAnisotropicFilteringLevel=r)}_setTextureParameterFloat(e,t,r,i){this._bindTextureDirectly(e,i,!0,!0),this._gl.texParameterf(e,t,r)}_setTextureParameterInteger(e,t,r,i){i&&this._bindTextureDirectly(e,i,!0,!0),this._gl.texParameteri(e,t,r)}unbindAllAttributes(){if(this._mustWipeVertexAttributes){this._mustWipeVertexAttributes=!1;for(let e=0;e<this._caps.maxVertexAttribs;e++)this.disableAttributeByIndex(e);return}for(let e=0,t=this._vertexAttribArraysEnabled.length;e<t;e++)!(e>=this._caps.maxVertexAttribs)&&this._vertexAttribArraysEnabled[e]&&this.disableAttributeByIndex(e)}releaseEffects(){this._compiledEffects={},this.onReleaseEffectsObservable.notifyObservers(this)}dispose(){(0,f.IsWindowObjectExist)()&&this._renderingCanvas&&(this._renderingCanvas.removeEventListener("webglcontextlost",this._onContextLost),this._onContextRestored&&this._renderingCanvas.removeEventListener("webglcontextrestored",this._onContextRestored)),super.dispose(),this._dummyFramebuffer&&this._gl.deleteFramebuffer(this._dummyFramebuffer),this.unbindAllAttributes(),this._boundUniforms={},this._workingCanvas=null,this._workingContext=null,this._currentBufferPointers.length=0,this._currentProgram=null,this._creationOptions.loseContextOnDispose&&this._gl.getExtension("WEBGL_lose_context")?.loseContext(),(0,u.deleteStateObject)(this._gl)}attachContextLostEvent(e){this._renderingCanvas&&this._renderingCanvas.addEventListener("webglcontextlost",e,!1)}attachContextRestoredEvent(e){this._renderingCanvas&&this._renderingCanvas.addEventListener("webglcontextrestored",e,!1)}getError(){return this._gl.getError()}_canRenderToFloatFramebuffer(){return this._webGLVersion>1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(1)}_canRenderToHalfFloatFramebuffer(){return this._webGLVersion>1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(2)}_canRenderToFramebuffer(e){let t=this._gl;for(;t.getError()!==t.NO_ERROR;);let r=!0,i=t.createTexture();t.bindTexture(t.TEXTURE_2D,i),t.texImage2D(t.TEXTURE_2D,0,this._getRGBABufferInternalSizedFormat(e),1,1,0,t.RGBA,this._getWebGLTextureType(e),null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST);let s=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,s),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,i,0);let a=t.checkFramebufferStatus(t.FRAMEBUFFER);if((r=(r=r&&a===t.FRAMEBUFFER_COMPLETE)&&t.getError()===t.NO_ERROR)&&(t.clear(t.COLOR_BUFFER_BIT),r=r&&t.getError()===t.NO_ERROR),r){t.bindFramebuffer(t.FRAMEBUFFER,null);let e=t.RGBA,i=t.UNSIGNED_BYTE,s=new Uint8Array(4);t.readPixels(0,0,1,1,e,i,s),r=r&&t.getError()===t.NO_ERROR}for(t.deleteTexture(i),t.deleteFramebuffer(s),t.bindFramebuffer(t.FRAMEBUFFER,null);!r&&t.getError()!==t.NO_ERROR;);return r}_getWebGLTextureType(e){if(1===this._webGLVersion){switch(e){case 1:return this._gl.FLOAT;case 2:return this._gl.HALF_FLOAT_OES;case 0:break;case 8:return this._gl.UNSIGNED_SHORT_4_4_4_4;case 9:return this._gl.UNSIGNED_SHORT_5_5_5_1;case 10:return this._gl.UNSIGNED_SHORT_5_6_5}return this._gl.UNSIGNED_BYTE}switch(e){case 3:return this._gl.BYTE;case 0:break;case 4:return this._gl.SHORT;case 5:return this._gl.UNSIGNED_SHORT;case 6:return this._gl.INT;case 7:return this._gl.UNSIGNED_INT;case 1:return this._gl.FLOAT;case 2:return this._gl.HALF_FLOAT;case 8:return this._gl.UNSIGNED_SHORT_4_4_4_4;case 9:return this._gl.UNSIGNED_SHORT_5_5_5_1;case 10:return this._gl.UNSIGNED_SHORT_5_6_5;case 11:return this._gl.UNSIGNED_INT_2_10_10_10_REV;case 12:return this._gl.UNSIGNED_INT_24_8;case 13:return this._gl.UNSIGNED_INT_10F_11F_11F_REV;case 14:return this._gl.UNSIGNED_INT_5_9_9_9_REV;case 15:return this._gl.FLOAT_32_UNSIGNED_INT_24_8_REV}return this._gl.UNSIGNED_BYTE}_getInternalFormat(e,t=!1){let r=t?this._glSRGBExtensionValues.SRGB8_ALPHA8:this._gl.RGBA;switch(e){case 0:r=this._gl.ALPHA;break;case 1:r=this._gl.LUMINANCE;break;case 2:r=this._gl.LUMINANCE_ALPHA;break;case 6:case 33322:case 36760:r=this._gl.RED;break;case 7:case 33324:case 36761:r=this._gl.RG;break;case 4:case 32852:case 36762:r=t?this._glSRGBExtensionValues.SRGB:this._gl.RGB;break;case 5:case 32859:case 36763:r=t?this._glSRGBExtensionValues.SRGB8_ALPHA8:this._gl.RGBA}if(this._webGLVersion>1)switch(e){case 8:r=this._gl.RED_INTEGER;break;case 9:r=this._gl.RG_INTEGER;break;case 10:r=this._gl.RGB_INTEGER;break;case 11:r=this._gl.RGBA_INTEGER}return r}_getRGBABufferInternalSizedFormat(e,t,r=!1){if(1===this._webGLVersion){if(void 0!==t)switch(t){case 0:return this._gl.ALPHA;case 1:return this._gl.LUMINANCE;case 2:return this._gl.LUMINANCE_ALPHA;case 4:return r?this._glSRGBExtensionValues.SRGB:this._gl.RGB}return this._gl.RGBA}switch(e){case 3:switch(t){case 6:return this._gl.R8_SNORM;case 7:return this._gl.RG8_SNORM;case 4:return this._gl.RGB8_SNORM;case 8:return this._gl.R8I;case 9:return this._gl.RG8I;case 10:return this._gl.RGB8I;case 11:return this._gl.RGBA8I;default:return this._gl.RGBA8_SNORM}case 0:switch(t){case 6:return this._gl.R8;case 7:return this._gl.RG8;case 4:return r?this._glSRGBExtensionValues.SRGB8:this._gl.RGB8;case 5:return r?this._glSRGBExtensionValues.SRGB8_ALPHA8:this._gl.RGBA8;case 8:return this._gl.R8UI;case 9:return this._gl.RG8UI;case 10:return this._gl.RGB8UI;case 11:return this._gl.RGBA8UI;case 0:return this._gl.ALPHA;case 1:return this._gl.LUMINANCE;case 2:return this._gl.LUMINANCE_ALPHA;default:return this._gl.RGBA8}case 4:switch(t){case 8:return this._gl.R16I;case 36760:return this._gl.R16_SNORM_EXT;case 36761:return this._gl.RG16_SNORM_EXT;case 36762:return this._gl.RGB16_SNORM_EXT;case 36763:return this._gl.RGBA16_SNORM_EXT;case 9:return this._gl.RG16I;case 10:return this._gl.RGB16I;default:return this._gl.RGBA16I}case 5:switch(t){case 8:return this._gl.R16UI;case 33322:return this._gl.R16_EXT;case 33324:return this._gl.RG16_EXT;case 32852:return this._gl.RGB16_EXT;case 32859:return this._gl.RGBA16_EXT;case 9:return this._gl.RG16UI;case 10:return this._gl.RGB16UI;default:return this._gl.RGBA16UI}case 6:switch(t){case 8:return this._gl.R32I;case 9:return this._gl.RG32I;case 10:return this._gl.RGB32I;default:return this._gl.RGBA32I}case 7:switch(t){case 8:return this._gl.R32UI;case 9:return this._gl.RG32UI;case 10:return this._gl.RGB32UI;default:return this._gl.RGBA32UI}case 1:switch(t){case 6:return this._gl.R32F;case 7:return this._gl.RG32F;case 4:return this._gl.RGB32F;default:return this._gl.RGBA32F}case 2:switch(t){case 6:return this._gl.R16F;case 7:return this._gl.RG16F;case 4:return this._gl.RGB16F;default:return this._gl.RGBA16F}case 10:return this._gl.RGB565;case 13:return this._gl.R11F_G11F_B10F;case 14:return this._gl.RGB9_E5;case 8:return this._gl.RGBA4;case 9:return this._gl.RGB5_A1;case 11:switch(t){case 5:default:return this._gl.RGB10_A2;case 11:return this._gl.RGB10_A2UI}}return r?this._glSRGBExtensionValues.SRGB8_ALPHA8:this._gl.RGBA8}readPixels(e,t,r,i,s=!0,a=!0,n=null){let _=s?this._gl.RGBA:this._gl.RGB,l=r*i*(s?4:3);if(n){if(n.length<l)return g.Logger.Error(`Data buffer is too small to store the read pixels (${n.length} should be more than ${l})`),Promise.resolve(n)}else n=new Uint8Array(l);return a&&this.flushFramebuffer(),this._gl.readPixels(e,t,r,i,_,this._gl.UNSIGNED_BYTE,n),Promise.resolve(n)}static get IsSupportedAsync(){return Promise.resolve(this.isSupported())}static get IsSupported(){return this.isSupported()}static isSupported(){if(null!==this._HasMajorPerformanceCaveat)return!this._HasMajorPerformanceCaveat;if(null===this._IsSupported)try{let e=o.AbstractEngine._CreateCanvas(1,1),t=e.getContext("webgl")||e.getContext("experimental-webgl");this._IsSupported=null!=t&&!!globalThis.WebGLRenderingContext}catch(e){this._IsSupported=!1}return this._IsSupported}static get HasMajorPerformanceCaveat(){if(null===this._HasMajorPerformanceCaveat)try{let e=o.AbstractEngine._CreateCanvas(1,1),t=e.getContext("webgl",{failIfMajorPerformanceCaveat:!0})||e.getContext("experimental-webgl",{failIfMajorPerformanceCaveat:!0});this._HasMajorPerformanceCaveat=!t}catch(e){this._HasMajorPerformanceCaveat=!1}return this._HasMajorPerformanceCaveat}}M._TempClearColorUint32=new Uint32Array(4),M._TempClearColorInt32=new Int32Array(4),M.ExceptionList=[{key:"Chrome/63.0",capture:"63\\.0\\.3239\\.(\\d+)",captureConstraint:108,targets:["uniformBuffer"]},{key:"Firefox/58",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Firefox/59",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Chrome/72.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/73.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/74.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/71",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/72",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Chrome/12\\d\\..+?Mobile",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:".*AppleWebKit.*(15.4).*Safari",capture:null,captureConstraint:null,targets:["antialias","maxMSAASamples"]},{key:".*(15.4).*AppleWebKit.*Safari",capture:null,captureConstraint:null,targets:["antialias","maxMSAASamples"]}],M._ConcatenateShader=S._ConcatenateShader,M._IsSupported=null,M._HasMajorPerformanceCaveat=null,(t=M.prototype).startTimeQuery??(t.startTimeQuery=(0,P._MissingSideEffect)("ThinEngine","startTimeQuery")),(r=M.prototype).endTimeQuery??(r.endTimeQuery=(0,P._MissingSideEffect)("ThinEngine","endTimeQuery")),(i=M.prototype).createUniformBuffer??(i.createUniformBuffer=(0,P._MissingSideEffect)("ThinEngine","createUniformBuffer")),(s=M.prototype).createDynamicUniformBuffer??(s.createDynamicUniformBuffer=(0,P._MissingSideEffect)("ThinEngine","createDynamicUniformBuffer")),(a=M.prototype).updateUniformBuffer??(a.updateUniformBuffer=(0,P._MissingSideEffect)("ThinEngine","updateUniformBuffer")),(n=M.prototype).bindUniformBuffer??(n.bindUniformBuffer=(0,P._MissingSideEffect)("ThinEngine","bindUniformBuffer")),(_=M.prototype).bindUniformBufferBase??(_.bindUniformBufferBase=(0,P._MissingSideEffect)("ThinEngine","bindUniformBufferBase")),(l=M.prototype).bindUniformBlock??(l.bindUniformBlock=(0,P._MissingSideEffect)("ThinEngine","bindUniformBlock")),e.s(["ThinEngine",0,M],35160)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,97376,t=>{"use strict";var e=t.i(37068),s=t.i(19434),a=t.i(92943),i=t.i(38116);class u extends e.FlowGraphBlock{constructor(t){for(let e of(super(t),this.config=t,this._inputCases=new Map,this.case=this.registerDataInput("case",s.RichTypeAny,NaN),this.default=this.registerDataInput("default",s.RichTypeAny),this.value=this.registerDataOutput("value",s.RichTypeAny),this.config.cases||[])){if(e=(0,a.getNumericValue)(e),this.config.treatCasesAsIntegers&&(e|=0,this._inputCases.has(e)))return;this._inputCases.set(e,this.registerDataInput(`in_${e}`,s.RichTypeAny))}}_updateOutputs(t){let e,s=this.case.getValue(t);(0,a.isNumeric)(s)&&(e=this._getOutputValueForCase((0,a.getNumericValue)(s),t)),e||(e=this.default.getValue(t)),this.value.setValue(e,t)}_getOutputValueForCase(t,e){return this._inputCases.get(t)?.getValue(e)}getClassName(){return"FlowGraphDataSwitchBlock"}}let r=!1;function h(){r||(r=!0,(0,i.RegisterClass)("FlowGraphDataSwitchBlock",u))}t.s(["FlowGraphDataSwitchBlock",0,u,"RegisterFlowGraphDataSwitchBlock",0,h],49714),h(),t.s([],91479),t.i(91479),t.i(49714),t.s(["FlowGraphDataSwitchBlock",0,u],97376)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,50734,t=>{"use strict";var e,i,a=t.i(85595),s=t.i(53773),n=t.i(90176),o=t.i(95410),r=t.i(90629),h=t.i(18418),l=t.i(88577),u=t.i(95801),c=t.i(87869),_=t.i(82579);class p{constructor(){this._zoomStopsAnimation=!1,this._idleRotationSpeed=.05,this._idleRotationWaitTime=2e3,this._idleRotationSpinupTime=2e3,this.targetAlpha=null,this._attachedCamera=null,this._isPointerDown=!1,this._lastFrameTime=null,this._lastInteractionTime=-1/0,this._cameraRotationSpeed=0,this._lastFrameRadius=0}get name(){return"AutoRotation"}set zoomStopsAnimation(t){this._zoomStopsAnimation=t}get zoomStopsAnimation(){return this._zoomStopsAnimation}set idleRotationSpeed(t){this._idleRotationSpeed=t}get idleRotationSpeed(){return this._idleRotationSpeed}set idleRotationWaitTime(t){this._idleRotationWaitTime=t}get idleRotationWaitTime(){return this._idleRotationWaitTime}set idleRotationSpinupTime(t){this._idleRotationSpinupTime=t}get idleRotationSpinupTime(){return this._idleRotationSpinupTime}get rotationInProgress(){return Math.abs(this._cameraRotationSpeed)>0}get attachedNode(){return this._attachedCamera}init(){}attach(t){this._attachedCamera=t;let e=this._attachedCamera.getScene();this._onPrePointerObservableObserver=e.onPrePointerObservable.add(t=>{if(t.type===u.PointerEventTypes.POINTERDOWN){this._isPointerDown=!0;return}t.type===u.PointerEventTypes.POINTERUP&&(this._isPointerDown=!1)}),this._onAfterCheckInputsObserver=t.onAfterCheckInputsObservable.add(()=>{if(this._reachTargetAlpha())return;let t=c.PrecisionDate.Now,e=0;null!=this._lastFrameTime&&(e=t-this._lastFrameTime),this._lastFrameTime=t,this._applyUserInteraction();let i=Math.max(Math.min((t-this._lastInteractionTime-this._idleRotationWaitTime)/this._idleRotationSpinupTime,1),0);this._cameraRotationSpeed=this._idleRotationSpeed*i,this._attachedCamera&&(this._attachedCamera.alpha-=this._cameraRotationSpeed*(e/1e3))})}detach(){if(!this._attachedCamera)return;let t=this._attachedCamera.getScene();this._onPrePointerObservableObserver&&t.onPrePointerObservable.remove(this._onPrePointerObservableObserver),this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver),this._attachedCamera=null,this._lastFrameTime=null}resetLastInteractionTime(t){this._lastInteractionTime=t??c.PrecisionDate.Now}_reachTargetAlpha(){return!!this._attachedCamera&&!!this.targetAlpha&&Math.abs(this._attachedCamera.alpha-this.targetAlpha)<_.Epsilon}_userIsZooming(){return!!this._attachedCamera&&0!==this._attachedCamera.inertialRadiusOffset}_shouldAnimationStopForInteraction(){if(!this._attachedCamera)return!1;let t=!1;return this._lastFrameRadius===this._attachedCamera.radius&&0!==this._attachedCamera.inertialRadiusOffset&&(t=!0),this._lastFrameRadius=this._attachedCamera.radius,this._zoomStopsAnimation?t:this._userIsZooming()}_applyUserInteraction(){this._userIsMoving()&&!this._shouldAnimationStopForInteraction()&&(this._lastInteractionTime=c.PrecisionDate.Now)}_userIsMoving(){return!!this._attachedCamera&&(0!==this._attachedCamera.inertialAlphaOffset||0!==this._attachedCamera.inertialBetaOffset||0!==this._attachedCamera.inertialRadiusOffset||0!==this._attachedCamera.inertialPanningX||0!==this._attachedCamera.inertialPanningY||this._isPointerDown)}}var m=t.i(15205),d=t.i(45984);class g{constructor(){this.transitionDuration=450,this.lowerRadiusTransitionRange=2,this.upperRadiusTransitionRange=-2,this._autoTransitionRange=!1,this._attachedCamera=null,this._radiusIsAnimating=!1,this._radiusBounceTransition=null,this._animatables=[]}get name(){return"Bouncing"}get autoTransitionRange(){return this._autoTransitionRange}set autoTransitionRange(t){if(this._autoTransitionRange===t)return;this._autoTransitionRange=t;let e=this._attachedCamera;e&&(t?this._onMeshTargetChangedObserver=e.onMeshTargetChangedObservable.add(t=>{if(t&&(t.computeWorldMatrix(!0),t.getBoundingInfo)){let e=t.getBoundingInfo().diagonalLength;this.lowerRadiusTransitionRange=.05*e,this.upperRadiusTransitionRange=.05*e}}):this._onMeshTargetChangedObserver&&e.onMeshTargetChangedObservable.remove(this._onMeshTargetChangedObserver))}get attachedNode(){return this._attachedCamera}init(){}attach(t){this._attachedCamera=t,this._onAfterCheckInputsObserver=t.onAfterCheckInputsObservable.add(()=>{this._attachedCamera&&(this._isRadiusAtLimit(this._attachedCamera.lowerRadiusLimit)&&this._applyBoundRadiusAnimation(this.lowerRadiusTransitionRange),this._isRadiusAtLimit(this._attachedCamera.upperRadiusLimit)&&this._applyBoundRadiusAnimation(this.upperRadiusTransitionRange))})}detach(){this._attachedCamera&&(this._onAfterCheckInputsObserver&&this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver),this._onMeshTargetChangedObserver&&this._attachedCamera.onMeshTargetChangedObservable.remove(this._onMeshTargetChangedObserver),this._attachedCamera=null)}_isRadiusAtLimit(t){return!!this._attachedCamera&&this._attachedCamera.radius===t&&!this._radiusIsAnimating}_applyBoundRadiusAnimation(t){if(!this._attachedCamera)return;this._radiusBounceTransition||(g.EasingFunction.setEasingMode(g.EasingMode),this._radiusBounceTransition=d.Animation.CreateAnimation("radius",d.Animation.ANIMATIONTYPE_FLOAT,60,g.EasingFunction)),this._cachedWheelPrecision=this._attachedCamera.wheelPrecision,this._attachedCamera.wheelPrecision=1/0,this._attachedCamera.inertialRadiusOffset=0,this.stopAllAnimations(),this._radiusIsAnimating=!0;let e=d.Animation.TransitionTo("radius",this._attachedCamera.radius+t,this._attachedCamera,this._attachedCamera.getScene(),60,this._radiusBounceTransition,this.transitionDuration,()=>this._clearAnimationLocks());e&&this._animatables.push(e)}_clearAnimationLocks(){this._radiusIsAnimating=!1,this._attachedCamera&&(this._attachedCamera.wheelPrecision=this._cachedWheelPrecision)}stopAllAnimations(){for(this._attachedCamera&&(this._attachedCamera.animations=[]);this._animatables.length;)this._animatables[0].onAnimationEnd=null,this._animatables[0].stop(),this._animatables.shift()}}g.EasingFunction=new m.BackEase(.3),g.EasingMode=m.EasingFunction.EASINGMODE_EASEOUT;class f{constructor(){this.onTargetFramingAnimationEndObservable=new n.Observable,this._mode=f.FitFrustumSidesMode,this._radiusScale=1,this._positionScale=.5,this._defaultElevation=.3,this._elevationReturnTime=1500,this._elevationReturnWaitTime=1e3,this._zoomStopsAnimation=!1,this._framingTime=1500,this.autoCorrectCameraLimitsAndSensibility=!0,this._attachedCamera=null,this._isPointerDown=!1,this._lastInteractionTime=-1/0,this._animatables=[],this._betaIsAnimating=!1}get name(){return"Framing"}set mode(t){this._mode=t}get mode(){return this._mode}set radiusScale(t){this._radiusScale=t}get radiusScale(){return this._radiusScale}set positionScale(t){this._positionScale=t}get positionScale(){return this._positionScale}set defaultElevation(t){this._defaultElevation=t}get defaultElevation(){return this._defaultElevation}set elevationReturnTime(t){this._elevationReturnTime=t}get elevationReturnTime(){return this._elevationReturnTime}set elevationReturnWaitTime(t){this._elevationReturnWaitTime=t}get elevationReturnWaitTime(){return this._elevationReturnWaitTime}set zoomStopsAnimation(t){this._zoomStopsAnimation=t}get zoomStopsAnimation(){return this._zoomStopsAnimation}set framingTime(t){this._framingTime=t}get framingTime(){return this._framingTime}get attachedNode(){return this._attachedCamera}init(){}attach(t){this._attachedCamera=t;let e=this._attachedCamera.getScene();f.EasingFunction.setEasingMode(f.EasingMode),this._onPrePointerObservableObserver=e.onPrePointerObservable.add(t=>{if(t.type===u.PointerEventTypes.POINTERDOWN){this._isPointerDown=!0;return}t.type===u.PointerEventTypes.POINTERUP&&(this._isPointerDown=!1)}),this._onMeshTargetChangedObserver=t.onMeshTargetChangedObservable.add(t=>{t&&t.getBoundingInfo&&this.zoomOnMesh(t,void 0,()=>{this.onTargetFramingAnimationEndObservable.notifyObservers()})}),this._onAfterCheckInputsObserver=t.onAfterCheckInputsObservable.add(()=>{this._applyUserInteraction(),this._maintainCameraAboveGround()})}detach(){if(!this._attachedCamera)return;let t=this._attachedCamera.getScene();this._onPrePointerObservableObserver&&t.onPrePointerObservable.remove(this._onPrePointerObservableObserver),this._onAfterCheckInputsObserver&&this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver),this._onMeshTargetChangedObserver&&this._attachedCamera.onMeshTargetChangedObservable.remove(this._onMeshTargetChangedObserver),this._attachedCamera=null}zoomOnMesh(t,e=!1,i=null){t.computeWorldMatrix(!0);let a=t.getBoundingInfo().boundingBox;this.zoomOnBoundingInfo(a.minimumWorld,a.maximumWorld,e,i)}zoomOnMeshHierarchy(t,e=!1,i=null){t.computeWorldMatrix(!0);let a=t.getHierarchyBoundingVectors(!0);this.zoomOnBoundingInfo(a.min,a.max,e,i)}zoomOnMeshesHierarchy(t,e=!1,i=null){let a=new o.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),s=new o.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(let e=0;e<t.length;e++){let i=t[e].getHierarchyBoundingVectors(!0);o.Vector3.CheckExtends(i.min,a,s),o.Vector3.CheckExtends(i.max,a,s)}this.zoomOnBoundingInfo(a,s,e,i)}zoomOnBoundingInfo(t,e,i=!1,a=null){let s;if(!this._attachedCamera)return!1;let n=t.y,r=n+(e.y-n)*this._positionScale,h=e.subtract(t).scale(.5);if(!isFinite(r))return!1;if(i)s=new o.Vector3(0,r,0);else{let e=t.add(h);s=new o.Vector3(e.x,r,e.z)}this._vectorTransition||(this._vectorTransition=d.Animation.CreateAnimation("target",d.Animation.ANIMATIONTYPE_VECTOR3,60,f.EasingFunction)),this._betaIsAnimating=!0;let l=d.Animation.TransitionTo("target",s,this._attachedCamera,this._attachedCamera.getScene(),60,this._vectorTransition,this._framingTime);l&&this._animatables.push(l);let u=0;if(this._mode===f.FitFrustumSidesMode){let i=this._calculateLowerRadiusFromModelBoundingSphere(t,e);this.autoCorrectCameraLimitsAndSensibility&&(this._attachedCamera.lowerRadiusLimit=h.length()+this._attachedCamera.minZ),u=i}else this._mode===f.IgnoreBoundsSizeMode&&(u=this._calculateLowerRadiusFromModelBoundingSphere(t,e),this.autoCorrectCameraLimitsAndSensibility&&null===this._attachedCamera.lowerRadiusLimit&&(this._attachedCamera.lowerRadiusLimit=this._attachedCamera.minZ));if(this.autoCorrectCameraLimitsAndSensibility){let i=e.subtract(t).length();this._attachedCamera.panningSensibility=5e3/i,this._attachedCamera.wheelPrecision=100/u}return this._radiusTransition||(this._radiusTransition=d.Animation.CreateAnimation("radius",d.Animation.ANIMATIONTYPE_FLOAT,60,f.EasingFunction)),(l=d.Animation.TransitionTo("radius",u,this._attachedCamera,this._attachedCamera.getScene(),60,this._radiusTransition,this._framingTime,()=>{this.stopAllAnimations(),a&&a(),this._attachedCamera&&this._attachedCamera.useInputToRestoreState&&this._attachedCamera.storeState()}))&&this._animatables.push(l),!0}_calculateLowerRadiusFromModelBoundingSphere(t,e){let i=this._attachedCamera;if(!i)return 0;let a=i._calculateLowerRadiusFromModelBoundingSphere(t,e,this._radiusScale);return i.lowerRadiusLimit&&this._mode===f.IgnoreBoundsSizeMode&&(a=a<i.lowerRadiusLimit?i.lowerRadiusLimit:a),i.upperRadiusLimit&&(a=a>i.upperRadiusLimit?i.upperRadiusLimit:a),a}_maintainCameraAboveGround(){if(this._elevationReturnTime<0)return;let t=c.PrecisionDate.Now-this._lastInteractionTime,e=.5*Math.PI-this._defaultElevation,i=.5*Math.PI;if(this._attachedCamera&&!this._betaIsAnimating&&this._attachedCamera.beta>i&&t>=this._elevationReturnWaitTime){this._betaIsAnimating=!0,this.stopAllAnimations(),this._betaTransition||(this._betaTransition=d.Animation.CreateAnimation("beta",d.Animation.ANIMATIONTYPE_FLOAT,60,f.EasingFunction));let t=d.Animation.TransitionTo("beta",e,this._attachedCamera,this._attachedCamera.getScene(),60,this._betaTransition,this._elevationReturnTime,()=>{this._clearAnimationLocks(),this.stopAllAnimations()});t&&this._animatables.push(t)}}_clearAnimationLocks(){this._betaIsAnimating=!1}_applyUserInteraction(){this.isUserIsMoving&&(this._lastInteractionTime=c.PrecisionDate.Now,this.stopAllAnimations(),this._clearAnimationLocks())}stopAllAnimations(){for(this._attachedCamera&&(this._attachedCamera.animations=[]);this._animatables.length;)this._animatables[0]&&(this._animatables[0].onAnimationEnd=null,this._animatables[0].stop()),this._animatables.shift()}get isUserIsMoving(){return!!this._attachedCamera&&(0!==this._attachedCamera.inertialAlphaOffset||0!==this._attachedCamera.inertialBetaOffset||0!==this._attachedCamera.inertialRadiusOffset||0!==this._attachedCamera.inertialPanningX||0!==this._attachedCamera.inertialPanningY||this._isPointerDown)}}f.EasingFunction=new m.ExponentialEase,f.EasingMode=m.EasingFunction.EASINGMODE_EASEINOUT,f.IgnoreBoundsSizeMode=0,f.FitFrustumSidesMode=1;var y=t.i(95603),v=t.i(81139),T=t.i(58106),b=t.i(13856);class P{constructor(){this._currentMousePointerIdDown=-1,this.buttons=[0,1,2]}attachControl(t){t=b.Tools.BackCompatCameraNoPreventDefault(arguments);let e=this.camera.getEngine(),i=e.getInputElement(),a=0,s=null;this._pointA=null,this._pointB=null,this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._buttonsPressed=0,this._pointerInput=n=>{let o=n.event,r="touch"===o.pointerType;if(n.type!==u.PointerEventTypes.POINTERMOVE&&-1===this.buttons.indexOf(o.button))return;let h=o.target;if(this._altKey=o.altKey,this._ctrlKey=o.ctrlKey,this._metaKey=o.metaKey,this._shiftKey=o.shiftKey,this._buttonsPressed=o.buttons,e.isPointerLock){let t=o.movementX,e=o.movementY;this.onTouch(null,t,e),this._pointA=null,this._pointB=null}else if(n.type!==u.PointerEventTypes.POINTERDOWN&&n.type!==u.PointerEventTypes.POINTERDOUBLETAP&&r&&this._pointA?.pointerId!==o.pointerId&&this._pointB?.pointerId!==o.pointerId)return;else if(n.type===u.PointerEventTypes.POINTERDOWN&&(-1===this._currentMousePointerIdDown||r)){try{h?.setPointerCapture(o.pointerId)}catch(t){}if(null===this._pointA)this._pointA={x:o.clientX,y:o.clientY,pointerId:o.pointerId,type:o.pointerType,button:o.button};else{if(null!==this._pointB)return;this._pointB={x:o.clientX,y:o.clientY,pointerId:o.pointerId,type:o.pointerType,button:o.button}}-1!==this._currentMousePointerIdDown||r||(this._currentMousePointerIdDown=o.pointerId),this.onButtonDown(o),!t&&(o.preventDefault(),i&&i.focus())}else if(n.type===u.PointerEventTypes.POINTERDOUBLETAP)this.onDoubleTap(o.pointerType,o);else if(n.type===u.PointerEventTypes.POINTERUP&&(this._currentMousePointerIdDown===o.pointerId||r)){try{h?.releasePointerCapture(o.pointerId)}catch(t){}r||(this._pointB=null),e._badOS?this._pointA=this._pointB=null:this._pointB&&this._pointA&&this._pointA.pointerId==o.pointerId?(this._pointA=this._pointB,this._pointB=null):this._pointA&&this._pointB&&this._pointB.pointerId==o.pointerId?this._pointB=null:this._pointA=this._pointB=null,(0!==a||s)&&(this.onMultiTouch(this._pointA,this._pointB,a,0,s,null),a=0,s=null),this._currentMousePointerIdDown=-1,this.onButtonUp(o),t||o.preventDefault()}else if(n.type===u.PointerEventTypes.POINTERMOVE){if(t||o.preventDefault(),this._pointA&&null===this._pointB){let t=o.clientX-this._pointA.x,e=o.clientY-this._pointA.y;this._pointA.x=o.clientX,this._pointA.y=o.clientY,this.onTouch(this._pointA,t,e)}else if(this._pointA&&this._pointB){let t=this._pointA.pointerId===o.pointerId?this._pointA:this._pointB;t.x=o.clientX,t.y=o.clientY;let e=this._pointA.x-this._pointB.x,i=this._pointA.y-this._pointB.y,r=e*e+i*i,h={x:(this._pointA.x+this._pointB.x)/2,y:(this._pointA.y+this._pointB.y)/2,pointerId:o.pointerId,type:n.type};this.onMultiTouch(this._pointA,this._pointB,a,r,s,h),s=h,a=r}}},this._observer=this.camera.getScene()._inputManager._addCameraPointerObserver(this._pointerInput,u.PointerEventTypes.POINTERDOWN|u.PointerEventTypes.POINTERUP|u.PointerEventTypes.POINTERMOVE|u.PointerEventTypes.POINTERDOUBLETAP),this._onLostFocus=()=>{this._pointA=this._pointB=null,a=0,s=null,this.onLostFocus()},this._contextMenuBind=t=>this.onContextMenu(t),i&&i.addEventListener("contextmenu",this._contextMenuBind,!1);let n=this.camera.getScene().getEngine().getHostWindow();n&&b.Tools.RegisterTopRootEvents(n,[{name:"blur",handler:this._onLostFocus}])}detachControl(){if(this._onLostFocus){let t=this.camera.getScene().getEngine().getHostWindow();t&&b.Tools.UnregisterTopRootEvents(t,[{name:"blur",handler:this._onLostFocus}])}if(this._observer){if(this.camera.getScene()._inputManager._removeCameraPointerObserver(this._observer),this._observer=null,this._contextMenuBind){let t=this.camera.getScene().getEngine().getInputElement();t&&t.removeEventListener("contextmenu",this._contextMenuBind)}this._onLostFocus=null}this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._buttonsPressed=0,this._currentMousePointerIdDown=-1}getClassName(){return"BaseCameraPointersInput"}getSimpleName(){return"pointers"}onDoubleTap(t,e){}onTouch(t,e,i){}onMultiTouch(t,e,i,a,s,n){}onContextMenu(t){t.preventDefault()}onButtonDown(t){}onButtonUp(t){}onLostFocus(){}}(0,a.__decorate)([(0,s.serialize)()],P.prototype,"buttons",void 0);class O extends P{constructor(){super(...arguments),this.pinchZoom=!0,this.multiTouchPanning=!0,this.multiTouchPanAndZoom=!0,this._isPinching=!1,this._twoFingerActivityCount=0,this._shouldStartPinchZoom=!1}_computePinchZoom(t,e){}_computeMultiTouchPanning(t,e){}onMultiTouch(t,e,i,a,s,n){0===i&&null===s||(0!==a||null!==n)&&(this.multiTouchPanAndZoom?(this._computePinchZoom(i,a),this._computeMultiTouchPanning(s,n)):this.multiTouchPanning&&this.pinchZoom?(this._twoFingerActivityCount++,this._isPinching||this._shouldStartPinchZoom?(this._computePinchZoom(i,a),this._isPinching=!0):this._computeMultiTouchPanning(s,n)):this.multiTouchPanning?this._computeMultiTouchPanning(s,n):this.pinchZoom&&this._computePinchZoom(i,a))}onButtonUp(t){this._twoFingerActivityCount=0,this._isPinching=!1}onLostFocus(){this._twoFingerActivityCount=0,this._isPinching=!1}}(0,a.__decorate)([(0,s.serialize)()],O.prototype,"pinchZoom",void 0),(0,a.__decorate)([(0,s.serialize)()],O.prototype,"multiTouchPanning",void 0),(0,a.__decorate)([(0,s.serialize)()],O.prototype,"multiTouchPanAndZoom",void 0);class R extends O{constructor(){super(...arguments),this.buttons=[0,1,2],this.angularSensibilityX=1e3,this.angularSensibilityY=1e3,this.pinchPrecision=12,this.pinchDeltaPercentage=0,this.useNaturalPinchZoom=!1,this.panningSensibility=1e3,this.pinchInwards=!0,this._activeEntry=null,this._pointerLockConditions={button:0,modifiers:{}},this._pointerModifiers={ctrl:!1,alt:!1,shift:!1},this._pointerConditions={modifiers:this._pointerModifiers}}getClassName(){return"ArcRotateCameraPointersInput"}_computeMultiTouchPanning(t,e){if(t&&e){let i=e.x-t.x,a=e.y-t.y,s=this.camera.movement.input.getEntry("pointer","pan"),n=s?.sensitivity??(0!==this.panningSensibility?1/this.panningSensibility:0);0!==n&&(this.camera.movement.activeInput=!0,this.camera.movement.panAccumulatedPixels.x+=-i*n,this.camera.movement.panAccumulatedPixels.y+=a*n)}}_computePinchZoom(t,e){let i=this.camera.radius||R.MinimumRadiusForPinch;if(this.useNaturalPinchZoom)this.camera.radius=i*Math.sqrt(t)/Math.sqrt(e);else if(this.pinchDeltaPercentage){let a=(e-t)*.001*i*this.pinchDeltaPercentage;this.camera.movement.activeInput=!0,this.camera.movement.zoomAccumulatedPixels+=a}else{let i=(e-t)/(this.pinchPrecision*(this.pinchInwards?1:-1)*(this.angularSensibilityX+this.angularSensibilityY)/2);this.camera.movement.activeInput=!0,this.camera.movement.zoomAccumulatedPixels+=i}}onTouch(t,e,i){let a=this._activeEntry??(this.camera.getEngine().isPointerLock?this.camera.movement.input.resolveInteraction("pointer",this._pointerLockConditions):null);if(a){if("pan"===a.interaction){let t=a.sensitivity??(0!==this.panningSensibility?1/this.panningSensibility:0);0!==t&&(this.camera.movement.activeInput=!0,this.camera.movement.panAccumulatedPixels.x+=-e*t,this.camera.movement.panAccumulatedPixels.y+=i*t)}else if("rotate"===a.interaction){let t=a.sensitivityX??a.sensitivity??1/this.angularSensibilityX,s=a.sensitivityY??a.sensitivity??1/this.angularSensibilityY;this.camera.movement.activeInput=!0,this.camera.movement.rotationAccumulatedPixels.x+=-e*t,this.camera.movement.rotationAccumulatedPixels.y+=-i*s}}}onDoubleTap(){this.camera.useInputToRestoreState&&this.camera.restoreState()}onMultiTouch(t,e,i,a,s,n){this._shouldStartPinchZoom=this._twoFingerActivityCount<20&&Math.abs(Math.sqrt(a)-Math.sqrt(i))>this.camera.pinchToPanMaxDistance,super.onMultiTouch(t,e,i,a,s,n)}onButtonDown(t){this._pointerConditions.button=t.button,this._pointerModifiers.ctrl=t.ctrlKey,this._pointerModifiers.alt=t.altKey,this._pointerModifiers.shift=t.shiftKey,this._activeEntry=this.camera.movement.input.resolveInteraction("pointer",this._pointerConditions),super.onButtonDown(t)}onButtonUp(t){this._activeEntry=null,super.onButtonUp(t)}onLostFocus(){this._activeEntry=null,super.onLostFocus()}}R.MinimumRadiusForPinch=.001,(0,a.__decorate)([(0,s.serialize)()],R.prototype,"buttons",void 0),(0,a.__decorate)([(0,s.serialize)()],R.prototype,"angularSensibilityX",void 0),(0,a.__decorate)([(0,s.serialize)()],R.prototype,"angularSensibilityY",void 0),(0,a.__decorate)([(0,s.serialize)()],R.prototype,"pinchPrecision",void 0),(0,a.__decorate)([(0,s.serialize)()],R.prototype,"pinchDeltaPercentage",void 0),(0,a.__decorate)([(0,s.serialize)()],R.prototype,"useNaturalPinchZoom",void 0),(0,a.__decorate)([(0,s.serialize)()],R.prototype,"panningSensibility",void 0),T.CameraInputTypes.ArcRotateCameraPointersInput=R;var C=t.i(35705);class A{constructor(){this.keysUp=[38],this.keysDown=[40],this.keysLeft=[37],this.keysRight=[39],this.keysReset=[220],this.keysZoomIn=[187,107],this.keysZoomOut=[189,109],this.panningSensibility=50,this.zoomingSensibility=25,this.angularSpeed=.01,this._useAltToZoom=!0,this._keys=[],this._keyboardModifiers={ctrl:!1,alt:!1},this._keyboardConditions={modifiers:this._keyboardModifiers},this._rotateDirection=new o.Vector2,this._panDirection=new o.Vector2}get useAltToZoom(){return this._useAltToZoom}set useAltToZoom(t){this._useAltToZoom=t,this._applyUseAltToZoomToInputMap()}_applyUseAltToZoomToInputMap(){if(!this.camera?.movement)return;let t=this.camera.movement.input,e=t.getEntry("keyboard","zoom",{modifiers:{alt:!0}});!this._useAltToZoom&&e?t.inputMap.splice(t.inputMap.indexOf(e),1):this._useAltToZoom&&!e&&t.addEntry({source:"keyboard",modifiers:{alt:!0},interaction:"zoom"})}attachControl(t){t=b.Tools.BackCompatCameraNoPreventDefault(arguments),this._onCanvasBlurObserver||(this._scene=this.camera.getScene(),this._engine=this._scene.getEngine(),this._applyUseAltToZoomToInputMap(),this._onCanvasBlurObserver=this._engine.onCanvasBlurObservable.add(()=>{this._keys.length=0}),this._onKeyboardObserver=this._scene.onKeyboardObservable.add(e=>{let i=e.event;if(!i.metaKey){if(e.type===C.KeyboardEventTypes.KEYDOWN)this._ctrlPressed=i.ctrlKey,this._altPressed=i.altKey,(-1!==this.keysUp.indexOf(i.keyCode)||-1!==this.keysDown.indexOf(i.keyCode)||-1!==this.keysLeft.indexOf(i.keyCode)||-1!==this.keysRight.indexOf(i.keyCode)||-1!==this.keysReset.indexOf(i.keyCode)||-1!==this.keysZoomIn.indexOf(i.keyCode)||-1!==this.keysZoomOut.indexOf(i.keyCode))&&(-1===this._keys.indexOf(i.keyCode)&&this._keys.push(i.keyCode),i.preventDefault&&!t&&i.preventDefault());else if(-1!==this.keysUp.indexOf(i.keyCode)||-1!==this.keysDown.indexOf(i.keyCode)||-1!==this.keysLeft.indexOf(i.keyCode)||-1!==this.keysRight.indexOf(i.keyCode)||-1!==this.keysReset.indexOf(i.keyCode)||-1!==this.keysZoomIn.indexOf(i.keyCode)||-1!==this.keysZoomOut.indexOf(i.keyCode)){let e=this._keys.indexOf(i.keyCode);e>=0&&this._keys.splice(e,1),i.preventDefault&&!t&&i.preventDefault()}}}))}detachControl(){this._scene&&(this._onKeyboardObserver&&this._scene.onKeyboardObservable.remove(this._onKeyboardObserver),this._onCanvasBlurObserver&&this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver),this._onKeyboardObserver=null,this._onCanvasBlurObserver=null),this._keys.length=0}checkInputs(){if(this._onKeyboardObserver){let t=this.camera,e=t.movement.input;this._keyboardModifiers.ctrl=this._ctrlPressed,this._keyboardModifiers.alt=this._altPressed;let i=this._rotateDirection.set(0,0),a=this._panDirection.set(0,0),s=0,n=0;for(let o=0;o<this._keys.length;o++){let r=this._keys[o];if(this._keyboardConditions.key=r,-1===this.keysReset.indexOf(r)){let t=e.resolveInteraction("keyboard",this._keyboardConditions);if(t)if("pan"===t.interaction)n=Math.max(n,t.sensitivity??1/this.panningSensibility),-1!==this.keysLeft.indexOf(r)?a.x-=1:-1!==this.keysRight.indexOf(r)?a.x+=1:-1!==this.keysUp.indexOf(r)?a.y+=1:-1!==this.keysDown.indexOf(r)&&(a.y-=1);else if("zoom"===t.interaction){let i=t.sensitivity??1/this.zoomingSensibility;-1!==this.keysUp.indexOf(r)||-1!==this.keysZoomIn.indexOf(r)?e.handlers.zoom(i):(-1!==this.keysDown.indexOf(r)||-1!==this.keysZoomOut.indexOf(r))&&e.handlers.zoom(-i)}else"rotate"===t.interaction&&(s=Math.max(s,t.sensitivity??this.angularSpeed),-1!==this.keysLeft.indexOf(r)?i.x-=1:-1!==this.keysRight.indexOf(r)?i.x+=1:-1!==this.keysUp.indexOf(r)?i.y-=1:-1!==this.keysDown.indexOf(r)&&(i.y+=1))}-1!==this.keysReset.indexOf(r)&&t.useInputToRestoreState&&t.restoreState()}(0!==i.x||0!==i.y)&&(i.normalize().scaleInPlace(s),e.handlers.rotate(i.x,i.y)),(0!==a.x||0!==a.y)&&(a.normalize().scaleInPlace(n),e.handlers.pan(a.x,a.y))}}getClassName(){return"ArcRotateCameraKeyboardMoveInput"}getSimpleName(){return"keyboard"}}(0,a.__decorate)([(0,s.serialize)()],A.prototype,"keysUp",void 0),(0,a.__decorate)([(0,s.serialize)()],A.prototype,"keysDown",void 0),(0,a.__decorate)([(0,s.serialize)()],A.prototype,"keysLeft",void 0),(0,a.__decorate)([(0,s.serialize)()],A.prototype,"keysRight",void 0),(0,a.__decorate)([(0,s.serialize)()],A.prototype,"keysReset",void 0),(0,a.__decorate)([(0,s.serialize)()],A.prototype,"keysZoomIn",void 0),(0,a.__decorate)([(0,s.serialize)()],A.prototype,"keysZoomOut",void 0),(0,a.__decorate)([(0,s.serialize)()],A.prototype,"panningSensibility",void 0),(0,a.__decorate)([(0,s.serialize)()],A.prototype,"zoomingSensibility",void 0),(0,a.__decorate)([(0,s.serialize)()],A.prototype,"angularSpeed",void 0),(0,a.__decorate)([(0,s.serialize)()],A.prototype,"useAltToZoom",null),T.CameraInputTypes.ArcRotateCameraKeyboardMoveInput=A;var M=t.i(47997),I=t.i(21056);class S{constructor(){this.wheelPrecision=3,this.zoomToMouseLocation=!1,this.wheelDeltaPercentage=0,this.customComputeDeltaFromMouseWheel=null,this._viewOffset=new o.Vector3(0,0,0),this._globalOffset=new o.Vector3(0,0,0),this._inertialPanning=o.Vector3.Zero(),this._zoomToMouseRadiusOffset=0}_computeDeltaFromMouseWheelLegacyEvent(t,e){let i=.01*t*this.wheelDeltaPercentage*e;return t>0?i/(1+this.wheelDeltaPercentage):i*(1+this.wheelDeltaPercentage)}attachControl(t){t=b.Tools.BackCompatCameraNoPreventDefault(arguments),this._wheel=e=>{let i;if(e.type!==u.PointerEventTypes.POINTERWHEEL)return;let a=e.event,s=a.deltaMode===I.EventConstants.DOM_DELTA_LINE?40:1,n=-(a.deltaY*s);if(this.customComputeDeltaFromMouseWheel)i=this.customComputeDeltaFromMouseWheel(n,this,a);else if(this.wheelDeltaPercentage){if((i=this._computeDeltaFromMouseWheelLegacyEvent(n,this.camera.radius))>0){let t=this.zoomToMouseLocation?this._zoomToMouseRadiusOffset:this.camera.inertialRadiusOffset,e=this.camera.radius,a=t+i;for(let t=0;t<20&&!(e<=a)&&!(.001>Math.abs(a*this.camera.inertia));t++)e-=a,a*=this.camera.inertia;e=(0,r.Clamp)(e,0,Number.MAX_VALUE),i=this._computeDeltaFromMouseWheelLegacyEvent(n,e)}}else{let t=this.camera.movement.input.getEntry("wheel","zoom");i=n*(t?.sensitivity??1/(40*this.wheelPrecision))}i&&(this.zoomToMouseLocation?(this._hitPlane||this._updateHitPlane(),this._zoomToMouse(i)):this.camera.movement.zoomAccumulatedPixels+=i),a.preventDefault&&!t&&a.preventDefault()},this._observer=this.camera.getScene()._inputManager._addCameraPointerObserver(this._wheel,u.PointerEventTypes.POINTERWHEEL),this.zoomToMouseLocation&&this._inertialPanning.setAll(0)}detachControl(){this._observer&&(this.camera.getScene()._inputManager._removeCameraPointerObserver(this._observer),this._observer=null,this._wheel=null)}checkInputs(){if(!this.zoomToMouseLocation)return;let t=this.camera;if(Math.abs(this._zoomToMouseRadiusOffset)+this._inertialPanning.lengthSquared()+Math.abs(t.inertialAlphaOffset)+Math.abs(t.inertialBetaOffset)+Math.abs(t.inertialRadiusOffset)){this._updateHitPlane(),t.target.addInPlace(this._inertialPanning),t.radius-=this._zoomToMouseRadiusOffset;let e=t.movement.getFrameIndependentDecay(t.inertia);this._inertialPanning.scaleInPlace(e),this._zoomToMouseRadiusOffset*=e,this._zeroIfClose(this._inertialPanning),Math.abs(this._zoomToMouseRadiusOffset)<_.Epsilon&&(this._zoomToMouseRadiusOffset=0)}}getClassName(){return"ArcRotateCameraMouseWheelInput"}getSimpleName(){return"mousewheel"}_updateHitPlane(){let t=this.camera,e=t.target.subtract(t.position);this._hitPlane=M.Plane.FromPositionAndNormal(t.target,e)}_getPosition(){let t=this.camera,e=t.getScene(),i=e.createPickingRay(e.pointerX,e.pointerY,o.Matrix.Identity(),t,!1);(0!==t.targetScreenOffset.x||0!==t.targetScreenOffset.y)&&(this._viewOffset.set(t.targetScreenOffset.x,t.targetScreenOffset.y,0),t.getViewMatrix().invertToRef(t._cameraTransformMatrix),this._globalOffset=o.Vector3.TransformNormal(this._viewOffset,t._cameraTransformMatrix),i.origin.addInPlace(this._globalOffset));let a=0;return this._hitPlane&&(a=i.intersectsPlane(this._hitPlane)??0),i.origin.addInPlace(i.direction.scaleInPlace(a))}_zoomToMouse(t){let e=this.camera,i=1-e.inertia,a=e.movement.getFrameIndependentInputScale(e.inertia);if(e.lowerRadiusLimit){let s=e.lowerRadiusLimit??0;e.radius-(this._zoomToMouseRadiusOffset+t*a)/i<s&&(t=((e.radius-s)*i-this._zoomToMouseRadiusOffset)/a)}if(e.upperRadiusLimit){let s=e.upperRadiusLimit??0;e.radius-(this._zoomToMouseRadiusOffset+t*a)/i>s&&(t=((e.radius-s)*i-this._zoomToMouseRadiusOffset)/a)}let s=t/i/e.radius,n=this._getPosition(),r=o.TmpVectors.Vector3[6];n.subtractToRef(e.target,r),r.scaleInPlace(s),r.scaleInPlace(i),r.scaleInPlace(a),this._inertialPanning.addInPlace(r),this._zoomToMouseRadiusOffset+=t*a}_zeroIfClose(t){Math.abs(t.x)<_.Epsilon&&(t.x=0),Math.abs(t.y)<_.Epsilon&&(t.y=0),Math.abs(t.z)<_.Epsilon&&(t.z=0)}}(0,a.__decorate)([(0,s.serialize)()],S.prototype,"wheelPrecision",void 0),(0,a.__decorate)([(0,s.serialize)()],S.prototype,"zoomToMouseLocation",void 0),(0,a.__decorate)([(0,s.serialize)()],S.prototype,"wheelDeltaPercentage",void 0),T.CameraInputTypes.ArcRotateCameraMouseWheelInput=S;var E=T,B=t.i(33945);class x extends E.CameraInputsManager{constructor(t){super(t)}addMouseWheel(){return this.add(new S),this}addPointers(){return this.add(new R),this}addKeyboard(){return this.add(new A),this}}(e=x.prototype).addVRDeviceOrientation??(e.addVRDeviceOrientation=(0,B._MissingSideEffect)("ArcRotateCameraInputsManager","addVRDeviceOrientation")),(i=x.prototype).addGamepad??(i.addGamepad=(0,B._MissingSideEffect)("ArcRotateCameraInputsManager","addGamepad"));var w=t.i(38116),D=t.i(95357),L=t.i(35218);class k extends D.CameraMovement{constructor(t,e,i){super(t,e,i),this.input=new L.InputMapper({pan:(t,e)=>{this.panAccumulatedPixels.x+=t,this.panAccumulatedPixels.y+=e},rotate:(t,e)=>{this.rotationAccumulatedPixels.x+=t,this.rotationAccumulatedPixels.y+=e},zoom:t=>{this.zoomAccumulatedPixels+=t}},()=>this._createDefaultInputMap())}_createDefaultInputMap(){return[{source:"pointer",button:0,modifiers:{ctrl:!0},interaction:"pan"},{source:"pointer",button:0,interaction:"rotate"},{source:"pointer",button:2,interaction:"pan"},{source:"wheel",interaction:"zoom"},{source:"keyboard",key:[187,107,189,109],interaction:"zoom"},{source:"keyboard",modifiers:{ctrl:!0},interaction:"pan"},{source:"keyboard",modifiers:{alt:!0},interaction:"zoom"},{source:"keyboard",interaction:"rotate"}]}}function N(t){let e=Math.PI/2;return(0!==t.x||0!==t.z)&&(e=Math.acos(t.x/Math.sqrt(Math.pow(t.x,2)+Math.pow(t.z,2)))),t.z<0&&(e=2*Math.PI-e),e}function z(t,e){return Math.acos(t/e)}function V(t,e){return isNaN(t)?e:t}class F extends v.TargetCamera{get target(){return this._target}set target(t){this.setTarget(t)}get targetHost(){return this._targetHost}set targetHost(t){t&&this.setTarget(t)}getTarget(){return this.target}get position(){return this._position}set position(t){this.setPosition(t)}set upVector(t){this._upToYMatrix||(this._yToUpMatrix=new o.Matrix,this._upToYMatrix=new o.Matrix,this._upVector=o.Vector3.Zero()),t.normalize(),this._upVector.copyFrom(t),this.setMatUp()}get upVector(){return this._upVector}setMatUp(){o.Matrix.RotationAlignToRef(o.Vector3.UpReadOnly,this._upVector,this._yToUpMatrix),o.Matrix.RotationAlignToRef(this._upVector,o.Vector3.UpReadOnly,this._upToYMatrix)}get inertialAlphaOffset(){if(0!==this._inertialAlphaOffset)return this._inertialAlphaOffset;if(0!==this.movement.rotationAccumulatedPixels.x)return this.movement.rotationAccumulatedPixels.x;let t=this.movement.rotationDeltaCurrentFrame.x;return Math.abs(t)<this._rotationEpsilon?0:t}set inertialAlphaOffset(t){this._inertialAlphaOffset=t,0===t&&this.movement.resetRotationVelocity()}get inertialBetaOffset(){if(0!==this._inertialBetaOffset)return this._inertialBetaOffset;if(0!==this.movement.rotationAccumulatedPixels.y)return this.movement.rotationAccumulatedPixels.y;let t=this.movement.rotationDeltaCurrentFrame.y;return Math.abs(t)<this._rotationEpsilon?0:t}set inertialBetaOffset(t){this._inertialBetaOffset=t,0===t&&this.movement.resetRotationVelocity()}get inertialRadiusOffset(){if(0!==this._inertialRadiusOffset)return this._inertialRadiusOffset;if(0!==this.movement.zoomAccumulatedPixels)return this.movement.zoomAccumulatedPixels;let t=this.movement.zoomDeltaCurrentFrame;return Math.abs(t)<this._rotationEpsilon?0:t}set inertialRadiusOffset(t){this._inertialRadiusOffset=t,0===t&&this.movement.resetZoomVelocity()}get panningInertia(){return this._panningInertia}set panningInertia(t){this._panningInertia=t,this.movement&&(this.movement.panInertia=t)}get inertia(){return this._inertia}set inertia(t){this._inertia=t,this.movement&&(this.movement.rotationInertia=t,this.movement.zoomInertia=t)}get angularSensibilityX(){let t=this.inputs.attached.pointers;return t?t.angularSensibilityX:0}set angularSensibilityX(t){let e=this.inputs.attached.pointers;e&&(e.angularSensibilityX=t)}get angularSensibilityY(){let t=this.inputs.attached.pointers;return t?t.angularSensibilityY:0}set angularSensibilityY(t){let e=this.inputs.attached.pointers;e&&(e.angularSensibilityY=t)}get pinchPrecision(){let t=this.inputs.attached.pointers;return t?t.pinchPrecision:0}set pinchPrecision(t){let e=this.inputs.attached.pointers;e&&(e.pinchPrecision=t)}get pinchDeltaPercentage(){let t=this.inputs.attached.pointers;return t?t.pinchDeltaPercentage:0}set pinchDeltaPercentage(t){let e=this.inputs.attached.pointers;e&&(e.pinchDeltaPercentage=t)}get useNaturalPinchZoom(){let t=this.inputs.attached.pointers;return!!t&&t.useNaturalPinchZoom}set useNaturalPinchZoom(t){let e=this.inputs.attached.pointers;e&&(e.useNaturalPinchZoom=t)}get panningSensibility(){let t=this.inputs.attached.pointers;return t?t.panningSensibility:0}set panningSensibility(t){let e=this.inputs.attached.pointers;e&&(e.panningSensibility=t)}get keysUp(){let t=this.inputs.attached.keyboard;return t?t.keysUp:[]}set keysUp(t){let e=this.inputs.attached.keyboard;e&&(e.keysUp=t)}get keysDown(){let t=this.inputs.attached.keyboard;return t?t.keysDown:[]}set keysDown(t){let e=this.inputs.attached.keyboard;e&&(e.keysDown=t)}get keysLeft(){let t=this.inputs.attached.keyboard;return t?t.keysLeft:[]}set keysLeft(t){let e=this.inputs.attached.keyboard;e&&(e.keysLeft=t)}get keysRight(){let t=this.inputs.attached.keyboard;return t?t.keysRight:[]}set keysRight(t){let e=this.inputs.attached.keyboard;e&&(e.keysRight=t)}get wheelPrecision(){let t=this.inputs.attached.mousewheel;return t?t.wheelPrecision:0}set wheelPrecision(t){let e=this.inputs.attached.mousewheel;e&&(e.wheelPrecision=t)}get zoomToMouseLocation(){let t=this.inputs.attached.mousewheel;return!!t&&t.zoomToMouseLocation}set zoomToMouseLocation(t){let e=this.inputs.attached.mousewheel;e&&(e.zoomToMouseLocation=t)}get wheelDeltaPercentage(){let t=this.inputs.attached.mousewheel;return t?t.wheelDeltaPercentage:0}set wheelDeltaPercentage(t){let e=this.inputs.attached.mousewheel;e&&(e.wheelDeltaPercentage=t)}get _useCtrlForPanning(){return this._useCtrlForPanningInternal}set _useCtrlForPanning(t){this._useCtrlForPanningInternal=t;let e=this.movement.input,i=e.getEntry("keyboard","pan",{modifiers:{ctrl:!0}});!t&&i?e.inputMap.splice(e.inputMap.indexOf(i),1):t&&!i&&e.addEntry({source:"keyboard",modifiers:{ctrl:!0},interaction:"pan"});let a=e.getEntry("pointer","pan",{modifiers:{ctrl:!0}});!t&&a?e.inputMap.splice(e.inputMap.indexOf(a),1):t&&!a&&e.addEntry({source:"pointer",button:0,modifiers:{ctrl:!0},interaction:"pan"})}get _panningMouseButton(){return this._panningMouseButtonInternal}set _panningMouseButton(t){this._panningMouseButtonInternal=t;let e=this.movement.input.getEntry("pointer","pan",{modifiers:{}});e&&(e.button=t)}get isInterpolating(){return this._isInterpolating}get bouncingBehavior(){return this._bouncingBehavior}get useBouncingBehavior(){return null!=this._bouncingBehavior}set useBouncingBehavior(t){t!==this.useBouncingBehavior&&(t?(this._bouncingBehavior=new g,this.addBehavior(this._bouncingBehavior)):this._bouncingBehavior&&(this.removeBehavior(this._bouncingBehavior),this._bouncingBehavior=null))}get framingBehavior(){return this._framingBehavior}get useFramingBehavior(){return null!=this._framingBehavior}set useFramingBehavior(t){t!==this.useFramingBehavior&&(t?(this._framingBehavior=new f,this.addBehavior(this._framingBehavior)):this._framingBehavior&&(this.removeBehavior(this._framingBehavior),this._framingBehavior=null))}get autoRotationBehavior(){return this._autoRotationBehavior}get useAutoRotationBehavior(){return null!=this._autoRotationBehavior}set useAutoRotationBehavior(t){t!==this.useAutoRotationBehavior&&(t?(this._autoRotationBehavior=new p,this.addBehavior(this._autoRotationBehavior)):this._autoRotationBehavior&&(this.removeBehavior(this._autoRotationBehavior),this._autoRotationBehavior=null))}constructor(t,e,i,a,s,r,h=!0){super(t,o.Vector3.Zero(),r,h),this._inertialAlphaOffset=0,this._inertialBetaOffset=0,this._inertialRadiusOffset=0,this.lowerAlphaLimit=null,this.upperAlphaLimit=null,this.lowerBetaLimit=.01,this.upperBetaLimit=Math.PI-.01,this.lowerRadiusLimit=null,this.upperRadiusLimit=null,this.lowerTargetYLimit=-1/0,this.inertialPanningX=0,this.inertialPanningY=0,this.pinchToPanMaxDistance=20,this.panningDistanceLimit=null,this.panningOriginTarget=o.Vector3.Zero(),this._panningInertia=.9,this._inertia=.9,this.zoomOnFactor=1,this.targetScreenOffset=o.Vector2.Zero(),this.allowUpsideDown=!0,this.useInputToRestoreState=!0,this.restoreStateInterpolationFactor=0,this._currentInterpolationFactor=0,this._viewMatrix=new o.Matrix,this._useCtrlForPanningInternal=!0,this._panningMouseButtonInternal=2,this.panningAxis=new o.Vector3(1,1,0),this._transformedDirection=new o.Vector3,this.mapPanning=!1,this._isInterpolating=!1,this.onMeshTargetChangedObservable=new n.Observable,this.checkCollisions=!1,this.collisionRadius=new o.Vector3(.5,.5,.5),this._previousPosition=o.Vector3.Zero(),this._collisionVelocity=o.Vector3.Zero(),this._newPosition=o.Vector3.Zero(),this._computationVector=o.Vector3.Zero(),this._goalAlpha=NaN,this._goalBeta=NaN,this._goalRadius=NaN,this._goalTarget=new o.Vector3(NaN,NaN,NaN),this._goalTargetScreenOffset=new o.Vector2(NaN,NaN),this._onCollisionPositionChange=(t,e,i=null)=>{i?(this.setPosition(e),this.onCollide&&this.onCollide(i)):this._previousPosition.copyFrom(this._position);let a=Math.cos(this.alpha),s=Math.sin(this.alpha),n=Math.cos(this.beta),o=Math.sin(this.beta);0===o&&(o=1e-4);let r=this._getTargetPosition();this._computationVector.copyFromFloats(this.radius*a*o,this.radius*n,this.radius*s*o),r.addToRef(this._computationVector,this._newPosition),this._position.copyFrom(this._newPosition);let h=this.upVector;this.allowUpsideDown&&this.beta<0&&(h=(h=h.clone()).negate()),this._computeViewMatrix(this._position,r,h),this._viewMatrix.addAtIndex(12,this.targetScreenOffset.x),this._viewMatrix.addAtIndex(13,this.targetScreenOffset.y),this._collisionTriggered=!1},this._target=o.Vector3.Zero(),s&&this.setTarget(s),this.alpha=e,this.beta=i,this.radius=a,this.getViewMatrix(),this.inputs=new x(this),this.inputs.addKeyboard().addMouseWheel().addPointers(),this.movement=new k(this.getScene(),this._position),this.movement.rotationInertia=this._inertia,this.movement.zoomInertia=this._inertia,this.movement.panInertia=this._panningInertia}_initCache(){super._initCache(),this._cache._target=new o.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.alpha=void 0,this._cache.beta=void 0,this._cache.radius=void 0,this._cache.targetScreenOffset=o.Vector2.Zero()}_updateCache(t){t||super._updateCache(),this._cache._target.copyFrom(this._getTargetPosition()),this._cache.alpha=this.alpha,this._cache.beta=this.beta,this._cache.radius=this.radius,this._cache.targetScreenOffset.copyFrom(this.targetScreenOffset)}_getTargetPosition(){if(this._targetHost&&this._targetHost.getAbsolutePosition){let t=this._targetHost.getAbsolutePosition();this._targetBoundingCenter?t.addToRef(this._targetBoundingCenter,this._target):this._target.copyFrom(t)}let t=this._getLockedTargetPosition();return t||this._target}storeState(){return this._storedAlpha=this.alpha,this._storedBeta=this.beta,this._storedRadius=this.radius,this._storedTarget=this._getTargetPosition().clone(),this._storedTargetScreenOffset=this.targetScreenOffset.clone(),super.storeState()}_restoreStateValues(){return this.hasStateStored()&&this.restoreStateInterpolationFactor>_.Epsilon&&this.restoreStateInterpolationFactor<1?(this.interpolateTo(this._storedAlpha,this._storedBeta,this._storedRadius,this._storedTarget,this._storedTargetScreenOffset,this.restoreStateInterpolationFactor),!0):!!super._restoreStateValues()&&(this.setTarget(this._storedTarget.clone()),this.alpha=this._storedAlpha,this.beta=this._storedBeta,this.radius=this._storedRadius,this.targetScreenOffset=this._storedTargetScreenOffset.clone(),this.inertialAlphaOffset=0,this.inertialBetaOffset=0,this.inertialRadiusOffset=0,this.inertialPanningX=0,this.inertialPanningY=0,!0)}stopInterpolation(){this._goalAlpha=NaN,this._goalBeta=NaN,this._goalRadius=NaN,this._goalTarget.set(NaN,NaN,NaN),this._goalTargetScreenOffset.set(NaN,NaN)}interpolateTo(t=this.alpha,e=this.beta,i=this.radius,a=this.target,s=this.targetScreenOffset,n){this.inertialAlphaOffset=0,this.inertialBetaOffset=0,this.inertialRadiusOffset=0,this.inertialPanningX=0,this.inertialPanningY=0,null!=n?this._currentInterpolationFactor=n:0!==this.restoreStateInterpolationFactor?this._currentInterpolationFactor=this.restoreStateInterpolationFactor:this._currentInterpolationFactor=.1,this._goalAlpha=V(t,this._goalAlpha),this._goalBeta=V(e,this._goalBeta),this._goalRadius=V(i,this._goalRadius),this._goalTarget.set(V(a.x,this._goalTarget.x),V(a.y,this._goalTarget.y),V(a.z,this._goalTarget.z)),this._goalTargetScreenOffset.set(V(s.x,this._goalTargetScreenOffset.x),V(s.y,this._goalTargetScreenOffset.y)),this._goalAlpha=(0,r.Clamp)(this._goalAlpha,this.lowerAlphaLimit??-1/0,this.upperAlphaLimit??1/0),this._goalBeta=(0,r.Clamp)(this._goalBeta,this.lowerBetaLimit??-1/0,this.upperBetaLimit??1/0),this._goalRadius=(0,r.Clamp)(this._goalRadius,this.lowerRadiusLimit??-1/0,this.upperRadiusLimit??1/0),this._goalTarget.y=(0,r.Clamp)(this._goalTarget.y,this.lowerTargetYLimit??-1/0,1/0),this._isInterpolating=!0}_isSynchronizedViewMatrix(){return!!super._isSynchronizedViewMatrix()&&this._cache._target.equals(this._getTargetPosition())&&this._cache.alpha===this.alpha&&this._cache.beta===this.beta&&this._cache.radius===this.radius&&this._cache.targetScreenOffset.equals(this.targetScreenOffset)}attachControl(t,e,i=!0,a=2){let s=arguments;e=b.Tools.BackCompatCameraNoPreventDefault(s),this._useCtrlForPanning=i,this._panningMouseButton=a,"boolean"==typeof s[0]&&(s.length>1&&(this._useCtrlForPanning=s[1]),s.length>2&&(this._panningMouseButton=s[2])),this.inputs.attachElement(e),this._reset=()=>{this.inertialAlphaOffset=0,this.inertialBetaOffset=0,this.inertialRadiusOffset=0,this.inertialPanningX=0,this.inertialPanningY=0}}detachControl(){this.inputs.detachElement(),this._reset&&this._reset()}_applyRotationAndZoomDelta(t,e,i){let a=this.invertRotation?-1:1,s=t*this._calculateHandednessMultiplier();this.beta<0&&(s*=-1),this.alpha+=s*a,this.beta+=e*a,this.radius-=i}_applyPanDelta(t,e){let i=o.TmpVectors.Vector3[0].copyFromFloats(t,e,e);if(this._viewMatrix.invertToRef(this._cameraTransformMatrix),i.multiplyInPlace(this.panningAxis),o.Vector3.TransformNormalToRef(i,this._cameraTransformMatrix,this._transformedDirection),this.mapPanning){let t=this.upVector,e=o.Vector3.CrossToRef(this._transformedDirection,t,this._transformedDirection);o.Vector3.CrossToRef(t,e,this._transformedDirection)}else this.panningAxis.y||(this._transformedDirection.y=0);if(!this._targetHost)if(this.panningDistanceLimit)this._transformedDirection.addInPlace(this._target),o.Vector3.DistanceSquared(this._transformedDirection,this.panningOriginTarget)<=this.panningDistanceLimit*this.panningDistanceLimit&&this._target.copyFrom(this._transformedDirection);else{if(this.parent){let t=o.TmpVectors.Matrix[0];this.parent.getWorldMatrix().getRotationMatrixToRef(t),t.transposeToRef(t),o.Vector3.TransformCoordinatesToRef(this._transformedDirection,t,this._transformedDirection)}this._target.addInPlace(this._transformedDirection)}}_checkInputs(){if(this._collisionTriggered)return;this.inputs.checkInputs();let t=!1;this.movement.computeCurrentFrameDeltas();let e=this.movement.rotationDeltaCurrentFrame,i=this.movement.zoomDeltaCurrentFrame,a=this.movement.panDeltaCurrentFrame;if((0!==e.x||0!==e.y||0!==i||0!==a.x||0!==a.y)&&(t=!0,(0!==e.x||0!==e.y||0!==i)&&this._applyRotationAndZoomDelta(e.x,e.y,i),(0!==a.x||0!==a.y)&&this._applyPanDelta(a.x,a.y)),(0!==this._inertialAlphaOffset||0!==this._inertialBetaOffset||0!==this._inertialRadiusOffset)&&(this._applyRotationAndZoomDelta(this._inertialAlphaOffset,this._inertialBetaOffset,this._inertialRadiusOffset),this._inertialAlphaOffset*=this.inertia,this._inertialBetaOffset*=this.inertia,this._inertialRadiusOffset*=this.inertia,Math.abs(this._inertialAlphaOffset)<this._rotationEpsilon&&(this._inertialAlphaOffset=0),Math.abs(this._inertialBetaOffset)<this._rotationEpsilon&&(this._inertialBetaOffset=0),Math.abs(this._inertialRadiusOffset)<this._rotationEpsilon&&(this._inertialRadiusOffset=0),t=!0),0!==this.inertialPanningX||0!==this.inertialPanningY){this._applyPanDelta(this.inertialPanningX,this.inertialPanningY),this.inertialPanningX*=this.panningInertia,this.inertialPanningY*=this.panningInertia;let e=this._panningEpsilon;Math.abs(this.inertialPanningX)<e&&(this.inertialPanningX=0),Math.abs(this.inertialPanningY)<e&&(this.inertialPanningY=0),t=!0}if(t)this.stopInterpolation();else if(this._isInterpolating){let t=!1,e=1-Math.pow(2,-(this._scene.getEngine().getDeltaTime()/1e3)/this._currentInterpolationFactor),i=V(this._goalRadius,this.radius);if(!isNaN(this._goalTarget.x)||!isNaN(this._goalTarget.y)||!isNaN(this._goalTarget.z)){let a=o.TmpVectors.Vector3[0].set(V(this._goalTarget.x,this._target.x),V(this._goalTarget.y,this._target.y),V(this._goalTarget.z,this._target.z));o.Vector3.LerpToRef(this.target,a,e,this._target),10*o.Vector3.Distance(this.target,a)/i<_.Epsilon?(this._goalTarget.set(NaN,NaN,NaN),this.target.copyFrom(a),this.setTarget(this.target,!1,!0,!0)):t=!0}if(!isNaN(this._goalAlpha)||!isNaN(this._goalBeta)){let i=o.Quaternion.RotationAlphaBetaGammaToRef(V(this._goalAlpha,this.alpha),V(this._goalBeta,this.beta),0,o.TmpVectors.Quaternion[0]),a=o.Quaternion.RotationAlphaBetaGammaToRef(this.alpha,this.beta,0,o.TmpVectors.Quaternion[1]),s=o.Quaternion.SlerpToRef(a,i,e,o.TmpVectors.Quaternion[2]);s.normalize();let n=s.toAlphaBetaGammaToRef(o.TmpVectors.Vector3[0]);if(this.alpha=n.x,this.beta=n.y,s.isApprox(i,_.Epsilon/5)){this._goalAlpha=NaN,this._goalBeta=NaN;let t=i.toAlphaBetaGammaToRef(o.TmpVectors.Vector3[0]);this.alpha=t.x,this.beta=t.y}else t=!0}if(isNaN(this._goalRadius)||(this.radius+=(i-this.radius)*e,Math.abs(i/this.radius-1)<_.Epsilon?(this._goalRadius=NaN,this.radius=i):t=!0),!isNaN(this._goalTargetScreenOffset.x)||!isNaN(this._goalTargetScreenOffset.y)){let i=o.TmpVectors.Vector2[0].set(V(this._goalTargetScreenOffset.x,this.targetScreenOffset.x),V(this._goalTargetScreenOffset.y,this.targetScreenOffset.y));o.Vector2.LerpToRef(this.targetScreenOffset,i,e,this.targetScreenOffset),o.Vector2.Distance(this.targetScreenOffset,i)<_.Epsilon?(this._goalTargetScreenOffset.set(NaN,NaN),this.targetScreenOffset.copyFrom(i)):t=!0}this._isInterpolating=t}this._checkLimits(),super._checkInputs()}_checkLimits(){null===this.lowerBetaLimit||void 0===this.lowerBetaLimit?this.allowUpsideDown&&this.beta>Math.PI&&(this.beta=this.beta-2*Math.PI):this.beta<this.lowerBetaLimit&&(this.beta=this.lowerBetaLimit),null===this.upperBetaLimit||void 0===this.upperBetaLimit?this.allowUpsideDown&&this.beta<-Math.PI&&(this.beta=this.beta+2*Math.PI):this.beta>this.upperBetaLimit&&(this.beta=this.upperBetaLimit),null!==this.lowerAlphaLimit&&this.alpha<this.lowerAlphaLimit&&(this.alpha=this.lowerAlphaLimit),null!==this.upperAlphaLimit&&this.alpha>this.upperAlphaLimit&&(this.alpha=this.upperAlphaLimit),null!==this.lowerRadiusLimit&&this.radius<this.lowerRadiusLimit&&(this.radius=this.lowerRadiusLimit,this.inertialRadiusOffset=0),null!==this.upperRadiusLimit&&this.radius>this.upperRadiusLimit&&(this.radius=this.upperRadiusLimit,this.inertialRadiusOffset=0),this.target.y=Math.max(this.target.y,this.lowerTargetYLimit)}rebuildAnglesAndRadius(){this._position.subtractToRef(this._getTargetPosition(),this._computationVector),(0!==this._upVector.x||1!==this._upVector.y||0!==this._upVector.z)&&o.Vector3.TransformCoordinatesToRef(this._computationVector,this._upToYMatrix,this._computationVector),this.radius=this._computationVector.length(),0===this.radius&&(this.radius=1e-4);let t=this.alpha;this.alpha=N(this._computationVector),this.beta=z(this._computationVector.y,this.radius);let e=Math.round((t-this.alpha)/(2*Math.PI));this.alpha+=2*e*Math.PI,this._checkLimits()}setPosition(t){this._position.equals(t)||(this._position.copyFrom(t),this.rebuildAnglesAndRadius())}setTarget(t,e=!1,i=!1,a=!1){if(a=this.overrideCloneAlphaBetaRadius??a,t.computeWorldMatrix)e&&t.getBoundingInfo?this._targetBoundingCenter=t.getBoundingInfo().boundingBox.centerWorld.clone():this._targetBoundingCenter=null,t.computeWorldMatrix(),this._targetHost=t,this._target=this._getTargetPosition(),this.onMeshTargetChangedObservable.notifyObservers(this._targetHost);else{let e=this._getTargetPosition();if(e&&!i&&e.equals(t))return;this._targetHost=null,this._target=t,this._targetBoundingCenter=null,this.onMeshTargetChangedObservable.notifyObservers(null)}a||this.rebuildAnglesAndRadius()}_getViewMatrix(){let t=Math.cos(this.alpha),e=Math.sin(this.alpha),i=Math.cos(this.beta),a=Math.sin(this.beta);0===a&&(a=1e-4),0===this.radius&&(this.radius=1e-4);let s=this._getTargetPosition();if(this._computationVector.copyFromFloats(this.radius*t*a,this.radius*i,this.radius*e*a),(0!==this._upVector.x||1!==this._upVector.y||0!==this._upVector.z)&&o.Vector3.TransformCoordinatesToRef(this._computationVector,this._yToUpMatrix,this._computationVector),s.addToRef(this._computationVector,this._newPosition),this.getScene().collisionsEnabled&&this.checkCollisions){let t=this.getScene().collisionCoordinator;this._collider||(this._collider=t.createCollider()),this._collider._radius=this.collisionRadius,this._newPosition.subtractToRef(this._position,this._collisionVelocity),this._collisionTriggered=!0,t.getNewPosition(this._position,this._collisionVelocity,this._collider,3,null,this._onCollisionPositionChange,this.uniqueId)}else{this._position.copyFrom(this._newPosition);let t=this.upVector;this.allowUpsideDown&&a<0&&(t=t.negate()),this._computeViewMatrix(this._position,s,t),this._viewMatrix.addAtIndex(12,this.targetScreenOffset.x),this._viewMatrix.addAtIndex(13,this.targetScreenOffset.y)}return this._currentTarget.copyFrom(s),this._viewMatrix}zoomOn(t,e=!1){t=t||this.getScene().meshes;let i=l.Mesh.MinMax(t),a=this._calculateLowerRadiusFromModelBoundingSphere(i.min,i.max);if(a=Math.max(Math.min(a,this.upperRadiusLimit||Number.MAX_VALUE),this.lowerRadiusLimit||0),this.radius=a*this.zoomOnFactor,this.mode===y.Camera.ORTHOGRAPHIC_CAMERA){let t=this.getScene().getEngine().getAspectRatio(this),e=a*this.zoomOnFactor/2;this.orthoLeft=-e*t,this.orthoRight=e*t,this.orthoBottom=-e,this.orthoTop=e}this.focusOn({min:i.min,max:i.max,distance:a},e)}focusOn(t,e=!1){let i,a;if(void 0===t.min){let e=t||this.getScene().meshes;i=l.Mesh.MinMax(e),a=o.Vector3.Distance(i.min,i.max)}else i=t,a=t.distance;this._target=l.Mesh.Center(i),e||(this.maxZ=2*a)}createRigCamera(t,e){let i=0;switch(this.cameraRigMode){case y.Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH:case y.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:case y.Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER:case y.Camera.RIG_MODE_STEREOSCOPIC_INTERLACED:case y.Camera.RIG_MODE_VR:i=this._cameraRigParams.stereoHalfAngle*(0===e?1:-1);break;case y.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:i=this._cameraRigParams.stereoHalfAngle*(0===e?-1:1)}let a=new F(t,this.alpha+i,this.beta,this.radius,this._target,this.getScene());return a._cameraRigParams={},a.isRigCamera=!0,a.rigParent=this,a.upVector=this.upVector,a.mode=this.mode,a.orthoLeft=this.orthoLeft,a.orthoRight=this.orthoRight,a.orthoBottom=this.orthoBottom,a.orthoTop=this.orthoTop,a}_updateRigCameras(){let t=this._rigCameras[0],e=this._rigCameras[1];switch(t.beta=e.beta=this.beta,this.cameraRigMode){case y.Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH:case y.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:case y.Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER:case y.Camera.RIG_MODE_STEREOSCOPIC_INTERLACED:case y.Camera.RIG_MODE_VR:t.alpha=this.alpha-this._cameraRigParams.stereoHalfAngle,e.alpha=this.alpha+this._cameraRigParams.stereoHalfAngle;break;case y.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:t.alpha=this.alpha+this._cameraRigParams.stereoHalfAngle,e.alpha=this.alpha-this._cameraRigParams.stereoHalfAngle}super._updateRigCameras()}_calculateLowerRadiusFromModelBoundingSphere(t,e,i=1){let a=o.Vector3.Distance(t,e),s=this.getScene().getEngine().getAspectRatio(this),n=Math.tan(this.fov/2),r=n*s,h=.5*a*i;return Math.max(h*Math.sqrt(1+1/(r*r)),h*Math.sqrt(1+1/(n*n)))}dispose(){this.inputs.clear(),super.dispose()}getClassName(){return"ArcRotateCamera"}}(0,a.__decorate)([(0,s.serialize)()],F.prototype,"alpha",void 0),(0,a.__decorate)([(0,s.serialize)()],F.prototype,"beta",void 0),(0,a.__decorate)([(0,s.serialize)()],F.prototype,"radius",void 0),(0,a.__decorate)([(0,s.serialize)()],F.prototype,"overrideCloneAlphaBetaRadius",void 0),(0,a.__decorate)([(0,s.serializeAsVector3)("target")],F.prototype,"_target",void 0),(0,a.__decorate)([(0,s.serializeAsMeshReference)("targetHost")],F.prototype,"_targetHost",void 0),(0,a.__decorate)([(0,s.serialize)()],F.prototype,"inertialAlphaOffset",null),(0,a.__decorate)([(0,s.serialize)()],F.prototype,"inertialBetaOffset",null),(0,a.__decorate)([(0,s.serialize)()],F.prototype,"inertialRadiusOffset",null),(0,a.__decorate)([(0,s.serialize)()],F.prototype,"lowerAlphaLimit",void 0),(0,a.__decorate)([(0,s.serialize)()],F.prototype,"upperAlphaLimit",void 0),(0,a.__decorate)([(0,s.serialize)()],F.prototype,"lowerBetaLimit",void 0),(0,a.__decorate)([(0,s.serialize)()],F.prototype,"upperBetaLimit",void 0),(0,a.__decorate)([(0,s.serialize)()],F.prototype,"lowerRadiusLimit",void 0),(0,a.__decorate)([(0,s.serialize)()],F.prototype,"upperRadiusLimit",void 0),(0,a.__decorate)([(0,s.serialize)()],F.prototype,"lowerTargetYLimit",void 0),(0,a.__decorate)([(0,s.serialize)()],F.prototype,"inertialPanningX",void 0),(0,a.__decorate)([(0,s.serialize)()],F.prototype,"inertialPanningY",void 0),(0,a.__decorate)([(0,s.serialize)()],F.prototype,"pinchToPanMaxDistance",void 0),(0,a.__decorate)([(0,s.serialize)()],F.prototype,"panningDistanceLimit",void 0),(0,a.__decorate)([(0,s.serializeAsVector3)()],F.prototype,"panningOriginTarget",void 0),(0,a.__decorate)([(0,s.serialize)()],F.prototype,"panningInertia",null),(0,a.__decorate)([(0,s.serialize)()],F.prototype,"zoomToMouseLocation",null),(0,a.__decorate)([(0,s.serialize)()],F.prototype,"zoomOnFactor",void 0),(0,a.__decorate)([(0,s.serializeAsVector2)()],F.prototype,"targetScreenOffset",void 0),(0,a.__decorate)([(0,s.serialize)()],F.prototype,"allowUpsideDown",void 0),(0,a.__decorate)([(0,s.serialize)()],F.prototype,"useInputToRestoreState",void 0),(0,a.__decorate)([(0,s.serialize)()],F.prototype,"restoreStateInterpolationFactor",void 0);let Z=!1;function U(){Z||(Z=!0,h.Node.AddNodeConstructor("ArcRotateCamera",(t,e)=>()=>new F(t,0,0,1,o.Vector3.Zero(),e)),(0,w.RegisterClass)("BABYLON.ArcRotateCamera",F))}t.s(["ArcRotateCamera",0,F,"ComputeAlpha",0,N,"ComputeBeta",0,z,"RegisterArcRotateCamera",0,U],6879),U(),t.s([],26373),t.i(26373),t.i(6879),t.s(["ArcRotateCamera",0,F,"ComputeAlpha",0,N,"ComputeBeta",0,z,"RegisterArcRotateCamera",0,U],50734)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,37875,t=>{"use strict";class e{static GetShadersRepository(t=0){return 0===t?e.ShadersRepository:e.ShadersRepositoryWGSL}static GetShadersStore(t=0){return 0===t?e.ShadersStore:e.ShadersStoreWGSL}static GetIncludesShadersStore(t=0){return 0===t?e.IncludesShadersStore:e.IncludesShadersStoreWGSL}}e.ShadersRepository="src/Shaders/",e.ShadersStore={},e.IncludesShadersStore={},e.ShadersRepositoryWGSL="src/ShadersWGSL/",e.ShadersStoreWGSL={},e.IncludesShadersStoreWGSL={},t.s(["ShaderStore",0,e])},58910,t=>{"use strict";var e,s,a,i,r=t.i(95410);(e=a||(a={}))[e.LOCAL=0]="LOCAL",e[e.WORLD=1]="WORLD",e[e.BONE=2]="BONE";class n{}n.X=new r.Vector3(1,0,0),n.Y=new r.Vector3(0,1,0),n.Z=new r.Vector3(0,0,1),(s=i||(i={}))[s.X=0]="X",s[s.Y=1]="Y",s[s.Z=2]="Z",t.s(["Axis",0,n,"Coordinate",0,i,"Space",0,a])},70432,t=>{"use strict";class e{constructor(t){this.length=0,this.data=Array(t),this._id=e._GlobalId++}push(t){this.data[this.length++]=t,this.length>this.data.length&&(this.data.length*=2)}forEach(t){for(let e=0;e<this.length;e++)t(this.data[e])}sort(t){this.data.sort(t)}reset(){this.length=0}dispose(){this.reset(),this.data&&(this.data.length=0)}concat(t){if(0!==t.length){this.length+t.length>this.data.length&&(this.data.length=(this.length+t.length)*2);for(let e=0;e<t.length;e++)this.data[this.length++]=(t.data||t)[e]}}indexOf(t){let e=this.data.indexOf(t);return e>=this.length?-1:e}contains(t){return -1!==this.indexOf(t)}}e._GlobalId=0,t.s(["SmartArray",0,e,"SmartArrayNoDuplicate",0,class extends e{constructor(){super(...arguments),this._duplicateId=0}push(t){super.push(t),t.__smartArrayFlags||(t.__smartArrayFlags={}),t.__smartArrayFlags[this._id]=this._duplicateId}pushNoDuplicate(t){return(!t.__smartArrayFlags||t.__smartArrayFlags[this._id]!==this._duplicateId)&&(this.push(t),!0)}reset(){super.reset(),this._duplicateId++}concatWithNoDuplicate(t){if(0!==t.length){this.length+t.length>this.data.length&&(this.data.length=(this.length+t.length)*2);for(let e=0;e<t.length;e++){let s=(t.data||t)[e];this.pushNoDuplicate(s)}}}}])},46833,t=>{"use strict";var e=t.i(47997);class s{static GetPlanes(t){let a=[];for(let t=0;t<6;t++)a.push(new e.Plane(0,0,0,0));return s.GetPlanesToRef(t,a),a}static GetNearPlaneToRef(t,e){let s=t.m;e.normal.x=s[3]+s[2],e.normal.y=s[7]+s[6],e.normal.z=s[11]+s[10],e.d=s[15]+s[14],e.normalize()}static GetFarPlaneToRef(t,e){let s=t.m;e.normal.x=s[3]-s[2],e.normal.y=s[7]-s[6],e.normal.z=s[11]-s[10],e.d=s[15]-s[14],e.normalize()}static GetLeftPlaneToRef(t,e){let s=t.m;e.normal.x=s[3]+s[0],e.normal.y=s[7]+s[4],e.normal.z=s[11]+s[8],e.d=s[15]+s[12],e.normalize()}static GetRightPlaneToRef(t,e){let s=t.m;e.normal.x=s[3]-s[0],e.normal.y=s[7]-s[4],e.normal.z=s[11]-s[8],e.d=s[15]-s[12],e.normalize()}static GetTopPlaneToRef(t,e){let s=t.m;e.normal.x=s[3]-s[1],e.normal.y=s[7]-s[5],e.normal.z=s[11]-s[9],e.d=s[15]-s[13],e.normalize()}static GetBottomPlaneToRef(t,e){let s=t.m;e.normal.x=s[3]+s[1],e.normal.y=s[7]+s[5],e.normal.z=s[11]+s[9],e.d=s[15]+s[13],e.normalize()}static GetPlanesToRef(t,e){s.GetNearPlaneToRef(t,e[0]),s.GetFarPlaneToRef(t,e[1]),s.GetLeftPlaneToRef(t,e[2]),s.GetRightPlaneToRef(t,e[3]),s.GetTopPlaneToRef(t,e[4]),s.GetBottomPlaneToRef(t,e[5])}static IsPointInFrustum(t,e){for(let s=0;s<6;s++)if(0>e[s].dotCoordinate(t))return!1;return!0}}t.s(["Frustum",0,s])},95801,t=>{"use strict";var e=t.i(95410);class s{}s.POINTERDOWN=1,s.POINTERUP=2,s.POINTERMOVE=4,s.POINTERWHEEL=8,s.POINTERPICK=16,s.POINTERTAP=32,s.POINTERDOUBLETAP=64;class a{constructor(t,e){this.type=t,this.event=e}}t.s(["PointerEventTypes",0,s,"PointerInfo",0,class extends a{get pickInfo(){return this._pickInfo||this._generatePickInfo(),this._pickInfo}constructor(t,e,s,a=null){super(t,e),this._pickInfo=s,this._inputManager=a}_generatePickInfo(){this._inputManager&&(this._pickInfo=this._inputManager._pickMove(this.event),this._inputManager._setRayOnPointerInfo(this._pickInfo,this.event),this._inputManager=null)}},"PointerInfoPre",0,class extends a{constructor(t,s,a,i){super(t,s),this.ray=null,this.originalPickingInfo=null,this.skipOnPointerObservable=!1,this.localPosition=new e.Vector2(a,i)}}])},35705,t=>{"use strict";class e{}e.KEYDOWN=1,e.KEYUP=2;class s{constructor(t,e){this.type=t,this.event=e}}t.s(["KeyboardEventTypes",0,e,"KeyboardInfo",0,s,"KeyboardInfoPre",0,class extends s{get skipOnPointerObservable(){return this.skipOnKeyboardObservable}set skipOnPointerObservable(t){this.skipOnKeyboardObservable=t}constructor(t,e){super(t,e),this.type=t,this.event=e,this.skipOnKeyboardObservable=!1}}])},21056,t=>{"use strict";var e,s;(s=e||(e={}))[s.PointerMove=0]="PointerMove",s[s.PointerDown=1]="PointerDown",s[s.PointerUp=2]="PointerUp";class a{}a.DOM_DELTA_PIXEL=0,a.DOM_DELTA_LINE=1,a.DOM_DELTA_PAGE=2,t.s(["EventConstants",0,a])},87409,t=>{"use strict";class e{constructor(t,e,s,a){this.x=t,this.y=e,this.width=s,this.height=a}toGlobal(t,s){return new e(this.x*t,this.y*s,this.width*t,this.height*s)}toGlobalToRef(t,e,s){return s.x=this.x*t,s.y=this.y*e,s.width=this.width*t,s.height=this.height*e,this}clone(){return new e(this.x,this.y,this.width,this.height)}}t.s(["Viewport",0,e])},67049,t=>{"use strict";var e=t.i(27030);class s extends e.FreeCamera{get touchAngularSensibility(){let t=this.inputs.attached.touch;return t?t.touchAngularSensibility:0}set touchAngularSensibility(t){let e=this.inputs.attached.touch;e&&(e.touchAngularSensibility=t)}get touchMoveSensibility(){let t=this.inputs.attached.touch;return t?t.touchMoveSensibility:0}set touchMoveSensibility(t){let e=this.inputs.attached.touch;e&&(e.touchMoveSensibility=t)}constructor(t,e,s){super(t,e,s),this.inputs.addTouch(),this._setupInputs()}getClassName(){return"TouchCamera"}_setupInputs(){let t=this.inputs.attached.touch,e=this.inputs.attached.mouse;e?e.touchEnabled=!t:t&&(t.allowMouse=!e)}}var a=t.i(95410),i=t.i(18418),r=t.i(95603);class n extends s{get gamepadAngularSensibility(){let t=this.inputs.attached.gamepad;return t?t.gamepadAngularSensibility:0}set gamepadAngularSensibility(t){let e=this.inputs.attached.gamepad;e&&(e.gamepadAngularSensibility=t)}get gamepadMoveSensibility(){let t=this.inputs.attached.gamepad;return t?t.gamepadMoveSensibility:0}set gamepadMoveSensibility(t){let e=this.inputs.attached.gamepad;e&&(e.gamepadMoveSensibility=t)}constructor(t,e,s){super(t,e,s),this.inputs.addGamepad()}getClassName(){return"UniversalCamera"}}let o=!1;function h(){o||(o=!0,i.Node.AddNodeConstructor("FreeCamera",(t,e)=>()=>new n(t,a.Vector3.Zero(),e)),r.Camera._CreateDefaultParsedCamera=(t,e)=>new n(t,a.Vector3.Zero(),e))}t.s(["RegisterUniversalCamera",0,h,"UniversalCamera",0,n],33048),h(),t.s([],65401),t.i(65401),t.i(33048),t.s(["RegisterUniversalCamera",0,h,"UniversalCamera",0,n],67049)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,80434,t=>{"use strict";class r{static _CheckLimit(t,e){let i=r._LogLimitOutputs[t];return i?i.current++:(i={limit:e,current:1},r._LogLimitOutputs[t]=i),i.current<=i.limit}static _GenerateLimitMessage(t,e=1){let i=r._LogLimitOutputs[t];if(!i||!r.MessageLimitReached)return;let s=this._Levels[e];i.current===i.limit&&r[s.name](r.MessageLimitReached.replace(/%LIMIT%/g,""+i.limit).replace(/%TYPE%/g,s.name??""))}static _AddLogEntry(t){r._LogCache=t+r._LogCache,r.OnNewCacheEntry&&r.OnNewCacheEntry(t)}static _FormatMessage(t){let r=t=>t<10?"0"+t:""+t,e=new Date;return"["+r(e.getHours())+":"+r(e.getMinutes())+":"+r(e.getSeconds())+"]: "+t}static _LogDisabled(t,r){}static _LogEnabled(t=1,e,i){let s=Array.isArray(e)?e[0]:e;if(void 0!==i&&!r._CheckLimit(s,i))return;let a=r._FormatMessage(s),n=this._Levels[t],h=Array.isArray(e)?e.slice(1):[];n.logFunc&&n.logFunc("BJS - "+a,...h);let o=`<div style='color:${n.color}'>${a}</div><br>`;r._AddLogEntry(o),r._GenerateLimitMessage(s,t)}static get LogCache(){return r._LogCache}static ClearLogCache(){r._LogCache="",r._LogLimitOutputs={},r.errorsCount=0}static set LogLevels(t){for(let e of(r.Log=r._LogDisabled,r.Warn=r._LogDisabled,r.Error=r._LogDisabled,[r.MessageLogLevel,r.WarningLogLevel,r.ErrorLogLevel]))(t&e)===e&&(r[this._Levels[e].name]=r._LogEnabled.bind(r,e))}}r.NoneLogLevel=0,r.MessageLogLevel=1,r.WarningLogLevel=2,r.ErrorLogLevel=4,r.AllLogLevel=7,r.MessageLimitReached="Too many %TYPE%s (%LIMIT%), no more %TYPE%s will be reported for this message.",r._LogCache="",r._LogLimitOutputs={},r._Levels=[{},{color:"white",logFunc:console.log,name:"Log"},{color:"orange",logFunc:console.warn,name:"Warn"},{},{color:"red",logFunc:console.error,name:"Error"}],r.errorsCount=0,r.Log=r._LogEnabled.bind(r,r.MessageLogLevel),r.Warn=r._LogEnabled.bind(r,r.WarningLogLevel),r.Error=r._LogEnabled.bind(r,r.ErrorLogLevel),t.s(["Logger",0,r])},31919,t=>{"use strict";t.s(["RandomGUID",0,function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let r=16*Math.random()|0;return("x"===t?r:3&r|8).toString(16)})}])},42580,t=>{"use strict";var r=t.i(42476),e=t.i(82579),i=t.i(90629),s=t.i(38116);function a(t){return Math.pow(t,e.ToLinearSpace)}function n(t){return t<=.04045?.0773993808*t:Math.pow(.947867299*(t+.055),2.4)}function h(t){return Math.pow(t,e.ToGammaSpace)}function o(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}class g{constructor(t=0,r=0,e=0){this.r=t,this.g=r,this.b=e}toString(){return"{R: "+this.r+" G:"+this.g+" B:"+this.b+"}"}getClassName(){return"Color3"}getHashCode(){let t=255*this.r|0;return 397*(t=397*t^255*this.g)^255*this.b}toArray(t,r=0){return t[r]=this.r,t[r+1]=this.g,t[r+2]=this.b,this}fromArray(t,r=0){return g.FromArrayToRef(t,r,this),this}toColor4(t=1){return new l(this.r,this.g,this.b,t)}asArray(){return[this.r,this.g,this.b]}toLuminance(){return .3*this.r+.59*this.g+.11*this.b}multiply(t){return new g(this.r*t.r,this.g*t.g,this.b*t.b)}multiplyToRef(t,r){return r.r=this.r*t.r,r.g=this.g*t.g,r.b=this.b*t.b,r}multiplyInPlace(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyByFloats(t,r,e){return new g(this.r*t,this.g*r,this.b*e)}divide(t){throw ReferenceError("Can not divide a color")}divideToRef(t,r){throw ReferenceError("Can not divide a color")}divideInPlace(t){throw ReferenceError("Can not divide a color")}minimizeInPlace(t){return this.minimizeInPlaceFromFloats(t.r,t.g,t.b)}maximizeInPlace(t){return this.maximizeInPlaceFromFloats(t.r,t.g,t.b)}minimizeInPlaceFromFloats(t,r,e){return this.r=Math.min(t,this.r),this.g=Math.min(r,this.g),this.b=Math.min(e,this.b),this}maximizeInPlaceFromFloats(t,r,e){return this.r=Math.max(t,this.r),this.g=Math.max(r,this.g),this.b=Math.max(e,this.b),this}floorToRef(t){throw ReferenceError("Can not floor a color")}floor(){throw ReferenceError("Can not floor a color")}fractToRef(t){throw ReferenceError("Can not fract a color")}fract(){throw ReferenceError("Can not fract a color")}equals(t){return t&&this.r===t.r&&this.g===t.g&&this.b===t.b}equalsFloats(t,r,e){return this.equalsToFloats(t,r,e)}equalsToFloats(t,r,e){return this.r===t&&this.g===r&&this.b===e}equalsWithEpsilon(t,r=e.Epsilon){return(0,i.WithinEpsilon)(this.r,t.r,r)&&(0,i.WithinEpsilon)(this.g,t.g,r)&&(0,i.WithinEpsilon)(this.b,t.b,r)}negate(){throw ReferenceError("Can not negate a color")}negateInPlace(){throw ReferenceError("Can not negate a color")}negateToRef(t){throw ReferenceError("Can not negate a color")}scale(t){return new g(this.r*t,this.g*t,this.b*t)}scaleInPlace(t){return this.r*=t,this.g*=t,this.b*=t,this}scaleToRef(t,r){return r.r=this.r*t,r.g=this.g*t,r.b=this.b*t,r}scaleAndAddToRef(t,r){return r.r+=this.r*t,r.g+=this.g*t,r.b+=this.b*t,r}clampToRef(t=0,r=1,e){return e.r=(0,i.Clamp)(this.r,t,r),e.g=(0,i.Clamp)(this.g,t,r),e.b=(0,i.Clamp)(this.b,t,r),e}add(t){return new g(this.r+t.r,this.g+t.g,this.b+t.b)}addInPlace(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addInPlaceFromFloats(t,r,e){return this.r+=t,this.g+=r,this.b+=e,this}addToRef(t,r){return r.r=this.r+t.r,r.g=this.g+t.g,r.b=this.b+t.b,r}subtract(t){return new g(this.r-t.r,this.g-t.g,this.b-t.b)}subtractToRef(t,r){return r.r=this.r-t.r,r.g=this.g-t.g,r.b=this.b-t.b,r}subtractInPlace(t){return this.r-=t.r,this.g-=t.g,this.b-=t.b,this}subtractFromFloats(t,r,e){return new g(this.r-t,this.g-r,this.b-e)}subtractFromFloatsToRef(t,r,e,i){return i.r=this.r-t,i.g=this.g-r,i.b=this.b-e,i}clone(){return new g(this.r,this.g,this.b)}copyFrom(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copyFromFloats(t,r,e){return this.r=t,this.g=r,this.b=e,this}set(t,r,e){return this.copyFromFloats(t,r,e)}setAll(t){return this.r=this.g=this.b=t,this}toHexString(){let t=Math.round(255*this.r),r=Math.round(255*this.g),e=Math.round(255*this.b);return"#"+(0,i.ToHex)(t)+(0,i.ToHex)(r)+(0,i.ToHex)(e)}fromHexString(t){return"#"!==t.substring(0,1)||7!==t.length||(this.r=parseInt(t.substring(1,3),16)/255,this.g=parseInt(t.substring(3,5),16)/255,this.b=parseInt(t.substring(5,7),16)/255),this}toHSV(){return this.toHSVToRef(new g)}toHSVToRef(t){let r=this.r,e=this.g,i=this.b,s=Math.max(r,e,i),a=Math.min(r,e,i),n=0,h=0,o=s-a;return 0!==s&&(h=o/s),s!=a&&(s==r?(n=(e-i)/o,e<i&&(n+=6)):s==e?n=(i-r)/o+2:s==i&&(n=(r-e)/o+4),n*=60),t.r=n,t.g=h,t.b=s,t}toLinearSpace(t=!1){let r=new g;return this.toLinearSpaceToRef(r,t),r}toLinearSpaceToRef(t,r=!1){return r?(t.r=n(this.r),t.g=n(this.g),t.b=n(this.b)):(t.r=a(this.r),t.g=a(this.g),t.b=a(this.b)),this}toGammaSpace(t=!1){let r=new g;return this.toGammaSpaceToRef(r,t),r}toGammaSpaceToRef(t,r=!1){return r?(t.r=o(this.r),t.g=o(this.g),t.b=o(this.b)):(t.r=h(this.r),t.g=h(this.g),t.b=h(this.b)),this}static HSVtoRGBToRef(t,r,e,i){let s=e*r,a=t/60,n=s*(1-Math.abs(a%2-1)),h=0,o=0,g=0;a>=0&&a<=1?(h=s,o=n):a>=1&&a<=2?(h=n,o=s):a>=2&&a<=3?(o=s,g=n):a>=3&&a<=4?(o=n,g=s):a>=4&&a<=5?(h=n,g=s):a>=5&&a<=6&&(h=s,g=n);let l=e-s;return i.r=h+l,i.g=o+l,i.b=g+l,i}static FromHSV(t,r,e){let i=new g(0,0,0);return g.HSVtoRGBToRef(t,r,e,i),i}static FromHexString(t){return new g(0,0,0).fromHexString(t)}static FromArray(t,r=0){return new g(t[r],t[r+1],t[r+2])}static FromArrayToRef(t,r=0,e){e.r=t[r],e.g=t[r+1],e.b=t[r+2]}static FromInts(t,r,e){return new g(t/255,r/255,e/255)}static Lerp(t,r,e){let i=new g(0,0,0);return g.LerpToRef(t,r,e,i),i}static LerpToRef(t,r,e,i){i.r=t.r+(r.r-t.r)*e,i.g=t.g+(r.g-t.g)*e,i.b=t.b+(r.b-t.b)*e}static Hermite(t,r,e,i,s){let a=s*s,n=s*a,h=2*n-3*a+1,o=-2*n+3*a,l=n-2*a+s,c=n-a;return new g(t.r*h+e.r*o+r.r*l+i.r*c,t.g*h+e.g*o+r.g*l+i.g*c,t.b*h+e.b*o+r.b*l+i.b*c)}static Hermite1stDerivative(t,r,e,i,s){let a=g.Black();return this.Hermite1stDerivativeToRef(t,r,e,i,s,a),a}static Hermite1stDerivativeToRef(t,r,e,i,s,a){let n=s*s;a.r=(n-s)*6*t.r+(3*n-4*s+1)*r.r+(-n+s)*6*e.r+(3*n-2*s)*i.r,a.g=(n-s)*6*t.g+(3*n-4*s+1)*r.g+(-n+s)*6*e.g+(3*n-2*s)*i.g,a.b=(n-s)*6*t.b+(3*n-4*s+1)*r.b+(-n+s)*6*e.b+(3*n-2*s)*i.b}static Red(){return new g(1,0,0)}static Green(){return new g(0,1,0)}static Blue(){return new g(0,0,1)}static Black(){return new g(0,0,0)}static get BlackReadOnly(){return g._BlackReadOnly}static White(){return new g(1,1,1)}static Purple(){return new g(.5,0,.5)}static Magenta(){return new g(1,0,1)}static Yellow(){return new g(1,1,0)}static Gray(){return new g(.5,.5,.5)}static Teal(){return new g(0,1,1)}static Random(){return new g(Math.random(),Math.random(),Math.random())}}g._V8PerformanceHack=new g(.5,.5,.5),g._BlackReadOnly=g.Black();class l{constructor(t=0,r=0,e=0,i=1){this.r=t,this.g=r,this.b=e,this.a=i}asArray(){return[this.r,this.g,this.b,this.a]}toArray(t,r=0){return t[r]=this.r,t[r+1]=this.g,t[r+2]=this.b,t[r+3]=this.a,this}fromArray(t,r=0){return this.r=t[r],this.g=t[r+1],this.b=t[r+2],this.a=t[r+3],this}equals(t){return t&&this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}add(t){return new l(this.r+t.r,this.g+t.g,this.b+t.b,this.a+t.a)}addToRef(t,r){return r.r=this.r+t.r,r.g=this.g+t.g,r.b=this.b+t.b,r.a=this.a+t.a,r}addInPlace(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this.a+=t.a,this}addInPlaceFromFloats(t,r,e,i){return this.r+=t,this.g+=r,this.b+=e,this.a+=i,this}subtract(t){return new l(this.r-t.r,this.g-t.g,this.b-t.b,this.a-t.a)}subtractToRef(t,r){return r.r=this.r-t.r,r.g=this.g-t.g,r.b=this.b-t.b,r.a=this.a-t.a,r}subtractInPlace(t){return this.r-=t.r,this.g-=t.g,this.b-=t.b,this.a-=t.a,this}subtractFromFloats(t,r,e,i){return new l(this.r-t,this.g-r,this.b-e,this.a-i)}subtractFromFloatsToRef(t,r,e,i,s){return s.r=this.r-t,s.g=this.g-r,s.b=this.b-e,s.a=this.a-i,s}scale(t){return new l(this.r*t,this.g*t,this.b*t,this.a*t)}scaleInPlace(t){return this.r*=t,this.g*=t,this.b*=t,this.a*=t,this}scaleToRef(t,r){return r.r=this.r*t,r.g=this.g*t,r.b=this.b*t,r.a=this.a*t,r}scaleAndAddToRef(t,r){return r.r+=this.r*t,r.g+=this.g*t,r.b+=this.b*t,r.a+=this.a*t,r}clampToRef(t=0,r=1,e){return e.r=(0,i.Clamp)(this.r,t,r),e.g=(0,i.Clamp)(this.g,t,r),e.b=(0,i.Clamp)(this.b,t,r),e.a=(0,i.Clamp)(this.a,t,r),e}multiply(t){return new l(this.r*t.r,this.g*t.g,this.b*t.b,this.a*t.a)}multiplyToRef(t,r){return r.r=this.r*t.r,r.g=this.g*t.g,r.b=this.b*t.b,r.a=this.a*t.a,r}multiplyInPlace(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this.a*=t.a,this}multiplyByFloats(t,r,e,i){return new l(this.r*t,this.g*r,this.b*e,this.a*i)}divide(t){throw ReferenceError("Can not divide a color")}divideToRef(t,r){throw ReferenceError("Can not divide a color")}divideInPlace(t){throw ReferenceError("Can not divide a color")}minimizeInPlace(t){return this.r=Math.min(this.r,t.r),this.g=Math.min(this.g,t.g),this.b=Math.min(this.b,t.b),this.a=Math.min(this.a,t.a),this}maximizeInPlace(t){return this.r=Math.max(this.r,t.r),this.g=Math.max(this.g,t.g),this.b=Math.max(this.b,t.b),this.a=Math.max(this.a,t.a),this}minimizeInPlaceFromFloats(t,r,e,i){return this.r=Math.min(t,this.r),this.g=Math.min(r,this.g),this.b=Math.min(e,this.b),this.a=Math.min(i,this.a),this}maximizeInPlaceFromFloats(t,r,e,i){return this.r=Math.max(t,this.r),this.g=Math.max(r,this.g),this.b=Math.max(e,this.b),this.a=Math.max(i,this.a),this}floorToRef(t){throw ReferenceError("Can not floor a color")}floor(){throw ReferenceError("Can not floor a color")}fractToRef(t){throw ReferenceError("Can not fract a color")}fract(){throw ReferenceError("Can not fract a color")}negate(){throw ReferenceError("Can not negate a color")}negateInPlace(){throw ReferenceError("Can not negate a color")}negateToRef(t){throw ReferenceError("Can not negate a color")}equalsWithEpsilon(t,r=e.Epsilon){return(0,i.WithinEpsilon)(this.r,t.r,r)&&(0,i.WithinEpsilon)(this.g,t.g,r)&&(0,i.WithinEpsilon)(this.b,t.b,r)&&(0,i.WithinEpsilon)(this.a,t.a,r)}equalsToFloats(t,r,e,i){return this.r===t&&this.g===r&&this.b===e&&this.a===i}toString(){return"{R: "+this.r+" G:"+this.g+" B:"+this.b+" A:"+this.a+"}"}getClassName(){return"Color4"}getHashCode(){let t=255*this.r|0;return 397*(t=397*(t=397*t^255*this.g)^255*this.b)^255*this.a}clone(){return new l().copyFrom(this)}copyFrom(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this}copyFromFloats(t,r,e,i){return this.r=t,this.g=r,this.b=e,this.a=i,this}set(t,r,e,i){return this.copyFromFloats(t,r,e,i)}setAll(t){return this.r=this.g=this.b=this.a=t,this}toHexString(t=!1){let r=Math.round(255*this.r),e=Math.round(255*this.g),s=Math.round(255*this.b);if(t)return"#"+(0,i.ToHex)(r)+(0,i.ToHex)(e)+(0,i.ToHex)(s);let a=Math.round(255*this.a);return"#"+(0,i.ToHex)(r)+(0,i.ToHex)(e)+(0,i.ToHex)(s)+(0,i.ToHex)(a)}fromHexString(t){return"#"!==t.substring(0,1)||9!==t.length&&7!==t.length||(this.r=parseInt(t.substring(1,3),16)/255,this.g=parseInt(t.substring(3,5),16)/255,this.b=parseInt(t.substring(5,7),16)/255,9===t.length&&(this.a=parseInt(t.substring(7,9),16)/255)),this}toLinearSpace(t=!1){let r=new l;return this.toLinearSpaceToRef(r,t),r}toLinearSpaceToRef(t,r=!1){return r?(t.r=n(this.r),t.g=n(this.g),t.b=n(this.b)):(t.r=a(this.r),t.g=a(this.g),t.b=a(this.b)),t.a=this.a,this}toGammaSpace(t=!1){let r=new l;return this.toGammaSpaceToRef(r,t),r}toGammaSpaceToRef(t,r=!1){return r?(t.r=o(this.r),t.g=o(this.g),t.b=o(this.b)):(t.r=h(this.r),t.g=h(this.g),t.b=h(this.b)),t.a=this.a,this}static FromHexString(t){return"#"!==t.substring(0,1)||9!==t.length&&7!==t.length?new l(0,0,0,0):new l(0,0,0,1).fromHexString(t)}static Lerp(t,r,e){return l.LerpToRef(t,r,e,new l)}static LerpToRef(t,r,e,i){return i.r=t.r+(r.r-t.r)*e,i.g=t.g+(r.g-t.g)*e,i.b=t.b+(r.b-t.b)*e,i.a=t.a+(r.a-t.a)*e,i}static Hermite(t,r,e,i,s){let a=s*s,n=s*a,h=2*n-3*a+1,o=-2*n+3*a,g=n-2*a+s,c=n-a;return new l(t.r*h+e.r*o+r.r*g+i.r*c,t.g*h+e.g*o+r.g*g+i.g*c,t.b*h+e.b*o+r.b*g+i.b*c,t.a*h+e.a*o+r.a*g+i.a*c)}static Hermite1stDerivative(t,r,e,i,s){let a=new l;return this.Hermite1stDerivativeToRef(t,r,e,i,s,a),a}static Hermite1stDerivativeToRef(t,r,e,i,s,a){let n=s*s;a.r=(n-s)*6*t.r+(3*n-4*s+1)*r.r+(-n+s)*6*e.r+(3*n-2*s)*i.r,a.g=(n-s)*6*t.g+(3*n-4*s+1)*r.g+(-n+s)*6*e.g+(3*n-2*s)*i.g,a.b=(n-s)*6*t.b+(3*n-4*s+1)*r.b+(-n+s)*6*e.b+(3*n-2*s)*i.b,a.a=(n-s)*6*t.a+(3*n-4*s+1)*r.a+(-n+s)*6*e.a+(3*n-2*s)*i.a}static FromColor3(t,r=1){return new l(t.r,t.g,t.b,r)}static FromArray(t,r=0){return new l(t[r],t[r+1],t[r+2],t[r+3])}static FromArrayToRef(t,r=0,e){e.r=t[r],e.g=t[r+1],e.b=t[r+2],e.a=t[r+3]}static FromInts(t,r,e,i){return new l(t/255,r/255,e/255,i/255)}static CheckColors4(t,r){if(t.length===3*r){let r=[];for(let e=0;e<t.length;e+=3){let i=e/3*4;r[i]=t[e],r[i+1]=t[e+1],r[i+2]=t[e+2],r[i+3]=1}return r}return t}}l._V8PerformanceHack=new l(.5,.5,.5,.5);class c{}c.Color3=(0,r.BuildArray)(3,g.Black),c.Color4=(0,r.BuildArray)(3,()=>new l(0,0,0,0));let u=!1;t.s(["Color3",0,g,"Color4",0,l,"RegisterMathColor",0,function(){u||(u=!0,Object.defineProperties(g.prototype,{dimension:{value:[3]},rank:{value:1}}),Object.defineProperties(l.prototype,{dimension:{value:[4]},rank:{value:1}}),(0,s.RegisterClass)("BABYLON.Color3",g),(0,s.RegisterClass)("BABYLON.Color4",l))},"TmpColors",0,c])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,20583,e=>{"use strict";var t=e.i(71502),i=e.i(92943),s=e.i(19434),n=e.i(38116);class r extends t.FlowGraphEventBlock{constructor(e){super(e),this.type="PointerMove",this.targetMesh=this.registerDataInput("targetMesh",s.RichTypeAny,e?.targetMesh),this.pointerId=this.registerDataOutput("pointerId",s.RichTypeNumber),this.meshUnderPointer=this.registerDataOutput("meshUnderPointer",s.RichTypeAny),this.pickedPoint=this.registerDataOutput("pickedPoint",s.RichTypeAny)}_executeEvent(e,t){let s=this.targetMesh.getValue(e),n=t.pickInfo?.pickedMesh;return!(!s||n===s||n&&(0,i._IsDescendantOf)(n,s))||(this.pointerId.setValue(t.event.pointerId,e),this.meshUnderPointer.setValue(n??null,e),this.pickedPoint.setValue(t.pickInfo?.pickedPoint??null,e),this._execute(e),!this.config?.stopPropagation)}_preparePendingTasks(e){}_cancelPendingTasks(e){}getClassName(){return"FlowGraphPointerMoveEventBlock"}}let o=!1;function a(){o||(o=!0,(0,n.RegisterClass)("FlowGraphPointerMoveEventBlock",r))}e.s(["FlowGraphPointerMoveEventBlock",0,r,"RegisterFlowGraphPointerMoveEventBlock",0,a],40240),a(),e.s([],13588),e.i(13588),e.i(40240),e.s(["FlowGraphPointerMoveEventBlock",0,r],20583)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,99325,e=>{"use strict";var t=e.i(37068),i=e.i(19434);let l="cachedOperationValue",a="cachedExecutionId";class s extends t.FlowGraphBlock{constructor(e,t){super(t),this.value=this.registerDataOutput("value",e),this.isValid=this.registerDataOutput("isValid",i.RichTypeBoolean)}_updateOutputs(e){let t=e._getExecutionVariable(this,a,-1),i=e._getExecutionVariable(this,l,null);if(null!=i&&t===e.executionId)this.isValid.setValue(!0,e),this.value.setValue(i,e);else try{let t=this._doOperation(e);if(null==t)return void this.isValid.setValue(!1,e);e._setExecutionVariable(this,l,t),e._setExecutionVariable(this,a,e.executionId),this.value.setValue(t,e),this.isValid.setValue(!0,e)}catch(t){this.isValid.setValue(!1,e)}}}e.s(["FlowGraphCachedOperationBlock",0,s])},75206,e=>{"use strict";var t=e.i(19434),i=e.i(99325),l=e.i(95410),a=e.i(38116);class s extends i.FlowGraphCachedOperationBlock{constructor(e){super(t.RichTypeVector3,e),this.body=this.registerDataInput("body",t.RichTypeAny)}_doOperation(e){let t=this.body.getValue(e);if(!t)return;let i=e._getExecutionVariable(this,"_cachedVelocity",null);return i||(i=new l.Vector3,e._setExecutionVariable(this,"_cachedVelocity",i)),t.getAngularVelocityToRef(i),i}getClassName(){return"FlowGraphGetAngularVelocityBlock"}}let o=!1;function r(){o||(o=!0,(0,a.RegisterClass)("FlowGraphGetAngularVelocityBlock",s))}e.s(["FlowGraphGetAngularVelocityBlock",0,s,"RegisterFlowGraphGetAngularVelocityBlock",0,r],97341),r(),e.s([],30334),e.i(30334),e.i(97341),e.s(["FlowGraphGetAngularVelocityBlock",0,s],75206)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52810,s=>{"use strict";var e=s.i(85252);(0,e.RegisterDumpTools)(),s.s([],26958),s.i(26958),s.s(["Dispose",()=>e.Dispose,"DumpData",()=>e.DumpData,"DumpDataAsync",()=>e.DumpDataAsync,"DumpFramebuffer",()=>e.DumpFramebuffer,"DumpTools",()=>e.DumpTools,"EncodeImageAsync",()=>e.EncodeImageAsync,"RegisterDumpTools",()=>e.RegisterDumpTools],52810)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,17766,87452,e=>{"use strict";var t=e.i(45707),s=e.i(90176);e.s(["PostProcessManager",0,class{constructor(e){this._vertexBuffers={},this._activePostProcesses=[],this.onBeforeRenderObservable=new s.Observable,this._scene=e}_prepareBuffers(){if(this._vertexBuffers[t.VertexBuffer.PositionKind])return;let e=[];e.push(1,1),e.push(-1,1),e.push(-1,-1),e.push(1,-1),this._vertexBuffers[t.VertexBuffer.PositionKind]=new t.VertexBuffer(this._scene.getEngine(),e,t.VertexBuffer.PositionKind,!1,!1,2),this._buildIndexBuffer()}_buildIndexBuffer(){let e=[];e.push(0),e.push(1),e.push(2),e.push(0),e.push(2),e.push(3),this._indexBuffer=this._scene.getEngine().createIndexBuffer(e)}_getActivePostProcesses(e){let t=this._activePostProcesses;t.length=0;for(let s=0;s<e.length;s++){let r=e[s];r&&t.push(r)}return t}_rebuild(){let e=this._vertexBuffers[t.VertexBuffer.PositionKind];e&&(e._rebuild(),this._buildIndexBuffer())}_prepareFrame(e=null,t=null){let s=this._scene.activeCamera;return!!s&&!!(t=t||this._getActivePostProcesses(s._postProcesses))&&0!==t.length&&!!this._scene.postProcessesEnabled&&(t[0].activate(s,e,null!=t),!0)}directRender(e,t=null,s=!1,r=0,i=0,n=!1,a=e.length){let h=this._scene.getEngine();for(let o=0;o<a;o++){o<e.length-1?e[o+1].activate(this._scene.activeCamera||this._scene,t?.texture):(t?h.bindFramebuffer(t,r,void 0,void 0,s,i):n||h.restoreDefaultFramebuffer(),h._debugInsertMarker?.(`post process ${e[o].name} output`));let a=e[o],l=a.apply();l&&(a.onBeforeRenderObservable.notifyObservers(l),this._prepareBuffers(),h.bindBuffers(this._vertexBuffers,this._indexBuffer,l),h.drawElementsType(0,0,6),a.onAfterRenderObservable.notifyObservers(l))}h.setDepthBuffer(!0),h.setDepthWrite(!0)}_finalizeFrame(e,t,s,r,i=!1){let n=this._scene.activeCamera;if(!n||(this.onBeforeRenderObservable.notifyObservers(this),0===(r=r||this._getActivePostProcesses(n._postProcesses)).length||!this._scene.postProcessesEnabled))return;let a=this._scene.getEngine();for(let h=0,o=r.length;h<o;h++){let l=r[h];if(h<o-1?l._outputTexture=r[h+1].activate(n,t?.texture):(t?(a.bindFramebuffer(t,s,void 0,void 0,i),l._outputTexture=t):(a.restoreDefaultFramebuffer(),l._outputTexture=null),a._debugInsertMarker?.(`post process ${r[h].name} output`)),e)break;let c=l.apply();c&&(l.onBeforeRenderObservable.notifyObservers(c),this._prepareBuffers(),a.bindBuffers(this._vertexBuffers,this._indexBuffer,c),a.drawElementsType(0,0,6),l.onAfterRenderObservable.notifyObservers(c))}a.setDepthBuffer(!0),a.setDepthWrite(!0),a.setAlphaMode(0)}dispose(){let e=this._vertexBuffers[t.VertexBuffer.PositionKind];e&&(e.dispose(),this._vertexBuffers[t.VertexBuffer.PositionKind]=null),this._indexBuffer&&(this._scene.getEngine()._releaseBuffer(this._indexBuffer),this._indexBuffer=null)}}],17766);var r=e.i(70432),i=e.i(95410);class n{set opaqueSortCompareFn(e){e?this._opaqueSortCompareFn=e:this._opaqueSortCompareFn=n.PainterSortCompare,this._renderOpaque=this._renderOpaqueSorted}set alphaTestSortCompareFn(e){e?this._alphaTestSortCompareFn=e:this._alphaTestSortCompareFn=n.PainterSortCompare,this._renderAlphaTest=this._renderAlphaTestSorted}set transparentSortCompareFn(e){e?this._transparentSortCompareFn=e:this._transparentSortCompareFn=n.defaultTransparentSortCompare,this._renderTransparent=this._renderTransparentSorted}constructor(e,t,s=null,i=null,n=null){this.index=e,this._opaqueSubMeshes=new r.SmartArray(256),this._transparentSubMeshes=new r.SmartArray(256),this._alphaTestSubMeshes=new r.SmartArray(256),this._depthOnlySubMeshes=new r.SmartArray(256),this._particleSystems=new r.SmartArray(256),this._spriteManagers=new r.SmartArray(256),this._empty=!0,this._edgesRenderers=new r.SmartArrayNoDuplicate(16),this.disableDepthPrePass=!1,this._scene=t,this.opaqueSortCompareFn=s,this.alphaTestSortCompareFn=i,this.transparentSortCompareFn=n}render(e,t,s,r,i=!0,n=!0,a=!0,h=!0,o){if(e)return void e(this._opaqueSubMeshes,this._alphaTestSubMeshes,this._transparentSubMeshes,this._depthOnlySubMeshes);let l=this._scene.getEngine();i&&0!==this._depthOnlySubMeshes.length&&(l.setColorWrite(!1),this._renderAlphaTest(this._depthOnlySubMeshes),l.setColorWrite(!0)),n&&0!==this._opaqueSubMeshes.length&&this._renderOpaque(this._opaqueSubMeshes),a&&0!==this._alphaTestSubMeshes.length&&this._renderAlphaTest(this._alphaTestSubMeshes);let c=l.getStencilBuffer();if(l.setStencilBuffer(!1),t&&this._renderSprites(),s&&this._renderParticles(r),this.onBeforeTransparentRendering&&this.onBeforeTransparentRendering(),h&&(o||0!==this._transparentSubMeshes.length||this._scene.useOrderIndependentTransparency)){if(l.setStencilBuffer(c),o)o(this._transparentSubMeshes,this);else if(this._scene.useOrderIndependentTransparency){let e=this._scene.depthPeelingRenderer.render(this._transparentSubMeshes);e.length&&this._renderTransparent(e)}else this._renderTransparent(this._transparentSubMeshes);l.setAlphaMode(0)}if(l.setStencilBuffer(!1),n&&this._edgesRenderers.length){for(let e=0;e<this._edgesRenderers.length;e++)this._edgesRenderers.data[e].render();l.setAlphaMode(0)}l.setStencilBuffer(c)}_renderOpaqueSorted(e){n._RenderSorted(e,this._opaqueSortCompareFn,this._scene.activeCamera,!1,this.disableDepthPrePass)}_renderAlphaTestSorted(e){n._RenderSorted(e,this._alphaTestSortCompareFn,this._scene.activeCamera,!1,this.disableDepthPrePass)}_renderTransparentSorted(e){n._RenderSorted(e,this._transparentSortCompareFn,this._scene.activeCamera,!0,this.disableDepthPrePass)}static _RenderSorted(e,t,s,r,a){let h,o=0,l=s?s.globalPosition:n._ZeroVector;if(r)for(;o<e.length;o++)(h=e.data[o])._alphaIndex=h.getMesh().alphaIndex,h._distanceToCamera=i.Vector3.Distance(h.getBoundingInfo().boundingSphere.centerWorld,l);let c=e.length===e.data.length?e.data:e.data.slice(0,e.length);t&&c.sort(t);let u=c[0].getMesh().getScene();for(o=0;o<c.length;o++)if(h=c[o],!u._activeMeshesFrozenButKeepClipping||h.isInFrustum(u._frustumPlanes)){if(r){let e=h.getMaterial();if(e&&e.needDepthPrePass&&!a){let t=e.getScene().getEngine();t.setColorWrite(!1),t.setAlphaMode(0),h.render(!1),t.setColorWrite(!0)}}h.render(r)}}static defaultTransparentSortCompare(e,t){return e._alphaIndex>t._alphaIndex?1:e._alphaIndex<t._alphaIndex?-1:n.backToFrontSortCompare(e,t)}static backToFrontSortCompare(e,t){return e._distanceToCamera<t._distanceToCamera?1:e._distanceToCamera>t._distanceToCamera?-1:0}static frontToBackSortCompare(e,t){return e._distanceToCamera<t._distanceToCamera?-1:+(e._distanceToCamera>t._distanceToCamera)}static PainterSortCompare(e,t){let s=e.getMesh(),r=t.getMesh();return s.material&&r.material?s.material.uniqueId-r.material.uniqueId:s.uniqueId-r.uniqueId}prepare(){this._opaqueSubMeshes.reset(),this._transparentSubMeshes.reset(),this._alphaTestSubMeshes.reset(),this._depthOnlySubMeshes.reset(),this._particleSystems.reset(),this.prepareSprites(),this._edgesRenderers.reset(),this._empty=!0}prepareSprites(){this._spriteManagers.reset()}dispose(){this._opaqueSubMeshes.dispose(),this._transparentSubMeshes.dispose(),this._alphaTestSubMeshes.dispose(),this._depthOnlySubMeshes.dispose(),this._particleSystems.dispose(),this._spriteManagers.dispose(),this._edgesRenderers.dispose()}dispatch(e,t,s){void 0===t&&(t=e.getMesh()),void 0===s&&(s=e.getMaterial()),null!=s&&(s.needAlphaBlendingForMesh(t)?this._transparentSubMeshes.push(e):s.needAlphaTestingForMesh(t)?(s.needDepthPrePass&&!this.disableDepthPrePass&&this._depthOnlySubMeshes.push(e),this._alphaTestSubMeshes.push(e)):(s.needDepthPrePass&&!this.disableDepthPrePass&&this._depthOnlySubMeshes.push(e),this._opaqueSubMeshes.push(e)),t._renderingGroup=this,t._edgesRenderer&&t.isEnabled()&&t.isVisible&&t._edgesRenderer.isEnabled&&this._edgesRenderers.pushNoDuplicate(t._edgesRenderer),this._empty=!1)}dispatchSprites(e){this._spriteManagers.push(e),this._empty=!1}dispatchParticles(e){this._particleSystems.push(e),this._empty=!1}_renderParticles(e){if(0===this._particleSystems.length)return;let t=this._scene.activeCamera;this._scene.onBeforeParticlesRenderingObservable.notifyObservers(this._scene);for(let s=0;s<this._particleSystems.length;s++){let r=this._particleSystems.data[s];if(0===(t&&t.layerMask&r.layerMask))continue;let i=r.emitter;i.position&&e&&-1===e.indexOf(i)||this._scene._activeParticles.addCount(r.render(),!1)}this._scene.onAfterParticlesRenderingObservable.notifyObservers(this._scene)}_renderSprites(){if(!this._scene.spritesEnabled||0===this._spriteManagers.length)return;let e=this._scene.activeCamera;this._scene.onBeforeSpritesRenderingObservable.notifyObservers(this._scene);for(let t=0;t<this._spriteManagers.length;t++){let s=this._spriteManagers.data[t];0!==(e&&e.layerMask&s.layerMask)&&s.render()}this._scene.onAfterSpritesRenderingObservable.notifyObservers(this._scene)}}n._ZeroVector=i.Vector3.Zero();class a{}class h{get disableDepthPrePass(){return this._disableDepthPrePass}set disableDepthPrePass(e){for(let t of(this._disableDepthPrePass=e,this._renderingGroups))t.disableDepthPrePass=e}get maintainStateBetweenFrames(){return this._maintainStateBetweenFrames}set maintainStateBetweenFrames(e){e!==this._maintainStateBetweenFrames&&(this._maintainStateBetweenFrames=e,this._maintainStateBetweenFrames||this.restoreDispachedFlags())}restoreDispachedFlags(){for(let e of this._scene.meshes)if(e.subMeshes)for(let t of e.subMeshes)t._wasDispatched=!1;if(this._scene.spriteManagers)for(let e of this._scene.spriteManagers)e._wasDispatched=!1;for(let e of this._scene.particleSystems)e._wasDispatched=!1}constructor(e){this._useSceneAutoClearSetup=!1,this._disableDepthPrePass=!1,this._renderingGroups=[],this._autoClearDepthStencil={},this._customOpaqueSortCompareFn={},this._customAlphaTestSortCompareFn={},this._customTransparentSortCompareFn={},this._renderingGroupInfo=new a,this._maintainStateBetweenFrames=!1,this._scene=e;for(let e=h.MIN_RENDERINGGROUPS;e<h.MAX_RENDERINGGROUPS;e++)this._autoClearDepthStencil[e]={autoClear:!0,depth:!0,stencil:!0}}get renderingGroups(){return this._renderingGroups}getRenderingGroup(e){let t=e||0;return this._prepareRenderingGroup(t),this._renderingGroups[t]}_clearDepthStencilBuffer(e=!0,t=!0){this._depthStencilBufferAlreadyCleaned||(this._scene.getEngine().clear(null,!1,e,t),this._depthStencilBufferAlreadyCleaned=!0)}render(e,t,s,r,i=!0,n=!0,a=!0,o=!0,l){let c=this._renderingGroupInfo;if(c.scene=this._scene,c.camera=this._scene.activeCamera,c.renderingManager=this,this._scene.spriteManagers&&r)for(let e=0;e<this._scene.spriteManagers.length;e++){let t=this._scene.spriteManagers[e];this.dispatchSprites(t)}for(let u=h.MIN_RENDERINGGROUPS;u<h.MAX_RENDERINGGROUPS;u++){this._depthStencilBufferAlreadyCleaned=u===h.MIN_RENDERINGGROUPS;let p=this._renderingGroups[u];if(!p||p._empty)continue;let d=1<<u;if(c.renderingGroupId=u,this._scene.onBeforeRenderingGroupObservable.notifyObservers(c,d),h.AUTOCLEAR){let e=this._useSceneAutoClearSetup?this._scene.getAutoClearDepthStencilSetup(u):this._autoClearDepthStencil[u];e&&e.autoClear&&this._clearDepthStencilBuffer(e.depth,e.stencil)}for(let e of this._scene._beforeRenderingGroupDrawStage)e.action(u);for(let h of(p.render(e,r,s,t,i,n,a,o,l),this._scene._afterRenderingGroupDrawStage))h.action(u);this._scene.onAfterRenderingGroupObservable.notifyObservers(c,d)}}reset(){if(!this.maintainStateBetweenFrames)for(let e=h.MIN_RENDERINGGROUPS;e<h.MAX_RENDERINGGROUPS;e++){let t=this._renderingGroups[e];t&&t.prepare()}}resetSprites(){if(!this.maintainStateBetweenFrames)for(let e=h.MIN_RENDERINGGROUPS;e<h.MAX_RENDERINGGROUPS;e++){let t=this._renderingGroups[e];t&&t.prepareSprites()}}dispose(){this.freeRenderingGroups(),this._renderingGroups.length=0,this._renderingGroupInfo=null}freeRenderingGroups(){for(let e=h.MIN_RENDERINGGROUPS;e<h.MAX_RENDERINGGROUPS;e++){let t=this._renderingGroups[e];t&&t.dispose()}}_prepareRenderingGroup(e){void 0===this._renderingGroups[e]&&(this._renderingGroups[e]=new n(e,this._scene,this._customOpaqueSortCompareFn[e],this._customAlphaTestSortCompareFn[e],this._customTransparentSortCompareFn[e]),this._renderingGroups[e].disableDepthPrePass=this._disableDepthPrePass)}dispatchSprites(e){this.maintainStateBetweenFrames&&e._wasDispatched||(e._wasDispatched=!0,this.getRenderingGroup(e.renderingGroupId).dispatchSprites(e))}dispatchParticles(e){this.maintainStateBetweenFrames&&e._wasDispatched||(e._wasDispatched=!0,this.getRenderingGroup(e.renderingGroupId).dispatchParticles(e))}dispatch(e,t,s){void 0===t&&(t=e.getMesh()),this.maintainStateBetweenFrames&&e._wasDispatched||(e._wasDispatched=!0,this.getRenderingGroup(t.renderingGroupId).dispatch(e,t,s))}setRenderingOrder(e,t=null,s=null,r=null){if(this._customOpaqueSortCompareFn[e]=t,this._customAlphaTestSortCompareFn[e]=s,this._customTransparentSortCompareFn[e]=r,this._renderingGroups[e]){let t=this._renderingGroups[e];t.opaqueSortCompareFn=this._customOpaqueSortCompareFn[e],t.alphaTestSortCompareFn=this._customAlphaTestSortCompareFn[e],t.transparentSortCompareFn=this._customTransparentSortCompareFn[e]}}setRenderingAutoClearDepthStencil(e,t,s=!0,r=!0){this._autoClearDepthStencil[e]={autoClear:t,depth:s,stencil:r}}getAutoClearDepthStencilSetup(e){return this._autoClearDepthStencil[e]}}h.MAX_RENDERINGGROUPS=4,h.MIN_RENDERINGGROUPS=0,h.AUTOCLEAR=!0,e.s(["RenderingManager",0,h],87452)},63217,e=>{"use strict";var t=e.i(87869);class s{get min(){return this._min}get max(){return this._max}get average(){return this._average}get lastSecAverage(){return this._lastSecAverage}get current(){return this._current}get total(){return this._totalAccumulated}get count(){return this._totalValueCount}constructor(){this._startMonitoringTime=0,this._min=0,this._max=0,this._average=0,this._lastSecAverage=0,this._current=0,this._totalValueCount=0,this._totalAccumulated=0,this._lastSecAccumulated=0,this._lastSecTime=0,this._lastSecValueCount=0}fetchNewFrame(){this._totalValueCount++,this._current=0,this._lastSecValueCount++}addCount(e,t){s.Enabled&&(this._current+=e,t&&this._fetchResult())}beginMonitoring(){s.Enabled&&(this._startMonitoringTime=t.PrecisionDate.Now)}endMonitoring(e=!0){if(!s.Enabled)return;e&&this.fetchNewFrame();let r=t.PrecisionDate.Now;this._current=r-this._startMonitoringTime,e&&this._fetchResult()}endFrame(){this._fetchResult()}_fetchResult(){this._totalAccumulated+=this._current,this._lastSecAccumulated+=this._current,this._min=Math.min(this._min,this._current),this._max=Math.max(this._max,this._current),this._average=this._totalAccumulated/this._totalValueCount;let e=t.PrecisionDate.Now;e-this._lastSecTime>1e3&&(this._lastSecAverage=this._lastSecAccumulated/this._lastSecValueCount,this._lastSecTime=e,this._lastSecAccumulated=0,this._lastSecValueCount=0)}}s.Enabled=!0,e.s(["PerfCounter",0,s])},46833,e=>{"use strict";var t=e.i(47997);class s{static GetPlanes(e){let r=[];for(let e=0;e<6;e++)r.push(new t.Plane(0,0,0,0));return s.GetPlanesToRef(e,r),r}static GetNearPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]+s[2],t.normal.y=s[7]+s[6],t.normal.z=s[11]+s[10],t.d=s[15]+s[14],t.normalize()}static GetFarPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]-s[2],t.normal.y=s[7]-s[6],t.normal.z=s[11]-s[10],t.d=s[15]-s[14],t.normalize()}static GetLeftPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]+s[0],t.normal.y=s[7]+s[4],t.normal.z=s[11]+s[8],t.d=s[15]+s[12],t.normalize()}static GetRightPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]-s[0],t.normal.y=s[7]-s[4],t.normal.z=s[11]-s[8],t.d=s[15]-s[12],t.normalize()}static GetTopPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]-s[1],t.normal.y=s[7]-s[5],t.normal.z=s[11]-s[9],t.d=s[15]-s[13],t.normalize()}static GetBottomPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]+s[1],t.normal.y=s[7]+s[5],t.normal.z=s[11]+s[9],t.d=s[15]+s[13],t.normalize()}static GetPlanesToRef(e,t){s.GetNearPlaneToRef(e,t[0]),s.GetFarPlaneToRef(e,t[1]),s.GetLeftPlaneToRef(e,t[2]),s.GetRightPlaneToRef(e,t[3]),s.GetTopPlaneToRef(e,t[4]),s.GetBottomPlaneToRef(e,t[5])}static IsPointInFrustum(e,t){for(let s=0;s<6;s++)if(0>t[s].dotCoordinate(e))return!1;return!0}}e.s(["Frustum",0,s])},5252,e=>{"use strict";var t=e.i(95410),s=e.i(45707);e.s(["PickingInfo",0,class{constructor(){this.hit=!1,this.distance=0,this.pickedPoint=null,this.pickedMesh=null,this.bu=0,this.bv=0,this.faceId=-1,this.subMeshFaceId=-1,this.subMeshId=0,this.pickedSprite=null,this.thinInstanceIndex=-1,this.ray=null,this.originMesh=null,this.aimTransform=null,this.gripTransform=null}getNormal(e=!1,r=!0){let i;if(!this.pickedMesh||r&&!this.pickedMesh.isVerticesDataPresent(s.VertexBuffer.NormalKind))return null;let n=this.pickedMesh.getIndices();n?.length===0&&(n=null);let a=t.TmpVectors.Vector3[0],h=t.TmpVectors.Vector3[1],o=t.TmpVectors.Vector3[2];if(r){let e=this.pickedMesh.getVerticesData(s.VertexBuffer.NormalKind),r=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId],a):a.copyFromFloats(e[3*this.faceId*3],e[3*this.faceId*3+1],e[3*this.faceId*3+2]),l=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId+1],h):h.copyFromFloats(e[(3*this.faceId+1)*3],e[(3*this.faceId+1)*3+1],e[(3*this.faceId+1)*3+2]),c=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId+2],o):o.copyFromFloats(e[(3*this.faceId+2)*3],e[(3*this.faceId+2)*3+1],e[(3*this.faceId+2)*3+2]);r=r.scale(this.bu),l=l.scale(this.bv),c=c.scale(1-this.bu-this.bv),i=new t.Vector3(r.x+l.x+c.x,r.y+l.y+c.y,r.z+l.z+c.z)}else{let e=this.pickedMesh.getVerticesData(s.VertexBuffer.PositionKind),r=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId],a):a.copyFromFloats(e[3*this.faceId*3],e[3*this.faceId*3+1],e[3*this.faceId*3+2]),l=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId+1],h):h.copyFromFloats(e[(3*this.faceId+1)*3],e[(3*this.faceId+1)*3+1],e[(3*this.faceId+1)*3+2]),c=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId+2],o):o.copyFromFloats(e[(3*this.faceId+2)*3],e[(3*this.faceId+2)*3+1],e[(3*this.faceId+2)*3+2]),u=r.subtract(l),p=c.subtract(l);i=t.Vector3.Cross(u,p)}let l=(e,s)=>{if(-1!==this.thinInstanceIndex){let r=e._thinInstanceDataStorage.matrixData,i=this.thinInstanceIndex<<4;if(r&&r.length>i){let e=t.TmpVectors.Matrix[0];t.Matrix.FromArrayToRef(r,i,e),t.Vector3.TransformNormalToRef(s,e,s)}}let r=e.getWorldMatrix();e.nonUniformScaling&&(t.TmpVectors.Matrix[0].copyFrom(r),(r=t.TmpVectors.Matrix[0]).setTranslationFromFloats(0,0,0),r.invert(),r.transposeToRef(t.TmpVectors.Matrix[1]),r=t.TmpVectors.Matrix[1]),t.Vector3.TransformNormalToRef(s,r,s)};if(e&&l(this.pickedMesh,i),this.ray){let s=t.TmpVectors.Vector3[0].copyFrom(i);e||l(this.pickedMesh,s),t.Vector3.Dot(s,this.ray.direction)>0&&i.negateInPlace()}return i.normalize(),i}getTextureCoordinates(e=s.VertexBuffer.UVKind){if(!this.pickedMesh||!this.pickedMesh.isVerticesDataPresent(e))return null;let r=this.pickedMesh.getIndices();if(!r)return null;let i=this.pickedMesh.getVerticesData(e);if(!i)return null;let n=t.Vector2.FromArray(i,2*r[3*this.faceId]),a=t.Vector2.FromArray(i,2*r[3*this.faceId+1]),h=t.Vector2.FromArray(i,2*r[3*this.faceId+2]);return n=n.scale(this.bu),a=a.scale(this.bv),h=h.scale(1-this.bu-this.bv),new t.Vector2(n.x+a.x+h.x,n.y+a.y+h.y)}}])},95801,e=>{"use strict";var t=e.i(95410);class s{}s.POINTERDOWN=1,s.POINTERUP=2,s.POINTERMOVE=4,s.POINTERWHEEL=8,s.POINTERPICK=16,s.POINTERTAP=32,s.POINTERDOUBLETAP=64;class r{constructor(e,t){this.type=e,this.event=t}}e.s(["PointerEventTypes",0,s,"PointerInfo",0,class extends r{get pickInfo(){return this._pickInfo||this._generatePickInfo(),this._pickInfo}constructor(e,t,s,r=null){super(e,t),this._pickInfo=s,this._inputManager=r}_generatePickInfo(){this._inputManager&&(this._pickInfo=this._inputManager._pickMove(this.event),this._inputManager._setRayOnPointerInfo(this._pickInfo,this.event),this._inputManager=null)}},"PointerInfoPre",0,class extends r{constructor(e,s,r,i){super(e,s),this.ray=null,this.originalPickingInfo=null,this.skipOnPointerObservable=!1,this.localPosition=new t.Vector2(r,i)}}])},35705,e=>{"use strict";class t{}t.KEYDOWN=1,t.KEYUP=2;class s{constructor(e,t){this.type=e,this.event=t}}e.s(["KeyboardEventTypes",0,t,"KeyboardInfo",0,s,"KeyboardInfoPre",0,class extends s{get skipOnPointerObservable(){return this.skipOnKeyboardObservable}set skipOnPointerObservable(e){this.skipOnKeyboardObservable=e}constructor(e,t){super(e,t),this.type=e,this.event=t,this.skipOnKeyboardObservable=!1}}])},21056,e=>{"use strict";var t,s;(s=t||(t={}))[s.PointerMove=0]="PointerMove",s[s.PointerDown=1]="PointerDown",s[s.PointerUp=2]="PointerUp";class r{}r.DOM_DELTA_PIXEL=0,r.DOM_DELTA_LINE=1,r.DOM_DELTA_PAGE=2,e.s(["EventConstants",0,r])},25974,e=>{"use strict";var t=e.i(95410),s=e.i(57135);class r extends s.Material{constructor(e,s,r=!0,i=!1){super(e,s,void 0,i),this._normalMatrix=new t.Matrix,this._storeEffectOnSubMeshes=r}getEffect(){return this._storeEffectOnSubMeshes?this._activeEffect:super.getEffect()}isReady(e,t){return!!e&&(!this._storeEffectOnSubMeshes||!e.subMeshes||0===e.subMeshes.length||this.isReadyForSubMesh(e,e.subMeshes[0],t))}_isReadyForSubMesh(e){let t=e.materialDefines;return!this.checkReadyOnEveryCall&&!!e.effect&&!!t&&t._renderId===this.getScene().getRenderId()}bindOnlyWorldMatrix(e){this._activeEffect.setMatrix("world",e)}bindOnlyNormalMatrix(e){this._activeEffect.setMatrix("normalMatrix",e)}bind(e,t){t&&this.bindForSubMesh(e,t,t.subMeshes[0])}_afterBind(e,t=null,s){super._afterBind(e,t,s),this.getScene()._cachedEffect=t,s?s._drawWrapper._forceRebindOnNextCall=!1:this._drawWrapper._forceRebindOnNextCall=!1}_mustRebind(e,t,s,r=1){return s._drawWrapper._forceRebindOnNextCall||e.isCachedMaterialInvalid(this,t,r)}dispose(e,t,s){this._activeEffect=void 0,super.dispose(e,t,s)}}e.s(["PushMaterial",0,r])},69914,e=>{"use strict";e.s(["EffectFallbacks",0,class{constructor(){this._defines={},this._currentRank=32,this._maxRank=-1,this._mesh=null}unBindMesh(){this._mesh=null}addFallback(e,t){this._defines[e]||(e<this._currentRank&&(this._currentRank=e),e>this._maxRank&&(this._maxRank=e),this._defines[e]=[]),this._defines[e].push(t)}addCPUSkinningFallback(e,t){this._mesh=t,e<this._currentRank&&(this._currentRank=e),e>this._maxRank&&(this._maxRank=e)}get hasMoreFallbacks(){return this._currentRank<=this._maxRank}reduce(e,t){if(this._mesh&&this._mesh.computeBonesUsingShaders&&this._mesh.numBoneInfluencers>0){this._mesh.computeBonesUsingShaders=!1,e=e.replace("#define NUM_BONE_INFLUENCERS "+this._mesh.numBoneInfluencers,"#define NUM_BONE_INFLUENCERS 0"),t._bonesComputationForcedToCPU=!0;let s=this._mesh.getScene();for(let e=0;e<s.meshes.length;e++){let r=s.meshes[e];if(!r.material){!this._mesh.material&&r.computeBonesUsingShaders&&r.numBoneInfluencers>0&&(r.computeBonesUsingShaders=!1);continue}if(r.computeBonesUsingShaders&&0!==r.numBoneInfluencers){if(r.material.getEffect()===t)r.computeBonesUsingShaders=!1;else if(r.subMeshes){for(let e of r.subMeshes)if(e.effect===t){r.computeBonesUsingShaders=!1;break}}}}}else{let t=this._defines[this._currentRank];if(t)for(let s=0;s<t.length;s++)e=e.replace("#define "+t[s],"");this._currentRank++}return e}}])},47899,e=>{"use strict";let t=new WeakMap;e.s(["BindVertexPullingUniforms",0,function(e,t){t.forEach((t,s)=>{let r=`vp_${s}_info`;e.setFloat4(r,t.offset,t.stride,t.type,+!!t.normalized)})},"PrepareVertexPullingUniforms",0,function(e){let s=e.getVertexBuffers();if(!s)return null;let r=t.get(e);if(r){let e=!1;for(let t in s)if(!r.has(t)){e=!0;break}if(!e)return r}else r=new Map,t.set(e,r);for(let e in s){let t=s[e];if(t){let s=t.byteOffset,i=t.byteStride,n=t.type,a=t.normalized;r.set(e,{offset:s,stride:i,type:n,normalized:a})}}return r}])}]);