@bkm016/basalt 0.1.17 → 0.1.19

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 (907) hide show
  1. package/README.md +1 -1
  2. package/chunk-0b2brwjc.js +3 -0
  3. package/chunk-13pbt8mn.js +2 -0
  4. package/chunk-14085qqt.js +8 -0
  5. package/chunk-2dph65ye.js +3 -0
  6. package/chunk-2v8anxgd.js +9 -0
  7. package/chunk-37f4ks5f.js +3 -0
  8. package/chunk-3q1hxwxb.js +5 -0
  9. package/chunk-3qs33s9g.js +2 -0
  10. package/chunk-53m94h0b.js +7 -0
  11. package/chunk-5jy2cnyr.js +18 -0
  12. package/chunk-5wfyn3k0.js +3 -0
  13. package/chunk-69v706tc.js +5 -0
  14. package/chunk-79h4rzza.js +2 -0
  15. package/chunk-7xfde6se.js +3 -0
  16. package/chunk-8bf4g2d7.js +3 -0
  17. package/chunk-adq8c7vt.js +25 -0
  18. package/chunk-ahpg469e.js +3 -0
  19. package/chunk-ary9gky8.js +7 -0
  20. package/chunk-becsymjn.js +2 -0
  21. package/chunk-beqps81c.js +4 -0
  22. package/chunk-bnvynyww.js +3 -0
  23. package/chunk-c785tr0e.js +4078 -0
  24. package/chunk-cc19pbgm.js +12 -0
  25. package/chunk-d6g5m56z.js +2 -0
  26. package/chunk-e2m8ap8f.js +3 -0
  27. package/chunk-etkktxdc.js +2 -0
  28. package/chunk-etxsj2ey.js +10 -0
  29. package/chunk-f2ajxymw.js +2 -0
  30. package/chunk-f2bcfa6z.js +7 -0
  31. package/chunk-f47qdrkp.js +2 -0
  32. package/chunk-f5yg6yd0.js +3 -0
  33. package/chunk-fj56fznw.js +3 -0
  34. package/chunk-fjk9ztjc.js +11 -0
  35. package/chunk-g99n5ywc.js +3 -0
  36. package/chunk-grwavjp7.js +2 -0
  37. package/chunk-gsek3gpd.js +3 -0
  38. package/chunk-gv9hbv9j.js +2 -0
  39. package/chunk-h045t6f1.js +2 -0
  40. package/chunk-h4g1tzk6.js +11 -0
  41. package/chunk-had2k7b9.js +20 -0
  42. package/chunk-hbm45044.js +25 -0
  43. package/chunk-hd2hars5.js +3 -0
  44. package/chunk-hfh230tm.js +2 -0
  45. package/chunk-hkx7d1j9.js +7 -0
  46. package/chunk-jbk2tmza.js +5 -0
  47. package/chunk-jv9sy0np.js +2 -0
  48. package/chunk-kdc8tq70.js +2 -0
  49. package/chunk-keq5kv9b.js +3 -0
  50. package/chunk-m1nevdw6.js +3 -0
  51. package/chunk-m6yrpt1f.js +5 -0
  52. package/chunk-mrchbvsy.js +4 -0
  53. package/chunk-n9x6akk3.js +2 -0
  54. package/chunk-ne94brn4.js +3 -0
  55. package/chunk-nv1jg79d.js +2 -0
  56. package/chunk-pvdt969t.js +59 -0
  57. package/chunk-q22dnah8.js +3 -0
  58. package/chunk-q2zayphb.js +10 -0
  59. package/chunk-q4h6djtp.js +2 -0
  60. package/chunk-qa8mne61.js +2 -0
  61. package/chunk-r9z9m75h.js +16 -0
  62. package/chunk-rmyzxqkd.js +467 -0
  63. package/chunk-rq647zmf.js +2 -0
  64. package/chunk-sj4jvm9p.js +2 -0
  65. package/chunk-sq0ra5m8.js +4 -0
  66. package/chunk-sxg03n4v.js +2 -0
  67. package/chunk-t0m1wjrn.js +3 -0
  68. package/chunk-t3mq64c8.js +3 -0
  69. package/chunk-td52edcm.js +31 -0
  70. package/chunk-tdnwaaw4.js +12 -0
  71. package/chunk-teky87xx.js +3 -0
  72. package/chunk-v1avwm7q.js +3 -0
  73. package/chunk-wcmk8ee3.js +3 -0
  74. package/chunk-wf9r0frb.js +3 -0
  75. package/chunk-wx697mre.js +2 -0
  76. package/chunk-wzz64ygm.js +2 -0
  77. package/chunk-xb9mwt5a.js +2 -0
  78. package/chunk-xbkbaa84.js +2 -0
  79. package/chunk-xjy31n64.js +3 -0
  80. package/chunk-xzn34n38.js +389 -0
  81. package/chunk-yprp5s5v.js +3 -0
  82. package/chunk-yyhdabhq.js +15 -0
  83. package/chunk-z2jp61ze.js +39 -0
  84. package/chunk-zt5szcek.js +3 -0
  85. package/chunk-zxb6cg3m.js +2 -0
  86. package/compiled.js +11 -11
  87. package/package.json +1 -1
  88. package/ui-test-worker.js +40 -40
  89. package/web/chunk-0ays2hhj.js +41 -0
  90. package/web/chunk-0ays2hhj.js.br +0 -0
  91. package/web/chunk-0ays2hhj.js.gz +0 -0
  92. package/web/chunk-0na4c1bp.js +139 -0
  93. package/web/chunk-0na4c1bp.js.br +0 -0
  94. package/web/chunk-0na4c1bp.js.gz +0 -0
  95. package/web/chunk-0y0p0ct0.js +1 -0
  96. package/web/chunk-0y0p0ct0.js.br +0 -0
  97. package/web/chunk-0y0p0ct0.js.gz +0 -0
  98. package/web/chunk-191v8amv.js +1 -0
  99. package/web/chunk-191v8amv.js.br +0 -0
  100. package/web/chunk-191v8amv.js.gz +0 -0
  101. package/web/chunk-1c6rhsft.js +200 -0
  102. package/web/chunk-1c6rhsft.js.br +0 -0
  103. package/web/chunk-1c6rhsft.js.gz +0 -0
  104. package/web/chunk-1mwkrh5f.js +370 -0
  105. package/web/chunk-1mwkrh5f.js.br +0 -0
  106. package/web/chunk-1mwkrh5f.js.gz +0 -0
  107. package/web/chunk-1q4r17he.js +2 -0
  108. package/web/chunk-1q4r17he.js.br +0 -0
  109. package/web/chunk-1q4r17he.js.gz +0 -0
  110. package/web/chunk-1sm3c8an.js +8 -0
  111. package/web/chunk-1sm3c8an.js.br +0 -0
  112. package/web/chunk-1sm3c8an.js.gz +0 -0
  113. package/web/chunk-1vmjpvy5.js +1 -0
  114. package/web/chunk-1vmjpvy5.js.br +0 -0
  115. package/web/chunk-1vmjpvy5.js.gz +0 -0
  116. package/web/chunk-1x4z5w5e.js +1 -0
  117. package/web/chunk-1x4z5w5e.js.br +2 -0
  118. package/web/chunk-1x4z5w5e.js.gz +0 -0
  119. package/web/chunk-22ncha3b.js +142 -0
  120. package/web/chunk-22ncha3b.js.br +0 -0
  121. package/web/chunk-22ncha3b.js.gz +0 -0
  122. package/web/chunk-239rqgmj.js +24 -0
  123. package/web/chunk-239rqgmj.js.br +0 -0
  124. package/web/chunk-239rqgmj.js.gz +0 -0
  125. package/web/chunk-2c6zessc.js +2 -0
  126. package/web/chunk-2c6zessc.js.br +0 -0
  127. package/web/chunk-2c6zessc.js.gz +0 -0
  128. package/web/chunk-2m7b1wmp.js +1 -0
  129. package/web/chunk-2m7b1wmp.js.br +0 -0
  130. package/web/chunk-2m7b1wmp.js.gz +0 -0
  131. package/web/chunk-2qncw4c0.js +2 -0
  132. package/web/chunk-2qncw4c0.js.br +0 -0
  133. package/web/chunk-2qncw4c0.js.gz +0 -0
  134. package/web/chunk-2r497559.js +2 -0
  135. package/web/chunk-2r497559.js.br +0 -0
  136. package/web/chunk-2r497559.js.gz +0 -0
  137. package/web/chunk-2t43cra8.js +1 -0
  138. package/web/chunk-2t43cra8.js.br +0 -0
  139. package/web/chunk-2t43cra8.js.gz +0 -0
  140. package/web/chunk-2v379e1v.js +1 -0
  141. package/web/chunk-2v379e1v.js.br +2 -0
  142. package/web/chunk-2v379e1v.js.gz +0 -0
  143. package/web/chunk-2ywd0vz2.js +1 -0
  144. package/web/chunk-2ywd0vz2.js.br +0 -0
  145. package/web/chunk-2ywd0vz2.js.gz +0 -0
  146. package/web/chunk-3626tdgf.js +1 -0
  147. package/web/chunk-3626tdgf.js.br +0 -0
  148. package/web/chunk-3626tdgf.js.gz +0 -0
  149. package/web/chunk-3fq54zbf.js +2 -0
  150. package/web/chunk-3fq54zbf.js.br +0 -0
  151. package/web/chunk-3fq54zbf.js.gz +0 -0
  152. package/web/chunk-3jptvn0z.js +1 -0
  153. package/web/chunk-3jptvn0z.js.br +0 -0
  154. package/web/chunk-3jptvn0z.js.gz +0 -0
  155. package/web/chunk-3k31m9yk.js +7 -0
  156. package/web/chunk-3k31m9yk.js.br +0 -0
  157. package/web/chunk-3k31m9yk.js.gz +0 -0
  158. package/web/chunk-3wrebqcz.js +1 -0
  159. package/web/chunk-3wrebqcz.js.br +0 -0
  160. package/web/chunk-3wrebqcz.js.gz +0 -0
  161. package/web/chunk-42z866aa.js +1 -0
  162. package/web/chunk-42z866aa.js.br +0 -0
  163. package/web/chunk-42z866aa.js.gz +0 -0
  164. package/web/chunk-46r5s1ag.js +1 -0
  165. package/web/chunk-46r5s1ag.js.br +2 -0
  166. package/web/chunk-46r5s1ag.js.gz +0 -0
  167. package/web/chunk-4h8kxmac.js +1 -0
  168. package/web/chunk-4h8kxmac.js.br +2 -0
  169. package/web/chunk-4h8kxmac.js.gz +0 -0
  170. package/web/chunk-4hmp8qcv.js +1 -0
  171. package/web/chunk-4hmp8qcv.js.br +0 -0
  172. package/web/chunk-4hmp8qcv.js.gz +0 -0
  173. package/web/chunk-4ryyn6k5.js +1 -0
  174. package/web/chunk-4ryyn6k5.js.br +0 -0
  175. package/web/chunk-4ryyn6k5.js.gz +0 -0
  176. package/web/chunk-4zp7b44y.js +78 -0
  177. package/web/chunk-4zp7b44y.js.br +0 -0
  178. package/web/chunk-4zp7b44y.js.gz +0 -0
  179. package/web/chunk-52n1enqe.js +1 -0
  180. package/web/chunk-52n1enqe.js.br +0 -0
  181. package/web/chunk-52n1enqe.js.gz +0 -0
  182. package/web/chunk-5m5jve5q.js +2 -0
  183. package/web/chunk-5m5jve5q.js.br +0 -0
  184. package/web/chunk-5m5jve5q.js.gz +0 -0
  185. package/web/chunk-62ssrwet.js +1 -0
  186. package/web/chunk-62ssrwet.js.br +0 -0
  187. package/web/chunk-62ssrwet.js.gz +0 -0
  188. package/web/chunk-6e14fdx8.js +1 -0
  189. package/web/chunk-6e14fdx8.js.br +0 -0
  190. package/web/chunk-6e14fdx8.js.gz +0 -0
  191. package/web/chunk-6kckk3j9.js +1 -0
  192. package/web/chunk-6kckk3j9.js.br +2 -0
  193. package/web/chunk-6kckk3j9.js.gz +0 -0
  194. package/web/chunk-6vdh5wx5.js +1 -0
  195. package/web/chunk-6vdh5wx5.js.br +0 -0
  196. package/web/chunk-6vdh5wx5.js.gz +0 -0
  197. package/web/chunk-6wyrfrh1.js +1 -0
  198. package/web/chunk-6wyrfrh1.js.br +0 -0
  199. package/web/chunk-6wyrfrh1.js.gz +0 -0
  200. package/web/chunk-77pcpdb5.js +303 -0
  201. package/web/chunk-77pcpdb5.js.br +0 -0
  202. package/web/chunk-77pcpdb5.js.gz +0 -0
  203. package/web/chunk-7dq3x88k.js +120 -0
  204. package/web/chunk-7dq3x88k.js.br +0 -0
  205. package/web/chunk-7dq3x88k.js.gz +0 -0
  206. package/web/chunk-7ebwmmjn.js +34 -0
  207. package/web/chunk-7ebwmmjn.js.br +0 -0
  208. package/web/chunk-7ebwmmjn.js.gz +0 -0
  209. package/web/chunk-7jra5kj0.js +1 -0
  210. package/web/chunk-7jra5kj0.js.br +0 -0
  211. package/web/chunk-7jra5kj0.js.gz +0 -0
  212. package/web/chunk-8dgtprxa.js +2 -0
  213. package/web/chunk-8dgtprxa.js.br +0 -0
  214. package/web/chunk-8dgtprxa.js.gz +0 -0
  215. package/web/chunk-8mrw5mgn.js +1 -0
  216. package/web/chunk-8mrw5mgn.js.br +0 -0
  217. package/web/chunk-8mrw5mgn.js.gz +0 -0
  218. package/web/chunk-8n1cyb8k.js +99 -0
  219. package/web/chunk-8n1cyb8k.js.br +0 -0
  220. package/web/chunk-8n1cyb8k.js.gz +0 -0
  221. package/web/chunk-8ssjqdky.js +1 -0
  222. package/web/chunk-8ssjqdky.js.br +2 -0
  223. package/web/chunk-8ssjqdky.js.gz +0 -0
  224. package/web/chunk-90k6xrsa.js +2 -0
  225. package/web/chunk-90k6xrsa.js.br +0 -0
  226. package/web/chunk-90k6xrsa.js.gz +0 -0
  227. package/web/chunk-926v5sg8.js +24 -0
  228. package/web/chunk-926v5sg8.js.br +0 -0
  229. package/web/chunk-926v5sg8.js.gz +0 -0
  230. package/web/chunk-9kvr6dkh.js +106 -0
  231. package/web/chunk-9kvr6dkh.js.br +0 -0
  232. package/web/chunk-9kvr6dkh.js.gz +0 -0
  233. package/web/chunk-9s6zj1sh.js +217 -0
  234. package/web/chunk-9s6zj1sh.js.br +0 -0
  235. package/web/chunk-9s6zj1sh.js.gz +0 -0
  236. package/web/chunk-acpyx69f.js +1 -0
  237. package/web/chunk-acpyx69f.js.br +0 -0
  238. package/web/chunk-acpyx69f.js.gz +0 -0
  239. package/web/chunk-amch1hp8.js +1 -0
  240. package/web/chunk-amch1hp8.js.br +0 -0
  241. package/web/chunk-amch1hp8.js.gz +0 -0
  242. package/web/chunk-azjpkz26.js +38 -0
  243. package/web/chunk-azjpkz26.js.br +0 -0
  244. package/web/chunk-azjpkz26.js.gz +0 -0
  245. package/web/chunk-b2zmxzm0.js +2 -0
  246. package/web/chunk-b2zmxzm0.js.br +0 -0
  247. package/web/chunk-b2zmxzm0.js.gz +0 -0
  248. package/web/chunk-bgn0bkad.js +98 -0
  249. package/web/chunk-bgn0bkad.js.br +0 -0
  250. package/web/chunk-bgn0bkad.js.gz +0 -0
  251. package/web/chunk-bka3pbzn.js +4 -0
  252. package/web/chunk-bka3pbzn.js.br +0 -0
  253. package/web/chunk-bka3pbzn.js.gz +0 -0
  254. package/web/chunk-ck23t8as.js +2 -0
  255. package/web/chunk-ck23t8as.js.br +0 -0
  256. package/web/chunk-ck23t8as.js.gz +0 -0
  257. package/web/chunk-cp5ec63g.js +30 -0
  258. package/web/chunk-cp5ec63g.js.br +0 -0
  259. package/web/chunk-cp5ec63g.js.gz +0 -0
  260. package/web/chunk-cw21gjwg.js +39 -0
  261. package/web/chunk-cw21gjwg.js.br +0 -0
  262. package/web/chunk-cw21gjwg.js.gz +0 -0
  263. package/web/chunk-cxcpk0qt.js +2 -0
  264. package/web/chunk-cxcpk0qt.js.br +0 -0
  265. package/web/chunk-cxcpk0qt.js.gz +0 -0
  266. package/web/chunk-d3s30py8.js +1 -0
  267. package/web/chunk-d3s30py8.js.br +0 -0
  268. package/web/chunk-d3s30py8.js.gz +0 -0
  269. package/web/chunk-dj4jc1ec.js +1 -0
  270. package/web/chunk-dj4jc1ec.js.br +0 -0
  271. package/web/chunk-dj4jc1ec.js.gz +0 -0
  272. package/web/chunk-ef2xw0kb.js +1 -0
  273. package/web/chunk-ef2xw0kb.js.br +0 -0
  274. package/web/chunk-ef2xw0kb.js.gz +0 -0
  275. package/web/chunk-fek0yrg5.js +2 -0
  276. package/web/chunk-fek0yrg5.js.br +0 -0
  277. package/web/chunk-fek0yrg5.js.gz +0 -0
  278. package/web/chunk-fgm2r34b.js +36 -0
  279. package/web/chunk-fgm2r34b.js.br +0 -0
  280. package/web/chunk-fgm2r34b.js.gz +0 -0
  281. package/web/chunk-fpqs301q.js +2 -0
  282. package/web/chunk-fpqs301q.js.br +0 -0
  283. package/web/chunk-fpqs301q.js.gz +0 -0
  284. package/web/chunk-fv6se8xf.js +1 -0
  285. package/web/chunk-fv6se8xf.js.br +2 -0
  286. package/web/chunk-fv6se8xf.js.gz +0 -0
  287. package/web/chunk-g0nagyx2.js +1 -0
  288. package/web/chunk-g0nagyx2.js.br +0 -0
  289. package/web/chunk-g0nagyx2.js.gz +0 -0
  290. package/web/chunk-g5fp9ep9.js +1 -0
  291. package/web/chunk-g5fp9ep9.js.br +0 -0
  292. package/web/chunk-g5fp9ep9.js.gz +0 -0
  293. package/web/chunk-gh1fmd3j.js +3 -0
  294. package/web/chunk-gh1fmd3j.js.br +0 -0
  295. package/web/chunk-gh1fmd3j.js.gz +0 -0
  296. package/web/chunk-gq5825re.js +70 -0
  297. package/web/chunk-gq5825re.js.br +0 -0
  298. package/web/chunk-gq5825re.js.gz +0 -0
  299. package/web/chunk-gy57dyny.js +1 -0
  300. package/web/chunk-gy57dyny.js.br +0 -0
  301. package/web/chunk-gy57dyny.js.gz +0 -0
  302. package/web/chunk-j7p6xhe2.js +1 -0
  303. package/web/chunk-j7p6xhe2.js.br +0 -0
  304. package/web/chunk-j7p6xhe2.js.gz +0 -0
  305. package/web/chunk-jb8xfsc6.js +2 -0
  306. package/web/chunk-jb8xfsc6.js.br +0 -0
  307. package/web/chunk-jb8xfsc6.js.gz +0 -0
  308. package/web/chunk-jqyxnnn0.js +1 -0
  309. package/web/chunk-jqyxnnn0.js.br +0 -0
  310. package/web/chunk-jqyxnnn0.js.gz +0 -0
  311. package/web/chunk-jtwct1bx.js +1133 -0
  312. package/web/chunk-jtwct1bx.js.br +0 -0
  313. package/web/chunk-jtwct1bx.js.gz +0 -0
  314. package/web/chunk-k22kq2t7.js +12 -0
  315. package/web/chunk-k22kq2t7.js.br +0 -0
  316. package/web/chunk-k22kq2t7.js.gz +0 -0
  317. package/web/chunk-k2ry7k7s.js +1 -0
  318. package/web/chunk-k2ry7k7s.js.br +0 -0
  319. package/web/chunk-k2ry7k7s.js.gz +0 -0
  320. package/web/chunk-kdbrrecz.js +332 -0
  321. package/web/chunk-kdbrrecz.js.br +0 -0
  322. package/web/chunk-kdbrrecz.js.gz +0 -0
  323. package/web/chunk-kes2tf1q.js +2 -0
  324. package/web/chunk-kes2tf1q.js.br +3 -0
  325. package/web/chunk-kes2tf1q.js.gz +0 -0
  326. package/web/chunk-ksrzt6c5.js +1 -0
  327. package/web/chunk-ksrzt6c5.js.br +0 -0
  328. package/web/chunk-ksrzt6c5.js.gz +0 -0
  329. package/web/chunk-m2ethr1n.js +84 -0
  330. package/web/chunk-m2ethr1n.js.br +0 -0
  331. package/web/chunk-m2ethr1n.js.gz +0 -0
  332. package/web/chunk-m7tcm69z.js +292 -0
  333. package/web/chunk-m7tcm69z.js.br +0 -0
  334. package/web/chunk-m7tcm69z.js.gz +0 -0
  335. package/web/chunk-m8bz4e6n.js +2 -0
  336. package/web/chunk-m8bz4e6n.js.br +0 -0
  337. package/web/chunk-m8bz4e6n.js.gz +0 -0
  338. package/web/chunk-mva687p4.js +1 -0
  339. package/web/chunk-mva687p4.js.br +0 -0
  340. package/web/chunk-mva687p4.js.gz +0 -0
  341. package/web/chunk-n8fe9j5b.js +214 -0
  342. package/web/chunk-n8fe9j5b.js.br +0 -0
  343. package/web/chunk-n8fe9j5b.js.gz +0 -0
  344. package/web/chunk-nckx4yfd.js +62 -0
  345. package/web/chunk-nckx4yfd.js.br +0 -0
  346. package/web/chunk-nckx4yfd.js.gz +0 -0
  347. package/web/chunk-ncynjha5.js +2 -0
  348. package/web/chunk-ncynjha5.js.br +0 -0
  349. package/web/chunk-ncynjha5.js.gz +0 -0
  350. package/web/chunk-nq7dp0wj.js +291 -0
  351. package/web/chunk-nq7dp0wj.js.br +0 -0
  352. package/web/chunk-nq7dp0wj.js.gz +0 -0
  353. package/web/chunk-pagep4k3.js +1 -0
  354. package/web/chunk-pagep4k3.js.br +0 -0
  355. package/web/chunk-pagep4k3.js.gz +0 -0
  356. package/web/chunk-pbrk7zdw.js +1 -0
  357. package/web/chunk-pbrk7zdw.js.br +0 -0
  358. package/web/chunk-pbrk7zdw.js.gz +0 -0
  359. package/web/chunk-q0cs1bhg.js +2 -0
  360. package/web/chunk-q0cs1bhg.js.br +0 -0
  361. package/web/chunk-q0cs1bhg.js.gz +0 -0
  362. package/web/chunk-q749pgke.js +1 -0
  363. package/web/chunk-q749pgke.js.br +0 -0
  364. package/web/chunk-q749pgke.js.gz +0 -0
  365. package/web/chunk-q7yry602.js +1 -0
  366. package/web/chunk-q7yry602.js.br +0 -0
  367. package/web/chunk-q7yry602.js.gz +0 -0
  368. package/web/chunk-qkeaa97s.js +1 -0
  369. package/web/chunk-qkeaa97s.js.br +0 -0
  370. package/web/chunk-qkeaa97s.js.gz +0 -0
  371. package/web/chunk-qx7afyba.js +1 -0
  372. package/web/chunk-qx7afyba.js.br +0 -0
  373. package/web/chunk-qx7afyba.js.gz +0 -0
  374. package/web/chunk-rcaqmcm4.js +40 -0
  375. package/web/chunk-rcaqmcm4.js.br +0 -0
  376. package/web/chunk-rcaqmcm4.js.gz +0 -0
  377. package/web/chunk-s5kbbker.js +89 -0
  378. package/web/chunk-s5kbbker.js.br +0 -0
  379. package/web/chunk-s5kbbker.js.gz +0 -0
  380. package/web/chunk-sdq69ysp.js +2 -0
  381. package/web/chunk-sdq69ysp.js.br +0 -0
  382. package/web/chunk-sdq69ysp.js.gz +0 -0
  383. package/web/chunk-sk0cmsbx.js +7 -0
  384. package/web/chunk-sk0cmsbx.js.br +0 -0
  385. package/web/chunk-sk0cmsbx.js.gz +0 -0
  386. package/web/chunk-smmcx1z4.js +324 -0
  387. package/web/chunk-smmcx1z4.js.br +0 -0
  388. package/web/chunk-smmcx1z4.js.gz +0 -0
  389. package/web/chunk-sq7ntjp0.js +16 -0
  390. package/web/chunk-sq7ntjp0.js.br +0 -0
  391. package/web/chunk-sq7ntjp0.js.gz +0 -0
  392. package/web/chunk-st27df9w.js +2 -0
  393. package/web/chunk-st27df9w.js.br +0 -0
  394. package/web/chunk-st27df9w.js.gz +0 -0
  395. package/web/chunk-svxkg8n3.js +2 -0
  396. package/web/chunk-svxkg8n3.js.br +0 -0
  397. package/web/chunk-svxkg8n3.js.gz +0 -0
  398. package/web/chunk-t9nzrp2p.js +1 -0
  399. package/web/chunk-t9nzrp2p.js.br +0 -0
  400. package/web/chunk-t9nzrp2p.js.gz +0 -0
  401. package/web/chunk-t9t9v1r8.js +55 -0
  402. package/web/chunk-t9t9v1r8.js.br +0 -0
  403. package/web/chunk-t9t9v1r8.js.gz +0 -0
  404. package/web/chunk-tzpv48j3.js +2 -0
  405. package/web/chunk-tzpv48j3.js.br +0 -0
  406. package/web/chunk-tzpv48j3.js.gz +0 -0
  407. package/web/chunk-vgsk4ppw.js +7 -0
  408. package/web/chunk-vgsk4ppw.js.br +0 -0
  409. package/web/chunk-vgsk4ppw.js.gz +0 -0
  410. package/web/chunk-vq41ta7n.js +4 -0
  411. package/web/chunk-vq41ta7n.js.br +0 -0
  412. package/web/chunk-vq41ta7n.js.gz +0 -0
  413. package/web/chunk-w08egbqf.js +1 -0
  414. package/web/chunk-w08egbqf.js.br +0 -0
  415. package/web/chunk-w08egbqf.js.gz +0 -0
  416. package/web/chunk-wcmq0qgh.js +1 -0
  417. package/web/chunk-wcmq0qgh.js.br +0 -0
  418. package/web/chunk-wcmq0qgh.js.gz +0 -0
  419. package/web/chunk-wctq02yb.js +2 -0
  420. package/web/chunk-wctq02yb.js.br +0 -0
  421. package/web/chunk-wctq02yb.js.gz +0 -0
  422. package/web/chunk-wfwadf3r.js +2 -0
  423. package/web/chunk-wfwadf3r.js.br +0 -0
  424. package/web/chunk-wfwadf3r.js.gz +0 -0
  425. package/web/chunk-wgas5t5y.js +1 -0
  426. package/web/chunk-wgas5t5y.js.br +0 -0
  427. package/web/chunk-wgas5t5y.js.gz +0 -0
  428. package/web/chunk-x7k4eyee.js +21 -0
  429. package/web/chunk-x7k4eyee.js.br +0 -0
  430. package/web/chunk-x7k4eyee.js.gz +0 -0
  431. package/web/chunk-xpv38q1f.js +140 -0
  432. package/web/chunk-xpv38q1f.js.br +0 -0
  433. package/web/chunk-xpv38q1f.js.gz +0 -0
  434. package/web/chunk-xt671z8e.js +1 -0
  435. package/web/chunk-xt671z8e.js.br +0 -0
  436. package/web/chunk-xt671z8e.js.gz +0 -0
  437. package/web/chunk-xwrrkwwx.css +1 -0
  438. package/web/chunk-xwrrkwwx.css.br +0 -0
  439. package/web/chunk-xwrrkwwx.css.gz +0 -0
  440. package/web/chunk-xwy3gth5.js +89 -0
  441. package/web/chunk-xwy3gth5.js.br +0 -0
  442. package/web/chunk-xwy3gth5.js.gz +0 -0
  443. package/web/chunk-xwyadj9p.js +2 -0
  444. package/web/chunk-xwyadj9p.js.br +0 -0
  445. package/web/chunk-xwyadj9p.js.gz +0 -0
  446. package/web/chunk-xzgvnd23.js +1 -0
  447. package/web/chunk-xzgvnd23.js.br +0 -0
  448. package/web/chunk-xzgvnd23.js.gz +0 -0
  449. package/web/chunk-y05m6rvz.js +1 -0
  450. package/web/chunk-y05m6rvz.js.br +2 -0
  451. package/web/chunk-y05m6rvz.js.gz +0 -0
  452. package/web/chunk-z51mtwh3.js +169 -0
  453. package/web/chunk-z51mtwh3.js.br +0 -0
  454. package/web/chunk-z51mtwh3.js.gz +0 -0
  455. package/web/chunk-z77xrqc1.js +1 -0
  456. package/web/chunk-z77xrqc1.js.br +0 -0
  457. package/web/chunk-z77xrqc1.js.gz +0 -0
  458. package/web/chunk-z946nbmn.js +2 -0
  459. package/web/chunk-z946nbmn.js.br +0 -0
  460. package/web/chunk-z946nbmn.js.gz +0 -0
  461. package/web/index.html +1 -1
  462. package/web/index.html.br +0 -0
  463. package/web/index.html.gz +0 -0
  464. package/worker.js +1 -1
  465. package/chunk-06s9pr82.js +0 -3
  466. package/chunk-0crbhhna.js +0 -2
  467. package/chunk-1c9nr9rs.js +0 -5
  468. package/chunk-1w4nh5t6.js +0 -5
  469. package/chunk-2eaehpp6.js +0 -9
  470. package/chunk-30dxcr91.js +0 -7
  471. package/chunk-37ndxehw.js +0 -3
  472. package/chunk-38g4jd6v.js +0 -5
  473. package/chunk-44a7f5ta.js +0 -25
  474. package/chunk-44b9yx79.js +0 -2
  475. package/chunk-46vy2m29.js +0 -2
  476. package/chunk-4f6p4n7k.js +0 -3
  477. package/chunk-4hf0r9hv.js +0 -12
  478. package/chunk-4w8j6n7z.js +0 -2
  479. package/chunk-4yxd2kg1.js +0 -3
  480. package/chunk-62ebm0bn.js +0 -2
  481. package/chunk-6ae9810t.js +0 -25
  482. package/chunk-6ef085c1.js +0 -20
  483. package/chunk-6exa9fp7.js +0 -3
  484. package/chunk-73t051r6.js +0 -2
  485. package/chunk-7mgkpn94.js +0 -59
  486. package/chunk-86yr2c0r.js +0 -3
  487. package/chunk-8jn0yax5.js +0 -482
  488. package/chunk-8np9b2y8.js +0 -3
  489. package/chunk-8r4baw9e.js +0 -3
  490. package/chunk-9ew8cap5.js +0 -3
  491. package/chunk-9jtvj8md.js +0 -4172
  492. package/chunk-9vam83py.js +0 -2
  493. package/chunk-9xjecw6c.js +0 -2
  494. package/chunk-b2wpj81x.js +0 -3
  495. package/chunk-b350b01x.js +0 -12
  496. package/chunk-bjvv3403.js +0 -2
  497. package/chunk-bv96b8q7.js +0 -2
  498. package/chunk-c8g9jjqs.js +0 -3
  499. package/chunk-cs91rmbf.js +0 -18
  500. package/chunk-drett6hb.js +0 -2
  501. package/chunk-e8x8zwkg.js +0 -3
  502. package/chunk-ehnc8g6v.js +0 -7
  503. package/chunk-evnqkyt7.js +0 -16
  504. package/chunk-fzftb4n2.js +0 -10
  505. package/chunk-g2etemv5.js +0 -3
  506. package/chunk-g5p9mj1r.js +0 -3
  507. package/chunk-ge38dhv9.js +0 -3
  508. package/chunk-hggam3je.js +0 -2
  509. package/chunk-m5km74eq.js +0 -8
  510. package/chunk-mh4bjtfs.js +0 -11
  511. package/chunk-nrdszs0g.js +0 -5
  512. package/chunk-p78wde92.js +0 -3
  513. package/chunk-pdt65s31.js +0 -3
  514. package/chunk-pjgt1bdx.js +0 -3
  515. package/chunk-pna1wh02.js +0 -39
  516. package/chunk-pyj6avd5.js +0 -3
  517. package/chunk-q6tgpaf3.js +0 -2
  518. package/chunk-qd2enpr2.js +0 -3
  519. package/chunk-rghqprav.js +0 -2
  520. package/chunk-rqn67tm8.js +0 -2
  521. package/chunk-t33bm5aa.js +0 -2
  522. package/chunk-tfhp09nj.js +0 -3
  523. package/chunk-v9ttcf6r.js +0 -3
  524. package/chunk-vd5332ps.js +0 -2
  525. package/chunk-vqm94hz2.js +0 -3
  526. package/chunk-vv9csar7.js +0 -2
  527. package/chunk-w55cnj0f.js +0 -3
  528. package/chunk-wnd3y4c0.js +0 -10
  529. package/chunk-xafx1p7z.js +0 -3
  530. package/chunk-xba6fr5v.js +0 -2
  531. package/chunk-xf7zw32f.js +0 -31
  532. package/chunk-y0274xr2.js +0 -7
  533. package/chunk-ypxs8djn.js +0 -2
  534. package/chunk-zcwz44db.js +0 -2
  535. package/chunk-zhyzhekt.js +0 -2
  536. package/web/chunk-013et20n.js +0 -2
  537. package/web/chunk-013et20n.js.br +0 -0
  538. package/web/chunk-013et20n.js.gz +0 -0
  539. package/web/chunk-0ernj3c0.js +0 -1
  540. package/web/chunk-0ernj3c0.js.br +0 -0
  541. package/web/chunk-0ernj3c0.js.gz +0 -0
  542. package/web/chunk-0j65yg1p.js +0 -1
  543. package/web/chunk-0j65yg1p.js.br +0 -0
  544. package/web/chunk-0j65yg1p.js.gz +0 -0
  545. package/web/chunk-0khcpaa8.js +0 -1
  546. package/web/chunk-0khcpaa8.js.br +0 -0
  547. package/web/chunk-0khcpaa8.js.gz +0 -0
  548. package/web/chunk-0wbdd74r.js +0 -1
  549. package/web/chunk-0wbdd74r.js.br +0 -2
  550. package/web/chunk-0wbdd74r.js.gz +0 -0
  551. package/web/chunk-1f2wvhq9.js +0 -1
  552. package/web/chunk-1f2wvhq9.js.br +0 -0
  553. package/web/chunk-1f2wvhq9.js.gz +0 -0
  554. package/web/chunk-1q2kmv35.js +0 -332
  555. package/web/chunk-1q2kmv35.js.br +0 -0
  556. package/web/chunk-1q2kmv35.js.gz +0 -0
  557. package/web/chunk-1tfrm3pk.js +0 -2
  558. package/web/chunk-1tfrm3pk.js.br +0 -0
  559. package/web/chunk-1tfrm3pk.js.gz +0 -0
  560. package/web/chunk-2qt5fy5n.js +0 -1
  561. package/web/chunk-2qt5fy5n.js.br +0 -0
  562. package/web/chunk-2qt5fy5n.js.gz +0 -0
  563. package/web/chunk-2sxtb709.js +0 -1
  564. package/web/chunk-2sxtb709.js.br +0 -0
  565. package/web/chunk-2sxtb709.js.gz +0 -0
  566. package/web/chunk-2wrwm0qe.js +0 -1
  567. package/web/chunk-2wrwm0qe.js.br +0 -0
  568. package/web/chunk-2wrwm0qe.js.gz +0 -0
  569. package/web/chunk-2wwj27b9.js +0 -7
  570. package/web/chunk-2wwj27b9.js.br +0 -0
  571. package/web/chunk-2wwj27b9.js.gz +0 -0
  572. package/web/chunk-33mmrjdp.js +0 -1
  573. package/web/chunk-33mmrjdp.js.br +0 -2
  574. package/web/chunk-33mmrjdp.js.gz +0 -0
  575. package/web/chunk-33tb7q04.js +0 -2
  576. package/web/chunk-33tb7q04.js.br +0 -0
  577. package/web/chunk-33tb7q04.js.gz +0 -0
  578. package/web/chunk-3txb4sha.js +0 -1
  579. package/web/chunk-3txb4sha.js.br +0 -0
  580. package/web/chunk-3txb4sha.js.gz +0 -0
  581. package/web/chunk-3xgfsx7y.js +0 -2
  582. package/web/chunk-3xgfsx7y.js.br +0 -0
  583. package/web/chunk-3xgfsx7y.js.gz +0 -0
  584. package/web/chunk-40jka4r7.js +0 -2
  585. package/web/chunk-40jka4r7.js.br +0 -0
  586. package/web/chunk-40jka4r7.js.gz +0 -0
  587. package/web/chunk-41vh5n86.js +0 -1
  588. package/web/chunk-41vh5n86.js.br +0 -0
  589. package/web/chunk-41vh5n86.js.gz +0 -0
  590. package/web/chunk-5kz048x3.js +0 -2
  591. package/web/chunk-5kz048x3.js.br +0 -0
  592. package/web/chunk-5kz048x3.js.gz +0 -0
  593. package/web/chunk-5mbz8yj9.js +0 -3
  594. package/web/chunk-5mbz8yj9.js.br +0 -0
  595. package/web/chunk-5mbz8yj9.js.gz +0 -0
  596. package/web/chunk-6024wfxb.js +0 -30
  597. package/web/chunk-6024wfxb.js.br +0 -0
  598. package/web/chunk-6024wfxb.js.gz +0 -0
  599. package/web/chunk-6ey4c6gw.js +0 -2
  600. package/web/chunk-6ey4c6gw.js.br +0 -0
  601. package/web/chunk-6ey4c6gw.js.gz +0 -0
  602. package/web/chunk-6q3p851n.js +0 -1
  603. package/web/chunk-6q3p851n.js.br +0 -2
  604. package/web/chunk-6q3p851n.js.gz +0 -0
  605. package/web/chunk-74g3wh08.js +0 -2
  606. package/web/chunk-74g3wh08.js.br +0 -0
  607. package/web/chunk-74g3wh08.js.gz +0 -0
  608. package/web/chunk-78akzkgs.js +0 -84
  609. package/web/chunk-78akzkgs.js.br +0 -0
  610. package/web/chunk-78akzkgs.js.gz +0 -0
  611. package/web/chunk-7ck99bsp.js +0 -62
  612. package/web/chunk-7ck99bsp.js.br +0 -0
  613. package/web/chunk-7ck99bsp.js.gz +0 -0
  614. package/web/chunk-7fjbyns9.js +0 -1
  615. package/web/chunk-7fjbyns9.js.br +0 -0
  616. package/web/chunk-7fjbyns9.js.gz +0 -0
  617. package/web/chunk-7n6b2xra.js +0 -21
  618. package/web/chunk-7n6b2xra.js.br +0 -0
  619. package/web/chunk-7n6b2xra.js.gz +0 -0
  620. package/web/chunk-7p4mcqkd.js +0 -78
  621. package/web/chunk-7p4mcqkd.js.br +0 -0
  622. package/web/chunk-7p4mcqkd.js.gz +0 -0
  623. package/web/chunk-7ztwkhg5.js +0 -1
  624. package/web/chunk-7ztwkhg5.js.br +0 -0
  625. package/web/chunk-7ztwkhg5.js.gz +0 -0
  626. package/web/chunk-823etvc3.js +0 -99
  627. package/web/chunk-823etvc3.js.br +0 -0
  628. package/web/chunk-823etvc3.js.gz +0 -0
  629. package/web/chunk-8ec53vjd.js +0 -1
  630. package/web/chunk-8ec53vjd.js.br +0 -0
  631. package/web/chunk-8ec53vjd.js.gz +0 -0
  632. package/web/chunk-8g55ytgz.js +0 -1
  633. package/web/chunk-8g55ytgz.js.br +0 -0
  634. package/web/chunk-8g55ytgz.js.gz +0 -0
  635. package/web/chunk-8q76yd76.js +0 -291
  636. package/web/chunk-8q76yd76.js.br +0 -0
  637. package/web/chunk-8q76yd76.js.gz +0 -0
  638. package/web/chunk-9kbrjmtz.js +0 -1
  639. package/web/chunk-9kbrjmtz.js.br +0 -0
  640. package/web/chunk-9kbrjmtz.js.gz +0 -0
  641. package/web/chunk-9s4bh6qm.js +0 -40
  642. package/web/chunk-9s4bh6qm.js.br +0 -0
  643. package/web/chunk-9s4bh6qm.js.gz +0 -0
  644. package/web/chunk-a449xjq6.js +0 -7
  645. package/web/chunk-a449xjq6.js.br +0 -0
  646. package/web/chunk-a449xjq6.js.gz +0 -0
  647. package/web/chunk-b05eay33.js +0 -1
  648. package/web/chunk-b05eay33.js.br +0 -0
  649. package/web/chunk-b05eay33.js.gz +0 -0
  650. package/web/chunk-bdypt5mj.js +0 -142
  651. package/web/chunk-bdypt5mj.js.br +0 -0
  652. package/web/chunk-bdypt5mj.js.gz +0 -0
  653. package/web/chunk-ccy2q2z0.js +0 -2
  654. package/web/chunk-ccy2q2z0.js.br +0 -0
  655. package/web/chunk-ccy2q2z0.js.gz +0 -0
  656. package/web/chunk-ceg13tma.js +0 -2
  657. package/web/chunk-ceg13tma.js.br +0 -0
  658. package/web/chunk-ceg13tma.js.gz +0 -0
  659. package/web/chunk-ch60a61d.js +0 -2
  660. package/web/chunk-ch60a61d.js.br +0 -0
  661. package/web/chunk-ch60a61d.js.gz +0 -0
  662. package/web/chunk-czvdg0c5.js +0 -1
  663. package/web/chunk-czvdg0c5.js.br +0 -0
  664. package/web/chunk-czvdg0c5.js.gz +0 -0
  665. package/web/chunk-dsa5m3h6.js +0 -200
  666. package/web/chunk-dsa5m3h6.js.br +0 -0
  667. package/web/chunk-dsa5m3h6.js.gz +0 -0
  668. package/web/chunk-dww3grm3.js +0 -24
  669. package/web/chunk-dww3grm3.js.br +0 -0
  670. package/web/chunk-dww3grm3.js.gz +0 -0
  671. package/web/chunk-e187gt5x.js +0 -1
  672. package/web/chunk-e187gt5x.js.br +0 -0
  673. package/web/chunk-e187gt5x.js.gz +0 -0
  674. package/web/chunk-ey0zwvbx.js +0 -1
  675. package/web/chunk-ey0zwvbx.js.br +0 -0
  676. package/web/chunk-ey0zwvbx.js.gz +0 -0
  677. package/web/chunk-ey14knbn.js +0 -2
  678. package/web/chunk-ey14knbn.js.br +0 -0
  679. package/web/chunk-ey14knbn.js.gz +0 -0
  680. package/web/chunk-fba06jm8.js +0 -1132
  681. package/web/chunk-fba06jm8.js.br +0 -0
  682. package/web/chunk-fba06jm8.js.gz +0 -0
  683. package/web/chunk-fh56vgfx.js +0 -39
  684. package/web/chunk-fh56vgfx.js.br +0 -0
  685. package/web/chunk-fh56vgfx.js.gz +0 -0
  686. package/web/chunk-ft05x3my.js +0 -169
  687. package/web/chunk-ft05x3my.js.br +0 -0
  688. package/web/chunk-ft05x3my.js.gz +0 -0
  689. package/web/chunk-fzmrnh17.js +0 -303
  690. package/web/chunk-fzmrnh17.js.br +0 -0
  691. package/web/chunk-fzmrnh17.js.gz +0 -0
  692. package/web/chunk-gbt7asd7.js +0 -2
  693. package/web/chunk-gbt7asd7.js.br +0 -0
  694. package/web/chunk-gbt7asd7.js.gz +0 -0
  695. package/web/chunk-gh9fkn3t.js +0 -1
  696. package/web/chunk-gh9fkn3t.js.br +0 -2
  697. package/web/chunk-gh9fkn3t.js.gz +0 -0
  698. package/web/chunk-h1syyjqq.js +0 -2
  699. package/web/chunk-h1syyjqq.js.br +0 -0
  700. package/web/chunk-h1syyjqq.js.gz +0 -0
  701. package/web/chunk-h7byk4z3.js +0 -140
  702. package/web/chunk-h7byk4z3.js.br +0 -0
  703. package/web/chunk-h7byk4z3.js.gz +0 -0
  704. package/web/chunk-hby0hkv4.js +0 -1
  705. package/web/chunk-hby0hkv4.js.br +0 -0
  706. package/web/chunk-hby0hkv4.js.gz +0 -0
  707. package/web/chunk-hjvsp2yx.js +0 -1
  708. package/web/chunk-hjvsp2yx.js.br +0 -0
  709. package/web/chunk-hjvsp2yx.js.gz +0 -0
  710. package/web/chunk-hpjzy5ww.js +0 -1
  711. package/web/chunk-hpjzy5ww.js.br +0 -0
  712. package/web/chunk-hpjzy5ww.js.gz +0 -0
  713. package/web/chunk-hzfp8kqx.js +0 -217
  714. package/web/chunk-hzfp8kqx.js.br +0 -0
  715. package/web/chunk-hzfp8kqx.js.gz +0 -0
  716. package/web/chunk-j8f0m1dq.js +0 -1
  717. package/web/chunk-j8f0m1dq.js.br +0 -0
  718. package/web/chunk-j8f0m1dq.js.gz +0 -0
  719. package/web/chunk-jc178ad5.js +0 -2
  720. package/web/chunk-jc178ad5.js.br +0 -0
  721. package/web/chunk-jc178ad5.js.gz +0 -0
  722. package/web/chunk-jcsf0ke5.js +0 -41
  723. package/web/chunk-jcsf0ke5.js.br +0 -0
  724. package/web/chunk-jcsf0ke5.js.gz +0 -0
  725. package/web/chunk-jg43a2xk.js +0 -139
  726. package/web/chunk-jg43a2xk.js.br +0 -0
  727. package/web/chunk-jg43a2xk.js.gz +0 -0
  728. package/web/chunk-jrgdxqtq.js +0 -7
  729. package/web/chunk-jrgdxqtq.js.br +0 -0
  730. package/web/chunk-jrgdxqtq.js.gz +0 -0
  731. package/web/chunk-js8dvtfg.js +0 -2
  732. package/web/chunk-js8dvtfg.js.br +0 -0
  733. package/web/chunk-js8dvtfg.js.gz +0 -0
  734. package/web/chunk-jt0s9qs7.js +0 -1
  735. package/web/chunk-jt0s9qs7.js.br +0 -0
  736. package/web/chunk-jt0s9qs7.js.gz +0 -0
  737. package/web/chunk-jv5faf88.js +0 -34
  738. package/web/chunk-jv5faf88.js.br +0 -0
  739. package/web/chunk-jv5faf88.js.gz +0 -0
  740. package/web/chunk-k295x81w.js +0 -370
  741. package/web/chunk-k295x81w.js.br +0 -0
  742. package/web/chunk-k295x81w.js.gz +0 -0
  743. package/web/chunk-k6wxwgp1.js +0 -55
  744. package/web/chunk-k6wxwgp1.js.br +0 -0
  745. package/web/chunk-k6wxwgp1.js.gz +0 -0
  746. package/web/chunk-k9vc7kp2.js +0 -292
  747. package/web/chunk-k9vc7kp2.js.br +0 -0
  748. package/web/chunk-k9vc7kp2.js.gz +0 -0
  749. package/web/chunk-kxyws7q7.js +0 -1
  750. package/web/chunk-kxyws7q7.js.br +0 -0
  751. package/web/chunk-kxyws7q7.js.gz +0 -0
  752. package/web/chunk-mcgf645h.js +0 -1
  753. package/web/chunk-mcgf645h.js.br +0 -4
  754. package/web/chunk-mcgf645h.js.gz +0 -0
  755. package/web/chunk-mj3tshy8.js +0 -214
  756. package/web/chunk-mj3tshy8.js.br +0 -0
  757. package/web/chunk-mj3tshy8.js.gz +0 -0
  758. package/web/chunk-mnb2wdvy.js +0 -24
  759. package/web/chunk-mnb2wdvy.js.br +0 -0
  760. package/web/chunk-mnb2wdvy.js.gz +0 -0
  761. package/web/chunk-ndf58dgc.js +0 -1
  762. package/web/chunk-ndf58dgc.js.br +0 -0
  763. package/web/chunk-ndf58dgc.js.gz +0 -0
  764. package/web/chunk-nhpm5nd5.js +0 -2
  765. package/web/chunk-nhpm5nd5.js.br +0 -0
  766. package/web/chunk-nhpm5nd5.js.gz +0 -0
  767. package/web/chunk-nwxjdetb.js +0 -1
  768. package/web/chunk-nwxjdetb.js.br +0 -0
  769. package/web/chunk-nwxjdetb.js.gz +0 -0
  770. package/web/chunk-nyjfcard.js +0 -106
  771. package/web/chunk-nyjfcard.js.br +0 -0
  772. package/web/chunk-nyjfcard.js.gz +0 -0
  773. package/web/chunk-pcfjcy3a.js +0 -324
  774. package/web/chunk-pcfjcy3a.js.br +0 -0
  775. package/web/chunk-pcfjcy3a.js.gz +0 -0
  776. package/web/chunk-pry6wdbe.js +0 -1
  777. package/web/chunk-pry6wdbe.js.br +0 -0
  778. package/web/chunk-pry6wdbe.js.gz +0 -0
  779. package/web/chunk-pvahdcgy.js +0 -2
  780. package/web/chunk-pvahdcgy.js.br +0 -0
  781. package/web/chunk-pvahdcgy.js.gz +0 -0
  782. package/web/chunk-q3njnnef.js +0 -16
  783. package/web/chunk-q3njnnef.js.br +0 -0
  784. package/web/chunk-q3njnnef.js.gz +0 -0
  785. package/web/chunk-rbmp2e4b.js +0 -1
  786. package/web/chunk-rbmp2e4b.js.br +0 -0
  787. package/web/chunk-rbmp2e4b.js.gz +0 -0
  788. package/web/chunk-rcre1stj.js +0 -1
  789. package/web/chunk-rcre1stj.js.br +0 -0
  790. package/web/chunk-rcre1stj.js.gz +0 -0
  791. package/web/chunk-rdb6091n.js +0 -89
  792. package/web/chunk-rdb6091n.js.br +0 -0
  793. package/web/chunk-rdb6091n.js.gz +0 -0
  794. package/web/chunk-ryw7xnab.js +0 -1
  795. package/web/chunk-ryw7xnab.js.br +0 -0
  796. package/web/chunk-ryw7xnab.js.gz +0 -0
  797. package/web/chunk-sbbmy02e.js +0 -2
  798. package/web/chunk-sbbmy02e.js.br +0 -0
  799. package/web/chunk-sbbmy02e.js.gz +0 -0
  800. package/web/chunk-sydy10mb.js +0 -1
  801. package/web/chunk-sydy10mb.js.br +0 -0
  802. package/web/chunk-sydy10mb.js.gz +0 -0
  803. package/web/chunk-t0ywnp5e.js +0 -1
  804. package/web/chunk-t0ywnp5e.js.br +0 -0
  805. package/web/chunk-t0ywnp5e.js.gz +0 -0
  806. package/web/chunk-t72jq97z.js +0 -2
  807. package/web/chunk-t72jq97z.js.br +0 -0
  808. package/web/chunk-t72jq97z.js.gz +0 -0
  809. package/web/chunk-tfcc9bcz.js +0 -4
  810. package/web/chunk-tfcc9bcz.js.br +0 -0
  811. package/web/chunk-tfcc9bcz.js.gz +0 -0
  812. package/web/chunk-v2bvbgfc.js +0 -2
  813. package/web/chunk-v2bvbgfc.js.br +0 -0
  814. package/web/chunk-v2bvbgfc.js.gz +0 -0
  815. package/web/chunk-v7zq4vc9.js +0 -12
  816. package/web/chunk-v7zq4vc9.js.br +0 -0
  817. package/web/chunk-v7zq4vc9.js.gz +0 -0
  818. package/web/chunk-vh8pkcem.css +0 -1
  819. package/web/chunk-vh8pkcem.css.br +0 -0
  820. package/web/chunk-vh8pkcem.css.gz +0 -0
  821. package/web/chunk-vq3sby7x.js +0 -1
  822. package/web/chunk-vq3sby7x.js.br +0 -0
  823. package/web/chunk-vq3sby7x.js.gz +0 -0
  824. package/web/chunk-was9xf03.js +0 -8
  825. package/web/chunk-was9xf03.js.br +0 -0
  826. package/web/chunk-was9xf03.js.gz +0 -0
  827. package/web/chunk-we1v1829.js +0 -2
  828. package/web/chunk-we1v1829.js.br +0 -0
  829. package/web/chunk-we1v1829.js.gz +0 -0
  830. package/web/chunk-wg2exnxe.js +0 -1
  831. package/web/chunk-wg2exnxe.js.br +0 -2
  832. package/web/chunk-wg2exnxe.js.gz +0 -0
  833. package/web/chunk-wvd3zj1m.js +0 -70
  834. package/web/chunk-wvd3zj1m.js.br +0 -0
  835. package/web/chunk-wvd3zj1m.js.gz +0 -0
  836. package/web/chunk-wzmxtr30.js +0 -1
  837. package/web/chunk-wzmxtr30.js.br +0 -0
  838. package/web/chunk-wzmxtr30.js.gz +0 -0
  839. package/web/chunk-x815g7yp.js +0 -1
  840. package/web/chunk-x815g7yp.js.br +0 -0
  841. package/web/chunk-x815g7yp.js.gz +0 -0
  842. package/web/chunk-x8ps0p82.js +0 -98
  843. package/web/chunk-x8ps0p82.js.br +0 -0
  844. package/web/chunk-x8ps0p82.js.gz +0 -0
  845. package/web/chunk-xea3snym.js +0 -1
  846. package/web/chunk-xea3snym.js.br +0 -0
  847. package/web/chunk-xea3snym.js.gz +0 -0
  848. package/web/chunk-xg4v60m7.js +0 -1
  849. package/web/chunk-xg4v60m7.js.br +0 -0
  850. package/web/chunk-xg4v60m7.js.gz +0 -0
  851. package/web/chunk-xhr9jrjt.js +0 -89
  852. package/web/chunk-xhr9jrjt.js.br +0 -0
  853. package/web/chunk-xhr9jrjt.js.gz +0 -0
  854. package/web/chunk-xp90g2e7.js +0 -36
  855. package/web/chunk-xp90g2e7.js.br +0 -0
  856. package/web/chunk-xp90g2e7.js.gz +0 -0
  857. package/web/chunk-xs1g97qa.js +0 -2
  858. package/web/chunk-xs1g97qa.js.br +0 -0
  859. package/web/chunk-xs1g97qa.js.gz +0 -0
  860. package/web/chunk-xyk1wpr4.js +0 -1
  861. package/web/chunk-xyk1wpr4.js.br +0 -3
  862. package/web/chunk-xyk1wpr4.js.gz +0 -0
  863. package/web/chunk-yavbdwyt.js +0 -1
  864. package/web/chunk-yavbdwyt.js.br +0 -0
  865. package/web/chunk-yavbdwyt.js.gz +0 -0
  866. package/web/chunk-yfnhnsxe.js +0 -4
  867. package/web/chunk-yfnhnsxe.js.br +0 -0
  868. package/web/chunk-yfnhnsxe.js.gz +0 -0
  869. package/web/chunk-yk965yth.js +0 -1
  870. package/web/chunk-yk965yth.js.br +0 -0
  871. package/web/chunk-yk965yth.js.gz +0 -0
  872. package/web/chunk-ynhcjhsx.js +0 -2
  873. package/web/chunk-ynhcjhsx.js.br +0 -0
  874. package/web/chunk-ynhcjhsx.js.gz +0 -0
  875. package/web/chunk-ypmm1gts.js +0 -1
  876. package/web/chunk-ypmm1gts.js.br +0 -0
  877. package/web/chunk-ypmm1gts.js.gz +0 -0
  878. package/web/chunk-yssx5a5q.js +0 -1
  879. package/web/chunk-yssx5a5q.js.br +0 -0
  880. package/web/chunk-yssx5a5q.js.gz +0 -0
  881. package/web/chunk-z0a8cnq8.js +0 -1
  882. package/web/chunk-z0a8cnq8.js.br +0 -0
  883. package/web/chunk-z0a8cnq8.js.gz +0 -0
  884. package/web/chunk-z1afsvbv.js +0 -2
  885. package/web/chunk-z1afsvbv.js.br +0 -0
  886. package/web/chunk-z1afsvbv.js.gz +0 -0
  887. package/web/chunk-z1ka8jtd.js +0 -2
  888. package/web/chunk-z1ka8jtd.js.br +0 -0
  889. package/web/chunk-z1ka8jtd.js.gz +0 -0
  890. package/web/chunk-z7tdzen9.js +0 -1
  891. package/web/chunk-z7tdzen9.js.br +0 -0
  892. package/web/chunk-z7tdzen9.js.gz +0 -0
  893. package/web/chunk-zbwjj06m.js +0 -38
  894. package/web/chunk-zbwjj06m.js.br +0 -0
  895. package/web/chunk-zbwjj06m.js.gz +0 -0
  896. package/web/chunk-zd2j189j.js +0 -1
  897. package/web/chunk-zd2j189j.js.br +0 -0
  898. package/web/chunk-zd2j189j.js.gz +0 -0
  899. package/web/chunk-zfgpq4n4.js +0 -120
  900. package/web/chunk-zfgpq4n4.js.br +0 -0
  901. package/web/chunk-zfgpq4n4.js.gz +0 -0
  902. package/web/chunk-zgas56xw.js +0 -1
  903. package/web/chunk-zgas56xw.js.br +0 -0
  904. package/web/chunk-zgas56xw.js.gz +0 -0
  905. package/web/chunk-zkfepf91.js +0 -1
  906. package/web/chunk-zkfepf91.js.br +0 -0
  907. package/web/chunk-zkfepf91.js.gz +0 -0
