claude-code-best 1.4.4 → 1.5.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.
Files changed (423) hide show
  1. package/README.md +1 -0
  2. package/dist/{chunk-n18n51gd.js → chunk-07hgsrrj.js} +61 -65
  3. package/dist/{chunk-10cw48wr.js → chunk-08s2vf8j.js} +51 -52
  4. package/dist/{chunk-8zx2v88n.js → chunk-099vkedx.js} +2 -2
  5. package/dist/{chunk-bvzn7axc.js → chunk-0bbrkswa.js} +1 -1
  6. package/dist/{chunk-9k46vkdf.js → chunk-0bqtrr6h.js} +55 -56
  7. package/dist/{chunk-kbzh54rh.js → chunk-0g5qnby7.js} +6 -6
  8. package/dist/{chunk-g558vggk.js → chunk-0h1mmmrb.js} +15 -15
  9. package/dist/{chunk-z2e401ww.js → chunk-0j7426hg.js} +2 -2
  10. package/dist/{chunk-0z0m6mm5.js → chunk-0k1jmtw9.js} +2 -2
  11. package/dist/{chunk-478xh8c9.js → chunk-0k5v3m41.js} +49 -50
  12. package/dist/chunk-0kd8mq8j.js +36 -0
  13. package/dist/{chunk-3fp4s54c.js → chunk-0n0ca69d.js} +8 -8
  14. package/dist/{chunk-zn7egynp.js → chunk-0qakcnby.js} +47 -48
  15. package/dist/chunk-0s7za42b.js +14 -0
  16. package/dist/{chunk-xf0t82rg.js → chunk-0tmg91b1.js} +47 -48
  17. package/dist/{chunk-hrg9vq6p.js → chunk-0v20v2af.js} +3 -3
  18. package/dist/{chunk-d9280rcs.js → chunk-0v2awzd5.js} +1 -1
  19. package/dist/{chunk-8cx4mvde.js → chunk-0v590295.js} +148 -148
  20. package/dist/{chunk-g540y6p8.js → chunk-0va3y97h.js} +50 -51
  21. package/dist/{chunk-r26enj81.js → chunk-0vcpjqz5.js} +18 -18
  22. package/dist/{chunk-ay9nh032.js → chunk-0vvk6tv4.js} +15 -15
  23. package/dist/{chunk-76qapcaf.js → chunk-0w957a33.js} +50 -51
  24. package/dist/{chunk-rygn25nx.js → chunk-0wtwnyvg.js} +1 -1
  25. package/dist/chunk-0xereag4.js +173 -0
  26. package/dist/{chunk-00xx1rmz.js → chunk-0z5j99bj.js} +16 -16
  27. package/dist/{chunk-6bd8brc4.js → chunk-0zkw14gq.js} +3 -3
  28. package/dist/{chunk-jfhmk1c6.js → chunk-13zdd5e6.js} +38 -32
  29. package/dist/{chunk-xm9ccpyh.js → chunk-16gq8x0y.js} +49 -50
  30. package/dist/{chunk-cxqaz5vr.js → chunk-19gdjrk6.js} +3 -3
  31. package/dist/{chunk-strvbymz.js → chunk-1dym9vfh.js} +37 -31
  32. package/dist/chunk-1g68v32a.js +17 -0
  33. package/dist/{chunk-w0tvdc6h.js → chunk-1k83dgjb.js} +49 -50
  34. package/dist/{chunk-k9cthr5h.js → chunk-1kr4x0ec.js} +16 -16
  35. package/dist/chunk-1v0q0tce.js +104 -0
  36. package/dist/{chunk-f84rfz6r.js → chunk-1y0w6mjw.js} +48 -49
  37. package/dist/{chunk-gjfa8v40.js → chunk-1ymrygy1.js} +3 -3
  38. package/dist/{chunk-3ckfamg7.js → chunk-1zzfvmmk.js} +47 -48
  39. package/dist/{chunk-305t7jww.js → chunk-23j983cf.js} +48 -49
  40. package/dist/{chunk-2885j676.js → chunk-25xrykpm.js} +47 -48
  41. package/dist/{chunk-cjbw6hsq.js → chunk-26yzm962.js} +47 -48
  42. package/dist/{chunk-p6zhv3fj.js → chunk-279m39zm.js} +2 -2
  43. package/dist/chunk-27an25fd.js +118 -0
  44. package/dist/{chunk-c9js3490.js → chunk-2br81xts.js} +13 -13
  45. package/dist/chunk-2eftymgs.js +70 -0
  46. package/dist/{chunk-4th8hz38.js → chunk-2n53zm0g.js} +1 -1
  47. package/dist/{chunk-xt73r8zj.js → chunk-2ppy5p0x.js} +1 -1
  48. package/dist/chunk-2rhny2td.js +542 -0
  49. package/dist/{chunk-f3gcmncr.js → chunk-2s2z24wm.js} +47 -48
  50. package/dist/{chunk-mkq4vynt.js → chunk-2tt7xc2t.js} +2 -2
  51. package/dist/{chunk-ar1mw8p5.js → chunk-2wy13rhe.js} +14 -14
  52. package/dist/{chunk-1y0e25vy.js → chunk-2xx8f4qv.js} +4 -4
  53. package/dist/{chunk-sqmb5zqp.js → chunk-32mtrtm4.js} +48 -49
  54. package/dist/{chunk-wjhhetv4.js → chunk-32vdb088.js} +208 -202
  55. package/dist/{chunk-03qpgz7e.js → chunk-36yypykx.js} +2151 -2124
  56. package/dist/{chunk-8vs3nfx4.js → chunk-381w6mma.js} +1 -1
  57. package/dist/{chunk-5hd0n4kc.js → chunk-3cghr0yw.js} +47 -48
  58. package/dist/chunk-3dpdscmt.js +5332 -0
  59. package/dist/{chunk-x8s52epd.js → chunk-3dv5ctj4.js} +48 -49
  60. package/dist/{chunk-wcjz1zkw.js → chunk-3es5r0dx.js} +48 -49
  61. package/dist/chunk-3fapt8z5.js +3686 -0
  62. package/dist/{chunk-9eq853s5.js → chunk-3gpxmzz8.js} +3 -3
  63. package/dist/{chunk-jg2ngavx.js → chunk-3xh6v618.js} +47 -48
  64. package/dist/{chunk-9n28jzta.js → chunk-3xw21x85.js} +2 -2
  65. package/dist/{chunk-0wj5655r.js → chunk-3zyt28ea.js} +14 -14
  66. package/dist/{chunk-6k55dfby.js → chunk-40d286da.js} +5 -5
  67. package/dist/{chunk-d0ss5j5q.js → chunk-42k22r18.js} +1 -1
  68. package/dist/{chunk-5dvmrn7n.js → chunk-456m81he.js} +47 -48
  69. package/dist/{chunk-cm7cxa22.js → chunk-46bqcdpf.js} +5 -5
  70. package/dist/{chunk-w61znt0r.js → chunk-4b5peb6p.js} +7 -7
  71. package/dist/chunk-4cfcpzb1.js +25 -0
  72. package/dist/chunk-4ch5vxv6.js +55 -0
  73. package/dist/chunk-4drj3c7m.js +9 -0
  74. package/dist/{chunk-6ara055f.js → chunk-4h5zefyh.js} +48 -49
  75. package/dist/{chunk-65149q8s.js → chunk-4n6tnssg.js} +75 -50
  76. package/dist/{chunk-tj662ss5.js → chunk-4pr3ph3g.js} +14 -14
  77. package/dist/{chunk-kxht28q6.js → chunk-4sahp0qz.js} +93 -101
  78. package/dist/{chunk-sxceea76.js → chunk-4ymyjjq9.js} +6 -6
  79. package/dist/{chunk-9q2y2zh1.js → chunk-50ykc5qt.js} +2 -2
  80. package/dist/{chunk-m751vrjc.js → chunk-53dr4k73.js} +3 -3
  81. package/dist/chunk-58fwsj1y.js +718 -0
  82. package/dist/chunk-59dp4z1p.js +157 -0
  83. package/dist/chunk-5b4v2zkf.js +1095 -0
  84. package/dist/{chunk-d16pe6q0.js → chunk-5c62s229.js} +14 -14
  85. package/dist/{chunk-pvvn6rs5.js → chunk-5f4n0ywb.js} +48 -49
  86. package/dist/{chunk-dx7e3yvb.js → chunk-5gv4sshz.js} +47 -48
  87. package/dist/{chunk-xerkzn28.js → chunk-5m6942nd.js} +5 -5
  88. package/dist/{chunk-ykr5qx9v.js → chunk-5nccnh01.js} +123 -103
  89. package/dist/{chunk-5n479b51.js → chunk-5q5xcm1a.js} +47 -48
  90. package/dist/{chunk-9x6kxrmf.js → chunk-5wq9nsdc.js} +3 -3
  91. package/dist/{chunk-tfsfw21c.js → chunk-5x2nq6b9.js} +55 -58
  92. package/dist/{chunk-br2fc21h.js → chunk-5y6k4xrs.js} +2 -2
  93. package/dist/{chunk-yvt4w0wr.js → chunk-63q03fkn.js} +47 -48
  94. package/dist/{chunk-6ybnndcm.js → chunk-65w3ek1a.js} +17 -17
  95. package/dist/{chunk-c81b5e4c.js → chunk-67w1zken.js} +16 -16
  96. package/dist/{chunk-xq9xqjsc.js → chunk-6ccsyy1d.js} +1 -1
  97. package/dist/{chunk-fhfp2q8c.js → chunk-6ct7fh1v.js} +3 -3
  98. package/dist/{chunk-4nv4wh05.js → chunk-6d1y8a8t.js} +2 -2
  99. package/dist/{chunk-4t6p7q4x.js → chunk-6dcmw81a.js} +22 -22
  100. package/dist/{chunk-25x89wym.js → chunk-6eb1nz6v.js} +3 -3
  101. package/dist/{chunk-z2zk7g57.js → chunk-6frqd366.js} +50 -51
  102. package/dist/chunk-6m81e182.js +81 -0
  103. package/dist/{chunk-j6k3zjb5.js → chunk-6ns89pft.js} +25 -17
  104. package/dist/chunk-6vqkv5g7.js +256 -0
  105. package/dist/{chunk-qk1txvrw.js → chunk-6weddn5h.js} +49 -50
  106. package/dist/{chunk-3n6xcqc2.js → chunk-7a6r0k3m.js} +47 -48
  107. package/dist/{chunk-e4an0rhr.js → chunk-7b2e9e81.js} +15 -17
  108. package/dist/{chunk-d5qv71vm.js → chunk-7bc12031.js} +14 -12
  109. package/dist/{chunk-cjjq2j2b.js → chunk-7brvkna2.js} +53 -54
  110. package/dist/{chunk-yqy9m4km.js → chunk-7bs8swa2.js} +7 -7
  111. package/dist/{chunk-t53aq97s.js → chunk-7dgqzj7h.js} +50 -51
  112. package/dist/{chunk-maf8nerb.js → chunk-7dk4m49a.js} +48 -49
  113. package/dist/{chunk-y7py934d.js → chunk-7e9hc8ce.js} +52 -53
  114. package/dist/{chunk-90wp6wez.js → chunk-7ebcff63.js} +2 -2
  115. package/dist/{chunk-t5dxb7t7.js → chunk-7ecg65mr.js} +1 -1
  116. package/dist/{chunk-zttmdag3.js → chunk-7fht54sw.js} +1 -1
  117. package/dist/{chunk-j5kvrt9y.js → chunk-7j845cqe.js} +47 -48
  118. package/dist/chunk-7jk88vww.js +782 -0
  119. package/dist/{chunk-rwzm45v5.js → chunk-7kfb7tqj.js} +2 -2
  120. package/dist/{chunk-rbkhemh9.js → chunk-7p437ydk.js} +37 -31
  121. package/dist/{chunk-a9zh40sj.js → chunk-7q7h7msb.js} +3 -3
  122. package/dist/{chunk-rpp3r30z.js → chunk-7ye0arvq.js} +1 -1
  123. package/dist/{chunk-db7qenhh.js → chunk-7z17cw4h.js} +47 -48
  124. package/dist/{chunk-hxc8e6wd.js → chunk-7zrkp054.js} +2 -2
  125. package/dist/chunk-82jkr65n.js +16 -0
  126. package/dist/{chunk-xh0gfn3x.js → chunk-838naekw.js} +2 -2
  127. package/dist/{chunk-5wsvwc5e.js → chunk-879maaae.js} +47 -48
  128. package/dist/chunk-87zgmycv.js +65 -0
  129. package/dist/{chunk-qfbttb4x.js → chunk-8shx4hgv.js} +48 -49
  130. package/dist/{chunk-eh2p7txn.js → chunk-8vt2rmzz.js} +52 -53
  131. package/dist/{chunk-ndq2y6sc.js → chunk-8wmyjwn2.js} +2 -2
  132. package/dist/{chunk-27ezf4tc.js → chunk-8wq0z465.js} +1 -1
  133. package/dist/{chunk-p74998st.js → chunk-8ym1t31g.js} +53 -54
  134. package/dist/{chunk-vazn9zr8.js → chunk-8z33fy5n.js} +49 -50
  135. package/dist/chunk-91abjr1g.js +29 -0
  136. package/dist/{chunk-g649rtg8.js → chunk-9230kmx2.js} +7 -6
  137. package/dist/{chunk-s39ksgef.js → chunk-93qhgq6p.js} +1 -1
  138. package/dist/{chunk-m0pkp5ga.js → chunk-9629mtdz.js} +1 -1
  139. package/dist/{chunk-kttp77s8.js → chunk-9b04n6d1.js} +1 -1
  140. package/dist/{chunk-pw8kw48d.js → chunk-9fpha2xv.js} +6 -6
  141. package/dist/{chunk-469hyn07.js → chunk-9stsxjba.js} +4 -4
  142. package/dist/{chunk-0mvnb624.js → chunk-9t7nxd80.js} +1 -1
  143. package/dist/{chunk-b9xq4536.js → chunk-9vebtp7v.js} +52 -53
  144. package/dist/{chunk-3ktg0bfz.js → chunk-a7kdj8mj.js} +54 -55
  145. package/dist/{chunk-6jpdf1q6.js → chunk-acts7vdr.js} +10 -10
  146. package/dist/{chunk-2p4y0dj6.js → chunk-adgamch7.js} +57 -60
  147. package/dist/{chunk-hnq3w6tx.js → chunk-ahebrd5y.js} +5 -5
  148. package/dist/{chunk-fngdgt2f.js → chunk-am5cn48y.js} +4 -4
  149. package/dist/{chunk-5q056cze.js → chunk-apwjfffr.js} +1 -1
  150. package/dist/{chunk-wv700xtn.js → chunk-ayn250r2.js} +16 -16
  151. package/dist/chunk-b0bk6bxs.js +742 -0
  152. package/dist/{chunk-c358prbg.js → chunk-b0yyp8et.js} +4210 -253
  153. package/dist/{chunk-ce0sqtyk.js → chunk-bg3zs6s3.js} +1 -1
  154. package/dist/chunk-btnvjcc5.js +15 -0
  155. package/dist/{chunk-32gxxymn.js → chunk-by7nh2js.js} +18 -18
  156. package/dist/{chunk-3g4s34f4.js → chunk-c0yhh86m.js} +3 -3
  157. package/dist/{chunk-d7zw0dtv.js → chunk-c68754tz.js} +5 -5
  158. package/dist/chunk-cga5sq7g.js +41 -0
  159. package/dist/{chunk-jstky2ff.js → chunk-cjzk6t5c.js} +1 -1
  160. package/dist/chunk-ck06sqpy.js +220 -0
  161. package/dist/{chunk-mffjgywd.js → chunk-ck3q71vq.js} +2 -2
  162. package/dist/{chunk-gtzjdd18.js → chunk-cqbkd5ec.js} +3 -3
  163. package/dist/{chunk-3sbbxqm9.js → chunk-cqym51bf.js} +6 -6
  164. package/dist/{chunk-8rd1b3jk.js → chunk-cvqjhmqj.js} +56 -57
  165. package/dist/{chunk-5re3kwbc.js → chunk-cxy1ed0h.js} +3 -3
  166. package/dist/{chunk-a4c4m0nx.js → chunk-czjvd1xh.js} +91 -1806
  167. package/dist/{chunk-91fs1ha7.js → chunk-d0hj14fq.js} +65 -66
  168. package/dist/{chunk-66a2h4gk.js → chunk-d2kj6nek.js} +2 -2
  169. package/dist/{chunk-dtxakwbd.js → chunk-d37y1qja.js} +53 -54
  170. package/dist/{chunk-j6e8g1ms.js → chunk-d4x13kaa.js} +53 -54
  171. package/dist/{chunk-1npsp555.js → chunk-d6kw0esk.js} +1200 -161
  172. package/dist/{chunk-f7qkp4ha.js → chunk-d7jqw171.js} +47 -48
  173. package/dist/{chunk-f4htq4m4.js → chunk-d7xarb4w.js} +50 -51
  174. package/dist/{chunk-mq1c3epq.js → chunk-db3pr49y.js} +1 -1
  175. package/dist/{chunk-f3absj1f.js → chunk-dbfg6qhf.js} +2 -2
  176. package/dist/{chunk-evv7sxhw.js → chunk-dcs7myc3.js} +7 -7
  177. package/dist/{chunk-796a9b0z.js → chunk-ddyjgjpq.js} +47 -48
  178. package/dist/chunk-dgv19cce.js +183 -0
  179. package/dist/{chunk-t7v7can7.js → chunk-djrgjmyj.js} +1 -1
  180. package/dist/{chunk-sj43vmjm.js → chunk-djye5k50.js} +56 -59
  181. package/dist/{chunk-zkskmsjq.js → chunk-dknvhgkn.js} +3 -3
  182. package/dist/{chunk-s2t3qrte.js → chunk-drth8ce0.js} +1 -1
  183. package/dist/{chunk-p20wvv03.js → chunk-dt26hy6y.js} +1 -1
  184. package/dist/{chunk-xxr3cssg.js → chunk-dw5n6pr6.js} +47 -48
  185. package/dist/{chunk-ze6zvkg6.js → chunk-dxcr07z5.js} +4 -4
  186. package/dist/{chunk-szxy7bkh.js → chunk-dz32qcdd.js} +1 -1
  187. package/dist/chunk-e2cwk4hm.js +1185 -0
  188. package/dist/{chunk-52008rca.js → chunk-e50jgy7e.js} +14 -14
  189. package/dist/{chunk-xcmxx87m.js → chunk-e6trsfsm.js} +47 -48
  190. package/dist/{chunk-kfxyghyf.js → chunk-e6x5rpgx.js} +2 -2
  191. package/dist/{chunk-gkjcnxfe.js → chunk-e84ydbsq.js} +49 -50
  192. package/dist/{chunk-s9wgk88b.js → chunk-e96pr3z1.js} +48 -49
  193. package/dist/{chunk-7b9jrkee.js → chunk-eaawf61a.js} +47 -48
  194. package/dist/{chunk-hfntc659.js → chunk-eck5mjcw.js} +47 -48
  195. package/dist/{chunk-vtnfq4vf.js → chunk-egtb28zm.js} +233 -256
  196. package/dist/chunk-enhtm7h3.js +1731 -0
  197. package/dist/{chunk-47agtw2e.js → chunk-ep3h3f40.js} +47 -48
  198. package/dist/{chunk-8x8n4xxy.js → chunk-eqrxxgwx.js} +47 -48
  199. package/dist/chunk-es6y15pn.js +42 -0
  200. package/dist/{chunk-g9rvvqdy.js → chunk-etjwrq2s.js} +27 -27
  201. package/dist/{chunk-5der176s.js → chunk-ezbeckn3.js} +74 -51
  202. package/dist/{chunk-3fqxcp51.js → chunk-f109n77b.js} +14 -12
  203. package/dist/{chunk-kw1hpgh9.js → chunk-f29erv6g.js} +1 -1
  204. package/dist/{chunk-wvpvhk63.js → chunk-f3hyhcgd.js} +48 -49
  205. package/dist/{chunk-tcwv6fd9.js → chunk-fc9we717.js} +57 -60
  206. package/dist/{chunk-djydtvkr.js → chunk-fekynwj1.js} +505 -211
  207. package/dist/{chunk-tjr7qjpt.js → chunk-fks8ej56.js} +49 -50
  208. package/dist/{chunk-q56tkhgr.js → chunk-frwxzq55.js} +47 -48
  209. package/dist/{chunk-tkvg1xnr.js → chunk-ftdfvq1w.js} +4 -4
  210. package/dist/{chunk-w4pyvjtz.js → chunk-fx0xd0ex.js} +4 -4
  211. package/dist/{chunk-xpsb3jm8.js → chunk-fx52a9s2.js} +1 -1
  212. package/dist/{chunk-94xzz1fg.js → chunk-fxgt3m0a.js} +47 -48
  213. package/dist/{chunk-rh6936pj.js → chunk-fxm5s7sf.js} +15 -15
  214. package/dist/{chunk-j08qxq0d.js → chunk-fy2qr4hw.js} +48 -49
  215. package/dist/{chunk-5aw4k8fc.js → chunk-fz395yre.js} +1 -1
  216. package/dist/{chunk-hxy8h592.js → chunk-g0pmcggh.js} +2 -2
  217. package/dist/{chunk-20dbexrf.js → chunk-g45rr3sj.js} +1 -1
  218. package/dist/{chunk-q27bsq0y.js → chunk-g5kf8gsq.js} +4 -4
  219. package/dist/{chunk-7578r1rd.js → chunk-g9p7fypd.js} +47 -48
  220. package/dist/{chunk-ep17krqe.js → chunk-gbjhmjds.js} +9 -35
  221. package/dist/chunk-gd1ye7ef.js +168 -0
  222. package/dist/{chunk-y9pjq9h1.js → chunk-gfmss0fm.js} +15 -15
  223. package/dist/{chunk-ez10rk09.js → chunk-gg7ay6js.js} +47 -48
  224. package/dist/{chunk-777vk9pb.js → chunk-gk6v4y3r.js} +36 -32
  225. package/dist/{chunk-6hb097d3.js → chunk-gpgcar7e.js} +49 -50
  226. package/dist/{chunk-vtvxtdmq.js → chunk-gps4nmr6.js} +47 -48
  227. package/dist/{chunk-20n52jxv.js → chunk-gsa7bq8w.js} +6 -8
  228. package/dist/{chunk-7e7cb0t6.js → chunk-gsh55gb1.js} +2 -2
  229. package/dist/{chunk-094n6jd6.js → chunk-gv7bchnx.js} +47 -48
  230. package/dist/{chunk-fmadtbcm.js → chunk-gvg7arvr.js} +47 -48
  231. package/dist/chunk-gxnyeps9.js +3 -3
  232. package/dist/{chunk-xw38vjj4.js → chunk-gy5rfgd4.js} +6 -6
  233. package/dist/{chunk-ma9s7ycf.js → chunk-gzsnwa2e.js} +2 -2
  234. package/dist/{chunk-4qqswajh.js → chunk-h2vxyvpa.js} +12 -14
  235. package/dist/{chunk-f8ad6drq.js → chunk-h9dtsc52.js} +51 -53
  236. package/dist/{chunk-xha58rh2.js → chunk-hjr7tc1g.js} +1 -1
  237. package/dist/{chunk-9dhy1ekj.js → chunk-hkfat5cj.js} +50 -51
  238. package/dist/{chunk-dgrwcrwx.js → chunk-hkk80362.js} +1 -1
  239. package/dist/{chunk-p523ftrq.js → chunk-hkqvtcn2.js} +1 -1
  240. package/dist/{chunk-tszkvvnq.js → chunk-hs7sxtea.js} +2 -2
  241. package/dist/{chunk-8ymf4e6z.js → chunk-hxc5rbra.js} +3 -3
  242. package/dist/{chunk-h7xct2p1.js → chunk-hz9ty6jz.js} +50 -51
  243. package/dist/{chunk-x9rddxdt.js → chunk-hzk6nn1a.js} +47 -48
  244. package/dist/{chunk-ptdf4e9y.js → chunk-hzq56eee.js} +15 -15
  245. package/dist/{chunk-bt64sq5y.js → chunk-j04z48rw.js} +2 -2
  246. package/dist/chunk-j99epwtm.js +703 -0
  247. package/dist/{chunk-zs5b1dgr.js → chunk-jdq8jgyg.js} +1 -1
  248. package/dist/chunk-jdx93dh4.js +412 -0
  249. package/dist/chunk-jfqdw43z.js +14 -0
  250. package/dist/{chunk-ej1wwrcw.js → chunk-jvwa5w8w.js} +440 -654
  251. package/dist/{chunk-krgdryc0.js → chunk-jxzrapdr.js} +47 -48
  252. package/dist/{chunk-q76tj8p6.js → chunk-k7qqw0mj.js} +4 -4
  253. package/dist/{chunk-a8ejc632.js → chunk-k97s93n9.js} +1 -1
  254. package/dist/{chunk-dc0zwsyd.js → chunk-kcewk85p.js} +2 -2
  255. package/dist/{chunk-5xbvemsj.js → chunk-kdbbs50z.js} +3 -3
  256. package/dist/{chunk-2qsaxjnq.js → chunk-ke0bvd5n.js} +48 -49
  257. package/dist/{chunk-qc94x3p3.js → chunk-kggr6n4m.js} +60 -63
  258. package/dist/{chunk-8yxajf0d.js → chunk-km3ssf62.js} +19 -19
  259. package/dist/{chunk-kbeyhztj.js → chunk-kmh848ar.js} +19 -19
  260. package/dist/{chunk-ptn9f3na.js → chunk-kmy230xj.js} +50 -51
  261. package/dist/{chunk-acn3w259.js → chunk-kpyj9z78.js} +1 -1
  262. package/dist/{chunk-ywc2acy0.js → chunk-kwrep6kh.js} +2 -2
  263. package/dist/chunk-kxqjncxw.js +35 -0
  264. package/dist/{chunk-gfex5hb6.js → chunk-kyddexms.js} +13 -19
  265. package/dist/{chunk-04tphv07.js → chunk-kyefv6ng.js} +16 -16
  266. package/dist/{chunk-4faf9wd3.js → chunk-kz44a3qf.js} +3 -3
  267. package/dist/{chunk-dy8tttdp.js → chunk-m0vj33nj.js} +3 -3
  268. package/dist/chunk-m2rg2m7x.js +910 -0
  269. package/dist/{chunk-pps04vej.js → chunk-mbg1aw69.js} +10 -10
  270. package/dist/{chunk-5v45gvyx.js → chunk-mbkp0n55.js} +25 -25
  271. package/dist/{chunk-cajvbw85.js → chunk-mc41nrsy.js} +15 -15
  272. package/dist/{chunk-x94fchq0.js → chunk-me5gz5wa.js} +14 -14
  273. package/dist/{chunk-yz8h8hk3.js → chunk-mg8jtbwg.js} +50 -51
  274. package/dist/{chunk-ve9cwe9g.js → chunk-mgkaqb94.js} +47 -48
  275. package/dist/{chunk-ajzahsxn.js → chunk-mhygj95j.js} +48 -49
  276. package/dist/{chunk-0vkx14y7.js → chunk-mjqazs3m.js} +2 -2
  277. package/dist/{chunk-wgxsm74y.js → chunk-mnfb10tx.js} +3 -3
  278. package/dist/{chunk-t138q38h.js → chunk-mp72s5hc.js} +1 -1
  279. package/dist/{chunk-v2jb74tk.js → chunk-mp7bn9nx.js} +47 -48
  280. package/dist/{chunk-2afqgmq4.js → chunk-ms5agen7.js} +47 -48
  281. package/dist/{chunk-1xw41svw.js → chunk-msehbnjp.js} +59 -60
  282. package/dist/{chunk-yy13r4f1.js → chunk-my9dkgm8.js} +118 -4
  283. package/dist/{chunk-n6gs8dkk.js → chunk-n7pwac8p.js} +15 -15
  284. package/dist/{chunk-5d2nad7e.js → chunk-n8fxmey8.js} +1 -1
  285. package/dist/{chunk-w51ffctd.js → chunk-nd8hhtqz.js} +1 -1
  286. package/dist/{chunk-s0kbrpnn.js → chunk-nehajf9x.js} +3 -5
  287. package/dist/{chunk-fz0ch109.js → chunk-ng6s8w0e.js} +2 -2
  288. package/dist/{chunk-1n3pvcxm.js → chunk-ngryd7gy.js} +1 -1
  289. package/dist/{chunk-0sge3cez.js → chunk-nhxygcn1.js} +49 -50
  290. package/dist/chunk-nv7eb4pc.js +22 -0
  291. package/dist/{chunk-f8mc5g94.js → chunk-p6bws1a4.js} +16 -16
  292. package/dist/{chunk-y5x8wqe5.js → chunk-p8c4512d.js} +1 -1
  293. package/dist/{chunk-2xyp6pwt.js → chunk-pa4m8fka.js} +14 -14
  294. package/dist/{chunk-kzfj5mnk.js → chunk-pd9q9fd7.js} +47 -48
  295. package/dist/chunk-pf1dekdv.js +26 -0
  296. package/dist/{chunk-r2wcdqy9.js → chunk-pj5wk9qe.js} +47 -48
  297. package/dist/{chunk-zwv360y2.js → chunk-pkaehdm6.js} +859 -942
  298. package/dist/{chunk-ta1191a6.js → chunk-pp4kq0fa.js} +47 -48
  299. package/dist/{chunk-1je9wp7r.js → chunk-ptnf75rg.js} +47 -48
  300. package/dist/{chunk-27mj2w02.js → chunk-q09zbxk4.js} +15 -15
  301. package/dist/{chunk-5htp89xt.js → chunk-q1e46gk8.js} +55 -56
  302. package/dist/{chunk-rxep4zes.js → chunk-q1e7t6tz.js} +15 -128
  303. package/dist/{chunk-exv8n1za.js → chunk-q2jeezb4.js} +3 -3
  304. package/dist/{chunk-v69kxnen.js → chunk-q6vk37f0.js} +47 -48
  305. package/dist/chunk-q95b9wrd.js +40 -0
  306. package/dist/{chunk-ktmr2qew.js → chunk-qcvyd3y4.js} +3 -3
  307. package/dist/{chunk-08ap04th.js → chunk-qd97hcgd.js} +5 -5
  308. package/dist/{chunk-dpfjphps.js → chunk-qgx9mc6p.js} +5 -5
  309. package/dist/{chunk-15yxvxxm.js → chunk-qkp3ytva.js} +108 -111
  310. package/dist/{chunk-gfe3e4ce.js → chunk-qkymv6n8.js} +6 -6
  311. package/dist/{chunk-rc5r5t8e.js → chunk-qrz3b0e1.js} +4 -4
  312. package/dist/{chunk-3e1p9kv7.js → chunk-qzjk4vpq.js} +4 -4
  313. package/dist/{chunk-dnkd9ckw.js → chunk-r35b43p4.js} +17 -17
  314. package/dist/{chunk-6gg2cvm2.js → chunk-r4j2h4yp.js} +1 -1
  315. package/dist/{chunk-0s5m8nkk.js → chunk-r651whr2.js} +15 -15
  316. package/dist/{chunk-fhwpgyvw.js → chunk-r70h7x48.js} +50 -51
  317. package/dist/{chunk-xs7e9ynx.js → chunk-r8yzzrsp.js} +55 -56
  318. package/dist/{chunk-wkqf9whj.js → chunk-rdgrfsjm.js} +47 -48
  319. package/dist/{chunk-dps4gfm1.js → chunk-rfmf8jw2.js} +1 -1
  320. package/dist/{chunk-b623tcjz.js → chunk-rhdgt3c8.js} +4 -4
  321. package/dist/{chunk-dq4ckzab.js → chunk-rqwcz7mf.js} +16 -16
  322. package/dist/{chunk-73pxnrgv.js → chunk-rvb54w68.js} +2 -2
  323. package/dist/{chunk-jy1nhwr3.js → chunk-rwa1xxqk.js} +4 -4
  324. package/dist/{chunk-fgcxrx4c.js → chunk-s3k2jajp.js} +47 -48
  325. package/dist/{chunk-p1z86trg.js → chunk-s5cvaf0y.js} +3 -3
  326. package/dist/{chunk-wve68bf5.js → chunk-s8tq4y70.js} +2 -2
  327. package/dist/{chunk-2t5ncw9x.js → chunk-sa2gzt2m.js} +2 -2
  328. package/dist/chunk-scyjb4rw.js +42 -0
  329. package/dist/{chunk-nsndts3z.js → chunk-sfem4v24.js} +14 -14
  330. package/dist/{chunk-2z01s54n.js → chunk-sjc21xag.js} +4 -4
  331. package/dist/{chunk-400zp41r.js → chunk-snkt46ca.js} +1 -1
  332. package/dist/{chunk-xfnekqkc.js → chunk-sqk9ayam.js} +5 -7
  333. package/dist/chunk-swjfjpja.js +3213 -0
  334. package/dist/{chunk-c7qxrffg.js → chunk-swyr0ze5.js} +5 -5
  335. package/dist/{chunk-y6n3fdt2.js → chunk-t0rxmbvz.js} +17 -17
  336. package/dist/{chunk-eskw6xkv.js → chunk-t260g32y.js} +4 -4
  337. package/dist/{chunk-fg46hc6d.js → chunk-t6kym3nr.js} +38 -32
  338. package/dist/{chunk-bwv73k9n.js → chunk-t79jmj3c.js} +5 -5
  339. package/dist/chunk-t7vqt78m.js +32 -0
  340. package/dist/chunk-t8sg0wf3.js +23 -0
  341. package/dist/{chunk-kqe7861c.js → chunk-tc92qnj1.js} +77 -50
  342. package/dist/{chunk-dd60e5wj.js → chunk-temv6q01.js} +4 -4
  343. package/dist/chunk-th1cykx3.js +494 -0
  344. package/dist/chunk-tp6bgx9r.js +90 -0
  345. package/dist/{chunk-d1dkt8pf.js → chunk-tq61s8re.js} +48 -49
  346. package/dist/chunk-tsycknnm.js +887 -0
  347. package/dist/{chunk-45kw3kmb.js → chunk-tv3n7nyr.js} +47 -48
  348. package/dist/{chunk-swd4vhn1.js → chunk-v3a3d8qr.js} +48 -49
  349. package/dist/{chunk-4z3yrp6y.js → chunk-v6q8mas6.js} +48 -49
  350. package/dist/{chunk-1zvd49vg.js → chunk-v9xtwnkn.js} +4 -4
  351. package/dist/{chunk-emgk6xvg.js → chunk-vecm4b7g.js} +1 -1
  352. package/dist/{chunk-h6gm2k0d.js → chunk-vhjrpmd7.js} +48 -49
  353. package/dist/{chunk-rbwfpwps.js → chunk-vmp1tr7b.js} +2 -2
  354. package/dist/{chunk-amdb0grz.js → chunk-vn9dpw7e.js} +50 -51
  355. package/dist/{chunk-vxstb12h.js → chunk-vnhhnca0.js} +1 -1
  356. package/dist/{chunk-rj8p3f8w.js → chunk-vqf0cwfx.js} +48 -49
  357. package/dist/chunk-vqm2wda9.js +46 -0
  358. package/dist/{chunk-3h1nhq6f.js → chunk-vrbtdakb.js} +1 -1
  359. package/dist/{chunk-422fx6t4.js → chunk-vrdp6hk3.js} +50 -51
  360. package/dist/{chunk-ght1jhcp.js → chunk-vzn6172q.js} +56 -58
  361. package/dist/chunk-w0b04y7r.js +609 -0
  362. package/dist/{chunk-w49cma0z.js → chunk-w20437bg.js} +47 -48
  363. package/dist/{chunk-139bbdnz.js → chunk-w54rzd0a.js} +50 -51
  364. package/dist/{chunk-dq6gsxma.js → chunk-w7eccwbe.js} +15 -15
  365. package/dist/{chunk-mas3fz1d.js → chunk-wa3arctj.js} +12 -12
  366. package/dist/{chunk-w8am6ta4.js → chunk-wa7rnp49.js} +1 -1
  367. package/dist/{chunk-vagfnqc6.js → chunk-waazrpce.js} +2 -2
  368. package/dist/{chunk-0h3t3pg2.js → chunk-wbh9ydpk.js} +19 -19
  369. package/dist/{chunk-vdtdq74g.js → chunk-wc7s61fq.js} +15 -15
  370. package/dist/{chunk-2e6t5g22.js → chunk-wgmkhbe4.js} +2 -2
  371. package/dist/{chunk-j5xh6s8y.js → chunk-wh23fnfe.js} +11 -11
  372. package/dist/{chunk-wys7e7qz.js → chunk-whvpa72n.js} +4 -4
  373. package/dist/chunk-wkyyghn6.js +184 -0
  374. package/dist/{chunk-ebnp9s5b.js → chunk-wngtt6cw.js} +2 -2
  375. package/dist/chunk-wp35dfwp.js +15 -0
  376. package/dist/{chunk-6gr3c3w9.js → chunk-wpqynh28.js} +2 -2
  377. package/dist/{chunk-fykf8xpq.js → chunk-wtje1bzc.js} +48 -49
  378. package/dist/{chunk-fpgevc9q.js → chunk-wwjb9kpr.js} +48 -49
  379. package/dist/{chunk-78bk581m.js → chunk-wzarjbqs.js} +47 -48
  380. package/dist/{chunk-0r9ed6vz.js → chunk-wzyspdkz.js} +54 -55
  381. package/dist/chunk-x3atm9a1.js +864 -0
  382. package/dist/{chunk-rkmwx1yz.js → chunk-x52qkhng.js} +1 -1
  383. package/dist/{chunk-xcg8gj4z.js → chunk-xpecr6a1.js} +5 -7
  384. package/dist/{chunk-re56c4sb.js → chunk-xt3x0wrj.js} +1 -1
  385. package/dist/{chunk-8avpe537.js → chunk-xvwv91w4.js} +47 -48
  386. package/dist/{chunk-8c32awe2.js → chunk-xwh3q911.js} +2 -2
  387. package/dist/{chunk-26p2hgat.js → chunk-xydbqr0b.js} +47 -48
  388. package/dist/{chunk-npmd1tms.js → chunk-xzmas4y8.js} +47 -48
  389. package/dist/{chunk-vr9rckk8.js → chunk-y4dgbkb3.js} +290 -261
  390. package/dist/{chunk-2f1f034j.js → chunk-y5phkfvf.js} +3 -3
  391. package/dist/{chunk-gqvdqmgm.js → chunk-y689dg14.js} +14 -14
  392. package/dist/{chunk-0t1bd4sb.js → chunk-yevw8ttf.js} +15 -15
  393. package/dist/{chunk-9wev49x3.js → chunk-yhqcnq80.js} +50 -51
  394. package/dist/{chunk-9mh13mnf.js → chunk-yk4t7kxm.js} +1 -1
  395. package/dist/{chunk-7r2k7qes.js → chunk-ykbz8f85.js} +3 -3
  396. package/dist/{chunk-h3p151fx.js → chunk-ykcqa4mj.js} +1 -1
  397. package/dist/{chunk-d90bhmt1.js → chunk-ysj2gfxe.js} +48 -47
  398. package/dist/{chunk-0t80kx3c.js → chunk-z51fyxdw.js} +55 -56
  399. package/dist/{chunk-vmc31gbm.js → chunk-z86pzxdm.js} +48 -49
  400. package/dist/chunk-z88f5181.js +258 -0
  401. package/dist/{chunk-8epxe23k.js → chunk-zd6w7gc2.js} +5 -5
  402. package/dist/{chunk-ebrc3yf3.js → chunk-zv0txvbs.js} +4 -4
  403. package/dist/{chunk-196500e9.js → chunk-zvkkjep6.js} +12 -12
  404. package/dist/{chunk-phf40t3n.js → chunk-zx2xx5ek.js} +20 -20
  405. package/dist/{chunk-trt2sfjg.js → chunk-zzz4ny7p.js} +1 -1
  406. package/dist/cli.js +24 -24
  407. package/package.json +28 -28
  408. package/dist/chunk-0mf8c3kx.js +0 -8
  409. package/dist/chunk-5vvqe088.js +0 -946
  410. package/dist/chunk-6c5zyga7.js +0 -12
  411. package/dist/chunk-f9tjvhq5.js +0 -186
  412. package/dist/chunk-k97ze3a8.js +0 -524
  413. package/dist/chunk-pps45448.js +0 -159
  414. package/dist/chunk-qqvaem6g.js +0 -68
  415. package/dist/chunk-shvjqnv4.js +0 -53
  416. package/dist/chunk-z0b7xfwn.js +0 -47
  417. package/dist/download-ripgrep.js +0 -24837
  418. package/dist/{chunk-y3jmpqat.js → chunk-5vdpbk46.js} +3 -3
  419. package/dist/{chunk-vest0y6x.js → chunk-6h6kzvyd.js} +3 -3
  420. package/dist/{chunk-f5ma3nh5.js → chunk-7a31vc3r.js} +0 -0
  421. package/dist/{chunk-tbas522c.js → chunk-ftbf37y7.js} +1 -1
  422. package/dist/{chunk-pfgwfg55.js → chunk-xexnht94.js} +3 -3
  423. package/dist/{chunk-0fnpkgd6.js → chunk-ybebarb1.js} +10 -10
