@uptimizr/dashboard 0.3.4 → 0.3.6

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 (314) hide show
  1. package/out/404.html +1 -1
  2. package/out/__next.__PAGE__.txt +4 -4
  3. package/out/__next._full.txt +10 -10
  4. package/out/__next._head.txt +4 -4
  5. package/out/__next._index.txt +3 -3
  6. package/out/__next._tree.txt +1 -1
  7. package/out/_next/static/chunks/{2h051-1hu4co_.js → 0-0hui1_v3h8b.js} +9 -9
  8. package/out/_next/static/chunks/{2dqg85hsevk3c.js → 0-tzsd_n-ywom.js} +4 -4
  9. package/out/_next/static/chunks/00g5suuoa-_wn.js +1 -0
  10. package/out/_next/static/chunks/00o9hr_3hd0r8.js +1 -0
  11. package/out/_next/static/chunks/{0jxklh_ayjd4b.js → 00xc-0pj7on2s.js} +12 -12
  12. package/out/_next/static/chunks/01fh3_bncbe5u.js +1 -0
  13. package/out/_next/static/chunks/01urdkl1j8o6l.js +1 -0
  14. package/out/_next/static/chunks/{2j-sax2xfdv7l.js → 026vw95s88gsy.js} +1 -1
  15. package/out/_next/static/chunks/02eui3ctddbd2.js +1 -0
  16. package/out/_next/static/chunks/{3kr1polwvt6o_.js → 03zip1uidm6x9.js} +1 -1
  17. package/out/_next/static/chunks/{3gi0f1kg72xsf.js → 04_3ri5emyfcu.js} +1 -1
  18. package/out/_next/static/chunks/04c4nksb5y9r-.js +1 -0
  19. package/out/_next/static/chunks/04g-l-_b4payc.js +1 -0
  20. package/out/_next/static/chunks/04j9pexbmysdy.js +1 -0
  21. package/out/_next/static/chunks/{1rcfy_gzean3n.js → 055baac5e-c2o.js} +1 -1
  22. package/out/_next/static/chunks/05bdni_jrobq1.js +1 -0
  23. package/out/_next/static/chunks/05o0tb8l_htmw.js +1 -0
  24. package/out/_next/static/chunks/{3d5yb9ybkz7hx.js → 05uqfgf-hh-p5.js} +1 -1
  25. package/out/_next/static/chunks/06f-0kw8s0mqo.js +3 -0
  26. package/out/_next/static/chunks/{18r387bj9iv0j.js → 077eo-0dhbxz-.js} +1 -1
  27. package/out/_next/static/chunks/{18k-0jn63_5ie.js → 07z6p262h5hgl.js} +1 -1
  28. package/out/_next/static/chunks/{08bm3ye5govev.js → 08m_4cihfmik8.js} +1 -1
  29. package/out/_next/static/chunks/08obqw64faj8j.js +1 -0
  30. package/out/_next/static/chunks/{2k4s5rt7-l8jr.js → 099ilz3dmm1jw.js} +1 -1
  31. package/out/_next/static/chunks/09ppu_k464q-n.js +1 -0
  32. package/out/_next/static/chunks/{1rne-b-ktit5c.js → 0av6n_6q6kzo3.js} +2 -2
  33. package/out/_next/static/chunks/0bgcaf2x51kms.js +1 -0
  34. package/out/_next/static/chunks/{0ptp4ne7j6yg6.js → 0bj_310rugcn1.js} +11 -11
  35. package/out/_next/static/chunks/0c5d3qn2mb3ew.js +1 -0
  36. package/out/_next/static/chunks/{2gtebfttq1v0o.js → 0dck67in84de0.js} +1 -1
  37. package/out/_next/static/chunks/0dg4wxz-6u5lo.js +1 -0
  38. package/out/_next/static/chunks/{2apt1vh-7rl2l.js → 0dva036n8ab62.js} +1 -1
  39. package/out/_next/static/chunks/{159u-hx80yfaw.js → 0erga_bzezbza.js} +1 -1
  40. package/out/_next/static/chunks/0f0-i105odxqd.js +1 -0
  41. package/out/_next/static/chunks/{1fvlbwp6r93wo.js → 0g2wngc6oe7fd.js} +24 -24
  42. package/out/_next/static/chunks/0gyeqz9pagssf.js +1 -0
  43. package/out/_next/static/chunks/0i82k-t0fbn8f.js +1 -0
  44. package/out/_next/static/chunks/0kzw45f61wm3j.js +1 -0
  45. package/out/_next/static/chunks/0l8bfa2xewq69.js +1 -0
  46. package/out/_next/static/chunks/{390fogn9oz13i.js → 0n-zml1gn0o1u.js} +1 -1
  47. package/out/_next/static/chunks/{44gsjajjdhf51.js → 0n92hec_jb_-_.js} +1 -1
  48. package/out/_next/static/chunks/{2s0dwzg7kq36n.js → 0okbyggxe6mx5.js} +1 -1
  49. package/out/_next/static/chunks/{0h-ohf4gntwtj.js → 0pv2wirx45e1m.js} +1 -1
  50. package/out/_next/static/chunks/0qxd_8t3nca36.js +1 -0
  51. package/out/_next/static/chunks/0s1jghzw8jufz.js +1 -0
  52. package/out/_next/static/chunks/{0ngai1_zxwsk8.js → 0s84ekz_f9ngx.js} +1 -1
  53. package/out/_next/static/chunks/{16d4a4iopj2if.js → 0t89-lfct-7m6.js} +5 -5
  54. package/out/_next/static/chunks/0ti58h622yo-_.js +2 -0
  55. package/out/_next/static/chunks/{29v8falcmjvev.js → 0tn-9w46cwydp.js} +32 -32
  56. package/out/_next/static/chunks/0u8yr4k1y6m2t.js +1 -0
  57. package/out/_next/static/chunks/0ubxyut5rr600.js +1 -0
  58. package/out/_next/static/chunks/{3_bzxvqtk1t53.js → 0uxdbfa8gv6tk.js} +12 -12
  59. package/out/_next/static/chunks/0vso09vdz38sr.js +1 -0
  60. package/out/_next/static/chunks/{0_tqu60oxaj7q.js → 0w-hm7g7trtjg.js} +1 -1
  61. package/out/_next/static/chunks/0wbw9h7rsis2r.js +1 -0
  62. package/out/_next/static/chunks/{3sbm1ak54_2ep.js → 0wq_9f98weoe3.js} +1 -1
  63. package/out/_next/static/chunks/0y4e49hpuucdi.js +1 -0
  64. package/out/_next/static/chunks/{0ioyy42h35hnd.js → 0yvevihll7sz-.js} +1 -1
  65. package/out/_next/static/chunks/{0zcdc17ie6lmh.js → 0zf26k6juhlzo.js} +50 -18
  66. package/out/_next/static/chunks/{3sg4zff4-h3t1.js → 1-b44873bjsdw.js} +1 -1
  67. package/out/_next/static/chunks/1-c3a1vnl8v1q.js +1 -0
  68. package/out/_next/static/chunks/1-xf86jgea22y.js +1 -0
  69. package/out/_next/static/chunks/10b0qqdnb_nox.js +1 -0
  70. package/out/_next/static/chunks/{2ib62lnqqaf4p.js → 11p92pnn5el0v.js} +1 -1
  71. package/out/_next/static/chunks/{06ljadw2-i91-.js → 12kdmh0h_mboy.js} +1 -1
  72. package/out/_next/static/chunks/141tngxsk32hq.js +1 -0
  73. package/out/_next/static/chunks/14ijcpo72av4r.js +1 -0
  74. package/out/_next/static/chunks/16hdip1drt8o-.js +1 -0
  75. package/out/_next/static/chunks/{3g5ae-38cepwm.js → 17aahvhpls1l7.js} +199 -199
  76. package/out/_next/static/chunks/{17d1isrw8gtnb.js → 18txc1wwwu9f9.js} +1 -1
  77. package/out/_next/static/chunks/{2716si10ouwu-.js → 18wa83g0qfh-b.js} +1 -1
  78. package/out/_next/static/chunks/19dp8nr4uygg2.js +5 -0
  79. package/out/_next/static/chunks/1_8acnu6_-qe-.js +1 -0
  80. package/out/_next/static/chunks/1__nujzr9e352.js +3 -0
  81. package/out/_next/static/chunks/1bmyq1b0by7ug.js +1 -0
  82. package/out/_next/static/chunks/{1wyr4at61q29n.js → 1ccn725by19i1.js} +1 -1
  83. package/out/_next/static/chunks/{0f_nv15a8q415.js → 1d1tpj9nm1nhf.js} +1 -1
  84. package/out/_next/static/chunks/1dfwa563iciz3.js +1 -0
  85. package/out/_next/static/chunks/1di5enkavl9vx.js +4 -0
  86. package/out/_next/static/chunks/{006nix8mv66z_.js → 1e_-_7biavwmb.js} +1 -1
  87. package/out/_next/static/chunks/{1y12bjsbq18_t.js → 1ephzzweysylq.js} +34 -34
  88. package/out/_next/static/chunks/1fwsjnd1y-lx_.js +1 -0
  89. package/out/_next/static/chunks/{2z9ot-w1x60fv.js → 1fyh50hjt7hi_.js} +1 -1
  90. package/out/_next/static/chunks/1gaexq_suxai0.js +1 -0
  91. package/out/_next/static/chunks/1gtj_l5ame5mw.js +1 -0
  92. package/out/_next/static/chunks/{1--aypw9o8yng.js → 1gvdmbr65lpud.js} +39 -39
  93. package/out/_next/static/chunks/{02tc9r3sc7fgc.js → 1ho02fc091nj2.js} +1 -1
  94. package/out/_next/static/chunks/{3v0td-ziuai2i.js → 1hsvckd0sgdgr.js} +1 -1
  95. package/out/_next/static/chunks/1i4f3n_2_3ery.js +1 -0
  96. package/out/_next/static/chunks/1j7e3qpjuj89a.js +1 -0
  97. package/out/_next/static/chunks/{2btqzk0tj0gz6.js → 1mrvp94tietcv.js} +1 -1
  98. package/out/_next/static/chunks/{3vxkkhs0vi_xa.js → 1mvadj46owrck.js} +1 -1
  99. package/out/_next/static/chunks/{1b2tkk7e_2o0k.js → 1n_gxvu31aofy.js} +2 -2
  100. package/out/_next/static/chunks/{0gblbgw7w7r9w.js → 1nasz7q3tvb53.js} +1 -1
  101. package/out/_next/static/chunks/{2_7dp91937mqi.js → 1ng-fqh2_n984.js} +1 -1
  102. package/out/_next/static/chunks/{0x4-zyy8pzmlq.js → 1nqojcig-0m3c.js} +1 -1
  103. package/out/_next/static/chunks/1o3ggu95lfu6i.js +1 -0
  104. package/out/_next/static/chunks/{2dolerz81xb52.js → 1og49_atcksim.js} +1 -1
  105. package/out/_next/static/chunks/{0c2k-gvwph4qs.js → 1oljzgz5jistn.js} +1 -1
  106. package/out/_next/static/chunks/1ozi46t8jajqh.js +1 -0
  107. package/out/_next/static/chunks/{1w9xu1qa9-wmv.js → 1ph0tfo-4hl-f.js} +1 -1
  108. package/out/_next/static/chunks/{17dmbt396_tyq.js → 1qjsgebn9m-0l.js} +1 -1
  109. package/out/_next/static/chunks/{168r9r65o9jnc.js → 1qsut_e3msg0l.js} +1 -1
  110. package/out/_next/static/chunks/{3efuvh_35yhes.js → 1qxhgauuomthl.js} +39 -39
  111. package/out/_next/static/chunks/{2w7yf7ouyrlkb.js → 1rb8wewjbdisv.js} +1 -1
  112. package/out/_next/static/chunks/1rr74xxjtckyv.js +1 -0
  113. package/out/_next/static/chunks/{1kl5xxohpr6-4.js → 1solqr18og2ot.js} +1 -1
  114. package/out/_next/static/chunks/{2rjc8yn50ducj.js → 1t2exh89lnazc.js} +34 -34
  115. package/out/_next/static/chunks/{0_ux41xcoea3u.js → 1t7nl8rx7mabd.js} +40 -40
  116. package/out/_next/static/chunks/{3fx3sriw1w3sa.js → 1tt1bbry-4f-6.js} +1 -1
  117. package/out/_next/static/chunks/{0ufakw529sr9d.js → 1upkv4ltuh3s5.js} +40 -40
  118. package/out/_next/static/chunks/{2npk7tr63h7rl.js → 1uu55ejvi7q5u.js} +1 -1
  119. package/out/_next/static/chunks/{2cvvxifoedn6j.js → 1ux1rpe-n1mai.js} +1 -1
  120. package/out/_next/static/chunks/{091ll-lp6spu3.js → 1vmpltnr0cyos.js} +1 -1
  121. package/out/_next/static/chunks/1x99m91nt1m3b.js +1 -0
  122. package/out/_next/static/chunks/1xbzxfeq9789f.js +1 -0
  123. package/out/_next/static/chunks/1ybiu-rkt50_1.js +1 -0
  124. package/out/_next/static/chunks/{3y9c26fv1poq_.js → 2-hdejef-mpka.js} +199 -199
  125. package/out/_next/static/chunks/{22qzld31fbhbv.js → 2-p206i_ihx09.js} +1 -1
  126. package/out/_next/static/chunks/{340pg0qkv5tqq.js → 20qelrstvz9_n.js} +1 -1
  127. package/out/_next/static/chunks/21at65obnoo8z.js +1 -0
  128. package/out/_next/static/chunks/21ko5mxfderw0.js +1 -0
  129. package/out/_next/static/chunks/21muzwu43o8xg.js +1 -0
  130. package/out/_next/static/chunks/{3he9bxsc67ivq.js → 22ja7c3gk0_ko.js} +1 -1
  131. package/out/_next/static/chunks/{0mqi0xn_c010j.js → 22rl_arnzs-ve.js} +1 -1
  132. package/out/_next/static/chunks/23d-hvrwpixpm.js +1 -0
  133. package/out/_next/static/chunks/{2yzui3v-besdu.js → 255knovck7pv2.js} +4 -4
  134. package/out/_next/static/chunks/2569rrrffvm2w.js +31 -0
  135. package/out/_next/static/chunks/{229mkx-mtfcgf.js → 25gf6xn9u1c57.js} +1 -1
  136. package/out/_next/static/chunks/{2vmybybb3dvia.js → 267q_eg-c6f6m.js} +1 -1
  137. package/out/_next/static/chunks/{0e7xuupmrw4-e.js → 28ndw4nsw2t_4.js} +1 -1
  138. package/out/_next/static/chunks/{0m3yjobjg36ce.js → 29gv2swsp7tzu.js} +1 -1
  139. package/out/_next/static/chunks/29o74k0d6hkdf.js +1 -0
  140. package/out/_next/static/chunks/{0kr-bd6fuqc2s.js → 2bm95r0011asw.js} +1 -1
  141. package/out/_next/static/chunks/2btabnibkm0db.js +1 -0
  142. package/out/_next/static/chunks/2c--awgkdcikq.js +1 -0
  143. package/out/_next/static/chunks/{2ab-99frxpah-.js → 2c2dspoukng-5.js} +1 -1
  144. package/out/_next/static/chunks/{0zo4x1j8ug-kb.js → 2e46-2ubc90do.js} +5 -5
  145. package/out/_next/static/chunks/2ep7mjbaoeou0.js +1 -0
  146. package/out/_next/static/chunks/{1kq86iv41cet4.js → 2ezgqm7atphi6.js} +1 -1
  147. package/out/_next/static/chunks/{1bv97vf67p_ri.js → 2ftp5xmq_w23j.js} +35 -35
  148. package/out/_next/static/chunks/{38g9jpxjoxn2x.js → 2g_1ov-0j2kwd.js} +1 -1
  149. package/out/_next/static/chunks/2gfjzq_vjea4w.js +1 -0
  150. package/out/_next/static/chunks/{1tdg_eolxlcdl.js → 2h5hase6ewoyc.js} +1 -1
  151. package/out/_next/static/chunks/{0m0n7kjzscx0y.js → 2h5nvlgky7fpa.js} +1 -1
  152. package/out/_next/static/chunks/{17dabmbnkkplu.js → 2i82rmjta9ijs.js} +1 -1
  153. package/out/_next/static/chunks/2ies66gmou203.js +1 -0
  154. package/out/_next/static/chunks/2jenu2eek9viz.js +1 -0
  155. package/out/_next/static/chunks/{3043pprgv9ors.js → 2khh_pmm224k5.js} +23 -23
  156. package/out/_next/static/chunks/2kv9_bt15v83g.js +1 -0
  157. package/out/_next/static/chunks/{0msckddycfy76.js → 2luaj_cf5f19-.js} +1 -1
  158. package/out/_next/static/chunks/2mgmvz66gh5ub.js +1 -0
  159. package/out/_next/static/chunks/2nwlqtv3vrzcv.js +1 -0
  160. package/out/_next/static/chunks/{18ss4ls60s31e.js → 2o8k8x5zcepfy.js} +1 -1
  161. package/out/_next/static/chunks/{1e1zozntzsx42.js → 2pbgsq7vvtk8_.js} +1 -1
  162. package/out/_next/static/chunks/{0b7-mrrg7ryj2.js → 2pcdnd4nzcw4c.js} +1 -1
  163. package/out/_next/static/chunks/2q0rz76kj6h5z.js +1 -0
  164. package/out/_next/static/chunks/{3w1a2o8nevap8.js → 2rjfrjhp4kjev.js} +18 -18
  165. package/out/_next/static/chunks/2si5cg3hl5dtf.js +4 -0
  166. package/out/_next/static/chunks/2uhrhq35bki6u.js +1 -0
  167. package/out/_next/static/chunks/{1l12hkz1g7uhf.js → 2ymtumj-hfrjo.js} +1 -1
  168. package/out/_next/static/chunks/{2yr9wt421xdjr.js → 2z9mdtudj8crz.js} +17 -17
  169. package/out/_next/static/chunks/{1iaxzjly2pap1.js → 2zdzgmacaoor9.js} +1 -1
  170. package/out/_next/static/chunks/{0mk8tangq9equ.js → 2zpn7010iqgsy.js} +1 -1
  171. package/out/_next/static/chunks/2zyjw8g4tiu51.js +1 -0
  172. package/out/_next/static/chunks/{2kn_dqzbyabtn.js → 3-_08i4_7yhno.js} +1 -1
  173. package/out/_next/static/chunks/3-irhmtm1q5qw.js +1 -0
  174. package/out/_next/static/chunks/3-k74vn9exnb6.js +1 -0
  175. package/out/_next/static/chunks/{18avgwx9nlxp9.js → 3-x7522okdy-7.js} +1 -1
  176. package/out/_next/static/chunks/{1ll0ta8a2qx1p.js → 309f81l5ucsb_.js} +16 -16
  177. package/out/_next/static/chunks/{1f1vq3goue1w4.js → 31ei992g8gqz9.js} +1 -1
  178. package/out/_next/static/chunks/{0i9oqg-xbq-a9.js → 32vaw89wdwv5_.js} +1 -1
  179. package/out/_next/static/chunks/34y7nx6qmat06.js +1 -0
  180. package/out/_next/static/chunks/{1f92k-xa0pl-3.js → 35aagg46wp139.js} +1 -1
  181. package/out/_next/static/chunks/36rqw8h6ildpl.js +1 -0
  182. package/out/_next/static/chunks/{0zwkmsojeuekb.js → 380ivzcfb4o_3.js} +4 -4
  183. package/out/_next/static/chunks/{01aeari2x_tlz.js → 3a_khw6q6pyh1.js} +1 -1
  184. package/out/_next/static/chunks/3c_31f20z4jrl.js +1 -0
  185. package/out/_next/static/chunks/3ckp70rgr63u9.js +1 -0
  186. package/out/_next/static/chunks/{08rk1dp1wb-gm.js → 3d76e_yd8l_0x.js} +38 -38
  187. package/out/_next/static/chunks/{2p8dbh81chhon.js → 3ed24zmt8qfys.js} +1 -1
  188. package/out/_next/static/chunks/3ez20hi1mxw0w.js +1 -0
  189. package/out/_next/static/chunks/3fdx-rnos5ft-.js +1 -0
  190. package/out/_next/static/chunks/3fgfbxxb-j_bn.js +4 -0
  191. package/out/_next/static/chunks/{03st_hmor6qju.js → 3go-mst7n3udd.js} +1 -1
  192. package/out/_next/static/chunks/{3d0ejsnhbzi-j.js → 3gyyjsot8mdav.js} +1 -1
  193. package/out/_next/static/chunks/{2t9zu9v_g9kr9.js → 3iwf5yeurp57i.js} +3 -3
  194. package/out/_next/static/chunks/{0rruvj1cyflrh.js → 3k-gz8qf-mj-p.js} +1 -1
  195. package/out/_next/static/chunks/{2enlv4yy0t-9j.js → 3kalvwsf11-ss.js} +12 -12
  196. package/out/_next/static/chunks/3lehc5pujwhsz.js +1 -0
  197. package/out/_next/static/chunks/{05l3dluxivcor.js → 3m0ytnc241yfz.js} +1 -1
  198. package/out/_next/static/chunks/3mpe7c3iyxn5h.js +1 -0
  199. package/out/_next/static/chunks/{0tl8j9f8lt0yf.js → 3mvaub8qjdyuc.js} +1 -1
  200. package/out/_next/static/chunks/{0k79ryqehst0b.js → 3n-7bcmfbh299.js} +48 -18
  201. package/out/_next/static/chunks/{38ea9kqlbxt86.js → 3nw7u4bie0-g6.js} +1 -1
  202. package/out/_next/static/chunks/3qatb38-tk_gd.js +1 -0
  203. package/out/_next/static/chunks/3tdcdi_utmoy_.js +1 -0
  204. package/out/_next/static/chunks/{3x6wpv_z5m6rz.js → 3tdzweqszru4y.js} +1 -1
  205. package/out/_next/static/chunks/3tt_ir_va6262.js +1 -0
  206. package/out/_next/static/chunks/{39lxb7c--3_2u.js → 3w4qettzp7khe.js} +32 -32
  207. package/out/_next/static/chunks/{2op88btas-hl8.js → 3w_umk1xtj6to.js} +1 -1
  208. package/out/_next/static/chunks/{1kmsg9ef5djl3.js → 3y_51bmdnc0ey.js} +1 -1
  209. package/out/_next/static/chunks/{1ajmblsp0wj0_.js → 3yr66ufoli71t.js} +1 -1
  210. package/out/_next/static/chunks/{348hdbpkkcq_2.js → 3z4suna4kq4j5.js} +20 -20
  211. package/out/_next/static/chunks/{1y20bv6vl4ylk.js → 41qxc142snm22.js} +1 -1
  212. package/out/_next/static/chunks/{404f_93w2e8ty.js → 41yy4p3-rtyz1.js} +1 -1
  213. package/out/_next/static/chunks/{3fz7tc-4j13uv.js → 425epvuw3yy-n.js} +21 -21
  214. package/out/_next/static/chunks/{1t60cososq7b0.js → 43hwl25uke0l_.js} +1 -1
  215. package/out/_next/static/chunks/43qmngblcab8f.js +1 -0
  216. package/out/_next/static/chunks/{2bn9u9r0rfhvc.js → 442e2l3jzxd-_.js} +1 -1
  217. package/out/_next/static/chunks/{turbopack-16ab30_1p4vhq.js → turbopack-3r8yn0j92tqw_.js} +1 -1
  218. package/out/_not-found/__next._full.txt +8 -8
  219. package/out/_not-found/__next._head.txt +4 -4
  220. package/out/_not-found/__next._index.txt +3 -3
  221. package/out/_not-found/__next._not-found.__PAGE__.txt +2 -2
  222. package/out/_not-found/__next._not-found.txt +3 -3
  223. package/out/_not-found/__next._tree.txt +1 -1
  224. package/out/_not-found.html +1 -1
  225. package/out/_not-found.txt +8 -8
  226. package/out/index.html +1 -1
  227. package/out/index.txt +10 -10
  228. package/package.json +10 -10
  229. package/out/_next/static/chunks/0-29qf-q72olu.js +0 -1
  230. package/out/_next/static/chunks/0-tk5ptli--r0.js +0 -1
  231. package/out/_next/static/chunks/0296l8lzd69ns.js +0 -1
  232. package/out/_next/static/chunks/04pk6n3z75dcy.js +0 -1
  233. package/out/_next/static/chunks/06m_64ysu9kn0.js +0 -1
  234. package/out/_next/static/chunks/09p5fltt7o3to.js +0 -1
  235. package/out/_next/static/chunks/0fxfsshoxnnh6.js +0 -4
  236. package/out/_next/static/chunks/0g6u34xkzrpjn.js +0 -1
  237. package/out/_next/static/chunks/0g7p8zp2kxve5.js +0 -1
  238. package/out/_next/static/chunks/0gwa154w_0wuh.js +0 -1
  239. package/out/_next/static/chunks/0h1o0cr3327tt.js +0 -1
  240. package/out/_next/static/chunks/0jf3n5n5yrr4o.js +0 -1
  241. package/out/_next/static/chunks/0k9-8s-jof_gw.js +0 -1
  242. package/out/_next/static/chunks/0kcbdjbdxu_wa.js +0 -1
  243. package/out/_next/static/chunks/0l3wwyl93sqh9.js +0 -1
  244. package/out/_next/static/chunks/0ngiuj5k-or6g.js +0 -1
  245. package/out/_next/static/chunks/0nx_t8iq-324h.js +0 -1
  246. package/out/_next/static/chunks/0oap0o8a8a_cl.js +0 -1
  247. package/out/_next/static/chunks/0ostjlqtwkhqr.js +0 -1
  248. package/out/_next/static/chunks/0vddljjnmozzx.js +0 -1
  249. package/out/_next/static/chunks/0w0sx062qmcsh.js +0 -1
  250. package/out/_next/static/chunks/0x6i6e6863tir.js +0 -1
  251. package/out/_next/static/chunks/1--kelnig7pxx.js +0 -1
  252. package/out/_next/static/chunks/1-ud6hztxiazp.js +0 -1
  253. package/out/_next/static/chunks/10v4rskkrjgd_.js +0 -1
  254. package/out/_next/static/chunks/117ys3lltfmcu.js +0 -1
  255. package/out/_next/static/chunks/13oqt2aoms4f6.js +0 -1
  256. package/out/_next/static/chunks/14klj_i6-l-10.js +0 -1
  257. package/out/_next/static/chunks/17ev44x54_jrd.js +0 -1
  258. package/out/_next/static/chunks/17svumd4o0qnc.js +0 -1
  259. package/out/_next/static/chunks/17v12p4sfraa0.js +0 -1
  260. package/out/_next/static/chunks/1a7cup181rjod.js +0 -1
  261. package/out/_next/static/chunks/1ek5rtpo6rxev.js +0 -1
  262. package/out/_next/static/chunks/1evp209qbr4cr.js +0 -5
  263. package/out/_next/static/chunks/1fa265388524p.js +0 -1
  264. package/out/_next/static/chunks/1g3z43o3h-024.js +0 -31
  265. package/out/_next/static/chunks/1g_27texazqcj.js +0 -1
  266. package/out/_next/static/chunks/1j--a56ji33_x.js +0 -1
  267. package/out/_next/static/chunks/1oara6fkfvgs3.js +0 -1
  268. package/out/_next/static/chunks/1par9m038tiov.js +0 -1
  269. package/out/_next/static/chunks/1vkww9l6lgqag.js +0 -1
  270. package/out/_next/static/chunks/1vpcaaf-0dn7q.js +0 -1
  271. package/out/_next/static/chunks/1vzmzrjhlm1q5.js +0 -1
  272. package/out/_next/static/chunks/1zcrrq1fx8g2y.js +0 -4
  273. package/out/_next/static/chunks/245h82k-g1nxr.js +0 -1
  274. package/out/_next/static/chunks/24cqjhy669845.js +0 -1
  275. package/out/_next/static/chunks/259xlbe69b9tc.js +0 -1
  276. package/out/_next/static/chunks/25ctnyh7njp-d.js +0 -4
  277. package/out/_next/static/chunks/286ggpetqnwyo.js +0 -3
  278. package/out/_next/static/chunks/28f1onw3nywbz.js +0 -1
  279. package/out/_next/static/chunks/28ycc-1519hl2.js +0 -1
  280. package/out/_next/static/chunks/2dhv35o59yzao.js +0 -1
  281. package/out/_next/static/chunks/2ey30qeaob985.js +0 -1
  282. package/out/_next/static/chunks/2f0r-df7tb3pu.js +0 -1
  283. package/out/_next/static/chunks/2gh4z57fem0_v.js +0 -1
  284. package/out/_next/static/chunks/2h1uw3cluvmmo.js +0 -1
  285. package/out/_next/static/chunks/2kje_jvmwsvwo.js +0 -1
  286. package/out/_next/static/chunks/2l_oqx9idxcs8.js +0 -1
  287. package/out/_next/static/chunks/2reukv9c7cq_9.js +0 -1
  288. package/out/_next/static/chunks/2vaoftqgc44cg.js +0 -1
  289. package/out/_next/static/chunks/2y75diyxqlhzl.js +0 -1
  290. package/out/_next/static/chunks/2zljunurdji0q.js +0 -1
  291. package/out/_next/static/chunks/34gp3hvr3j6um.js +0 -1
  292. package/out/_next/static/chunks/34rcp8qrbp522.js +0 -3
  293. package/out/_next/static/chunks/38wksra3d_k-4.js +0 -1
  294. package/out/_next/static/chunks/3ajhvedcs_lzb.js +0 -1
  295. package/out/_next/static/chunks/3bsvp8qhjqdu0.js +0 -1
  296. package/out/_next/static/chunks/3g4e2txsrb2p2.js +0 -1
  297. package/out/_next/static/chunks/3g_h_00xs9u59.js +0 -1
  298. package/out/_next/static/chunks/3hr-mlwi78nov.js +0 -1
  299. package/out/_next/static/chunks/3l6t8b3addlw7.js +0 -1
  300. package/out/_next/static/chunks/3mwoauxszd3mn.js +0 -1
  301. package/out/_next/static/chunks/3ovd8o_usay7j.js +0 -1
  302. package/out/_next/static/chunks/3pdpaqzwhhijn.js +0 -1
  303. package/out/_next/static/chunks/3pyggl13glbdc.js +0 -1
  304. package/out/_next/static/chunks/3rl45k759wfi1.js +0 -1
  305. package/out/_next/static/chunks/3urd7r018nel4.js +0 -1
  306. package/out/_next/static/chunks/3vaho-xrtuchd.js +0 -2
  307. package/out/_next/static/chunks/3wqs57qehored.js +0 -1
  308. package/out/_next/static/chunks/40acif2eh_unv.js +0 -1
  309. package/out/_next/static/chunks/413o2v11bygt5.js +0 -1
  310. package/out/_next/static/chunks/4227p7752rnny.js +0 -1
  311. package/out/_next/static/chunks/42oyfkhdvb-u3.js +0 -1
  312. /package/out/_next/static/{M5esRfAVlWSeBcfLV_jVr → yF_tmb8VExvESewet-_To}/_buildManifest.js +0 -0
  313. /package/out/_next/static/{M5esRfAVlWSeBcfLV_jVr → yF_tmb8VExvESewet-_To}/_clientMiddlewareManifest.js +0 -0
  314. /package/out/_next/static/{M5esRfAVlWSeBcfLV_jVr → yF_tmb8VExvESewet-_To}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,2348,2413,e=>{"use strict";let t=1/1.2;e.s(["ZOOM_IN_FACTOR",0,t,"ZOOM_OUT_FACTOR",0,1.2,"attachDoubleClickFocus",0,function(e,t,n){let a=()=>{let t=e.pick(e.pointerX,e.pointerY);t?.hit&&t.pickedPoint&&n.setTarget(t.pickedPoint)};return t.addEventListener("dblclick",a),()=>t.removeEventListener("dblclick",a)},"disableWheelZoom",0,function(e){e.inputs.removeByType("ArcRotateCameraMouseWheelInput")},"resetFocus",0,function(e,t){e.setTarget(t.target),e.alpha=t.alpha,e.beta=t.beta,e.radius=t.radius},"stepZoom",0,function(e,t){let n=e.lowerRadiusLimit??.01,a=e.upperRadiusLimit??1/0;e.radius=Math.min(a,Math.max(n,e.radius*t))}],2348);var n=e.i(28100);e.s(["ZoomButtons",0,function({onZoom:e,onReset:a}){let r="grid h-8 w-8 place-items-center rounded-md border border-edge bg-ink/80 text-lg leading-none text-fg backdrop-blur transition hover:bg-ink hover:text-white";return(0,n.jsxs)("div",{className:"absolute right-3 top-3 flex flex-col gap-1",children:[(0,n.jsx)("button",{type:"button","aria-label":"Zoom in",className:r,onClick:()=>e(t),children:"+"}),(0,n.jsx)("button",{type:"button","aria-label":"Zoom out",className:r,onClick:()=>e(1.2),children:"−"}),a?(0,n.jsx)("button",{type:"button","aria-label":"Reset camera focus to center",title:"Reset focus to center",className:r,onClick:a,children:(0,n.jsxs)("svg",{viewBox:"0 0 16 16",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round","aria-hidden":"true",children:[(0,n.jsx)("circle",{cx:"8",cy:"8",r:"3"}),(0,n.jsx)("path",{d:"M8 1v2.5M8 12.5V15M1 8h2.5M12.5 8H15"})]})}):null]})}],2413)},25476,e=>{"use strict";e.s(["attachMeshHover",0,function(e,t,n){let a=0,r=null,s=t=>{let s=t.offsetX,l=t.offsetY;a||(a=requestAnimationFrame(()=>{var t,i;let o;a=0;let c=e.pick(s,l,e=>e.isPickable&&e.isEnabled()),u=c?.pickedMesh?(t=c.pickedMesh,i=c.thinInstanceIndex??-1,(o=t.metadata)?i>=0&&o.hoverLabels?o.hoverLabels[i]??null:o.hoverLabel??null:null):null;u?n({label:u,x:s,y:l}):null!==r&&n(null),r=u}))},l=()=>{a&&(cancelAnimationFrame(a),a=0),null!==r&&(r=null,n(null))};return t.addEventListener("pointermove",s),t.addEventListener("pointerleave",l),()=>{t.removeEventListener("pointermove",s),t.removeEventListener("pointerleave",l),a&&cancelAnimationFrame(a)}}])},48939,e=>{"use strict";var t=e.i(28100),n=e.i(11623);function a(e){return Number.isNaN(e)||e<0?0:e>1?1:e}function r(e){let t=a(e),n=[[0,.1,.9],[0,.85,1],[.1,.9,.2],[1,.85,0],[1,.15,0],[1,1,1]],r=n.length-1,s=t*r,l=Math.min(Math.floor(s),r-1),i=s-l,o=n[l],c=n[l+1];return o&&c?[o[0]+(c[0]-o[0])*i,o[1]+(c[1]-o[1])*i,o[2]+(c[2]-o[2])*i]:[1,1,1]}var s=e.i(56054),l=e.i(2348),i=e.i(25476),o=e.i(18637),c=e.i(2413);e.s(["CameraDome3DView",0,function({bins:u,gridSize:h}){let d=(0,n.useRef)(null),m=(0,n.useRef)(null),p=(0,n.useRef)(null),[f,b]=(0,n.useState)("loading"),[g,x]=(0,n.useState)(null),[v,w]=(0,n.useState)("markers"),[k,j]=(0,n.useState)(null),y=(0,n.useRef)(u),M=(0,n.useRef)(h),z=(0,n.useRef)(v);y.current=u,M.current=h,z.current=v;let C=(0,n.useRef)(null),_=u.length>0;return(0,n.useEffect)(()=>{let t=d.current;if(!t)return;if(!_)return void b("empty");let n=!1,o=null;return b("loading"),x(null),(async()=>{try{let[{Engine:c},{Scene:u},{ArcRotateCamera:h},{HemisphericLight:d},{Vector3:f,Color3:g,Color4:x,Matrix:v},{MeshBuilder:w},{StandardMaterial:k},{Mesh:_},{DynamicTexture:A}]=await Promise.all([e.A(3905),e.A(94432),e.A(59694),e.A(88004),e.A(27940),e.A(27124),e.A(14074),e.A(2213),e.A(15002),e.A(35983),e.A(18561)]);if(n)return;let L=new c(t,!0,{preserveDrawingBuffer:!1}),I=new u(L);I.clearColor=new x(.04,.05,.07,1);let S=f.Zero(),R=new h("dome-cam",Math.PI/3,Math.PI/2.4,3.6,S,I);R.attachControl(t,!0),R.lowerRadiusLimit=1.6,R.upperRadiusLimit=8,(0,l.disableWheelZoom)(R),m.current=R,p.current={target:S,alpha:R.alpha,beta:R.beta,radius:R.radius},new d("dome-light",new f(.3,1,.2),I);let E=w.CreateSphere("dome",{diameter:2,segments:20},I),P=new k("dome-mat",I);P.wireframe=!0,P.disableLighting=!0,P.emissiveColor=new g(.16,.2,.28),P.alpha=.5,E.material=P,E.isPickable=!1;let $=[];for(let e=0;e<=64;e++){let t=e/64*Math.PI*2;$.push(new f(Math.cos(t),0,Math.sin(t)))}let T=w.CreateLines("dome-horizon",{points:$},I);T.color=new g(.3,.36,.46),T.isPickable=!1;let B=w.CreateLines("dome-forward",{points:[f.Zero(),new f(1.25,0,0)]},I);B.color=new g(.4,.7,.95),B.isPickable=!1;let N=[],F=()=>{for(let e of N)e.dispose(!1,!0);N=[];let e=y.current;if(0===e.length)return;let t=e.reduce((e,t)=>Math.max(e,t.count),1),n=M.current>0?M.current:1;if("markers"===z.current){let a=w.CreateBox("dome-marker",{size:1},I),r=new k("dome-marker-mat",I);r.disableLighting=!0,r.emissiveColor=g.White(),r.specularColor=new g(0,0,0),a.material=r,a.isPickable=!0,a.thinInstanceEnablePicking=!0;let l=e.length,i=new Float32Array(16*l),o=new Float32Array(4*l),c=Array(l);for(let a=0;a<l;a++){let r=e[a],l=(r.azimuth_bin+.5)/n*Math.PI*2-Math.PI,u=(r.elevation_bin+.5)/n*Math.PI-Math.PI/2,h=Math.cos(u),d=h*Math.cos(l),m=Math.sin(u),p=h*Math.sin(l),f=r.count/t,b=.03+.12*f;v.Scaling(b,b,b).multiply(v.Translation(d,m,p)).copyToArray(i,16*a);let[g,x,w]=(0,s.heatRgb)(f);o[4*a]=g,o[4*a+1]=x,o[4*a+2]=w,o[4*a+3]=1,c[a]=`dir (${r.azimuth_bin}, ${r.elevation_bin}) \xb7 ${r.count}`}a.thinInstanceSetBuffer("matrix",i,16,!0),a.thinInstanceSetBuffer("color",o,4,!0),a.metadata={hoverLabels:c},N.push(a)}else{let t=function(e,t={}){let n=void 0!==t.width&&t.width>0?Math.floor(t.width):256,s=void 0!==t.height&&t.height>0?Math.floor(t.height):Math.max(1,Math.floor(n/2)),l=t.colorRamp??r,i=void 0!==t.blurBins&&t.blurBins>0?t.blurBins:1.5,o=a(t.alphaFloor??0),c=a(t.opacity??1),u=e.gridSize>0?e.gridSize:1,h=new Uint8ClampedArray(n*s*4),d=e.bins.filter(e=>e.count>0);if(0===d.length)return{width:n,height:s,rgba:h};let m=Math.max(1e-4,Math.PI/u*i),p=2*m*m,f=Math.cos(Math.min(Math.PI,3*m)),b=d.map(e=>{var t,n;let a,[r,s]=(t=e.azimuthBin,n=e.elevationBin,[(t+.5)/u*Math.PI*2-Math.PI,(n+.5)/u*Math.PI-Math.PI/2]);return[(a=Math.cos(s))*Math.cos(r),Math.sin(s),a*Math.sin(r)]}),g=new Float32Array(n*s),x=0;for(let e=0;e<s;e++){let t=Math.PI/2-(e+.5)/s*Math.PI,a=Math.cos(t),r=Math.sin(t);for(let t=0;t<n;t++){let s=(t+.5)/n*Math.PI*2-Math.PI,l=a*Math.cos(s),i=a*Math.sin(s),o=0;for(let e=0;e<d.length;e++){let t=b[e],n=l*t[0]+r*t[1]+i*t[2];if(n<f)continue;let a=Math.acos(n>1?1:n<-1?-1:n);o+=d[e].count*Math.exp(-(a*a)/p)}g[e*n+t]=o,o>x&&(x=o)}}if(x<=0)return{width:n,height:s,rgba:h};for(let e=0;e<g.length;e++){let t=a(g[e]/x),[n,r,s]=l(t),i=(o+(1-o)*t)*c,u=4*e;h[u]=Math.round(255*n),h[u+1]=Math.round(255*r),h[u+2]=Math.round(255*s),h[u+3]=Math.round(255*a(i))}return{width:n,height:s,rgba:h}}({bins:e.map(e=>({azimuthBin:e.azimuth_bin,elevationBin:e.elevation_bin,count:e.count})),gridSize:n},{width:256,blurBins:1.5,opacity:.95}),s=new A("dome-skytex",{width:t.width,height:t.height},I,!1);s.hasAlpha=!0;let l=s.getContext(),i=l.createImageData(t.width,t.height);i.data.set(t.rgba),l.putImageData(i,0,0),s.update();let o=w.CreateSphere("dome-sky",{diameter:2,segments:48,sideOrientation:_.DOUBLESIDE},I),c=new k("dome-sky-mat",I);c.disableLighting=!0,c.emissiveColor=g.White(),c.diffuseColor=new g(0,0,0),c.specularColor=new g(0,0,0),c.emissiveTexture=s,c.opacityTexture=s,c.backFaceCulling=!1,o.material=c,o.isPickable=!1,N.push(o)}};C.current=F,F(),L.runRenderLoop(()=>I.render());let q=()=>L.resize();window.addEventListener("resize",q);let D=(0,i.attachMeshHover)(I,t,j),O=(0,l.attachDoubleClickFocus)(I,t,R);b("ready"),o=()=>{window.removeEventListener("resize",q),D(),O(),j(null),C.current=null,m.current=null,p.current=null,I.dispose(),L.dispose()}}catch(e){if(n)return;b("error"),x(e instanceof Error?e.message:"Failed to render dome.")}})(),()=>{n=!0,o?.()}},[_]),(0,n.useEffect)(()=>{C.current?.()},[u,h,v]),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("canvas",{ref:d,className:"aspect-video w-full rounded-lg border border-edge bg-ink"}),k?(0,t.jsx)("div",{className:"pointer-events-none absolute z-10 max-w-[16rem] truncate rounded border border-edge bg-ink/90 px-1.5 py-0.5 text-xs text-white shadow backdrop-blur",style:{left:k.x+12,top:k.y+12},children:k.label}):null,"ready"===f?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"absolute left-3 top-3 flex overflow-hidden rounded-md border border-edge bg-ink/80 text-xs backdrop-blur",children:["markers","skydome"].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>w(e),className:`px-2.5 py-1 ${v===e?"bg-fg/15 font-medium text-white":"text-fg-muted hover:text-fg"}`,children:"markers"===e?"Markers":"Skydome"},e))}),(0,t.jsx)(c.ZoomButtons,{onZoom:e=>m.current&&(0,l.stepZoom)(m.current,e),onReset:()=>m.current&&p.current&&(0,l.resetFocus)(m.current,p.current)}),(0,t.jsx)(o.HeatLegend,{title:"Gaze density",lowLabel:"rarely",highLabel:"most-viewed",note:"markers"===v?"Each marker is a look-direction (camera forward). Blue line = forward, ring = horizon. Color & size scale with how often that direction was viewed.":"Continuous equirectangular heat field: the same gaze bins splatted into a smooth thermal texture wrapped on the dome. The in-scene SDK overlay (showGazeSkydome) renders this inward so you can stand inside it in WebXR."})]}):(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center text-sm text-fg-muted",children:"loading"===f?"Rendering…":"empty"===f?"No camera samples in range.":"error"===f?g??"Dome unavailable.":null})]})}],48939)},53993,e=>{"use strict";var t=e.i(28100),n=e.i(11623),a=e.i(56054),r=e.i(2348),s=e.i(25476),l=e.i(18637),i=e.i(2413);function o({shape:e,onChange:n}){let a=e=>`h-8 px-2.5 text-xs font-medium leading-none transition first:rounded-l-md last:rounded-r-md ${e?"bg-ink text-white":"bg-ink/80 text-fg hover:text-white"}`,r="sphere"===e,s="cube"===e;return(0,t.jsxs)("div",{className:"absolute left-3 top-3 flex overflow-hidden rounded-md border border-edge backdrop-blur",role:"group","aria-label":"Voxel marker shape",children:[(0,t.jsx)("button",{type:"button",className:a(r),"aria-pressed":r,onClick:()=>n("sphere"),children:"Spheres"}),(0,t.jsx)("button",{type:"button",className:a(s),"aria-pressed":s,onClick:()=>n("cube"),children:"Cubes"})]})}e.s(["WorldHeatmap3DView",0,function({voxels:c,cellSize:u,proxyMeshes:h=[],legendTitle:d="Pointer-hit density",legendLow:m="few hits",legendHigh:p="most hits",legendNote:f="Each marker is a voxel where the pointer hit your scene. Color & size scale with hits, normalized to the 95th-percentile cell so a few hotspots don't wash out the rest.",emptyLabel:b="No 3D hit-points in range.",totals:g,voxelLabels:x}){let v=(0,n.useRef)(null),w=(0,n.useRef)(null),k=(0,n.useRef)(null),[j,y]=(0,n.useState)("loading"),[M,z]=(0,n.useState)(null),[C,_]=(0,n.useState)("sphere"),[A,L]=(0,n.useState)(null),I=(0,n.useRef)(c),S=(0,n.useRef)(h),R=(0,n.useRef)(x);I.current=c,S.current=h,R.current=x;let E=(0,n.useRef)(null),P=c.length>0||h.length>0;(0,n.useEffect)(()=>{let t=v.current;if(!t)return;if(!P)return void y("empty");let n=!1,l=null;return y("loading"),z(null),(async()=>{try{let[{Engine:i},{Scene:o},{ArcRotateCamera:c},{HemisphericLight:h},{Vector3:d,Color3:m,Color4:p,Matrix:f},{MeshBuilder:b},{StandardMaterial:g}]=await Promise.all([e.A(3905),e.A(94432),e.A(59694),e.A(88004),e.A(27940),e.A(27124),e.A(14074),e.A(35983),e.A(18561)]);if(n)return;let x=I.current,v=S.current,j=0,M=0,z=0,_=0;for(let e of x)j+=(e.vx+.5)*u,M+=(e.vy+.5)*u,z+=(e.vz+.5)*u,_++;if(0===_)for(let e of v)j+=(e.aabb[0]+e.aabb[3])/2,M+=(e.aabb[1]+e.aabb[4])/2,z+=(e.aabb[2]+e.aabb[5])/2,_++;let A=new d(j/_,M/_,z/_),P=4*u;for(let e of x){let t=(e.vx+.5)*u-A.x,n=(e.vy+.5)*u-A.y,a=(e.vz+.5)*u-A.z;P=Math.max(P,Math.sqrt(t*t+n*n+a*a))}for(let e of v){let t=(e.aabb[0]+e.aabb[3])/2-A.x,n=(e.aabb[1]+e.aabb[4])/2-A.y,a=(e.aabb[2]+e.aabb[5])/2-A.z;P=Math.max(P,Math.sqrt(t*t+n*n+a*a))}let $=new i(t,!0,{preserveDrawingBuffer:!1}),T=new o($);T.clearColor=new p(.04,.05,.07,1);let B=new c("world-cam",Math.PI/4,Math.PI/3,2.4*P,A,T);B.attachControl(t,!0),(0,r.disableWheelZoom)(B),w.current=B,k.current={target:A,alpha:B.alpha,beta:B.beta,radius:B.radius},new h("world-light",new d(.4,1,.3),T);let N=Math.max(.02*P,.25*u)/(.9*u),F=B.radius,q="cube"===C?b.CreateBox("world-voxel",{size:.9*u},T):b.CreateSphere("world-voxel",{diameter:.9*u,segments:6},T),D=new g("world-voxel-mat",T);D.diffuseColor=new m(1,1,1),D.specularColor=new m(0,0,0),q.material=D;let O=0,Z=new Float32Array(0),V=new Float32Array(0),W=-1,H=()=>{if(0===O)return;let e=Math.min(8,Math.max(.6,B.radius/F));if(!(.01>Math.abs(e-W))){W=e;for(let t=0;t<O;t++){let n=V[t]*e,a=16*t;Z[a]=n,Z[a+5]=n,Z[a+10]=n}q.thinInstanceBufferUpdated("matrix")}};T.onBeforeRenderObservable.add(H);let K=null,U="\0",G=()=>{(()=>{let e=S.current,t=e.map(e=>`${e.name}:${e.aabb.join(",")}`).join("|");if(t===U||(U=t,K&&(K.dispose(!1,!0),K=null),0===e.length))return;K=b.CreateBox("scene-proxy",{size:1},T);let n=new g("scene-proxy-mat",T);n.wireframe=!0,n.disableLighting=!0,n.emissiveColor=new m(.32,.4,.52),n.alpha=.35,K.material=n,K.isPickable=!0,K.thinInstanceEnablePicking=!0,K.metadata={hoverLabels:e.map(e=>e.name)};let a=e.length,r=new Float32Array(16*a);for(let t=0;t<a;t++){let n=e[t].aabb,a=Math.max(n[3]-n[0],.001),s=Math.max(n[4]-n[1],.001),l=Math.max(n[5]-n[2],.001);f.Scaling(a,s,l).multiply(f.Translation((n[0]+n[3])/2,(n[1]+n[4])/2,(n[2]+n[5])/2)).copyToArray(r,16*t)}K.thinInstanceSetBuffer("matrix",r,16,!0)})(),(()=>{let e=I.current,t=R.current,n=e.length;if(0===n){O=0,q.isVisible=!1;return}let r=(0,a.percentileMax)(e.map(e=>e.count),.95),s=new Float32Array(16*n),l=new Float32Array(4*n),i=new Float32Array(n);for(let t=0;t<n;t++){let n=e[t],o=Math.min(1,n.count/r),c=N*(.5+.5*o);i[t]=c,f.Scaling(c,c,c).multiply(f.Translation((n.vx+.5)*u,(n.vy+.5)*u,(n.vz+.5)*u)).copyToArray(s,16*t);let[h,d,m]=(0,a.heatRgb)(o);l[4*t]=h,l[4*t+1]=d,l[4*t+2]=m,l[4*t+3]=1}O=n,Z=s,V=i,q.isVisible=!0,q.isPickable=!!t,q.thinInstanceEnablePicking=!!t,q.metadata=t?{hoverLabels:t}:null,q.thinInstanceSetBuffer("matrix",Z,16,!1),q.thinInstanceSetBuffer("color",l,4,!0),W=-1,H()})()};E.current=G,G(),$.runRenderLoop(()=>T.render());let Y=()=>$.resize();window.addEventListener("resize",Y);let X=(0,s.attachMeshHover)(T,t,L),J=(0,r.attachDoubleClickFocus)(T,t,B);y("ready"),l=()=>{window.removeEventListener("resize",Y),X(),J(),L(null),E.current=null,w.current=null,k.current=null,T.dispose(),$.dispose()}}catch(e){if(n)return;y("error"),z(e instanceof Error?e.message:"Failed to render heatmap.")}})(),()=>{n=!0,l?.()}},[C,u,P]),(0,n.useEffect)(()=>{E.current?.()},[c,h,x]);let $=g?g.cells>c.length?` Showing the ${c.length.toLocaleString()} busiest of ${g.cells.toLocaleString()} occupied cells (${g.hits.toLocaleString()} total hits).`:` ${g.cells.toLocaleString()} occupied cells, ${g.hits.toLocaleString()} total hits.`:"";return(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("canvas",{ref:v,className:"aspect-video w-full rounded-lg border border-edge bg-ink"}),A?(0,t.jsx)("div",{className:"pointer-events-none absolute z-10 max-w-[16rem] truncate rounded border border-edge bg-ink/90 px-1.5 py-0.5 text-xs text-white shadow backdrop-blur",style:{left:A.x+12,top:A.y+12},children:A.label}):null,"ready"===j?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o,{shape:C,onChange:_}),(0,t.jsx)(i.ZoomButtons,{onZoom:e=>w.current&&(0,r.stepZoom)(w.current,e),onReset:()=>w.current&&k.current&&(0,r.resetFocus)(w.current,k.current)}),(0,t.jsx)(l.HeatLegend,{title:d,lowLabel:m,highLabel:p,note:f+$})]}):(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center text-sm text-fg-muted",children:"loading"===j?"Rendering…":"empty"===j?b:"error"===j?M??"Heatmap unavailable.":null})]})}])},39592,e=>{"use strict";var t=e.i(28100),n=e.i(11623),a=e.i(56054),r=e.i(2348),s=e.i(25476),l=e.i(2413);function i(e){let t=Math.min(1,Math.max(0,e));return[.118+(.22-.118)*t,.227+.513*t,.541+(.97-.541)*t]}function o(e){return`${e.vx}|${e.vy}|${e.vz}`}function c({mode:e}){return(0,t.jsxs)("div",{className:"absolute bottom-3 right-3 max-w-72 rounded-md border border-edge bg-ink/80 px-2 py-1.5 text-xs text-fg backdrop-blur",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"inline-block h-2.5 w-2.5 rounded-sm bg-[#38bdf8]"}),"divergence"===e?"Gaze-heavy":"Gaze"]}),(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"inline-block h-2.5 w-2.5 rounded-sm bg-[#f4c84b]"}),"divergence"===e?"Click-heavy":"Clicks"]})]}),(0,t.jsx)("p",{className:"mt-1 text-fg-muted",children:"divergence"===e?"Per-voxel normalized difference: which signal dominates each cell. Color & size scale with the gap.":"Gaze = where viewers looked; Clicks = where they acted. Cells with gaze but no clicks are looked-at but un-acted-on."})]})}function u({active:e,onClick:n,children:a}){return(0,t.jsx)("button",{type:"button",onClick:n,className:`rounded px-2 py-0.5 font-medium transition ${e?"bg-amber text-ink":"text-fg-muted hover:text-fg"}`,children:a})}e.s(["GazeClickDivergence3DView",0,function({gazeVoxels:h,clickVoxels:d,cellSize:m,proxyMeshes:p=[]}){let f=(0,n.useRef)(null),b=(0,n.useRef)(null),g=(0,n.useRef)(null),[x,v]=(0,n.useState)("loading"),[w,k]=(0,n.useState)(null),[j,y]=(0,n.useState)("overlay"),[M,z]=(0,n.useState)(null),C=(0,n.useRef)(h),_=(0,n.useRef)(d),A=(0,n.useRef)(p),L=(0,n.useRef)(j);C.current=h,_.current=d,A.current=p,L.current=j;let I=(0,n.useRef)(null),S=h.length>0||d.length>0||p.length>0;return(0,n.useEffect)(()=>{let t=f.current;if(!t)return;if(!S)return void v("empty");let n=!1,l=null;return v("loading"),k(null),(async()=>{try{let[{Engine:c},{Scene:u},{ArcRotateCamera:h},{HemisphericLight:d},{Vector3:p,Color3:f,Color4:x,Matrix:w},{MeshBuilder:k},{StandardMaterial:j}]=await Promise.all([e.A(3905),e.A(94432),e.A(59694),e.A(88004),e.A(27940),e.A(27124),e.A(14074),e.A(35983),e.A(18561)]);if(n)return;let y=C.current,M=_.current,S=A.current,R=[...y,...M],E=0,P=0,$=0,T=0;for(let e of R)E+=(e.vx+.5)*m,P+=(e.vy+.5)*m,$+=(e.vz+.5)*m,T++;if(0===T)for(let e of S)E+=(e.aabb[0]+e.aabb[3])/2,P+=(e.aabb[1]+e.aabb[4])/2,$+=(e.aabb[2]+e.aabb[5])/2,T++;let B=new p(E/T,P/T,$/T),N=4*m;for(let e of R){let t=(e.vx+.5)*m-B.x,n=(e.vy+.5)*m-B.y,a=(e.vz+.5)*m-B.z;N=Math.max(N,Math.sqrt(t*t+n*n+a*a))}for(let e of S){let t=(e.aabb[0]+e.aabb[3])/2-B.x,n=(e.aabb[1]+e.aabb[4])/2-B.y,a=(e.aabb[2]+e.aabb[5])/2-B.z;N=Math.max(N,Math.sqrt(t*t+n*n+a*a))}let F=new c(t,!0,{preserveDrawingBuffer:!1}),q=new u(F);q.clearColor=new x(.04,.05,.07,1);let D=new h("divergence-cam",Math.PI/4,Math.PI/3,2.4*N,B,q);D.attachControl(t,!0),(0,r.disableWheelZoom)(D),b.current=D,g.current={target:B,alpha:D.alpha,beta:D.beta,radius:D.radius},new d("divergence-light",new p(.4,1,.3),q);let O=null,Z="\0",V=Math.max(.02*N,.25*m)/(.9*m),W=[],H=(e,t,n,a,r)=>{if(0===t.length)return;let s=k.CreateSphere(e,{diameter:.9*m,segments:6},q),l=new j(`${e}-mat`,q);l.diffuseColor=new f(1,1,1),l.specularColor=new f(0,0,0),s.material=l,s.metadata={hoverLabel:r},W.push(s);let i=t.length,o=new Float32Array(16*i),c=new Float32Array(4*i);for(let e=0;e<i;e++){let r=t[e],s=r.count/n,l=V*(.5+.5*s);w.Scaling(l,l,l).multiply(w.Translation((r.vx+.5)*m,(r.vy+.5)*m,(r.vz+.5)*m)).copyToArray(o,16*e);let[i,u,h]=a(s);c[4*e]=i,c[4*e+1]=u,c[4*e+2]=h,c[4*e+3]=1}s.thinInstanceSetBuffer("matrix",o,16,!1),s.thinInstanceSetBuffer("color",c,4,!0)},K=()=>{for(let e of((()=>{let e=A.current,t=e.map(e=>`${e.name}:${e.aabb.join(",")}`).join("|");if(t===Z||(Z=t,O&&(O.dispose(!1,!0),O=null),0===e.length))return;O=k.CreateBox("scene-proxy",{size:1},q);let n=new j("scene-proxy-mat",q);n.wireframe=!0,n.disableLighting=!0,n.emissiveColor=new f(.32,.4,.52),n.alpha=.35,O.material=n,O.isPickable=!0,O.thinInstanceEnablePicking=!0,O.metadata={hoverLabels:e.map(e=>e.name)};let a=e.length,r=new Float32Array(16*a);for(let t=0;t<a;t++){let n=e[t].aabb,a=Math.max(n[3]-n[0],.001),s=Math.max(n[4]-n[1],.001),l=Math.max(n[5]-n[2],.001);w.Scaling(a,s,l).multiply(w.Translation((n[0]+n[3])/2,(n[1]+n[4])/2,(n[2]+n[5])/2)).copyToArray(r,16*t)}O.thinInstanceSetBuffer("matrix",r,16,!0)})(),W))e.dispose(!1,!0);W=[];let e=C.current,t=_.current,n=e.reduce((e,t)=>Math.max(e,t.count),1),r=t.reduce((e,t)=>Math.max(e,t.count),1),s=L.current;if("divergence"===s){let s=new Map(e.map(e=>[o(e),e])),l=new Map(t.map(e=>[o(e),e])),c=new Set([...s.keys(),...l.keys()]),u=[],h=[];for(let e of c){let t=(s.get(e)?.count??0)/n,a=(l.get(e)?.count??0)/r,i=l.get(e)??s.get(e),o=a-t,c={vx:i.vx,vy:i.vy,vz:i.vz,count:1e3*Math.abs(o)};(o>=0?u:h).push(c)}H("div-click",u,1e3,a.heatRgb,"Click-heavy"),H("div-gaze",h,1e3,i,"Gaze-heavy")}else("overlay"===s||"gaze"===s)&&H("gaze-voxel",e,n,i,"Gaze"),("overlay"===s||"click"===s)&&H("click-voxel",t,r,a.heatRgb,"Click")};I.current=K,K(),F.runRenderLoop(()=>q.render());let U=()=>F.resize();window.addEventListener("resize",U);let G=(0,s.attachMeshHover)(q,t,z),Y=(0,r.attachDoubleClickFocus)(q,t,D);v("ready"),l=()=>{window.removeEventListener("resize",U),G(),Y(),z(null),I.current=null,b.current=null,g.current=null,q.dispose(),F.dispose()}}catch(e){if(n)return;v("error"),k(e instanceof Error?e.message:"Failed to render overlay.")}})(),()=>{n=!0,l?.()}},[S,m]),(0,n.useEffect)(()=>{I.current?.()},[h,d,p,m,j]),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("canvas",{ref:f,className:"aspect-video w-full rounded-lg border border-edge bg-ink"}),M?(0,t.jsx)("div",{className:"pointer-events-none absolute z-10 max-w-64 truncate rounded border border-edge bg-ink/90 px-1.5 py-0.5 text-xs text-white shadow backdrop-blur",style:{left:M.x+12,top:M.y+12},children:M.label}):null,"ready"===x?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"absolute left-3 top-3 flex items-center gap-1 rounded-md border border-edge bg-ink/80 p-0.5 text-xs backdrop-blur",children:[(0,t.jsx)(u,{active:"overlay"===j,onClick:()=>y("overlay"),children:"Overlay"}),(0,t.jsx)(u,{active:"gaze"===j,onClick:()=>y("gaze"),children:"Gaze"}),(0,t.jsx)(u,{active:"click"===j,onClick:()=>y("click"),children:"Clicks"}),(0,t.jsx)(u,{active:"divergence"===j,onClick:()=>y("divergence"),children:"Divergence"})]}),(0,t.jsx)(l.ZoomButtons,{onZoom:e=>b.current&&(0,r.stepZoom)(b.current,e),onReset:()=>b.current&&g.current&&(0,r.resetFocus)(b.current,g.current)}),(0,t.jsx)(c,{mode:j})]}):(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center text-sm text-fg-muted",children:"loading"===x?"Rendering…":"empty"===x?"No gaze or click hit-points in range. Enable gaze + pointer capture in the SDK.":"error"===x?w??"Overlay unavailable.":null})]})}])},19399,e=>{"use strict";var t=e.i(28100),n=e.i(11623),a=e.i(20880);let r="__other_sp__",s="__other_mesh__";function l(e){return`${e[0]}|${e[1]}|${e[2]}`}function i(e,t){return t<=1?0:1.4-e/(t-1)*2.8}var o=e.i(56054),c=e.i(2348),u=e.i(25476),h=e.i(18637),d=e.i(2413);let m="__all__",p={maxStandpoints:6,maxMeshes:10,maxRibbons:70};function f(e,t){return`${e}|${t}`}function b(e){let t=e.aabb;return[(t[0]+t[3])/2,(t[1]+t[4])/2,(t[2]+t[5])/2]}function g(e){let t=0;for(let n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Math.abs(t)}function x({label:e,value:n,onChange:a,allLabel:r,options:s}){return(0,t.jsxs)("label",{className:"flex items-center gap-1.5 rounded-md border border-edge bg-ink/80 px-2 py-1 text-xs text-fg backdrop-blur",children:[(0,t.jsx)("span",{className:"font-medium text-fg-muted",children:e}),(0,t.jsxs)("select",{className:"max-w-[12rem] bg-transparent text-white outline-none",value:n,onChange:e=>a(e.target.value),children:[(0,t.jsx)("option",{value:m,children:r}),s.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))]})]})}function v({active:e,onClick:n,children:a,disabled:r=!1,title:s}){return(0,t.jsx)("button",{type:"button",onClick:n,disabled:r,title:s,className:`rounded px-2 py-0.5 font-medium transition ${r?"cursor-not-allowed text-fg-muted/40":e?"bg-amber text-ink":"text-fg-muted hover:text-fg"}`,children:a})}function w({standpoints:e,proxyMeshes:a,selectedKey:r,onSelect:s}){let l=(0,n.useRef)(null),i=(0,n.useMemo)(()=>e.filter(e=>e.origin),[e]),o=(0,n.useMemo)(()=>{let e=1/0,t=-1/0,n=1/0,r=-1/0,s=(a,s)=>{e=Math.min(e,a),t=Math.max(t,a),n=Math.min(n,s),r=Math.max(r,s)};for(let e of a)s(e.aabb[0],e.aabb[2]),s(e.aabb[3],e.aabb[5]);for(let e of i)s(e.origin[0],e.origin[2]);return Number.isFinite(e)?(t-e<.001&&(e-=1,t+=1),r-n<.001&&(n-=1,r+=1),{minX:e,maxX:t,minZ:n,maxZ:r}):{minX:-1,maxX:1,minZ:-1,maxZ:1}},[a,i]),c=(0,n.useMemo)(()=>{let e=Math.min(134/(o.maxX-o.minX),94/(o.maxZ-o.minZ));return(t,n)=>[8+(t-o.minX)*e,8+(n-o.minZ)*e]},[o]),u=(0,n.useMemo)(()=>i.reduce((e,t)=>Math.max(e,t.count),1),[i]);return(0,n.useEffect)(()=>{let e=l.current,t=e?.getContext("2d");if(!t)return;let n=window.devicePixelRatio||1;for(let r of(e.width=150*n,e.height=110*n,t.setTransform(n,0,0,n,0,0),t.clearRect(0,0,150,110),t.fillStyle="rgba(8,10,14,0.85)",t.fillRect(0,0,150,110),t.strokeStyle="rgba(120,140,170,0.35)",t.lineWidth=1,a)){let[e,n]=c(r.aabb[0],r.aabb[2]),[a,s]=c(r.aabb[3],r.aabb[5]);t.strokeRect(Math.min(e,a),Math.min(n,s),Math.abs(a-e),Math.abs(s-n))}for(let e of i){let[n,a]=c(e.origin[0],e.origin[2]),s=2+e.count/u*4,l=e.key===r;t.beginPath(),t.arc(n,a,s,0,2*Math.PI),t.fillStyle=l?"rgba(242,115,242,1)":"rgba(242,115,242,0.55)",t.fill(),l&&(t.beginPath(),t.arc(n,a,s+2.5,0,2*Math.PI),t.strokeStyle="rgba(255,255,255,0.9)",t.lineWidth=1.5,t.stroke())}},[a,i,c,u,r]),(0,t.jsxs)("div",{className:"absolute right-3 top-3 rounded-md border border-edge bg-ink/80 p-1 backdrop-blur",children:[(0,t.jsx)("div",{className:"px-1 pb-0.5 text-[10px] font-medium text-fg-muted",children:"Standpoints (top view)"}),(0,t.jsx)("canvas",{ref:l,className:"h-27.5 w-37.5 cursor-pointer rounded",onClick:e=>{let t=l.current;if(!t||0===i.length)return;let n=t.getBoundingClientRect(),a=(e.clientX-n.left)/n.width*150,r=(e.clientY-n.top)/n.height*110,o=null,u=1/0;for(let e of i){let[t,n]=c(e.origin[0],e.origin[2]),s=(t-a)**2+(n-r)**2;s<u&&(u=s,o=e)}o&&u<=196&&s(o.key)}})]})}e.s(["FlowSankey3DView",0,function({links:k,gridSize:j,proxyMeshes:y=[],maxLinks:M=80,baseUrl:z,apiKey:C,flowQuery:_,hasFirstPerson:A=!1}){let L=(0,n.useRef)(null),I=(0,n.useRef)(null),S=(0,n.useRef)(null),[R,E]=(0,n.useState)("loading"),[P,$]=(0,n.useState)(null),[T,B]=(0,n.useState)(m),[N,F]=(0,n.useState)(m),[q,D]=(0,n.useState)(m),[O,Z]=(0,n.useState)("aggregate"),[V,W]=(0,n.useState)(null),[H,K]=(0,n.useState)("all"),[U,G]=(0,n.useState)(k),Y=!!(z&&_),X=(0,n.useMemo)(()=>_?JSON.stringify(_):"",[_]),J=(0,n.useRef)(!1);(0,n.useEffect)(()=>{!J.current&&A&&(K("first-person"),J.current=!0)},[A]),(0,n.useEffect)(()=>{A&&"viewer"===H&&K("first-person")},[A,H]),(0,n.useEffect)(()=>{Y||G(k)},[k,Y]),(0,n.useEffect)(()=>{if(!z||!_)return;let e=!1,t=new a.CollectorApi(z,C??""),n="all"===H?void 0:H;return t.flowHeatmap({..._,bins:j,limit:400,groupByOrigin:!0,cameraMode:n}).then(t=>{e||G(t)}).catch(()=>{e||G([])}),()=>{e=!0}},[z,C,X,H,j]);let Q=(0,n.useMemo)(()=>{let e=new Map;for(let t of U){if(!t.originVoxel)continue;let n=l(t.originVoxel),a=t.origin,r=e.get(n);r?(r.count+=t.count,a&&(r.ox+=a[0]*t.count,r.oy+=a[1]*t.count,r.oz+=a[2]*t.count,r.wsum+=t.count)):e.set(n,{key:n,voxel:t.originVoxel,count:t.count,ox:a?a[0]*t.count:0,oy:a?a[1]*t.count:0,oz:a?a[2]*t.count:0,wsum:a?t.count:0})}return[...e.values()].map(e=>({key:e.key,voxel:e.voxel,count:e.count,origin:e.wsum>0?[e.ox/e.wsum,e.oy/e.wsum,e.oz/e.wsum]:void 0})).sort((e,t)=>t.count-e.count)},[U]),ee=Q.length>0,et=(0,n.useMemo)(()=>q===m?null:Q.find(e=>e.key===q)??null,[Q,q]),en=(0,n.useMemo)(()=>(function(e,t,n,a){let o=e.filter(e=>e.originVoxel);if(0===o.length)return{standpoints:[],gazes:[],meshes:[],ribbons:[],maxCount:1};let c=t.slice(0,Math.max(1,a.maxStandpoints)),u=new Set(c.map(e=>e.key)),h=e=>{let t=e.originVoxel?l(e.originVoxel):r;return u.has(t)?t:r},d=new Map;for(let e of o)d.set(e.mesh,(d.get(e.mesh)??0)+e.count);let m=new Set([...d.entries()].sort((e,t)=>t[1]-e[1]).slice(0,Math.max(1,a.maxMeshes)).map(([e])=>e)),p=e=>m.has(e)?e:s,f=new Map;for(let e of o){let t=h(e),n=p(e.mesh),a=`${t}|${e.azimuth_bin}|${e.elevation_bin}|${n}`,r=f.get(a);r?r.count+=e.count:f.set(a,{standpointId:t,gazeId:`${t}|${e.azimuth_bin}|${e.elevation_bin}`,meshId:n,azimuthBin:e.azimuth_bin,elevationBin:e.elevation_bin,count:e.count})}let b=[...f.values()].sort((e,t)=>t.count-e.count),g=b.slice(0,Math.max(1,a.maxRibbons)),x=b.slice(Math.max(1,a.maxRibbons));if(x.length>0){let e=new Map(g.map(e=>[`${e.standpointId}|${e.azimuthBin}|${e.elevationBin}|${s}`,e]));for(let t of x){let n=`${t.standpointId}|${t.azimuthBin}|${t.elevationBin}|${s}`,a=e.get(n);if(a)a.count+=t.count;else{let a={standpointId:t.standpointId,gazeId:t.gazeId,meshId:s,azimuthBin:t.azimuthBin,elevationBin:t.elevationBin,count:t.count};e.set(n,a),g.push(a)}}}let v=new Set(g.map(e=>e.standpointId)),w=new Set(g.map(e=>e.meshId)),k=[...c.filter(e=>v.has(e.key)).map(e=>e.key),...v.has(r)?[r]:[]],j=k.map((e,t)=>{let n=c.find(t=>t.key===e),a=g.filter(t=>t.standpointId===e).reduce((e,t)=>e+t.count,0);return{id:e,kind:"standpoint",pos:[-2.6,i(t,k.length),0],count:a,label:n?`[${n.voxel[0]}, ${n.voxel[1]}, ${n.voxel[2]}]`:"Other standpoints",isOther:e===r}}),y=new Map(j.map(e=>[e.id,e.pos[1]])),M=new Map;for(let e of g)M.set(e.meshId,(M.get(e.meshId)??0)+e.count);let z=[...w].sort((e,t)=>(M.get(t)??0)-(M.get(e)??0));z.sort((e,t)=>(e===s)-(t===s));let C=z.map((e,t)=>({id:e,kind:"mesh",pos:[2.6,i(t,z.length),0],count:M.get(e)??0,label:e===s?"Other meshes":e,isOther:e===s})),_=new Map;for(let e of g){let t=_.get(e.gazeId);t?t.count+=e.count:_.set(e.gazeId,{az:e.azimuthBin,el:e.elevationBin,sp:e.standpointId,count:e.count})}let A=[..._.entries()].map(([e,t])=>{let a=y.get(t.sp)??0,r=(t.az+.5)/n-.5;return{id:e,kind:"gaze",pos:[0,a+((t.el+.5)/n-.5)*.85,1.6*r],count:t.count,label:`(${t.az}, ${t.el})`,isOther:!1}}),L=g.reduce((e,t)=>Math.max(e,t.count),1);return{standpoints:j,gazes:A,meshes:C,ribbons:g,maxCount:L}})(U,Q,j,p),[U,Q,j]),ea="twostage"===O&&ee;(0,n.useEffect)(()=>{"twostage"!==O||ee||Z("aggregate")},[O,ee]);let er=(0,n.useMemo)(()=>{if(q!==m&&ee)return U.filter(e=>e.originVoxel&&l(e.originVoxel)===q);if(!ee)return U;let e=new Map;for(let t of U){let n=`${t.azimuth_bin}|${t.elevation_bin}|${t.mesh}`,a=e.get(n);a?a.count+=t.count:e.set(n,{azimuth_bin:t.azimuth_bin,elevation_bin:t.elevation_bin,mesh:t.mesh,count:t.count})}return[...e.values()]},[U,q,ee]),es=(0,n.useMemo)(()=>[...er].sort((e,t)=>t.count-e.count).slice(0,Math.max(1,M)),[er,M]),el=(0,n.useMemo)(()=>{let e=new Map;for(let t of es)e.set(t.mesh,(e.get(t.mesh)??0)+t.count);return[...e.entries()].sort((e,t)=>t[1]-e[1])},[es]),ei=(0,n.useMemo)(()=>{let e=new Map;for(let t of es){let n=f(t.azimuth_bin,t.elevation_bin),a=e.get(n);a?a.count+=t.count:e.set(n,{azimuthBin:t.azimuth_bin,elevationBin:t.elevation_bin,count:t.count})}return[...e.values()].sort((e,t)=>t.count-e.count)},[es]);(0,n.useEffect)(()=>{!ea&&T!==m&&(el.some(([e])=>e===T)||B(m))},[ea,T,el]),(0,n.useEffect)(()=>{!ea&&N!==m&&(ei.some(e=>f(e.azimuthBin,e.elevationBin)===N)||F(m))},[ea,N,ei]),(0,n.useEffect)(()=>{!ea&&q!==m&&(Q.some(e=>e.key===q)||D(m))},[ea,q,Q]),(0,n.useEffect)(()=>{B(m),F(m),D(m)},[O]);let eo=(0,n.useMemo)(()=>ea?en.ribbons.filter(e=>{let t=q===m||e.standpointId===q,n=N===m||f(e.azimuthBin,e.elevationBin)===N,a=T===m||e.meshId===T;return t&&n&&a}).length:es.filter(e=>{let t=N===m||f(e.azimuth_bin,e.elevation_bin)===N,n=T===m||e.mesh===T;return t&&n}).length,[ea,en,es,T,N,q]),ec=ea?en.ribbons.length:es.length,eu=(0,n.useMemo)(()=>ea?en.standpoints.map(e=>({value:e.id,label:`${e.label} \xb7 ${e.count}`})):Q.slice(0,24).map(e=>({value:e.key,label:`[${e.voxel[0]}, ${e.voxel[1]}, ${e.voxel[2]}] \xb7 ${e.count}`})),[ea,en,Q]),eh=(0,n.useMemo)(()=>{if(ea){let e=new Map;for(let t of en.ribbons){let n=f(t.azimuthBin,t.elevationBin),a=e.get(n);a?a.count+=t.count:e.set(n,{az:t.azimuthBin,el:t.elevationBin,count:t.count})}return[...e.values()].sort((e,t)=>t.count-e.count).map(e=>({value:f(e.az,e.el),label:`(${e.az}, ${e.el}) \xb7 ${e.count}`}))}return ei.map(e=>({value:f(e.azimuthBin,e.elevationBin),label:`(${e.azimuthBin}, ${e.elevationBin}) \xb7 ${e.count}`}))},[ea,en,ei]),ed=(0,n.useMemo)(()=>ea?en.meshes.map(e=>({value:e.id,label:`${e.label} \xb7 ${e.count}`})):el.map(([e,t])=>({value:e,label:`${e} \xb7 ${t}`})),[ea,en,el]),em=(0,n.useRef)(es);em.current=es;let ep=(0,n.useRef)(en);ep.current=en;let ef=(0,n.useRef)(y);ef.current=y;let eb=(0,n.useRef)(el);eb.current=el;let eg=(0,n.useRef)(T);eg.current=T;let ex=(0,n.useRef)(N);ex.current=N;let ev=(0,n.useRef)(q);ev.current=q;let ew=(0,n.useRef)(et);ew.current=et;let ek=(0,n.useRef)(null),ej=ea?en.ribbons.length>0:es.length>0;return(0,n.useEffect)(()=>{let t=L.current;if(!t)return;if(!ej)return void E("empty");let n=!1,a=null;return E("loading"),$(null),(async()=>{try{let r,[{Engine:s},{Scene:l},{ArcRotateCamera:i},{HemisphericLight:h},{Vector3:d,Color3:p,Color4:x},{MeshBuilder:v},{StandardMaterial:w}]=await Promise.all([e.A(3905),e.A(94432),e.A(59694),e.A(88004),e.A(27940),e.A(27124),e.A(14074),e.A(18561)]);if(n)return;let k=new s(t,!0,{preserveDrawingBuffer:!1}),y=new l(k);y.clearColor=new x(.04,.05,.07,1);let M=[],z=()=>{for(let e of M)e.dispose();M=[]};if(ea){let e=d.Zero();(r=new i("ts-cam",Math.PI/2,Math.PI/2.4,8.5,e,y)).attachControl(t,!0),(0,c.disableWheelZoom)(r),I.current=r,S.current={target:e,alpha:r.alpha,beta:r.beta,radius:r.radius},new h("ts-light",new d(.3,1,.2),y);let n={standpoint:[.95,.45,.95],gaze:[.45,.75,1],mesh:[1,.82,.42]},a={standpoint:.26,gaze:.13,mesh:.22},s=(e,t,n)=>{let a=e[0],r=e[1],s=e[2],l=t[0],i=t[1],o=t[2],c=[(a+l)/2,(r+i)/2+n,(s+o)/2],u=[];for(let e=0;e<=12;e++){let t=e/12,n=1-t;u.push(new d(n*n*a+2*n*t*c[0]+t*t*l,n*n*r+2*n*t*c[1]+t*t*i,n*n*s+2*n*t*c[2]+t*t*o))}return u},l=()=>{z();let e=ep.current;if(0===e.ribbons.length)return;let t=ev.current,r=ex.current,l=eg.current,i=e=>{let n=t===m||e.standpointId===t,a=r===m||f(e.azimuthBin,e.elevationBin)===r,s=l===m||e.meshId===l;return n&&a&&s},c=t!==m||r!==m||l!==m,u=new Set;for(let t of e.ribbons)i(t)&&(u.add(t.standpointId),u.add(t.gazeId),u.add(t.meshId));let h=[...e.standpoints,...e.gazes,...e.meshes],b=new Map(h.map(e=>[e.id,e.pos])),g=new Map(h.map(e=>[e.id,e.label]));for(let e of h){let t=v.CreateSphere(`ts-node-${e.kind}-${e.id}`,{diameter:a[e.kind],segments:8},y);t.position=new d(e.pos[0],e.pos[1],e.pos[2]);let r=new w(`ts-node-mat-${e.kind}-${e.id}`,y);r.disableLighting=!0;let[s,l,i]=n[e.kind];r.emissiveColor=new p(s,l,i),r.alpha=!c||u.has(e.id)?1:.2,t.material=r,t.isPickable=!0,t.metadata={hoverLabel:e.label},M.push(t,r)}for(let t of e.ribbons){let n=b.get(t.standpointId),a=b.get(t.gazeId),r=b.get(t.meshId);if(!n||!a||!r)continue;let l=t.count/e.maxCount,u=.18+.5*l,h=[...s(n,a,u),...s(a,r,u).slice(1)],d=i(t),[m,f,x]=(0,o.heatRgb)(l),k=v.CreateTube(`ts-link-${t.standpointId}-${t.gazeId}-${t.meshId}`,{path:h,radius:(d?1:.4)*(.012+.04*l),tessellation:8,cap:0,sideOrientation:0},y),j=new w(`ts-link-mat-${t.standpointId}-${t.gazeId}-${t.meshId}`,y);j.disableLighting=!0,j.emissiveColor=new p(m,f,x),j.alpha=d?.35+.65*l:c?.06:.18,k.material=j,k.isPickable=!0,k.metadata={hoverLabel:g.get(t.meshId)??t.meshId},M.push(k,j)}};ek.current=l,l()}else{let e=new Map;for(let t of ef.current)e.set(t.name,b(t));let n=new Map,a=eb.current.map(([e])=>e).filter(t=>!e.has(t));for(let e=0;e<a.length;e++){let t=a[e],r=g(t),s=e/Math.max(1,a.length)*Math.PI*2+r%100/100*.35;n.set(t,[2.2*Math.cos(s),-.35+(r%7-3)*.06,2.2*Math.sin(s)])}for(let[t,a]of e.entries())n.set(t,a);let s=0,l=0,u=0,x=0;for(let e of n.values())s+=e[0],l+=e[1],u+=e[2],x++;let k=new d(s/Math.max(1,x),l/Math.max(1,x),u/Math.max(1,x)),C=1.8;for(let e of n.values()){let t=e[0]-k.x,n=e[1]-k.y,a=e[2]-k.z;C=Math.max(C,Math.sqrt(t*t+n*n+a*a))}let _=.75*C+1,A=Math.max(1,C/1.8);(r=new i("flow-cam",Math.PI/4,Math.PI/3,3.4*C,k,y)).attachControl(t,!0),(0,c.disableWheelZoom)(r),I.current=r,S.current={target:k,alpha:r.alpha,beta:r.beta,radius:r.radius},new h("flow-light",new d(.3,1,.2),y);let L=v.CreateSphere("flow-source-dome",{diameter:2*_,segments:20},y);L.position=k;let R=new w("flow-source-dome-mat",y);R.wireframe=!0,R.disableLighting=!0,R.emissiveColor=new p(.16,.2,.28),R.alpha=.35,L.material=R,L.isPickable=!1;let E=()=>{z();let e=em.current;if(0===e.length)return;let t=eg.current,n=ex.current,a=ew.current,r=new Map;for(let e of ef.current)r.set(e.name,b(e));let s=new Map,l=eb.current.map(([e])=>e).filter(e=>!r.has(e));for(let e=0;e<l.length;e++){let t=l[e],n=g(t),a=e/Math.max(1,l.length)*Math.PI*2+n%100/100*.35;s.set(t,[2.2*Math.cos(a),-.35+(n%7-3)*.06,2.2*Math.sin(a)])}for(let[e,t]of r.entries())s.set(e,t);let i=e.reduce((e,t)=>Math.max(e,t.count),1),c=new w("flow-source-node",y);c.disableLighting=!0,c.emissiveColor=new p(.45,.75,1);let u=new w("flow-target-node",y);u.disableLighting=!0,u.emissiveColor=new p(1,.82,.42),M.push(c,u);let h=new Set,x=new Set,C=e=>{let a=n===m||f(e.azimuth_bin,e.elevation_bin)===n,r=t===m||e.mesh===t;return a&&r},L=new Set,I=new Set;for(let t of e)C(t)&&(L.add(f(t.azimuth_bin,t.elevation_bin)),I.add(t.mesh));for(let a of e){let e=`${a.azimuth_bin}|${a.elevation_bin}`,r=s.get(a.mesh);if(!r)continue;let l=C(a),f=(a.azimuth_bin+.5)/j*Math.PI*2-Math.PI,b=(a.elevation_bin+.5)/j*Math.PI-Math.PI/2,g=Math.cos(b),z=g*Math.cos(f),S=Math.sin(b),R=g*Math.sin(f),E=new d(k.x+z*_,k.y+S*_,k.z+R*_),P=new d(r[0],r[1],r[2]);if(!h.has(e)){let a=v.CreateSphere(`flow-src-${e}`,{diameter:.12*A,segments:6},y);a.position=E;let r=c.clone(`flow-src-mat-${e}`);r.alpha=L.has(e)||t===m&&n===m?1:.22,a.material=r,a.isPickable=!1,h.add(e),M.push(a,r)}if(!x.has(a.mesh)){let e=v.CreateSphere(`flow-target-${a.mesh}`,{diameter:.2*A,segments:7},y);e.position=P;let r=u.clone(`flow-target-mat-${a.mesh}`);r.alpha=I.has(a.mesh)||t===m&&n===m?1:.22,e.material=r,e.isPickable=!0,e.metadata={hoverLabel:a.mesh},x.add(a.mesh),M.push(e,r)}let $=E.add(P).scale(.5),T=$.subtract(k),B=Math.sqrt(T.x*T.x+T.y*T.y+T.z*T.z),N=B>1e-6?T.x/B:0,F=B>1e-6?T.y/B:1,q=B>1e-6?T.z/B:0,D=(.35+a.count/i*.75)*A,O=new d($.x+N*D,$.y+F*D+.12*A,$.z+q*D),Z=[];for(let e=0;e<=18;e++){let t=e/18,n=1-t;Z.push(new d(n*n*E.x+2*n*t*O.x+t*t*P.x,n*n*E.y+2*n*t*O.y+t*t*P.y,n*n*E.z+2*n*t*O.z+t*t*P.z))}let V=a.count/i,[W,H,K]=(0,o.heatRgb)(V),U=v.CreateTube(`flow-link-${a.mesh}-${e}`,{path:Z,radius:(l?1:.4)*(.012+.04*V)*A,tessellation:8,cap:0,sideOrientation:0},y),G=new w(`flow-link-mat-${a.mesh}-${e}`,y);G.disableLighting=!0,G.emissiveColor=new p(W,H,K),G.alpha=l?.35+.65*V:.08,U.material=G,U.isPickable=!0,U.metadata={hoverLabel:a.mesh},M.push(U,G)}let S=a?.origin;if(S){let e=new d(S[0],S[1],S[2]),t=v.CreateSphere("flow-standpoint",{diameter:.26*A,segments:10},y);t.position=e;let n=new w("flow-standpoint-mat",y);n.disableLighting=!0,n.emissiveColor=new p(.95,.45,.95),t.material=n,t.isPickable=!1;let a=v.CreateLines("flow-standpoint-stem",{points:[e,new d(e.x,k.y,e.z)]},y);a.color=new p(.95,.45,.95),a.isPickable=!1,M.push(t,n,a)}};ek.current=E,E()}k.runRenderLoop(()=>y.render());let C=()=>k.resize();window.addEventListener("resize",C);let _=(0,u.attachMeshHover)(y,t,W),A=(0,c.attachDoubleClickFocus)(y,t,r);E("ready"),a=()=>{window.removeEventListener("resize",C),_(),A(),W(null),ek.current=null,I.current=null,S.current=null,z(),y.dispose(),k.dispose()}}catch(e){if(n)return;E("error"),$(e instanceof Error?e.message:"Failed to render flow links.")}})(),()=>{n=!0,a?.()}},[ea,j,ej]),(0,n.useEffect)(()=>{ek.current?.()},[es,en,y,T,N,q,et]),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("canvas",{ref:L,className:"aspect-video w-full rounded-lg border border-edge bg-ink"}),V?(0,t.jsx)("div",{className:"pointer-events-none absolute z-10 max-w-[16rem] truncate rounded border border-edge bg-ink/90 px-1.5 py-0.5 text-xs text-white shadow backdrop-blur",style:{left:V.x+12,top:V.y+12},children:V.label}):null,"ready"===R?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"absolute left-3 top-3 flex flex-wrap gap-2",children:[ee?(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-md border border-edge bg-ink/80 p-0.5 text-xs backdrop-blur",children:[(0,t.jsx)(v,{active:!ea,onClick:()=>Z("aggregate"),children:"Aggregate"}),(0,t.jsx)(v,{active:ea,onClick:()=>Z("twostage"),children:"Two-stage"})]}):null,Y?(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-md border border-edge bg-ink/80 p-0.5 text-xs backdrop-blur",children:[(0,t.jsx)(v,{active:"first-person"===H,onClick:()=>K("first-person"),children:"Walk"}),(0,t.jsx)(v,{active:"viewer"===H,onClick:()=>K("viewer"),disabled:A,title:A?"Orbit (viewer) flow isn't available for walkable scenes":void 0,children:"Orbit"}),(0,t.jsx)(v,{active:"all"===H,onClick:()=>K("all"),children:"All"})]}):null,ee?(0,t.jsx)(x,{label:"Standpoint",value:q,onChange:D,allLabel:"All standpoints",options:eu}):null,(0,t.jsx)(x,{label:ea?"Gaze":"Source",value:N,onChange:F,allLabel:ea?"All gaze sectors":"All sources",options:eh}),(0,t.jsx)(x,{label:"Mesh",value:T,onChange:B,allLabel:"All meshes",options:ed})]}),ea?(0,t.jsx)(w,{standpoints:Q,proxyMeshes:y,selectedKey:q,onSelect:e=>D(t=>t===e?m:e)}):null,(0,t.jsxs)("div",{className:"pointer-events-none absolute bottom-3 right-3 flex max-w-[20rem] flex-col items-end gap-2",children:[Y&&!A?(0,t.jsxs)("div",{className:"rounded-md border border-edge bg-ink/80 px-2 py-1 text-xs text-fg-muted backdrop-blur",children:["Orbit-dominated scene — viewer ",(0,t.jsx)("em",{children:"position"})," adds little here. Use the"," ",(0,t.jsx)("strong",{children:"View dome"})," (§7.5) above for where viewers looked."]}):null,(0,t.jsxs)("div",{className:"rounded-md border border-edge bg-ink/80 px-2 py-1 text-xs text-fg backdrop-blur",children:["Active links: ",eo,"/",ec]})]}),(0,t.jsx)(d.ZoomButtons,{onZoom:e=>I.current&&(0,c.stepZoom)(I.current,e),onReset:()=>I.current&&S.current&&(0,c.resetFocus)(I.current,S.current)}),(0,t.jsx)(h.HeatLegend,{title:"Flow volume",lowLabel:"fewer links",highLabel:"dominant links",note:ea?"Three columns: standpoint → gaze sector → mesh. Top standpoints/meshes are kept; the tail folds into an “Other” node. Pick a standpoint (or click the minimap), gaze sector, or mesh to emphasize matching ribbons.":"Each arc aggregates clicks from one camera-direction bin to a mesh. Pick a source or mesh to emphasize matching links and dim the rest."})]}):(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center text-sm text-fg-muted",children:"loading"===R?"Rendering…":"empty"===R?"No aggregate flow links in range.":"error"===R?P??"Flow view unavailable.":null})]})}],19399)},64434,e=>{"use strict";e.s([],4255),e.i(4255);var t=e.i(48939),n=e.i(53993),a=e.i(19399),r=e.i(39592),s=e.i(28100),l=e.i(11623),i=e.i(56054),o=e.i(2348),c=e.i(25476),u=e.i(18637),h=e.i(2413);let d="__all__";function m(e){return`${e[0]},${e[1]},${e[2]}`}function p({label:e,value:t,onChange:n,allLabel:a,options:r}){return(0,s.jsxs)("label",{className:"flex items-center gap-1.5 rounded-md border border-edge bg-ink/80 px-2 py-1 text-xs text-fg backdrop-blur",children:[(0,s.jsx)("span",{className:"font-medium text-fg-muted",children:e}),(0,s.jsxs)("select",{className:"max-w-[12rem] bg-transparent text-white outline-none",value:t,onChange:e=>n(e.target.value),children:[(0,s.jsx)("option",{value:d,children:a}),r.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))]})]})}var f=e.i(37215);e.s(["CAMERA_DOME_SUBTITLE",()=>f.CAMERA_DOME_SUBTITLE,"CAMERA_DOME_TITLE",()=>f.CAMERA_DOME_TITLE,"CLICK_RAYS_SUBTITLE",()=>f.CLICK_RAYS_SUBTITLE,"CLICK_RAYS_TITLE",()=>f.CLICK_RAYS_TITLE,"CameraDome3DView",()=>t.CameraDome3DView,"ClickRays3DView",0,function({rays:t,cellSize:n,proxyMeshes:a=[]}){let r=(0,l.useRef)(null),f=(0,l.useRef)(null),b=(0,l.useRef)(null),[g,x]=(0,l.useState)("loading"),[v,w]=(0,l.useState)(null),[k,j]=(0,l.useState)(d),[y,M]=(0,l.useState)(d),[z,C]=(0,l.useState)(null),_=(0,l.useRef)(t),A=(0,l.useRef)(a),L=(0,l.useRef)(k),I=(0,l.useRef)(y);_.current=t,A.current=a,L.current=k,I.current=y;let S=(0,l.useRef)(null),R=t.length>0,E=(0,l.useMemo)(()=>{let e=new Map;for(let n of t){let t=m(n.camVoxel),a=e.get(t);a?a.count+=n.count:e.set(t,{key:t,voxel:n.camVoxel,count:n.count})}return[...e.values()].sort((e,t)=>t.count-e.count)},[t]),P=(0,l.useMemo)(()=>{let e=new Map;for(let n of t)""!==n.mesh&&e.set(n.mesh,(e.get(n.mesh)??0)+n.count);return[...e.entries()].map(([e,t])=>({name:e,count:t})).sort((e,t)=>t.count-e.count)},[t]);return(0,l.useEffect)(()=>{k!==d&&(E.some(e=>e.key===k)||j(d))},[k,E]),(0,l.useEffect)(()=>{y!==d&&(P.some(e=>e.name===y)||M(d))},[y,P]),(0,l.useEffect)(()=>{let t=r.current;if(!t)return;if(!R)return void x("empty");let a=!1,s=null;return x("loading"),w(null),(async()=>{try{let[{Engine:r},{Scene:l},{ArcRotateCamera:u},{HemisphericLight:h},{Vector3:p,Color3:g,Color4:v,Matrix:w},{MeshBuilder:k},{StandardMaterial:j}]=await Promise.all([e.A(3905),e.A(94432),e.A(59694),e.A(88004),e.A(27940),e.A(27124),e.A(14074),e.A(35983),e.A(18561)]);if(a)return;let y=_.current,M=0,z=0,R=0,E=0,P=(e,t,n)=>{M+=e,z+=t,R+=n,E++};for(let e of y)P(e.origin[0],e.origin[1],e.origin[2]),P(e.hit[0],e.hit[1],e.hit[2]);let $=E>0?new p(M/E,z/E,R/E):p.Zero(),T=4*n;for(let e of y)for(let t of[e.origin,e.hit]){let e=t[0]-$.x,n=t[1]-$.y,a=t[2]-$.z;T=Math.max(T,Math.sqrt(e*e+n*n+a*a))}let B=new r(t,!0,{preserveDrawingBuffer:!1}),N=new l(B);N.clearColor=new v(.04,.05,.07,1);let F=new u("rays-cam",Math.PI/4,Math.PI/3,2.4*T,$,N);F.attachControl(t,!0),(0,o.disableWheelZoom)(F),f.current=F,b.current={target:$,alpha:F.alpha,beta:F.beta,radius:F.radius},new h("rays-light",new p(.4,1,.3),N);let q=null,D="\0",O=[],Z=Math.max(3*n,.18*T),V=()=>{for(let e of((()=>{let e=A.current,t=e.map(e=>`${e.name}:${e.aabb.join(",")}`).join("|");if(t===D||(D=t,q&&(q.dispose(!1,!0),q=null),0===e.length))return;q=k.CreateBox("scene-proxy",{size:1},N);let n=new j("scene-proxy-mat",N);n.wireframe=!0,n.disableLighting=!0,n.emissiveColor=new g(.32,.4,.52),n.alpha=.35,q.material=n,q.isPickable=!0,q.thinInstanceEnablePicking=!0,q.metadata={hoverLabels:e.map(e=>e.name)};let a=e.length,r=new Float32Array(16*a);for(let t=0;t<a;t++){let n=e[t].aabb,a=Math.max(n[3]-n[0],.001),s=Math.max(n[4]-n[1],.001),l=Math.max(n[5]-n[2],.001);w.Scaling(a,s,l).multiply(w.Translation((n[0]+n[3])/2,(n[1]+n[4])/2,(n[2]+n[5])/2)).copyToArray(r,16*t)}q.thinInstanceSetBuffer("matrix",r,16,!0)})(),O))e.dispose(!1,!0);O=[];let e=_.current,t=A.current,a=L.current,r=I.current,s=a===d?e:e.filter(e=>m(e.camVoxel)===a),l=s.reduce((e,t)=>Math.max(e,t.count),1),o=[],c=[];for(let e of s){let t=e.count/l,[n,a,r]=(0,i.heatRgb)(t),s=new v(n,a,r,.35+.65*t);o.push([new p(e.origin[0],e.origin[1],e.origin[2]),new p(e.hit[0],e.hit[1],e.hit[2])]),c.push([s,s])}if(o.length>0){let e=k.CreateLineSystem("click-rays",{lines:o,colors:c,useVertexAlpha:!0},N);e.isPickable=!1,O.push(e)}let u=new Map;for(let e of s)u.set(m(e.camVoxel),e.camVoxel);if(u.size>0){let e=k.CreateSphere("rays-eye",{diameter:.6*n,segments:6},N),t=new j("rays-eye-mat",N);t.disableLighting=!0,t.emissiveColor=new g(.9,.95,1),e.material=t;let a=[...u.values()],r=new Float32Array(16*a.length);for(let e=0;e<a.length;e++){let t=a[e];w.Translation((t[0]+.5)*n,(t[1]+.5)*n,(t[2]+.5)*n).copyToArray(r,16*e)}e.thinInstanceSetBuffer("matrix",r,16,!0),O.push(e)}if(r!==d){let a=e.filter(e=>e.mesh===r);if(a.length>0){let e,s=t.find(e=>e.name===r);if(s){let t=s.aabb;e=new p((t[0]+t[3])/2,(t[1]+t[4])/2,(t[2]+t[5])/2)}else{let t=0,n=0,r=0;for(let e of a)t+=e.hit[0],n+=e.hit[1],r+=e.hit[2];e=new p(t/a.length,n/a.length,r/a.length)}let l=a.reduce((e,t)=>Math.max(e,t.count),1),o=[],c=[];for(let t of a){let n=t.origin[0]-t.hit[0],a=t.origin[1]-t.hit[1],r=t.origin[2]-t.hit[2],s=Math.sqrt(n*n+a*a+r*r)||1,u=t.count/l,h=Z*(.4+.6*u),d=new p(e.x+n/s*h,e.y+a/s*h,e.z+r/s*h),[m,f,b]=(0,i.heatRgb)(u),g=new v(m,f,b,1);o.push([e.clone(),d]),c.push([new v(m,f,b,.25),g])}if(o.length>0){let e=k.CreateLineSystem("mesh-rose",{lines:o,colors:c,useVertexAlpha:!0},N);e.isPickable=!1,O.push(e)}let u=k.CreateSphere("mesh-rose-hub",{diameter:.8*n,segments:8},N),h=new j("mesh-rose-hub-mat",N);h.disableLighting=!0,h.emissiveColor=new g(1,.85,.4),u.material=h,u.position=e,u.isPickable=!0,u.metadata={hoverLabel:r},O.push(u)}}};S.current=V,V(),B.runRenderLoop(()=>N.render());let W=()=>B.resize();window.addEventListener("resize",W);let H=(0,c.attachMeshHover)(N,t,C),K=(0,o.attachDoubleClickFocus)(N,t,F);x("ready"),s=()=>{window.removeEventListener("resize",W),H(),K(),C(null),S.current=null,f.current=null,b.current=null,N.dispose(),B.dispose()}}catch(e){if(a)return;x("error"),w(e instanceof Error?e.message:"Failed to render click rays.")}})(),()=>{a=!0,s?.()}},[R,n]),(0,l.useEffect)(()=>{S.current?.()},[t,a,n,k,y]),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("canvas",{ref:r,className:"aspect-video w-full rounded-lg border border-edge bg-ink"}),z?(0,s.jsx)("div",{className:"pointer-events-none absolute z-10 max-w-[16rem] truncate rounded border border-edge bg-ink/90 px-1.5 py-0.5 text-xs text-white shadow backdrop-blur",style:{left:z.x+12,top:z.y+12},children:z.label}):null,"ready"===g?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"absolute left-3 top-3 flex gap-2",children:[(0,s.jsx)(p,{label:"Viewpoint",value:k,onChange:j,allLabel:"All viewpoints",options:E.map(e=>({value:e.key,label:`(${e.voxel.join(", ")}) \xb7 ${e.count}`}))}),(0,s.jsx)(p,{label:"Mesh rose",value:y,onChange:M,allLabel:"No mesh focus",options:P.map(e=>({value:e.name,label:`${e.name} \xb7 ${e.count}`}))})]}),(0,s.jsx)(h.ZoomButtons,{onZoom:e=>f.current&&(0,o.stepZoom)(f.current,e),onReset:()=>f.current&&b.current&&(0,o.resetFocus)(f.current,b.current)}),(0,s.jsx)(u.HeatLegend,{title:"Click volume",lowLabel:"few clicks",highLabel:"most clicks",note:"Lines run from the camera position (bright eye) to where the click landed. Pick a viewpoint to see only clicks made from there; pick a mesh to see which directions its clicks came from."})]}):(0,s.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center text-sm text-fg-muted",children:"loading"===g?"Rendering…":"empty"===g?"No correlated clicks in range.":"error"===g?v??"Click rays unavailable.":null})]})},"ERROR_HEATMAP_SUBTITLE",()=>f.ERROR_HEATMAP_SUBTITLE,"ERROR_HEATMAP_TITLE",()=>f.ERROR_HEATMAP_TITLE,"FLOW_SANKEY_HELP",()=>f.FLOW_SANKEY_HELP,"FLOW_SANKEY_SUBTITLE",()=>f.FLOW_SANKEY_SUBTITLE,"FLOW_SANKEY_TITLE",()=>f.FLOW_SANKEY_TITLE,"FlowSankey3DView",()=>a.FlowSankey3DView,"GAZE_CLICK_SUBTITLE",()=>f.GAZE_CLICK_SUBTITLE,"GAZE_CLICK_TITLE",()=>f.GAZE_CLICK_TITLE,"GazeClickDivergence3DView",()=>r.GazeClickDivergence3DView,"WORLD_HEATMAP_SUBTITLE",()=>f.WORLD_HEATMAP_SUBTITLE,"WORLD_HEATMAP_TITLE",()=>f.WORLD_HEATMAP_TITLE,"WorldHeatmap3DView",()=>n.WorldHeatmap3DView],64434)},94452,e=>{e.n(e.i(64434))},3905,e=>{e.v(t=>Promise.all(["static/chunks/3pdpaqzwhhijn.js","static/chunks/08bm3ye5govev.js","static/chunks/0g6u34xkzrpjn.js","static/chunks/25ctnyh7njp-d.js","static/chunks/2gh4z57fem0_v.js","static/chunks/3vaho-xrtuchd.js","static/chunks/0g7p8zp2kxve5.js"].map(t=>e.l(t))).then(()=>t(66232)))},94432,e=>{e.v(t=>Promise.all(["static/chunks/2kje_jvmwsvwo.js","static/chunks/1j--a56ji33_x.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/2npk7tr63h7rl.js","static/chunks/3vaho-xrtuchd.js","static/chunks/3g_h_00xs9u59.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/25ctnyh7njp-d.js","static/chunks/1vpcaaf-0dn7q.js"].map(t=>e.l(t))).then(()=>t(92494)))},59694,e=>{e.v(t=>Promise.all(["static/chunks/1j--a56ji33_x.js","static/chunks/0oap0o8a8a_cl.js","static/chunks/0f_nv15a8q415.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/245h82k-g1nxr.js","static/chunks/3ovd8o_usay7j.js","static/chunks/3vaho-xrtuchd.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/25ctnyh7njp-d.js","static/chunks/2npk7tr63h7rl.js","static/chunks/3pyggl13glbdc.js"].map(t=>e.l(t))).then(()=>t(67186)))},88004,e=>{e.v(t=>Promise.all(["static/chunks/2p8dbh81chhon.js","static/chunks/1oara6fkfvgs3.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/25ctnyh7njp-d.js","static/chunks/3pdpaqzwhhijn.js"].map(t=>e.l(t))).then(()=>t(15768)))},27940,e=>{e.v(t=>Promise.all(["static/chunks/0w0sx062qmcsh.js","static/chunks/25ctnyh7njp-d.js","static/chunks/3pdpaqzwhhijn.js"].map(t=>e.l(t))).then(()=>t(23235)))},27124,e=>{e.v(t=>Promise.all(["static/chunks/1par9m038tiov.js","static/chunks/1j--a56ji33_x.js","static/chunks/2j-sax2xfdv7l.js","static/chunks/340pg0qkv5tqq.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/0gwa154w_0wuh.js","static/chunks/0oap0o8a8a_cl.js","static/chunks/0f_nv15a8q415.js","static/chunks/3vaho-xrtuchd.js","static/chunks/3pyggl13glbdc.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/3g_h_00xs9u59.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/25ctnyh7njp-d.js","static/chunks/2npk7tr63h7rl.js","static/chunks/01aeari2x_tlz.js"].map(t=>e.l(t))).then(()=>t(70928)))},14074,e=>{e.v(t=>Promise.all(["static/chunks/1zcrrq1fx8g2y.js","static/chunks/1tdg_eolxlcdl.js","static/chunks/1j--a56ji33_x.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/0vddljjnmozzx.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/3vaho-xrtuchd.js","static/chunks/0f_nv15a8q415.js","static/chunks/3g_h_00xs9u59.js","static/chunks/2npk7tr63h7rl.js","static/chunks/25ctnyh7njp-d.js"].map(t=>e.l(t))).then(()=>t(87566)))},2213,e=>{e.v(t=>Promise.all(["static/chunks/3wqs57qehored.js","static/chunks/1j--a56ji33_x.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/2npk7tr63h7rl.js","static/chunks/1vkww9l6lgqag.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/0f_nv15a8q415.js","static/chunks/3pyggl13glbdc.js","static/chunks/3vaho-xrtuchd.js","static/chunks/25ctnyh7njp-d.js","static/chunks/3pdpaqzwhhijn.js"].map(t=>e.l(t))).then(()=>t(95758)))},15002,e=>{e.v(t=>Promise.all(["static/chunks/34gp3hvr3j6um.js","static/chunks/0x6i6e6863tir.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/3vaho-xrtuchd.js","static/chunks/2gh4z57fem0_v.js","static/chunks/25ctnyh7njp-d.js","static/chunks/28ycc-1519hl2.js"].map(t=>e.l(t))).then(()=>t(95729)))},35983,e=>{e.v(t=>Promise.all(["static/chunks/4227p7752rnny.js","static/chunks/1j--a56ji33_x.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/2npk7tr63h7rl.js","static/chunks/1vkww9l6lgqag.js","static/chunks/25ctnyh7njp-d.js","static/chunks/0f_nv15a8q415.js","static/chunks/3vaho-xrtuchd.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/3pyggl13glbdc.js","static/chunks/3pdpaqzwhhijn.js"].map(t=>e.l(t))).then(()=>t(50608)))},18561,e=>{e.v(t=>Promise.all(["static/chunks/1j--a56ji33_x.js","static/chunks/1vkww9l6lgqag.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/2npk7tr63h7rl.js","static/chunks/117ys3lltfmcu.js","static/chunks/25ctnyh7njp-d.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/3g_h_00xs9u59.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/3vaho-xrtuchd.js"].map(t=>e.l(t))).then(()=>t(85106)))}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,3784,t=>{"use strict";var e=t.i(95330),o=t.i(82350),s=t.i(48477);class i extends e.FlowGraphExecutionBlockWithOutSignal{constructor(t){super(t),this.sound=this.registerDataInput("sound",o.RichTypeAny),this.volume=this.registerDataInput("volume",o.RichTypeNumber,1),this.startOffset=this.registerDataInput("startOffset",o.RichTypeNumber,0),this.loop=this.registerDataInput("loop",o.RichTypeBoolean,!1)}_execute(t,e){let o=this.sound.getValue(t);if(!o){this._reportError(t,"No sound provided"),this.out._activateSignal(t);return}let s=this.volume.getValue(t),i=this.startOffset.getValue(t),l=this.loop.getValue(t);o.play({volume:s,startOffset:i,loop:l}),this.out._activateSignal(t)}getClassName(){return"FlowGraphPlaySoundBlock"}}let l=!1;function a(){l||(l=!0,(0,s.RegisterClass)("FlowGraphPlaySoundBlock",i))}t.s(["FlowGraphPlaySoundBlock",0,i,"RegisterFlowGraphPlaySoundBlock",0,a],90026),a(),t.s([],99676),t.i(99676),t.i(90026),t.s(["FlowGraphPlaySoundBlock",0,i],3784)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67186,t=>{"use strict";var e,i,a=t.i(16147),s=t.i(40220),n=t.i(57554),o=t.i(10534),r=t.i(35270),h=t.i(98491),l=t.i(79124),u=t.i(11437),c=t.i(85240),_=t.i(26722);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 d=t.i(54149),m=t.i(58667);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=m.Animation.CreateAnimation("radius",m.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=m.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 d.BackEase(.3),g.EasingMode=d.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=m.Animation.CreateAnimation("target",m.Animation.ANIMATIONTYPE_VECTOR3,60,f.EasingFunction)),this._betaIsAnimating=!0;let l=m.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=m.Animation.CreateAnimation("radius",m.Animation.ANIMATIONTYPE_FLOAT,60,f.EasingFunction)),(l=m.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=m.Animation.CreateAnimation("beta",m.Animation.ANIMATIONTYPE_FLOAT,60,f.EasingFunction));let t=m.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 d.ExponentialEase,f.EasingMode=d.EasingFunction.EASINGMODE_EASEINOUT,f.IgnoreBoundsSizeMode=0,f.FitFrustumSidesMode=1;var y=t.i(18311),v=t.i(87898),T=t.i(70972),b=t.i(29711);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);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){}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(70463);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}}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;for(let i=0;i<this._keys.length;i++){let a=this._keys[i];if(this._keyboardConditions.key=a,-1===this.keysReset.indexOf(a)){let t=e.resolveInteraction("keyboard",this._keyboardConditions);if(t){if("pan"===t.interaction){let i=t.sensitivity??1/this.panningSensibility;-1!==this.keysLeft.indexOf(a)?e.handlers.pan(-i,0):-1!==this.keysRight.indexOf(a)?e.handlers.pan(i,0):-1!==this.keysUp.indexOf(a)?e.handlers.pan(0,i):-1!==this.keysDown.indexOf(a)&&e.handlers.pan(0,-i)}else if("zoom"===t.interaction){let i=t.sensitivity??1/this.zoomingSensibility;-1!==this.keysUp.indexOf(a)||-1!==this.keysZoomIn.indexOf(a)?e.handlers.zoom(i):(-1!==this.keysDown.indexOf(a)||-1!==this.keysZoomOut.indexOf(a))&&e.handlers.zoom(-i)}else if("rotate"===t.interaction){let i=t.sensitivity??this.angularSpeed;-1!==this.keysLeft.indexOf(a)?e.handlers.rotate(-i,0):-1!==this.keysRight.indexOf(a)?e.handlers.rotate(i,0):-1!==this.keysUp.indexOf(a)?e.handlers.rotate(0,-i):-1!==this.keysDown.indexOf(a)&&e.handlers.rotate(0,i)}}}-1!==this.keysReset.indexOf(a)&&t.useInputToRestoreState&&t.restoreState()}}}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(38677),I=t.i(24423);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(54670);class w 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=w.prototype).addVRDeviceOrientation??(e.addVRDeviceOrientation=(0,B._MissingSideEffect)("ArcRotateCameraInputsManager","addVRDeviceOrientation")),(i=w.prototype).addGamepad??(i.addGamepad=(0,B._MissingSideEffect)("ArcRotateCameraInputsManager","addGamepad"));var x=t.i(48477),D=t.i(17606),L=t.i(64187);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 w(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,x.RegisterClass)("BABYLON.ArcRotateCamera",F))}t.s(["ArcRotateCamera",0,F,"ComputeAlpha",0,N,"ComputeBeta",0,z,"RegisterArcRotateCamera",0,U],93182),U(),t.s([],42503),t.i(42503),t.i(93182),t.s(["ArcRotateCamera",0,F,"ComputeAlpha",0,N,"ComputeBeta",0,z,"RegisterArcRotateCamera",0,U],67186)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,7438,t=>{"use strict";class r{static SetMatrixPrecision(t){if(r.MatrixTrackPrecisionChange=!1,t&&!r.MatrixUse64Bits&&r.MatrixTrackedMatrices)for(let t=0;t<r.MatrixTrackedMatrices.length;++t){let e=r.MatrixTrackedMatrices[t],i=e._m;e._m=Array(16);for(let t=0;t<16;++t)e._m[t]=i[t]}r.MatrixUse64Bits=t,r.MatrixCurrentType=r.MatrixUse64Bits?Array:Float32Array,r.MatrixTrackedMatrices=null}}r.MatrixUse64Bits=!1,r.MatrixTrackPrecisionChange=!0,r.MatrixCurrentType=Float32Array,r.MatrixTrackedMatrices=[],t.s(["PerformanceConfigurator",0,r])},35270,t=>{"use strict";t.s(["Clamp",0,function(t,r=0,e=1){return Math.min(e,Math.max(r,t))},"Hermite",0,function(t,r,e,i,s){let n=s*s,a=s*n;return t*(2*a-3*n+1)+e*(-2*a+3*n)+r*(a-2*n+s)+i*(a-n)},"HighestCommonFactor",0,function t(r,e){let i=r%e;return 0===i?e:t(e,i)},"ILog2",0,function(t){if(Math.log2)return Math.floor(Math.log2(t));if(t<0)return NaN;if(0===t)return-1/0;let r=0;if(t<1){for(;t<1;)r++,t*=2;r=-r}else if(t>1)for(;t>1;)r++,t=Math.floor(t/2);return r},"Lerp",0,function(t,r,e){return t+(r-t)*e},"NormalizeRadians",0,function(t){return t-2*Math.PI*Math.floor((t+Math.PI)/(2*Math.PI))},"RandomRange",0,function(t,r){return t===r?t:Math.random()*(r-t)+t},"ToHex",0,function(t){let r=t.toString(16);return t<=15?("0"+r).toUpperCase():r.toUpperCase()},"WithinEpsilon",0,function(t,r,e=1401298e-51){return Math.abs(t-r)<=e}])},47867,54670,57554,t=>{"use strict";var r,e,i;let s={},n={};function a(t,r,e=!1){let i=function(){if(e&&1){let e=`${t}.${r}`;n[e]||(n[e]=!0,console.warn(`[Babylon.js] ${e}() requires a side-effect import. See: https://doc.babylonjs.com/setup/treeshaking`))}};return i.__isSideEffectStub=!0,i}t.s(["_IsSideEffectImplemented",0,function(t){return!!t&&!t.__isSideEffectStub},"_MissingSideEffect",0,a,"_MissingSideEffectProperty",0,function(t,r){return{get(){},set(t){Object.defineProperty(this,r,{value:t,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0}},"_WarnImport",0,function(t,r=!1){if(!r||!s[t])return s[t]=!0,`${t} needs to be imported before as it contains a side-effect required by your code.`}],54670);let h="u">typeof WeakRef;class o{constructor(t,r=!1,e,i){this.initialize(t,r,e,i)}initialize(t,r=!1,e,i){return this.mask=t,this.skipNextObservers=r,this.target=e,this.currentTarget=i,this}}class l{constructor(t,r,e=null){this.callback=t,this.mask=r,this.scope=e,this._willBeUnregistered=!1,this.unregisterOnNextCall=!1,this._remove=null}remove(t=!1){this._remove&&this._remove(t)}}class u{static FromPromise(t,r){let e=new u;return t.then(t=>{e.notifyObservers(t)}).catch(t=>{if(r)r.notifyObservers(t);else throw t}),e}get observers(){return this._observers}constructor(t,r=!1){this.notifyIfTriggered=r,this._observers=[],this._numObserversMarkedAsDeleted=0,this._hasNotified=!1,this._eventState=new o(0),t&&(this._onObserverAdded=t)}add(t,r=-1,e=!1,i=null,s=!1){if(!t)return null;let n=new l(t,r,i);n.unregisterOnNextCall=s,e?this._observers.unshift(n):this._observers.push(n),this._onObserverAdded&&this._onObserverAdded(n),this._hasNotified&&this.notifyIfTriggered&&void 0!==this._lastNotifiedValue&&this.notifyObserver(n,this._lastNotifiedValue);let a=h?new WeakRef(this):{deref:()=>this};return n._remove=(t=!1)=>{let r=a.deref();r&&(t?r.remove(n):r._remove(n))},n}addOnce(t){return this.add(t,void 0,void 0,void 0,!0)}remove(t){return!!t&&(t._remove=null,-1!==this._observers.indexOf(t)&&(this._deferUnregister(t),!0))}removeCallback(t,r){for(let e=0;e<this._observers.length;e++){let i=this._observers[e];if(!i._willBeUnregistered&&i.callback===t&&(!r||r===i.scope))return this._deferUnregister(i),!0}return!1}_deferUnregister(t){t._willBeUnregistered||(this._numObserversMarkedAsDeleted++,t.unregisterOnNextCall=!1,t._willBeUnregistered=!0,setTimeout(()=>{this._remove(t)},0))}_remove(t,r=!0){if(!t)return!1;let e=this._observers.indexOf(t);return -1!==e&&(r&&this._numObserversMarkedAsDeleted--,this._observers.splice(e,1),!0)}makeObserverTopPriority(t){this._remove(t,!1),this._observers.unshift(t)}makeObserverBottomPriority(t){this._remove(t,!1),this._observers.push(t)}notifyObservers(t,r=-1,e,i,s){if(this.notifyIfTriggered&&(this._hasNotified=!0,this._lastNotifiedValue=t),!this._observers.length)return!0;let n=this._eventState;for(let a of(n.mask=r,n.target=e,n.currentTarget=i,n.skipNextObservers=!1,n.lastReturnValue=t,n.userInfo=s,this._observers))if(!a._willBeUnregistered&&(a.mask&r&&(a.unregisterOnNextCall&&this._deferUnregister(a),a.scope?n.lastReturnValue=a.callback.apply(a.scope,[t,n]):n.lastReturnValue=a.callback(t,n)),n.skipNextObservers))return!1;return!0}notifyObserver(t,r,e=-1){if(this.notifyIfTriggered&&(this._hasNotified=!0,this._lastNotifiedValue=r),t._willBeUnregistered)return;let i=this._eventState;i.mask=e,i.skipNextObservers=!1,t.unregisterOnNextCall&&this._deferUnregister(t),t.callback(r,i)}hasObservers(){return this._observers.length-this._numObserversMarkedAsDeleted>0}clear(){for(;this._observers.length;){let t=this._observers.pop();t&&(t._remove=null)}this._onObserverAdded=null,this._numObserversMarkedAsDeleted=0,this.cleanLastNotifiedState()}cleanLastNotifiedState(){this._hasNotified=!1,this._lastNotifiedValue=void 0}clone(){let t=new u;return t._observers=this._observers.slice(0),t}hasSpecificMask(t=-1){for(let r of this._observers)if(r.mask&t||r.mask===t)return!0;return!1}}(r=u.prototype).notifyObserversWithPromise??(r.notifyObserversWithPromise=a("Observable","notifyObserversWithPromise")),(e=u.prototype).runCoroutineAsync??(e.runCoroutineAsync=a("Observable","runCoroutineAsync")),(i=u.prototype).cancelAllCoroutines??(i.cancelAllCoroutines=a("Observable","cancelAllCoroutines")),t.s(["Observable",0,u],57554);class c{static get LastCreatedEngine(){return 0===this.Instances.length?null:this.Instances[this.Instances.length-1]}static get LastCreatedScene(){return this._LastCreatedScene}}c.Instances=[],c.OnEnginesDisposedObservable=new u,c._LastCreatedScene=null,c.UseFallbackTexture=!0,c.FallbackTexture="",t.s(["EngineStore",0,c],47867)},48477,t=>{"use strict";let r={};t.s(["GetClass",0,function(t){return r[t]},"RegisterClass",0,function(t,e){r[t]=e}])},75053,t=>{"use strict";var r=t.i(27745),e=t.i(26722),i=t.i(35270),s=t.i(48477);function n(t){return Math.pow(t,e.ToLinearSpace)}function a(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 l{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 l.FromArrayToRef(t,r,this),this}toColor4(t=1){return new u(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 l(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 l(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 l(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 l(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 l(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 l(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 l(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 l)}toHSVToRef(t){let r=this.r,e=this.g,i=this.b,s=Math.max(r,e,i),n=Math.min(r,e,i),a=0,h=0,o=s-n;return 0!==s&&(h=o/s),s!=n&&(s==r?(a=(e-i)/o,e<i&&(a+=6)):s==e?a=(i-r)/o+2:s==i&&(a=(r-e)/o+4),a*=60),t.r=a,t.g=h,t.b=s,t}toLinearSpace(t=!1){let r=new l;return this.toLinearSpaceToRef(r,t),r}toLinearSpaceToRef(t,r=!1){return r?(t.r=a(this.r),t.g=a(this.g),t.b=a(this.b)):(t.r=n(this.r),t.g=n(this.g),t.b=n(this.b)),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)),this}static HSVtoRGBToRef(t,r,e,i){let s=e*r,n=t/60,a=s*(1-Math.abs(n%2-1)),h=0,o=0,l=0;n>=0&&n<=1?(h=s,o=a):n>=1&&n<=2?(h=a,o=s):n>=2&&n<=3?(o=s,l=a):n>=3&&n<=4?(o=a,l=s):n>=4&&n<=5?(h=a,l=s):n>=5&&n<=6&&(h=s,l=a);let u=e-s;return i.r=h+u,i.g=o+u,i.b=l+u,i}static FromHSV(t,r,e){let i=new l(0,0,0);return l.HSVtoRGBToRef(t,r,e,i),i}static FromHexString(t){return new l(0,0,0).fromHexString(t)}static FromArray(t,r=0){return new l(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 l(t/255,r/255,e/255)}static Lerp(t,r,e){let i=new l(0,0,0);return l.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 n=s*s,a=s*n,h=2*a-3*n+1,o=-2*a+3*n,u=a-2*n+s,c=a-n;return new l(t.r*h+e.r*o+r.r*u+i.r*c,t.g*h+e.g*o+r.g*u+i.g*c,t.b*h+e.b*o+r.b*u+i.b*c)}static Hermite1stDerivative(t,r,e,i,s){let n=l.Black();return this.Hermite1stDerivativeToRef(t,r,e,i,s,n),n}static Hermite1stDerivativeToRef(t,r,e,i,s,n){let a=s*s;n.r=(a-s)*6*t.r+(3*a-4*s+1)*r.r+(-a+s)*6*e.r+(3*a-2*s)*i.r,n.g=(a-s)*6*t.g+(3*a-4*s+1)*r.g+(-a+s)*6*e.g+(3*a-2*s)*i.g,n.b=(a-s)*6*t.b+(3*a-4*s+1)*r.b+(-a+s)*6*e.b+(3*a-2*s)*i.b}static Red(){return new l(1,0,0)}static Green(){return new l(0,1,0)}static Blue(){return new l(0,0,1)}static Black(){return new l(0,0,0)}static get BlackReadOnly(){return l._BlackReadOnly}static White(){return new l(1,1,1)}static Purple(){return new l(.5,0,.5)}static Magenta(){return new l(1,0,1)}static Yellow(){return new l(1,1,0)}static Gray(){return new l(.5,.5,.5)}static Teal(){return new l(0,1,1)}static Random(){return new l(Math.random(),Math.random(),Math.random())}}l._V8PerformanceHack=new l(.5,.5,.5),l._BlackReadOnly=l.Black();class u{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 u(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 u(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 u(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 u(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 u(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 u(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 u().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 n=Math.round(255*this.a);return"#"+(0,i.ToHex)(r)+(0,i.ToHex)(e)+(0,i.ToHex)(s)+(0,i.ToHex)(n)}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 u;return this.toLinearSpaceToRef(r,t),r}toLinearSpaceToRef(t,r=!1){return r?(t.r=a(this.r),t.g=a(this.g),t.b=a(this.b)):(t.r=n(this.r),t.g=n(this.g),t.b=n(this.b)),t.a=this.a,this}toGammaSpace(t=!1){let r=new u;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 u(0,0,0,0):new u(0,0,0,1).fromHexString(t)}static Lerp(t,r,e){return u.LerpToRef(t,r,e,new u)}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 n=s*s,a=s*n,h=2*a-3*n+1,o=-2*a+3*n,l=a-2*n+s,c=a-n;return new u(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,t.a*h+e.a*o+r.a*l+i.a*c)}static Hermite1stDerivative(t,r,e,i,s){let n=new u;return this.Hermite1stDerivativeToRef(t,r,e,i,s,n),n}static Hermite1stDerivativeToRef(t,r,e,i,s,n){let a=s*s;n.r=(a-s)*6*t.r+(3*a-4*s+1)*r.r+(-a+s)*6*e.r+(3*a-2*s)*i.r,n.g=(a-s)*6*t.g+(3*a-4*s+1)*r.g+(-a+s)*6*e.g+(3*a-2*s)*i.g,n.b=(a-s)*6*t.b+(3*a-4*s+1)*r.b+(-a+s)*6*e.b+(3*a-2*s)*i.b,n.a=(a-s)*6*t.a+(3*a-4*s+1)*r.a+(-a+s)*6*e.a+(3*a-2*s)*i.a}static FromColor3(t,r=1){return new u(t.r,t.g,t.b,r)}static FromArray(t,r=0){return new u(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 u(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}}u._V8PerformanceHack=new u(.5,.5,.5,.5);class c{}c.Color3=(0,r.BuildArray)(3,l.Black),c.Color4=(0,r.BuildArray)(3,()=>new u(0,0,0,0));let g=!1;t.s(["Color3",0,l,"Color4",0,u,"RegisterMathColor",0,function(){g||(g=!0,Object.defineProperties(l.prototype,{dimension:{value:[3]},rank:{value:1}}),Object.defineProperties(u.prototype,{dimension:{value:[4]},rank:{value:1}}),(0,s.RegisterClass)("BABYLON.Color3",l),(0,s.RegisterClass)("BABYLON.Color4",u))},"TmpColors",0,c])}]);