package/README.md CHANGED
@@ -62,7 +62,7 @@ cli ──► builtins ──► plugin ──► core ──► protocol
62
62
  | `goal` | 持久目标 | 提供 `goal_create` / `goal_get` / `goal_update` 工具与目标状态栏,支持会话级长周期目标追踪、Token 预算控制、耗时统计与自动续跑审计。 |
63
63
  | `imagegen` | 图像生成 | 提供 `image_generation` 延迟工具与配套 `imagegen` 技能指南,支持文生图与基于参考图的视觉编辑。 |
64
64
  | `markdown-graph` | 图表渲染 | 将回复中的 `mermaid` 代码块实时渲染为流程图/时序图,将 `echarts` 代码块渲染为交互式数据图表。 |
65
- | `mcp` | MCP 集成 | 管理全局与项目级(`.mcp.json`)Model Context Protocol 服务器连接、OAuth 认证、工具快照同步及设置页管理视图。 |
65
+ | `mcp` | MCP 集成 | 管理全局与项目级(`.mcp.json`)Model Context Protocol 服务器连接、OAuth 认证、工具快照同步及设置页管理视图;模型可经内置 `basalt_mcp` 工具直接安装与运维服务器。 |
66
66
  | `prompt-optimizer` | 提示词优化 | 在输入框提供草稿澄清与优化能力,使用显式选择的模型在独立请求中改写提示词,不污染当前会话历史。 |
