@qitqode/qitqode-android-arm64 0.2.2 → 0.2.3

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 (427) hide show
  1. package/bun +0 -0
  2. package/bundle/{chunk-2hv2c8d5.js → chunk-0428v6mw.js} +1 -1
  3. package/bundle/{chunk-0f3ft9dh.js → chunk-05ck7acg.js} +1 -1
  4. package/bundle/{chunk-3888asr7.js → chunk-083wpv6r.js} +1 -1
  5. package/bundle/{chunk-j5ymkhry.js → chunk-0cnwsf8p.js} +1 -1
  6. package/bundle/{chunk-7z884mz2.js → chunk-0nbteyb0.js} +2 -2
  7. package/bundle/chunk-0nqf1k20.js +2 -0
  8. package/bundle/chunk-0ppnq3a4.js +2 -0
  9. package/bundle/{chunk-6kf4vw2g.js → chunk-0qd3567w.js} +1 -1
  10. package/bundle/{chunk-jw114bbt.js → chunk-0smnwqk6.js} +2 -2
  11. package/bundle/chunk-0te0vcdn.js +2 -0
  12. package/bundle/{chunk-xmjntwjc.js → chunk-0vakk88p.js} +2 -2
  13. package/bundle/{chunk-45fyv9f1.js → chunk-0vxnkstz.js} +2 -2
  14. package/bundle/{chunk-q4fn41ex.js → chunk-0xrb12s8.js} +2 -2
  15. package/bundle/chunk-11h06z17.js +2 -0
  16. package/bundle/chunk-16w710kf.js +3 -0
  17. package/bundle/{chunk-6dfjtzqb.js → chunk-21rq4592.js} +2 -2
  18. package/bundle/{chunk-y3dfk6n5.js → chunk-24rkf2gk.js} +1 -1
  19. package/bundle/{chunk-rdwma0de.js → chunk-24ygjbpf.js} +2 -2
  20. package/bundle/chunk-262s2yz2.js +2 -0
  21. package/bundle/chunk-28yv4fqe.js +2 -0
  22. package/bundle/{chunk-3tmq81kq.js → chunk-2drzgtv3.js} +2 -2
  23. package/bundle/{chunk-xd3xc1vv.js → chunk-2md6sx8d.js} +1 -1
  24. package/bundle/{chunk-v9rg0a8g.js → chunk-313zqzc1.js} +1 -1
  25. package/bundle/{chunk-zfd70p01.js → chunk-32j0q58h.js} +1 -1
  26. package/bundle/chunk-34a52hyr.js +2 -0
  27. package/bundle/{chunk-86jsqc7d.js → chunk-39z96pc6.js} +3 -3
  28. package/bundle/{chunk-t1475j9f.js → chunk-3atcc483.js} +1 -1
  29. package/bundle/{chunk-e6wp96vm.js → chunk-3jf3jhrs.js} +1 -1
  30. package/bundle/{chunk-4sxg9cgr.js → chunk-3kpse7zy.js} +1 -1
  31. package/bundle/chunk-3n3gb3vd.js +2 -0
  32. package/bundle/chunk-3sq60y9f.js +2 -0
  33. package/bundle/{chunk-2qwmrp16.js → chunk-3vvd7j14.js} +1 -1
  34. package/bundle/chunk-4086z5ys.js +2 -0
  35. package/bundle/{chunk-rcyzqa3g.js → chunk-450fef7h.js} +2 -2
  36. package/bundle/{chunk-kxjrrdj0.js → chunk-45a4n21f.js} +1 -1
  37. package/bundle/{chunk-xny5ecn0.js → chunk-47k5jy1p.js} +2 -2
  38. package/bundle/{chunk-6f8qqbac.js → chunk-47z3x3dp.js} +166 -205
  39. package/bundle/{chunk-0gab4v98.js → chunk-48r70n4s.js} +1 -1
  40. package/bundle/chunk-49mbnqvc.js +2 -0
  41. package/bundle/{chunk-ssdw9zre.js → chunk-49xhybc2.js} +1 -1
  42. package/bundle/{chunk-t9zbp2qw.js → chunk-4agaj51z.js} +1 -1
  43. package/bundle/{chunk-mrn44msr.js → chunk-4dnntf9k.js} +2 -2
  44. package/bundle/chunk-4fr6kae9.js +2 -0
  45. package/bundle/chunk-4websxrs.js +2 -0
  46. package/bundle/chunk-516w1nc4.js +2 -0
  47. package/bundle/chunk-52w60e1f.js +2 -0
  48. package/bundle/chunk-535nm66j.js +2 -0
  49. package/bundle/{chunk-1p6jjrea.js → chunk-55fcmswd.js} +2 -2
  50. package/bundle/{chunk-n7kqdqkh.js → chunk-55ykn8nz.js} +4 -4
  51. package/bundle/chunk-565855py.js +2 -0
  52. package/bundle/chunk-56v352f8.js +2 -0
  53. package/bundle/chunk-5bjtq8t2.js +2 -0
  54. package/bundle/{chunk-as845ya4.js → chunk-5c2438af.js} +1 -1
  55. package/bundle/chunk-5kpxpm8e.js +2 -0
  56. package/bundle/chunk-5nm5s0h2.js +2 -0
  57. package/bundle/{chunk-07s30fpb.js → chunk-5nrc5rhh.js} +1 -1
  58. package/bundle/{chunk-jwph7tpc.js → chunk-5pwv2p3s.js} +1 -1
  59. package/bundle/{chunk-q5abwn50.js → chunk-5pzs51sp.js} +1 -1
  60. package/bundle/{chunk-r0s28gnb.js → chunk-5tky3csh.js} +1 -1
  61. package/bundle/{chunk-yajd975f.js → chunk-5w76kdjr.js} +1 -1
  62. package/bundle/{chunk-wcqfr8vr.js → chunk-5ysbwr4x.js} +1 -1
  63. package/bundle/{chunk-85xh72hk.js → chunk-5zkj5xv9.js} +2 -2
  64. package/bundle/{chunk-fgn83bs7.js → chunk-65bmsp2t.js} +1 -1
  65. package/bundle/chunk-65t9b9eq.js +3 -0
  66. package/bundle/{chunk-9jrxrjzt.js → chunk-68v3b6ns.js} +2 -2
  67. package/bundle/{chunk-7ntw4rrn.js → chunk-6ar91jvd.js} +1 -1
  68. package/bundle/{chunk-bbbh69ys.js → chunk-6evh2ke8.js} +1 -1
  69. package/bundle/chunk-6gpf2bjs.js +2 -0
  70. package/bundle/{chunk-a2dz9nqh.js → chunk-6m9jb0s9.js} +2 -2
  71. package/bundle/{chunk-yvjke593.js → chunk-6scf311w.js} +1 -1
  72. package/bundle/{chunk-e374shb8.js → chunk-6tstcwxp.js} +2 -2
  73. package/bundle/{chunk-5wwd40t3.js → chunk-70q8qcb2.js} +1 -1
  74. package/bundle/{chunk-pfkm3j8g.js → chunk-73r8bjjz.js} +2 -2
  75. package/bundle/{chunk-9bm9z52r.js → chunk-78pt314g.js} +1 -1
  76. package/bundle/{chunk-hs3vfhar.js → chunk-7bcm7gg1.js} +1 -1
  77. package/bundle/chunk-7bgzcpdw.js +2 -0
  78. package/bundle/{chunk-ezfzb8qc.js → chunk-7g66qc1v.js} +2 -2
  79. package/bundle/{chunk-fd7fmvyw.js → chunk-7hvf9dgx.js} +1 -1
  80. package/bundle/chunk-7kjvcbwa.js +2 -0
  81. package/bundle/chunk-7knnz5f1.js +2 -0
  82. package/bundle/{chunk-6j339s7a.js → chunk-7mppvhv9.js} +2 -2
  83. package/bundle/{chunk-kmwy6c9g.js → chunk-7vmx8bg9.js} +2 -2
  84. package/bundle/{chunk-7njz51r4.js → chunk-7x6yrtzn.js} +1 -1
  85. package/bundle/{chunk-skv9ww0s.js → chunk-804vmbcd.js} +1 -1
  86. package/bundle/{chunk-7zc04q43.js → chunk-88q0mtgp.js} +2 -2
  87. package/bundle/chunk-8jma2btf.js +2 -0
  88. package/bundle/{chunk-dbztxdea.js → chunk-8mm92zn2.js} +2 -2
  89. package/bundle/{chunk-kdcnder5.js → chunk-8wwdrwf2.js} +1 -1
  90. package/bundle/{chunk-4fk46ngj.js → chunk-920z7g7j.js} +1 -1
  91. package/bundle/chunk-93e0w75z.js +2 -0
  92. package/bundle/{chunk-pzefsndd.js → chunk-953pqp3w.js} +1 -1
  93. package/bundle/chunk-96wwns35.js +2 -0
  94. package/bundle/chunk-97gp818s.js +2 -0
  95. package/bundle/chunk-9epf2zbh.js +2 -0
  96. package/bundle/chunk-9fyz4sxa.js +2 -0
  97. package/bundle/{chunk-4hd3v58j.js → chunk-9hz56z6a.js} +1 -1
  98. package/bundle/{chunk-rk2bk4s7.js → chunk-9zm6r55d.js} +2 -2
  99. package/bundle/chunk-a7wmadf1.js +2 -0
  100. package/bundle/{chunk-w7em72p8.js → chunk-ac7482n2.js} +2 -2
  101. package/bundle/chunk-agv04nt7.js +2 -0
  102. package/bundle/{chunk-cbmwhvxw.js → chunk-at22twxx.js} +2 -2
  103. package/bundle/{chunk-frsd6e1h.js → chunk-avefgbjg.js} +2 -2
  104. package/bundle/chunk-azpnrnv9.js +8251 -0
  105. package/bundle/{chunk-z2h1gxyx.js → chunk-bbng1cea.js} +1 -1
  106. package/bundle/{chunk-5az84brc.js → chunk-bd21p9zz.js} +2 -2
  107. package/bundle/chunk-be7smmar.js +2 -0
  108. package/bundle/{chunk-y4e7e42x.js → chunk-bne5w117.js} +4 -4
  109. package/bundle/{chunk-j3jqk62r.js → chunk-bqn6bqws.js} +1 -1
  110. package/bundle/{chunk-yhsnmpzv.js → chunk-brws2aht.js} +1 -1
  111. package/bundle/chunk-bryx5cx9.js +2 -0
  112. package/bundle/{chunk-vtw0wwch.js → chunk-bvf2dcq4.js} +3 -3
  113. package/bundle/{chunk-tge53d52.js → chunk-bwbqkfv0.js} +1 -1
  114. package/bundle/chunk-c13rrw41.js +2 -0
  115. package/bundle/chunk-c2kkv619.js +2 -0
  116. package/bundle/{chunk-64c8q9zg.js → chunk-c36p881g.js} +3 -3
  117. package/bundle/chunk-c5xj1y5v.js +2 -0
  118. package/bundle/chunk-c74cxhjb.js +2 -0
  119. package/bundle/chunk-cejyed1j.js +2 -0
  120. package/bundle/chunk-ckpm4dvv.js +2 -0
  121. package/bundle/{chunk-732yr6qq.js → chunk-cmb62jkt.js} +2 -2
  122. package/bundle/chunk-ct8twng1.js +2 -0
  123. package/bundle/{chunk-1q1cddy4.js → chunk-cz5vta94.js} +1 -1
  124. package/bundle/{chunk-fpm2vgz6.js → chunk-d0x5pbkm.js} +1 -1
  125. package/bundle/chunk-d38y7bvh.js +2 -0
  126. package/bundle/chunk-d6hxsfm6.js +2 -0
  127. package/bundle/{chunk-29zm623f.js → chunk-d6jhs818.js} +2 -2
  128. package/bundle/chunk-descb9jz.js +2 -0
  129. package/bundle/{chunk-mswx4k75.js → chunk-dnnkq5y4.js} +2 -2
  130. package/bundle/{chunk-6pcmv8vs.js → chunk-dnsh1v42.js} +2 -2
  131. package/bundle/{chunk-vk88jj60.js → chunk-dqp4nmxs.js} +1 -1
  132. package/bundle/chunk-dvr2b9r1.js +2 -0
  133. package/bundle/{chunk-s0ty36qg.js → chunk-dxdggn90.js} +1 -1
  134. package/bundle/{chunk-w30b563s.js → chunk-e8p92vz4.js} +2 -2
  135. package/bundle/chunk-ea5fktnn.js +2 -0
  136. package/bundle/{chunk-t1jgx17a.js → chunk-eg3syjtv.js} +2 -2
  137. package/bundle/{chunk-2a9rzgk6.js → chunk-ehb4hd9c.js} +1 -1
  138. package/bundle/{chunk-9jsgs71h.js → chunk-ejqzcdcx.js} +1 -1
  139. package/bundle/chunk-enmsp09e.js +3 -0
  140. package/bundle/chunk-epgcsjfp.js +2 -0
  141. package/bundle/{chunk-5t0w9ecw.js → chunk-et3804wr.js} +1 -1
  142. package/bundle/{chunk-yd8bzhv6.js → chunk-ezrqhqkp.js} +1 -1
  143. package/bundle/chunk-f0t7rryn.js +3 -0
  144. package/bundle/{chunk-p635phfw.js → chunk-f31yvp20.js} +1 -1
  145. package/bundle/chunk-f4mf6tpp.js +2 -0
  146. package/bundle/chunk-f97k17t8.js +2 -0
  147. package/bundle/{chunk-yx1h0b5v.js → chunk-faee8zgc.js} +1 -1
  148. package/bundle/{chunk-p9mj4zyk.js → chunk-ff548b0j.js} +2 -2
  149. package/bundle/{chunk-bgng3rdj.js → chunk-fhqfqd5v.js} +2 -2
  150. package/bundle/{chunk-zek5c15t.js → chunk-fjbv3jht.js} +1 -1
  151. package/bundle/{chunk-epa576pa.js → chunk-fsahzvd5.js} +3 -3
  152. package/bundle/chunk-g06a4chw.js +2 -0
  153. package/bundle/{chunk-hq9bgnqb.js → chunk-g22e4gw7.js} +1 -1
  154. package/bundle/{chunk-s0ptrw0z.js → chunk-g3wvtyw3.js} +1 -1
  155. package/bundle/{chunk-x4pdpka8.js → chunk-g42krp0z.js} +1 -1
  156. package/bundle/chunk-g4ehhdzp.js +2 -0
  157. package/bundle/{chunk-a9y27zd2.js → chunk-gbkz04ke.js} +1 -1
  158. package/bundle/chunk-gd6qpdjw.js +2 -0
  159. package/bundle/chunk-gehn9fd9.js +2 -0
  160. package/bundle/{chunk-0zxwjsvz.js → chunk-ggxzf22k.js} +1 -1
  161. package/bundle/{chunk-kzvvvj79.js → chunk-gszvgz76.js} +2 -2
  162. package/bundle/{chunk-g3kd4957.js → chunk-gy21fw82.js} +2 -2
  163. package/bundle/{chunk-cbf1y12x.js → chunk-h62chdmw.js} +1 -1
  164. package/bundle/{chunk-et5dnymk.js → chunk-h823m51m.js} +2 -2
  165. package/bundle/{chunk-5js6a6gf.js → chunk-h99tj1e4.js} +1 -1
  166. package/bundle/{chunk-c1g8n10t.js → chunk-ha1w0xzh.js} +1 -1
  167. package/bundle/chunk-ha8b2n4x.js +2 -0
  168. package/bundle/{chunk-rpfhgncs.js → chunk-has2rz35.js} +1 -1
  169. package/bundle/chunk-hbyrwmne.js +2 -0
  170. package/bundle/chunk-hhax4mxw.js +2 -0
  171. package/bundle/{chunk-087tnr8a.js → chunk-hwrrrbqd.js} +1 -1
  172. package/bundle/chunk-hzrxmdqm.js +2 -0
  173. package/bundle/{chunk-yd2emszh.js → chunk-j0bwa5dk.js} +2 -2
  174. package/bundle/{chunk-9b4aqcde.js → chunk-j164q40b.js} +2 -2
  175. package/bundle/{chunk-qhnpq5gb.js → chunk-j8fcfhr2.js} +2 -2
  176. package/bundle/{chunk-9ea1n338.js → chunk-j9h1sp4g.js} +2 -2
  177. package/bundle/{chunk-yrfq22a5.js → chunk-jg1ccs3j.js} +1 -1
  178. package/bundle/{chunk-d307vb2d.js → chunk-jqk3v8d6.js} +1 -1
  179. package/bundle/chunk-jrwnz64e.js +3 -0
  180. package/bundle/chunk-jvkzdap1.js +2 -0
  181. package/bundle/chunk-jvybgsz5.js +5 -0
  182. package/bundle/{chunk-pp9neaaz.js → chunk-jww55nk9.js} +1 -1
  183. package/bundle/{chunk-fvy24yhq.js → chunk-k1nh5sd2.js} +1 -1
  184. package/bundle/{chunk-wfggztm4.js → chunk-k4gsktts.js} +1 -1
  185. package/bundle/{chunk-qaz100ht.js → chunk-k5q9px67.js} +1 -1
  186. package/bundle/chunk-kg8fcv91.js +2 -0
  187. package/bundle/chunk-kgptyf7n.js +3 -0
  188. package/bundle/{chunk-b50t4jc5.js → chunk-khzzmyk2.js} +1 -1
  189. package/bundle/chunk-kjjjrjnb.js +2 -0
  190. package/bundle/{chunk-jvjq554f.js → chunk-ksme3gj1.js} +1 -1
  191. package/bundle/chunk-m5cfmhwh.js +2 -0
  192. package/bundle/{chunk-4v61ysex.js → chunk-m5dm7a1t.js} +1 -1
  193. package/bundle/{chunk-yr35q7q1.js → chunk-m7ganre7.js} +1 -1
  194. package/bundle/chunk-m7qxxbns.js +2 -0
  195. package/bundle/{chunk-y287zwkr.js → chunk-mh19kwzw.js} +1 -1
  196. package/bundle/{chunk-7my2231h.js → chunk-mhhtf0v3.js} +1 -1
  197. package/bundle/{chunk-grw4gg9j.js → chunk-mjjaezwq.js} +2 -2
  198. package/bundle/{chunk-03mbn7nj.js → chunk-mmjgf680.js} +2 -2
  199. package/bundle/{chunk-jv4th87b.js → chunk-mn9end71.js} +1 -1
  200. package/bundle/{chunk-543pt030.js → chunk-msdypt5f.js} +2 -2
  201. package/bundle/chunk-n0b0dfqk.js +2 -0
  202. package/bundle/{chunk-3h49k2ck.js → chunk-n23d0q00.js} +1 -1
  203. package/bundle/{chunk-mpe8zxc0.js → chunk-n78f8hfk.js} +1 -1
  204. package/bundle/chunk-n8wg5h5p.js +2 -0
  205. package/bundle/{chunk-9s785py4.js → chunk-nbd13scz.js} +1 -1
  206. package/bundle/{chunk-sjreby6e.js → chunk-nftgx6bz.js} +1 -1
  207. package/bundle/{chunk-gr4bctqj.js → chunk-nj1ntakd.js} +2 -2
  208. package/bundle/{chunk-wdaf713t.js → chunk-nrat6ncm.js} +1 -1
  209. package/bundle/{chunk-rm5ntsvn.js → chunk-nty5z2cj.js} +1 -1
  210. package/bundle/chunk-nvwzam7a.js +2 -0
  211. package/bundle/{chunk-rp8asmq7.js → chunk-p169ee92.js} +1 -1
  212. package/bundle/chunk-p27a88vp.js +7 -0
  213. package/bundle/{chunk-h10wjk96.js → chunk-p3rd2q47.js} +2 -2
  214. package/bundle/{chunk-fbm6qczy.js → chunk-p4027t94.js} +1 -1
  215. package/bundle/{chunk-94qhpkfx.js → chunk-p54bzjtv.js} +1 -1
  216. package/bundle/{chunk-cp39f96a.js → chunk-p5be5ddp.js} +1 -1
  217. package/bundle/{chunk-ngvp6zc2.js → chunk-p6crzjtf.js} +2 -2
  218. package/bundle/chunk-p6hcj3kv.js +2 -0
  219. package/bundle/{chunk-p4ewy9xh.js → chunk-pb30kkbs.js} +6 -6
  220. package/bundle/chunk-pexmns0j.js +2 -0
  221. package/bundle/{chunk-my3cswnp.js → chunk-ph8hn1wt.js} +2 -2
  222. package/bundle/{chunk-99148b1k.js → chunk-pmg53fdd.js} +1 -1
  223. package/bundle/{chunk-wf4x5cjc.js → chunk-pr7z5dj8.js} +1 -1
  224. package/bundle/chunk-pt603np4.js +2 -0
  225. package/bundle/{chunk-4mvg7jt1.js → chunk-ptqk1j2r.js} +1 -1
  226. package/bundle/{chunk-a92hh67a.js → chunk-pxm4qvqk.js} +2 -2
  227. package/bundle/{chunk-3qfpw8f6.js → chunk-qey1efpx.js} +1 -1
  228. package/bundle/chunk-qk5bfcv8.js +2 -0
  229. package/bundle/{chunk-91z7azf7.js → chunk-qktzz0sy.js} +1 -1
  230. package/bundle/{chunk-ks1cs80p.js → chunk-qnvsqnz5.js} +2 -2
  231. package/bundle/{chunk-bcx2vkv4.js → chunk-qp1n7kwe.js} +1 -1
  232. package/bundle/{chunk-zcp0wx4j.js → chunk-qqrc1h5b.js} +2 -2
  233. package/bundle/{chunk-vyh300ac.js → chunk-qqxrvyx0.js} +2 -2
  234. package/bundle/chunk-qr06byhp.js +2 -0
  235. package/bundle/{chunk-8v6x712g.js → chunk-qrxqfp59.js} +2 -2
  236. package/bundle/{chunk-gtjn3yc4.js → chunk-qxcyz5hc.js} +2 -2
  237. package/bundle/{chunk-a550vst5.js → chunk-qznr1emx.js} +9 -9
  238. package/bundle/{chunk-tj3rem3q.js → chunk-r5zy4za0.js} +2 -2
  239. package/bundle/chunk-r7sq3maz.js +2 -0
  240. package/bundle/{chunk-f83wv08n.js → chunk-r9w0thdk.js} +1 -1
  241. package/bundle/chunk-rmgs9nmj.js +2 -0
  242. package/bundle/{chunk-p887g1xj.js → chunk-rn83r0js.js} +1 -1
  243. package/bundle/{chunk-8d6e4jg7.js → chunk-rp9r3cvt.js} +2 -2
  244. package/bundle/{chunk-n90eh3e7.js → chunk-rrv0n73b.js} +1 -1
  245. package/bundle/chunk-rscfes01.js +2 -0
  246. package/bundle/chunk-rytavefg.js +2 -0
  247. package/bundle/{chunk-g7k6ecb2.js → chunk-s2gg38y0.js} +1 -1
  248. package/bundle/{chunk-yz0pwv2m.js → chunk-s4vx9x1v.js} +1 -1
  249. package/bundle/{chunk-x2cavpa9.js → chunk-sfw5qddj.js} +1 -1
  250. package/bundle/chunk-sh9vjnsh.js +2 -0
  251. package/bundle/{chunk-6avjq7my.js → chunk-smznrv7k.js} +1 -1
  252. package/bundle/chunk-snbw69t6.js +2 -0
  253. package/bundle/chunk-st0c5wwc.js +2 -0
  254. package/bundle/{chunk-vqss3e48.js → chunk-t0761rhq.js} +2 -2
  255. package/bundle/{chunk-vqpfpmha.js → chunk-t239rvej.js} +2 -2
  256. package/bundle/{chunk-bggybm9k.js → chunk-t8c4cs6z.js} +1 -1
  257. package/bundle/chunk-tdyvps17.js +35 -0
  258. package/bundle/chunk-teb3k2sf.js +2 -0
  259. package/bundle/{chunk-ve3np791.js → chunk-tg226j37.js} +1 -1
  260. package/bundle/{chunk-73fz0cf4.js → chunk-tkrwcjkr.js} +2 -2
  261. package/bundle/{chunk-v5z6sx6j.js → chunk-tm34qp8j.js} +1 -1
  262. package/bundle/chunk-tr6rdr6h.js +4 -0
  263. package/bundle/chunk-ts798jvf.js +2 -0
  264. package/bundle/chunk-tx5aj02v.js +2 -0
  265. package/bundle/{chunk-3jms025t.js → chunk-tza09w2q.js} +1 -1
  266. package/bundle/chunk-v1t51rrq.js +2 -0
  267. package/bundle/{chunk-7ab3yw9j.js → chunk-v6h3nes1.js} +2 -2
  268. package/bundle/{chunk-e586sjb0.js → chunk-vcygx6hs.js} +2 -2
  269. package/bundle/{chunk-h2bmss2m.js → chunk-vdxar0ct.js} +1 -1
  270. package/bundle/{chunk-86yk21g4.js → chunk-venprxdp.js} +1 -1
  271. package/bundle/{chunk-ywkvq7zb.js → chunk-vf492zs6.js} +1 -1
  272. package/bundle/chunk-vh9ptqn0.js +2 -0
  273. package/bundle/{chunk-w79jzf8w.js → chunk-vnrjk2be.js} +1 -1
  274. package/bundle/{chunk-8q5ns61h.js → chunk-vshycswk.js} +1 -1
  275. package/bundle/{chunk-8e6gx3gg.js → chunk-vsz4s6zt.js} +1 -1
  276. package/bundle/{chunk-vhe92p7a.js → chunk-vygkwwjd.js} +2 -2
  277. package/bundle/{chunk-9rxyq6f9.js → chunk-w46g7kdq.js} +2 -2
  278. package/bundle/{chunk-q128vfc6.js → chunk-w4brava0.js} +1 -1
  279. package/bundle/{chunk-drwqag0f.js → chunk-w4synhfg.js} +1 -1
  280. package/bundle/chunk-w72rctxz.js +2 -0
  281. package/bundle/{chunk-mxhb5adq.js → chunk-w9gzfsy7.js} +2 -2
  282. package/bundle/chunk-wbw9zv3h.js +2 -0
  283. package/bundle/{chunk-q46pzk9z.js → chunk-wg55bwqh.js} +2 -2
  284. package/bundle/{chunk-1sfcxdbw.js → chunk-wkg3c643.js} +2 -2
  285. package/bundle/{chunk-2bgqy6z7.js → chunk-wwdpw27v.js} +1 -1
  286. package/bundle/{chunk-km1n4ttr.js → chunk-wy3a4cab.js} +1 -1
  287. package/bundle/{chunk-tczbhj0e.js → chunk-wyj8cpx5.js} +1 -1
  288. package/bundle/chunk-x6mw98c2.js +2 -0
  289. package/bundle/chunk-x9ptmxt7.js +2 -0
  290. package/bundle/{chunk-8rh0femq.js → chunk-xdd3553a.js} +1 -1
  291. package/bundle/{chunk-2jpmxt4v.js → chunk-xdteq9bd.js} +1 -1
  292. package/bundle/{chunk-9y15zjxa.js → chunk-xe69cnsk.js} +1 -1
  293. package/bundle/{chunk-s77qktcn.js → chunk-xq2kcar4.js} +2 -2
  294. package/bundle/{chunk-bk3z400e.js → chunk-y0527cg0.js} +1 -1
  295. package/bundle/{chunk-hrw5rmj1.js → chunk-y29ejqg2.js} +1 -1
  296. package/bundle/{chunk-42r7z6sq.js → chunk-y67kaj0b.js} +1 -1
  297. package/bundle/chunk-y6p57wgh.js +2 -0
  298. package/bundle/chunk-y6xs8v17.js +2 -0
  299. package/bundle/{chunk-zdzxsyxs.js → chunk-y7hgevfv.js} +2 -2
  300. package/bundle/{chunk-k1gddnkm.js → chunk-ybane1en.js} +1 -1
  301. package/bundle/{chunk-k6cbfrzc.js → chunk-yhj01dz9.js} +2 -2
  302. package/bundle/{chunk-2xqqkf86.js → chunk-ypdt9mmr.js} +2 -2
  303. package/bundle/chunk-yvn8dmah.js +2 -0
  304. package/bundle/{chunk-vm1ek7yf.js → chunk-yz25607t.js} +1 -1
  305. package/bundle/{chunk-ypcc3cnb.js → chunk-z1932c3f.js} +1 -1
  306. package/bundle/chunk-z3xsfpc6.js +2 -0
  307. package/bundle/chunk-z4kjxtjq.js +2 -0
  308. package/bundle/{chunk-6ypafpg8.js → chunk-z6sbjvtv.js} +1 -1
  309. package/bundle/chunk-z8mj4z6e.js +2 -0
  310. package/bundle/{chunk-ta7mfkms.js → chunk-zc0cdvcv.js} +2 -2
  311. package/bundle/chunk-zgv1e250.js +2 -0
  312. package/bundle/chunk-zn5pw733.js +2 -0
  313. package/bundle/{chunk-ywdtp534.js → chunk-ztyy3ga3.js} +2 -2
  314. package/bundle/chunk-zxwvnmea.js +2 -0
  315. package/bundle/index.js +3 -3
  316. package/bundle/parser.worker.js +2 -2
  317. package/bundle/qffi-compat.so +0 -0
  318. package/bundle/qffi.node +0 -0
  319. package/bundle/worker.js +1 -1
  320. package/package.json +1 -1
  321. package/bundle/chunk-0cdtq1r3.js +0 -2
  322. package/bundle/chunk-0ych0f5w.js +0 -2
  323. package/bundle/chunk-0yjdatm6.js +0 -3
  324. package/bundle/chunk-0ykeedfm.js +0 -2
  325. package/bundle/chunk-22hr3ndh.js +0 -2
  326. package/bundle/chunk-23tyxyyj.js +0 -2
  327. package/bundle/chunk-2517cev8.js +0 -2
  328. package/bundle/chunk-28g1ndpx.js +0 -2
  329. package/bundle/chunk-2avxtbv3.js +0 -2
  330. package/bundle/chunk-2faah8w1.js +0 -2
  331. package/bundle/chunk-2qk0k2eb.js +0 -2
  332. package/bundle/chunk-3c3xzz0g.js +0 -3
  333. package/bundle/chunk-42wdfks8.js +0 -2
  334. package/bundle/chunk-44y6dffe.js +0 -2
  335. package/bundle/chunk-4f19vqxf.js +0 -2
  336. package/bundle/chunk-4m3k1atq.js +0 -2
  337. package/bundle/chunk-4n2ytddp.js +0 -2
  338. package/bundle/chunk-4yg42p6y.js +0 -2
  339. package/bundle/chunk-4zx3ze68.js +0 -2
  340. package/bundle/chunk-637sjdzq.js +0 -2
  341. package/bundle/chunk-6h8f89tt.js +0 -2
  342. package/bundle/chunk-6sjj203r.js +0 -2
  343. package/bundle/chunk-79aka9xe.js +0 -2
  344. package/bundle/chunk-7nqdhe7x.js +0 -2
  345. package/bundle/chunk-7q003wdd.js +0 -4
  346. package/bundle/chunk-7x88b2n2.js +0 -2
  347. package/bundle/chunk-8apeexas.js +0 -3
  348. package/bundle/chunk-8mthftwc.js +0 -2
  349. package/bundle/chunk-8wdara3b.js +0 -2
  350. package/bundle/chunk-8xhzpnph.js +0 -2
  351. package/bundle/chunk-96sqbyvf.js +0 -2
  352. package/bundle/chunk-9akz8w0d.js +0 -2
  353. package/bundle/chunk-9etpppyv.js +0 -3
  354. package/bundle/chunk-9pnpmtb2.js +0 -2
  355. package/bundle/chunk-a5pbvp1f.js +0 -7
  356. package/bundle/chunk-a7p0x4sw.js +0 -2
  357. package/bundle/chunk-ae0a496j.js +0 -2
  358. package/bundle/chunk-aq1j9y18.js +0 -2
  359. package/bundle/chunk-aq8nz9hp.js +0 -2
  360. package/bundle/chunk-b4zy78be.js +0 -2
  361. package/bundle/chunk-basjzwqp.js +0 -2
  362. package/bundle/chunk-bhetpmgq.js +0 -3
  363. package/bundle/chunk-bm7xpjh6.js +0 -2
  364. package/bundle/chunk-c1bw1q75.js +0 -2
  365. package/bundle/chunk-c2k556rk.js +0 -2
  366. package/bundle/chunk-c47vp7ne.js +0 -2
  367. package/bundle/chunk-cbhgf058.js +0 -2
  368. package/bundle/chunk-d41mg7at.js +0 -2
  369. package/bundle/chunk-d50kpss6.js +0 -2
  370. package/bundle/chunk-day0rb5p.js +0 -2
  371. package/bundle/chunk-dp7cww4v.js +0 -2
  372. package/bundle/chunk-dy31mchw.js +0 -3
  373. package/bundle/chunk-e5rda9mx.js +0 -2
  374. package/bundle/chunk-e999xtfj.js +0 -2
  375. package/bundle/chunk-ehfxypks.js +0 -7610
  376. package/bundle/chunk-eyr0vf92.js +0 -2
  377. package/bundle/chunk-gbmmbhy4.js +0 -2
  378. package/bundle/chunk-gp877cq5.js +0 -2
  379. package/bundle/chunk-h4f582d6.js +0 -2
  380. package/bundle/chunk-h57c6ne3.js +0 -2
  381. package/bundle/chunk-hk8vvc10.js +0 -2
  382. package/bundle/chunk-hnrqhcgq.js +0 -2
  383. package/bundle/chunk-hwavzxdm.js +0 -2
  384. package/bundle/chunk-hwnc2sa5.js +0 -2
  385. package/bundle/chunk-hy86wfad.js +0 -2
  386. package/bundle/chunk-j17421hz.js +0 -2
  387. package/bundle/chunk-j2gvpa15.js +0 -2
  388. package/bundle/chunk-j7n8khk7.js +0 -2
  389. package/bundle/chunk-jkh98wby.js +0 -2
  390. package/bundle/chunk-k5a652s4.js +0 -2
  391. package/bundle/chunk-k6w32q2p.js +0 -2
  392. package/bundle/chunk-kghwk0yh.js +0 -2
  393. package/bundle/chunk-kh8de8re.js +0 -2
  394. package/bundle/chunk-mce8aa9y.js +0 -2
  395. package/bundle/chunk-me1ja46g.js +0 -2
  396. package/bundle/chunk-mgadsp7r.js +0 -2
  397. package/bundle/chunk-n0k0pp4k.js +0 -2
  398. package/bundle/chunk-n393nnh5.js +0 -2
  399. package/bundle/chunk-n5vyed7w.js +0 -2
  400. package/bundle/chunk-pasm65wq.js +0 -2
  401. package/bundle/chunk-phpmxjf8.js +0 -2
  402. package/bundle/chunk-q2q3dmg3.js +0 -2
  403. package/bundle/chunk-qvzvxsjw.js +0 -2
  404. package/bundle/chunk-racrb1b3.js +0 -2
  405. package/bundle/chunk-s0c0t6qr.js +0 -5
  406. package/bundle/chunk-sghy9s7m.js +0 -2
  407. package/bundle/chunk-skpkjnyy.js +0 -2
  408. package/bundle/chunk-skxhg212.js +0 -2
  409. package/bundle/chunk-snt4kwab.js +0 -2
  410. package/bundle/chunk-sq47t8f1.js +0 -2
  411. package/bundle/chunk-sqhgnvvs.js +0 -2
  412. package/bundle/chunk-t114r59h.js +0 -2
  413. package/bundle/chunk-t1f56k0j.js +0 -2
  414. package/bundle/chunk-t69jx6fz.js +0 -2
  415. package/bundle/chunk-tsb3jsx4.js +0 -2
  416. package/bundle/chunk-ttpbpzbh.js +0 -2
  417. package/bundle/chunk-v667egp5.js +0 -2
  418. package/bundle/chunk-vrv67tt0.js +0 -2
  419. package/bundle/chunk-wcx7hc2p.js +0 -635
  420. package/bundle/chunk-wv8qx8sa.js +0 -2
  421. package/bundle/chunk-xxrtr6sd.js +0 -2
  422. package/bundle/chunk-y2ptjam9.js +0 -3
  423. package/bundle/chunk-y6h35v4a.js +0 -2
  424. package/bundle/chunk-y72p79v2.js +0 -2
  425. package/bundle/chunk-y8eggnrr.js +0 -2
  426. package/bundle/chunk-y9q0f9qz.js +0 -2
  427. package/bundle/chunk-yck5h49c.js +0 -2
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Cp as V,Ep as f,Ip as hZ,Kp as R,Pp as l,Qp as U,Rp as B,Sp as fZ,Tp as x,Xp as gZ,Yo as O,cp as u,rp as yZ,sp as y,wp as h,zp as L}from"./chunk-my3cswnp.js";import{_p as v}from"./chunk-4mvg7jt1.js";import{qq as Q0,rq as U0,sq as L0}from"./chunk-mswx4k75.js";import{au as Z}from"./chunk-9ea1n338.js";import{LO as g,MO as c,PO as r}from"./chunk-f83wv08n.js";var m=c((E$,o)=>{var{defineProperty:_,getOwnPropertyDescriptor:aZ,getOwnPropertyNames:oZ}=Object,rZ=Object.prototype.hasOwnProperty,eZ=($,W)=>{for(var Q in W)_($,Q,{get:W[Q],enumerable:!0})},Z0=($,W,Q,X)=>{if(W&&typeof W==="object"||typeof W==="function"){for(let Y of oZ(W))if(!rZ.call($,Y)&&Y!==Q)_($,Y,{get:()=>W[Y],enumerable:!(X=aZ(W,Y))||X.enumerable})}return $},$0=($)=>Z0(_({},"__esModule",{value:!0}),$),t={};eZ(t,{SYMBOL_FOR_REQ_CONTEXT:()=>a,getContext:()=>W0});o.exports=$0(t);var a=Symbol.for("@vercel/request-context");function W0(){return globalThis[a]?.get?.()??{}}});var $Z=c((H$,ZZ)=>{var{defineProperty:i,getOwnPropertyDescriptor:X0,getOwnPropertyNames:Y0}=Object,j0=Object.prototype.hasOwnProperty,D0=($,W)=>{for(var Q in W)i($,Q,{get:W[Q],enumerable:!0})},K0=($,W,Q,X)=>{if(W&&typeof W==="object"||typeof W==="function"){for(let Y of Y0(W))if(!j0.call($,Y)&&Y!==Q)i($,Y,{get:()=>W[Y],enumerable:!(X=X0(W,Y))||X.enumerable})}return $},J0=($)=>K0(i({},"__esModule",{value:!0}),$),e={};D0(e,{getVercelOidcToken:()=>N0,getVercelOidcTokenSync:()=>p});ZZ.exports=J0(e);var A0=m(),F0=Q0();async function N0($){let W="",Q;try{W=p()}catch(X){Q=X}try{let[{getTokenPayload:X,isExpired:Y},{refreshToken:D}]=await Promise.all([await import("./chunk-basjzwqp.js").then((m)=>g(m.default)),await import("./chunk-bbbh69ys.js").then((m)=>g(m.default))]);if(!W||Y(X(W),$?.expirationBufferMs))await D($),W=p()}catch(X){let Y=Q instanceof Error?Q.message:"";if(X instanceof Error)Y=`${Y}
2
+ import{Ap as B,Bp as fZ,Cp as x,Gp as gZ,Ho as O,No as u,ap as yZ,bp as y,fp as h,ip as L,lp as V,np as f,rp as hZ,tp as R,yp as l,zp as U}from"./chunk-ph8hn1wt.js";import{Jp as v}from"./chunk-ptqk1j2r.js";import{$p as Q0,aq as U0,bq as L0}from"./chunk-dnnkq5y4.js";import{Jt as Z}from"./chunk-j9h1sp4g.js";import{sO as g,tO as c,wO as r}from"./chunk-r9w0thdk.js";var m=c((E$,o)=>{var{defineProperty:_,getOwnPropertyDescriptor:aZ,getOwnPropertyNames:oZ}=Object,rZ=Object.prototype.hasOwnProperty,eZ=($,W)=>{for(var Q in W)_($,Q,{get:W[Q],enumerable:!0})},Z0=($,W,Q,X)=>{if(W&&typeof W==="object"||typeof W==="function"){for(let Y of oZ(W))if(!rZ.call($,Y)&&Y!==Q)_($,Y,{get:()=>W[Y],enumerable:!(X=aZ(W,Y))||X.enumerable})}return $},$0=($)=>Z0(_({},"__esModule",{value:!0}),$),t={};eZ(t,{SYMBOL_FOR_REQ_CONTEXT:()=>a,getContext:()=>W0});o.exports=$0(t);var a=Symbol.for("@vercel/request-context");function W0(){return globalThis[a]?.get?.()??{}}});var $Z=c((H$,ZZ)=>{var{defineProperty:i,getOwnPropertyDescriptor:X0,getOwnPropertyNames:Y0}=Object,j0=Object.prototype.hasOwnProperty,D0=($,W)=>{for(var Q in W)i($,Q,{get:W[Q],enumerable:!0})},K0=($,W,Q,X)=>{if(W&&typeof W==="object"||typeof W==="function"){for(let Y of Y0(W))if(!j0.call($,Y)&&Y!==Q)i($,Y,{get:()=>W[Y],enumerable:!(X=X0(W,Y))||X.enumerable})}return $},J0=($)=>K0(i({},"__esModule",{value:!0}),$),e={};D0(e,{getVercelOidcToken:()=>N0,getVercelOidcTokenSync:()=>p});ZZ.exports=J0(e);var A0=m(),F0=Q0();async function N0($){let W="",Q;try{W=p()}catch(X){Q=X}try{let[{getTokenPayload:X,isExpired:Y},{refreshToken:D}]=await Promise.all([await import("./chunk-93e0w75z.js").then((m)=>g(m.default)),await import("./chunk-6evh2ke8.js").then((m)=>g(m.default))]);if(!W||Y(X(W),$?.expirationBufferMs))await D($),W=p()}catch(X){let Y=Q instanceof Error?Q.message:"";if(X instanceof Error)Y=`${Y}
3
3
  ${X.message}`;if(Y)throw new F0.VercelOidcTokenError(Y);throw X}return W}function p(){let $=(0,A0.getContext)().headers?.["x-vercel-oidc-token"]??process.env.VERCEL_OIDC_TOKEN;if(!$)throw Error("The 'x-vercel-oidc-token' header is missing from the request. Do you have the OIDC option enabled in the Vercel project settings?");return $}});var n=c((M$,YZ)=>{var{defineProperty:d,getOwnPropertyDescriptor:V0,getOwnPropertyNames:q0}=Object,T0=Object.prototype.hasOwnProperty,B0=($,W)=>{for(var Q in W)d($,Q,{get:W[Q],enumerable:!0})},G0=($,W,Q,X)=>{if(W&&typeof W==="object"||typeof W==="function"){for(let Y of q0(W))if(!T0.call($,Y)&&Y!==Q)d($,Y,{get:()=>W[Y],enumerable:!(X=V0(W,Y))||X.enumerable})}return $},x0=($)=>G0(d({},"__esModule",{value:!0}),$),XZ={};B0(XZ,{AccessTokenMissingError:()=>QZ.AccessTokenMissingError,RefreshAccessTokenFailedError:()=>QZ.RefreshAccessTokenFailedError,getContext:()=>z0.getContext,getVercelOidcToken:()=>WZ.getVercelOidcToken,getVercelOidcTokenSync:()=>WZ.getVercelOidcTokenSync,getVercelToken:()=>E0.getVercelToken});YZ.exports=x0(XZ);var WZ=$Z(),z0=m(),QZ=U0(),E0=L0()});var sZ=g(n(),1),tZ=g(n(),1);var H0="vercel.ai.gateway.error",s=Symbol.for(H0),jZ,DZ,z=class $ extends(DZ=Error,jZ=s,DZ){constructor({message:W,statusCode:Q=500,cause:X,generationId:Y}){super(Y?`${W} [${Y}]`:W);this[jZ]=!0,this.statusCode=Q,this.cause=X,this.generationId=Y}static isInstance(W){return $.hasMarker(W)}static hasMarker(W){return typeof W==="object"&&W!==null&&s in W&&W[s]===!0}},uZ="GatewayAuthenticationError",M0=`vercel.ai.gateway.error.${uZ}`,KZ=Symbol.for(M0),JZ,AZ,lZ=class $ extends(AZ=z,JZ=KZ,AZ){constructor({message:W="Authentication failed",statusCode:Q=401,cause:X,generationId:Y}={}){super({message:W,statusCode:Q,cause:X,generationId:Y});this[JZ]=!0,this.name=uZ,this.type="authentication_error"}static isInstance(W){return z.hasMarker(W)&&KZ in W}static createContextualError({apiKeyProvided:W,oidcTokenProvided:Q,message:X="Authentication failed",statusCode:Y=401,cause:D,generationId:N}){let j;if(W)j=`AI Gateway authentication failed: Invalid API key.
4
4
 
5
5
  Create a new API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys
@@ -17,4 +17,4 @@ Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.
17
17
  Option 2 - OIDC token:
18
18
  Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.`;return new $({message:j,statusCode:Y,cause:D,generationId:N})}},cZ="GatewayInvalidRequestError",O0=`vercel.ai.gateway.error.${cZ}`,FZ=Symbol.for(O0),NZ,UZ,R0=class extends(UZ=z,NZ=FZ,UZ){constructor({message:$="Invalid request",statusCode:W=400,cause:Q,generationId:X}={}){super({message:$,statusCode:W,cause:Q,generationId:X});this[NZ]=!0,this.name=cZ,this.type="invalid_request_error"}static isInstance($){return z.hasMarker($)&&FZ in $}},_Z="GatewayRateLimitError",C0=`vercel.ai.gateway.error.${_Z}`,LZ=Symbol.for(C0),VZ,qZ,S0=class extends(qZ=z,VZ=LZ,qZ){constructor({message:$="Rate limit exceeded",statusCode:W=429,cause:Q,generationId:X}={}){super({message:$,statusCode:W,cause:Q,generationId:X});this[VZ]=!0,this.name=_Z,this.type="rate_limit_exceeded"}static isInstance($){return z.hasMarker($)&&LZ in $}},mZ="GatewayModelNotFoundError",w0=`vercel.ai.gateway.error.${mZ}`,TZ=Symbol.for(w0),P0=L(()=>V(Z.object({modelId:Z.string()}))),BZ,GZ,b0=class extends(GZ=z,BZ=TZ,GZ){constructor({message:$="Model not found",statusCode:W=404,modelId:Q,cause:X,generationId:Y}={}){super({message:$,statusCode:W,cause:X,generationId:Y});this[BZ]=!0,this.name=mZ,this.type="model_not_found",this.modelId=Q}static isInstance($){return z.hasMarker($)&&TZ in $}},pZ="GatewayInternalServerError",I0=`vercel.ai.gateway.error.${pZ}`,xZ=Symbol.for(I0),zZ,EZ,HZ=class extends(EZ=z,zZ=xZ,EZ){constructor({message:$="Internal server error",statusCode:W=500,cause:Q,generationId:X}={}){super({message:$,statusCode:W,cause:Q,generationId:X});this[zZ]=!0,this.name=pZ,this.type="internal_server_error"}static isInstance($){return z.hasMarker($)&&xZ in $}},iZ="GatewayResponseError",k0=`vercel.ai.gateway.error.${iZ}`,MZ=Symbol.for(k0),OZ,RZ,v0=class extends(RZ=z,OZ=MZ,RZ){constructor({message:$="Invalid response from Gateway",statusCode:W=502,response:Q,validationError:X,cause:Y,generationId:D}={}){super({message:$,statusCode:W,cause:Y,generationId:D});this[OZ]=!0,this.name=iZ,this.type="response_error",this.response=Q,this.validationError=X}static isInstance($){return z.hasMarker($)&&MZ in $}};async function CZ({response:$,statusCode:W,defaultMessage:Q="Gateway request failed",cause:X,authMethod:Y}){var D;let N=await f({value:$,schema:y0});if(!N.success){let E=typeof $==="object"&&$!==null&&"generationId"in $?$.generationId:void 0;return new v0({message:`Invalid error response format: ${Q}`,statusCode:W,response:$,validationError:N.error,cause:X,generationId:E})}let j=N.value,K=j.error.type,F=j.error.message,q=(D=j.generationId)!=null?D:void 0;switch(K){case"authentication_error":return lZ.createContextualError({apiKeyProvided:Y==="api-key",oidcTokenProvided:Y==="oidc",statusCode:W,cause:X,generationId:q});case"invalid_request_error":return new R0({message:F,statusCode:W,cause:X,generationId:q});case"rate_limit_exceeded":return new S0({message:F,statusCode:W,cause:X,generationId:q});case"model_not_found":{let E=await f({value:j.error.param,schema:P0});return new b0({message:F,statusCode:W,modelId:E.success?E.value.modelId:void 0,cause:X,generationId:q})}case"internal_server_error":return new HZ({message:F,statusCode:W,cause:X,generationId:q});default:return new HZ({message:F,statusCode:W,cause:X,generationId:q})}}var y0=L(()=>V(Z.object({error:Z.object({message:Z.string(),type:Z.string().nullish(),param:Z.unknown().nullish(),code:Z.union([Z.string(),Z.number()]).nullish()}),generationId:Z.string().nullish()}))),dZ="GatewayTimeoutError",h0=`vercel.ai.gateway.error.${dZ}`,SZ=Symbol.for(h0),wZ,PZ,bZ=class $ extends(PZ=z,wZ=SZ,PZ){constructor({message:W="Request timed out",statusCode:Q=408,cause:X,generationId:Y}={}){super({message:W,statusCode:Q,cause:X,generationId:Y});this[wZ]=!0,this.name=dZ,this.type="timeout_error"}static isInstance(W){return z.hasMarker(W)&&SZ in W}static createTimeoutError({originalMessage:W,statusCode:Q=408,cause:X,generationId:Y}){let D=`Gateway request timed out: ${W}
19
19
 
20
- This is a client-side timeout. To resolve this, increase your timeout configuration: https://vercel.com/docs/ai-gateway/capabilities/video-generation#extending-timeouts-for-node.js`;return new $({message:D,statusCode:Q,cause:X,generationId:Y})}};function IZ($){if(!($ instanceof Error))return!1;let W=$.code;if(typeof W==="string")return["UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_CONNECT_TIMEOUT"].includes(W);return!1}async function H($,W){var Q;if(z.isInstance($))return $;if(IZ($))return bZ.createTimeoutError({originalMessage:$ instanceof Error?$.message:"Unknown error",cause:$});if(v.isInstance($)){if($.cause&&IZ($.cause))return bZ.createTimeoutError({originalMessage:$.message,cause:$});return await CZ({response:f0($),statusCode:(Q=$.statusCode)!=null?Q:500,defaultMessage:"Gateway request failed",cause:$,authMethod:W})}return await CZ({response:{},statusCode:500,defaultMessage:$ instanceof Error?`Gateway request failed: ${$.message}`:"Unknown Gateway error",cause:$,authMethod:W})}function f0($){if($.data!==void 0)return $.data;if($.responseBody!=null)try{return JSON.parse($.responseBody)}catch(W){return $.responseBody}return{}}var nZ="ai-gateway-auth-method";async function w($){let W=await f({value:$[nZ],schema:g0});return W.success?W.value:void 0}var g0=L(()=>V(Z.union([Z.literal("api-key"),Z.literal("oidc")]))),u0=["embedding","image","language","reranking","video"],kZ=class{constructor($){this.config=$}async getAvailableModels(){try{let{value:$}=await y({url:`${this.config.baseURL}/config`,headers:await U(this.config.headers()),successfulResponseHandler:x(l0),failedResponseHandler:B({errorSchema:Z.any(),errorToMessage:(W)=>W}),fetch:this.config.fetch});return $}catch($){throw await H($)}}async getCredits(){try{let $=new URL(this.config.baseURL),{value:W}=await y({url:`${$.origin}/v1/credits`,headers:await U(this.config.headers()),successfulResponseHandler:x(c0),failedResponseHandler:B({errorSchema:Z.any(),errorToMessage:(Q)=>Q}),fetch:this.config.fetch});return W}catch($){throw await H($)}}},l0=L(()=>V(Z.object({models:Z.array(Z.object({id:Z.string(),name:Z.string(),description:Z.string().nullish(),pricing:Z.object({input:Z.string(),output:Z.string(),input_cache_read:Z.string().nullish(),input_cache_write:Z.string().nullish()}).transform(({input:$,output:W,input_cache_read:Q,input_cache_write:X})=>({input:$,output:W,...Q?{cachedInputTokens:Q}:{},...X?{cacheCreationInputTokens:X}:{}})).nullish(),specification:Z.object({specificationVersion:Z.literal("v3"),provider:Z.string(),modelId:Z.string()}),modelType:Z.string().nullish()})).transform(($)=>$.filter((W)=>W.modelType==null||u0.includes(W.modelType)))}))),c0=L(()=>V(Z.object({balance:Z.string(),total_used:Z.string()}).transform(({balance:$,total_used:W})=>({balance:$,totalUsed:W})))),_0=class{constructor($){this.config=$}async getSpendReport($){try{let W=new URL(this.config.baseURL),Q=new URLSearchParams;if(Q.set("start_date",$.startDate),Q.set("end_date",$.endDate),$.groupBy)Q.set("group_by",$.groupBy);if($.datePart)Q.set("date_part",$.datePart);if($.userId)Q.set("user_id",$.userId);if($.model)Q.set("model",$.model);if($.provider)Q.set("provider",$.provider);if($.credentialType)Q.set("credential_type",$.credentialType);if($.tags&&$.tags.length>0)Q.set("tags",$.tags.join(","));let{value:X}=await y({url:`${W.origin}/v1/report?${Q.toString()}`,headers:await U(this.config.headers()),successfulResponseHandler:x(m0),failedResponseHandler:B({errorSchema:Z.any(),errorToMessage:(Y)=>Y}),fetch:this.config.fetch});return X}catch(W){throw await H(W)}}},m0=L(()=>V(Z.object({results:Z.array(Z.object({day:Z.string().optional(),hour:Z.string().optional(),user:Z.string().optional(),model:Z.string().optional(),tag:Z.string().optional(),provider:Z.string().optional(),credential_type:Z.enum(["byok","system"]).optional(),total_cost:Z.number(),market_cost:Z.number().optional(),input_tokens:Z.number().optional(),output_tokens:Z.number().optional(),cached_input_tokens:Z.number().optional(),cache_creation_input_tokens:Z.number().optional(),reasoning_tokens:Z.number().optional(),request_count:Z.number().optional()}).transform(({credential_type:$,total_cost:W,market_cost:Q,input_tokens:X,output_tokens:Y,cached_input_tokens:D,cache_creation_input_tokens:N,reasoning_tokens:j,request_count:K,...F})=>({...F,...$!==void 0?{credentialType:$}:{},totalCost:W,...Q!==void 0?{marketCost:Q}:{},...X!==void 0?{inputTokens:X}:{},...Y!==void 0?{outputTokens:Y}:{},...D!==void 0?{cachedInputTokens:D}:{},...N!==void 0?{cacheCreationInputTokens:N}:{},...j!==void 0?{reasoningTokens:j}:{},...K!==void 0?{requestCount:K}:{}})))}))),p0=class{constructor($){this.config=$}async getGenerationInfo($){try{let W=new URL(this.config.baseURL),{value:Q}=await y({url:`${W.origin}/v1/generation?id=${encodeURIComponent($.id)}`,headers:await U(this.config.headers()),successfulResponseHandler:x(i0),failedResponseHandler:B({errorSchema:Z.any(),errorToMessage:(X)=>X}),fetch:this.config.fetch});return Q}catch(W){throw await H(W)}}},i0=L(()=>V(Z.object({data:Z.object({id:Z.string(),total_cost:Z.number(),upstream_inference_cost:Z.number(),usage:Z.number(),created_at:Z.string(),model:Z.string(),is_byok:Z.boolean(),provider_name:Z.string(),streamed:Z.boolean(),finish_reason:Z.string(),latency:Z.number(),generation_time:Z.number(),native_tokens_prompt:Z.number(),native_tokens_completion:Z.number(),native_tokens_reasoning:Z.number(),native_tokens_cached:Z.number(),native_tokens_cache_creation:Z.number(),billable_web_search_calls:Z.number()}).transform(({total_cost:$,upstream_inference_cost:W,created_at:Q,is_byok:X,provider_name:Y,finish_reason:D,generation_time:N,native_tokens_prompt:j,native_tokens_completion:K,native_tokens_reasoning:F,native_tokens_cached:q,native_tokens_cache_creation:E,billable_web_search_calls:P,...C})=>({...C,totalCost:$,upstreamInferenceCost:W,createdAt:Q,isByok:X,providerName:Y,finishReason:D,generationTime:N,promptTokens:j,completionTokens:K,reasoningTokens:F,cachedTokens:q,cacheCreationTokens:E,billableWebSearchCalls:P}))}).transform(({data:$})=>$))),d0=class{constructor($,W){this.modelId=$,this.config=W,this.specificationVersion="v3",this.supportedUrls={"*/*":[/.*/]}}get provider(){return this.config.provider}async getArgs($){let{abortSignal:W,...Q}=$;return{args:this.maybeEncodeFileParts(Q),warnings:[]}}async doGenerate($){let{args:W,warnings:Q}=await this.getArgs($),{abortSignal:X}=$,Y=await U(this.config.headers());try{let{responseHeaders:D,value:N,rawValue:j}=await R({url:this.getUrl(),headers:O(Y,$.headers,this.getModelConfigHeaders(this.modelId,!1),await U(this.config.o11yHeaders)),body:W,successfulResponseHandler:x(Z.any()),failedResponseHandler:B({errorSchema:Z.any(),errorToMessage:(K)=>K}),...X&&{abortSignal:X},fetch:this.config.fetch});return{...N,request:{body:W},response:{headers:D,body:j},warnings:Q}}catch(D){throw await H(D,await w(Y))}}async doStream($){let{args:W,warnings:Q}=await this.getArgs($),{abortSignal:X}=$,Y=await U(this.config.headers());try{let{value:D,responseHeaders:N}=await R({url:this.getUrl(),headers:O(Y,$.headers,this.getModelConfigHeaders(this.modelId,!0),await U(this.config.o11yHeaders)),body:W,successfulResponseHandler:fZ(Z.any()),failedResponseHandler:B({errorSchema:Z.any(),errorToMessage:(j)=>j}),...X&&{abortSignal:X},fetch:this.config.fetch});return{stream:D.pipeThrough(new TransformStream({start(j){if(Q.length>0)j.enqueue({type:"stream-start",warnings:Q})},transform(j,K){if(j.success){let F=j.value;if(F.type==="raw"&&!$.includeRawChunks)return;if(F.type==="response-metadata"&&F.timestamp&&typeof F.timestamp==="string")F.timestamp=new Date(F.timestamp);K.enqueue(F)}else K.error(j.error)}})),request:{body:W},response:{headers:N}}}catch(D){throw await H(D,await w(Y))}}isFilePart($){return $&&typeof $==="object"&&"type"in $&&$.type==="file"}maybeEncodeFileParts($){for(let W of $.prompt)for(let Q of W.content)if(this.isFilePart(Q)){let X=Q;if(X.data instanceof Uint8Array){let Y=Uint8Array.from(X.data),D=Buffer.from(Y).toString("base64");X.data=new URL(`data:${X.mediaType||"application/octet-stream"};base64,${D}`)}}return $}getUrl(){return`${this.config.baseURL}/language-model`}getModelConfigHeaders($,W){return{"ai-language-model-specification-version":"3","ai-language-model-id":$,"ai-language-model-streaming":String(W)}}},n0=class{constructor($,W){this.modelId=$,this.config=W,this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0}get provider(){return this.config.provider}async doEmbed({values:$,headers:W,abortSignal:Q,providerOptions:X}){var Y;let D=await U(this.config.headers());try{let{responseHeaders:N,value:j,rawValue:K}=await R({url:this.getUrl(),headers:O(D,W!=null?W:{},this.getModelConfigHeaders(),await U(this.config.o11yHeaders)),body:{values:$,...X?{providerOptions:X}:{}},successfulResponseHandler:x(s0),failedResponseHandler:B({errorSchema:Z.any(),errorToMessage:(F)=>F}),...Q&&{abortSignal:Q},fetch:this.config.fetch});return{embeddings:j.embeddings,usage:(Y=j.usage)!=null?Y:void 0,providerMetadata:j.providerMetadata,response:{headers:N,body:K},warnings:[]}}catch(N){throw await H(N,await w(D))}}getUrl(){return`${this.config.baseURL}/embedding-model`}getModelConfigHeaders(){return{"ai-embedding-model-specification-version":"3","ai-model-id":this.modelId}}},s0=L(()=>V(Z.object({embeddings:Z.array(Z.array(Z.number())),usage:Z.object({tokens:Z.number()}).nullish(),providerMetadata:Z.record(Z.string(),Z.record(Z.string(),Z.unknown())).optional()}))),t0=class{constructor($,W){this.modelId=$,this.config=W,this.specificationVersion="v3",this.maxImagesPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:$,n:W,size:Q,aspectRatio:X,seed:Y,files:D,mask:N,providerOptions:j,headers:K,abortSignal:F}){var q,E,P,C;let b=await U(this.config.headers());try{let{responseHeaders:J,value:G,rawValue:I}=await R({url:this.getUrl(),headers:O(b,K!=null?K:{},this.getModelConfigHeaders(),await U(this.config.o11yHeaders)),body:{prompt:$,n:W,...Q&&{size:Q},...X&&{aspectRatio:X},...Y&&{seed:Y},...j&&{providerOptions:j},...D&&{files:D.map((A)=>vZ(A))},...N&&{mask:vZ(N)}},successfulResponseHandler:x(e0),failedResponseHandler:B({errorSchema:Z.any(),errorToMessage:(A)=>A}),...F&&{abortSignal:F},fetch:this.config.fetch});return{images:G.images,warnings:(q=G.warnings)!=null?q:[],providerMetadata:G.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:J},...G.usage!=null&&{usage:{inputTokens:(E=G.usage.inputTokens)!=null?E:void 0,outputTokens:(P=G.usage.outputTokens)!=null?P:void 0,totalTokens:(C=G.usage.totalTokens)!=null?C:void 0}}}}catch(J){throw await H(J,await w(b))}}getUrl(){return`${this.config.baseURL}/image-model`}getModelConfigHeaders(){return{"ai-image-model-specification-version":"3","ai-model-id":this.modelId}}};function vZ($){if($.type==="file"&&$.data instanceof Uint8Array)return{...$,data:u($.data)};return $}var a0=Z.object({images:Z.array(Z.unknown()).optional()}).catchall(Z.unknown()),o0=Z.discriminatedUnion("type",[Z.object({type:Z.literal("unsupported"),feature:Z.string(),details:Z.string().optional()}),Z.object({type:Z.literal("compatibility"),feature:Z.string(),details:Z.string().optional()}),Z.object({type:Z.literal("other"),message:Z.string()})]),r0=Z.object({inputTokens:Z.number().nullish(),outputTokens:Z.number().nullish(),totalTokens:Z.number().nullish()}),e0=Z.object({images:Z.array(Z.string()),warnings:Z.array(o0).optional(),providerMetadata:Z.record(Z.string(),a0).optional(),usage:r0.optional()}),Z$=class{constructor($,W){this.modelId=$,this.config=W,this.specificationVersion="v3",this.maxVideosPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:$,n:W,aspectRatio:Q,resolution:X,duration:Y,fps:D,seed:N,image:j,providerOptions:K,headers:F,abortSignal:q}){var E;let P=await U(this.config.headers());try{let{responseHeaders:C,value:b}=await R({url:this.getUrl(),headers:O(P,F!=null?F:{},this.getModelConfigHeaders(),await U(this.config.o11yHeaders),{accept:"text/event-stream"}),body:{prompt:$,n:W,...Q&&{aspectRatio:Q},...X&&{resolution:X},...Y&&{duration:Y},...D&&{fps:D},...N&&{seed:N},...K&&{providerOptions:K},...j&&{image:$$(j)}},successfulResponseHandler:async({response:J,url:G,requestBodyValues:I})=>{if(J.body==null)throw new v({message:"SSE response body is empty",url:G,requestBodyValues:I,statusCode:J.status});let M=hZ({stream:J.body,schema:Y$}).getReader(),{done:k,value:S}=await M.read();if(M.releaseLock(),k||!S)throw new v({message:"SSE stream ended without a data event",url:G,requestBodyValues:I,statusCode:J.status});if(!S.success)throw new v({message:"Failed to parse video SSE event",cause:S.error,url:G,requestBodyValues:I,statusCode:J.status});let T=S.value;if(T.type==="error")throw new v({message:T.message,statusCode:T.statusCode,url:G,requestBodyValues:I,responseHeaders:Object.fromEntries([...J.headers]),responseBody:JSON.stringify(T),data:{error:{message:T.message,type:T.errorType,param:T.param}}});return{value:{videos:T.videos,warnings:T.warnings,providerMetadata:T.providerMetadata},responseHeaders:Object.fromEntries([...J.headers])}},failedResponseHandler:B({errorSchema:Z.any(),errorToMessage:(J)=>J}),...q&&{abortSignal:q},fetch:this.config.fetch});return{videos:b.videos,warnings:(E=b.warnings)!=null?E:[],providerMetadata:b.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:C}}}catch(C){throw await H(C,await w(P))}}getUrl(){return`${this.config.baseURL}/video-model`}getModelConfigHeaders(){return{"ai-video-model-specification-version":"3","ai-model-id":this.modelId}}};function $$($){if($.type==="file"&&$.data instanceof Uint8Array)return{...$,data:u($.data)};return $}var W$=Z.object({videos:Z.array(Z.unknown()).optional()}).catchall(Z.unknown()),Q$=Z.union([Z.object({type:Z.literal("url"),url:Z.string(),mediaType:Z.string()}),Z.object({type:Z.literal("base64"),data:Z.string(),mediaType:Z.string()})]),X$=Z.discriminatedUnion("type",[Z.object({type:Z.literal("unsupported"),feature:Z.string(),details:Z.string().optional()}),Z.object({type:Z.literal("compatibility"),feature:Z.string(),details:Z.string().optional()}),Z.object({type:Z.literal("other"),message:Z.string()})]),Y$=Z.discriminatedUnion("type",[Z.object({type:Z.literal("result"),videos:Z.array(Q$),warnings:Z.array(X$).optional(),providerMetadata:Z.record(Z.string(),W$).optional()}),Z.object({type:Z.literal("error"),message:Z.string(),errorType:Z.string(),statusCode:Z.number(),param:Z.unknown().nullable()})]),j$=class{constructor($,W){this.modelId=$,this.config=W,this.specificationVersion="v3"}get provider(){return this.config.provider}async doRerank({documents:$,query:W,topN:Q,headers:X,abortSignal:Y,providerOptions:D}){let N=await U(this.config.headers());try{let{responseHeaders:j,value:K,rawValue:F}=await R({url:this.getUrl(),headers:O(N,X!=null?X:{},this.getModelConfigHeaders(),await U(this.config.o11yHeaders)),body:{documents:$,query:W,...Q!=null?{topN:Q}:{},...D?{providerOptions:D}:{}},successfulResponseHandler:x(D$),failedResponseHandler:B({errorSchema:Z.any(),errorToMessage:(q)=>q}),...Y&&{abortSignal:Y},fetch:this.config.fetch});return{ranking:K.ranking,providerMetadata:K.providerMetadata,response:{headers:j,body:F},warnings:[]}}catch(j){throw await H(j,await w(N))}}getUrl(){return`${this.config.baseURL}/reranking-model`}getModelConfigHeaders(){return{"ai-reranking-model-specification-version":"3","ai-model-id":this.modelId}}},D$=L(()=>V(Z.object({ranking:Z.array(Z.object({index:Z.number(),relevanceScore:Z.number()})),providerMetadata:Z.record(Z.string(),Z.record(Z.string(),Z.unknown())).optional()}))),K$=L(()=>V(Z.object({objective:Z.string().describe("Natural-language description of the web research goal, including source or freshness guidance and broader context from the task. Maximum 5000 characters."),search_queries:Z.array(Z.string()).optional().describe("Optional search queries to supplement the objective. Maximum 200 characters per query."),mode:Z.enum(["one-shot","agentic"]).optional().describe('Mode preset: "one-shot" for comprehensive results with longer excerpts (default), "agentic" for concise, token-efficient results for multi-step workflows.'),max_results:Z.number().optional().describe("Maximum number of results to return (1-20). Defaults to 10 if not specified."),source_policy:Z.object({include_domains:Z.array(Z.string()).optional().describe("List of domains to include in search results."),exclude_domains:Z.array(Z.string()).optional().describe("List of domains to exclude from search results."),after_date:Z.string().optional().describe("Only include results published after this date (ISO 8601 format).")}).optional().describe("Source policy for controlling which domains to include/exclude and freshness."),excerpts:Z.object({max_chars_per_result:Z.number().optional().describe("Maximum characters per result."),max_chars_total:Z.number().optional().describe("Maximum total characters across all results.")}).optional().describe("Excerpt configuration for controlling result length."),fetch_policy:Z.object({max_age_seconds:Z.number().optional().describe("Maximum age in seconds for cached content. Set to 0 to always fetch fresh content.")}).optional().describe("Fetch policy for controlling content freshness.")}))),J$=L(()=>V(Z.union([Z.object({searchId:Z.string(),results:Z.array(Z.object({url:Z.string(),title:Z.string(),excerpt:Z.string(),publishDate:Z.string().nullable().optional(),relevanceScore:Z.number().optional()}))}),Z.object({error:Z.enum(["api_error","rate_limit","timeout","invalid_input","configuration_error","unknown"]),statusCode:Z.number().optional(),message:Z.string()})]))),A$=l({id:"gateway.parallel_search",inputSchema:K$,outputSchema:J$}),F$=($={})=>A$($),N$=L(()=>V(Z.object({query:Z.union([Z.string(),Z.array(Z.string())]).describe("Search query (string) or multiple queries (array of up to 5 strings). Multi-query searches return combined results from all queries."),max_results:Z.number().optional().describe("Maximum number of search results to return (1-20, default: 10)"),max_tokens_per_page:Z.number().optional().describe("Maximum number of tokens to extract per search result page (256-2048, default: 2048)"),max_tokens:Z.number().optional().describe("Maximum total tokens across all search results (default: 25000, max: 1000000)"),country:Z.string().optional().describe("Two-letter ISO 3166-1 alpha-2 country code for regional search results (e.g., 'US', 'GB', 'FR')"),search_domain_filter:Z.array(Z.string()).optional().describe("List of domains to include or exclude from search results (max 20). To include: ['nature.com', 'science.org']. To exclude: ['-example.com', '-spam.net']"),search_language_filter:Z.array(Z.string()).optional().describe("List of ISO 639-1 language codes to filter results (max 10, lowercase). Examples: ['en', 'fr', 'de']"),search_after_date:Z.string().optional().describe("Include only results published after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter."),search_before_date:Z.string().optional().describe("Include only results published before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."),last_updated_after_filter:Z.string().optional().describe("Include only results last updated after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter."),last_updated_before_filter:Z.string().optional().describe("Include only results last updated before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."),search_recency_filter:Z.enum(["day","week","month","year"]).optional().describe("Filter results by relative time period. Cannot be used with search_after_date or search_before_date.")}))),U$=L(()=>V(Z.union([Z.object({results:Z.array(Z.object({title:Z.string(),url:Z.string(),snippet:Z.string(),date:Z.string().optional(),lastUpdated:Z.string().optional()})),id:Z.string()}),Z.object({error:Z.enum(["api_error","rate_limit","timeout","invalid_input","unknown"]),statusCode:Z.number().optional(),message:Z.string()})]))),L$=l({id:"gateway.perplexity_search",inputSchema:N$,outputSchema:U$}),V$=($={})=>L$($),q$={parallelSearch:F$,perplexitySearch:V$};async function T$(){var $;return($=sZ.getContext().headers)==null?void 0:$["x-vercel-id"]}var B$="3.0.104",G$="0.0.1";function x$($={}){var W,Q;let X=null,Y=null,D=(W=$.metadataCacheRefreshMillis)!=null?W:300000,N=0,j=(Q=gZ($.baseURL))!=null?Q:"https://ai-gateway.vercel.sh/v3/ai",K=async()=>{try{let A=await z$($);return yZ({Authorization:`Bearer ${A.token}`,"ai-gateway-protocol-version":G$,[nZ]:A.authMethod,...$.headers},`ai-sdk/gateway/${B$}`)}catch(A){throw lZ.createContextualError({apiKeyProvided:!1,oidcTokenProvided:!1,statusCode:401,cause:A})}},F=()=>{let A=h({settingValue:void 0,environmentVariableName:"VERCEL_DEPLOYMENT_ID"}),M=h({settingValue:void 0,environmentVariableName:"VERCEL_ENV"}),k=h({settingValue:void 0,environmentVariableName:"VERCEL_REGION"}),S=h({settingValue:void 0,environmentVariableName:"VERCEL_PROJECT_ID"});return async()=>{let T=await T$();return{...A&&{"ai-o11y-deployment-id":A},...M&&{"ai-o11y-environment":M},...k&&{"ai-o11y-region":k},...T&&{"ai-o11y-request-id":T},...S&&{"ai-o11y-project-id":S}}}},q=(A)=>{return new d0(A,{provider:"gateway",baseURL:j,headers:K,fetch:$.fetch,o11yHeaders:F()})},E=async()=>{var A,M,k;let S=(k=(M=(A=$._internal)==null?void 0:A.currentDate)==null?void 0:M.call(A).getTime())!=null?k:Date.now();if(!X||S-N>D)N=S,X=new kZ({baseURL:j,headers:K,fetch:$.fetch}).getAvailableModels().then((T)=>{return Y=T,T}).catch(async(T)=>{throw await H(T,await w(await K()))});return Y?Promise.resolve(Y):X},P=async()=>{return new kZ({baseURL:j,headers:K,fetch:$.fetch}).getCredits().catch(async(A)=>{throw await H(A,await w(await K()))})},C=async(A)=>{return new _0({baseURL:j,headers:K,fetch:$.fetch}).getSpendReport(A).catch(async(M)=>{throw await H(M,await w(await K()))})},b=async(A)=>{return new p0({baseURL:j,headers:K,fetch:$.fetch}).getGenerationInfo(A).catch(async(M)=>{throw await H(M,await w(await K()))})},J=function(A){if(new.target)throw Error("The Gateway Provider model function cannot be called with the new keyword.");return q(A)};J.specificationVersion="v3",J.getAvailableModels=E,J.getCredits=P,J.getSpendReport=C,J.getGenerationInfo=b,J.imageModel=(A)=>{return new t0(A,{provider:"gateway",baseURL:j,headers:K,fetch:$.fetch,o11yHeaders:F()})},J.languageModel=q;let G=(A)=>{return new n0(A,{provider:"gateway",baseURL:j,headers:K,fetch:$.fetch,o11yHeaders:F()})};J.embeddingModel=G,J.textEmbeddingModel=G,J.videoModel=(A)=>{return new Z$(A,{provider:"gateway",baseURL:j,headers:K,fetch:$.fetch,o11yHeaders:F()})};let I=(A)=>{return new j$(A,{provider:"gateway",baseURL:j,headers:K,fetch:$.fetch,o11yHeaders:F()})};return J.rerankingModel=I,J.reranking=I,J.chat=J.languageModel,J.embedding=J.embeddingModel,J.image=J.imageModel,J.video=J.videoModel,J.tools=q$,J}var $W=x$();async function z$($){let W=h({settingValue:$.apiKey,environmentVariableName:"AI_GATEWAY_API_KEY"});if(W)return{token:W,authMethod:"api-key"};return{token:await tZ.getVercelOidcToken(),authMethod:"oidc"}}export{z as go,lZ as ho,R0 as io,S0 as jo,b0 as ko,HZ as lo,v0 as mo,x$ as no,$W as oo};
20
+ This is a client-side timeout. To resolve this, increase your timeout configuration: https://vercel.com/docs/ai-gateway/capabilities/video-generation#extending-timeouts-for-node.js`;return new $({message:D,statusCode:Q,cause:X,generationId:Y})}};function IZ($){if(!($ instanceof Error))return!1;let W=$.code;if(typeof W==="string")return["UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_CONNECT_TIMEOUT"].includes(W);return!1}async function H($,W){var Q;if(z.isInstance($))return $;if(IZ($))return bZ.createTimeoutError({originalMessage:$ instanceof Error?$.message:"Unknown error",cause:$});if(v.isInstance($)){if($.cause&&IZ($.cause))return bZ.createTimeoutError({originalMessage:$.message,cause:$});return await CZ({response:f0($),statusCode:(Q=$.statusCode)!=null?Q:500,defaultMessage:"Gateway request failed",cause:$,authMethod:W})}return await CZ({response:{},statusCode:500,defaultMessage:$ instanceof Error?`Gateway request failed: ${$.message}`:"Unknown Gateway error",cause:$,authMethod:W})}function f0($){if($.data!==void 0)return $.data;if($.responseBody!=null)try{return JSON.parse($.responseBody)}catch(W){return $.responseBody}return{}}var nZ="ai-gateway-auth-method";async function w($){let W=await f({value:$[nZ],schema:g0});return W.success?W.value:void 0}var g0=L(()=>V(Z.union([Z.literal("api-key"),Z.literal("oidc")]))),u0=["embedding","image","language","reranking","video"],kZ=class{constructor($){this.config=$}async getAvailableModels(){try{let{value:$}=await y({url:`${this.config.baseURL}/config`,headers:await U(this.config.headers()),successfulResponseHandler:x(l0),failedResponseHandler:B({errorSchema:Z.any(),errorToMessage:(W)=>W}),fetch:this.config.fetch});return $}catch($){throw await H($)}}async getCredits(){try{let $=new URL(this.config.baseURL),{value:W}=await y({url:`${$.origin}/v1/credits`,headers:await U(this.config.headers()),successfulResponseHandler:x(c0),failedResponseHandler:B({errorSchema:Z.any(),errorToMessage:(Q)=>Q}),fetch:this.config.fetch});return W}catch($){throw await H($)}}},l0=L(()=>V(Z.object({models:Z.array(Z.object({id:Z.string(),name:Z.string(),description:Z.string().nullish(),pricing:Z.object({input:Z.string(),output:Z.string(),input_cache_read:Z.string().nullish(),input_cache_write:Z.string().nullish()}).transform(({input:$,output:W,input_cache_read:Q,input_cache_write:X})=>({input:$,output:W,...Q?{cachedInputTokens:Q}:{},...X?{cacheCreationInputTokens:X}:{}})).nullish(),specification:Z.object({specificationVersion:Z.literal("v3"),provider:Z.string(),modelId:Z.string()}),modelType:Z.string().nullish()})).transform(($)=>$.filter((W)=>W.modelType==null||u0.includes(W.modelType)))}))),c0=L(()=>V(Z.object({balance:Z.string(),total_used:Z.string()}).transform(({balance:$,total_used:W})=>({balance:$,totalUsed:W})))),_0=class{constructor($){this.config=$}async getSpendReport($){try{let W=new URL(this.config.baseURL),Q=new URLSearchParams;if(Q.set("start_date",$.startDate),Q.set("end_date",$.endDate),$.groupBy)Q.set("group_by",$.groupBy);if($.datePart)Q.set("date_part",$.datePart);if($.userId)Q.set("user_id",$.userId);if($.model)Q.set("model",$.model);if($.provider)Q.set("provider",$.provider);if($.credentialType)Q.set("credential_type",$.credentialType);if($.tags&&$.tags.length>0)Q.set("tags",$.tags.join(","));let{value:X}=await y({url:`${W.origin}/v1/report?${Q.toString()}`,headers:await U(this.config.headers()),successfulResponseHandler:x(m0),failedResponseHandler:B({errorSchema:Z.any(),errorToMessage:(Y)=>Y}),fetch:this.config.fetch});return X}catch(W){throw await H(W)}}},m0=L(()=>V(Z.object({results:Z.array(Z.object({day:Z.string().optional(),hour:Z.string().optional(),user:Z.string().optional(),model:Z.string().optional(),tag:Z.string().optional(),provider:Z.string().optional(),credential_type:Z.enum(["byok","system"]).optional(),total_cost:Z.number(),market_cost:Z.number().optional(),input_tokens:Z.number().optional(),output_tokens:Z.number().optional(),cached_input_tokens:Z.number().optional(),cache_creation_input_tokens:Z.number().optional(),reasoning_tokens:Z.number().optional(),request_count:Z.number().optional()}).transform(({credential_type:$,total_cost:W,market_cost:Q,input_tokens:X,output_tokens:Y,cached_input_tokens:D,cache_creation_input_tokens:N,reasoning_tokens:j,request_count:K,...F})=>({...F,...$!==void 0?{credentialType:$}:{},totalCost:W,...Q!==void 0?{marketCost:Q}:{},...X!==void 0?{inputTokens:X}:{},...Y!==void 0?{outputTokens:Y}:{},...D!==void 0?{cachedInputTokens:D}:{},...N!==void 0?{cacheCreationInputTokens:N}:{},...j!==void 0?{reasoningTokens:j}:{},...K!==void 0?{requestCount:K}:{}})))}))),p0=class{constructor($){this.config=$}async getGenerationInfo($){try{let W=new URL(this.config.baseURL),{value:Q}=await y({url:`${W.origin}/v1/generation?id=${encodeURIComponent($.id)}`,headers:await U(this.config.headers()),successfulResponseHandler:x(i0),failedResponseHandler:B({errorSchema:Z.any(),errorToMessage:(X)=>X}),fetch:this.config.fetch});return Q}catch(W){throw await H(W)}}},i0=L(()=>V(Z.object({data:Z.object({id:Z.string(),total_cost:Z.number(),upstream_inference_cost:Z.number(),usage:Z.number(),created_at:Z.string(),model:Z.string(),is_byok:Z.boolean(),provider_name:Z.string(),streamed:Z.boolean(),finish_reason:Z.string(),latency:Z.number(),generation_time:Z.number(),native_tokens_prompt:Z.number(),native_tokens_completion:Z.number(),native_tokens_reasoning:Z.number(),native_tokens_cached:Z.number(),native_tokens_cache_creation:Z.number(),billable_web_search_calls:Z.number()}).transform(({total_cost:$,upstream_inference_cost:W,created_at:Q,is_byok:X,provider_name:Y,finish_reason:D,generation_time:N,native_tokens_prompt:j,native_tokens_completion:K,native_tokens_reasoning:F,native_tokens_cached:q,native_tokens_cache_creation:E,billable_web_search_calls:P,...C})=>({...C,totalCost:$,upstreamInferenceCost:W,createdAt:Q,isByok:X,providerName:Y,finishReason:D,generationTime:N,promptTokens:j,completionTokens:K,reasoningTokens:F,cachedTokens:q,cacheCreationTokens:E,billableWebSearchCalls:P}))}).transform(({data:$})=>$))),d0=class{constructor($,W){this.modelId=$,this.config=W,this.specificationVersion="v3",this.supportedUrls={"*/*":[/.*/]}}get provider(){return this.config.provider}async getArgs($){let{abortSignal:W,...Q}=$;return{args:this.maybeEncodeFileParts(Q),warnings:[]}}async doGenerate($){let{args:W,warnings:Q}=await this.getArgs($),{abortSignal:X}=$,Y=await U(this.config.headers());try{let{responseHeaders:D,value:N,rawValue:j}=await R({url:this.getUrl(),headers:O(Y,$.headers,this.getModelConfigHeaders(this.modelId,!1),await U(this.config.o11yHeaders)),body:W,successfulResponseHandler:x(Z.any()),failedResponseHandler:B({errorSchema:Z.any(),errorToMessage:(K)=>K}),...X&&{abortSignal:X},fetch:this.config.fetch});return{...N,request:{body:W},response:{headers:D,body:j},warnings:Q}}catch(D){throw await H(D,await w(Y))}}async doStream($){let{args:W,warnings:Q}=await this.getArgs($),{abortSignal:X}=$,Y=await U(this.config.headers());try{let{value:D,responseHeaders:N}=await R({url:this.getUrl(),headers:O(Y,$.headers,this.getModelConfigHeaders(this.modelId,!0),await U(this.config.o11yHeaders)),body:W,successfulResponseHandler:fZ(Z.any()),failedResponseHandler:B({errorSchema:Z.any(),errorToMessage:(j)=>j}),...X&&{abortSignal:X},fetch:this.config.fetch});return{stream:D.pipeThrough(new TransformStream({start(j){if(Q.length>0)j.enqueue({type:"stream-start",warnings:Q})},transform(j,K){if(j.success){let F=j.value;if(F.type==="raw"&&!$.includeRawChunks)return;if(F.type==="response-metadata"&&F.timestamp&&typeof F.timestamp==="string")F.timestamp=new Date(F.timestamp);K.enqueue(F)}else K.error(j.error)}})),request:{body:W},response:{headers:N}}}catch(D){throw await H(D,await w(Y))}}isFilePart($){return $&&typeof $==="object"&&"type"in $&&$.type==="file"}maybeEncodeFileParts($){for(let W of $.prompt)for(let Q of W.content)if(this.isFilePart(Q)){let X=Q;if(X.data instanceof Uint8Array){let Y=Uint8Array.from(X.data),D=Buffer.from(Y).toString("base64");X.data=new URL(`data:${X.mediaType||"application/octet-stream"};base64,${D}`)}}return $}getUrl(){return`${this.config.baseURL}/language-model`}getModelConfigHeaders($,W){return{"ai-language-model-specification-version":"3","ai-language-model-id":$,"ai-language-model-streaming":String(W)}}},n0=class{constructor($,W){this.modelId=$,this.config=W,this.specificationVersion="v3",this.maxEmbeddingsPerCall=2048,this.supportsParallelCalls=!0}get provider(){return this.config.provider}async doEmbed({values:$,headers:W,abortSignal:Q,providerOptions:X}){var Y;let D=await U(this.config.headers());try{let{responseHeaders:N,value:j,rawValue:K}=await R({url:this.getUrl(),headers:O(D,W!=null?W:{},this.getModelConfigHeaders(),await U(this.config.o11yHeaders)),body:{values:$,...X?{providerOptions:X}:{}},successfulResponseHandler:x(s0),failedResponseHandler:B({errorSchema:Z.any(),errorToMessage:(F)=>F}),...Q&&{abortSignal:Q},fetch:this.config.fetch});return{embeddings:j.embeddings,usage:(Y=j.usage)!=null?Y:void 0,providerMetadata:j.providerMetadata,response:{headers:N,body:K},warnings:[]}}catch(N){throw await H(N,await w(D))}}getUrl(){return`${this.config.baseURL}/embedding-model`}getModelConfigHeaders(){return{"ai-embedding-model-specification-version":"3","ai-model-id":this.modelId}}},s0=L(()=>V(Z.object({embeddings:Z.array(Z.array(Z.number())),usage:Z.object({tokens:Z.number()}).nullish(),providerMetadata:Z.record(Z.string(),Z.record(Z.string(),Z.unknown())).optional()}))),t0=class{constructor($,W){this.modelId=$,this.config=W,this.specificationVersion="v3",this.maxImagesPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:$,n:W,size:Q,aspectRatio:X,seed:Y,files:D,mask:N,providerOptions:j,headers:K,abortSignal:F}){var q,E,P,C;let b=await U(this.config.headers());try{let{responseHeaders:J,value:G,rawValue:I}=await R({url:this.getUrl(),headers:O(b,K!=null?K:{},this.getModelConfigHeaders(),await U(this.config.o11yHeaders)),body:{prompt:$,n:W,...Q&&{size:Q},...X&&{aspectRatio:X},...Y&&{seed:Y},...j&&{providerOptions:j},...D&&{files:D.map((A)=>vZ(A))},...N&&{mask:vZ(N)}},successfulResponseHandler:x(e0),failedResponseHandler:B({errorSchema:Z.any(),errorToMessage:(A)=>A}),...F&&{abortSignal:F},fetch:this.config.fetch});return{images:G.images,warnings:(q=G.warnings)!=null?q:[],providerMetadata:G.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:J},...G.usage!=null&&{usage:{inputTokens:(E=G.usage.inputTokens)!=null?E:void 0,outputTokens:(P=G.usage.outputTokens)!=null?P:void 0,totalTokens:(C=G.usage.totalTokens)!=null?C:void 0}}}}catch(J){throw await H(J,await w(b))}}getUrl(){return`${this.config.baseURL}/image-model`}getModelConfigHeaders(){return{"ai-image-model-specification-version":"3","ai-model-id":this.modelId}}};function vZ($){if($.type==="file"&&$.data instanceof Uint8Array)return{...$,data:u($.data)};return $}var a0=Z.object({images:Z.array(Z.unknown()).optional()}).catchall(Z.unknown()),o0=Z.discriminatedUnion("type",[Z.object({type:Z.literal("unsupported"),feature:Z.string(),details:Z.string().optional()}),Z.object({type:Z.literal("compatibility"),feature:Z.string(),details:Z.string().optional()}),Z.object({type:Z.literal("other"),message:Z.string()})]),r0=Z.object({inputTokens:Z.number().nullish(),outputTokens:Z.number().nullish(),totalTokens:Z.number().nullish()}),e0=Z.object({images:Z.array(Z.string()),warnings:Z.array(o0).optional(),providerMetadata:Z.record(Z.string(),a0).optional(),usage:r0.optional()}),Z$=class{constructor($,W){this.modelId=$,this.config=W,this.specificationVersion="v3",this.maxVideosPerCall=Number.MAX_SAFE_INTEGER}get provider(){return this.config.provider}async doGenerate({prompt:$,n:W,aspectRatio:Q,resolution:X,duration:Y,fps:D,seed:N,image:j,providerOptions:K,headers:F,abortSignal:q}){var E;let P=await U(this.config.headers());try{let{responseHeaders:C,value:b}=await R({url:this.getUrl(),headers:O(P,F!=null?F:{},this.getModelConfigHeaders(),await U(this.config.o11yHeaders),{accept:"text/event-stream"}),body:{prompt:$,n:W,...Q&&{aspectRatio:Q},...X&&{resolution:X},...Y&&{duration:Y},...D&&{fps:D},...N&&{seed:N},...K&&{providerOptions:K},...j&&{image:$$(j)}},successfulResponseHandler:async({response:J,url:G,requestBodyValues:I})=>{if(J.body==null)throw new v({message:"SSE response body is empty",url:G,requestBodyValues:I,statusCode:J.status});let M=hZ({stream:J.body,schema:Y$}).getReader(),{done:k,value:S}=await M.read();if(M.releaseLock(),k||!S)throw new v({message:"SSE stream ended without a data event",url:G,requestBodyValues:I,statusCode:J.status});if(!S.success)throw new v({message:"Failed to parse video SSE event",cause:S.error,url:G,requestBodyValues:I,statusCode:J.status});let T=S.value;if(T.type==="error")throw new v({message:T.message,statusCode:T.statusCode,url:G,requestBodyValues:I,responseHeaders:Object.fromEntries([...J.headers]),responseBody:JSON.stringify(T),data:{error:{message:T.message,type:T.errorType,param:T.param}}});return{value:{videos:T.videos,warnings:T.warnings,providerMetadata:T.providerMetadata},responseHeaders:Object.fromEntries([...J.headers])}},failedResponseHandler:B({errorSchema:Z.any(),errorToMessage:(J)=>J}),...q&&{abortSignal:q},fetch:this.config.fetch});return{videos:b.videos,warnings:(E=b.warnings)!=null?E:[],providerMetadata:b.providerMetadata,response:{timestamp:new Date,modelId:this.modelId,headers:C}}}catch(C){throw await H(C,await w(P))}}getUrl(){return`${this.config.baseURL}/video-model`}getModelConfigHeaders(){return{"ai-video-model-specification-version":"3","ai-model-id":this.modelId}}};function $$($){if($.type==="file"&&$.data instanceof Uint8Array)return{...$,data:u($.data)};return $}var W$=Z.object({videos:Z.array(Z.unknown()).optional()}).catchall(Z.unknown()),Q$=Z.union([Z.object({type:Z.literal("url"),url:Z.string(),mediaType:Z.string()}),Z.object({type:Z.literal("base64"),data:Z.string(),mediaType:Z.string()})]),X$=Z.discriminatedUnion("type",[Z.object({type:Z.literal("unsupported"),feature:Z.string(),details:Z.string().optional()}),Z.object({type:Z.literal("compatibility"),feature:Z.string(),details:Z.string().optional()}),Z.object({type:Z.literal("other"),message:Z.string()})]),Y$=Z.discriminatedUnion("type",[Z.object({type:Z.literal("result"),videos:Z.array(Q$),warnings:Z.array(X$).optional(),providerMetadata:Z.record(Z.string(),W$).optional()}),Z.object({type:Z.literal("error"),message:Z.string(),errorType:Z.string(),statusCode:Z.number(),param:Z.unknown().nullable()})]),j$=class{constructor($,W){this.modelId=$,this.config=W,this.specificationVersion="v3"}get provider(){return this.config.provider}async doRerank({documents:$,query:W,topN:Q,headers:X,abortSignal:Y,providerOptions:D}){let N=await U(this.config.headers());try{let{responseHeaders:j,value:K,rawValue:F}=await R({url:this.getUrl(),headers:O(N,X!=null?X:{},this.getModelConfigHeaders(),await U(this.config.o11yHeaders)),body:{documents:$,query:W,...Q!=null?{topN:Q}:{},...D?{providerOptions:D}:{}},successfulResponseHandler:x(D$),failedResponseHandler:B({errorSchema:Z.any(),errorToMessage:(q)=>q}),...Y&&{abortSignal:Y},fetch:this.config.fetch});return{ranking:K.ranking,providerMetadata:K.providerMetadata,response:{headers:j,body:F},warnings:[]}}catch(j){throw await H(j,await w(N))}}getUrl(){return`${this.config.baseURL}/reranking-model`}getModelConfigHeaders(){return{"ai-reranking-model-specification-version":"3","ai-model-id":this.modelId}}},D$=L(()=>V(Z.object({ranking:Z.array(Z.object({index:Z.number(),relevanceScore:Z.number()})),providerMetadata:Z.record(Z.string(),Z.record(Z.string(),Z.unknown())).optional()}))),K$=L(()=>V(Z.object({objective:Z.string().describe("Natural-language description of the web research goal, including source or freshness guidance and broader context from the task. Maximum 5000 characters."),search_queries:Z.array(Z.string()).optional().describe("Optional search queries to supplement the objective. Maximum 200 characters per query."),mode:Z.enum(["one-shot","agentic"]).optional().describe('Mode preset: "one-shot" for comprehensive results with longer excerpts (default), "agentic" for concise, token-efficient results for multi-step workflows.'),max_results:Z.number().optional().describe("Maximum number of results to return (1-20). Defaults to 10 if not specified."),source_policy:Z.object({include_domains:Z.array(Z.string()).optional().describe("List of domains to include in search results."),exclude_domains:Z.array(Z.string()).optional().describe("List of domains to exclude from search results."),after_date:Z.string().optional().describe("Only include results published after this date (ISO 8601 format).")}).optional().describe("Source policy for controlling which domains to include/exclude and freshness."),excerpts:Z.object({max_chars_per_result:Z.number().optional().describe("Maximum characters per result."),max_chars_total:Z.number().optional().describe("Maximum total characters across all results.")}).optional().describe("Excerpt configuration for controlling result length."),fetch_policy:Z.object({max_age_seconds:Z.number().optional().describe("Maximum age in seconds for cached content. Set to 0 to always fetch fresh content.")}).optional().describe("Fetch policy for controlling content freshness.")}))),J$=L(()=>V(Z.union([Z.object({searchId:Z.string(),results:Z.array(Z.object({url:Z.string(),title:Z.string(),excerpt:Z.string(),publishDate:Z.string().nullable().optional(),relevanceScore:Z.number().optional()}))}),Z.object({error:Z.enum(["api_error","rate_limit","timeout","invalid_input","configuration_error","unknown"]),statusCode:Z.number().optional(),message:Z.string()})]))),A$=l({id:"gateway.parallel_search",inputSchema:K$,outputSchema:J$}),F$=($={})=>A$($),N$=L(()=>V(Z.object({query:Z.union([Z.string(),Z.array(Z.string())]).describe("Search query (string) or multiple queries (array of up to 5 strings). Multi-query searches return combined results from all queries."),max_results:Z.number().optional().describe("Maximum number of search results to return (1-20, default: 10)"),max_tokens_per_page:Z.number().optional().describe("Maximum number of tokens to extract per search result page (256-2048, default: 2048)"),max_tokens:Z.number().optional().describe("Maximum total tokens across all search results (default: 25000, max: 1000000)"),country:Z.string().optional().describe("Two-letter ISO 3166-1 alpha-2 country code for regional search results (e.g., 'US', 'GB', 'FR')"),search_domain_filter:Z.array(Z.string()).optional().describe("List of domains to include or exclude from search results (max 20). To include: ['nature.com', 'science.org']. To exclude: ['-example.com', '-spam.net']"),search_language_filter:Z.array(Z.string()).optional().describe("List of ISO 639-1 language codes to filter results (max 10, lowercase). Examples: ['en', 'fr', 'de']"),search_after_date:Z.string().optional().describe("Include only results published after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter."),search_before_date:Z.string().optional().describe("Include only results published before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."),last_updated_after_filter:Z.string().optional().describe("Include only results last updated after this date. Format: 'MM/DD/YYYY' (e.g., '3/1/2025'). Cannot be used with search_recency_filter."),last_updated_before_filter:Z.string().optional().describe("Include only results last updated before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."),search_recency_filter:Z.enum(["day","week","month","year"]).optional().describe("Filter results by relative time period. Cannot be used with search_after_date or search_before_date.")}))),U$=L(()=>V(Z.union([Z.object({results:Z.array(Z.object({title:Z.string(),url:Z.string(),snippet:Z.string(),date:Z.string().optional(),lastUpdated:Z.string().optional()})),id:Z.string()}),Z.object({error:Z.enum(["api_error","rate_limit","timeout","invalid_input","unknown"]),statusCode:Z.number().optional(),message:Z.string()})]))),L$=l({id:"gateway.perplexity_search",inputSchema:N$,outputSchema:U$}),V$=($={})=>L$($),q$={parallelSearch:F$,perplexitySearch:V$};async function T$(){var $;return($=sZ.getContext().headers)==null?void 0:$["x-vercel-id"]}var B$="3.0.104",G$="0.0.1";function x$($={}){var W,Q;let X=null,Y=null,D=(W=$.metadataCacheRefreshMillis)!=null?W:300000,N=0,j=(Q=gZ($.baseURL))!=null?Q:"https://ai-gateway.vercel.sh/v3/ai",K=async()=>{try{let A=await z$($);return yZ({Authorization:`Bearer ${A.token}`,"ai-gateway-protocol-version":G$,[nZ]:A.authMethod,...$.headers},`ai-sdk/gateway/${B$}`)}catch(A){throw lZ.createContextualError({apiKeyProvided:!1,oidcTokenProvided:!1,statusCode:401,cause:A})}},F=()=>{let A=h({settingValue:void 0,environmentVariableName:"VERCEL_DEPLOYMENT_ID"}),M=h({settingValue:void 0,environmentVariableName:"VERCEL_ENV"}),k=h({settingValue:void 0,environmentVariableName:"VERCEL_REGION"}),S=h({settingValue:void 0,environmentVariableName:"VERCEL_PROJECT_ID"});return async()=>{let T=await T$();return{...A&&{"ai-o11y-deployment-id":A},...M&&{"ai-o11y-environment":M},...k&&{"ai-o11y-region":k},...T&&{"ai-o11y-request-id":T},...S&&{"ai-o11y-project-id":S}}}},q=(A)=>{return new d0(A,{provider:"gateway",baseURL:j,headers:K,fetch:$.fetch,o11yHeaders:F()})},E=async()=>{var A,M,k;let S=(k=(M=(A=$._internal)==null?void 0:A.currentDate)==null?void 0:M.call(A).getTime())!=null?k:Date.now();if(!X||S-N>D)N=S,X=new kZ({baseURL:j,headers:K,fetch:$.fetch}).getAvailableModels().then((T)=>{return Y=T,T}).catch(async(T)=>{throw await H(T,await w(await K()))});return Y?Promise.resolve(Y):X},P=async()=>{return new kZ({baseURL:j,headers:K,fetch:$.fetch}).getCredits().catch(async(A)=>{throw await H(A,await w(await K()))})},C=async(A)=>{return new _0({baseURL:j,headers:K,fetch:$.fetch}).getSpendReport(A).catch(async(M)=>{throw await H(M,await w(await K()))})},b=async(A)=>{return new p0({baseURL:j,headers:K,fetch:$.fetch}).getGenerationInfo(A).catch(async(M)=>{throw await H(M,await w(await K()))})},J=function(A){if(new.target)throw Error("The Gateway Provider model function cannot be called with the new keyword.");return q(A)};J.specificationVersion="v3",J.getAvailableModels=E,J.getCredits=P,J.getSpendReport=C,J.getGenerationInfo=b,J.imageModel=(A)=>{return new t0(A,{provider:"gateway",baseURL:j,headers:K,fetch:$.fetch,o11yHeaders:F()})},J.languageModel=q;let G=(A)=>{return new n0(A,{provider:"gateway",baseURL:j,headers:K,fetch:$.fetch,o11yHeaders:F()})};J.embeddingModel=G,J.textEmbeddingModel=G,J.videoModel=(A)=>{return new Z$(A,{provider:"gateway",baseURL:j,headers:K,fetch:$.fetch,o11yHeaders:F()})};let I=(A)=>{return new j$(A,{provider:"gateway",baseURL:j,headers:K,fetch:$.fetch,o11yHeaders:F()})};return J.rerankingModel=I,J.reranking=I,J.chat=J.languageModel,J.embedding=J.embeddingModel,J.image=J.imageModel,J.video=J.videoModel,J.tools=q$,J}var $W=x$();async function z$($){let W=h({settingValue:$.apiKey,environmentVariableName:"AI_GATEWAY_API_KEY"});if(W)return{token:W,authMethod:"api-key"};return{token:await tZ.getVercelOidcToken(),authMethod:"oidc"}}export{z as Rn,lZ as Sn,R0 as Tn,S0 as Un,b0 as Vn,HZ as Wn,v0 as Xn,x$ as Yn,$W as Zn};