jialing-code 1.1.0
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/README.md +97 -0
- package/dist/chunk-065m026w.js +97 -0
- package/dist/chunk-06saje2v.js +39 -0
- package/dist/chunk-0731m51q.js +8 -0
- package/dist/chunk-0975ccyw.js +265 -0
- package/dist/chunk-09n3fjx5.js +67 -0
- package/dist/chunk-0bdjdzew.js +41 -0
- package/dist/chunk-0ce6kd7y.js +212 -0
- package/dist/chunk-0e1xsncc.js +969 -0
- package/dist/chunk-0m2861gw.js +154 -0
- package/dist/chunk-0paqc2yw.js +15 -0
- package/dist/chunk-0rg6yrhy.js +99 -0
- package/dist/chunk-0sakxrcf.js +643 -0
- package/dist/chunk-0v9hwxvz.js +105 -0
- package/dist/chunk-0vkfrmqm.js +690 -0
- package/dist/chunk-0vvfnhhv.js +248 -0
- package/dist/chunk-0w4rsycj.js +145 -0
- package/dist/chunk-0x9b2nmd.js +63 -0
- package/dist/chunk-0xjaqda8.js +1124 -0
- package/dist/chunk-1141xmr4.js +8 -0
- package/dist/chunk-13d1842d.js +154 -0
- package/dist/chunk-1921a6yb.js +32 -0
- package/dist/chunk-1ad8mk9g.js +527 -0
- package/dist/chunk-1ax41pws.js +28 -0
- package/dist/chunk-1c8z1b5v.js +16 -0
- package/dist/chunk-1cbn5kxf.js +7 -0
- package/dist/chunk-1eapde8a.js +726 -0
- package/dist/chunk-1h2famwb.js +49 -0
- package/dist/chunk-1jggnf7z.js +85 -0
- package/dist/chunk-1k92pn9c.js +32 -0
- package/dist/chunk-1qakq4sn.js +802 -0
- package/dist/chunk-1rvz0433.js +722 -0
- package/dist/chunk-1xkekb9y.js +19 -0
- package/dist/chunk-238g70xa.js +36 -0
- package/dist/chunk-24ge0eqa.js +106 -0
- package/dist/chunk-278vghwm.js +5395 -0
- package/dist/chunk-27xc1csx.js +104 -0
- package/dist/chunk-2a42s11t.js +412 -0
- package/dist/chunk-2aa02aw6.js +438 -0
- package/dist/chunk-2eykm0j0.js +20 -0
- package/dist/chunk-2gzv8nrw.js +205 -0
- package/dist/chunk-2k995y2x.js +880 -0
- package/dist/chunk-2nayx6q1.js +63 -0
- package/dist/chunk-2sd2w2h4.js +44 -0
- package/dist/chunk-2tw2ve8h.js +145 -0
- package/dist/chunk-30rst83v.js +168 -0
- package/dist/chunk-3aavh06g.js +1581 -0
- package/dist/chunk-3b0yvt2h.js +469 -0
- package/dist/chunk-3be7ka25.js +56 -0
- package/dist/chunk-3c25bcsw.js +17 -0
- package/dist/chunk-3dyxka97.js +584 -0
- package/dist/chunk-3f7rypmf.js +16544 -0
- package/dist/chunk-3fsd7f51.js +93 -0
- package/dist/chunk-3gqdqmzb.js +75 -0
- package/dist/chunk-3h8a89gy.js +46 -0
- package/dist/chunk-3m84sret.js +71 -0
- package/dist/chunk-3nb7j3js.js +96 -0
- package/dist/chunk-3p08nvn2.js +98 -0
- package/dist/chunk-3r09htpc.js +318 -0
- package/dist/chunk-3r24h7t6.js +113 -0
- package/dist/chunk-3rkfxjtq.js +80 -0
- package/dist/chunk-3tmk7dc2.js +604 -0
- package/dist/chunk-3w6s9m5w.js +16 -0
- package/dist/chunk-43qjymy5.js +92 -0
- package/dist/chunk-44fpr6jq.js +434 -0
- package/dist/chunk-45kxdsp8.js +444 -0
- package/dist/chunk-495d85x1.js +8066 -0
- package/dist/chunk-4ba796se.js +1095 -0
- package/dist/chunk-4g3v8y12.js +23 -0
- package/dist/chunk-4h53xj8n.js +3445 -0
- package/dist/chunk-4jm600zv.js +13 -0
- package/dist/chunk-4jy9dtwk.js +116 -0
- package/dist/chunk-4p60dd45.js +55 -0
- package/dist/chunk-4z0jsrqg.js +81 -0
- package/dist/chunk-4zfkzkt6.js +37 -0
- package/dist/chunk-55wgxwa9.js +13877 -0
- package/dist/chunk-5dbk24zg.js +890 -0
- package/dist/chunk-5hzvp4va.js +115 -0
- package/dist/chunk-5kbt1mbt.js +500 -0
- package/dist/chunk-5pen7vr8.js +176 -0
- package/dist/chunk-5r280eng.js +198 -0
- package/dist/chunk-5srym52s.js +88 -0
- package/dist/chunk-600kg7k6.js +41 -0
- package/dist/chunk-616w0qj3.js +160 -0
- package/dist/chunk-62jw1t8c.js +94 -0
- package/dist/chunk-62xmt9mk.js +372 -0
- package/dist/chunk-64bvg7c3.js +229 -0
- package/dist/chunk-65yhe4s0.js +281 -0
- package/dist/chunk-6aewh27m.js +102 -0
- package/dist/chunk-6bd8brc4.js +48 -0
- package/dist/chunk-6dj5t602.js +341 -0
- package/dist/chunk-6exxdk1p.js +6956 -0
- package/dist/chunk-6f5j8fs0.js +752 -0
- package/dist/chunk-6g62sjpf.js +328 -0
- package/dist/chunk-6gecq2ta.js +1493 -0
- package/dist/chunk-6gr3c3w9.js +378 -0
- package/dist/chunk-6kpbgc5w.js +23 -0
- package/dist/chunk-6kseqw79.js +154 -0
- package/dist/chunk-6mxm1qd0.js +40764 -0
- package/dist/chunk-6n2qgm9v.js +8 -0
- package/dist/chunk-6tq2v3rk.js +186 -0
- package/dist/chunk-6wsdhj3v.js +93 -0
- package/dist/chunk-6zw9fhgb.js +4389 -0
- package/dist/chunk-71grc1mw.js +111 -0
- package/dist/chunk-73rpbt04.js +1947 -0
- package/dist/chunk-748feghg.js +604 -0
- package/dist/chunk-75e8gtg9.js +84 -0
- package/dist/chunk-75th4717.js +780 -0
- package/dist/chunk-760252na.js +101 -0
- package/dist/chunk-7739pg2c.js +4261 -0
- package/dist/chunk-778fnx46.js +472 -0
- package/dist/chunk-77g09znh.js +391 -0
- package/dist/chunk-7aw745vx.js +40175 -0
- package/dist/chunk-7m2nd8da.js +110 -0
- package/dist/chunk-7n35vjtw.js +444 -0
- package/dist/chunk-7n5ss4sh.js +144 -0
- package/dist/chunk-7rjnxcfe.js +107 -0
- package/dist/chunk-7sb5axvf.js +122 -0
- package/dist/chunk-7wm5s02e.js +216 -0
- package/dist/chunk-7ymfj7m3.js +151 -0
- package/dist/chunk-7z8j9qfn.js +121 -0
- package/dist/chunk-7zsapntc.js +216 -0
- package/dist/chunk-805fhkfh.js +908 -0
- package/dist/chunk-80k1nj24.js +253 -0
- package/dist/chunk-83hfzbx3.js +10 -0
- package/dist/chunk-85cypsdd.js +92 -0
- package/dist/chunk-8760caxf.js +2644 -0
- package/dist/chunk-88f6egg6.js +387 -0
- package/dist/chunk-88r7kwgj.js +22 -0
- package/dist/chunk-89e1v45e.js +463 -0
- package/dist/chunk-8bedvdm1.js +32 -0
- package/dist/chunk-8c4x4vdz.js +177 -0
- package/dist/chunk-8hq5kk3y.js +44 -0
- package/dist/chunk-8ngxagxq.js +18 -0
- package/dist/chunk-8tnsngw2.js +31 -0
- package/dist/chunk-8wjnca8h.js +307 -0
- package/dist/chunk-8y12jxg8.js +10 -0
- package/dist/chunk-8ymf4e6z.js +48 -0
- package/dist/chunk-90wp6wez.js +10510 -0
- package/dist/chunk-92bp5bnf.js +650 -0
- package/dist/chunk-92q8sx5z.js +90 -0
- package/dist/chunk-958rtmtx.js +10476 -0
- package/dist/chunk-9e2kqv5g.js +125 -0
- package/dist/chunk-9f4f1hy5.js +281 -0
- package/dist/chunk-9gbamk79.js +93 -0
- package/dist/chunk-9k5s3ryh.js +167 -0
- package/dist/chunk-9xzfqm15.js +97 -0
- package/dist/chunk-9zgdvbm6.js +110 -0
- package/dist/chunk-a0p3q8jw.js +24 -0
- package/dist/chunk-a22sayzp.js +220 -0
- package/dist/chunk-a8ejc632.js +3094 -0
- package/dist/chunk-a8gj9d9z.js +120 -0
- package/dist/chunk-a9vdeb6y.js +258 -0
- package/dist/chunk-a9yev47v.js +674 -0
- package/dist/chunk-a9zh40sj.js +48 -0
- package/dist/chunk-ack5mfba.js +105 -0
- package/dist/chunk-ae76ded0.js +30 -0
- package/dist/chunk-akjw4dh6.js +538 -0
- package/dist/chunk-asc6wz4q.js +1188 -0
- package/dist/chunk-atqejh3p.js +273 -0
- package/dist/chunk-atv2e6b7.js +61 -0
- package/dist/chunk-axvvkwz8.js +1551 -0
- package/dist/chunk-azgz7kj9.js +38 -0
- package/dist/chunk-b3zave8q.js +275 -0
- package/dist/chunk-b4wg70y1.js +54 -0
- package/dist/chunk-b8b13qn2.js +100 -0
- package/dist/chunk-bg3mt9bm.js +28 -0
- package/dist/chunk-bh4jvcjn.js +91 -0
- package/dist/chunk-bhdt6k7w.js +15 -0
- package/dist/chunk-bm1qb16p.js +17 -0
- package/dist/chunk-bpvsd1j1.js +266 -0
- package/dist/chunk-bqfnp99q.js +477 -0
- package/dist/chunk-bsbmmfyt.js +17 -0
- package/dist/chunk-bsbt34jm.js +42 -0
- package/dist/chunk-c78akdhr.js +458 -0
- package/dist/chunk-cdz5yb0r.js +57 -0
- package/dist/chunk-cfv996bs.js +22 -0
- package/dist/chunk-cgfdkzhb.js +12 -0
- package/dist/chunk-ckh4r5er.js +257 -0
- package/dist/chunk-cmgjnvn9.js +89 -0
- package/dist/chunk-cpjgvay8.js +687 -0
- package/dist/chunk-crfryjx9.js +276 -0
- package/dist/chunk-ctw5jwcd.js +213 -0
- package/dist/chunk-cvy3vntc.js +65 -0
- package/dist/chunk-cwbzz504.js +94 -0
- package/dist/chunk-cy2hswr1.js +15 -0
- package/dist/chunk-cyejkay3.js +222 -0
- package/dist/chunk-d18z9pna.js +106 -0
- package/dist/chunk-d5cq0n0v.js +162 -0
- package/dist/chunk-db45aryp.js +50 -0
- package/dist/chunk-de8nqh0z.js +790 -0
- package/dist/chunk-dfw6h350.js +2336 -0
- package/dist/chunk-dgqrcy74.js +48 -0
- package/dist/chunk-dn75ptgd.js +184 -0
- package/dist/chunk-dnh7jtpb.js +37 -0
- package/dist/chunk-dpshyv9m.js +90 -0
- package/dist/chunk-dt8cdvnm.js +642 -0
- package/dist/chunk-dtxby6fr.js +306 -0
- package/dist/chunk-dv1wfr85.js +6373 -0
- package/dist/chunk-dw363edx.js +1154 -0
- package/dist/chunk-dwrdacck.js +62 -0
- package/dist/chunk-dxnnv5e3.js +276 -0
- package/dist/chunk-e3g8q4cn.js +1646 -0
- package/dist/chunk-e3m9k9s2.js +542 -0
- package/dist/chunk-e4q49asn.js +155 -0
- package/dist/chunk-e5pntxye.js +37 -0
- package/dist/chunk-e7393td6.js +42 -0
- package/dist/chunk-ead42yrh.js +87 -0
- package/dist/chunk-eb90vwvr.js +152 -0
- package/dist/chunk-ecvwk9hg.js +250 -0
- package/dist/chunk-edjd6aay.js +173 -0
- package/dist/chunk-eg0h8mtm.js +130 -0
- package/dist/chunk-ehtwnxpg.js +1591 -0
- package/dist/chunk-ek686gx1.js +94 -0
- package/dist/chunk-eqp1rfft.js +17 -0
- package/dist/chunk-evhwt0ar.js +1015 -0
- package/dist/chunk-ewadzrm8.js +103 -0
- package/dist/chunk-ewsgsw9h.js +172291 -0
- package/dist/chunk-f0pa0r7e.js +3198 -0
- package/dist/chunk-f2mhrmww.js +62 -0
- package/dist/chunk-f39zxvwn.js +401 -0
- package/dist/chunk-f46z54tq.js +374 -0
- package/dist/chunk-f5ma3nh5.js +3436 -0
- package/dist/chunk-f60q23az.js +3038 -0
- package/dist/chunk-f6v2nz57.js +107 -0
- package/dist/chunk-f6yjan38.js +38 -0
- package/dist/chunk-fbv4apne.js +51 -0
- package/dist/chunk-fem4s778.js +70 -0
- package/dist/chunk-fezm1kn8.js +376 -0
- package/dist/chunk-fm1n3ysp.js +6108 -0
- package/dist/chunk-frg83bfw.js +225 -0
- package/dist/chunk-fscm8db0.js +692 -0
- package/dist/chunk-fyc5fepv.js +10 -0
- package/dist/chunk-g0j0t6qk.js +26 -0
- package/dist/chunk-g0nc1ftf.js +849 -0
- package/dist/chunk-g338npwr.js +1061 -0
- package/dist/chunk-g3t0act8.js +8 -0
- package/dist/chunk-g75w4hw3.js +26 -0
- package/dist/chunk-g8vp82en.js +1866 -0
- package/dist/chunk-gax0fcbx.js +182 -0
- package/dist/chunk-gsz4dh3y.js +606 -0
- package/dist/chunk-gtfffm7h.js +440 -0
- package/dist/chunk-gver9zb9.js +420 -0
- package/dist/chunk-gyj242zr.js +20 -0
- package/dist/chunk-h0qngp9w.js +157 -0
- package/dist/chunk-h14kemnk.js +123 -0
- package/dist/chunk-h8wj1a74.js +8960 -0
- package/dist/chunk-h9mcb2eg.js +87 -0
- package/dist/chunk-h9nh2980.js +91 -0
- package/dist/chunk-hakdhagh.js +16606 -0
- package/dist/chunk-hbc6ymdv.js +55 -0
- package/dist/chunk-hh7cmy4k.js +20 -0
- package/dist/chunk-hjhc4cpt.js +69 -0
- package/dist/chunk-hjwez8qc.js +5018 -0
- package/dist/chunk-hk9xz7gk.js +118 -0
- package/dist/chunk-hqmz36b3.js +552 -0
- package/dist/chunk-hrzerbfw.js +1299 -0
- package/dist/chunk-hs8ph4p8.js +8 -0
- package/dist/chunk-ht1xwrnd.js +716 -0
- package/dist/chunk-hvmfg2dc.js +338 -0
- package/dist/chunk-hx2tr4ep.js +7189 -0
- package/dist/chunk-hzhe8ygc.js +547 -0
- package/dist/chunk-j2k4p94p.js +55 -0
- package/dist/chunk-j3a4p81y.js +184 -0
- package/dist/chunk-j49g6g3s.js +57 -0
- package/dist/chunk-j5d5hp9h.js +71 -0
- package/dist/chunk-j64ga6ta.js +8035 -0
- package/dist/chunk-j7tyxan1.js +116 -0
- package/dist/chunk-j8v4774z.js +424 -0
- package/dist/chunk-jafes477.js +29 -0
- package/dist/chunk-jd32zbps.js +15 -0
- package/dist/chunk-jdgeec04.js +4249 -0
- package/dist/chunk-jftd4jq5.js +4521 -0
- package/dist/chunk-jkxqhv6y.js +812 -0
- package/dist/chunk-jmfr6h0n.js +120 -0
- package/dist/chunk-jn4aabmx.js +40 -0
- package/dist/chunk-jnhkref0.js +30 -0
- package/dist/chunk-jsbpm1gz.js +27 -0
- package/dist/chunk-jtcyjc3k.js +5802 -0
- package/dist/chunk-jx817w05.js +11 -0
- package/dist/chunk-jzmz18nn.js +65 -0
- package/dist/chunk-k0p9w03v.js +4957 -0
- package/dist/chunk-k3dcdnck.js +89 -0
- package/dist/chunk-k3wadzcd.js +88 -0
- package/dist/chunk-kaeshsk1.js +713 -0
- package/dist/chunk-kbkey9ed.js +522 -0
- package/dist/chunk-kcwfhqbb.js +196 -0
- package/dist/chunk-key6jr7p.js +224 -0
- package/dist/chunk-knay8cy9.js +173 -0
- package/dist/chunk-kr3rg2y1.js +95 -0
- package/dist/chunk-kwekc97v.js +18 -0
- package/dist/chunk-m06q12hg.js +61 -0
- package/dist/chunk-m2mcpbhk.js +43 -0
- package/dist/chunk-m8v220gz.js +71 -0
- package/dist/chunk-mgpqy78h.js +208 -0
- package/dist/chunk-mkejwh4t.js +16 -0
- package/dist/chunk-mptyw5n1.js +107 -0
- package/dist/chunk-mqajm0dp.js +66 -0
- package/dist/chunk-mrksbgxj.js +490 -0
- package/dist/chunk-msjfc5ba.js +246 -0
- package/dist/chunk-mt25echc.js +6157 -0
- package/dist/chunk-mt3jfnr8.js +277 -0
- package/dist/chunk-mtn242d4.js +9300 -0
- package/dist/chunk-mzfkvave.js +169 -0
- package/dist/chunk-n0qaeaa5.js +256 -0
- package/dist/chunk-n1erf6kh.js +22820 -0
- package/dist/chunk-n2avk1r2.js +61 -0
- package/dist/chunk-n6atnpcq.js +765 -0
- package/dist/chunk-n7ttdtk0.js +641 -0
- package/dist/chunk-ncnfzby5.js +822 -0
- package/dist/chunk-ncnr1jtf.js +2058 -0
- package/dist/chunk-nerv0jvx.js +74 -0
- package/dist/chunk-ngd2abep.js +90 -0
- package/dist/chunk-nka1g8f4.js +773 -0
- package/dist/chunk-nnaxkc2z.js +128 -0
- package/dist/chunk-npyrtj8j.js +691 -0
- package/dist/chunk-nq0fxyxh.js +752 -0
- package/dist/chunk-nrmffak7.js +114 -0
- package/dist/chunk-nsz546wq.js +1170 -0
- package/dist/chunk-nt837qt9.js +21 -0
- package/dist/chunk-nv64x1z5.js +86 -0
- package/dist/chunk-nxsh6de2.js +1711 -0
- package/dist/chunk-nz4getcr.js +40 -0
- package/dist/chunk-p1f607pa.js +83 -0
- package/dist/chunk-p2816w9z.js +1486 -0
- package/dist/chunk-p2d5nh3g.js +342 -0
- package/dist/chunk-p4r5y02t.js +90 -0
- package/dist/chunk-p7g7pf3f.js +336 -0
- package/dist/chunk-pb4ad8r2.js +110 -0
- package/dist/chunk-pbrhz0zr.js +716 -0
- package/dist/chunk-ps49ymvj.js +43 -0
- package/dist/chunk-pwnt3veb.js +103 -0
- package/dist/chunk-pwwa7s62.js +11 -0
- package/dist/chunk-px3w0kde.js +299 -0
- package/dist/chunk-pzn777jb.js +756 -0
- package/dist/chunk-q25bjaev.js +15 -0
- package/dist/chunk-q5by3da6.js +8 -0
- package/dist/chunk-q6av622g.js +38 -0
- package/dist/chunk-q6xkvtf2.js +1318 -0
- package/dist/chunk-q81jx1tq.js +476 -0
- package/dist/chunk-qehb6fk5.js +339 -0
- package/dist/chunk-qj1avx1q.js +87 -0
- package/dist/chunk-qn2dxr66.js +105 -0
- package/dist/chunk-qnfx3qtx.js +617 -0
- package/dist/chunk-qp18kd4h.js +48 -0
- package/dist/chunk-qp2qdcda.js +100 -0
- package/dist/chunk-qpjy9tcf.js +133 -0
- package/dist/chunk-qqfa0dqg.js +2343 -0
- package/dist/chunk-qwh3htcz.js +202 -0
- package/dist/chunk-qz2x630m.js +49145 -0
- package/dist/chunk-r3vakcs1.js +496 -0
- package/dist/chunk-r66hz8j6.js +34 -0
- package/dist/chunk-r6b58y3x.js +17 -0
- package/dist/chunk-rekp48rk.js +62 -0
- package/dist/chunk-rn0v1hk8.js +34 -0
- package/dist/chunk-rs1xrs6m.js +534 -0
- package/dist/chunk-rs45skes.js +123 -0
- package/dist/chunk-rzszqp82.js +524 -0
- package/dist/chunk-s274nv8k.js +8 -0
- package/dist/chunk-s3pzvdss.js +50 -0
- package/dist/chunk-s9mesaw0.js +26840 -0
- package/dist/chunk-sd36yzx8.js +954 -0
- package/dist/chunk-sdj9b9wh.js +782 -0
- package/dist/chunk-sdw2q69p.js +227 -0
- package/dist/chunk-sfgp9cc0.js +130 -0
- package/dist/chunk-spqaamnc.js +63 -0
- package/dist/chunk-spzrs4df.js +73 -0
- package/dist/chunk-sxkr7k43.js +55 -0
- package/dist/chunk-szj5wvdy.js +28 -0
- package/dist/chunk-t0rgmccj.js +39 -0
- package/dist/chunk-t1nnzjgg.js +17 -0
- package/dist/chunk-t94fcnt8.js +566 -0
- package/dist/chunk-tjaqa99q.js +125 -0
- package/dist/chunk-tjq2evtw.js +328 -0
- package/dist/chunk-ts2p6bv1.js +224 -0
- package/dist/chunk-ttk5dzz8.js +25 -0
- package/dist/chunk-tw0q7ynt.js +59 -0
- package/dist/chunk-v02jkvgy.js +131 -0
- package/dist/chunk-v084bqt3.js +1529 -0
- package/dist/chunk-v0amythm.js +164 -0
- package/dist/chunk-v1kzp02e.js +785 -0
- package/dist/chunk-v1mgv1et.js +15 -0
- package/dist/chunk-v399mzxk.js +58 -0
- package/dist/chunk-v3gm2day.js +8 -0
- package/dist/chunk-v43hrrxp.js +71 -0
- package/dist/chunk-v6aqb2aj.js +102 -0
- package/dist/chunk-v78fj8by.js +145 -0
- package/dist/chunk-v7qmhjdn.js +1921 -0
- package/dist/chunk-v9smspw2.js +4301 -0
- package/dist/chunk-vdw93s4h.js +2431 -0
- package/dist/chunk-vest0y6x.js +3830 -0
- package/dist/chunk-vf5sd1nq.js +12 -0
- package/dist/chunk-vratq94g.js +349 -0
- package/dist/chunk-vrz7t3m3.js +20 -0
- package/dist/chunk-vtb185z9.js +70 -0
- package/dist/chunk-vx01rvg8.js +654 -0
- package/dist/chunk-vyc0rjyx.js +31 -0
- package/dist/chunk-vyjeh50y.js +2149 -0
- package/dist/chunk-vzpffsza.js +269 -0
- package/dist/chunk-w2ef3kxk.js +3353 -0
- package/dist/chunk-w2z5pqd3.js +336 -0
- package/dist/chunk-w3whm4mn.js +432 -0
- package/dist/chunk-w7wgpqcp.js +157 -0
- package/dist/chunk-waa00cvb.js +301 -0
- package/dist/chunk-wb0qm4es.js +155 -0
- package/dist/chunk-wbkahkdc.js +27 -0
- package/dist/chunk-wfz0qffj.js +3939 -0
- package/dist/chunk-wn0cx0pt.js +283 -0
- package/dist/chunk-wv6gzt9c.js +726 -0
- package/dist/chunk-wx42ycm4.js +998 -0
- package/dist/chunk-wxkpgy05.js +268 -0
- package/dist/chunk-wzpdet3m.js +843 -0
- package/dist/chunk-x0mwzt38.js +714 -0
- package/dist/chunk-x592wbfh.js +244 -0
- package/dist/chunk-x5pqsp9r.js +100 -0
- package/dist/chunk-x679thag.js +825 -0
- package/dist/chunk-x8b7vft8.js +132 -0
- package/dist/chunk-x8cftch7.js +119 -0
- package/dist/chunk-x9q7r885.js +348 -0
- package/dist/chunk-xawkt0vb.js +1585 -0
- package/dist/chunk-xdw5dv00.js +8 -0
- package/dist/chunk-xe9cc860.js +287 -0
- package/dist/chunk-xjr9c3vt.js +101 -0
- package/dist/chunk-xk7zaqta.js +21933 -0
- package/dist/chunk-xktbmawc.js +678 -0
- package/dist/chunk-xn6yw46v.js +140 -0
- package/dist/chunk-xsq9ae7x.js +90 -0
- package/dist/chunk-xszk7n10.js +14358 -0
- package/dist/chunk-xt8a5r1t.js +84 -0
- package/dist/chunk-xydyndkv.js +195 -0
- package/dist/chunk-xzt10yc5.js +60 -0
- package/dist/chunk-y04y95dr.js +91 -0
- package/dist/chunk-y1784krc.js +19 -0
- package/dist/chunk-y1x32h3x.js +128 -0
- package/dist/chunk-y3s7aww5.js +99 -0
- package/dist/chunk-y47cg3kz.js +42 -0
- package/dist/chunk-y7kzvepn.js +469 -0
- package/dist/chunk-y89kbsyc.js +287 -0
- package/dist/chunk-yd87p1c3.js +159 -0
- package/dist/chunk-yf3yw8fw.js +105 -0
- package/dist/chunk-ygbf0ezx.js +1391 -0
- package/dist/chunk-yjbxnshv.js +208 -0
- package/dist/chunk-ynednmqd.js +192 -0
- package/dist/chunk-yvhez44y.js +259 -0
- package/dist/chunk-ywxd4qw4.js +22 -0
- package/dist/chunk-yzrmgpy4.js +117 -0
- package/dist/chunk-z0b2vb24.js +862 -0
- package/dist/chunk-z1zj044v.js +655 -0
- package/dist/chunk-z2dp53wn.js +17 -0
- package/dist/chunk-z3w0xasa.js +165 -0
- package/dist/chunk-z7ycmrb3.js +644 -0
- package/dist/chunk-zh11tdkb.js +347 -0
- package/dist/chunk-zk2wsm7d.js +15 -0
- package/dist/chunk-zqfqcf22.js +229 -0
- package/dist/chunk-zqk2j8px.js +699 -0
- package/dist/chunk-zqvsc10j.js +2833 -0
- package/dist/chunk-zsfxha74.js +17655 -0
- package/dist/chunk-zvc4snyb.js +117 -0
- package/dist/cli.js +194 -0
- package/package.json +173 -0
|
@@ -0,0 +1,4389 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
InternalServerException,
|
|
4
|
+
ModelStreamErrorException,
|
|
5
|
+
ThrottlingException,
|
|
6
|
+
ValidationException,
|
|
7
|
+
fromArrayBuffer,
|
|
8
|
+
fromString,
|
|
9
|
+
fromUtf8,
|
|
10
|
+
init_dist_es,
|
|
11
|
+
init_dist_es1 as init_dist_es2,
|
|
12
|
+
init_dist_es2 as init_dist_es3,
|
|
13
|
+
toUtf8
|
|
14
|
+
} from "./chunk-jftd4jq5.js";
|
|
15
|
+
import"./chunk-edjd6aay.js";
|
|
16
|
+
import"./chunk-yjbxnshv.js";
|
|
17
|
+
import"./chunk-3h8a89gy.js";
|
|
18
|
+
import"./chunk-6exxdk1p.js";
|
|
19
|
+
import"./chunk-n7ttdtk0.js";
|
|
20
|
+
import"./chunk-wzpdet3m.js";
|
|
21
|
+
import"./chunk-p2d5nh3g.js";
|
|
22
|
+
import {
|
|
23
|
+
init_sdk
|
|
24
|
+
} from "./chunk-4g3v8y12.js";
|
|
25
|
+
import {
|
|
26
|
+
APIError,
|
|
27
|
+
AnthropicError,
|
|
28
|
+
BaseAnthropic,
|
|
29
|
+
Beta,
|
|
30
|
+
Completions,
|
|
31
|
+
Messages,
|
|
32
|
+
Stream,
|
|
33
|
+
init_client,
|
|
34
|
+
init_error,
|
|
35
|
+
init_error1 as init_error2,
|
|
36
|
+
init_resources,
|
|
37
|
+
init_streaming
|
|
38
|
+
} from "./chunk-7739pg2c.js";
|
|
39
|
+
import"./chunk-jzmz18nn.js";
|
|
40
|
+
import"./chunk-n0qaeaa5.js";
|
|
41
|
+
import"./chunk-2k995y2x.js";
|
|
42
|
+
import {
|
|
43
|
+
require_dist_cjs1 as require_dist_cjs
|
|
44
|
+
} from "./chunk-wfz0qffj.js";
|
|
45
|
+
import"./chunk-b4wg70y1.js";
|
|
46
|
+
import"./chunk-nka1g8f4.js";
|
|
47
|
+
import"./chunk-30rst83v.js";
|
|
48
|
+
import"./chunk-j2k4p94p.js";
|
|
49
|
+
import"./chunk-hk9xz7gk.js";
|
|
50
|
+
import"./chunk-xsq9ae7x.js";
|
|
51
|
+
import"./chunk-2nayx6q1.js";
|
|
52
|
+
import {
|
|
53
|
+
__commonJS,
|
|
54
|
+
__esm,
|
|
55
|
+
__require,
|
|
56
|
+
__toESM
|
|
57
|
+
} from "./chunk-qp2qdcda.js";
|
|
58
|
+
|
|
59
|
+
// node_modules/.bun/tslib@1.14.1/node_modules/tslib/tslib.js
|
|
60
|
+
var require_tslib = __commonJS((exports, module) => {
|
|
61
|
+
/*! *****************************************************************************
|
|
62
|
+
Copyright (c) Microsoft Corporation.
|
|
63
|
+
|
|
64
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
65
|
+
purpose with or without fee is hereby granted.
|
|
66
|
+
|
|
67
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
68
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
69
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
70
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
71
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
72
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
73
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
74
|
+
***************************************************************************** */
|
|
75
|
+
var __extends;
|
|
76
|
+
var __assign;
|
|
77
|
+
var __rest;
|
|
78
|
+
var __decorate;
|
|
79
|
+
var __param;
|
|
80
|
+
var __metadata;
|
|
81
|
+
var __awaiter;
|
|
82
|
+
var __generator;
|
|
83
|
+
var __exportStar;
|
|
84
|
+
var __values;
|
|
85
|
+
var __read;
|
|
86
|
+
var __spread;
|
|
87
|
+
var __spreadArrays;
|
|
88
|
+
var __await;
|
|
89
|
+
var __asyncGenerator;
|
|
90
|
+
var __asyncDelegator;
|
|
91
|
+
var __asyncValues;
|
|
92
|
+
var __makeTemplateObject;
|
|
93
|
+
var __importStar;
|
|
94
|
+
var __importDefault;
|
|
95
|
+
var __classPrivateFieldGet;
|
|
96
|
+
var __classPrivateFieldSet;
|
|
97
|
+
var __createBinding;
|
|
98
|
+
(function(factory) {
|
|
99
|
+
var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
|
|
100
|
+
if (typeof define === "function" && define.amd) {
|
|
101
|
+
define("tslib", ["exports"], function(exports2) {
|
|
102
|
+
factory(createExporter(root, createExporter(exports2)));
|
|
103
|
+
});
|
|
104
|
+
} else if (typeof module === "object" && typeof exports === "object") {
|
|
105
|
+
factory(createExporter(root, createExporter(exports)));
|
|
106
|
+
} else {
|
|
107
|
+
factory(createExporter(root));
|
|
108
|
+
}
|
|
109
|
+
function createExporter(exports2, previous) {
|
|
110
|
+
if (exports2 !== root) {
|
|
111
|
+
if (typeof Object.create === "function") {
|
|
112
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
113
|
+
} else {
|
|
114
|
+
exports2.__esModule = true;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return function(id, v) {
|
|
118
|
+
return exports2[id] = previous ? previous(id, v) : v;
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
})(function(exporter) {
|
|
122
|
+
var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
|
|
123
|
+
d.__proto__ = b;
|
|
124
|
+
} || function(d, b) {
|
|
125
|
+
for (var p in b)
|
|
126
|
+
if (b.hasOwnProperty(p))
|
|
127
|
+
d[p] = b[p];
|
|
128
|
+
};
|
|
129
|
+
__extends = function(d, b) {
|
|
130
|
+
extendStatics(d, b);
|
|
131
|
+
function __() {
|
|
132
|
+
this.constructor = d;
|
|
133
|
+
}
|
|
134
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __);
|
|
135
|
+
};
|
|
136
|
+
__assign = Object.assign || function(t) {
|
|
137
|
+
for (var s, i = 1, n = arguments.length;i < n; i++) {
|
|
138
|
+
s = arguments[i];
|
|
139
|
+
for (var p in s)
|
|
140
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
141
|
+
t[p] = s[p];
|
|
142
|
+
}
|
|
143
|
+
return t;
|
|
144
|
+
};
|
|
145
|
+
__rest = function(s, e) {
|
|
146
|
+
var t = {};
|
|
147
|
+
for (var p in s)
|
|
148
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
149
|
+
t[p] = s[p];
|
|
150
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
151
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s);i < p.length; i++) {
|
|
152
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
153
|
+
t[p[i]] = s[p[i]];
|
|
154
|
+
}
|
|
155
|
+
return t;
|
|
156
|
+
};
|
|
157
|
+
__decorate = function(decorators, target, key, desc) {
|
|
158
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
159
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
160
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
161
|
+
else
|
|
162
|
+
for (var i = decorators.length - 1;i >= 0; i--)
|
|
163
|
+
if (d = decorators[i])
|
|
164
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
165
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
166
|
+
};
|
|
167
|
+
__param = function(paramIndex, decorator) {
|
|
168
|
+
return function(target, key) {
|
|
169
|
+
decorator(target, key, paramIndex);
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
__metadata = function(metadataKey, metadataValue) {
|
|
173
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
174
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
175
|
+
};
|
|
176
|
+
__awaiter = function(thisArg, _arguments, P, generator) {
|
|
177
|
+
function adopt(value) {
|
|
178
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
179
|
+
resolve(value);
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
183
|
+
function fulfilled(value) {
|
|
184
|
+
try {
|
|
185
|
+
step(generator.next(value));
|
|
186
|
+
} catch (e) {
|
|
187
|
+
reject(e);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
function rejected(value) {
|
|
191
|
+
try {
|
|
192
|
+
step(generator["throw"](value));
|
|
193
|
+
} catch (e) {
|
|
194
|
+
reject(e);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
function step(result) {
|
|
198
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
199
|
+
}
|
|
200
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
201
|
+
});
|
|
202
|
+
};
|
|
203
|
+
__generator = function(thisArg, body) {
|
|
204
|
+
var _ = { label: 0, sent: function() {
|
|
205
|
+
if (t[0] & 1)
|
|
206
|
+
throw t[1];
|
|
207
|
+
return t[1];
|
|
208
|
+
}, trys: [], ops: [] }, f, y, t, g;
|
|
209
|
+
return g = { next: verb(0), throw: verb(1), return: verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
210
|
+
return this;
|
|
211
|
+
}), g;
|
|
212
|
+
function verb(n) {
|
|
213
|
+
return function(v) {
|
|
214
|
+
return step([n, v]);
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
function step(op) {
|
|
218
|
+
if (f)
|
|
219
|
+
throw new TypeError("Generator is already executing.");
|
|
220
|
+
while (_)
|
|
221
|
+
try {
|
|
222
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
223
|
+
return t;
|
|
224
|
+
if (y = 0, t)
|
|
225
|
+
op = [op[0] & 2, t.value];
|
|
226
|
+
switch (op[0]) {
|
|
227
|
+
case 0:
|
|
228
|
+
case 1:
|
|
229
|
+
t = op;
|
|
230
|
+
break;
|
|
231
|
+
case 4:
|
|
232
|
+
_.label++;
|
|
233
|
+
return { value: op[1], done: false };
|
|
234
|
+
case 5:
|
|
235
|
+
_.label++;
|
|
236
|
+
y = op[1];
|
|
237
|
+
op = [0];
|
|
238
|
+
continue;
|
|
239
|
+
case 7:
|
|
240
|
+
op = _.ops.pop();
|
|
241
|
+
_.trys.pop();
|
|
242
|
+
continue;
|
|
243
|
+
default:
|
|
244
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
245
|
+
_ = 0;
|
|
246
|
+
continue;
|
|
247
|
+
}
|
|
248
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
249
|
+
_.label = op[1];
|
|
250
|
+
break;
|
|
251
|
+
}
|
|
252
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
253
|
+
_.label = t[1];
|
|
254
|
+
t = op;
|
|
255
|
+
break;
|
|
256
|
+
}
|
|
257
|
+
if (t && _.label < t[2]) {
|
|
258
|
+
_.label = t[2];
|
|
259
|
+
_.ops.push(op);
|
|
260
|
+
break;
|
|
261
|
+
}
|
|
262
|
+
if (t[2])
|
|
263
|
+
_.ops.pop();
|
|
264
|
+
_.trys.pop();
|
|
265
|
+
continue;
|
|
266
|
+
}
|
|
267
|
+
op = body.call(thisArg, _);
|
|
268
|
+
} catch (e) {
|
|
269
|
+
op = [6, e];
|
|
270
|
+
y = 0;
|
|
271
|
+
} finally {
|
|
272
|
+
f = t = 0;
|
|
273
|
+
}
|
|
274
|
+
if (op[0] & 5)
|
|
275
|
+
throw op[1];
|
|
276
|
+
return { value: op[0] ? op[1] : undefined, done: true };
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
__createBinding = function(o, m, k, k2) {
|
|
280
|
+
if (k2 === undefined)
|
|
281
|
+
k2 = k;
|
|
282
|
+
o[k2] = m[k];
|
|
283
|
+
};
|
|
284
|
+
__exportStar = function(m, exports2) {
|
|
285
|
+
for (var p in m)
|
|
286
|
+
if (p !== "default" && !exports2.hasOwnProperty(p))
|
|
287
|
+
exports2[p] = m[p];
|
|
288
|
+
};
|
|
289
|
+
__values = function(o) {
|
|
290
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
291
|
+
if (m)
|
|
292
|
+
return m.call(o);
|
|
293
|
+
if (o && typeof o.length === "number")
|
|
294
|
+
return {
|
|
295
|
+
next: function() {
|
|
296
|
+
if (o && i >= o.length)
|
|
297
|
+
o = undefined;
|
|
298
|
+
return { value: o && o[i++], done: !o };
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
302
|
+
};
|
|
303
|
+
__read = function(o, n) {
|
|
304
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
305
|
+
if (!m)
|
|
306
|
+
return o;
|
|
307
|
+
var i = m.call(o), r, ar = [], e;
|
|
308
|
+
try {
|
|
309
|
+
while ((n === undefined || n-- > 0) && !(r = i.next()).done)
|
|
310
|
+
ar.push(r.value);
|
|
311
|
+
} catch (error) {
|
|
312
|
+
e = { error };
|
|
313
|
+
} finally {
|
|
314
|
+
try {
|
|
315
|
+
if (r && !r.done && (m = i["return"]))
|
|
316
|
+
m.call(i);
|
|
317
|
+
} finally {
|
|
318
|
+
if (e)
|
|
319
|
+
throw e.error;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
return ar;
|
|
323
|
+
};
|
|
324
|
+
__spread = function() {
|
|
325
|
+
for (var ar = [], i = 0;i < arguments.length; i++)
|
|
326
|
+
ar = ar.concat(__read(arguments[i]));
|
|
327
|
+
return ar;
|
|
328
|
+
};
|
|
329
|
+
__spreadArrays = function() {
|
|
330
|
+
for (var s = 0, i = 0, il = arguments.length;i < il; i++)
|
|
331
|
+
s += arguments[i].length;
|
|
332
|
+
for (var r = Array(s), k = 0, i = 0;i < il; i++)
|
|
333
|
+
for (var a = arguments[i], j = 0, jl = a.length;j < jl; j++, k++)
|
|
334
|
+
r[k] = a[j];
|
|
335
|
+
return r;
|
|
336
|
+
};
|
|
337
|
+
__await = function(v) {
|
|
338
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
339
|
+
};
|
|
340
|
+
__asyncGenerator = function(thisArg, _arguments, generator) {
|
|
341
|
+
if (!Symbol.asyncIterator)
|
|
342
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
343
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
344
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
|
|
345
|
+
return this;
|
|
346
|
+
}, i;
|
|
347
|
+
function verb(n) {
|
|
348
|
+
if (g[n])
|
|
349
|
+
i[n] = function(v) {
|
|
350
|
+
return new Promise(function(a, b) {
|
|
351
|
+
q.push([n, v, a, b]) > 1 || resume(n, v);
|
|
352
|
+
});
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
function resume(n, v) {
|
|
356
|
+
try {
|
|
357
|
+
step(g[n](v));
|
|
358
|
+
} catch (e) {
|
|
359
|
+
settle(q[0][3], e);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
function step(r) {
|
|
363
|
+
r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
|
|
364
|
+
}
|
|
365
|
+
function fulfill(value) {
|
|
366
|
+
resume("next", value);
|
|
367
|
+
}
|
|
368
|
+
function reject(value) {
|
|
369
|
+
resume("throw", value);
|
|
370
|
+
}
|
|
371
|
+
function settle(f, v) {
|
|
372
|
+
if (f(v), q.shift(), q.length)
|
|
373
|
+
resume(q[0][0], q[0][1]);
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
__asyncDelegator = function(o) {
|
|
377
|
+
var i, p;
|
|
378
|
+
return i = {}, verb("next"), verb("throw", function(e) {
|
|
379
|
+
throw e;
|
|
380
|
+
}), verb("return"), i[Symbol.iterator] = function() {
|
|
381
|
+
return this;
|
|
382
|
+
}, i;
|
|
383
|
+
function verb(n, f) {
|
|
384
|
+
i[n] = o[n] ? function(v) {
|
|
385
|
+
return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v;
|
|
386
|
+
} : f;
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
__asyncValues = function(o) {
|
|
390
|
+
if (!Symbol.asyncIterator)
|
|
391
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
392
|
+
var m = o[Symbol.asyncIterator], i;
|
|
393
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
|
|
394
|
+
return this;
|
|
395
|
+
}, i);
|
|
396
|
+
function verb(n) {
|
|
397
|
+
i[n] = o[n] && function(v) {
|
|
398
|
+
return new Promise(function(resolve, reject) {
|
|
399
|
+
v = o[n](v), settle(resolve, reject, v.done, v.value);
|
|
400
|
+
});
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
function settle(resolve, reject, d, v) {
|
|
404
|
+
Promise.resolve(v).then(function(v2) {
|
|
405
|
+
resolve({ value: v2, done: d });
|
|
406
|
+
}, reject);
|
|
407
|
+
}
|
|
408
|
+
};
|
|
409
|
+
__makeTemplateObject = function(cooked, raw) {
|
|
410
|
+
if (Object.defineProperty) {
|
|
411
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
412
|
+
} else {
|
|
413
|
+
cooked.raw = raw;
|
|
414
|
+
}
|
|
415
|
+
return cooked;
|
|
416
|
+
};
|
|
417
|
+
__importStar = function(mod) {
|
|
418
|
+
if (mod && mod.__esModule)
|
|
419
|
+
return mod;
|
|
420
|
+
var result = {};
|
|
421
|
+
if (mod != null) {
|
|
422
|
+
for (var k in mod)
|
|
423
|
+
if (Object.hasOwnProperty.call(mod, k))
|
|
424
|
+
result[k] = mod[k];
|
|
425
|
+
}
|
|
426
|
+
result["default"] = mod;
|
|
427
|
+
return result;
|
|
428
|
+
};
|
|
429
|
+
__importDefault = function(mod) {
|
|
430
|
+
return mod && mod.__esModule ? mod : { default: mod };
|
|
431
|
+
};
|
|
432
|
+
__classPrivateFieldGet = function(receiver, privateMap) {
|
|
433
|
+
if (!privateMap.has(receiver)) {
|
|
434
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
435
|
+
}
|
|
436
|
+
return privateMap.get(receiver);
|
|
437
|
+
};
|
|
438
|
+
__classPrivateFieldSet = function(receiver, privateMap, value) {
|
|
439
|
+
if (!privateMap.has(receiver)) {
|
|
440
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
441
|
+
}
|
|
442
|
+
privateMap.set(receiver, value);
|
|
443
|
+
return value;
|
|
444
|
+
};
|
|
445
|
+
exporter("__extends", __extends);
|
|
446
|
+
exporter("__assign", __assign);
|
|
447
|
+
exporter("__rest", __rest);
|
|
448
|
+
exporter("__decorate", __decorate);
|
|
449
|
+
exporter("__param", __param);
|
|
450
|
+
exporter("__metadata", __metadata);
|
|
451
|
+
exporter("__awaiter", __awaiter);
|
|
452
|
+
exporter("__generator", __generator);
|
|
453
|
+
exporter("__exportStar", __exportStar);
|
|
454
|
+
exporter("__createBinding", __createBinding);
|
|
455
|
+
exporter("__values", __values);
|
|
456
|
+
exporter("__read", __read);
|
|
457
|
+
exporter("__spread", __spread);
|
|
458
|
+
exporter("__spreadArrays", __spreadArrays);
|
|
459
|
+
exporter("__await", __await);
|
|
460
|
+
exporter("__asyncGenerator", __asyncGenerator);
|
|
461
|
+
exporter("__asyncDelegator", __asyncDelegator);
|
|
462
|
+
exporter("__asyncValues", __asyncValues);
|
|
463
|
+
exporter("__makeTemplateObject", __makeTemplateObject);
|
|
464
|
+
exporter("__importStar", __importStar);
|
|
465
|
+
exporter("__importDefault", __importDefault);
|
|
466
|
+
exporter("__classPrivateFieldGet", __classPrivateFieldGet);
|
|
467
|
+
exporter("__classPrivateFieldSet", __classPrivateFieldSet);
|
|
468
|
+
});
|
|
469
|
+
});
|
|
470
|
+
|
|
471
|
+
// node_modules/.bun/@aws-crypto+sha256-js@4.0.0/node_modules/@aws-crypto/sha256-js/build/constants.js
|
|
472
|
+
var require_constants = __commonJS((exports) => {
|
|
473
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
474
|
+
exports.MAX_HASHABLE_LENGTH = exports.INIT = exports.KEY = exports.DIGEST_LENGTH = exports.BLOCK_SIZE = undefined;
|
|
475
|
+
exports.BLOCK_SIZE = 64;
|
|
476
|
+
exports.DIGEST_LENGTH = 32;
|
|
477
|
+
exports.KEY = new Uint32Array([
|
|
478
|
+
1116352408,
|
|
479
|
+
1899447441,
|
|
480
|
+
3049323471,
|
|
481
|
+
3921009573,
|
|
482
|
+
961987163,
|
|
483
|
+
1508970993,
|
|
484
|
+
2453635748,
|
|
485
|
+
2870763221,
|
|
486
|
+
3624381080,
|
|
487
|
+
310598401,
|
|
488
|
+
607225278,
|
|
489
|
+
1426881987,
|
|
490
|
+
1925078388,
|
|
491
|
+
2162078206,
|
|
492
|
+
2614888103,
|
|
493
|
+
3248222580,
|
|
494
|
+
3835390401,
|
|
495
|
+
4022224774,
|
|
496
|
+
264347078,
|
|
497
|
+
604807628,
|
|
498
|
+
770255983,
|
|
499
|
+
1249150122,
|
|
500
|
+
1555081692,
|
|
501
|
+
1996064986,
|
|
502
|
+
2554220882,
|
|
503
|
+
2821834349,
|
|
504
|
+
2952996808,
|
|
505
|
+
3210313671,
|
|
506
|
+
3336571891,
|
|
507
|
+
3584528711,
|
|
508
|
+
113926993,
|
|
509
|
+
338241895,
|
|
510
|
+
666307205,
|
|
511
|
+
773529912,
|
|
512
|
+
1294757372,
|
|
513
|
+
1396182291,
|
|
514
|
+
1695183700,
|
|
515
|
+
1986661051,
|
|
516
|
+
2177026350,
|
|
517
|
+
2456956037,
|
|
518
|
+
2730485921,
|
|
519
|
+
2820302411,
|
|
520
|
+
3259730800,
|
|
521
|
+
3345764771,
|
|
522
|
+
3516065817,
|
|
523
|
+
3600352804,
|
|
524
|
+
4094571909,
|
|
525
|
+
275423344,
|
|
526
|
+
430227734,
|
|
527
|
+
506948616,
|
|
528
|
+
659060556,
|
|
529
|
+
883997877,
|
|
530
|
+
958139571,
|
|
531
|
+
1322822218,
|
|
532
|
+
1537002063,
|
|
533
|
+
1747873779,
|
|
534
|
+
1955562222,
|
|
535
|
+
2024104815,
|
|
536
|
+
2227730452,
|
|
537
|
+
2361852424,
|
|
538
|
+
2428436474,
|
|
539
|
+
2756734187,
|
|
540
|
+
3204031479,
|
|
541
|
+
3329325298
|
|
542
|
+
]);
|
|
543
|
+
exports.INIT = [
|
|
544
|
+
1779033703,
|
|
545
|
+
3144134277,
|
|
546
|
+
1013904242,
|
|
547
|
+
2773480762,
|
|
548
|
+
1359893119,
|
|
549
|
+
2600822924,
|
|
550
|
+
528734635,
|
|
551
|
+
1541459225
|
|
552
|
+
];
|
|
553
|
+
exports.MAX_HASHABLE_LENGTH = Math.pow(2, 53) - 1;
|
|
554
|
+
});
|
|
555
|
+
|
|
556
|
+
// node_modules/.bun/@aws-crypto+sha256-js@4.0.0/node_modules/@aws-crypto/sha256-js/build/RawSha256.js
|
|
557
|
+
var require_RawSha256 = __commonJS((exports) => {
|
|
558
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
559
|
+
exports.RawSha256 = undefined;
|
|
560
|
+
var constants_1 = require_constants();
|
|
561
|
+
var RawSha256 = function() {
|
|
562
|
+
function RawSha2562() {
|
|
563
|
+
this.state = Int32Array.from(constants_1.INIT);
|
|
564
|
+
this.temp = new Int32Array(64);
|
|
565
|
+
this.buffer = new Uint8Array(64);
|
|
566
|
+
this.bufferLength = 0;
|
|
567
|
+
this.bytesHashed = 0;
|
|
568
|
+
this.finished = false;
|
|
569
|
+
}
|
|
570
|
+
RawSha2562.prototype.update = function(data) {
|
|
571
|
+
if (this.finished) {
|
|
572
|
+
throw new Error("Attempted to update an already finished hash.");
|
|
573
|
+
}
|
|
574
|
+
var position = 0;
|
|
575
|
+
var byteLength = data.byteLength;
|
|
576
|
+
this.bytesHashed += byteLength;
|
|
577
|
+
if (this.bytesHashed * 8 > constants_1.MAX_HASHABLE_LENGTH) {
|
|
578
|
+
throw new Error("Cannot hash more than 2^53 - 1 bits");
|
|
579
|
+
}
|
|
580
|
+
while (byteLength > 0) {
|
|
581
|
+
this.buffer[this.bufferLength++] = data[position++];
|
|
582
|
+
byteLength--;
|
|
583
|
+
if (this.bufferLength === constants_1.BLOCK_SIZE) {
|
|
584
|
+
this.hashBuffer();
|
|
585
|
+
this.bufferLength = 0;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
};
|
|
589
|
+
RawSha2562.prototype.digest = function() {
|
|
590
|
+
if (!this.finished) {
|
|
591
|
+
var bitsHashed = this.bytesHashed * 8;
|
|
592
|
+
var bufferView = new DataView(this.buffer.buffer, this.buffer.byteOffset, this.buffer.byteLength);
|
|
593
|
+
var undecoratedLength = this.bufferLength;
|
|
594
|
+
bufferView.setUint8(this.bufferLength++, 128);
|
|
595
|
+
if (undecoratedLength % constants_1.BLOCK_SIZE >= constants_1.BLOCK_SIZE - 8) {
|
|
596
|
+
for (var i = this.bufferLength;i < constants_1.BLOCK_SIZE; i++) {
|
|
597
|
+
bufferView.setUint8(i, 0);
|
|
598
|
+
}
|
|
599
|
+
this.hashBuffer();
|
|
600
|
+
this.bufferLength = 0;
|
|
601
|
+
}
|
|
602
|
+
for (var i = this.bufferLength;i < constants_1.BLOCK_SIZE - 8; i++) {
|
|
603
|
+
bufferView.setUint8(i, 0);
|
|
604
|
+
}
|
|
605
|
+
bufferView.setUint32(constants_1.BLOCK_SIZE - 8, Math.floor(bitsHashed / 4294967296), true);
|
|
606
|
+
bufferView.setUint32(constants_1.BLOCK_SIZE - 4, bitsHashed);
|
|
607
|
+
this.hashBuffer();
|
|
608
|
+
this.finished = true;
|
|
609
|
+
}
|
|
610
|
+
var out = new Uint8Array(constants_1.DIGEST_LENGTH);
|
|
611
|
+
for (var i = 0;i < 8; i++) {
|
|
612
|
+
out[i * 4] = this.state[i] >>> 24 & 255;
|
|
613
|
+
out[i * 4 + 1] = this.state[i] >>> 16 & 255;
|
|
614
|
+
out[i * 4 + 2] = this.state[i] >>> 8 & 255;
|
|
615
|
+
out[i * 4 + 3] = this.state[i] >>> 0 & 255;
|
|
616
|
+
}
|
|
617
|
+
return out;
|
|
618
|
+
};
|
|
619
|
+
RawSha2562.prototype.hashBuffer = function() {
|
|
620
|
+
var _a = this, buffer = _a.buffer, state = _a.state;
|
|
621
|
+
var state0 = state[0], state1 = state[1], state2 = state[2], state3 = state[3], state4 = state[4], state5 = state[5], state6 = state[6], state7 = state[7];
|
|
622
|
+
for (var i = 0;i < constants_1.BLOCK_SIZE; i++) {
|
|
623
|
+
if (i < 16) {
|
|
624
|
+
this.temp[i] = (buffer[i * 4] & 255) << 24 | (buffer[i * 4 + 1] & 255) << 16 | (buffer[i * 4 + 2] & 255) << 8 | buffer[i * 4 + 3] & 255;
|
|
625
|
+
} else {
|
|
626
|
+
var u = this.temp[i - 2];
|
|
627
|
+
var t1_1 = (u >>> 17 | u << 15) ^ (u >>> 19 | u << 13) ^ u >>> 10;
|
|
628
|
+
u = this.temp[i - 15];
|
|
629
|
+
var t2_1 = (u >>> 7 | u << 25) ^ (u >>> 18 | u << 14) ^ u >>> 3;
|
|
630
|
+
this.temp[i] = (t1_1 + this.temp[i - 7] | 0) + (t2_1 + this.temp[i - 16] | 0);
|
|
631
|
+
}
|
|
632
|
+
var t1 = (((state4 >>> 6 | state4 << 26) ^ (state4 >>> 11 | state4 << 21) ^ (state4 >>> 25 | state4 << 7)) + (state4 & state5 ^ ~state4 & state6) | 0) + (state7 + (constants_1.KEY[i] + this.temp[i] | 0) | 0) | 0;
|
|
633
|
+
var t2 = ((state0 >>> 2 | state0 << 30) ^ (state0 >>> 13 | state0 << 19) ^ (state0 >>> 22 | state0 << 10)) + (state0 & state1 ^ state0 & state2 ^ state1 & state2) | 0;
|
|
634
|
+
state7 = state6;
|
|
635
|
+
state6 = state5;
|
|
636
|
+
state5 = state4;
|
|
637
|
+
state4 = state3 + t1 | 0;
|
|
638
|
+
state3 = state2;
|
|
639
|
+
state2 = state1;
|
|
640
|
+
state1 = state0;
|
|
641
|
+
state0 = t1 + t2 | 0;
|
|
642
|
+
}
|
|
643
|
+
state[0] += state0;
|
|
644
|
+
state[1] += state1;
|
|
645
|
+
state[2] += state2;
|
|
646
|
+
state[3] += state3;
|
|
647
|
+
state[4] += state4;
|
|
648
|
+
state[5] += state5;
|
|
649
|
+
state[6] += state6;
|
|
650
|
+
state[7] += state7;
|
|
651
|
+
};
|
|
652
|
+
return RawSha2562;
|
|
653
|
+
}();
|
|
654
|
+
exports.RawSha256 = RawSha256;
|
|
655
|
+
});
|
|
656
|
+
|
|
657
|
+
// node_modules/.bun/@aws-sdk+util-utf8-browser@3.259.0/node_modules/@aws-sdk/util-utf8-browser/dist-cjs/pureJs.js
|
|
658
|
+
var require_pureJs = __commonJS((exports) => {
|
|
659
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
660
|
+
exports.toUtf8 = exports.fromUtf8 = undefined;
|
|
661
|
+
var fromUtf82 = (input) => {
|
|
662
|
+
const bytes = [];
|
|
663
|
+
for (let i = 0, len = input.length;i < len; i++) {
|
|
664
|
+
const value = input.charCodeAt(i);
|
|
665
|
+
if (value < 128) {
|
|
666
|
+
bytes.push(value);
|
|
667
|
+
} else if (value < 2048) {
|
|
668
|
+
bytes.push(value >> 6 | 192, value & 63 | 128);
|
|
669
|
+
} else if (i + 1 < input.length && (value & 64512) === 55296 && (input.charCodeAt(i + 1) & 64512) === 56320) {
|
|
670
|
+
const surrogatePair = 65536 + ((value & 1023) << 10) + (input.charCodeAt(++i) & 1023);
|
|
671
|
+
bytes.push(surrogatePair >> 18 | 240, surrogatePair >> 12 & 63 | 128, surrogatePair >> 6 & 63 | 128, surrogatePair & 63 | 128);
|
|
672
|
+
} else {
|
|
673
|
+
bytes.push(value >> 12 | 224, value >> 6 & 63 | 128, value & 63 | 128);
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
return Uint8Array.from(bytes);
|
|
677
|
+
};
|
|
678
|
+
exports.fromUtf8 = fromUtf82;
|
|
679
|
+
var toUtf82 = (input) => {
|
|
680
|
+
let decoded = "";
|
|
681
|
+
for (let i = 0, len = input.length;i < len; i++) {
|
|
682
|
+
const byte = input[i];
|
|
683
|
+
if (byte < 128) {
|
|
684
|
+
decoded += String.fromCharCode(byte);
|
|
685
|
+
} else if (192 <= byte && byte < 224) {
|
|
686
|
+
const nextByte = input[++i];
|
|
687
|
+
decoded += String.fromCharCode((byte & 31) << 6 | nextByte & 63);
|
|
688
|
+
} else if (240 <= byte && byte < 365) {
|
|
689
|
+
const surrogatePair = [byte, input[++i], input[++i], input[++i]];
|
|
690
|
+
const encoded = "%" + surrogatePair.map((byteValue) => byteValue.toString(16)).join("%");
|
|
691
|
+
decoded += decodeURIComponent(encoded);
|
|
692
|
+
} else {
|
|
693
|
+
decoded += String.fromCharCode((byte & 15) << 12 | (input[++i] & 63) << 6 | input[++i] & 63);
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
return decoded;
|
|
697
|
+
};
|
|
698
|
+
exports.toUtf8 = toUtf82;
|
|
699
|
+
});
|
|
700
|
+
|
|
701
|
+
// node_modules/.bun/@aws-sdk+util-utf8-browser@3.259.0/node_modules/@aws-sdk/util-utf8-browser/dist-cjs/whatwgEncodingApi.js
|
|
702
|
+
var require_whatwgEncodingApi = __commonJS((exports) => {
|
|
703
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
704
|
+
exports.toUtf8 = exports.fromUtf8 = undefined;
|
|
705
|
+
function fromUtf82(input) {
|
|
706
|
+
return new TextEncoder().encode(input);
|
|
707
|
+
}
|
|
708
|
+
exports.fromUtf8 = fromUtf82;
|
|
709
|
+
function toUtf82(input) {
|
|
710
|
+
return new TextDecoder("utf-8").decode(input);
|
|
711
|
+
}
|
|
712
|
+
exports.toUtf8 = toUtf82;
|
|
713
|
+
});
|
|
714
|
+
|
|
715
|
+
// node_modules/.bun/@aws-sdk+util-utf8-browser@3.259.0/node_modules/@aws-sdk/util-utf8-browser/dist-cjs/index.js
|
|
716
|
+
var require_dist_cjs2 = __commonJS((exports) => {
|
|
717
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
718
|
+
exports.toUtf8 = exports.fromUtf8 = undefined;
|
|
719
|
+
var pureJs_1 = require_pureJs();
|
|
720
|
+
var whatwgEncodingApi_1 = require_whatwgEncodingApi();
|
|
721
|
+
var fromUtf82 = (input) => typeof TextEncoder === "function" ? (0, whatwgEncodingApi_1.fromUtf8)(input) : (0, pureJs_1.fromUtf8)(input);
|
|
722
|
+
exports.fromUtf8 = fromUtf82;
|
|
723
|
+
var toUtf82 = (input) => typeof TextDecoder === "function" ? (0, whatwgEncodingApi_1.toUtf8)(input) : (0, pureJs_1.toUtf8)(input);
|
|
724
|
+
exports.toUtf8 = toUtf82;
|
|
725
|
+
});
|
|
726
|
+
|
|
727
|
+
// node_modules/.bun/@aws-crypto+util@4.0.0/node_modules/@aws-crypto/util/build/convertToBuffer.js
|
|
728
|
+
var require_convertToBuffer = __commonJS((exports) => {
|
|
729
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
730
|
+
exports.convertToBuffer = undefined;
|
|
731
|
+
var util_utf8_browser_1 = require_dist_cjs2();
|
|
732
|
+
var fromUtf82 = typeof Buffer !== "undefined" && Buffer.from ? function(input) {
|
|
733
|
+
return Buffer.from(input, "utf8");
|
|
734
|
+
} : util_utf8_browser_1.fromUtf8;
|
|
735
|
+
function convertToBuffer(data) {
|
|
736
|
+
if (data instanceof Uint8Array)
|
|
737
|
+
return data;
|
|
738
|
+
if (typeof data === "string") {
|
|
739
|
+
return fromUtf82(data);
|
|
740
|
+
}
|
|
741
|
+
if (ArrayBuffer.isView(data)) {
|
|
742
|
+
return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);
|
|
743
|
+
}
|
|
744
|
+
return new Uint8Array(data);
|
|
745
|
+
}
|
|
746
|
+
exports.convertToBuffer = convertToBuffer;
|
|
747
|
+
});
|
|
748
|
+
|
|
749
|
+
// node_modules/.bun/@aws-crypto+util@4.0.0/node_modules/@aws-crypto/util/build/isEmptyData.js
|
|
750
|
+
var require_isEmptyData = __commonJS((exports) => {
|
|
751
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
752
|
+
exports.isEmptyData = undefined;
|
|
753
|
+
function isEmptyData(data) {
|
|
754
|
+
if (typeof data === "string") {
|
|
755
|
+
return data.length === 0;
|
|
756
|
+
}
|
|
757
|
+
return data.byteLength === 0;
|
|
758
|
+
}
|
|
759
|
+
exports.isEmptyData = isEmptyData;
|
|
760
|
+
});
|
|
761
|
+
|
|
762
|
+
// node_modules/.bun/@aws-crypto+util@4.0.0/node_modules/@aws-crypto/util/build/numToUint8.js
|
|
763
|
+
var require_numToUint8 = __commonJS((exports) => {
|
|
764
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
765
|
+
exports.numToUint8 = undefined;
|
|
766
|
+
function numToUint8(num) {
|
|
767
|
+
return new Uint8Array([
|
|
768
|
+
(num & 4278190080) >> 24,
|
|
769
|
+
(num & 16711680) >> 16,
|
|
770
|
+
(num & 65280) >> 8,
|
|
771
|
+
num & 255
|
|
772
|
+
]);
|
|
773
|
+
}
|
|
774
|
+
exports.numToUint8 = numToUint8;
|
|
775
|
+
});
|
|
776
|
+
|
|
777
|
+
// node_modules/.bun/@aws-crypto+util@4.0.0/node_modules/@aws-crypto/util/build/uint32ArrayFrom.js
|
|
778
|
+
var require_uint32ArrayFrom = __commonJS((exports) => {
|
|
779
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
780
|
+
exports.uint32ArrayFrom = undefined;
|
|
781
|
+
function uint32ArrayFrom(a_lookUpTable) {
|
|
782
|
+
if (!Uint32Array.from) {
|
|
783
|
+
var return_array = new Uint32Array(a_lookUpTable.length);
|
|
784
|
+
var a_index = 0;
|
|
785
|
+
while (a_index < a_lookUpTable.length) {
|
|
786
|
+
return_array[a_index] = a_lookUpTable[a_index];
|
|
787
|
+
a_index += 1;
|
|
788
|
+
}
|
|
789
|
+
return return_array;
|
|
790
|
+
}
|
|
791
|
+
return Uint32Array.from(a_lookUpTable);
|
|
792
|
+
}
|
|
793
|
+
exports.uint32ArrayFrom = uint32ArrayFrom;
|
|
794
|
+
});
|
|
795
|
+
|
|
796
|
+
// node_modules/.bun/@aws-crypto+util@4.0.0/node_modules/@aws-crypto/util/build/index.js
|
|
797
|
+
var require_build = __commonJS((exports) => {
|
|
798
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
799
|
+
exports.uint32ArrayFrom = exports.numToUint8 = exports.isEmptyData = exports.convertToBuffer = undefined;
|
|
800
|
+
var convertToBuffer_1 = require_convertToBuffer();
|
|
801
|
+
Object.defineProperty(exports, "convertToBuffer", { enumerable: true, get: function() {
|
|
802
|
+
return convertToBuffer_1.convertToBuffer;
|
|
803
|
+
} });
|
|
804
|
+
var isEmptyData_1 = require_isEmptyData();
|
|
805
|
+
Object.defineProperty(exports, "isEmptyData", { enumerable: true, get: function() {
|
|
806
|
+
return isEmptyData_1.isEmptyData;
|
|
807
|
+
} });
|
|
808
|
+
var numToUint8_1 = require_numToUint8();
|
|
809
|
+
Object.defineProperty(exports, "numToUint8", { enumerable: true, get: function() {
|
|
810
|
+
return numToUint8_1.numToUint8;
|
|
811
|
+
} });
|
|
812
|
+
var uint32ArrayFrom_1 = require_uint32ArrayFrom();
|
|
813
|
+
Object.defineProperty(exports, "uint32ArrayFrom", { enumerable: true, get: function() {
|
|
814
|
+
return uint32ArrayFrom_1.uint32ArrayFrom;
|
|
815
|
+
} });
|
|
816
|
+
});
|
|
817
|
+
|
|
818
|
+
// node_modules/.bun/@aws-crypto+sha256-js@4.0.0/node_modules/@aws-crypto/sha256-js/build/jsSha256.js
|
|
819
|
+
var require_jsSha256 = __commonJS((exports) => {
|
|
820
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
821
|
+
exports.Sha256 = undefined;
|
|
822
|
+
var tslib_1 = require_tslib();
|
|
823
|
+
var constants_1 = require_constants();
|
|
824
|
+
var RawSha256_1 = require_RawSha256();
|
|
825
|
+
var util_1 = require_build();
|
|
826
|
+
var Sha256 = function() {
|
|
827
|
+
function Sha2562(secret) {
|
|
828
|
+
this.secret = secret;
|
|
829
|
+
this.hash = new RawSha256_1.RawSha256;
|
|
830
|
+
this.reset();
|
|
831
|
+
}
|
|
832
|
+
Sha2562.prototype.update = function(toHash) {
|
|
833
|
+
if ((0, util_1.isEmptyData)(toHash) || this.error) {
|
|
834
|
+
return;
|
|
835
|
+
}
|
|
836
|
+
try {
|
|
837
|
+
this.hash.update((0, util_1.convertToBuffer)(toHash));
|
|
838
|
+
} catch (e) {
|
|
839
|
+
this.error = e;
|
|
840
|
+
}
|
|
841
|
+
};
|
|
842
|
+
Sha2562.prototype.digestSync = function() {
|
|
843
|
+
if (this.error) {
|
|
844
|
+
throw this.error;
|
|
845
|
+
}
|
|
846
|
+
if (this.outer) {
|
|
847
|
+
if (!this.outer.finished) {
|
|
848
|
+
this.outer.update(this.hash.digest());
|
|
849
|
+
}
|
|
850
|
+
return this.outer.digest();
|
|
851
|
+
}
|
|
852
|
+
return this.hash.digest();
|
|
853
|
+
};
|
|
854
|
+
Sha2562.prototype.digest = function() {
|
|
855
|
+
return tslib_1.__awaiter(this, undefined, undefined, function() {
|
|
856
|
+
return tslib_1.__generator(this, function(_a) {
|
|
857
|
+
return [2, this.digestSync()];
|
|
858
|
+
});
|
|
859
|
+
});
|
|
860
|
+
};
|
|
861
|
+
Sha2562.prototype.reset = function() {
|
|
862
|
+
this.hash = new RawSha256_1.RawSha256;
|
|
863
|
+
if (this.secret) {
|
|
864
|
+
this.outer = new RawSha256_1.RawSha256;
|
|
865
|
+
var inner = bufferFromSecret(this.secret);
|
|
866
|
+
var outer = new Uint8Array(constants_1.BLOCK_SIZE);
|
|
867
|
+
outer.set(inner);
|
|
868
|
+
for (var i = 0;i < constants_1.BLOCK_SIZE; i++) {
|
|
869
|
+
inner[i] ^= 54;
|
|
870
|
+
outer[i] ^= 92;
|
|
871
|
+
}
|
|
872
|
+
this.hash.update(inner);
|
|
873
|
+
this.outer.update(outer);
|
|
874
|
+
for (var i = 0;i < inner.byteLength; i++) {
|
|
875
|
+
inner[i] = 0;
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
};
|
|
879
|
+
return Sha2562;
|
|
880
|
+
}();
|
|
881
|
+
exports.Sha256 = Sha256;
|
|
882
|
+
function bufferFromSecret(secret) {
|
|
883
|
+
var input = (0, util_1.convertToBuffer)(secret);
|
|
884
|
+
if (input.byteLength > constants_1.BLOCK_SIZE) {
|
|
885
|
+
var bufferHash = new RawSha256_1.RawSha256;
|
|
886
|
+
bufferHash.update(input);
|
|
887
|
+
input = bufferHash.digest();
|
|
888
|
+
}
|
|
889
|
+
var buffer = new Uint8Array(constants_1.BLOCK_SIZE);
|
|
890
|
+
buffer.set(input);
|
|
891
|
+
return buffer;
|
|
892
|
+
}
|
|
893
|
+
});
|
|
894
|
+
|
|
895
|
+
// node_modules/.bun/@aws-crypto+sha256-js@4.0.0/node_modules/@aws-crypto/sha256-js/build/index.js
|
|
896
|
+
var require_build2 = __commonJS((exports) => {
|
|
897
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
898
|
+
var tslib_1 = require_tslib();
|
|
899
|
+
tslib_1.__exportStar(require_jsSha256(), exports);
|
|
900
|
+
});
|
|
901
|
+
|
|
902
|
+
// node_modules/.bun/@smithy+protocol-http@3.3.0/node_modules/@smithy/protocol-http/dist-es/extensions/httpExtensionConfiguration.js
|
|
903
|
+
var init_httpExtensionConfiguration = () => {};
|
|
904
|
+
|
|
905
|
+
// node_modules/.bun/@smithy+protocol-http@3.3.0/node_modules/@smithy/protocol-http/dist-es/extensions/index.js
|
|
906
|
+
var init_extensions = __esm(() => {
|
|
907
|
+
init_httpExtensionConfiguration();
|
|
908
|
+
});
|
|
909
|
+
|
|
910
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/abort.js
|
|
911
|
+
var init_abort = () => {};
|
|
912
|
+
|
|
913
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/auth/auth.js
|
|
914
|
+
var HttpAuthLocation;
|
|
915
|
+
var init_auth = __esm(() => {
|
|
916
|
+
(function(HttpAuthLocation2) {
|
|
917
|
+
HttpAuthLocation2["HEADER"] = "header";
|
|
918
|
+
HttpAuthLocation2["QUERY"] = "query";
|
|
919
|
+
})(HttpAuthLocation || (HttpAuthLocation = {}));
|
|
920
|
+
});
|
|
921
|
+
|
|
922
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/auth/HttpApiKeyAuth.js
|
|
923
|
+
var HttpApiKeyAuthLocation;
|
|
924
|
+
var init_HttpApiKeyAuth = __esm(() => {
|
|
925
|
+
(function(HttpApiKeyAuthLocation2) {
|
|
926
|
+
HttpApiKeyAuthLocation2["HEADER"] = "header";
|
|
927
|
+
HttpApiKeyAuthLocation2["QUERY"] = "query";
|
|
928
|
+
})(HttpApiKeyAuthLocation || (HttpApiKeyAuthLocation = {}));
|
|
929
|
+
});
|
|
930
|
+
|
|
931
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js
|
|
932
|
+
var init_HttpAuthScheme = () => {};
|
|
933
|
+
|
|
934
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js
|
|
935
|
+
var init_HttpAuthSchemeProvider = () => {};
|
|
936
|
+
|
|
937
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/auth/HttpSigner.js
|
|
938
|
+
var init_HttpSigner = () => {};
|
|
939
|
+
|
|
940
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js
|
|
941
|
+
var init_IdentityProviderConfig = () => {};
|
|
942
|
+
|
|
943
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/auth/index.js
|
|
944
|
+
var init_auth2 = __esm(() => {
|
|
945
|
+
init_auth();
|
|
946
|
+
init_HttpApiKeyAuth();
|
|
947
|
+
init_HttpAuthScheme();
|
|
948
|
+
init_HttpAuthSchemeProvider();
|
|
949
|
+
init_HttpSigner();
|
|
950
|
+
init_IdentityProviderConfig();
|
|
951
|
+
});
|
|
952
|
+
|
|
953
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/blob/blob-payload-input-types.js
|
|
954
|
+
var init_blob_payload_input_types = () => {};
|
|
955
|
+
|
|
956
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/checksum.js
|
|
957
|
+
var init_checksum = () => {};
|
|
958
|
+
|
|
959
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/client.js
|
|
960
|
+
var init_client2 = () => {};
|
|
961
|
+
|
|
962
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/command.js
|
|
963
|
+
var init_command = () => {};
|
|
964
|
+
|
|
965
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/connection/config.js
|
|
966
|
+
var init_config = () => {};
|
|
967
|
+
|
|
968
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/connection/manager.js
|
|
969
|
+
var init_manager = () => {};
|
|
970
|
+
|
|
971
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/connection/pool.js
|
|
972
|
+
var init_pool = () => {};
|
|
973
|
+
|
|
974
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/connection/index.js
|
|
975
|
+
var init_connection = __esm(() => {
|
|
976
|
+
init_config();
|
|
977
|
+
init_manager();
|
|
978
|
+
init_pool();
|
|
979
|
+
});
|
|
980
|
+
|
|
981
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/crypto.js
|
|
982
|
+
var init_crypto = () => {};
|
|
983
|
+
|
|
984
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/encode.js
|
|
985
|
+
var init_encode = () => {};
|
|
986
|
+
|
|
987
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/endpoint.js
|
|
988
|
+
var EndpointURLScheme;
|
|
989
|
+
var init_endpoint = __esm(() => {
|
|
990
|
+
(function(EndpointURLScheme2) {
|
|
991
|
+
EndpointURLScheme2["HTTP"] = "http";
|
|
992
|
+
EndpointURLScheme2["HTTPS"] = "https";
|
|
993
|
+
})(EndpointURLScheme || (EndpointURLScheme = {}));
|
|
994
|
+
});
|
|
995
|
+
|
|
996
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js
|
|
997
|
+
var init_EndpointRuleObject = () => {};
|
|
998
|
+
|
|
999
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js
|
|
1000
|
+
var init_ErrorRuleObject = () => {};
|
|
1001
|
+
|
|
1002
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js
|
|
1003
|
+
var init_RuleSetObject = () => {};
|
|
1004
|
+
|
|
1005
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/endpoints/shared.js
|
|
1006
|
+
var init_shared = () => {};
|
|
1007
|
+
|
|
1008
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js
|
|
1009
|
+
var init_TreeRuleObject = () => {};
|
|
1010
|
+
|
|
1011
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/endpoints/index.js
|
|
1012
|
+
var init_endpoints = __esm(() => {
|
|
1013
|
+
init_EndpointRuleObject();
|
|
1014
|
+
init_ErrorRuleObject();
|
|
1015
|
+
init_RuleSetObject();
|
|
1016
|
+
init_shared();
|
|
1017
|
+
init_TreeRuleObject();
|
|
1018
|
+
});
|
|
1019
|
+
|
|
1020
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/eventStream.js
|
|
1021
|
+
var init_eventStream = () => {};
|
|
1022
|
+
|
|
1023
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/extensions/checksum.js
|
|
1024
|
+
var AlgorithmId;
|
|
1025
|
+
var init_checksum2 = __esm(() => {
|
|
1026
|
+
(function(AlgorithmId2) {
|
|
1027
|
+
AlgorithmId2["MD5"] = "md5";
|
|
1028
|
+
AlgorithmId2["CRC32"] = "crc32";
|
|
1029
|
+
AlgorithmId2["CRC32C"] = "crc32c";
|
|
1030
|
+
AlgorithmId2["SHA1"] = "sha1";
|
|
1031
|
+
AlgorithmId2["SHA256"] = "sha256";
|
|
1032
|
+
})(AlgorithmId || (AlgorithmId = {}));
|
|
1033
|
+
});
|
|
1034
|
+
|
|
1035
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/extensions/defaultClientConfiguration.js
|
|
1036
|
+
var init_defaultClientConfiguration = __esm(() => {
|
|
1037
|
+
init_checksum2();
|
|
1038
|
+
});
|
|
1039
|
+
|
|
1040
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js
|
|
1041
|
+
var init_defaultExtensionConfiguration = () => {};
|
|
1042
|
+
|
|
1043
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/extensions/index.js
|
|
1044
|
+
var init_extensions2 = __esm(() => {
|
|
1045
|
+
init_checksum2();
|
|
1046
|
+
init_defaultClientConfiguration();
|
|
1047
|
+
init_defaultExtensionConfiguration();
|
|
1048
|
+
});
|
|
1049
|
+
|
|
1050
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/http.js
|
|
1051
|
+
var FieldPosition;
|
|
1052
|
+
var init_http = __esm(() => {
|
|
1053
|
+
(function(FieldPosition2) {
|
|
1054
|
+
FieldPosition2[FieldPosition2["HEADER"] = 0] = "HEADER";
|
|
1055
|
+
FieldPosition2[FieldPosition2["TRAILER"] = 1] = "TRAILER";
|
|
1056
|
+
})(FieldPosition || (FieldPosition = {}));
|
|
1057
|
+
});
|
|
1058
|
+
|
|
1059
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js
|
|
1060
|
+
var init_httpHandlerInitialization = () => {};
|
|
1061
|
+
|
|
1062
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js
|
|
1063
|
+
var init_apiKeyIdentity = () => {};
|
|
1064
|
+
|
|
1065
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js
|
|
1066
|
+
var init_awsCredentialIdentity = () => {};
|
|
1067
|
+
|
|
1068
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/identity/identity.js
|
|
1069
|
+
var init_identity = () => {};
|
|
1070
|
+
|
|
1071
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/identity/tokenIdentity.js
|
|
1072
|
+
var init_tokenIdentity = () => {};
|
|
1073
|
+
|
|
1074
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/identity/index.js
|
|
1075
|
+
var init_identity2 = __esm(() => {
|
|
1076
|
+
init_apiKeyIdentity();
|
|
1077
|
+
init_awsCredentialIdentity();
|
|
1078
|
+
init_identity();
|
|
1079
|
+
init_tokenIdentity();
|
|
1080
|
+
});
|
|
1081
|
+
|
|
1082
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/logger.js
|
|
1083
|
+
var init_logger = () => {};
|
|
1084
|
+
|
|
1085
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/middleware.js
|
|
1086
|
+
var init_middleware = () => {};
|
|
1087
|
+
|
|
1088
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/pagination.js
|
|
1089
|
+
var init_pagination = () => {};
|
|
1090
|
+
|
|
1091
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/profile.js
|
|
1092
|
+
var IniSectionType;
|
|
1093
|
+
var init_profile = __esm(() => {
|
|
1094
|
+
(function(IniSectionType2) {
|
|
1095
|
+
IniSectionType2["PROFILE"] = "profile";
|
|
1096
|
+
IniSectionType2["SSO_SESSION"] = "sso-session";
|
|
1097
|
+
IniSectionType2["SERVICES"] = "services";
|
|
1098
|
+
})(IniSectionType || (IniSectionType = {}));
|
|
1099
|
+
});
|
|
1100
|
+
|
|
1101
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/response.js
|
|
1102
|
+
var init_response = () => {};
|
|
1103
|
+
|
|
1104
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/retry.js
|
|
1105
|
+
var init_retry = () => {};
|
|
1106
|
+
|
|
1107
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/serde.js
|
|
1108
|
+
var init_serde = () => {};
|
|
1109
|
+
|
|
1110
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/shapes.js
|
|
1111
|
+
var init_shapes = () => {};
|
|
1112
|
+
|
|
1113
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/signature.js
|
|
1114
|
+
var init_signature = () => {};
|
|
1115
|
+
|
|
1116
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/stream.js
|
|
1117
|
+
var init_stream = () => {};
|
|
1118
|
+
|
|
1119
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js
|
|
1120
|
+
var init_streaming_blob_common_types = () => {};
|
|
1121
|
+
|
|
1122
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js
|
|
1123
|
+
var init_streaming_blob_payload_input_types = () => {};
|
|
1124
|
+
|
|
1125
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js
|
|
1126
|
+
var init_streaming_blob_payload_output_types = () => {};
|
|
1127
|
+
|
|
1128
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/transfer.js
|
|
1129
|
+
var RequestHandlerProtocol;
|
|
1130
|
+
var init_transfer = __esm(() => {
|
|
1131
|
+
(function(RequestHandlerProtocol2) {
|
|
1132
|
+
RequestHandlerProtocol2["HTTP_0_9"] = "http/0.9";
|
|
1133
|
+
RequestHandlerProtocol2["HTTP_1_0"] = "http/1.0";
|
|
1134
|
+
RequestHandlerProtocol2["TDS_8_0"] = "tds/8.0";
|
|
1135
|
+
})(RequestHandlerProtocol || (RequestHandlerProtocol = {}));
|
|
1136
|
+
});
|
|
1137
|
+
|
|
1138
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js
|
|
1139
|
+
var init_client_payload_blob_type_narrow = () => {};
|
|
1140
|
+
|
|
1141
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/transform/no-undefined.js
|
|
1142
|
+
var init_no_undefined = () => {};
|
|
1143
|
+
|
|
1144
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/transform/type-transform.js
|
|
1145
|
+
var init_type_transform = () => {};
|
|
1146
|
+
|
|
1147
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/uri.js
|
|
1148
|
+
var init_uri = () => {};
|
|
1149
|
+
|
|
1150
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/util.js
|
|
1151
|
+
var init_util = () => {};
|
|
1152
|
+
|
|
1153
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/waiter.js
|
|
1154
|
+
var init_waiter = () => {};
|
|
1155
|
+
|
|
1156
|
+
// node_modules/.bun/@smithy+types@2.12.0/node_modules/@smithy/types/dist-es/index.js
|
|
1157
|
+
var init_dist_es4 = __esm(() => {
|
|
1158
|
+
init_abort();
|
|
1159
|
+
init_auth2();
|
|
1160
|
+
init_blob_payload_input_types();
|
|
1161
|
+
init_checksum();
|
|
1162
|
+
init_client2();
|
|
1163
|
+
init_command();
|
|
1164
|
+
init_connection();
|
|
1165
|
+
init_crypto();
|
|
1166
|
+
init_encode();
|
|
1167
|
+
init_endpoint();
|
|
1168
|
+
init_endpoints();
|
|
1169
|
+
init_eventStream();
|
|
1170
|
+
init_extensions2();
|
|
1171
|
+
init_http();
|
|
1172
|
+
init_httpHandlerInitialization();
|
|
1173
|
+
init_identity2();
|
|
1174
|
+
init_logger();
|
|
1175
|
+
init_middleware();
|
|
1176
|
+
init_pagination();
|
|
1177
|
+
init_profile();
|
|
1178
|
+
init_response();
|
|
1179
|
+
init_retry();
|
|
1180
|
+
init_serde();
|
|
1181
|
+
init_shapes();
|
|
1182
|
+
init_signature();
|
|
1183
|
+
init_stream();
|
|
1184
|
+
init_streaming_blob_common_types();
|
|
1185
|
+
init_streaming_blob_payload_input_types();
|
|
1186
|
+
init_streaming_blob_payload_output_types();
|
|
1187
|
+
init_transfer();
|
|
1188
|
+
init_client_payload_blob_type_narrow();
|
|
1189
|
+
init_no_undefined();
|
|
1190
|
+
init_type_transform();
|
|
1191
|
+
init_uri();
|
|
1192
|
+
init_util();
|
|
1193
|
+
init_waiter();
|
|
1194
|
+
});
|
|
1195
|
+
|
|
1196
|
+
// node_modules/.bun/@smithy+protocol-http@3.3.0/node_modules/@smithy/protocol-http/dist-es/Field.js
|
|
1197
|
+
var init_Field = __esm(() => {
|
|
1198
|
+
init_dist_es4();
|
|
1199
|
+
});
|
|
1200
|
+
|
|
1201
|
+
// node_modules/.bun/@smithy+protocol-http@3.3.0/node_modules/@smithy/protocol-http/dist-es/Fields.js
|
|
1202
|
+
var init_Fields = () => {};
|
|
1203
|
+
|
|
1204
|
+
// node_modules/.bun/@smithy+protocol-http@3.3.0/node_modules/@smithy/protocol-http/dist-es/httpHandler.js
|
|
1205
|
+
var init_httpHandler = () => {};
|
|
1206
|
+
|
|
1207
|
+
// node_modules/.bun/@smithy+protocol-http@3.3.0/node_modules/@smithy/protocol-http/dist-es/httpRequest.js
|
|
1208
|
+
class HttpRequest {
|
|
1209
|
+
constructor(options) {
|
|
1210
|
+
this.method = options.method || "GET";
|
|
1211
|
+
this.hostname = options.hostname || "localhost";
|
|
1212
|
+
this.port = options.port;
|
|
1213
|
+
this.query = options.query || {};
|
|
1214
|
+
this.headers = options.headers || {};
|
|
1215
|
+
this.body = options.body;
|
|
1216
|
+
this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:";
|
|
1217
|
+
this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/";
|
|
1218
|
+
this.username = options.username;
|
|
1219
|
+
this.password = options.password;
|
|
1220
|
+
this.fragment = options.fragment;
|
|
1221
|
+
}
|
|
1222
|
+
static isInstance(request) {
|
|
1223
|
+
if (!request)
|
|
1224
|
+
return false;
|
|
1225
|
+
const req = request;
|
|
1226
|
+
return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object";
|
|
1227
|
+
}
|
|
1228
|
+
clone() {
|
|
1229
|
+
const cloned = new HttpRequest({
|
|
1230
|
+
...this,
|
|
1231
|
+
headers: { ...this.headers }
|
|
1232
|
+
});
|
|
1233
|
+
if (cloned.query)
|
|
1234
|
+
cloned.query = cloneQuery(cloned.query);
|
|
1235
|
+
return cloned;
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
function cloneQuery(query) {
|
|
1239
|
+
return Object.keys(query).reduce((carry, paramName) => {
|
|
1240
|
+
const param = query[paramName];
|
|
1241
|
+
return {
|
|
1242
|
+
...carry,
|
|
1243
|
+
[paramName]: Array.isArray(param) ? [...param] : param
|
|
1244
|
+
};
|
|
1245
|
+
}, {});
|
|
1246
|
+
}
|
|
1247
|
+
var init_httpRequest = () => {};
|
|
1248
|
+
|
|
1249
|
+
// node_modules/.bun/@smithy+protocol-http@3.3.0/node_modules/@smithy/protocol-http/dist-es/httpResponse.js
|
|
1250
|
+
var init_httpResponse = () => {};
|
|
1251
|
+
|
|
1252
|
+
// node_modules/.bun/@smithy+protocol-http@3.3.0/node_modules/@smithy/protocol-http/dist-es/isValidHostname.js
|
|
1253
|
+
var init_isValidHostname = () => {};
|
|
1254
|
+
|
|
1255
|
+
// node_modules/.bun/@smithy+protocol-http@3.3.0/node_modules/@smithy/protocol-http/dist-es/types.js
|
|
1256
|
+
var init_types = () => {};
|
|
1257
|
+
|
|
1258
|
+
// node_modules/.bun/@smithy+protocol-http@3.3.0/node_modules/@smithy/protocol-http/dist-es/index.js
|
|
1259
|
+
var init_dist_es5 = __esm(() => {
|
|
1260
|
+
init_extensions();
|
|
1261
|
+
init_Field();
|
|
1262
|
+
init_Fields();
|
|
1263
|
+
init_httpHandler();
|
|
1264
|
+
init_httpRequest();
|
|
1265
|
+
init_httpResponse();
|
|
1266
|
+
init_isValidHostname();
|
|
1267
|
+
init_types();
|
|
1268
|
+
});
|
|
1269
|
+
|
|
1270
|
+
// node_modules/.bun/@smithy+util-hex-encoding@3.0.0/node_modules/@smithy/util-hex-encoding/dist-es/index.js
|
|
1271
|
+
function fromHex(encoded) {
|
|
1272
|
+
if (encoded.length % 2 !== 0) {
|
|
1273
|
+
throw new Error("Hex encoded strings must have an even number length");
|
|
1274
|
+
}
|
|
1275
|
+
const out = new Uint8Array(encoded.length / 2);
|
|
1276
|
+
for (let i = 0;i < encoded.length; i += 2) {
|
|
1277
|
+
const encodedByte = encoded.slice(i, i + 2).toLowerCase();
|
|
1278
|
+
if (encodedByte in HEX_TO_SHORT) {
|
|
1279
|
+
out[i / 2] = HEX_TO_SHORT[encodedByte];
|
|
1280
|
+
} else {
|
|
1281
|
+
throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
return out;
|
|
1285
|
+
}
|
|
1286
|
+
function toHex(bytes) {
|
|
1287
|
+
let out = "";
|
|
1288
|
+
for (let i = 0;i < bytes.byteLength; i++) {
|
|
1289
|
+
out += SHORT_TO_HEX[bytes[i]];
|
|
1290
|
+
}
|
|
1291
|
+
return out;
|
|
1292
|
+
}
|
|
1293
|
+
var SHORT_TO_HEX, HEX_TO_SHORT;
|
|
1294
|
+
var init_dist_es6 = __esm(() => {
|
|
1295
|
+
SHORT_TO_HEX = {};
|
|
1296
|
+
HEX_TO_SHORT = {};
|
|
1297
|
+
for (let i = 0;i < 256; i++) {
|
|
1298
|
+
let encodedByte = i.toString(16).toLowerCase();
|
|
1299
|
+
if (encodedByte.length === 1) {
|
|
1300
|
+
encodedByte = `0${encodedByte}`;
|
|
1301
|
+
}
|
|
1302
|
+
SHORT_TO_HEX[i] = encodedByte;
|
|
1303
|
+
HEX_TO_SHORT[encodedByte] = i;
|
|
1304
|
+
}
|
|
1305
|
+
});
|
|
1306
|
+
|
|
1307
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/abort.js
|
|
1308
|
+
var init_abort2 = () => {};
|
|
1309
|
+
|
|
1310
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/auth/auth.js
|
|
1311
|
+
var HttpAuthLocation2;
|
|
1312
|
+
var init_auth3 = __esm(() => {
|
|
1313
|
+
(function(HttpAuthLocation3) {
|
|
1314
|
+
HttpAuthLocation3["HEADER"] = "header";
|
|
1315
|
+
HttpAuthLocation3["QUERY"] = "query";
|
|
1316
|
+
})(HttpAuthLocation2 || (HttpAuthLocation2 = {}));
|
|
1317
|
+
});
|
|
1318
|
+
|
|
1319
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/auth/HttpApiKeyAuth.js
|
|
1320
|
+
var HttpApiKeyAuthLocation2;
|
|
1321
|
+
var init_HttpApiKeyAuth2 = __esm(() => {
|
|
1322
|
+
(function(HttpApiKeyAuthLocation3) {
|
|
1323
|
+
HttpApiKeyAuthLocation3["HEADER"] = "header";
|
|
1324
|
+
HttpApiKeyAuthLocation3["QUERY"] = "query";
|
|
1325
|
+
})(HttpApiKeyAuthLocation2 || (HttpApiKeyAuthLocation2 = {}));
|
|
1326
|
+
});
|
|
1327
|
+
|
|
1328
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js
|
|
1329
|
+
var init_HttpAuthScheme2 = () => {};
|
|
1330
|
+
|
|
1331
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js
|
|
1332
|
+
var init_HttpAuthSchemeProvider2 = () => {};
|
|
1333
|
+
|
|
1334
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/auth/HttpSigner.js
|
|
1335
|
+
var init_HttpSigner2 = () => {};
|
|
1336
|
+
|
|
1337
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js
|
|
1338
|
+
var init_IdentityProviderConfig2 = () => {};
|
|
1339
|
+
|
|
1340
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/auth/index.js
|
|
1341
|
+
var init_auth4 = __esm(() => {
|
|
1342
|
+
init_auth3();
|
|
1343
|
+
init_HttpApiKeyAuth2();
|
|
1344
|
+
init_HttpAuthScheme2();
|
|
1345
|
+
init_HttpAuthSchemeProvider2();
|
|
1346
|
+
init_HttpSigner2();
|
|
1347
|
+
init_IdentityProviderConfig2();
|
|
1348
|
+
});
|
|
1349
|
+
|
|
1350
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/blob/blob-payload-input-types.js
|
|
1351
|
+
var init_blob_payload_input_types2 = () => {};
|
|
1352
|
+
|
|
1353
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/checksum.js
|
|
1354
|
+
var init_checksum3 = () => {};
|
|
1355
|
+
|
|
1356
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/client.js
|
|
1357
|
+
var init_client3 = () => {};
|
|
1358
|
+
|
|
1359
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/command.js
|
|
1360
|
+
var init_command2 = () => {};
|
|
1361
|
+
|
|
1362
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/connection/config.js
|
|
1363
|
+
var init_config2 = () => {};
|
|
1364
|
+
|
|
1365
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/connection/manager.js
|
|
1366
|
+
var init_manager2 = () => {};
|
|
1367
|
+
|
|
1368
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/connection/pool.js
|
|
1369
|
+
var init_pool2 = () => {};
|
|
1370
|
+
|
|
1371
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/connection/index.js
|
|
1372
|
+
var init_connection2 = __esm(() => {
|
|
1373
|
+
init_config2();
|
|
1374
|
+
init_manager2();
|
|
1375
|
+
init_pool2();
|
|
1376
|
+
});
|
|
1377
|
+
|
|
1378
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/crypto.js
|
|
1379
|
+
var init_crypto2 = () => {};
|
|
1380
|
+
|
|
1381
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/encode.js
|
|
1382
|
+
var init_encode2 = () => {};
|
|
1383
|
+
|
|
1384
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/endpoint.js
|
|
1385
|
+
var EndpointURLScheme2;
|
|
1386
|
+
var init_endpoint2 = __esm(() => {
|
|
1387
|
+
(function(EndpointURLScheme3) {
|
|
1388
|
+
EndpointURLScheme3["HTTP"] = "http";
|
|
1389
|
+
EndpointURLScheme3["HTTPS"] = "https";
|
|
1390
|
+
})(EndpointURLScheme2 || (EndpointURLScheme2 = {}));
|
|
1391
|
+
});
|
|
1392
|
+
|
|
1393
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js
|
|
1394
|
+
var init_EndpointRuleObject2 = () => {};
|
|
1395
|
+
|
|
1396
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js
|
|
1397
|
+
var init_ErrorRuleObject2 = () => {};
|
|
1398
|
+
|
|
1399
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js
|
|
1400
|
+
var init_RuleSetObject2 = () => {};
|
|
1401
|
+
|
|
1402
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/endpoints/shared.js
|
|
1403
|
+
var init_shared2 = () => {};
|
|
1404
|
+
|
|
1405
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js
|
|
1406
|
+
var init_TreeRuleObject2 = () => {};
|
|
1407
|
+
|
|
1408
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/endpoints/index.js
|
|
1409
|
+
var init_endpoints2 = __esm(() => {
|
|
1410
|
+
init_EndpointRuleObject2();
|
|
1411
|
+
init_ErrorRuleObject2();
|
|
1412
|
+
init_RuleSetObject2();
|
|
1413
|
+
init_shared2();
|
|
1414
|
+
init_TreeRuleObject2();
|
|
1415
|
+
});
|
|
1416
|
+
|
|
1417
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/eventStream.js
|
|
1418
|
+
var init_eventStream2 = () => {};
|
|
1419
|
+
|
|
1420
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/extensions/checksum.js
|
|
1421
|
+
var AlgorithmId2;
|
|
1422
|
+
var init_checksum4 = __esm(() => {
|
|
1423
|
+
(function(AlgorithmId3) {
|
|
1424
|
+
AlgorithmId3["MD5"] = "md5";
|
|
1425
|
+
AlgorithmId3["CRC32"] = "crc32";
|
|
1426
|
+
AlgorithmId3["CRC32C"] = "crc32c";
|
|
1427
|
+
AlgorithmId3["SHA1"] = "sha1";
|
|
1428
|
+
AlgorithmId3["SHA256"] = "sha256";
|
|
1429
|
+
})(AlgorithmId2 || (AlgorithmId2 = {}));
|
|
1430
|
+
});
|
|
1431
|
+
|
|
1432
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/extensions/defaultClientConfiguration.js
|
|
1433
|
+
var init_defaultClientConfiguration2 = __esm(() => {
|
|
1434
|
+
init_checksum4();
|
|
1435
|
+
});
|
|
1436
|
+
|
|
1437
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js
|
|
1438
|
+
var init_defaultExtensionConfiguration2 = () => {};
|
|
1439
|
+
|
|
1440
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/extensions/index.js
|
|
1441
|
+
var init_extensions3 = __esm(() => {
|
|
1442
|
+
init_checksum4();
|
|
1443
|
+
init_defaultClientConfiguration2();
|
|
1444
|
+
init_defaultExtensionConfiguration2();
|
|
1445
|
+
});
|
|
1446
|
+
|
|
1447
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/feature-ids.js
|
|
1448
|
+
var init_feature_ids = () => {};
|
|
1449
|
+
|
|
1450
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/http.js
|
|
1451
|
+
var FieldPosition2;
|
|
1452
|
+
var init_http2 = __esm(() => {
|
|
1453
|
+
(function(FieldPosition3) {
|
|
1454
|
+
FieldPosition3[FieldPosition3["HEADER"] = 0] = "HEADER";
|
|
1455
|
+
FieldPosition3[FieldPosition3["TRAILER"] = 1] = "TRAILER";
|
|
1456
|
+
})(FieldPosition2 || (FieldPosition2 = {}));
|
|
1457
|
+
});
|
|
1458
|
+
|
|
1459
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js
|
|
1460
|
+
var init_httpHandlerInitialization2 = () => {};
|
|
1461
|
+
|
|
1462
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js
|
|
1463
|
+
var init_apiKeyIdentity2 = () => {};
|
|
1464
|
+
|
|
1465
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js
|
|
1466
|
+
var init_awsCredentialIdentity2 = () => {};
|
|
1467
|
+
|
|
1468
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/identity/identity.js
|
|
1469
|
+
var init_identity3 = () => {};
|
|
1470
|
+
|
|
1471
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/identity/tokenIdentity.js
|
|
1472
|
+
var init_tokenIdentity2 = () => {};
|
|
1473
|
+
|
|
1474
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/identity/index.js
|
|
1475
|
+
var init_identity4 = __esm(() => {
|
|
1476
|
+
init_apiKeyIdentity2();
|
|
1477
|
+
init_awsCredentialIdentity2();
|
|
1478
|
+
init_identity3();
|
|
1479
|
+
init_tokenIdentity2();
|
|
1480
|
+
});
|
|
1481
|
+
|
|
1482
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/logger.js
|
|
1483
|
+
var init_logger2 = () => {};
|
|
1484
|
+
|
|
1485
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/middleware.js
|
|
1486
|
+
var init_middleware2 = () => {};
|
|
1487
|
+
|
|
1488
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/pagination.js
|
|
1489
|
+
var init_pagination2 = () => {};
|
|
1490
|
+
|
|
1491
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/profile.js
|
|
1492
|
+
var IniSectionType2;
|
|
1493
|
+
var init_profile2 = __esm(() => {
|
|
1494
|
+
(function(IniSectionType3) {
|
|
1495
|
+
IniSectionType3["PROFILE"] = "profile";
|
|
1496
|
+
IniSectionType3["SSO_SESSION"] = "sso-session";
|
|
1497
|
+
IniSectionType3["SERVICES"] = "services";
|
|
1498
|
+
})(IniSectionType2 || (IniSectionType2 = {}));
|
|
1499
|
+
});
|
|
1500
|
+
|
|
1501
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/response.js
|
|
1502
|
+
var init_response2 = () => {};
|
|
1503
|
+
|
|
1504
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/retry.js
|
|
1505
|
+
var init_retry2 = () => {};
|
|
1506
|
+
|
|
1507
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/serde.js
|
|
1508
|
+
var init_serde2 = () => {};
|
|
1509
|
+
|
|
1510
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/shapes.js
|
|
1511
|
+
var init_shapes2 = () => {};
|
|
1512
|
+
|
|
1513
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/signature.js
|
|
1514
|
+
var init_signature2 = () => {};
|
|
1515
|
+
|
|
1516
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/stream.js
|
|
1517
|
+
var init_stream2 = () => {};
|
|
1518
|
+
|
|
1519
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js
|
|
1520
|
+
var init_streaming_blob_common_types2 = () => {};
|
|
1521
|
+
|
|
1522
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js
|
|
1523
|
+
var init_streaming_blob_payload_input_types2 = () => {};
|
|
1524
|
+
|
|
1525
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js
|
|
1526
|
+
var init_streaming_blob_payload_output_types2 = () => {};
|
|
1527
|
+
|
|
1528
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/transfer.js
|
|
1529
|
+
var RequestHandlerProtocol2;
|
|
1530
|
+
var init_transfer2 = __esm(() => {
|
|
1531
|
+
(function(RequestHandlerProtocol3) {
|
|
1532
|
+
RequestHandlerProtocol3["HTTP_0_9"] = "http/0.9";
|
|
1533
|
+
RequestHandlerProtocol3["HTTP_1_0"] = "http/1.0";
|
|
1534
|
+
RequestHandlerProtocol3["TDS_8_0"] = "tds/8.0";
|
|
1535
|
+
})(RequestHandlerProtocol2 || (RequestHandlerProtocol2 = {}));
|
|
1536
|
+
});
|
|
1537
|
+
|
|
1538
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js
|
|
1539
|
+
var init_client_payload_blob_type_narrow2 = () => {};
|
|
1540
|
+
|
|
1541
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/transform/no-undefined.js
|
|
1542
|
+
var init_no_undefined2 = () => {};
|
|
1543
|
+
|
|
1544
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/transform/type-transform.js
|
|
1545
|
+
var init_type_transform2 = () => {};
|
|
1546
|
+
|
|
1547
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/uri.js
|
|
1548
|
+
var init_uri2 = () => {};
|
|
1549
|
+
|
|
1550
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/util.js
|
|
1551
|
+
var init_util2 = () => {};
|
|
1552
|
+
|
|
1553
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/waiter.js
|
|
1554
|
+
var init_waiter2 = () => {};
|
|
1555
|
+
|
|
1556
|
+
// node_modules/.bun/@smithy+types@3.7.2/node_modules/@smithy/types/dist-es/index.js
|
|
1557
|
+
var init_dist_es7 = __esm(() => {
|
|
1558
|
+
init_abort2();
|
|
1559
|
+
init_auth4();
|
|
1560
|
+
init_blob_payload_input_types2();
|
|
1561
|
+
init_checksum3();
|
|
1562
|
+
init_client3();
|
|
1563
|
+
init_command2();
|
|
1564
|
+
init_connection2();
|
|
1565
|
+
init_crypto2();
|
|
1566
|
+
init_encode2();
|
|
1567
|
+
init_endpoint2();
|
|
1568
|
+
init_endpoints2();
|
|
1569
|
+
init_eventStream2();
|
|
1570
|
+
init_extensions3();
|
|
1571
|
+
init_feature_ids();
|
|
1572
|
+
init_http2();
|
|
1573
|
+
init_httpHandlerInitialization2();
|
|
1574
|
+
init_identity4();
|
|
1575
|
+
init_logger2();
|
|
1576
|
+
init_middleware2();
|
|
1577
|
+
init_pagination2();
|
|
1578
|
+
init_profile2();
|
|
1579
|
+
init_response2();
|
|
1580
|
+
init_retry2();
|
|
1581
|
+
init_serde2();
|
|
1582
|
+
init_shapes2();
|
|
1583
|
+
init_signature2();
|
|
1584
|
+
init_stream2();
|
|
1585
|
+
init_streaming_blob_common_types2();
|
|
1586
|
+
init_streaming_blob_payload_input_types2();
|
|
1587
|
+
init_streaming_blob_payload_output_types2();
|
|
1588
|
+
init_transfer2();
|
|
1589
|
+
init_client_payload_blob_type_narrow2();
|
|
1590
|
+
init_no_undefined2();
|
|
1591
|
+
init_type_transform2();
|
|
1592
|
+
init_uri2();
|
|
1593
|
+
init_util2();
|
|
1594
|
+
init_waiter2();
|
|
1595
|
+
});
|
|
1596
|
+
|
|
1597
|
+
// node_modules/.bun/@smithy+util-middleware@3.0.11/node_modules/@smithy/util-middleware/dist-es/getSmithyContext.js
|
|
1598
|
+
var init_getSmithyContext = __esm(() => {
|
|
1599
|
+
init_dist_es7();
|
|
1600
|
+
});
|
|
1601
|
+
|
|
1602
|
+
// node_modules/.bun/@smithy+util-middleware@3.0.11/node_modules/@smithy/util-middleware/dist-es/normalizeProvider.js
|
|
1603
|
+
var normalizeProvider = (input) => {
|
|
1604
|
+
if (typeof input === "function")
|
|
1605
|
+
return input;
|
|
1606
|
+
const promisified = Promise.resolve(input);
|
|
1607
|
+
return () => promisified;
|
|
1608
|
+
};
|
|
1609
|
+
var init_normalizeProvider = () => {};
|
|
1610
|
+
|
|
1611
|
+
// node_modules/.bun/@smithy+util-middleware@3.0.11/node_modules/@smithy/util-middleware/dist-es/index.js
|
|
1612
|
+
var init_dist_es8 = __esm(() => {
|
|
1613
|
+
init_getSmithyContext();
|
|
1614
|
+
init_normalizeProvider();
|
|
1615
|
+
});
|
|
1616
|
+
|
|
1617
|
+
// node_modules/.bun/@smithy+util-uri-escape@3.0.0/node_modules/@smithy/util-uri-escape/dist-es/escape-uri.js
|
|
1618
|
+
var escapeUri = (uri3) => encodeURIComponent(uri3).replace(/[!'()*]/g, hexEncode), hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`;
|
|
1619
|
+
var init_escape_uri = () => {};
|
|
1620
|
+
|
|
1621
|
+
// node_modules/.bun/@smithy+util-uri-escape@3.0.0/node_modules/@smithy/util-uri-escape/dist-es/escape-uri-path.js
|
|
1622
|
+
var init_escape_uri_path = __esm(() => {
|
|
1623
|
+
init_escape_uri();
|
|
1624
|
+
});
|
|
1625
|
+
|
|
1626
|
+
// node_modules/.bun/@smithy+util-uri-escape@3.0.0/node_modules/@smithy/util-uri-escape/dist-es/index.js
|
|
1627
|
+
var init_dist_es9 = __esm(() => {
|
|
1628
|
+
init_escape_uri();
|
|
1629
|
+
init_escape_uri_path();
|
|
1630
|
+
});
|
|
1631
|
+
|
|
1632
|
+
// node_modules/.bun/@smithy+is-array-buffer@3.0.0/node_modules/@smithy/is-array-buffer/dist-es/index.js
|
|
1633
|
+
var isArrayBuffer = (arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]";
|
|
1634
|
+
var init_dist_es10 = () => {};
|
|
1635
|
+
|
|
1636
|
+
// node_modules/.bun/@smithy+util-buffer-from@3.0.0/node_modules/@smithy/util-buffer-from/dist-es/index.js
|
|
1637
|
+
import { Buffer as Buffer2 } from "buffer";
|
|
1638
|
+
var fromString2 = (input, encoding) => {
|
|
1639
|
+
if (typeof input !== "string") {
|
|
1640
|
+
throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`);
|
|
1641
|
+
}
|
|
1642
|
+
return encoding ? Buffer2.from(input, encoding) : Buffer2.from(input);
|
|
1643
|
+
};
|
|
1644
|
+
var init_dist_es11 = __esm(() => {
|
|
1645
|
+
init_dist_es10();
|
|
1646
|
+
});
|
|
1647
|
+
|
|
1648
|
+
// node_modules/.bun/@smithy+util-utf8@3.0.0/node_modules/@smithy/util-utf8/dist-es/fromUtf8.js
|
|
1649
|
+
var fromUtf82 = (input) => {
|
|
1650
|
+
const buf = fromString2(input, "utf8");
|
|
1651
|
+
return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);
|
|
1652
|
+
};
|
|
1653
|
+
var init_fromUtf8 = __esm(() => {
|
|
1654
|
+
init_dist_es11();
|
|
1655
|
+
});
|
|
1656
|
+
|
|
1657
|
+
// node_modules/.bun/@smithy+util-utf8@3.0.0/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js
|
|
1658
|
+
var toUint8Array = (data) => {
|
|
1659
|
+
if (typeof data === "string") {
|
|
1660
|
+
return fromUtf82(data);
|
|
1661
|
+
}
|
|
1662
|
+
if (ArrayBuffer.isView(data)) {
|
|
1663
|
+
return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);
|
|
1664
|
+
}
|
|
1665
|
+
return new Uint8Array(data);
|
|
1666
|
+
};
|
|
1667
|
+
var init_toUint8Array = __esm(() => {
|
|
1668
|
+
init_fromUtf8();
|
|
1669
|
+
});
|
|
1670
|
+
|
|
1671
|
+
// node_modules/.bun/@smithy+util-utf8@3.0.0/node_modules/@smithy/util-utf8/dist-es/toUtf8.js
|
|
1672
|
+
var init_toUtf8 = __esm(() => {
|
|
1673
|
+
init_dist_es11();
|
|
1674
|
+
});
|
|
1675
|
+
|
|
1676
|
+
// node_modules/.bun/@smithy+util-utf8@3.0.0/node_modules/@smithy/util-utf8/dist-es/index.js
|
|
1677
|
+
var init_dist_es12 = __esm(() => {
|
|
1678
|
+
init_fromUtf8();
|
|
1679
|
+
init_toUint8Array();
|
|
1680
|
+
init_toUtf8();
|
|
1681
|
+
});
|
|
1682
|
+
|
|
1683
|
+
// node_modules/.bun/@smithy+signature-v4@3.1.2/node_modules/@smithy/signature-v4/dist-es/constants.js
|
|
1684
|
+
var ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm", CREDENTIAL_QUERY_PARAM = "X-Amz-Credential", AMZ_DATE_QUERY_PARAM = "X-Amz-Date", SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders", EXPIRES_QUERY_PARAM = "X-Amz-Expires", SIGNATURE_QUERY_PARAM = "X-Amz-Signature", TOKEN_QUERY_PARAM = "X-Amz-Security-Token", AUTH_HEADER = "authorization", AMZ_DATE_HEADER, DATE_HEADER = "date", GENERATED_HEADERS, SIGNATURE_HEADER, SHA256_HEADER = "x-amz-content-sha256", TOKEN_HEADER, ALWAYS_UNSIGNABLE_HEADERS, PROXY_HEADER_PATTERN, SEC_HEADER_PATTERN, ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256", EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD", UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD", MAX_CACHE_SIZE = 50, KEY_TYPE_IDENTIFIER = "aws4_request", MAX_PRESIGNED_TTL;
|
|
1685
|
+
var init_constants = __esm(() => {
|
|
1686
|
+
AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase();
|
|
1687
|
+
GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER];
|
|
1688
|
+
SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase();
|
|
1689
|
+
TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase();
|
|
1690
|
+
ALWAYS_UNSIGNABLE_HEADERS = {
|
|
1691
|
+
authorization: true,
|
|
1692
|
+
"cache-control": true,
|
|
1693
|
+
connection: true,
|
|
1694
|
+
expect: true,
|
|
1695
|
+
from: true,
|
|
1696
|
+
"keep-alive": true,
|
|
1697
|
+
"max-forwards": true,
|
|
1698
|
+
pragma: true,
|
|
1699
|
+
referer: true,
|
|
1700
|
+
te: true,
|
|
1701
|
+
trailer: true,
|
|
1702
|
+
"transfer-encoding": true,
|
|
1703
|
+
upgrade: true,
|
|
1704
|
+
"user-agent": true,
|
|
1705
|
+
"x-amzn-trace-id": true
|
|
1706
|
+
};
|
|
1707
|
+
PROXY_HEADER_PATTERN = /^proxy-/;
|
|
1708
|
+
SEC_HEADER_PATTERN = /^sec-/;
|
|
1709
|
+
MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7;
|
|
1710
|
+
});
|
|
1711
|
+
|
|
1712
|
+
// node_modules/.bun/@smithy+signature-v4@3.1.2/node_modules/@smithy/signature-v4/dist-es/credentialDerivation.js
|
|
1713
|
+
var signingKeyCache, cacheQueue, createScope = (shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`, getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => {
|
|
1714
|
+
const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId);
|
|
1715
|
+
const cacheKey = `${shortDate}:${region}:${service}:${toHex(credsHash)}:${credentials.sessionToken}`;
|
|
1716
|
+
if (cacheKey in signingKeyCache) {
|
|
1717
|
+
return signingKeyCache[cacheKey];
|
|
1718
|
+
}
|
|
1719
|
+
cacheQueue.push(cacheKey);
|
|
1720
|
+
while (cacheQueue.length > MAX_CACHE_SIZE) {
|
|
1721
|
+
delete signingKeyCache[cacheQueue.shift()];
|
|
1722
|
+
}
|
|
1723
|
+
let key = `AWS4${credentials.secretAccessKey}`;
|
|
1724
|
+
for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) {
|
|
1725
|
+
key = await hmac(sha256Constructor, key, signable);
|
|
1726
|
+
}
|
|
1727
|
+
return signingKeyCache[cacheKey] = key;
|
|
1728
|
+
}, hmac = (ctor, secret, data) => {
|
|
1729
|
+
const hash = new ctor(secret);
|
|
1730
|
+
hash.update(toUint8Array(data));
|
|
1731
|
+
return hash.digest();
|
|
1732
|
+
};
|
|
1733
|
+
var init_credentialDerivation = __esm(() => {
|
|
1734
|
+
init_dist_es6();
|
|
1735
|
+
init_dist_es12();
|
|
1736
|
+
init_constants();
|
|
1737
|
+
signingKeyCache = {};
|
|
1738
|
+
cacheQueue = [];
|
|
1739
|
+
});
|
|
1740
|
+
|
|
1741
|
+
// node_modules/.bun/@smithy+signature-v4@3.1.2/node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js
|
|
1742
|
+
var getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) => {
|
|
1743
|
+
const canonical = {};
|
|
1744
|
+
for (const headerName of Object.keys(headers).sort()) {
|
|
1745
|
+
if (headers[headerName] == undefined) {
|
|
1746
|
+
continue;
|
|
1747
|
+
}
|
|
1748
|
+
const canonicalHeaderName = headerName.toLowerCase();
|
|
1749
|
+
if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || unsignableHeaders?.has(canonicalHeaderName) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) {
|
|
1750
|
+
if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) {
|
|
1751
|
+
continue;
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " ");
|
|
1755
|
+
}
|
|
1756
|
+
return canonical;
|
|
1757
|
+
};
|
|
1758
|
+
var init_getCanonicalHeaders = __esm(() => {
|
|
1759
|
+
init_constants();
|
|
1760
|
+
});
|
|
1761
|
+
|
|
1762
|
+
// node_modules/.bun/@smithy+signature-v4@3.1.2/node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js
|
|
1763
|
+
var getCanonicalQuery = ({ query = {} }) => {
|
|
1764
|
+
const keys = [];
|
|
1765
|
+
const serialized = {};
|
|
1766
|
+
for (const key of Object.keys(query).sort()) {
|
|
1767
|
+
if (key.toLowerCase() === SIGNATURE_HEADER) {
|
|
1768
|
+
continue;
|
|
1769
|
+
}
|
|
1770
|
+
keys.push(key);
|
|
1771
|
+
const value = query[key];
|
|
1772
|
+
if (typeof value === "string") {
|
|
1773
|
+
serialized[key] = `${escapeUri(key)}=${escapeUri(value)}`;
|
|
1774
|
+
} else if (Array.isArray(value)) {
|
|
1775
|
+
serialized[key] = value.slice(0).reduce((encoded, value2) => encoded.concat([`${escapeUri(key)}=${escapeUri(value2)}`]), []).sort().join("&");
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1778
|
+
return keys.map((key) => serialized[key]).filter((serialized2) => serialized2).join("&");
|
|
1779
|
+
};
|
|
1780
|
+
var init_getCanonicalQuery = __esm(() => {
|
|
1781
|
+
init_dist_es9();
|
|
1782
|
+
init_constants();
|
|
1783
|
+
});
|
|
1784
|
+
|
|
1785
|
+
// node_modules/.bun/@smithy+signature-v4@3.1.2/node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js
|
|
1786
|
+
var getPayloadHash = async ({ headers, body }, hashConstructor) => {
|
|
1787
|
+
for (const headerName of Object.keys(headers)) {
|
|
1788
|
+
if (headerName.toLowerCase() === SHA256_HEADER) {
|
|
1789
|
+
return headers[headerName];
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
if (body == undefined) {
|
|
1793
|
+
return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
|
|
1794
|
+
} else if (typeof body === "string" || ArrayBuffer.isView(body) || isArrayBuffer(body)) {
|
|
1795
|
+
const hashCtor = new hashConstructor;
|
|
1796
|
+
hashCtor.update(toUint8Array(body));
|
|
1797
|
+
return toHex(await hashCtor.digest());
|
|
1798
|
+
}
|
|
1799
|
+
return UNSIGNED_PAYLOAD;
|
|
1800
|
+
};
|
|
1801
|
+
var init_getPayloadHash = __esm(() => {
|
|
1802
|
+
init_dist_es10();
|
|
1803
|
+
init_dist_es6();
|
|
1804
|
+
init_dist_es12();
|
|
1805
|
+
init_constants();
|
|
1806
|
+
});
|
|
1807
|
+
|
|
1808
|
+
// node_modules/.bun/@smithy+signature-v4@3.1.2/node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js
|
|
1809
|
+
class HeaderFormatter {
|
|
1810
|
+
format(headers) {
|
|
1811
|
+
const chunks = [];
|
|
1812
|
+
for (const headerName of Object.keys(headers)) {
|
|
1813
|
+
const bytes = fromUtf82(headerName);
|
|
1814
|
+
chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
|
|
1815
|
+
}
|
|
1816
|
+
const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));
|
|
1817
|
+
let position = 0;
|
|
1818
|
+
for (const chunk of chunks) {
|
|
1819
|
+
out.set(chunk, position);
|
|
1820
|
+
position += chunk.byteLength;
|
|
1821
|
+
}
|
|
1822
|
+
return out;
|
|
1823
|
+
}
|
|
1824
|
+
formatHeaderValue(header) {
|
|
1825
|
+
switch (header.type) {
|
|
1826
|
+
case "boolean":
|
|
1827
|
+
return Uint8Array.from([header.value ? 0 : 1]);
|
|
1828
|
+
case "byte":
|
|
1829
|
+
return Uint8Array.from([2, header.value]);
|
|
1830
|
+
case "short":
|
|
1831
|
+
const shortView = new DataView(new ArrayBuffer(3));
|
|
1832
|
+
shortView.setUint8(0, 3);
|
|
1833
|
+
shortView.setInt16(1, header.value, false);
|
|
1834
|
+
return new Uint8Array(shortView.buffer);
|
|
1835
|
+
case "integer":
|
|
1836
|
+
const intView = new DataView(new ArrayBuffer(5));
|
|
1837
|
+
intView.setUint8(0, 4);
|
|
1838
|
+
intView.setInt32(1, header.value, false);
|
|
1839
|
+
return new Uint8Array(intView.buffer);
|
|
1840
|
+
case "long":
|
|
1841
|
+
const longBytes = new Uint8Array(9);
|
|
1842
|
+
longBytes[0] = 5;
|
|
1843
|
+
longBytes.set(header.value.bytes, 1);
|
|
1844
|
+
return longBytes;
|
|
1845
|
+
case "binary":
|
|
1846
|
+
const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));
|
|
1847
|
+
binView.setUint8(0, 6);
|
|
1848
|
+
binView.setUint16(1, header.value.byteLength, false);
|
|
1849
|
+
const binBytes = new Uint8Array(binView.buffer);
|
|
1850
|
+
binBytes.set(header.value, 3);
|
|
1851
|
+
return binBytes;
|
|
1852
|
+
case "string":
|
|
1853
|
+
const utf8Bytes = fromUtf82(header.value);
|
|
1854
|
+
const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));
|
|
1855
|
+
strView.setUint8(0, 7);
|
|
1856
|
+
strView.setUint16(1, utf8Bytes.byteLength, false);
|
|
1857
|
+
const strBytes = new Uint8Array(strView.buffer);
|
|
1858
|
+
strBytes.set(utf8Bytes, 3);
|
|
1859
|
+
return strBytes;
|
|
1860
|
+
case "timestamp":
|
|
1861
|
+
const tsBytes = new Uint8Array(9);
|
|
1862
|
+
tsBytes[0] = 8;
|
|
1863
|
+
tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);
|
|
1864
|
+
return tsBytes;
|
|
1865
|
+
case "uuid":
|
|
1866
|
+
if (!UUID_PATTERN.test(header.value)) {
|
|
1867
|
+
throw new Error(`Invalid UUID received: ${header.value}`);
|
|
1868
|
+
}
|
|
1869
|
+
const uuidBytes = new Uint8Array(17);
|
|
1870
|
+
uuidBytes[0] = 9;
|
|
1871
|
+
uuidBytes.set(fromHex(header.value.replace(/\-/g, "")), 1);
|
|
1872
|
+
return uuidBytes;
|
|
1873
|
+
}
|
|
1874
|
+
}
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
class Int64 {
|
|
1878
|
+
constructor(bytes) {
|
|
1879
|
+
this.bytes = bytes;
|
|
1880
|
+
if (bytes.byteLength !== 8) {
|
|
1881
|
+
throw new Error("Int64 buffers must be exactly 8 bytes");
|
|
1882
|
+
}
|
|
1883
|
+
}
|
|
1884
|
+
static fromNumber(number) {
|
|
1885
|
+
if (number > 9223372036854776000 || number < -9223372036854776000) {
|
|
1886
|
+
throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);
|
|
1887
|
+
}
|
|
1888
|
+
const bytes = new Uint8Array(8);
|
|
1889
|
+
for (let i = 7, remaining = Math.abs(Math.round(number));i > -1 && remaining > 0; i--, remaining /= 256) {
|
|
1890
|
+
bytes[i] = remaining;
|
|
1891
|
+
}
|
|
1892
|
+
if (number < 0) {
|
|
1893
|
+
negate(bytes);
|
|
1894
|
+
}
|
|
1895
|
+
return new Int64(bytes);
|
|
1896
|
+
}
|
|
1897
|
+
valueOf() {
|
|
1898
|
+
const bytes = this.bytes.slice(0);
|
|
1899
|
+
const negative = bytes[0] & 128;
|
|
1900
|
+
if (negative) {
|
|
1901
|
+
negate(bytes);
|
|
1902
|
+
}
|
|
1903
|
+
return parseInt(toHex(bytes), 16) * (negative ? -1 : 1);
|
|
1904
|
+
}
|
|
1905
|
+
toString() {
|
|
1906
|
+
return String(this.valueOf());
|
|
1907
|
+
}
|
|
1908
|
+
}
|
|
1909
|
+
function negate(bytes) {
|
|
1910
|
+
for (let i = 0;i < 8; i++) {
|
|
1911
|
+
bytes[i] ^= 255;
|
|
1912
|
+
}
|
|
1913
|
+
for (let i = 7;i > -1; i--) {
|
|
1914
|
+
bytes[i]++;
|
|
1915
|
+
if (bytes[i] !== 0)
|
|
1916
|
+
break;
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
var HEADER_VALUE_TYPE, UUID_PATTERN;
|
|
1920
|
+
var init_HeaderFormatter = __esm(() => {
|
|
1921
|
+
init_dist_es6();
|
|
1922
|
+
init_dist_es12();
|
|
1923
|
+
(function(HEADER_VALUE_TYPE2) {
|
|
1924
|
+
HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["boolTrue"] = 0] = "boolTrue";
|
|
1925
|
+
HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["boolFalse"] = 1] = "boolFalse";
|
|
1926
|
+
HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["byte"] = 2] = "byte";
|
|
1927
|
+
HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["short"] = 3] = "short";
|
|
1928
|
+
HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["integer"] = 4] = "integer";
|
|
1929
|
+
HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["long"] = 5] = "long";
|
|
1930
|
+
HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["byteArray"] = 6] = "byteArray";
|
|
1931
|
+
HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["string"] = 7] = "string";
|
|
1932
|
+
HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["timestamp"] = 8] = "timestamp";
|
|
1933
|
+
HEADER_VALUE_TYPE2[HEADER_VALUE_TYPE2["uuid"] = 9] = "uuid";
|
|
1934
|
+
})(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {}));
|
|
1935
|
+
UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;
|
|
1936
|
+
});
|
|
1937
|
+
|
|
1938
|
+
// node_modules/.bun/@smithy+signature-v4@3.1.2/node_modules/@smithy/signature-v4/dist-es/headerUtil.js
|
|
1939
|
+
var hasHeader = (soughtHeader, headers) => {
|
|
1940
|
+
soughtHeader = soughtHeader.toLowerCase();
|
|
1941
|
+
for (const headerName of Object.keys(headers)) {
|
|
1942
|
+
if (soughtHeader === headerName.toLowerCase()) {
|
|
1943
|
+
return true;
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
return false;
|
|
1947
|
+
};
|
|
1948
|
+
var init_headerUtil = () => {};
|
|
1949
|
+
|
|
1950
|
+
// node_modules/.bun/@smithy+signature-v4@3.1.2/node_modules/@smithy/signature-v4/dist-es/cloneRequest.js
|
|
1951
|
+
var cloneRequest = ({ headers, query, ...rest }) => ({
|
|
1952
|
+
...rest,
|
|
1953
|
+
headers: { ...headers },
|
|
1954
|
+
query: query ? cloneQuery2(query) : undefined
|
|
1955
|
+
}), cloneQuery2 = (query) => Object.keys(query).reduce((carry, paramName) => {
|
|
1956
|
+
const param = query[paramName];
|
|
1957
|
+
return {
|
|
1958
|
+
...carry,
|
|
1959
|
+
[paramName]: Array.isArray(param) ? [...param] : param
|
|
1960
|
+
};
|
|
1961
|
+
}, {});
|
|
1962
|
+
var init_cloneRequest = () => {};
|
|
1963
|
+
|
|
1964
|
+
// node_modules/.bun/@smithy+signature-v4@3.1.2/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js
|
|
1965
|
+
var moveHeadersToQuery = (request, options = {}) => {
|
|
1966
|
+
const { headers, query = {} } = typeof request.clone === "function" ? request.clone() : cloneRequest(request);
|
|
1967
|
+
for (const name of Object.keys(headers)) {
|
|
1968
|
+
const lname = name.toLowerCase();
|
|
1969
|
+
if (lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname)) {
|
|
1970
|
+
query[name] = headers[name];
|
|
1971
|
+
delete headers[name];
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
return {
|
|
1975
|
+
...request,
|
|
1976
|
+
headers,
|
|
1977
|
+
query
|
|
1978
|
+
};
|
|
1979
|
+
};
|
|
1980
|
+
var init_moveHeadersToQuery = __esm(() => {
|
|
1981
|
+
init_cloneRequest();
|
|
1982
|
+
});
|
|
1983
|
+
|
|
1984
|
+
// node_modules/.bun/@smithy+signature-v4@3.1.2/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js
|
|
1985
|
+
var prepareRequest = (request) => {
|
|
1986
|
+
request = typeof request.clone === "function" ? request.clone() : cloneRequest(request);
|
|
1987
|
+
for (const headerName of Object.keys(request.headers)) {
|
|
1988
|
+
if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {
|
|
1989
|
+
delete request.headers[headerName];
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1992
|
+
return request;
|
|
1993
|
+
};
|
|
1994
|
+
var init_prepareRequest = __esm(() => {
|
|
1995
|
+
init_cloneRequest();
|
|
1996
|
+
init_constants();
|
|
1997
|
+
});
|
|
1998
|
+
|
|
1999
|
+
// node_modules/.bun/@smithy+signature-v4@3.1.2/node_modules/@smithy/signature-v4/dist-es/utilDate.js
|
|
2000
|
+
var iso8601 = (time) => toDate(time).toISOString().replace(/\.\d{3}Z$/, "Z"), toDate = (time) => {
|
|
2001
|
+
if (typeof time === "number") {
|
|
2002
|
+
return new Date(time * 1000);
|
|
2003
|
+
}
|
|
2004
|
+
if (typeof time === "string") {
|
|
2005
|
+
if (Number(time)) {
|
|
2006
|
+
return new Date(Number(time) * 1000);
|
|
2007
|
+
}
|
|
2008
|
+
return new Date(time);
|
|
2009
|
+
}
|
|
2010
|
+
return time;
|
|
2011
|
+
};
|
|
2012
|
+
var init_utilDate = () => {};
|
|
2013
|
+
|
|
2014
|
+
// node_modules/.bun/@smithy+signature-v4@3.1.2/node_modules/@smithy/signature-v4/dist-es/SignatureV4.js
|
|
2015
|
+
class SignatureV4 {
|
|
2016
|
+
constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true }) {
|
|
2017
|
+
this.headerFormatter = new HeaderFormatter;
|
|
2018
|
+
this.service = service;
|
|
2019
|
+
this.sha256 = sha256;
|
|
2020
|
+
this.uriEscapePath = uriEscapePath;
|
|
2021
|
+
this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true;
|
|
2022
|
+
this.regionProvider = normalizeProvider(region);
|
|
2023
|
+
this.credentialProvider = normalizeProvider(credentials);
|
|
2024
|
+
}
|
|
2025
|
+
async presign(originalRequest, options = {}) {
|
|
2026
|
+
const { signingDate = new Date, expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, signingRegion, signingService } = options;
|
|
2027
|
+
const credentials = await this.credentialProvider();
|
|
2028
|
+
this.validateResolvedCredentials(credentials);
|
|
2029
|
+
const region = signingRegion ?? await this.regionProvider();
|
|
2030
|
+
const { longDate, shortDate } = formatDate(signingDate);
|
|
2031
|
+
if (expiresIn > MAX_PRESIGNED_TTL) {
|
|
2032
|
+
return Promise.reject("Signature version 4 presigned URLs" + " must have an expiration date less than one week in" + " the future");
|
|
2033
|
+
}
|
|
2034
|
+
const scope = createScope(shortDate, region, signingService ?? this.service);
|
|
2035
|
+
const request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders });
|
|
2036
|
+
if (credentials.sessionToken) {
|
|
2037
|
+
request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken;
|
|
2038
|
+
}
|
|
2039
|
+
request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER;
|
|
2040
|
+
request.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`;
|
|
2041
|
+
request.query[AMZ_DATE_QUERY_PARAM] = longDate;
|
|
2042
|
+
request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10);
|
|
2043
|
+
const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);
|
|
2044
|
+
request.query[SIGNED_HEADERS_QUERY_PARAM] = getCanonicalHeaderList(canonicalHeaders);
|
|
2045
|
+
request.query[SIGNATURE_QUERY_PARAM] = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256)));
|
|
2046
|
+
return request;
|
|
2047
|
+
}
|
|
2048
|
+
async sign(toSign, options) {
|
|
2049
|
+
if (typeof toSign === "string") {
|
|
2050
|
+
return this.signString(toSign, options);
|
|
2051
|
+
} else if (toSign.headers && toSign.payload) {
|
|
2052
|
+
return this.signEvent(toSign, options);
|
|
2053
|
+
} else if (toSign.message) {
|
|
2054
|
+
return this.signMessage(toSign, options);
|
|
2055
|
+
} else {
|
|
2056
|
+
return this.signRequest(toSign, options);
|
|
2057
|
+
}
|
|
2058
|
+
}
|
|
2059
|
+
async signEvent({ headers, payload }, { signingDate = new Date, priorSignature, signingRegion, signingService }) {
|
|
2060
|
+
const region = signingRegion ?? await this.regionProvider();
|
|
2061
|
+
const { shortDate, longDate } = formatDate(signingDate);
|
|
2062
|
+
const scope = createScope(shortDate, region, signingService ?? this.service);
|
|
2063
|
+
const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256);
|
|
2064
|
+
const hash = new this.sha256;
|
|
2065
|
+
hash.update(headers);
|
|
2066
|
+
const hashedHeaders = toHex(await hash.digest());
|
|
2067
|
+
const stringToSign = [
|
|
2068
|
+
EVENT_ALGORITHM_IDENTIFIER,
|
|
2069
|
+
longDate,
|
|
2070
|
+
scope,
|
|
2071
|
+
priorSignature,
|
|
2072
|
+
hashedHeaders,
|
|
2073
|
+
hashedPayload
|
|
2074
|
+
].join(`
|
|
2075
|
+
`);
|
|
2076
|
+
return this.signString(stringToSign, { signingDate, signingRegion: region, signingService });
|
|
2077
|
+
}
|
|
2078
|
+
async signMessage(signableMessage, { signingDate = new Date, signingRegion, signingService }) {
|
|
2079
|
+
const promise = this.signEvent({
|
|
2080
|
+
headers: this.headerFormatter.format(signableMessage.message.headers),
|
|
2081
|
+
payload: signableMessage.message.body
|
|
2082
|
+
}, {
|
|
2083
|
+
signingDate,
|
|
2084
|
+
signingRegion,
|
|
2085
|
+
signingService,
|
|
2086
|
+
priorSignature: signableMessage.priorSignature
|
|
2087
|
+
});
|
|
2088
|
+
return promise.then((signature3) => {
|
|
2089
|
+
return { message: signableMessage.message, signature: signature3 };
|
|
2090
|
+
});
|
|
2091
|
+
}
|
|
2092
|
+
async signString(stringToSign, { signingDate = new Date, signingRegion, signingService } = {}) {
|
|
2093
|
+
const credentials = await this.credentialProvider();
|
|
2094
|
+
this.validateResolvedCredentials(credentials);
|
|
2095
|
+
const region = signingRegion ?? await this.regionProvider();
|
|
2096
|
+
const { shortDate } = formatDate(signingDate);
|
|
2097
|
+
const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService));
|
|
2098
|
+
hash.update(toUint8Array(stringToSign));
|
|
2099
|
+
return toHex(await hash.digest());
|
|
2100
|
+
}
|
|
2101
|
+
async signRequest(requestToSign, { signingDate = new Date, signableHeaders, unsignableHeaders, signingRegion, signingService } = {}) {
|
|
2102
|
+
const credentials = await this.credentialProvider();
|
|
2103
|
+
this.validateResolvedCredentials(credentials);
|
|
2104
|
+
const region = signingRegion ?? await this.regionProvider();
|
|
2105
|
+
const request = prepareRequest(requestToSign);
|
|
2106
|
+
const { longDate, shortDate } = formatDate(signingDate);
|
|
2107
|
+
const scope = createScope(shortDate, region, signingService ?? this.service);
|
|
2108
|
+
request.headers[AMZ_DATE_HEADER] = longDate;
|
|
2109
|
+
if (credentials.sessionToken) {
|
|
2110
|
+
request.headers[TOKEN_HEADER] = credentials.sessionToken;
|
|
2111
|
+
}
|
|
2112
|
+
const payloadHash = await getPayloadHash(request, this.sha256);
|
|
2113
|
+
if (!hasHeader(SHA256_HEADER, request.headers) && this.applyChecksum) {
|
|
2114
|
+
request.headers[SHA256_HEADER] = payloadHash;
|
|
2115
|
+
}
|
|
2116
|
+
const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);
|
|
2117
|
+
const signature3 = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, payloadHash));
|
|
2118
|
+
request.headers[AUTH_HEADER] = `${ALGORITHM_IDENTIFIER} ` + `Credential=${credentials.accessKeyId}/${scope}, ` + `SignedHeaders=${getCanonicalHeaderList(canonicalHeaders)}, ` + `Signature=${signature3}`;
|
|
2119
|
+
return request;
|
|
2120
|
+
}
|
|
2121
|
+
createCanonicalRequest(request, canonicalHeaders, payloadHash) {
|
|
2122
|
+
const sortedHeaders = Object.keys(canonicalHeaders).sort();
|
|
2123
|
+
return `${request.method}
|
|
2124
|
+
${this.getCanonicalPath(request)}
|
|
2125
|
+
${getCanonicalQuery(request)}
|
|
2126
|
+
${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join(`
|
|
2127
|
+
`)}
|
|
2128
|
+
|
|
2129
|
+
${sortedHeaders.join(";")}
|
|
2130
|
+
${payloadHash}`;
|
|
2131
|
+
}
|
|
2132
|
+
async createStringToSign(longDate, credentialScope, canonicalRequest) {
|
|
2133
|
+
const hash = new this.sha256;
|
|
2134
|
+
hash.update(toUint8Array(canonicalRequest));
|
|
2135
|
+
const hashedRequest = await hash.digest();
|
|
2136
|
+
return `${ALGORITHM_IDENTIFIER}
|
|
2137
|
+
${longDate}
|
|
2138
|
+
${credentialScope}
|
|
2139
|
+
${toHex(hashedRequest)}`;
|
|
2140
|
+
}
|
|
2141
|
+
getCanonicalPath({ path }) {
|
|
2142
|
+
if (this.uriEscapePath) {
|
|
2143
|
+
const normalizedPathSegments = [];
|
|
2144
|
+
for (const pathSegment of path.split("/")) {
|
|
2145
|
+
if (pathSegment?.length === 0)
|
|
2146
|
+
continue;
|
|
2147
|
+
if (pathSegment === ".")
|
|
2148
|
+
continue;
|
|
2149
|
+
if (pathSegment === "..") {
|
|
2150
|
+
normalizedPathSegments.pop();
|
|
2151
|
+
} else {
|
|
2152
|
+
normalizedPathSegments.push(pathSegment);
|
|
2153
|
+
}
|
|
2154
|
+
}
|
|
2155
|
+
const normalizedPath = `${path?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path?.endsWith("/") ? "/" : ""}`;
|
|
2156
|
+
const doubleEncoded = escapeUri(normalizedPath);
|
|
2157
|
+
return doubleEncoded.replace(/%2F/g, "/");
|
|
2158
|
+
}
|
|
2159
|
+
return path;
|
|
2160
|
+
}
|
|
2161
|
+
async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) {
|
|
2162
|
+
const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest);
|
|
2163
|
+
const hash = new this.sha256(await keyPromise);
|
|
2164
|
+
hash.update(toUint8Array(stringToSign));
|
|
2165
|
+
return toHex(await hash.digest());
|
|
2166
|
+
}
|
|
2167
|
+
getSigningKey(credentials, region, shortDate, service) {
|
|
2168
|
+
return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service);
|
|
2169
|
+
}
|
|
2170
|
+
validateResolvedCredentials(credentials) {
|
|
2171
|
+
if (typeof credentials !== "object" || typeof credentials.accessKeyId !== "string" || typeof credentials.secretAccessKey !== "string") {
|
|
2172
|
+
throw new Error("Resolved credential object is not valid");
|
|
2173
|
+
}
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2176
|
+
var formatDate = (now) => {
|
|
2177
|
+
const longDate = iso8601(now).replace(/[\-:]/g, "");
|
|
2178
|
+
return {
|
|
2179
|
+
longDate,
|
|
2180
|
+
shortDate: longDate.slice(0, 8)
|
|
2181
|
+
};
|
|
2182
|
+
}, getCanonicalHeaderList = (headers) => Object.keys(headers).sort().join(";");
|
|
2183
|
+
var init_SignatureV4 = __esm(() => {
|
|
2184
|
+
init_dist_es6();
|
|
2185
|
+
init_dist_es8();
|
|
2186
|
+
init_dist_es9();
|
|
2187
|
+
init_dist_es12();
|
|
2188
|
+
init_constants();
|
|
2189
|
+
init_credentialDerivation();
|
|
2190
|
+
init_getCanonicalHeaders();
|
|
2191
|
+
init_getCanonicalQuery();
|
|
2192
|
+
init_getPayloadHash();
|
|
2193
|
+
init_HeaderFormatter();
|
|
2194
|
+
init_headerUtil();
|
|
2195
|
+
init_moveHeadersToQuery();
|
|
2196
|
+
init_prepareRequest();
|
|
2197
|
+
init_utilDate();
|
|
2198
|
+
});
|
|
2199
|
+
|
|
2200
|
+
// node_modules/.bun/@smithy+signature-v4@3.1.2/node_modules/@smithy/signature-v4/dist-es/index.js
|
|
2201
|
+
var init_dist_es13 = __esm(() => {
|
|
2202
|
+
init_getCanonicalHeaders();
|
|
2203
|
+
init_getCanonicalQuery();
|
|
2204
|
+
init_getPayloadHash();
|
|
2205
|
+
init_moveHeadersToQuery();
|
|
2206
|
+
init_prepareRequest();
|
|
2207
|
+
init_SignatureV4();
|
|
2208
|
+
init_credentialDerivation();
|
|
2209
|
+
});
|
|
2210
|
+
|
|
2211
|
+
// node_modules/.bun/@anthropic-ai+bedrock-sdk@0.26.4+3c5d820c62823f0b/node_modules/@anthropic-ai/bedrock-sdk/core/auth.mjs
|
|
2212
|
+
import assert from "assert";
|
|
2213
|
+
var import_sha256_js, import_fetch_http_handler, DEFAULT_PROVIDER_CHAIN_RESOLVER = () => import("./chunk-gsz4dh3y.js").then(({ fromNodeProviderChain }) => fromNodeProviderChain({
|
|
2214
|
+
clientConfig: {
|
|
2215
|
+
requestHandler: new import_fetch_http_handler.FetchHttpHandler({
|
|
2216
|
+
requestInit: (httpRequest2) => {
|
|
2217
|
+
return {
|
|
2218
|
+
...httpRequest2
|
|
2219
|
+
};
|
|
2220
|
+
}
|
|
2221
|
+
})
|
|
2222
|
+
}
|
|
2223
|
+
})).catch((error) => {
|
|
2224
|
+
throw new Error(`Failed to import '@aws-sdk/credential-providers'.You can provide a custom \`providerChainResolver\` in the client options if your runtime does not have access to '@aws-sdk/credential-providers': \`new AnthropicBedrock({ providerChainResolver })\` Original error: ${error.message}`);
|
|
2225
|
+
}), getAuthHeaders = async (req, props) => {
|
|
2226
|
+
assert(req.method, "Expected request method property to be set");
|
|
2227
|
+
let credentials;
|
|
2228
|
+
if (props.awsAccessKey && props.awsSecretKey) {
|
|
2229
|
+
credentials = {
|
|
2230
|
+
accessKeyId: props.awsAccessKey,
|
|
2231
|
+
secretAccessKey: props.awsSecretKey,
|
|
2232
|
+
...props.awsSessionToken != null && { sessionToken: props.awsSessionToken }
|
|
2233
|
+
};
|
|
2234
|
+
} else {
|
|
2235
|
+
const provider = await (props.providerChainResolver ? props.providerChainResolver() : DEFAULT_PROVIDER_CHAIN_RESOLVER());
|
|
2236
|
+
credentials = await provider();
|
|
2237
|
+
}
|
|
2238
|
+
const signer = new SignatureV4({
|
|
2239
|
+
service: "bedrock",
|
|
2240
|
+
region: props.regionName,
|
|
2241
|
+
credentials,
|
|
2242
|
+
sha256: import_sha256_js.Sha256
|
|
2243
|
+
});
|
|
2244
|
+
const url = new URL(props.url);
|
|
2245
|
+
const headers = !req.headers ? {} : (Symbol.iterator in req.headers) ? Object.fromEntries(Array.from(req.headers).map((header) => [...header])) : { ...req.headers };
|
|
2246
|
+
delete headers["connection"];
|
|
2247
|
+
headers["host"] = url.hostname;
|
|
2248
|
+
const request = new HttpRequest({
|
|
2249
|
+
method: req.method.toUpperCase(),
|
|
2250
|
+
protocol: url.protocol,
|
|
2251
|
+
path: url.pathname,
|
|
2252
|
+
headers,
|
|
2253
|
+
body: req.body
|
|
2254
|
+
});
|
|
2255
|
+
const signed = await signer.sign(request);
|
|
2256
|
+
return signed.headers;
|
|
2257
|
+
};
|
|
2258
|
+
var init_auth5 = __esm(() => {
|
|
2259
|
+
init_dist_es5();
|
|
2260
|
+
init_dist_es13();
|
|
2261
|
+
import_sha256_js = __toESM(require_build2(), 1);
|
|
2262
|
+
import_fetch_http_handler = __toESM(require_dist_cjs(), 1);
|
|
2263
|
+
});
|
|
2264
|
+
|
|
2265
|
+
// node_modules/.bun/@aws-crypto+util@3.0.0/node_modules/@aws-crypto/util/build/convertToBuffer.js
|
|
2266
|
+
var require_convertToBuffer2 = __commonJS((exports) => {
|
|
2267
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2268
|
+
exports.convertToBuffer = undefined;
|
|
2269
|
+
var util_utf8_browser_1 = require_dist_cjs2();
|
|
2270
|
+
var fromUtf84 = typeof Buffer !== "undefined" && Buffer.from ? function(input) {
|
|
2271
|
+
return Buffer.from(input, "utf8");
|
|
2272
|
+
} : util_utf8_browser_1.fromUtf8;
|
|
2273
|
+
function convertToBuffer(data) {
|
|
2274
|
+
if (data instanceof Uint8Array)
|
|
2275
|
+
return data;
|
|
2276
|
+
if (typeof data === "string") {
|
|
2277
|
+
return fromUtf84(data);
|
|
2278
|
+
}
|
|
2279
|
+
if (ArrayBuffer.isView(data)) {
|
|
2280
|
+
return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);
|
|
2281
|
+
}
|
|
2282
|
+
return new Uint8Array(data);
|
|
2283
|
+
}
|
|
2284
|
+
exports.convertToBuffer = convertToBuffer;
|
|
2285
|
+
});
|
|
2286
|
+
|
|
2287
|
+
// node_modules/.bun/@aws-crypto+util@3.0.0/node_modules/@aws-crypto/util/build/isEmptyData.js
|
|
2288
|
+
var require_isEmptyData2 = __commonJS((exports) => {
|
|
2289
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2290
|
+
exports.isEmptyData = undefined;
|
|
2291
|
+
function isEmptyData(data) {
|
|
2292
|
+
if (typeof data === "string") {
|
|
2293
|
+
return data.length === 0;
|
|
2294
|
+
}
|
|
2295
|
+
return data.byteLength === 0;
|
|
2296
|
+
}
|
|
2297
|
+
exports.isEmptyData = isEmptyData;
|
|
2298
|
+
});
|
|
2299
|
+
|
|
2300
|
+
// node_modules/.bun/@aws-crypto+util@3.0.0/node_modules/@aws-crypto/util/build/numToUint8.js
|
|
2301
|
+
var require_numToUint82 = __commonJS((exports) => {
|
|
2302
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2303
|
+
exports.numToUint8 = undefined;
|
|
2304
|
+
function numToUint8(num) {
|
|
2305
|
+
return new Uint8Array([
|
|
2306
|
+
(num & 4278190080) >> 24,
|
|
2307
|
+
(num & 16711680) >> 16,
|
|
2308
|
+
(num & 65280) >> 8,
|
|
2309
|
+
num & 255
|
|
2310
|
+
]);
|
|
2311
|
+
}
|
|
2312
|
+
exports.numToUint8 = numToUint8;
|
|
2313
|
+
});
|
|
2314
|
+
|
|
2315
|
+
// node_modules/.bun/@aws-crypto+util@3.0.0/node_modules/@aws-crypto/util/build/uint32ArrayFrom.js
|
|
2316
|
+
var require_uint32ArrayFrom2 = __commonJS((exports) => {
|
|
2317
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2318
|
+
exports.uint32ArrayFrom = undefined;
|
|
2319
|
+
function uint32ArrayFrom(a_lookUpTable) {
|
|
2320
|
+
if (!Uint32Array.from) {
|
|
2321
|
+
var return_array = new Uint32Array(a_lookUpTable.length);
|
|
2322
|
+
var a_index = 0;
|
|
2323
|
+
while (a_index < a_lookUpTable.length) {
|
|
2324
|
+
return_array[a_index] = a_lookUpTable[a_index];
|
|
2325
|
+
a_index += 1;
|
|
2326
|
+
}
|
|
2327
|
+
return return_array;
|
|
2328
|
+
}
|
|
2329
|
+
return Uint32Array.from(a_lookUpTable);
|
|
2330
|
+
}
|
|
2331
|
+
exports.uint32ArrayFrom = uint32ArrayFrom;
|
|
2332
|
+
});
|
|
2333
|
+
|
|
2334
|
+
// node_modules/.bun/@aws-crypto+util@3.0.0/node_modules/@aws-crypto/util/build/index.js
|
|
2335
|
+
var require_build3 = __commonJS((exports) => {
|
|
2336
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2337
|
+
exports.uint32ArrayFrom = exports.numToUint8 = exports.isEmptyData = exports.convertToBuffer = undefined;
|
|
2338
|
+
var convertToBuffer_1 = require_convertToBuffer2();
|
|
2339
|
+
Object.defineProperty(exports, "convertToBuffer", { enumerable: true, get: function() {
|
|
2340
|
+
return convertToBuffer_1.convertToBuffer;
|
|
2341
|
+
} });
|
|
2342
|
+
var isEmptyData_1 = require_isEmptyData2();
|
|
2343
|
+
Object.defineProperty(exports, "isEmptyData", { enumerable: true, get: function() {
|
|
2344
|
+
return isEmptyData_1.isEmptyData;
|
|
2345
|
+
} });
|
|
2346
|
+
var numToUint8_1 = require_numToUint82();
|
|
2347
|
+
Object.defineProperty(exports, "numToUint8", { enumerable: true, get: function() {
|
|
2348
|
+
return numToUint8_1.numToUint8;
|
|
2349
|
+
} });
|
|
2350
|
+
var uint32ArrayFrom_1 = require_uint32ArrayFrom2();
|
|
2351
|
+
Object.defineProperty(exports, "uint32ArrayFrom", { enumerable: true, get: function() {
|
|
2352
|
+
return uint32ArrayFrom_1.uint32ArrayFrom;
|
|
2353
|
+
} });
|
|
2354
|
+
});
|
|
2355
|
+
|
|
2356
|
+
// node_modules/.bun/@aws-crypto+crc32@3.0.0/node_modules/@aws-crypto/crc32/build/aws_crc32.js
|
|
2357
|
+
var require_aws_crc32 = __commonJS((exports) => {
|
|
2358
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2359
|
+
exports.AwsCrc32 = undefined;
|
|
2360
|
+
var tslib_1 = require_tslib();
|
|
2361
|
+
var util_1 = require_build3();
|
|
2362
|
+
var index_1 = require_build4();
|
|
2363
|
+
var AwsCrc32 = function() {
|
|
2364
|
+
function AwsCrc322() {
|
|
2365
|
+
this.crc32 = new index_1.Crc32;
|
|
2366
|
+
}
|
|
2367
|
+
AwsCrc322.prototype.update = function(toHash) {
|
|
2368
|
+
if ((0, util_1.isEmptyData)(toHash))
|
|
2369
|
+
return;
|
|
2370
|
+
this.crc32.update((0, util_1.convertToBuffer)(toHash));
|
|
2371
|
+
};
|
|
2372
|
+
AwsCrc322.prototype.digest = function() {
|
|
2373
|
+
return tslib_1.__awaiter(this, undefined, undefined, function() {
|
|
2374
|
+
return tslib_1.__generator(this, function(_a) {
|
|
2375
|
+
return [2, (0, util_1.numToUint8)(this.crc32.digest())];
|
|
2376
|
+
});
|
|
2377
|
+
});
|
|
2378
|
+
};
|
|
2379
|
+
AwsCrc322.prototype.reset = function() {
|
|
2380
|
+
this.crc32 = new index_1.Crc32;
|
|
2381
|
+
};
|
|
2382
|
+
return AwsCrc322;
|
|
2383
|
+
}();
|
|
2384
|
+
exports.AwsCrc32 = AwsCrc32;
|
|
2385
|
+
});
|
|
2386
|
+
|
|
2387
|
+
// node_modules/.bun/@aws-crypto+crc32@3.0.0/node_modules/@aws-crypto/crc32/build/index.js
|
|
2388
|
+
var require_build4 = __commonJS((exports) => {
|
|
2389
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2390
|
+
exports.AwsCrc32 = exports.Crc32 = exports.crc32 = undefined;
|
|
2391
|
+
var tslib_1 = require_tslib();
|
|
2392
|
+
var util_1 = require_build3();
|
|
2393
|
+
function crc32(data) {
|
|
2394
|
+
return new Crc32().update(data).digest();
|
|
2395
|
+
}
|
|
2396
|
+
exports.crc32 = crc32;
|
|
2397
|
+
var Crc32 = function() {
|
|
2398
|
+
function Crc322() {
|
|
2399
|
+
this.checksum = 4294967295;
|
|
2400
|
+
}
|
|
2401
|
+
Crc322.prototype.update = function(data) {
|
|
2402
|
+
var e_1, _a;
|
|
2403
|
+
try {
|
|
2404
|
+
for (var data_1 = tslib_1.__values(data), data_1_1 = data_1.next();!data_1_1.done; data_1_1 = data_1.next()) {
|
|
2405
|
+
var byte = data_1_1.value;
|
|
2406
|
+
this.checksum = this.checksum >>> 8 ^ lookupTable[(this.checksum ^ byte) & 255];
|
|
2407
|
+
}
|
|
2408
|
+
} catch (e_1_1) {
|
|
2409
|
+
e_1 = { error: e_1_1 };
|
|
2410
|
+
} finally {
|
|
2411
|
+
try {
|
|
2412
|
+
if (data_1_1 && !data_1_1.done && (_a = data_1.return))
|
|
2413
|
+
_a.call(data_1);
|
|
2414
|
+
} finally {
|
|
2415
|
+
if (e_1)
|
|
2416
|
+
throw e_1.error;
|
|
2417
|
+
}
|
|
2418
|
+
}
|
|
2419
|
+
return this;
|
|
2420
|
+
};
|
|
2421
|
+
Crc322.prototype.digest = function() {
|
|
2422
|
+
return (this.checksum ^ 4294967295) >>> 0;
|
|
2423
|
+
};
|
|
2424
|
+
return Crc322;
|
|
2425
|
+
}();
|
|
2426
|
+
exports.Crc32 = Crc32;
|
|
2427
|
+
var a_lookUpTable = [
|
|
2428
|
+
0,
|
|
2429
|
+
1996959894,
|
|
2430
|
+
3993919788,
|
|
2431
|
+
2567524794,
|
|
2432
|
+
124634137,
|
|
2433
|
+
1886057615,
|
|
2434
|
+
3915621685,
|
|
2435
|
+
2657392035,
|
|
2436
|
+
249268274,
|
|
2437
|
+
2044508324,
|
|
2438
|
+
3772115230,
|
|
2439
|
+
2547177864,
|
|
2440
|
+
162941995,
|
|
2441
|
+
2125561021,
|
|
2442
|
+
3887607047,
|
|
2443
|
+
2428444049,
|
|
2444
|
+
498536548,
|
|
2445
|
+
1789927666,
|
|
2446
|
+
4089016648,
|
|
2447
|
+
2227061214,
|
|
2448
|
+
450548861,
|
|
2449
|
+
1843258603,
|
|
2450
|
+
4107580753,
|
|
2451
|
+
2211677639,
|
|
2452
|
+
325883990,
|
|
2453
|
+
1684777152,
|
|
2454
|
+
4251122042,
|
|
2455
|
+
2321926636,
|
|
2456
|
+
335633487,
|
|
2457
|
+
1661365465,
|
|
2458
|
+
4195302755,
|
|
2459
|
+
2366115317,
|
|
2460
|
+
997073096,
|
|
2461
|
+
1281953886,
|
|
2462
|
+
3579855332,
|
|
2463
|
+
2724688242,
|
|
2464
|
+
1006888145,
|
|
2465
|
+
1258607687,
|
|
2466
|
+
3524101629,
|
|
2467
|
+
2768942443,
|
|
2468
|
+
901097722,
|
|
2469
|
+
1119000684,
|
|
2470
|
+
3686517206,
|
|
2471
|
+
2898065728,
|
|
2472
|
+
853044451,
|
|
2473
|
+
1172266101,
|
|
2474
|
+
3705015759,
|
|
2475
|
+
2882616665,
|
|
2476
|
+
651767980,
|
|
2477
|
+
1373503546,
|
|
2478
|
+
3369554304,
|
|
2479
|
+
3218104598,
|
|
2480
|
+
565507253,
|
|
2481
|
+
1454621731,
|
|
2482
|
+
3485111705,
|
|
2483
|
+
3099436303,
|
|
2484
|
+
671266974,
|
|
2485
|
+
1594198024,
|
|
2486
|
+
3322730930,
|
|
2487
|
+
2970347812,
|
|
2488
|
+
795835527,
|
|
2489
|
+
1483230225,
|
|
2490
|
+
3244367275,
|
|
2491
|
+
3060149565,
|
|
2492
|
+
1994146192,
|
|
2493
|
+
31158534,
|
|
2494
|
+
2563907772,
|
|
2495
|
+
4023717930,
|
|
2496
|
+
1907459465,
|
|
2497
|
+
112637215,
|
|
2498
|
+
2680153253,
|
|
2499
|
+
3904427059,
|
|
2500
|
+
2013776290,
|
|
2501
|
+
251722036,
|
|
2502
|
+
2517215374,
|
|
2503
|
+
3775830040,
|
|
2504
|
+
2137656763,
|
|
2505
|
+
141376813,
|
|
2506
|
+
2439277719,
|
|
2507
|
+
3865271297,
|
|
2508
|
+
1802195444,
|
|
2509
|
+
476864866,
|
|
2510
|
+
2238001368,
|
|
2511
|
+
4066508878,
|
|
2512
|
+
1812370925,
|
|
2513
|
+
453092731,
|
|
2514
|
+
2181625025,
|
|
2515
|
+
4111451223,
|
|
2516
|
+
1706088902,
|
|
2517
|
+
314042704,
|
|
2518
|
+
2344532202,
|
|
2519
|
+
4240017532,
|
|
2520
|
+
1658658271,
|
|
2521
|
+
366619977,
|
|
2522
|
+
2362670323,
|
|
2523
|
+
4224994405,
|
|
2524
|
+
1303535960,
|
|
2525
|
+
984961486,
|
|
2526
|
+
2747007092,
|
|
2527
|
+
3569037538,
|
|
2528
|
+
1256170817,
|
|
2529
|
+
1037604311,
|
|
2530
|
+
2765210733,
|
|
2531
|
+
3554079995,
|
|
2532
|
+
1131014506,
|
|
2533
|
+
879679996,
|
|
2534
|
+
2909243462,
|
|
2535
|
+
3663771856,
|
|
2536
|
+
1141124467,
|
|
2537
|
+
855842277,
|
|
2538
|
+
2852801631,
|
|
2539
|
+
3708648649,
|
|
2540
|
+
1342533948,
|
|
2541
|
+
654459306,
|
|
2542
|
+
3188396048,
|
|
2543
|
+
3373015174,
|
|
2544
|
+
1466479909,
|
|
2545
|
+
544179635,
|
|
2546
|
+
3110523913,
|
|
2547
|
+
3462522015,
|
|
2548
|
+
1591671054,
|
|
2549
|
+
702138776,
|
|
2550
|
+
2966460450,
|
|
2551
|
+
3352799412,
|
|
2552
|
+
1504918807,
|
|
2553
|
+
783551873,
|
|
2554
|
+
3082640443,
|
|
2555
|
+
3233442989,
|
|
2556
|
+
3988292384,
|
|
2557
|
+
2596254646,
|
|
2558
|
+
62317068,
|
|
2559
|
+
1957810842,
|
|
2560
|
+
3939845945,
|
|
2561
|
+
2647816111,
|
|
2562
|
+
81470997,
|
|
2563
|
+
1943803523,
|
|
2564
|
+
3814918930,
|
|
2565
|
+
2489596804,
|
|
2566
|
+
225274430,
|
|
2567
|
+
2053790376,
|
|
2568
|
+
3826175755,
|
|
2569
|
+
2466906013,
|
|
2570
|
+
167816743,
|
|
2571
|
+
2097651377,
|
|
2572
|
+
4027552580,
|
|
2573
|
+
2265490386,
|
|
2574
|
+
503444072,
|
|
2575
|
+
1762050814,
|
|
2576
|
+
4150417245,
|
|
2577
|
+
2154129355,
|
|
2578
|
+
426522225,
|
|
2579
|
+
1852507879,
|
|
2580
|
+
4275313526,
|
|
2581
|
+
2312317920,
|
|
2582
|
+
282753626,
|
|
2583
|
+
1742555852,
|
|
2584
|
+
4189708143,
|
|
2585
|
+
2394877945,
|
|
2586
|
+
397917763,
|
|
2587
|
+
1622183637,
|
|
2588
|
+
3604390888,
|
|
2589
|
+
2714866558,
|
|
2590
|
+
953729732,
|
|
2591
|
+
1340076626,
|
|
2592
|
+
3518719985,
|
|
2593
|
+
2797360999,
|
|
2594
|
+
1068828381,
|
|
2595
|
+
1219638859,
|
|
2596
|
+
3624741850,
|
|
2597
|
+
2936675148,
|
|
2598
|
+
906185462,
|
|
2599
|
+
1090812512,
|
|
2600
|
+
3747672003,
|
|
2601
|
+
2825379669,
|
|
2602
|
+
829329135,
|
|
2603
|
+
1181335161,
|
|
2604
|
+
3412177804,
|
|
2605
|
+
3160834842,
|
|
2606
|
+
628085408,
|
|
2607
|
+
1382605366,
|
|
2608
|
+
3423369109,
|
|
2609
|
+
3138078467,
|
|
2610
|
+
570562233,
|
|
2611
|
+
1426400815,
|
|
2612
|
+
3317316542,
|
|
2613
|
+
2998733608,
|
|
2614
|
+
733239954,
|
|
2615
|
+
1555261956,
|
|
2616
|
+
3268935591,
|
|
2617
|
+
3050360625,
|
|
2618
|
+
752459403,
|
|
2619
|
+
1541320221,
|
|
2620
|
+
2607071920,
|
|
2621
|
+
3965973030,
|
|
2622
|
+
1969922972,
|
|
2623
|
+
40735498,
|
|
2624
|
+
2617837225,
|
|
2625
|
+
3943577151,
|
|
2626
|
+
1913087877,
|
|
2627
|
+
83908371,
|
|
2628
|
+
2512341634,
|
|
2629
|
+
3803740692,
|
|
2630
|
+
2075208622,
|
|
2631
|
+
213261112,
|
|
2632
|
+
2463272603,
|
|
2633
|
+
3855990285,
|
|
2634
|
+
2094854071,
|
|
2635
|
+
198958881,
|
|
2636
|
+
2262029012,
|
|
2637
|
+
4057260610,
|
|
2638
|
+
1759359992,
|
|
2639
|
+
534414190,
|
|
2640
|
+
2176718541,
|
|
2641
|
+
4139329115,
|
|
2642
|
+
1873836001,
|
|
2643
|
+
414664567,
|
|
2644
|
+
2282248934,
|
|
2645
|
+
4279200368,
|
|
2646
|
+
1711684554,
|
|
2647
|
+
285281116,
|
|
2648
|
+
2405801727,
|
|
2649
|
+
4167216745,
|
|
2650
|
+
1634467795,
|
|
2651
|
+
376229701,
|
|
2652
|
+
2685067896,
|
|
2653
|
+
3608007406,
|
|
2654
|
+
1308918612,
|
|
2655
|
+
956543938,
|
|
2656
|
+
2808555105,
|
|
2657
|
+
3495958263,
|
|
2658
|
+
1231636301,
|
|
2659
|
+
1047427035,
|
|
2660
|
+
2932959818,
|
|
2661
|
+
3654703836,
|
|
2662
|
+
1088359270,
|
|
2663
|
+
936918000,
|
|
2664
|
+
2847714899,
|
|
2665
|
+
3736837829,
|
|
2666
|
+
1202900863,
|
|
2667
|
+
817233897,
|
|
2668
|
+
3183342108,
|
|
2669
|
+
3401237130,
|
|
2670
|
+
1404277552,
|
|
2671
|
+
615818150,
|
|
2672
|
+
3134207493,
|
|
2673
|
+
3453421203,
|
|
2674
|
+
1423857449,
|
|
2675
|
+
601450431,
|
|
2676
|
+
3009837614,
|
|
2677
|
+
3294710456,
|
|
2678
|
+
1567103746,
|
|
2679
|
+
711928724,
|
|
2680
|
+
3020668471,
|
|
2681
|
+
3272380065,
|
|
2682
|
+
1510334235,
|
|
2683
|
+
755167117
|
|
2684
|
+
];
|
|
2685
|
+
var lookupTable = (0, util_1.uint32ArrayFrom)(a_lookUpTable);
|
|
2686
|
+
var aws_crc32_1 = require_aws_crc32();
|
|
2687
|
+
Object.defineProperty(exports, "AwsCrc32", { enumerable: true, get: function() {
|
|
2688
|
+
return aws_crc32_1.AwsCrc32;
|
|
2689
|
+
} });
|
|
2690
|
+
});
|
|
2691
|
+
|
|
2692
|
+
// node_modules/.bun/@smithy+util-hex-encoding@2.2.0/node_modules/@smithy/util-hex-encoding/dist-es/index.js
|
|
2693
|
+
function fromHex2(encoded) {
|
|
2694
|
+
if (encoded.length % 2 !== 0) {
|
|
2695
|
+
throw new Error("Hex encoded strings must have an even number length");
|
|
2696
|
+
}
|
|
2697
|
+
const out = new Uint8Array(encoded.length / 2);
|
|
2698
|
+
for (let i = 0;i < encoded.length; i += 2) {
|
|
2699
|
+
const encodedByte = encoded.slice(i, i + 2).toLowerCase();
|
|
2700
|
+
if (encodedByte in HEX_TO_SHORT2) {
|
|
2701
|
+
out[i / 2] = HEX_TO_SHORT2[encodedByte];
|
|
2702
|
+
} else {
|
|
2703
|
+
throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);
|
|
2704
|
+
}
|
|
2705
|
+
}
|
|
2706
|
+
return out;
|
|
2707
|
+
}
|
|
2708
|
+
function toHex2(bytes) {
|
|
2709
|
+
let out = "";
|
|
2710
|
+
for (let i = 0;i < bytes.byteLength; i++) {
|
|
2711
|
+
out += SHORT_TO_HEX2[bytes[i]];
|
|
2712
|
+
}
|
|
2713
|
+
return out;
|
|
2714
|
+
}
|
|
2715
|
+
var SHORT_TO_HEX2, HEX_TO_SHORT2;
|
|
2716
|
+
var init_dist_es14 = __esm(() => {
|
|
2717
|
+
SHORT_TO_HEX2 = {};
|
|
2718
|
+
HEX_TO_SHORT2 = {};
|
|
2719
|
+
for (let i = 0;i < 256; i++) {
|
|
2720
|
+
let encodedByte = i.toString(16).toLowerCase();
|
|
2721
|
+
if (encodedByte.length === 1) {
|
|
2722
|
+
encodedByte = `0${encodedByte}`;
|
|
2723
|
+
}
|
|
2724
|
+
SHORT_TO_HEX2[i] = encodedByte;
|
|
2725
|
+
HEX_TO_SHORT2[encodedByte] = i;
|
|
2726
|
+
}
|
|
2727
|
+
});
|
|
2728
|
+
|
|
2729
|
+
// node_modules/.bun/@smithy+eventstream-codec@2.2.0/node_modules/@smithy/eventstream-codec/dist-es/Int64.js
|
|
2730
|
+
class Int642 {
|
|
2731
|
+
constructor(bytes) {
|
|
2732
|
+
this.bytes = bytes;
|
|
2733
|
+
if (bytes.byteLength !== 8) {
|
|
2734
|
+
throw new Error("Int64 buffers must be exactly 8 bytes");
|
|
2735
|
+
}
|
|
2736
|
+
}
|
|
2737
|
+
static fromNumber(number) {
|
|
2738
|
+
if (number > 9223372036854776000 || number < -9223372036854776000) {
|
|
2739
|
+
throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);
|
|
2740
|
+
}
|
|
2741
|
+
const bytes = new Uint8Array(8);
|
|
2742
|
+
for (let i = 7, remaining = Math.abs(Math.round(number));i > -1 && remaining > 0; i--, remaining /= 256) {
|
|
2743
|
+
bytes[i] = remaining;
|
|
2744
|
+
}
|
|
2745
|
+
if (number < 0) {
|
|
2746
|
+
negate2(bytes);
|
|
2747
|
+
}
|
|
2748
|
+
return new Int642(bytes);
|
|
2749
|
+
}
|
|
2750
|
+
valueOf() {
|
|
2751
|
+
const bytes = this.bytes.slice(0);
|
|
2752
|
+
const negative = bytes[0] & 128;
|
|
2753
|
+
if (negative) {
|
|
2754
|
+
negate2(bytes);
|
|
2755
|
+
}
|
|
2756
|
+
return parseInt(toHex2(bytes), 16) * (negative ? -1 : 1);
|
|
2757
|
+
}
|
|
2758
|
+
toString() {
|
|
2759
|
+
return String(this.valueOf());
|
|
2760
|
+
}
|
|
2761
|
+
}
|
|
2762
|
+
function negate2(bytes) {
|
|
2763
|
+
for (let i = 0;i < 8; i++) {
|
|
2764
|
+
bytes[i] ^= 255;
|
|
2765
|
+
}
|
|
2766
|
+
for (let i = 7;i > -1; i--) {
|
|
2767
|
+
bytes[i]++;
|
|
2768
|
+
if (bytes[i] !== 0)
|
|
2769
|
+
break;
|
|
2770
|
+
}
|
|
2771
|
+
}
|
|
2772
|
+
var init_Int64 = __esm(() => {
|
|
2773
|
+
init_dist_es14();
|
|
2774
|
+
});
|
|
2775
|
+
|
|
2776
|
+
// node_modules/.bun/@smithy+eventstream-codec@2.2.0/node_modules/@smithy/eventstream-codec/dist-es/HeaderMarshaller.js
|
|
2777
|
+
class HeaderMarshaller {
|
|
2778
|
+
constructor(toUtf83, fromUtf84) {
|
|
2779
|
+
this.toUtf8 = toUtf83;
|
|
2780
|
+
this.fromUtf8 = fromUtf84;
|
|
2781
|
+
}
|
|
2782
|
+
format(headers) {
|
|
2783
|
+
const chunks = [];
|
|
2784
|
+
for (const headerName of Object.keys(headers)) {
|
|
2785
|
+
const bytes = this.fromUtf8(headerName);
|
|
2786
|
+
chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
|
|
2787
|
+
}
|
|
2788
|
+
const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));
|
|
2789
|
+
let position = 0;
|
|
2790
|
+
for (const chunk of chunks) {
|
|
2791
|
+
out.set(chunk, position);
|
|
2792
|
+
position += chunk.byteLength;
|
|
2793
|
+
}
|
|
2794
|
+
return out;
|
|
2795
|
+
}
|
|
2796
|
+
formatHeaderValue(header) {
|
|
2797
|
+
switch (header.type) {
|
|
2798
|
+
case "boolean":
|
|
2799
|
+
return Uint8Array.from([header.value ? 0 : 1]);
|
|
2800
|
+
case "byte":
|
|
2801
|
+
return Uint8Array.from([2, header.value]);
|
|
2802
|
+
case "short":
|
|
2803
|
+
const shortView = new DataView(new ArrayBuffer(3));
|
|
2804
|
+
shortView.setUint8(0, 3);
|
|
2805
|
+
shortView.setInt16(1, header.value, false);
|
|
2806
|
+
return new Uint8Array(shortView.buffer);
|
|
2807
|
+
case "integer":
|
|
2808
|
+
const intView = new DataView(new ArrayBuffer(5));
|
|
2809
|
+
intView.setUint8(0, 4);
|
|
2810
|
+
intView.setInt32(1, header.value, false);
|
|
2811
|
+
return new Uint8Array(intView.buffer);
|
|
2812
|
+
case "long":
|
|
2813
|
+
const longBytes = new Uint8Array(9);
|
|
2814
|
+
longBytes[0] = 5;
|
|
2815
|
+
longBytes.set(header.value.bytes, 1);
|
|
2816
|
+
return longBytes;
|
|
2817
|
+
case "binary":
|
|
2818
|
+
const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));
|
|
2819
|
+
binView.setUint8(0, 6);
|
|
2820
|
+
binView.setUint16(1, header.value.byteLength, false);
|
|
2821
|
+
const binBytes = new Uint8Array(binView.buffer);
|
|
2822
|
+
binBytes.set(header.value, 3);
|
|
2823
|
+
return binBytes;
|
|
2824
|
+
case "string":
|
|
2825
|
+
const utf8Bytes = this.fromUtf8(header.value);
|
|
2826
|
+
const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));
|
|
2827
|
+
strView.setUint8(0, 7);
|
|
2828
|
+
strView.setUint16(1, utf8Bytes.byteLength, false);
|
|
2829
|
+
const strBytes = new Uint8Array(strView.buffer);
|
|
2830
|
+
strBytes.set(utf8Bytes, 3);
|
|
2831
|
+
return strBytes;
|
|
2832
|
+
case "timestamp":
|
|
2833
|
+
const tsBytes = new Uint8Array(9);
|
|
2834
|
+
tsBytes[0] = 8;
|
|
2835
|
+
tsBytes.set(Int642.fromNumber(header.value.valueOf()).bytes, 1);
|
|
2836
|
+
return tsBytes;
|
|
2837
|
+
case "uuid":
|
|
2838
|
+
if (!UUID_PATTERN2.test(header.value)) {
|
|
2839
|
+
throw new Error(`Invalid UUID received: ${header.value}`);
|
|
2840
|
+
}
|
|
2841
|
+
const uuidBytes = new Uint8Array(17);
|
|
2842
|
+
uuidBytes[0] = 9;
|
|
2843
|
+
uuidBytes.set(fromHex2(header.value.replace(/\-/g, "")), 1);
|
|
2844
|
+
return uuidBytes;
|
|
2845
|
+
}
|
|
2846
|
+
}
|
|
2847
|
+
parse(headers) {
|
|
2848
|
+
const out = {};
|
|
2849
|
+
let position = 0;
|
|
2850
|
+
while (position < headers.byteLength) {
|
|
2851
|
+
const nameLength = headers.getUint8(position++);
|
|
2852
|
+
const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength));
|
|
2853
|
+
position += nameLength;
|
|
2854
|
+
switch (headers.getUint8(position++)) {
|
|
2855
|
+
case 0:
|
|
2856
|
+
out[name] = {
|
|
2857
|
+
type: BOOLEAN_TAG,
|
|
2858
|
+
value: true
|
|
2859
|
+
};
|
|
2860
|
+
break;
|
|
2861
|
+
case 1:
|
|
2862
|
+
out[name] = {
|
|
2863
|
+
type: BOOLEAN_TAG,
|
|
2864
|
+
value: false
|
|
2865
|
+
};
|
|
2866
|
+
break;
|
|
2867
|
+
case 2:
|
|
2868
|
+
out[name] = {
|
|
2869
|
+
type: BYTE_TAG,
|
|
2870
|
+
value: headers.getInt8(position++)
|
|
2871
|
+
};
|
|
2872
|
+
break;
|
|
2873
|
+
case 3:
|
|
2874
|
+
out[name] = {
|
|
2875
|
+
type: SHORT_TAG,
|
|
2876
|
+
value: headers.getInt16(position, false)
|
|
2877
|
+
};
|
|
2878
|
+
position += 2;
|
|
2879
|
+
break;
|
|
2880
|
+
case 4:
|
|
2881
|
+
out[name] = {
|
|
2882
|
+
type: INT_TAG,
|
|
2883
|
+
value: headers.getInt32(position, false)
|
|
2884
|
+
};
|
|
2885
|
+
position += 4;
|
|
2886
|
+
break;
|
|
2887
|
+
case 5:
|
|
2888
|
+
out[name] = {
|
|
2889
|
+
type: LONG_TAG,
|
|
2890
|
+
value: new Int642(new Uint8Array(headers.buffer, headers.byteOffset + position, 8))
|
|
2891
|
+
};
|
|
2892
|
+
position += 8;
|
|
2893
|
+
break;
|
|
2894
|
+
case 6:
|
|
2895
|
+
const binaryLength = headers.getUint16(position, false);
|
|
2896
|
+
position += 2;
|
|
2897
|
+
out[name] = {
|
|
2898
|
+
type: BINARY_TAG,
|
|
2899
|
+
value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength)
|
|
2900
|
+
};
|
|
2901
|
+
position += binaryLength;
|
|
2902
|
+
break;
|
|
2903
|
+
case 7:
|
|
2904
|
+
const stringLength = headers.getUint16(position, false);
|
|
2905
|
+
position += 2;
|
|
2906
|
+
out[name] = {
|
|
2907
|
+
type: STRING_TAG,
|
|
2908
|
+
value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength))
|
|
2909
|
+
};
|
|
2910
|
+
position += stringLength;
|
|
2911
|
+
break;
|
|
2912
|
+
case 8:
|
|
2913
|
+
out[name] = {
|
|
2914
|
+
type: TIMESTAMP_TAG,
|
|
2915
|
+
value: new Date(new Int642(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf())
|
|
2916
|
+
};
|
|
2917
|
+
position += 8;
|
|
2918
|
+
break;
|
|
2919
|
+
case 9:
|
|
2920
|
+
const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16);
|
|
2921
|
+
position += 16;
|
|
2922
|
+
out[name] = {
|
|
2923
|
+
type: UUID_TAG,
|
|
2924
|
+
value: `${toHex2(uuidBytes.subarray(0, 4))}-${toHex2(uuidBytes.subarray(4, 6))}-${toHex2(uuidBytes.subarray(6, 8))}-${toHex2(uuidBytes.subarray(8, 10))}-${toHex2(uuidBytes.subarray(10))}`
|
|
2925
|
+
};
|
|
2926
|
+
break;
|
|
2927
|
+
default:
|
|
2928
|
+
throw new Error(`Unrecognized header type tag`);
|
|
2929
|
+
}
|
|
2930
|
+
}
|
|
2931
|
+
return out;
|
|
2932
|
+
}
|
|
2933
|
+
}
|
|
2934
|
+
var HEADER_VALUE_TYPE2, BOOLEAN_TAG = "boolean", BYTE_TAG = "byte", SHORT_TAG = "short", INT_TAG = "integer", LONG_TAG = "long", BINARY_TAG = "binary", STRING_TAG = "string", TIMESTAMP_TAG = "timestamp", UUID_TAG = "uuid", UUID_PATTERN2;
|
|
2935
|
+
var init_HeaderMarshaller = __esm(() => {
|
|
2936
|
+
init_dist_es14();
|
|
2937
|
+
init_Int64();
|
|
2938
|
+
(function(HEADER_VALUE_TYPE3) {
|
|
2939
|
+
HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["boolTrue"] = 0] = "boolTrue";
|
|
2940
|
+
HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["boolFalse"] = 1] = "boolFalse";
|
|
2941
|
+
HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["byte"] = 2] = "byte";
|
|
2942
|
+
HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["short"] = 3] = "short";
|
|
2943
|
+
HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["integer"] = 4] = "integer";
|
|
2944
|
+
HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["long"] = 5] = "long";
|
|
2945
|
+
HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["byteArray"] = 6] = "byteArray";
|
|
2946
|
+
HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["string"] = 7] = "string";
|
|
2947
|
+
HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["timestamp"] = 8] = "timestamp";
|
|
2948
|
+
HEADER_VALUE_TYPE3[HEADER_VALUE_TYPE3["uuid"] = 9] = "uuid";
|
|
2949
|
+
})(HEADER_VALUE_TYPE2 || (HEADER_VALUE_TYPE2 = {}));
|
|
2950
|
+
UUID_PATTERN2 = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;
|
|
2951
|
+
});
|
|
2952
|
+
|
|
2953
|
+
// node_modules/.bun/@smithy+eventstream-codec@2.2.0/node_modules/@smithy/eventstream-codec/dist-es/splitMessage.js
|
|
2954
|
+
function splitMessage({ byteLength, byteOffset, buffer }) {
|
|
2955
|
+
if (byteLength < MINIMUM_MESSAGE_LENGTH) {
|
|
2956
|
+
throw new Error("Provided message too short to accommodate event stream message overhead");
|
|
2957
|
+
}
|
|
2958
|
+
const view = new DataView(buffer, byteOffset, byteLength);
|
|
2959
|
+
const messageLength = view.getUint32(0, false);
|
|
2960
|
+
if (byteLength !== messageLength) {
|
|
2961
|
+
throw new Error("Reported message length does not match received message length");
|
|
2962
|
+
}
|
|
2963
|
+
const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false);
|
|
2964
|
+
const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false);
|
|
2965
|
+
const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false);
|
|
2966
|
+
const checksummer = new import_crc32.Crc32().update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH));
|
|
2967
|
+
if (expectedPreludeChecksum !== checksummer.digest()) {
|
|
2968
|
+
throw new Error(`The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digest()})`);
|
|
2969
|
+
}
|
|
2970
|
+
checksummer.update(new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH)));
|
|
2971
|
+
if (expectedMessageChecksum !== checksummer.digest()) {
|
|
2972
|
+
throw new Error(`The message checksum (${checksummer.digest()}) did not match the expected value of ${expectedMessageChecksum}`);
|
|
2973
|
+
}
|
|
2974
|
+
return {
|
|
2975
|
+
headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength),
|
|
2976
|
+
body: new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH))
|
|
2977
|
+
};
|
|
2978
|
+
}
|
|
2979
|
+
var import_crc32, PRELUDE_MEMBER_LENGTH = 4, PRELUDE_LENGTH, CHECKSUM_LENGTH = 4, MINIMUM_MESSAGE_LENGTH;
|
|
2980
|
+
var init_splitMessage = __esm(() => {
|
|
2981
|
+
import_crc32 = __toESM(require_build4(), 1);
|
|
2982
|
+
PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2;
|
|
2983
|
+
MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2;
|
|
2984
|
+
});
|
|
2985
|
+
|
|
2986
|
+
// node_modules/.bun/@smithy+eventstream-codec@2.2.0/node_modules/@smithy/eventstream-codec/dist-es/EventStreamCodec.js
|
|
2987
|
+
class EventStreamCodec {
|
|
2988
|
+
constructor(toUtf83, fromUtf84) {
|
|
2989
|
+
this.headerMarshaller = new HeaderMarshaller(toUtf83, fromUtf84);
|
|
2990
|
+
this.messageBuffer = [];
|
|
2991
|
+
this.isEndOfStream = false;
|
|
2992
|
+
}
|
|
2993
|
+
feed(message) {
|
|
2994
|
+
this.messageBuffer.push(this.decode(message));
|
|
2995
|
+
}
|
|
2996
|
+
endOfStream() {
|
|
2997
|
+
this.isEndOfStream = true;
|
|
2998
|
+
}
|
|
2999
|
+
getMessage() {
|
|
3000
|
+
const message = this.messageBuffer.pop();
|
|
3001
|
+
const isEndOfStream = this.isEndOfStream;
|
|
3002
|
+
return {
|
|
3003
|
+
getMessage() {
|
|
3004
|
+
return message;
|
|
3005
|
+
},
|
|
3006
|
+
isEndOfStream() {
|
|
3007
|
+
return isEndOfStream;
|
|
3008
|
+
}
|
|
3009
|
+
};
|
|
3010
|
+
}
|
|
3011
|
+
getAvailableMessages() {
|
|
3012
|
+
const messages = this.messageBuffer;
|
|
3013
|
+
this.messageBuffer = [];
|
|
3014
|
+
const isEndOfStream = this.isEndOfStream;
|
|
3015
|
+
return {
|
|
3016
|
+
getMessages() {
|
|
3017
|
+
return messages;
|
|
3018
|
+
},
|
|
3019
|
+
isEndOfStream() {
|
|
3020
|
+
return isEndOfStream;
|
|
3021
|
+
}
|
|
3022
|
+
};
|
|
3023
|
+
}
|
|
3024
|
+
encode({ headers: rawHeaders, body }) {
|
|
3025
|
+
const headers = this.headerMarshaller.format(rawHeaders);
|
|
3026
|
+
const length = headers.byteLength + body.byteLength + 16;
|
|
3027
|
+
const out = new Uint8Array(length);
|
|
3028
|
+
const view = new DataView(out.buffer, out.byteOffset, out.byteLength);
|
|
3029
|
+
const checksum3 = new import_crc322.Crc32;
|
|
3030
|
+
view.setUint32(0, length, false);
|
|
3031
|
+
view.setUint32(4, headers.byteLength, false);
|
|
3032
|
+
view.setUint32(8, checksum3.update(out.subarray(0, 8)).digest(), false);
|
|
3033
|
+
out.set(headers, 12);
|
|
3034
|
+
out.set(body, headers.byteLength + 12);
|
|
3035
|
+
view.setUint32(length - 4, checksum3.update(out.subarray(8, length - 4)).digest(), false);
|
|
3036
|
+
return out;
|
|
3037
|
+
}
|
|
3038
|
+
decode(message) {
|
|
3039
|
+
const { headers, body } = splitMessage(message);
|
|
3040
|
+
return { headers: this.headerMarshaller.parse(headers), body };
|
|
3041
|
+
}
|
|
3042
|
+
formatHeaders(rawHeaders) {
|
|
3043
|
+
return this.headerMarshaller.format(rawHeaders);
|
|
3044
|
+
}
|
|
3045
|
+
}
|
|
3046
|
+
var import_crc322;
|
|
3047
|
+
var init_EventStreamCodec = __esm(() => {
|
|
3048
|
+
init_HeaderMarshaller();
|
|
3049
|
+
init_splitMessage();
|
|
3050
|
+
import_crc322 = __toESM(require_build4(), 1);
|
|
3051
|
+
});
|
|
3052
|
+
|
|
3053
|
+
// node_modules/.bun/@smithy+eventstream-codec@2.2.0/node_modules/@smithy/eventstream-codec/dist-es/Message.js
|
|
3054
|
+
var init_Message = () => {};
|
|
3055
|
+
|
|
3056
|
+
// node_modules/.bun/@smithy+eventstream-codec@2.2.0/node_modules/@smithy/eventstream-codec/dist-es/MessageDecoderStream.js
|
|
3057
|
+
var MessageDecoderStream;
|
|
3058
|
+
var init_MessageDecoderStream = __esm(() => {
|
|
3059
|
+
MessageDecoderStream = class MessageDecoderStream {
|
|
3060
|
+
constructor(options) {
|
|
3061
|
+
this.options = options;
|
|
3062
|
+
}
|
|
3063
|
+
[Symbol.asyncIterator]() {
|
|
3064
|
+
return this.asyncIterator();
|
|
3065
|
+
}
|
|
3066
|
+
async* asyncIterator() {
|
|
3067
|
+
for await (const bytes of this.options.inputStream) {
|
|
3068
|
+
const decoded = this.options.decoder.decode(bytes);
|
|
3069
|
+
yield decoded;
|
|
3070
|
+
}
|
|
3071
|
+
}
|
|
3072
|
+
};
|
|
3073
|
+
});
|
|
3074
|
+
|
|
3075
|
+
// node_modules/.bun/@smithy+eventstream-codec@2.2.0/node_modules/@smithy/eventstream-codec/dist-es/MessageEncoderStream.js
|
|
3076
|
+
var MessageEncoderStream;
|
|
3077
|
+
var init_MessageEncoderStream = __esm(() => {
|
|
3078
|
+
MessageEncoderStream = class MessageEncoderStream {
|
|
3079
|
+
constructor(options) {
|
|
3080
|
+
this.options = options;
|
|
3081
|
+
}
|
|
3082
|
+
[Symbol.asyncIterator]() {
|
|
3083
|
+
return this.asyncIterator();
|
|
3084
|
+
}
|
|
3085
|
+
async* asyncIterator() {
|
|
3086
|
+
for await (const msg of this.options.messageStream) {
|
|
3087
|
+
const encoded = this.options.encoder.encode(msg);
|
|
3088
|
+
yield encoded;
|
|
3089
|
+
}
|
|
3090
|
+
if (this.options.includeEndFrame) {
|
|
3091
|
+
yield new Uint8Array(0);
|
|
3092
|
+
}
|
|
3093
|
+
}
|
|
3094
|
+
};
|
|
3095
|
+
});
|
|
3096
|
+
|
|
3097
|
+
// node_modules/.bun/@smithy+eventstream-codec@2.2.0/node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageDecoderStream.js
|
|
3098
|
+
var SmithyMessageDecoderStream;
|
|
3099
|
+
var init_SmithyMessageDecoderStream = __esm(() => {
|
|
3100
|
+
SmithyMessageDecoderStream = class SmithyMessageDecoderStream {
|
|
3101
|
+
constructor(options) {
|
|
3102
|
+
this.options = options;
|
|
3103
|
+
}
|
|
3104
|
+
[Symbol.asyncIterator]() {
|
|
3105
|
+
return this.asyncIterator();
|
|
3106
|
+
}
|
|
3107
|
+
async* asyncIterator() {
|
|
3108
|
+
for await (const message of this.options.messageStream) {
|
|
3109
|
+
const deserialized = await this.options.deserializer(message);
|
|
3110
|
+
if (deserialized === undefined)
|
|
3111
|
+
continue;
|
|
3112
|
+
yield deserialized;
|
|
3113
|
+
}
|
|
3114
|
+
}
|
|
3115
|
+
};
|
|
3116
|
+
});
|
|
3117
|
+
|
|
3118
|
+
// node_modules/.bun/@smithy+eventstream-codec@2.2.0/node_modules/@smithy/eventstream-codec/dist-es/SmithyMessageEncoderStream.js
|
|
3119
|
+
var SmithyMessageEncoderStream;
|
|
3120
|
+
var init_SmithyMessageEncoderStream = __esm(() => {
|
|
3121
|
+
SmithyMessageEncoderStream = class SmithyMessageEncoderStream {
|
|
3122
|
+
constructor(options) {
|
|
3123
|
+
this.options = options;
|
|
3124
|
+
}
|
|
3125
|
+
[Symbol.asyncIterator]() {
|
|
3126
|
+
return this.asyncIterator();
|
|
3127
|
+
}
|
|
3128
|
+
async* asyncIterator() {
|
|
3129
|
+
for await (const chunk of this.options.inputStream) {
|
|
3130
|
+
const payloadBuf = this.options.serializer(chunk);
|
|
3131
|
+
yield payloadBuf;
|
|
3132
|
+
}
|
|
3133
|
+
}
|
|
3134
|
+
};
|
|
3135
|
+
});
|
|
3136
|
+
|
|
3137
|
+
// node_modules/.bun/@smithy+eventstream-codec@2.2.0/node_modules/@smithy/eventstream-codec/dist-es/index.js
|
|
3138
|
+
var init_dist_es15 = __esm(() => {
|
|
3139
|
+
init_EventStreamCodec();
|
|
3140
|
+
init_HeaderMarshaller();
|
|
3141
|
+
init_Int64();
|
|
3142
|
+
init_Message();
|
|
3143
|
+
init_MessageDecoderStream();
|
|
3144
|
+
init_MessageEncoderStream();
|
|
3145
|
+
init_SmithyMessageDecoderStream();
|
|
3146
|
+
init_SmithyMessageEncoderStream();
|
|
3147
|
+
});
|
|
3148
|
+
|
|
3149
|
+
// node_modules/.bun/@smithy+eventstream-serde-universal@2.2.0/node_modules/@smithy/eventstream-serde-universal/dist-es/getChunkedStream.js
|
|
3150
|
+
function getChunkedStream(source) {
|
|
3151
|
+
let currentMessageTotalLength = 0;
|
|
3152
|
+
let currentMessagePendingLength = 0;
|
|
3153
|
+
let currentMessage = null;
|
|
3154
|
+
let messageLengthBuffer = null;
|
|
3155
|
+
const allocateMessage = (size) => {
|
|
3156
|
+
if (typeof size !== "number") {
|
|
3157
|
+
throw new Error("Attempted to allocate an event message where size was not a number: " + size);
|
|
3158
|
+
}
|
|
3159
|
+
currentMessageTotalLength = size;
|
|
3160
|
+
currentMessagePendingLength = 4;
|
|
3161
|
+
currentMessage = new Uint8Array(size);
|
|
3162
|
+
const currentMessageView = new DataView(currentMessage.buffer);
|
|
3163
|
+
currentMessageView.setUint32(0, size, false);
|
|
3164
|
+
};
|
|
3165
|
+
const iterator = async function* () {
|
|
3166
|
+
const sourceIterator = source[Symbol.asyncIterator]();
|
|
3167
|
+
while (true) {
|
|
3168
|
+
const { value, done } = await sourceIterator.next();
|
|
3169
|
+
if (done) {
|
|
3170
|
+
if (!currentMessageTotalLength) {
|
|
3171
|
+
return;
|
|
3172
|
+
} else if (currentMessageTotalLength === currentMessagePendingLength) {
|
|
3173
|
+
yield currentMessage;
|
|
3174
|
+
} else {
|
|
3175
|
+
throw new Error("Truncated event message received.");
|
|
3176
|
+
}
|
|
3177
|
+
return;
|
|
3178
|
+
}
|
|
3179
|
+
const chunkLength = value.length;
|
|
3180
|
+
let currentOffset = 0;
|
|
3181
|
+
while (currentOffset < chunkLength) {
|
|
3182
|
+
if (!currentMessage) {
|
|
3183
|
+
const bytesRemaining = chunkLength - currentOffset;
|
|
3184
|
+
if (!messageLengthBuffer) {
|
|
3185
|
+
messageLengthBuffer = new Uint8Array(4);
|
|
3186
|
+
}
|
|
3187
|
+
const numBytesForTotal = Math.min(4 - currentMessagePendingLength, bytesRemaining);
|
|
3188
|
+
messageLengthBuffer.set(value.slice(currentOffset, currentOffset + numBytesForTotal), currentMessagePendingLength);
|
|
3189
|
+
currentMessagePendingLength += numBytesForTotal;
|
|
3190
|
+
currentOffset += numBytesForTotal;
|
|
3191
|
+
if (currentMessagePendingLength < 4) {
|
|
3192
|
+
break;
|
|
3193
|
+
}
|
|
3194
|
+
allocateMessage(new DataView(messageLengthBuffer.buffer).getUint32(0, false));
|
|
3195
|
+
messageLengthBuffer = null;
|
|
3196
|
+
}
|
|
3197
|
+
const numBytesToWrite = Math.min(currentMessageTotalLength - currentMessagePendingLength, chunkLength - currentOffset);
|
|
3198
|
+
currentMessage.set(value.slice(currentOffset, currentOffset + numBytesToWrite), currentMessagePendingLength);
|
|
3199
|
+
currentMessagePendingLength += numBytesToWrite;
|
|
3200
|
+
currentOffset += numBytesToWrite;
|
|
3201
|
+
if (currentMessageTotalLength && currentMessageTotalLength === currentMessagePendingLength) {
|
|
3202
|
+
yield currentMessage;
|
|
3203
|
+
currentMessage = null;
|
|
3204
|
+
currentMessageTotalLength = 0;
|
|
3205
|
+
currentMessagePendingLength = 0;
|
|
3206
|
+
}
|
|
3207
|
+
}
|
|
3208
|
+
}
|
|
3209
|
+
};
|
|
3210
|
+
return {
|
|
3211
|
+
[Symbol.asyncIterator]: iterator
|
|
3212
|
+
};
|
|
3213
|
+
}
|
|
3214
|
+
var init_getChunkedStream = () => {};
|
|
3215
|
+
|
|
3216
|
+
// node_modules/.bun/@smithy+eventstream-serde-universal@2.2.0/node_modules/@smithy/eventstream-serde-universal/dist-es/getUnmarshalledStream.js
|
|
3217
|
+
function getMessageUnmarshaller(deserializer, toUtf83) {
|
|
3218
|
+
return async function(message) {
|
|
3219
|
+
const { value: messageType } = message.headers[":message-type"];
|
|
3220
|
+
if (messageType === "error") {
|
|
3221
|
+
const unmodeledError = new Error(message.headers[":error-message"].value || "UnknownError");
|
|
3222
|
+
unmodeledError.name = message.headers[":error-code"].value;
|
|
3223
|
+
throw unmodeledError;
|
|
3224
|
+
} else if (messageType === "exception") {
|
|
3225
|
+
const code = message.headers[":exception-type"].value;
|
|
3226
|
+
const exception = { [code]: message };
|
|
3227
|
+
const deserializedException = await deserializer(exception);
|
|
3228
|
+
if (deserializedException.$unknown) {
|
|
3229
|
+
const error = new Error(toUtf83(message.body));
|
|
3230
|
+
error.name = code;
|
|
3231
|
+
throw error;
|
|
3232
|
+
}
|
|
3233
|
+
throw deserializedException[code];
|
|
3234
|
+
} else if (messageType === "event") {
|
|
3235
|
+
const event = {
|
|
3236
|
+
[message.headers[":event-type"].value]: message
|
|
3237
|
+
};
|
|
3238
|
+
const deserialized = await deserializer(event);
|
|
3239
|
+
if (deserialized.$unknown)
|
|
3240
|
+
return;
|
|
3241
|
+
return deserialized;
|
|
3242
|
+
} else {
|
|
3243
|
+
throw Error(`Unrecognizable event type: ${message.headers[":event-type"].value}`);
|
|
3244
|
+
}
|
|
3245
|
+
};
|
|
3246
|
+
}
|
|
3247
|
+
var init_getUnmarshalledStream = () => {};
|
|
3248
|
+
|
|
3249
|
+
// node_modules/.bun/@smithy+eventstream-serde-universal@2.2.0/node_modules/@smithy/eventstream-serde-universal/dist-es/EventStreamMarshaller.js
|
|
3250
|
+
class EventStreamMarshaller {
|
|
3251
|
+
constructor({ utf8Encoder, utf8Decoder }) {
|
|
3252
|
+
this.eventStreamCodec = new EventStreamCodec(utf8Encoder, utf8Decoder);
|
|
3253
|
+
this.utfEncoder = utf8Encoder;
|
|
3254
|
+
}
|
|
3255
|
+
deserialize(body, deserializer) {
|
|
3256
|
+
const inputStream = getChunkedStream(body);
|
|
3257
|
+
return new SmithyMessageDecoderStream({
|
|
3258
|
+
messageStream: new MessageDecoderStream({ inputStream, decoder: this.eventStreamCodec }),
|
|
3259
|
+
deserializer: getMessageUnmarshaller(deserializer, this.utfEncoder)
|
|
3260
|
+
});
|
|
3261
|
+
}
|
|
3262
|
+
serialize(inputStream, serializer) {
|
|
3263
|
+
return new MessageEncoderStream({
|
|
3264
|
+
messageStream: new SmithyMessageEncoderStream({ inputStream, serializer }),
|
|
3265
|
+
encoder: this.eventStreamCodec,
|
|
3266
|
+
includeEndFrame: true
|
|
3267
|
+
});
|
|
3268
|
+
}
|
|
3269
|
+
}
|
|
3270
|
+
var init_EventStreamMarshaller = __esm(() => {
|
|
3271
|
+
init_dist_es15();
|
|
3272
|
+
init_getChunkedStream();
|
|
3273
|
+
init_getUnmarshalledStream();
|
|
3274
|
+
});
|
|
3275
|
+
|
|
3276
|
+
// node_modules/.bun/@smithy+eventstream-serde-universal@2.2.0/node_modules/@smithy/eventstream-serde-universal/dist-es/provider.js
|
|
3277
|
+
var init_provider = __esm(() => {
|
|
3278
|
+
init_EventStreamMarshaller();
|
|
3279
|
+
});
|
|
3280
|
+
|
|
3281
|
+
// node_modules/.bun/@smithy+eventstream-serde-universal@2.2.0/node_modules/@smithy/eventstream-serde-universal/dist-es/index.js
|
|
3282
|
+
var init_dist_es16 = __esm(() => {
|
|
3283
|
+
init_EventStreamMarshaller();
|
|
3284
|
+
init_provider();
|
|
3285
|
+
});
|
|
3286
|
+
|
|
3287
|
+
// node_modules/.bun/@smithy+eventstream-serde-node@2.2.0/node_modules/@smithy/eventstream-serde-node/dist-es/utils.js
|
|
3288
|
+
async function* readabletoIterable(readStream) {
|
|
3289
|
+
let streamEnded = false;
|
|
3290
|
+
let generationEnded = false;
|
|
3291
|
+
const records = new Array;
|
|
3292
|
+
readStream.on("error", (err) => {
|
|
3293
|
+
if (!streamEnded) {
|
|
3294
|
+
streamEnded = true;
|
|
3295
|
+
}
|
|
3296
|
+
if (err) {
|
|
3297
|
+
throw err;
|
|
3298
|
+
}
|
|
3299
|
+
});
|
|
3300
|
+
readStream.on("data", (data) => {
|
|
3301
|
+
records.push(data);
|
|
3302
|
+
});
|
|
3303
|
+
readStream.on("end", () => {
|
|
3304
|
+
streamEnded = true;
|
|
3305
|
+
});
|
|
3306
|
+
while (!generationEnded) {
|
|
3307
|
+
const value = await new Promise((resolve) => setTimeout(() => resolve(records.shift()), 0));
|
|
3308
|
+
if (value) {
|
|
3309
|
+
yield value;
|
|
3310
|
+
}
|
|
3311
|
+
generationEnded = streamEnded && records.length === 0;
|
|
3312
|
+
}
|
|
3313
|
+
}
|
|
3314
|
+
var init_utils = () => {};
|
|
3315
|
+
|
|
3316
|
+
// node_modules/.bun/@smithy+eventstream-serde-node@2.2.0/node_modules/@smithy/eventstream-serde-node/dist-es/EventStreamMarshaller.js
|
|
3317
|
+
import { Readable } from "stream";
|
|
3318
|
+
|
|
3319
|
+
class EventStreamMarshaller3 {
|
|
3320
|
+
constructor({ utf8Encoder, utf8Decoder }) {
|
|
3321
|
+
this.universalMarshaller = new EventStreamMarshaller({
|
|
3322
|
+
utf8Decoder,
|
|
3323
|
+
utf8Encoder
|
|
3324
|
+
});
|
|
3325
|
+
}
|
|
3326
|
+
deserialize(body, deserializer) {
|
|
3327
|
+
const bodyIterable = typeof body[Symbol.asyncIterator] === "function" ? body : readabletoIterable(body);
|
|
3328
|
+
return this.universalMarshaller.deserialize(bodyIterable, deserializer);
|
|
3329
|
+
}
|
|
3330
|
+
serialize(input, serializer) {
|
|
3331
|
+
return Readable.from(this.universalMarshaller.serialize(input, serializer));
|
|
3332
|
+
}
|
|
3333
|
+
}
|
|
3334
|
+
var init_EventStreamMarshaller2 = __esm(() => {
|
|
3335
|
+
init_dist_es16();
|
|
3336
|
+
init_utils();
|
|
3337
|
+
});
|
|
3338
|
+
|
|
3339
|
+
// node_modules/.bun/@smithy+eventstream-serde-node@2.2.0/node_modules/@smithy/eventstream-serde-node/dist-es/provider.js
|
|
3340
|
+
var init_provider2 = __esm(() => {
|
|
3341
|
+
init_EventStreamMarshaller2();
|
|
3342
|
+
});
|
|
3343
|
+
|
|
3344
|
+
// node_modules/.bun/@smithy+eventstream-serde-node@2.2.0/node_modules/@smithy/eventstream-serde-node/dist-es/index.js
|
|
3345
|
+
var init_dist_es17 = __esm(() => {
|
|
3346
|
+
init_EventStreamMarshaller2();
|
|
3347
|
+
init_provider2();
|
|
3348
|
+
});
|
|
3349
|
+
|
|
3350
|
+
// node_modules/.bun/@smithy+util-base64@2.3.0/node_modules/@smithy/util-base64/dist-es/fromBase64.js
|
|
3351
|
+
var BASE64_REGEX, fromBase64 = (input) => {
|
|
3352
|
+
if (input.length * 3 % 4 !== 0) {
|
|
3353
|
+
throw new TypeError(`Incorrect padding on base64 string.`);
|
|
3354
|
+
}
|
|
3355
|
+
if (!BASE64_REGEX.exec(input)) {
|
|
3356
|
+
throw new TypeError(`Invalid base64 string.`);
|
|
3357
|
+
}
|
|
3358
|
+
const buffer = fromString(input, "base64");
|
|
3359
|
+
return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
|
|
3360
|
+
};
|
|
3361
|
+
var init_fromBase64 = __esm(() => {
|
|
3362
|
+
init_dist_es();
|
|
3363
|
+
BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/;
|
|
3364
|
+
});
|
|
3365
|
+
|
|
3366
|
+
// node_modules/.bun/@smithy+util-base64@2.3.0/node_modules/@smithy/util-base64/dist-es/toBase64.js
|
|
3367
|
+
var toBase64 = (_input) => {
|
|
3368
|
+
let input;
|
|
3369
|
+
if (typeof _input === "string") {
|
|
3370
|
+
input = fromUtf8(_input);
|
|
3371
|
+
} else {
|
|
3372
|
+
input = _input;
|
|
3373
|
+
}
|
|
3374
|
+
if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
|
|
3375
|
+
throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");
|
|
3376
|
+
}
|
|
3377
|
+
return fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("base64");
|
|
3378
|
+
};
|
|
3379
|
+
var init_toBase64 = __esm(() => {
|
|
3380
|
+
init_dist_es();
|
|
3381
|
+
init_dist_es2();
|
|
3382
|
+
});
|
|
3383
|
+
|
|
3384
|
+
// node_modules/.bun/@smithy+util-base64@2.3.0/node_modules/@smithy/util-base64/dist-es/index.js
|
|
3385
|
+
var init_dist_es18 = __esm(() => {
|
|
3386
|
+
init_fromBase64();
|
|
3387
|
+
init_toBase64();
|
|
3388
|
+
});
|
|
3389
|
+
|
|
3390
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/NoOpLogger.js
|
|
3391
|
+
var init_NoOpLogger = () => {};
|
|
3392
|
+
|
|
3393
|
+
// node_modules/.bun/@smithy+middleware-stack@2.2.0/node_modules/@smithy/middleware-stack/dist-es/MiddlewareStack.js
|
|
3394
|
+
var init_MiddlewareStack = () => {};
|
|
3395
|
+
|
|
3396
|
+
// node_modules/.bun/@smithy+middleware-stack@2.2.0/node_modules/@smithy/middleware-stack/dist-es/index.js
|
|
3397
|
+
var init_dist_es19 = __esm(() => {
|
|
3398
|
+
init_MiddlewareStack();
|
|
3399
|
+
});
|
|
3400
|
+
|
|
3401
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/client.js
|
|
3402
|
+
var init_client4 = __esm(() => {
|
|
3403
|
+
init_dist_es19();
|
|
3404
|
+
});
|
|
3405
|
+
|
|
3406
|
+
// node_modules/.bun/@smithy+util-stream@2.2.0/node_modules/@smithy/util-stream/dist-es/blob/transforms.js
|
|
3407
|
+
function transformToString(payload, encoding = "utf-8") {
|
|
3408
|
+
if (encoding === "base64") {
|
|
3409
|
+
return toBase64(payload);
|
|
3410
|
+
}
|
|
3411
|
+
return toUtf8(payload);
|
|
3412
|
+
}
|
|
3413
|
+
function transformFromString(str, encoding) {
|
|
3414
|
+
if (encoding === "base64") {
|
|
3415
|
+
return Uint8ArrayBlobAdapter.mutate(fromBase64(str));
|
|
3416
|
+
}
|
|
3417
|
+
return Uint8ArrayBlobAdapter.mutate(fromUtf8(str));
|
|
3418
|
+
}
|
|
3419
|
+
var init_transforms = __esm(() => {
|
|
3420
|
+
init_dist_es18();
|
|
3421
|
+
init_dist_es2();
|
|
3422
|
+
init_Uint8ArrayBlobAdapter();
|
|
3423
|
+
});
|
|
3424
|
+
|
|
3425
|
+
// node_modules/.bun/@smithy+util-stream@2.2.0/node_modules/@smithy/util-stream/dist-es/blob/Uint8ArrayBlobAdapter.js
|
|
3426
|
+
var Uint8ArrayBlobAdapter;
|
|
3427
|
+
var init_Uint8ArrayBlobAdapter = __esm(() => {
|
|
3428
|
+
init_transforms();
|
|
3429
|
+
Uint8ArrayBlobAdapter = class Uint8ArrayBlobAdapter extends Uint8Array {
|
|
3430
|
+
static fromString(source, encoding = "utf-8") {
|
|
3431
|
+
switch (typeof source) {
|
|
3432
|
+
case "string":
|
|
3433
|
+
return transformFromString(source, encoding);
|
|
3434
|
+
default:
|
|
3435
|
+
throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`);
|
|
3436
|
+
}
|
|
3437
|
+
}
|
|
3438
|
+
static mutate(source) {
|
|
3439
|
+
Object.setPrototypeOf(source, Uint8ArrayBlobAdapter.prototype);
|
|
3440
|
+
return source;
|
|
3441
|
+
}
|
|
3442
|
+
transformToString(encoding = "utf-8") {
|
|
3443
|
+
return transformToString(this, encoding);
|
|
3444
|
+
}
|
|
3445
|
+
};
|
|
3446
|
+
});
|
|
3447
|
+
|
|
3448
|
+
// node_modules/.bun/@smithy+util-stream@2.2.0/node_modules/@smithy/util-stream/dist-es/getAwsChunkedEncodingStream.js
|
|
3449
|
+
var init_getAwsChunkedEncodingStream = () => {};
|
|
3450
|
+
|
|
3451
|
+
// node_modules/.bun/@smithy+util-uri-escape@2.2.0/node_modules/@smithy/util-uri-escape/dist-es/escape-uri.js
|
|
3452
|
+
var init_escape_uri2 = () => {};
|
|
3453
|
+
|
|
3454
|
+
// node_modules/.bun/@smithy+util-uri-escape@2.2.0/node_modules/@smithy/util-uri-escape/dist-es/escape-uri-path.js
|
|
3455
|
+
var init_escape_uri_path2 = __esm(() => {
|
|
3456
|
+
init_escape_uri2();
|
|
3457
|
+
});
|
|
3458
|
+
|
|
3459
|
+
// node_modules/.bun/@smithy+util-uri-escape@2.2.0/node_modules/@smithy/util-uri-escape/dist-es/index.js
|
|
3460
|
+
var init_dist_es20 = __esm(() => {
|
|
3461
|
+
init_escape_uri2();
|
|
3462
|
+
init_escape_uri_path2();
|
|
3463
|
+
});
|
|
3464
|
+
|
|
3465
|
+
// node_modules/.bun/@smithy+querystring-builder@2.2.0/node_modules/@smithy/querystring-builder/dist-es/index.js
|
|
3466
|
+
var init_dist_es21 = __esm(() => {
|
|
3467
|
+
init_dist_es20();
|
|
3468
|
+
});
|
|
3469
|
+
|
|
3470
|
+
// node_modules/.bun/@smithy+node-http-handler@2.5.0/node_modules/@smithy/node-http-handler/dist-es/constants.js
|
|
3471
|
+
var init_constants2 = () => {};
|
|
3472
|
+
|
|
3473
|
+
// node_modules/.bun/@smithy+node-http-handler@2.5.0/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js
|
|
3474
|
+
var init_get_transformed_headers = () => {};
|
|
3475
|
+
|
|
3476
|
+
// node_modules/.bun/@smithy+node-http-handler@2.5.0/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js
|
|
3477
|
+
var init_set_connection_timeout = () => {};
|
|
3478
|
+
|
|
3479
|
+
// node_modules/.bun/@smithy+node-http-handler@2.5.0/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js
|
|
3480
|
+
var init_set_socket_keep_alive = () => {};
|
|
3481
|
+
|
|
3482
|
+
// node_modules/.bun/@smithy+node-http-handler@2.5.0/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js
|
|
3483
|
+
var init_set_socket_timeout = () => {};
|
|
3484
|
+
|
|
3485
|
+
// node_modules/.bun/@smithy+node-http-handler@2.5.0/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js
|
|
3486
|
+
var init_write_request_body = () => {};
|
|
3487
|
+
|
|
3488
|
+
// node_modules/.bun/@smithy+node-http-handler@2.5.0/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js
|
|
3489
|
+
var init_node_http_handler = __esm(() => {
|
|
3490
|
+
init_dist_es5();
|
|
3491
|
+
init_dist_es21();
|
|
3492
|
+
init_constants2();
|
|
3493
|
+
init_get_transformed_headers();
|
|
3494
|
+
init_set_connection_timeout();
|
|
3495
|
+
init_set_socket_keep_alive();
|
|
3496
|
+
init_set_socket_timeout();
|
|
3497
|
+
init_write_request_body();
|
|
3498
|
+
});
|
|
3499
|
+
|
|
3500
|
+
// node_modules/.bun/@smithy+node-http-handler@2.5.0/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js
|
|
3501
|
+
var init_node_http2_connection_pool = () => {};
|
|
3502
|
+
|
|
3503
|
+
// node_modules/.bun/@smithy+node-http-handler@2.5.0/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js
|
|
3504
|
+
var init_node_http2_connection_manager = __esm(() => {
|
|
3505
|
+
init_node_http2_connection_pool();
|
|
3506
|
+
});
|
|
3507
|
+
|
|
3508
|
+
// node_modules/.bun/@smithy+node-http-handler@2.5.0/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js
|
|
3509
|
+
var init_node_http2_handler = __esm(() => {
|
|
3510
|
+
init_dist_es5();
|
|
3511
|
+
init_dist_es21();
|
|
3512
|
+
init_get_transformed_headers();
|
|
3513
|
+
init_node_http2_connection_manager();
|
|
3514
|
+
init_write_request_body();
|
|
3515
|
+
});
|
|
3516
|
+
|
|
3517
|
+
// node_modules/.bun/@smithy+node-http-handler@2.5.0/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js
|
|
3518
|
+
var init_collector = () => {};
|
|
3519
|
+
|
|
3520
|
+
// node_modules/.bun/@smithy+node-http-handler@2.5.0/node_modules/@smithy/node-http-handler/dist-es/stream-collector/index.js
|
|
3521
|
+
var init_stream_collector = __esm(() => {
|
|
3522
|
+
init_collector();
|
|
3523
|
+
});
|
|
3524
|
+
|
|
3525
|
+
// node_modules/.bun/@smithy+node-http-handler@2.5.0/node_modules/@smithy/node-http-handler/dist-es/index.js
|
|
3526
|
+
var init_dist_es22 = __esm(() => {
|
|
3527
|
+
init_node_http_handler();
|
|
3528
|
+
init_node_http2_handler();
|
|
3529
|
+
init_stream_collector();
|
|
3530
|
+
});
|
|
3531
|
+
|
|
3532
|
+
// node_modules/.bun/@smithy+util-stream@2.2.0/node_modules/@smithy/util-stream/dist-es/sdk-stream-mixin.js
|
|
3533
|
+
var init_sdk_stream_mixin = __esm(() => {
|
|
3534
|
+
init_dist_es22();
|
|
3535
|
+
init_dist_es();
|
|
3536
|
+
});
|
|
3537
|
+
|
|
3538
|
+
// node_modules/.bun/@smithy+util-stream@2.2.0/node_modules/@smithy/util-stream/dist-es/index.js
|
|
3539
|
+
var init_dist_es23 = __esm(() => {
|
|
3540
|
+
init_Uint8ArrayBlobAdapter();
|
|
3541
|
+
init_getAwsChunkedEncodingStream();
|
|
3542
|
+
init_sdk_stream_mixin();
|
|
3543
|
+
});
|
|
3544
|
+
|
|
3545
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/collect-stream-body.js
|
|
3546
|
+
var collectBody = async (streamBody = new Uint8Array, context) => {
|
|
3547
|
+
if (streamBody instanceof Uint8Array) {
|
|
3548
|
+
return Uint8ArrayBlobAdapter.mutate(streamBody);
|
|
3549
|
+
}
|
|
3550
|
+
if (!streamBody) {
|
|
3551
|
+
return Uint8ArrayBlobAdapter.mutate(new Uint8Array);
|
|
3552
|
+
}
|
|
3553
|
+
const fromContext = context.streamCollector(streamBody);
|
|
3554
|
+
return Uint8ArrayBlobAdapter.mutate(await fromContext);
|
|
3555
|
+
};
|
|
3556
|
+
var init_collect_stream_body = __esm(() => {
|
|
3557
|
+
init_dist_es23();
|
|
3558
|
+
});
|
|
3559
|
+
|
|
3560
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/command.js
|
|
3561
|
+
var init_command3 = __esm(() => {
|
|
3562
|
+
init_dist_es19();
|
|
3563
|
+
init_dist_es4();
|
|
3564
|
+
});
|
|
3565
|
+
|
|
3566
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/constants.js
|
|
3567
|
+
var init_constants3 = () => {};
|
|
3568
|
+
|
|
3569
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/create-aggregated-client.js
|
|
3570
|
+
var init_create_aggregated_client = () => {};
|
|
3571
|
+
|
|
3572
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/parse-utils.js
|
|
3573
|
+
var MAX_FLOAT, expectLong = (value) => {
|
|
3574
|
+
if (value === null || value === undefined) {
|
|
3575
|
+
return;
|
|
3576
|
+
}
|
|
3577
|
+
if (Number.isInteger(value) && !Number.isNaN(value)) {
|
|
3578
|
+
return value;
|
|
3579
|
+
}
|
|
3580
|
+
throw new TypeError(`Expected integer, got ${typeof value}: ${value}`);
|
|
3581
|
+
}, expectInt32 = (value) => expectSizedInt(value, 32), expectSizedInt = (value, size) => {
|
|
3582
|
+
const expected = expectLong(value);
|
|
3583
|
+
if (expected !== undefined && castInt(expected, size) !== expected) {
|
|
3584
|
+
throw new TypeError(`Expected ${size}-bit integer, got ${value}`);
|
|
3585
|
+
}
|
|
3586
|
+
return expected;
|
|
3587
|
+
}, castInt = (value, size) => {
|
|
3588
|
+
switch (size) {
|
|
3589
|
+
case 32:
|
|
3590
|
+
return Int32Array.of(value)[0];
|
|
3591
|
+
case 16:
|
|
3592
|
+
return Int16Array.of(value)[0];
|
|
3593
|
+
case 8:
|
|
3594
|
+
return Int8Array.of(value)[0];
|
|
3595
|
+
}
|
|
3596
|
+
}, expectString = (value) => {
|
|
3597
|
+
if (value === null || value === undefined) {
|
|
3598
|
+
return;
|
|
3599
|
+
}
|
|
3600
|
+
if (typeof value === "string") {
|
|
3601
|
+
return value;
|
|
3602
|
+
}
|
|
3603
|
+
if (["boolean", "number", "bigint"].includes(typeof value)) {
|
|
3604
|
+
logger3.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`));
|
|
3605
|
+
return String(value);
|
|
3606
|
+
}
|
|
3607
|
+
throw new TypeError(`Expected string, got ${typeof value}: ${value}`);
|
|
3608
|
+
}, stackTraceWarning = (message) => {
|
|
3609
|
+
return String(new TypeError(message).stack || message).split(`
|
|
3610
|
+
`).slice(0, 5).filter((s) => !s.includes("stackTraceWarning")).join(`
|
|
3611
|
+
`);
|
|
3612
|
+
}, logger3;
|
|
3613
|
+
var init_parse_utils = __esm(() => {
|
|
3614
|
+
MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));
|
|
3615
|
+
logger3 = {
|
|
3616
|
+
warn: console.warn
|
|
3617
|
+
};
|
|
3618
|
+
});
|
|
3619
|
+
|
|
3620
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/date-utils.js
|
|
3621
|
+
var RFC3339, RFC3339_WITH_OFFSET, IMF_FIXDATE, RFC_850_DATE, ASC_TIME, FIFTY_YEARS_IN_MILLIS;
|
|
3622
|
+
var init_date_utils = __esm(() => {
|
|
3623
|
+
init_parse_utils();
|
|
3624
|
+
RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/);
|
|
3625
|
+
RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/);
|
|
3626
|
+
IMF_FIXDATE = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/);
|
|
3627
|
+
RFC_850_DATE = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/);
|
|
3628
|
+
ASC_TIME = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/);
|
|
3629
|
+
FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1000;
|
|
3630
|
+
});
|
|
3631
|
+
|
|
3632
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/exceptions.js
|
|
3633
|
+
var decorateServiceException = (exception, additions = {}) => {
|
|
3634
|
+
Object.entries(additions).filter(([, v]) => v !== undefined).forEach(([k, v]) => {
|
|
3635
|
+
if (exception[k] == undefined || exception[k] === "") {
|
|
3636
|
+
exception[k] = v;
|
|
3637
|
+
}
|
|
3638
|
+
});
|
|
3639
|
+
const message = exception.message || exception.Message || "UnknownError";
|
|
3640
|
+
exception.message = message;
|
|
3641
|
+
delete exception.Message;
|
|
3642
|
+
return exception;
|
|
3643
|
+
};
|
|
3644
|
+
var init_exceptions = () => {};
|
|
3645
|
+
|
|
3646
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/default-error-handler.js
|
|
3647
|
+
var init_default_error_handler = __esm(() => {
|
|
3648
|
+
init_exceptions();
|
|
3649
|
+
});
|
|
3650
|
+
|
|
3651
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/defaults-mode.js
|
|
3652
|
+
var init_defaults_mode = () => {};
|
|
3653
|
+
|
|
3654
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/emitWarningIfUnsupportedVersion.js
|
|
3655
|
+
var init_emitWarningIfUnsupportedVersion = () => {};
|
|
3656
|
+
|
|
3657
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/extensions/checksum.js
|
|
3658
|
+
var init_checksum5 = __esm(() => {
|
|
3659
|
+
init_dist_es4();
|
|
3660
|
+
});
|
|
3661
|
+
|
|
3662
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/extensions/retry.js
|
|
3663
|
+
var init_retry3 = () => {};
|
|
3664
|
+
|
|
3665
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/extensions/defaultExtensionConfiguration.js
|
|
3666
|
+
var init_defaultExtensionConfiguration3 = __esm(() => {
|
|
3667
|
+
init_checksum5();
|
|
3668
|
+
init_retry3();
|
|
3669
|
+
});
|
|
3670
|
+
|
|
3671
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/extensions/index.js
|
|
3672
|
+
var init_extensions4 = __esm(() => {
|
|
3673
|
+
init_defaultExtensionConfiguration3();
|
|
3674
|
+
});
|
|
3675
|
+
|
|
3676
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/extended-encode-uri-component.js
|
|
3677
|
+
var init_extended_encode_uri_component = () => {};
|
|
3678
|
+
|
|
3679
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/get-array-if-single-item.js
|
|
3680
|
+
var init_get_array_if_single_item = () => {};
|
|
3681
|
+
|
|
3682
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/get-value-from-text-node.js
|
|
3683
|
+
var init_get_value_from_text_node = () => {};
|
|
3684
|
+
|
|
3685
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/lazy-json.js
|
|
3686
|
+
var StringWrapper = function() {
|
|
3687
|
+
const Class = Object.getPrototypeOf(this).constructor;
|
|
3688
|
+
const Constructor = Function.bind.apply(String, [null, ...arguments]);
|
|
3689
|
+
const instance = new Constructor;
|
|
3690
|
+
Object.setPrototypeOf(instance, Class.prototype);
|
|
3691
|
+
return instance;
|
|
3692
|
+
};
|
|
3693
|
+
var init_lazy_json = __esm(() => {
|
|
3694
|
+
StringWrapper.prototype = Object.create(String.prototype, {
|
|
3695
|
+
constructor: {
|
|
3696
|
+
value: StringWrapper,
|
|
3697
|
+
enumerable: false,
|
|
3698
|
+
writable: true,
|
|
3699
|
+
configurable: true
|
|
3700
|
+
}
|
|
3701
|
+
});
|
|
3702
|
+
Object.setPrototypeOf(StringWrapper, String);
|
|
3703
|
+
});
|
|
3704
|
+
|
|
3705
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/object-mapping.js
|
|
3706
|
+
function map(arg0, arg1, arg2) {
|
|
3707
|
+
let target;
|
|
3708
|
+
let filter;
|
|
3709
|
+
let instructions;
|
|
3710
|
+
if (typeof arg1 === "undefined" && typeof arg2 === "undefined") {
|
|
3711
|
+
target = {};
|
|
3712
|
+
instructions = arg0;
|
|
3713
|
+
} else {
|
|
3714
|
+
target = arg0;
|
|
3715
|
+
if (typeof arg1 === "function") {
|
|
3716
|
+
filter = arg1;
|
|
3717
|
+
instructions = arg2;
|
|
3718
|
+
return mapWithFilter(target, filter, instructions);
|
|
3719
|
+
} else {
|
|
3720
|
+
instructions = arg1;
|
|
3721
|
+
}
|
|
3722
|
+
}
|
|
3723
|
+
for (const key of Object.keys(instructions)) {
|
|
3724
|
+
if (!Array.isArray(instructions[key])) {
|
|
3725
|
+
target[key] = instructions[key];
|
|
3726
|
+
continue;
|
|
3727
|
+
}
|
|
3728
|
+
applyInstruction(target, null, instructions, key);
|
|
3729
|
+
}
|
|
3730
|
+
return target;
|
|
3731
|
+
}
|
|
3732
|
+
var take = (source, instructions) => {
|
|
3733
|
+
const out = {};
|
|
3734
|
+
for (const key in instructions) {
|
|
3735
|
+
applyInstruction(out, source, instructions, key);
|
|
3736
|
+
}
|
|
3737
|
+
return out;
|
|
3738
|
+
}, mapWithFilter = (target, filter, instructions) => {
|
|
3739
|
+
return map(target, Object.entries(instructions).reduce((_instructions, [key, value]) => {
|
|
3740
|
+
if (Array.isArray(value)) {
|
|
3741
|
+
_instructions[key] = value;
|
|
3742
|
+
} else {
|
|
3743
|
+
if (typeof value === "function") {
|
|
3744
|
+
_instructions[key] = [filter, value()];
|
|
3745
|
+
} else {
|
|
3746
|
+
_instructions[key] = [filter, value];
|
|
3747
|
+
}
|
|
3748
|
+
}
|
|
3749
|
+
return _instructions;
|
|
3750
|
+
}, {}));
|
|
3751
|
+
}, applyInstruction = (target, source, instructions, targetKey) => {
|
|
3752
|
+
if (source !== null) {
|
|
3753
|
+
let instruction = instructions[targetKey];
|
|
3754
|
+
if (typeof instruction === "function") {
|
|
3755
|
+
instruction = [, instruction];
|
|
3756
|
+
}
|
|
3757
|
+
const [filter2 = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction;
|
|
3758
|
+
if (typeof filter2 === "function" && filter2(source[sourceKey]) || typeof filter2 !== "function" && !!filter2) {
|
|
3759
|
+
target[targetKey] = valueFn(source[sourceKey]);
|
|
3760
|
+
}
|
|
3761
|
+
return;
|
|
3762
|
+
}
|
|
3763
|
+
let [filter, value] = instructions[targetKey];
|
|
3764
|
+
if (typeof value === "function") {
|
|
3765
|
+
let _value;
|
|
3766
|
+
const defaultFilterPassed = filter === undefined && (_value = value()) != null;
|
|
3767
|
+
const customFilterPassed = typeof filter === "function" && !!filter(undefined) || typeof filter !== "function" && !!filter;
|
|
3768
|
+
if (defaultFilterPassed) {
|
|
3769
|
+
target[targetKey] = _value;
|
|
3770
|
+
} else if (customFilterPassed) {
|
|
3771
|
+
target[targetKey] = value();
|
|
3772
|
+
}
|
|
3773
|
+
} else {
|
|
3774
|
+
const defaultFilterPassed = filter === undefined && value != null;
|
|
3775
|
+
const customFilterPassed = typeof filter === "function" && !!filter(value) || typeof filter !== "function" && !!filter;
|
|
3776
|
+
if (defaultFilterPassed || customFilterPassed) {
|
|
3777
|
+
target[targetKey] = value;
|
|
3778
|
+
}
|
|
3779
|
+
}
|
|
3780
|
+
}, nonNullish = (_) => _ != null, pass = (_) => _;
|
|
3781
|
+
var init_object_mapping = () => {};
|
|
3782
|
+
|
|
3783
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/resolve-path.js
|
|
3784
|
+
var init_resolve_path = __esm(() => {
|
|
3785
|
+
init_extended_encode_uri_component();
|
|
3786
|
+
});
|
|
3787
|
+
|
|
3788
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/ser-utils.js
|
|
3789
|
+
var init_ser_utils = () => {};
|
|
3790
|
+
|
|
3791
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/serde-json.js
|
|
3792
|
+
var init_serde_json = () => {};
|
|
3793
|
+
|
|
3794
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/split-every.js
|
|
3795
|
+
var init_split_every = () => {};
|
|
3796
|
+
|
|
3797
|
+
// node_modules/.bun/@smithy+smithy-client@2.5.1/node_modules/@smithy/smithy-client/dist-es/index.js
|
|
3798
|
+
var init_dist_es24 = __esm(() => {
|
|
3799
|
+
init_NoOpLogger();
|
|
3800
|
+
init_client4();
|
|
3801
|
+
init_collect_stream_body();
|
|
3802
|
+
init_command3();
|
|
3803
|
+
init_constants3();
|
|
3804
|
+
init_create_aggregated_client();
|
|
3805
|
+
init_date_utils();
|
|
3806
|
+
init_default_error_handler();
|
|
3807
|
+
init_defaults_mode();
|
|
3808
|
+
init_emitWarningIfUnsupportedVersion();
|
|
3809
|
+
init_extensions4();
|
|
3810
|
+
init_exceptions();
|
|
3811
|
+
init_extended_encode_uri_component();
|
|
3812
|
+
init_get_array_if_single_item();
|
|
3813
|
+
init_get_value_from_text_node();
|
|
3814
|
+
init_lazy_json();
|
|
3815
|
+
init_object_mapping();
|
|
3816
|
+
init_parse_utils();
|
|
3817
|
+
init_resolve_path();
|
|
3818
|
+
init_ser_utils();
|
|
3819
|
+
init_serde_json();
|
|
3820
|
+
init_split_every();
|
|
3821
|
+
});
|
|
3822
|
+
|
|
3823
|
+
// node_modules/.bun/@anthropic-ai+bedrock-sdk@0.26.4+3c5d820c62823f0b/node_modules/@anthropic-ai/bedrock-sdk/AWS_restJson1.mjs
|
|
3824
|
+
var de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
3825
|
+
const contents = map({});
|
|
3826
|
+
const data = parsedOutput.body;
|
|
3827
|
+
const doc = take(data, {
|
|
3828
|
+
message: expectString
|
|
3829
|
+
});
|
|
3830
|
+
Object.assign(contents, doc);
|
|
3831
|
+
const exception = new InternalServerException({
|
|
3832
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3833
|
+
...contents
|
|
3834
|
+
});
|
|
3835
|
+
return decorateServiceException(exception, parsedOutput.body);
|
|
3836
|
+
}, de_ModelStreamErrorExceptionRes = async (parsedOutput, context) => {
|
|
3837
|
+
const contents = map({});
|
|
3838
|
+
const data = parsedOutput.body;
|
|
3839
|
+
const doc = take(data, {
|
|
3840
|
+
message: expectString,
|
|
3841
|
+
originalMessage: expectString,
|
|
3842
|
+
originalStatusCode: expectInt32
|
|
3843
|
+
});
|
|
3844
|
+
Object.assign(contents, doc);
|
|
3845
|
+
const exception = new ModelStreamErrorException({
|
|
3846
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3847
|
+
...contents
|
|
3848
|
+
});
|
|
3849
|
+
return decorateServiceException(exception, parsedOutput.body);
|
|
3850
|
+
}, de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
3851
|
+
const contents = map({});
|
|
3852
|
+
const data = parsedOutput.body;
|
|
3853
|
+
const doc = take(data, {
|
|
3854
|
+
message: expectString
|
|
3855
|
+
});
|
|
3856
|
+
Object.assign(contents, doc);
|
|
3857
|
+
const exception = new ThrottlingException({
|
|
3858
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3859
|
+
...contents
|
|
3860
|
+
});
|
|
3861
|
+
return decorateServiceException(exception, parsedOutput.body);
|
|
3862
|
+
}, de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
3863
|
+
const contents = map({});
|
|
3864
|
+
const data = parsedOutput.body;
|
|
3865
|
+
const doc = take(data, {
|
|
3866
|
+
message: expectString
|
|
3867
|
+
});
|
|
3868
|
+
Object.assign(contents, doc);
|
|
3869
|
+
const exception = new ValidationException({
|
|
3870
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
3871
|
+
...contents
|
|
3872
|
+
});
|
|
3873
|
+
return decorateServiceException(exception, parsedOutput.body);
|
|
3874
|
+
}, de_ResponseStream = (output, context) => {
|
|
3875
|
+
return context.eventStreamMarshaller.deserialize(output, async (event) => {
|
|
3876
|
+
if (event["chunk"] != null) {
|
|
3877
|
+
return {
|
|
3878
|
+
chunk: await de_PayloadPart_event(event["chunk"], context)
|
|
3879
|
+
};
|
|
3880
|
+
}
|
|
3881
|
+
if (event["internalServerException"] != null) {
|
|
3882
|
+
return {
|
|
3883
|
+
internalServerException: await de_InternalServerException_event(event["internalServerException"], context)
|
|
3884
|
+
};
|
|
3885
|
+
}
|
|
3886
|
+
if (event["modelStreamErrorException"] != null) {
|
|
3887
|
+
return {
|
|
3888
|
+
modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"], context)
|
|
3889
|
+
};
|
|
3890
|
+
}
|
|
3891
|
+
if (event["validationException"] != null) {
|
|
3892
|
+
return {
|
|
3893
|
+
validationException: await de_ValidationException_event(event["validationException"], context)
|
|
3894
|
+
};
|
|
3895
|
+
}
|
|
3896
|
+
if (event["throttlingException"] != null) {
|
|
3897
|
+
return {
|
|
3898
|
+
throttlingException: await de_ThrottlingException_event(event["throttlingException"], context)
|
|
3899
|
+
};
|
|
3900
|
+
}
|
|
3901
|
+
return { $unknown: output };
|
|
3902
|
+
});
|
|
3903
|
+
}, de_InternalServerException_event = async (output, context) => {
|
|
3904
|
+
const parsedOutput = {
|
|
3905
|
+
...output,
|
|
3906
|
+
body: await parseBody(output.body, context)
|
|
3907
|
+
};
|
|
3908
|
+
return de_InternalServerExceptionRes(parsedOutput, context);
|
|
3909
|
+
}, de_ModelStreamErrorException_event = async (output, context) => {
|
|
3910
|
+
const parsedOutput = {
|
|
3911
|
+
...output,
|
|
3912
|
+
body: await parseBody(output.body, context)
|
|
3913
|
+
};
|
|
3914
|
+
return de_ModelStreamErrorExceptionRes(parsedOutput, context);
|
|
3915
|
+
}, de_PayloadPart_event = async (output, context) => {
|
|
3916
|
+
const contents = {};
|
|
3917
|
+
const data = await parseBody(output.body, context);
|
|
3918
|
+
Object.assign(contents, de_PayloadPart(data, context));
|
|
3919
|
+
return contents;
|
|
3920
|
+
}, de_ThrottlingException_event = async (output, context) => {
|
|
3921
|
+
const parsedOutput = {
|
|
3922
|
+
...output,
|
|
3923
|
+
body: await parseBody(output.body, context)
|
|
3924
|
+
};
|
|
3925
|
+
return de_ThrottlingExceptionRes(parsedOutput, context);
|
|
3926
|
+
}, de_ValidationException_event = async (output, context) => {
|
|
3927
|
+
const parsedOutput = {
|
|
3928
|
+
...output,
|
|
3929
|
+
body: await parseBody(output.body, context)
|
|
3930
|
+
};
|
|
3931
|
+
return de_ValidationExceptionRes(parsedOutput, context);
|
|
3932
|
+
}, de_PayloadPart = (output, context) => {
|
|
3933
|
+
return take(output, {
|
|
3934
|
+
bytes: context.base64Decoder
|
|
3935
|
+
});
|
|
3936
|
+
}, deserializeMetadata = (output) => ({
|
|
3937
|
+
httpStatusCode: output.statusCode,
|
|
3938
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"] ?? "",
|
|
3939
|
+
extendedRequestId: output.headers["x-amz-id-2"] ?? "",
|
|
3940
|
+
cfId: output.headers["x-amz-cf-id"] ?? ""
|
|
3941
|
+
}), collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)), parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
3942
|
+
if (encoded.length) {
|
|
3943
|
+
return JSON.parse(encoded);
|
|
3944
|
+
}
|
|
3945
|
+
return {};
|
|
3946
|
+
});
|
|
3947
|
+
var init_AWS_restJson1 = __esm(() => {
|
|
3948
|
+
init_dist_es24();
|
|
3949
|
+
init_dist_es3();
|
|
3950
|
+
});
|
|
3951
|
+
|
|
3952
|
+
// node_modules/.bun/@anthropic-ai+bedrock-sdk@0.26.4+3c5d820c62823f0b/node_modules/@anthropic-ai/bedrock-sdk/internal/shims.mjs
|
|
3953
|
+
function ReadableStreamToAsyncIterable(stream3) {
|
|
3954
|
+
if (stream3[Symbol.asyncIterator])
|
|
3955
|
+
return stream3;
|
|
3956
|
+
const reader = stream3.getReader();
|
|
3957
|
+
return {
|
|
3958
|
+
async next() {
|
|
3959
|
+
try {
|
|
3960
|
+
const result = await reader.read();
|
|
3961
|
+
if (result?.done)
|
|
3962
|
+
reader.releaseLock();
|
|
3963
|
+
return result;
|
|
3964
|
+
} catch (e) {
|
|
3965
|
+
reader.releaseLock();
|
|
3966
|
+
throw e;
|
|
3967
|
+
}
|
|
3968
|
+
},
|
|
3969
|
+
async return() {
|
|
3970
|
+
const cancelPromise = reader.cancel();
|
|
3971
|
+
reader.releaseLock();
|
|
3972
|
+
await cancelPromise;
|
|
3973
|
+
return { done: true, value: undefined };
|
|
3974
|
+
},
|
|
3975
|
+
[Symbol.asyncIterator]() {
|
|
3976
|
+
return this;
|
|
3977
|
+
}
|
|
3978
|
+
};
|
|
3979
|
+
}
|
|
3980
|
+
var init_shims = () => {};
|
|
3981
|
+
|
|
3982
|
+
// node_modules/.bun/@anthropic-ai+bedrock-sdk@0.26.4+3c5d820c62823f0b/node_modules/@anthropic-ai/bedrock-sdk/core/error.mjs
|
|
3983
|
+
var init_error3 = __esm(() => {
|
|
3984
|
+
init_error();
|
|
3985
|
+
});
|
|
3986
|
+
|
|
3987
|
+
// node_modules/.bun/@anthropic-ai+bedrock-sdk@0.26.4+3c5d820c62823f0b/node_modules/@anthropic-ai/bedrock-sdk/internal/utils/values.mjs
|
|
3988
|
+
function isObj(obj) {
|
|
3989
|
+
return obj != null && typeof obj === "object" && !Array.isArray(obj);
|
|
3990
|
+
}
|
|
3991
|
+
var isArray = (val) => (isArray = Array.isArray, isArray(val)), isReadonlyArray, safeJSON = (text) => {
|
|
3992
|
+
try {
|
|
3993
|
+
return JSON.parse(text);
|
|
3994
|
+
} catch (err) {
|
|
3995
|
+
return;
|
|
3996
|
+
}
|
|
3997
|
+
};
|
|
3998
|
+
var init_values = __esm(() => {
|
|
3999
|
+
init_error3();
|
|
4000
|
+
isReadonlyArray = isArray;
|
|
4001
|
+
});
|
|
4002
|
+
|
|
4003
|
+
// node_modules/.bun/@anthropic-ai+bedrock-sdk@0.26.4+3c5d820c62823f0b/node_modules/@anthropic-ai/bedrock-sdk/internal/utils/log.mjs
|
|
4004
|
+
function noop() {}
|
|
4005
|
+
function makeLogFn(fnLevel, logger4, logLevel) {
|
|
4006
|
+
if (!logger4 || levelNumbers[fnLevel] > levelNumbers[logLevel]) {
|
|
4007
|
+
return noop;
|
|
4008
|
+
} else {
|
|
4009
|
+
return logger4[fnLevel].bind(logger4);
|
|
4010
|
+
}
|
|
4011
|
+
}
|
|
4012
|
+
function loggerFor(client4) {
|
|
4013
|
+
const logger4 = client4.logger;
|
|
4014
|
+
const logLevel = client4.logLevel ?? "off";
|
|
4015
|
+
if (!logger4) {
|
|
4016
|
+
return noopLogger;
|
|
4017
|
+
}
|
|
4018
|
+
const cachedLogger = cachedLoggers.get(logger4);
|
|
4019
|
+
if (cachedLogger && cachedLogger[0] === logLevel) {
|
|
4020
|
+
return cachedLogger[1];
|
|
4021
|
+
}
|
|
4022
|
+
const levelLogger = {
|
|
4023
|
+
error: makeLogFn("error", logger4, logLevel),
|
|
4024
|
+
warn: makeLogFn("warn", logger4, logLevel),
|
|
4025
|
+
info: makeLogFn("info", logger4, logLevel),
|
|
4026
|
+
debug: makeLogFn("debug", logger4, logLevel)
|
|
4027
|
+
};
|
|
4028
|
+
cachedLoggers.set(logger4, [logLevel, levelLogger]);
|
|
4029
|
+
return levelLogger;
|
|
4030
|
+
}
|
|
4031
|
+
var levelNumbers, noopLogger, cachedLoggers;
|
|
4032
|
+
var init_log = __esm(() => {
|
|
4033
|
+
init_values();
|
|
4034
|
+
levelNumbers = {
|
|
4035
|
+
off: 0,
|
|
4036
|
+
error: 200,
|
|
4037
|
+
warn: 300,
|
|
4038
|
+
info: 400,
|
|
4039
|
+
debug: 500
|
|
4040
|
+
};
|
|
4041
|
+
noopLogger = {
|
|
4042
|
+
error: noop,
|
|
4043
|
+
warn: noop,
|
|
4044
|
+
info: noop,
|
|
4045
|
+
debug: noop
|
|
4046
|
+
};
|
|
4047
|
+
cachedLoggers = /* @__PURE__ */ new WeakMap;
|
|
4048
|
+
});
|
|
4049
|
+
|
|
4050
|
+
// node_modules/.bun/@anthropic-ai+bedrock-sdk@0.26.4+3c5d820c62823f0b/node_modules/@anthropic-ai/bedrock-sdk/core/streaming.mjs
|
|
4051
|
+
function isAbortError(err) {
|
|
4052
|
+
return typeof err === "object" && err !== null && (("name" in err) && err.name === "AbortError" || ("message" in err) && String(err.message).includes("FetchRequestCanceledException"));
|
|
4053
|
+
}
|
|
4054
|
+
var import_fetch_http_handler2, toUtf83 = (input) => new TextDecoder("utf-8").decode(input), fromUtf84 = (input) => new TextEncoder().encode(input), getMinimalSerdeContext = () => {
|
|
4055
|
+
const marshaller = new EventStreamMarshaller3({ utf8Encoder: toUtf83, utf8Decoder: fromUtf84 });
|
|
4056
|
+
return {
|
|
4057
|
+
base64Decoder: fromBase64,
|
|
4058
|
+
base64Encoder: toBase64,
|
|
4059
|
+
utf8Decoder: fromUtf84,
|
|
4060
|
+
utf8Encoder: toUtf83,
|
|
4061
|
+
eventStreamMarshaller: marshaller,
|
|
4062
|
+
streamCollector: import_fetch_http_handler2.streamCollector
|
|
4063
|
+
};
|
|
4064
|
+
}, Stream2;
|
|
4065
|
+
var init_streaming2 = __esm(() => {
|
|
4066
|
+
init_dist_es17();
|
|
4067
|
+
init_dist_es18();
|
|
4068
|
+
init_streaming();
|
|
4069
|
+
init_error2();
|
|
4070
|
+
init_sdk();
|
|
4071
|
+
init_AWS_restJson1();
|
|
4072
|
+
init_shims();
|
|
4073
|
+
init_values();
|
|
4074
|
+
init_log();
|
|
4075
|
+
import_fetch_http_handler2 = __toESM(require_dist_cjs(), 1);
|
|
4076
|
+
Stream2 = class Stream2 extends Stream {
|
|
4077
|
+
static fromSSEResponse(response3, controller, client4) {
|
|
4078
|
+
let consumed = false;
|
|
4079
|
+
const logger4 = client4 ? loggerFor(client4) : console;
|
|
4080
|
+
async function* iterMessages() {
|
|
4081
|
+
if (!response3.body) {
|
|
4082
|
+
controller.abort();
|
|
4083
|
+
throw new AnthropicError(`Attempted to iterate over a response with no body`);
|
|
4084
|
+
}
|
|
4085
|
+
const responseBodyIter = ReadableStreamToAsyncIterable(response3.body);
|
|
4086
|
+
const eventStream3 = de_ResponseStream(responseBodyIter, getMinimalSerdeContext());
|
|
4087
|
+
for await (const event of eventStream3) {
|
|
4088
|
+
if (event.chunk && event.chunk.bytes) {
|
|
4089
|
+
const s = toUtf83(event.chunk.bytes);
|
|
4090
|
+
yield { event: "chunk", data: s, raw: [] };
|
|
4091
|
+
} else if (event.internalServerException) {
|
|
4092
|
+
yield { event: "error", data: "InternalServerException", raw: [] };
|
|
4093
|
+
} else if (event.modelStreamErrorException) {
|
|
4094
|
+
yield { event: "error", data: "ModelStreamErrorException", raw: [] };
|
|
4095
|
+
} else if (event.validationException) {
|
|
4096
|
+
yield { event: "error", data: "ValidationException", raw: [] };
|
|
4097
|
+
} else if (event.throttlingException) {
|
|
4098
|
+
yield { event: "error", data: "ThrottlingException", raw: [] };
|
|
4099
|
+
}
|
|
4100
|
+
}
|
|
4101
|
+
}
|
|
4102
|
+
async function* iterator() {
|
|
4103
|
+
if (consumed) {
|
|
4104
|
+
throw new Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");
|
|
4105
|
+
}
|
|
4106
|
+
consumed = true;
|
|
4107
|
+
let done = false;
|
|
4108
|
+
try {
|
|
4109
|
+
for await (const sse of iterMessages()) {
|
|
4110
|
+
if (sse.event === "chunk") {
|
|
4111
|
+
try {
|
|
4112
|
+
yield JSON.parse(sse.data);
|
|
4113
|
+
} catch (e) {
|
|
4114
|
+
logger4.error(`Could not parse message into JSON:`, sse.data);
|
|
4115
|
+
logger4.error(`From chunk:`, sse.raw);
|
|
4116
|
+
throw e;
|
|
4117
|
+
}
|
|
4118
|
+
}
|
|
4119
|
+
if (sse.event === "error") {
|
|
4120
|
+
const errText = sse.data;
|
|
4121
|
+
const errJSON = safeJSON(errText);
|
|
4122
|
+
const errMessage = errJSON ? undefined : errText;
|
|
4123
|
+
throw APIError.generate(undefined, errJSON, errMessage, response3.headers);
|
|
4124
|
+
}
|
|
4125
|
+
}
|
|
4126
|
+
done = true;
|
|
4127
|
+
} catch (e) {
|
|
4128
|
+
if (isAbortError(e))
|
|
4129
|
+
return;
|
|
4130
|
+
throw e;
|
|
4131
|
+
} finally {
|
|
4132
|
+
if (!done)
|
|
4133
|
+
controller.abort();
|
|
4134
|
+
}
|
|
4135
|
+
}
|
|
4136
|
+
return new Stream2(iterator, controller);
|
|
4137
|
+
}
|
|
4138
|
+
};
|
|
4139
|
+
});
|
|
4140
|
+
|
|
4141
|
+
// node_modules/.bun/@anthropic-ai+bedrock-sdk@0.26.4+3c5d820c62823f0b/node_modules/@anthropic-ai/bedrock-sdk/internal/utils/env.mjs
|
|
4142
|
+
var readEnv = (env) => {
|
|
4143
|
+
if (typeof globalThis.process !== "undefined") {
|
|
4144
|
+
return globalThis.process.env?.[env]?.trim() ?? undefined;
|
|
4145
|
+
}
|
|
4146
|
+
if (typeof globalThis.Deno !== "undefined") {
|
|
4147
|
+
return globalThis.Deno.env?.get?.(env)?.trim();
|
|
4148
|
+
}
|
|
4149
|
+
return;
|
|
4150
|
+
};
|
|
4151
|
+
var init_env = () => {};
|
|
4152
|
+
|
|
4153
|
+
// node_modules/.bun/@anthropic-ai+bedrock-sdk@0.26.4+3c5d820c62823f0b/node_modules/@anthropic-ai/bedrock-sdk/internal/headers.mjs
|
|
4154
|
+
function* iterateHeaders(headers) {
|
|
4155
|
+
if (!headers)
|
|
4156
|
+
return;
|
|
4157
|
+
if (brand_privateNullableHeaders in headers) {
|
|
4158
|
+
const { values, nulls } = headers;
|
|
4159
|
+
yield* values.entries();
|
|
4160
|
+
for (const name of nulls) {
|
|
4161
|
+
yield [name, null];
|
|
4162
|
+
}
|
|
4163
|
+
return;
|
|
4164
|
+
}
|
|
4165
|
+
let shouldClear = false;
|
|
4166
|
+
let iter;
|
|
4167
|
+
if (headers instanceof Headers) {
|
|
4168
|
+
iter = headers.entries();
|
|
4169
|
+
} else if (isReadonlyArray(headers)) {
|
|
4170
|
+
iter = headers;
|
|
4171
|
+
} else {
|
|
4172
|
+
shouldClear = true;
|
|
4173
|
+
iter = Object.entries(headers ?? {});
|
|
4174
|
+
}
|
|
4175
|
+
for (let row of iter) {
|
|
4176
|
+
const name = row[0];
|
|
4177
|
+
if (typeof name !== "string")
|
|
4178
|
+
throw new TypeError("expected header name to be a string");
|
|
4179
|
+
const values = isReadonlyArray(row[1]) ? row[1] : [row[1]];
|
|
4180
|
+
let didClear = false;
|
|
4181
|
+
for (const value of values) {
|
|
4182
|
+
if (value === undefined)
|
|
4183
|
+
continue;
|
|
4184
|
+
if (shouldClear && !didClear) {
|
|
4185
|
+
didClear = true;
|
|
4186
|
+
yield [name, null];
|
|
4187
|
+
}
|
|
4188
|
+
yield [name, value];
|
|
4189
|
+
}
|
|
4190
|
+
}
|
|
4191
|
+
}
|
|
4192
|
+
var brand_privateNullableHeaders, buildHeaders = (newHeaders) => {
|
|
4193
|
+
const targetHeaders = new Headers;
|
|
4194
|
+
const nullHeaders = new Set;
|
|
4195
|
+
for (const headers of newHeaders) {
|
|
4196
|
+
const seenHeaders = new Set;
|
|
4197
|
+
for (const [name, value] of iterateHeaders(headers)) {
|
|
4198
|
+
const lowerName = name.toLowerCase();
|
|
4199
|
+
if (!seenHeaders.has(lowerName)) {
|
|
4200
|
+
targetHeaders.delete(name);
|
|
4201
|
+
seenHeaders.add(lowerName);
|
|
4202
|
+
}
|
|
4203
|
+
if (value === null) {
|
|
4204
|
+
targetHeaders.delete(name);
|
|
4205
|
+
nullHeaders.add(lowerName);
|
|
4206
|
+
} else {
|
|
4207
|
+
targetHeaders.append(name, value);
|
|
4208
|
+
nullHeaders.delete(lowerName);
|
|
4209
|
+
}
|
|
4210
|
+
}
|
|
4211
|
+
}
|
|
4212
|
+
return { [brand_privateNullableHeaders]: true, values: targetHeaders, nulls: nullHeaders };
|
|
4213
|
+
};
|
|
4214
|
+
var init_headers = __esm(() => {
|
|
4215
|
+
init_values();
|
|
4216
|
+
brand_privateNullableHeaders = Symbol.for("brand.privateNullableHeaders");
|
|
4217
|
+
});
|
|
4218
|
+
|
|
4219
|
+
// node_modules/.bun/@anthropic-ai+bedrock-sdk@0.26.4+3c5d820c62823f0b/node_modules/@anthropic-ai/bedrock-sdk/internal/utils/path.mjs
|
|
4220
|
+
function encodeURIPath(str) {
|
|
4221
|
+
return str.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent);
|
|
4222
|
+
}
|
|
4223
|
+
var EMPTY, createPathTagFunction = (pathEncoder = encodeURIPath) => function path(statics, ...params) {
|
|
4224
|
+
if (statics.length === 1)
|
|
4225
|
+
return statics[0];
|
|
4226
|
+
let postPath = false;
|
|
4227
|
+
const invalidSegments = [];
|
|
4228
|
+
const path2 = statics.reduce((previousValue, currentValue, index) => {
|
|
4229
|
+
if (/[?#]/.test(currentValue)) {
|
|
4230
|
+
postPath = true;
|
|
4231
|
+
}
|
|
4232
|
+
const value = params[index];
|
|
4233
|
+
let encoded = (postPath ? encodeURIComponent : pathEncoder)("" + value);
|
|
4234
|
+
if (index !== params.length && (value == null || typeof value === "object" && value.toString === Object.getPrototypeOf(Object.getPrototypeOf(value.hasOwnProperty ?? EMPTY) ?? EMPTY)?.toString)) {
|
|
4235
|
+
encoded = value + "";
|
|
4236
|
+
invalidSegments.push({
|
|
4237
|
+
start: previousValue.length + currentValue.length,
|
|
4238
|
+
length: encoded.length,
|
|
4239
|
+
error: `Value of type ${Object.prototype.toString.call(value).slice(8, -1)} is not a valid path parameter`
|
|
4240
|
+
});
|
|
4241
|
+
}
|
|
4242
|
+
return previousValue + currentValue + (index === params.length ? "" : encoded);
|
|
4243
|
+
}, "");
|
|
4244
|
+
const pathOnly = path2.split(/[?#]/, 1)[0];
|
|
4245
|
+
const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
|
|
4246
|
+
let match;
|
|
4247
|
+
while ((match = invalidSegmentPattern.exec(pathOnly)) !== null) {
|
|
4248
|
+
invalidSegments.push({
|
|
4249
|
+
start: match.index,
|
|
4250
|
+
length: match[0].length,
|
|
4251
|
+
error: `Value "${match[0]}" can't be safely passed as a path parameter`
|
|
4252
|
+
});
|
|
4253
|
+
}
|
|
4254
|
+
invalidSegments.sort((a, b) => a.start - b.start);
|
|
4255
|
+
if (invalidSegments.length > 0) {
|
|
4256
|
+
let lastEnd = 0;
|
|
4257
|
+
const underline = invalidSegments.reduce((acc, segment) => {
|
|
4258
|
+
const spaces = " ".repeat(segment.start - lastEnd);
|
|
4259
|
+
const arrows = "^".repeat(segment.length);
|
|
4260
|
+
lastEnd = segment.start + segment.length;
|
|
4261
|
+
return acc + spaces + arrows;
|
|
4262
|
+
}, "");
|
|
4263
|
+
throw new AnthropicError(`Path parameters result in path with invalid segments:
|
|
4264
|
+
${invalidSegments.map((e) => e.error).join(`
|
|
4265
|
+
`)}
|
|
4266
|
+
${path2}
|
|
4267
|
+
${underline}`);
|
|
4268
|
+
}
|
|
4269
|
+
return path2;
|
|
4270
|
+
}, path;
|
|
4271
|
+
var init_path = __esm(() => {
|
|
4272
|
+
init_error3();
|
|
4273
|
+
EMPTY = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.create(null));
|
|
4274
|
+
path = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
|
|
4275
|
+
});
|
|
4276
|
+
|
|
4277
|
+
// node_modules/.bun/@anthropic-ai+bedrock-sdk@0.26.4+3c5d820c62823f0b/node_modules/@anthropic-ai/bedrock-sdk/client.mjs
|
|
4278
|
+
function makeMessagesResource(client4) {
|
|
4279
|
+
const resource = new Messages(client4);
|
|
4280
|
+
delete resource.batches;
|
|
4281
|
+
delete resource.countTokens;
|
|
4282
|
+
return resource;
|
|
4283
|
+
}
|
|
4284
|
+
function makeBetaResource(client4) {
|
|
4285
|
+
const resource = new Beta(client4);
|
|
4286
|
+
delete resource.promptCaching;
|
|
4287
|
+
delete resource.messages.batches;
|
|
4288
|
+
delete resource.messages.countTokens;
|
|
4289
|
+
return resource;
|
|
4290
|
+
}
|
|
4291
|
+
var DEFAULT_VERSION = "bedrock-2023-05-31", MODEL_ENDPOINTS, AnthropicBedrock;
|
|
4292
|
+
var init_client5 = __esm(() => {
|
|
4293
|
+
init_client();
|
|
4294
|
+
init_resources();
|
|
4295
|
+
init_auth5();
|
|
4296
|
+
init_streaming2();
|
|
4297
|
+
init_env();
|
|
4298
|
+
init_values();
|
|
4299
|
+
init_headers();
|
|
4300
|
+
init_path();
|
|
4301
|
+
init_log();
|
|
4302
|
+
init_client();
|
|
4303
|
+
MODEL_ENDPOINTS = new Set(["/v1/complete", "/v1/messages", "/v1/messages?beta=true"]);
|
|
4304
|
+
AnthropicBedrock = class AnthropicBedrock extends BaseAnthropic {
|
|
4305
|
+
constructor({ awsRegion = readEnv("AWS_REGION") ?? "us-east-1", baseURL = readEnv("ANTHROPIC_BEDROCK_BASE_URL") ?? `https://bedrock-runtime.${awsRegion}.amazonaws.com`, awsSecretKey = null, awsAccessKey = null, awsSessionToken = null, providerChainResolver = null, ...opts } = {}) {
|
|
4306
|
+
super({ baseURL, ...opts });
|
|
4307
|
+
this.skipAuth = false;
|
|
4308
|
+
this.messages = makeMessagesResource(this);
|
|
4309
|
+
this.completions = new Completions(this);
|
|
4310
|
+
this.beta = makeBetaResource(this);
|
|
4311
|
+
const hasAccess = awsAccessKey != null;
|
|
4312
|
+
const hasSecret = awsSecretKey != null;
|
|
4313
|
+
if (hasAccess !== hasSecret) {
|
|
4314
|
+
loggerFor(this).warn("Warning: Passing only one of `awsAccessKey` or `awsSecretKey` is deprecated. " + "Please provide both keys, or provide neither and rely on the AWS credential provider chain.");
|
|
4315
|
+
}
|
|
4316
|
+
this.awsSecretKey = awsSecretKey;
|
|
4317
|
+
this.awsAccessKey = awsAccessKey;
|
|
4318
|
+
this.awsRegion = awsRegion;
|
|
4319
|
+
this.awsSessionToken = awsSessionToken;
|
|
4320
|
+
this.skipAuth = opts.skipAuth ?? false;
|
|
4321
|
+
this.providerChainResolver = providerChainResolver;
|
|
4322
|
+
}
|
|
4323
|
+
validateHeaders() {}
|
|
4324
|
+
async prepareRequest(request, { url, options }) {
|
|
4325
|
+
if (this.skipAuth) {
|
|
4326
|
+
return;
|
|
4327
|
+
}
|
|
4328
|
+
const regionName = this.awsRegion;
|
|
4329
|
+
if (!regionName) {
|
|
4330
|
+
throw new Error("Expected `awsRegion` option to be passed to the client or the `AWS_REGION` environment variable to be present");
|
|
4331
|
+
}
|
|
4332
|
+
const headers = await getAuthHeaders(request, {
|
|
4333
|
+
url,
|
|
4334
|
+
regionName,
|
|
4335
|
+
awsAccessKey: this.awsAccessKey,
|
|
4336
|
+
awsSecretKey: this.awsSecretKey,
|
|
4337
|
+
awsSessionToken: this.awsSessionToken,
|
|
4338
|
+
fetchOptions: this.fetchOptions,
|
|
4339
|
+
providerChainResolver: this.providerChainResolver
|
|
4340
|
+
});
|
|
4341
|
+
request.headers = buildHeaders([headers, request.headers]).values;
|
|
4342
|
+
}
|
|
4343
|
+
async buildRequest(options) {
|
|
4344
|
+
options.__streamClass = Stream2;
|
|
4345
|
+
if (isObj(options.body)) {
|
|
4346
|
+
options.body = { ...options.body };
|
|
4347
|
+
}
|
|
4348
|
+
if (isObj(options.body)) {
|
|
4349
|
+
if (!options.body["anthropic_version"]) {
|
|
4350
|
+
options.body["anthropic_version"] = DEFAULT_VERSION;
|
|
4351
|
+
}
|
|
4352
|
+
if (options.headers && !options.body["anthropic_beta"]) {
|
|
4353
|
+
const betas = buildHeaders([options.headers]).values.get("anthropic-beta");
|
|
4354
|
+
if (betas != null) {
|
|
4355
|
+
options.body["anthropic_beta"] = betas.split(",");
|
|
4356
|
+
}
|
|
4357
|
+
}
|
|
4358
|
+
}
|
|
4359
|
+
if (MODEL_ENDPOINTS.has(options.path) && options.method === "post") {
|
|
4360
|
+
if (!isObj(options.body)) {
|
|
4361
|
+
throw new Error("Expected request body to be an object for post /v1/messages");
|
|
4362
|
+
}
|
|
4363
|
+
const model = options.body["model"];
|
|
4364
|
+
options.body["model"] = undefined;
|
|
4365
|
+
const stream3 = options.body["stream"];
|
|
4366
|
+
options.body["stream"] = undefined;
|
|
4367
|
+
if (stream3) {
|
|
4368
|
+
options.path = path`/model/${model}/invoke-with-response-stream`;
|
|
4369
|
+
} else {
|
|
4370
|
+
options.path = path`/model/${model}/invoke`;
|
|
4371
|
+
}
|
|
4372
|
+
}
|
|
4373
|
+
return super.buildRequest(options);
|
|
4374
|
+
}
|
|
4375
|
+
};
|
|
4376
|
+
});
|
|
4377
|
+
|
|
4378
|
+
// node_modules/.bun/@anthropic-ai+bedrock-sdk@0.26.4+3c5d820c62823f0b/node_modules/@anthropic-ai/bedrock-sdk/index.mjs
|
|
4379
|
+
var init_bedrock_sdk = __esm(() => {
|
|
4380
|
+
init_client5();
|
|
4381
|
+
init_client5();
|
|
4382
|
+
});
|
|
4383
|
+
init_bedrock_sdk();
|
|
4384
|
+
|
|
4385
|
+
export {
|
|
4386
|
+
AnthropicBedrock as default,
|
|
4387
|
+
BaseAnthropic,
|
|
4388
|
+
AnthropicBedrock
|
|
4389
|
+
};
|