67
67
  | `question` | 交互提问 | 提供主会话 `question` 工具、输入等待闸门(`waiting_user`)与交互式提问面板,支持单选、多选与自定义补充回答。 |
68
68
  | `session-ops` | 会话操作 | 提供会话复制(`duplicate`)、任意序号分叉(`fork`)、历史消息编辑(`edit`)与破坏性重放(`replay`)路由、命令及确认交互。 |
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ function J(r){let e={};for(let[n,o]of r.entries())e[n]=o;return e}function xe(...r){let e=new Map;for(let n of r)for(let[o,t]of Object.entries(n??{})){let s=o.toLowerCase();if(e.delete(s),t!==null)e.set(s,[o,t])}return e.size>0?Object.fromEntries(e.values()):void 0}
3
+ export{J,xe};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ur,Fo}from"./chunk-adq8c7vt.js";import"./chunk-jbk2tmza.js";export{ur as stream,Fo as streamSimple};
@@ -0,0 +1,8 @@
1
+ // @bun
2
+ import{z}from"./chunk-jbk2tmza.js";import{A}from"./chunk-ne94brn4.js";import{J,xe}from"./chunk-0b2brwjc.js";import{F,Zt,Ie}from"./chunk-tdnwaaw4.js";class u extends Error{code;diagnosticDetails;constructor(r,t,n){super(r);this.name="PiMessagesResponseError",this.code=t,this.diagnosticDetails=n}}function x(r){try{let t=JSON.parse(r),n=t?.error;return t&&typeof n==="object"&&n!==null&&!Array.isArray(n)?t:void 0}catch{return}}function m(r){return r.length>8192?`${r.slice(0,8192)}\u2026`:r}function y(r,t,n){let e=typeof n?.error?.message==="string"?n.error.message:void 0,s=typeof n?.error?.code==="string"?n.error.code:void 0,a=e??t,o=s?` (${s})`:"";return`${r.status} ${r.statusText}: ${a}${o}`}function k(r,t,n,e){let s=x(e),a=typeof s?.error?.code==="string"?s.error.code:void 0;return new u(y(n,e,s),a,{version:1,provider:r.provider,model:r.id,url:t.toString(),status:n.status,statusText:n.statusText,...s?.error===void 0?{}:{error:s.error},...s?{}:{body:m(e)},timestampMs:Date.now()})}function h(){return{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}}}function l(r,t){if(!t)return;Ie(r,{type:"pi_messages_rewrite",timestamp:Date.now(),details:{...t}})}function w(r){let t={role:"assistant",content:[],api:r.api,provider:r.provider,model:r.id,usage:h(),stopReason:"pending",timestamp:Date.now()},n=new Map;return(e)=>{switch(e.type){case"done":if(Object.assign(t,{stopReason:e.reason,usage:e.usage,responseId:e.responseId}),e.providerThinkingLevel!==void 0)t.providerThinkingLevel=e.providerThinkingLevel;return l(t,e.rewrite),{type:"done",reason:e.reason,message:t};case"error":if(Object.assign(t,{stopReason:e.reason,usage:e.usage,errorMessage:e.errorMessage,responseId:e.responseId}),e.providerThinkingLevel!==void 0)t.providerThinkingLevel=e.providerThinkingLevel;return l(t,e.rewrite),{type:"error",reason:e.reason,error:t};case"start":break;case"text_start":t.content[e.contentIndex]={type:"text",text:""};break;case"text_delta":t.content[e.contentIndex].text+=e.delta;break;case"text_end":Object.assign(t.content[e.contentIndex],{text:e.content,textSignature:e.contentSignature});break;case"thinking_start":t.content[e.contentIndex]={type:"thinking",thinking:""};break;case"thinking_delta":t.content[e.contentIndex].thinking+=e.delta;break;case"thinking_end":Object.assign(t.content[e.contentIndex],{thinking:e.content,thinkingSignature:e.contentSignature,redacted:e.redacted});break;case"toolcall_start":t.content[e.contentIndex]={type:"toolCall",id:e.id,name:e.toolName,arguments:{}},n.set(e.contentIndex,"");break;case"toolcall_delta":{let s=`${n.get(e.contentIndex)??""}${e.delta}`;n.set(e.contentIndex,s),t.content[e.contentIndex].arguments=z(s);break}case"toolcall_end":return Object.assign(t.content[e.contentIndex],e.toolCall),n.delete(e.contentIndex),{type:"toolcall_end",contentIndex:e.contentIndex,toolCall:t.content[e.contentIndex],partial:t}}return{...e,partial:t}}}async function*b(r){let t=new TextDecoder,n=r.getReader(),e="";try{while(!0){let{done:s,value:a}=await n.read();e+=s?t.decode():t.decode(a,{stream:!0}),e=e.replace(/\r\n/g,`
3
+ `);let o=e.indexOf(`
4
+
5
+ `);while(o!==-1){let c=f(e.slice(0,o));if(c)yield c;e=e.slice(o+2),o=e.indexOf(`
6
+
7
+ `)}if(s)break}if(e.trim()){let s=f(e);if(s)yield s}}finally{n.releaseLock()}}function f(r){let t=r.split(`
8
+ `).find((n)=>n.startsWith("data:"))?.slice(5).trim();return t&&t!=="[DONE]"?JSON.parse(t):void 0}function I(r,t,n){let e=n?"aborted":"error",s={role:"assistant",content:[],api:r.api,provider:r.provider,model:r.id,usage:h(),stopReason:e,errorMessage:t instanceof Error?t.message:String(t),timestamp:Date.now()};if(!n&&t instanceof u)Ie(s,Zt("pi_messages_response_failure",t,t.diagnosticDetails));return{type:"error",reason:e,error:s}}function E(r,t){if(r)return r;return A("PI_CACHE_RETENTION",t)==="long"?"long":void 0}var T=(r,t,n)=>{let e=new F,s=w(r);return(async()=>{try{let a=n?.apiKey;if(!a)throw Error(`No API key provided for provider "${r.provider}"`);let o=new URL(`${r.baseUrl.replace(/\/+$/u,"")}/messages`);if(n?.debug)o.searchParams.set("debug","1");let c={model:r.id,context:t,options:{temperature:n?.temperature,maxTokens:n?.maxTokens,reasoning:n?.reasoning,cacheRetention:E(n?.cacheRetention,n?.env),sessionId:n?.sessionId,toolChoice:n?.toolChoice}},p=await n?.onPayload?.(c,r);if(p!==void 0)c=p;let i=await(n?.fetch??globalThis.fetch)(o,{method:"POST",headers:{authorization:`Bearer ${a}`,accept:"text/event-stream","content-type":"application/json",...xe(n?.headers)},body:JSON.stringify(c),signal:n?.signal});if(await n?.onResponse?.({status:i.status,headers:J(i.headers)},r),!i.ok){let d=await i.text();throw k(r,o,i,d)}if(!i.body)throw Error(`${r.provider} response has no body`);for await(let d of b(i.body)){await n?.onProviderStreamEvent?.(d,r);let g=s(d);if(e.push(g),g.type==="done"||g.type==="error")return}throw Error(`${r.provider} stream ended without a terminal event`)}catch(a){e.push(I(r,a,n?.signal?.aborted??!1))}})(),e},O=(r,t,n)=>{let e=n;return T(r,t,{...n,reasoning:n?.reasoning,toolChoice:n?.toolChoice,debug:e?.debug})};export{u as PiMessagesResponseError,T as stream,O as streamSimple};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ var A=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],I=["content-type","cache-control","allow"];function p(e){let r=e.path;if(!r?.startsWith("/api/")||/[\\\r\n#]/.test(r))throw Error("request path must start with /api/");let n=new URL(r,"http://basalt.internal");if(n.origin!=="http://basalt.internal"||!n.pathname.startsWith("/api/"))throw Error("request path must stay within /api/");let o=e.method??"GET";if(!A.includes(o))throw Error("Unsupported request method");if(e.body!==void 0&&(!e.body||typeof e.body!=="object"||Array.isArray(e.body)))throw Error("request body must be a JSON object");if(e.body!==void 0&&(o==="GET"||o==="HEAD"))throw Error("GET and HEAD requests cannot have a body");let s=e.timeoutMs??1e4;if(!Number.isSafeInteger(s)||s<1||s>60000)throw Error("timeoutMs must be an integer between 1 and 60000");return{url:n,method:o,timeoutMs:s}}function g(e){let r={};for(let n of I){let o=e.headers.get(n);if(o)r[n]=o.slice(0,500)}return r}async function M(e,r){let n=e.getReader();r(()=>n.cancel());let o=[],s=0,i=!1;while(!0){let t=await n.read();if(t.done)break;let d=20480-s;if(o.push(t.value.subarray(0,d)),s+=Math.min(t.value.length,d),t.value.length>d){i=!0,await n.cancel();break}}let u=new Uint8Array(s),c=0;for(let t of o)u.set(t,c),c+=t.length;return{text:new TextDecoder().decode(u,{stream:i}),truncated:i}}async function pr(e,r,n){let{url:o,method:s,timeoutMs:i}=p(r),u=e.http;if(!u)throw Error("HTTP API is not attached; start the Basalt server first");let c=new AbortController,t=n?AbortSignal.any([n,c.signal]):c.signal;t.throwIfAborted();let d,b=()=>{d?.().catch(()=>{})},E=async()=>{let h=r.body!==void 0,a=await u.request(new Request(o.toString(),{method:s,headers:h?{"content-type":"application/json"}:void 0,body:h?JSON.stringify(r.body):void 0,signal:t}));if(t.aborted)throw await a.body?.cancel(),Error("API request cancelled");let m=a.body?await M(a.body,(T)=>{d=T}):{text:"",truncated:!1};return{status:a.status,headers:g(a),body:m.text,truncated:m.truncated}},f,l,y=new Promise((h,a)=>{if(l=()=>{a(Error("API request cancelled")),b()},t.addEventListener("abort",l,{once:!0}),t.aborted)l()}),w=new Promise((h,a)=>{f=setTimeout(()=>{a(Error(`API request timed out after ${i}ms`)),c.abort(),b()},i)});try{return await Promise.race([E(),y,w])}finally{if(clearTimeout(f),l)t.removeEventListener("abort",l)}}
3
+ export{pr};
@@ -0,0 +1,9 @@
1
+ // @bun
2
+ import{Wt}from"./chunk-f2bcfa6z.js";import{r,p}from"./chunk-37f4ks5f.js";var T=r(function(c){var ee=c&&c.__createBinding||(Object.create?function(e,t,n,o){if(o===void 0)o=n;var s=Object.getOwnPropertyDescriptor(t,n);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable))s={enumerable:!0,get:function(){return t[n]}};Object.defineProperty(e,o,s)}:function(e,t,n,o){if(o===void 0)o=n;e[o]=t[n]}),te=c&&c.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),B=c&&c.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null){for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))ee(t,e,n)}return te(t,e),t};Object.defineProperty(c,"__esModule",{value:!0});c.req=c.json=c.toBuffer=void 0;var re=B(p("http")),ne=B(p("https"));async function D(e){let t=0,n=[];for await(let o of e)t+=o.length,n.push(o);return Buffer.concat(n,t)}c.toBuffer=D;async function oe(e){let n=(await D(e)).toString("utf8");try{return JSON.parse(n)}catch(o){let s=o;throw s.message+=` (input: ${n})`,s}}c.json=oe;function se(e,t={}){let o=((typeof e==="string"?e:e.href).startsWith("https:")?ne:re).request(e,t),s=new Promise((a,i)=>{o.once("response",a).once("error",i).end()});return o.then=s.then.bind(s),o}c.req=se});var U=r(function(u){var I=u&&u.__createBinding||(Object.create?function(e,t,n,o){if(o===void 0)o=n;var s=Object.getOwnPropertyDescriptor(t,n);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable))s={enumerable:!0,get:function(){return t[n]}};Object.defineProperty(e,o,s)}:function(e,t,n,o){if(o===void 0)o=n;e[o]=t[n]}),ie=u&&u.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),L=u&&u.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null){for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))I(t,e,n)}return ie(t,e),t},ce=u&&u.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))I(t,e,n)};Object.defineProperty(u,"__esModule",{value:!0});u.Agent=void 0;var ue=L(p("net")),H=L(p("http")),R=p("https");ce(T(),u);var d=Symbol("AgentBaseInternalState");class k extends H.Agent{constructor(e){super(e);this[d]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint==="boolean")return e.secureEndpoint;if(typeof e.protocol==="string")return e.protocol==="https:"}let{stack:t}=Error();if(typeof t!=="string")return!1;return t.split(`
3
+ `).some((n)=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;if(!this.sockets[e])this.sockets[e]=[];let t=new ue.Socket({writable:!1});return this.sockets[e].push(t),this.totalSocketCount++,t}decrementSockets(e,t){if(!this.sockets[e]||t===null)return;let n=this.sockets[e],o=n.indexOf(t);if(o!==-1){if(n.splice(o,1),this.totalSocketCount--,n.length===0)delete this.sockets[e]}}getName(e){if(this.isSecureEndpoint(e))return R.Agent.prototype.getName.call(this,e);return super.getName(e)}createSocket(e,t,n){let o={...t,secureEndpoint:this.isSecureEndpoint(t)},s=this.getName(o),a=this.incrementSockets(s);Promise.resolve().then(()=>this.connect(e,o)).then((i)=>{if(this.decrementSockets(s,a),i instanceof H.Agent)try{return i.addRequest(e,o)}catch(_){return n(_)}this[d].currentSocket=i,super.createSocket(e,t,n)},(i)=>{this.decrementSockets(s,a),n(i)})}createConnection(){let e=this[d].currentSocket;if(this[d].currentSocket=void 0,!e)throw Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[d].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){if(this[d])this[d].defaultPort=e}get protocol(){return this[d].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){if(this[d])this[d].protocol=e}}u.Agent=k});var z=r(function(g){var ae=g&&g.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(g,"__esModule",{value:!0});g.parseProxyResponse=void 0;var fe=ae(Wt()),S=(0,fe.default)("https-proxy-agent:parse-proxy-response");function le(e){return new Promise((t,n)=>{let o=0,s=[];function a(){let h=e.read();if(h)j(h);else e.once("readable",a)}function i(){e.removeListener("end",_),e.removeListener("error",y),e.removeListener("readable",a)}function _(){i(),S("onend"),n(Error("Proxy connection ended before receiving CONNECT response"))}function y(h){i(),S("onerror %o",h),n(h)}function j(h){s.push(h),o+=h.length;let f=Buffer.concat(s,o),M=f.indexOf(`\r
4
+ \r
5
+ `);if(M===-1){S("have not received end of HTTP headers yet..."),a();return}let q=f.slice(0,M).toString("ascii").split(`\r
6
+ `),C=q.shift();if(!C)return e.destroy(),n(Error("No header received from proxy CONNECT response"));let A=C.split(" "),Y=+A[1],Z=A.slice(2).join(" "),b={};for(let v of q){if(!v)continue;let E=v.indexOf(":");if(E===-1)return e.destroy(),n(Error(`Invalid header from proxy CONNECT response: "${v}"`));let m=v.slice(0,E).toLowerCase(),N=v.slice(E+1).trimStart(),P=b[m];if(typeof P==="string")b[m]=[P,N];else if(Array.isArray(P))P.push(N);else b[m]=N}S("got proxy server response: %o %o",C,b),i(),t({connect:{statusCode:Y,statusText:Z,headers:b},buffered:f})}e.on("error",y),e.on("end",_),a()})}g.parseProxyResponse=le});var ge=r(function(l){var he=l&&l.__createBinding||(Object.create?function(e,t,n,o){if(o===void 0)o=n;var s=Object.getOwnPropertyDescriptor(t,n);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable))s={enumerable:!0,get:function(){return t[n]}};Object.defineProperty(e,o,s)}:function(e,t,n,o){if(o===void 0)o=n;e[o]=t[n]}),de=l&&l.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),W=l&&l.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null){for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))he(t,e,n)}return de(t,e),t},G=l&&l.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(l,"__esModule",{value:!0});l.HttpsProxyAgent=void 0;var w=W(p("net")),F=W(p("tls")),pe=G(p("assert")),_e=G(Wt()),Q=U(),V=p("url"),X=z(),O=(0,_e.default)("https-proxy-agent"),J=(e)=>{if(e.servername===void 0&&e.host&&!w.isIP(e.host))return{...e,servername:e.host};return e};class x extends Q.Agent{constructor(e,t){super(t);this.options={path:void 0},this.proxy=typeof e==="string"?new V.URL(e):e,this.proxyHeaders=t?.headers??{},O("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...t?K(t,"headers"):null,host:n,port:o}}async connect(e,t){let{proxy:n}=this;if(!t.host)throw TypeError('No "host" provided');let o;if(n.protocol==="https:")O("Creating `tls.Socket`: %o",this.connectOpts),o=F.connect(J(this.connectOpts));else O("Creating `net.Socket`: %o",this.connectOpts),o=w.connect(this.connectOpts);let s=typeof this.proxyHeaders==="function"?this.proxyHeaders():{...this.proxyHeaders},a=w.isIPv6(t.host)?`[${t.host}]`:t.host,i=`CONNECT ${a}:${t.port} HTTP/1.1\r
7
+ `;if(n.username||n.password){let f=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(f).toString("base64")}`}if(s.Host=`${a}:${t.port}`,!s["Proxy-Connection"])s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close";for(let f of Object.keys(s))i+=`${f}: ${s[f]}\r
8
+ `;let _=X.parseProxyResponse(o);o.write(`${i}\r
9
+ `);let{connect:y,buffered:j}=await _;if(e.emit("proxyConnect",y),this.emit("proxyConnect",y,e),y.statusCode===200){if(e.once("socket",ye),t.secureEndpoint)return O("Upgrading socket connection to TLS"),F.connect({...K(J(t),"host","path","port"),socket:o});return o}o.destroy();let h=new w.Socket({writable:!1});return h.readable=!0,e.once("socket",(f)=>{O("Replaying proxy buffer for failed request"),(0,pe.default)(f.listenerCount("data")>0),f.push(j),f.push(null)}),h}}x.protocols=["http","https"];l.HttpsProxyAgent=x;function ye(e){e.resume()}function K(e,...t){let n={},o;for(o in e)if(!t.includes(o))n[o]=e[o];return n}});export default ge();
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ var l=Object.create;var{getPrototypeOf:m,defineProperty:g,getOwnPropertyNames:n}=Object;var k=Object.prototype.hasOwnProperty;function o(b){return this[b]}var q,s,a=(b,c,d)=>{var e=b!=null&&typeof b==="object";if(e){var i=c?q??=new WeakMap:s??=new WeakMap,j=i.get(b);if(j)return j}d=b!=null?l(m(b)):{};let f=c||!b||!b.__esModule||!k.call(b,"default")?g(d,"default",{value:b,enumerable:!0}):d;if(b&&typeof b==="object"||typeof b==="function"){for(let h of n(b))if(!k.call(f,h))g(f,h,{get:o.bind(b,h),enumerable:!0})}if(e)i.set(b,f);return f};var r=(b,c)=>()=>(c||b((c={exports:{}}).exports,c),c.exports);var t=(b)=>b;function u(b,c){this[b]=t.bind(null,c)}var Ye=(b,c)=>{for(var d in c)g(b,d,{get:c[d],enumerable:!0,configurable:!0,set:u.bind(c,d)})};var rr=(b,c,d)=>{for(var e in c)g(b,e,{get:c[e],set:d[e],enumerable:!0,configurable:!0})},p=import.meta.require;
3
+ export{a,r,Ye,rr,p};
@@ -0,0 +1,5 @@
1
+ // @bun
2
+ import{z}from"./chunk-jbk2tmza.js";import{Ur}from"./chunk-teky87xx.js";import{st}from"./chunk-q22dnah8.js";import{se}from"./chunk-keq5kv9b.js";import{Se,he,Y,we}from"./chunk-7xfde6se.js";import{w}from"./chunk-b516bp7n.js";import{J}from"./chunk-0b2brwjc.js";import{F,q,Ue,ce,ae,Z,K}from"./chunk-tdnwaaw4.js";var R=9,j=4000,N=(t,e,n)=>{let r=new F,o=ae(e,t.compat?.supportsMidConvoSystemMessages);return(async()=>{let s=U(t);try{let l=n?.apiKey;if(!l)throw Error(`No API key for provider: ${t.provider}`);let f=D(),u=we(o.messages,t,(d)=>f(d)),a=ne(t,o,u,n),i=await n?.onPayload?.(a,t);if(i!==void 0)a=i;let c=await G(t,a,l,n);if(r.push({type:"start",partial:s}),await oe(t,s,r,c,n?.onProviderStreamEvent),n?.signal?.aborted)throw Error("Request was aborted");if(s.stopReason==="pending")throw Error("Mistral stream ended without a finish reason");if(s.stopReason==="aborted"||s.stopReason==="error")throw Error(s.errorMessage||"An unknown error occurred");r.push({type:"done",reason:s.stopReason,message:s}),r.end()}catch(l){for(let f of s.content)delete f.partialArgs;s.stopReason=n?.signal?.aborted?"aborted":"error",s.errorMessage=B(l),r.push({type:"error",reason:s.stopReason,error:s}),r.end()}})(),r},Ie=(t,e,n)=>{let r=n?.apiKey;if(!r)throw Error(`No API key for provider: ${t.provider}`);let o={...Y(t,e,n,r),toolChoice:n?.toolChoice},s=n?.reasoning?K(t,n.reasoning):void 0,l=s==="off"?void 0:s,f=t.reasoning?t.thinkingLevelMap:void 0,u=f?l?f[l]??"high":f.off??void 0:void 0;return N(t,e,{...o,promptMode:t.reasoning&&!f&&l?"reasoning":void 0,reasoningEffort:u})};function U(t){return{role:"assistant",content:[],api:t.api,provider:t.provider,model:t.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"pending",timestamp:Date.now()}}function D(){let t=new Map,e=new Map;return(n)=>{let r=t.get(n);if(r)return r;let o=0;while(!0){let s=v(n,o),l=e.get(s);if(!l||l===n)return t.set(n,s),e.set(s,n),s;o++}}}function v(t,e){let n=t.replace(/[^a-zA-Z0-9]/g,"");if(e===0&&n.length===R)return n;let r=n||t,o=e===0?r:`${r}:${e}`;return st(o).replace(/[^a-zA-Z0-9]/g,"").slice(0,R)}function B(t){if(t instanceof Error){let e=t,n=typeof e.statusCode==="number"?e.statusCode:void 0,r=typeof e.body==="string"?e.body.trim():void 0;if(n!==void 0&&r)return`Mistral API error (${n}): ${H(r,j)}`;if(n!==void 0)return`Mistral API error (${n}): ${t.message}`;return t.message}return W(t)}function H(t,e){if(t.length<=e)return t;return`${t.slice(0,e)}... [truncated ${t.length-e} chars]`}function W(t){try{let e=JSON.stringify(t);return e===void 0?String(t):e}catch{return String(t)}}async function G(t,e,n,r){let o=new URL(t.baseUrl);o.pathname=`${o.pathname.replace(/\/+$/u,"")}/`;let s=new URL("v1/chat/completions",o),l=X(t,n,r),f=r?.timeoutMs??60000,u=AbortSignal.timeout(f),a=Ur([r?.signal,u]),i;try{i=await(r?.fetch??globalThis.fetch)(s,{method:"POST",headers:l,body:JSON.stringify(Q(e)),signal:a.signal})}catch(c){if(u.aborted&&!r?.signal?.aborted)throw Error(`Mistral response headers timed out after ${f}ms`);throw c}finally{a.cleanup()}if(await r?.onResponse?.({status:i.status,headers:J(i.headers)},t),!i.ok){let c=await i.text();throw new P(i.status,c,i.statusText)}if(!i.body)throw Error("Mistral response has no body");return te(i.body,r?.signal)}class P extends Error{statusCode;body;constructor(t,e,n){super(n||`Request failed with status ${t}`);this.name="MistralHttpError",this.statusCode=t,this.body=e}}function X(t,e,n){let r=new Headers({"User-Agent":se(),accept:"text/event-stream",authorization:`Bearer ${e}`,"content-type":"application/json"});S(r,t.headers),S(r,n?.headers);let o=A(t.headers,"x-affinity")||A(n?.headers,"x-affinity");if(O(n)&&!o)r.set("x-affinity",n.sessionId);return r}function S(t,e){if(!e)return;for(let[n,r]of Object.entries(e))if(r===null)t.delete(n);else t.set(n,r)}function A(t,e){return!!t&&Object.keys(t).some((n)=>n.toLowerCase()===e)}function Q(t){let e={...t};for(let[r,o]of[["topP","top_p"],["maxTokens","max_tokens"],["randomSeed","random_seed"],["responseFormat","response_format"],["toolChoice","tool_choice"],["presencePenalty","presence_penalty"],["frequencyPenalty","frequency_penalty"],["parallelToolCalls","parallel_tool_calls"],["reasoningEffort","reasoning_effort"],["promptMode","prompt_mode"],["promptCacheKey","prompt_cache_key"],["safePrompt","safe_prompt"]])_(e,r,o);e.messages=t.messages.map((r)=>V(r));let n=e.response_format;if(M(n)){let r={...n};_(r,"jsonSchema","json_schema");let o=r.json_schema;if(M(o)){let s={...o};_(s,"schemaDefinition","schema"),r.json_schema=s}e.response_format=r}return e}function V(t){let e={...t};if(_(e,"toolCalls","tool_calls"),_(e,"toolCallId","tool_call_id"),Array.isArray(t.content))e.content=t.content.map((n)=>ee(n));return e}function ee(t){let e={...t};for(let[n,r]of[["imageUrl","image_url"],["documentUrl","document_url"],["documentName","document_name"],["fileId","file_id"],["referenceIds","reference_ids"],["inputAudio","input_audio"]])_(e,n,r);return e}function _(t,e,n){if(!(e in t))return;t[n]=t[e],delete t[e]}function M(t){return typeof t==="object"&&t!==null&&!Array.isArray(t)}var k=Symbol("mistral-stream-done");async function*te(t,e){let n=t.getReader(),r=new TextDecoder,o="",s=()=>{n.cancel().catch(()=>{})};e?.addEventListener("abort",s,{once:!0});try{while(!0){if(e?.aborted)throw e.reason;let{done:l,value:f}=await n.read();if(e?.aborted)throw e.reason;o+=l?r.decode():r.decode(f,{stream:!0});let u=I(o);while(u){let a=E(o.slice(0,u.index));if(o=o.slice(u.index+u.length),a===k)return;if(a)yield a;u=I(o)}if(l)break}if(o.trim()){let l=E(o);if(l!==k&&l)yield l}}finally{e?.removeEventListener("abort",s);try{await n.cancel()}catch{}try{n.releaseLock()}catch{}}}function I(t){let e=/\r\n\r\n|\r\n\r|\r\n\n|\r\r\n|\n\r\n|\r\r|\n\r|\n\n/u.exec(t);return e?.index===void 0?void 0:{index:e.index,length:e[0].length}}function E(t){let e=t.split(/\r\n|\r|\n/u).filter((r)=>r.startsWith("data:")).map((r)=>r.slice(5).trimStart()).join(`
3
+ `).trim();if(!e)return;if(e==="[DONE]")return k;let n=JSON.parse(e);if(!M(n)||!Array.isArray(n.choices))throw Error("Invalid Mistral streaming event");return{data:n}}function ne(t,e,n,r){let o={model:t.id,stream:!0,messages:le(n,t.input.includes("image"))},s=ce(e.messages);if(s.length>0)o.tools=ie(s);if(r?.temperature!==void 0)o.temperature=r.temperature;if(r?.maxTokens!==void 0)o.maxTokens=r.maxTokens;if(r?.toolChoice)o.toolChoice=de(r.toolChoice);if(r?.promptMode)o.promptMode=r.promptMode;if(r?.reasoningEffort)o.reasoningEffort=r.reasoningEffort;if(O(r))o.promptCacheKey=r.sessionId;return o}function O(t){return t?.cacheRetention!=="none"&&!!t?.sessionId}function re(t,e){let n=t,r=n.promptTokensDetails?.cachedTokens??n.prompt_tokens_details?.cached_tokens??n.promptTokenDetails?.cachedTokens??n.prompt_token_details?.cached_tokens??n.numCachedTokens??n.num_cached_tokens??0,o=typeof r==="number"&&Number.isFinite(r)?r:0;return Math.min(e,Math.max(0,o))}async function oe(t,e,n,r,o){let s=null,l=e.content,f=()=>l.length-1,u=new Map,a=(i)=>{if(!i)return;if(i.type==="text"){n.push({type:"text_end",contentIndex:f(),content:i.text,partial:e});return}if(i.type==="thinking")n.push({type:"thinking_end",contentIndex:f(),content:i.thinking,partial:e})};for await(let i of r){let c=i.data;if(await o?.(c,t),e.responseId||=c.id,c.usage){let p=c.usage.prompt_tokens||0,h=re(c.usage,p);e.usage.input=Math.max(0,p-h),e.usage.output=c.usage.completion_tokens||0,e.usage.cacheRead=h,e.usage.cacheWrite=0,e.usage.totalTokens=c.usage.total_tokens||e.usage.input+e.usage.output+e.usage.cacheRead+e.usage.cacheWrite,Z(t,e.usage)}let d=c.choices[0];if(!d)continue;if(d.finish_reason){e.rawStopReason=d.finish_reason;let p=ue(d.finish_reason);if(e.stopReason=p.stopReason,p.errorMessage)e.errorMessage=p.errorMessage}let y=d.delta;if(y.content!==null&&y.content!==void 0){let p=typeof y.content==="string"?[y.content]:y.content;for(let h of p){if(typeof h==="string"){let m=w(h);if(!m)continue;if(!s||s.type!=="text")a(s),s={type:"text",text:""},e.content.push(s),n.push({type:"text_start",contentIndex:f(),partial:e});s.text+=m,n.push({type:"text_delta",contentIndex:f(),delta:m,partial:e});continue}if(h.type==="thinking"){let m=(h.thinking??[]).map((g)=>g.text??"").filter((g)=>g.length>0).join(""),x=w(m);if(!x)continue;if(!s||s.type!=="thinking")a(s),s={type:"thinking",thinking:""},e.content.push(s),n.push({type:"thinking_start",contentIndex:f(),partial:e});s.thinking+=x,n.push({type:"thinking_delta",contentIndex:f(),delta:x,partial:e});continue}if(h.type==="text"){let m=w(h.text??"");if(!m)continue;if(!s||s.type!=="text")a(s),s={type:"text",text:""},e.content.push(s),n.push({type:"text_start",contentIndex:f(),partial:e});s.text+=m,n.push({type:"text_delta",contentIndex:f(),delta:m,partial:e})}}}let L=y.tool_calls||[];for(let p of L){if(s)a(s),s=null;let h=p.id&&p.id!=="null"?p.id:v(`toolcall:${p.index??0}`,0),m=p.index??h,x=u.get(m),g;if(x!==void 0){let C=e.content[x];if(C?.type==="toolCall")g=C}if(!g)g={type:"toolCall",id:h,name:p.function.name,arguments:{},partialArgs:""},e.content.push(g),u.set(m,e.content.length-1),n.push({type:"toolcall_start",contentIndex:e.content.length-1,partial:e});let T=typeof p.function.arguments==="string"?p.function.arguments:JSON.stringify(p.function.arguments||{});g.partialArgs=(g.partialArgs||"")+T,g.arguments=z(g.partialArgs),n.push({type:"toolcall_delta",contentIndex:u.get(m),delta:T,partial:e})}}a(s);for(let i of u.values()){let c=e.content[i];if(c.type!=="toolCall")continue;let d=c;d.arguments=z(d.partialArgs),delete d.partialArgs,n.push({type:"toolcall_end",contentIndex:i,toolCall:d,partial:e})}}function ie(t){return t.map((e)=>{let n=he(e,!0);return{type:"function",function:{name:e.name,description:e.description,parameters:b(Se(e,n)),strict:n??!1}}})}function b(t){if(Array.isArray(t))return t.map((e)=>b(e));if(t&&typeof t==="object"){let e={};for(let[n,r]of Object.entries(t))e[n]=b(r);return e}return t}function le(t,e){let n=[];for(let[r,o]of t.entries()){if(o.role==="system"){let a=r===0?q(o):Ue(o);if(a.length>0)n.push({role:"system",content:w(a)});continue}if(o.role==="user"){if(typeof o.content==="string"){n.push({role:"user",content:w(o.content)});continue}let a=o.content.some((c)=>c.type==="image"),i=o.content.filter((c)=>c.type==="text"||e).map((c)=>{if(c.type==="text")return{type:"text",text:w(c.text)};return{type:"image_url",imageUrl:`data:${c.mimeType};base64,${c.data}`}});if(i.length>0){n.push({role:"user",content:i});continue}if(a&&!e)n.push({role:"user",content:"(image omitted: model does not support images)"});continue}if(o.role==="assistant"){let a=[],i=[];for(let d of o.content){if(d.type==="text"){if(d.text.trim().length>0)a.push({type:"text",text:w(d.text)});continue}if(d.type==="thinking"){if(d.thinking.trim().length>0)a.push({type:"thinking",thinking:[{type:"text",text:w(d.thinking)}]});continue}i.push({id:d.id,type:"function",function:{name:d.name,arguments:JSON.stringify(d.arguments||{})},index:0})}let c={role:"assistant",prefix:!1};if(a.length>0)c.content=a;if(i.length>0)c.toolCalls=i;if(a.length>0||i.length>0)n.push(c);continue}let s=[],l=o.content.filter((a)=>a.type==="text").map((a)=>a.type==="text"?w(a.text):"").join(`
4
+ `),f=o.content.some((a)=>a.type==="image"),u=fe(l,f,e,o.isError);s.push({type:"text",text:u});for(let a of o.content){if(!e)continue;if(a.type!=="image")continue;s.push({type:"image_url",imageUrl:`data:${a.mimeType};base64,${a.data}`})}n.push({role:"tool",toolCallId:o.toolCallId,name:o.toolName,content:s})}return n}function fe(t,e,n,r){let o=t.trim(),s=r?"[tool error] ":"";if(o.length>0)return`${s}${o}${e&&!n?`
5
+ [tool image omitted: model does not support images]`:""}`;if(e){if(n)return r?"[tool error] (see attached image)":"(see attached image)";return r?"[tool error] (image omitted: model does not support images)":"(image omitted: model does not support images)"}return r?"[tool error] (no tool output)":"(no tool output)"}function de(t){if(!t)return;if(t==="auto"||t==="none"||t==="any"||t==="required")return t;return{type:"function",function:{name:t.function.name}}}function ue(t){if(t===null)return{stopReason:"stop"};switch(t){case"stop":return{stopReason:"stop"};case"length":case"model_length":return{stopReason:"length"};case"tool_calls":return{stopReason:"toolUse"};case"error":return{stopReason:"error",errorMessage:"Provider stopped with: error (server error)"};default:return{stopReason:"error",errorMessage:`Provider stopped with: ${t}`}}}export{N as stream,Ie as streamSimple};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ai,Ge,ut}from"./chunk-had2k7b9.js";import{ze}from"./chunk-69v706tc.js";import{Xe,ke,B}from"./chunk-h4g1tzk6.js";import{Ee,ee,v,Te,te,ot,j}from"./chunk-5jy2cnyr.js";import{r}from"./chunk-37f4ks5f.js";var Se=r(function(Dt){var{SignatureV4:kt,signatureV4aContainer:de}=ai(),O={CrtSignerV4:null},ge="X-Amz-S3session-Token".toLowerCase();class J extends kt{async signWithCredentials(e,t,s){let o=pe(t);e.headers[ge]=t.sessionToken;let n=this;return he(n,o),n.signRequest(e,s??{})}async presignWithCredentials(e,t,s){let o=pe(t);return delete e.headers[ge],e.headers["X-Amz-S3session-Token"]=t.sessionToken,e.query=e.query??{},e.query["X-Amz-S3session-Token"]=t.sessionToken,he(this,o),this.presign(e,s)}}function pe(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function he(e,t){let s=e.credentialProvider;e.credentialProvider=()=>(e.credentialProvider=s,Promise.resolve(t))}class me{sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){if(typeof O.CrtSignerV4==="function")return"crt";else if(typeof de.SignatureV4a==="function")return"js";return"none"}constructor(e){this.sigv4Signer=new J(e),this.signerOptions=e}async sign(e,t={}){if(t.signingRegion==="*")return this.getSigv4aSigner().sign(e,t);return this.sigv4Signer.sign(e,t)}async signWithCredentials(e,t,s={}){if(s.signingRegion==="*"){let o=this.getSigv4aSigner(),n=O.CrtSignerV4;if(n&&o instanceof n)return o.signWithCredentials(e,t,s);else throw Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}return this.sigv4Signer.signWithCredentials(e,t,s)}async presign(e,t={}){if(t.signingRegion==="*"){let s=this.getSigv4aSigner(),o=O.CrtSignerV4;if(o&&s instanceof o)return s.presign(e,t);else throw Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}return this.sigv4Signer.presign(e,t)}async presignWithCredentials(e,t,s={}){if(s.signingRegion==="*")throw Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(e,t,s)}getSigv4aSigner(){if(!this.sigv4aSigner){let e=O.CrtSignerV4,t=de.SignatureV4a;if(this.signerOptions.runtime==="node"){if(!e&&!t)throw Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt");if(e&&typeof e==="function")this.sigv4aSigner=new e({...this.signerOptions,signingAlgorithm:1});else if(t&&typeof t==="function")this.sigv4aSigner=new t({...this.signerOptions});else throw Error("Available SigV4a implementation is not a valid constructor. Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt")}else{if(!t||typeof t!=="function")throw Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");this.sigv4aSigner=new t({...this.signerOptions})}}return this.sigv4aSigner}}Dt.SignatureV4MultiRegion=me;Dt.SignatureV4SignWithCredentials=J;Dt.signatureV4CrtContainer=O});var{awsEndpointFunctions:Nt,emitWarningIfUnsupportedVersion:Wt,createDefaultUserAgentProvider:Ht,NODE_APP_ID_CONFIG_OPTIONS:Ut,getAwsRegionExtensionConfiguration:qt,resolveAwsRegionExtensionConfiguration:Ft,resolveUserAgentConfig:Vt,resolveHostHeaderConfig:Lt,getUserAgentPlugin:Kt,getHostHeaderPlugin:Mt,getLoggerPlugin:jt,getRecursionDetectionPlugin:zt,setCredentialFeature:se,stsRegionDefaultResolver:Gt}=B(),{NoAuthSigner:Ce,getHttpAuthSchemeEndpointRuleSetPlugin:Yt,DefaultIdentityProviderConfig:Qt,getHttpSigningPlugin:Bt}=ke(),{normalizeProvider:_e,getSmithyContext:xe,ServiceException:Jt,NoOpLogger:Xt,emitWarningIfUnsupportedVersion:Zt,loadConfigsForDefaultMode:es,getDefaultExtensionConfiguration:ts,resolveDefaultRuntimeConfig:ss,Client:De,makeBuilder:ns,createAggregatedClient:os}=ee(),{Command:rs}=ee();var io=rs,ao=De;var{resolveDefaultsModeConfig:is,loadConfig:E,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:as,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:cs,NODE_REGION_CONFIG_OPTIONS:us,NODE_REGION_CONFIG_FILE_OPTIONS:ls,resolveRegionConfig:ds}=v(),{BinaryDecisionDiagram:gs,EndpointCache:ps,decideEndpoint:hs,customEndpointFunctions:ms,resolveParams:Ss,resolveEndpointConfig:vs,getEndpointPlugin:fs}=Te(),{parseUrl:Ps,getHttpHandlerExtensionConfiguration:ys,resolveHttpHandlerRuntimeConfig:Es,getContentLengthPlugin:As}=j(),{DEFAULT_RETRY_MODE:Is,NODE_RETRY_MODE_CONFIG_OPTIONS:ws,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:Rs,resolveRetryConfig:Cs,getRetryPlugin:_s}=Xe(),{TypeRegistry:be,getSchemaSerdePlugin:xs}=Ee(),{resolveAwsSdkSigV4Config:Ts,resolveAwsSdkSigV4AConfig:ks,AwsSdkSigV4Signer:Oe,AwsSdkSigV4ASigner:$e,NODE_SIGV4A_CONFIG_OPTIONS:Ds,NODE_AUTH_SCHEME_PREFERENCE_OPTIONS:bs}=Ge(),{SignatureV4MultiRegion:Ne}=Se(),{toUtf8:Os,fromUtf8:$s,toBase64:Ns,fromBase64:Ws,calculateBodyLength:Hs}=te(),{streamCollector:Us,NodeHttpHandler:qs}=ze(),{AwsQueryProtocol:Fs}=ut(),{Sha256:Vs}=ot(),b="ref",w=-1,N=!0,ve="isSet",We="PartitionResult",W="booleanEquals",l="stringEquals",X="getAttr",fe="us-east-1",Pe="sigv4",ye="sts",Ae="https://sts.{Region}.{PartitionResult#dnsSuffix}",Ie={[b]:"Endpoint"},d={[b]:"Region"},Z={[b]:We},D={},we=[d],Re={conditions:[[ve,[Ie]],[ve,we],["aws.partition",we,We],[W,[{[b]:"UseFIPS"},N]],[W,[{[b]:"UseDualStack"},N]],[l,[d,"aws-global"]],[W,[{[b]:"UseGlobalEndpoint"},N]],[l,[d,"eu-central-1"]],[W,[{fn:X,argv:[Z,"supportsDualStack"]},N]],[W,[{fn:X,argv:[Z,"supportsFIPS"]},N]],[l,[d,"ap-south-1"]],[l,[d,"eu-north-1"]],[l,[d,"eu-west-1"]],[l,[d,"eu-west-2"]],[l,[d,"eu-west-3"]],[l,[d,"sa-east-1"]],[l,[d,fe]],[l,[d,"us-east-2"]],[l,[d,"us-west-2"]],[l,[d,"us-west-1"]],[l,[d,"ca-central-1"]],[l,[d,"ap-southeast-1"]],[l,[d,"ap-northeast-1"]],[l,[d,"ap-southeast-2"]],[l,[{fn:X,argv:[Z,"name"]},"aws-us-gov"]]],results:[[w],["https://sts.amazonaws.com",{authSchemes:[{name:Pe,signingName:ye,signingRegion:fe}]}],[Ae,{authSchemes:[{name:Pe,signingName:ye,signingRegion:"{Region}"}]}],[w,"Invalid Configuration: FIPS and custom endpoint are not supported"],[w,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[Ie,D],["https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",D],[w,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://sts.{Region}.amazonaws.com",D],["https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",D],[w,"FIPS is enabled but this partition does not support FIPS"],["https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",D],[w,"DualStack is enabled but this partition does not support DualStack"],[Ae,D],[w,"Invalid Configuration: Missing Region"]]},Ls=2,i=1e8,Ks=new Int32Array([-1,1,-1,0,30,3,1,4,i+14,2,5,i+14,3,25,6,4,24,7,5,i+1,8,6,9,i+13,7,i+1,10,10,i+1,11,11,i+1,12,12,i+1,13,13,i+1,14,14,i+1,15,15,i+1,16,16,i+1,17,17,i+1,18,18,i+1,19,19,i+1,20,20,i+1,21,21,i+1,22,22,i+1,23,23,i+1,i+2,8,i+11,i+12,4,28,26,9,27,i+10,24,i+8,i+9,8,29,i+7,9,i+6,i+7,3,i+3,31,4,i+4,i+5]),Ms=gs.from(Ks,Ls,Re.conditions,Re.results),js=new ps({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),He=(e,t={})=>js.get(e,()=>hs(Ms,{endpointParams:e,logger:t.logger}));ms.aws=Nt;var zs=(e)=>async(t,s,o)=>{if(!o)throw Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let n=await e(t,s,o),u=xe(s)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!u)throw Error(`getEndpointParameterInstructions() is not defined on '${s.commandName}'`);let a=await Ss(o,{getEndpointParameterInstructions:u},t);return Object.assign(n,a)},Gs=async(e,t,s)=>({operation:xe(t).operation,region:await _e(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),Ys=zs(Gs);function Ue(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,s)=>({signingProperties:{config:t,context:s}})}}function ne(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,s)=>({signingProperties:{config:t,context:s}})}}function qe(e){return{schemeId:"smithy.api#noAuth"}}var Qs=(e,t,s)=>(n)=>{let a=e(n).properties?.authSchemes;if(!a)return t(n);let g=[];for(let S of a){let{name:p,properties:f={},...I}=S,P=p.toLowerCase();if(p!==P)console.warn(`HttpAuthScheme has been normalized with lowercasing: '${p}' to '${P}'`);let m;if(P==="sigv4a"){m="aws.auth#sigv4a";let Y=a.find((Q)=>{let le=Q.name.toLowerCase();return le!=="sigv4a"&&le.startsWith("sigv4")});if(Ne.sigv4aDependency()==="none"&&Y)continue}else if(P.startsWith("sigv4"))m="aws.auth#sigv4";else throw Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${P}'`);let k=s[m];if(!k)throw Error(`Could not find HttpAuthOption create function for '${m}'`);let y=k(n);y.schemeId=m,y.signingProperties={...y.signingProperties||{},...I,...f},g.push(y)}return g},Bs=(e)=>{let t=[];switch(e.operation){case"AssumeRoleWithWebIdentity":{t.push(qe()),t.push(ne(e));break}default:t.push(Ue(e)),t.push(ne(e))}return t},Js=Qs(He,Bs,{"aws.auth#sigv4":Ue,"aws.auth#sigv4a":ne,"smithy.api#noAuth":qe}),Xs=(e)=>{let t=Ts(e),s=ks(t);return Object.assign(s,{authSchemePreference:_e(e.authSchemePreference??[])})},Zs=(e)=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),en={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},tn="3.997.47",sn={version:tn};class h extends Jt{static shapeId="smithy.ts.sdk.synthetic.com.amazonaws.sts#STSServiceException";constructor(e){super(e);Object.setPrototypeOf(this,h.prototype)}}class U extends h{static shapeId="com.amazonaws.sts#ExpiredTokenException";name="ExpiredTokenException";$fault="client";constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});Object.setPrototypeOf(this,U.prototype)}}class q extends h{static shapeId="com.amazonaws.sts#MalformedPolicyDocumentException";name="MalformedPolicyDocumentException";$fault="client";constructor(e){super({name:"MalformedPolicyDocumentException",$fault:"client",...e});Object.setPrototypeOf(this,q.prototype)}}class F extends h{static shapeId="com.amazonaws.sts#PackedPolicyTooLargeException";name="PackedPolicyTooLargeException";$fault="client";constructor(e){super({name:"PackedPolicyTooLargeException",$fault:"client",...e});Object.setPrototypeOf(this,F.prototype)}}class V extends h{static shapeId="com.amazonaws.sts#RegionDisabledException";name="RegionDisabledException";$fault="client";constructor(e){super({name:"RegionDisabledException",$fault:"client",...e});Object.setPrototypeOf(this,V.prototype)}}class L extends h{static shapeId="com.amazonaws.sts#IDPRejectedClaimException";name="IDPRejectedClaimException";$fault="client";constructor(e){super({name:"IDPRejectedClaimException",$fault:"client",...e});Object.setPrototypeOf(this,L.prototype)}}class K extends h{static shapeId="com.amazonaws.sts#InvalidIdentityTokenException";name="InvalidIdentityTokenException";$fault="client";constructor(e){super({name:"InvalidIdentityTokenException",$fault:"client",...e});Object.setPrototypeOf(this,K.prototype)}}class M extends h{static shapeId="com.amazonaws.sts#IDPCommunicationErrorException";name="IDPCommunicationErrorException";$fault="client";$retryable={};constructor(e){super({name:"IDPCommunicationErrorException",$fault:"client",...e});Object.setPrototypeOf(this,M.prototype)}}var nn="Arn",on="AccessKeyId",rn="AssumeRole",an="AssumedRoleId",cn="AssumeRoleRequest",un="AssumeRoleResponse",oe="AssumedRoleUser",ln="AssumeRoleWithWebIdentity",dn="AssumeRoleWithWebIdentityRequest",gn="AssumeRoleWithWebIdentityResponse",pn="Audience",re="Credentials",hn="ContextAssertion",Fe="DurationSeconds",mn="Expiration",Sn="ExternalId",vn="ExpiredTokenException",fn="IDPCommunicationErrorException",Pn="IDPRejectedClaimException",yn="InvalidIdentityTokenException",En="Key",An="MalformedPolicyDocumentException",Ve="MinimumSessionTokenSize",Le="Policy",Ke="PolicyArns",In="ProviderArn",wn="ProvidedContexts",Rn="ProvidedContextsListType",Cn="ProvidedContext",_n="PolicyDescriptorType",xn="ProviderId",Me="PackedPolicySize",Tn="PackedPolicyTooLargeException",kn="Provider",je="RoleArn",Dn="RegionDisabledException",Ye="RoleSessionName",bn="SecretAccessKey",On="SubjectFromWebIdentityToken",ie="SourceIdentity",$n="SerialNumber",Nn="SessionToken",Qe="SessionTokenSize",Be="SessionTokenUtilization",Wn="Tags",Hn="TokenCode",Un="TransitiveTagKeys",qn="Tag",Fn="Value",Vn="WebIdentityToken",Ln="arn",Kn="accessKeySecretType",R="awsQueryError",C="client",Mn="clientTokenType",_="error",x="httpError",T="message",jn="policyDescriptorListType",Je="smithy.ts.sdk.synthetic.com.amazonaws.sts",zn="tagListType",c="com.amazonaws.sts",Ze=new be(Je),et=[-3,Je,"STSServiceException",0,[],[]];Ze.registerError(et,h);var A=new be(c),tt=[-3,c,vn,{[R]:["ExpiredTokenException",400],[_]:C,[x]:400},[T],[0]];A.registerError(tt,U);var st=[-3,c,fn,{[R]:["IDPCommunicationError",400],[_]:C,[x]:400},[T],[0]];A.registerError(st,M);var nt=[-3,c,Pn,{[R]:["IDPRejectedClaim",403],[_]:C,[x]:403},[T],[0]];A.registerError(nt,L);var rt=[-3,c,yn,{[R]:["InvalidIdentityToken",400],[_]:C,[x]:400},[T],[0]];A.registerError(rt,K);var it=[-3,c,An,{[R]:["MalformedPolicyDocument",400],[_]:C,[x]:400},[T],[0]];A.registerError(it,q);var at=[-3,c,Tn,{[R]:["PackedPolicyTooLarge",400],[_]:C,[x]:400},[T],[0]];A.registerError(at,F);var ct=[-3,c,Dn,{[R]:["RegionDisabledException",403],[_]:C,[x]:403},[T],[0]];A.registerError(ct,V);var lt=[Ze,A],Gn=[0,c,Kn,8,0],Yn=[0,c,Mn,8,0],ae=[3,c,oe,0,[an,nn],[0,0],2],dt=[3,c,cn,0,[je,Ye,Ke,Le,Fe,Wn,Un,Sn,$n,Hn,ie,wn,Ve],[0,0,()=>ft,0,1,()=>Bn,64,0,0,0,0,()=>Qn,1],2],gt=[3,c,un,0,[re,oe,Me,ie,Be,Qe],[[()=>ce,0],()=>ae,1,0,1,1]],pt=[3,c,dn,0,[je,Ye,Vn,xn,Ke,Le,Fe,Ve],[0,0,[()=>Yn,0],0,()=>ft,0,1,1],3],ht=[3,c,gn,0,[re,On,oe,Me,kn,pn,ie,Be,Qe],[[()=>ce,0],0,()=>ae,1,0,0,0,1,1]],ce=[3,c,re,0,[on,bn,Nn,mn],[0,[()=>Gn,0],0,4],4],mt=[3,c,_n,0,[Ln],[0]],St=[3,c,Cn,0,[In,hn],[0,0]],vt=[3,c,qn,0,[En,Fn],[0,0],2],ft=[1,c,jn,0,()=>mt],Qn=[1,c,Rn,0,()=>St],Bn=[1,c,zn,0,()=>vt],Pt=[9,c,rn,0,()=>dt,()=>gt],yt=[9,c,ln,0,()=>pt,()=>ht],Jn=(e)=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??Ws,base64Encoder:e?.base64Encoder??Ns,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??He,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Js,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(t)=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Oe},{schemeId:"aws.auth#sigv4a",identityProvider:(t)=>t.getIdentityProvider("aws.auth#sigv4a"),signer:new $e},{schemeId:"smithy.api#noAuth",identityProvider:(t)=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Ce}],logger:e?.logger??new Xt,protocol:e?.protocol??Fs,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",errorTypeRegistries:lt,xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",sha256:e?.sha256??Vs,signerConstructor:e?.signerConstructor??Ne,urlParser:e?.urlParser??Ps,utf8Decoder:e?.utf8Decoder??$s,utf8Encoder:e?.utf8Encoder??Os}),Xn=(e)=>{Zt(process.version);let t=is(e),s=()=>t().then(es),o=Jn(e);Wt(process.version);let n={profile:e?.profile,logger:o.logger};return{...o,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??E(bs,n),bodyLengthChecker:e?.bodyLengthChecker??Hs,defaultUserAgentProvider:e?.defaultUserAgentProvider??Ht({serviceId:o.serviceId,clientVersion:sn.version}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(u)=>u.getIdentityProvider("aws.auth#sigv4")||(async(a)=>await e.credentialDefaultProvider(a?.__config||{})()),signer:new Oe},{schemeId:"aws.auth#sigv4a",identityProvider:(u)=>u.getIdentityProvider("aws.auth#sigv4a"),signer:new $e},{schemeId:"smithy.api#noAuth",identityProvider:(u)=>u.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Ce}],maxAttempts:e?.maxAttempts??E(Rs,e),region:e?.region??E(us,{...ls,...n}),requestHandler:qs.create(e?.requestHandler??s),retryMode:e?.retryMode??E({...ws,default:async()=>(await s()).retryMode||Is},e),sigv4aSigningRegionSet:e?.sigv4aSigningRegionSet??E(Ds,n),streamCollector:e?.streamCollector??Us,useDualstackEndpoint:e?.useDualstackEndpoint??E(cs,n),useFipsEndpoint:e?.useFipsEndpoint??E(as,n),userAgentAppId:e?.userAgentAppId??E(Ut,n)}},Zn=(e)=>{let{httpAuthSchemes:t,httpAuthSchemeProvider:s,credentials:o}=e;return{setHttpAuthScheme(n){let u=t.findIndex((a)=>a.schemeId===n.schemeId);if(u===-1)t.push(n);else t.splice(u,1,n)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(n){s=n},httpAuthSchemeProvider(){return s},setCredentials(n){o=n},credentials(){return o}}},eo=(e)=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),to=(e,t)=>{let s=Object.assign(qt(e),ts(e),ys(e),Zn(e));return t.forEach((o)=>o.configure(s)),Object.assign(e,Ft(s),ss(s),Es(s),eo(s))};class H extends De{config;constructor(...[e]){let t=Xn(e||{});super(t);this.initConfig=t;let s=Zs(t),o=Vt(s),n=Cs(o),u=ds(n),a=Lt(u),g=vs(a),S=Xs(g),p=to(S,e?.extensions||[]);this.config=p,this.middlewareStack.use(xs(this.config)),this.middlewareStack.use(Kt(this.config)),this.middlewareStack.use(_s(this.config)),this.middlewareStack.use(As(this.config)),this.middlewareStack.use(Mt(this.config)),this.middlewareStack.use(jt(this.config)),this.middlewareStack.use(zt(this.config)),this.middlewareStack.use(Yt(this.config,{httpAuthSchemeParametersProvider:Ys,identityProviderConfigProvider:async(f)=>new Qt({"aws.auth#sigv4":f.credentials,"aws.auth#sigv4a":f.credentials})})),this.middlewareStack.use(Bt(this.config))}destroy(){super.destroy()}}var Et=ns(en,"AWSSecurityTokenServiceV20110615","STSClient",fs),At={},It=(e,t,s,o)=>[];class z extends Et(At,It,"AssumeRole",Pt){}class G extends Et(At,It,"AssumeRoleWithWebIdentity",yt){}var so={AssumeRoleCommand:z,AssumeRoleWithWebIdentityCommand:G};class ue extends H{}os(so,ue);var wt=(e)=>{if(typeof e?.Arn==="string"){let t=e.Arn.split(":");if(t.length>4&&t[4]!=="")return t[4]}return},Rt=async(e,t,s,o={})=>{let n=typeof e==="function"?await e():e,u=typeof t==="function"?await t():t,a="",g=n??u??(a=await Gt(o)());return s?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${n} (credential provider clientConfig)`,`${u} (contextual client)`,`${a} (STS default: AWS_REGION, profile region, or us-east-1)`),g},no=(e,t)=>{let s,o;return async(n,u)=>{if(o=n,!s){let{logger:f=e?.parentClientConfig?.logger,profile:I=e?.parentClientConfig?.profile,region:P,requestHandler:m=e?.parentClientConfig?.requestHandler,credentialProviderLogger:k,userAgentAppId:y=e?.parentClientConfig?.userAgentAppId}=e,Y=await Rt(P,e?.parentClientConfig?.region,k,{logger:f,profile:I}),Q=!Ct(m);s=new t({...e,userAgentAppId:y,profile:I,credentialDefaultProvider:()=>async()=>o,region:Y,requestHandler:Q?m:void 0,logger:f})}let{Credentials:a,AssumedRoleUser:g}=await s.send(new z(u));if(!a||!a.AccessKeyId||!a.SecretAccessKey)throw Error(`Invalid response from STS.assumeRole call with role ${u.RoleArn}`);let S=wt(g),p={accessKeyId:a.AccessKeyId,secretAccessKey:a.SecretAccessKey,sessionToken:a.SessionToken,expiration:a.Expiration,...a.CredentialScope&&{credentialScope:a.CredentialScope},...S&&{accountId:S}};return se(p,"CREDENTIALS_STS_ASSUME_ROLE","i"),p}},oo=(e,t)=>{let s;return async(o)=>{if(!s){let{logger:S=e?.parentClientConfig?.logger,profile:p=e?.parentClientConfig?.profile,region:f,requestHandler:I=e?.parentClientConfig?.requestHandler,credentialProviderLogger:P,userAgentAppId:m=e?.parentClientConfig?.userAgentAppId}=e,k=await Rt(f,e?.parentClientConfig?.region,P,{logger:S,profile:p}),y=!Ct(I);s=new t({...e,userAgentAppId:m,profile:p,region:k,requestHandler:y?I:void 0,logger:S})}let{Credentials:n,AssumedRoleUser:u}=await s.send(new G(o));if(!n||!n.AccessKeyId||!n.SecretAccessKey)throw Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${o.RoleArn}`);let a=wt(u),g={accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,sessionToken:n.SessionToken,expiration:n.Expiration,...n.CredentialScope&&{credentialScope:n.CredentialScope},...a&&{accountId:a}};if(a)se(g,"RESOLVED_ACCOUNT_ID","T");return se(g,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),g}},Ct=(e)=>e?.metadata?.handlerProtocol==="h2",_t=(e,t)=>{if(!t)return e;else return class extends e{constructor(o){super(o);for(let n of t)this.middlewareStack.use(n)}}},xt=(e={},t)=>no(e,_t(H,t)),Tt=(e={},t)=>oo(e,_t(H,t)),ro=(e)=>(t)=>e({roleAssumer:xt(t),roleAssumerWithWebIdentity:Tt(t),...t});var co=Pt,uo=z,lo=dt,go=gt,po=yt,ho=G,mo=pt,So=ht,vo=ae,fo=ce,Po=U,yo=tt,Eo=M,Ao=st,Io=L,wo=nt,Ro=K,Co=rt,_o=q,xo=it,To=F,ko=at,Do=mt,bo=St,Oo=V,$o=ct,No=ue,Wo=H,Ho=h,Uo=et,qo=vt,Fo=ro,Vo=lt,Lo=xt,Ko=Tt;export{io as $Command,ao as __Client,co as AssumeRole$,uo as AssumeRoleCommand,lo as AssumeRoleRequest$,go as AssumeRoleResponse$,po as AssumeRoleWithWebIdentity$,ho as AssumeRoleWithWebIdentityCommand,mo as AssumeRoleWithWebIdentityRequest$,So as AssumeRoleWithWebIdentityResponse$,vo as AssumedRoleUser$,fo as Credentials$,Po as ExpiredTokenException,yo as ExpiredTokenException$,Eo as IDPCommunicationErrorException,Ao as IDPCommunicationErrorException$,Io as IDPRejectedClaimException,wo as IDPRejectedClaimException$,Ro as InvalidIdentityTokenException,Co as InvalidIdentityTokenException$,_o as MalformedPolicyDocumentException,xo as MalformedPolicyDocumentException$,To as PackedPolicyTooLargeException,ko as PackedPolicyTooLargeException$,Do as PolicyDescriptorType$,bo as ProvidedContext$,Oo as RegionDisabledException,$o as RegionDisabledException$,No as STS,Wo as STSClient,Ho as STSServiceException,Uo as STSServiceException$,qo as Tag$,Fo as decorateDefaultCredentialProvider,Vo as errorTypeRegistries,Lo as getDefaultRoleAssumer,Ko as getDefaultRoleAssumerWithWebIdentity};
@@ -0,0 +1,7 @@
1
+ // @bun
2
+ import{S}from"./chunk-td52edcm.js";import{z}from"./chunk-jbk2tmza.js";import{A}from"./chunk-ne94brn4.js";import{Ze}from"./chunk-8bf4g2d7.js";import{st}from"./chunk-q22dnah8.js";import{Pt,kt}from"./chunk-wf9r0frb.js";import{se}from"./chunk-keq5kv9b.js";import{pe}from"./chunk-fj56fznw.js";import{V,X}from"./chunk-e2m8ap8f.js";import{Se,en,tn,he,mr,Re,gt,Y,qo,Go,we}from"./chunk-7xfde6se.js";import{w}from"./chunk-b516bp7n.js";import{J}from"./chunk-0b2brwjc.js";import{F,q,Ue,ae,_e,Ae,Z,K}from"./chunk-tdnwaaw4.js";function ee(e,n){if(!e)return!1;let t=n.toLowerCase();for(let[s,u]of Object.entries(e))if(s.toLowerCase()===t&&u!==null&&u.trim().length>0)return!0;return!1}function ie(e,n,t){if(n)return n;if(ee(t,"authorization")||ee(t,"cf-aig-authorization"))return"unused";throw Error(`No API key for provider: ${e}`)}function ye(e){for(let n of e){if(n.role==="toolResult")return!0;if(n.role==="assistant"){if(n.content.some((t)=>t.type==="toolCall"))return!0}}return!1}function te(e){return e.type==="text"}function ke(e){return e.type==="thinking"}function Te(e){return e.type==="toolCall"}function xe(e){return e.type==="image"}function ve(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}function Ce(e){return(e.id===void 0||e.id===null||typeof e.id==="string")&&(e.format===void 0||typeof e.format==="string")&&(e.index===void 0||typeof e.index==="number")}function H(e){if(!ve(e)||!Ce(e))return!1;switch(e.type){case"reasoning.summary":return typeof e.summary==="string";case"reasoning.encrypted":return typeof e.data==="string";case"reasoning.text":return typeof e.text==="string"&&(e.signature===void 0||e.signature===null||typeof e.signature==="string");default:return!1}}function Me(e){if(!e)return;try{let n=JSON.parse(e);return Array.isArray(n)&&n.length>0&&n.every(H)?n:void 0}catch{return}}function Ie(e){if(!e)return;try{let n=JSON.parse(e);return H(n)&&n.type==="reasoning.encrypted"&&typeof n.id==="string"&&n.id.length>0&&n.data.length>0?n:void 0}catch{return}}function ne(e,n){e.id??=n.id,e.format||=n.format,e.index??=n.index}function Ee(e,n){let t=e[e.length-1];if(n.type==="reasoning.text"&&t?.type==="reasoning.text"){t.text+=n.text,t.signature||=n.signature,ne(t,n);return}if(n.type==="reasoning.summary"&&t?.type==="reasoning.summary"){t.summary+=n.summary,ne(t,n);return}e.push({...n})}var Fe=["reasoning","reasoning_content","reasoning_text"];function Oe(e){return Fe.includes(e)}function ue(e,n){if(e)return e;if(A("PI_CACHE_RETENTION",n)==="long")return"long";return"short"}var be=(e,n,t)=>{let s=new F,u=ae(n,N(e).supportsMidConvoSystemMessages);return(async()=>{let r={role:"assistant",content:[],api:e.api,provider:e.provider,model:e.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"pending",timestamp:Date.now()},k,g=(R)=>{if(k!==void 0)R.thinkingSignature=JSON.stringify(k)};try{let R=ie(e.provider,t?.apiKey,t?.headers),a=N(e),T=Re(_e(u.messages),a.supportsOpenAIGrammarTools),p=ue(t?.cacheRetention,t?.env),d=p==="none"?void 0:t?.sessionId,o=Be(e,u,R,t?.headers,t?.fetch,d,a),f=Pe(e,u,t,a,p,T),h=await t?.onPayload?.(f,e);if(h!==void 0)f=h;let C={...t?.signal?{signal:t.signal}:{},...t?.timeoutMs!==void 0?{timeout:t.timeoutMs}:{},maxRetries:0},{data:M,response:L}=await pe(()=>o.chat.completions.create(f,C).withResponse(),{maxRetries:t?.maxRetries,maxRetryDelayMs:t?.maxRetryDelayMs,signal:t?.signal});await t?.onResponse?.({status:L.status,headers:J(L.headers)},e),s.push({type:"start",partial:r});let b=null,O=null,v=!1,B=new Map,D=new Map,l=r.content,I=(i)=>l.indexOf(i),U=(i)=>{let c=i.customInput?.property;if(c===void 0)return"";let x=i.arguments[c];return typeof x==="string"?x:""},W=(i,c,x)=>{let m=i.customInput;if(!m)return;let E=tn(m.jsonBuffer,m.property,c,x);return i.arguments={[m.property]:c},E},ce=(i)=>{let c=I(i);if(c===-1)return;if(i.type==="text")s.push({type:"text_end",contentIndex:c,content:i.text,partial:r});else if(i.type==="thinking")g(i),s.push({type:"thinking_end",contentIndex:c,content:i.thinking,partial:r});else if(i.type==="toolCall"){if(i.customInput){let x=W(i,U(i),!0);if(x!==void 0)s.push({type:"toolcall_delta",contentIndex:c,delta:x,partial:r})}else i.arguments=z(i.partialArgs);delete i.partialArgs,delete i.customInput,delete i.streamIndex,s.push({type:"toolcall_end",contentIndex:c,toolCall:i,partial:r})}},ge=()=>{if(!b)b={type:"text",text:""},l.push(b),s.push({type:"text_start",contentIndex:I(b),partial:r});return b},Q=(i)=>{if(!O)O={type:"thinking",thinking:"",thinkingSignature:i},l.push(O),s.push({type:"thinking_start",contentIndex:I(O),partial:r});return O},de=(i)=>{let c=typeof i.index==="number"?i.index:void 0,x=i.function?.name??i.custom?.name??"",m=c!==void 0?B.get(c):void 0;if(!m&&i.id)m=D.get(i.id);if(!m){let E=i.custom&&!i.function?T.get(x)??"input":void 0,P=E!==void 0;if(m={type:"toolCall",id:i.id||"",name:x,arguments:P?{[E]:""}:{},partialArgs:P?void 0:"",customInput:P?{property:E,jsonBuffer:{input:"",started:!1,closed:!1}}:void 0,streamIndex:c},c!==void 0)B.set(c,m);if(i.id)D.set(i.id,m);l.push(m),s.push({type:"toolcall_start",contentIndex:I(m),partial:r})}if(c!==void 0&&m.streamIndex===void 0)m.streamIndex=c,B.set(c,m);if(i.id)D.set(i.id,m);if(!m.name&&x)m.name=x;if(i.custom&&!i.function&&!m.customInput){let E=T.get(m.name)??"input";m.arguments={[E]:""},m.customInput={property:E,jsonBuffer:{input:"",started:!1,closed:!1}},delete m.partialArgs}return m};for await(let i of M){if(await t?.onProviderStreamEvent?.(i,e),!i||typeof i!=="object")continue;if(r.responseId||=i.id,typeof i.model==="string"&&i.model.length>0&&i.model!==e.id)r.responseModel||=i.model;if(i.usage)r.usage=oe(i.usage,e);let c=Array.isArray(i.choices)?i.choices[0]:void 0;if(!c)continue;if(!i.usage&&c.usage)r.usage=oe(c.usage,e);if(c.finish_reason){r.rawStopReason=c.finish_reason;let x=Je(c.finish_reason);if(r.stopReason=x.stopReason,x.errorMessage)r.errorMessage=x.errorMessage;v=!0}if(c.delta){if(c.delta.content!==null&&c.delta.content!==void 0&&c.delta.content.length>0){let y=ge();y.text+=c.delta.content,s.push({type:"text_delta",contentIndex:I(y),delta:c.delta.content,partial:r})}let x=["reasoning_content","reasoning","reasoning_text"],m=c.delta,E=null;for(let y of x){let _=m[y];if(typeof _==="string"&&_.length>0){E=y;break}}if(E){let y=m[E];if(typeof y==="string"&&y.length>0){let _=e.provider==="opencode-go"&&E==="reasoning"?"reasoning_content":E,G=Q(_);G.thinking+=y,s.push({type:"thinking_delta",contentIndex:I(G),delta:y,partial:r})}}if(c?.delta?.tool_calls)for(let y of c.delta.tool_calls){let _=de(y);if(!_.id&&y.id)_.id=y.id,D.set(y.id,_);let G=y.function?.name??y.custom?.name;if(!_.name&&G)_.name=G;let j="";if(y.function?.arguments)j=y.function.arguments,_.partialArgs=(_.partialArgs??"")+y.function.arguments,_.arguments=z(_.partialArgs);else if(y.custom?.input){let me=U(_)+y.custom.input;j=W(_,me,!1)??""}s.push({type:"toolcall_delta",contentIndex:I(_),delta:j,partial:r})}let P=c.delta.reasoning_details;if(Array.isArray(P))for(let y of P){if(!H(y))continue;Q(""),k??=[],Ee(k,y)}}}for(let i of l)ce(i);if(t?.signal?.aborted)throw Error("Request was aborted");if(r.stopReason==="aborted")throw Error("Request was aborted");if(!v&&!a.supportsFinishReason)r.stopReason=r.content.some((i)=>i.type==="toolCall")?"toolUse":"stop";if(r.stopReason==="error")throw Error(r.errorMessage||"Provider returned an error stop reason");if(a.supportsFinishReason&&!v||r.stopReason==="pending")throw Error("Stream ended without finish_reason");s.push({type:"done",reason:r.stopReason,message:r}),s.end()}catch(R){for(let T of r.content){if(T.type==="thinking")g(T);delete T.index,delete T.partialArgs,delete T.customInput,delete T.streamIndex}r.stopReason=t?.signal?.aborted?"aborted":"error",r.errorMessage=X(V(R));let a=R?.error?.metadata?.raw;if(a&&!r.errorMessage.includes(String(a)))r.errorMessage+=`
3
+ ${a}`;s.push({type:"error",reason:r.stopReason,error:r}),s.end()}})(),s},yt=(e,n,t)=>{ie(e.provider,t?.apiKey,t?.headers);let s={...Y(e,n,t,t?.apiKey),toolChoice:t?.toolChoice},u=t?.reasoning?K(e,t.reasoning):void 0;return be(e,n,{...s,reasoningEffort:u==="off"?void 0:u,thinkingBudgets:t?.thinkingBudgets})};function Be(e,n,t,s,u,r,k=N(e)){let g={"User-Agent":se(),...e.headers};if(e.provider==="github-copilot"){let R=Pt(n.messages),a=kt({messages:n.messages,hasImages:R});Object.assign(g,a)}if(r&&k.sendSessionAffinityHeaders)if(k.sessionAffinityFormat==="openrouter")g["x-session-id"]=r;else{if(k.sessionAffinityFormat==="openai")g.session_id=r;g["x-client-request-id"]=r,g["x-session-affinity"]=r}if(s)Object.assign(g,s);return new S({apiKey:t,baseURL:e.baseUrl,dangerouslyAllowBrowser:!0,fetch:u,defaultHeaders:g})}function Pe(e,n,t,s=N(e),u=ue(t?.cacheRetention,t?.env),r=Re(_e(n.messages),s.supportsOpenAIGrammarTools)){let k=Ae(n.messages,s.supportsMidConvoSystemMessages===!0&&s.supportsMidConvoToolAdditions===!0),g=We(e,n,s,{grammarToolInputProperties:r}),R=ze(s,u),a={model:e.id,messages:g,stream:!0,prompt_cache_key:e.baseUrl.includes("api.openai.com")&&u!=="none"||u==="long"&&s.supportsLongCacheRetention?Ze(t?.sessionId):void 0,prompt_cache_retention:u==="long"&&s.supportsLongCacheRetention?"24h":void 0};if(s.supportsUsageInStreaming!==!1)a.stream_options={include_usage:!0};if(s.supportsStore)a.store=!1;if(t?.maxTokens)if(s.maxTokensField==="max_tokens")a.max_tokens=t.maxTokens;else a.max_completion_tokens=t.maxTokens;if(t?.temperature!==void 0)a.temperature=t.temperature;if(k.requestTools.length>0){if(a.tools=le(k.requestTools,s),s.zaiToolStream)a.tool_stream=!0}else if(ye(n.messages))a.tools=[];if(R)Ge(g,a.tools,R);if(t?.toolChoice)a.tool_choice=t.toolChoice;if(s.vllmPriority!==void 0)a.priority=s.vllmPriority;let T=Le(s),p=qe(e,t,a);if(s.thinkingFormat==="zai"&&e.reasoning){let o=a;if(o.thinking=t?.reasoningEffort?{type:"enabled",clear_thinking:!1}:{type:"disabled"},t?.reasoningEffort&&s.supportsReasoningEffort){let f=e.thinkingLevelMap?.[t.reasoningEffort],h=f===void 0?t.reasoningEffort:f;if(typeof h==="string")o.reasoning_effort=h}}else if(s.thinkingFormat==="qwen"&&e.reasoning){if(a.enable_thinking=!!t?.reasoningEffort,t?.reasoningEffort&&s.supportsReasoningEffort){let o=e.thinkingLevelMap?.[t.reasoningEffort]??t.reasoningEffort;if(typeof o==="string")a.reasoning_effort=o}}else if(s.thinkingFormat==="qwen-chat-template"&&e.reasoning)a.chat_template_kwargs={enable_thinking:!!t?.reasoningEffort,preserve_thinking:!0};else if(s.thinkingFormat==="chat-template"&&e.reasoning){let o=re(e,t,s.chatTemplateKwargs,p);if(o)a.chat_template_kwargs=o}else if(s.thinkingFormat==="baseten"&&e.reasoning){let o=a,f=re(e,t,s.chatTemplateArgs,p);if(f)o.chat_template_args=f;if(s.supportsReasoningEffort){let h=t?.reasoningEffort,C=h?e.thinkingLevelMap?.[h]:e.thinkingLevelMap?.off,M=C===void 0?h:C;if(typeof M==="string")o.reasoning_effort=M}}else if(s.thinkingFormat==="deepseek"&&e.reasoning){if(t?.reasoningEffort)a.thinking={type:"enabled"};else if(e.thinkingLevelMap?.off!==null)a.thinking={type:"disabled"};if(t?.reasoningEffort&&s.supportsReasoningEffort)a.reasoning_effort=e.thinkingLevelMap?.[t.reasoningEffort]??t.reasoningEffort}else if(s.thinkingFormat==="openrouter"&&e.reasoning){let o=a;if(t?.reasoningEffort)o.reasoning={effort:e.thinkingLevelMap?.[t.reasoningEffort]??t.reasoningEffort};else if(e.thinkingLevelMap?.off!==null)o.reasoning={effort:e.thinkingLevelMap?.off??"none"}}else if(s.thinkingFormat==="ant-ling"&&e.reasoning&&t?.reasoningEffort){let o=e.thinkingLevelMap?.[t.reasoningEffort];if(typeof o==="string")a.reasoning={effort:o}}else if(s.thinkingFormat==="together"&&e.reasoning){let o=a;if(o.reasoning={enabled:!!t?.reasoningEffort},t?.reasoningEffort&&s.supportsReasoningEffort)o.reasoning_effort=e.thinkingLevelMap?.[t.reasoningEffort]??t.reasoningEffort}else if(s.thinkingFormat==="string-thinking"&&e.reasoning){let o=a;if(t?.reasoningEffort)o.thinking=e.thinkingLevelMap?.[t.reasoningEffort]??t.reasoningEffort;else if(e.thinkingLevelMap?.off!==null)o.thinking=e.thinkingLevelMap?.off??"none"}else if(t?.reasoningEffort&&e.reasoning&&s.supportsReasoningEffort)a.reasoning_effort=e.thinkingLevelMap?.[t.reasoningEffort]??t.reasoningEffort;else if(!t?.reasoningEffort&&e.reasoning&&s.supportsReasoningEffort){let o=e.thinkingLevelMap?.off;if(typeof o==="string")a.reasoning_effort=o}if(T&&p!==void 0)Object.assign(a,{[T]:p});if(e.compat?.openRouterRouting)a.provider=e.compat.openRouterRouting;if(e.compat?.vercelGatewayRouting){let o=e.compat.vercelGatewayRouting;if(o.only||o.order){let f={};if(o.only)f.only=o.only;if(o.order)f.order=o.order;a.providerOptions={gateway:f}}}let d=gt(e,t?.reasoningEffort??"off",t?.samplingParams);if(d)Object.assign(a,d);return a}function Le(e){if(e.thinkingTokenBudgetField)return e.thinkingTokenBudgetField;if(e.supportsThinkingTokenBudget)return"thinking_token_budget";return}function qe(e,n,t){if(!n?.reasoningEffort||!e.reasoning)return;let s=t.max_tokens??t.max_completion_tokens??e.maxTokens,u=Go(qo(n.reasoningEffort,n.thinkingBudgets),s);return u>0?u:void 0}function re(e,n,t,s){let u={};for(let[r,k]of Object.entries(t)){let g=De(e,n,k,s);if(g!==void 0)u[r]=g}return Object.keys(u).length>0?u:void 0}function De(e,n,t,s){if(typeof t!=="object"||t===null)return t;let u=n?.reasoningEffort;if(!u&&t.omitWhenOff)return;if(t.$var==="thinking.enabled")return!!u;if(t.$var==="thinking.budget")return s;let r=u?e.thinkingLevelMap?.[u]:e.thinkingLevelMap?.off;return r===void 0?u:typeof r==="string"?r:void 0}function ze(e,n){if(e.cacheControlFormat!=="anthropic"||n==="none")return;let t=n==="long"&&e.supportsLongCacheRetention?"1h":void 0;return{type:"ephemeral",...t?{ttl:t}:{}}}function Ge(e,n,t){Ne(e,t),$e(n,t),je(e,t)}function Ne(e,n){for(let t of e)if(t.role==="system"||t.role==="developer"){Ke(t,n);return}}function je(e,n){for(let t=e.length-1;t>=0;t--){let s=e[t];if(s.role==="user"||s.role==="assistant"||s.role==="tool"){if(He(s,n))return}}}function $e(e,n){if(!e||e.length===0)return;let t=e[e.length-1];t.cache_control=n}function Ke(e,n){return fe(e,n)}function He(e,n){if(e.role==="user"||e.role==="assistant"||e.role==="tool")return fe(e,n);return!1}function fe(e,n){let t=e.content;if(typeof t==="string"){if(t.length===0)return!1;return e.content=[{type:"text",text:t,cache_control:n}],!0}if(!Array.isArray(t))return!1;for(let s=t.length-1;s>=0;s--){let u=t[s];if(u?.type==="text"){let r=u;return r.cache_control=n,!0}}return!1}function We(e,n,t,s){let u=ae(n,t.supportsMidConvoSystemMessages),r=[],k=(p)=>{if(p.includes("|")){let d=p.indexOf("|"),o=p.slice(0,d).replace(/[^a-zA-Z0-9_-]/g,"_"),f=p.slice(d+1).replace(/[^a-zA-Z0-9_-]/g,"_"),h=f.length>0?`${o}_${f}`:o;if(h.length<=40)return h;let C=st(p).slice(0,8);return`${o.slice(0,Math.max(1,40-C.length-1))}_${C}`}if(e.provider==="openai")return p.length>40?p.slice(0,40):p;return p},g=we(u.messages,e,(p)=>k(p)),R=Ae(u.messages,t.supportsMidConvoSystemMessages===!0&&t.supportsMidConvoToolAdditions===!0),a=e.reasoning&&t.supportsDeveloperRole?"developer":"system",T=null;for(let p=0;p<g.length;p++){let d=g[p];if(t.requiresAssistantAfterToolResult&&T==="toolResult"&&d.role==="user")r.push({role:"assistant",content:"I have processed the tool results."});if(d.role==="system"){let o=p>0&&R.anchorsAdditions?d.toolsAdded??[]:[];if(o.length>0){let h={role:"system",tools:le(o,t)};r.push(h)}let f=p===0?q(d):Ue(d);if(f.length>0)r.push({role:a,content:w(f)})}else if(d.role==="user")if(typeof d.content==="string")r.push({role:"user",content:w(d.content)});else{let o=d.content.filter((f)=>f.type!=="text"||f.text.length>0).map((f)=>{if(f.type==="text")return{type:"text",text:w(f.text)};else return{type:"image_url",image_url:{url:`data:${f.mimeType};base64,${f.data}`}}});if(o.length===0)continue;r.push({role:"user",content:o})}else if(d.role==="assistant"){let o={role:"assistant",content:t.requiresAssistantAfterToolResult?"":null},f=d.content.filter(te).filter((l)=>l.text.trim().length>0).map((l)=>({type:"text",text:w(l.text)})),h=f.map((l)=>l.text).join(""),C=d.content.filter(ke),M=d.content.filter(Te),L=C.map((l)=>Me(l.thinkingSignature)).find((l)=>l!==void 0),b=M.map((l)=>Ie(l.thoughtSignature)).filter((l)=>l!==void 0),O=L??(b.length>0?b:void 0),v=C.filter((l)=>l.thinking.trim().length>0);if(v.length>0)if(t.requiresThinkingAsText){let l=v.map((I)=>w(I.thinking)).join(`
4
+
5
+ `);o.content=[{type:"text",text:l},...f]}else{if(h.length>0)o.content=h;if(!O){let l=v[0].thinkingSignature;if(e.provider==="opencode-go"&&l==="reasoning")l="reasoning_content";if(l&&Oe(l))o[l]=v.map((I)=>I.thinking).join(`
6
+ `)}}else if(h.length>0)o.content=h;if(M.length>0)o.tool_calls=M.map((l)=>{let I=s?.grammarToolInputProperties?.get(l.name);if(I!==void 0)return{id:l.id,type:"custom",custom:{name:l.name,input:w(en(l.name,l.arguments,I))}};return{id:l.id,type:"function",function:{name:l.name,arguments:JSON.stringify(l.arguments)}}});if(O)o.reasoning_details=O;if(t.requiresReasoningContentOnAssistantMessages&&e.reasoning&&o.reasoning_content===void 0)o.reasoning_content="";let B=o.content;if(!(B!==null&&B!==void 0&&(typeof B==="string"?B.length>0:B.length>0))&&!o.tool_calls)continue;r.push(o)}else if(d.role==="toolResult"){let o=[],f=p;for(;f<g.length&&g[f].role==="toolResult";f++){let h=g[f],C=h.content.filter(te).map((v)=>v.text).join(`
7
+ `),M=h.content.some((v)=>v.type==="image"),b=C.length>0?C:M?"(see attached image)":"(no tool output)",O={role:"tool",content:w(b),tool_call_id:h.toolCallId};if(t.requiresToolResultName&&h.toolName)O.name=h.toolName;if(r.push(O),M&&e.input.includes("image")){for(let v of h.content)if(xe(v))o.push({type:"image_url",image_url:{url:`data:${v.mimeType};base64,${v.data}`}})}}if(p=f-1,o.length>0){if(t.requiresAssistantAfterToolResult)r.push({role:"assistant",content:"I have processed the tool results."});r.push({role:"user",content:[{type:"text",text:"Attached image(s) from tool result:"},...o]}),T="user"}else T="toolResult";continue}T=d.role}return r}function le(e,n){return e.map((t)=>{let s=mr(t,n.supportsOpenAIGrammarTools);if(s)return{type:"custom",custom:{name:t.name,description:t.description,format:{type:"grammar",grammar:{syntax:s.format,definition:s.definition}}}};let u=he(t,n.supportsStrictMode!==!1);return{type:"function",function:{name:t.name,description:t.description,parameters:Se(t,u),...n.supportsStrictMode!==!1&&{strict:u??!1}}}})}function oe(e,n){let t=e.prompt_tokens||0,s=e.prompt_tokens_details?.cached_tokens??e.prompt_cache_hit_tokens??e.cached_tokens??0,u=e.prompt_tokens_details?.cache_write_tokens||0,r=Math.max(0,t-s-u),k=e.completion_tokens||0,g={input:r,output:k,cacheRead:s,cacheWrite:u,reasoning:e.completion_tokens_details?.reasoning_tokens||0,totalTokens:r+k+s+u,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}};return Z(n,g),g}function Je(e){if(e===null)return{stopReason:"stop"};switch(e){case"stop":case"end":return{stopReason:"stop"};case"length":return{stopReason:"length"};case"function_call":case"tool_calls":return{stopReason:"toolUse"};case"content_filter":return{stopReason:"error",errorMessage:"Provider finish_reason: content_filter"};case"network_error":return{stopReason:"error",errorMessage:"Provider finish_reason: network_error"};default:return{stopReason:"error",errorMessage:`Provider finish_reason: ${e}`}}}function Ve(e){let{provider:n,baseUrl:t}=e,s=n==="zai"||n==="zai-coding-cn"||t.includes("api.z.ai")||t.includes("open.bigmodel.cn"),u=n==="together"||t.includes("api.together.ai")||t.includes("api.together.xyz"),r=n==="moonshotai"||n==="moonshotai-cn"||t.includes("api.moonshot."),k=n==="openrouter"||t.includes("openrouter.ai"),g=n==="cloudflare-workers-ai"||t.includes("api.cloudflare.com"),R=n==="cloudflare-ai-gateway"||t.includes("gateway.ai.cloudflare.com"),a=n==="nvidia"||t.includes("integrate.api.nvidia.com"),T=n==="ant-ling"||t.includes("api.ant-ling.com"),p=n==="cerebras"||t.includes("cerebras.ai"),d=n==="deepseek"||t.toLowerCase().includes("deepseek.com"),o=a||p||n==="xai"||t.includes("api.x.ai")||u||t.includes("chutes.ai")||d||s||r||n==="opencode"||t.includes("opencode.ai")||g||R||T,f=t.includes("chutes.ai")||d||r||R||u||a||T||s,h=n==="xai"||t.includes("api.x.ai"),C=k&&(e.id.startsWith("anthropic/")||e.id.startsWith("openai/")),M=n==="openrouter"&&e.id.startsWith("anthropic/")?"anthropic":void 0;return{supportsStore:!o,supportsDeveloperRole:C||!o&&!k,supportsReasoningEffort:!h&&!s&&!r&&!u&&!R&&!a&&!T,supportsUsageInStreaming:!0,supportsFinishReason:!0,maxTokensField:f?"max_tokens":"max_completion_tokens",requiresToolResultName:!1,requiresAssistantAfterToolResult:!1,requiresThinkingAsText:!1,requiresReasoningContentOnAssistantMessages:d,thinkingFormat:d?"deepseek":s?"zai":u?"together":T?"ant-ling":k?"openrouter":"openai",openRouterRouting:{},vercelGatewayRouting:{},chatTemplateKwargs:{},chatTemplateArgs:{},zaiToolStream:!1,supportsThinkingTokenBudget:!1,thinkingTokenBudgetField:void 0,supportsStrictMode:!1,supportsOpenAIGrammarTools:!1,supportsMidConvoSystemMessages:!1,supportsMidConvoToolAdditions:!1,cacheControlFormat:M,sendSessionAffinityHeaders:k,sessionAffinityFormat:k?"openrouter":"openai",supportsLongCacheRetention:!(u||g||R||a||T)}}function N(e){let n=Ve(e);if(!e.compat)return n;return{supportsStore:e.compat.supportsStore??n.supportsStore,supportsDeveloperRole:e.compat.supportsDeveloperRole??n.supportsDeveloperRole,supportsReasoningEffort:e.compat.supportsReasoningEffort??n.supportsReasoningEffort,supportsUsageInStreaming:e.compat.supportsUsageInStreaming??n.supportsUsageInStreaming,supportsFinishReason:e.compat.supportsFinishReason??n.supportsFinishReason,maxTokensField:e.compat.maxTokensField??n.maxTokensField,requiresToolResultName:e.compat.requiresToolResultName??n.requiresToolResultName,requiresAssistantAfterToolResult:e.compat.requiresAssistantAfterToolResult??n.requiresAssistantAfterToolResult,requiresThinkingAsText:e.compat.requiresThinkingAsText??n.requiresThinkingAsText,requiresReasoningContentOnAssistantMessages:e.compat.requiresReasoningContentOnAssistantMessages??n.requiresReasoningContentOnAssistantMessages,thinkingFormat:e.compat.thinkingFormat??n.thinkingFormat,openRouterRouting:e.compat.openRouterRouting??{},vercelGatewayRouting:e.compat.vercelGatewayRouting??n.vercelGatewayRouting,chatTemplateKwargs:e.compat.chatTemplateKwargs??n.chatTemplateKwargs,chatTemplateArgs:e.compat.chatTemplateArgs??n.chatTemplateArgs,zaiToolStream:e.compat.zaiToolStream??n.zaiToolStream,supportsThinkingTokenBudget:e.compat.supportsThinkingTokenBudget??n.supportsThinkingTokenBudget,thinkingTokenBudgetField:e.compat.thinkingTokenBudgetField??n.thinkingTokenBudgetField,supportsStrictMode:e.compat.supportsStrictMode??n.supportsStrictMode,supportsOpenAIGrammarTools:e.compat.supportsOpenAIGrammarTools??n.supportsOpenAIGrammarTools,supportsMidConvoSystemMessages:e.compat.supportsMidConvoSystemMessages??n.supportsMidConvoSystemMessages,supportsMidConvoToolAdditions:e.compat.supportsMidConvoToolAdditions??n.supportsMidConvoToolAdditions,cacheControlFormat:e.compat.cacheControlFormat??n.cacheControlFormat,sendSessionAffinityHeaders:e.compat.sendSessionAffinityHeaders??n.sendSessionAffinityHeaders,sessionAffinityFormat:e.compat.sessionAffinityFormat??n.sessionAffinityFormat,supportsLongCacheRetention:e.compat.supportsLongCacheRetention??n.supportsLongCacheRetention,vllmPriority:e.compat.vllmPriority}}export{We as convertMessages,be as stream,yt as streamSimple};