@qitqode/qitqode-android-arm64 0.2.7 → 0.2.8

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 (386) hide show
  1. package/bundle/{chunk-ga6wc979.js → chunk-03zpnwk2.js} +1 -1
  2. package/bundle/{chunk-qdvnscxm.js → chunk-0a4pmkc9.js} +1 -1
  3. package/bundle/chunk-0aqdzyar.js +2 -0
  4. package/bundle/{chunk-drnj1a14.js → chunk-0egrckx0.js} +1 -1
  5. package/bundle/{chunk-368jx5dp.js → chunk-0tcggtwv.js} +1 -1
  6. package/bundle/{chunk-0qpqd7nz.js → chunk-0tm6589k.js} +2 -2
  7. package/bundle/{chunk-0gsw04hw.js → chunk-0w19vmd7.js} +2 -2
  8. package/bundle/{chunk-j6xmgn63.js → chunk-0z1keh2w.js} +1 -1
  9. package/bundle/{chunk-aa2n02qk.js → chunk-1bxfzd6r.js} +2 -2
  10. package/bundle/{chunk-hrtze4c5.js → chunk-1har4t9a.js} +1 -1
  11. package/bundle/{chunk-33jcxsbe.js → chunk-1p9s5jj1.js} +1 -1
  12. package/bundle/{chunk-p40z6510.js → chunk-1v0khv7p.js} +1 -1
  13. package/bundle/{chunk-2c26kxp4.js → chunk-26cr51wa.js} +1 -1
  14. package/bundle/{chunk-eeq0krp7.js → chunk-27saej0r.js} +2 -2
  15. package/bundle/{chunk-ppy0jy6j.js → chunk-29gwtcey.js} +1 -1
  16. package/bundle/chunk-2a5gjgvp.js +2 -0
  17. package/bundle/{chunk-bn71wqqf.js → chunk-2caaqmec.js} +1 -1
  18. package/bundle/{chunk-hhk2sp5n.js → chunk-2kh0tg92.js} +1 -1
  19. package/bundle/{chunk-bd505nsd.js → chunk-2nheahmq.js} +1 -1
  20. package/bundle/chunk-2pkfphgb.js +2 -0
  21. package/bundle/{chunk-jxkrhrp0.js → chunk-2qm46qvn.js} +1 -1
  22. package/bundle/{chunk-ajp53ksp.js → chunk-2t5yh25f.js} +1 -1
  23. package/bundle/{chunk-4fy08jcj.js → chunk-2vaphpz0.js} +1 -1
  24. package/bundle/{chunk-5nhwqg7c.js → chunk-33ebjca6.js} +1 -1
  25. package/bundle/{chunk-yxttz5z5.js → chunk-35fj1sfm.js} +1 -1
  26. package/bundle/{chunk-makecdh6.js → chunk-37cbrnke.js} +5 -5
  27. package/bundle/{chunk-1vpx7szf.js → chunk-3bb4aqh9.js} +1 -1
  28. package/bundle/chunk-3cx4p07h.js +2 -0
  29. package/bundle/chunk-3f2cjzb4.js +2 -0
  30. package/bundle/chunk-3qvap1kv.js +2 -0
  31. package/bundle/{chunk-c8prg3jx.js → chunk-3va85mbe.js} +2 -2
  32. package/bundle/{chunk-wvb17w0z.js → chunk-3z2zn8rj.js} +1 -1
  33. package/bundle/{chunk-ghap1n1m.js → chunk-3zwma68w.js} +4 -4
  34. package/bundle/{chunk-abv0fskc.js → chunk-4064rbtp.js} +1 -1
  35. package/bundle/{chunk-84pjdenq.js → chunk-42hvspe7.js} +1 -1
  36. package/bundle/chunk-452tk6v3.js +2 -0
  37. package/bundle/{chunk-w3zhy5vq.js → chunk-48gap82w.js} +1 -1
  38. package/bundle/{chunk-q87fw8dk.js → chunk-4aajzxm9.js} +1 -1
  39. package/bundle/{chunk-4ftjx7ss.js → chunk-4gqb1hps.js} +1 -1
  40. package/bundle/{chunk-gww0skmn.js → chunk-4pmvxnkj.js} +1 -1
  41. package/bundle/chunk-50qgz5ka.js +2 -0
  42. package/bundle/{chunk-4zhrg3rv.js → chunk-52xvhxek.js} +1 -1
  43. package/bundle/{chunk-8hmt3avx.js → chunk-56wq8cqj.js} +1 -1
  44. package/bundle/{chunk-5r05d901.js → chunk-58f4y4b7.js} +2 -2
  45. package/bundle/{chunk-mbbxedsq.js → chunk-59csnjc3.js} +2 -2
  46. package/bundle/chunk-5b0xyq5z.js +2 -0
  47. package/bundle/{chunk-0ggvqmnm.js → chunk-5bv63rqj.js} +1 -1
  48. package/bundle/{chunk-vfb72vdy.js → chunk-5cw8235e.js} +1 -1
  49. package/bundle/{chunk-yd94wz5v.js → chunk-5f0nhthe.js} +1 -1
  50. package/bundle/chunk-5j4nxpdy.js +2 -0
  51. package/bundle/{chunk-r4kg0z96.js → chunk-5nmm1kvx.js} +1 -1
  52. package/bundle/chunk-5nxgk6hw.js +2 -0
  53. package/bundle/chunk-5qkvhr6y.js +2 -0
  54. package/bundle/{chunk-5zh91zk2.js → chunk-5r7c6vvx.js} +1 -1
  55. package/bundle/{chunk-c6cajbyj.js → chunk-5wx962mw.js} +1 -1
  56. package/bundle/{chunk-7sq5dyv1.js → chunk-5xkp27b1.js} +1 -1
  57. package/bundle/chunk-66qmmmdp.js +2 -0
  58. package/bundle/{chunk-vhzx5bxd.js → chunk-66wv82vf.js} +1 -1
  59. package/bundle/chunk-6dpdkzrk.js +2 -0
  60. package/bundle/chunk-6p6m5956.js +3 -0
  61. package/bundle/{chunk-n4qxj391.js → chunk-6ps30qax.js} +1 -1
  62. package/bundle/{chunk-gbxf6e5d.js → chunk-6qwk6z87.js} +3 -3
  63. package/bundle/{chunk-kmzpeq8k.js → chunk-6tqbnxar.js} +1 -1
  64. package/bundle/{chunk-gdew7bwm.js → chunk-6yhn9syz.js} +1 -1
  65. package/bundle/{chunk-2pex3ak9.js → chunk-72crs18f.js} +1 -1
  66. package/bundle/{chunk-mghnkwp8.js → chunk-7adsab4h.js} +1 -1
  67. package/bundle/{chunk-aqcpk2vg.js → chunk-7b60whxm.js} +1 -1
  68. package/bundle/chunk-7g59hc61.js +2 -0
  69. package/bundle/{chunk-52rdms56.js → chunk-7jy53zqy.js} +1 -1
  70. package/bundle/chunk-7p88j56s.js +2 -0
  71. package/bundle/{chunk-t4b2fm7z.js → chunk-7thhd7ds.js} +1 -1
  72. package/bundle/chunk-7trngc9g.js +2 -0
  73. package/bundle/{chunk-yjqww6ag.js → chunk-82xrfk5x.js} +2 -2
  74. package/bundle/{chunk-4fvbexr8.js → chunk-85wh85pk.js} +1 -1
  75. package/bundle/chunk-8cebbmtf.js +2 -0
  76. package/bundle/chunk-8csas2jc.js +2 -0
  77. package/bundle/chunk-8g4jdqq1.js +2 -0
  78. package/bundle/chunk-8j1xcdmd.js +2 -0
  79. package/bundle/{chunk-ntpn0w9m.js → chunk-8jmb5bd4.js} +2 -2
  80. package/bundle/{chunk-pf3nqf00.js → chunk-8ysp6vf8.js} +1 -1
  81. package/bundle/{chunk-3k7016c2.js → chunk-8yzghzjq.js} +1 -1
  82. package/bundle/{chunk-73xryfgn.js → chunk-9009v4d0.js} +2 -2
  83. package/bundle/chunk-90r2z49k.js +2 -0
  84. package/bundle/{chunk-amp6mvbp.js → chunk-92r1gw2j.js} +1 -1
  85. package/bundle/{chunk-ktp2b4t4.js → chunk-94mjwy22.js} +1 -1
  86. package/bundle/{chunk-f84hw65n.js → chunk-9cf2ktyh.js} +1 -1
  87. package/bundle/{chunk-16srrzjr.js → chunk-9cn8cmt0.js} +1 -1
  88. package/bundle/{chunk-x55h5qdc.js → chunk-a1z8rnq7.js} +3 -3
  89. package/bundle/{chunk-c3szabpf.js → chunk-a48mx917.js} +2 -2
  90. package/bundle/{chunk-prbxhnza.js → chunk-a8bjcvda.js} +1 -1
  91. package/bundle/chunk-aenrd7dk.js +2 -0
  92. package/bundle/{chunk-dw70wds9.js → chunk-afr8m0q1.js} +1 -1
  93. package/bundle/{chunk-7p6mxch0.js → chunk-ag8wxwwz.js} +1 -1
  94. package/bundle/{chunk-22qetqnp.js → chunk-ahmy80vb.js} +1 -1
  95. package/bundle/chunk-avn12jkt.js +2 -0
  96. package/bundle/{chunk-tc9xbn1t.js → chunk-ax64ngf2.js} +1 -1
  97. package/bundle/{chunk-4ngmjk8j.js → chunk-ayb3bdb7.js} +1 -1
  98. package/bundle/{chunk-0crgymtr.js → chunk-az3nss5m.js} +2 -2
  99. package/bundle/chunk-b7ncyat6.js +2 -0
  100. package/bundle/{chunk-dt1wwt7m.js → chunk-b7sr9rn3.js} +1 -1
  101. package/bundle/{chunk-9qzwmt76.js → chunk-bc2krtaf.js} +1 -1
  102. package/bundle/{chunk-0bgssfvq.js → chunk-bjv1h2dq.js} +1 -1
  103. package/bundle/{chunk-8jvfqh3b.js → chunk-bnaj2hh3.js} +1 -1
  104. package/bundle/{chunk-twvmjsxf.js → chunk-bpfq8fz4.js} +1 -1
  105. package/bundle/chunk-brk6bge4.js +3 -0
  106. package/bundle/{chunk-s06t769q.js → chunk-bwadggys.js} +1 -1
  107. package/bundle/chunk-c2a74stf.js +2 -0
  108. package/bundle/{chunk-76h0f86f.js → chunk-c3yjbent.js} +1 -1
  109. package/bundle/{chunk-spzd8rev.js → chunk-c76cjhn0.js} +1 -1
  110. package/bundle/{chunk-705xnxbc.js → chunk-ccf4pgkr.js} +1 -1
  111. package/bundle/chunk-ce5e7j62.js +2 -0
  112. package/bundle/{chunk-2bjfz4fb.js → chunk-cf9m9m9q.js} +1 -1
  113. package/bundle/{chunk-z7kswv9r.js → chunk-cfwz1hgr.js} +3 -3
  114. package/bundle/{chunk-dgva3y5v.js → chunk-cghz0855.js} +1 -1
  115. package/bundle/{chunk-a76w2jwm.js → chunk-cr5tknvb.js} +1 -1
  116. package/bundle/chunk-cw1gwjx9.js +2 -0
  117. package/bundle/chunk-czw30fjs.js +2 -0
  118. package/bundle/{chunk-x80d0zh7.js → chunk-d30k7dpf.js} +1 -1
  119. package/bundle/{chunk-x9fyt3vx.js → chunk-d839fr0w.js} +1 -1
  120. package/bundle/{chunk-n0g4983e.js → chunk-ddx2pcr4.js} +1 -1
  121. package/bundle/{chunk-4byvnx78.js → chunk-dgcannw0.js} +1 -1
  122. package/bundle/{chunk-4rpgwgx9.js → chunk-dhvx9p54.js} +1 -1
  123. package/bundle/chunk-dmkgjf1v.js +3 -0
  124. package/bundle/{chunk-z744mz4w.js → chunk-dt3bsmfe.js} +2 -2
  125. package/bundle/chunk-dwhsvpag.js +2 -0
  126. package/bundle/{chunk-4j76bf4j.js → chunk-dwkrqtbc.js} +1 -1
  127. package/bundle/chunk-e01jgnnm.js +2 -0
  128. package/bundle/chunk-e0hfpdje.js +2 -0
  129. package/bundle/{chunk-f2pv705d.js → chunk-e0vrxetq.js} +1 -1
  130. package/bundle/{chunk-59kk0mce.js → chunk-e2wfj86b.js} +1 -1
  131. package/bundle/chunk-e5jk67xh.js +2 -0
  132. package/bundle/{chunk-ae7b11np.js → chunk-eacpc64g.js} +2 -2
  133. package/bundle/{chunk-hqjc4wgg.js → chunk-eewe7tx1.js} +2 -2
  134. package/bundle/{chunk-etv6c77a.js → chunk-eg1m81ax.js} +1 -1
  135. package/bundle/chunk-eg4pq4hv.js +2 -0
  136. package/bundle/{chunk-9xxnwb33.js → chunk-ejhhrece.js} +3 -3
  137. package/bundle/{chunk-nfzpegqx.js → chunk-epmc4aht.js} +1 -1
  138. package/bundle/chunk-ew3yz97p.js +2 -0
  139. package/bundle/chunk-ezgfhy4e.js +2 -0
  140. package/bundle/{chunk-19pspc1p.js → chunk-f2v4g7t1.js} +1 -1
  141. package/bundle/chunk-f2yfyhh8.js +2 -0
  142. package/bundle/chunk-f30em1wx.js +2 -0
  143. package/bundle/{chunk-k3g28tbw.js → chunk-f81kk8ra.js} +1 -1
  144. package/bundle/{chunk-p847g35y.js → chunk-f8cae1ap.js} +1 -1
  145. package/bundle/{chunk-vp3yf46q.js → chunk-fa8pwdwv.js} +1 -1
  146. package/bundle/{chunk-dz3bec8g.js → chunk-fej5x648.js} +1 -1
  147. package/bundle/{chunk-14d301ze.js → chunk-fge37dke.js} +1 -1
  148. package/bundle/{chunk-0tqmm8b8.js → chunk-fh3d0wce.js} +1 -1
  149. package/bundle/{chunk-twd6r7nf.js → chunk-fjftb2sz.js} +1 -1
  150. package/bundle/{chunk-xhh70g8j.js → chunk-fs1vb39f.js} +2 -2
  151. package/bundle/{chunk-9g9katgy.js → chunk-ftvvm4r5.js} +2 -2
  152. package/bundle/{chunk-ptwex14s.js → chunk-fw1f47de.js} +1 -1
  153. package/bundle/{chunk-y2t5pmqw.js → chunk-g26redah.js} +1 -1
  154. package/bundle/{chunk-acd72413.js → chunk-g3n465ee.js} +1 -1
  155. package/bundle/{chunk-hfefq104.js → chunk-g4tyaj0m.js} +1 -1
  156. package/bundle/{chunk-a610qd3x.js → chunk-g6y2c5az.js} +1 -1
  157. package/bundle/{chunk-tezrgfc6.js → chunk-g7v6sp3c.js} +2 -2
  158. package/bundle/{chunk-4bewbvvr.js → chunk-g878zd6e.js} +1 -1
  159. package/bundle/{chunk-na1wr2qf.js → chunk-g9nwqwqp.js} +1 -1
  160. package/bundle/chunk-gbvm6dpv.js +2 -0
  161. package/bundle/{chunk-ns8xnkjb.js → chunk-gc5rhnht.js} +1 -1
  162. package/bundle/{chunk-q6p92zyn.js → chunk-gefx3n08.js} +1 -1
  163. package/bundle/{chunk-xcxqt8ag.js → chunk-ggncq8w8.js} +1 -1
  164. package/bundle/{chunk-gwrnxcdn.js → chunk-gsg6zn7e.js} +1 -1
  165. package/bundle/{chunk-4jpab7ag.js → chunk-gznt3dv8.js} +1 -1
  166. package/bundle/{chunk-defj5zs6.js → chunk-h1bvqstw.js} +1 -1
  167. package/bundle/{chunk-dd4qnh8s.js → chunk-h4hs2rhf.js} +1 -1
  168. package/bundle/chunk-h5w91zr4.js +2 -0
  169. package/bundle/{chunk-qp3hxqg5.js → chunk-h8mfbbjh.js} +1 -1
  170. package/bundle/{chunk-w43kmnm9.js → chunk-he9kpk9r.js} +357 -357
  171. package/bundle/chunk-hmpb3c21.js +2 -0
  172. package/bundle/{chunk-6gqs1k7m.js → chunk-hz02vrqs.js} +1 -1
  173. package/bundle/{chunk-3xdmxm5t.js → chunk-j10a984e.js} +1 -1
  174. package/bundle/chunk-j32rr7rt.js +2 -0
  175. package/bundle/chunk-j871xzr7.js +2 -0
  176. package/bundle/{chunk-kfj37631.js → chunk-jmmtcr2r.js} +1 -1
  177. package/bundle/{chunk-h7658zxy.js → chunk-jpn9zfj5.js} +1 -1
  178. package/bundle/{chunk-wgt1tqw9.js → chunk-jqj1ay7x.js} +1 -1
  179. package/bundle/{chunk-e4g4mvak.js → chunk-jr80q31w.js} +1 -1
  180. package/bundle/chunk-k3hgwszx.js +2 -0
  181. package/bundle/{chunk-k6zwfstj.js → chunk-kckr30tf.js} +1 -1
  182. package/bundle/{chunk-8rfqv5he.js → chunk-kgv68cpb.js} +1 -1
  183. package/bundle/{chunk-tkzctbxq.js → chunk-khpfseej.js} +2 -2
  184. package/bundle/{chunk-55way0em.js → chunk-kveztc6k.js} +1 -1
  185. package/bundle/{chunk-znmbfx70.js → chunk-kwfe4em6.js} +1 -1
  186. package/bundle/chunk-kx88qekb.js +2 -0
  187. package/bundle/{chunk-nbckdba0.js → chunk-m4r8sepw.js} +1 -1
  188. package/bundle/{chunk-6ychs4wx.js → chunk-m7tmgvh6.js} +1 -1
  189. package/bundle/{chunk-egkhynj5.js → chunk-makegrxs.js} +1 -1
  190. package/bundle/{chunk-438faz6b.js → chunk-mr17tppa.js} +1 -1
  191. package/bundle/{chunk-yzpc5kj2.js → chunk-mv7q6ach.js} +1 -1
  192. package/bundle/chunk-n61e0znt.js +2 -0
  193. package/bundle/{chunk-kry4vcrf.js → chunk-n6tqtk6h.js} +2 -2
  194. package/bundle/chunk-n6v36np0.js +2 -0
  195. package/bundle/chunk-ndd4cn3z.js +2 -0
  196. package/bundle/{chunk-d1tb1jd0.js → chunk-nfafk3ts.js} +1 -1
  197. package/bundle/{chunk-b6eypnbj.js → chunk-nga216dm.js} +1 -1
  198. package/bundle/{chunk-qbrj9wzd.js → chunk-njsmma3a.js} +1 -1
  199. package/bundle/{chunk-bk7f59fn.js → chunk-ntr0ezf2.js} +1 -1
  200. package/bundle/chunk-nwj6mcxz.js +2 -0
  201. package/bundle/{chunk-cth373se.js → chunk-p2fte9vz.js} +2 -2
  202. package/bundle/chunk-p5b5ekhh.js +2 -0
  203. package/bundle/chunk-pf23nw4z.js +2 -0
  204. package/bundle/{chunk-whw18cn9.js → chunk-phf37x1c.js} +1 -1
  205. package/bundle/{chunk-r73e8gsp.js → chunk-phpxxd48.js} +1 -1
  206. package/bundle/{chunk-1ay97v74.js → chunk-pqg1wjb5.js} +1 -1
  207. package/bundle/chunk-pw3cv89g.js +2 -0
  208. package/bundle/{chunk-77h8tytk.js → chunk-q3c8mfbq.js} +1 -1
  209. package/bundle/{chunk-0am156m5.js → chunk-qbnt4ynd.js} +1 -1
  210. package/bundle/chunk-qc89yj61.js +2 -0
  211. package/bundle/{chunk-mjrqhbp2.js → chunk-qgek59e6.js} +1 -1
  212. package/bundle/{chunk-npzx3yd5.js → chunk-qgfbsmsx.js} +1 -1
  213. package/bundle/{chunk-v9w88wpy.js → chunk-qgkb6n8k.js} +1 -1
  214. package/bundle/{chunk-2c41dncf.js → chunk-qk1jkc0n.js} +1 -1
  215. package/bundle/{chunk-wb1d3mqw.js → chunk-qk5vy2pr.js} +1 -1
  216. package/bundle/chunk-qn8tz704.js +2 -0
  217. package/bundle/{chunk-9a6p1gdn.js → chunk-qq9m8fxv.js} +7 -7
  218. package/bundle/{chunk-5b3v1x2c.js → chunk-qxdpgdfk.js} +2 -2
  219. package/bundle/chunk-qxre2gqn.js +2 -0
  220. package/bundle/chunk-rdk62809.js +2 -0
  221. package/bundle/chunk-rew6r516.js +2 -0
  222. package/bundle/chunk-rjhvdfn5.js +2 -0
  223. package/bundle/chunk-rmsqb6r4.js +10 -0
  224. package/bundle/{chunk-qph2c2v7.js → chunk-rva2ekrt.js} +1 -1
  225. package/bundle/{chunk-7z96r2px.js → chunk-rwnwjm82.js} +1 -1
  226. package/bundle/{chunk-tz3s8dvy.js → chunk-rye1yjnr.js} +1 -1
  227. package/bundle/{chunk-t9qyzzsz.js → chunk-ryrxgn6d.js} +1 -1
  228. package/bundle/{chunk-wjz42325.js → chunk-s2tc3qs0.js} +2 -2
  229. package/bundle/{chunk-djqxbnwc.js → chunk-s8z7v1me.js} +1 -1
  230. package/bundle/{chunk-msh249db.js → chunk-sa0rrreh.js} +2 -2
  231. package/bundle/{chunk-dbpkq7ba.js → chunk-sbjymf20.js} +2 -2
  232. package/bundle/{chunk-n5p7cn4w.js → chunk-scnbt714.js} +1 -1
  233. package/bundle/chunk-skgr9ypq.js +2 -0
  234. package/bundle/{chunk-rhrcgvb8.js → chunk-sm1g81cv.js} +1 -1
  235. package/bundle/chunk-sv40pwe2.js +2 -0
  236. package/bundle/{chunk-qprbef09.js → chunk-sy9w1t2y.js} +1 -1
  237. package/bundle/{chunk-bd84t3fb.js → chunk-sz0favtz.js} +1 -1
  238. package/bundle/{chunk-xb3sxa6f.js → chunk-t18ka1e7.js} +1 -1
  239. package/bundle/{chunk-va2qfh0x.js → chunk-t3w43rft.js} +1 -1
  240. package/bundle/{chunk-n9twhc5d.js → chunk-t6zz47zk.js} +1 -1
  241. package/bundle/{chunk-wd8hbven.js → chunk-t8fjgkp8.js} +1 -1
  242. package/bundle/{chunk-6r48fje7.js → chunk-tbx741en.js} +1 -1
  243. package/bundle/chunk-tfhpjmny.js +2 -0
  244. package/bundle/chunk-tnete6ye.js +2 -0
  245. package/bundle/{chunk-2y87m7pe.js → chunk-tpyq7ycb.js} +1 -1
  246. package/bundle/{chunk-nftbj8g9.js → chunk-trstb8ee.js} +1 -1
  247. package/bundle/chunk-tsmj98yf.js +5 -0
  248. package/bundle/{chunk-skxg3s8z.js → chunk-txkdt4ep.js} +1 -1
  249. package/bundle/chunk-v5h5wxw5.js +2 -0
  250. package/bundle/chunk-v6141yq1.js +2 -0
  251. package/bundle/{chunk-vjn54xj5.js → chunk-vbfej8ds.js} +2 -2
  252. package/bundle/{chunk-9aafddkw.js → chunk-vfd3azkp.js} +1 -1
  253. package/bundle/chunk-vjs69r6x.js +2 -0
  254. package/bundle/{chunk-ts2k13g0.js → chunk-vkjqy92f.js} +1 -1
  255. package/bundle/chunk-vmhar83s.js +2 -0
  256. package/bundle/{chunk-zp5sr5nx.js → chunk-vph4w4yy.js} +1 -1
  257. package/bundle/chunk-vqvnw12p.js +2 -0
  258. package/bundle/{chunk-0g0jpw0z.js → chunk-vr8nwzp0.js} +1 -1
  259. package/bundle/{chunk-nrk29616.js → chunk-vs3s49jw.js} +1 -1
  260. package/bundle/{chunk-v0c3k797.js → chunk-vsqvnxbz.js} +1 -1
  261. package/bundle/{chunk-rqedtjz9.js → chunk-w0nc0gcx.js} +1 -1
  262. package/bundle/{chunk-y5q9v80n.js → chunk-w0sng8a9.js} +1 -1
  263. package/bundle/chunk-w0sztk4y.js +2 -0
  264. package/bundle/chunk-w6bb320d.js +2 -0
  265. package/bundle/{chunk-t8sy5sgx.js → chunk-w7a33cwa.js} +2 -2
  266. package/bundle/{chunk-2cjfezfr.js → chunk-w9qh2479.js} +1 -1
  267. package/bundle/{chunk-42q8vj0w.js → chunk-waa1ggtj.js} +1 -1
  268. package/bundle/{chunk-v3nmnm57.js → chunk-wb05bp10.js} +2 -2
  269. package/bundle/{chunk-agqss9ga.js → chunk-wb47k8ah.js} +2 -2
  270. package/bundle/{chunk-rfzra502.js → chunk-wd8f9r4k.js} +1 -1
  271. package/bundle/chunk-wf41m019.js +2 -0
  272. package/bundle/{chunk-hwsqqkrv.js → chunk-wgkcyqn1.js} +2 -2
  273. package/bundle/{chunk-dy2k5rdx.js → chunk-wm9nh9nb.js} +2 -2
  274. package/bundle/{chunk-6nxebcf8.js → chunk-wn63q3xp.js} +1 -1
  275. package/bundle/{chunk-z6kcnpsj.js → chunk-wqk1v8t0.js} +2 -2
  276. package/bundle/chunk-wqw6yjrg.js +2 -0
  277. package/bundle/{chunk-q3pt4p9f.js → chunk-wr6rnxr5.js} +1 -1
  278. package/bundle/chunk-ws08rxge.js +2 -0
  279. package/bundle/{chunk-dw7yrk1g.js → chunk-wtt5wms9.js} +1 -1
  280. package/bundle/{chunk-93pmbdz7.js → chunk-wtxh5m6j.js} +6 -6
  281. package/bundle/chunk-wz3dvc3g.js +2 -0
  282. package/bundle/{chunk-vzrc2fmt.js → chunk-x00hwy3x.js} +1 -1
  283. package/bundle/chunk-x2pmqvdc.js +2 -0
  284. package/bundle/chunk-x4wfq39v.js +2 -0
  285. package/bundle/{chunk-q6mcnq9p.js → chunk-xs6v0r9m.js} +1 -1
  286. package/bundle/{chunk-3623jvcm.js → chunk-xy8arehp.js} +1 -1
  287. package/bundle/{chunk-mhxyv9c8.js → chunk-y3gy62q5.js} +1 -1
  288. package/bundle/chunk-yb6m08zj.js +2 -0
  289. package/bundle/{chunk-b79z8f94.js → chunk-ybcqkgs7.js} +1 -1
  290. package/bundle/{chunk-95am490c.js → chunk-ydgst3h8.js} +2 -2
  291. package/bundle/{chunk-twfvrafb.js → chunk-ykpj10nz.js} +1 -1
  292. package/bundle/{chunk-e0zb6sw6.js → chunk-ynf17943.js} +1 -1
  293. package/bundle/{chunk-yy7r3t3w.js → chunk-ytyzrqev.js} +1 -1
  294. package/bundle/{chunk-01e3v1xz.js → chunk-z0kbyr00.js} +2 -2
  295. package/bundle/{chunk-4vzjdmts.js → chunk-zfrftgcy.js} +1 -1
  296. package/bundle/chunk-zj1jc1xt.js +2 -0
  297. package/bundle/{chunk-9sv53kb4.js → chunk-zm0m0504.js} +1 -1
  298. package/bundle/{chunk-gdj7mqrd.js → chunk-zqdjk4rf.js} +1 -1
  299. package/bundle/{chunk-7x2q1w0f.js → chunk-zsg29gba.js} +1 -1
  300. package/bundle/{chunk-1c0yp2gv.js → chunk-zwhmg9dj.js} +1 -1
  301. package/bundle/index.js +3 -3
  302. package/bundle/parser.worker.js +2 -2
  303. package/bundle/worker.js +1 -1
  304. package/package.json +1 -1
  305. package/bundle/chunk-0dzpjk7x.js +0 -2
  306. package/bundle/chunk-12fwmmcp.js +0 -2
  307. package/bundle/chunk-1a95ysv3.js +0 -2
  308. package/bundle/chunk-1akh8pk2.js +0 -2
  309. package/bundle/chunk-2d2a92kj.js +0 -2
  310. package/bundle/chunk-2qrvkef8.js +0 -2
  311. package/bundle/chunk-2tppw8j9.js +0 -2
  312. package/bundle/chunk-3ft1dn9j.js +0 -2
  313. package/bundle/chunk-3rgct4bd.js +0 -11
  314. package/bundle/chunk-4656qm05.js +0 -2
  315. package/bundle/chunk-46knch5z.js +0 -2
  316. package/bundle/chunk-4sgy87h5.js +0 -2
  317. package/bundle/chunk-54hktc8h.js +0 -2
  318. package/bundle/chunk-59m55866.js +0 -2
  319. package/bundle/chunk-5js5nw7r.js +0 -2
  320. package/bundle/chunk-61jn7908.js +0 -2
  321. package/bundle/chunk-61txdqz1.js +0 -2
  322. package/bundle/chunk-668g9wkg.js +0 -2
  323. package/bundle/chunk-6frhjpmt.js +0 -2
  324. package/bundle/chunk-6k14c8x1.js +0 -5
  325. package/bundle/chunk-6r1jpj0h.js +0 -2
  326. package/bundle/chunk-73fn4dqd.js +0 -2
  327. package/bundle/chunk-78j2c2je.js +0 -2
  328. package/bundle/chunk-78jt24ht.js +0 -2
  329. package/bundle/chunk-7j2vpavd.js +0 -2
  330. package/bundle/chunk-7nkxgm72.js +0 -2
  331. package/bundle/chunk-859pkecc.js +0 -2
  332. package/bundle/chunk-8p249svd.js +0 -2
  333. package/bundle/chunk-8rqbx4jw.js +0 -2
  334. package/bundle/chunk-8s3krfsm.js +0 -2
  335. package/bundle/chunk-9wbe0dkx.js +0 -2
  336. package/bundle/chunk-aj5z8qd5.js +0 -2
  337. package/bundle/chunk-b0c2mvc0.js +0 -2
  338. package/bundle/chunk-bbwcsdy9.js +0 -2
  339. package/bundle/chunk-bbzjdbb9.js +0 -2
  340. package/bundle/chunk-bh4s1yct.js +0 -2
  341. package/bundle/chunk-crqcppwq.js +0 -2
  342. package/bundle/chunk-d09zpgj1.js +0 -2
  343. package/bundle/chunk-dexcptaz.js +0 -3
  344. package/bundle/chunk-dgqkak21.js +0 -2
  345. package/bundle/chunk-dhgvh7c3.js +0 -2
  346. package/bundle/chunk-dmd101ja.js +0 -2
  347. package/bundle/chunk-dwb39jdf.js +0 -2
  348. package/bundle/chunk-dx4zxex7.js +0 -2
  349. package/bundle/chunk-e2pqvscp.js +0 -2
  350. package/bundle/chunk-efe6kj3d.js +0 -2
  351. package/bundle/chunk-emac0dss.js +0 -2
  352. package/bundle/chunk-encfnt6w.js +0 -2
  353. package/bundle/chunk-fg2nyz2x.js +0 -2
  354. package/bundle/chunk-ge19ff9d.js +0 -2
  355. package/bundle/chunk-gt0q07xq.js +0 -2
  356. package/bundle/chunk-h4dnjfr2.js +0 -2
  357. package/bundle/chunk-h8fx619t.js +0 -2
  358. package/bundle/chunk-jnvb3s7f.js +0 -2
  359. package/bundle/chunk-jrq2xw6e.js +0 -2
  360. package/bundle/chunk-jwckmhjm.js +0 -2
  361. package/bundle/chunk-jz27ypm5.js +0 -2
  362. package/bundle/chunk-jzrs878d.js +0 -2
  363. package/bundle/chunk-jzx700tb.js +0 -2
  364. package/bundle/chunk-k1x8469r.js +0 -3
  365. package/bundle/chunk-m483jvn8.js +0 -2
  366. package/bundle/chunk-menbcmkq.js +0 -2
  367. package/bundle/chunk-np8h66t0.js +0 -2
  368. package/bundle/chunk-nwwmns3w.js +0 -2
  369. package/bundle/chunk-pe5dpzec.js +0 -2
  370. package/bundle/chunk-q8f6a074.js +0 -2
  371. package/bundle/chunk-qqaevt32.js +0 -2
  372. package/bundle/chunk-qzpvz708.js +0 -2
  373. package/bundle/chunk-reyjr2e0.js +0 -2
  374. package/bundle/chunk-t178njgb.js +0 -2
  375. package/bundle/chunk-tjpev5t6.js +0 -2
  376. package/bundle/chunk-tzq7wjgv.js +0 -3
  377. package/bundle/chunk-v1s16wwd.js +0 -2
  378. package/bundle/chunk-v6b29nx4.js +0 -2
  379. package/bundle/chunk-v6rgd1j5.js +0 -2
  380. package/bundle/chunk-v9dnetq8.js +0 -2
  381. package/bundle/chunk-vd5mpvcc.js +0 -2
  382. package/bundle/chunk-wwct4z7j.js +0 -2
  383. package/bundle/chunk-xr9wz961.js +0 -2
  384. package/bundle/chunk-zfegnt1e.js +0 -2
  385. package/bundle/chunk-zg7kesbp.js +0 -2
  386. package/bundle/chunk-zy06fe4r.js +0 -2
