@qitqode/qitqode-android-arm64 0.1.24 → 0.1.25
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-4kse3awh.js → chunk-0304b7xg.js} +1 -1
- package/bundle/{chunk-hqg5qbxk.js → chunk-08ba67f4.js} +1 -1
- package/bundle/chunk-0eneddjj.js +2 -0
- package/bundle/{chunk-6nhje520.js → chunk-0hsb4knd.js} +1 -1
- package/bundle/{chunk-bas6x25m.js → chunk-0jaxgrq0.js} +2 -2
- package/bundle/chunk-0ke6x10y.js +5 -0
- package/bundle/{chunk-hh4c02fh.js → chunk-0rmmg3g4.js} +1 -1
- package/bundle/chunk-0vqrakhw.js +3 -0
- package/bundle/{chunk-sgtgvzv6.js → chunk-0x7dbj5e.js} +1 -1
- package/bundle/{chunk-7yf15a3a.js → chunk-0xmx2zfg.js} +1 -1
- package/bundle/chunk-0yb4pxjv.js +2 -0
- package/bundle/chunk-129kq1w7.js +2 -0
- package/bundle/{chunk-8cr7ks31.js → chunk-14qvaxtp.js} +1 -1
- package/bundle/chunk-1a5hq7d5.js +2 -0
- package/bundle/{chunk-k16hzy2q.js → chunk-1ce5jpdc.js} +1 -1
- package/bundle/{chunk-xv8gnkh5.js → chunk-1e8mja6v.js} +1 -1
- package/bundle/{chunk-cy2586rv.js → chunk-1n1dh6zj.js} +1 -1
- package/bundle/{chunk-pb7rnkke.js → chunk-1txkz6dt.js} +1 -1
- package/bundle/chunk-1w3y1dkk.js +2 -0
- package/bundle/{chunk-v7r9np94.js → chunk-23f6rc7a.js} +1 -1
- package/bundle/chunk-26qt44f1.js +3 -0
- package/bundle/{chunk-6mscvf6y.js → chunk-2armxd20.js} +1 -1
- package/bundle/{chunk-21ejqv4v.js → chunk-2je5tp0x.js} +1 -1
- package/bundle/{chunk-0rtshz2r.js → chunk-2k2axg73.js} +1 -1
- package/bundle/chunk-2pkake0h.js +2 -0
- package/bundle/{chunk-7y3y3j51.js → chunk-2rxt1s22.js} +2 -2
- package/bundle/{chunk-te1zfpzv.js → chunk-2s28fdbp.js} +1 -1
- package/bundle/{chunk-8pe047p0.js → chunk-2sy1wx99.js} +1 -1
- package/bundle/{chunk-9easaxy7.js → chunk-2z35ewwc.js} +1 -1
- package/bundle/{chunk-zeh481tm.js → chunk-2zj3h3xj.js} +2 -2
- package/bundle/chunk-32188rww.js +2 -0
- package/bundle/chunk-334tc1rh.js +2 -0
- package/bundle/{chunk-tzc4jkzg.js → chunk-3dvyfmgc.js} +1 -1
- package/bundle/{chunk-q3x4x2tq.js → chunk-3e8p4a3y.js} +1 -1
- package/bundle/{chunk-7mhffm9f.js → chunk-3f054f69.js} +183 -183
- package/bundle/chunk-3ff94m8r.js +2 -0
- package/bundle/{chunk-7a6p7dfx.js → chunk-3fy57jcy.js} +1 -1
- package/bundle/{chunk-ve5gb789.js → chunk-3h08jdq8.js} +2 -2
- package/bundle/{chunk-w7p2x973.js → chunk-3j7skhxg.js} +2 -2
- package/bundle/{chunk-p4hpr8d7.js → chunk-3jhx8g5d.js} +1 -1
- package/bundle/{chunk-jr9xnvjq.js → chunk-3nhth7c2.js} +1 -1
- package/bundle/{chunk-8ace31r2.js → chunk-3tnek022.js} +1 -1
- package/bundle/{chunk-rvvfs9ps.js → chunk-3xna2rk5.js} +1 -1
- package/bundle/{chunk-k9d927xe.js → chunk-42t25nkb.js} +1 -1
- package/bundle/chunk-4aqd2bty.js +2 -0
- package/bundle/{chunk-am73j1bt.js → chunk-4kb2efq3.js} +1 -1
- package/bundle/{chunk-wmw2gne9.js → chunk-4pssh5d3.js} +2 -2
- package/bundle/{chunk-pyq01301.js → chunk-4stgw33j.js} +1 -1
- package/bundle/{chunk-k9g77a02.js → chunk-4w5t515p.js} +1 -1
- package/bundle/chunk-4wa0gf8y.js +28 -0
- package/bundle/{chunk-jegn6jc3.js → chunk-4wgb80jm.js} +2 -2
- package/bundle/{chunk-jbd9k041.js → chunk-4wyjapes.js} +2 -2
- package/bundle/chunk-4xg5ptk9.js +2 -0
- package/bundle/{chunk-23geekk5.js → chunk-54pk7nna.js} +1 -1
- package/bundle/chunk-58680z2j.js +3 -0
- package/bundle/{chunk-ygj1cy0n.js → chunk-5mdsrv0a.js} +1 -1
- package/bundle/{chunk-xj73j10a.js → chunk-5mp82az0.js} +1 -1
- package/bundle/chunk-5nm36wxa.js +2 -0
- package/bundle/{chunk-7tgm8wp5.js → chunk-5zw7knvd.js} +1 -1
- package/bundle/{chunk-yz7rqzby.js → chunk-61ks7c71.js} +3 -3
- package/bundle/chunk-64jet8nc.js +2 -0
- package/bundle/chunk-6584d9m8.js +2 -0
- package/bundle/chunk-66hv9bbw.js +2 -0
- package/bundle/{chunk-mj24ntn9.js → chunk-692vn48b.js} +1 -1
- package/bundle/chunk-6a1g6jzn.js +2 -0
- package/bundle/chunk-6be8p915.js +2 -0
- package/bundle/{chunk-8651hq0k.js → chunk-6ddp36ar.js} +1 -1
- package/bundle/chunk-6f03158n.js +2 -0
- package/bundle/{chunk-zavtsfxz.js → chunk-6gbaw2pk.js} +1 -1
- package/bundle/{chunk-5h2hcp46.js → chunk-6rrmjrm2.js} +1 -1
- package/bundle/{chunk-ps543k72.js → chunk-6s2f5sv4.js} +1 -1
- package/bundle/{chunk-9jf67xb0.js → chunk-754varfr.js} +2 -2
- package/bundle/{chunk-wa2ce2sg.js → chunk-78h5dd4t.js} +2 -2
- package/bundle/{chunk-4d1a547n.js → chunk-7d6jhzng.js} +1 -1
- package/bundle/{chunk-kc3hpmr2.js → chunk-7fx6x8x9.js} +2 -2
- package/bundle/chunk-7jnjttqx.js +2 -0
- package/bundle/{chunk-jz3aav8a.js → chunk-7q5srx7q.js} +2 -2
- package/bundle/chunk-7q8pa6s8.js +2 -0
- package/bundle/{chunk-vvypb02q.js → chunk-7qvkyjjg.js} +1 -1
- package/bundle/{chunk-8r79zf3y.js → chunk-7rjf9b8n.js} +2 -2
- package/bundle/{chunk-t488d66k.js → chunk-7v4fzkbb.js} +1 -1
- package/bundle/chunk-7w84hfxs.js +3 -0
- package/bundle/{chunk-8717htya.js → chunk-7ws3gdjq.js} +1 -1
- package/bundle/{chunk-va4davgy.js → chunk-87x607rz.js} +259 -253
- package/bundle/{chunk-vftqwdpg.js → chunk-8ahpk8td.js} +1 -1
- package/bundle/{chunk-9vcw33dv.js → chunk-8atry88r.js} +1 -1
- package/bundle/chunk-8casywce.js +2 -0
- package/bundle/{chunk-tsn1jkr7.js → chunk-8cty50g7.js} +1 -1
- package/bundle/{chunk-qywwj58s.js → chunk-8gy99gfb.js} +2 -2
- package/bundle/chunk-8hxwxt5p.js +2 -0
- package/bundle/{chunk-58enbars.js → chunk-8jcx4tep.js} +2 -2
- package/bundle/chunk-8y8140dm.js +2 -0
- package/bundle/{chunk-frdc3ysq.js → chunk-8za87zkr.js} +1 -1
- package/bundle/{chunk-2qcndbxv.js → chunk-99p5m2f1.js} +1 -1
- package/bundle/{chunk-y3n31nnx.js → chunk-9dpn4792.js} +2 -2
- package/bundle/chunk-9dqcyt6x.js +2 -0
- package/bundle/{chunk-7gczzccz.js → chunk-9f6pqped.js} +1 -1
- package/bundle/chunk-9he248a8.js +2 -0
- package/bundle/{chunk-8h9r6c8g.js → chunk-9jncnqbj.js} +2 -2
- package/bundle/{chunk-cvchztkc.js → chunk-9jvnc14g.js} +1 -1
- package/bundle/chunk-9qmmse2n.js +2 -0
- package/bundle/chunk-9r6bvkp4.js +8 -0
- package/bundle/{chunk-dkv2mg97.js → chunk-9va5eh9s.js} +1 -1
- package/bundle/{chunk-hg563h5r.js → chunk-9w5rx0fb.js} +2 -2
- package/bundle/{chunk-xccs5c50.js → chunk-a27yjp71.js} +1 -1
- package/bundle/chunk-aabrsxrq.js +2 -0
- package/bundle/{chunk-dkm7x8rj.js → chunk-ag9thqkv.js} +2 -2
- package/bundle/chunk-amx3x4kd.js +3 -0
- package/bundle/{chunk-ktmazmas.js → chunk-aqm597px.js} +2 -2
- package/bundle/chunk-atd0q4v8.js +3 -0
- package/bundle/{chunk-ewyk4py6.js → chunk-av290sja.js} +1 -1
- package/bundle/chunk-avaba4sr.js +2 -0
- package/bundle/{chunk-dgzyn27r.js → chunk-aw0q4y3s.js} +1 -1
- package/bundle/{chunk-4k149ews.js → chunk-b2xya6pq.js} +1 -1
- package/bundle/{chunk-3tdqsm5c.js → chunk-b50t4jc5.js} +1 -1
- package/bundle/chunk-bdy1etja.js +2 -0
- package/bundle/{chunk-6szvs3k9.js → chunk-bnc4626b.js} +1 -1
- package/bundle/{chunk-fm4xa6yx.js → chunk-bpnpxdyv.js} +2 -2
- package/bundle/chunk-bqdvqmjc.js +2 -0
- package/bundle/chunk-bqs6a1ts.js +14 -0
- package/bundle/{chunk-78bajmqm.js → chunk-bsqcfqya.js} +1 -1
- package/bundle/{chunk-ecwz9nhs.js → chunk-c1ypbbka.js} +2 -2
- package/bundle/{chunk-1jsywey3.js → chunk-c27rpvdz.js} +1 -1
- package/bundle/chunk-cdws8ggq.js +2 -0
- package/bundle/{chunk-6j0365q3.js → chunk-cjxp72dv.js} +2 -2
- package/bundle/chunk-cqs9a2cs.js +2 -0
- package/bundle/{chunk-3wzqs241.js → chunk-crap29f6.js} +1 -1
- package/bundle/{chunk-1jh5p5qw.js → chunk-d0m7nbbx.js} +2 -2
- package/bundle/chunk-d0rjst58.js +2 -0
- package/bundle/{chunk-2eardzxs.js → chunk-d1bsxz2t.js} +1 -1
- package/bundle/{chunk-b6m4yyww.js → chunk-d5b0bqbr.js} +1 -1
- package/bundle/chunk-d833a2fj.js +2 -0
- package/bundle/{chunk-tk3bve0x.js → chunk-dd11kryy.js} +2 -2
- package/bundle/chunk-dday4nm2.js +2 -0
- package/bundle/{chunk-qw2hgs5b.js → chunk-ddxjc803.js} +2 -2
- package/bundle/{chunk-3tkp27x7.js → chunk-dee1a3yk.js} +2 -2
- package/bundle/{chunk-q6fbyvpq.js → chunk-dgggvses.js} +1 -1
- package/bundle/{chunk-apq38bt4.js → chunk-dk3z4k46.js} +3 -3
- package/bundle/{chunk-wf09j72q.js → chunk-e075v4e9.js} +2 -2
- package/bundle/{chunk-1xyn0sp2.js → chunk-e1pwnf0b.js} +2 -2
- package/bundle/chunk-e2sj30hk.js +2 -0
- package/bundle/{chunk-dann9gfq.js → chunk-eaatrmcg.js} +1 -1
- package/bundle/{chunk-1y9t7nxn.js → chunk-eg7drzzt.js} +1 -1
- package/bundle/chunk-enc0fykg.js +2 -0
- package/bundle/chunk-evan93av.js +2 -0
- package/bundle/{chunk-9f7y0dj0.js → chunk-evmfntm3.js} +1 -1
- package/bundle/{chunk-2gxjjqfx.js → chunk-ey4ktbyb.js} +1 -1
- package/bundle/{chunk-sswbfqcq.js → chunk-f55txcsa.js} +1 -1
- package/bundle/chunk-f600dzsr.js +2 -0
- package/bundle/chunk-f6jzwydk.js +2 -0
- package/bundle/{chunk-s9amvacw.js → chunk-f84cd0a1.js} +2 -2
- package/bundle/{chunk-6sdh1q7g.js → chunk-fgw420gb.js} +1 -1
- package/bundle/chunk-fv67ng8z.js +2 -0
- package/bundle/{chunk-x6z2b63w.js → chunk-g3s2z5xa.js} +1 -1
- package/bundle/{chunk-9xvctnjr.js → chunk-g4qwkcdv.js} +1 -1
- package/bundle/{chunk-3nhqd8wg.js → chunk-g73drh98.js} +3 -3
- package/bundle/{chunk-0pvbk8ks.js → chunk-gaen9ya4.js} +2 -2
- package/bundle/{chunk-ac202abt.js → chunk-gefh32jb.js} +1 -1
- package/bundle/chunk-gevazsx3.js +2 -0
- package/bundle/{chunk-n1chdwrs.js → chunk-gfmfrkxc.js} +1 -1
- package/bundle/{chunk-sjrmhd3e.js → chunk-ggeena9t.js} +1 -1
- package/bundle/chunk-gh18pzkx.js +2 -0
- package/bundle/chunk-gnvvgr4y.js +2 -0
- package/bundle/{chunk-4q9w2yve.js → chunk-grkkzrg1.js} +2 -2
- package/bundle/chunk-gsbjs2ws.js +2 -0
- package/bundle/{chunk-gff87y4n.js → chunk-gsz1wqy6.js} +1 -1
- package/bundle/{chunk-vf1r5ckp.js → chunk-gvtw9c44.js} +1 -1
- package/bundle/chunk-gw0j8hr9.js +3 -0
- package/bundle/{chunk-cesrhm09.js → chunk-h19ty95q.js} +1 -1
- package/bundle/{chunk-9nx8hm57.js → chunk-h2fh1g8g.js} +1 -1
- package/bundle/{chunk-p54bzjtv.js → chunk-h56jxxvj.js} +1 -1
- package/bundle/{chunk-jmjg8d8a.js → chunk-hmfefq0d.js} +4 -4
- package/bundle/{chunk-gn7xgd4c.js → chunk-hvpe07pt.js} +1 -1
- package/bundle/{chunk-gvzfffr4.js → chunk-hwbxehhf.js} +1 -1
- package/bundle/{chunk-zp2ffbc2.js → chunk-hznsed5n.js} +2 -2
- package/bundle/{chunk-w1atxyz0.js → chunk-j5b5h08g.js} +1 -1
- package/bundle/chunk-j7pdz979.js +2 -0
- package/bundle/{chunk-02txthqv.js → chunk-j9s62g01.js} +2 -2
- package/bundle/chunk-jfe2qbv8.js +2 -0
- package/bundle/{chunk-wj6aq50n.js → chunk-jgs6ngte.js} +1 -1
- package/bundle/{chunk-ep8zn49w.js → chunk-jhq5bvhs.js} +2 -2
- package/bundle/{chunk-2z6fzwyc.js → chunk-jq81hb32.js} +2 -2
- package/bundle/{chunk-dcx8hjbs.js → chunk-jqzejny3.js} +1 -1
- package/bundle/{chunk-j1veq3zr.js → chunk-jtrcnpm7.js} +2 -2
- package/bundle/{chunk-hbnr0j7h.js → chunk-jv98gw88.js} +2 -2
- package/bundle/{chunk-e346x00p.js → chunk-jvaffe5d.js} +1 -1
- package/bundle/chunk-k6zvb8xm.js +2 -0
- package/bundle/{chunk-5y8efy5b.js → chunk-k8bp3jjv.js} +1 -1
- package/bundle/{chunk-0ae5q6ck.js → chunk-kb14wxcs.js} +2 -2
- package/bundle/chunk-kcht9kvx.js +2 -0
- package/bundle/{chunk-edvcz2gd.js → chunk-kdcspxvq.js} +1 -1
- package/bundle/{chunk-t6w96xq2.js → chunk-kdct3e8s.js} +1 -1
- package/bundle/{chunk-1fnmkm0z.js → chunk-kgsq240v.js} +2 -2
- package/bundle/chunk-knvsa1d4.js +2 -0
- package/bundle/chunk-kp6d68hd.js +2 -0
- package/bundle/{chunk-jpygkh1c.js → chunk-kwm87f18.js} +1 -1
- package/bundle/{chunk-1p34bx7c.js → chunk-kyny0t2g.js} +2 -2
- package/bundle/{chunk-b8ag61vj.js → chunk-m2ang7yb.js} +1 -1
- package/bundle/{chunk-99n6czag.js → chunk-mbh1pdv9.js} +2 -2
- package/bundle/{chunk-y1srca0c.js → chunk-mczw8e3s.js} +2 -2
- package/bundle/chunk-me78p9x4.js +2 -0
- package/bundle/{chunk-g7vkkmsk.js → chunk-meaybtcc.js} +3 -3
- package/bundle/{chunk-9rqrm9y8.js → chunk-mkdyknbz.js} +1 -1
- package/bundle/{chunk-bf146hz2.js → chunk-mkyrg7gt.js} +2 -2
- package/bundle/{chunk-0pbt75ev.js → chunk-mr7agwgn.js} +1 -1
- package/bundle/{chunk-0w4v0fbs.js → chunk-msm3r7ny.js} +2 -2
- package/bundle/chunk-mv1d7wyt.js +2 -0
- package/bundle/{chunk-hh3w51wp.js → chunk-mybpgrjj.js} +2 -2
- package/bundle/{chunk-gf4ek7rv.js → chunk-n8dcmjph.js} +1 -1
- package/bundle/chunk-n8xmmxh5.js +2 -0
- package/bundle/chunk-n90219q9.js +2 -0
- package/bundle/chunk-nckg3ydx.js +2 -0
- package/bundle/{chunk-a5zjrwqy.js → chunk-nf8gkxbk.js} +2 -2
- package/bundle/chunk-nhaenjw3.js +2 -0
- package/bundle/chunk-nhtrt5ec.js +2 -0
- package/bundle/{chunk-6dxaty1v.js → chunk-nhx2xp2x.js} +1 -1
- package/bundle/{chunk-najzfhb2.js → chunk-nmnsf3fc.js} +1 -1
- package/bundle/{chunk-84gnbzky.js → chunk-nqefvn28.js} +1 -1
- package/bundle/{chunk-v2kyarwz.js → chunk-p409grvp.js} +2 -2
- package/bundle/chunk-p72n0tfq.js +2 -0
- package/bundle/{chunk-jr8qcf99.js → chunk-p80dc6kt.js} +2 -2
- package/bundle/{chunk-2wp1w8cy.js → chunk-p883sz67.js} +1 -1
- package/bundle/{chunk-fdezde1z.js → chunk-p8enedkf.js} +1 -1
- package/bundle/chunk-pd33qvr0.js +2 -0
- package/bundle/{chunk-d56zc21w.js → chunk-pepn5jp4.js} +1 -1
- package/bundle/chunk-pf7cj4jd.js +3 -0
- package/bundle/{chunk-bd21p9zz.js → chunk-pfn1db1m.js} +2 -2
- package/bundle/{chunk-srf73nm4.js → chunk-pk0tytcm.js} +1 -1
- package/bundle/chunk-pq3622ae.js +2 -0
- package/bundle/{chunk-ebjhggdw.js → chunk-psveqqv2.js} +1 -1
- package/bundle/{chunk-wfnk2vsd.js → chunk-pvee151a.js} +1 -1
- package/bundle/chunk-qatj4h6b.js +2 -0
- package/bundle/{chunk-3vbtra1j.js → chunk-qdnxv55k.js} +1 -1
- package/bundle/{chunk-gen6f3dn.js → chunk-qe0sfafy.js} +2 -2
- package/bundle/chunk-qfz0a58d.js +2 -0
- package/bundle/chunk-qjwfj51e.js +2 -0
- package/bundle/chunk-qkg73rs9.js +2 -0
- package/bundle/{chunk-5kmfnkzv.js → chunk-qm9ezq93.js} +1 -1
- package/bundle/{chunk-5rkmhzq0.js → chunk-qnqqrvvs.js} +2 -2
- package/bundle/{chunk-9pe4agdz.js → chunk-qnv2v02g.js} +2 -2
- package/bundle/{chunk-7dckfame.js → chunk-qpm5afdz.js} +1 -1
- package/bundle/chunk-qvcfst7n.js +11 -0
- package/bundle/{chunk-r48g0kaq.js → chunk-rgecc41f.js} +2 -2
- package/bundle/chunk-rjcptzem.js +8 -0
- package/bundle/{chunk-hh9a709t.js → chunk-rjf21v5c.js} +1 -1
- package/bundle/chunk-rmsqb6r4.js +10 -0
- package/bundle/{chunk-2mmspnr3.js → chunk-rq4hqwjy.js} +1 -1
- package/bundle/chunk-rqrpbcm6.js +2 -0
- package/bundle/{chunk-ftk58wxe.js → chunk-rs1mm5ef.js} +1 -1
- package/bundle/{chunk-a9y27zd2.js → chunk-rze20q68.js} +1 -1
- package/bundle/chunk-s76hdgw6.js +2 -0
- package/bundle/chunk-s7vhjg9e.js +2 -0
- package/bundle/{chunk-fkvccmgk.js → chunk-se79ke63.js} +2 -2
- package/bundle/chunk-sec3a60m.js +2 -0
- package/bundle/chunk-sjnt5e6w.js +2 -0
- package/bundle/chunk-sntb757q.js +2 -0
- package/bundle/chunk-svscftd7.js +2 -0
- package/bundle/chunk-sx0cabcs.js +2 -0
- package/bundle/{chunk-gn9p1d50.js → chunk-sx5m81em.js} +1 -1
- package/bundle/chunk-syhay5ye.js +7 -0
- package/bundle/{chunk-9798jffg.js → chunk-t07a5431.js} +1 -1
- package/bundle/{chunk-c31k8yh0.js → chunk-t0amhhsk.js} +1 -1
- package/bundle/{chunk-pfhp78cr.js → chunk-t2tsyazc.js} +1 -1
- package/bundle/{chunk-spm1yy6w.js → chunk-tdmaxc6n.js} +1 -1
- package/bundle/{chunk-gc9q0x8z.js → chunk-tf1me2r4.js} +3 -3
- package/bundle/{chunk-zfnbk5gy.js → chunk-tfggzzqw.js} +1 -1
- package/bundle/chunk-tmdm6vm6.js +2 -0
- package/bundle/{chunk-9sy9ws1w.js → chunk-v4xgceeq.js} +1 -1
- package/bundle/chunk-v6g0ksks.js +2 -0
- package/bundle/chunk-v7ah9gg0.js +3 -0
- package/bundle/{chunk-kr0fsqas.js → chunk-vb4e7y4d.js} +1 -1
- package/bundle/chunk-vbf73c7z.js +2 -0
- package/bundle/chunk-vbf9jpas.js +2 -0
- package/bundle/{chunk-r3yqe7x0.js → chunk-veev25yg.js} +1 -1
- package/bundle/{chunk-kaeyhw2n.js → chunk-vfj5nwab.js} +2 -2
- package/bundle/{chunk-6g3m7yxf.js → chunk-vmgknvxs.js} +2 -2
- package/bundle/{chunk-2y8qz8te.js → chunk-vq6bh2z9.js} +1 -1
- package/bundle/{chunk-b643cra9.js → chunk-vqq5vmh1.js} +195 -195
- package/bundle/chunk-vrcf5q4s.js +2 -0
- package/bundle/chunk-vxrsp6n7.js +2 -0
- package/bundle/chunk-w8ax3pvh.js +2 -0
- package/bundle/chunk-w98r39gd.js +9 -0
- package/bundle/{chunk-j1a64ade.js → chunk-wb69d52j.js} +2 -2
- package/bundle/{chunk-hg9nk090.js → chunk-wrgg270f.js} +1 -1
- package/bundle/{chunk-yzdty5t9.js → chunk-ww8ear80.js} +2 -2
- package/bundle/{chunk-ha1w0xzh.js → chunk-x36jhtex.js} +1 -1
- package/bundle/{chunk-hjbks7r9.js → chunk-x6b99nt3.js} +1 -1
- package/bundle/{chunk-yh174jhg.js → chunk-xdde80rf.js} +2 -2
- package/bundle/{chunk-17ggas8k.js → chunk-xjrt0dta.js} +1 -1
- package/bundle/chunk-xk2cmh49.js +2 -0
- package/bundle/{chunk-f819a7ec.js → chunk-xqa6qkx2.js} +1 -1
- package/bundle/{chunk-f3kjp838.js → chunk-xw283h2r.js} +2 -2
- package/bundle/{chunk-82gs5cmn.js → chunk-xy4t5qf8.js} +1 -1
- package/bundle/{chunk-0w0jfzb4.js → chunk-xyn3xxfs.js} +1 -1
- package/bundle/chunk-xzhkfctf.js +2 -0
- package/bundle/chunk-y0xt5a6g.js +2 -0
- package/bundle/{chunk-hxgb0y1w.js → chunk-ybn8tb09.js} +1 -1
- package/bundle/chunk-ydmrvx7q.js +2 -0
- package/bundle/{chunk-ns0pswww.js → chunk-ydsen7w0.js} +1 -1
- package/bundle/{chunk-hv4nhx6q.js → chunk-yhqk8bzk.js} +2 -2
- package/bundle/{chunk-g0v9g37f.js → chunk-ykfq8bem.js} +1 -1
- package/bundle/{chunk-r7xp0xcn.js → chunk-ym4ydwrz.js} +2 -2
- package/bundle/{chunk-4tn69nqs.js → chunk-yzchwmb4.js} +1 -1
- package/bundle/{chunk-1d64dywx.js → chunk-z015twaq.js} +2 -2
- package/bundle/chunk-z2rtcgad.js +3 -0
- package/bundle/{chunk-ms1fd6h4.js → chunk-z3zx6g09.js} +1 -1
- package/bundle/chunk-z9b3t2jm.js +2 -0
- package/bundle/{chunk-agdfqncf.js → chunk-zbdbsagd.js} +2 -2
- package/bundle/{chunk-evqxvhdb.js → chunk-zh808d4t.js} +1 -1
- package/bundle/{chunk-fhng5her.js → chunk-zny2qaqa.js} +2 -2
- package/bundle/{chunk-y2jmtfdh.js → chunk-zsnbxsdx.js} +2 -2
- package/bundle/{chunk-pv8jcpnf.js → chunk-zss93r48.js} +1 -1
- package/bundle/chunk-zzr8smtm.js +2 -0
- package/bundle/index.js +16 -16
- package/bundle/parser.worker.js +2 -2
- package/bundle/worker.js +1 -1
- package/package.json +1 -1
- package/bundle/chunk-0bvde0cx.js +0 -2
- package/bundle/chunk-0kbxnazj.js +0 -2
- package/bundle/chunk-0z3z0gk1.js +0 -5
- package/bundle/chunk-19z5q33z.js +0 -2
- package/bundle/chunk-1a0wnwna.js +0 -2
- package/bundle/chunk-1ddm2wxv.js +0 -2
- package/bundle/chunk-1fk4vsmc.js +0 -2
- package/bundle/chunk-1j2f9nd5.js +0 -2
- package/bundle/chunk-27s736an.js +0 -2
- package/bundle/chunk-2j17xrzj.js +0 -2
- package/bundle/chunk-2zca3nak.js +0 -2
- package/bundle/chunk-2zcvcfq4.js +0 -2
- package/bundle/chunk-38hwkfj5.js +0 -2
- package/bundle/chunk-3afqxvsn.js +0 -2
- package/bundle/chunk-3avc1ppg.js +0 -7
- package/bundle/chunk-3v4vtah1.js +0 -2
- package/bundle/chunk-3ypk0j2f.js +0 -2
- package/bundle/chunk-3z1y040p.js +0 -3
- package/bundle/chunk-4aykrj51.js +0 -9
- package/bundle/chunk-4dtbmqmq.js +0 -2
- package/bundle/chunk-4zjb6rps.js +0 -2
- package/bundle/chunk-5hkcjgwh.js +0 -2
- package/bundle/chunk-5snrz263.js +0 -2
- package/bundle/chunk-653c0mxr.js +0 -11
- package/bundle/chunk-6av7hrrk.js +0 -7
- package/bundle/chunk-6bswn7w5.js +0 -2
- package/bundle/chunk-6epghftw.js +0 -2
- package/bundle/chunk-6jjhxh8p.js +0 -2
- package/bundle/chunk-6ws7xyc5.js +0 -2
- package/bundle/chunk-7g28zhar.js +0 -2
- package/bundle/chunk-7v02b2ms.js +0 -2
- package/bundle/chunk-7vmp2034.js +0 -2
- package/bundle/chunk-7wxrypkr.js +0 -2
- package/bundle/chunk-8kk9gvdy.js +0 -2
- package/bundle/chunk-8ygpp4y3.js +0 -2
- package/bundle/chunk-95q60g1p.js +0 -2
- package/bundle/chunk-9mjbenja.js +0 -2
- package/bundle/chunk-9vn1gy8h.js +0 -2
- package/bundle/chunk-ajp3f08k.js +0 -2
- package/bundle/chunk-aptkpdkc.js +0 -2
- package/bundle/chunk-bky5a42k.js +0 -3
- package/bundle/chunk-bry94ar5.js +0 -2
- package/bundle/chunk-btzyvqkf.js +0 -2
- package/bundle/chunk-c94pjdfh.js +0 -2
- package/bundle/chunk-cct9ds5c.js +0 -2
- package/bundle/chunk-czn535v0.js +0 -2
- package/bundle/chunk-d7wd5hz1.js +0 -2
- package/bundle/chunk-d86cmjrp.js +0 -2
- package/bundle/chunk-dnq65xvn.js +0 -2
- package/bundle/chunk-dpqv8rtn.js +0 -2
- package/bundle/chunk-e9mh7s3z.js +0 -2
- package/bundle/chunk-ek2y5f6g.js +0 -2
- package/bundle/chunk-epdsay73.js +0 -2
- package/bundle/chunk-f89gntcy.js +0 -3
- package/bundle/chunk-ffnsn7tv.js +0 -2
- package/bundle/chunk-fkezc7ew.js +0 -2
- package/bundle/chunk-fsxddgj0.js +0 -2
- package/bundle/chunk-gbcsfg6v.js +0 -2
- package/bundle/chunk-gfmz85hp.js +0 -2
- package/bundle/chunk-gk63k4t6.js +0 -2
- package/bundle/chunk-j0vf8s12.js +0 -2
- package/bundle/chunk-j1bxt69x.js +0 -2
- package/bundle/chunk-jcem8s30.js +0 -2
- package/bundle/chunk-jjwjb9w0.js +0 -3
- package/bundle/chunk-jpham2a3.js +0 -2
- package/bundle/chunk-jzkymnr5.js +0 -2
- package/bundle/chunk-k0qtwnhb.js +0 -2
- package/bundle/chunk-k2rsky7z.js +0 -2
- package/bundle/chunk-kcetcysa.js +0 -2
- package/bundle/chunk-kjfc5v3s.js +0 -2
- package/bundle/chunk-kkvb2c2z.js +0 -8
- package/bundle/chunk-km2ayfyf.js +0 -2
- package/bundle/chunk-knrh89eb.js +0 -2
- package/bundle/chunk-ksqfjawv.js +0 -2
- package/bundle/chunk-m8djypsy.js +0 -11
- package/bundle/chunk-mjhb1q0n.js +0 -3
- package/bundle/chunk-mxcger73.js +0 -2
- package/bundle/chunk-nazkrkeb.js +0 -2
- package/bundle/chunk-nk01s49e.js +0 -2
- package/bundle/chunk-ns8b7rx1.js +0 -2
- package/bundle/chunk-ny6vpkx2.js +0 -2
- package/bundle/chunk-q0dd3ak6.js +0 -3
- package/bundle/chunk-q2s057bm.js +0 -2
- package/bundle/chunk-q5cqg2c0.js +0 -28
- package/bundle/chunk-qk2wnp2x.js +0 -2
- package/bundle/chunk-r012q335.js +0 -3
- package/bundle/chunk-rbdjbgkb.js +0 -2
- package/bundle/chunk-rxjprhgh.js +0 -2
- package/bundle/chunk-s3w9bmze.js +0 -2
- package/bundle/chunk-s3zste1a.js +0 -2
- package/bundle/chunk-sbt7qmwm.js +0 -3
- package/bundle/chunk-sf6h44pb.js +0 -2
- package/bundle/chunk-sgvzxs7m.js +0 -2
- package/bundle/chunk-sp9bndyh.js +0 -2
- package/bundle/chunk-vavrczqm.js +0 -3
- package/bundle/chunk-vg4styg5.js +0 -2
- package/bundle/chunk-vh09hhcs.js +0 -2
- package/bundle/chunk-vhktpm0n.js +0 -2
- package/bundle/chunk-vzjcmwry.js +0 -14
- package/bundle/chunk-wtp0yvqw.js +0 -2
- package/bundle/chunk-xmzs7q66.js +0 -2
- package/bundle/chunk-xv80476w.js +0 -2
- package/bundle/chunk-yjvr0et1.js +0 -2
- package/bundle/chunk-zk8n8hnh.js +0 -3
- package/bundle/chunk-zx3kcfkj.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Aq as R,Bq as b,Cq as xG,Iq as f,Jq as s,Kq as O,Oq as IG,Pp as y,Up as l,Wp as p,Yp as qG,bq as NG,dq as _,iq as DG,yq as t}from"./chunk-bf146hz2.js";import{$q as PG,Vq as AG,Wq as r,br as T}from"./chunk-t488d66k.js";import{Pu as Q}from"./chunk-r7xp0xcn.js";function h(G){return G.replace(/[_-]([a-z])/g,(Y)=>Y[1].toUpperCase())}function MG(G,Y){let Z=h(G);if(Z!==G&&(Y==null?void 0:Y[Z])!=null)return Z;return G}var SG=Q.object({error:Q.object({message:Q.string(),type:Q.string().nullish(),param:Q.any().nullish(),code:Q.union([Q.string(),Q.number()]).nullish()})}),m={errorSchema:SG,errorToMessage:(G)=>G.error.message};function jG(G){var Y,Z,U,z,V,j;if(G==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let B=(Y=G.prompt_tokens)!=null?Y:0,H=(Z=G.completion_tokens)!=null?Z:0,X=(z=(U=G.prompt_tokens_details)==null?void 0:U.cached_tokens)!=null?z:0,L=(j=(V=G.completion_tokens_details)==null?void 0:V.reasoning_tokens)!=null?j:0;return{inputTokens:{total:B,noCache:B-X,cacheRead:X,cacheWrite:void 0},outputTokens:{total:H,text:H-L,reasoning:L},raw:G}}function u(G){var Y,Z;return(Z=(Y=G==null?void 0:G.providerOptions)==null?void 0:Y.openaiCompatible)!=null?Z:{}}function RG(G){switch(G){case"audio/wav":return"wav";case"audio/mp3":case"audio/mpeg":return"mp3";default:return null}}function yG(G){var Y,Z,U;let z=[];for(let{role:V,content:j,...B}of G){let H=u({...B});switch(V){case"system":{z.push({role:"system",content:j,...H});break}case"user":{if(j.length===1&&j[0].type==="text"){z.push({role:"user",content:j[0].text,...u(j[0])});break}z.push({role:"user",content:j.map((X)=>{var L;let $=u(X);switch(X.type){case"text":return{type:"text",text:X.text,...$};case"file":{if(X.mediaType.startsWith("image/")){let J=X.mediaType==="image/*"?"image/jpeg":X.mediaType;return{type:"image_url",image_url:{url:X.data instanceof URL?X.data.toString():`data:${J};base64,${p(X.data)}`},...$}}if(X.mediaType.startsWith("audio/")){if(X.data instanceof URL)throw new T({functionality:"audio file parts with URLs"});let J=RG(X.mediaType);if(J===null)throw new T({functionality:`audio media type ${X.mediaType}`});return{type:"input_audio",input_audio:{data:p(X.data),format:J},...$}}if(X.mediaType==="application/pdf"){if(X.data instanceof URL)throw new T({functionality:"PDF file parts with URLs"});return{type:"file",file:{filename:(L=X.filename)!=null?L:"document.pdf",file_data:`data:application/pdf;base64,${p(X.data)}`},...$}}if(X.mediaType.startsWith("text/"))return{type:"text",text:X.data instanceof URL?X.data.toString():typeof X.data==="string"?new TextDecoder().decode(l(X.data)):new TextDecoder().decode(X.data),...$};throw new T({functionality:`file part media type ${X.mediaType}`})}}}),...H});break}case"assistant":{let X="",L="",$=[];for(let J of j){let E=u(J);switch(J.type){case"text":{X+=J.text;break}case"reasoning":{L+=J.text;break}case"tool-call":{let A=(Z=(Y=J.providerOptions)==null?void 0:Y.google)==null?void 0:Z.thoughtSignature;$.push({id:J.toolCallId,type:"function",function:{name:J.toolName,arguments:JSON.stringify(J.input)},...E,...A?{extra_content:{google:{thought_signature:String(A)}}}:{}});break}}}z.push({role:"assistant",content:X,...L.length>0?{reasoning_content:L}:{},tool_calls:$.length>0?$:void 0,...H});break}case"tool":{for(let X of j){if(X.type==="tool-approval-response")continue;let L=X.output,$;switch(L.type){case"text":case"error-text":$=L.value;break;case"execution-denied":$=(U=L.reason)!=null?U:"Tool execution denied.";break;case"content":case"json":case"error-json":$=JSON.stringify(L.value);break}let J=u(X);z.push({role:"tool",tool_call_id:X.toolCallId,content:$,...J})}break}default:throw Error(`Unsupported role: ${V}`)}}return z}function LG({id:G,model:Y,created:Z}){return{id:G!=null?G:void 0,modelId:Y!=null?Y:void 0,timestamp:Z!=null?new Date(Z*1000):void 0}}function zG(G){switch(G){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var g=Q.object({user:Q.string().optional(),reasoningEffort:Q.string().optional(),textVerbosity:Q.string().optional(),strictJsonSchema:Q.boolean().optional()});function TG({tools:G,toolChoice:Y}){G=(G==null?void 0:G.length)?G:void 0;let Z=[];if(G==null)return{tools:void 0,toolChoice:void 0,toolWarnings:Z};let U=[];for(let V of G)if(V.type==="provider")Z.push({type:"unsupported",feature:`provider-defined tool ${V.id}`});else U.push({type:"function",function:{name:V.name,description:V.description,parameters:V.inputSchema,...V.strict!=null?{strict:V.strict}:{}}});if(Y==null)return{tools:U,toolChoice:void 0,toolWarnings:Z};let z=Y.type;switch(z){case"auto":case"none":case"required":return{tools:U,toolChoice:z,toolWarnings:Z};case"tool":return{tools:U,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:Z};default:throw new T({functionality:`tool choice type: ${z}`})}}var bG=class{constructor(G,Y){this.specificationVersion="v3";var Z,U;this.modelId=G,this.config=Y;let z=(Z=Y.errorStructure)!=null?Z:m;this.chunkSchema=OG(z.errorSchema),this.failedResponseHandler=f(z),this.supportsStructuredOutputs=(U=Y.supportsStructuredOutputs)!=null?U:!1}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){var G,Y,Z;return(Z=(Y=(G=this.config).supportedUrls)==null?void 0:Y.call(G))!=null?Z:{}}transformRequestBody(G){var Y,Z,U;return(U=(Z=(Y=this.config).transformRequestBody)==null?void 0:Z.call(Y,G))!=null?U:G}async getArgs({prompt:G,maxOutputTokens:Y,temperature:Z,topP:U,topK:z,frequencyPenalty:V,presencePenalty:j,providerOptions:B,stopSequences:H,responseFormat:X,seed:L,toolChoice:$,tools:J}){var E,A,P,K,W;let N=[],x=await R({provider:"openai-compatible",providerOptions:B,schema:g});if(x!=null)N.push({type:"other",message:"The 'openai-compatible' key in providerOptions is deprecated. Use 'openaiCompatible' instead."});let D=Object.assign(x!=null?x:{},(E=await R({provider:"openaiCompatible",providerOptions:B,schema:g}))!=null?E:{},(A=await R({provider:this.providerOptionsName,providerOptions:B,schema:g}))!=null?A:{},(P=await R({provider:h(this.providerOptionsName),providerOptions:B,schema:g}))!=null?P:{}),w=(K=D==null?void 0:D.strictJsonSchema)!=null?K:!0;if(z!=null)N.push({type:"unsupported",feature:"topK"});if((X==null?void 0:X.type)==="json"&&X.schema!=null&&!this.supportsStructuredOutputs)N.push({type:"unsupported",feature:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{tools:q,toolChoice:I,toolWarnings:k}=TG({tools:J,toolChoice:$});return{metadataKey:MG(this.providerOptionsName,B),args:{model:this.modelId,user:D.user,max_tokens:Y,temperature:Z,top_p:U,frequency_penalty:V,presence_penalty:j,response_format:(X==null?void 0:X.type)==="json"?this.supportsStructuredOutputs===!0&&X.schema!=null?{type:"json_schema",json_schema:{schema:X.schema,strict:w,name:(W=X.name)!=null?W:"response",description:X.description}}:{type:"json_object"}:void 0,stop:H,seed:L,...Object.fromEntries(Object.entries({...B==null?void 0:B[this.providerOptionsName],...B==null?void 0:B[h(this.providerOptionsName)]}).filter(([d])=>!Object.keys(g.shape).includes(d))),reasoning_effort:D.reasoningEffort,verbosity:D.textVerbosity,messages:yG(G),tools:q,tool_choice:I},warnings:[...N,...k]}}async doGenerate(G){var Y,Z,U,z,V,j,B,H;let{args:X,warnings:L,metadataKey:$}=await this.getArgs({...G}),J=this.transformRequestBody(X),E=JSON.stringify(J),{responseHeaders:A,value:P,rawValue:K}=await b({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:y(this.config.headers(),G.headers),body:J,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:O(kG),abortSignal:G.abortSignal,fetch:this.config.fetch}),W=P.choices[0],N=[],x=W.message.content;if(x!=null&&x.length>0)N.push({type:"text",text:x});let D=(Y=W.message.reasoning_content)!=null?Y:W.message.reasoning;if(D!=null&&D.length>0)N.push({type:"reasoning",text:D});if(W.message.tool_calls!=null)for(let I of W.message.tool_calls){let k=(U=(Z=I.extra_content)==null?void 0:Z.google)==null?void 0:U.thought_signature;N.push({type:"tool-call",toolCallId:(z=I.id)!=null?z:_(),toolName:I.function.name,input:I.function.arguments,...k?{providerMetadata:{[$]:{thoughtSignature:k}}}:{}})}let w={[$]:{},...await((j=(V=this.config.metadataExtractor)==null?void 0:V.extractMetadata)==null?void 0:j.call(V,{parsedBody:K}))},q=(B=P.usage)==null?void 0:B.completion_tokens_details;if((q==null?void 0:q.accepted_prediction_tokens)!=null)w[$].acceptedPredictionTokens=q==null?void 0:q.accepted_prediction_tokens;if((q==null?void 0:q.rejected_prediction_tokens)!=null)w[$].rejectedPredictionTokens=q==null?void 0:q.rejected_prediction_tokens;return{content:N,finishReason:{unified:zG(W.finish_reason),raw:(H=W.finish_reason)!=null?H:void 0},usage:jG(P.usage),providerMetadata:w,request:{body:E},response:{...LG(P),headers:A,body:K},warnings:L}}async doStream(G){var Y;let{args:Z,warnings:U,metadataKey:z}=await this.getArgs({...G}),V=this.transformRequestBody({...Z,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0}),j=(Y=this.config.metadataExtractor)==null?void 0:Y.createStreamExtractor(),{responseHeaders:B,value:H}=await b({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:y(this.config.headers(),G.headers),body:V,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:s(this.chunkSchema),abortSignal:G.abortSignal,fetch:this.config.fetch}),X=[],L={unified:"other",raw:void 0},$=void 0,J=!0,E=z,A=!1,P=!1;return{stream:H.pipeThrough(new TransformStream({start(K){K.enqueue({type:"stream-start",warnings:U})},transform(K,W){var N,x,D,w,q,I,k,n,d,e,o,GG,QG,XG,YG,ZG,$G,JG;if(G.includeRawChunks)W.enqueue({type:"raw",rawValue:K.rawValue});if(!K.success){L={unified:"error",raw:void 0},W.enqueue({type:"error",error:K.error});return}if(j==null||j.processChunk(K.rawValue),"error"in K.value){L={unified:"error",raw:void 0},W.enqueue({type:"error",error:K.value.error.message});return}let c=K.value;if(J)J=!1,W.enqueue({type:"response-metadata",...LG(c)});if(c.usage!=null)$=c.usage;let v=c.choices[0];if((v==null?void 0:v.finish_reason)!=null)L={unified:zG(v.finish_reason),raw:(N=v.finish_reason)!=null?N:void 0};if((v==null?void 0:v.delta)==null)return;let C=v.delta,UG=(x=C.reasoning_content)!=null?x:C.reasoning;if(UG){if(!A)W.enqueue({type:"reasoning-start",id:"reasoning-0"}),A=!0;W.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:UG})}if(C.content){if(A)W.enqueue({type:"reasoning-end",id:"reasoning-0"}),A=!1;if(!P)W.enqueue({type:"text-start",id:"txt-0"}),P=!0;W.enqueue({type:"text-delta",id:"txt-0",delta:C.content})}if(C.tool_calls!=null){if(A)W.enqueue({type:"reasoning-end",id:"reasoning-0"}),A=!1;for(let F of C.tool_calls){let i=(D=F.index)!=null?D:X.length;if(X[i]==null){if(F.id==null)throw new r({data:F,message:"Expected 'id' to be a string."});if(((w=F.function)==null?void 0:w.name)==null)throw new r({data:F,message:"Expected 'function.name' to be a string."});W.enqueue({type:"tool-input-start",id:F.id,toolName:F.function.name}),X[i]={id:F.id,type:"function",function:{name:F.function.name,arguments:(q=F.function.arguments)!=null?q:""},hasFinished:!1,thoughtSignature:(n=(k=(I=F.extra_content)==null?void 0:I.google)==null?void 0:k.thought_signature)!=null?n:void 0};let S=X[i];if(((d=S.function)==null?void 0:d.name)!=null&&((e=S.function)==null?void 0:e.arguments)!=null){if(S.function.arguments.length>0)W.enqueue({type:"tool-input-delta",id:S.id,delta:S.function.arguments});if(t(S.function.arguments))W.enqueue({type:"tool-input-end",id:S.id}),W.enqueue({type:"tool-call",toolCallId:(o=S.id)!=null?o:_(),toolName:S.function.name,input:S.function.arguments,...S.thoughtSignature?{providerMetadata:{[E]:{thoughtSignature:S.thoughtSignature}}}:{}}),S.hasFinished=!0}continue}let M=X[i];if(M.hasFinished)continue;if(((GG=F.function)==null?void 0:GG.arguments)!=null)M.function.arguments+=(XG=(QG=F.function)==null?void 0:QG.arguments)!=null?XG:"";if(W.enqueue({type:"tool-input-delta",id:M.id,delta:(YG=F.function.arguments)!=null?YG:""}),((ZG=M.function)==null?void 0:ZG.name)!=null&&(($G=M.function)==null?void 0:$G.arguments)!=null&&t(M.function.arguments))W.enqueue({type:"tool-input-end",id:M.id}),W.enqueue({type:"tool-call",toolCallId:(JG=M.id)!=null?JG:_(),toolName:M.function.name,input:M.function.arguments,...M.thoughtSignature?{providerMetadata:{[E]:{thoughtSignature:M.thoughtSignature}}}:{}}),M.hasFinished=!0}}},flush(K){var W,N,x,D,w;if(A)K.enqueue({type:"reasoning-end",id:"reasoning-0"});if(P)K.enqueue({type:"text-end",id:"txt-0"});for(let I of X.filter((k)=>!k.hasFinished))K.enqueue({type:"tool-input-end",id:I.id}),K.enqueue({type:"tool-call",toolCallId:(W=I.id)!=null?W:_(),toolName:I.function.name,input:I.function.arguments,...I.thoughtSignature?{providerMetadata:{[E]:{thoughtSignature:I.thoughtSignature}}}:{}});let q={[E]:{},...j==null?void 0:j.buildMetadata()};if(((N=$==null?void 0:$.completion_tokens_details)==null?void 0:N.accepted_prediction_tokens)!=null)q[E].acceptedPredictionTokens=(x=$==null?void 0:$.completion_tokens_details)==null?void 0:x.accepted_prediction_tokens;if(((D=$==null?void 0:$.completion_tokens_details)==null?void 0:D.rejected_prediction_tokens)!=null)q[E].rejectedPredictionTokens=(w=$==null?void 0:$.completion_tokens_details)==null?void 0:w.rejected_prediction_tokens;K.enqueue({type:"finish",finishReason:L,usage:jG($),providerMetadata:q})}})),request:{body:V},response:{headers:B}}}},FG=Q.looseObject({prompt_tokens:Q.number().nullish(),completion_tokens:Q.number().nullish(),total_tokens:Q.number().nullish(),prompt_tokens_details:Q.object({cached_tokens:Q.number().nullish()}).nullish(),completion_tokens_details:Q.object({reasoning_tokens:Q.number().nullish(),accepted_prediction_tokens:Q.number().nullish(),rejected_prediction_tokens:Q.number().nullish()}).nullish()}).nullish(),kG=Q.looseObject({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({message:Q.object({role:Q.literal("assistant").nullish(),content:Q.string().nullish(),reasoning_content:Q.string().nullish(),reasoning:Q.string().nullish(),tool_calls:Q.array(Q.object({id:Q.string().nullish(),function:Q.object({name:Q.string(),arguments:Q.string()}),extra_content:Q.object({google:Q.object({thought_signature:Q.string().nullish()}).nullish()}).nullish()})).nullish()}),finish_reason:Q.string().nullish()})),usage:FG}),fG=Q.looseObject({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({delta:Q.object({role:Q.enum(["assistant"]).nullish(),content:Q.string().nullish(),reasoning_content:Q.string().nullish(),reasoning:Q.string().nullish(),tool_calls:Q.array(Q.object({index:Q.number().nullish(),id:Q.string().nullish(),function:Q.object({name:Q.string().nullish(),arguments:Q.string().nullish()}),extra_content:Q.object({google:Q.object({thought_signature:Q.string().nullish()}).nullish()}).nullish()})).nullish()}).nullish(),finish_reason:Q.string().nullish()})),usage:FG}),OG=(G)=>Q.union([fG,G]);function BG(G){var Y,Z;if(G==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let U=(Y=G.prompt_tokens)!=null?Y:0,z=(Z=G.completion_tokens)!=null?Z:0;return{inputTokens:{total:U,noCache:U,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:z,text:z,reasoning:void 0},raw:G}}function vG({prompt:G,user:Y="user",assistant:Z="assistant"}){let U="";if(G[0].role==="system")U+=`${G[0].content}
|
|
2
|
+
import{Ao as p,Co as qG,Ho as NG,Jo as _,Oo as DG,cp as t,ep as R,fp as b,gp as xG,mp as f,np as s,op as O,sp as IG,to as y,yo as l}from"./chunk-mkyrg7gt.js";import{Ap as r,Fp as PG,Hp as T,zp as AG}from"./chunk-7v4fzkbb.js";import{ut as Q}from"./chunk-ym4ydwrz.js";function h(G){return G.replace(/[_-]([a-z])/g,(Y)=>Y[1].toUpperCase())}function MG(G,Y){let Z=h(G);if(Z!==G&&(Y==null?void 0:Y[Z])!=null)return Z;return G}var SG=Q.object({error:Q.object({message:Q.string(),type:Q.string().nullish(),param:Q.any().nullish(),code:Q.union([Q.string(),Q.number()]).nullish()})}),m={errorSchema:SG,errorToMessage:(G)=>G.error.message};function jG(G){var Y,Z,U,z,V,j;if(G==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let B=(Y=G.prompt_tokens)!=null?Y:0,H=(Z=G.completion_tokens)!=null?Z:0,X=(z=(U=G.prompt_tokens_details)==null?void 0:U.cached_tokens)!=null?z:0,L=(j=(V=G.completion_tokens_details)==null?void 0:V.reasoning_tokens)!=null?j:0;return{inputTokens:{total:B,noCache:B-X,cacheRead:X,cacheWrite:void 0},outputTokens:{total:H,text:H-L,reasoning:L},raw:G}}function u(G){var Y,Z;return(Z=(Y=G==null?void 0:G.providerOptions)==null?void 0:Y.openaiCompatible)!=null?Z:{}}function RG(G){switch(G){case"audio/wav":return"wav";case"audio/mp3":case"audio/mpeg":return"mp3";default:return null}}function yG(G){var Y,Z,U;let z=[];for(let{role:V,content:j,...B}of G){let H=u({...B});switch(V){case"system":{z.push({role:"system",content:j,...H});break}case"user":{if(j.length===1&&j[0].type==="text"){z.push({role:"user",content:j[0].text,...u(j[0])});break}z.push({role:"user",content:j.map((X)=>{var L;let $=u(X);switch(X.type){case"text":return{type:"text",text:X.text,...$};case"file":{if(X.mediaType.startsWith("image/")){let J=X.mediaType==="image/*"?"image/jpeg":X.mediaType;return{type:"image_url",image_url:{url:X.data instanceof URL?X.data.toString():`data:${J};base64,${p(X.data)}`},...$}}if(X.mediaType.startsWith("audio/")){if(X.data instanceof URL)throw new T({functionality:"audio file parts with URLs"});let J=RG(X.mediaType);if(J===null)throw new T({functionality:`audio media type ${X.mediaType}`});return{type:"input_audio",input_audio:{data:p(X.data),format:J},...$}}if(X.mediaType==="application/pdf"){if(X.data instanceof URL)throw new T({functionality:"PDF file parts with URLs"});return{type:"file",file:{filename:(L=X.filename)!=null?L:"document.pdf",file_data:`data:application/pdf;base64,${p(X.data)}`},...$}}if(X.mediaType.startsWith("text/"))return{type:"text",text:X.data instanceof URL?X.data.toString():typeof X.data==="string"?new TextDecoder().decode(l(X.data)):new TextDecoder().decode(X.data),...$};throw new T({functionality:`file part media type ${X.mediaType}`})}}}),...H});break}case"assistant":{let X="",L="",$=[];for(let J of j){let E=u(J);switch(J.type){case"text":{X+=J.text;break}case"reasoning":{L+=J.text;break}case"tool-call":{let A=(Z=(Y=J.providerOptions)==null?void 0:Y.google)==null?void 0:Z.thoughtSignature;$.push({id:J.toolCallId,type:"function",function:{name:J.toolName,arguments:JSON.stringify(J.input)},...E,...A?{extra_content:{google:{thought_signature:String(A)}}}:{}});break}}}z.push({role:"assistant",content:X,...L.length>0?{reasoning_content:L}:{},tool_calls:$.length>0?$:void 0,...H});break}case"tool":{for(let X of j){if(X.type==="tool-approval-response")continue;let L=X.output,$;switch(L.type){case"text":case"error-text":$=L.value;break;case"execution-denied":$=(U=L.reason)!=null?U:"Tool execution denied.";break;case"content":case"json":case"error-json":$=JSON.stringify(L.value);break}let J=u(X);z.push({role:"tool",tool_call_id:X.toolCallId,content:$,...J})}break}default:throw Error(`Unsupported role: ${V}`)}}return z}function LG({id:G,model:Y,created:Z}){return{id:G!=null?G:void 0,modelId:Y!=null?Y:void 0,timestamp:Z!=null?new Date(Z*1000):void 0}}function zG(G){switch(G){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var g=Q.object({user:Q.string().optional(),reasoningEffort:Q.string().optional(),textVerbosity:Q.string().optional(),strictJsonSchema:Q.boolean().optional()});function TG({tools:G,toolChoice:Y}){G=(G==null?void 0:G.length)?G:void 0;let Z=[];if(G==null)return{tools:void 0,toolChoice:void 0,toolWarnings:Z};let U=[];for(let V of G)if(V.type==="provider")Z.push({type:"unsupported",feature:`provider-defined tool ${V.id}`});else U.push({type:"function",function:{name:V.name,description:V.description,parameters:V.inputSchema,...V.strict!=null?{strict:V.strict}:{}}});if(Y==null)return{tools:U,toolChoice:void 0,toolWarnings:Z};let z=Y.type;switch(z){case"auto":case"none":case"required":return{tools:U,toolChoice:z,toolWarnings:Z};case"tool":return{tools:U,toolChoice:{type:"function",function:{name:Y.toolName}},toolWarnings:Z};default:throw new T({functionality:`tool choice type: ${z}`})}}var bG=class{constructor(G,Y){this.specificationVersion="v3";var Z,U;this.modelId=G,this.config=Y;let z=(Z=Y.errorStructure)!=null?Z:m;this.chunkSchema=OG(z.errorSchema),this.failedResponseHandler=f(z),this.supportsStructuredOutputs=(U=Y.supportsStructuredOutputs)!=null?U:!1}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){var G,Y,Z;return(Z=(Y=(G=this.config).supportedUrls)==null?void 0:Y.call(G))!=null?Z:{}}transformRequestBody(G){var Y,Z,U;return(U=(Z=(Y=this.config).transformRequestBody)==null?void 0:Z.call(Y,G))!=null?U:G}async getArgs({prompt:G,maxOutputTokens:Y,temperature:Z,topP:U,topK:z,frequencyPenalty:V,presencePenalty:j,providerOptions:B,stopSequences:H,responseFormat:X,seed:L,toolChoice:$,tools:J}){var E,A,P,K,W;let N=[],x=await R({provider:"openai-compatible",providerOptions:B,schema:g});if(x!=null)N.push({type:"other",message:"The 'openai-compatible' key in providerOptions is deprecated. Use 'openaiCompatible' instead."});let D=Object.assign(x!=null?x:{},(E=await R({provider:"openaiCompatible",providerOptions:B,schema:g}))!=null?E:{},(A=await R({provider:this.providerOptionsName,providerOptions:B,schema:g}))!=null?A:{},(P=await R({provider:h(this.providerOptionsName),providerOptions:B,schema:g}))!=null?P:{}),w=(K=D==null?void 0:D.strictJsonSchema)!=null?K:!0;if(z!=null)N.push({type:"unsupported",feature:"topK"});if((X==null?void 0:X.type)==="json"&&X.schema!=null&&!this.supportsStructuredOutputs)N.push({type:"unsupported",feature:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let{tools:q,toolChoice:I,toolWarnings:k}=TG({tools:J,toolChoice:$});return{metadataKey:MG(this.providerOptionsName,B),args:{model:this.modelId,user:D.user,max_tokens:Y,temperature:Z,top_p:U,frequency_penalty:V,presence_penalty:j,response_format:(X==null?void 0:X.type)==="json"?this.supportsStructuredOutputs===!0&&X.schema!=null?{type:"json_schema",json_schema:{schema:X.schema,strict:w,name:(W=X.name)!=null?W:"response",description:X.description}}:{type:"json_object"}:void 0,stop:H,seed:L,...Object.fromEntries(Object.entries({...B==null?void 0:B[this.providerOptionsName],...B==null?void 0:B[h(this.providerOptionsName)]}).filter(([d])=>!Object.keys(g.shape).includes(d))),reasoning_effort:D.reasoningEffort,verbosity:D.textVerbosity,messages:yG(G),tools:q,tool_choice:I},warnings:[...N,...k]}}async doGenerate(G){var Y,Z,U,z,V,j,B,H;let{args:X,warnings:L,metadataKey:$}=await this.getArgs({...G}),J=this.transformRequestBody(X),E=JSON.stringify(J),{responseHeaders:A,value:P,rawValue:K}=await b({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:y(this.config.headers(),G.headers),body:J,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:O(kG),abortSignal:G.abortSignal,fetch:this.config.fetch}),W=P.choices[0],N=[],x=W.message.content;if(x!=null&&x.length>0)N.push({type:"text",text:x});let D=(Y=W.message.reasoning_content)!=null?Y:W.message.reasoning;if(D!=null&&D.length>0)N.push({type:"reasoning",text:D});if(W.message.tool_calls!=null)for(let I of W.message.tool_calls){let k=(U=(Z=I.extra_content)==null?void 0:Z.google)==null?void 0:U.thought_signature;N.push({type:"tool-call",toolCallId:(z=I.id)!=null?z:_(),toolName:I.function.name,input:I.function.arguments,...k?{providerMetadata:{[$]:{thoughtSignature:k}}}:{}})}let w={[$]:{},...await((j=(V=this.config.metadataExtractor)==null?void 0:V.extractMetadata)==null?void 0:j.call(V,{parsedBody:K}))},q=(B=P.usage)==null?void 0:B.completion_tokens_details;if((q==null?void 0:q.accepted_prediction_tokens)!=null)w[$].acceptedPredictionTokens=q==null?void 0:q.accepted_prediction_tokens;if((q==null?void 0:q.rejected_prediction_tokens)!=null)w[$].rejectedPredictionTokens=q==null?void 0:q.rejected_prediction_tokens;return{content:N,finishReason:{unified:zG(W.finish_reason),raw:(H=W.finish_reason)!=null?H:void 0},usage:jG(P.usage),providerMetadata:w,request:{body:E},response:{...LG(P),headers:A,body:K},warnings:L}}async doStream(G){var Y;let{args:Z,warnings:U,metadataKey:z}=await this.getArgs({...G}),V=this.transformRequestBody({...Z,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0}),j=(Y=this.config.metadataExtractor)==null?void 0:Y.createStreamExtractor(),{responseHeaders:B,value:H}=await b({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:y(this.config.headers(),G.headers),body:V,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:s(this.chunkSchema),abortSignal:G.abortSignal,fetch:this.config.fetch}),X=[],L={unified:"other",raw:void 0},$=void 0,J=!0,E=z,A=!1,P=!1;return{stream:H.pipeThrough(new TransformStream({start(K){K.enqueue({type:"stream-start",warnings:U})},transform(K,W){var N,x,D,w,q,I,k,n,d,e,o,GG,QG,XG,YG,ZG,$G,JG;if(G.includeRawChunks)W.enqueue({type:"raw",rawValue:K.rawValue});if(!K.success){L={unified:"error",raw:void 0},W.enqueue({type:"error",error:K.error});return}if(j==null||j.processChunk(K.rawValue),"error"in K.value){L={unified:"error",raw:void 0},W.enqueue({type:"error",error:K.value.error.message});return}let c=K.value;if(J)J=!1,W.enqueue({type:"response-metadata",...LG(c)});if(c.usage!=null)$=c.usage;let v=c.choices[0];if((v==null?void 0:v.finish_reason)!=null)L={unified:zG(v.finish_reason),raw:(N=v.finish_reason)!=null?N:void 0};if((v==null?void 0:v.delta)==null)return;let C=v.delta,UG=(x=C.reasoning_content)!=null?x:C.reasoning;if(UG){if(!A)W.enqueue({type:"reasoning-start",id:"reasoning-0"}),A=!0;W.enqueue({type:"reasoning-delta",id:"reasoning-0",delta:UG})}if(C.content){if(A)W.enqueue({type:"reasoning-end",id:"reasoning-0"}),A=!1;if(!P)W.enqueue({type:"text-start",id:"txt-0"}),P=!0;W.enqueue({type:"text-delta",id:"txt-0",delta:C.content})}if(C.tool_calls!=null){if(A)W.enqueue({type:"reasoning-end",id:"reasoning-0"}),A=!1;for(let F of C.tool_calls){let i=(D=F.index)!=null?D:X.length;if(X[i]==null){if(F.id==null)throw new r({data:F,message:"Expected 'id' to be a string."});if(((w=F.function)==null?void 0:w.name)==null)throw new r({data:F,message:"Expected 'function.name' to be a string."});W.enqueue({type:"tool-input-start",id:F.id,toolName:F.function.name}),X[i]={id:F.id,type:"function",function:{name:F.function.name,arguments:(q=F.function.arguments)!=null?q:""},hasFinished:!1,thoughtSignature:(n=(k=(I=F.extra_content)==null?void 0:I.google)==null?void 0:k.thought_signature)!=null?n:void 0};let S=X[i];if(((d=S.function)==null?void 0:d.name)!=null&&((e=S.function)==null?void 0:e.arguments)!=null){if(S.function.arguments.length>0)W.enqueue({type:"tool-input-delta",id:S.id,delta:S.function.arguments});if(t(S.function.arguments))W.enqueue({type:"tool-input-end",id:S.id}),W.enqueue({type:"tool-call",toolCallId:(o=S.id)!=null?o:_(),toolName:S.function.name,input:S.function.arguments,...S.thoughtSignature?{providerMetadata:{[E]:{thoughtSignature:S.thoughtSignature}}}:{}}),S.hasFinished=!0}continue}let M=X[i];if(M.hasFinished)continue;if(((GG=F.function)==null?void 0:GG.arguments)!=null)M.function.arguments+=(XG=(QG=F.function)==null?void 0:QG.arguments)!=null?XG:"";if(W.enqueue({type:"tool-input-delta",id:M.id,delta:(YG=F.function.arguments)!=null?YG:""}),((ZG=M.function)==null?void 0:ZG.name)!=null&&(($G=M.function)==null?void 0:$G.arguments)!=null&&t(M.function.arguments))W.enqueue({type:"tool-input-end",id:M.id}),W.enqueue({type:"tool-call",toolCallId:(JG=M.id)!=null?JG:_(),toolName:M.function.name,input:M.function.arguments,...M.thoughtSignature?{providerMetadata:{[E]:{thoughtSignature:M.thoughtSignature}}}:{}}),M.hasFinished=!0}}},flush(K){var W,N,x,D,w;if(A)K.enqueue({type:"reasoning-end",id:"reasoning-0"});if(P)K.enqueue({type:"text-end",id:"txt-0"});for(let I of X.filter((k)=>!k.hasFinished))K.enqueue({type:"tool-input-end",id:I.id}),K.enqueue({type:"tool-call",toolCallId:(W=I.id)!=null?W:_(),toolName:I.function.name,input:I.function.arguments,...I.thoughtSignature?{providerMetadata:{[E]:{thoughtSignature:I.thoughtSignature}}}:{}});let q={[E]:{},...j==null?void 0:j.buildMetadata()};if(((N=$==null?void 0:$.completion_tokens_details)==null?void 0:N.accepted_prediction_tokens)!=null)q[E].acceptedPredictionTokens=(x=$==null?void 0:$.completion_tokens_details)==null?void 0:x.accepted_prediction_tokens;if(((D=$==null?void 0:$.completion_tokens_details)==null?void 0:D.rejected_prediction_tokens)!=null)q[E].rejectedPredictionTokens=(w=$==null?void 0:$.completion_tokens_details)==null?void 0:w.rejected_prediction_tokens;K.enqueue({type:"finish",finishReason:L,usage:jG($),providerMetadata:q})}})),request:{body:V},response:{headers:B}}}},FG=Q.looseObject({prompt_tokens:Q.number().nullish(),completion_tokens:Q.number().nullish(),total_tokens:Q.number().nullish(),prompt_tokens_details:Q.object({cached_tokens:Q.number().nullish()}).nullish(),completion_tokens_details:Q.object({reasoning_tokens:Q.number().nullish(),accepted_prediction_tokens:Q.number().nullish(),rejected_prediction_tokens:Q.number().nullish()}).nullish()}).nullish(),kG=Q.looseObject({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({message:Q.object({role:Q.literal("assistant").nullish(),content:Q.string().nullish(),reasoning_content:Q.string().nullish(),reasoning:Q.string().nullish(),tool_calls:Q.array(Q.object({id:Q.string().nullish(),function:Q.object({name:Q.string(),arguments:Q.string()}),extra_content:Q.object({google:Q.object({thought_signature:Q.string().nullish()}).nullish()}).nullish()})).nullish()}),finish_reason:Q.string().nullish()})),usage:FG}),fG=Q.looseObject({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({delta:Q.object({role:Q.enum(["assistant"]).nullish(),content:Q.string().nullish(),reasoning_content:Q.string().nullish(),reasoning:Q.string().nullish(),tool_calls:Q.array(Q.object({index:Q.number().nullish(),id:Q.string().nullish(),function:Q.object({name:Q.string().nullish(),arguments:Q.string().nullish()}),extra_content:Q.object({google:Q.object({thought_signature:Q.string().nullish()}).nullish()}).nullish()})).nullish()}).nullish(),finish_reason:Q.string().nullish()})),usage:FG}),OG=(G)=>Q.union([fG,G]);function BG(G){var Y,Z;if(G==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let U=(Y=G.prompt_tokens)!=null?Y:0,z=(Z=G.completion_tokens)!=null?Z:0;return{inputTokens:{total:U,noCache:U,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:z,text:z,reasoning:void 0},raw:G}}function vG({prompt:G,user:Y="user",assistant:Z="assistant"}){let U="";if(G[0].role==="system")U+=`${G[0].content}
|
|
3
3
|
|
|
4
4
|
`,G=G.slice(1);for(let{role:z,content:V}of G)switch(z){case"system":throw new AG({message:"Unexpected system message in prompt: ${content}",prompt:G});case"user":{let j=V.map((B)=>{switch(B.type){case"text":return B.text}}).filter(Boolean).join("");U+=`${Y}:
|
|
5
5
|
${j}
|
|
@@ -9,4 +9,4 @@ ${j}
|
|
|
9
9
|
|
|
10
10
|
`;break}case"tool":throw new T({functionality:"tool messages"});default:throw Error(`Unsupported role: ${z}`)}return U+=`${Z}:
|
|
11
11
|
`,{prompt:U,stopSequences:[`
|
|
12
|
-
${Y}:`]}}function VG({id:G,model:Y,created:Z}){return{id:G!=null?G:void 0,modelId:Y!=null?Y:void 0,timestamp:Z!=null?new Date(Z*1000):void 0}}function WG(G){switch(G){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var EG=Q.object({echo:Q.boolean().optional(),logitBias:Q.record(Q.string(),Q.number()).optional(),suffix:Q.string().optional(),user:Q.string().optional()}),CG=class{constructor(G,Y){this.specificationVersion="v3";var Z;this.modelId=G,this.config=Y;let U=(Z=Y.errorStructure)!=null?Z:m;this.chunkSchema=uG(U.errorSchema),this.failedResponseHandler=f(U)}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){var G,Y,Z;return(Z=(Y=(G=this.config).supportedUrls)==null?void 0:Y.call(G))!=null?Z:{}}async getArgs({prompt:G,maxOutputTokens:Y,temperature:Z,topP:U,topK:z,frequencyPenalty:V,presencePenalty:j,stopSequences:B,responseFormat:H,seed:X,providerOptions:L,tools:$,toolChoice:J}){var E,A;let P=[],K=Object.assign((E=await R({provider:this.providerOptionsName,providerOptions:L,schema:EG}))!=null?E:{},(A=await R({provider:h(this.providerOptionsName),providerOptions:L,schema:EG}))!=null?A:{});if(z!=null)P.push({type:"unsupported",feature:"topK"});if($==null?void 0:$.length)P.push({type:"unsupported",feature:"tools"});if(J!=null)P.push({type:"unsupported",feature:"toolChoice"});if(H!=null&&H.type!=="text")P.push({type:"unsupported",feature:"responseFormat",details:"JSON response format is not supported."});let{prompt:W,stopSequences:N}=vG({prompt:G}),x=[...N!=null?N:[],...B!=null?B:[]];return{args:{model:this.modelId,echo:K.echo,logit_bias:K.logitBias,suffix:K.suffix,user:K.user,max_tokens:Y,temperature:Z,top_p:U,frequency_penalty:V,presence_penalty:j,seed:X,...L==null?void 0:L[this.providerOptionsName],...L==null?void 0:L[h(this.providerOptionsName)],prompt:W,stop:x.length>0?x:void 0},warnings:P}}async doGenerate(G){let{args:Y,warnings:Z}=await this.getArgs(G),{responseHeaders:U,value:z,rawValue:V}=await b({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:y(this.config.headers(),G.headers),body:Y,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:O(hG),abortSignal:G.abortSignal,fetch:this.config.fetch}),j=z.choices[0],B=[];if(j.text!=null&&j.text.length>0)B.push({type:"text",text:j.text});return{content:B,usage:BG(z.usage),finishReason:{unified:WG(j.finish_reason),raw:j.finish_reason},request:{body:Y},response:{...VG(z),headers:U,body:V},warnings:Z}}async doStream(G){let{args:Y,warnings:Z}=await this.getArgs(G),U={...Y,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0},{responseHeaders:z,value:V}=await b({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:y(this.config.headers(),G.headers),body:U,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:s(this.chunkSchema),abortSignal:G.abortSignal,fetch:this.config.fetch}),j={unified:"other",raw:void 0},B=void 0,H=!0;return{stream:V.pipeThrough(new TransformStream({start(X){X.enqueue({type:"stream-start",warnings:Z})},transform(X,L){var $;if(G.includeRawChunks)L.enqueue({type:"raw",rawValue:X.rawValue});if(!X.success){j={unified:"error",raw:void 0},L.enqueue({type:"error",error:X.error});return}let J=X.value;if("error"in J){j={unified:"error",raw:void 0},L.enqueue({type:"error",error:J.error});return}if(H)H=!1,L.enqueue({type:"response-metadata",...VG(J)}),L.enqueue({type:"text-start",id:"0"});if(J.usage!=null)B=J.usage;let E=J.choices[0];if((E==null?void 0:E.finish_reason)!=null)j={unified:WG(E.finish_reason),raw:($=E.finish_reason)!=null?$:void 0};if((E==null?void 0:E.text)!=null)L.enqueue({type:"text-delta",id:"0",delta:E.text})},flush(X){if(!H)X.enqueue({type:"text-end",id:"0"});X.enqueue({type:"finish",finishReason:j,usage:BG(B)})}})),request:{body:U},response:{headers:z}}}},wG=Q.object({prompt_tokens:Q.number(),completion_tokens:Q.number(),total_tokens:Q.number()}),hG=Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({text:Q.string(),finish_reason:Q.string()})),usage:wG.nullish()}),uG=(G)=>Q.union([Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({text:Q.string(),finish_reason:Q.string().nullish(),index:Q.number()})),usage:wG.nullish()}),G]),a=Q.object({dimensions:Q.number().optional(),user:Q.string().optional()}),gG=class{constructor(G,Y){this.specificationVersion="v3",this.modelId=G,this.config=Y}get provider(){return this.config.provider}get maxEmbeddingsPerCall(){var G;return(G=this.config.maxEmbeddingsPerCall)!=null?G:2048}get supportsParallelCalls(){var G;return(G=this.config.supportsParallelCalls)!=null?G:!0}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}async doEmbed({values:G,headers:Y,abortSignal:Z,providerOptions:U}){var z,V,j;let B=[],H=await R({provider:"openai-compatible",providerOptions:U,schema:a});if(H!=null)B.push({type:"other",message:"The 'openai-compatible' key in providerOptions is deprecated. Use 'openaiCompatible' instead."});let X=Object.assign(H!=null?H:{},(z=await R({provider:"openaiCompatible",providerOptions:U,schema:a}))!=null?z:{},(V=await R({provider:this.providerOptionsName,providerOptions:U,schema:a}))!=null?V:{});if(G.length>this.maxEmbeddingsPerCall)throw new PG({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:G});let{responseHeaders:L,value:$,rawValue:J}=await b({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:y(this.config.headers(),Y),body:{model:this.modelId,input:G,encoding_format:"float",dimensions:X.dimensions,user:X.user},failedResponseHandler:f((j=this.config.errorStructure)!=null?j:m),successfulResponseHandler:O(_G),abortSignal:Z,fetch:this.config.fetch});return{warnings:B,embeddings:$.data.map((E)=>E.embedding),usage:$.usage?{tokens:$.usage.prompt_tokens}:void 0,providerMetadata:$.providerMetadata,response:{headers:L,body:J}}}},_G=Q.object({data:Q.array(Q.object({embedding:Q.array(Q.number())})),usage:Q.object({prompt_tokens:Q.number()}).nullish(),providerMetadata:Q.record(Q.string(),Q.record(Q.string(),Q.any())).optional()}),mG=class{constructor(G,Y){this.modelId=G,this.config=Y,this.specificationVersion="v3",this.maxImagesPerCall=10}get provider(){return this.config.provider}get providerOptionsKey(){return this.config.provider.split(".")[0].trim()}getArgs(G){return{...G[this.providerOptionsKey],...G[h(this.providerOptionsKey)]}}async doGenerate({prompt:G,n:Y,size:Z,aspectRatio:U,seed:z,providerOptions:V,headers:j,abortSignal:B,files:H,mask:X}){var L,$,J,E,A;let P=[];if(U!=null)P.push({type:"unsupported",feature:"aspectRatio",details:"This model does not support aspect ratio. Use `size` instead."});if(z!=null)P.push({type:"unsupported",feature:"seed"});let K=(J=($=(L=this.config._internal)==null?void 0:L.currentDate)==null?void 0:$.call(L))!=null?J:new Date,W=this.getArgs(V);if(H!=null&&H.length>0){let{value:D,responseHeaders:w}=await xG({url:this.config.url({path:"/images/edits",modelId:this.modelId}),headers:y(this.config.headers(),j),formData:qG({model:this.modelId,prompt:G,image:await Promise.all(H.map((q)=>KG(q))),mask:X!=null?await KG(X):void 0,n:Y,size:Z,...W}),failedResponseHandler:f((E=this.config.errorStructure)!=null?E:m),successfulResponseHandler:O(HG),abortSignal:B,fetch:this.config.fetch});return{images:D.data.map((q)=>q.b64_json),warnings:P,response:{timestamp:K,modelId:this.modelId,headers:w}}}let{value:N,responseHeaders:x}=await b({url:this.config.url({path:"/images/generations",modelId:this.modelId}),headers:y(this.config.headers(),j),body:{model:this.modelId,prompt:G,n:Y,size:Z,...W,response_format:"b64_json"},failedResponseHandler:f((A=this.config.errorStructure)!=null?A:m),successfulResponseHandler:O(HG),abortSignal:B,fetch:this.config.fetch});return{images:N.data.map((D)=>D.b64_json),warnings:P,response:{timestamp:K,modelId:this.modelId,headers:x}}}},HG=Q.object({data:Q.array(Q.object({b64_json:Q.string()}))});async function KG(G){if(G.type==="url")return NG(G.url);let Y=G.data instanceof Uint8Array?G.data:l(G.data);return new Blob([Y],{type:G.mediaType})}var dG="2.0.41";function jQ(G){let Y=IG(G.baseURL),Z=G.name,U={...G.apiKey&&{Authorization:`Bearer ${G.apiKey}`},...G.headers},z=()=>DG(U,`ai-sdk/openai-compatible/${dG}`),V=(J)=>({provider:`${Z}.${J}`,url:({path:E})=>{let A=new URL(`${Y}${E}`);if(G.queryParams)A.search=new URLSearchParams(G.queryParams).toString();return A.toString()},headers:z,fetch:G.fetch}),j=(J)=>B(J),B=(J)=>new bG(J,{...V("chat"),includeUsage:G.includeUsage,supportsStructuredOutputs:G.supportsStructuredOutputs,transformRequestBody:G.transformRequestBody,metadataExtractor:G.metadataExtractor}),H=(J)=>new CG(J,{...V("completion"),includeUsage:G.includeUsage}),X=(J)=>new gG(J,{...V("embedding")}),L=(J)=>new mG(J,V("image")),$=(J)=>j(J);return $.specificationVersion="v3",$.languageModel=j,$.chatModel=B,$.completionModel=H,$.embeddingModel=X,$.textEmbeddingModel=X,$.imageModel=L,$}export{bG as
|
|
12
|
+
${Y}:`]}}function VG({id:G,model:Y,created:Z}){return{id:G!=null?G:void 0,modelId:Y!=null?Y:void 0,timestamp:Z!=null?new Date(Z*1000):void 0}}function WG(G){switch(G){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"other"}}var EG=Q.object({echo:Q.boolean().optional(),logitBias:Q.record(Q.string(),Q.number()).optional(),suffix:Q.string().optional(),user:Q.string().optional()}),CG=class{constructor(G,Y){this.specificationVersion="v3";var Z;this.modelId=G,this.config=Y;let U=(Z=Y.errorStructure)!=null?Z:m;this.chunkSchema=uG(U.errorSchema),this.failedResponseHandler=f(U)}get provider(){return this.config.provider}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}get supportedUrls(){var G,Y,Z;return(Z=(Y=(G=this.config).supportedUrls)==null?void 0:Y.call(G))!=null?Z:{}}async getArgs({prompt:G,maxOutputTokens:Y,temperature:Z,topP:U,topK:z,frequencyPenalty:V,presencePenalty:j,stopSequences:B,responseFormat:H,seed:X,providerOptions:L,tools:$,toolChoice:J}){var E,A;let P=[],K=Object.assign((E=await R({provider:this.providerOptionsName,providerOptions:L,schema:EG}))!=null?E:{},(A=await R({provider:h(this.providerOptionsName),providerOptions:L,schema:EG}))!=null?A:{});if(z!=null)P.push({type:"unsupported",feature:"topK"});if($==null?void 0:$.length)P.push({type:"unsupported",feature:"tools"});if(J!=null)P.push({type:"unsupported",feature:"toolChoice"});if(H!=null&&H.type!=="text")P.push({type:"unsupported",feature:"responseFormat",details:"JSON response format is not supported."});let{prompt:W,stopSequences:N}=vG({prompt:G}),x=[...N!=null?N:[],...B!=null?B:[]];return{args:{model:this.modelId,echo:K.echo,logit_bias:K.logitBias,suffix:K.suffix,user:K.user,max_tokens:Y,temperature:Z,top_p:U,frequency_penalty:V,presence_penalty:j,seed:X,...L==null?void 0:L[this.providerOptionsName],...L==null?void 0:L[h(this.providerOptionsName)],prompt:W,stop:x.length>0?x:void 0},warnings:P}}async doGenerate(G){let{args:Y,warnings:Z}=await this.getArgs(G),{responseHeaders:U,value:z,rawValue:V}=await b({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:y(this.config.headers(),G.headers),body:Y,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:O(hG),abortSignal:G.abortSignal,fetch:this.config.fetch}),j=z.choices[0],B=[];if(j.text!=null&&j.text.length>0)B.push({type:"text",text:j.text});return{content:B,usage:BG(z.usage),finishReason:{unified:WG(j.finish_reason),raw:j.finish_reason},request:{body:Y},response:{...VG(z),headers:U,body:V},warnings:Z}}async doStream(G){let{args:Y,warnings:Z}=await this.getArgs(G),U={...Y,stream:!0,stream_options:this.config.includeUsage?{include_usage:!0}:void 0},{responseHeaders:z,value:V}=await b({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:y(this.config.headers(),G.headers),body:U,failedResponseHandler:this.failedResponseHandler,successfulResponseHandler:s(this.chunkSchema),abortSignal:G.abortSignal,fetch:this.config.fetch}),j={unified:"other",raw:void 0},B=void 0,H=!0;return{stream:V.pipeThrough(new TransformStream({start(X){X.enqueue({type:"stream-start",warnings:Z})},transform(X,L){var $;if(G.includeRawChunks)L.enqueue({type:"raw",rawValue:X.rawValue});if(!X.success){j={unified:"error",raw:void 0},L.enqueue({type:"error",error:X.error});return}let J=X.value;if("error"in J){j={unified:"error",raw:void 0},L.enqueue({type:"error",error:J.error});return}if(H)H=!1,L.enqueue({type:"response-metadata",...VG(J)}),L.enqueue({type:"text-start",id:"0"});if(J.usage!=null)B=J.usage;let E=J.choices[0];if((E==null?void 0:E.finish_reason)!=null)j={unified:WG(E.finish_reason),raw:($=E.finish_reason)!=null?$:void 0};if((E==null?void 0:E.text)!=null)L.enqueue({type:"text-delta",id:"0",delta:E.text})},flush(X){if(!H)X.enqueue({type:"text-end",id:"0"});X.enqueue({type:"finish",finishReason:j,usage:BG(B)})}})),request:{body:U},response:{headers:z}}}},wG=Q.object({prompt_tokens:Q.number(),completion_tokens:Q.number(),total_tokens:Q.number()}),hG=Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({text:Q.string(),finish_reason:Q.string()})),usage:wG.nullish()}),uG=(G)=>Q.union([Q.object({id:Q.string().nullish(),created:Q.number().nullish(),model:Q.string().nullish(),choices:Q.array(Q.object({text:Q.string(),finish_reason:Q.string().nullish(),index:Q.number()})),usage:wG.nullish()}),G]),a=Q.object({dimensions:Q.number().optional(),user:Q.string().optional()}),gG=class{constructor(G,Y){this.specificationVersion="v3",this.modelId=G,this.config=Y}get provider(){return this.config.provider}get maxEmbeddingsPerCall(){var G;return(G=this.config.maxEmbeddingsPerCall)!=null?G:2048}get supportsParallelCalls(){var G;return(G=this.config.supportsParallelCalls)!=null?G:!0}get providerOptionsName(){return this.config.provider.split(".")[0].trim()}async doEmbed({values:G,headers:Y,abortSignal:Z,providerOptions:U}){var z,V,j;let B=[],H=await R({provider:"openai-compatible",providerOptions:U,schema:a});if(H!=null)B.push({type:"other",message:"The 'openai-compatible' key in providerOptions is deprecated. Use 'openaiCompatible' instead."});let X=Object.assign(H!=null?H:{},(z=await R({provider:"openaiCompatible",providerOptions:U,schema:a}))!=null?z:{},(V=await R({provider:this.providerOptionsName,providerOptions:U,schema:a}))!=null?V:{});if(G.length>this.maxEmbeddingsPerCall)throw new PG({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:G});let{responseHeaders:L,value:$,rawValue:J}=await b({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:y(this.config.headers(),Y),body:{model:this.modelId,input:G,encoding_format:"float",dimensions:X.dimensions,user:X.user},failedResponseHandler:f((j=this.config.errorStructure)!=null?j:m),successfulResponseHandler:O(_G),abortSignal:Z,fetch:this.config.fetch});return{warnings:B,embeddings:$.data.map((E)=>E.embedding),usage:$.usage?{tokens:$.usage.prompt_tokens}:void 0,providerMetadata:$.providerMetadata,response:{headers:L,body:J}}}},_G=Q.object({data:Q.array(Q.object({embedding:Q.array(Q.number())})),usage:Q.object({prompt_tokens:Q.number()}).nullish(),providerMetadata:Q.record(Q.string(),Q.record(Q.string(),Q.any())).optional()}),mG=class{constructor(G,Y){this.modelId=G,this.config=Y,this.specificationVersion="v3",this.maxImagesPerCall=10}get provider(){return this.config.provider}get providerOptionsKey(){return this.config.provider.split(".")[0].trim()}getArgs(G){return{...G[this.providerOptionsKey],...G[h(this.providerOptionsKey)]}}async doGenerate({prompt:G,n:Y,size:Z,aspectRatio:U,seed:z,providerOptions:V,headers:j,abortSignal:B,files:H,mask:X}){var L,$,J,E,A;let P=[];if(U!=null)P.push({type:"unsupported",feature:"aspectRatio",details:"This model does not support aspect ratio. Use `size` instead."});if(z!=null)P.push({type:"unsupported",feature:"seed"});let K=(J=($=(L=this.config._internal)==null?void 0:L.currentDate)==null?void 0:$.call(L))!=null?J:new Date,W=this.getArgs(V);if(H!=null&&H.length>0){let{value:D,responseHeaders:w}=await xG({url:this.config.url({path:"/images/edits",modelId:this.modelId}),headers:y(this.config.headers(),j),formData:qG({model:this.modelId,prompt:G,image:await Promise.all(H.map((q)=>KG(q))),mask:X!=null?await KG(X):void 0,n:Y,size:Z,...W}),failedResponseHandler:f((E=this.config.errorStructure)!=null?E:m),successfulResponseHandler:O(HG),abortSignal:B,fetch:this.config.fetch});return{images:D.data.map((q)=>q.b64_json),warnings:P,response:{timestamp:K,modelId:this.modelId,headers:w}}}let{value:N,responseHeaders:x}=await b({url:this.config.url({path:"/images/generations",modelId:this.modelId}),headers:y(this.config.headers(),j),body:{model:this.modelId,prompt:G,n:Y,size:Z,...W,response_format:"b64_json"},failedResponseHandler:f((A=this.config.errorStructure)!=null?A:m),successfulResponseHandler:O(HG),abortSignal:B,fetch:this.config.fetch});return{images:N.data.map((D)=>D.b64_json),warnings:P,response:{timestamp:K,modelId:this.modelId,headers:x}}}},HG=Q.object({data:Q.array(Q.object({b64_json:Q.string()}))});async function KG(G){if(G.type==="url")return NG(G.url);let Y=G.data instanceof Uint8Array?G.data:l(G.data);return new Blob([Y],{type:G.mediaType})}var dG="2.0.41";function jQ(G){let Y=IG(G.baseURL),Z=G.name,U={...G.apiKey&&{Authorization:`Bearer ${G.apiKey}`},...G.headers},z=()=>DG(U,`ai-sdk/openai-compatible/${dG}`),V=(J)=>({provider:`${Z}.${J}`,url:({path:E})=>{let A=new URL(`${Y}${E}`);if(G.queryParams)A.search=new URLSearchParams(G.queryParams).toString();return A.toString()},headers:z,fetch:G.fetch}),j=(J)=>B(J),B=(J)=>new bG(J,{...V("chat"),includeUsage:G.includeUsage,supportsStructuredOutputs:G.supportsStructuredOutputs,transformRequestBody:G.transformRequestBody,metadataExtractor:G.metadataExtractor}),H=(J)=>new CG(J,{...V("completion"),includeUsage:G.includeUsage}),X=(J)=>new gG(J,{...V("embedding")}),L=(J)=>new mG(J,V("image")),$=(J)=>j(J);return $.specificationVersion="v3",$.languageModel=j,$.chatModel=B,$.completionModel=H,$.embeddingModel=X,$.textEmbeddingModel=X,$.imageModel=L,$}export{bG as if,CG as jf,gG as kf,mG as lf,dG as mf,jQ as nf};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Bd as H,Cd as I}from"./chunk-rgecc41f.js";import{Qd as G}from"./chunk-g4qwkcdv.js";import{Nf as B}from"./chunk-j9s62g01.js";import{$f as E}from"./chunk-bqs6a1ts.js";import"./chunk-cjxp72dv.js";import"./chunk-2rxt1s22.js";import"./chunk-w98r39gd.js";import"./chunk-atd0q4v8.js";import"./chunk-nfg7nt13.js";import"./chunk-aqm597px.js";import"./chunk-8gy99gfb.js";import"./chunk-87x607rz.js";import"./chunk-9w5rx0fb.js";import"./chunk-wb69d52j.js";import"./chunk-pfn1db1m.js";import"./chunk-h56jxxvj.js";import"./chunk-x36jhtex.js";import"./chunk-c1ypbbka.js";import"./chunk-qnqqrvvs.js";import"./chunk-3f054f69.js";import"./chunk-26qt44f1.js";import"./chunk-0ke6x10y.js";import"./chunk-meaybtcc.js";import"./chunk-rmsqb6r4.js";import"./chunk-3j7skhxg.js";import"./chunk-4pssh5d3.js";import"./chunk-9dpn4792.js";import"./chunk-pf7cj4jd.js";import{Sn as D}from"./chunk-9r6bvkp4.js";import"./chunk-amx3x4kd.js";import"./chunk-b50t4jc5.js";import"./chunk-nf8gkxbk.js";import"./chunk-zny2qaqa.js";import"./chunk-9va5eh9s.js";import"./chunk-mkyrg7gt.js";import"./chunk-7v4fzkbb.js";import"./chunk-cqtkxwd8.js";import"./chunk-pk0tytcm.js";import"./chunk-ww8ear80.js";import"./chunk-kyny0t2g.js";import"./chunk-3e8p4a3y.js";import"./chunk-qpm5afdz.js";import"./chunk-jtrcnpm7.js";import"./chunk-gaen9ya4.js";import"./chunk-dd11kryy.js";import"./chunk-msm3r7ny.js";import"./chunk-e075v4e9.js";import"./chunk-jv98gw88.js";import"./chunk-jhq5bvhs.js";import"./chunk-xw283h2r.js";import"./chunk-8cty50g7.js";import{ts as f}from"./chunk-v7ah9gg0.js";import"./chunk-d0m7nbbx.js";import"./chunk-vfj5nwab.js";import"./chunk-7w84hfxs.js";import"./chunk-ym4ydwrz.js";import"./chunk-vmgknvxs.js";import"./chunk-p409grvp.js";import"./chunk-ag9thqkv.js";import"./chunk-qnv2v02g.js";import"./chunk-7fx6x8x9.js";import"./chunk-0rmmg3g4.js";var T=G({command:"serve",builder:(b)=>B(b).option("auto-password",{type:"boolean",default:!1,describe:"generate a random ephemeral QITQODE_SERVER_PASSWORD for this run and print it"}),describe:"starts a headless qitqode server",handler:async(b)=>{let A=await H(b);if(b["auto-password"]&&!f.QITQODE_SERVER_PASSWORD){let z=crypto.randomUUID();process.env.QITQODE_SERVER_PASSWORD=z,console.log('Generated ephemeral server password (basic auth, username "qitqode"):'),console.log(` ${z}`)}if(I(A,f.QITQODE_SERVER_PASSWORD))console.error("ERROR: Binding to non-loopback address without QITQODE_SERVER_PASSWORD is not allowed."),console.error("Set QITQODE_SERVER_PASSWORD, pass --auto-password, or pass --no-auth to override (DANGEROUS)."),process.exit(1);if(!f.QITQODE_SERVER_PASSWORD)console.error(""),console.error("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"),console.error("\u2551 WARNING: server is running WITHOUT authentication. \u2551"),console.error("\u2551 \u2551"),console.error("\u2551 Any process or browser page that can reach this address can read \u2551"),console.error("\u2551 project files, run shell commands, and open terminals as you. \u2551"),console.error("\u2551 \u2551"),console.error("\u2551 Set QITQODE_SERVER_PASSWORD, or restart with --auto-password to \u2551"),console.error("\u2551 generate an ephemeral password for this run. \u2551"),console.error("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),console.error("");if(process.env.QITQODE_KEY)console.log("Using QITQODE_KEY for authentication.");else if(!await D())console.error("Warning: no QitQode credential found. AI features will not work until you sign in (`qitqode auth login`) or set QITQODE_KEY.");let j=await E.listen(A);console.log(`qitqode server listening on http://${j.hostname}:${j.port}`),await new Promise(()=>{}),await j.stop()}});export{T as ServeCommand};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{th as a,uh as b}from"./chunk-87x607rz.js";import"./chunk-9w5rx0fb.js";import"./chunk-wb69d52j.js";import"./chunk-pfn1db1m.js";import"./chunk-h56jxxvj.js";import"./chunk-x36jhtex.js";import"./chunk-c1ypbbka.js";import"./chunk-qnqqrvvs.js";import"./chunk-3f054f69.js";import"./chunk-26qt44f1.js";import"./chunk-0ke6x10y.js";import"./chunk-meaybtcc.js";import"./chunk-rmsqb6r4.js";import"./chunk-3j7skhxg.js";import"./chunk-4pssh5d3.js";import"./chunk-9dpn4792.js";import"./chunk-pf7cj4jd.js";import"./chunk-9r6bvkp4.js";import"./chunk-amx3x4kd.js";import"./chunk-b50t4jc5.js";import"./chunk-nf8gkxbk.js";import"./chunk-zny2qaqa.js";import"./chunk-9va5eh9s.js";import"./chunk-mkyrg7gt.js";import"./chunk-7v4fzkbb.js";import"./chunk-cqtkxwd8.js";import"./chunk-pk0tytcm.js";import"./chunk-ww8ear80.js";import"./chunk-kyny0t2g.js";import"./chunk-3e8p4a3y.js";import"./chunk-qpm5afdz.js";import"./chunk-jtrcnpm7.js";import"./chunk-gaen9ya4.js";import"./chunk-dd11kryy.js";import"./chunk-msm3r7ny.js";import"./chunk-e075v4e9.js";import"./chunk-jv98gw88.js";import"./chunk-jhq5bvhs.js";import"./chunk-xw283h2r.js";import"./chunk-8cty50g7.js";import"./chunk-v7ah9gg0.js";import"./chunk-d0m7nbbx.js";import"./chunk-vfj5nwab.js";import"./chunk-7w84hfxs.js";import"./chunk-ym4ydwrz.js";import"./chunk-vmgknvxs.js";import"./chunk-p409grvp.js";import"./chunk-ag9thqkv.js";import"./chunk-qnv2v02g.js";import"./chunk-7fx6x8x9.js";import"./chunk-0rmmg3g4.js";export{b as AppRuntime,a as AppLayer};
|