@@ -1,20 +1,24 @@
1
1
  // @bun
2
2
  import {
3
- require_dist_cjs1 as require_dist_cjs3,
4
- require_dist_cjs2 as require_dist_cjs4
5
- } from "./chunk-gfex5hb6.js";
6
- import {
7
- require_dist_cjs as require_dist_cjs2
3
+ require_dist_cjs as require_dist_cjs8
8
4
  } from "./chunk-jcfk76z5.js";
9
5
  import {
10
- require_dist_cjs as require_dist_cjs5
6
+ require_dist_cjs as require_dist_cjs9
11
7
  } from "./chunk-6f8awfs6.js";
12
8
  import {
13
- require_dist_cjs
9
+ require_dist_cjs as require_dist_cjs7
14
10
  } from "./chunk-cddv8twj.js";
15
11
  import {
16
- require_dist_cjs1 as require_dist_cjs6,
17
- require_dist_cjs2 as require_dist_cjs7
12
+ require_dist_cjs as require_dist_cjs2,
13
+ require_dist_cjs1 as require_dist_cjs5,
14
+ require_dist_cjs2 as require_dist_cjs6
15
+ } from "./chunk-b0bk6bxs.js";
16
+ import {
17
+ require_dist_cjs
18
+ } from "./chunk-btnvjcc5.js";
19
+ import {
20
+ require_dist_cjs1 as require_dist_cjs3,
21
+ require_dist_cjs2 as require_dist_cjs4
18
22
  } from "./chunk-2nayx6q1.js";
