@qitqode/qitqode-android-arm64 0.1.26 → 0.1.28
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/bundle/{chunk-3bb7y9pq.js → chunk-04h4afhf.js} +2 -2
- package/bundle/{chunk-x3z8q0ep.js → chunk-04tw0r4s.js} +1 -1
- package/bundle/chunk-066eeq5q.js +2 -0
- package/bundle/chunk-07ws99b1.js +2 -0
- package/bundle/chunk-09c4ngag.js +2 -0
- package/bundle/{chunk-se195e52.js → chunk-09kba1hg.js} +2 -2
- package/bundle/{chunk-pfn1db1m.js → chunk-0a0vat1h.js} +2 -2
- package/bundle/chunk-0jgst767.js +2 -0
- package/bundle/chunk-0nj8axbw.js +7610 -0
- package/bundle/chunk-0psrr9vp.js +2 -0
- package/bundle/{chunk-z2q3mg73.js → chunk-12bssxd4.js} +2 -2
- package/bundle/{chunk-6vb26adv.js → chunk-13hz1kvh.js} +1 -1
- package/bundle/{chunk-hz1hd1bd.js → chunk-1bhvt33f.js} +1 -1
- package/bundle/{chunk-49tqzsy0.js → chunk-1dwcga8g.js} +2 -2
- package/bundle/chunk-1etdhr36.js +11 -0
- package/bundle/{chunk-9qtf8khv.js → chunk-1fbeendk.js} +1 -1
- package/bundle/chunk-1j73cnvz.js +2 -0
- package/bundle/{chunk-tyy4gx61.js → chunk-1m2e2w1q.js} +1 -1
- package/bundle/{chunk-eqaym8gm.js → chunk-1qshjfzm.js} +1 -1
- package/bundle/{chunk-d31yrcrn.js → chunk-1rp1cvmc.js} +2 -2
- package/bundle/{chunk-vx837ete.js → chunk-1sgby720.js} +1 -1
- package/bundle/{chunk-atbm0pnt.js → chunk-1t6bvbgy.js} +2 -2
- package/bundle/{chunk-wefjbwv6.js → chunk-1t9jne14.js} +1 -1
- package/bundle/chunk-1yddn03z.js +2 -0
- package/bundle/{chunk-n07rsssz.js → chunk-24xc0dvv.js} +1 -1
- package/bundle/{chunk-qngs31yf.js → chunk-26nfphsg.js} +1 -1
- package/bundle/{chunk-kkdgzeva.js → chunk-27yxgy03.js} +2 -2
- package/bundle/{chunk-f416n3mp.js → chunk-288hw03f.js} +2 -2
- package/bundle/{chunk-qan3kwbv.js → chunk-2abdrqrx.js} +1 -1
- package/bundle/{chunk-b79k456s.js → chunk-2ahqhh4z.js} +1 -1
- package/bundle/{chunk-fx7w497c.js → chunk-2bn4b42t.js} +1 -1
- package/bundle/{chunk-4k70wrhf.js → chunk-2dzk5txw.js} +1 -1
- package/bundle/{chunk-56qm8xpt.js → chunk-2jmxt3fb.js} +1 -1
- package/bundle/{chunk-r1yqmd4y.js → chunk-2km50rd3.js} +1 -1
- package/bundle/{chunk-j87bvp1b.js → chunk-2q96x1t5.js} +1 -1
- package/bundle/{chunk-77e1wh0j.js → chunk-2rs39vj2.js} +2 -2
- package/bundle/{chunk-qb5qemtp.js → chunk-2tnarng3.js} +1 -1
- package/bundle/{chunk-cr06m77n.js → chunk-2vepzgek.js} +2 -2
- package/bundle/{chunk-k7h6tfzj.js → chunk-371r2111.js} +1 -1
- package/bundle/{chunk-5jtd006j.js → chunk-37n34pzd.js} +2 -2
- package/bundle/chunk-37s5hwtc.js +2 -0
- package/bundle/chunk-38g8yzw0.js +2 -0
- package/bundle/chunk-3bkd0ar3.js +2 -0
- package/bundle/{chunk-6nkcfncg.js → chunk-3bmzjznz.js} +1 -1
- package/bundle/{chunk-2jn2hd12.js → chunk-3dvd1bb6.js} +2 -2
- package/bundle/chunk-3fx5jda0.js +2 -0
- package/bundle/{chunk-cn10hn58.js → chunk-3j9hedmx.js} +1 -1
- package/bundle/{chunk-7n2kpqh5.js → chunk-3nwve06r.js} +1 -1
- package/bundle/{chunk-ptf09vmp.js → chunk-3nyqh1d6.js} +1 -1
- package/bundle/chunk-457y2816.js +2 -0
- package/bundle/{chunk-6s2f5sv4.js → chunk-48fvrggx.js} +1 -1
- package/bundle/chunk-4amgp4yd.js +3 -0
- package/bundle/{chunk-f3c9667r.js → chunk-4qqkqrn9.js} +2 -2
- package/bundle/chunk-4sk0rmw3.js +28 -0
- package/bundle/chunk-4sz3jbc5.js +2 -0
- package/bundle/{chunk-1n4w8dya.js → chunk-4tbwha3m.js} +2 -2
- package/bundle/{chunk-hb4d06q0.js → chunk-4yawrap2.js} +2 -2
- package/bundle/{chunk-dv5zf5gz.js → chunk-5a5t01ka.js} +1 -1
- package/bundle/{chunk-880msfsd.js → chunk-5fgx6fa4.js} +1 -1
- package/bundle/{chunk-t1vtdgd6.js → chunk-5fz8tph5.js} +1 -1
- package/bundle/{chunk-ppvmy940.js → chunk-5g8108nf.js} +2 -2
- package/bundle/{chunk-e57d1he9.js → chunk-5qam3c8r.js} +1 -1
- package/bundle/{chunk-1qbm1k9y.js → chunk-5syxjhg3.js} +3 -3
- package/bundle/chunk-612f97vv.js +616 -0
- package/bundle/{chunk-fffj9447.js → chunk-61c62e5s.js} +2 -2
- package/bundle/{chunk-kp84yba1.js → chunk-61zpnwv6.js} +1 -1
- package/bundle/chunk-6d9wsjxm.js +2 -0
- package/bundle/{chunk-f6y7a5w3.js → chunk-6fp8a9ek.js} +2 -2
- package/bundle/{chunk-st74db4c.js → chunk-6hv59ere.js} +1 -1
- package/bundle/{chunk-56pwz1kk.js → chunk-6nbzdb0r.js} +1 -1
- package/bundle/{chunk-8ahpk8td.js → chunk-6p7yg5sr.js} +1 -1
- package/bundle/chunk-6q87abbr.js +2 -0
- package/bundle/{chunk-kfk1zqc1.js → chunk-6qy1ghrx.js} +1 -1
- package/bundle/chunk-730a2d1k.js +2 -0
- package/bundle/chunk-7bd0x9vf.js +2 -0
- package/bundle/chunk-7czkntef.js +2 -0
- package/bundle/chunk-7ex57nyh.js +2 -0
- package/bundle/chunk-7gpczxbh.js +2 -0
- package/bundle/chunk-7j0bgeh2.js +2 -0
- package/bundle/{chunk-w3pzv615.js → chunk-7jbz3dgt.js} +1 -1
- package/bundle/{chunk-0ndvy0nh.js → chunk-7ppd2phw.js} +2 -2
- package/bundle/chunk-7py443fe.js +2 -0
- package/bundle/{chunk-ykxde207.js → chunk-7yrhe3xq.js} +2 -2
- package/bundle/chunk-8815p61h.js +2 -0
- package/bundle/{chunk-3s0d17xe.js → chunk-89q1y7tc.js} +1 -1
- package/bundle/{chunk-9wm41z2f.js → chunk-89v6dgpp.js} +2 -2
- package/bundle/{chunk-njzpswgt.js → chunk-8tc8x27z.js} +7 -7
- package/bundle/chunk-90q5sae0.js +2 -0
- package/bundle/chunk-92d9469t.js +2 -0
- package/bundle/chunk-9grvepmd.js +2 -0
- package/bundle/chunk-9hrh15p2.js +2 -0
- package/bundle/{chunk-t7tstr83.js → chunk-9j1qqdr2.js} +1 -1
- package/bundle/{chunk-58gp7wbg.js → chunk-a1p2f16h.js} +2 -2
- package/bundle/{chunk-fk8cctjy.js → chunk-a1pw9r6f.js} +2 -2
- package/bundle/chunk-a2qz9m10.js +2 -0
- package/bundle/chunk-a7cxf56j.js +2 -0
- package/bundle/{chunk-0w5npkgr.js → chunk-ab6cabxh.js} +1 -1
- package/bundle/{chunk-sdsggxm4.js → chunk-anjg3mwn.js} +2 -2
- package/bundle/chunk-av6ezvxm.js +2 -0
- package/bundle/{chunk-s2za1y84.js → chunk-aztre27e.js} +1 -1
- package/bundle/{chunk-xdv9xt0y.js → chunk-b0syck9r.js} +2 -2
- package/bundle/{chunk-s1h0k1yj.js → chunk-b3dqcbsc.js} +1 -1
- package/bundle/{chunk-ewvgbg68.js → chunk-b8tw709r.js} +1 -1
- package/bundle/{chunk-7fmy4cvn.js → chunk-b9za12y1.js} +1 -1
- package/bundle/{chunk-hybq019j.js → chunk-be216spx.js} +2 -2
- package/bundle/chunk-beksar7w.js +2 -0
- package/bundle/chunk-bg66rqrx.js +2 -0
- package/bundle/chunk-bkbngcvc.js +2 -0
- package/bundle/{chunk-32zrch7h.js → chunk-bss414qz.js} +1 -1
- package/bundle/{chunk-vthm5q05.js → chunk-btneef3z.js} +1 -1
- package/bundle/{chunk-5mec6cde.js → chunk-btz9jvec.js} +1 -1
- package/bundle/{chunk-6nk3wx6f.js → chunk-bvkq0a5q.js} +1 -1
- package/bundle/{chunk-kn318ev4.js → chunk-c01z3cvg.js} +2 -2
- package/bundle/{chunk-z559gc3n.js → chunk-c5e6sk9c.js} +1 -1
- package/bundle/{chunk-453wpzg6.js → chunk-c8k32724.js} +1 -1
- package/bundle/{chunk-2q76qax6.js → chunk-cafzcmrg.js} +2 -2
- package/bundle/{chunk-g6dgc5af.js → chunk-cdhmc0t0.js} +1 -1
- package/bundle/{chunk-xc3fadkh.js → chunk-chmrvbbj.js} +1 -1
- package/bundle/{chunk-s86fj82v.js → chunk-cmbxrgyx.js} +2 -2
- package/bundle/{chunk-14ag9ea0.js → chunk-ct48575c.js} +1 -1
- package/bundle/{chunk-5ymj2q6j.js → chunk-cvdxgsq1.js} +2 -2
- package/bundle/{chunk-g8wvr7a1.js → chunk-cwqd48xt.js} +2 -2
- package/bundle/chunk-cy9s1ma5.js +2 -0
- package/bundle/chunk-cydewa1c.js +2 -0
- package/bundle/{chunk-fxb6vjcb.js → chunk-d5bxan80.js} +2 -2
- package/bundle/{chunk-p0k4sv89.js → chunk-d6r4xwtg.js} +4 -4
- package/bundle/chunk-d7qscj5p.js +2 -0
- package/bundle/{chunk-cyjzqa5p.js → chunk-dafbntks.js} +204 -202
- package/bundle/{chunk-dazye86e.js → chunk-df6a167w.js} +2 -2
- package/bundle/{chunk-rf625fxx.js → chunk-dfnv7vkn.js} +1 -1
- package/bundle/{chunk-06x1p3t4.js → chunk-dhjp0zx2.js} +1 -1
- package/bundle/chunk-dpkynwgm.js +3 -0
- package/bundle/{chunk-xak2r993.js → chunk-dq9kpj4a.js} +2 -2
- package/bundle/{chunk-7tbvr236.js → chunk-drs1gv2b.js} +1 -1
- package/bundle/{chunk-xqxpjbqk.js → chunk-ds69qc8b.js} +1 -1
- package/bundle/chunk-dvk2wwjj.js +2 -0
- package/bundle/{chunk-vpqd0t8a.js → chunk-e0152ayv.js} +2 -2
- package/bundle/chunk-e0jy9qxd.js +2 -0
- package/bundle/{chunk-t6xm49ea.js → chunk-eb9mytjq.js} +1 -1
- package/bundle/{chunk-fk3praj7.js → chunk-ebcv65e3.js} +1 -1
- package/bundle/{chunk-08y06vgt.js → chunk-ebrt1me3.js} +2 -2
- package/bundle/{chunk-hjratj6g.js → chunk-ecn8gbtz.js} +1 -1
- package/bundle/chunk-emtebxvs.js +3 -0
- package/bundle/chunk-erg0ske8.js +2 -0
- package/bundle/{chunk-txty44v2.js → chunk-f2tdfry8.js} +2 -2
- package/bundle/{chunk-afhg3w2j.js → chunk-f45tp3e3.js} +1 -1
- package/bundle/chunk-f72pppr7.js +2 -0
- package/bundle/{chunk-pnj8s20t.js → chunk-fff3151r.js} +1 -1
- package/bundle/{chunk-0mekr486.js → chunk-fkgv2hqd.js} +1 -1
- package/bundle/{chunk-zvsafnkp.js → chunk-fnbpap62.js} +2 -2
- package/bundle/{chunk-4nck07pc.js → chunk-fzna6jdj.js} +2 -2
- package/bundle/{chunk-wg5dv21f.js → chunk-g16zb3y1.js} +2 -2
- package/bundle/{chunk-5yaahmjb.js → chunk-g1dwbvkg.js} +1 -1
- package/bundle/{chunk-1xkwm21b.js → chunk-g3dhsmbt.js} +3 -3
- package/bundle/{chunk-c0k8j498.js → chunk-g7rjtehn.js} +1 -1
- package/bundle/{chunk-e58pdw5k.js → chunk-gf0pdgjs.js} +2 -2
- package/bundle/{chunk-0m2tj2h9.js → chunk-ggqst87g.js} +1 -1
- package/bundle/{chunk-9zrwbxx0.js → chunk-gj7y56y6.js} +2 -2
- package/bundle/chunk-gk34kh8p.js +2 -0
- package/bundle/{chunk-1yx4jesj.js → chunk-gm85xefs.js} +1 -1
- package/bundle/chunk-gn50xqbd.js +2 -0
- package/bundle/{chunk-wmrq9qqf.js → chunk-gsez13bg.js} +1 -1
- package/bundle/{chunk-s54c8fpf.js → chunk-h0rpmne5.js} +1 -1
- package/bundle/chunk-h602h2gx.js +2 -0
- package/bundle/chunk-h7s2w1e2.js +2 -0
- package/bundle/{chunk-91khd3fq.js → chunk-h9pvnp5c.js} +1 -1
- package/bundle/{chunk-07net7s8.js → chunk-hj5y7fvk.js} +1 -1
- package/bundle/{chunk-qmhcbdkg.js → chunk-hk698g9e.js} +2 -2
- package/bundle/chunk-hmv2cdnz.js +2 -0
- package/bundle/chunk-hnb8v476.js +2 -0
- package/bundle/chunk-ht81ensf.js +2 -0
- package/bundle/chunk-hxgs0d4t.js +2 -0
- package/bundle/chunk-j59ktwny.js +2 -0
- package/bundle/{chunk-3zn71txs.js → chunk-j5kb0y1m.js} +1 -1
- package/bundle/{chunk-qpv4438m.js → chunk-j6emx6jn.js} +2 -2
- package/bundle/{chunk-x36jhtex.js → chunk-j8efst22.js} +1 -1
- package/bundle/{chunk-z4ae6jmb.js → chunk-j9pcnkkq.js} +3 -3
- package/bundle/{chunk-y2ch07yv.js → chunk-jje0srjq.js} +2 -2
- package/bundle/{chunk-nxjbbq5h.js → chunk-jm1ptn8n.js} +1 -1
- package/bundle/chunk-jmz2mq3t.js +2 -0
- package/bundle/chunk-jr907144.js +2 -0
- package/bundle/{chunk-eq33vmze.js → chunk-jx27xrk1.js} +2 -2
- package/bundle/{chunk-m7txgh5w.js → chunk-k2tamnfv.js} +1 -1
- package/bundle/chunk-k309zez0.js +3 -0
- package/bundle/chunk-k3epfxmq.js +2 -0
- package/bundle/chunk-k3fn3yed.js +2 -0
- package/bundle/chunk-k5q52wdq.js +2 -0
- package/bundle/chunk-k7g3h9tn.js +3 -0
- package/bundle/{chunk-wg42cxrw.js → chunk-k7gq9bra.js} +1 -1
- package/bundle/{chunk-vyjsng14.js → chunk-kb6w3wbd.js} +1 -1
- package/bundle/{chunk-qm9ezq93.js → chunk-kdcnder5.js} +1 -1
- package/bundle/{chunk-28vnspd4.js → chunk-kfsb2stm.js} +1 -1
- package/bundle/chunk-kfsn9c7m.js +2 -0
- package/bundle/{chunk-kvz0vzsn.js → chunk-knpt9n8f.js} +1 -1
- package/bundle/chunk-kpw6nghv.js +2 -0
- package/bundle/{chunk-cbmw8fy2.js → chunk-kqn9h2gk.js} +1 -1
- package/bundle/chunk-krhkrca9.js +2 -0
- package/bundle/{chunk-kbyk7hyn.js → chunk-m02zt1a3.js} +2 -2
- package/bundle/{chunk-yqtfvgrp.js → chunk-m1h5a4vg.js} +1 -1
- package/bundle/chunk-m5ghbt5y.js +2 -0
- package/bundle/{chunk-7ryv0f5h.js → chunk-m612agnk.js} +1 -1
- package/bundle/{chunk-05amr7y9.js → chunk-m67tcnk4.js} +1 -1
- package/bundle/{chunk-2sy1wx99.js → chunk-m8yv4sd2.js} +1 -1
- package/bundle/{chunk-613kegcn.js → chunk-mgk9sh16.js} +1 -1
- package/bundle/{chunk-7e1aw8rw.js → chunk-mk6cddvd.js} +1 -1
- package/bundle/chunk-mn41f9qv.js +2 -0
- package/bundle/chunk-mqjf9sbm.js +2 -0
- package/bundle/{chunk-n10atvac.js → chunk-msegx0t7.js} +1 -1
- package/bundle/{chunk-8bzwgcjb.js → chunk-mskwkcgj.js} +1 -1
- package/bundle/chunk-my7mn79h.js +9 -0
- package/bundle/{chunk-7rxsj310.js → chunk-n0mygdfp.js} +2 -2
- package/bundle/chunk-n5gwrrbb.js +2 -0
- package/bundle/{chunk-1xpx1t40.js → chunk-n8h6x2en.js} +2 -2
- package/bundle/chunk-nfjhem1c.js +2 -0
- package/bundle/{chunk-j0ftbmex.js → chunk-ngchsw2g.js} +2 -2
- package/bundle/{chunk-3rgct4bd.js → chunk-nj4d554m.js} +1 -1
- package/bundle/{chunk-w4hbw37v.js → chunk-nt4e3em9.js} +1 -1
- package/bundle/chunk-nxyyn2ra.js +2 -0
- package/bundle/{chunk-md7vpe1e.js → chunk-nzehfpxp.js} +1 -1
- package/bundle/chunk-p5tceb4k.js +2 -0
- package/bundle/{chunk-3w64fpwn.js → chunk-p68rwmhc.js} +2 -2
- package/bundle/chunk-pdzpfkt0.js +3 -0
- package/bundle/{chunk-nszqy06d.js → chunk-pekm54ce.js} +1 -1
- package/bundle/{chunk-tedrfa7d.js → chunk-phxrg7aw.js} +2 -2
- package/bundle/{chunk-81engf0t.js → chunk-ppfjf7qx.js} +1 -1
- package/bundle/{chunk-41ftye7w.js → chunk-pxtqqmkc.js} +1 -1
- package/bundle/{chunk-s5krbdvd.js → chunk-q1v2pytx.js} +1 -1
- package/bundle/{chunk-w01gjnty.js → chunk-q6ztpfcs.js} +2 -2
- package/bundle/{chunk-z2m09m4w.js → chunk-qc1w4b12.js} +1 -1
- package/bundle/{chunk-yvj021eg.js → chunk-qhc90p4a.js} +2 -2
- package/bundle/chunk-qjgm3e2p.js +2 -0
- package/bundle/{chunk-qkwhgfjt.js → chunk-qjjch1zt.js} +2 -2
- package/bundle/{chunk-f3rrd2p6.js → chunk-qjn86fc0.js} +1 -1
- package/bundle/{chunk-qq71akpw.js → chunk-qrey2gwb.js} +2 -2
- package/bundle/{chunk-pjbbdm96.js → chunk-qv2s39dv.js} +2 -2
- package/bundle/{chunk-2yb59jwr.js → chunk-qvxvc2c2.js} +1 -1
- package/bundle/{chunk-ygwe0vf1.js → chunk-rmr38x2f.js} +2 -2
- package/bundle/chunk-s07j8hfy.js +2 -0
- package/bundle/chunk-s1cnzvb2.js +2 -0
- package/bundle/{chunk-01gwb793.js → chunk-s3yna2wm.js} +1 -1
- package/bundle/{chunk-0vqrakhw.js → chunk-s6bar2f9.js} +1 -1
- package/bundle/chunk-sbyey0qb.js +2 -0
- package/bundle/{chunk-ze00x1xb.js → chunk-scnz207s.js} +2 -2
- package/bundle/{chunk-xdwej3ae.js → chunk-scsf8r98.js} +1 -1
- package/bundle/{chunk-xcs2jbz9.js → chunk-sermjas1.js} +1 -1
- package/bundle/chunk-sj5v361q.js +2 -0
- package/bundle/{chunk-6wdwwpsc.js → chunk-smt14yjb.js} +2 -2
- package/bundle/{chunk-ynfbz3sz.js → chunk-snm5q21k.js} +2 -2
- package/bundle/{chunk-4920vf6a.js → chunk-srh4xvsj.js} +1 -1
- package/bundle/{chunk-g7vahvkz.js → chunk-szr0f7k2.js} +1 -1
- package/bundle/{chunk-vw673y0t.js → chunk-t12xrrfr.js} +2 -2
- package/bundle/{chunk-fvy5w4dh.js → chunk-t22jbw8x.js} +1 -1
- package/bundle/{chunk-hkmb3zer.js → chunk-t2tgz0rc.js} +2 -2
- package/bundle/{chunk-6fpfr8tk.js → chunk-tj78jsp9.js} +1 -1
- package/bundle/chunk-tpndnprb.js +2 -0
- package/bundle/{chunk-jdkxeqw5.js → chunk-tr8sf0dk.js} +1 -1
- package/bundle/{chunk-hyckncza.js → chunk-v2zp22r3.js} +2 -2
- package/bundle/{chunk-0cehm5fn.js → chunk-v4xcysh0.js} +1 -1
- package/bundle/{chunk-7qxn24qa.js → chunk-v965rsr8.js} +2 -2
- package/bundle/{chunk-0304b7xg.js → chunk-va316nee.js} +1 -1
- package/bundle/{chunk-6h2faxs9.js → chunk-vg2fmyje.js} +2 -2
- package/bundle/{chunk-yt1yk4j1.js → chunk-vj62pc0h.js} +1 -1
- package/bundle/{chunk-hk8j5ht8.js → chunk-vn7nkrqb.js} +2 -2
- package/bundle/chunk-vwxfgea7.js +2 -0
- package/bundle/chunk-w0kgcz1t.js +2 -0
- package/bundle/{chunk-zjvzc0my.js → chunk-w87a3mzm.js} +1 -1
- package/bundle/chunk-w9vh7rhg.js +2 -0
- package/bundle/{chunk-9p83me3p.js → chunk-whxjkz9a.js} +2 -2
- package/bundle/chunk-wksczmes.js +2 -0
- package/bundle/{chunk-2kdn66xt.js → chunk-wnqwb6fd.js} +1 -1
- package/bundle/chunk-wrfvqp2w.js +2 -0
- package/bundle/chunk-wsxta33r.js +2 -0
- package/bundle/{chunk-rvrjw0fy.js → chunk-wsy0m70r.js} +1 -1
- package/bundle/{chunk-w2gpgapp.js → chunk-wy46mbwt.js} +1 -1
- package/bundle/{chunk-cqhpbfcn.js → chunk-wz0zcddf.js} +3 -3
- package/bundle/{chunk-q2exgz82.js → chunk-x067eetw.js} +1 -1
- package/bundle/{chunk-d2n09yvh.js → chunk-x1rx6fm7.js} +2 -2
- package/bundle/{chunk-j7zs1yg2.js → chunk-x7ers083.js} +1 -1
- package/bundle/{chunk-admgf65a.js → chunk-x9s04nze.js} +1 -1
- package/bundle/{chunk-fkat2pw6.js → chunk-xc5044tm.js} +1 -1
- package/bundle/chunk-xck0sq3k.js +2 -0
- package/bundle/chunk-xjyhtm8r.js +2 -0
- package/bundle/{chunk-rs0nx844.js → chunk-xpc2zgj7.js} +2 -2
- package/bundle/{chunk-54pk7nna.js → chunk-xrxyrr00.js} +1 -1
- package/bundle/{chunk-zna6neq5.js → chunk-xs3xtz6x.js} +1 -1
- package/bundle/{chunk-kpnfndkg.js → chunk-xvfpzmrf.js} +1 -1
- package/bundle/{chunk-crap29f6.js → chunk-xxbqhg9n.js} +1 -1
- package/bundle/{chunk-gaxbbxk6.js → chunk-y062spw2.js} +1 -1
- package/bundle/{chunk-bse8p94q.js → chunk-y2v09y71.js} +1 -1
- package/bundle/{chunk-jzcz92pq.js → chunk-y88xh6w3.js} +2 -2
- package/bundle/{chunk-g4qwkcdv.js → chunk-yajd975f.js} +1 -1
- package/bundle/chunk-yc1jk3rm.js +2 -0
- package/bundle/{chunk-5dm3p5r6.js → chunk-ydp0q1hk.js} +1 -1
- package/bundle/{chunk-gxa2r4zc.js → chunk-yfkvjphe.js} +1 -1
- package/bundle/chunk-ygc5qegv.js +2 -0
- package/bundle/{chunk-kbg3k1az.js → chunk-yhk7d1j0.js} +1 -1
- package/bundle/chunk-yjqmzm51.js +2 -0
- package/bundle/{chunk-49ypxzfx.js → chunk-yjtdgcq5.js} +1 -1
- package/bundle/{chunk-mg239rc3.js → chunk-yp0a8q29.js} +3 -3
- package/bundle/{chunk-p31yg62z.js → chunk-yq3m8190.js} +2 -2
- package/bundle/{chunk-rze20q68.js → chunk-yt3f3j35.js} +1 -1
- package/bundle/{chunk-tfggzzqw.js → chunk-ywkvq7zb.js} +1 -1
- package/bundle/{chunk-z3hj5bfd.js → chunk-z37aqajx.js} +2 -2
- package/bundle/chunk-z4z8hk7e.js +2 -0
- package/bundle/{chunk-vy9xre57.js → chunk-z6dnv8g5.js} +1 -1
- package/bundle/chunk-z7y9pdj7.js +2 -0
- package/bundle/chunk-z8g819cz.js +2 -0
- package/bundle/{chunk-h56jxxvj.js → chunk-z8v2tsz2.js} +1 -1
- package/bundle/{chunk-vztxv9dj.js → chunk-zb0me4kk.js} +1 -1
- package/bundle/{chunk-7ez3ye6e.js → chunk-zcm2jdr5.js} +1 -1
- package/bundle/chunk-zqv7fx25.js +2 -0
- package/bundle/chunk-zt1nbwmm.js +2 -0
- package/bundle/{chunk-fd9zrmhr.js → chunk-ztc3gm8y.js} +2 -2
- package/bundle/chunk-zw0yh3dv.js +2 -0
- package/bundle/{chunk-x3931we7.js → chunk-zyhdxggp.js} +2 -2
- package/bundle/index.js +3 -3
- package/bundle/parser.worker.js +2 -2
- package/bundle/qffi.node +0 -0
- package/bundle/worker.js +1 -1
- package/package.json +1 -1
- package/bundle/chunk-09ecxdmd.js +0 -2
- package/bundle/chunk-0jaj2g7x.js +0 -2
- package/bundle/chunk-0nr2925m.js +0 -2
- package/bundle/chunk-0wbq1y92.js +0 -2
- package/bundle/chunk-12pxszgn.js +0 -2
- package/bundle/chunk-1337582e.js +0 -2
- package/bundle/chunk-182jf8fz.js +0 -2
- package/bundle/chunk-1ht3zcsh.js +0 -2
- package/bundle/chunk-25zkavr0.js +0 -2
- package/bundle/chunk-2cm91ktc.js +0 -3
- package/bundle/chunk-2jfd82jk.js +0 -2
- package/bundle/chunk-2k7bbzj2.js +0 -2
- package/bundle/chunk-30081kwd.js +0 -2
- package/bundle/chunk-3kdhvq0p.js +0 -3
- package/bundle/chunk-3vag59se.js +0 -2
- package/bundle/chunk-3x5v6sjw.js +0 -2
- package/bundle/chunk-43ep9d7a.js +0 -2
- package/bundle/chunk-48j09m6e.js +0 -3
- package/bundle/chunk-4qqja22v.js +0 -2
- package/bundle/chunk-5gazgxt5.js +0 -2
- package/bundle/chunk-63znhwx0.js +0 -2
- package/bundle/chunk-6hmyy7n6.js +0 -2
- package/bundle/chunk-7dyddrpk.js +0 -2
- package/bundle/chunk-7penjsgq.js +0 -2
- package/bundle/chunk-7t5gzkj6.js +0 -2
- package/bundle/chunk-89vgt8vq.js +0 -2
- package/bundle/chunk-8e8n82f9.js +0 -2
- package/bundle/chunk-97exhw9j.js +0 -2
- package/bundle/chunk-9cvkaht5.js +0 -2
- package/bundle/chunk-akdvstd9.js +0 -2
- package/bundle/chunk-ave2e4sa.js +0 -2
- package/bundle/chunk-axnwehc7.js +0 -2
- package/bundle/chunk-bmzyxspj.js +0 -2
- package/bundle/chunk-bvaqpfv8.js +0 -2
- package/bundle/chunk-cxb05cdg.js +0 -2
- package/bundle/chunk-cxe92z5c.js +0 -2
- package/bundle/chunk-d5wp85kw.js +0 -2
- package/bundle/chunk-dm5xnb4t.js +0 -2
- package/bundle/chunk-dpeqsvan.js +0 -2
- package/bundle/chunk-drxtmg5c.js +0 -2
- package/bundle/chunk-e9pfdjcy.js +0 -2
- package/bundle/chunk-ejn5hfzd.js +0 -2
- package/bundle/chunk-ek1fawsj.js +0 -3
- package/bundle/chunk-ernd18jb.js +0 -2
- package/bundle/chunk-ff9b4cg8.js +0 -2
- package/bundle/chunk-fpff6a4q.js +0 -2
- package/bundle/chunk-gq361kdt.js +0 -2
- package/bundle/chunk-hbagpppv.js +0 -2
- package/bundle/chunk-hf473xav.js +0 -2
- package/bundle/chunk-hr88054m.js +0 -2
- package/bundle/chunk-j3czd7v2.js +0 -28
- package/bundle/chunk-j9m2d6t5.js +0 -2
- package/bundle/chunk-jd9edy2s.js +0 -2
- package/bundle/chunk-jwtdbx31.js +0 -2
- package/bundle/chunk-kbjwdv1x.js +0 -8223
- package/bundle/chunk-krkxrej2.js +0 -2
- package/bundle/chunk-m26mcy8p.js +0 -2
- package/bundle/chunk-m62wgqp1.js +0 -2
- package/bundle/chunk-m84cn9c6.js +0 -2
- package/bundle/chunk-mvc7pvtq.js +0 -2
- package/bundle/chunk-nfp9xtca.js +0 -3
- package/bundle/chunk-ngz5xw45.js +0 -3
- package/bundle/chunk-p5t9mq8r.js +0 -2
- package/bundle/chunk-pfbykat1.js +0 -2
- package/bundle/chunk-qd0nvn4z.js +0 -2
- package/bundle/chunk-qh99kv2j.js +0 -2
- package/bundle/chunk-qyrafh4m.js +0 -2
- package/bundle/chunk-rc37cw86.js +0 -2
- package/bundle/chunk-rmpty636.js +0 -2
- package/bundle/chunk-rz54qjew.js +0 -2
- package/bundle/chunk-s3wjwxme.js +0 -2
- package/bundle/chunk-s4ncnbgd.js +0 -2
- package/bundle/chunk-snz3w30x.js +0 -2
- package/bundle/chunk-srw748gr.js +0 -2
- package/bundle/chunk-tn167yyz.js +0 -2
- package/bundle/chunk-v1xwe58d.js +0 -2
- package/bundle/chunk-vh05n2x3.js +0 -2
- package/bundle/chunk-vrfegg5f.js +0 -2
- package/bundle/chunk-w12tky28.js +0 -2
- package/bundle/chunk-w9ct698t.js +0 -2
- package/bundle/chunk-wms4skr9.js +0 -11
- package/bundle/chunk-wr5hdsst.js +0 -9
- package/bundle/chunk-wxnqgh8t.js +0 -2
- package/bundle/chunk-wzmte7sy.js +0 -3
- package/bundle/chunk-x0h1jdxt.js +0 -2
- package/bundle/chunk-x6hsmnhz.js +0 -2
- package/bundle/chunk-xg9e0enb.js +0 -2
- package/bundle/chunk-xtxxb25n.js +0 -2
- package/bundle/chunk-y3s7sh1e.js +0 -2
- package/bundle/chunk-ydvheqw9.js +0 -2
- package/bundle/chunk-yxnq0d7k.js +0 -2
- package/bundle/chunk-z2raegj9.js +0 -2
- package/bundle/chunk-z3pyhmg6.js +0 -2
- package/bundle/chunk-z7pg6sw1.js +0 -2
- package/bundle/chunk-z84376c6.js +0 -2
- package/bundle/chunk-zn8th65r.js +0 -2
- package/bundle/chunk-ztv1brgn.js +0 -2
- package/bundle/chunk-zyxvd9fj.js +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$q as A,Tq as k,Uq as C,Vq as t,Xq as V,_q as B,ar as H,dr as I,ir as o}from"./chunk-5mec6cde.js";import{jr as w}from"./chunk-0mekr486.js";import{xu as f}from"./chunk-se195e52.js";import{Hz as n}from"./chunk-vw673y0t.js";function RJ(...F){return F.reduce((J,Q)=>({...J,...Q!=null?Q:{}}),{})}function NJ({tools:F=[],providerToolNames:J,resolveProviderToolName:Q}){var W;let X={},Y={};for(let Z of F)if(Z.type==="provider"){let $=(W=Q==null?void 0:Q(Z))!=null?W:(Z.id in J)?J[Z.id]:void 0;if($==null)continue;X[Z.name]=$,Y[$]=Z.name}return{toProviderToolName:(Z)=>{var $;return($=X[Z])!=null?$:Z},toCustomToolName:(Z)=>{var $;return($=Y[Z])!=null?$:Z}}}async function VJ(F,J){if(F==null)return Promise.resolve();let Q=J==null?void 0:J.abortSignal;return new Promise((W,X)=>{if(Q==null?void 0:Q.aborted){X(m());return}let Y=setTimeout(()=>{Z(),W()},F),Z=()=>{clearTimeout(Y),Q==null||Q.removeEventListener("abort",$)},$=()=>{Z(),X(m())};Q==null||Q.addEventListener("abort",$)})}function m(){return new DOMException("Delay was aborted","AbortError")}var TJ=class{constructor(){this.status={type:"pending"},this._resolve=void 0,this._reject=void 0}get promise(){if(this._promise)return this._promise;return this._promise=new Promise((F,J)=>{if(this.status.type==="resolved")F(this.status.value);else if(this.status.type==="rejected")J(this.status.error);this._resolve=F,this._reject=J}),this._promise}resolve(F){var J;if(this.status={type:"resolved",value:F},this._promise)(J=this._resolve)==null||J.call(this,F)}reject(F){var J;if(this.status={type:"rejected",error:F},this._promise)(J=this._reject)==null||J.call(this,F)}isResolved(){return this.status.type==="resolved"}isRejected(){return this.status.type==="rejected"}isPending(){return this.status.type==="pending"}};function z(F){return Object.fromEntries([...F.headers])}var{btoa:GF,atob:CF}=globalThis;function _J(F){let J=F.replace(/-/g,"+").replace(/_/g,"/"),Q=CF(J);return Uint8Array.from(Q,(W)=>W.codePointAt(0))}function a(F){let J="";for(let Q=0;Q<F.length;Q++)J+=String.fromCodePoint(F[Q]);return GF(J)}function jJ(F){return F instanceof Uint8Array?a(F):F}function kJ(F){if(F.type==="url")return F.url;return`data:${F.mediaType};base64,${typeof F.data==="string"?F.data:a(F.data)}`}function bJ(F,J={}){let{useArrayBrackets:Q=!0}=J,W=new FormData;for(let[X,Y]of Object.entries(F)){if(Y==null)continue;if(Array.isArray(Y)){if(Y.length===1){W.append(X,Y[0]);continue}let Z=Q?`${X}[]`:X;for(let $ of Y)W.append(Z,$);continue}W.append(X,Y)}return W}var s="AI_DownloadError",r=`vercel.ai.error.${s}`,MF=Symbol.for(r),u,i,O=class extends(i=k,u=MF,i){constructor({url:F,statusCode:J,statusText:Q,cause:W,message:X=W==null?`Failed to download ${F}: ${J} ${Q}`:`Failed to download ${F}: ${W}`}){super({name:s,message:X,cause:W});this[u]=!0,this.url=F,this.statusCode=J,this.statusText=Q}static isInstance(F){return k.hasMarker(F,r)}},e=2147483648;async function KF({response:F,url:J,maxBytes:Q=e}){let W=F.headers.get("content-length");if(W!=null){let G=parseInt(W,10);if(!isNaN(G)&&G>Q)throw new O({url:J,message:`Download of ${J} exceeded maximum size of ${Q} bytes (Content-Length: ${G}).`})}let X=F.body;if(X==null)return new Uint8Array(0);let Y=X.getReader(),Z=[],$=0;try{while(!0){let{done:G,value:N}=await Y.read();if(G)break;if($+=N.length,$>Q)throw new O({url:J,message:`Download of ${J} exceeded maximum size of ${Q} bytes.`});Z.push(N)}}finally{try{await Y.cancel()}finally{Y.releaseLock()}}let U=new Uint8Array($),L=0;for(let G of Z)U.set(G,L),L+=G.length;return U}function p(F){let J;try{J=new URL(F)}catch(W){throw new O({url:F,message:`Invalid URL: ${F}`})}if(J.protocol==="data:")return;if(J.protocol!=="http:"&&J.protocol!=="https:")throw new O({url:F,message:`URL scheme must be http, https, or data, got ${J.protocol}`});let Q=J.hostname;if(!Q)throw new O({url:F,message:"URL must have a hostname"});if(Q==="localhost"||Q.endsWith(".local")||Q.endsWith(".localhost"))throw new O({url:F,message:`URL with hostname ${Q} is not allowed`});if(Q.startsWith("[")&&Q.endsWith("]")){let W=Q.slice(1,-1);if(qF(W))throw new O({url:F,message:`URL with IPv6 address ${Q} is not allowed`});return}if(FF(Q)){if(b(Q))throw new O({url:F,message:`URL with IP address ${Q} is not allowed`});return}}function FF(F){let J=F.split(".");if(J.length!==4)return!1;return J.every((Q)=>{let W=Number(Q);return Number.isInteger(W)&&W>=0&&W<=255&&String(W)===Q})}function b(F){let J=F.split(".").map(Number),[Q,W]=J;if(Q===0)return!0;if(Q===10)return!0;if(Q===127)return!0;if(Q===169&&W===254)return!0;if(Q===172&&W>=16&&W<=31)return!0;if(Q===192&&W===168)return!0;return!1}function qF(F){let J=F.toLowerCase();if(J==="::1")return!0;if(J==="::")return!0;if(J.startsWith("::ffff:")){let Q=J.slice(7);if(FF(Q))return b(Q);let W=Q.split(":");if(W.length===2){let X=parseInt(W[0],16),Y=parseInt(W[1],16);if(!isNaN(X)&&!isNaN(Y)){let Z=X>>8&255,$=X&255,U=Y>>8&255,L=Y&255;return b(`${Z}.${$}.${U}.${L}`)}}}if(J.startsWith("fc")||J.startsWith("fd"))return!0;if(J.startsWith("fe80"))return!0;return!1}async function gJ(F,J){var Q,W;p(F);try{let X=await fetch(F,{signal:J==null?void 0:J.abortSignal});if(X.redirected)p(X.url);if(!X.ok)throw new O({url:F,statusCode:X.status,statusText:X.statusText});let Y=await KF({response:X,url:F,maxBytes:(Q=J==null?void 0:J.maxBytes)!=null?Q:e}),Z=(W=X.headers.get("content-type"))!=null?W:void 0;return new Blob([Y],Z?{type:Z}:void 0)}catch(X){if(O.isInstance(X))throw X;throw new O({url:F,cause:X})}}var DF=({prefix:F,size:J=16,alphabet:Q="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:W="-"}={})=>{let X=()=>{let Y=Q.length,Z=Array(J);for(let $=0;$<J;$++)Z[$]=Q[Math.random()*Y|0];return Z.join("")};if(F==null)return X;if(Q.includes(W))throw new V({argument:"separator",message:`The separator "${W}" must not be part of the alphabet "${Q}".`});return()=>`${F}${W}${X()}`},vJ=DF();function yJ(F){if(F==null)return"unknown error";if(typeof F==="string")return F;if(F instanceof Error)return F.message;return JSON.stringify(F)}function R(F){return(F instanceof Error||F instanceof DOMException)&&(F.name==="AbortError"||F.name==="ResponseAborted"||F.name==="TimeoutError")}var OF=["fetch failed","failed to fetch"],IF=["ConnectionRefused","ConnectionClosed","FailedToOpenSocket","ECONNRESET","ECONNREFUSED","ETIMEDOUT","EPIPE"];function PF(F){if(!(F instanceof Error))return!1;let J=F.code;if(typeof J==="string"&&IF.includes(J))return!0;return!1}function JF({error:F,url:J,requestBodyValues:Q}){if(R(F))return F;if(F instanceof TypeError&&OF.includes(F.message.toLowerCase())){let W=F.cause;if(W!=null)return new C({message:`Cannot connect to API: ${W.message}`,cause:W,url:J,requestBodyValues:Q,isRetryable:!0})}if(PF(F))return new C({message:`Cannot connect to API: ${F.message}`,cause:F,url:J,requestBodyValues:Q,isRetryable:!0});return F}function QF(F=globalThis){var J,Q,W;if(F.window)return"runtime/browser";if((J=F.navigator)==null?void 0:J.userAgent)return`runtime/${F.navigator.userAgent.toLowerCase()}`;if((W=(Q=F.process)==null?void 0:Q.versions)==null?void 0:W.node)return`runtime/node.js/${F.process.version.substring(0)}`;if(F.EdgeRuntime)return"runtime/vercel-edge";return"runtime/unknown"}function zF(F){if(F==null)return{};let J={};if(F instanceof Headers)F.forEach((Q,W)=>{J[W.toLowerCase()]=Q});else{if(!Array.isArray(F))F=Object.entries(F);for(let[Q,W]of F)if(W!=null)J[Q.toLowerCase()]=W}return J}function WF(F,...J){let Q=new Headers(zF(F)),W=Q.get("user-agent")||"";return Q.set("user-agent",[W,...J].filter(Boolean).join(" ")),Object.fromEntries(Q.entries())}var XF="4.0.23",AF=()=>globalThis.fetch,uJ=async({url:F,headers:J={},successfulResponseHandler:Q,failedResponseHandler:W,abortSignal:X,fetch:Y=AF()})=>{try{let Z=await Y(F,{method:"GET",headers:WF(J,`ai-sdk/provider-utils/${XF}`,QF()),signal:X}),$=z(Z);if(!Z.ok){let U;try{U=await W({response:Z,url:F,requestBodyValues:{}})}catch(L){if(R(L)||C.isInstance(L))throw L;throw new C({message:"Failed to process error response",cause:L,statusCode:Z.status,url:F,responseHeaders:$,requestBodyValues:{}})}throw U.value}try{return await Q({response:Z,url:F,requestBodyValues:{}})}catch(U){if(U instanceof Error){if(R(U)||C.isInstance(U))throw U}throw new C({message:"Failed to process successful response",cause:U,statusCode:Z.status,url:F,responseHeaders:$,requestBodyValues:{}})}}catch(Z){throw JF({error:Z,url:F,requestBodyValues:{}})}};function iJ(F){return F!=null}function pJ({mediaType:F,url:J,supportedUrls:Q}){return J=J.toLowerCase(),F=F.toLowerCase(),Object.entries(Q).map(([W,X])=>{let Y=W.toLowerCase();return Y==="*"||Y==="*/*"?{mediaTypePrefix:"",regexes:X}:{mediaTypePrefix:Y.replace(/\*/,""),regexes:X}}).filter(({mediaTypePrefix:W})=>F.startsWith(W)).flatMap(({regexes:W})=>W).some((W)=>W.test(J))}function cJ({apiKey:F,environmentVariableName:J,apiKeyParameterName:Q="apiKey",description:W}){if(typeof F==="string")return F;if(F!=null)throw new A({message:`${W} API key must be a string.`});if(typeof process>"u")throw new A({message:`${W} API key is missing. Pass it using the '${Q}' parameter. Environment variables are not supported in this environment.`});if(F=process.env[J],F==null)throw new A({message:`${W} API key is missing. Pass it using the '${Q}' parameter or the ${J} environment variable.`});if(typeof F!=="string")throw new A({message:`${W} API key must be a string. The value of the ${J} environment variable is not a string.`});return F}function dJ({settingValue:F,environmentVariableName:J}){if(typeof F==="string")return F;if(F!=null||typeof process>"u")return;if(F=process.env[J],F==null||typeof F!=="string")return;return F}function fJ({settingValue:F,environmentVariableName:J,settingName:Q,description:W}){if(typeof F==="string")return F;if(F!=null)throw new H({message:`${W} setting must be a string.`});if(typeof process>"u")throw new H({message:`${W} setting is missing. Pass it using the '${Q}' parameter. Environment variables are not supported in this environment.`});if(F=process.env[J],F==null)throw new H({message:`${W} setting is missing. Pass it using the '${Q}' parameter or the ${J} environment variable.`});if(typeof F!=="string")throw new H({message:`${W} setting must be a string. The value of the ${J} environment variable is not a string.`});return F}function tJ(F){var J;let[Q,W=""]=F.toLowerCase().split("/");return(J={mpeg:"mp3","x-wav":"wav",opus:"ogg",mp4:"m4a","x-m4a":"m4a"}[W])!=null?J:W}var HF=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,BF=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function l(F){let J=JSON.parse(F);if(J===null||typeof J!=="object")return J;if(HF.test(F)===!1&&BF.test(F)===!1)return J;return RF(J)}function RF(F){let J=[F];while(J.length){let Q=J;J=[];for(let W of Q){if(Object.prototype.hasOwnProperty.call(W,"__proto__"))throw SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(W,"constructor")&&W.constructor!==null&&typeof W.constructor==="object"&&Object.prototype.hasOwnProperty.call(W.constructor,"prototype"))throw SyntaxError("Object contains forbidden prototype property");for(let X in W){let Y=W[X];if(Y&&typeof Y==="object")J.push(Y)}}}return F}function x(F){let{stackTraceLimit:J}=Error;try{Error.stackTraceLimit=0}catch(Q){return l(F)}try{return l(F)}finally{Error.stackTraceLimit=J}}function v(F){if(F.type==="object"||Array.isArray(F.type)&&F.type.includes("object")){F.additionalProperties=!1;let{properties:Q}=F;if(Q!=null)for(let W of Object.keys(Q))Q[W]=P(Q[W])}if(F.items!=null)F.items=Array.isArray(F.items)?F.items.map(P):P(F.items);if(F.anyOf!=null)F.anyOf=F.anyOf.map(P);if(F.allOf!=null)F.allOf=F.allOf.map(P);if(F.oneOf!=null)F.oneOf=F.oneOf.map(P);let{definitions:J}=F;if(J!=null)for(let Q of Object.keys(J))J[Q]=P(J[Q]);return F}function P(F){if(typeof F==="boolean")return F;return v(F)}var NF=Symbol("Let zodToJsonSchema decide on which parser to use"),c={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},VF=(F)=>typeof F==="string"?{...c,name:F}:{...c,...F};function K(){return{}}function TF(F,J){var Q,W,X;let Y={type:"array"};if(((Q=F.type)==null?void 0:Q._def)&&((X=(W=F.type)==null?void 0:W._def)==null?void 0:X.typeName)!==w.ZodAny)Y.items=E(F.type._def,{...J,currentPath:[...J.currentPath,"items"]});if(F.minLength)Y.minItems=F.minLength.value;if(F.maxLength)Y.maxItems=F.maxLength.value;if(F.exactLength)Y.minItems=F.exactLength.value,Y.maxItems=F.exactLength.value;return Y}function _F(F){let J={type:"integer",format:"int64"};if(!F.checks)return J;for(let Q of F.checks)switch(Q.kind){case"min":if(Q.inclusive)J.minimum=Q.value;else J.exclusiveMinimum=Q.value;break;case"max":if(Q.inclusive)J.maximum=Q.value;else J.exclusiveMaximum=Q.value;break;case"multipleOf":J.multipleOf=Q.value;break}return J}function jF(){return{type:"boolean"}}function YF(F,J){return E(F.type._def,J)}var kF=(F,J)=>{return E(F.innerType._def,J)};function ZF(F,J,Q){let W=Q!=null?Q:J.dateStrategy;if(Array.isArray(W))return{anyOf:W.map((X,Y)=>ZF(F,J,X))};switch(W){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return bF(F)}}var bF=(F)=>{let J={type:"integer",format:"unix-time"};for(let Q of F.checks)switch(Q.kind){case"min":J.minimum=Q.value;break;case"max":J.maximum=Q.value;break}return J};function SF(F,J){return{...E(F.innerType._def,J),default:F.defaultValue()}}function gF(F,J){return J.effectStrategy==="input"?E(F.schema._def,J):K()}function xF(F){return{type:"string",enum:Array.from(F.values)}}var vF=(F)=>{if("type"in F&&F.type==="string")return!1;return"allOf"in F};function yF(F,J){let Q=[E(F.left._def,{...J,currentPath:[...J.currentPath,"allOf","0"]}),E(F.right._def,{...J,currentPath:[...J.currentPath,"allOf","1"]})].filter((X)=>!!X),W=[];return Q.forEach((X)=>{if(vF(X))W.push(...X.allOf);else{let Y=X;if("additionalProperties"in X&&X.additionalProperties===!1){let{additionalProperties:Z,...$}=X;Y=$}W.push(Y)}}),W.length?{allOf:W}:void 0}function hF(F){let J=typeof F.value;if(J!=="bigint"&&J!=="number"&&J!=="boolean"&&J!=="string")return{type:Array.isArray(F.value)?"array":"object"};return{type:J==="bigint"?"integer":J,const:F.value}}var _=void 0,q={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>{if(_===void 0)_=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return _},uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function $F(F,J){let Q={type:"string"};if(F.checks)for(let W of F.checks)switch(W.kind){case"min":Q.minLength=typeof Q.minLength==="number"?Math.max(Q.minLength,W.value):W.value;break;case"max":Q.maxLength=typeof Q.maxLength==="number"?Math.min(Q.maxLength,W.value):W.value;break;case"email":switch(J.emailStrategy){case"format:email":D(Q,"email",W.message,J);break;case"format:idn-email":D(Q,"idn-email",W.message,J);break;case"pattern:zod":M(Q,q.email,W.message,J);break}break;case"url":D(Q,"uri",W.message,J);break;case"uuid":D(Q,"uuid",W.message,J);break;case"regex":M(Q,W.regex,W.message,J);break;case"cuid":M(Q,q.cuid,W.message,J);break;case"cuid2":M(Q,q.cuid2,W.message,J);break;case"startsWith":M(Q,RegExp(`^${j(W.value,J)}`),W.message,J);break;case"endsWith":M(Q,RegExp(`${j(W.value,J)}$`),W.message,J);break;case"datetime":D(Q,"date-time",W.message,J);break;case"date":D(Q,"date",W.message,J);break;case"time":D(Q,"time",W.message,J);break;case"duration":D(Q,"duration",W.message,J);break;case"length":Q.minLength=typeof Q.minLength==="number"?Math.max(Q.minLength,W.value):W.value,Q.maxLength=typeof Q.maxLength==="number"?Math.min(Q.maxLength,W.value):W.value;break;case"includes":{M(Q,RegExp(j(W.value,J)),W.message,J);break}case"ip":{if(W.version!=="v6")D(Q,"ipv4",W.message,J);if(W.version!=="v4")D(Q,"ipv6",W.message,J);break}case"base64url":M(Q,q.base64url,W.message,J);break;case"jwt":M(Q,q.jwt,W.message,J);break;case"cidr":{if(W.version!=="v6")M(Q,q.ipv4Cidr,W.message,J);if(W.version!=="v4")M(Q,q.ipv6Cidr,W.message,J);break}case"emoji":M(Q,q.emoji(),W.message,J);break;case"ulid":{M(Q,q.ulid,W.message,J);break}case"base64":{switch(J.base64Strategy){case"format:binary":{D(Q,"binary",W.message,J);break}case"contentEncoding:base64":{Q.contentEncoding="base64";break}case"pattern:zod":{M(Q,q.base64,W.message,J);break}}break}case"nanoid":M(Q,q.nanoid,W.message,J);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return Q}function j(F,J){return J.patternStrategy==="escape"?uF(F):F}var mF=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function uF(F){let J="";for(let Q=0;Q<F.length;Q++){if(!mF.has(F[Q]))J+="\\";J+=F[Q]}return J}function D(F,J,Q,W){var X;if(F.format||((X=F.anyOf)==null?void 0:X.some((Y)=>Y.format))){if(!F.anyOf)F.anyOf=[];if(F.format)F.anyOf.push({format:F.format}),delete F.format;F.anyOf.push({format:J,...Q&&W.errorMessages&&{errorMessage:{format:Q}}})}else F.format=J}function M(F,J,Q,W){var X;if(F.pattern||((X=F.allOf)==null?void 0:X.some((Y)=>Y.pattern))){if(!F.allOf)F.allOf=[];if(F.pattern)F.allOf.push({pattern:F.pattern}),delete F.pattern;F.allOf.push({pattern:d(J,W),...Q&&W.errorMessages&&{errorMessage:{pattern:Q}}})}else F.pattern=d(J,W)}function d(F,J){var Q;if(!J.applyRegexFlags||!F.flags)return F.source;let W={i:F.flags.includes("i"),m:F.flags.includes("m"),s:F.flags.includes("s")},X=W.i?F.source.toLowerCase():F.source,Y="",Z=!1,$=!1,U=!1;for(let L=0;L<X.length;L++){if(Z){Y+=X[L],Z=!1;continue}if(W.i){if($){if(X[L].match(/[a-z]/)){if(U)Y+=X[L],Y+=`${X[L-2]}-${X[L]}`.toUpperCase(),U=!1;else if(X[L+1]==="-"&&((Q=X[L+2])==null?void 0:Q.match(/[a-z]/)))Y+=X[L],U=!0;else Y+=`${X[L]}${X[L].toUpperCase()}`;continue}}else if(X[L].match(/[a-z]/)){Y+=`[${X[L]}${X[L].toUpperCase()}]`;continue}}if(W.m){if(X[L]==="^"){Y+=`(^|(?<=[\r
|
|
2
|
+
import{Cr as I,Hr as o,qr as k,rr as C,sr as t,ur as V,xr as B,yr as A,zr as H}from"./chunk-btz9jvec.js";import{Ir as w}from"./chunk-fkgv2hqd.js";import{Wu as f}from"./chunk-09kba1hg.js";import{eA as n}from"./chunk-t12xrrfr.js";function RJ(...F){return F.reduce((J,Q)=>({...J,...Q!=null?Q:{}}),{})}function NJ({tools:F=[],providerToolNames:J,resolveProviderToolName:Q}){var W;let X={},Y={};for(let Z of F)if(Z.type==="provider"){let $=(W=Q==null?void 0:Q(Z))!=null?W:(Z.id in J)?J[Z.id]:void 0;if($==null)continue;X[Z.name]=$,Y[$]=Z.name}return{toProviderToolName:(Z)=>{var $;return($=X[Z])!=null?$:Z},toCustomToolName:(Z)=>{var $;return($=Y[Z])!=null?$:Z}}}async function VJ(F,J){if(F==null)return Promise.resolve();let Q=J==null?void 0:J.abortSignal;return new Promise((W,X)=>{if(Q==null?void 0:Q.aborted){X(m());return}let Y=setTimeout(()=>{Z(),W()},F),Z=()=>{clearTimeout(Y),Q==null||Q.removeEventListener("abort",$)},$=()=>{Z(),X(m())};Q==null||Q.addEventListener("abort",$)})}function m(){return new DOMException("Delay was aborted","AbortError")}var TJ=class{constructor(){this.status={type:"pending"},this._resolve=void 0,this._reject=void 0}get promise(){if(this._promise)return this._promise;return this._promise=new Promise((F,J)=>{if(this.status.type==="resolved")F(this.status.value);else if(this.status.type==="rejected")J(this.status.error);this._resolve=F,this._reject=J}),this._promise}resolve(F){var J;if(this.status={type:"resolved",value:F},this._promise)(J=this._resolve)==null||J.call(this,F)}reject(F){var J;if(this.status={type:"rejected",error:F},this._promise)(J=this._reject)==null||J.call(this,F)}isResolved(){return this.status.type==="resolved"}isRejected(){return this.status.type==="rejected"}isPending(){return this.status.type==="pending"}};function z(F){return Object.fromEntries([...F.headers])}var{btoa:GF,atob:CF}=globalThis;function _J(F){let J=F.replace(/-/g,"+").replace(/_/g,"/"),Q=CF(J);return Uint8Array.from(Q,(W)=>W.codePointAt(0))}function a(F){let J="";for(let Q=0;Q<F.length;Q++)J+=String.fromCodePoint(F[Q]);return GF(J)}function jJ(F){return F instanceof Uint8Array?a(F):F}function kJ(F){if(F.type==="url")return F.url;return`data:${F.mediaType};base64,${typeof F.data==="string"?F.data:a(F.data)}`}function bJ(F,J={}){let{useArrayBrackets:Q=!0}=J,W=new FormData;for(let[X,Y]of Object.entries(F)){if(Y==null)continue;if(Array.isArray(Y)){if(Y.length===1){W.append(X,Y[0]);continue}let Z=Q?`${X}[]`:X;for(let $ of Y)W.append(Z,$);continue}W.append(X,Y)}return W}var s="AI_DownloadError",r=`vercel.ai.error.${s}`,MF=Symbol.for(r),u,i,O=class extends(i=k,u=MF,i){constructor({url:F,statusCode:J,statusText:Q,cause:W,message:X=W==null?`Failed to download ${F}: ${J} ${Q}`:`Failed to download ${F}: ${W}`}){super({name:s,message:X,cause:W});this[u]=!0,this.url=F,this.statusCode=J,this.statusText=Q}static isInstance(F){return k.hasMarker(F,r)}},e=2147483648;async function KF({response:F,url:J,maxBytes:Q=e}){let W=F.headers.get("content-length");if(W!=null){let G=parseInt(W,10);if(!isNaN(G)&&G>Q)throw new O({url:J,message:`Download of ${J} exceeded maximum size of ${Q} bytes (Content-Length: ${G}).`})}let X=F.body;if(X==null)return new Uint8Array(0);let Y=X.getReader(),Z=[],$=0;try{while(!0){let{done:G,value:N}=await Y.read();if(G)break;if($+=N.length,$>Q)throw new O({url:J,message:`Download of ${J} exceeded maximum size of ${Q} bytes.`});Z.push(N)}}finally{try{await Y.cancel()}finally{Y.releaseLock()}}let U=new Uint8Array($),L=0;for(let G of Z)U.set(G,L),L+=G.length;return U}function p(F){let J;try{J=new URL(F)}catch(W){throw new O({url:F,message:`Invalid URL: ${F}`})}if(J.protocol==="data:")return;if(J.protocol!=="http:"&&J.protocol!=="https:")throw new O({url:F,message:`URL scheme must be http, https, or data, got ${J.protocol}`});let Q=J.hostname;if(!Q)throw new O({url:F,message:"URL must have a hostname"});if(Q==="localhost"||Q.endsWith(".local")||Q.endsWith(".localhost"))throw new O({url:F,message:`URL with hostname ${Q} is not allowed`});if(Q.startsWith("[")&&Q.endsWith("]")){let W=Q.slice(1,-1);if(qF(W))throw new O({url:F,message:`URL with IPv6 address ${Q} is not allowed`});return}if(FF(Q)){if(b(Q))throw new O({url:F,message:`URL with IP address ${Q} is not allowed`});return}}function FF(F){let J=F.split(".");if(J.length!==4)return!1;return J.every((Q)=>{let W=Number(Q);return Number.isInteger(W)&&W>=0&&W<=255&&String(W)===Q})}function b(F){let J=F.split(".").map(Number),[Q,W]=J;if(Q===0)return!0;if(Q===10)return!0;if(Q===127)return!0;if(Q===169&&W===254)return!0;if(Q===172&&W>=16&&W<=31)return!0;if(Q===192&&W===168)return!0;return!1}function qF(F){let J=F.toLowerCase();if(J==="::1")return!0;if(J==="::")return!0;if(J.startsWith("::ffff:")){let Q=J.slice(7);if(FF(Q))return b(Q);let W=Q.split(":");if(W.length===2){let X=parseInt(W[0],16),Y=parseInt(W[1],16);if(!isNaN(X)&&!isNaN(Y)){let Z=X>>8&255,$=X&255,U=Y>>8&255,L=Y&255;return b(`${Z}.${$}.${U}.${L}`)}}}if(J.startsWith("fc")||J.startsWith("fd"))return!0;if(J.startsWith("fe80"))return!0;return!1}async function gJ(F,J){var Q,W;p(F);try{let X=await fetch(F,{signal:J==null?void 0:J.abortSignal});if(X.redirected)p(X.url);if(!X.ok)throw new O({url:F,statusCode:X.status,statusText:X.statusText});let Y=await KF({response:X,url:F,maxBytes:(Q=J==null?void 0:J.maxBytes)!=null?Q:e}),Z=(W=X.headers.get("content-type"))!=null?W:void 0;return new Blob([Y],Z?{type:Z}:void 0)}catch(X){if(O.isInstance(X))throw X;throw new O({url:F,cause:X})}}var DF=({prefix:F,size:J=16,alphabet:Q="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:W="-"}={})=>{let X=()=>{let Y=Q.length,Z=Array(J);for(let $=0;$<J;$++)Z[$]=Q[Math.random()*Y|0];return Z.join("")};if(F==null)return X;if(Q.includes(W))throw new V({argument:"separator",message:`The separator "${W}" must not be part of the alphabet "${Q}".`});return()=>`${F}${W}${X()}`},vJ=DF();function yJ(F){if(F==null)return"unknown error";if(typeof F==="string")return F;if(F instanceof Error)return F.message;return JSON.stringify(F)}function R(F){return(F instanceof Error||F instanceof DOMException)&&(F.name==="AbortError"||F.name==="ResponseAborted"||F.name==="TimeoutError")}var OF=["fetch failed","failed to fetch"],IF=["ConnectionRefused","ConnectionClosed","FailedToOpenSocket","ECONNRESET","ECONNREFUSED","ETIMEDOUT","EPIPE"];function PF(F){if(!(F instanceof Error))return!1;let J=F.code;if(typeof J==="string"&&IF.includes(J))return!0;return!1}function JF({error:F,url:J,requestBodyValues:Q}){if(R(F))return F;if(F instanceof TypeError&&OF.includes(F.message.toLowerCase())){let W=F.cause;if(W!=null)return new C({message:`Cannot connect to API: ${W.message}`,cause:W,url:J,requestBodyValues:Q,isRetryable:!0})}if(PF(F))return new C({message:`Cannot connect to API: ${F.message}`,cause:F,url:J,requestBodyValues:Q,isRetryable:!0});return F}function QF(F=globalThis){var J,Q,W;if(F.window)return"runtime/browser";if((J=F.navigator)==null?void 0:J.userAgent)return`runtime/${F.navigator.userAgent.toLowerCase()}`;if((W=(Q=F.process)==null?void 0:Q.versions)==null?void 0:W.node)return`runtime/node.js/${F.process.version.substring(0)}`;if(F.EdgeRuntime)return"runtime/vercel-edge";return"runtime/unknown"}function zF(F){if(F==null)return{};let J={};if(F instanceof Headers)F.forEach((Q,W)=>{J[W.toLowerCase()]=Q});else{if(!Array.isArray(F))F=Object.entries(F);for(let[Q,W]of F)if(W!=null)J[Q.toLowerCase()]=W}return J}function WF(F,...J){let Q=new Headers(zF(F)),W=Q.get("user-agent")||"";return Q.set("user-agent",[W,...J].filter(Boolean).join(" ")),Object.fromEntries(Q.entries())}var XF="4.0.23",AF=()=>globalThis.fetch,uJ=async({url:F,headers:J={},successfulResponseHandler:Q,failedResponseHandler:W,abortSignal:X,fetch:Y=AF()})=>{try{let Z=await Y(F,{method:"GET",headers:WF(J,`ai-sdk/provider-utils/${XF}`,QF()),signal:X}),$=z(Z);if(!Z.ok){let U;try{U=await W({response:Z,url:F,requestBodyValues:{}})}catch(L){if(R(L)||C.isInstance(L))throw L;throw new C({message:"Failed to process error response",cause:L,statusCode:Z.status,url:F,responseHeaders:$,requestBodyValues:{}})}throw U.value}try{return await Q({response:Z,url:F,requestBodyValues:{}})}catch(U){if(U instanceof Error){if(R(U)||C.isInstance(U))throw U}throw new C({message:"Failed to process successful response",cause:U,statusCode:Z.status,url:F,responseHeaders:$,requestBodyValues:{}})}}catch(Z){throw JF({error:Z,url:F,requestBodyValues:{}})}};function iJ(F){return F!=null}function pJ({mediaType:F,url:J,supportedUrls:Q}){return J=J.toLowerCase(),F=F.toLowerCase(),Object.entries(Q).map(([W,X])=>{let Y=W.toLowerCase();return Y==="*"||Y==="*/*"?{mediaTypePrefix:"",regexes:X}:{mediaTypePrefix:Y.replace(/\*/,""),regexes:X}}).filter(({mediaTypePrefix:W})=>F.startsWith(W)).flatMap(({regexes:W})=>W).some((W)=>W.test(J))}function cJ({apiKey:F,environmentVariableName:J,apiKeyParameterName:Q="apiKey",description:W}){if(typeof F==="string")return F;if(F!=null)throw new A({message:`${W} API key must be a string.`});if(typeof process>"u")throw new A({message:`${W} API key is missing. Pass it using the '${Q}' parameter. Environment variables are not supported in this environment.`});if(F=process.env[J],F==null)throw new A({message:`${W} API key is missing. Pass it using the '${Q}' parameter or the ${J} environment variable.`});if(typeof F!=="string")throw new A({message:`${W} API key must be a string. The value of the ${J} environment variable is not a string.`});return F}function dJ({settingValue:F,environmentVariableName:J}){if(typeof F==="string")return F;if(F!=null||typeof process>"u")return;if(F=process.env[J],F==null||typeof F!=="string")return;return F}function fJ({settingValue:F,environmentVariableName:J,settingName:Q,description:W}){if(typeof F==="string")return F;if(F!=null)throw new H({message:`${W} setting must be a string.`});if(typeof process>"u")throw new H({message:`${W} setting is missing. Pass it using the '${Q}' parameter. Environment variables are not supported in this environment.`});if(F=process.env[J],F==null)throw new H({message:`${W} setting is missing. Pass it using the '${Q}' parameter or the ${J} environment variable.`});if(typeof F!=="string")throw new H({message:`${W} setting must be a string. The value of the ${J} environment variable is not a string.`});return F}function tJ(F){var J;let[Q,W=""]=F.toLowerCase().split("/");return(J={mpeg:"mp3","x-wav":"wav",opus:"ogg",mp4:"m4a","x-m4a":"m4a"}[W])!=null?J:W}var HF=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,BF=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function l(F){let J=JSON.parse(F);if(J===null||typeof J!=="object")return J;if(HF.test(F)===!1&&BF.test(F)===!1)return J;return RF(J)}function RF(F){let J=[F];while(J.length){let Q=J;J=[];for(let W of Q){if(Object.prototype.hasOwnProperty.call(W,"__proto__"))throw SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(W,"constructor")&&W.constructor!==null&&typeof W.constructor==="object"&&Object.prototype.hasOwnProperty.call(W.constructor,"prototype"))throw SyntaxError("Object contains forbidden prototype property");for(let X in W){let Y=W[X];if(Y&&typeof Y==="object")J.push(Y)}}}return F}function x(F){let{stackTraceLimit:J}=Error;try{Error.stackTraceLimit=0}catch(Q){return l(F)}try{return l(F)}finally{Error.stackTraceLimit=J}}function v(F){if(F.type==="object"||Array.isArray(F.type)&&F.type.includes("object")){F.additionalProperties=!1;let{properties:Q}=F;if(Q!=null)for(let W of Object.keys(Q))Q[W]=P(Q[W])}if(F.items!=null)F.items=Array.isArray(F.items)?F.items.map(P):P(F.items);if(F.anyOf!=null)F.anyOf=F.anyOf.map(P);if(F.allOf!=null)F.allOf=F.allOf.map(P);if(F.oneOf!=null)F.oneOf=F.oneOf.map(P);let{definitions:J}=F;if(J!=null)for(let Q of Object.keys(J))J[Q]=P(J[Q]);return F}function P(F){if(typeof F==="boolean")return F;return v(F)}var NF=Symbol("Let zodToJsonSchema decide on which parser to use"),c={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},VF=(F)=>typeof F==="string"?{...c,name:F}:{...c,...F};function K(){return{}}function TF(F,J){var Q,W,X;let Y={type:"array"};if(((Q=F.type)==null?void 0:Q._def)&&((X=(W=F.type)==null?void 0:W._def)==null?void 0:X.typeName)!==w.ZodAny)Y.items=E(F.type._def,{...J,currentPath:[...J.currentPath,"items"]});if(F.minLength)Y.minItems=F.minLength.value;if(F.maxLength)Y.maxItems=F.maxLength.value;if(F.exactLength)Y.minItems=F.exactLength.value,Y.maxItems=F.exactLength.value;return Y}function _F(F){let J={type:"integer",format:"int64"};if(!F.checks)return J;for(let Q of F.checks)switch(Q.kind){case"min":if(Q.inclusive)J.minimum=Q.value;else J.exclusiveMinimum=Q.value;break;case"max":if(Q.inclusive)J.maximum=Q.value;else J.exclusiveMaximum=Q.value;break;case"multipleOf":J.multipleOf=Q.value;break}return J}function jF(){return{type:"boolean"}}function YF(F,J){return E(F.type._def,J)}var kF=(F,J)=>{return E(F.innerType._def,J)};function ZF(F,J,Q){let W=Q!=null?Q:J.dateStrategy;if(Array.isArray(W))return{anyOf:W.map((X,Y)=>ZF(F,J,X))};switch(W){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return bF(F)}}var bF=(F)=>{let J={type:"integer",format:"unix-time"};for(let Q of F.checks)switch(Q.kind){case"min":J.minimum=Q.value;break;case"max":J.maximum=Q.value;break}return J};function SF(F,J){return{...E(F.innerType._def,J),default:F.defaultValue()}}function gF(F,J){return J.effectStrategy==="input"?E(F.schema._def,J):K()}function xF(F){return{type:"string",enum:Array.from(F.values)}}var vF=(F)=>{if("type"in F&&F.type==="string")return!1;return"allOf"in F};function yF(F,J){let Q=[E(F.left._def,{...J,currentPath:[...J.currentPath,"allOf","0"]}),E(F.right._def,{...J,currentPath:[...J.currentPath,"allOf","1"]})].filter((X)=>!!X),W=[];return Q.forEach((X)=>{if(vF(X))W.push(...X.allOf);else{let Y=X;if("additionalProperties"in X&&X.additionalProperties===!1){let{additionalProperties:Z,...$}=X;Y=$}W.push(Y)}}),W.length?{allOf:W}:void 0}function hF(F){let J=typeof F.value;if(J!=="bigint"&&J!=="number"&&J!=="boolean"&&J!=="string")return{type:Array.isArray(F.value)?"array":"object"};return{type:J==="bigint"?"integer":J,const:F.value}}var _=void 0,q={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>{if(_===void 0)_=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return _},uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function $F(F,J){let Q={type:"string"};if(F.checks)for(let W of F.checks)switch(W.kind){case"min":Q.minLength=typeof Q.minLength==="number"?Math.max(Q.minLength,W.value):W.value;break;case"max":Q.maxLength=typeof Q.maxLength==="number"?Math.min(Q.maxLength,W.value):W.value;break;case"email":switch(J.emailStrategy){case"format:email":D(Q,"email",W.message,J);break;case"format:idn-email":D(Q,"idn-email",W.message,J);break;case"pattern:zod":M(Q,q.email,W.message,J);break}break;case"url":D(Q,"uri",W.message,J);break;case"uuid":D(Q,"uuid",W.message,J);break;case"regex":M(Q,W.regex,W.message,J);break;case"cuid":M(Q,q.cuid,W.message,J);break;case"cuid2":M(Q,q.cuid2,W.message,J);break;case"startsWith":M(Q,RegExp(`^${j(W.value,J)}`),W.message,J);break;case"endsWith":M(Q,RegExp(`${j(W.value,J)}$`),W.message,J);break;case"datetime":D(Q,"date-time",W.message,J);break;case"date":D(Q,"date",W.message,J);break;case"time":D(Q,"time",W.message,J);break;case"duration":D(Q,"duration",W.message,J);break;case"length":Q.minLength=typeof Q.minLength==="number"?Math.max(Q.minLength,W.value):W.value,Q.maxLength=typeof Q.maxLength==="number"?Math.min(Q.maxLength,W.value):W.value;break;case"includes":{M(Q,RegExp(j(W.value,J)),W.message,J);break}case"ip":{if(W.version!=="v6")D(Q,"ipv4",W.message,J);if(W.version!=="v4")D(Q,"ipv6",W.message,J);break}case"base64url":M(Q,q.base64url,W.message,J);break;case"jwt":M(Q,q.jwt,W.message,J);break;case"cidr":{if(W.version!=="v6")M(Q,q.ipv4Cidr,W.message,J);if(W.version!=="v4")M(Q,q.ipv6Cidr,W.message,J);break}case"emoji":M(Q,q.emoji(),W.message,J);break;case"ulid":{M(Q,q.ulid,W.message,J);break}case"base64":{switch(J.base64Strategy){case"format:binary":{D(Q,"binary",W.message,J);break}case"contentEncoding:base64":{Q.contentEncoding="base64";break}case"pattern:zod":{M(Q,q.base64,W.message,J);break}}break}case"nanoid":M(Q,q.nanoid,W.message,J);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return Q}function j(F,J){return J.patternStrategy==="escape"?uF(F):F}var mF=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function uF(F){let J="";for(let Q=0;Q<F.length;Q++){if(!mF.has(F[Q]))J+="\\";J+=F[Q]}return J}function D(F,J,Q,W){var X;if(F.format||((X=F.anyOf)==null?void 0:X.some((Y)=>Y.format))){if(!F.anyOf)F.anyOf=[];if(F.format)F.anyOf.push({format:F.format}),delete F.format;F.anyOf.push({format:J,...Q&&W.errorMessages&&{errorMessage:{format:Q}}})}else F.format=J}function M(F,J,Q,W){var X;if(F.pattern||((X=F.allOf)==null?void 0:X.some((Y)=>Y.pattern))){if(!F.allOf)F.allOf=[];if(F.pattern)F.allOf.push({pattern:F.pattern}),delete F.pattern;F.allOf.push({pattern:d(J,W),...Q&&W.errorMessages&&{errorMessage:{pattern:Q}}})}else F.pattern=d(J,W)}function d(F,J){var Q;if(!J.applyRegexFlags||!F.flags)return F.source;let W={i:F.flags.includes("i"),m:F.flags.includes("m"),s:F.flags.includes("s")},X=W.i?F.source.toLowerCase():F.source,Y="",Z=!1,$=!1,U=!1;for(let L=0;L<X.length;L++){if(Z){Y+=X[L],Z=!1;continue}if(W.i){if($){if(X[L].match(/[a-z]/)){if(U)Y+=X[L],Y+=`${X[L-2]}-${X[L]}`.toUpperCase(),U=!1;else if(X[L+1]==="-"&&((Q=X[L+2])==null?void 0:Q.match(/[a-z]/)))Y+=X[L],U=!0;else Y+=`${X[L]}${X[L].toUpperCase()}`;continue}}else if(X[L].match(/[a-z]/)){Y+=`[${X[L]}${X[L].toUpperCase()}]`;continue}}if(W.m){if(X[L]==="^"){Y+=`(^|(?<=[\r
|
|
3
3
|
]))`;continue}else if(X[L]==="$"){Y+=`($|(?=[\r
|
|
4
4
|
]))`;continue}}if(W.s&&X[L]==="."){Y+=$?`${X[L]}\r
|
|
5
5
|
`:`[${X[L]}\r
|
|
6
6
|
]`;continue}if(Y+=X[L],X[L]==="\\")Z=!0;else if($&&X[L]==="]")$=!1;else if(!$&&X[L]==="[")$=!0}try{new RegExp(Y)}catch(L){return console.warn(`Could not convert regex pattern at ${J.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),F.source}return Y}function LF(F,J){var Q,W,X,Y,Z,$;let U={type:"object",additionalProperties:(Q=E(F.valueType._def,{...J,currentPath:[...J.currentPath,"additionalProperties"]}))!=null?Q:J.allowedAdditionalProperties};if(((W=F.keyType)==null?void 0:W._def.typeName)===w.ZodString&&((X=F.keyType._def.checks)==null?void 0:X.length)){let{type:L,...G}=$F(F.keyType._def,J);return{...U,propertyNames:G}}else if(((Y=F.keyType)==null?void 0:Y._def.typeName)===w.ZodEnum)return{...U,propertyNames:{enum:F.keyType._def.values}};else if(((Z=F.keyType)==null?void 0:Z._def.typeName)===w.ZodBranded&&F.keyType._def.type._def.typeName===w.ZodString&&(($=F.keyType._def.type._def.checks)==null?void 0:$.length)){let{type:L,...G}=YF(F.keyType._def,J);return{...U,propertyNames:G}}return U}function iF(F,J){if(J.mapStrategy==="record")return LF(F,J);let Q=E(F.keyType._def,{...J,currentPath:[...J.currentPath,"items","items","0"]})||K(),W=E(F.valueType._def,{...J,currentPath:[...J.currentPath,"items","items","1"]})||K();return{type:"array",maxItems:125,items:{type:"array",items:[Q,W],minItems:2,maxItems:2}}}function pF(F){let J=F.values,W=Object.keys(F.values).filter((Y)=>{return typeof J[J[Y]]!=="number"}).map((Y)=>J[Y]),X=Array.from(new Set(W.map((Y)=>typeof Y)));return{type:X.length===1?X[0]==="string"?"string":"number":["string","number"],enum:W}}function lF(){return{not:K()}}function cF(){return{type:"null"}}var S={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function dF(F,J){let Q=F.options instanceof Map?Array.from(F.options.values()):F.options;if(Q.every((W)=>(W._def.typeName in S)&&(!W._def.checks||!W._def.checks.length))){let W=Q.reduce((X,Y)=>{let Z=S[Y._def.typeName];return Z&&!X.includes(Z)?[...X,Z]:X},[]);return{type:W.length>1?W:W[0]}}else if(Q.every((W)=>W._def.typeName==="ZodLiteral"&&!W.description)){let W=Q.reduce((X,Y)=>{let Z=typeof Y._def.value;switch(Z){case"string":case"number":case"boolean":return[...X,Z];case"bigint":return[...X,"integer"];case"object":if(Y._def.value===null)return[...X,"null"];case"symbol":case"undefined":case"function":default:return X}},[]);if(W.length===Q.length){let X=W.filter((Y,Z,$)=>$.indexOf(Y)===Z);return{type:X.length>1?X:X[0],enum:Q.reduce((Y,Z)=>{return Y.includes(Z._def.value)?Y:[...Y,Z._def.value]},[])}}}else if(Q.every((W)=>W._def.typeName==="ZodEnum"))return{type:"string",enum:Q.reduce((W,X)=>[...W,...X._def.values.filter((Y)=>!W.includes(Y))],[])};return nF(F,J)}var nF=(F,J)=>{let Q=(F.options instanceof Map?Array.from(F.options.values()):F.options).map((W,X)=>E(W._def,{...J,currentPath:[...J.currentPath,"anyOf",`${X}`]})).filter((W)=>!!W&&(!J.strictUnions||typeof W==="object"&&Object.keys(W).length>0));return Q.length?{anyOf:Q}:void 0};function fF(F,J){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(F.innerType._def.typeName)&&(!F.innerType._def.checks||!F.innerType._def.checks.length))return{type:[S[F.innerType._def.typeName],"null"]};let Q=E(F.innerType._def,{...J,currentPath:[...J.currentPath,"anyOf","0"]});return Q&&{anyOf:[Q,{type:"null"}]}}function tF(F){let J={type:"number"};if(!F.checks)return J;for(let Q of F.checks)switch(Q.kind){case"int":J.type="integer";break;case"min":if(Q.inclusive)J.minimum=Q.value;else J.exclusiveMinimum=Q.value;break;case"max":if(Q.inclusive)J.maximum=Q.value;else J.exclusiveMaximum=Q.value;break;case"multipleOf":J.multipleOf=Q.value;break}return J}function oF(F,J){let Q={type:"object",properties:{}},W=[],X=F.shape();for(let Z in X){let $=X[Z];if($===void 0||$._def===void 0)continue;let U=sF($),L=E($._def,{...J,currentPath:[...J.currentPath,"properties",Z],propertyPath:[...J.currentPath,"properties",Z]});if(L===void 0)continue;if(Q.properties[Z]=L,!U)W.push(Z)}if(W.length)Q.required=W;let Y=aF(F,J);if(Y!==void 0)Q.additionalProperties=Y;return Q}function aF(F,J){if(F.catchall._def.typeName!=="ZodNever")return E(F.catchall._def,{...J,currentPath:[...J.currentPath,"additionalProperties"]});switch(F.unknownKeys){case"passthrough":return J.allowedAdditionalProperties;case"strict":return J.rejectedAdditionalProperties;case"strip":return J.removeAdditionalStrategy==="strict"?J.allowedAdditionalProperties:J.rejectedAdditionalProperties}}function sF(F){try{return F.isOptional()}catch(J){return!0}}var rF=(F,J)=>{var Q;if(J.currentPath.toString()===((Q=J.propertyPath)==null?void 0:Q.toString()))return E(F.innerType._def,J);let W=E(F.innerType._def,{...J,currentPath:[...J.currentPath,"anyOf","1"]});return W?{anyOf:[{not:K()},W]}:K()},eF=(F,J)=>{if(J.pipeStrategy==="input")return E(F.in._def,J);else if(J.pipeStrategy==="output")return E(F.out._def,J);let Q=E(F.in._def,{...J,currentPath:[...J.currentPath,"allOf","0"]}),W=E(F.out._def,{...J,currentPath:[...J.currentPath,"allOf",Q?"1":"0"]});return{allOf:[Q,W].filter((X)=>X!==void 0)}};function FJ(F,J){return E(F.type._def,J)}function JJ(F,J){let W={type:"array",uniqueItems:!0,items:E(F.valueType._def,{...J,currentPath:[...J.currentPath,"items"]})};if(F.minSize)W.minItems=F.minSize.value;if(F.maxSize)W.maxItems=F.maxSize.value;return W}function QJ(F,J){if(F.rest)return{type:"array",minItems:F.items.length,items:F.items.map((Q,W)=>E(Q._def,{...J,currentPath:[...J.currentPath,"items",`${W}`]})).reduce((Q,W)=>W===void 0?Q:[...Q,W],[]),additionalItems:E(F.rest._def,{...J,currentPath:[...J.currentPath,"additionalItems"]})};else return{type:"array",minItems:F.items.length,maxItems:F.items.length,items:F.items.map((Q,W)=>E(Q._def,{...J,currentPath:[...J.currentPath,"items",`${W}`]})).reduce((Q,W)=>W===void 0?Q:[...Q,W],[])}}function WJ(){return{not:K()}}function XJ(){return K()}var YJ=(F,J)=>{return E(F.innerType._def,J)},ZJ=(F,J,Q)=>{switch(J){case w.ZodString:return $F(F,Q);case w.ZodNumber:return tF(F);case w.ZodObject:return oF(F,Q);case w.ZodBigInt:return _F(F);case w.ZodBoolean:return jF();case w.ZodDate:return ZF(F,Q);case w.ZodUndefined:return WJ();case w.ZodNull:return cF();case w.ZodArray:return TF(F,Q);case w.ZodUnion:case w.ZodDiscriminatedUnion:return dF(F,Q);case w.ZodIntersection:return yF(F,Q);case w.ZodTuple:return QJ(F,Q);case w.ZodRecord:return LF(F,Q);case w.ZodLiteral:return hF(F);case w.ZodEnum:return xF(F);case w.ZodNativeEnum:return pF(F);case w.ZodNullable:return fF(F,Q);case w.ZodOptional:return rF(F,Q);case w.ZodMap:return iF(F,Q);case w.ZodSet:return JJ(F,Q);case w.ZodLazy:return()=>F.getter()._def;case w.ZodPromise:return FJ(F,Q);case w.ZodNaN:case w.ZodNever:return lF();case w.ZodEffects:return gF(F,Q);case w.ZodAny:return K();case w.ZodUnknown:return XJ();case w.ZodDefault:return SF(F,Q);case w.ZodBranded:return YF(F,Q);case w.ZodReadonly:return YJ(F,Q);case w.ZodCatch:return kF(F,Q);case w.ZodPipeline:return eF(F,Q);case w.ZodFunction:case w.ZodVoid:case w.ZodSymbol:return;default:return((W)=>{return})(J)}},$J=(F,J)=>{let Q=0;for(;Q<F.length&&Q<J.length;Q++)if(F[Q]!==J[Q])break;return[(F.length-Q).toString(),...J.slice(Q)].join("/")};function E(F,J,Q=!1){var W;let X=J.seen.get(F);if(J.override){let U=(W=J.override)==null?void 0:W.call(J,F,J,X,Q);if(U!==NF)return U}if(X&&!Q){let U=LJ(X,J);if(U!==void 0)return U}let Y={def:F,path:J.currentPath,jsonSchema:void 0};J.seen.set(F,Y);let Z=ZJ(F,F.typeName,J),$=typeof Z==="function"?E(Z(),J):Z;if($)UJ(F,J,$);if(J.postProcess){let U=J.postProcess($,F,J);return Y.jsonSchema=$,U}return Y.jsonSchema=$,$}var LJ=(F,J)=>{switch(J.$refStrategy){case"root":return{$ref:F.path.join("/")};case"relative":return{$ref:$J(J.currentPath,F.path)};case"none":case"seen":{if(F.path.length<J.currentPath.length&&F.path.every((Q,W)=>J.currentPath[W]===Q))return console.warn(`Recursive reference detected at ${J.currentPath.join("/")}! Defaulting to any`),K();return J.$refStrategy==="seen"?K():void 0}}},UJ=(F,J,Q)=>{if(F.description)Q.description=F.description;return Q},wJ=(F)=>{let J=VF(F),Q=J.name!==void 0?[...J.basePath,J.definitionPath,J.name]:J.basePath;return{...J,currentPath:Q,propertyPath:void 0,seen:new Map(Object.entries(J.definitions).map(([W,X])=>[X._def,{def:X._def,path:[...J.basePath,J.definitionPath,W],jsonSchema:void 0}]))}},EJ=(F,J)=>{var Q;let W=wJ(J),X=typeof J==="object"&&J.definitions?Object.entries(J.definitions).reduce((L,[G,N])=>{var h;return{...L,[G]:(h=E(N._def,{...W,currentPath:[...W.basePath,W.definitionPath,G]},!0))!=null?h:K()}},{}):void 0,Y=typeof J==="string"?J:(J==null?void 0:J.nameStrategy)==="title"?void 0:J==null?void 0:J.name,Z=(Q=E(F._def,Y===void 0?W:{...W,currentPath:[...W.basePath,W.definitionPath,Y]},!1))!=null?Q:K(),$=typeof J==="object"&&J.name!==void 0&&J.nameStrategy==="title"?J.name:void 0;if($!==void 0)Z.title=$;let U=Y===void 0?X?{...Z,[W.definitionPath]:X}:Z:{$ref:[...W.$refStrategy==="relative"?[]:W.basePath,W.definitionPath,Y].join("/"),[W.definitionPath]:{...X,[Y]:Z}};return U.$schema="http://json-schema.org/draft-07/schema#",U},g=Symbol.for("vercel.ai.schema");function JQ(F){let J;return()=>{if(J==null)J=F();return J}}function T(F,{validate:J}={}){return{[g]:!0,_type:void 0,get jsonSchema(){if(typeof F==="function")F=F();return F},validate:J}}function GJ(F){return typeof F==="object"&&F!==null&&g in F&&F[g]===!0&&"jsonSchema"in F&&"validate"in F}function CJ(F){return F==null?T({properties:{},additionalProperties:!1}):GJ(F)?F:("~standard"in F)?F["~standard"].vendor==="zod"?OJ(F):MJ(F):F()}function MJ(F){return T(()=>v(F["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async(J)=>{let Q=await F["~standard"].validate(J);return"value"in Q?{success:!0,value:Q.value}:{success:!1,error:new I({value:J,cause:Q.issues})}}})}function KJ(F,J){var Q;let W=(Q=J==null?void 0:J.useReferences)!=null?Q:!1;return T(()=>EJ(F,{$refStrategy:W?"root":"none"}),{validate:async(X)=>{let Y=await F.safeParseAsync(X);return Y.success?{success:!0,value:Y.data}:{success:!1,error:Y.error}}})}function qJ(F,J){var Q;let W=(Q=J==null?void 0:J.useReferences)!=null?Q:!1;return T(()=>v(n(F,{target:"draft-7",io:"input",reused:W?"ref":"inline"})),{validate:async(X)=>{let Y=await f(F,X);return Y.success?{success:!0,value:Y.data}:{success:!1,error:Y.error}}})}function DJ(F){return"_zod"in F}function OJ(F,J){if(DJ(F))return qJ(F,J);else return KJ(F,J)}async function IJ({value:F,schema:J,context:Q}){let W=await y({value:F,schema:J,context:Q});if(!W.success)throw I.wrap({value:F,cause:W.error,context:Q});return W.value}async function y({value:F,schema:J,context:Q}){let W=CJ(J);try{if(W.validate==null)return{success:!0,value:F,rawValue:F};let X=await W.validate(F);if(X.success)return{success:!0,value:X.value,rawValue:F};return{success:!1,error:I.wrap({value:F,cause:X.error,context:Q}),rawValue:F}}catch(X){return{success:!1,error:I.wrap({value:F,cause:X,context:Q}),rawValue:F}}}async function PJ({text:F,schema:J}){try{let Q=x(F);if(J==null)return Q;return IJ({value:Q,schema:J})}catch(Q){if(B.isInstance(Q)||I.isInstance(Q))throw Q;throw new B({text:F,cause:Q})}}async function UF({text:F,schema:J}){try{let Q=x(F);if(J==null)return{success:!0,value:Q,rawValue:Q};return await y({value:Q,schema:J})}catch(Q){return{success:!1,error:B.isInstance(Q)?Q:new B({text:F,cause:Q}),rawValue:void 0}}}function QQ(F){try{return x(F),!0}catch(J){return!1}}function zJ({stream:F,schema:J}){return F.pipeThrough(new TextDecoderStream).pipeThrough(new o).pipeThrough(new TransformStream({async transform({data:Q},W){if(Q==="[DONE]")return;W.enqueue(await UF({text:Q,schema:J}))}}))}async function YQ({provider:F,providerOptions:J,schema:Q}){if((J==null?void 0:J[F])==null)return;let W=await y({value:J[F],schema:Q});if(!W.success)throw new V({argument:"providerOptions",message:`invalid ${F} provider options`,cause:W.error});return W.value}var AJ=()=>globalThis.fetch,$Q=async({url:F,headers:J,body:Q,failedResponseHandler:W,successfulResponseHandler:X,abortSignal:Y,fetch:Z})=>wF({url:F,headers:{"Content-Type":"application/json",...J},body:{content:JSON.stringify(Q),values:Q},failedResponseHandler:W,successfulResponseHandler:X,abortSignal:Y,fetch:Z}),LQ=async({url:F,headers:J,formData:Q,failedResponseHandler:W,successfulResponseHandler:X,abortSignal:Y,fetch:Z})=>wF({url:F,headers:J,body:{content:Q,values:Object.fromEntries(Q.entries())},failedResponseHandler:W,successfulResponseHandler:X,abortSignal:Y,fetch:Z}),wF=async({url:F,headers:J={},body:Q,successfulResponseHandler:W,failedResponseHandler:X,abortSignal:Y,fetch:Z=AJ()})=>{try{let $=await Z(F,{method:"POST",headers:WF(J,`ai-sdk/provider-utils/${XF}`,QF()),body:Q.content,signal:Y}),U=z($);if(!$.ok){let L;try{L=await X({response:$,url:F,requestBodyValues:Q.values})}catch(G){if(R(G)||C.isInstance(G))throw G;throw new C({message:"Failed to process error response",cause:G,statusCode:$.status,url:F,responseHeaders:U,requestBodyValues:Q.values})}throw L.value}try{return await W({response:$,url:F,requestBodyValues:Q.values})}catch(L){if(L instanceof Error){if(R(L)||C.isInstance(L))throw L}throw new C({message:"Failed to process successful response",cause:L,statusCode:$.status,url:F,responseHeaders:U,requestBodyValues:Q.values})}}catch($){throw JF({error:$,url:F,requestBodyValues:Q.values})}};function EF(F){return F}function UQ(F){return{...F,type:"dynamic"}}function wQ({id:F,inputSchema:J}){return({execute:Q,outputSchema:W,needsApproval:X,toModelOutput:Y,onInputStart:Z,onInputDelta:$,onInputAvailable:U,...L})=>EF({type:"provider",id:F,args:L,inputSchema:J,outputSchema:W,execute:Q,needsApproval:X,toModelOutput:Y,onInputStart:Z,onInputDelta:$,onInputAvailable:U})}function EQ({id:F,inputSchema:J,outputSchema:Q,supportsDeferredResults:W}){return({execute:X,needsApproval:Y,toModelOutput:Z,onInputStart:$,onInputDelta:U,onInputAvailable:L,...G})=>EF({type:"provider",id:F,args:G,inputSchema:J,outputSchema:Q,execute:X,needsApproval:Y,toModelOutput:Z,onInputStart:$,onInputDelta:U,onInputAvailable:L,supportsDeferredResults:W})}async function GQ(F){if(typeof F==="function")F=F();return Promise.resolve(F)}var MQ=({errorSchema:F,errorToMessage:J,isRetryable:Q})=>async({response:W,url:X,requestBodyValues:Y})=>{let Z=await W.text(),$=z(W);if(Z.trim()==="")return{responseHeaders:$,value:new C({message:W.statusText,url:X,requestBodyValues:Y,statusCode:W.status,responseHeaders:$,responseBody:Z,isRetryable:Q==null?void 0:Q(W)})};try{let U=await PJ({text:Z,schema:F});return{responseHeaders:$,value:new C({message:J(U),url:X,requestBodyValues:Y,statusCode:W.status,responseHeaders:$,responseBody:Z,data:U,isRetryable:Q==null?void 0:Q(W,U)})}}catch(U){return{responseHeaders:$,value:new C({message:W.statusText,url:X,requestBodyValues:Y,statusCode:W.status,responseHeaders:$,responseBody:Z,isRetryable:Q==null?void 0:Q(W)})}}},KQ=(F)=>async({response:J})=>{let Q=z(J);if(J.body==null)throw new t({});return{responseHeaders:Q,value:zJ({stream:J.body,schema:F})}},qQ=(F)=>async({response:J,url:Q,requestBodyValues:W})=>{let X=await J.text(),Y=await UF({text:X,schema:F}),Z=z(J);if(!Y.success)throw new C({message:"Invalid JSON response",cause:Y.error,statusCode:J.status,responseHeaders:Z,responseBody:X,url:Q,requestBodyValues:W});return{responseHeaders:Z,value:Y.value,rawValue:Y.rawValue}},DQ=()=>async({response:F,url:J,requestBodyValues:Q})=>{let W=z(F);if(!F.body)throw new C({message:"Response body is empty",url:J,requestBodyValues:Q,statusCode:F.status,responseHeaders:W,responseBody:void 0});try{let X=await F.arrayBuffer();return{responseHeaders:W,value:new Uint8Array(X)}}catch(X){throw new C({message:"Failed to read response as array buffer",url:J,requestBodyValues:Q,statusCode:F.status,responseHeaders:W,responseBody:void 0,cause:X})}},OQ=()=>async({response:F,url:J,requestBodyValues:Q})=>{let W=z(F),X=await F.text();return{responseHeaders:W,value:new C({message:F.statusText,url:J,requestBodyValues:Q,statusCode:F.status,responseHeaders:W,responseBody:X})}};function IQ(F){let J=F.indexOf(".");return J===-1?F:F.slice(0,J)}function PQ(F){return F==null?void 0:F.replace(/\/$/,"")}function HJ(F){return F!=null&&typeof F[Symbol.asyncIterator]==="function"}async function*zQ({execute:F,input:J,options:Q}){let W=F(J,Q);if(HJ(W)){let X;for await(let Y of W)X=Y,yield{type:"preliminary",output:Y};yield{type:"final",output:X}}else yield{type:"final",output:await W}}
|
|
7
|
-
export{RJ as
|
|
7
|
+
export{RJ as pq,NJ as qq,VJ as rq,TJ as sq,z as tq,_J as uq,a as vq,jJ as wq,kJ as xq,bJ as yq,O as zq,e as Aq,KF as Bq,p as Cq,gJ as Dq,DF as Eq,vJ as Fq,yJ as Gq,R as Hq,QF as Iq,zF as Jq,WF as Kq,uJ as Lq,iJ as Mq,pJ as Nq,cJ as Oq,dJ as Pq,fJ as Qq,tJ as Rq,JQ as Sq,T as Tq,CJ as Uq,OJ as Vq,IJ as Wq,y as Xq,PJ as Yq,UF as Zq,QQ as _q,zJ as $q,YQ as ar,$Q as br,LQ as cr,EF as dr,UQ as er,wQ as fr,EQ as gr,GQ as hr,MQ as ir,KQ as jr,qQ as kr,DQ as lr,OQ as mr,IQ as nr,PQ as or,zQ as pr};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var o=[{test:(a)=>a.startsWith("en"),locale:"en"},{test:(a)=>a.startsWith("zh")&&/(hant|tw|hk|mo)/.test(a),locale:"zht"},{test:(a)=>a.startsWith("zh"),locale:"zh"},{test:(a)=>a.startsWith("ko"),locale:"ko"},{test:(a)=>a.startsWith("de"),locale:"de"},{test:(a)=>a.startsWith("es"),locale:"es"},{test:(a)=>a.startsWith("fr"),locale:"fr"},{test:(a)=>a.startsWith("da"),locale:"da"},{test:(a)=>a.startsWith("ja"),locale:"ja"},{test:(a)=>a.startsWith("pl"),locale:"pl"},{test:(a)=>a.startsWith("ru"),locale:"ru"},{test:(a)=>a.startsWith("ar"),locale:"ar"},{test:(a)=>/^(no|nb|nn)/.test(a),locale:"no"},{test:(a)=>a.startsWith("pt")&&/br/.test(a),locale:"br"},{test:(a)=>a.startsWith("pt"),locale:"pt"},{test:(a)=>a.startsWith("th"),locale:"th"},{test:(a)=>a.startsWith("bs"),locale:"bs"},{test:(a)=>a.startsWith("tr"),locale:"tr"}],s=new Set(["Asia/Shanghai","Asia/Chongqing","Asia/Harbin","Asia/Urumqi","Asia/Kashgar"]),A=new Set(["Asia/Hong_Kong","Asia/Macau","Asia/Macao","Asia/Taipei"]),m=new Set(["Asia/Tokyo"]),l=new Set(["Europe/Paris","Europe/Monaco","Indian/Reunion","Indian/Mayotte","Pacific/Noumea","Pacific/Tahiti","Pacific/Marquesas","Pacific/Gambier","America/Martinique","America/Guadeloupe","America/St_Barthelemy","America/Cayenne","America/Miquelon"]),u=new Set(["Europe/Moscow","Europe/Kaliningrad","Europe/Samara","Europe/Volgograd","Europe/Saratov","Europe/Astrakhan","Europe/Kirov","Europe/Ulyanovsk","Europe/Simferopol","Europe/Minsk","Asia/Yekaterinburg","Asia/Omsk","Asia/Novosibirsk","Asia/Novokuznetsk","Asia/Krasnoyarsk","Asia/Irkutsk","Asia/Chita","Asia/Yakutsk","Asia/Khandyga","Asia/Vladivostok","Asia/Ust-Nera","Asia/Magadan","Asia/Sakhalin","Asia/Srednekolymsk","Asia/Kamchatka","Asia/Anadyr","Asia/Barnaul","Asia/Tomsk"]),h=new Set(["Europe/Madrid","Atlantic/Canary","Africa/Ceuta","America/Mexico_City","America/Tijuana","America/Hermosillo","America/Mazatlan","America/Chihuahua","America/Monterrey","America/Cancun","America/Merida","America/Matamoros","America/Bahia_Banderas","America/Ojinaga","America/Havana","America/Santo_Domingo","America/Puerto_Rico","America/Panama","America/Guatemala","America/Tegucigalpa","America/Managua","America/Costa_Rica","America/El_Salvador","America/Bogota","America/Caracas","America/Guayaquil","America/Lima","America/La_Paz","America/Asuncion","America/Montevideo","America/Santiago","America/Punta_Arenas","Pacific/Easter","America/Argentina/Buenos_Aires","America/Argentina/Cordoba","America/Argentina/Salta","America/Argentina/Jujuy","America/Argentina/Tucuman","America/Argentina/Catamarca","America/Argentina/La_Rioja","America/Argentina/San_Juan","America/Argentina/Mendoza","America/Argentina/San_Luis","America/Argentina/Rio_Gallegos","America/Argentina/Ushuaia"]),d=new Set(["America/New_York","America/Detroit","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Indiana/Indianapolis","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Vevay","America/Indiana/Tell_City","America/Indiana/Knox","America/Chicago","America/Menominee","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/North_Dakota/Beulah","America/Denver","America/Boise","America/Phoenix","America/Los_Angeles","America/Anchorage","America/Juneau","America/Sitka","America/Metlakatla","America/Yakutat","America/Nome","America/Adak","Pacific/Honolulu","America/Toronto","America/Vancouver","America/Edmonton","America/Winnipeg","America/Halifax","America/St_Johns","America/Regina","America/Whitehorse","Europe/London","Europe/Belfast","Europe/Dublin","Australia/Sydney","Australia/Melbourne","Australia/Brisbane","Australia/Perth","Australia/Adelaide","Australia/Hobart","Australia/Darwin","Pacific/Auckland"]);function g(){try{let a=Intl.DateTimeFormat().resolvedOptions().timeZone;if(!a)return;if(A.has(a))return"zht";if(s.has(a))return"zh";if(m.has(a))return"ja";if(u.has(a))return"ru";if(l.has(a))return"fr";if(h.has(a))return"es";if(d.has(a))return"en"}catch{}return}function f(){let a=g();if(a)return a;for(let t of["LC_ALL","LC_MESSAGES","LANG","LANGUAGE"]){let e=process.env[t];if(!e)continue;for(let r of e.split(":")){let i=r.replace(/[.@].*$/,"").replace(/_/g,"-").toLowerCase();if(!i||i==="c"||i==="posix")continue;let n=o.find((c)=>c.test(i));if(n)return n.locale}}try{let t=Intl.DateTimeFormat().resolvedOptions().locale.toLowerCase(),e=o.find((r)=>r.test(t));if(e)return e.locale}catch{}return"en"}
|
|
3
|
-
export{f as
|
|
3
|
+
export{f as K};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
function i(f,r){let e=JSON.parse(JSON.stringify(f));if("nullable"in e&&e.nullable===!0){if(e.type)if(Array.isArray(e.type)){if(!e.type.includes("null"))e.type.push("null")}else e.type=[e.type,"null"];else e.type=["null"];delete e.nullable}if(e.$schema)delete e.$schema;if(["properties","additionalProperties","items","additionalItems","allOf","anyOf","oneOf","not","if","then","else","definitions","$defs","patternProperties","propertyNames","contains"].forEach((s)=>{if(e[s]&&(typeof e[s]==="object"||Array.isArray(e[s])))if(s==="properties"||s==="definitions"||s==="$defs"||s==="patternProperties")for(let n in e[s])e[s][n]=i(e[s][n],r);else if(s==="allOf"||s==="anyOf"||s==="oneOf")e[s]=e[s].map((n)=>i(n,r));else if(s==="items")if(Array.isArray(e[s]))e[s]=e[s].map((n)=>i(n,r));else e[s]=i(e[s],r);else e[s]=i(e[s],r)}),e.ref||e.$id){let{ref:s,$id:n,...t}=e,a=s||n;return r.components.schemas={...r.components.schemas,[a]:t},{$ref:`#/components/schemas/${a}`}}else if(e.$ref){let{$ref:s,$defs:n,...t}=e;if(s.includes("://"))return Object.keys(t).length>0?t:{type:"string"};let a=s.split("/").pop();return r.components.schemas={...r.components.schemas,...n},{$ref:`#/components/schemas/${a}`}}return e}
|
|
3
|
-
export{i as
|
|
3
|
+
export{i as Df};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{$ as
|
|
2
|
+
import{aq as J}from"./chunk-1sgby720.js";import{Eu as H,Fu as I,Gu as N,Qu as Q}from"./chunk-whxjkz9a.js";import{dQ as L}from"./chunk-aztre27e.js";import{platform as R,release as U}from"os";import{tmpdir as V}from"os";import X from"path";import Y from"fs/promises";var Z=J(async()=>{let{which:D}=await import("./chunk-hxgs0d4t.js");return D}),T=J(async()=>{let{default:D}=await import("./chunk-h0rpmne5.js");return D});function _(D){if(!process.stdout.isTTY)return;let A=`\x1B]52;c;${Buffer.from(D).toString("base64")}\x07`,E=process.env.TMUX||process.env.STY?`\x1BPtmux;\x1B${A}\x1B\\`:A;process.stdout.write(E)}async function $(){let D=R();if(D==="darwin"){let k=X.join(V(),"qitqode-clipboard.png");try{return await I(["osascript","-e",'set imageData to the clipboard as "PNGf"',"-e",`set fileRef to open for access POSIX file "${k}" with write permission`,"-e","set eof fileRef to 0","-e","write imageData to fileRef","-e","close access fileRef"],{nothrow:!0}),{data:(await Q(k)).toString("base64"),mime:"image/png"}}catch{}finally{await Y.rm(k,{force:!0}).catch(()=>{})}}if(D==="win32"||U().includes("WSL")){let E=await N(["powershell.exe","-NonInteractive","-NoProfile","-command","Add-Type -AssemblyName System.Windows.Forms; $img = [System.Windows.Forms.Clipboard]::GetImage(); if ($img) { $ms = New-Object System.IO.MemoryStream; $img.Save($ms, [System.Drawing.Imaging.ImageFormat]::Png); [System.Convert]::ToBase64String($ms.ToArray()) }"],{nothrow:!0});if(E.text){let K=Buffer.from(E.text.trim(),"base64");if(K.length>0)return{data:K.toString("base64"),mime:"image/png"}}}if(D==="linux"){let k=await I(["wl-paste","-t","image/png"],{nothrow:!0});if(k.stdout.byteLength>0)return{data:Buffer.from(k.stdout).toString("base64"),mime:"image/png"};let E=await I(["xclip","-selection","clipboard","-t","image/png","-o"],{nothrow:!0});if(E.stdout.byteLength>0)return{data:Buffer.from(E.stdout).toString("base64"),mime:"image/png"}}let A=await(await T()).read().catch(()=>{});if(A)return{data:A,mime:"text/plain"}}var j=J(async()=>{let D=R(),G=await Z();if(D==="darwin"&&G("osascript"))return console.log("clipboard: using osascript"),async(A)=>{let k=A.replace(/\\/g,"\\\\").replace(/"/g,"\\\"");await I(["osascript","-e",`set the clipboard to "${k}"`],{nothrow:!0})};if(D==="linux"){if(process.env.WAYLAND_DISPLAY&&G("wl-copy"))return console.log("clipboard: using wl-copy"),async(A)=>{let k=H(["wl-copy"],{stdin:"pipe",stdout:"ignore",stderr:"ignore"});if(!k.stdin)return;k.stdin.write(A),k.stdin.end(),await k.exited.catch(()=>{})};if(G("xclip"))return console.log("clipboard: using xclip"),async(A)=>{let k=H(["xclip","-selection","clipboard"],{stdin:"pipe",stdout:"ignore",stderr:"ignore"});if(!k.stdin)return;k.stdin.write(A),k.stdin.end(),await k.exited.catch(()=>{})};if(G("xsel"))return console.log("clipboard: using xsel"),async(A)=>{let k=H(["xsel","--clipboard","--input"],{stdin:"pipe",stdout:"ignore",stderr:"ignore"});if(!k.stdin)return;k.stdin.write(A),k.stdin.end(),await k.exited.catch(()=>{})}}if(D==="win32")return console.log("clipboard: using powershell"),async(A)=>{let k=H(["powershell.exe","-NonInteractive","-NoProfile","-Command","[Console]::InputEncoding = [System.Text.Encoding]::UTF8; Set-Clipboard -Value ([Console]::In.ReadToEnd())"],{stdin:"pipe",stdout:"ignore",stderr:"ignore"});if(!k.stdin)return;k.stdin.write(A),k.stdin.end(),await k.exited.catch(()=>{})};return console.log("clipboard: no native support"),async(A)=>{await(await T()).write(A).catch(()=>{})}});async function v(D){_(D),await(await j())(D)}
|
|
3
|
+
export{$ as ud,v as vd};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Ed as p}from"./chunk-pdzpfkt0.js";import{Fd as x,Gd as b,Id as w,Jd as v,Kd as c}from"./chunk-jje0srjq.js";import"./chunk-27yxgy03.js";import{Rd as g}from"./chunk-yajd975f.js";import{Vf as r}from"./chunk-7ppd2phw.js";import{hh as m}from"./chunk-612f97vv.js";import"./chunk-0nj8axbw.js";import"./chunk-p68rwmhc.js";import"./chunk-0a0vat1h.js";import"./chunk-z8v2tsz2.js";import"./chunk-j8efst22.js";import"./chunk-a1pw9r6f.js";import"./chunk-d5bxan80.js";import{Cl as f,kk as y}from"./chunk-8tc8x27z.js";import"./chunk-k7g3h9tn.js";import"./chunk-rmr38x2f.js";import"./chunk-5syxjhg3.js";import"./chunk-nj4d554m.js";import"./chunk-1t6bvbgy.js";import"./chunk-cmbxrgyx.js";import"./chunk-a1p2f16h.js";import"./chunk-nt4e3em9.js";import"./chunk-hk698g9e.js";import"./chunk-v965rsr8.js";import"./chunk-1sgby720.js";import"./chunk-5g8108nf.js";import"./chunk-4tbwha3m.js";import"./chunk-m612agnk.js";import"./chunk-yq3m8190.js";import"./chunk-btz9jvec.js";import"./chunk-cqtkxwd8.js";import"./chunk-fkgv2hqd.js";import"./chunk-zyhdxggp.js";import"./chunk-q6ztpfcs.js";import"./chunk-jm1ptn8n.js";import"./chunk-c5e6sk9c.js";import"./chunk-m02zt1a3.js";import"./chunk-vg2fmyje.js";import"./chunk-fzna6jdj.js";import"./chunk-x1rx6fm7.js";import"./chunk-4qqkqrn9.js";import"./chunk-j6emx6jn.js";import"./chunk-be216spx.js";import"./chunk-12bssxd4.js";import"./chunk-24xc0dvv.js";import"./chunk-ebrt1me3.js";import"./chunk-whxjkz9a.js";import"./chunk-89v6dgpp.js";import"./chunk-k309zez0.js";import"./chunk-09kba1hg.js";import"./chunk-t12xrrfr.js";import"./chunk-phxrg7aw.js";import"./chunk-snm5q21k.js";import"./chunk-xpc2zgj7.js";import"./chunk-qjjch1zt.js";import"./chunk-aztre27e.js";import{EOL as S}from"os";function s(e,t,i){return i.trim()?`[redacted:${e}:${t}]`:i}function o(e,t,i){if(!i)return i;return Object.keys(i).length?{redacted:`${e}:${t}`}:i}function a(e,t){return{...t,value:s("file-text",e,t.value)}}function l(e,t){return t?.map((i,u)=>({...i,file:s(`${e}-file`,String(u),i.file),patch:s(`${e}-patch`,String(u),i.patch)}))}function I(e){if(!e.source)return e.source;if(e.source.type==="symbol")return{...e.source,path:s("file-path",e.id,e.source.path),name:s("file-symbol",e.id,e.source.name),text:a(e.id,e.source.text)};if(e.source.type==="resource")return{...e.source,clientName:s("file-client",e.id,e.source.clientName),uri:s("file-uri",e.id,e.source.uri),text:a(e.id,e.source.text)};return{...e.source,path:s("file-path",e.id,e.source.path),text:a(e.id,e.source.text)}}function h(e){return{...e,url:s("file-url",e.id,e.url),filename:e.filename===void 0?void 0:s("file-name",e.id,e.filename),source:I(e)}}function $(e){switch(e.type){case"text":return{...e,text:s("text",e.id,e.text),metadata:o("text-metadata",e.id,e.metadata)};case"reasoning":return{...e,text:s("reasoning",e.id,e.text),metadata:o("reasoning-metadata",e.id,e.metadata)};case"file":return h(e);case"subtask":return{...e,prompt:s("subtask-prompt",e.id,e.prompt),description:s("subtask-description",e.id,e.description),command:e.command===void 0?void 0:s("subtask-command",e.id,e.command)};case"tool":return{...e,metadata:o("tool-metadata",e.id,e.metadata),state:e.state.status==="pending"?{...e.state,input:o("tool-input",e.id,e.state.input)??e.state.input,raw:s("tool-raw",e.id,e.state.raw)}:e.state.status==="running"?{...e.state,input:o("tool-input",e.id,e.state.input)??e.state.input,title:e.state.title===void 0?void 0:s("tool-title",e.id,e.state.title),metadata:o("tool-state-metadata",e.id,e.state.metadata)}:e.state.status==="completed"?{...e.state,input:o("tool-input",e.id,e.state.input)??e.state.input,output:s("tool-output",e.id,e.state.output),title:s("tool-title",e.id,e.state.title),metadata:o("tool-state-metadata",e.id,e.state.metadata)??e.state.metadata,attachments:e.state.attachments?.map(h)}:{...e.state,input:o("tool-input",e.id,e.state.input)??e.state.input,metadata:o("tool-state-metadata",e.id,e.state.metadata)}};case"patch":return{...e,hash:s("patch",e.id,e.hash),files:e.files.map((t,i)=>s("patch-file",`${e.id}-${i}`,t))};case"snapshot":return{...e,snapshot:s("snapshot",e.id,e.snapshot)};case"step-start":return{...e,snapshot:e.snapshot===void 0?void 0:s("snapshot",e.id,e.snapshot)};case"step-finish":return{...e,snapshot:e.snapshot===void 0?void 0:s("snapshot",e.id,e.snapshot)};case"agent":return{...e,source:!e.source?e.source:{...e.source,value:s("agent-source",e.id,e.source.value)}};default:return e}}var D=$;function P(e){return{info:{...e.info,title:s("session-title",e.info.id,e.info.title),directory:s("session-directory",e.info.id,e.info.directory),summary:!e.info.summary?e.info.summary:{...e.info.summary,diffs:l("session-diff",e.info.summary.diffs)},revert:!e.info.revert?e.info.revert:{...e.info.revert,snapshot:e.info.revert.snapshot===void 0?void 0:s("revert-snapshot",e.info.id,e.info.revert.snapshot),diff:e.info.revert.diff===void 0?void 0:s("revert-diff",e.info.id,e.info.revert.diff)}},messages:e.messages.map((t)=>({info:t.info.role==="user"?{...t.info,system:t.info.system===void 0?void 0:s("system",t.info.id,t.info.system),summary:!t.info.summary?t.info.summary:{...t.info.summary,title:t.info.summary.title===void 0?void 0:s("summary-title",t.info.id,t.info.summary.title),body:t.info.summary.body===void 0?void 0:s("summary-body",t.info.id,t.info.summary.body),diffs:l("message-diff",t.info.summary.diffs)}}:{...t.info,path:{cwd:s("cwd",t.info.id,t.info.path.cwd),root:s("root",t.info.id,t.info.path.root)}},parts:t.parts.map(D)}))}}var A=g({command:"export [sessionID]",describe:"export session data as JSON",builder:(e)=>{return e.positional("sessionID",{describe:"session id to export",type:"string"}).option("sanitize",{describe:"redact sensitive transcript and file data",type:"boolean"})},handler:async(e)=>{await p(process.cwd(),async()=>{let t=e.sessionID?y.make(e.sessionID):void 0;if(process.stderr.write(`Exporting session: ${t??"latest"}
|
|
3
3
|
`),!t){r.empty(),v("Export session",{output:process.stderr});let i=[];for await(let n of f.list())i.push(n);if(i.length===0){w.error("No sessions found",{output:process.stderr}),c("Done",{output:process.stderr});return}i.sort((n,d)=>d.time.updated-n.time.updated);let u=await b({message:"Select session to export",maxItems:10,options:i.map((n)=>({label:n.title,value:n.id,hint:`${new Date(n.time.updated).toLocaleString()} \u2022 ${n.id.slice(-8)}`})),output:process.stderr});if(x(u))throw new r.CancelledError;t=u,c("Exporting session...",{output:process.stderr})}try{let i=await m.runPromise(f.Service.use((d)=>d.get(t))),u=await m.runPromise(f.Service.use((d)=>d.messages({sessionID:i.id,agentID:"*"}))),n={info:i,messages:u};process.stdout.write(JSON.stringify(e.sanitize?P(n):n,null,2)),process.stdout.write(S)}catch{r.error(`Session not found: ${t}`),process.exit(1)}})}});export{A as ExportCommand};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Cf as l}from"./chunk-a2qz9m10.js";import"./chunk-ywkvq7zb.js";import{Hg as q}from"./chunk-4amgp4yd.js";import"./chunk-nfg7nt13.js";import"./chunk-scnz207s.js";import{dQ as C}from"./chunk-aztre27e.js";function J(){return async(f,b)=>{if("_zod"in f)return l()(f,{components:b.components,options:{io:"input",...b.options}});try{let{createSchema:w}=await import("./chunk-kqn9h2gk.js"),{schema:B,components:k}=w(f,{schemaType:"input",...b.options});if(k)b.components.schemas={...b.components.schemas,...k};return B}catch{throw Error(q('Missing dependencies "zod-openapi v4".'))}}}export{J as default};
|
|
@@ -5,4 +5,4 @@ Lifetime used`):new P("Lifetime not alive")}},J=class extends Q{constructor(W,Y)
|
|
|
5
5
|
Then, failed to dispose scope: ${Z.message}`,disposeError:Z}),Y;if(Y||Z)throw Y||Z}var z=class W extends q{constructor(){super(...arguments);this._disposables=new Q(new Set),this.manage=(Y)=>(this._disposables.value.add(Y),Y)}static withScope(Y){let Z=new W,$;try{return Y(Z)}catch(X){throw $=X,X}finally{E(Z,$)}}static withScopeMaybeAsync(Y,Z){return XW(void 0,function*($){let X=new W,j;try{return yield*$.of(Z.call(Y,$,X))}catch(G){throw j=G,G}finally{E(X,j)}})}static async withScopeAsync(Y){let Z=new W,$;try{return await Y(Z)}catch(X){throw $=X,X}finally{E(Z,$)}}get alive(){return this._disposables.alive}dispose(){let Y=Array.from(this._disposables.value.values()).reverse();for(let Z of Y)Z.alive&&Z.dispose();this._disposables.dispose()}};function jW(W){let Y=W?Array.from(W):[];function Z(){return Y.forEach((X)=>X.alive?X.dispose():void 0)}function $(){return Y.some((X)=>X.alive)}return Object.defineProperty(Y,S,{configurable:!0,enumerable:!1,value:Z}),Object.defineProperty(Y,"dispose",{configurable:!0,enumerable:!1,value:Z}),Object.defineProperty(Y,"alive",{configurable:!0,enumerable:!1,get:$}),Y}function F(W){return!!(W&&(typeof W=="object"||typeof W=="function")&&("alive"in W)&&typeof W.alive=="boolean"&&("dispose"in W)&&typeof W.dispose=="function")}var f=class W extends q{static success(Y){return new KW(Y)}static fail(Y,Z){return new GW(Y,Z)}static is(Y){return Y instanceof W}},KW=class extends f{constructor(W){super();this.value=W}get alive(){return F(this.value)?this.value.alive:!0}dispose(){F(this.value)&&this.value.dispose()}unwrap(){return this.value}unwrapOr(W){return this.value}},GW=class extends f{constructor(W,Y){super();this.error=W,this.onUnwrap=Y}get alive(){return F(this.error)?this.error.alive:!0}dispose(){F(this.error)&&this.error.dispose()}unwrap(){throw this.onUnwrap(this),this.error}unwrapOr(W){return W}},w=f,VW=class extends q{constructor(W){super();this.resolve=(Y)=>{this.resolveHandle.alive&&(this.context.unwrapResult(this.context.callFunction(this.resolveHandle,this.context.undefined,Y||this.context.undefined)).dispose(),this.disposeResolvers(),this.onSettled())},this.reject=(Y)=>{this.rejectHandle.alive&&(this.context.unwrapResult(this.context.callFunction(this.rejectHandle,this.context.undefined,Y||this.context.undefined)).dispose(),this.disposeResolvers(),this.onSettled())},this.dispose=()=>{this.handle.alive&&this.handle.dispose(),this.disposeResolvers()},this.context=W.context,this.owner=W.context.runtime,this.handle=W.promiseHandle,this.settled=new Promise((Y)=>{this.onSettled=Y}),this.resolveHandle=W.resolveHandle,this.rejectHandle=W.rejectHandle}get alive(){return this.handle.alive||this.resolveHandle.alive||this.rejectHandle.alive}disposeResolvers(){this.resolveHandle.alive&&this.resolveHandle.dispose(),this.rejectHandle.alive&&this.rejectHandle.dispose()}},t=class{constructor(W){this.module=W}toPointerArray(W){let Y=new Int32Array(W.map((X)=>X.value)),Z=Y.length*Y.BYTES_PER_ELEMENT,$=this.module._malloc(Z);return new Uint8Array(this.module.HEAPU8.buffer,$,Z).set(new Uint8Array(Y.buffer)),new Q($,void 0,(X)=>this.module._free(X))}newTypedArray(W,Y){let Z=new W(Array(Y).fill(0)),$=Z.length*Z.BYTES_PER_ELEMENT,X=this.module._malloc($),j=new W(this.module.HEAPU8.buffer,X,Y);return j.set(Z),new Q({typedArray:j,ptr:X},void 0,(G)=>this.module._free(G.ptr))}newMutablePointerArray(W){return this.newTypedArray(Int32Array,W)}newHeapCharPointer(W){let Y=this.module.lengthBytesUTF8(W),Z=Y+1,$=this.module._malloc(Z);return this.module.stringToUTF8(W,$,Z),new Q({ptr:$,strlen:Y},void 0,(X)=>this.module._free(X.ptr))}newHeapBufferPointer(W){let Y=W.byteLength,Z=this.module._malloc(Y);return this.module.HEAPU8.set(W,Z),new Q({pointer:Z,numBytes:Y},void 0,($)=>this.module._free($.pointer))}consumeHeapCharPointer(W){let Y=this.module.UTF8ToString(W);return this.module._free(W),Y}},FW=Symbol("Unstable"),OW=Object.freeze({BaseObjects:!0,Date:!0,Eval:!0,StringNormalize:!0,RegExp:!0,JSON:!0,Proxy:!0,MapSet:!0,TypedArrays:!0,Promise:!0});function TW(W){if(!W)return 0;let Y=0;for(let[Z,$]of Object.entries(W)){if(!(Z in O))throw new n(Z);$&&(Y|=O[Z])}return Y}function QW(W){if(typeof W=="number")return W;if(W===void 0)return 0;let{type:Y,strict:Z,strip:$,compileOnly:X,backtraceBarrier:j}=W,G=0;return Y==="global"&&(G|=L.JS_EVAL_TYPE_GLOBAL),Y==="module"&&(G|=L.JS_EVAL_TYPE_MODULE),Z&&(G|=L.JS_EVAL_FLAG_STRICT),$&&(G|=L.JS_EVAL_FLAG_STRIP),X&&(G|=L.JS_EVAL_FLAG_COMPILE_ONLY),j&&(G|=L.JS_EVAL_FLAG_BACKTRACE_BARRIER),G}function zW(W){if(typeof W=="number")return W;if(W===void 0)return 0;let{strings:Y,symbols:Z,quickjsPrivate:$,onlyEnumerable:X,numbers:j,numbersAsStrings:G}=W,K=0;return Y&&(K|=U.JS_GPN_STRING_MASK),Z&&(K|=U.JS_GPN_SYMBOL_MASK),$&&(K|=U.JS_GPN_PRIVATE_MASK),X&&(K|=U.JS_GPN_ENUM_ONLY),j&&(K|=U.QTS_GPN_NUMBER_MASK),G&&(K|=U.QTS_STANDARD_COMPLIANT_NUMBER),K}function qW(...W){let Y=[];for(let Z of W)Z!==void 0&&(Y=Y.concat(Z));return Y}var CW=class extends q{constructor(W,Y){super();this.handle=W,this.context=Y,this._isDone=!1,this.owner=Y.runtime}[Symbol.iterator](){return this}next(W){if(!this.alive||this._isDone)return{done:!0,value:void 0};let Y=this._next??(this._next=this.context.getProp(this.handle,"next"));return this.callIteratorMethod(Y,W)}return(W){if(!this.alive)return{done:!0,value:void 0};let Y=this.context.getProp(this.handle,"return");if(Y===this.context.undefined&&W===void 0)return this.dispose(),{done:!0,value:void 0};let Z=this.callIteratorMethod(Y,W);return Y.dispose(),this.dispose(),Z}throw(W){if(!this.alive)return{done:!0,value:void 0};let Y=W instanceof Q?W:this.context.newError(W),Z=this.context.getProp(this.handle,"throw"),$=this.callIteratorMethod(Z,W);return Y.alive&&Y.dispose(),Z.dispose(),this.dispose(),$}get alive(){return this.handle.alive}dispose(){this._isDone=!0,this.handle.dispose(),this._next?.dispose()}callIteratorMethod(W,Y){let Z=Y?this.context.callFunction(W,this.handle,Y):this.context.callFunction(W,this.handle);if(Z.error)return this.dispose(),{value:Z};let $=this.context.getProp(Z.value,"done").consume((j)=>this.context.dump(j)),X=this.context.getProp(Z.value,"value");return Z.value.dispose(),$&&this.dispose(),{value:w.success(X),done:$}}},g=-2147483648,m=2147483647,A=0;function H(W){return W>>8}var BW=class{constructor(){this.nextId=g,this.freelist=[],this.groups=new Map}put(W){let Y=this.allocateId(),Z=H(Y),$=this.groups.get(Z);return $||($=new Map,this.groups.set(Z,$)),$.set(Y,W),Y}get(W){if(W===A)throw new C("no host reference id defined");let Y=H(W),Z=this.groups.get(Y);if(!Z)throw new C(`host reference id ${W} is not defined`);let $=Z.get(W);if(!$)throw new C(`host reference id ${W} is not defined`);return $}delete(W){if(W===A)throw new C("no host reference id defined");let Y=H(W),Z=this.groups.get(Y);if(!Z)throw new C(`host reference id ${W} is not defined`);Z.delete(W),Z.size===0&&this.groups.delete(Y),this.freelist.push(W)}allocateId(){if(this.freelist.length>0)return this.freelist.shift();if(this.nextId===A&&this.nextId++,this.nextId>m)throw new s(`HostRefMap: too many host refs created without disposing. Max simultaneous host refs: ${m-g}`);return this.nextId++}},c=class extends q{constructor(W,Y,Z){if(Z===A)throw new C("cannot create HostRef with undefined id");super();this.runtime=W,this.handle=Y,this.id=Z}get alive(){return this.handle.alive}dispose(){this.handle.dispose()}get value(){return this.runtime.hostRefs.get(this.id)}},LW=class extends t{constructor(W){super(W.module);this.scope=new z,this.copyJSValue=(Y)=>this.ffi.QTS_DupValuePointer(this.ctx.value,Y),this.freeJSValue=(Y)=>{this.ffi.QTS_FreeValuePointer(this.ctx.value,Y)},W.ownedLifetimes?.forEach((Y)=>this.scope.manage(Y)),this.owner=W.owner,this.module=W.module,this.ffi=W.ffi,this.rt=W.rt,this.ctx=this.scope.manage(W.ctx)}get alive(){return this.scope.alive}dispose(){return this.scope.dispose()}[Symbol.dispose](){return this.dispose()}manage(W){return this.scope.manage(W)}consumeJSCharPointer(W){let Y=this.module.UTF8ToString(W);return this.ffi.QTS_FreeCString(this.ctx.value,W),Y}heapValueHandle(W,Y){let Z=Y?($)=>{Y(),this.freeJSValue($)}:this.freeJSValue;return new Q(W,this.copyJSValue,Z,this.owner)}staticHeapValueHandle(W){return this.manage(this.heapValueHandle(W)),new J(W,this.owner)}},UW=class extends q{constructor(W){super();this._undefined=void 0,this._null=void 0,this._false=void 0,this._true=void 0,this._global=void 0,this._BigInt=void 0,this._Symbol=void 0,this._SymbolIterator=void 0,this._SymbolAsyncIterator=void 0,this.cToHostCallbacks={callFunction:(Y,Z,$,X,j)=>{if(Y!==this.ctx.value)throw Error("QuickJSContext instance received C -> JS call with mismatched ctx");let G=this.getFunction(j);return z.withScopeMaybeAsync(this,function*(K,V){let B=V.manage(new h(Z,this.memory.copyJSValue,this.memory.freeJSValue,this.runtime)),D=Array($);for(let T=0;T<$;T++){let M=this.ffi.QTS_ArgvGetJSValueConstPointer(X,T);D[T]=V.manage(new h(M,this.memory.copyJSValue,this.memory.freeJSValue,this.runtime))}try{let T=yield*K(G.apply(B,D));if(T){if("error"in T&&T.error)throw this.runtime.debugLog("throw error",T.error),T.error;let M=V.manage(T instanceof Q?T:T.value);return this.ffi.QTS_DupValuePointer(this.ctx.value,M.value)}return 0}catch(T){return this.errorToHandle(T).consume((M)=>this.ffi.QTS_Throw(this.ctx.value,M.value))}})}},this.runtime=W.runtime,this.module=W.module,this.ffi=W.ffi,this.rt=W.rt,this.ctx=W.ctx,this.memory=new LW({...W,owner:this.runtime}),W.callbacks.setContextCallbacks(this.ctx.value,this.cToHostCallbacks),this.dump=this.dump.bind(this),this.getString=this.getString.bind(this),this.getNumber=this.getNumber.bind(this),this.resolvePromise=this.resolvePromise.bind(this),this.uint32Out=this.memory.manage(this.memory.newTypedArray(Uint32Array,1))}get alive(){return this.memory.alive}dispose(){this.memory.dispose()}get undefined(){if(this._undefined)return this._undefined;let W=this.ffi.QTS_GetUndefined();return this._undefined=new J(W)}get null(){if(this._null)return this._null;let W=this.ffi.QTS_GetNull();return this._null=new J(W)}get true(){if(this._true)return this._true;let W=this.ffi.QTS_GetTrue();return this._true=new J(W)}get false(){if(this._false)return this._false;let W=this.ffi.QTS_GetFalse();return this._false=new J(W)}get global(){if(this._global)return this._global;let W=this.ffi.QTS_GetGlobalObject(this.ctx.value);return this._global=this.memory.staticHeapValueHandle(W),this._global}newNumber(W){return this.memory.heapValueHandle(this.ffi.QTS_NewFloat64(this.ctx.value,W))}newString(W){let Y=this.memory.newHeapCharPointer(W).consume((Z)=>this.ffi.QTS_NewString(this.ctx.value,Z.value.ptr));return this.memory.heapValueHandle(Y)}newUniqueSymbol(W){let Y=(typeof W=="symbol"?W.description:W)??"",Z=this.memory.newHeapCharPointer(Y).consume(($)=>this.ffi.QTS_NewSymbol(this.ctx.value,$.value.ptr,0));return this.memory.heapValueHandle(Z)}newSymbolFor(W){let Y=(typeof W=="symbol"?W.description:W)??"",Z=this.memory.newHeapCharPointer(Y).consume(($)=>this.ffi.QTS_NewSymbol(this.ctx.value,$.value.ptr,1));return this.memory.heapValueHandle(Z)}getWellKnownSymbol(W){return this._Symbol??(this._Symbol=this.memory.manage(this.getProp(this.global,"Symbol"))),this.getProp(this._Symbol,W)}newBigInt(W){if(!this._BigInt){let $=this.getProp(this.global,"BigInt");this.memory.manage($),this._BigInt=new J($.value,this.runtime)}let Y=this._BigInt,Z=String(W);return this.newString(Z).consume(($)=>this.unwrapResult(this.callFunction(Y,this.undefined,$)))}newObject(W){W&&this.runtime.assertOwned(W);let Y=W?this.ffi.QTS_NewObjectProto(this.ctx.value,W.value):this.ffi.QTS_NewObject(this.ctx.value);return this.memory.heapValueHandle(Y)}newArray(){let W=this.ffi.QTS_NewArray(this.ctx.value);return this.memory.heapValueHandle(W)}newArrayBuffer(W){let Y=new Uint8Array(W),Z=this.memory.newHeapBufferPointer(Y),$=this.ffi.QTS_NewArrayBuffer(this.ctx.value,Z.value.pointer,Y.length);return this.memory.heapValueHandle($)}newPromise(W){let Y=z.withScope((Z)=>{let $=Z.manage(this.memory.newMutablePointerArray(2)),X=this.ffi.QTS_NewPromiseCapability(this.ctx.value,$.value.ptr),j=this.memory.heapValueHandle(X),[G,K]=Array.from($.value.typedArray).map((V)=>this.memory.heapValueHandle(V));return new VW({context:this,promiseHandle:j,resolveHandle:G,rejectHandle:K})});return W&&typeof W=="function"&&(W=new Promise(W)),W&&Promise.resolve(W).then(Y.resolve,(Z)=>Z instanceof Q?Y.reject(Z):this.newError(Z).consume(Y.reject)),Y}newFunction(W,Y){let Z=typeof W=="function"?W:Y;if(!Z)throw TypeError("Expected a function");return this.newFunctionWithOptions({name:typeof W=="string"?W:void 0,length:Z.length,isConstructor:!1,fn:Z})}newConstructorFunction(W,Y){let Z=typeof W=="function"?W:Y;if(!Z)throw TypeError("Expected a function");return this.newFunctionWithOptions({name:typeof W=="string"?W:void 0,length:Z.length,isConstructor:!0,fn:Z})}newFunctionWithOptions(W){let{name:Y,length:Z,isConstructor:$,fn:X}=W,j=this.runtime.hostRefs.put(X);try{return this.memory.heapValueHandle(this.ffi.QTS_NewFunction(this.ctx.value,Y??"",Z,$,j))}catch(G){throw this.runtime.hostRefs.delete(j),G}}newError(W){let Y=this.memory.heapValueHandle(this.ffi.QTS_NewError(this.ctx.value));return W&&typeof W=="object"?(W.name!==void 0&&this.newString(W.name).consume((Z)=>this.setProp(Y,"name",Z)),W.message!==void 0&&this.newString(W.message).consume((Z)=>this.setProp(Y,"message",Z))):typeof W=="string"?this.newString(W).consume((Z)=>this.setProp(Y,"message",Z)):W!==void 0&&this.newString(String(W)).consume((Z)=>this.setProp(Y,"message",Z)),Y}newHostRef(W){let Y=this.runtime.hostRefs.put(W);try{let Z=this.memory.heapValueHandle(this.ffi.QTS_NewHostRef(this.ctx.value,Y));return new c(this.runtime,Z,Y)}catch(Z){throw this.runtime.hostRefs.delete(Y),Z}}toHostRef(W){let Y=this.ffi.QTS_GetHostRefId(W.value);if(Y!==0)return this.runtime.hostRefs.get(Y),new c(this.runtime,W.dup(),Y)}unwrapHostRef(W){let Y=this.ffi.QTS_GetHostRefId(W.value);if(Y===0)throw new C("handle is not a HostRef");return this.runtime.hostRefs.get(Y)}typeof(W){return this.runtime.assertOwned(W),this.memory.consumeHeapCharPointer(this.ffi.QTS_Typeof(this.ctx.value,W.value))}getNumber(W){return this.runtime.assertOwned(W),this.ffi.QTS_GetFloat64(this.ctx.value,W.value)}getString(W){return this.runtime.assertOwned(W),this.memory.consumeJSCharPointer(this.ffi.QTS_GetString(this.ctx.value,W.value))}getSymbol(W){this.runtime.assertOwned(W);let Y=this.memory.consumeJSCharPointer(this.ffi.QTS_GetSymbolDescriptionOrKey(this.ctx.value,W.value));return this.ffi.QTS_IsGlobalSymbol(this.ctx.value,W.value)?Symbol.for(Y):Symbol(Y)}getBigInt(W){this.runtime.assertOwned(W);let Y=this.getString(W);return BigInt(Y)}getArrayBuffer(W){this.runtime.assertOwned(W);let Y=this.ffi.QTS_GetArrayBufferLength(this.ctx.value,W.value),Z=this.ffi.QTS_GetArrayBuffer(this.ctx.value,W.value);if(!Z)throw Error("Couldn't allocate memory to get ArrayBuffer");return new Q(this.module.HEAPU8.subarray(Z,Z+Y),void 0,()=>this.module._free(Z))}getPromiseState(W){this.runtime.assertOwned(W);let Y=this.ffi.QTS_PromiseState(this.ctx.value,W.value);if(Y<0)return{type:"fulfilled",value:W,notAPromise:!0};if(Y===I.Pending)return{type:"pending",get error(){return new l("Cannot unwrap a pending promise")}};let Z=this.ffi.QTS_PromiseResult(this.ctx.value,W.value),$=this.memory.heapValueHandle(Z);if(Y===I.Fulfilled)return{type:"fulfilled",value:$};if(Y===I.Rejected)return{type:"rejected",error:$};throw $.dispose(),Error(`Unknown JSPromiseStateEnum: ${Y}`)}resolvePromise(W){this.runtime.assertOwned(W);let Y=z.withScope((Z)=>{let $=Z.manage(this.getProp(this.global,"Promise")),X=Z.manage(this.getProp($,"resolve"));return this.callFunction(X,$,W)});return Y.error?Promise.resolve(Y):new Promise((Z)=>{z.withScope(($)=>{let X=$.manage(this.newFunction("resolve",(V)=>{Z(this.success(V&&V.dup()))})),j=$.manage(this.newFunction("reject",(V)=>{Z(this.fail(V&&V.dup()))})),G=$.manage(Y.value),K=$.manage(this.getProp(G,"then"));this.callFunction(K,G,X,j).unwrap().dispose()})})}isEqual(W,Y,Z=R.IsStrictlyEqual){if(W===Y)return!0;this.runtime.assertOwned(W),this.runtime.assertOwned(Y);let $=this.ffi.QTS_IsEqual(this.ctx.value,W.value,Y.value,Z);if($===-1)throw new p("WASM variant does not expose equality");return!!$}eq(W,Y){return this.isEqual(W,Y,R.IsStrictlyEqual)}sameValue(W,Y){return this.isEqual(W,Y,R.IsSameValue)}sameValueZero(W,Y){return this.isEqual(W,Y,R.IsSameValueZero)}getProp(W,Y){this.runtime.assertOwned(W);let Z;return typeof Y=="number"&&Y>=0?Z=this.ffi.QTS_GetPropNumber(this.ctx.value,W.value,Y):Z=this.borrowPropertyKey(Y).consume(($)=>this.ffi.QTS_GetProp(this.ctx.value,W.value,$.value)),this.memory.heapValueHandle(Z)}getLength(W){if(this.runtime.assertOwned(W),!(this.ffi.QTS_GetLength(this.ctx.value,this.uint32Out.value.ptr,W.value)<0))return this.uint32Out.value.typedArray[0]}getOwnPropertyNames(W,Y={strings:!0,numbersAsStrings:!0}){this.runtime.assertOwned(W),W.value;let Z=zW(Y);if(Z===0)throw new o("No options set, will return an empty array");return z.withScope(($)=>{let X=$.manage(this.memory.newMutablePointerArray(1)),j=this.ffi.QTS_GetOwnPropertyNames(this.ctx.value,X.value.ptr,this.uint32Out.value.ptr,W.value,Z);if(j)return this.fail(this.memory.heapValueHandle(j));let G=this.uint32Out.value.typedArray[0],K=X.value.typedArray[0],V=new Uint32Array(this.module.HEAP8.buffer,K,G),B=Array.from(V).map((D)=>this.memory.heapValueHandle(D));return this.ffi.QTS_FreeVoidPointer(this.ctx.value,K),this.success(jW(B))})}getIterator(W){let Y=this._SymbolIterator??(this._SymbolIterator=this.memory.manage(this.getWellKnownSymbol("iterator")));return z.withScope((Z)=>{let $=Z.manage(this.getProp(W,Y)),X=this.callFunction($,W);return X.error?X:this.success(new CW(X.value,this))})}setProp(W,Y,Z){this.runtime.assertOwned(W),this.borrowPropertyKey(Y).consume(($)=>this.ffi.QTS_SetProp(this.ctx.value,W.value,$.value,Z.value))}defineProp(W,Y,Z){this.runtime.assertOwned(W),z.withScope(($)=>{let X=$.manage(this.borrowPropertyKey(Y)),j=Z.value||this.undefined,G=!!Z.configurable,K=!!Z.enumerable,V=!!Z.value,B=Z.get?$.manage(this.newFunction(Z.get.name,Z.get)):this.undefined,D=Z.set?$.manage(this.newFunction(Z.set.name,Z.set)):this.undefined;this.ffi.QTS_DefineProp(this.ctx.value,W.value,X.value,j.value,B.value,D.value,G,K,V)})}callFunction(W,Y,...Z){this.runtime.assertOwned(W);let $,X=Z[0];X===void 0||Array.isArray(X)?$=X??[]:$=Z;let j=this.memory.toPointerArray($).consume((K)=>this.ffi.QTS_Call(this.ctx.value,W.value,Y.value,$.length,K.value)),G=this.ffi.QTS_ResolveException(this.ctx.value,j);return G?(this.ffi.QTS_FreeValuePointer(this.ctx.value,j),this.fail(this.memory.heapValueHandle(G))):this.success(this.memory.heapValueHandle(j))}callMethod(W,Y,Z=[]){return this.getProp(W,Y).consume(($)=>this.callFunction($,W,Z))}evalCode(W,Y="eval.js",Z){let $=Z===void 0?1:0,X=QW(Z),j=this.memory.newHeapCharPointer(W).consume((K)=>this.ffi.QTS_Eval(this.ctx.value,K.value.ptr,K.value.strlen,Y,$,X)),G=this.ffi.QTS_ResolveException(this.ctx.value,j);return G?(this.ffi.QTS_FreeValuePointer(this.ctx.value,j),this.fail(this.memory.heapValueHandle(G))):this.success(this.memory.heapValueHandle(j))}throw(W){return this.errorToHandle(W).consume((Y)=>this.ffi.QTS_Throw(this.ctx.value,Y.value))}borrowPropertyKey(W){return typeof W=="number"?this.newNumber(W):typeof W=="string"?this.newString(W):new J(W.value,this.runtime)}getMemory(W){if(W===this.rt.value)return this.memory;throw Error("Private API. Cannot get memory from a different runtime")}dump(W){this.runtime.assertOwned(W);let Y=this.typeof(W);if(Y==="string")return this.getString(W);if(Y==="number")return this.getNumber(W);if(Y==="bigint")return this.getBigInt(W);if(Y==="undefined")return;if(Y==="symbol")return this.getSymbol(W);let Z=this.getPromiseState(W);if(Z.type==="fulfilled"&&!Z.notAPromise)return W.dispose(),{type:Z.type,value:Z.value.consume(this.dump)};if(Z.type==="pending")return W.dispose(),{type:Z.type};if(Z.type==="rejected")return W.dispose(),{type:Z.type,error:Z.error.consume(this.dump)};let $=this.memory.consumeJSCharPointer(this.ffi.QTS_Dump(this.ctx.value,W.value));try{return JSON.parse($)}catch{return $}}unwrapResult(W){if(W.error){let Y="context"in W.error?W.error.context:this,Z=W.error.consume(($)=>this.dump($));if(Z&&typeof Z=="object"&&typeof Z.message=="string"){let{message:$,name:X,stack:j,...G}=Z,K=new _(Z,Y);typeof X=="string"&&(K.name=Z.name),K.message=$;let V=K.stack;throw typeof j=="string"&&(K.stack=`${X}: ${$}
|
|
6
6
|
${Z.stack}Host: ${V}`),Object.assign(K,G),K}throw new _(Z)}return W.value}[Symbol.for("nodejs.util.inspect.custom")](){return this.alive?`${this.constructor.name} { ctx: ${this.ctx.value} rt: ${this.rt.value} }`:`${this.constructor.name} { disposed }`}getFunction(W){let Y=this.runtime.hostRefs.get(W);if(typeof Y!="function")throw Error(`Host reference ${W} is not a function`);return Y}errorToHandle(W){return W instanceof Q?W:this.newError(W)}encodeBinaryJSON(W){let Y=this.ffi.QTS_bjson_encode(this.ctx.value,W.value);return this.memory.heapValueHandle(Y)}decodeBinaryJSON(W){let Y=this.ffi.QTS_bjson_decode(this.ctx.value,W.value);return this.memory.heapValueHandle(Y)}success(W){return w.success(W)}fail(W){return w.fail(W,(Y)=>this.unwrapResult(Y))}},JW=class extends q{constructor(W){super();this.scope=new z,this.contextMap=new Map,this.hostRefs=new BW,this._debugMode=!1,this.cToHostCallbacks={freeHostRef:(Y,Z)=>{if(Y!==this.rt.value)throw Error("Runtime pointer mismatch");this.hostRefs.delete(Z)},shouldInterrupt:(Y)=>{if(Y!==this.rt.value)throw Error("QuickJSContext instance received C -> JS interrupt with mismatched rt");let Z=this.interruptHandler;if(!Z)throw Error("QuickJSContext had no interrupt handler");return Z(this)?1:0},loadModuleSource:v(this,function*(Y,Z,$,X){let j=this.moduleLoader;if(!j)throw Error("Runtime has no module loader");if(Z!==this.rt.value)throw Error("Runtime pointer mismatch");let G=this.contextMap.get($)??this.newContext({contextPointer:$});try{let K=yield*Y(j(X,G));if(typeof K=="object"&&"error"in K&&K.error)throw this.debugLog("cToHostLoadModule: loader returned error",K.error),K.error;let V=typeof K=="string"?K:("value"in K)?K.value:K;return this.memory.newHeapCharPointer(V).value.ptr}catch(K){return this.debugLog("cToHostLoadModule: caught error",K),G.throw(K),0}}),normalizeModule:v(this,function*(Y,Z,$,X,j){let G=this.moduleNormalizer;if(!G)throw Error("Runtime has no module normalizer");if(Z!==this.rt.value)throw Error("Runtime pointer mismatch");let K=this.contextMap.get($)??this.newContext({contextPointer:$});try{let V=yield*Y(G(X,j,K));if(typeof V=="object"&&"error"in V&&V.error)throw this.debugLog("cToHostNormalizeModule: normalizer returned error",V.error),V.error;let B=typeof V=="string"?V:V.value;return K.getMemory(this.rt.value).newHeapCharPointer(B).value.ptr}catch(V){return this.debugLog("normalizeModule: caught error",V),K.throw(V),0}})},W.ownedLifetimes?.forEach((Y)=>this.scope.manage(Y)),this.module=W.module,this.memory=new t(this.module),this.ffi=W.ffi,this.rt=W.rt,this.callbacks=W.callbacks,this.scope.manage(this.rt),this.callbacks.setRuntimeCallbacks(this.rt.value,this.cToHostCallbacks),this.executePendingJobs=this.executePendingJobs.bind(this),x&&this.setDebugMode(!0)}get alive(){return this.scope.alive}dispose(){return this.scope.dispose()}newContext(W={}){let Y=TW(W.intrinsics),Z=new Q(W.contextPointer||this.ffi.QTS_NewContext(this.rt.value,Y),void 0,(X)=>{this.contextMap.delete(X),this.callbacks.deleteContext(X),this.ffi.QTS_FreeContext(X)}),$=new UW({module:this.module,ctx:Z,ffi:this.ffi,rt:this.rt,ownedLifetimes:W.ownedLifetimes,runtime:this,callbacks:this.callbacks});return this.contextMap.set(Z.value,$),$}setModuleLoader(W,Y){this.moduleLoader=W,this.moduleNormalizer=Y,this.ffi.QTS_RuntimeEnableModuleLoader(this.rt.value,this.moduleNormalizer?1:0)}removeModuleLoader(){this.moduleLoader=void 0,this.ffi.QTS_RuntimeDisableModuleLoader(this.rt.value)}hasPendingJob(){return!!this.ffi.QTS_IsJobPending(this.rt.value)}setInterruptHandler(W){let Y=this.interruptHandler;this.interruptHandler=W,Y||this.ffi.QTS_RuntimeEnableInterruptHandler(this.rt.value)}removeInterruptHandler(){this.interruptHandler&&(this.ffi.QTS_RuntimeDisableInterruptHandler(this.rt.value),this.interruptHandler=void 0)}executePendingJobs(W=-1){let Y=this.memory.newMutablePointerArray(1),Z=this.ffi.QTS_ExecutePendingJob(this.rt.value,W??-1,Y.value.ptr),$=Y.value.typedArray[0];if(Y.dispose(),$===0)return this.ffi.QTS_FreeValuePointerRuntime(this.rt.value,Z),w.success(0);let X=this.contextMap.get($)??this.newContext({contextPointer:$}),j=X.getMemory(this.rt.value).heapValueHandle(Z);if(X.typeof(j)==="number"){let G=X.getNumber(j);return j.dispose(),w.success(G)}else{let G=Object.assign(j,{context:X});return w.fail(G,(K)=>X.unwrapResult(K))}}setMemoryLimit(W){if(W<0&&W!==-1)throw Error("Cannot set memory limit to negative number. To unset, pass -1");this.ffi.QTS_RuntimeSetMemoryLimit(this.rt.value,W)}computeMemoryUsage(){let W=this.getSystemContext().getMemory(this.rt.value);return W.heapValueHandle(this.ffi.QTS_RuntimeComputeMemoryUsage(this.rt.value,W.ctx.value))}dumpMemoryUsage(){return this.memory.consumeHeapCharPointer(this.ffi.QTS_RuntimeDumpMemoryUsage(this.rt.value))}setMaxStackSize(W){if(W<0)throw Error("Cannot set memory limit to negative number. To unset, pass 0.");this.ffi.QTS_RuntimeSetMaxStackSize(this.rt.value,W)}assertOwned(W){if(W.owner&&W.owner.rt!==this.rt)throw new u(`Handle is not owned by this runtime: ${W.owner.rt.value} != ${this.rt.value}`)}setDebugMode(W){this._debugMode=W,this.ffi.DEBUG&&this.rt.alive&&this.ffi.QTS_SetDebugLogEnabled(this.rt.value,W?1:0)}isDebugMode(){return this._debugMode}debugLog(...W){this._debugMode&&console.log("quickjs-emscripten:",...W)}[Symbol.for("nodejs.util.inspect.custom")](){return this.alive?`${this.constructor.name} { rt: ${this.rt.value} }`:`${this.constructor.name} { disposed }`}getSystemContext(){return this.context||(this.context=this.scope.manage(this.newContext())),this.context}},DW=class{constructor(W){this.freeHostRef=W.freeHostRef,this.callFunction=W.callFunction,this.shouldInterrupt=W.shouldInterrupt,this.loadModuleSource=W.loadModuleSource,this.normalizeModule=W.normalizeModule}},wW=class{constructor(W){this.contextCallbacks=new Map,this.runtimeCallbacks=new Map,this.suspendedCount=0,this.cToHostCallbacks=new DW({freeHostRef:(Y,Z,$)=>{let X=this.runtimeCallbacks.get(Z);if(!X)throw Error(`QuickJSRuntime(rt = ${Z}) not found when trying to free HostRef(id = ${$})`);X.freeHostRef(Z,$)},callFunction:(Y,Z,$,X,j,G)=>this.handleAsyncify(Y,()=>{try{let K=this.contextCallbacks.get(Z);if(!K)throw Error(`QuickJSContext(ctx = ${Z}) not found for C function call "${G}"`);return K.callFunction(Z,$,X,j,G)}catch(K){return console.error("[C to host error: returning null]",K),0}}),shouldInterrupt:(Y,Z)=>this.handleAsyncify(Y,()=>{try{let $=this.runtimeCallbacks.get(Z);if(!$)throw Error(`QuickJSRuntime(rt = ${Z}) not found for C interrupt`);return $.shouldInterrupt(Z)}catch($){return console.error("[C to host interrupt: returning error]",$),1}}),loadModuleSource:(Y,Z,$,X)=>this.handleAsyncify(Y,()=>{try{let j=this.runtimeCallbacks.get(Z);if(!j)throw Error(`QuickJSRuntime(rt = ${Z}) not found for C module loader`);let G=j.loadModuleSource;if(!G)throw Error(`QuickJSRuntime(rt = ${Z}) does not support module loading`);return G(Z,$,X)}catch(j){return console.error("[C to host module loader error: returning null]",j),0}}),normalizeModule:(Y,Z,$,X,j)=>this.handleAsyncify(Y,()=>{try{let G=this.runtimeCallbacks.get(Z);if(!G)throw Error(`QuickJSRuntime(rt = ${Z}) not found for C module loader`);let K=G.normalizeModule;if(!K)throw Error(`QuickJSRuntime(rt = ${Z}) does not support module loading`);return K(Z,$,X,j)}catch(G){return console.error("[C to host module loader error: returning null]",G),0}})}),this.module=W,this.module.callbacks=this.cToHostCallbacks}setRuntimeCallbacks(W,Y){this.runtimeCallbacks.set(W,Y)}deleteRuntime(W){this.runtimeCallbacks.delete(W)}setContextCallbacks(W,Y){this.contextCallbacks.set(W,Y)}deleteContext(W){this.contextCallbacks.delete(W)}handleAsyncify(W,Y){if(W)return W.handleSleep(($)=>{try{let X=Y();if(!(X instanceof Promise)){N("asyncify.handleSleep: not suspending:",X),$(X);return}if(this.suspended)throw new d(`Already suspended at: ${this.suspended.stack}
|
|
7
7
|
Attempted to suspend at:`);this.suspended=new i(`(${this.suspendedCount++})`),N("asyncify.handleSleep: suspending:",this.suspended),X.then((j)=>{this.suspended=void 0,N("asyncify.handleSleep: resolved:",j),$(j)},(j)=>{N("asyncify.handleSleep: rejected:",j),console.error("QuickJS: cannot handle error in suspended function",j),this.suspended=void 0})}catch(X){throw N("asyncify.handleSleep: error:",X),this.suspended=void 0,X}});let Z=Y();if(Z instanceof Promise)throw Error("Promise return value not supported in non-asyncify context.");return Z}};function MW(W,Y){Y.interruptHandler&&W.setInterruptHandler(Y.interruptHandler),Y.maxStackSizeBytes!==void 0&&W.setMaxStackSize(Y.maxStackSizeBytes),Y.memoryLimitBytes!==void 0&&W.setMemoryLimit(Y.memoryLimitBytes)}function RW(W,Y){Y.moduleLoader&&W.setModuleLoader(Y.moduleLoader),Y.shouldInterrupt&&W.setInterruptHandler(Y.shouldInterrupt),Y.memoryLimitBytes!==void 0&&W.setMemoryLimit(Y.memoryLimitBytes),Y.maxStackSizeBytes!==void 0&&W.setMaxStackSize(Y.maxStackSizeBytes)}var EW=class{constructor(W,Y){this.module=W,this.ffi=Y,this.callbacks=new wW(W)}newRuntime(W={}){let Y=new Q(this.ffi.QTS_NewRuntime(),void 0,($)=>{this.ffi.QTS_FreeRuntime($),this.callbacks.deleteRuntime($)}),Z=new JW({module:this.module,callbacks:this.callbacks,ffi:this.ffi,rt:Y});return MW(Z,W),W.moduleLoader&&Z.setModuleLoader(W.moduleLoader),Z}newContext(W={}){let Y=this.newRuntime(),Z=Y.newContext({...W,ownedLifetimes:qW(Y,W.ownedLifetimes)});return Y.context=Z,Z}evalCode(W,Y={}){return z.withScope((Z)=>{let $=Z.manage(this.newContext());RW($.runtime,Y);let X=$.evalCode(W,"eval.js");if(Y.memoryLimitBytes!==void 0&&$.runtime.setMemoryLimit(-1),X.error)throw $.dump(Z.manage(X.error));return $.dump(Z.manage(X.value))})}getWasmMemory(){let W=this.module.quickjsEmscriptenInit?.(()=>{})?.getWasmMemory?.();if(!W)throw Error("Variant does not support getting WebAssembly.Memory");return W}getFFI(){return this.ffi}};
|
|
8
|
-
export{p as
|
|
8
|
+
export{p as di,Q as ei,z as fi,TW as gi,QW as hi,UW as ii,JW as ji,wW as ki,MW as li,RW as mi,EW as ni};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-kdcnder5.js";import"./chunk-aztre27e.js";var e={"ui.sessionReview.title":"\u4F1A\u8BDD\u53D8\u66F4","ui.sessionReview.title.lastTurn":"\u4E0A\u4E00\u8F6E\u53D8\u66F4","ui.sessionReview.diffStyle.unified":"\u7EDF\u4E00","ui.sessionReview.diffStyle.split":"\u62C6\u5206","ui.sessionReview.openFile":"\u6253\u5F00\u6587\u4EF6","ui.sessionReview.selection.line":"\u7B2C {{line}} \u884C","ui.sessionReview.selection.lines":"\u7B2C {{start}}-{{end}} \u884C","ui.sessionReview.expandAll":"\u5168\u90E8\u5C55\u5F00","ui.sessionReview.collapseAll":"\u5168\u90E8\u6536\u8D77","ui.sessionReview.change.added":"\u5DF2\u6DFB\u52A0","ui.sessionReview.change.removed":"\u5DF2\u79FB\u9664","ui.sessionReview.change.modified":"\u5DF2\u4FEE\u6539","ui.sessionReview.image.loading":"\u52A0\u8F7D\u4E2D...","ui.sessionReview.image.placeholder":"\u56FE\u7247","ui.sessionReview.largeDiff.title":"\u5DEE\u5F02\u8FC7\u5927\uFF0C\u65E0\u6CD5\u6E32\u67D3","ui.sessionReview.largeDiff.meta":"\u9650\u5236\uFF1A{{limit}} \u884C\u53D8\u66F4\u3002\u5F53\u524D\uFF1A{{current}} \u884C\u53D8\u66F4\u3002","ui.sessionReview.largeDiff.renderAnyway":"\u4ECD\u7136\u6E32\u67D3","ui.fileMedia.kind.image":"\u56FE\u7247","ui.fileMedia.kind.audio":"\u97F3\u9891","ui.fileMedia.state.removed":"{{kind}}\u5DF2\u79FB\u9664","ui.fileMedia.state.loading":"\u6B63\u5728\u52A0\u8F7D{{kind}}...","ui.fileMedia.state.error":"\u52A0\u8F7D{{kind}}\u5931\u8D25","ui.fileMedia.state.unavailable":"{{kind}}\u4E0D\u53EF\u9884\u89C8","ui.fileMedia.binary.title":"\u4E8C\u8FDB\u5236\u6587\u4EF6","ui.fileMedia.binary.description.path":"\u65E0\u6CD5\u663E\u793A {{path}}\uFF0C\u56E0\u4E3A\u5B83\u662F\u4E8C\u8FDB\u5236\u6587\u4EF6\u3002","ui.fileMedia.binary.description.default":"\u65E0\u6CD5\u663E\u793A\u6B64\u6587\u4EF6\uFF0C\u56E0\u4E3A\u5B83\u662F\u4E8C\u8FDB\u5236\u6587\u4EF6\u3002","ui.lineComment.label.prefix":"\u8BC4\u8BBA ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"\u6B63\u5728\u8BC4\u8BBA ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"\u6DFB\u52A0\u8BC4\u8BBA","ui.lineComment.submit":"\u8BC4\u8BBA","ui.sessionTurn.steps.show":"\u663E\u793A\u6B65\u9AA4","ui.sessionTurn.steps.hide":"\u9690\u85CF\u6B65\u9AA4","ui.sessionTurn.summary.response":"\u56DE\u590D","ui.sessionTurn.diff.showMore":"\u663E\u793A\u66F4\u591A\u66F4\u6539\uFF08{{count}}\uFF09","ui.sessionTurn.retry.retrying":"\u91CD\u8BD5\u4E2D","ui.sessionTurn.retry.inSeconds":"{{seconds}} \u79D2\u540E","ui.sessionTurn.retry.attempt":"\u7B2C {{attempt}} \u6B21","ui.sessionTurn.retry.attemptLine":"{{line}} - \u7B2C {{attempt}} \u6B21","ui.sessionTurn.retry.geminiHot":"gemini \u5F53\u524D\u8FC7\u8F7D","ui.sessionTurn.error.freeUsageExceeded":"\u514D\u8D39\u4F7F\u7528\u989D\u5EA6\u5DF2\u7528\u5B8C","ui.sessionTurn.error.addQredits":"\u6DFB\u52A0\u79EF\u5206","ui.sessionTurn.status.delegating":"\u6B63\u5728\u59D4\u6D3E\u5DE5\u4F5C","ui.sessionTurn.status.planning":"\u6B63\u5728\u89C4\u5212\u4E0B\u4E00\u6B65","ui.sessionTurn.status.gatheringContext":"\u6B63\u5728\u63A2\u7D22","ui.sessionTurn.status.gatheredContext":"\u5DF2\u63A2\u7D22","ui.sessionTurn.status.searchingCodebase":"\u6B63\u5728\u641C\u7D22\u4EE3\u7801\u5E93","ui.sessionTurn.status.searchingWeb":"\u6B63\u5728\u641C\u7D22\u7F51\u9875","ui.sessionTurn.status.makingEdits":"\u6B63\u5728\u4FEE\u6539","ui.sessionTurn.status.runningCommands":"\u6B63\u5728\u8FD0\u884C\u547D\u4EE4","ui.sessionTurn.status.thinking":"\u601D\u8003\u4E2D","ui.sessionTurn.status.thinkingWithTopic":"\u601D\u8003\uFF1A{{topic}}","ui.sessionTurn.status.gatheringThoughts":"\u6B63\u5728\u6574\u7406\u601D\u8DEF","ui.sessionTurn.status.consideringNextSteps":"\u6B63\u5728\u8003\u8651\u4E0B\u4E00\u6B65","ui.messagePart.questions.dismissed":"\u95EE\u9898\u5DF2\u5FFD\u7565","ui.messagePart.compaction":"\u4F1A\u8BDD\u5DF2\u538B\u7F29","ui.messagePart.context.read.one":"{{count}} \u6B21\u8BFB\u53D6","ui.messagePart.context.read.other":"{{count}} \u6B21\u8BFB\u53D6","ui.messagePart.context.search.one":"{{count}} \u6B21\u641C\u7D22","ui.messagePart.context.search.other":"{{count}} \u6B21\u641C\u7D22","ui.messagePart.context.list.one":"{{count}} \u4E2A\u5217\u8868","ui.messagePart.context.list.other":"{{count}} \u4E2A\u5217\u8868","ui.messagePart.diagnostic.error":"\u9519\u8BEF","ui.messagePart.title.edit":"\u7F16\u8F91","ui.messagePart.title.write":"\u5199\u5165","ui.messagePart.option.typeOwnAnswer":"\u8F93\u5165\u81EA\u5DF1\u7684\u7B54\u6848","ui.messagePart.review.title":"\u68C0\u67E5\u4F60\u7684\u7B54\u6848","ui.list.loading":"\u52A0\u8F7D\u4E2D","ui.list.empty":"\u65E0\u7ED3\u679C","ui.list.clearFilter":"\u6E05\u9664\u7B5B\u9009","ui.list.emptyWithFilter.prefix":"\u6CA1\u6709\u5173\u4E8E","ui.list.emptyWithFilter.suffix":"\u7684\u7ED3\u679C","ui.messageNav.newMessage":"\u65B0\u6D88\u606F","ui.textField.copyToClipboard":"\u590D\u5236\u5230\u526A\u8D34\u677F","ui.textField.copyLink":"\u590D\u5236\u94FE\u63A5","ui.textField.copied":"\u5DF2\u590D\u5236","ui.imagePreview.alt":"\u56FE\u7247\u9884\u89C8","ui.scrollView.ariaLabel":"\u53EF\u6EDA\u52A8\u5185\u5BB9","ui.tool.read":"\u8BFB\u53D6","ui.tool.loaded":"\u5DF2\u52A0\u8F7D","ui.tool.list":"\u5217\u8868","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Webfetch","ui.tool.websearch":"\u7F51\u7EDC\u641C\u7D22","ui.tool.codesearch":"\u4EE3\u7801\u641C\u7D22","ui.tool.shell":"Shell","ui.tool.patch":"\u8865\u4E01","ui.tool.todos":"\u5F85\u529E","ui.tool.todos.read":"\u8BFB\u53D6\u5F85\u529E","ui.tool.questions":"\u95EE\u9898","ui.tool.agent":"{{type}} \u667A\u80FD\u4F53","ui.tool.agent.default":"\u667A\u80FD\u4F53","ui.common.file.one":"\u4E2A\u6587\u4EF6","ui.common.file.other":"\u4E2A\u6587\u4EF6","ui.common.question.one":"\u4E2A\u95EE\u9898","ui.common.question.other":"\u4E2A\u95EE\u9898","ui.common.add":"\u6DFB\u52A0","ui.common.back":"\u8FD4\u56DE","ui.common.cancel":"\u53D6\u6D88","ui.common.confirm":"\u786E\u8BA4","ui.common.dismiss":"\u5FFD\u7565","ui.common.close":"\u5173\u95ED","ui.common.next":"\u4E0B\u4E00\u6B65","ui.common.submit":"\u63D0\u4EA4","ui.permission.deny":"\u62D2\u7EDD","ui.permission.allowAlways":"\u59CB\u7EC8\u5141\u8BB8","ui.permission.allowOnce":"\u5141\u8BB8\u4E00\u6B21","ui.message.expand":"\u5C55\u5F00\u6D88\u606F","ui.message.collapse":"\u6536\u8D77\u6D88\u606F","ui.message.copy":"\u590D\u5236","ui.message.copyMessage":"\u590D\u5236\u6D88\u606F","ui.message.forkMessage":"\u5206\u53C9\u5230\u65B0\u4F1A\u8BDD","ui.message.revertMessage":"\u91CD\u7F6E\u5230\u6B64\u70B9","ui.message.copyResponse":"\u590D\u5236\u56DE\u590D","ui.message.copied":"\u5DF2\u590D\u5236\uFF01","ui.message.interrupted":"\u5DF2\u4E2D\u65AD","ui.message.queued":"\u6392\u961F\u4E2D","ui.message.attachment.alt":"\u9644\u4EF6","ui.patch.action.deleted":"\u5DF2\u5220\u9664","ui.patch.action.created":"\u5DF2\u521B\u5EFA","ui.patch.action.moved":"\u5DF2\u79FB\u52A8","ui.patch.action.patched":"\u5DF2\u5E94\u7528\u8865\u4E01","ui.question.subtitle.answered":"{{count}} \u5DF2\u56DE\u7B54","ui.question.answer.none":"(\u65E0\u7B54\u6848)","ui.question.review.notAnswered":"(\u672A\u56DE\u7B54)","ui.question.multiHint":"\u53EF\u591A\u9009","ui.question.singleHint":"\u9009\u62E9\u4E00\u4E2A\u7B54\u6848","ui.question.custom.placeholder":"\u8F93\u5165\u4F60\u7684\u7B54\u6848...","ui.fileSearch.placeholder":"\u67E5\u627E","ui.fileSearch.previousMatch":"\u4E0A\u4E00\u4E2A","ui.fileSearch.nextMatch":"\u4E0B\u4E00\u4E2A","ui.fileSearch.close":"\u5173\u95ED\u641C\u7D22","ui.tool.task":"\u4EFB\u52A1","ui.tool.skill":"\u6280\u80FD","ui.basicTool.called":"\u8C03\u7528\u4E86 `{{tool}}`","ui.toolErrorCard.failed":"\u5931\u8D25","ui.toolErrorCard.copyError":"\u590D\u5236\u9519\u8BEF","ui.message.duration.seconds":"{{count}}\u79D2","ui.message.duration.minutesSeconds":"{{minutes}}\u5206 {{seconds}}\u79D2"};export{e as dict};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-kdcnder5.js";import"./chunk-aztre27e.js";var e={"ui.sessionReview.title":"Oturum de\u011Fi\u015Fiklikleri","ui.sessionReview.title.lastTurn":"Son tur de\u011Fi\u015Fiklikleri","ui.sessionReview.diffStyle.unified":"Birle\u015Fik","ui.sessionReview.diffStyle.split":"B\xF6l\xFCnm\xFC\u015F","ui.sessionReview.openFile":"Dosyay\u0131 a\xE7","ui.sessionReview.selection.line":"sat\u0131r {{line}}","ui.sessionReview.selection.lines":"sat\u0131rlar {{start}}-{{end}}","ui.sessionReview.expandAll":"T\xFCm\xFCn\xFC geni\u015Flet","ui.sessionReview.collapseAll":"T\xFCm\xFCn\xFC daralt","ui.sessionReview.change.added":"Eklendi","ui.sessionReview.change.removed":"Kald\u0131r\u0131ld\u0131","ui.sessionReview.change.modified":"De\u011Fi\u015Ftirildi","ui.sessionReview.image.loading":"Y\xFCkleniyor...","ui.sessionReview.image.placeholder":"G\xF6rsel","ui.sessionReview.largeDiff.title":"Fark g\xF6sterimi i\xE7in \xE7ok b\xFCy\xFCk","ui.sessionReview.largeDiff.meta":"Limit: {{limit}} de\u011Fi\u015Fen sat\u0131r. Mevcut: {{current}} de\u011Fi\u015Fen sat\u0131r.","ui.sessionReview.largeDiff.renderAnyway":"Yine de g\xF6ster","ui.fileMedia.kind.image":"g\xF6rsel","ui.fileMedia.kind.audio":"ses","ui.fileMedia.state.removed":"{{kind}} dosyas\u0131 kald\u0131r\u0131ld\u0131.","ui.fileMedia.state.loading":"{{kind}} y\xFCkleniyor...","ui.fileMedia.state.error":"{{kind}} y\xFCklenemedi.","ui.fileMedia.state.unavailable":"{{kind}} \xF6nizlemesi kullan\u0131lam\u0131yor.","ui.fileMedia.binary.title":"\u0130kili dosya","ui.fileMedia.binary.description.path":"{{path}} ikili dosyad\u0131r.","ui.fileMedia.binary.description.default":"\u0130kili i\xE7erik","ui.lineComment.label.prefix":"Yorum: ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Yorum yap\u0131l\u0131yor: ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Yorum ekle","ui.lineComment.submit":"Yorum yap","ui.sessionTurn.steps.show":"Ad\u0131mlar\u0131 g\xF6ster","ui.sessionTurn.steps.hide":"Ad\u0131mlar\u0131 gizle","ui.sessionTurn.summary.response":"Yan\u0131t","ui.sessionTurn.diff.showMore":"Daha fazla de\u011Fi\u015Fiklik g\xF6ster ({{count}})","ui.sessionTurn.retry.retrying":"yeniden deneniyor","ui.sessionTurn.retry.inSeconds":"{{seconds}}sn i\xE7inde","ui.sessionTurn.retry.attempt":"deneme #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - deneme #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini \u015Fu anda a\u015F\u0131r\u0131 yo\u011Fun","ui.sessionTurn.error.freeUsageExceeded":"\xDCcretsiz kullan\u0131m a\u015F\u0131ld\u0131","ui.sessionTurn.error.addQredits":"Kredi ekle","ui.sessionTurn.status.delegating":"G\xF6rev devrediliyor","ui.sessionTurn.status.planning":"Sonraki ad\u0131mlar planlan\u0131yor","ui.sessionTurn.status.gatheringContext":"Ke\u015Ffediliyor","ui.sessionTurn.status.gatheredContext":"Ke\u015Ffedildi","ui.sessionTurn.status.searchingCodebase":"Kod taban\u0131 aran\u0131yor","ui.sessionTurn.status.searchingWeb":"Web aran\u0131yor","ui.sessionTurn.status.makingEdits":"D\xFCzenlemeler yap\u0131l\u0131yor","ui.sessionTurn.status.runningCommands":"Komutlar \xE7al\u0131\u015Ft\u0131r\u0131l\u0131yor","ui.sessionTurn.status.thinking":"D\xFC\u015F\xFCn\xFCyor","ui.sessionTurn.status.thinkingWithTopic":"D\xFC\u015F\xFCn\xFCyor - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"D\xFC\u015F\xFCnceler toplan\u0131yor","ui.sessionTurn.status.consideringNextSteps":"Sonraki ad\u0131mlar de\u011Ferlendiriliyor","ui.messagePart.questions.dismissed":"Sorular reddedildi","ui.messagePart.compaction":"Oturum s\u0131k\u0131\u015Ft\u0131r\u0131ld\u0131","ui.messagePart.context.read.one":"{{count}} okuma","ui.messagePart.context.read.other":"{{count}} okuma","ui.messagePart.context.search.one":"{{count}} arama","ui.messagePart.context.search.other":"{{count}} arama","ui.messagePart.context.list.one":"{{count}} liste","ui.messagePart.context.list.other":"{{count}} liste","ui.messagePart.diagnostic.error":"Hata","ui.messagePart.title.edit":"D\xFCzenle","ui.messagePart.title.write":"Yaz","ui.messagePart.option.typeOwnAnswer":"Kendi cevab\u0131n\u0131z\u0131 yaz\u0131n","ui.messagePart.review.title":"Cevaplar\u0131 inceleyin","ui.list.loading":"Y\xFCkleniyor","ui.list.empty":"Sonu\xE7 bulunamad\u0131","ui.list.clearFilter":"Filtreyi temizle","ui.list.emptyWithFilter.prefix":"Sonu\xE7 bulunamad\u0131:","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Yeni mesaj","ui.textField.copyToClipboard":"Panoya kopyala","ui.textField.copyLink":"Ba\u011Flant\u0131 kopyala","ui.textField.copied":"Kopyaland\u0131","ui.imagePreview.alt":"G\xF6rsel \xF6nizleme","ui.scrollView.ariaLabel":"kayd\u0131r\u0131labilir i\xE7erik","ui.tool.read":"Oku","ui.tool.loaded":"Y\xFCklendi","ui.tool.list":"Listele","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Web getir","ui.tool.websearch":"Web Aramas\u0131","ui.tool.codesearch":"Kod Aramas\u0131","ui.tool.shell":"Kabuk","ui.tool.patch":"Yama","ui.tool.todos":"G\xF6revler","ui.tool.todos.read":"G\xF6revleri oku","ui.tool.questions":"Sorular","ui.tool.agent":"{{type}} Ajan","ui.tool.agent.default":"Ajan","ui.common.file.one":"dosya","ui.common.file.other":"dosya","ui.common.question.one":"soru","ui.common.question.other":"soru","ui.common.add":"Ekle","ui.common.back":"Geri","ui.common.cancel":"\u0130ptal","ui.common.confirm":"Onayla","ui.common.dismiss":"Kapat","ui.common.close":"Kapat","ui.common.next":"\u0130leri","ui.common.submit":"G\xF6nder","ui.permission.deny":"Reddet","ui.permission.allowAlways":"Her zaman izin ver","ui.permission.allowOnce":"Bir kez izin ver","ui.message.expand":"Mesaj\u0131 geni\u015Flet","ui.message.collapse":"Mesaj\u0131 daralt","ui.message.copy":"Kopyala","ui.message.copyMessage":"Mesaj\u0131 kopyala","ui.message.forkMessage":"Yeni oturuma dalland\u0131r","ui.message.revertMessage":"Bu noktaya s\u0131f\u0131rla","ui.message.copyResponse":"Yan\u0131t\u0131 kopyala","ui.message.copied":"Kopyaland\u0131","ui.message.interrupted":"Kesildi","ui.message.queued":"S\u0131rada","ui.message.attachment.alt":"ek","ui.patch.action.deleted":"Silindi","ui.patch.action.created":"Olu\u015Fturuldu","ui.patch.action.moved":"Ta\u015F\u0131nd\u0131","ui.patch.action.patched":"Yamaland\u0131","ui.question.subtitle.answered":"{{count}} cevapland\u0131","ui.question.answer.none":"(cevap yok)","ui.question.review.notAnswered":"(cevaplanmad\u0131)","ui.question.multiHint":"Ge\xE7erli t\xFCm cevaplar\u0131 se\xE7in","ui.question.singleHint":"Bir cevap se\xE7in","ui.question.custom.placeholder":"Cevab\u0131n\u0131z\u0131 yaz\u0131n...","ui.fileSearch.placeholder":"Bul","ui.fileSearch.previousMatch":"\xD6nceki","ui.fileSearch.nextMatch":"Sonraki","ui.fileSearch.close":"Aramay\u0131 kapat","ui.tool.task":"G\xF6rev","ui.tool.skill":"Yetenek","ui.basicTool.called":"`{{tool}}` \xE7a\u011Fr\u0131ld\u0131","ui.toolErrorCard.failed":"Ba\u015Far\u0131s\u0131z","ui.toolErrorCard.copyError":"Hatay\u0131 kopyala","ui.message.duration.seconds":"{{count}}sn","ui.message.duration.minutesSeconds":"{{minutes}}dk {{seconds}}sn"};export{e as dict};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{E as
|
|
2
|
+
import{yf as i}from"./chunk-cvdxgsq1.js";import{aQ as f}from"./chunk-aztre27e.js";var o=f((e)=>{Object.defineProperty(e,"__esModule",{value:!0});e.fromString=e.fromArrayBuffer=void 0;var n=i();Object.defineProperty(e,"fromArrayBuffer",{enumerable:!0,get:function(){return n.fromArrayBuffer}});Object.defineProperty(e,"fromString",{enumerable:!0,get:function(){return n.fromString}})});var E=f((m)=>{var u=o(),y=(r)=>{let t=u.fromString(r,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},b=(r)=>{if(typeof r==="string")return y(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(r)},c=(r)=>{if(typeof r==="string")return r;if(typeof r!=="object"||typeof r.byteOffset!=="number"||typeof r.byteLength!=="number")throw Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return u.fromArrayBuffer(r.buffer,r.byteOffset,r.byteLength).toString("utf8")};m.fromUtf8=y;m.toUint8Array=b;m.toUtf8=c});
|
|
3
|
+
export{E as pf};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Wf as a,Xf as b}from"./chunk-4yawrap2.js";import"./chunk-ebrt1me3.js";import"./chunk-whxjkz9a.js";import"./chunk-89v6dgpp.js";import"./chunk-k309zez0.js";import"./chunk-09kba1hg.js";import"./chunk-t12xrrfr.js";import"./chunk-phxrg7aw.js";import"./chunk-snm5q21k.js";import"./chunk-aztre27e.js";export{a as start,b as Heap};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{R as
|
|
2
|
+
import{aQ as Z,dQ as W}from"./chunk-aztre27e.js";var R=Z(($G,E)=>{var{defineProperty:N,getOwnPropertyDescriptor:Kz,getOwnPropertyNames:Qz}=Object,Wz=Object.prototype.hasOwnProperty,Xz=(z,G)=>{for(var H in G)N(z,H,{get:G[H],enumerable:!0})},Yz=(z,G,H,Q)=>{if(G&&typeof G==="object"||typeof G==="function"){for(let K of Qz(G))if(!Wz.call(z,K)&&K!==H)N(z,K,{get:()=>G[K],enumerable:!(Q=Kz(G,K))||Q.enumerable})}return z},Zz=(z)=>Yz(N({},"__esModule",{value:!0}),z),O={};Xz(O,{VercelOidcTokenError:()=>S});E.exports=Zz(O);class S extends Error{constructor(z,G){super(z);this.name="VercelOidcTokenError",this.cause=G}toString(){if(this.cause)return`${this.name}: ${this.message}: ${this.cause}`;return`${this.name}: ${this.message}`}}});var P=Z((qG,y)=>{var{create:$z,defineProperty:L,getOwnPropertyDescriptor:qz,getOwnPropertyNames:vz,getPrototypeOf:Bz}=Object,Fz=Object.prototype.hasOwnProperty,Uz=(z,G)=>{for(var H in G)L(z,H,{get:G[H],enumerable:!0})},C=(z,G,H,Q)=>{if(G&&typeof G==="object"||typeof G==="function"){for(let K of vz(G))if(!Fz.call(z,K)&&K!==H)L(z,K,{get:()=>G[K],enumerable:!(Q=qz(G,K))||Q.enumerable})}return z},I=(z,G,H)=>(H=z!=null?$z(Bz(z)):{},C(G||!z||!z.__esModule?L(H,"default",{value:z,enumerable:!0}):H,z)),Lz=(z)=>C(L({},"__esModule",{value:!0}),z),x={};Uz(x,{findRootDir:()=>Jz,getUserDataDir:()=>Nz});y.exports=Lz(x);var B=I(W("path")),bz=I(W("fs")),A=I(W("os")),Vz=R();function Jz(){try{let z=process.cwd();while(z!==B.default.dirname(z)){let G=B.default.join(z,".vercel");if(bz.default.existsSync(G))return z;z=B.default.dirname(z)}}catch(z){throw new Vz.VercelOidcTokenError("Token refresh only supported in node server environments")}return null}function Nz(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(A.default.platform()){case"darwin":return B.default.join(A.default.homedir(),"Library/Application Support");case"linux":return B.default.join(A.default.homedir(),".local/share");case"win32":if(process.env.LOCALAPPDATA)return process.env.LOCALAPPDATA;return null;default:return null}}});var i=Z((vG,c)=>{var{create:Rz,defineProperty:b,getOwnPropertyDescriptor:Az,getOwnPropertyNames:Iz,getPrototypeOf:Dz}=Object,wz=Object.prototype.hasOwnProperty,Tz=(z,G)=>{for(var H in G)b(z,H,{get:G[H],enumerable:!0})},u=(z,G,H,Q)=>{if(G&&typeof G==="object"||typeof G==="function"){for(let K of Iz(G))if(!wz.call(z,K)&&K!==H)b(z,K,{get:()=>G[K],enumerable:!(Q=Az(G,K))||Q.enumerable})}return z},l=(z,G,H)=>(H=z!=null?Rz(Dz(z)):{},u(G||!z||!z.__esModule?b(H,"default",{value:z,enumerable:!0}):H,z)),jz=(z)=>u(b({},"__esModule",{value:!0}),z),g={};Tz(g,{isValidAccessToken:()=>Ez,readAuthConfig:()=>Oz,writeAuthConfig:()=>Sz});c.exports=jz(g);var F=l(W("fs")),h=l(W("path")),Mz=f();function k(){let z=(0,Mz.getVercelDataDir)();if(!z)throw Error(`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`);return h.join(z,"auth.json")}function Oz(){try{let z=k();if(!F.existsSync(z))return null;let G=F.readFileSync(z,"utf8");if(!G)return null;return JSON.parse(G)}catch(z){return null}}function Sz(z){let G=k(),H=h.dirname(G);if(!F.existsSync(H))F.mkdirSync(H,{mode:504,recursive:!0});F.writeFileSync(G,JSON.stringify(z,null,2),{mode:384})}function Ez(z,G=0){if(!z.token)return!1;if(typeof z.expiresAt!=="number")return!0;let H=Math.floor(Date.now()/1000),Q=G/1000;return z.expiresAt>=H+Q}});var a=Z((BG,s)=>{var{defineProperty:T,getOwnPropertyDescriptor:Cz,getOwnPropertyNames:xz}=Object,yz=Object.prototype.hasOwnProperty,Pz=(z,G)=>{for(var H in G)T(z,H,{get:G[H],enumerable:!0})},uz=(z,G,H,Q)=>{if(G&&typeof G==="object"||typeof G==="function"){for(let K of xz(G))if(!yz.call(z,K)&&K!==H)T(z,K,{get:()=>G[K],enumerable:!(Q=Cz(G,K))||Q.enumerable})}return z},lz=(z)=>uz(T({},"__esModule",{value:!0}),z),d={};Pz(d,{processTokenResponse:()=>iz,refreshTokenRequest:()=>cz});s.exports=lz(d);var D=W("os"),gz="https://vercel.com",hz="cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp",p=`@vercel/oidc node-${process.version} ${(0,D.platform)()} (${(0,D.arch)()}) ${(0,D.hostname)()}`,w=null;async function kz(){if(w)return w;let z=`${gz}/.well-known/openid-configuration`,G=await fetch(z,{headers:{"user-agent":p}});if(!G.ok)throw Error("Failed to discover OAuth endpoints");let H=await G.json();if(!H||typeof H.token_endpoint!=="string")throw Error("Invalid OAuth discovery response");let Q=H.token_endpoint;return w=Q,Q}async function cz(z){let G=await kz();return await fetch(G,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","user-agent":p},body:new URLSearchParams({client_id:hz,grant_type:"refresh_token",...z})})}async function iz(z){let G=await z.json();if(!z.ok){let H=typeof G==="object"&&G&&"error"in G?String(G.error):"Token refresh failed";return[Error(H)]}if(typeof G!=="object"||G===null)return[Error("Invalid token response")];if(typeof G.access_token!=="string")return[Error("Missing access_token in response")];if(G.token_type!=="Bearer")return[Error("Invalid token_type in response")];if(typeof G.expires_in!=="number")return[Error("Missing expires_in in response")];return[null,G]}});var t=Z((FG,r)=>{var{defineProperty:j,getOwnPropertyDescriptor:fz,getOwnPropertyNames:dz}=Object,pz=Object.prototype.hasOwnProperty,sz=(z,G)=>{for(var H in G)j(z,H,{get:G[H],enumerable:!0})},az=(z,G,H,Q)=>{if(G&&typeof G==="object"||typeof G==="function"){for(let K of dz(G))if(!pz.call(z,K)&&K!==H)j(z,K,{get:()=>G[K],enumerable:!(Q=fz(G,K))||Q.enumerable})}return z},_z=(z)=>az(j({},"__esModule",{value:!0}),z),_={};sz(_,{AccessTokenMissingError:()=>m,RefreshAccessTokenFailedError:()=>n});r.exports=_z(_);class m extends Error{constructor(){super("No authentication found. Please log in with the Vercel CLI (vercel login).");this.name="AccessTokenMissingError"}}class n extends Error{constructor(z){super("Failed to refresh authentication token.",{cause:z});this.name="RefreshAccessTokenFailedError"}}});var f=Z((UG,Hz)=>{var{create:mz,defineProperty:V,getOwnPropertyDescriptor:nz,getOwnPropertyNames:rz,getPrototypeOf:tz}=Object,ez=Object.prototype.hasOwnProperty,oz=(z,G)=>{for(var H in G)V(z,H,{get:G[H],enumerable:!0})},o=(z,G,H,Q)=>{if(G&&typeof G==="object"||typeof G==="function"){for(let K of rz(G))if(!ez.call(z,K)&&K!==H)V(z,K,{get:()=>G[K],enumerable:!(Q=nz(G,K))||Q.enumerable})}return z},zz=(z,G,H)=>(H=z!=null?mz(tz(z)):{},o(G||!z||!z.__esModule?V(H,"default",{value:z,enumerable:!0}):H,z)),zG=(z)=>o(V({},"__esModule",{value:!0}),z),Gz={};oz(Gz,{assertVercelOidcTokenResponse:()=>M,findProjectInfo:()=>QG,getTokenPayload:()=>YG,getVercelDataDir:()=>GG,getVercelOidcToken:()=>KG,getVercelToken:()=>HG,isExpired:()=>ZG,loadToken:()=>XG,saveToken:()=>WG});Hz.exports=zG(Gz);var U=zz(W("path")),X=zz(W("fs")),v=R(),J=P(),$=i(),e=a(),q=t();function GG(){let G=(0,J.getUserDataDir)();if(!G)return null;return U.join(G,"com.vercel.cli")}async function HG(z){let G=(0,$.readAuthConfig)();if(!G?.token)throw new q.AccessTokenMissingError;if((0,$.isValidAccessToken)(G,z?.expirationBufferMs))return G.token;if(!G.refreshToken)throw(0,$.writeAuthConfig)({}),new q.RefreshAccessTokenFailedError("No refresh token available");try{let H=await(0,e.refreshTokenRequest)({refresh_token:G.refreshToken}),[Q,K]=await(0,e.processTokenResponse)(H);if(Q||!K)throw(0,$.writeAuthConfig)({}),new q.RefreshAccessTokenFailedError(Q);let Y={token:K.access_token,expiresAt:Math.floor(Date.now()/1000)+K.expires_in};if(K.refresh_token)Y.refreshToken=K.refresh_token;return(0,$.writeAuthConfig)(Y),Y.token}catch(H){if((0,$.writeAuthConfig)({}),H instanceof q.AccessTokenMissingError||H instanceof q.RefreshAccessTokenFailedError)throw H;throw new q.RefreshAccessTokenFailedError(H)}}async function KG(z,G,H){let Q=`https://api.vercel.com/v1/projects/${G}/token?source=vercel-oidc-refresh${H?`&teamId=${H}`:""}`,K=await fetch(Q,{method:"POST",headers:{Authorization:`Bearer ${z}`}});if(!K.ok)throw new v.VercelOidcTokenError(`Failed to refresh OIDC token: ${K.statusText}`);let Y=await K.json();return M(Y),Y}function M(z){if(!z||typeof z!=="object")throw TypeError("Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again");if(!("token"in z)||typeof z.token!=="string")throw TypeError("Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again")}function QG(){let z=(0,J.findRootDir)();if(!z)throw new v.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`");let G=U.join(z,".vercel","project.json");if(!X.existsSync(G))throw new v.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`");let H=JSON.parse(X.readFileSync(G,"utf8"));if(typeof H.projectId!=="string"&&typeof H.orgId!=="string")throw TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project.");return{projectId:H.projectId,teamId:H.orgId}}function WG(z,G){let H=(0,J.getUserDataDir)();if(!H)throw new v.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let Q=U.join(H,"com.vercel.token",`${G}.json`),K=JSON.stringify(z);X.mkdirSync(U.dirname(Q),{mode:504,recursive:!0}),X.writeFileSync(Q,K),X.chmodSync(Q,432);return}function XG(z){let G=(0,J.getUserDataDir)();if(!G)throw new v.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let H=U.join(G,"com.vercel.token",`${z}.json`);if(!X.existsSync(H))return null;let Q=JSON.parse(X.readFileSync(H,"utf8"));return M(Q),Q}function YG(z){let G=z.split(".");if(G.length!==3)throw new v.VercelOidcTokenError("Invalid token. Please run `vc env pull` and try again");let H=G[1].replace(/-/g,"+").replace(/_/g,"/"),Q=H.padEnd(H.length+(4-H.length%4)%4,"=");return JSON.parse(Buffer.from(Q,"base64").toString("utf8"))}function ZG(z,G=0){return z.exp*1000<Date.now()+G}});
|
|
3
|
+
export{R as Jr,t as Kr,f as Lr};
|