@qitqode/qitqode-android-arm64 0.2.9 → 0.2.11
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-06j0gaen.js +2 -0
- package/bundle/{chunk-g4tyaj0m.js → chunk-075gkea2.js} +1 -1
- package/bundle/{chunk-8ysp6vf8.js → chunk-09n24ztn.js} +1 -1
- package/bundle/chunk-0bn86djg.js +3 -0
- package/bundle/chunk-0mm40z8g.js +2 -0
- package/bundle/{chunk-s2tc3qs0.js → chunk-0tya4pqb.js} +2 -2
- package/bundle/{chunk-0s4cp6q2.js → chunk-1dnvdeat.js} +2 -2
- package/bundle/chunk-1h9sc0gy.js +2 -0
- package/bundle/chunk-1mqfhw0f.js +2 -0
- package/bundle/{chunk-b5ym419d.js → chunk-1p39y33b.js} +2 -2
- package/bundle/{chunk-5cw8235e.js → chunk-1pd943m9.js} +1 -1
- package/bundle/{chunk-m7tmgvh6.js → chunk-1rsabv4p.js} +1 -1
- package/bundle/{chunk-dwkrqtbc.js → chunk-1tdy73ha.js} +2 -2
- package/bundle/{chunk-phf37x1c.js → chunk-1yh1f9yj.js} +1 -1
- package/bundle/chunk-22wa8zty.js +2 -0
- package/bundle/chunk-28kte9rt.js +2 -0
- package/bundle/chunk-2dhjehxe.js +2 -0
- package/bundle/{chunk-kre93a89.js → chunk-2h8b0csf.js} +2 -2
- package/bundle/chunk-2nnfxbd2.js +2 -0
- package/bundle/{chunk-j10a984e.js → chunk-2ts74cgq.js} +2 -2
- package/bundle/{chunk-cfwz1hgr.js → chunk-2vsqsxe1.js} +3 -3
- package/bundle/chunk-2w5zmgpb.js +2 -0
- package/bundle/{chunk-8yzghzjq.js → chunk-32x2901e.js} +1 -1
- package/bundle/chunk-34qt3fqj.js +2 -0
- package/bundle/{chunk-5r7c6vvx.js → chunk-3amgvg81.js} +2 -2
- package/bundle/{chunk-0w19vmd7.js → chunk-3hawwbw6.js} +2 -2
- package/bundle/chunk-3p0xvt47.js +2 -0
- package/bundle/chunk-3pzx5ret.js +2 -0
- package/bundle/{chunk-nsp1za8t.js → chunk-3tf7xfw5.js} +2 -2
- package/bundle/chunk-3y4rmqmm.js +2 -0
- package/bundle/{chunk-wd8f9r4k.js → chunk-42gd2vx4.js} +1 -1
- package/bundle/{chunk-702bt91p.js → chunk-43eqr0ds.js} +4 -4
- package/bundle/{chunk-1p9s5jj1.js → chunk-43x9n8rp.js} +1 -1
- package/bundle/{chunk-13jq2ygc.js → chunk-44685nzw.js} +2 -2
- package/bundle/chunk-46ewdxgh.js +2 -0
- package/bundle/{chunk-makegrxs.js → chunk-4805mxf7.js} +1 -1
- package/bundle/chunk-486874bd.js +2 -0
- package/bundle/{chunk-7adsab4h.js → chunk-48y4n9ne.js} +1 -1
- package/bundle/{chunk-vr8nwzp0.js → chunk-49brdmgp.js} +1 -1
- package/bundle/{chunk-az3nss5m.js → chunk-49we3vy1.js} +2 -2
- package/bundle/chunk-4bcbvfsw.js +2 -0
- package/bundle/{chunk-eewe7tx1.js → chunk-4c6d1wy1.js} +2 -2
- package/bundle/{chunk-p8ak162p.js → chunk-4d9s7cgr.js} +1 -1
- package/bundle/{chunk-scnbt714.js → chunk-4ngvj758.js} +1 -1
- package/bundle/{chunk-060wbpz4.js → chunk-4q14whpc.js} +1 -1
- package/bundle/chunk-4t1ysdag.js +2 -0
- package/bundle/{chunk-g9nwqwqp.js → chunk-50knjq36.js} +1 -1
- package/bundle/{chunk-fs1vb39f.js → chunk-51vn4f06.js} +3 -3
- package/bundle/{chunk-ag8wxwwz.js → chunk-5mgmq6yz.js} +1 -1
- package/bundle/chunk-5q7a4h2w.js +2 -0
- package/bundle/{chunk-rdreeyv0.js → chunk-5qydhr42.js} +3 -3
- package/bundle/{chunk-maa21rh9.js → chunk-611wfdn3.js} +1 -1
- package/bundle/{chunk-n6tqtk6h.js → chunk-63t0rhc9.js} +2 -2
- package/bundle/chunk-63vamhf7.js +2 -0
- package/bundle/chunk-6hhv3n7c.js +2 -0
- package/bundle/{chunk-gbkz04ke.js → chunk-6p848y99.js} +1 -1
- package/bundle/{chunk-f2v4g7t1.js → chunk-6xx66mr1.js} +1 -1
- package/bundle/{chunk-7thhd7ds.js → chunk-71h3pmnn.js} +1 -1
- package/bundle/{chunk-k3m7jfdh.js → chunk-78e76m4h.js} +1 -1
- package/bundle/{chunk-vbfej8ds.js → chunk-78yvbv9b.js} +2 -2
- package/bundle/chunk-7a9kfb2n.js +2 -0
- package/bundle/chunk-7b5vney6.js +2 -0
- package/bundle/{chunk-fh3d0wce.js → chunk-7jvx29js.js} +1 -1
- package/bundle/{chunk-zqdjk4rf.js → chunk-7wshaze9.js} +2 -2
- package/bundle/{chunk-rye1yjnr.js → chunk-7x4g7h04.js} +1 -1
- package/bundle/chunk-7x9m1smk.js +2 -0
- package/bundle/chunk-82mnr6sf.js +2 -0
- package/bundle/{chunk-0egrckx0.js → chunk-84qx54nf.js} +2 -2
- package/bundle/{chunk-1acn5me8.js → chunk-88hmeyf5.js} +327 -313
- package/bundle/{chunk-gsg6zn7e.js → chunk-89b6ttzs.js} +2 -2
- package/bundle/chunk-8bea2r6p.js +2 -0
- package/bundle/{chunk-pqg1wjb5.js → chunk-8gn7r4kb.js} +1 -1
- package/bundle/chunk-8h6mhzhg.js +2 -0
- package/bundle/chunk-8n1cmvr7.js +2 -0
- package/bundle/{chunk-e2wfj86b.js → chunk-8qbhnwej.js} +1 -1
- package/bundle/{chunk-0ffmwhw7.js → chunk-8rbbt1s8.js} +1 -1
- package/bundle/{chunk-zfrftgcy.js → chunk-8rc7cvex.js} +1 -1
- package/bundle/{chunk-rk0fnvp5.js → chunk-8t17w67q.js} +1 -1
- package/bundle/{chunk-h8mfbbjh.js → chunk-8y03p2md.js} +2 -2
- package/bundle/{chunk-3bb4aqh9.js → chunk-8z65v9c9.js} +1 -1
- package/bundle/{chunk-ggncq8w8.js → chunk-92xxg12q.js} +1 -1
- package/bundle/chunk-955zj1y6.js +2 -0
- package/bundle/{chunk-m4r8sepw.js → chunk-95tec4gm.js} +1 -1
- package/bundle/chunk-95vp9bvk.js +2 -0
- package/bundle/{chunk-cf9m9m9q.js → chunk-96nmxprr.js} +1 -1
- package/bundle/{chunk-jpn9zfj5.js → chunk-98z5pfvj.js} +1 -1
- package/bundle/{chunk-s5aefff0.js → chunk-9d2mtevw.js} +1 -1
- package/bundle/{chunk-qk5vy2pr.js → chunk-9d8meavf.js} +1 -1
- package/bundle/{chunk-fw1f47de.js → chunk-9gs4en9v.js} +1 -1
- package/bundle/{chunk-e0vrxetq.js → chunk-9svh74gt.js} +1 -1
- package/bundle/chunk-9wzxnwv7.js +2 -0
- package/bundle/chunk-9zve998d.js +2 -0
- package/bundle/chunk-a2pd7nt5.js +2 -0
- package/bundle/{chunk-ntr0ezf2.js → chunk-a4cmpa56.js} +1 -1
- package/bundle/chunk-a9bkr9x4.js +2 -0
- package/bundle/chunk-ac5vzpzt.js +2 -0
- package/bundle/{chunk-qbnt4ynd.js → chunk-ajgwyrcf.js} +2 -2
- package/bundle/{chunk-c8k32724.js → chunk-ajyfms68.js} +1 -1
- package/bundle/{chunk-5wx962mw.js → chunk-akrcbxfa.js} +1 -1
- package/bundle/{chunk-vs3s49jw.js → chunk-aykvrqrp.js} +2 -2
- package/bundle/{chunk-f4mnp6xd.js → chunk-b274mb6v.js} +1 -1
- package/bundle/{chunk-1v0khv7p.js → chunk-b79bb2g3.js} +1 -1
- package/bundle/{chunk-wtxh5m6j.js → chunk-bd66q24j.js} +3 -3
- package/bundle/{chunk-72crs18f.js → chunk-bffm0wv9.js} +1 -1
- package/bundle/{chunk-zwhmg9dj.js → chunk-bh1zbz62.js} +1 -1
- package/bundle/chunk-bqqxvagz.js +14 -0
- package/bundle/{chunk-gznt3dv8.js → chunk-bw0951fs.js} +1 -1
- package/bundle/chunk-bwzbcwff.js +2 -0
- package/bundle/{chunk-4y9wbfd2.js → chunk-bxc3z38f.js} +2 -2
- package/bundle/{chunk-kveztc6k.js → chunk-bzz2expb.js} +1 -1
- package/bundle/chunk-c1exgasy.js +2 -0
- package/bundle/{chunk-dt3bsmfe.js → chunk-c53ev0da.js} +2 -2
- package/bundle/{chunk-0tm6589k.js → chunk-c5n49vrd.js} +2 -2
- package/bundle/{chunk-e0hha3be.js → chunk-ccghr6pm.js} +1 -1
- package/bundle/{chunk-52xvhxek.js → chunk-cg7zeppb.js} +2 -2
- package/bundle/chunk-cgxzmkkf.js +2 -0
- package/bundle/{chunk-0z1keh2w.js → chunk-cm7yp259.js} +1 -1
- package/bundle/chunk-cs3cbfm8.js +2 -0
- package/bundle/{chunk-w7a33cwa.js → chunk-cshsqavb.js} +2 -2
- package/bundle/{chunk-2kh0tg92.js → chunk-csmdhh7r.js} +2 -2
- package/bundle/{chunk-w0nc0gcx.js → chunk-cydpdkx7.js} +1 -1
- package/bundle/{chunk-vsqvnxbz.js → chunk-czfjmrrq.js} +1 -1
- package/bundle/{chunk-bc2krtaf.js → chunk-d1j8frtq.js} +1 -1
- package/bundle/chunk-d29te4c1.js +2 -0
- package/bundle/{chunk-sz0favtz.js → chunk-d39e4fa8.js} +1 -1
- package/bundle/chunk-d6q42p18.js +2 -0
- package/bundle/{chunk-ax64ngf2.js → chunk-d6qs2pbx.js} +1 -1
- package/bundle/{chunk-wgkcyqn1.js → chunk-datctfgt.js} +2 -2
- package/bundle/chunk-dfbexagg.js +2 -0
- package/bundle/chunk-dfkcp43a.js +2 -0
- package/bundle/chunk-dps1p1g1.js +2 -0
- package/bundle/{chunk-z0kbyr00.js → chunk-dzw0j790.js} +2 -2
- package/bundle/chunk-e1fzgez5.js +2 -0
- package/bundle/chunk-e5cds19n.js +4 -0
- package/bundle/{chunk-wr6rnxr5.js → chunk-e6ckxkj8.js} +1 -1
- package/bundle/chunk-e7a50j2w.js +2 -0
- package/bundle/chunk-e9vh8d52.js +8 -0
- package/bundle/chunk-eftk07r3.js +3 -0
- package/bundle/chunk-egcvm4x2.js +3 -0
- package/bundle/chunk-ek3b08ed.js +2 -0
- package/bundle/chunk-ep92grvg.js +808 -0
- package/bundle/{chunk-7pckez5z.js → chunk-ex47pb9n.js} +2 -2
- package/bundle/{chunk-dhvx9p54.js → chunk-eya9c81t.js} +1 -1
- package/bundle/chunk-f78yth0b.js +2 -0
- package/bundle/{chunk-kgv68cpb.js → chunk-fd6qxjtf.js} +1 -1
- package/bundle/{chunk-b7sr9rn3.js → chunk-fnmq42y5.js} +1 -1
- package/bundle/chunk-fqvrxy41.js +2 -0
- package/bundle/{chunk-wtt5wms9.js → chunk-fqvsxg00.js} +1 -1
- package/bundle/{chunk-sy9w1t2y.js → chunk-fsagyvkz.js} +1 -1
- package/bundle/{chunk-trstb8ee.js → chunk-fzxqn4j0.js} +1 -1
- package/bundle/{chunk-7jy53zqy.js → chunk-g7jwp73v.js} +1 -1
- package/bundle/{chunk-27saej0r.js → chunk-g83d3a0t.js} +2 -2
- package/bundle/chunk-gamnnfna.js +2 -0
- package/bundle/{chunk-0a4pmkc9.js → chunk-gfer8ch3.js} +2 -2
- package/bundle/{chunk-2nheahmq.js → chunk-ghdegwnr.js} +1 -1
- package/bundle/chunk-gjxhz1a6.js +2 -0
- package/bundle/chunk-gpm39v12.js +2 -0
- package/bundle/chunk-gr8emzzx.js +2 -0
- package/bundle/chunk-gt6h68pk.js +2 -0
- package/bundle/{chunk-3z2zn8rj.js → chunk-gz8k40ty.js} +1 -1
- package/bundle/{chunk-bwadggys.js → chunk-h6kmpgak.js} +2 -2
- package/bundle/{chunk-t3w43rft.js → chunk-h8yf5e2e.js} +1 -1
- package/bundle/{chunk-ryrxgn6d.js → chunk-hama2v6a.js} +1 -1
- package/bundle/{chunk-3va85mbe.js → chunk-hav9pgf3.js} +2 -2
- package/bundle/chunk-hj588j4f.js +2 -0
- package/bundle/{chunk-nas631g2.js → chunk-hntsg7q4.js} +1 -1
- package/bundle/chunk-hqtex91e.js +2 -0
- package/bundle/{chunk-mr17tppa.js → chunk-hts68y73.js} +2 -2
- package/bundle/{chunk-2vaphpz0.js → chunk-j5dnzqjy.js} +1 -1
- package/bundle/{chunk-6tqbnxar.js → chunk-j7d3v0x2.js} +1 -1
- package/bundle/{chunk-1rgt2vmt.js → chunk-jcn8bg31.js} +1 -1
- package/bundle/{chunk-8p0t8qah.js → chunk-jf4zyy7r.js} +1 -1
- package/bundle/{chunk-sm1g81cv.js → chunk-jfe9f2wv.js} +1 -1
- package/bundle/{chunk-k6981ysw.js → chunk-jh2za7y4.js} +3 -3
- package/bundle/chunk-jmgpr5th.js +2 -0
- package/bundle/chunk-jt79yt0t.js +2 -0
- package/bundle/{chunk-t8fjgkp8.js → chunk-jt7g0r2j.js} +2 -2
- package/bundle/chunk-jtz5re73.js +2 -0
- package/bundle/{chunk-g6y2c5az.js → chunk-k232ny9m.js} +1 -1
- package/bundle/{chunk-vkkz40je.js → chunk-k4ajben7.js} +2 -2
- package/bundle/chunk-k4bj677f.js +3 -0
- package/bundle/{chunk-mv7q6ach.js → chunk-k4d8gwxe.js} +1 -1
- package/bundle/{chunk-h1bvqstw.js → chunk-k558fr15.js} +1 -1
- package/bundle/{chunk-85wh85pk.js → chunk-k56zj08h.js} +1 -1
- package/bundle/{chunk-a1z8rnq7.js → chunk-k5swnh8m.js} +4 -4
- package/bundle/{chunk-bkfafcbw.js → chunk-k8zbhj2p.js} +2 -2
- package/bundle/{chunk-vd8cmdpv.js → chunk-kr975sx0.js} +1 -1
- package/bundle/{chunk-ydgst3h8.js → chunk-krk24aqm.js} +2 -2
- package/bundle/{chunk-eg1m81ax.js → chunk-kt982884.js} +1 -1
- package/bundle/chunk-kw5z5awx.js +2 -0
- package/bundle/{chunk-d839fr0w.js → chunk-kxdw2vtq.js} +2 -2
- package/bundle/chunk-m8phqgxp.js +7 -0
- package/bundle/{chunk-kckr30tf.js → chunk-mazakqr7.js} +1 -1
- package/bundle/{chunk-1bxfzd6r.js → chunk-mnxcykeq.js} +4 -4
- package/bundle/chunk-mp42gb6q.js +2 -0
- package/bundle/{chunk-eyr5ymt8.js → chunk-mp5m0acf.js} +1 -1
- package/bundle/chunk-mq0733qh.js +2 -0
- package/bundle/chunk-mrcsatmn.js +2 -0
- package/bundle/{chunk-0tcggtwv.js → chunk-n230jbn9.js} +1 -1
- package/bundle/chunk-n24yx79r.js +5 -0
- package/bundle/{chunk-cr5tknvb.js → chunk-n2ytaxyn.js} +1 -1
- package/bundle/chunk-n4fwztya.js +2 -0
- package/bundle/{chunk-bpfq8fz4.js → chunk-n5dxwryh.js} +1 -1
- package/bundle/{chunk-dwqvcdmf.js → chunk-n9969djm.js} +1 -1
- package/bundle/{chunk-vgt3artc.js → chunk-ncvr75f6.js} +2 -2
- package/bundle/chunk-ng2g9kkk.js +2 -0
- package/bundle/chunk-ngfhfyjs.js +2 -0
- package/bundle/{chunk-y31f8k5f.js → chunk-nvvja3ch.js} +1 -1
- package/bundle/{chunk-c76cjhn0.js → chunk-nwkp2f8e.js} +1 -1
- package/bundle/{chunk-53jstmdp.js → chunk-nwygsfhk.js} +2 -2
- package/bundle/chunk-p0dnmrqp.js +2 -0
- package/bundle/{chunk-g878zd6e.js → chunk-p5p4jh9s.js} +1 -1
- package/bundle/chunk-p6h2ydcp.js +2 -0
- package/bundle/{chunk-wn63q3xp.js → chunk-pcmsxhrb.js} +1 -1
- package/bundle/{chunk-ccf4pgkr.js → chunk-pdcj2rfz.js} +2 -2
- package/bundle/{chunk-dgcannw0.js → chunk-pfd8gzy4.js} +1 -1
- package/bundle/{chunk-a8bjcvda.js → chunk-ph46s66y.js} +1 -1
- package/bundle/chunk-pkm3w0ks.js +3 -0
- package/bundle/{chunk-g26redah.js → chunk-pnmadk2h.js} +1 -1
- package/bundle/{chunk-y0h3jfkj.js → chunk-q65qzc9w.js} +1 -1
- package/bundle/{chunk-qk1jkc0n.js → chunk-q8qx38kz.js} +1 -1
- package/bundle/chunk-qhakedgs.js +2 -0
- package/bundle/{chunk-2caaqmec.js → chunk-qsgpbt4t.js} +1 -1
- package/bundle/{chunk-ejhhrece.js → chunk-qtdxy2q1.js} +3 -3
- package/bundle/chunk-r18zetwf.js +2 -0
- package/bundle/{chunk-t18ka1e7.js → chunk-r1936yb5.js} +1 -1
- package/bundle/{chunk-qgkb6n8k.js → chunk-r4qpsa4e.js} +2 -2
- package/bundle/chunk-r6055kk0.js +3 -0
- package/bundle/chunk-r6rgrz25.js +2 -0
- package/bundle/{chunk-rva2ekrt.js → chunk-r9ng8xx5.js} +1 -1
- package/bundle/chunk-rk4vp09j.js +2 -0
- package/bundle/{chunk-tk4z6r09.js → chunk-rkmg0gbq.js} +1 -1
- package/bundle/{chunk-t6zz47zk.js → chunk-rpc0he6b.js} +2 -2
- package/bundle/{chunk-sbjymf20.js → chunk-rvev3cy6.js} +2 -2
- package/bundle/{chunk-1har4t9a.js → chunk-rx29zmw2.js} +1 -1
- package/bundle/{chunk-4pmvxnkj.js → chunk-rxh160jr.js} +2 -2
- package/bundle/chunk-s3hbwksw.js +5 -0
- package/bundle/{chunk-sa0rrreh.js → chunk-s3zmxfz2.js} +2 -2
- package/bundle/chunk-s4jp4zce.js +2 -0
- package/bundle/{chunk-c987bemn.js → chunk-s6vhscvd.js} +2 -2
- package/bundle/{chunk-zrhw1szj.js → chunk-s81ck6bw.js} +1 -1
- package/bundle/{chunk-hz02vrqs.js → chunk-sbj816s8.js} +1 -1
- package/bundle/chunk-sec9y622.js +2 -0
- package/bundle/{chunk-dcv6wj9x.js → chunk-seda5sfd.js} +2 -2
- package/bundle/{chunk-ynf17943.js → chunk-sjtq9bbb.js} +2 -2
- package/bundle/chunk-sn7q178t.js +2 -0
- package/bundle/chunk-st0h54dm.js +2 -0
- package/bundle/{chunk-cghz0855.js → chunk-sxtfssjv.js} +1 -1
- package/bundle/chunk-sz75fx13.js +2 -0
- package/bundle/{chunk-6ps30qax.js → chunk-t076hwsv.js} +2 -2
- package/bundle/{chunk-phpxxd48.js → chunk-t3e19wdp.js} +1 -1
- package/bundle/{chunk-ftvvm4r5.js → chunk-t7s475b2.js} +2 -2
- package/bundle/chunk-tefh2cgk.js +2 -0
- package/bundle/chunk-tfez99qv.js +2 -0
- package/bundle/chunk-tjk1hymv.js +2 -0
- package/bundle/{chunk-48gap82w.js → chunk-tpw1ewqn.js} +1 -1
- package/bundle/{chunk-fej5x648.js → chunk-tqnf1p88.js} +1 -1
- package/bundle/chunk-tyk97q7c.js +2 -0
- package/bundle/chunk-tz1sv9kt.js +3 -0
- package/bundle/{chunk-g7v6sp3c.js → chunk-tz60e15h.js} +2 -2
- package/bundle/{chunk-d30k7dpf.js → chunk-tzwm08yc.js} +1 -1
- package/bundle/chunk-v1098rqc.js +2 -0
- package/bundle/chunk-v30ezr68.js +11 -0
- package/bundle/{chunk-jmmtcr2r.js → chunk-v5j3ypfv.js} +1 -1
- package/bundle/chunk-v5wn741w.js +2 -0
- package/bundle/{chunk-xy8arehp.js → chunk-vamwvx0x.js} +1 -1
- package/bundle/{chunk-wm9nh9nb.js → chunk-vbcekkw2.js} +2 -2
- package/bundle/chunk-vf75j9wd.js +2 -0
- package/bundle/{chunk-wqk1v8t0.js → chunk-vhh80d5j.js} +2 -2
- package/bundle/{chunk-5bv63rqj.js → chunk-vm8htc6d.js} +1 -1
- package/bundle/{chunk-56wq8cqj.js → chunk-vnz9n9z0.js} +1 -1
- package/bundle/chunk-vp6ttkct.js +2 -0
- package/bundle/chunk-vpcsmwsb.js +2 -0
- package/bundle/{chunk-afr8m0q1.js → chunk-vrt8wd3r.js} +1 -1
- package/bundle/chunk-vyf77kq1.js +29 -0
- package/bundle/{chunk-vph4w4yy.js → chunk-w32xhz0x.js} +2 -2
- package/bundle/{chunk-fjftb2sz.js → chunk-wdy0fsp8.js} +2 -2
- package/bundle/{chunk-tbx741en.js → chunk-wkepvmgt.js} +1 -1
- package/bundle/{chunk-rwwvy89t.js → chunk-wp0xd7at.js} +1 -1
- package/bundle/{chunk-y3gy62q5.js → chunk-wpkr3vzf.js} +1 -1
- package/bundle/{chunk-jqj1ay7x.js → chunk-wpx2vmf5.js} +1 -1
- package/bundle/{chunk-35fj1sfm.js → chunk-wqkvsj5y.js} +2 -2
- package/bundle/{chunk-8jmb5bd4.js → chunk-wspbjh74.js} +2 -2
- package/bundle/{chunk-6vnqbejg.js → chunk-wzfb19t6.js} +1 -1
- package/bundle/chunk-x23s1s8k.js +2 -0
- package/bundle/{chunk-59csnjc3.js → chunk-x28chfpz.js} +2 -2
- package/bundle/{chunk-bhg69t69.js → chunk-xf1y0sc6.js} +2 -2
- package/bundle/{chunk-zsg29gba.js → chunk-xfsccqsm.js} +1 -1
- package/bundle/{chunk-qsme16gk.js → chunk-xmt17jd4.js} +2 -2
- package/bundle/{chunk-a48mx917.js → chunk-xphzr4wg.js} +2 -2
- package/bundle/chunk-xr6js4ek.js +2 -0
- package/bundle/chunk-y078gb3n.js +2 -0
- package/bundle/{chunk-ykpj10nz.js → chunk-y24yxs9g.js} +2 -2
- package/bundle/{chunk-wb47k8ah.js → chunk-y565z8n2.js} +2 -2
- package/bundle/{chunk-p2fte9vz.js → chunk-y7cqyeve.js} +2 -2
- package/bundle/{chunk-g3n465ee.js → chunk-y8bxvp3c.js} +2 -2
- package/bundle/{chunk-29gwtcey.js → chunk-y8tx9x5b.js} +1 -1
- package/bundle/{chunk-5xkp27b1.js → chunk-ya6r72ng.js} +1 -1
- package/bundle/chunk-yewjnqee.js +2 -0
- package/bundle/{chunk-29q89bge.js → chunk-yg0rs4g1.js} +2 -2
- package/bundle/{chunk-rwnwjm82.js → chunk-yhr7s8qm.js} +2 -2
- package/bundle/chunk-ykk9e9as.js +2 -0
- package/bundle/chunk-yqn88gjf.js +2 -0
- package/bundle/chunk-yrxg3dex.js +2 -0
- package/bundle/{chunk-eacpc64g.js → chunk-yvtbt12y.js} +2 -2
- package/bundle/chunk-z1xeqrgd.js +2 -0
- package/bundle/chunk-z5j46dem.js +2 -0
- package/bundle/{chunk-mrq35ftw.js → chunk-zj5snrsa.js} +2 -2
- package/bundle/{chunk-9cf2ktyh.js → chunk-zjfdptdj.js} +1 -1
- package/bundle/chunk-zq0hpja9.js +2 -0
- package/bundle/chunk-zqzh5hp3.js +2 -0
- package/bundle/{chunk-qgek59e6.js → chunk-zr1cvkpb.js} +1 -1
- package/bundle/{chunk-fa8pwdwv.js → chunk-zr89enb8.js} +1 -1
- package/bundle/{chunk-jr80q31w.js → chunk-zskjqrmc.js} +1 -1
- package/bundle/{chunk-92r1gw2j.js → chunk-ztjrm8m0.js} +2 -2
- package/bundle/chunk-zv89qwjc.js +2 -0
- package/bundle/index.js +3 -3
- package/bundle/parser.worker.js +2 -2
- package/bundle/worker.js +1 -1
- package/package.json +1 -1
- package/bundle/chunk-03zpnwk2.js +0 -2
- package/bundle/chunk-0aqdzyar.js +0 -2
- package/bundle/chunk-0eh3yc6e.js +0 -2
- package/bundle/chunk-0mh600tv.js +0 -2
- package/bundle/chunk-1a6q1f5n.js +0 -7
- package/bundle/chunk-2a5gjgvp.js +0 -2
- package/bundle/chunk-2phyc1c0.js +0 -2
- package/bundle/chunk-2pkfphgb.js +0 -2
- package/bundle/chunk-30wp95w1.js +0 -2
- package/bundle/chunk-32fpqd0n.js +0 -2
- package/bundle/chunk-3f2cjzb4.js +0 -2
- package/bundle/chunk-3qvap1kv.js +0 -2
- package/bundle/chunk-42hvspe7.js +0 -2
- package/bundle/chunk-452tk6v3.js +0 -2
- package/bundle/chunk-4gqb1hps.js +0 -2
- package/bundle/chunk-50qgz5ka.js +0 -2
- package/bundle/chunk-539cw9r0.js +0 -2
- package/bundle/chunk-5b0xyq5z.js +0 -2
- package/bundle/chunk-5j4nxpdy.js +0 -2
- package/bundle/chunk-5nxgk6hw.js +0 -2
- package/bundle/chunk-5qkvhr6y.js +0 -2
- package/bundle/chunk-6dpdkzrk.js +0 -2
- package/bundle/chunk-6p6m5956.js +0 -3
- package/bundle/chunk-705qkpra.js +0 -28
- package/bundle/chunk-76c400ze.js +0 -2
- package/bundle/chunk-7bxxc4a3.js +0 -2
- package/bundle/chunk-7g59hc61.js +0 -2
- package/bundle/chunk-7p88j56s.js +0 -2
- package/bundle/chunk-7r92d7v9.js +0 -14
- package/bundle/chunk-7trngc9g.js +0 -2
- package/bundle/chunk-8cebbmtf.js +0 -2
- package/bundle/chunk-8j1xcdmd.js +0 -2
- package/bundle/chunk-90r2z49k.js +0 -2
- package/bundle/chunk-94mjwy22.js +0 -2
- package/bundle/chunk-9bw6bx5c.js +0 -2
- package/bundle/chunk-aenrd7dk.js +0 -2
- package/bundle/chunk-ahmy80vb.js +0 -2
- package/bundle/chunk-avn12jkt.js +0 -2
- package/bundle/chunk-bnw744ej.js +0 -8
- package/bundle/chunk-brk6bge4.js +0 -3
- package/bundle/chunk-ce5e7j62.js +0 -2
- package/bundle/chunk-cw1gwjx9.js +0 -2
- package/bundle/chunk-czw30fjs.js +0 -2
- package/bundle/chunk-dtcvqrmn.js +0 -2
- package/bundle/chunk-dwhsvpag.js +0 -2
- package/bundle/chunk-e0hfpdje.js +0 -2
- package/bundle/chunk-e5jk67xh.js +0 -2
- package/bundle/chunk-eg4pq4hv.js +0 -2
- package/bundle/chunk-ew3yz97p.js +0 -2
- package/bundle/chunk-f2yfyhh8.js +0 -2
- package/bundle/chunk-fd8x2nb4.js +0 -2
- package/bundle/chunk-fv5mrdyc.js +0 -5
- package/bundle/chunk-fveaq0pb.js +0 -2
- package/bundle/chunk-gbvm6dpv.js +0 -2
- package/bundle/chunk-gkbx6edf.js +0 -2
- package/bundle/chunk-gq9hb2e8.js +0 -2
- package/bundle/chunk-gsez13bg.js +0 -3
- package/bundle/chunk-gswhjd1h.js +0 -3
- package/bundle/chunk-h5w91zr4.js +0 -2
- package/bundle/chunk-hmpb3c21.js +0 -2
- package/bundle/chunk-hq7s4f75.js +0 -2
- package/bundle/chunk-j1h64m65.js +0 -2
- package/bundle/chunk-j32rr7rt.js +0 -2
- package/bundle/chunk-j871xzr7.js +0 -2
- package/bundle/chunk-k1qd8ecm.js +0 -808
- package/bundle/chunk-kx88qekb.js +0 -2
- package/bundle/chunk-m4g4djss.js +0 -2
- package/bundle/chunk-mt2by7rx.js +0 -3
- package/bundle/chunk-mwkms65j.js +0 -3
- package/bundle/chunk-n61e0znt.js +0 -2
- package/bundle/chunk-ndd4cn3z.js +0 -2
- package/bundle/chunk-nr2j8ytn.js +0 -3
- package/bundle/chunk-nsw5x43k.js +0 -2
- package/bundle/chunk-p5b5ekhh.js +0 -2
- package/bundle/chunk-pf23nw4z.js +0 -2
- package/bundle/chunk-pw3cv89g.js +0 -2
- package/bundle/chunk-qwmae3vk.js +0 -5
- package/bundle/chunk-rdk62809.js +0 -2
- package/bundle/chunk-rew6r516.js +0 -2
- package/bundle/chunk-rjcz4kbm.js +0 -2
- package/bundle/chunk-rmsqb6r4.js +0 -10
- package/bundle/chunk-skgr9ypq.js +0 -2
- package/bundle/chunk-sv40pwe2.js +0 -2
- package/bundle/chunk-tax3ecy5.js +0 -2
- package/bundle/chunk-tfhpjmny.js +0 -2
- package/bundle/chunk-tnete6ye.js +0 -2
- package/bundle/chunk-tpyq7ycb.js +0 -2
- package/bundle/chunk-tr0rm1ka.js +0 -2
- package/bundle/chunk-ty14zznd.js +0 -2
- package/bundle/chunk-v5h5wxw5.js +0 -2
- package/bundle/chunk-v6141yq1.js +0 -2
- package/bundle/chunk-vjs69r6x.js +0 -2
- package/bundle/chunk-vmhar83s.js +0 -2
- package/bundle/chunk-vpjyk76v.js +0 -2
- package/bundle/chunk-vqvnw12p.js +0 -2
- package/bundle/chunk-w0sztk4y.js +0 -2
- package/bundle/chunk-w6bb320d.js +0 -2
- package/bundle/chunk-wqw6yjrg.js +0 -2
- package/bundle/chunk-ws08rxge.js +0 -2
- package/bundle/chunk-wwvek9zf.js +0 -3
- package/bundle/chunk-wz3dvc3g.js +0 -2
- package/bundle/chunk-x2pmqvdc.js +0 -2
- package/bundle/chunk-x4wfq39v.js +0 -2
- package/bundle/chunk-x7a3kqe5.js +0 -2
- package/bundle/chunk-xb22grz6.js +0 -2
- package/bundle/chunk-y3eeva80.js +0 -2
- package/bundle/chunk-yb6m08zj.js +0 -2
- package/bundle/chunk-ybcqkgs7.js +0 -2
- package/bundle/chunk-zj1jc1xt.js +0 -2
- package/bundle/chunk-zm0m0504.js +0 -2
- package/bundle/chunk-zq32jhj1.js +0 -2
- package/bundle/chunk-zxwjxszn.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-9svh74gt.js";var{create:os,defineProperty:Gt,getOwnPropertyDescriptor:us,getOwnPropertyNames:ps,getPrototypeOf:hs}=Object,cs=Object.prototype.hasOwnProperty,ce=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ls=(t,e)=>{for(var s in e)Gt(t,s,{get:e[s],enumerable:!0})},ds=(t,e,s,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of ps(e))!cs.call(t,r)&&r!==s&&Gt(t,r,{get:()=>e[r],enumerable:!(i=us(e,r))||i.enumerable});return t},le=(t,e,s)=>(s=t!=null?os(hs(t)):{},ds(e||!t||!t.__esModule?Gt(s,"default",{value:t,enumerable:!0}):s,t)),fs=ce((t,e)=>{e.exports={}}),de=ce((t,e)=>{var s=fs(),i=/^[\da-fA-F]+$/,r=/^\d+$/,n=new WeakMap;function o(h){h=h.Parser.acorn||h;let l=n.get(h);if(!l){let{tokTypes:g,TokContext:C,TokenType:A}=h,S=new C("<tag",!1),V=new C("</tag",!1),P=new C("<tag>...</tag>",!0,!0),U={tc_oTag:S,tc_cTag:V,tc_expr:P},et={jsxName:new A("jsxName"),jsxText:new A("jsxText",{beforeExpr:!0}),jsxTagStart:new A("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new A("jsxTagEnd")};et.jsxTagStart.updateContext=function(){this.context.push(P),this.context.push(S),this.exprAllowed=!1},et.jsxTagEnd.updateContext=function(dt){let ft=this.context.pop();ft===S&&dt===g.slash||ft===V?(this.context.pop(),this.exprAllowed=this.curContext()===P):this.exprAllowed=!0},l={tokContexts:U,tokTypes:et},n.set(h,l)}return l}function p(h){if(!h)return h;if(h.type==="JSXIdentifier")return h.name;if(h.type==="JSXNamespacedName")return h.namespace.name+":"+h.name.name;if(h.type==="JSXMemberExpression")return p(h.object)+"."+p(h.property)}e.exports=function(h){return h=h||{},function(l){return u({allowNamespaces:h.allowNamespaces!==!1,allowNamespacedObjects:!!h.allowNamespacedObjects},l)}},Object.defineProperty(e.exports,"tokTypes",{get:function(){return o(void 0).tokTypes},configurable:!0,enumerable:!0});function u(h,l){let g=l.acorn||void 0,C=o(g),A=g.tokTypes,S=C.tokTypes,V=g.tokContexts,P=C.tokContexts.tc_oTag,U=C.tokContexts.tc_cTag,et=C.tokContexts.tc_expr,dt=g.isNewLine,ft=g.isIdentifierStart,ns=g.isIdentifierChar;return class extends l{static get acornJsx(){return C}jsx_readToken(){let c="",y=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let x=this.input.charCodeAt(this.pos);switch(x){case 60:case 123:return this.pos===this.start?x===60&&this.exprAllowed?(++this.pos,this.finishToken(S.jsxTagStart)):this.getTokenFromCode(x):(c+=this.input.slice(y,this.pos),this.finishToken(S.jsxText,c));case 38:c+=this.input.slice(y,this.pos),c+=this.jsx_readEntity(),y=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(x===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:dt(x)?(c+=this.input.slice(y,this.pos),c+=this.jsx_readNewLine(!0),y=this.pos):++this.pos}}}jsx_readNewLine(c){let y=this.input.charCodeAt(this.pos),x;return++this.pos,y===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,x=c?`
|
|
3
3
|
`:`\r
|
|
4
4
|
`):x=String.fromCharCode(y),this.options.locations&&(++this.curLine,this.lineStart=this.pos),x}jsx_readString(c){let y="",x=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let k=this.input.charCodeAt(this.pos);if(k===c)break;k===38?(y+=this.input.slice(x,this.pos),y+=this.jsx_readEntity(),x=this.pos):dt(k)?(y+=this.input.slice(x,this.pos),y+=this.jsx_readNewLine(!1),x=this.pos):++this.pos}return y+=this.input.slice(x,this.pos++),this.finishToken(A.string,y)}jsx_readEntity(){let c="",y=0,x,k=this.input[this.pos];k!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let Y=++this.pos;for(;this.pos<this.input.length&&y++<10;){if(k=this.input[this.pos++],k===";"){c[0]==="#"?c[1]==="x"?(c=c.substr(2),i.test(c)&&(x=String.fromCharCode(parseInt(c,16)))):(c=c.substr(1),r.test(c)&&(x=String.fromCharCode(parseInt(c,10)))):x=s[c];break}c+=k}return x||(this.pos=Y,"&")}jsx_readWord(){let c,y=this.pos;do c=this.input.charCodeAt(++this.pos);while(ns(c)||c===45);return this.finishToken(S.jsxName,this.input.slice(y,this.pos))}jsx_parseIdentifier(){let c=this.startNode();return this.type===S.jsxName?c.name=this.value:this.type.keyword?c.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(c,"JSXIdentifier")}jsx_parseNamespacedName(){let c=this.start,y=this.startLoc,x=this.jsx_parseIdentifier();if(!h.allowNamespaces||!this.eat(A.colon))return x;var k=this.startNodeAt(c,y);return k.namespace=x,k.name=this.jsx_parseIdentifier(),this.finishNode(k,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===S.jsxTagEnd)return"";let c=this.start,y=this.startLoc,x=this.jsx_parseNamespacedName();for(this.type===A.dot&&x.type==="JSXNamespacedName"&&!h.allowNamespacedObjects&&this.unexpected();this.eat(A.dot);){let k=this.startNodeAt(c,y);k.object=x,k.property=this.jsx_parseIdentifier(),x=this.finishNode(k,"JSXMemberExpression")}return x}jsx_parseAttributeValue(){switch(this.type){case A.braceL:let c=this.jsx_parseExpressionContainer();return c.expression.type==="JSXEmptyExpression"&&this.raise(c.start,"JSX attributes must only be assigned a non-empty expression"),c;case S.jsxTagStart:case A.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let c=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(c,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let c=this.startNode();return this.next(),c.expression=this.type===A.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(A.braceR),this.finishNode(c,"JSXExpressionContainer")}jsx_parseAttribute(){let c=this.startNode();return this.eat(A.braceL)?(this.expect(A.ellipsis),c.argument=this.parseMaybeAssign(),this.expect(A.braceR),this.finishNode(c,"JSXSpreadAttribute")):(c.name=this.jsx_parseNamespacedName(),c.value=this.eat(A.eq)?this.jsx_parseAttributeValue():null,this.finishNode(c,"JSXAttribute"))}jsx_parseOpeningElementAt(c,y){let x=this.startNodeAt(c,y);x.attributes=[];let k=this.jsx_parseElementName();for(k&&(x.name=k);this.type!==A.slash&&this.type!==S.jsxTagEnd;)x.attributes.push(this.jsx_parseAttribute());return x.selfClosing=this.eat(A.slash),this.expect(S.jsxTagEnd),this.finishNode(x,k?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(c,y){let x=this.startNodeAt(c,y),k=this.jsx_parseElementName();return k&&(x.name=k),this.expect(S.jsxTagEnd),this.finishNode(x,k?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(c,y){let x=this.startNodeAt(c,y),k=[],Y=this.jsx_parseOpeningElementAt(c,y),mt=null;if(!Y.selfClosing){t:for(;;)switch(this.type){case S.jsxTagStart:if(c=this.start,y=this.startLoc,this.next(),this.eat(A.slash)){mt=this.jsx_parseClosingElementAt(c,y);break t}k.push(this.jsx_parseElementAt(c,y));break;case S.jsxText:k.push(this.parseExprAtom());break;case A.braceL:k.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}p(mt.name)!==p(Y.name)&&this.raise(mt.start,"Expected corresponding JSX closing tag for <"+p(Y.name)+">")}let wt=Y.name?"Element":"Fragment";return x["opening"+wt]=Y,x["closing"+wt]=mt,x.children=k,this.type===A.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(x,"JSX"+wt)}jsx_parseText(){let c=this.parseLiteral(this.value);return c.type="JSXText",c}jsx_parseElement(){let c=this.start,y=this.startLoc;return this.next(),this.jsx_parseElementAt(c,y)}parseExprAtom(c){return this.type===S.jsxText?this.jsx_parseText():this.type===S.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(c)}readToken(c){let y=this.curContext();if(y===et)return this.jsx_readToken();if(y===P||y===U){if(ft(c))return this.jsx_readWord();if(c==62)return++this.pos,this.finishToken(S.jsxTagEnd);if((c===34||c===39)&&y==P)return this.jsx_readString(c)}return c===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(S.jsxTagStart)):super.readToken(c)}updateContext(c){if(this.type==A.braceL){var y=this.curContext();y==P?this.context.push(V.b_expr):y==et?this.context.push(V.b_tmpl):super.updateContext(c),this.exprAllowed=!0}else if(this.type===A.slash&&c===S.jsxTagStart)this.context.length-=2,this.context.push(U),this.exprAllowed=!1;else return super.updateContext(c)}}}}),fe={};ls(fe,{parsers:()=>hr});var ms=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],me=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],ys="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",ye="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",Dt={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Ft="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",xs={5:Ft,"5module":Ft+" export import",6:Ft+" const class extends export import super"},gs=/^in(stanceof)?$/,As=new RegExp("["+ye+"]"),vs=new RegExp("["+ye+ys+"]");function Lt(t,e){for(var s=65536,i=0;i<e.length;i+=2){if(s+=e[i],s>t)return!1;if(s+=e[i+1],s>=t)return!0}return!1}function G(t,e){return t<65?t===36:t<91?!0:t<97?t===95:t<123?!0:t<=65535?t>=170&&As.test(String.fromCharCode(t)):e===!1?!1:Lt(t,me)}function Q(t,e){return t<48?t===36:t<58?!0:t<65?!1:t<91?!0:t<97?t===95:t<123?!0:t<=65535?t>=170&&vs.test(String.fromCharCode(t)):e===!1?!1:Lt(t,me)||Lt(t,ms)}var E=function(t,e){e===void 0&&(e={}),this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop||null,this.updateContext=null};function L(t,e){return new E(t,{beforeExpr:!0,binop:e})}var R={beforeExpr:!0},B={startsExpr:!0},Jt={};function b(t,e){return e===void 0&&(e={}),e.keyword=t,Jt[t]=new E(t,e)}var a={num:new E("num",B),regexp:new E("regexp",B),string:new E("string",B),name:new E("name",B),privateId:new E("privateId",B),eof:new E("eof"),bracketL:new E("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new E("]"),braceL:new E("{",{beforeExpr:!0,startsExpr:!0}),braceR:new E("}"),parenL:new E("(",{beforeExpr:!0,startsExpr:!0}),parenR:new E(")"),comma:new E(",",R),semi:new E(";",R),colon:new E(":",R),dot:new E("."),question:new E("?",R),questionDot:new E("?."),arrow:new E("=>",R),template:new E("template"),invalidTemplate:new E("invalidTemplate"),ellipsis:new E("...",R),backQuote:new E("`",B),dollarBraceL:new E("${",{beforeExpr:!0,startsExpr:!0}),eq:new E("=",{beforeExpr:!0,isAssign:!0}),assign:new E("_=",{beforeExpr:!0,isAssign:!0}),incDec:new E("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new E("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:L("||",1),logicalAND:L("&&",2),bitwiseOR:L("|",3),bitwiseXOR:L("^",4),bitwiseAND:L("&",5),equality:L("==/!=/===/!==",6),relational:L("</>/<=/>=",7),bitShift:L("<</>>/>>>",8),plusMin:new E("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:L("%",10),star:L("*",10),slash:L("/",10),starstar:new E("**",{beforeExpr:!0}),coalesce:L("??",1),_break:b("break"),_case:b("case",R),_catch:b("catch"),_continue:b("continue"),_debugger:b("debugger"),_default:b("default",R),_do:b("do",{isLoop:!0,beforeExpr:!0}),_else:b("else",R),_finally:b("finally"),_for:b("for",{isLoop:!0}),_function:b("function",B),_if:b("if"),_return:b("return",R),_switch:b("switch"),_throw:b("throw",R),_try:b("try"),_var:b("var"),_const:b("const"),_while:b("while",{isLoop:!0}),_with:b("with"),_new:b("new",{beforeExpr:!0,startsExpr:!0}),_this:b("this",B),_super:b("super",B),_class:b("class",B),_extends:b("extends",R),_export:b("export"),_import:b("import",B),_null:b("null",B),_true:b("true",B),_false:b("false",B),_in:b("in",{beforeExpr:!0,binop:7}),_instanceof:b("instanceof",{beforeExpr:!0,binop:7}),_typeof:b("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:b("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:b("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},N=/\r\n?|\n|\u2028|\u2029/,bs=new RegExp(N.source,"g");function st(t){return t===10||t===13||t===8232||t===8233}function xe(t,e,s){s===void 0&&(s=t.length);for(var i=e;i<s;i++){var r=t.charCodeAt(i);if(st(r))return i<s-1&&r===13&&t.charCodeAt(i+1)===10?i+2:i+1}return-1}var ge=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,w=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Ae=Object.prototype,Cs=Ae.hasOwnProperty,Es=Ae.toString,it=Object.hasOwn||function(t,e){return Cs.call(t,e)},ee=Array.isArray||function(t){return Es.call(t)==="[object Array]"},se=Object.create(null);function z(t){return se[t]||(se[t]=new RegExp("^(?:"+t.replace(/ /g,"|")+")$"))}function X(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}var Ss=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,pt=function(t,e){this.line=t,this.column=e};pt.prototype.offset=function(t){return new pt(this.line,this.column+t)};var Ct=function(t,e,s){this.start=e,this.end=s,t.sourceFile!==null&&(this.source=t.sourceFile)};function ve(t,e){for(var s=1,i=0;;){var r=xe(t,i,e);if(r<0)return new pt(s,e-i);++s,i=r}}var Rt={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},ie=!1;function ks(t){var e={};for(var s in Rt)e[s]=t&&it(t,s)?t[s]:Rt[s];if(e.ecmaVersion==="latest"?e.ecmaVersion=1e8:e.ecmaVersion==null?(!ie&&typeof console=="object"&&console.warn&&(ie=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
5
5
|
Defaulting to 2020, but this will stop working in the future.`)),e.ecmaVersion=11):e.ecmaVersion>=2015&&(e.ecmaVersion-=2009),e.allowReserved==null&&(e.allowReserved=e.ecmaVersion<5),(!t||t.allowHashBang==null)&&(e.allowHashBang=e.ecmaVersion>=14),ee(e.onToken)){var i=e.onToken;e.onToken=function(r){return i.push(r)}}return ee(e.onComment)&&(e.onComment=Ts(e,e.onComment)),e}function Ts(t,e){return function(s,i,r,n,o,p){var u={type:s?"Block":"Line",value:i,start:r,end:n};t.locations&&(u.loc=new Ct(this,o,p)),t.ranges&&(u.range=[r,n]),e.push(u)}}var ht=1,rt=2,Kt=4,be=8,Xt=16,Ce=32,Et=64,Ee=128,tt=256,ct=512,St=ht|rt|tt;function Ht(t,e){return rt|(t?Kt:0)|(e?be:0)}var gt=0,Wt=1,W=2,Se=3,ke=4,Te=5,_=function(t,e,s){this.options=t=ks(t),this.sourceFile=t.sourceFile,this.keywords=z(xs[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var i="";t.allowReserved!==!0&&(i=Dt[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(i+=" await")),this.reservedWords=z(i);var r=(i?i+" ":"")+Dt.strict;this.reservedWordsStrict=z(r),this.reservedWordsStrictBind=z(r+" "+Dt.strictBind),this.input=String(e),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-9svh74gt.js";var e={"ui.sessionReview.title":"Modifications de la session","ui.sessionReview.title.lastTurn":"Modifications du dernier tour","ui.sessionReview.diffStyle.unified":"Unifi\xE9","ui.sessionReview.diffStyle.split":"Divis\xE9","ui.sessionReview.openFile":"Ouvrir le fichier","ui.sessionReview.selection.line":"ligne {{line}}","ui.sessionReview.selection.lines":"lignes {{start}}-{{end}}","ui.sessionReview.expandAll":"Tout d\xE9velopper","ui.sessionReview.collapseAll":"Tout r\xE9duire","ui.sessionReview.change.added":"Ajout\xE9","ui.sessionReview.change.removed":"Supprim\xE9","ui.sessionReview.change.modified":"Modifi\xE9","ui.sessionReview.image.loading":"Chargement...","ui.sessionReview.image.placeholder":"Image","ui.sessionReview.largeDiff.title":"Diff trop volumineux pour \xEAtre affich\xE9","ui.sessionReview.largeDiff.meta":"Limite : {{limit}} lignes modifi\xE9es. Actuel : {{current}} lignes modifi\xE9es.","ui.sessionReview.largeDiff.renderAnyway":"Afficher quand m\xEAme","ui.fileMedia.kind.image":"image","ui.fileMedia.kind.audio":"audio","ui.fileMedia.state.removed":"Fichier {{kind}} supprim\xE9","ui.fileMedia.state.loading":"Chargement du fichier {{kind}}","ui.fileMedia.state.error":"Erreur avec le fichier {{kind}}","ui.fileMedia.state.unavailable":"Fichier {{kind}} indisponible","ui.fileMedia.binary.title":"Fichier binaire","ui.fileMedia.binary.description.path":"Impossible d'afficher {{path}} car il s'agit d'un fichier binaire.","ui.fileMedia.binary.description.default":"Impossible d'afficher ce fichier car il s'agit d'un fichier binaire.","ui.lineComment.label.prefix":"Commenter sur ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Commentaire sur ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Ajouter un commentaire","ui.lineComment.submit":"Commenter","ui.sessionTurn.steps.show":"Afficher les \xE9tapes","ui.sessionTurn.steps.hide":"Masquer les \xE9tapes","ui.sessionTurn.summary.response":"R\xE9ponse","ui.sessionTurn.diff.showMore":"Afficher plus de modifications ({{count}})","ui.sessionTurn.retry.retrying":"nouvelle tentative","ui.sessionTurn.retry.inSeconds":"dans {{seconds}}s","ui.sessionTurn.retry.attempt":"tentative n\xB0{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - tentative n\xB0{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini est en surchauffe","ui.sessionTurn.error.freeUsageExceeded":"Limite d'utilisation gratuite d\xE9pass\xE9e","ui.sessionTurn.error.addQredits":"Ajouter des cr\xE9dits","ui.sessionTurn.status.delegating":"D\xE9l\xE9gation du travail","ui.sessionTurn.status.planning":"Planification des prochaines \xE9tapes","ui.sessionTurn.status.gatheringContext":"Exploration","ui.sessionTurn.status.gatheredContext":"Explor\xE9","ui.sessionTurn.status.searchingCodebase":"Recherche dans la base de code","ui.sessionTurn.status.searchingWeb":"Recherche sur le web","ui.sessionTurn.status.makingEdits":"Application des modifications","ui.sessionTurn.status.runningCommands":"Ex\xE9cution des commandes","ui.sessionTurn.status.thinking":"R\xE9flexion","ui.sessionTurn.status.thinkingWithTopic":"R\xE9flexion - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Rassemblement des id\xE9es","ui.sessionTurn.status.consideringNextSteps":"Examen des prochaines \xE9tapes","ui.messagePart.questions.dismissed":"Questions ignor\xE9es","ui.messagePart.compaction":"Session compact\xE9e","ui.messagePart.context.read.one":"{{count}} lecture","ui.messagePart.context.read.other":"{{count}} lectures","ui.messagePart.context.search.one":"{{count}} recherche","ui.messagePart.context.search.other":"{{count}} recherches","ui.messagePart.context.list.one":"{{count}} liste","ui.messagePart.context.list.other":"{{count}} listes","ui.messagePart.diagnostic.error":"Erreur","ui.messagePart.title.edit":"Modifier","ui.messagePart.title.write":"\xC9crire","ui.messagePart.option.typeOwnAnswer":"Tapez votre propre r\xE9ponse","ui.messagePart.review.title":"Passez en revue vos r\xE9ponses","ui.list.loading":"Chargement","ui.list.empty":"Aucun r\xE9sultat","ui.list.clearFilter":"Effacer le filtre","ui.list.emptyWithFilter.prefix":"Aucun r\xE9sultat pour","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Nouveau message","ui.textField.copyToClipboard":"Copier dans le presse-papiers","ui.textField.copyLink":"Copier le lien","ui.textField.copied":"Copi\xE9","ui.imagePreview.alt":"Aper\xE7u de l'image","ui.scrollView.ariaLabel":"contenu d\xE9filable","ui.tool.read":"Lire","ui.tool.loaded":"Charg\xE9","ui.tool.list":"Lister","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Webfetch","ui.tool.websearch":"Recherche Web","ui.tool.codesearch":"Recherche de code","ui.tool.shell":"Shell","ui.tool.patch":"Patch","ui.tool.todos":"T\xE2ches","ui.tool.todos.read":"Lire les t\xE2ches","ui.tool.questions":"Questions","ui.tool.agent":"Agent {{type}}","ui.tool.agent.default":"Agent","ui.common.file.one":"fichier","ui.common.file.other":"fichiers","ui.common.question.one":"question","ui.common.question.other":"questions","ui.common.add":"Ajouter","ui.common.back":"Retour","ui.common.cancel":"Annuler","ui.common.confirm":"Confirmer","ui.common.dismiss":"Ignorer","ui.common.close":"Fermer","ui.common.next":"Suivant","ui.common.submit":"Soumettre","ui.permission.deny":"Refuser","ui.permission.allowAlways":"Toujours autoriser","ui.permission.allowOnce":"Autoriser une fois","ui.message.expand":"D\xE9velopper le message","ui.message.collapse":"R\xE9duire le message","ui.message.copy":"Copier","ui.message.copyMessage":"Copier le message","ui.message.forkMessage":"Bifurquer vers une nouvelle session","ui.message.revertMessage":"R\xE9initialiser \xE0 ce point","ui.message.copyResponse":"Copier la r\xE9ponse","ui.message.copied":"Copi\xE9 !","ui.message.interrupted":"Interrompu","ui.message.queued":"En file","ui.message.attachment.alt":"pi\xE8ce jointe","ui.patch.action.deleted":"Supprim\xE9","ui.patch.action.created":"Cr\xE9\xE9","ui.patch.action.moved":"D\xE9plac\xE9","ui.patch.action.patched":"Corrig\xE9","ui.question.subtitle.answered":"{{count}} r\xE9pondu(s)","ui.question.answer.none":"(pas de r\xE9ponse)","ui.question.review.notAnswered":"(non r\xE9pondu)","ui.question.multiHint":"S\xE9lectionnez tout ce qui s'applique","ui.question.singleHint":"S\xE9lectionnez une r\xE9ponse","ui.question.custom.placeholder":"Tapez votre r\xE9ponse...","ui.fileSearch.placeholder":"Rechercher","ui.fileSearch.previousMatch":"Pr\xE9c\xE9dent","ui.fileSearch.nextMatch":"Suivant","ui.fileSearch.close":"Fermer la recherche","ui.tool.task":"T\xE2che","ui.tool.skill":"Comp\xE9tence","ui.basicTool.called":"Appel\xE9 `{{tool}}`","ui.toolErrorCard.failed":"\xC9chou\xE9","ui.toolErrorCard.copyError":"Copier l'erreur","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s"};export{e as dict};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{h as x}from"./chunk-
|
|
2
|
+
import{h as x}from"./chunk-kr975sx0.js";import{j as D}from"./chunk-cm7yp259.js";import{I as A}from"./chunk-ncvr75f6.js";import{de as P}from"./chunk-b274mb6v.js";import{ag as j}from"./chunk-h6kmpgak.js";import{Bg as R,Cg as S,Dg as k}from"./chunk-3tf7xfw5.js";import{yh as $}from"./chunk-88hmeyf5.js";import{uj as B}from"./chunk-ep92grvg.js";import{Aq as W,Bq as Y,Cq as _,Dq as O,Eq as b,Nq as v,Oq as K,Tq as F,yq as G}from"./chunk-bxc3z38f.js";import{CJ as H}from"./chunk-tz60e15h.js";var X="forgewise",p=(J,z=process.env)=>J.trim()||z.QLEX_API_KEY?.trim()||"",U=(J)=>H.gen(function*(){let z=J.trim();if(!z)yield*H.sync(()=>{j.println(j.Style.TEXT_DANGER+"Error: API key cannot be empty."+j.Style.TEXT_NORMAL)}),process.exit(1);yield*(yield*B.Service).set(X,{type:"api",key:z,metadata:{method:"api-key"}}),yield*D(j.Style.TEXT_SUCCESS+"Signed in with API key."+j.Style.TEXT_NORMAL)}).pipe(H.withSpan("forgewise.login.apikey"));async function u(){let J=!Y();try{return await S({tryOpen:J,onCode:(z)=>{if(process.stdout.write(`
|
|
3
3
|
`),process.stdout.write(" To sign in, open: "+z.verificationUri+`
|
|
4
4
|
`),process.stdout.write(" and enter code: "+z.userCode+`
|
|
5
5
|
`),z.verificationUriComplete)process.stdout.write(`
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{zk as
|
|
2
|
+
import{RQ as M,UQ as T}from"./chunk-9svh74gt.js";var F=M((H)=>{var X=(k,z)=>()=>(z||k((z={exports:{}}).exports,z),z.exports),c=X((k)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.sync=k.isexe=void 0;var z=T("fs"),J=T("fs/promises"),K=async(Z,Q={})=>{let{ignoreErrors:Y=!1}=Q;try{return q(await(0,J.stat)(Z),Q)}catch($){let A=$;if(Y||A.code==="EACCES")return!1;throw A}};k.isexe=K;var V=(Z,Q={})=>{let{ignoreErrors:Y=!1}=Q;try{return q((0,z.statSync)(Z),Q)}catch($){let A=$;if(Y||A.code==="EACCES")return!1;throw A}};k.sync=V;var q=(Z,Q)=>Z.isFile()&&B(Z,Q),B=(Z,Q)=>{let Y=Q.uid??process.getuid?.(),$=Q.groups??process.getgroups?.()??[],A=Q.gid??process.getgid?.()??$[0];if(Y===void 0||A===void 0)throw Error("cannot get uid or gid");let C=new Set([A,...$]),G=Z.mode,U=Z.uid,u=Z.gid,_=parseInt("100",8),L=parseInt("010",8),w=parseInt("001",8),E=_|L;return!!(G&w||G&L&&C.has(u)||G&_&&U===Y||G&E&&Y===0)}}),m=X((k)=>{Object.defineProperty(k,"__esModule",{value:!0}),k.sync=k.isexe=void 0;var z=T("fs"),J=T("fs/promises"),K=T("path"),V=async(Q,Y={})=>{let{ignoreErrors:$=!1}=Y;try{return Z(await(0,J.stat)(Q),Q,Y)}catch(A){let C=A;if($||C.code==="EACCES")return!1;throw C}};k.isexe=V;var q=(Q,Y={})=>{let{ignoreErrors:$=!1}=Y;try{return Z((0,z.statSync)(Q),Q,Y)}catch(A){let C=A;if($||C.code==="EACCES")return!1;throw C}};k.sync=q;var B=(Q,Y)=>{let{pathExt:$=process.env.PATHEXT||""}=Y,A=$.split(K.delimiter);if(A.indexOf("")!==-1)return!0;for(let C of A){let G=C.toLowerCase(),U=Q.substring(Q.length-G.length).toLowerCase();if(G&&U===G)return!0}return!1},Z=(Q,Y,$)=>Q.isFile()&&B(Y,$)}),h=X((k)=>{Object.defineProperty(k,"__esModule",{value:!0})}),N=H&&H.__createBinding||(Object.create?function(k,z,J,K){K===void 0&&(K=J);var V=Object.getOwnPropertyDescriptor(z,J);(!V||("get"in V?!z.__esModule:V.writable||V.configurable))&&(V={enumerable:!0,get:function(){return z[J]}}),Object.defineProperty(k,K,V)}:function(k,z,J,K){K===void 0&&(K=J),k[K]=z[J]}),d=H&&H.__setModuleDefault||(Object.create?function(k,z){Object.defineProperty(k,"default",{enumerable:!0,value:z})}:function(k,z){k.default=z}),O=H&&H.__importStar||function(){var k=function(z){return k=Object.getOwnPropertyNames||function(J){var K=[];for(var V in J)Object.prototype.hasOwnProperty.call(J,V)&&(K[K.length]=V);return K},k(z)};return function(z){if(z&&z.__esModule)return z;var J={};if(z!=null)for(var K=k(z),V=0;V<K.length;V++)K[V]!=="default"&&N(J,z,K[V]);return d(J,z),J}}(),x=H&&H.__exportStar||function(k,z){for(var J in k)J!=="default"&&!Object.prototype.hasOwnProperty.call(z,J)&&N(z,k,J)};Object.defineProperty(H,"__esModule",{value:!0});H.sync=H.isexe=H.posix=H.win32=void 0;var R=O(c());H.posix=R;var W=O(m());H.win32=W;x(h(),H);var a=process.env._ISEXE_TEST_PLATFORM_||process.platform,b=a==="win32"?W:R;H.isexe=b.isexe;H.sync=b.sync});var zk=M((Zk,P)=>{var{isexe:p,sync:o}=F(),{join:r,delimiter:e,sep:I,posix:y}=T("path"),S=process.platform==="win32",D=new RegExp(`[${y.sep}${I===y.sep?"":I}]`.replace(/(\\)/g,"\\$1")),t=new RegExp(`^\\.${D.source}`),g=(k)=>Object.assign(Error(`not found: ${k}`),{code:"ENOENT"}),v=(k,{path:z=process.env.PATH,pathExt:J=process.env.PATHEXT,delimiter:K=e})=>{let V=k.match(D)?[""]:[...S?[process.cwd()]:[],...(z||"").split(K)];if(S){let q=J||[".EXE",".CMD",".BAT",".COM"].join(K),B=q.split(K).flatMap((Z)=>[Z,Z.toLowerCase()]);if(k.includes(".")&&B[0]!=="")B.unshift("");return{pathEnv:V,pathExt:B,pathExtExe:q}}return{pathEnv:V,pathExt:[""]}},f=(k,z)=>{let J=/^".*"$/.test(k)?k.slice(1,-1):k;return(!J&&t.test(z)?z.slice(0,2):"")+r(J,z)},l=async(k,z={})=>{let{pathEnv:J,pathExt:K,pathExtExe:V}=v(k,z),q=[];for(let B of J){let Z=f(B,k);for(let Q of K){let Y=Z+Q;if(await p(Y,{pathExt:V,ignoreErrors:!0})){if(!z.all)return Y;q.push(Y)}}}if(z.all&&q.length)return q;if(z.nothrow)return null;throw g(k)},kk=(k,z={})=>{let{pathEnv:J,pathExt:K,pathExtExe:V}=v(k,z),q=[];for(let B of J){let Z=f(B,k);for(let Q of K){let Y=Z+Q;if(o(Y,{pathExt:V,ignoreErrors:!0})){if(!z.all)return Y;q.push(Y)}}}if(z.all&&q.length)return q;if(z.nothrow)return null;throw g(k)};P.exports=l;l.sync=kk});
|
|
3
|
+
export{zk as uu};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{$p as H,Ap as g,Bp as h,Cp as i,Dp as j,Ep as k,Fp as l,Gp as m,Hp as n,Ip as o,Jp as p,Kp as q,Lp as r,Mp as s,Np as t,Op as u,Pp as v,Qp as w,Rp as x,Sp as y,Tp as z,Up as A,Vp as B,Wp as C,Xp as D,Yp as E,Zp as F,_p as G,aq as I,bq as J,cq as K,dq as L,eq as M,fq as N,gq as O,hq as P,iq as Q,jq as R,kq as S,lq as T,mq as U,nq as V,oq as W,pq as X,up as a,vp as b,wp as c,xp as d,yp as e,zp as f}from"./chunk-vyf77kq1.js";import"./chunk-bxc3z38f.js";import"./chunk-7wshaze9.js";import"./chunk-vbcekkw2.js";import"./chunk-4ngvj758.js";import"./chunk-cqtkxwd8.js";import"./chunk-wpkr3vzf.js";import"./chunk-wp0xd7at.js";import"./chunk-dzw0j790.js";import"./chunk-rvev3cy6.js";import"./chunk-bwzbcwff.js";import"./chunk-r6055kk0.js";import"./chunk-datctfgt.js";import"./chunk-x28chfpz.js";import"./chunk-mnxcykeq.js";import"./chunk-0bn86djg.js";import"./chunk-xphzr4wg.js";import"./chunk-hav9pgf3.js";import"./chunk-cshsqavb.js";import"./chunk-tz60e15h.js";import"./chunk-9svh74gt.js";export{R as transformQlexStream,S as toOrchestratedSSEStream,T as toOpenAICompletion,o as sanitizeUpstreamProviderError,d as safeQlexRequestId,G as resolveToolMode,c as resolveQlexRetryable,D as renderToolProtocolPrompt,J as recordTierOutputAdvisory,u as planTierBudget,O as partialTagSuffixLength,N as parseQlexFrame,t as parseQlexError,w as normalizeQlexMessagesWithReport,x as normalizeQlexMessages,A as mergeLeadingSystemMessages,r as isGatewayRequiredError,y as hasUserRoleMessage,z as hasUsableUserMessage,H as hasToolContext,X as getTierOutputBudgetRecovery,K as getTierOutputAdvisory,M as flushTierOutputAdvisoryWrites,v as flattenMessageContent,s as extractQlexErrorMetadata,F as encodeToolProtocolMessages,P as encodeExtractedArguments,E as decodeToolArgumentsToObject,V as createQlexProvider,U as createCustomFetch,L as clearTierOutputAdvisories,q as classifyQlexStreamError,W as canIncreaseTierOutputBudget,I as buildQlexBody,Q as ToolCallExtractor,B as TOOL_CALL_OPEN,C as TOOL_CALL_CLOSE,p as QlexStreamError,j as QlexRequestTooLargeError,i as QlexRequestRejectedError,k as QlexRequestNotSentError,g as QlexRateLimitError,e as QlexNotLoggedInError,h as QlexInvalidCredentialsError,f as QlexInsufficientBalanceError,l as QlexGatewayError,a as QLEX_STREAM_URL,n as QLEX_STREAM_IDLE_TIMEOUT_MS,m as QLEX_RESPONSE_TIMEOUT_MS,b as QLEX_ORCHESTRATED_URL};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$e as hW,Se as l,Te as jW,Ue as LQ,We as KQ,Ye as GW,Ze as AQ,_e as QQ,bf as OQ,cf as CW,df as IW,ef as KW,ff as P,gf as O,hf as u,if as VW,jf as bQ,kf as WQ,lf as XQ,mf as qQ,nf as DW,of as a,pf as FW,qf as wQ,rf as BQ,sf as wW}from"./chunk-gsg6zn7e.js";import{Kp as $W,Op as BW,Pp as UQ,Up as JW,Wp as ZQ}from"./chunk-scnbt714.js";import"./chunk-cqtkxwd8.js";import"./chunk-y3gy62q5.js";import{Kt as Q}from"./chunk-a48mx917.js";import"./chunk-3va85mbe.js";import"./chunk-e0vrxetq.js";var NQ=Q.object({error:Q.object({message:Q.string(),type:Q.string().nullish(),param:Q.any().nullish(),code:Q.union([Q.string(),Q.number()]).nullish()})}),jQ=FW({errorSchema:NQ,errorToMessage:(X)=>X.error.message});function zW(X){let Z=X.startsWith("o3")||X.startsWith("o4-mini")||X.startsWith("gpt-5")&&!X.startsWith("gpt-5-chat"),j=X.startsWith("gpt-4")||X.startsWith("gpt-5")&&!X.startsWith("gpt-5-nano")&&!X.startsWith("gpt-5-chat")&&!X.startsWith("gpt-5.4-nano")||X.startsWith("o3")||X.startsWith("o4-mini"),F=X.startsWith("o1")||X.startsWith("o3")||X.startsWith("o4-mini")||X.startsWith("gpt-5")&&!X.startsWith("gpt-5-chat"),J=X.startsWith("gpt-5.1")||X.startsWith("gpt-5.2")||X.startsWith("gpt-5.3")||X.startsWith("gpt-5.4");return{supportsFlexProcessing:Z,supportsPriorityProcessing:j,isReasoningModel:F,systemMessageMode:F?"developer":"system",supportsNonReasoningParameters:J}}function cQ(X){var Z,j,F,J,w,D;if(X==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 $=(Z=X.prompt_tokens)!=null?Z:0,q=(j=X.completion_tokens)!=null?j:0,b=(J=(F=X.prompt_tokens_details)==null?void 0:F.cached_tokens)!=null?J:0,K=(D=(w=X.completion_tokens_details)==null?void 0:w.reasoning_tokens)!=null?D:0;return{inputTokens:{total:$,noCache:$-b,cacheRead:b,cacheWrite:void 0},outputTokens:{total:q,text:q-K,reasoning:K},raw:X}}function _W({prompt:X,systemMessageMode:Z="system"}){var j;let F=[],J=[];for(let{role:w,content:D}of X)switch(w){case"system":{switch(Z){case"system":{F.push({role:"system",content:D});break}case"developer":{F.push({role:"developer",content:D});break}case"remove":{J.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Z}`)}break}case"user":{if(D.length===1&&D[0].type==="text"){F.push({role:"user",content:D[0].text});break}F.push({role:"user",content:D.map(($,q)=>{var b,K,B;switch($.type){case"text":return{type:"text",text:$.text};case"file":if($.mediaType.startsWith("image/")){let f=$.mediaType==="image/*"?"image/jpeg":$.mediaType;return{type:"image_url",image_url:{url:$.data instanceof URL?$.data.toString():`data:${f};base64,${KQ($.data)}`,detail:(K=(b=$.providerOptions)==null?void 0:b.openai)==null?void 0:K.imageDetail}}}else if($.mediaType.startsWith("audio/")){if($.data instanceof URL)throw new ZQ({functionality:"audio file parts with URLs"});switch($.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:KQ($.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:KQ($.data),format:"mp3"}};default:throw new ZQ({functionality:`audio content parts with media type ${$.mediaType}`})}}else if($.mediaType==="application/pdf"){if($.data instanceof URL)throw new ZQ({functionality:"PDF file parts with URLs"});return{type:"file",file:typeof $.data==="string"&&$.data.startsWith("file-")?{file_id:$.data}:{filename:(B=$.filename)!=null?B:`part-${q}.pdf`,file_data:`data:application/pdf;base64,${KQ($.data)}`}}}else throw new ZQ({functionality:`file part media type ${$.mediaType}`})}})});break}case"assistant":{let $="",q=[];for(let b of D)switch(b.type){case"text":{$+=b.text;break}case"tool-call":{q.push({id:b.toolCallId,type:"function",function:{name:b.toolName,arguments:JSON.stringify(b.input)}});break}}F.push({role:"assistant",content:$,tool_calls:q.length>0?q:void 0});break}case"tool":{for(let $ of D){if($.type==="tool-approval-response")continue;let q=$.output,b;switch(q.type){case"text":case"error-text":b=q.value;break;case"execution-denied":b=(j=q.reason)!=null?j:"Tool execution denied.";break;case"content":case"json":case"error-json":b=JSON.stringify(q.value);break}F.push({role:"tool",tool_call_id:$.toolCallId,content:b})}break}default:throw Error(`Unsupported role: ${w}`)}return{messages:F,warnings:J}}function EQ({id:X,model:Z,created:j}){return{id:X!=null?X:void 0,modelId:Z!=null?Z:void 0,timestamp:j?new Date(j*1000):void 0}}function vQ(X){switch(X){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 mW=P(()=>O(Q.object({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(),tool_calls:Q.array(Q.object({id:Q.string().nullish(),type:Q.literal("function"),function:Q.object({name:Q.string(),arguments:Q.string()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}),index:Q.number(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish()})),usage:Q.object({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()}))),pW=P(()=>O(Q.union([Q.object({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(),tool_calls:Q.array(Q.object({index:Q.number(),id:Q.string().nullish(),type:Q.literal("function").nullish(),function:Q.object({name:Q.string().nullish(),arguments:Q.string().nullish()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}).nullish(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish(),index:Q.number()})),usage:Q.object({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()}),NQ]))),sW=P(()=>O(Q.object({logitBias:Q.record(Q.coerce.number(),Q.number()).optional(),logprobs:Q.union([Q.boolean(),Q.number()]).optional(),parallelToolCalls:Q.boolean().optional(),user:Q.string().optional(),reasoningEffort:Q.enum(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:Q.number().optional(),store:Q.boolean().optional(),metadata:Q.record(Q.string().max(64),Q.string().max(512)).optional(),prediction:Q.record(Q.string(),Q.any()).optional(),serviceTier:Q.enum(["auto","flex","priority","default"]).optional(),strictJsonSchema:Q.boolean().optional(),textVerbosity:Q.enum(["low","medium","high"]).optional(),promptCacheKey:Q.string().optional(),promptCacheRetention:Q.enum(["in_memory","24h"]).optional(),safetyIdentifier:Q.string().optional(),systemMessageMode:Q.enum(["system","developer","remove"]).optional(),forceReasoning:Q.boolean().optional()})));function iW({tools:X,toolChoice:Z}){X=(X==null?void 0:X.length)?X:void 0;let j=[];if(X==null)return{tools:void 0,toolChoice:void 0,toolWarnings:j};let F=[];for(let w of X)switch(w.type){case"function":F.push({type:"function",function:{name:w.name,description:w.description,parameters:w.inputSchema,...w.strict!=null?{strict:w.strict}:{}}});break;default:j.push({type:"unsupported",feature:`tool type: ${w.type}`});break}if(Z==null)return{tools:F,toolChoice:void 0,toolWarnings:j};let J=Z.type;switch(J){case"auto":case"none":case"required":return{tools:F,toolChoice:J,toolWarnings:j};case"tool":return{tools:F,toolChoice:{type:"function",function:{name:Z.toolName}},toolWarnings:j};default:throw new ZQ({functionality:`tool choice type: ${J}`})}}var LW=class{constructor(X,Z){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=X,this.config=Z}get provider(){return this.config.provider}async getArgs({prompt:X,maxOutputTokens:Z,temperature:j,topP:F,topK:J,frequencyPenalty:w,presencePenalty:D,stopSequences:$,responseFormat:q,seed:b,tools:K,toolChoice:B,providerOptions:f}){var L,S,_,g,A;let R=[],H=(L=await WQ({provider:"openai",providerOptions:f,schema:sW}))!=null?L:{},n=zW(this.modelId),s=(S=H.forceReasoning)!=null?S:n.isReasoningModel;if(J!=null)R.push({type:"unsupported",feature:"topK"});let{messages:p,warnings:m}=_W({prompt:X,systemMessageMode:(_=H.systemMessageMode)!=null?_:s?"developer":n.systemMessageMode});R.push(...m);let i=(g=H.strictJsonSchema)!=null?g:!0,Y={model:this.modelId,logit_bias:H.logitBias,logprobs:H.logprobs===!0||typeof H.logprobs==="number"?!0:void 0,top_logprobs:typeof H.logprobs==="number"?H.logprobs:typeof H.logprobs==="boolean"?H.logprobs?0:void 0:void 0,user:H.user,parallel_tool_calls:H.parallelToolCalls,max_tokens:Z,temperature:j,top_p:F,frequency_penalty:w,presence_penalty:D,response_format:(q==null?void 0:q.type)==="json"?q.schema!=null?{type:"json_schema",json_schema:{schema:q.schema,strict:i,name:(A=q.name)!=null?A:"response",description:q.description}}:{type:"json_object"}:void 0,stop:$,seed:b,verbosity:H.textVerbosity,max_completion_tokens:H.maxCompletionTokens,store:H.store,metadata:H.metadata,prediction:H.prediction,reasoning_effort:H.reasoningEffort,service_tier:H.serviceTier,prompt_cache_key:H.promptCacheKey,prompt_cache_retention:H.promptCacheRetention,safety_identifier:H.safetyIdentifier,messages:p};if(s){if(H.reasoningEffort!=="none"||!n.supportsNonReasoningParameters){if(Y.temperature!=null)Y.temperature=void 0,R.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(Y.top_p!=null)Y.top_p=void 0,R.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"});if(Y.logprobs!=null)Y.logprobs=void 0,R.push({type:"other",message:"logprobs is not supported for reasoning models"})}if(Y.frequency_penalty!=null)Y.frequency_penalty=void 0,R.push({type:"unsupported",feature:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"});if(Y.presence_penalty!=null)Y.presence_penalty=void 0,R.push({type:"unsupported",feature:"presencePenalty",details:"presencePenalty is not supported for reasoning models"});if(Y.logit_bias!=null)Y.logit_bias=void 0,R.push({type:"other",message:"logitBias is not supported for reasoning models"});if(Y.top_logprobs!=null)Y.top_logprobs=void 0,R.push({type:"other",message:"topLogprobs is not supported for reasoning models"});if(Y.max_tokens!=null){if(Y.max_completion_tokens==null)Y.max_completion_tokens=Y.max_tokens;Y.max_tokens=void 0}}else if(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview")){if(Y.temperature!=null)Y.temperature=void 0,R.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for the search preview models and has been removed."})}if(H.serviceTier==="flex"&&!n.supportsFlexProcessing)R.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),Y.service_tier=void 0;if(H.serviceTier==="priority"&&!n.supportsPriorityProcessing)R.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),Y.service_tier=void 0;let{tools:t,toolChoice:C,toolWarnings:N}=iW({tools:K,toolChoice:B});return{args:{...Y,tools:t,tool_choice:C},warnings:[...R,...N]}}async doGenerate(X){var Z,j,F,J,w,D,$;let{args:q,warnings:b}=await this.getArgs(X),{responseHeaders:K,value:B,rawValue:f}=await XQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),X.headers),body:q,failedResponseHandler:jQ,successfulResponseHandler:BQ(mW),abortSignal:X.abortSignal,fetch:this.config.fetch}),L=B.choices[0],S=[],_=L.message.content;if(_!=null&&_.length>0)S.push({type:"text",text:_});for(let H of(Z=L.message.tool_calls)!=null?Z:[])S.push({type:"tool-call",toolCallId:(j=H.id)!=null?j:QQ(),toolName:H.function.name,input:H.function.arguments});for(let H of(F=L.message.annotations)!=null?F:[])S.push({type:"source",sourceType:"url",id:QQ(),url:H.url_citation.url,title:H.url_citation.title});let g=(J=B.usage)==null?void 0:J.completion_tokens_details,A=(w=B.usage)==null?void 0:w.prompt_tokens_details,R={openai:{}};if((g==null?void 0:g.accepted_prediction_tokens)!=null)R.openai.acceptedPredictionTokens=g==null?void 0:g.accepted_prediction_tokens;if((g==null?void 0:g.rejected_prediction_tokens)!=null)R.openai.rejectedPredictionTokens=g==null?void 0:g.rejected_prediction_tokens;if(((D=L.logprobs)==null?void 0:D.content)!=null)R.openai.logprobs=L.logprobs.content;return{content:S,finishReason:{unified:vQ(L.finish_reason),raw:($=L.finish_reason)!=null?$:void 0},usage:cQ(B.usage),request:{body:q},response:{...EQ(B),headers:K,body:f},warnings:b,providerMetadata:R}}async doStream(X){let{args:Z,warnings:j}=await this.getArgs(X),F={...Z,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:w}=await XQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),X.headers),body:F,failedResponseHandler:jQ,successfulResponseHandler:wQ(pW),abortSignal:X.abortSignal,fetch:this.config.fetch}),D=[],$={unified:"other",raw:void 0},q=void 0,b=!1,K=!1,B={openai:{}};return{stream:w.pipeThrough(new TransformStream({start(f){f.enqueue({type:"stream-start",warnings:j})},transform(f,L){var S,_,g,A,R,H,n,s,p,m,i,Y,t,C,N,d,e;if(X.includeRawChunks)L.enqueue({type:"raw",rawValue:f.rawValue});if(!f.success){$={unified:"error",raw:void 0},L.enqueue({type:"error",error:f.error});return}let k=f.value;if("error"in k){$={unified:"error",raw:void 0},L.enqueue({type:"error",error:k.error});return}if(!b){let G=EQ(k);if(Object.values(G).some(Boolean))b=!0,L.enqueue({type:"response-metadata",...EQ(k)})}if(k.usage!=null){if(q=k.usage,((S=k.usage.completion_tokens_details)==null?void 0:S.accepted_prediction_tokens)!=null)B.openai.acceptedPredictionTokens=(_=k.usage.completion_tokens_details)==null?void 0:_.accepted_prediction_tokens;if(((g=k.usage.completion_tokens_details)==null?void 0:g.rejected_prediction_tokens)!=null)B.openai.rejectedPredictionTokens=(A=k.usage.completion_tokens_details)==null?void 0:A.rejected_prediction_tokens}let M=k.choices[0];if((M==null?void 0:M.finish_reason)!=null)$={unified:vQ(M.finish_reason),raw:M.finish_reason};if(((R=M==null?void 0:M.logprobs)==null?void 0:R.content)!=null)B.openai.logprobs=M.logprobs.content;if((M==null?void 0:M.delta)==null)return;let E=M.delta;if(E.content!=null){if(!K)L.enqueue({type:"text-start",id:"0"}),K=!0;L.enqueue({type:"text-delta",id:"0",delta:E.content})}if(E.tool_calls!=null)for(let G of E.tool_calls){let T=G.index;if(D[T]==null){if(G.type!=null&&G.type!=="function")throw new UQ({data:G,message:"Expected 'function' type."});if(G.id==null)throw new UQ({data:G,message:"Expected 'id' to be a string."});if(((H=G.function)==null?void 0:H.name)==null)throw new UQ({data:G,message:"Expected 'function.name' to be a string."});L.enqueue({type:"tool-input-start",id:G.id,toolName:G.function.name}),D[T]={id:G.id,type:"function",function:{name:G.function.name,arguments:(n=G.function.arguments)!=null?n:""},hasFinished:!1};let z=D[T];if(((s=z.function)==null?void 0:s.name)!=null&&((p=z.function)==null?void 0:p.arguments)!=null){if(z.function.arguments.length>0)L.enqueue({type:"tool-input-delta",id:z.id,delta:z.function.arguments});if(bQ(z.function.arguments))L.enqueue({type:"tool-input-end",id:z.id}),L.enqueue({type:"tool-call",toolCallId:(m=z.id)!=null?m:QQ(),toolName:z.function.name,input:z.function.arguments}),z.hasFinished=!0}continue}let x=D[T];if(x.hasFinished)continue;if(((i=G.function)==null?void 0:i.arguments)!=null)x.function.arguments+=(t=(Y=G.function)==null?void 0:Y.arguments)!=null?t:"";if(L.enqueue({type:"tool-input-delta",id:x.id,delta:(C=G.function.arguments)!=null?C:""}),((N=x.function)==null?void 0:N.name)!=null&&((d=x.function)==null?void 0:d.arguments)!=null&&bQ(x.function.arguments))L.enqueue({type:"tool-input-end",id:x.id}),L.enqueue({type:"tool-call",toolCallId:(e=x.id)!=null?e:QQ(),toolName:x.function.name,input:x.function.arguments}),x.hasFinished=!0}if(E.annotations!=null)for(let G of E.annotations)L.enqueue({type:"source",sourceType:"url",id:QQ(),url:G.url_citation.url,title:G.url_citation.title})},flush(f){if(K)f.enqueue({type:"text-end",id:"0"});f.enqueue({type:"finish",finishReason:$,usage:cQ(q),...B!=null?{providerMetadata:B}:{}})}})),request:{body:F},response:{headers:J}}}};function nQ(X){var Z,j,F,J;if(X==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 w=(Z=X.prompt_tokens)!=null?Z:0,D=(j=X.completion_tokens)!=null?j:0;return{inputTokens:{total:(F=X.prompt_tokens)!=null?F:void 0,noCache:w,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:(J=X.completion_tokens)!=null?J:void 0,text:D,reasoning:void 0},raw:X}}function dW({prompt:X,user:Z="user",assistant:j="assistant"}){let F="";if(X[0].role==="system")F+=`${X[0].content}
|
|
2
|
+
import{$e as AQ,Ue as l,Ve as jW,We as LQ,Ye as KQ,_e as GW,af as QQ,bf as hW,df as OQ,ef as CW,ff as IW,gf as KW,hf as P,if as O,jf as u,kf as VW,lf as bQ,mf as WQ,nf as XQ,of as qQ,pf as DW,qf as a,rf as FW,sf as wQ,tf as BQ,uf as wW}from"./chunk-89b6ttzs.js";import{fs as $W,js as BW,ks as UQ,ps as JW,rs as ZQ}from"./chunk-4ngvj758.js";import"./chunk-cqtkxwd8.js";import"./chunk-wpkr3vzf.js";import{fw as Q}from"./chunk-xphzr4wg.js";import"./chunk-hav9pgf3.js";import"./chunk-9svh74gt.js";var NQ=Q.object({error:Q.object({message:Q.string(),type:Q.string().nullish(),param:Q.any().nullish(),code:Q.union([Q.string(),Q.number()]).nullish()})}),jQ=FW({errorSchema:NQ,errorToMessage:(X)=>X.error.message});function zW(X){let Z=X.startsWith("o3")||X.startsWith("o4-mini")||X.startsWith("gpt-5")&&!X.startsWith("gpt-5-chat"),j=X.startsWith("gpt-4")||X.startsWith("gpt-5")&&!X.startsWith("gpt-5-nano")&&!X.startsWith("gpt-5-chat")&&!X.startsWith("gpt-5.4-nano")||X.startsWith("o3")||X.startsWith("o4-mini"),F=X.startsWith("o1")||X.startsWith("o3")||X.startsWith("o4-mini")||X.startsWith("gpt-5")&&!X.startsWith("gpt-5-chat"),J=X.startsWith("gpt-5.1")||X.startsWith("gpt-5.2")||X.startsWith("gpt-5.3")||X.startsWith("gpt-5.4");return{supportsFlexProcessing:Z,supportsPriorityProcessing:j,isReasoningModel:F,systemMessageMode:F?"developer":"system",supportsNonReasoningParameters:J}}function cQ(X){var Z,j,F,J,w,D;if(X==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 $=(Z=X.prompt_tokens)!=null?Z:0,q=(j=X.completion_tokens)!=null?j:0,b=(J=(F=X.prompt_tokens_details)==null?void 0:F.cached_tokens)!=null?J:0,K=(D=(w=X.completion_tokens_details)==null?void 0:w.reasoning_tokens)!=null?D:0;return{inputTokens:{total:$,noCache:$-b,cacheRead:b,cacheWrite:void 0},outputTokens:{total:q,text:q-K,reasoning:K},raw:X}}function _W({prompt:X,systemMessageMode:Z="system"}){var j;let F=[],J=[];for(let{role:w,content:D}of X)switch(w){case"system":{switch(Z){case"system":{F.push({role:"system",content:D});break}case"developer":{F.push({role:"developer",content:D});break}case"remove":{J.push({type:"other",message:"system messages are removed for this model"});break}default:throw Error(`Unsupported system message mode: ${Z}`)}break}case"user":{if(D.length===1&&D[0].type==="text"){F.push({role:"user",content:D[0].text});break}F.push({role:"user",content:D.map(($,q)=>{var b,K,B;switch($.type){case"text":return{type:"text",text:$.text};case"file":if($.mediaType.startsWith("image/")){let f=$.mediaType==="image/*"?"image/jpeg":$.mediaType;return{type:"image_url",image_url:{url:$.data instanceof URL?$.data.toString():`data:${f};base64,${KQ($.data)}`,detail:(K=(b=$.providerOptions)==null?void 0:b.openai)==null?void 0:K.imageDetail}}}else if($.mediaType.startsWith("audio/")){if($.data instanceof URL)throw new ZQ({functionality:"audio file parts with URLs"});switch($.mediaType){case"audio/wav":return{type:"input_audio",input_audio:{data:KQ($.data),format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:KQ($.data),format:"mp3"}};default:throw new ZQ({functionality:`audio content parts with media type ${$.mediaType}`})}}else if($.mediaType==="application/pdf"){if($.data instanceof URL)throw new ZQ({functionality:"PDF file parts with URLs"});return{type:"file",file:typeof $.data==="string"&&$.data.startsWith("file-")?{file_id:$.data}:{filename:(B=$.filename)!=null?B:`part-${q}.pdf`,file_data:`data:application/pdf;base64,${KQ($.data)}`}}}else throw new ZQ({functionality:`file part media type ${$.mediaType}`})}})});break}case"assistant":{let $="",q=[];for(let b of D)switch(b.type){case"text":{$+=b.text;break}case"tool-call":{q.push({id:b.toolCallId,type:"function",function:{name:b.toolName,arguments:JSON.stringify(b.input)}});break}}F.push({role:"assistant",content:$,tool_calls:q.length>0?q:void 0});break}case"tool":{for(let $ of D){if($.type==="tool-approval-response")continue;let q=$.output,b;switch(q.type){case"text":case"error-text":b=q.value;break;case"execution-denied":b=(j=q.reason)!=null?j:"Tool execution denied.";break;case"content":case"json":case"error-json":b=JSON.stringify(q.value);break}F.push({role:"tool",tool_call_id:$.toolCallId,content:b})}break}default:throw Error(`Unsupported role: ${w}`)}return{messages:F,warnings:J}}function EQ({id:X,model:Z,created:j}){return{id:X!=null?X:void 0,modelId:Z!=null?Z:void 0,timestamp:j?new Date(j*1000):void 0}}function vQ(X){switch(X){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 mW=P(()=>O(Q.object({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(),tool_calls:Q.array(Q.object({id:Q.string().nullish(),type:Q.literal("function"),function:Q.object({name:Q.string(),arguments:Q.string()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}),index:Q.number(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish()})),usage:Q.object({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()}))),pW=P(()=>O(Q.union([Q.object({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(),tool_calls:Q.array(Q.object({index:Q.number(),id:Q.string().nullish(),type:Q.literal("function").nullish(),function:Q.object({name:Q.string().nullish(),arguments:Q.string().nullish()})})).nullish(),annotations:Q.array(Q.object({type:Q.literal("url_citation"),url_citation:Q.object({start_index:Q.number(),end_index:Q.number(),url:Q.string(),title:Q.string()})})).nullish()}).nullish(),logprobs:Q.object({content:Q.array(Q.object({token:Q.string(),logprob:Q.number(),top_logprobs:Q.array(Q.object({token:Q.string(),logprob:Q.number()}))})).nullish()}).nullish(),finish_reason:Q.string().nullish(),index:Q.number()})),usage:Q.object({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()}),NQ]))),sW=P(()=>O(Q.object({logitBias:Q.record(Q.coerce.number(),Q.number()).optional(),logprobs:Q.union([Q.boolean(),Q.number()]).optional(),parallelToolCalls:Q.boolean().optional(),user:Q.string().optional(),reasoningEffort:Q.enum(["none","minimal","low","medium","high","xhigh"]).optional(),maxCompletionTokens:Q.number().optional(),store:Q.boolean().optional(),metadata:Q.record(Q.string().max(64),Q.string().max(512)).optional(),prediction:Q.record(Q.string(),Q.any()).optional(),serviceTier:Q.enum(["auto","flex","priority","default"]).optional(),strictJsonSchema:Q.boolean().optional(),textVerbosity:Q.enum(["low","medium","high"]).optional(),promptCacheKey:Q.string().optional(),promptCacheRetention:Q.enum(["in_memory","24h"]).optional(),safetyIdentifier:Q.string().optional(),systemMessageMode:Q.enum(["system","developer","remove"]).optional(),forceReasoning:Q.boolean().optional()})));function iW({tools:X,toolChoice:Z}){X=(X==null?void 0:X.length)?X:void 0;let j=[];if(X==null)return{tools:void 0,toolChoice:void 0,toolWarnings:j};let F=[];for(let w of X)switch(w.type){case"function":F.push({type:"function",function:{name:w.name,description:w.description,parameters:w.inputSchema,...w.strict!=null?{strict:w.strict}:{}}});break;default:j.push({type:"unsupported",feature:`tool type: ${w.type}`});break}if(Z==null)return{tools:F,toolChoice:void 0,toolWarnings:j};let J=Z.type;switch(J){case"auto":case"none":case"required":return{tools:F,toolChoice:J,toolWarnings:j};case"tool":return{tools:F,toolChoice:{type:"function",function:{name:Z.toolName}},toolWarnings:j};default:throw new ZQ({functionality:`tool choice type: ${J}`})}}var LW=class{constructor(X,Z){this.specificationVersion="v3",this.supportedUrls={"image/*":[/^https?:\/\/.*$/]},this.modelId=X,this.config=Z}get provider(){return this.config.provider}async getArgs({prompt:X,maxOutputTokens:Z,temperature:j,topP:F,topK:J,frequencyPenalty:w,presencePenalty:D,stopSequences:$,responseFormat:q,seed:b,tools:K,toolChoice:B,providerOptions:f}){var L,S,_,g,A;let R=[],H=(L=await WQ({provider:"openai",providerOptions:f,schema:sW}))!=null?L:{},n=zW(this.modelId),s=(S=H.forceReasoning)!=null?S:n.isReasoningModel;if(J!=null)R.push({type:"unsupported",feature:"topK"});let{messages:p,warnings:m}=_W({prompt:X,systemMessageMode:(_=H.systemMessageMode)!=null?_:s?"developer":n.systemMessageMode});R.push(...m);let i=(g=H.strictJsonSchema)!=null?g:!0,Y={model:this.modelId,logit_bias:H.logitBias,logprobs:H.logprobs===!0||typeof H.logprobs==="number"?!0:void 0,top_logprobs:typeof H.logprobs==="number"?H.logprobs:typeof H.logprobs==="boolean"?H.logprobs?0:void 0:void 0,user:H.user,parallel_tool_calls:H.parallelToolCalls,max_tokens:Z,temperature:j,top_p:F,frequency_penalty:w,presence_penalty:D,response_format:(q==null?void 0:q.type)==="json"?q.schema!=null?{type:"json_schema",json_schema:{schema:q.schema,strict:i,name:(A=q.name)!=null?A:"response",description:q.description}}:{type:"json_object"}:void 0,stop:$,seed:b,verbosity:H.textVerbosity,max_completion_tokens:H.maxCompletionTokens,store:H.store,metadata:H.metadata,prediction:H.prediction,reasoning_effort:H.reasoningEffort,service_tier:H.serviceTier,prompt_cache_key:H.promptCacheKey,prompt_cache_retention:H.promptCacheRetention,safety_identifier:H.safetyIdentifier,messages:p};if(s){if(H.reasoningEffort!=="none"||!n.supportsNonReasoningParameters){if(Y.temperature!=null)Y.temperature=void 0,R.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for reasoning models"});if(Y.top_p!=null)Y.top_p=void 0,R.push({type:"unsupported",feature:"topP",details:"topP is not supported for reasoning models"});if(Y.logprobs!=null)Y.logprobs=void 0,R.push({type:"other",message:"logprobs is not supported for reasoning models"})}if(Y.frequency_penalty!=null)Y.frequency_penalty=void 0,R.push({type:"unsupported",feature:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"});if(Y.presence_penalty!=null)Y.presence_penalty=void 0,R.push({type:"unsupported",feature:"presencePenalty",details:"presencePenalty is not supported for reasoning models"});if(Y.logit_bias!=null)Y.logit_bias=void 0,R.push({type:"other",message:"logitBias is not supported for reasoning models"});if(Y.top_logprobs!=null)Y.top_logprobs=void 0,R.push({type:"other",message:"topLogprobs is not supported for reasoning models"});if(Y.max_tokens!=null){if(Y.max_completion_tokens==null)Y.max_completion_tokens=Y.max_tokens;Y.max_tokens=void 0}}else if(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview")){if(Y.temperature!=null)Y.temperature=void 0,R.push({type:"unsupported",feature:"temperature",details:"temperature is not supported for the search preview models and has been removed."})}if(H.serviceTier==="flex"&&!n.supportsFlexProcessing)R.push({type:"unsupported",feature:"serviceTier",details:"flex processing is only available for o3, o4-mini, and gpt-5 models"}),Y.service_tier=void 0;if(H.serviceTier==="priority"&&!n.supportsPriorityProcessing)R.push({type:"unsupported",feature:"serviceTier",details:"priority processing is only available for supported models (gpt-4, gpt-5, gpt-5-mini, o3, o4-mini) and requires Enterprise access. gpt-5-nano is not supported"}),Y.service_tier=void 0;let{tools:t,toolChoice:C,toolWarnings:N}=iW({tools:K,toolChoice:B});return{args:{...Y,tools:t,tool_choice:C},warnings:[...R,...N]}}async doGenerate(X){var Z,j,F,J,w,D,$;let{args:q,warnings:b}=await this.getArgs(X),{responseHeaders:K,value:B,rawValue:f}=await XQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),X.headers),body:q,failedResponseHandler:jQ,successfulResponseHandler:BQ(mW),abortSignal:X.abortSignal,fetch:this.config.fetch}),L=B.choices[0],S=[],_=L.message.content;if(_!=null&&_.length>0)S.push({type:"text",text:_});for(let H of(Z=L.message.tool_calls)!=null?Z:[])S.push({type:"tool-call",toolCallId:(j=H.id)!=null?j:QQ(),toolName:H.function.name,input:H.function.arguments});for(let H of(F=L.message.annotations)!=null?F:[])S.push({type:"source",sourceType:"url",id:QQ(),url:H.url_citation.url,title:H.url_citation.title});let g=(J=B.usage)==null?void 0:J.completion_tokens_details,A=(w=B.usage)==null?void 0:w.prompt_tokens_details,R={openai:{}};if((g==null?void 0:g.accepted_prediction_tokens)!=null)R.openai.acceptedPredictionTokens=g==null?void 0:g.accepted_prediction_tokens;if((g==null?void 0:g.rejected_prediction_tokens)!=null)R.openai.rejectedPredictionTokens=g==null?void 0:g.rejected_prediction_tokens;if(((D=L.logprobs)==null?void 0:D.content)!=null)R.openai.logprobs=L.logprobs.content;return{content:S,finishReason:{unified:vQ(L.finish_reason),raw:($=L.finish_reason)!=null?$:void 0},usage:cQ(B.usage),request:{body:q},response:{...EQ(B),headers:K,body:f},warnings:b,providerMetadata:R}}async doStream(X){let{args:Z,warnings:j}=await this.getArgs(X),F={...Z,stream:!0,stream_options:{include_usage:!0}},{responseHeaders:J,value:w}=await XQ({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:l(this.config.headers(),X.headers),body:F,failedResponseHandler:jQ,successfulResponseHandler:wQ(pW),abortSignal:X.abortSignal,fetch:this.config.fetch}),D=[],$={unified:"other",raw:void 0},q=void 0,b=!1,K=!1,B={openai:{}};return{stream:w.pipeThrough(new TransformStream({start(f){f.enqueue({type:"stream-start",warnings:j})},transform(f,L){var S,_,g,A,R,H,n,s,p,m,i,Y,t,C,N,d,e;if(X.includeRawChunks)L.enqueue({type:"raw",rawValue:f.rawValue});if(!f.success){$={unified:"error",raw:void 0},L.enqueue({type:"error",error:f.error});return}let k=f.value;if("error"in k){$={unified:"error",raw:void 0},L.enqueue({type:"error",error:k.error});return}if(!b){let G=EQ(k);if(Object.values(G).some(Boolean))b=!0,L.enqueue({type:"response-metadata",...EQ(k)})}if(k.usage!=null){if(q=k.usage,((S=k.usage.completion_tokens_details)==null?void 0:S.accepted_prediction_tokens)!=null)B.openai.acceptedPredictionTokens=(_=k.usage.completion_tokens_details)==null?void 0:_.accepted_prediction_tokens;if(((g=k.usage.completion_tokens_details)==null?void 0:g.rejected_prediction_tokens)!=null)B.openai.rejectedPredictionTokens=(A=k.usage.completion_tokens_details)==null?void 0:A.rejected_prediction_tokens}let M=k.choices[0];if((M==null?void 0:M.finish_reason)!=null)$={unified:vQ(M.finish_reason),raw:M.finish_reason};if(((R=M==null?void 0:M.logprobs)==null?void 0:R.content)!=null)B.openai.logprobs=M.logprobs.content;if((M==null?void 0:M.delta)==null)return;let E=M.delta;if(E.content!=null){if(!K)L.enqueue({type:"text-start",id:"0"}),K=!0;L.enqueue({type:"text-delta",id:"0",delta:E.content})}if(E.tool_calls!=null)for(let G of E.tool_calls){let T=G.index;if(D[T]==null){if(G.type!=null&&G.type!=="function")throw new UQ({data:G,message:"Expected 'function' type."});if(G.id==null)throw new UQ({data:G,message:"Expected 'id' to be a string."});if(((H=G.function)==null?void 0:H.name)==null)throw new UQ({data:G,message:"Expected 'function.name' to be a string."});L.enqueue({type:"tool-input-start",id:G.id,toolName:G.function.name}),D[T]={id:G.id,type:"function",function:{name:G.function.name,arguments:(n=G.function.arguments)!=null?n:""},hasFinished:!1};let z=D[T];if(((s=z.function)==null?void 0:s.name)!=null&&((p=z.function)==null?void 0:p.arguments)!=null){if(z.function.arguments.length>0)L.enqueue({type:"tool-input-delta",id:z.id,delta:z.function.arguments});if(bQ(z.function.arguments))L.enqueue({type:"tool-input-end",id:z.id}),L.enqueue({type:"tool-call",toolCallId:(m=z.id)!=null?m:QQ(),toolName:z.function.name,input:z.function.arguments}),z.hasFinished=!0}continue}let x=D[T];if(x.hasFinished)continue;if(((i=G.function)==null?void 0:i.arguments)!=null)x.function.arguments+=(t=(Y=G.function)==null?void 0:Y.arguments)!=null?t:"";if(L.enqueue({type:"tool-input-delta",id:x.id,delta:(C=G.function.arguments)!=null?C:""}),((N=x.function)==null?void 0:N.name)!=null&&((d=x.function)==null?void 0:d.arguments)!=null&&bQ(x.function.arguments))L.enqueue({type:"tool-input-end",id:x.id}),L.enqueue({type:"tool-call",toolCallId:(e=x.id)!=null?e:QQ(),toolName:x.function.name,input:x.function.arguments}),x.hasFinished=!0}if(E.annotations!=null)for(let G of E.annotations)L.enqueue({type:"source",sourceType:"url",id:QQ(),url:G.url_citation.url,title:G.url_citation.title})},flush(f){if(K)f.enqueue({type:"text-end",id:"0"});f.enqueue({type:"finish",finishReason:$,usage:cQ(q),...B!=null?{providerMetadata:B}:{}})}})),request:{body:F},response:{headers:J}}}};function nQ(X){var Z,j,F,J;if(X==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 w=(Z=X.prompt_tokens)!=null?Z:0,D=(j=X.completion_tokens)!=null?j:0;return{inputTokens:{total:(F=X.prompt_tokens)!=null?F:void 0,noCache:w,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:(J=X.completion_tokens)!=null?J:void 0,text:D,reasoning:void 0},raw:X}}function dW({prompt:X,user:Z="user",assistant:j="assistant"}){let F="";if(X[0].role==="system")F+=`${X[0].content}
|
|
3
3
|
|
|
4
4
|
`,X=X.slice(1);for(let{role:J,content:w}of X)switch(J){case"system":throw new BW({message:"Unexpected system message in prompt: ${content}",prompt:X});case"user":{let D=w.map(($)=>{switch($.type){case"text":return $.text}}).filter(Boolean).join("");F+=`${Z}:
|
|
5
5
|
${D}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Bp as f,Cp as s,Dp as O,Hp as IG,Io as y,No as l,Po as p,Ro as qG,Wo as NG,Yo as _,bp as DG,rp as t,tp as R,up as b,vp as xG}from"./chunk-wm9nh9nb.js";import{Op as AG,Pp as r,Up as PG,Wp as T}from"./chunk-scnbt714.js";import{Kt as Q}from"./chunk-a48mx917.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{Or as t,Qr as R,Rr as b,Sr as xG,Yr as f,Zr as s,_r as O,cs as IG,dr as y,ir as l,kr as p,mr as qG,rr as NG,tr as _,yr as DG}from"./chunk-vbcekkw2.js";import{js as AG,ks as r,ps as PG,rs as T}from"./chunk-4ngvj758.js";import{fw as Q}from"./chunk-xphzr4wg.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 Zq,CG as _q,gG as $q,mG as ar,dG as br,jQ as cr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Pe as C}from"./chunk-qtdxy2q1.js";import{Ef as A}from"./chunk-wqkvsj5y.js";import{QQ as _}from"./chunk-9svh74gt.js";var S=_(C(),1),p=_(A(),1),N="AWS_ACCESS_KEY_ID",a="AWS_SECRET_ACCESS_KEY",i="AWS_SESSION_TOKEN",I="AWS_CREDENTIAL_EXPIRATION",d="AWS_CREDENTIAL_SCOPE",v="AWS_ACCOUNT_ID",T=(e)=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");let o=process.env[N],r=process.env[a],n=process.env[i],s=process.env[I],t=process.env[d],E=process.env[v];if(o&&r){let c={accessKeyId:o,secretAccessKey:r,...n&&{sessionToken:n},...s&&{expiration:new Date(s)},...t&&{credentialScope:t},...E&&{accountId:E}};return S.setCredentialFeature(c,"CREDENTIALS_ENV_VARS","g"),c}throw new p.CredentialsProviderError("Unable to find environment variable credentials.",{logger:e?.logger})};export{N as ze,a as Ae,i as Be,I as Ce,d as De,v as Ee,T as Fe};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$p as m}from"./chunk-y3gy62q5.js";var B=Symbol("Let zodToJsonSchema decide on which parser to use"),Zt=(t,n)=>{if(n.description)try{return{...t,...JSON.parse(n.description)}}catch{}return t},M={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},U=(t)=>typeof t==="string"?{...M,name:t}:{...M,...t};var w=(t)=>{let n=U(t),r=n.name!==void 0?[...n.basePath,n.definitionPath,n.name]:n.basePath;return{...n,flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(n.definitions).map(([o,p])=>[p._def,{def:p._def,path:[...n.basePath,n.definitionPath,o],jsonSchema:void 0}]))}};function S(t,n,r,o){if(!o?.errorMessages)return;if(r)t.errorMessage={...t.errorMessage,[n]:r}}function e(t,n,r,o,p){t[n]=r,S(t,n,o,p)}var b=(t,n)=>{let r=0;for(;r<t.length&&r<n.length;r++)if(t[r]!==n[r])break;return[(t.length-r).toString(),...n.slice(r)].join("/")};function D(t){if(t.target!=="openAi")return{};let n=[...t.basePath,t.definitionPath,t.openAiAnyTypeName];return t.flags.hasReferencedOpenAiAnyType=!0,{$ref:t.$refStrategy==="relative"?b(n,t.currentPath):n.join("/")}}function E(t,n){let r={type:"array"};if(t.type?._def&&t.type?._def?.typeName!==m.ZodAny)r.items=i(t.type._def,{...n,currentPath:[...n.currentPath,"items"]});if(t.minLength)e(r,"minItems",t.minLength.value,t.minLength.message,n);if(t.maxLength)e(r,"maxItems",t.maxLength.value,t.maxLength.message,n);if(t.exactLength)e(r,"minItems",t.exactLength.value,t.exactLength.message,n),e(r,"maxItems",t.exactLength.value,t.exactLength.message,n);return r}function K(t,n){let r={type:"integer",format:"int64"};if(!t.checks)return r;for(let o of t.checks)switch(o.kind){case"min":if(n.target==="jsonSchema7")if(o.inclusive)e(r,"minimum",o.value,o.message,n);else e(r,"exclusiveMinimum",o.value,o.message,n);else{if(!o.inclusive)r.exclusiveMinimum=!0;e(r,"minimum",o.value,o.message,n)}break;case"max":if(n.target==="jsonSchema7")if(o.inclusive)e(r,"maximum",o.value,o.message,n);else e(r,"exclusiveMaximum",o.value,o.message,n);else{if(!o.inclusive)r.exclusiveMaximum=!0;e(r,"maximum",o.value,o.message,n)}break;case"multipleOf":e(r,"multipleOf",o.value,o.message,n);break}return r}function $(){return{type:"boolean"}}function N(t,n){return i(t.type._def,n)}var J=(t,n)=>{return i(t.innerType._def,n)};function O(t,n,r){let o=r??n.dateStrategy;if(Array.isArray(o))return{anyOf:o.map((p,u)=>O(t,n,p))};switch(o){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return ut(t,n)}}var ut=(t,n)=>{let r={type:"integer",format:"unix-time"};if(n.target==="openApi3")return r;for(let o of t.checks)switch(o.kind){case"min":e(r,"minimum",o.value,o.message,n);break;case"max":e(r,"maximum",o.value,o.message,n);break}return r};function q(t,n){return{...i(t.innerType._def,n),default:t.defaultValue()}}function Q(t,n){return n.effectStrategy==="input"?i(t.schema._def,n):D(n)}function X(t){return{type:"string",enum:Array.from(t.values)}}var mt=(t)=>{if("type"in t&&t.type==="string")return!1;return"allOf"in t};function Y(t,n){let r=[i(t.left._def,{...n,currentPath:[...n.currentPath,"allOf","0"]}),i(t.right._def,{...n,currentPath:[...n.currentPath,"allOf","1"]})].filter((u)=>!!u),o=n.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,p=[];return r.forEach((u)=>{if(mt(u)){if(p.push(...u.allOf),u.unevaluatedProperties===void 0)o=void 0}else{let l=u;if("additionalProperties"in u&&u.additionalProperties===!1){let{additionalProperties:y,...a}=u;l=a}else o=void 0;p.push(l)}}),p.length?{allOf:p,...o}:void 0}function H(t,n){let r=typeof t.value;if(r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string")return{type:Array.isArray(t.value)?"array":"object"};if(n.target==="openApi3")return{type:r==="bigint"?"integer":r,enum:[t.value]};return{type:r==="bigint"?"integer":r,const:t.value}}var I=void 0,Z={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(I===void 0)I=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return I},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 A(t,n){let r={type:"string"};if(t.checks)for(let o of t.checks)switch(o.kind){case"min":e(r,"minLength",typeof r.minLength==="number"?Math.max(r.minLength,o.value):o.value,o.message,n);break;case"max":e(r,"maxLength",typeof r.maxLength==="number"?Math.min(r.maxLength,o.value):o.value,o.message,n);break;case"email":switch(n.emailStrategy){case"format:email":v(r,"email",o.message,n);break;case"format:idn-email":v(r,"idn-email",o.message,n);break;case"pattern:zod":g(r,Z.email,o.message,n);break}break;case"url":v(r,"uri",o.message,n);break;case"uuid":v(r,"uuid",o.message,n);break;case"regex":g(r,o.regex,o.message,n);break;case"cuid":g(r,Z.cuid,o.message,n);break;case"cuid2":g(r,Z.cuid2,o.message,n);break;case"startsWith":g(r,RegExp(`^${L(o.value,n)}`),o.message,n);break;case"endsWith":g(r,RegExp(`${L(o.value,n)}$`),o.message,n);break;case"datetime":v(r,"date-time",o.message,n);break;case"date":v(r,"date",o.message,n);break;case"time":v(r,"time",o.message,n);break;case"duration":v(r,"duration",o.message,n);break;case"length":e(r,"minLength",typeof r.minLength==="number"?Math.max(r.minLength,o.value):o.value,o.message,n),e(r,"maxLength",typeof r.maxLength==="number"?Math.min(r.maxLength,o.value):o.value,o.message,n);break;case"includes":{g(r,RegExp(L(o.value,n)),o.message,n);break}case"ip":{if(o.version!=="v6")v(r,"ipv4",o.message,n);if(o.version!=="v4")v(r,"ipv6",o.message,n);break}case"base64url":g(r,Z.base64url,o.message,n);break;case"jwt":g(r,Z.jwt,o.message,n);break;case"cidr":{if(o.version!=="v6")g(r,Z.ipv4Cidr,o.message,n);if(o.version!=="v4")g(r,Z.ipv6Cidr,o.message,n);break}case"emoji":g(r,Z.emoji(),o.message,n);break;case"ulid":{g(r,Z.ulid,o.message,n);break}case"base64":{switch(n.base64Strategy){case"format:binary":{v(r,"binary",o.message,n);break}case"contentEncoding:base64":{e(r,"contentEncoding","base64",o.message,n);break}case"pattern:zod":{g(r,Z.base64,o.message,n);break}}break}case"nanoid":g(r,Z.nanoid,o.message,n);case"toLowerCase":case"toUpperCase":case"trim":break;default:((p)=>{})(o)}return r}function L(t,n){return n.patternStrategy==="escape"?et(t):t}var at=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function et(t){let n="";for(let r=0;r<t.length;r++){if(!at.has(t[r]))n+="\\";n+=t[r]}return n}function v(t,n,r,o){if(t.format||t.anyOf?.some((p)=>p.format)){if(!t.anyOf)t.anyOf=[];if(t.format){if(t.anyOf.push({format:t.format,...t.errorMessage&&o.errorMessages&&{errorMessage:{format:t.errorMessage.format}}}),delete t.format,t.errorMessage){if(delete t.errorMessage.format,Object.keys(t.errorMessage).length===0)delete t.errorMessage}}t.anyOf.push({format:n,...r&&o.errorMessages&&{errorMessage:{format:r}}})}else e(t,"format",n,r,o)}function g(t,n,r,o){if(t.pattern||t.allOf?.some((p)=>p.pattern)){if(!t.allOf)t.allOf=[];if(t.pattern){if(t.allOf.push({pattern:t.pattern,...t.errorMessage&&o.errorMessages&&{errorMessage:{pattern:t.errorMessage.pattern}}}),delete t.pattern,t.errorMessage){if(delete t.errorMessage.pattern,Object.keys(t.errorMessage).length===0)delete t.errorMessage}}t.allOf.push({pattern:V(n,o),...r&&o.errorMessages&&{errorMessage:{pattern:r}}})}else e(t,"pattern",V(n,o),r,o)}function V(t,n){if(!n.applyRegexFlags||!t.flags)return t.source;let r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},o=r.i?t.source.toLowerCase():t.source,p="",u=!1,l=!1,y=!1;for(let a=0;a<o.length;a++){if(u){p+=o[a],u=!1;continue}if(r.i){if(l){if(o[a].match(/[a-z]/)){if(y)p+=o[a],p+=`${o[a-2]}-${o[a]}`.toUpperCase(),y=!1;else if(o[a+1]==="-"&&o[a+2]?.match(/[a-z]/))p+=o[a],y=!0;else p+=`${o[a]}${o[a].toUpperCase()}`;continue}}else if(o[a].match(/[a-z]/)){p+=`[${o[a]}${o[a].toUpperCase()}]`;continue}}if(r.m){if(o[a]==="^"){p+=`(^|(?<=[\r
|
|
2
|
+
import{ws as m}from"./chunk-wpkr3vzf.js";var B=Symbol("Let zodToJsonSchema decide on which parser to use"),Zt=(t,n)=>{if(n.description)try{return{...t,...JSON.parse(n.description)}}catch{}return t},M={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},U=(t)=>typeof t==="string"?{...M,name:t}:{...M,...t};var w=(t)=>{let n=U(t),r=n.name!==void 0?[...n.basePath,n.definitionPath,n.name]:n.basePath;return{...n,flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(n.definitions).map(([o,p])=>[p._def,{def:p._def,path:[...n.basePath,n.definitionPath,o],jsonSchema:void 0}]))}};function S(t,n,r,o){if(!o?.errorMessages)return;if(r)t.errorMessage={...t.errorMessage,[n]:r}}function e(t,n,r,o,p){t[n]=r,S(t,n,o,p)}var b=(t,n)=>{let r=0;for(;r<t.length&&r<n.length;r++)if(t[r]!==n[r])break;return[(t.length-r).toString(),...n.slice(r)].join("/")};function D(t){if(t.target!=="openAi")return{};let n=[...t.basePath,t.definitionPath,t.openAiAnyTypeName];return t.flags.hasReferencedOpenAiAnyType=!0,{$ref:t.$refStrategy==="relative"?b(n,t.currentPath):n.join("/")}}function E(t,n){let r={type:"array"};if(t.type?._def&&t.type?._def?.typeName!==m.ZodAny)r.items=i(t.type._def,{...n,currentPath:[...n.currentPath,"items"]});if(t.minLength)e(r,"minItems",t.minLength.value,t.minLength.message,n);if(t.maxLength)e(r,"maxItems",t.maxLength.value,t.maxLength.message,n);if(t.exactLength)e(r,"minItems",t.exactLength.value,t.exactLength.message,n),e(r,"maxItems",t.exactLength.value,t.exactLength.message,n);return r}function K(t,n){let r={type:"integer",format:"int64"};if(!t.checks)return r;for(let o of t.checks)switch(o.kind){case"min":if(n.target==="jsonSchema7")if(o.inclusive)e(r,"minimum",o.value,o.message,n);else e(r,"exclusiveMinimum",o.value,o.message,n);else{if(!o.inclusive)r.exclusiveMinimum=!0;e(r,"minimum",o.value,o.message,n)}break;case"max":if(n.target==="jsonSchema7")if(o.inclusive)e(r,"maximum",o.value,o.message,n);else e(r,"exclusiveMaximum",o.value,o.message,n);else{if(!o.inclusive)r.exclusiveMaximum=!0;e(r,"maximum",o.value,o.message,n)}break;case"multipleOf":e(r,"multipleOf",o.value,o.message,n);break}return r}function $(){return{type:"boolean"}}function N(t,n){return i(t.type._def,n)}var J=(t,n)=>{return i(t.innerType._def,n)};function O(t,n,r){let o=r??n.dateStrategy;if(Array.isArray(o))return{anyOf:o.map((p,u)=>O(t,n,p))};switch(o){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return ut(t,n)}}var ut=(t,n)=>{let r={type:"integer",format:"unix-time"};if(n.target==="openApi3")return r;for(let o of t.checks)switch(o.kind){case"min":e(r,"minimum",o.value,o.message,n);break;case"max":e(r,"maximum",o.value,o.message,n);break}return r};function q(t,n){return{...i(t.innerType._def,n),default:t.defaultValue()}}function Q(t,n){return n.effectStrategy==="input"?i(t.schema._def,n):D(n)}function X(t){return{type:"string",enum:Array.from(t.values)}}var mt=(t)=>{if("type"in t&&t.type==="string")return!1;return"allOf"in t};function Y(t,n){let r=[i(t.left._def,{...n,currentPath:[...n.currentPath,"allOf","0"]}),i(t.right._def,{...n,currentPath:[...n.currentPath,"allOf","1"]})].filter((u)=>!!u),o=n.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,p=[];return r.forEach((u)=>{if(mt(u)){if(p.push(...u.allOf),u.unevaluatedProperties===void 0)o=void 0}else{let l=u;if("additionalProperties"in u&&u.additionalProperties===!1){let{additionalProperties:y,...a}=u;l=a}else o=void 0;p.push(l)}}),p.length?{allOf:p,...o}:void 0}function H(t,n){let r=typeof t.value;if(r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string")return{type:Array.isArray(t.value)?"array":"object"};if(n.target==="openApi3")return{type:r==="bigint"?"integer":r,enum:[t.value]};return{type:r==="bigint"?"integer":r,const:t.value}}var I=void 0,Z={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(I===void 0)I=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u");return I},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 A(t,n){let r={type:"string"};if(t.checks)for(let o of t.checks)switch(o.kind){case"min":e(r,"minLength",typeof r.minLength==="number"?Math.max(r.minLength,o.value):o.value,o.message,n);break;case"max":e(r,"maxLength",typeof r.maxLength==="number"?Math.min(r.maxLength,o.value):o.value,o.message,n);break;case"email":switch(n.emailStrategy){case"format:email":v(r,"email",o.message,n);break;case"format:idn-email":v(r,"idn-email",o.message,n);break;case"pattern:zod":g(r,Z.email,o.message,n);break}break;case"url":v(r,"uri",o.message,n);break;case"uuid":v(r,"uuid",o.message,n);break;case"regex":g(r,o.regex,o.message,n);break;case"cuid":g(r,Z.cuid,o.message,n);break;case"cuid2":g(r,Z.cuid2,o.message,n);break;case"startsWith":g(r,RegExp(`^${L(o.value,n)}`),o.message,n);break;case"endsWith":g(r,RegExp(`${L(o.value,n)}$`),o.message,n);break;case"datetime":v(r,"date-time",o.message,n);break;case"date":v(r,"date",o.message,n);break;case"time":v(r,"time",o.message,n);break;case"duration":v(r,"duration",o.message,n);break;case"length":e(r,"minLength",typeof r.minLength==="number"?Math.max(r.minLength,o.value):o.value,o.message,n),e(r,"maxLength",typeof r.maxLength==="number"?Math.min(r.maxLength,o.value):o.value,o.message,n);break;case"includes":{g(r,RegExp(L(o.value,n)),o.message,n);break}case"ip":{if(o.version!=="v6")v(r,"ipv4",o.message,n);if(o.version!=="v4")v(r,"ipv6",o.message,n);break}case"base64url":g(r,Z.base64url,o.message,n);break;case"jwt":g(r,Z.jwt,o.message,n);break;case"cidr":{if(o.version!=="v6")g(r,Z.ipv4Cidr,o.message,n);if(o.version!=="v4")g(r,Z.ipv6Cidr,o.message,n);break}case"emoji":g(r,Z.emoji(),o.message,n);break;case"ulid":{g(r,Z.ulid,o.message,n);break}case"base64":{switch(n.base64Strategy){case"format:binary":{v(r,"binary",o.message,n);break}case"contentEncoding:base64":{e(r,"contentEncoding","base64",o.message,n);break}case"pattern:zod":{g(r,Z.base64,o.message,n);break}}break}case"nanoid":g(r,Z.nanoid,o.message,n);case"toLowerCase":case"toUpperCase":case"trim":break;default:((p)=>{})(o)}return r}function L(t,n){return n.patternStrategy==="escape"?et(t):t}var at=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function et(t){let n="";for(let r=0;r<t.length;r++){if(!at.has(t[r]))n+="\\";n+=t[r]}return n}function v(t,n,r,o){if(t.format||t.anyOf?.some((p)=>p.format)){if(!t.anyOf)t.anyOf=[];if(t.format){if(t.anyOf.push({format:t.format,...t.errorMessage&&o.errorMessages&&{errorMessage:{format:t.errorMessage.format}}}),delete t.format,t.errorMessage){if(delete t.errorMessage.format,Object.keys(t.errorMessage).length===0)delete t.errorMessage}}t.anyOf.push({format:n,...r&&o.errorMessages&&{errorMessage:{format:r}}})}else e(t,"format",n,r,o)}function g(t,n,r,o){if(t.pattern||t.allOf?.some((p)=>p.pattern)){if(!t.allOf)t.allOf=[];if(t.pattern){if(t.allOf.push({pattern:t.pattern,...t.errorMessage&&o.errorMessages&&{errorMessage:{pattern:t.errorMessage.pattern}}}),delete t.pattern,t.errorMessage){if(delete t.errorMessage.pattern,Object.keys(t.errorMessage).length===0)delete t.errorMessage}}t.allOf.push({pattern:V(n,o),...r&&o.errorMessages&&{errorMessage:{pattern:r}}})}else e(t,"pattern",V(n,o),r,o)}function V(t,n){if(!n.applyRegexFlags||!t.flags)return t.source;let r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},o=r.i?t.source.toLowerCase():t.source,p="",u=!1,l=!1,y=!1;for(let a=0;a<o.length;a++){if(u){p+=o[a],u=!1;continue}if(r.i){if(l){if(o[a].match(/[a-z]/)){if(y)p+=o[a],p+=`${o[a-2]}-${o[a]}`.toUpperCase(),y=!1;else if(o[a+1]==="-"&&o[a+2]?.match(/[a-z]/))p+=o[a],y=!0;else p+=`${o[a]}${o[a].toUpperCase()}`;continue}}else if(o[a].match(/[a-z]/)){p+=`[${o[a]}${o[a].toUpperCase()}]`;continue}}if(r.m){if(o[a]==="^"){p+=`(^|(?<=[\r
|
|
3
3
|
]))`;continue}else if(o[a]==="$"){p+=`($|(?=[\r
|
|
4
4
|
]))`;continue}}if(r.s&&o[a]==="."){p+=l?`${o[a]}\r
|
|
5
5
|
`:`[${o[a]}\r
|
|
6
6
|
]`;continue}if(p+=o[a],o[a]==="\\")u=!0;else if(l&&o[a]==="]")l=!1;else if(!l&&o[a]==="[")l=!0}try{new RegExp(p)}catch{return console.warn(`Could not convert regex pattern at ${n.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),t.source}return p}function P(t,n){if(n.target==="openAi")console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");if(n.target==="openApi3"&&t.keyType?._def.typeName===m.ZodEnum)return{type:"object",required:t.keyType._def.values,properties:t.keyType._def.values.reduce((o,p)=>({...o,[p]:i(t.valueType._def,{...n,currentPath:[...n.currentPath,"properties",p]})??D(n)}),{}),additionalProperties:n.rejectedAdditionalProperties};let r={type:"object",additionalProperties:i(t.valueType._def,{...n,currentPath:[...n.currentPath,"additionalProperties"]})??n.allowedAdditionalProperties};if(n.target==="openApi3")return r;if(t.keyType?._def.typeName===m.ZodString&&t.keyType._def.checks?.length){let{type:o,...p}=A(t.keyType._def,n);return{...r,propertyNames:p}}else if(t.keyType?._def.typeName===m.ZodEnum)return{...r,propertyNames:{enum:t.keyType._def.values}};else if(t.keyType?._def.typeName===m.ZodBranded&&t.keyType._def.type._def.typeName===m.ZodString&&t.keyType._def.type._def.checks?.length){let{type:o,...p}=N(t.keyType._def,n);return{...r,propertyNames:p}}return r}function W(t,n){if(n.mapStrategy==="record")return P(t,n);let r=i(t.keyType._def,{...n,currentPath:[...n.currentPath,"items","items","0"]})||D(n),o=i(t.valueType._def,{...n,currentPath:[...n.currentPath,"items","items","1"]})||D(n);return{type:"array",maxItems:125,items:{type:"array",items:[r,o],minItems:2,maxItems:2}}}function z(t){let n=t.values,o=Object.keys(t.values).filter((u)=>{return typeof n[n[u]]!=="number"}).map((u)=>n[u]),p=Array.from(new Set(o.map((u)=>typeof u)));return{type:p.length===1?p[0]==="string"?"string":"number":["string","number"],enum:o}}function F(t){return t.target==="openAi"?void 0:{not:D({...t,currentPath:[...t.currentPath,"not"]})}}function d(t){return t.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var _={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function j(t,n){if(n.target==="openApi3")return G(t,n);let r=t.options instanceof Map?Array.from(t.options.values()):t.options;if(r.every((o)=>(o._def.typeName in _)&&(!o._def.checks||!o._def.checks.length))){let o=r.reduce((p,u)=>{let l=_[u._def.typeName];return l&&!p.includes(l)?[...p,l]:p},[]);return{type:o.length>1?o:o[0]}}else if(r.every((o)=>o._def.typeName==="ZodLiteral"&&!o.description)){let o=r.reduce((p,u)=>{let l=typeof u._def.value;switch(l){case"string":case"number":case"boolean":return[...p,l];case"bigint":return[...p,"integer"];case"object":if(u._def.value===null)return[...p,"null"];case"symbol":case"undefined":case"function":default:return p}},[]);if(o.length===r.length){let p=o.filter((u,l,y)=>y.indexOf(u)===l);return{type:p.length>1?p:p[0],enum:r.reduce((u,l)=>{return u.includes(l._def.value)?u:[...u,l._def.value]},[])}}}else if(r.every((o)=>o._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((o,p)=>[...o,...p._def.values.filter((u)=>!o.includes(u))],[])};return G(t,n)}var G=(t,n)=>{let r=(t.options instanceof Map?Array.from(t.options.values()):t.options).map((o,p)=>i(o._def,{...n,currentPath:[...n.currentPath,"anyOf",`${p}`]})).filter((o)=>!!o&&(!n.strictUnions||typeof o==="object"&&Object.keys(o).length>0));return r.length?{anyOf:r}:void 0};function C(t,n){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(t.innerType._def.typeName)&&(!t.innerType._def.checks||!t.innerType._def.checks.length)){if(n.target==="openApi3")return{type:_[t.innerType._def.typeName],nullable:!0};return{type:[_[t.innerType._def.typeName],"null"]}}if(n.target==="openApi3"){let o=i(t.innerType._def,{...n,currentPath:[...n.currentPath]});if(o&&"$ref"in o)return{allOf:[o],nullable:!0};return o&&{...o,nullable:!0}}let r=i(t.innerType._def,{...n,currentPath:[...n.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function R(t,n){let r={type:"number"};if(!t.checks)return r;for(let o of t.checks)switch(o.kind){case"int":r.type="integer",S(r,"type",o.message,n);break;case"min":if(n.target==="jsonSchema7")if(o.inclusive)e(r,"minimum",o.value,o.message,n);else e(r,"exclusiveMinimum",o.value,o.message,n);else{if(!o.inclusive)r.exclusiveMinimum=!0;e(r,"minimum",o.value,o.message,n)}break;case"max":if(n.target==="jsonSchema7")if(o.inclusive)e(r,"maximum",o.value,o.message,n);else e(r,"exclusiveMaximum",o.value,o.message,n);else{if(!o.inclusive)r.exclusiveMaximum=!0;e(r,"maximum",o.value,o.message,n)}break;case"multipleOf":e(r,"multipleOf",o.value,o.message,n);break}return r}function k(t,n){let r=n.target==="openAi",o={type:"object",properties:{}},p=[],u=t.shape();for(let y in u){let a=u[y];if(a===void 0||a._def===void 0)continue;let x=yt(a);if(x&&r){if(a._def.typeName==="ZodOptional")a=a._def.innerType;if(!a.isNullable())a=a.nullable();x=!1}let T=i(a._def,{...n,currentPath:[...n.currentPath,"properties",y],propertyPath:[...n.currentPath,"properties",y]});if(T===void 0)continue;if(o.properties[y]=T,!x)p.push(y)}if(p.length)o.required=p;let l=lt(t,n);if(l!==void 0)o.additionalProperties=l;return o}function lt(t,n){if(t.catchall._def.typeName!=="ZodNever")return i(t.catchall._def,{...n,currentPath:[...n.currentPath,"additionalProperties"]});switch(t.unknownKeys){case"passthrough":return n.allowedAdditionalProperties;case"strict":return n.rejectedAdditionalProperties;case"strip":return n.removeAdditionalStrategy==="strict"?n.allowedAdditionalProperties:n.rejectedAdditionalProperties}}function yt(t){try{return t.isOptional()}catch{return!0}}var c=(t,n)=>{if(n.currentPath.toString()===n.propertyPath?.toString())return i(t.innerType._def,n);let r=i(t.innerType._def,{...n,currentPath:[...n.currentPath,"anyOf","1"]});return r?{anyOf:[{not:D(n)},r]}:D(n)};var h=(t,n)=>{if(n.pipeStrategy==="input")return i(t.in._def,n);else if(n.pipeStrategy==="output")return i(t.out._def,n);let r=i(t.in._def,{...n,currentPath:[...n.currentPath,"allOf","0"]}),o=i(t.out._def,{...n,currentPath:[...n.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,o].filter((p)=>p!==void 0)}};function f(t,n){return i(t.type._def,n)}function s(t,n){let o={type:"array",uniqueItems:!0,items:i(t.valueType._def,{...n,currentPath:[...n.currentPath,"items"]})};if(t.minSize)e(o,"minItems",t.minSize.value,t.minSize.message,n);if(t.maxSize)e(o,"maxItems",t.maxSize.value,t.maxSize.message,n);return o}function tt(t,n){if(t.rest)return{type:"array",minItems:t.items.length,items:t.items.map((r,o)=>i(r._def,{...n,currentPath:[...n.currentPath,"items",`${o}`]})).reduce((r,o)=>o===void 0?r:[...r,o],[]),additionalItems:i(t.rest._def,{...n,currentPath:[...n.currentPath,"additionalItems"]})};else return{type:"array",minItems:t.items.length,maxItems:t.items.length,items:t.items.map((r,o)=>i(r._def,{...n,currentPath:[...n.currentPath,"items",`${o}`]})).reduce((r,o)=>o===void 0?r:[...r,o],[])}}function nt(t){return{not:D(t)}}function rt(t){return D(t)}var ot=(t,n)=>{return i(t.innerType._def,n)};var pt=(t,n,r)=>{switch(n){case m.ZodString:return A(t,r);case m.ZodNumber:return R(t,r);case m.ZodObject:return k(t,r);case m.ZodBigInt:return K(t,r);case m.ZodBoolean:return $();case m.ZodDate:return O(t,r);case m.ZodUndefined:return nt(r);case m.ZodNull:return d(r);case m.ZodArray:return E(t,r);case m.ZodUnion:case m.ZodDiscriminatedUnion:return j(t,r);case m.ZodIntersection:return Y(t,r);case m.ZodTuple:return tt(t,r);case m.ZodRecord:return P(t,r);case m.ZodLiteral:return H(t,r);case m.ZodEnum:return X(t);case m.ZodNativeEnum:return z(t);case m.ZodNullable:return C(t,r);case m.ZodOptional:return c(t,r);case m.ZodMap:return W(t,r);case m.ZodSet:return s(t,r);case m.ZodLazy:return()=>t.getter()._def;case m.ZodPromise:return f(t,r);case m.ZodNaN:case m.ZodNever:return F(r);case m.ZodEffects:return Q(t,r);case m.ZodAny:return D(r);case m.ZodUnknown:return rt(r);case m.ZodDefault:return q(t,r);case m.ZodBranded:return N(t,r);case m.ZodReadonly:return ot(t,r);case m.ZodCatch:return J(t,r);case m.ZodPipeline:return h(t,r);case m.ZodFunction:case m.ZodVoid:case m.ZodSymbol:return;default:return((o)=>{return})(n)}};function i(t,n,r=!1){let o=n.seen.get(t);if(n.override){let y=n.override?.(t,n,o,r);if(y!==B)return y}if(o&&!r){let y=Dt(o,n);if(y!==void 0)return y}let p={def:t,path:n.currentPath,jsonSchema:void 0};n.seen.set(t,p);let u=pt(t,t.typeName,n),l=typeof u==="function"?i(u(),n):u;if(l)gt(t,n,l);if(n.postProcess){let y=n.postProcess(l,t,n);return p.jsonSchema=l,y}return p.jsonSchema=l,l}var Dt=(t,n)=>{switch(n.$refStrategy){case"root":return{$ref:t.path.join("/")};case"relative":return{$ref:b(n.currentPath,t.path)};case"none":case"seen":{if(t.path.length<n.currentPath.length&&t.path.every((r,o)=>n.currentPath[o]===r))return console.warn(`Recursive reference detected at ${n.currentPath.join("/")}! Defaulting to any`),D(n);return n.$refStrategy==="seen"?D(n):void 0}}},gt=(t,n,r)=>{if(t.description){if(r.description=t.description,n.markdownDescription)r.markdownDescription=t.description}return r};var it=(t,n)=>{let r=w(n),o=typeof n==="object"&&n.definitions?Object.entries(n.definitions).reduce((a,[x,T])=>({...a,[x]:i(T._def,{...r,currentPath:[...r.basePath,r.definitionPath,x]},!0)??D(r)}),{}):void 0,p=typeof n==="string"?n:n?.nameStrategy==="title"?void 0:n?.name,u=i(t._def,p===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,p]},!1)??D(r),l=typeof n==="object"&&n.name!==void 0&&n.nameStrategy==="title"?n.name:void 0;if(l!==void 0)u.title=l;if(r.flags.hasReferencedOpenAiAnyType){if(!o)o={};if(!o[r.openAiAnyTypeName])o[r.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:r.$refStrategy==="relative"?"1":[...r.basePath,r.definitionPath,r.openAiAnyTypeName].join("/")}}}let y=p===void 0?o?{...u,[r.definitionPath]:o}:u:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,p].join("/"),[r.definitionPath]:{...o,[p]:u}};if(r.target==="jsonSchema7")y.$schema="http://json-schema.org/draft-07/schema#";else if(r.target==="jsonSchema2019-09"||r.target==="openAi")y.$schema="https://json-schema.org/draft/2019-09/schema#";if(r.target==="openAi"&&(("anyOf"in y)||("oneOf"in y)||("allOf"in y)||("type"in y)&&Array.isArray(y.type)))console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property.");return y};var mo=it;
|
|
7
|
-
export{B as
|
|
7
|
+
export{B as Di,Zt as Ei,M as Fi,U as Gi,w as Hi,S as Ii,e as Ji,b as Ki,D as Li,E as Mi,K as Ni,$ as Oi,N as Pi,J as Qi,O as Ri,q as Si,Q as Ti,X as Ui,Y as Vi,H as Wi,Z as Xi,A as Yi,P as Zi,W as _i,z as $i,F as aj,d as bj,_ as cj,j as dj,C as ej,R as fj,k as gj,c as hj,h as ij,f as jj,s as kj,tt as lj,nt as mj,rt as nj,ot as oj,pt as pj,i as qj,it as rj,mo as sj};
|