@bkm016/basalt 0.1.18 → 0.1.20
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/README.md +1 -1
- package/chunk-0b2brwjc.js +3 -0
- package/chunk-0bgg0hdd.js +2 -0
- package/chunk-0g8rtf05.js +18 -0
- package/chunk-0wwd4q6h.js +5 -0
- package/chunk-11xxfc0x.js +3 -0
- package/chunk-1gaj43fx.js +2 -0
- package/chunk-1tbv5t08.js +5 -0
- package/chunk-204c01mz.js +25 -0
- package/chunk-29g01nrz.js +20 -0
- package/chunk-2fts9k52.js +3 -0
- package/chunk-30bbdzma.js +16 -0
- package/chunk-3phf8eg6.js +3 -0
- package/chunk-3r38vbt5.js +2 -0
- package/chunk-3sg32v3n.js +2 -0
- package/chunk-4dgqcp6q.js +2 -0
- package/chunk-4fbj3k59.js +3 -0
- package/chunk-4wc2gbhe.js +2 -0
- package/chunk-51pfvmhh.js +470 -0
- package/chunk-5e7yegea.js +2 -0
- package/chunk-5ja0vsam.js +10 -0
- package/chunk-5tsfqsmf.js +2 -0
- package/chunk-6en06hkk.js +2 -0
- package/chunk-6hatfwsq.js +2 -0
- package/chunk-78ky455y.js +4 -0
- package/chunk-7kz9435k.js +11 -0
- package/chunk-8mqaq042.js +2 -0
- package/chunk-9qzyn98b.js +3 -0
- package/chunk-a1vdrgsh.js +59 -0
- package/chunk-a2z1cy84.js +2 -0
- package/chunk-a3fpx924.js +3 -0
- package/chunk-agb771ak.js +3 -0
- package/chunk-ak9rkrf3.js +5 -0
- package/chunk-as2mwf79.js +2 -0
- package/chunk-bkhsva5n.js +7 -0
- package/chunk-c5pg2875.js +3552 -0
- package/chunk-cks36jdh.js +8 -0
- package/chunk-cwrf78vs.js +3 -0
- package/chunk-d2f0hq8z.js +2 -0
- package/chunk-e0ytnnwt.js +3 -0
- package/chunk-e3bgzeb3.js +3 -0
- package/chunk-enmrpjpt.js +3 -0
- package/chunk-eps1epfr.js +4 -0
- package/chunk-ewr51fwc.js +3 -0
- package/chunk-eyyxqb6y.js +7 -0
- package/chunk-fgjw0r6g.js +12 -0
- package/chunk-g9hsrrj5.js +2 -0
- package/chunk-gg3kfa12.js +3 -0
- package/chunk-gpceyezp.js +2 -0
- package/chunk-gs5aebwh.js +2 -0
- package/chunk-h2pp8mnh.js +4 -0
- package/chunk-h4n0gg11.js +2 -0
- package/chunk-jzya0e5n.js +7 -0
- package/chunk-mde2dd79.js +2 -0
- package/chunk-ncb0tyaw.js +2 -0
- package/chunk-np2xnt1g.js +3 -0
- package/chunk-nszq2z0w.js +2 -0
- package/chunk-p0e82mee.js +3 -0
- package/chunk-qxpx8dn6.js +12 -0
- package/chunk-s819vmwh.js +3 -0
- package/chunk-s8m4svhf.js +3 -0
- package/chunk-sm9fpy18.js +390 -0
- package/chunk-svx7mz0w.js +25 -0
- package/chunk-tb3zsqe8.js +3 -0
- package/chunk-tp885r8h.js +39 -0
- package/chunk-tpeg9fkd.js +2 -0
- package/chunk-tpetsqzt.js +9 -0
- package/chunk-v0mw006s.js +15 -0
- package/chunk-v7da0aqn.js +7 -0
- package/chunk-vzrmdaba.js +2 -0
- package/chunk-w045zk55.js +2 -0
- package/chunk-w6nc3jn7.js +2 -0
- package/chunk-w9fdcchk.js +3 -0
- package/chunk-wj09qkyw.js +3 -0
- package/chunk-x1y4s01x.js +31 -0
- package/chunk-y3vap4a1.js +10 -0
- package/chunk-y83tnkr3.js +11 -0
- package/chunk-yk29stq0.js +5 -0
- package/chunk-ys2fds2x.js +3 -0
- package/chunk-yshdvnsp.js +2 -0
- package/chunk-z9p2ry9w.js +3 -0
- package/chunk-zkjnt298.js +3 -0
- package/compiled.js +10 -10
- package/package.json +1 -1
- package/ui-test-worker.js +37 -37
- package/web/chunk-08w40agf.js +34 -0
- package/web/chunk-08w40agf.js.br +0 -0
- package/web/chunk-08w40agf.js.gz +0 -0
- package/web/chunk-0bfypmyv.js +1 -0
- package/web/chunk-0bfypmyv.js.br +2 -0
- package/web/chunk-0bfypmyv.js.gz +0 -0
- package/web/chunk-0h0whn75.js +24 -0
- package/web/chunk-0h0whn75.js.br +0 -0
- package/web/chunk-0h0whn75.js.gz +0 -0
- package/web/chunk-0pzs9k06.js +1 -0
- package/web/chunk-0pzs9k06.js.br +0 -0
- package/web/chunk-0pzs9k06.js.gz +0 -0
- package/web/chunk-0rvx1z2b.js +1 -0
- package/web/chunk-0rvx1z2b.js.br +0 -0
- package/web/chunk-0rvx1z2b.js.gz +0 -0
- package/web/chunk-0tcmnvab.js +2 -0
- package/web/chunk-0tcmnvab.js.br +0 -0
- package/web/chunk-0tcmnvab.js.gz +0 -0
- package/web/chunk-0wqmwnd8.js +2 -0
- package/web/chunk-0wqmwnd8.js.br +0 -0
- package/web/chunk-0wqmwnd8.js.gz +0 -0
- package/web/chunk-0z10aqp1.js +2 -0
- package/web/chunk-0z10aqp1.js.br +0 -0
- package/web/chunk-0z10aqp1.js.gz +0 -0
- package/web/chunk-12vcrj7y.js +1 -0
- package/web/chunk-12vcrj7y.js.br +0 -0
- package/web/chunk-12vcrj7y.js.gz +0 -0
- package/web/chunk-186rp10x.js +62 -0
- package/web/chunk-186rp10x.js.br +0 -0
- package/web/chunk-186rp10x.js.gz +0 -0
- package/web/chunk-1cwyy3gh.js +2 -0
- package/web/chunk-1cwyy3gh.js.br +0 -0
- package/web/chunk-1cwyy3gh.js.gz +0 -0
- package/web/chunk-1ecsxh85.js +1 -0
- package/web/chunk-1ecsxh85.js.br +0 -0
- package/web/chunk-1ecsxh85.js.gz +0 -0
- package/web/chunk-1ghnag5v.js +2 -0
- package/web/chunk-1ghnag5v.js.br +0 -0
- package/web/chunk-1ghnag5v.js.gz +0 -0
- package/web/chunk-1ps9fj5n.js +2 -0
- package/web/chunk-1ps9fj5n.js.br +0 -0
- package/web/chunk-1ps9fj5n.js.gz +0 -0
- package/web/chunk-1ratg1jd.js +332 -0
- package/web/chunk-1ratg1jd.js.br +0 -0
- package/web/chunk-1ratg1jd.js.gz +0 -0
- package/web/chunk-1yvcxpp2.js +7 -0
- package/web/chunk-1yvcxpp2.js.br +0 -0
- package/web/chunk-1yvcxpp2.js.gz +0 -0
- package/web/chunk-2r3w0pt0.js +8 -0
- package/web/chunk-2r3w0pt0.js.br +0 -0
- package/web/chunk-2r3w0pt0.js.gz +0 -0
- package/web/chunk-2rnnvxa5.js +291 -0
- package/web/chunk-2rnnvxa5.js.br +0 -0
- package/web/chunk-2rnnvxa5.js.gz +0 -0
- package/web/chunk-2stffcvc.js +1 -0
- package/web/chunk-2stffcvc.js.br +0 -0
- package/web/chunk-2stffcvc.js.gz +0 -0
- package/web/chunk-2svqgkqw.js +1 -0
- package/web/chunk-2svqgkqw.js.br +0 -0
- package/web/chunk-2svqgkqw.js.gz +0 -0
- package/web/chunk-366a11ec.js +1 -0
- package/web/chunk-366a11ec.js.br +0 -0
- package/web/chunk-366a11ec.js.gz +0 -0
- package/web/chunk-37hmswdk.js +7 -0
- package/web/chunk-37hmswdk.js.br +0 -0
- package/web/chunk-37hmswdk.js.gz +0 -0
- package/web/chunk-3fd6mgf0.js +1 -0
- package/web/chunk-3fd6mgf0.js.br +0 -0
- package/web/chunk-3fd6mgf0.js.gz +0 -0
- package/web/chunk-4mypk63p.js +2 -0
- package/web/chunk-4mypk63p.js.br +0 -0
- package/web/chunk-4mypk63p.js.gz +0 -0
- package/web/chunk-52tt9qt4.js +2 -0
- package/web/chunk-52tt9qt4.js.br +0 -0
- package/web/chunk-52tt9qt4.js.gz +0 -0
- package/web/chunk-53cg6pxm.js +142 -0
- package/web/chunk-53cg6pxm.js.br +0 -0
- package/web/chunk-53cg6pxm.js.gz +0 -0
- package/web/chunk-59h87pvn.js +12 -0
- package/web/chunk-59h87pvn.js.br +0 -0
- package/web/chunk-59h87pvn.js.gz +0 -0
- package/web/chunk-5cp4n5ck.js +2 -0
- package/web/chunk-5cp4n5ck.js.br +0 -0
- package/web/chunk-5cp4n5ck.js.gz +0 -0
- package/web/chunk-6a3wt5c5.js +30 -0
- package/web/chunk-6a3wt5c5.js.br +0 -0
- package/web/chunk-6a3wt5c5.js.gz +0 -0
- package/web/chunk-6n1ha6ta.js +7 -0
- package/web/chunk-6n1ha6ta.js.br +0 -0
- package/web/chunk-6n1ha6ta.js.gz +0 -0
- package/web/chunk-6pbhqbv0.js +1 -0
- package/web/chunk-6pbhqbv0.js.br +0 -0
- package/web/chunk-6pbhqbv0.js.gz +0 -0
- package/web/chunk-72st75n7.js +70 -0
- package/web/chunk-72st75n7.js.br +0 -0
- package/web/chunk-72st75n7.js.gz +0 -0
- package/web/chunk-7cf1kk45.js +1 -0
- package/web/chunk-7cf1kk45.js.br +2 -0
- package/web/chunk-7cf1kk45.js.gz +0 -0
- package/web/chunk-7h59ac2b.js +38 -0
- package/web/chunk-7h59ac2b.js.br +0 -0
- package/web/chunk-7h59ac2b.js.gz +0 -0
- package/web/chunk-81xbfpbq.js +41 -0
- package/web/chunk-81xbfpbq.js.br +0 -0
- package/web/chunk-81xbfpbq.js.gz +0 -0
- package/web/chunk-82q4e8ff.js +1 -0
- package/web/chunk-82q4e8ff.js.br +0 -0
- package/web/chunk-82q4e8ff.js.gz +0 -0
- package/web/chunk-89crtpnw.js +1 -0
- package/web/chunk-89crtpnw.js.br +0 -0
- package/web/chunk-89crtpnw.js.gz +0 -0
- package/web/chunk-89e8629e.js +1 -0
- package/web/chunk-89e8629e.js.br +0 -0
- package/web/chunk-89e8629e.js.gz +0 -0
- package/web/chunk-9n1nsdqs.js +1 -0
- package/web/chunk-9n1nsdqs.js.br +0 -0
- package/web/chunk-9n1nsdqs.js.gz +0 -0
- package/web/chunk-9r7nbre7.js +2 -0
- package/web/chunk-9r7nbre7.js.br +0 -0
- package/web/chunk-9r7nbre7.js.gz +0 -0
- package/web/chunk-9y9nwaqj.js +1 -0
- package/web/chunk-9y9nwaqj.js.br +0 -0
- package/web/chunk-9y9nwaqj.js.gz +0 -0
- package/web/chunk-a8qe7kvz.js +1 -0
- package/web/chunk-a8qe7kvz.js.br +0 -0
- package/web/chunk-a8qe7kvz.js.gz +0 -0
- package/web/chunk-ahdca62g.js +1 -0
- package/web/chunk-ahdca62g.js.br +0 -0
- package/web/chunk-ahdca62g.js.gz +0 -0
- package/web/chunk-apr33amc.js +140 -0
- package/web/chunk-apr33amc.js.br +0 -0
- package/web/chunk-apr33amc.js.gz +0 -0
- package/web/chunk-aw9bwd4w.js +3 -0
- package/web/chunk-aw9bwd4w.js.br +0 -0
- package/web/chunk-aw9bwd4w.js.gz +0 -0
- package/web/chunk-bg0qgabv.js +1 -0
- package/web/chunk-bg0qgabv.js.br +0 -0
- package/web/chunk-bg0qgabv.js.gz +0 -0
- package/web/chunk-bks2k04k.js +2 -0
- package/web/chunk-bks2k04k.js.br +0 -0
- package/web/chunk-bks2k04k.js.gz +0 -0
- package/web/chunk-c28crzwk.js +120 -0
- package/web/chunk-c28crzwk.js.br +0 -0
- package/web/chunk-c28crzwk.js.gz +0 -0
- package/web/chunk-cmhxtckb.js +2 -0
- package/web/chunk-cmhxtckb.js.br +0 -0
- package/web/chunk-cmhxtckb.js.gz +0 -0
- package/web/chunk-d7f85w1y.js +1 -0
- package/web/chunk-d7f85w1y.js.br +0 -0
- package/web/chunk-d7f85w1y.js.gz +0 -0
- package/web/chunk-dmhezjv3.js +217 -0
- package/web/chunk-dmhezjv3.js.br +0 -0
- package/web/chunk-dmhezjv3.js.gz +0 -0
- package/web/chunk-dmzvhbpn.js +292 -0
- package/web/chunk-dmzvhbpn.js.br +0 -0
- package/web/chunk-dmzvhbpn.js.gz +0 -0
- package/web/chunk-e2z3kdhw.js +39 -0
- package/web/chunk-e2z3kdhw.js.br +0 -0
- package/web/chunk-e2z3kdhw.js.gz +0 -0
- package/web/chunk-e65y60v1.js +2 -0
- package/web/chunk-e65y60v1.js.br +0 -0
- package/web/chunk-e65y60v1.js.gz +0 -0
- package/web/chunk-ed8qqn45.js +2 -0
- package/web/chunk-ed8qqn45.js.br +0 -0
- package/web/chunk-ed8qqn45.js.gz +0 -0
- package/web/chunk-ef1h0tt7.js +2 -0
- package/web/chunk-ef1h0tt7.js.br +0 -0
- package/web/chunk-ef1h0tt7.js.gz +0 -0
- package/web/chunk-eqmghkwh.js +1 -0
- package/web/chunk-eqmghkwh.js.br +0 -0
- package/web/chunk-eqmghkwh.js.gz +0 -0
- package/web/chunk-esckazz2.js +1 -0
- package/web/chunk-esckazz2.js.br +0 -0
- package/web/chunk-esckazz2.js.gz +0 -0
- package/web/chunk-ezj5rjqr.js +4 -0
- package/web/chunk-ezj5rjqr.js.br +0 -0
- package/web/chunk-ezj5rjqr.js.gz +0 -0
- package/web/chunk-fjrgg82c.js +139 -0
- package/web/chunk-fjrgg82c.js.br +0 -0
- package/web/chunk-fjrgg82c.js.gz +0 -0
- package/web/chunk-g3vbtxgy.js +2 -0
- package/web/chunk-g3vbtxgy.js.br +0 -0
- package/web/chunk-g3vbtxgy.js.gz +0 -0
- package/web/chunk-gbcf0rdk.js +1 -0
- package/web/chunk-gbcf0rdk.js.br +0 -0
- package/web/chunk-gbcf0rdk.js.gz +0 -0
- package/web/chunk-gj6bdv1y.js +200 -0
- package/web/chunk-gj6bdv1y.js.br +0 -0
- package/web/chunk-gj6bdv1y.js.gz +0 -0
- package/web/chunk-gk1bc3c3.js +2 -0
- package/web/chunk-gk1bc3c3.js.br +0 -0
- package/web/chunk-gk1bc3c3.js.gz +0 -0
- package/web/chunk-gpjytpyw.js +2 -0
- package/web/chunk-gpjytpyw.js.br +0 -0
- package/web/chunk-gpjytpyw.js.gz +0 -0
- package/web/chunk-h1c0m3g4.js +99 -0
- package/web/chunk-h1c0m3g4.js.br +0 -0
- package/web/chunk-h1c0m3g4.js.gz +0 -0
- package/web/chunk-h1qv0cpd.css +1 -0
- package/web/chunk-h1qv0cpd.css.br +0 -0
- package/web/chunk-h1qv0cpd.css.gz +0 -0
- package/web/chunk-hj067dfg.js +1 -0
- package/web/chunk-hj067dfg.js.br +2 -0
- package/web/chunk-hj067dfg.js.gz +0 -0
- package/web/chunk-hq7e5xgd.js +1 -0
- package/web/chunk-hq7e5xgd.js.br +0 -0
- package/web/chunk-hq7e5xgd.js.gz +0 -0
- package/web/chunk-hqt1f3fm.js +24 -0
- package/web/chunk-hqt1f3fm.js.br +0 -0
- package/web/chunk-hqt1f3fm.js.gz +0 -0
- package/web/chunk-hwxj58j5.js +2 -0
- package/web/chunk-hwxj58j5.js.br +0 -0
- package/web/chunk-hwxj58j5.js.gz +0 -0
- package/web/chunk-hxzb25a8.js +1 -0
- package/web/chunk-hxzb25a8.js.br +0 -0
- package/web/chunk-hxzb25a8.js.gz +0 -0
- package/web/chunk-j4942vkb.js +1 -0
- package/web/chunk-j4942vkb.js.br +0 -0
- package/web/chunk-j4942vkb.js.gz +0 -0
- package/web/chunk-jmnzcm1f.js +21 -0
- package/web/chunk-jmnzcm1f.js.br +0 -0
- package/web/chunk-jmnzcm1f.js.gz +0 -0
- package/web/chunk-js940jjj.js +40 -0
- package/web/chunk-js940jjj.js.br +0 -0
- package/web/chunk-js940jjj.js.gz +0 -0
- package/web/chunk-jy9vkfbf.js +1 -0
- package/web/chunk-jy9vkfbf.js.br +0 -0
- package/web/chunk-jy9vkfbf.js.gz +0 -0
- package/web/chunk-k1d0y72z.js +2 -0
- package/web/chunk-k1d0y72z.js.br +0 -0
- package/web/chunk-k1d0y72z.js.gz +0 -0
- package/web/chunk-k4pknkvp.js +16 -0
- package/web/chunk-k4pknkvp.js.br +0 -0
- package/web/chunk-k4pknkvp.js.gz +0 -0
- package/web/chunk-k6fwzn0z.js +324 -0
- package/web/chunk-k6fwzn0z.js.br +0 -0
- package/web/chunk-k6fwzn0z.js.gz +0 -0
- package/web/chunk-kdegb6pd.js +169 -0
- package/web/chunk-kdegb6pd.js.br +0 -0
- package/web/chunk-kdegb6pd.js.gz +0 -0
- package/web/chunk-kedjfh66.js +2 -0
- package/web/chunk-kedjfh66.js.br +0 -0
- package/web/chunk-kedjfh66.js.gz +0 -0
- package/web/chunk-kh0xyffx.js +1 -0
- package/web/chunk-kh0xyffx.js.br +0 -0
- package/web/chunk-kh0xyffx.js.gz +0 -0
- package/web/chunk-ktvxgxsd.js +2 -0
- package/web/chunk-ktvxgxsd.js.br +0 -0
- package/web/chunk-ktvxgxsd.js.gz +0 -0
- package/web/chunk-mbpv2w5h.js +78 -0
- package/web/chunk-mbpv2w5h.js.br +0 -0
- package/web/chunk-mbpv2w5h.js.gz +0 -0
- package/web/chunk-mh3nkkpx.js +84 -0
- package/web/chunk-mh3nkkpx.js.br +0 -0
- package/web/chunk-mh3nkkpx.js.gz +0 -0
- package/web/chunk-mhzqgzh0.js +89 -0
- package/web/chunk-mhzqgzh0.js.br +0 -0
- package/web/chunk-mhzqgzh0.js.gz +0 -0
- package/web/chunk-mj8dzc8q.js +214 -0
- package/web/chunk-mj8dzc8q.js.br +0 -0
- package/web/chunk-mj8dzc8q.js.gz +0 -0
- package/web/chunk-mwfrxgbs.js +2 -0
- package/web/chunk-mwfrxgbs.js.br +0 -0
- package/web/chunk-mwfrxgbs.js.gz +0 -0
- package/web/chunk-n419cees.js +1 -0
- package/web/chunk-n419cees.js.br +0 -0
- package/web/chunk-n419cees.js.gz +0 -0
- package/web/chunk-n45fgfyt.js +1 -0
- package/web/chunk-n45fgfyt.js.br +2 -0
- package/web/chunk-n45fgfyt.js.gz +0 -0
- package/web/chunk-n5v71fas.js +2 -0
- package/web/chunk-n5v71fas.js.br +0 -0
- package/web/chunk-n5v71fas.js.gz +0 -0
- package/web/chunk-nb58m79v.js +89 -0
- package/web/chunk-nb58m79v.js.br +0 -0
- package/web/chunk-nb58m79v.js.gz +0 -0
- package/web/chunk-nsna2v2r.js +1 -0
- package/web/chunk-nsna2v2r.js.br +0 -0
- package/web/chunk-nsna2v2r.js.gz +0 -0
- package/web/chunk-nxdp58nf.js +1 -0
- package/web/chunk-nxdp58nf.js.br +0 -0
- package/web/chunk-nxdp58nf.js.gz +0 -0
- package/web/chunk-nytgs01h.js +1 -0
- package/web/chunk-nytgs01h.js.br +0 -0
- package/web/chunk-nytgs01h.js.gz +0 -0
- package/web/chunk-p76f6cf4.js +2 -0
- package/web/chunk-p76f6cf4.js.br +0 -0
- package/web/chunk-p76f6cf4.js.gz +0 -0
- package/web/chunk-pkxn54jm.js +1 -0
- package/web/chunk-pkxn54jm.js.br +0 -0
- package/web/chunk-pkxn54jm.js.gz +0 -0
- package/web/chunk-q0srq8g5.js +1 -0
- package/web/chunk-q0srq8g5.js.br +0 -0
- package/web/chunk-q0srq8g5.js.gz +0 -0
- package/web/chunk-qgtqwmkb.js +1 -0
- package/web/chunk-qgtqwmkb.js.br +2 -0
- package/web/chunk-qgtqwmkb.js.gz +0 -0
- package/web/chunk-qjg6dw46.js +1134 -0
- package/web/chunk-qjg6dw46.js.br +0 -0
- package/web/chunk-qjg6dw46.js.gz +0 -0
- package/web/chunk-qjjxevxe.js +1 -0
- package/web/chunk-qjjxevxe.js.br +0 -0
- package/web/chunk-qjjxevxe.js.gz +0 -0
- package/web/chunk-qx5ab39c.js +4 -0
- package/web/chunk-qx5ab39c.js.br +0 -0
- package/web/chunk-qx5ab39c.js.gz +0 -0
- package/web/chunk-qygjhm63.js +1 -0
- package/web/chunk-qygjhm63.js.br +0 -0
- package/web/chunk-qygjhm63.js.gz +0 -0
- package/web/chunk-recfg8af.js +2 -0
- package/web/chunk-recfg8af.js.br +0 -0
- package/web/chunk-recfg8af.js.gz +0 -0
- package/web/chunk-rfsg5rke.js +1 -0
- package/web/chunk-rfsg5rke.js.br +2 -0
- package/web/chunk-rfsg5rke.js.gz +0 -0
- package/web/chunk-s7h50avx.js +2 -0
- package/web/chunk-s7h50avx.js.br +0 -0
- package/web/chunk-s7h50avx.js.gz +0 -0
- package/web/chunk-sk47kk5j.js +1 -0
- package/web/chunk-sk47kk5j.js.br +0 -0
- package/web/chunk-sk47kk5j.js.gz +0 -0
- package/web/chunk-t9heac9a.js +2 -0
- package/web/chunk-t9heac9a.js.br +0 -0
- package/web/chunk-t9heac9a.js.gz +0 -0
- package/web/chunk-tg3f9xmp.js +1 -0
- package/web/chunk-tg3f9xmp.js.br +0 -0
- package/web/chunk-tg3f9xmp.js.gz +0 -0
- package/web/chunk-tgeeggkh.js +1 -0
- package/web/chunk-tgeeggkh.js.br +0 -0
- package/web/chunk-tgeeggkh.js.gz +0 -0
- package/web/chunk-v2bkkhb8.js +303 -0
- package/web/chunk-v2bkkhb8.js.br +0 -0
- package/web/chunk-v2bkkhb8.js.gz +0 -0
- package/web/chunk-v5p2fds9.js +36 -0
- package/web/chunk-v5p2fds9.js.br +0 -0
- package/web/chunk-v5p2fds9.js.gz +0 -0
- package/web/chunk-v6snw1sw.js +1 -0
- package/web/chunk-v6snw1sw.js.br +0 -0
- package/web/chunk-v6snw1sw.js.gz +0 -0
- package/web/chunk-veadbga2.js +1 -0
- package/web/chunk-veadbga2.js.br +2 -0
- package/web/chunk-veadbga2.js.gz +0 -0
- package/web/chunk-vh2prc6k.js +1 -0
- package/web/chunk-vh2prc6k.js.br +0 -0
- package/web/chunk-vh2prc6k.js.gz +0 -0
- package/web/chunk-vhpzp7zd.js +2 -0
- package/web/chunk-vhpzp7zd.js.br +0 -0
- package/web/chunk-vhpzp7zd.js.gz +0 -0
- package/web/chunk-vpbnyz43.js +98 -0
- package/web/chunk-vpbnyz43.js.br +0 -0
- package/web/chunk-vpbnyz43.js.gz +0 -0
- package/web/chunk-vxadngbp.js +2 -0
- package/web/chunk-vxadngbp.js.br +3 -0
- package/web/chunk-vxadngbp.js.gz +0 -0
- package/web/chunk-wa8wr2y9.js +106 -0
- package/web/chunk-wa8wr2y9.js.br +0 -0
- package/web/chunk-wa8wr2y9.js.gz +0 -0
- package/web/chunk-wbxz2bjb.js +1 -0
- package/web/chunk-wbxz2bjb.js.br +0 -0
- package/web/chunk-wbxz2bjb.js.gz +0 -0
- package/web/chunk-wgzatts8.js +1 -0
- package/web/chunk-wgzatts8.js.br +0 -0
- package/web/chunk-wgzatts8.js.gz +0 -0
- package/web/chunk-whczyxqw.js +1 -0
- package/web/chunk-whczyxqw.js.br +0 -0
- package/web/chunk-whczyxqw.js.gz +0 -0
- package/web/chunk-wmzz2crn.js +1 -0
- package/web/chunk-wmzz2crn.js.br +0 -0
- package/web/chunk-wmzz2crn.js.gz +0 -0
- package/web/chunk-wvqcbp4a.js +1 -0
- package/web/chunk-wvqcbp4a.js.br +0 -0
- package/web/chunk-wvqcbp4a.js.gz +0 -0
- package/web/chunk-wvvrdqgb.js +1 -0
- package/web/chunk-wvvrdqgb.js.br +2 -0
- package/web/chunk-wvvrdqgb.js.gz +0 -0
- package/web/chunk-x2hxq5yr.js +55 -0
- package/web/chunk-x2hxq5yr.js.br +0 -0
- package/web/chunk-x2hxq5yr.js.gz +0 -0
- package/web/chunk-x8bnp6vr.js +1 -0
- package/web/chunk-x8bnp6vr.js.br +0 -0
- package/web/chunk-x8bnp6vr.js.gz +0 -0
- package/web/chunk-xp9tdb5t.js +1 -0
- package/web/chunk-xp9tdb5t.js.br +2 -0
- package/web/chunk-xp9tdb5t.js.gz +0 -0
- package/web/chunk-xvmzsftt.js +2 -0
- package/web/chunk-xvmzsftt.js.br +0 -0
- package/web/chunk-xvmzsftt.js.gz +0 -0
- package/web/chunk-y10hsdq4.js +1 -0
- package/web/chunk-y10hsdq4.js.br +0 -0
- package/web/chunk-y10hsdq4.js.gz +0 -0
- package/web/chunk-ye7vge7s.js +1 -0
- package/web/chunk-ye7vge7s.js.br +0 -0
- package/web/chunk-ye7vge7s.js.gz +0 -0
- package/web/chunk-zbzgd8kn.js +2 -0
- package/web/chunk-zbzgd8kn.js.br +0 -0
- package/web/chunk-zbzgd8kn.js.gz +0 -0
- package/web/chunk-zhwqscat.js +1 -0
- package/web/chunk-zhwqscat.js.br +0 -0
- package/web/chunk-zhwqscat.js.gz +0 -0
- package/web/chunk-znrsm604.js +370 -0
- package/web/chunk-znrsm604.js.br +0 -0
- package/web/chunk-znrsm604.js.gz +0 -0
- package/web/chunk-zthww0ws.js +1 -0
- package/web/chunk-zthww0ws.js.br +0 -0
- package/web/chunk-zthww0ws.js.gz +0 -0
- package/web/index.html +3 -1
- package/web/index.html.br +0 -0
- package/web/index.html.gz +0 -0
- package/worker.js +1 -1
- package/chunk-02q61grt.js +0 -3
- package/chunk-03r6s8pm.js +0 -2
- package/chunk-09fsdkd3.js +0 -5
- package/chunk-0bg4w7ht.js +0 -3
- package/chunk-0s4r7k7j.js +0 -2
- package/chunk-27kw4nth.js +0 -2
- package/chunk-2ag9mvms.js +0 -10
- package/chunk-2shwjp8q.js +0 -3
- package/chunk-3114vstw.js +0 -2
- package/chunk-31meb34a.js +0 -2
- package/chunk-34w345mt.js +0 -2
- package/chunk-3amfr8zp.js +0 -7
- package/chunk-40nk2jjt.js +0 -2
- package/chunk-49bz6hg5.js +0 -25
- package/chunk-4hgkwa4k.js +0 -3
- package/chunk-4wfd77kc.js +0 -2
- package/chunk-55kpabb3.js +0 -2
- package/chunk-5p2asrj6.js +0 -2
- package/chunk-65hg0v7e.js +0 -2
- package/chunk-67qw30cj.js +0 -3770
- package/chunk-6rehcf49.js +0 -12
- package/chunk-6vkz3wqz.js +0 -25
- package/chunk-81yk0kj2.js +0 -3
- package/chunk-885vf5kb.js +0 -2
- package/chunk-8wy08x0d.js +0 -2
- package/chunk-9cqa9trx.js +0 -4
- package/chunk-ae45qq4z.js +0 -2
- package/chunk-ag3em5yv.js +0 -4
- package/chunk-b5k5p49x.js +0 -2
- package/chunk-b84vbfjc.js +0 -2
- package/chunk-dkpgstr2.js +0 -18
- package/chunk-dzn4c87v.js +0 -3
- package/chunk-e5xsyr0n.js +0 -3
- package/chunk-f97ma522.js +0 -3
- package/chunk-f9yneea6.js +0 -3
- package/chunk-fk43jgwe.js +0 -31
- package/chunk-frjqjdkx.js +0 -11
- package/chunk-fycz7ap5.js +0 -2
- package/chunk-fzefs6kn.js +0 -3
- package/chunk-g1n8k4dg.js +0 -5
- package/chunk-g5mdw639.js +0 -3
- package/chunk-gnvx44kj.js +0 -10
- package/chunk-gpympx0t.js +0 -467
- package/chunk-gyp2jn7d.js +0 -3
- package/chunk-hambwbfz.js +0 -7
- package/chunk-j02kqpvq.js +0 -5
- package/chunk-j1h7pabk.js +0 -7
- package/chunk-j6hn9qz6.js +0 -3
- package/chunk-jfx4c32t.js +0 -8
- package/chunk-jjj8a18b.js +0 -59
- package/chunk-k3c32v59.js +0 -3
- package/chunk-k8j3fvx5.js +0 -2
- package/chunk-kcn3af9r.js +0 -12
- package/chunk-m45dpnd1.js +0 -16
- package/chunk-m4wf04dz.js +0 -15
- package/chunk-m8k6t63k.js +0 -2
- package/chunk-nrggp4x6.js +0 -2
- package/chunk-nt549hv5.js +0 -2
- package/chunk-pg4mtrdy.js +0 -3
- package/chunk-psr4rxnn.js +0 -20
- package/chunk-qhhv81gd.js +0 -2
- package/chunk-qprms4rt.js +0 -2
- package/chunk-r0pm6dap.js +0 -3
- package/chunk-rck0kx09.js +0 -2
- package/chunk-rsn8ad6s.js +0 -2
- package/chunk-skzh3q1s.js +0 -2
- package/chunk-sm4b3q49.js +0 -3
- package/chunk-ste3ek53.js +0 -3
- package/chunk-trw86cmb.js +0 -11
- package/chunk-tv7met41.js +0 -3
- package/chunk-w33aapmk.js +0 -39
- package/chunk-wkqrsfrb.js +0 -389
- package/chunk-wxngqzqs.js +0 -3
- package/chunk-xafx1p7z.js +0 -3
- package/chunk-xgfqmm46.js +0 -2
- package/chunk-xr77j4f8.js +0 -9
- package/chunk-ykstnss8.js +0 -3
- package/chunk-yqv7ej5r.js +0 -5
- package/chunk-z97bcdg2.js +0 -3
- package/chunk-z9s7pwv5.js +0 -7
- package/web/chunk-013et20n.js +0 -2
- package/web/chunk-013et20n.js.br +0 -0
- package/web/chunk-013et20n.js.gz +0 -0
- package/web/chunk-0ernj3c0.js +0 -1
- package/web/chunk-0ernj3c0.js.br +0 -0
- package/web/chunk-0ernj3c0.js.gz +0 -0
- package/web/chunk-0j65yg1p.js +0 -1
- package/web/chunk-0j65yg1p.js.br +0 -0
- package/web/chunk-0j65yg1p.js.gz +0 -0
- package/web/chunk-0khcpaa8.js +0 -1
- package/web/chunk-0khcpaa8.js.br +0 -0
- package/web/chunk-0khcpaa8.js.gz +0 -0
- package/web/chunk-0wbdd74r.js +0 -1
- package/web/chunk-0wbdd74r.js.br +0 -2
- package/web/chunk-0wbdd74r.js.gz +0 -0
- package/web/chunk-1f2wvhq9.js +0 -1
- package/web/chunk-1f2wvhq9.js.br +0 -0
- package/web/chunk-1f2wvhq9.js.gz +0 -0
- package/web/chunk-1q2kmv35.js +0 -332
- package/web/chunk-1q2kmv35.js.br +0 -0
- package/web/chunk-1q2kmv35.js.gz +0 -0
- package/web/chunk-1tfrm3pk.js +0 -2
- package/web/chunk-1tfrm3pk.js.br +0 -0
- package/web/chunk-1tfrm3pk.js.gz +0 -0
- package/web/chunk-2qt5fy5n.js +0 -1
- package/web/chunk-2qt5fy5n.js.br +0 -0
- package/web/chunk-2qt5fy5n.js.gz +0 -0
- package/web/chunk-2sxtb709.js +0 -1
- package/web/chunk-2sxtb709.js.br +0 -0
- package/web/chunk-2sxtb709.js.gz +0 -0
- package/web/chunk-2wrwm0qe.js +0 -1
- package/web/chunk-2wrwm0qe.js.br +0 -0
- package/web/chunk-2wrwm0qe.js.gz +0 -0
- package/web/chunk-2wwj27b9.js +0 -7
- package/web/chunk-2wwj27b9.js.br +0 -0
- package/web/chunk-2wwj27b9.js.gz +0 -0
- package/web/chunk-33mmrjdp.js +0 -1
- package/web/chunk-33mmrjdp.js.br +0 -2
- package/web/chunk-33mmrjdp.js.gz +0 -0
- package/web/chunk-33tb7q04.js +0 -2
- package/web/chunk-33tb7q04.js.br +0 -0
- package/web/chunk-33tb7q04.js.gz +0 -0
- package/web/chunk-3txb4sha.js +0 -1
- package/web/chunk-3txb4sha.js.br +0 -0
- package/web/chunk-3txb4sha.js.gz +0 -0
- package/web/chunk-3xgfsx7y.js +0 -2
- package/web/chunk-3xgfsx7y.js.br +0 -0
- package/web/chunk-3xgfsx7y.js.gz +0 -0
- package/web/chunk-40jka4r7.js +0 -2
- package/web/chunk-40jka4r7.js.br +0 -0
- package/web/chunk-40jka4r7.js.gz +0 -0
- package/web/chunk-41vh5n86.js +0 -1
- package/web/chunk-41vh5n86.js.br +0 -0
- package/web/chunk-41vh5n86.js.gz +0 -0
- package/web/chunk-5kz048x3.js +0 -2
- package/web/chunk-5kz048x3.js.br +0 -0
- package/web/chunk-5kz048x3.js.gz +0 -0
- package/web/chunk-5mbz8yj9.js +0 -3
- package/web/chunk-5mbz8yj9.js.br +0 -0
- package/web/chunk-5mbz8yj9.js.gz +0 -0
- package/web/chunk-6024wfxb.js +0 -30
- package/web/chunk-6024wfxb.js.br +0 -0
- package/web/chunk-6024wfxb.js.gz +0 -0
- package/web/chunk-6ey4c6gw.js +0 -2
- package/web/chunk-6ey4c6gw.js.br +0 -0
- package/web/chunk-6ey4c6gw.js.gz +0 -0
- package/web/chunk-6q3p851n.js +0 -1
- package/web/chunk-6q3p851n.js.br +0 -2
- package/web/chunk-6q3p851n.js.gz +0 -0
- package/web/chunk-74g3wh08.js +0 -2
- package/web/chunk-74g3wh08.js.br +0 -0
- package/web/chunk-74g3wh08.js.gz +0 -0
- package/web/chunk-78akzkgs.js +0 -84
- package/web/chunk-78akzkgs.js.br +0 -0
- package/web/chunk-78akzkgs.js.gz +0 -0
- package/web/chunk-7ck99bsp.js +0 -62
- package/web/chunk-7ck99bsp.js.br +0 -0
- package/web/chunk-7ck99bsp.js.gz +0 -0
- package/web/chunk-7fjbyns9.js +0 -1
- package/web/chunk-7fjbyns9.js.br +0 -0
- package/web/chunk-7fjbyns9.js.gz +0 -0
- package/web/chunk-7n6b2xra.js +0 -21
- package/web/chunk-7n6b2xra.js.br +0 -0
- package/web/chunk-7n6b2xra.js.gz +0 -0
- package/web/chunk-7p4mcqkd.js +0 -78
- package/web/chunk-7p4mcqkd.js.br +0 -0
- package/web/chunk-7p4mcqkd.js.gz +0 -0
- package/web/chunk-7ztwkhg5.js +0 -1
- package/web/chunk-7ztwkhg5.js.br +0 -0
- package/web/chunk-7ztwkhg5.js.gz +0 -0
- package/web/chunk-823etvc3.js +0 -99
- package/web/chunk-823etvc3.js.br +0 -0
- package/web/chunk-823etvc3.js.gz +0 -0
- package/web/chunk-8ec53vjd.js +0 -1
- package/web/chunk-8ec53vjd.js.br +0 -0
- package/web/chunk-8ec53vjd.js.gz +0 -0
- package/web/chunk-8g55ytgz.js +0 -1
- package/web/chunk-8g55ytgz.js.br +0 -0
- package/web/chunk-8g55ytgz.js.gz +0 -0
- package/web/chunk-8nxjthxc.js +0 -1
- package/web/chunk-8nxjthxc.js.br +0 -0
- package/web/chunk-8nxjthxc.js.gz +0 -0
- package/web/chunk-8q76yd76.js +0 -291
- package/web/chunk-8q76yd76.js.br +0 -0
- package/web/chunk-8q76yd76.js.gz +0 -0
- package/web/chunk-9kbrjmtz.js +0 -1
- package/web/chunk-9kbrjmtz.js.br +0 -0
- package/web/chunk-9kbrjmtz.js.gz +0 -0
- package/web/chunk-9s4bh6qm.js +0 -40
- package/web/chunk-9s4bh6qm.js.br +0 -0
- package/web/chunk-9s4bh6qm.js.gz +0 -0
- package/web/chunk-9vf3zy3d.js +0 -2
- package/web/chunk-9vf3zy3d.js.br +0 -0
- package/web/chunk-9vf3zy3d.js.gz +0 -0
- package/web/chunk-a449xjq6.js +0 -7
- package/web/chunk-a449xjq6.js.br +0 -0
- package/web/chunk-a449xjq6.js.gz +0 -0
- package/web/chunk-b05eay33.js +0 -1
- package/web/chunk-b05eay33.js.br +0 -0
- package/web/chunk-b05eay33.js.gz +0 -0
- package/web/chunk-bdypt5mj.js +0 -142
- package/web/chunk-bdypt5mj.js.br +0 -0
- package/web/chunk-bdypt5mj.js.gz +0 -0
- package/web/chunk-ccy2q2z0.js +0 -2
- package/web/chunk-ccy2q2z0.js.br +0 -0
- package/web/chunk-ccy2q2z0.js.gz +0 -0
- package/web/chunk-ceg13tma.js +0 -2
- package/web/chunk-ceg13tma.js.br +0 -0
- package/web/chunk-ceg13tma.js.gz +0 -0
- package/web/chunk-ch60a61d.js +0 -2
- package/web/chunk-ch60a61d.js.br +0 -0
- package/web/chunk-ch60a61d.js.gz +0 -0
- package/web/chunk-czvdg0c5.js +0 -1
- package/web/chunk-czvdg0c5.js.br +0 -0
- package/web/chunk-czvdg0c5.js.gz +0 -0
- package/web/chunk-drr7mqg2.js +0 -1
- package/web/chunk-drr7mqg2.js.br +0 -0
- package/web/chunk-drr7mqg2.js.gz +0 -0
- package/web/chunk-dsa5m3h6.js +0 -200
- package/web/chunk-dsa5m3h6.js.br +0 -0
- package/web/chunk-dsa5m3h6.js.gz +0 -0
- package/web/chunk-dww3grm3.js +0 -24
- package/web/chunk-dww3grm3.js.br +0 -0
- package/web/chunk-dww3grm3.js.gz +0 -0
- package/web/chunk-e187gt5x.js +0 -1
- package/web/chunk-e187gt5x.js.br +0 -0
- package/web/chunk-e187gt5x.js.gz +0 -0
- package/web/chunk-emxa4wv3.js +0 -2
- package/web/chunk-emxa4wv3.js.br +0 -0
- package/web/chunk-emxa4wv3.js.gz +0 -0
- package/web/chunk-ey0zwvbx.js +0 -1
- package/web/chunk-ey0zwvbx.js.br +0 -0
- package/web/chunk-ey0zwvbx.js.gz +0 -0
- package/web/chunk-ey14knbn.js +0 -2
- package/web/chunk-ey14knbn.js.br +0 -0
- package/web/chunk-ey14knbn.js.gz +0 -0
- package/web/chunk-fba06jm8.js +0 -1132
- package/web/chunk-fba06jm8.js.br +0 -0
- package/web/chunk-fba06jm8.js.gz +0 -0
- package/web/chunk-fh56vgfx.js +0 -39
- package/web/chunk-fh56vgfx.js.br +0 -0
- package/web/chunk-fh56vgfx.js.gz +0 -0
- package/web/chunk-ft05x3my.js +0 -169
- package/web/chunk-ft05x3my.js.br +0 -0
- package/web/chunk-ft05x3my.js.gz +0 -0
- package/web/chunk-fzmrnh17.js +0 -303
- package/web/chunk-fzmrnh17.js.br +0 -0
- package/web/chunk-fzmrnh17.js.gz +0 -0
- package/web/chunk-gbt7asd7.js +0 -2
- package/web/chunk-gbt7asd7.js.br +0 -0
- package/web/chunk-gbt7asd7.js.gz +0 -0
- package/web/chunk-gh9fkn3t.js +0 -1
- package/web/chunk-gh9fkn3t.js.br +0 -2
- package/web/chunk-gh9fkn3t.js.gz +0 -0
- package/web/chunk-h1syyjqq.js +0 -2
- package/web/chunk-h1syyjqq.js.br +0 -0
- package/web/chunk-h1syyjqq.js.gz +0 -0
- package/web/chunk-h7byk4z3.js +0 -140
- package/web/chunk-h7byk4z3.js.br +0 -0
- package/web/chunk-h7byk4z3.js.gz +0 -0
- package/web/chunk-hby0hkv4.js +0 -1
- package/web/chunk-hby0hkv4.js.br +0 -0
- package/web/chunk-hby0hkv4.js.gz +0 -0
- package/web/chunk-hjvsp2yx.js +0 -1
- package/web/chunk-hjvsp2yx.js.br +0 -0
- package/web/chunk-hjvsp2yx.js.gz +0 -0
- package/web/chunk-hpjzy5ww.js +0 -1
- package/web/chunk-hpjzy5ww.js.br +0 -0
- package/web/chunk-hpjzy5ww.js.gz +0 -0
- package/web/chunk-hzfp8kqx.js +0 -217
- package/web/chunk-hzfp8kqx.js.br +0 -0
- package/web/chunk-hzfp8kqx.js.gz +0 -0
- package/web/chunk-j6jjk46a.js +0 -2
- package/web/chunk-j6jjk46a.js.br +0 -0
- package/web/chunk-j6jjk46a.js.gz +0 -0
- package/web/chunk-j8f0m1dq.js +0 -1
- package/web/chunk-j8f0m1dq.js.br +0 -0
- package/web/chunk-j8f0m1dq.js.gz +0 -0
- package/web/chunk-jc178ad5.js +0 -2
- package/web/chunk-jc178ad5.js.br +0 -0
- package/web/chunk-jc178ad5.js.gz +0 -0
- package/web/chunk-jcsf0ke5.js +0 -41
- package/web/chunk-jcsf0ke5.js.br +0 -0
- package/web/chunk-jcsf0ke5.js.gz +0 -0
- package/web/chunk-jg43a2xk.js +0 -139
- package/web/chunk-jg43a2xk.js.br +0 -0
- package/web/chunk-jg43a2xk.js.gz +0 -0
- package/web/chunk-jrgdxqtq.js +0 -7
- package/web/chunk-jrgdxqtq.js.br +0 -0
- package/web/chunk-jrgdxqtq.js.gz +0 -0
- package/web/chunk-js8dvtfg.js +0 -2
- package/web/chunk-js8dvtfg.js.br +0 -0
- package/web/chunk-js8dvtfg.js.gz +0 -0
- package/web/chunk-jt0s9qs7.js +0 -1
- package/web/chunk-jt0s9qs7.js.br +0 -0
- package/web/chunk-jt0s9qs7.js.gz +0 -0
- package/web/chunk-jv5faf88.js +0 -34
- package/web/chunk-jv5faf88.js.br +0 -0
- package/web/chunk-jv5faf88.js.gz +0 -0
- package/web/chunk-k295x81w.js +0 -370
- package/web/chunk-k295x81w.js.br +0 -0
- package/web/chunk-k295x81w.js.gz +0 -0
- package/web/chunk-k3aa37pw.js +0 -2
- package/web/chunk-k3aa37pw.js.br +0 -0
- package/web/chunk-k3aa37pw.js.gz +0 -0
- package/web/chunk-k6wxwgp1.js +0 -55
- package/web/chunk-k6wxwgp1.js.br +0 -0
- package/web/chunk-k6wxwgp1.js.gz +0 -0
- package/web/chunk-k9vc7kp2.js +0 -292
- package/web/chunk-k9vc7kp2.js.br +0 -0
- package/web/chunk-k9vc7kp2.js.gz +0 -0
- package/web/chunk-kxyws7q7.js +0 -1
- package/web/chunk-kxyws7q7.js.br +0 -0
- package/web/chunk-kxyws7q7.js.gz +0 -0
- package/web/chunk-mcgf645h.js +0 -1
- package/web/chunk-mcgf645h.js.br +0 -4
- package/web/chunk-mcgf645h.js.gz +0 -0
- package/web/chunk-mj3tshy8.js +0 -214
- package/web/chunk-mj3tshy8.js.br +0 -0
- package/web/chunk-mj3tshy8.js.gz +0 -0
- package/web/chunk-mnb2wdvy.js +0 -24
- package/web/chunk-mnb2wdvy.js.br +0 -0
- package/web/chunk-mnb2wdvy.js.gz +0 -0
- package/web/chunk-ndf58dgc.js +0 -1
- package/web/chunk-ndf58dgc.js.br +0 -0
- package/web/chunk-ndf58dgc.js.gz +0 -0
- package/web/chunk-nhpm5nd5.js +0 -2
- package/web/chunk-nhpm5nd5.js.br +0 -0
- package/web/chunk-nhpm5nd5.js.gz +0 -0
- package/web/chunk-nwxjdetb.js +0 -1
- package/web/chunk-nwxjdetb.js.br +0 -0
- package/web/chunk-nwxjdetb.js.gz +0 -0
- package/web/chunk-nyjfcard.js +0 -106
- package/web/chunk-nyjfcard.js.br +0 -0
- package/web/chunk-nyjfcard.js.gz +0 -0
- package/web/chunk-pcfjcy3a.js +0 -324
- package/web/chunk-pcfjcy3a.js.br +0 -0
- package/web/chunk-pcfjcy3a.js.gz +0 -0
- package/web/chunk-pry6wdbe.js +0 -1
- package/web/chunk-pry6wdbe.js.br +0 -0
- package/web/chunk-pry6wdbe.js.gz +0 -0
- package/web/chunk-pvahdcgy.js +0 -2
- package/web/chunk-pvahdcgy.js.br +0 -0
- package/web/chunk-pvahdcgy.js.gz +0 -0
- package/web/chunk-q3njnnef.js +0 -16
- package/web/chunk-q3njnnef.js.br +0 -0
- package/web/chunk-q3njnnef.js.gz +0 -0
- package/web/chunk-qxvqkkmw.js +0 -1
- package/web/chunk-qxvqkkmw.js.br +0 -0
- package/web/chunk-qxvqkkmw.js.gz +0 -0
- package/web/chunk-qych3sbs.js +0 -1
- package/web/chunk-qych3sbs.js.br +0 -0
- package/web/chunk-qych3sbs.js.gz +0 -0
- package/web/chunk-rbmp2e4b.js +0 -1
- package/web/chunk-rbmp2e4b.js.br +0 -0
- package/web/chunk-rbmp2e4b.js.gz +0 -0
- package/web/chunk-rcre1stj.js +0 -1
- package/web/chunk-rcre1stj.js.br +0 -0
- package/web/chunk-rcre1stj.js.gz +0 -0
- package/web/chunk-rdb6091n.js +0 -89
- package/web/chunk-rdb6091n.js.br +0 -0
- package/web/chunk-rdb6091n.js.gz +0 -0
- package/web/chunk-ryw7xnab.js +0 -1
- package/web/chunk-ryw7xnab.js.br +0 -0
- package/web/chunk-ryw7xnab.js.gz +0 -0
- package/web/chunk-sbbmy02e.js +0 -2
- package/web/chunk-sbbmy02e.js.br +0 -0
- package/web/chunk-sbbmy02e.js.gz +0 -0
- package/web/chunk-sgbc835w.js +0 -2
- package/web/chunk-sgbc835w.js.br +0 -0
- package/web/chunk-sgbc835w.js.gz +0 -0
- package/web/chunk-sydy10mb.js +0 -1
- package/web/chunk-sydy10mb.js.br +0 -0
- package/web/chunk-sydy10mb.js.gz +0 -0
- package/web/chunk-t0ywnp5e.js +0 -1
- package/web/chunk-t0ywnp5e.js.br +0 -0
- package/web/chunk-t0ywnp5e.js.gz +0 -0
- package/web/chunk-t72jq97z.js +0 -2
- package/web/chunk-t72jq97z.js.br +0 -0
- package/web/chunk-t72jq97z.js.gz +0 -0
- package/web/chunk-tfcc9bcz.js +0 -4
- package/web/chunk-tfcc9bcz.js.br +0 -0
- package/web/chunk-tfcc9bcz.js.gz +0 -0
- package/web/chunk-v2bvbgfc.js +0 -2
- package/web/chunk-v2bvbgfc.js.br +0 -0
- package/web/chunk-v2bvbgfc.js.gz +0 -0
- package/web/chunk-v7zq4vc9.js +0 -12
- package/web/chunk-v7zq4vc9.js.br +0 -0
- package/web/chunk-v7zq4vc9.js.gz +0 -0
- package/web/chunk-vh8pkcem.css +0 -1
- package/web/chunk-vh8pkcem.css.br +0 -0
- package/web/chunk-vh8pkcem.css.gz +0 -0
- package/web/chunk-vq3sby7x.js +0 -1
- package/web/chunk-vq3sby7x.js.br +0 -0
- package/web/chunk-vq3sby7x.js.gz +0 -0
- package/web/chunk-vszya05r.js +0 -2
- package/web/chunk-vszya05r.js.br +0 -0
- package/web/chunk-vszya05r.js.gz +0 -0
- package/web/chunk-was9xf03.js +0 -8
- package/web/chunk-was9xf03.js.br +0 -0
- package/web/chunk-was9xf03.js.gz +0 -0
- package/web/chunk-we1v1829.js +0 -2
- package/web/chunk-we1v1829.js.br +0 -0
- package/web/chunk-we1v1829.js.gz +0 -0
- package/web/chunk-wfa1c8dn.js +0 -1
- package/web/chunk-wfa1c8dn.js.br +0 -0
- package/web/chunk-wfa1c8dn.js.gz +0 -0
- package/web/chunk-wg2exnxe.js +0 -1
- package/web/chunk-wg2exnxe.js.br +0 -2
- package/web/chunk-wg2exnxe.js.gz +0 -0
- package/web/chunk-wvd3zj1m.js +0 -70
- package/web/chunk-wvd3zj1m.js.br +0 -0
- package/web/chunk-wvd3zj1m.js.gz +0 -0
- package/web/chunk-wzmxtr30.js +0 -1
- package/web/chunk-wzmxtr30.js.br +0 -0
- package/web/chunk-wzmxtr30.js.gz +0 -0
- package/web/chunk-x815g7yp.js +0 -1
- package/web/chunk-x815g7yp.js.br +0 -0
- package/web/chunk-x815g7yp.js.gz +0 -0
- package/web/chunk-x8ps0p82.js +0 -98
- package/web/chunk-x8ps0p82.js.br +0 -0
- package/web/chunk-x8ps0p82.js.gz +0 -0
- package/web/chunk-xea3snym.js +0 -1
- package/web/chunk-xea3snym.js.br +0 -0
- package/web/chunk-xea3snym.js.gz +0 -0
- package/web/chunk-xg4v60m7.js +0 -1
- package/web/chunk-xg4v60m7.js.br +0 -0
- package/web/chunk-xg4v60m7.js.gz +0 -0
- package/web/chunk-xhr9jrjt.js +0 -89
- package/web/chunk-xhr9jrjt.js.br +0 -0
- package/web/chunk-xhr9jrjt.js.gz +0 -0
- package/web/chunk-xp90g2e7.js +0 -36
- package/web/chunk-xp90g2e7.js.br +0 -0
- package/web/chunk-xp90g2e7.js.gz +0 -0
- package/web/chunk-xs1g97qa.js +0 -2
- package/web/chunk-xs1g97qa.js.br +0 -0
- package/web/chunk-xs1g97qa.js.gz +0 -0
- package/web/chunk-xyk1wpr4.js +0 -1
- package/web/chunk-xyk1wpr4.js.br +0 -3
- package/web/chunk-xyk1wpr4.js.gz +0 -0
- package/web/chunk-yavbdwyt.js +0 -1
- package/web/chunk-yavbdwyt.js.br +0 -0
- package/web/chunk-yavbdwyt.js.gz +0 -0
- package/web/chunk-yfnhnsxe.js +0 -4
- package/web/chunk-yfnhnsxe.js.br +0 -0
- package/web/chunk-yfnhnsxe.js.gz +0 -0
- package/web/chunk-yk965yth.js +0 -1
- package/web/chunk-yk965yth.js.br +0 -0
- package/web/chunk-yk965yth.js.gz +0 -0
- package/web/chunk-ynhcjhsx.js +0 -2
- package/web/chunk-ynhcjhsx.js.br +0 -0
- package/web/chunk-ynhcjhsx.js.gz +0 -0
- package/web/chunk-ypmm1gts.js +0 -1
- package/web/chunk-ypmm1gts.js.br +0 -0
- package/web/chunk-ypmm1gts.js.gz +0 -0
- package/web/chunk-yssx5a5q.js +0 -1
- package/web/chunk-yssx5a5q.js.br +0 -0
- package/web/chunk-yssx5a5q.js.gz +0 -0
- package/web/chunk-z0a8cnq8.js +0 -1
- package/web/chunk-z0a8cnq8.js.br +0 -0
- package/web/chunk-z0a8cnq8.js.gz +0 -0
- package/web/chunk-z1afsvbv.js +0 -2
- package/web/chunk-z1afsvbv.js.br +0 -0
- package/web/chunk-z1afsvbv.js.gz +0 -0
- package/web/chunk-z1ka8jtd.js +0 -2
- package/web/chunk-z1ka8jtd.js.br +0 -0
- package/web/chunk-z1ka8jtd.js.gz +0 -0
- package/web/chunk-z7tdzen9.js +0 -1
- package/web/chunk-z7tdzen9.js.br +0 -0
- package/web/chunk-z7tdzen9.js.gz +0 -0
- package/web/chunk-zbwjj06m.js +0 -38
- package/web/chunk-zbwjj06m.js.br +0 -0
- package/web/chunk-zbwjj06m.js.gz +0 -0
- package/web/chunk-zd2j189j.js +0 -1
- package/web/chunk-zd2j189j.js.br +0 -0
- package/web/chunk-zd2j189j.js.gz +0 -0
- package/web/chunk-zfgpq4n4.js +0 -120
- package/web/chunk-zfgpq4n4.js.br +0 -0
- package/web/chunk-zfgpq4n4.js.gz +0 -0
- package/web/chunk-zgas56xw.js +0 -1
- package/web/chunk-zgas56xw.js.br +0 -0
- package/web/chunk-zgas56xw.js.gz +0 -0
- package/web/chunk-zkfepf91.js +0 -1
- package/web/chunk-zkfepf91.js.br +0 -0
- package/web/chunk-zkfepf91.js.gz +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ke,v,o,ee,_,i,r,er,ie,dt,$n,ua,Qa,wl,kl,p,e,n,de,H,d,Cl,Sl,Ja,Wt,Zs,Tl,El,s,Gt,nr,le,Bn,ar,xt,Z,ge,Mt,Sn,fr,hr,ma,Fn,_t,pt,$e,fa,gr,ha,ga,tt,we,Nt,ye,Be,zn,mt,Un,ya,pe,oe,nt,va,ve,Ae,pn,Se,jr,is,w,os,l,je,x,V,te,xr,Yt,ue,wt,ot,Me,Ne,Re,qe,se,z,Ot,Vr,Js,Zt,Qe,en,ke,or,st,ii,ft,xa,Bi,ne,W,us,kt,Fi,ds,ps,Wr,ms,oi,si,Xt,zi,hs,gs,Nl,tn,li,Pl,ys,Gr,Ui}from"./chunk-qjg6dw46.js";var xn=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],rt=s("bell",xn);var bn=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],lt=s("chevron-left",bn);var vn=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],ct=s("cloud",vn);var hn=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],ut=s("hard-drive",hn);var yn=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],Le=s("network",yn);var Nn=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Ge=s("save",Nn);var wn=[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]],gt=s("shield-off",wn);var kn=[{value:"system",label:"跟随系统",icon:e(gr,{})},{value:"light",label:"浅色",icon:e(ya,{})},{value:"dark",label:"深色",icon:e(ha,{})}];function bt(){let t=w(),a=os(),u=kl();return n(ne,{title:"外观",description:"仅保存在当前浏览器本地",children:[e(W,{title:"主题模式",description:"切换浅色、深色或跟随系统外观",children:e(zi,{value:t.preference,onChange:jr,options:kn})}),e(W,{title:"主题风格",description:"选择宿主默认或由已启用插件提供的视觉主题",children:e(Xt,{value:t.themeID,onValueChange:is,groups:[{options:a.map((c)=>({value:c.id,label:c.label,description:c.description}))}],className:"w-48"})}),u.canInstall&&e(W,{title:"桌面应用",description:"将 Basalt 安装为独立窗口应用,可从桌面或任务栏直接启动",children:n(x,{size:"sm",onClick:()=>u.install().catch((c)=>z(c,"安装应用失败")),children:[e(ma,{className:"size-3.5"}),"安装应用"]})})]})}function vt(){let t=ie(ua),[a,u]=r(Qa),[c,y]=r(!1),C=i(!1);o(()=>{C.current=!0;let k=()=>u(Qa());return window.addEventListener("focus",k),document.addEventListener("visibilitychange",k),()=>{C.current=!1,window.removeEventListener("focus",k),document.removeEventListener("visibilitychange",k)}},[]);let B=async(k)=>{y(!0);try{let P=await wl(k);if(C.current)u(P)}catch(P){if(C.current)z(P,"无法更新系统通知")}finally{if(C.current)y(!1)}};return e(ne,{title:"系统通知",description:"页面保持打开时生效;开关仅保存在当前浏览器",children:e(W,{title:"完成与错误提醒",description:a==="unsupported"?"当前浏览器或访问方式不支持系统通知,请使用支持通知的浏览器,并通过 HTTPS 或 localhost 访问":a==="denied"?"浏览器已阻止通知,请在网站设置中允许通知,回到此页后再开启":t&&a==="granted"?"模型工作完成或运行出错时发送;点击通知可回到对应会话":"开启后在模型工作完成或运行出错时发送;首次开启需要浏览器授权",children:e(kt,{label:"模型工作完成或出错时发送系统通知",checked:t&&a==="granted",disabled:c||a==="unsupported",onCheckedChange:(k)=>void B(k)})})})}function ht(t){let a=ie(t.conn.state),u=Ui[a.status];return e(ne,{title:"已保存的服务器连接",description:"保存在当前浏览器中的服务器地址与设备凭证",action:n(x,{size:"sm",onClick:t.onAddServer,children:[e(we,{className:"size-3.5"}),"添加服务器"]}),children:t.servers.map((c)=>{let y=c.id===t.server.id;return e(W,{title:n("span",{className:"flex items-center gap-2",children:[e("span",{className:"truncate",children:$n(c)}),y&&n("span",{className:"inline-flex items-center gap-1.5 font-normal text-xs text-dim",children:[e("span",{className:d("size-1.5 rounded-full",u.dot)}),u.label]})]}),description:e("span",{className:"font-mono",children:c.url}),children:y?n(x,{size:"sm",variant:"danger-ghost",onClick:t.onRemoveServer,children:[e(pe,{className:"size-3.5"}),"移除"]}):e(x,{size:"sm",onClick:()=>t.onServer(c.id),children:"切换"})},c.id)})})}function yt(){return n(p,{children:[n(ne,{title:"全局",description:"当前浏览器前端快捷键",children:[e(W,{title:"搜索与命令面板",description:"快速跳转会话、项目或执行常用操作",children:e(je,{children:"mod+k"})}),e(W,{title:"收起 / 展开侧栏",description:"在完整侧栏与窄图标栏之间切换",children:e(je,{children:"alt+1"})}),e(W,{title:"新建聊天",description:"立即回到新会话输入页",children:e(je,{children:"mod+shift+o"})})]}),n(ne,{title:"对话输入",children:[e(W,{title:"发送消息",children:e(je,{children:"Enter"})}),e(W,{title:"换行",children:e(je,{children:"Shift+Enter"})})]})]})}var St=["B","KB","MB","GB","TB"];function j(t){let a=t,u=0;while(a>=1024&&u<St.length-1)a/=1024,u++;let c=u===0?0:a>=100?0:a>=10?1:2;return`${a.toFixed(c)} ${St[u]}`}function Ct({conn:t,server:a}){w();let u=a?.id??t.server.id,c=ie(tn(u)),[y,C]=r(!1),[B,D]=r();o(()=>{let P=new AbortController;return t.request("/api/search/settings",{signal:P.signal}).then((g)=>{if(!P.signal.aborted)tn(u).set(g.status)}).catch(()=>{if(!P.signal.aborted)D("无法读取历史搜索设置,请重新打开设置重试")}),()=>P.abort()},[t,u]);async function k(){if(y)return;C(!0),D(void 0);try{let P=await t.request("/api/search/rebuild",{method:"POST"});tn(u).set(P)}catch(P){D(P instanceof Error?P.message:"无法重建历史搜索索引,请重试")}finally{C(!1)}}return n(ne,{title:"历史搜索",children:[e(W,{title:"搜索索引",description:n("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-0.5",children:[e(li,{status:c,showEnable:!1,className:"py-0 shrink-0"}),c&&n("span",{children:["体积 ",j(c.bytes)," / 预算 ",j(c.budget)]})]}),children:e(x,{disabled:y||!c||c.state==="rebuilding",loading:y,onClick:()=>{k().catch(()=>{return})},children:"重建索引"})}),c?.state==="rebuilding"&&e("div",{className:l("surface.subtle","space-y-3 border-line bg-raised/30 p-3.5"),children:n("div",{className:"flex items-center justify-between text-xs text-dim",children:[e("span",{children:"正在重建索引…"}),e("code",{className:l("markdown.inlineCode"),children:c.total>0?`${Math.round(c.indexed/c.total*100)}%`:"0%"})]})}),B&&e("p",{role:"alert",className:"p-4 text-sm text-danger",children:B})]})}var He=new WeakMap,Cn={assistant:"bg-accent",tool:"bg-warning",user:"bg-success",run:"bg-ink/50",compaction:"bg-danger",notice:"bg-dim",notice_pending:"bg-faint"};function be(t){return e("span",{className:d("font-mono text-xs tabular-nums text-dim",t.className),children:t.children})}function Pt(t){return e(W,{title:n("span",{className:"flex items-center gap-2",children:[e("span",{children:t.title}),t.subtitle&&e("span",{className:"font-mono text-[11px] font-normal text-faint",children:t.subtitle})]}),description:e("span",{className:"font-mono break-all text-dim",children:t.path}),children:e(Ot,{text:t.path,label:"复制路径",size:"icon-sm"})})}function Ve(t){return e("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-raised",children:e("div",{className:d("h-full rounded-full transition-all duration-300",t.colorClass??"bg-accent"),style:{width:`${Math.max(t.percent>0?1:0,t.percent)}%`}})})}function Je(t,a){if(a<=0||t<=0)return"0%";let u=t/a*100;if(u<0.1)return"<0.1%";let c=u>=10?1:2;return`${u.toFixed(c)}%`}function Tt(t){if(!t)return"—";return new Date(t).toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}function Rt(t){return t.database.size+t.database.walSize+t.database.shmSize}function Pn(t){let{table:a,totalDbBytes:u}=t,c=a.bytes??0,y=u>0?Math.min(100,c/u*100):0;return n("div",{className:"space-y-1",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-2",children:[e("code",{className:l("markdown.inlineCode"),children:a.name}),a.withoutRowid&&e("span",{className:l("control.badge","border border-line bg-raised/40 px-2 py-0.5 text-xs"),children:"WITHOUT ROWID"}),a.indexes!==void 0&&a.indexes>0&&n("span",{className:"rounded-md bg-raised/50 px-1.5 py-0.5 font-mono text-[10.5px] text-faint",children:[a.indexes," 索引"]}),a.pages!==void 0&&n("span",{className:"font-mono text-[11px] text-faint tabular-nums",children:[a.pages.toLocaleString()," 页"]})]}),n("div",{className:"flex shrink-0 items-center gap-3 font-mono tabular-nums",children:[n("span",{className:"text-ink",children:[a.rows.toLocaleString()," 行"]}),a.bytes!==void 0&&n("span",{className:"text-dim",children:[j(c)," ",n("span",{className:"text-[11px] text-faint",children:["(",Je(c,u),")"]})]})]})]}),a.bytes!==void 0&&u>0&&e(Ve,{percent:y})]})}function zt(t){w();let[a,u]=r(()=>He.get(t.conn)),[c,y]=r(),[C,B]=r(!1),[D,k]=r(!0),[P,g]=r(!0),[M,T]=r(!1),I=v(async()=>{B(!0);try{let f=await t.conn.storage();if(He.set(t.conn,f),u(f),f.search)tn(t.server?.id??t.conn.server.id).set(f.search);y(void 0)}catch(f){y(nt(f))}finally{B(!1)}},[t.conn,t.server?.id]);o(()=>{I()},[I]);async function O(){if(!a)return;let f=P?a.database.reclaimableBytes:0,K=D||P?a.database.walSize:0,q=f+K,J=[];if(P)J.push("VACUUM 数据库");if(D)J.push("截断 WAL");if(!await Qe({title:"确认清理数据库?",description:`将${J.join("并")},预计回收 ${j(q)}。不会删除会话、消息或设备。大库上 VACUUM 可能要几秒,期间写入会等待。`,action:"开始清理"}))return;T(!0);try{let Q=await t.conn.compactStorage({checkpoint:D,vacuum:P}),ae=Rt(Q.before),fe=Rt(Q.after),Ce=Math.max(0,ae-fe);He.set(t.conn,Q.after),u(Q.after);let Ee=Ce>0?"清理完成":"清理完成,没有可回收的空间";se.success(Ee,{description:`数据库 ${j(ae)} → ${j(fe)}`})}catch(Q){z(Q,"清理失败")}finally{T(!1)}}let L=n(x,{size:"sm",variant:"ghost",onClick:()=>void I(),loading:C,children:[e(ye,{className:"size-3.5"}),"刷新"]});if(!a)return e(ne,{title:"数据库",action:L,children:e(W,{title:c?"无法读取数据库信息":"正在读取数据库信息…",description:c})});let{database:m,analytics:h}=a,G=m.size+m.walSize+m.shmSize,S=Math.max(0,m.size-m.reclaimableBytes),R=m.reclaimableBytes+m.walSize,A=m.pageCount>0?(m.pageCount-m.freelistCount)/m.pageCount*100:100,N=!m.integrity||m.integrity.toLowerCase()==="ok",E=!D&&!P,U=[...a.tables].sort((f,K)=>(K.bytes??0)-(f.bytes??0)||K.rows-f.rows),b=(h?.totalBodyBytes??0)+(h?.totalRawBytes??0),F=(h?.mainSessionCount??0)+(h?.subSessionCount??0);return n(p,{children:[n(ne,{title:"存储总览",action:L,unboxed:!0,children:[n("div",{className:"auto-grid gap-3",children:[n("div",{className:"rounded-2xl border border-line bg-panel p-4",children:[n("div",{className:"flex items-center justify-between gap-2 text-xs text-faint",children:[e("span",{className:"truncate",children:"数据库占用"}),e(hr,{className:"size-3.5 shrink-0"})]}),e("div",{className:"mt-1.5 font-mono text-xl font-semibold tabular-nums text-ink",children:j(G)}),n("div",{className:"mt-1 font-mono text-[11px] text-dim",children:["主库 ",j(m.size)," · WAL ",j(m.walSize)]})]}),n("div",{className:"rounded-2xl border border-line bg-panel p-4",children:[n("div",{className:"flex items-center justify-between gap-2 text-xs text-faint",children:[e("span",{className:"truncate",children:"数据目录"}),e(ut,{className:"size-3.5 shrink-0"})]}),e("div",{className:"mt-1.5 font-mono text-xl font-semibold tabular-nums text-ink",children:j(a.dataBytes)}),n("div",{className:"mt-1 text-[11px] text-dim",children:["共 ",a.entries.length," 项"]})]}),n("div",{className:"rounded-2xl border border-line bg-panel p-4",children:[n("div",{className:"flex items-center justify-between gap-2 text-xs text-faint",children:[e("span",{className:"truncate",children:"可回收空间"}),e(Bn,{className:"size-3.5 shrink-0"})]}),e("div",{className:"mt-1.5 font-mono text-xl font-semibold tabular-nums text-ink",children:j(R)}),n("div",{className:"mt-1 font-mono text-[11px] text-dim",children:["利用率 ",A.toFixed(1),"% · ",m.freelistCount," 空页"]})]}),n("div",{className:"rounded-2xl border border-line bg-panel p-4",children:[n("div",{className:"flex items-center justify-between gap-2 text-xs text-faint",children:[e("span",{className:"truncate",children:"完整性"}),e(Un,{className:"size-3.5 shrink-0"})]}),e("div",{className:"mt-1.5 flex items-center gap-2",children:e(ot,{tone:N?"success":"danger",children:N?"正常 (OK)":"异常"})}),n("div",{className:"mt-1.5 font-mono text-[11px] text-dim",children:["SQLite ",m.sqliteVersion??"3.x"," · v",m.schemaVersion]})]})]}),G>0&&n("div",{className:"rounded-2xl border border-line bg-panel p-4",children:[n("div",{className:"mb-2 flex flex-wrap items-center justify-between gap-2 text-xs",children:[e("span",{className:"font-medium text-ink",children:"物理构成"}),n("span",{className:"font-mono text-faint tabular-nums",children:[m.pageCount.toLocaleString()," 页 × ",j(m.pageSize)]})]}),n("div",{className:"flex h-2.5 w-full overflow-hidden rounded-full bg-raised gap-0.5",children:[S>0&&e("div",{className:"h-full bg-accent transition-all duration-300",style:{width:`${S/G*100}%`},title:`数据页: ${j(S)}`}),m.reclaimableBytes>0&&e("div",{className:"h-full bg-warning transition-all duration-300",style:{width:`${m.reclaimableBytes/G*100}%`},title:`空闲页: ${j(m.reclaimableBytes)}`}),m.walSize>0&&e("div",{className:"h-full bg-ink/40 transition-all duration-300",style:{width:`${m.walSize/G*100}%`},title:`WAL: ${j(m.walSize)}`}),m.shmSize>0&&e("div",{className:"h-full bg-faint transition-all duration-300",style:{width:`${m.shmSize/G*100}%`},title:`SHM: ${j(m.shmSize)}`})]}),n("div",{className:"mt-2.5 flex flex-wrap items-center gap-x-5 gap-y-1.5 text-xs text-dim",children:[n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-accent"}),"数据页 ",e(be,{children:j(S)})]}),n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-warning"}),"空闲页 ",e(be,{children:j(m.reclaimableBytes)})]}),n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-ink/40"}),"WAL ",e(be,{children:j(m.walSize)})]}),n("span",{className:"inline-flex items-center gap-1.5",children:[e("span",{className:"size-2 rounded-full bg-faint"}),"SHM ",e(be,{children:j(m.shmSize)})]})]})]})]}),n(ne,{title:"存储路径",children:[e(Pt,{title:"主数据库",subtitle:m.lastModified?ft(m.lastModified):void 0,path:a.databasePath}),e(Pt,{title:"数据目录",path:a.dataDir})]}),e(Ct,{conn:t.conn,server:t.server}),h&&n(ne,{title:"会话与日志",children:[e(W,{title:"会话统计",description:`${h.projectCount} 个项目 · ${F.toLocaleString()} 个会话`,children:n("div",{className:"flex flex-wrap items-center gap-1.5 font-mono text-xs",children:[n("span",{className:"rounded-md bg-raised px-2 py-0.5 text-ink",children:["主会话 ",h.mainSessionCount.toLocaleString()]}),n("span",{className:"rounded-md bg-raised px-2 py-0.5 text-dim",children:["子代理 ",h.subSessionCount.toLocaleString()]}),h.forkedSessionCount>0&&n("span",{className:"rounded-md bg-raised px-2 py-0.5 text-dim",children:["分叉 ",h.forkedSessionCount.toLocaleString()]}),h.automationSessionCount>0&&n("span",{className:"rounded-md bg-raised px-2 py-0.5 text-dim",children:["自动化 ",h.automationSessionCount.toLocaleString()]})]})}),e(W,{title:"日志载荷",children:e(be,{children:`body ${j(h.totalBodyBytes)} · raw ${j(h.totalRawBytes)}`})}),e(W,{title:"日志记录",description:h.oldestEntryTime?`${Tt(h.oldestEntryTime)} — ${Tt(h.newestEntryTime)}`:void 0,children:e(be,{children:`${h.totalEntries.toLocaleString()} 条${h.compactionCount>0?` · ${h.compactionCount} 次压缩`:""}`})}),h.entryTypes.length>0&&n("div",{className:"p-4",children:[n("div",{className:"mb-3 flex items-center justify-between text-xs",children:[e("span",{className:"font-medium text-ink",children:"日志类型分布"}),e("span",{className:"font-mono text-faint",children:j(b)})]}),e("div",{className:"space-y-2.5",children:h.entryTypes.map((f)=>{let K=f.bodyBytes+f.rawBytes,q=Cn[f.type]??"bg-dim",J=b>0?Math.min(100,K/b*100):0,X=f.count>0?Math.round(K/f.count):0;return n("div",{className:"space-y-1",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex items-center gap-2",children:[e("span",{className:d("size-2 rounded-full",q)}),e("span",{className:"font-mono font-medium text-ink",children:f.type}),n("span",{className:"font-mono text-[11px] text-faint",children:[j(X),"/条"]})]}),n("div",{className:"flex items-center gap-3 font-mono tabular-nums",children:[n("span",{className:"text-ink",children:[f.count.toLocaleString()," 条"]}),n("span",{className:"text-dim",children:[j(K)," ",n("span",{className:"text-[11px] text-faint",children:["(",Je(K,b),")"]})]})]})]}),e(Ve,{percent:J,colorClass:q})]},f.type)})})]})]}),e(ne,{title:"数据表",children:e("div",{className:"p-4 space-y-2.5",children:U.map((f)=>e(Pn,{table:f,totalDbBytes:m.size},f.name))})}),h&&h.pluginNamespaces.length>0&&e(ne,{title:"插件存储",children:e("div",{className:"grid grid-cols-1 gap-x-10 gap-y-2.5 p-4 md:grid-cols-2",children:h.pluginNamespaces.map((f)=>n("div",{className:"flex items-center justify-between gap-3 text-xs",children:[n("span",{className:"flex min-w-0 items-center gap-2",children:[e(nr,{className:"size-3.5 shrink-0 text-faint"}),e("span",{className:"truncate font-mono font-medium text-ink",children:f.namespace}),f.migrationVersion!==void 0&&n("span",{className:"rounded bg-raised px-1.5 py-0.5 font-mono text-[10.5px] font-normal text-faint",children:["v",f.migrationVersion]})]}),n("div",{className:"flex shrink-0 items-center gap-3 font-mono tabular-nums text-xs",children:[n("span",{className:f.keys>0?"text-dim":"text-faint/50",children:[f.keys," 键"]}),e("span",{className:f.bytes>0?"font-medium text-ink":"text-faint/50",children:j(f.bytes)})]})]},f.namespace))})}),e(ne,{title:"引擎参数 (PRAGMA)",children:e("div",{className:"grid grid-cols-1 gap-x-10 gap-y-2.5 p-4 text-xs md:grid-cols-2",children:[{label:"内核版本",value:`SQLite ${m.sqliteVersion??"3.x"}`},{label:"忙锁超时",value:`${m.busyTimeout??5000}ms`},{label:"字符编码",value:m.encoding??"UTF-8"},{label:"单页大小",value:j(m.pageSize)},{label:"Schema 版本",value:`v${m.schemaVersion}`},{label:"总页数",value:`${m.pageCount.toLocaleString()} 页`},{label:"日志模式",value:m.journalMode.toUpperCase()},{label:"页缓存",value:m.cacheSizeBytes?j(m.cacheSizeBytes):"默认"},{label:"同步级别",value:m.synchronous??"FULL"},{label:"空闲页",value:`${m.freelistCount.toLocaleString()} 页 (${j(m.reclaimableBytes)})`},{label:"外键约束",value:m.foreignKeys!==!1?"ON":"OFF"},{label:"自动清理",value:m.autoVacuum??"NONE"}].map((f)=>n("div",{className:"flex items-center justify-between gap-3",children:[e("span",{className:"text-dim",children:f.label}),e(be,{className:"text-ink",children:f.value})]},f.label))})}),e(ne,{title:"数据目录明细",children:n("div",{className:"p-4 space-y-2.5",children:[n("div",{className:"mb-3 flex items-center justify-between text-xs",children:[e("span",{className:"font-mono text-dim break-all",children:a.dataDir}),n("div",{className:"flex shrink-0 items-center gap-3 font-mono text-xs",children:[n("span",{className:"text-dim",children:["共 ",a.entries.length," 项"]}),e("span",{className:"font-medium text-ink",children:j(a.dataBytes)})]})]}),a.entries.map((f)=>{let K=a.dataBytes>0?f.bytes/a.dataBytes*100:0;return n("div",{className:"space-y-1",children:[n("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs",children:[n("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-2",children:[f.kind==="directory"?e(pt,{className:"size-3.5 shrink-0 text-accent"}):e(_t,{className:"size-3.5 shrink-0 text-faint"}),e("span",{className:"font-mono font-medium text-ink",children:f.name}),n("span",{className:"font-mono text-[11px] text-faint",children:[f.kind==="directory"?`目录${f.files!==void 0?` · ${f.files.toLocaleString()} 个文件`:""}`:"文件",f.modified?` · ${ft(f.modified)}`:""]})]}),e("div",{className:"flex shrink-0 items-center gap-3 font-mono tabular-nums text-xs",children:n("span",{className:"text-dim",children:[j(f.bytes)," ",n("span",{className:"text-[11px] text-faint",children:["(",Je(f.bytes,a.dataBytes),")"]})]})})]}),a.dataBytes>0&&e(Ve,{percent:K})]},f.name)})]})}),n(ne,{title:"空间维护",children:[e(W,{title:"VACUUM 整理",description:`可回收 ${j(m.reclaimableBytes)}`,children:e(kt,{checked:P,onCheckedChange:g,label:"VACUUM 数据库",disabled:M})}),e(W,{title:"截断 WAL",description:`当前 ${j(m.walSize)}`,children:e(kt,{checked:D,onCheckedChange:k,label:"截断 WAL",disabled:M})}),e(W,{title:"执行清理",description:E?"请至少开启一项":`预计释放 ${j((P?m.reclaimableBytes:0)+(D||P?m.walSize:0))}`,children:e(x,{variant:"primary",size:"sm",onClick:()=>void O(),loading:M,disabled:E,children:"清理…"})})]})]})}var Tn=2000;function Bt(t){let a=ie(t.state),[u,c]=r(void 0),[y,C]=r(!1),[B,D]=r("idle"),[k,P]=r(void 0),[g,M]=r(""),T=i(!1),I=i(void 0),O=i(void 0),L=i(0),m=i(!1),h=v((N)=>{let E=T.current&&!N.pending;if(!T.current&&N.pending)M("");if(T.current=N.pending,c(N),N.error)P(N.error),D("error");else if(N.pending)D(N.awaitingInput?"awaiting_input":"authorizing");else if(E&&N.connected)D("success");else if(!N.connected)D("idle")},[]);o(()=>{if(a.status!=="open")return;let N=new AbortController,E=!1;return t.providerAuthStatus(N.signal).then((U)=>{if(!E)h(U)},()=>{}),()=>{E=!0,N.abort()}},[t,a.status,h]);let G=v(async()=>{C(!0),P(void 0),D("authorizing"),m.current=!1;try{let N=await t.startProviderAuth();if(h(N),N.authorizeURL)window.open(N.authorizeURL,"_blank","noopener,noreferrer")}catch(N){P(N instanceof Error?N.message:String(N)),D("error")}finally{C(!1)}},[t,h]);o(()=>{if(!u?.pending)return;let N=!1,E=()=>{if(m.current)return;I.current?.abort();let U=new AbortController;I.current=U,t.providerAuthStatus(U.signal).then((b)=>{if(N||U.signal.aborted)return;let F=T.current&&!b.pending;if(h(b),F&&b.connected)Vr(t).catch((f)=>z(f,"刷新模型列表失败"))},()=>{})};return O.current=setInterval(E,Tn),()=>{if(N=!0,O.current)clearInterval(O.current);I.current?.abort()}},[t,u?.pending,h]);let S=v(async()=>{if(!g.trim())return;C(!0),P(void 0),m.current=!0;let N=++L.current;I.current?.abort();try{let E=await t.completeProviderAuth({url:g.trim()});if(N!==L.current)return;h(E),M("")}catch(E){if(N!==L.current)return;P(E instanceof Error?E.message:String(E)),D("error")}finally{if(m.current=!1,N===L.current)C(!1)}},[t,g,h]),R=v(async()=>{C(!0),P(void 0);try{await t.logoutProvider(),h({providerID:"openai",connected:!1,pending:!1}),D("idle"),await Vr(t)}catch(N){P(N instanceof Error?N.message:String(N)),D("error")}finally{C(!1)}},[t,h]),A=v(()=>{D("idle"),P(void 0),M("")},[]);return{status:u,busy:y,phase:B,error:k,manualURL:g,setManualURL:M,start:G,submitManual:S,logout:R,reset:A}}function Dt(t){let{phase:a,busy:u}=t;if(t.connected)return n("div",{className:"flex items-center justify-between gap-3",children:[n("span",{className:"inline-flex items-center gap-1.5 text-xs text-green-400",children:[e("span",{className:"size-1.5 rounded-full bg-green-400"}),"已连接"]}),e(x,{variant:"ghost",className:"text-faint hover:text-red-400",disabled:u,onClick:t.onLogout,children:u?"正在断开…":"断开连接"})]});return n(H.div,{layout:!0,className:"flex flex-col gap-3",children:[(a==="idle"||a==="success"||a==="error")&&n("div",{className:"flex flex-wrap items-center gap-2",children:[e(x,{disabled:u,onClick:t.onStart,children:u?"正在启动…":"登录 ChatGPT"}),a==="error"&&e(x,{variant:"ghost",className:"text-faint",onClick:t.onRetry,children:"重试"})]}),a==="authorizing"&&n("p",{className:"text-xs text-faint",children:["请在浏览器中完成授权。",t.authorizeURL&&n(p,{children:["未自动打开?",e("a",{href:t.authorizeURL,target:"_blank",rel:"noopener noreferrer",className:"ml-1 text-accent hover:underline",children:"手动打开"})]})]}),a==="awaiting_input"&&n("form",{className:"flex flex-col gap-2",onSubmit:(c)=>{c.preventDefault(),t.onSubmitManual()},children:[e("label",{htmlFor:"provider-auth-callback",className:"text-xs text-faint",children:t.instructions??"粘贴浏览器完成授权后跳转的完整 URL"}),e("input",{id:"provider-auth-callback",type:"url",className:"h-9 rounded-lg border border-line bg-raised px-3 text-xs text-ink outline-none placeholder:text-faint focus:border-accent",placeholder:"http://localhost:1455/auth/callback?code=…",value:t.manualURL,onChange:(c)=>t.onManualURLChange(c.target.value)}),e(x,{type:"submit",disabled:u||!t.manualURL.trim(),children:u?"正在提交…":"完成登录"})]}),a==="error"&&t.error&&e(wt,{children:t.error})]})}function It(t){let a=Bt(t.conn),u=a.status?.connected??!1;return e(ne,{title:"ChatGPT 订阅",description:"使用 ChatGPT 账号登录,访问你的订阅所包含的模型。登录由服务端完成,凭据不会离开服务器。",children:e(H.div,{layout:!0,className:"flex flex-col gap-3",children:e(W,{title:u?"ChatGPT 账号":"连接 ChatGPT",description:u?`你好,${a.status?.displayName??"ChatGPT 用户"}`:"支持 ChatGPT Plus / Pro 订阅账号",children:e(Dt,{connected:u,phase:a.phase,busy:a.busy,error:a.error,authorizeURL:a.status?.authorizeURL,instructions:a.status?.instructions,manualURL:a.manualURL,onManualURLChange:a.setManualURL,onStart:()=>void a.start(),onSubmitManual:()=>void a.submitManual(),onLogout:()=>void a.logout(),onRetry:a.reset})})})})}function Et(t){w();let a=ee(),[u,c]=r(""),[y,C]=r(0),[B,D]=r(null),[k,P]=r({name:"",contextWindow:"",maxTokens:""}),[g,M]=r(!1),[T,I]=r(),O=(N)=>{D(N),P({name:N.name,contextWindow:N.contextWindow?Wt(N.contextWindow):"",maxTokens:N.maxTokens?Wt(N.maxTokens):""}),I(void 0)},L=async(N)=>{if(N?.preventDefault(),!B||g)return;I(void 0);let E=k.contextWindow.trim(),U=E?Ja(E):void 0;if(E&&U===void 0){I("上下文窗口格式无效(支持 128k、200k、1m 或正整数)");return}let b=k.maxTokens.trim(),F=b?Ja(b):void 0;if(b&&F===void 0){I("最大输出格式无效(支持 8k、16k、8192 或正整数)");return}M(!0);try{let f={...B,name:k.name.trim()||B.id,contextWindow:U,maxTokens:F};await t.onUpdateModel?.(B.id,f),D(null)}catch(f){I(f instanceof Error?f.message:String(f))}finally{M(!1)}},m=u.trim().toLowerCase(),h=Js(t.provider.models).filter((N)=>`${N.id} ${N.name}`.toLowerCase().includes(m)),G=6,S=Math.max(1,Math.ceil(h.length/G)),R=Math.min(y,S-1),A=h.slice(R*G,(R+1)*G);return n(Me,{children:[n("div",{className:l("surface.card","flex min-w-0 items-center gap-1 pr-2 transition-colors hover:bg-raised/60"),children:[n(Ne,{className:"group/collapsible flex min-h-14 min-w-0 flex-1 items-center gap-3 py-2.5 pl-4 text-left focus-visible:-outline-offset-2",children:[e(qe,{className:"shrink-0 text-faint"}),n("span",{className:"min-w-0 flex-1",children:[n("span",{className:"flex items-center gap-2",children:[e("span",{className:"truncate text-sm font-medium text-ink",title:t.provider.name,children:t.provider.name}),!t.provider.apiKeyConfigured&&n("span",{className:"inline-flex shrink-0 items-center gap-1.5 text-xs text-warning",children:[e("span",{"aria-hidden":!0,className:"size-1.5 rounded-full bg-warning"}),"未设置 Key"]})]}),n("span",{className:"mt-0.5 block truncate text-xs text-dim",children:[t.provider.id!==t.provider.name&&n(p,{children:[t.provider.id," · "]}),t.provider.protocol," · ",t.provider.models.length," 个模型",t.provider.defaultContextWindow?` · 默认 ${Wt(t.provider.defaultContextWindow)}`:""]})]})]}),e("div",{className:"@md/panel:hidden",children:n(en,{className:"min-w-44 [&_[role=menuitem]]:min-h-11",trigger:e(x,{size:"icon",variant:"ghost",className:"size-11","aria-label":`${t.provider.name} 提供方操作`,children:e(Gt,{className:"size-5"})}),children:[e(ke,{icon:e(tt,{}),onSelect:t.onEdit,children:"编辑配置"}),e(ke,{icon:e(ye,{className:t.refreshing?"animate-spin":void 0}),disabled:t.refreshing,onSelect:t.onDiscover,children:t.refreshing?"正在刷新模型":"刷新模型"}),e(or,{}),e(ke,{icon:e(pe,{}),danger:!0,onSelect:t.onRemove,children:"移除提供方"})]})}),n("div",{className:"hidden shrink-0 items-center @md/panel:flex",children:[e(V,{label:"编辑",className:"size-10",onClick:t.onEdit,children:e(tt,{className:"size-4"})}),e(V,{label:"刷新模型",className:"size-10",disabled:t.refreshing,onClick:t.onDiscover,children:e(ye,{className:d("size-4",t.refreshing&&"animate-spin")})}),e(V,{label:"移除",className:"size-10 text-danger",onClick:t.onRemove,children:e(pe,{className:"size-4"})})]})]}),e("div",{children:e(Re,{children:n("div",{children:[n("div",{className:"relative my-3 min-w-0",children:[e(Be,{"aria-hidden":!0,className:"pointer-events-none absolute top-3 left-3 size-4 text-faint"}),e(te,{type:"search","aria-label":`搜索 ${t.provider.name} 的模型`,placeholder:"搜索模型",value:u,onChange:(N)=>{c(N.target.value),C(0)},className:"h-10 min-w-0 pl-9"})]}),n("div",{className:"overflow-hidden rounded-2xl border border-line bg-panel",children:[e("div",{className:"auto-grid animate-fade gap-x-2 p-2",children:A.map((N)=>{let E="";if(N.contextWindow){let U=N.contextWindow.toLocaleString(),b=N.maxTokens?` (最大输出: ${N.maxTokens.toLocaleString()})`:"";E=`上下文窗口: ${U} tokens${b}`}return n("button",{type:"button",onClick:()=>O(N),className:"group/model flex min-w-0 items-center justify-between gap-2 rounded-lg px-2.5 py-1.5 text-left transition-colors hover:bg-raised/80 focus-visible:outline-accent",children:[n("div",{className:"flex min-w-0 items-center gap-2",children:[e(st,{modelID:`${t.provider.id}/${N.id}`}),n("div",{className:"min-w-0",children:[e("div",{title:N.name,className:"truncate text-sm font-medium text-ink transition-colors group-hover/model:text-accent",children:N.name}),e("div",{title:N.id,className:"truncate font-mono text-[11px] text-faint",children:N.id})]})]}),n("div",{className:"flex shrink-0 items-center gap-1.5",children:[N.contextWindow?e("span",{className:"rounded bg-raised px-1.5 py-0.5 font-mono text-[10px] text-dim transition-colors group-hover/model:bg-panel",title:E,children:Wt(N.contextWindow)}):null,e(tt,{className:"size-3 text-faint opacity-0 transition-opacity group-hover/model:opacity-100"})]})]},N.id)})},`${m}:${R}`),h.length===0&&e("p",{className:"py-4 text-center text-sm text-faint",children:"没有匹配的模型"}),n("div",{className:"flex flex-wrap items-center justify-between gap-2 border-t border-line px-4 py-1",children:[n("span",{"aria-live":"polite",className:"text-xs text-faint",children:[h.length," 个模型 · ",R+1," / ",S," 页"]}),n("div",{className:"flex gap-1",children:[e(x,{size:"sm",variant:"ghost",disabled:R===0,onClick:()=>C(R-1),children:"上一页"}),e(x,{size:"sm",variant:"ghost",disabled:R+1>=S,onClick:()=>C(R+1),children:"下一页"})]})]})]})]})})}),e(Zt,{open:Boolean(B),onOpenChange:(N)=>{if(!g&&!N)D(null)},title:"配置模型参数",description:B?n("span",{className:"flex items-center gap-1.5 font-mono text-xs",children:[e("span",{children:t.provider.name}),e("span",{children:"/"}),e("span",{className:"font-semibold text-ink",children:B.id})]}):void 0,size:"md",footer:n(p,{children:[e("div",{className:"flex-1 max-sm:hidden"}),e(x,{disabled:g,onClick:()=>D(null),children:"取消"}),e(x,{type:"submit",form:a,loading:g,variant:"primary",children:"保存参数"})]}),children:n(Yt,{id:a,onSubmit:L,children:[e(ue,{label:"显示名称",hint:"在模型选择器与对话界面中显示的名称",children:(N)=>e(te,{id:N,value:k.name,onChange:(E)=>P({...k,name:E.target.value}),placeholder:B?.id})}),e(ue,{label:"上下文窗口 (Context Window)",hint:"单次会话最大可用上下文;留空继承提供方默认",children:(N)=>{let E=t.provider.defaultContextWindow?`继承提供方默认 (${Wt(t.provider.defaultContextWindow)})`:"继承系统默认 (300k)";return n("div",{className:"space-y-1.5",children:[e(te,{id:N,value:k.contextWindow,onChange:(U)=>P({...k,contextWindow:U.target.value}),placeholder:E}),n("div",{className:"flex flex-wrap items-center gap-1.5 pt-0.5",children:[e("span",{className:"text-[11px] text-faint",children:"常用:"}),["128k","200k","500k","1m","2m"].map((U)=>e("button",{type:"button",onClick:()=>P((b)=>({...b,contextWindow:U})),className:d("rounded px-1.5 py-0.5 font-mono text-[11px] transition-colors",k.contextWindow.toLowerCase()===U?"bg-accent/20 font-medium text-accent":"bg-raised text-dim hover:bg-raised/80 hover:text-ink"),children:U},U)),k.contextWindow&&e("button",{type:"button",onClick:()=>P((U)=>({...U,contextWindow:""})),className:"ml-1 text-[11px] text-faint transition-colors hover:text-ink",children:"清空(继承)"})]})]})}}),e(ue,{label:"最大输出 (Max Tokens)",hint:"单次响应最大生成的 Token 数量;留空继承提供方默认",children:(N)=>{let E=t.provider.defaultMaxTokens?`继承提供方默认 (${Wt(t.provider.defaultMaxTokens)})`:"继承系统默认 (64k)";return n("div",{className:"space-y-1.5",children:[e(te,{id:N,value:k.maxTokens,onChange:(U)=>P({...k,maxTokens:U.target.value}),placeholder:E}),n("div",{className:"flex flex-wrap items-center gap-1.5 pt-0.5",children:[e("span",{className:"text-[11px] text-faint",children:"常用:"}),["16k","32k","64k","128k"].map((U)=>e("button",{type:"button",onClick:()=>P((b)=>({...b,maxTokens:U})),className:d("rounded px-1.5 py-0.5 font-mono text-[11px] transition-colors",k.maxTokens.toLowerCase()===U?"bg-accent/20 font-medium text-accent":"bg-raised text-dim hover:bg-raised/80 hover:text-ink"),children:U},U)),k.maxTokens&&e("button",{type:"button",onClick:()=>P((U)=>({...U,maxTokens:""})),className:"ml-1 text-[11px] text-faint transition-colors hover:text-ink",children:"清空(继承)"})]})]})}}),e(wt,{children:T})]})})]})}function At(t){return w(),n(p,{children:[e(It,{conn:t.conn}),e(Mn,{...t})]})}var Pe=new WeakMap;function Lt(){return{id:"",name:"",protocol:"openai-completions",baseUrl:"https://api.openai.com/v1",apiKey:"",models:"",defaultContextWindow:"",defaultMaxTokens:""}}function Mn(t){w();let a=ie(t.conn.state),u=ee(),[c,y]=r(!1),[C,B]=r(()=>Pe.get(t.conn)??null),[D,k]=r(),[P,g]=r(!1),[M,T]=r(),[I,O]=r(),[L,m]=r(Lt),h=ys(t.conn).kind==="form",G=()=>{y(!1),Gr(t.conn,"form",{kind:"provider"})};o(()=>()=>Gr(t.conn,"form",{kind:"provider"}),[t.conn]),o(()=>{let b=Pe.get(t.conn);if(b)B(b);if(a.status!=="open")return;let F=!1;return t.conn.modelProviders().then((f)=>{if(Pe.set(t.conn,f),!F)B(f)}).catch((f)=>{if(!F)k(f instanceof Error?f.message:String(f))}),()=>{F=!0}},[t.conn,a.status]);let S=async()=>{if(P)return;k(void 0);let b=L.defaultContextWindow.trim(),F=b?Ja(b):void 0;if(b&&F===void 0){k("默认上下文窗口格式无效(支持 128k、200k、1m 或正整数)");return}let f=L.defaultMaxTokens.trim(),K=f?Ja(f):void 0;if(f&&K===void 0){k("默认最大输出格式无效(支持 8k、16k、8192 或正整数)");return}g(!0);try{let q={name:L.name.trim()||L.id.trim(),protocol:L.protocol,baseUrl:L.baseUrl,apiKey:L.apiKey,models:L.models,defaultContextWindow:F,defaultMaxTokens:K},J=await t.conn.saveModelProvider(L.id.trim(),q);B((X)=>{let Q=[...(X??[]).filter((ae)=>ae.id!==J.id),J];return Pe.set(t.conn,Q),Q}),await Vr(t.conn),y(!1),Gr(t.conn,"form",{kind:"saved",providerID:J.id,models:J.models.length})}catch(q){k(q instanceof Error?q.message:String(q))}finally{g(!1)}},R=(b)=>{O(b.id),m({id:b.id,name:b.name,protocol:b.protocol,baseUrl:b.baseUrl,apiKey:"",defaultContextWindow:b.defaultContextWindow?Wt(b.defaultContextWindow):"",defaultMaxTokens:b.defaultMaxTokens?Wt(b.defaultMaxTokens):"",models:Zs(b.models)}),k(void 0),y(!0)},A=()=>{O(void 0),m(Lt())},N=async(b)=>{k(void 0),T(b.id);try{let F=await t.conn.discoverModelProvider(b.id);B((f)=>f?.map((K)=>K.id===F.id?F:K)??[F]),await Vr(t.conn)}catch(F){k(F instanceof Error?F.message:String(F))}finally{T(void 0)}},E=async(b)=>{if(!await Qe({title:`移除提供方「${b.name}」?`,description:"服务端会删除保存的 API key,并恢复同名内置提供方(如果存在)。",action:"移除",danger:!0}))return;try{await t.conn.removeModelProvider(b.id),B((f)=>f?.filter((K)=>K.id!==b.id)??null),await Vr(t.conn)}catch(f){k(f instanceof Error?f.message:String(f))}},U=async(b,F,f)=>{let K=b.models.map((X)=>X.id===F?f:X),q={name:b.name,protocol:b.protocol,baseUrl:b.baseUrl,apiKey:"",defaultContextWindow:b.defaultContextWindow,defaultMaxTokens:b.defaultMaxTokens,models:Zs(K)},J=await t.conn.saveModelProvider(b.id,q);B((X)=>{let Q=X?.map((ae)=>ae.id===J.id?J:ae)??[J];return Pe.set(t.conn,Q),Q}),await Vr(t.conn)};return n(ne,{title:"模型提供方",description:"配置提供方与模型目录",unboxed:!0,action:e(V,{className:"size-10",label:"添加提供方","data-tour":"add-provider",disabled:a.status!=="open",onClick:()=>{A(),k(void 0),y(!0),Gr(t.conn,"provider",{kind:"form"})},children:e(we,{className:"size-4"})}),children:[e(de,{initial:!1,children:(C??[]).map((b)=>e(H.div,{...va,className:"overflow-hidden","data-tour-provider":b.id,children:e(Et,{provider:b,refreshing:M===b.id,onEdit:()=>R(b),onDiscover:()=>void N(b),onRemove:()=>void E(b),onUpdateModel:(F,f)=>U(b,F,f)})},b.id))}),C?.length===0&&e("div",{className:l("surface.emptyDashed","py-12"),children:e("p",{className:"text-sm text-dim",children:"暂无模型提供方,点击右上方按钮添加。"})}),!c&&D&&e("div",{className:"p-4",children:e(wt,{children:D})}),e(Zt,{open:c,onOpenChange:(b)=>{if(!P)if(b)y(!0);else G()},title:I?`编辑提供方:${I}`:"添加模型提供方",size:"lg",footer:n(p,{children:[e("div",{className:"flex-1 max-sm:hidden"}),e(x,{disabled:P,onClick:G,children:"取消"}),n(x,{type:"submit",form:u,loading:P,disabled:a.status!=="open","aria-label":P?"保存中":"保存提供方",children:[e(Ge,{className:"size-3.5"}),"保存提供方"]})]}),children:n(Yt,{id:u,onSubmit:(b)=>{b.preventDefault(),S()},children:[h&&n("div",{className:"rounded-lg bg-accent/8 px-3 py-2.5 text-xs leading-5 text-dim ring-1 ring-accent/25",children:[e("span",{className:"mr-1.5 font-medium text-ink tabular-nums",children:"3 / 4"}),"Provider ID 起个好记的名字(如 deepseek),协议和 Base URL 按服务商文档填,再填上 API key。模型列表留空会自动获取,最后点「保存提供方」。"]}),n("div",{className:"grid gap-4 sm:grid-cols-2",children:[e(ue,{label:"Provider ID",hint:"例如 openai、deepseek 或公司内部网关",children:(b)=>e(te,{id:b,value:L.id,disabled:Boolean(I),onChange:(F)=>m({...L,id:F.target.value}),placeholder:"openai"})}),e(ue,{label:"显示名称",hint:"不填就用 Provider ID",children:(b)=>e(te,{id:b,value:L.name,onChange:(F)=>m({...L,name:F.target.value}),placeholder:"OpenAI"})})]}),e(ue,{label:"协议",children:(b)=>e(Xt,{id:b,value:L.protocol,onValueChange:(F)=>m({...L,protocol:F}),groups:[{options:Cl.map((F)=>({value:F,label:Sl[F]}))}]})}),e(ue,{label:"Base URL",hint:"只填写协议端点,不要把 API key 放进 URL",children:(b)=>e(te,{id:b,type:"url",value:L.baseUrl,onChange:(F)=>m({...L,baseUrl:F.target.value}),placeholder:"https://api.example.com/v1"})}),e(ue,{label:"API key",hint:"留空表示保留已保存的 key;本地兼容服务可以留空",children:(b)=>e(te,{id:b,type:"password",value:L.apiKey,onChange:(F)=>m({...L,apiKey:F.target.value}),placeholder:"sk-…",autoComplete:"new-password"})}),n("div",{className:"grid gap-4 sm:grid-cols-2",children:[e(ue,{label:"默认上下文窗口",hint:"模型未单独指定时生效,例如 128k、200k、1m 或正整数",children:(b)=>e(te,{id:b,value:L.defaultContextWindow,onChange:(F)=>m({...L,defaultContextWindow:F.target.value}),placeholder:"300k"})}),e(ue,{label:"默认最大输出",hint:"单次回复生成上限,例如 16k、32k、64k 或正整数",children:(b)=>e(te,{id:b,value:L.defaultMaxTokens,onChange:(F)=>m({...L,defaultMaxTokens:F.target.value}),placeholder:"64k"})})]}),e(ue,{label:"模型列表",hint:"留空将从 Base URL 自动获取;也支持手动填写 model-id 或 model-id=显示名称 [上下文, 最大输出](如 claude-3-7-sonnet=Sonnet [200k]、deepseek-chat [64k, 8k])",children:(b)=>e(xr,{id:b,value:L.models,onChange:(F)=>m({...L,models:F.target.value}),rows:3,placeholder:"留空自动获取模型列表"})}),e(wt,{children:D})]})})]})}function Rn(t){return!(t.web?.some((u)=>u.kind==="tab")??!1)&&hs(t.id,"settings")}function Ft(t){let a={tools:[],commands:[],pages:[],routes:[],hooks:[],others:[]},u=new Map((t.web??[]).map((c)=>[c.id,c]));for(let c of t.registrations)switch(c.kind){case"tool":{a.tools.push(c.name);break}case"command":{let y=u.get(c.id)?.commandTitle??u.get(c.id)?.title??c.id;a.commands.push(y);break}case"web":{let y=u.get(c.id);if(y?.kind==="sidebar")a.pages.push(`侧栏: ${y.title}`);else if(y?.kind!=="command")a.pages.push(y?.title??c.id);break}case"route":{a.routes.push({method:c.method,path:c.path});break}case"websocket":{a.routes.push({method:"WS",path:c.path});break}case"hook":{a.hooks.push(c.name);break}case"policy":{a.others.push(`策略 ${c.id}`);break}case"history-resolver":{a.others.push("历史解析");break}}return a}function Ye(t){let a=new Map(t.map((g)=>[g.id,g])),u=new Map,c=new Map;for(let g of t){let M=(g.deps??[]).filter((T)=>T!==g.id);u.set(g.id,M);for(let T of M){let I=c.get(T)??[];if(!I.includes(g.id))I.push(g.id),c.set(T,I)}}let y=new Set;for(let[g,M]of u.entries())if(M.length>0)y.add(g);for(let[g,M]of c.entries())if(M.length>0)y.add(g);let C=[];for(let g of t)if(!y.has(g.id))C.push(g);let B=[],D=new Set;for(let g of y){let M=u.get(g)??[],T=c.get(g)??[],I=a.get(g);if(!I)continue;if(M.length===0&&T.length>0)B.push(I)}for(let g of y){let M=a.get(g);if(!M)continue;if(!(u.get(g)??[]).some((O)=>a.has(O))&&!B.some((O)=>O.id===g))B.push(M)}function k(g,M,T){D.add(g.id);let I=[...T,g.id],O=c.get(g.id)??[],L=[];for(let m of O){if(I.includes(m))continue;let h=a.get(m);if(h)L.push(k(h,M+1,I))}return{plugin:g,depth:M,depPath:I,children:L}}let P=B.map((g)=>k(g,0,[]));for(let g of y)if(!D.has(g)){let M=a.get(g);if(M)P.push(k(M,0,[]))}return{trees:P,standalones:C,depsMap:u,dependentsMap:c}}var Dn=2400;function In(t){let{plugin:a,busy:u,pending:c,reloaded:y,deps:C,offDeps:B,pluginMetadata:D,onSelect:k,onToggle:P,onConfigure:g}=t,M=D.get(a.id),T=M?.icon??Nt,I=a.status==="error",O=a.status==="disabled",L=!O&&Rn(a),m=M?.description??a.description??"",h=m;if(c)h=e("span",{className:"animate-pulse text-dim",children:O?"卸载中…":"装载中…"});else if(I)h=e("span",{className:"text-danger/85",children:a.error??"加载失败"});else if(y)h=e("span",{className:"text-success",children:"刚刚已重载"});else if(O&&B.length>0)h=`随 ${B.join("、")} 停用`;return e(Fi,{name:e("span",{className:d(I&&"text-danger"),children:a.id}),selectLabel:`查看插件 ${a.id}`,onSelect:()=>k(a),title:I?a.error:m,meta:`v${a.version}`,description:h,icon:e(T,{}),inactive:O,highlight:y,aside:C.length>0&&n("span",{className:"font-mono text-[10.5px] text-faint",title:"依赖的插件",children:["← ",C.join(" ")]}),actions:L&&e(V,{label:`${a.id} 设置`,size:"icon-sm",onClick:()=>g(a),children:e(mt,{className:"size-3.5"})}),toggle:{checked:!O,label:`启用 ${a.id}`,disabled:u,onCheckedChange:()=>P(a)}})}function $t(t){return n("li",{className:"flex h-8 items-center gap-2 bg-raised/30 px-4 font-mono text-[10.5px] text-faint uppercase tracking-wider",children:[t.label,e("span",{className:"text-faint/60",children:t.count})]})}function Ut(t){let{plugins:a,busy:u,pending:c,query:y,pluginMetadata:C,onSelect:B,onToggle:D,onConfigure:k}=t,P=_(()=>Ye(a),[a]),g=y.trim().toLowerCase(),M=i(new Map),T=i(new Set),[I,O]=r(new Set);o(()=>{let A=[];for(let E of a){if(M.current.has(E.id)&&E.webRevision&&M.current.get(E.id)!==E.webRevision)A.push(E.id);M.current.set(E.id,E.webRevision)}if(A.length===0)return;O((E)=>new Set([...E,...A]));let N=setTimeout(()=>{T.current.delete(N),O((E)=>new Set([...E].filter((U)=>!A.includes(U))))},Dn);T.current.add(N)},[a]),o(()=>{let A=T.current;return()=>{for(let N of A)clearTimeout(N)}},[]);let L=_(()=>[...!g?a:a.filter((N)=>N.id.toLowerCase().includes(g)||(N.description??"").toLowerCase().includes(g)||(C.get(N.id)?.description??"").toLowerCase().includes(g))].sort((N,E)=>N.id.localeCompare(E.id,"en")),[a,g,C]);if(L.length===0)return n("p",{className:"p-6 text-center text-dim text-sm",children:["没有匹配「",y.trim(),"」的插件"]});let m=new Map(a.map((A)=>[A.id,A.status])),h=L.filter((A)=>!A.builtin),G=L.filter((A)=>A.builtin),S=h.length>0&&G.length>0;function R(A){let N=P.depsMap.get(A.id)??[];return e("li",{children:e(In,{plugin:A,busy:u,pending:c===A.id,reloaded:I.has(A.id),deps:N,offDeps:N.filter((E)=>m.get(E)==="disabled"),pluginMetadata:C,onSelect:B,onToggle:D,onConfigure:k})},A.id)}return n("ul",{className:"divide-y divide-line",children:[S&&e($t,{label:"用户",count:h.length}),h.map(R),S&&e($t,{label:"内置",count:G.length}),G.map(R)]})}function Ht(){return new Map(Ae().map((t)=>[t.id,t.metadata]))}var Fe=Ht();pn(()=>{Fe=Ht()});var En={enabled:{label:"已启用",dot:"bg-success"},disabled:{label:"已禁用",dot:"bg-faint"},error:{label:"出错",dot:"bg-danger"}};function Ln(t){return!(t.web?.some((u)=>u.kind==="tab")??!1)&&hs(t.id,"settings")}function An(t){Se();let{plugin:a,depsMap:u,dependentsMap:c}=t,y=_(()=>Ft(a),[a]),C=a.status==="disabled",B=y.hooks.length>0||y.routes.length>0||y.others.length>0,D=y.pages.length>0||y.tools.length>0||y.commands.length>0,k=(u?.get(a.id)??a.deps??[]).filter((g)=>g!==a.id),P=c?.get(a.id)??[];return n("div",{className:"space-y-3 text-xs leading-5",children:[ve.errors.get(a.id)&&n("p",{role:"alert",className:"text-danger",children:["Web: ",ve.errors.get(a.id)]}),a.error&&n("div",{role:"alert",className:"rounded-xl bg-danger/8 p-3 text-xs leading-5 text-danger",children:[e("p",{className:"mb-1 font-medium font-sans",children:a.status==="enabled"?"重载失败,仍在运行上一版本":"插件加载异常"}),e("pre",{className:"whitespace-pre-wrap font-mono [overflow-wrap:anywhere]",children:a.error})]}),n(ps,{children:[k.length>0&&e(Wr,{label:"依赖",children:k.map((g)=>{let T=(t.plugins??[]).find((I)=>I.id===g)?.status==="disabled";return e("button",{type:"button",onClick:()=>t.onSelectPlugin?.(g),className:d(oi,"cursor-pointer transition-colors hover:text-ink",T&&"text-warning"),title:T?"依赖插件已停用,可能影响功能":"点击查看该插件",children:T?`${g}(未启用)`:g},g)})}),P.length>0&&e(Wr,{label:"被依赖",children:P.map((g)=>e("button",{type:"button",onClick:()=>t.onSelectPlugin?.(g),className:d(oi,"cursor-pointer transition-colors hover:text-ink"),title:"点击查看依赖此插件的下游插件",children:g},g))}),C?e("p",{className:"py-2.5 text-faint",children:"该插件当前处于停用状态,启用后接管对应功能与服务。"}):n(p,{children:[y.pages.length>0&&e(Wr,{label:"界面",children:y.pages.map((g)=>e(si,{children:g},g))}),y.tools.length>0&&e(Wr,{label:"工具",children:y.tools.map((g)=>e(si,{mono:!0,children:g},g))}),y.commands.length>0&&e(Wr,{label:"命令",children:y.commands.map((g)=>e(si,{children:g},g))}),B&&n(ms,{label:"接口",summary:[y.hooks.length>0&&`${y.hooks.length} 个钩子`,y.routes.length>0&&`${y.routes.length} 条路由`,y.others.length>0&&`${y.others.length} 项其他注册`].filter(Boolean).join(","),children:[y.hooks.length>0&&n("div",{className:"space-y-1.5",children:[e("span",{className:"text-[11px] text-faint",children:"生命周期事件钩子"}),e("div",{className:"flex flex-wrap gap-1.5",children:y.hooks.map((g)=>e("span",{className:d(oi,"font-mono text-[11px]"),children:g},g))})]}),y.routes.length>0&&n("div",{className:"space-y-1.5",children:[e("span",{className:"text-[11px] text-faint",children:"HTTP / WebSocket 路由"}),e("div",{className:"space-y-0.5 font-mono text-[11px] text-dim",children:y.routes.map((g)=>n("div",{className:"grid grid-cols-[3rem_minmax(0,1fr)] gap-2",children:[e("span",{className:"text-faint",children:g.method}),e("span",{className:"[overflow-wrap:anywhere]",children:g.path})]},`${g.method} ${g.path}`))})]}),y.others.length>0&&n("div",{className:"space-y-1.5",children:[e("span",{className:"text-[11px] text-faint",children:"其他注册"}),e("div",{className:"flex flex-wrap gap-1.5",children:y.others.map((g)=>e("span",{className:d(oi,"text-[11px]"),children:g},g))})]})]}),!D&&!B&&!a.error&&e("p",{className:"py-2.5 text-faint",children:"该插件没有向外部暴露界面或工具能力"})]})]}),t.failed&&e("p",{role:"alert",className:"text-xs text-danger",children:t.failed})]})}function Gn(){return e("div",{role:"status","aria-label":"正在加载",className:"divide-y divide-line",children:[0,1,2,3,4].map((t)=>n("div",{className:"flex h-13 items-center gap-3 px-4",children:[e("div",{className:"size-7 shrink-0 animate-pulse rounded-md bg-raised"}),e("div",{className:"h-3 w-20 animate-pulse rounded bg-raised"}),e("div",{className:"h-3 w-1/3 animate-pulse rounded bg-raised"})]},t))})}function jt({conn:t}){w(),Se();let[a,u]=r(()=>{let f=t.state.get();return f.pluginsLoaded?f.plugins:void 0}),[c,y]=r(""),[C,B]=r(),[D,k]=r(),[P,g]=r(""),[M,T]=r(),[I,O]=r("details"),[L,m]=r(null),h=i(0),G=i(!1),S=i({}),R=v(()=>{if(G.current)return;let f=++h.current;y(""),t.plugins().then(()=>{if(f===h.current)u(t.state.get().plugins)},(K)=>{if(f===h.current)y(nt(K))})},[t]);o(()=>{B(void 0);let f=t.state.get().plugins,K=t.state.subscribe((q)=>{if(q.plugins===f)return;f=q.plugins,u(q.plugins)});return R(),()=>{K(),h.current++,G.current=!1}},[R,t]);async function A(f,K){if(G.current)return;if(K){let Q=Date.now(),ae=S.current[f.id]??0;if(Q-ae<500)return;S.current[f.id]=Q}let q=++h.current;G.current=!0,B(f.id),k(void 0);let J=f.status==="disabled",X=f.id;try{if(K){if(await t.reloadPlugin(f.id),q===h.current)u(t.state.get().plugins);return}let Q=await t.plugins();if(q!==h.current)return;u(t.state.get().plugins);let ae=new Map(Q.map((Y)=>[Y.id,Y])),fe=[],Ce=new Set,Ee=new Set,We=(Y)=>{if(Ee.has(Y))return;if(Ce.has(Y))throw Error(`插件依赖存在循环:${Y}`);let ce=ae.get(Y);if(!ce)throw Error(`找不到插件依赖:${Y}`);if(Ce.add(Y),J){if(ce.status==="error")throw Error(`请先修复依赖插件 ${Y} 的加载错误`);for(let re of ce.deps??[])We(re)}else for(let re of Q)if(re.status!=="disabled"&&re.deps?.includes(Y))We(re.id);if(Ce.delete(Y),Ee.add(Y),J?ce.status!=="enabled":ce.status!=="disabled")fe.push(ce)};We(f.id);let it=fe.filter((Y)=>Y.id!==f.id);if(it.length>0){let Y=it.map((re)=>re.id).join("、");if(!await Qe({title:J?"同时启用依赖插件?":"同时禁用依赖此插件的插件?",description:J?`启用 ${f.id} 需要先启用:${Y}。是否继续?`:`${Y} 依赖 ${f.id},将先禁用这些插件,再禁用 ${f.id}。是否继续?`,action:J?"级联启用":"级联禁用",danger:!J}))return}for(let Y of fe){if(q!==h.current)return;X=Y.id,u((re)=>re?.map((_e)=>_e.id===Y.id?{..._e,status:J?"enabled":"disabled",error:void 0}:_e));let ce=await t.enablePlugin(Y.id,J);if(q!==h.current)return;if(u(t.state.get().plugins),ce.find((re)=>re.id===Y.id)?.status!==(J?"enabled":"disabled"))throw Error(`插件 ${Y.id} 未进入预期状态,请刷新后重试`)}}catch(Q){if(q!==h.current)return;let ae=K?"重载失败":`更新 ${X} 失败,后续操作已停止`;k({id:f.id,message:ae}),z(Q,ae);try{if(await t.plugins(),q===h.current)u(t.state.get().plugins)}catch(fe){if(q===h.current)y(`刷新插件状态失败:${nt(fe)}`)}}finally{if(q===h.current)G.current=!1,B(void 0)}}let N=_(()=>Ye(a??[]),[a]),E=M?a?.find((f)=>f.id===M):void 0,U=i(void 0);if(E)U.current=E;let b=E??U.current,F=a?`内置 ${a.filter((f)=>f.builtin).length},用户 ${a.filter((f)=>!f.builtin).length}`:"";return n("div",{className:"min-w-0 space-y-6",children:[n("section",{className:"min-w-0",children:[n("div",{className:"mb-2.5 flex flex-wrap items-end justify-between gap-3 px-0.5",children:[n("div",{className:"min-w-0 flex-1 basis-48",children:[e("h2",{className:"font-medium text-[13px] text-dim",children:"插件"}),e("p",{className:"mt-0.5 text-faint text-xs",children:F})]}),e(V,{label:"刷新",className:"size-10",disabled:C!==void 0,onClick:R,children:e(ye,{className:"size-4"})})]}),c&&n("div",{role:"alert",className:"mb-3 flex flex-wrap items-center gap-2 rounded-xl border border-line p-3",children:[n("p",{className:"min-w-0 flex-1 break-words text-danger text-sm",children:["无法读取插件:",c]}),e(x,{className:"h-10",onClick:R,children:"重试"})]}),n("div",{className:"relative mb-3 min-w-0",children:[e(Be,{"aria-hidden":!0,className:"pointer-events-none absolute top-3 left-3 size-4 text-faint"}),e(te,{type:"search","aria-label":"搜索插件",placeholder:"搜索插件",value:P,onChange:(f)=>g(f.target.value),className:"h-10 min-w-0 pl-9"})]}),e("div",{className:l("settings.groupBox"),children:!a?!c&&e(Gn,{}):e(Ut,{plugins:a,busy:C!==void 0,pending:C,query:P,pluginMetadata:Fe,onSelect:(f)=>{T(f.id),O("details")},onToggle:(f)=>void A(f,!1),onConfigure:(f)=>{T(f.id),O("settings")}})})]}),e(Zt,{open:Boolean(M),onOpenChange:(f)=>{if(!f)T(void 0),O("details")},size:"lg",title:b&&(I==="settings"?n("div",{className:"flex items-center gap-2",children:[n(x,{variant:"ghost",size:"sm",className:"h-7 px-1.5 text-xs text-dim hover:text-ink",onClick:()=>O("details"),children:[e(ar,{className:"mr-1 size-3.5"}),"返回详情"]}),n("span",{className:"font-semibold text-ink text-base",children:[b.id," 设置"]})]}):e(ds,{icon:(()=>{let f=Fe.get(b.id)?.icon??Nt;return e(f,{})})(),name:b.id,meta:[b.builtin?"内置":"用户插件",`v${b.version}`,b.webBundle&&"Web"]})),description:b&&(I==="settings"?void 0:e("span",{className:"mt-2 block leading-5.5",children:Fe.get(b.id)?.description??b.description})),footer:b&&(I==="settings"?e("div",{ref:m,className:"flex w-full flex-wrap items-center justify-end gap-2"}):n("div",{className:"flex w-full items-center justify-between gap-2 max-sm:[&>*]:flex-none",children:[n("div",{className:"inline-flex items-center gap-2.5 text-[13px] text-dim",children:[e(kt,{label:`启用 ${b.id}`,checked:b.status!=="disabled",disabled:C!==void 0,onCheckedChange:()=>void A(b,!1)}),e("span",{className:d(b.status==="error"&&"text-danger"),children:En[b.status].label})]}),n("div",{className:"flex items-center gap-1.5",children:[e(V,{label:"重载插件",disabled:C!==void 0||b.status==="disabled",onClick:()=>void A(b,!0),children:e(ye,{className:d("size-4",C===b.id&&"animate-spin")})}),Ln(b)&&b.status!=="disabled"&&n(x,{size:"sm",onClick:()=>O("settings"),children:[e(mt,{className:"size-3.5"}),e("span",{children:"设置"})]})]})]})),children:b&&(I==="settings"?e(Bi,{value:{footer:L},children:e("div",{className:"py-1",children:e(gs,{pluginID:b.id,viewID:"settings",connection:t,onClose:()=>{T(void 0),O("details")}})})}):e(An,{plugin:b,busy:C===b.id,failed:D?.id===b.id?D.message:void 0,plugins:a??[],depsMap:N.depsMap,dependentsMap:N.dependentsMap,onSelectPlugin:(f)=>{T(f),O("details")}}))})]})}var Te="__direct",Xe="__inherit";function Vt({conn:t}){w();let a=ie(t.state).status,[u,c]=r(),[y,C]=r(),[B,D]=r([]),[k,P]=r(),[g,M]=r(),T=i(void 0),I=v(async(S)=>{P("loading"),M(void 0);try{let R=await t.proxyConfiguration(S);if(S?.aborted)return;c(Ue(R)),C(Ue(R)),D(R.targets)}catch(R){if(!S?.aborted)M(R instanceof Error?R.message:String(R))}finally{if(!S?.aborted)P(void 0)}},[t]);o(()=>{let S=new AbortController;if(T.current=S,c(void 0),C(void 0),M(void 0),a==="open")I(S.signal);return()=>S.abort()},[a,I]);let O=(S)=>{c((R)=>R?S(R):R)},L=(S,R)=>{O((A)=>({...A,profiles:A.profiles.map((N)=>N.id===S?{...N,...R}:N)}))},m=async()=>{if(!u)return;let S=T.current;if(!S||S.signal.aborted)return;P("saving"),M(void 0);try{let R=await t.saveProxyConfiguration(u,S.signal);if(S.signal.aborted)return;c(Ue(R)),C(Ue(R)),D(R.targets)}catch(R){if(!S.signal.aborted)M(R instanceof Error?R.message:String(R))}finally{if(!S.signal.aborted)P(void 0)}},h=u&&y?JSON.stringify(u)!==JSON.stringify(y):!1,G=[{value:Te,label:"直接连接"},...u?.profiles.map((S)=>({value:S.id,label:S.name}))??[]];if(a!=="open")return e(ne,{title:"代理",description:"控制当前服务器发起的外发 HTTP 请求。",children:e(W,{title:"连接服务器后可配置代理",description:"代理设置保存在服务器上,连接后即可读取和保存。"})});if(!u)return e(ne,{title:"代理",description:"控制当前服务器发起的外发 HTTP 请求。",children:e(W,{title:g?"无法读取代理设置":"正在读取代理设置…",description:g?e("span",{className:"text-danger",children:g}):void 0,children:g&&e(x,{loading:k==="loading",onClick:()=>void I(T.current?.signal),children:"重新加载"})})});return n(Yt,{className:"gap-6",noValidate:!0,onSubmit:(S)=>{S.preventDefault(),m()},children:[e(ne,{title:"代理",description:"控制当前服务器发起的外发 HTTP 请求;本机回环地址始终直连。",children:e(W,{title:"默认线路",description:"没有单独分流的模型、订阅登录和程序更新使用这条线路。",children:e(Xt,{ariaLabel:"默认代理线路",className:"w-56",value:u.defaultProfileID??Te,disabled:k!==void 0,onValueChange:(S)=>O((R)=>({...R,defaultProfileID:S===Te?void 0:S})),groups:[{options:G}]})})}),e(ne,{title:"代理服务器",description:"支持 HTTP / HTTPS 代理;地址中的账号密码请拆到独立字段。",unboxed:!0,action:n(x,{size:"sm",disabled:k!==void 0,onClick:()=>O((S)=>({...S,profiles:[...S.profiles,{id:er(),name:`代理 ${S.profiles.length+1}`,address:"http://127.0.0.1:8080",tls:"verify",noProxy:[]}]})),children:[e(we,{className:"size-3.5"}),"添加代理"]}),children:u.profiles.length===0?e("div",{className:l("surface.emptyDashed","py-10 text-sm text-dim"),children:"尚未添加代理,所有请求直接连接。"}):u.profiles.map((S)=>n("section",{className:l("surface.card","flex flex-col gap-4 p-4"),children:[n("div",{className:"flex items-center justify-between gap-3",children:[n("div",{className:"flex min-w-0 items-center gap-2 text-sm font-medium text-ink",children:[e(Le,{className:"size-4 shrink-0 text-dim"}),e("span",{className:"truncate",children:S.name||"未命名代理"})]}),e(V,{label:`删除${S.name||"代理"}`,className:"text-danger",disabled:k!==void 0,onClick:()=>O((R)=>({...R,defaultProfileID:R.defaultProfileID===S.id?void 0:R.defaultProfileID,profiles:R.profiles.filter((A)=>A.id!==S.id),routes:Object.fromEntries(Object.entries(R.routes).filter(([,A])=>A!==S.id))})),children:e(pe,{className:"size-4"})})]}),n("div",{className:"grid gap-3 md:grid-cols-2",children:[e(ue,{label:"名称",children:(R)=>e(te,{id:R,value:S.name,onChange:(A)=>L(S.id,{name:A.target.value})})}),e(ue,{label:"代理地址",children:(R)=>e(te,{id:R,type:"url",value:S.address,placeholder:"http://proxy.example.com:8080",autoComplete:"off",spellCheck:!1,onChange:(A)=>L(S.id,{address:A.target.value})})}),e(ue,{label:"用户名(可选)",children:(R)=>e(te,{id:R,value:S.username??"",autoComplete:"off",onChange:(A)=>L(S.id,{username:A.target.value||void 0})})}),e(ue,{label:"密码(可选)",hint:"留空表示沿用已保存密码。",children:(R)=>e(te,{id:R,type:"password",value:S.password??"",autoComplete:"new-password",onChange:(A)=>L(S.id,{password:A.target.value||void 0})})}),e(ue,{label:"HTTPS 证书校验",children:(R)=>e(Xt,{id:R,value:S.tls,onValueChange:(A)=>L(S.id,{tls:A==="insecure"?"insecure":"verify"}),groups:[{options:[{value:"verify",label:"校验证书(推荐)"},{value:"insecure",label:"跳过校验(仅调试)"}]}]})}),e(ue,{label:"额外直连主机",hint:"多个主机用逗号分隔;localhost 与回环地址无需填写。",children:(R)=>e(te,{id:R,value:S.noProxy?.join(", ")??"",placeholder:"internal.example.com",onChange:(A)=>L(S.id,{noProxy:A.target.value.split(",").map((N)=>N.trim()).filter(Boolean)})})})]})]},S.id))}),e(ne,{title:"分流规则",description:"可按模型提供方、ChatGPT 订阅登录或程序更新覆盖默认线路。",children:B.map((S)=>{let A=Object.hasOwn(u.routes,S.id)?u.routes[S.id]??Te:Xe;return e(W,{title:S.name,description:e("span",{className:"font-mono",children:S.id}),children:e(Xt,{ariaLabel:`${S.name}使用的代理线路`,className:"w-56",value:A,disabled:k!==void 0,onValueChange:(N)=>O((E)=>{let U={...E.routes};if(N===Xe)delete U[S.id];else U[S.id]=N===Te?null:N;return{...E,routes:U}}),groups:[{options:[{value:Xe,label:"跟随默认线路"},...G]}]})},S.id)})}),e(wt,{children:g}),n(us,{children:[e(x,{disabled:k!==void 0||!h,onClick:()=>y&&c(structuredClone(y)),children:"撤销更改"}),n(x,{type:"submit",variant:"primary",disabled:k!==void 0||!h,loading:k==="saving",children:[e(Ge,{className:"size-3.5"}),"保存代理设置"]})]})]})}function Ue(t){return{version:1,defaultProfileID:t.defaultProfileID,routes:{...t.routes},profiles:t.profiles.map((a)=>({id:a.id,name:a.name,address:a.address,username:a.username,password:"",tls:a.tls,noProxy:[...a.noProxy??[]]}))}}var he="ring-2 ring-amber-400",Jt="flex items-center gap-2 rounded-lg border border-white/10 bg-[#1a1a1a] px-2.5 py-1.5 text-xs";function et(t){return e("div",{role:"img","aria-label":t.label,className:"mt-2 w-full max-w-md overflow-hidden rounded-lg border border-white/10 bg-[#0f0f0f] text-left text-[11px] leading-4 text-white",children:n("div",{"aria-hidden":!0,children:[n("div",{className:"flex items-center gap-1.5 border-b border-white/10 px-3 py-1.5 text-[10px]",children:[t.path.map((a,u)=>n("span",{className:"flex items-center gap-1.5",children:[u>0&&e("span",{className:"text-white/30",children:"›"}),e("span",{className:u===t.path.length-1?"font-medium":"text-white/60",children:a})]},a)),e("span",{className:"ml-auto rounded bg-white/10 px-1 py-0.5 text-[9px] text-white/50",children:"示意图"})]}),e("div",{className:"px-3 py-2.5",children:t.children})]})})}function xe(t){return e("span",{className:"absolute -top-1.5 -right-1.5 z-10 flex size-3.5 items-center justify-center rounded-full bg-amber-400 text-[9px] font-bold text-black",children:t.n})}function Kt(t){return e("span",{className:d("flex h-4 w-7 shrink-0 items-center rounded px-0.5",t.on?"justify-end bg-blue-500":"justify-start border border-white/15 bg-[#2a2a2a]"),children:e("span",{className:d("h-3 w-3 rounded-[3px]",t.on?"bg-blue-200":"bg-white/45")})})}function ze(t){return n("div",{className:d(Jt,"justify-between",t.className),children:[e("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:t.children}),t.clearable&&e(oe,{className:"size-3 shrink-0 text-white/50"}),e(ge,{className:"size-3 shrink-0 text-white/50"})]})}function Ze(t){return n("span",{className:"shrink-0 rounded bg-[#2a2a2a] px-1.5 py-0.5 text-[11px]",children:[t.children,e("span",{className:"ml-1.5 text-white/60",children:"×"})]})}function qt(t){return n("div",{children:[n("div",{className:"flex items-center gap-2",children:[e("span",{className:d("shrink-0 rounded-full px-2 py-px text-[11px]",t.badgeClass),children:t.badge}),n("div",{children:[e("div",{className:"text-xs font-semibold",children:t.title}),e("div",{className:"text-[10px] text-white/55",children:t.hint})]})]}),e("div",{className:"mt-1.5 ml-3.5 border-l border-white/25 pl-3",children:t.children})]})}function Qt(){return n(et,{label:"策略示例:操作选允许;包含电子邮件为你的邮箱;要求登录方法为 GitHub",path:["Access 策略","创建新策略"],children:[e("div",{className:"text-xs font-semibold",children:"操作"}),n("div",{className:"relative mt-1",children:[e(ze,{className:he,children:"允许"}),e(xe,{n:1})]}),e("div",{className:"mt-3 text-sm font-bold",children:"策略规则"}),n("div",{className:"mt-2 flex flex-col gap-3",children:[e(qt,{badge:"或",badgeClass:"bg-violet-600",title:"包含",hint:"用户只需满足一条「包含」规则",children:n("div",{className:"relative flex flex-col gap-1.5 rounded-lg bg-[#2a2a2a] p-2",children:[e(xe,{n:2}),e(ze,{children:"电子邮件"}),n("div",{className:Jt,children:[e(Ze,{children:"you@example.com"}),e("span",{className:"min-w-0 truncate text-white/40",children:"email@example.com"})]})]})}),e(qt,{badge:"且",badgeClass:"bg-amber-500 text-black",title:"要求",hint:"流量必须匹配所有这些规则才能被包含。",children:n("div",{className:"relative flex items-start gap-2 rounded-lg bg-[#2a2a2a] p-2",children:[e(xe,{n:3}),n("div",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[e(ze,{children:"登录方法"}),e(ze,{clearable:!0,children:e(Ze,{children:"GitHub"})})]}),e(pe,{className:"mt-2 size-3 shrink-0 text-white/60"})]})})]}),n("div",{className:"mt-2.5 flex flex-wrap gap-x-4 gap-y-0.5 text-[10px] font-medium",children:[e("span",{children:"+ 添加包含 (或)"}),e("span",{children:"+ 添加要求 (且)"}),e("span",{children:"+ 添加排除 (非)"})]})]})}function nn(){return n(et,{label:"身份验证示例:关闭接受所有标识提供程序,只选择 GitHub;即时身份验证开启时会直接跳转 GitHub",path:["应用程序","你的应用名"],children:[n("div",{className:"flex items-start justify-between gap-2",children:[n("div",{children:[n("div",{className:"flex items-center gap-1.5 text-sm font-bold",children:["身份验证",e("span",{className:"rounded-full bg-blue-600 px-1.5 py-px text-[10px] font-normal",children:"新"})]}),e("div",{className:"text-[10px] text-white/75",children:"为此应用程序配置身份提供程序和多重身份验证。"})]}),n("span",{className:"flex shrink-0 rounded-md border border-white/10 bg-white/5 p-0.5 text-[10px]",children:[e("span",{className:"rounded bg-blue-600/35 px-2 py-0.5 text-blue-300",children:"身份"}),e("span",{className:"px-2 py-0.5 text-white/75",children:"MFA"})]})]}),n("div",{className:"mt-2.5 flex flex-col gap-3 border-t border-white/10 pt-2.5",children:[n("div",{className:"flex items-center justify-between gap-2",children:[e("span",{className:"text-xs font-bold",children:"接受所有可用的标识提供程序"}),n("span",{className:"relative",children:[e("span",{className:d("block rounded",he),children:e(Kt,{on:!1})}),e(xe,{n:1})]})]}),n("div",{children:[e("div",{className:"text-xs font-bold",children:"选择此应用程序可用的身份提供程序"}),n("div",{className:"relative mt-1",children:[e(ze,{className:he,clearable:!0,children:e(Ze,{children:"GitHub - github"})}),e(xe,{n:2})]})]}),n("div",{className:"flex items-start justify-between gap-2",children:[n("div",{children:[e("div",{className:"text-xs font-bold",children:"应用即时身份验证"}),e("div",{className:"text-[10px] text-white/75",children:"允许用户在只有一种登录方法可用时跳过标识提供程序选择。"})]}),n("span",{className:"relative",children:[e("span",{className:d("block rounded",he),children:e(Kt,{on:!1})}),e(xe,{n:3})]})]})]})]})}function an(){let t=["全部","App Launcher 设置","标记","CORS 标头","Cookie 设置","AUD 标签","OAuth"],a="0a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f9";return n(et,{label:"AUD 位置示例:应用的「其他设置」页点「AUD 标签」,复制「令牌」下面的一长串字符",path:["应用程序","你的应用名"],children:[n("div",{className:"inline-flex rounded-md border border-white/10 bg-white/5 p-0.5 text-[10px]",children:[e("span",{className:"px-2 py-1 text-white/50",children:"应用程序详细信息"}),e("span",{className:"rounded border border-white/15 bg-black px-2 py-1",children:"其他设置"})]}),e("div",{className:"mt-2 text-sm font-bold",children:"其他设置"}),e("div",{className:"mt-2 flex flex-wrap gap-1.5 text-[10px]",children:t.map((u)=>n("span",{className:d("relative rounded-md border px-2 py-1",u==="AUD 标签"?`border-blue-400/60 bg-[#0b2a5b] ${he}`:"border-white/15 text-white/90"),children:[u,u==="AUD 标签"&&e(xe,{n:1})]},u))}),e("div",{className:"mt-3 text-xs font-bold",children:"应用程序受众 (AUD) 标签"}),n("div",{className:"relative mt-1.5 rounded-lg border border-white/15 bg-white/[0.03] px-2.5 py-2",children:[e(xe,{n:2}),e("div",{className:"text-xs font-bold",children:"令牌"}),n("div",{className:"mt-1 flex items-center gap-1.5",children:[e("span",{className:d("min-w-0 break-all rounded font-mono text-[10px] ring-offset-2 ring-offset-black",he),children:"0a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f9"}),e(Sn,{className:"size-3 shrink-0 text-white/60"})]})]})]})}function on({conn:t}){let[a,u]=r(0);return e(On,{conn:t,onRetry:()=>u((c)=>c+1)},a)}function On({conn:t,onRetry:a}){let u=ie(t.state).status==="open",[c,y]=r(),[C,B]=r(),[D,k]=r(),P=i(void 0);o(()=>{let M=new AbortController;if(P.current=M,y(void 0),B(void 0),u)k("load"),t.networkSettings(M.signal).then((T)=>{if(M.signal.aborted)return;y(T),k(void 0)},(T)=>{if(M.signal.aborted)return;let I=T instanceof Error&&"status"in T&&T.status===404;B(I?"当前服务版本不支持局域网设置,请更新服务端。":sn(T)),k(void 0)});return()=>M.abort()},[t,u]);async function g(M){let T=P.current;if(!T||T.signal.aborted||D)return;k("update"),B(void 0);try{let I=await t.saveNetworkSettings({lanEnabled:M},T.signal);if(T.signal.aborted)return;y(I)}catch(I){if(!T.signal.aborted)B(sn(I))}finally{if(!T.signal.aborted)k(void 0)}}if(!u)return e(W,{title:"开放局域网",description:"连接服务器后可查看网络设置。"});if(!c)return e(W,{title:"开放局域网",description:C??"正在读取网络设置…",children:C&&e(x,{size:"sm",onClick:a,children:"重试"})});return n(p,{children:[e(W,{title:"开放局域网",description:n("div",{className:"space-y-2",children:[e("p",{children:"设备需配对。HTTP 不加密,仅限可信网络。"}),c.disabledReason&&e("p",{children:c.disabledReason}),C&&e("p",{role:"alert",className:"text-danger",children:C})]}),children:e(kt,{label:"开放局域网",checked:c.settings.lanEnabled,onCheckedChange:g,disabled:!c.editable||D!==void 0})}),c.current.remote&&e(W,{title:"局域网连接地址",description:n("div",{className:"space-y-2",children:[e("p",{children:"其他设备使用配对码连接。"}),c.addresses.length===0&&e("p",{children:"未发现局域网 IPv4 地址,请检查网卡。"}),c.addresses.map((M)=>e(te,{"aria-label":`局域网地址 ${M.address}`,value:M.url,readOnly:!0,className:"font-mono",onFocus:(T)=>T.currentTarget.select()},M.address))]})})]})}function sn(t){return t instanceof Error?t.message:"网络设置请求失败,请重试。"}var Wn=/^([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$/,_n="https://dash.cloudflare.com/",Hn=2000,ln=15000,jn={off:{label:"未连接",tone:"neutral"},starting:{label:"连接中",tone:"warning",pulse:!0},connected:{label:"已连接",tone:"success"},error:{label:"连接失败,重试中",tone:"danger",pulse:!0},"missing-binary":{label:"未安装 cloudflared",tone:"warning"}};function Vn(t){let a=dt(t.state,(C)=>C.status==="open"),[u,c]=r(),y=u?.state==="connected";return o(()=>{if(!a)return;let C=!1,B=()=>void t.tunnelStatus().then((k)=>!C&&c(k)).catch(()=>!C&&c((k)=>k??null));B();let D=setInterval(B,y?ln:Hn);return()=>{C=!0,clearInterval(D)}},[t,a,y]),[u,c]}function Kn(t){let[a,u]=r(),c=a?.expires;return o(()=>{let y=!1,C=()=>void t.pairingCode().then((k)=>!y&&u(k)).catch(()=>!y&&u(null));C();let B=setInterval(C,ln),D=c?setTimeout(C,Math.max(0,c-Date.now())+500):void 0;return()=>{y=!0,clearInterval(B),clearTimeout(D)}},[t,c]),[a,u]}function cn(t){w();let[a,u]=Vn(t.conn),c=dt(t.conn.state,(X)=>X.server?.auth===!1),[y,C]=r(),[B,D]=r(""),[k,P]=r(),[g,M]=r(!1),[T,I]=r(!1),[O,L]=r(),m=e(ne,{title:"局域网访问",description:"通过可信局域网访问这台 Basalt。",children:e(on,{conn:t.conn})}),h=e(Qn,{conn:t.conn});if(!a)return n(p,{children:[h,m]});let G=y??a.mode==="token",S=Tl(B),R=S?El(S):void 0,A=(k??a.hostname??"").trim().toLowerCase(),N=Wn.test(A),{login:E,binary:U}=a,b=G?S!==void 0||a.hasToken:E.state==="done",F=!U?0:!b?1:2;async function f(X,Q){I(!0),L(void 0);try{u(await X()),Q?.()}catch(ae){L(ae instanceof Error?ae.message:String(ae))}finally{I(!1)}}let K=()=>f(()=>G?t.conn.saveTunnel({hostname:A,...S?{token:S}:{}}):t.conn.provisionTunnel({hostname:A}),()=>{D(""),P(void 0),C(void 0),M(!1)});async function q(){if(!await Qe({title:"删除远程访问配置?",description:"会断开隧道并删除 Basalt 保存的配置。Cloudflare 里的隧道和域名解析不会被删除。",action:"删除",danger:!0}))return;I(!0);try{u(await t.conn.removeTunnel()),C(void 0),M(!1)}catch(Q){z(Q,"删除失败")}finally{I(!1)}}let J="用你自己域名下的 Cloudflare 隧道,从外网访问这台 Basalt。";if(a.configured&&!g)return n(p,{children:[h,m,e(ne,{title:"Cloudflare 隧道",description:J,children:e(Jn,{status:a,busy:T,conn:t.conn,onChanged:u,onEdit:()=>M(!0),onRemove:()=>void q()})})]});return n(p,{children:[h,m,n(ne,{title:"Cloudflare 隧道",description:J,children:[c&&e("div",{className:"px-4 py-3",children:e(xa,{tone:"danger",children:"服务端用 --no-auth 关闭了认证,不能开启远程访问。"})}),e(W,{title:"安装 cloudflared",description:U?"已找到":a.install.command?n("span",{className:"mt-1.5 flex flex-col gap-1.5",children:[e("span",{children:"在运行 Basalt 的这台机器上执行,装好后自动检测:"}),e(rn,{text:a.install.command,shell:!0})]}):"在运行 Basalt 的这台机器上安装,装好后自动检测",children:U?e(at,{}):a.install.command?e(le,{className:"size-4 animate-spin text-faint"}):e(x,{asChild:!0,variant:"primary",size:"sm",children:n("a",{href:a.install.url,target:"_blank",rel:"noreferrer noopener",children:["安装文档",e(xt,{className:"size-3.5"})]})})}),G?n(W,{title:"隧道令牌",description:B&&!S?e("span",{className:"text-danger",children:"没找到令牌(以 eyJ 开头),请完整复制"}):S?`已识别隧道${R?` ${R.slice(0,8)}…`:""}`:a.hasToken?"已保存,留空沿用":n(p,{children:["把 Cloudflare 上创建隧道后给出的安装命令整段粘贴进来。",e(dn,{href:_n,children:"打开 Cloudflare"})]}),children:[e(te,{type:"password",autoComplete:"off",spellCheck:!1,"aria-label":"隧道令牌或安装命令",placeholder:"cloudflared service install eyJ…",className:"w-64 max-w-full",value:B,disabled:c||!U,onChange:(X)=>D(X.target.value)}),b&&e(at,{})]}):e(W,{title:"连接 Cloudflare 账号",description:E.state==="done"?"已授权":E.state==="waiting"?E.url?"在授权页面登录并选择你的域名,完成后这里自动继续":"正在准备授权链接…":E.state==="error"?e("span",{className:"text-danger",children:E.error}):"登录并选择你的域名,其余的 Basalt 自动完成",children:E.state==="done"?e(at,{}):E.state==="waiting"?n(p,{children:[E.url?e(x,{asChild:!0,variant:"primary",size:"sm",children:n("a",{href:E.url,target:"_blank",rel:"noreferrer noopener",children:["打开授权页面",e(xt,{className:"size-3.5"})]})}):e(le,{className:"size-4 animate-spin text-faint"}),e(x,{variant:"ghost",size:"sm",onClick:()=>void f(()=>t.conn.cancelTunnelLogin()),children:"取消"})]}):e(x,{variant:F===1?"primary":"secondary",size:"sm",loading:T,disabled:c||!U,onClick:()=>void f(()=>t.conn.tunnelLogin()),children:E.state==="error"?"重试":"连接"})}),n(W,{title:"访问地址",description:O?e("span",{className:"text-danger",children:O}):A&&!N?e("span",{className:"text-danger",children:"格式不对,应形如 basalt.example.com"}):T&&F===2?"正在创建,通常需要几秒钟…":G?n("span",{className:"flex flex-col gap-1.5",children:[e("span",{children:"你在 Cloudflare 里给这条隧道配的主机名;隧道的服务地址要填:"}),e(rn,{text:`http://localhost:${a.localPort}`})]}):"填你刚才授权的域名下的任意子域名",children:[e(te,{placeholder:"basalt.example.com","aria-label":"主机名",spellCheck:!1,autoCapitalize:"off",className:"w-56 max-w-full",value:k??a.hostname??"",disabled:c||!U||!b,onChange:(X)=>P(X.target.value)}),e(x,{variant:"primary",size:"sm",loading:T&&F===2,disabled:c||!U||!b||!N,onClick:()=>void K(),children:G?"保存并连接":"创建并连接"})]}),n("div",{className:"flex items-center justify-between gap-2 px-4 py-2.5",children:[e("button",{type:"button",className:"text-xs text-faint transition-colors hover:text-ink",onClick:()=>{C(!G),L(void 0)},children:G?"改用登录授权":"我已有隧道令牌"}),g&&e("button",{type:"button",className:"text-xs text-faint transition-colors hover:text-ink",onClick:()=>M(!1),children:"取消修改"})]})]})]})}var qn={success:"text-success",warning:"text-warning",danger:"text-danger",neutral:"text-faint"};function Jn(t){let{status:a}=t,u=jn[a.state],c=a.publicURL??"",[y,C]=r(!1),[B,D]=r(!1);return n(p,{children:[e(W,{title:"隧道状态",description:a.error?e("span",{className:"text-danger",children:a.error}):a.state==="connected"?"用手机或另一台电脑打开下面的地址,输入配对码即可":"正在连接 Cloudflare…",children:n("span",{className:d("flex items-center gap-2 text-xs font-medium",qn[u.tone]),children:[n("span",{className:"relative flex size-2",children:[u.pulse&&e("span",{className:"absolute inset-0 animate-ping rounded-full bg-current opacity-60"}),e("span",{className:"relative size-2 rounded-full bg-current"})]}),u.label]})}),n(W,{title:"公共地址",description:e("span",{className:"font-mono break-all",children:c}),children:[e(Ot,{text:c,label:"复制地址",size:"icon-sm"}),e(V,{asChild:!0,size:"icon-sm",label:"在新标签页打开",className:"text-faint",children:e("a",{href:c,target:"_blank",rel:"noreferrer noopener",children:e(Fn,{className:"size-3.5"})})})]}),n(W,{title:"Access 校验",description:a.access?a.access.teamDomain:"可选:在 Basalt 之前再加一道只认你的登录",children:[n("span",{className:d("flex items-center gap-1.5 text-xs",a.access?"text-dim":"text-faint"),children:[a.access?e(Un,{className:"size-3.5"}):e(gt,{className:"size-3.5"}),a.access?"已启用":"未启用"]}),e(x,{variant:"ghost",size:"sm",onClick:()=>D(!0),children:"配置引导"}),e(x,{variant:"secondary",size:"sm",onClick:()=>C(!y),children:a.access?"修改":"设置"})]}),e(Yn,{status:a,open:B,onOpenChange:D}),y&&e(Xn,{status:a,conn:t.conn,onSaved:(k)=>{t.onChanged(k),C(!1)},onCancel:()=>C(!1)}),n(W,{title:"管理",description:"删除不会动 Cloudflare 里的隧道和域名解析",children:[n(x,{variant:"secondary",size:"sm",onClick:t.onEdit,children:[e(tt,{className:"size-3.5"}),"修改"]}),n(x,{variant:"danger-ghost",size:"sm",disabled:t.busy,onClick:t.onRemove,children:[e(pe,{className:"size-3.5"}),"删除"]})]})]})}function Qn(t){let[a,u]=Kn(t.conn),[c,y]=r(!1);if(!a)return null;let C=`${a.code.slice(0,4)}-${a.code.slice(4)}`,B=new Date(a.expires).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});async function D(){y(!0);try{u(await t.conn.renewPairingCode())}catch(k){z(k,"更换配对码失败")}finally{y(!1)}}return e(ne,{title:"设备配对",description:"局域网与 Cloudflare 隧道连接共用此码。",children:n(W,{title:"配对码",description:`${B} 前有效,用一次即失效`,children:[e("code",{className:"font-mono text-sm font-medium tracking-wider text-ink",children:C}),e(Ot,{text:C,label:"复制配对码",size:"icon-sm"}),e(V,{size:"icon-sm",label:"换一个配对码",className:"text-faint",disabled:c,onClick:()=>void D(),children:e(ye,{className:d("size-3.5",c&&"animate-spin")})})]})})}function De(t){return n("li",{className:"flex items-start gap-2.5",children:[e("span",{"aria-hidden":!0,className:"flex size-5 shrink-0 items-center justify-center rounded-full bg-raised text-[11px] text-faint",children:t.index}),n("div",{className:"min-w-0 flex-1 text-[13px] leading-5 text-dim",children:[t.children,t.detail&&e("div",{className:"mt-0.5 text-xs text-faint",children:t.detail})]})]})}function Yn(t){let a=(t.status.hostname??"").split("."),u=a.slice(-2).join("."),c=a.slice(0,-2).join(".");return e(Zt,{open:t.open,onOpenChange:t.onOpenChange,title:"Cloudflare Access 配置引导",description:"按顺序在 Cloudflare 后台配置,最后把 AUD 标签填回 Basalt。",size:"lg",footer:n(p,{children:[e("div",{className:"flex-1 max-sm:hidden"}),e(x,{variant:"primary",onClick:()=>t.onOpenChange(!1),children:"知道了"})]}),children:n("ol",{className:"flex list-none flex-col gap-4",children:[n(De,{index:1,detail:e(p,{children:"选「自托管和私有」,保持「公共 DNS」,点「继续使用」"}),children:["打开"," ",e(dn,{href:t.status.accessAppsURL??"https://one.dash.cloudflare.com/",children:"Cloudflare 应用程序"}),",点右上角「新建应用程序」"]}),e(De,{index:2,detail:t.status.hostname?n(p,{children:["你在上面设置的访问域名是 ",e("code",{className:"font-mono text-ink",children:t.status.hostname}),",拆成两栏填;路径留空"]}):e(p,{children:"先在上面设置访问域名,再按它拆成「子域」和「域」两栏;路径留空"}),children:t.status.hostname?n(p,{children:["表单里「子域」填 ",e("code",{className:"font-mono text-xs text-ink",children:c||"(留空)"}),",「域」下拉选"," ",e("code",{className:"font-mono text-xs text-ink",children:u})]}):e(p,{children:"表单里分别填「子域」和「域」"})}),e(De,{index:3,detail:n(p,{children:[e("div",{children:"对照下图:① 操作选「允许」;② 「包含」选「电子邮件」填你的邮箱;③ 「要求」选「登录方法」= GitHub。"}),e(Qt,{}),e("div",{className:"mt-1.5",children:"不使用 GitHub 时只保留「包含」;两条都放进「包含」会变成满足其一即可。"})]}),children:"在「Access 策略」里点「创建新策略」"}),e(De,{index:4,detail:n(p,{children:[e("div",{children:"对照下图:① 关闭「接受所有可用的标识提供程序」;② 只选 GitHub;③ 「应用即时身份验证」开启会直接跳 GitHub,关闭则停在只有 GitHub 按钮的登录页(图中为关闭)。设置完成后点「创建」。"}),e(nn,{})]}),children:"只允许 GitHub 登录时,配置「身份验证」"}),e(De,{index:5,detail:n(p,{children:[e("div",{children:"对照下图:先点 ①「AUD 标签」,再复制 ② 令牌下面的整串字符(不要点删除)。"}),e(an,{}),e("div",{className:"mt-1.5",children:"回到 Basalt 点「设置」粘贴;团队域名保存时自动识别。"})]}),children:"创建后进入应用的「其他设置」,点「AUD 标签」,复制「令牌」下的那串字符"})]})})}function Xn(t){let[a,u]=r(t.status.access?.audience??""),[c,y]=r(t.status.access?.teamDomain??""),[C,B]=r(!1),[D,k]=r(!1),[P,g]=r();async function M(T){k(!0),g(void 0);try{t.onSaved(await t.conn.setTunnelAccess(T))}catch(I){g(I instanceof Error?I.message:String(I))}finally{k(!1)}}return n("div",{className:"border-t border-line",children:[n(W,{title:"AUD 标签",description:n(p,{children:[e("span",{className:"block",children:"在 Cloudflare 应用的「其他设置」→「AUD 标签」里复制「令牌」"}),e("button",{type:"button",className:"mt-1 text-left text-xs text-faint transition-colors hover:text-ink",onClick:()=>B(!C),children:C?"改用自动识别团队域名":"团队域名自动识别 · 识别不到?手动填写"})]}),children:[e(te,{className:"w-72 max-w-full",placeholder:"粘贴 AUD 标签","aria-label":"AUD 标签",spellCheck:!1,autoCapitalize:"off",value:a,onChange:(T)=>u(T.target.value)}),e(x,{variant:"primary",size:"sm",loading:D,disabled:!a.trim()||C&&!c.trim(),onClick:()=>void M({...C&&c.trim()?{teamDomain:c}:{},audience:a}),children:"保存"}),e(x,{variant:"ghost",size:"sm",onClick:t.onCancel,children:"取消"})]}),C&&e(W,{title:"团队域名",description:"仅在自动识别失败时填写",children:e(te,{className:"w-72 max-w-full",placeholder:"myteam.cloudflareaccess.com","aria-label":"团队域名",spellCheck:!1,autoCapitalize:"off",value:c,onChange:(T)=>y(T.target.value)})}),P&&e("div",{className:"px-4 pb-4",children:e(wt,{children:P})}),t.status.access&&e("div",{className:"flex justify-end px-4 pb-3",children:e(x,{variant:"danger-ghost",size:"sm",disabled:D,onClick:()=>void M(null),children:"关闭校验"})})]})}function at(){return e("span",{className:"flex size-5 items-center justify-center rounded-full bg-success/15 text-success",role:"img","aria-label":"已完成",children:e(Z,{className:"size-3",strokeWidth:3})})}function rn(t){return n("span",{className:"flex w-fit max-w-full items-center gap-2 rounded-lg bg-raised/50 py-0.5 pr-1 pl-3 transition-colors hover:bg-raised",children:[t.shell&&e("span",{"aria-hidden":!0,className:"font-mono text-[12.5px] text-faint select-none",children:"$"}),e("code",{className:"min-w-0 flex-1 font-mono text-[12.5px] leading-6 break-all text-ink",children:t.text}),e(Ot,{text:t.text,size:"icon-sm"})]})}function dn(t){return n("a",{href:t.href,target:"_blank",rel:"noreferrer noopener",className:"ml-1 inline-flex w-fit items-center gap-0.5 font-medium text-accent underline decoration-accent/30 underline-offset-4 transition-colors hover:text-accent-strong hover:decoration-accent",children:[t.children,e(xt,{className:"size-3.5"})]})}var Zn=[{value:"auto",label:"自动检测 (Auto)",description:"Windows 优先探测 bash,未找到则回退 powershell;Unix 走 bash"},{value:"bash",label:"Bash",description:"使用 bash -c 执行(Git Bash / WSL / MSYS2 / Linux / macOS)"},{value:"powershell",label:"PowerShell",description:"使用 powershell -NoProfile -Command 执行"},{value:"cmd",label:"CMD",description:"使用 cmd.exe /c 执行"}];function ea(t){if(!t)return"—";return`v${t.version}(协议 v${t.protocol})`}function ta(t){if(!t)return"—";return t.auth?"需设备配对令牌":"免认证(--no-auth)"}function un(t){let a=ie(t.conn.state),u=Ui[a.status],c=a.server,[y,C]=r(!1),[B,D]=r(!1),[k,P]=r(),[g,M]=r(!1),T=c?.shell??"auto";o(()=>{if(P(void 0),a.status!=="open")return;let m=!1;return t.conn.serverAutostart().then((h)=>{if(!m)P(h)},(h)=>{if(!m)z(h)}),()=>{m=!0}},[t.conn,a.status]);async function I(m){let h=m;C(!0);try{await t.conn.setServerShell(h)}catch(G){z(G)}finally{C(!1)}}async function O(m){M(!0);try{P(await t.conn.setServerAutostart(m))}catch(h){z(h)}finally{M(!1)}}async function L(){D(!0);try{await t.conn.restartServer(),se("已请求重启",{description:"所有对话空闲后服务会按原参数重启,稍后自动重新连接"})}catch(m){z(m)}finally{D(!1)}}return n(p,{children:[n(ne,{title:"当前远程服务器",description:`正在管理 ${$n(t.server)}(${t.server.url})`,children:[e(W,{title:"连接状态",description:a.error??t.server.url,children:n("span",{className:"inline-flex items-center gap-2 text-xs font-medium text-ink",children:[e("span",{className:d("size-2 rounded-full",u.dot)}),a.status==="open"&&c?e("span",{className:"font-mono",children:ea(c)}):u.label]})}),e(W,{title:"认证策略",description:"服务端是否要求配对设备令牌",children:n("span",{className:"inline-flex items-center gap-2 text-xs font-medium text-ink",children:[c&&e("span",{className:d("size-2 rounded-full",c.auth?"bg-success":"bg-warning")}),ta(c)]})})]}),n(ne,{title:"更新与启动",description:"服务端版本更新、重启与开机自启",children:[e(Pl,{conn:t.conn}),e(W,{title:"服务重启",description:"按原参数重启,等所有对话空闲后执行,不会中断进行中的对话",children:e(x,{size:"sm",loading:B,disabled:a.status!=="open",onClick:L,children:"重启服务"})}),e(W,{title:"开机自启",description:"当前用户登录系统后自动启动 Basalt;不影响正在运行的服务",children:e(kt,{label:"开机自启",checked:k?.enabled??!1,disabled:!k||g||a.status!=="open",onCheckedChange:(m)=>void O(m)})})]}),n(ne,{title:"运行环境",description:"服务端执行命令与解释定时任务时使用的环境",children:[e(W,{title:"执行 Shell",description:"服务端运行 bash 工具与后台长任务时调用的默认命令行解释器",children:e("div",{className:"w-56",children:e(Xt,{value:T,disabled:y,onValueChange:I,groups:[{options:Zn.map((m)=>({value:m.value,label:m.label,description:m.description}))}]})})}),e(W,{title:"服务器时区",description:"远程自动化定时任务(Cron)按此时区解释",children:e("span",{className:"font-mono text-xs text-dim",children:c?.timezone??"—"})})]})]})}function mn(t){let a=ie(t.conn.state),u=t.devices;if(a.server?.auth===!1)return e(ne,{title:"已配对设备",description:"已获授权访问此远程服务器的客户端设备,可随时远程吊销",children:e(W,{title:"当前服务器未启用设备认证",description:"服务端以 --no-auth 启动,无需配对设备令牌"})});if(!u){let c=a.status==="open"?"正在读取已配对设备…":"连接服务器后可查看";return e(ne,{title:"已配对设备",description:"已获授权访问此远程服务器的客户端设备,可随时远程吊销",children:e(W,{title:"设备列表",description:c})})}if(u.length===0)return e(ne,{title:"已配对设备",description:"已获授权访问此远程服务器的客户端设备,可随时远程吊销",children:e(W,{title:"暂无已配对设备"})});return e(ne,{title:"已配对设备",description:"已获授权访问此远程服务器的客户端设备,可随时远程吊销",children:u.map((c)=>e(W,{title:n("span",{className:"flex items-center gap-2",children:[e("span",{className:"truncate",children:c.name}),(c.current||c.id===t.server.id)&&e("span",{className:"rounded-md bg-raised px-1.5 py-0.5 font-normal text-[11px] text-dim",children:"当前设备"})]}),description:`最近活跃:${ft(c.lastSeen)} · 配对于 ${ft(c.created)}`,children:n(x,{size:"sm",variant:"danger-ghost",onClick:()=>t.onRevokeDevice(c),children:[e(pe,{className:"size-3.5"}),"吊销"]})},c.id))})}var Ie="浏览器设置(本地)",me="服务器设置(远程)",fn=[{value:"appearance",group:Ie,label:"外观",icon:e(ga,{}),render:()=>e(bt,{})},{value:"notifications",group:Ie,label:"通知",icon:e(rt,{}),render:()=>e(vt,{})},{value:"connections",group:Ie,label:"连接列表",icon:e($e,{}),render:(t)=>e(ht,{...t})},{value:"shortcuts",group:Ie,label:"快捷键",icon:e(fa,{}),render:()=>e(yt,{})},{value:"models",group:me,label:"模型",icon:e(fr,{}),render:(t)=>e(At,{...t})},{value:"plugins",group:me,label:"插件",icon:e(Nt,{}),render:(t)=>e(jt,{conn:t.conn},t.server.id)},{value:"proxy",group:me,label:"代理",icon:e(Le,{}),render:(t)=>e(Vt,{conn:t.conn},t.server.id)},{value:"database",group:me,label:"数据库",icon:e(hr,{}),render:(t)=>e(zt,{conn:t.conn,server:t.server})},{value:"server",group:me,label:"服务器",icon:e(zn,{}),render:(t)=>e(un,{...t},t.server.id)},{value:"remote",group:me,label:"远程访问",icon:e(ct,{}),render:(t)=>e(cn,{conn:t.conn},t.server.id)},{value:"devices",group:me,label:"已配对设备",icon:e(Un,{}),render:(t)=>e(mn,{...t})}],Oe=new WeakMap;function gn(t){return t==="search"?"database":t??"appearance"}function Dr(t){w();let[a,u]=r(()=>gn(t.initialTab)),[c,y]=r(t.initialTab===void 0),C=i(null),B=i(!1);o(()=>{if(y(t.initialTab===void 0),t.initialTab===void 0)B.current=!1;if(C.current?.scrollTo({top:0}),t.initialTab)u(gn(t.initialTab))},[t.initialTab]);let D=(m)=>{u(m),t.onTabChange?.(m)},k=ie(t.conn.state),[P,g]=r(()=>Oe.get(t.conn)??null),M=[];for(let m of k.plugins){if(m.status!=="enabled")continue;for(let h of m.web??[]){let G=h.view;if(h.kind!=="tab"||!G)continue;let S=h.id==="settings"?m.id:h.id;M.push({value:S,group:me,label:h.title,icon:Nl(h.icon),render:(R)=>e(gs,{pluginID:m.id,viewID:G,connection:R.conn},`${m.id}-${h.id}`)})}}let T=[...fn.slice(0,5),...M,...fn.slice(5)];o(()=>{let m=Oe.get(t.conn)??null;if(g(m),k.status!=="open"||k.server?.auth===!1)return;let h=!1;return t.conn.devices().then((G)=>{if(Oe.set(t.conn,G),!h)g(G)}).catch(()=>{}),()=>{h=!0}},[t.conn,k.status,k.server?.auth]);let I=async(m)=>{if(!await Qe({title:`吊销设备「${m.name}」?`,description:"吊销后该设备的令牌立即失效,需重新配对才能连接此服务器。",action:"吊销",danger:!0}))return;try{await t.conn.revokeDevice(m.id),g((G)=>{let S=G?.filter((R)=>R.id!==m.id)??null;if(S)Oe.set(t.conn,S);return S})}catch(G){z(G)}},O=T.find((m)=>m.value===a)??T[0],L={...t,devices:P,onRevokeDevice:(m)=>void I(m)};return e(ii,{className:"@container/settings",viewportClassName:"[scrollbar-gutter:stable]",viewportRef:C,children:n("div",{className:"mx-auto max-w-4xl animate-fade px-4 pt-3 pb-10 sm:px-6 md:pt-10 md:pb-16",children:[n("div",{className:"mb-6 flex min-h-10 items-center gap-1 md:mb-8",children:[!c&&e(V,{label:"返回设置分类",className:"-ml-2 size-10 rounded-full @min-[640px]/settings:hidden",onClick:()=>{if(B.current){B.current=!1,window.history.back();return}y(!0),t.onTabChange?.(void 0)},children:e(lt,{className:"size-5"})}),n("h1",{className:"min-w-0 truncate text-xl font-semibold tracking-tight md:font-serif md:text-[1.75rem] md:font-normal",children:[e("span",{className:d(!c&&"@max-[640px]/settings:hidden"),children:"设置"}),!c&&e("span",{className:"@min-[640px]/settings:hidden",children:O?.label})]})]}),c&&e("nav",{"aria-label":"设置分类",className:"space-y-6 @min-[640px]/settings:hidden",children:[Ie,me].map((m)=>n("section",{children:[e("h2",{className:l("settings.groupTitle","mb-2.5 px-0.5"),children:m}),e("div",{className:l("settings.groupBox"),children:T.filter((h)=>h.group===m).map((h)=>n("button",{type:"button",onClick:()=>{u(h.value),y(!1),B.current=t.onTabChange!==void 0,t.onTabChange?.(h.value,!0)},className:"flex min-h-13 w-full items-center gap-3 px-4 text-left text-[15px] text-ink transition-colors active:bg-raised [&_svg]:size-[18px] [&_svg]:shrink-0",children:[e("span",{className:"flex items-center text-dim",children:h.icon}),e("span",{className:"min-w-0 flex-1 truncate",children:h.label}),e(Mt,{className:"text-faint"})]},h.value))})]},m))}),n("div",{className:d("flex items-start",c&&"@max-[640px]/settings:hidden"),children:[e("aside",{className:"settings-rail shrink-0",children:e("nav",{"aria-label":"设置分类",className:"flex w-48 flex-col gap-1",children:T.map((m,h)=>{let G=m.value===a,S=m.group&&(h===0||T[h-1]?.group!==m.group);return n(Ke,{children:[S&&e("div",{className:d("px-2.5 pb-1 text-[11px] font-medium tracking-wide text-faint",h>0&&"mt-3.5"),children:m.group}),n("button",{type:"button",onClick:()=>D(m.value),className:l("sidebar.navItem","px-2.5 text-[13.5px]",G?"bg-raised font-medium text-ink shadow-[inset_0_1px_0_oklch(1_0_0/0.06)]":"text-dim hover:bg-raised/60 hover:text-ink"),children:[m.icon&&e("span",{className:d("relative flex items-center [&_svg]:size-4",G?"text-ink":"text-faint"),children:m.icon}),e("span",{className:"truncate",children:m.label})]})]},m.value)})})}),e("div",{className:"min-w-0 flex-1 animate-fade space-y-6 @container/panel",children:O?.render(L)},a)]})]})})}export{Dr as Settings};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ee,e,n,y}from"./chunk-qjg6dw46.js";import{jn,Hr}from"./chunk-kedjfh66.js";import"./chunk-recfg8af.js";function b({connection:p}){let{ModelSelector:d,Select:c,SettingGroup:s,SettingRow:l}=y(),m=ee(),i=Hr({connection:p,endpoint:"/api/plugins/prompt-optimizer/settings",loadError:"读取优化插件设置失败",toBody:(o)=>({schemaVersion:1,revision:o.revision,primaryModel:o.primaryModel,maxClarificationRounds:o.maxClarificationRounds}),differs:(o,t)=>o.primaryModel?.providerID!==t.primaryModel?.providerID||o.primaryModel?.modelID!==t.primaryModel?.modelID||o.maxClarificationRounds!==t.maxClarificationRounds}),r=i.settings?.primaryModel??null,u=r?`${r.providerID}/${r.modelID}`:"";return n("form",{id:m,onSubmit:i.save,className:"min-w-0 space-y-5",children:[e(s,{title:"模型",children:e(l,{title:"优化模型",description:"未选择时拒绝改写,不会自动回退到其他模型",children:e("div",{className:"w-56",children:e(d,{variant:"field",models:i.modelList,value:u,onChange:(o)=>{let t=o.indexOf("/"),a=t<0?"":o.slice(0,t),g=t<0?o:o.slice(t+1);i.edit((f)=>({...f,primaryModel:{providerID:a,modelID:g}}))}})})})}),e(s,{title:"交互",children:e(l,{title:"澄清提问轮数",description:"草稿有关键歧义时,模型最多可反问几轮",children:e("div",{className:"w-56",children:e(c,{value:String(i.settings?.maxClarificationRounds??1),disabled:i.loading||i.saving,onValueChange:(o)=>{let t=o==="2"?2:1;i.edit((a)=>({...a,maxClarificationRounds:t}))},groups:[{options:[{value:"1",label:"单轮澄清(推荐)",description:"提问一次后直接输出改写结果"},{value:"2",label:"最多两轮澄清",description:"首轮澄清后可针对残留疑问追问一次"}]}]})})})}),e(jn,{formID:m,notice:i.notice,dirty:i.dirty,busy:i.loading||i.saving,saving:i.saving,onReset:i.reset})]})}export{b as PromptOptimizerSettingsSection};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=Object.freeze(JSON.parse('{"displayName":"SQL","name":"sql","patterns":[{"match":"((?<!@)@)\\\\b(\\\\w+)\\\\b","name":"text.variable"},{"match":"(\\\\[)[^]]*(])","name":"text.bracketed"},{"include":"#comments"},{"captures":{"1":{"name":"keyword.other.create.sql"},"2":{"name":"keyword.other.sql"},"5":{"name":"entity.name.function.sql"}},"match":"(?i:^\\\\s*(create(?:\\\\s+or\\\\s+replace)?)\\\\s+(aggregate|conversion|database|domain|function|group|(unique\\\\s+)?index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\\\s+)([\\"\'`]?)(\\\\w+)\\\\4","name":"meta.create.sql"},{"captures":{"1":{"name":"keyword.other.create.sql"},"2":{"name":"keyword.other.sql"}},"match":"(?i:^\\\\s*(drop)\\\\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view))","name":"meta.drop.sql"},{"captures":{"1":{"name":"keyword.other.create.sql"},"2":{"name":"keyword.other.table.sql"},"3":{"name":"entity.name.function.sql"},"4":{"name":"keyword.other.cascade.sql"}},"match":"(?i:\\\\s*(drop)\\\\s+(table)\\\\s+(\\\\w+)(\\\\s+cascade)?\\\\b)","name":"meta.drop.sql"},{"captures":{"1":{"name":"keyword.other.create.sql"},"2":{"name":"keyword.other.table.sql"}},"match":"(?i:^\\\\s*(alter)\\\\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|proc(edure)?|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\\\s+)","name":"meta.alter.sql"},{"captures":{"1":{"name":"storage.type.sql"},"2":{"name":"storage.type.sql"},"3":{"name":"constant.numeric.sql"},"4":{"name":"storage.type.sql"},"5":{"name":"constant.numeric.sql"},"6":{"name":"storage.type.sql"},"7":{"name":"constant.numeric.sql"},"8":{"name":"constant.numeric.sql"},"9":{"name":"storage.type.sql"},"10":{"name":"constant.numeric.sql"},"11":{"name":"storage.type.sql"},"12":{"name":"storage.type.sql"},"13":{"name":"storage.type.sql"},"14":{"name":"constant.numeric.sql"},"15":{"name":"storage.type.sql"}},"match":"(?i)\\\\b(bigint|bigserial|bit|boolean|box|bytea|cidr|circle|date|double\\\\sprecision|inet|int|integer|line|lseg|macaddr|money|oid|path|point|polygon|real|serial|smallint|sysdate|text)\\\\b|\\\\b(bit\\\\svarying|character\\\\s(?:varying)?|tinyint|var\\\\schar|float|interval)\\\\((\\\\d+)\\\\)|\\\\b(char|number|varchar\\\\d?)\\\\b(?:\\\\((\\\\d+)\\\\))?|\\\\b(numeric|decimal)\\\\b(?:\\\\((\\\\d+),(\\\\d+)\\\\))?|\\\\b(times?)\\\\b(?:\\\\((\\\\d+)\\\\))?(\\\\swith(?:out)?\\\\stime\\\\szone\\\\b)?|\\\\b(timestamp)(s|tz)?\\\\b(?:\\\\((\\\\d+)\\\\))?(\\\\s(with(?:|out))\\\\stime\\\\szone\\\\b)?"},{"match":"(?i:\\\\b((?:primary|foreign)\\\\s+key|references|on\\\\s+(delete|update)(\\\\s+cascade)?|nocheck|check|constraint|collate|default)\\\\b)","name":"storage.modifier.sql"},{"match":"\\\\b\\\\d+\\\\b","name":"constant.numeric.sql"},{"match":"(?i:\\\\b(select(\\\\s+(all|distinct))?|insert\\\\s+(ignore\\\\s+)?into|update|delete|from|set|where|group\\\\s+by|or|like|and|union(\\\\s+all)?|having|order\\\\s+by|limit|cross\\\\s+join|join|straight_join|(inner|(left|right|full)(\\\\s+outer)?)\\\\s+join|natural(\\\\s+(inner|(left|right|full)(\\\\s+outer)?))?\\\\s+join)\\\\b)","name":"keyword.other.DML.sql"},{"match":"(?i:\\\\b(on|off|((is\\\\s+)?not\\\\s+)?null)\\\\b)","name":"keyword.other.DDL.create.II.sql"},{"match":"(?i:\\\\bvalues\\\\b)","name":"keyword.other.DML.II.sql"},{"match":"(?i:\\\\b(begin(\\\\s+work)?|start\\\\s+transaction|commit(\\\\s+work)?|rollback(\\\\s+work)?)\\\\b)","name":"keyword.other.LUW.sql"},{"match":"(?i:\\\\b(grant(\\\\swith\\\\sgrant\\\\soption)?|revoke)\\\\b)","name":"keyword.other.authorization.sql"},{"match":"(?i:\\\\bin\\\\b)","name":"keyword.other.data-integrity.sql"},{"match":"(?i:^\\\\s*(comment\\\\s+on\\\\s+(table|column|aggregate|constraint|database|domain|function|index|operator|rule|schema|sequence|trigger|type|view))\\\\s+)","name":"keyword.other.object-comments.sql"},{"match":"(?i)\\\\bAS\\\\b","name":"keyword.other.alias.sql"},{"match":"(?i)\\\\b(DESC|ASC)\\\\b","name":"keyword.other.order.sql"},{"match":"\\\\*","name":"keyword.operator.star.sql"},{"match":"[!<>]?=|<>|[<>]","name":"keyword.operator.comparison.sql"},{"match":"[-+/]","name":"keyword.operator.math.sql"},{"match":"\\\\|\\\\|","name":"keyword.operator.concatenator.sql"},{"captures":{"1":{"name":"support.function.aggregate.sql"}},"match":"(?i)\\\\b(approx_count_distinct|approx_percentile_cont|approx_percentile_disc|avg|checksum_agg|count|count_big|group|grouping|grouping_id|max|min|sum|stdevp??|varp??)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.analytic.sql"}},"match":"(?i)\\\\b(cume_dist|first_value|lag|last_value|lead|percent_rank|percentile_cont|percentile_disc)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.bitmanipulation.sql"}},"match":"(?i)\\\\b((?:bit_coun|get_bi|left_shif|right_shif|set_bi)t)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.conversion.sql"}},"match":"(?i)\\\\b(cast|convert|parse|try_cast|try_convert|try_parse)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.collation.sql"}},"match":"(?i)\\\\b(collationproperty|tertiary_weights)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.cryptographic.sql"}},"match":"(?i)\\\\b(asymkey_id|asymkeyproperty|certproperty|cert_id|crypt_gen_random|decryptbyasymkey|decryptbycert|decryptbykey|decryptbykeyautoasymkey|decryptbykeyautocert|decryptbypassphrase|encryptbyasymkey|encryptbycert|encryptbykey|encryptbypassphrase|hashbytes|is_objectsigned|key_guid|key_id|key_name|signbyasymkey|signbycert|symkeyproperty|verifysignedbycert|verifysignedbyasymkey)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.cursor.sql"}},"match":"(?i)\\\\b(cursor_status)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.datetime.sql"}},"match":"(?i)\\\\b(sysdatetime|sysdatetimeoffset|sysutcdatetime|current_time(stamp)?|getdate|getutcdate|datename|datepart|day|month|year|datefromparts|datetime2fromparts|datetimefromparts|datetimeoffsetfromparts|smalldatetimefromparts|timefromparts|datediff|dateadd|datetrunc|eomonth|switchoffset|todatetimeoffset|isdate|date_bucket)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.datatype.sql"}},"match":"(?i)\\\\b(datalength|ident_current|ident_incr|ident_seed|identity|sql_variant_property)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.expression.sql"}},"match":"(?i)\\\\b(coalesce|nullif)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.globalvar.sql"}},"match":"(?<!@)@@(?i)\\\\b(cursor_rows|connections|cpu_busy|datefirst|dbts|error|fetch_status|identity|idle|io_busy|langid|language|lock_timeout|max_connections|max_precision|nestlevel|options|packet_errors|pack_received|pack_sent|procid|remserver|rowcount|servername|servicename|spid|textsize|timeticks|total_errors|total_read|total_write|trancount|version)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.json.sql"}},"match":"(?i)\\\\b(json|isjson|json_object|json_array|json_value|json_query|json_modify|json_path_exists)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.logical.sql"}},"match":"(?i)\\\\b(choose|iif|greatest|least)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.mathematical.sql"}},"match":"(?i)\\\\b(abs|acos|asin|atan|atn2|ceiling|cos|cot|degrees|exp|floor|log|log10|pi|power|radians|rand|round|sign|sin|sqrt|square|tan)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.metadata.sql"}},"match":"(?i)\\\\b(app_name|applock_mode|applock_test|assemblyproperty|col_length|col_name|columnproperty|database_principal_id|databasepropertyex|db_id|db_name|file_id|file_idex|file_name|filegroup_id|filegroup_name|filegroupproperty|fileproperty|fulltextcatalogproperty|fulltextserviceproperty|index_col|indexkey_property|indexproperty|object_definition|object_id|object_name|object_schema_name|objectproperty|objectpropertyex|original_db_name|parsename|schema_id|schema_name|scope_identity|serverproperty|stats_date|type_id|type_name|typeproperty)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.ranking.sql"}},"match":"(?i)\\\\b(rank|dense_rank|ntile|row_number)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.rowset.sql"}},"match":"(?i)\\\\b(generate_series|opendatasource|openjson|openrowset|openquery|openxml|predict|string_split)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.security.sql"}},"match":"(?i)\\\\b(certencoded|certprivatekey|current_user|database_principal_id|has_perms_by_name|is_member|is_rolemember|is_srvrolemember|original_login|permissions|pwdcompare|pwdencrypt|schema_id|schema_name|session_user|suser_id|suser_sid|suser_sname|system_user|suser_name|user_id|user_name)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.string.sql"}},"match":"(?i)\\\\b(ascii|char|charindex|concat|difference|format|left|len|lower|ltrim|nchar|nodes|patindex|quotename|replace|replicate|reverse|right|rtrim|soundex|space|str|string_agg|string_escape|string_split|stuff|substring|translate|trim|unicode|upper)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.system.sql"}},"match":"(?i)\\\\b(binary_checksum|checksum|compress|connectionproperty|context_info|current_request_id|current_transaction_id|decompress|error_line|error_message|error_number|error_procedure|error_severity|error_state|formatmessage|get_filestream_transaction_context|getansinull|host_id|host_name|isnull|isnumeric|min_active_rowversion|newid|newsequentialid|rowcount_big|session_context|session_id|xact_state)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.textimage.sql"}},"match":"(?i)\\\\b(patindex|textptr|textvalid)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.vector.sql"}},"match":"(?i)\\\\b(vector_(?:distance|norm|normalize))\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"constant.other.database-name.sql"},"2":{"name":"constant.other.table-name.sql"}},"match":"(\\\\w+?)\\\\.(\\\\w+)"},{"include":"#strings"},{"include":"#regexps"},{"match":"\\\\b(?i)(abort|abort_after_wait|absent|absolute|accent_sensitivity|acceptable_cursopt|acp|action|activation|add|address|admin|aes_128|aes_192|aes_256|affinity|after|aggregate|algorithm|all_constraints|all_errormsgs|all_indexes|all_levels|all_results|allow_connections|allow_dup_row|allow_encrypted_value_modifications|allow_page_locks|allow_row_locks|allow_snapshot_isolation|alter|altercolumn|always|anonymous|ansi_defaults|ansi_null_default|ansi_null_dflt_off|ansi_null_dflt_on|ansi_nulls|ansi_padding|ansi_warnings|appdomain|append|application|apply|arithabort|arithignore|array|assembly|asymmetric|asynchronous_commit|at|atan2|atomic|attach|attach_force_rebuild_log|attach_rebuild_log|audit|auth_realm|authentication|auto|auto_cleanup|auto_close|auto_create_statistics|auto_drop|auto_shrink|auto_update_statistics|auto_update_statistics_async|automated_backup_preference|automatic|autopilot|availability|availability_mode|backup|backup_priority|base64|basic|batches|batchsize|before|between|bigint|binary|binding|bit|block|blockers|blocksize|bmk|both|break|broker|broker_instance|bucket_count|buffer|buffercount|bulk_logged|by|call|caller|card|case|catalog|catch|cert|certificate|change_retention|change_tracking|change_tracking_context|changes|char|character|character_set|check_expiration|check_policy|checkconstraints|checkindex|checkpoint|checksum|cleanup_policy|clear|clear_port|close|clustered|codepage|collection|column_encryption_key|column_master_key|columnstore|columnstore_archive|colv_80_to_100|colv_100_to_80|commit_differential_base|committed|compatibility_level|compress_all_row_groups|compression|compression_delay|concat_null_yields_null|concatenate|configuration|connect|connection|containment|continue|continue_after_error|contract|contract_name|control|conversation|conversation_group_id|conversation_handle|copy|copy_only|count_rows|counter|create(\\\\\\\\s+or\\\\\\\\s+alter)?|credential|cross|cryptographic|cryptographic_provider|cube|cursor|cursor_close_on_commit|cursor_default|data|data_compression|data_flush_interval_seconds|data_mirroring|data_purity|data_source|database|database_name|database_snapshot|datafiletype|date_correlation_optimization|date|datefirst|dateformat|date_format|datetime2??|datetimeoffset|day(s)?|db_chaining|dbid|dbidexec|dbo_only|deadlock_priority|deallocate|dec|decimal|declare|decrypt|decrypt_a|decryption|default_database|default_fulltext_language|default_language|default_logon_domain|default_schema|definition|delay|delayed_durability|delimitedtext|density_vector|dependent|des|description|desired_state|desx|differential|digest|disable|disable_broker|disable_def_cnst_chk|disabled|disk|distinct|distributed|distribution|drop|drop_existing|dts_buffers|dump|durability|dynamic|edition|elements|else|emergency|empty|enable|enable_broker|enabled|encoding|encrypted|encrypted_value|encryption|encryption_type|end|endpoint|endpoint_url|enhancedintegrity|entry|error_broker_conversations|errorfile|estimateonly|event|except|exec|executable|execute|exists|expand|expiredate|expiry_date|explicit|external|external_access|failover|failover_mode|failure_condition_level|fast|fast_forward|fastfirstrow|federated_service_account|fetch|field_terminator|fieldterminator|file|filelistonly|filegroup|filegrowth|filename|filestream|filestream_log|filestream_on|filetable|file_format|filter|first_row|fips_flagger|fire_triggers|first|firstrow|float|flush_interval_seconds|fmtonly|following|for|force|force_failover_allow_data_loss|force_service_allow_data_loss|forced|forceplan|formatfile|format_options|format_type|formsof|forward_only|free_cursors|free_exec_context|fullscan|fulltext|fulltextall|fulltextkey|function|generated|get|geography|geometry|global|go|goto|governor|guid|hadoop|hardening|hash|hashed|header_limit|headeronly|health_check_timeout|hidden|hierarchyid|histogram|histogram_steps|hits_cursors|hits_exec_context|hour(s)?|http|identity|identity_value|if|ifnull|ignore|ignore_constraints|ignore_dup_key|ignore_dup_row|ignore_triggers|image|immediate|implicit_transactions|include|include_null_values|incremental|index|inflectional|init|initiator|insensitive|insert|instead|int|integer|integrated|intersect|intermediate|interval_length_minutes|into|inuse_cursors|inuse_exec_context|io|is|isabout|iso_week|isolation|job_tracker_location|json|keep|keep_nulls|keep_replication|keepdefaults|keepfixed|keepidentity|keepnulls|kerberos|key|key_path|key_source|key_store_provider_name|keyset|kill|kilobytes_per_batch|labelonly|langid|language|last|lastrow|leading|legacy_cardinality_estimation|length|level|lifetime|lineage_80_to_100|lineage_100_to_80|listener_ip|listener_port|load|loadhistory|lob_compaction|local|local_service_name|locate|location|lock_escalation|lock_timeout|lockres|log|login|login_type|loop|manual|mark_in_use_for_removal|masked|master|match|matched|max_queue_readers|max_duration|max_outstanding_io_per_volume|maxdop|maxerrors|maxlength|maxtransfersize|max_plans_per_query|max_storage_size_mb|mediadescription|medianame|mediapassword|memogroup|memory_optimized|merge|message|message_forward_size|message_forwarding|microsecond|millisecond|minute(s)?|mirror_address|misses_cursors|misses_exec_context|mixed|modify|money|month|move|multi_user|must_change|name|namespace|nanosecond|native|native_compilation|nchar|ncharacter|nested_triggers|never|new_account|new_broker|newname|next|no|no_browsetable|no_checksum|no_compression|no_infomsgs|no_triggers|no_truncate|nocount|noexec|noexpand|noformat|noinit|nolock|nonatomic|nonclustered|nondurable|none|norecompute|norecovery|noreset|norewind|noskip|not|notification|nounload|now|nowait|ntext|ntlm|nulls|numeric|numeric_roundabort|nvarchar|object|objid|oem|offline|old_account|online|operation_mode|open|openjson|optimistic|option|orc|out|outer|output|over|override|owner|ownership|pad_index|page|page_checksum|page_verify|pagecount|paglock|param|parameter_sniffing|parameter_type_expansion|parameterization|parquet|parseonly|partial|partition|partner|password|path|pause|percentage|permission_set|persisted|period|physical_only|plan_forcing_mode|policy|pool|population|ports|preceding|precision|predicate|presume_abort|primary|primary_role|print|prior|priority |priority_level|private|proc(edure)?|procedure_name|profile|provider|quarter|query_capture_mode|query_governor_cost_limit|query_optimizer_hotfixes|query_store|queue|quoted_identifier|raiserror|range|raw|rcfile|rc2|rc4|rc4_128|rdbms|read_committed_snapshot|read|read_only|read_write|readcommitted|readcommittedlock|readonly|readpast|readuncommitted|readwrite|real|rebuild|receive|recmodel_70backcomp|recompile|reconfigure|recovery|recursive|recursive_triggers|redo_queue|reject_sample_value|reject_type|reject_value|relative|remote|remote_data_archive|remote_proc_transactions|remote_service_name|remove|removed_cursors|removed_exec_context|reorganize|repeat|repeatable|repeatableread|replace|replica|replicated|replnick_100_to_80|replnickarray_80_to_100|replnickarray_100_to_80|required|required_cursopt|resample|reset|resource|resource_manager_location|respect|restart|restore|restricted_user|resume|retaindays|retention|return|revert|rewind|rewindonly|returns|robust|role|rollup|root|round_robin|route|row|rowdump|rowguidcol|rowlock|row_terminator|rows|rows_per_batch|rowsets_only|rowterminator|rowversion|rsa_1024|rsa_2048|rsa_3072|rsa_4096|rsa_512|safe|safety|sample|save|scalar|schema|schemabinding|scoped|scroll|scroll_locks|sddl|second|secexpr|seconds|secondary|secondary_only|secondary_role|secret|security|securityaudit|selective|self|send|sent|sequence|serde_method|serializable|server|service|service_broker|service_name|service_objective|session_timeout|sessions??|seterror|setopts|sets|shard_map_manager|shard_map_name|sharded|shared_memory|shortest_path|show_statistics|showplan_all|showplan_text|showplan_xml|showplan_xml_with_recompile|shrinkdb|shutdown|sid|signature|simple|single_blob|single_clob|single_nclob|single_user|singleton|site|size|size_based_cleanup_mode|skip|smalldatetime|smallint|smallmoney|snapshot|snapshot_import|snapshotrestorephase|soap|softnuma|sort_in_tempdb|sorted_data|sorted_data_reorg|spatial|sql|sql_bigint|sql_binary|sql_bit|sql_char|sql_date|sql_decimal|sql_double|sql_float|sql_guid|sql_handle|sql_longvarbinary|sql_longvarchar|sql_numeric|sql_real|sql_smallint|sql_time|sql_timestamp|sql_tinyint|sql_tsi_day|sql_tsi_frac_second|sql_tsi_hour|sql_tsi_minute|sql_tsi_month|sql_tsi_quarter|sql_tsi_second|sql_tsi_week|sql_tsi_year|sql_type_date|sql_type_time|sql_type_timestamp|sql_varbinary|sql_varchar|sql_variant|sql_wchar|sql_wlongvarchar|ssl|ssl_port|standard|standby|start|start_date|started|stat_header|state|statement|static|statistics|statistics_incremental|statistics_norecompute|statistics_only|statman|stats|stats_stream|status|stop|stop_on_error|stopat|stopatmark|stopbeforemark|stoplist|stopped|string_delimiter|subject|supplemental_logging|supported|suspend|symmetric|synchronous_commit|synonym|sysname|system|system_time|system_versioning|table|tableresults|tablockx??|take|tape|target|target_index|target_partition|target_recovery_time|tcp|temporal_history_retention|text|textimage_on|then|thesaurus|throw|time|timeout|timestamp|tinyint|top??|torn_page_detection|track_columns_updated|trailing|tran|transaction|transfer|transform_noise_words|triple_des|triple_des_3key|truncate|trustworthy|try|tsql|two_digit_year_cutoff|type|type_desc|type_warning|tzoffset|uid|unbounded|uncommitted|unique|uniqueidentifier|unlimited|unload|unlock|unsafe|updlock|url|use|useplan|useroptions|use_type_default|using|utcdatetime|valid_xml|validation|values??|varbinary|varchar|vector|verbose|verifyonly|version|view_metadata|virtual_device|visiblity|wait_at_low_priority|waitfor|webmethod|week|weekday|weight|well_formed_xml|when|while|widechar|widechar_ansi|widenative|windows??|with|within|within group|witness|without|without_array_wrapper|workload|wsdl|xact_abort|xlock|xml|xmlschema|xquery|xsinil|year|zone)\\\\b","name":"keyword.other.sql"},{"captures":{"1":{"name":"punctuation.section.scope.begin.sql"},"2":{"name":"punctuation.section.scope.end.sql"}},"match":"(\\\\()(\\\\))","name":"meta.block.sql"}],"repository":{"comment-block":{"begin":"/\\\\*","captures":{"0":{"name":"punctuation.definition.comment.sql"}},"end":"\\\\*/","name":"comment.block","patterns":[{"include":"#comment-block"}]},"comments":{"patterns":[{"begin":"(^[\\\\t ]+)?(?=--)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.sql"}},"end":"(?!\\\\G)","patterns":[{"begin":"--","beginCaptures":{"0":{"name":"punctuation.definition.comment.sql"}},"end":"\\\\n","name":"comment.line.double-dash.sql"}]},{"begin":"(^[\\\\t ]+)?(?=#)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.sql"}},"end":"(?!\\\\G)","patterns":[]},{"include":"#comment-block"}]},"regexps":{"patterns":[{"begin":"/(?=\\\\S.*/)","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"/","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.regexp.sql","patterns":[{"include":"#string_interpolation"},{"match":"\\\\\\\\/","name":"constant.character.escape.slash.sql"}]},{"begin":"%r\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.regexp.modr.sql","patterns":[{"include":"#string_interpolation"}]}]},"string_escape":{"match":"\\\\\\\\.","name":"constant.character.escape.sql"},"string_interpolation":{"captures":{"1":{"name":"punctuation.definition.string.begin.sql"},"3":{"name":"punctuation.definition.string.end.sql"}},"match":"(#\\\\{)([^}]*)(})","name":"string.interpolated.sql"},"strings":{"patterns":[{"captures":{"2":{"name":"punctuation.definition.string.begin.sql"},"3":{"name":"punctuation.definition.string.end.sql"}},"match":"(?:(?<![0-9A-Z_a-z])(N))?(\')[^\']*(\')","name":"string.quoted.single.sql"},{"begin":"\'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"\'","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.quoted.single.sql","patterns":[{"include":"#string_escape"}]},{"captures":{"1":{"name":"punctuation.definition.string.begin.sql"},"2":{"name":"punctuation.definition.string.end.sql"}},"match":"(`)[^\\\\\\\\`]*(`)","name":"string.quoted.other.backtick.sql"},{"begin":"`","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"`","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.quoted.other.backtick.sql","patterns":[{"include":"#string_escape"}]},{"captures":{"1":{"name":"punctuation.definition.string.begin.sql"},"2":{"name":"punctuation.definition.string.end.sql"}},"match":"(\\")[^\\"#]*(\\")","name":"string.quoted.double.sql"},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.quoted.double.sql","patterns":[{"include":"#string_interpolation"}]},{"begin":"%\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.other.quoted.brackets.sql","patterns":[{"include":"#string_interpolation"}]}]}},"scopeName":"source.sql"}')),Xr=[e];
|
|
2
|
+
export{Xr};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function Ln(e,a){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(a).domain(e);break}return this}export{Ln};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t,a}from"./chunk-v2bkkhb8.js";import{he,Tn,En}from"./chunk-mhzqgzh0.js";import{re}from"./chunk-mwfrxgbs.js";import{Sa,gn}from"./chunk-53cg6pxm.js";var i=Sa().RailroadPeg.parser.LangiumParser,s=t((e)=>{let r=e.alternatives.map(l);if(r.length===1)return r[0];return{type:"choice",alternatives:r}},"transformOrderedChoice"),l=t((e)=>{let r=e.elements.map(m);if(r.length===1)return r[0];return{type:"sequence",elements:r}},"transformSequence"),m=t((e)=>{let r=p(e.suffix);if(!e.operator)return r;return{type:"special",text:e.operator==="&"?`&${o(r)}`:`!${o(r)}`}},"transformPrefix"),o=t((e)=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),p=t((e)=>{let r=u(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),u=t((e)=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return s(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),c=t((e)=>({name:e.name,definition:s(e.definition)}),"transformRule"),f=t((e)=>{if(re(e,he),e.title)he.setTitle(e.title);e.rules.map((r)=>he.addRule(c(r)))},"populateDb"),d={parse:t((e)=>{he.clear(),a.debug("[PEG Parser] Starting Langium parse");let r=i.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new gn(r);let n=r.value;a.debug("[PEG Parser] Parsed rules:",n.rules.length),f(n),a.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:he}},w={parser:d,db:he,renderer:En,styles:Tn};export{w as diagram};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{N,r,e,n,et,Ht,Z,ge,Qs}from"./chunk-qjg6dw46.js";function T(s){let a=N(et);a?.useTheme?.();let t=s.payload,[i,m]=r(!1);if(!t||t.state==="pending")return null;let h=t.questions.map((o)=>o.header).join(" · "),l=t.state==="answered",u=l?Z:Ht,d=l?"text-success":"text-faint",f=l?"已回答":t.state==="dismissed"?"已忽略提问":"提问已取消",p=l?C(t):h;if(a){let{Collapsible:o,CollapsibleTrigger:y,CollapsibleContent:v,Chevron:b,cn:g}=a;return n(o,{open:i,onOpenChange:m,className:"w-full text-xs text-ink/90 animate-fade",children:[n(y,{className:a.style("chat.timelineRow","cursor-pointer select-none"),children:[e("span",{className:"flex size-4 shrink-0 items-center justify-center",children:e(u,{className:g("size-3.5",d)})}),e("span",{className:"shrink-0",children:f}),e("span",{className:"min-w-0 flex-1 truncate opacity-80",title:p,children:p}),e(b,{className:"size-3.5 shrink-0 text-faint opacity-0 transition-opacity group-hover/collapsible:opacity-100 group-data-[state=open]/collapsible:opacity-100"})]}),e(v,{children:e("div",{className:"mt-0.5 mb-1.5 ml-2 border-l border-line py-1 pl-[15px]",children:e(x,{question:t})})})]})}return n("div",{role:"status",className:"w-full animate-fade",children:[n("button",{type:"button","aria-expanded":i,className:"group -mx-2 flex w-[calc(100%+1rem)] cursor-pointer items-center gap-2 rounded-lg px-2 py-1 text-left text-[12.5px] text-faint transition-colors select-none hover:bg-raised/60 hover:text-dim",onClick:()=>m((o)=>!o),children:[e("span",{className:"flex size-4 shrink-0 items-center justify-center",children:e(u,{className:`size-3.5 shrink-0 ${d}`})}),e("span",{className:"shrink-0",children:f}),e("span",{className:"min-w-0 flex-1 truncate opacity-80",title:p,children:p}),e(ge,{className:`size-3.5 shrink-0 text-faint opacity-0 transition-[opacity,transform] group-hover:opacity-100 ${i?"rotate-180 opacity-100":""}`})]}),i&&e("div",{className:"mt-0.5 mb-1.5 ml-2 border-l border-line py-1 pl-[15px]",children:e(x,{question:t})})]})}function c(s){if(!s)return"未作答";let a=s.selected.map((t)=>Qs(t).title);if(s.other)a.push(`其他:${s.other}`);return a.length?a.join("、"):"未作答"}function C(s){if(s.questions.length===1)return`${s.questions[0]?.header??""} · ${c(s.answers?.[0])}`;return s.questions.map((a,t)=>`${a.header} → ${c(s.answers?.[t])}`).join(";")}function x(s){let a=s.question;return e("div",{className:"space-y-2 text-xs",children:a.questions.map((t,i)=>n("div",{className:"space-y-0.5",children:[n("div",{className:"text-dim",children:[e("span",{className:"font-medium text-ink/90",children:t.header})," · ",t.question]}),e("div",{className:"text-ink",children:c(a.answers?.[i])})]},t.header))})}export{T as QuestionCard};
|
|
Binary file
|
|
Binary file
|