@uptimizr/dashboard 0.4.5 → 0.4.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.
- package/out/404.html +1 -1
- package/out/__next.__PAGE__.txt +4 -4
- package/out/__next._full.txt +11 -11
- package/out/__next._head.txt +4 -4
- package/out/__next._index.txt +4 -4
- package/out/__next._tree.txt +2 -2
- package/out/_next/static/chunks/{2o8k8x5zcepfy.js → 0-k4hp87gwues.js} +1 -1
- package/out/_next/static/chunks/{0s84ekz_f9ngx.js → 0-laj-bivzp4x.js} +1 -1
- package/out/_next/static/chunks/{3tdzweqszru4y.js → 04zj0yf1qhk1o.js} +1 -1
- package/out/_next/static/chunks/05s0t-besbvu1.css +3 -0
- package/out/_next/static/chunks/{1e_-_7biavwmb.js → 06fbalmyyfpsy.js} +1 -1
- package/out/_next/static/chunks/{3yr66ufoli71t.js → 07hgbbqksqd1g.js} +1 -1
- package/out/_next/static/chunks/08ou2nvy48e0u.js +1 -0
- package/out/_next/static/chunks/08y5-irjbsiy8.js +1 -0
- package/out/_next/static/chunks/{2pbgsq7vvtk8_.js → 0_jrfk2u1u3fi.js} +1 -1
- package/out/_next/static/chunks/{1-4v8oivkgnyl.js → 0a475u_q5i_dd.js} +2 -2
- package/out/_next/static/chunks/0aad2r4s4wl1x.js +5 -0
- package/out/_next/static/chunks/{2rjfrjhp4kjev.js → 0cmyc-uvk93kl.js} +52 -52
- package/out/_next/static/chunks/{1ozi46t8jajqh.js → 0d9pxx1w_zqr9.js} +1 -1
- package/out/_next/static/chunks/{3-x7522okdy-7.js → 0e5dcxmkprebg.js} +1 -1
- package/out/_next/static/chunks/{1n_gxvu31aofy.js → 0gk5rnci1hznh.js} +2 -2
- package/out/_next/static/chunks/0gnjtwq-474uc.js +1 -0
- package/out/_next/static/chunks/0gsh_d0m5xss1.js +1 -0
- package/out/_next/static/chunks/0i9wa8hjd-5tc.js +1 -0
- package/out/_next/static/chunks/0ibzpjo0h731v.js +1 -0
- package/out/_next/static/chunks/{41yy4p3-rtyz1.js → 0j0a0wvmmghxj.js} +1 -1
- package/out/_next/static/chunks/{29gv2swsp7tzu.js → 0j2ygtc_-bo3m.js} +1 -1
- package/out/_next/static/chunks/{0dck67in84de0.js → 0j_3k5qhv_mdx.js} +1 -1
- package/out/_next/static/chunks/0jap7l5-bskj4.js +114 -0
- package/out/_next/static/chunks/{0n92hec_jb_-_.js → 0jis2w2mfx062.js} +1 -1
- package/out/_next/static/chunks/0jjvp2slpf7d6.js +1 -0
- package/out/_next/static/chunks/0ko10wo4rc9-b.js +1 -0
- package/out/_next/static/chunks/0lqmvz6k2h_of.js +1 -0
- package/out/_next/static/chunks/0lwjmr8efrlbt.js +17 -0
- package/out/_next/static/chunks/0noxyupihh8dk.js +1 -0
- package/out/_next/static/chunks/{2-hdejef-mpka.js → 0o0qtv35dqv3i.js} +219 -16
- package/out/_next/static/chunks/{43hwl25uke0l_.js → 0o1vph7x9shzu.js} +1 -1
- package/out/_next/static/chunks/{1tt1bbry-4f-6.js → 0o73w0cn5n_vl.js} +1 -1
- package/out/_next/static/chunks/0p6phe9kjlxn8.js +1 -0
- package/out/_next/static/chunks/0ptxb9dcwsw3o.js +1 -0
- package/out/_next/static/chunks/{31ei992g8gqz9.js → 0q0i4pdyq66gb.js} +1 -1
- package/out/_next/static/chunks/0q8pt8fd0ma30.js +1 -0
- package/out/_next/static/chunks/0qqx9aoz8l5d2.js +1 -0
- package/out/_next/static/chunks/0r-x702_jvhud.js +112 -0
- package/out/_next/static/chunks/{2h5nvlgky7fpa.js → 0rykrf_vofbad.js} +1 -1
- package/out/_next/static/chunks/0tsk32q-88t_7.js +1 -0
- package/out/_next/static/chunks/0u7577db_ivyr.js +1 -0
- package/out/_next/static/chunks/0unnrt0un064x.js +1 -0
- package/out/_next/static/chunks/{3mvaub8qjdyuc.js → 0uygtr4mo3h0v.js} +1 -1
- package/out/_next/static/chunks/0vf3facit951s.js +1 -0
- package/out/_next/static/chunks/{2pcdnd4nzcw4c.js → 0vzo-8t8c26k9.js} +1 -1
- package/out/_next/static/chunks/0xx7_7y5jdlh4.js +1 -0
- package/out/_next/static/chunks/0xyija62b6txc.js +1 -0
- package/out/_next/static/chunks/{0vso09vdz38sr.js → 0xzamrecplwzw.js} +1 -1
- package/out/_next/static/chunks/{2khh_pmm224k5.js → 0yd4_xh476fjn.js} +14 -217
- package/out/_next/static/chunks/0ypejzd74ixbw.js +338 -0
- package/out/_next/static/chunks/0zeb37703zcz3.js +1 -0
- package/out/_next/static/chunks/0zu5ato7-1-q9.js +1 -0
- package/out/_next/static/chunks/0zydv7y47dxgh.js +1 -0
- package/out/_next/static/chunks/103x4jwovb6d-.js +1 -0
- package/out/_next/static/chunks/107wfq84g9-kn.js +1 -0
- package/out/_next/static/chunks/10afagk8yn__n.js +1 -0
- package/out/_next/static/chunks/12ory_c78yl31.js +1 -0
- package/out/_next/static/chunks/{1ccn725by19i1.js → 133dqp8_7_yo6.js} +1 -1
- package/out/_next/static/chunks/1365lgwdd4vuo.js +1 -0
- package/out/_next/static/chunks/146ou-ohb_qhs.js +1 -0
- package/out/_next/static/chunks/{425epvuw3yy-n.js → 14e4k-718qadd.js} +31 -31
- package/out/_next/static/chunks/14orr68xgdykd.js +1 -0
- package/out/_next/static/chunks/15qfoj-vl9thu.js +1 -0
- package/out/_next/static/chunks/{0okbyggxe6mx5.js → 161yjxmdz9obc.js} +1 -1
- package/out/_next/static/chunks/166yqx3_qvbpy.js +1 -0
- package/out/_next/static/chunks/16gwjao676ieb.js +1 -0
- package/out/_next/static/chunks/{0n-zml1gn0o1u.js → 16rmmzhy2p7bw.js} +1 -1
- package/out/_next/static/chunks/{442e2l3jzxd-_.js → 17_jjyx4jz9dd.js} +1 -1
- package/out/_next/static/chunks/{0zf26k6juhlzo.js → 184pz6z3dflfm.js} +13 -10
- package/out/_next/static/chunks/18h9ugdz6igdb.js +1 -0
- package/out/_next/static/chunks/19d8n5t7ka2fb.js +1 -0
- package/out/_next/static/chunks/{1mvadj46owrck.js → 1_4hh3dfop93j.js} +1 -1
- package/out/_next/static/chunks/1_rbzw3n4fk0g.js +1 -0
- package/out/_next/static/chunks/{22ja7c3gk0_ko.js → 1a94whad0y57f.js} +1 -1
- package/out/_next/static/chunks/{1vmpltnr0cyos.js → 1aa9g197l4twm.js} +1 -1
- package/out/_next/static/chunks/1bq0fcnt1wy86.js +1 -0
- package/out/_next/static/chunks/{1fyh50hjt7hi_.js → 1bv-jzy_2jiqs.js} +1 -1
- package/out/_next/static/chunks/1c6mho7e0enta.js +1 -0
- package/out/_next/static/chunks/{2ymtumj-hfrjo.js → 1dfaheve77dhi.js} +1 -1
- package/out/_next/static/chunks/1dgf112ehnhm1.js +1 -0
- package/out/_next/static/chunks/{32vaw89wdwv5_.js → 1eirucr9s6-h5.js} +1 -1
- package/out/_next/static/chunks/{0dva036n8ab62.js → 1f07l3q77zat1.js} +1 -1
- package/out/_next/static/chunks/1fervgvgv10r-.js +1 -0
- package/out/_next/static/chunks/1fsof7un7igrn.js +1 -0
- package/out/_next/static/chunks/{3gyyjsot8mdav.js → 1gvu5a6ffbs7l.js} +1 -1
- package/out/_next/static/chunks/{0t89-lfct-7m6.js → 1h1gixjbjkbsl.js} +5 -5
- package/out/_next/static/chunks/1iel4pzhhh-c3.js +1 -0
- package/out/_next/static/chunks/1iojfx3-g4_n9.js +1 -0
- package/out/_next/static/chunks/{1__nujzr9e352.js → 1j4c0nvdo5q68.js} +1 -1
- package/out/_next/static/chunks/{1o3ggu95lfu6i.js → 1j4jt5q7px8sy.js} +1 -1
- package/out/_next/static/chunks/{2g_1ov-0j2kwd.js → 1jjw9hxgi2vzi.js} +1 -1
- package/out/_next/static/chunks/1k_8olnprvi8r.js +1 -0
- package/out/_next/static/chunks/1l0rt7d4m-xdk.js +5 -0
- package/out/_next/static/chunks/{1oljzgz5jistn.js → 1lu7rjfvxj8yj.js} +1 -1
- package/out/_next/static/chunks/{2c2dspoukng-5.js → 1mt4cnd_d6jvf.js} +1 -1
- package/out/_next/static/chunks/1my968s78he8g.js +272 -0
- package/out/_next/static/chunks/{03zip1uidm6x9.js → 1s0dpdqy480hg.js} +1 -1
- package/out/_next/static/chunks/1t-yolk97lmot.js +12 -0
- package/out/_next/static/chunks/1t2g1v0ubcsam.js +1 -0
- package/out/_next/static/chunks/{18wa83g0qfh-b.js → 1tbes2sv-qzcx.js} +1 -1
- package/out/_next/static/chunks/1upy8a5cb75kt.js +1 -0
- package/out/_next/static/chunks/{2zpn7010iqgsy.js → 1x0j78ohufpul.js} +1 -1
- package/out/_next/static/chunks/1xed71f608m4b.js +1 -0
- package/out/_next/static/chunks/1z790xxb46gxy.js +1 -0
- package/out/_next/static/chunks/{22rl_arnzs-ve.js → 1zmx71cvc6ksk.js} +1 -1
- package/out/_next/static/chunks/{3kalvwsf11-ss.js → 2-_a-v1xeo5hb.js} +15 -12
- package/out/_next/static/chunks/2-i29-jdbwww6.js +532 -0
- package/out/_next/static/chunks/{1solqr18og2ot.js → 2117sv2qzo6yq.js} +1 -1
- package/out/_next/static/chunks/219n3q-_eengm.js +1 -0
- package/out/_next/static/chunks/21wo3vdr_uby8.js +1 -0
- package/out/_next/static/chunks/{1nqojcig-0m3c.js → 22yht3s7c-xih.js} +1 -1
- package/out/_next/static/chunks/{3go-mst7n3udd.js → 23-y1f_zw56vo.js} +1 -1
- package/out/_next/static/chunks/{0-tzsd_n-ywom.js → 25brs445bjbik.js} +2 -2
- package/out/_next/static/chunks/25gep78-izw79.js +4 -0
- package/out/_next/static/chunks/{099ilz3dmm1jw.js → 26i7dn31afdtm.js} +1 -1
- package/out/_next/static/chunks/27hbplu797elx.js +1 -0
- package/out/_next/static/chunks/{3n-7bcmfbh299.js → 27z7j17kcrty_.js} +11 -11
- package/out/_next/static/chunks/{380ivzcfb4o_3.js → 287hakn2ijupp.js} +2 -2
- package/out/_next/static/chunks/28i3wgvgn_at1.js +1 -0
- package/out/_next/static/chunks/2992eiy52nazj.js +1 -0
- package/out/_next/static/chunks/29_n5j-hg_gsa.js +1 -0
- package/out/_next/static/chunks/29bxq-67oazfg.js +1 -0
- package/out/_next/static/chunks/{309f81l5ucsb_.js → 29hkkj9raxte9.js} +50 -50
- package/out/_next/static/chunks/29ings58w7kp1.js +1 -0
- package/out/_next/static/chunks/{2e46-2ubc90do.js → 2_6b9lraq-exh.js} +5 -5
- package/out/_next/static/chunks/{3w4qettzp7khe.js → 2_lw4d7t-xcqi.js} +32 -32
- package/out/_next/static/chunks/2_n0cpkdsjzli.js +1 -0
- package/out/_next/static/chunks/2a3iy701j4r_y.js +1 -0
- package/out/_next/static/chunks/2al9dh3_1ixhv.js +1 -0
- package/out/_next/static/chunks/{1gvdmbr65lpud.js → 2as_br1awqk6k.js} +69 -69
- package/out/_next/static/chunks/{0c5d3qn2mb3ew.js → 2awr1c_vfsutb.js} +1 -1
- package/out/_next/static/chunks/{2q0rz76kj6h5z.js → 2b5nt7yn-pq3a.js} +1 -1
- package/out/_next/static/chunks/2bxe3kjr17tdp.js +1 -0
- package/out/_next/static/chunks/{2z9mdtudj8crz.js → 2c8rmxz151fxa.js} +20 -18
- package/out/_next/static/chunks/{35aagg46wp139.js → 2clevl_9ayd0x.js} +1 -1
- package/out/_next/static/chunks/{41qxc142snm22.js → 2dvbzar93ooc-.js} +1 -1
- package/out/_next/static/chunks/2e-vp0e11g9ew.js +1 -0
- package/out/_next/static/chunks/{2-p206i_ihx09.js → 2epukrz6paj9n.js} +1 -1
- package/out/_next/static/chunks/2exj9-0p6n9x-.js +1 -0
- package/out/_next/static/chunks/{05uqfgf-hh-p5.js → 2fspbfbxbswzd.js} +1 -1
- package/out/_next/static/chunks/2gf8l6hbmt7v3.js +1 -0
- package/out/_next/static/chunks/{1ph0tfo-4hl-f.js → 2h07np207nlx7.js} +1 -1
- package/out/_next/static/chunks/{11p92pnn5el0v.js → 2h9i_adbqaxs4.js} +1 -1
- package/out/_next/static/chunks/{0bj_310rugcn1.js → 2iu0_3cx-ny74.js} +11 -11
- package/out/_next/static/chunks/2jio3sio-_43z.js +1 -0
- package/out/_next/static/chunks/{0uxdbfa8gv6tk.js → 2kk_vvmr2xm3d.js} +29 -29
- package/out/_next/static/chunks/2kmmk9coo9_b0.js +505 -0
- package/out/_next/static/chunks/{055baac5e-c2o.js → 2laz1v9fg2a2z.js} +1 -1
- package/out/_next/static/chunks/{1qsut_e3msg0l.js → 2mjjo0yj-4ro4.js} +1 -1
- package/out/_next/static/chunks/{0av6n_6q6kzo3.js → 2mrkv0z2i74pv.js} +2 -2
- package/out/_next/static/chunks/{04_3ri5emyfcu.js → 2neieeo9g2u56.js} +1 -1
- package/out/_next/static/chunks/{1upkv4ltuh3s5.js → 2oacwtbslo90t.js} +84 -84
- package/out/_next/static/chunks/2pb_uosb-aa8x.js +1 -0
- package/out/_next/static/chunks/2qu-gpm3ux1l6.js +1 -0
- package/out/_next/static/chunks/2rsi6v7qmqx2b.js +1 -0
- package/out/_next/static/chunks/2s4fzgzkwjluu.js +2 -0
- package/out/_next/static/chunks/2tdvuc-27khif.js +1 -0
- package/out/_next/static/chunks/{2bm95r0011asw.js → 2trolrgd7neax.js} +1 -1
- package/out/_next/static/chunks/2uyuafmoe5wi0.js +3 -0
- package/out/_next/static/chunks/2w2e0pxgs-n8f.js +1 -0
- package/out/_next/static/chunks/{1qxhgauuomthl.js → 2wgh5i70bzelt.js} +60 -60
- package/out/_next/static/chunks/{3d76e_yd8l_0x.js → 2x-7kbwq8tl-o.js} +59 -59
- package/out/_next/static/chunks/{1t2exh89lnazc.js → 2xe4bgir5l-9b.js} +32 -99
- package/out/_next/static/chunks/2xujlsx3stqig.js +1 -0
- package/out/_next/static/chunks/{267q_eg-c6f6m.js → 3-yhe6rcsjh88.js} +1 -1
- package/out/_next/static/chunks/30y71dxdpv52d.js +1 -0
- package/out/_next/static/chunks/32c-e_v8_2xkf.js +1 -0
- package/out/_next/static/chunks/32oj0iudhp8bm.js +1 -0
- package/out/_next/static/chunks/{0w-hm7g7trtjg.js → 336ckqpboqmbn.js} +1 -1
- package/out/_next/static/chunks/33p9du6y9eegg.js +1 -0
- package/out/_next/static/chunks/{3w_umk1xtj6to.js → 36pz_ews7u0xb.js} +1 -1
- package/out/_next/static/chunks/{1ux1rpe-n1mai.js → 374lzksboll-t.js} +1 -1
- package/out/_next/static/chunks/38om-j0h0rryk.js +1 -0
- package/out/_next/static/chunks/{2wi7y3sfqyqdo.js → 38q0enmlg5q9o.js} +2 -2
- package/out/_next/static/chunks/{25gf6xn9u1c57.js → 39cou9lia_g7l.js} +1 -1
- package/out/_next/static/chunks/39pkya0_bvcaj.js +1 -0
- package/out/_next/static/chunks/{1x99m91nt1m3b.js → 39rhmj_32ujyj.js} +1 -1
- package/out/_next/static/chunks/3_1zzmx92j9c0.js +1 -0
- package/out/_next/static/chunks/{3z4suna4kq4j5.js → 3_dm45k0vk1aa.js} +34 -35
- package/out/_next/static/chunks/3_earszshuz4n.js +1 -0
- package/out/_next/static/chunks/{1ephzzweysylq.js → 3_gfl66zf638s.js} +38 -105
- package/out/_next/static/chunks/3ap_uxc8lx7ni.js +1 -0
- package/out/_next/static/chunks/{0pv2wirx45e1m.js → 3b6na8zrex8jo.js} +1 -1
- package/out/_next/static/chunks/3c0cxt72vilyz.js +1 -0
- package/out/_next/static/chunks/3cp5nmtwxq4gr.js +1 -0
- package/out/_next/static/chunks/{0tn-9w46cwydp.js → 3d43gd91r06y6.js} +39 -40
- package/out/_next/static/chunks/3g78x0pdaoi_4.js +1 -0
- package/out/_next/static/chunks/{1di5enkavl9vx.js → 3gjvl1p-tugfe.js} +2 -2
- package/out/_next/static/chunks/{1mrvp94tietcv.js → 3i8iro1gas1vx.js} +1 -1
- package/out/_next/static/chunks/{3-_08i4_7yhno.js → 3ioxfi3bvznhh.js} +1 -1
- package/out/_next/static/chunks/{2i82rmjta9ijs.js → 3j3ol_d1vsdhx.js} +1 -1
- package/out/_next/static/chunks/3kpqfqr99vo7z.js +1 -0
- package/out/_next/static/chunks/3lladf_wemm-2.js +1 -0
- package/out/_next/static/chunks/{0-0hui1_v3h8b.js → 3mmy9zsb7zo-m.js} +12 -9
- package/out/_next/static/chunks/{17aahvhpls1l7.js → 3my05px5mv_s5.js} +83 -16
- package/out/_next/static/chunks/3n62hbywoknop.js +1 -0
- package/out/_next/static/chunks/{0wq_9f98weoe3.js → 3nr48h9zwum-3.js} +1 -1
- package/out/_next/static/chunks/{2x83vs8ns4pww.js → 3nwaovnpiyrt8.js} +1 -1
- package/out/_next/static/chunks/3o_dmzpahx-5g.js +1 -0
- package/out/_next/static/chunks/{0g2wngc6oe7fd.js → 3p03l0z65c8vc.js} +27 -25
- package/out/_next/static/chunks/{00xc-0pj7on2s.js → 3puu2_-t0lln9.js} +29 -29
- package/out/_next/static/chunks/{077eo-0dhbxz-.js → 3qo7e6b73mfxq.js} +1 -1
- package/out/_next/static/chunks/3r7v7un976sn7.js +1 -0
- package/out/_next/static/chunks/{255knovck7pv2.js → 3rj-5v0j_2-_2.js} +4 -4
- package/out/_next/static/chunks/3rl_nhqwew40w.js +1 -0
- package/out/_next/static/chunks/3s7hqij6xp_4e.js +1 -0
- package/out/_next/static/chunks/{1ng-fqh2_n984.js → 3si3migsmvz9o.js} +1 -1
- package/out/_next/static/chunks/3t4ys6th6gf2w.js +1 -0
- package/out/_next/static/chunks/{1og49_atcksim.js → 3twr9ds68-9us.js} +1 -1
- package/out/_next/static/chunks/{2ftp5xmq_w23j.js → 3txu-i5qn183a.js} +65 -65
- package/out/_next/static/chunks/{3y_51bmdnc0ey.js → 3uarw1i1ij1er.js} +1 -1
- package/out/_next/static/chunks/3un-w6wutw1qn.js +1 -0
- package/out/_next/static/chunks/3v8kgnjk27wbe.js +1 -0
- package/out/_next/static/chunks/{1t7nl8rx7mabd.js → 3vtmucpx25o7q.js} +61 -61
- package/out/_next/static/chunks/{04j9pexbmysdy.js → 3vu5y270muh-7.js} +1 -1
- package/out/_next/static/chunks/3we1khqfexh3x.js +1 -0
- package/out/_next/static/chunks/3yk0hzfq5rcs6.js +1 -0
- package/out/_next/static/chunks/3z35loj4i-id4.js +1 -0
- package/out/_next/static/chunks/{28ndw4nsw2t_4.js → 3zv5kyos9vtmm.js} +1 -1
- package/out/_next/static/chunks/{1hsvckd0sgdgr.js → 415g3asdds1ac.js} +1 -1
- package/out/_next/static/chunks/{1nasz7q3tvb53.js → 42lqt7ig40wk5.js} +1 -1
- package/out/_next/static/chunks/42s6ghsurq5q7.js +1 -0
- package/out/_next/static/chunks/42yctcfi2rfwr.js +1 -0
- package/out/_next/static/chunks/43_fau1gg69eo.js +1 -0
- package/out/_next/static/chunks/43ywrdzg_7af8.js +31 -0
- package/out/_next/static/chunks/{1ho02fc091nj2.js → 44m1ijc5cv80x.js} +1 -1
- package/out/_next/static/chunks/{3k-gz8qf-mj-p.js → 453_bg0lgesmp.js} +1 -1
- package/out/_next/static/chunks/{turbopack-3r8yn0j92tqw_.js → turbopack-1s36ieuku1ds3.js} +1 -1
- package/out/_not-found/__next._full.txt +9 -9
- package/out/_not-found/__next._head.txt +4 -4
- package/out/_not-found/__next._index.txt +4 -4
- package/out/_not-found/__next._not-found.__PAGE__.txt +2 -2
- package/out/_not-found/__next._not-found.txt +3 -3
- package/out/_not-found/__next._tree.txt +2 -2
- package/out/_not-found.html +1 -1
- package/out/_not-found.txt +9 -9
- package/out/index.html +1 -1
- package/out/index.txt +11 -11
- package/package.json +14 -14
- package/out/_next/static/chunks/00g5suuoa-_wn.js +0 -1
- package/out/_next/static/chunks/00o9hr_3hd0r8.js +0 -1
- package/out/_next/static/chunks/01fh3_bncbe5u.js +0 -1
- package/out/_next/static/chunks/01urdkl1j8o6l.js +0 -1
- package/out/_next/static/chunks/026vw95s88gsy.js +0 -1
- package/out/_next/static/chunks/02eui3ctddbd2.js +0 -1
- package/out/_next/static/chunks/04c4nksb5y9r-.js +0 -1
- package/out/_next/static/chunks/04g-l-_b4payc.js +0 -1
- package/out/_next/static/chunks/05bdni_jrobq1.js +0 -1
- package/out/_next/static/chunks/05o0tb8l_htmw.js +0 -1
- package/out/_next/static/chunks/07z6p262h5hgl.js +0 -1
- package/out/_next/static/chunks/08m_4cihfmik8.js +0 -1
- package/out/_next/static/chunks/08obqw64faj8j.js +0 -1
- package/out/_next/static/chunks/09ppu_k464q-n.js +0 -1
- package/out/_next/static/chunks/0bgcaf2x51kms.js +0 -1
- package/out/_next/static/chunks/0dg4wxz-6u5lo.js +0 -1
- package/out/_next/static/chunks/0erga_bzezbza.js +0 -1
- package/out/_next/static/chunks/0f0-i105odxqd.js +0 -1
- package/out/_next/static/chunks/0gyeqz9pagssf.js +0 -1
- package/out/_next/static/chunks/0i82k-t0fbn8f.js +0 -1
- package/out/_next/static/chunks/0kzw45f61wm3j.js +0 -1
- package/out/_next/static/chunks/0l8bfa2xewq69.js +0 -1
- package/out/_next/static/chunks/0qxd_8t3nca36.js +0 -1
- package/out/_next/static/chunks/0s1jghzw8jufz.js +0 -1
- package/out/_next/static/chunks/0ti58h622yo-_.js +0 -2
- package/out/_next/static/chunks/0u8yr4k1y6m2t.js +0 -1
- package/out/_next/static/chunks/0ubxyut5rr600.js +0 -1
- package/out/_next/static/chunks/0wbw9h7rsis2r.js +0 -1
- package/out/_next/static/chunks/0y4e49hpuucdi.js +0 -1
- package/out/_next/static/chunks/0yvevihll7sz-.js +0 -1
- package/out/_next/static/chunks/1-b44873bjsdw.js +0 -1
- package/out/_next/static/chunks/1-c3a1vnl8v1q.js +0 -1
- package/out/_next/static/chunks/1-xf86jgea22y.js +0 -1
- package/out/_next/static/chunks/10b0qqdnb_nox.js +0 -1
- package/out/_next/static/chunks/12kdmh0h_mboy.js +0 -1
- package/out/_next/static/chunks/141tngxsk32hq.js +0 -1
- package/out/_next/static/chunks/14ijcpo72av4r.js +0 -1
- package/out/_next/static/chunks/16hdip1drt8o-.js +0 -1
- package/out/_next/static/chunks/18txc1wwwu9f9.js +0 -1
- package/out/_next/static/chunks/19dp8nr4uygg2.js +0 -5
- package/out/_next/static/chunks/1_8acnu6_-qe-.js +0 -1
- package/out/_next/static/chunks/1bmyq1b0by7ug.js +0 -1
- package/out/_next/static/chunks/1d1tpj9nm1nhf.js +0 -1
- package/out/_next/static/chunks/1dfwa563iciz3.js +0 -1
- package/out/_next/static/chunks/1fwsjnd1y-lx_.js +0 -1
- package/out/_next/static/chunks/1gaexq_suxai0.js +0 -1
- package/out/_next/static/chunks/1gnggc6370ji-.js +0 -1
- package/out/_next/static/chunks/1gtj_l5ame5mw.js +0 -1
- package/out/_next/static/chunks/1i4f3n_2_3ery.js +0 -1
- package/out/_next/static/chunks/1j7e3qpjuj89a.js +0 -1
- package/out/_next/static/chunks/1qjsgebn9m-0l.js +0 -1
- package/out/_next/static/chunks/1rb8wewjbdisv.js +0 -1
- package/out/_next/static/chunks/1rr74xxjtckyv.js +0 -1
- package/out/_next/static/chunks/1uu55ejvi7q5u.js +0 -1
- package/out/_next/static/chunks/1xbzxfeq9789f.js +0 -1
- package/out/_next/static/chunks/1ybiu-rkt50_1.js +0 -1
- package/out/_next/static/chunks/20qelrstvz9_n.js +0 -1
- package/out/_next/static/chunks/21at65obnoo8z.js +0 -1
- package/out/_next/static/chunks/21ko5mxfderw0.js +0 -1
- package/out/_next/static/chunks/21muzwu43o8xg.js +0 -1
- package/out/_next/static/chunks/23d-hvrwpixpm.js +0 -1
- package/out/_next/static/chunks/2569rrrffvm2w.js +0 -31
- package/out/_next/static/chunks/29o74k0d6hkdf.js +0 -1
- package/out/_next/static/chunks/2btabnibkm0db.js +0 -1
- package/out/_next/static/chunks/2c--awgkdcikq.js +0 -1
- package/out/_next/static/chunks/2ep7mjbaoeou0.js +0 -1
- package/out/_next/static/chunks/2ezgqm7atphi6.js +0 -1
- package/out/_next/static/chunks/2gfjzq_vjea4w.js +0 -1
- package/out/_next/static/chunks/2h5hase6ewoyc.js +0 -1
- package/out/_next/static/chunks/2hghi41nhdww2.css +0 -3
- package/out/_next/static/chunks/2ies66gmou203.js +0 -1
- package/out/_next/static/chunks/2jenu2eek9viz.js +0 -1
- package/out/_next/static/chunks/2luaj_cf5f19-.js +0 -1
- package/out/_next/static/chunks/2mgmvz66gh5ub.js +0 -1
- package/out/_next/static/chunks/2nwlqtv3vrzcv.js +0 -1
- package/out/_next/static/chunks/2si5cg3hl5dtf.js +0 -4
- package/out/_next/static/chunks/2uhrhq35bki6u.js +0 -1
- package/out/_next/static/chunks/2zdzgmacaoor9.js +0 -1
- package/out/_next/static/chunks/2zyjw8g4tiu51.js +0 -1
- package/out/_next/static/chunks/3-irhmtm1q5qw.js +0 -1
- package/out/_next/static/chunks/3-k74vn9exnb6.js +0 -1
- package/out/_next/static/chunks/34845aqksy1dl.js +0 -3
- package/out/_next/static/chunks/34y7nx6qmat06.js +0 -1
- package/out/_next/static/chunks/36rqw8h6ildpl.js +0 -1
- package/out/_next/static/chunks/3a_khw6q6pyh1.js +0 -1
- package/out/_next/static/chunks/3c_31f20z4jrl.js +0 -1
- package/out/_next/static/chunks/3ckp70rgr63u9.js +0 -1
- package/out/_next/static/chunks/3ed24zmt8qfys.js +0 -1
- package/out/_next/static/chunks/3ez20hi1mxw0w.js +0 -1
- package/out/_next/static/chunks/3fdx-rnos5ft-.js +0 -1
- package/out/_next/static/chunks/3fgfbxxb-j_bn.js +0 -4
- package/out/_next/static/chunks/3lehc5pujwhsz.js +0 -1
- package/out/_next/static/chunks/3m0ytnc241yfz.js +0 -1
- package/out/_next/static/chunks/3mpe7c3iyxn5h.js +0 -1
- package/out/_next/static/chunks/3nw7u4bie0-g6.js +0 -1
- package/out/_next/static/chunks/3qatb38-tk_gd.js +0 -1
- package/out/_next/static/chunks/3tdcdi_utmoy_.js +0 -1
- package/out/_next/static/chunks/3tt_ir_va6262.js +0 -1
- package/out/_next/static/chunks/43qmngblcab8f.js +0 -1
- /package/out/_next/static/{BvOGdrl2Cfw-jVV73WY6a → 5UjNvd7WCk97iC2cSmEGH}/_buildManifest.js +0 -0
- /package/out/_next/static/{BvOGdrl2Cfw-jVV73WY6a → 5UjNvd7WCk97iC2cSmEGH}/_clientMiddlewareManifest.js +0 -0
- /package/out/_next/static/{BvOGdrl2Cfw-jVV73WY6a → 5UjNvd7WCk97iC2cSmEGH}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,35651,e=>{"use strict";function t(e){return{id:e.id,type:"function",function:{name:e.name,arguments:JSON.stringify(e.arguments??{})}}}e.s(["parseOpenAiCompletion",0,function(e){let t=e.choices?.[0]?.message,s=t?.tool_calls??[],n=t?.content??"";return s.length>0?{kind:"tool_calls",toolCalls:s.map(e=>({id:e.id,name:e.function.name,arguments:function(e){if(!e)return{};try{let t=JSON.parse(e);return t&&"object"==typeof t?t:{}}catch{return{}}}(e.function.arguments)})),...n?{content:n}:{}}:{kind:"final",content:n}},"toOpenAiMessages",0,function(e){return e.map(e=>{switch(e.role){case"assistant":return{role:"assistant",content:e.content,...e.toolCalls&&e.toolCalls.length>0?{tool_calls:e.toolCalls.map(t)}:{}};case"tool":return{role:"tool",content:e.content,tool_call_id:e.toolCallId,name:e.name};default:return{role:e.role,content:e.content}}})},"toOpenAiTools",0,function(e){return e.map(e=>({type:"function",function:{name:e.name,description:e.description,parameters:e.parameters}}))}])},36542,74698,e=>{"use strict";let t="uptimizr.assistant.backend";function s(){try{return globalThis.localStorage}catch{return}}function n(e=globalThis.navigator){return!!(e&&"gpu"in e&&e.gpu)}e.s(["isWebGpuAvailable",0,n,"loadBackendConfig",0,function(e=s()){let n;if(!e)return null;try{n=e.getItem(t)}catch{return null}if(!n)return null;try{var a;let e=JSON.parse(n);if(!e||"object"!=typeof e||(a=e.backend,"local"!==a&&"hosted"!==a))return null;return e}catch{return null}},"saveBackendConfig",0,function(e,n=s()){if(n)try{n.setItem(t,JSON.stringify(e))}catch{}}],74698);var a=e.i(35651);let r=["Hermes-2-Pro-Llama-3-8B-q4f16_1-MLC","Hermes-2-Pro-Llama-3-8B-q4f32_1-MLC","Hermes-2-Pro-Mistral-7B-q4f16_1-MLC","Hermes-3-Llama-3.1-8B-q4f32_1-MLC","Hermes-3-Llama-3.1-8B-q4f16_1-MLC"],o=Math.round(0x20000000),i=[{id:"Hermes-3-Llama-3.1-8B-q4f16_1-MLC",label:"Hermes 3 (Llama 3.1 8B)",downloadSize:"~4.5 GB",downloadBytes:Math.round(0x120000000),vram:"~4.9 GB",description:"Highest quality; the default. Needs a capable GPU (~5 GB VRAM)."},{id:"Hermes-2-Pro-Llama-3-8B-q4f16_1-MLC",label:"Hermes 2 Pro (Llama 3 8B)",downloadSize:"~4.6 GB",downloadBytes:Math.round(4939212390.4),vram:"~5.0 GB",description:"Stronger Llama-3 base; needs a capable GPU."},{id:"Hermes-2-Pro-Mistral-7B-q4f16_1-MLC",label:"Hermes 2 Pro (Mistral 7B)",downloadSize:"~3.9 GB",downloadBytes:Math.round(4187593113.6),vram:"~4.0 GB",description:"Smallest tool-calling model; the least-VRAM fallback."}];class l extends Error{constructor(){super("WebGPU is not available in this browser; the local model cannot run."),this.name="WebGpuUnavailableError"}}class c extends Error{constructor(){super("Model download was not confirmed by the user."),this.name="WebLlmConsentError"}}class d extends Error{constructor(e){super(`${e} is not supported for tool-calling. The assistant requires function calling; WebLLM supports it only on these models: ${r.join(", ")}.`),this.name="UnsupportedToolCallingModelError"}}class u extends Error{constructor(e){super(e??"Your browser is out of storage for the local model (each model needs ~4 GB of cache). Free up disk space, clear this site's cached data, or switch to a hosted backend, then retry."),this.name="WebLlmStorageError"}}function m(e){return("u">typeof DOMException&&e instanceof DOMException?"QuotaExceededError"===e.name:"object"==typeof e&&null!==e&&"name"in e&&"QuotaExceededError"===e.name)?new u:e}async function p(e){let t,s=function(){let e="u">typeof navigator?navigator.storage:void 0;if(e&&"function"==typeof e.estimate)return e}();if(!s)return;try{t=await s.estimate()}catch{return}let n=t.quota,a=t.usage??0;if("number"==typeof n&&!(n<=0)&&n-a<e.downloadBytes+o){let t=(e.downloadBytes/0x40000000).toFixed(1);throw new u(`Not enough browser storage for ${e.label}: it needs about ${t} GB of free cache space. Free up disk space or clear this site's cached data, then retry — or switch to a hosted backend.`)}}let h=()=>e.A(688);e.s(["CURATED_MODELS",0,i,"createWebLlmProvider",0,function(e={}){var t;let s,o=((t=e.model)?i.find(e=>e.id===t):i[0])??{id:t??"",label:t??"",downloadSize:"?",downloadBytes:0,vram:"?",description:""};if(!r.includes(o.id))throw new d(o.id);let u=e.loadRuntime??h,g=e.hasWebGpu??(()=>n()),x=e.contextWindowSize??8192;async function f(){if(!g())throw new l;if(e.confirmDownload&&!await e.confirmDownload(o))throw new c;await p(o);let t=await u();try{return await t.CreateMLCEngine(o.id,{initProgressCallback:e.onInitProgress?t=>e.onInitProgress?.({progress:t.progress,text:t.text}):void 0},{context_window_size:x})}catch(e){throw m(e)}}return{async complete(e){let t=await (!s&&(s=f().catch(e=>{throw s=void 0,e})),s),n=e.tools.length>0,r=n?function(e){let t=[],s=[];for(let n of e)"system"===n.role?t.push(n.content):s.push(n);if(0===t.length)return[...e];let n=t.join("\n\n"),a=s.findIndex(e=>"user"===e.role);return -1===a?[{role:"user",content:n},...s]:s.map((e,t)=>t!==a?e:{role:"user",content:n+"\n\n"+e.content})}(e.messages):e.messages;try{let s=await t.chat.completions.create({messages:(0,a.toOpenAiMessages)(r),...n?{tools:(0,a.toOpenAiTools)(e.tools),tool_choice:"auto"}:{},stream:!1});return(0,a.parseOpenAiCompletion)(s)}catch(e){throw m(e)}},async unload(){let e=s;if(s=void 0,!e)return;let t=await e.catch(()=>void 0);await t?.unload?.()}}}],36542)},80760,e=>{"use strict";e.s([],60301),e.i(60301);var t=e.i(19594),s=e.i(17422);let n=e=>"number"==typeof e?e:void 0,a=e=>"string"==typeof e?e:void 0,r=s.z.number().int().optional().describe("Start of the time range, epoch milliseconds."),o=s.z.number().int().optional().describe("End of the time range, epoch milliseconds."),i=s.z.number().int().positive().max(500).optional().describe("Grid resolution per axis."),l=s.z.number().int().positive().max(1e3).optional().describe("Maximum rows to return."),c=s.z.string().optional().describe("Restrict to one developer-assigned scene id."),d=s.z.string().optional().describe("Scope the aggregate to a single session id."),u=s.z.number().positive().max(1e3).optional().describe("Voxel size in world units."),m=s.z.number().int().positive().optional().describe("Time-series bucket width, seconds."),p=s.z.string().optional().describe("Restrict to a single event type, e.g. pointer_click."),h=s.z.enum(["mouse","touch","stylus","pen","xr-controller","hand","gaze","transient","other"]).optional().describe("Restrict a pointer/world heatmap to one input source."),g=s.z.enum(["viewer","first-person"]).optional().describe("Camera navigation mode to scope to: 'viewer' (orbit) or 'first-person' (walkable)."),x=s.z.number().nonnegative().max(Math.PI).optional().describe("Rapid-turn threshold in radians (0..π); view turns above this flag motion-sickness risk."),f=s.z.string().min(1).describe('Funnel steps as a JSON-encoded array of ordered step predicates (ADR 0038). Required. Each step is `{ "type": <event_type>, ... }`; e.g. `[{"type":"scene_change","to":"lobby"},{"type":"mesh_interaction","mesh":"buy"}]`.');function b(e){return{since:n(e.since),until:n(e.until)}}let v=[{name:"list_sessions",title:"List recent sessions",description:"Recent sessions with id, visitor, event count, and start/end times.",inputSchema:{since:r,until:o,limit:l},buildRequest:e=>({path:"api/v1/sessions",params:{...b(e),limit:n(e.limit)}})},{name:"pointer_heatmap",title:"2D pointer heatmap",description:"Binned 2D pointer-position heatmap (screen-normalized).",inputSchema:{since:r,until:o,bins:i,scene:c,source:h,session:d},buildRequest:e=>({path:"api/v1/heatmaps/pointer",params:{...b(e),bins:n(e.bins),scene:a(e.scene),source:a(e.source),session:a(e.session)}})},{name:"world_heatmap",title:"3D world-space pointer heatmap",description:"Voxelized world-space pointer heatmap.",inputSchema:{since:r,until:o,cellSize:u,limit:l,scene:c,source:h},buildRequest:e=>({path:"api/v1/heatmaps/world",params:{...b(e),cellSize:n(e.cellSize),limit:n(e.limit),scene:a(e.scene),source:a(e.source)}})},{name:"camera_heatmap",title:"View-direction heatmap",description:"Camera view-direction distribution as spherical bins.",inputSchema:{since:r,until:o,bins:i,scene:c,session:d},buildRequest:e=>({path:"api/v1/heatmaps/camera",params:{...b(e),bins:n(e.bins),scene:a(e.scene),session:a(e.session)}})},{name:"click_rays",title:"View-gated click rays",description:"Clicks ASOF-joined to their nearest camera sample, per voxel and clicked mesh.",inputSchema:{since:r,until:o,cellSize:u,limit:l,scene:c,source:h,session:d},buildRequest:e=>({path:"api/v1/heatmaps/click-rays",params:{...b(e),cellSize:n(e.cellSize),limit:n(e.limit),scene:a(e.scene),source:a(e.source),session:a(e.session)}})},{name:"flow_links",title:"Gaze→mesh flow links",description:"Aggregate links from camera-direction bins to clicked meshes.",inputSchema:{since:r,until:o,bins:i,limit:l,scene:c,session:d},buildRequest:e=>({path:"api/v1/heatmaps/flow",params:{...b(e),bins:n(e.bins),limit:n(e.limit),scene:a(e.scene),session:a(e.session)}})},{name:"top_meshes",title:"Most-interacted meshes",description:"Meshes ranked by interaction count.",inputSchema:{since:r,until:o,limit:l,session:d},buildRequest:e=>({path:"api/v1/meshes/top",params:{...b(e),limit:n(e.limit),session:a(e.session)}})},{name:"perf_summary",title:"Rendering performance summary",description:"Sample count and avg/min/p50 FPS over the range.",inputSchema:{since:r,until:o,session:d},buildRequest:e=>({path:"api/v1/perf",params:{...b(e),session:a(e.session)}})},{name:"list_scenes",title:"List active scenes",description:"Distinct developer-assigned scenes with activity.",inputSchema:{since:r,until:o,limit:l},buildRequest:e=>({path:"api/v1/scenes",params:{...b(e),limit:n(e.limit)}})},{name:"timeseries",title:"Event-volume time series",description:"Event-volume buckets over time, with average FPS per bucket.",inputSchema:{since:r,until:o,interval:m,scene:c,type:p},buildRequest:e=>({path:"api/v1/timeseries",params:{...b(e),interval:n(e.interval),scene:a(e.scene),type:a(e.type)}})},{name:"event_counts",title:"Per-event-type counts",description:"Counts per event type over the range (scene-health panel).",inputSchema:{since:r,until:o,scene:c},buildRequest:e=>({path:"api/v1/event-counts",params:{...b(e),scene:a(e.scene)}})},{name:"session_meta",title:"Session descriptor",description:"Coarse descriptor for one session (device/scene/user). No raw event stream.",inputSchema:{sessionId:s.z.string().min(1).describe("The session id to describe.")},buildRequest:e=>({path:`api/v1/sessions/${encodeURIComponent(a(e.sessionId)??"")}/meta`,params:{}})},{name:"scene_representation",title:"Scene representation",description:"Registered proxy geometry (bounds/meshes) for one scene, if any.",inputSchema:{sceneId:s.z.string().min(1).describe("The scene id to fetch.")},buildRequest:e=>({path:`api/v1/scenes/${encodeURIComponent(a(e.sceneId)??"")}/representation`,params:{}})},{name:"funnel",title:"Conversion funnel",description:"Ordered, per-session conversion funnel (ADR 0038): how many sessions reach each caller-supplied step. Steps are a JSON array (see the `steps` argument).",inputSchema:{since:r,until:o,scene:c,cameraMode:g,steps:f},buildRequest:e=>({path:"api/v1/funnel",params:{...b(e),scene:a(e.scene),cameraMode:a(e.cameraMode),steps:a(e.steps)}})},{name:"aggregate_paths",title:"Aggregate desire-line paths",description:"Crowd-level movement routes (ADR 0037): every session's camera path binned onto the ground grid and returned as ordered, session-keyed points for an overlaid route map.",inputSchema:{since:r,until:o,cellSize:u,limit:l,scene:c,cameraMode:g},buildRequest:e=>({path:"api/v1/paths",params:{...b(e),cellSize:n(e.cellSize),limit:n(e.limit),scene:a(e.scene),cameraMode:a(e.cameraMode)}})},{name:"rendering_technology",title:"Rendering-technology breakdown",description:"Rendering-technology mix from session_start.graphics (ADR 0046): session count per (api, backend, api_version, shading_language) — WebGPU vs WebGL2 and shading language.",inputSchema:{since:r,until:o,scene:c,session:d},buildRequest:e=>({path:"api/v1/rendering-technology",params:{...b(e),scene:a(e.scene),session:a(e.session)}})},{name:"xr_rotation",title:"XR head-rotation rate",description:"XR head/view rotation rate (ADR 0048), a motion-sickness proxy: per-session rapid-turn counts over the camera pose stream.",inputSchema:{since:r,until:o,rapidTurn:x,limit:l,scene:c,session:d},buildRequest:e=>({path:"api/v1/xr/rotation",params:{...b(e),rapidTurn:n(e.rapidTurn),limit:n(e.limit),scene:a(e.scene),session:a(e.session)}})},{name:"xr_sources",title:"XR input-source usage",description:"XR input-source split (ADR 0048): hand vs. controller vs. gaze usage.",inputSchema:{since:r,until:o,limit:l,scene:c,session:d},buildRequest:e=>({path:"api/v1/xr/sources",params:{...b(e),limit:n(e.limit),scene:a(e.scene),session:a(e.session)}})},{name:"xr_abandonment",title:"XR session abandonment",description:"XR session abandonment (ADR 0048): per XR session, its time bounds and event/interaction counts; a short span signals headset drop-off.",inputSchema:{since:r,until:o,limit:l,scene:c,session:d},buildRequest:e=>({path:"api/v1/xr/abandonment",params:{...b(e),limit:n(e.limit),scene:a(e.scene),session:a(e.session)}})},{name:"xr_locomotion",title:"XR locomotion & comfort",description:"XR locomotion & comfort (ADR 0048): per XR session, its locomotion-style mix (fly / navigate / teleport + duration) and wall-clock span — a discomfort proxy.",inputSchema:{since:r,until:o,limit:l,scene:c,session:d},buildRequest:e=>({path:"api/v1/xr/locomotion",params:{...b(e),limit:n(e.limit),scene:a(e.scene),session:a(e.session)}})}],y=["list_sessions","list_scenes","top_meshes","perf_summary","event_counts","timeseries","camera_heatmap"],w=v.filter(e=>y.includes(e.name));async function k(e){let{provider:t,client:n,signal:a}=e,r=e.tools??v,o=e.maxSteps??8,i=e.forceFinalAnswer??!0,l=e.maxToolResultChars??8e3,c=new Map(r.map(e=>[e.name,e])),d=function(e=v){return e.map(e=>({name:e.name,description:e.description,parameters:s.z.toJSONSchema(s.z.object(e.inputSchema))}))}(r),u=[...e.messages],m=0,p=!1;async function h(){p=!0;let e=[...u,{role:"user",content:"Now answer the user's question directly in plain text, using the tool results already gathered above. Do not call any tools. If the data is insufficient, say so briefly."}],s=await t.complete({messages:e,tools:[],signal:a});return"final"===s.kind?s.content:s.content??""}for(;m<o;){m+=1;let e=await t.complete({messages:u,tools:d,signal:a});if("final"===e.kind){if(""===e.content.trim()&&i&&!p){let e=await h();if(""!==e.trim())return u.push({role:"assistant",content:e}),{content:e,messages:u,steps:m,stoppedOnMaxSteps:!1}}return u.push({role:"assistant",content:e.content}),{content:e.content,messages:u,steps:m,stoppedOnMaxSteps:!1}}for(let t of(u.push({role:"assistant",content:e.content??"",toolCalls:e.toolCalls}),e.toolCalls))u.push(await j(n,c.get(t.name),t,l))}if(i&&!p){let e=await h();if(""!==e.trim())return u.push({role:"assistant",content:e}),{content:e,messages:u,steps:m,stoppedOnMaxSteps:!0}}return{content:"",messages:u,steps:m,stoppedOnMaxSteps:!0}}async function j(e,t,n,a){let r=e=>({role:"tool",toolCallId:n.id,name:n.name,content:e});if(!t)return r(`Error: unknown tool "${n.name}".`);let o=s.z.object(t.inputSchema).safeParse(n.arguments??{});if(!o.success){let e=o.error.issues.map(e=>`${e.path.join(".")||"(root)"}: ${e.message}`).join("; ");return r(`Error: invalid arguments for "${n.name}": ${e}`)}try{let{path:s,params:n}=t.buildRequest(o.data),i=await e.get(s,n);return r(function(e,t){if(e.length<=t)return e;let s=e.length-t;return`${e.slice(0,t)}…[truncated ${s} chars]`}(JSON.stringify(i),a))}catch(t){let e=t instanceof Error?t.message:String(t);return r(`Error: ${e}`)}}var S=e.i(36542),N=e.i(74698),C=e.i(20880);let R=(0,t.createContext)(null),_='You are Uptimizr\'s in-browser analytics assistant. You help a developer understand\ntheir 3D-scene analytics by calling read-only tools against their own collector\'s\nquery API and summarising the results in clear, concise prose.\n\nGuidelines:\n- Use the provided tools to fetch data before answering; never invent numbers.\n- All data is aggregate and privacy-preserving — there are no raw per-session events,\n no PII, and no way to ingest or modify data. Do not claim otherwise.\n- Timestamps are epoch milliseconds. When the user gives a relative range\n ("this week", "last 24h"), convert it to `since`/`until` before calling a tool.\n- Prefer a short, direct answer with the key figures. Call out caveats (small sample\n sizes, missing scenes) when relevant.\n- If a tool returns an error, explain what went wrong and, if useful, try a corrected call.';function A(e=_,t=Date.now()){let s=new Date(t).toISOString(),n=`Current time: ${s} (epoch milliseconds: ${t}). Resolve any relative time range in the question against this — "today" is the current calendar day, "this week" the last 7 days, "last 24h" the preceding 24 hours — into concrete \`since\`/\`until\` epoch-ms arguments.`;return`${e}
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,35651,e=>{"use strict";function t(e){return{id:e.id,type:"function",function:{name:e.name,arguments:JSON.stringify(e.arguments??{})}}}e.s(["parseOpenAiCompletion",0,function(e){let t=e.choices?.[0]?.message,s=t?.tool_calls??[],n=t?.content??"";return s.length>0?{kind:"tool_calls",toolCalls:s.map(e=>({id:e.id,name:e.function.name,arguments:function(e){if(!e)return{};try{let t=JSON.parse(e);return t&&"object"==typeof t?t:{}}catch{return{}}}(e.function.arguments)})),...n?{content:n}:{}}:{kind:"final",content:n}},"toOpenAiMessages",0,function(e){return e.map(e=>{switch(e.role){case"assistant":return{role:"assistant",content:e.content,...e.toolCalls&&e.toolCalls.length>0?{tool_calls:e.toolCalls.map(t)}:{}};case"tool":return{role:"tool",content:e.content,tool_call_id:e.toolCallId,name:e.name};default:return{role:e.role,content:e.content}}})},"toOpenAiTools",0,function(e){return e.map(e=>({type:"function",function:{name:e.name,description:e.description,parameters:e.parameters}}))}])},36542,74698,e=>{"use strict";let t="uptimizr.assistant.backend";function s(){try{return globalThis.localStorage}catch{return}}function n(e=globalThis.navigator){return!!(e&&"gpu"in e&&e.gpu)}e.s(["isWebGpuAvailable",0,n,"loadBackendConfig",0,function(e=s()){let n;if(!e)return null;try{n=e.getItem(t)}catch{return null}if(!n)return null;try{var a;let e=JSON.parse(n);if(!e||"object"!=typeof e||(a=e.backend,"local"!==a&&"hosted"!==a))return null;return e}catch{return null}},"saveBackendConfig",0,function(e,n=s()){if(n)try{n.setItem(t,JSON.stringify(e))}catch{}}],74698);var a=e.i(35651);let r=["Hermes-2-Pro-Llama-3-8B-q4f16_1-MLC","Hermes-2-Pro-Llama-3-8B-q4f32_1-MLC","Hermes-2-Pro-Mistral-7B-q4f16_1-MLC","Hermes-3-Llama-3.1-8B-q4f32_1-MLC","Hermes-3-Llama-3.1-8B-q4f16_1-MLC"],o=Math.round(0x20000000),i=[{id:"Hermes-3-Llama-3.1-8B-q4f16_1-MLC",label:"Hermes 3 (Llama 3.1 8B)",downloadSize:"~4.5 GB",downloadBytes:Math.round(0x120000000),vram:"~4.9 GB",description:"Highest quality; the default. Needs a capable GPU (~5 GB VRAM)."},{id:"Hermes-2-Pro-Llama-3-8B-q4f16_1-MLC",label:"Hermes 2 Pro (Llama 3 8B)",downloadSize:"~4.6 GB",downloadBytes:Math.round(4939212390.4),vram:"~5.0 GB",description:"Stronger Llama-3 base; needs a capable GPU."},{id:"Hermes-2-Pro-Mistral-7B-q4f16_1-MLC",label:"Hermes 2 Pro (Mistral 7B)",downloadSize:"~3.9 GB",downloadBytes:Math.round(4187593113.6),vram:"~4.0 GB",description:"Smallest tool-calling model; the least-VRAM fallback."}];class l extends Error{constructor(){super("WebGPU is not available in this browser; the local model cannot run."),this.name="WebGpuUnavailableError"}}class c extends Error{constructor(){super("Model download was not confirmed by the user."),this.name="WebLlmConsentError"}}class d extends Error{constructor(e){super(`${e} is not supported for tool-calling. The assistant requires function calling; WebLLM supports it only on these models: ${r.join(", ")}.`),this.name="UnsupportedToolCallingModelError"}}class u extends Error{constructor(e){super(e??"Your browser is out of storage for the local model (each model needs ~4 GB of cache). Free up disk space, clear this site's cached data, or switch to a hosted backend, then retry."),this.name="WebLlmStorageError"}}function m(e){return("u">typeof DOMException&&e instanceof DOMException?"QuotaExceededError"===e.name:"object"==typeof e&&null!==e&&"name"in e&&"QuotaExceededError"===e.name)?new u:e}async function p(e){let t,s=function(){let e="u">typeof navigator?navigator.storage:void 0;if(e&&"function"==typeof e.estimate)return e}();if(!s)return;try{t=await s.estimate()}catch{return}let n=t.quota,a=t.usage??0;if("number"==typeof n&&!(n<=0)&&n-a<e.downloadBytes+o){let t=(e.downloadBytes/0x40000000).toFixed(1);throw new u(`Not enough browser storage for ${e.label}: it needs about ${t} GB of free cache space. Free up disk space or clear this site's cached data, then retry — or switch to a hosted backend.`)}}let h=()=>e.A(688);e.s(["CURATED_MODELS",0,i,"createWebLlmProvider",0,function(e={}){var t;let s,o=((t=e.model)?i.find(e=>e.id===t):i[0])??{id:t??"",label:t??"",downloadSize:"?",downloadBytes:0,vram:"?",description:""};if(!r.includes(o.id))throw new d(o.id);let u=e.loadRuntime??h,g=e.hasWebGpu??(()=>n()),x=e.contextWindowSize??8192;async function f(){if(!g())throw new l;if(e.confirmDownload&&!await e.confirmDownload(o))throw new c;await p(o);let t=await u();try{return await t.CreateMLCEngine(o.id,{initProgressCallback:e.onInitProgress?t=>e.onInitProgress?.({progress:t.progress,text:t.text}):void 0},{context_window_size:x})}catch(e){throw m(e)}}return{async complete(e){let t=await (!s&&(s=f().catch(e=>{throw s=void 0,e})),s),n=e.tools.length>0,r=n?function(e){let t=[],s=[];for(let n of e)"system"===n.role?t.push(n.content):s.push(n);if(0===t.length)return[...e];let n=t.join("\n\n"),a=s.findIndex(e=>"user"===e.role);return -1===a?[{role:"user",content:n},...s]:s.map((e,t)=>t!==a?e:{role:"user",content:n+"\n\n"+e.content})}(e.messages):e.messages;try{let s=await t.chat.completions.create({messages:(0,a.toOpenAiMessages)(r),...n?{tools:(0,a.toOpenAiTools)(e.tools),tool_choice:"auto"}:{},stream:!1});return(0,a.parseOpenAiCompletion)(s)}catch(e){throw m(e)}},async unload(){let e=s;if(s=void 0,!e)return;let t=await e.catch(()=>void 0);await t?.unload?.()}}}],36542)},80760,e=>{"use strict";e.s([],60301),e.i(60301);var t=e.i(57431),s=e.i(17422);let n=e=>"number"==typeof e?e:void 0,a=e=>"string"==typeof e?e:void 0,r=s.z.number().int().optional().describe("Start of the time range, epoch milliseconds."),o=s.z.number().int().optional().describe("End of the time range, epoch milliseconds."),i=s.z.number().int().positive().max(500).optional().describe("Grid resolution per axis."),l=s.z.number().int().positive().max(1e3).optional().describe("Maximum rows to return."),c=s.z.string().optional().describe("Restrict to one developer-assigned scene id."),d=s.z.string().optional().describe("Scope the aggregate to a single session id."),u=s.z.number().positive().max(1e3).optional().describe("Voxel size in world units."),m=s.z.number().int().positive().optional().describe("Time-series bucket width, seconds."),p=s.z.string().optional().describe("Restrict to a single event type, e.g. pointer_click."),h=s.z.enum(["mouse","touch","stylus","pen","xr-controller","hand","gaze","transient","other"]).optional().describe("Restrict a pointer/world heatmap to one input source."),g=s.z.enum(["viewer","first-person"]).optional().describe("Camera navigation mode to scope to: 'viewer' (orbit) or 'first-person' (walkable)."),x=s.z.number().nonnegative().max(Math.PI).optional().describe("Rapid-turn threshold in radians (0..π); view turns above this flag motion-sickness risk."),f=s.z.string().min(1).describe('Funnel steps as a JSON-encoded array of ordered step predicates (ADR 0038). Required. Each step is `{ "type": <event_type>, ... }`; e.g. `[{"type":"scene_change","to":"lobby"},{"type":"mesh_interaction","mesh":"buy"}]`.');function b(e){return{since:n(e.since),until:n(e.until)}}let y=[{name:"list_sessions",title:"List recent sessions",description:"Recent sessions with id, visitor, event count, and start/end times.",inputSchema:{since:r,until:o,limit:l},buildRequest:e=>({path:"api/v1/sessions",params:{...b(e),limit:n(e.limit)}})},{name:"pointer_heatmap",title:"2D pointer heatmap",description:"Binned 2D pointer-position heatmap (screen-normalized).",inputSchema:{since:r,until:o,bins:i,scene:c,source:h,session:d},buildRequest:e=>({path:"api/v1/heatmaps/pointer",params:{...b(e),bins:n(e.bins),scene:a(e.scene),source:a(e.source),session:a(e.session)}})},{name:"world_heatmap",title:"3D world-space pointer heatmap",description:"Voxelized world-space pointer heatmap.",inputSchema:{since:r,until:o,cellSize:u,limit:l,scene:c,source:h},buildRequest:e=>({path:"api/v1/heatmaps/world",params:{...b(e),cellSize:n(e.cellSize),limit:n(e.limit),scene:a(e.scene),source:a(e.source)}})},{name:"camera_heatmap",title:"View-direction heatmap",description:"Camera view-direction distribution as spherical bins.",inputSchema:{since:r,until:o,bins:i,scene:c,session:d},buildRequest:e=>({path:"api/v1/heatmaps/camera",params:{...b(e),bins:n(e.bins),scene:a(e.scene),session:a(e.session)}})},{name:"click_rays",title:"View-gated click rays",description:"Clicks ASOF-joined to their nearest camera sample, per voxel and clicked mesh.",inputSchema:{since:r,until:o,cellSize:u,limit:l,scene:c,source:h,session:d},buildRequest:e=>({path:"api/v1/heatmaps/click-rays",params:{...b(e),cellSize:n(e.cellSize),limit:n(e.limit),scene:a(e.scene),source:a(e.source),session:a(e.session)}})},{name:"flow_links",title:"Gaze→mesh flow links",description:"Aggregate links from camera-direction bins to clicked meshes.",inputSchema:{since:r,until:o,bins:i,limit:l,scene:c,session:d},buildRequest:e=>({path:"api/v1/heatmaps/flow",params:{...b(e),bins:n(e.bins),limit:n(e.limit),scene:a(e.scene),session:a(e.session)}})},{name:"top_meshes",title:"Most-interacted meshes",description:"Meshes ranked by interaction count.",inputSchema:{since:r,until:o,limit:l,session:d},buildRequest:e=>({path:"api/v1/meshes/top",params:{...b(e),limit:n(e.limit),session:a(e.session)}})},{name:"perf_summary",title:"Rendering performance summary",description:"Sample count and avg/min/p50 FPS over the range.",inputSchema:{since:r,until:o,session:d},buildRequest:e=>({path:"api/v1/perf",params:{...b(e),session:a(e.session)}})},{name:"list_scenes",title:"List active scenes",description:"Distinct developer-assigned scenes with activity.",inputSchema:{since:r,until:o,limit:l},buildRequest:e=>({path:"api/v1/scenes",params:{...b(e),limit:n(e.limit)}})},{name:"timeseries",title:"Event-volume time series",description:"Event-volume buckets over time, with average FPS per bucket.",inputSchema:{since:r,until:o,interval:m,scene:c,type:p},buildRequest:e=>({path:"api/v1/timeseries",params:{...b(e),interval:n(e.interval),scene:a(e.scene),type:a(e.type)}})},{name:"event_counts",title:"Per-event-type counts",description:"Counts per event type over the range (scene-health panel).",inputSchema:{since:r,until:o,scene:c},buildRequest:e=>({path:"api/v1/event-counts",params:{...b(e),scene:a(e.scene)}})},{name:"session_meta",title:"Session descriptor",description:"Coarse descriptor for one session (device/scene/user). No raw event stream.",inputSchema:{sessionId:s.z.string().min(1).describe("The session id to describe.")},buildRequest:e=>({path:`api/v1/sessions/${encodeURIComponent(a(e.sessionId)??"")}/meta`,params:{}})},{name:"scene_representation",title:"Scene representation",description:"Registered proxy geometry (bounds/meshes) for one scene, if any.",inputSchema:{sceneId:s.z.string().min(1).describe("The scene id to fetch.")},buildRequest:e=>({path:`api/v1/scenes/${encodeURIComponent(a(e.sceneId)??"")}/representation`,params:{}})},{name:"funnel",title:"Conversion funnel",description:"Ordered, per-session conversion funnel (ADR 0038): how many sessions reach each caller-supplied step. Steps are a JSON array (see the `steps` argument).",inputSchema:{since:r,until:o,scene:c,cameraMode:g,steps:f},buildRequest:e=>({path:"api/v1/funnel",params:{...b(e),scene:a(e.scene),cameraMode:a(e.cameraMode),steps:a(e.steps)}})},{name:"aggregate_paths",title:"Aggregate desire-line paths",description:"Crowd-level movement routes (ADR 0037): every session's camera path binned onto the ground grid and returned as ordered, session-keyed points for an overlaid route map.",inputSchema:{since:r,until:o,cellSize:u,limit:l,scene:c,cameraMode:g},buildRequest:e=>({path:"api/v1/paths",params:{...b(e),cellSize:n(e.cellSize),limit:n(e.limit),scene:a(e.scene),cameraMode:a(e.cameraMode)}})},{name:"rendering_technology",title:"Rendering-technology breakdown",description:"Rendering-technology mix from session_start.graphics (ADR 0046): session count per (api, backend, api_version, shading_language) — WebGPU vs WebGL2 and shading language.",inputSchema:{since:r,until:o,scene:c,session:d},buildRequest:e=>({path:"api/v1/rendering-technology",params:{...b(e),scene:a(e.scene),session:a(e.session)}})},{name:"xr_rotation",title:"XR head-rotation rate",description:"XR head/view rotation rate (ADR 0048), a motion-sickness proxy: per-session rapid-turn counts over the camera pose stream.",inputSchema:{since:r,until:o,rapidTurn:x,limit:l,scene:c,session:d},buildRequest:e=>({path:"api/v1/xr/rotation",params:{...b(e),rapidTurn:n(e.rapidTurn),limit:n(e.limit),scene:a(e.scene),session:a(e.session)}})},{name:"xr_sources",title:"XR input-source usage",description:"XR input-source split (ADR 0048): hand vs. controller vs. gaze usage.",inputSchema:{since:r,until:o,limit:l,scene:c,session:d},buildRequest:e=>({path:"api/v1/xr/sources",params:{...b(e),limit:n(e.limit),scene:a(e.scene),session:a(e.session)}})},{name:"xr_abandonment",title:"XR session abandonment",description:"XR session abandonment (ADR 0048): per XR session, its time bounds and event/interaction counts; a short span signals headset drop-off.",inputSchema:{since:r,until:o,limit:l,scene:c,session:d},buildRequest:e=>({path:"api/v1/xr/abandonment",params:{...b(e),limit:n(e.limit),scene:a(e.scene),session:a(e.session)}})},{name:"xr_locomotion",title:"XR locomotion & comfort",description:"XR locomotion & comfort (ADR 0048): per XR session, its locomotion-style mix (fly / navigate / teleport + duration) and wall-clock span — a discomfort proxy.",inputSchema:{since:r,until:o,limit:l,scene:c,session:d},buildRequest:e=>({path:"api/v1/xr/locomotion",params:{...b(e),limit:n(e.limit),scene:a(e.scene),session:a(e.session)}})}],v=["list_sessions","list_scenes","top_meshes","perf_summary","event_counts","timeseries","camera_heatmap"],w=y.filter(e=>v.includes(e.name));async function k(e){let{provider:t,client:n,signal:a}=e,r=e.tools??y,o=e.maxSteps??8,i=e.forceFinalAnswer??!0,l=e.maxToolResultChars??8e3,c=new Map(r.map(e=>[e.name,e])),d=function(e=y){return e.map(e=>({name:e.name,description:e.description,parameters:s.z.toJSONSchema(s.z.object(e.inputSchema))}))}(r),u=[...e.messages],m=0,p=!1;async function h(){p=!0;let e=[...u,{role:"user",content:"Now answer the user's question directly in plain text, using the tool results already gathered above. Do not call any tools. If the data is insufficient, say so briefly."}],s=await t.complete({messages:e,tools:[],signal:a});return"final"===s.kind?s.content:s.content??""}for(;m<o;){m+=1;let e=await t.complete({messages:u,tools:d,signal:a});if("final"===e.kind){if(""===e.content.trim()&&i&&!p){let e=await h();if(""!==e.trim())return u.push({role:"assistant",content:e}),{content:e,messages:u,steps:m,stoppedOnMaxSteps:!1}}return u.push({role:"assistant",content:e.content}),{content:e.content,messages:u,steps:m,stoppedOnMaxSteps:!1}}for(let t of(u.push({role:"assistant",content:e.content??"",toolCalls:e.toolCalls}),e.toolCalls))u.push(await j(n,c.get(t.name),t,l))}if(i&&!p){let e=await h();if(""!==e.trim())return u.push({role:"assistant",content:e}),{content:e,messages:u,steps:m,stoppedOnMaxSteps:!0}}return{content:"",messages:u,steps:m,stoppedOnMaxSteps:!0}}async function j(e,t,n,a){let r=e=>({role:"tool",toolCallId:n.id,name:n.name,content:e});if(!t)return r(`Error: unknown tool "${n.name}".`);let o=s.z.object(t.inputSchema).safeParse(n.arguments??{});if(!o.success){let e=o.error.issues.map(e=>`${e.path.join(".")||"(root)"}: ${e.message}`).join("; ");return r(`Error: invalid arguments for "${n.name}": ${e}`)}try{let{path:s,params:n}=t.buildRequest(o.data),i=await e.get(s,n);return r(function(e,t){if(e.length<=t)return e;let s=e.length-t;return`${e.slice(0,t)}…[truncated ${s} chars]`}(JSON.stringify(i),a))}catch(t){let e=t instanceof Error?t.message:String(t);return r(`Error: ${e}`)}}var S=e.i(36542),N=e.i(74698),C=e.i(20880);let R=(0,t.createContext)(null),_='You are Uptimizr\'s in-browser analytics assistant. You help a developer understand\ntheir 3D-scene analytics by calling read-only tools against their own collector\'s\nquery API and summarising the results in clear, concise prose.\n\nGuidelines:\n- Use the provided tools to fetch data before answering; never invent numbers.\n- All data is aggregate and privacy-preserving — there are no raw per-session events,\n no PII, and no way to ingest or modify data. Do not claim otherwise.\n- Timestamps are epoch milliseconds. When the user gives a relative range\n ("this week", "last 24h"), convert it to `since`/`until` before calling a tool.\n- Prefer a short, direct answer with the key figures. Call out caveats (small sample\n sizes, missing scenes) when relevant.\n- If a tool returns an error, explain what went wrong and, if useful, try a corrected call.';function A(e=_,t=Date.now()){let s=new Date(t).toISOString(),n=`Current time: ${s} (epoch milliseconds: ${t}). Resolve any relative time range in the question against this — "today" is the current calendar day, "this week" the last 7 days, "last 24h" the preceding 24 hours — into concrete \`since\`/\`until\` epoch-ms arguments.`;return`${e}
|
|
2
2
|
|
|
3
|
-
${n}`}function M(e){return"function"==typeof e.unload}function P(s={}){let{collectorUrl:n,apiKey:a,api:r,systemPrompt:o=_,maxSteps:i=12,confirmDownload:l,persistBackend:c=!0,now:d=()=>Date.now()}=s,u=(0,t.useContext)(R),m=(0,t.useMemo)(()=>r||(n&&a?new C.CollectorApi(n,a):u?.api??null),[r,n,a,u?.api]),[p]=(0,t.useState)(()=>(0,N.isWebGpuAvailable)()),[h,g]=(0,t.useState)(()=>s.backend?s.backend:(0,N.loadBackendConfig)()),[x,f]=(0,t.useState)([]),[b,y]=(0,t.useState)("idle"),[j,z]=(0,t.useState)(null),[q,E]=(0,t.useState)([]),[B,L]=(0,t.useState)(null),[I,D]=(0,t.useState)(null),O=(0,t.useRef)(x);O.current=x;let G=(0,t.useRef)(h);G.current=h;let T=(0,t.useRef)(d);T.current=d;let U=(0,t.useRef)(null),$=(0,t.useRef)(null);(0,t.useEffect)(()=>()=>{$.current?.abort();let e=U.current;U.current=null,e&&M(e.provider)&&e.provider.unload().catch(()=>{})},[]);let W=(0,t.useCallback)(e=>{g(e),c&&(0,N.saveBackendConfig)(e)},[c]),H=(0,t.useCallback)(async t=>{if("local"===t.backend){let{createWebLlmProvider:s}=await e.A(86354);return s({model:t.webllm?.model,confirmDownload:l,onInitProgress:e=>{L(e),y(e.progress>=1?"thinking":"initializing")}})}if(!t.hosted)throw Error("Hosted backend selected but not configured (endpoint, key, and model).");let{createHostedProvider:s}=await e.A(45697),{api:n,endpoint:a,apiKey:r,model:o}=t.hosted;return s({api:n,endpoint:a,apiKey:r,model:o})},[l]),F=(0,t.useCallback)(async e=>{let t=JSON.stringify(e),s=U.current;if(s&&s.key===t)return s.provider;s&&M(s.provider)&&s.provider.unload().catch(()=>{});let n=await H(e);return U.current={key:t,provider:n},n},[H]),V=(0,t.useCallback)(async e=>{let t=e.trim();if(!t)return;let s=G.current;if(!m){z(Error("No collector connection. Pass collectorUrl + apiKey or wrap in <UptimizrProvider>.")),y("error");return}if(!s){z(Error("No assistant backend selected. Choose a local or hosted backend first.")),y("error");return}let n={role:"user",content:t},a=O.current,r=0===a.length?[{role:"system",content:A(o,T.current())},n]:[...a,n];f(r),E([]),z(null),L(null),D(null),y("initializing");let l=new AbortController;$.current=l;let c=e=>E(t=>{let s=t.findIndex(e=>"running"===e.status),n=-1===s?void 0:t[s];if(!n)return t;let a=t.slice();return a[s]={...n,status:e},a});try{var d;let e=await F(s);y("thinking");let t=await k({provider:{async complete(t){let s=await e.complete(t);return"tool_calls"===s.kind&&E(e=>[...e,...s.toolCalls.map(e=>({id:e.id,name:e.name,status:"running"}))]),s}},client:{async get(e,t){try{let s=await m.read(e,t);return c("done"),s}catch(e){throw c("error"),e}}},messages:r,tools:(d="local"===s.backend?"core":"full","core"===d?w:v),maxSteps:i,signal:l.signal});f(t.messages),E(e=>e.map(e=>"running"===e.status?{...e,status:"done"}:e)),t.stoppedOnMaxSteps?D({kind:"stopped_on_max_steps",steps:t.steps}):0===t.content.trim().length&&D({kind:"no_answer"}),y("idle")}catch(e){if(l.signal.aborted)return void y("idle");z(e instanceof Error?e:Error(String(e))),y("error")}finally{L(null),$.current===l&&($.current=null)}},[m,o,i,F]),X=(0,t.useCallback)(()=>{$.current?.abort()},[]),J=(0,t.useCallback)(()=>{$.current?.abort(),f([]),E([]),z(null),L(null),D(null),y("idle")},[]);return{messages:x,status:b,error:j,toolActivity:q,initProgress:B,notice:I,backend:h,webGpuAvailable:p,models:S.CURATED_MODELS,isReady:!!m&&!!h,isBusy:"initializing"===b||"thinking"===b,send:V,setBackend:W,cancel:X,reset:J}}var z=e.i(46369);let q=["What are my top meshes this week?","How's my average FPS?","Which scenes had activity today?","How many events in the last 24 hours?","How many sessions this week?"];function E({webGpuAvailable:e,onPick:t}){return(0,z.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,z.jsx)("p",{className:"text-xs text-fg-muted",children:"Choose how the assistant runs. Nothing is loaded or downloaded until you pick — your choice is remembered next time."}),(0,z.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[(0,z.jsxs)("div",{className:`flex flex-col gap-2 rounded-md border border-edge p-3 ${e?"":"opacity-60"}`,children:[(0,z.jsxs)("div",{className:"flex items-center gap-2",children:[(0,z.jsx)("h3",{className:"text-sm font-medium text-fg-hi",children:"Local (in-browser)"}),e&&(0,z.jsx)("span",{className:"rounded-full bg-emerald-500/20 px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-emerald-300",children:"Recommended"})]}),(0,z.jsxs)("p",{className:"text-xs text-fg-muted",children:["Private — ",(0,z.jsx)("strong",{children:"nothing leaves your device"}),". Runs on your GPU. Requires a WebGPU browser with ~5 GB free VRAM and a one-time ~4 GB model download."]}),(0,z.jsx)("button",{type:"button",disabled:!e,onClick:()=>t("local"),className:"mt-auto self-start rounded-md bg-emerald-500/70 px-3 py-1 text-xs text-fg-hi disabled:opacity-50",children:"Use local"}),!e&&(0,z.jsx)("p",{className:"text-[11px] text-fg-muted",children:"Requires a WebGPU browser."})]}),(0,z.jsxs)("div",{className:"flex flex-col gap-2 rounded-md border border-edge p-3",children:[(0,z.jsx)("h3",{className:"text-sm font-medium text-fg-hi",children:"Bring your own hosted key"}),(0,z.jsxs)("p",{className:"text-xs text-fg-muted",children:["Lightweight — no download. You supply an OpenAI-compatible or Anthropic endpoint + key. Your questions and aggregated analytics context are"," ",(0,z.jsx)("strong",{children:"sent to that provider"})," (never raw events or PII)."]}),(0,z.jsx)("button",{type:"button",onClick:()=>t("hosted"),className:"mt-auto self-start rounded-md bg-emerald-500/70 px-3 py-1 text-xs text-fg-hi",children:"Use hosted key"})]})]})]})}function B({backend:e,webGpuAvailable:s,models:n,onChange:a,initialKind:r}){let[o,i]=(0,t.useState)(r??e?.backend??(s?"local":"hosted")),[l,c]=(0,t.useState)(e?.webllm?.model??n[0]?.id??""),[d,u]=(0,t.useState)(e?.hosted?.api??"openai"),[m,p]=(0,t.useState)(e?.hosted?.endpoint??""),[h,g]=(0,t.useState)(e?.hosted?.apiKey??""),[x,f]=(0,t.useState)(e?.hosted?.model??"");return(0,z.jsxs)("fieldset",{className:"flex flex-col gap-2 rounded-md border border-edge p-2 text-xs",children:[(0,z.jsx)("legend",{className:"px-1 text-fg-muted",children:"LLM backend"}),(0,z.jsxs)("label",{className:"flex items-center gap-2",children:[(0,z.jsx)("input",{type:"radio",name:"assistant-backend",checked:"local"===o,disabled:!s,onChange:()=>i("local")}),(0,z.jsxs)("span",{className:s?"text-fg":"text-fg-muted",children:["Local (WebLLM / WebGPU) — runs in your browser, zero egress",!s&&" (WebGPU unavailable)"]})]}),"local"===o&&s&&(0,z.jsxs)("div",{className:"ml-6 flex flex-col gap-1",children:[(0,z.jsxs)("label",{className:"flex items-center gap-2",children:[(0,z.jsx)("span",{className:"text-fg-muted",children:"Model"}),(0,z.jsx)("select",{"aria-label":"Local model",value:l,className:"rounded-sm border border-edge bg-ink/40 px-1 py-0.5 text-fg",onChange:e=>c(e.target.value),children:n.map(e=>(0,z.jsxs)("option",{value:e.id,children:[e.label," (",e.downloadSize,")"]},e.id))})]}),(0,z.jsx)("button",{type:"button",onClick:()=>a({backend:"local",webllm:{model:l}}),disabled:!l,className:"self-start rounded-md bg-emerald-500/70 px-2 py-0.5 text-fg-hi disabled:opacity-50",children:"Use this model locally"})]}),(0,z.jsxs)("label",{className:"flex items-center gap-2",children:[(0,z.jsx)("input",{type:"radio",name:"assistant-backend",checked:"hosted"===o,onChange:()=>i("hosted")}),(0,z.jsx)("span",{className:"text-fg",children:"Bring your own hosted provider (OpenAI-compatible or Anthropic)"})]}),"hosted"===o&&(0,z.jsxs)("div",{className:"ml-6 flex flex-col gap-1",children:[(0,z.jsxs)("label",{className:"flex items-center gap-2",children:[(0,z.jsx)("span",{className:"w-16 text-fg-muted",children:"API"}),(0,z.jsxs)("select",{"aria-label":"Hosted API",value:d,className:"rounded-sm border border-edge bg-ink/40 px-1 py-0.5 text-fg",onChange:e=>u(e.target.value),children:[(0,z.jsx)("option",{value:"openai",children:"OpenAI-compatible"}),(0,z.jsx)("option",{value:"anthropic",children:"Anthropic"})]})]}),(0,z.jsxs)("label",{className:"flex items-center gap-2",children:[(0,z.jsx)("span",{className:"w-16 text-fg-muted",children:"Endpoint"}),(0,z.jsx)("input",{type:"url","aria-label":"Endpoint",value:m,placeholder:"https://api.openai.com/v1",className:"flex-1 rounded-sm border border-edge bg-ink/40 px-1 py-0.5 text-fg",onChange:e=>p(e.target.value)})]}),(0,z.jsxs)("label",{className:"flex items-center gap-2",children:[(0,z.jsx)("span",{className:"w-16 text-fg-muted",children:"API key"}),(0,z.jsx)("input",{type:"password","aria-label":"API key",value:h,className:"flex-1 rounded-sm border border-edge bg-ink/40 px-1 py-0.5 text-fg",onChange:e=>g(e.target.value)})]}),(0,z.jsxs)("label",{className:"flex items-center gap-2",children:[(0,z.jsx)("span",{className:"w-16 text-fg-muted",children:"Model"}),(0,z.jsx)("input",{type:"text","aria-label":"Hosted model",value:x,placeholder:"gpt-4o-mini",className:"flex-1 rounded-sm border border-edge bg-ink/40 px-1 py-0.5 text-fg",onChange:e=>f(e.target.value)})]}),(0,z.jsx)("button",{type:"button",onClick:()=>a({backend:"hosted",hosted:{api:d,endpoint:m,apiKey:h,model:x}}),disabled:!m||!h||!x,className:"self-start rounded-md bg-emerald-500/70 px-2 py-0.5 text-fg-hi disabled:opacity-50",children:"Use this provider"})]})]})}function L({backend:e}){let t=e?.backend==="hosted"?"Your prompt and aggregated results are sent to your own provider — never raw events or PII.":"Runs 100% in your browser. Nothing — not your prompt nor your data — leaves this device.";return(0,z.jsx)("p",{className:"text-xs text-fg-muted",children:t})}function I({model:e,onDecision:t}){return(0,z.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Download model",className:"flex flex-col gap-2 rounded-md border border-edge bg-surface p-3 text-xs",children:[(0,z.jsxs)("p",{className:"text-fg",children:["Download ",(0,z.jsx)("strong",{children:e.label})," (",e.downloadSize,", needs ~",e.vram," VRAM)? It runs 100% locally in your browser and nothing leaves this device."]}),(0,z.jsx)("p",{className:"text-fg-muted",children:e.description}),(0,z.jsxs)("div",{className:"flex gap-2",children:[(0,z.jsx)("button",{type:"button",onClick:()=>t(!0),className:"rounded-md bg-emerald-500/70 px-3 py-1 text-fg-hi",children:"Download & run locally"}),(0,z.jsx)("button",{type:"button",onClick:()=>t(!1),className:"rounded-md border border-edge px-3 py-1 text-fg-muted hover:text-fg",children:"Cancel"})]})]})}e.s(["AssistantPanel",0,function({title:e="Analytics assistant",placeholder:s="Ask about your 3D analytics…",className:n,...a}){let[r,o]=(0,t.useState)(null),i=(0,t.useCallback)(e=>new Promise(t=>o({model:e,resolve:t})),[]),{messages:l,status:c,error:d,toolActivity:u,initProgress:m,notice:p,backend:h,webGpuAvailable:g,isBusy:x,isReady:f,send:b,cancel:v,setBackend:y,models:w}=P({...a,confirmDownload:a.confirmDownload??i}),[k,j]=(0,t.useState)(""),[S,N]=(0,t.useState)(!1),[C,R]=(0,t.useState)(null),_=(0,t.useCallback)(e=>{e.preventDefault(),k.trim()&&!x&&(j(""),b(k))},[k,x,b]),A=function(e){let t=[];for(let s of e)"user"===s.role?t.push({role:"user",content:s.content}):"assistant"===s.role&&s.content.trim()&&t.push({role:"assistant",content:s.content});return t}(l),M=null===h,D=(0,t.useRef)(null);(0,t.useEffect)(()=>{let e=D.current;e&&"function"==typeof e.scrollIntoView&&e.scrollIntoView({block:"end"})},[l,c,u,p]);let O=u.some(e=>"running"===e.status),G=!x||m?null:O?"Running analytics…":"initializing"===c?"Loading model…":"Thinking…",T=M||S,U=(0,t.useCallback)(()=>{R(null),N(!0)},[]),$=(0,t.useCallback)(()=>{R(null),N(!1)},[]),W=(0,t.useCallback)(e=>{y(e),R(null),N(!1)},[y]);return(0,z.jsxs)("div",{className:`flex flex-col gap-3 text-sm text-fg ${n??""}`,children:[(0,z.jsxs)("header",{className:"flex items-center justify-between gap-2",children:[(0,z.jsx)("h2",{className:"text-base font-medium text-fg-hi",children:e}),!T&&(0,z.jsx)("button",{type:"button",className:"rounded-md border border-edge px-2 py-1 text-xs text-fg-muted hover:text-fg",onClick:U,children:"Change backend"})]}),T?null===C?(0,z.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,z.jsx)(E,{webGpuAvailable:g,onPick:R}),!M&&(0,z.jsx)("button",{type:"button",onClick:$,className:"self-start text-xs text-fg-muted hover:text-fg",children:"← Back to chat"})]}):(0,z.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,z.jsx)("button",{type:"button",onClick:()=>R(null),className:"self-start text-xs text-fg-muted hover:text-fg",children:"← Choose a different backend"}),(0,z.jsx)(B,{backend:h,initialKind:C,webGpuAvailable:g,models:w,onChange:W})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(L,{backend:h}),(0,z.jsxs)("div",{className:"flex max-h-[24rem] flex-col gap-2 overflow-y-auto",children:[(0,z.jsxs)("ol",{className:"flex min-h-[8rem] shrink-0 flex-col gap-2","aria-label":"Conversation",children:[0===A.length&&(0,z.jsxs)("li",{className:"flex flex-col gap-2 text-xs text-fg-muted",children:[(0,z.jsx)("span",{children:"Ask a question to get started — or try one of these:"}),(0,z.jsx)("div",{className:"flex flex-wrap gap-1.5","aria-label":"Example questions",children:q.map(e=>(0,z.jsx)("button",{type:"button",disabled:x||!f,onClick:()=>void b(e),className:"rounded-full border border-edge px-2.5 py-1 text-left text-fg hover:bg-ink/40 disabled:opacity-50",children:e},e))}),h?.backend==="local"&&(0,z.jsx)("p",{"data-role":"capability-note",children:"The local model answers quick, single-metric questions well. For deeper, multi-step analysis, switch to a hosted backend with your own key via “Change backend”."})]}),A.map((e,t)=>(0,z.jsxs)("li",{className:"user"===e.role?"text-fg-hi":"text-fg","data-role":e.role,children:[(0,z.jsx)("span",{className:"mr-1 text-xs uppercase text-fg-muted",children:"user"===e.role?"You":"Assistant"}),(0,z.jsx)("div",{className:"whitespace-pre-wrap",children:e.content})]},t))]}),(0,z.jsx)("div",{role:"status","aria-live":"polite",className:"shrink-0",children:G&&(0,z.jsxs)("span",{className:"flex items-center gap-2 text-xs text-fg-muted",children:[(0,z.jsx)("span",{"aria-hidden":"true",className:"h-3 w-3 animate-spin rounded-full border-2 border-fg-muted border-t-transparent"}),G]})}),u.length>0&&(0,z.jsx)("ul",{className:"flex shrink-0 flex-col gap-1 text-xs text-fg-muted","aria-label":"Tool activity",children:(function(e){let t=[];for(let s of e){let e=t[t.length-1];e&&e.name===s.name&&e.status===s.status?e.count+=1:t.push({name:s.name,status:s.status,count:1})}return t})(u).map((e,t)=>(0,z.jsxs)("li",{"data-status":e.status,"data-count":e.count,children:["running"===e.status?"⏳":"error"===e.status?"⚠️":"✓"," ",e.name,e.count>1?` \xd7${e.count}`:""]},`${e.name}-${t}`))}),p&&!x&&"error"!==c&&(0,z.jsx)("p",{className:"shrink-0 text-xs text-fg-muted","data-role":"notice","data-kind":p.kind,children:"stopped_on_max_steps"===p.kind?`The model kept using tools and didn't produce a written answer (stopped after ${p.steps} steps). Try rephrasing, ask it to summarize the results, or switch to a hosted model for tougher questions.`:"The assistant finished without a text answer. Try rephrasing, or ask it to summarize the results."}),(0,z.jsx)("div",{ref:D,"aria-hidden":"true",className:"shrink-0"})]}),m&&(0,z.jsxs)("div",{className:"flex flex-col gap-1 text-xs text-fg-muted","aria-label":"Model download progress",children:[(0,z.jsx)("span",{children:m.text}),(0,z.jsx)("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-ink/60",children:(0,z.jsx)("div",{className:"h-full bg-emerald-400",style:{width:`${Math.round(100*m.progress)}%`}})})]}),"error"===c&&d&&(0,z.jsx)("div",{className:"rounded-md bg-rose-500/20 px-2 py-1 text-xs text-rose-300",role:"alert",children:"WebLlmStorageError"===d.name?(0,z.jsxs)("div",{className:"flex flex-col gap-1","data-kind":"storage",children:[(0,z.jsx)("span",{className:"font-medium",children:"Your browser is out of storage for the local model."}),(0,z.jsx)("span",{children:"Each local model caches about 4 GB in this site's browser storage, and trying several models stacks them up. To fix it: free up disk space, clear this site's cached data (browser settings → clear site data / storage), or pick the smallest model — or switch to a hosted backend. Then retry."})]}):(0,z.jsx)("span",{children:d.message})}),(0,z.jsxs)("form",{onSubmit:_,className:"flex items-center gap-2",children:[(0,z.jsx)("input",{type:"text",value:k,onChange:e=>j(e.target.value),placeholder:s,disabled:x,"aria-label":"Message",className:"flex-1 rounded-md border border-edge bg-ink/40 px-2 py-1 text-fg placeholder:text-fg-muted"}),x?(0,z.jsx)("button",{type:"button",onClick:v,className:"rounded-md border border-edge px-3 py-1 text-xs text-fg-muted hover:text-fg",children:"Stop"}):(0,z.jsx)("button",{type:"submit",disabled:!k.trim()||!f,className:"rounded-md bg-emerald-500/70 px-3 py-1 text-xs text-fg-hi disabled:opacity-50",children:"Send"})]})]}),r&&(0,z.jsx)(I,{model:r.model,onDecision:e=>{r.resolve(e),o(null)}})]})},"DEFAULT_SYSTEM_PROMPT",0,_,"composeSystemPrompt",0,A,"useAssistant",0,P],80760)},55810,e=>{e.n(e.i(80760))},688,e=>{e.v(t=>Promise.all(["static/chunks/2x83vs8ns4pww.js"].map(t=>e.l(t))).then(()=>t(21435)))},45697,e=>{e.v(t=>Promise.all(["static/chunks/133glnfos64oo.js"].map(t=>e.l(t))).then(()=>t(44196)))},86354,e=>{e.v(e=>Promise.resolve().then(()=>e(36542)))}]);
|
|
3
|
+
${n}`}function M(e){return"function"==typeof e.unload}function P(s={}){let{collectorUrl:n,apiKey:a,api:r,systemPrompt:o=_,maxSteps:i=12,confirmDownload:l,persistBackend:c=!0,now:d=()=>Date.now()}=s,u=(0,t.useContext)(R),m=(0,t.useMemo)(()=>r||(n&&a?new C.CollectorApi(n,a):u?.api??null),[r,n,a,u?.api]),[p]=(0,t.useState)(()=>(0,N.isWebGpuAvailable)()),[h,g]=(0,t.useState)(()=>s.backend?s.backend:(0,N.loadBackendConfig)()),[x,f]=(0,t.useState)([]),[b,v]=(0,t.useState)("idle"),[j,z]=(0,t.useState)(null),[q,E]=(0,t.useState)([]),[B,L]=(0,t.useState)(null),[I,D]=(0,t.useState)(null),O=(0,t.useRef)(x);O.current=x;let G=(0,t.useRef)(h);G.current=h;let T=(0,t.useRef)(d);T.current=d;let U=(0,t.useRef)(null),$=(0,t.useRef)(null);(0,t.useEffect)(()=>()=>{$.current?.abort();let e=U.current;U.current=null,e&&M(e.provider)&&e.provider.unload().catch(()=>{})},[]);let W=(0,t.useCallback)(e=>{g(e),c&&(0,N.saveBackendConfig)(e)},[c]),H=(0,t.useCallback)(async t=>{if("local"===t.backend){let{createWebLlmProvider:s}=await e.A(86354);return s({model:t.webllm?.model,confirmDownload:l,onInitProgress:e=>{L(e),v(e.progress>=1?"thinking":"initializing")}})}if(!t.hosted)throw Error("Hosted backend selected but not configured (endpoint, key, and model).");let{createHostedProvider:s}=await e.A(35138),{api:n,endpoint:a,apiKey:r,model:o}=t.hosted;return s({api:n,endpoint:a,apiKey:r,model:o})},[l]),F=(0,t.useCallback)(async e=>{let t=JSON.stringify(e),s=U.current;if(s&&s.key===t)return s.provider;s&&M(s.provider)&&s.provider.unload().catch(()=>{});let n=await H(e);return U.current={key:t,provider:n},n},[H]),V=(0,t.useCallback)(async e=>{let t=e.trim();if(!t)return;let s=G.current;if(!m){z(Error("No collector connection. Pass collectorUrl + apiKey or wrap in <UptimizrProvider>.")),v("error");return}if(!s){z(Error("No assistant backend selected. Choose a local or hosted backend first.")),v("error");return}let n={role:"user",content:t},a=O.current,r=0===a.length?[{role:"system",content:A(o,T.current())},n]:[...a,n];f(r),E([]),z(null),L(null),D(null),v("initializing");let l=new AbortController;$.current=l;let c=e=>E(t=>{let s=t.findIndex(e=>"running"===e.status),n=-1===s?void 0:t[s];if(!n)return t;let a=t.slice();return a[s]={...n,status:e},a});try{var d;let e=await F(s);v("thinking");let t=await k({provider:{async complete(t){let s=await e.complete(t);return"tool_calls"===s.kind&&E(e=>[...e,...s.toolCalls.map(e=>({id:e.id,name:e.name,status:"running"}))]),s}},client:{async get(e,t){try{let s=await m.read(e,t);return c("done"),s}catch(e){throw c("error"),e}}},messages:r,tools:(d="local"===s.backend?"core":"full","core"===d?w:y),maxSteps:i,signal:l.signal});f(t.messages),E(e=>e.map(e=>"running"===e.status?{...e,status:"done"}:e)),t.stoppedOnMaxSteps?D({kind:"stopped_on_max_steps",steps:t.steps}):0===t.content.trim().length&&D({kind:"no_answer"}),v("idle")}catch(e){if(l.signal.aborted)return void v("idle");z(e instanceof Error?e:Error(String(e))),v("error")}finally{L(null),$.current===l&&($.current=null)}},[m,o,i,F]),X=(0,t.useCallback)(()=>{$.current?.abort()},[]),J=(0,t.useCallback)(()=>{$.current?.abort(),f([]),E([]),z(null),L(null),D(null),v("idle")},[]);return{messages:x,status:b,error:j,toolActivity:q,initProgress:B,notice:I,backend:h,webGpuAvailable:p,models:S.CURATED_MODELS,isReady:!!m&&!!h,isBusy:"initializing"===b||"thinking"===b,send:V,setBackend:W,cancel:X,reset:J}}var z=e.i(79047);let q=["What are my top meshes this week?","How's my average FPS?","Which scenes had activity today?","How many events in the last 24 hours?","How many sessions this week?"];function E({webGpuAvailable:e,onPick:t}){return(0,z.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,z.jsx)("p",{className:"text-xs text-fg-muted",children:"Choose how the assistant runs. Nothing is loaded or downloaded until you pick — your choice is remembered next time."}),(0,z.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[(0,z.jsxs)("div",{className:`flex flex-col gap-2 rounded-md border border-edge p-3 ${e?"":"opacity-60"}`,children:[(0,z.jsxs)("div",{className:"flex items-center gap-2",children:[(0,z.jsx)("h3",{className:"text-sm font-medium text-fg-hi",children:"Local (in-browser)"}),e&&(0,z.jsx)("span",{className:"rounded-full bg-emerald-500/20 px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-emerald-300",children:"Recommended"})]}),(0,z.jsxs)("p",{className:"text-xs text-fg-muted",children:["Private — ",(0,z.jsx)("strong",{children:"nothing leaves your device"}),". Runs on your GPU. Requires a WebGPU browser with ~5 GB free VRAM and a one-time ~4 GB model download."]}),(0,z.jsx)("button",{type:"button",disabled:!e,onClick:()=>t("local"),className:"mt-auto self-start rounded-md bg-emerald-500/70 px-3 py-1 text-xs text-fg-hi disabled:opacity-50",children:"Use local"}),!e&&(0,z.jsx)("p",{className:"text-[11px] text-fg-muted",children:"Requires a WebGPU browser."})]}),(0,z.jsxs)("div",{className:"flex flex-col gap-2 rounded-md border border-edge p-3",children:[(0,z.jsx)("h3",{className:"text-sm font-medium text-fg-hi",children:"Bring your own hosted key"}),(0,z.jsxs)("p",{className:"text-xs text-fg-muted",children:["Lightweight — no download. You supply an OpenAI-compatible or Anthropic endpoint + key. Your questions and aggregated analytics context are"," ",(0,z.jsx)("strong",{children:"sent to that provider"})," (never raw events or PII)."]}),(0,z.jsx)("button",{type:"button",onClick:()=>t("hosted"),className:"mt-auto self-start rounded-md bg-emerald-500/70 px-3 py-1 text-xs text-fg-hi",children:"Use hosted key"})]})]})]})}function B({backend:e,webGpuAvailable:s,models:n,onChange:a,initialKind:r}){let[o,i]=(0,t.useState)(r??e?.backend??(s?"local":"hosted")),[l,c]=(0,t.useState)(e?.webllm?.model??n[0]?.id??""),[d,u]=(0,t.useState)(e?.hosted?.api??"openai"),[m,p]=(0,t.useState)(e?.hosted?.endpoint??""),[h,g]=(0,t.useState)(e?.hosted?.apiKey??""),[x,f]=(0,t.useState)(e?.hosted?.model??"");return(0,z.jsxs)("fieldset",{className:"flex flex-col gap-2 rounded-md border border-edge p-2 text-xs",children:[(0,z.jsx)("legend",{className:"px-1 text-fg-muted",children:"LLM backend"}),(0,z.jsxs)("label",{className:"flex items-center gap-2",children:[(0,z.jsx)("input",{type:"radio",name:"assistant-backend",checked:"local"===o,disabled:!s,onChange:()=>i("local")}),(0,z.jsxs)("span",{className:s?"text-fg":"text-fg-muted",children:["Local (WebLLM / WebGPU) — runs in your browser, zero egress",!s&&" (WebGPU unavailable)"]})]}),"local"===o&&s&&(0,z.jsxs)("div",{className:"ml-6 flex flex-col gap-1",children:[(0,z.jsxs)("label",{className:"flex items-center gap-2",children:[(0,z.jsx)("span",{className:"text-fg-muted",children:"Model"}),(0,z.jsx)("select",{"aria-label":"Local model",value:l,className:"rounded-sm border border-edge bg-ink/40 px-1 py-0.5 text-fg",onChange:e=>c(e.target.value),children:n.map(e=>(0,z.jsxs)("option",{value:e.id,children:[e.label," (",e.downloadSize,")"]},e.id))})]}),(0,z.jsx)("button",{type:"button",onClick:()=>a({backend:"local",webllm:{model:l}}),disabled:!l,className:"self-start rounded-md bg-emerald-500/70 px-2 py-0.5 text-fg-hi disabled:opacity-50",children:"Use this model locally"})]}),(0,z.jsxs)("label",{className:"flex items-center gap-2",children:[(0,z.jsx)("input",{type:"radio",name:"assistant-backend",checked:"hosted"===o,onChange:()=>i("hosted")}),(0,z.jsx)("span",{className:"text-fg",children:"Bring your own hosted provider (OpenAI-compatible or Anthropic)"})]}),"hosted"===o&&(0,z.jsxs)("div",{className:"ml-6 flex flex-col gap-1",children:[(0,z.jsxs)("label",{className:"flex items-center gap-2",children:[(0,z.jsx)("span",{className:"w-16 text-fg-muted",children:"API"}),(0,z.jsxs)("select",{"aria-label":"Hosted API",value:d,className:"rounded-sm border border-edge bg-ink/40 px-1 py-0.5 text-fg",onChange:e=>u(e.target.value),children:[(0,z.jsx)("option",{value:"openai",children:"OpenAI-compatible"}),(0,z.jsx)("option",{value:"anthropic",children:"Anthropic"})]})]}),(0,z.jsxs)("label",{className:"flex items-center gap-2",children:[(0,z.jsx)("span",{className:"w-16 text-fg-muted",children:"Endpoint"}),(0,z.jsx)("input",{type:"url","aria-label":"Endpoint",value:m,placeholder:"https://api.openai.com/v1",className:"flex-1 rounded-sm border border-edge bg-ink/40 px-1 py-0.5 text-fg",onChange:e=>p(e.target.value)})]}),(0,z.jsxs)("label",{className:"flex items-center gap-2",children:[(0,z.jsx)("span",{className:"w-16 text-fg-muted",children:"API key"}),(0,z.jsx)("input",{type:"password","aria-label":"API key",value:h,className:"flex-1 rounded-sm border border-edge bg-ink/40 px-1 py-0.5 text-fg",onChange:e=>g(e.target.value)})]}),(0,z.jsxs)("label",{className:"flex items-center gap-2",children:[(0,z.jsx)("span",{className:"w-16 text-fg-muted",children:"Model"}),(0,z.jsx)("input",{type:"text","aria-label":"Hosted model",value:x,placeholder:"gpt-4o-mini",className:"flex-1 rounded-sm border border-edge bg-ink/40 px-1 py-0.5 text-fg",onChange:e=>f(e.target.value)})]}),(0,z.jsx)("button",{type:"button",onClick:()=>a({backend:"hosted",hosted:{api:d,endpoint:m,apiKey:h,model:x}}),disabled:!m||!h||!x,className:"self-start rounded-md bg-emerald-500/70 px-2 py-0.5 text-fg-hi disabled:opacity-50",children:"Use this provider"})]})]})}function L({backend:e}){let t=e?.backend==="hosted"?"Your prompt and aggregated results are sent to your own provider — never raw events or PII.":"Runs 100% in your browser. Nothing — not your prompt nor your data — leaves this device.";return(0,z.jsx)("p",{className:"text-xs text-fg-muted",children:t})}function I({model:e,onDecision:t}){return(0,z.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Download model",className:"flex flex-col gap-2 rounded-md border border-edge bg-surface p-3 text-xs",children:[(0,z.jsxs)("p",{className:"text-fg",children:["Download ",(0,z.jsx)("strong",{children:e.label})," (",e.downloadSize,", needs ~",e.vram," VRAM)? It runs 100% locally in your browser and nothing leaves this device."]}),(0,z.jsx)("p",{className:"text-fg-muted",children:e.description}),(0,z.jsxs)("div",{className:"flex gap-2",children:[(0,z.jsx)("button",{type:"button",onClick:()=>t(!0),className:"rounded-md bg-emerald-500/70 px-3 py-1 text-fg-hi",children:"Download & run locally"}),(0,z.jsx)("button",{type:"button",onClick:()=>t(!1),className:"rounded-md border border-edge px-3 py-1 text-fg-muted hover:text-fg",children:"Cancel"})]})]})}e.s(["AssistantPanel",0,function({title:e="Analytics assistant",placeholder:s="Ask about your 3D analytics…",className:n,...a}){let[r,o]=(0,t.useState)(null),i=(0,t.useCallback)(e=>new Promise(t=>o({model:e,resolve:t})),[]),{messages:l,status:c,error:d,toolActivity:u,initProgress:m,notice:p,backend:h,webGpuAvailable:g,isBusy:x,isReady:f,send:b,cancel:y,setBackend:v,models:w}=P({...a,confirmDownload:a.confirmDownload??i}),[k,j]=(0,t.useState)(""),[S,N]=(0,t.useState)(!1),[C,R]=(0,t.useState)(null),_=(0,t.useCallback)(e=>{e.preventDefault(),k.trim()&&!x&&(j(""),b(k))},[k,x,b]),A=function(e){let t=[];for(let s of e)"user"===s.role?t.push({role:"user",content:s.content}):"assistant"===s.role&&s.content.trim()&&t.push({role:"assistant",content:s.content});return t}(l),M=null===h,D=(0,t.useRef)(null);(0,t.useEffect)(()=>{let e=D.current;e&&"function"==typeof e.scrollIntoView&&e.scrollIntoView({block:"end"})},[l,c,u,p]);let O=u.some(e=>"running"===e.status),G=!x||m?null:O?"Running analytics…":"initializing"===c?"Loading model…":"Thinking…",T=M||S,U=(0,t.useCallback)(()=>{R(null),N(!0)},[]),$=(0,t.useCallback)(()=>{R(null),N(!1)},[]),W=(0,t.useCallback)(e=>{v(e),R(null),N(!1)},[v]);return(0,z.jsxs)("div",{className:`flex flex-col gap-3 text-sm text-fg ${n??""}`,children:[(0,z.jsxs)("header",{className:"flex items-center justify-between gap-2",children:[(0,z.jsx)("h2",{className:"text-base font-medium text-fg-hi",children:e}),!T&&(0,z.jsx)("button",{type:"button",className:"rounded-md border border-edge px-2 py-1 text-xs text-fg-muted hover:text-fg",onClick:U,children:"Change backend"})]}),T?null===C?(0,z.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,z.jsx)(E,{webGpuAvailable:g,onPick:R}),!M&&(0,z.jsx)("button",{type:"button",onClick:$,className:"self-start text-xs text-fg-muted hover:text-fg",children:"← Back to chat"})]}):(0,z.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,z.jsx)("button",{type:"button",onClick:()=>R(null),className:"self-start text-xs text-fg-muted hover:text-fg",children:"← Choose a different backend"}),(0,z.jsx)(B,{backend:h,initialKind:C,webGpuAvailable:g,models:w,onChange:W})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(L,{backend:h}),(0,z.jsxs)("div",{className:"flex max-h-[24rem] flex-col gap-2 overflow-y-auto",children:[(0,z.jsxs)("ol",{className:"flex min-h-[8rem] shrink-0 flex-col gap-2","aria-label":"Conversation",children:[0===A.length&&(0,z.jsxs)("li",{className:"flex flex-col gap-2 text-xs text-fg-muted",children:[(0,z.jsx)("span",{children:"Ask a question to get started — or try one of these:"}),(0,z.jsx)("div",{className:"flex flex-wrap gap-1.5","aria-label":"Example questions",children:q.map(e=>(0,z.jsx)("button",{type:"button",disabled:x||!f,onClick:()=>void b(e),className:"rounded-full border border-edge px-2.5 py-1 text-left text-fg hover:bg-ink/40 disabled:opacity-50",children:e},e))}),h?.backend==="local"&&(0,z.jsx)("p",{"data-role":"capability-note",children:"The local model answers quick, single-metric questions well. For deeper, multi-step analysis, switch to a hosted backend with your own key via “Change backend”."})]}),A.map((e,t)=>(0,z.jsxs)("li",{className:"user"===e.role?"text-fg-hi":"text-fg","data-role":e.role,children:[(0,z.jsx)("span",{className:"mr-1 text-xs uppercase text-fg-muted",children:"user"===e.role?"You":"Assistant"}),(0,z.jsx)("div",{className:"whitespace-pre-wrap",children:e.content})]},t))]}),(0,z.jsx)("div",{role:"status","aria-live":"polite",className:"shrink-0",children:G&&(0,z.jsxs)("span",{className:"flex items-center gap-2 text-xs text-fg-muted",children:[(0,z.jsx)("span",{"aria-hidden":"true",className:"h-3 w-3 animate-spin rounded-full border-2 border-fg-muted border-t-transparent"}),G]})}),u.length>0&&(0,z.jsx)("ul",{className:"flex shrink-0 flex-col gap-1 text-xs text-fg-muted","aria-label":"Tool activity",children:(function(e){let t=[];for(let s of e){let e=t[t.length-1];e&&e.name===s.name&&e.status===s.status?e.count+=1:t.push({name:s.name,status:s.status,count:1})}return t})(u).map((e,t)=>(0,z.jsxs)("li",{"data-status":e.status,"data-count":e.count,children:["running"===e.status?"⏳":"error"===e.status?"⚠️":"✓"," ",e.name,e.count>1?` \xd7${e.count}`:""]},`${e.name}-${t}`))}),p&&!x&&"error"!==c&&(0,z.jsx)("p",{className:"shrink-0 text-xs text-fg-muted","data-role":"notice","data-kind":p.kind,children:"stopped_on_max_steps"===p.kind?`The model kept using tools and didn't produce a written answer (stopped after ${p.steps} steps). Try rephrasing, ask it to summarize the results, or switch to a hosted model for tougher questions.`:"The assistant finished without a text answer. Try rephrasing, or ask it to summarize the results."}),(0,z.jsx)("div",{ref:D,"aria-hidden":"true",className:"shrink-0"})]}),m&&(0,z.jsxs)("div",{className:"flex flex-col gap-1 text-xs text-fg-muted","aria-label":"Model download progress",children:[(0,z.jsx)("span",{children:m.text}),(0,z.jsx)("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-ink/60",children:(0,z.jsx)("div",{className:"h-full bg-emerald-400",style:{width:`${Math.round(100*m.progress)}%`}})})]}),"error"===c&&d&&(0,z.jsx)("div",{className:"rounded-md bg-rose-500/20 px-2 py-1 text-xs text-rose-300",role:"alert",children:"WebLlmStorageError"===d.name?(0,z.jsxs)("div",{className:"flex flex-col gap-1","data-kind":"storage",children:[(0,z.jsx)("span",{className:"font-medium",children:"Your browser is out of storage for the local model."}),(0,z.jsx)("span",{children:"Each local model caches about 4 GB in this site's browser storage, and trying several models stacks them up. To fix it: free up disk space, clear this site's cached data (browser settings → clear site data / storage), or pick the smallest model — or switch to a hosted backend. Then retry."})]}):(0,z.jsx)("span",{children:d.message})}),(0,z.jsxs)("form",{onSubmit:_,className:"flex items-center gap-2",children:[(0,z.jsx)("input",{type:"text",value:k,onChange:e=>j(e.target.value),placeholder:s,disabled:x,"aria-label":"Message",className:"flex-1 rounded-md border border-edge bg-ink/40 px-2 py-1 text-fg placeholder:text-fg-muted"}),x?(0,z.jsx)("button",{type:"button",onClick:y,className:"rounded-md border border-edge px-3 py-1 text-xs text-fg-muted hover:text-fg",children:"Stop"}):(0,z.jsx)("button",{type:"submit",disabled:!k.trim()||!f,className:"rounded-md bg-emerald-500/70 px-3 py-1 text-xs text-fg-hi disabled:opacity-50",children:"Send"})]})]}),r&&(0,z.jsx)(I,{model:r.model,onDecision:e=>{r.resolve(e),o(null)}})]})},"DEFAULT_SYSTEM_PROMPT",0,_,"composeSystemPrompt",0,A,"useAssistant",0,P],80760)},55810,e=>{e.n(e.i(80760))},688,e=>{e.v(t=>Promise.all(["static/chunks/3nwaovnpiyrt8.js"].map(t=>e.l(t))).then(()=>t(21435)))},35138,e=>{e.v(t=>Promise.all(["static/chunks/133glnfos64oo.js"].map(t=>e.l(t))).then(()=>t(44196)))},86354,e=>{e.v(e=>Promise.resolve().then(()=>e(36542)))}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,31740,e=>{"use strict";var t=e.i(75105),i=e.i(62478),o=e.i(44520);class u extends i.FlowGraphExecutionBlockWithOutSignal{constructor(e){super(e),this.count=this.registerDataInput("count",t.RichTypeNumber),this.reset=this._registerSignalInput("reset"),this.currentCount=this.registerDataOutput("currentCount",t.RichTypeNumber)}_execute(e,t){if(t===this.reset)return void e._setExecutionVariable(this,"debounceCount",0);let i=this.count.getValue(e),o=e._getExecutionVariable(this,"debounceCount",0)+1;this.currentCount.setValue(o,e),e._setExecutionVariable(this,"debounceCount",o),o>=i&&(this.out._activateSignal(e),e._setExecutionVariable(this,"debounceCount",0))}getClassName(){return"FlowGraphDebounceBlock"}}let s=!1;function n(){s||(s=!0,(0,o.RegisterClass)("FlowGraphDebounceBlock",u))}e.s(["FlowGraphDebounceBlock",0,u,"RegisterFlowGraphDebounceBlock",0,n],65793),n(),e.s([],56954),e.i(56954),e.i(65793),e.s(["FlowGraphDebounceBlock",0,u],31740)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,47150,t=>{"use strict";class e{static GetShadersRepository(t=0){return 0===t?e.ShadersRepository:e.ShadersRepositoryWGSL}static GetShadersStore(t=0){return 0===t?e.ShadersStore:e.ShadersStoreWGSL}static GetIncludesShadersStore(t=0){return 0===t?e.IncludesShadersStore:e.IncludesShadersStoreWGSL}}e.ShadersRepository="src/Shaders/",e.ShadersStore={},e.IncludesShadersStore={},e.ShadersRepositoryWGSL="src/ShadersWGSL/",e.ShadersStoreWGSL={},e.IncludesShadersStoreWGSL={},t.s(["ShaderStore",0,e])},29667,t=>{"use strict";var e,s,r=t.i(63235),i=t.i(69400),n=t.i(84106);(e=s||(s={}))[e.CW=0]="CW",e[e.CCW=1]="CCW";class a{constructor(t){this._radians=t,this._radians<0&&(this._radians+=2*Math.PI)}degrees(){return 180*this._radians/Math.PI}radians(){return this._radians}static BetweenTwoPoints(t,e){let s=e.subtract(t);return new a(Math.atan2(s.y,s.x))}static BetweenTwoVectors(t,e){let s=t.lengthSquared()*e.lengthSquared();if(0===s)return new a(Math.PI/2);s=Math.sqrt(s);let i=t.dot(e)/s;return new a(Math.acos(i=(0,r.Clamp)(i,-1,1)))}static FromRadians(t){return new a(t)}static FromDegrees(t){return new a(t*Math.PI/180)}}class o{constructor(t,e,s){this.startPoint=t,this.midPoint=e,this.endPoint=s;const r=Math.pow(e.x,2)+Math.pow(e.y,2),n=(Math.pow(t.x,2)+Math.pow(t.y,2)-r)/2,o=(r-Math.pow(s.x,2)-Math.pow(s.y,2))/2,h=(t.x-e.x)*(e.y-s.y)-(e.x-s.x)*(t.y-e.y);this.centerPoint=new i.Vector2((n*(e.y-s.y)-o*(t.y-e.y))/h,((t.x-e.x)*o-(e.x-s.x)*n)/h),this.radius=this.centerPoint.subtract(this.startPoint).length(),this.startAngle=a.BetweenTwoPoints(this.centerPoint,this.startPoint);const u=this.startAngle.degrees();let c=a.BetweenTwoPoints(this.centerPoint,this.midPoint).degrees(),l=a.BetweenTwoPoints(this.centerPoint,this.endPoint).degrees();c-u>180&&(c-=360),c-u<-180&&(c+=360),l-c>180&&(l-=360),l-c<-180&&(l+=360),this.orientation=c-u<0?0:1,this.angle=a.FromDegrees(0===this.orientation?u-l:l-u)}}class h{constructor(t,e){this._points=[],this._length=0,this.closed=!1,this._points.push(new i.Vector2(t,e))}addLineTo(t,e){if(this.closed)return this;let s=new i.Vector2(t,e),r=this._points[this._points.length-1];return this._points.push(s),this._length+=s.subtract(r).length(),this}addArcTo(t,e,s,r,n=36){if(this.closed)return this;let a=new o(this._points[this._points.length-1],new i.Vector2(t,e),new i.Vector2(s,r)),h=a.angle.radians()/n;0===a.orientation&&(h*=-1);let u=a.startAngle.radians()+h;for(let t=0;t<n;t++){let t=Math.cos(u)*a.radius+a.centerPoint.x,e=Math.sin(u)*a.radius+a.centerPoint.y;this.addLineTo(t,e),u+=h}return this}addQuadraticCurveTo(t,e,s,r,i=36){if(this.closed)return this;let n=(t,e,s,r)=>(1-t)*(1-t)*e+2*t*(1-t)*s+t*t*r,a=this._points[this._points.length-1];for(let o=0;o<=i;o++){let h=o/i,u=n(h,a.x,t,s),c=n(h,a.y,e,r);this.addLineTo(u,c)}return this}addBezierCurveTo(t,e,s,r,i,n,a=36){if(this.closed)return this;let o=(t,e,s,r,i)=>(1-t)*(1-t)*(1-t)*e+3*t*(1-t)*(1-t)*s+3*t*t*(1-t)*r+t*t*t*i,h=this._points[this._points.length-1];for(let u=0;u<=a;u++){let c=u/a,l=o(c,h.x,t,s,i),d=o(c,h.y,e,r,n);this.addLineTo(l,d)}return this}isPointInside(t){let e=!1,s=this._points.length;for(let r=s-1,i=0;i<s;r=i++){let s=this._points[r],n=this._points[i],a=n.x-s.x,o=n.y-s.y;if(Math.abs(o)>Number.EPSILON){if(o<0&&(s=this._points[i],a=-a,n=this._points[r],o=-o),t.y<s.y||t.y>n.y)continue;if(t.y===s.y&&t.x===s.x)return!0;{let r=o*(t.x-s.x)-a*(t.y-s.y);if(0===r)return!0;if(r<0)continue;e=!e}}else{if(t.y!==s.y)continue;if(n.x<=t.x&&t.x<=s.x||s.x<=t.x&&t.x<=n.x)return!0}}return e}close(){return this.closed=!0,this}length(){let t=this._length;if(this.closed){let e=this._points[this._points.length-1];t+=this._points[0].subtract(e).length()}return t}area(){let t=this._points.length,e=0;for(let s=t-1,r=0;r<t;s=r++)e+=this._points[s].x*this._points[r].y-this._points[r].x*this._points[s].y;return .5*e}getPoints(){return this._points}getPointAtLengthPosition(t){if(t<0||t>1)return i.Vector2.Zero();let e=t*this.length(),s=0;for(let t=0;t<this._points.length;t++){let r=(t+1)%this._points.length,n=this._points[t],a=this._points[r].subtract(n),o=a.length()+s;if(e>=s&&e<=o){let t=a.normalize(),r=e-s;return new i.Vector2(n.x+t.x*r,n.y+t.y*r)}s=o}return i.Vector2.Zero()}static StartingAt(t,e){return new h(t,e)}}class u{constructor(t,e=null,s,r=!1){this.path=t,this._curve=[],this._distances=[],this._tangents=[],this._normals=[],this._binormals=[],this._pointAtData={id:0,point:i.Vector3.Zero(),previousPointArrayIndex:0,position:0,subPosition:0,interpolateReady:!1,interpolationMatrix:i.Matrix.Identity()};for(let e=0;e<t.length;e++)this._curve[e]=t[e].clone();this._raw=s||!1,this._alignTangentsWithPath=r,this._compute(e,r)}getCurve(){return this._curve}getPoints(){return this._curve}length(){return this._distances[this._distances.length-1]}getTangents(){return this._tangents}getNormals(){return this._normals}getBinormals(){return this._binormals}getDistances(){return this._distances}getPointAt(t){return this._updatePointAtData(t).point}getTangentAt(t,e=!1){return this._updatePointAtData(t,e),e?i.Vector3.TransformCoordinates(i.Vector3.Forward(),this._pointAtData.interpolationMatrix):this._tangents[this._pointAtData.previousPointArrayIndex]}getNormalAt(t,e=!1){return this._updatePointAtData(t,e),e?i.Vector3.TransformCoordinates(i.Vector3.Right(),this._pointAtData.interpolationMatrix):this._normals[this._pointAtData.previousPointArrayIndex]}getBinormalAt(t,e=!1){return this._updatePointAtData(t,e),e?i.Vector3.TransformCoordinates(i.Vector3.UpReadOnly,this._pointAtData.interpolationMatrix):this._binormals[this._pointAtData.previousPointArrayIndex]}getDistanceAt(t){return this.length()*t}getPreviousPointIndexAt(t){return this._updatePointAtData(t),this._pointAtData.previousPointArrayIndex}getSubPositionAt(t){return this._updatePointAtData(t),this._pointAtData.subPosition}getClosestPositionTo(t){let e=Number.MAX_VALUE,s=0;for(let r=0;r<this._curve.length-1;r++){let n=this._curve[r+0],a=this._curve[r+1].subtract(n).normalize(),o=this._distances[r+1]-this._distances[r+0],h=Math.min(Math.max(i.Vector3.Dot(a,t.subtract(n).normalize()),0)*i.Vector3.Distance(n,t)/o,1),u=i.Vector3.Distance(n.add(a.scale(h*o)),t);u<e&&(e=u,s=(this._distances[r+0]+o*h)/this.length())}return s}slice(t=0,e=1){if(t<0&&(t=1- -1*t%1),e<0&&(e=1- -1*e%1),t>e){let s=t;t=e,e=s}let s=this.getCurve(),r=this.getPointAt(t),i=this.getPreviousPointIndexAt(t),n=this.getPointAt(e),a=this.getPreviousPointIndexAt(e)+1,o=[];return 0!==t&&(i++,o.push(r)),o.push(...s.slice(i,a)),(1!==e||1===t)&&o.push(n),new u(o,this.getNormalAt(t),this._raw,this._alignTangentsWithPath)}update(t,e=null,s=!1){for(let e=0;e<t.length;e++)this._curve[e].x=t[e].x,this._curve[e].y=t[e].y,this._curve[e].z=t[e].z;return this._compute(e,s),this}_compute(t,e=!1){let s,r,n,a,o,h=this._curve.length;if(h<2)return;this._tangents[0]=this._getFirstNonNullVector(0),this._raw||this._tangents[0].normalize(),this._tangents[h-1]=this._curve[h-1].subtract(this._curve[h-2]),this._raw||this._tangents[h-1].normalize();let u=this._tangents[0],c=this._normalVector(u,t);this._normals[0]=c,this._raw||this._normals[0].normalize(),this._binormals[0]=i.Vector3.Cross(u,this._normals[0]),this._raw||this._binormals[0].normalize(),this._distances[0]=0;for(let t=1;t<h;t++)s=this._getLastNonNullVector(t),t<h-1&&(r=this._getFirstNonNullVector(t),this._tangents[t]=e?r:s.add(r),this._tangents[t].normalize()),this._distances[t]=this._distances[t-1]+this._curve[t].subtract(this._curve[t-1]).length(),n=this._tangents[t],o=this._binormals[t-1],this._normals[t]=i.Vector3.Cross(o,n),this._raw||(0===this._normals[t].length()?(a=this._normals[t-1],this._normals[t]=a.clone()):this._normals[t].normalize()),this._binormals[t]=i.Vector3.Cross(n,this._normals[t]),this._raw||this._binormals[t].normalize();this._pointAtData.id=NaN}_getFirstNonNullVector(t){let e=1,s=this._curve[t+e].subtract(this._curve[t]);for(;0===s.length()&&t+e+1<this._curve.length;)e++,s=this._curve[t+e].subtract(this._curve[t]);return s}_getLastNonNullVector(t){let e=1,s=this._curve[t].subtract(this._curve[t-e]);for(;0===s.length()&&t>e+1;)e++,s=this._curve[t].subtract(this._curve[t-e]);return s}_normalVector(t,e){let s,a=t.length();if(0===a&&(a=1),null==e){let e;e=(0,r.WithinEpsilon)(Math.abs(t.y)/a,1,n.Epsilon)?(0,r.WithinEpsilon)(Math.abs(t.x)/a,1,n.Epsilon)?(0,r.WithinEpsilon)(Math.abs(t.z)/a,1,n.Epsilon)?i.Vector3.Zero():new i.Vector3(0,0,1):new i.Vector3(1,0,0):new i.Vector3(0,-1,0),s=i.Vector3.Cross(t,e)}else s=i.Vector3.Cross(t,e),i.Vector3.CrossToRef(s,t,s);return s.normalize(),s}_updatePointAtData(t,e=!1){let s;if(this._pointAtData.id===t)return this._pointAtData.interpolateReady||this._updateInterpolationMatrix(),this._pointAtData;this._pointAtData.id=t;let r=this.getPoints();if(t<=0)return this._setPointAtData(0,0,r[0],0,e);if(t>=1)return this._setPointAtData(1,1,r[r.length-1],r.length-1,e);let n=r[0],a=0,o=t*this.length();for(let h=1;h<r.length;h++){s=r[h];let u=i.Vector3.Distance(n,s);if((a+=u)===o)return this._setPointAtData(t,1,s,h,e);if(a>o){let r=(a-o)/u,i=n.subtract(s),c=s.add(i.scaleInPlace(r));return this._setPointAtData(t,1-r,c,h-1,e)}n=s}return this._pointAtData}_setPointAtData(t,e,s,r,i){return this._pointAtData.point=s,this._pointAtData.position=t,this._pointAtData.subPosition=e,this._pointAtData.previousPointArrayIndex=r,this._pointAtData.interpolateReady=i,i&&this._updateInterpolationMatrix(),this._pointAtData}_updateInterpolationMatrix(){this._pointAtData.interpolationMatrix=i.Matrix.Identity();let t=this._pointAtData.previousPointArrayIndex;if(t!==this._tangents.length-1){let e=t+1,s=this._tangents[t].clone(),r=this._normals[t].clone(),n=this._binormals[t].clone(),a=this._tangents[e].clone(),o=this._normals[e].clone(),h=this._binormals[e].clone(),u=i.Quaternion.RotationQuaternionFromAxis(r,n,s),c=i.Quaternion.RotationQuaternionFromAxis(o,h,a);i.Quaternion.Slerp(u,c,this._pointAtData.subPosition).toRotationMatrix(this._pointAtData.interpolationMatrix)}}}class c{static CreateQuadraticBezier(t,e,s,r){r=r>2?r:3;let n=[],a=(t,e,s,r)=>(1-t)*(1-t)*e+2*t*(1-t)*s+t*t*r;for(let o=0;o<=r;o++)n.push(new i.Vector3(a(o/r,t.x,e.x,s.x),a(o/r,t.y,e.y,s.y),a(o/r,t.z,e.z,s.z)));return new c(n)}static CreateCubicBezier(t,e,s,r,n){n=n>3?n:4;let a=[],o=(t,e,s,r,i)=>(1-t)*(1-t)*(1-t)*e+3*t*(1-t)*(1-t)*s+3*t*t*(1-t)*r+t*t*t*i;for(let h=0;h<=n;h++)a.push(new i.Vector3(o(h/n,t.x,e.x,s.x,r.x),o(h/n,t.y,e.y,s.y,r.y),o(h/n,t.z,e.z,s.z,r.z)));return new c(a)}static CreateHermiteSpline(t,e,s,r,n){let a=[],o=1/n;for(let h=0;h<=n;h++)a.push(i.Vector3.Hermite(t,e,s,r,h*o));return new c(a)}static CreateCatmullRomSpline(t,e,s){let r=[],n=1/e,a=0;if(s){let s=t.length;for(let o=0;o<s;o++){a=0;for(let h=0;h<e;h++)r.push(i.Vector3.CatmullRom(t[o%s],t[(o+1)%s],t[(o+2)%s],t[(o+3)%s],a)),a+=n}r.push(r[0])}else{let s=[];s.push(t[0].clone()),s.push(...t),s.push(t[t.length-1].clone());let o=0;for(;o<s.length-3;o++){a=0;for(let t=0;t<e;t++)r.push(i.Vector3.CatmullRom(s[o],s[o+1],s[o+2],s[o+3],a)),a+=n}o--,r.push(i.Vector3.CatmullRom(s[o],s[o+1],s[o+2],s[o+3],a))}return new c(r)}static ArcThru3Points(t,e,s,r=32,n=!1,a=!1){let o=[],h=e.subtract(t),u=s.subtract(e),l=t.subtract(s),d=i.Vector3.Cross(h,u),_=d.length();if(_<1e-8)return new c(o);let g=h.lengthSquared(),f=u.lengthSquared(),p=l.lengthSquared(),M=d.lengthSquared(),m=.5*h.length()*u.length()*l.length()/_,I=i.Vector3.Dot(h,l),y=i.Vector3.Dot(h,u),S=i.Vector3.Dot(u,l),x=t.scale(-.5*f*I/M).add(e.scale(-.5*p*y/M)).add(s.scale(-.5*g*S/M)),A=t.subtract(x).normalize(),D=i.Vector3.Cross(d,A).normalize();if(a){let e=2*Math.PI/r;for(let t=0;t<=2*Math.PI;t+=e)o.push(x.add(A.scale(m*Math.cos(t)).add(D.scale(m*Math.sin(t)))));o.push(t)}else{let e,i=1/r,a=0;do e=x.add(A.scale(m*Math.cos(a)).add(D.scale(m*Math.sin(a)))),o.push(e),a+=i;while(!e.equalsWithEpsilon(s,m*i*1.1))o.push(s),n&&o.push(t)}return new c(o)}constructor(t){this._length=0,this._points=t,this._length=this._computeLength(t)}getPoints(){return this._points}length(){return this._length}continue(t){let e=this._points[this._points.length-1],s=this._points.slice(),r=t.getPoints();for(let t=1;t<r.length;t++)s.push(r[t].subtract(r[0]).add(e));return new c(s)}_computeLength(t){let e=0;for(let s=1;s<t.length;s++)e+=t[s].subtract(t[s-1]).length();return e}}t.s(["Angle",0,a,"Arc2",0,o,"BezierCurve",0,class{static Interpolate(t,e,s,r,i){if(0===t)return 0;let n=1-3*r+3*e,a=3*r-6*e,o=3*e,h=t;for(let e=0;e<5;e++){let e=h*h,s=e*h*n+a*e+o*h,r=1/(3*n*e+2*a*h+o);h-=(s-t)*r,h=Math.min(1,Math.max(0,h))}return 3*Math.pow(1-h,2)*h*s+3*(1-h)*Math.pow(h,2)*i+Math.pow(h,3)}},"Curve3",0,c,"Orientation",0,s,"Path2",0,h,"Path3D",0,u])},3578,t=>{"use strict";var e=t.i(69400),s=t.i(16347),r=t.i(13035),i=t.i(64831),n=t.i(6252),a=t.i(25343),o=t.i(41041),h=t.i(44520);class u extends r.AbstractMesh{constructor(t,e){for(const s of(super(t,e.getScene()),this._indexInSourceMeshInstanceArray=-1,this._distanceToCamera=0,e.addInstance(this),this._sourceMesh=e,this._unIndexed=e._unIndexed,this.position.copyFrom(e.position),this.rotation.copyFrom(e.rotation),this.scaling.copyFrom(e.scaling),e.rotationQuaternion&&(this.rotationQuaternion=e.rotationQuaternion.clone()),this.animations=e.animations.slice(),e.getAnimationRanges()))null!=s&&this.createAnimationRange(s.name,s.from,s.to);if(this.infiniteDistance=e.infiniteDistance,this.setPivotMatrix(e.getPivotMatrix()),e.skeleton||e.morphTargetManager||!e.hasBoundingInfo)this.refreshBoundingInfo(!0,!0);else{const t=e.getBoundingInfo();this.buildBoundingInfo(t.minimum,t.maximum)}this._syncSubMeshes()}getClassName(){return"InstancedMesh"}get lightSources(){return this._sourceMesh._lightSources}_resyncLightSources(){}_resyncLightSource(){}_removeLightSource(){}get receiveShadows(){return this._sourceMesh.receiveShadows}set receiveShadows(t){this._sourceMesh?.receiveShadows!==t&&s.Logger.Warn("Setting receiveShadows on an instanced mesh has no effect")}get material(){return this._sourceMesh.material}set material(t){this._sourceMesh?.material!==t&&s.Logger.Warn("Setting material on an instanced mesh has no effect")}get visibility(){return this._sourceMesh.visibility}set visibility(t){this._sourceMesh?.visibility!==t&&s.Logger.Warn("Setting visibility on an instanced mesh has no effect")}get skeleton(){return this._sourceMesh.skeleton}set skeleton(t){this._sourceMesh?.skeleton!==t&&s.Logger.Warn("Setting skeleton on an instanced mesh has no effect")}get renderingGroupId(){return this._sourceMesh.renderingGroupId}set renderingGroupId(t){this._sourceMesh&&t!==this._sourceMesh.renderingGroupId&&s.Logger.Warn("Note - setting renderingGroupId of an instanced mesh has no effect on the scene")}getTotalVertices(){return this._sourceMesh?this._sourceMesh.getTotalVertices():0}getTotalIndices(){return this._sourceMesh.getTotalIndices()}get sourceMesh(){return this._sourceMesh}get geometry(){return this._sourceMesh._geometry}createInstance(t){return this._sourceMesh.createInstance(t)}isReady(t=!1){return this._sourceMesh.isReady(t,!0)}getVerticesData(t,e,s){return this._sourceMesh.getVerticesData(t,e,s)}copyVerticesData(t,e){this._sourceMesh.copyVerticesData(t,e)}getVertexBuffer(t,e){return this._sourceMesh.getVertexBuffer(t,e)}setVerticesData(t,e,s,r){return this.sourceMesh&&this.sourceMesh.setVerticesData(t,e,s,r),this.sourceMesh}updateVerticesData(t,e,s,r){return this.sourceMesh&&this.sourceMesh.updateVerticesData(t,e,s,r),this.sourceMesh}setIndices(t,e=null){return this.sourceMesh&&this.sourceMesh.setIndices(t,e),this.sourceMesh}isVerticesDataPresent(t){return this._sourceMesh.isVerticesDataPresent(t)}getIndices(){return this._sourceMesh.getIndices()}get _positions(){return this._sourceMesh._positions}refreshBoundingInfo(t=!1,e=!1){if(this.hasBoundingInfo&&this.getBoundingInfo().isLocked)return this;let s=this._sourceMesh.geometry?this._sourceMesh.geometry.boundingBias:null;return this._refreshBoundingInfo(this._sourceMesh._getData("object"==typeof t?t:{applySkeleton:t,applyMorph:e},null,o.VertexBuffer.PositionKind),s),this}_preActivate(){return this._currentLOD&&this._currentLOD._preActivate(),this}_activate(t,e){if(super._activate(t,e),this._sourceMesh.subMeshes||s.Logger.Warn("Instances should only be created for meshes with geometry."),this._currentLOD){if(this._currentLOD._getWorldMatrixDeterminant()>=0!=this._getWorldMatrixDeterminant()>=0)return this._internalAbstractMeshDataInfo._actAsRegularMesh=!0,!0;if(this._internalAbstractMeshDataInfo._actAsRegularMesh=!1,this._currentLOD._registerInstanceForRenderId(this,t),e){if(!this._currentLOD._internalAbstractMeshDataInfo._isActiveIntermediate)return this._currentLOD._internalAbstractMeshDataInfo._onlyForInstancesIntermediate=!0,!0}else if(!this._currentLOD._internalAbstractMeshDataInfo._isActive)return this._currentLOD._internalAbstractMeshDataInfo._onlyForInstances=!0,!0}return!1}_postActivate(){this._sourceMesh.edgesShareWithInstances&&this._sourceMesh._edgesRenderer&&this._sourceMesh._edgesRenderer.isEnabled&&this._sourceMesh._renderingGroup?(this._sourceMesh._renderingGroup._edgesRenderers.pushNoDuplicate(this._sourceMesh._edgesRenderer),this._sourceMesh._edgesRenderer.customInstances.push(this.getWorldMatrix())):this._edgesRenderer&&this._edgesRenderer.isEnabled&&this._sourceMesh._renderingGroup&&this._sourceMesh._renderingGroup._edgesRenderers.push(this._edgesRenderer)}getWorldMatrix(){if(this._currentLOD&&this._currentLOD!==this._sourceMesh&&this._currentLOD.billboardMode!==a.TransformNode.BILLBOARDMODE_NONE&&this._currentLOD._masterMesh!==this){this._billboardWorldMatrix||(this._billboardWorldMatrix=new e.Matrix);let t=this._currentLOD._masterMesh;return this._currentLOD._masterMesh=this,e.TmpVectors.Vector3[7].copyFrom(this._currentLOD.position),this._currentLOD.position.set(0,0,0),this._billboardWorldMatrix.copyFrom(this._currentLOD.computeWorldMatrix(!0)),this._currentLOD.position.copyFrom(e.TmpVectors.Vector3[7]),this._currentLOD._masterMesh=t,this._billboardWorldMatrix}return super.getWorldMatrix()}get isAnInstance(){return!0}getLOD(t){if(!t)return this;let e=this.sourceMesh.getLODLevels();if(e&&0!==e.length){let e=this.getBoundingInfo();this._currentLOD=this.sourceMesh.getLOD(t,e.boundingSphere)}else this._currentLOD=this.sourceMesh;return this._currentLOD}_preActivateForIntermediateRendering(t){return this.sourceMesh._preActivateForIntermediateRendering(t)}_syncSubMeshes(){if(this.releaseSubMeshes(),this._sourceMesh.subMeshes)for(let t=0;t<this._sourceMesh.subMeshes.length;t++)this._sourceMesh.subMeshes[t].clone(this,this._sourceMesh);return this}_generatePointsArray(){return this._sourceMesh._generatePointsArray()}_updateBoundingInfo(){return this.hasBoundingInfo?this.getBoundingInfo().update(this.worldMatrixFromCache):this.buildBoundingInfo(this.absolutePosition,this.absolutePosition,this.worldMatrixFromCache),this._updateSubMeshesBoundingInfo(this.worldMatrixFromCache),this}clone(t,e=null,s,r){let i=(r||this._sourceMesh).createInstance(t);if(n.DeepCopier.DeepCopy(this,i,["name","subMeshes","uniqueId","parent","lightSources","receiveShadows","material","visibility","skeleton","sourceMesh","isAnInstance","facetNb","isFacetDataEnabled","isBlocked","useBones","hasInstances","collider","edgesRenderer","forward","up","right","absolutePosition","absoluteScaling","absoluteRotationQuaternion","isWorldMatrixFrozen","nonUniformScaling","behaviors","worldMatrixFromCache","hasThinInstances","hasBoundingInfo","geometry"],[]),e&&(i.parent=e),!s)for(let t=0;t<this.getScene().meshes.length;t++){let e=this.getScene().meshes[t];e.parent===this&&e.clone(e.name,i)}return i.computeWorldMatrix(!0),this.onClonedObservable.notifyObservers(i),i}dispose(t,e=!1){this._sourceMesh.removeInstance(this),super.dispose(t,e)}_serializeAsParent(t){super._serializeAsParent(t),t.parentId=this._sourceMesh.uniqueId,t.parentInstanceIndex=this._indexInSourceMeshInstanceArray}instantiateHierarchy(t=null,e,s){let r=this.clone("Clone of "+(this.name||this.id),t||this.parent,!0,e&&e.newSourcedMesh);for(let t of(r&&s&&s(this,r),this.getChildTransformNodes(!0)))t.instantiateHierarchy(r,e,s);return r}}let c=!1;t.s(["InstancedMesh",0,u,"RegisterInstancedMesh",0,function(){c||(c=!0,i.Mesh._instancedMeshFactory=(t,e)=>{let s=new u(t,e);if(e.instancedBuffers)for(let t in s.instancedBuffers={},e.instancedBuffers)s.instancedBuffers[t]=e.instancedBuffers[t];return s},i.Mesh.prototype.registerInstancedBuffer=function(t,e){if(this._userInstancedBuffersStorage?.vertexBuffers[t]?.dispose(),this._userInstancedBuffersStorage?.renderPasses)for(let e in this._userInstancedBuffersStorage.renderPasses){let s=this._userInstancedBuffersStorage.renderPasses[e];s[t]?.dispose(),delete s[t]}if(!this.instancedBuffers)for(let t of(this.instancedBuffers={},this.instances))t.instancedBuffers={};for(let s of(this._userInstancedBuffersStorage||(this._userInstancedBuffersStorage={data:{},vertexBuffers:{},strides:{},sizes:{},vertexArrayObjects:this.getEngine().getCaps().vertexArrayObject?{}:void 0}),this.instancedBuffers[t]=null,this._userInstancedBuffersStorage.strides[t]=e,this._userInstancedBuffersStorage.sizes[t]=32*e,this._userInstancedBuffersStorage.data[t]=new Float32Array(this._userInstancedBuffersStorage.sizes[t]),this._userInstancedBuffersStorage.vertexBuffers[t]=this._instanceDataStorage.useMonoDataStorageRenderPass?new o.VertexBuffer(this.getEngine(),this._userInstancedBuffersStorage.data[t],t,!0,!1,e,!0):null,this.instances))s.instancedBuffers[t]=null;this._invalidateInstanceVertexArrayObject(),this._markSubMeshesAsAttributesDirty()},i.Mesh.prototype._processInstancedBuffers=function(t,e){let s,r=t?t.length:0,i=!this._instanceDataStorage.useMonoDataStorageRenderPass;if(i){let t=this._instanceDataStorage.engine.currentRenderPassId;this._userInstancedBuffersStorage.renderPasses||(this._userInstancedBuffersStorage.renderPasses={}),this._userInstancedBuffersStorage.renderPasses[t]||(this._userInstancedBuffersStorage.renderPasses[t]={}),s=this._userInstancedBuffersStorage.renderPasses[t]}for(let n in this.instancedBuffers){let a=this._userInstancedBuffersStorage.sizes[n],h=this._userInstancedBuffersStorage.strides[n],u=(r+1)*h;for(;a<u;)a*=2;this._userInstancedBuffersStorage.data[n].length!=a&&(this._userInstancedBuffersStorage.data[n]=new Float32Array(a),this._userInstancedBuffersStorage.sizes[n]=a,i?s[n]&&(s[n].dispose(),s[n]=null):this._userInstancedBuffersStorage.vertexBuffers[n]&&(this._userInstancedBuffersStorage.vertexBuffers[n].dispose(),this._userInstancedBuffersStorage.vertexBuffers[n]=null));let c=this._userInstancedBuffersStorage.data[n],l=0;if(e){let t=this.instancedBuffers[n]??0;t.toArray?t.toArray(c,l):t.copyToArray?t.copyToArray(c,l):c[l]=t,l+=h}for(let e=0;e<r;e++){let s=t[e].instancedBuffers[n]??0;s.toArray?s.toArray(c,l):s.copyToArray?s.copyToArray(c,l):c[l]=s,l+=h}i?s[n]?s[n].updateDirectly(c,0):(s[n]=new o.VertexBuffer(this.getEngine(),this._userInstancedBuffersStorage.data[n],n,!0,!1,h,!0),this._invalidateInstanceVertexArrayObject()):this._userInstancedBuffersStorage.vertexBuffers[n]?this._userInstancedBuffersStorage.vertexBuffers[n].updateDirectly(c,0):(this._userInstancedBuffersStorage.vertexBuffers[n]=new o.VertexBuffer(this.getEngine(),this._userInstancedBuffersStorage.data[n],n,!0,!1,h,!0),this._invalidateInstanceVertexArrayObject())}},i.Mesh.prototype._invalidateInstanceVertexArrayObject=function(){if(this._userInstancedBuffersStorage&&void 0!==this._userInstancedBuffersStorage.vertexArrayObjects){for(let t in this._userInstancedBuffersStorage.vertexArrayObjects)this.getEngine().releaseVertexArrayObject(this._userInstancedBuffersStorage.vertexArrayObjects[t]);this._userInstancedBuffersStorage.vertexArrayObjects={}}},i.Mesh.prototype._disposeInstanceSpecificData=function(){for(let t in this._instanceDataStorage.renderPasses)this._instanceDataStorage.renderPasses[t].instancesBuffer?.dispose();for(this._instanceDataStorage.renderPasses={},this._instanceDataStorage.dataStorageRenderPass?.instancesBuffer?.dispose();this.instances.length;)this.instances[0].dispose();for(let t in this.instancedBuffers)this._userInstancedBuffersStorage.vertexBuffers[t]&&this._userInstancedBuffersStorage.vertexBuffers[t].dispose();this._invalidateInstanceVertexArrayObject(),this.instancedBuffers={}},(0,h.RegisterClass)("BABYLON.InstancedMesh",u))}])},5742,t=>{t.v(e=>Promise.all(["static/chunks/0rykrf_vofbad.js"].map(e=>t.l(e))).then(()=>e(12838)))},17418,t=>{t.v(e=>Promise.all(["static/chunks/2kk_vvmr2xm3d.js"].map(e=>t.l(e))).then(()=>e(80072)))},58725,t=>{t.v(e=>Promise.all(["static/chunks/1h1gixjbjkbsl.js"].map(e=>t.l(e))).then(()=>e(81088)))},19192,t=>{t.v(e=>Promise.all(["static/chunks/3puu2_-t0lln9.js"].map(e=>t.l(e))).then(()=>e(72867)))},11432,t=>{t.v(e=>Promise.all(["static/chunks/2_6b9lraq-exh.js"].map(e=>t.l(e))).then(()=>e(25576)))}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,43095,t=>{"use strict";var i=t.i(17884),o=t.i(75105),e=t.i(44520);class a extends i.FlowGraphBlock{constructor(t){super(t),this.condition=this.registerDataInput("condition",o.RichTypeBoolean),this.onTrue=this.registerDataInput("onTrue",o.RichTypeAny),this.onFalse=this.registerDataInput("onFalse",o.RichTypeAny),this.output=this.registerDataOutput("output",o.RichTypeAny)}_updateOutputs(t){let i=this.condition.getValue(t);this.output.setValue(i?this.onTrue.getValue(t):this.onFalse.getValue(t),t)}getClassName(){return"FlowGraphConditionalBlock"}}let s=!1;function n(){s||(s=!0,(0,e.RegisterClass)("FlowGraphConditionalBlock",a))}t.s(["FlowGraphConditionalDataBlock",0,a,"RegisterFlowGraphConditionalDataBlock",0,n],39408),n(),t.s([],10974),t.i(10974),t.i(39408),t.s(["FlowGraphConditionalDataBlock",0,a],43095)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,96333,60420,t=>{"use strict";var e=t.i(16347),r=t.i(92180);class i{constructor(t,e,r=!1,i,s=!1,a){this._uniformNames=[],this._valueCache={},this._engine=t,this._noUBO=!t.supportsUniformBuffers||s,this._dynamic=r,this._name=i??"no-name",this._data=e||[],this._uniformLocations={},this._uniformSizes={},this._uniformArraySizes={},this._uniformLocationPointer=0,this._needSync=!1,this._trackUBOsInFrame=!1,(void 0===a&&this._engine._features.trackUbosInFrame||!0===a)&&(this._buffers=[],this._bufferIndex=-1,this._bufferUpdatedLastFrame=!1,this._createBufferOnWrite=!1,this._currentFrameId=0,this._trackUBOsInFrame=!0),this._noUBO?(this.updateMatrix3x3=this._updateMatrix3x3ForEffect,this.updateMatrix2x2=this._updateMatrix2x2ForEffect,this.updateFloat=this._updateFloatForEffect,this.updateFloat2=this._updateFloat2ForEffect,this.updateFloat3=this._updateFloat3ForEffect,this.updateFloat4=this._updateFloat4ForEffect,this.updateFloatArray=this._updateFloatArrayForEffect,this.updateArray=this._updateArrayForEffect,this.updateIntArray=this._updateIntArrayForEffect,this.updateUIntArray=this._updateUIntArrayForEffect,this.updateMatrix=this._updateMatrixForEffect,this.updateMatrices=this._updateMatricesForEffect,this.updateVector3=this._updateVector3ForEffect,this.updateVector4=this._updateVector4ForEffect,this.updateColor3=this._updateColor3ForEffect,this.updateColor4=this._updateColor4ForEffect,this.updateDirectColor4=this._updateDirectColor4ForEffect,this.updateInt=this._updateIntForEffect,this.updateInt2=this._updateInt2ForEffect,this.updateInt3=this._updateInt3ForEffect,this.updateInt4=this._updateInt4ForEffect,this.updateUInt=this._updateUIntForEffect,this.updateUInt2=this._updateUInt2ForEffect,this.updateUInt3=this._updateUInt3ForEffect,this.updateUInt4=this._updateUInt4ForEffect):(this._engine._uniformBuffers.push(this),this.updateMatrix3x3=this._updateMatrix3x3ForUniform,this.updateMatrix2x2=this._updateMatrix2x2ForUniform,this.updateFloat=this._updateFloatForUniform,this.updateFloat2=this._updateFloat2ForUniform,this.updateFloat3=this._updateFloat3ForUniform,this.updateFloat4=this._updateFloat4ForUniform,this.updateFloatArray=this._updateFloatArrayForUniform,this.updateArray=this._updateArrayForUniform,this.updateIntArray=this._updateIntArrayForUniform,this.updateUIntArray=this._updateUIntArrayForUniform,this.updateMatrix=this._updateMatrixForUniform,this.updateMatrices=this._updateMatricesForUniform,this.updateVector3=this._updateVector3ForUniform,this.updateVector4=this._updateVector4ForUniform,this.updateColor3=this._updateColor3ForUniform,this.updateColor4=this._updateColor4ForUniform,this.updateDirectColor4=this._updateDirectColor4ForUniform,this.updateInt=this._updateIntForUniform,this.updateInt2=this._updateInt2ForUniform,this.updateInt3=this._updateInt3ForUniform,this.updateInt4=this._updateInt4ForUniform,this.updateUInt=this._updateUIntForUniform,this.updateUInt2=this._updateUInt2ForUniform,this.updateUInt3=this._updateUInt3ForUniform,this.updateUInt4=this._updateUInt4ForUniform)}get useUbo(){return!this._noUBO}get isSync(){return!this._needSync}isDynamic(){return this._dynamic}getData(){return this._bufferData}getBuffer(){return this._buffer}getUniformNames(){return this._uniformNames}_fillAlignment(t){let e;if(e=t<=2?t:4,this._uniformLocationPointer%e!=0){let t=this._uniformLocationPointer;this._uniformLocationPointer+=e-this._uniformLocationPointer%e;let r=this._uniformLocationPointer-t;for(let t=0;t<r;t++)this._data.push(0)}}addUniform(t,e,r=0){let i;if((r>0&&"number"==typeof e&&(this._uniformArraySizes[t]={strideSize:e,arraySize:r}),void 0===this._uniformLocations[t])&&(this._uniformNames.push(t),!this._noUBO)){if(r>0){if(e instanceof Array)throw"addUniform should not be use with Array in UBO: "+t;if(this._fillAlignment(4),16==e)e*=r;else{let t=4-e;e=e*r+t*r}i=[];for(let t=0;t<e;t++)i.push(0)}else{if(e instanceof Array)e=(i=e).length;else{i=[];for(let t=0;t<e;t++)i.push(0)}this._fillAlignment(e)}this._uniformSizes[t]=e,this._uniformLocations[t]=this._uniformLocationPointer,this._uniformLocationPointer+=e;for(let t=0;t<e;t++)this._data.push(i[t]);this._needSync=!0}}addMatrix(t,e){this.addUniform(t,Array.prototype.slice.call(e.asArray()))}addFloat2(t,e,r){this.addUniform(t,[e,r])}addFloat3(t,e,r,i){this.addUniform(t,[e,r,i])}addColor3(t,e){let r=[e.r,e.g,e.b];this.addUniform(t,r)}addColor4(t,e,r){let i=[e.r,e.g,e.b,r];this.addUniform(t,i)}addVector3(t,e){let r=[e.x,e.y,e.z];this.addUniform(t,r)}addMatrix3x3(t){this.addUniform(t,12)}addMatrix2x2(t){this.addUniform(t,8)}create(){this._noUBO||this._buffer||(this._fillAlignment(4),this._bufferData=new Float32Array(this._data),this._rebuild(),this._needSync=!0)}_getNamesDebug(){let t=[],e=0;for(let r in this._uniformLocations)if(t.push(r),10==++e)break;return t.join(",")}_rebuild(){!this._noUBO&&this._bufferData&&(this._dynamic?this._buffer=this._engine.createDynamicUniformBuffer(this._bufferData,this._name+"_UniformList:"+this._getNamesDebug()):this._buffer=this._engine.createUniformBuffer(this._bufferData,this._name+"_UniformList:"+this._getNamesDebug()),this._trackUBOsInFrame&&(this._buffers.push([this._buffer,this._engine._features.checkUbosContentBeforeUpload?this._bufferData.slice():void 0]),this._bufferIndex=this._buffers.length-1,this._createBufferOnWrite=!1))}_rebuildAfterContextLost(){this._trackUBOsInFrame&&(this._buffers=[],this._currentFrameId=0),this._rebuild()}get _numBuffers(){return this._buffers.length}get _indexBuffer(){return this._bufferIndex}get name(){return this._name}set name(t){this._name=t}get currentEffect(){return this._currentEffect}_buffersEqual(t,e){for(let r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0}_copyBuffer(t,e){for(let r=0;r<t.length;++r)e[r]=t[r]}update(){if(!this._noUBO){if(this.bindUniformBuffer(),!this._buffer)return void this.create();if(!this._dynamic&&!this._needSync){this._createBufferOnWrite=this._trackUBOsInFrame;return}if(this._buffers&&this._buffers.length>1&&this._buffers[this._bufferIndex][1])if(this._buffersEqual(this._bufferData,this._buffers[this._bufferIndex][1])){this._needSync=!1,this._createBufferOnWrite=this._trackUBOsInFrame;return}else this._copyBuffer(this._bufferData,this._buffers[this._bufferIndex][1]);this._bufferUpdatedLastFrame=!0,this._engine.updateUniformBuffer(this._buffer,this._bufferData),this._needSync=!1,this._createBufferOnWrite=this._trackUBOsInFrame}}_createNewBuffer(){this._bufferIndex+1<this._buffers.length?(this._bufferIndex++,this._buffer=this._buffers[this._bufferIndex][0],this._createBufferOnWrite=!1,this._needSync=!0):this._rebuild()}_checkNewFrame(){this._trackUBOsInFrame&&this._currentFrameId!==this._engine.frameId&&(this._currentFrameId=this._engine.frameId,this._createBufferOnWrite=!1,this._buffers&&this._buffers.length>0?(1===this._buffers.length?this._needSync=!this._bufferUpdatedLastFrame:this._needSync=0!==this._bufferIndex,this._bufferIndex=0,this._buffer=this._buffers[this._bufferIndex][0]):this._bufferIndex=-1)}updateUniform(t,r,i){this._checkNewFrame();let s=this._uniformLocations[t];if(void 0===s){if(this._buffer)return void e.Logger.Error("Cannot add an uniform after UBO has been created. uniformName="+t);this.addUniform(t,i),s=this._uniformLocations[t]}if(this._buffer||this.create(),this._dynamic)for(let t=0;t<i;t++)this._bufferData[s+t]=r[t];else{let t=!1;for(let e=0;e<i;e++)(16!==i||this._engine._features.uniformBufferHardCheckMatrix)&&this._bufferData[s+e]===Math.fround(r[e])||(t=!0,this._createBufferOnWrite&&this._createNewBuffer(),this._bufferData[s+e]=r[e]);this._needSync=this._needSync||t}}updateUniformArray(t,i,s){this._checkNewFrame();let a=this._uniformLocations[t];if(void 0===a)return void e.Logger.Error("Cannot add an uniform Array dynamically. Please, add it using addUniform and make sure that uniform buffers are supported by the current engine.");this._buffer||this.create();let f=this._uniformArraySizes[t];if(this._dynamic)for(let t=0;t<s;t++)this._bufferData[a+t]=i[t];else{let t=!1,e=0,n=0;for(let u=0;u<s;u++)if(this._bufferData[a+4*n+e]!==r.Tools.FloatRound(i[u])&&(t=!0,this._createBufferOnWrite&&this._createNewBuffer(),this._bufferData[a+4*n+e]=i[u]),++e===f.strideSize){for(;e<4;e++)this._bufferData[a+4*n+e]=0;e=0,n++}this._needSync=this._needSync||t}}_cacheMatrix(t,e){this._checkNewFrame();let r=this._valueCache[t],i=e.updateFlag;return(void 0===r||r!==i)&&(this._valueCache[t]=i,!0)}_updateMatrix3x3ForUniform(t,e){for(let t=0;t<3;t++)i._TempBuffer[4*t]=e[3*t],i._TempBuffer[4*t+1]=e[3*t+1],i._TempBuffer[4*t+2]=e[3*t+2],i._TempBuffer[4*t+3]=0;this.updateUniform(t,i._TempBuffer,12)}_updateMatrix3x3ForEffect(t,e){this._currentEffect.setMatrix3x3(t,e)}_updateMatrix2x2ForEffect(t,e){this._currentEffect.setMatrix2x2(t,e)}_updateMatrix2x2ForUniform(t,e){for(let t=0;t<2;t++)i._TempBuffer[4*t]=e[2*t],i._TempBuffer[4*t+1]=e[2*t+1],i._TempBuffer[4*t+2]=0,i._TempBuffer[4*t+3]=0;this.updateUniform(t,i._TempBuffer,8)}_updateFloatForEffect(t,e,r=""){this._currentEffect.setFloat(t+r,e)}_updateFloatForUniform(t,e){i._TempBuffer[0]=e,this.updateUniform(t,i._TempBuffer,1)}_updateFloat2ForEffect(t,e,r,i=""){this._currentEffect.setFloat2(t+i,e,r)}_updateFloat2ForUniform(t,e,r){i._TempBuffer[0]=e,i._TempBuffer[1]=r,this.updateUniform(t,i._TempBuffer,2)}_updateFloat3ForEffect(t,e,r,i,s=""){this._currentEffect.setFloat3(t+s,e,r,i)}_updateFloat3ForUniform(t,e,r,s){i._TempBuffer[0]=e,i._TempBuffer[1]=r,i._TempBuffer[2]=s,this.updateUniform(t,i._TempBuffer,3)}_updateFloat4ForEffect(t,e,r,i,s,a=""){this._currentEffect.setFloat4(t+a,e,r,i,s)}_updateFloat4ForUniform(t,e,r,s,a){i._TempBuffer[0]=e,i._TempBuffer[1]=r,i._TempBuffer[2]=s,i._TempBuffer[3]=a,this.updateUniform(t,i._TempBuffer,4)}_updateFloatArrayForEffect(t,e,r=""){switch(this._uniformArraySizes[t]?.strideSize){case 2:this._currentEffect.setFloatArray2(t+r,e);break;case 3:this._currentEffect.setFloatArray3(t+r,e);break;case 4:this._currentEffect.setFloatArray4(t+r,e);break;default:this._currentEffect.setFloatArray(t+r,e)}}_updateFloatArrayForUniform(t,e){this.updateUniformArray(t,e,e.length)}_updateArrayForEffect(t,e){this._currentEffect.setArray(t,e)}_updateArrayForUniform(t,e){this.updateUniformArray(t,e,e.length)}_updateIntArrayForEffect(t,e){this._currentEffect.setIntArray(t,e)}_updateIntArrayForUniform(t,e){i._TempBufferInt32View.set(e),this.updateUniformArray(t,i._TempBuffer,e.length)}_updateUIntArrayForEffect(t,e){this._currentEffect.setUIntArray(t,e)}_updateUIntArrayForUniform(t,e){i._TempBufferUInt32View.set(e),this.updateUniformArray(t,i._TempBuffer,e.length)}_updateMatrixForEffect(t,e){this._currentEffect.setMatrix(t,e)}_updateMatrixForUniform(t,e){this._cacheMatrix(t,e)&&this.updateUniform(t,e.asArray(),16)}_updateMatricesForEffect(t,e){this._currentEffect.setMatrices(t,e)}_updateMatricesForUniform(t,e){this.updateUniform(t,e,e.length)}_updateVector3ForEffect(t,e){this._currentEffect.setVector3(t,e)}_updateVector3ForUniform(t,e){i._TempBuffer[0]=e.x,i._TempBuffer[1]=e.y,i._TempBuffer[2]=e.z,this.updateUniform(t,i._TempBuffer,3)}_updateVector4ForEffect(t,e){this._currentEffect.setVector4(t,e)}_updateVector4ForUniform(t,e){i._TempBuffer[0]=e.x,i._TempBuffer[1]=e.y,i._TempBuffer[2]=e.z,i._TempBuffer[3]=e.w,this.updateUniform(t,i._TempBuffer,4)}_updateColor3ForEffect(t,e,r=""){this._currentEffect.setColor3(t+r,e)}_updateColor3ForUniform(t,e){i._TempBuffer[0]=e.r,i._TempBuffer[1]=e.g,i._TempBuffer[2]=e.b,this.updateUniform(t,i._TempBuffer,3)}_updateColor4ForEffect(t,e,r,i=""){this._currentEffect.setColor4(t+i,e,r)}_updateDirectColor4ForEffect(t,e,r=""){this._currentEffect.setDirectColor4(t+r,e)}_updateColor4ForUniform(t,e,r){i._TempBuffer[0]=e.r,i._TempBuffer[1]=e.g,i._TempBuffer[2]=e.b,i._TempBuffer[3]=r,this.updateUniform(t,i._TempBuffer,4)}_updateDirectColor4ForUniform(t,e){i._TempBuffer[0]=e.r,i._TempBuffer[1]=e.g,i._TempBuffer[2]=e.b,i._TempBuffer[3]=e.a,this.updateUniform(t,i._TempBuffer,4)}_updateIntForEffect(t,e,r=""){this._currentEffect.setInt(t+r,e)}_updateIntForUniform(t,e){i._TempBufferInt32View[0]=e,this.updateUniform(t,i._TempBuffer,1)}_updateInt2ForEffect(t,e,r,i=""){this._currentEffect.setInt2(t+i,e,r)}_updateInt2ForUniform(t,e,r){i._TempBufferInt32View[0]=e,i._TempBufferInt32View[1]=r,this.updateUniform(t,i._TempBuffer,2)}_updateInt3ForEffect(t,e,r,i,s=""){this._currentEffect.setInt3(t+s,e,r,i)}_updateInt3ForUniform(t,e,r,s){i._TempBufferInt32View[0]=e,i._TempBufferInt32View[1]=r,i._TempBufferInt32View[2]=s,this.updateUniform(t,i._TempBuffer,3)}_updateInt4ForEffect(t,e,r,i,s,a=""){this._currentEffect.setInt4(t+a,e,r,i,s)}_updateInt4ForUniform(t,e,r,s,a){i._TempBufferInt32View[0]=e,i._TempBufferInt32View[1]=r,i._TempBufferInt32View[2]=s,i._TempBufferInt32View[3]=a,this.updateUniform(t,i._TempBuffer,4)}_updateUIntForEffect(t,e,r=""){this._currentEffect.setUInt(t+r,e)}_updateUIntForUniform(t,e){i._TempBufferUInt32View[0]=e,this.updateUniform(t,i._TempBuffer,1)}_updateUInt2ForEffect(t,e,r,i=""){this._currentEffect.setUInt2(t+i,e,r)}_updateUInt2ForUniform(t,e,r){i._TempBufferUInt32View[0]=e,i._TempBufferUInt32View[1]=r,this.updateUniform(t,i._TempBuffer,2)}_updateUInt3ForEffect(t,e,r,i,s=""){this._currentEffect.setUInt3(t+s,e,r,i)}_updateUInt3ForUniform(t,e,r,s){i._TempBufferUInt32View[0]=e,i._TempBufferUInt32View[1]=r,i._TempBufferUInt32View[2]=s,this.updateUniform(t,i._TempBuffer,3)}_updateUInt4ForEffect(t,e,r,i,s,a=""){this._currentEffect.setUInt4(t+a,e,r,i,s)}_updateUInt4ForUniform(t,e,r,s,a){i._TempBufferUInt32View[0]=e,i._TempBufferUInt32View[1]=r,i._TempBufferUInt32View[2]=s,i._TempBufferUInt32View[3]=a,this.updateUniform(t,i._TempBuffer,4)}setTexture(t,e){this._currentEffect.setTexture(t,e)}setTextureArray(t,e){this._currentEffect.setTextureArray(t,e)}bindTexture(t,e){this._currentEffect._bindTexture(t,e)}updateUniformDirectly(t,e){this.updateUniform(t,e,e.length),this.update()}bindToEffect(t,e){this._currentEffect=t,this._currentEffectName=e}bindUniformBuffer(){!this._noUBO&&this._buffer&&this._currentEffect&&this._currentEffect.bindUniformBuffer(this._buffer,this._currentEffectName)}unbindEffect(){this._currentEffect=void 0,this._currentEffectName=void 0}setDataBuffer(t){if(!this._buffers)return this._buffer===t;for(let e=0;e<this._buffers.length;++e)if(this._buffers[e][0]===t)return this._bufferIndex=e,this._buffer=t,this._createBufferOnWrite=!1,this._currentEffect=void 0,this._buffers.length>1&&this._buffers[e][1]&&this._bufferData.set(this._buffers[e][1]),this._valueCache={},this._currentFrameId=this._engine.frameId,!0;return!1}has(t){return void 0!==this._uniformLocations[t]}dispose(){if(this._noUBO)return;let t=this._engine._uniformBuffers,e=t.indexOf(this);if(-1!==e&&(t[e]=t[t.length-1],t.pop()),this._trackUBOsInFrame&&this._buffers)for(let t=0;t<this._buffers.length;++t){let e=this._buffers[t][0];this._engine._releaseBuffer(e)}else this._buffer&&this._engine._releaseBuffer(this._buffer)&&(this._buffer=null)}}i._MAX_UNIFORM_SIZE=256,i._TempBuffer=new Float32Array(i._MAX_UNIFORM_SIZE),i._TempBufferInt32View=new Int32Array(i._TempBuffer.buffer),i._TempBufferUInt32View=new Uint32Array(i._TempBuffer.buffer),t.s(["UniformBuffer",0,i],96333);class s{static CompareLightsPriority(t,e){return t.shadowEnabled!==e.shadowEnabled?!!e.shadowEnabled-!!t.shadowEnabled:e.renderPriority-t.renderPriority}}s.FALLOFF_DEFAULT=0,s.FALLOFF_PHYSICAL=1,s.FALLOFF_GLTF=2,s.FALLOFF_STANDARD=3,s.LIGHTMAP_DEFAULT=0,s.LIGHTMAP_SPECULAR=1,s.LIGHTMAP_SHADOWSONLY=2,s.INTENSITYMODE_AUTOMATIC=0,s.INTENSITYMODE_LUMINOUSPOWER=1,s.INTENSITYMODE_LUMINOUSINTENSITY=2,s.INTENSITYMODE_ILLUMINANCE=3,s.INTENSITYMODE_LUMINANCE=4,s.LIGHTTYPEID_POINTLIGHT=0,s.LIGHTTYPEID_DIRECTIONALLIGHT=1,s.LIGHTTYPEID_SPOTLIGHT=2,s.LIGHTTYPEID_HEMISPHERICLIGHT=3,s.LIGHTTYPEID_RECT_AREALIGHT=4,s.LIGHTTYPEID_CLUSTERED_CONTAINER=5,t.s(["LightConstants",0,s],60420)},41041,t=>{"use strict";var e=t.i(66303),r=t.i(16347),i=t.i(83592),s=t.i(7102);class a{get isDisposed(){return this._isDisposed}constructor(t,r,i,a=0,f=!1,n=!1,u=!1,o,h){this._isAlreadyOwned=!1,this._isDisposed=!1,(0,s.RegisterEngineDynamicBuffer)(),t&&t.getScene?this._engine=t.getScene().getEngine():this._engine=t,this._updatable=i,this._instanced=n,this._divisor=o||1,this._label=h,r instanceof e.DataBuffer?(this._data=null,this._buffer=r):(this._data=r,this._buffer=null),this.byteStride=u?a:a*Float32Array.BYTES_PER_ELEMENT,f||this.create()}createVertexBuffer(t,e,r,i,s,a=!1,n){let u=a?e:e*Float32Array.BYTES_PER_ELEMENT,o=i?a?i:i*Float32Array.BYTES_PER_ELEMENT:this.byteStride;return new f(this._engine,this,t,this._updatable,!0,o,void 0===s?this._instanced:s,u,r,void 0,void 0,!0,this._divisor||n)}isUpdatable(){return this._updatable}getData(){return this._data}getBuffer(){return this._buffer}getStrideSize(){return this.byteStride/Float32Array.BYTES_PER_ELEMENT}create(t=null){!t&&this._buffer||(t=t||this._data)&&(this._buffer?this._updatable&&(this._engine.updateDynamicVertexBuffer(this._buffer,t),this._data=t):this._updatable?(this._buffer=this._engine.createDynamicVertexBuffer(t,this._label),this._data=t):this._buffer=this._engine.createVertexBuffer(t,void 0,this._label))}_rebuild(){if(this._data)this._buffer=null,this.create(this._data);else if(this._buffer){if(this._buffer.capacity>0)return void(this._updatable?this._buffer=this._engine.createDynamicVertexBuffer(this._buffer.capacity,this._label):this._buffer=this._engine.createVertexBuffer(this._buffer.capacity,void 0,this._label));r.Logger.Warn(`Missing data for buffer "${this._label}" ${this._buffer?"(uniqueId: "+this._buffer.uniqueId+")":""}. Buffer reconstruction failed.`),this._buffer=null}}update(t){this.create(t)}updateDirectly(t,e,r,i=!1){this._buffer&&this._updatable&&(this._engine.updateDynamicVertexBuffer(this._buffer,t,i?e:e*Float32Array.BYTES_PER_ELEMENT,r?r*this.byteStride:void 0),0===e&&void 0===r?this._data=t:this._data=null)}_increaseReferences(){if(this._buffer){if(!this._isAlreadyOwned){this._isAlreadyOwned=!0;return}this._buffer.references++}}dispose(){this._buffer&&this._engine._releaseBuffer(this._buffer)&&(this._isDisposed=!0,this._data=null,this._buffer=null)}}class f{get isDisposed(){return this._isDisposed}get instanceDivisor(){return this._instanceDivisor}set instanceDivisor(t){let e=0!=t;this._instanceDivisor=t,e!==this._instanced&&(this._instanced=e,this._computeHashCode())}get _maxVerticesCount(){let t=this.getData();return t?Array.isArray(t)?t.length/(this.byteStride/4)-this.byteOffset/4:(t.byteLength-this.byteOffset)/this.byteStride:0}constructor(t,e,r,s,o,h,_,d,E,c,l=!1,p=!1,m=1,T=!1){let A;if(this._isDisposed=!1,this.engine=t,"object"==typeof s&&null!==s?(A=s.updatable??!1,o=s.postponeInternalCreation,h=s.stride,_=s.instanced,d=s.offset,E=s.size,c=s.type,l=s.normalized??!1,p=s.useBytes??!1,m=s.divisor??1,T=s.takeBufferOwnership??!1,this._label=s.label):A=!!s,e instanceof a?(this._buffer=e,this._ownsBuffer=T):(this._buffer=new a(t,e,A,h,o,_,p,m,this._label),this._ownsBuffer=!0),this.uniqueId=f._Counter++,this._kind=r,void 0===c){const t=this.getData();this.type=t?u(t):f.FLOAT}else this.type=c;const R=(0,i.GetTypeByteLength)(this.type);p?(this._size=E||(h?h/R:n(r)),this.byteStride=h||this._buffer.byteStride||this._size*R,this.byteOffset=d||0):(this._size=E||h||n(r),this.byteStride=h?h*R:this._buffer.byteStride||this._size*R,this.byteOffset=(d||0)*R),this.normalized=l,this._instanced=void 0!==_&&_,this._instanceDivisor=_?m:0,this._alignBuffer(),this._computeHashCode()}static _GetTypeHashIndex(t){switch(t){case f.BYTE:return 0;case f.UNSIGNED_BYTE:return 1;case f.SHORT:return 2;case f.UNSIGNED_SHORT:return 3;case f.INT:return 4;case f.UNSIGNED_INT:return 5;case f.FLOAT:return 6;case f.HALF_FLOAT:return 7;default:throw Error(`Invalid vertex buffer type '${t}'`)}}_computeHashCode(){this.hashCode=(0|f._GetTypeHashIndex(this.type))+(!!this.normalized<<3)+(this._size-1<<4)+(!!this._instanced<<6)+(this.byteStride<<12)}_rebuild(){this._buffer?._rebuild()}getKind(){return this._kind}isUpdatable(){return this._buffer.isUpdatable()}getData(){return this._buffer.getData()}getFloatData(t,e){let r=this.getData();return r?(0,i.GetFloatData)(r,this._size,this.type,this.byteOffset,this.byteStride,this.normalized,t,e):null}getBuffer(){return this._buffer.getBuffer()}getWrapperBuffer(){return this._buffer}getStrideSize(){return this.byteStride/(0,i.GetTypeByteLength)(this.type)}getOffset(){return this.byteOffset/(0,i.GetTypeByteLength)(this.type)}getSize(t=!1){return t?this._size*(0,i.GetTypeByteLength)(this.type):this._size}getIsInstanced(){return this._instanced}getInstanceDivisor(){return this._instanceDivisor}create(t){this._buffer.create(t),this._alignBuffer()}update(t){this._buffer.update(t),this._alignBuffer()}updateDirectly(t,e,r=!1){this._buffer.updateDirectly(t,e,void 0,r),this._alignBuffer()}dispose(){this._ownsBuffer&&this._buffer.dispose(),this._isDisposed=!0}forEach(t,e){(0,i.EnumerateFloatValues)(this._buffer.getData(),this.byteOffset,this.byteStride,this._size,this.type,t,this.normalized,(t,r)=>{for(let i=0;i<this._size;i++)e(t[i],r+i)})}_alignBuffer(){}}function n(t){switch(t){case f.UVKind:case f.UV2Kind:case f.UV3Kind:case f.UV4Kind:case f.UV5Kind:case f.UV6Kind:return 2;case f.NormalKind:case f.PositionKind:return 3;case f.ColorKind:case f.ColorInstanceKind:case f.MatricesIndicesKind:case f.MatricesIndicesExtraKind:case f.MatricesWeightsKind:case f.MatricesWeightsExtraKind:case f.TangentKind:return 4;default:throw Error("Invalid kind '"+t+"'")}}function u(t){if(t instanceof Int8Array)return f.BYTE;if(t instanceof Uint8Array)return f.UNSIGNED_BYTE;if(t instanceof Int16Array)return f.SHORT;if(t instanceof Uint16Array)return f.UNSIGNED_SHORT;if(t instanceof Int32Array)return f.INT;else if(t instanceof Uint32Array)return f.UNSIGNED_INT;else return f.FLOAT}function o(t){return(0,i.GetTypeByteLength)(t)}function h(t,e,r,s,a,f,n,u){(0,i.EnumerateFloatValues)(t,e,r,s,a,f,n,(t,e)=>{for(let r=0;r<s;r++)u(t[r],e+r)})}function _(t,e,r,s,a,f,n,u){return(0,i.GetFloatData)(t,e,r,s,a,f,n,u)}f._Counter=0,f.BYTE=5120,f.UNSIGNED_BYTE=5121,f.SHORT=5122,f.UNSIGNED_SHORT=5123,f.INT=5124,f.UNSIGNED_INT=5125,f.FLOAT=5126,f.HALF_FLOAT=5131,f.PositionKind="position",f.NormalKind="normal",f.TangentKind="tangent",f.UVKind="uv",f.UV2Kind="uv2",f.UV3Kind="uv3",f.UV4Kind="uv4",f.UV5Kind="uv5",f.UV6Kind="uv6",f.ColorKind="color",f.ColorInstanceKind="instanceColor",f.MatricesIndicesKind="matricesIndices",f.MatricesWeightsKind="matricesWeights",f.MatricesIndicesExtraKind="matricesIndicesExtra",f.MatricesWeightsExtraKind="matricesWeightsExtra";let d=!1;t.s(["Buffer",0,a,"RegisterVertexBuffer",0,function(){d||(d=!0,f.DeduceStride=n,f.GetDataType=u,f.GetTypeByteLength=o,f.ForEach=h,f.GetFloatData=_)},"VertexBuffer",0,f,"VertexBufferDeduceStride",0,n,"VertexBufferForEach",0,h,"VertexBufferGetTypeByteLength",0,o])},96042,t=>{"use strict";var e=t.i(69400);class r{constructor(t,r,i,s){this.normal=new e.Vector3(t,r,i),this.d=s}asArray(){return[this.normal.x,this.normal.y,this.normal.z,this.d]}clone(){return new r(this.normal.x,this.normal.y,this.normal.z,this.d)}getClassName(){return"Plane"}getHashCode(){let t=this.normal.getHashCode();return 397*t^this.d}normalize(){let t=Math.sqrt(this.normal.x*this.normal.x+this.normal.y*this.normal.y+this.normal.z*this.normal.z),e=0;return 0!==t&&(e=1/t),this.normal.x*=e,this.normal.y*=e,this.normal.z*=e,this.d*=e,this}transform(t){let e=r._TmpMatrix;t.invertToRef(e);let i=e.m,s=this.normal.x,a=this.normal.y,f=this.normal.z,n=this.d;return new r(s*i[0]+a*i[1]+f*i[2]+n*i[3],s*i[4]+a*i[5]+f*i[6]+n*i[7],s*i[8]+a*i[9]+f*i[10]+n*i[11],s*i[12]+a*i[13]+f*i[14]+n*i[15])}dotCoordinate(t){return this.normal.x*t.x+this.normal.y*t.y+this.normal.z*t.z+this.d}copyFromPoints(t,e,r){let i,s=e.x-t.x,a=e.y-t.y,f=e.z-t.z,n=r.x-t.x,u=r.y-t.y,o=r.z-t.z,h=a*o-f*u,_=f*n-s*o,d=s*u-a*n,E=Math.sqrt(h*h+_*_+d*d);return i=0!==E?1/E:0,this.normal.x=h*i,this.normal.y=_*i,this.normal.z=d*i,this.d=-(this.normal.x*t.x+this.normal.y*t.y+this.normal.z*t.z),this}isFrontFacingTo(t,r){return e.Vector3.Dot(this.normal,t)<=r}signedDistanceTo(t){return e.Vector3.Dot(t,this.normal)+this.d}static FromArray(t){return new r(t[0],t[1],t[2],t[3])}static FromPoints(t,e,i){let s=new r(0,0,0,0);return s.copyFromPoints(t,e,i),s}static FromPositionAndNormal(t,e){let i=new r(0,0,0,0);return this.FromPositionAndNormalToRef(t,e,i)}static FromPositionAndNormalToRef(t,e,r){return r.normal.copyFrom(e),r.normal.normalize(),r.d=-t.dot(r.normal),r}static SignedDistanceToPlaneFromPositionAndNormal(t,r,i){let s=-(r.x*t.x+r.y*t.y+r.z*t.z);return e.Vector3.Dot(i,r)+s}}r._TmpMatrix=e.Matrix.Identity(),t.s(["Plane",0,r])},32451,t=>{"use strict";class e{constructor(t){this.length=0,this.data=Array(t),this._id=e._GlobalId++}push(t){this.data[this.length++]=t,this.length>this.data.length&&(this.data.length*=2)}forEach(t){for(let e=0;e<this.length;e++)t(this.data[e])}sort(t){this.data.sort(t)}reset(){this.length=0}dispose(){this.reset(),this.data&&(this.data.length=0)}concat(t){if(0!==t.length){this.length+t.length>this.data.length&&(this.data.length=(this.length+t.length)*2);for(let e=0;e<t.length;e++)this.data[this.length++]=(t.data||t)[e]}}indexOf(t){let e=this.data.indexOf(t);return e>=this.length?-1:e}contains(t){return -1!==this.indexOf(t)}}e._GlobalId=0,t.s(["SmartArray",0,e,"SmartArrayNoDuplicate",0,class extends e{constructor(){super(...arguments),this._duplicateId=0}push(t){super.push(t),t.__smartArrayFlags||(t.__smartArrayFlags={}),t.__smartArrayFlags[this._id]=this._duplicateId}pushNoDuplicate(t){return(!t.__smartArrayFlags||t.__smartArrayFlags[this._id]!==this._duplicateId)&&(this.push(t),!0)}reset(){super.reset(),this._duplicateId++}concatWithNoDuplicate(t){if(0!==t.length){this.length+t.length>this.data.length&&(this.data.length=(this.length+t.length)*2);for(let e=0;e<t.length;e++){let r=(t.data||t)[e];this.pushNoDuplicate(r)}}}}])},79261,t=>{"use strict";var e=t.i(59052),r=t.i(69400),i=t.i(52724),s=t.i(96333);let a=new r.Matrix,f=new r.Matrix,n=new r.Matrix,u={getScene:()=>void 0,eyeAtCamera:!0};function o(t,e,r){let i=r.asArray(),s=e.asArray();for(let t=0;t<16;t++)i[t]=s[t];return i[12]-=t.x,i[13]-=t.y,i[14]-=t.z,r.markAsUpdated(),r}function h(t,e,r){if(!u.eyeAtCamera)return(0,i.InvertMatrixToRef)(e,f),o(t,f,n),(0,i.InvertMatrixToRef)(n,r),r;let s=r.asArray(),a=e.asArray();for(let t=0;t<16;t++)s[t]=a[t];return s[12]=0,s[13]=0,s[14]=0,r.markAsUpdated(),r}function _(t,e,r,s){return(0,i.MultiplyMatricesToRef)(h(t,e,s),r,s),s}function d(t,e,r,s){return(0,i.InvertMatrixToRef)(r,f),(0,i.MultiplyMatricesToRef)(e,f,n),o(t,n,f),h(t,r,n),(0,i.MultiplyMatricesToRef)(f,n,s),s}function E(t,e,r,s,a,u){return(0,i.InvertMatrixToRef)(r,f),(0,i.MultiplyMatricesToRef)(e,f,n),o(t,n,f),_(t,s,a,n),(0,i.MultiplyMatricesToRef)(f,n,u),u}function c(t,e){let r=u.getScene();if(!r||a===e)return e;a.updateFlag=e.updateFlag;let i=r.floatingOriginOffset;switch(t){case"world":return o(i,e,a);case"view":return h(i,e,a);case"worldView":return d(i,e,r.getViewMatrix(),a);case"viewProjection":return _(i,r.getViewMatrix(),r.getProjectionMatrix(),a);case"worldViewProjection":return E(i,e,r.getTransformMatrix(),r.getViewMatrix(),r.getProjectionMatrix(),a);default:if(t.startsWith("u_")){let s=t.toLowerCase();if(s.startsWith("u_worldviewprojection"))return E(i,e,r.getTransformMatrix(),r.getViewMatrix(),r.getProjectionMatrix(),a);if(s.startsWith("u_viewprojection"))return _(i,r.getViewMatrix(),r.getProjectionMatrix(),a);if(s.startsWith("u_worldview"))return d(i,e,r.getViewMatrix(),a);if(s.startsWith("u_world"))return o(i,e,a);if(s.startsWith("u_view"))return h(i,e,a)}return e}}let l=s.UniformBuffer,p=e.Effect,m=l.prototype._updateMatrixForUniform,T=e.Effect.prototype.setMatrix;t.s(["FloatingOriginCurrentScene",0,u,"OverrideMatrixFunctions",0,function(){p.prototype._setMatrixOverride=T,p.prototype.setMatrix=function(t,e){return this._setMatrixOverride(t,c(t,e)),this},l.prototype._updateMatrixForUniformOverride=m,l.prototype._updateMatrixForUniform=function(t,e){this._updateMatrixForUniformOverride(t,c(t,e))}},"ResetMatrixFunctions",0,function(){e.Effect.prototype.setMatrix=T,p._setMatrixOverride=void 0,l.prototype._updateMatrixForUniform=m,l.prototype._updateMatrixForUniformOverride=void 0}])},72051,t=>{"use strict";class e{}e.NAME_EFFECTLAYER="EffectLayer",e.NAME_LAYER="Layer",e.NAME_LENSFLARESYSTEM="LensFlareSystem",e.NAME_BOUNDINGBOXRENDERER="BoundingBoxRenderer",e.NAME_PARTICLESYSTEM="ParticleSystem",e.NAME_GAMEPAD="Gamepad",e.NAME_SIMPLIFICATIONQUEUE="SimplificationQueue",e.NAME_GEOMETRYBUFFERRENDERER="GeometryBufferRenderer",e.NAME_PREPASSRENDERER="PrePassRenderer",e.NAME_DEPTHRENDERER="DepthRenderer",e.NAME_DEPTHPEELINGRENDERER="DepthPeelingRenderer",e.NAME_POSTPROCESSRENDERPIPELINEMANAGER="PostProcessRenderPipelineManager",e.NAME_SPRITE="Sprite",e.NAME_SUBSURFACE="SubSurface",e.NAME_OUTLINERENDERER="Outline",e.NAME_PROCEDURALTEXTURE="ProceduralTexture",e.NAME_SHADOWGENERATOR="ShadowGenerator",e.NAME_OCTREE="Octree",e.NAME_PHYSICSENGINE="PhysicsEngine",e.NAME_AUDIO="Audio",e.NAME_FLUIDRENDERER="FluidRenderer",e.NAME_IBLCDFGENERATOR="iblCDFGenerator",e.NAME_CLUSTEREDLIGHTING="ClusteredLighting",e.STEP_ISREADYFORMESH_EFFECTLAYER=0,e.STEP_ISREADYFORMESH_DEPTHRENDERER=1,e.STEP_BEFOREEVALUATEACTIVEMESH_BOUNDINGBOXRENDERER=0,e.STEP_EVALUATESUBMESH_BOUNDINGBOXRENDERER=0,e.STEP_PREACTIVEMESH_BOUNDINGBOXRENDERER=0,e.STEP_CAMERADRAWRENDERTARGET_EFFECTLAYER=1,e.STEP_BEFORECAMERADRAW_PREPASS=0,e.STEP_BEFORECAMERADRAW_EFFECTLAYER=1,e.STEP_BEFORECAMERADRAW_LAYER=2,e.STEP_BEFORERENDERTARGETDRAW_PREPASS=0,e.STEP_BEFORERENDERTARGETDRAW_LAYER=1,e.STEP_BEFORERENDERINGMESH_PREPASS=0,e.STEP_BEFORERENDERINGMESH_OUTLINE=1,e.STEP_AFTERRENDERINGMESH_PREPASS=0,e.STEP_AFTERRENDERINGMESH_OUTLINE=1,e.STEP_AFTERRENDERINGGROUPDRAW_EFFECTLAYER_DRAW=0,e.STEP_AFTERRENDERINGGROUPDRAW_BOUNDINGBOXRENDERER=1,e.STEP_BEFORECAMERAUPDATE_SIMPLIFICATIONQUEUE=0,e.STEP_BEFORECLEAR_PROCEDURALTEXTURE=0,e.STEP_BEFORECLEAR_PREPASS=1,e.STEP_BEFORERENDERTARGETCLEAR_PREPASS=0,e.STEP_AFTERRENDERTARGETDRAW_PREPASS=0,e.STEP_AFTERRENDERTARGETDRAW_LAYER=1,e.STEP_AFTERCAMERADRAW_PREPASS=0,e.STEP_AFTERCAMERADRAW_EFFECTLAYER=1,e.STEP_AFTERCAMERADRAW_LENSFLARESYSTEM=2,e.STEP_AFTERCAMERADRAW_EFFECTLAYER_DRAW=3,e.STEP_AFTERCAMERADRAW_LAYER=4,e.STEP_AFTERCAMERADRAW_FLUIDRENDERER=5,e.STEP_AFTERCAMERAPOSTPROCESS_LAYER=0,e.STEP_AFTERRENDERTARGETPOSTPROCESS_LAYER=0,e.STEP_AFTERRENDER_AUDIO=0,e.STEP_GATHERRENDERTARGETS_DEPTHRENDERER=0,e.STEP_GATHERRENDERTARGETS_GEOMETRYBUFFERRENDERER=1,e.STEP_GATHERRENDERTARGETS_SHADOWGENERATOR=2,e.STEP_GATHERRENDERTARGETS_POSTPROCESSRENDERPIPELINEMANAGER=3,e.STEP_GATHERACTIVECAMERARENDERTARGETS_DEPTHRENDERER=0,e.STEP_GATHERACTIVECAMERARENDERTARGETS_FLUIDRENDERER=1,e.STEP_GATHERACTIVECAMERARENDERTARGETS_CLUSTEREDLIGHTING=2,e.STEP_POINTERMOVE_SPRITE=0,e.STEP_POINTERDOWN_SPRITE=0,e.STEP_POINTERUP_SPRITE=0;class r extends Array{constructor(t){super(...t)}static Create(){return Object.create(r.prototype)}registerStep(t,e,r){let i=0;for(;i<this.length&&!(t<this[i].index);i++);this.splice(i,0,{index:t,component:e,action:r.bind(e)})}clear(){this.length=0}}t.s(["SceneComponentConstants",0,e,"Stage",0,r])}]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,42241,2886,92544,e=>{"use strict";var r=e.i(47150);let a="bumpFragmentMainFunctions",i=`#ifndef TEXRD_DEFINED
|
|
2
2
|
fn TEXRD(t: texture_2d<f32>,ts: sampler,uv: vec2f)->vec4f {return textureSample(t,ts,uv);}
|
|
3
3
|
#define TEXRD_DEFINED
|
|
4
4
|
#endif
|
|
@@ -42,7 +42,7 @@ fn perturbNormal(cotangentFrame: mat3x3f,textureSample: vec3f,scale: f32)->vec3f
|
|
|
42
42
|
fn cotangent_frame(normal: vec3f,p: vec3f,uv: vec2f,tangentSpaceParams: vec2f)->mat3x3f
|
|
43
43
|
{var dp1: vec3f=dpdx(p);var dp2: vec3f=dpdy(p);var duv1: vec2f=dpdx(uv);var duv2: vec2f=dpdy(uv);var dp2perp: vec3f=cross(dp2,normal);var dp1perp: vec3f=cross(normal,dp1);var tangent: vec3f=dp2perp*duv1.x+dp1perp*duv2.x;var bitangent: vec3f=dp2perp*duv1.y+dp1perp*duv2.y;tangent*=tangentSpaceParams.x;bitangent*=tangentSpaceParams.y;var det: f32=max(dot(tangent,tangent),dot(bitangent,bitangent));var invmax: f32=select(inverseSqrt(det),0.0,det==0.0);return mat3x3f(tangent*invmax,bitangent*invmax,normal);}
|
|
44
44
|
#endif
|
|
45
|
-
`;r.ShaderStore.IncludesShadersStoreWGSL[a]||(r.ShaderStore.IncludesShadersStoreWGSL[a]=i),e.s(["bumpFragmentMainFunctionsWGSL",0,{name:a,shader:i}],
|
|
45
|
+
`;r.ShaderStore.IncludesShadersStoreWGSL[a]||(r.ShaderStore.IncludesShadersStoreWGSL[a]=i),e.s(["bumpFragmentMainFunctionsWGSL",0,{name:a,shader:i}],42241),e.i(9343);let f="bumpFragmentFunctions",n=`#if defined(BUMP)
|
|
46
46
|
#include<samplerFragmentDeclaration>(_DEFINENAME_,BUMP,_VARYINGNAME_,Bump,_SAMPLERNAME_,bump)
|
|
47
47
|
#endif
|
|
48
48
|
#if defined(DETAIL)
|
|
@@ -72,7 +72,7 @@ return -texCoordOffset;
|
|
|
72
72
|
#endif
|
|
73
73
|
}
|
|
74
74
|
#endif
|
|
75
|
-
`;r.ShaderStore.IncludesShadersStoreWGSL[f]||(r.ShaderStore.IncludesShadersStoreWGSL[f]=n),e.s(["bumpFragmentFunctionsWGSL",0,{name:f,shader:n}],
|
|
75
|
+
`;r.ShaderStore.IncludesShadersStoreWGSL[f]||(r.ShaderStore.IncludesShadersStoreWGSL[f]=n),e.s(["bumpFragmentFunctionsWGSL",0,{name:f,shader:n}],2886);let t="bumpFragment",o=`var uvOffset: vec2f= vec2f(0.0,0.0);
|
|
76
76
|
#if defined(BUMP) || defined(PARALLAX) || defined(DETAIL)
|
|
77
77
|
#ifdef NORMALXYSCALE
|
|
78
78
|
var normalScale: f32=1.0;
|
|
@@ -124,7 +124,17 @@ normalW=perturbNormalBase(TBN,blendedNormal,uniforms.vBumpInfos.y);
|
|
|
124
124
|
#elif defined(DETAIL)
|
|
125
125
|
detailNormal=vec3f(detailNormal.xy*uniforms.vDetailInfos.z,detailNormal.z);normalW=perturbNormalBase(TBN,detailNormal,uniforms.vDetailInfos.z);
|
|
126
126
|
#endif
|
|
127
|
-
`;r.ShaderStore.IncludesShadersStoreWGSL[t]||(r.ShaderStore.IncludesShadersStoreWGSL[t]=o),e.s(["bumpFragmentWGSL",0,{name:t,shader:o}],
|
|
127
|
+
`;r.ShaderStore.IncludesShadersStoreWGSL[t]||(r.ShaderStore.IncludesShadersStoreWGSL[t]=o),e.s(["bumpFragmentWGSL",0,{name:t,shader:o}],92544)},97793,e=>{"use strict";var r=e.i(47150);let a="sceneUboDeclaration",i=`struct Scene {viewProjection : mat4x4<f32>,
|
|
128
|
+
#ifdef MULTIVIEW
|
|
129
|
+
viewProjectionR : mat4x4<f32>,
|
|
130
|
+
#endif
|
|
131
|
+
view : mat4x4<f32>,
|
|
132
|
+
projection : mat4x4<f32>,
|
|
133
|
+
vEyePosition : vec4<f32>,
|
|
134
|
+
inverseProjection : mat4x4<f32>,};
|
|
135
|
+
#define SCENE_UBO
|
|
136
|
+
var<uniform> scene : Scene;
|
|
137
|
+
`;r.ShaderStore.IncludesShadersStoreWGSL[a]||(r.ShaderStore.IncludesShadersStoreWGSL[a]=i),e.s(["sceneUboDeclarationWGSL",0,{name:a,shader:i}])},55880,e=>{"use strict";var r=e.i(47150);let a="helperFunctions",i=`const PI: f32=3.1415926535897932384626433832795;const TWO_PI: f32=6.283185307179586;const HALF_PI: f32=1.5707963267948966;const RECIPROCAL_PI: f32=0.3183098861837907;const RECIPROCAL_PI2: f32=0.15915494309189535;const RECIPROCAL_PI4: f32=0.07957747154594767;const HALF_MIN: f32=5.96046448e-08;
|
|
128
138
|
const LinearEncodePowerApprox: f32=2.2;const GammaEncodePowerApprox: f32=1.0/LinearEncodePowerApprox;const LuminanceEncodeApprox: vec3f=vec3f(0.2126,0.7152,0.0722);const Epsilon:f32=0.0000001;fn square(x: f32)->f32 {return x*x;}
|
|
129
139
|
fn saturate(x: f32)->f32 {return clamp(x,0.0,1.0);}
|
|
130
140
|
fn saturateVec3(x: vec3f)->vec3f {return clamp(x,vec3f(),vec3f(1.0));}
|
|
@@ -210,17 +220,7 @@ fn max3(v: vec3f)->f32 {return max(v.x,max(v.y,v.z));}
|
|
|
210
220
|
fn uint2float(i: u32)->f32 {return bitcast<f32>(0x3F800000u | (i>>9u))-1.0;}
|
|
211
221
|
fn plasticSequence(rstate: u32)->vec2f {return vec2f(uint2float(rstate*3242174889u),
|
|
212
222
|
uint2float(rstate*2447445414u));}
|
|
213
|
-
`;r.ShaderStore.IncludesShadersStoreWGSL[a]||(r.ShaderStore.IncludesShadersStoreWGSL[a]=i),e.s(["helperFunctionsWGSL",0,{name:a,shader:i}])},
|
|
214
|
-
#ifdef MULTIVIEW
|
|
215
|
-
viewProjectionR : mat4x4<f32>,
|
|
216
|
-
#endif
|
|
217
|
-
view : mat4x4<f32>,
|
|
218
|
-
projection : mat4x4<f32>,
|
|
219
|
-
vEyePosition : vec4<f32>,
|
|
220
|
-
inverseProjection : mat4x4<f32>,};
|
|
221
|
-
#define SCENE_UBO
|
|
222
|
-
var<uniform> scene : Scene;
|
|
223
|
-
`;r.ShaderStore.IncludesShadersStoreWGSL[a]||(r.ShaderStore.IncludesShadersStoreWGSL[a]=i),e.s(["sceneUboDeclarationWGSL",0,{name:a,shader:i}])},44068,e=>{"use strict";var r=e.i(37875);let a="pbrBRDFFunctions",i=`#define FRESNEL_MAXIMUM_ON_ROUGH 0.25
|
|
223
|
+
`;r.ShaderStore.IncludesShadersStoreWGSL[a]||(r.ShaderStore.IncludesShadersStoreWGSL[a]=i),e.s(["helperFunctionsWGSL",0,{name:a,shader:i}])},88887,e=>{"use strict";var r=e.i(47150);let a="pbrBRDFFunctions",i=`#define FRESNEL_MAXIMUM_ON_ROUGH 0.25
|
|
224
224
|
#define BRDF_DIFFUSE_MODEL_EON 0
|
|
225
225
|
#define BRDF_DIFFUSE_MODEL_BURLEY 1
|
|
226
226
|
#define BRDF_DIFFUSE_MODEL_LAMBERT 2
|
|
@@ -392,7 +392,7 @@ fn transmittanceBRDF_Burley(tintColor: vec3f,diffusionDistance: vec3f,thickness:
|
|
|
392
392
|
fn computeWrappedDiffuseNdotL(NdotL: f32,w: f32)->f32 {var t: f32=1.0+w;var invt2: f32=1.0/(t*t);return saturate((NdotL+w)*invt2);}
|
|
393
393
|
#endif
|
|
394
394
|
#endif
|
|
395
|
-
`;r.ShaderStore.IncludesShadersStoreWGSL[a]||(r.ShaderStore.IncludesShadersStoreWGSL[a]=i),e.s(["pbrBRDFFunctionsWGSL",0,{name:a,shader:i}])},
|
|
395
|
+
`;r.ShaderStore.IncludesShadersStoreWGSL[a]||(r.ShaderStore.IncludesShadersStoreWGSL[a]=i),e.s(["pbrBRDFFunctionsWGSL",0,{name:a,shader:i}])},29741,69809,e=>{"use strict";var r=e.i(47150);let a="clipPlaneFragmentDeclaration",i=`#ifdef CLIPPLANE
|
|
396
396
|
varying fClipDistance: f32;
|
|
397
397
|
#endif
|
|
398
398
|
#ifdef CLIPPLANE2
|
|
@@ -410,7 +410,7 @@ varying fClipDistance5: f32;
|
|
|
410
410
|
#ifdef CLIPPLANE6
|
|
411
411
|
varying fClipDistance6: f32;
|
|
412
412
|
#endif
|
|
413
|
-
`;r.ShaderStore.IncludesShadersStoreWGSL[a]||(r.ShaderStore.IncludesShadersStoreWGSL[a]=i),e.s(["clipPlaneFragmentDeclarationWGSL",0,{name:a,shader:i}],
|
|
413
|
+
`;r.ShaderStore.IncludesShadersStoreWGSL[a]||(r.ShaderStore.IncludesShadersStoreWGSL[a]=i),e.s(["clipPlaneFragmentDeclarationWGSL",0,{name:a,shader:i}],29741);let f="clipPlaneFragment",n=`#if defined(CLIPPLANE) || defined(CLIPPLANE2) || defined(CLIPPLANE3) || defined(CLIPPLANE4) || defined(CLIPPLANE5) || defined(CLIPPLANE6)
|
|
414
414
|
if (false) {}
|
|
415
415
|
#endif
|
|
416
416
|
#ifdef CLIPPLANE
|
|
@@ -437,7 +437,7 @@ else if (fragmentInputs.fClipDistance5>0.0)
|
|
|
437
437
|
else if (fragmentInputs.fClipDistance6>0.0)
|
|
438
438
|
{discard;}
|
|
439
439
|
#endif
|
|
440
|
-
`;r.ShaderStore.IncludesShadersStoreWGSL[f]||(r.ShaderStore.IncludesShadersStoreWGSL[f]=n),e.s(["clipPlaneFragmentWGSL",0,{name:f,shader:n}],
|
|
440
|
+
`;r.ShaderStore.IncludesShadersStoreWGSL[f]||(r.ShaderStore.IncludesShadersStoreWGSL[f]=n),e.s(["clipPlaneFragmentWGSL",0,{name:f,shader:n}],69809)},9343,49852,e=>{"use strict";var r=e.i(47150);let a="samplerFragmentDeclaration",i=`#ifdef _DEFINENAME_
|
|
441
441
|
#if _DEFINENAME_DIRECTUV==1
|
|
442
442
|
#define v_VARYINGNAME_UV vMainUV1
|
|
443
443
|
#elif _DEFINENAME_DIRECTUV==2
|
|
@@ -455,7 +455,7 @@ varying v_VARYINGNAME_UV: vec2f;
|
|
|
455
455
|
#endif
|
|
456
456
|
var _SAMPLERNAME_SamplerSampler: sampler;var _SAMPLERNAME_Sampler: texture_2d<f32>;
|
|
457
457
|
#endif
|
|
458
|
-
`;r.ShaderStore.IncludesShadersStoreWGSL[a]||(r.ShaderStore.IncludesShadersStoreWGSL[a]=i),e.s(["samplerFragmentDeclarationWGSL",0,{name:a,shader:i}],
|
|
458
|
+
`;r.ShaderStore.IncludesShadersStoreWGSL[a]||(r.ShaderStore.IncludesShadersStoreWGSL[a]=i),e.s(["samplerFragmentDeclarationWGSL",0,{name:a,shader:i}],9343);let f="reflectionFunction",n=`fn computeFixedEquirectangularCoords(worldPos: vec4f,worldNormal: vec3f,direction: vec3f)->vec3f
|
|
459
459
|
{var lon: f32=atan2(direction.z,direction.x);var lat: f32=acos(direction.y);var sphereCoords: vec2f= vec2f(lon,lat)*RECIPROCAL_PI2*2.0;var s: f32=sphereCoords.x*0.5+0.5;var t: f32=sphereCoords.y;return vec3f(s,t,0); }
|
|
460
460
|
fn computeMirroredFixedEquirectangularCoords(worldPos: vec4f,worldNormal: vec3f,direction: vec3f)->vec3f
|
|
461
461
|
{var lon: f32=atan2(direction.z,direction.x);var lat: f32=acos(direction.y);var sphereCoords: vec2f= vec2f(lon,lat)*RECIPROCAL_PI2*2.0;var s: f32=sphereCoords.x*0.5+0.5;var t: f32=sphereCoords.y;return vec3f(1.0-s,t,0); }
|
|
@@ -519,7 +519,7 @@ return vec3f(0,0,0);
|
|
|
519
519
|
#endif
|
|
520
520
|
}
|
|
521
521
|
#endif
|
|
522
|
-
`;r.ShaderStore.IncludesShadersStoreWGSL[f]||(r.ShaderStore.IncludesShadersStoreWGSL[f]=n),e.s(["reflectionFunctionWGSL",0,{name:f,shader:n}],
|
|
522
|
+
`;r.ShaderStore.IncludesShadersStoreWGSL[f]||(r.ShaderStore.IncludesShadersStoreWGSL[f]=n),e.s(["reflectionFunctionWGSL",0,{name:f,shader:n}],49852)},17765,85959,e=>{"use strict";var r=e.i(47150);let a="pbrFragmentReflectionDeclaration",i=`#ifdef REFLECTION
|
|
523
523
|
#ifdef REFLECTIONMAP_3D
|
|
524
524
|
var reflectionSamplerSampler: sampler;var reflectionSampler: texture_cube<f32>;
|
|
525
525
|
#ifdef LODBASEDMICROSFURACE
|
|
@@ -547,7 +547,7 @@ varying vDirectionW: vec3f;
|
|
|
547
547
|
#endif
|
|
548
548
|
#endif
|
|
549
549
|
#endif
|
|
550
|
-
`;r.ShaderStore.IncludesShadersStoreWGSL[a]||(r.ShaderStore.IncludesShadersStoreWGSL[a]=i),e.s(["pbrFragmentReflectionDeclarationWGSL",0,{name:a,shader:i}],
|
|
550
|
+
`;r.ShaderStore.IncludesShadersStoreWGSL[a]||(r.ShaderStore.IncludesShadersStoreWGSL[a]=i),e.s(["pbrFragmentReflectionDeclarationWGSL",0,{name:a,shader:i}],17765);let f="pbrIBLFunctions",n=`#if defined(REFLECTION) || defined(SS_REFRACTION)
|
|
551
551
|
fn getLodFromAlphaG(cubeMapDimensionPixels: f32,microsurfaceAverageSlope: f32)->f32 {var microsurfaceAverageSlopeTexels: f32=cubeMapDimensionPixels*microsurfaceAverageSlope;var lod: f32=log2(microsurfaceAverageSlopeTexels);return lod;}
|
|
552
552
|
fn getLinearLodFromRoughness(cubeMapDimensionPixels: f32,roughness: f32)->f32 {var lod: f32=log2(cubeMapDimensionPixels)*roughness;return lod;}
|
|
553
553
|
#endif
|
|
@@ -561,7 +561,7 @@ fn environmentHorizonOcclusion(view: vec3f,normal: vec3f,geometricNormal: vec3f)
|
|
|
561
561
|
fn UNPACK_LOD(x: f32)->f32 {return (1.0-x)*255.0;}
|
|
562
562
|
fn getLodFromAlphaGNdotV(cubeMapDimensionPixels: f32,alphaG: f32,NdotV: f32)->f32 {var microsurfaceAverageSlope: f32=alphaG;microsurfaceAverageSlope*=sqrt(abs(NdotV));return getLodFromAlphaG(cubeMapDimensionPixels,microsurfaceAverageSlope);}
|
|
563
563
|
#endif
|
|
564
|
-
`;r.ShaderStore.IncludesShadersStoreWGSL[f]||(r.ShaderStore.IncludesShadersStoreWGSL[f]=n),e.s(["pbrIBLFunctionsWGSL",0,{name:f,shader:n}],
|
|
564
|
+
`;r.ShaderStore.IncludesShadersStoreWGSL[f]||(r.ShaderStore.IncludesShadersStoreWGSL[f]=n),e.s(["pbrIBLFunctionsWGSL",0,{name:f,shader:n}],85959)},78845,25799,60533,e=>{"use strict";var r=e.i(47150);let a="openpbrDielectricReflectance",i=`struct ReflectanceParams
|
|
565
565
|
{F0: f32,
|
|
566
566
|
F90: f32,
|
|
567
567
|
coloredF0: vec3f,
|
|
@@ -570,20 +570,19 @@ coloredF90: vec3f,};
|
|
|
570
570
|
fn dielectricReflectance(
|
|
571
571
|
insideIOR: f32,outsideIOR: f32,specularColor: vec3f,specularWeight: f32
|
|
572
572
|
)->ReflectanceParams
|
|
573
|
-
{var outParams: ReflectanceParams;let dielectricF0=pow((insideIOR-outsideIOR)/(insideIOR+outsideIOR),2.0);
|
|
573
|
+
{var outParams: ReflectanceParams;let dielectricF0=pow((insideIOR-outsideIOR)/(insideIOR+outsideIOR),2.0);let f90Scale=clamp(2.0f*abs(insideIOR-outsideIOR),0.0f,1.0f);
|
|
574
|
+
#if (DIELECTRIC_SPECULAR_MODEL==DIELECTRIC_SPECULAR_MODEL_OPENPBR)
|
|
575
|
+
let dielectricColorF90: vec3f=specularColor.rgb*vec3f(f90Scale);
|
|
576
|
+
#else
|
|
577
|
+
let dielectricColorF90: vec3f=vec3f(f90Scale);
|
|
578
|
+
#endif
|
|
574
579
|
#if DIELECTRIC_SPECULAR_MODEL==DIELECTRIC_SPECULAR_MODEL_GLTF
|
|
575
580
|
let maxF0=max(specularColor.r,max(specularColor.g,specularColor.b));outParams.F0=dielectricF0*maxF0*specularWeight;
|
|
576
581
|
#else
|
|
577
582
|
outParams.F0=dielectricF0*specularWeight;
|
|
578
583
|
#endif
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
let dielectricColorF90: vec3f=specularColor.rgb*vec3f(f90Scale)*specularWeight;
|
|
582
|
-
#else
|
|
583
|
-
let dielectricColorF90: vec3f=vec3f(f90Scale)*specularWeight;
|
|
584
|
-
#endif
|
|
585
|
-
outParams.coloredF90=dielectricColorF90;return outParams;}
|
|
586
|
-
`;r.ShaderStore.IncludesShadersStoreWGSL[a]||(r.ShaderStore.IncludesShadersStoreWGSL[a]=i),e.s(["openpbrDielectricReflectanceWGSL",0,{name:a,shader:i}],46166);let f="openpbrGeometryInfo",n=`struct geometryInfoOutParams
|
|
584
|
+
outParams.F90=f90Scale*specularWeight;outParams.coloredF0=vec3f(dielectricF0*specularWeight)*specularColor.rgb;outParams.coloredF90=dielectricColorF90*vec3f(specularWeight);return outParams;}
|
|
585
|
+
`;r.ShaderStore.IncludesShadersStoreWGSL[a]||(r.ShaderStore.IncludesShadersStoreWGSL[a]=i),e.s(["openpbrDielectricReflectanceWGSL",0,{name:a,shader:i}],78845);let f="openpbrGeometryInfo",n=`struct geometryInfoOutParams
|
|
587
586
|
{NdotV: f32,
|
|
588
587
|
NdotVUnclamped: f32,
|
|
589
588
|
environmentBrdf: vec3f,
|
|
@@ -620,7 +619,7 @@ normalW: vec3f,viewDirectionW: vec3f,roughness: f32,geometricNormalW: vec3f
|
|
|
620
619
|
,vAnisotropy: vec3f,TBN: mat3x3<f32>
|
|
621
620
|
)->geometryInfoAnisoOutParams
|
|
622
621
|
{let geoInfo: geometryInfoOutParams=geometryInfo(normalW,viewDirectionW,roughness,geometricNormalW);var outParams: geometryInfoAnisoOutParams;outParams.NdotV=geoInfo.NdotV;outParams.NdotVUnclamped=geoInfo.NdotVUnclamped;outParams.environmentBrdf=geoInfo.environmentBrdf;outParams.horizonOcclusion=geoInfo.horizonOcclusion;outParams.anisotropy=vAnisotropy.b;let anisotropyDirection: vec3f=vec3f(vAnisotropy.xy,0.);let anisoTBN: mat3x3<f32>=mat3x3<f32>(normalize(TBN[0]),normalize(TBN[1]),normalize(TBN[2]));outParams.anisotropicTangent=normalize(anisoTBN*anisotropyDirection);outParams.anisotropicBitangent=normalize(cross(anisoTBN[2],outParams.anisotropicTangent));outParams.TBN=TBN;return outParams;}
|
|
623
|
-
`;r.ShaderStore.IncludesShadersStoreWGSL[f]||(r.ShaderStore.IncludesShadersStoreWGSL[f]=n),e.s(["openpbrGeometryInfoWGSL",0,{name:f,shader:n}],
|
|
622
|
+
`;r.ShaderStore.IncludesShadersStoreWGSL[f]||(r.ShaderStore.IncludesShadersStoreWGSL[f]=n),e.s(["openpbrGeometryInfoWGSL",0,{name:f,shader:n}],25799);let t="openpbrIblFunctions",o=`#ifdef REFLECTION
|
|
624
623
|
fn sampleIrradiance(
|
|
625
624
|
surfaceNormal: vec3f
|
|
626
625
|
#if defined(NORMAL) && defined(USESPHERICALINVERTEX)
|
|
@@ -839,7 +838,7 @@ return getReflectanceFromBRDFLookup(reflectance.coloredF0,reflectance.coloredF90
|
|
|
839
838
|
#endif
|
|
840
839
|
}
|
|
841
840
|
#endif
|
|
842
|
-
`;r.ShaderStore.IncludesShadersStoreWGSL[t]||(r.ShaderStore.IncludesShadersStoreWGSL[t]=o),e.s(["openpbrIblFunctionsWGSL",0,{name:t,shader:o}],
|
|
841
|
+
`;r.ShaderStore.IncludesShadersStoreWGSL[t]||(r.ShaderStore.IncludesShadersStoreWGSL[t]=o),e.s(["openpbrIblFunctionsWGSL",0,{name:t,shader:o}],60533)},76350,e=>{"use strict";var r=e.i(47150);let a="openpbrSubsurfaceLayerData",i=`var subsurface_weight: f32=uniforms.vSubsurfaceWeight;var subsurface_color: vec3f=uniforms.vSubsurfaceColor.rgb;var subsurface_radius: f32=uniforms.vSubsurfaceRadius;var subsurface_radius_scale: vec3f=uniforms.vSubsurfaceRadiusScale;var subsurface_scatter_anisotropy: f32=clamp(uniforms.vSubsurfaceScatterAnisotropy,-0.9999f,0.9999f);
|
|
843
842
|
#ifdef SUBSURFACE_WEIGHT
|
|
844
843
|
let subsurfaceWeightFromTexture: vec4f=TEXRD(subsurfaceWeightSampler,subsurfaceWeightSamplerSampler,fragmentInputs.vSubsurfaceWeightUV+uvOffset);
|
|
845
844
|
#endif
|
|
@@ -867,7 +866,7 @@ subsurface_color*=uniforms.vSubsurfaceColorInfos.y;
|
|
|
867
866
|
#ifdef SUBSURFACE_RADIUS_SCALE
|
|
868
867
|
subsurface_radius_scale*=subsurfaceRadiusScaleFromTexture.rgb;
|
|
869
868
|
#endif
|
|
870
|
-
`;r.ShaderStore.IncludesShadersStoreWGSL[a]||(r.ShaderStore.IncludesShadersStoreWGSL[a]=i),e.s(["openpbrSubsurfaceLayerDataWGSL",0,{name:a,shader:i}])},
|
|
869
|
+
`;r.ShaderStore.IncludesShadersStoreWGSL[a]||(r.ShaderStore.IncludesShadersStoreWGSL[a]=i),e.s(["openpbrSubsurfaceLayerDataWGSL",0,{name:a,shader:i}])},20777,e=>{"use strict";var r=e.i(47150);let a="openpbrTransmissionLayerData",i=`var transmission_weight: f32=uniforms.vTransmissionWeight;var transmission_color: vec3f=uniforms.vTransmissionColor.rgb;var transmission_depth: f32=uniforms.vTransmissionDepth;var transmission_scatter: vec3f=uniforms.vTransmissionScatter.rgb;var transmission_scatter_anisotropy: f32=clamp(uniforms.vTransmissionScatterAnisotropy,-0.9999f,0.9999f);var transmission_dispersion_scale: f32=uniforms.vTransmissionDispersionScale;var transmission_dispersion_abbe_number: f32=uniforms.vTransmissionDispersionAbbeNumber;
|
|
871
870
|
#ifdef TRANSMISSION_WEIGHT
|
|
872
871
|
let transmissionWeightFromTexture: vec4f=TEXRD(transmissionWeightSampler,transmissionWeightSamplerSampler,fragmentInputs.vTransmissionWeightUV+uvOffset);
|
|
873
872
|
#endif
|
|
@@ -903,7 +902,7 @@ transmission_scatter*=transmissionScatterFromTexture.rgb;
|
|
|
903
902
|
#ifdef TRANSMISSION_DISPERSION_SCALE
|
|
904
903
|
transmission_dispersion_scale*=transmissionDispersionScaleFromTexture.r;
|
|
905
904
|
#endif
|
|
906
|
-
`;r.ShaderStore.IncludesShadersStoreWGSL[a]||(r.ShaderStore.IncludesShadersStoreWGSL[a]=i),e.s(["openpbrTransmissionLayerDataWGSL",0,{name:a,shader:i}])},
|
|
905
|
+
`;r.ShaderStore.IncludesShadersStoreWGSL[a]||(r.ShaderStore.IncludesShadersStoreWGSL[a]=i),e.s(["openpbrTransmissionLayerDataWGSL",0,{name:a,shader:i}])},53814,e=>{"use strict";var r=e.i(47150),a=e.i(29741),i=e.i(42241),f=e.i(9343),n=e.i(2886),t=e.i(55880),o=e.i(17765),c=e.i(97793),s=e.i(88887),l=e.i(78845),d=e.i(85959),v=e.i(49852),m=e.i(25799),u=e.i(60533),p=e.i(69809),S=e.i(92544),E=e.i(76350),R=e.i(20777);let I="geometryPixelShader",N=`#ifdef BUMP
|
|
907
906
|
varying vWorldView0: vec4f;varying vWorldView1: vec4f;varying vWorldView2: vec4f;varying vWorldView3: vec4f;varying vNormalW: vec3f;
|
|
908
907
|
#else
|
|
909
908
|
varying vNormalV: vec3f;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,5490,t=>{"use strict";var e=t.i(62478),o=t.i(75105),i=t.i(44520);class s extends e.FlowGraphExecutionBlockWithOutSignal{constructor(t){super(t),this.body=this.registerDataInput("body",o.RichTypeAny),this.motionType=this.registerDataInput("motionType",o.RichTypeNumber,2)}_execute(t,e){let o=this.body.getValue(t);if(!o){this._reportError(t,"No physics body provided"),this.out._activateSignal(t);return}o.setMotionType(this.motionType.getValue(t)),this.out._activateSignal(t)}getClassName(){return"FlowGraphSetPhysicsMotionTypeBlock"}}let r=!1;function c(){r||(r=!0,(0,i.RegisterClass)("FlowGraphSetPhysicsMotionTypeBlock",s))}t.s(["FlowGraphSetPhysicsMotionTypeBlock",0,s,"RegisterFlowGraphSetPhysicsMotionTypeBlock",0,c],63113),c(),t.s([],26606),t.i(26606),t.i(63113),t.s(["FlowGraphSetPhysicsMotionTypeBlock",0,s],5490)}]);
|