@@ -1,11 +1,11 @@
1
1
  // @bun
2
- import{Oe as a}from"./chunk-qdvnscxm.js";import{Ef as fK,Ff as yK,Hf as b_,If as hG,Jf as DG,Kf as DW}from"./chunk-yxttz5z5.js";import{TP as k,WP as N}from"./chunk-f2pv705d.js";var k_=k((iW)=>{var qW=N("stream"),g=b_(),U=a(),i=DW(),L_=(_)=>_?.body instanceof qW.Readable||typeof ReadableStream<"u"&&_?.body instanceof ReadableStream,IW=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],TW=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],SW=["TimeoutError","RequestTimeout","RequestTimeoutException"],PW=[500,502,503,504],RW=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],AW=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND","EAI_AGAIN"],n=(_)=>_?.$retryable!==void 0,Q_=(_)=>IW.includes(_.name),j_=(_)=>_.$metadata?.clockSkewCorrected,J_=(_)=>{let W=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);if(!(_&&_ instanceof TypeError))return!1;return W.has(_.message)},q=(_)=>_.$metadata?.httpStatusCode===429||TW.includes(_.name)||_.$retryable?.throttling==!0,I=(_,W=0)=>n(_)||j_(_)||_.name==="InvalidSignatureException"&&_.message?.includes("Signature expired")||SW.includes(_.name)||RW.includes(_?.code||"")||AW.includes(_?.code||"")||PW.includes(_.$metadata?.httpStatusCode||0)||J_(_)||w_(_)||_.cause!==void 0&&W<=10&&I(_.cause,W+1),O_=(_)=>{if(_.$metadata?.httpStatusCode!==void 0){let W=_.$metadata.httpStatusCode;if(500<=W&&W<=599&&!I(_))return!0;return!1}return!1};function w_(_){return _.code==="ERR_HTTP2_STREAM_ERROR"&&_.message.includes("NGHTTP2_REFUSED_STREAM")}var B_=100,v=20000,H_=500,A=500,z_=5,F_=10,o=1,x="amz-sdk-invocation-id",f="amz-sdk-request";function M_(_,W){if(!U.HttpResponse.isInstance(_))return;for(let K of Object.keys(_.headers)){let G=K.toLowerCase();if(G==="retry-after"){let Y=_.headers[K],X=NaN;if(Y.endsWith("GMT"))try{X=(i.parseRfc7231DateTime(Y).getTime()-Date.now())/1000}catch($){W?.trace?.("Failed to parse retry-after header"),W?.trace?.($)}else if(Y.match(/ GMT, ((\d+)|(\d+\.\d+))$/))X=Number(Y.match(/ GMT, ([\d.]+)$/)?.[1]);else if(Y.match(/^((\d+)|(\d+\.\d+))$/))X=Number(Y);else if(Date.parse(Y)>=Date.now())X=(Date.parse(Y)-Date.now())/1000;if(isNaN(X))return;return new Date(Date.now()+X*1000)}else if(G==="x-amz-retry-after"){let Y=_.headers[K],X=Number(Y);if(isNaN(X)){W?.trace?.(`Failed to parse x-amz-retry-after=${Y}`);return}return new Date(Date.now()+X)}}}function kW(_,W){return M_(_,W)}var V_=(_)=>{if(_ instanceof Error)return _;if(_ instanceof Object)return Object.assign(Error(),_);if(typeof _==="string")return Error(_);return Error(`AWS SDK error wrapper for ${_}`)};function N_(_){return(W)=>(K,G)=>async(Y)=>{let X=await W.retryStrategy(),$=await W.maxAttempts();if(xW(X)){X=X;let Z=await X.acquireInitialRetryToken((G.partition_id??"")+(G.__retryLongPoll?":longpoll":"")),L=Error(),b=0,j=0,{request:Q}=Y,J=U.HttpRequest.isInstance(Q);if(J)Q.headers[x]=i.v4();while(!0)try{if(J)Q.headers[f]=`attempt=${b+1}; max=${$}`;let{response:w,output:F}=await K(Y);return X.recordSuccess(Z),F.$metadata.attempts=b+1,F.$metadata.totalRetryDelay=j,{response:w,output:F}}catch(w){let F=fW(w,W.logger);if(L=V_(w),J&&_(Q))throw(G.logger instanceof g.NoOpLogger?console:G.logger)?.warn("An error was encountered in a non-retryable streaming request."),L;try{Z=await X.refreshRetryTokenForRetry(Z,F)}catch(wX){if(!L.$metadata)L.$metadata={};throw L.$metadata.attempts=b+1,L.$metadata.totalRetryDelay=j,L}b=Z.getRetryCount();let h=Z.getRetryDelay();if(j+=(Z?.$retryLog?.acquisitionDelay??0)+h,h>0)await vW(h)}}else{if(X=X,X?.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",X.mode]];return X.retry(K,Y)}}}var vW=(_)=>new Promise((W)=>setTimeout(W,_)),xW=(_)=>typeof _.acquireInitialRetryToken<"u"&&typeof _.refreshRetryTokenForRetry<"u"&&typeof _.recordSuccess<"u",fW=(_,W)=>{let K={error:_,errorType:yW(_)},G=M_(_.$response,W);if(G)K.retryAfterHint=G;return K},yW=(_)=>{if(q(_))return"THROTTLING";if(I(_))return"TRANSIENT";if(O_(_))return"SERVER_ERROR";return"CLIENT_ERROR"},U_={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0};function lW(_){let W=N_(_);return(K)=>({applyToStack:(G)=>{G.add(W(K),U_)}})}class T{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(_){this.beta=_?.beta??0.7,this.minCapacity=_?.minCapacity??1,this.minFillRate=_?.minFillRate??0.5,this.scaleConstant=_?.scaleConstant??0.4,this.smooth=_?.smooth??0.8,this.lastThrottleTime=this.getCurrentTimeInSeconds(),this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}async getSendToken(){return this.acquireTokenBucket(1)}updateClientSendingRate(_){let W;this.updateMeasuredRate();let K=_;if(K?.errorType==="THROTTLING"||q(K?.error??_)){let X=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=X,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),W=this.cubicThrottle(X),this.enableTokenBucket()}else this.calculateTimeWindow(),W=this.cubicSuccess(this.getCurrentTimeInSeconds());let Y=Math.min(W,2*this.measuredTxRate);this.updateTokenBucketRate(Y)}getCurrentTimeInSeconds(){return Date.now()/1000}async acquireTokenBucket(_){if(!this.enabled)return;this.refillTokenBucket();while(_>this.availableTokens){let W=(_-this.availableTokens)/this.fillRate*1000;await new Promise((K)=>T.setTimeoutFn(K,W)),this.refillTokenBucket()}this.availableTokens=this.availableTokens-_}refillTokenBucket(){let _=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=_;return}let W=(_-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+W),this.lastTimestamp=_}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(_){return this.getPrecise(_*this.beta)}cubicSuccess(_){return this.getPrecise(this.scaleConstant*Math.pow(_-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(_){this.refillTokenBucket(),this.fillRate=Math.max(_,this.minFillRate),this.maxCapacity=Math.max(_,this.minCapacity),this.availableTokens=Math.min(this.availableTokens,this.maxCapacity)}updateMeasuredRate(){let _=this.getCurrentTimeInSeconds(),W=Math.floor(_*2)/2;if(this.requestCount++,W>this.lastTxRateBucket){let K=this.requestCount/(W-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(K*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=W}}getPrecise(_){return parseFloat(_.toFixed(8))}}class O{static v2026=typeof process<"u"&&process.env?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return O.v2026?50:100}static throttlingDelay(){return O.v2026?1000:500}static cost(){return O.v2026?14:5}static throttlingCost(){return O.v2026?5:10}static modifiedCostType(){return O.v2026?"THROTTLING":"TRANSIENT"}}class E_{x=O.delay();computeNextBackoffDelay(_){let W=Math.random(),K=2,G=W*Math.min(this.x*2**_,v);return Math.floor(G)}setDelayBase(_){this.x=_}}class u{delay;count;cost;longPoll;$retryLog={acquisitionDelay:0};constructor(_,W,K,G){this.delay=_,this.count=W,this.cost=K,this.longPoll=G}getRetryCount(){return this.count}getRetryDelay(){return Math.min(v,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}iW.RETRY_MODES=void 0;(function(_){_.STANDARD="standard",_.ADAPTIVE="adaptive"})(iW.RETRY_MODES||(iW.RETRY_MODES={}));var V=3,C_=iW.RETRY_MODES.STANDARD,R={incompatible:1,attempts:2,capacity:3},D=class{mode=iW.RETRY_MODES.STANDARD;retryBackoffStrategy;capacity=A;maxAttemptsProvider;baseDelay;constructor(W){if(typeof W==="number")this.maxAttemptsProvider=async()=>W;else if(typeof W==="function")this.maxAttemptsProvider=W;else if(W&&typeof W==="object")this.maxAttemptsProvider=async()=>W.maxAttempts,this.baseDelay=W.baseDelay,this.retryBackoffStrategy=W.backoff;this.maxAttemptsProvider??=async()=>V,this.baseDelay??=O.delay(),this.retryBackoffStrategy??=new E_}async acquireInitialRetryToken(W){return new u(O.delay(),0,void 0,O.v2026&&W.includes(":longpoll"))}async refreshRetryTokenForRetry(W,K){let G=await this.getMaxAttempts(),Y=this.retryCode(W,K,G),X=Y===0,$=W.isLongPoll?.();if(X||$){let Z=K.errorType;this.retryBackoffStrategy.setDelayBase(Z==="THROTTLING"?O.throttlingDelay():this.baseDelay);let L=this.retryBackoffStrategy.computeNextBackoffDelay(W.getRetryCount()),b=L;if(K.retryAfterHint instanceof Date)b=Math.max(L,Math.min(K.retryAfterHint.getTime()-Date.now(),L+5000));if(!X){let j=O.v2026&&Y===R.capacity&&$?b:0;if(j>0)await new Promise((Q)=>setTimeout(Q,j))}else{let j=this.getCapacityCost(Z);this.capacity-=j;let Q=new u(0,W.getRetryCount()+1,j,W.isLongPoll?.()??!1);return await new Promise((J)=>setTimeout(J,b)),Q.$retryLog.acquisitionDelay=b,Q}}throw Error("No retry token available")}recordSuccess(W){this.capacity=Math.min(A,this.capacity+(W.getRetryCost()??o))}getCapacity(){return this.capacity}async maxAttempts(){return this.maxAttemptsProvider()}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(W){return console.warn(`Max attempts provider could not resolve. Using default of ${V}`),V}}retryCode(W,K,G){let Y=W.getRetryCount()+1,X=this.isRetryableError(K.errorType)?0:R.incompatible,$=Y<G?0:R.attempts,Z=this.capacity>=this.getCapacityCost(K.errorType)?0:R.capacity;return X||$||Z}getCapacityCost(W){return W===O.modifiedCostType()?O.throttlingCost():O.cost()}isRetryableError(W){return W==="THROTTLING"||W==="TRANSIENT"}},h_=class{mode=iW.RETRY_MODES.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(W,K){let{rateLimiter:G}=K??{};this.rateLimiter=G??new T,this.standardRetryStrategy=K?new D({maxAttempts:typeof W==="number"?W:3,...K}):new D(W)}async acquireInitialRetryToken(W){let K=await this.standardRetryStrategy.acquireInitialRetryToken(W);return await this.rateLimiter.getSendToken(),K}async refreshRetryTokenForRetry(W,K){this.rateLimiter.updateClientSendingRate(K);let G=await this.standardRetryStrategy.refreshRetryTokenForRetry(W,K);return await this.rateLimiter.getSendToken(),G}recordSuccess(W){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(W)}async maxAttemptsProvider(){return this.standardRetryStrategy.maxAttempts()}};class D_ extends D{computeNextBackoffDelay;constructor(_,W=O.delay()){super(typeof _==="function"?_:async()=>_);if(typeof W==="number")this.computeNextBackoffDelay=()=>W;else this.computeNextBackoffDelay=W;this.retryBackoffStrategy.computeNextBackoffDelay=(K)=>{let G=K+1;return this.computeNextBackoffDelay(G)}}}var cW=(_,W)=>{let K=_,G=o,Y=z_,X=F_,$=_,Z=(Q)=>Q.name==="TimeoutError"?X:Y,L=(Q)=>Z(Q)<=$;return Object.freeze({hasRetryTokens:L,retrieveRetryTokens:(Q)=>{if(!L(Q))throw Error("No retry token available");let J=Z(Q);return $-=J,J},releaseRetryTokens:(Q)=>{$+=Q??G,$=Math.min($,K)}})},q_=(_,W)=>Math.floor(Math.min(v,Math.random()*2**W*_)),I_=(_)=>{if(!_)return!1;return n(_)||Q_(_)||q(_)||I(_)};class t{maxAttemptsProvider;retryDecider;delayDecider;retryQuota;mode=iW.RETRY_MODES.STANDARD;constructor(_,W){this.maxAttemptsProvider=_,this.retryDecider=W?.retryDecider??I_,this.delayDecider=W?.delayDecider??q_,this.retryQuota=W?.retryQuota??cW(A)}shouldRetry(_,W,K){return W<K&&this.retryDecider(_)&&this.retryQuota.hasRetryTokens(_)}async getMaxAttempts(){let _;try{_=await this.maxAttemptsProvider()}catch(W){_=V}return _}async retry(_,W,K){let G,Y=0,X=0,$=await this.getMaxAttempts(),{request:Z}=W;if(U.HttpRequest.isInstance(Z))Z.headers[x]=i.v4();while(!0)try{if(U.HttpRequest.isInstance(Z))Z.headers[f]=`attempt=${Y+1}; max=${$}`;if(K?.beforeRequest)await K.beforeRequest();let{response:L,output:b}=await _(W);if(K?.afterRequest)K.afterRequest(L);return this.retryQuota.releaseRetryTokens(G),b.$metadata.attempts=Y+1,b.$metadata.totalRetryDelay=X,{response:L,output:b}}catch(L){let b=V_(L);if(Y++,this.shouldRetry(b,Y,$)){G=this.retryQuota.retrieveRetryTokens(b);let j=this.delayDecider(q(b)?H_:B_,Y),Q=dW(b.$response),J=Math.max(Q||0,j);X+=J,await new Promise((w)=>setTimeout(w,J));continue}if(!b.$metadata)b.$metadata={};throw b.$metadata.attempts=Y,b.$metadata.totalRetryDelay=X,b}}}var dW=(_)=>{if(!U.HttpResponse.isInstance(_))return;let W=Object.keys(_.headers).find((X)=>X.toLowerCase()==="retry-after");if(!W)return;let K=_.headers[W],G=Number(K);if(!Number.isNaN(G))return G*1000;return new Date(K).getTime()-Date.now()};class T_ extends t{rateLimiter;constructor(_,W){let{rateLimiter:K,...G}=W??{};super(_,G);this.rateLimiter=K??new T,this.mode=iW.RETRY_MODES.ADAPTIVE}async retry(_,W){return super.retry(_,W,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(K)=>{this.rateLimiter.updateClientSendingRate(K)}})}}var p="AWS_MAX_ATTEMPTS",s="max_attempts",mW={environmentVariableSelector:(_)=>{let W=_[p];if(!W)return;let K=parseInt(W);if(Number.isNaN(K))throw Error(`Environment variable ${p} mast be a number, got "${W}"`);return K},configFileSelector:(_)=>{let W=_[s];if(!W)return;let K=parseInt(W);if(Number.isNaN(K))throw Error(`Shared config file entry ${s} mast be a number, got "${W}"`);return K},default:V},gW=(_,W)=>{let{retryStrategy:K,retryMode:G}=_,{defaultMaxAttempts:Y=V,defaultBaseDelay:X=O.delay()}=W??{},$=g.normalizeProvider(_.maxAttempts??Y),Z=K?Promise.resolve(K):void 0,L=async()=>{let b=await $();if(await g.normalizeProvider(G)()===iW.RETRY_MODES.ADAPTIVE)return new h_($,{maxAttempts:b,baseDelay:X});return new D({maxAttempts:b,baseDelay:X})};return Object.assign(_,{maxAttempts:$,retryStrategy:()=>Z??=L()})},S_="AWS_RETRY_MODE",P_="retry_mode",uW={environmentVariableSelector:(_)=>_[S_],configFileSelector:(_)=>_[P_],default:C_},R_=()=>(_)=>async(W)=>{let{request:K}=W;if(U.HttpRequest.isInstance(K))delete K.headers[x],delete K.headers[f];return _(W)},A_={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},pW=(_)=>({applyToStack:(W)=>{W.addRelativeTo(R_(),A_)}}),sW=N_(L_),aW=lW(L_);iW.AdaptiveRetryStrategy=h_;iW.CONFIG_MAX_ATTEMPTS=s;iW.CONFIG_RETRY_MODE=P_;iW.ConfiguredRetryStrategy=D_;iW.DEFAULT_MAX_ATTEMPTS=V;iW.DEFAULT_RETRY_DELAY_BASE=B_;iW.DEFAULT_RETRY_MODE=C_;iW.DefaultRateLimiter=T;iW.DeprecatedAdaptiveRetryStrategy=T_;iW.DeprecatedStandardRetryStrategy=t;iW.ENV_MAX_ATTEMPTS=p;iW.ENV_RETRY_MODE=S_;iW.INITIAL_RETRY_TOKENS=A;iW.INVOCATION_ID_HEADER=x;iW.MAXIMUM_RETRY_DELAY=v;iW.NODE_MAX_ATTEMPT_CONFIG_OPTIONS=mW;iW.NODE_RETRY_MODE_CONFIG_OPTIONS=uW;iW.NO_RETRY_INCREMENT=o;iW.REQUEST_HEADER=f;iW.RETRY_COST=z_;iW.Retry=O;iW.StandardRetryStrategy=D;iW.THROTTLING_RETRY_DELAY_BASE=H_;iW.TIMEOUT_RETRY_COST=F_;iW.defaultDelayDecider=q_;iW.defaultRetryDecider=I_;iW.getOmitRetryHeadersPlugin=pW;iW.getRetryAfterHint=kW;iW.getRetryPlugin=aW;iW.isBrowserNetworkError=J_;iW.isClockSkewCorrectedError=j_;iW.isClockSkewError=Q_;iW.isNodeJsHttp2TransientError=w_;iW.isRetryableByTrait=n;iW.isServerError=O_;iW.isThrottlingError=q;iW.isTransientError=I;iW.omitRetryHeadersMiddleware=R_;iW.omitRetryHeadersMiddlewareOptions=A_;iW.resolveRetryConfig=gW;iW.retryMiddleware=sW;iW.retryMiddlewareOptions=U_});var i_=k((_G)=>{var lK=yK(),y=a(),v_=fK(),x_=b_(),cK=(_,W)=>{if(!W||W.length===0)return _;let K=[];for(let G of W)for(let Y of _)if(Y.schemeId.split("#")[1]===G)K.push(Y);for(let G of _)if(!K.find(({schemeId:Y})=>Y===G.schemeId))K.push(G);return K};function dK(_){let W=new Map;for(let K of _)W.set(K.schemeId,K);return W}var r=(_,W)=>(K,G)=>async(Y)=>{let X=_.httpAuthSchemeProvider(await W.httpAuthSchemeParametersProvider(_,G,Y.input)),$=_.authSchemePreference?await _.authSchemePreference():[],Z=cK(X,$),L=dK(_.httpAuthSchemes),b=x_.getSmithyContext(G),j=[];for(let Q of Z){let J=L.get(Q.schemeId);if(!J){j.push(`HttpAuthScheme \`${Q.schemeId}\` was not enabled for this service.`);continue}let w=J.identityProvider(await W.identityProviderConfigProvider(_));if(!w){j.push(`HttpAuthScheme \`${Q.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:F={},signingProperties:h={}}=Q.propertiesExtractor?.(_,G)||{};Q.identityProperties=Object.assign(Q.identityProperties||{},F),Q.signingProperties=Object.assign(Q.signingProperties||{},h),b.selectedHttpAuthScheme={httpAuthOption:Q,identity:await w(Q.identityProperties),signer:J.signer};break}if(!b.selectedHttpAuthScheme)throw Error(j.join(`
3
- `));return K(Y)},f_={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},mK=(_,{httpAuthSchemeParametersProvider:W,identityProviderConfigProvider:K})=>({applyToStack:(G)=>{G.addRelativeTo(r(_,{httpAuthSchemeParametersProvider:W,identityProviderConfigProvider:K}),f_)}}),y_={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"serializerMiddleware"},gK=(_,{httpAuthSchemeParametersProvider:W,identityProviderConfigProvider:K})=>({applyToStack:(G)=>{G.addRelativeTo(r(_,{httpAuthSchemeParametersProvider:W,identityProviderConfigProvider:K}),y_)}}),uK=(_)=>(W)=>{throw W},pK=(_,W)=>{},l_=(_)=>(W,K)=>async(G)=>{if(!y.HttpRequest.isInstance(G.request))return W(G);let X=x_.getSmithyContext(K).selectedHttpAuthScheme;if(!X)throw Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:$={}},identity:Z,signer:L}=X,b=await W({...G,request:await L.sign(G.request,Z,$)}).catch((L.errorHandler||uK)($));return(L.successHandler||pK)(b.response,$),b},c_={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},sK=(_)=>({applyToStack:(W)=>{W.addRelativeTo(l_(),c_)}}),aK=(_)=>{if(typeof _==="function")return _;let W=Promise.resolve(_);return()=>W},iK=async(_,W,K,G=(X)=>X,...Y)=>{let X=new _(K);return X=G(X)??X,await W.send(X,...Y)};function nK(_,W,K,G,Y){return async function*($,Z,...L){let b=Z,j=$.startingToken??b[K],Q=!0,J;while(Q){if(b[K]=j,Y)b[Y]=b[Y]??$.pageSize;if($.client instanceof _)J=await iK(W,$.client,Z,$.withCommand,...L);else throw Error(`Invalid client, expected instance of ${_.name}`);yield J;let w=j;j=oK(J,G),Q=!!(j&&(!$.stopOnSameToken||j!==w))}return}}var oK=(_,W)=>{let K=_,G=W.split(".");for(let Y of G){if(!K||typeof K!=="object")return;K=K[Y]}return K};function tK(_,W,K){if(!_.__smithy_context)_.__smithy_context={features:{}};else if(!_.__smithy_context.features)_.__smithy_context.features={};_.__smithy_context.features[W]=K}class d_{authSchemes=new Map;constructor(_){for(let W in _){let K=_[W];if(K!==void 0)this.authSchemes.set(W,K)}}getIdentityProvider(_){return this.authSchemes.get(_)}}class m_{async sign(_,W,K){if(!K)throw Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!K.name)throw Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!K.in)throw Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!W.apiKey)throw Error("request could not be signed with `apiKey` since the `apiKey` is not defined");let G=y.HttpRequest.clone(_);if(K.in===v_.HttpApiKeyAuthLocation.QUERY)G.query[K.name]=W.apiKey;else if(K.in===v_.HttpApiKeyAuthLocation.HEADER)G.headers[K.name]=K.scheme?`${K.scheme} ${W.apiKey}`:W.apiKey;else throw Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+K.in+"`");return G}}class g_{async sign(_,W,K){let G=y.HttpRequest.clone(_);if(!W.token)throw Error("request could not be signed with `token` since the `token` is not defined");return G.headers.Authorization=`Bearer ${W.token}`,G}}class u_{async sign(_,W,K){return _}}var p_=(_)=>function(K){return a_(K)&&K.expiration.getTime()-Date.now()<_},s_=300000,rK=p_(s_),a_=(_)=>_.expiration!==void 0,eK=(_,W,K)=>{if(_===void 0)return;let G=typeof _!=="function"?async()=>Promise.resolve(_):_,Y,X,$,Z=!1,L=async(b)=>{if(!X)X=G(b);try{Y=await X,$=!0,Z=!1}finally{X=void 0}return Y};if(W===void 0)return async(b)=>{if(!$||b?.forceRefresh)Y=await L(b);return Y};return async(b)=>{if(!$||b?.forceRefresh)Y=await L(b);if(Z)return Y;if(!K(Y))return Z=!0,Y;if(W(Y))return await L(b),Y;return Y}};_G.getSmithyContext=lK.getSmithyContext;_G.requestBuilder=y.requestBuilder;_G.DefaultIdentityProviderConfig=d_;_G.EXPIRATION_MS=s_;_G.HttpApiKeyAuthSigner=m_;_G.HttpBearerAuthSigner=g_;_G.NoAuthSigner=u_;_G.createIsIdentityExpiredFunction=p_;_G.createPaginator=nK;_G.doesIdentityRequireRefresh=a_;_G.getHttpAuthSchemeEndpointRuleSetPlugin=mK;_G.getHttpAuthSchemePlugin=gK;_G.getHttpSigningPlugin=sK;_G.httpAuthSchemeEndpointRuleSetMiddlewareOptions=f_;_G.httpAuthSchemeMiddleware=r;_G.httpAuthSchemeMiddlewareOptions=y_;_G.httpSigningMiddleware=l_;_G.httpSigningMiddlewareOptions=c_;_G.isIdentityExpired=rK;_G.memoizeIdentityProvider=eK;_G.normalizeProvider=aK;_G.setFeature=tK});var o_=k((EG)=>{var S={REQUEST_ID:Symbol.for("_AWS_LAMBDA_REQUEST_ID"),X_RAY_TRACE_ID:Symbol.for("_AWS_LAMBDA_X_RAY_TRACE_ID"),TENANT_ID:Symbol.for("_AWS_LAMBDA_TENANT_ID")},e=["true","1"].includes(process.env?.AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA??"");if(!e)globalThis.awslambda=globalThis.awslambda||{};class l{static PROTECTED_KEYS=S;isProtectedKey(_){return Object.values(S).includes(_)}getRequestId(){return this.get(S.REQUEST_ID)??"-"}getXRayTraceId(){return this.get(S.X_RAY_TRACE_ID)}getTenantId(){return this.get(S.TENANT_ID)}}class n_ extends l{currentContext;getContext(){return this.currentContext}hasContext(){return this.currentContext!==void 0}get(_){return this.currentContext?.[_]}set(_,W){if(this.isProtectedKey(_))throw Error(`Cannot modify protected Lambda context field: ${String(_)}`);this.currentContext=this.currentContext||{},this.currentContext[_]=W}run(_,W){return this.currentContext=_,W()}}class W_ extends l{als;static async create(){let _=new W_,W=await import("async_hooks");return _.als=new W.AsyncLocalStorage,_}getContext(){return this.als.getStore()}hasContext(){return this.als.getStore()!==void 0}get(_){return this.als.getStore()?.[_]}set(_,W){if(this.isProtectedKey(_))throw Error(`Cannot modify protected Lambda context field: ${String(_)}`);let K=this.als.getStore();if(!K)throw Error("No context available");K[_]=W}run(_,W){return this.als.run(_,W)}}EG.InvokeStore=void 0;(function(_){let W=null;async function K(G){if(!W)W=(async()=>{let X=G===!0||"AWS_LAMBDA_MAX_CONCURRENCY"in process.env?await W_.create():new n_;if(!e&&globalThis.awslambda?.InvokeStore)return globalThis.awslambda.InvokeStore;else if(!e&&globalThis.awslambda)return globalThis.awslambda.InvokeStore=X,X;else return X})();return W}_.getInstanceAsync=K,_._testing=process.env.AWS_LAMBDA_BENCHMARK_MODE==="1"?{reset:()=>{if(W=null,globalThis.awslambda?.InvokeStore)delete globalThis.awslambda.InvokeStore;globalThis.awslambda={InvokeStore:void 0}}}:void 0})(EG.InvokeStore||(EG.InvokeStore={}));EG.InvokeStoreBase=l});var OX=k((H1)=>{var __dirname="/tmp/qitqode-release-027-zXkgEM/repository/qode/node_modules/.bun/@aws-sdk+core@3.974.17/node_modules/@aws-sdk/core/dist-cjs/submodules/client",Y_=k_(),m=a(),qG=o_(),IG=i_(),t_=N("os"),P=N("process"),z=hG(),r_=N("fs/promises"),E=N("path"),C=DG(),d={warningEmitted:!1},TG=(_)=>{if(_&&!d.warningEmitted){if(process.env.AWS_SDK_JS_NODE_VERSION_SUPPORT_WARNING_DISABLED==="true"){d.warningEmitted=!0;return}let W=parseInt(_.substring(1,_.indexOf("."))),K=22;if(W<K)d.warningEmitted=!0,process.emitWarning(`NodeVersionSupportWarning: The AWS SDK for JavaScript (v3)
2
+ import{Oe as a}from"./chunk-0a4pmkc9.js";import{Ef as fK,Ff as yK,Hf as b_,If as hG,Jf as DG,Kf as DW}from"./chunk-35fj1sfm.js";import{uO as k,xO as N}from"./chunk-e0vrxetq.js";var k_=k((iW)=>{var qW=N("stream"),g=b_(),U=a(),i=DW(),L_=(_)=>_?.body instanceof qW.Readable||typeof ReadableStream<"u"&&_?.body instanceof ReadableStream,IW=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],TW=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],SW=["TimeoutError","RequestTimeout","RequestTimeoutException"],PW=[500,502,503,504],RW=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],AW=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND","EAI_AGAIN"],n=(_)=>_?.$retryable!==void 0,Q_=(_)=>IW.includes(_.name),j_=(_)=>_.$metadata?.clockSkewCorrected,J_=(_)=>{let W=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);if(!(_&&_ instanceof TypeError))return!1;return W.has(_.message)},q=(_)=>_.$metadata?.httpStatusCode===429||TW.includes(_.name)||_.$retryable?.throttling==!0,I=(_,W=0)=>n(_)||j_(_)||_.name==="InvalidSignatureException"&&_.message?.includes("Signature expired")||SW.includes(_.name)||RW.includes(_?.code||"")||AW.includes(_?.code||"")||PW.includes(_.$metadata?.httpStatusCode||0)||J_(_)||w_(_)||_.cause!==void 0&&W<=10&&I(_.cause,W+1),O_=(_)=>{if(_.$metadata?.httpStatusCode!==void 0){let W=_.$metadata.httpStatusCode;if(500<=W&&W<=599&&!I(_))return!0;return!1}return!1};function w_(_){return _.code==="ERR_HTTP2_STREAM_ERROR"&&_.message.includes("NGHTTP2_REFUSED_STREAM")}var B_=100,v=20000,H_=500,A=500,z_=5,F_=10,o=1,x="amz-sdk-invocation-id",f="amz-sdk-request";function M_(_,W){if(!U.HttpResponse.isInstance(_))return;for(let K of Object.keys(_.headers)){let G=K.toLowerCase();if(G==="retry-after"){let Y=_.headers[K],X=NaN;if(Y.endsWith("GMT"))try{X=(i.parseRfc7231DateTime(Y).getTime()-Date.now())/1000}catch($){W?.trace?.("Failed to parse retry-after header"),W?.trace?.($)}else if(Y.match(/ GMT, ((\d+)|(\d+\.\d+))$/))X=Number(Y.match(/ GMT, ([\d.]+)$/)?.[1]);else if(Y.match(/^((\d+)|(\d+\.\d+))$/))X=Number(Y);else if(Date.parse(Y)>=Date.now())X=(Date.parse(Y)-Date.now())/1000;if(isNaN(X))return;return new Date(Date.now()+X*1000)}else if(G==="x-amz-retry-after"){let Y=_.headers[K],X=Number(Y);if(isNaN(X)){W?.trace?.(`Failed to parse x-amz-retry-after=${Y}`);return}return new Date(Date.now()+X)}}}function kW(_,W){return M_(_,W)}var V_=(_)=>{if(_ instanceof Error)return _;if(_ instanceof Object)return Object.assign(Error(),_);if(typeof _==="string")return Error(_);return Error(`AWS SDK error wrapper for ${_}`)};function N_(_){return(W)=>(K,G)=>async(Y)=>{let X=await W.retryStrategy(),$=await W.maxAttempts();if(xW(X)){X=X;let Z=await X.acquireInitialRetryToken((G.partition_id??"")+(G.__retryLongPoll?":longpoll":"")),L=Error(),b=0,j=0,{request:Q}=Y,J=U.HttpRequest.isInstance(Q);if(J)Q.headers[x]=i.v4();while(!0)try{if(J)Q.headers[f]=`attempt=${b+1}; max=${$}`;let{response:w,output:F}=await K(Y);return X.recordSuccess(Z),F.$metadata.attempts=b+1,F.$metadata.totalRetryDelay=j,{response:w,output:F}}catch(w){let F=fW(w,W.logger);if(L=V_(w),J&&_(Q))throw(G.logger instanceof g.NoOpLogger?console:G.logger)?.warn("An error was encountered in a non-retryable streaming request."),L;try{Z=await X.refreshRetryTokenForRetry(Z,F)}catch(wX){if(!L.$metadata)L.$metadata={};throw L.$metadata.attempts=b+1,L.$metadata.totalRetryDelay=j,L}b=Z.getRetryCount();let h=Z.getRetryDelay();if(j+=(Z?.$retryLog?.acquisitionDelay??0)+h,h>0)await vW(h)}}else{if(X=X,X?.mode)G.userAgent=[...G.userAgent||[],["cfg/retry-mode",X.mode]];return X.retry(K,Y)}}}var vW=(_)=>new Promise((W)=>setTimeout(W,_)),xW=(_)=>typeof _.acquireInitialRetryToken<"u"&&typeof _.refreshRetryTokenForRetry<"u"&&typeof _.recordSuccess<"u",fW=(_,W)=>{let K={error:_,errorType:yW(_)},G=M_(_.$response,W);if(G)K.retryAfterHint=G;return K},yW=(_)=>{if(q(_))return"THROTTLING";if(I(_))return"TRANSIENT";if(O_(_))return"SERVER_ERROR";return"CLIENT_ERROR"},U_={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0};function lW(_){let W=N_(_);return(K)=>({applyToStack:(G)=>{G.add(W(K),U_)}})}class T{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(_){this.beta=_?.beta??0.7,this.minCapacity=_?.minCapacity??1,this.minFillRate=_?.minFillRate??0.5,this.scaleConstant=_?.scaleConstant??0.4,this.smooth=_?.smooth??0.8,this.lastThrottleTime=this.getCurrentTimeInSeconds(),this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}async getSendToken(){return this.acquireTokenBucket(1)}updateClientSendingRate(_){let W;this.updateMeasuredRate();let K=_;if(K?.errorType==="THROTTLING"||q(K?.error??_)){let X=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=X,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),W=this.cubicThrottle(X),this.enableTokenBucket()}else this.calculateTimeWindow(),W=this.cubicSuccess(this.getCurrentTimeInSeconds());let Y=Math.min(W,2*this.measuredTxRate);this.updateTokenBucketRate(Y)}getCurrentTimeInSeconds(){return Date.now()/1000}async acquireTokenBucket(_){if(!this.enabled)return;this.refillTokenBucket();while(_>this.availableTokens){let W=(_-this.availableTokens)/this.fillRate*1000;await new Promise((K)=>T.setTimeoutFn(K,W)),this.refillTokenBucket()}this.availableTokens=this.availableTokens-_}refillTokenBucket(){let _=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=_;return}let W=(_-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+W),this.lastTimestamp=_}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(_){return this.getPrecise(_*this.beta)}cubicSuccess(_){return this.getPrecise(this.scaleConstant*Math.pow(_-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(_){this.refillTokenBucket(),this.fillRate=Math.max(_,this.minFillRate),this.maxCapacity=Math.max(_,this.minCapacity),this.availableTokens=Math.min(this.availableTokens,this.maxCapacity)}updateMeasuredRate(){let _=this.getCurrentTimeInSeconds(),W=Math.floor(_*2)/2;if(this.requestCount++,W>this.lastTxRateBucket){let K=this.requestCount/(W-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(K*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=W}}getPrecise(_){return parseFloat(_.toFixed(8))}}class O{static v2026=typeof process<"u"&&process.env?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return O.v2026?50:100}static throttlingDelay(){return O.v2026?1000:500}static cost(){return O.v2026?14:5}static throttlingCost(){return O.v2026?5:10}static modifiedCostType(){return O.v2026?"THROTTLING":"TRANSIENT"}}class E_{x=O.delay();computeNextBackoffDelay(_){let W=Math.random(),K=2,G=W*Math.min(this.x*2**_,v);return Math.floor(G)}setDelayBase(_){this.x=_}}class u{delay;count;cost;longPoll;$retryLog={acquisitionDelay:0};constructor(_,W,K,G){this.delay=_,this.count=W,this.cost=K,this.longPoll=G}getRetryCount(){return this.count}getRetryDelay(){return Math.min(v,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}iW.RETRY_MODES=void 0;(function(_){_.STANDARD="standard",_.ADAPTIVE="adaptive"})(iW.RETRY_MODES||(iW.RETRY_MODES={}));var V=3,C_=iW.RETRY_MODES.STANDARD,R={incompatible:1,attempts:2,capacity:3},D=class{mode=iW.RETRY_MODES.STANDARD;retryBackoffStrategy;capacity=A;maxAttemptsProvider;baseDelay;constructor(W){if(typeof W==="number")this.maxAttemptsProvider=async()=>W;else if(typeof W==="function")this.maxAttemptsProvider=W;else if(W&&typeof W==="object")this.maxAttemptsProvider=async()=>W.maxAttempts,this.baseDelay=W.baseDelay,this.retryBackoffStrategy=W.backoff;this.maxAttemptsProvider??=async()=>V,this.baseDelay??=O.delay(),this.retryBackoffStrategy??=new E_}async acquireInitialRetryToken(W){return new u(O.delay(),0,void 0,O.v2026&&W.includes(":longpoll"))}async refreshRetryTokenForRetry(W,K){let G=await this.getMaxAttempts(),Y=this.retryCode(W,K,G),X=Y===0,$=W.isLongPoll?.();if(X||$){let Z=K.errorType;this.retryBackoffStrategy.setDelayBase(Z==="THROTTLING"?O.throttlingDelay():this.baseDelay);let L=this.retryBackoffStrategy.computeNextBackoffDelay(W.getRetryCount()),b=L;if(K.retryAfterHint instanceof Date)b=Math.max(L,Math.min(K.retryAfterHint.getTime()-Date.now(),L+5000));if(!X){let j=O.v2026&&Y===R.capacity&&$?b:0;if(j>0)await new Promise((Q)=>setTimeout(Q,j))}else{let j=this.getCapacityCost(Z);this.capacity-=j;let Q=new u(0,W.getRetryCount()+1,j,W.isLongPoll?.()??!1);return await new Promise((J)=>setTimeout(J,b)),Q.$retryLog.acquisitionDelay=b,Q}}throw Error("No retry token available")}recordSuccess(W){this.capacity=Math.min(A,this.capacity+(W.getRetryCost()??o))}getCapacity(){return this.capacity}async maxAttempts(){return this.maxAttemptsProvider()}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(W){return console.warn(`Max attempts provider could not resolve. Using default of ${V}`),V}}retryCode(W,K,G){let Y=W.getRetryCount()+1,X=this.isRetryableError(K.errorType)?0:R.incompatible,$=Y<G?0:R.attempts,Z=this.capacity>=this.getCapacityCost(K.errorType)?0:R.capacity;return X||$||Z}getCapacityCost(W){return W===O.modifiedCostType()?O.throttlingCost():O.cost()}isRetryableError(W){return W==="THROTTLING"||W==="TRANSIENT"}},h_=class{mode=iW.RETRY_MODES.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(W,K){let{rateLimiter:G}=K??{};this.rateLimiter=G??new T,this.standardRetryStrategy=K?new D({maxAttempts:typeof W==="number"?W:3,...K}):new D(W)}async acquireInitialRetryToken(W){let K=await this.standardRetryStrategy.acquireInitialRetryToken(W);return await this.rateLimiter.getSendToken(),K}async refreshRetryTokenForRetry(W,K){this.rateLimiter.updateClientSendingRate(K);let G=await this.standardRetryStrategy.refreshRetryTokenForRetry(W,K);return await this.rateLimiter.getSendToken(),G}recordSuccess(W){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(W)}async maxAttemptsProvider(){return this.standardRetryStrategy.maxAttempts()}};class D_ extends D{computeNextBackoffDelay;constructor(_,W=O.delay()){super(typeof _==="function"?_:async()=>_);if(typeof W==="number")this.computeNextBackoffDelay=()=>W;else this.computeNextBackoffDelay=W;this.retryBackoffStrategy.computeNextBackoffDelay=(K)=>{let G=K+1;return this.computeNextBackoffDelay(G)}}}var cW=(_,W)=>{let K=_,G=o,Y=z_,X=F_,$=_,Z=(Q)=>Q.name==="TimeoutError"?X:Y,L=(Q)=>Z(Q)<=$;return Object.freeze({hasRetryTokens:L,retrieveRetryTokens:(Q)=>{if(!L(Q))throw Error("No retry token available");let J=Z(Q);return $-=J,J},releaseRetryTokens:(Q)=>{$+=Q??G,$=Math.min($,K)}})},q_=(_,W)=>Math.floor(Math.min(v,Math.random()*2**W*_)),I_=(_)=>{if(!_)return!1;return n(_)||Q_(_)||q(_)||I(_)};class t{maxAttemptsProvider;retryDecider;delayDecider;retryQuota;mode=iW.RETRY_MODES.STANDARD;constructor(_,W){this.maxAttemptsProvider=_,this.retryDecider=W?.retryDecider??I_,this.delayDecider=W?.delayDecider??q_,this.retryQuota=W?.retryQuota??cW(A)}shouldRetry(_,W,K){return W<K&&this.retryDecider(_)&&this.retryQuota.hasRetryTokens(_)}async getMaxAttempts(){let _;try{_=await this.maxAttemptsProvider()}catch(W){_=V}return _}async retry(_,W,K){let G,Y=0,X=0,$=await this.getMaxAttempts(),{request:Z}=W;if(U.HttpRequest.isInstance(Z))Z.headers[x]=i.v4();while(!0)try{if(U.HttpRequest.isInstance(Z))Z.headers[f]=`attempt=${Y+1}; max=${$}`;if(K?.beforeRequest)await K.beforeRequest();let{response:L,output:b}=await _(W);if(K?.afterRequest)K.afterRequest(L);return this.retryQuota.releaseRetryTokens(G),b.$metadata.attempts=Y+1,b.$metadata.totalRetryDelay=X,{response:L,output:b}}catch(L){let b=V_(L);if(Y++,this.shouldRetry(b,Y,$)){G=this.retryQuota.retrieveRetryTokens(b);let j=this.delayDecider(q(b)?H_:B_,Y),Q=dW(b.$response),J=Math.max(Q||0,j);X+=J,await new Promise((w)=>setTimeout(w,J));continue}if(!b.$metadata)b.$metadata={};throw b.$metadata.attempts=Y,b.$metadata.totalRetryDelay=X,b}}}var dW=(_)=>{if(!U.HttpResponse.isInstance(_))return;let W=Object.keys(_.headers).find((X)=>X.toLowerCase()==="retry-after");if(!W)return;let K=_.headers[W],G=Number(K);if(!Number.isNaN(G))return G*1000;return new Date(K).getTime()-Date.now()};class T_ extends t{rateLimiter;constructor(_,W){let{rateLimiter:K,...G}=W??{};super(_,G);this.rateLimiter=K??new T,this.mode=iW.RETRY_MODES.ADAPTIVE}async retry(_,W){return super.retry(_,W,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(K)=>{this.rateLimiter.updateClientSendingRate(K)}})}}var p="AWS_MAX_ATTEMPTS",s="max_attempts",mW={environmentVariableSelector:(_)=>{let W=_[p];if(!W)return;let K=parseInt(W);if(Number.isNaN(K))throw Error(`Environment variable ${p} mast be a number, got "${W}"`);return K},configFileSelector:(_)=>{let W=_[s];if(!W)return;let K=parseInt(W);if(Number.isNaN(K))throw Error(`Shared config file entry ${s} mast be a number, got "${W}"`);return K},default:V},gW=(_,W)=>{let{retryStrategy:K,retryMode:G}=_,{defaultMaxAttempts:Y=V,defaultBaseDelay:X=O.delay()}=W??{},$=g.normalizeProvider(_.maxAttempts??Y),Z=K?Promise.resolve(K):void 0,L=async()=>{let b=await $();if(await g.normalizeProvider(G)()===iW.RETRY_MODES.ADAPTIVE)return new h_($,{maxAttempts:b,baseDelay:X});return new D({maxAttempts:b,baseDelay:X})};return Object.assign(_,{maxAttempts:$,retryStrategy:()=>Z??=L()})},S_="AWS_RETRY_MODE",P_="retry_mode",uW={environmentVariableSelector:(_)=>_[S_],configFileSelector:(_)=>_[P_],default:C_},R_=()=>(_)=>async(W)=>{let{request:K}=W;if(U.HttpRequest.isInstance(K))delete K.headers[x],delete K.headers[f];return _(W)},A_={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},pW=(_)=>({applyToStack:(W)=>{W.addRelativeTo(R_(),A_)}}),sW=N_(L_),aW=lW(L_);iW.AdaptiveRetryStrategy=h_;iW.CONFIG_MAX_ATTEMPTS=s;iW.CONFIG_RETRY_MODE=P_;iW.ConfiguredRetryStrategy=D_;iW.DEFAULT_MAX_ATTEMPTS=V;iW.DEFAULT_RETRY_DELAY_BASE=B_;iW.DEFAULT_RETRY_MODE=C_;iW.DefaultRateLimiter=T;iW.DeprecatedAdaptiveRetryStrategy=T_;iW.DeprecatedStandardRetryStrategy=t;iW.ENV_MAX_ATTEMPTS=p;iW.ENV_RETRY_MODE=S_;iW.INITIAL_RETRY_TOKENS=A;iW.INVOCATION_ID_HEADER=x;iW.MAXIMUM_RETRY_DELAY=v;iW.NODE_MAX_ATTEMPT_CONFIG_OPTIONS=mW;iW.NODE_RETRY_MODE_CONFIG_OPTIONS=uW;iW.NO_RETRY_INCREMENT=o;iW.REQUEST_HEADER=f;iW.RETRY_COST=z_;iW.Retry=O;iW.StandardRetryStrategy=D;iW.THROTTLING_RETRY_DELAY_BASE=H_;iW.TIMEOUT_RETRY_COST=F_;iW.defaultDelayDecider=q_;iW.defaultRetryDecider=I_;iW.getOmitRetryHeadersPlugin=pW;iW.getRetryAfterHint=kW;iW.getRetryPlugin=aW;iW.isBrowserNetworkError=J_;iW.isClockSkewCorrectedError=j_;iW.isClockSkewError=Q_;iW.isNodeJsHttp2TransientError=w_;iW.isRetryableByTrait=n;iW.isServerError=O_;iW.isThrottlingError=q;iW.isTransientError=I;iW.omitRetryHeadersMiddleware=R_;iW.omitRetryHeadersMiddlewareOptions=A_;iW.resolveRetryConfig=gW;iW.retryMiddleware=sW;iW.retryMiddlewareOptions=U_});var i_=k((_G)=>{var lK=yK(),y=a(),v_=fK(),x_=b_(),cK=(_,W)=>{if(!W||W.length===0)return _;let K=[];for(let G of W)for(let Y of _)if(Y.schemeId.split("#")[1]===G)K.push(Y);for(let G of _)if(!K.find(({schemeId:Y})=>Y===G.schemeId))K.push(G);return K};function dK(_){let W=new Map;for(let K of _)W.set(K.schemeId,K);return W}var r=(_,W)=>(K,G)=>async(Y)=>{let X=_.httpAuthSchemeProvider(await W.httpAuthSchemeParametersProvider(_,G,Y.input)),$=_.authSchemePreference?await _.authSchemePreference():[],Z=cK(X,$),L=dK(_.httpAuthSchemes),b=x_.getSmithyContext(G),j=[];for(let Q of Z){let J=L.get(Q.schemeId);if(!J){j.push(`HttpAuthScheme \`${Q.schemeId}\` was not enabled for this service.`);continue}let w=J.identityProvider(await W.identityProviderConfigProvider(_));if(!w){j.push(`HttpAuthScheme \`${Q.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:F={},signingProperties:h={}}=Q.propertiesExtractor?.(_,G)||{};Q.identityProperties=Object.assign(Q.identityProperties||{},F),Q.signingProperties=Object.assign(Q.signingProperties||{},h),b.selectedHttpAuthScheme={httpAuthOption:Q,identity:await w(Q.identityProperties),signer:J.signer};break}if(!b.selectedHttpAuthScheme)throw Error(j.join(`
3
+ `));return K(Y)},f_={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},mK=(_,{httpAuthSchemeParametersProvider:W,identityProviderConfigProvider:K})=>({applyToStack:(G)=>{G.addRelativeTo(r(_,{httpAuthSchemeParametersProvider:W,identityProviderConfigProvider:K}),f_)}}),y_={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"serializerMiddleware"},gK=(_,{httpAuthSchemeParametersProvider:W,identityProviderConfigProvider:K})=>({applyToStack:(G)=>{G.addRelativeTo(r(_,{httpAuthSchemeParametersProvider:W,identityProviderConfigProvider:K}),y_)}}),uK=(_)=>(W)=>{throw W},pK=(_,W)=>{},l_=(_)=>(W,K)=>async(G)=>{if(!y.HttpRequest.isInstance(G.request))return W(G);let X=x_.getSmithyContext(K).selectedHttpAuthScheme;if(!X)throw Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:$={}},identity:Z,signer:L}=X,b=await W({...G,request:await L.sign(G.request,Z,$)}).catch((L.errorHandler||uK)($));return(L.successHandler||pK)(b.response,$),b},c_={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},sK=(_)=>({applyToStack:(W)=>{W.addRelativeTo(l_(),c_)}}),aK=(_)=>{if(typeof _==="function")return _;let W=Promise.resolve(_);return()=>W},iK=async(_,W,K,G=(X)=>X,...Y)=>{let X=new _(K);return X=G(X)??X,await W.send(X,...Y)};function nK(_,W,K,G,Y){return async function*($,Z,...L){let b=Z,j=$.startingToken??b[K],Q=!0,J;while(Q){if(b[K]=j,Y)b[Y]=b[Y]??$.pageSize;if($.client instanceof _)J=await iK(W,$.client,Z,$.withCommand,...L);else throw Error(`Invalid client, expected instance of ${_.name}`);yield J;let w=j;j=oK(J,G),Q=!!(j&&(!$.stopOnSameToken||j!==w))}return}}var oK=(_,W)=>{let K=_,G=W.split(".");for(let Y of G){if(!K||typeof K!=="object")return;K=K[Y]}return K};function tK(_,W,K){if(!_.__smithy_context)_.__smithy_context={features:{}};else if(!_.__smithy_context.features)_.__smithy_context.features={};_.__smithy_context.features[W]=K}class d_{authSchemes=new Map;constructor(_){for(let W in _){let K=_[W];if(K!==void 0)this.authSchemes.set(W,K)}}getIdentityProvider(_){return this.authSchemes.get(_)}}class m_{async sign(_,W,K){if(!K)throw Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!K.name)throw Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!K.in)throw Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!W.apiKey)throw Error("request could not be signed with `apiKey` since the `apiKey` is not defined");let G=y.HttpRequest.clone(_);if(K.in===v_.HttpApiKeyAuthLocation.QUERY)G.query[K.name]=W.apiKey;else if(K.in===v_.HttpApiKeyAuthLocation.HEADER)G.headers[K.name]=K.scheme?`${K.scheme} ${W.apiKey}`:W.apiKey;else throw Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+K.in+"`");return G}}class g_{async sign(_,W,K){let G=y.HttpRequest.clone(_);if(!W.token)throw Error("request could not be signed with `token` since the `token` is not defined");return G.headers.Authorization=`Bearer ${W.token}`,G}}class u_{async sign(_,W,K){return _}}var p_=(_)=>function(K){return a_(K)&&K.expiration.getTime()-Date.now()<_},s_=300000,rK=p_(s_),a_=(_)=>_.expiration!==void 0,eK=(_,W,K)=>{if(_===void 0)return;let G=typeof _!=="function"?async()=>Promise.resolve(_):_,Y,X,$,Z=!1,L=async(b)=>{if(!X)X=G(b);try{Y=await X,$=!0,Z=!1}finally{X=void 0}return Y};if(W===void 0)return async(b)=>{if(!$||b?.forceRefresh)Y=await L(b);return Y};return async(b)=>{if(!$||b?.forceRefresh)Y=await L(b);if(Z)return Y;if(!K(Y))return Z=!0,Y;if(W(Y))return await L(b),Y;return Y}};_G.getSmithyContext=lK.getSmithyContext;_G.requestBuilder=y.requestBuilder;_G.DefaultIdentityProviderConfig=d_;_G.EXPIRATION_MS=s_;_G.HttpApiKeyAuthSigner=m_;_G.HttpBearerAuthSigner=g_;_G.NoAuthSigner=u_;_G.createIsIdentityExpiredFunction=p_;_G.createPaginator=nK;_G.doesIdentityRequireRefresh=a_;_G.getHttpAuthSchemeEndpointRuleSetPlugin=mK;_G.getHttpAuthSchemePlugin=gK;_G.getHttpSigningPlugin=sK;_G.httpAuthSchemeEndpointRuleSetMiddlewareOptions=f_;_G.httpAuthSchemeMiddleware=r;_G.httpAuthSchemeMiddlewareOptions=y_;_G.httpSigningMiddleware=l_;_G.httpSigningMiddlewareOptions=c_;_G.isIdentityExpired=rK;_G.memoizeIdentityProvider=eK;_G.normalizeProvider=aK;_G.setFeature=tK});var o_=k((EG)=>{var S={REQUEST_ID:Symbol.for("_AWS_LAMBDA_REQUEST_ID"),X_RAY_TRACE_ID:Symbol.for("_AWS_LAMBDA_X_RAY_TRACE_ID"),TENANT_ID:Symbol.for("_AWS_LAMBDA_TENANT_ID")},e=["true","1"].includes(process.env?.AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA??"");if(!e)globalThis.awslambda=globalThis.awslambda||{};class l{static PROTECTED_KEYS=S;isProtectedKey(_){return Object.values(S).includes(_)}getRequestId(){return this.get(S.REQUEST_ID)??"-"}getXRayTraceId(){return this.get(S.X_RAY_TRACE_ID)}getTenantId(){return this.get(S.TENANT_ID)}}class n_ extends l{currentContext;getContext(){return this.currentContext}hasContext(){return this.currentContext!==void 0}get(_){return this.currentContext?.[_]}set(_,W){if(this.isProtectedKey(_))throw Error(`Cannot modify protected Lambda context field: ${String(_)}`);this.currentContext=this.currentContext||{},this.currentContext[_]=W}run(_,W){return this.currentContext=_,W()}}class W_ extends l{als;static async create(){let _=new W_,W=await import("async_hooks");return _.als=new W.AsyncLocalStorage,_}getContext(){return this.als.getStore()}hasContext(){return this.als.getStore()!==void 0}get(_){return this.als.getStore()?.[_]}set(_,W){if(this.isProtectedKey(_))throw Error(`Cannot modify protected Lambda context field: ${String(_)}`);let K=this.als.getStore();if(!K)throw Error("No context available");K[_]=W}run(_,W){return this.als.run(_,W)}}EG.InvokeStore=void 0;(function(_){let W=null;async function K(G){if(!W)W=(async()=>{let X=G===!0||"AWS_LAMBDA_MAX_CONCURRENCY"in process.env?await W_.create():new n_;if(!e&&globalThis.awslambda?.InvokeStore)return globalThis.awslambda.InvokeStore;else if(!e&&globalThis.awslambda)return globalThis.awslambda.InvokeStore=X,X;else return X})();return W}_.getInstanceAsync=K,_._testing=process.env.AWS_LAMBDA_BENCHMARK_MODE==="1"?{reset:()=>{if(W=null,globalThis.awslambda?.InvokeStore)delete globalThis.awslambda.InvokeStore;globalThis.awslambda={InvokeStore:void 0}}}:void 0})(EG.InvokeStore||(EG.InvokeStore={}));EG.InvokeStoreBase=l});var OX=k((H1)=>{var __dirname="/home/runner/workspace/products/qitqode/qode/node_modules/.bun/@aws-sdk+core@3.974.17/node_modules/@aws-sdk/core/dist-cjs/submodules/client",Y_=k_(),m=a(),qG=o_(),IG=i_(),t_=N("os"),P=N("process"),z=hG(),r_=N("fs/promises"),E=N("path"),C=DG(),d={warningEmitted:!1},TG=(_)=>{if(_&&!d.warningEmitted){if(process.env.AWS_SDK_JS_NODE_VERSION_SUPPORT_WARNING_DISABLED==="true"){d.warningEmitted=!0;return}let W=parseInt(_.substring(1,_.indexOf("."))),K=22;if(W<K)d.warningEmitted=!0,process.emitWarning(`NodeVersionSupportWarning: The AWS SDK for JavaScript (v3)
4
4
  versions published after the first week of January 2027
5
5
  will require node >=${K}. You are running node ${_}.
6
6
 
7
7
  To continue receiving updates to AWS services, bug fixes,
8
8
  and security updates please upgrade to node >=${K}.
9
9
 
10
- More information can be found at: https://a.co/c895JFp`)}},SG=()=>(_,W)=>async(K)=>{return W.__retryLongPoll=!0,_(K)},PG={name:"longPollMiddleware",tags:["RETRY"],step:"initialize",override:!0},RG=(_)=>({applyToStack:(W)=>{W.add(SG(),PG)}});function AG(_,W,K){if(!_.$source)_.$source={};return _.$source[W]=K,_}Y_.Retry.v2026||=typeof process==="object"&&process.env?.AWS_NEW_RETRIES_2026==="true";function H(_,W,K){if(!_.__aws_sdk_context)_.__aws_sdk_context={features:{}};else if(!_.__aws_sdk_context.features)_.__aws_sdk_context.features={};_.__aws_sdk_context.features[W]=K}function kG(_,W,K){if(!_.$source)_.$source={};return _.$source[W]=K,_}function vG(_){return _}var GW=(_)=>(W)=>async(K)=>{if(!m.HttpRequest.isInstance(K.request))return W(K);let{request:G}=K,{handlerProtocol:Y=""}=_.requestHandler.metadata||{};if(Y.indexOf("h2")>=0&&!G.headers[":authority"])delete G.headers.host,G.headers[":authority"]=G.hostname+(G.port?":"+G.port:"");else if(!G.headers.host){let X=G.hostname;if(G.port!=null)X+=`:${G.port}`;G.headers.host=X}return W(K)},XW={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},xG=(_)=>({applyToStack:(W)=>{W.add(GW(_),XW)}}),YW=()=>(_,W)=>async(K)=>{try{let G=await _(K),{clientName:Y,commandName:X,logger:$,dynamoDbDocumentClientOptions:Z={}}=W,{overrideInputFilterSensitiveLog:L,overrideOutputFilterSensitiveLog:b}=Z,j=L??W.inputFilterSensitiveLog,Q=b??W.outputFilterSensitiveLog,{$metadata:J,...w}=G.output;return $?.info?.({clientName:Y,commandName:X,input:j(K.input),output:Q(w),metadata:J}),G}catch(G){let{clientName:Y,commandName:X,logger:$,dynamoDbDocumentClientOptions:Z={}}=W,{overrideInputFilterSensitiveLog:L}=Z,b=L??W.inputFilterSensitiveLog;throw $?.error?.({clientName:Y,commandName:X,input:b(K.input),error:G,metadata:G.$metadata}),G}},$W={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},fG=(_)=>({applyToStack:(W)=>{W.add(YW(),$W)}}),ZW={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},K_="X-Amzn-Trace-Id",yG="AWS_LAMBDA_FUNCTION_NAME",lG="_X_AMZN_TRACE_ID",bW=()=>(_)=>async(W)=>{let{request:K}=W;if(!m.HttpRequest.isInstance(K))return _(W);let G=Object.keys(K.headers??{}).find((j)=>j.toLowerCase()===K_.toLowerCase())??K_;if(K.headers.hasOwnProperty(G))return _(W);let Y=process.env[yG],X=process.env[lG],L=(await qG.InvokeStore.getInstanceAsync())?.getXRayTraceId()??X,b=(j)=>typeof j==="string"&&j.length>0;if(b(Y)&&b(L))K.headers[K_]=L;return _({...W,request:K})},cG=(_)=>({applyToStack:(W)=>{W.add(bW(),ZW)}}),$_=void 0;function dG(_){if(_===void 0)return!0;return typeof _==="string"&&_.length<=50}function mG(_){let W=IG.normalizeProvider(_.userAgentAppId??$_),{customUserAgent:K}=_;return Object.assign(_,{customUserAgent:typeof K==="string"?[[K]]:K,userAgentAppId:async()=>{let G=await W();if(!dG(G)){let Y=_.logger?.constructor?.name==="NoOpLogger"||!_.logger?console:_.logger;if(typeof G!=="string")Y?.warn("userAgentAppId must be a string or undefined.");else if(G.length>50)Y?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return G}})}var LW={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],version:"1.1"},QW=LW,jW="",JW=(_)=>{let{partitions:W}=QW;for(let G of W){let{regions:Y,outputs:X}=G;for(let[$,Z]of Object.entries(Y))if($===_)return{...X,...Z}}for(let G of W){let{regionRegex:Y,outputs:X}=G;if(new RegExp(Y).test(_))return{...X}}let K=W.find((G)=>G.id==="aws");if(!K)throw Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...K.outputs}},OW=(_,W="")=>{QW=_,jW=W},gG=()=>{OW(LW,"")},wW=()=>jW,uG=/\d{12}\.ddb/;async function pG(_,W,K){if(K.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor")H(_,"PROTOCOL_RPC_V2_CBOR","M");if(typeof W.retryStrategy==="function"){let X=await W.retryStrategy();if(typeof X.mode==="string")switch(X.mode){case Y_.RETRY_MODES.ADAPTIVE:H(_,"RETRY_MODE_ADAPTIVE","F");break;case Y_.RETRY_MODES.STANDARD:H(_,"RETRY_MODE_STANDARD","E");break}}if(typeof W.accountIdEndpointMode==="function"){let X=_.endpointV2;if(String(X?.url?.hostname).match(uG))H(_,"ACCOUNT_ID_ENDPOINT","O");switch(await W.accountIdEndpointMode?.()){case"disabled":H(_,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":H(_,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":H(_,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let Y=_.__smithy_context?.selectedHttpAuthScheme?.identity;if(Y?.$source){let X=Y;if(X.accountId)H(_,"RESOLVED_ACCOUNT_ID","T");for(let[$,Z]of Object.entries(X.$source??{}))H(_,$,Z)}}var e_="user-agent",G_="x-amz-user-agent",_W=" ",X_="/",sG=/[^!$%&'*+\-.^_`|~\w]/g,aG=/[^!$%&'*+\-.^_`|~\w#]/g,WW="-",iG=1024;function nG(_){let W="";for(let K in _){let G=_[K];if(W.length+G.length+1<=iG){if(W.length)W+=","+G;else W+=G;continue}break}return W}var BW=(_)=>(W,K)=>async(G)=>{let{request:Y}=G;if(!m.HttpRequest.isInstance(Y))return W(G);let{headers:X}=Y,$=K?.userAgent?.map(c)||[],Z=(await _.defaultUserAgentProvider()).map(c);await pG(K,_,G);let L=K;Z.push(`m/${nG(Object.assign({},K.__smithy_context?.features,L.__aws_sdk_context?.features))}`);let b=_?.customUserAgent?.map(c)||[],j=await _.userAgentAppId();if(j)Z.push(c(["app",`${j}`]));let Q=wW(),J=(Q?[Q]:[]).concat([...Z,...$,...b]).join(_W),w=[...Z.filter((F)=>F.startsWith("aws-sdk-")),...b].join(_W);if(_.runtime!=="browser"){if(w)X[G_]=X[G_]?`${X[e_]} ${w}`:w;X[e_]=J}else X[G_]=J;return W({...G,request:Y})},c=(_)=>{let W=_[0].split(X_).map(($)=>$.replace(sG,WW)).join(X_),K=_[1]?.replace(aG,WW),G=W.indexOf(X_),Y=W.substring(0,G),X=W.substring(G+1);if(Y==="api")X=X.toLowerCase();return[Y,X,K].filter(($)=>$&&$.length>0).reduce(($,Z,L)=>{switch(L){case 0:return Z;case 1:return`${$}/${Z}`;default:return`${$}#${Z}`}},"")},HW={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},oG=(_)=>({applyToStack:(W)=>{W.add(BW(_),HW)}}),tG=()=>{let _=["deno","bun","llrt"];for(let W of _)if(P.versions[W])return[`md/${W}`,P.versions[W]];return["md/nodejs",P.versions.node]},rG=(_)=>{let W=process.cwd();if(!_)return[W];let K=E.normalize(_),G=K.split(E.sep),Y=G.indexOf("node_modules"),X=Y!==-1?G.slice(0,Y).join(E.sep):K;if(W===X)return[W];return[X,W]},eG=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?$/,zW=(_="")=>{let W=_.match(eG);if(!W)return;let[K,G,Y,X]=[W[1],W[2],W[3],W[4]];return X?`${K}.${G}.${Y}-${X}`:`${K}.${G}.${Y}`},_1=["^","~",">=","<=",">","<"],W1=["latest","beta","dev","rc","insiders","next"],K1=(_="")=>{if(W1.includes(_))return _;let W=_1.find((G)=>_.startsWith(G))??"",K=zW(_.slice(W.length));if(!K)return;return`${W}${K}`},B,G1=E.join("node_modules","typescript","package.json"),X1=async()=>{if(B===null)return;else if(typeof B==="string")return["md/tsc",B];let _=!1;try{_=z.booleanSelector(process.env,"AWS_SDK_JS_TYPESCRIPT_DETECTION_DISABLED",z.SelectorType.ENV)||!1}catch{}if(_){B=null;return}let K=rG(typeof __dirname<"u"?__dirname:void 0),G;for(let $ of K)try{let Z=E.join($,"package.json"),L=await r_.readFile(Z,"utf-8"),{dependencies:b,devDependencies:j}=JSON.parse(L),Q=j?.typescript??b?.typescript;if(typeof Q!=="string")continue;G=Q;break}catch{}if(!G){B=null;return}let Y;for(let $ of K)try{let Z=E.join($,G1),L=await r_.readFile(Z,"utf-8"),{version:b}=JSON.parse(L),j=zW(b);if(typeof j!=="string")continue;Y=j;break}catch{}if(Y)return B=Y,["md/tsc",B];let X=K1(G);if(typeof X!=="string"){B=null;return}return B=`dev_${X}`,["md/tsc",B]},FW={isCrtAvailable:!1},Y1=()=>{if(FW.isCrtAvailable)return["md/crt-avail"];return null},MW=({serviceId:_,clientVersion:W})=>{let K=tG();return async(G)=>{let Y=[["aws-sdk-js",W],["ua","2.1"],[`os/${t_.platform()}`,t_.release()],["lang/js"],K],X=await X1();if(X)Y.push(X);let $=Y1();if($)Y.push($);if(_)Y.push([`api/${_}`,W]);if(P.env.AWS_EXECUTION_ENV)Y.push([`exec-env/${P.env.AWS_EXECUTION_ENV}`]);let Z=await G?.userAgentAppId?.();return Z?[...Y,[`app/${Z}`]]:[...Y]}},$1=MW,VW="AWS_SDK_UA_APP_ID",NW="sdk_ua_app_id",Z1="sdk-ua-app-id",b1={environmentVariableSelector:(_)=>_[VW],configFileSelector:(_)=>_[NW]??_[Z1],default:$_},L1=({serviceId:_,clientVersion:W})=>async(K)=>{let G=await import("./chunk-9qzwmt76.js"),Y=G.parse??G.default.parse??(()=>""),X=typeof window<"u"&&window?.navigator?.userAgent?Y(window.navigator.userAgent):void 0,$=[["aws-sdk-js",W],["ua","2.1"],[`os/${X?.os?.name||"other"}`,X?.os?.version],["lang/js"],["md/browser",`${X?.browser?.name??"unknown"}_${X?.browser?.version??"unknown"}`]];if(_)$.push([`api/${_}`,W]);let Z=await K?.userAgentAppId?.();if(Z)$.push([`app/${Z}`]);return $},Q1={os(_){if(/iPhone|iPad|iPod/.test(_))return"iOS";if(/Macintosh|Mac OS X/.test(_))return"macOS";if(/Windows NT/.test(_))return"Windows";if(/Android/.test(_))return"Android";if(/Linux/.test(_))return"Linux";return},browser(_){if(/EdgiOS|EdgA|Edg\//.test(_))return"Microsoft Edge";if(/Firefox\//.test(_))return"Firefox";if(/Chrome\//.test(_))return"Chrome";if(/Safari\//.test(_))return"Safari";return}},Z_=(_,W=!1)=>{if(W){for(let K of _.split("."))if(!Z_(K))return!1;return!0}if(!C.isValidHostLabel(_))return!1;if(_.length<3||_.length>63)return!1;if(_!==_.toLowerCase())return!1;if(C.isIpAddress(_))return!1;return!0},KW=":",j1="/",UW=(_)=>{let W=_.split(KW);if(W.length<6)return null;let[K,G,Y,X,$,...Z]=W;if(K!=="arn"||G===""||Y===""||Z.join(KW)==="")return null;let L=Z.map((b)=>b.split(j1)).flat();return{partition:G,service:Y,region:X,accountId:$,resourceId:L}},EW={isVirtualHostableS3Bucket:Z_,parseArn:UW,partition:JW};C.customEndpointFunctions.aws=EW;var J1=(_)=>{if(typeof _.endpointProvider!=="function")throw Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client.");let{endpoint:W}=_;if(W===void 0)_.endpoint=async()=>{return CW(_.endpointProvider({Region:typeof _.region==="function"?await _.region():_.region,UseDualStack:typeof _.useDualstackEndpoint==="function"?await _.useDualstackEndpoint():_.useDualstackEndpoint,UseFIPS:typeof _.useFipsEndpoint==="function"?await _.useFipsEndpoint():_.useFipsEndpoint,Endpoint:void 0},{logger:_.logger}))};return _},CW=(_)=>m.parseUrl(_.url);function O1(_={}){return z.loadConfig({...z.NODE_REGION_CONFIG_OPTIONS,async default(){if(!hW.silence)console.warn("@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly.");return"us-east-1"}},{...z.NODE_REGION_CONFIG_FILE_OPTIONS,..._})}var hW={silence:!1},w1=(_)=>{return{setRegion(W){_.region=W},region(){return _.region}}},B1=(_)=>{return{region:_.region()}};H1.NODE_REGION_CONFIG_FILE_OPTIONS=z.NODE_REGION_CONFIG_FILE_OPTIONS;H1.NODE_REGION_CONFIG_OPTIONS=z.NODE_REGION_CONFIG_OPTIONS;H1.REGION_ENV_NAME=z.REGION_ENV_NAME;H1.REGION_INI_NAME=z.REGION_INI_NAME;H1.resolveRegionConfig=z.resolveRegionConfig;H1.EndpointError=C.EndpointError;H1.isIpAddress=C.isIpAddress;H1.resolveEndpoint=C.resolveEndpoint;H1.DEFAULT_UA_APP_ID=$_;H1.NODE_APP_ID_CONFIG_OPTIONS=b1;H1.UA_APP_ID_ENV_NAME=VW;H1.UA_APP_ID_INI_NAME=NW;H1.awsEndpointFunctions=EW;H1.createDefaultUserAgentProvider=MW;H1.createUserAgentStringParsingProvider=L1;H1.crtAvailability=FW;H1.defaultUserAgent=$1;H1.emitWarningIfUnsupportedVersion=TG;H1.fallback=Q1;H1.getAwsRegionExtensionConfiguration=w1;H1.getHostHeaderPlugin=xG;H1.getLoggerPlugin=fG;H1.getLongPollPlugin=RG;H1.getRecursionDetectionPlugin=cG;H1.getUserAgentMiddlewareOptions=HW;H1.getUserAgentPlugin=oG;H1.getUserAgentPrefix=wW;H1.hostHeaderMiddleware=GW;H1.hostHeaderMiddlewareOptions=XW;H1.isVirtualHostableS3Bucket=Z_;H1.loggerMiddleware=YW;H1.loggerMiddlewareOptions=$W;H1.parseArn=UW;H1.partition=JW;H1.recursionDetectionMiddleware=bW;H1.recursionDetectionMiddlewareOptions=ZW;H1.resolveAwsRegionExtensionConfiguration=B1;H1.resolveDefaultAwsRegionalEndpointsConfig=J1;H1.resolveHostHeaderConfig=vG;H1.resolveUserAgentConfig=mG;H1.setCredentialFeature=AG;H1.setFeature=H;H1.setPartitionInfo=OW;H1.setTokenFeature=kG;H1.state=d;H1.stsRegionDefaultResolver=O1;H1.stsRegionWarning=hW;H1.toEndpointV1=CW;H1.useDefaultPartitionInfo=gG;H1.userAgentMiddleware=BW});
10
+ More information can be found at: https://a.co/c895JFp`)}},SG=()=>(_,W)=>async(K)=>{return W.__retryLongPoll=!0,_(K)},PG={name:"longPollMiddleware",tags:["RETRY"],step:"initialize",override:!0},RG=(_)=>({applyToStack:(W)=>{W.add(SG(),PG)}});function AG(_,W,K){if(!_.$source)_.$source={};return _.$source[W]=K,_}Y_.Retry.v2026||=typeof process==="object"&&process.env?.AWS_NEW_RETRIES_2026==="true";function H(_,W,K){if(!_.__aws_sdk_context)_.__aws_sdk_context={features:{}};else if(!_.__aws_sdk_context.features)_.__aws_sdk_context.features={};_.__aws_sdk_context.features[W]=K}function kG(_,W,K){if(!_.$source)_.$source={};return _.$source[W]=K,_}function vG(_){return _}var GW=(_)=>(W)=>async(K)=>{if(!m.HttpRequest.isInstance(K.request))return W(K);let{request:G}=K,{handlerProtocol:Y=""}=_.requestHandler.metadata||{};if(Y.indexOf("h2")>=0&&!G.headers[":authority"])delete G.headers.host,G.headers[":authority"]=G.hostname+(G.port?":"+G.port:"");else if(!G.headers.host){let X=G.hostname;if(G.port!=null)X+=`:${G.port}`;G.headers.host=X}return W(K)},XW={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},xG=(_)=>({applyToStack:(W)=>{W.add(GW(_),XW)}}),YW=()=>(_,W)=>async(K)=>{try{let G=await _(K),{clientName:Y,commandName:X,logger:$,dynamoDbDocumentClientOptions:Z={}}=W,{overrideInputFilterSensitiveLog:L,overrideOutputFilterSensitiveLog:b}=Z,j=L??W.inputFilterSensitiveLog,Q=b??W.outputFilterSensitiveLog,{$metadata:J,...w}=G.output;return $?.info?.({clientName:Y,commandName:X,input:j(K.input),output:Q(w),metadata:J}),G}catch(G){let{clientName:Y,commandName:X,logger:$,dynamoDbDocumentClientOptions:Z={}}=W,{overrideInputFilterSensitiveLog:L}=Z,b=L??W.inputFilterSensitiveLog;throw $?.error?.({clientName:Y,commandName:X,input:b(K.input),error:G,metadata:G.$metadata}),G}},$W={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},fG=(_)=>({applyToStack:(W)=>{W.add(YW(),$W)}}),ZW={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},K_="X-Amzn-Trace-Id",yG="AWS_LAMBDA_FUNCTION_NAME",lG="_X_AMZN_TRACE_ID",bW=()=>(_)=>async(W)=>{let{request:K}=W;if(!m.HttpRequest.isInstance(K))return _(W);let G=Object.keys(K.headers??{}).find((j)=>j.toLowerCase()===K_.toLowerCase())??K_;if(K.headers.hasOwnProperty(G))return _(W);let Y=process.env[yG],X=process.env[lG],L=(await qG.InvokeStore.getInstanceAsync())?.getXRayTraceId()??X,b=(j)=>typeof j==="string"&&j.length>0;if(b(Y)&&b(L))K.headers[K_]=L;return _({...W,request:K})},cG=(_)=>({applyToStack:(W)=>{W.add(bW(),ZW)}}),$_=void 0;function dG(_){if(_===void 0)return!0;return typeof _==="string"&&_.length<=50}function mG(_){let W=IG.normalizeProvider(_.userAgentAppId??$_),{customUserAgent:K}=_;return Object.assign(_,{customUserAgent:typeof K==="string"?[[K]]:K,userAgentAppId:async()=>{let G=await W();if(!dG(G)){let Y=_.logger?.constructor?.name==="NoOpLogger"||!_.logger?console:_.logger;if(typeof G!=="string")Y?.warn("userAgentAppId must be a string or undefined.");else if(G.length>50)Y?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return G}})}var LW={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],version:"1.1"},QW=LW,jW="",JW=(_)=>{let{partitions:W}=QW;for(let G of W){let{regions:Y,outputs:X}=G;for(let[$,Z]of Object.entries(Y))if($===_)return{...X,...Z}}for(let G of W){let{regionRegex:Y,outputs:X}=G;if(new RegExp(Y).test(_))return{...X}}let K=W.find((G)=>G.id==="aws");if(!K)throw Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...K.outputs}},OW=(_,W="")=>{QW=_,jW=W},gG=()=>{OW(LW,"")},wW=()=>jW,uG=/\d{12}\.ddb/;async function pG(_,W,K){if(K.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor")H(_,"PROTOCOL_RPC_V2_CBOR","M");if(typeof W.retryStrategy==="function"){let X=await W.retryStrategy();if(typeof X.mode==="string")switch(X.mode){case Y_.RETRY_MODES.ADAPTIVE:H(_,"RETRY_MODE_ADAPTIVE","F");break;case Y_.RETRY_MODES.STANDARD:H(_,"RETRY_MODE_STANDARD","E");break}}if(typeof W.accountIdEndpointMode==="function"){let X=_.endpointV2;if(String(X?.url?.hostname).match(uG))H(_,"ACCOUNT_ID_ENDPOINT","O");switch(await W.accountIdEndpointMode?.()){case"disabled":H(_,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":H(_,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":H(_,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let Y=_.__smithy_context?.selectedHttpAuthScheme?.identity;if(Y?.$source){let X=Y;if(X.accountId)H(_,"RESOLVED_ACCOUNT_ID","T");for(let[$,Z]of Object.entries(X.$source??{}))H(_,$,Z)}}var e_="user-agent",G_="x-amz-user-agent",_W=" ",X_="/",sG=/[^!$%&'*+\-.^_`|~\w]/g,aG=/[^!$%&'*+\-.^_`|~\w#]/g,WW="-",iG=1024;function nG(_){let W="";for(let K in _){let G=_[K];if(W.length+G.length+1<=iG){if(W.length)W+=","+G;else W+=G;continue}break}return W}var BW=(_)=>(W,K)=>async(G)=>{let{request:Y}=G;if(!m.HttpRequest.isInstance(Y))return W(G);let{headers:X}=Y,$=K?.userAgent?.map(c)||[],Z=(await _.defaultUserAgentProvider()).map(c);await pG(K,_,G);let L=K;Z.push(`m/${nG(Object.assign({},K.__smithy_context?.features,L.__aws_sdk_context?.features))}`);let b=_?.customUserAgent?.map(c)||[],j=await _.userAgentAppId();if(j)Z.push(c(["app",`${j}`]));let Q=wW(),J=(Q?[Q]:[]).concat([...Z,...$,...b]).join(_W),w=[...Z.filter((F)=>F.startsWith("aws-sdk-")),...b].join(_W);if(_.runtime!=="browser"){if(w)X[G_]=X[G_]?`${X[e_]} ${w}`:w;X[e_]=J}else X[G_]=J;return W({...G,request:Y})},c=(_)=>{let W=_[0].split(X_).map(($)=>$.replace(sG,WW)).join(X_),K=_[1]?.replace(aG,WW),G=W.indexOf(X_),Y=W.substring(0,G),X=W.substring(G+1);if(Y==="api")X=X.toLowerCase();return[Y,X,K].filter(($)=>$&&$.length>0).reduce(($,Z,L)=>{switch(L){case 0:return Z;case 1:return`${$}/${Z}`;default:return`${$}#${Z}`}},"")},HW={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},oG=(_)=>({applyToStack:(W)=>{W.add(BW(_),HW)}}),tG=()=>{let _=["deno","bun","llrt"];for(let W of _)if(P.versions[W])return[`md/${W}`,P.versions[W]];return["md/nodejs",P.versions.node]},rG=(_)=>{let W=process.cwd();if(!_)return[W];let K=E.normalize(_),G=K.split(E.sep),Y=G.indexOf("node_modules"),X=Y!==-1?G.slice(0,Y).join(E.sep):K;if(W===X)return[W];return[X,W]},eG=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?$/,zW=(_="")=>{let W=_.match(eG);if(!W)return;let[K,G,Y,X]=[W[1],W[2],W[3],W[4]];return X?`${K}.${G}.${Y}-${X}`:`${K}.${G}.${Y}`},_1=["^","~",">=","<=",">","<"],W1=["latest","beta","dev","rc","insiders","next"],K1=(_="")=>{if(W1.includes(_))return _;let W=_1.find((G)=>_.startsWith(G))??"",K=zW(_.slice(W.length));if(!K)return;return`${W}${K}`},B,G1=E.join("node_modules","typescript","package.json"),X1=async()=>{if(B===null)return;else if(typeof B==="string")return["md/tsc",B];let _=!1;try{_=z.booleanSelector(process.env,"AWS_SDK_JS_TYPESCRIPT_DETECTION_DISABLED",z.SelectorType.ENV)||!1}catch{}if(_){B=null;return}let K=rG(typeof __dirname<"u"?__dirname:void 0),G;for(let $ of K)try{let Z=E.join($,"package.json"),L=await r_.readFile(Z,"utf-8"),{dependencies:b,devDependencies:j}=JSON.parse(L),Q=j?.typescript??b?.typescript;if(typeof Q!=="string")continue;G=Q;break}catch{}if(!G){B=null;return}let Y;for(let $ of K)try{let Z=E.join($,G1),L=await r_.readFile(Z,"utf-8"),{version:b}=JSON.parse(L),j=zW(b);if(typeof j!=="string")continue;Y=j;break}catch{}if(Y)return B=Y,["md/tsc",B];let X=K1(G);if(typeof X!=="string"){B=null;return}return B=`dev_${X}`,["md/tsc",B]},FW={isCrtAvailable:!1},Y1=()=>{if(FW.isCrtAvailable)return["md/crt-avail"];return null},MW=({serviceId:_,clientVersion:W})=>{let K=tG();return async(G)=>{let Y=[["aws-sdk-js",W],["ua","2.1"],[`os/${t_.platform()}`,t_.release()],["lang/js"],K],X=await X1();if(X)Y.push(X);let $=Y1();if($)Y.push($);if(_)Y.push([`api/${_}`,W]);if(P.env.AWS_EXECUTION_ENV)Y.push([`exec-env/${P.env.AWS_EXECUTION_ENV}`]);let Z=await G?.userAgentAppId?.();return Z?[...Y,[`app/${Z}`]]:[...Y]}},$1=MW,VW="AWS_SDK_UA_APP_ID",NW="sdk_ua_app_id",Z1="sdk-ua-app-id",b1={environmentVariableSelector:(_)=>_[VW],configFileSelector:(_)=>_[NW]??_[Z1],default:$_},L1=({serviceId:_,clientVersion:W})=>async(K)=>{let G=await import("./chunk-bc2krtaf.js"),Y=G.parse??G.default.parse??(()=>""),X=typeof window<"u"&&window?.navigator?.userAgent?Y(window.navigator.userAgent):void 0,$=[["aws-sdk-js",W],["ua","2.1"],[`os/${X?.os?.name||"other"}`,X?.os?.version],["lang/js"],["md/browser",`${X?.browser?.name??"unknown"}_${X?.browser?.version??"unknown"}`]];if(_)$.push([`api/${_}`,W]);let Z=await K?.userAgentAppId?.();if(Z)$.push([`app/${Z}`]);return $},Q1={os(_){if(/iPhone|iPad|iPod/.test(_))return"iOS";if(/Macintosh|Mac OS X/.test(_))return"macOS";if(/Windows NT/.test(_))return"Windows";if(/Android/.test(_))return"Android";if(/Linux/.test(_))return"Linux";return},browser(_){if(/EdgiOS|EdgA|Edg\//.test(_))return"Microsoft Edge";if(/Firefox\//.test(_))return"Firefox";if(/Chrome\//.test(_))return"Chrome";if(/Safari\//.test(_))return"Safari";return}},Z_=(_,W=!1)=>{if(W){for(let K of _.split("."))if(!Z_(K))return!1;return!0}if(!C.isValidHostLabel(_))return!1;if(_.length<3||_.length>63)return!1;if(_!==_.toLowerCase())return!1;if(C.isIpAddress(_))return!1;return!0},KW=":",j1="/",UW=(_)=>{let W=_.split(KW);if(W.length<6)return null;let[K,G,Y,X,$,...Z]=W;if(K!=="arn"||G===""||Y===""||Z.join(KW)==="")return null;let L=Z.map((b)=>b.split(j1)).flat();return{partition:G,service:Y,region:X,accountId:$,resourceId:L}},EW={isVirtualHostableS3Bucket:Z_,parseArn:UW,partition:JW};C.customEndpointFunctions.aws=EW;var J1=(_)=>{if(typeof _.endpointProvider!=="function")throw Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client.");let{endpoint:W}=_;if(W===void 0)_.endpoint=async()=>{return CW(_.endpointProvider({Region:typeof _.region==="function"?await _.region():_.region,UseDualStack:typeof _.useDualstackEndpoint==="function"?await _.useDualstackEndpoint():_.useDualstackEndpoint,UseFIPS:typeof _.useFipsEndpoint==="function"?await _.useFipsEndpoint():_.useFipsEndpoint,Endpoint:void 0},{logger:_.logger}))};return _},CW=(_)=>m.parseUrl(_.url);function O1(_={}){return z.loadConfig({...z.NODE_REGION_CONFIG_OPTIONS,async default(){if(!hW.silence)console.warn("@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly.");return"us-east-1"}},{...z.NODE_REGION_CONFIG_FILE_OPTIONS,..._})}var hW={silence:!1},w1=(_)=>{return{setRegion(W){_.region=W},region(){return _.region}}},B1=(_)=>{return{region:_.region()}};H1.NODE_REGION_CONFIG_FILE_OPTIONS=z.NODE_REGION_CONFIG_FILE_OPTIONS;H1.NODE_REGION_CONFIG_OPTIONS=z.NODE_REGION_CONFIG_OPTIONS;H1.REGION_ENV_NAME=z.REGION_ENV_NAME;H1.REGION_INI_NAME=z.REGION_INI_NAME;H1.resolveRegionConfig=z.resolveRegionConfig;H1.EndpointError=C.EndpointError;H1.isIpAddress=C.isIpAddress;H1.resolveEndpoint=C.resolveEndpoint;H1.DEFAULT_UA_APP_ID=$_;H1.NODE_APP_ID_CONFIG_OPTIONS=b1;H1.UA_APP_ID_ENV_NAME=VW;H1.UA_APP_ID_INI_NAME=NW;H1.awsEndpointFunctions=EW;H1.createDefaultUserAgentProvider=MW;H1.createUserAgentStringParsingProvider=L1;H1.crtAvailability=FW;H1.defaultUserAgent=$1;H1.emitWarningIfUnsupportedVersion=TG;H1.fallback=Q1;H1.getAwsRegionExtensionConfiguration=w1;H1.getHostHeaderPlugin=xG;H1.getLoggerPlugin=fG;H1.getLongPollPlugin=RG;H1.getRecursionDetectionPlugin=cG;H1.getUserAgentMiddlewareOptions=HW;H1.getUserAgentPlugin=oG;H1.getUserAgentPrefix=wW;H1.hostHeaderMiddleware=GW;H1.hostHeaderMiddlewareOptions=XW;H1.isVirtualHostableS3Bucket=Z_;H1.loggerMiddleware=YW;H1.loggerMiddlewareOptions=$W;H1.parseArn=UW;H1.partition=JW;H1.recursionDetectionMiddleware=bW;H1.recursionDetectionMiddlewareOptions=ZW;H1.resolveAwsRegionExtensionConfiguration=B1;H1.resolveDefaultAwsRegionalEndpointsConfig=J1;H1.resolveHostHeaderConfig=vG;H1.resolveUserAgentConfig=mG;H1.setCredentialFeature=AG;H1.setFeature=H;H1.setPartitionInfo=OW;H1.setTokenFeature=kG;H1.state=d;H1.stsRegionDefaultResolver=O1;H1.stsRegionWarning=hW;H1.toEndpointV1=CW;H1.useDefaultPartitionInfo=gG;H1.userAgentMiddleware=BW});
11
11
  export{k_ as Le,i_ as Me,OX as Ne};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ch as F}from"./chunk-w43kmnm9.js";import{dl as Y}from"./chunk-9a6p1gdn.js";import{ct as y}from"./chunk-ts2k13g0.js";import{Ct as W}from"./chunk-gdew7bwm.js";import{Fu as K}from"./chunk-aa2n02qk.js";import{EI as x}from"./chunk-tezrgfc6.js";import{EOL as A}from"os";import B from"path";var z=W.tiers().map((b)=>({label:b.label,providerID:b.providerID,modelID:b.modelID})),$=Object.fromEntries(W.tiers().map((b)=>[`${b.providerID}/${b.modelID}`,b.label]));function w(b){return new Map((b??[]).map((q)=>[q.id,q]))}function j(b,q,C){return(b instanceof Map?b.get(q):Array.isArray(b)?b.find((Q)=>Q.id===q):void 0)?.models[C]}function H(b,q,C){let J=`${q}/${C}`;if($[J])return $[J];return j(b,q,C)?.name??C}function f(b,q){let C=W.tiers().find((J)=>J.providerID===b&&J.modelID===q);return C?W.TIER_RATINGS[C.id]:void 0}async function c(b){return F.runPromise(Y.Service.use((q)=>x.gen(function*(){let C=yield*q.get(b),J=yield*q.messages({sessionID:C.id,agentID:"*"});return{info:C,messages:J}})))}function m(){let b=Y.list({limit:1}).next();return b.done?void 0:b.value}function n(b,q){return`session-${b.slice(0,8)}.${q==="markdown"?"md":"json"}`}function h(b,q){return B.resolve(b,q)}async function o(b,q,C){let J=h(b,q);return await K.write(J,C),J}function G(b,q,C){return C.trim()?`[redacted:${b}:${q}]`:C}function U(b,q,C){if(!C)return C;return Object.keys(C).length?{redacted:`${b}:${q}`}:C}function X(b,q){return{...q,value:G("file-text",b,q.value)}}function N(b,q){return q?.map((C,J)=>({...C,file:G(`${b}-file`,String(J),C.file),patch:G(`${b}-patch`,String(J),C.patch)}))}function E(b){if(!b.source)return b.source;if(b.source.type==="symbol")return{...b.source,path:G("file-path",b.id,b.source.path),name:G("file-symbol",b.id,b.source.name),text:X(b.id,b.source.text)};if(b.source.type==="resource")return{...b.source,clientName:G("file-client",b.id,b.source.clientName),uri:G("file-uri",b.id,b.source.uri),text:X(b.id,b.source.text)};return{...b.source,path:G("file-path",b.id,b.source.path),text:X(b.id,b.source.text)}}function O(b){return{...b,url:G("file-url",b.id,b.url),filename:b.filename===void 0?void 0:G("file-name",b.id,b.filename),source:E(b)}}function L(b){switch(b.type){case"text":return{...b,text:G("text",b.id,b.text),metadata:U("text-metadata",b.id,b.metadata)};case"reasoning":return{...b,text:G("reasoning",b.id,b.text),metadata:U("reasoning-metadata",b.id,b.metadata)};case"file":return O(b);case"subtask":return{...b,prompt:G("subtask-prompt",b.id,b.prompt),description:G("subtask-description",b.id,b.description),command:b.command===void 0?void 0:G("subtask-command",b.id,b.command)};case"tool":return{...b,metadata:U("tool-metadata",b.id,b.metadata),state:b.state.status==="pending"?{...b.state,input:U("tool-input",b.id,b.state.input)??b.state.input,raw:G("tool-raw",b.id,b.state.raw)}:b.state.status==="running"?{...b.state,input:U("tool-input",b.id,b.state.input)??b.state.input,title:b.state.title===void 0?void 0:G("tool-title",b.id,b.state.title),metadata:U("tool-state-metadata",b.id,b.state.metadata)}:b.state.status==="completed"?{...b.state,input:U("tool-input",b.id,b.state.input)??b.state.input,output:G("tool-output",b.id,b.state.output),title:G("tool-title",b.id,b.state.title),metadata:U("tool-state-metadata",b.id,b.state.metadata)??b.state.metadata,attachments:b.state.attachments?.map(O)}:{...b.state,input:U("tool-input",b.id,b.state.input)??b.state.input,error:G("tool-error",b.id,b.state.error),metadata:U("tool-state-metadata",b.id,b.state.metadata)}};case"patch":return{...b,hash:G("patch",b.id,b.hash),files:b.files.map((q,C)=>G("patch-file",`${b.id}-${C}`,q))};case"snapshot":return{...b,snapshot:G("snapshot",b.id,b.snapshot)};case"step-start":case"step-finish":return{...b,snapshot:b.snapshot===void 0?void 0:G("snapshot",b.id,b.snapshot)};case"agent":return{...b,source:!b.source?b.source:{...b.source,value:G("agent-source",b.id,b.source.value)}};default:return b}}function d(b){return{info:{...b.info,title:G("session-title",b.info.id,b.info.title),directory:G("session-directory",b.info.id,b.info.directory),summary:!b.info.summary?b.info.summary:{...b.info.summary,diffs:N("session-diff",b.info.summary.diffs)},revert:!b.info.revert?b.info.revert:{...b.info.revert,snapshot:b.info.revert.snapshot===void 0?void 0:G("revert-snapshot",b.info.id,b.info.revert.snapshot),diff:b.info.revert.diff===void 0?void 0:G("revert-diff",b.info.id,b.info.revert.diff)}},messages:b.messages.map((q)=>({info:q.info.role==="user"?{...q.info,system:q.info.system===void 0?void 0:G("system",q.info.id,q.info.system),summary:!q.info.summary?q.info.summary:{...q.info.summary,title:q.info.summary.title===void 0?void 0:G("summary-title",q.info.id,q.info.summary.title),body:q.info.summary.body===void 0?void 0:G("summary-body",q.info.id,q.info.summary.body),diffs:N("message-diff",q.info.summary.diffs)}}:{...q.info,path:{cwd:G("cwd",q.info.id,q.info.path.cwd),root:G("root",q.info.id,q.info.path.root)}},parts:q.parts.map(L)}))}}function i(b,q,C){let J=w(C.providers),Q=`# ${b.title}
2
+ import{Ch as F}from"./chunk-he9kpk9r.js";import{dl as Y}from"./chunk-qq9m8fxv.js";import{Fr as y}from"./chunk-vkjqy92f.js";import{ds as W}from"./chunk-6yhn9syz.js";import{gt as K}from"./chunk-1bxfzd6r.js";import{fH as x}from"./chunk-g7v6sp3c.js";import{EOL as A}from"os";import B from"path";var z=W.tiers().map((b)=>({label:b.label,providerID:b.providerID,modelID:b.modelID})),$=Object.fromEntries(W.tiers().map((b)=>[`${b.providerID}/${b.modelID}`,b.label]));function w(b){return new Map((b??[]).map((q)=>[q.id,q]))}function j(b,q,C){return(b instanceof Map?b.get(q):Array.isArray(b)?b.find((Q)=>Q.id===q):void 0)?.models[C]}function H(b,q,C){let J=`${q}/${C}`;if($[J])return $[J];return j(b,q,C)?.name??C}function f(b,q){let C=W.tiers().find((J)=>J.providerID===b&&J.modelID===q);return C?W.TIER_RATINGS[C.id]:void 0}async function c(b){return F.runPromise(Y.Service.use((q)=>x.gen(function*(){let C=yield*q.get(b),J=yield*q.messages({sessionID:C.id,agentID:"*"});return{info:C,messages:J}})))}function m(){let b=Y.list({limit:1}).next();return b.done?void 0:b.value}function n(b,q){return`session-${b.slice(0,8)}.${q==="markdown"?"md":"json"}`}function h(b,q){return B.resolve(b,q)}async function o(b,q,C){let J=h(b,q);return await K.write(J,C),J}function G(b,q,C){return C.trim()?`[redacted:${b}:${q}]`:C}function U(b,q,C){if(!C)return C;return Object.keys(C).length?{redacted:`${b}:${q}`}:C}function X(b,q){return{...q,value:G("file-text",b,q.value)}}function N(b,q){return q?.map((C,J)=>({...C,file:G(`${b}-file`,String(J),C.file),patch:G(`${b}-patch`,String(J),C.patch)}))}function E(b){if(!b.source)return b.source;if(b.source.type==="symbol")return{...b.source,path:G("file-path",b.id,b.source.path),name:G("file-symbol",b.id,b.source.name),text:X(b.id,b.source.text)};if(b.source.type==="resource")return{...b.source,clientName:G("file-client",b.id,b.source.clientName),uri:G("file-uri",b.id,b.source.uri),text:X(b.id,b.source.text)};return{...b.source,path:G("file-path",b.id,b.source.path),text:X(b.id,b.source.text)}}function O(b){return{...b,url:G("file-url",b.id,b.url),filename:b.filename===void 0?void 0:G("file-name",b.id,b.filename),source:E(b)}}function L(b){switch(b.type){case"text":return{...b,text:G("text",b.id,b.text),metadata:U("text-metadata",b.id,b.metadata)};case"reasoning":return{...b,text:G("reasoning",b.id,b.text),metadata:U("reasoning-metadata",b.id,b.metadata)};case"file":return O(b);case"subtask":return{...b,prompt:G("subtask-prompt",b.id,b.prompt),description:G("subtask-description",b.id,b.description),command:b.command===void 0?void 0:G("subtask-command",b.id,b.command)};case"tool":return{...b,metadata:U("tool-metadata",b.id,b.metadata),state:b.state.status==="pending"?{...b.state,input:U("tool-input",b.id,b.state.input)??b.state.input,raw:G("tool-raw",b.id,b.state.raw)}:b.state.status==="running"?{...b.state,input:U("tool-input",b.id,b.state.input)??b.state.input,title:b.state.title===void 0?void 0:G("tool-title",b.id,b.state.title),metadata:U("tool-state-metadata",b.id,b.state.metadata)}:b.state.status==="completed"?{...b.state,input:U("tool-input",b.id,b.state.input)??b.state.input,output:G("tool-output",b.id,b.state.output),title:G("tool-title",b.id,b.state.title),metadata:U("tool-state-metadata",b.id,b.state.metadata)??b.state.metadata,attachments:b.state.attachments?.map(O)}:{...b.state,input:U("tool-input",b.id,b.state.input)??b.state.input,error:G("tool-error",b.id,b.state.error),metadata:U("tool-state-metadata",b.id,b.state.metadata)}};case"patch":return{...b,hash:G("patch",b.id,b.hash),files:b.files.map((q,C)=>G("patch-file",`${b.id}-${C}`,q))};case"snapshot":return{...b,snapshot:G("snapshot",b.id,b.snapshot)};case"step-start":case"step-finish":return{...b,snapshot:b.snapshot===void 0?void 0:G("snapshot",b.id,b.snapshot)};case"agent":return{...b,source:!b.source?b.source:{...b.source,value:G("agent-source",b.id,b.source.value)}};default:return b}}function d(b){return{info:{...b.info,title:G("session-title",b.info.id,b.info.title),directory:G("session-directory",b.info.id,b.info.directory),summary:!b.info.summary?b.info.summary:{...b.info.summary,diffs:N("session-diff",b.info.summary.diffs)},revert:!b.info.revert?b.info.revert:{...b.info.revert,snapshot:b.info.revert.snapshot===void 0?void 0:G("revert-snapshot",b.info.id,b.info.revert.snapshot),diff:b.info.revert.diff===void 0?void 0:G("revert-diff",b.info.id,b.info.revert.diff)}},messages:b.messages.map((q)=>({info:q.info.role==="user"?{...q.info,system:q.info.system===void 0?void 0:G("system",q.info.id,q.info.system),summary:!q.info.summary?q.info.summary:{...q.info.summary,title:q.info.summary.title===void 0?void 0:G("summary-title",q.info.id,q.info.summary.title),body:q.info.summary.body===void 0?void 0:G("summary-body",q.info.id,q.info.summary.body),diffs:N("message-diff",q.info.summary.diffs)}}:{...q.info,path:{cwd:G("cwd",q.info.id,q.info.path.cwd),root:G("root",q.info.id,q.info.path.root)}},parts:q.parts.map(L)}))}}function i(b,q,C){let J=w(C.providers),Q=`# ${b.title}
3
3
 
4
4
  `;Q+=`**Session ID:** ${b.id}
5
5
  `,Q+=`**Created:** ${new Date(b.time.created).toLocaleString()}
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-e0vrxetq.js";var h="./tree-sitter-typescript-zxjzwt75.wasm";export{h as default};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{be as b}from"./chunk-f4mnp6xd.js";import{eg as t}from"./chunk-bwadggys.js";import{Ch as u}from"./chunk-he9kpk9r.js";import"./chunk-vs3s49jw.js";import"./chunk-kre93a89.js";import"./chunk-060wbpz4.js";import"./chunk-zrhw1szj.js";import"./chunk-t8fjgkp8.js";import"./chunk-0egrckx0.js";import{$j as m,Uk as y}from"./chunk-qq9m8fxv.js";import{ql as v}from"./chunk-2qm46qvn.js";import{Ol as a}from"./chunk-tsmj98yf.js";import"./chunk-58f4y4b7.js";import"./chunk-rmsqb6r4.js";import"./chunk-qxdpgdfk.js";import"./chunk-6qwk6z87.js";import"./chunk-sa0rrreh.js";import"./chunk-ydgst3h8.js";import"./chunk-6tqbnxar.js";import"./chunk-0w19vmd7.js";import"./chunk-eewe7tx1.js";import"./chunk-37cbrnke.js";import"./chunk-wm9nh9nb.js";import"./chunk-scnbt714.js";import"./chunk-cqtkxwd8.js";import"./chunk-y3gy62q5.js";import"./chunk-az3nss5m.js";import"./chunk-p2fte9vz.js";import"./chunk-ggncq8w8.js";import"./chunk-t3w43rft.js";import"./chunk-eacpc64g.js";import"./chunk-27saej0r.js";import"./chunk-9009v4d0.js";import"./chunk-82xrfk5x.js";import"./chunk-wqk1v8t0.js";import"./chunk-vkjqy92f.js";import"./chunk-z0kbyr00.js";import"./chunk-sbjymf20.js";import"./chunk-dt3bsmfe.js";import"./chunk-vbfej8ds.js";import"./chunk-0tm6589k.js";import"./chunk-6yhn9syz.js";import"./chunk-wb05bp10.js";import"./chunk-wgkcyqn1.js";import"./chunk-59csnjc3.js";import"./chunk-1bxfzd6r.js";import"./chunk-6p6m5956.js";import"./chunk-a48mx917.js";import"./chunk-3va85mbe.js";import"./chunk-w7a33cwa.js";import{fH as s}from"./chunk-g7v6sp3c.js";import"./chunk-s2tc3qs0.js";import"./chunk-n6tqtk6h.js";import"./chunk-e0vrxetq.js";import{EOL as f}from"os";var M=b({command:"models [provider]",describe:"list all available models",builder:(r)=>{return r.positional("provider",{describe:"provider ID to filter models by",type:"string",array:!1}).option("verbose",{describe:"use more verbose model output (includes metadata like costs)",type:"boolean"}).option("refresh",{describe:"refresh the models cache from models.dev",type:"boolean"})},handler:async(r)=>{if(r.refresh)await v.refresh(!0),t.println(t.Style.TEXT_SUCCESS_BOLD+"Models cache refreshed"+t.Style.TEXT_NORMAL);await a.provide({directory:process.cwd(),async fn(){await u.runPromise(s.gen(function*(){let n=yield*(yield*y.Service).list(),l=(e,o)=>{let i=n[e],d=Object.entries(i.models).sort(([c],[p])=>c.localeCompare(p));for(let[c,p]of d)if(process.stdout.write(`${e}/${c}`),process.stdout.write(f),o)process.stdout.write(JSON.stringify(p,null,2)),process.stdout.write(f)};if(r.provider){let e=m.make(r.provider);if(!n[e]){yield*s.sync(()=>t.error(`Provider not found: ${r.provider}`));return}yield*s.sync(()=>l(e,r.verbose));return}let h=Object.keys(n).sort((e,o)=>{let i=e.startsWith("opencode"),d=o.startsWith("opencode");if(i&&!d)return-1;if(!i&&d)return 1;return e.localeCompare(o)});yield*s.sync(()=>{for(let e of h)l(m.make(e),r.verbose)})}))}})}});export{M as ModelsCommand};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-f2pv705d.js";var{create:os,defineProperty:Gt,getOwnPropertyDescriptor:us,getOwnPropertyNames:ps,getPrototypeOf:hs}=Object,cs=Object.prototype.hasOwnProperty,ce=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ls=(t,e)=>{for(var s in e)Gt(t,s,{get:e[s],enumerable:!0})},ds=(t,e,s,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of ps(e))!cs.call(t,r)&&r!==s&&Gt(t,r,{get:()=>e[r],enumerable:!(i=us(e,r))||i.enumerable});return t},le=(t,e,s)=>(s=t!=null?os(hs(t)):{},ds(e||!t||!t.__esModule?Gt(s,"default",{value:t,enumerable:!0}):s,t)),fs=ce((t,e)=>{e.exports={}}),de=ce((t,e)=>{var s=fs(),i=/^[\da-fA-F]+$/,r=/^\d+$/,n=new WeakMap;function o(h){h=h.Parser.acorn||h;let l=n.get(h);if(!l){let{tokTypes:g,TokContext:C,TokenType:A}=h,S=new C("<tag",!1),V=new C("</tag",!1),P=new C("<tag>...</tag>",!0,!0),U={tc_oTag:S,tc_cTag:V,tc_expr:P},et={jsxName:new A("jsxName"),jsxText:new A("jsxText",{beforeExpr:!0}),jsxTagStart:new A("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new A("jsxTagEnd")};et.jsxTagStart.updateContext=function(){this.context.push(P),this.context.push(S),this.exprAllowed=!1},et.jsxTagEnd.updateContext=function(dt){let ft=this.context.pop();ft===S&&dt===g.slash||ft===V?(this.context.pop(),this.exprAllowed=this.curContext()===P):this.exprAllowed=!0},l={tokContexts:U,tokTypes:et},n.set(h,l)}return l}function p(h){if(!h)return h;if(h.type==="JSXIdentifier")return h.name;if(h.type==="JSXNamespacedName")return h.namespace.name+":"+h.name.name;if(h.type==="JSXMemberExpression")return p(h.object)+"."+p(h.property)}e.exports=function(h){return h=h||{},function(l){return u({allowNamespaces:h.allowNamespaces!==!1,allowNamespacedObjects:!!h.allowNamespacedObjects},l)}},Object.defineProperty(e.exports,"tokTypes",{get:function(){return o(void 0).tokTypes},configurable:!0,enumerable:!0});function u(h,l){let g=l.acorn||void 0,C=o(g),A=g.tokTypes,S=C.tokTypes,V=g.tokContexts,P=C.tokContexts.tc_oTag,U=C.tokContexts.tc_cTag,et=C.tokContexts.tc_expr,dt=g.isNewLine,ft=g.isIdentifierStart,ns=g.isIdentifierChar;return class extends l{static get acornJsx(){return C}jsx_readToken(){let c="",y=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let x=this.input.charCodeAt(this.pos);switch(x){case 60:case 123:return this.pos===this.start?x===60&&this.exprAllowed?(++this.pos,this.finishToken(S.jsxTagStart)):this.getTokenFromCode(x):(c+=this.input.slice(y,this.pos),this.finishToken(S.jsxText,c));case 38:c+=this.input.slice(y,this.pos),c+=this.jsx_readEntity(),y=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(x===62?"&gt;":"&rbrace;")+'` or `{"'+this.input[this.pos]+'"}`?');default:dt(x)?(c+=this.input.slice(y,this.pos),c+=this.jsx_readNewLine(!0),y=this.pos):++this.pos}}}jsx_readNewLine(c){let y=this.input.charCodeAt(this.pos),x;return++this.pos,y===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,x=c?`
2
+ import"./chunk-e0vrxetq.js";var{create:os,defineProperty:Gt,getOwnPropertyDescriptor:us,getOwnPropertyNames:ps,getPrototypeOf:hs}=Object,cs=Object.prototype.hasOwnProperty,ce=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ls=(t,e)=>{for(var s in e)Gt(t,s,{get:e[s],enumerable:!0})},ds=(t,e,s,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of ps(e))!cs.call(t,r)&&r!==s&&Gt(t,r,{get:()=>e[r],enumerable:!(i=us(e,r))||i.enumerable});return t},le=(t,e,s)=>(s=t!=null?os(hs(t)):{},ds(e||!t||!t.__esModule?Gt(s,"default",{value:t,enumerable:!0}):s,t)),fs=ce((t,e)=>{e.exports={}}),de=ce((t,e)=>{var s=fs(),i=/^[\da-fA-F]+$/,r=/^\d+$/,n=new WeakMap;function o(h){h=h.Parser.acorn||h;let l=n.get(h);if(!l){let{tokTypes:g,TokContext:C,TokenType:A}=h,S=new C("<tag",!1),V=new C("</tag",!1),P=new C("<tag>...</tag>",!0,!0),U={tc_oTag:S,tc_cTag:V,tc_expr:P},et={jsxName:new A("jsxName"),jsxText:new A("jsxText",{beforeExpr:!0}),jsxTagStart:new A("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new A("jsxTagEnd")};et.jsxTagStart.updateContext=function(){this.context.push(P),this.context.push(S),this.exprAllowed=!1},et.jsxTagEnd.updateContext=function(dt){let ft=this.context.pop();ft===S&&dt===g.slash||ft===V?(this.context.pop(),this.exprAllowed=this.curContext()===P):this.exprAllowed=!0},l={tokContexts:U,tokTypes:et},n.set(h,l)}return l}function p(h){if(!h)return h;if(h.type==="JSXIdentifier")return h.name;if(h.type==="JSXNamespacedName")return h.namespace.name+":"+h.name.name;if(h.type==="JSXMemberExpression")return p(h.object)+"."+p(h.property)}e.exports=function(h){return h=h||{},function(l){return u({allowNamespaces:h.allowNamespaces!==!1,allowNamespacedObjects:!!h.allowNamespacedObjects},l)}},Object.defineProperty(e.exports,"tokTypes",{get:function(){return o(void 0).tokTypes},configurable:!0,enumerable:!0});function u(h,l){let g=l.acorn||void 0,C=o(g),A=g.tokTypes,S=C.tokTypes,V=g.tokContexts,P=C.tokContexts.tc_oTag,U=C.tokContexts.tc_cTag,et=C.tokContexts.tc_expr,dt=g.isNewLine,ft=g.isIdentifierStart,ns=g.isIdentifierChar;return class extends l{static get acornJsx(){return C}jsx_readToken(){let c="",y=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let x=this.input.charCodeAt(this.pos);switch(x){case 60:case 123:return this.pos===this.start?x===60&&this.exprAllowed?(++this.pos,this.finishToken(S.jsxTagStart)):this.getTokenFromCode(x):(c+=this.input.slice(y,this.pos),this.finishToken(S.jsxText,c));case 38:c+=this.input.slice(y,this.pos),c+=this.jsx_readEntity(),y=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(x===62?"&gt;":"&rbrace;")+'` or `{"'+this.input[this.pos]+'"}`?');default:dt(x)?(c+=this.input.slice(y,this.pos),c+=this.jsx_readNewLine(!0),y=this.pos):++this.pos}}}jsx_readNewLine(c){let y=this.input.charCodeAt(this.pos),x;return++this.pos,y===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,x=c?`
3
3
  `:`\r
4
4
  `):x=String.fromCharCode(y),this.options.locations&&(++this.curLine,this.lineStart=this.pos),x}jsx_readString(c){let y="",x=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let k=this.input.charCodeAt(this.pos);if(k===c)break;k===38?(y+=this.input.slice(x,this.pos),y+=this.jsx_readEntity(),x=this.pos):dt(k)?(y+=this.input.slice(x,this.pos),y+=this.jsx_readNewLine(!1),x=this.pos):++this.pos}return y+=this.input.slice(x,this.pos++),this.finishToken(A.string,y)}jsx_readEntity(){let c="",y=0,x,k=this.input[this.pos];k!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let Y=++this.pos;for(;this.pos<this.input.length&&y++<10;){if(k=this.input[this.pos++],k===";"){c[0]==="#"?c[1]==="x"?(c=c.substr(2),i.test(c)&&(x=String.fromCharCode(parseInt(c,16)))):(c=c.substr(1),r.test(c)&&(x=String.fromCharCode(parseInt(c,10)))):x=s[c];break}c+=k}return x||(this.pos=Y,"&")}jsx_readWord(){let c,y=this.pos;do c=this.input.charCodeAt(++this.pos);while(ns(c)||c===45);return this.finishToken(S.jsxName,this.input.slice(y,this.pos))}jsx_parseIdentifier(){let c=this.startNode();return this.type===S.jsxName?c.name=this.value:this.type.keyword?c.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(c,"JSXIdentifier")}jsx_parseNamespacedName(){let c=this.start,y=this.startLoc,x=this.jsx_parseIdentifier();if(!h.allowNamespaces||!this.eat(A.colon))return x;var k=this.startNodeAt(c,y);return k.namespace=x,k.name=this.jsx_parseIdentifier(),this.finishNode(k,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===S.jsxTagEnd)return"";let c=this.start,y=this.startLoc,x=this.jsx_parseNamespacedName();for(this.type===A.dot&&x.type==="JSXNamespacedName"&&!h.allowNamespacedObjects&&this.unexpected();this.eat(A.dot);){let k=this.startNodeAt(c,y);k.object=x,k.property=this.jsx_parseIdentifier(),x=this.finishNode(k,"JSXMemberExpression")}return x}jsx_parseAttributeValue(){switch(this.type){case A.braceL:let c=this.jsx_parseExpressionContainer();return c.expression.type==="JSXEmptyExpression"&&this.raise(c.start,"JSX attributes must only be assigned a non-empty expression"),c;case S.jsxTagStart:case A.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let c=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(c,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let c=this.startNode();return this.next(),c.expression=this.type===A.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(A.braceR),this.finishNode(c,"JSXExpressionContainer")}jsx_parseAttribute(){let c=this.startNode();return this.eat(A.braceL)?(this.expect(A.ellipsis),c.argument=this.parseMaybeAssign(),this.expect(A.braceR),this.finishNode(c,"JSXSpreadAttribute")):(c.name=this.jsx_parseNamespacedName(),c.value=this.eat(A.eq)?this.jsx_parseAttributeValue():null,this.finishNode(c,"JSXAttribute"))}jsx_parseOpeningElementAt(c,y){let x=this.startNodeAt(c,y);x.attributes=[];let k=this.jsx_parseElementName();for(k&&(x.name=k);this.type!==A.slash&&this.type!==S.jsxTagEnd;)x.attributes.push(this.jsx_parseAttribute());return x.selfClosing=this.eat(A.slash),this.expect(S.jsxTagEnd),this.finishNode(x,k?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(c,y){let x=this.startNodeAt(c,y),k=this.jsx_parseElementName();return k&&(x.name=k),this.expect(S.jsxTagEnd),this.finishNode(x,k?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(c,y){let x=this.startNodeAt(c,y),k=[],Y=this.jsx_parseOpeningElementAt(c,y),mt=null;if(!Y.selfClosing){t:for(;;)switch(this.type){case S.jsxTagStart:if(c=this.start,y=this.startLoc,this.next(),this.eat(A.slash)){mt=this.jsx_parseClosingElementAt(c,y);break t}k.push(this.jsx_parseElementAt(c,y));break;case S.jsxText:k.push(this.parseExprAtom());break;case A.braceL:k.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}p(mt.name)!==p(Y.name)&&this.raise(mt.start,"Expected corresponding JSX closing tag for <"+p(Y.name)+">")}let wt=Y.name?"Element":"Fragment";return x["opening"+wt]=Y,x["closing"+wt]=mt,x.children=k,this.type===A.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(x,"JSX"+wt)}jsx_parseText(){let c=this.parseLiteral(this.value);return c.type="JSXText",c}jsx_parseElement(){let c=this.start,y=this.startLoc;return this.next(),this.jsx_parseElementAt(c,y)}parseExprAtom(c){return this.type===S.jsxText?this.jsx_parseText():this.type===S.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(c)}readToken(c){let y=this.curContext();if(y===et)return this.jsx_readToken();if(y===P||y===U){if(ft(c))return this.jsx_readWord();if(c==62)return++this.pos,this.finishToken(S.jsxTagEnd);if((c===34||c===39)&&y==P)return this.jsx_readString(c)}return c===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(S.jsxTagStart)):super.readToken(c)}updateContext(c){if(this.type==A.braceL){var y=this.curContext();y==P?this.context.push(V.b_expr):y==et?this.context.push(V.b_tmpl):super.updateContext(c),this.exprAllowed=!0}else if(this.type===A.slash&&c===S.jsxTagStart)this.context.length-=2,this.context.push(U),this.exprAllowed=!1;else return super.updateContext(c)}}}}),fe={};ls(fe,{parsers:()=>hr});var ms=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],me=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],ys="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",ye="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",Dt={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Ft="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",xs={5:Ft,"5module":Ft+" export import",6:Ft+" const class extends export import super"},gs=/^in(stanceof)?$/,As=new RegExp("["+ye+"]"),vs=new RegExp("["+ye+ys+"]");function Lt(t,e){for(var s=65536,i=0;i<e.length;i+=2){if(s+=e[i],s>t)return!1;if(s+=e[i+1],s>=t)return!0}return!1}function G(t,e){return t<65?t===36:t<91?!0:t<97?t===95:t<123?!0:t<=65535?t>=170&&As.test(String.fromCharCode(t)):e===!1?!1:Lt(t,me)}function Q(t,e){return t<48?t===36:t<58?!0:t<65?!1:t<91?!0:t<97?t===95:t<123?!0:t<=65535?t>=170&&vs.test(String.fromCharCode(t)):e===!1?!1:Lt(t,me)||Lt(t,ms)}var E=function(t,e){e===void 0&&(e={}),this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop||null,this.updateContext=null};function L(t,e){return new E(t,{beforeExpr:!0,binop:e})}var R={beforeExpr:!0},B={startsExpr:!0},Jt={};function b(t,e){return e===void 0&&(e={}),e.keyword=t,Jt[t]=new E(t,e)}var a={num:new E("num",B),regexp:new E("regexp",B),string:new E("string",B),name:new E("name",B),privateId:new E("privateId",B),eof:new E("eof"),bracketL:new E("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new E("]"),braceL:new E("{",{beforeExpr:!0,startsExpr:!0}),braceR:new E("}"),parenL:new E("(",{beforeExpr:!0,startsExpr:!0}),parenR:new E(")"),comma:new E(",",R),semi:new E(";",R),colon:new E(":",R),dot:new E("."),question:new E("?",R),questionDot:new E("?."),arrow:new E("=>",R),template:new E("template"),invalidTemplate:new E("invalidTemplate"),ellipsis:new E("...",R),backQuote:new E("`",B),dollarBraceL:new E("${",{beforeExpr:!0,startsExpr:!0}),eq:new E("=",{beforeExpr:!0,isAssign:!0}),assign:new E("_=",{beforeExpr:!0,isAssign:!0}),incDec:new E("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new E("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:L("||",1),logicalAND:L("&&",2),bitwiseOR:L("|",3),bitwiseXOR:L("^",4),bitwiseAND:L("&",5),equality:L("==/!=/===/!==",6),relational:L("</>/<=/>=",7),bitShift:L("<</>>/>>>",8),plusMin:new E("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:L("%",10),star:L("*",10),slash:L("/",10),starstar:new E("**",{beforeExpr:!0}),coalesce:L("??",1),_break:b("break"),_case:b("case",R),_catch:b("catch"),_continue:b("continue"),_debugger:b("debugger"),_default:b("default",R),_do:b("do",{isLoop:!0,beforeExpr:!0}),_else:b("else",R),_finally:b("finally"),_for:b("for",{isLoop:!0}),_function:b("function",B),_if:b("if"),_return:b("return",R),_switch:b("switch"),_throw:b("throw",R),_try:b("try"),_var:b("var"),_const:b("const"),_while:b("while",{isLoop:!0}),_with:b("with"),_new:b("new",{beforeExpr:!0,startsExpr:!0}),_this:b("this",B),_super:b("super",B),_class:b("class",B),_extends:b("extends",R),_export:b("export"),_import:b("import",B),_null:b("null",B),_true:b("true",B),_false:b("false",B),_in:b("in",{beforeExpr:!0,binop:7}),_instanceof:b("instanceof",{beforeExpr:!0,binop:7}),_typeof:b("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:b("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:b("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},N=/\r\n?|\n|\u2028|\u2029/,bs=new RegExp(N.source,"g");function st(t){return t===10||t===13||t===8232||t===8233}function xe(t,e,s){s===void 0&&(s=t.length);for(var i=e;i<s;i++){var r=t.charCodeAt(i);if(st(r))return i<s-1&&r===13&&t.charCodeAt(i+1)===10?i+2:i+1}return-1}var ge=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,w=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Ae=Object.prototype,Cs=Ae.hasOwnProperty,Es=Ae.toString,it=Object.hasOwn||function(t,e){return Cs.call(t,e)},ee=Array.isArray||function(t){return Es.call(t)==="[object Array]"},se=Object.create(null);function z(t){return se[t]||(se[t]=new RegExp("^(?:"+t.replace(/ /g,"|")+")$"))}function X(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}var Ss=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,pt=function(t,e){this.line=t,this.column=e};pt.prototype.offset=function(t){return new pt(this.line,this.column+t)};var Ct=function(t,e,s){this.start=e,this.end=s,t.sourceFile!==null&&(this.source=t.sourceFile)};function ve(t,e){for(var s=1,i=0;;){var r=xe(t,i,e);if(r<0)return new pt(s,e-i);++s,i=r}}var Rt={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},ie=!1;function ks(t){var e={};for(var s in Rt)e[s]=t&&it(t,s)?t[s]:Rt[s];if(e.ecmaVersion==="latest"?e.ecmaVersion=1e8:e.ecmaVersion==null?(!ie&&typeof console=="object"&&console.warn&&(ie=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
5
5
  Defaulting to 2020, but this will stop working in the future.`)),e.ecmaVersion=11):e.ecmaVersion>=2015&&(e.ecmaVersion-=2009),e.allowReserved==null&&(e.allowReserved=e.ecmaVersion<5),(!t||t.allowHashBang==null)&&(e.allowHashBang=e.ecmaVersion>=14),ee(e.onToken)){var i=e.onToken;e.onToken=function(r){return i.push(r)}}return ee(e.onComment)&&(e.onComment=Ts(e,e.onComment)),e}function Ts(t,e){return function(s,i,r,n,o,p){var u={type:s?"Block":"Line",value:i,start:r,end:n};t.locations&&(u.loc=new Ct(this,o,p)),t.ranges&&(u.range=[r,n]),e.push(u)}}var ht=1,rt=2,Kt=4,be=8,Xt=16,Ce=32,Et=64,Ee=128,tt=256,ct=512,St=ht|rt|tt;function Ht(t,e){return rt|(t?Kt:0)|(e?be:0)}var gt=0,Wt=1,W=2,Se=3,ke=4,Te=5,_=function(t,e,s){this.options=t=ks(t),this.sourceFile=t.sourceFile,this.keywords=z(xs[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var i="";t.allowReserved!==!0&&(i=Dt[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(i+=" await")),this.reservedWords=z(i);var r=(i?i+" ":"")+Dt.strict;this.reservedWordsStrict=z(r),this.reservedWordsStrictBind=z(r+" "+Dt.strictBind),this.input=String(e),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf(`
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-e0vrxetq.js";var t="./tree-sitter-3jzf13jk.wasm";export{t as default};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{fg as a,gg as b}from"./chunk-t6zz47zk.js";import"./chunk-vkjqy92f.js";import"./chunk-z0kbyr00.js";import"./chunk-sbjymf20.js";import"./chunk-wb05bp10.js";import"./chunk-wgkcyqn1.js";import"./chunk-59csnjc3.js";import"./chunk-1bxfzd6r.js";import"./chunk-6p6m5956.js";import"./chunk-a48mx917.js";import"./chunk-3va85mbe.js";import"./chunk-w7a33cwa.js";import"./chunk-g7v6sp3c.js";import"./chunk-e0vrxetq.js";export{a as start,b as Heap};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{$d as J,Rd as y,Td as T,Ud as t,Vd as O,Wd as l,Yd as v,Zd as Q,_d as X}from"./chunk-hhk2sp5n.js";import"./chunk-4zhrg3rv.js";import{be as w}from"./chunk-f4mnp6xd.js";import{eg as f}from"./chunk-s06t769q.js";import{Ch as q,Sg as Y,Tg as mt,Ug as pt,Vg as st,Wg as et,Xg as ft,Yg as E,kh as Mt}from"./chunk-w43kmnm9.js";import"./chunk-nrk29616.js";import"./chunk-kre93a89.js";import"./chunk-060wbpz4.js";import"./chunk-zrhw1szj.js";import"./chunk-wd8hbven.js";import"./chunk-drnj1a14.js";import{Ej as L,el as F,xj as nt}from"./chunk-9a6p1gdn.js";import"./chunk-jxkrhrp0.js";import{Ol as $}from"./chunk-6k14c8x1.js";import"./chunk-5r05d901.js";import"./chunk-3rgct4bd.js";import"./chunk-5b3v1x2c.js";import{Lo as P,Mo as h}from"./chunk-gbxf6e5d.js";import"./chunk-msh249db.js";import"./chunk-95am490c.js";import"./chunk-kmzpeq8k.js";import"./chunk-0gsw04hw.js";import"./chunk-hqjc4wgg.js";import"./chunk-makecdh6.js";import"./chunk-dy2k5rdx.js";import"./chunk-n5p7cn4w.js";import"./chunk-cqtkxwd8.js";import"./chunk-mhxyv9c8.js";import"./chunk-0crgymtr.js";import"./chunk-cth373se.js";import"./chunk-xcxqt8ag.js";import"./chunk-va2qfh0x.js";import"./chunk-ae7b11np.js";import"./chunk-eeq0krp7.js";import"./chunk-73xryfgn.js";import"./chunk-yjqww6ag.js";import"./chunk-z6kcnpsj.js";import"./chunk-ts2k13g0.js";import"./chunk-01e3v1xz.js";import"./chunk-dbpkq7ba.js";import"./chunk-z744mz4w.js";import"./chunk-vjn54xj5.js";import"./chunk-0qpqd7nz.js";import"./chunk-gdew7bwm.js";import{Dt as g}from"./chunk-v3nmnm57.js";import"./chunk-hwsqqkrv.js";import"./chunk-mbbxedsq.js";import{Fu as D,Ku as A}from"./chunk-aa2n02qk.js";import"./chunk-k1x8469r.js";import"./chunk-c3szabpf.js";import"./chunk-c8prg3jx.js";import"./chunk-t8sy5sgx.js";import{EI as a}from"./chunk-tezrgfc6.js";import"./chunk-wjz42325.js";import"./chunk-kry4vcrf.js";import{SP as ut}from"./chunk-f2pv705d.js";import W from"path";function G(o){switch(o){case"authenticated":return"\u2713";case"expired":return"\u26A0";case"not_authenticated":return"\u2717"}}function H(o){switch(o){case"authenticated":return"authenticated";case"expired":return"expired";case"not_authenticated":return"not authenticated"}}function N(o){return typeof o==="object"&&o!==null&&"type"in o}function k(o){return N(o)&&o.type==="remote"}function B(o){return Object.entries(o.mcp??{}).filter((e)=>N(e[1]))}function U(o,e){let r=o.mcp_origins?.[e];if(!r)return"qitqode";let i=A.Path.home,m=r.source===i?"~":r.source.startsWith(i+W.sep)?"~"+r.source.slice(i.length):r.source;return`${r.type}:${m}`}function C(o){return B(o).filter((e)=>k(e[1])&&e[1].oauth!==!1)}async function I(){return q.runPromise(a.gen(function*(){let o=yield*F.Service,e=yield*E.Service,r=yield*o.get(),i=yield*e.status(),m=yield*a.all(Object.fromEntries(B(r).map(([p])=>[p,e.hasStoredTokens(p)])),{concurrency:"unbounded"});return{config:r,statuses:i,stored:m}}))}async function S(){return q.runPromise(a.gen(function*(){let o=yield*F.Service,e=yield*E.Service,r=yield*o.get(),i=yield*a.all(Object.fromEntries(C(r).map(([m])=>[m,e.getAuthStatus(m)])),{concurrency:"unbounded"});return{config:r,auth:i}}))}async function V(o,e=!1){let r=[W.join(o,"qitqode.json"),W.join(o,"qitqode.jsonc")];if(!e)r.push(W.join(o,".qitqode","qitqode.json"),W.join(o,".qitqode","qitqode.jsonc"));for(let i of r)if(await D.exists(i))return i;return r[0]}async function R(o,e,r){let i="{}";if(await D.exists(r))i=await D.readText(r);let m=P(i,["mcp",o],e,{formattingOptions:{tabSize:2,insertSpaces:!0}});return await D.write(r,h(i,m)),r}var tt=ut(Mt(),1);function yt(o){let e=tt.parse(o);if(!e.every((r)=>typeof r==="string"))throw Error("Shell operators are not supported; enter only the command and its arguments");if(e.length===0)throw Error("Command is required");return e}var ot=w({command:"add",describe:"add an MCP server",async handler(){await $.provide({directory:process.cwd(),async fn(){f.empty(),O("Add MCP server");let o=$.project,[e,r]=await Promise.all([V($.worktree),V(A.Path.config,!0)]),i=r;if(o.vcs==="git"){let c=await X({message:"Location",options:[{label:"Current project",value:e,hint:e},{label:"Global",value:r,hint:r}]});if(y(c))throw new f.CancelledError;i=c}let m=await J({message:"Enter MCP server name",validate:(c)=>c&&c.length>0?void 0:"Required"});if(y(m))throw new f.CancelledError;let p=await X({message:"Select MCP server type",options:[{label:"Local",value:"local",hint:"Run a local command"},{label:"Remote",value:"remote",hint:"Connect to a remote URL"}]});if(y(p))throw new f.CancelledError;if(p==="local"){let c=await J({message:"Enter command to run",placeholder:"e.g., qitqode x @modelcontextprotocol/server-filesystem",validate:(s)=>s&&s.length>0?void 0:"Required"});if(y(c))throw new f.CancelledError;let u;try{u=yt(c)}catch(s){t.error(s instanceof Error?s.message:"Invalid command"),l("MCP server was not added");return}await R(m,{type:"local",command:u},i),t.success(`MCP server "${m}" added to ${i}`),l("MCP server added successfully");return}if(p==="remote"){let c=await J({message:"Enter MCP server URL",placeholder:"e.g., https://example.com/mcp",validate:(s)=>{if(!s)return"Required";if(s.length===0)return"Required";return URL.canParse(s)?void 0:"Invalid URL"}});if(y(c))throw new f.CancelledError;let u=await T({message:"Does this server require OAuth authentication?",initialValue:!1});if(y(u))throw new f.CancelledError;let n;if(u){let s=await T({message:"Do you have a pre-registered client ID?",initialValue:!1});if(y(s))throw new f.CancelledError;if(s){let d=await J({message:"Enter client ID",validate:(j)=>j&&j.length>0?void 0:"Required"});if(y(d))throw new f.CancelledError;let M=await T({message:"Do you have a client secret?",initialValue:!1});if(y(M))throw new f.CancelledError;let _;if(M){let j=await v({message:"Enter client secret"});if(y(j))throw new f.CancelledError;_=j}n={type:"remote",url:c,oauth:{clientId:d,..._&&{clientSecret:_}}}}else n={type:"remote",url:c,oauth:{}}}else n={type:"remote",url:c,oauth:!1};await R(m,n,i),t.success(`MCP server "${m}" added to ${i}`)}l("MCP server added successfully")}})}});var it=w({command:"list",aliases:["ls"],describe:"list MCP servers and their status",async handler(){await $.provide({directory:process.cwd(),async fn(){f.empty(),O("MCP Servers");let{config:o,statuses:e,stored:r}=await I(),i=B(o);if(i.length===0){t.warn("No MCP servers configured"),l("Add servers with: qitqode mcp add");return}for(let[m,p]of i){let c=e[m],u=k(p)&&p.oauth!==!1,n=r[m],s,d,M="";if(!c)s="\u25CB",d="not initialized";else if(c.status==="connected"){if(s="\u2713",d="connected",u&&n)M=" (OAuth)"}else if(c.status==="disabled")s="\u25CB",d="disabled";else if(c.status==="pending")s="\u25CB",d="pending approval";else if(c.status==="needs_auth")s="\u26A0",d="needs authentication";else if(c.status==="needs_client_registration")s="\u2717",d="needs client registration",M=`
2
+ import{$d as J,Rd as y,Td as T,Ud as t,Vd as O,Wd as l,Yd as v,Zd as Q,_d as X}from"./chunk-2kh0tg92.js";import"./chunk-52xvhxek.js";import{be as w}from"./chunk-f4mnp6xd.js";import{eg as f}from"./chunk-bwadggys.js";import{Ch as q,Sg as Y,Tg as mt,Ug as pt,Vg as st,Wg as et,Xg as ft,Yg as E,kh as Mt}from"./chunk-he9kpk9r.js";import"./chunk-vs3s49jw.js";import"./chunk-kre93a89.js";import"./chunk-060wbpz4.js";import"./chunk-zrhw1szj.js";import"./chunk-t8fjgkp8.js";import"./chunk-0egrckx0.js";import{Ej as L,el as F,xj as nt}from"./chunk-qq9m8fxv.js";import"./chunk-2qm46qvn.js";import{Ol as $}from"./chunk-tsmj98yf.js";import"./chunk-58f4y4b7.js";import"./chunk-rmsqb6r4.js";import"./chunk-qxdpgdfk.js";import{mn as P,nn as h}from"./chunk-6qwk6z87.js";import"./chunk-sa0rrreh.js";import"./chunk-ydgst3h8.js";import"./chunk-6tqbnxar.js";import"./chunk-0w19vmd7.js";import"./chunk-eewe7tx1.js";import"./chunk-37cbrnke.js";import"./chunk-wm9nh9nb.js";import"./chunk-scnbt714.js";import"./chunk-cqtkxwd8.js";import"./chunk-y3gy62q5.js";import"./chunk-az3nss5m.js";import"./chunk-p2fte9vz.js";import"./chunk-ggncq8w8.js";import"./chunk-t3w43rft.js";import"./chunk-eacpc64g.js";import"./chunk-27saej0r.js";import"./chunk-9009v4d0.js";import"./chunk-82xrfk5x.js";import"./chunk-wqk1v8t0.js";import"./chunk-vkjqy92f.js";import"./chunk-z0kbyr00.js";import"./chunk-sbjymf20.js";import"./chunk-dt3bsmfe.js";import"./chunk-vbfej8ds.js";import"./chunk-0tm6589k.js";import"./chunk-6yhn9syz.js";import{es as g}from"./chunk-wb05bp10.js";import"./chunk-wgkcyqn1.js";import"./chunk-59csnjc3.js";import{gt as D,lt as A}from"./chunk-1bxfzd6r.js";import"./chunk-6p6m5956.js";import"./chunk-a48mx917.js";import"./chunk-3va85mbe.js";import"./chunk-w7a33cwa.js";import{fH as a}from"./chunk-g7v6sp3c.js";import"./chunk-s2tc3qs0.js";import"./chunk-n6tqtk6h.js";import{tO as ut}from"./chunk-e0vrxetq.js";import W from"path";function G(o){switch(o){case"authenticated":return"\u2713";case"expired":return"\u26A0";case"not_authenticated":return"\u2717"}}function H(o){switch(o){case"authenticated":return"authenticated";case"expired":return"expired";case"not_authenticated":return"not authenticated"}}function N(o){return typeof o==="object"&&o!==null&&"type"in o}function k(o){return N(o)&&o.type==="remote"}function B(o){return Object.entries(o.mcp??{}).filter((e)=>N(e[1]))}function U(o,e){let r=o.mcp_origins?.[e];if(!r)return"qitqode";let i=A.Path.home,m=r.source===i?"~":r.source.startsWith(i+W.sep)?"~"+r.source.slice(i.length):r.source;return`${r.type}:${m}`}function C(o){return B(o).filter((e)=>k(e[1])&&e[1].oauth!==!1)}async function I(){return q.runPromise(a.gen(function*(){let o=yield*F.Service,e=yield*E.Service,r=yield*o.get(),i=yield*e.status(),m=yield*a.all(Object.fromEntries(B(r).map(([p])=>[p,e.hasStoredTokens(p)])),{concurrency:"unbounded"});return{config:r,statuses:i,stored:m}}))}async function S(){return q.runPromise(a.gen(function*(){let o=yield*F.Service,e=yield*E.Service,r=yield*o.get(),i=yield*a.all(Object.fromEntries(C(r).map(([m])=>[m,e.getAuthStatus(m)])),{concurrency:"unbounded"});return{config:r,auth:i}}))}async function V(o,e=!1){let r=[W.join(o,"qitqode.json"),W.join(o,"qitqode.jsonc")];if(!e)r.push(W.join(o,".qitqode","qitqode.json"),W.join(o,".qitqode","qitqode.jsonc"));for(let i of r)if(await D.exists(i))return i;return r[0]}async function R(o,e,r){let i="{}";if(await D.exists(r))i=await D.readText(r);let m=P(i,["mcp",o],e,{formattingOptions:{tabSize:2,insertSpaces:!0}});return await D.write(r,h(i,m)),r}var tt=ut(Mt(),1);function yt(o){let e=tt.parse(o);if(!e.every((r)=>typeof r==="string"))throw Error("Shell operators are not supported; enter only the command and its arguments");if(e.length===0)throw Error("Command is required");return e}var ot=w({command:"add",describe:"add an MCP server",async handler(){await $.provide({directory:process.cwd(),async fn(){f.empty(),O("Add MCP server");let o=$.project,[e,r]=await Promise.all([V($.worktree),V(A.Path.config,!0)]),i=r;if(o.vcs==="git"){let c=await X({message:"Location",options:[{label:"Current project",value:e,hint:e},{label:"Global",value:r,hint:r}]});if(y(c))throw new f.CancelledError;i=c}let m=await J({message:"Enter MCP server name",validate:(c)=>c&&c.length>0?void 0:"Required"});if(y(m))throw new f.CancelledError;let p=await X({message:"Select MCP server type",options:[{label:"Local",value:"local",hint:"Run a local command"},{label:"Remote",value:"remote",hint:"Connect to a remote URL"}]});if(y(p))throw new f.CancelledError;if(p==="local"){let c=await J({message:"Enter command to run",placeholder:"e.g., qitqode x @modelcontextprotocol/server-filesystem",validate:(s)=>s&&s.length>0?void 0:"Required"});if(y(c))throw new f.CancelledError;let u;try{u=yt(c)}catch(s){t.error(s instanceof Error?s.message:"Invalid command"),l("MCP server was not added");return}await R(m,{type:"local",command:u},i),t.success(`MCP server "${m}" added to ${i}`),l("MCP server added successfully");return}if(p==="remote"){let c=await J({message:"Enter MCP server URL",placeholder:"e.g., https://example.com/mcp",validate:(s)=>{if(!s)return"Required";if(s.length===0)return"Required";return URL.canParse(s)?void 0:"Invalid URL"}});if(y(c))throw new f.CancelledError;let u=await T({message:"Does this server require OAuth authentication?",initialValue:!1});if(y(u))throw new f.CancelledError;let n;if(u){let s=await T({message:"Do you have a pre-registered client ID?",initialValue:!1});if(y(s))throw new f.CancelledError;if(s){let d=await J({message:"Enter client ID",validate:(j)=>j&&j.length>0?void 0:"Required"});if(y(d))throw new f.CancelledError;let M=await T({message:"Do you have a client secret?",initialValue:!1});if(y(M))throw new f.CancelledError;let _;if(M){let j=await v({message:"Enter client secret"});if(y(j))throw new f.CancelledError;_=j}n={type:"remote",url:c,oauth:{clientId:d,..._&&{clientSecret:_}}}}else n={type:"remote",url:c,oauth:{}}}else n={type:"remote",url:c,oauth:!1};await R(m,n,i),t.success(`MCP server "${m}" added to ${i}`)}l("MCP server added successfully")}})}});var it=w({command:"list",aliases:["ls"],describe:"list MCP servers and their status",async handler(){await $.provide({directory:process.cwd(),async fn(){f.empty(),O("MCP Servers");let{config:o,statuses:e,stored:r}=await I(),i=B(o);if(i.length===0){t.warn("No MCP servers configured"),l("Add servers with: qitqode mcp add");return}for(let[m,p]of i){let c=e[m],u=k(p)&&p.oauth!==!1,n=r[m],s,d,M="";if(!c)s="\u25CB",d="not initialized";else if(c.status==="connected"){if(s="\u2713",d="connected",u&&n)M=" (OAuth)"}else if(c.status==="disabled")s="\u25CB",d="disabled";else if(c.status==="pending")s="\u25CB",d="pending approval";else if(c.status==="needs_auth")s="\u26A0",d="needs authentication";else if(c.status==="needs_client_registration")s="\u2717",d="needs client registration",M=`
3
3
  `+c.error;else s="\u2717",d="failed",M=`
4
4
  `+c.error;let _=p.type==="remote"?L.redactString(p.url):L.redactCommand(p.command).join(" ");t.info(`${s} ${m} ${f.Style.TEXT_DIM}${d} ${U(o,m)}${M}
5
5
  ${f.Style.TEXT_DIM}${_}`)}l(`${i.length} server(s)`)}})}});var dt=w({command:"auth [name]",describe:"authenticate with an OAuth-enabled MCP server",builder:(o)=>o.positional("name",{describe:"name of the MCP server",type:"string"}).command(ct),async handler(o){await $.provide({directory:process.cwd(),async fn(){f.empty(),O("MCP OAuth Authentication");let{config:e,auth:r}=await S(),i=e.mcp??{},m=C(e);if(m.length===0){t.warn("No OAuth-capable MCP servers configured"),t.info("Remote MCP servers support OAuth by default. Add a remote server in qitqode.json:"),t.info(`
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{p as y,q as T,r as M,s as D,t as U}from"./chunk-npzx3yd5.js";import{Ud as X,Vd as _,Wd as $,Zd as v}from"./chunk-hhk2sp5n.js";import"./chunk-4zhrg3rv.js";import{be as j}from"./chunk-f4mnp6xd.js";import{eg as V}from"./chunk-s06t769q.js";import{Ol as J}from"./chunk-6k14c8x1.js";import"./chunk-5r05d901.js";import"./chunk-3rgct4bd.js";import{Jo as F,Xo as G}from"./chunk-gbxf6e5d.js";import"./chunk-msh249db.js";import"./chunk-95am490c.js";import"./chunk-kmzpeq8k.js";import"./chunk-0gsw04hw.js";import"./chunk-73xryfgn.js";import"./chunk-yjqww6ag.js";import"./chunk-z6kcnpsj.js";import"./chunk-ts2k13g0.js";import"./chunk-01e3v1xz.js";import"./chunk-dbpkq7ba.js";import"./chunk-z744mz4w.js";import"./chunk-vjn54xj5.js";import"./chunk-0qpqd7nz.js";import"./chunk-v3nmnm57.js";import{fu as Z}from"./chunk-hwsqqkrv.js";import"./chunk-mbbxedsq.js";import{Ku as E}from"./chunk-aa2n02qk.js";import"./chunk-k1x8469r.js";import"./chunk-c3szabpf.js";import"./chunk-c8prg3jx.js";import"./chunk-t8sy5sgx.js";import"./chunk-tezrgfc6.js";import"./chunk-f2pv705d.js";import h from"path";var b={spinner:()=>v(),log:{error:(w)=>X.error(w),info:(w)=>X.info(w),success:(w)=>X.success(w)},resolve:(w)=>G(w),...T,global:E.Path.config};function P(w){if(!w||typeof w!=="object")return;if(!("cause"in w))return;return w.cause}function I(w,q=b){let H=w.mod,K=Boolean(w.force),W=Boolean(w.global);return async(O)=>{let R=q.spinner();R.start("Installing plugin package...");let S=await M(H,q);if(!S.ok){R.stop("Install failed",1),q.log.error(`Could not install "${H}"`);let B=y(S.error);if(B.detail)q.log.error(B.detail);if(B.missing)q.log.info("This package depends on a version that is not available in your npm registry."),q.log.info("Check npm registry/auth settings and try again.");return!1}R.stop("Plugin package ready");let L=q.spinner();L.start("Reading plugin manifest...");let z=await D(S.target);if(!z.ok){if(z.code==="manifest_read_failed")return L.stop("Manifest read failed",1),q.log.error(`Installed "${H}" but failed to read ${z.file}`),q.log.error(Z(P(z.error)??z.error)),!1;if(z.code==="manifest_no_targets")return L.stop("No plugin targets found",1),q.log.error(`"${H}" does not expose plugin entrypoints in package.json`),q.log.info('Expected one of: exports["./tui"], exports["./server"], package.json main for server, or package.json["oc-themes"] for tui themes.'),!1;return L.stop("Manifest read failed",1),!1}L.stop(`Detected ${z.targets.map((B)=>B.kind).join(" + ")} target${z.targets.length===1?"":"s"}`);let N=q.spinner();N.start("Updating plugin config...");let A=await U({spec:H,targets:z.targets,force:K,global:W,vcs:O.vcs,worktree:O.worktree,directory:O.directory,config:q.global},q);if(!A.ok){if(A.code==="invalid_json")return N.stop(`Failed updating ${A.kind} config`,1),q.log.error(`Invalid JSON in ${A.file} (${A.parse} at line ${A.line}, column ${A.col})`),q.log.info("Fix the config file and run the command again."),!1;return N.stop("Failed updating plugin config",1),q.log.error(Z(A.error)),!1}N.stop("Plugin config updated");for(let B of A.items){if(B.mode==="noop"){q.log.info(`Already configured in ${B.file}`);continue}if(B.mode==="replace"){q.log.info(`Replaced in ${B.file}`);continue}q.log.info(`Added to ${B.file}`)}return q.log.success(`Installed ${H}`),q.log.info(W?`Scope: global (${A.dir})`:`Scope: local (${A.dir})`),!0}}async function x(w,q=b,H=(K)=>V.println(K)){let K=w.vcs==="git"&&w.worktree!=="/",W=[{scope:"local",dir:h.join(K?w.worktree:w.directory,".qitqode")},{scope:"global",dir:q.global}],O=0;for(let{scope:R,dir:S}of W)for(let L of["qitqode","tui"])for(let z of q.files(S,L)){if(!await q.exists(z))continue;let N=await q.readText(z).catch(()=>{return});if(N===void 0)continue;let A=[],B=F(N,A,{allowTrailingComma:!0});if(A.length){q.log.error(`Invalid JSON in ${z} \u2014 skipped`);continue}let Y=B?.plugin;if(!Array.isArray(Y)||Y.length===0)continue;q.log.info(`${R} \xB7 ${z}`);for(let Q of Y){let C=typeof Q==="string"?Q:Array.isArray(Q)?String(Q[0]):void 0;if(!C)continue;let k=Array.isArray(Q)&&Q[1]?" (with options)":"";H(" "+C+k),O++}}if(O===0)q.log.info("No plugins configured.")}var i=j({command:"plugin <module>",aliases:["plug"],describe:"install plugin and update config",builder:(w)=>{return w.positional("module",{type:"string",describe:"npm module name"}).option("global",{alias:["g"],type:"boolean",default:!1,describe:"install in global config"}).option("force",{alias:["f"],type:"boolean",default:!1,describe:"replace existing plugin version"})},handler:async(w)=>{let q=String(w.module??"").trim();if(!q){V.error("module is required"),process.exitCode=1;return}if(q==="list"){V.empty(),_("Configured plugins"),await J.provide({directory:process.cwd(),fn:async()=>{await x({vcs:J.project.vcs,worktree:J.worktree,directory:J.directory})}}),$("Done");return}V.empty(),_(`Install plugin ${q}`);let H=I({mod:q,global:Boolean(w.global),force:Boolean(w.force)}),K=!0;if(await J.provide({directory:process.cwd(),fn:async()=>{K=await H({vcs:J.project.vcs,worktree:J.worktree,directory:J.directory})}}),$("Done"),!K)process.exitCode=1}});export{x as listPlugins,I as createPlugTask,i as PluginCommand};
2
+ import{p as y,q as T,r as M,s as D,t as U}from"./chunk-qgfbsmsx.js";import{Ud as X,Vd as _,Wd as $,Zd as v}from"./chunk-2kh0tg92.js";import"./chunk-52xvhxek.js";import{be as j}from"./chunk-f4mnp6xd.js";import{eg as V}from"./chunk-bwadggys.js";import{Ol as J}from"./chunk-tsmj98yf.js";import"./chunk-58f4y4b7.js";import"./chunk-rmsqb6r4.js";import{kn as F,yn as G}from"./chunk-6qwk6z87.js";import"./chunk-sa0rrreh.js";import"./chunk-ydgst3h8.js";import"./chunk-6tqbnxar.js";import"./chunk-0w19vmd7.js";import"./chunk-9009v4d0.js";import"./chunk-82xrfk5x.js";import"./chunk-wqk1v8t0.js";import"./chunk-vkjqy92f.js";import"./chunk-z0kbyr00.js";import"./chunk-sbjymf20.js";import"./chunk-dt3bsmfe.js";import"./chunk-vbfej8ds.js";import"./chunk-0tm6589k.js";import"./chunk-wb05bp10.js";import{Is as Z}from"./chunk-wgkcyqn1.js";import"./chunk-59csnjc3.js";import{lt as E}from"./chunk-1bxfzd6r.js";import"./chunk-6p6m5956.js";import"./chunk-a48mx917.js";import"./chunk-3va85mbe.js";import"./chunk-w7a33cwa.js";import"./chunk-g7v6sp3c.js";import"./chunk-e0vrxetq.js";import h from"path";var b={spinner:()=>v(),log:{error:(w)=>X.error(w),info:(w)=>X.info(w),success:(w)=>X.success(w)},resolve:(w)=>G(w),...T,global:E.Path.config};function P(w){if(!w||typeof w!=="object")return;if(!("cause"in w))return;return w.cause}function I(w,q=b){let H=w.mod,K=Boolean(w.force),W=Boolean(w.global);return async(O)=>{let R=q.spinner();R.start("Installing plugin package...");let S=await M(H,q);if(!S.ok){R.stop("Install failed",1),q.log.error(`Could not install "${H}"`);let B=y(S.error);if(B.detail)q.log.error(B.detail);if(B.missing)q.log.info("This package depends on a version that is not available in your npm registry."),q.log.info("Check npm registry/auth settings and try again.");return!1}R.stop("Plugin package ready");let L=q.spinner();L.start("Reading plugin manifest...");let z=await D(S.target);if(!z.ok){if(z.code==="manifest_read_failed")return L.stop("Manifest read failed",1),q.log.error(`Installed "${H}" but failed to read ${z.file}`),q.log.error(Z(P(z.error)??z.error)),!1;if(z.code==="manifest_no_targets")return L.stop("No plugin targets found",1),q.log.error(`"${H}" does not expose plugin entrypoints in package.json`),q.log.info('Expected one of: exports["./tui"], exports["./server"], package.json main for server, or package.json["oc-themes"] for tui themes.'),!1;return L.stop("Manifest read failed",1),!1}L.stop(`Detected ${z.targets.map((B)=>B.kind).join(" + ")} target${z.targets.length===1?"":"s"}`);let N=q.spinner();N.start("Updating plugin config...");let A=await U({spec:H,targets:z.targets,force:K,global:W,vcs:O.vcs,worktree:O.worktree,directory:O.directory,config:q.global},q);if(!A.ok){if(A.code==="invalid_json")return N.stop(`Failed updating ${A.kind} config`,1),q.log.error(`Invalid JSON in ${A.file} (${A.parse} at line ${A.line}, column ${A.col})`),q.log.info("Fix the config file and run the command again."),!1;return N.stop("Failed updating plugin config",1),q.log.error(Z(A.error)),!1}N.stop("Plugin config updated");for(let B of A.items){if(B.mode==="noop"){q.log.info(`Already configured in ${B.file}`);continue}if(B.mode==="replace"){q.log.info(`Replaced in ${B.file}`);continue}q.log.info(`Added to ${B.file}`)}return q.log.success(`Installed ${H}`),q.log.info(W?`Scope: global (${A.dir})`:`Scope: local (${A.dir})`),!0}}async function x(w,q=b,H=(K)=>V.println(K)){let K=w.vcs==="git"&&w.worktree!=="/",W=[{scope:"local",dir:h.join(K?w.worktree:w.directory,".qitqode")},{scope:"global",dir:q.global}],O=0;for(let{scope:R,dir:S}of W)for(let L of["qitqode","tui"])for(let z of q.files(S,L)){if(!await q.exists(z))continue;let N=await q.readText(z).catch(()=>{return});if(N===void 0)continue;let A=[],B=F(N,A,{allowTrailingComma:!0});if(A.length){q.log.error(`Invalid JSON in ${z} \u2014 skipped`);continue}let Y=B?.plugin;if(!Array.isArray(Y)||Y.length===0)continue;q.log.info(`${R} \xB7 ${z}`);for(let Q of Y){let C=typeof Q==="string"?Q:Array.isArray(Q)?String(Q[0]):void 0;if(!C)continue;let k=Array.isArray(Q)&&Q[1]?" (with options)":"";H(" "+C+k),O++}}if(O===0)q.log.info("No plugins configured.")}var i=j({command:"plugin <module>",aliases:["plug"],describe:"install plugin and update config",builder:(w)=>{return w.positional("module",{type:"string",describe:"npm module name"}).option("global",{alias:["g"],type:"boolean",default:!1,describe:"install in global config"}).option("force",{alias:["f"],type:"boolean",default:!1,describe:"replace existing plugin version"})},handler:async(w)=>{let q=String(w.module??"").trim();if(!q){V.error("module is required"),process.exitCode=1;return}if(q==="list"){V.empty(),_("Configured plugins"),await J.provide({directory:process.cwd(),fn:async()=>{await x({vcs:J.project.vcs,worktree:J.worktree,directory:J.directory})}}),$("Done");return}V.empty(),_(`Install plugin ${q}`);let H=I({mod:q,global:Boolean(w.global),force:Boolean(w.force)}),K=!0;if(await J.provide({directory:process.cwd(),fn:async()=>{K=await H({vcs:J.project.vcs,worktree:J.worktree,directory:J.directory})}}),$("Done"),!K)process.exitCode=1}});export{x as listPlugins,I as createPlugTask,i as PluginCommand};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-f2pv705d.js";var i={"ui.sessionReview.title":"Zmiany w sesji","ui.sessionReview.title.lastTurn":"Zmiany z ostatniej tury","ui.sessionReview.diffStyle.unified":"Ujednolicony","ui.sessionReview.diffStyle.split":"Podzielony","ui.sessionReview.openFile":"Otw\xF3rz plik","ui.sessionReview.selection.line":"linia {{line}}","ui.sessionReview.selection.lines":"linie {{start}}-{{end}}","ui.sessionReview.expandAll":"Rozwi\u0144 wszystko","ui.sessionReview.collapseAll":"Zwi\u0144 wszystko","ui.sessionReview.change.added":"Dodano","ui.sessionReview.change.removed":"Usuni\u0119to","ui.sessionReview.change.modified":"Zmodyfikowano","ui.sessionReview.image.loading":"\u0141adowanie...","ui.sessionReview.image.placeholder":"Obraz","ui.sessionReview.largeDiff.title":"Diff jest zbyt du\u017Cy, aby go wyrenderowa\u0107","ui.sessionReview.largeDiff.meta":"Limit: {{limit}} zmienionych linii. Obecnie: {{current}} zmienionych linii.","ui.sessionReview.largeDiff.renderAnyway":"Renderuj mimo to","ui.fileMedia.kind.image":"obraz","ui.fileMedia.kind.audio":"d\u017Awi\u0119k","ui.fileMedia.state.removed":"{{kind}} usuni\u0119ty","ui.fileMedia.state.loading":"Wczytywanie: {{kind}}...","ui.fileMedia.state.error":"B\u0142\u0105d wczytywania: {{kind}}","ui.fileMedia.state.unavailable":"{{kind}} niedost\u0119pny","ui.fileMedia.binary.title":"Plik binarny","ui.fileMedia.binary.description.path":"Nie mo\u017Cna wy\u015Bwietli\u0107 pliku {{path}}, poniewa\u017C jest to plik binarny.","ui.fileMedia.binary.description.default":"Nie mo\u017Cna wy\u015Bwietli\u0107 tego pliku, poniewa\u017C jest to plik binarny.","ui.lineComment.label.prefix":"Komentarz do ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Komentowanie: ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Dodaj komentarz","ui.lineComment.submit":"Skomentuj","ui.sessionTurn.steps.show":"Poka\u017C kroki","ui.sessionTurn.steps.hide":"Ukryj kroki","ui.sessionTurn.summary.response":"Odpowied\u017A","ui.sessionTurn.diff.showMore":"Poka\u017C wi\u0119cej zmian ({{count}})","ui.sessionTurn.retry.retrying":"ponawianie","ui.sessionTurn.retry.inSeconds":"za {{seconds}}s","ui.sessionTurn.retry.attempt":"pr\xF3ba #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - pr\xF3ba #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini jest teraz mocno przeci\u0105\u017Cony","ui.sessionTurn.error.freeUsageExceeded":"Przekroczono limit darmowego u\u017Cytkowania","ui.sessionTurn.error.addQredits":"Dodaj kredyty","ui.sessionTurn.status.delegating":"Delegowanie pracy","ui.sessionTurn.status.planning":"Planowanie kolejnych krok\xF3w","ui.sessionTurn.status.gatheringContext":"Eksplorowanie","ui.sessionTurn.status.gatheredContext":"Wyeksplorowano","ui.sessionTurn.status.searchingCodebase":"Przeszukiwanie bazy kodu","ui.sessionTurn.status.searchingWeb":"Przeszukiwanie sieci","ui.sessionTurn.status.makingEdits":"Wprowadzanie zmian","ui.sessionTurn.status.runningCommands":"Uruchamianie polece\u0144","ui.sessionTurn.status.thinking":"My\u015Blenie","ui.sessionTurn.status.thinkingWithTopic":"My\u015Blenie - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Zbieranie my\u015Bli","ui.sessionTurn.status.consideringNextSteps":"Rozwa\u017Canie kolejnych krok\xF3w","ui.messagePart.questions.dismissed":"Pytania odrzucone","ui.messagePart.compaction":"Sesja skompaktowana","ui.messagePart.context.read.one":"{{count}} odczyt","ui.messagePart.context.read.other":"{{count}} odczyty","ui.messagePart.context.search.one":"{{count}} wyszukiwanie","ui.messagePart.context.search.other":"{{count}} wyszukiwania","ui.messagePart.context.list.one":"{{count}} lista","ui.messagePart.context.list.other":"{{count}} listy","ui.messagePart.diagnostic.error":"B\u0142\u0105d","ui.messagePart.title.edit":"Edycja","ui.messagePart.title.write":"Pisanie","ui.messagePart.option.typeOwnAnswer":"Wpisz w\u0142asn\u0105 odpowied\u017A","ui.messagePart.review.title":"Przejrzyj swoje odpowiedzi","ui.list.loading":"\u0141adowanie","ui.list.empty":"Brak wynik\xF3w","ui.list.clearFilter":"Wyczy\u015B\u0107 filtr","ui.list.emptyWithFilter.prefix":"Brak wynik\xF3w dla","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Nowa wiadomo\u015B\u0107","ui.textField.copyToClipboard":"Skopiuj do schowka","ui.textField.copyLink":"Skopiuj link","ui.textField.copied":"Skopiowano","ui.imagePreview.alt":"Podgl\u0105d obrazu","ui.scrollView.ariaLabel":"tre\u015B\u0107 przewijana","ui.tool.read":"Odczyt","ui.tool.loaded":"Za\u0142adowano","ui.tool.list":"Lista","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Pobieranie sieciowe","ui.tool.websearch":"Wyszukiwanie w sieci","ui.tool.codesearch":"Wyszukiwanie kodu","ui.tool.shell":"Terminal","ui.tool.patch":"Patch","ui.tool.todos":"Zadania","ui.tool.todos.read":"Czytaj zadania","ui.tool.questions":"Pytania","ui.tool.agent":"Agent {{type}}","ui.tool.agent.default":"Agent","ui.common.file.one":"plik","ui.common.file.other":"pliki","ui.common.question.one":"pytanie","ui.common.question.other":"pytania","ui.common.add":"Dodaj","ui.common.back":"Wstecz","ui.common.cancel":"Anuluj","ui.common.confirm":"Potwierd\u017A","ui.common.dismiss":"Odrzu\u0107","ui.common.close":"Zamknij","ui.common.next":"Dalej","ui.common.submit":"Prze\u015Blij","ui.permission.deny":"Odm\xF3w","ui.permission.allowAlways":"Zezwalaj zawsze","ui.permission.allowOnce":"Zezw\xF3l raz","ui.message.expand":"Rozwi\u0144 wiadomo\u015B\u0107","ui.message.collapse":"Zwi\u0144 wiadomo\u015B\u0107","ui.message.copy":"Kopiuj","ui.message.copyMessage":"Kopiuj wiadomo\u015B\u0107","ui.message.forkMessage":"Rozwidlij do nowej sesji","ui.message.revertMessage":"Zresetuj do tego punktu","ui.message.copyResponse":"Kopiuj odpowied\u017A","ui.message.copied":"Skopiowano!","ui.message.interrupted":"Przerwano","ui.message.queued":"W kolejce","ui.message.attachment.alt":"za\u0142\u0105cznik","ui.patch.action.deleted":"Usuni\u0119to","ui.patch.action.created":"Utworzono","ui.patch.action.moved":"Przeniesiono","ui.patch.action.patched":"Za\u0142atano","ui.question.subtitle.answered":"{{count}} odpowiedzi","ui.question.answer.none":"(brak odpowiedzi)","ui.question.review.notAnswered":"(bez odpowiedzi)","ui.question.multiHint":"Zaznacz wszystkie pasuj\u0105ce","ui.question.singleHint":"Wybierz jedn\u0105 odpowied\u017A","ui.question.custom.placeholder":"Wpisz swoj\u0105 odpowied\u017A...","ui.fileSearch.placeholder":"Szukaj","ui.fileSearch.previousMatch":"Poprzednie","ui.fileSearch.nextMatch":"Nast\u0119pne","ui.fileSearch.close":"Zamknij wyszukiwanie","ui.tool.task":"Zadanie","ui.tool.skill":"Umiej\u0119tno\u015B\u0107","ui.basicTool.called":"Wywo\u0142ano `{{tool}}`","ui.toolErrorCard.failed":"B\u0142\u0105d","ui.toolErrorCard.copyError":"Kopiuj b\u0142\u0105d","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s"};export{i as dict};
2
+ import"./chunk-e0vrxetq.js";var i={"ui.sessionReview.title":"Zmiany w sesji","ui.sessionReview.title.lastTurn":"Zmiany z ostatniej tury","ui.sessionReview.diffStyle.unified":"Ujednolicony","ui.sessionReview.diffStyle.split":"Podzielony","ui.sessionReview.openFile":"Otw\xF3rz plik","ui.sessionReview.selection.line":"linia {{line}}","ui.sessionReview.selection.lines":"linie {{start}}-{{end}}","ui.sessionReview.expandAll":"Rozwi\u0144 wszystko","ui.sessionReview.collapseAll":"Zwi\u0144 wszystko","ui.sessionReview.change.added":"Dodano","ui.sessionReview.change.removed":"Usuni\u0119to","ui.sessionReview.change.modified":"Zmodyfikowano","ui.sessionReview.image.loading":"\u0141adowanie...","ui.sessionReview.image.placeholder":"Obraz","ui.sessionReview.largeDiff.title":"Diff jest zbyt du\u017Cy, aby go wyrenderowa\u0107","ui.sessionReview.largeDiff.meta":"Limit: {{limit}} zmienionych linii. Obecnie: {{current}} zmienionych linii.","ui.sessionReview.largeDiff.renderAnyway":"Renderuj mimo to","ui.fileMedia.kind.image":"obraz","ui.fileMedia.kind.audio":"d\u017Awi\u0119k","ui.fileMedia.state.removed":"{{kind}} usuni\u0119ty","ui.fileMedia.state.loading":"Wczytywanie: {{kind}}...","ui.fileMedia.state.error":"B\u0142\u0105d wczytywania: {{kind}}","ui.fileMedia.state.unavailable":"{{kind}} niedost\u0119pny","ui.fileMedia.binary.title":"Plik binarny","ui.fileMedia.binary.description.path":"Nie mo\u017Cna wy\u015Bwietli\u0107 pliku {{path}}, poniewa\u017C jest to plik binarny.","ui.fileMedia.binary.description.default":"Nie mo\u017Cna wy\u015Bwietli\u0107 tego pliku, poniewa\u017C jest to plik binarny.","ui.lineComment.label.prefix":"Komentarz do ","ui.lineComment.label.suffix":"","ui.lineComment.editorLabel.prefix":"Komentowanie: ","ui.lineComment.editorLabel.suffix":"","ui.lineComment.placeholder":"Dodaj komentarz","ui.lineComment.submit":"Skomentuj","ui.sessionTurn.steps.show":"Poka\u017C kroki","ui.sessionTurn.steps.hide":"Ukryj kroki","ui.sessionTurn.summary.response":"Odpowied\u017A","ui.sessionTurn.diff.showMore":"Poka\u017C wi\u0119cej zmian ({{count}})","ui.sessionTurn.retry.retrying":"ponawianie","ui.sessionTurn.retry.inSeconds":"za {{seconds}}s","ui.sessionTurn.retry.attempt":"pr\xF3ba #{{attempt}}","ui.sessionTurn.retry.attemptLine":"{{line}} - pr\xF3ba #{{attempt}}","ui.sessionTurn.retry.geminiHot":"gemini jest teraz mocno przeci\u0105\u017Cony","ui.sessionTurn.error.freeUsageExceeded":"Przekroczono limit darmowego u\u017Cytkowania","ui.sessionTurn.error.addQredits":"Dodaj kredyty","ui.sessionTurn.status.delegating":"Delegowanie pracy","ui.sessionTurn.status.planning":"Planowanie kolejnych krok\xF3w","ui.sessionTurn.status.gatheringContext":"Eksplorowanie","ui.sessionTurn.status.gatheredContext":"Wyeksplorowano","ui.sessionTurn.status.searchingCodebase":"Przeszukiwanie bazy kodu","ui.sessionTurn.status.searchingWeb":"Przeszukiwanie sieci","ui.sessionTurn.status.makingEdits":"Wprowadzanie zmian","ui.sessionTurn.status.runningCommands":"Uruchamianie polece\u0144","ui.sessionTurn.status.thinking":"My\u015Blenie","ui.sessionTurn.status.thinkingWithTopic":"My\u015Blenie - {{topic}}","ui.sessionTurn.status.gatheringThoughts":"Zbieranie my\u015Bli","ui.sessionTurn.status.consideringNextSteps":"Rozwa\u017Canie kolejnych krok\xF3w","ui.messagePart.questions.dismissed":"Pytania odrzucone","ui.messagePart.compaction":"Sesja skompaktowana","ui.messagePart.context.read.one":"{{count}} odczyt","ui.messagePart.context.read.other":"{{count}} odczyty","ui.messagePart.context.search.one":"{{count}} wyszukiwanie","ui.messagePart.context.search.other":"{{count}} wyszukiwania","ui.messagePart.context.list.one":"{{count}} lista","ui.messagePart.context.list.other":"{{count}} listy","ui.messagePart.diagnostic.error":"B\u0142\u0105d","ui.messagePart.title.edit":"Edycja","ui.messagePart.title.write":"Pisanie","ui.messagePart.option.typeOwnAnswer":"Wpisz w\u0142asn\u0105 odpowied\u017A","ui.messagePart.review.title":"Przejrzyj swoje odpowiedzi","ui.list.loading":"\u0141adowanie","ui.list.empty":"Brak wynik\xF3w","ui.list.clearFilter":"Wyczy\u015B\u0107 filtr","ui.list.emptyWithFilter.prefix":"Brak wynik\xF3w dla","ui.list.emptyWithFilter.suffix":"","ui.messageNav.newMessage":"Nowa wiadomo\u015B\u0107","ui.textField.copyToClipboard":"Skopiuj do schowka","ui.textField.copyLink":"Skopiuj link","ui.textField.copied":"Skopiowano","ui.imagePreview.alt":"Podgl\u0105d obrazu","ui.scrollView.ariaLabel":"tre\u015B\u0107 przewijana","ui.tool.read":"Odczyt","ui.tool.loaded":"Za\u0142adowano","ui.tool.list":"Lista","ui.tool.glob":"Glob","ui.tool.grep":"Grep","ui.tool.webfetch":"Pobieranie sieciowe","ui.tool.websearch":"Wyszukiwanie w sieci","ui.tool.codesearch":"Wyszukiwanie kodu","ui.tool.shell":"Terminal","ui.tool.patch":"Patch","ui.tool.todos":"Zadania","ui.tool.todos.read":"Czytaj zadania","ui.tool.questions":"Pytania","ui.tool.agent":"Agent {{type}}","ui.tool.agent.default":"Agent","ui.common.file.one":"plik","ui.common.file.other":"pliki","ui.common.question.one":"pytanie","ui.common.question.other":"pytania","ui.common.add":"Dodaj","ui.common.back":"Wstecz","ui.common.cancel":"Anuluj","ui.common.confirm":"Potwierd\u017A","ui.common.dismiss":"Odrzu\u0107","ui.common.close":"Zamknij","ui.common.next":"Dalej","ui.common.submit":"Prze\u015Blij","ui.permission.deny":"Odm\xF3w","ui.permission.allowAlways":"Zezwalaj zawsze","ui.permission.allowOnce":"Zezw\xF3l raz","ui.message.expand":"Rozwi\u0144 wiadomo\u015B\u0107","ui.message.collapse":"Zwi\u0144 wiadomo\u015B\u0107","ui.message.copy":"Kopiuj","ui.message.copyMessage":"Kopiuj wiadomo\u015B\u0107","ui.message.forkMessage":"Rozwidlij do nowej sesji","ui.message.revertMessage":"Zresetuj do tego punktu","ui.message.copyResponse":"Kopiuj odpowied\u017A","ui.message.copied":"Skopiowano!","ui.message.interrupted":"Przerwano","ui.message.queued":"W kolejce","ui.message.attachment.alt":"za\u0142\u0105cznik","ui.patch.action.deleted":"Usuni\u0119to","ui.patch.action.created":"Utworzono","ui.patch.action.moved":"Przeniesiono","ui.patch.action.patched":"Za\u0142atano","ui.question.subtitle.answered":"{{count}} odpowiedzi","ui.question.answer.none":"(brak odpowiedzi)","ui.question.review.notAnswered":"(bez odpowiedzi)","ui.question.multiHint":"Zaznacz wszystkie pasuj\u0105ce","ui.question.singleHint":"Wybierz jedn\u0105 odpowied\u017A","ui.question.custom.placeholder":"Wpisz swoj\u0105 odpowied\u017A...","ui.fileSearch.placeholder":"Szukaj","ui.fileSearch.previousMatch":"Poprzednie","ui.fileSearch.nextMatch":"Nast\u0119pne","ui.fileSearch.close":"Zamknij wyszukiwanie","ui.tool.task":"Zadanie","ui.tool.skill":"Umiej\u0119tno\u015B\u0107","ui.basicTool.called":"Wywo\u0142ano `{{tool}}`","ui.toolErrorCard.failed":"B\u0142\u0105d","ui.toolErrorCard.copyError":"Kopiuj b\u0142\u0105d","ui.message.duration.seconds":"{{count}}s","ui.message.duration.minutesSeconds":"{{minutes}}m {{seconds}}s"};export{i as dict};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Pe as F}from"./chunk-e0zb6sw6.js";import{$e as z,cf as B,tf as D}from"./chunk-gwrnxcdn.js";import{qr as x}from"./chunk-n5p7cn4w.js";import"./chunk-cqtkxwd8.js";import"./chunk-mhxyv9c8.js";import{hv as q}from"./chunk-c3szabpf.js";import"./chunk-c8prg3jx.js";import"./chunk-f2pv705d.js";var N="2.0.41",P=q.object({message:q.string(),type:q.string(),param:q.string(),code:q.string()}),Q={errorSchema:P,errorToMessage:(k)=>k.message};function T(k={}){var y;let G=D((y=k.baseURL)!=null?y:"https://api.cerebras.ai/v1"),J=()=>z({Authorization:`Bearer ${B({apiKey:k.apiKey,environmentVariableName:"CEREBRAS_API_KEY",description:"Cerebras API key"})}`,...k.headers},`ai-sdk/cerebras/${N}`),w=(j)=>{return new F(j,{provider:"cerebras.chat",url:({path:K})=>`${G}${K}`,headers:J,fetch:k.fetch,errorStructure:Q,supportsStructuredOutputs:!0})},f=(j)=>w(j);return f.specificationVersion="v3",f.languageModel=w,f.chat=w,f.embeddingModel=(j)=>{throw new x({modelId:j,modelType:"embeddingModel"})},f.textEmbeddingModel=f.embeddingModel,f.imageModel=(j)=>{throw new x({modelId:j,modelType:"imageModel"})},f}var Z=T();export{T as createCerebras,Z as cerebras,N as VERSION};
2
+ import{Pe as F}from"./chunk-ynf17943.js";import{$e as z,cf as B,tf as D}from"./chunk-gsg6zn7e.js";import{Tp as x}from"./chunk-scnbt714.js";import"./chunk-cqtkxwd8.js";import"./chunk-y3gy62q5.js";import{Kt as q}from"./chunk-a48mx917.js";import"./chunk-3va85mbe.js";import"./chunk-e0vrxetq.js";var N="2.0.41",P=q.object({message:q.string(),type:q.string(),param:q.string(),code:q.string()}),Q={errorSchema:P,errorToMessage:(k)=>k.message};function T(k={}){var y;let G=D((y=k.baseURL)!=null?y:"https://api.cerebras.ai/v1"),J=()=>z({Authorization:`Bearer ${B({apiKey:k.apiKey,environmentVariableName:"CEREBRAS_API_KEY",description:"Cerebras API key"})}`,...k.headers},`ai-sdk/cerebras/${N}`),w=(j)=>{return new F(j,{provider:"cerebras.chat",url:({path:K})=>`${G}${K}`,headers:J,fetch:k.fetch,errorStructure:Q,supportsStructuredOutputs:!0})},f=(j)=>w(j);return f.specificationVersion="v3",f.languageModel=w,f.chat=w,f.embeddingModel=(j)=>{throw new x({modelId:j,modelType:"embeddingModel"})},f.textEmbeddingModel=f.embeddingModel,f.imageModel=(j)=>{throw new x({modelId:j,modelType:"imageModel"})},f}var Z=T();export{T as createCerebras,Z as cerebras,N as VERSION};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Qd as b}from"./chunk-yy7r3t3w.js";import{be as f}from"./chunk-f4mnp6xd.js";import{Ch as S}from"./chunk-w43kmnm9.js";import"./chunk-nrk29616.js";import"./chunk-kre93a89.js";import"./chunk-060wbpz4.js";import"./chunk-zrhw1szj.js";import"./chunk-wd8hbven.js";import"./chunk-drnj1a14.js";import{dl as v}from"./chunk-9a6p1gdn.js";import"./chunk-jxkrhrp0.js";import{El as R,Ol as k,wl as U}from"./chunk-6k14c8x1.js";import"./chunk-5r05d901.js";import"./chunk-3rgct4bd.js";import"./chunk-5b3v1x2c.js";import"./chunk-gbxf6e5d.js";import"./chunk-msh249db.js";import"./chunk-95am490c.js";import"./chunk-kmzpeq8k.js";import"./chunk-0gsw04hw.js";import"./chunk-hqjc4wgg.js";import"./chunk-makecdh6.js";import"./chunk-dy2k5rdx.js";import"./chunk-n5p7cn4w.js";import"./chunk-cqtkxwd8.js";import"./chunk-mhxyv9c8.js";import"./chunk-0crgymtr.js";import"./chunk-cth373se.js";import"./chunk-xcxqt8ag.js";import"./chunk-va2qfh0x.js";import"./chunk-ae7b11np.js";import"./chunk-eeq0krp7.js";import"./chunk-73xryfgn.js";import"./chunk-yjqww6ag.js";import"./chunk-z6kcnpsj.js";import{ct as Z}from"./chunk-ts2k13g0.js";import"./chunk-01e3v1xz.js";import"./chunk-dbpkq7ba.js";import"./chunk-z744mz4w.js";import"./chunk-vjn54xj5.js";import"./chunk-0qpqd7nz.js";import"./chunk-gdew7bwm.js";import"./chunk-v3nmnm57.js";import"./chunk-hwsqqkrv.js";import"./chunk-mbbxedsq.js";import"./chunk-aa2n02qk.js";import"./chunk-k1x8469r.js";import"./chunk-c3szabpf.js";import"./chunk-c8prg3jx.js";import"./chunk-t8sy5sgx.js";import"./chunk-tezrgfc6.js";import"./chunk-wjz42325.js";import"./chunk-kry4vcrf.js";import"./chunk-f2pv705d.js";var i=f({command:"stats",describe:"show token usage and cost statistics",builder:(z)=>{return z.option("days",{describe:"show stats for the last N days (default: all time)",type:"number"}).option("tools",{describe:"number of tools to show (default: all)",type:"number"}).option("models",{describe:"show model statistics (default: hidden). Pass a number to show top N, otherwise shows all"}).option("project",{describe:"filter by project (default: all projects, empty string: current project)",type:"string"})},handler:async(z)=>{await b(process.cwd(),async()=>{let E=await y(z.days,z.project),_;if(z.models===!0)_=1/0;else if(typeof z.models==="number")_=z.models;u(E,z.tools,_)})}});async function w(){return k.project}async function p(){return R.use((E)=>E.select().from(U).all()).map((E)=>v.fromRow(E))}async function y(z,E){let _=await p(),L=86400000,J=(()=>{if(z===void 0)return 0;if(z===0){let V=new Date;return V.setHours(0,0,0,0),V.getTime()}return Date.now()-z*86400000})(),K=(()=>{if(z===void 0)return;if(z===0)return 1;return z})(),Y=J>0?_.filter((V)=>V.time.updated>=J):_;if(E!==void 0)if(E===""){let V=await w();Y=Y.filter((F)=>F.projectID===V.id)}else Y=Y.filter((V)=>V.projectID===E);let G={totalSessions:Y.length,totalMessages:0,totalCost:0,totalTokens:{input:0,output:0,reasoning:0,cache:{read:0,write:0}},toolUsage:{},modelUsage:{},dateRange:{earliest:Date.now(),latest:Date.now()},days:0,costPerDay:0,tokensPerSession:0,medianTokensPerSession:0};if(Y.length>1000)console.log(`Large dataset detected (${Y.length} sessions). This may take a while...`);if(Y.length===0)return G.days=K??0,G;let C=Date.now(),x=0,X=[],h=20;for(let V=0;V<Y.length;V+=h){let D=Y.slice(V,V+h).map(async(Q)=>{let W=await S.runPromise(v.Service.use((O)=>O.messages({sessionID:Q.id,agentID:"*"}))),N=0,H={input:0,output:0,reasoning:0,cache:{read:0,write:0}},j={},A={};for(let O of W){if(O.info.role==="assistant"){N+=O.info.cost||0;let B=`${O.info.providerID}/${O.info.modelID}`;if(!A[B])A[B]={messages:0,tokens:{input:0,output:0,cache:{read:0,write:0}},cost:0};if(A[B].messages++,A[B].cost+=O.info.cost||0,O.info.tokens)H.input+=O.info.tokens.input||0,H.output+=O.info.tokens.output||0,H.reasoning+=O.info.tokens.reasoning||0,H.cache.read+=O.info.tokens.cache?.read||0,H.cache.write+=O.info.tokens.cache?.write||0,A[B].tokens.input+=O.info.tokens.input||0,A[B].tokens.output+=(O.info.tokens.output||0)+(O.info.tokens.reasoning||0),A[B].tokens.cache.read+=O.info.tokens.cache?.read||0,A[B].tokens.cache.write+=O.info.tokens.cache?.write||0}for(let B of O.parts)if(B.type==="tool"&&B.tool)j[B.tool]=(j[B.tool]||0)+1}return{messageCount:W.length,sessionCost:N,sessionTokens:H,sessionTotalTokens:H.input+H.output+H.reasoning+H.cache.read+H.cache.write,sessionToolUsage:j,sessionModelUsage:A,earliestTime:J>0?Q.time.updated:Q.time.created,latestTime:Q.time.updated}}),M=await Promise.all(D);for(let Q of M){C=Math.min(C,Q.earliestTime),x=Math.max(x,Q.latestTime),X.push(Q.sessionTotalTokens),G.totalMessages+=Q.messageCount,G.totalCost+=Q.sessionCost,G.totalTokens.input+=Q.sessionTokens.input,G.totalTokens.output+=Q.sessionTokens.output,G.totalTokens.reasoning+=Q.sessionTokens.reasoning,G.totalTokens.cache.read+=Q.sessionTokens.cache.read,G.totalTokens.cache.write+=Q.sessionTokens.cache.write;for(let[W,N]of Object.entries(Q.sessionToolUsage))G.toolUsage[W]=(G.toolUsage[W]||0)+N;for(let[W,N]of Object.entries(Q.sessionModelUsage)){if(!G.modelUsage[W])G.modelUsage[W]={messages:0,tokens:{input:0,output:0,cache:{read:0,write:0}},cost:0};G.modelUsage[W].messages+=N.messages,G.modelUsage[W].tokens.input+=N.tokens.input,G.modelUsage[W].tokens.output+=N.tokens.output,G.modelUsage[W].tokens.cache.read+=N.tokens.cache.read,G.modelUsage[W].tokens.cache.write+=N.tokens.cache.write,G.modelUsage[W].cost+=N.cost}}}let $=Math.max(1,Math.ceil((x-C)/86400000)),q=K??$;G.dateRange={earliest:C,latest:x},G.days=q,G.costPerDay=G.totalCost/q;let I=G.totalTokens.input+G.totalTokens.output+G.totalTokens.reasoning+G.totalTokens.cache.read+G.totalTokens.cache.write;G.tokensPerSession=Y.length>0?I/Y.length:0,X.sort((V,F)=>V-F);let P=Math.floor(X.length/2);return G.medianTokensPerSession=X.length===0?0:X.length%2===0?(X[P-1]+X[P])/2:X[P],G}function u(z,E,_){function J(x,X){let $=55-x.length-X.length,q=Math.max(0,$);return`\u2502${x}${" ".repeat(q)}${X} \u2502`}console.log("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"),console.log("\u2502 OVERVIEW \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524"),console.log(J("Sessions",z.totalSessions.toLocaleString())),console.log(J("Messages",z.totalMessages.toLocaleString())),console.log(J("Days",z.days.toString())),console.log("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"),console.log(),console.log("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"),console.log("\u2502 COST & TOKENS \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");let K=isNaN(z.totalCost)?0:z.totalCost,Y=isNaN(z.costPerDay)?0:z.costPerDay,G=isNaN(z.tokensPerSession)?0:z.tokensPerSession;console.log(J("Total Cost",`$${K.toFixed(2)}`)),console.log(J("Avg Cost/Day",`$${Y.toFixed(2)}`)),console.log(J("Avg Tokens/Session",Z.number(Math.round(G))));let C=isNaN(z.medianTokensPerSession)?0:z.medianTokensPerSession;if(console.log(J("Median Tokens/Session",Z.number(Math.round(C)))),console.log(J("Input",Z.number(z.totalTokens.input))),console.log(J("Output",Z.number(z.totalTokens.output))),console.log(J("Cache Read",Z.number(z.totalTokens.cache.read))),console.log(J("Cache Write",Z.number(z.totalTokens.cache.write))),console.log("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"),console.log(),_!==void 0&&Object.keys(z.modelUsage).length>0){let x=Object.entries(z.modelUsage).sort(([,h],[,$])=>$.messages-h.messages),X=_===1/0?x:x.slice(0,_);console.log("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"),console.log("\u2502 MODEL USAGE \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");for(let[h,$]of X)console.log(`\u2502 ${h.padEnd(54)} \u2502`),console.log(J(" Messages",$.messages.toLocaleString())),console.log(J(" Input Tokens",Z.number($.tokens.input))),console.log(J(" Output Tokens",Z.number($.tokens.output))),console.log(J(" Cache Read",Z.number($.tokens.cache.read))),console.log(J(" Cache Write",Z.number($.tokens.cache.write))),console.log(J(" Cost",`$${$.cost.toFixed(4)}`)),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");process.stdout.write("\x1B[1A"),console.log("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518")}if(console.log(),Object.keys(z.toolUsage).length>0){let x=Object.entries(z.toolUsage).sort(([,q],[,I])=>I-q),X=E?x.slice(0,E):x;console.log("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"),console.log("\u2502 TOOL USAGE \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");let h=Math.max(...X.map(([,q])=>q)),$=Object.values(z.toolUsage).reduce((q,I)=>q+I,0);for(let[q,I]of X){let P=Math.max(1,Math.floor(I/h*20)),V="\u2588".repeat(P),F=(I/$*100).toFixed(1),D=18,W=` ${(q.length>18?q.substring(0,16)+"..":q).padEnd(18)} ${V.padEnd(20)} ${I.toString().padStart(3)} (${F.padStart(4)}%)`,N=Math.max(0,56-W.length-1);console.log(`\u2502${W}${" ".repeat(N)} \u2502`)}console.log("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518")}console.log()}export{u as displayStats,y as aggregateSessionStats,i as StatsCommand};
2
+ import{Qd as b}from"./chunk-ytyzrqev.js";import{be as f}from"./chunk-f4mnp6xd.js";import{Ch as S}from"./chunk-he9kpk9r.js";import"./chunk-vs3s49jw.js";import"./chunk-kre93a89.js";import"./chunk-060wbpz4.js";import"./chunk-zrhw1szj.js";import"./chunk-t8fjgkp8.js";import"./chunk-0egrckx0.js";import{dl as v}from"./chunk-qq9m8fxv.js";import"./chunk-2qm46qvn.js";import{El as R,Ol as k,wl as U}from"./chunk-tsmj98yf.js";import"./chunk-58f4y4b7.js";import"./chunk-rmsqb6r4.js";import"./chunk-qxdpgdfk.js";import"./chunk-6qwk6z87.js";import"./chunk-sa0rrreh.js";import"./chunk-ydgst3h8.js";import"./chunk-6tqbnxar.js";import"./chunk-0w19vmd7.js";import"./chunk-eewe7tx1.js";import"./chunk-37cbrnke.js";import"./chunk-wm9nh9nb.js";import"./chunk-scnbt714.js";import"./chunk-cqtkxwd8.js";import"./chunk-y3gy62q5.js";import"./chunk-az3nss5m.js";import"./chunk-p2fte9vz.js";import"./chunk-ggncq8w8.js";import"./chunk-t3w43rft.js";import"./chunk-eacpc64g.js";import"./chunk-27saej0r.js";import"./chunk-9009v4d0.js";import"./chunk-82xrfk5x.js";import"./chunk-wqk1v8t0.js";import{Fr as Z}from"./chunk-vkjqy92f.js";import"./chunk-z0kbyr00.js";import"./chunk-sbjymf20.js";import"./chunk-dt3bsmfe.js";import"./chunk-vbfej8ds.js";import"./chunk-0tm6589k.js";import"./chunk-6yhn9syz.js";import"./chunk-wb05bp10.js";import"./chunk-wgkcyqn1.js";import"./chunk-59csnjc3.js";import"./chunk-1bxfzd6r.js";import"./chunk-6p6m5956.js";import"./chunk-a48mx917.js";import"./chunk-3va85mbe.js";import"./chunk-w7a33cwa.js";import"./chunk-g7v6sp3c.js";import"./chunk-s2tc3qs0.js";import"./chunk-n6tqtk6h.js";import"./chunk-e0vrxetq.js";var i=f({command:"stats",describe:"show token usage and cost statistics",builder:(z)=>{return z.option("days",{describe:"show stats for the last N days (default: all time)",type:"number"}).option("tools",{describe:"number of tools to show (default: all)",type:"number"}).option("models",{describe:"show model statistics (default: hidden). Pass a number to show top N, otherwise shows all"}).option("project",{describe:"filter by project (default: all projects, empty string: current project)",type:"string"})},handler:async(z)=>{await b(process.cwd(),async()=>{let E=await y(z.days,z.project),_;if(z.models===!0)_=1/0;else if(typeof z.models==="number")_=z.models;u(E,z.tools,_)})}});async function w(){return k.project}async function p(){return R.use((E)=>E.select().from(U).all()).map((E)=>v.fromRow(E))}async function y(z,E){let _=await p(),L=86400000,J=(()=>{if(z===void 0)return 0;if(z===0){let V=new Date;return V.setHours(0,0,0,0),V.getTime()}return Date.now()-z*86400000})(),K=(()=>{if(z===void 0)return;if(z===0)return 1;return z})(),Y=J>0?_.filter((V)=>V.time.updated>=J):_;if(E!==void 0)if(E===""){let V=await w();Y=Y.filter((F)=>F.projectID===V.id)}else Y=Y.filter((V)=>V.projectID===E);let G={totalSessions:Y.length,totalMessages:0,totalCost:0,totalTokens:{input:0,output:0,reasoning:0,cache:{read:0,write:0}},toolUsage:{},modelUsage:{},dateRange:{earliest:Date.now(),latest:Date.now()},days:0,costPerDay:0,tokensPerSession:0,medianTokensPerSession:0};if(Y.length>1000)console.log(`Large dataset detected (${Y.length} sessions). This may take a while...`);if(Y.length===0)return G.days=K??0,G;let C=Date.now(),x=0,X=[],h=20;for(let V=0;V<Y.length;V+=h){let D=Y.slice(V,V+h).map(async(Q)=>{let W=await S.runPromise(v.Service.use((O)=>O.messages({sessionID:Q.id,agentID:"*"}))),N=0,H={input:0,output:0,reasoning:0,cache:{read:0,write:0}},j={},A={};for(let O of W){if(O.info.role==="assistant"){N+=O.info.cost||0;let B=`${O.info.providerID}/${O.info.modelID}`;if(!A[B])A[B]={messages:0,tokens:{input:0,output:0,cache:{read:0,write:0}},cost:0};if(A[B].messages++,A[B].cost+=O.info.cost||0,O.info.tokens)H.input+=O.info.tokens.input||0,H.output+=O.info.tokens.output||0,H.reasoning+=O.info.tokens.reasoning||0,H.cache.read+=O.info.tokens.cache?.read||0,H.cache.write+=O.info.tokens.cache?.write||0,A[B].tokens.input+=O.info.tokens.input||0,A[B].tokens.output+=(O.info.tokens.output||0)+(O.info.tokens.reasoning||0),A[B].tokens.cache.read+=O.info.tokens.cache?.read||0,A[B].tokens.cache.write+=O.info.tokens.cache?.write||0}for(let B of O.parts)if(B.type==="tool"&&B.tool)j[B.tool]=(j[B.tool]||0)+1}return{messageCount:W.length,sessionCost:N,sessionTokens:H,sessionTotalTokens:H.input+H.output+H.reasoning+H.cache.read+H.cache.write,sessionToolUsage:j,sessionModelUsage:A,earliestTime:J>0?Q.time.updated:Q.time.created,latestTime:Q.time.updated}}),M=await Promise.all(D);for(let Q of M){C=Math.min(C,Q.earliestTime),x=Math.max(x,Q.latestTime),X.push(Q.sessionTotalTokens),G.totalMessages+=Q.messageCount,G.totalCost+=Q.sessionCost,G.totalTokens.input+=Q.sessionTokens.input,G.totalTokens.output+=Q.sessionTokens.output,G.totalTokens.reasoning+=Q.sessionTokens.reasoning,G.totalTokens.cache.read+=Q.sessionTokens.cache.read,G.totalTokens.cache.write+=Q.sessionTokens.cache.write;for(let[W,N]of Object.entries(Q.sessionToolUsage))G.toolUsage[W]=(G.toolUsage[W]||0)+N;for(let[W,N]of Object.entries(Q.sessionModelUsage)){if(!G.modelUsage[W])G.modelUsage[W]={messages:0,tokens:{input:0,output:0,cache:{read:0,write:0}},cost:0};G.modelUsage[W].messages+=N.messages,G.modelUsage[W].tokens.input+=N.tokens.input,G.modelUsage[W].tokens.output+=N.tokens.output,G.modelUsage[W].tokens.cache.read+=N.tokens.cache.read,G.modelUsage[W].tokens.cache.write+=N.tokens.cache.write,G.modelUsage[W].cost+=N.cost}}}let $=Math.max(1,Math.ceil((x-C)/86400000)),q=K??$;G.dateRange={earliest:C,latest:x},G.days=q,G.costPerDay=G.totalCost/q;let I=G.totalTokens.input+G.totalTokens.output+G.totalTokens.reasoning+G.totalTokens.cache.read+G.totalTokens.cache.write;G.tokensPerSession=Y.length>0?I/Y.length:0,X.sort((V,F)=>V-F);let P=Math.floor(X.length/2);return G.medianTokensPerSession=X.length===0?0:X.length%2===0?(X[P-1]+X[P])/2:X[P],G}function u(z,E,_){function J(x,X){let $=55-x.length-X.length,q=Math.max(0,$);return`\u2502${x}${" ".repeat(q)}${X} \u2502`}console.log("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"),console.log("\u2502 OVERVIEW \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524"),console.log(J("Sessions",z.totalSessions.toLocaleString())),console.log(J("Messages",z.totalMessages.toLocaleString())),console.log(J("Days",z.days.toString())),console.log("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"),console.log(),console.log("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"),console.log("\u2502 COST & TOKENS \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");let K=isNaN(z.totalCost)?0:z.totalCost,Y=isNaN(z.costPerDay)?0:z.costPerDay,G=isNaN(z.tokensPerSession)?0:z.tokensPerSession;console.log(J("Total Cost",`$${K.toFixed(2)}`)),console.log(J("Avg Cost/Day",`$${Y.toFixed(2)}`)),console.log(J("Avg Tokens/Session",Z.number(Math.round(G))));let C=isNaN(z.medianTokensPerSession)?0:z.medianTokensPerSession;if(console.log(J("Median Tokens/Session",Z.number(Math.round(C)))),console.log(J("Input",Z.number(z.totalTokens.input))),console.log(J("Output",Z.number(z.totalTokens.output))),console.log(J("Cache Read",Z.number(z.totalTokens.cache.read))),console.log(J("Cache Write",Z.number(z.totalTokens.cache.write))),console.log("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"),console.log(),_!==void 0&&Object.keys(z.modelUsage).length>0){let x=Object.entries(z.modelUsage).sort(([,h],[,$])=>$.messages-h.messages),X=_===1/0?x:x.slice(0,_);console.log("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"),console.log("\u2502 MODEL USAGE \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");for(let[h,$]of X)console.log(`\u2502 ${h.padEnd(54)} \u2502`),console.log(J(" Messages",$.messages.toLocaleString())),console.log(J(" Input Tokens",Z.number($.tokens.input))),console.log(J(" Output Tokens",Z.number($.tokens.output))),console.log(J(" Cache Read",Z.number($.tokens.cache.read))),console.log(J(" Cache Write",Z.number($.tokens.cache.write))),console.log(J(" Cost",`$${$.cost.toFixed(4)}`)),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");process.stdout.write("\x1B[1A"),console.log("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518")}if(console.log(),Object.keys(z.toolUsage).length>0){let x=Object.entries(z.toolUsage).sort(([,q],[,I])=>I-q),X=E?x.slice(0,E):x;console.log("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"),console.log("\u2502 TOOL USAGE \u2502"),console.log("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");let h=Math.max(...X.map(([,q])=>q)),$=Object.values(z.toolUsage).reduce((q,I)=>q+I,0);for(let[q,I]of X){let P=Math.max(1,Math.floor(I/h*20)),V="\u2588".repeat(P),F=(I/$*100).toFixed(1),D=18,W=` ${(q.length>18?q.substring(0,16)+"..":q).padEnd(18)} ${V.padEnd(20)} ${I.toString().padStart(3)} (${F.padStart(4)}%)`,N=Math.max(0,56-W.length-1);console.log(`\u2502${W}${" ".repeat(N)} \u2502`)}console.log("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518")}console.log()}export{u as displayStats,y as aggregateSessionStats,i as StatsCommand};