@qitqode/qitqode-android-arm64 0.2.10 → 0.2.13
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-x308f9j4.js → chunk-00krzh3y.js} +2 -2
- package/bundle/{chunk-q0xgxygw.js → chunk-04x4b2yy.js} +1 -1
- package/bundle/{chunk-1q10jyka.js → chunk-08mgb5tt.js} +2 -2
- package/bundle/{chunk-yexzxx6f.js → chunk-094m66q5.js} +1 -1
- package/bundle/{chunk-c3ey896z.js → chunk-0cjp9088.js} +1 -1
- package/bundle/{chunk-7a3txs9f.js → chunk-0mdmqtfr.js} +2 -2
- package/bundle/chunk-0nves64y.js +2 -0
- package/bundle/chunk-0v7knkt5.js +2 -0
- package/bundle/{chunk-wbt31xap.js → chunk-0w77vhg4.js} +2 -2
- package/bundle/{chunk-dnjyepb2.js → chunk-0ware2sh.js} +2 -2
- package/bundle/{chunk-djfrkbd5.js → chunk-0xf12tf3.js} +1 -1
- package/bundle/{chunk-qbewhcsz.js → chunk-139qfnsq.js} +1 -1
- package/bundle/{chunk-xgf4k9q7.js → chunk-1851skhm.js} +1 -1
- package/bundle/{chunk-f17se3hh.js → chunk-1bbx1da7.js} +1 -1
- package/bundle/{chunk-vk35g121.js → chunk-1bhcg889.js} +2 -2
- package/bundle/{chunk-xnxw5zz9.js → chunk-1exjy880.js} +2 -2
- package/bundle/{chunk-atacnspd.js → chunk-1f9qcrn6.js} +2 -2
- package/bundle/{chunk-5fcyb122.js → chunk-1gt6ppza.js} +1 -1
- package/bundle/chunk-1h5jdsgx.js +2 -0
- package/bundle/{chunk-brk1jca3.js → chunk-1q5h95hc.js} +1 -1
- package/bundle/chunk-1r5e1jsb.js +2 -0
- package/bundle/{chunk-vy93mn7d.js → chunk-1rafe6f5.js} +2 -2
- package/bundle/{chunk-62y6zk9x.js → chunk-1rw4srd1.js} +1 -1
- package/bundle/{chunk-h2p984qb.js → chunk-1sejtx9a.js} +2 -2
- package/bundle/{chunk-3zzrdpsx.js → chunk-1wy8wmah.js} +1 -1
- package/bundle/chunk-1wyy3c48.js +2 -0
- package/bundle/chunk-1z299xq6.js +2 -0
- package/bundle/chunk-21aqt31s.js +2 -0
- package/bundle/chunk-22aq9ymg.js +2 -0
- package/bundle/chunk-26a17c9z.js +2 -0
- package/bundle/chunk-2a154mr0.js +2 -0
- package/bundle/{chunk-acsqvgdw.js → chunk-2b80n6nx.js} +1 -1
- package/bundle/{chunk-nnkfdhh9.js → chunk-2bfq0mtx.js} +1 -1
- package/bundle/{chunk-wecs14rz.js → chunk-2d0vympj.js} +1 -1
- package/bundle/{chunk-dz3kcsb6.js → chunk-2h8b0csf.js} +2 -2
- package/bundle/{chunk-xqwk2zsx.js → chunk-2md5fz4f.js} +2 -2
- package/bundle/chunk-2nbce486.js +2 -0
- package/bundle/chunk-2npxatq9.js +2 -0
- package/bundle/{chunk-gx4v8z64.js → chunk-2p1qaqv3.js} +2 -2
- package/bundle/{chunk-ge7csm6m.js → chunk-2ts2s8b4.js} +2 -2
- package/bundle/{chunk-d1xfv4d3.js → chunk-374js0y6.js} +1 -1
- package/bundle/{chunk-g52wmt1v.js → chunk-3be70hxy.js} +1 -1
- package/bundle/{chunk-c8yc8qcd.js → chunk-3fx3eghq.js} +1 -1
- package/bundle/chunk-3gryj9r9.js +2 -0
- package/bundle/chunk-3jnanbjr.js +2 -0
- package/bundle/chunk-3meh1cbc.js +2 -0
- package/bundle/{chunk-t2r51r6v.js → chunk-3rcfy8te.js} +1 -1
- package/bundle/chunk-3t71xfr6.js +2 -0
- package/bundle/chunk-4045jzv5.js +2 -0
- package/bundle/{chunk-qdh2dm62.js → chunk-404ew3d3.js} +1 -1
- package/bundle/{chunk-ecz4h0a2.js → chunk-45dtsre6.js} +1 -1
- package/bundle/{chunk-v03xq38e.js → chunk-47pxz6cb.js} +2 -2
- package/bundle/{chunk-v8bxj01h.js → chunk-4ar8hey8.js} +1 -1
- package/bundle/chunk-4b2vv484.js +2 -0
- package/bundle/{chunk-9tz18e54.js → chunk-4d9s7cgr.js} +1 -1
- package/bundle/chunk-4ene1ymj.js +2 -0
- package/bundle/{chunk-yydqavgh.js → chunk-4enhsmq1.js} +2 -2
- package/bundle/{chunk-dm447tgc.js → chunk-4krmja97.js} +2 -2
- package/bundle/{chunk-pwsajn96.js → chunk-4q14whpc.js} +1 -1
- package/bundle/{chunk-z023h7t8.js → chunk-4s9d2zte.js} +1 -1
- package/bundle/{chunk-9zy5tsry.js → chunk-4wzv2v36.js} +3 -3
- package/bundle/{chunk-4sa9t0vx.js → chunk-53n3tfwn.js} +2 -2
- package/bundle/{chunk-3sj0jv91.js → chunk-5828bcp8.js} +1 -1
- package/bundle/chunk-58r5etg8.js +2 -0
- package/bundle/{chunk-waa781eh.js → chunk-5a4zt1b7.js} +1 -1
- package/bundle/chunk-5c2zw4h0.js +2 -0
- package/bundle/chunk-5e0vejcb.js +8 -0
- package/bundle/{chunk-nq4x6792.js → chunk-5es19n1m.js} +2 -2
- package/bundle/{chunk-32xd626h.js → chunk-5fbzvy6q.js} +2 -2
- package/bundle/{chunk-e1x1mp9m.js → chunk-5gv6r7v8.js} +1 -1
- package/bundle/{chunk-v8rqgt7h.js → chunk-5psekq9f.js} +1 -1
- package/bundle/{chunk-te91d271.js → chunk-5rtsnnjk.js} +1 -1
- package/bundle/{chunk-p6jf1fyt.js → chunk-5wjwzbk8.js} +1 -1
- package/bundle/chunk-608f83n0.js +2 -0
- package/bundle/{chunk-asxmkyz2.js → chunk-610mqqqa.js} +1 -1
- package/bundle/chunk-671r50ry.js +2 -0
- package/bundle/chunk-6bfnhr3d.js +2 -0
- package/bundle/chunk-6cv6d8rw.js +2 -0
- package/bundle/{chunk-psqtptrs.js → chunk-6dmk2eyt.js} +1 -1
- package/bundle/{chunk-7s0nq2aa.js → chunk-6g3bzap8.js} +2 -2
- package/bundle/{chunk-ccdjzn2m.js → chunk-6jb4mnvq.js} +3 -3
- package/bundle/{chunk-m01h6kk1.js → chunk-6kpk6pr3.js} +1 -1
- package/bundle/{chunk-gbkz04ke.js → chunk-6p848y99.js} +1 -1
- package/bundle/chunk-6qm6f88j.js +2 -0
- package/bundle/{chunk-wh2qqhep.js → chunk-6wt8g6mc.js} +2 -2
- package/bundle/{chunk-mn0pshpv.js → chunk-71naz1qp.js} +1 -1
- package/bundle/{chunk-by1kwg4r.js → chunk-72qx43fq.js} +2 -2
- package/bundle/chunk-78bfwwmc.js +2 -0
- package/bundle/{chunk-0sfc21qe.js → chunk-78rfz0ex.js} +2 -2
- package/bundle/{chunk-1r81q7m3.js → chunk-7bvh48s2.js} +1 -1
- package/bundle/{chunk-mmqyter3.js → chunk-7h0regqs.js} +1 -1
- package/bundle/{chunk-d0dsgxk4.js → chunk-7k1q26yn.js} +2 -2
- package/bundle/{chunk-kec1xw1n.js → chunk-7nh8vjx4.js} +1 -1
- package/bundle/{chunk-5w7ebtcd.js → chunk-7p8f8xav.js} +1 -1
- package/bundle/chunk-7wwtgxxf.js +2 -0
- package/bundle/{chunk-gksbv613.js → chunk-81mwbcy3.js} +2 -2
- package/bundle/{chunk-fvv1cret.js → chunk-821zkh5v.js} +1 -1
- package/bundle/{chunk-pf2vq6t1.js → chunk-84712kbe.js} +2 -2
- package/bundle/{chunk-eabbrt1p.js → chunk-8hrt4d0v.js} +1 -1
- package/bundle/{chunk-gmq1kwn0.js → chunk-8psfgg8y.js} +1 -1
- package/bundle/{chunk-at4dge22.js → chunk-8rbbt1s8.js} +1 -1
- package/bundle/{chunk-cdenq7jb.js → chunk-8t17w67q.js} +1 -1
- package/bundle/{chunk-9fjcgdea.js → chunk-8xbd0ra5.js} +1 -1
- package/bundle/{chunk-nh4zk07t.js → chunk-95ga21eq.js} +1 -1
- package/bundle/{chunk-e10c0crf.js → chunk-962hspr0.js} +1 -1
- package/bundle/chunk-98sb49dz.js +2 -0
- package/bundle/{chunk-9d0exvey.js → chunk-9a9qcvtz.js} +2 -2
- package/bundle/{chunk-x0hhw46n.js → chunk-9c0f79mt.js} +1 -1
- package/bundle/{chunk-kcqeh1e5.js → chunk-9h2fms7x.js} +1 -1
- package/bundle/chunk-9kbtpq9m.js +2 -0
- package/bundle/{chunk-eqpep2m2.js → chunk-9r6wk75s.js} +1 -1
- package/bundle/chunk-9szp9b4m.js +2 -0
- package/bundle/{chunk-tg1f56s3.js → chunk-9xbc558j.js} +1 -1
- package/bundle/chunk-9xqszq0c.js +2 -0
- package/bundle/chunk-a32kjs9e.js +2 -0
- package/bundle/{chunk-c8080519.js → chunk-a4242cn4.js} +1 -1
- package/bundle/{chunk-c8k32724.js → chunk-ajyfms68.js} +1 -1
- package/bundle/{chunk-8peby2d1.js → chunk-ajykvcas.js} +1 -1
- package/bundle/{chunk-tm79yrf3.js → chunk-anm5g0m4.js} +2 -2
- package/bundle/chunk-apym02ct.js +2 -0
- package/bundle/{chunk-dx7rexx3.js → chunk-aq75kv5f.js} +3 -3
- package/bundle/chunk-armv2rv5.js +2 -0
- package/bundle/chunk-as215v64.js +2 -0
- package/bundle/{chunk-rk21wv4k.js → chunk-b274mb6v.js} +1 -1
- package/bundle/{chunk-zfqgh9h7.js → chunk-b46t2315.js} +1 -1
- package/bundle/{chunk-yzd6cyep.js → chunk-ba2hn77m.js} +1 -1
- package/bundle/{chunk-pyf649pz.js → chunk-bd4krah7.js} +1 -1
- package/bundle/chunk-bnmpgpyf.js +2 -0
- package/bundle/{chunk-5nm5egq0.js → chunk-bpv378bm.js} +2 -2
- package/bundle/chunk-bq3zt1x1.js +2 -0
- package/bundle/chunk-bx8fgjam.js +2 -0
- package/bundle/{chunk-fsndgr9a.js → chunk-bydaqb08.js} +1 -1
- package/bundle/{chunk-819qr675.js → chunk-c1srcpfk.js} +1 -1
- package/bundle/{chunk-9bbwxp5d.js → chunk-c99npyz9.js} +1 -1
- package/bundle/chunk-ckcnb59t.js +2 -0
- package/bundle/{chunk-qdbx1qkr.js → chunk-csbndz33.js} +1 -1
- package/bundle/{chunk-c1c8ch3g.js → chunk-cv3xdp8q.js} +8 -8
- package/bundle/{chunk-xvvt886p.js → chunk-d2049chz.js} +2 -2
- package/bundle/{chunk-je8fcsa9.js → chunk-d4ys15w3.js} +1 -1
- package/bundle/chunk-d79xaj6s.js +3 -0
- package/bundle/chunk-dah2d37s.js +2 -0
- package/bundle/chunk-dhgjv1n2.js +2 -0
- package/bundle/chunk-dk9k8ff5.js +2 -0
- package/bundle/{chunk-b9f78x5g.js → chunk-dmgdwvn1.js} +1 -1
- package/bundle/{chunk-azss4acq.js → chunk-dpm5x19e.js} +2 -2
- package/bundle/{chunk-rpdgn9z3.js → chunk-dwjv3m5s.js} +2 -2
- package/bundle/chunk-dymysn4h.js +2 -0
- package/bundle/{chunk-7rbg6mg9.js → chunk-dzy3ezht.js} +2 -2
- package/bundle/{chunk-8rkszwxq.js → chunk-e0w082wt.js} +4 -4
- package/bundle/{chunk-0mwzxqt5.js → chunk-e4658j15.js} +3 -3
- package/bundle/{chunk-pbanj1gk.js → chunk-e6s8ep9m.js} +2 -2
- package/bundle/{chunk-dp6ms01y.js → chunk-ec1bwa7f.js} +2 -2
- package/bundle/{chunk-ff8q10gk.js → chunk-eefzbdbk.js} +2 -2
- package/bundle/{chunk-j5z95b6f.js → chunk-eftk07r3.js} +1 -1
- package/bundle/{chunk-qjw2zcq5.js → chunk-eh73j82b.js} +1 -1
- package/bundle/{chunk-h91zmzs5.js → chunk-es6vbsjg.js} +1 -1
- package/bundle/{chunk-k10rtgsk.js → chunk-etvwxwn3.js} +1 -1
- package/bundle/chunk-ev4gw5k6.js +2 -0
- package/bundle/chunk-ew2dxm43.js +2 -0
- package/bundle/{chunk-nk5vrenn.js → chunk-ewde5bss.js} +2 -2
- package/bundle/{chunk-8gpjmj42.js → chunk-fbd971t7.js} +3 -3
- package/bundle/{chunk-gbnf7zf9.js → chunk-ff031crt.js} +1 -1
- package/bundle/chunk-ffp4wg27.js +2 -0
- package/bundle/{chunk-6y58jzak.js → chunk-fj87htwn.js} +1 -1
- package/bundle/{chunk-rxnd79h7.js → chunk-fmvmp278.js} +1 -1
- package/bundle/{chunk-6mnk5sg3.js → chunk-fqzfytjk.js} +1 -1
- package/bundle/{chunk-c2ns2csn.js → chunk-g0x6q2ks.js} +1 -1
- package/bundle/{chunk-mp1x10t5.js → chunk-g3y5kvg6.js} +2 -2
- package/bundle/{chunk-3vae1s42.js → chunk-g6ffx794.js} +1 -1
- package/bundle/{chunk-d1fv2c7s.js → chunk-gcpwm7b5.js} +2 -2
- package/bundle/{chunk-pxm0x3e0.js → chunk-gdawpkxs.js} +2 -2
- package/bundle/{chunk-jbcqhw3x.js → chunk-gjmxrz0v.js} +2 -2
- package/bundle/{chunk-vbb1jg02.js → chunk-gtmtvjwc.js} +1 -1
- package/bundle/{chunk-7hdb1fhq.js → chunk-gvc1mqrs.js} +2 -2
- package/bundle/{chunk-56yp5v0w.js → chunk-gw2fz5ry.js} +1 -1
- package/bundle/{chunk-g08qj9z3.js → chunk-h1p3xcfp.js} +2 -2
- package/bundle/{chunk-c9cngded.js → chunk-h2vtypa5.js} +1 -1
- package/bundle/{chunk-m4j6t713.js → chunk-h9tcpbr7.js} +1 -1
- package/bundle/{chunk-2fbkw84y.js → chunk-hcd0k14e.js} +2 -2
- package/bundle/{chunk-s05hqtx1.js → chunk-hd6sd912.js} +1 -1
- package/bundle/{chunk-6wjdhvdf.js → chunk-hgcnzsd5.js} +1 -1
- package/bundle/chunk-hjy90gt2.js +2 -0
- package/bundle/{chunk-2zjet9tx.js → chunk-hk8m8vax.js} +2 -2
- package/bundle/chunk-hmden934.js +2 -0
- package/bundle/{chunk-0tkznq75.js → chunk-hnbtfpb7.js} +1 -1
- package/bundle/{chunk-ngyv4fhn.js → chunk-hp9q7vvq.js} +2 -2
- package/bundle/{chunk-kc8n5cgb.js → chunk-hrfdrz36.js} +1 -1
- package/bundle/chunk-hsm8fbb1.js +2 -0
- package/bundle/{chunk-yce8ph5b.js → chunk-hsmtjb4d.js} +2 -2
- package/bundle/chunk-hz1xfedb.js +2 -0
- package/bundle/{chunk-qq9yc2tp.js → chunk-hzzvmr41.js} +2 -2
- package/bundle/chunk-ja9y478k.js +2 -0
- package/bundle/chunk-jam7xyjf.js +2 -0
- package/bundle/{chunk-4a9jqe5s.js → chunk-jcn8bg31.js} +1 -1
- package/bundle/{chunk-2dmcpqak.js → chunk-jf4zyy7r.js} +1 -1
- package/bundle/{chunk-yspstxkq.js → chunk-jmrqp50k.js} +1 -1
- package/bundle/{chunk-qm9fm5ja.js → chunk-jrh028na.js} +2 -2
- package/bundle/{chunk-r81w6skn.js → chunk-jt94rhev.js} +1 -1
- package/bundle/{chunk-cs825mxr.js → chunk-k3x6z5q1.js} +1 -1
- package/bundle/chunk-k51qphrk.js +2 -0
- package/bundle/chunk-kee7xpe3.js +2 -0
- package/bundle/{chunk-61t4g8bh.js → chunk-m18pxkdg.js} +4 -4
- package/bundle/{chunk-npdgfqaw.js → chunk-map852em.js} +1 -1
- package/bundle/{chunk-wd2xmkdp.js → chunk-mbma071k.js} +2 -2
- package/bundle/{chunk-qyan69nb.js → chunk-mchf2bcc.js} +2 -2
- package/bundle/{chunk-x50adh71.js → chunk-mfg4stzn.js} +1 -1
- package/bundle/{chunk-snf6ahg7.js → chunk-mgff8bcx.js} +1 -1
- package/bundle/{chunk-81dvy370.js → chunk-mhn0a828.js} +1 -1
- package/bundle/{chunk-yh1t6jrj.js → chunk-mp5m0acf.js} +1 -1
- package/bundle/{chunk-1m78yy4k.js → chunk-mqtj38j9.js} +1 -1
- package/bundle/{chunk-cxtwavyf.js → chunk-mrh5q4s6.js} +2 -2
- package/bundle/{chunk-xcmbxny8.js → chunk-msbe5rb7.js} +1 -1
- package/bundle/{chunk-b8rzn48q.js → chunk-n73ckwr7.js} +1 -1
- package/bundle/{chunk-gqgjybjc.js → chunk-nn2hbew8.js} +1 -1
- package/bundle/{chunk-9nf5650d.js → chunk-npryn3en.js} +1 -1
- package/bundle/chunk-p13eeqe4.js +2 -0
- package/bundle/{chunk-a70m6kyn.js → chunk-p3tcw42f.js} +1 -1
- package/bundle/chunk-p45f2nyb.js +2 -0
- package/bundle/{chunk-q26s0wb5.js → chunk-p863r97y.js} +1 -1
- package/bundle/{chunk-tjfer79w.js → chunk-paqy0c2v.js} +1 -1
- package/bundle/{chunk-vsfj16v9.js → chunk-pfen4ekj.js} +2 -2
- package/bundle/{chunk-5p2r8bxx.js → chunk-pzn7cade.js} +1 -1
- package/bundle/{chunk-jt6bvxtr.js → chunk-q65qzc9w.js} +1 -1
- package/bundle/{chunk-h0pvxre5.js → chunk-q7wc3frq.js} +1 -1
- package/bundle/{chunk-141p12c4.js → chunk-qa38xchd.js} +1 -1
- package/bundle/{chunk-f0ab2f28.js → chunk-qqftaqza.js} +1 -1
- package/bundle/{chunk-d9w2bn2e.js → chunk-qvwx32p9.js} +2 -2
- package/bundle/chunk-qw9whsy2.js +2 -0
- package/bundle/{chunk-8nnajdwf.js → chunk-r65zw08x.js} +3 -3
- package/bundle/chunk-r77kpzdv.js +2 -0
- package/bundle/{chunk-e3mrw0k7.js → chunk-r9hsd9pw.js} +1 -1
- package/bundle/chunk-rc95tp19.js +2 -0
- package/bundle/{chunk-xv03hbgj.js → chunk-rf9pjbg3.js} +1 -1
- package/bundle/chunk-rmh2fhqy.js +2 -0
- package/bundle/{chunk-t9pq363q.js → chunk-rqdfmbns.js} +2 -2
- package/bundle/{chunk-ev6jwt7q.js → chunk-rr94dpe9.js} +1 -1
- package/bundle/chunk-rrn86a8w.js +2 -0
- package/bundle/{chunk-kk850sdw.js → chunk-rwt0rwvn.js} +2 -2
- package/bundle/{chunk-f6btedtt.js → chunk-s7ypkpg2.js} +1 -1
- package/bundle/{chunk-hgm8yfcb.js → chunk-s81ck6bw.js} +1 -1
- package/bundle/chunk-s8v0h63x.js +2 -0
- package/bundle/chunk-sh4mngre.js +2 -0
- package/bundle/chunk-shqqngm8.js +2 -0
- package/bundle/chunk-sjfcwykr.js +2 -0
- package/bundle/{chunk-q7s6z0nz.js → chunk-sn15skh8.js} +1 -1
- package/bundle/chunk-sv01v0n0.js +2 -0
- package/bundle/{chunk-dzma8zvf.js → chunk-sv27ep93.js} +2 -2
- package/bundle/{chunk-q8fjktv4.js → chunk-t1e52h0k.js} +1 -1
- package/bundle/{chunk-zskdxbbh.js → chunk-t1hw67x4.js} +1 -1
- package/bundle/{chunk-9pj10pgd.js → chunk-t4kma6mq.js} +2 -2
- package/bundle/{chunk-8v60bqm0.js → chunk-t66gerft.js} +1 -1
- package/bundle/{chunk-z69tt390.js → chunk-t7gp6mjm.js} +1 -1
- package/bundle/{chunk-dd461rg3.js → chunk-tks3qzsw.js} +1 -1
- package/bundle/{chunk-1h96bk6p.js → chunk-tn0sfsks.js} +2 -2
- package/bundle/chunk-tn8hsd2c.js +2 -0
- package/bundle/chunk-tqsx7w8z.js +2 -0
- package/bundle/{chunk-tdevq564.js → chunk-trg0zg0q.js} +1 -1
- package/bundle/chunk-tyt1negg.js +2 -0
- package/bundle/chunk-tz1sv9kt.js +3 -0
- package/bundle/{chunk-p506eydh.js → chunk-tzw56029.js} +1 -1
- package/bundle/{chunk-t5wdstzv.js → chunk-v30fmrz0.js} +1 -1
- package/bundle/chunk-v580zwpf.js +3 -0
- package/bundle/{chunk-6gbdvz6p.js → chunk-v6djkm35.js} +1 -1
- package/bundle/{chunk-h6z86aay.js → chunk-v9yxkbz7.js} +1 -1
- package/bundle/chunk-vdv6cyh0.js +2 -0
- package/bundle/{chunk-z0m1qm7j.js → chunk-vqxyk6as.js} +2 -2
- package/bundle/{chunk-se8d5xg9.js → chunk-vr7525pa.js} +1 -1
- package/bundle/chunk-vsk8yfxp.js +2 -0
- package/bundle/{chunk-vjt6mh10.js → chunk-vvcyvdnk.js} +2 -2
- package/bundle/chunk-vvgmkjym.js +2 -0
- package/bundle/{chunk-0bhzhh7s.js → chunk-vvmvryh1.js} +2 -2
- package/bundle/{chunk-eme9xmh3.js → chunk-vzf04vad.js} +1 -1
- package/bundle/{chunk-xstxdw7v.js → chunk-vzj91hg8.js} +1 -1
- package/bundle/chunk-w0zyex7f.js +2 -0
- package/bundle/{chunk-e72jwbfc.js → chunk-w264gs2c.js} +1 -1
- package/bundle/chunk-w623r5kb.js +3 -0
- package/bundle/{chunk-5rqjze1g.js → chunk-wac35a6p.js} +1 -1
- package/bundle/chunk-wkxt9v7s.js +2 -0
- package/bundle/{chunk-gb51fn3r.js → chunk-wqm1vawg.js} +1 -1
- package/bundle/{chunk-pchv413c.js → chunk-wrkt670m.js} +2 -2
- package/bundle/{chunk-2y5bthrp.js → chunk-wspm2k19.js} +1 -1
- package/bundle/chunk-wwf6zacw.js +2 -0
- package/bundle/{chunk-nqk8d62j.js → chunk-wwtyrgga.js} +1 -1
- package/bundle/{chunk-ajnzv5jt.js → chunk-x0wy15q9.js} +2 -2
- package/bundle/chunk-x9c8eddk.js +2 -0
- package/bundle/{chunk-ztvkzex1.js → chunk-xaewye8w.js} +1 -1
- package/bundle/{chunk-gq3zb4wv.js → chunk-xgdst5n5.js} +2 -2
- package/bundle/{chunk-3yfjgks3.js → chunk-xgphhnpk.js} +1 -1
- package/bundle/chunk-xjed8t2h.js +2 -0
- package/bundle/{chunk-qtyapmy7.js → chunk-xn6mwsc9.js} +1 -1
- package/bundle/{chunk-v0hnn7nb.js → chunk-xpz5mnwz.js} +1 -1
- package/bundle/{chunk-6axm2qtj.js → chunk-xrb46v1e.js} +1 -1
- package/bundle/chunk-xxhta1tm.js +2 -0
- package/bundle/{chunk-532fnfmw.js → chunk-y5m9c5ek.js} +2 -2
- package/bundle/{chunk-9s5h0f1y.js → chunk-y9kjt2jj.js} +2 -2
- package/bundle/{chunk-vbfc0wgv.js → chunk-y9mxwwz7.js} +2 -2
- package/bundle/{chunk-td9hm9be.js → chunk-ycth54ja.js} +1 -1
- package/bundle/{chunk-pky8h8rh.js → chunk-ydz7387e.js} +1 -1
- package/bundle/{chunk-f3y5kr76.js → chunk-yg5azmxb.js} +2 -2
- package/bundle/{chunk-j7637cwg.js → chunk-yhe5qz48.js} +2 -2
- package/bundle/chunk-yhj6858v.js +2 -0
- package/bundle/chunk-yq3byrpv.js +2 -0
- package/bundle/{chunk-3mtjxmw1.js → chunk-yqvqzg7b.js} +1 -1
- package/bundle/chunk-ys8ajwys.js +2 -0
- package/bundle/chunk-yzt7p956.js +2 -0
- package/bundle/{chunk-2cvwrabw.js → chunk-yzxcjr6y.js} +2 -2
- package/bundle/{chunk-f6vy70p6.js → chunk-z1psybn1.js} +2 -2
- package/bundle/{chunk-xj0zc9za.js → chunk-z2cnd2cp.js} +1 -1
- package/bundle/{chunk-s27cz24e.js → chunk-z4gczap3.js} +52 -52
- package/bundle/chunk-z56cb3fs.js +2 -0
- package/bundle/{chunk-qdafm7qg.js → chunk-z66xdxkg.js} +2 -2
- package/bundle/{chunk-v16n1fep.js → chunk-z6f54x4k.js} +2 -2
- package/bundle/{chunk-kds2g7r2.js → chunk-z6qb4gt5.js} +1 -1
- package/bundle/{chunk-q4mtwv1w.js → chunk-zgj7jx8k.js} +2 -2
- package/bundle/{chunk-mn5cacf6.js → chunk-zhddj91f.js} +2 -2
- package/bundle/chunk-zhypknyg.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 +3 -3
- package/bundle/chunk-062chtrq.js +0 -2
- package/bundle/chunk-062vs7bp.js +0 -2
- package/bundle/chunk-08g14hmz.js +0 -2
- package/bundle/chunk-0w2v8dfy.js +0 -2
- package/bundle/chunk-10fr7a2y.js +0 -2
- package/bundle/chunk-15bjhfav.js +0 -3
- package/bundle/chunk-1hv61m11.js +0 -2
- package/bundle/chunk-2mkvx8b2.js +0 -2
- package/bundle/chunk-2rykfc3a.js +0 -2
- package/bundle/chunk-2w5hx4fs.js +0 -2
- package/bundle/chunk-2yy63sxz.js +0 -2
- package/bundle/chunk-2z3fe4qw.js +0 -2
- package/bundle/chunk-361cmmrp.js +0 -2
- package/bundle/chunk-3r6dq1h3.js +0 -2
- package/bundle/chunk-4a12wv2m.js +0 -2
- package/bundle/chunk-547a55ba.js +0 -2
- package/bundle/chunk-5ztmc770.js +0 -2
- package/bundle/chunk-62x3r2q8.js +0 -2
- package/bundle/chunk-6th7vpwm.js +0 -2
- package/bundle/chunk-6ybh5smv.js +0 -2
- package/bundle/chunk-73kprndw.js +0 -2
- package/bundle/chunk-79fr19xf.js +0 -2
- package/bundle/chunk-7ezr478e.js +0 -2
- package/bundle/chunk-7gj1vqyj.js +0 -2
- package/bundle/chunk-7ywfkwb4.js +0 -2
- package/bundle/chunk-85fnnwm2.js +0 -2
- package/bundle/chunk-89fwh84w.js +0 -2
- package/bundle/chunk-8e724g3k.js +0 -2
- package/bundle/chunk-9894a2yn.js +0 -2
- package/bundle/chunk-98ye2nwt.js +0 -2
- package/bundle/chunk-9s4excg8.js +0 -2
- package/bundle/chunk-aetgcegz.js +0 -2
- package/bundle/chunk-agas0nay.js +0 -2
- package/bundle/chunk-ayknzc4m.js +0 -2
- package/bundle/chunk-b2ybst88.js +0 -2
- package/bundle/chunk-bd5vtjd7.js +0 -2
- package/bundle/chunk-bjqqk6jt.js +0 -2
- package/bundle/chunk-cpkcdykz.js +0 -2
- package/bundle/chunk-cyafm8d6.js +0 -2
- package/bundle/chunk-d4316r53.js +0 -2
- package/bundle/chunk-d8ym7mcg.js +0 -2
- package/bundle/chunk-dnpjxjkp.js +0 -2
- package/bundle/chunk-e5gjqtby.js +0 -2
- package/bundle/chunk-ee3mqzms.js +0 -2
- package/bundle/chunk-er5f61s5.js +0 -2
- package/bundle/chunk-er716522.js +0 -2
- package/bundle/chunk-ez3gacqe.js +0 -2
- package/bundle/chunk-fkc7wf1p.js +0 -2
- package/bundle/chunk-fm6z8nqb.js +0 -2
- package/bundle/chunk-g0qwm23d.js +0 -2
- package/bundle/chunk-g4yn8cj8.js +0 -2
- package/bundle/chunk-gsez13bg.js +0 -3
- package/bundle/chunk-h1spsy3y.js +0 -2
- package/bundle/chunk-h8gkv40j.js +0 -2
- package/bundle/chunk-j59kmb49.js +0 -2
- package/bundle/chunk-jv37ghev.js +0 -2
- package/bundle/chunk-k3hcb6qf.js +0 -2
- package/bundle/chunk-k5d822n2.js +0 -3
- package/bundle/chunk-m8ytbq04.js +0 -2
- package/bundle/chunk-mf9nc4xz.js +0 -2
- package/bundle/chunk-mxby91bj.js +0 -2
- package/bundle/chunk-mzv1gh6f.js +0 -2
- package/bundle/chunk-n0hsvvw8.js +0 -2
- package/bundle/chunk-nm1v9z14.js +0 -2
- package/bundle/chunk-p7nstcxa.js +0 -2
- package/bundle/chunk-pfwkvv7g.js +0 -2
- package/bundle/chunk-pn1jz8qj.js +0 -2
- package/bundle/chunk-pqvmtfk7.js +0 -2
- package/bundle/chunk-prgw26g3.js +0 -2
- package/bundle/chunk-pv9ty6v7.js +0 -2
- package/bundle/chunk-q4rstre7.js +0 -2
- package/bundle/chunk-q6jk2v6g.js +0 -2
- package/bundle/chunk-qd43npx3.js +0 -2
- package/bundle/chunk-qdb21y83.js +0 -2
- package/bundle/chunk-qeksaefy.js +0 -2
- package/bundle/chunk-r7t9yb9d.js +0 -2
- package/bundle/chunk-sdv3a4w3.js +0 -2
- package/bundle/chunk-sk89becn.js +0 -2
- package/bundle/chunk-tc0996xz.js +0 -2
- package/bundle/chunk-tfs50mgj.js +0 -2
- package/bundle/chunk-thecq33z.js +0 -3
- package/bundle/chunk-tjvtp9d9.js +0 -2
- package/bundle/chunk-tkm9m3n0.js +0 -2
- package/bundle/chunk-v1s1rcqx.js +0 -2
- package/bundle/chunk-v4dt4062.js +0 -2
- package/bundle/chunk-wgrq86kd.js +0 -2
- package/bundle/chunk-x8ks2bn7.js +0 -2
- package/bundle/chunk-xy2ty5h5.js +0 -8
- package/bundle/chunk-z0383stv.js +0 -2
- package/bundle/chunk-zewrmk8x.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{xh as a,yh as b}from"./chunk-cv3xdp8q.js";import"./chunk-x0wy15q9.js";import"./chunk-2h8b0csf.js";import"./chunk-4q14whpc.js";import"./chunk-s81ck6bw.js";import"./chunk-dzy3ezht.js";import"./chunk-g3y5kvg6.js";import"./chunk-z4gczap3.js";import"./chunk-2p1qaqv3.js";import"./chunk-47pxz6cb.js";import"./chunk-aq75kv5f.js";import"./chunk-1851skhm.js";import"./chunk-0ware2sh.js";import"./chunk-fbd971t7.js";import"./chunk-1f9qcrn6.js";import"./chunk-z66xdxkg.js";import"./chunk-jt94rhev.js";import"./chunk-2ts2s8b4.js";import"./chunk-7k1q26yn.js";import"./chunk-08mgb5tt.js";import"./chunk-6wt8g6mc.js";import"./chunk-1rafe6f5.js";import"./chunk-hsmtjb4d.js";import"./chunk-7nh8vjx4.js";import"./chunk-cqtkxwd8.js";import"./chunk-mfg4stzn.js";import"./chunk-hp9q7vvq.js";import"./chunk-5es19n1m.js";import"./chunk-1bbx1da7.js";import"./chunk-wspm2k19.js";import"./chunk-gvc1mqrs.js";import"./chunk-1exjy880.js";import"./chunk-xgdst5n5.js";import"./chunk-yzxcjr6y.js";import"./chunk-53n3tfwn.js";import"./chunk-3be70hxy.js";import"./chunk-9a9qcvtz.js";import"./chunk-1sejtx9a.js";import"./chunk-jrh028na.js";import"./chunk-vqxyk6as.js";import"./chunk-mbma071k.js";import"./chunk-ajykvcas.js";import"./chunk-dpm5x19e.js";import"./chunk-vvmvryh1.js";import"./chunk-6g3bzap8.js";import"./chunk-mrh5q4s6.js";import"./chunk-w623r5kb.js";import"./chunk-zgj7jx8k.js";import"./chunk-0mdmqtfr.js";import"./chunk-00krzh3y.js";import"./chunk-hk8m8vax.js";import"./chunk-zhddj91f.js";import"./chunk-t4kma6mq.js";import"./chunk-0xf12tf3.js";export{b as AppRuntime,a as AppLayer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{sr as M}from"./chunk-xnxw5zz9.js";import{pP as B}from"./chunk-9pj10pgd.js";import{qP as b,rP as X,uP as V}from"./chunk-djfrkbd5.js";var a=X((l)=>{Object.defineProperty(l,"__esModule",{value:!0});l.OTLPExporterBase=void 0;class p{_delegate;constructor(Z){this._delegate=Z}export(Z,$){this._delegate.export(Z,$)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}}l.OTLPExporterBase=p});var R=X((t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.OTLPExporterError=void 0;class n extends Error{code;name="OTLPExporterError";data;constructor(Z,$,Y){super(Z);this.data=Y,this.code=$}}t.OTLPExporterError=n});var H=X((r)=>{Object.defineProperty(r,"__esModule",{value:!0});r.getSharedConfigurationDefaults=r.mergeOtlpSharedConfigurationWithDefaults=r.wrapStaticHeadersInFunction=r.validateTimeoutMillis=void 0;function o(Z){if(Number.isFinite(Z)&&Z>0)return Z;throw Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${Z}')`)}r.validateTimeoutMillis=o;function I0(Z){if(Z==null)return;return async()=>Z}r.wrapStaticHeadersInFunction=I0;function P0(Z,$,Y){return{timeoutMillis:o(Z.timeoutMillis??$.timeoutMillis??Y.timeoutMillis),concurrencyLimit:Z.concurrencyLimit??$.concurrencyLimit??Y.concurrencyLimit,compression:Z.compression??$.compression??Y.compression}}r.mergeOtlpSharedConfigurationWithDefaults=P0;function S0(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}r.getSharedConfigurationDefaults=S0});var $Z=X((ZZ)=>{Object.defineProperty(ZZ,"__esModule",{value:!0});ZZ.CompressionAlgorithm=void 0;var T0;(function(Z){Z.NONE="none",Z.GZIP="gzip"})(T0=ZZ.CompressionAlgorithm||(ZZ.CompressionAlgorithm={}))});var _=X((GZ)=>{Object.defineProperty(GZ,"__esModule",{value:!0});GZ.createBoundedQueueExportPromiseHandler=void 0;class YZ{_concurrencyLimit;_sendingPromises=[];constructor(Z){this._concurrencyLimit=Z}pushPromise(Z){if(this.hasReachedLimit())throw Error("Concurrency Limit reached");this._sendingPromises.push(Z);let $=()=>{let Y=this._sendingPromises.indexOf(Z);this._sendingPromises.splice(Y,1)};Z.then($,$)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}}function k0(Z){return new YZ(Z.concurrencyLimit)}GZ.createBoundedQueueExportPromiseHandler=k0});var XZ=X((WZ)=>{Object.defineProperty(WZ,"__esModule",{value:!0});WZ.createLoggingPartialSuccessResponseHandler=void 0;var E0=B();function y0(Z){return Object.prototype.hasOwnProperty.call(Z,"partialSuccess")}function x0(){return{handleResponse(Z){if(Z==null||!y0(Z)||Z.partialSuccess==null||Object.keys(Z.partialSuccess).length===0)return;E0.diag.warn("Received Partial Success response:",JSON.stringify(Z.partialSuccess))}}}WZ.createLoggingPartialSuccessResponseHandler=x0});var v=X((zZ)=>{Object.defineProperty(zZ,"__esModule",{value:!0});zZ.createOtlpExportDelegate=void 0;var q=M(),KZ=R(),h0=XZ(),C0=B();class wZ{_diagLogger;_transport;_serializer;_responseHandler;_promiseQueue;_timeout;constructor(Z,$,Y,G,Q){this._transport=Z,this._serializer=$,this._responseHandler=Y,this._promiseQueue=G,this._timeout=Q,this._diagLogger=C0.diag.createComponentLogger({namespace:"OTLPExportDelegate"})}export(Z,$){if(this._diagLogger.debug("items to be sent",Z),this._promiseQueue.hasReachedLimit()){$({code:q.ExportResultCode.FAILED,error:Error("Concurrent export limit reached")});return}let Y=this._serializer.serializeRequest(Z);if(Y==null){$({code:q.ExportResultCode.FAILED,error:Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(Y,this._timeout).then((G)=>{if(G.status==="success"){if(G.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(G.data))}catch(Q){this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",Q,G.data)}$({code:q.ExportResultCode.SUCCESS});return}else if(G.status==="failure"&&G.error){$({code:q.ExportResultCode.FAILED,error:G.error});return}else if(G.status==="retryable")$({code:q.ExportResultCode.FAILED,error:G.error??new KZ.OTLPExporterError("Export failed with retryable status")});else $({code:q.ExportResultCode.FAILED,error:new KZ.OTLPExporterError("Export failed with unknown error")})},(G)=>$({code:q.ExportResultCode.FAILED,error:G})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug("shutdown started"),await this.forceFlush(),this._transport.shutdown()}}function _0(Z,$){return new wZ(Z.transport,Z.serializer,(0,h0.createLoggingPartialSuccessResponseHandler)(),Z.promiseHandler,$.timeout)}zZ.createOtlpExportDelegate=_0});var NZ=X((FZ)=>{Object.defineProperty(FZ,"__esModule",{value:!0});FZ.createOtlpNetworkExportDelegate=void 0;var v0=_(),m0=v();function f0(Z,$,Y){return(0,m0.createOtlpExportDelegate)({transport:Y,serializer:$,promiseHandler:(0,v0.createBoundedQueueExportPromiseHandler)(Z)},{timeout:Z.timeoutMillis})}FZ.createOtlpNetworkExportDelegate=f0});var jZ=X((N)=>{Object.defineProperty(N,"__esModule",{value:!0});N.createOtlpNetworkExportDelegate=N.CompressionAlgorithm=N.getSharedConfigurationDefaults=N.mergeOtlpSharedConfigurationWithDefaults=N.OTLPExporterError=N.OTLPExporterBase=void 0;var g0=a();Object.defineProperty(N,"OTLPExporterBase",{enumerable:!0,get:function(){return g0.OTLPExporterBase}});var d0=R();Object.defineProperty(N,"OTLPExporterError",{enumerable:!0,get:function(){return d0.OTLPExporterError}});var VZ=H();Object.defineProperty(N,"mergeOtlpSharedConfigurationWithDefaults",{enumerable:!0,get:function(){return VZ.mergeOtlpSharedConfigurationWithDefaults}});Object.defineProperty(N,"getSharedConfigurationDefaults",{enumerable:!0,get:function(){return VZ.getSharedConfigurationDefaults}});var c0=$Z();Object.defineProperty(N,"CompressionAlgorithm",{enumerable:!0,get:function(){return c0.CompressionAlgorithm}});var u0=NZ();Object.defineProperty(N,"createOtlpNetworkExportDelegate",{enumerable:!0,get:function(){return u0.createOtlpNetworkExportDelegate}})});var MZ=X((SZ)=>{Object.defineProperty(SZ,"__esModule",{value:!0});SZ.validateAndNormalizeHeaders=void 0;var Y3=B();function G3(Z){let $={};return Object.entries(Z??{}).forEach(([Y,G])=>{if(typeof G<"u")$[Y]=String(G);else Y3.diag.warn(`Header "${Y}" has invalid value (${G}) and will be ignored`)}),$}SZ.validateAndNormalizeHeaders=G3});var EZ=X((TZ)=>{Object.defineProperty(TZ,"__esModule",{value:!0});TZ.getHttpConfigurationDefaults=TZ.mergeOtlpHttpConfigurationWithDefaults=void 0;var bZ=H(),Q3=MZ();function W3(Z,$,Y){return async()=>{let G={...await Y()},Q={};if($!=null)Object.assign(Q,await $());if(Z!=null)Object.assign(Q,(0,Q3.validateAndNormalizeHeaders)(await Z()));return Object.assign(Q,G)}}function J3(Z){if(Z==null)return;try{let $=globalThis.location?.href;return new URL(Z,$).href}catch{throw Error(`Configuration: Could not parse user-provided export URL: '${Z}'`)}}function X3(Z,$,Y){return{...(0,bZ.mergeOtlpSharedConfigurationWithDefaults)(Z,$,Y),headers:W3(Z.headers,$.headers,Y.headers),url:J3(Z.url)??$.url??Y.url}}TZ.mergeOtlpHttpConfigurationWithDefaults=X3;function K3(Z,$){return{...(0,bZ.getSharedConfigurationDefaults)(),headers:async()=>Z,url:"http://localhost:4318/"+$}}TZ.getHttpConfigurationDefaults=K3});var k=X((hZ)=>{Object.defineProperty(hZ,"__esModule",{value:!0});hZ.getNodeHttpConfigurationDefaults=hZ.mergeOtlpNodeHttpConfigurationWithDefaults=hZ.httpAgentFactoryFromOptions=void 0;var yZ=EZ();function xZ(Z){return async($)=>{let Y=$==="http:",G=Y?import("http"):import("https"),{Agent:Q}=await G;if(Y){let{ca:W,cert:U,key:z,...K}=Z;return new Q(K)}return new Q(Z)}}hZ.httpAgentFactoryFromOptions=xZ;function z3(Z,$,Y){return{...(0,yZ.mergeOtlpHttpConfigurationWithDefaults)(Z,$,Y),agentFactory:Z.agentFactory??$.agentFactory??Y.agentFactory,userAgent:Z.userAgent}}hZ.mergeOtlpNodeHttpConfigurationWithDefaults=z3;function D3(Z,$){return{...(0,yZ.getHttpConfigurationDefaults)(Z,$),agentFactory:xZ({keepAlive:!0})}}hZ.getNodeHttpConfigurationDefaults=D3});var mZ=X((_Z)=>{Object.defineProperty(_Z,"__esModule",{value:!0});_Z.parseRetryAfterToMills=_Z.isExportHTTPErrorRetryable=void 0;function N3(Z){return Z===429||Z===502||Z===503||Z===504}_Z.isExportHTTPErrorRetryable=N3;function V3(Z){if(Z==null)return;let $=Number.parseInt(Z,10);if(Number.isInteger($))return $>0?$*1000:-1;let Y=new Date(Z).getTime()-Date.now();if(Y>=0)return Y;return 0}_Z.parseRetryAfterToMills=V3});var dZ=X((fZ)=>{Object.defineProperty(fZ,"__esModule",{value:!0});fZ.VERSION=void 0;fZ.VERSION="0.220.0"});var iZ=X((pZ)=>{Object.defineProperty(pZ,"__esModule",{value:!0});pZ.compressAndSend=pZ.sendWithHttp=pZ.MAX_RESPONSE_BODY_SIZE=void 0;var q3=V("zlib"),U3=V("stream"),E=mZ(),O3=R(),L3=dZ(),cZ=`OTel-OTLP-Exporter-JavaScript/${L3.VERSION}`;pZ.MAX_RESPONSE_BODY_SIZE=4194304;function H3(Z,$,Y,G,Q,W,U,z){return new Promise((K)=>{let I=new URL($);if(Q)Y["User-Agent"]=`${Q} ${cZ}`;else Y["User-Agent"]=cZ;let j=Z(I,{method:"POST",headers:Y,agent:W},(J)=>{let F=[],S=0;J.on("data",(D)=>{if(S+=D.length,S>pZ.MAX_RESPONSE_BODY_SIZE){let A0=Error(`OTLP export response body exceeded size limit of ${pZ.MAX_RESPONSE_BODY_SIZE} bytes`);K({status:"failure",error:A0}),J.destroy();return}F.push(D)}),J.on("end",()=>{if(J.statusCode&&J.statusCode<=299)K({status:"success",data:Buffer.concat(F)});else if(J.statusCode&&(0,E.isExportHTTPErrorRetryable)(J.statusCode))K({status:"retryable",retryInMillis:(0,E.parseRetryAfterToMills)(J.headers["retry-after"])});else{let D=new O3.OTLPExporterError(J.statusMessage,J.statusCode,Buffer.concat(F).toString());K({status:"failure",error:D})}}),J.on("error",(D)=>{if(J.statusCode&&J.statusCode<=299)K({status:"success"});else if(J.statusCode&&(0,E.isExportHTTPErrorRetryable)(J.statusCode))K({status:"retryable",error:D,retryInMillis:(0,E.parseRetryAfterToMills)(J.headers["retry-after"])});else K({status:"failure",error:D})})});j.setTimeout(z,()=>{j.destroy(),K({status:"retryable",error:Error("Request timed out")})}),j.on("error",(J)=>{if(I3(J))K({status:"retryable",error:J});else K({status:"failure",error:J})}),uZ(j,G,U,(J)=>{K({status:"failure",error:J})})})}pZ.sendWithHttp=H3;function uZ(Z,$,Y,G){let Q=A3(Y);if($==="gzip")Z.setHeader("Content-Encoding","gzip"),Q=Q.on("error",G).pipe(q3.createGzip()).on("error",G);Q.pipe(Z).on("error",G)}pZ.compressAndSend=uZ;function A3(Z){let $=new U3.Readable;return $.push(Z),$.push(null),$}function I3(Z){let $=new Set(["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT","EAI_AGAIN","ENOTFOUND","ENETUNREACH","EHOSTUNREACH"]);if("code"in Z&&typeof Z.code==="string")return $.has(Z.code);return!1}});var sZ=X((nZ)=>{Object.defineProperty(nZ,"__esModule",{value:!0});nZ.createHttpExporterTransport=void 0;var S3=iZ();class aZ{_utils=null;_parameters;constructor(Z){this._parameters=Z}async send(Z,$){let{agent:Y,request:G}=await this._loadUtils(),Q=await this._parameters.headers();return(0,S3.sendWithHttp)(G,this._parameters.url,Q,this._parameters.compression,this._parameters.userAgent,Y,Z,$)}shutdown(){}async _loadUtils(){let Z=this._utils;if(Z===null){let $=new URL(this._parameters.url).protocol,[Y,G]=await Promise.all([this._parameters.agentFactory($),R3($)]);Z=this._utils={agent:Y,request:G}}return Z}}async function R3(Z){let $=Z==="http:"?import("http"):import("https"),{request:Y}=await $;return Y}function M3(Z){return new aZ(Z)}nZ.createHttpExporterTransport=M3});var $0=X((eZ)=>{Object.defineProperty(eZ,"__esModule",{value:!0});eZ.createRetryingTransport=void 0;var A=B(),g=5,b3=1000,T3=5000,k3=1.5,oZ=0.2;function E3(){return Math.random()*(2*oZ)-oZ}class rZ{_transport;constructor(Z){this._transport=Z}retry(Z,$,Y){return new Promise((G,Q)=>{setTimeout(()=>{this._transport.send(Z,$).then(G,Q)},Y)})}async send(Z,$){let Y=g,G=b3,Q=Date.now()+$,W=await this._transport.send(Z,$);while(W.status==="retryable"&&Y>0){Y--;let U=Math.max(Math.min(G*(1+E3()),T3),0);G=G*k3;let z=W.retryInMillis??U,K=Q-Date.now();if(z>K)return A.diag.info(`Export retry time ${Math.round(z)}ms exceeds remaining timeout ${Math.round(K)}ms, not retrying further.`),W;A.diag.verbose(`Scheduling export retry in ${Math.round(z)}ms`),W=await this.retry(Z,K,z)}if(W.status==="success")A.diag.verbose(`Export succeeded after ${g-Y} retry attempts.`);else if(W.status==="retryable")A.diag.info(`Export failed after maximum retry attempts (${g}).`);else A.diag.info(`Export failed with non-retryable error: ${W.error}`);return W}shutdown(){return this._transport.shutdown()}}function y3(Z){return new rZ(Z.transport)}eZ.createRetryingTransport=y3});var Q0=X((Y0)=>{Object.defineProperty(Y0,"__esModule",{value:!0});Y0.createOtlpHttpExportDelegate=void 0;var x3=v(),h3=sZ(),C3=_(),_3=$0();function v3(Z,$){return(0,x3.createOtlpExportDelegate)({transport:(0,_3.createRetryingTransport)({transport:(0,h3.createHttpExporterTransport)(Z)}),serializer:$,promiseHandler:(0,C3.createBoundedQueueExportPromiseHandler)(Z)},{timeout:Z.timeoutMillis})}Y0.createOtlpHttpExportDelegate=v3});var d=X((w0)=>{Object.defineProperty(w0,"__esModule",{value:!0});w0.getSharedConfigurationFromEnvironment=void 0;var X0=M(),K0=B();function W0(Z){let $=(0,X0.getNumberFromEnv)(Z);if($!=null){if(Number.isFinite($)&&$>0)return $;K0.diag.warn(`Configuration: ${Z} is invalid, expected number greater than 0 (actual: ${$})`)}return}function m3(Z){let $=W0(`OTEL_EXPORTER_OTLP_${Z}_TIMEOUT`),Y=W0("OTEL_EXPORTER_OTLP_TIMEOUT");return $??Y}function J0(Z){let $=(0,X0.getStringFromEnv)(Z)?.trim();if($==null||$==="none"||$==="gzip")return $;K0.diag.warn(`Configuration: ${Z} is invalid, expected 'none' or 'gzip' (actual: '${$}')`);return}function f3(Z){let $=J0(`OTEL_EXPORTER_OTLP_${Z}_COMPRESSION`),Y=J0("OTEL_EXPORTER_OTLP_COMPRESSION");return $??Y}function g3(Z){return{timeoutMillis:m3(Z),compression:f3(Z)}}w0.getSharedConfigurationFromEnvironment=g3});var B0=X((D0)=>{Object.defineProperty(D0,"__esModule",{value:!0});D0.getNodeHttpConfigurationFromEnvironment=void 0;var d3=V("fs"),c3=V("path"),w=M(),y=B(),u3=d(),p3=H(),l3=k();function i3(Z){let $=(0,w.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${Z}_HEADERS`),Y=(0,w.getStringFromEnv)("OTEL_EXPORTER_OTLP_HEADERS"),G=(0,w.parseKeyPairsIntoRecord)($),Q=(0,w.parseKeyPairsIntoRecord)(Y);if(Object.keys(G).length===0&&Object.keys(Q).length===0)return;return Object.assign({},(0,w.parseKeyPairsIntoRecord)(Y),(0,w.parseKeyPairsIntoRecord)($))}function a3(Z){try{return new URL(Z).toString()}catch{y.diag.warn(`Configuration: Could not parse environment-provided export URL: '${Z}', falling back to undefined`);return}}function n3(Z,$){try{new URL(Z)}catch{y.diag.warn(`Configuration: Could not parse environment-provided export URL: '${Z}', falling back to undefined`);return}if(!Z.endsWith("/"))Z=Z+"/";Z+=$;try{new URL(Z)}catch{y.diag.warn(`Configuration: Provided URL appended with '${$}' is not a valid URL, using 'undefined' instead of '${Z}'`);return}return Z}function t3(Z){let $=(0,w.getStringFromEnv)("OTEL_EXPORTER_OTLP_ENDPOINT");if($===void 0)return;return n3($,Z)}function s3(Z){let $=(0,w.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${Z}_ENDPOINT`);if($===void 0)return;return a3($)}function c(Z,$,Y){let G=(0,w.getStringFromEnv)(Z),Q=(0,w.getStringFromEnv)($),W=G??Q;if(W!=null)try{return d3.readFileSync(c3.resolve(process.cwd(),W))}catch{y.diag.warn(Y);return}else return}function o3(Z){return c(`OTEL_EXPORTER_OTLP_${Z}_CLIENT_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE","Failed to read client certificate chain file")}function r3(Z){return c(`OTEL_EXPORTER_OTLP_${Z}_CLIENT_KEY`,"OTEL_EXPORTER_OTLP_CLIENT_KEY","Failed to read client certificate private key file")}function e3(Z){return c(`OTEL_EXPORTER_OTLP_${Z}_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CERTIFICATE","Failed to read root certificate file")}function Z4(Z,$){return{...(0,u3.getSharedConfigurationFromEnvironment)(Z),url:s3(Z)??t3($),headers:(0,p3.wrapStaticHeadersInFunction)(i3(Z)),agentFactory:(0,l3.httpAgentFactoryFromOptions)({keepAlive:!0,ca:e3(Z),cert:o3(Z),key:r3(Z)})}}D0.getNodeHttpConfigurationFromEnvironment=Z4});var j0=X((N0)=>{Object.defineProperty(N0,"__esModule",{value:!0});N0.convertLegacyHeaders=void 0;var $4=H();function Y4(Z){if(typeof Z.headers==="function")return Z.headers;return(0,$4.wrapStaticHeadersInFunction)(Z.headers)}N0.convertLegacyHeaders=Y4});var L0=X((U0)=>{Object.defineProperty(U0,"__esModule",{value:!0});U0.convertLegacyHttpOptions=void 0;var G4=B(),q0=k(),Q4=u(),W4=B0(),J4=j0();function X4(Z){if(typeof Z.httpAgentOptions==="function")return Z.httpAgentOptions;let $=Z.httpAgentOptions;if(Z.keepAlive!=null)$={keepAlive:Z.keepAlive,...$};if($!=null)return(0,Q4.httpAgentFactoryFromOptions)($);else return}function K4(Z,$,Y,G){if(Z.metadata)G4.diag.warn("Metadata cannot be set when using http");return(0,q0.mergeOtlpNodeHttpConfigurationWithDefaults)({url:Z.url,headers:(0,J4.convertLegacyHeaders)(Z),concurrencyLimit:Z.concurrencyLimit,timeoutMillis:Z.timeoutMillis,compression:Z.compression,agentFactory:X4(Z),userAgent:Z.userAgent},(0,W4.getNodeHttpConfigurationFromEnvironment)($,Y),(0,q0.getNodeHttpConfigurationDefaults)(G,Y))}U0.convertLegacyHttpOptions=K4});var u=X((L)=>{Object.defineProperty(L,"__esModule",{value:!0});L.convertLegacyHttpOptions=L.getSharedConfigurationFromEnvironment=L.createOtlpHttpExportDelegate=L.httpAgentFactoryFromOptions=void 0;var w4=k();Object.defineProperty(L,"httpAgentFactoryFromOptions",{enumerable:!0,get:function(){return w4.httpAgentFactoryFromOptions}});var z4=Q0();Object.defineProperty(L,"createOtlpHttpExportDelegate",{enumerable:!0,get:function(){return z4.createOtlpHttpExportDelegate}});var D4=d();Object.defineProperty(L,"getSharedConfigurationFromEnvironment",{enumerable:!0,get:function(){return D4.getSharedConfigurationFromEnvironment}});var F4=L0();Object.defineProperty(L,"convertLegacyHttpOptions",{enumerable:!0,get:function(){return F4.convertLegacyHttpOptions}})});var H0=b(jZ(),1);function qZ(Z,$){let Y={attributes:O(Z.attributes,$),droppedAttributesCount:0},G=Z.schemaUrl;if(G&&G!=="")Y.schemaUrl=G;return Y}function UZ(Z,$){let Y={name:Z.name,version:Z.version};if(Z.attributes&&Object.keys(Z.attributes).length>0)Y.attributes=O(Z.attributes,$),Y.droppedAttributesCount=Z.droppedAttributesCount??0;return Y}function O(Z,$){return Object.keys(Z).map((Y)=>l0(Y,Z[Y],$))}function l0(Z,$,Y){return{key:Z,value:m($,Y)}}function m(Z,$){let Y=typeof Z;if(Y==="string")return{stringValue:Z};if(Y==="number"){if(!Number.isInteger(Z))return{doubleValue:Z};return{intValue:Z}}if(Y==="boolean")return{boolValue:Z};if(Z instanceof Uint8Array)return{bytesValue:$.encodeUint8Array(Z)};if(Array.isArray(Z)){let G=Array(Z.length);for(let Q=0;Q<Z.length;Q++)G[Q]=m(Z[Q],$);return{arrayValue:{values:G}}}if(Y==="object"&&Z!=null){let G=Object.keys(Z),Q=Array(G.length);for(let W=0;W<G.length;W++)Q[W]={key:G[W],value:m(Z[G[W]],$)};return{kvlistValue:{values:Q}}}return{}}var i0=256,a0=512;function OZ(Z,$){let Y=Z&255|i0;if($)Y|=a0;return Y}function n0(Z,$){let Y=Z.spanContext(),G=Z.status,Q=Z.parentSpanContext?.spanId?$.encodeSpanContext(Z.parentSpanContext?.spanId):void 0;return{traceId:$.encodeSpanContext(Y.traceId),spanId:$.encodeSpanContext(Y.spanId),parentSpanId:Q,traceState:Y.traceState?.serialize(),name:Z.name,kind:Z.kind==null?0:Z.kind+1,startTimeUnixNano:$.encodeHrTime(Z.startTime),endTimeUnixNano:$.encodeHrTime(Z.endTime),attributes:O(Z.attributes,$),droppedAttributesCount:Z.droppedAttributesCount,events:Z.events.map((W)=>s0(W,$)),droppedEventsCount:Z.droppedEventsCount,status:{code:G.code,message:G.message},links:Z.links.map((W)=>t0(W,$)),droppedLinksCount:Z.droppedLinksCount,flags:OZ(Y.traceFlags,Z.parentSpanContext?.isRemote)}}function t0(Z,$){return{attributes:Z.attributes?O(Z.attributes,$):[],spanId:$.encodeSpanContext(Z.context.spanId),traceId:$.encodeSpanContext(Z.context.traceId),traceState:Z.context.traceState?.serialize(),droppedAttributesCount:Z.droppedAttributesCount||0,flags:OZ(Z.context.traceFlags,Z.context.isRemote)}}function s0(Z,$){return{attributes:Z.attributes?O(Z.attributes,$):[],name:Z.name,timeUnixNano:$.encodeHrTime(Z.time),droppedAttributesCount:Z.droppedAttributesCount||0}}function LZ(Z,$){return{resourceSpans:r0(Z,$)}}function o0(Z){let $=new Map;for(let Y of Z){let G=$.get(Y.resource);if(!G)G=new Map,$.set(Y.resource,G);let Q=`${Y.instrumentationScope.name}@${Y.instrumentationScope.version||""}:${Y.instrumentationScope.schemaUrl||""}`,W=G.get(Q);if(!W)W=[],G.set(Q,W);W.push(Y)}return $}function r0(Z,$){let Y=o0(Z),G=[],Q=Y.entries(),W=Q.next();while(!W.done){let[U,z]=W.value,K=[],I=z.values(),P=I.next();while(!P.done){let F=P.value;if(F.length>0){let S=F.map((D)=>n0(D,$));K.push({scope:UZ(F[0].instrumentationScope,$),spans:S,schemaUrl:F[0].instrumentationScope.schemaUrl})}P=I.next()}let j=qZ(U,$),J={resource:j,scopeSpans:K,schemaUrl:j.schemaUrl};G.push(J),W=Q.next()}return G}var AZ=b(M(),1);function e0(Z){let $=BigInt(1e9);return BigInt(Math.trunc(Z[0]))*$+BigInt(Math.trunc(Z[1]))}function Z3(Z){return e0(Z).toString()}var $3=typeof BigInt<"u"?Z3:AZ.hrTimeToNanoseconds;function HZ(Z){return Z}var IZ={encodeHrTime:$3,encodeSpanContext:HZ,encodeOptionalSpanContext:HZ,encodeUint8Array:(Z)=>{if(typeof Buffer<"u")return Buffer.from(Z).toString("base64");let $=Array(Z.length);for(let Y=0;Y<Z.length;Y++)$[Y]=String.fromCharCode(Z[Y]);return btoa($.join(""))}};var PZ=b(B(),1),T={serializeRequest:(Z)=>{let $=LZ(Z,IZ);return new TextEncoder().encode(JSON.stringify($))},deserializeResponse:(Z)=>{if(Z.length===0)return{};let $=new TextDecoder;try{return JSON.parse($.decode(Z))}catch(Y){return PZ.diag.warn(`Failed to parse trace export response: ${Y.message}. Returning empty response`),{}}}};var x=b(u(),1);class h extends H0.OTLPExporterBase{constructor(Z={}){super(x.createOtlpHttpExportDelegate(x.convertLegacyHttpOptions(Z,"TRACES","v1/traces",{"Content-Type":"application/json"}),T))}}export{h as OTLPTraceExporter};
|
|
2
|
+
import{tr as M}from"./chunk-1exjy880.js";import{qP as B}from"./chunk-t4kma6mq.js";import{rP as b,sP as X,vP as V}from"./chunk-0xf12tf3.js";var a=X((l)=>{Object.defineProperty(l,"__esModule",{value:!0});l.OTLPExporterBase=void 0;class p{_delegate;constructor(Z){this._delegate=Z}export(Z,$){this._delegate.export(Z,$)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}}l.OTLPExporterBase=p});var R=X((t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.OTLPExporterError=void 0;class n extends Error{code;name="OTLPExporterError";data;constructor(Z,$,Y){super(Z);this.data=Y,this.code=$}}t.OTLPExporterError=n});var H=X((r)=>{Object.defineProperty(r,"__esModule",{value:!0});r.getSharedConfigurationDefaults=r.mergeOtlpSharedConfigurationWithDefaults=r.wrapStaticHeadersInFunction=r.validateTimeoutMillis=void 0;function o(Z){if(Number.isFinite(Z)&&Z>0)return Z;throw Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${Z}')`)}r.validateTimeoutMillis=o;function I0(Z){if(Z==null)return;return async()=>Z}r.wrapStaticHeadersInFunction=I0;function P0(Z,$,Y){return{timeoutMillis:o(Z.timeoutMillis??$.timeoutMillis??Y.timeoutMillis),concurrencyLimit:Z.concurrencyLimit??$.concurrencyLimit??Y.concurrencyLimit,compression:Z.compression??$.compression??Y.compression}}r.mergeOtlpSharedConfigurationWithDefaults=P0;function S0(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}r.getSharedConfigurationDefaults=S0});var $Z=X((ZZ)=>{Object.defineProperty(ZZ,"__esModule",{value:!0});ZZ.CompressionAlgorithm=void 0;var T0;(function(Z){Z.NONE="none",Z.GZIP="gzip"})(T0=ZZ.CompressionAlgorithm||(ZZ.CompressionAlgorithm={}))});var _=X((GZ)=>{Object.defineProperty(GZ,"__esModule",{value:!0});GZ.createBoundedQueueExportPromiseHandler=void 0;class YZ{_concurrencyLimit;_sendingPromises=[];constructor(Z){this._concurrencyLimit=Z}pushPromise(Z){if(this.hasReachedLimit())throw Error("Concurrency Limit reached");this._sendingPromises.push(Z);let $=()=>{let Y=this._sendingPromises.indexOf(Z);this._sendingPromises.splice(Y,1)};Z.then($,$)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}}function k0(Z){return new YZ(Z.concurrencyLimit)}GZ.createBoundedQueueExportPromiseHandler=k0});var XZ=X((WZ)=>{Object.defineProperty(WZ,"__esModule",{value:!0});WZ.createLoggingPartialSuccessResponseHandler=void 0;var E0=B();function y0(Z){return Object.prototype.hasOwnProperty.call(Z,"partialSuccess")}function x0(){return{handleResponse(Z){if(Z==null||!y0(Z)||Z.partialSuccess==null||Object.keys(Z.partialSuccess).length===0)return;E0.diag.warn("Received Partial Success response:",JSON.stringify(Z.partialSuccess))}}}WZ.createLoggingPartialSuccessResponseHandler=x0});var v=X((zZ)=>{Object.defineProperty(zZ,"__esModule",{value:!0});zZ.createOtlpExportDelegate=void 0;var q=M(),KZ=R(),h0=XZ(),C0=B();class wZ{_diagLogger;_transport;_serializer;_responseHandler;_promiseQueue;_timeout;constructor(Z,$,Y,G,Q){this._transport=Z,this._serializer=$,this._responseHandler=Y,this._promiseQueue=G,this._timeout=Q,this._diagLogger=C0.diag.createComponentLogger({namespace:"OTLPExportDelegate"})}export(Z,$){if(this._diagLogger.debug("items to be sent",Z),this._promiseQueue.hasReachedLimit()){$({code:q.ExportResultCode.FAILED,error:Error("Concurrent export limit reached")});return}let Y=this._serializer.serializeRequest(Z);if(Y==null){$({code:q.ExportResultCode.FAILED,error:Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(Y,this._timeout).then((G)=>{if(G.status==="success"){if(G.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(G.data))}catch(Q){this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",Q,G.data)}$({code:q.ExportResultCode.SUCCESS});return}else if(G.status==="failure"&&G.error){$({code:q.ExportResultCode.FAILED,error:G.error});return}else if(G.status==="retryable")$({code:q.ExportResultCode.FAILED,error:G.error??new KZ.OTLPExporterError("Export failed with retryable status")});else $({code:q.ExportResultCode.FAILED,error:new KZ.OTLPExporterError("Export failed with unknown error")})},(G)=>$({code:q.ExportResultCode.FAILED,error:G})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug("shutdown started"),await this.forceFlush(),this._transport.shutdown()}}function _0(Z,$){return new wZ(Z.transport,Z.serializer,(0,h0.createLoggingPartialSuccessResponseHandler)(),Z.promiseHandler,$.timeout)}zZ.createOtlpExportDelegate=_0});var NZ=X((FZ)=>{Object.defineProperty(FZ,"__esModule",{value:!0});FZ.createOtlpNetworkExportDelegate=void 0;var v0=_(),m0=v();function f0(Z,$,Y){return(0,m0.createOtlpExportDelegate)({transport:Y,serializer:$,promiseHandler:(0,v0.createBoundedQueueExportPromiseHandler)(Z)},{timeout:Z.timeoutMillis})}FZ.createOtlpNetworkExportDelegate=f0});var jZ=X((N)=>{Object.defineProperty(N,"__esModule",{value:!0});N.createOtlpNetworkExportDelegate=N.CompressionAlgorithm=N.getSharedConfigurationDefaults=N.mergeOtlpSharedConfigurationWithDefaults=N.OTLPExporterError=N.OTLPExporterBase=void 0;var g0=a();Object.defineProperty(N,"OTLPExporterBase",{enumerable:!0,get:function(){return g0.OTLPExporterBase}});var d0=R();Object.defineProperty(N,"OTLPExporterError",{enumerable:!0,get:function(){return d0.OTLPExporterError}});var VZ=H();Object.defineProperty(N,"mergeOtlpSharedConfigurationWithDefaults",{enumerable:!0,get:function(){return VZ.mergeOtlpSharedConfigurationWithDefaults}});Object.defineProperty(N,"getSharedConfigurationDefaults",{enumerable:!0,get:function(){return VZ.getSharedConfigurationDefaults}});var c0=$Z();Object.defineProperty(N,"CompressionAlgorithm",{enumerable:!0,get:function(){return c0.CompressionAlgorithm}});var u0=NZ();Object.defineProperty(N,"createOtlpNetworkExportDelegate",{enumerable:!0,get:function(){return u0.createOtlpNetworkExportDelegate}})});var MZ=X((SZ)=>{Object.defineProperty(SZ,"__esModule",{value:!0});SZ.validateAndNormalizeHeaders=void 0;var Y3=B();function G3(Z){let $={};return Object.entries(Z??{}).forEach(([Y,G])=>{if(typeof G<"u")$[Y]=String(G);else Y3.diag.warn(`Header "${Y}" has invalid value (${G}) and will be ignored`)}),$}SZ.validateAndNormalizeHeaders=G3});var EZ=X((TZ)=>{Object.defineProperty(TZ,"__esModule",{value:!0});TZ.getHttpConfigurationDefaults=TZ.mergeOtlpHttpConfigurationWithDefaults=void 0;var bZ=H(),Q3=MZ();function W3(Z,$,Y){return async()=>{let G={...await Y()},Q={};if($!=null)Object.assign(Q,await $());if(Z!=null)Object.assign(Q,(0,Q3.validateAndNormalizeHeaders)(await Z()));return Object.assign(Q,G)}}function J3(Z){if(Z==null)return;try{let $=globalThis.location?.href;return new URL(Z,$).href}catch{throw Error(`Configuration: Could not parse user-provided export URL: '${Z}'`)}}function X3(Z,$,Y){return{...(0,bZ.mergeOtlpSharedConfigurationWithDefaults)(Z,$,Y),headers:W3(Z.headers,$.headers,Y.headers),url:J3(Z.url)??$.url??Y.url}}TZ.mergeOtlpHttpConfigurationWithDefaults=X3;function K3(Z,$){return{...(0,bZ.getSharedConfigurationDefaults)(),headers:async()=>Z,url:"http://localhost:4318/"+$}}TZ.getHttpConfigurationDefaults=K3});var k=X((hZ)=>{Object.defineProperty(hZ,"__esModule",{value:!0});hZ.getNodeHttpConfigurationDefaults=hZ.mergeOtlpNodeHttpConfigurationWithDefaults=hZ.httpAgentFactoryFromOptions=void 0;var yZ=EZ();function xZ(Z){return async($)=>{let Y=$==="http:",G=Y?import("http"):import("https"),{Agent:Q}=await G;if(Y){let{ca:W,cert:U,key:z,...K}=Z;return new Q(K)}return new Q(Z)}}hZ.httpAgentFactoryFromOptions=xZ;function z3(Z,$,Y){return{...(0,yZ.mergeOtlpHttpConfigurationWithDefaults)(Z,$,Y),agentFactory:Z.agentFactory??$.agentFactory??Y.agentFactory,userAgent:Z.userAgent}}hZ.mergeOtlpNodeHttpConfigurationWithDefaults=z3;function D3(Z,$){return{...(0,yZ.getHttpConfigurationDefaults)(Z,$),agentFactory:xZ({keepAlive:!0})}}hZ.getNodeHttpConfigurationDefaults=D3});var mZ=X((_Z)=>{Object.defineProperty(_Z,"__esModule",{value:!0});_Z.parseRetryAfterToMills=_Z.isExportHTTPErrorRetryable=void 0;function N3(Z){return Z===429||Z===502||Z===503||Z===504}_Z.isExportHTTPErrorRetryable=N3;function V3(Z){if(Z==null)return;let $=Number.parseInt(Z,10);if(Number.isInteger($))return $>0?$*1000:-1;let Y=new Date(Z).getTime()-Date.now();if(Y>=0)return Y;return 0}_Z.parseRetryAfterToMills=V3});var dZ=X((fZ)=>{Object.defineProperty(fZ,"__esModule",{value:!0});fZ.VERSION=void 0;fZ.VERSION="0.220.0"});var iZ=X((pZ)=>{Object.defineProperty(pZ,"__esModule",{value:!0});pZ.compressAndSend=pZ.sendWithHttp=pZ.MAX_RESPONSE_BODY_SIZE=void 0;var q3=V("zlib"),U3=V("stream"),E=mZ(),O3=R(),L3=dZ(),cZ=`OTel-OTLP-Exporter-JavaScript/${L3.VERSION}`;pZ.MAX_RESPONSE_BODY_SIZE=4194304;function H3(Z,$,Y,G,Q,W,U,z){return new Promise((K)=>{let I=new URL($);if(Q)Y["User-Agent"]=`${Q} ${cZ}`;else Y["User-Agent"]=cZ;let j=Z(I,{method:"POST",headers:Y,agent:W},(J)=>{let F=[],S=0;J.on("data",(D)=>{if(S+=D.length,S>pZ.MAX_RESPONSE_BODY_SIZE){let A0=Error(`OTLP export response body exceeded size limit of ${pZ.MAX_RESPONSE_BODY_SIZE} bytes`);K({status:"failure",error:A0}),J.destroy();return}F.push(D)}),J.on("end",()=>{if(J.statusCode&&J.statusCode<=299)K({status:"success",data:Buffer.concat(F)});else if(J.statusCode&&(0,E.isExportHTTPErrorRetryable)(J.statusCode))K({status:"retryable",retryInMillis:(0,E.parseRetryAfterToMills)(J.headers["retry-after"])});else{let D=new O3.OTLPExporterError(J.statusMessage,J.statusCode,Buffer.concat(F).toString());K({status:"failure",error:D})}}),J.on("error",(D)=>{if(J.statusCode&&J.statusCode<=299)K({status:"success"});else if(J.statusCode&&(0,E.isExportHTTPErrorRetryable)(J.statusCode))K({status:"retryable",error:D,retryInMillis:(0,E.parseRetryAfterToMills)(J.headers["retry-after"])});else K({status:"failure",error:D})})});j.setTimeout(z,()=>{j.destroy(),K({status:"retryable",error:Error("Request timed out")})}),j.on("error",(J)=>{if(I3(J))K({status:"retryable",error:J});else K({status:"failure",error:J})}),uZ(j,G,U,(J)=>{K({status:"failure",error:J})})})}pZ.sendWithHttp=H3;function uZ(Z,$,Y,G){let Q=A3(Y);if($==="gzip")Z.setHeader("Content-Encoding","gzip"),Q=Q.on("error",G).pipe(q3.createGzip()).on("error",G);Q.pipe(Z).on("error",G)}pZ.compressAndSend=uZ;function A3(Z){let $=new U3.Readable;return $.push(Z),$.push(null),$}function I3(Z){let $=new Set(["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT","EAI_AGAIN","ENOTFOUND","ENETUNREACH","EHOSTUNREACH"]);if("code"in Z&&typeof Z.code==="string")return $.has(Z.code);return!1}});var sZ=X((nZ)=>{Object.defineProperty(nZ,"__esModule",{value:!0});nZ.createHttpExporterTransport=void 0;var S3=iZ();class aZ{_utils=null;_parameters;constructor(Z){this._parameters=Z}async send(Z,$){let{agent:Y,request:G}=await this._loadUtils(),Q=await this._parameters.headers();return(0,S3.sendWithHttp)(G,this._parameters.url,Q,this._parameters.compression,this._parameters.userAgent,Y,Z,$)}shutdown(){}async _loadUtils(){let Z=this._utils;if(Z===null){let $=new URL(this._parameters.url).protocol,[Y,G]=await Promise.all([this._parameters.agentFactory($),R3($)]);Z=this._utils={agent:Y,request:G}}return Z}}async function R3(Z){let $=Z==="http:"?import("http"):import("https"),{request:Y}=await $;return Y}function M3(Z){return new aZ(Z)}nZ.createHttpExporterTransport=M3});var $0=X((eZ)=>{Object.defineProperty(eZ,"__esModule",{value:!0});eZ.createRetryingTransport=void 0;var A=B(),g=5,b3=1000,T3=5000,k3=1.5,oZ=0.2;function E3(){return Math.random()*(2*oZ)-oZ}class rZ{_transport;constructor(Z){this._transport=Z}retry(Z,$,Y){return new Promise((G,Q)=>{setTimeout(()=>{this._transport.send(Z,$).then(G,Q)},Y)})}async send(Z,$){let Y=g,G=b3,Q=Date.now()+$,W=await this._transport.send(Z,$);while(W.status==="retryable"&&Y>0){Y--;let U=Math.max(Math.min(G*(1+E3()),T3),0);G=G*k3;let z=W.retryInMillis??U,K=Q-Date.now();if(z>K)return A.diag.info(`Export retry time ${Math.round(z)}ms exceeds remaining timeout ${Math.round(K)}ms, not retrying further.`),W;A.diag.verbose(`Scheduling export retry in ${Math.round(z)}ms`),W=await this.retry(Z,K,z)}if(W.status==="success")A.diag.verbose(`Export succeeded after ${g-Y} retry attempts.`);else if(W.status==="retryable")A.diag.info(`Export failed after maximum retry attempts (${g}).`);else A.diag.info(`Export failed with non-retryable error: ${W.error}`);return W}shutdown(){return this._transport.shutdown()}}function y3(Z){return new rZ(Z.transport)}eZ.createRetryingTransport=y3});var Q0=X((Y0)=>{Object.defineProperty(Y0,"__esModule",{value:!0});Y0.createOtlpHttpExportDelegate=void 0;var x3=v(),h3=sZ(),C3=_(),_3=$0();function v3(Z,$){return(0,x3.createOtlpExportDelegate)({transport:(0,_3.createRetryingTransport)({transport:(0,h3.createHttpExporterTransport)(Z)}),serializer:$,promiseHandler:(0,C3.createBoundedQueueExportPromiseHandler)(Z)},{timeout:Z.timeoutMillis})}Y0.createOtlpHttpExportDelegate=v3});var d=X((w0)=>{Object.defineProperty(w0,"__esModule",{value:!0});w0.getSharedConfigurationFromEnvironment=void 0;var X0=M(),K0=B();function W0(Z){let $=(0,X0.getNumberFromEnv)(Z);if($!=null){if(Number.isFinite($)&&$>0)return $;K0.diag.warn(`Configuration: ${Z} is invalid, expected number greater than 0 (actual: ${$})`)}return}function m3(Z){let $=W0(`OTEL_EXPORTER_OTLP_${Z}_TIMEOUT`),Y=W0("OTEL_EXPORTER_OTLP_TIMEOUT");return $??Y}function J0(Z){let $=(0,X0.getStringFromEnv)(Z)?.trim();if($==null||$==="none"||$==="gzip")return $;K0.diag.warn(`Configuration: ${Z} is invalid, expected 'none' or 'gzip' (actual: '${$}')`);return}function f3(Z){let $=J0(`OTEL_EXPORTER_OTLP_${Z}_COMPRESSION`),Y=J0("OTEL_EXPORTER_OTLP_COMPRESSION");return $??Y}function g3(Z){return{timeoutMillis:m3(Z),compression:f3(Z)}}w0.getSharedConfigurationFromEnvironment=g3});var B0=X((D0)=>{Object.defineProperty(D0,"__esModule",{value:!0});D0.getNodeHttpConfigurationFromEnvironment=void 0;var d3=V("fs"),c3=V("path"),w=M(),y=B(),u3=d(),p3=H(),l3=k();function i3(Z){let $=(0,w.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${Z}_HEADERS`),Y=(0,w.getStringFromEnv)("OTEL_EXPORTER_OTLP_HEADERS"),G=(0,w.parseKeyPairsIntoRecord)($),Q=(0,w.parseKeyPairsIntoRecord)(Y);if(Object.keys(G).length===0&&Object.keys(Q).length===0)return;return Object.assign({},(0,w.parseKeyPairsIntoRecord)(Y),(0,w.parseKeyPairsIntoRecord)($))}function a3(Z){try{return new URL(Z).toString()}catch{y.diag.warn(`Configuration: Could not parse environment-provided export URL: '${Z}', falling back to undefined`);return}}function n3(Z,$){try{new URL(Z)}catch{y.diag.warn(`Configuration: Could not parse environment-provided export URL: '${Z}', falling back to undefined`);return}if(!Z.endsWith("/"))Z=Z+"/";Z+=$;try{new URL(Z)}catch{y.diag.warn(`Configuration: Provided URL appended with '${$}' is not a valid URL, using 'undefined' instead of '${Z}'`);return}return Z}function t3(Z){let $=(0,w.getStringFromEnv)("OTEL_EXPORTER_OTLP_ENDPOINT");if($===void 0)return;return n3($,Z)}function s3(Z){let $=(0,w.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${Z}_ENDPOINT`);if($===void 0)return;return a3($)}function c(Z,$,Y){let G=(0,w.getStringFromEnv)(Z),Q=(0,w.getStringFromEnv)($),W=G??Q;if(W!=null)try{return d3.readFileSync(c3.resolve(process.cwd(),W))}catch{y.diag.warn(Y);return}else return}function o3(Z){return c(`OTEL_EXPORTER_OTLP_${Z}_CLIENT_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE","Failed to read client certificate chain file")}function r3(Z){return c(`OTEL_EXPORTER_OTLP_${Z}_CLIENT_KEY`,"OTEL_EXPORTER_OTLP_CLIENT_KEY","Failed to read client certificate private key file")}function e3(Z){return c(`OTEL_EXPORTER_OTLP_${Z}_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CERTIFICATE","Failed to read root certificate file")}function Z4(Z,$){return{...(0,u3.getSharedConfigurationFromEnvironment)(Z),url:s3(Z)??t3($),headers:(0,p3.wrapStaticHeadersInFunction)(i3(Z)),agentFactory:(0,l3.httpAgentFactoryFromOptions)({keepAlive:!0,ca:e3(Z),cert:o3(Z),key:r3(Z)})}}D0.getNodeHttpConfigurationFromEnvironment=Z4});var j0=X((N0)=>{Object.defineProperty(N0,"__esModule",{value:!0});N0.convertLegacyHeaders=void 0;var $4=H();function Y4(Z){if(typeof Z.headers==="function")return Z.headers;return(0,$4.wrapStaticHeadersInFunction)(Z.headers)}N0.convertLegacyHeaders=Y4});var L0=X((U0)=>{Object.defineProperty(U0,"__esModule",{value:!0});U0.convertLegacyHttpOptions=void 0;var G4=B(),q0=k(),Q4=u(),W4=B0(),J4=j0();function X4(Z){if(typeof Z.httpAgentOptions==="function")return Z.httpAgentOptions;let $=Z.httpAgentOptions;if(Z.keepAlive!=null)$={keepAlive:Z.keepAlive,...$};if($!=null)return(0,Q4.httpAgentFactoryFromOptions)($);else return}function K4(Z,$,Y,G){if(Z.metadata)G4.diag.warn("Metadata cannot be set when using http");return(0,q0.mergeOtlpNodeHttpConfigurationWithDefaults)({url:Z.url,headers:(0,J4.convertLegacyHeaders)(Z),concurrencyLimit:Z.concurrencyLimit,timeoutMillis:Z.timeoutMillis,compression:Z.compression,agentFactory:X4(Z),userAgent:Z.userAgent},(0,W4.getNodeHttpConfigurationFromEnvironment)($,Y),(0,q0.getNodeHttpConfigurationDefaults)(G,Y))}U0.convertLegacyHttpOptions=K4});var u=X((L)=>{Object.defineProperty(L,"__esModule",{value:!0});L.convertLegacyHttpOptions=L.getSharedConfigurationFromEnvironment=L.createOtlpHttpExportDelegate=L.httpAgentFactoryFromOptions=void 0;var w4=k();Object.defineProperty(L,"httpAgentFactoryFromOptions",{enumerable:!0,get:function(){return w4.httpAgentFactoryFromOptions}});var z4=Q0();Object.defineProperty(L,"createOtlpHttpExportDelegate",{enumerable:!0,get:function(){return z4.createOtlpHttpExportDelegate}});var D4=d();Object.defineProperty(L,"getSharedConfigurationFromEnvironment",{enumerable:!0,get:function(){return D4.getSharedConfigurationFromEnvironment}});var F4=L0();Object.defineProperty(L,"convertLegacyHttpOptions",{enumerable:!0,get:function(){return F4.convertLegacyHttpOptions}})});var H0=b(jZ(),1);function qZ(Z,$){let Y={attributes:O(Z.attributes,$),droppedAttributesCount:0},G=Z.schemaUrl;if(G&&G!=="")Y.schemaUrl=G;return Y}function UZ(Z,$){let Y={name:Z.name,version:Z.version};if(Z.attributes&&Object.keys(Z.attributes).length>0)Y.attributes=O(Z.attributes,$),Y.droppedAttributesCount=Z.droppedAttributesCount??0;return Y}function O(Z,$){return Object.keys(Z).map((Y)=>l0(Y,Z[Y],$))}function l0(Z,$,Y){return{key:Z,value:m($,Y)}}function m(Z,$){let Y=typeof Z;if(Y==="string")return{stringValue:Z};if(Y==="number"){if(!Number.isInteger(Z))return{doubleValue:Z};return{intValue:Z}}if(Y==="boolean")return{boolValue:Z};if(Z instanceof Uint8Array)return{bytesValue:$.encodeUint8Array(Z)};if(Array.isArray(Z)){let G=Array(Z.length);for(let Q=0;Q<Z.length;Q++)G[Q]=m(Z[Q],$);return{arrayValue:{values:G}}}if(Y==="object"&&Z!=null){let G=Object.keys(Z),Q=Array(G.length);for(let W=0;W<G.length;W++)Q[W]={key:G[W],value:m(Z[G[W]],$)};return{kvlistValue:{values:Q}}}return{}}var i0=256,a0=512;function OZ(Z,$){let Y=Z&255|i0;if($)Y|=a0;return Y}function n0(Z,$){let Y=Z.spanContext(),G=Z.status,Q=Z.parentSpanContext?.spanId?$.encodeSpanContext(Z.parentSpanContext?.spanId):void 0;return{traceId:$.encodeSpanContext(Y.traceId),spanId:$.encodeSpanContext(Y.spanId),parentSpanId:Q,traceState:Y.traceState?.serialize(),name:Z.name,kind:Z.kind==null?0:Z.kind+1,startTimeUnixNano:$.encodeHrTime(Z.startTime),endTimeUnixNano:$.encodeHrTime(Z.endTime),attributes:O(Z.attributes,$),droppedAttributesCount:Z.droppedAttributesCount,events:Z.events.map((W)=>s0(W,$)),droppedEventsCount:Z.droppedEventsCount,status:{code:G.code,message:G.message},links:Z.links.map((W)=>t0(W,$)),droppedLinksCount:Z.droppedLinksCount,flags:OZ(Y.traceFlags,Z.parentSpanContext?.isRemote)}}function t0(Z,$){return{attributes:Z.attributes?O(Z.attributes,$):[],spanId:$.encodeSpanContext(Z.context.spanId),traceId:$.encodeSpanContext(Z.context.traceId),traceState:Z.context.traceState?.serialize(),droppedAttributesCount:Z.droppedAttributesCount||0,flags:OZ(Z.context.traceFlags,Z.context.isRemote)}}function s0(Z,$){return{attributes:Z.attributes?O(Z.attributes,$):[],name:Z.name,timeUnixNano:$.encodeHrTime(Z.time),droppedAttributesCount:Z.droppedAttributesCount||0}}function LZ(Z,$){return{resourceSpans:r0(Z,$)}}function o0(Z){let $=new Map;for(let Y of Z){let G=$.get(Y.resource);if(!G)G=new Map,$.set(Y.resource,G);let Q=`${Y.instrumentationScope.name}@${Y.instrumentationScope.version||""}:${Y.instrumentationScope.schemaUrl||""}`,W=G.get(Q);if(!W)W=[],G.set(Q,W);W.push(Y)}return $}function r0(Z,$){let Y=o0(Z),G=[],Q=Y.entries(),W=Q.next();while(!W.done){let[U,z]=W.value,K=[],I=z.values(),P=I.next();while(!P.done){let F=P.value;if(F.length>0){let S=F.map((D)=>n0(D,$));K.push({scope:UZ(F[0].instrumentationScope,$),spans:S,schemaUrl:F[0].instrumentationScope.schemaUrl})}P=I.next()}let j=qZ(U,$),J={resource:j,scopeSpans:K,schemaUrl:j.schemaUrl};G.push(J),W=Q.next()}return G}var AZ=b(M(),1);function e0(Z){let $=BigInt(1e9);return BigInt(Math.trunc(Z[0]))*$+BigInt(Math.trunc(Z[1]))}function Z3(Z){return e0(Z).toString()}var $3=typeof BigInt<"u"?Z3:AZ.hrTimeToNanoseconds;function HZ(Z){return Z}var IZ={encodeHrTime:$3,encodeSpanContext:HZ,encodeOptionalSpanContext:HZ,encodeUint8Array:(Z)=>{if(typeof Buffer<"u")return Buffer.from(Z).toString("base64");let $=Array(Z.length);for(let Y=0;Y<Z.length;Y++)$[Y]=String.fromCharCode(Z[Y]);return btoa($.join(""))}};var PZ=b(B(),1),T={serializeRequest:(Z)=>{let $=LZ(Z,IZ);return new TextEncoder().encode(JSON.stringify($))},deserializeResponse:(Z)=>{if(Z.length===0)return{};let $=new TextDecoder;try{return JSON.parse($.decode(Z))}catch(Y){return PZ.diag.warn(`Failed to parse trace export response: ${Y.message}. Returning empty response`),{}}}};var x=b(u(),1);class h extends H0.OTLPExporterBase{constructor(Z={}){super(x.createOtlpHttpExportDelegate(x.convertLegacyHttpOptions(Z,"TRACES","v1/traces",{"Content-Type":"application/json"}),T))}}export{h as OTLPTraceExporter};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{O as b,P as y,Q as k,R as S,S as D,T as x}from"./chunk-qvwx32p9.js";import{Sd as m}from"./chunk-rqdfmbns.js";import{Td as f,Ud as w,Xd as h}from"./chunk-y9mxwwz7.js";import"./chunk-yhe5qz48.js";import{de as u}from"./chunk-b274mb6v.js";import{ag as a}from"./chunk-d2049chz.js";import"./chunk-cv3xdp8q.js";import"./chunk-x0wy15q9.js";import"./chunk-2h8b0csf.js";import"./chunk-4q14whpc.js";import"./chunk-s81ck6bw.js";import"./chunk-dzy3ezht.js";import"./chunk-g3y5kvg6.js";import{$k as l,Jj as p}from"./chunk-z4gczap3.js";import"./chunk-2p1qaqv3.js";import"./chunk-47pxz6cb.js";import"./chunk-aq75kv5f.js";import"./chunk-1851skhm.js";import"./chunk-0ware2sh.js";import"./chunk-fbd971t7.js";import"./chunk-1f9qcrn6.js";import"./chunk-z66xdxkg.js";import"./chunk-jt94rhev.js";import"./chunk-2ts2s8b4.js";import"./chunk-7k1q26yn.js";import"./chunk-08mgb5tt.js";import"./chunk-6wt8g6mc.js";import"./chunk-1rafe6f5.js";import"./chunk-hsmtjb4d.js";import"./chunk-7nh8vjx4.js";import"./chunk-cqtkxwd8.js";import"./chunk-mfg4stzn.js";import"./chunk-hp9q7vvq.js";import"./chunk-5es19n1m.js";import"./chunk-1bbx1da7.js";import"./chunk-wspm2k19.js";import"./chunk-gvc1mqrs.js";import"./chunk-1exjy880.js";import"./chunk-xgdst5n5.js";import"./chunk-yzxcjr6y.js";import"./chunk-53n3tfwn.js";import"./chunk-3be70hxy.js";import"./chunk-9a9qcvtz.js";import"./chunk-1sejtx9a.js";import"./chunk-jrh028na.js";import"./chunk-vqxyk6as.js";import"./chunk-mbma071k.js";import"./chunk-ajykvcas.js";import"./chunk-dpm5x19e.js";import"./chunk-vvmvryh1.js";import"./chunk-6g3bzap8.js";import"./chunk-mrh5q4s6.js";import"./chunk-w623r5kb.js";import"./chunk-zgj7jx8k.js";import"./chunk-0mdmqtfr.js";import"./chunk-00krzh3y.js";import"./chunk-hk8m8vax.js";import"./chunk-zhddj91f.js";import"./chunk-t4kma6mq.js";import"./chunk-0xf12tf3.js";import{EOL as c}from"os";async function I(){a.empty(),h("Export session",{output:process.stderr});let t=[...l.list()];if(t.length===0)return;let o=await w({message:"Select session to export",maxItems:10,options:t.map((e)=>({label:e.title,value:e.id,hint:`${new Date(e.time.updated).toLocaleString()} \u2022 ${e.id.slice(-8)}`})),output:process.stderr});if(f(o))throw new a.CancelledError;return p.make(o)}var z=u({command:"export [sessionID]",describe:"export a complete session transcript as JSON or Markdown",builder:(t)=>t.positional("sessionID",{describe:"session id to export",type:"string"}).option("latest",{describe:"export the most recently updated session without prompting",type:"boolean",default:!1}).option("format",{alias:"f",describe:"output format (JSON defaults to stdout; Markdown defaults to a file in the project root)",choices:["json","markdown"],default:"json"}).option("output",{alias:"o",describe:"destination path, resolved from the current project root",type:"string"}).option("thinking",{describe:"include persisted assistant reasoning in Markdown",type:"boolean",default:!1}).option("tool-details",{describe:"include diagnostic tool inputs, outputs, and errors in Markdown",type:"boolean",default:!0}).option("assistant-metadata",{describe:"include agent, model, and duration metadata in Markdown",type:"boolean",default:!0}).option("sanitize",{describe:"redact sensitive transcript and file data",type:"boolean",default:!1}),handler:async(t)=>{await m(process.cwd(),async()=>{if(t.sessionID&&t.latest)throw Error("Use either a session ID or --latest, not both");let o=t.sessionID?p.make(t.sessionID):void 0;if(!o&&(t.latest||!process.stderr.isTTY))o=y()?.id;if(!o)o=await I();if(!o)throw Error("No sessions found in the current project");let e;try{e=await b(o)}catch{throw Error(`Session not found: ${o}`)}let r=t.sanitize?D(e):e,n=t.format,d=n==="json"?JSON.stringify(r,null,2)+c:x(r.info,r.messages,{thinking:t.thinking,toolDetails:t.toolDetails,assistantMetadata:t.assistantMetadata}),i=t.output??(n==="markdown"?k(r.info.id,n):void 0);if(!i){process.stdout.write(d);return}try{let s=await S(process.cwd(),i,d);process.stderr.write(`Session transcript written to ${s}${c}`)}catch(s){let E=s instanceof Error?s.message:String(s);throw Error(`Unable to write session transcript to ${i}: ${E}`)}})}});export{z as ExportCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Re as F}from"./chunk-anm5g0m4.js";import{bf as z,ef as B,vf as D}from"./chunk-1bhcg889.js";import{Rq as x}from"./chunk-7nh8vjx4.js";import"./chunk-cqtkxwd8.js";import"./chunk-mfg4stzn.js";import{Iu as q}from"./chunk-zgj7jx8k.js";import"./chunk-0mdmqtfr.js";import"./chunk-0xf12tf3.js";var N="2.0.41",P=q.object({message:q.string(),type:q.string(),param:q.string(),code:q.string()}),Q={errorSchema:P,errorToMessage:(k)=>k.message};function T(k={}){var y;let G=D((y=k.baseURL)!=null?y:"https://api.cerebras.ai/v1"),J=()=>z({Authorization:`Bearer ${B({apiKey:k.apiKey,environmentVariableName:"CEREBRAS_API_KEY",description:"Cerebras API key"})}`,...k.headers},`ai-sdk/cerebras/${N}`),w=(j)=>{return new F(j,{provider:"cerebras.chat",url:({path:K})=>`${G}${K}`,headers:J,fetch:k.fetch,errorStructure:Q,supportsStructuredOutputs:!0})},f=(j)=>w(j);return f.specificationVersion="v3",f.languageModel=w,f.chat=w,f.embeddingModel=(j)=>{throw new x({modelId:j,modelType:"embeddingModel"})},f.textEmbeddingModel=f.embeddingModel,f.imageModel=(j)=>{throw new x({modelId:j,modelType:"imageModel"})},f}var Z=T();export{T as createCerebras,Z as cerebras,N as VERSION};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{z as
|
|
2
|
+
import{Bh as I,Ch as B,Dh as Y,Eh as Z,Fh as j,Gh as F,Hh as K,Jh as U,Kh as V,Lh as W}from"./chunk-4q14whpc.js";var N=class extends F{async evalCodeAsync(b,q="eval.js",D){let w=D===void 0?1:0,G=j(D),$=0;try{$=await this.memory.newHeapCharPointer(b).consume((X)=>this.ffi.QTS_Eval_MaybeAsync(this.ctx.value,X.value.ptr,X.value.strlen,q,w,G))}catch(X){throw this.runtime.debugLog("QTS_Eval_MaybeAsync threw",X),X}let E=this.ffi.QTS_ResolveException(this.ctx.value,$);return E?(this.ffi.QTS_FreeValuePointer(this.ctx.value,$),this.fail(this.memory.heapValueHandle(E))):this.success(this.memory.heapValueHandle($))}newAsyncifiedFunction(b,q){return this.newFunction(b,q)}},O=class extends K{constructor(b){super(b)}newContext(b={}){let q=Z(b.intrinsics),D=new B(this.ffi.QTS_NewContext(this.rt.value,q),void 0,(G)=>{this.contextMap.delete(G),this.callbacks.deleteContext(G),this.ffi.QTS_FreeContext(G)}),w=new N({module:this.module,ctx:D,ffi:this.ffi,rt:this.rt,ownedLifetimes:[],runtime:this,callbacks:this.callbacks});return this.contextMap.set(D.value,w),w}setModuleLoader(b,q){super.setModuleLoader(b,q)}setMaxStackSize(b){return super.setMaxStackSize(b)}},z=class extends W{constructor(b,q){super(b,q);this.ffi=q,this.module=b}newRuntime(b={}){let q=new B(this.ffi.QTS_NewRuntime(),void 0,(w)=>{this.callbacks.deleteRuntime(w),this.ffi.QTS_FreeRuntime(w)}),D=new O({module:this.module,ffi:this.ffi,rt:q,callbacks:this.callbacks});return U(D,b),b.moduleLoader&&D.setModuleLoader(b.moduleLoader),D}newContext(b={}){let q=this.newRuntime(),D=b.ownedLifetimes?b.ownedLifetimes.concat([q]):[q],w=q.newContext({...b,ownedLifetimes:D});return q.context=w,w}evalCode(){throw new I("QuickJSWASMModuleAsyncify.evalCode: use evalCodeAsync instead")}evalCodeAsync(b,q){return Y.withScopeAsync(async(D)=>{let w=D.manage(this.newContext());V(w.runtime,q);let G=await w.evalCodeAsync(b,"eval.js");if(q.memoryLimitBytes!==void 0&&w.runtime.setMemoryLimit(-1),G.error)throw w.dump(D.manage(G.error));return w.dump(D.manage(G.value))})}};
|
|
3
|
+
export{z as Ah};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Pe as mt}from"./chunk-dp6ms01y.js";import{Bf as fr,Cf as pt,Ff as ft}from"./chunk-2fbkw84y.js";import{rP as xe}from"./chunk-djfrkbd5.js";var br=xe((Ti)=>{var re=ft(),_e=mt(),oi=pt(),be=fr(),Oe=0,Ue=1,me=2,ce=3,Pe=4,ke=5,mr=6,ct=7,gr=20,ut=21,yr=22,ai=23,gt=24,ge=25,ye=26,he=27,yt=31;function Ae(r){return typeof Buffer<"u"?Buffer.alloc(r):new Uint8Array(r)}var xt=Symbol("@smithy/core/cbor::tagSymbol");function wt(r){return r[xt]=!0,r}var ci=typeof TextDecoder<"u",hi=typeof Buffer<"u",O=Ae(0),oe=new DataView(O.buffer,O.byteOffset,O.byteLength),ur=ci?new TextDecoder:null,D=0;function li(r){O=r,oe=new DataView(O.buffer,O.byteOffset,O.byteLength)}function ae(r,t){if(r>=t)throw Error("unexpected end of (decode) payload.");let i=(O[r]&224)>>5,n=O[r]&31;switch(i){case Oe:case Ue:case mr:let l,c;if(n<24)l=n,c=1;else switch(n){case gt:case ge:case ye:case he:let d=wr[n],f=d+1;if(c=f,t-r<f)throw Error(`countLength ${d} greater than remaining buf len.`);let m=r+1;if(d===1)l=O[m];else if(d===2)l=oe.getUint16(m);else if(d===4)l=oe.getUint32(m);else l=oe.getBigUint64(m);break;default:throw Error(`unexpected minor value ${n}.`)}if(i===Oe)return D=c,ht(l);else if(i===Ue){let d;if(typeof l==="bigint")d=BigInt(-1)-l;else d=-1-l;return D=c,ht(d)}else if(n===2||n===3){let d=$e(r+c,t),f=BigInt(0),m=r+c+D;for(let w=m;w<m+d;++w)f=f<<BigInt(8)|BigInt(O[w]);return D=c+D+d,n===3?-f-BigInt(1):f}else if(n===4){let d=ae(r+c,t),[f,m]=d,w=m<0?-1:1,E="0".repeat(Math.abs(f)+1)+String(BigInt(w)*BigInt(m)),S,_=m<0?"-":"";if(S=f===0?E:E.slice(0,E.length+f)+"."+E.slice(f),S=S.replace(/^0+/g,""),S==="")S="0";if(S[0]===".")S="0"+S;return S=_+S,D=c+D,re.nv(S)}else{let d=ae(r+c,t);return D=c+D,wt({tag:ht(l),value:d})}case ce:case ke:case Pe:case me:if(n===yt)switch(i){case ce:return fi(r,t);case ke:return wi(r,t);case Pe:return yi(r,t);case me:return mi(r,t)}else switch(i){case ce:return pi(r,t);case ke:return xi(r,t);case Pe:return gi(r,t);case me:return Et(r,t)}default:return Ei(r,t)}}function xr(r,t,i){if(hi&&r.constructor?.name==="Buffer")return r.toString("utf-8",t,i);if(ur)return ur.decode(r.subarray(t,i));return re.toUtf8(r.subarray(t,i))}function ui(r){let t=Number(r);if(t<Number.MIN_SAFE_INTEGER||Number.MAX_SAFE_INTEGER<t)console.warn(Error(`@smithy/core/cbor - truncating BigInt(${r}) to ${t} with loss of precision.`));return t}var wr={[gt]:1,[ge]:2,[ye]:4,[he]:8};function di(r,t){let i=r>>7,n=(r&124)>>2,l=(r&3)<<8|t,c=i===0?1:-1,d,f;if(n===0)if(l===0)return 0;else d=Math.pow(2,-14),f=0;else if(n===31)if(l===0)return c*(1/0);else return NaN;else d=Math.pow(2,n-15),f=1;return f+=l/1024,c*(d*f)}function $e(r,t){let i=O[r]&31;if(i<24)return D=1,i;if(i===gt||i===ge||i===ye||i===he){let n=wr[i];if(D=n+1,t-r<D)throw Error(`countLength ${n} greater than remaining buf len.`);let l=r+1;if(n===1)return O[l];else if(n===2)return oe.getUint16(l);else if(n===4)return oe.getUint32(l);return ui(oe.getBigUint64(l))}throw Error(`unexpected minor value ${i}.`)}function pi(r,t){let i=$e(r,t),n=D;if(r+=n,t-r<i)throw Error(`string len ${i} greater than remaining buf len.`);let l=xr(O,r,r+i);return D=n+i,l}function fi(r,t){r+=1;let i=[];for(let n=r;r<t;){if(O[r]===255){let m=Ae(i.length);return m.set(i,0),D=r-n+2,xr(m,0,m.length)}let l=(O[r]&224)>>5,c=O[r]&31;if(l!==ce)throw Error(`unexpected major type ${l} in indefinite string.`);if(c===yt)throw Error("nested indefinite string.");let d=Et(r,t);r+=D;for(let m=0;m<d.length;++m)i.push(d[m])}throw Error("expected break marker.")}function Et(r,t){let i=$e(r,t),n=D;if(r+=n,t-r<i)throw Error(`unstructured byte string len ${i} greater than remaining buf len.`);let l=O.subarray(r,r+i);return D=n+i,l}function mi(r,t){r+=1;let i=[];for(let n=r;r<t;){if(O[r]===255){let m=Ae(i.length);return m.set(i,0),D=r-n+2,m}let l=(O[r]&224)>>5,c=O[r]&31;if(l!==me)throw Error(`unexpected major type ${l} in indefinite string.`);if(c===yt)throw Error("nested indefinite string.");let d=Et(r,t);r+=D;for(let m=0;m<d.length;++m)i.push(d[m])}throw Error("expected break marker.")}function gi(r,t){let i=$e(r,t),n=D;r+=n;let l=r,c=Array(i);for(let d=0;d<i;++d){let f=ae(r,t),m=D;c[d]=f,r+=m}return D=n+(r-l),c}function yi(r,t){r+=1;let i=[];for(let n=r;r<t;){if(O[r]===255)return D=r-n+2,i;let l=ae(r,t);r+=D,i.push(l)}throw Error("expected break marker.")}function xi(r,t){let i=$e(r,t),n=D;r+=n;let l=r,c={};for(let d=0;d<i;++d){if(r>=t)throw Error("unexpected end of map payload.");let f=(O[r]&224)>>5;if(f!==ce)throw Error(`unexpected major type ${f} for map key at index ${r}.`);let m=ae(r,t);r+=D;let w=ae(r,t);r+=D,c[m]=w}return D=n+(r-l),c}function wi(r,t){r+=1;let i=r,n={};for(;r<t;){if(r>=t)throw Error("unexpected end of map payload.");if(O[r]===255)return D=r-i+2,n;let l=(O[r]&224)>>5;if(l!==ce)throw Error(`unexpected major type ${l} for map key.`);let c=ae(r,t);r+=D;let d=ae(r,t);r+=D,n[c]=d}throw Error("expected break marker.")}function Ei(r,t){let i=O[r]&31;switch(i){case ut:case gr:return D=1,i===ut;case yr:return D=1,null;case ai:return D=1,null;case ge:if(t-r<3)throw Error("incomplete float16 at end of buf.");return D=3,di(O[r+1],O[r+2]);case ye:if(t-r<5)throw Error("incomplete float32 at end of buf.");return D=5,oe.getFloat32(r+1);case he:if(t-r<9)throw Error("incomplete float64 at end of buf.");return D=9,oe.getFloat64(r+1);default:throw Error(`unexpected minor value ${i}.`)}}function ht(r){if(typeof r==="number")return r;let t=Number(r);if(Number.MIN_SAFE_INTEGER<=t&&t<=Number.MAX_SAFE_INTEGER)return t;return r}var dr=typeof Buffer<"u",Ni=2048,$=Ae(Ni),ne=new DataView($.buffer,$.byteOffset,$.byteLength),C=0;function lt(r){if($.byteLength-C<r)if(C<16000000)dt(Math.max($.byteLength*4,$.byteLength+r));else dt($.byteLength+r+16000000)}function pr(){let r=Ae(C);return r.set($.subarray(0,C),0),C=0,r}function dt(r){let t=$;if($=Ae(r),t)if(t.copy)t.copy($,0,0,t.byteLength);else $.set(t,0);ne=new DataView($.buffer,$.byteOffset,$.byteLength)}function ie(r,t){if(t<24)$[C++]=r<<5|t;else if(t<256)$[C++]=r<<5|24,$[C++]=t;else if(t<65536)$[C++]=r<<5|ge,ne.setUint16(C,t),C+=2;else if(t<4294967296)$[C++]=r<<5|ye,ne.setUint32(C,t),C+=4;else $[C++]=r<<5|he,ne.setBigUint64(C,typeof t==="bigint"?t:BigInt(t)),C+=8}function Si(r){let t=[r];while(t.length){let i=t.pop();if(lt(typeof i==="string"?i.length*4:64),typeof i==="string"){if(dr)ie(ce,Buffer.byteLength(i)),C+=$.write(i,C);else{let n=re.fromUtf8(i);ie(ce,n.byteLength),$.set(n,C),C+=n.byteLength}continue}else if(typeof i==="number"){if(Number.isInteger(i)){let n=i>=0,l=n?Oe:Ue,c=n?i:-i-1;if(c<24)$[C++]=l<<5|c;else if(c<256)$[C++]=l<<5|24,$[C++]=c;else if(c<65536)$[C++]=l<<5|ge,$[C++]=c>>8,$[C++]=c;else if(c<4294967296)$[C++]=l<<5|ye,ne.setUint32(C,c),C+=4;else $[C++]=l<<5|he,ne.setBigUint64(C,BigInt(c)),C+=8;continue}$[C++]=ct<<5|he,ne.setFloat64(C,i),C+=8;continue}else if(typeof i==="bigint"){let n=i>=0,l=n?Oe:Ue,c=n?i:-i-BigInt(1),d=Number(c);if(d<24)$[C++]=l<<5|d;else if(d<256)$[C++]=l<<5|24,$[C++]=d;else if(d<65536)$[C++]=l<<5|ge,$[C++]=d>>8,$[C++]=d&255;else if(d<4294967296)$[C++]=l<<5|ye,ne.setUint32(C,d),C+=4;else if(c<BigInt("18446744073709551616"))$[C++]=l<<5|he,ne.setBigUint64(C,c),C+=8;else{let f=c.toString(2),m=new Uint8Array(Math.ceil(f.length/8)),w=c,E=0;while(m.byteLength-++E>=0)m[m.byteLength-E]=Number(w&BigInt(255)),w>>=BigInt(8);if(lt(m.byteLength*2),$[C++]=n?194:195,dr)ie(me,Buffer.byteLength(m));else ie(me,m.byteLength);$.set(m,C),C+=m.byteLength}continue}else if(i===null){$[C++]=ct<<5|yr;continue}else if(typeof i==="boolean"){$[C++]=ct<<5|(i?ut:gr);continue}else if(typeof i>"u")throw Error("@smithy/core/cbor: client may not serialize undefined value.");else if(Array.isArray(i)){for(let n=i.length-1;n>=0;--n)t.push(i[n]);ie(Pe,i.length);continue}else if(typeof i.byteLength==="number"){lt(i.length*2),ie(me,i.length),$.set(i,C),C+=i.byteLength;continue}else if(typeof i==="object"){if(i instanceof re.NumericValue){let l=i.string.indexOf("."),c=l===-1?0:l-i.string.length+1,d=BigInt(i.string.replace(".",""));$[C++]=196,t.push(d),t.push(c),ie(Pe,2);continue}if(i[xt])if("tag"in i&&"value"in i){t.push(i.value),ie(mr,i.tag);continue}else throw Error("tag encountered with missing fields, need 'tag' and 'value', found: "+JSON.stringify(i));let n=Object.keys(i);for(let l=n.length-1;l>=0;--l){let c=n[l];t.push(i[c]),t.push(c)}ie(ke,n.length);continue}throw Error(`data type ${i?.constructor?.name??typeof i} not compatible for encoding.`)}}var Ve={deserialize(r){return li(r),ae(0,r.length)},serialize(r){try{return Si(r),pr()}catch(t){throw pr(),t}},resizeEncodingBuffer(r){dt(r)}},Er=(r,t)=>{return _e.collectBody(r,t).then(async(i)=>{if(i.length)try{return Ve.deserialize(i)}catch(n){throw Object.defineProperty(n,"$responseBodyText",{value:t.utf8Encoder(i)}),n}return{}})},ze=(r)=>{return wt({tag:1,value:r.getTime()/1000})},bi=async(r,t)=>{let i=await Er(r,t);return i.message=i.message??i.Message,i},Nr=(r,t)=>{let i=(l)=>{let c=l;if(typeof c==="number")c=c.toString();if(c.indexOf(",")>=0)c=c.split(",")[0];if(c.indexOf(":")>=0)c=c.split(":")[0];if(c.indexOf("#")>=0)c=c.split("#")[1];return c};if(t.__type!==void 0)return i(t.__type);let n;for(let l in t)if(l.toLowerCase()==="code"){n=l;break}if(n&&t[n]!==void 0)return i(t[n])},_i=(r)=>{if(String(r.headers["smithy-protocol"]).toLowerCase()!=="rpc-v2-cbor")throw Error("Malformed RPCv2 CBOR response, status: "+r.statusCode)},Ai=async(r,t,i,n,l)=>{let c=await r.endpoint(),{hostname:d,protocol:f="https",port:m,path:w}=c,E={protocol:f,hostname:d,port:m,method:"POST",path:w.endsWith("/")?w.slice(0,-1)+i:w+i,headers:{...t}};if(n!==void 0)E.hostname=n;if(c.headers)for(let S in c.headers)E.headers[S]=c.headers[S];if(l!==void 0){E.body=l;try{E.headers["content-length"]=String(re.calculateBodyLength(l))}catch(S){}}return new _e.HttpRequest(E)};class Nt extends _e.SerdeContext{createSerializer(){let r=new St;return r.setSerdeContext(this.serdeContext),r}createDeserializer(){let r=new bt;return r.setSerdeContext(this.serdeContext),r}}class St extends _e.SerdeContext{value;write(r,t){this.value=this.serialize(r,t)}serialize(r,t){let i=be.NormalizedSchema.of(r);if(t==null){if(i.isIdempotencyToken())return re.generateIdempotencyToken();return t}if(i.isBlobSchema()){if(typeof t==="string")return(this.serdeContext?.base64Decoder??re.fromBase64)(t);return t}if(i.isTimestampSchema()){if(typeof t==="number"||typeof t==="bigint")return ze(new Date(Number(t)/1000|0));return ze(t)}if(typeof t==="function"||typeof t==="object"){let n=t;if(i.isListSchema()&&Array.isArray(n)){let c=!!i.getMergedTraits().sparse,d=[],f=0;for(let m of n){let w=this.serialize(i.getValueSchema(),m);if(w!=null||c)d[f++]=w}return d}if(n instanceof Date)return ze(n);let l={};if(i.isMapSchema()){let c=!!i.getMergedTraits().sparse;for(let d in n){let f=this.serialize(i.getValueSchema(),n[d]);if(f!=null||c)l[d]=f}}else if(i.isStructSchema()){for(let[d,f]of i.structIterator()){let m=this.serialize(f,n[d]);if(m!=null)l[d]=m}if(i.isUnionSchema()&&Array.isArray(n.$unknown)){let[d,f]=n.$unknown;l[d]=f}else if(typeof n.__type==="string"){for(let d in n)if(!(d in l))l[d]=this.serialize(15,n[d])}}else if(i.isDocumentSchema())for(let c in n)l[c]=this.serialize(i.getValueSchema(),n[c]);else if(i.isBigDecimalSchema())return n;return l}return t}flush(){let r=Ve.serialize(this.value);return this.value=void 0,r}}class bt extends _e.SerdeContext{read(r,t){let i=Ve.deserialize(t);return this.readValue(r,i)}readValue(r,t){let i=be.NormalizedSchema.of(r);if(i.isTimestampSchema()){if(typeof t==="number")return re._parseEpochTimestamp(t);if(typeof t==="object"){if(t.tag===1&&"value"in t)return re._parseEpochTimestamp(t.value)}}if(i.isBlobSchema()){if(typeof t==="string")return(this.serdeContext?.base64Decoder??re.fromBase64)(t);return t}if(typeof t>"u"||typeof t==="boolean"||typeof t==="number"||typeof t==="string"||typeof t==="bigint"||typeof t==="symbol")return t;else if(typeof t==="object"){if(t===null)return null;if("byteLength"in t)return t;if(t instanceof Date)return t;if(i.isDocumentSchema())return t;if(i.isListSchema()){let l=[],c=i.getValueSchema();for(let d of t){let f=this.readValue(c,d);l.push(f)}return l}let n={};if(i.isMapSchema()){let l=i.getValueSchema();for(let c in t){let d=this.readValue(l,t[c]);n[c]=d}}else if(i.isStructSchema()){let l=i.isUnionSchema(),c;if(l){c=new Set;for(let d in t)if(d!=="__type")c.add(d)}for(let[d,f]of i.structIterator()){if(l)c.delete(d);if(t[d]!=null)n[d]=this.readValue(f,t[d])}if(l&&c?.size===1){let d=!0;for(let f in n){d=!1;break}if(d){let f=c.values().next().value;n.$unknown=[f,t[f]]}}else if(typeof t.__type==="string"){for(let d in t)if(!(d in n))n[d]=t[d]}}else if(t instanceof re.NumericValue)return t;return n}else return t}}class Sr extends _e.RpcProtocol{codec=new Nt;serializer=this.codec.createSerializer();deserializer=this.codec.createDeserializer();constructor({defaultNamespace:r,errorTypeRegistries:t}){super({defaultNamespace:r,errorTypeRegistries:t})}getShapeId(){return"smithy.protocols#rpcv2Cbor"}getPayloadCodec(){return this.codec}async serializeRequest(r,t,i){let n=await super.serializeRequest(r,t,i);if(Object.assign(n.headers,{"content-type":this.getDefaultContentType(),"smithy-protocol":"rpc-v2-cbor",accept:this.getDefaultContentType()}),be.deref(r.input)==="unit")delete n.body,delete n.headers["content-type"];else{if(!n.body)this.serializer.write(15,{}),n.body=this.serializer.flush();try{n.headers["content-length"]=String(n.body.byteLength)}catch(f){}}let{service:l,operation:c}=oi.getSmithyContext(i),d=`/service/${l}/operation/${c}`;if(n.path.endsWith("/"))n.path+=d.slice(1);else n.path+=d;return n}async deserializeResponse(r,t,i){return super.deserializeResponse(r,t,i)}async handleError(r,t,i,n,l){let c=Nr(i,n)??"Unknown",d={$metadata:l,$fault:i.statusCode<=500?"client":"server"},f=this.options.defaultNamespace;if(c.includes("#"))[f]=c.split("#");let m=this.compositeErrorRegistry,w=be.TypeRegistry.for(f);m.copyFrom(w);let E;try{E=m.getSchema(c)}catch(V){if(n.Message)n.message=n.Message;let B=be.TypeRegistry.for("smithy.ts.sdk.synthetic."+f);m.copyFrom(B);let Z=m.getBaseException();if(Z){let L=m.getErrorCtor(Z);throw Object.assign(new L({name:c}),d,n)}throw Object.assign(Error(c),d,n)}let S=be.NormalizedSchema.of(E),_=m.getErrorCtor(E),A=n.message??n.Message??"Unknown",I=new _({}),P={};for(let[V,B]of S.structIterator())P[V]=this.deserializer.readValue(B,n[V]);throw Object.assign(I,d,{$fault:S.getMergedTraits().error,message:A},P)}getDefaultContentType(){return"application/cbor"}}Ti.CborCodec=Nt;Ti.CborShapeDeserializer=bt;Ti.CborShapeSerializer=St;Ti.SmithyRpcV2CborProtocol=Sr;Ti.buildHttpRpcRequest=Ai;Ti.cbor=Ve;Ti.checkCborResponse=_i;Ti.dateToTag=ze;Ti.loadSmithyRpcV2CborErrorCode=Nr;Ti.parseCborBody=Er;Ti.parseCborErrorBody=bi;Ti.tag=wt;Ti.tagSymbol=xt});var Ar=xe((vo,_r)=>{(()=>{var r={d:(e,s)=>{for(var o in s)r.o(s,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:s[o]})},o:(e,s)=>Object.prototype.hasOwnProperty.call(e,s),r:(e)=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};r.r(t),r.d(t,{XMLBuilder:()=>ii,XMLParser:()=>ir,XMLValidator:()=>ni});let i=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n=new RegExp("^["+i+"]["+i+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function l(e,s){let o=[],a=s.exec(e);for(;a;){let h=[];h.startIndex=s.lastIndex-a[0].length;let u=a.length;for(let x=0;x<u;x++)h.push(a[x]);o.push(h),a=s.exec(e)}return o}let c=function(e){return n.exec(e)!=null},d=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],f=["__proto__","constructor","prototype"],m={allowBooleanAttributes:!1,unpairedTags:[]};function w(e,s){s=Object.assign({},m,s);let o=[],a=!1,h=!1;e[0]==="\uFEFF"&&(e=e.substr(1));for(let u=0;u<e.length;u++)if(e[u]==="<"&&e[u+1]==="?"){if(u+=2,u=S(e,u),u.err)return u}else{if(e[u]!=="<"){if(E(e[u]))continue;return L("InvalidChar","char '"+e[u]+"' is not expected.",F(e,u))}{let x=u;if(u++,e[u]==="!"){u=_(e,u);continue}{let p=!1;e[u]==="/"&&(p=!0,u++);let y="";for(;u<e.length&&e[u]!==">"&&e[u]!==" "&&e[u]!=="\t"&&e[u]!==`
|
|
2
|
+
import{Qe as mt}from"./chunk-ec1bwa7f.js";import{Cf as fr,Df as pt,Gf as ft}from"./chunk-hcd0k14e.js";import{sP as xe}from"./chunk-0xf12tf3.js";var br=xe((Ti)=>{var re=ft(),_e=mt(),oi=pt(),be=fr(),Oe=0,Ue=1,me=2,ce=3,Pe=4,ke=5,mr=6,ct=7,gr=20,ut=21,yr=22,ai=23,gt=24,ge=25,ye=26,he=27,yt=31;function Ae(r){return typeof Buffer<"u"?Buffer.alloc(r):new Uint8Array(r)}var xt=Symbol("@smithy/core/cbor::tagSymbol");function wt(r){return r[xt]=!0,r}var ci=typeof TextDecoder<"u",hi=typeof Buffer<"u",O=Ae(0),oe=new DataView(O.buffer,O.byteOffset,O.byteLength),ur=ci?new TextDecoder:null,D=0;function li(r){O=r,oe=new DataView(O.buffer,O.byteOffset,O.byteLength)}function ae(r,t){if(r>=t)throw Error("unexpected end of (decode) payload.");let i=(O[r]&224)>>5,n=O[r]&31;switch(i){case Oe:case Ue:case mr:let l,c;if(n<24)l=n,c=1;else switch(n){case gt:case ge:case ye:case he:let d=wr[n],f=d+1;if(c=f,t-r<f)throw Error(`countLength ${d} greater than remaining buf len.`);let m=r+1;if(d===1)l=O[m];else if(d===2)l=oe.getUint16(m);else if(d===4)l=oe.getUint32(m);else l=oe.getBigUint64(m);break;default:throw Error(`unexpected minor value ${n}.`)}if(i===Oe)return D=c,ht(l);else if(i===Ue){let d;if(typeof l==="bigint")d=BigInt(-1)-l;else d=-1-l;return D=c,ht(d)}else if(n===2||n===3){let d=$e(r+c,t),f=BigInt(0),m=r+c+D;for(let w=m;w<m+d;++w)f=f<<BigInt(8)|BigInt(O[w]);return D=c+D+d,n===3?-f-BigInt(1):f}else if(n===4){let d=ae(r+c,t),[f,m]=d,w=m<0?-1:1,E="0".repeat(Math.abs(f)+1)+String(BigInt(w)*BigInt(m)),S,_=m<0?"-":"";if(S=f===0?E:E.slice(0,E.length+f)+"."+E.slice(f),S=S.replace(/^0+/g,""),S==="")S="0";if(S[0]===".")S="0"+S;return S=_+S,D=c+D,re.nv(S)}else{let d=ae(r+c,t);return D=c+D,wt({tag:ht(l),value:d})}case ce:case ke:case Pe:case me:if(n===yt)switch(i){case ce:return fi(r,t);case ke:return wi(r,t);case Pe:return yi(r,t);case me:return mi(r,t)}else switch(i){case ce:return pi(r,t);case ke:return xi(r,t);case Pe:return gi(r,t);case me:return Et(r,t)}default:return Ei(r,t)}}function xr(r,t,i){if(hi&&r.constructor?.name==="Buffer")return r.toString("utf-8",t,i);if(ur)return ur.decode(r.subarray(t,i));return re.toUtf8(r.subarray(t,i))}function ui(r){let t=Number(r);if(t<Number.MIN_SAFE_INTEGER||Number.MAX_SAFE_INTEGER<t)console.warn(Error(`@smithy/core/cbor - truncating BigInt(${r}) to ${t} with loss of precision.`));return t}var wr={[gt]:1,[ge]:2,[ye]:4,[he]:8};function di(r,t){let i=r>>7,n=(r&124)>>2,l=(r&3)<<8|t,c=i===0?1:-1,d,f;if(n===0)if(l===0)return 0;else d=Math.pow(2,-14),f=0;else if(n===31)if(l===0)return c*(1/0);else return NaN;else d=Math.pow(2,n-15),f=1;return f+=l/1024,c*(d*f)}function $e(r,t){let i=O[r]&31;if(i<24)return D=1,i;if(i===gt||i===ge||i===ye||i===he){let n=wr[i];if(D=n+1,t-r<D)throw Error(`countLength ${n} greater than remaining buf len.`);let l=r+1;if(n===1)return O[l];else if(n===2)return oe.getUint16(l);else if(n===4)return oe.getUint32(l);return ui(oe.getBigUint64(l))}throw Error(`unexpected minor value ${i}.`)}function pi(r,t){let i=$e(r,t),n=D;if(r+=n,t-r<i)throw Error(`string len ${i} greater than remaining buf len.`);let l=xr(O,r,r+i);return D=n+i,l}function fi(r,t){r+=1;let i=[];for(let n=r;r<t;){if(O[r]===255){let m=Ae(i.length);return m.set(i,0),D=r-n+2,xr(m,0,m.length)}let l=(O[r]&224)>>5,c=O[r]&31;if(l!==ce)throw Error(`unexpected major type ${l} in indefinite string.`);if(c===yt)throw Error("nested indefinite string.");let d=Et(r,t);r+=D;for(let m=0;m<d.length;++m)i.push(d[m])}throw Error("expected break marker.")}function Et(r,t){let i=$e(r,t),n=D;if(r+=n,t-r<i)throw Error(`unstructured byte string len ${i} greater than remaining buf len.`);let l=O.subarray(r,r+i);return D=n+i,l}function mi(r,t){r+=1;let i=[];for(let n=r;r<t;){if(O[r]===255){let m=Ae(i.length);return m.set(i,0),D=r-n+2,m}let l=(O[r]&224)>>5,c=O[r]&31;if(l!==me)throw Error(`unexpected major type ${l} in indefinite string.`);if(c===yt)throw Error("nested indefinite string.");let d=Et(r,t);r+=D;for(let m=0;m<d.length;++m)i.push(d[m])}throw Error("expected break marker.")}function gi(r,t){let i=$e(r,t),n=D;r+=n;let l=r,c=Array(i);for(let d=0;d<i;++d){let f=ae(r,t),m=D;c[d]=f,r+=m}return D=n+(r-l),c}function yi(r,t){r+=1;let i=[];for(let n=r;r<t;){if(O[r]===255)return D=r-n+2,i;let l=ae(r,t);r+=D,i.push(l)}throw Error("expected break marker.")}function xi(r,t){let i=$e(r,t),n=D;r+=n;let l=r,c={};for(let d=0;d<i;++d){if(r>=t)throw Error("unexpected end of map payload.");let f=(O[r]&224)>>5;if(f!==ce)throw Error(`unexpected major type ${f} for map key at index ${r}.`);let m=ae(r,t);r+=D;let w=ae(r,t);r+=D,c[m]=w}return D=n+(r-l),c}function wi(r,t){r+=1;let i=r,n={};for(;r<t;){if(r>=t)throw Error("unexpected end of map payload.");if(O[r]===255)return D=r-i+2,n;let l=(O[r]&224)>>5;if(l!==ce)throw Error(`unexpected major type ${l} for map key.`);let c=ae(r,t);r+=D;let d=ae(r,t);r+=D,n[c]=d}throw Error("expected break marker.")}function Ei(r,t){let i=O[r]&31;switch(i){case ut:case gr:return D=1,i===ut;case yr:return D=1,null;case ai:return D=1,null;case ge:if(t-r<3)throw Error("incomplete float16 at end of buf.");return D=3,di(O[r+1],O[r+2]);case ye:if(t-r<5)throw Error("incomplete float32 at end of buf.");return D=5,oe.getFloat32(r+1);case he:if(t-r<9)throw Error("incomplete float64 at end of buf.");return D=9,oe.getFloat64(r+1);default:throw Error(`unexpected minor value ${i}.`)}}function ht(r){if(typeof r==="number")return r;let t=Number(r);if(Number.MIN_SAFE_INTEGER<=t&&t<=Number.MAX_SAFE_INTEGER)return t;return r}var dr=typeof Buffer<"u",Ni=2048,$=Ae(Ni),ne=new DataView($.buffer,$.byteOffset,$.byteLength),C=0;function lt(r){if($.byteLength-C<r)if(C<16000000)dt(Math.max($.byteLength*4,$.byteLength+r));else dt($.byteLength+r+16000000)}function pr(){let r=Ae(C);return r.set($.subarray(0,C),0),C=0,r}function dt(r){let t=$;if($=Ae(r),t)if(t.copy)t.copy($,0,0,t.byteLength);else $.set(t,0);ne=new DataView($.buffer,$.byteOffset,$.byteLength)}function ie(r,t){if(t<24)$[C++]=r<<5|t;else if(t<256)$[C++]=r<<5|24,$[C++]=t;else if(t<65536)$[C++]=r<<5|ge,ne.setUint16(C,t),C+=2;else if(t<4294967296)$[C++]=r<<5|ye,ne.setUint32(C,t),C+=4;else $[C++]=r<<5|he,ne.setBigUint64(C,typeof t==="bigint"?t:BigInt(t)),C+=8}function Si(r){let t=[r];while(t.length){let i=t.pop();if(lt(typeof i==="string"?i.length*4:64),typeof i==="string"){if(dr)ie(ce,Buffer.byteLength(i)),C+=$.write(i,C);else{let n=re.fromUtf8(i);ie(ce,n.byteLength),$.set(n,C),C+=n.byteLength}continue}else if(typeof i==="number"){if(Number.isInteger(i)){let n=i>=0,l=n?Oe:Ue,c=n?i:-i-1;if(c<24)$[C++]=l<<5|c;else if(c<256)$[C++]=l<<5|24,$[C++]=c;else if(c<65536)$[C++]=l<<5|ge,$[C++]=c>>8,$[C++]=c;else if(c<4294967296)$[C++]=l<<5|ye,ne.setUint32(C,c),C+=4;else $[C++]=l<<5|he,ne.setBigUint64(C,BigInt(c)),C+=8;continue}$[C++]=ct<<5|he,ne.setFloat64(C,i),C+=8;continue}else if(typeof i==="bigint"){let n=i>=0,l=n?Oe:Ue,c=n?i:-i-BigInt(1),d=Number(c);if(d<24)$[C++]=l<<5|d;else if(d<256)$[C++]=l<<5|24,$[C++]=d;else if(d<65536)$[C++]=l<<5|ge,$[C++]=d>>8,$[C++]=d&255;else if(d<4294967296)$[C++]=l<<5|ye,ne.setUint32(C,d),C+=4;else if(c<BigInt("18446744073709551616"))$[C++]=l<<5|he,ne.setBigUint64(C,c),C+=8;else{let f=c.toString(2),m=new Uint8Array(Math.ceil(f.length/8)),w=c,E=0;while(m.byteLength-++E>=0)m[m.byteLength-E]=Number(w&BigInt(255)),w>>=BigInt(8);if(lt(m.byteLength*2),$[C++]=n?194:195,dr)ie(me,Buffer.byteLength(m));else ie(me,m.byteLength);$.set(m,C),C+=m.byteLength}continue}else if(i===null){$[C++]=ct<<5|yr;continue}else if(typeof i==="boolean"){$[C++]=ct<<5|(i?ut:gr);continue}else if(typeof i>"u")throw Error("@smithy/core/cbor: client may not serialize undefined value.");else if(Array.isArray(i)){for(let n=i.length-1;n>=0;--n)t.push(i[n]);ie(Pe,i.length);continue}else if(typeof i.byteLength==="number"){lt(i.length*2),ie(me,i.length),$.set(i,C),C+=i.byteLength;continue}else if(typeof i==="object"){if(i instanceof re.NumericValue){let l=i.string.indexOf("."),c=l===-1?0:l-i.string.length+1,d=BigInt(i.string.replace(".",""));$[C++]=196,t.push(d),t.push(c),ie(Pe,2);continue}if(i[xt])if("tag"in i&&"value"in i){t.push(i.value),ie(mr,i.tag);continue}else throw Error("tag encountered with missing fields, need 'tag' and 'value', found: "+JSON.stringify(i));let n=Object.keys(i);for(let l=n.length-1;l>=0;--l){let c=n[l];t.push(i[c]),t.push(c)}ie(ke,n.length);continue}throw Error(`data type ${i?.constructor?.name??typeof i} not compatible for encoding.`)}}var Ve={deserialize(r){return li(r),ae(0,r.length)},serialize(r){try{return Si(r),pr()}catch(t){throw pr(),t}},resizeEncodingBuffer(r){dt(r)}},Er=(r,t)=>{return _e.collectBody(r,t).then(async(i)=>{if(i.length)try{return Ve.deserialize(i)}catch(n){throw Object.defineProperty(n,"$responseBodyText",{value:t.utf8Encoder(i)}),n}return{}})},ze=(r)=>{return wt({tag:1,value:r.getTime()/1000})},bi=async(r,t)=>{let i=await Er(r,t);return i.message=i.message??i.Message,i},Nr=(r,t)=>{let i=(l)=>{let c=l;if(typeof c==="number")c=c.toString();if(c.indexOf(",")>=0)c=c.split(",")[0];if(c.indexOf(":")>=0)c=c.split(":")[0];if(c.indexOf("#")>=0)c=c.split("#")[1];return c};if(t.__type!==void 0)return i(t.__type);let n;for(let l in t)if(l.toLowerCase()==="code"){n=l;break}if(n&&t[n]!==void 0)return i(t[n])},_i=(r)=>{if(String(r.headers["smithy-protocol"]).toLowerCase()!=="rpc-v2-cbor")throw Error("Malformed RPCv2 CBOR response, status: "+r.statusCode)},Ai=async(r,t,i,n,l)=>{let c=await r.endpoint(),{hostname:d,protocol:f="https",port:m,path:w}=c,E={protocol:f,hostname:d,port:m,method:"POST",path:w.endsWith("/")?w.slice(0,-1)+i:w+i,headers:{...t}};if(n!==void 0)E.hostname=n;if(c.headers)for(let S in c.headers)E.headers[S]=c.headers[S];if(l!==void 0){E.body=l;try{E.headers["content-length"]=String(re.calculateBodyLength(l))}catch(S){}}return new _e.HttpRequest(E)};class Nt extends _e.SerdeContext{createSerializer(){let r=new St;return r.setSerdeContext(this.serdeContext),r}createDeserializer(){let r=new bt;return r.setSerdeContext(this.serdeContext),r}}class St extends _e.SerdeContext{value;write(r,t){this.value=this.serialize(r,t)}serialize(r,t){let i=be.NormalizedSchema.of(r);if(t==null){if(i.isIdempotencyToken())return re.generateIdempotencyToken();return t}if(i.isBlobSchema()){if(typeof t==="string")return(this.serdeContext?.base64Decoder??re.fromBase64)(t);return t}if(i.isTimestampSchema()){if(typeof t==="number"||typeof t==="bigint")return ze(new Date(Number(t)/1000|0));return ze(t)}if(typeof t==="function"||typeof t==="object"){let n=t;if(i.isListSchema()&&Array.isArray(n)){let c=!!i.getMergedTraits().sparse,d=[],f=0;for(let m of n){let w=this.serialize(i.getValueSchema(),m);if(w!=null||c)d[f++]=w}return d}if(n instanceof Date)return ze(n);let l={};if(i.isMapSchema()){let c=!!i.getMergedTraits().sparse;for(let d in n){let f=this.serialize(i.getValueSchema(),n[d]);if(f!=null||c)l[d]=f}}else if(i.isStructSchema()){for(let[d,f]of i.structIterator()){let m=this.serialize(f,n[d]);if(m!=null)l[d]=m}if(i.isUnionSchema()&&Array.isArray(n.$unknown)){let[d,f]=n.$unknown;l[d]=f}else if(typeof n.__type==="string"){for(let d in n)if(!(d in l))l[d]=this.serialize(15,n[d])}}else if(i.isDocumentSchema())for(let c in n)l[c]=this.serialize(i.getValueSchema(),n[c]);else if(i.isBigDecimalSchema())return n;return l}return t}flush(){let r=Ve.serialize(this.value);return this.value=void 0,r}}class bt extends _e.SerdeContext{read(r,t){let i=Ve.deserialize(t);return this.readValue(r,i)}readValue(r,t){let i=be.NormalizedSchema.of(r);if(i.isTimestampSchema()){if(typeof t==="number")return re._parseEpochTimestamp(t);if(typeof t==="object"){if(t.tag===1&&"value"in t)return re._parseEpochTimestamp(t.value)}}if(i.isBlobSchema()){if(typeof t==="string")return(this.serdeContext?.base64Decoder??re.fromBase64)(t);return t}if(typeof t>"u"||typeof t==="boolean"||typeof t==="number"||typeof t==="string"||typeof t==="bigint"||typeof t==="symbol")return t;else if(typeof t==="object"){if(t===null)return null;if("byteLength"in t)return t;if(t instanceof Date)return t;if(i.isDocumentSchema())return t;if(i.isListSchema()){let l=[],c=i.getValueSchema();for(let d of t){let f=this.readValue(c,d);l.push(f)}return l}let n={};if(i.isMapSchema()){let l=i.getValueSchema();for(let c in t){let d=this.readValue(l,t[c]);n[c]=d}}else if(i.isStructSchema()){let l=i.isUnionSchema(),c;if(l){c=new Set;for(let d in t)if(d!=="__type")c.add(d)}for(let[d,f]of i.structIterator()){if(l)c.delete(d);if(t[d]!=null)n[d]=this.readValue(f,t[d])}if(l&&c?.size===1){let d=!0;for(let f in n){d=!1;break}if(d){let f=c.values().next().value;n.$unknown=[f,t[f]]}}else if(typeof t.__type==="string"){for(let d in t)if(!(d in n))n[d]=t[d]}}else if(t instanceof re.NumericValue)return t;return n}else return t}}class Sr extends _e.RpcProtocol{codec=new Nt;serializer=this.codec.createSerializer();deserializer=this.codec.createDeserializer();constructor({defaultNamespace:r,errorTypeRegistries:t}){super({defaultNamespace:r,errorTypeRegistries:t})}getShapeId(){return"smithy.protocols#rpcv2Cbor"}getPayloadCodec(){return this.codec}async serializeRequest(r,t,i){let n=await super.serializeRequest(r,t,i);if(Object.assign(n.headers,{"content-type":this.getDefaultContentType(),"smithy-protocol":"rpc-v2-cbor",accept:this.getDefaultContentType()}),be.deref(r.input)==="unit")delete n.body,delete n.headers["content-type"];else{if(!n.body)this.serializer.write(15,{}),n.body=this.serializer.flush();try{n.headers["content-length"]=String(n.body.byteLength)}catch(f){}}let{service:l,operation:c}=oi.getSmithyContext(i),d=`/service/${l}/operation/${c}`;if(n.path.endsWith("/"))n.path+=d.slice(1);else n.path+=d;return n}async deserializeResponse(r,t,i){return super.deserializeResponse(r,t,i)}async handleError(r,t,i,n,l){let c=Nr(i,n)??"Unknown",d={$metadata:l,$fault:i.statusCode<=500?"client":"server"},f=this.options.defaultNamespace;if(c.includes("#"))[f]=c.split("#");let m=this.compositeErrorRegistry,w=be.TypeRegistry.for(f);m.copyFrom(w);let E;try{E=m.getSchema(c)}catch(V){if(n.Message)n.message=n.Message;let B=be.TypeRegistry.for("smithy.ts.sdk.synthetic."+f);m.copyFrom(B);let Z=m.getBaseException();if(Z){let L=m.getErrorCtor(Z);throw Object.assign(new L({name:c}),d,n)}throw Object.assign(Error(c),d,n)}let S=be.NormalizedSchema.of(E),_=m.getErrorCtor(E),A=n.message??n.Message??"Unknown",I=new _({}),P={};for(let[V,B]of S.structIterator())P[V]=this.deserializer.readValue(B,n[V]);throw Object.assign(I,d,{$fault:S.getMergedTraits().error,message:A},P)}getDefaultContentType(){return"application/cbor"}}Ti.CborCodec=Nt;Ti.CborShapeDeserializer=bt;Ti.CborShapeSerializer=St;Ti.SmithyRpcV2CborProtocol=Sr;Ti.buildHttpRpcRequest=Ai;Ti.cbor=Ve;Ti.checkCborResponse=_i;Ti.dateToTag=ze;Ti.loadSmithyRpcV2CborErrorCode=Nr;Ti.parseCborBody=Er;Ti.parseCborErrorBody=bi;Ti.tag=wt;Ti.tagSymbol=xt});var Ar=xe((vo,_r)=>{(()=>{var r={d:(e,s)=>{for(var o in s)r.o(s,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:s[o]})},o:(e,s)=>Object.prototype.hasOwnProperty.call(e,s),r:(e)=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};r.r(t),r.d(t,{XMLBuilder:()=>ii,XMLParser:()=>ir,XMLValidator:()=>ni});let i=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n=new RegExp("^["+i+"]["+i+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function l(e,s){let o=[],a=s.exec(e);for(;a;){let h=[];h.startIndex=s.lastIndex-a[0].length;let u=a.length;for(let x=0;x<u;x++)h.push(a[x]);o.push(h),a=s.exec(e)}return o}let c=function(e){return n.exec(e)!=null},d=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],f=["__proto__","constructor","prototype"],m={allowBooleanAttributes:!1,unpairedTags:[]};function w(e,s){s=Object.assign({},m,s);let o=[],a=!1,h=!1;e[0]==="\uFEFF"&&(e=e.substr(1));for(let u=0;u<e.length;u++)if(e[u]==="<"&&e[u+1]==="?"){if(u+=2,u=S(e,u),u.err)return u}else{if(e[u]!=="<"){if(E(e[u]))continue;return L("InvalidChar","char '"+e[u]+"' is not expected.",F(e,u))}{let x=u;if(u++,e[u]==="!"){u=_(e,u);continue}{let p=!1;e[u]==="/"&&(p=!0,u++);let y="";for(;u<e.length&&e[u]!==">"&&e[u]!==" "&&e[u]!=="\t"&&e[u]!==`
|
|
3
3
|
`&&e[u]!=="\r";u++)y+=e[u];if(y=y.trim(),y[y.length-1]==="/"&&(y=y.substring(0,y.length-1),u--),!Ye(y)){let b;return b=y.trim().length===0?"Invalid space after '<'.":"Tag '"+y+"' is an invalid name.",L("InvalidTag",b,F(e,u))}let g=P(e,u);if(g===!1)return L("InvalidAttr","Attributes for '"+y+"' have open quote.",F(e,u));let N=g.value;if(u=g.index,N[N.length-1]==="/"){let b=u-N.length;N=N.substring(0,N.length-1);let T=B(N,s);if(T!==!0)return L(T.err.code,T.err.msg,F(e,b+T.err.line));a=!0}else if(p){if(!g.tagClosed)return L("InvalidTag","Closing tag '"+y+"' doesn't have proper closing.",F(e,u));if(N.trim().length>0)return L("InvalidTag","Closing tag '"+y+"' can't have attributes or invalid starting.",F(e,x));if(o.length===0)return L("InvalidTag","Closing tag '"+y+"' has not been opened.",F(e,x));{let b=o.pop();if(y!==b.tagName){let T=F(e,b.tagStartPos);return L("InvalidTag","Expected closing tag '"+b.tagName+"' (opened in line "+T.line+", col "+T.col+") instead of closing tag '"+y+"'.",F(e,x))}o.length==0&&(h=!0)}}else{let b=B(N,s);if(b!==!0)return L(b.err.code,b.err.msg,F(e,u-N.length+b.err.line));if(h===!0)return L("InvalidXml","Multiple possible root nodes found.",F(e,u));s.unpairedTags.indexOf(y)!==-1||o.push({tagName:y,tagStartPos:x}),a=!0}for(u++;u<e.length;u++)if(e[u]==="<"){if(e[u+1]==="!"){u++,u=_(e,u);continue}if(e[u+1]!=="?")break;if(u=S(e,++u),u.err)return u}else if(e[u]==="&"){let b=Z(e,u);if(b==-1)return L("InvalidChar","char '&' is not expected.",F(e,u));u=b}else if(h===!0&&!E(e[u]))return L("InvalidXml","Extra text at the end",F(e,u));e[u]==="<"&&u--}}}return a?o.length==1?L("InvalidTag","Unclosed tag '"+o[0].tagName+"'.",F(e,o[0].tagStartPos)):!(o.length>0)||L("InvalidXml","Invalid '"+JSON.stringify(o.map((u)=>u.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):L("InvalidXml","Start tag expected.",1)}function E(e){return e===" "||e==="\t"||e===`
|
|
4
4
|
`||e==="\r"}function S(e,s){let o=s;for(;s<e.length;s++)if(e[s]=="?"||e[s]==" "){let a=e.substr(o,s-o);if(s>5&&a==="xml")return L("InvalidXml","XML declaration allowed only at the start of the document.",F(e,s));if(e[s]=="?"&&e[s+1]==">"){s++;break}continue}return s}function _(e,s){if(e.length>s+5&&e[s+1]==="-"&&e[s+2]==="-"){for(s+=3;s<e.length;s++)if(e[s]==="-"&&e[s+1]==="-"&&e[s+2]===">"){s+=2;break}}else if(e.length>s+8&&e[s+1]==="D"&&e[s+2]==="O"&&e[s+3]==="C"&&e[s+4]==="T"&&e[s+5]==="Y"&&e[s+6]==="P"&&e[s+7]==="E"){let o=1;for(s+=8;s<e.length;s++)if(e[s]==="<")o++;else if(e[s]===">"&&(o--,o===0))break}else if(e.length>s+9&&e[s+1]==="["&&e[s+2]==="C"&&e[s+3]==="D"&&e[s+4]==="A"&&e[s+5]==="T"&&e[s+6]==="A"&&e[s+7]==="["){for(s+=8;s<e.length;s++)if(e[s]==="]"&&e[s+1]==="]"&&e[s+2]===">"){s+=2;break}}return s}let A='"',I="'";function P(e,s){let o="",a="",h=!1;for(;s<e.length;s++){if(e[s]===A||e[s]===I)a===""?a=e[s]:a!==e[s]||(a="");else if(e[s]===">"&&a===""){h=!0;break}o+=e[s]}return a===""&&{value:o,index:s,tagClosed:h}}let V=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function B(e,s){let o=l(e,V),a={};for(let h=0;h<o.length;h++){if(o[h][1].length===0)return L("InvalidAttr","Attribute '"+o[h][2]+"' has no space in starting.",te(o[h]));if(o[h][3]!==void 0&&o[h][4]===void 0)return L("InvalidAttr","Attribute '"+o[h][2]+"' is without value.",te(o[h]));if(o[h][3]===void 0&&!s.allowBooleanAttributes)return L("InvalidAttr","boolean attribute '"+o[h][2]+"' is not allowed.",te(o[h]));let u=o[h][2];if(!ue(u))return L("InvalidAttr","Attribute '"+u+"' is an invalid name.",te(o[h]));if(Object.prototype.hasOwnProperty.call(a,u))return L("InvalidAttr","Attribute '"+u+"' is repeated.",te(o[h]));a[u]=1}return!0}function Z(e,s){if(e[++s]===";")return-1;if(e[s]==="#")return function(a,h){let u=/\d/;for(a[h]==="x"&&(h++,u=/[\da-fA-F]/);h<a.length;h++){if(a[h]===";")return h;if(!a[h].match(u))break}return-1}(e,++s);let o=0;for(;s<e.length;s++,o++)if(!(e[s].match(/\w/)&&o<20)){if(e[s]===";")break;return-1}return s}function L(e,s,o){return{err:{code:e,msg:s,line:o.line||o,col:o.col}}}function ue(e){return c(e)}function Ye(e){return c(e)}function F(e,s){let o=e.substring(0,s).split(/\r?\n/);return{line:o.length,col:o[o.length-1].length+1}}function te(e){return e.startIndex+e[1].length}let Qt=(e)=>d.includes(e)?"__"+e:e,Ns={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,s){return s},attributeValueProcessor:function(e,s){return s},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,entityDecoder:null,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,s,o){return e},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:Qt};function Ss(e,s){if(typeof e!="string")return;let o=e.toLowerCase();if(d.some((a)=>o===a.toLowerCase()))throw Error(`[SECURITY] Invalid ${s}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);if(f.some((a)=>o===a.toLowerCase()))throw Error(`[SECURITY] Invalid ${s}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`)}function Kt(e,s){return typeof e=="boolean"?{enabled:e,maxEntitySize:1e4,maxExpansionDepth:1e4,maxTotalExpansions:1/0,maxExpandedLength:1e5,maxEntityCount:1000,allowedTags:null,tagFilter:null,appliesTo:"all"}:typeof e=="object"&&e!==null?{enabled:e.enabled!==!1,maxEntitySize:Math.max(1,e.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,e.maxExpansionDepth??1e4),maxTotalExpansions:Math.max(1,e.maxTotalExpansions??1/0),maxExpandedLength:Math.max(1,e.maxExpandedLength??1e5),maxEntityCount:Math.max(1,e.maxEntityCount??1000),allowedTags:e.allowedTags??null,tagFilter:e.tagFilter??null,appliesTo:e.appliesTo??"all"}:Kt(!0)}let bs=function(e){let s=Object.assign({},Ns,e),o=[{value:s.attributeNamePrefix,name:"attributeNamePrefix"},{value:s.attributesGroupName,name:"attributesGroupName"},{value:s.textNodeName,name:"textNodeName"},{value:s.cdataPropName,name:"cdataPropName"},{value:s.commentPropName,name:"commentPropName"}];for(let{value:a,name:h}of o)a&&Ss(a,h);return s.onDangerousProperty===null&&(s.onDangerousProperty=Qt),s.processEntities=Kt(s.processEntities,s.htmlEntities),s.unpairedTagsSet=new Set(s.unpairedTags),s.stopNodes&&Array.isArray(s.stopNodes)&&(s.stopNodes=s.stopNodes.map((a)=>typeof a=="string"&&a.startsWith("*.")?".."+a.substring(2):a)),s},Ze;Ze=typeof Symbol!="function"?"@@xmlMetadata":Symbol("XML Node Metadata");class se{constructor(e){this.tagname=e,this.child=[],this[":@"]=Object.create(null)}add(e,s){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:s})}addChild(e,s){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),s!==void 0&&(this.child[this.child.length-1][Ze]={startIndex:s})}static getMetaDataSymbol(){return Ze}}class Gt{constructor(e){this.suppressValidationErr=!e,this.options=e}readDocType(e,s){let o=Object.create(null),a=0;if(e[s+3]!=="O"||e[s+4]!=="C"||e[s+5]!=="T"||e[s+6]!=="Y"||e[s+7]!=="P"||e[s+8]!=="E")throw Error("Invalid Tag instead of DOCTYPE");{s+=9;let h=1,u=!1,x=!1,p="";for(;s<e.length;s++)if(e[s]!=="<"||x)if(e[s]===">"){if(x?e[s-1]==="-"&&e[s-2]==="-"&&(x=!1,h--):h--,h===0)break}else e[s]==="["?u=!0:p+=e[s];else{if(u&&de(e,"!ENTITY",s)){let y,g;if(s+=7,[y,g,s]=this.readEntityExp(e,s+1,this.suppressValidationErr),g.indexOf("&")===-1){if(this.options.enabled!==!1&&this.options.maxEntityCount!=null&&a>=this.options.maxEntityCount)throw Error(`Entity count (${a+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);o[y]=g,a++}}else if(u&&de(e,"!ELEMENT",s)){s+=8;let{index:y}=this.readElementExp(e,s+1);s=y}else if(u&&de(e,"!ATTLIST",s))s+=8;else if(u&&de(e,"!NOTATION",s)){s+=9;let{index:y}=this.readNotationExp(e,s+1,this.suppressValidationErr);s=y}else{if(!de(e,"!--",s))throw Error("Invalid DOCTYPE");x=!0}h++,p=""}if(h!==0)throw Error("Unclosed DOCTYPE")}return{entities:o,i:s}}readEntityExp(e,s){let o=s=J(e,s);for(;s<e.length&&!/\s/.test(e[s])&&e[s]!=='"'&&e[s]!=="'";)s++;let a=e.substring(o,s);if(Re(a),s=J(e,s),!this.suppressValidationErr){if(e.substring(s,s+6).toUpperCase()==="SYSTEM")throw Error("External entities are not supported");if(e[s]==="%")throw Error("Parameter entities are not supported")}let h="";if([s,h]=this.readIdentifierVal(e,s,"entity"),this.options.enabled!==!1&&this.options.maxEntitySize!=null&&h.length>this.options.maxEntitySize)throw Error(`Entity "${a}" size (${h.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return[a,h,--s]}readNotationExp(e,s){let o=s=J(e,s);for(;s<e.length&&!/\s/.test(e[s]);)s++;let a=e.substring(o,s);!this.suppressValidationErr&&Re(a),s=J(e,s);let h=e.substring(s,s+6).toUpperCase();if(!this.suppressValidationErr&&h!=="SYSTEM"&&h!=="PUBLIC")throw Error(`Expected SYSTEM or PUBLIC, found "${h}"`);s+=h.length,s=J(e,s);let u=null,x=null;if(h==="PUBLIC")[s,u]=this.readIdentifierVal(e,s,"publicIdentifier"),e[s=J(e,s)]!=='"'&&e[s]!=="'"||([s,x]=this.readIdentifierVal(e,s,"systemIdentifier"));else if(h==="SYSTEM"&&([s,x]=this.readIdentifierVal(e,s,"systemIdentifier"),!this.suppressValidationErr&&!x))throw Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:a,publicIdentifier:u,systemIdentifier:x,index:--s}}readIdentifierVal(e,s,o){let a="",h=e[s];if(h!=='"'&&h!=="'")throw Error(`Expected quoted string, found "${h}"`);let u=++s;for(;s<e.length&&e[s]!==h;)s++;if(a=e.substring(u,s),e[s]!==h)throw Error(`Unterminated ${o} value`);return[++s,a]}readElementExp(e,s){let o=s=J(e,s);for(;s<e.length&&!/\s/.test(e[s]);)s++;let a=e.substring(o,s);if(!this.suppressValidationErr&&!c(a))throw Error(`Invalid element name: "${a}"`);let h="";if(e[s=J(e,s)]==="E"&&de(e,"MPTY",s))s+=4;else if(e[s]==="A"&&de(e,"NY",s))s+=2;else if(e[s]==="("){let u=++s;for(;s<e.length&&e[s]!==")";)s++;if(h=e.substring(u,s),e[s]!==")")throw Error("Unterminated content model")}else if(!this.suppressValidationErr)throw Error(`Invalid Element Expression, found "${e[s]}"`);return{elementName:a,contentModel:h.trim(),index:s}}readAttlistExp(e,s){let o=s=J(e,s);for(;s<e.length&&!/\s/.test(e[s]);)s++;let a=e.substring(o,s);for(Re(a),o=s=J(e,s);s<e.length&&!/\s/.test(e[s]);)s++;let h=e.substring(o,s);if(!Re(h))throw Error(`Invalid attribute name: "${h}"`);s=J(e,s);let u="";if(e.substring(s,s+8).toUpperCase()==="NOTATION"){if(u="NOTATION",e[s=J(e,s+=8)]!=="(")throw Error(`Expected '(', found "${e[s]}"`);s++;let p=[];for(;s<e.length&&e[s]!==")";){let y=s;for(;s<e.length&&e[s]!=="|"&&e[s]!==")";)s++;let g=e.substring(y,s);if(g=g.trim(),!Re(g))throw Error(`Invalid notation name: "${g}"`);p.push(g),e[s]==="|"&&(s++,s=J(e,s))}if(e[s]!==")")throw Error("Unterminated list of notations");s++,u+=" ("+p.join("|")+")"}else{let p=s;for(;s<e.length&&!/\s/.test(e[s]);)s++;u+=e.substring(p,s);let y=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!y.includes(u.toUpperCase()))throw Error(`Invalid attribute type: "${u}"`)}s=J(e,s);let x="";return e.substring(s,s+8).toUpperCase()==="#REQUIRED"?(x="#REQUIRED",s+=8):e.substring(s,s+7).toUpperCase()==="#IMPLIED"?(x="#IMPLIED",s+=7):[s,x]=this.readIdentifierVal(e,s,"ATTLIST"),{elementName:a,attributeName:h,attributeType:u,defaultValue:x,index:s}}}let J=(e,s)=>{for(;s<e.length&&/\s/.test(e[s]);)s++;return s};function de(e,s,o){for(let a=0;a<s.length;a++)if(s[a]!==e[o+a+1])return!1;return!0}function Re(e){if(c(e))return e;throw Error(`Invalid entity name ${e}`)}let _s=/^[-+]?0x[a-fA-F0-9]+$/,As=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Ts={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0,infinity:"original"},Cs=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;class Wt{constructor(e){this._matcher=e}get separator(){return this._matcher.separator}getCurrentTag(){let e=this._matcher.path;return e.length>0?e[e.length-1].tag:void 0}getCurrentNamespace(){let e=this._matcher.path;return e.length>0?e[e.length-1].namespace:void 0}getAttrValue(e){let s=this._matcher.path;if(s.length!==0)return s[s.length-1].values?.[e]}hasAttr(e){let s=this._matcher.path;if(s.length===0)return!1;let o=s[s.length-1];return o.values!==void 0&&e in o.values}getPosition(){let e=this._matcher.path;return e.length===0?-1:e[e.length-1].position??0}getCounter(){let e=this._matcher.path;return e.length===0?-1:e[e.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(e,s=!0){return this._matcher.toString(e,s)}toArray(){return this._matcher.path.map((e)=>e.tag)}matches(e){return this._matcher.matches(e)}matchesAny(e){return e.matchesAny(this._matcher)}}class De{constructor(e={}){this.separator=e.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new Wt(this)}push(e,s=null,o=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);let a=this.path.length;this.siblingStacks[a]||(this.siblingStacks[a]=new Map);let h=this.siblingStacks[a],u=o?`${o}:${e}`:e,x=h.get(u)||0,p=0;for(let g of h.values())p+=g;h.set(u,x+1);let y={tag:e,position:p,counter:x};o!=null&&(y.namespace=o),s!=null&&(y.values=s),this.path.push(y)}pop(){if(this.path.length===0)return;this._pathStringCache=null;let e=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),e}updateCurrent(e){if(this.path.length>0){let s=this.path[this.path.length-1];e!=null&&(s.values=e)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(e){if(this.path.length!==0)return this.path[this.path.length-1].values?.[e]}hasAttr(e){if(this.path.length===0)return!1;let s=this.path[this.path.length-1];return s.values!==void 0&&e in s.values}getPosition(){return this.path.length===0?-1:this.path[this.path.length-1].position??0}getCounter(){return this.path.length===0?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(e,s=!0){let o=e||this.separator;if(o===this.separator&&s===!0){if(this._pathStringCache!==null)return this._pathStringCache;let a=this.path.map((h)=>h.namespace?`${h.namespace}:${h.tag}`:h.tag).join(o);return this._pathStringCache=a,a}return this.path.map((a)=>s&&a.namespace?`${a.namespace}:${a.tag}`:a.tag).join(o)}toArray(){return this.path.map((e)=>e.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[]}matches(e){let s=e.segments;return s.length!==0&&(e.hasDeepWildcard()?this._matchWithDeepWildcard(s):this._matchSimple(s))}_matchSimple(e){if(this.path.length!==e.length)return!1;for(let s=0;s<e.length;s++)if(!this._matchSegment(e[s],this.path[s],s===this.path.length-1))return!1;return!0}_matchWithDeepWildcard(e){let s=this.path.length-1,o=e.length-1;for(;o>=0&&s>=0;){let a=e[o];if(a.type==="deep-wildcard"){if(o--,o<0)return!0;let h=e[o],u=!1;for(let x=s;x>=0;x--)if(this._matchSegment(h,this.path[x],x===this.path.length-1)){s=x-1,o--,u=!0;break}if(!u)return!1}else{if(!this._matchSegment(a,this.path[s],s===this.path.length-1))return!1;s--,o--}}return o<0}_matchSegment(e,s,o){if(e.tag!=="*"&&e.tag!==s.tag)return!1;if(e.namespace!==void 0&&e.namespace!=="*"&&e.namespace!==s.namespace)return!1;if(e.attrName!==void 0){if(!o)return!1;if(!s.values||!(e.attrName in s.values))return!1;if(e.attrValue!==void 0&&String(s.values[e.attrName])!==String(e.attrValue))return!1}if(e.position!==void 0){if(!o)return!1;let a=s.counter??0;if(e.position==="first"&&a!==0)return!1;if(e.position==="odd"&&a%2!=1)return!1;if(e.position==="even"&&a%2!=0)return!1;if(e.position==="nth"&&a!==e.positionValue)return!1}return!0}matchesAny(e){return e.matchesAny(this)}snapshot(){return{path:this.path.map((e)=>({...e})),siblingStacks:this.siblingStacks.map((e)=>new Map(e))}}restore(e){this._pathStringCache=null,this.path=e.path.map((s)=>({...s})),this.siblingStacks=e.siblingStacks.map((s)=>new Map(s))}readOnly(){return this._view}}class pe{constructor(e,s={},o){this.pattern=e,this.separator=s.separator||".",this.segments=this._parse(e),this.data=o,this._hasDeepWildcard=this.segments.some((a)=>a.type==="deep-wildcard"),this._hasAttributeCondition=this.segments.some((a)=>a.attrName!==void 0),this._hasPositionSelector=this.segments.some((a)=>a.position!==void 0)}_parse(e){let s=[],o=0,a="";for(;o<e.length;)e[o]===this.separator?o+1<e.length&&e[o+1]===this.separator?(a.trim()&&(s.push(this._parseSegment(a.trim())),a=""),s.push({type:"deep-wildcard"}),o+=2):(a.trim()&&s.push(this._parseSegment(a.trim())),a="",o++):(a+=e[o],o++);return a.trim()&&s.push(this._parseSegment(a.trim())),s}_parseSegment(e){let s={type:"tag"},o=null,a=e,h=e.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(h&&(a=h[1]+h[3],h[2])){let g=h[2].slice(1,-1);g&&(o=g)}let u,x,p=a;if(a.includes("::")){let g=a.indexOf("::");if(u=a.substring(0,g).trim(),p=a.substring(g+2).trim(),!u)throw Error(`Invalid namespace in pattern: ${e}`)}let y=null;if(p.includes(":")){let g=p.lastIndexOf(":"),N=p.substring(0,g).trim(),b=p.substring(g+1).trim();["first","last","odd","even"].includes(b)||/^nth\(\d+\)$/.test(b)?(x=N,y=b):x=p}else x=p;if(!x)throw Error(`Invalid segment pattern: ${e}`);if(s.tag=x,u&&(s.namespace=u),o)if(o.includes("=")){let g=o.indexOf("=");s.attrName=o.substring(0,g).trim(),s.attrValue=o.substring(g+1).trim()}else s.attrName=o.trim();if(y){let g=y.match(/^nth\((\d+)\)$/);g?(s.position="nth",s.positionValue=parseInt(g[1],10)):s.position=y}return s}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}class Jt{constructor(){this._byDepthAndTag=new Map,this._wildcardByDepth=new Map,this._deepWildcards=[],this._patterns=new Set,this._sealed=!1}add(e){if(this._sealed)throw TypeError("ExpressionSet is sealed. Create a new ExpressionSet to add more expressions.");if(this._patterns.has(e.pattern))return this;if(this._patterns.add(e.pattern),e.hasDeepWildcard())return this._deepWildcards.push(e),this;let s=e.length,o=e.segments[e.segments.length-1],a=o?.tag;if(a&&a!=="*"){let h=`${s}:${a}`;this._byDepthAndTag.has(h)||this._byDepthAndTag.set(h,[]),this._byDepthAndTag.get(h).push(e)}else this._wildcardByDepth.has(s)||this._wildcardByDepth.set(s,[]),this._wildcardByDepth.get(s).push(e);return this}addAll(e){for(let s of e)this.add(s);return this}has(e){return this._patterns.has(e.pattern)}get size(){return this._patterns.size}seal(){return this._sealed=!0,this}get isSealed(){return this._sealed}matchesAny(e){return this.findMatch(e)!==null}findMatch(e){let s=e.getDepth(),o=`${s}:${e.getCurrentTag()}`,a=this._byDepthAndTag.get(o);if(a){for(let u=0;u<a.length;u++)if(e.matches(a[u]))return a[u]}let h=this._wildcardByDepth.get(s);if(h){for(let u=0;u<h.length;u++)if(e.matches(h[u]))return h[u]}for(let u=0;u<this._deepWildcards.length;u++)if(e.matches(this._deepWildcards[u]))return this._deepWildcards[u];return null}}let Ms={cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",euro:"\u20AC",dollar:"$",euro:"\u20AC",fnof:"\u0192",inr:"\u20B9",af:"\u060B",birr:"\u1265\u122D",peso:"\u20B1",rub:"\u20BD",won:"\u20A9",yuan:"\xA5",cedil:"\xB8"},jt={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'},Rs={nbsp:"\xA0",copy:"\xA9",reg:"\xAE",trade:"\u2122",mdash:"\u2014",ndash:"\u2013",hellip:"\u2026",laquo:"\xAB",raquo:"\xBB",lsquo:"\u2018",rsquo:"\u2019",ldquo:"\u201C",rdquo:"\u201D",bull:"\u2022",para:"\xB6",sect:"\xA7",deg:"\xB0",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE"},Ps=new Set("!?\\\\/[]$%{}^&*()<>|+");function Yt(e){if(e[0]==="#")throw Error(`[EntityReplacer] Invalid character '#' in entity name: "${e}"`);for(let s of e)if(Ps.has(s))throw Error(`[EntityReplacer] Invalid character '${s}' in entity name: "${e}"`);return e}function et(...e){let s=Object.create(null);for(let o of e)if(o)for(let a of Object.keys(o)){let h=o[a];if(typeof h=="string")s[a]=h;else if(h&&typeof h=="object"&&h.val!==void 0){let u=h.val;typeof u=="string"&&(s[a]=u)}}return s}let fe="external",Le="base",tt="all",Y=Object.freeze({allow:0,leave:1,remove:2,throw:3}),$s=new Set([9,10,13]);class Zt{constructor(e={}){var s;this._limit=e.limit||{},this._maxTotalExpansions=this._limit.maxTotalExpansions||0,this._maxExpandedLength=this._limit.maxExpandedLength||0,this._postCheck=typeof e.postCheck=="function"?e.postCheck:(a)=>a,this._limitTiers=(s=this._limit.applyLimitsTo??fe)&&s!==fe?s===tt?new Set([tt]):s===Le?new Set([Le]):Array.isArray(s)?new Set(s):new Set([fe]):new Set([fe]),this._numericAllowed=e.numericAllowed??!0,this._baseMap=et(jt,e.namedEntities||null),this._externalMap=Object.create(null),this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this._removeSet=new Set(e.remove&&Array.isArray(e.remove)?e.remove:[]),this._leaveSet=new Set(e.leave&&Array.isArray(e.leave)?e.leave:[]);let o=function(a){if(!a)return{xmlVersion:1,onLevel:Y.allow,nullLevel:Y.remove};let h=a.xmlVersion===1.1?1.1:1,u=Y[a.onNCR]??Y.allow,x=Y[a.nullNCR]??Y.remove;return{xmlVersion:h,onLevel:u,nullLevel:Math.max(x,Y.remove)}}(e.ncr);this._ncrXmlVersion=o.xmlVersion,this._ncrOnLevel=o.onLevel,this._ncrNullLevel=o.nullLevel}setExternalEntities(e){if(e)for(let s of Object.keys(e))Yt(s);this._externalMap=et(e)}addExternalEntity(e,s){Yt(e),typeof s=="string"&&s.indexOf("&")===-1&&(this._externalMap[e]=s)}addInputEntities(e){this._totalExpansions=0,this._expandedLength=0,this._inputMap=et(e)}reset(){return this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this}setXmlVersion(e){this._ncrXmlVersion=e===1.1?1.1:1}decode(e){if(typeof e!="string"||e.length===0)return e;let s=e,o=[],a=e.length,h=0,u=0,x=this._maxTotalExpansions>0,p=this._maxExpandedLength>0,y=x||p;for(;u<a;){if(e.charCodeAt(u)!==38){u++;continue}let N=u+1;for(;N<a&&e.charCodeAt(N)!==59&&N-u<=32;)N++;if(N>=a||e.charCodeAt(N)!==59){u++;continue}let b=e.slice(u+1,N);if(b.length===0){u++;continue}let T,M;if(this._removeSet.has(b))T="",M===void 0&&(M=fe);else{if(this._leaveSet.has(b)){u++;continue}if(b.charCodeAt(0)===35){let R=this._resolveNCR(b);if(R===void 0){u++;continue}T=R,M=Le}else{let R=this._resolveName(b);T=R?.value,M=R?.tier}}if(T!==void 0){if(u>h&&o.push(e.slice(h,u)),o.push(T),h=N+1,u=h,y&&this._tierCounts(M)){if(x&&(this._totalExpansions++,this._totalExpansions>this._maxTotalExpansions))throw Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);if(p){let R=T.length-(b.length+2);if(R>0&&(this._expandedLength+=R,this._expandedLength>this._maxExpandedLength))throw Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`)}}}else u++}h<a&&o.push(e.slice(h));let g=o.length===0?e:o.join("");return this._postCheck(g,s)}_tierCounts(e){return!!this._limitTiers.has(tt)||this._limitTiers.has(e)}_resolveName(e){return e in this._inputMap?{value:this._inputMap[e],tier:fe}:(e in this._externalMap)?{value:this._externalMap[e],tier:fe}:(e in this._baseMap)?{value:this._baseMap[e],tier:Le}:void 0}_classifyNCR(e){return e===0?this._ncrNullLevel:e>=55296&&e<=57343||this._ncrXmlVersion===1&&e>=1&&e<=31&&!$s.has(e)?Y.remove:-1}_applyNCRAction(e,s,o){switch(e){case Y.allow:return String.fromCodePoint(o);case Y.remove:return"";case Y.leave:return;case Y.throw:throw Error(`[EntityDecoder] Prohibited numeric character reference &${s}; (U+${o.toString(16).toUpperCase().padStart(4,"0")})`);default:return String.fromCodePoint(o)}}_resolveNCR(e){let s=e.charCodeAt(1),o;if(o=s===120||s===88?parseInt(e.slice(2),16):parseInt(e.slice(1),10),Number.isNaN(o)||o<0||o>1114111)return;let a=this._classifyNCR(o);if(!this._numericAllowed&&a<Y.remove)return;let h=a===-1?this._ncrOnLevel:Math.max(this._ncrOnLevel,a);return this._applyNCRAction(h,e,o)}}function Is(e,s){if(!e)return{};let o=s.attributesGroupName?e[s.attributesGroupName]:e;if(!o)return{};let a={};for(let h in o)h.startsWith(s.attributeNamePrefix)?a[h.substring(s.attributeNamePrefix.length)]=o[h]:a[h]=o[h];return a}function Ds(e){if(!e||typeof e!="string")return;let s=e.indexOf(":");if(s!==-1&&s>0){let o=e.substring(0,s);if(o!=="xmlns")return o}}class er{constructor(e,s){var o;this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.parseXml=Us,this.parseTextData=Ls,this.resolveNameSpace=ks,this.buildAttributesMap=Os,this.isItStopNode=vs,this.replaceEntitiesValue=Bs,this.readStopNodeData=Hs,this.saveTextToParentTag=Xs,this.addChild=Vs,this.ignoreAttributesFn=typeof(o=this.options.ignoreAttributes)=="function"?o:Array.isArray(o)?(u)=>{for(let x of o){if(typeof x=="string"&&u===x)return!0;if(x instanceof RegExp&&x.test(u))return!0}}:()=>!1,this.entityExpansionCount=0,this.currentExpandedLength=0;let a={...jt};this.options.entityDecoder?this.entityDecoder=this.options.entityDecoder:(typeof this.options.htmlEntities=="object"?a=this.options.htmlEntities:this.options.htmlEntities===!0&&(a={...Rs,...Ms}),this.entityDecoder=new Zt({namedEntities:{...a,...s},numericAllowed:this.options.htmlEntities,limit:{maxTotalExpansions:this.options.processEntities.maxTotalExpansions,maxExpandedLength:this.options.processEntities.maxExpandedLength,applyLimitsTo:this.options.processEntities.appliesTo}})),this.matcher=new De,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.stopNodeExpressionsSet=new Jt;let h=this.options.stopNodes;if(h&&h.length>0){for(let u=0;u<h.length;u++){let x=h[u];typeof x=="string"?this.stopNodeExpressionsSet.add(new pe(x)):x instanceof pe&&this.stopNodeExpressionsSet.add(x)}this.stopNodeExpressionsSet.seal()}}}function Ls(e,s,o,a,h,u,x){let p=this.options;if(e!==void 0&&(p.trimValues&&!a&&(e=e.trim()),e.length>0)){x||(e=this.replaceEntitiesValue(e,s,o));let y=p.jPath?o.toString():o,g=p.tagValueProcessor(s,e,y,h,u);return g==null?e:typeof g!=typeof e||g!==e?g:p.trimValues||e.trim()===e?tr(e,p.parseTagValue,p.numberParseOptions):e}}function ks(e){if(this.options.removeNSPrefix){let s=e.split(":"),o=e.charAt(0)==="/"?"/":"";if(s[0]==="xmlns")return"";s.length===2&&(e=o+s[1])}return e}let zs=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Os(e,s,o,a=!1){let h=this.options;if(a===!0||h.ignoreAttributes!==!0&&typeof e=="string"){let u=l(e,zs),x=u.length,p={},y=Array(x),g=!1,N={};for(let M=0;M<x;M++){let R=this.resolveNameSpace(u[M][1]),z=u[M][4];if(R.length&&z!==void 0){let v=z;h.trimValues&&(v=v.trim()),v=this.replaceEntitiesValue(v,o,this.readonlyMatcher),y[M]=v,N[R]=v,g=!0}}g&&typeof s=="object"&&s.updateCurrent&&s.updateCurrent(N);let b=h.jPath?s.toString():this.readonlyMatcher,T=!1;for(let M=0;M<x;M++){let R=this.resolveNameSpace(u[M][1]);if(this.ignoreAttributesFn(R,b))continue;let z=h.attributeNamePrefix+R;if(R.length)if(h.transformAttributeName&&(z=h.transformAttributeName(z)),z=rr(z,h),u[M][4]!==void 0){let v=y[M],K=h.attributeValueProcessor(R,v,b);p[z]=K==null?v:typeof K!=typeof v||K!==v?K:tr(v,h.parseAttributeValue,h.numberParseOptions),T=!0}else h.allowBooleanAttributes&&(p[z]=!0,T=!0)}if(!T)return;if(h.attributesGroupName&&!h.preserveOrder){let M={};return M[h.attributesGroupName]=p,M}return p}}let Us=function(e){e=e.replace(/\r\n?/g,`
|
|
5
5
|
`);let s=new se("!xml"),o=s,a="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let h=this.options,u=new Gt(h.processEntities),x=e.length;for(let p=0;p<x;p++)if(e[p]==="<"){let y=e.charCodeAt(p+1);if(y===47){let g=Ee(e,">",p,"Closing Tag is not closed."),N=e.substring(p+2,g).trim();if(h.removeNSPrefix){let T=N.indexOf(":");T!==-1&&(N=N.substr(T+1))}N=st(h.transformTagName,N,"",h).tagName,o&&(a=this.saveTextToParentTag(a,o,this.readonlyMatcher));let b=this.matcher.getCurrentTag();if(N&&h.unpairedTagsSet.has(N))throw Error(`Unpaired tag can not be used as closing tag: </${N}>`);b&&h.unpairedTagsSet.has(b)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,o=this.tagsNodeStack.pop(),a="",p=g}else if(y===63){let g=rt(e,p,!1,"?>");if(!g)throw Error("Pi Tag is not closed.");a=this.saveTextToParentTag(a,o,this.readonlyMatcher);let N=this.buildAttributesMap(g.tagExp,this.matcher,g.tagName,!0);if(N){let b=N[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(b)||1)}if(h.ignoreDeclaration&&g.tagName==="?xml"||h.ignorePiTags);else{let b=new se(g.tagName);b.add(h.textNodeName,""),g.tagName!==g.tagExp&&g.attrExpPresent&&h.ignoreAttributes!==!0&&(b[":@"]=N),this.addChild(o,b,this.readonlyMatcher,p)}p=g.closeIndex+1}else if(y===33&&e.charCodeAt(p+2)===45&&e.charCodeAt(p+3)===45){let g=Ee(e,"-->",p+4,"Comment is not closed.");if(h.commentPropName){let N=e.substring(p+4,g-2);a=this.saveTextToParentTag(a,o,this.readonlyMatcher),o.add(h.commentPropName,[{[h.textNodeName]:N}])}p=g}else if(y===33&&e.charCodeAt(p+2)===68){let g=u.readDocType(e,p);this.entityDecoder.addInputEntities(g.entities),p=g.i}else if(y===33&&e.charCodeAt(p+2)===91){let g=Ee(e,"]]>",p,"CDATA is not closed.")-2,N=e.substring(p+9,g);a=this.saveTextToParentTag(a,o,this.readonlyMatcher);let b=this.parseTextData(N,o.tagname,this.readonlyMatcher,!0,!1,!0,!0);b==null&&(b=""),h.cdataPropName?o.add(h.cdataPropName,[{[h.textNodeName]:N}]):o.add(h.textNodeName,b),p=g+2}else{let g=rt(e,p,h.removeNSPrefix);if(!g){let X=e.substring(Math.max(0,p-50),Math.min(x,p+50));throw Error(`readTagExp returned undefined at position ${p}. Context: "${X}"`)}let{tagName:N,rawTagName:b,tagExp:T,attrExpPresent:M,closeIndex:R}=g;if({tagName:N,tagExp:T}=st(h.transformTagName,N,T,h),h.strictReservedNames&&(N===h.commentPropName||N===h.cdataPropName||N===h.textNodeName||N===h.attributesGroupName))throw Error(`Invalid tag name: ${N}`);o&&a&&o.tagname!=="!xml"&&(a=this.saveTextToParentTag(a,o,this.readonlyMatcher,!1));let z=o;z&&h.unpairedTagsSet.has(z.tagname)&&(o=this.tagsNodeStack.pop(),this.matcher.pop());let v=!1;T.length>0&&T.lastIndexOf("/")===T.length-1&&(v=!0,N[N.length-1]==="/"?(N=N.substr(0,N.length-1),T=N):T=T.substr(0,T.length-1),M=N!==T);let K,q=null,Se={};K=Ds(b),N!==s.tagname&&this.matcher.push(N,{},K),N!==T&&M&&(q=this.buildAttributesMap(T,this.matcher,N),q&&(Se=Is(q,h))),N!==s.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let G=p;if(this.isCurrentNodeStopNode){let X="";if(v)p=g.closeIndex;else if(h.unpairedTagsSet.has(N))p=g.closeIndex;else{let at=this.readStopNodeData(e,b,R+1);if(!at)throw Error(`Unexpected end of ${b}`);p=at.i,X=at.tagContent}let ot=new se(N);q&&(ot[":@"]=q),ot.add(h.textNodeName,X),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(o,ot,this.readonlyMatcher,G)}else{if(v){({tagName:N,tagExp:T}=st(h.transformTagName,N,T,h));let X=new se(N);q&&(X[":@"]=q),this.addChild(o,X,this.readonlyMatcher,G),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else{if(h.unpairedTagsSet.has(N)){let X=new se(N);q&&(X[":@"]=q),this.addChild(o,X,this.readonlyMatcher,G),this.matcher.pop(),this.isCurrentNodeStopNode=!1,p=g.closeIndex;continue}{let X=new se(N);if(this.tagsNodeStack.length>h.maxNestedTags)throw Error("Maximum nested tags exceeded");this.tagsNodeStack.push(o),q&&(X[":@"]=q),this.addChild(o,X,this.readonlyMatcher,G),o=X}}a="",p=R}}}else a+=e[p];return s.child};function Vs(e,s,o,a){this.options.captureMetaData||(a=void 0);let h=this.options.jPath?o.toString():o,u=this.options.updateTag(s.tagname,h,s[":@"]);u===!1||(typeof u=="string"?(s.tagname=u,e.addChild(s,a)):e.addChild(s,a))}function Bs(e,s,o){let a=this.options.processEntities;if(!a||!a.enabled)return e;if(a.allowedTags){let h=this.options.jPath?o.toString():o;if(!(Array.isArray(a.allowedTags)?a.allowedTags.includes(s):a.allowedTags(s,h)))return e}if(a.tagFilter){let h=this.options.jPath?o.toString():o;if(!a.tagFilter(s,h))return e}return this.entityDecoder.decode(e)}function Xs(e,s,o,a){return e&&(a===void 0&&(a=s.child.length===0),(e=this.parseTextData(e,s.tagname,o,!1,!!s[":@"]&&Object.keys(s[":@"]).length!==0,a))!==void 0&&e!==""&&s.add(this.options.textNodeName,e),e=""),e}function vs(){return this.stopNodeExpressionsSet.size!==0&&this.matcher.matchesAny(this.stopNodeExpressionsSet)}function Ee(e,s,o,a){let h=e.indexOf(s,o);if(h===-1)throw Error(a);return h+s.length-1}function Fs(e,s,o,a){let h=e.indexOf(s,o);if(h===-1)throw Error(a);return h}function rt(e,s,o,a=">"){let h=function(b,T,M=">"){let R=0,z=b.length,v=M.charCodeAt(0),K=M.length>1?M.charCodeAt(1):-1,q="",Se=T;for(let G=T;G<z;G++){let X=b.charCodeAt(G);if(R)X===R&&(R=0);else if(X===34||X===39)R=X;else if(X===v){if(K===-1)return q+=b.substring(Se,G),{data:q,index:G};if(b.charCodeAt(G+1)===K)return q+=b.substring(Se,G),{data:q,index:G}}else X!==9||R||(q+=b.substring(Se,G)+" ",Se=G+1)}}(e,s+1,a);if(!h)return;let{data:u,index:x}=h,p=u.search(/\s/),y=u,g=!0;p!==-1&&(y=u.substring(0,p),u=u.substring(p+1).trimStart());let N=y;if(o){let b=y.indexOf(":");b!==-1&&(y=y.substr(b+1),g=y!==h.data.substr(b+1))}return{tagName:y,tagExp:u,closeIndex:x,attrExpPresent:g,rawTagName:N}}function Hs(e,s,o){let a=o,h=1,u=e.length;for(;o<u;o++)if(e[o]==="<"){let x=e.charCodeAt(o+1);if(x===47){let p=Fs(e,">",o,`${s} is not closed`);if(e.substring(o+2,p).trim()===s&&(h--,h===0))return{tagContent:e.substring(a,o),i:p};o=p}else if(x===63)o=Ee(e,"?>",o+1,"StopNode is not closed.");else if(x===33&&e.charCodeAt(o+2)===45&&e.charCodeAt(o+3)===45)o=Ee(e,"-->",o+3,"StopNode is not closed.");else if(x===33&&e.charCodeAt(o+2)===91)o=Ee(e,"]]>",o,"StopNode is not closed.")-2;else{let p=rt(e,o,!1);p&&((p&&p.tagName)===s&&p.tagExp[p.tagExp.length-1]!=="/"&&h++,o=p.closeIndex)}}}function tr(e,s,o){if(s&&typeof e=="string"){let a=e.trim();return a==="true"||a!=="false"&&function(h,u={}){if(u=Object.assign({},Ts,u),!h||typeof h!="string")return h;let x=h.trim();if(x.length===0)return h;if(u.skipLike!==void 0&&u.skipLike.test(x))return h;if(x==="0")return 0;if(u.hex&&_s.test(x))return function(y){if(parseInt)return parseInt(y,16);if(Number.parseInt)return Number.parseInt(y,16);if(window&&window.parseInt)return window.parseInt(y,16);throw Error("parseInt, Number.parseInt, window.parseInt are not supported")}(x);if(isFinite(x)){if(x.includes("e")||x.includes("E"))return function(y,g,N){if(!N.eNotation)return y;let b=g.match(Cs);if(b){let T=b[1]||"",M=b[3].indexOf("e")===-1?"E":"e",R=b[2],z=T?y[R.length+1]===M:y[R.length]===M;return R.length>1&&z?y:(R.length!==1||!b[3].startsWith(`.${M}`)&&b[3][0]!==M)&&R.length>0?N.leadingZeros&&!z?(g=(b[1]||"")+b[3],Number(g)):y:Number(g)}return y}(h,x,u);{let y=As.exec(x);if(y){let g=y[1]||"",N=y[2],b=(p=y[3])&&p.indexOf(".")!==-1?((p=p.replace(/0+$/,""))==="."?p="0":p[0]==="."?p="0"+p:p[p.length-1]==="."&&(p=p.substring(0,p.length-1)),p):p,T=g?h[N.length+1]===".":h[N.length]===".";if(!u.leadingZeros&&(N.length>1||N.length===1&&!T))return h;{let M=Number(x),R=String(M);if(M===0)return M;if(R.search(/[eE]/)!==-1)return u.eNotation?M:h;if(x.indexOf(".")!==-1)return R==="0"||R===b||R===`${g}${b}`?M:h;let z=N?b:x;return N?z===R||g+z===R?M:h:z===R||z===g+R?M:h}}return h}}var p;return function(y,g,N){let b=g===1/0;switch(N.infinity.toLowerCase()){case"null":return null;case"infinity":return g;case"string":return b?"Infinity":"-Infinity";default:return y}}(h,Number(x),u)}(e,o)}return e!==void 0?e:""}function st(e,s,o,a){if(e){let h=e(s);o===s&&(o=h),s=h}return{tagName:s=rr(s,a),tagExp:o}}function rr(e,s){if(f.includes(e))throw Error(`[SECURITY] Invalid name: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);return d.includes(e)?s.onDangerousProperty(e):e}let it=se.getMetaDataSymbol();function qs(e,s){if(!e||typeof e!="object")return{};if(!s)return e;let o={};for(let a in e)a.startsWith(s)?o[a.substring(s.length)]=e[a]:o[a]=e[a];return o}function Qs(e,s,o,a){return sr(e,s,o,a)}function sr(e,s,o,a){let h,u={};for(let x=0;x<e.length;x++){let p=e[x],y=Ks(p);if(y!==void 0&&y!==s.textNodeName){let g=qs(p[":@"]||{},s.attributeNamePrefix);o.push(y,g)}if(y===s.textNodeName)h===void 0?h=p[y]:h+=""+p[y];else{if(y===void 0)continue;if(p[y]){let g=sr(p[y],s,o,a),N=Ws(g,s);if(Object.keys(g).length===0&&s.alwaysCreateTextNode&&(g[s.textNodeName]=""),p[":@"]?Gs(g,p[":@"],a,s):Object.keys(g).length!==1||g[s.textNodeName]===void 0||s.alwaysCreateTextNode?Object.keys(g).length===0&&(s.alwaysCreateTextNode?g[s.textNodeName]="":g=""):g=g[s.textNodeName],p[it]!==void 0&&typeof g=="object"&&g!==null&&(g[it]=p[it]),u[y]!==void 0&&Object.prototype.hasOwnProperty.call(u,y))Array.isArray(u[y])||(u[y]=[u[y]]),u[y].push(g);else{let b=s.jPath?a.toString():a;s.isArray(y,b,N)?u[y]=[g]:u[y]=g}y!==void 0&&y!==s.textNodeName&&o.pop()}}}return typeof h=="string"?h.length>0&&(u[s.textNodeName]=h):h!==void 0&&(u[s.textNodeName]=h),u}function Ks(e){let s=Object.keys(e);for(let o=0;o<s.length;o++){let a=s[o];if(a!==":@")return a}}function Gs(e,s,o,a){if(s){let h=Object.keys(s),u=h.length;for(let x=0;x<u;x++){let p=h[x],y=p.startsWith(a.attributeNamePrefix)?p.substring(a.attributeNamePrefix.length):p,g=a.jPath?o.toString()+"."+y:o;a.isArray(p,g,!0,!0)?e[p]=[s[p]]:e[p]=s[p]}}}function Ws(e,s){let{textNodeName:o}=s,a=Object.keys(e).length;return a===0||!(a!==1||!e[o]&&typeof e[o]!="boolean"&&e[o]!==0)}class ir{constructor(e){this.externalEntities={},this.options=bs(e)}parse(e,s){if(typeof e!="string"&&e.toString)e=e.toString();else if(typeof e!="string")throw Error("XML data is accepted in String or Bytes[] form.");if(s){s===!0&&(s={});let h=w(e,s);if(h!==!0)throw Error(`${h.err.msg}:${h.err.line}:${h.err.col}`)}let o=new er(this.options,this.externalEntities),a=o.parseXml(e);return this.options.preserveOrder||a===void 0?a:Qs(a,this.options,o.matcher,o.readonlyMatcher)}addEntity(e,s){if(s.indexOf("&")!==-1)throw Error("Entity value can't have '&'");if(e.indexOf("&")!==-1||e.indexOf(";")!==-1)throw Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if(s==="&")throw Error("An entity with value '&' is not permitted");this.externalEntities[e]=s}static getMetaDataSymbol(){return se.getMetaDataSymbol()}}function nr(e){return String(e).replace(/--/g,"- -").replace(/--/g,"- -").replace(/-$/,"- ")}function or(e){return String(e).replace(/\]\]>/g,"]]]]><![CDATA[>")}function Ne(e){return String(e).replace(/"/g,""").replace(/'/g,"'")}function Js(e,s){let o="";s.format&&s.indentBy.length>0&&(o=`
|
|
@@ -18,4 +18,4 @@ ${r}
|
|
|
18
18
|
${t}
|
|
19
19
|
${Q.toHex(c)}`}getCanonicalPath({path:r}){if(this.uriEscapePath){let t=[];for(let l of r.split("/")){if(l?.length===0)continue;if(l===".")continue;if(l==="..")t.pop();else t.push(l)}let i=`${r?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&r?.endsWith("/")?"/":""}`;return Me.escapeUri(i).replace(/%2F/g,"/")}return r}validateResolvedCredentials(r){if(typeof r!=="object"||typeof r.accessKeyId!=="string"||typeof r.secretAccessKey!=="string")throw Error("Resolved credential object is not valid")}formatDate(r){let t=Wn(r).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(r){return Object.keys(r).sort().join(";")}}var Ce={},Ge=[],We=(r,t,i)=>`${r}/${t}/${i}/${Ht}`,ys=async(r,t,i,n,l)=>{let c=await Zr(r,t.secretAccessKey,t.accessKeyId),d=`${i}:${n}:${l}:${Q.toHex(c)}:${t.sessionToken}`;if(d in Ce)return Ce[d];Ge.push(d);while(Ge.length>fs)delete Ce[Ge.shift()];let f=`AWS4${t.secretAccessKey}`;for(let m of[i,n,l,Ht])f=await Zr(r,f,m);return Ce[d]=f},jn=()=>{Ge.length=0,Object.keys(Ce).forEach((r)=>{delete Ce[r]})},Zr=(r,t,i)=>{let n=new r(t);return n.update(Q.toUint8Array(i)),n.digest()},zt=({headers:r},t,i)=>{let n={};for(let l of Object.keys(r).sort()){if(r[l]==null)continue;let c=l.toLowerCase();if(c in hs||t?.has(c)||ls.test(c)||us.test(c)){if(!i||i&&!i.has(c))continue}n[c]=r[l].trim().replace(/\s+/g," ")}return n},Je=async({headers:r,body:t},i)=>{for(let n of Object.keys(r))if(n.toLowerCase()===je)return r[n];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof t==="string"||ArrayBuffer.isView(t)||Q.isArrayBuffer(t)){let n=new i;return n.update(Q.toUint8Array(t)),Q.toHex(await n.digest())}return ps},xs=(r,t)=>{r=r.toLowerCase();for(let i of Object.keys(t))if(r===i.toLowerCase())return!0;return!1},ws=(r,t={})=>{let{headers:i,query:n={}}=Me.HttpRequest.clone(r);for(let l of Object.keys(i)){let c=l.toLowerCase();if(c.slice(0,6)==="x-amz-"&&!t.unhoistableHeaders?.has(c)||t.hoistableHeaders?.has(c))n[l]=i[l],delete i[l]}return{...r,headers:i,query:n}},Ot=(r)=>{r=Me.HttpRequest.clone(r);for(let t of Object.keys(r.headers))if(os.indexOf(t.toLowerCase())>-1)delete r.headers[t];return r};class Es extends qt{headerFormatter=new es;constructor({applyChecksum:r,credentials:t,region:i,service:n,sha256:l,uriEscapePath:c=!0}){super({applyChecksum:r,credentials:t,region:i,service:n,sha256:l,uriEscapePath:c})}async presign(r,t={}){let{signingDate:i=new Date,expiresIn:n=3600,unsignableHeaders:l,unhoistableHeaders:c,signableHeaders:d,hoistableHeaders:f,signingRegion:m,signingService:w}=t,E=await this.credentialProvider();this.validateResolvedCredentials(E);let S=m??await this.regionProvider(),{longDate:_,shortDate:A}=this.formatDate(i);if(n>ms)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let I=We(A,S,w??this.service),P=ws(Ot(r),{unhoistableHeaders:c,hoistableHeaders:f});if(E.sessionToken)P.query[Xt]=E.sessionToken;P.query[ts]=Ke,P.query[rs]=`${E.accessKeyId}/${I}`,P.query[Vt]=_,P.query[is]=n.toString(10);let V=zt(P,l,d);return P.query[ss]=this.getCanonicalHeaderList(V),P.query[Bt]=await this.getSignature(_,I,this.getSigningKey(E,S,A,w),this.createCanonicalRequest(P,V,await Je(r,this.sha256))),P}async sign(r,t){if(typeof r==="string")return this.signString(r,t);else if(r.headers&&r.payload)return this.signEvent(r,t);else if(r.message)return this.signMessage(r,t);else return this.signRequest(r,t)}async signEvent({headers:r,payload:t},{signingDate:i=new Date,priorSignature:n,signingRegion:l,signingService:c,eventStreamCredentials:d}){let f=l??await this.regionProvider(),{shortDate:m,longDate:w}=this.formatDate(i),E=We(m,f,c??this.service),S=await Je({headers:{},body:t},this.sha256),_=new this.sha256;_.update(r);let A=Q.toHex(await _.digest()),I=[ds,w,E,n,A,S].join(`
|
|
20
20
|
`);return this.signString(I,{signingDate:i,signingRegion:f,signingService:c,eventStreamCredentials:d})}async signMessage(r,{signingDate:t=new Date,signingRegion:i,signingService:n,eventStreamCredentials:l}){return this.signEvent({headers:this.headerFormatter.format(r.message.headers),payload:r.message.body},{signingDate:t,signingRegion:i,signingService:n,priorSignature:r.priorSignature,eventStreamCredentials:l}).then((d)=>{return{message:r.message,signature:d}})}async signString(r,{signingDate:t=new Date,signingRegion:i,signingService:n,eventStreamCredentials:l}={}){let c=l??await this.credentialProvider();this.validateResolvedCredentials(c);let d=i??await this.regionProvider(),{shortDate:f}=this.formatDate(t),m=new this.sha256(await this.getSigningKey(c,d,f,n));return m.update(Q.toUint8Array(r)),Q.toHex(await m.digest())}async signRequest(r,{signingDate:t=new Date,signableHeaders:i,unsignableHeaders:n,signingRegion:l,signingService:c}={}){let d=await this.credentialProvider();this.validateResolvedCredentials(d);let f=l??await this.regionProvider(),m=Ot(r),{longDate:w,shortDate:E}=this.formatDate(t),S=We(E,f,c??this.service);if(m.headers[Ft]=w,d.sessionToken)m.headers[cs]=d.sessionToken;let _=await Je(m,this.sha256);if(!xs(je,m.headers)&&this.applyChecksum)m.headers[je]=_;let A=zt(m,n,i),I=await this.getSignature(w,S,this.getSigningKey(d,f,E,c),this.createCanonicalRequest(m,A,_));return m.headers[vt]=`${Ke} Credential=${d.accessKeyId}/${S}, SignedHeaders=${this.getCanonicalHeaderList(A)}, Signature=${I}`,m}async getSignature(r,t,i,n){let l=await this.createStringToSign(r,t,n,Ke),c=new this.sha256(await i);return c.update(Q.toUint8Array(l)),Q.toHex(await c.digest())}getSigningKey(r,t,i,n){return ys(this.sha256,r,i,t,n||this.service)}}var Yn={SignatureV4a:null};Zn.ALGORITHM_IDENTIFIER=Ke;Zn.ALGORITHM_IDENTIFIER_V4A=Gn;Zn.ALGORITHM_QUERY_PARAM=ts;Zn.ALWAYS_UNSIGNABLE_HEADERS=hs;Zn.AMZ_DATE_HEADER=Ft;Zn.AMZ_DATE_QUERY_PARAM=Vt;Zn.AUTH_HEADER=vt;Zn.CREDENTIAL_QUERY_PARAM=rs;Zn.DATE_HEADER=ns;Zn.EVENT_ALGORITHM_IDENTIFIER=ds;Zn.EXPIRES_QUERY_PARAM=is;Zn.GENERATED_HEADERS=os;Zn.HOST_HEADER=Qn;Zn.KEY_TYPE_IDENTIFIER=Ht;Zn.MAX_CACHE_SIZE=fs;Zn.MAX_PRESIGNED_TTL=ms;Zn.PROXY_HEADER_PATTERN=ls;Zn.REGION_SET_PARAM=qn;Zn.SEC_HEADER_PATTERN=us;Zn.SHA256_HEADER=je;Zn.SIGNATURE_HEADER=as;Zn.SIGNATURE_QUERY_PARAM=Bt;Zn.SIGNED_HEADERS_QUERY_PARAM=ss;Zn.SignatureV4=Es;Zn.SignatureV4Base=qt;Zn.TOKEN_HEADER=cs;Zn.TOKEN_QUERY_PARAM=Xt;Zn.UNSIGNABLE_PATTERNS=Kn;Zn.UNSIGNED_PAYLOAD=ps;Zn.clearCredentialCache=jn;Zn.createScope=We;Zn.getCanonicalHeaders=zt;Zn.getCanonicalQuery=gs;Zn.getPayloadHash=Je;Zn.getSigningKey=ys;Zn.hasHeader=xs;Zn.moveHeadersToQuery=ws;Zn.prepareRequest=Ot;Zn.signatureV4aContainer=Yn});
|
|
21
|
-
export{Bo as
|
|
21
|
+
export{Bo as Ie,br as Je,Dr as Ke,Fn as Le};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{tg as a,ug as b,vg as c}from"./chunk-eefzbdbk.js";import"./chunk-z4gczap3.js";import"./chunk-2p1qaqv3.js";import"./chunk-47pxz6cb.js";import"./chunk-aq75kv5f.js";import"./chunk-1851skhm.js";import"./chunk-0ware2sh.js";import"./chunk-fbd971t7.js";import"./chunk-1f9qcrn6.js";import"./chunk-z66xdxkg.js";import"./chunk-jt94rhev.js";import"./chunk-2ts2s8b4.js";import"./chunk-7k1q26yn.js";import"./chunk-08mgb5tt.js";import"./chunk-6wt8g6mc.js";import"./chunk-1rafe6f5.js";import"./chunk-hsmtjb4d.js";import"./chunk-7nh8vjx4.js";import"./chunk-cqtkxwd8.js";import"./chunk-mfg4stzn.js";import"./chunk-hp9q7vvq.js";import"./chunk-5es19n1m.js";import"./chunk-1bbx1da7.js";import"./chunk-wspm2k19.js";import"./chunk-xgdst5n5.js";import"./chunk-yzxcjr6y.js";import"./chunk-53n3tfwn.js";import"./chunk-3be70hxy.js";import"./chunk-9a9qcvtz.js";import"./chunk-1sejtx9a.js";import"./chunk-jrh028na.js";import"./chunk-vqxyk6as.js";import"./chunk-mbma071k.js";import"./chunk-ajykvcas.js";import"./chunk-dpm5x19e.js";import"./chunk-vvmvryh1.js";import"./chunk-6g3bzap8.js";import"./chunk-mrh5q4s6.js";import"./chunk-w623r5kb.js";import"./chunk-zgj7jx8k.js";import"./chunk-0mdmqtfr.js";import"./chunk-00krzh3y.js";import"./chunk-hk8m8vax.js";import"./chunk-t4kma6mq.js";import"./chunk-0xf12tf3.js";export{b as run,a as encodeDir,c as ClaudeImport};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Nt as a,Ot as b,Pt as c,Qt as d,Rt as e,St as f,Tt as g,Ut as h}from"./chunk-6g3bzap8.js";import"./chunk-mrh5q4s6.js";import"./chunk-w623r5kb.js";import"./chunk-zgj7jx8k.js";import"./chunk-0mdmqtfr.js";import"./chunk-00krzh3y.js";import"./chunk-hk8m8vax.js";import"./chunk-0xf12tf3.js";export{g as redactValue,e as init,f as flush,d as file,b as enabled,h as create,a as Level,c as Default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Pl as f,Ql as Gj,Rl as Rj,Sl as Hj,Vl as s}from"./chunk-dx7rexx3.js";import{Fn as xj}from"./chunk-atacnspd.js";import{Ln as vj}from"./chunk-r81w6skn.js";import{Rr as P,Sr as wj,Yr as k,Zr as Kj}from"./chunk-4sa9t0vx.js";import{bt as a,ct as y}from"./chunk-azss4acq.js";import{Lt as I,Ut as h}from"./chunk-7s0nq2aa.js";import{du as i,eu as Ij,fu as Jj,iu as Nj}from"./chunk-cxtwavyf.js";import{ju as j}from"./chunk-15bjhfav.js";import{BF as o,RO as C,VK as l,WF as d,cI as Q,xC as Wj}from"./chunk-2zjet9tx.js";import{qP as Mj,sP as Oj,uP as Ej}from"./chunk-djfrkbd5.js";var tj={};Oj(tj,{stopRefresh:()=>aj,startRefresh:()=>sj,refresh:()=>jj,readModelCatalogResponse:()=>Pj,get:()=>fj,Provider:()=>cj,Model:()=>pj,MODEL_CATALOG_MAX_BYTES:()=>Aj,Data:()=>S});import hj from"path";var U={};Oj(U,{layer:()=>Bj,isPreview:()=>ij,isNewerVersion:()=>qj,isLocal:()=>mj,getReleaseType:()=>yj,defaultLayer:()=>uj,UpgradeFailedError:()=>x,USER_AGENT:()=>Sj,Service:()=>E,Installation:()=>U,Info:()=>Uj,Event:()=>Cj});var _j=(J)=>J.pipe(k.retryTransient({retryOn:"errors-and-responses",times:2,schedule:d.exponential(200).pipe(d.jittered)}));import Yj from"path";var z=Mj(xj(),1);import n from"crypto";import v from"fs";import Zj from"path";class H extends Error{constructor(J){super(J);this.name="SelfUpdateError"}}function $j(J){let V=J?.platform??process.platform,_=J?.arch??process.arch,$=J?.libc??"bionic",W=["qitqode",V==="win32"?"windows":V,_];if(_==="x64")W.push("baseline");if(V==="linux"&&$==="musl")W.push("musl");return`@qitqode/${W.join("-")}`}function kj(J,V){if(V.integrity){let _=V.integrity.match(/^(sha512|sha384|sha256)-([A-Za-z0-9+/=]+)$/);if(!_)throw new H(`registry returned an unrecognized integrity string: ${V.integrity}`);if(n.createHash(_[1]).update(J).digest("base64")!==_[2])throw new H(`checksum mismatch: downloaded tarball does not match the registry ${_[1]} integrity value; refusing to install`);return}if(V.shasum){if(n.createHash("sha1").update(J).digest("hex")!==V.shasum.toLowerCase())throw new H("checksum mismatch: downloaded tarball does not match the registry shasum; refusing to install");return}throw new H("registry provided no integrity metadata for the tarball; refusing to install")}function Qj(J,V){let _=(w,R)=>{let G=w,q=w+R;while(G<q&&J[G]!==0)G++;return new TextDecoder().decode(J.subarray(w,G))},$=0,W;while($+512<=J.length){if(J.subarray($,$+512).every((Z)=>Z===0))break;let R=_($+124,12).trim(),G=R?parseInt(R,8):0;if(!Number.isFinite(G)||G<0)throw new H("downloaded tarball is corrupt (bad tar header)");let q=String.fromCharCode(J[$+156]),B=_($,100),N=_($+345,155);if(N)B=`${N}/${B}`;if(W)B=W,W=void 0;let b=$+512,X=b+G;if(q==="L")W=new TextDecoder().decode(J.subarray(b,X)).replace(/\0+$/,"");else if((q==="0"||q==="\x00"||q==="")&&B===V)return J.slice(b,X);$=b+Math.ceil(G/512)*512}return}var A=(J)=>String(J instanceof Error?J.message:J),u=(J)=>Q.fail(new H(J)),p=(J,V)=>Q.try({try:J,catch:(_)=>new H(V(_))}),Xj=Q.fnUntraced(function*(J){let{target:V,execPath:_,packageName:$,registry:W}=J,w=J.gunzip??((K)=>Bun.gunzipSync(K)),R=Zj.dirname(_);yield*p(()=>v.accessSync(R,v.constants.W_OK),()=>`no write permission for ${R}; cannot replace ${_}. Fix the directory permissions or re-run with sufficient privileges.`);let G=`${W}/${$}/${encodeURIComponent(V)}`,B=(yield*J.fetchJson(G).pipe(Q.mapError((K)=>new H(`download failed: could not fetch ${$}@${V} from ${W} (${A(K)}). Check your network connection and that version ${V} exists.`))))?.dist;if(!B?.tarball)return yield*u(`registry response for ${$}@${V} has no tarball URL; cannot self-update`);let N=B.tarball,b=yield*J.fetchBytes(N).pipe(Q.mapError((K)=>new H(`download failed: could not download ${N} (${A(K)}). Check your network connection and try again.`)));yield*Q.try({try:()=>kj(b,B),catch:(K)=>K instanceof H?K:new H(A(K))});let X=yield*Q.try({try:()=>w(b),catch:()=>new H("downloaded tarball is corrupt (gunzip failed); try again")}),Z=Qj(X,"package/bin/qitqode")??Qj(X,"package/bin/qitqode.exe");if(!Z||Z.length===0)return yield*u(`tarball for ${$}@${V} does not contain the expected binary at bin/qitqode`);let O=Zj.join(R,`.qitqode-upgrade-${process.pid}`),Y=`${_}.backup-${process.pid}`,D=(K)=>{try{v.rmSync(K,{force:!0})}catch{}};yield*p(()=>v.writeFileSync(O,Z,{mode:493}),(K)=>{return D(O),`no write permission: could not write ${O} (${A(K)})`});let L=yield*J.runVersion(O).pipe(Q.mapError((K)=>{return D(O),new H(`downloaded binary failed its --version check (${A(K)}); keeping the current installation`)}));if(L.code!==0)return D(O),yield*u(`downloaded binary failed its --version check (exit ${L.code}); keeping the current installation`);let m=L.stdout.trim();if(m&&!m.includes(V))return D(O),yield*u(`downloaded binary reports version "${m}" instead of ${V}; keeping the current installation`);yield*p(()=>v.renameSync(_,Y),(K)=>{return D(O),`could not move the current binary aside (${A(K)}); check permissions on ${_}`}),yield*Q.try({try:()=>v.renameSync(O,_),catch:(K)=>{try{v.renameSync(Y,_)}catch{return new H(`failed to install the new binary AND failed to restore the old one; your previous binary is preserved at ${Y} \u2014 move it back to ${_} manually`)}return D(O),new H(`could not install the new binary (${A(K)}); the previous version was restored`)}}),D(Y)});var c=h.create({service:"installation"}),M="@qitqode/cli";function qj(J,V){if(!z.default.valid(J)||!z.default.valid(V))return!1;return z.default.gt(V,J)}var Cj={Updated:s.define("installation.updated",j.object({version:j.string()})),UpdateAvailable:s.define("installation.update-available",j.object({version:j.string()}))};function yj(J,V){if(!qj(J,V))throw Error(`Version ${V} is not newer than ${J}`);let _=z.default.major(J),$=z.default.minor(J),W=z.default.major(V),w=z.default.minor(V);if(W>_)return"major";if(w>$)return"minor";return"patch"}var Uj=j.object({version:j.string(),latest:j.string()}).meta({ref:"InstallationInfo"}),Sj=`qitqode/${y}/${a}/${I.QITQODE_CLIENT}`;function ij(){return y!=="latest"}function mj(){return y==="local"}class x extends C.TaggedErrorClass()("UpgradeFailedError",{stderr:C.String}){}var nj=C.Struct({version:C.String});class E extends Wj.Service()("@qitqode/Installation"){}var Bj=o.effect(E,Q.gen(function*(){let J=yield*k.HttpClient,V=k.filterStatusOk(_j(J)),_=yield*f.ChildProcessSpawner,$=(X,Z)=>Gj.make(X[0],X.slice(1),{cwd:Z?.cwd,env:Z?.env,extendEnv:!0}),W=Q.fnUntraced(function*(X){let Z=yield*Hj(_,X);return{code:Z.code,stdout:Z.text,stderr:Z.stderr}},Q.scoped),w=Q.fnUntraced(function*(X,Z){let O=yield*_.spawn($(X,Z)),Y=yield*l.mkString(l.decodeText(O.stdout));return yield*O.exitCode,Y},Q.scoped,Q.catch(()=>Q.succeed(""))),R=Q.fnUntraced(function*(X,Z){return yield*W($(X,Z))},Q.catch(()=>Q.succeed({code:f.ExitCode(1),stdout:"",stderr:""}))),G=Q.fn("Installation.method")(function*(){if(process.execPath.includes(Yj.join(".qitqode","bin")))return"curl";if(process.execPath.includes(Yj.join(".local","bin")))return"curl";let X=process.execPath.toLowerCase(),Z=[{name:"npm",command:()=>w(["npm","list","-g","--depth=0"])},{name:"pnpm",command:()=>w(["pnpm","list","-g","--depth=0"])},{name:"bun",command:()=>w(["bun","pm","ls","-g"])}];Z.sort((O,Y)=>{let D=X.includes(O.name),L=X.includes(Y.name);if(D&&!L)return-1;if(!D&&L)return 1;return 0});for(let O of Z)if((yield*O.command()).includes(M))return O.name;return"unknown"}),q=Q.fn("Installation.latest")(function*(X){let Z=X||(yield*G());if(Z==="curl"){let Y=(yield*w(["curl","-sI","https://github.com/qitqode/qitqode/releases/latest"])).match(/^location:.*\/tag\/v([0-9][^\s/]*)/im);if(Y)return Y[1];return yield*Q.die(Error("failed to resolve latest version from GitHub releases redirect"))}if(Z==="npm"||Z==="bun"||Z==="pnpm"){let Y=(yield*w(["npm","config","get","registry"])).trim()||"https://registry.npmjs.org",D=Y.endsWith("/")?Y.slice(0,-1):Y,L=yield*V.execute(P.get(`${D}/${encodeURIComponent(M)}/${y}`).pipe(P.acceptJson));return(yield*wj.schemaBodyJson(nj)(L)).version}return c.warn("unsupported update channel, skipping",{method:Z}),yield*Q.die(Error(`unsupported update channel: ${Z}`))},Q.orDie),B=Q.fnUntraced(function*(){let Z=(yield*w(["npm","config","get","registry"])).trim()||"https://registry.npmjs.org";return Z.endsWith("/")?Z.slice(0,-1):Z}),N=Q.fnUntraced(function*(X){let Z=yield*B();yield*Xj({target:X,execPath:process.env.QITQODE_SELF_UPDATE_TARGET_BINARY||process.execPath,packageName:$j(),registry:Z,fetchJson:(O)=>V.execute(P.get(O).pipe(P.acceptJson)).pipe(Q.flatMap((Y)=>Y.json)),fetchBytes:(O)=>V.execute(P.get(O)).pipe(Q.flatMap((Y)=>Y.arrayBuffer),Q.map((Y)=>new Uint8Array(Y))),runVersion:(O)=>R([O,"--version"]).pipe(Q.map((Y)=>({code:Y.code,stdout:Y.stdout})))}).pipe(Q.mapError((O)=>new x({stderr:O.message})))}),b=Q.fn("Installation.upgrade")(function*(X,Z){if(X==="curl"){yield*N(Z),c.info("upgraded",{method:X,target:Z});return}let Y=yield*(()=>{if(X==="npm")return R(["npm","install","-g",`${M}@${Z}`]);if(X==="pnpm")return R(["pnpm","install","-g",`${M}@${Z}`]);if(X==="bun")return R(["bun","install","-g",`${M}@${Z}`]);return new x({stderr:`Unknown method: ${X}`})})();if(Y.code!==0){let D=Y.stderr||"";return yield*new x({stderr:D})}c.info("upgraded",{method:X,target:Z,stdout:Y.stdout,stderr:Y.stderr}),yield*w([process.execPath,"--version"])});return E.of({info:Q.fn("Installation.info")(function*(){return{version:a,latest:yield*q()}}),method:G,latest:q,upgrade:b})})),uj=Bj.pipe(o.provide(Kj.layer),o.provide(Rj));var t=j.lazy(()=>j.union([j.string(),j.number(),j.boolean(),j.null(),j.array(t),j.record(j.string(),t)])),Dj=j.object({input:j.number(),output:j.number(),cache_read:j.number().optional(),cache_write:j.number().optional(),context_over_200k:j.object({input:j.number(),output:j.number(),cache_read:j.number().optional(),cache_write:j.number().optional()}).optional()}),r=j.object({id:j.string(),name:j.string(),family:j.string().optional(),release_date:j.string(),attachment:j.boolean(),reasoning:j.boolean(),temperature:j.boolean().optional(),tool_call:j.boolean(),interleaved:j.union([j.literal(!0),j.object({field:j.enum(["reasoning_content","reasoning_details"])}).strict()]).optional(),cost:Dj.optional(),limit:j.object({context:j.number(),input:j.number().optional(),output:j.number()}),modalities:j.object({input:j.array(j.enum(["text","audio","image","video","pdf"])),output:j.array(j.enum(["text","audio","image","video","pdf"]))}).optional(),experimental:j.object({modes:j.record(j.string(),j.object({cost:Dj.optional(),provider:j.object({body:j.record(j.string(),t).optional(),headers:j.record(j.string(),j.string()).optional()}).optional()})).optional()}).optional(),status:j.enum(["alpha","beta","deprecated"]).optional(),provider:j.object({npm:j.string().optional(),api:j.string().optional()}).optional()}),e=j.object({api:j.string().optional(),name:j.string(),env:j.array(j.string()),id:j.string(),npm:j.string().optional(),models:j.record(j.string(),r)});var Vj=h.create({service:"models.dev"}),bj=Fj(),F=hj.join(Nj.Path.cache,bj==="https://models.dev"?"models.json":`models-${Ij.fast(bj)}.json`),gj=300000,Aj=8388608,T,dj=j.record(j.string(),e),pj=r,cj=e;function Fj(){return I.QITQODE_MODELS_URL||"https://models.dev"}function lj(){return Date.now()-Number(i.stat(F)?.mtimeMs??0)<gj}function Lj(J){return!J&&lj()}function g(J){let V=dj.parse(typeof J==="string"?JSON.parse(J):J);for(let[_,$]of Object.entries(V))if($.id!==_)throw Error(`Invalid model provider: ${_}`);return V}async function zj(J){let V=await i.readJson(J).catch(()=>{return});if(!V)return;try{return g(V)}catch(_){Vj.warn("Ignoring invalid model catalog cache",{file:J,error:_});return}}async function Pj(J,V,_=Aj){let $=J.headers.get("content-type")?.split(";")[0]?.trim().toLowerCase();if($!=="application/json"&&!$?.endsWith("+json"))throw Error(`Invalid model catalog content type: ${$||"missing"}`);let W=Number(J.headers.get("content-length"));if(Number.isFinite(W)&&W>_)throw Error("Model catalog response is too large");if(!J.body)return"";let w=J.body.getReader(),R=()=>void w.cancel(V.reason);V.addEventListener("abort",R,{once:!0});let G=new Uint8Array(_),q=0;try{for(;;){let B=await w.read();if(B.done)break;if(q+=B.value.byteLength,q>_)throw await w.cancel(),Error("Model catalog response is too large");G.set(B.value,q-B.value.byteLength)}}finally{V.removeEventListener("abort",R)}return new TextDecoder().decode(G.subarray(0,q))}var Tj=async()=>{let J=AbortSignal.timeout(1e4),V=await fetch(`${Fj()}/api.json`,{headers:{"User-Agent":U.USER_AGENT},signal:J});if(!V.ok)return;let _=g(await Pj(V,J));return JSON.stringify(_)},S=vj(async()=>{let J=await zj(I.QITQODE_MODELS_PATH??F);if(J)return J;let V=await import("./chunk-0tkznq75.js").then((_)=>g(_.snapshot)).catch(()=>{return});if(V)return V;if(I.QITQODE_DISABLE_MODELS_FETCH)return{};return Jj.withLock(`models-dev:${F}`,async()=>{let _=await zj(I.QITQODE_MODELS_PATH??F);if(_)return _;let $=await Tj();if($)return await i.write(F,$).catch((W)=>{Vj.error("Failed to write models cache",{error:W})}),g($);return{}})});async function fj(){return S()}async function jj(J=!1){if(Lj(J))return S.reset();await Jj.withLock(`models-dev:${F}`,async()=>{if(Lj(J))return S.reset();let V=await Tj();if(!V)return;await i.write(F,V),S.reset()}).catch((V)=>{Vj.error("Failed to fetch models.dev",{error:V})})}function sj(){if(T||I.QITQODE_DISABLE_MODELS_FETCH||process.argv.includes("--get-yargs-completions"))return;jj(),T=setInterval(async()=>{await jj()},3600000),T.unref()}function aj(){if(!T)return;clearInterval(T),T=void 0}
|
|
3
|
-
export{_j as
|
|
2
|
+
import{Ql as f,Rl as Gj,Sl as Rj,Tl as Hj,Wl as s}from"./chunk-aq75kv5f.js";import{Gn as xj}from"./chunk-1f9qcrn6.js";import{Mn as vj}from"./chunk-jt94rhev.js";import{Sr as P,Tr as wj,Zr as T,_r as Kj}from"./chunk-53n3tfwn.js";import{ct as a,dt as y}from"./chunk-dpm5x19e.js";import{Mt as I,Vt as h}from"./chunk-6g3bzap8.js";import{eu as i,fu as Ij,gu as Jj,ju as Nj}from"./chunk-mrh5q4s6.js";import{ku as j}from"./chunk-w623r5kb.js";import{CF as o,SO as C,WK as l,XF as g,dI as Q,yC as Wj}from"./chunk-hk8m8vax.js";import{rP as kj,tP as Oj,vP as Ej}from"./chunk-0xf12tf3.js";var tj={};Oj(tj,{stopRefresh:()=>aj,startRefresh:()=>sj,refresh:()=>jj,readModelCatalogResponse:()=>Pj,get:()=>fj,Provider:()=>cj,Model:()=>pj,MODEL_CATALOG_MAX_BYTES:()=>Aj,Data:()=>S});import hj from"path";var U={};Oj(U,{layer:()=>Bj,isPreview:()=>ij,isNewerVersion:()=>qj,isLocal:()=>mj,getReleaseType:()=>yj,defaultLayer:()=>nj,UpgradeFailedError:()=>x,USER_AGENT:()=>Sj,Service:()=>E,Installation:()=>U,Info:()=>Uj,Event:()=>Cj});var _j=(J)=>J.pipe(T.retryTransient({retryOn:"errors-and-responses",times:2,schedule:g.exponential(200).pipe(g.jittered)}));import Yj from"path";var z=kj(xj(),1);import u from"crypto";import v from"fs";import Zj from"path";class H extends Error{constructor(J){super(J);this.name="SelfUpdateError"}}function $j(J){let V=J?.platform??process.platform,_=J?.arch??process.arch,$=J?.libc??"bionic",W=["qitqode",V==="win32"?"windows":V,_];if(_==="x64")W.push("baseline");if(V==="linux"&&$==="musl")W.push("musl");return`@qitqode/${W.join("-")}`}function Tj(J,V){if(V.integrity){let _=V.integrity.match(/^(sha512|sha384|sha256)-([A-Za-z0-9+/=]+)$/);if(!_)throw new H(`registry returned an unrecognized integrity string: ${V.integrity}`);if(u.createHash(_[1]).update(J).digest("base64")!==_[2])throw new H(`checksum mismatch: downloaded tarball does not match the registry ${_[1]} integrity value; refusing to install`);return}if(V.shasum){if(u.createHash("sha1").update(J).digest("hex")!==V.shasum.toLowerCase())throw new H("checksum mismatch: downloaded tarball does not match the registry shasum; refusing to install");return}throw new H("registry provided no integrity metadata for the tarball; refusing to install")}function Qj(J,V){let _=(w,R)=>{let G=w,q=w+R;while(G<q&&J[G]!==0)G++;return new TextDecoder().decode(J.subarray(w,G))},$=0,W;while($+512<=J.length){if(J.subarray($,$+512).every((Z)=>Z===0))break;let R=_($+124,12).trim(),G=R?parseInt(R,8):0;if(!Number.isFinite(G)||G<0)throw new H("downloaded tarball is corrupt (bad tar header)");let q=String.fromCharCode(J[$+156]),B=_($,100),N=_($+345,155);if(N)B=`${N}/${B}`;if(W)B=W,W=void 0;let b=$+512,X=b+G;if(q==="L")W=new TextDecoder().decode(J.subarray(b,X)).replace(/\0+$/,"");else if((q==="0"||q==="\x00"||q==="")&&B===V)return J.slice(b,X);$=b+Math.ceil(G/512)*512}return}var A=(J)=>String(J instanceof Error?J.message:J),n=(J)=>Q.fail(new H(J)),p=(J,V)=>Q.try({try:J,catch:(_)=>new H(V(_))}),Xj=Q.fnUntraced(function*(J){let{target:V,execPath:_,packageName:$,registry:W}=J,w=J.gunzip??((K)=>Bun.gunzipSync(K)),R=Zj.dirname(_);yield*p(()=>v.accessSync(R,v.constants.W_OK),()=>`no write permission for ${R}; cannot replace ${_}. Fix the directory permissions or re-run with sufficient privileges.`);let G=`${W}/${$}/${encodeURIComponent(V)}`,B=(yield*J.fetchJson(G).pipe(Q.mapError((K)=>new H(`download failed: could not fetch ${$}@${V} from ${W} (${A(K)}). Check your network connection and that version ${V} exists.`))))?.dist;if(!B?.tarball)return yield*n(`registry response for ${$}@${V} has no tarball URL; cannot self-update`);let N=B.tarball,b=yield*J.fetchBytes(N).pipe(Q.mapError((K)=>new H(`download failed: could not download ${N} (${A(K)}). Check your network connection and try again.`)));yield*Q.try({try:()=>Tj(b,B),catch:(K)=>K instanceof H?K:new H(A(K))});let X=yield*Q.try({try:()=>w(b),catch:()=>new H("downloaded tarball is corrupt (gunzip failed); try again")}),Z=Qj(X,"package/bin/qitqode")??Qj(X,"package/bin/qitqode.exe");if(!Z||Z.length===0)return yield*n(`tarball for ${$}@${V} does not contain the expected binary at bin/qitqode`);let O=Zj.join(R,`.qitqode-upgrade-${process.pid}`),Y=`${_}.backup-${process.pid}`,D=(K)=>{try{v.rmSync(K,{force:!0})}catch{}};yield*p(()=>v.writeFileSync(O,Z,{mode:493}),(K)=>{return D(O),`no write permission: could not write ${O} (${A(K)})`});let L=yield*J.runVersion(O).pipe(Q.mapError((K)=>{return D(O),new H(`downloaded binary failed its --version check (${A(K)}); keeping the current installation`)}));if(L.code!==0)return D(O),yield*n(`downloaded binary failed its --version check (exit ${L.code}); keeping the current installation`);let m=L.stdout.trim();if(m&&!m.includes(V))return D(O),yield*n(`downloaded binary reports version "${m}" instead of ${V}; keeping the current installation`);yield*p(()=>v.renameSync(_,Y),(K)=>{return D(O),`could not move the current binary aside (${A(K)}); check permissions on ${_}`}),yield*Q.try({try:()=>v.renameSync(O,_),catch:(K)=>{try{v.renameSync(Y,_)}catch{return new H(`failed to install the new binary AND failed to restore the old one; your previous binary is preserved at ${Y} \u2014 move it back to ${_} manually`)}return D(O),new H(`could not install the new binary (${A(K)}); the previous version was restored`)}}),D(Y)});var c=h.create({service:"installation"}),k="@qitqode/cli";function qj(J,V){if(!z.default.valid(J)||!z.default.valid(V))return!1;return z.default.gt(V,J)}var Cj={Updated:s.define("installation.updated",j.object({version:j.string()})),UpdateAvailable:s.define("installation.update-available",j.object({version:j.string()}))};function yj(J,V){if(!qj(J,V))throw Error(`Version ${V} is not newer than ${J}`);let _=z.default.major(J),$=z.default.minor(J),W=z.default.major(V),w=z.default.minor(V);if(W>_)return"major";if(w>$)return"minor";return"patch"}var Uj=j.object({version:j.string(),latest:j.string()}).meta({ref:"InstallationInfo"}),Sj=`qitqode/${y}/${a}/${I.QITQODE_CLIENT}`;function ij(){return y!=="latest"}function mj(){return y==="local"}class x extends C.TaggedErrorClass()("UpgradeFailedError",{stderr:C.String}){}var uj=C.Struct({version:C.String});class E extends Wj.Service()("@qitqode/Installation"){}var Bj=o.effect(E,Q.gen(function*(){let J=yield*T.HttpClient,V=T.filterStatusOk(_j(J)),_=yield*f.ChildProcessSpawner,$=(X,Z)=>Gj.make(X[0],X.slice(1),{cwd:Z?.cwd,env:Z?.env,extendEnv:!0}),W=Q.fnUntraced(function*(X){let Z=yield*Hj(_,X);return{code:Z.code,stdout:Z.text,stderr:Z.stderr}},Q.scoped),w=Q.fnUntraced(function*(X,Z){let O=yield*_.spawn($(X,Z)),Y=yield*l.mkString(l.decodeText(O.stdout));return yield*O.exitCode,Y},Q.scoped,Q.catch(()=>Q.succeed(""))),R=Q.fnUntraced(function*(X,Z){return yield*W($(X,Z))},Q.catch(()=>Q.succeed({code:f.ExitCode(1),stdout:"",stderr:""}))),G=Q.fn("Installation.method")(function*(){if(process.execPath.includes(Yj.join(".qitqode","bin")))return"curl";if(process.execPath.includes(Yj.join(".local","bin")))return"curl";let X=process.execPath.toLowerCase(),Z=[{name:"npm",command:()=>w(["npm","list","-g","--depth=0"])},{name:"pnpm",command:()=>w(["pnpm","list","-g","--depth=0"])},{name:"bun",command:()=>w(["bun","pm","ls","-g"])}];Z.sort((O,Y)=>{let D=X.includes(O.name),L=X.includes(Y.name);if(D&&!L)return-1;if(!D&&L)return 1;return 0});for(let O of Z)if((yield*O.command()).includes(k))return O.name;return"unknown"}),q=Q.fn("Installation.latest")(function*(X){let Z=X||(yield*G());if(Z==="curl"){let Y=(yield*w(["curl","-sI","https://github.com/qitqode/qitqode/releases/latest"])).match(/^location:.*\/tag\/v([0-9][^\s/]*)/im);if(Y)return Y[1];return yield*Q.die(Error("failed to resolve latest version from GitHub releases redirect"))}if(Z==="npm"||Z==="bun"||Z==="pnpm"){let Y=(yield*w(["npm","config","get","registry"])).trim()||"https://registry.npmjs.org",D=Y.endsWith("/")?Y.slice(0,-1):Y,L=yield*V.execute(P.get(`${D}/${encodeURIComponent(k)}/${y}`).pipe(P.acceptJson));return(yield*wj.schemaBodyJson(uj)(L)).version}return c.warn("unsupported update channel, skipping",{method:Z}),yield*Q.die(Error(`unsupported update channel: ${Z}`))},Q.orDie),B=Q.fnUntraced(function*(){let Z=(yield*w(["npm","config","get","registry"])).trim()||"https://registry.npmjs.org";return Z.endsWith("/")?Z.slice(0,-1):Z}),N=Q.fnUntraced(function*(X){let Z=yield*B();yield*Xj({target:X,execPath:process.env.QITQODE_SELF_UPDATE_TARGET_BINARY||process.execPath,packageName:$j(),registry:Z,fetchJson:(O)=>V.execute(P.get(O).pipe(P.acceptJson)).pipe(Q.flatMap((Y)=>Y.json)),fetchBytes:(O)=>V.execute(P.get(O)).pipe(Q.flatMap((Y)=>Y.arrayBuffer),Q.map((Y)=>new Uint8Array(Y))),runVersion:(O)=>R([O,"--version"]).pipe(Q.map((Y)=>({code:Y.code,stdout:Y.stdout})))}).pipe(Q.mapError((O)=>new x({stderr:O.message})))}),b=Q.fn("Installation.upgrade")(function*(X,Z){if(X==="curl"){yield*N(Z),c.info("upgraded",{method:X,target:Z});return}let Y=yield*(()=>{if(X==="npm")return R(["npm","install","-g",`${k}@${Z}`]);if(X==="pnpm")return R(["pnpm","install","-g",`${k}@${Z}`]);if(X==="bun")return R(["bun","install","-g",`${k}@${Z}`]);return new x({stderr:`Unknown method: ${X}`})})();if(Y.code!==0){let D=Y.stderr||"";return yield*new x({stderr:D})}c.info("upgraded",{method:X,target:Z,stdout:Y.stdout,stderr:Y.stderr}),yield*w([process.execPath,"--version"])});return E.of({info:Q.fn("Installation.info")(function*(){return{version:a,latest:yield*q()}}),method:G,latest:q,upgrade:b})})),nj=Bj.pipe(o.provide(Kj.layer),o.provide(Rj));var t=j.lazy(()=>j.union([j.string(),j.number(),j.boolean(),j.null(),j.array(t),j.record(j.string(),t)])),Dj=j.object({input:j.number(),output:j.number(),cache_read:j.number().optional(),cache_write:j.number().optional(),context_over_200k:j.object({input:j.number(),output:j.number(),cache_read:j.number().optional(),cache_write:j.number().optional()}).optional()}),r=j.object({id:j.string(),name:j.string(),family:j.string().optional(),release_date:j.string(),attachment:j.boolean(),reasoning:j.boolean(),temperature:j.boolean().optional(),tool_call:j.boolean(),interleaved:j.union([j.literal(!0),j.object({field:j.enum(["reasoning_content","reasoning_details"])}).strict()]).optional(),cost:Dj.optional(),limit:j.object({context:j.number(),input:j.number().optional(),output:j.number()}),modalities:j.object({input:j.array(j.enum(["text","audio","image","video","pdf"])),output:j.array(j.enum(["text","audio","image","video","pdf"]))}).optional(),experimental:j.object({modes:j.record(j.string(),j.object({cost:Dj.optional(),provider:j.object({body:j.record(j.string(),t).optional(),headers:j.record(j.string(),j.string()).optional()}).optional()})).optional()}).optional(),status:j.enum(["alpha","beta","deprecated"]).optional(),provider:j.object({npm:j.string().optional(),api:j.string().optional()}).optional()}),e=j.object({api:j.string().optional(),name:j.string(),env:j.array(j.string()),id:j.string(),npm:j.string().optional(),models:j.record(j.string(),r)});var Vj=h.create({service:"models.dev"}),bj=Fj(),F=hj.join(Nj.Path.cache,bj==="https://models.dev"?"models.json":`models-${Ij.fast(bj)}.json`),dj=300000,Aj=8388608,M,gj=j.record(j.string(),e),pj=r,cj=e;function Fj(){return I.QITQODE_MODELS_URL||"https://models.dev"}function lj(){return Date.now()-Number(i.stat(F)?.mtimeMs??0)<dj}function Lj(J){return!J&&lj()}function d(J){let V=gj.parse(typeof J==="string"?JSON.parse(J):J);for(let[_,$]of Object.entries(V))if($.id!==_)throw Error(`Invalid model provider: ${_}`);return V}async function zj(J){let V=await i.readJson(J).catch(()=>{return});if(!V)return;try{return d(V)}catch(_){Vj.warn("Ignoring invalid model catalog cache",{file:J,error:_});return}}async function Pj(J,V,_=Aj){V.throwIfAborted();let $=J.headers.get("content-type")?.split(";")[0]?.trim().toLowerCase();if($!=="application/json"&&!$?.endsWith("+json"))throw Error(`Invalid model catalog content type: ${$||"missing"}`);let W=Number(J.headers.get("content-length"));if(Number.isFinite(W)&&W>_)throw Error("Model catalog response is too large");if(!J.body)return"";let w=J.body.getReader(),R=()=>void w.cancel(V.reason).catch(()=>{return});V.addEventListener("abort",R,{once:!0});let G=new Uint8Array(_),q=0;try{for(;;){let B=await w.read();if(V.throwIfAborted(),B.done)break;if(q+=B.value.byteLength,q>_)throw await w.cancel(),Error("Model catalog response is too large");G.set(B.value,q-B.value.byteLength)}}finally{V.removeEventListener("abort",R)}return new TextDecoder().decode(G.subarray(0,q))}var Mj=async()=>{let J=AbortSignal.timeout(1e4),V=await fetch(`${Fj()}/api.json`,{headers:{"User-Agent":U.USER_AGENT},signal:J});if(!V.ok)return;let _=d(await Pj(V,J));return JSON.stringify(_)},S=vj(async()=>{let J=await zj(I.QITQODE_MODELS_PATH??F);if(J)return J;let V=await import("./chunk-hnbtfpb7.js").then((_)=>d(_.snapshot)).catch(()=>{return});if(V)return V;if(I.QITQODE_DISABLE_MODELS_FETCH)return{};return Jj.withLock(`models-dev:${F}`,async()=>{let _=await zj(I.QITQODE_MODELS_PATH??F);if(_)return _;let $=await Mj();if($)return await i.write(F,$).catch((W)=>{Vj.error("Failed to write models cache",{error:W})}),d($);return{}})});async function fj(){return S()}async function jj(J=!1){if(Lj(J))return S.reset();await Jj.withLock(`models-dev:${F}`,async()=>{if(Lj(J))return S.reset();let V=await Mj();if(!V)return;await i.write(F,V),S.reset()}).catch((V)=>{Vj.error("Failed to fetch models.dev",{error:V})})}function sj(){if(M||I.QITQODE_DISABLE_MODELS_FETCH||process.argv.includes("--get-yargs-completions"))return;jj(),M=setInterval(async()=>{await jj()},3600000),M.unref()}function aj(){if(!M)return;clearInterval(M),M=void 0}
|
|
3
|
+
export{_j as bl,U as cl,Aj as dl,pj as el,cj as fl,Pj as gl,S as hl,fj as il,jj as jl,sj as kl,aj as ll,tj as ml};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{l as
|
|
2
|
+
import{Xs as i}from"./chunk-vqxyk6as.js";import{ju as o}from"./chunk-mrh5q4s6.js";import{rP as c}from"./chunk-0xf12tf3.js";var e=c(i(),1);import p from"path";function l(n,t){let r=t?.PATH??t?.Path??process.env.PATH??process.env.Path??"",h=r?r+p.delimiter+o.Path.bin:o.Path.bin,s=e.default.sync(n,{nothrow:!0,path:h,pathExt:t?.PATHEXT??t?.PathExt??process.env.PATHEXT??process.env.PathExt});return typeof s==="string"?s:null}
|
|
3
|
+
export{l as Nn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-jf4zyy7r.js";import"./chunk-0xf12tf3.js";var e={"ui.sessionReview.title":"\u4F1A\u8BDD\u53D8\u66F4","ui.sessionReview.title.lastTurn":"\u4E0A\u4E00\u8F6E\u53D8\u66F4","ui.sessionReview.diffStyle.unified":"\u7EDF\u4E00","ui.sessionReview.diffStyle.split":"\u62C6\u5206","ui.sessionReview.openFile":"\u6253\u5F00\u6587\u4EF6","ui.sessionReview.selection.line":"\u7B2C {{line}} \u884C","ui.sessionReview.selection.lines":"\u7B2C {{start}}-{{end}} \u884C","ui.sessionReview.expandAll":"\u5168\u90E8\u5C55\u5F00","ui.sessionReview.collapseAll":"\u5168\u90E8\u6536\u8D77","ui.sessionReview.change.added":"\u5DF2\u6DFB\u52A0","ui.sessionReview.change.removed":"\u5DF2\u79FB\u9664","ui.sessionReview.change.modified":"\u5DF2\u4FEE\u6539","ui.sessionReview.image.loading":"\u52A0\u8F7D\u4E2D...","ui.sessionReview.image.placeholder":"\u56FE\u7247","ui.sessionReview.largeDiff.title":"\u5DEE\u5F02\u8FC7\u5927\uFF0C\u65E0\u6CD5\u6E32\u67D3","ui.sessionReview.largeDiff.meta":"\u9650\u5236\uFF1A{{limit}} \u884C\u53D8\u66F4\u3002\u5F53\u524D\uFF1A{{current}} \u884C\u53D8\u66F4\u3002","ui.sessionReview.largeDiff.renderAnyway":"\u4ECD\u7136\u6E32\u67D3","ui.fileMedia.kind.image":"\u56FE\u7247","ui.fileMedia.kind.audio":"\u97F3\u9891","ui.fileMedia.state.removed":"{{kind}}\u5DF2\u79FB\u9664","ui.fileMedia.state.loading":"\u6B63\u5728\u52A0\u8F7D{{kind}}...","ui.fileMedia.state.error":"\u52A0\u8F7D{{kind}}\u5931\u8D25","ui.fileMedia.state.unavailable":"{{kind}}\u4E0D\u53EF\u9884\u89C8","ui.fileMedia.binary.title":"\u4E8C\u8FDB\u5236\u6587\u4EF6","ui.fileMedia.binary.description.path":"\u65E0\u6CD5\u663E\u793A {{path}}\uFF0C\u56E0\u4E3A\u5B83\u662F\u4E8C\u8FDB\u5236\u6587\u4EF6\u3002","ui.fileMedia.binary.description.default":"\u65E0\u6CD5\u663E\u793A\u6B64\u6587\u4EF6\uFF0C\u56E0\u4E3A\u5B83\u662F\u4E8C\u8FDB\u5236\u6587\u4EF6\u3002","ui.lineComment.label.prefix":"\u8BC4\u8BBA ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"\u6B63\u5728\u8BC4\u8BBA ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"\u6DFB\u52A0\u8BC4\u8BBA","ui.lineComment.submit":"\u8BC4\u8BBA","ui.sessionTurn.steps.show":"\u663E\u793A\u6B65\u9AA4","ui.sessionTurn.steps.hide":"\u9690\u85CF\u6B65\u9AA4","ui.sessionTurn.summary.response":"\u56DE\u590D","ui.sessionTurn.diff.showMore":"\u663E\u793A\u66F4\u591A\u66F4\u6539\uFF08{{count}}\uFF09","ui.sessionTurn.retry.retrying":"\u91CD\u8BD5\u4E2D","ui.sessionTurn.retry.inSeconds":"{{seconds}} \u79D2\u540E","ui.sessionTurn.retry.attempt":"\u7B2C {{attempt}} \u6B21","ui.sessionTurn.retry.attemptLine":"{{line}} - \u7B2C {{attempt}} \u6B21","ui.sessionTurn.retry.geminiHot":"gemini \u5F53\u524D\u8FC7\u8F7D","ui.sessionTurn.error.freeUsageExceeded":"\u514D\u8D39\u4F7F\u7528\u989D\u5EA6\u5DF2\u7528\u5B8C","ui.sessionTurn.error.addQredits":"\u6DFB\u52A0\u79EF\u5206","ui.sessionTurn.status.delegating":"\u6B63\u5728\u59D4\u6D3E\u5DE5\u4F5C","ui.sessionTurn.status.planning":"\u6B63\u5728\u89C4\u5212\u4E0B\u4E00\u6B65","ui.sessionTurn.status.gatheringContext":"\u6B63\u5728\u63A2\u7D22","ui.sessionTurn.status.gatheredContext":"\u5DF2\u63A2\u7D22","ui.sessionTurn.status.searchingCodebase":"\u6B63\u5728\u641C\u7D22\u4EE3\u7801\u5E93","ui.sessionTurn.status.searchingWeb":"\u6B63\u5728\u641C\u7D22\u7F51\u9875","ui.sessionTurn.status.makingEdits":"\u6B63\u5728\u4FEE\u6539","ui.sessionTurn.status.runningCommands":"\u6B63\u5728\u8FD0\u884C\u547D\u4EE4","ui.sessionTurn.status.thinking":"\u601D\u8003\u4E2D","ui.sessionTurn.status.thinkingWithTopic":"\u601D\u8003\uFF1A{{topic}}","ui.sessionTurn.status.gatheringThoughts":"\u6B63\u5728\u6574\u7406\u601D\u8DEF","ui.sessionTurn.status.consideringNextSteps":"\u6B63\u5728\u8003\u8651\u4E0B\u4E00\u6B65","ui.messagePart.questions.dismissed":"\u95EE\u9898\u5DF2\u5FFD\u7565","ui.messagePart.compaction":"\u4F1A\u8BDD\u5DF2\u538B\u7F29","ui.messagePart.context.read.one":"{{count}} \u6B21\u8BFB\u53D6","ui.messagePart.context.read.other":"{{count}} \u6B21\u8BFB\u53D6","ui.messagePart.context.search.one":"{{count}} \u6B21\u641C\u7D22","ui.messagePart.context.search.other":"{{count}} \u6B21\u641C\u7D22","ui.messagePart.context.list.one":"{{count}} \u4E2A\u5217\u8868","ui.messagePart.context.list.other":"{{count}} \u4E2A\u5217\u8868","ui.messagePart.diagnostic.error":"\u9519\u8BEF","ui.messagePart.title.edit":"\u7F16\u8F91","ui.messagePart.title.write":"\u5199\u5165","ui.messagePart.option.typeOwnAnswer":"\u8F93\u5165\u81EA\u5DF1\u7684\u7B54\u6848","ui.messagePart.review.title":"\u68C0\u67E5\u4F60\u7684\u7B54\u6848","ui.list.loading":"\u52A0\u8F7D\u4E2D","ui.list.empty":"\u65E0\u7ED3\u679C","ui.list.clearFilter":"\u6E05\u9664\u7B5B\u9009","ui.list.emptyWithFilter.prefix":"\u6CA1\u6709\u5173\u4E8E","ui.list.emptyWithFilter.suffix":"\u7684\u7ED3\u679C","ui.messageNav.newMessage":"\u65B0\u6D88\u606F","ui.textField.copyToClipboard":"\u590D\u5236\u5230\u526A\u8D34\u677F","ui.textField.copyLink":"\u590D\u5236\u94FE\u63A5","ui.textField.copied":"\u5DF2\u590D\u5236","ui.imagePreview.alt":"\u56FE\u7247\u9884\u89C8","ui.scrollView.ariaLabel":"\u53EF\u6EDA\u52A8\u5185\u5BB9","ui.tool.read":"\u8BFB\u53D6","ui.tool.loaded":"\u5DF2\u52A0\u8F7D","ui.tool.list":"\u5217\u8868","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Webfetch","ui.tool.websearch":"\u7F51\u7EDC\u641C\u7D22","ui.tool.codesearch":"\u4EE3\u7801\u641C\u7D22","ui.tool.shell":"Shell","ui.tool.patch":"\u8865\u4E01","ui.tool.todos":"\u5F85\u529E","ui.tool.todos.read":"\u8BFB\u53D6\u5F85\u529E","ui.tool.questions":"\u95EE\u9898","ui.tool.agent":"{{type}} \u667A\u80FD\u4F53","ui.tool.agent.default":"\u667A\u80FD\u4F53","ui.common.file.one":"\u4E2A\u6587\u4EF6","ui.common.file.other":"\u4E2A\u6587\u4EF6","ui.common.question.one":"\u4E2A\u95EE\u9898","ui.common.question.other":"\u4E2A\u95EE\u9898","ui.common.add":"\u6DFB\u52A0","ui.common.back":"\u8FD4\u56DE","ui.common.cancel":"\u53D6\u6D88","ui.common.confirm":"\u786E\u8BA4","ui.common.dismiss":"\u5FFD\u7565","ui.common.close":"\u5173\u95ED","ui.common.next":"\u4E0B\u4E00\u6B65","ui.common.submit":"\u63D0\u4EA4","ui.permission.deny":"\u62D2\u7EDD","ui.permission.allowAlways":"\u59CB\u7EC8\u5141\u8BB8","ui.permission.allowOnce":"\u5141\u8BB8\u4E00\u6B21","ui.message.expand":"\u5C55\u5F00\u6D88\u606F","ui.message.collapse":"\u6536\u8D77\u6D88\u606F","ui.message.copy":"\u590D\u5236","ui.message.copyMessage":"\u590D\u5236\u6D88\u606F","ui.message.forkMessage":"\u5206\u53C9\u5230\u65B0\u4F1A\u8BDD","ui.message.revertMessage":"\u91CD\u7F6E\u5230\u6B64\u70B9","ui.message.copyResponse":"\u590D\u5236\u56DE\u590D","ui.message.copied":"\u5DF2\u590D\u5236\uFF01","ui.message.interrupted":"\u5DF2\u4E2D\u65AD","ui.message.queued":"\u6392\u961F\u4E2D","ui.message.attachment.alt":"\u9644\u4EF6","ui.patch.action.deleted":"\u5DF2\u5220\u9664","ui.patch.action.created":"\u5DF2\u521B\u5EFA","ui.patch.action.moved":"\u5DF2\u79FB\u52A8","ui.patch.action.patched":"\u5DF2\u5E94\u7528\u8865\u4E01","ui.question.subtitle.answered":"{{count}} \u5DF2\u56DE\u7B54","ui.question.answer.none":"(\u65E0\u7B54\u6848)","ui.question.review.notAnswered":"(\u672A\u56DE\u7B54)","ui.question.multiHint":"\u53EF\u591A\u9009","ui.question.singleHint":"\u9009\u62E9\u4E00\u4E2A\u7B54\u6848","ui.question.custom.placeholder":"\u8F93\u5165\u4F60\u7684\u7B54\u6848...","ui.fileSearch.placeholder":"\u67E5\u627E","ui.fileSearch.previousMatch":"\u4E0A\u4E00\u4E2A","ui.fileSearch.nextMatch":"\u4E0B\u4E00\u4E2A","ui.fileSearch.close":"\u5173\u95ED\u641C\u7D22","ui.tool.task":"\u4EFB\u52A1","ui.tool.skill":"\u6280\u80FD","ui.basicTool.called":"\u8C03\u7528\u4E86 `{{tool}}`","ui.toolErrorCard.failed":"\u5931\u8D25","ui.toolErrorCard.copyError":"\u590D\u5236\u9519\u8BEF","ui.message.duration.seconds":"{{count}}\u79D2","ui.message.duration.minutesSeconds":"{{minutes}}\u5206 {{seconds}}\u79D2"};export{e as dict};
|