zen-code 4.8.5 → 4.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.js +150 -162
- package/dist/{chunk-pbe0n109.js → chunk-02vv5584.js} +1 -1
- package/dist/{chunk-3fp2k4jh.js → chunk-0a26n1zy.js} +2 -2
- package/dist/{chunk-hbhwzk5x.js → chunk-0f022x9v.js} +1 -1
- package/dist/{chunk-ya599ak5.js → chunk-0kqqh5rr.js} +2 -2
- package/dist/{chunk-hps6tv25.js → chunk-141pasd6.js} +2 -2
- package/dist/{chunk-gs9s59d4.js → chunk-1rnd4taj.js} +1 -1
- package/dist/chunk-2e7zh8he.js +1 -0
- package/dist/chunk-2y73pxem.js +1 -0
- package/dist/{chunk-j7f3n1aj.js → chunk-4fwb6qr1.js} +1 -1
- package/dist/{chunk-xf4jswm4.js → chunk-5kmnxyd8.js} +1 -1
- package/dist/chunk-6hpehtte.js +2 -0
- package/dist/chunk-6yeg1jc7.js +1 -0
- package/dist/{chunk-m0e2jefq.js → chunk-8vkm1ts6.js} +2 -2
- package/dist/{chunk-v5mgjgc4.js → chunk-8ypsygqy.js} +2 -2
- package/dist/chunk-903s8sk9.js +1 -0
- package/dist/{chunk-pp1gnpdp.js → chunk-aeambwc5.js} +3 -3
- package/dist/{chunk-7en8vahs.js → chunk-bzgj8aae.js} +1 -1
- package/dist/{chunk-45bkb77s.js → chunk-c6nzmyns.js} +2 -2
- package/dist/chunk-cqrb18vt.js +1 -0
- package/dist/chunk-czbkc7pc.js +1 -0
- package/dist/{chunk-558jjzha.js → chunk-ed6aprzz.js} +1 -1
- package/dist/chunk-ema4rc9d.js +2 -0
- package/dist/{chunk-zssv316b.js → chunk-emv4z7ck.js} +66 -66
- package/dist/chunk-f4tc5awt.js +1 -0
- package/dist/chunk-f7d0m4h3.js +1 -0
- package/dist/chunk-favbv2tp.js +1 -0
- package/dist/{chunk-dv9rvc0a.js → chunk-fbg1z6br.js} +1 -1
- package/dist/{chunk-jfecjzq0.js → chunk-fnrbq03p.js} +2 -2
- package/dist/{chunk-nr26055z.js → chunk-fzn8xq6f.js} +1 -1
- package/dist/{chunk-7khrhe0x.js → chunk-g1bcpymb.js} +2 -2
- package/dist/chunk-gar31nyn.js +1 -0
- package/dist/{chunk-a36ttbrq.js → chunk-hqyfg97v.js} +2 -2
- package/dist/chunk-jn4j9rm3.js +1 -0
- package/dist/{chunk-cpvvtyt1.js → chunk-jsagr88c.js} +2 -2
- package/dist/{chunk-ydkkycp3.js → chunk-jwzkek1t.js} +2 -2
- package/dist/chunk-mdkwbajq.js +2 -0
- package/dist/{chunk-j3tfxj8n.js → chunk-mfjc63aw.js} +1 -1
- package/dist/{chunk-8cbtae81.js → chunk-mhfjwkg9.js} +1 -1
- package/dist/chunk-mqbn36h4.js +1 -0
- package/dist/chunk-p1bn8p65.js +1 -0
- package/dist/{chunk-7wxg0yef.js → chunk-p8fbtgk3.js} +1 -1
- package/dist/{chunk-6mcx89fj.js → chunk-ph818by4.js} +1 -1
- package/dist/{chunk-mrapdjm5.js → chunk-pw18cs39.js} +2 -2
- package/dist/{chunk-a51szmhp.js → chunk-pww7x4hb.js} +1 -1
- package/dist/{chunk-k4ftjnx7.js → chunk-py5g6yc2.js} +1 -1
- package/dist/{chunk-eemwtwb1.js → chunk-pyw1vxnf.js} +1 -1
- package/dist/{chunk-rayth86k.js → chunk-q87zdrxp.js} +1 -1
- package/dist/{chunk-3acyh64g.js → chunk-s6gzrjxk.js} +1 -1
- package/dist/chunk-scddrzwd.js +1 -0
- package/dist/{chunk-aekjcqbv.js → chunk-spvbvpx5.js} +1 -1
- package/dist/chunk-t15ptqbm.js +1 -0
- package/dist/{chunk-3j3wmx6g.js → chunk-tvqxepjm.js} +1 -1
- package/dist/{chunk-k8ygzjvv.js → chunk-vyejbw66.js} +1 -1
- package/dist/{chunk-crrspdy9.js → chunk-xemvstcq.js} +2 -2
- package/dist/cli.js +1 -1
- package/dist/nonInteractive.js +1 -1
- package/dist/zen-keyboard.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-06dj0dnz.js +0 -1
- package/dist/chunk-0cbmnyee.js +0 -1
- package/dist/chunk-0cknr23d.js +0 -1
- package/dist/chunk-0jtrg9s1.js +0 -1
- package/dist/chunk-0k9tc7ys.js +0 -1
- package/dist/chunk-0kan91hr.js +0 -1
- package/dist/chunk-0kvk3r1g.js +0 -1
- package/dist/chunk-0teh8cbt.js +0 -2
- package/dist/chunk-0x0r76m6.js +0 -1
- package/dist/chunk-11ctp51v.js +0 -2
- package/dist/chunk-154dd94d.js +0 -2
- package/dist/chunk-17g5e3tb.js +0 -1
- package/dist/chunk-1b02dwxw.js +0 -1
- package/dist/chunk-1ck3yagm.js +0 -1
- package/dist/chunk-1fmdjx58.js +0 -1
- package/dist/chunk-1m8bmdzc.js +0 -1
- package/dist/chunk-1tj3j2rd.js +0 -1
- package/dist/chunk-1xdz3wdt.js +0 -1
- package/dist/chunk-1xjj19pz.js +0 -1
- package/dist/chunk-1z3yy9vz.js +0 -1
- package/dist/chunk-1zbnmy0p.js +0 -1
- package/dist/chunk-21gm4tm7.js +0 -1
- package/dist/chunk-2215g4qb.js +0 -2
- package/dist/chunk-250846sw.js +0 -1
- package/dist/chunk-2a6kan82.js +0 -1
- package/dist/chunk-2cfemb9q.js +0 -1
- package/dist/chunk-2evyqqz7.js +0 -2
- package/dist/chunk-2f9mf6mw.js +0 -2
- package/dist/chunk-2mrbrsta.js +0 -1
- package/dist/chunk-2tg0fzzw.js +0 -2
- package/dist/chunk-2yk5xgha.js +0 -1
- package/dist/chunk-2z60cf4h.js +0 -1
- package/dist/chunk-2zqq58q6.js +0 -2
- package/dist/chunk-3009w43m.js +0 -1
- package/dist/chunk-3b8scss4.js +0 -1
- package/dist/chunk-3d8rzv4d.js +0 -1
- package/dist/chunk-3emyjvqg.js +0 -1
- package/dist/chunk-3rew4tyk.js +0 -1
- package/dist/chunk-3s3b7nzy.js +0 -1
- package/dist/chunk-3w98g1h4.js +0 -1
- package/dist/chunk-3x564va6.js +0 -2
- package/dist/chunk-4agrg21g.js +0 -1
- package/dist/chunk-4asb3qnd.js +0 -1
- package/dist/chunk-4k15drqf.js +0 -1
- package/dist/chunk-4vhwsrc0.js +0 -1
- package/dist/chunk-4yddzp8e.js +0 -1
- package/dist/chunk-53agfxhn.js +0 -1
- package/dist/chunk-54kyvbh7.js +0 -1
- package/dist/chunk-56q8b04m.js +0 -1
- package/dist/chunk-59vj8mx3.js +0 -1
- package/dist/chunk-5bvkhjg1.js +0 -1
- package/dist/chunk-5m8gh94n.js +0 -1
- package/dist/chunk-5n57csbz.js +0 -1
- package/dist/chunk-5n6g25gc.js +0 -1
- package/dist/chunk-5rmyjm7a.js +0 -1
- package/dist/chunk-5wkah698.js +0 -1
- package/dist/chunk-6180vb4q.js +0 -2
- package/dist/chunk-63ncy5kr.js +0 -1
- package/dist/chunk-66sfgeag.js +0 -1
- package/dist/chunk-6ag9x0z1.js +0 -1
- package/dist/chunk-6bhkrdb2.js +0 -1
- package/dist/chunk-6cs4tf5a.js +0 -1
- package/dist/chunk-6czm9v10.js +0 -1
- package/dist/chunk-6dm27qn5.js +0 -1
- package/dist/chunk-6eyx9kb0.js +0 -1
- package/dist/chunk-6fsb1bxc.js +0 -1
- package/dist/chunk-6qbdcv3t.js +0 -1
- package/dist/chunk-6qyeer8n.js +0 -1
- package/dist/chunk-6r5npryc.js +0 -1
- package/dist/chunk-6rhb6xym.js +0 -1
- package/dist/chunk-6vhg46d2.js +0 -1
- package/dist/chunk-6yb36qx6.js +0 -1
- package/dist/chunk-72cdrnwv.js +0 -1
- package/dist/chunk-731nq1br.js +0 -1
- package/dist/chunk-748hk53z.js +0 -1
- package/dist/chunk-774cjjgt.js +0 -1
- package/dist/chunk-77chzpqs.js +0 -1
- package/dist/chunk-77qt7n70.js +0 -1
- package/dist/chunk-7cenjy4r.js +0 -2
- package/dist/chunk-7d4h6qkf.js +0 -1
- package/dist/chunk-7k80bxbe.js +0 -1
- package/dist/chunk-7khjf5c1.js +0 -1
- package/dist/chunk-7m0c57rj.js +0 -1
- package/dist/chunk-7n5b43s8.js +0 -1
- package/dist/chunk-7pwrx1pp.js +0 -1
- package/dist/chunk-7v4352jx.js +0 -1
- package/dist/chunk-7w75nxwb.js +0 -1
- package/dist/chunk-7wa89vcy.js +0 -1
- package/dist/chunk-7yf45m28.js +0 -1
- package/dist/chunk-7z7g35xf.js +0 -1
- package/dist/chunk-82xzyhyv.js +0 -1
- package/dist/chunk-87w9rexn.js +0 -1
- package/dist/chunk-8arg48f8.js +0 -1
- package/dist/chunk-8ee7jvcr.js +0 -1
- package/dist/chunk-8gm5e25z.js +0 -1
- package/dist/chunk-8jhmnz2v.js +0 -1
- package/dist/chunk-8qh81vdm.js +0 -1
- package/dist/chunk-8vr1wy0r.js +0 -1
- package/dist/chunk-917pj3vx.js +0 -1
- package/dist/chunk-91gd665t.js +0 -1
- package/dist/chunk-92pjraxh.js +0 -2
- package/dist/chunk-9ft87v6s.js +0 -2
- package/dist/chunk-9h0v5e0k.js +0 -2
- package/dist/chunk-9hnbyswz.js +0 -1
- package/dist/chunk-9hznfyjs.js +0 -1
- package/dist/chunk-9mjq1xxc.js +0 -1
- package/dist/chunk-9nb6v3q0.js +0 -2
- package/dist/chunk-9phx46cq.js +0 -2
- package/dist/chunk-9rmve4r4.js +0 -1
- package/dist/chunk-9xaygaay.js +0 -2
- package/dist/chunk-a4vdvjsr.js +0 -1
- package/dist/chunk-ae57mcvq.js +0 -1
- package/dist/chunk-aeajq5ft.js +0 -1
- package/dist/chunk-ah557n6f.js +0 -1
- package/dist/chunk-am5r5ynh.js +0 -1
- package/dist/chunk-asdze5kz.js +0 -1
- package/dist/chunk-av215sh3.js +0 -1
- package/dist/chunk-b1czvr4n.js +0 -1
- package/dist/chunk-b3g51e2m.js +0 -1
- package/dist/chunk-b4qvb571.js +0 -1
- package/dist/chunk-bba2g9qj.js +0 -1
- package/dist/chunk-be8bz8xh.js +0 -1
- package/dist/chunk-bh05aqrf.js +0 -2
- package/dist/chunk-bjctrgpr.js +0 -1
- package/dist/chunk-bjqn0pzz.js +0 -1
- package/dist/chunk-bnrv5f66.js +0 -2
- package/dist/chunk-bqzvv2dy.js +0 -1
- package/dist/chunk-bs9fj12n.js +0 -1
- package/dist/chunk-bwcdkk1e.js +0 -2
- package/dist/chunk-bz79zq7h.js +0 -1
- package/dist/chunk-bzanqq7a.js +0 -1
- package/dist/chunk-cayjw3gk.js +0 -1
- package/dist/chunk-ceb97hw6.js +0 -1
- package/dist/chunk-ctet86gc.js +0 -1
- package/dist/chunk-ctp90f8y.js +0 -1
- package/dist/chunk-cv5akzkw.js +0 -1
- package/dist/chunk-d9hpz80s.js +0 -2
- package/dist/chunk-denz6x2z.js +0 -1
- package/dist/chunk-dnpybaez.js +0 -1
- package/dist/chunk-dp2418kp.js +0 -1
- package/dist/chunk-dpa9tgf6.js +0 -2
- package/dist/chunk-dxg8cctv.js +0 -2
- package/dist/chunk-dz0229fs.js +0 -1
- package/dist/chunk-e8pjcdmj.js +0 -1
- package/dist/chunk-edkft0pe.js +0 -1
- package/dist/chunk-ejh8spnd.js +0 -1
- package/dist/chunk-emjqnzzj.js +0 -1
- package/dist/chunk-er06b5kx.js +0 -2
- package/dist/chunk-esskh0ge.js +0 -1
- package/dist/chunk-ewx6fr7a.js +0 -1
- package/dist/chunk-ewxacd5v.js +0 -1
- package/dist/chunk-ez2xn1tq.js +0 -1
- package/dist/chunk-ezh4rq18.js +0 -1
- package/dist/chunk-f1gz54zs.js +0 -1
- package/dist/chunk-f2p8rps5.js +0 -1
- package/dist/chunk-f3mf8qk2.js +0 -1
- package/dist/chunk-f51sey9j.js +0 -1
- package/dist/chunk-f8c6jyrc.js +0 -1
- package/dist/chunk-fb70a9sy.js +0 -1
- package/dist/chunk-fd4dk58v.js +0 -1
- package/dist/chunk-fdhzjb42.js +0 -1
- package/dist/chunk-fftvnc8t.js +0 -1
- package/dist/chunk-ffzytaw1.js +0 -1
- package/dist/chunk-fm3k6prw.js +0 -1
- package/dist/chunk-fs5s90mk.js +0 -1
- package/dist/chunk-fvhtfw18.js +0 -1
- package/dist/chunk-g3p0vcay.js +0 -2
- package/dist/chunk-gaw2bhff.js +0 -1
- package/dist/chunk-gbrg4c7y.js +0 -1
- package/dist/chunk-gkhxerej.js +0 -1
- package/dist/chunk-gps0pyf7.js +0 -1
- package/dist/chunk-gsnrqmzp.js +0 -1
- package/dist/chunk-gvjvbwk6.js +0 -1
- package/dist/chunk-gxc7a8cz.js +0 -1
- package/dist/chunk-h06hyckd.js +0 -1
- package/dist/chunk-h0b5na4r.js +0 -1
- package/dist/chunk-h1bjeyn7.js +0 -1
- package/dist/chunk-h5y1vfrx.js +0 -1
- package/dist/chunk-hgkaxnh7.js +0 -1
- package/dist/chunk-hgs9vzm2.js +0 -1
- package/dist/chunk-hjs9ffqg.js +0 -1
- package/dist/chunk-hmtm22t7.js +0 -1
- package/dist/chunk-hraqhe5e.js +0 -1
- package/dist/chunk-hsq3vxna.js +0 -2
- package/dist/chunk-htns6qnb.js +0 -1
- package/dist/chunk-hv4arqm5.js +0 -1
- package/dist/chunk-hzqb4sy6.js +0 -1
- package/dist/chunk-j0szwqey.js +0 -1
- package/dist/chunk-j6s60n91.js +0 -1
- package/dist/chunk-j9za9ext.js +0 -1
- package/dist/chunk-ja5m6q40.js +0 -1
- package/dist/chunk-jdvv96q7.js +0 -1
- package/dist/chunk-jsqwhbbt.js +0 -1
- package/dist/chunk-jyrs3ysr.js +0 -1
- package/dist/chunk-jz8tmenz.js +0 -1
- package/dist/chunk-k17n7dpm.js +0 -1
- package/dist/chunk-k1yv7tpj.js +0 -1
- package/dist/chunk-k626mmdc.js +0 -1
- package/dist/chunk-ka0pqrag.js +0 -1
- package/dist/chunk-kbgd9vsz.js +0 -1
- package/dist/chunk-kc6rwv2m.js +0 -1
- package/dist/chunk-kc8375a8.js +0 -1
- package/dist/chunk-kgj1ssyj.js +0 -1
- package/dist/chunk-kk4w0prd.js +0 -1
- package/dist/chunk-kkks4cbp.js +0 -1
- package/dist/chunk-kq7y5ybe.js +0 -1
- package/dist/chunk-kqemj8nq.js +0 -1
- package/dist/chunk-kr6cv1mp.js +0 -1
- package/dist/chunk-kvb035wf.js +0 -2
- package/dist/chunk-kx3dsqc5.js +0 -1
- package/dist/chunk-kys8sc0j.js +0 -1
- package/dist/chunk-m0vtra47.js +0 -1
- package/dist/chunk-m9xdbw2j.js +0 -1
- package/dist/chunk-mft6e1b3.js +0 -1
- package/dist/chunk-mfyvxat8.js +0 -1
- package/dist/chunk-mjfe9s8t.js +0 -1
- package/dist/chunk-mns6edxc.js +0 -1
- package/dist/chunk-mp159559.js +0 -2
- package/dist/chunk-mrbn4knm.js +0 -1
- package/dist/chunk-ms3sqsez.js +0 -1
- package/dist/chunk-mtyqtnv0.js +0 -1
- package/dist/chunk-mvb82v3n.js +0 -1
- package/dist/chunk-n08dw2ke.js +0 -1
- package/dist/chunk-n0sxg10w.js +0 -1
- package/dist/chunk-n3xjke41.js +0 -1
- package/dist/chunk-n6v7menj.js +0 -1
- package/dist/chunk-n8apqh5d.js +0 -1
- package/dist/chunk-n8f65qbg.js +0 -1
- package/dist/chunk-n92ey5c2.js +0 -1
- package/dist/chunk-na5z94zg.js +0 -2
- package/dist/chunk-nbkkf36e.js +0 -1
- package/dist/chunk-ndk5mkc1.js +0 -1
- package/dist/chunk-nks89eba.js +0 -1
- package/dist/chunk-nrkhbe10.js +0 -1
- package/dist/chunk-nvnw7mcb.js +0 -1
- package/dist/chunk-nwx5cbjc.js +0 -1
- package/dist/chunk-ny61b4ve.js +0 -1
- package/dist/chunk-p7ha3t1f.js +0 -1
- package/dist/chunk-pc3w4gkp.js +0 -1
- package/dist/chunk-pcwsyc9b.js +0 -1
- package/dist/chunk-pj843s6s.js +0 -1
- package/dist/chunk-pm5gceg0.js +0 -1
- package/dist/chunk-pqq81gzv.js +0 -1
- package/dist/chunk-pt1m6xh9.js +0 -1
- package/dist/chunk-pvzfgkkq.js +0 -1
- package/dist/chunk-pz4hhw24.js +0 -1
- package/dist/chunk-pz5xskrk.js +0 -1
- package/dist/chunk-q0z3nkep.js +0 -1
- package/dist/chunk-q6m1k4fq.js +0 -1
- package/dist/chunk-q9w8vj93.js +0 -2
- package/dist/chunk-qd2hkayk.js +0 -1
- package/dist/chunk-qf60gd6x.js +0 -1
- package/dist/chunk-qpwtcr53.js +0 -1
- package/dist/chunk-qrr2ytkg.js +0 -2
- package/dist/chunk-qzy0w65x.js +0 -1
- package/dist/chunk-r5crgj5q.js +0 -1
- package/dist/chunk-r5psjv6v.js +0 -1
- package/dist/chunk-r9dm0gyn.js +0 -1
- package/dist/chunk-r9qyzgns.js +0 -1
- package/dist/chunk-raq8eqd9.js +0 -1
- package/dist/chunk-rbebjqfq.js +0 -1
- package/dist/chunk-rc81vkve.js +0 -1
- package/dist/chunk-rg8hdkt2.js +0 -1
- package/dist/chunk-rgc9k4rf.js +0 -2
- package/dist/chunk-rqvxk3e5.js +0 -2
- package/dist/chunk-rsb82wcd.js +0 -1
- package/dist/chunk-rt7af3wp.js +0 -1
- package/dist/chunk-rx707y69.js +0 -1
- package/dist/chunk-s22hm2jp.js +0 -1
- package/dist/chunk-s2wchktz.js +0 -1
- package/dist/chunk-s5yace4y.js +0 -1
- package/dist/chunk-sd65hz9x.js +0 -1
- package/dist/chunk-sdhd2kpk.js +0 -1
- package/dist/chunk-sepabvgd.js +0 -1
- package/dist/chunk-sk4n2anv.js +0 -1
- package/dist/chunk-sq9spyfd.js +0 -1
- package/dist/chunk-sv97fsr8.js +0 -1
- package/dist/chunk-sw6b067z.js +0 -1
- package/dist/chunk-sz3tq28n.js +0 -2
- package/dist/chunk-t07nqvz2.js +0 -1
- package/dist/chunk-t4vfr2g0.js +0 -1
- package/dist/chunk-t6x8a62a.js +0 -1
- package/dist/chunk-t8djp78p.js +0 -1
- package/dist/chunk-tj729ry3.js +0 -1
- package/dist/chunk-tjj6zd94.js +0 -2
- package/dist/chunk-tkp1zzgb.js +0 -1
- package/dist/chunk-tq142qfa.js +0 -1
- package/dist/chunk-tq7jpqr7.js +0 -1
- package/dist/chunk-tqh0rjpp.js +0 -1
- package/dist/chunk-tx117rah.js +0 -1
- package/dist/chunk-v3t7hcht.js +0 -1
- package/dist/chunk-v9qb0fer.js +0 -1
- package/dist/chunk-vcsqkf9c.js +0 -1
- package/dist/chunk-vd8byz1r.js +0 -2
- package/dist/chunk-vg853h8j.js +0 -1
- package/dist/chunk-vgeyt962.js +0 -1
- package/dist/chunk-vkfgx6sa.js +0 -2
- package/dist/chunk-vqpam6p8.js +0 -1
- package/dist/chunk-vrv07424.js +0 -1
- package/dist/chunk-vsydmxfh.js +0 -1
- package/dist/chunk-vtxyeepe.js +0 -2
- package/dist/chunk-vwhxfs9r.js +0 -1
- package/dist/chunk-vy4ecvry.js +0 -1
- package/dist/chunk-w46ermgd.js +0 -1
- package/dist/chunk-w5qvj179.js +0 -1
- package/dist/chunk-w93s735t.js +0 -1
- package/dist/chunk-wb08g5z8.js +0 -1
- package/dist/chunk-wb43p5km.js +0 -1
- package/dist/chunk-wb6xn1kx.js +0 -1
- package/dist/chunk-wbg38h5j.js +0 -1
- package/dist/chunk-wcyrmfpn.js +0 -1
- package/dist/chunk-wd17hcv5.js +0 -1
- package/dist/chunk-wdm62dbr.js +0 -1
- package/dist/chunk-we3jwpsb.js +0 -2
- package/dist/chunk-wgamcpyt.js +0 -1
- package/dist/chunk-whdmep96.js +0 -1
- package/dist/chunk-wkc7w10f.js +0 -1
- package/dist/chunk-wkf1j21b.js +0 -1
- package/dist/chunk-wm3z6khn.js +0 -1
- package/dist/chunk-wqvqvv9e.js +0 -1
- package/dist/chunk-wvmnb75v.js +0 -1
- package/dist/chunk-wy3eznsy.js +0 -2
- package/dist/chunk-wznpd7sd.js +0 -1
- package/dist/chunk-x01t9e3q.js +0 -1
- package/dist/chunk-x8z2fzz8.js +0 -1
- package/dist/chunk-xa4apmpd.js +0 -1
- package/dist/chunk-xcea0hn5.js +0 -2
- package/dist/chunk-xf7ypd1b.js +0 -1
- package/dist/chunk-xhjrdhgk.js +0 -1
- package/dist/chunk-xjgnj3p0.js +0 -1
- package/dist/chunk-xjwkmvfz.js +0 -1
- package/dist/chunk-xkc2ktrh.js +0 -1
- package/dist/chunk-xm9015v4.js +0 -1
- package/dist/chunk-xnx0j1hw.js +0 -1
- package/dist/chunk-y0e2ymas.js +0 -1
- package/dist/chunk-y3c3xgca.js +0 -1
- package/dist/chunk-y6mvs6yw.js +0 -1
- package/dist/chunk-y6z502pz.js +0 -1
- package/dist/chunk-ycthcn27.js +0 -1
- package/dist/chunk-ydc7pd3b.js +0 -1
- package/dist/chunk-yhxvqyz4.js +0 -1
- package/dist/chunk-ymmavdfp.js +0 -2
- package/dist/chunk-ynnaxz2z.js +0 -1
- package/dist/chunk-ywa5z7d9.js +0 -1
- package/dist/chunk-ywbbf9eh.js +0 -1
- package/dist/chunk-yzk3bfzn.js +0 -1
- package/dist/chunk-z0wdan61.js +0 -1
- package/dist/chunk-z5z774pp.js +0 -1
- package/dist/chunk-z88rcc8t.js +0 -1
- package/dist/chunk-zag96nyc.js +0 -2
- package/dist/chunk-zh77yp9z.js +0 -1
- package/dist/chunk-zjemnf8v.js +0 -1
- package/dist/chunk-zmsq5xc7.js +0 -1
- package/dist/chunk-zqxrtejz.js +0 -1
- package/dist/chunk-zt78xjtr.js +0 -2
- package/dist/chunk-zv9ac3c0.js +0 -2
- package/dist/chunk-zx19re81.js +0 -2
- package/dist/chunk-zytr7a4n.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{M as n}from"./chunk-8vkm1ts6.js";import{N as o}from"./chunk-ema4rc9d.js";import{R as m,U as d,V as x}from"./chunk-g1bcpymb.js";import{ea as u,fa as X,ga as G,ja as a,na as g,oa as D,pa as E}from"./chunk-emv4z7ck.js";import"./chunk-4fwb6qr1.js";import"./chunk-xemvstcq.js";import"./chunk-p8fbtgk3.js";import"./chunk-fbg1z6br.js";import"./chunk-tvqxepjm.js";import{sb as S}from"./chunk-fzn8xq6f.js";var H=S(u(),1);var b=S(u(),1);var _=S(D(),1);function Xz(Y){try{let $=JSON.parse(Y);if(typeof $!=="object"||$===null)return{isValid:!1,error:{message:"配置必须是 JSON 对象"}};if(!$.command&&!$.url)return{isValid:!1,error:{message:'配置必须包含 "command" (stdio) 或 "url" (SSE)'}};return{isValid:!0,config:$}}catch($){let L=$ instanceof Error?$.message:String($),B=L.match(/position (\d+)/),Q=B?parseInt(B[1],10):void 0;return{isValid:!1,error:{message:`JSON 格式错误: ${L}`,line:Q}}}}function Yz(Y,$,L){if(!Y||Y.length<2||Y.length>32)return"名称必须为 2-32 个字符";if(!/^[a-zA-Z0-9_-]+$/.test(Y))return"名称只能包含字母、数字、下划线和连字符";if($.includes(Y)&&Y!==L)return"名称已存在";return null}function Zz(Y,$=2){return JSON.stringify(Y,null,$)}var _z=[{key:"serverName",label:"Server ID"},{key:"config",label:"Config (JSON)"}],$z=({mode:Y,serverName:$,serverConfig:L,onCancel:B,onSave:Q})=>{let[O,y]=b.useState({serverName:$||"",configJSON:L?Zz(L):""}),[F,I]=b.useState(0),[j,V]=b.useState(null),M=b.useMemo(()=>{return[]},[]),U=b.useMemo(()=>{return Xz(O.configJSON)},[O.configJSON]),k=b.useCallback(()=>{let A=Yz(O.serverName,M,Y==="edit"?$:void 0);return V(A),A===null},[O.serverName,M,$,Y]),N=b.useCallback(()=>{if(Y==="add"&&!k())return;if(!U.isValid||!U.config)return;Q(O.serverName,U.config)},[Y,O.serverName,U,Q,k]),w=b.useCallback((A)=>{let h=Y==="add"?_z.length-1:1,q=A==="next"?(F+1)%h:(F-1+h)%h;I(q)},[F,Y]),f=()=>{if(Y!=="add")return null;let A=F===0,h=j!==null;return _.jsxDEV(X,{marginBottom:1,children:[_.jsxDEV(G,{color:A?"cyan":h?"red":"gray",children:"Server ID: "},void 0,!1,void 0,this),A?_.jsxDEV(X,{width:40,children:_.jsxDEV(E,{value:O.serverName,onChange:(q)=>{y((K)=>({...K,serverName:q})),V(null)},onSubmit:N,placeholder:"my-server",maxVisibleLines:1,showCursor:!0},void 0,!1,void 0,this)},void 0,!1,void 0,this):_.jsxDEV(G,{children:O.serverName||"my-server"},void 0,!1,void 0,this),h&&_.jsxDEV(G,{color:"red",children:[" ",j]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},p=()=>{let A=Y==="add"?F===1:F===0,h=U.isValid;return _.jsxDEV(X,{flexDirection:"column",marginBottom:1,children:[_.jsxDEV(G,{color:A?"cyan":"gray",children:"Config (JSON):"},void 0,!1,void 0,this),_.jsxDEV(X,{marginTop:1,children:_.jsxDEV(E,{value:O.configJSON,onChange:(q)=>y((K)=>({...K,configJSON:q})),onSubmit:N,placeholder:`{
|
|
2
2
|
"command": "npx",
|
|
3
3
|
"args": ["-y", "..."]
|
|
4
4
|
}`,showCursor:!0},void 0,!1,void 0,this)},void 0,!1,void 0,this),O.configJSON&&_.jsxDEV(X,{marginTop:1,children:h?_.jsxDEV(G,{color:"green",children:"✓ JSON 格式有效"},void 0,!1,void 0,this):_.jsxDEV(G,{color:"red",children:["✗ ",U.error?.message||"JSON 格式错误"]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},P=()=>_.jsxDEV(X,{marginTop:1,children:_.jsxDEV(G,{color:"gray",dimColor:!0,children:[_.jsxDEV(G,{color:"cyan",children:"Enter"},void 0,!1,void 0,this)," 保存 ",_.jsxDEV(G,{color:"cyan",children:"Tab"},void 0,!1,void 0,this)," 切换字段"," ",_.jsxDEV(G,{color:"cyan",children:"Esc"},void 0,!1,void 0,this)," 取消"]},void 0,!0,void 0,this)},void 0,!1,void 0,this);return _.jsxDEV(X,{flexDirection:"column",paddingX:2,children:[_.jsxDEV(X,{marginBottom:1,children:_.jsxDEV(G,{bold:!0,color:"cyan",children:Y==="add"?"Add MCP Server":`Edit MCP Server: ${$}`},void 0,!1,void 0,this)},void 0,!1,void 0,this),_.jsxDEV(X,{flexDirection:"column",gap:1,children:[f(),p()]},void 0,!0,void 0,this),P()]},void 0,!0,void 0,this)},l=$z;function i({mcpConfig:Y,updateConfig:$}){let L=m(),B=d({mutationFn:async(Q)=>{return await $({mcp_config:Q}),Q},onSuccess:(Q)=>{L.setQueryData(x.mcp.config(),Q)}});return{mcpConfig:Y,updateMcpConfig:B.mutateAsync,isUpdating:B.isPending}}var z=S(D(),1),Hz=({onClose:Y})=>{let{config:$,updateConfig:L}=o(),B=$?.mcp_config||{},{mcpConfig:Q,updateMcpConfig:O}=i({mcpConfig:B,updateConfig:L}),[y,F]=H.useState("list"),[I,j]=H.useState("add"),[V,M]=H.useState(null),[U,k]=H.useState(0),[N,w]=H.useState(null),[f,p]=H.useState(null),[P,A]=H.useState(null),h=H.useCallback(()=>w(null),[]);n(h,N?3000:null);let q=Object.keys(Q),K=q[U],R=K?Q[K]:null,v=H.useCallback((W)=>{if(W.command)return"stdio";if(W.url)return"SSE";return"unknown"},[]),r=H.useCallback(()=>{j("add"),M(null),F("json"),w(null)},[]),t=H.useCallback(()=>{if(!K||!R)return;j("edit"),M(K),F("json"),w(null)},[K,R]),s=H.useCallback(async()=>{if(!K||!R)return;p(K),A(null),F("test");try{let W=!!(R.command&&R.args),Z=!!R.url;if(!W&&!Z){A({success:!1,message:"配置无效:必须包含 command (stdio) 或 url (SSE)"});return}if(W&&(!R.command||!Array.isArray(R.args))){A({success:!1,message:"配置无效:stdio 模式需要 command 和 args 字段"});return}A({success:!0,message:`配置格式验证通过 (${Z?"SSE":"stdio"} 模式)`,tools:[]})}catch(W){A({success:!1,message:`验证失败: ${W instanceof Error?W.message:String(W)}`})}},[K,R]),C=H.useCallback(()=>{F("list"),M(null),A(null),w(null)},[]),e=H.useCallback(async(W,Z)=>{let J={...Q};if(J[W]=Z,await O(J),w(I==="add"?`已添加服务器: ${W}`:`已更新服务器: ${W}`),I==="add"){let T=Object.keys(J).findIndex((c)=>c===W);k(T>=0?T:0)}C()},[I,Q,O,C]),zz=H.useCallback(async()=>{if(!K)return;let W={...Q};delete W[K],await O(W);let Z=Math.min(U,Object.keys(W).length-1);k(Z>=0?Z:0),w(`已删除服务器: ${K}`)},[K,U,Q,O]);g((W,Z)=>{if(y==="json"||y==="test"){if(Z.escape)C();return}if(Z.upArrow)k((J)=>J>0?J-1:q.length-1);else if(Z.downArrow)k((J)=>J<q.length-1?J+1:0);else if(W==="n"||W==="N")r();else if((W==="e"||W==="E"||Z.return)&&K)t();else if((W==="d"||W==="D")&&K)zz();else if((W==="t"||W==="T")&&K)s();else if(Z.escape)Y()},{isActive:!0});let Gz=H.useMemo(()=>{if(q.length===0)return z.jsxDEV(X,{paddingX:2,paddingY:1,children:[z.jsxDEV(G,{color:"yellow",children:"未配置任何 MCP 服务器"},void 0,!1,void 0,this),z.jsxDEV(X,{marginTop:1,children:z.jsxDEV(G,{color:"gray",dimColor:!0,children:["按 ",z.jsxDEV(G,{color:"cyan",children:"n"},void 0,!1,void 0,this)," 添加新服务器"]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return z.jsxDEV(X,{flexDirection:"column",paddingX:2,gap:1,children:[q.map((W,Z)=>{let J=Q[W],T=v(J);return z.jsxDEV(X,{marginBottom:0,gap:1,children:[z.jsxDEV(G,{color:Z===U?"cyan":"gray",bold:Z===U,children:Z===U?">":" "},void 0,!1,void 0,this),z.jsxDEV(G,{bold:Z===U,color:Z===U?"cyan":void 0,children:W},void 0,!1,void 0,this),z.jsxDEV(a,{},void 0,!1,void 0,this),z.jsxDEV(G,{color:T==="stdio"?"green":T==="SSE"?"blue":"yellow",dimColor:Z!==U,children:["[",T.toUpperCase(),"]"]},void 0,!0,void 0,this)]},`server-${Z}-${W}`,!0,void 0,this)}),z.jsxDEV(X,{marginTop:1,children:z.jsxDEV(G,{color:"gray",dimColor:!0,children:[z.jsxDEV(G,{color:"cyan",children:"↑↓"},void 0,!1,void 0,this)," 导航 ",z.jsxDEV(G,{color:"cyan",children:"n"},void 0,!1,void 0,this)," 新增 ",z.jsxDEV(G,{color:"cyan",children:"e"},void 0,!1,void 0,this)," ","编辑 ",z.jsxDEV(G,{color:"cyan",children:"d"},void 0,!1,void 0,this)," 删除 ",z.jsxDEV(G,{color:"cyan",children:"t"},void 0,!1,void 0,this)," 测试"," ",z.jsxDEV(G,{color:"cyan",children:"Esc"},void 0,!1,void 0,this)," 关闭"]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},[q,Q,U,v]),Wz=H.useMemo(()=>{if(!f||!P)return z.jsxDEV(X,{paddingX:2,paddingY:1,children:z.jsxDEV(G,{color:"yellow",children:"正在验证配置..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(P.success)return z.jsxDEV(X,{flexDirection:"column",paddingX:2,gap:1,children:[z.jsxDEV(X,{children:z.jsxDEV(G,{color:"green",children:["✓ ",P.message]},void 0,!0,void 0,this)},void 0,!1,void 0,this),P.tools&&P.tools.length>0&&z.jsxDEV(X,{flexDirection:"column",marginTop:1,children:[z.jsxDEV(G,{color:"gray",children:["发现 ",P.tools.length," 个工具:"]},void 0,!0,void 0,this),P.tools.slice(0,10).map((W)=>z.jsxDEV(X,{paddingLeft:2,children:z.jsxDEV(G,{color:"gray",children:["- ",W]},void 0,!0,void 0,this)},W,!1,void 0,this)),P.tools.length>10&&z.jsxDEV(X,{paddingLeft:2,children:z.jsxDEV(G,{color:"gray",children:["... 还有 ",P.tools.length-10," 个工具"]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV(X,{marginTop:1,children:z.jsxDEV(G,{color:"gray",dimColor:!0,children:["按 ",z.jsxDEV(G,{color:"cyan",children:"Enter"},void 0,!1,void 0,this)," 关闭"]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this);else return z.jsxDEV(X,{flexDirection:"column",paddingX:2,gap:1,children:[z.jsxDEV(X,{children:z.jsxDEV(G,{color:"red",children:"✗ 验证失败"},void 0,!1,void 0,this)},void 0,!1,void 0,this),z.jsxDEV(X,{children:z.jsxDEV(G,{color:"yellow",children:P.message},void 0,!1,void 0,this)},void 0,!1,void 0,this),z.jsxDEV(X,{marginTop:1,children:[z.jsxDEV(G,{color:"gray",children:"建议检查:"},void 0,!1,void 0,this),z.jsxDEV(G,{color:"gray",children:"- 配置格式是否正确"},void 0,!1,void 0,this),z.jsxDEV(G,{color:"gray",children:"- 命令是否已安装(stdio 模式)"},void 0,!1,void 0,this),z.jsxDEV(G,{color:"gray",children:"- URL 是否可访问(SSE 模式)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z.jsxDEV(X,{marginTop:1,children:z.jsxDEV(G,{color:"gray",dimColor:!0,children:["按 ",z.jsxDEV(G,{color:"cyan",children:"Enter"},void 0,!1,void 0,this)," 关闭"]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},[f,P]);return g((W,Z)=>{if(y==="test"&&Z.return)C()},{isActive:y==="test"}),z.jsxDEV(X,{flexDirection:"column",children:[z.jsxDEV(X,{paddingX:2,paddingY:1,children:z.jsxDEV(G,{bold:!0,color:"cyan",children:"MCP Servers"},void 0,!1,void 0,this)},void 0,!1,void 0,this),y==="list"?Gz:y==="json"?z.jsxDEV(l,{mode:I,serverName:V||void 0,serverConfig:R||void 0,onCancel:C,onSave:e},void 0,!1,void 0,this):Wz,N&&z.jsxDEV(X,{paddingX:2,paddingY:0,children:z.jsxDEV(G,{color:"green",children:N},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},kz=Hz;export{kz as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Ra as u,Ta as VO,Ua as SO,Va as s$}from"./chunk-ydkkycp3.js";import{lc as vG,mc as R,pc as W}from"./chunk-nr26055z.js";var L$=R((wO)=>{wO.parse=function($,E){return new W$($,E).parse()};class W${constructor($,E){this.source=$,this.transform=E||kO,this.position=0,this.entries=[],this.recorded=[],this.dimension=0}isEof(){return this.position>=this.source.length}nextCharacter(){var $=this.source[this.position++];if($==="\\")return{value:this.source[this.position++],escaped:!0};return{value:$,escaped:!1}}record($){this.recorded.push($)}newEntry($){var E;if(this.recorded.length>0||$){if(E=this.recorded.join(""),E==="NULL"&&!$)E=null;if(E!==null)E=this.transform(E);this.entries.push(E),this.recorded=[]}}consumeDimensions(){if(this.source[0]==="[")while(!this.isEof()){var $=this.nextCharacter();if($.value==="=")break}}parse($){var E,_,O;this.consumeDimensions();while(!this.isEof())if(E=this.nextCharacter(),E.value==="{"&&!O){if(this.dimension++,this.dimension>1)_=new W$(this.source.substr(this.position-1),this.transform),this.entries.push(_.parse(!0)),this.position+=_.position-2}else if(E.value==="}"&&!O){if(this.dimension--,!this.dimension){if(this.newEntry(),$)return this.entries}}else if(E.value==='"'&&!E.escaped){if(O)this.newEntry(!0);O=!O}else if(E.value===","&&!O)this.newEntry();else this.record(E.value);if(this.dimension!==0)throw Error("array dimension not balanced");return this.entries}}function kO($){return $}});var Q$=R((nG,e$)=>{var hO=L$();e$.exports={create:function($,E){return{parse:function(){return hO.parse($,E)}}}}});var _E=R((iG,EE)=>{var bO=/(\d{1,})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})(\.\d{1,})?.*?( BC)?$/,yO=/^(\d{1,})-(\d{2})-(\d{2})( BC)?$/,vO=/([Z+-])(\d{2})?:?(\d{2})?:?(\d{2})?/,pO=/^-?infinity$/;EE.exports=function(E){if(pO.test(E))return Number(E.replace("i","I"));var _=bO.exec(E);if(!_)return mO(E)||null;var O=!!_[8],G=parseInt(_[1],10);if(O)G=$E(G);var X=parseInt(_[2],10)-1,U=_[3],J=parseInt(_[4],10),Z=parseInt(_[5],10),H=parseInt(_[6],10),Y=_[7];Y=Y?1000*parseFloat(Y):0;var T,K=fO(E);if(K!=null){if(T=new Date(Date.UTC(G,X,U,J,Z,H,Y)),j$(G))T.setUTCFullYear(G);if(K!==0)T.setTime(T.getTime()-K)}else if(T=new Date(G,X,U,J,Z,H,Y),j$(G))T.setFullYear(G);return T};function mO($){var E=yO.exec($);if(!E)return;var _=parseInt(E[1],10),O=!!E[4];if(O)_=$E(_);var G=parseInt(E[2],10)-1,X=E[3],U=new Date(_,G,X);if(j$(_))U.setFullYear(_);return U}function fO($){if($.endsWith("+00"))return 0;var E=vO.exec($.split(" ")[1]);if(!E)return;var _=E[1];if(_==="Z")return 0;var O=_==="-"?-1:1,G=parseInt(E[2],10)*3600+parseInt(E[3]||0,10)*60+parseInt(E[4]||0,10);return G*O*1000}function $E($){return-($-1)}function j$($){return $>=0&&$<100}});var GE=R((sG,OE)=>{OE.exports=uO;var dO=Object.prototype.hasOwnProperty;function uO($){for(var E=1;E<arguments.length;E++){var _=arguments[E];for(var O in _)if(dO.call(_,O))$[O]=_[O]}return $}});var JE=R((tG,UE)=>{var gO=GE();UE.exports=x;function x($){if(!(this instanceof x))return new x($);gO(this,E0($))}var cO=["seconds","minutes","hours","days","months","years"];x.prototype.toPostgres=function(){var $=cO.filter(this.hasOwnProperty,this);if(this.milliseconds&&$.indexOf("seconds")<0)$.push("seconds");if($.length===0)return"0";return $.map(function(E){var _=this[E]||0;if(E==="seconds"&&this.milliseconds)_=(_+this.milliseconds/1000).toFixed(6).replace(/\.?0+$/,"");return _+" "+E},this).join(" ")};var lO={years:"Y",months:"M",days:"D",hours:"H",minutes:"M",seconds:"S"},oO=["years","months","days"],nO=["hours","minutes","seconds"];x.prototype.toISOString=x.prototype.toISO=function(){var $=oO.map(_,this).join(""),E=nO.map(_,this).join("");return"P"+$+"T"+E;function _(O){var G=this[O]||0;if(O==="seconds"&&this.milliseconds)G=(G+this.milliseconds/1000).toFixed(6).replace(/0+$/,"");return G+lO[O]}};var N$="([+-]?\\d+)",iO=N$+"\\s+years?",sO=N$+"\\s+mons?",tO=N$+"\\s+days?",aO="([+-])?([\\d]*):(\\d\\d):(\\d\\d)\\.?(\\d{1,6})?",rO=new RegExp([iO,sO,tO,aO].map(function($){return"("+$+")?"}).join("\\s*")),XE={years:2,months:4,days:6,hours:9,minutes:10,seconds:11,milliseconds:12},eO=["hours","minutes","seconds","milliseconds"];function $0($){var E=$+"000000".slice($.length);return parseInt(E,10)/1000}function E0($){if(!$)return{};var E=rO.exec($),_=E[8]==="-";return Object.keys(XE).reduce(function(O,G){var X=XE[G],U=E[X];if(!U)return O;if(U=G==="milliseconds"?$0(U):parseInt(U,10),!U)return O;if(_&&~eO.indexOf(G))U*=-1;return O[G]=U,O},{})}});var TE=R((aG,HE)=>{var ZE=Buffer.from||Buffer;HE.exports=function(E){if(/^\\x/.test(E))return ZE(E.substr(2),"hex");var _="",O=0;while(O<E.length)if(E[O]!=="\\")_+=E[O],++O;else if(/[0-7]{3}/.test(E.substr(O+1,3)))_+=String.fromCharCode(parseInt(E.substr(O+1,3),8)),O+=4;else{var G=1;while(O+G<E.length&&E[O+G]==="\\")G++;for(var X=0;X<Math.floor(G/2);++X)_+="\\";O+=Math.floor(G/2)*2}return ZE(_,"binary")}});var jE=R((rG,QE)=>{var c=L$(),l=Q$(),$$=_E(),RE=JE(),KE=TE();function E$($){return function(_){if(_===null)return _;return $(_)}}function WE($){if($===null)return $;return $==="TRUE"||$==="t"||$==="true"||$==="y"||$==="yes"||$==="on"||$==="1"}function _0($){if(!$)return null;return c.parse($,WE)}function O0($){return parseInt($,10)}function F$($){if(!$)return null;return c.parse($,E$(O0))}function G0($){if(!$)return null;return c.parse($,E$(function(E){return LE(E).trim()}))}var X0=function($){if(!$)return null;var E=l.create($,function(_){if(_!==null)_=D$(_);return _});return E.parse()},z$=function($){if(!$)return null;var E=l.create($,function(_){if(_!==null)_=parseFloat(_);return _});return E.parse()},V=function($){if(!$)return null;var E=l.create($);return E.parse()},P$=function($){if(!$)return null;var E=l.create($,function(_){if(_!==null)_=$$(_);return _});return E.parse()},U0=function($){if(!$)return null;var E=l.create($,function(_){if(_!==null)_=RE(_);return _});return E.parse()},J0=function($){if(!$)return null;return c.parse($,E$(KE))},A$=function($){return parseInt($,10)},LE=function($){var E=String($);if(/^\d+$/.test(E))return E;return $},YE=function($){if(!$)return null;return c.parse($,E$(JSON.parse))},D$=function($){if($[0]!=="(")return null;return $=$.substring(1,$.length-1).split(","),{x:parseFloat($[0]),y:parseFloat($[1])}},Z0=function($){if($[0]!=="<"&&$[1]!=="(")return null;var E="(",_="",O=!1;for(var G=2;G<$.length-1;G++){if(!O)E+=$[G];if($[G]===")"){O=!0;continue}else if(!O)continue;if($[G]===",")continue;_+=$[G]}var X=D$(E);return X.radius=parseFloat(_),X},H0=function($){$(20,LE),$(21,A$),$(23,A$),$(26,A$),$(700,parseFloat),$(701,parseFloat),$(16,WE),$(1082,$$),$(1114,$$),$(1184,$$),$(600,D$),$(651,V),$(718,Z0),$(1000,_0),$(1001,J0),$(1005,F$),$(1007,F$),$(1028,F$),$(1016,G0),$(1017,X0),$(1021,z$),$(1022,z$),$(1231,z$),$(1014,V),$(1015,V),$(1008,V),$(1009,V),$(1040,V),$(1041,V),$(1115,P$),$(1182,P$),$(1185,P$),$(1186,RE),$(1187,U0),$(17,KE),$(114,JSON.parse.bind(JSON)),$(3802,JSON.parse.bind(JSON)),$(199,YE),$(3807,YE),$(3907,V),$(2951,V),$(791,V),$(1183,V),$(1270,V)};QE.exports={init:H0}});var FE=R((eG,NE)=>{var P=1e6;function T0($){var E=$.readInt32BE(0),_=$.readUInt32BE(4),O="";if(E<0)E=~E+(_===0),_=~_+1>>>0,O="-";var G="",X,U,J,Z,H,Y;{if(X=E%P,E=E/P>>>0,U=4294967296*X+_,_=U/P>>>0,J=""+(U-P*_),_===0&&E===0)return O+J+G;Z="",H=6-J.length;for(Y=0;Y<H;Y++)Z+="0";G=Z+J+G}{if(X=E%P,E=E/P>>>0,U=4294967296*X+_,_=U/P>>>0,J=""+(U-P*_),_===0&&E===0)return O+J+G;Z="",H=6-J.length;for(Y=0;Y<H;Y++)Z+="0";G=Z+J+G}{if(X=E%P,E=E/P>>>0,U=4294967296*X+_,_=U/P>>>0,J=""+(U-P*_),_===0&&E===0)return O+J+G;Z="",H=6-J.length;for(Y=0;Y<H;Y++)Z+="0";G=Z+J+G}return X=E%P,U=4294967296*X+_,J=""+U%P,O+J+G}NE.exports=T0});var ME=R(($8,DE)=>{var Y0=FE(),j=function($,E,_,O,G){_=_||0,O=O||!1,G=G||function(Q,C,K$){return Q*Math.pow(2,K$)+C};var X=_>>3,U=function(Q){if(O)return~Q&255;return Q},J=255,Z=8-_%8;if(E<Z)J=255<<8-E&255,Z=E;if(_)J=J>>_%8;var H=0;if(_%8+E>=8)H=G(0,U($[X])&J,Z);var Y=E+_>>3;for(var T=X+1;T<Y;T++)H=G(H,U($[T]),8);var K=(E+_)%8;if(K>0)H=G(H,U($[Y])>>8-K,K);return H},AE=function($,E,_){var O=Math.pow(2,_-1)-1,G=j($,1),X=j($,_,1);if(X===0)return 0;var U=1,J=function(H,Y,T){if(H===0)H=1;for(var K=1;K<=T;K++)if(U/=2,(Y&1<<T-K)>0)H+=U;return H},Z=j($,E,_+1,!1,J);if(X==Math.pow(2,_+1)-1){if(Z===0)return G===0?1/0:-1/0;return NaN}return(G===0?1:-1)*Math.pow(2,X-O)*Z},R0=function($){if(j($,1)==1)return-1*(j($,15,1,!0)+1);return j($,15,1)},zE=function($){if(j($,1)==1)return-1*(j($,31,1,!0)+1);return j($,31,1)},K0=function($){return AE($,23,8)},W0=function($){return AE($,52,11)},L0=function($){var E=j($,16,32);if(E==49152)return NaN;var _=Math.pow(1e4,j($,16,16)),O=0,G=[],X=j($,16);for(var U=0;U<X;U++)O+=j($,16,64+16*U)*_,_/=1e4;var J=Math.pow(10,j($,16,48));return(E===0?1:-1)*Math.round(O*J)/J},PE=function($,E){var _=j(E,1),O=j(E,63,1),G=new Date((_===0?1:-1)*O/1000+946684800000);if(!$)G.setTime(G.getTime()+G.getTimezoneOffset()*60000);return G.usec=O%1000,G.getMicroSeconds=function(){return this.usec},G.setMicroSeconds=function(X){this.usec=X},G.getUTCMicroSeconds=function(){return this.usec},G},o=function($){var E=j($,32),_=j($,32,32),O=j($,32,64),G=96,X=[];for(var U=0;U<E;U++)X[U]=j($,32,G),G+=32,G+=32;var J=function(H){var Y=j($,32,G);if(G+=32,Y==4294967295)return null;var T;if(H==23||H==20)return T=j($,Y*8,G),G+=Y*8,T;else if(H==25)return T=$.toString(this.encoding,G>>3,(G+=Y<<3)>>3),T;else console.log("ERROR: ElementType not implemented: "+H)},Z=function(H,Y){var T=[],K;if(H.length>1){var Q=H.shift();for(K=0;K<Q;K++)T[K]=Z(H,Y);H.unshift(Q)}else for(K=0;K<H[0];K++)T[K]=J(Y);return T};return Z(X,O)},Q0=function($){return $.toString("utf8")},j0=function($){if($===null)return null;return j($,8)>0},N0=function($){$(20,Y0),$(21,R0),$(23,zE),$(26,zE),$(1700,L0),$(700,K0),$(701,W0),$(16,j0),$(1114,PE.bind(null,!1)),$(1184,PE.bind(null,!0)),$(1000,o),$(1007,o),$(1016,o),$(1008,o),$(1009,o),$(25,Q0)};DE.exports={init:N0}});var SE=R((E8,VE)=>{VE.exports={BOOL:16,BYTEA:17,CHAR:18,INT8:20,INT2:21,INT4:23,REGPROC:24,TEXT:25,OID:26,TID:27,XID:28,CID:29,JSON:114,XML:142,PG_NODE_TREE:194,SMGR:210,PATH:602,POLYGON:604,CIDR:650,FLOAT4:700,FLOAT8:701,ABSTIME:702,RELTIME:703,TINTERVAL:704,CIRCLE:718,MACADDR8:774,MONEY:790,MACADDR:829,INET:869,ACLITEM:1033,BPCHAR:1042,VARCHAR:1043,DATE:1082,TIME:1083,TIMESTAMP:1114,TIMESTAMPTZ:1184,INTERVAL:1186,TIMETZ:1266,BIT:1560,VARBIT:1562,NUMERIC:1700,REFCURSOR:1790,REGPROCEDURE:2202,REGOPER:2203,REGOPERATOR:2204,REGCLASS:2205,REGTYPE:2206,UUID:2950,TXID_SNAPSHOT:2970,PG_LSN:3220,PG_NDISTINCT:3361,PG_DEPENDENCIES:3402,TSVECTOR:3614,TSQUERY:3615,GTSVECTOR:3642,REGCONFIG:3734,REGDICTIONARY:3769,JSONB:3802,REGNAMESPACE:4089,REGROLE:4096}});var i=R((V0)=>{var F0=jE(),z0=ME(),P0=Q$(),A0=SE();V0.getTypeParser=D0;V0.setTypeParser=M0;V0.arrayParser=P0;V0.builtins=A0;var n={text:{},binary:{}};function CE($){return String($)}function D0($,E){if(E=E||"text",!n[E])return CE;return n[E][$]||CE}function M0($,E,_){if(typeof E=="function")_=E,E="text";n[E][$]=_}F0.init(function($,E){n.text[$]=E});z0.init(function($,E){n.binary[$]=E})});var s=R((O8,M$)=>{var IE;try{IE=process.platform==="win32"?process.env.USERNAME:process.env.USER}catch{}M$.exports={host:"localhost",user:IE,database:void 0,password:null,connectionString:void 0,port:5432,rows:0,binary:!1,max:10,idleTimeoutMillis:30000,client_encoding:"",ssl:!1,application_name:void 0,fallback_application_name:void 0,options:void 0,parseInputDatesAsUTC:!1,statement_timeout:!1,lock_timeout:!1,idle_in_transaction_session_timeout:!1,query_timeout:!1,connect_timeout:0,keepalives:1,keepalives_idle:0};var h=i(),B0=h.getTypeParser(20,"text"),k0=h.getTypeParser(1016,"text");M$.exports.__defineSetter__("parseInt8",function($){h.setTypeParser(20,"text",$?h.getTypeParser(23,"text"):B0),h.setTypeParser(1016,"text",$?h.getTypeParser(1007,"text"):k0)})});var b=R((G8,kE)=>{var w0=s(),qE=W("util"),{isDate:x0}=qE.types||qE;function h0($){return'"'+$.replace(/\\/g,"\\\\").replace(/"/g,"\\\"")+'"'}function BE($){let E="{";for(let _=0;_<$.length;_++){if(_>0)E=E+",";if($[_]===null||typeof $[_]>"u")E=E+"NULL";else if(Array.isArray($[_]))E=E+BE($[_]);else if(ArrayBuffer.isView($[_])){let O=$[_];if(!(O instanceof Buffer)){let G=Buffer.from(O.buffer,O.byteOffset,O.byteLength);if(G.length===O.byteLength)O=G;else O=G.slice(O.byteOffset,O.byteOffset+O.byteLength)}E+="\\\\x"+O.toString("hex")}else E+=h0(_$($[_]))}return E=E+"}",E}var _$=function($,E){if($==null)return null;if(typeof $==="object"){if($ instanceof Buffer)return $;if(ArrayBuffer.isView($)){let _=Buffer.from($.buffer,$.byteOffset,$.byteLength);if(_.length===$.byteLength)return _;return _.slice($.byteOffset,$.byteOffset+$.byteLength)}if(x0($))if(w0.parseInputDatesAsUTC)return v0($);else return y0($);if(Array.isArray($))return BE($);return b0($,E)}return $.toString()};function b0($,E){if($&&typeof $.toPostgres==="function"){if(E=E||[],E.indexOf($)!==-1)throw Error('circular reference detected while preparing "'+$+'" for query');return E.push($),_$($.toPostgres(_$),E)}return JSON.stringify($)}function y0($){let E=-$.getTimezoneOffset(),_=$.getFullYear(),O=_<1;if(O)_=Math.abs(_)+1;let G=String(_).padStart(4,"0")+"-"+String($.getMonth()+1).padStart(2,"0")+"-"+String($.getDate()).padStart(2,"0")+"T"+String($.getHours()).padStart(2,"0")+":"+String($.getMinutes()).padStart(2,"0")+":"+String($.getSeconds()).padStart(2,"0")+"."+String($.getMilliseconds()).padStart(3,"0");if(E<0)G+="-",E*=-1;else G+="+";if(G+=String(Math.floor(E/60)).padStart(2,"0")+":"+String(E%60).padStart(2,"0"),O)G+=" BC";return G}function v0($){let E=$.getUTCFullYear(),_=E<1;if(_)E=Math.abs(E)+1;let O=String(E).padStart(4,"0")+"-"+String($.getUTCMonth()+1).padStart(2,"0")+"-"+String($.getUTCDate()).padStart(2,"0")+"T"+String($.getUTCHours()).padStart(2,"0")+":"+String($.getUTCMinutes()).padStart(2,"0")+":"+String($.getUTCSeconds()).padStart(2,"0")+"."+String($.getUTCMilliseconds()).padStart(3,"0");if(O+="+00:00",_)O+=" BC";return O}function p0($,E,_){if($=typeof $==="string"?{text:$}:$,E)if(typeof E==="function")$.callback=E;else $.values=E;if(_)$.callback=_;return $}var m0=function($){return'"'+$.replace(/"/g,'""')+'"'},f0=function($){let E=!1,_="'";if($==null)return"''";if(typeof $!=="string")return"''";for(let O=0;O<$.length;O++){let G=$[O];if(G==="'")_+=G+G;else if(G==="\\")_+=G+G,E=!0;else _+=G}if(_+="'",E===!0)_=" E"+_;return _};kE.exports={prepareValue:function(E){return _$(E)},normalizeQueryConfig:p0,escapeIdentifier:m0,escapeLiteral:f0}});var xE=R((X8,wE)=>{var y=W("crypto");function V$($){return y.createHash("md5").update($,"utf-8").digest("hex")}function d0($,E,_){let O=V$(E+$);return"md5"+V$(Buffer.concat([Buffer.from(O),_]))}function u0($){return y.createHash("sha256").update($).digest()}function g0($,E){return $=$.replace(/(\D)-/,"$1"),y.createHash($).update(E).digest()}function c0($,E){return y.createHmac("sha256",$).update(E).digest()}async function l0($,E,_){return y.pbkdf2Sync($,E,_,32,"sha256")}wE.exports={postgresMd5PasswordHash:d0,randomBytes:y.randomBytes,deriveKey:l0,sha256:u0,hashByName:g0,hmacSha256:c0,md5:V$}});var vE=R((U8,yE)=>{var hE=W("crypto");yE.exports={postgresMd5PasswordHash:n0,randomBytes:o0,deriveKey:a0,sha256:i0,hashByName:s0,hmacSha256:t0,md5:S$};var bE=hE.webcrypto||globalThis.crypto,k=bE.subtle,C$=new TextEncoder;function o0($){return bE.getRandomValues(Buffer.alloc($))}async function S$($){try{return hE.createHash("md5").update($,"utf-8").digest("hex")}catch(E){let _=typeof $==="string"?C$.encode($):$,O=await k.digest("MD5",_);return Array.from(new Uint8Array(O)).map((G)=>G.toString(16).padStart(2,"0")).join("")}}async function n0($,E,_){let O=await S$(E+$);return"md5"+await S$(Buffer.concat([Buffer.from(O),_]))}async function i0($){return await k.digest("SHA-256",$)}async function s0($,E){return await k.digest($,E)}async function t0($,E){let _=await k.importKey("raw",$,{name:"HMAC",hash:"SHA-256"},!1,["sign"]);return await k.sign("HMAC",_,C$.encode(E))}async function a0($,E,_){let O=await k.importKey("raw",C$.encode($),"PBKDF2",!1,["deriveBits"]),G={name:"PBKDF2",hash:"SHA-256",salt:E,iterations:_};return await k.deriveBits(G,O,256,["deriveBits"])}});var q$=R((J8,I$)=>{var r0=parseInt(process.versions&&process.versions.node&&process.versions.node.split(".")[0])<15;if(r0)I$.exports=xE();else I$.exports=vE()});var fE=R((Z8,mE)=>{function w($,E){return Error("SASL channel binding: "+$+" when parsing public certificate "+E.toString("base64"))}function B$($,E){let _=$[E++];if(_<128)return{length:_,index:E};let O=_&127;if(O>4)throw w("bad length",$);_=0;for(let G=0;G<O;G++)_=_<<8|$[E++];return{length:_,index:E}}function pE($,E){if($[E++]!==6)throw w("non-OID data",$);let{length:_,index:O}=B$($,E);E=O;let G=E+_,X=$[E++],U=(X/40>>0)+"."+X%40;while(E<G){let J=0;while(E<G){let Z=$[E++];if(J=J<<7|Z&127,Z<128)break}U+="."+J}return{oid:U,index:E}}function t($,E){if($[E++]!==48)throw w("non-sequence data",$);return B$($,E)}function e0($,E){if(E===void 0)E=0;E=t($,E).index;let{length:_,index:O}=t($,E);E=O+_,E=t($,E).index;let{oid:G,index:X}=pE($,E);switch(G){case"1.2.840.113549.1.1.4":return"MD5";case"1.2.840.113549.1.1.5":return"SHA-1";case"1.2.840.113549.1.1.11":return"SHA-256";case"1.2.840.113549.1.1.12":return"SHA-384";case"1.2.840.113549.1.1.13":return"SHA-512";case"1.2.840.113549.1.1.14":return"SHA-224";case"1.2.840.113549.1.1.15":return"SHA512-224";case"1.2.840.113549.1.1.16":return"SHA512-256";case"1.2.840.10045.4.1":return"SHA-1";case"1.2.840.10045.4.3.1":return"SHA-224";case"1.2.840.10045.4.3.2":return"SHA-256";case"1.2.840.10045.4.3.3":return"SHA-384";case"1.2.840.10045.4.3.4":return"SHA-512";case"1.2.840.113549.1.1.10":{if(E=X,E=t($,E).index,$[E++]!==160)throw w("non-tag data",$);E=B$($,E).index,E=t($,E).index;let{oid:U}=pE($,E);switch(U){case"1.2.840.113549.2.5":return"MD5";case"1.3.14.3.2.26":return"SHA-1";case"2.16.840.1.101.3.4.2.1":return"SHA-256";case"2.16.840.1.101.3.4.2.2":return"SHA-384";case"2.16.840.1.101.3.4.2.3":return"SHA-512"}throw w("unknown hash OID "+U,$)}case"1.3.101.110":case"1.3.101.112":return"SHA-512";case"1.3.101.111":case"1.3.101.113":throw w("Ed448 certificate channel binding is not currently supported by Postgres")}throw w("unknown OID "+G,$)}mE.exports={signatureAlgorithmHashFromCertificate:e0}});var cE=R((H8,gE)=>{var q=q$(),{signatureAlgorithmHashFromCertificate:$1}=fE();function E1($,E){let _=["SCRAM-SHA-256"];if(E)_.unshift("SCRAM-SHA-256-PLUS");let O=_.find((U)=>$.includes(U));if(!O)throw Error("SASL: Only mechanism(s) "+_.join(" and ")+" are supported");if(O==="SCRAM-SHA-256-PLUS"&&typeof E.getPeerCertificate!=="function")throw Error("SASL: Mechanism SCRAM-SHA-256-PLUS requires a certificate");let G=q.randomBytes(18).toString("base64");return{mechanism:O,clientNonce:G,response:(O==="SCRAM-SHA-256-PLUS"?"p=tls-server-end-point":E?"y":"n")+",,n=*,r="+G,message:"SASLInitialResponse"}}async function _1($,E,_,O){if($.message!=="SASLInitialResponse")throw Error("SASL: Last message was not SASLInitialResponse");if(typeof E!=="string")throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string");if(E==="")throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a non-empty string");if(typeof _!=="string")throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: serverData must be a string");let G=X1(_);if(!G.nonce.startsWith($.clientNonce))throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce does not start with client nonce");else if(G.nonce.length===$.clientNonce.length)throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce is too short");let X="n=*,r="+$.clientNonce,U="r="+G.nonce+",s="+G.salt+",i="+G.iteration,J=O?"eSws":"biws";if($.mechanism==="SCRAM-SHA-256-PLUS"){let t$=O.getPeerCertificate().raw,e=$1(t$);if(e==="MD5"||e==="SHA-1")e="SHA-256";let BO=await q.hashByName(e,t$);J=Buffer.concat([Buffer.from("p=tls-server-end-point,,"),Buffer.from(BO)]).toString("base64")}let Z="c="+J+",r="+G.nonce,H=X+","+U+","+Z,Y=Buffer.from(G.salt,"base64"),T=await q.deriveKey(E,Y,G.iteration),K=await q.hmacSha256(T,"Client Key"),Q=await q.sha256(K),C=await q.hmacSha256(Q,H),K$=J1(Buffer.from(K),Buffer.from(C)).toString("base64"),IO=await q.hmacSha256(T,"Server Key"),qO=await q.hmacSha256(IO,H);$.message="SASLResponse",$.serverSignature=Buffer.from(qO).toString("base64"),$.response=Z+",p="+K$}function O1($,E){if($.message!=="SASLResponse")throw Error("SASL: Last message was not SASLResponse");if(typeof E!=="string")throw Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: serverData must be a string");let{serverSignature:_}=U1(E);if(_!==$.serverSignature)throw Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature does not match")}function G1($){if(typeof $!=="string")throw TypeError("SASL: text must be a string");return $.split("").map((E,_)=>$.charCodeAt(_)).every((E)=>E>=33&&E<=43||E>=45&&E<=126)}function dE($){return/^(?:[a-zA-Z0-9+/]{4})*(?:[a-zA-Z0-9+/]{2}==|[a-zA-Z0-9+/]{3}=)?$/.test($)}function uE($){if(typeof $!=="string")throw TypeError("SASL: attribute pairs text must be a string");return new Map($.split(",").map((E)=>{if(!/^.=/.test(E))throw Error("SASL: Invalid attribute pair entry");let _=E[0],O=E.substring(2);return[_,O]}))}function X1($){let E=uE($),_=E.get("r");if(!_)throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: nonce missing");else if(!G1(_))throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: nonce must only contain printable characters");let O=E.get("s");if(!O)throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: salt missing");else if(!dE(O))throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: salt must be base64");let G=E.get("i");if(!G)throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: iteration missing");else if(!/^[1-9][0-9]*$/.test(G))throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: invalid iteration count");let X=parseInt(G,10);return{nonce:_,salt:O,iteration:X}}function U1($){let _=uE($).get("v");if(!_)throw Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature is missing");else if(!dE(_))throw Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature must be base64");return{serverSignature:_}}function J1($,E){if(!Buffer.isBuffer($))throw TypeError("first argument must be a Buffer");if(!Buffer.isBuffer(E))throw TypeError("second argument must be a Buffer");if($.length!==E.length)throw Error("Buffer lengths must match");if($.length===0)throw Error("Buffers cannot be empty");return Buffer.from($.map((_,O)=>$[O]^E[O]))}gE.exports={startSession:E1,continueSession:_1,finalizeSession:O1}});var G$=R((T8,lE)=>{var Z1=i();function O$($){this._types=$||Z1,this.text={},this.binary={}}O$.prototype.getOverrides=function($){switch($){case"text":return this.text;case"binary":return this.binary;default:return{}}};O$.prototype.setTypeParser=function($,E,_){if(typeof E==="function")_=E,E="text";this.getOverrides(E)[$]=_};O$.prototype.getTypeParser=function($,E){return E=E||"text",this.getOverrides(E)[$]||this._types.getTypeParser($,E)};lE.exports=O$});var iE=R((Y8,nE)=>{function v($,E={}){if($.charAt(0)==="/"){let Z=$.split(" ");return{host:Z[0],database:Z[1]}}let _={},O,G=!1;if(/ |%[^a-f0-9]|%[a-f0-9][^a-f0-9]/i.test($))$=encodeURI($).replace(/%25(\d\d)/g,"%$1");try{try{O=new URL($,"postgres://base")}catch(Z){O=new URL($.replace("@/","@___DUMMY___/"),"postgres://base"),G=!0}}catch(Z){throw Z.input&&(Z.input="*****REDACTED*****"),Z}for(let Z of O.searchParams.entries())_[Z[0]]=Z[1];if(_.user=_.user||decodeURIComponent(O.username),_.password=_.password||decodeURIComponent(O.password),O.protocol=="socket:")return _.host=decodeURI(O.pathname),_.database=O.searchParams.get("db"),_.client_encoding=O.searchParams.get("encoding"),_;let X=G?"":O.hostname;if(!_.host)_.host=decodeURIComponent(X);else if(X&&/^%2f/i.test(X))O.pathname=X+O.pathname;if(!_.port)_.port=O.port;let U=O.pathname.slice(1)||null;if(_.database=U?decodeURI(U):null,_.ssl==="true"||_.ssl==="1")_.ssl=!0;if(_.ssl==="0")_.ssl=!1;if(_.sslcert||_.sslkey||_.sslrootcert||_.sslmode)_.ssl={};let J=_.sslcert||_.sslkey||_.sslrootcert?W("fs"):null;if(_.sslcert)_.ssl.cert=J.readFileSync(_.sslcert).toString();if(_.sslkey)_.ssl.key=J.readFileSync(_.sslkey).toString();if(_.sslrootcert)_.ssl.ca=J.readFileSync(_.sslrootcert).toString();if(E.useLibpqCompat&&_.uselibpqcompat)throw Error("Both useLibpqCompat and uselibpqcompat are set. Please use only one of them.");if(_.uselibpqcompat==="true"||E.useLibpqCompat)switch(_.sslmode){case"disable":{_.ssl=!1;break}case"prefer":{_.ssl.rejectUnauthorized=!1;break}case"require":{if(_.sslrootcert)_.ssl.checkServerIdentity=function(){};else _.ssl.rejectUnauthorized=!1;break}case"verify-ca":{if(!_.ssl.ca)throw Error("SECURITY WARNING: Using sslmode=verify-ca requires specifying a CA with sslrootcert. If a public CA is used, verify-ca allows connections to a server that somebody else may have registered with the CA, making you vulnerable to Man-in-the-Middle attacks. Either specify a custom CA certificate with sslrootcert parameter or use sslmode=verify-full for proper security.");_.ssl.checkServerIdentity=function(){};break}case"verify-full":break}else switch(_.sslmode){case"disable":{_.ssl=!1;break}case"prefer":case"require":case"verify-ca":case"verify-full":{if(_.sslmode!=="verify-full")k$(_.sslmode);break}case"no-verify":{_.ssl.rejectUnauthorized=!1;break}}return _}function H1($){return Object.entries($).reduce((_,[O,G])=>{if(G!==void 0&&G!==null)_[O]=G;return _},{})}function oE($){return Object.entries($).reduce((_,[O,G])=>{if(O==="ssl"){let X=G;if(typeof X==="boolean")_[O]=X;if(typeof X==="object")_[O]=H1(X)}else if(G!==void 0&&G!==null)if(O==="port"){if(G!==""){let X=parseInt(G,10);if(isNaN(X))throw Error(`Invalid ${O}: ${G}`);_[O]=X}}else _[O]=G;return _},{})}function T1($){return oE(v($))}function k$($){if(!k$.warned&&typeof process<"u"&&process.emitWarning)k$.warned=!0,process.emitWarning(`SECURITY WARNING: The SSL modes 'prefer', 'require', and 'verify-ca' are treated as aliases for 'verify-full'.
|
|
1
|
+
import{$ as s$,X as u,Z as VO,_ as SO}from"./chunk-jwzkek1t.js";import{sb as vG,tb as R,wb as W}from"./chunk-fzn8xq6f.js";var L$=R((wO)=>{wO.parse=function($,E){return new W$($,E).parse()};class W${constructor($,E){this.source=$,this.transform=E||kO,this.position=0,this.entries=[],this.recorded=[],this.dimension=0}isEof(){return this.position>=this.source.length}nextCharacter(){var $=this.source[this.position++];if($==="\\")return{value:this.source[this.position++],escaped:!0};return{value:$,escaped:!1}}record($){this.recorded.push($)}newEntry($){var E;if(this.recorded.length>0||$){if(E=this.recorded.join(""),E==="NULL"&&!$)E=null;if(E!==null)E=this.transform(E);this.entries.push(E),this.recorded=[]}}consumeDimensions(){if(this.source[0]==="[")while(!this.isEof()){var $=this.nextCharacter();if($.value==="=")break}}parse($){var E,_,O;this.consumeDimensions();while(!this.isEof())if(E=this.nextCharacter(),E.value==="{"&&!O){if(this.dimension++,this.dimension>1)_=new W$(this.source.substr(this.position-1),this.transform),this.entries.push(_.parse(!0)),this.position+=_.position-2}else if(E.value==="}"&&!O){if(this.dimension--,!this.dimension){if(this.newEntry(),$)return this.entries}}else if(E.value==='"'&&!E.escaped){if(O)this.newEntry(!0);O=!O}else if(E.value===","&&!O)this.newEntry();else this.record(E.value);if(this.dimension!==0)throw Error("array dimension not balanced");return this.entries}}function kO($){return $}});var Q$=R((nG,e$)=>{var hO=L$();e$.exports={create:function($,E){return{parse:function(){return hO.parse($,E)}}}}});var _E=R((iG,EE)=>{var bO=/(\d{1,})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})(\.\d{1,})?.*?( BC)?$/,yO=/^(\d{1,})-(\d{2})-(\d{2})( BC)?$/,vO=/([Z+-])(\d{2})?:?(\d{2})?:?(\d{2})?/,pO=/^-?infinity$/;EE.exports=function(E){if(pO.test(E))return Number(E.replace("i","I"));var _=bO.exec(E);if(!_)return mO(E)||null;var O=!!_[8],G=parseInt(_[1],10);if(O)G=$E(G);var X=parseInt(_[2],10)-1,U=_[3],J=parseInt(_[4],10),Z=parseInt(_[5],10),H=parseInt(_[6],10),Y=_[7];Y=Y?1000*parseFloat(Y):0;var T,K=fO(E);if(K!=null){if(T=new Date(Date.UTC(G,X,U,J,Z,H,Y)),j$(G))T.setUTCFullYear(G);if(K!==0)T.setTime(T.getTime()-K)}else if(T=new Date(G,X,U,J,Z,H,Y),j$(G))T.setFullYear(G);return T};function mO($){var E=yO.exec($);if(!E)return;var _=parseInt(E[1],10),O=!!E[4];if(O)_=$E(_);var G=parseInt(E[2],10)-1,X=E[3],U=new Date(_,G,X);if(j$(_))U.setFullYear(_);return U}function fO($){if($.endsWith("+00"))return 0;var E=vO.exec($.split(" ")[1]);if(!E)return;var _=E[1];if(_==="Z")return 0;var O=_==="-"?-1:1,G=parseInt(E[2],10)*3600+parseInt(E[3]||0,10)*60+parseInt(E[4]||0,10);return G*O*1000}function $E($){return-($-1)}function j$($){return $>=0&&$<100}});var GE=R((sG,OE)=>{OE.exports=uO;var dO=Object.prototype.hasOwnProperty;function uO($){for(var E=1;E<arguments.length;E++){var _=arguments[E];for(var O in _)if(dO.call(_,O))$[O]=_[O]}return $}});var JE=R((tG,UE)=>{var gO=GE();UE.exports=x;function x($){if(!(this instanceof x))return new x($);gO(this,E0($))}var cO=["seconds","minutes","hours","days","months","years"];x.prototype.toPostgres=function(){var $=cO.filter(this.hasOwnProperty,this);if(this.milliseconds&&$.indexOf("seconds")<0)$.push("seconds");if($.length===0)return"0";return $.map(function(E){var _=this[E]||0;if(E==="seconds"&&this.milliseconds)_=(_+this.milliseconds/1000).toFixed(6).replace(/\.?0+$/,"");return _+" "+E},this).join(" ")};var lO={years:"Y",months:"M",days:"D",hours:"H",minutes:"M",seconds:"S"},oO=["years","months","days"],nO=["hours","minutes","seconds"];x.prototype.toISOString=x.prototype.toISO=function(){var $=oO.map(_,this).join(""),E=nO.map(_,this).join("");return"P"+$+"T"+E;function _(O){var G=this[O]||0;if(O==="seconds"&&this.milliseconds)G=(G+this.milliseconds/1000).toFixed(6).replace(/0+$/,"");return G+lO[O]}};var N$="([+-]?\\d+)",iO=N$+"\\s+years?",sO=N$+"\\s+mons?",tO=N$+"\\s+days?",aO="([+-])?([\\d]*):(\\d\\d):(\\d\\d)\\.?(\\d{1,6})?",rO=new RegExp([iO,sO,tO,aO].map(function($){return"("+$+")?"}).join("\\s*")),XE={years:2,months:4,days:6,hours:9,minutes:10,seconds:11,milliseconds:12},eO=["hours","minutes","seconds","milliseconds"];function $0($){var E=$+"000000".slice($.length);return parseInt(E,10)/1000}function E0($){if(!$)return{};var E=rO.exec($),_=E[8]==="-";return Object.keys(XE).reduce(function(O,G){var X=XE[G],U=E[X];if(!U)return O;if(U=G==="milliseconds"?$0(U):parseInt(U,10),!U)return O;if(_&&~eO.indexOf(G))U*=-1;return O[G]=U,O},{})}});var TE=R((aG,HE)=>{var ZE=Buffer.from||Buffer;HE.exports=function(E){if(/^\\x/.test(E))return ZE(E.substr(2),"hex");var _="",O=0;while(O<E.length)if(E[O]!=="\\")_+=E[O],++O;else if(/[0-7]{3}/.test(E.substr(O+1,3)))_+=String.fromCharCode(parseInt(E.substr(O+1,3),8)),O+=4;else{var G=1;while(O+G<E.length&&E[O+G]==="\\")G++;for(var X=0;X<Math.floor(G/2);++X)_+="\\";O+=Math.floor(G/2)*2}return ZE(_,"binary")}});var jE=R((rG,QE)=>{var c=L$(),l=Q$(),$$=_E(),RE=JE(),KE=TE();function E$($){return function(_){if(_===null)return _;return $(_)}}function WE($){if($===null)return $;return $==="TRUE"||$==="t"||$==="true"||$==="y"||$==="yes"||$==="on"||$==="1"}function _0($){if(!$)return null;return c.parse($,WE)}function O0($){return parseInt($,10)}function F$($){if(!$)return null;return c.parse($,E$(O0))}function G0($){if(!$)return null;return c.parse($,E$(function(E){return LE(E).trim()}))}var X0=function($){if(!$)return null;var E=l.create($,function(_){if(_!==null)_=D$(_);return _});return E.parse()},z$=function($){if(!$)return null;var E=l.create($,function(_){if(_!==null)_=parseFloat(_);return _});return E.parse()},V=function($){if(!$)return null;var E=l.create($);return E.parse()},P$=function($){if(!$)return null;var E=l.create($,function(_){if(_!==null)_=$$(_);return _});return E.parse()},U0=function($){if(!$)return null;var E=l.create($,function(_){if(_!==null)_=RE(_);return _});return E.parse()},J0=function($){if(!$)return null;return c.parse($,E$(KE))},A$=function($){return parseInt($,10)},LE=function($){var E=String($);if(/^\d+$/.test(E))return E;return $},YE=function($){if(!$)return null;return c.parse($,E$(JSON.parse))},D$=function($){if($[0]!=="(")return null;return $=$.substring(1,$.length-1).split(","),{x:parseFloat($[0]),y:parseFloat($[1])}},Z0=function($){if($[0]!=="<"&&$[1]!=="(")return null;var E="(",_="",O=!1;for(var G=2;G<$.length-1;G++){if(!O)E+=$[G];if($[G]===")"){O=!0;continue}else if(!O)continue;if($[G]===",")continue;_+=$[G]}var X=D$(E);return X.radius=parseFloat(_),X},H0=function($){$(20,LE),$(21,A$),$(23,A$),$(26,A$),$(700,parseFloat),$(701,parseFloat),$(16,WE),$(1082,$$),$(1114,$$),$(1184,$$),$(600,D$),$(651,V),$(718,Z0),$(1000,_0),$(1001,J0),$(1005,F$),$(1007,F$),$(1028,F$),$(1016,G0),$(1017,X0),$(1021,z$),$(1022,z$),$(1231,z$),$(1014,V),$(1015,V),$(1008,V),$(1009,V),$(1040,V),$(1041,V),$(1115,P$),$(1182,P$),$(1185,P$),$(1186,RE),$(1187,U0),$(17,KE),$(114,JSON.parse.bind(JSON)),$(3802,JSON.parse.bind(JSON)),$(199,YE),$(3807,YE),$(3907,V),$(2951,V),$(791,V),$(1183,V),$(1270,V)};QE.exports={init:H0}});var FE=R((eG,NE)=>{var P=1e6;function T0($){var E=$.readInt32BE(0),_=$.readUInt32BE(4),O="";if(E<0)E=~E+(_===0),_=~_+1>>>0,O="-";var G="",X,U,J,Z,H,Y;{if(X=E%P,E=E/P>>>0,U=4294967296*X+_,_=U/P>>>0,J=""+(U-P*_),_===0&&E===0)return O+J+G;Z="",H=6-J.length;for(Y=0;Y<H;Y++)Z+="0";G=Z+J+G}{if(X=E%P,E=E/P>>>0,U=4294967296*X+_,_=U/P>>>0,J=""+(U-P*_),_===0&&E===0)return O+J+G;Z="",H=6-J.length;for(Y=0;Y<H;Y++)Z+="0";G=Z+J+G}{if(X=E%P,E=E/P>>>0,U=4294967296*X+_,_=U/P>>>0,J=""+(U-P*_),_===0&&E===0)return O+J+G;Z="",H=6-J.length;for(Y=0;Y<H;Y++)Z+="0";G=Z+J+G}return X=E%P,U=4294967296*X+_,J=""+U%P,O+J+G}NE.exports=T0});var ME=R(($8,DE)=>{var Y0=FE(),j=function($,E,_,O,G){_=_||0,O=O||!1,G=G||function(Q,C,K$){return Q*Math.pow(2,K$)+C};var X=_>>3,U=function(Q){if(O)return~Q&255;return Q},J=255,Z=8-_%8;if(E<Z)J=255<<8-E&255,Z=E;if(_)J=J>>_%8;var H=0;if(_%8+E>=8)H=G(0,U($[X])&J,Z);var Y=E+_>>3;for(var T=X+1;T<Y;T++)H=G(H,U($[T]),8);var K=(E+_)%8;if(K>0)H=G(H,U($[Y])>>8-K,K);return H},AE=function($,E,_){var O=Math.pow(2,_-1)-1,G=j($,1),X=j($,_,1);if(X===0)return 0;var U=1,J=function(H,Y,T){if(H===0)H=1;for(var K=1;K<=T;K++)if(U/=2,(Y&1<<T-K)>0)H+=U;return H},Z=j($,E,_+1,!1,J);if(X==Math.pow(2,_+1)-1){if(Z===0)return G===0?1/0:-1/0;return NaN}return(G===0?1:-1)*Math.pow(2,X-O)*Z},R0=function($){if(j($,1)==1)return-1*(j($,15,1,!0)+1);return j($,15,1)},zE=function($){if(j($,1)==1)return-1*(j($,31,1,!0)+1);return j($,31,1)},K0=function($){return AE($,23,8)},W0=function($){return AE($,52,11)},L0=function($){var E=j($,16,32);if(E==49152)return NaN;var _=Math.pow(1e4,j($,16,16)),O=0,G=[],X=j($,16);for(var U=0;U<X;U++)O+=j($,16,64+16*U)*_,_/=1e4;var J=Math.pow(10,j($,16,48));return(E===0?1:-1)*Math.round(O*J)/J},PE=function($,E){var _=j(E,1),O=j(E,63,1),G=new Date((_===0?1:-1)*O/1000+946684800000);if(!$)G.setTime(G.getTime()+G.getTimezoneOffset()*60000);return G.usec=O%1000,G.getMicroSeconds=function(){return this.usec},G.setMicroSeconds=function(X){this.usec=X},G.getUTCMicroSeconds=function(){return this.usec},G},o=function($){var E=j($,32),_=j($,32,32),O=j($,32,64),G=96,X=[];for(var U=0;U<E;U++)X[U]=j($,32,G),G+=32,G+=32;var J=function(H){var Y=j($,32,G);if(G+=32,Y==4294967295)return null;var T;if(H==23||H==20)return T=j($,Y*8,G),G+=Y*8,T;else if(H==25)return T=$.toString(this.encoding,G>>3,(G+=Y<<3)>>3),T;else console.log("ERROR: ElementType not implemented: "+H)},Z=function(H,Y){var T=[],K;if(H.length>1){var Q=H.shift();for(K=0;K<Q;K++)T[K]=Z(H,Y);H.unshift(Q)}else for(K=0;K<H[0];K++)T[K]=J(Y);return T};return Z(X,O)},Q0=function($){return $.toString("utf8")},j0=function($){if($===null)return null;return j($,8)>0},N0=function($){$(20,Y0),$(21,R0),$(23,zE),$(26,zE),$(1700,L0),$(700,K0),$(701,W0),$(16,j0),$(1114,PE.bind(null,!1)),$(1184,PE.bind(null,!0)),$(1000,o),$(1007,o),$(1016,o),$(1008,o),$(1009,o),$(25,Q0)};DE.exports={init:N0}});var SE=R((E8,VE)=>{VE.exports={BOOL:16,BYTEA:17,CHAR:18,INT8:20,INT2:21,INT4:23,REGPROC:24,TEXT:25,OID:26,TID:27,XID:28,CID:29,JSON:114,XML:142,PG_NODE_TREE:194,SMGR:210,PATH:602,POLYGON:604,CIDR:650,FLOAT4:700,FLOAT8:701,ABSTIME:702,RELTIME:703,TINTERVAL:704,CIRCLE:718,MACADDR8:774,MONEY:790,MACADDR:829,INET:869,ACLITEM:1033,BPCHAR:1042,VARCHAR:1043,DATE:1082,TIME:1083,TIMESTAMP:1114,TIMESTAMPTZ:1184,INTERVAL:1186,TIMETZ:1266,BIT:1560,VARBIT:1562,NUMERIC:1700,REFCURSOR:1790,REGPROCEDURE:2202,REGOPER:2203,REGOPERATOR:2204,REGCLASS:2205,REGTYPE:2206,UUID:2950,TXID_SNAPSHOT:2970,PG_LSN:3220,PG_NDISTINCT:3361,PG_DEPENDENCIES:3402,TSVECTOR:3614,TSQUERY:3615,GTSVECTOR:3642,REGCONFIG:3734,REGDICTIONARY:3769,JSONB:3802,REGNAMESPACE:4089,REGROLE:4096}});var i=R((V0)=>{var F0=jE(),z0=ME(),P0=Q$(),A0=SE();V0.getTypeParser=D0;V0.setTypeParser=M0;V0.arrayParser=P0;V0.builtins=A0;var n={text:{},binary:{}};function CE($){return String($)}function D0($,E){if(E=E||"text",!n[E])return CE;return n[E][$]||CE}function M0($,E,_){if(typeof E=="function")_=E,E="text";n[E][$]=_}F0.init(function($,E){n.text[$]=E});z0.init(function($,E){n.binary[$]=E})});var s=R((O8,M$)=>{var IE;try{IE=process.platform==="win32"?process.env.USERNAME:process.env.USER}catch{}M$.exports={host:"localhost",user:IE,database:void 0,password:null,connectionString:void 0,port:5432,rows:0,binary:!1,max:10,idleTimeoutMillis:30000,client_encoding:"",ssl:!1,application_name:void 0,fallback_application_name:void 0,options:void 0,parseInputDatesAsUTC:!1,statement_timeout:!1,lock_timeout:!1,idle_in_transaction_session_timeout:!1,query_timeout:!1,connect_timeout:0,keepalives:1,keepalives_idle:0};var h=i(),B0=h.getTypeParser(20,"text"),k0=h.getTypeParser(1016,"text");M$.exports.__defineSetter__("parseInt8",function($){h.setTypeParser(20,"text",$?h.getTypeParser(23,"text"):B0),h.setTypeParser(1016,"text",$?h.getTypeParser(1007,"text"):k0)})});var b=R((G8,kE)=>{var w0=s(),qE=W("util"),{isDate:x0}=qE.types||qE;function h0($){return'"'+$.replace(/\\/g,"\\\\").replace(/"/g,"\\\"")+'"'}function BE($){let E="{";for(let _=0;_<$.length;_++){if(_>0)E=E+",";if($[_]===null||typeof $[_]>"u")E=E+"NULL";else if(Array.isArray($[_]))E=E+BE($[_]);else if(ArrayBuffer.isView($[_])){let O=$[_];if(!(O instanceof Buffer)){let G=Buffer.from(O.buffer,O.byteOffset,O.byteLength);if(G.length===O.byteLength)O=G;else O=G.slice(O.byteOffset,O.byteOffset+O.byteLength)}E+="\\\\x"+O.toString("hex")}else E+=h0(_$($[_]))}return E=E+"}",E}var _$=function($,E){if($==null)return null;if(typeof $==="object"){if($ instanceof Buffer)return $;if(ArrayBuffer.isView($)){let _=Buffer.from($.buffer,$.byteOffset,$.byteLength);if(_.length===$.byteLength)return _;return _.slice($.byteOffset,$.byteOffset+$.byteLength)}if(x0($))if(w0.parseInputDatesAsUTC)return v0($);else return y0($);if(Array.isArray($))return BE($);return b0($,E)}return $.toString()};function b0($,E){if($&&typeof $.toPostgres==="function"){if(E=E||[],E.indexOf($)!==-1)throw Error('circular reference detected while preparing "'+$+'" for query');return E.push($),_$($.toPostgres(_$),E)}return JSON.stringify($)}function y0($){let E=-$.getTimezoneOffset(),_=$.getFullYear(),O=_<1;if(O)_=Math.abs(_)+1;let G=String(_).padStart(4,"0")+"-"+String($.getMonth()+1).padStart(2,"0")+"-"+String($.getDate()).padStart(2,"0")+"T"+String($.getHours()).padStart(2,"0")+":"+String($.getMinutes()).padStart(2,"0")+":"+String($.getSeconds()).padStart(2,"0")+"."+String($.getMilliseconds()).padStart(3,"0");if(E<0)G+="-",E*=-1;else G+="+";if(G+=String(Math.floor(E/60)).padStart(2,"0")+":"+String(E%60).padStart(2,"0"),O)G+=" BC";return G}function v0($){let E=$.getUTCFullYear(),_=E<1;if(_)E=Math.abs(E)+1;let O=String(E).padStart(4,"0")+"-"+String($.getUTCMonth()+1).padStart(2,"0")+"-"+String($.getUTCDate()).padStart(2,"0")+"T"+String($.getUTCHours()).padStart(2,"0")+":"+String($.getUTCMinutes()).padStart(2,"0")+":"+String($.getUTCSeconds()).padStart(2,"0")+"."+String($.getUTCMilliseconds()).padStart(3,"0");if(O+="+00:00",_)O+=" BC";return O}function p0($,E,_){if($=typeof $==="string"?{text:$}:$,E)if(typeof E==="function")$.callback=E;else $.values=E;if(_)$.callback=_;return $}var m0=function($){return'"'+$.replace(/"/g,'""')+'"'},f0=function($){let E=!1,_="'";if($==null)return"''";if(typeof $!=="string")return"''";for(let O=0;O<$.length;O++){let G=$[O];if(G==="'")_+=G+G;else if(G==="\\")_+=G+G,E=!0;else _+=G}if(_+="'",E===!0)_=" E"+_;return _};kE.exports={prepareValue:function(E){return _$(E)},normalizeQueryConfig:p0,escapeIdentifier:m0,escapeLiteral:f0}});var xE=R((X8,wE)=>{var y=W("crypto");function V$($){return y.createHash("md5").update($,"utf-8").digest("hex")}function d0($,E,_){let O=V$(E+$);return"md5"+V$(Buffer.concat([Buffer.from(O),_]))}function u0($){return y.createHash("sha256").update($).digest()}function g0($,E){return $=$.replace(/(\D)-/,"$1"),y.createHash($).update(E).digest()}function c0($,E){return y.createHmac("sha256",$).update(E).digest()}async function l0($,E,_){return y.pbkdf2Sync($,E,_,32,"sha256")}wE.exports={postgresMd5PasswordHash:d0,randomBytes:y.randomBytes,deriveKey:l0,sha256:u0,hashByName:g0,hmacSha256:c0,md5:V$}});var vE=R((U8,yE)=>{var hE=W("crypto");yE.exports={postgresMd5PasswordHash:n0,randomBytes:o0,deriveKey:a0,sha256:i0,hashByName:s0,hmacSha256:t0,md5:S$};var bE=hE.webcrypto||globalThis.crypto,k=bE.subtle,C$=new TextEncoder;function o0($){return bE.getRandomValues(Buffer.alloc($))}async function S$($){try{return hE.createHash("md5").update($,"utf-8").digest("hex")}catch(E){let _=typeof $==="string"?C$.encode($):$,O=await k.digest("MD5",_);return Array.from(new Uint8Array(O)).map((G)=>G.toString(16).padStart(2,"0")).join("")}}async function n0($,E,_){let O=await S$(E+$);return"md5"+await S$(Buffer.concat([Buffer.from(O),_]))}async function i0($){return await k.digest("SHA-256",$)}async function s0($,E){return await k.digest($,E)}async function t0($,E){let _=await k.importKey("raw",$,{name:"HMAC",hash:"SHA-256"},!1,["sign"]);return await k.sign("HMAC",_,C$.encode(E))}async function a0($,E,_){let O=await k.importKey("raw",C$.encode($),"PBKDF2",!1,["deriveBits"]),G={name:"PBKDF2",hash:"SHA-256",salt:E,iterations:_};return await k.deriveBits(G,O,256,["deriveBits"])}});var q$=R((J8,I$)=>{var r0=parseInt(process.versions&&process.versions.node&&process.versions.node.split(".")[0])<15;if(r0)I$.exports=xE();else I$.exports=vE()});var fE=R((Z8,mE)=>{function w($,E){return Error("SASL channel binding: "+$+" when parsing public certificate "+E.toString("base64"))}function B$($,E){let _=$[E++];if(_<128)return{length:_,index:E};let O=_&127;if(O>4)throw w("bad length",$);_=0;for(let G=0;G<O;G++)_=_<<8|$[E++];return{length:_,index:E}}function pE($,E){if($[E++]!==6)throw w("non-OID data",$);let{length:_,index:O}=B$($,E);E=O;let G=E+_,X=$[E++],U=(X/40>>0)+"."+X%40;while(E<G){let J=0;while(E<G){let Z=$[E++];if(J=J<<7|Z&127,Z<128)break}U+="."+J}return{oid:U,index:E}}function t($,E){if($[E++]!==48)throw w("non-sequence data",$);return B$($,E)}function e0($,E){if(E===void 0)E=0;E=t($,E).index;let{length:_,index:O}=t($,E);E=O+_,E=t($,E).index;let{oid:G,index:X}=pE($,E);switch(G){case"1.2.840.113549.1.1.4":return"MD5";case"1.2.840.113549.1.1.5":return"SHA-1";case"1.2.840.113549.1.1.11":return"SHA-256";case"1.2.840.113549.1.1.12":return"SHA-384";case"1.2.840.113549.1.1.13":return"SHA-512";case"1.2.840.113549.1.1.14":return"SHA-224";case"1.2.840.113549.1.1.15":return"SHA512-224";case"1.2.840.113549.1.1.16":return"SHA512-256";case"1.2.840.10045.4.1":return"SHA-1";case"1.2.840.10045.4.3.1":return"SHA-224";case"1.2.840.10045.4.3.2":return"SHA-256";case"1.2.840.10045.4.3.3":return"SHA-384";case"1.2.840.10045.4.3.4":return"SHA-512";case"1.2.840.113549.1.1.10":{if(E=X,E=t($,E).index,$[E++]!==160)throw w("non-tag data",$);E=B$($,E).index,E=t($,E).index;let{oid:U}=pE($,E);switch(U){case"1.2.840.113549.2.5":return"MD5";case"1.3.14.3.2.26":return"SHA-1";case"2.16.840.1.101.3.4.2.1":return"SHA-256";case"2.16.840.1.101.3.4.2.2":return"SHA-384";case"2.16.840.1.101.3.4.2.3":return"SHA-512"}throw w("unknown hash OID "+U,$)}case"1.3.101.110":case"1.3.101.112":return"SHA-512";case"1.3.101.111":case"1.3.101.113":throw w("Ed448 certificate channel binding is not currently supported by Postgres")}throw w("unknown OID "+G,$)}mE.exports={signatureAlgorithmHashFromCertificate:e0}});var cE=R((H8,gE)=>{var q=q$(),{signatureAlgorithmHashFromCertificate:$1}=fE();function E1($,E){let _=["SCRAM-SHA-256"];if(E)_.unshift("SCRAM-SHA-256-PLUS");let O=_.find((U)=>$.includes(U));if(!O)throw Error("SASL: Only mechanism(s) "+_.join(" and ")+" are supported");if(O==="SCRAM-SHA-256-PLUS"&&typeof E.getPeerCertificate!=="function")throw Error("SASL: Mechanism SCRAM-SHA-256-PLUS requires a certificate");let G=q.randomBytes(18).toString("base64");return{mechanism:O,clientNonce:G,response:(O==="SCRAM-SHA-256-PLUS"?"p=tls-server-end-point":E?"y":"n")+",,n=*,r="+G,message:"SASLInitialResponse"}}async function _1($,E,_,O){if($.message!=="SASLInitialResponse")throw Error("SASL: Last message was not SASLInitialResponse");if(typeof E!=="string")throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string");if(E==="")throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a non-empty string");if(typeof _!=="string")throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: serverData must be a string");let G=X1(_);if(!G.nonce.startsWith($.clientNonce))throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce does not start with client nonce");else if(G.nonce.length===$.clientNonce.length)throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce is too short");let X="n=*,r="+$.clientNonce,U="r="+G.nonce+",s="+G.salt+",i="+G.iteration,J=O?"eSws":"biws";if($.mechanism==="SCRAM-SHA-256-PLUS"){let t$=O.getPeerCertificate().raw,e=$1(t$);if(e==="MD5"||e==="SHA-1")e="SHA-256";let BO=await q.hashByName(e,t$);J=Buffer.concat([Buffer.from("p=tls-server-end-point,,"),Buffer.from(BO)]).toString("base64")}let Z="c="+J+",r="+G.nonce,H=X+","+U+","+Z,Y=Buffer.from(G.salt,"base64"),T=await q.deriveKey(E,Y,G.iteration),K=await q.hmacSha256(T,"Client Key"),Q=await q.sha256(K),C=await q.hmacSha256(Q,H),K$=J1(Buffer.from(K),Buffer.from(C)).toString("base64"),IO=await q.hmacSha256(T,"Server Key"),qO=await q.hmacSha256(IO,H);$.message="SASLResponse",$.serverSignature=Buffer.from(qO).toString("base64"),$.response=Z+",p="+K$}function O1($,E){if($.message!=="SASLResponse")throw Error("SASL: Last message was not SASLResponse");if(typeof E!=="string")throw Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: serverData must be a string");let{serverSignature:_}=U1(E);if(_!==$.serverSignature)throw Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature does not match")}function G1($){if(typeof $!=="string")throw TypeError("SASL: text must be a string");return $.split("").map((E,_)=>$.charCodeAt(_)).every((E)=>E>=33&&E<=43||E>=45&&E<=126)}function dE($){return/^(?:[a-zA-Z0-9+/]{4})*(?:[a-zA-Z0-9+/]{2}==|[a-zA-Z0-9+/]{3}=)?$/.test($)}function uE($){if(typeof $!=="string")throw TypeError("SASL: attribute pairs text must be a string");return new Map($.split(",").map((E)=>{if(!/^.=/.test(E))throw Error("SASL: Invalid attribute pair entry");let _=E[0],O=E.substring(2);return[_,O]}))}function X1($){let E=uE($),_=E.get("r");if(!_)throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: nonce missing");else if(!G1(_))throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: nonce must only contain printable characters");let O=E.get("s");if(!O)throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: salt missing");else if(!dE(O))throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: salt must be base64");let G=E.get("i");if(!G)throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: iteration missing");else if(!/^[1-9][0-9]*$/.test(G))throw Error("SASL: SCRAM-SERVER-FIRST-MESSAGE: invalid iteration count");let X=parseInt(G,10);return{nonce:_,salt:O,iteration:X}}function U1($){let _=uE($).get("v");if(!_)throw Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature is missing");else if(!dE(_))throw Error("SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature must be base64");return{serverSignature:_}}function J1($,E){if(!Buffer.isBuffer($))throw TypeError("first argument must be a Buffer");if(!Buffer.isBuffer(E))throw TypeError("second argument must be a Buffer");if($.length!==E.length)throw Error("Buffer lengths must match");if($.length===0)throw Error("Buffers cannot be empty");return Buffer.from($.map((_,O)=>$[O]^E[O]))}gE.exports={startSession:E1,continueSession:_1,finalizeSession:O1}});var G$=R((T8,lE)=>{var Z1=i();function O$($){this._types=$||Z1,this.text={},this.binary={}}O$.prototype.getOverrides=function($){switch($){case"text":return this.text;case"binary":return this.binary;default:return{}}};O$.prototype.setTypeParser=function($,E,_){if(typeof E==="function")_=E,E="text";this.getOverrides(E)[$]=_};O$.prototype.getTypeParser=function($,E){return E=E||"text",this.getOverrides(E)[$]||this._types.getTypeParser($,E)};lE.exports=O$});var iE=R((Y8,nE)=>{function v($,E={}){if($.charAt(0)==="/"){let Z=$.split(" ");return{host:Z[0],database:Z[1]}}let _={},O,G=!1;if(/ |%[^a-f0-9]|%[a-f0-9][^a-f0-9]/i.test($))$=encodeURI($).replace(/%25(\d\d)/g,"%$1");try{try{O=new URL($,"postgres://base")}catch(Z){O=new URL($.replace("@/","@___DUMMY___/"),"postgres://base"),G=!0}}catch(Z){throw Z.input&&(Z.input="*****REDACTED*****"),Z}for(let Z of O.searchParams.entries())_[Z[0]]=Z[1];if(_.user=_.user||decodeURIComponent(O.username),_.password=_.password||decodeURIComponent(O.password),O.protocol=="socket:")return _.host=decodeURI(O.pathname),_.database=O.searchParams.get("db"),_.client_encoding=O.searchParams.get("encoding"),_;let X=G?"":O.hostname;if(!_.host)_.host=decodeURIComponent(X);else if(X&&/^%2f/i.test(X))O.pathname=X+O.pathname;if(!_.port)_.port=O.port;let U=O.pathname.slice(1)||null;if(_.database=U?decodeURI(U):null,_.ssl==="true"||_.ssl==="1")_.ssl=!0;if(_.ssl==="0")_.ssl=!1;if(_.sslcert||_.sslkey||_.sslrootcert||_.sslmode)_.ssl={};let J=_.sslcert||_.sslkey||_.sslrootcert?W("fs"):null;if(_.sslcert)_.ssl.cert=J.readFileSync(_.sslcert).toString();if(_.sslkey)_.ssl.key=J.readFileSync(_.sslkey).toString();if(_.sslrootcert)_.ssl.ca=J.readFileSync(_.sslrootcert).toString();if(E.useLibpqCompat&&_.uselibpqcompat)throw Error("Both useLibpqCompat and uselibpqcompat are set. Please use only one of them.");if(_.uselibpqcompat==="true"||E.useLibpqCompat)switch(_.sslmode){case"disable":{_.ssl=!1;break}case"prefer":{_.ssl.rejectUnauthorized=!1;break}case"require":{if(_.sslrootcert)_.ssl.checkServerIdentity=function(){};else _.ssl.rejectUnauthorized=!1;break}case"verify-ca":{if(!_.ssl.ca)throw Error("SECURITY WARNING: Using sslmode=verify-ca requires specifying a CA with sslrootcert. If a public CA is used, verify-ca allows connections to a server that somebody else may have registered with the CA, making you vulnerable to Man-in-the-Middle attacks. Either specify a custom CA certificate with sslrootcert parameter or use sslmode=verify-full for proper security.");_.ssl.checkServerIdentity=function(){};break}case"verify-full":break}else switch(_.sslmode){case"disable":{_.ssl=!1;break}case"prefer":case"require":case"verify-ca":case"verify-full":{if(_.sslmode!=="verify-full")k$(_.sslmode);break}case"no-verify":{_.ssl.rejectUnauthorized=!1;break}}return _}function H1($){return Object.entries($).reduce((_,[O,G])=>{if(G!==void 0&&G!==null)_[O]=G;return _},{})}function oE($){return Object.entries($).reduce((_,[O,G])=>{if(O==="ssl"){let X=G;if(typeof X==="boolean")_[O]=X;if(typeof X==="object")_[O]=H1(X)}else if(G!==void 0&&G!==null)if(O==="port"){if(G!==""){let X=parseInt(G,10);if(isNaN(X))throw Error(`Invalid ${O}: ${G}`);_[O]=X}}else _[O]=G;return _},{})}function T1($){return oE(v($))}function k$($){if(!k$.warned&&typeof process<"u"&&process.emitWarning)k$.warned=!0,process.emitWarning(`SECURITY WARNING: The SSL modes 'prefer', 'require', and 'verify-ca' are treated as aliases for 'verify-full'.
|
|
2
2
|
In the next major version (pg-connection-string v3.0.0 and pg v9.0.0), these modes will adopt standard libpq semantics, which have weaker security guarantees.
|
|
3
3
|
|
|
4
4
|
To prepare for this change:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./chunk-
|
|
1
|
+
import"./chunk-fzn8xq6f.js";import{sql as x}from"kysely";class G{db;pragmaPromise=null;constructor(w){this.db=w}ensurePragma(){if(!this.pragmaPromise)this.pragmaPromise=this.doEnsurePragma();return this.pragmaPromise}async doEnsurePragma(){await x`PRAGMA busy_timeout = 5000`.execute(this.db),await x`PRAGMA journal_mode = WAL`.execute(this.db),await x`PRAGMA synchronous = NORMAL`.execute(this.db),await x`PRAGMA wal_autocheckpoint = 1000`.execute(this.db)}dateToDb(w){return w.toISOString()}dbToDate(w){return new Date(w)}jsonToDb(w){return JSON.stringify(w)}dbToJson(w){if(typeof w==="string")try{return JSON.parse(w)}catch{return w}return w}buildJsonQuery(w,D,F,z){let E=`$.${JSON.stringify(F)}`;if(z===null)return x`
|
|
2
2
|
json_type(${x.ref(D)}, ${x.lit(E)}) = 'null'
|
|
3
3
|
`;let B;if(typeof z==="string")B=z;else if(typeof z==="number")B=z;else if(typeof z==="boolean")B=z?1:0;else B=JSON.stringify(z);return x`json_extract(${x.ref(D)}, ${x.lit(E)}) = ${x.lit(B)}`}now(){return new Date().toISOString()}async createTables(w){await this.ensurePragma(),await x`
|
|
4
4
|
CREATE TABLE IF NOT EXISTS threads (
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as A,b as W}from"./chunk-hqyfg97v.js";import"./chunk-jsagr88c.js";import{W as q,Z as R}from"./chunk-jwzkek1t.js";import{sb as V}from"./chunk-fzn8xq6f.js";var x=V(W(),1);function B(M){if(M===null||typeof M!=="object")return JSON.stringify(M);if(Array.isArray(M))return JSON.stringify(M.map((J)=>B(J)));let F={},G=Object.keys(M).sort();for(let J of G)F[J]=M[J];return JSON.stringify(F,(J,Q)=>{if(Q!==null&&typeof Q==="object"&&!Array.isArray(Q)){let X={},Y=Object.keys(Q).sort();for(let Z of Y)X[Z]=Q[Z];return X}return Q})}var P=[{index:"checkpoints",prefix:"checkpoint:",schema:{"$.thread_id":{type:"TAG",AS:"thread_id"},"$.checkpoint_ns":{type:"TAG",AS:"checkpoint_ns"},"$.checkpoint_id":{type:"TAG",AS:"checkpoint_id"},"$.parent_checkpoint_id":{type:"TAG",AS:"parent_checkpoint_id"},"$.checkpoint_ts":{type:"NUMERIC",AS:"checkpoint_ts"},"$.has_writes":{type:"TAG",AS:"has_writes"},"$.source":{type:"TAG",AS:"source"},"$.step":{type:"NUMERIC",AS:"step"}}},{index:"checkpoint_writes",prefix:"checkpoint_write:",schema:{"$.thread_id":{type:"TAG",AS:"thread_id"},"$.checkpoint_ns":{type:"TAG",AS:"checkpoint_ns"},"$.checkpoint_id":{type:"TAG",AS:"checkpoint_id"},"$.task_id":{type:"TAG",AS:"task_id"},"$.idx":{type:"NUMERIC",AS:"idx"},"$.channel":{type:"TAG",AS:"channel"},"$.type":{type:"TAG",AS:"type"}}}],N=class M extends R{client;ttlConfig;constructor(F,G){super();this.client=F,this.ttlConfig=G}static async fromUrl(F,G){let J=x.createClient({url:F});await J.connect();let Q=new M(J,G);return await Q.ensureIndexes(),Q}async get(F){return(await this.getTuple(F))?.checkpoint}async put(F,G,J,Q){await this.ensureIndexes();let X=F.configurable?.thread_id,Y=F.configurable?.checkpoint_ns??"",Z=F.configurable?.checkpoint_id;if(!X)throw Error("thread_id is required");let _=G.id||q(0),E=`checkpoint:${X}:${Y}:shallow`,H=null,$=null;try{if(H=await this.client.json.get(E),H&&typeof H==="object")$=H.checkpoint_id}catch(O){}if($&&$!==_)await this.cleanupOldCheckpoint(X,Y,$);let L={...G,channel_values:G.channel_values||{},channel_blobs:void 0},U={thread_id:X,checkpoint_ns:Y,checkpoint_id:_,parent_checkpoint_id:Z||null,checkpoint:L,metadata:this.sanitizeMetadata(J),checkpoint_ts:Date.now(),has_writes:"false"};if(this.addSearchableMetadataFields(U,J),await this.client.json.set(E,"$",U),this.ttlConfig?.defaultTTL)await this.applyTTL(E);return{configurable:{thread_id:X,checkpoint_ns:Y,checkpoint_id:_}}}async getTuple(F){let G=F.configurable?.thread_id,J=F.configurable?.checkpoint_ns??"",Q=F.configurable?.checkpoint_id;if(!G)return;let X=`checkpoint:${G}:${J}:shallow`,Y=await this.client.json.get(X);if(!Y)return;if(Q&&Y.checkpoint_id!==Q)return;if(this.ttlConfig?.refreshOnRead&&this.ttlConfig?.defaultTTL)await this.applyTTL(X);let Z=await this.serde.loadsTyped("json",JSON.stringify(Y.checkpoint)),_;if(Y.has_writes==="true")_=await this.loadPendingWrites(Y.thread_id,Y.checkpoint_ns,Y.checkpoint_id);return await this.createCheckpointTuple(Y,Z,_)}async*list(F,G){if(await this.ensureIndexes(),F?.configurable?.thread_id){let J=await this.getTuple(F);if(J)if(G?.filter){if(this.checkMetadataFilterMatch(J.metadata,G.filter))yield J}else yield J}else{let J=[];if(G?.filter){for(let[Y,Z]of Object.entries(G.filter))if(Z===void 0);else if(Z===null);else if(typeof Z==="string"){let _=A(Y),E=A(Z);J.push(`(@${_}:{${E}})`)}else if(typeof Z==="number"){let _=A(Y);J.push(`(@${_}:[${Z} ${Z}])`)}}if(J.length===0)J.push("*");let Q=J.join(" "),X=G?.limit??10;try{let Y=await this.client.ft.search("checkpoints",Q,{LIMIT:{from:0,size:X*2},SORTBY:{BY:"checkpoint_ts",DIRECTION:"DESC"}}),Z=new Set,_=0;for(let E of Y.documents){if(_>=X)break;let H=E.value,$=`${H.thread_id}:${H.checkpoint_ns}`;if(Z.has($))continue;if(Z.add($),G?.filter){if(!this.checkMetadataFilterMatch(H.metadata,G.filter))continue}let L=await this.serde.loadsTyped("json",JSON.stringify(H.checkpoint));yield await this.createCheckpointTuple(H,L),_++}}catch(Y){if(Y.message?.includes("no such index")){let Z=await this.client.keys("checkpoint:*:*:shallow");if(Z.length===0)return;Z.sort().reverse();let _=new Set,E=0,H=G?.limit??10;for(let $ of Z){if(E>=H)break;let L=await this.client.json.get($);if(!L)continue;let U=`${L.thread_id}:${L.checkpoint_ns}`;if(_.has(U))continue;if(_.add(U),G?.filter){if(!this.checkMetadataFilterMatch(L.metadata,G.filter))continue}let O=await this.serde.loadsTyped("json",JSON.stringify(L.checkpoint));yield await this.createCheckpointTuple(L,O),E++}return}throw Y}}}async putWrites(F,G,J){await this.ensureIndexes();let Q=F.configurable?.thread_id,X=F.configurable?.checkpoint_ns??"",Y=F.configurable?.checkpoint_id;if(!Q||!Y)throw Error("thread_id and checkpoint_id are required");let Z=`checkpoint_write:${Q}:${X}:${Y}:${J}:*`,_=await this.client.keys(Z);if(_.length>0)await this.client.del(_);let E=[];for(let $=0;$<G.length;$++){let[L,U]=G[$],O=`checkpoint_write:${Q}:${X}:${Y}:${J}:${$}`;E.push(O);let T={thread_id:Q,checkpoint_ns:X,checkpoint_id:Y,task_id:J,idx:$,channel:L,type:typeof U==="object"?"json":"string",value:U};await this.client.json.set(O,"$",T)}if(E.length>0){let $=`write_keys_zset:${Q}:${X}:${Y}`,L={};if(E.forEach((U,O)=>{L[U]=O}),await this.client.zAdd($,Object.entries(L).map(([U,O])=>({score:O,value:U}))),this.ttlConfig?.defaultTTL)await this.applyTTL(...E,$)}let H=`checkpoint:${Q}:${X}:shallow`;if(await this.client.exists(H)){let $=await this.client.json.get(H);if($)$.has_writes="true",await this.client.json.set(H,"$",$)}}async deleteThread(F){let G=`checkpoint:${F}:*:shallow`,J=await this.client.keys(G);if(J.length>0)await this.client.del(J);let Q=`checkpoint_write:${F}:*`,X=await this.client.keys(Q);if(X.length>0)await this.client.del(X);let Y=`write_keys_zset:${F}:*`,Z=await this.client.keys(Y);if(Z.length>0)await this.client.del(Z)}async end(){await this.client.quit()}addSearchableMetadataFields(F,G){if(!G)return;if("source"in G)F.source=G.source;if("step"in G)F.step=G.step;if("writes"in G)F.writes=typeof G.writes==="object"?JSON.stringify(G.writes):G.writes;if("score"in G)F.score=G.score}async createCheckpointTuple(F,G,J){let Q=await this.serde.loadsTyped("json",JSON.stringify(F.metadata));return{config:{configurable:{thread_id:F.thread_id,checkpoint_ns:F.checkpoint_ns,checkpoint_id:F.checkpoint_id}},checkpoint:G,metadata:Q,parentConfig:F.parent_checkpoint_id?{configurable:{thread_id:F.thread_id,checkpoint_ns:F.checkpoint_ns,checkpoint_id:F.parent_checkpoint_id}}:void 0,pendingWrites:J}}async applyTTL(...F){if(!this.ttlConfig?.defaultTTL)return;let G=Math.floor(this.ttlConfig.defaultTTL*60),J=await Promise.allSettled(F.map((Q)=>this.client.expire(Q,G)));for(let Q=0;Q<J.length;Q++)if(J[Q].status==="rejected")console.warn(`Failed to set TTL for key ${F[Q]}:`,J[Q].reason)}async loadPendingWrites(F,G,J){let Q=`write_keys_zset:${F}:${G}:${J}`,X=await this.client.zRange(Q,0,-1);if(X.length===0)return;let Y=[];for(let Z of X){let _=await this.client.json.get(Z);if(_){let E=await this.serde.loadsTyped("json",JSON.stringify(_.value));Y.push([_.task_id,_.channel,E])}}return Y}checkMetadataFilterMatch(F,G){for(let[J,Q]of Object.entries(G)){let X=F?.[J];if(Q===null){if(!(J in(F||{}))||X!==null)return!1}else if(typeof Q==="object"&&!Array.isArray(Q)){if(typeof X!=="object"||X===null)return!1;if(B(Q)!==B(X))return!1}else if(X!==Q)return!1}return!0}async cleanupOldCheckpoint(F,G,J){let Q=`checkpoint_write:${F}:${G}:${J}:*`,X=await this.client.keys(Q);if(X.length>0)await this.client.del(X);let Y=`write_keys_zset:${F}:${G}:${J}`;await this.client.del(Y);let Z=`checkpoint_blob:${F}:${G}:${J}:*`,_=await this.client.keys(Z);if(_.length>0)await this.client.del(_)}sanitizeMetadata(F){if(!F)return{};let G={};for(let[J,Q]of Object.entries(F)){let X=J.replace(/\x00/g,"");G[X]=typeof Q==="string"?Q.replace(/\x00/g,""):Q}return G}async ensureIndexes(){for(let F of P)try{await this.client.ft.create(F.index,F.schema,{ON:"JSON",PREFIX:F.prefix})}catch(G){if(!G.message?.includes("Index already exists"))console.error(`Failed to create index ${F.index}:`,G.message)}}};export{N as ShallowRedisSaver};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-
|
|
1
|
+
import"./chunk-fzn8xq6f.js";var Q=((f)=>{return f.NETWORK_ERROR="NETWORK_ERROR",f.CONNECTION_TIMEOUT="CONNECTION_TIMEOUT",f.INTERNAL_ERROR="INTERNAL_ERROR",f.THREAD_NOT_FOUND="THREAD_NOT_FOUND",f.THREAD_BUSY="THREAD_BUSY",f.RUN_NOT_FOUND="RUN_NOT_FOUND",f.GRAPH_NOT_FOUND="GRAPH_NOT_FOUND",f.INVALID_REQUEST="INVALID_REQUEST",f})(Q||{});class J extends Error{constructor(f,w,x){super(w);this.code=f,this.statusCode=x,this.name="RemoteApiError"}}async function N(f,w,x){try{let z=f;if(x?.query){let V=new URLSearchParams;Object.entries(x.query).forEach(([X,Y])=>{V.append(X,String(Y))}),z+=`?${V.toString()}`}let O=await fetch(z,{method:w,headers:{"Content-Type":"application/json"},body:x?.body?JSON.stringify(x.body):void 0}),F=await O.json();if(!O.ok||!F.success)throw new J(F.error?.code||Q.INTERNAL_ERROR,F.error?.message||"Unknown error",O.status);return F}catch(z){if(z instanceof J)throw z;throw new J(Q.NETWORK_ERROR,`Network error: ${z instanceof Error?z.message:"Unknown error"}`)}}async function H(f,w){return N(f,"GET",{query:w})}async function B(f,w,x){return N(f,"POST",{body:w,query:x})}async function W(f,w,x){return N(f,"PUT",{body:w,query:x})}async function _(f,w){return N(f,"DELETE",{query:w})}class ${constructor(f,w){this.serverUrl=f,this.httpClient=w,this.serverUrl=f.replace(/\/$/,""),this.httpClient=w||fetch}async setup(){await B(`${this.serverUrl}/setup`)}async create(f){return(await B(`${this.serverUrl}/threads`,f)).data}async search(f){let w={};if(f?.ids!==void 0&&f.ids.length>0)w.ids=JSON.stringify(f.ids);if(f?.metadata!==void 0)w.metadata=JSON.stringify(f.metadata);if(f?.limit!==void 0)w.limit=f.limit;if(f?.offset!==void 0)w.offset=f.offset;if(f?.status!==void 0)w.status=f.status;if(f?.sortBy!==void 0)w.sortBy=f.sortBy;if(f?.sortOrder!==void 0)w.sortOrder=f.sortOrder;if(f?.values!==void 0)w.values=JSON.stringify(f.values);if(f?.select!==void 0)w.select=JSON.stringify(f.select);if(f?.withoutDetails!==void 0)w.withoutDetails=f.withoutDetails;return(await H(`${this.serverUrl}/threads`,w)).data}async get(f){return(await H(`${this.serverUrl}/threads/${f}`)).data}async set(f,w){await W(`${this.serverUrl}/threads/${f}`,w)}async delete(f){await _(`${this.serverUrl}/threads/${f}`)}async updateState(f,w){return(await B(`${this.serverUrl}/threads/${f}/state`,w)).data}async createRun(f,w,x){return(await B(`${this.serverUrl}/threads/${f}/runs`,x||{},{assistantId:w})).data}async listRuns(f,w){let x={};if(w?.limit!==void 0)x.limit=w.limit;if(w?.offset!==void 0)x.offset=w.offset;if(w?.status!==void 0)x.status=w.status;return(await H(`${this.serverUrl}/threads/${f}/runs`,x)).data}async updateRun(f,w){await W(`${this.serverUrl}/runs/${f}`,w)}async count(f){let w={};if(f?.ids!==void 0&&f.ids.length>0)w.ids=JSON.stringify(f.ids);if(f?.metadata!==void 0)w.metadata=JSON.stringify(f.metadata);if(f?.status!==void 0)w.status=f.status;if(f?.values!==void 0)w.values=JSON.stringify(f.values);return(await H(`${this.serverUrl}/threads/count`,w)).data}async patch(f,w){return(await B(`${this.serverUrl}/threads/${f}`,w)).data}async getState(f,w){let x={};if(w?.subgraphs!==void 0)x.subgraphs=w.subgraphs;if(w?.checkpointId!==void 0)x.checkpointId=w.checkpointId;return(await B(`${this.serverUrl}/threads/${f}/state`,x)).data}async getStateHistory(f,w){let x={};if(w?.limit!==void 0)x.limit=w.limit;if(w?.before!==void 0)x.before=w.before;return(await B(`${this.serverUrl}/threads/${f}/history`,x)).data}async copy(f){return(await B(`${this.serverUrl}/threads/${f}/copy`)).data}}export{$ as RemoteKyselyThreadsManager};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{pb as a}from"./chunk-p8fbtgk3.js";import"./chunk-fzn8xq6f.js";export{a as FileSystemConfigStore};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import k from"fs/promises";import q from"path";import z from"os";class A{pluginsDir;constructor(){let b=z.homedir();this.pluginsDir=q.join(b,".zen-code","plugins")}async listPlugins(){try{let b=await k.readdir(this.pluginsDir,{withFileTypes:!0}),d=[];for(let j of b)if(j.isDirectory()){let v=q.join(this.pluginsDir,j.name,"plugin.json");try{let x=await k.readFile(v,"utf-8"),w=JSON.parse(x);d.push({name:j.name,version:w.version||"0.0.0",enabled:w.enabled!==!1})}catch{}}return d}catch{return[]}}async getPluginConfig(b){let d=q.join(this.pluginsDir,b,"plugin.json");try{let j=await k.readFile(d,"utf-8");return JSON.parse(j)}catch{return null}}async updatePluginConfig(b,d){let j=q.join(this.pluginsDir,b);await k.mkdir(j,{recursive:!0});let v=q.join(j,"plugin.json");await k.writeFile(v,JSON.stringify(d,null,2),"utf-8")}async installPlugin(b,d){let j=q.join(this.pluginsDir,b);await k.mkdir(j,{recursive:!0});let v={name:b,version:"0.0.1",enabled:!0,source:d};await this.updatePluginConfig(b,v)}async uninstallPlugin(b){let d=q.join(this.pluginsDir,b);await k.rm(d,{recursive:!0,force:!0})}}
|
|
2
|
-
export{A as
|
|
2
|
+
export{A as rb};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{V as
|
|
1
|
+
import{wb as W}from"./chunk-fzn8xq6f.js";import X from"micromatch";import{z as E}from"zod";var T;((D)=>{D.ALLOW="allow";D.ASK="ask";D.DENY="deny"})(T||={});var _=E.object({tool:E.string(),specifier:E.string().optional(),action:E.nativeEnum(T)}),$=E.object({allow:E.array(E.string()).optional(),ask:E.array(E.string()).optional(),deny:E.array(E.string()).optional(),defaultMode:E.nativeEnum(T).optional()}),v=E.object({name:E.string(),args:E.record(E.string(),E.any())});class Q{rules;defaultMode;patternCache=new Map;constructor(x){this.rules=x.rules,this.defaultMode=x.defaultMode||"ask",this.rules.sort((q,B)=>{let D={deny:0,ask:1,allow:2},H=D[q.action]-D[B.action];if(H!==0)return H;let J=q.specifier==null?1:0,N=B.specifier==null?1:0;return J-N})}checkPermission(x){for(let q of this.rules)if(this.matchRule(q,x))return{allowed:q.action==="allow"||q.action==="ask",requiresApproval:q.action==="ask",matchedRule:q,reason:this.getReason(q)};return{allowed:this.defaultMode==="allow"||this.defaultMode==="ask",requiresApproval:this.defaultMode==="ask",reason:`No matching rule, using default mode: ${this.defaultMode}`}}matchRule(x,q){if(x.tool!==q.name)return!1;if(!x.specifier)return!0;let B=this.argsToString(q.args);if(q.name==="Bash")return this.matchBashCommand(x.specifier,B);if(x.specifier.endsWith(" ")&&!/[*?[\\]/.test(x.specifier))return B.startsWith(x.specifier);return this.matchGlob(x.specifier,B)}matchBashCommand(x,q){if(/[;&|]/.test(q))return!1;let D=/[<>()]/;if(D.test(q)){let H=q.split(D)[0].trim();return this.matchBashPattern(x,H)}return this.matchBashPattern(x,q)}matchBashPattern(x,q){if(x.endsWith(" "))return q.startsWith(x);return this.matchGlob(x,q)}matchGlob(x,q){try{let B=x.replace(/^\.\//,""),D=q.replace(/^\.\//,""),H=`${x}::${q}`,J=this.patternCache.get(H);if(J!==void 0)return J;let N=X.isMatch(D,B,{nocase:!1,dot:!0});return this.cacheResult(H,N),N}catch(B){return q===x}}cacheResult(x,q){if(this.patternCache.size>1000){let B=this.patternCache.keys().next().value;if(B)this.patternCache.delete(B)}this.patternCache.set(x,q)}argsToString(x){if(typeof x==="object"&&x!==null){if("command"in x&&x.command)return String(x.command);if("file_path"in x&&x.file_path)return String(x.file_path);return Object.values(x).flat().join(" ")}return String(x)}getReason(x){let q=x.action.toUpperCase(),B=x.tool,D=x.specifier?`(${x.specifier})`:"";return`${q} rule matched: ${B}${D}`}static parseRule(x,q){let B=x.match(/^(\w+)(?:\((.*)\))?$/);if(!B)throw Error(`Invalid permission rule format: ${x}`);let[,D,H]=B;return{tool:D,specifier:H,action:q}}static fromConfig(x){let q=[];for(let B of x.allow||[])q.push(Q.parseRule(B,"allow"));for(let B of x.ask||[])q.push(Q.parseRule(B,"ask"));for(let B of x.deny||[])q.push(Q.parseRule(B,"deny"));return new Q({rules:q,defaultMode:x.defaultMode||"ask"})}clearCache(){this.patternCache.clear()}getCacheSize(){return this.patternCache.size}}class L{configStore;toolNameMapper={};constructor(x){this.configStore=x}static instance=null;static getInstance(x){if(!L.instance){if(!x)throw Error("PermissionStore not initialized. Provide configStore on first call.");L.instance=new L(x)}return L.instance}static resetInstance(){L.instance=null}async getPermissions(){let x=await this.configStore.getConfig();if(x.permissions)return Q.fromConfig(x.permissions);return}async checkBashPermission(x,q){return(await this.getPermissions())?.checkPermission({name:"Bash",args:{command:x,cwd:q}})}async checkReadPermission(x){return(await this.getPermissions())?.checkPermission({name:"Read",args:{file_path:x}})}async checkWritePermission(x){return(await this.getPermissions())?.checkPermission({name:"Write",args:{file_path:x}})}}class V{configStore;skillStore;pluginStore;remoteStore;permissionStore;_initialized=!1;constructor(x,q,B,D){this.configStore=x,this.skillStore=q,this.pluginStore=B,this.remoteStore=D,this.permissionStore=L.getInstance(x)}async initialize(){if(this._initialized)return;if("initialize"in this.configStore&&typeof this.configStore.initialize==="function")await this.configStore.initialize();if("initialize"in this.skillStore&&typeof this.skillStore.initialize==="function")await this.skillStore.initialize();if("initialize"in this.pluginStore&&typeof this.pluginStore.initialize==="function")await this.pluginStore.initialize();this._initialized=!0}async ensureInitialized(){if(!this._initialized)throw Error("ConfigManager not initialized. Call await manager.initialize() first.")}async getConfig(){return await this.ensureInitialized(),await this.configStore.getConfig()}async updateConfig(x){return await this.ensureInitialized(),await this.configStore.updateConfig(x)}async listSkills(){return await this.ensureInitialized(),await this.skillStore.listSkills()}async getSkill(x){return await this.ensureInitialized(),await this.skillStore.getSkill(x)}async saveSkill(x,q){return await this.ensureInitialized(),await this.skillStore.saveSkill(x,q)}async deleteSkill(x){return await this.ensureInitialized(),await this.skillStore.deleteSkill(x)}async syncSkillsFromRemote(){if(await this.ensureInitialized(),!this.remoteStore)throw Error("Remote store not configured");return await this.skillStore.syncFromRemote(this.remoteStore)}async listPlugins(){return await this.ensureInitialized(),await this.pluginStore.listPlugins()}async getPluginConfig(x){return await this.ensureInitialized(),await this.pluginStore.getPluginConfig(x)}async updatePluginConfig(x,q){return await this.ensureInitialized(),await this.pluginStore.updatePluginConfig(x,q)}async installPlugin(x,q){return await this.ensureInitialized(),await this.pluginStore.installPlugin(x,q)}async uninstallPlugin(x){return await this.ensureInitialized(),await this.pluginStore.uninstallPlugin(x)}async checkBashPermission(x,q){return await this.ensureInitialized(),await this.permissionStore.checkBashPermission(x,q)}async checkReadPermission(x){return await this.ensureInitialized(),await this.permissionStore.checkReadPermission(x)}async checkWritePermission(x){return await this.ensureInitialized(),await this.permissionStore.checkWritePermission(x)}async getPermissionMatcher(){return await this.ensureInitialized(),await this.permissionStore.getPermissions()}getConfigPath(){return this.configStore?.dbPath}}async function y(){let{FileSystemConfigStore:x}=await import("./chunk-t15ptqbm.js"),{FileSystemSkillStore:q}=await import("./chunk-2e7zh8he.js"),{FileSystemPluginStore:B}=await import("./chunk-2y73pxem.js"),D=new x,H=new q,J=new B,N=new V(D,H,J);return await N.initialize(),N}async function z(x){let{configStore:q,skillStore:B,pluginStore:D,remoteStore:H}=x,J=new V(q,B,D,H);return await J.initialize(),J}
|
|
2
|
+
export{V as mb,y as nb,z as ob};
|
package/dist/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{
|
|
2
|
+
import{ba as E}from"./chunk-02vv5584.js";import{wb as w}from"./chunk-fzn8xq6f.js";var j=process.argv.slice(2);async function F(){process.env.LG_TEMP_MESSAGE="true";let f=j.indexOf("--yolo");if(f!==-1)process.env.YOLO_MODE="true",j.splice(f,1);if(globalThis.Bun&&E("~/.zen-code/data/sessions.db"),j[0]==="init")console.log("Please zen-code and use /m to configure models");else if(j[0]==="keyboard")import("./zen-keyboard.js");else if(j[0]==="-p"||j[0]==="--prompt"){let A=j.slice(1).join(" "),{runNonInteractive:q}=await import("./nonInteractive.js");await q(A,!1)}else if(await G()){let{runNonInteractive:q}=await import("./nonInteractive.js");await q(void 0,!0)}else await import("./app.js")}async function G(){return new Promise((f)=>{if(process.stdin.isTTY){f(!1);return}let q=process.stdin.read();if(q)process.stdin.unshift(q),f(!0);else setTimeout(()=>{let B=process.stdin.read();if(B)process.stdin.unshift(B),f(!0);else f(!1)},100)})}F().catch((f)=>{console.error("❌ 执行失败:",f),process.exit(1)});
|
package/dist/nonInteractive.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./chunk-
|
|
1
|
+
import"./chunk-ed6aprzz.js";import"./chunk-fnrbq03p.js";import"./chunk-0kqqh5rr.js";import"./chunk-0f022x9v.js";import{Ba as A}from"./chunk-141pasd6.js";import"./chunk-aeambwc5.js";import"./chunk-5kmnxyd8.js";import"./chunk-0a26n1zy.js";import"./chunk-vyejbw66.js";import"./chunk-4fwb6qr1.js";import{nb as N}from"./chunk-xemvstcq.js";import"./chunk-p8fbtgk3.js";import"./chunk-fbg1z6br.js";import"./chunk-tvqxepjm.js";import"./chunk-fzn8xq6f.js";import{HumanMessage as q}from"langchain";import{AgentPackage as B,ToolRegistry as l,MiddlewareRegistry as P}from"@langgraph-js/standard-agent";async function D(){return new Promise((b,x)=>{let T="";process.stdin.setEncoding("utf8"),process.stdin.on("data",(d)=>{T+=d}),process.stdin.on("end",()=>{b(T)}),process.stdin.on("error",(d)=>{x(d)})})}async function i(b,x=!1){let T=await N();await T.initialize();let d=await T.getConfig(),y=b||"";if(x)try{y=(await D()).trim()}catch(w){throw console.error("❌ 读取 stdin 失败:",w),w}if(!y)console.error("❌ 错误: 未提供输入内容"),console.error(`
|
|
2
2
|
用法:`),console.error(' zen-code -p "你的任务描述"'),console.error(' echo "内容" | zen-code'),process.exit(1);try{let w={messages:[new q(y)],provider_id:d.provider_id,model_id:d.model_id,enable_thinking:d.enable_thinking},E=await A.invoke(w,{recursionLimit:500}),F=E.messages||[],M=F[F.length-1];if(M)console.log(M.text);return E}catch(w){throw console.error(`
|
|
3
3
|
❌ 执行失败: ${w instanceof Error?w.message:String(w)}
|
|
4
4
|
`),w}}export{i as runNonInteractive};
|
package/dist/zen-keyboard.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{ea as h,ga as s,ha as i,na as p,oa as u}from"./chunk-emv4z7ck.js";import{sb as n}from"./chunk-fzn8xq6f.js";var f=n(h(),1);var r=n(u(),1);i(r.jsxDEV(O,{},void 0,!1,void 0,this));function O(){let[m,l]=f.useState(`Press any key...
|
|
2
2
|
`);return p((y,c,g)=>{let t=["\x1B[2J\x1B[H","input:",JSON.stringify(y),"","key:"],o=Object.entries(c).filter(([,e])=>e===!0);for(let[e]of o)t.push(` ${e}: true`);if(o.length===0)t.push(" (no true values)");t.push(JSON.stringify(g,null,2)),l(t.join(`
|
|
3
3
|
`))}),r.jsxDEV(s,{children:m},void 0,!1,void 0,this)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zen-code",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/cli.js",
|
|
6
6
|
"bin": "./dist/cli.js",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@vitejs/plugin-react": "^5.1.2",
|
|
73
73
|
"happy-dom": "^20.3.9",
|
|
74
74
|
"ink": "^6.6.0",
|
|
75
|
-
"ink-markdown-es": "^1.
|
|
75
|
+
"ink-markdown-es": "^1.4.0",
|
|
76
76
|
"ink-pro": "^1.1.0",
|
|
77
77
|
"ink-spinner": "^5.0.0",
|
|
78
78
|
"ink-syntax-highlight": "^2.0.2",
|
package/dist/chunk-06dj0dnz.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-nr26055z.js";var e=Object.freeze(JSON.parse('{"displayName":"Gettext PO","fileTypes":["po","pot","potx"],"name":"po","patterns":[{"begin":"^(?:(?=(msg(?:id(_plural)?|ctxt))\\\\s*\\"[^\\"])|\\\\s*$)","end":"\\\\z","patterns":[{"include":"#body"}]},{"include":"#comments"},{"match":"^msg(id|str)\\\\s+\\"\\"\\\\s*$\\\\n?","name":"comment.line.number-sign.po"},{"captures":{"1":{"name":"constant.language.po"},"2":{"name":"punctuation.separator.key-value.po"},"3":{"name":"string.other.po"}},"match":"^\\"(?:([^:\\\\s]+)(:)\\\\s+)?([^\\"]*)\\"\\\\s*$\\\\n?","name":"meta.header.po"}],"repository":{"body":{"patterns":[{"begin":"^(msgid(_plural)?)\\\\s+","beginCaptures":{"1":{"name":"keyword.control.msgid.po"}},"end":"^(?!\\")","name":"meta.scope.msgid.po","patterns":[{"begin":"(\\\\G|^)\\"","end":"\\"","name":"string.quoted.double.po","patterns":[{"match":"\\\\\\\\[\\"\\\\\\\\]","name":"constant.character.escape.po"}]}]},{"begin":"^(msgstr)(?:(\\\\[)(\\\\d+)(]))?\\\\s+","beginCaptures":{"1":{"name":"keyword.control.msgstr.po"},"2":{"name":"keyword.control.msgstr.po"},"3":{"name":"constant.numeric.po"},"4":{"name":"keyword.control.msgstr.po"}},"end":"^(?!\\")","name":"meta.scope.msgstr.po","patterns":[{"begin":"(\\\\G|^)\\"","end":"\\"","name":"string.quoted.double.po","patterns":[{"match":"\\\\\\\\[\\"\\\\\\\\]","name":"constant.character.escape.po"}]}]},{"begin":"^(msgctxt)(?:(\\\\[)(\\\\d+)(]))?\\\\s+","beginCaptures":{"1":{"name":"keyword.control.msgctxt.po"},"2":{"name":"keyword.control.msgctxt.po"},"3":{"name":"constant.numeric.po"},"4":{"name":"keyword.control.msgctxt.po"}},"end":"^(?!\\")","name":"meta.scope.msgctxt.po","patterns":[{"begin":"(\\\\G|^)\\"","end":"\\"","name":"string.quoted.double.po","patterns":[{"match":"\\\\\\\\[\\"\\\\\\\\]","name":"constant.character.escape.po"}]}]},{"captures":{"1":{"name":"punctuation.definition.comment.po"}},"match":"^(#~).*$\\\\n?","name":"comment.line.number-sign.obsolete.po"},{"include":"#comments"},{"match":"^(?!\\\\s*$)[^\\"#].*$\\\\n?","name":"invalid.illegal.po"}]},"comments":{"patterns":[{"begin":"^(?=#)","end":"(?!\\\\G)","patterns":[{"begin":"(#,)\\\\s+","beginCaptures":{"1":{"name":"punctuation.definition.comment.po"}},"end":"\\\\n","name":"comment.line.number-sign.flag.po","patterns":[{"captures":{"1":{"name":"entity.name.type.flag.po"}},"match":"(?:\\\\G|,\\\\s*)(fuzzy|(?:no-)?(?:c|objc|sh|lisp|elisp|librep|scheme|smalltalk|java|csharp|awk|object-pascal|ycp|tcl|perl|perl-brace|php|gcc-internal|qt|boost)-format)"}]},{"begin":"#\\\\.","beginCaptures":{"0":{"name":"punctuation.definition.comment.po"}},"end":"\\\\n","name":"comment.line.number-sign.extracted.po"},{"begin":"(#:)[\\\\t ]*","beginCaptures":{"1":{"name":"punctuation.definition.comment.po"}},"end":"\\\\n","name":"comment.line.number-sign.reference.po","patterns":[{"match":"(\\\\S+:)([;\\\\d]*)","name":"storage.type.class.po"}]},{"begin":"#\\\\|","beginCaptures":{"0":{"name":"punctuation.definition.comment.po"}},"end":"\\\\n","name":"comment.line.number-sign.previous.po"},{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.po"}},"end":"\\\\n","name":"comment.line.number-sign.po"}]}]}},"scopeName":"source.po","aliases":["pot","potx"]}')),n=[e];export{n as default};
|
package/dist/chunk-0cbmnyee.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as a}from"./chunk-3x564va6.js";import"./chunk-nr26055z.js";export{a as default};
|
package/dist/chunk-0cknr23d.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-nr26055z.js";var e=Object.freeze(JSON.parse('{"displayName":"WGSL","name":"wgsl","patterns":[{"include":"#line_comments"},{"include":"#block_comments"},{"include":"#keywords"},{"include":"#attributes"},{"include":"#functions"},{"include":"#function_calls"},{"include":"#constants"},{"include":"#types"},{"include":"#variables"},{"include":"#punctuation"}],"repository":{"attributes":{"patterns":[{"captures":{"1":{"name":"keyword.operator.attribute.at"},"2":{"name":"entity.name.attribute.wgsl"}},"match":"(@)([A-Z_a-z]+)","name":"meta.attribute.wgsl"}]},"block_comments":{"patterns":[{"match":"/\\\\*\\\\*/","name":"comment.block.wgsl"},{"begin":"/\\\\*\\\\*","end":"\\\\*/","name":"comment.block.documentation.wgsl","patterns":[{"include":"#block_comments"}]},{"begin":"/\\\\*(?!\\\\*)","end":"\\\\*/","name":"comment.block.wgsl","patterns":[{"include":"#block_comments"}]}]},"constants":{"patterns":[{"match":"(-?\\\\b[0-9][0-9]*\\\\.[0-9][0-9]*)([Ee][-+]?[0-9]+)?\\\\b","name":"constant.numeric.float.wgsl"},{"match":"(?:-?\\\\b0x\\\\h+|\\\\b0|-?\\\\b[1-9][0-9]*)\\\\b","name":"constant.numeric.decimal.wgsl"},{"match":"\\\\b(?:0x\\\\h+|0|[1-9][0-9]*)u\\\\b","name":"constant.numeric.decimal.wgsl"},{"match":"\\\\b(true|false)\\\\b","name":"constant.language.boolean.wgsl"}]},"function_calls":{"patterns":[{"begin":"([0-9A-Z_a-z]+)(\\\\()","beginCaptures":{"1":{"name":"entity.name.function.wgsl"},"2":{"name":"punctuation.brackets.round.wgsl"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.brackets.round.wgsl"}},"name":"meta.function.call.wgsl","patterns":[{"include":"#line_comments"},{"include":"#block_comments"},{"include":"#keywords"},{"include":"#attributes"},{"include":"#function_calls"},{"include":"#constants"},{"include":"#types"},{"include":"#variables"},{"include":"#punctuation"}]}]},"functions":{"patterns":[{"begin":"\\\\b(fn)\\\\s+([0-9A-Z_a-z]+)((\\\\()|(<))","beginCaptures":{"1":{"name":"keyword.other.fn.wgsl"},"2":{"name":"entity.name.function.wgsl"},"4":{"name":"punctuation.brackets.round.wgsl"}},"end":"\\\\{","endCaptures":{"0":{"name":"punctuation.brackets.curly.wgsl"}},"name":"meta.function.definition.wgsl","patterns":[{"include":"#line_comments"},{"include":"#block_comments"},{"include":"#keywords"},{"include":"#attributes"},{"include":"#function_calls"},{"include":"#constants"},{"include":"#types"},{"include":"#variables"},{"include":"#punctuation"}]}]},"keywords":{"patterns":[{"match":"\\\\b(bitcast|block|break|case|continue|continuing|default|discard|else|elseif|enable|fallthrough|for|function|if|loop|private|read|read_write|return|storage|switch|uniform|while|workgroup|write)\\\\b","name":"keyword.control.wgsl"},{"match":"\\\\b(asm|const|do|enum|handle|mat|premerge|regardless|typedef|unless|using|vec|void)\\\\b","name":"keyword.control.wgsl"},{"match":"\\\\b(let|var)\\\\b","name":"keyword.other.wgsl storage.type.wgsl"},{"match":"\\\\b(type)\\\\b","name":"keyword.declaration.type.wgsl storage.type.wgsl"},{"match":"\\\\b(enum)\\\\b","name":"keyword.declaration.enum.wgsl storage.type.wgsl"},{"match":"\\\\b(struct)\\\\b","name":"keyword.declaration.struct.wgsl storage.type.wgsl"},{"match":"\\\\bfn\\\\b","name":"keyword.other.fn.wgsl"},{"match":"([\\\\^|]|\\\\|\\\\||&&|<<|>>|!)(?!=)","name":"keyword.operator.logical.wgsl"},{"match":"&(?![\\\\&=])","name":"keyword.operator.borrow.and.wgsl"},{"match":"((?:[-%\\\\&*+/^|]|<<|>>)=)","name":"keyword.operator.assignment.wgsl"},{"match":"(?<![<>])=(?![=>])","name":"keyword.operator.assignment.equal.wgsl"},{"match":"(=(=)?(?!>)|!=|<=|(?<!=)>=)","name":"keyword.operator.comparison.wgsl"},{"match":"(([%+]|(\\\\*(?!\\\\w)))(?!=))|(-(?!>))|(/(?!/))","name":"keyword.operator.math.wgsl"},{"match":"\\\\.(?!\\\\.)","name":"keyword.operator.access.dot.wgsl"},{"match":"->","name":"keyword.operator.arrow.skinny.wgsl"}]},"line_comments":{"match":"\\\\s*//.*","name":"comment.line.double-slash.wgsl"},"punctuation":{"patterns":[{"match":",","name":"punctuation.comma.wgsl"},{"match":"[{}]","name":"punctuation.brackets.curly.wgsl"},{"match":"[()]","name":"punctuation.brackets.round.wgsl"},{"match":";","name":"punctuation.semi.wgsl"},{"match":"[]\\\\[]","name":"punctuation.brackets.square.wgsl"},{"match":"(?<![-=])[<>]","name":"punctuation.brackets.angle.wgsl"}]},"types":{"name":"storage.type.wgsl","patterns":[{"match":"\\\\b(bool|i32|u32|f32)\\\\b","name":"storage.type.wgsl"},{"match":"\\\\b([fiu]64)\\\\b","name":"storage.type.wgsl"},{"match":"\\\\b(vec(?:2i|3i|4i|2u|3u|4u|2f|3f|4f|2h|3h|4h))\\\\b","name":"storage.type.wgsl"},{"match":"\\\\b(mat(?:2x2f|2x3f|2x4f|3x2f|3x3f|3x4f|4x2f|4x3f|4x4f|2x2h|2x3h|2x4h|3x2h|3x3h|3x4h|4x2h|4x3h|4x4h))\\\\b","name":"storage.type.wgsl"},{"match":"\\\\b(vec[234]|mat[234]x[234])\\\\b","name":"storage.type.wgsl"},{"match":"\\\\b(atomic)\\\\b","name":"storage.type.wgsl"},{"match":"\\\\b(array)\\\\b","name":"storage.type.wgsl"},{"match":"\\\\b([A-Z][0-9A-Za-z]*)\\\\b","name":"entity.name.type.wgsl"}]},"variables":{"patterns":[{"match":"\\\\b(?<!(?<!\\\\.)\\\\.)(?:r#(?!(crate|[Ss]elf|super)))?[0-9_a-z]+\\\\b","name":"variable.other.wgsl"}]}},"scopeName":"source.wgsl"}')),t=[e];export{t as default};
|
package/dist/chunk-0jtrg9s1.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-nr26055z.js";var e=Object.freeze(JSON.parse('{"displayName":"Protocol Buffer 3","fileTypes":["proto"],"name":"proto","patterns":[{"include":"#comments"},{"include":"#syntax"},{"include":"#package"},{"include":"#import"},{"include":"#optionStmt"},{"include":"#message"},{"include":"#enum"},{"include":"#service"}],"repository":{"comments":{"patterns":[{"begin":"/\\\\*","end":"\\\\*/","name":"comment.block.proto"},{"begin":"//","end":"$\\\\n?","name":"comment.line.double-slash.proto"}]},"constants":{"match":"\\\\b(true|false|max|[A-Z_]+)\\\\b","name":"constant.language.proto"},"enum":{"begin":"(enum)(\\\\s+)([A-Za-z][0-9A-Z_a-z]*)(\\\\s*)(\\\\{)?","beginCaptures":{"1":{"name":"keyword.other.proto"},"3":{"name":"entity.name.class.proto"}},"end":"}","patterns":[{"include":"#reserved"},{"include":"#optionStmt"},{"include":"#comments"},{"begin":"([A-Za-z][0-9A-Z_a-z]*)\\\\s*(=)\\\\s*(-?0[Xx]\\\\h+|-?[0-9]+)","beginCaptures":{"1":{"name":"variable.other.proto"},"2":{"name":"keyword.operator.assignment.proto"},"3":{"name":"constant.numeric.proto"}},"end":"(;)","endCaptures":{"1":{"name":"punctuation.terminator.proto"}},"patterns":[{"include":"#fieldOptions"}]}]},"field":{"begin":"\\\\s*(optional|repeated|required)?\\\\s*(\\\\.?[.\\\\w]+)\\\\s+(\\\\w+)\\\\s*(=)\\\\s*(0[Xx]\\\\h+|[0-9]+)","beginCaptures":{"1":{"name":"storage.modifier.proto"},"2":{"name":"storage.type.proto"},"3":{"name":"variable.other.proto"},"4":{"name":"keyword.operator.assignment.proto"},"5":{"name":"constant.numeric.proto"}},"end":"(;)","endCaptures":{"1":{"name":"punctuation.terminator.proto"}},"patterns":[{"include":"#fieldOptions"}]},"fieldOptions":{"begin":"\\\\[","end":"]","patterns":[{"include":"#constants"},{"include":"#number"},{"include":"#string"},{"include":"#subMsgOption"},{"include":"#optionName"}]},"ident":{"match":"\\\\.?[A-Za-z][.0-9A-Z_a-z]*","name":"entity.name.class.proto"},"import":{"captures":{"1":{"name":"keyword.other.proto"},"2":{"name":"keyword.other.proto"},"3":{"name":"string.quoted.double.proto.import"},"4":{"name":"punctuation.terminator.proto"}},"match":"\\\\s*(import)\\\\s+(weak|public)?\\\\s*(\\"[^\\"]+\\")\\\\s*(;)"},"kv":{"begin":"(\\\\w+)\\\\s*(:)","beginCaptures":{"1":{"name":"keyword.other.proto"},"2":{"name":"punctuation.separator.key-value.proto"}},"end":"(;)|,|(?=[/A-Z_a-z}])","endCaptures":{"1":{"name":"punctuation.terminator.proto"}},"patterns":[{"include":"#constants"},{"include":"#number"},{"include":"#string"},{"include":"#subMsgOption"}]},"mapfield":{"begin":"\\\\s*(map)\\\\s*(<)\\\\s*(\\\\.?[.\\\\w]+)\\\\s*,\\\\s*(\\\\.?[.\\\\w]+)\\\\s*(>)\\\\s+(\\\\w+)\\\\s*(=)\\\\s*(\\\\d+)","beginCaptures":{"1":{"name":"storage.type.proto"},"2":{"name":"punctuation.definition.typeparameters.begin.proto"},"3":{"name":"storage.type.proto"},"4":{"name":"storage.type.proto"},"5":{"name":"punctuation.definition.typeparameters.end.proto"},"6":{"name":"variable.other.proto"},"7":{"name":"keyword.operator.assignment.proto"},"8":{"name":"constant.numeric.proto"}},"end":"(;)","endCaptures":{"1":{"name":"punctuation.terminator.proto"}},"patterns":[{"include":"#fieldOptions"}]},"message":{"begin":"(message|extend)(\\\\s+)([A-Z_a-z][.0-9A-Z_a-z]*)(\\\\s*)(\\\\{)?","beginCaptures":{"1":{"name":"keyword.other.proto"},"3":{"name":"entity.name.class.message.proto"}},"end":"}","patterns":[{"include":"#reserved"},{"include":"$self"},{"include":"#enum"},{"include":"#optionStmt"},{"include":"#comments"},{"include":"#oneof"},{"include":"#field"},{"include":"#mapfield"}]},"method":{"begin":"(rpc)\\\\s+([A-Za-z][0-9A-Z_a-z]*)","beginCaptures":{"1":{"name":"keyword.other.proto"},"2":{"name":"entity.name.function"}},"end":"}|(;)","endCaptures":{"1":{"name":"punctuation.terminator.proto"}},"patterns":[{"include":"#comments"},{"include":"#optionStmt"},{"include":"#rpcKeywords"},{"include":"#ident"}]},"number":{"match":"\\\\b((0([Xx])\\\\h*)|(([0-9]+\\\\.?[0-9]*)|(\\\\.[0-9]+))(([Ee])([-+])?[0-9]+)?)\\\\b","name":"constant.numeric.proto"},"oneof":{"begin":"(oneof)\\\\s+([A-Za-z][0-9A-Z_a-z]*)\\\\s*\\\\{?","beginCaptures":{"1":{"name":"keyword.other.proto"},"2":{"name":"variable.other.proto"}},"end":"}","patterns":[{"include":"#optionStmt"},{"include":"#comments"},{"include":"#field"}]},"optionName":{"captures":{"1":{"name":"support.other.proto"},"2":{"name":"support.other.proto"},"3":{"name":"support.other.proto"}},"match":"(\\\\w+|\\\\(\\\\w+(\\\\.\\\\w+)*\\\\))(\\\\.\\\\w+)*"},"optionStmt":{"begin":"(option)\\\\s+(\\\\w+|\\\\(\\\\w+(\\\\.\\\\w+)*\\\\))(\\\\.\\\\w+)*\\\\s*(=)","beginCaptures":{"1":{"name":"keyword.other.proto"},"2":{"name":"support.other.proto"},"3":{"name":"support.other.proto"},"4":{"name":"support.other.proto"},"5":{"name":"keyword.operator.assignment.proto"}},"end":"(;)","endCaptures":{"1":{"name":"punctuation.terminator.proto"}},"patterns":[{"include":"#constants"},{"include":"#number"},{"include":"#string"},{"include":"#subMsgOption"}]},"package":{"captures":{"1":{"name":"keyword.other.proto"},"2":{"name":"string.unquoted.proto.package"},"3":{"name":"punctuation.terminator.proto"}},"match":"\\\\s*(package)\\\\s+([.\\\\w]+)\\\\s*(;)"},"reserved":{"begin":"(reserved)\\\\s+","beginCaptures":{"1":{"name":"keyword.other.proto"}},"end":"(;)","endCaptures":{"1":{"name":"punctuation.terminator.proto"}},"patterns":[{"captures":{"1":{"name":"constant.numeric.proto"},"3":{"name":"keyword.other.proto"},"4":{"name":"constant.numeric.proto"}},"match":"(\\\\d+)(\\\\s+(to)\\\\s+(\\\\d+))?"},{"include":"#string"}]},"rpcKeywords":{"match":"\\\\b(stream|returns)\\\\b","name":"keyword.other.proto"},"service":{"begin":"(service)\\\\s+([A-Za-z][.0-9A-Z_a-z]*)\\\\s*\\\\{?","beginCaptures":{"1":{"name":"keyword.other.proto"},"2":{"name":"entity.name.class.message.proto"}},"end":"}","patterns":[{"include":"#comments"},{"include":"#optionStmt"},{"include":"#method"}]},"storagetypes":{"match":"\\\\b(double|float|int32|int64|uint32|uint64|sint32|sint64|fixed32|fixed64|sfixed32|sfixed64|bool|string|bytes)\\\\b","name":"storage.type.proto"},"string":{"match":"([\\"\'])(?:\\\\\\\\.|[^\\\\\\\\])*?\\\\1","name":"string.quoted.double.proto"},"subMsgOption":{"begin":"\\\\{","end":"}","patterns":[{"include":"#kv"},{"include":"#comments"}]},"syntax":{"captures":{"1":{"name":"keyword.other.proto"},"2":{"name":"keyword.operator.assignment.proto"},"3":{"name":"string.quoted.double.proto.syntax"},"4":{"name":"punctuation.terminator.proto"}},"match":"\\\\s*(syntax)\\\\s*(=)\\\\s*(\\"proto[23]\\")\\\\s*(;)"}},"scopeName":"source.proto","aliases":["protobuf"]}')),t=[e];export{t as default};
|