19
23
  import {
20
24
  __commonJS,
@@ -22,8 +26,8 @@ import {
22
26
  } from "./chunk-qp2qdcda.js";
23
27
 
24
28
  // node_modules/.bun/@smithy+util-middleware@4.2.13/node_modules/@smithy/util-middleware/dist-cjs/index.js
25
- var require_dist_cjs8 = __commonJS((exports) => {
26
- var types = require_dist_cjs();
29
+ var require_dist_cjs10 = __commonJS((exports) => {
30
+ var types = require_dist_cjs7();
27
31
  var getSmithyContext = (context) => context[types.SMITHY_CONTEXT_KEY] || (context[types.SMITHY_CONTEXT_KEY] = {});
28
32
  var normalizeProvider = (input) => {
29
33
  if (typeof input === "function")
@@ -37,7 +41,7 @@ var require_dist_cjs8 = __commonJS((exports) => {
37
41
 
38
42
  // node_modules/.bun/@smithy+core@3.23.14/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js
39
43
  var require_endpoints = __commonJS((exports) => {
40
- var urlParser = require_dist_cjs5();
44
+ var urlParser = require_dist_cjs9();
41
45
  var toEndpointV1 = (endpoint) => {
42
46
  if (typeof endpoint === "object") {
43
47
  if ("url" in endpoint) {
@@ -59,8 +63,8 @@ var require_endpoints = __commonJS((exports) => {
59
63
 
60
64
  // node_modules/.bun/@smithy+core@3.23.14/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js
61
65
  var require_schema = __commonJS((exports) => {
62
- var protocolHttp = require_dist_cjs2();
63
- var utilMiddleware = require_dist_cjs8();
66
+ var protocolHttp = require_dist_cjs8();
67
+ var utilMiddleware = require_dist_cjs10();
64
68
  var endpoints = require_endpoints();
65
69
  var deref = (schemaRef) => {
66
70
  if (typeof schemaRef === "function") {
@@ -721,545 +725,720 @@ var require_schema = __commonJS((exports) => {
721
725
  exports.translateTraits = translateTraits;
722
726
  });
723
727
 
724
- // node_modules/.bun/@smithy+util-base64@4.3.2/node_modules/@smithy/util-base64/dist-cjs/fromBase64.js
725
- var require_fromBase64 = __commonJS((exports) => {
726
- Object.defineProperty(exports, "__esModule", { value: true });
727
- exports.fromBase64 = undefined;
728
- var util_buffer_from_1 = require_dist_cjs6();
729
- var BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/;
730
- var fromBase64 = (input) => {
731
- if (input.length * 3 % 4 !== 0) {
732
- throw new TypeError(`Incorrect padding on base64 string.`);
733
- }
734
- if (!BASE64_REGEX.exec(input)) {
735
- throw new TypeError(`Invalid base64 string.`);
728
+ // node_modules/.bun/@smithy+querystring-builder@4.2.13/node_modules/@smithy/querystring-builder/dist-cjs/index.js
729
+ var require_dist_cjs11 = __commonJS((exports) => {
730
+ var utilUriEscape = require_dist_cjs();
731
+ function buildQueryString(query) {
732
+ const parts = [];
733
+ for (let key of Object.keys(query).sort()) {
734
+ const value = query[key];
735
+ key = utilUriEscape.escapeUri(key);
736
+ if (Array.isArray(value)) {
737
+ for (let i = 0, iLen = value.length;i < iLen; i++) {
738
+ parts.push(`${key}=${utilUriEscape.escapeUri(value[i])}`);
739
+ }
740
+ } else {
741
+ let qsEntry = key;
742
+ if (value || typeof value === "string") {
743
+ qsEntry += `=${utilUriEscape.escapeUri(value)}`;
744
+ }
745
+ parts.push(qsEntry);
746
+ }
736
747
  }
737
- const buffer = (0, util_buffer_from_1.fromString)(input, "base64");
738
- return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
739
- };
740
- exports.fromBase64 = fromBase64;
748
+ return parts.join("&");
749
+ }
750
+ exports.buildQueryString = buildQueryString;
741
751
  });
742
752
 
743
- // node_modules/.bun/@smithy+util-base64@4.3.2/node_modules/@smithy/util-base64/dist-cjs/toBase64.js
744
- var require_toBase64 = __commonJS((exports) => {
745
- Object.defineProperty(exports, "__esModule", { value: true });
746
- exports.toBase64 = undefined;
747
- var util_buffer_from_1 = require_dist_cjs6();
748
- var util_utf8_1 = require_dist_cjs7();
749
- var toBase64 = (_input) => {
750
- let input;
751
- if (typeof _input === "string") {
752
- input = (0, util_utf8_1.fromUtf8)(_input);
753
- } else {
754
- input = _input;
753
+ // node_modules/.bun/@smithy+node-http-handler@4.5.2/node_modules/@smithy/node-http-handler/dist-cjs/index.js
754
+ var require_dist_cjs12 = __commonJS((exports) => {
755
+ var protocolHttp = require_dist_cjs8();
756
+ var querystringBuilder = require_dist_cjs11();
757
+ var node_https = __require("https");
758
+ var node_stream = __require("stream");
759
+ var http2 = __require("http2");
760
+ function buildAbortError(abortSignal) {
761
+ const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal ? abortSignal.reason : undefined;
762
+ if (reason) {
763
+ if (reason instanceof Error) {
764
+ const abortError3 = new Error("Request aborted");
765
+ abortError3.name = "AbortError";
766
+ abortError3.cause = reason;
767
+ return abortError3;
768
+ }
769
+ const abortError2 = new Error(String(reason));
770
+ abortError2.name = "AbortError";
771
+ return abortError2;
755
772
  }
756
- if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") {
757
- throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");
773
+ const abortError = new Error("Request aborted");
774
+ abortError.name = "AbortError";
775
+ return abortError;
776
+ }
777
+ var NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"];
778
+ var getTransformedHeaders = (headers) => {
779
+ const transformedHeaders = {};
780
+ for (const name of Object.keys(headers)) {
781
+ const headerValues = headers[name];
782
+ transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues;
783
+ }
784
+ return transformedHeaders;
785
+ };
786
+ var timing = {
787
+ setTimeout: (cb, ms) => setTimeout(cb, ms),
788
+ clearTimeout: (timeoutId) => clearTimeout(timeoutId)
789
+ };
790
+ var DEFER_EVENT_LISTENER_TIME$2 = 1000;
791
+ var setConnectionTimeout = (request, reject, timeoutInMs = 0) => {
792
+ if (!timeoutInMs) {
793
+ return -1;
794
+ }
795
+ const registerTimeout = (offset) => {
796
+ const timeoutId = timing.setTimeout(() => {
797
+ request.destroy();
798
+ reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${timeoutInMs} ms.`), {
799
+ name: "TimeoutError"
800
+ }));
801
+ }, timeoutInMs - offset);
802
+ const doWithSocket = (socket) => {
803
+ if (socket?.connecting) {
804
+ socket.on("connect", () => {
805
+ timing.clearTimeout(timeoutId);
806
+ });
807
+ } else {
808
+ timing.clearTimeout(timeoutId);
809
+ }
810
+ };
811
+ if (request.socket) {
812
+ doWithSocket(request.socket);
813
+ } else {
814
+ request.on("socket", doWithSocket);
815
+ }
816
+ };
817
+ if (timeoutInMs < 2000) {
818
+ registerTimeout(0);
819
+ return 0;
758
820
  }
759
- return (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64");
821
+ return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME$2), DEFER_EVENT_LISTENER_TIME$2);
760
822
  };
761
- exports.toBase64 = toBase64;
762
- });
763
-
764
- // node_modules/.bun/@smithy+util-base64@4.3.2/node_modules/@smithy/util-base64/dist-cjs/index.js
765
- var require_dist_cjs9 = __commonJS((exports) => {
766
- var fromBase64 = require_fromBase64();
767
- var toBase64 = require_toBase64();
768
- Object.prototype.hasOwnProperty.call(fromBase64, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
769
- enumerable: true,
770
- value: fromBase64["__proto__"]
771
- });
772
- Object.keys(fromBase64).forEach(function(k) {
773
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
774
- exports[k] = fromBase64[k];
775
- });
776
- Object.prototype.hasOwnProperty.call(toBase64, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
777
- enumerable: true,
778
- value: toBase64["__proto__"]
779
- });
780
- Object.keys(toBase64).forEach(function(k) {
781
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
782
- exports[k] = toBase64[k];
783
- });
784
- });
785
-
786
- // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.js
787
- var require_ChecksumStream = __commonJS((exports) => {
788
- Object.defineProperty(exports, "__esModule", { value: true });
789
- exports.ChecksumStream = undefined;
790
- var util_base64_1 = require_dist_cjs9();
791
- var stream_1 = __require("stream");
792
-
793
- class ChecksumStream extends stream_1.Duplex {
794
- expectedChecksum;
795
- checksumSourceLocation;
796
- checksum;
797
- source;
798
- base64Encoder;
799
- pendingCallback = null;
800
- constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) {
801
- super();
802
- if (typeof source.pipe === "function") {
803
- this.source = source;
823
+ var setRequestTimeout = (req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger) => {
824
+ if (timeoutInMs) {
825
+ return timing.setTimeout(() => {
826
+ let msg = `@smithy/node-http-handler - [${throwOnRequestTimeout ? "ERROR" : "WARN"}] a request has exceeded the configured ${timeoutInMs} ms requestTimeout.`;
827
+ if (throwOnRequestTimeout) {
828
+ const error = Object.assign(new Error(msg), {
829
+ name: "TimeoutError",
830
+ code: "ETIMEDOUT"
831
+ });
832
+ req.destroy(error);
833
+ reject(error);
834
+ } else {
835
+ msg += ` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`;
836
+ logger?.warn?.(msg);
837
+ }
838
+ }, timeoutInMs);
839
+ }
840
+ return -1;
841
+ };
842
+ var DEFER_EVENT_LISTENER_TIME$1 = 3000;
843
+ var setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => {
844
+ if (keepAlive !== true) {
845
+ return -1;
846
+ }
847
+ const registerListener = () => {
848
+ if (request.socket) {
849
+ request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);
804
850
  } else {
805
- throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`);
851
+ request.on("socket", (socket) => {
852
+ socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);
853
+ });
806
854
  }
807
- this.base64Encoder = base64Encoder ?? util_base64_1.toBase64;
808
- this.expectedChecksum = expectedChecksum;
809
- this.checksum = checksum;
810
- this.checksumSourceLocation = checksumSourceLocation;
811
- this.source.pipe(this);
855
+ };
856
+ if (deferTimeMs === 0) {
857
+ registerListener();
858
+ return 0;
812
859
  }
813
- _read(size) {
814
- if (this.pendingCallback) {
815
- const callback = this.pendingCallback;
816
- this.pendingCallback = null;
817
- callback();
860
+ return timing.setTimeout(registerListener, deferTimeMs);
861
+ };
862
+ var DEFER_EVENT_LISTENER_TIME = 3000;
863
+ var setSocketTimeout = (request, reject, timeoutInMs = 0) => {
864
+ const registerTimeout = (offset) => {
865
+ const timeout = timeoutInMs - offset;
866
+ const onTimeout = () => {
867
+ request.destroy();
868
+ reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (configured by client requestHandler).`), { name: "TimeoutError" }));
869
+ };
870
+ if (request.socket) {
871
+ request.socket.setTimeout(timeout, onTimeout);
872
+ request.on("close", () => request.socket?.removeListener("timeout", onTimeout));
873
+ } else {
874
+ request.setTimeout(timeout, onTimeout);
818
875
  }
876
+ };
877
+ if (0 < timeoutInMs && timeoutInMs < 6000) {
878
+ registerTimeout(0);
879
+ return 0;
819
880
  }
820
- _write(chunk, encoding, callback) {
821
- try {
822
- this.checksum.update(chunk);
823
- const canPushMore = this.push(chunk);
824
- if (!canPushMore) {
825
- this.pendingCallback = callback;
826
- return;
827
- }
828
- } catch (e) {
829
- return callback(e);
830
- }
831
- return callback();
881
+ return timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME);
882
+ };
883
+ var MIN_WAIT_TIME = 6000;
884
+ async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME, externalAgent = false) {
885
+ const headers = request.headers ?? {};
886
+ const expect = headers.Expect || headers.expect;
887
+ let timeoutId = -1;
888
+ let sendBody = true;
889
+ if (!externalAgent && expect === "100-continue") {
890
+ sendBody = await Promise.race([
891
+ new Promise((resolve) => {
892
+ timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));
893
+ }),
894
+ new Promise((resolve) => {
895
+ httpRequest.on("continue", () => {
896
+ timing.clearTimeout(timeoutId);
897
+ resolve(true);
898
+ });
899
+ httpRequest.on("response", () => {
900
+ timing.clearTimeout(timeoutId);
901
+ resolve(false);
902
+ });
903
+ httpRequest.on("error", () => {
904
+ timing.clearTimeout(timeoutId);
905
+ resolve(false);
906
+ });
907
+ })
908
+ ]);
832
909
  }
833
- async _final(callback) {
834
- try {
835
- const digest = await this.checksum.digest();
836
- const received = this.base64Encoder(digest);
837
- if (this.expectedChecksum !== received) {
838
- return callback(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}"` + ` in response header "${this.checksumSourceLocation}".`));
839
- }
840
- } catch (e) {
841
- return callback(e);
842
- }
843
- this.push(null);
844
- return callback();
910
+ if (sendBody) {
911
+ writeBody(httpRequest, request.body);
845
912
  }
846
913
  }
847
- exports.ChecksumStream = ChecksumStream;
848
- });
849
-
850
- // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/stream-type-check.js
851
- var require_stream_type_check = __commonJS((exports) => {
852
- Object.defineProperty(exports, "__esModule", { value: true });
853
- exports.isBlob = exports.isReadableStream = undefined;
854
- var isReadableStream = (stream) => typeof ReadableStream === "function" && (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream);
855
- exports.isReadableStream = isReadableStream;
856
- var isBlob = (blob) => {
857
- return typeof Blob === "function" && (blob?.constructor?.name === Blob.name || blob instanceof Blob);
858
- };
859
- exports.isBlob = isBlob;
860
- });
861
-
862
- // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.browser.js
863
- var require_ChecksumStream_browser = __commonJS((exports) => {
864
- Object.defineProperty(exports, "__esModule", { value: true });
865
- exports.ChecksumStream = undefined;
866
- var ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function() {};
867
-
868
- class ChecksumStream extends ReadableStreamRef {
869
- }
870
- exports.ChecksumStream = ChecksumStream;
871
- });
872
-
873
- // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.browser.js
874
- var require_createChecksumStream_browser = __commonJS((exports) => {
875
- Object.defineProperty(exports, "__esModule", { value: true });
876
- exports.createChecksumStream = undefined;
877
- var util_base64_1 = require_dist_cjs9();
878
- var stream_type_check_1 = require_stream_type_check();
879
- var ChecksumStream_browser_1 = require_ChecksumStream_browser();
880
- var createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) => {
881
- if (!(0, stream_type_check_1.isReadableStream)(source)) {
882
- throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`);
883
- }
884
- const encoder = base64Encoder ?? util_base64_1.toBase64;
885
- if (typeof TransformStream !== "function") {
886
- throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");
914
+ function writeBody(httpRequest, body) {
915
+ if (body instanceof node_stream.Readable) {
916
+ body.pipe(httpRequest);
917
+ return;
887
918
  }
888
- const transform = new TransformStream({
889
- start() {},
890
- async transform(chunk, controller) {
891
- checksum.update(chunk);
892
- controller.enqueue(chunk);
893
- },
894
- async flush(controller) {
895
- const digest = await checksum.digest();
896
- const received = encoder(digest);
897
- if (expectedChecksum !== received) {
898
- const error = new Error(`Checksum mismatch: expected "${expectedChecksum}" but received "${received}"` + ` in response header "${checksumSourceLocation}".`);
899
- controller.error(error);
919
+ if (body) {
920
+ const isBuffer = Buffer.isBuffer(body);
921
+ const isString = typeof body === "string";
922
+ if (isBuffer || isString) {
923
+ if (isBuffer && body.byteLength === 0) {
924
+ httpRequest.end();
900
925
  } else {
901
- controller.terminate();
926
+ httpRequest.end(body);
902
927
  }
928
+ return;
903
929
  }
904
- });
905
- source.pipeThrough(transform);
906
- const readable = transform.readable;
907
- Object.setPrototypeOf(readable, ChecksumStream_browser_1.ChecksumStream.prototype);
908
- return readable;
909
- };
910
- exports.createChecksumStream = createChecksumStream;
911
- });
912
-
913
- // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.js
914
- var require_createChecksumStream = __commonJS((exports) => {
915
- Object.defineProperty(exports, "__esModule", { value: true });
916
- exports.createChecksumStream = createChecksumStream;
917
- var stream_type_check_1 = require_stream_type_check();
918
- var ChecksumStream_1 = require_ChecksumStream();
919
- var createChecksumStream_browser_1 = require_createChecksumStream_browser();
920
- function createChecksumStream(init) {
921
- if (typeof ReadableStream === "function" && (0, stream_type_check_1.isReadableStream)(init.source)) {
922
- return (0, createChecksumStream_browser_1.createChecksumStream)(init);
930
+ const uint8 = body;
931
+ if (typeof uint8 === "object" && uint8.buffer && typeof uint8.byteOffset === "number" && typeof uint8.byteLength === "number") {
932
+ httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength));
933
+ return;
934
+ }
935
+ httpRequest.end(Buffer.from(body));
936
+ return;
923
937
  }
924
- return new ChecksumStream_1.ChecksumStream(init);
938
+ httpRequest.end();
925
939
  }
926
- });
940
+ var DEFAULT_REQUEST_TIMEOUT = 0;
941
+ var hAgent = undefined;
942
+ var hRequest = undefined;
927
943
 
928
- // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/ByteArrayCollector.js
929
- var require_ByteArrayCollector = __commonJS((exports) => {
930
- Object.defineProperty(exports, "__esModule", { value: true });
931
- exports.ByteArrayCollector = undefined;
932
-
933
- class ByteArrayCollector {
934
- allocByteArray;
935
- byteLength = 0;
936
- byteArrays = [];
937
- constructor(allocByteArray) {
938
- this.allocByteArray = allocByteArray;
939
- }
940
- push(byteArray) {
941
- this.byteArrays.push(byteArray);
942
- this.byteLength += byteArray.byteLength;
943
- }
944
- flush() {
945
- if (this.byteArrays.length === 1) {
946
- const bytes = this.byteArrays[0];
947
- this.reset();
948
- return bytes;
944
+ class NodeHttpHandler {
945
+ config;
946
+ configProvider;
947
+ socketWarningTimestamp = 0;
948
+ externalAgent = false;
949
+ metadata = { handlerProtocol: "http/1.1" };
950
+ static create(instanceOrOptions) {
951
+ if (typeof instanceOrOptions?.handle === "function") {
952
+ return instanceOrOptions;
949
953
  }
950
- const aggregation = this.allocByteArray(this.byteLength);
951
- let cursor = 0;
952
- for (let i = 0;i < this.byteArrays.length; ++i) {
953
- const bytes = this.byteArrays[i];
954
- aggregation.set(bytes, cursor);
955
- cursor += bytes.byteLength;
954
+ return new NodeHttpHandler(instanceOrOptions);
955
+ }
956
+ static checkSocketUsage(agent, socketWarningTimestamp, logger = console) {
957
+ const { sockets, requests, maxSockets } = agent;
958
+ if (typeof maxSockets !== "number" || maxSockets === Infinity) {
959
+ return socketWarningTimestamp;
960
+ }
961
+ const interval = 15000;
962
+ if (Date.now() - interval < socketWarningTimestamp) {
963
+ return socketWarningTimestamp;
964
+ }
965
+ if (sockets && requests) {
966
+ for (const origin in sockets) {
967
+ const socketsInUse = sockets[origin]?.length ?? 0;
968
+ const requestsEnqueued = requests[origin]?.length ?? 0;
969
+ if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {
970
+ logger?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.
971
+ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
972
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`);
973
+ return Date.now();
974
+ }
975
+ }
956
976
  }
957
- this.reset();
958
- return aggregation;
977
+ return socketWarningTimestamp;
959
978
  }
960
- reset() {
961
- this.byteArrays = [];
962
- this.byteLength = 0;
979
+ constructor(options) {
980
+ this.configProvider = new Promise((resolve, reject) => {
981
+ if (typeof options === "function") {
982
+ options().then((_options) => {
983
+ resolve(this.resolveDefaultConfig(_options));
984
+ }).catch(reject);
985
+ } else {
986
+ resolve(this.resolveDefaultConfig(options));
987
+ }
988
+ });
963
989
  }
964
- }
965
- exports.ByteArrayCollector = ByteArrayCollector;
966
- });
967
-
968
- // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/createBufferedReadableStream.js
969
- var require_createBufferedReadableStream = __commonJS((exports) => {
970
- Object.defineProperty(exports, "__esModule", { value: true });
971
- exports.createBufferedReadable = undefined;
972
- exports.createBufferedReadableStream = createBufferedReadableStream;
973
- exports.merge = merge;
974
- exports.flush = flush;
975
- exports.sizeOf = sizeOf;
976
- exports.modeOf = modeOf;
977
- var ByteArrayCollector_1 = require_ByteArrayCollector();
978
- function createBufferedReadableStream(upstream, size, logger) {
979
- const reader = upstream.getReader();
980
- let streamBufferingLoggedWarning = false;
981
- let bytesSeen = 0;
982
- const buffers = ["", new ByteArrayCollector_1.ByteArrayCollector((size2) => new Uint8Array(size2))];
983
- let mode = -1;
984
- const pull = async (controller) => {
985
- const { value, done } = await reader.read();
986
- const chunk = value;
987
- if (done) {
988
- if (mode !== -1) {
989
- const remainder = flush(buffers, mode);
990
- if (sizeOf(remainder) > 0) {
991
- controller.enqueue(remainder);
992
- }
993
- }
994
- controller.close();
995
- } else {
996
- const chunkMode = modeOf(chunk, false);
997
- if (mode !== chunkMode) {
998
- if (mode >= 0) {
999
- controller.enqueue(flush(buffers, mode));
1000
- }
1001
- mode = chunkMode;
1002
- }
1003
- if (mode === -1) {
1004
- controller.enqueue(chunk);
990
+ destroy() {
991
+ this.config?.httpAgent?.destroy();
992
+ this.config?.httpsAgent?.destroy();
993
+ }
994
+ async handle(request, { abortSignal, requestTimeout } = {}) {
995
+ if (!this.config) {
996
+ this.config = await this.configProvider;
997
+ }
998
+ const config = this.config;
999
+ const isSSL = request.protocol === "https:";
1000
+ if (!isSSL && !this.config.httpAgent) {
1001
+ this.config.httpAgent = await this.config.httpAgentProvider();
1002
+ }
1003
+ return new Promise((_resolve, _reject) => {
1004
+ let writeRequestBodyPromise = undefined;
1005
+ const timeouts = [];
1006
+ const resolve = async (arg) => {
1007
+ await writeRequestBodyPromise;
1008
+ timeouts.forEach(timing.clearTimeout);
1009
+ _resolve(arg);
1010
+ };
1011
+ const reject = async (arg) => {
1012
+ await writeRequestBodyPromise;
1013
+ timeouts.forEach(timing.clearTimeout);
1014
+ _reject(arg);
1015
+ };
1016
+ if (abortSignal?.aborted) {
1017
+ const abortError = buildAbortError(abortSignal);
1018
+ reject(abortError);
1005
1019
  return;
1006
1020
  }
1007
- const chunkSize = sizeOf(chunk);
1008
- bytesSeen += chunkSize;
1009
- const bufferSize = sizeOf(buffers[mode]);
1010
- if (chunkSize >= size && bufferSize === 0) {
1011
- controller.enqueue(chunk);
1021
+ const headers = request.headers ?? {};
1022
+ const expectContinue = (headers.Expect ?? headers.expect) === "100-continue";
1023
+ let agent = isSSL ? config.httpsAgent : config.httpAgent;
1024
+ if (expectContinue && !this.externalAgent) {
1025
+ agent = new (isSSL ? node_https.Agent : hAgent)({
1026
+ keepAlive: false,
1027
+ maxSockets: Infinity
1028
+ });
1029
+ }
1030
+ timeouts.push(timing.setTimeout(() => {
1031
+ this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, config.logger);
1032
+ }, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2000) + (config.connectionTimeout ?? 1000)));
1033
+ const queryString = querystringBuilder.buildQueryString(request.query || {});
1034
+ let auth = undefined;
1035
+ if (request.username != null || request.password != null) {
1036
+ const username = request.username ?? "";
1037
+ const password = request.password ?? "";
1038
+ auth = `${username}:${password}`;
1039
+ }
1040
+ let path = request.path;
1041
+ if (queryString) {
1042
+ path += `?${queryString}`;
1043
+ }
1044
+ if (request.fragment) {
1045
+ path += `#${request.fragment}`;
1046
+ }
1047
+ let hostname = request.hostname ?? "";
1048
+ if (hostname[0] === "[" && hostname.endsWith("]")) {
1049
+ hostname = request.hostname.slice(1, -1);
1012
1050
  } else {
1013
- const newSize = merge(buffers, mode, chunk);
1014
- if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {
1015
- streamBufferingLoggedWarning = true;
1016
- logger?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);
1051
+ hostname = request.hostname;
1052
+ }
1053
+ const nodeHttpsOptions = {
1054
+ headers: request.headers,
1055
+ host: hostname,
1056
+ method: request.method,
1057
+ path,
1058
+ port: request.port,
1059
+ agent,
1060
+ auth
1061
+ };
1062
+ const requestFunc = isSSL ? node_https.request : hRequest;
1063
+ const req = requestFunc(nodeHttpsOptions, (res) => {
1064
+ const httpResponse = new protocolHttp.HttpResponse({
1065
+ statusCode: res.statusCode || -1,
1066
+ reason: res.statusMessage,
1067
+ headers: getTransformedHeaders(res.headers),
1068
+ body: res
1069
+ });
1070
+ resolve({ response: httpResponse });
1071
+ });
1072
+ req.on("error", (err) => {
1073
+ if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) {
1074
+ reject(Object.assign(err, { name: "TimeoutError" }));
1075
+ } else {
1076
+ reject(err);
1017
1077
  }
1018
- if (newSize >= size) {
1019
- controller.enqueue(flush(buffers, mode));
1078
+ });
1079
+ if (abortSignal) {
1080
+ const onAbort = () => {
1081
+ req.destroy();
1082
+ const abortError = buildAbortError(abortSignal);
1083
+ reject(abortError);
1084
+ };
1085
+ if (typeof abortSignal.addEventListener === "function") {
1086
+ const signal = abortSignal;
1087
+ signal.addEventListener("abort", onAbort, { once: true });
1088
+ req.once("close", () => signal.removeEventListener("abort", onAbort));
1020
1089
  } else {
1021
- await pull(controller);
1090
+ abortSignal.onabort = onAbort;
1022
1091
  }
1023
1092
  }
1024
- }
1025
- };
1026
- return new ReadableStream({
1027
- pull
1028
- });
1029
- }
1030
- exports.createBufferedReadable = createBufferedReadableStream;
1031
- function merge(buffers, mode, chunk) {
1032
- switch (mode) {
1033
- case 0:
1034
- buffers[0] += chunk;
1035
- return sizeOf(buffers[0]);
1036
- case 1:
1037
- case 2:
1038
- buffers[mode].push(chunk);
1039
- return sizeOf(buffers[mode]);
1093
+ const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout;
1094
+ timeouts.push(setConnectionTimeout(req, reject, config.connectionTimeout));
1095
+ timeouts.push(setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, config.logger ?? console));
1096
+ timeouts.push(setSocketTimeout(req, reject, config.socketTimeout));
1097
+ const httpAgent = nodeHttpsOptions.agent;
1098
+ if (typeof httpAgent === "object" && "keepAlive" in httpAgent) {
1099
+ timeouts.push(setSocketKeepAlive(req, {
1100
+ keepAlive: httpAgent.keepAlive,
1101
+ keepAliveMsecs: httpAgent.keepAliveMsecs
1102
+ }));
1103
+ }
1104
+ writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout, this.externalAgent).catch((e) => {
1105
+ timeouts.forEach(timing.clearTimeout);
1106
+ return _reject(e);
1107
+ });
1108
+ });
1040
1109
  }
1041
- }
1042
- function flush(buffers, mode) {
1043
- switch (mode) {
1044
- case 0:
1045
- const s = buffers[0];
1046
- buffers[0] = "";
1047
- return s;
1048
- case 1:
1049
- case 2:
1050
- return buffers[mode].flush();
1110
+ updateHttpClientConfig(key, value) {
1111
+ this.config = undefined;
1112
+ this.configProvider = this.configProvider.then((config) => {
1113
+ return {
1114
+ ...config,
1115
+ [key]: value
1116
+ };
1117
+ });
1118
+ }
1119
+ httpHandlerConfigs() {
1120
+ return this.config ?? {};
1121
+ }
1122
+ resolveDefaultConfig(options) {
1123
+ const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, logger } = options || {};
1124
+ const keepAlive = true;
1125
+ const maxSockets = 50;
1126
+ return {
1127
+ connectionTimeout,
1128
+ requestTimeout,
1129
+ socketTimeout,
1130
+ socketAcquisitionWarningTimeout,
1131
+ throwOnRequestTimeout,
1132
+ httpAgentProvider: async () => {
1133
+ const { Agent, request } = await import("http");
1134
+ hRequest = request;
1135
+ hAgent = Agent;
1136
+ if (httpAgent instanceof hAgent || typeof httpAgent?.destroy === "function") {
1137
+ this.externalAgent = true;
1138
+ return httpAgent;
1139
+ }
1140
+ return new hAgent({ keepAlive, maxSockets, ...httpAgent });
1141
+ },
1142
+ httpsAgent: (() => {
1143
+ if (httpsAgent instanceof node_https.Agent || typeof httpsAgent?.destroy === "function") {
1144
+ this.externalAgent = true;
1145
+ return httpsAgent;
1146
+ }
1147
+ return new node_https.Agent({ keepAlive, maxSockets, ...httpsAgent });
1148
+ })(),
1149
+ logger
1150
+ };
1051
1151
  }
1052
- throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`);
1053
- }
1054
- function sizeOf(chunk) {
1055
- return chunk?.byteLength ?? chunk?.length ?? 0;
1056
1152
  }
1057
- function modeOf(chunk, allowBuffer = true) {
1058
- if (allowBuffer && typeof Buffer !== "undefined" && chunk instanceof Buffer) {
1059
- return 2;
1153
+
1154
+ class NodeHttp2ConnectionPool {
1155
+ sessions = [];
1156
+ constructor(sessions) {
1157
+ this.sessions = sessions ?? [];
1060
1158
  }
1061
- if (chunk instanceof Uint8Array) {
1062
- return 1;
1159
+ poll() {
1160
+ if (this.sessions.length > 0) {
1161
+ return this.sessions.shift();
1162
+ }
1063
1163
  }
1064
- if (typeof chunk === "string") {
1065
- return 0;
1164
+ offerLast(session) {
1165
+ this.sessions.push(session);
1166
+ }
1167
+ contains(session) {
1168
+ return this.sessions.includes(session);
1169
+ }
1170
+ remove(session) {
1171
+ this.sessions = this.sessions.filter((s) => s !== session);
1172
+ }
1173
+ [Symbol.iterator]() {
1174
+ return this.sessions[Symbol.iterator]();
1175
+ }
1176
+ destroy(connection) {
1177
+ for (const session of this.sessions) {
1178
+ if (session === connection) {
1179
+ if (!session.destroyed) {
1180
+ session.destroy();
1181
+ }
1182
+ }
1183
+ }
1066
1184
  }
1067
- return -1;
1068
1185
  }
1069
- });
1070
1186
 
1071
- // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/createBufferedReadable.js
1072
- var require_createBufferedReadable = __commonJS((exports) => {
1073
- Object.defineProperty(exports, "__esModule", { value: true });
1074
- exports.createBufferedReadable = createBufferedReadable;
1075
- var node_stream_1 = __require("stream");
1076
- var ByteArrayCollector_1 = require_ByteArrayCollector();
1077
- var createBufferedReadableStream_1 = require_createBufferedReadableStream();
1078
- var stream_type_check_1 = require_stream_type_check();
1079
- function createBufferedReadable(upstream, size, logger) {
1080
- if ((0, stream_type_check_1.isReadableStream)(upstream)) {
1081
- return (0, createBufferedReadableStream_1.createBufferedReadableStream)(upstream, size, logger);
1187
+ class NodeHttp2ConnectionManager {
1188
+ constructor(config) {
1189
+ this.config = config;
1190
+ if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {
1191
+ throw new RangeError("maxConcurrency must be greater than zero.");
1192
+ }
1082
1193
  }
1083
- const downstream = new node_stream_1.Readable({ read() {} });
1084
- let streamBufferingLoggedWarning = false;
1085
- let bytesSeen = 0;
1086
- const buffers = [
1087
- "",
1088
- new ByteArrayCollector_1.ByteArrayCollector((size2) => new Uint8Array(size2)),
1089
- new ByteArrayCollector_1.ByteArrayCollector((size2) => Buffer.from(new Uint8Array(size2)))
1090
- ];
1091
- let mode = -1;
1092
- upstream.on("data", (chunk) => {
1093
- const chunkMode = (0, createBufferedReadableStream_1.modeOf)(chunk, true);
1094
- if (mode !== chunkMode) {
1095
- if (mode >= 0) {
1096
- downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode));
1097
- }
1098
- mode = chunkMode;
1194
+ config;
1195
+ sessionCache = new Map;
1196
+ lease(requestContext, connectionConfiguration) {
1197
+ const url = this.getUrlString(requestContext);
1198
+ const existingPool = this.sessionCache.get(url);
1199
+ if (existingPool) {
1200
+ const existingSession = existingPool.poll();
1201
+ if (existingSession && !this.config.disableConcurrency) {
1202
+ return existingSession;
1203
+ }
1204
+ }
1205
+ const session = http2.connect(url);
1206
+ if (this.config.maxConcurrency) {
1207
+ session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => {
1208
+ if (err) {
1209
+ throw new Error("Fail to set maxConcurrentStreams to " + this.config.maxConcurrency + "when creating new session for " + requestContext.destination.toString());
1210
+ }
1211
+ });
1099
1212
  }
1100
- if (mode === -1) {
1101
- downstream.push(chunk);
1213
+ session.unref();
1214
+ const destroySessionCb = () => {
1215
+ session.destroy();
1216
+ this.deleteSession(url, session);
1217
+ };
1218
+ session.on("goaway", destroySessionCb);
1219
+ session.on("error", destroySessionCb);
1220
+ session.on("frameError", destroySessionCb);
1221
+ session.on("close", () => this.deleteSession(url, session));
1222
+ if (connectionConfiguration.requestTimeout) {
1223
+ session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb);
1224
+ }
1225
+ const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool;
1226
+ connectionPool.offerLast(session);
1227
+ this.sessionCache.set(url, connectionPool);
1228
+ return session;
1229
+ }
1230
+ deleteSession(authority, session) {
1231
+ const existingConnectionPool = this.sessionCache.get(authority);
1232
+ if (!existingConnectionPool) {
1102
1233
  return;
1103
1234
  }
1104
- const chunkSize = (0, createBufferedReadableStream_1.sizeOf)(chunk);
1105
- bytesSeen += chunkSize;
1106
- const bufferSize = (0, createBufferedReadableStream_1.sizeOf)(buffers[mode]);
1107
- if (chunkSize >= size && bufferSize === 0) {
1108
- downstream.push(chunk);
1109
- } else {
1110
- const newSize = (0, createBufferedReadableStream_1.merge)(buffers, mode, chunk);
1111
- if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {
1112
- streamBufferingLoggedWarning = true;
1113
- logger?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);
1114
- }
1115
- if (newSize >= size) {
1116
- downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode));
1117
- }
1235
+ if (!existingConnectionPool.contains(session)) {
1236
+ return;
1118
1237
  }
1119
- });
1120
- upstream.on("end", () => {
1121
- if (mode !== -1) {
1122
- const remainder = (0, createBufferedReadableStream_1.flush)(buffers, mode);
1123
- if ((0, createBufferedReadableStream_1.sizeOf)(remainder) > 0) {
1124
- downstream.push(remainder);
1238
+ existingConnectionPool.remove(session);
1239
+ this.sessionCache.set(authority, existingConnectionPool);
1240
+ }
1241
+ release(requestContext, session) {
1242
+ const cacheKey = this.getUrlString(requestContext);
1243
+ this.sessionCache.get(cacheKey)?.offerLast(session);
1244
+ }
1245
+ destroy() {
1246
+ for (const [key, connectionPool] of this.sessionCache) {
1247
+ for (const session of connectionPool) {
1248
+ if (!session.destroyed) {
1249
+ session.destroy();
1250
+ }
1251
+ connectionPool.remove(session);
1125
1252
  }
1253
+ this.sessionCache.delete(key);
1126
1254
  }
1127
- downstream.push(null);
1128
- });
1129
- return downstream;
1255
+ }
1256
+ setMaxConcurrentStreams(maxConcurrentStreams) {
1257
+ if (maxConcurrentStreams && maxConcurrentStreams <= 0) {
1258
+ throw new RangeError("maxConcurrentStreams must be greater than zero.");
1259
+ }
1260
+ this.config.maxConcurrency = maxConcurrentStreams;
1261
+ }
1262
+ setDisableConcurrentStreams(disableConcurrentStreams) {
1263
+ this.config.disableConcurrency = disableConcurrentStreams;
1264
+ }
1265
+ getUrlString(request) {
1266
+ return request.destination.toString();
1267
+ }
1130
1268
  }
1131
- });
1132
1269
 
1133
- // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.browser.js
1134
- var require_getAwsChunkedEncodingStream_browser = __commonJS((exports) => {
1135
- Object.defineProperty(exports, "__esModule", { value: true });
1136
- exports.getAwsChunkedEncodingStream = undefined;
1137
- var getAwsChunkedEncodingStream = (readableStream, options) => {
1138
- const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;
1139
- const checksumRequired = base64Encoder !== undefined && bodyLengthChecker !== undefined && checksumAlgorithmFn !== undefined && checksumLocationName !== undefined && streamHasher !== undefined;
1140
- const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined;
1141
- const reader = readableStream.getReader();
1142
- return new ReadableStream({
1143
- async pull(controller) {
1144
- const { value, done } = await reader.read();
1145
- if (done) {
1146
- controller.enqueue(`0\r
1147
- `);
1148
- if (checksumRequired) {
1149
- const checksum = base64Encoder(await digest);
1150
- controller.enqueue(`${checksumLocationName}:${checksum}\r
1151
- `);
1152
- controller.enqueue(`\r
1153
- `);
1154
- }
1155
- controller.close();
1270
+ class NodeHttp2Handler {
1271
+ config;
1272
+ configProvider;
1273
+ metadata = { handlerProtocol: "h2" };
1274
+ connectionManager = new NodeHttp2ConnectionManager({});
1275
+ static create(instanceOrOptions) {
1276
+ if (typeof instanceOrOptions?.handle === "function") {
1277
+ return instanceOrOptions;
1278
+ }
1279
+ return new NodeHttp2Handler(instanceOrOptions);
1280
+ }
1281
+ constructor(options) {
1282
+ this.configProvider = new Promise((resolve, reject) => {
1283
+ if (typeof options === "function") {
1284
+ options().then((opts) => {
1285
+ resolve(opts || {});
1286
+ }).catch(reject);
1156
1287
  } else {
1157
- controller.enqueue(`${(bodyLengthChecker(value) || 0).toString(16)}\r
1158
- ${value}\r
1159
- `);
1288
+ resolve(options || {});
1160
1289
  }
1161
- }
1162
- });
1163
- };
1164
- exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream;
1165
- });
1166
-
1167
- // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js
1168
- var require_getAwsChunkedEncodingStream = __commonJS((exports) => {
1169
- Object.defineProperty(exports, "__esModule", { value: true });
1170
- exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream;
1171
- var node_stream_1 = __require("stream");
1172
- var getAwsChunkedEncodingStream_browser_1 = require_getAwsChunkedEncodingStream_browser();
1173
- var stream_type_check_1 = require_stream_type_check();
1174
- function getAwsChunkedEncodingStream(stream, options) {
1175
- const readable = stream;
1176
- const readableStream = stream;
1177
- if ((0, stream_type_check_1.isReadableStream)(readableStream)) {
1178
- return (0, getAwsChunkedEncodingStream_browser_1.getAwsChunkedEncodingStream)(readableStream, options);
1290
+ });
1179
1291
  }
1180
- const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;
1181
- const checksumRequired = base64Encoder !== undefined && checksumAlgorithmFn !== undefined && checksumLocationName !== undefined && streamHasher !== undefined;
1182
- const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readable) : undefined;
1183
- const awsChunkedEncodingStream = new node_stream_1.Readable({
1184
- read: () => {}
1185
- });
1186
- readable.on("data", (data) => {
1187
- const length = bodyLengthChecker(data) || 0;
1188
- if (length === 0) {
1189
- return;
1190
- }
1191
- awsChunkedEncodingStream.push(`${length.toString(16)}\r
1192
- `);
1193
- awsChunkedEncodingStream.push(data);
1194
- awsChunkedEncodingStream.push(`\r
1195
- `);
1196
- });
1197
- readable.on("end", async () => {
1198
- awsChunkedEncodingStream.push(`0\r
1199
- `);
1200
- if (checksumRequired) {
1201
- const checksum = base64Encoder(await digest);
1202
- awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r
1203
- `);
1204
- awsChunkedEncodingStream.push(`\r
1205
- `);
1206
- }
1207
- awsChunkedEncodingStream.push(null);
1208
- });
1209
- return awsChunkedEncodingStream;
1210
- }
1211
- });
1212
-
1213
- // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/headStream.browser.js
1214
- var require_headStream_browser = __commonJS((exports) => {
1215
- Object.defineProperty(exports, "__esModule", { value: true });
1216
- exports.headStream = headStream;
1217
- async function headStream(stream, bytes) {
1218
- let byteLengthCounter = 0;
1219
- const chunks = [];
1220
- const reader = stream.getReader();
1221
- let isDone = false;
1222
- while (!isDone) {
1223
- const { done, value } = await reader.read();
1224
- if (value) {
1225
- chunks.push(value);
1226
- byteLengthCounter += value?.byteLength ?? 0;
1227
- }
1228
- if (byteLengthCounter >= bytes) {
1229
- break;
1230
- }
1231
- isDone = done;
1292
+ destroy() {
1293
+ this.connectionManager.destroy();
1232
1294
  }
1233
- reader.releaseLock();
1234
- const collected = new Uint8Array(Math.min(bytes, byteLengthCounter));
1235
- let offset = 0;
1236
- for (const chunk of chunks) {
1237
- if (chunk.byteLength > collected.byteLength - offset) {
1238
- collected.set(chunk.subarray(0, collected.byteLength - offset), offset);
1239
- break;
1240
- } else {
1241
- collected.set(chunk, offset);
1295
+ async handle(request, { abortSignal, requestTimeout } = {}) {
1296
+ if (!this.config) {
1297
+ this.config = await this.configProvider;
1298
+ this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false);
1299
+ if (this.config.maxConcurrentStreams) {
1300
+ this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams);
1301
+ }
1302
+ }
1303
+ const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config;
1304
+ const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout;
1305
+ return new Promise((_resolve, _reject) => {
1306
+ let fulfilled = false;
1307
+ let writeRequestBodyPromise = undefined;
1308
+ const resolve = async (arg) => {
1309
+ await writeRequestBodyPromise;
1310
+ _resolve(arg);
1311
+ };
1312
+ const reject = async (arg) => {
1313
+ await writeRequestBodyPromise;
1314
+ _reject(arg);
1315
+ };
1316
+ if (abortSignal?.aborted) {
1317
+ fulfilled = true;
1318
+ const abortError = buildAbortError(abortSignal);
1319
+ reject(abortError);
1320
+ return;
1321
+ }
1322
+ const { hostname, method, port, protocol, query } = request;
1323
+ let auth = "";
1324
+ if (request.username != null || request.password != null) {
1325
+ const username = request.username ?? "";
1326
+ const password = request.password ?? "";
1327
+ auth = `${username}:${password}@`;
1328
+ }
1329
+ const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`;
1330
+ const requestContext = { destination: new URL(authority) };
1331
+ const session = this.connectionManager.lease(requestContext, {
1332
+ requestTimeout: this.config?.sessionTimeout,
1333
+ disableConcurrentStreams: disableConcurrentStreams || false
1334
+ });
1335
+ const rejectWithDestroy = (err) => {
1336
+ if (disableConcurrentStreams) {
1337
+ this.destroySession(session);
1338
+ }
1339
+ fulfilled = true;
1340
+ reject(err);
1341
+ };
1342
+ const queryString = querystringBuilder.buildQueryString(query || {});
1343
+ let path = request.path;
1344
+ if (queryString) {
1345
+ path += `?${queryString}`;
1346
+ }
1347
+ if (request.fragment) {
1348
+ path += `#${request.fragment}`;
1349
+ }
1350
+ const req = session.request({
1351
+ ...request.headers,
1352
+ [http2.constants.HTTP2_HEADER_PATH]: path,
1353
+ [http2.constants.HTTP2_HEADER_METHOD]: method
1354
+ });
1355
+ session.ref();
1356
+ req.on("response", (headers) => {
1357
+ const httpResponse = new protocolHttp.HttpResponse({
1358
+ statusCode: headers[":status"] || -1,
1359
+ headers: getTransformedHeaders(headers),
1360
+ body: req
1361
+ });
1362
+ fulfilled = true;
1363
+ resolve({ response: httpResponse });
1364
+ if (disableConcurrentStreams) {
1365
+ session.close();
1366
+ this.connectionManager.deleteSession(authority, session);
1367
+ }
1368
+ });
1369
+ if (effectiveRequestTimeout) {
1370
+ req.setTimeout(effectiveRequestTimeout, () => {
1371
+ req.close();
1372
+ const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`);
1373
+ timeoutError.name = "TimeoutError";
1374
+ rejectWithDestroy(timeoutError);
1375
+ });
1376
+ }
1377
+ if (abortSignal) {
1378
+ const onAbort = () => {
1379
+ req.close();
1380
+ const abortError = buildAbortError(abortSignal);
1381
+ rejectWithDestroy(abortError);
1382
+ };
1383
+ if (typeof abortSignal.addEventListener === "function") {
1384
+ const signal = abortSignal;
1385
+ signal.addEventListener("abort", onAbort, { once: true });
1386
+ req.once("close", () => signal.removeEventListener("abort", onAbort));
1387
+ } else {
1388
+ abortSignal.onabort = onAbort;
1389
+ }
1390
+ }
1391
+ req.on("frameError", (type, code, id) => {
1392
+ rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`));
1393
+ });
1394
+ req.on("error", rejectWithDestroy);
1395
+ req.on("aborted", () => {
1396
+ rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`));
1397
+ });
1398
+ req.on("close", () => {
1399
+ session.unref();
1400
+ if (disableConcurrentStreams) {
1401
+ session.destroy();
1402
+ }
1403
+ if (!fulfilled) {
1404
+ rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response"));
1405
+ }
1406
+ });
1407
+ writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout);
1408
+ });
1409
+ }
1410
+ updateHttpClientConfig(key, value) {
1411
+ this.config = undefined;
1412
+ this.configProvider = this.configProvider.then((config) => {
1413
+ return {
1414
+ ...config,
1415
+ [key]: value
1416
+ };
1417
+ });
1418
+ }
1419
+ httpHandlerConfigs() {
1420
+ return this.config ?? {};
1421
+ }
1422
+ destroySession(session) {
1423
+ if (!session.destroyed) {
1424
+ session.destroy();
1242
1425
  }
1243
- offset += chunk.length;
1244
1426
  }
1245
- return collected;
1246
1427
  }
1247
- });
1248
1428
 
1249
- // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/headStream.js
1250
- var require_headStream = __commonJS((exports) => {
1251
- Object.defineProperty(exports, "__esModule", { value: true });
1252
- exports.headStream = undefined;
1253
- var stream_1 = __require("stream");
1254
- var headStream_browser_1 = require_headStream_browser();
1255
- var stream_type_check_1 = require_stream_type_check();
1256
- var headStream = (stream, bytes) => {
1257
- if ((0, stream_type_check_1.isReadableStream)(stream)) {
1258
- return (0, headStream_browser_1.headStream)(stream, bytes);
1429
+ class Collector extends node_stream.Writable {
1430
+ bufferedBytes = [];
1431
+ _write(chunk, encoding, callback) {
1432
+ this.bufferedBytes.push(chunk);
1433
+ callback();
1434
+ }
1435
+ }
1436
+ var streamCollector = (stream) => {
1437
+ if (isReadableStreamInstance(stream)) {
1438
+ return collectReadableStream(stream);
1259
1439
  }
1260
1440
  return new Promise((resolve, reject) => {
1261
1441
  const collector = new Collector;
1262
- collector.limit = bytes;
1263
1442
  stream.pipe(collector);
1264
1443
  stream.on("error", (err) => {
1265
1444
  collector.end();
@@ -1267,1439 +1446,305 @@ var require_headStream = __commonJS((exports) => {
1267
1446
  });
1268
1447
  collector.on("error", reject);
1269
1448
  collector.on("finish", function() {
1270
- const bytes2 = new Uint8Array(Buffer.concat(this.buffers));
1271
- resolve(bytes2);
1449
+ const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes));
1450
+ resolve(bytes);
1272
1451
  });
1273
1452
  });
1274
1453
  };
1275
- exports.headStream = headStream;
1276
-
1277
- class Collector extends stream_1.Writable {
1278
- buffers = [];
1279
- limit = Infinity;
1280
- bytesBuffered = 0;
1281
- _write(chunk, encoding, callback) {
1282
- this.buffers.push(chunk);
1283
- this.bytesBuffered += chunk.byteLength ?? 0;
1284
- if (this.bytesBuffered >= this.limit) {
1285
- const excess = this.bytesBuffered - this.limit;
1286
- const tailBuffer = this.buffers[this.buffers.length - 1];
1287
- this.buffers[this.buffers.length - 1] = tailBuffer.subarray(0, tailBuffer.byteLength - excess);
1288
- this.emit("finish");
1454
+ var isReadableStreamInstance = (stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream;
1455
+ async function collectReadableStream(stream) {
1456
+ const chunks = [];
1457
+ const reader = stream.getReader();
1458
+ let isDone = false;
1459
+ let length = 0;
1460
+ while (!isDone) {
1461
+ const { done, value } = await reader.read();
1462
+ if (value) {
1463
+ chunks.push(value);
1464
+ length += value.length;
1289
1465
  }
1290
- callback();
1466
+ isDone = done;
1467
+ }
1468
+ const collected = new Uint8Array(length);
1469
+ let offset = 0;
1470
+ for (const chunk of chunks) {
1471
+ collected.set(chunk, offset);
1472
+ offset += chunk.length;
1291
1473
  }
1474
+ return collected;
1292
1475
  }
1476
+ exports.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT;
1477
+ exports.NodeHttp2Handler = NodeHttp2Handler;
1478
+ exports.NodeHttpHandler = NodeHttpHandler;
1479
+ exports.streamCollector = streamCollector;
1293
1480
  });
1294
1481
 
1295
- // node_modules/.bun/@smithy+fetch-http-handler@5.3.16/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js
1296
- var require_dist_cjs10 = __commonJS((exports) => {
1297
- var protocolHttp = require_dist_cjs2();
1298
- var querystringBuilder = require_dist_cjs3();
1299
- var utilBase64 = require_dist_cjs9();
1300
- function createRequest(url, requestOptions) {
1301
- return new Request(url, requestOptions);
1302
- }
1303
- function requestTimeout(timeoutInMs = 0) {
1304
- return new Promise((resolve, reject) => {
1305
- if (timeoutInMs) {
1306
- setTimeout(() => {
1307
- const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`);
1308
- timeoutError.name = "TimeoutError";
1309
- reject(timeoutError);
1310
- }, timeoutInMs);
1311
- }
1312
- });
1313
- }
1314
- var keepAliveSupport = {
1315
- supported: undefined
1482
+ // node_modules/.bun/@smithy+core@3.23.14/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js
1483
+ var require_serde = __commonJS((exports) => {
1484
+ var uuid = require_dist_cjs2();
1485
+ var copyDocumentWithTransform = (source, schemaRef, transform = (_) => _) => source;
1486
+ var parseBoolean = (value) => {
1487
+ switch (value) {
1488
+ case "true":
1489
+ return true;
1490
+ case "false":
1491
+ return false;
1492
+ default:
1493
+ throw new Error(`Unable to parse boolean value "${value}"`);
1494
+ }
1316
1495
  };
1317
-
1318
- class FetchHttpHandler {
1319
- config;
1320
- configProvider;
1321
- static create(instanceOrOptions) {
1322
- if (typeof instanceOrOptions?.handle === "function") {
1323
- return instanceOrOptions;
1324
- }
1325
- return new FetchHttpHandler(instanceOrOptions);
1496
+ var expectBoolean = (value) => {
1497
+ if (value === null || value === undefined) {
1498
+ return;
1326
1499
  }
1327
- constructor(options) {
1328
- if (typeof options === "function") {
1329
- this.configProvider = options().then((opts) => opts || {});
1330
- } else {
1331
- this.config = options ?? {};
1332
- this.configProvider = Promise.resolve(this.config);
1500
+ if (typeof value === "number") {
1501
+ if (value === 0 || value === 1) {
1502
+ logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));
1333
1503
  }
1334
- if (keepAliveSupport.supported === undefined) {
1335
- keepAliveSupport.supported = Boolean(typeof Request !== "undefined" && "keepalive" in createRequest("https://[::1]"));
1504
+ if (value === 0) {
1505
+ return false;
1506
+ }
1507
+ if (value === 1) {
1508
+ return true;
1336
1509
  }
1337
1510
  }
1338
- destroy() {}
1339
- async handle(request, { abortSignal, requestTimeout: requestTimeout$1 } = {}) {
1340
- if (!this.config) {
1341
- this.config = await this.configProvider;
1511
+ if (typeof value === "string") {
1512
+ const lower = value.toLowerCase();
1513
+ if (lower === "false" || lower === "true") {
1514
+ logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));
1342
1515
  }
1343
- const requestTimeoutInMs = requestTimeout$1 ?? this.config.requestTimeout;
1344
- const keepAlive = this.config.keepAlive === true;
1345
- const credentials = this.config.credentials;
1346
- if (abortSignal?.aborted) {
1347
- const abortError = buildAbortError(abortSignal);
1348
- return Promise.reject(abortError);
1516
+ if (lower === "false") {
1517
+ return false;
1349
1518
  }
1350
- let path = request.path;
1351
- const queryString = querystringBuilder.buildQueryString(request.query || {});
1352
- if (queryString) {
1353
- path += `?${queryString}`;
1519
+ if (lower === "true") {
1520
+ return true;
1354
1521
  }
1355
- if (request.fragment) {
1356
- path += `#${request.fragment}`;
1522
+ }
1523
+ if (typeof value === "boolean") {
1524
+ return value;
1525
+ }
1526
+ throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`);
1527
+ };
1528
+ var expectNumber = (value) => {
1529
+ if (value === null || value === undefined) {
1530
+ return;
1531
+ }
1532
+ if (typeof value === "string") {
1533
+ const parsed = parseFloat(value);
1534
+ if (!Number.isNaN(parsed)) {
1535
+ if (String(parsed) !== String(value)) {
1536
+ logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`));
1537
+ }
1538
+ return parsed;
1357
1539
  }
1358
- let auth = "";
1359
- if (request.username != null || request.password != null) {
1360
- const username = request.username ?? "";
1361
- const password = request.password ?? "";
1362
- auth = `${username}:${password}@`;
1363
- }
1364
- const { port, method } = request;
1365
- const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : ""}${path}`;
1366
- const body = method === "GET" || method === "HEAD" ? undefined : request.body;
1367
- const requestOptions = {
1368
- body,
1369
- headers: new Headers(request.headers),
1370
- method,
1371
- credentials
1372
- };
1373
- if (this.config?.cache) {
1374
- requestOptions.cache = this.config.cache;
1375
- }
1376
- if (body) {
1377
- requestOptions.duplex = "half";
1378
- }
1379
- if (typeof AbortController !== "undefined") {
1380
- requestOptions.signal = abortSignal;
1381
- }
1382
- if (keepAliveSupport.supported) {
1383
- requestOptions.keepalive = keepAlive;
1384
- }
1385
- if (typeof this.config.requestInit === "function") {
1386
- Object.assign(requestOptions, this.config.requestInit(request));
1387
- }
1388
- let removeSignalEventListener = () => {};
1389
- const fetchRequest = createRequest(url, requestOptions);
1390
- const raceOfPromises = [
1391
- fetch(fetchRequest).then((response) => {
1392
- const fetchHeaders = response.headers;
1393
- const transformedHeaders = {};
1394
- for (const pair of fetchHeaders.entries()) {
1395
- transformedHeaders[pair[0]] = pair[1];
1396
- }
1397
- const hasReadableStream = response.body != null;
1398
- if (!hasReadableStream) {
1399
- return response.blob().then((body2) => ({
1400
- response: new protocolHttp.HttpResponse({
1401
- headers: transformedHeaders,
1402
- reason: response.statusText,
1403
- statusCode: response.status,
1404
- body: body2
1405
- })
1406
- }));
1407
- }
1408
- return {
1409
- response: new protocolHttp.HttpResponse({
1410
- headers: transformedHeaders,
1411
- reason: response.statusText,
1412
- statusCode: response.status,
1413
- body: response.body
1414
- })
1415
- };
1416
- }),
1417
- requestTimeout(requestTimeoutInMs)
1418
- ];
1419
- if (abortSignal) {
1420
- raceOfPromises.push(new Promise((resolve, reject) => {
1421
- const onAbort = () => {
1422
- const abortError = buildAbortError(abortSignal);
1423
- reject(abortError);
1424
- };
1425
- if (typeof abortSignal.addEventListener === "function") {
1426
- const signal = abortSignal;
1427
- signal.addEventListener("abort", onAbort, { once: true });
1428
- removeSignalEventListener = () => signal.removeEventListener("abort", onAbort);
1429
- } else {
1430
- abortSignal.onabort = onAbort;
1431
- }
1432
- }));
1540
+ }
1541
+ if (typeof value === "number") {
1542
+ return value;
1543
+ }
1544
+ throw new TypeError(`Expected number, got ${typeof value}: ${value}`);
1545
+ };
1546
+ var MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));
1547
+ var expectFloat32 = (value) => {
1548
+ const expected = expectNumber(value);
1549
+ if (expected !== undefined && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) {
1550
+ if (Math.abs(expected) > MAX_FLOAT) {
1551
+ throw new TypeError(`Expected 32-bit float, got ${value}`);
1433
1552
  }
1434
- return Promise.race(raceOfPromises).finally(removeSignalEventListener);
1435
1553
  }
1436
- updateHttpClientConfig(key, value) {
1437
- this.config = undefined;
1438
- this.configProvider = this.configProvider.then((config) => {
1439
- config[key] = value;
1440
- return config;
1441
- });
1554
+ return expected;
1555
+ };
1556
+ var expectLong = (value) => {
1557
+ if (value === null || value === undefined) {
1558
+ return;
1442
1559
  }
1443
- httpHandlerConfigs() {
1444
- return this.config ?? {};
1560
+ if (Number.isInteger(value) && !Number.isNaN(value)) {
1561
+ return value;
1445
1562
  }
1446
- }
1447
- function buildAbortError(abortSignal) {
1448
- const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal ? abortSignal.reason : undefined;
1449
- if (reason) {
1450
- if (reason instanceof Error) {
1451
- const abortError3 = new Error("Request aborted");
1452
- abortError3.name = "AbortError";
1453
- abortError3.cause = reason;
1454
- return abortError3;
1455
- }
1456
- const abortError2 = new Error(String(reason));
1457
- abortError2.name = "AbortError";
1458
- return abortError2;
1563
+ throw new TypeError(`Expected integer, got ${typeof value}: ${value}`);
1564
+ };
1565
+ var expectInt = expectLong;
1566
+ var expectInt32 = (value) => expectSizedInt(value, 32);
1567
+ var expectShort = (value) => expectSizedInt(value, 16);
1568
+ var expectByte = (value) => expectSizedInt(value, 8);
1569
+ var expectSizedInt = (value, size) => {
1570
+ const expected = expectLong(value);
1571
+ if (expected !== undefined && castInt(expected, size) !== expected) {
1572
+ throw new TypeError(`Expected ${size}-bit integer, got ${value}`);
1459
1573
  }
1460
- const abortError = new Error("Request aborted");
1461
- abortError.name = "AbortError";
1462
- return abortError;
1463
- }
1464
- var streamCollector = async (stream) => {
1465
- if (typeof Blob === "function" && stream instanceof Blob || stream.constructor?.name === "Blob") {
1466
- if (Blob.prototype.arrayBuffer !== undefined) {
1467
- return new Uint8Array(await stream.arrayBuffer());
1468
- }
1469
- return collectBlob(stream);
1574
+ return expected;
1575
+ };
1576
+ var castInt = (value, size) => {
1577
+ switch (size) {
1578
+ case 32:
1579
+ return Int32Array.of(value)[0];
1580
+ case 16:
1581
+ return Int16Array.of(value)[0];
1582
+ case 8:
1583
+ return Int8Array.of(value)[0];
1470
1584
  }
1471
- return collectStream(stream);
1472
1585
  };
1473
- async function collectBlob(blob) {
1474
- const base64 = await readToBase64(blob);
1475
- const arrayBuffer = utilBase64.fromBase64(base64);
1476
- return new Uint8Array(arrayBuffer);
1477
- }
1478
- async function collectStream(stream) {
1479
- const chunks = [];
1480
- const reader = stream.getReader();
1481
- let isDone = false;
1482
- let length = 0;
1483
- while (!isDone) {
1484
- const { done, value } = await reader.read();
1485
- if (value) {
1486
- chunks.push(value);
1487
- length += value.length;
1586
+ var expectNonNull = (value, location) => {
1587
+ if (value === null || value === undefined) {
1588
+ if (location) {
1589
+ throw new TypeError(`Expected a non-null value for ${location}`);
1488
1590
  }
1489
- isDone = done;
1591
+ throw new TypeError("Expected a non-null value");
1490
1592
  }
1491
- const collected = new Uint8Array(length);
1492
- let offset = 0;
1493
- for (const chunk of chunks) {
1494
- collected.set(chunk, offset);
1495
- offset += chunk.length;
1593
+ return value;
1594
+ };
1595
+ var expectObject = (value) => {
1596
+ if (value === null || value === undefined) {
1597
+ return;
1496
1598
  }
1497
- return collected;
1498
- }
1499
- function readToBase64(blob) {
1500
- return new Promise((resolve, reject) => {
1501
- const reader = new FileReader;
1502
- reader.onloadend = () => {
1503
- if (reader.readyState !== 2) {
1504
- return reject(new Error("Reader aborted too early"));
1505
- }
1506
- const result = reader.result ?? "";
1507
- const commaIndex = result.indexOf(",");
1508
- const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length;
1509
- resolve(result.substring(dataOffset));
1510
- };
1511
- reader.onabort = () => reject(new Error("Read aborted"));
1512
- reader.onerror = () => reject(reader.error);
1513
- reader.readAsDataURL(blob);
1514
- });
1515
- }
1516
- exports.FetchHttpHandler = FetchHttpHandler;
1517
- exports.keepAliveSupport = keepAliveSupport;
1518
- exports.streamCollector = streamCollector;
1519
- });
1520
-
1521
- // node_modules/.bun/@smithy+util-hex-encoding@4.2.2/node_modules/@smithy/util-hex-encoding/dist-cjs/index.js
1522
- var require_dist_cjs11 = __commonJS((exports) => {
1523
- var SHORT_TO_HEX = {};
1524
- var HEX_TO_SHORT = {};
1525
- for (let i = 0;i < 256; i++) {
1526
- let encodedByte = i.toString(16).toLowerCase();
1527
- if (encodedByte.length === 1) {
1528
- encodedByte = `0${encodedByte}`;
1529
- }
1530
- SHORT_TO_HEX[i] = encodedByte;
1531
- HEX_TO_SHORT[encodedByte] = i;
1532
- }
1533
- function fromHex(encoded) {
1534
- if (encoded.length % 2 !== 0) {
1535
- throw new Error("Hex encoded strings must have an even number length");
1536
- }
1537
- const out = new Uint8Array(encoded.length / 2);
1538
- for (let i = 0;i < encoded.length; i += 2) {
1539
- const encodedByte = encoded.slice(i, i + 2).toLowerCase();
1540
- if (encodedByte in HEX_TO_SHORT) {
1541
- out[i / 2] = HEX_TO_SHORT[encodedByte];
1542
- } else {
1543
- throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);
1544
- }
1599
+ if (typeof value === "object" && !Array.isArray(value)) {
1600
+ return value;
1545
1601
  }
1546
- return out;
1547
- }
1548
- function toHex(bytes) {
1549
- let out = "";
1550
- for (let i = 0;i < bytes.byteLength; i++) {
1551
- out += SHORT_TO_HEX[bytes[i]];
1602
+ const receivedType = Array.isArray(value) ? "array" : typeof value;
1603
+ throw new TypeError(`Expected object, got ${receivedType}: ${value}`);
1604
+ };
1605
+ var expectString = (value) => {
1606
+ if (value === null || value === undefined) {
1607
+ return;
1552
1608
  }
1553
- return out;
1554
- }
1555
- exports.fromHex = fromHex;
1556
- exports.toHex = toHex;
1557
- });
1558
-
1559
- // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.browser.js
1560
- var require_sdk_stream_mixin_browser = __commonJS((exports) => {
1561
- Object.defineProperty(exports, "__esModule", { value: true });
1562
- exports.sdkStreamMixin = undefined;
1563
- var fetch_http_handler_1 = require_dist_cjs10();
1564
- var util_base64_1 = require_dist_cjs9();
1565
- var util_hex_encoding_1 = require_dist_cjs11();
1566
- var util_utf8_1 = require_dist_cjs7();
1567
- var stream_type_check_1 = require_stream_type_check();
1568
- var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed.";
1569
- var sdkStreamMixin = (stream) => {
1570
- if (!isBlobInstance(stream) && !(0, stream_type_check_1.isReadableStream)(stream)) {
1571
- const name = stream?.__proto__?.constructor?.name || stream;
1572
- throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`);
1609
+ if (typeof value === "string") {
1610
+ return value;
1573
1611
  }
1574
- let transformed = false;
1575
- const transformToByteArray = async () => {
1576
- if (transformed) {
1577
- throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
1578
- }
1579
- transformed = true;
1580
- return await (0, fetch_http_handler_1.streamCollector)(stream);
1581
- };
1582
- const blobToWebStream = (blob) => {
1583
- if (typeof blob.stream !== "function") {
1584
- throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
1585
- ` + "If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");
1586
- }
1587
- return blob.stream();
1588
- };
1589
- return Object.assign(stream, {
1590
- transformToByteArray,
1591
- transformToString: async (encoding) => {
1592
- const buf = await transformToByteArray();
1593
- if (encoding === "base64") {
1594
- return (0, util_base64_1.toBase64)(buf);
1595
- } else if (encoding === "hex") {
1596
- return (0, util_hex_encoding_1.toHex)(buf);
1597
- } else if (encoding === undefined || encoding === "utf8" || encoding === "utf-8") {
1598
- return (0, util_utf8_1.toUtf8)(buf);
1599
- } else if (typeof TextDecoder === "function") {
1600
- return new TextDecoder(encoding).decode(buf);
1601
- } else {
1602
- throw new Error("TextDecoder is not available, please make sure polyfill is provided.");
1603
- }
1604
- },
1605
- transformToWebStream: () => {
1606
- if (transformed) {
1607
- throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
1608
- }
1609
- transformed = true;
1610
- if (isBlobInstance(stream)) {
1611
- return blobToWebStream(stream);
1612
- } else if ((0, stream_type_check_1.isReadableStream)(stream)) {
1613
- return stream;
1614
- } else {
1615
- throw new Error(`Cannot transform payload to web stream, got ${stream}`);
1616
- }
1617
- }
1618
- });
1619
- };
1620
- exports.sdkStreamMixin = sdkStreamMixin;
1621
- var isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob;
1622
- });
1623
-
1624
- // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js
1625
- var require_sdk_stream_mixin = __commonJS((exports) => {
1626
- Object.defineProperty(exports, "__esModule", { value: true });
1627
- exports.sdkStreamMixin = undefined;
1628
- var node_http_handler_1 = require_dist_cjs4();
1629
- var util_buffer_from_1 = require_dist_cjs6();
1630
- var stream_1 = __require("stream");
1631
- var sdk_stream_mixin_browser_1 = require_sdk_stream_mixin_browser();
1632
- var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed.";
1633
- var sdkStreamMixin = (stream) => {
1634
- if (!(stream instanceof stream_1.Readable)) {
1635
- try {
1636
- return (0, sdk_stream_mixin_browser_1.sdkStreamMixin)(stream);
1637
- } catch (e) {
1638
- const name = stream?.__proto__?.constructor?.name || stream;
1639
- throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`);
1640
- }
1612
+ if (["boolean", "number", "bigint"].includes(typeof value)) {
1613
+ logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`));
1614
+ return String(value);
1641
1615
  }
1642
- let transformed = false;
1643
- const transformToByteArray = async () => {
1644
- if (transformed) {
1645
- throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
1646
- }
1647
- transformed = true;
1648
- return await (0, node_http_handler_1.streamCollector)(stream);
1649
- };
1650
- return Object.assign(stream, {
1651
- transformToByteArray,
1652
- transformToString: async (encoding) => {
1653
- const buf = await transformToByteArray();
1654
- if (encoding === undefined || Buffer.isEncoding(encoding)) {
1655
- return (0, util_buffer_from_1.fromArrayBuffer)(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding);
1656
- } else {
1657
- const decoder = new TextDecoder(encoding);
1658
- return decoder.decode(buf);
1659
- }
1660
- },
1661
- transformToWebStream: () => {
1662
- if (transformed) {
1663
- throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
1664
- }
1665
- if (stream.readableFlowing !== null) {
1666
- throw new Error("The stream has been consumed by other callbacks.");
1667
- }
1668
- if (typeof stream_1.Readable.toWeb !== "function") {
1669
- throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");
1670
- }
1671
- transformed = true;
1672
- return stream_1.Readable.toWeb(stream);
1673
- }
1674
- });
1616
+ throw new TypeError(`Expected string, got ${typeof value}: ${value}`);
1675
1617
  };
1676
- exports.sdkStreamMixin = sdkStreamMixin;
1677
- });
1678
-
1679
- // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/splitStream.browser.js
1680
- var require_splitStream_browser = __commonJS((exports) => {
1681
- Object.defineProperty(exports, "__esModule", { value: true });
1682
- exports.splitStream = splitStream;
1683
- async function splitStream(stream) {
1684
- if (typeof stream.stream === "function") {
1685
- stream = stream.stream();
1618
+ var expectUnion = (value) => {
1619
+ if (value === null || value === undefined) {
1620
+ return;
1686
1621
  }
1687
- const readableStream = stream;
1688
- return readableStream.tee();
1689
- }
1690
- });
1691
-
1692
- // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/splitStream.js
1693
- var require_splitStream = __commonJS((exports) => {
1694
- Object.defineProperty(exports, "__esModule", { value: true });
1695
- exports.splitStream = splitStream;
1696
- var stream_1 = __require("stream");
1697
- var splitStream_browser_1 = require_splitStream_browser();
1698
- var stream_type_check_1 = require_stream_type_check();
1699
- async function splitStream(stream) {
1700
- if ((0, stream_type_check_1.isReadableStream)(stream) || (0, stream_type_check_1.isBlob)(stream)) {
1701
- return (0, splitStream_browser_1.splitStream)(stream);
1622
+ const asObject = expectObject(value);
1623
+ const setKeys = Object.entries(asObject).filter(([, v]) => v != null).map(([k]) => k);
1624
+ if (setKeys.length === 0) {
1625
+ throw new TypeError(`Unions must have exactly one non-null member. None were found.`);
1702
1626
  }
1703
- const stream1 = new stream_1.PassThrough;
1704
- const stream2 = new stream_1.PassThrough;
1705
- stream.pipe(stream1);
1706
- stream.pipe(stream2);
1707
- return [stream1, stream2];
1708
- }
1709
- });
1710
-
1711
- // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/index.js
1712
- var require_dist_cjs12 = __commonJS((exports) => {
1713
- var utilBase64 = require_dist_cjs9();
1714
- var utilUtf8 = require_dist_cjs7();
1715
- var ChecksumStream = require_ChecksumStream();
1716
- var createChecksumStream = require_createChecksumStream();
1717
- var createBufferedReadable = require_createBufferedReadable();
1718
- var getAwsChunkedEncodingStream = require_getAwsChunkedEncodingStream();
1719
- var headStream = require_headStream();
1720
- var sdkStreamMixin = require_sdk_stream_mixin();
1721
- var splitStream = require_splitStream();
1722
- var streamTypeCheck = require_stream_type_check();
1723
-
1724
- class Uint8ArrayBlobAdapter extends Uint8Array {
1725
- static fromString(source, encoding = "utf-8") {
1726
- if (typeof source === "string") {
1727
- if (encoding === "base64") {
1728
- return Uint8ArrayBlobAdapter.mutate(utilBase64.fromBase64(source));
1729
- }
1730
- return Uint8ArrayBlobAdapter.mutate(utilUtf8.fromUtf8(source));
1731
- }
1732
- throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`);
1627
+ if (setKeys.length > 1) {
1628
+ throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`);
1733
1629
  }
1734
- static mutate(source) {
1735
- Object.setPrototypeOf(source, Uint8ArrayBlobAdapter.prototype);
1736
- return source;
1630
+ return asObject;
1631
+ };
1632
+ var strictParseDouble = (value) => {
1633
+ if (typeof value == "string") {
1634
+ return expectNumber(parseNumber(value));
1737
1635
  }
1738
- transformToString(encoding = "utf-8") {
1739
- if (encoding === "base64") {
1740
- return utilBase64.toBase64(this);
1741
- }
1742
- return utilUtf8.toUtf8(this);
1636
+ return expectNumber(value);
1637
+ };
1638
+ var strictParseFloat = strictParseDouble;
1639
+ var strictParseFloat32 = (value) => {
1640
+ if (typeof value == "string") {
1641
+ return expectFloat32(parseNumber(value));
1743
1642
  }
1744
- }
1745
- exports.isBlob = streamTypeCheck.isBlob;
1746
- exports.isReadableStream = streamTypeCheck.isReadableStream;
1747
- exports.Uint8ArrayBlobAdapter = Uint8ArrayBlobAdapter;
1748
- Object.prototype.hasOwnProperty.call(ChecksumStream, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
1749
- enumerable: true,
1750
- value: ChecksumStream["__proto__"]
1751
- });
1752
- Object.keys(ChecksumStream).forEach(function(k) {
1753
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
1754
- exports[k] = ChecksumStream[k];
1755
- });
1756
- Object.prototype.hasOwnProperty.call(createChecksumStream, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
1757
- enumerable: true,
1758
- value: createChecksumStream["__proto__"]
1759
- });
1760
- Object.keys(createChecksumStream).forEach(function(k) {
1761
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
1762
- exports[k] = createChecksumStream[k];
1763
- });
1764
- Object.prototype.hasOwnProperty.call(createBufferedReadable, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
1765
- enumerable: true,
1766
- value: createBufferedReadable["__proto__"]
1767
- });
1768
- Object.keys(createBufferedReadable).forEach(function(k) {
1769
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
1770
- exports[k] = createBufferedReadable[k];
1771
- });
1772
- Object.prototype.hasOwnProperty.call(getAwsChunkedEncodingStream, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
1773
- enumerable: true,
1774
- value: getAwsChunkedEncodingStream["__proto__"]
1775
- });
1776
- Object.keys(getAwsChunkedEncodingStream).forEach(function(k) {
1777
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
1778
- exports[k] = getAwsChunkedEncodingStream[k];
1779
- });
1780
- Object.prototype.hasOwnProperty.call(headStream, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
1781
- enumerable: true,
1782
- value: headStream["__proto__"]
1783
- });
1784
- Object.keys(headStream).forEach(function(k) {
1785
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
1786
- exports[k] = headStream[k];
1787
- });
1788
- Object.prototype.hasOwnProperty.call(sdkStreamMixin, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
1789
- enumerable: true,
1790
- value: sdkStreamMixin["__proto__"]
1791
- });
1792
- Object.keys(sdkStreamMixin).forEach(function(k) {
1793
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
1794
- exports[k] = sdkStreamMixin[k];
1795
- });
1796
- Object.prototype.hasOwnProperty.call(splitStream, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
1797
- enumerable: true,
1798
- value: splitStream["__proto__"]
1799
- });
1800
- Object.keys(splitStream).forEach(function(k) {
1801
- if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
1802
- exports[k] = splitStream[k];
1803
- });
1804
- });
1805
-
1806
- // node_modules/.bun/tslib@2.8.1/node_modules/tslib/tslib.js
1807
- var require_tslib = __commonJS((exports, module) => {
1808
- var __extends;
1809
- var __assign;
1810
- var __rest;
1811
- var __decorate;
1812
- var __param;
1813
- var __esDecorate;
1814
- var __runInitializers;
1815
- var __propKey;
1816
- var __setFunctionName;
1817
- var __metadata;
1818
- var __awaiter;
1819
- var __generator;
1820
- var __exportStar;
1821
- var __values;
1822
- var __read;
1823
- var __spread;
1824
- var __spreadArrays;
1825
- var __spreadArray;
1826
- var __await;
1827
- var __asyncGenerator;
1828
- var __asyncDelegator;
1829
- var __asyncValues;
1830
- var __makeTemplateObject;
1831
- var __importStar;
1832
- var __importDefault;
1833
- var __classPrivateFieldGet;
1834
- var __classPrivateFieldSet;
1835
- var __classPrivateFieldIn;
1836
- var __createBinding;
1837
- var __addDisposableResource;
1838
- var __disposeResources;
1839
- var __rewriteRelativeImportExtension;
1840
- (function(factory) {
1841
- var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
1842
- if (typeof define === "function" && define.amd) {
1843
- define("tslib", ["exports"], function(exports2) {
1844
- factory(createExporter(root, createExporter(exports2)));
1845
- });
1846
- } else if (typeof module === "object" && typeof exports === "object") {
1847
- factory(createExporter(root, createExporter(exports)));
1848
- } else {
1849
- factory(createExporter(root));
1643
+ return expectFloat32(value);
1644
+ };
1645
+ var NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g;
1646
+ var parseNumber = (value) => {
1647
+ const matches = value.match(NUMBER_REGEX);
1648
+ if (matches === null || matches[0].length !== value.length) {
1649
+ throw new TypeError(`Expected real number, got implicit NaN`);
1850
1650
  }
1851
- function createExporter(exports2, previous) {
1852
- if (exports2 !== root) {
1853
- if (typeof Object.create === "function") {
1854
- Object.defineProperty(exports2, "__esModule", { value: true });
1855
- } else {
1856
- exports2.__esModule = true;
1857
- }
1858
- }
1859
- return function(id, v) {
1860
- return exports2[id] = previous ? previous(id, v) : v;
1861
- };
1651
+ return parseFloat(value);
1652
+ };
1653
+ var limitedParseDouble = (value) => {
1654
+ if (typeof value == "string") {
1655
+ return parseFloatString(value);
1862
1656
  }
1863
- })(function(exporter) {
1864
- var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
1865
- d.__proto__ = b;
1866
- } || function(d, b) {
1867
- for (var p in b)
1868
- if (Object.prototype.hasOwnProperty.call(b, p))
1869
- d[p] = b[p];
1870
- };
1871
- __extends = function(d, b) {
1872
- if (typeof b !== "function" && b !== null)
1873
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1874
- extendStatics(d, b);
1875
- function __() {
1876
- this.constructor = d;
1877
- }
1878
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __);
1879
- };
1880
- __assign = Object.assign || function(t) {
1881
- for (var s, i = 1, n = arguments.length;i < n; i++) {
1882
- s = arguments[i];
1883
- for (var p in s)
1884
- if (Object.prototype.hasOwnProperty.call(s, p))
1885
- t[p] = s[p];
1886
- }
1887
- return t;
1888
- };
1889
- __rest = function(s, e) {
1890
- var t = {};
1891
- for (var p in s)
1892
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1893
- t[p] = s[p];
1894
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
1895
- for (var i = 0, p = Object.getOwnPropertySymbols(s);i < p.length; i++) {
1896
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1897
- t[p[i]] = s[p[i]];
1898
- }
1899
- return t;
1900
- };
1901
- __decorate = function(decorators, target, key, desc) {
1902
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1903
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1904
- r = Reflect.decorate(decorators, target, key, desc);
1905
- else
1906
- for (var i = decorators.length - 1;i >= 0; i--)
1907
- if (d = decorators[i])
1908
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1909
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1910
- };
1911
- __param = function(paramIndex, decorator) {
1912
- return function(target, key) {
1913
- decorator(target, key, paramIndex);
1914
- };
1915
- };
1916
- __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
1917
- function accept(f) {
1918
- if (f !== undefined && typeof f !== "function")
1919
- throw new TypeError("Function expected");
1920
- return f;
1921
- }
1922
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
1923
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
1924
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
1925
- var _, done = false;
1926
- for (var i = decorators.length - 1;i >= 0; i--) {
1927
- var context = {};
1928
- for (var p in contextIn)
1929
- context[p] = p === "access" ? {} : contextIn[p];
1930
- for (var p in contextIn.access)
1931
- context.access[p] = contextIn.access[p];
1932
- context.addInitializer = function(f) {
1933
- if (done)
1934
- throw new TypeError("Cannot add initializers after decoration has completed");
1935
- extraInitializers.push(accept(f || null));
1936
- };
1937
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
1938
- if (kind === "accessor") {
1939
- if (result === undefined)
1940
- continue;
1941
- if (result === null || typeof result !== "object")
1942
- throw new TypeError("Object expected");
1943
- if (_ = accept(result.get))
1944
- descriptor.get = _;
1945
- if (_ = accept(result.set))
1946
- descriptor.set = _;
1947
- if (_ = accept(result.init))
1948
- initializers.unshift(_);
1949
- } else if (_ = accept(result)) {
1950
- if (kind === "field")
1951
- initializers.unshift(_);
1952
- else
1953
- descriptor[key] = _;
1954
- }
1955
- }
1956
- if (target)
1957
- Object.defineProperty(target, contextIn.name, descriptor);
1958
- done = true;
1959
- };
1960
- __runInitializers = function(thisArg, initializers, value) {
1961
- var useValue = arguments.length > 2;
1962
- for (var i = 0;i < initializers.length; i++) {
1963
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
1964
- }
1965
- return useValue ? value : undefined;
1966
- };
1967
- __propKey = function(x) {
1968
- return typeof x === "symbol" ? x : "".concat(x);
1969
- };
1970
- __setFunctionName = function(f, name, prefix) {
1971
- if (typeof name === "symbol")
1972
- name = name.description ? "[".concat(name.description, "]") : "";
1973
- return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
1974
- };
1975
- __metadata = function(metadataKey, metadataValue) {
1976
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
1977
- return Reflect.metadata(metadataKey, metadataValue);
1978
- };
1979
- __awaiter = function(thisArg, _arguments, P, generator) {
1980
- function adopt(value) {
1981
- return value instanceof P ? value : new P(function(resolve) {
1982
- resolve(value);
1983
- });
1984
- }
1985
- return new (P || (P = Promise))(function(resolve, reject) {
1986
- function fulfilled(value) {
1987
- try {
1988
- step(generator.next(value));
1989
- } catch (e) {
1990
- reject(e);
1991
- }
1992
- }
1993
- function rejected(value) {
1994
- try {
1995
- step(generator["throw"](value));
1996
- } catch (e) {
1997
- reject(e);
1998
- }
1999
- }
2000
- function step(result) {
2001
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
2002
- }
2003
- step((generator = generator.apply(thisArg, _arguments || [])).next());
2004
- });
2005
- };
2006
- __generator = function(thisArg, body) {
2007
- var _ = { label: 0, sent: function() {
2008
- if (t[0] & 1)
2009
- throw t[1];
2010
- return t[1];
2011
- }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
2012
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
2013
- return this;
2014
- }), g;
2015
- function verb(n) {
2016
- return function(v) {
2017
- return step([n, v]);
2018
- };
2019
- }
2020
- function step(op) {
2021
- if (f)
2022
- throw new TypeError("Generator is already executing.");
2023
- while (g && (g = 0, op[0] && (_ = 0)), _)
2024
- try {
2025
- 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)
2026
- return t;
2027
- if (y = 0, t)
2028
- op = [op[0] & 2, t.value];
2029
- switch (op[0]) {
2030
- case 0:
2031
- case 1:
2032
- t = op;
2033
- break;
2034
- case 4:
2035
- _.label++;
2036
- return { value: op[1], done: false };
2037
- case 5:
2038
- _.label++;
2039
- y = op[1];
2040
- op = [0];
2041
- continue;
2042
- case 7:
2043
- op = _.ops.pop();
2044
- _.trys.pop();
2045
- continue;
2046
- default:
2047
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
2048
- _ = 0;
2049
- continue;
2050
- }
2051
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
2052
- _.label = op[1];
2053
- break;
2054
- }
2055
- if (op[0] === 6 && _.label < t[1]) {
2056
- _.label = t[1];
2057
- t = op;
2058
- break;
2059
- }
2060
- if (t && _.label < t[2]) {
2061
- _.label = t[2];
2062
- _.ops.push(op);
2063
- break;
2064
- }
2065
- if (t[2])
2066
- _.ops.pop();
2067
- _.trys.pop();
2068
- continue;
2069
- }
2070
- op = body.call(thisArg, _);
2071
- } catch (e) {
2072
- op = [6, e];
2073
- y = 0;
2074
- } finally {
2075
- f = t = 0;
2076
- }
2077
- if (op[0] & 5)
2078
- throw op[1];
2079
- return { value: op[0] ? op[1] : undefined, done: true };
2080
- }
2081
- };
2082
- __exportStar = function(m, o) {
2083
- for (var p in m)
2084
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
2085
- __createBinding(o, m, p);
2086
- };
2087
- __createBinding = Object.create ? function(o, m, k, k2) {
2088
- if (k2 === undefined)
2089
- k2 = k;
2090
- var desc = Object.getOwnPropertyDescriptor(m, k);
2091
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
2092
- desc = { enumerable: true, get: function() {
2093
- return m[k];
2094
- } };
2095
- }
2096
- Object.defineProperty(o, k2, desc);
2097
- } : function(o, m, k, k2) {
2098
- if (k2 === undefined)
2099
- k2 = k;
2100
- o[k2] = m[k];
2101
- };
2102
- __values = function(o) {
2103
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
2104
- if (m)
2105
- return m.call(o);
2106
- if (o && typeof o.length === "number")
2107
- return {
2108
- next: function() {
2109
- if (o && i >= o.length)
2110
- o = undefined;
2111
- return { value: o && o[i++], done: !o };
2112
- }
2113
- };
2114
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
2115
- };
2116
- __read = function(o, n) {
2117
- var m = typeof Symbol === "function" && o[Symbol.iterator];
2118
- if (!m)
2119
- return o;
2120
- var i = m.call(o), r, ar = [], e;
2121
- try {
2122
- while ((n === undefined || n-- > 0) && !(r = i.next()).done)
2123
- ar.push(r.value);
2124
- } catch (error) {
2125
- e = { error };
2126
- } finally {
2127
- try {
2128
- if (r && !r.done && (m = i["return"]))
2129
- m.call(i);
2130
- } finally {
2131
- if (e)
2132
- throw e.error;
2133
- }
2134
- }
2135
- return ar;
2136
- };
2137
- __spread = function() {
2138
- for (var ar = [], i = 0;i < arguments.length; i++)
2139
- ar = ar.concat(__read(arguments[i]));
2140
- return ar;
2141
- };
2142
- __spreadArrays = function() {
2143
- for (var s = 0, i = 0, il = arguments.length;i < il; i++)
2144
- s += arguments[i].length;
2145
- for (var r = Array(s), k = 0, i = 0;i < il; i++)
2146
- for (var a = arguments[i], j = 0, jl = a.length;j < jl; j++, k++)
2147
- r[k] = a[j];
2148
- return r;
2149
- };
2150
- __spreadArray = function(to, from, pack) {
2151
- if (pack || arguments.length === 2)
2152
- for (var i = 0, l = from.length, ar;i < l; i++) {
2153
- if (ar || !(i in from)) {
2154
- if (!ar)
2155
- ar = Array.prototype.slice.call(from, 0, i);
2156
- ar[i] = from[i];
2157
- }
2158
- }
2159
- return to.concat(ar || Array.prototype.slice.call(from));
2160
- };
2161
- __await = function(v) {
2162
- return this instanceof __await ? (this.v = v, this) : new __await(v);
2163
- };
2164
- __asyncGenerator = function(thisArg, _arguments, generator) {
2165
- if (!Symbol.asyncIterator)
2166
- throw new TypeError("Symbol.asyncIterator is not defined.");
2167
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
2168
- return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() {
2169
- return this;
2170
- }, i;
2171
- function awaitReturn(f) {
2172
- return function(v) {
2173
- return Promise.resolve(v).then(f, reject);
2174
- };
2175
- }
2176
- function verb(n, f) {
2177
- if (g[n]) {
2178
- i[n] = function(v) {
2179
- return new Promise(function(a, b) {
2180
- q.push([n, v, a, b]) > 1 || resume(n, v);
2181
- });
2182
- };
2183
- if (f)
2184
- i[n] = f(i[n]);
2185
- }
2186
- }
2187
- function resume(n, v) {
2188
- try {
2189
- step(g[n](v));
2190
- } catch (e) {
2191
- settle(q[0][3], e);
2192
- }
2193
- }
2194
- function step(r) {
2195
- r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
2196
- }
2197
- function fulfill(value) {
2198
- resume("next", value);
2199
- }
2200
- function reject(value) {
2201
- resume("throw", value);
2202
- }
2203
- function settle(f, v) {
2204
- if (f(v), q.shift(), q.length)
2205
- resume(q[0][0], q[0][1]);
2206
- }
2207
- };
2208
- __asyncDelegator = function(o) {
2209
- var i, p;
2210
- return i = {}, verb("next"), verb("throw", function(e) {
2211
- throw e;
2212
- }), verb("return"), i[Symbol.iterator] = function() {
2213
- return this;
2214
- }, i;
2215
- function verb(n, f) {
2216
- i[n] = o[n] ? function(v) {
2217
- return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v;
2218
- } : f;
2219
- }
2220
- };
2221
- __asyncValues = function(o) {
2222
- if (!Symbol.asyncIterator)
2223
- throw new TypeError("Symbol.asyncIterator is not defined.");
2224
- var m = o[Symbol.asyncIterator], i;
2225
- 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() {
2226
- return this;
2227
- }, i);
2228
- function verb(n) {
2229
- i[n] = o[n] && function(v) {
2230
- return new Promise(function(resolve, reject) {
2231
- v = o[n](v), settle(resolve, reject, v.done, v.value);
2232
- });
2233
- };
2234
- }
2235
- function settle(resolve, reject, d, v) {
2236
- Promise.resolve(v).then(function(v2) {
2237
- resolve({ value: v2, done: d });
2238
- }, reject);
2239
- }
2240
- };
2241
- __makeTemplateObject = function(cooked, raw) {
2242
- if (Object.defineProperty) {
2243
- Object.defineProperty(cooked, "raw", { value: raw });
2244
- } else {
2245
- cooked.raw = raw;
2246
- }
2247
- return cooked;
2248
- };
2249
- var __setModuleDefault = Object.create ? function(o, v) {
2250
- Object.defineProperty(o, "default", { enumerable: true, value: v });
2251
- } : function(o, v) {
2252
- o["default"] = v;
2253
- };
2254
- var ownKeys = function(o) {
2255
- ownKeys = Object.getOwnPropertyNames || function(o2) {
2256
- var ar = [];
2257
- for (var k in o2)
2258
- if (Object.prototype.hasOwnProperty.call(o2, k))
2259
- ar[ar.length] = k;
2260
- return ar;
2261
- };
2262
- return ownKeys(o);
2263
- };
2264
- __importStar = function(mod) {
2265
- if (mod && mod.__esModule)
2266
- return mod;
2267
- var result = {};
2268
- if (mod != null) {
2269
- for (var k = ownKeys(mod), i = 0;i < k.length; i++)
2270
- if (k[i] !== "default")
2271
- __createBinding(result, mod, k[i]);
2272
- }
2273
- __setModuleDefault(result, mod);
2274
- return result;
2275
- };
2276
- __importDefault = function(mod) {
2277
- return mod && mod.__esModule ? mod : { default: mod };
2278
- };
2279
- __classPrivateFieldGet = function(receiver, state, kind, f) {
2280
- if (kind === "a" && !f)
2281
- throw new TypeError("Private accessor was defined without a getter");
2282
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
2283
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
2284
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
2285
- };
2286
- __classPrivateFieldSet = function(receiver, state, value, kind, f) {
2287
- if (kind === "m")
2288
- throw new TypeError("Private method is not writable");
2289
- if (kind === "a" && !f)
2290
- throw new TypeError("Private accessor was defined without a setter");
2291
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
2292
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
2293
- return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
2294
- };
2295
- __classPrivateFieldIn = function(state, receiver) {
2296
- if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function")
2297
- throw new TypeError("Cannot use 'in' operator on non-object");
2298
- return typeof state === "function" ? receiver === state : state.has(receiver);
2299
- };
2300
- __addDisposableResource = function(env, value, async) {
2301
- if (value !== null && value !== undefined) {
2302
- if (typeof value !== "object" && typeof value !== "function")
2303
- throw new TypeError("Object expected.");
2304
- var dispose, inner;
2305
- if (async) {
2306
- if (!Symbol.asyncDispose)
2307
- throw new TypeError("Symbol.asyncDispose is not defined.");
2308
- dispose = value[Symbol.asyncDispose];
2309
- }
2310
- if (dispose === undefined) {
2311
- if (!Symbol.dispose)
2312
- throw new TypeError("Symbol.dispose is not defined.");
2313
- dispose = value[Symbol.dispose];
2314
- if (async)
2315
- inner = dispose;
2316
- }
2317
- if (typeof dispose !== "function")
2318
- throw new TypeError("Object not disposable.");
2319
- if (inner)
2320
- dispose = function() {
2321
- try {
2322
- inner.call(this);
2323
- } catch (e) {
2324
- return Promise.reject(e);
2325
- }
2326
- };
2327
- env.stack.push({ value, dispose, async });
2328
- } else if (async) {
2329
- env.stack.push({ async: true });
2330
- }
2331
- return value;
2332
- };
2333
- var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
2334
- var e = new Error(message);
2335
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
2336
- };
2337
- __disposeResources = function(env) {
2338
- function fail(e) {
2339
- env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
2340
- env.hasError = true;
2341
- }
2342
- var r, s = 0;
2343
- function next() {
2344
- while (r = env.stack.pop()) {
2345
- try {
2346
- if (!r.async && s === 1)
2347
- return s = 0, env.stack.push(r), Promise.resolve().then(next);
2348
- if (r.dispose) {
2349
- var result = r.dispose.call(r.value);
2350
- if (r.async)
2351
- return s |= 2, Promise.resolve(result).then(next, function(e) {
2352
- fail(e);
2353
- return next();
2354
- });
2355
- } else
2356
- s |= 1;
2357
- } catch (e) {
2358
- fail(e);
2359
- }
2360
- }
2361
- if (s === 1)
2362
- return env.hasError ? Promise.reject(env.error) : Promise.resolve();
2363
- if (env.hasError)
2364
- throw env.error;
2365
- }
2366
- return next();
2367
- };
2368
- __rewriteRelativeImportExtension = function(path, preserveJsx) {
2369
- if (typeof path === "string" && /^\.\.?\//.test(path)) {
2370
- return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
2371
- return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js";
2372
- });
2373
- }
2374
- return path;
2375
- };
2376
- exporter("__extends", __extends);
2377
- exporter("__assign", __assign);
2378
- exporter("__rest", __rest);
2379
- exporter("__decorate", __decorate);
2380
- exporter("__param", __param);
2381
- exporter("__esDecorate", __esDecorate);
2382
- exporter("__runInitializers", __runInitializers);
2383
- exporter("__propKey", __propKey);
2384
- exporter("__setFunctionName", __setFunctionName);
2385
- exporter("__metadata", __metadata);
2386
- exporter("__awaiter", __awaiter);
2387
- exporter("__generator", __generator);
2388
- exporter("__exportStar", __exportStar);
2389
- exporter("__createBinding", __createBinding);
2390
- exporter("__values", __values);
2391
- exporter("__read", __read);
2392
- exporter("__spread", __spread);
2393
- exporter("__spreadArrays", __spreadArrays);
2394
- exporter("__spreadArray", __spreadArray);
2395
- exporter("__await", __await);
2396
- exporter("__asyncGenerator", __asyncGenerator);
2397
- exporter("__asyncDelegator", __asyncDelegator);
2398
- exporter("__asyncValues", __asyncValues);
2399
- exporter("__makeTemplateObject", __makeTemplateObject);
2400
- exporter("__importStar", __importStar);
2401
- exporter("__importDefault", __importDefault);
2402
- exporter("__classPrivateFieldGet", __classPrivateFieldGet);
2403
- exporter("__classPrivateFieldSet", __classPrivateFieldSet);
2404
- exporter("__classPrivateFieldIn", __classPrivateFieldIn);
2405
- exporter("__addDisposableResource", __addDisposableResource);
2406
- exporter("__disposeResources", __disposeResources);
2407
- exporter("__rewriteRelativeImportExtension", __rewriteRelativeImportExtension);
2408
- });
2409
- });
2410
-
2411
- // node_modules/.bun/@smithy+uuid@1.1.2/node_modules/@smithy/uuid/dist-cjs/randomUUID.js
2412
- var require_randomUUID = __commonJS((exports) => {
2413
- Object.defineProperty(exports, "__esModule", { value: true });
2414
- exports.randomUUID = undefined;
2415
- var tslib_1 = require_tslib();
2416
- var crypto_1 = tslib_1.__importDefault(__require("crypto"));
2417
- exports.randomUUID = crypto_1.default.randomUUID.bind(crypto_1.default);
2418
- });
2419
-
2420
- // node_modules/.bun/@smithy+uuid@1.1.2/node_modules/@smithy/uuid/dist-cjs/index.js
2421
- var require_dist_cjs13 = __commonJS((exports) => {
2422
- var randomUUID = require_randomUUID();
2423
- var decimalToHex = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
2424
- var v4 = () => {
2425
- if (randomUUID.randomUUID) {
2426
- return randomUUID.randomUUID();
2427
- }
2428
- const rnds = new Uint8Array(16);
2429
- crypto.getRandomValues(rnds);
2430
- rnds[6] = rnds[6] & 15 | 64;
2431
- rnds[8] = rnds[8] & 63 | 128;
2432
- return decimalToHex[rnds[0]] + decimalToHex[rnds[1]] + decimalToHex[rnds[2]] + decimalToHex[rnds[3]] + "-" + decimalToHex[rnds[4]] + decimalToHex[rnds[5]] + "-" + decimalToHex[rnds[6]] + decimalToHex[rnds[7]] + "-" + decimalToHex[rnds[8]] + decimalToHex[rnds[9]] + "-" + decimalToHex[rnds[10]] + decimalToHex[rnds[11]] + decimalToHex[rnds[12]] + decimalToHex[rnds[13]] + decimalToHex[rnds[14]] + decimalToHex[rnds[15]];
2433
- };
2434
- exports.v4 = v4;
2435
- });
2436
-
2437
- // node_modules/.bun/@smithy+core@3.23.14/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js
2438
- var require_serde = __commonJS((exports) => {
2439
- var uuid = require_dist_cjs13();
2440
- var copyDocumentWithTransform = (source, schemaRef, transform = (_) => _) => source;
2441
- var parseBoolean = (value) => {
1657
+ return expectNumber(value);
1658
+ };
1659
+ var handleFloat = limitedParseDouble;
1660
+ var limitedParseFloat = limitedParseDouble;
1661
+ var limitedParseFloat32 = (value) => {
1662
+ if (typeof value == "string") {
1663
+ return parseFloatString(value);
1664
+ }
1665
+ return expectFloat32(value);
1666
+ };
1667
+ var parseFloatString = (value) => {
2442
1668
  switch (value) {
2443
- case "true":
2444
- return true;
2445
- case "false":
2446
- return false;
1669
+ case "NaN":
1670
+ return NaN;
1671
+ case "Infinity":
1672
+ return Infinity;
1673
+ case "-Infinity":
1674
+ return -Infinity;
2447
1675
  default:
2448
- throw new Error(`Unable to parse boolean value "${value}"`);
1676
+ throw new Error(`Unable to parse float value: ${value}`);
2449
1677
  }
2450
1678
  };
2451
- var expectBoolean = (value) => {
2452
- if (value === null || value === undefined) {
2453
- return;
2454
- }
2455
- if (typeof value === "number") {
2456
- if (value === 0 || value === 1) {
2457
- logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));
2458
- }
2459
- if (value === 0) {
2460
- return false;
2461
- }
2462
- if (value === 1) {
2463
- return true;
2464
- }
2465
- }
1679
+ var strictParseLong = (value) => {
2466
1680
  if (typeof value === "string") {
2467
- const lower = value.toLowerCase();
2468
- if (lower === "false" || lower === "true") {
2469
- logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));
2470
- }
2471
- if (lower === "false") {
2472
- return false;
2473
- }
2474
- if (lower === "true") {
2475
- return true;
2476
- }
2477
- }
2478
- if (typeof value === "boolean") {
2479
- return value;
1681
+ return expectLong(parseNumber(value));
2480
1682
  }
2481
- throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`);
1683
+ return expectLong(value);
2482
1684
  };
2483
- var expectNumber = (value) => {
2484
- if (value === null || value === undefined) {
2485
- return;
2486
- }
1685
+ var strictParseInt = strictParseLong;
1686
+ var strictParseInt32 = (value) => {
2487
1687
  if (typeof value === "string") {
2488
- const parsed = parseFloat(value);
2489
- if (!Number.isNaN(parsed)) {
2490
- if (String(parsed) !== String(value)) {
2491
- logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`));
2492
- }
2493
- return parsed;
2494
- }
2495
- }
2496
- if (typeof value === "number") {
2497
- return value;
2498
- }
2499
- throw new TypeError(`Expected number, got ${typeof value}: ${value}`);
2500
- };
2501
- var MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));
2502
- var expectFloat32 = (value) => {
2503
- const expected = expectNumber(value);
2504
- if (expected !== undefined && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) {
2505
- if (Math.abs(expected) > MAX_FLOAT) {
2506
- throw new TypeError(`Expected 32-bit float, got ${value}`);
2507
- }
1688
+ return expectInt32(parseNumber(value));
2508
1689
  }
2509
- return expected;
1690
+ return expectInt32(value);
2510
1691
  };
2511
- var expectLong = (value) => {
2512
- if (value === null || value === undefined) {
2513
- return;
2514
- }
2515
- if (Number.isInteger(value) && !Number.isNaN(value)) {
2516
- return value;
1692
+ var strictParseShort = (value) => {
1693
+ if (typeof value === "string") {
1694
+ return expectShort(parseNumber(value));
2517
1695
  }
2518
- throw new TypeError(`Expected integer, got ${typeof value}: ${value}`);
1696
+ return expectShort(value);
2519
1697
  };
2520
- var expectInt = expectLong;
2521
- var expectInt32 = (value) => expectSizedInt(value, 32);
2522
- var expectShort = (value) => expectSizedInt(value, 16);
2523
- var expectByte = (value) => expectSizedInt(value, 8);
2524
- var expectSizedInt = (value, size) => {
2525
- const expected = expectLong(value);
2526
- if (expected !== undefined && castInt(expected, size) !== expected) {
2527
- throw new TypeError(`Expected ${size}-bit integer, got ${value}`);
1698
+ var strictParseByte = (value) => {
1699
+ if (typeof value === "string") {
1700
+ return expectByte(parseNumber(value));
2528
1701
  }
2529
- return expected;
1702
+ return expectByte(value);
2530
1703
  };
2531
- var castInt = (value, size) => {
2532
- switch (size) {
2533
- case 32:
2534
- return Int32Array.of(value)[0];
2535
- case 16:
2536
- return Int16Array.of(value)[0];
2537
- case 8:
2538
- return Int8Array.of(value)[0];
2539
- }
1704
+ var stackTraceWarning = (message) => {
1705
+ return String(new TypeError(message).stack || message).split(`
1706
+ `).slice(0, 5).filter((s) => !s.includes("stackTraceWarning")).join(`
1707
+ `);
2540
1708
  };
2541
- var expectNonNull = (value, location) => {
2542
- if (value === null || value === undefined) {
2543
- if (location) {
2544
- throw new TypeError(`Expected a non-null value for ${location}`);
2545
- }
2546
- throw new TypeError("Expected a non-null value");
2547
- }
2548
- return value;
1709
+ var logger = {
1710
+ warn: console.warn
2549
1711
  };
2550
- var expectObject = (value) => {
1712
+ var DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
1713
+ var MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
1714
+ function dateToUtcString(date2) {
1715
+ const year2 = date2.getUTCFullYear();
1716
+ const month = date2.getUTCMonth();
1717
+ const dayOfWeek = date2.getUTCDay();
1718
+ const dayOfMonthInt = date2.getUTCDate();
1719
+ const hoursInt = date2.getUTCHours();
1720
+ const minutesInt = date2.getUTCMinutes();
1721
+ const secondsInt = date2.getUTCSeconds();
1722
+ const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`;
1723
+ const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`;
1724
+ const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`;
1725
+ const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`;
1726
+ return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year2} ${hoursString}:${minutesString}:${secondsString} GMT`;
1727
+ }
1728
+ var RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/);
1729
+ var parseRfc3339DateTime = (value) => {
2551
1730
  if (value === null || value === undefined) {
2552
1731
  return;
2553
1732
  }
2554
- if (typeof value === "object" && !Array.isArray(value)) {
2555
- return value;
1733
+ if (typeof value !== "string") {
1734
+ throw new TypeError("RFC-3339 date-times must be expressed as strings");
2556
1735
  }
2557
- const receivedType = Array.isArray(value) ? "array" : typeof value;
2558
- throw new TypeError(`Expected object, got ${receivedType}: ${value}`);
1736
+ const match = RFC3339.exec(value);
1737
+ if (!match) {
1738
+ throw new TypeError("Invalid RFC-3339 date-time value");
1739
+ }
1740
+ const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match;
1741
+ const year2 = strictParseShort(stripLeadingZeroes(yearStr));
1742
+ const month = parseDateValue(monthStr, "month", 1, 12);
1743
+ const day = parseDateValue(dayStr, "day", 1, 31);
1744
+ return buildDate(year2, month, day, { hours, minutes, seconds, fractionalMilliseconds });
2559
1745
  };
2560
- var expectString = (value) => {
2561
- if (value === null || value === undefined) {
2562
- return;
2563
- }
2564
- if (typeof value === "string") {
2565
- return value;
2566
- }
2567
- if (["boolean", "number", "bigint"].includes(typeof value)) {
2568
- logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`));
2569
- return String(value);
2570
- }
2571
- throw new TypeError(`Expected string, got ${typeof value}: ${value}`);
2572
- };
2573
- var expectUnion = (value) => {
2574
- if (value === null || value === undefined) {
2575
- return;
2576
- }
2577
- const asObject = expectObject(value);
2578
- const setKeys = Object.entries(asObject).filter(([, v]) => v != null).map(([k]) => k);
2579
- if (setKeys.length === 0) {
2580
- throw new TypeError(`Unions must have exactly one non-null member. None were found.`);
2581
- }
2582
- if (setKeys.length > 1) {
2583
- throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`);
2584
- }
2585
- return asObject;
2586
- };
2587
- var strictParseDouble = (value) => {
2588
- if (typeof value == "string") {
2589
- return expectNumber(parseNumber(value));
2590
- }
2591
- return expectNumber(value);
2592
- };
2593
- var strictParseFloat = strictParseDouble;
2594
- var strictParseFloat32 = (value) => {
2595
- if (typeof value == "string") {
2596
- return expectFloat32(parseNumber(value));
2597
- }
2598
- return expectFloat32(value);
2599
- };
2600
- var NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g;
2601
- var parseNumber = (value) => {
2602
- const matches = value.match(NUMBER_REGEX);
2603
- if (matches === null || matches[0].length !== value.length) {
2604
- throw new TypeError(`Expected real number, got implicit NaN`);
2605
- }
2606
- return parseFloat(value);
2607
- };
2608
- var limitedParseDouble = (value) => {
2609
- if (typeof value == "string") {
2610
- return parseFloatString(value);
2611
- }
2612
- return expectNumber(value);
2613
- };
2614
- var handleFloat = limitedParseDouble;
2615
- var limitedParseFloat = limitedParseDouble;
2616
- var limitedParseFloat32 = (value) => {
2617
- if (typeof value == "string") {
2618
- return parseFloatString(value);
2619
- }
2620
- return expectFloat32(value);
2621
- };
2622
- var parseFloatString = (value) => {
2623
- switch (value) {
2624
- case "NaN":
2625
- return NaN;
2626
- case "Infinity":
2627
- return Infinity;
2628
- case "-Infinity":
2629
- return -Infinity;
2630
- default:
2631
- throw new Error(`Unable to parse float value: ${value}`);
2632
- }
2633
- };
2634
- var strictParseLong = (value) => {
2635
- if (typeof value === "string") {
2636
- return expectLong(parseNumber(value));
2637
- }
2638
- return expectLong(value);
2639
- };
2640
- var strictParseInt = strictParseLong;
2641
- var strictParseInt32 = (value) => {
2642
- if (typeof value === "string") {
2643
- return expectInt32(parseNumber(value));
2644
- }
2645
- return expectInt32(value);
2646
- };
2647
- var strictParseShort = (value) => {
2648
- if (typeof value === "string") {
2649
- return expectShort(parseNumber(value));
2650
- }
2651
- return expectShort(value);
2652
- };
2653
- var strictParseByte = (value) => {
2654
- if (typeof value === "string") {
2655
- return expectByte(parseNumber(value));
2656
- }
2657
- return expectByte(value);
2658
- };
2659
- var stackTraceWarning = (message) => {
2660
- return String(new TypeError(message).stack || message).split(`
2661
- `).slice(0, 5).filter((s) => !s.includes("stackTraceWarning")).join(`
2662
- `);
2663
- };
2664
- var logger = {
2665
- warn: console.warn
2666
- };
2667
- var DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
2668
- var MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
2669
- function dateToUtcString(date2) {
2670
- const year2 = date2.getUTCFullYear();
2671
- const month = date2.getUTCMonth();
2672
- const dayOfWeek = date2.getUTCDay();
2673
- const dayOfMonthInt = date2.getUTCDate();
2674
- const hoursInt = date2.getUTCHours();
2675
- const minutesInt = date2.getUTCMinutes();
2676
- const secondsInt = date2.getUTCSeconds();
2677
- const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`;
2678
- const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`;
2679
- const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`;
2680
- const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`;
2681
- return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year2} ${hoursString}:${minutesString}:${secondsString} GMT`;
2682
- }
2683
- var RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/);
2684
- var parseRfc3339DateTime = (value) => {
2685
- if (value === null || value === undefined) {
2686
- return;
2687
- }
2688
- if (typeof value !== "string") {
2689
- throw new TypeError("RFC-3339 date-times must be expressed as strings");
2690
- }
2691
- const match = RFC3339.exec(value);
2692
- if (!match) {
2693
- throw new TypeError("Invalid RFC-3339 date-time value");
2694
- }
2695
- const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match;
2696
- const year2 = strictParseShort(stripLeadingZeroes(yearStr));
2697
- const month = parseDateValue(monthStr, "month", 1, 12);
2698
- const day = parseDateValue(dayStr, "day", 1, 31);
2699
- return buildDate(year2, month, day, { hours, minutes, seconds, fractionalMilliseconds });
2700
- };
2701
- var RFC3339_WITH_OFFSET$1 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/);
2702
- var parseRfc3339DateTimeWithOffset = (value) => {
1746
+ var RFC3339_WITH_OFFSET$1 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/);
1747
+ var parseRfc3339DateTimeWithOffset = (value) => {
2703
1748
  if (value === null || value === undefined) {
2704
1749
  return;
2705
1750
  }
@@ -2816,304 +1861,1286 @@ var require_serde = __commonJS((exports) => {
2816
1861
  if (dateVal < lower || dateVal > upper) {
2817
1862
  throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`);
2818
1863
  }
2819
- return dateVal;
2820
- };
2821
- var parseMilliseconds = (value) => {
2822
- if (value === null || value === undefined) {
2823
- return 0;
1864
+ return dateVal;
1865
+ };
1866
+ var parseMilliseconds = (value) => {
1867
+ if (value === null || value === undefined) {
1868
+ return 0;
1869
+ }
1870
+ return strictParseFloat32("0." + value) * 1000;
1871
+ };
1872
+ var parseOffsetToMilliseconds = (value) => {
1873
+ const directionStr = value[0];
1874
+ let direction = 1;
1875
+ if (directionStr == "+") {
1876
+ direction = 1;
1877
+ } else if (directionStr == "-") {
1878
+ direction = -1;
1879
+ } else {
1880
+ throw new TypeError(`Offset direction, ${directionStr}, must be "+" or "-"`);
1881
+ }
1882
+ const hour = Number(value.substring(1, 3));
1883
+ const minute = Number(value.substring(4, 6));
1884
+ return direction * (hour * 60 + minute) * 60 * 1000;
1885
+ };
1886
+ var stripLeadingZeroes = (value) => {
1887
+ let idx = 0;
1888
+ while (idx < value.length - 1 && value.charAt(idx) === "0") {
1889
+ idx++;
1890
+ }
1891
+ if (idx === 0) {
1892
+ return value;
1893
+ }
1894
+ return value.slice(idx);
1895
+ };
1896
+ var LazyJsonString = function LazyJsonString2(val) {
1897
+ const str = Object.assign(new String(val), {
1898
+ deserializeJSON() {
1899
+ return JSON.parse(String(val));
1900
+ },
1901
+ toString() {
1902
+ return String(val);
1903
+ },
1904
+ toJSON() {
1905
+ return String(val);
1906
+ }
1907
+ });
1908
+ return str;
1909
+ };
1910
+ LazyJsonString.from = (object) => {
1911
+ if (object && typeof object === "object" && (object instanceof LazyJsonString || ("deserializeJSON" in object))) {
1912
+ return object;
1913
+ } else if (typeof object === "string" || Object.getPrototypeOf(object) === String.prototype) {
1914
+ return LazyJsonString(String(object));
1915
+ }
1916
+ return LazyJsonString(JSON.stringify(object));
1917
+ };
1918
+ LazyJsonString.fromObject = LazyJsonString.from;
1919
+ function quoteHeader(part) {
1920
+ if (part.includes(",") || part.includes('"')) {
1921
+ part = `"${part.replace(/"/g, "\\\"")}"`;
1922
+ }
1923
+ return part;
1924
+ }
1925
+ var ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`;
1926
+ var mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`;
1927
+ var time = `(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?`;
1928
+ var date = `(\\d?\\d)`;
1929
+ var year = `(\\d{4})`;
1930
+ var RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/);
1931
+ var IMF_FIXDATE = new RegExp(`^${ddd}, ${date} ${mmm} ${year} ${time} GMT$`);
1932
+ var RFC_850_DATE = new RegExp(`^${ddd}, ${date}-${mmm}-(\\d\\d) ${time} GMT$`);
1933
+ var ASC_TIME = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\d\\d) ${time} ${year}$`);
1934
+ var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
1935
+ var _parseEpochTimestamp = (value) => {
1936
+ if (value == null) {
1937
+ return;
1938
+ }
1939
+ let num = NaN;
1940
+ if (typeof value === "number") {
1941
+ num = value;
1942
+ } else if (typeof value === "string") {
1943
+ if (!/^-?\d*\.?\d+$/.test(value)) {
1944
+ throw new TypeError(`parseEpochTimestamp - numeric string invalid.`);
1945
+ }
1946
+ num = Number.parseFloat(value);
1947
+ } else if (typeof value === "object" && value.tag === 1) {
1948
+ num = value.value;
1949
+ }
1950
+ if (isNaN(num) || Math.abs(num) === Infinity) {
1951
+ throw new TypeError("Epoch timestamps must be valid finite numbers.");
1952
+ }
1953
+ return new Date(Math.round(num * 1000));
1954
+ };
1955
+ var _parseRfc3339DateTimeWithOffset = (value) => {
1956
+ if (value == null) {
1957
+ return;
1958
+ }
1959
+ if (typeof value !== "string") {
1960
+ throw new TypeError("RFC3339 timestamps must be strings");
1961
+ }
1962
+ const matches = RFC3339_WITH_OFFSET.exec(value);
1963
+ if (!matches) {
1964
+ throw new TypeError(`Invalid RFC3339 timestamp format ${value}`);
1965
+ }
1966
+ const [, yearStr, monthStr, dayStr, hours, minutes, seconds, , ms, offsetStr] = matches;
1967
+ range(monthStr, 1, 12);
1968
+ range(dayStr, 1, 31);
1969
+ range(hours, 0, 23);
1970
+ range(minutes, 0, 59);
1971
+ range(seconds, 0, 60);
1972
+ const date2 = new Date(Date.UTC(Number(yearStr), Number(monthStr) - 1, Number(dayStr), Number(hours), Number(minutes), Number(seconds), Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1000) : 0));
1973
+ date2.setUTCFullYear(Number(yearStr));
1974
+ if (offsetStr.toUpperCase() != "Z") {
1975
+ const [, sign, offsetH, offsetM] = /([+-])(\d\d):(\d\d)/.exec(offsetStr) || [undefined, "+", 0, 0];
1976
+ const scalar = sign === "-" ? 1 : -1;
1977
+ date2.setTime(date2.getTime() + scalar * (Number(offsetH) * 60 * 60 * 1000 + Number(offsetM) * 60 * 1000));
1978
+ }
1979
+ return date2;
1980
+ };
1981
+ var _parseRfc7231DateTime = (value) => {
1982
+ if (value == null) {
1983
+ return;
1984
+ }
1985
+ if (typeof value !== "string") {
1986
+ throw new TypeError("RFC7231 timestamps must be strings.");
1987
+ }
1988
+ let day;
1989
+ let month;
1990
+ let year2;
1991
+ let hour;
1992
+ let minute;
1993
+ let second;
1994
+ let fraction;
1995
+ let matches;
1996
+ if (matches = IMF_FIXDATE.exec(value)) {
1997
+ [, day, month, year2, hour, minute, second, fraction] = matches;
1998
+ } else if (matches = RFC_850_DATE.exec(value)) {
1999
+ [, day, month, year2, hour, minute, second, fraction] = matches;
2000
+ year2 = (Number(year2) + 1900).toString();
2001
+ } else if (matches = ASC_TIME.exec(value)) {
2002
+ [, month, day, hour, minute, second, fraction, year2] = matches;
2003
+ }
2004
+ if (year2 && second) {
2005
+ const timestamp = Date.UTC(Number(year2), months.indexOf(month), Number(day), Number(hour), Number(minute), Number(second), fraction ? Math.round(parseFloat(`0.${fraction}`) * 1000) : 0);
2006
+ range(day, 1, 31);
2007
+ range(hour, 0, 23);
2008
+ range(minute, 0, 59);
2009
+ range(second, 0, 60);
2010
+ const date2 = new Date(timestamp);
2011
+ date2.setUTCFullYear(Number(year2));
2012
+ return date2;
2013
+ }
2014
+ throw new TypeError(`Invalid RFC7231 date-time value ${value}.`);
2015
+ };
2016
+ function range(v, min, max) {
2017
+ const _v = Number(v);
2018
+ if (_v < min || _v > max) {
2019
+ throw new Error(`Value ${_v} out of range [${min}, ${max}]`);
2020
+ }
2021
+ }
2022
+ function splitEvery(value, delimiter, numDelimiters) {
2023
+ if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) {
2024
+ throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery.");
2025
+ }
2026
+ const segments = value.split(delimiter);
2027
+ if (numDelimiters === 1) {
2028
+ return segments;
2029
+ }
2030
+ const compoundSegments = [];
2031
+ let currentSegment = "";
2032
+ for (let i = 0;i < segments.length; i++) {
2033
+ if (currentSegment === "") {
2034
+ currentSegment = segments[i];
2035
+ } else {
2036
+ currentSegment += delimiter + segments[i];
2037
+ }
2038
+ if ((i + 1) % numDelimiters === 0) {
2039
+ compoundSegments.push(currentSegment);
2040
+ currentSegment = "";
2041
+ }
2042
+ }
2043
+ if (currentSegment !== "") {
2044
+ compoundSegments.push(currentSegment);
2045
+ }
2046
+ return compoundSegments;
2047
+ }
2048
+ var splitHeader = (value) => {
2049
+ const z = value.length;
2050
+ const values = [];
2051
+ let withinQuotes = false;
2052
+ let prevChar = undefined;
2053
+ let anchor = 0;
2054
+ for (let i = 0;i < z; ++i) {
2055
+ const char = value[i];
2056
+ switch (char) {
2057
+ case `"`:
2058
+ if (prevChar !== "\\") {
2059
+ withinQuotes = !withinQuotes;
2060
+ }
2061
+ break;
2062
+ case ",":
2063
+ if (!withinQuotes) {
2064
+ values.push(value.slice(anchor, i));
2065
+ anchor = i + 1;
2066
+ }
2067
+ break;
2068
+ }
2069
+ prevChar = char;
2070
+ }
2071
+ values.push(value.slice(anchor));
2072
+ return values.map((v) => {
2073
+ v = v.trim();
2074
+ const z2 = v.length;
2075
+ if (z2 < 2) {
2076
+ return v;
2077
+ }
2078
+ if (v[0] === `"` && v[z2 - 1] === `"`) {
2079
+ v = v.slice(1, z2 - 1);
2080
+ }
2081
+ return v.replace(/\\"/g, '"');
2082
+ });
2083
+ };
2084
+ var format = /^-?\d*(\.\d+)?$/;
2085
+
2086
+ class NumericValue {
2087
+ string;
2088
+ type;
2089
+ constructor(string, type) {
2090
+ this.string = string;
2091
+ this.type = type;
2092
+ if (!format.test(string)) {
2093
+ throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`);
2094
+ }
2095
+ }
2096
+ toString() {
2097
+ return this.string;
2098
+ }
2099
+ static [Symbol.hasInstance](object) {
2100
+ if (!object || typeof object !== "object") {
2101
+ return false;
2102
+ }
2103
+ const _nv = object;
2104
+ return NumericValue.prototype.isPrototypeOf(object) || _nv.type === "bigDecimal" && format.test(_nv.string);
2105
+ }
2106
+ }
2107
+ function nv(input) {
2108
+ return new NumericValue(String(input), "bigDecimal");
2109
+ }
2110
+ exports.generateIdempotencyToken = uuid.v4;
2111
+ exports.LazyJsonString = LazyJsonString;
2112
+ exports.NumericValue = NumericValue;
2113
+ exports._parseEpochTimestamp = _parseEpochTimestamp;
2114
+ exports._parseRfc3339DateTimeWithOffset = _parseRfc3339DateTimeWithOffset;
2115
+ exports._parseRfc7231DateTime = _parseRfc7231DateTime;
2116
+ exports.copyDocumentWithTransform = copyDocumentWithTransform;
2117
+ exports.dateToUtcString = dateToUtcString;
2118
+ exports.expectBoolean = expectBoolean;
2119
+ exports.expectByte = expectByte;
2120
+ exports.expectFloat32 = expectFloat32;
2121
+ exports.expectInt = expectInt;
2122
+ exports.expectInt32 = expectInt32;
2123
+ exports.expectLong = expectLong;
2124
+ exports.expectNonNull = expectNonNull;
2125
+ exports.expectNumber = expectNumber;
2126
+ exports.expectObject = expectObject;
2127
+ exports.expectShort = expectShort;
2128
+ exports.expectString = expectString;
2129
+ exports.expectUnion = expectUnion;
2130
+ exports.handleFloat = handleFloat;
2131
+ exports.limitedParseDouble = limitedParseDouble;
2132
+ exports.limitedParseFloat = limitedParseFloat;
2133
+ exports.limitedParseFloat32 = limitedParseFloat32;
2134
+ exports.logger = logger;
2135
+ exports.nv = nv;
2136
+ exports.parseBoolean = parseBoolean;
2137
+ exports.parseEpochTimestamp = parseEpochTimestamp;
2138
+ exports.parseRfc3339DateTime = parseRfc3339DateTime;
2139
+ exports.parseRfc3339DateTimeWithOffset = parseRfc3339DateTimeWithOffset;
2140
+ exports.parseRfc7231DateTime = parseRfc7231DateTime;
2141
+ exports.quoteHeader = quoteHeader;
2142
+ exports.splitEvery = splitEvery;
2143
+ exports.splitHeader = splitHeader;
2144
+ exports.strictParseByte = strictParseByte;
2145
+ exports.strictParseDouble = strictParseDouble;
2146
+ exports.strictParseFloat = strictParseFloat;
2147
+ exports.strictParseFloat32 = strictParseFloat32;
2148
+ exports.strictParseInt = strictParseInt;
2149
+ exports.strictParseInt32 = strictParseInt32;
2150
+ exports.strictParseLong = strictParseLong;
2151
+ exports.strictParseShort = strictParseShort;
2152
+ });
2153
+
2154
+ // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.js
2155
+ var require_ChecksumStream = __commonJS((exports) => {
2156
+ Object.defineProperty(exports, "__esModule", { value: true });
2157
+ exports.ChecksumStream = undefined;
2158
+ var util_base64_1 = require_dist_cjs5();
2159
+ var stream_1 = __require("stream");
2160
+
2161
+ class ChecksumStream extends stream_1.Duplex {
2162
+ expectedChecksum;
2163
+ checksumSourceLocation;
2164
+ checksum;
2165
+ source;
2166
+ base64Encoder;
2167
+ pendingCallback = null;
2168
+ constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) {
2169
+ super();
2170
+ if (typeof source.pipe === "function") {
2171
+ this.source = source;
2172
+ } else {
2173
+ throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`);
2174
+ }
2175
+ this.base64Encoder = base64Encoder ?? util_base64_1.toBase64;
2176
+ this.expectedChecksum = expectedChecksum;
2177
+ this.checksum = checksum;
2178
+ this.checksumSourceLocation = checksumSourceLocation;
2179
+ this.source.pipe(this);
2180
+ }
2181
+ _read(size) {
2182
+ if (this.pendingCallback) {
2183
+ const callback = this.pendingCallback;
2184
+ this.pendingCallback = null;
2185
+ callback();
2186
+ }
2187
+ }
2188
+ _write(chunk, encoding, callback) {
2189
+ try {
2190
+ this.checksum.update(chunk);
2191
+ const canPushMore = this.push(chunk);
2192
+ if (!canPushMore) {
2193
+ this.pendingCallback = callback;
2194
+ return;
2195
+ }
2196
+ } catch (e) {
2197
+ return callback(e);
2198
+ }
2199
+ return callback();
2200
+ }
2201
+ async _final(callback) {
2202
+ try {
2203
+ const digest = await this.checksum.digest();
2204
+ const received = this.base64Encoder(digest);
2205
+ if (this.expectedChecksum !== received) {
2206
+ return callback(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}"` + ` in response header "${this.checksumSourceLocation}".`));
2207
+ }
2208
+ } catch (e) {
2209
+ return callback(e);
2210
+ }
2211
+ this.push(null);
2212
+ return callback();
2213
+ }
2214
+ }
2215
+ exports.ChecksumStream = ChecksumStream;
2216
+ });
2217
+
2218
+ // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/stream-type-check.js
2219
+ var require_stream_type_check = __commonJS((exports) => {
2220
+ Object.defineProperty(exports, "__esModule", { value: true });
2221
+ exports.isBlob = exports.isReadableStream = undefined;
2222
+ var isReadableStream = (stream) => typeof ReadableStream === "function" && (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream);
2223
+ exports.isReadableStream = isReadableStream;
2224
+ var isBlob = (blob) => {
2225
+ return typeof Blob === "function" && (blob?.constructor?.name === Blob.name || blob instanceof Blob);
2226
+ };
2227
+ exports.isBlob = isBlob;
2228
+ });
2229
+
2230
+ // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.browser.js
2231
+ var require_ChecksumStream_browser = __commonJS((exports) => {
2232
+ Object.defineProperty(exports, "__esModule", { value: true });
2233
+ exports.ChecksumStream = undefined;
2234
+ var ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function() {};
2235
+
2236
+ class ChecksumStream extends ReadableStreamRef {
2237
+ }
2238
+ exports.ChecksumStream = ChecksumStream;
2239
+ });
2240
+
2241
+ // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.browser.js
2242
+ var require_createChecksumStream_browser = __commonJS((exports) => {
2243
+ Object.defineProperty(exports, "__esModule", { value: true });
2244
+ exports.createChecksumStream = undefined;
2245
+ var util_base64_1 = require_dist_cjs5();
2246
+ var stream_type_check_1 = require_stream_type_check();
2247
+ var ChecksumStream_browser_1 = require_ChecksumStream_browser();
2248
+ var createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) => {
2249
+ if (!(0, stream_type_check_1.isReadableStream)(source)) {
2250
+ throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`);
2251
+ }
2252
+ const encoder = base64Encoder ?? util_base64_1.toBase64;
2253
+ if (typeof TransformStream !== "function") {
2254
+ throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");
2255
+ }
2256
+ const transform = new TransformStream({
2257
+ start() {},
2258
+ async transform(chunk, controller) {
2259
+ checksum.update(chunk);
2260
+ controller.enqueue(chunk);
2261
+ },
2262
+ async flush(controller) {
2263
+ const digest = await checksum.digest();
2264
+ const received = encoder(digest);
2265
+ if (expectedChecksum !== received) {
2266
+ const error = new Error(`Checksum mismatch: expected "${expectedChecksum}" but received "${received}"` + ` in response header "${checksumSourceLocation}".`);
2267
+ controller.error(error);
2268
+ } else {
2269
+ controller.terminate();
2270
+ }
2271
+ }
2272
+ });
2273
+ source.pipeThrough(transform);
2274
+ const readable = transform.readable;
2275
+ Object.setPrototypeOf(readable, ChecksumStream_browser_1.ChecksumStream.prototype);
2276
+ return readable;
2277
+ };
2278
+ exports.createChecksumStream = createChecksumStream;
2279
+ });
2280
+
2281
+ // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.js
2282
+ var require_createChecksumStream = __commonJS((exports) => {
2283
+ Object.defineProperty(exports, "__esModule", { value: true });
2284
+ exports.createChecksumStream = createChecksumStream;
2285
+ var stream_type_check_1 = require_stream_type_check();
2286
+ var ChecksumStream_1 = require_ChecksumStream();
2287
+ var createChecksumStream_browser_1 = require_createChecksumStream_browser();
2288
+ function createChecksumStream(init) {
2289
+ if (typeof ReadableStream === "function" && (0, stream_type_check_1.isReadableStream)(init.source)) {
2290
+ return (0, createChecksumStream_browser_1.createChecksumStream)(init);
2291
+ }
2292
+ return new ChecksumStream_1.ChecksumStream(init);
2293
+ }
2294
+ });
2295
+
2296
+ // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/ByteArrayCollector.js
2297
+ var require_ByteArrayCollector = __commonJS((exports) => {
2298
+ Object.defineProperty(exports, "__esModule", { value: true });
2299
+ exports.ByteArrayCollector = undefined;
2300
+
2301
+ class ByteArrayCollector {
2302
+ allocByteArray;
2303
+ byteLength = 0;
2304
+ byteArrays = [];
2305
+ constructor(allocByteArray) {
2306
+ this.allocByteArray = allocByteArray;
2307
+ }
2308
+ push(byteArray) {
2309
+ this.byteArrays.push(byteArray);
2310
+ this.byteLength += byteArray.byteLength;
2311
+ }
2312
+ flush() {
2313
+ if (this.byteArrays.length === 1) {
2314
+ const bytes = this.byteArrays[0];
2315
+ this.reset();
2316
+ return bytes;
2317
+ }
2318
+ const aggregation = this.allocByteArray(this.byteLength);
2319
+ let cursor = 0;
2320
+ for (let i = 0;i < this.byteArrays.length; ++i) {
2321
+ const bytes = this.byteArrays[i];
2322
+ aggregation.set(bytes, cursor);
2323
+ cursor += bytes.byteLength;
2324
+ }
2325
+ this.reset();
2326
+ return aggregation;
2327
+ }
2328
+ reset() {
2329
+ this.byteArrays = [];
2330
+ this.byteLength = 0;
2331
+ }
2332
+ }
2333
+ exports.ByteArrayCollector = ByteArrayCollector;
2334
+ });
2335
+
2336
+ // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/createBufferedReadableStream.js
2337
+ var require_createBufferedReadableStream = __commonJS((exports) => {
2338
+ Object.defineProperty(exports, "__esModule", { value: true });
2339
+ exports.createBufferedReadable = undefined;
2340
+ exports.createBufferedReadableStream = createBufferedReadableStream;
2341
+ exports.merge = merge;
2342
+ exports.flush = flush;
2343
+ exports.sizeOf = sizeOf;
2344
+ exports.modeOf = modeOf;
2345
+ var ByteArrayCollector_1 = require_ByteArrayCollector();
2346
+ function createBufferedReadableStream(upstream, size, logger) {
2347
+ const reader = upstream.getReader();
2348
+ let streamBufferingLoggedWarning = false;
2349
+ let bytesSeen = 0;
2350
+ const buffers = ["", new ByteArrayCollector_1.ByteArrayCollector((size2) => new Uint8Array(size2))];
2351
+ let mode = -1;
2352
+ const pull = async (controller) => {
2353
+ const { value, done } = await reader.read();
2354
+ const chunk = value;
2355
+ if (done) {
2356
+ if (mode !== -1) {
2357
+ const remainder = flush(buffers, mode);
2358
+ if (sizeOf(remainder) > 0) {
2359
+ controller.enqueue(remainder);
2360
+ }
2361
+ }
2362
+ controller.close();
2363
+ } else {
2364
+ const chunkMode = modeOf(chunk, false);
2365
+ if (mode !== chunkMode) {
2366
+ if (mode >= 0) {
2367
+ controller.enqueue(flush(buffers, mode));
2368
+ }
2369
+ mode = chunkMode;
2370
+ }
2371
+ if (mode === -1) {
2372
+ controller.enqueue(chunk);
2373
+ return;
2374
+ }
2375
+ const chunkSize = sizeOf(chunk);
2376
+ bytesSeen += chunkSize;
2377
+ const bufferSize = sizeOf(buffers[mode]);
2378
+ if (chunkSize >= size && bufferSize === 0) {
2379
+ controller.enqueue(chunk);
2380
+ } else {
2381
+ const newSize = merge(buffers, mode, chunk);
2382
+ if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {
2383
+ streamBufferingLoggedWarning = true;
2384
+ logger?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);
2385
+ }
2386
+ if (newSize >= size) {
2387
+ controller.enqueue(flush(buffers, mode));
2388
+ } else {
2389
+ await pull(controller);
2390
+ }
2391
+ }
2392
+ }
2393
+ };
2394
+ return new ReadableStream({
2395
+ pull
2396
+ });
2397
+ }
2398
+ exports.createBufferedReadable = createBufferedReadableStream;
2399
+ function merge(buffers, mode, chunk) {
2400
+ switch (mode) {
2401
+ case 0:
2402
+ buffers[0] += chunk;
2403
+ return sizeOf(buffers[0]);
2404
+ case 1:
2405
+ case 2:
2406
+ buffers[mode].push(chunk);
2407
+ return sizeOf(buffers[mode]);
2408
+ }
2409
+ }
2410
+ function flush(buffers, mode) {
2411
+ switch (mode) {
2412
+ case 0:
2413
+ const s = buffers[0];
2414
+ buffers[0] = "";
2415
+ return s;
2416
+ case 1:
2417
+ case 2:
2418
+ return buffers[mode].flush();
2419
+ }
2420
+ throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`);
2421
+ }
2422
+ function sizeOf(chunk) {
2423
+ return chunk?.byteLength ?? chunk?.length ?? 0;
2424
+ }
2425
+ function modeOf(chunk, allowBuffer = true) {
2426
+ if (allowBuffer && typeof Buffer !== "undefined" && chunk instanceof Buffer) {
2427
+ return 2;
2428
+ }
2429
+ if (chunk instanceof Uint8Array) {
2430
+ return 1;
2431
+ }
2432
+ if (typeof chunk === "string") {
2433
+ return 0;
2434
+ }
2435
+ return -1;
2436
+ }
2437
+ });
2438
+
2439
+ // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/createBufferedReadable.js
2440
+ var require_createBufferedReadable = __commonJS((exports) => {
2441
+ Object.defineProperty(exports, "__esModule", { value: true });
2442
+ exports.createBufferedReadable = createBufferedReadable;
2443
+ var node_stream_1 = __require("stream");
2444
+ var ByteArrayCollector_1 = require_ByteArrayCollector();
2445
+ var createBufferedReadableStream_1 = require_createBufferedReadableStream();
2446
+ var stream_type_check_1 = require_stream_type_check();
2447
+ function createBufferedReadable(upstream, size, logger) {
2448
+ if ((0, stream_type_check_1.isReadableStream)(upstream)) {
2449
+ return (0, createBufferedReadableStream_1.createBufferedReadableStream)(upstream, size, logger);
2450
+ }
2451
+ const downstream = new node_stream_1.Readable({ read() {} });
2452
+ let streamBufferingLoggedWarning = false;
2453
+ let bytesSeen = 0;
2454
+ const buffers = [
2455
+ "",
2456
+ new ByteArrayCollector_1.ByteArrayCollector((size2) => new Uint8Array(size2)),
2457
+ new ByteArrayCollector_1.ByteArrayCollector((size2) => Buffer.from(new Uint8Array(size2)))
2458
+ ];
2459
+ let mode = -1;
2460
+ upstream.on("data", (chunk) => {
2461
+ const chunkMode = (0, createBufferedReadableStream_1.modeOf)(chunk, true);
2462
+ if (mode !== chunkMode) {
2463
+ if (mode >= 0) {
2464
+ downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode));
2465
+ }
2466
+ mode = chunkMode;
2467
+ }
2468
+ if (mode === -1) {
2469
+ downstream.push(chunk);
2470
+ return;
2471
+ }
2472
+ const chunkSize = (0, createBufferedReadableStream_1.sizeOf)(chunk);
2473
+ bytesSeen += chunkSize;
2474
+ const bufferSize = (0, createBufferedReadableStream_1.sizeOf)(buffers[mode]);
2475
+ if (chunkSize >= size && bufferSize === 0) {
2476
+ downstream.push(chunk);
2477
+ } else {
2478
+ const newSize = (0, createBufferedReadableStream_1.merge)(buffers, mode, chunk);
2479
+ if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {
2480
+ streamBufferingLoggedWarning = true;
2481
+ logger?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);
2482
+ }
2483
+ if (newSize >= size) {
2484
+ downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode));
2485
+ }
2486
+ }
2487
+ });
2488
+ upstream.on("end", () => {
2489
+ if (mode !== -1) {
2490
+ const remainder = (0, createBufferedReadableStream_1.flush)(buffers, mode);
2491
+ if ((0, createBufferedReadableStream_1.sizeOf)(remainder) > 0) {
2492
+ downstream.push(remainder);
2493
+ }
2494
+ }
2495
+ downstream.push(null);
2496
+ });
2497
+ return downstream;
2498
+ }
2499
+ });
2500
+
2501
+ // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.browser.js
2502
+ var require_getAwsChunkedEncodingStream_browser = __commonJS((exports) => {
2503
+ Object.defineProperty(exports, "__esModule", { value: true });
2504
+ exports.getAwsChunkedEncodingStream = undefined;
2505
+ var getAwsChunkedEncodingStream = (readableStream, options) => {
2506
+ const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;
2507
+ const checksumRequired = base64Encoder !== undefined && bodyLengthChecker !== undefined && checksumAlgorithmFn !== undefined && checksumLocationName !== undefined && streamHasher !== undefined;
2508
+ const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined;
2509
+ const reader = readableStream.getReader();
2510
+ return new ReadableStream({
2511
+ async pull(controller) {
2512
+ const { value, done } = await reader.read();
2513
+ if (done) {
2514
+ controller.enqueue(`0\r
2515
+ `);
2516
+ if (checksumRequired) {
2517
+ const checksum = base64Encoder(await digest);
2518
+ controller.enqueue(`${checksumLocationName}:${checksum}\r
2519
+ `);
2520
+ controller.enqueue(`\r
2521
+ `);
2522
+ }
2523
+ controller.close();
2524
+ } else {
2525
+ controller.enqueue(`${(bodyLengthChecker(value) || 0).toString(16)}\r
2526
+ ${value}\r
2527
+ `);
2528
+ }
2529
+ }
2530
+ });
2531
+ };
2532
+ exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream;
2533
+ });
2534
+
2535
+ // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js
2536
+ var require_getAwsChunkedEncodingStream = __commonJS((exports) => {
2537
+ Object.defineProperty(exports, "__esModule", { value: true });
2538
+ exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream;
2539
+ var node_stream_1 = __require("stream");
2540
+ var getAwsChunkedEncodingStream_browser_1 = require_getAwsChunkedEncodingStream_browser();
2541
+ var stream_type_check_1 = require_stream_type_check();
2542
+ function getAwsChunkedEncodingStream(stream, options) {
2543
+ const readable = stream;
2544
+ const readableStream = stream;
2545
+ if ((0, stream_type_check_1.isReadableStream)(readableStream)) {
2546
+ return (0, getAwsChunkedEncodingStream_browser_1.getAwsChunkedEncodingStream)(readableStream, options);
2547
+ }
2548
+ const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;
2549
+ const checksumRequired = base64Encoder !== undefined && checksumAlgorithmFn !== undefined && checksumLocationName !== undefined && streamHasher !== undefined;
2550
+ const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readable) : undefined;
2551
+ const awsChunkedEncodingStream = new node_stream_1.Readable({
2552
+ read: () => {}
2553
+ });
2554
+ readable.on("data", (data) => {
2555
+ const length = bodyLengthChecker(data) || 0;
2556
+ if (length === 0) {
2557
+ return;
2558
+ }
2559
+ awsChunkedEncodingStream.push(`${length.toString(16)}\r
2560
+ `);
2561
+ awsChunkedEncodingStream.push(data);
2562
+ awsChunkedEncodingStream.push(`\r
2563
+ `);
2564
+ });
2565
+ readable.on("end", async () => {
2566
+ awsChunkedEncodingStream.push(`0\r
2567
+ `);
2568
+ if (checksumRequired) {
2569
+ const checksum = base64Encoder(await digest);
2570
+ awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r
2571
+ `);
2572
+ awsChunkedEncodingStream.push(`\r
2573
+ `);
2574
+ }
2575
+ awsChunkedEncodingStream.push(null);
2576
+ });
2577
+ return awsChunkedEncodingStream;
2578
+ }
2579
+ });
2580
+
2581
+ // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/headStream.browser.js
2582
+ var require_headStream_browser = __commonJS((exports) => {
2583
+ Object.defineProperty(exports, "__esModule", { value: true });
2584
+ exports.headStream = headStream;
2585
+ async function headStream(stream, bytes) {
2586
+ let byteLengthCounter = 0;
2587
+ const chunks = [];
2588
+ const reader = stream.getReader();
2589
+ let isDone = false;
2590
+ while (!isDone) {
2591
+ const { done, value } = await reader.read();
2592
+ if (value) {
2593
+ chunks.push(value);
2594
+ byteLengthCounter += value?.byteLength ?? 0;
2595
+ }
2596
+ if (byteLengthCounter >= bytes) {
2597
+ break;
2598
+ }
2599
+ isDone = done;
2600
+ }
2601
+ reader.releaseLock();
2602
+ const collected = new Uint8Array(Math.min(bytes, byteLengthCounter));
2603
+ let offset = 0;
2604
+ for (const chunk of chunks) {
2605
+ if (chunk.byteLength > collected.byteLength - offset) {
2606
+ collected.set(chunk.subarray(0, collected.byteLength - offset), offset);
2607
+ break;
2608
+ } else {
2609
+ collected.set(chunk, offset);
2610
+ }
2611
+ offset += chunk.length;
2824
2612
  }
2825
- return strictParseFloat32("0." + value) * 1000;
2826
- };
2827
- var parseOffsetToMilliseconds = (value) => {
2828
- const directionStr = value[0];
2829
- let direction = 1;
2830
- if (directionStr == "+") {
2831
- direction = 1;
2832
- } else if (directionStr == "-") {
2833
- direction = -1;
2834
- } else {
2835
- throw new TypeError(`Offset direction, ${directionStr}, must be "+" or "-"`);
2613
+ return collected;
2614
+ }
2615
+ });
2616
+
2617
+ // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/headStream.js
2618
+ var require_headStream = __commonJS((exports) => {
2619
+ Object.defineProperty(exports, "__esModule", { value: true });
2620
+ exports.headStream = undefined;
2621
+ var stream_1 = __require("stream");
2622
+ var headStream_browser_1 = require_headStream_browser();
2623
+ var stream_type_check_1 = require_stream_type_check();
2624
+ var headStream = (stream, bytes) => {
2625
+ if ((0, stream_type_check_1.isReadableStream)(stream)) {
2626
+ return (0, headStream_browser_1.headStream)(stream, bytes);
2836
2627
  }
2837
- const hour = Number(value.substring(1, 3));
2838
- const minute = Number(value.substring(4, 6));
2839
- return direction * (hour * 60 + minute) * 60 * 1000;
2628
+ return new Promise((resolve, reject) => {
2629
+ const collector = new Collector;
2630
+ collector.limit = bytes;
2631
+ stream.pipe(collector);
2632
+ stream.on("error", (err) => {
2633
+ collector.end();
2634
+ reject(err);
2635
+ });
2636
+ collector.on("error", reject);
2637
+ collector.on("finish", function() {
2638
+ const bytes2 = new Uint8Array(Buffer.concat(this.buffers));
2639
+ resolve(bytes2);
2640
+ });
2641
+ });
2840
2642
  };
2841
- var stripLeadingZeroes = (value) => {
2842
- let idx = 0;
2843
- while (idx < value.length - 1 && value.charAt(idx) === "0") {
2844
- idx++;
2845
- }
2846
- if (idx === 0) {
2847
- return value;
2643
+ exports.headStream = headStream;
2644
+
2645
+ class Collector extends stream_1.Writable {
2646
+ buffers = [];
2647
+ limit = Infinity;
2648
+ bytesBuffered = 0;
2649
+ _write(chunk, encoding, callback) {
2650
+ this.buffers.push(chunk);
2651
+ this.bytesBuffered += chunk.byteLength ?? 0;
2652
+ if (this.bytesBuffered >= this.limit) {
2653
+ const excess = this.bytesBuffered - this.limit;
2654
+ const tailBuffer = this.buffers[this.buffers.length - 1];
2655
+ this.buffers[this.buffers.length - 1] = tailBuffer.subarray(0, tailBuffer.byteLength - excess);
2656
+ this.emit("finish");
2657
+ }
2658
+ callback();
2848
2659
  }
2849
- return value.slice(idx);
2850
- };
2851
- var LazyJsonString = function LazyJsonString2(val) {
2852
- const str = Object.assign(new String(val), {
2853
- deserializeJSON() {
2854
- return JSON.parse(String(val));
2855
- },
2856
- toString() {
2857
- return String(val);
2858
- },
2859
- toJSON() {
2860
- return String(val);
2660
+ }
2661
+ });
2662
+
2663
+ // node_modules/.bun/@smithy+fetch-http-handler@5.3.16/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js
2664
+ var require_dist_cjs13 = __commonJS((exports) => {
2665
+ var protocolHttp = require_dist_cjs8();
2666
+ var querystringBuilder = require_dist_cjs11();
2667
+ var utilBase64 = require_dist_cjs5();
2668
+ function createRequest(url, requestOptions) {
2669
+ return new Request(url, requestOptions);
2670
+ }
2671
+ function requestTimeout(timeoutInMs = 0) {
2672
+ return new Promise((resolve, reject) => {
2673
+ if (timeoutInMs) {
2674
+ setTimeout(() => {
2675
+ const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`);
2676
+ timeoutError.name = "TimeoutError";
2677
+ reject(timeoutError);
2678
+ }, timeoutInMs);
2861
2679
  }
2862
2680
  });
2863
- return str;
2864
- };
2865
- LazyJsonString.from = (object) => {
2866
- if (object && typeof object === "object" && (object instanceof LazyJsonString || ("deserializeJSON" in object))) {
2867
- return object;
2868
- } else if (typeof object === "string" || Object.getPrototypeOf(object) === String.prototype) {
2869
- return LazyJsonString(String(object));
2870
- }
2871
- return LazyJsonString(JSON.stringify(object));
2681
+ }
2682
+ var keepAliveSupport = {
2683
+ supported: undefined
2872
2684
  };
2873
- LazyJsonString.fromObject = LazyJsonString.from;
2874
- function quoteHeader(part) {
2875
- if (part.includes(",") || part.includes('"')) {
2876
- part = `"${part.replace(/"/g, "\\\"")}"`;
2685
+
2686
+ class FetchHttpHandler {
2687
+ config;
2688
+ configProvider;
2689
+ static create(instanceOrOptions) {
2690
+ if (typeof instanceOrOptions?.handle === "function") {
2691
+ return instanceOrOptions;
2692
+ }
2693
+ return new FetchHttpHandler(instanceOrOptions);
2877
2694
  }
2878
- return part;
2879
- }
2880
- var ddd = `(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`;
2881
- var mmm = `(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`;
2882
- var time = `(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?`;
2883
- var date = `(\\d?\\d)`;
2884
- var year = `(\\d{4})`;
2885
- var RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/);
2886
- var IMF_FIXDATE = new RegExp(`^${ddd}, ${date} ${mmm} ${year} ${time} GMT$`);
2887
- var RFC_850_DATE = new RegExp(`^${ddd}, ${date}-${mmm}-(\\d\\d) ${time} GMT$`);
2888
- var ASC_TIME = new RegExp(`^${ddd} ${mmm} ( [1-9]|\\d\\d) ${time} ${year}$`);
2889
- var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
2890
- var _parseEpochTimestamp = (value) => {
2891
- if (value == null) {
2892
- return;
2695
+ constructor(options) {
2696
+ if (typeof options === "function") {
2697
+ this.configProvider = options().then((opts) => opts || {});
2698
+ } else {
2699
+ this.config = options ?? {};
2700
+ this.configProvider = Promise.resolve(this.config);
2701
+ }
2702
+ if (keepAliveSupport.supported === undefined) {
2703
+ keepAliveSupport.supported = Boolean(typeof Request !== "undefined" && "keepalive" in createRequest("https://[::1]"));
2704
+ }
2893
2705
  }
2894
- let num = NaN;
2895
- if (typeof value === "number") {
2896
- num = value;
2897
- } else if (typeof value === "string") {
2898
- if (!/^-?\d*\.?\d+$/.test(value)) {
2899
- throw new TypeError(`parseEpochTimestamp - numeric string invalid.`);
2706
+ destroy() {}
2707
+ async handle(request, { abortSignal, requestTimeout: requestTimeout$1 } = {}) {
2708
+ if (!this.config) {
2709
+ this.config = await this.configProvider;
2710
+ }
2711
+ const requestTimeoutInMs = requestTimeout$1 ?? this.config.requestTimeout;
2712
+ const keepAlive = this.config.keepAlive === true;
2713
+ const credentials = this.config.credentials;
2714
+ if (abortSignal?.aborted) {
2715
+ const abortError = buildAbortError(abortSignal);
2716
+ return Promise.reject(abortError);
2717
+ }
2718
+ let path = request.path;
2719
+ const queryString = querystringBuilder.buildQueryString(request.query || {});
2720
+ if (queryString) {
2721
+ path += `?${queryString}`;
2722
+ }
2723
+ if (request.fragment) {
2724
+ path += `#${request.fragment}`;
2725
+ }
2726
+ let auth = "";
2727
+ if (request.username != null || request.password != null) {
2728
+ const username = request.username ?? "";
2729
+ const password = request.password ?? "";
2730
+ auth = `${username}:${password}@`;
2731
+ }
2732
+ const { port, method } = request;
2733
+ const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : ""}${path}`;
2734
+ const body = method === "GET" || method === "HEAD" ? undefined : request.body;
2735
+ const requestOptions = {
2736
+ body,
2737
+ headers: new Headers(request.headers),
2738
+ method,
2739
+ credentials
2740
+ };
2741
+ if (this.config?.cache) {
2742
+ requestOptions.cache = this.config.cache;
2743
+ }
2744
+ if (body) {
2745
+ requestOptions.duplex = "half";
2746
+ }
2747
+ if (typeof AbortController !== "undefined") {
2748
+ requestOptions.signal = abortSignal;
2749
+ }
2750
+ if (keepAliveSupport.supported) {
2751
+ requestOptions.keepalive = keepAlive;
2752
+ }
2753
+ if (typeof this.config.requestInit === "function") {
2754
+ Object.assign(requestOptions, this.config.requestInit(request));
2755
+ }
2756
+ let removeSignalEventListener = () => {};
2757
+ const fetchRequest = createRequest(url, requestOptions);
2758
+ const raceOfPromises = [
2759
+ fetch(fetchRequest).then((response) => {
2760
+ const fetchHeaders = response.headers;
2761
+ const transformedHeaders = {};
2762
+ for (const pair of fetchHeaders.entries()) {
2763
+ transformedHeaders[pair[0]] = pair[1];
2764
+ }
2765
+ const hasReadableStream = response.body != null;
2766
+ if (!hasReadableStream) {
2767
+ return response.blob().then((body2) => ({
2768
+ response: new protocolHttp.HttpResponse({
2769
+ headers: transformedHeaders,
2770
+ reason: response.statusText,
2771
+ statusCode: response.status,
2772
+ body: body2
2773
+ })
2774
+ }));
2775
+ }
2776
+ return {
2777
+ response: new protocolHttp.HttpResponse({
2778
+ headers: transformedHeaders,
2779
+ reason: response.statusText,
2780
+ statusCode: response.status,
2781
+ body: response.body
2782
+ })
2783
+ };
2784
+ }),
2785
+ requestTimeout(requestTimeoutInMs)
2786
+ ];
2787
+ if (abortSignal) {
2788
+ raceOfPromises.push(new Promise((resolve, reject) => {
2789
+ const onAbort = () => {
2790
+ const abortError = buildAbortError(abortSignal);
2791
+ reject(abortError);
2792
+ };
2793
+ if (typeof abortSignal.addEventListener === "function") {
2794
+ const signal = abortSignal;
2795
+ signal.addEventListener("abort", onAbort, { once: true });
2796
+ removeSignalEventListener = () => signal.removeEventListener("abort", onAbort);
2797
+ } else {
2798
+ abortSignal.onabort = onAbort;
2799
+ }
2800
+ }));
2900
2801
  }
2901
- num = Number.parseFloat(value);
2902
- } else if (typeof value === "object" && value.tag === 1) {
2903
- num = value.value;
2904
- }
2905
- if (isNaN(num) || Math.abs(num) === Infinity) {
2906
- throw new TypeError("Epoch timestamps must be valid finite numbers.");
2802
+ return Promise.race(raceOfPromises).finally(removeSignalEventListener);
2907
2803
  }
2908
- return new Date(Math.round(num * 1000));
2909
- };
2910
- var _parseRfc3339DateTimeWithOffset = (value) => {
2911
- if (value == null) {
2912
- return;
2804
+ updateHttpClientConfig(key, value) {
2805
+ this.config = undefined;
2806
+ this.configProvider = this.configProvider.then((config) => {
2807
+ config[key] = value;
2808
+ return config;
2809
+ });
2913
2810
  }
2914
- if (typeof value !== "string") {
2915
- throw new TypeError("RFC3339 timestamps must be strings");
2811
+ httpHandlerConfigs() {
2812
+ return this.config ?? {};
2916
2813
  }
2917
- const matches = RFC3339_WITH_OFFSET.exec(value);
2918
- if (!matches) {
2919
- throw new TypeError(`Invalid RFC3339 timestamp format ${value}`);
2814
+ }
2815
+ function buildAbortError(abortSignal) {
2816
+ const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal ? abortSignal.reason : undefined;
2817
+ if (reason) {
2818
+ if (reason instanceof Error) {
2819
+ const abortError3 = new Error("Request aborted");
2820
+ abortError3.name = "AbortError";
2821
+ abortError3.cause = reason;
2822
+ return abortError3;
2823
+ }
2824
+ const abortError2 = new Error(String(reason));
2825
+ abortError2.name = "AbortError";
2826
+ return abortError2;
2920
2827
  }
2921
- const [, yearStr, monthStr, dayStr, hours, minutes, seconds, , ms, offsetStr] = matches;
2922
- range(monthStr, 1, 12);
2923
- range(dayStr, 1, 31);
2924
- range(hours, 0, 23);
2925
- range(minutes, 0, 59);
2926
- range(seconds, 0, 60);
2927
- const date2 = new Date(Date.UTC(Number(yearStr), Number(monthStr) - 1, Number(dayStr), Number(hours), Number(minutes), Number(seconds), Number(ms) ? Math.round(parseFloat(`0.${ms}`) * 1000) : 0));
2928
- date2.setUTCFullYear(Number(yearStr));
2929
- if (offsetStr.toUpperCase() != "Z") {
2930
- const [, sign, offsetH, offsetM] = /([+-])(\d\d):(\d\d)/.exec(offsetStr) || [undefined, "+", 0, 0];
2931
- const scalar = sign === "-" ? 1 : -1;
2932
- date2.setTime(date2.getTime() + scalar * (Number(offsetH) * 60 * 60 * 1000 + Number(offsetM) * 60 * 1000));
2828
+ const abortError = new Error("Request aborted");
2829
+ abortError.name = "AbortError";
2830
+ return abortError;
2831
+ }
2832
+ var streamCollector = async (stream) => {
2833
+ if (typeof Blob === "function" && stream instanceof Blob || stream.constructor?.name === "Blob") {
2834
+ if (Blob.prototype.arrayBuffer !== undefined) {
2835
+ return new Uint8Array(await stream.arrayBuffer());
2836
+ }
2837
+ return collectBlob(stream);
2933
2838
  }
2934
- return date2;
2839
+ return collectStream(stream);
2935
2840
  };
2936
- var _parseRfc7231DateTime = (value) => {
2937
- if (value == null) {
2938
- return;
2939
- }
2940
- if (typeof value !== "string") {
2941
- throw new TypeError("RFC7231 timestamps must be strings.");
2942
- }
2943
- let day;
2944
- let month;
2945
- let year2;
2946
- let hour;
2947
- let minute;
2948
- let second;
2949
- let fraction;
2950
- let matches;
2951
- if (matches = IMF_FIXDATE.exec(value)) {
2952
- [, day, month, year2, hour, minute, second, fraction] = matches;
2953
- } else if (matches = RFC_850_DATE.exec(value)) {
2954
- [, day, month, year2, hour, minute, second, fraction] = matches;
2955
- year2 = (Number(year2) + 1900).toString();
2956
- } else if (matches = ASC_TIME.exec(value)) {
2957
- [, month, day, hour, minute, second, fraction, year2] = matches;
2958
- }
2959
- if (year2 && second) {
2960
- const timestamp = Date.UTC(Number(year2), months.indexOf(month), Number(day), Number(hour), Number(minute), Number(second), fraction ? Math.round(parseFloat(`0.${fraction}`) * 1000) : 0);
2961
- range(day, 1, 31);
2962
- range(hour, 0, 23);
2963
- range(minute, 0, 59);
2964
- range(second, 0, 60);
2965
- const date2 = new Date(timestamp);
2966
- date2.setUTCFullYear(Number(year2));
2967
- return date2;
2841
+ async function collectBlob(blob) {
2842
+ const base64 = await readToBase64(blob);
2843
+ const arrayBuffer = utilBase64.fromBase64(base64);
2844
+ return new Uint8Array(arrayBuffer);
2845
+ }
2846
+ async function collectStream(stream) {
2847
+ const chunks = [];
2848
+ const reader = stream.getReader();
2849
+ let isDone = false;
2850
+ let length = 0;
2851
+ while (!isDone) {
2852
+ const { done, value } = await reader.read();
2853
+ if (value) {
2854
+ chunks.push(value);
2855
+ length += value.length;
2856
+ }
2857
+ isDone = done;
2968
2858
  }
2969
- throw new TypeError(`Invalid RFC7231 date-time value ${value}.`);
2970
- };
2971
- function range(v, min, max) {
2972
- const _v = Number(v);
2973
- if (_v < min || _v > max) {
2974
- throw new Error(`Value ${_v} out of range [${min}, ${max}]`);
2859
+ const collected = new Uint8Array(length);
2860
+ let offset = 0;
2861
+ for (const chunk of chunks) {
2862
+ collected.set(chunk, offset);
2863
+ offset += chunk.length;
2975
2864
  }
2865
+ return collected;
2976
2866
  }
2977
- function splitEvery(value, delimiter, numDelimiters) {
2978
- if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) {
2979
- throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery.");
2980
- }
2981
- const segments = value.split(delimiter);
2982
- if (numDelimiters === 1) {
2983
- return segments;
2867
+ function readToBase64(blob) {
2868
+ return new Promise((resolve, reject) => {
2869
+ const reader = new FileReader;
2870
+ reader.onloadend = () => {
2871
+ if (reader.readyState !== 2) {
2872
+ return reject(new Error("Reader aborted too early"));
2873
+ }
2874
+ const result = reader.result ?? "";
2875
+ const commaIndex = result.indexOf(",");
2876
+ const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length;
2877
+ resolve(result.substring(dataOffset));
2878
+ };
2879
+ reader.onabort = () => reject(new Error("Read aborted"));
2880
+ reader.onerror = () => reject(reader.error);
2881
+ reader.readAsDataURL(blob);
2882
+ });
2883
+ }
2884
+ exports.FetchHttpHandler = FetchHttpHandler;
2885
+ exports.keepAliveSupport = keepAliveSupport;
2886
+ exports.streamCollector = streamCollector;
2887
+ });
2888
+
2889
+ // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.browser.js
2890
+ var require_sdk_stream_mixin_browser = __commonJS((exports) => {
2891
+ Object.defineProperty(exports, "__esModule", { value: true });
2892
+ exports.sdkStreamMixin = undefined;
2893
+ var fetch_http_handler_1 = require_dist_cjs13();
2894
+ var util_base64_1 = require_dist_cjs5();
2895
+ var util_hex_encoding_1 = require_dist_cjs6();
2896
+ var util_utf8_1 = require_dist_cjs4();
2897
+ var stream_type_check_1 = require_stream_type_check();
2898
+ var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed.";
2899
+ var sdkStreamMixin = (stream) => {
2900
+ if (!isBlobInstance(stream) && !(0, stream_type_check_1.isReadableStream)(stream)) {
2901
+ const name = stream?.__proto__?.constructor?.name || stream;
2902
+ throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`);
2984
2903
  }
2985
- const compoundSegments = [];
2986
- let currentSegment = "";
2987
- for (let i = 0;i < segments.length; i++) {
2988
- if (currentSegment === "") {
2989
- currentSegment = segments[i];
2990
- } else {
2991
- currentSegment += delimiter + segments[i];
2904
+ let transformed = false;
2905
+ const transformToByteArray = async () => {
2906
+ if (transformed) {
2907
+ throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
2992
2908
  }
2993
- if ((i + 1) % numDelimiters === 0) {
2994
- compoundSegments.push(currentSegment);
2995
- currentSegment = "";
2909
+ transformed = true;
2910
+ return await (0, fetch_http_handler_1.streamCollector)(stream);
2911
+ };
2912
+ const blobToWebStream = (blob) => {
2913
+ if (typeof blob.stream !== "function") {
2914
+ throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
2915
+ ` + "If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");
2996
2916
  }
2997
- }
2998
- if (currentSegment !== "") {
2999
- compoundSegments.push(currentSegment);
3000
- }
3001
- return compoundSegments;
3002
- }
3003
- var splitHeader = (value) => {
3004
- const z = value.length;
3005
- const values = [];
3006
- let withinQuotes = false;
3007
- let prevChar = undefined;
3008
- let anchor = 0;
3009
- for (let i = 0;i < z; ++i) {
3010
- const char = value[i];
3011
- switch (char) {
3012
- case `"`:
3013
- if (prevChar !== "\\") {
3014
- withinQuotes = !withinQuotes;
3015
- }
3016
- break;
3017
- case ",":
3018
- if (!withinQuotes) {
3019
- values.push(value.slice(anchor, i));
3020
- anchor = i + 1;
3021
- }
3022
- break;
2917
+ return blob.stream();
2918
+ };
2919
+ return Object.assign(stream, {
2920
+ transformToByteArray,
2921
+ transformToString: async (encoding) => {
2922
+ const buf = await transformToByteArray();
2923
+ if (encoding === "base64") {
2924
+ return (0, util_base64_1.toBase64)(buf);
2925
+ } else if (encoding === "hex") {
2926
+ return (0, util_hex_encoding_1.toHex)(buf);
2927
+ } else if (encoding === undefined || encoding === "utf8" || encoding === "utf-8") {
2928
+ return (0, util_utf8_1.toUtf8)(buf);
2929
+ } else if (typeof TextDecoder === "function") {
2930
+ return new TextDecoder(encoding).decode(buf);
2931
+ } else {
2932
+ throw new Error("TextDecoder is not available, please make sure polyfill is provided.");
2933
+ }
2934
+ },
2935
+ transformToWebStream: () => {
2936
+ if (transformed) {
2937
+ throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
2938
+ }
2939
+ transformed = true;
2940
+ if (isBlobInstance(stream)) {
2941
+ return blobToWebStream(stream);
2942
+ } else if ((0, stream_type_check_1.isReadableStream)(stream)) {
2943
+ return stream;
2944
+ } else {
2945
+ throw new Error(`Cannot transform payload to web stream, got ${stream}`);
2946
+ }
2947
+ }
2948
+ });
2949
+ };
2950
+ exports.sdkStreamMixin = sdkStreamMixin;
2951
+ var isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob;
2952
+ });
2953
+
2954
+ // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js
2955
+ var require_sdk_stream_mixin = __commonJS((exports) => {
2956
+ Object.defineProperty(exports, "__esModule", { value: true });
2957
+ exports.sdkStreamMixin = undefined;
2958
+ var node_http_handler_1 = require_dist_cjs12();
2959
+ var util_buffer_from_1 = require_dist_cjs3();
2960
+ var stream_1 = __require("stream");
2961
+ var sdk_stream_mixin_browser_1 = require_sdk_stream_mixin_browser();
2962
+ var ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed.";
2963
+ var sdkStreamMixin = (stream) => {
2964
+ if (!(stream instanceof stream_1.Readable)) {
2965
+ try {
2966
+ return (0, sdk_stream_mixin_browser_1.sdkStreamMixin)(stream);
2967
+ } catch (e) {
2968
+ const name = stream?.__proto__?.constructor?.name || stream;
2969
+ throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`);
3023
2970
  }
3024
- prevChar = char;
3025
2971
  }
3026
- values.push(value.slice(anchor));
3027
- return values.map((v) => {
3028
- v = v.trim();
3029
- const z2 = v.length;
3030
- if (z2 < 2) {
3031
- return v;
2972
+ let transformed = false;
2973
+ const transformToByteArray = async () => {
2974
+ if (transformed) {
2975
+ throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
3032
2976
  }
3033
- if (v[0] === `"` && v[z2 - 1] === `"`) {
3034
- v = v.slice(1, z2 - 1);
2977
+ transformed = true;
2978
+ return await (0, node_http_handler_1.streamCollector)(stream);
2979
+ };
2980
+ return Object.assign(stream, {
2981
+ transformToByteArray,
2982
+ transformToString: async (encoding) => {
2983
+ const buf = await transformToByteArray();
2984
+ if (encoding === undefined || Buffer.isEncoding(encoding)) {
2985
+ return (0, util_buffer_from_1.fromArrayBuffer)(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding);
2986
+ } else {
2987
+ const decoder = new TextDecoder(encoding);
2988
+ return decoder.decode(buf);
2989
+ }
2990
+ },
2991
+ transformToWebStream: () => {
2992
+ if (transformed) {
2993
+ throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);
2994
+ }
2995
+ if (stream.readableFlowing !== null) {
2996
+ throw new Error("The stream has been consumed by other callbacks.");
2997
+ }
2998
+ if (typeof stream_1.Readable.toWeb !== "function") {
2999
+ throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");
3000
+ }
3001
+ transformed = true;
3002
+ return stream_1.Readable.toWeb(stream);
3035
3003
  }
3036
- return v.replace(/\\"/g, '"');
3037
3004
  });
3038
3005
  };
3039
- var format = /^-?\d*(\.\d+)?$/;
3006
+ exports.sdkStreamMixin = sdkStreamMixin;
3007
+ });
3040
3008
 
3041
- class NumericValue {
3042
- string;
3043
- type;
3044
- constructor(string, type) {
3045
- this.string = string;
3046
- this.type = type;
3047
- if (!format.test(string)) {
3048
- throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`);
3009
+ // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/splitStream.browser.js
3010
+ var require_splitStream_browser = __commonJS((exports) => {
3011
+ Object.defineProperty(exports, "__esModule", { value: true });
3012
+ exports.splitStream = splitStream;
3013
+ async function splitStream(stream) {
3014
+ if (typeof stream.stream === "function") {
3015
+ stream = stream.stream();
3016
+ }
3017
+ const readableStream = stream;
3018
+ return readableStream.tee();
3019
+ }
3020
+ });
3021
+
3022
+ // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/splitStream.js
3023
+ var require_splitStream = __commonJS((exports) => {
3024
+ Object.defineProperty(exports, "__esModule", { value: true });
3025
+ exports.splitStream = splitStream;
3026
+ var stream_1 = __require("stream");
3027
+ var splitStream_browser_1 = require_splitStream_browser();
3028
+ var stream_type_check_1 = require_stream_type_check();
3029
+ async function splitStream(stream) {
3030
+ if ((0, stream_type_check_1.isReadableStream)(stream) || (0, stream_type_check_1.isBlob)(stream)) {
3031
+ return (0, splitStream_browser_1.splitStream)(stream);
3032
+ }
3033
+ const stream1 = new stream_1.PassThrough;
3034
+ const stream2 = new stream_1.PassThrough;
3035
+ stream.pipe(stream1);
3036
+ stream.pipe(stream2);
3037
+ return [stream1, stream2];
3038
+ }
3039
+ });
3040
+
3041
+ // node_modules/.bun/@smithy+util-stream@4.5.22/node_modules/@smithy/util-stream/dist-cjs/index.js
3042
+ var require_dist_cjs14 = __commonJS((exports) => {
3043
+ var utilBase64 = require_dist_cjs5();
3044
+ var utilUtf8 = require_dist_cjs4();
3045
+ var ChecksumStream = require_ChecksumStream();
3046
+ var createChecksumStream = require_createChecksumStream();
3047
+ var createBufferedReadable = require_createBufferedReadable();
3048
+ var getAwsChunkedEncodingStream = require_getAwsChunkedEncodingStream();
3049
+ var headStream = require_headStream();
3050
+ var sdkStreamMixin = require_sdk_stream_mixin();
3051
+ var splitStream = require_splitStream();
3052
+ var streamTypeCheck = require_stream_type_check();
3053
+
3054
+ class Uint8ArrayBlobAdapter extends Uint8Array {
3055
+ static fromString(source, encoding = "utf-8") {
3056
+ if (typeof source === "string") {
3057
+ if (encoding === "base64") {
3058
+ return Uint8ArrayBlobAdapter.mutate(utilBase64.fromBase64(source));
3059
+ }
3060
+ return Uint8ArrayBlobAdapter.mutate(utilUtf8.fromUtf8(source));
3049
3061
  }
3062
+ throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`);
3050
3063
  }
3051
- toString() {
3052
- return this.string;
3064
+ static mutate(source) {
3065
+ Object.setPrototypeOf(source, Uint8ArrayBlobAdapter.prototype);
3066
+ return source;
3053
3067
  }
3054
- static [Symbol.hasInstance](object) {
3055
- if (!object || typeof object !== "object") {
3056
- return false;
3068
+ transformToString(encoding = "utf-8") {
3069
+ if (encoding === "base64") {
3070
+ return utilBase64.toBase64(this);
3057
3071
  }
3058
- const _nv = object;
3059
- return NumericValue.prototype.isPrototypeOf(object) || _nv.type === "bigDecimal" && format.test(_nv.string);
3072
+ return utilUtf8.toUtf8(this);
3060
3073
  }
3061
3074
  }
3062
- function nv(input) {
3063
- return new NumericValue(String(input), "bigDecimal");
3064
- }
3065
- exports.generateIdempotencyToken = uuid.v4;
3066
- exports.LazyJsonString = LazyJsonString;
3067
- exports.NumericValue = NumericValue;
3068
- exports._parseEpochTimestamp = _parseEpochTimestamp;
3069
- exports._parseRfc3339DateTimeWithOffset = _parseRfc3339DateTimeWithOffset;
3070
- exports._parseRfc7231DateTime = _parseRfc7231DateTime;
3071
- exports.copyDocumentWithTransform = copyDocumentWithTransform;
3072
- exports.dateToUtcString = dateToUtcString;
3073
- exports.expectBoolean = expectBoolean;
3074
- exports.expectByte = expectByte;
3075
- exports.expectFloat32 = expectFloat32;
3076
- exports.expectInt = expectInt;
3077
- exports.expectInt32 = expectInt32;
3078
- exports.expectLong = expectLong;
3079
- exports.expectNonNull = expectNonNull;
3080
- exports.expectNumber = expectNumber;
3081
- exports.expectObject = expectObject;
3082
- exports.expectShort = expectShort;
3083
- exports.expectString = expectString;
3084
- exports.expectUnion = expectUnion;
3085
- exports.handleFloat = handleFloat;
3086
- exports.limitedParseDouble = limitedParseDouble;
3087
- exports.limitedParseFloat = limitedParseFloat;
3088
- exports.limitedParseFloat32 = limitedParseFloat32;
3089
- exports.logger = logger;
3090
- exports.nv = nv;
3091
- exports.parseBoolean = parseBoolean;
3092
- exports.parseEpochTimestamp = parseEpochTimestamp;
3093
- exports.parseRfc3339DateTime = parseRfc3339DateTime;
3094
- exports.parseRfc3339DateTimeWithOffset = parseRfc3339DateTimeWithOffset;
3095
- exports.parseRfc7231DateTime = parseRfc7231DateTime;
3096
- exports.quoteHeader = quoteHeader;
3097
- exports.splitEvery = splitEvery;
3098
- exports.splitHeader = splitHeader;
3099
- exports.strictParseByte = strictParseByte;
3100
- exports.strictParseDouble = strictParseDouble;
3101
- exports.strictParseFloat = strictParseFloat;
3102
- exports.strictParseFloat32 = strictParseFloat32;
3103
- exports.strictParseInt = strictParseInt;
3104
- exports.strictParseInt32 = strictParseInt32;
3105
- exports.strictParseLong = strictParseLong;
3106
- exports.strictParseShort = strictParseShort;
3075
+ exports.isBlob = streamTypeCheck.isBlob;
3076
+ exports.isReadableStream = streamTypeCheck.isReadableStream;
3077
+ exports.Uint8ArrayBlobAdapter = Uint8ArrayBlobAdapter;
3078
+ Object.prototype.hasOwnProperty.call(ChecksumStream, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
3079
+ enumerable: true,
3080
+ value: ChecksumStream["__proto__"]
3081
+ });
3082
+ Object.keys(ChecksumStream).forEach(function(k) {
3083
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
3084
+ exports[k] = ChecksumStream[k];
3085
+ });
3086
+ Object.prototype.hasOwnProperty.call(createChecksumStream, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
3087
+ enumerable: true,
3088
+ value: createChecksumStream["__proto__"]
3089
+ });
3090
+ Object.keys(createChecksumStream).forEach(function(k) {
3091
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
3092
+ exports[k] = createChecksumStream[k];
3093
+ });
3094
+ Object.prototype.hasOwnProperty.call(createBufferedReadable, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
3095
+ enumerable: true,
3096
+ value: createBufferedReadable["__proto__"]
3097
+ });
3098
+ Object.keys(createBufferedReadable).forEach(function(k) {
3099
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
3100
+ exports[k] = createBufferedReadable[k];
3101
+ });
3102
+ Object.prototype.hasOwnProperty.call(getAwsChunkedEncodingStream, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
3103
+ enumerable: true,
3104
+ value: getAwsChunkedEncodingStream["__proto__"]
3105
+ });
3106
+ Object.keys(getAwsChunkedEncodingStream).forEach(function(k) {
3107
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
3108
+ exports[k] = getAwsChunkedEncodingStream[k];
3109
+ });
3110
+ Object.prototype.hasOwnProperty.call(headStream, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
3111
+ enumerable: true,
3112
+ value: headStream["__proto__"]
3113
+ });
3114
+ Object.keys(headStream).forEach(function(k) {
3115
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
3116
+ exports[k] = headStream[k];
3117
+ });
3118
+ Object.prototype.hasOwnProperty.call(sdkStreamMixin, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
3119
+ enumerable: true,
3120
+ value: sdkStreamMixin["__proto__"]
3121
+ });
3122
+ Object.keys(sdkStreamMixin).forEach(function(k) {
3123
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
3124
+ exports[k] = sdkStreamMixin[k];
3125
+ });
3126
+ Object.prototype.hasOwnProperty.call(splitStream, "__proto__") && !Object.prototype.hasOwnProperty.call(exports, "__proto__") && Object.defineProperty(exports, "__proto__", {
3127
+ enumerable: true,
3128
+ value: splitStream["__proto__"]
3129
+ });
3130
+ Object.keys(splitStream).forEach(function(k) {
3131
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
3132
+ exports[k] = splitStream[k];
3133
+ });
3107
3134
  });
3108
3135
 
3109
3136
  // node_modules/.bun/@smithy+core@3.23.14/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js
3110
3137
  var require_protocols = __commonJS((exports) => {
3111
- var utilStream = require_dist_cjs12();
3138
+ var utilStream = require_dist_cjs14();
3112
3139
  var schema = require_schema();
3113
3140
  var serde = require_serde();
3114
- var protocolHttp = require_dist_cjs2();
3115
- var utilBase64 = require_dist_cjs9();
3116
- var utilUtf8 = require_dist_cjs7();
3141
+ var protocolHttp = require_dist_cjs8();
3142
+ var utilBase64 = require_dist_cjs5();
3143
+ var utilUtf8 = require_dist_cjs4();
3117
3144
  var collectBody = async (streamBody = new Uint8Array, context) => {
3118
3145
  if (streamBody instanceof Uint8Array) {
3119
3146
  return utilStream.Uint8ArrayBlobAdapter.mutate(streamBody);
@@ -3936,4 +3963,4 @@ var require_protocols = __commonJS((exports) => {
3936
3963
  exports.resolvedPath = resolvedPath;
3937
3964
  });
3938
3965
 
3939
- export { require_dist_cjs8 as require_dist_cjs, require_endpoints, require_schema, require_tslib, require_dist_cjs13 as require_dist_cjs1, require_serde, require_dist_cjs9 as require_dist_cjs2, require_dist_cjs10 as require_dist_cjs3, require_dist_cjs11 as require_dist_cjs4, require_dist_cjs12 as require_dist_cjs5, require_protocols };
3966
+ export { require_dist_cjs13 as require_dist_cjs, require_dist_cjs10 as require_dist_cjs1, require_dist_cjs12 as require_dist_cjs2, require_dist_cjs14 as require_dist_cjs3, require_endpoints, require_schema, require_serde, require_protocols };