@qitqode/qitqode-android-arm64 0.1.35 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (451) hide show
  1. package/bundle/{chunk-7311jry1.js → chunk-00sr2gwz.js} +2 -2
  2. package/bundle/{chunk-azhw650z.js → chunk-02xcb52z.js} +2 -2
  3. package/bundle/{chunk-gws1rn1v.js → chunk-08q55ya0.js} +1 -1
  4. package/bundle/chunk-092bx2yw.js +2 -0
  5. package/bundle/{chunk-xgr6jnd6.js → chunk-0g25z230.js} +1 -1
  6. package/bundle/chunk-0jrgk6vk.js +2 -0
  7. package/bundle/chunk-0ne5m1n3.js +2 -0
  8. package/bundle/chunk-0qn52zsd.js +2 -0
  9. package/bundle/{chunk-7mxt5b0h.js → chunk-0z33en1a.js} +1 -1
  10. package/bundle/chunk-10accb7b.js +2 -0
  11. package/bundle/chunk-13kpdfr7.js +2 -0
  12. package/bundle/chunk-15s8zwgf.js +2 -0
  13. package/bundle/chunk-17pxm5d3.js +14 -0
  14. package/bundle/{chunk-nj4d554m.js → chunk-1bx2sjn6.js} +1 -1
  15. package/bundle/chunk-1kgyfja6.js +2 -0
  16. package/bundle/{chunk-bv29k2pf.js → chunk-1mcsf4yb.js} +2 -2
  17. package/bundle/{chunk-kwx9ewe0.js → chunk-1wpjmwnh.js} +1 -1
  18. package/bundle/{chunk-snr44en9.js → chunk-25bp7pcm.js} +2 -2
  19. package/bundle/{chunk-kmcsz8yv.js → chunk-2dkrfc1s.js} +1 -1
  20. package/bundle/chunk-2pzvcpv4.js +3 -0
  21. package/bundle/chunk-3bkdbqjj.js +2 -0
  22. package/bundle/{chunk-08m0hkdz.js → chunk-3dr4469n.js} +1 -1
  23. package/bundle/{chunk-n96tvjgj.js → chunk-3mepk08v.js} +2 -2
  24. package/bundle/chunk-3sz6gw10.js +3 -0
  25. package/bundle/{chunk-xqdrr7xg.js → chunk-45mjcxqk.js} +1 -1
  26. package/bundle/chunk-46ztrjw0.js +7 -0
  27. package/bundle/chunk-4dtkj9zg.js +2 -0
  28. package/bundle/chunk-4e9p3e0a.js +2 -0
  29. package/bundle/{chunk-qrtc3etn.js → chunk-4fa390yr.js} +2 -2
  30. package/bundle/chunk-4gs87ghj.js +3 -0
  31. package/bundle/{chunk-3k2b05fv.js → chunk-4sazy0nq.js} +1 -1
  32. package/bundle/chunk-4tbqsrsn.js +2 -0
  33. package/bundle/{chunk-ngccf7ga.js → chunk-52b1v7mn.js} +1 -1
  34. package/bundle/chunk-53kns5wy.js +2 -0
  35. package/bundle/{chunk-11v7vz3y.js → chunk-549ptbaj.js} +1 -1
  36. package/bundle/chunk-559ek1ym.js +2 -0
  37. package/bundle/chunk-55wxgsga.js +2 -0
  38. package/bundle/{chunk-34p46th6.js → chunk-5bate758.js} +1 -1
  39. package/bundle/chunk-5ke0yqqz.js +8 -0
  40. package/bundle/{chunk-kdcnder5.js → chunk-5kmfnkzv.js} +1 -1
  41. package/bundle/chunk-5myxjxae.js +3 -0
  42. package/bundle/chunk-5q1fz2az.js +2 -0
  43. package/bundle/{chunk-txbwmwxj.js → chunk-5sgpjgss.js} +1 -1
  44. package/bundle/{chunk-rsszcqxd.js → chunk-60qyqqxx.js} +1 -1
  45. package/bundle/{chunk-94pcpztx.js → chunk-64s7vfj7.js} +2 -2
  46. package/bundle/{chunk-6ged58yw.js → chunk-6r8pg6ma.js} +2 -2
  47. package/bundle/{chunk-8762ty72.js → chunk-70pb4kcm.js} +2 -2
  48. package/bundle/{chunk-04hvaaje.js → chunk-72zxassf.js} +1 -1
  49. package/bundle/{chunk-yz6898wy.js → chunk-73ckx171.js} +1 -1
  50. package/bundle/{chunk-gj0wt0cy.js → chunk-7fawtcnn.js} +1 -1
  51. package/bundle/{chunk-zfn0z4sh.js → chunk-7gbytqkn.js} +2 -2
  52. package/bundle/{chunk-x66ycpfs.js → chunk-7jhrxzjx.js} +2 -2
  53. package/bundle/{chunk-09pkckr1.js → chunk-7vftsy04.js} +1 -1
  54. package/bundle/chunk-871f8x99.js +4 -0
  55. package/bundle/chunk-88emsbaz.js +2 -0
  56. package/bundle/{chunk-zfd70p01.js → chunk-8dxdeksr.js} +1 -1
  57. package/bundle/{chunk-6styp5dn.js → chunk-8fgamz4y.js} +1 -1
  58. package/bundle/{chunk-9qdr9t8c.js → chunk-8q6z6emx.js} +1 -1
  59. package/bundle/{chunk-4ttf9rjd.js → chunk-8r3410c2.js} +1 -1
  60. package/bundle/{chunk-3mzcr3fw.js → chunk-8tp4whyw.js} +1 -1
  61. package/bundle/chunk-8yn64y27.js +2 -0
  62. package/bundle/{chunk-41v0x1jk.js → chunk-8yr682pv.js} +2 -2
  63. package/bundle/chunk-8ywa7az5.js +2 -0
  64. package/bundle/chunk-8ywdddts.js +2 -0
  65. package/bundle/{chunk-exmw8jfa.js → chunk-909fp6pm.js} +2 -2
  66. package/bundle/chunk-92zjark4.js +2 -0
  67. package/bundle/chunk-98effz12.js +2 -0
  68. package/bundle/{chunk-kjyw00jp.js → chunk-9cw4cnz0.js} +1 -1
  69. package/bundle/{chunk-2swch6mx.js → chunk-9dh9bc9d.js} +1 -1
  70. package/bundle/{chunk-y437vyza.js → chunk-9fkmhmh6.js} +1 -1
  71. package/bundle/{chunk-7vd91wsd.js → chunk-9nk0ts0s.js} +1 -1
  72. package/bundle/{chunk-p9cnzxb8.js → chunk-9s4whpg1.js} +2 -2
  73. package/bundle/{chunk-yajd975f.js → chunk-9xvctnjr.js} +1 -1
  74. package/bundle/{chunk-4wxxyrxn.js → chunk-9zre5e54.js} +1 -1
  75. package/bundle/chunk-a6z0fhta.js +2 -0
  76. package/bundle/{chunk-yt3f3j35.js → chunk-a9y27zd2.js} +1 -1
  77. package/bundle/{chunk-mex0fe9s.js → chunk-acyj91wq.js} +1 -1
  78. package/bundle/chunk-aj3y2e86.js +3 -0
  79. package/bundle/chunk-akpssv2d.js +2 -0
  80. package/bundle/chunk-aq28ejhv.js +2 -0
  81. package/bundle/{chunk-pkc4ddw1.js → chunk-atpzz901.js} +1 -1
  82. package/bundle/chunk-aw8af3ky.js +2 -0
  83. package/bundle/chunk-ax1y4699.js +2 -0
  84. package/bundle/{chunk-dctj3c22.js → chunk-b0jh0rby.js} +2 -2
  85. package/bundle/chunk-b10px5g4.js +2 -0
  86. package/bundle/chunk-bha3sbsj.js +2 -0
  87. package/bundle/{chunk-67d5d8mr.js → chunk-bnz0mxak.js} +1 -1
  88. package/bundle/chunk-bs020a3x.js +2 -0
  89. package/bundle/chunk-bs61sezq.js +2 -0
  90. package/bundle/{chunk-7eexey82.js → chunk-c72jajx9.js} +1 -1
  91. package/bundle/{chunk-81trveht.js → chunk-cagk1sjd.js} +1 -1
  92. package/bundle/{chunk-1byd3wma.js → chunk-cdh26622.js} +2 -2
  93. package/bundle/{chunk-t2vm08v6.js → chunk-ceefd2nj.js} +1 -1
  94. package/bundle/chunk-cmdjkx32.js +2 -0
  95. package/bundle/{chunk-zh3fny3z.js → chunk-cx7p4ezk.js} +2 -2
  96. package/bundle/chunk-cxtxvt43.js +2 -0
  97. package/bundle/{chunk-pxmhe36r.js → chunk-d1rn44wz.js} +1 -1
  98. package/bundle/{chunk-0c6ep9mc.js → chunk-d93z6hrn.js} +1 -1
  99. package/bundle/{chunk-zddknkw7.js → chunk-d9x9kqvy.js} +1 -1
  100. package/bundle/chunk-de2rfsaf.js +2 -0
  101. package/bundle/{chunk-seghf5fc.js → chunk-dgx4rq86.js} +1 -1
  102. package/bundle/{chunk-qzj6027k.js → chunk-dh1h513y.js} +1 -1
  103. package/bundle/chunk-dncnyzaa.js +2 -0
  104. package/bundle/chunk-dp6zktka.js +2 -0
  105. package/bundle/{chunk-ba3h1pzs.js → chunk-dshnn54c.js} +1 -1
  106. package/bundle/{chunk-73myw3bj.js → chunk-dt899wbf.js} +2 -2
  107. package/bundle/chunk-dvqdtdza.js +2 -0
  108. package/bundle/{chunk-6ynxf3q7.js → chunk-dvxk6mr6.js} +2 -2
  109. package/bundle/{chunk-bnss5dkk.js → chunk-dykqn0nj.js} +2 -2
  110. package/bundle/{chunk-hv6eccx1.js → chunk-dz3s882k.js} +220 -220
  111. package/bundle/{chunk-y9zstzed.js → chunk-eaqfnwdj.js} +1 -1
  112. package/bundle/{chunk-54wh8b12.js → chunk-eb8nsk7e.js} +2 -2
  113. package/bundle/chunk-ebabnv33.js +3 -0
  114. package/bundle/chunk-ebdpg3cn.js +2 -0
  115. package/bundle/{chunk-kfmz2p27.js → chunk-ev3a2sxv.js} +2 -2
  116. package/bundle/{chunk-d00c1k9w.js → chunk-ewpzqnj4.js} +1 -1
  117. package/bundle/chunk-eyc6tb5h.js +2 -0
  118. package/bundle/chunk-eze57bty.js +2 -0
  119. package/bundle/{chunk-qddt2gcs.js → chunk-ezrskm25.js} +1 -1
  120. package/bundle/chunk-fa47vzfc.js +2 -0
  121. package/bundle/chunk-fe397ph0.js +2 -0
  122. package/bundle/{chunk-bzgj60w4.js → chunk-fn8191ps.js} +2 -2
  123. package/bundle/chunk-fr75ytdr.js +2 -0
  124. package/bundle/chunk-fw2tnbt6.js +2 -0
  125. package/bundle/chunk-fwr2qgqb.js +2 -0
  126. package/bundle/chunk-fyz7fngd.js +2 -0
  127. package/bundle/chunk-g204pt98.js +2 -0
  128. package/bundle/{chunk-ggydr1ze.js → chunk-g794ey6w.js} +1 -1
  129. package/bundle/chunk-g8cfzzrs.js +2 -0
  130. package/bundle/chunk-gcgmwqhh.js +2 -0
  131. package/bundle/{chunk-rmve21dh.js → chunk-gg7bg3ek.js} +1 -1
  132. package/bundle/{chunk-9x25d115.js → chunk-gkj4a27z.js} +1 -1
  133. package/bundle/{chunk-sjw56r2n.js → chunk-gnt982jr.js} +3 -3
  134. package/bundle/chunk-grdfpd57.js +2 -0
  135. package/bundle/chunk-gt6tgm42.js +5 -0
  136. package/bundle/chunk-gw36mrg4.js +2 -0
  137. package/bundle/{chunk-z8gdmvgg.js → chunk-gwfx7tx7.js} +2 -2
  138. package/bundle/{chunk-q8hd01j7.js → chunk-gxmxx8jb.js} +1 -1
  139. package/bundle/{chunk-tge53d52.js → chunk-h1kg35mn.js} +1 -1
  140. package/bundle/chunk-h36qec67.js +2 -0
  141. package/bundle/{chunk-0msqaywp.js → chunk-h7w35n7w.js} +1 -1
  142. package/bundle/chunk-h9gtymfm.js +2 -0
  143. package/bundle/chunk-h9qn35pn.js +2 -0
  144. package/bundle/{chunk-mr8j7rc6.js → chunk-hb9mc5f9.js} +1 -1
  145. package/bundle/{chunk-df2aswz3.js → chunk-hcy77w6t.js} +1 -1
  146. package/bundle/chunk-hd8q4msp.js +2 -0
  147. package/bundle/{chunk-6a7c7wnf.js → chunk-hgsykghj.js} +2 -2
  148. package/bundle/chunk-hhjkezfz.js +2 -0
  149. package/bundle/chunk-hnz570f9.js +3 -0
  150. package/bundle/chunk-j5kyf7vt.js +5 -0
  151. package/bundle/{chunk-1yt5rsew.js → chunk-j63fkt6n.js} +1 -1
  152. package/bundle/{chunk-03xppy47.js → chunk-jcjaw7tk.js} +2 -2
  153. package/bundle/{chunk-jkh6eg7d.js → chunk-jf6ry79j.js} +4 -4
  154. package/bundle/chunk-jfz8wwk9.js +2 -0
  155. package/bundle/{chunk-ke7n9t5p.js → chunk-jgz1a29w.js} +3 -3
  156. package/bundle/{chunk-ebcdxmdd.js → chunk-jngchw38.js} +1 -1
  157. package/bundle/{chunk-j5ymkhry.js → chunk-jqn27885.js} +1 -1
  158. package/bundle/chunk-js6hqmq7.js +2 -0
  159. package/bundle/{chunk-hj3ddt53.js → chunk-jts0dma5.js} +2 -2
  160. package/bundle/chunk-k70x182t.js +2 -0
  161. package/bundle/chunk-k7n1csxv.js +3 -0
  162. package/bundle/{chunk-er38zew1.js → chunk-kb6v5hhm.js} +2 -2
  163. package/bundle/chunk-kmtfdky8.js +4 -0
  164. package/bundle/chunk-kp8nkm3m.js +2 -0
  165. package/bundle/{chunk-7hm0c2yg.js → chunk-kqhh2pm9.js} +1 -1
  166. package/bundle/{chunk-0h8wdch6.js → chunk-kt0ej3nq.js} +1 -1
  167. package/bundle/chunk-kwzawx7r.js +2 -0
  168. package/bundle/{chunk-n6msxne8.js → chunk-kx2dp8ch.js} +1 -1
  169. package/bundle/chunk-m0mek3es.js +2 -0
  170. package/bundle/{chunk-tbgczapt.js → chunk-m0xsvzyd.js} +2 -2
  171. package/bundle/chunk-m31d2n6h.js +2 -0
  172. package/bundle/{chunk-9ayxg9mq.js → chunk-m6zxr0j8.js} +2 -2
  173. package/bundle/{chunk-egn55fa2.js → chunk-mcc5ynma.js} +3 -3
  174. package/bundle/{chunk-md8161zd.js → chunk-mdzzcrf9.js} +2 -2
  175. package/bundle/{chunk-ynwkr3yh.js → chunk-mvnxwwe7.js} +2 -2
  176. package/bundle/{chunk-b4knxpqh.js → chunk-mw2hr4pd.js} +1 -1
  177. package/bundle/{chunk-vszbqv24.js → chunk-mzbr0m2v.js} +1 -1
  178. package/bundle/{chunk-bj00xk8k.js → chunk-n0trgp1c.js} +2 -2
  179. package/bundle/chunk-n14qktbg.js +2 -0
  180. package/bundle/{chunk-yjk6zv2z.js → chunk-n2ygpy76.js} +1 -1
  181. package/bundle/{chunk-yprmd5b7.js → chunk-n38h109k.js} +2 -2
  182. package/bundle/{chunk-8vg4fmg2.js → chunk-n7d9eemn.js} +180 -178
  183. package/bundle/{chunk-06k6egt2.js → chunk-neqy8j4n.js} +1 -1
  184. package/bundle/chunk-nhwhkx62.js +4 -0
  185. package/bundle/{chunk-nj61v4n7.js → chunk-njkserae.js} +1 -1
  186. package/bundle/{chunk-n6gtdx5h.js → chunk-nq495be3.js} +1 -1
  187. package/bundle/{chunk-p3qkexpk.js → chunk-nsjp44fp.js} +1 -1
  188. package/bundle/chunk-nzzsj54n.js +2 -0
  189. package/bundle/chunk-p19qfw59.js +2 -0
  190. package/bundle/chunk-p2yxj9s4.js +2 -0
  191. package/bundle/{chunk-1dtzxt2w.js → chunk-p3rp99na.js} +1 -1
  192. package/bundle/{chunk-79agp7v3.js → chunk-p8kpqyxb.js} +2 -2
  193. package/bundle/{chunk-9fxkh84w.js → chunk-p9zrk16q.js} +1 -1
  194. package/bundle/chunk-pnpre7ys.js +3 -0
  195. package/bundle/{chunk-ee23d2nz.js → chunk-pnq1h5az.js} +2 -2
  196. package/bundle/{chunk-wfd5h6ax.js → chunk-pqnbdygz.js} +2 -2
  197. package/bundle/chunk-pr1ysgr3.js +2 -0
  198. package/bundle/chunk-ps9p14y6.js +2 -0
  199. package/bundle/chunk-px8vtbmr.js +3 -0
  200. package/bundle/{chunk-zfcp509b.js → chunk-pxx2hz0g.js} +2 -2
  201. package/bundle/{chunk-rq4w0by4.js → chunk-q81m4m9z.js} +1 -1
  202. package/bundle/chunk-qagc6v17.js +2 -0
  203. package/bundle/{chunk-mq6jn47r.js → chunk-qb35hqm4.js} +1 -1
  204. package/bundle/chunk-qc0zhbhm.js +2 -0
  205. package/bundle/{chunk-keveg5gx.js → chunk-qdcf1ay5.js} +2 -2
  206. package/bundle/{chunk-t3eymzg1.js → chunk-qpzspr9z.js} +2 -2
  207. package/bundle/chunk-qq2rcxv2.js +9 -0
  208. package/bundle/{chunk-axdzm75h.js → chunk-qqne79vp.js} +2 -2
  209. package/bundle/{chunk-g4gjz7sq.js → chunk-qs4wef8c.js} +1 -1
  210. package/bundle/{chunk-nmehsm3w.js → chunk-qy1a2tpc.js} +1 -1
  211. package/bundle/chunk-qyjt0qnq.js +3 -0
  212. package/bundle/{chunk-6a77w77q.js → chunk-r0g5yyhf.js} +4 -4
  213. package/bundle/{chunk-by855es0.js → chunk-r58gzg6m.js} +1 -1
  214. package/bundle/{chunk-fmq0m4k5.js → chunk-r6ndvzd0.js} +1 -1
  215. package/bundle/chunk-r78kfhvz.js +2 -0
  216. package/bundle/{chunk-dyv2hqvc.js → chunk-rcyhqkv5.js} +1 -1
  217. package/bundle/{chunk-yp5bypsp.js → chunk-rexdr63q.js} +2 -2
  218. package/bundle/{chunk-1me21qdc.js → chunk-rgxy4ngt.js} +1 -1
  219. package/bundle/chunk-rnd5mnsm.js +2 -0
  220. package/bundle/{chunk-dcndy4sr.js → chunk-rph9zj24.js} +1 -1
  221. package/bundle/{chunk-ryfqwsft.js → chunk-rrd0jf5m.js} +1 -1
  222. package/bundle/{chunk-e74efvj2.js → chunk-rtdym35y.js} +172 -172
  223. package/bundle/chunk-s2xdf6qh.js +14 -0
  224. package/bundle/{chunk-mpygdb5a.js → chunk-s8mghr5a.js} +2 -2
  225. package/bundle/chunk-schtpyjs.js +2 -0
  226. package/bundle/{chunk-08f4khsw.js → chunk-snt1kefv.js} +3 -3
  227. package/bundle/{chunk-a1hzeejj.js → chunk-sp8ek94w.js} +2 -2
  228. package/bundle/{chunk-s8hq6trz.js → chunk-srxx88nb.js} +1 -1
  229. package/bundle/{chunk-gy0wm7e1.js → chunk-std2bgv7.js} +2 -2
  230. package/bundle/chunk-sv1s1qxd.js +619 -0
  231. package/bundle/{chunk-dffhkd30.js → chunk-swcgsrbj.js} +1 -1
  232. package/bundle/chunk-sxwqrvmy.js +28 -0
  233. package/bundle/chunk-sxy4hyyy.js +2 -0
  234. package/bundle/chunk-syc4b8rt.js +2 -0
  235. package/bundle/{chunk-wgk7ynt3.js → chunk-t01bhw5h.js} +3 -3
  236. package/bundle/chunk-tcs6wgna.js +3 -0
  237. package/bundle/{chunk-gmzrvxnv.js → chunk-tdmn21z0.js} +2 -2
  238. package/bundle/{chunk-71zw0qhf.js → chunk-tdxbm1nd.js} +1 -1
  239. package/bundle/{chunk-p825vsjy.js → chunk-te5tfq79.js} +1 -1
  240. package/bundle/chunk-tf4xwqz7.js +2 -0
  241. package/bundle/{chunk-fg35hwa0.js → chunk-tgd5ctnt.js} +2 -2
  242. package/bundle/chunk-twhavv1m.js +2 -0
  243. package/bundle/{chunk-qa2j0qmy.js → chunk-txqc7543.js} +2 -2
  244. package/bundle/chunk-tzg4z74d.js +2 -0
  245. package/bundle/chunk-tzrbb0e8.js +3 -0
  246. package/bundle/chunk-v0yxkq99.js +3 -0
  247. package/bundle/{chunk-a3a1trap.js → chunk-v3x5nrc4.js} +2 -2
  248. package/bundle/chunk-v7q3d3n6.js +3 -0
  249. package/bundle/chunk-v8vcwx23.js +2 -0
  250. package/bundle/chunk-vc4e6xc4.js +10 -0
  251. package/bundle/{chunk-6p7yg5sr.js → chunk-vftqwdpg.js} +1 -1
  252. package/bundle/{chunk-r0k21apr.js → chunk-vgaxv70x.js} +2 -2
  253. package/bundle/{chunk-nkk4fyqf.js → chunk-vgnddhdj.js} +1 -1
  254. package/bundle/{chunk-xd3xc1vv.js → chunk-vm58fkrv.js} +1 -1
  255. package/bundle/{chunk-qg2vk5fw.js → chunk-vsys768k.js} +1 -1
  256. package/bundle/{chunk-5a7fs1hg.js → chunk-vvzbfv2f.js} +1 -1
  257. package/bundle/{chunk-s4qtphwx.js → chunk-w03fdrxe.js} +1 -1
  258. package/bundle/{chunk-z1ay3qd0.js → chunk-w3bmf3zz.js} +1 -1
  259. package/bundle/{chunk-vsr8mnj6.js → chunk-w5940jxm.js} +1 -1
  260. package/bundle/chunk-w6rf2knb.js +2 -0
  261. package/bundle/{chunk-aa8hymcv.js → chunk-w8d9srv7.js} +2 -2
  262. package/bundle/chunk-w9pdvcf9.js +3 -0
  263. package/bundle/{chunk-yk97q51d.js → chunk-wev34grp.js} +2 -2
  264. package/bundle/chunk-wh7r96t3.js +2 -0
  265. package/bundle/{chunk-1pg6pv0m.js → chunk-wm77svwm.js} +1 -1
  266. package/bundle/chunk-wnjqaxze.js +2 -0
  267. package/bundle/{chunk-gckgaqqr.js → chunk-ws3p9cya.js} +2 -2
  268. package/bundle/chunk-x42w8ewc.js +2 -0
  269. package/bundle/{chunk-qkjdr337.js → chunk-x6rr6ss1.js} +1 -1
  270. package/bundle/chunk-xc9se3c8.js +2 -0
  271. package/bundle/{chunk-bbzztav6.js → chunk-xdacgfba.js} +1 -1
  272. package/bundle/{chunk-6p94fpbn.js → chunk-xdjwapwy.js} +2 -2
  273. package/bundle/chunk-xfz698bh.js +2 -0
  274. package/bundle/{chunk-zwnhf4z1.js → chunk-xhbb8b5g.js} +1 -1
  275. package/bundle/chunk-xjhezxft.js +8 -0
  276. package/bundle/chunk-xxj3sgd5.js +2 -0
  277. package/bundle/chunk-xxvqq7kc.js +2 -0
  278. package/bundle/{chunk-cs38g1bx.js → chunk-y0ydzdfc.js} +1 -1
  279. package/bundle/{chunk-wvf5q2hz.js → chunk-y1b2h15z.js} +1 -1
  280. package/bundle/{chunk-1gf116rg.js → chunk-yacccwf6.js} +1 -1
  281. package/bundle/chunk-ydc6ypjt.js +77 -0
  282. package/bundle/chunk-ye0mkqb4.js +2 -0
  283. package/bundle/{chunk-dhqaqeq6.js → chunk-yeq7b87a.js} +1 -1
  284. package/bundle/chunk-yfp9y71y.js +2 -0
  285. package/bundle/{chunk-e6xnynaz.js → chunk-yha554nm.js} +2 -2
  286. package/bundle/{chunk-rv1stdvb.js → chunk-yj6rbe9p.js} +2 -2
  287. package/bundle/chunk-yjjh339w.js +2 -0
  288. package/bundle/{chunk-c5pb87yf.js → chunk-ymtcm4xd.js} +1 -1
  289. package/bundle/chunk-ypk3t1eh.js +3 -0
  290. package/bundle/chunk-yt6vd7a5.js +2 -0
  291. package/bundle/{chunk-ssk8tkwd.js → chunk-yw9pfqxt.js} +1 -1
  292. package/bundle/{chunk-g6cyhxwg.js → chunk-yykjvt7f.js} +2 -2
  293. package/bundle/{chunk-sfes6pp1.js → chunk-yzh4rmrt.js} +1 -1
  294. package/bundle/chunk-yzn08nx1.js +2 -0
  295. package/bundle/chunk-yzq3c3dq.js +2 -0
  296. package/bundle/{chunk-prh3c44x.js → chunk-yzwgvjzd.js} +1 -1
  297. package/bundle/chunk-z0tfsdb9.js +3 -0
  298. package/bundle/chunk-z1j25911.js +2 -0
  299. package/bundle/{chunk-rkwrjphh.js → chunk-z1rshv6g.js} +1 -1
  300. package/bundle/chunk-z210dtw1.js +3 -0
  301. package/bundle/chunk-z29ahthm.js +2 -0
  302. package/bundle/{chunk-w1n4rf6n.js → chunk-z7vv0ngm.js} +2 -2
  303. package/bundle/{chunk-jgjnz82k.js → chunk-zaan8jk6.js} +1 -1
  304. package/bundle/{chunk-6gb65bv1.js → chunk-zbqzm65q.js} +1 -1
  305. package/bundle/{chunk-bk4phk66.js → chunk-zesbm9k1.js} +1 -1
  306. package/bundle/{chunk-c6vfwjg4.js → chunk-zfcfyagt.js} +1 -1
  307. package/bundle/{chunk-ywkvq7zb.js → chunk-zfnbk5gy.js} +1 -1
  308. package/bundle/chunk-zgre4gc2.js +2 -0
  309. package/bundle/{chunk-z7430qxg.js → chunk-zrmx397j.js} +1 -1
  310. package/bundle/chunk-zthkjx33.js +2 -0
  311. package/bundle/chunk-ztnepaqc.js +3 -0
  312. package/bundle/chunk-zwvwbrsc.js +2 -0
  313. package/bundle/chunk-zxddasg8.js +2 -0
  314. package/bundle/index.js +3 -3
  315. package/bundle/parser.worker.js +2 -2
  316. package/bundle/worker.js +1 -1
  317. package/package.json +1 -1
  318. package/bundle/chunk-0442cmw2.js +0 -2
  319. package/bundle/chunk-085pvqr4.js +0 -2
  320. package/bundle/chunk-0x5jn813.js +0 -2
  321. package/bundle/chunk-11g2rpv8.js +0 -3
  322. package/bundle/chunk-28t9akfn.js +0 -2
  323. package/bundle/chunk-2h1fcqvf.js +0 -2
  324. package/bundle/chunk-2kens6wh.js +0 -2
  325. package/bundle/chunk-2scyp9ns.js +0 -2
  326. package/bundle/chunk-2tw58kwb.js +0 -2
  327. package/bundle/chunk-2vxx0tax.js +0 -2
  328. package/bundle/chunk-2ybt3p5z.js +0 -2
  329. package/bundle/chunk-2zpkw3ge.js +0 -2
  330. package/bundle/chunk-31g86yn6.js +0 -2
  331. package/bundle/chunk-397be2x0.js +0 -2
  332. package/bundle/chunk-3c78nkgn.js +0 -2
  333. package/bundle/chunk-3d91q2qd.js +0 -2
  334. package/bundle/chunk-43yv7tz1.js +0 -2
  335. package/bundle/chunk-496ajawz.js +0 -2
  336. package/bundle/chunk-499gp5g5.js +0 -2
  337. package/bundle/chunk-4hzm14xt.js +0 -3
  338. package/bundle/chunk-4xw14sed.js +0 -2
  339. package/bundle/chunk-536naqqv.js +0 -2
  340. package/bundle/chunk-57nvmhjq.js +0 -2
  341. package/bundle/chunk-5e4fxy99.js +0 -616
  342. package/bundle/chunk-5he3d7cy.js +0 -2
  343. package/bundle/chunk-5qr286w8.js +0 -2
  344. package/bundle/chunk-606vpgc4.js +0 -4
  345. package/bundle/chunk-6a1skxcj.js +0 -3
  346. package/bundle/chunk-6cj7cn5x.js +0 -2
  347. package/bundle/chunk-6hybp2mt.js +0 -2
  348. package/bundle/chunk-6y423jax.js +0 -3
  349. package/bundle/chunk-72ghkgcn.js +0 -2
  350. package/bundle/chunk-741teh8k.js +0 -2
  351. package/bundle/chunk-7b3wx6kn.js +0 -2
  352. package/bundle/chunk-891yevv2.js +0 -2
  353. package/bundle/chunk-8c1ypgw5.js +0 -3
  354. package/bundle/chunk-8ktgy41r.js +0 -2
  355. package/bundle/chunk-8q73cjyj.js +0 -2
  356. package/bundle/chunk-8rt63jbm.js +0 -2
  357. package/bundle/chunk-8y623qdx.js +0 -2
  358. package/bundle/chunk-921vn745.js +0 -2
  359. package/bundle/chunk-945ebhte.js +0 -2
  360. package/bundle/chunk-9548cc0c.js +0 -2
  361. package/bundle/chunk-9yrypq1r.js +0 -14
  362. package/bundle/chunk-a0rp7gh4.js +0 -77
  363. package/bundle/chunk-a48t0g95.js +0 -3
  364. package/bundle/chunk-a949at1c.js +0 -3
  365. package/bundle/chunk-akk84fnc.js +0 -2
  366. package/bundle/chunk-aw7j7brm.js +0 -2
  367. package/bundle/chunk-b6cybdj3.js +0 -2
  368. package/bundle/chunk-c5fa8cb1.js +0 -2
  369. package/bundle/chunk-ca4r31we.js +0 -2
  370. package/bundle/chunk-ckbwdrm3.js +0 -2
  371. package/bundle/chunk-cqj21rfj.js +0 -3
  372. package/bundle/chunk-cz3h5n1v.js +0 -3
  373. package/bundle/chunk-dhc6e1t7.js +0 -2
  374. package/bundle/chunk-dk6rbqvp.js +0 -2
  375. package/bundle/chunk-dk975etf.js +0 -3
  376. package/bundle/chunk-dwajajaq.js +0 -2
  377. package/bundle/chunk-dxcrggvq.js +0 -2
  378. package/bundle/chunk-dyt3n3fe.js +0 -2
  379. package/bundle/chunk-e7ah0e61.js +0 -2
  380. package/bundle/chunk-e7v9trve.js +0 -11
  381. package/bundle/chunk-e8ws454m.js +0 -2
  382. package/bundle/chunk-efndtzby.js +0 -2
  383. package/bundle/chunk-eq2pepce.js +0 -2
  384. package/bundle/chunk-eva3nqqb.js +0 -14
  385. package/bundle/chunk-f3bnn9rf.js +0 -8
  386. package/bundle/chunk-f693s9vn.js +0 -2
  387. package/bundle/chunk-ftepqwyq.js +0 -2
  388. package/bundle/chunk-g18ax6yp.js +0 -2
  389. package/bundle/chunk-gadyp6mb.js +0 -2
  390. package/bundle/chunk-ge8315te.js +0 -5
  391. package/bundle/chunk-gk28ffhg.js +0 -2
  392. package/bundle/chunk-gpfc4z4v.js +0 -2
  393. package/bundle/chunk-gqvg02zp.js +0 -2
  394. package/bundle/chunk-gsyt2sv7.js +0 -2
  395. package/bundle/chunk-h3k1dk9m.js +0 -2
  396. package/bundle/chunk-h8c3dcqt.js +0 -2
  397. package/bundle/chunk-hfq11w4h.js +0 -2
  398. package/bundle/chunk-hw5qyht3.js +0 -3
  399. package/bundle/chunk-hwf58w1k.js +0 -2
  400. package/bundle/chunk-jyczz3yh.js +0 -8
  401. package/bundle/chunk-k8k8z6b7.js +0 -3
  402. package/bundle/chunk-kk3ve911.js +0 -2
  403. package/bundle/chunk-kv72hxkp.js +0 -3
  404. package/bundle/chunk-m4j7jyrd.js +0 -3
  405. package/bundle/chunk-mf3sm0pk.js +0 -2
  406. package/bundle/chunk-mkng9ykt.js +0 -2
  407. package/bundle/chunk-mxvypy3s.js +0 -2
  408. package/bundle/chunk-n5ypgxrn.js +0 -28
  409. package/bundle/chunk-n9xw9kqc.js +0 -2
  410. package/bundle/chunk-nc4wbc89.js +0 -2
  411. package/bundle/chunk-ngk67rt3.js +0 -3
  412. package/bundle/chunk-nj2bbtmx.js +0 -2
  413. package/bundle/chunk-nr1g57b2.js +0 -2
  414. package/bundle/chunk-p0ahbpxv.js +0 -2
  415. package/bundle/chunk-p7y8z5rd.js +0 -2
  416. package/bundle/chunk-pt26gerr.js +0 -2
  417. package/bundle/chunk-qkk1as5n.js +0 -2
  418. package/bundle/chunk-qsm9xw87.js +0 -2
  419. package/bundle/chunk-qw980y8h.js +0 -2
  420. package/bundle/chunk-r2w3gr8d.js +0 -2
  421. package/bundle/chunk-r5bqcpkz.js +0 -2
  422. package/bundle/chunk-r67c858b.js +0 -2
  423. package/bundle/chunk-r9fvfkee.js +0 -2
  424. package/bundle/chunk-rcn0dhbj.js +0 -2
  425. package/bundle/chunk-rq47pn3r.js +0 -2
  426. package/bundle/chunk-rvt1tdy8.js +0 -2
  427. package/bundle/chunk-ry7q8xn6.js +0 -2
  428. package/bundle/chunk-s27xvrft.js +0 -2
  429. package/bundle/chunk-s5nde2kd.js +0 -5
  430. package/bundle/chunk-scy39p6q.js +0 -2
  431. package/bundle/chunk-srpe3v8e.js +0 -9
  432. package/bundle/chunk-st5jaszz.js +0 -3
  433. package/bundle/chunk-t5qamf96.js +0 -2
  434. package/bundle/chunk-t9mz17gb.js +0 -3
  435. package/bundle/chunk-tns5x4w0.js +0 -3
  436. package/bundle/chunk-ttevj0pj.js +0 -2
  437. package/bundle/chunk-v7c54cyj.js +0 -2
  438. package/bundle/chunk-vgefaens.js +0 -2
  439. package/bundle/chunk-vv59b4re.js +0 -2
  440. package/bundle/chunk-vwqy7n3g.js +0 -2
  441. package/bundle/chunk-vysa9hp4.js +0 -7
  442. package/bundle/chunk-wn076jwj.js +0 -2
  443. package/bundle/chunk-x0m1qye9.js +0 -2
  444. package/bundle/chunk-xvntsbb1.js +0 -3
  445. package/bundle/chunk-y70aachh.js +0 -2
  446. package/bundle/chunk-yqk58hf6.js +0 -3
  447. package/bundle/chunk-ysgxt83y.js +0 -2
  448. package/bundle/chunk-ze9e6nt3.js +0 -3
  449. package/bundle/chunk-znzan00b.js +0 -3
  450. package/bundle/chunk-zrp55k47.js +0 -2
  451. package/bundle/chunk-zwdnh860.js +0 -2
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{ls as z,os as B}from"./chunk-dk975etf.js";import{du as D}from"./chunk-tns5x4w0.js";import{vA as r}from"./chunk-wfd5h6ax.js";import{OI as W,YD as x,lG as R}from"./chunk-a0rp7gh4.js";var w=x.Reference("~qitqode/InstanceRef",{defaultValue:()=>{return}}),C=x.Reference("~qitqode/WorkspaceRef",{defaultValue:()=>{return}});var V=D.create("instance"),y={async provide(p){return V.provide({workspaceID:p.workspaceID},()=>p.fn())},restore(p,o){return V.provide({workspaceID:p},o)},get workspaceID(){try{return V.use().workspaceID}catch{return}}};var j;function U(p){j=p}function P(){if(!j)throw new D.NotFound("instance");return j()}function H(p,o){if(!o.instance&&!o.workspace)return p;if(!o.instance)return p.pipe(W.provideService(C,o.workspace));if(!o.workspace)return p.pipe(W.provideService(w,o.instance));return p.pipe(W.provideService(w,o.instance),W.provideService(C,o.workspace))}function d(p){try{return H(p,{instance:P(),workspace:y.workspaceID})}catch(o){if(!(o instanceof D.NotFound))throw o}return p}function F(p,o){let G,I=()=>G??=r.make(R.provideMerge(o,z),{memoMap:B});return{runSync:(k)=>I().runSync(d(p.use(k))),runPromiseExit:(k,q)=>I().runPromiseExit(d(p.use(k)),q),runPromise:(k,q)=>I().runPromise(d(p.use(k)),q),runFork:(k)=>I().runFork(d(p.use(k))),runCallback:(k)=>I().runCallback(d(p.use(k)))}}
3
- export{w as cs,C as ds,y as es,U as fs,H as gs,d as hs,F as is};
2
+ import{qs as z,ts as B}from"./chunk-qyjt0qnq.js";import{pt as D}from"./chunk-cxtxvt43.js";import{DA as r}from"./chunk-pqnbdygz.js";import{UI as W,nD as x,rG as R}from"./chunk-ydc6ypjt.js";var w=x.Reference("~qitqode/InstanceRef",{defaultValue:()=>{return}}),C=x.Reference("~qitqode/WorkspaceRef",{defaultValue:()=>{return}});var V=D.create("instance"),y={async provide(p){return V.provide({workspaceID:p.workspaceID},()=>p.fn())},restore(p,o){return V.provide({workspaceID:p},o)},get workspaceID(){try{return V.use().workspaceID}catch{return}}};var j;function U(p){j=p}function P(){if(!j)throw new D.NotFound("instance");return j()}function H(p,o){if(!o.instance&&!o.workspace)return p;if(!o.instance)return p.pipe(W.provideService(C,o.workspace));if(!o.workspace)return p.pipe(W.provideService(w,o.instance));return p.pipe(W.provideService(w,o.instance),W.provideService(C,o.workspace))}function d(p){try{return H(p,{instance:P(),workspace:y.workspaceID})}catch(o){if(!(o instanceof D.NotFound))throw o}return p}function F(p,o){let G,I=()=>G??=r.make(R.provideMerge(o,z),{memoMap:B});return{runSync:(k)=>I().runSync(d(p.use(k))),runPromiseExit:(k,q)=>I().runPromiseExit(d(p.use(k)),q),runPromise:(k,q)=>I().runPromise(d(p.use(k)),q),runFork:(k)=>I().runFork(d(p.use(k))),runCallback:(k)=>I().runCallback(d(p.use(k)))}}
3
+ export{w as hs,C as is,y as js,U as ks,H as ls,d as ms,F as ns};
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ import{_u as Q}from"./chunk-vc4e6xc4.js";import{$u as u}from"./chunk-hnz570f9.js";import{SP as B}from"./chunk-ydc6ypjt.js";import{iQ as i}from"./chunk-4sazy0nq.js";var Pq={};i(Pq,{redactValue:()=>D,init:()=>Hq,flush:()=>Jq,file:()=>qq,enabled:()=>a,create:()=>h,Level:()=>s,Default:()=>e});import U from"path";import Z from"fs/promises";import{createWriteStream as m}from"fs";var Wq="https://qortex.forgewise.tech/api/v1/qortex/streamTier",Gq=new URL("https://qortex.forgewise.tech/api/v1/qortex/streamTier").origin,_="https://qortex.forgewise.tech/api/v1/qortex/streamTier".replace(/\/streamTier$/,""),Vq={name:"QitQode",family:"qlex",npm:"@qitqode/qlex-provider",limit:{context:200000,output:16384},capabilities:{temperature:!0,reasoning:!1,attachment:!0,toolcall:!0,input:{text:!0,audio:!1,image:!0,video:!1,pdf:!1},output:{text:!0,audio:!1,image:!1,video:!1,pdf:!1},interleaved:!1},release_date:"2025-07-06"};function F(q){return q.replace(/provider\s+'[^']*'\s*(?:stream\s+)?(?:failed|error)?\s*:?\s*/gi,"").replace(/\b(?:anthropic|openai|google|vertex\s*ai|bedrock|azure|x\.?ai|mistral|deepseek|cohere|groq|together(?:\.ai)?|openrouter|fireworks|perplexity|meta)\b/gi,"").replace(/\b(?:gpt|claude|gemini|grok|llama|qwen|sonnet|opus|haiku|o[0-9])[-\w.]*/gi,"").replace(/\s+/g," ").replace(/^[\s:;,.\-]+/,"").replace(/[\s.]+$/,"").trim()}var Fq={notLoggedIn:"Not logged in to QitQode. Run `qitqode auth login` to sign in with your Forgewise account.",rateLimit:"Rate limit exceeded. Please wait a moment before sending more requests.",insufficientBalance:(q)=>{let H=q?F(q):"";return`Insufficient qredits${H?`: ${H}`:""}. Add qredits at qitqode.com to continue.`},invalidCredentials:(q)=>{let H=q?F(q):"";return`Your QitQode sign-in has ended${H?` (${H})`:""}. Renewing it automatically didn't work, so signing in again is the only step left.`},accountNotLinked:(q)=>{let H=q?F(q):"";return`This credential isn't linked to a QitQode account${H?` (${H})`:""}, so there is no wallet to read. Sign in with your Forgewise account, or use a key issued to that account.`},gatewayUnavailable:(q)=>{let H=q?F(q):"";return`The QitQode model gateway is unavailable${H?` (${H})`:""}. Your sign-in is still valid \u2014 the model backend isn't reachable through its trusted gateway yet. This is a server-side configuration issue, not a login problem.`},streamFailed:(q)=>{let H=q?F(q):"";return`The QitQode model stream failed${H?`: ${H}`:""}.`},streamCutOff:()=>"The model's reply was cut off before it finished and QitQode could not recover it. This is a temporary upstream fault \u2014 your sign-in is fine and the service is reachable. Send the message again; if it keeps happening, try a shorter request or a different tier.",streamFailedAfterRetries:()=>"The model's reply was cut off before it finished. QitQode retried it, but the problem may be temporary or specific to this request. Send the message again; if it keeps happening, try a shorter request or a different tier.",outputBudgetExhausted:()=>"The model ran out of output room before it could finish. QitQode will retry once with more headroom when the tier allows it.",emptyOutput:()=>"The model used its output budget without producing visible text. QitQode did not receive an answer and no charge is implied.",requestRejected:(q,H)=>{let $=q?F(q):"",W=H?F(H):"";return`QitQode built an invalid request and the server rejected it${W?` (field: ${W})`:""}${$?`: ${$}`:""}. This is a problem with the request QitQode sent \u2014 not your sign-in, and not a gateway outage. Sending the same thing again will fail the same way.`},requestNotSent:(q)=>{let H=q?F(q):"";return`QitQode did not send this request${H?`: ${H}`:""}. Nothing was sent and no qredits were spent. This is a problem inside QitQode \u2014 not your sign-in, and not a gateway outage.`},requestTooLargeRecovering:(q)=>{let H=q?F(q):"";return`This request was too large to send${H?` (${H})`:""}, so QitQode removed some earlier conversation detail and is trying once more. Your sign-in is fine and the service is reachable.`},requestTooLargeIrreducible:(q)=>{let H=q?F(q):"";return`This request is too large for the service to accept${H?` (${H})`:""}, and QitQode couldn't make it smaller without losing your current request. Try removing large pasted text or attachments from your message, or start a new session. This isn't a sign-in problem or a service outage.`},requestTooLargeAfterReduction:(q)=>{let H=q?F(q):"";return`This request was still too large for the service after QitQode removed earlier conversation detail${H?` (${H})`:""}, so it stopped rather than retrying again. Start a new session, or send a shorter message with fewer attachments. This isn't a sign-in problem or a service outage.`},insufficientBalanceFallback:"Insufficient qredits.",insufficientBalanceCliSuffix:" Visit qitqode.com to add qredits.",invalidCredentialsFallback:"Your QitQode sign-in has ended and couldn't be renewed automatically. Sign in again.",apiKeyPrompt:"Paste your Qortex API key:",apiKeyPlaceholder:"qortex-...",loginMenuForgewise:"Sign in with Forgewise account",loginMenuApiKey:"Paste a Qortex API key",waitingForgewise:"\u23F3 Waiting for Forgewise sign-in in your browser\u2026"};function J(q){let H=process.env[q]?.toLowerCase();return H==="true"||H==="1"}function x(q){let H=process.env[q]?.toLowerCase();return H==="false"||H==="0"}function M(q){let H=process.env[q];if(!H)return;let $=Number(H);return Number.isInteger($)&&$>0?$:void 0}var K=J("QITQODE_EXPERIMENTAL"),C=J("QITQODE_DISABLE_CLAUDE_CODE"),O=J("QITQODE_DISABLE_EXTERNAL_SKILLS"),n=O||C||J("QITQODE_DISABLE_CLAUDE_CODE_SKILLS"),o=process.env.QITQODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT,L={OTEL_EXPORTER_OTLP_ENDPOINT:process.env.OTEL_EXPORTER_OTLP_ENDPOINT,OTEL_EXPORTER_OTLP_HEADERS:process.env.OTEL_EXPORTER_OTLP_HEADERS,QITQODE_AUTO_SHARE:J("QITQODE_AUTO_SHARE"),QITQODE_AUTO_HEAP_SNAPSHOT:J("QITQODE_AUTO_HEAP_SNAPSHOT"),QITQODE_GIT_BASH_PATH:process.env.QITQODE_GIT_BASH_PATH,QITQODE_CONFIG:process.env.QITQODE_CONFIG,QITQODE_CONFIG_CONTENT:process.env.QITQODE_CONFIG_CONTENT,get QITQODE_BACKEND_URL(){return process.env.QITQODE_BACKEND_URL??_},get QITQODE_QLEX_MAX_REQUEST_BYTES(){return M("QITQODE_QLEX_MAX_REQUEST_BYTES")},QITQODE_DISABLE_AUTOUPDATE:J("QITQODE_DISABLE_AUTOUPDATE"),QITQODE_DISABLE_LOG_ROTATION:J("QITQODE_DISABLE_LOG_ROTATION"),QITQODE_ALWAYS_NOTIFY_UPDATE:J("QITQODE_ALWAYS_NOTIFY_UPDATE"),QITQODE_DISABLE_PRUNE:J("QITQODE_DISABLE_PRUNE"),QITQODE_DISABLE_TERMINAL_TITLE:J("QITQODE_DISABLE_TERMINAL_TITLE"),QITQODE_SHOW_TTFD:J("QITQODE_SHOW_TTFD"),QITQODE_PERMISSION:process.env.QITQODE_PERMISSION,QITQODE_DISABLE_DEFAULT_PLUGINS:J("QITQODE_DISABLE_DEFAULT_PLUGINS"),QITQODE_DISABLE_LSP_DOWNLOAD:!0,QITQODE_ENABLE_EXPERIMENTAL_MODELS:J("QITQODE_ENABLE_EXPERIMENTAL_MODELS"),QITQODE_DISABLE_AUTOCOMPACT:J("QITQODE_DISABLE_AUTOCOMPACT"),QITQODE_DISABLE_MODELS_FETCH:J("QITQODE_DISABLE_MODELS_FETCH"),QITQODE_DISABLE_MOUSE:J("QITQODE_DISABLE_MOUSE"),QITQODE_OUTPUT_LENGTH_CONTINUATION_LIMIT:M("QITQODE_OUTPUT_LENGTH_CONTINUATION_LIMIT")??3,QITQODE_INVALID_OUTPUT_CONTINUATION_LIMIT:M("QITQODE_INVALID_OUTPUT_CONTINUATION_LIMIT")??2,QITQODE_TEXT_NGRAM_N:M("QITQODE_TEXT_NGRAM_N")??6,QITQODE_TEXT_REPEAT_THRESHOLD:M("QITQODE_TEXT_REPEAT_THRESHOLD")??3,QITQODE_TEXT_WINDOW_TOKENS:M("QITQODE_TEXT_WINDOW_TOKENS")??500,QITQODE_MAX_PROMPT_IMAGES:M("QITQODE_MAX_PROMPT_IMAGES")??4,QITQODE_MAX_PROMPT_IMAGE_SIZE:M("QITQODE_MAX_PROMPT_IMAGE_SIZE")??393216,QITQODE_DISABLE_PROVIDER_ENV:J("QITQODE_DISABLE_PROVIDER_ENV"),QITQODE_DISABLE_CLAUDE_CODE:C,get QITQODE_DISABLE_CLAUDE_CODE_MCP(){return C||J("QITQODE_DISABLE_CLAUDE_CODE_MCP")},QITQODE_DISABLE_CLAUDE_CODE_PROMPT:C||J("QITQODE_DISABLE_CLAUDE_CODE_PROMPT"),QITQODE_DISABLE_CLAUDE_CODE_COMMANDS:J("QITQODE_DISABLE_CLAUDE_CODE_COMMANDS"),QITQODE_DISABLE_CLAUDE_CODE_SKILLS:n,QITQODE_DISABLE_EXTERNAL_SKILLS:O,QITQODE_DISABLE_CODEX_SKILLS:O||J("QITQODE_DISABLE_CODEX_SKILLS"),QITQODE_DISABLE_OPENCODE_SKILLS:O||J("QITQODE_DISABLE_OPENCODE_SKILLS"),QITQODE_FAKE_VCS:process.env.QITQODE_FAKE_VCS,QITQODE_DISABLE_GIT:J("QITQODE_DISABLE_GIT"),get QITQODE_SERVER_PASSWORD(){return process.env.QITQODE_SERVER_PASSWORD},get QITQODE_SERVER_USERNAME(){return process.env.QITQODE_SERVER_USERNAME},QITQODE_ENABLE_QUESTION_TOOL:J("QITQODE_ENABLE_QUESTION_TOOL"),QITQODE_EXPERIMENTAL:K,QITQODE_EXPERIMENTAL_FILEWATCHER:B.boolean("QITQODE_EXPERIMENTAL_FILEWATCHER").pipe(B.withDefault(!1)),QITQODE_EXPERIMENTAL_DISABLE_FILEWATCHER:B.boolean("QITQODE_EXPERIMENTAL_DISABLE_FILEWATCHER").pipe(B.withDefault(!1)),QITQODE_EXPERIMENTAL_ICON_DISCOVERY:K||J("QITQODE_EXPERIMENTAL_ICON_DISCOVERY"),QITQODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT:o===void 0?process.platform==="win32":J("QITQODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT"),QITQODE_ENABLE_EXA:J("QITQODE_ENABLE_EXA")||K||J("QITQODE_EXPERIMENTAL_EXA"),QITQODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MS:M("QITQODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MS"),QITQODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX:M("QITQODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX"),QITQODE_EXPERIMENTAL_OXFMT:K||J("QITQODE_EXPERIMENTAL_OXFMT"),QITQODE_EXPERIMENTAL_LSP_TY:J("QITQODE_EXPERIMENTAL_LSP_TY"),QITQODE_EXPERIMENTAL_LSP_TOOL:K||J("QITQODE_EXPERIMENTAL_LSP_TOOL"),QITQODE_EXPERIMENTAL_WORKFLOW_TOOL:!x("QITQODE_EXPERIMENTAL_WORKFLOW_TOOL"),QITQODE_EXPERIMENTAL_MARKDOWN:!x("QITQODE_EXPERIMENTAL_MARKDOWN"),QITQODE_MODELS_URL:process.env.QITQODE_MODELS_URL,QITQODE_MODELS_PATH:process.env.QITQODE_MODELS_PATH,QITQODE_DB:process.env.QITQODE_DB,QITQODE_DISABLE_CHANNEL_DB:!x("QITQODE_DISABLE_CHANNEL_DB"),QITQODE_SKIP_MIGRATIONS:J("QITQODE_SKIP_MIGRATIONS"),QITQODE_STRICT_CONFIG_DEPS:J("QITQODE_STRICT_CONFIG_DEPS"),QITQODE_WORKSPACE_ID:process.env.QITQODE_WORKSPACE_ID,QITQODE_EXPERIMENTAL_HTTPAPI:J("QITQODE_EXPERIMENTAL_HTTPAPI"),QITQODE_EXPERIMENTAL_WORKSPACES:K||J("QITQODE_EXPERIMENTAL_WORKSPACES"),get QITQODE_DISABLE_COMPOSE_SKILLS(){return J("QITQODE_DISABLE_COMPOSE_SKILLS")},get QITQODE_DISABLE_BUILTIN_SKILLS(){return J("QITQODE_DISABLE_BUILTIN_SKILLS")},get QITQODE_DISABLE_PROJECT_CONFIG(){return J("QITQODE_DISABLE_PROJECT_CONFIG")},get QITQODE_TUI_CONFIG(){return process.env.QITQODE_TUI_CONFIG},get QITQODE_CONFIG_DIR(){return process.env.QITQODE_CONFIG_DIR},get QITQODE_HOME(){return process.env.QITQODE_HOME},get QITQODE_PURE(){return J("QITQODE_PURE")},get QITQODE_PLUGIN_META_FILE(){return process.env.QITQODE_PLUGIN_META_FILE},get QITQODE_CLIENT(){return process.env.QITQODE_CLIENT??"cli"}};var s=u.enum(["DEBUG","INFO","WARN","ERROR"]).meta({ref:"LogLevel",description:"Log level"}),f={DEBUG:0,INFO:1,WARN:2,ERROR:3},l=10,r=52428800,t=209715200,p="INFO";function X(q){return f[q]>=f[p]}function a(q){return X(q)}var c=new Map,e=h({service:"default"}),G="";function qq(){return G}var z,T=0,v=!0,w=(q)=>{return process.stderr.write(q),q.length};function k(){return new Date().toISOString().split(".")[0].replace(/:/g,"")}async function Hq(q){if(q.level)p=q.level;if(v=q.rotate??!L.QITQODE_DISABLE_LOG_ROTATION,g(Q.Path.log),q.print)return;if(G=U.join(Q.Path.log,q.dev?"dev.log":k()+".log"),q.dev){let H=await Z.stat(G).catch(()=>null);if(H&&H.size>0)await Z.rename(G,`${G}.${k()}`).catch(()=>{})}else await Z.truncate(G).catch(()=>{});z=m(G,{flags:"a"}),T=0,w=(H)=>{return S=S.then(async()=>{if(T+=Buffer.byteLength(H),v&&T>=r)T=Buffer.byteLength(H),await $q();await new Promise(($)=>{if(!z){$();return}z.write(H,()=>$())})}).catch(()=>{}),H.length}}var S=Promise.resolve();async function Jq(){await S}async function $q(){let q=z,H=`${G}.${k()}`;for(let $=2;await Z.stat(H).then(()=>!0,()=>!1);$++)H=`${G}.${k()}.${$}`;if(await Z.rename(G,H).catch(()=>{}),z=m(G,{flags:"a"}),q)q.end();g(Q.Path.log)}async function g(q){let H=await Z.readdir(q).catch(()=>[]),W=(await Promise.all(H.filter((Y)=>Y.includes(".log")&&U.join(q,Y)!==G).map(async(Y)=>{let N=await Z.stat(U.join(q,Y)).catch(()=>null);return N?.isFile()?{name:Y,size:N.size}:null}))).flatMap((Y)=>Y?[Y]:[]).sort((Y,N)=>Y.name<N.name?-1:Y.name>N.name?1:0),j=W.reduce((Y,N)=>Y+N.size,0),P=W.length,R=W.filter((Y)=>{if(P<=l&&j<=t)return!1;return j-=Y.size,P-=1,!0});await Promise.all(R.map((Y)=>Z.unlink(U.join(q,Y.name)).catch(()=>{})))}var Yq=/token|secret|password|passwd|credential|api[_-]?key|authorization|cookie|set-cookie/i;function D(q,H){if(Yq.test(q)&&H!==void 0&&H!==null)return"[REDACTED]";return H}var A=10240;function jq(q){try{let H=JSON.stringify(q,function($,W){return $?D($,W):W});if(typeof H==="string"&&H.length>A)return H.slice(0,A)+`\u2026[truncated ${H.length-A} chars]`;return H}catch{return"[unserializable]"}}function d(q,H=0){let $=q.message;return q.cause instanceof Error&&H<10?$+" Caused by: "+d(q.cause,H+1):$}var E=Date.now();function h(q){q=q||{};let H=q.service;if(H&&typeof H==="string"){let j=c.get(H);if(j)return j}function $(j,P){let R=Object.entries({...q,...P}).filter(([y,V])=>V!==void 0&&V!==null).map(([y,V])=>{let b=`${y}=`;if(V instanceof Error)return b+d(V);let I=D(y,V);if(I!==V)return b+I;if(typeof V==="object"&&V!==null)return b+jq(V);return b+V}).join(" "),Y=new Date,N=Y.getTime()-E;return E=Y.getTime(),[Y.toISOString().split(".")[0],"+"+N+"ms",R,j].filter(Boolean).join(" ")+`
3
+ `}let W={debug(j,P){if(X("DEBUG"))w("DEBUG "+$(j,P))},info(j,P){if(X("INFO"))w("INFO "+$(j,P))},error(j,P){if(X("ERROR"))w("ERROR "+$(j,P))},warn(j,P){if(X("WARN"))w("WARN "+$(j,P))},tag(j,P){if(q)q[j]=P;return W},clone(){return h({...q})},time(j,P){let R=Date.now();W.info(j,{status:"started",...P});function Y(){W.info(j,{status:"completed",duration:Date.now()-R,...P})}return{stop:Y,[Symbol.dispose](){Y()}}}};if(H&&typeof H==="string")c.set(H,W);return W}
4
+ export{Wq as vu,Gq as wu,_ as xu,Vq as yu,F as zu,Fq as Au,L as Bu,s as Cu,a as Du,e as Eu,qq as Fu,Hq as Gu,Jq as Hu,D as Iu,h as Ju,Pq as Ku};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Cd as d}from"./chunk-w8d9srv7.js";import{Pd as f}from"./chunk-9xvctnjr.js";import{Sf as e}from"./chunk-9s4whpg1.js";import{Xg as l}from"./chunk-sv1s1qxd.js";import"./chunk-n7d9eemn.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import{$j as m,rl as u}from"./chunk-rtdym35y.js";import"./chunk-5myxjxae.js";import"./chunk-sp8ek94w.js";import"./chunk-gnt982jr.js";import"./chunk-1bx2sjn6.js";import"./chunk-17pxm5d3.js";import"./chunk-n38h109k.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-xjhezxft.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-kb6v5hhm.js";import"./chunk-qyjt0qnq.js";import"./chunk-xdjwapwy.js";import"./chunk-cxtxvt43.js";import"./chunk-871f8x99.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-twhavv1m.js";import"./chunk-v0yxkq99.js";import"./chunk-2pzvcpv4.js";import"./chunk-kmtfdky8.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";var v=f({command:"usage [sessionID]",describe:"show per-turn token/cost breakdown for a session (debug/verification tool)",builder:(o)=>{return o.positional("sessionID",{describe:"session ID to inspect (default: most recently updated session)",type:"string"}).option("format",{describe:"output format",type:"string",choices:["table","json"],default:"table"}).option("limit",{describe:"number of most recent turns to show (default: all)",type:"number"})},handler:async(o)=>{await d(process.cwd(),async()=>{let a=o.sessionID?m.make(o.sessionID):[...u.list({roots:!1,limit:1})][0]?.id;if(!a)e.error("No sessions found"),process.exit(1);let p=(await l.runPromise(u.Service.use((s)=>s.messages({sessionID:a,agentID:"*"})))).filter((s)=>s.info.role==="assistant").map((s)=>{let t=s.info,c=s.parts.filter((n)=>n.type==="step-finish");return{messageID:t.id,provider:t.providerID,model:t.modelID,finish:t.finish,cost:t.cost??0,tokens:t.tokens??{input:0,output:0,reasoning:0,cache:{read:0,write:0}},steps:c.map((n)=>({cost:n.cost,tokens:n.tokens}))}}),r=o.limit?p.slice(-o.limit):p;if(r.length===0){e.println("No assistant turns found for this session");return}if(o.format==="json"){console.log(JSON.stringify({sessionID:a,turns:r},null,2));return}e.println(`Session ${a} \u2014 ${r.length} turn(s)`),e.println("");for(let s of r){let t=s.tokens,c=t.input+t.cache.read+t.cache.write,n=t.output+t.reasoning;if(e.println(`${s.messageID} ${s.provider}/${s.model} finish=${s.finish??"-"}`),e.println(` tokens input=${t.input} cache.read=${t.cache.read} cache.write=${t.cache.write} output=${t.output} reasoning=${t.reasoning} (in=${c} out=${n})`),e.println(` cost $${s.cost.toFixed(6)}`),s.steps.length>1)e.println(` steps ${s.steps.length}`),s.steps.forEach((i,g)=>{e.println(` [${g}] input=${i.tokens.input} output=${i.tokens.output} cache.read=${i.tokens.cache.read} cache.write=${i.tokens.cache.write} reasoning=${i.tokens.reasoning} cost=$${i.cost.toFixed(6)}`)});e.println("")}let h=r.reduce((s,t)=>s+t.cost,0);e.println(`Total cost for shown turns: $${h.toFixed(6)}`),e.println("(source: Session.getUsage(), same numbers persisted to the message record \u2014 see session.usage log tag)")})}});export{v as UsageCommand};
@@ -5,4 +5,4 @@ Lifetime used`):new P("Lifetime not alive")}},J=class extends Q{constructor(W,Y)
5
5
  Then, failed to dispose scope: ${Z.message}`,disposeError:Z}),Y;if(Y||Z)throw Y||Z}var z=class W extends q{constructor(){super(...arguments);this._disposables=new Q(new Set),this.manage=(Y)=>(this._disposables.value.add(Y),Y)}static withScope(Y){let Z=new W,$;try{return Y(Z)}catch(X){throw $=X,X}finally{E(Z,$)}}static withScopeMaybeAsync(Y,Z){return XW(void 0,function*($){let X=new W,j;try{return yield*$.of(Z.call(Y,$,X))}catch(G){throw j=G,G}finally{E(X,j)}})}static async withScopeAsync(Y){let Z=new W,$;try{return await Y(Z)}catch(X){throw $=X,X}finally{E(Z,$)}}get alive(){return this._disposables.alive}dispose(){let Y=Array.from(this._disposables.value.values()).reverse();for(let Z of Y)Z.alive&&Z.dispose();this._disposables.dispose()}};function jW(W){let Y=W?Array.from(W):[];function Z(){return Y.forEach((X)=>X.alive?X.dispose():void 0)}function $(){return Y.some((X)=>X.alive)}return Object.defineProperty(Y,S,{configurable:!0,enumerable:!1,value:Z}),Object.defineProperty(Y,"dispose",{configurable:!0,enumerable:!1,value:Z}),Object.defineProperty(Y,"alive",{configurable:!0,enumerable:!1,get:$}),Y}function F(W){return!!(W&&(typeof W=="object"||typeof W=="function")&&("alive"in W)&&typeof W.alive=="boolean"&&("dispose"in W)&&typeof W.dispose=="function")}var f=class W extends q{static success(Y){return new KW(Y)}static fail(Y,Z){return new GW(Y,Z)}static is(Y){return Y instanceof W}},KW=class extends f{constructor(W){super();this.value=W}get alive(){return F(this.value)?this.value.alive:!0}dispose(){F(this.value)&&this.value.dispose()}unwrap(){return this.value}unwrapOr(W){return this.value}},GW=class extends f{constructor(W,Y){super();this.error=W,this.onUnwrap=Y}get alive(){return F(this.error)?this.error.alive:!0}dispose(){F(this.error)&&this.error.dispose()}unwrap(){throw this.onUnwrap(this),this.error}unwrapOr(W){return W}},w=f,VW=class extends q{constructor(W){super();this.resolve=(Y)=>{this.resolveHandle.alive&&(this.context.unwrapResult(this.context.callFunction(this.resolveHandle,this.context.undefined,Y||this.context.undefined)).dispose(),this.disposeResolvers(),this.onSettled())},this.reject=(Y)=>{this.rejectHandle.alive&&(this.context.unwrapResult(this.context.callFunction(this.rejectHandle,this.context.undefined,Y||this.context.undefined)).dispose(),this.disposeResolvers(),this.onSettled())},this.dispose=()=>{this.handle.alive&&this.handle.dispose(),this.disposeResolvers()},this.context=W.context,this.owner=W.context.runtime,this.handle=W.promiseHandle,this.settled=new Promise((Y)=>{this.onSettled=Y}),this.resolveHandle=W.resolveHandle,this.rejectHandle=W.rejectHandle}get alive(){return this.handle.alive||this.resolveHandle.alive||this.rejectHandle.alive}disposeResolvers(){this.resolveHandle.alive&&this.resolveHandle.dispose(),this.rejectHandle.alive&&this.rejectHandle.dispose()}},t=class{constructor(W){this.module=W}toPointerArray(W){let Y=new Int32Array(W.map((X)=>X.value)),Z=Y.length*Y.BYTES_PER_ELEMENT,$=this.module._malloc(Z);return new Uint8Array(this.module.HEAPU8.buffer,$,Z).set(new Uint8Array(Y.buffer)),new Q($,void 0,(X)=>this.module._free(X))}newTypedArray(W,Y){let Z=new W(Array(Y).fill(0)),$=Z.length*Z.BYTES_PER_ELEMENT,X=this.module._malloc($),j=new W(this.module.HEAPU8.buffer,X,Y);return j.set(Z),new Q({typedArray:j,ptr:X},void 0,(G)=>this.module._free(G.ptr))}newMutablePointerArray(W){return this.newTypedArray(Int32Array,W)}newHeapCharPointer(W){let Y=this.module.lengthBytesUTF8(W),Z=Y+1,$=this.module._malloc(Z);return this.module.stringToUTF8(W,$,Z),new Q({ptr:$,strlen:Y},void 0,(X)=>this.module._free(X.ptr))}newHeapBufferPointer(W){let Y=W.byteLength,Z=this.module._malloc(Y);return this.module.HEAPU8.set(W,Z),new Q({pointer:Z,numBytes:Y},void 0,($)=>this.module._free($.pointer))}consumeHeapCharPointer(W){let Y=this.module.UTF8ToString(W);return this.module._free(W),Y}},FW=Symbol("Unstable"),OW=Object.freeze({BaseObjects:!0,Date:!0,Eval:!0,StringNormalize:!0,RegExp:!0,JSON:!0,Proxy:!0,MapSet:!0,TypedArrays:!0,Promise:!0});function TW(W){if(!W)return 0;let Y=0;for(let[Z,$]of Object.entries(W)){if(!(Z in O))throw new n(Z);$&&(Y|=O[Z])}return Y}function QW(W){if(typeof W=="number")return W;if(W===void 0)return 0;let{type:Y,strict:Z,strip:$,compileOnly:X,backtraceBarrier:j}=W,G=0;return Y==="global"&&(G|=L.JS_EVAL_TYPE_GLOBAL),Y==="module"&&(G|=L.JS_EVAL_TYPE_MODULE),Z&&(G|=L.JS_EVAL_FLAG_STRICT),$&&(G|=L.JS_EVAL_FLAG_STRIP),X&&(G|=L.JS_EVAL_FLAG_COMPILE_ONLY),j&&(G|=L.JS_EVAL_FLAG_BACKTRACE_BARRIER),G}function zW(W){if(typeof W=="number")return W;if(W===void 0)return 0;let{strings:Y,symbols:Z,quickjsPrivate:$,onlyEnumerable:X,numbers:j,numbersAsStrings:G}=W,K=0;return Y&&(K|=U.JS_GPN_STRING_MASK),Z&&(K|=U.JS_GPN_SYMBOL_MASK),$&&(K|=U.JS_GPN_PRIVATE_MASK),X&&(K|=U.JS_GPN_ENUM_ONLY),j&&(K|=U.QTS_GPN_NUMBER_MASK),G&&(K|=U.QTS_STANDARD_COMPLIANT_NUMBER),K}function qW(...W){let Y=[];for(let Z of W)Z!==void 0&&(Y=Y.concat(Z));return Y}var CW=class extends q{constructor(W,Y){super();this.handle=W,this.context=Y,this._isDone=!1,this.owner=Y.runtime}[Symbol.iterator](){return this}next(W){if(!this.alive||this._isDone)return{done:!0,value:void 0};let Y=this._next??(this._next=this.context.getProp(this.handle,"next"));return this.callIteratorMethod(Y,W)}return(W){if(!this.alive)return{done:!0,value:void 0};let Y=this.context.getProp(this.handle,"return");if(Y===this.context.undefined&&W===void 0)return this.dispose(),{done:!0,value:void 0};let Z=this.callIteratorMethod(Y,W);return Y.dispose(),this.dispose(),Z}throw(W){if(!this.alive)return{done:!0,value:void 0};let Y=W instanceof Q?W:this.context.newError(W),Z=this.context.getProp(this.handle,"throw"),$=this.callIteratorMethod(Z,W);return Y.alive&&Y.dispose(),Z.dispose(),this.dispose(),$}get alive(){return this.handle.alive}dispose(){this._isDone=!0,this.handle.dispose(),this._next?.dispose()}callIteratorMethod(W,Y){let Z=Y?this.context.callFunction(W,this.handle,Y):this.context.callFunction(W,this.handle);if(Z.error)return this.dispose(),{value:Z};let $=this.context.getProp(Z.value,"done").consume((j)=>this.context.dump(j)),X=this.context.getProp(Z.value,"value");return Z.value.dispose(),$&&this.dispose(),{value:w.success(X),done:$}}},g=-2147483648,m=2147483647,A=0;function H(W){return W>>8}var BW=class{constructor(){this.nextId=g,this.freelist=[],this.groups=new Map}put(W){let Y=this.allocateId(),Z=H(Y),$=this.groups.get(Z);return $||($=new Map,this.groups.set(Z,$)),$.set(Y,W),Y}get(W){if(W===A)throw new C("no host reference id defined");let Y=H(W),Z=this.groups.get(Y);if(!Z)throw new C(`host reference id ${W} is not defined`);let $=Z.get(W);if(!$)throw new C(`host reference id ${W} is not defined`);return $}delete(W){if(W===A)throw new C("no host reference id defined");let Y=H(W),Z=this.groups.get(Y);if(!Z)throw new C(`host reference id ${W} is not defined`);Z.delete(W),Z.size===0&&this.groups.delete(Y),this.freelist.push(W)}allocateId(){if(this.freelist.length>0)return this.freelist.shift();if(this.nextId===A&&this.nextId++,this.nextId>m)throw new s(`HostRefMap: too many host refs created without disposing. Max simultaneous host refs: ${m-g}`);return this.nextId++}},c=class extends q{constructor(W,Y,Z){if(Z===A)throw new C("cannot create HostRef with undefined id");super();this.runtime=W,this.handle=Y,this.id=Z}get alive(){return this.handle.alive}dispose(){this.handle.dispose()}get value(){return this.runtime.hostRefs.get(this.id)}},LW=class extends t{constructor(W){super(W.module);this.scope=new z,this.copyJSValue=(Y)=>this.ffi.QTS_DupValuePointer(this.ctx.value,Y),this.freeJSValue=(Y)=>{this.ffi.QTS_FreeValuePointer(this.ctx.value,Y)},W.ownedLifetimes?.forEach((Y)=>this.scope.manage(Y)),this.owner=W.owner,this.module=W.module,this.ffi=W.ffi,this.rt=W.rt,this.ctx=this.scope.manage(W.ctx)}get alive(){return this.scope.alive}dispose(){return this.scope.dispose()}[Symbol.dispose](){return this.dispose()}manage(W){return this.scope.manage(W)}consumeJSCharPointer(W){let Y=this.module.UTF8ToString(W);return this.ffi.QTS_FreeCString(this.ctx.value,W),Y}heapValueHandle(W,Y){let Z=Y?($)=>{Y(),this.freeJSValue($)}:this.freeJSValue;return new Q(W,this.copyJSValue,Z,this.owner)}staticHeapValueHandle(W){return this.manage(this.heapValueHandle(W)),new J(W,this.owner)}},UW=class extends q{constructor(W){super();this._undefined=void 0,this._null=void 0,this._false=void 0,this._true=void 0,this._global=void 0,this._BigInt=void 0,this._Symbol=void 0,this._SymbolIterator=void 0,this._SymbolAsyncIterator=void 0,this.cToHostCallbacks={callFunction:(Y,Z,$,X,j)=>{if(Y!==this.ctx.value)throw Error("QuickJSContext instance received C -> JS call with mismatched ctx");let G=this.getFunction(j);return z.withScopeMaybeAsync(this,function*(K,V){let B=V.manage(new h(Z,this.memory.copyJSValue,this.memory.freeJSValue,this.runtime)),D=Array($);for(let T=0;T<$;T++){let M=this.ffi.QTS_ArgvGetJSValueConstPointer(X,T);D[T]=V.manage(new h(M,this.memory.copyJSValue,this.memory.freeJSValue,this.runtime))}try{let T=yield*K(G.apply(B,D));if(T){if("error"in T&&T.error)throw this.runtime.debugLog("throw error",T.error),T.error;let M=V.manage(T instanceof Q?T:T.value);return this.ffi.QTS_DupValuePointer(this.ctx.value,M.value)}return 0}catch(T){return this.errorToHandle(T).consume((M)=>this.ffi.QTS_Throw(this.ctx.value,M.value))}})}},this.runtime=W.runtime,this.module=W.module,this.ffi=W.ffi,this.rt=W.rt,this.ctx=W.ctx,this.memory=new LW({...W,owner:this.runtime}),W.callbacks.setContextCallbacks(this.ctx.value,this.cToHostCallbacks),this.dump=this.dump.bind(this),this.getString=this.getString.bind(this),this.getNumber=this.getNumber.bind(this),this.resolvePromise=this.resolvePromise.bind(this),this.uint32Out=this.memory.manage(this.memory.newTypedArray(Uint32Array,1))}get alive(){return this.memory.alive}dispose(){this.memory.dispose()}get undefined(){if(this._undefined)return this._undefined;let W=this.ffi.QTS_GetUndefined();return this._undefined=new J(W)}get null(){if(this._null)return this._null;let W=this.ffi.QTS_GetNull();return this._null=new J(W)}get true(){if(this._true)return this._true;let W=this.ffi.QTS_GetTrue();return this._true=new J(W)}get false(){if(this._false)return this._false;let W=this.ffi.QTS_GetFalse();return this._false=new J(W)}get global(){if(this._global)return this._global;let W=this.ffi.QTS_GetGlobalObject(this.ctx.value);return this._global=this.memory.staticHeapValueHandle(W),this._global}newNumber(W){return this.memory.heapValueHandle(this.ffi.QTS_NewFloat64(this.ctx.value,W))}newString(W){let Y=this.memory.newHeapCharPointer(W).consume((Z)=>this.ffi.QTS_NewString(this.ctx.value,Z.value.ptr));return this.memory.heapValueHandle(Y)}newUniqueSymbol(W){let Y=(typeof W=="symbol"?W.description:W)??"",Z=this.memory.newHeapCharPointer(Y).consume(($)=>this.ffi.QTS_NewSymbol(this.ctx.value,$.value.ptr,0));return this.memory.heapValueHandle(Z)}newSymbolFor(W){let Y=(typeof W=="symbol"?W.description:W)??"",Z=this.memory.newHeapCharPointer(Y).consume(($)=>this.ffi.QTS_NewSymbol(this.ctx.value,$.value.ptr,1));return this.memory.heapValueHandle(Z)}getWellKnownSymbol(W){return this._Symbol??(this._Symbol=this.memory.manage(this.getProp(this.global,"Symbol"))),this.getProp(this._Symbol,W)}newBigInt(W){if(!this._BigInt){let $=this.getProp(this.global,"BigInt");this.memory.manage($),this._BigInt=new J($.value,this.runtime)}let Y=this._BigInt,Z=String(W);return this.newString(Z).consume(($)=>this.unwrapResult(this.callFunction(Y,this.undefined,$)))}newObject(W){W&&this.runtime.assertOwned(W);let Y=W?this.ffi.QTS_NewObjectProto(this.ctx.value,W.value):this.ffi.QTS_NewObject(this.ctx.value);return this.memory.heapValueHandle(Y)}newArray(){let W=this.ffi.QTS_NewArray(this.ctx.value);return this.memory.heapValueHandle(W)}newArrayBuffer(W){let Y=new Uint8Array(W),Z=this.memory.newHeapBufferPointer(Y),$=this.ffi.QTS_NewArrayBuffer(this.ctx.value,Z.value.pointer,Y.length);return this.memory.heapValueHandle($)}newPromise(W){let Y=z.withScope((Z)=>{let $=Z.manage(this.memory.newMutablePointerArray(2)),X=this.ffi.QTS_NewPromiseCapability(this.ctx.value,$.value.ptr),j=this.memory.heapValueHandle(X),[G,K]=Array.from($.value.typedArray).map((V)=>this.memory.heapValueHandle(V));return new VW({context:this,promiseHandle:j,resolveHandle:G,rejectHandle:K})});return W&&typeof W=="function"&&(W=new Promise(W)),W&&Promise.resolve(W).then(Y.resolve,(Z)=>Z instanceof Q?Y.reject(Z):this.newError(Z).consume(Y.reject)),Y}newFunction(W,Y){let Z=typeof W=="function"?W:Y;if(!Z)throw TypeError("Expected a function");return this.newFunctionWithOptions({name:typeof W=="string"?W:void 0,length:Z.length,isConstructor:!1,fn:Z})}newConstructorFunction(W,Y){let Z=typeof W=="function"?W:Y;if(!Z)throw TypeError("Expected a function");return this.newFunctionWithOptions({name:typeof W=="string"?W:void 0,length:Z.length,isConstructor:!0,fn:Z})}newFunctionWithOptions(W){let{name:Y,length:Z,isConstructor:$,fn:X}=W,j=this.runtime.hostRefs.put(X);try{return this.memory.heapValueHandle(this.ffi.QTS_NewFunction(this.ctx.value,Y??"",Z,$,j))}catch(G){throw this.runtime.hostRefs.delete(j),G}}newError(W){let Y=this.memory.heapValueHandle(this.ffi.QTS_NewError(this.ctx.value));return W&&typeof W=="object"?(W.name!==void 0&&this.newString(W.name).consume((Z)=>this.setProp(Y,"name",Z)),W.message!==void 0&&this.newString(W.message).consume((Z)=>this.setProp(Y,"message",Z))):typeof W=="string"?this.newString(W).consume((Z)=>this.setProp(Y,"message",Z)):W!==void 0&&this.newString(String(W)).consume((Z)=>this.setProp(Y,"message",Z)),Y}newHostRef(W){let Y=this.runtime.hostRefs.put(W);try{let Z=this.memory.heapValueHandle(this.ffi.QTS_NewHostRef(this.ctx.value,Y));return new c(this.runtime,Z,Y)}catch(Z){throw this.runtime.hostRefs.delete(Y),Z}}toHostRef(W){let Y=this.ffi.QTS_GetHostRefId(W.value);if(Y!==0)return this.runtime.hostRefs.get(Y),new c(this.runtime,W.dup(),Y)}unwrapHostRef(W){let Y=this.ffi.QTS_GetHostRefId(W.value);if(Y===0)throw new C("handle is not a HostRef");return this.runtime.hostRefs.get(Y)}typeof(W){return this.runtime.assertOwned(W),this.memory.consumeHeapCharPointer(this.ffi.QTS_Typeof(this.ctx.value,W.value))}getNumber(W){return this.runtime.assertOwned(W),this.ffi.QTS_GetFloat64(this.ctx.value,W.value)}getString(W){return this.runtime.assertOwned(W),this.memory.consumeJSCharPointer(this.ffi.QTS_GetString(this.ctx.value,W.value))}getSymbol(W){this.runtime.assertOwned(W);let Y=this.memory.consumeJSCharPointer(this.ffi.QTS_GetSymbolDescriptionOrKey(this.ctx.value,W.value));return this.ffi.QTS_IsGlobalSymbol(this.ctx.value,W.value)?Symbol.for(Y):Symbol(Y)}getBigInt(W){this.runtime.assertOwned(W);let Y=this.getString(W);return BigInt(Y)}getArrayBuffer(W){this.runtime.assertOwned(W);let Y=this.ffi.QTS_GetArrayBufferLength(this.ctx.value,W.value),Z=this.ffi.QTS_GetArrayBuffer(this.ctx.value,W.value);if(!Z)throw Error("Couldn't allocate memory to get ArrayBuffer");return new Q(this.module.HEAPU8.subarray(Z,Z+Y),void 0,()=>this.module._free(Z))}getPromiseState(W){this.runtime.assertOwned(W);let Y=this.ffi.QTS_PromiseState(this.ctx.value,W.value);if(Y<0)return{type:"fulfilled",value:W,notAPromise:!0};if(Y===I.Pending)return{type:"pending",get error(){return new l("Cannot unwrap a pending promise")}};let Z=this.ffi.QTS_PromiseResult(this.ctx.value,W.value),$=this.memory.heapValueHandle(Z);if(Y===I.Fulfilled)return{type:"fulfilled",value:$};if(Y===I.Rejected)return{type:"rejected",error:$};throw $.dispose(),Error(`Unknown JSPromiseStateEnum: ${Y}`)}resolvePromise(W){this.runtime.assertOwned(W);let Y=z.withScope((Z)=>{let $=Z.manage(this.getProp(this.global,"Promise")),X=Z.manage(this.getProp($,"resolve"));return this.callFunction(X,$,W)});return Y.error?Promise.resolve(Y):new Promise((Z)=>{z.withScope(($)=>{let X=$.manage(this.newFunction("resolve",(V)=>{Z(this.success(V&&V.dup()))})),j=$.manage(this.newFunction("reject",(V)=>{Z(this.fail(V&&V.dup()))})),G=$.manage(Y.value),K=$.manage(this.getProp(G,"then"));this.callFunction(K,G,X,j).unwrap().dispose()})})}isEqual(W,Y,Z=R.IsStrictlyEqual){if(W===Y)return!0;this.runtime.assertOwned(W),this.runtime.assertOwned(Y);let $=this.ffi.QTS_IsEqual(this.ctx.value,W.value,Y.value,Z);if($===-1)throw new p("WASM variant does not expose equality");return!!$}eq(W,Y){return this.isEqual(W,Y,R.IsStrictlyEqual)}sameValue(W,Y){return this.isEqual(W,Y,R.IsSameValue)}sameValueZero(W,Y){return this.isEqual(W,Y,R.IsSameValueZero)}getProp(W,Y){this.runtime.assertOwned(W);let Z;return typeof Y=="number"&&Y>=0?Z=this.ffi.QTS_GetPropNumber(this.ctx.value,W.value,Y):Z=this.borrowPropertyKey(Y).consume(($)=>this.ffi.QTS_GetProp(this.ctx.value,W.value,$.value)),this.memory.heapValueHandle(Z)}getLength(W){if(this.runtime.assertOwned(W),!(this.ffi.QTS_GetLength(this.ctx.value,this.uint32Out.value.ptr,W.value)<0))return this.uint32Out.value.typedArray[0]}getOwnPropertyNames(W,Y={strings:!0,numbersAsStrings:!0}){this.runtime.assertOwned(W),W.value;let Z=zW(Y);if(Z===0)throw new o("No options set, will return an empty array");return z.withScope(($)=>{let X=$.manage(this.memory.newMutablePointerArray(1)),j=this.ffi.QTS_GetOwnPropertyNames(this.ctx.value,X.value.ptr,this.uint32Out.value.ptr,W.value,Z);if(j)return this.fail(this.memory.heapValueHandle(j));let G=this.uint32Out.value.typedArray[0],K=X.value.typedArray[0],V=new Uint32Array(this.module.HEAP8.buffer,K,G),B=Array.from(V).map((D)=>this.memory.heapValueHandle(D));return this.ffi.QTS_FreeVoidPointer(this.ctx.value,K),this.success(jW(B))})}getIterator(W){let Y=this._SymbolIterator??(this._SymbolIterator=this.memory.manage(this.getWellKnownSymbol("iterator")));return z.withScope((Z)=>{let $=Z.manage(this.getProp(W,Y)),X=this.callFunction($,W);return X.error?X:this.success(new CW(X.value,this))})}setProp(W,Y,Z){this.runtime.assertOwned(W),this.borrowPropertyKey(Y).consume(($)=>this.ffi.QTS_SetProp(this.ctx.value,W.value,$.value,Z.value))}defineProp(W,Y,Z){this.runtime.assertOwned(W),z.withScope(($)=>{let X=$.manage(this.borrowPropertyKey(Y)),j=Z.value||this.undefined,G=!!Z.configurable,K=!!Z.enumerable,V=!!Z.value,B=Z.get?$.manage(this.newFunction(Z.get.name,Z.get)):this.undefined,D=Z.set?$.manage(this.newFunction(Z.set.name,Z.set)):this.undefined;this.ffi.QTS_DefineProp(this.ctx.value,W.value,X.value,j.value,B.value,D.value,G,K,V)})}callFunction(W,Y,...Z){this.runtime.assertOwned(W);let $,X=Z[0];X===void 0||Array.isArray(X)?$=X??[]:$=Z;let j=this.memory.toPointerArray($).consume((K)=>this.ffi.QTS_Call(this.ctx.value,W.value,Y.value,$.length,K.value)),G=this.ffi.QTS_ResolveException(this.ctx.value,j);return G?(this.ffi.QTS_FreeValuePointer(this.ctx.value,j),this.fail(this.memory.heapValueHandle(G))):this.success(this.memory.heapValueHandle(j))}callMethod(W,Y,Z=[]){return this.getProp(W,Y).consume(($)=>this.callFunction($,W,Z))}evalCode(W,Y="eval.js",Z){let $=Z===void 0?1:0,X=QW(Z),j=this.memory.newHeapCharPointer(W).consume((K)=>this.ffi.QTS_Eval(this.ctx.value,K.value.ptr,K.value.strlen,Y,$,X)),G=this.ffi.QTS_ResolveException(this.ctx.value,j);return G?(this.ffi.QTS_FreeValuePointer(this.ctx.value,j),this.fail(this.memory.heapValueHandle(G))):this.success(this.memory.heapValueHandle(j))}throw(W){return this.errorToHandle(W).consume((Y)=>this.ffi.QTS_Throw(this.ctx.value,Y.value))}borrowPropertyKey(W){return typeof W=="number"?this.newNumber(W):typeof W=="string"?this.newString(W):new J(W.value,this.runtime)}getMemory(W){if(W===this.rt.value)return this.memory;throw Error("Private API. Cannot get memory from a different runtime")}dump(W){this.runtime.assertOwned(W);let Y=this.typeof(W);if(Y==="string")return this.getString(W);if(Y==="number")return this.getNumber(W);if(Y==="bigint")return this.getBigInt(W);if(Y==="undefined")return;if(Y==="symbol")return this.getSymbol(W);let Z=this.getPromiseState(W);if(Z.type==="fulfilled"&&!Z.notAPromise)return W.dispose(),{type:Z.type,value:Z.value.consume(this.dump)};if(Z.type==="pending")return W.dispose(),{type:Z.type};if(Z.type==="rejected")return W.dispose(),{type:Z.type,error:Z.error.consume(this.dump)};let $=this.memory.consumeJSCharPointer(this.ffi.QTS_Dump(this.ctx.value,W.value));try{return JSON.parse($)}catch{return $}}unwrapResult(W){if(W.error){let Y="context"in W.error?W.error.context:this,Z=W.error.consume(($)=>this.dump($));if(Z&&typeof Z=="object"&&typeof Z.message=="string"){let{message:$,name:X,stack:j,...G}=Z,K=new _(Z,Y);typeof X=="string"&&(K.name=Z.name),K.message=$;let V=K.stack;throw typeof j=="string"&&(K.stack=`${X}: ${$}
6
6
  ${Z.stack}Host: ${V}`),Object.assign(K,G),K}throw new _(Z)}return W.value}[Symbol.for("nodejs.util.inspect.custom")](){return this.alive?`${this.constructor.name} { ctx: ${this.ctx.value} rt: ${this.rt.value} }`:`${this.constructor.name} { disposed }`}getFunction(W){let Y=this.runtime.hostRefs.get(W);if(typeof Y!="function")throw Error(`Host reference ${W} is not a function`);return Y}errorToHandle(W){return W instanceof Q?W:this.newError(W)}encodeBinaryJSON(W){let Y=this.ffi.QTS_bjson_encode(this.ctx.value,W.value);return this.memory.heapValueHandle(Y)}decodeBinaryJSON(W){let Y=this.ffi.QTS_bjson_decode(this.ctx.value,W.value);return this.memory.heapValueHandle(Y)}success(W){return w.success(W)}fail(W){return w.fail(W,(Y)=>this.unwrapResult(Y))}},JW=class extends q{constructor(W){super();this.scope=new z,this.contextMap=new Map,this.hostRefs=new BW,this._debugMode=!1,this.cToHostCallbacks={freeHostRef:(Y,Z)=>{if(Y!==this.rt.value)throw Error("Runtime pointer mismatch");this.hostRefs.delete(Z)},shouldInterrupt:(Y)=>{if(Y!==this.rt.value)throw Error("QuickJSContext instance received C -> JS interrupt with mismatched rt");let Z=this.interruptHandler;if(!Z)throw Error("QuickJSContext had no interrupt handler");return Z(this)?1:0},loadModuleSource:v(this,function*(Y,Z,$,X){let j=this.moduleLoader;if(!j)throw Error("Runtime has no module loader");if(Z!==this.rt.value)throw Error("Runtime pointer mismatch");let G=this.contextMap.get($)??this.newContext({contextPointer:$});try{let K=yield*Y(j(X,G));if(typeof K=="object"&&"error"in K&&K.error)throw this.debugLog("cToHostLoadModule: loader returned error",K.error),K.error;let V=typeof K=="string"?K:("value"in K)?K.value:K;return this.memory.newHeapCharPointer(V).value.ptr}catch(K){return this.debugLog("cToHostLoadModule: caught error",K),G.throw(K),0}}),normalizeModule:v(this,function*(Y,Z,$,X,j){let G=this.moduleNormalizer;if(!G)throw Error("Runtime has no module normalizer");if(Z!==this.rt.value)throw Error("Runtime pointer mismatch");let K=this.contextMap.get($)??this.newContext({contextPointer:$});try{let V=yield*Y(G(X,j,K));if(typeof V=="object"&&"error"in V&&V.error)throw this.debugLog("cToHostNormalizeModule: normalizer returned error",V.error),V.error;let B=typeof V=="string"?V:V.value;return K.getMemory(this.rt.value).newHeapCharPointer(B).value.ptr}catch(V){return this.debugLog("normalizeModule: caught error",V),K.throw(V),0}})},W.ownedLifetimes?.forEach((Y)=>this.scope.manage(Y)),this.module=W.module,this.memory=new t(this.module),this.ffi=W.ffi,this.rt=W.rt,this.callbacks=W.callbacks,this.scope.manage(this.rt),this.callbacks.setRuntimeCallbacks(this.rt.value,this.cToHostCallbacks),this.executePendingJobs=this.executePendingJobs.bind(this),x&&this.setDebugMode(!0)}get alive(){return this.scope.alive}dispose(){return this.scope.dispose()}newContext(W={}){let Y=TW(W.intrinsics),Z=new Q(W.contextPointer||this.ffi.QTS_NewContext(this.rt.value,Y),void 0,(X)=>{this.contextMap.delete(X),this.callbacks.deleteContext(X),this.ffi.QTS_FreeContext(X)}),$=new UW({module:this.module,ctx:Z,ffi:this.ffi,rt:this.rt,ownedLifetimes:W.ownedLifetimes,runtime:this,callbacks:this.callbacks});return this.contextMap.set(Z.value,$),$}setModuleLoader(W,Y){this.moduleLoader=W,this.moduleNormalizer=Y,this.ffi.QTS_RuntimeEnableModuleLoader(this.rt.value,this.moduleNormalizer?1:0)}removeModuleLoader(){this.moduleLoader=void 0,this.ffi.QTS_RuntimeDisableModuleLoader(this.rt.value)}hasPendingJob(){return!!this.ffi.QTS_IsJobPending(this.rt.value)}setInterruptHandler(W){let Y=this.interruptHandler;this.interruptHandler=W,Y||this.ffi.QTS_RuntimeEnableInterruptHandler(this.rt.value)}removeInterruptHandler(){this.interruptHandler&&(this.ffi.QTS_RuntimeDisableInterruptHandler(this.rt.value),this.interruptHandler=void 0)}executePendingJobs(W=-1){let Y=this.memory.newMutablePointerArray(1),Z=this.ffi.QTS_ExecutePendingJob(this.rt.value,W??-1,Y.value.ptr),$=Y.value.typedArray[0];if(Y.dispose(),$===0)return this.ffi.QTS_FreeValuePointerRuntime(this.rt.value,Z),w.success(0);let X=this.contextMap.get($)??this.newContext({contextPointer:$}),j=X.getMemory(this.rt.value).heapValueHandle(Z);if(X.typeof(j)==="number"){let G=X.getNumber(j);return j.dispose(),w.success(G)}else{let G=Object.assign(j,{context:X});return w.fail(G,(K)=>X.unwrapResult(K))}}setMemoryLimit(W){if(W<0&&W!==-1)throw Error("Cannot set memory limit to negative number. To unset, pass -1");this.ffi.QTS_RuntimeSetMemoryLimit(this.rt.value,W)}computeMemoryUsage(){let W=this.getSystemContext().getMemory(this.rt.value);return W.heapValueHandle(this.ffi.QTS_RuntimeComputeMemoryUsage(this.rt.value,W.ctx.value))}dumpMemoryUsage(){return this.memory.consumeHeapCharPointer(this.ffi.QTS_RuntimeDumpMemoryUsage(this.rt.value))}setMaxStackSize(W){if(W<0)throw Error("Cannot set memory limit to negative number. To unset, pass 0.");this.ffi.QTS_RuntimeSetMaxStackSize(this.rt.value,W)}assertOwned(W){if(W.owner&&W.owner.rt!==this.rt)throw new u(`Handle is not owned by this runtime: ${W.owner.rt.value} != ${this.rt.value}`)}setDebugMode(W){this._debugMode=W,this.ffi.DEBUG&&this.rt.alive&&this.ffi.QTS_SetDebugLogEnabled(this.rt.value,W?1:0)}isDebugMode(){return this._debugMode}debugLog(...W){this._debugMode&&console.log("quickjs-emscripten:",...W)}[Symbol.for("nodejs.util.inspect.custom")](){return this.alive?`${this.constructor.name} { rt: ${this.rt.value} }`:`${this.constructor.name} { disposed }`}getSystemContext(){return this.context||(this.context=this.scope.manage(this.newContext())),this.context}},DW=class{constructor(W){this.freeHostRef=W.freeHostRef,this.callFunction=W.callFunction,this.shouldInterrupt=W.shouldInterrupt,this.loadModuleSource=W.loadModuleSource,this.normalizeModule=W.normalizeModule}},wW=class{constructor(W){this.contextCallbacks=new Map,this.runtimeCallbacks=new Map,this.suspendedCount=0,this.cToHostCallbacks=new DW({freeHostRef:(Y,Z,$)=>{let X=this.runtimeCallbacks.get(Z);if(!X)throw Error(`QuickJSRuntime(rt = ${Z}) not found when trying to free HostRef(id = ${$})`);X.freeHostRef(Z,$)},callFunction:(Y,Z,$,X,j,G)=>this.handleAsyncify(Y,()=>{try{let K=this.contextCallbacks.get(Z);if(!K)throw Error(`QuickJSContext(ctx = ${Z}) not found for C function call "${G}"`);return K.callFunction(Z,$,X,j,G)}catch(K){return console.error("[C to host error: returning null]",K),0}}),shouldInterrupt:(Y,Z)=>this.handleAsyncify(Y,()=>{try{let $=this.runtimeCallbacks.get(Z);if(!$)throw Error(`QuickJSRuntime(rt = ${Z}) not found for C interrupt`);return $.shouldInterrupt(Z)}catch($){return console.error("[C to host interrupt: returning error]",$),1}}),loadModuleSource:(Y,Z,$,X)=>this.handleAsyncify(Y,()=>{try{let j=this.runtimeCallbacks.get(Z);if(!j)throw Error(`QuickJSRuntime(rt = ${Z}) not found for C module loader`);let G=j.loadModuleSource;if(!G)throw Error(`QuickJSRuntime(rt = ${Z}) does not support module loading`);return G(Z,$,X)}catch(j){return console.error("[C to host module loader error: returning null]",j),0}}),normalizeModule:(Y,Z,$,X,j)=>this.handleAsyncify(Y,()=>{try{let G=this.runtimeCallbacks.get(Z);if(!G)throw Error(`QuickJSRuntime(rt = ${Z}) not found for C module loader`);let K=G.normalizeModule;if(!K)throw Error(`QuickJSRuntime(rt = ${Z}) does not support module loading`);return K(Z,$,X,j)}catch(G){return console.error("[C to host module loader error: returning null]",G),0}})}),this.module=W,this.module.callbacks=this.cToHostCallbacks}setRuntimeCallbacks(W,Y){this.runtimeCallbacks.set(W,Y)}deleteRuntime(W){this.runtimeCallbacks.delete(W)}setContextCallbacks(W,Y){this.contextCallbacks.set(W,Y)}deleteContext(W){this.contextCallbacks.delete(W)}handleAsyncify(W,Y){if(W)return W.handleSleep(($)=>{try{let X=Y();if(!(X instanceof Promise)){N("asyncify.handleSleep: not suspending:",X),$(X);return}if(this.suspended)throw new d(`Already suspended at: ${this.suspended.stack}
7
7
  Attempted to suspend at:`);this.suspended=new i(`(${this.suspendedCount++})`),N("asyncify.handleSleep: suspending:",this.suspended),X.then((j)=>{this.suspended=void 0,N("asyncify.handleSleep: resolved:",j),$(j)},(j)=>{N("asyncify.handleSleep: rejected:",j),console.error("QuickJS: cannot handle error in suspended function",j),this.suspended=void 0})}catch(X){throw N("asyncify.handleSleep: error:",X),this.suspended=void 0,X}});let Z=Y();if(Z instanceof Promise)throw Error("Promise return value not supported in non-asyncify context.");return Z}};function MW(W,Y){Y.interruptHandler&&W.setInterruptHandler(Y.interruptHandler),Y.maxStackSizeBytes!==void 0&&W.setMaxStackSize(Y.maxStackSizeBytes),Y.memoryLimitBytes!==void 0&&W.setMemoryLimit(Y.memoryLimitBytes)}function RW(W,Y){Y.moduleLoader&&W.setModuleLoader(Y.moduleLoader),Y.shouldInterrupt&&W.setInterruptHandler(Y.shouldInterrupt),Y.memoryLimitBytes!==void 0&&W.setMemoryLimit(Y.memoryLimitBytes),Y.maxStackSizeBytes!==void 0&&W.setMaxStackSize(Y.maxStackSizeBytes)}var EW=class{constructor(W,Y){this.module=W,this.ffi=Y,this.callbacks=new wW(W)}newRuntime(W={}){let Y=new Q(this.ffi.QTS_NewRuntime(),void 0,($)=>{this.ffi.QTS_FreeRuntime($),this.callbacks.deleteRuntime($)}),Z=new JW({module:this.module,callbacks:this.callbacks,ffi:this.ffi,rt:Y});return MW(Z,W),W.moduleLoader&&Z.setModuleLoader(W.moduleLoader),Z}newContext(W={}){let Y=this.newRuntime(),Z=Y.newContext({...W,ownedLifetimes:qW(Y,W.ownedLifetimes)});return Y.context=Z,Z}evalCode(W,Y={}){return z.withScope((Z)=>{let $=Z.manage(this.newContext());RW($.runtime,Y);let X=$.evalCode(W,"eval.js");if(Y.memoryLimitBytes!==void 0&&$.runtime.setMemoryLimit(-1),X.error)throw $.dump(Z.manage(X.error));return $.dump(Z.manage(X.value))})}getWasmMemory(){let W=this.module.quickjsEmscriptenInit?.(()=>{})?.getWasmMemory?.();if(!W)throw Error("Variant does not support getting WebAssembly.Memory");return W}getFFI(){return this.ffi}};
8
- export{p as ci,Q as di,z as ei,TW as fi,QW as gi,UW as hi,JW as ii,wW as ji,MW as ki,RW as li,EW as mi};
8
+ export{p as Th,Q as Uh,z as Vh,TW as Wh,QW as Xh,UW as Yh,JW as Zh,wW as _h,MW as $h,RW as ai,EW as bi};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-3k2b05fv.js";var{create:mr,defineProperty:it,getOwnPropertyDescriptor:fr,getOwnPropertyNames:yr,getPrototypeOf:xr}=Object,Pr=Object.prototype.hasOwnProperty,Ar=(l,u)=>()=>(u||l((u={exports:{}}).exports,u),u.exports),rt=(l,u)=>{for(var m in u)it(l,m,{get:u[m],enumerable:!0})},gr=(l,u,m,f)=>{if(u&&typeof u=="object"||typeof u=="function")for(let x of yr(u))!Pr.call(l,x)&&x!==m&&it(l,x,{get:()=>u[x],enumerable:!(f=fr(u,x))||f.enumerable});return l},Gt=(l,u,m)=>(m=l!=null?mr(xr(l)):{},gr(u||!l||!l.__esModule?it(m,"default",{value:l,enumerable:!0}):m,l)),Yt=Ar((l)=>{Object.defineProperty(l,"__esModule",{value:!0});function u(t,e){if(t==null)return{};var s={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)!==-1)continue;s[i]=t[i]}return s}var m=class{constructor(t,e,s){this.line=void 0,this.column=void 0,this.index=void 0,this.line=t,this.column=e,this.index=s}},f=class{constructor(t,e){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=e}};function x(t,e){let{line:s,column:i,index:r}=t;return new m(s,i+e,r+e)}var C="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",D={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:C},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:C}},U={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},S=(t)=>t.type==="UpdateExpression"?U.UpdateExpression[`${t.prefix}`]:U[t.type],M={AccessorIsGenerator:({kind:t})=>`A ${t}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:t})=>`Missing initializer in ${t} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:t})=>`\`${t}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:t,exportName:e})=>`A string literal cannot be used as an exported binding without \`from\`.
2
+ import"./chunk-4sazy0nq.js";var{create:mr,defineProperty:it,getOwnPropertyDescriptor:fr,getOwnPropertyNames:yr,getPrototypeOf:xr}=Object,Pr=Object.prototype.hasOwnProperty,Ar=(l,u)=>()=>(u||l((u={exports:{}}).exports,u),u.exports),rt=(l,u)=>{for(var m in u)it(l,m,{get:u[m],enumerable:!0})},gr=(l,u,m,f)=>{if(u&&typeof u=="object"||typeof u=="function")for(let x of yr(u))!Pr.call(l,x)&&x!==m&&it(l,x,{get:()=>u[x],enumerable:!(f=fr(u,x))||f.enumerable});return l},Gt=(l,u,m)=>(m=l!=null?mr(xr(l)):{},gr(u||!l||!l.__esModule?it(m,"default",{value:l,enumerable:!0}):m,l)),Yt=Ar((l)=>{Object.defineProperty(l,"__esModule",{value:!0});function u(t,e){if(t==null)return{};var s={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)!==-1)continue;s[i]=t[i]}return s}var m=class{constructor(t,e,s){this.line=void 0,this.column=void 0,this.index=void 0,this.line=t,this.column=e,this.index=s}},f=class{constructor(t,e){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=e}};function x(t,e){let{line:s,column:i,index:r}=t;return new m(s,i+e,r+e)}var C="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",D={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:C},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:C}},U={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},S=(t)=>t.type==="UpdateExpression"?U.UpdateExpression[`${t.prefix}`]:U[t.type],M={AccessorIsGenerator:({kind:t})=>`A ${t}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:t})=>`Missing initializer in ${t} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:t})=>`\`${t}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:t,exportName:e})=>`A string literal cannot be used as an exported binding without \`from\`.
3
3
  - Did you mean \`export { '${t}' as '${e}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:t})=>`'${t==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:t})=>`Unsyntactic ${t==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:t})=>`A string literal cannot be used as an imported binding.
4
4
  - Did you mean \`import { "${t}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:t})=>`Expected number in radix ${t}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:t})=>`Escape sequence in keyword ${t}.`,InvalidIdentifier:({identifierName:t})=>`Invalid identifier ${t}.`,InvalidLhs:({ancestor:t})=>`Invalid left-hand side in ${S(t)}.`,InvalidLhsBinding:({ancestor:t})=>`Binding invalid left-hand side in ${S(t)}.`,InvalidLhsOptionalChaining:({ancestor:t})=>`Invalid optional chaining in the left-hand side of ${S(t)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:t})=>`Unexpected character '${t}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:t})=>`Private name #${t} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:t})=>`Label '${t}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:t})=>`This experimental syntax requires enabling the parser plugin: ${t.map((e)=>JSON.stringify(e)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:t})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${t.map((e)=>JSON.stringify(e)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:t})=>`Duplicate key "${t}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:t})=>`An export name cannot include a lone surrogate, found '\\u${t.toString(16)}'.`,ModuleExportUndefined:({localName:t})=>`Export '${t}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:t})=>`Private names are only allowed in property accesses (\`obj.#${t}\`) or in \`in\` expressions (\`#${t} in obj\`).`,PrivateNameRedeclaration:({identifierName:t})=>`Duplicate private name #${t}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:t})=>`Unexpected keyword '${t}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:t})=>`Unexpected reserved word '${t}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:t,unexpected:e})=>`Unexpected token${e?` '${e}'.`:""}${t?`, expected "${t}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:t,onlyValidPropertyName:e})=>`The only valid meta property for ${t} is ${t}.${e}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:t})=>`Identifier '${t}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",YieldNotInGeneratorFunction:"'yield' is only allowed within generator functions.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},B={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:t})=>`Assigning to '${t}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:t})=>`Binding '${t}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},X={ParseExpressionEmptyInput:"Unexpected parseExpression() input: The input is empty or contains only comments.",ParseExpressionExpectsEOF:({unexpected:t})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(t)}\`.`},ie=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),re=Object.assign({PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:t})=>`Invalid topic token ${t}. In order to use ${t} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${t}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:t})=>`Hack-style pipe body cannot be an unparenthesized ${S({type:t})}; please wrap it in parentheses.`},{PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'}),ms=["message"];function ot(t,e,s){Object.defineProperty(t,e,{enumerable:!1,configurable:!0,value:s})}function fs({toMessage:t,code:e,reasonCode:s,syntaxPlugin:i}){let r=s==="MissingPlugin"||s==="MissingOneOfPlugins";{let a={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};a[s]&&(s=a[s])}return function a(n,o){let p=SyntaxError();return p.code=e,p.reasonCode=s,p.loc=n,p.pos=n.index,p.syntaxPlugin=i,r&&(p.missingPlugin=o.missingPlugin),ot(p,"clone",function(h={}){var d;let{line:y,column:A,index:T}=(d=h.loc)!=null?d:n;return a(new m(y,A,T),Object.assign({},o,h.details))}),ot(p,"details",o),Object.defineProperty(p,"message",{configurable:!0,get(){let h=`${t(o)} (${n.line}:${n.column})`;return this.message=h,h},set(h){Object.defineProperty(this,"message",{value:h,writable:!0})}}),p}}function $(t,e){if(Array.isArray(t))return(i)=>$(i,t[0]);let s={};for(let i of Object.keys(t)){let r=t[i],a=typeof r=="string"?{message:()=>r}:typeof r=="function"?{message:r}:r,{message:n}=a,o=u(a,ms),p=typeof n=="string"?()=>n:n;s[i]=fs(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:i,toMessage:p},e?{syntaxPlugin:e}:{},o))}return s}var c=Object.assign({},$(D),$(M),$(B),$(X),$`pipelineOperator`(re));function ys(){return{sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function xs(t){let e=ys();if(t==null)return e;if(t.annexB!=null&&t.annexB!==!1)throw Error("The `annexB` option can only be set to `false`.");for(let s of Object.keys(e))t[s]!=null&&(e[s]=t[s]);if(e.startLine===1)t.startIndex==null&&e.startColumn>0?e.startIndex=e.startColumn:t.startColumn==null&&e.startIndex>0&&(e.startColumn=e.startIndex);else if((t.startColumn==null||t.startIndex==null)&&t.startIndex!=null)throw Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");return e}var{defineProperty:Ps}=Object,ht=(t,e)=>{t&&Ps(t,e,{enumerable:!1,value:t[e]})};function pe(t){return ht(t.loc.start,"index"),ht(t.loc.end,"index"),t}var As=(t)=>class extends t{parse(){let e=pe(super.parse());return this.optionFlags&256&&(e.tokens=e.tokens.map(pe)),e}parseRegExpLiteral({pattern:e,flags:s}){let i=null;try{i=new RegExp(e,s)}catch{}let r=this.estreeParseLiteral(i);return r.regex={pattern:e,flags:s},r}parseBigIntLiteral(e){let s;try{s=BigInt(e)}catch{s=null}let i=this.estreeParseLiteral(s);return i.bigint=String(i.value||e),i}parseDecimalLiteral(e){let s=this.estreeParseLiteral(null);return s.decimal=String(s.value||e),s}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}estreeParseChainExpression(e,s){let i=this.startNodeAtNode(e);return i.expression=e,this.finishNodeAt(i,"ChainExpression",s)}directiveToStmt(e){let s=e.value;delete e.value,this.castNodeTo(s,"Literal"),s.raw=s.extra.raw,s.value=s.extra.expressionValue;let i=this.castNodeTo(e,"ExpressionStatement");return i.expression=s,i.directive=s.extra.rawValue,delete s.extra,i}fillOptionalPropertiesForTSESLint(e){}cloneEstreeStringLiteral(e){let{start:s,end:i,loc:r,range:a,raw:n,value:o}=e,p=Object.create(e.constructor.prototype);return p.type="Literal",p.start=s,p.end=i,p.loc=r,p.range=a,p.raw=n,p.value=o,p}initFunction(e,s){super.initFunction(e,s),e.expression=!1}checkDeclaration(e){e!=null&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var s;return e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&!((s=e.expression.extra)!=null&&s.parenthesized)}parseBlockBody(e,s,i,r,a){super.parseBlockBody(e,s,i,r,a);let n=e.directives.map((o)=>this.directiveToStmt(o));e.body=n.concat(e.body),delete e.directives}parsePrivateName(){let e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){let s=super.getPrivateNameSV(e);return e=e,delete e.id,e.name=s,this.castNodeTo(e,"PrivateIdentifier")}isPrivateName(e){return this.getPluginOption("estree","classFeatures")?e.type==="PrivateIdentifier":super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption("estree","classFeatures")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,s){let i=super.parseLiteral(e,s);return i.raw=i.extra.raw,delete i.extra,i}parseFunctionBody(e,s,i=!1){super.parseFunctionBody(e,s,i),e.expression=e.body.type!=="BlockStatement"}parseMethod(e,s,i,r,a,n,o=!1){let p=this.startNode();p.kind=e.kind,p=super.parseMethod(p,s,i,r,a,n,o),delete p.kind;let{typeParameters:h}=e;h&&(delete e.typeParameters,p.typeParameters=h,this.resetStartLocationFromNode(p,h));let d=this.castNodeTo(p,"FunctionExpression");return e.value=d,n==="ClassPrivateMethod"&&(e.computed=!1),n==="ObjectMethod"?(e.kind==="method"&&(e.kind="init"),e.shorthand=!1,this.finishNode(e,"Property")):this.finishNode(e,"MethodDefinition")}nameIsConstructor(e){return e.type==="Literal"?e.value==="constructor":super.nameIsConstructor(e)}parseClassProperty(...e){let s=super.parseClassProperty(...e);return this.getPluginOption("estree","classFeatures")&&this.castNodeTo(s,"PropertyDefinition"),s}parseClassPrivateProperty(...e){let s=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")&&(this.castNodeTo(s,"PropertyDefinition"),s.computed=!1),s}parseClassAccessorProperty(e){let s=super.parseClassAccessorProperty(e);return this.getPluginOption("estree","classFeatures")&&(s.abstract&&this.hasPlugin("typescript")?(delete s.abstract,this.castNodeTo(s,"TSAbstractAccessorProperty")):this.castNodeTo(s,"AccessorProperty")),s}parseObjectProperty(e,s,i,r){let a=super.parseObjectProperty(e,s,i,r);return a&&(a.kind="init",this.castNodeTo(a,"Property")),a}finishObjectProperty(e){return e.kind="init",this.finishNode(e,"Property")}isValidLVal(e,s,i){return e==="Property"?"value":super.isValidLVal(e,s,i)}isAssignable(e,s){return e!=null&&this.isObjectProperty(e)?this.isAssignable(e.value,s):super.isAssignable(e,s)}toAssignable(e,s=!1){if(e!=null&&this.isObjectProperty(e)){let{key:i,value:r}=e;this.isPrivateName(i)&&this.classScope.usePrivateName(this.getPrivateNameSV(i),i.loc.start),this.toAssignable(r,s)}else super.toAssignable(e,s)}toAssignableObjectExpressionProp(e,s,i){e.type==="Property"&&(e.kind==="get"||e.kind==="set")?this.raise(c.PatternHasAccessor,e.key):e.type==="Property"&&e.method?this.raise(c.PatternHasMethod,e.key):super.toAssignableObjectExpressionProp(e,s,i)}finishCallExpression(e,s){let i=super.finishCallExpression(e,s);if(i.callee.type==="Import"){var r,a;this.castNodeTo(i,"ImportExpression"),i.source=i.arguments[0],i.options=(r=i.arguments[1])!=null?r:null,i.attributes=(a=i.arguments[1])!=null?a:null,delete i.arguments,delete i.callee}else i.type==="OptionalCallExpression"?this.castNodeTo(i,"CallExpression"):i.optional=!1;return i}toReferencedArguments(e){e.type!=="ImportExpression"&&super.toReferencedArguments(e)}parseExport(e,s){let i=this.state.lastTokStartLoc,r=super.parseExport(e,s);switch(r.type){case"ExportAllDeclaration":r.exported=null;break;case"ExportNamedDeclaration":r.specifiers.length===1&&r.specifiers[0].type==="ExportNamespaceSpecifier"&&(this.castNodeTo(r,"ExportAllDeclaration"),r.exported=r.specifiers[0].exported,delete r.specifiers);case"ExportDefaultDeclaration":{var a;let{declaration:n}=r;(n==null?void 0:n.type)==="ClassDeclaration"&&((a=n.decorators)==null?void 0:a.length)>0&&n.start===r.start&&this.resetStartLocation(r,i)}break}return r}stopParseSubscript(e,s){let i=super.stopParseSubscript(e,s);return s.optionalChainMember?this.estreeParseChainExpression(i,e.loc.end):i}parseMember(e,s,i,r,a){let n=super.parseMember(e,s,i,r,a);return n.type==="OptionalMemberExpression"?this.castNodeTo(n,"MemberExpression"):n.optional=!1,n}isOptionalMemberExpression(e){return e.type==="ChainExpression"?e.expression.type==="MemberExpression":super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return e.type==="ChainExpression"&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return e.type==="Property"&&e.kind==="init"&&!e.method}isObjectMethod(e){return e.type==="Property"&&(e.method||e.kind==="get"||e.kind==="set")}castNodeTo(e,s){let i=super.castNodeTo(e,s);return this.fillOptionalPropertiesForTSESLint(i),i}cloneIdentifier(e){let s=super.cloneIdentifier(e);return this.fillOptionalPropertiesForTSESLint(s),s}cloneStringLiteral(e){return e.type==="Literal"?this.cloneEstreeStringLiteral(e):super.cloneStringLiteral(e)}finishNodeAt(e,s,i){return pe(super.finishNodeAt(e,s,i))}finishNode(e,s){let i=super.finishNode(e,s);return this.fillOptionalPropertiesForTSESLint(i),i}resetStartLocation(e,s){super.resetStartLocation(e,s),pe(e)}resetEndLocation(e,s=this.state.lastTokEndLoc){super.resetEndLocation(e,s),pe(e)}},ce=class{constructor(t,e){this.token=void 0,this.preserveSpace=void 0,this.token=t,this.preserveSpace=!!e}},F={brace:new ce("{"),j_oTag:new ce("<tag"),j_cTag:new ce("</tag"),j_expr:new ce("<tag>...</tag>",!0)};F.template=new ce("`",!0);var I=!0,P=!0,Me=!0,ue=!0,G=!0,gs=!0,lt=class{constructor(t,e={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop!=null?e.binop:null,this.updateContext=null}},Be=new Map;function v(t,e={}){e.keyword=t;let s=b(t,e);return Be.set(t,s),s}function j(t,e){return b(t,{beforeExpr:I,binop:e})}var de=-1,q=[],Oe=[],Re=[],Ue=[],je=[],_e=[];function b(t,e={}){var s,i,r,a;return++de,Oe.push(t),Re.push((s=e.binop)!=null?s:-1),Ue.push((i=e.beforeExpr)!=null?i:!1),je.push((r=e.startsExpr)!=null?r:!1),_e.push((a=e.prefix)!=null?a:!1),q.push(new lt(t,e)),de}function N(t,e={}){var s,i,r,a;return++de,Be.set(t,de),Oe.push(t),Re.push((s=e.binop)!=null?s:-1),Ue.push((i=e.beforeExpr)!=null?i:!1),je.push((r=e.startsExpr)!=null?r:!1),_e.push((a=e.prefix)!=null?a:!1),q.push(new lt("name",e)),de}var Ts={bracketL:b("[",{beforeExpr:I,startsExpr:P}),bracketHashL:b("#[",{beforeExpr:I,startsExpr:P}),bracketBarL:b("[|",{beforeExpr:I,startsExpr:P}),bracketR:b("]"),bracketBarR:b("|]"),braceL:b("{",{beforeExpr:I,startsExpr:P}),braceBarL:b("{|",{beforeExpr:I,startsExpr:P}),braceHashL:b("#{",{beforeExpr:I,startsExpr:P}),braceR:b("}"),braceBarR:b("|}"),parenL:b("(",{beforeExpr:I,startsExpr:P}),parenR:b(")"),comma:b(",",{beforeExpr:I}),semi:b(";",{beforeExpr:I}),colon:b(":",{beforeExpr:I}),doubleColon:b("::",{beforeExpr:I}),dot:b("."),question:b("?",{beforeExpr:I}),questionDot:b("?."),arrow:b("=>",{beforeExpr:I}),template:b("template"),ellipsis:b("...",{beforeExpr:I}),backQuote:b("`",{startsExpr:P}),dollarBraceL:b("${",{beforeExpr:I,startsExpr:P}),templateTail:b("...`",{startsExpr:P}),templateNonTail:b("...${",{beforeExpr:I,startsExpr:P}),at:b("@"),hash:b("#",{startsExpr:P}),interpreterDirective:b("#!..."),eq:b("=",{beforeExpr:I,isAssign:ue}),assign:b("_=",{beforeExpr:I,isAssign:ue}),slashAssign:b("_=",{beforeExpr:I,isAssign:ue}),xorAssign:b("_=",{beforeExpr:I,isAssign:ue}),moduloAssign:b("_=",{beforeExpr:I,isAssign:ue}),incDec:b("++/--",{prefix:G,postfix:gs,startsExpr:P}),bang:b("!",{beforeExpr:I,prefix:G,startsExpr:P}),tilde:b("~",{beforeExpr:I,prefix:G,startsExpr:P}),doubleCaret:b("^^",{startsExpr:P}),doubleAt:b("@@",{startsExpr:P}),pipeline:j("|>",0),nullishCoalescing:j("??",1),logicalOR:j("||",1),logicalAND:j("&&",2),bitwiseOR:j("|",3),bitwiseXOR:j("^",4),bitwiseAND:j("&",5),equality:j("==/!=/===/!==",6),lt:j("</>/<=/>=",7),gt:j("</>/<=/>=",7),relational:j("</>/<=/>=",7),bitShift:j("<</>>/>>>",8),bitShiftL:j("<</>>/>>>",8),bitShiftR:j("<</>>/>>>",8),plusMin:b("+/-",{beforeExpr:I,binop:9,prefix:G,startsExpr:P}),modulo:b("%",{binop:10,startsExpr:P}),star:b("*",{binop:10}),slash:j("/",10),exponent:b("**",{beforeExpr:I,binop:11,rightAssociative:!0}),_in:v("in",{beforeExpr:I,binop:7}),_instanceof:v("instanceof",{beforeExpr:I,binop:7}),_break:v("break"),_case:v("case",{beforeExpr:I}),_catch:v("catch"),_continue:v("continue"),_debugger:v("debugger"),_default:v("default",{beforeExpr:I}),_else:v("else",{beforeExpr:I}),_finally:v("finally"),_function:v("function",{startsExpr:P}),_if:v("if"),_return:v("return",{beforeExpr:I}),_switch:v("switch"),_throw:v("throw",{beforeExpr:I,prefix:G,startsExpr:P}),_try:v("try"),_var:v("var"),_const:v("const"),_with:v("with"),_new:v("new",{beforeExpr:I,startsExpr:P}),_this:v("this",{startsExpr:P}),_super:v("super",{startsExpr:P}),_class:v("class",{startsExpr:P}),_extends:v("extends",{beforeExpr:I}),_export:v("export"),_import:v("import",{startsExpr:P}),_null:v("null",{startsExpr:P}),_true:v("true",{startsExpr:P}),_false:v("false",{startsExpr:P}),_typeof:v("typeof",{beforeExpr:I,prefix:G,startsExpr:P}),_void:v("void",{beforeExpr:I,prefix:G,startsExpr:P}),_delete:v("delete",{beforeExpr:I,prefix:G,startsExpr:P}),_do:v("do",{isLoop:Me,beforeExpr:I}),_for:v("for",{isLoop:Me}),_while:v("while",{isLoop:Me}),_as:N("as",{startsExpr:P}),_assert:N("assert",{startsExpr:P}),_async:N("async",{startsExpr:P}),_await:N("await",{startsExpr:P}),_defer:N("defer",{startsExpr:P}),_from:N("from",{startsExpr:P}),_get:N("get",{startsExpr:P}),_let:N("let",{startsExpr:P}),_meta:N("meta",{startsExpr:P}),_of:N("of",{startsExpr:P}),_sent:N("sent",{startsExpr:P}),_set:N("set",{startsExpr:P}),_source:N("source",{startsExpr:P}),_static:N("static",{startsExpr:P}),_using:N("using",{startsExpr:P}),_yield:N("yield",{startsExpr:P}),_asserts:N("asserts",{startsExpr:P}),_checks:N("checks",{startsExpr:P}),_exports:N("exports",{startsExpr:P}),_global:N("global",{startsExpr:P}),_implements:N("implements",{startsExpr:P}),_intrinsic:N("intrinsic",{startsExpr:P}),_infer:N("infer",{startsExpr:P}),_is:N("is",{startsExpr:P}),_mixins:N("mixins",{startsExpr:P}),_proto:N("proto",{startsExpr:P}),_require:N("require",{startsExpr:P}),_satisfies:N("satisfies",{startsExpr:P}),_keyof:N("keyof",{startsExpr:P}),_readonly:N("readonly",{startsExpr:P}),_unique:N("unique",{startsExpr:P}),_abstract:N("abstract",{startsExpr:P}),_declare:N("declare",{startsExpr:P}),_enum:N("enum",{startsExpr:P}),_module:N("module",{startsExpr:P}),_namespace:N("namespace",{startsExpr:P}),_interface:N("interface",{startsExpr:P}),_type:N("type",{startsExpr:P}),_opaque:N("opaque",{startsExpr:P}),name:b("name",{startsExpr:P}),placeholder:b("%%",{startsExpr:P}),string:b("string",{startsExpr:P}),num:b("num",{startsExpr:P}),bigint:b("bigint",{startsExpr:P}),decimal:b("decimal",{startsExpr:P}),regexp:b("regexp",{startsExpr:P}),privateName:b("#name",{startsExpr:P}),eof:b("eof"),jsxName:b("jsxName"),jsxText:b("jsxText",{beforeExpr:I}),jsxTagStart:b("jsxTagStart",{startsExpr:P}),jsxTagEnd:b("jsxTagEnd")};function L(t){return t>=93&&t<=133}function bs(t){return t<=92}function V(t){return t>=58&&t<=133}function pt(t){return t>=58&&t<=137}function Es(t){return Ue[t]}function me(t){return je[t]}function Cs(t){return t>=29&&t<=33}function ct(t){return t>=129&&t<=131}function Ss(t){return t>=90&&t<=92}function He(t){return t>=58&&t<=92}function ws(t){return t>=39&&t<=59}function Is(t){return t===34}function Ns(t){return _e[t]}function vs(t){return t>=121&&t<=123}function ks(t){return t>=124&&t<=130}function Y(t){return Oe[t]}function Ee(t){return Re[t]}function Ds(t){return t===57}function Ce(t){return t>=24&&t<=25}function K(t){return q[t]}q[8].updateContext=(t)=>{t.pop()},q[5].updateContext=q[7].updateContext=q[23].updateContext=(t)=>{t.push(F.brace)},q[22].updateContext=(t)=>{t[t.length-1]===F.template?t.pop():t.push(F.template)},q[143].updateContext=(t)=>{t.push(F.j_expr,F.j_oTag)};var ze="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",ut="\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",Fs=new RegExp("["+ze+"]"),Ls=new RegExp("["+ze+ut+"]");ze=ut=null;var dt=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],Ms=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239];function Ve(t,e){let s=65536;for(let i=0,r=e.length;i<r;i+=2){if(s+=e[i],s>t)return!1;if(s+=e[i+1],s>=t)return!0}return!1}function J(t){return t<65?t===36:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&Fs.test(String.fromCharCode(t)):Ve(t,dt)}function ae(t){return t<48?t===36:t<58?!0:t<65?!1:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&Ls.test(String.fromCharCode(t)):Ve(t,dt)||Ve(t,Ms)}var $e={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},Bs=new Set($e.keyword),Os=new Set($e.strict),Rs=new Set($e.strictBind);function mt(t,e){return e&&t==="await"||t==="enum"}function ft(t,e){return mt(t,e)||Os.has(t)}function yt(t){return Rs.has(t)}function xt(t,e){return ft(t,e)||yt(t)}function Us(t){return Bs.has(t)}function js(t,e,s){return t===64&&e===64&&J(s)}var _s=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function Hs(t){return _s.has(t)}var qe=class{constructor(t){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=t}},Ke=class{constructor(t,e){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=t,this.inModule=e}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get allowNewTarget(){return(this.currentThisScopeFlags()&512)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let t=this.currentThisScopeFlags();return(t&64)>0&&(t&2)===0}get inStaticBlock(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&128)return!0;if(e&1731)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get inBareCaseStatement(){return(this.currentScope().flags&256)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(t){return new qe(t)}enter(t){this.scopeStack.push(this.createScope(t))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(t){return!!(t.flags&130||!this.parser.inModule&&t.flags&1)}declareName(t,e,s){let i=this.currentScope();if(e&8||e&16){this.checkRedeclarationInScope(i,t,e,s);let r=i.names.get(t)||0;e&16?r=r|4:(i.firstLexicalName||(i.firstLexicalName=t),r=r|2),i.names.set(t,r),e&8&&this.maybeExportDefined(i,t)}else if(e&4)for(let r=this.scopeStack.length-1;r>=0&&(i=this.scopeStack[r],this.checkRedeclarationInScope(i,t,e,s),i.names.set(t,(i.names.get(t)||0)|1),this.maybeExportDefined(i,t),!(i.flags&1667));--r);this.parser.inModule&&i.flags&1&&this.undefinedExports.delete(t)}maybeExportDefined(t,e){this.parser.inModule&&t.flags&1&&this.undefinedExports.delete(e)}checkRedeclarationInScope(t,e,s,i){this.isRedeclaredInScope(t,e,s)&&this.parser.raise(c.VarRedeclaration,i,{identifierName:e})}isRedeclaredInScope(t,e,s){if(!(s&1))return!1;if(s&8)return t.names.has(e);let i=t.names.get(e);return s&16?(i&2)>0||!this.treatFunctionsAsVarInScope(t)&&(i&1)>0:(i&2)>0&&!(t.flags&8&&t.firstLexicalName===e)||!this.treatFunctionsAsVarInScope(t)&&(i&4)>0}checkLocalExport(t){let{name:e}=t;this.scopeStack[0].names.has(e)||this.undefinedExports.set(e,t.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&1667)return e}}currentThisScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&1731&&!(e&4))return e}}},zs=class extends qe{constructor(...t){super(...t),this.declareFunctions=new Set}},Vs=class extends Ke{createScope(t){return new zs(t)}declareName(t,e,s){let i=this.currentScope();if(e&2048){this.checkRedeclarationInScope(i,t,e,s),this.maybeExportDefined(i,t),i.declareFunctions.add(t);return}super.declareName(t,e,s)}isRedeclaredInScope(t,e,s){if(super.isRedeclaredInScope(t,e,s))return!0;if(s&2048&&!t.declareFunctions.has(e)){let i=t.names.get(e);return(i&4)>0||(i&2)>0}return!1}checkLocalExport(t){this.scopeStack[0].declareFunctions.has(t.name)||super.checkLocalExport(t)}},$s=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),E=$`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:t})=>`Cannot overwrite reserved type ${t}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:t,enumName:e})=>`Boolean enum members need to be initialized. Use either \`${t} = true,\` or \`${t} = false,\` in enum \`${e}\`.`,EnumDuplicateMemberName:({memberName:t,enumName:e})=>`Enum member names need to be unique, but the name \`${t}\` has already been used before in enum \`${e}\`.`,EnumInconsistentMemberValues:({enumName:t})=>`Enum \`${t}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:t,enumName:e})=>`Enum type \`${t}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:t})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:t,memberName:e,explicitType:s})=>`Enum \`${t}\` has type \`${s}\`, so the initializer of \`${e}\` needs to be a ${s} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:t,memberName:e})=>`Symbol enum members cannot be initialized. Use \`${e},\` in enum \`${t}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:t,memberName:e})=>`The enum member initializer for \`${e}\` needs to be a literal (either a boolean, number, or string) in enum \`${t}\`.`,EnumInvalidMemberName:({enumName:t,memberName:e,suggestion:s})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${e}\`, consider using \`${s}\`, in enum \`${t}\`.`,EnumNumberMemberNotInitialized:({enumName:t,memberName:e})=>`Number enum members need to be initialized, e.g. \`${e} = 1\` in enum \`${t}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:t})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${t}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:t})=>`Unexpected reserved type ${t}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:t,suggestion:e})=>`\`declare export ${t}\` is not supported. Use \`${e}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function qs(t){return t.type==="DeclareExportAllDeclaration"||t.type==="DeclareExportDeclaration"&&(!t.declaration||t.declaration.type!=="TypeAlias"&&t.declaration.type!=="InterfaceDeclaration")}function Pt(t){return t.importKind==="type"||t.importKind==="typeof"}var Ks={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function Js(t,e){let s=[],i=[];for(let r=0;r<t.length;r++)(e(t[r],r,t)?s:i).push(t[r]);return[s,i]}var Ws=/\*?\s*@((?:no)?flow)\b/,Xs=(t)=>class extends t{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return Vs}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(e,s){e!==134&&e!==13&&e!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(e,s)}addComment(e){if(this.flowPragma===void 0){let s=Ws.exec(e.value);if(s)if(s[1]==="flow")this.flowPragma="flow";else if(s[1]==="noflow")this.flowPragma="noflow";else throw Error("Unexpected flow pragma")}super.addComment(e)}flowParseTypeInitialiser(e){let s=this.state.inType;this.state.inType=!0,this.expect(e||14);let i=this.flowParseType();return this.state.inType=s,i}flowParsePredicate(){let e=this.startNode(),s=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>s.index+1&&this.raise(E.UnexpectedSpaceBetweenModuloChecks,s),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let e=this.state.inType;this.state.inType=!0,this.expect(14);let s=null,i=null;return this.match(54)?(this.state.inType=e,i=this.flowParsePredicate()):(s=this.flowParseType(),this.state.inType=e,this.match(54)&&(i=this.flowParsePredicate())),[s,i]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();let s=e.id=this.parseIdentifier(),i=this.startNode(),r=this.startNode();this.match(47)?i.typeParameters=this.flowParseTypeParameterDeclaration():i.typeParameters=null,this.expect(10);let a=this.flowParseFunctionTypeParams();return i.params=a.params,i.rest=a.rest,i.this=a._this,this.expect(11),[i.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),r.typeAnnotation=this.finishNode(i,"FunctionTypeAnnotation"),s.typeAnnotation=this.finishNode(r,"TypeAnnotation"),this.resetEndLocation(s),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,s){if(this.match(80))return this.flowParseDeclareClass(e);if(this.match(68))return this.flowParseDeclareFunction(e);if(this.match(74))return this.flowParseDeclareVariable(e);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(e):(s&&this.raise(E.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(e));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(e);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(e);if(this.isContextual(129))return this.flowParseDeclareInterface(e);if(this.match(82))return this.flowParseDeclareExportDeclaration(e,s);this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(134)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();let s=e.body=this.startNode(),i=s.body=[];for(this.expect(5);!this.match(8);){let n=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(E.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(n)):(this.expectContextual(125,E.UnsupportedStatementInDeclareModule),n=this.flowParseDeclare(n,!0)),i.push(n)}this.scope.exit(),this.expect(8),this.finishNode(s,"BlockStatement");let r=null,a=!1;return i.forEach((n)=>{qs(n)?(r==="CommonJS"&&this.raise(E.AmbiguousDeclareModuleKind,n),r="ES"):n.type==="DeclareModuleExports"&&(a&&this.raise(E.DuplicateDeclareModuleExports,n),r==="ES"&&this.raise(E.AmbiguousDeclareModuleKind,n),r="CommonJS",a=!0)}),e.kind=r||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,s){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!s){let i=this.state.value;throw this.raise(E.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:i,suggestion:Ks[i]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return e=this.parseExport(e,null),e.type==="ExportNamedDeclaration"?(e.default=!1,delete e.exportKind,this.castNodeTo(e,"DeclareExportDeclaration")):this.castNodeTo(e,"DeclareExportAllDeclaration");this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(111),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();let s=this.flowParseTypeAlias(e);return this.castNodeTo(s,"DeclareTypeAlias"),s}flowParseDeclareOpaqueType(e){this.next();let s=this.flowParseOpaqueType(e,!0);return this.castNodeTo(s,"DeclareOpaqueType"),s}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,s){if(e.id=this.flowParseRestrictedIdentifier(!s,!0),this.scope.declareName(e.id.name,s?17:8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(!s&&this.eat(12));if(s){if(e.implements=[],e.mixins=[],this.eatContextual(117))do e.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do e.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:s,allowExact:!1,allowSpread:!1,allowProto:s,allowInexact:!1})}flowParseInterfaceExtends(){let e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){e==="_"&&this.raise(E.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(e,s,i){$s.has(e)&&this.raise(i?E.AssignReservedType:E.UnexpectedReservedType,s,{reservedType:e})}flowParseRestrictedIdentifier(e,s){return this.checkReservedType(this.state.value,this.state.startLoc,s),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,s){return this.expectContextual(130),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,s||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){let s=this.state.startLoc,i=this.startNode(),r=this.flowParseVariance(),a=this.flowParseTypeAnnotatableIdentifier();return i.name=a.name,i.variance=r,i.bound=a.typeAnnotation,this.match(29)?(this.eat(29),i.default=this.flowParseType()):e&&this.raise(E.MissingTypeParamDefault,s),this.finishNode(i,"TypeParameter")}flowParseTypeParameterDeclaration(){let e=this.state.inType,s=this.startNode();s.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let i=!1;do{let r=this.flowParseTypeParameter(i);s.params.push(r),r.default&&(i=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(s,"TypeParameterDeclaration")}flowInTopLevelContext(e){if(this.curContext()!==F.brace){let s=this.state.context;this.state.context=[s[0]];try{return e()}finally{this.state.context=s}}else return e()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()===47)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){let e=this.startNode(),s=this.state.inType;return this.state.inType=!0,e.params=[],this.flowInTopLevelContext(()=>{this.expect(47);let i=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);this.state.noAnonFunctionType=i}),this.state.inType=s,!this.state.inType&&this.curContext()===F.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==47)return;let e=this.startNode(),s=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=s,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){let e=this.startNode();if(this.expectContextual(129),e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,s,i){return e.static=s,this.lookahead().type===14?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=i,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,s){return e.static=s,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,s){let i=this.startNode();return e.static=s,e.value=this.flowParseObjectTypeMethodish(i),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:s,allowSpread:i,allowProto:r,allowInexact:a}){let n=this.state.inType;this.state.inType=!0;let o=this.startNode();o.callProperties=[],o.properties=[],o.indexers=[],o.internalSlots=[];let p,h,d=!1;for(s&&this.match(6)?(this.expect(6),p=9,h=!0):(this.expect(5),p=8,h=!1),o.exact=h;!this.match(p);){let A=!1,T=null,w=null,O=this.startNode();if(r&&this.isContextual(118)){let R=this.lookahead();R.type!==14&&R.type!==17&&(this.next(),T=this.state.startLoc,e=!1)}if(e&&this.isContextual(106)){let R=this.lookahead();R.type!==14&&R.type!==17&&(this.next(),A=!0)}let k=this.flowParseVariance();if(this.eat(0))T!=null&&this.unexpected(T),this.eat(0)?(k&&this.unexpected(k.loc.start),o.internalSlots.push(this.flowParseObjectTypeInternalSlot(O,A))):o.indexers.push(this.flowParseObjectTypeIndexer(O,A,k));else if(this.match(10)||this.match(47))T!=null&&this.unexpected(T),k&&this.unexpected(k.loc.start),o.callProperties.push(this.flowParseObjectTypeCallProperty(O,A));else{let R="init";if(this.isContextual(99)||this.isContextual(104)){let Pe=this.lookahead();pt(Pe.type)&&(R=this.state.value,this.next())}let _=this.flowParseObjectTypeProperty(O,A,T,k,R,i,a??!h);_===null?(d=!0,w=this.state.lastTokStartLoc):o.properties.push(_)}this.flowObjectTypeSemicolon(),w&&!this.match(8)&&!this.match(9)&&this.raise(E.UnexpectedExplicitInexactInObject,w)}this.expect(p),i&&(o.inexact=d);let y=this.finishNode(o,"ObjectTypeAnnotation");return this.state.inType=n,y}flowParseObjectTypeProperty(e,s,i,r,a,n,o){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(n?o||this.raise(E.InexactInsideExact,this.state.lastTokStartLoc):this.raise(E.InexactInsideNonObject,this.state.lastTokStartLoc),r&&this.raise(E.InexactVariance,r),null):(n||this.raise(E.UnexpectedSpreadType,this.state.lastTokStartLoc),i!=null&&this.unexpected(i),r&&this.raise(E.SpreadVariance,r),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=s,e.proto=i!=null,e.kind=a;let p=!1;return this.match(47)||this.match(10)?(e.method=!0,i!=null&&this.unexpected(i),r&&this.unexpected(r.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),(a==="get"||a==="set")&&this.flowCheckGetterSetterParams(e),!n&&e.key.name==="constructor"&&e.value.this&&this.raise(E.ThisParamBannedInConstructor,e.value.this)):(a!=="init"&&this.unexpected(),e.method=!1,this.eat(17)&&(p=!0),e.value=this.flowParseTypeInitialiser(),e.variance=r),e.optional=p,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){let s=e.kind==="get"?0:1,i=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise(e.kind==="get"?E.GetterMayNotHaveThisParam:E.SetterMayNotHaveThisParam,e.value.this),i!==s&&this.raise(e.kind==="get"?c.BadGetterArity:c.BadSetterArity,e),e.kind==="set"&&e.value.rest&&this.raise(c.BadSetterRestParameter,e)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,s){e??(e=this.state.startLoc);let i=s||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let r=this.startNodeAt(e);r.qualification=i,r.id=this.flowParseRestrictedIdentifier(!0),i=this.finishNode(r,"QualifiedTypeIdentifier")}return i}flowParseGenericType(e,s){let i=this.startNodeAt(e);return i.typeParameters=null,i.id=this.flowParseQualifiedTypeIdentifier(e,s),this.match(47)&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")}flowParseTypeofType(){let e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){let e=this.startNode();for(e.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(e.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(e,"TupleTypeAnnotation")}flowParseFunctionTypeParam(e){let s=null,i=!1,r=null,a=this.startNode(),n=this.lookahead(),o=this.state.type===78;return n.type===14||n.type===17?(o&&!e&&this.raise(E.ThisParamMustBeFirst,a),s=this.parseIdentifier(o),this.eat(17)&&(i=!0,o&&this.raise(E.ThisParamMayNotBeOptional,a)),r=this.flowParseTypeInitialiser()):r=this.flowParseType(),a.name=s,a.optional=i,a.typeAnnotation=r,this.finishNode(a,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(e){let s=this.startNodeAt(e.loc.start);return s.name=null,s.optional=!1,s.typeAnnotation=e,this.finishNode(s,"FunctionTypeParam")}flowParseFunctionTypeParams(e=[]){let s=null,i=null;for(this.match(78)&&(i=this.flowParseFunctionTypeParam(!0),i.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(s=this.flowParseFunctionTypeParam(!1)),{params:e,rest:s,_this:i}}flowIdentToTypeAnnotation(e,s,i){switch(i.name){case"any":return this.finishNode(s,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(s,"BooleanTypeAnnotation");case"mixed":return this.finishNode(s,"MixedTypeAnnotation");case"empty":return this.finishNode(s,"EmptyTypeAnnotation");case"number":return this.finishNode(s,"NumberTypeAnnotation");case"string":return this.finishNode(s,"StringTypeAnnotation");case"symbol":return this.finishNode(s,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(i.name),this.flowParseGenericType(e,i)}}flowParsePrimaryType(){let e=this.state.startLoc,s=this.startNode(),i,r,a=!1,n=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,r=this.flowParseTupleType(),this.state.noAnonFunctionType=n,r;case 47:{let o=this.startNode();return o.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),i=this.flowParseFunctionTypeParams(),o.params=i.params,o.rest=i.rest,o.this=i._this,this.expect(11),this.expect(19),o.returnType=this.flowParseType(),this.finishNode(o,"FunctionTypeAnnotation")}case 10:{let o=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(L(this.state.type)||this.match(78)){let p=this.lookahead().type;a=p!==17&&p!==14}else a=!0;if(a){if(this.state.noAnonFunctionType=!1,r=this.flowParseType(),this.state.noAnonFunctionType=n,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),r;this.eat(12)}return r?i=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(r)]):i=this.flowParseFunctionTypeParams(),o.params=i.params,o.rest=i.rest,o.this=i._this,this.expect(11),this.expect(19),o.returnType=this.flowParseType(),o.typeParameters=null,this.finishNode(o,"FunctionTypeAnnotation")}case 134:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return s.value=this.match(85),this.next(),this.finishNode(s,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(135))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",s);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",s);throw this.raise(E.UnexpectedSubtractionOperand,this.state.startLoc)}this.unexpected();return;case 135:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 136:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(s,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(s,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(s,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(s,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(He(this.state.type)){let o=Y(this.state.type);return this.next(),super.createIdentifier(s,o)}else if(L(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(e,s,this.parseIdentifier())}this.unexpected()}flowParsePostfixType(){let e=this.state.startLoc,s=this.flowParsePrimaryType(),i=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let r=this.startNodeAt(e),a=this.eat(18);i=i||a,this.expect(0),!a&&this.match(3)?(r.elementType=s,this.next(),s=this.finishNode(r,"ArrayTypeAnnotation")):(r.objectType=s,r.indexType=this.flowParseType(),this.expect(3),i?(r.optional=a,s=this.finishNode(r,"OptionalIndexedAccessType")):s=this.finishNode(r,"IndexedAccessType"))}return s}flowParsePrefixType(){let e=this.startNode();return this.eat(17)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let s=this.startNodeAt(e.loc.start);return s.params=[this.reinterpretTypeAsFunctionTypeParam(e)],s.rest=null,s.this=null,s.returnType=this.flowParseType(),s.typeParameters=null,this.finishNode(s,"FunctionTypeAnnotation")}return e}flowParseIntersectionType(){let e=this.startNode();this.eat(45);let s=this.flowParseAnonFunctionWithoutParens();for(e.types=[s];this.eat(45);)e.types.push(this.flowParseAnonFunctionWithoutParens());return e.types.length===1?s:this.finishNode(e,"IntersectionTypeAnnotation")}flowParseUnionType(){let e=this.startNode();this.eat(43);let s=this.flowParseIntersectionType();for(e.types=[s];this.eat(43);)e.types.push(this.flowParseIntersectionType());return e.types.length===1?s:this.finishNode(e,"UnionTypeAnnotation")}flowParseType(){let e=this.state.inType;this.state.inType=!0;let s=this.flowParseUnionType();return this.state.inType=e,s}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){let e=this.state.startLoc,s=this.parseIdentifier();return this.flowParseGenericType(e,s)}else return this.flowParseType()}flowParseTypeAnnotation(){let e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(e){let s=e?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(s.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(s)),s}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}flowParseVariance(){let e=null;return this.match(53)?(e=this.startNode(),this.state.value==="+"?e.kind="plus":e.kind="minus",this.next(),this.finishNode(e,"Variance")):e}parseFunctionBody(e,s,i=!1){if(s){this.forwardNoArrowParamsConversionAt(e,()=>super.parseFunctionBody(e,!0,i));return}super.parseFunctionBody(e,!1,i)}parseFunctionBodyAndFinish(e,s,i=!1){if(this.match(14)){let r=this.startNode();[r.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=r.typeAnnotation?this.finishNode(r,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,s,i)}parseStatementLike(e){if(this.state.strict&&this.isContextual(129)){let i=this.lookahead();if(V(i.type)){let r=this.startNode();return this.next(),this.flowParseInterface(r)}}else if(this.isContextual(126)){let i=this.startNode();return this.next(),this.flowParseEnumDeclaration(i)}let s=super.parseStatementLike(e);return this.flowPragma===void 0&&!this.isValidDirective(s)&&(this.flowPragma=null),s}parseExpressionStatement(e,s,i){if(s.type==="Identifier"){if(s.name==="declare"){if(this.match(80)||L(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(L(this.state.type)){if(s.name==="interface")return this.flowParseInterface(e);if(s.name==="type")return this.flowParseTypeAlias(e);if(s.name==="opaque")return this.flowParseOpaqueType(e,!1)}}return super.parseExpressionStatement(e,s,i)}shouldParseExportDeclaration(){let{type:e}=this.state;return e===126||ct(e)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return e===126||ct(e)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,s,i){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let y=this.lookaheadCharCode();if(y===44||y===61||y===58||y===41)return this.setOptionalParametersError(i),e}this.expect(17);let r=this.state.clone(),a=this.state.noArrowAt,n=this.startNodeAt(s),{consequent:o,failed:p}=this.tryParseConditionalConsequent(),[h,d]=this.getArrowLikeExpressions(o);if(p||d.length>0){let y=[...a];if(d.length>0){this.state=r,this.state.noArrowAt=y;for(let A=0;A<d.length;A++)y.push(d[A].start);({consequent:o,failed:p}=this.tryParseConditionalConsequent()),[h,d]=this.getArrowLikeExpressions(o)}p&&h.length>1&&this.raise(E.AmbiguousConditionalArrow,r.startLoc),p&&h.length===1&&(this.state=r,y.push(h[0].start),this.state.noArrowAt=y,{consequent:o,failed:p}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(o,!0),this.state.noArrowAt=a,this.expect(14),n.test=e,n.consequent=o,n.alternate=this.forwardNoArrowParamsConversionAt(n,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(n,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let e=this.parseMaybeAssignAllowIn(),s=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:s}}getArrowLikeExpressions(e,s){let i=[e],r=[];for(;i.length!==0;){let a=i.pop();a.type==="ArrowFunctionExpression"&&a.body.type!=="BlockStatement"?(a.typeParameters||!a.returnType?this.finishArrowValidation(a):r.push(a),i.push(a.body)):a.type==="ConditionalExpression"&&(i.push(a.consequent),i.push(a.alternate))}return s?(r.forEach((a)=>this.finishArrowValidation(a)),[r,[]]):Js(r,(a)=>a.params.every((n)=>this.isAssignable(n,!0)))}finishArrowValidation(e){var s;this.toAssignableList(e.params,(s=e.extra)==null?void 0:s.trailingCommaLoc,!1),this.scope.enter(518),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,s){let i;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),i=s(),this.state.noArrowParamsConversionAt.pop()):i=s(),i}parseParenItem(e,s){let i=super.parseParenItem(e,s);if(this.eat(17)&&(i.optional=!0,this.resetEndLocation(e)),this.match(14)){let r=this.startNodeAt(s);return r.expression=i,r.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(r,"TypeCastExpression")}return i}assertModuleNodeAllowed(e){e.type==="ImportDeclaration"&&(e.importKind==="type"||e.importKind==="typeof")||e.type==="ExportNamedDeclaration"&&e.exportKind==="type"||e.type==="ExportAllDeclaration"&&e.exportKind==="type"||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(130)){e.exportKind="type";let s=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(s)}else if(this.isContextual(131)){e.exportKind="type";let s=this.startNode();return this.next(),this.flowParseOpaqueType(s,!1)}else if(this.isContextual(129)){e.exportKind="type";let s=this.startNode();return this.next(),this.flowParseInterface(s)}else if(this.isContextual(126)){e.exportKind="value";let s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}else return super.parseExportDeclaration(e)}eatExportStar(e){return super.eatExportStar(e)?!0:this.isContextual(130)&&this.lookahead().type===55?(e.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(e){let{startLoc:s}=this.state,i=super.maybeParseExportNamespaceSpecifier(e);return i&&e.exportKind==="type"&&this.unexpected(s),i}parseClassId(e,s,i){super.parseClassId(e,s,i),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,s,i){let{startLoc:r}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(e,s))return;s.declare=!0}super.parseClassMember(e,s,i),s.declare&&(s.type!=="ClassProperty"&&s.type!=="ClassPrivateProperty"&&s.type!=="PropertyDefinition"?this.raise(E.DeclareClassElement,r):s.value&&this.raise(E.DeclareClassFieldInitializer,s.value))}isIterator(e){return e==="iterator"||e==="asyncIterator"}readIterator(){let e=super.readWord1(),s="@@"+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(c.InvalidIdentifier,this.state.curPosition(),{identifierName:s}),this.finishToken(132,s)}getTokenFromCode(e){let s=this.input.charCodeAt(this.state.pos+1);e===123&&s===124?this.finishOp(6,2):this.state.inType&&(e===62||e===60)?this.finishOp(e===62?48:47,1):this.state.inType&&e===63?s===46?this.finishOp(18,2):this.finishOp(17,1):js(e,s,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e)}isAssignable(e,s){return e.type==="TypeCastExpression"?this.isAssignable(e.expression,s):super.isAssignable(e,s)}toAssignable(e,s=!1){!s&&e.type==="AssignmentExpression"&&e.left.type==="TypeCastExpression"&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,s)}toAssignableList(e,s,i){for(let r=0;r<e.length;r++){let a=e[r];(a==null?void 0:a.type)==="TypeCastExpression"&&(e[r]=this.typeCastToParameter(a))}super.toAssignableList(e,s,i)}toReferencedList(e,s){for(let r=0;r<e.length;r++){var i;let a=e[r];a&&a.type==="TypeCastExpression"&&!((i=a.extra)!=null&&i.parenthesized)&&(e.length>1||!s)&&this.raise(E.TypeCastInPattern,a.typeAnnotation)}return e}parseArrayLike(e,s,i,r){let a=super.parseArrayLike(e,s,i,r);return s&&!this.state.maybeInArrowParameters&&this.toReferencedList(a.elements),a}isValidLVal(e,s,i){return e==="TypeCastExpression"||super.isValidLVal(e,s,i)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,s,i,r,a,n){if(s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,s,i,r,a,n),s.params&&a){let o=s.params;o.length>0&&this.isThisParam(o[0])&&this.raise(E.ThisParamBannedInConstructor,s)}else if(s.type==="MethodDefinition"&&a&&s.value.params){let o=s.value.params;o.length>0&&this.isThisParam(o[0])&&this.raise(E.ThisParamBannedInConstructor,s)}}pushClassPrivateMethod(e,s,i,r){s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,s,i,r)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();let s=e.implements=[];do{let i=this.startNode();i.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?i.typeParameters=this.flowParseTypeParameterInstantiation():i.typeParameters=null,s.push(this.finishNode(i,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);let s=this.getObjectOrClassMethodParams(e);if(s.length>0){let i=s[0];this.isThisParam(i)&&e.kind==="get"?this.raise(E.GetterMayNotHaveThisParam,i):this.isThisParam(i)&&this.raise(E.SetterMayNotHaveThisParam,i)}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,s,i,r,a,n,o){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance;let p;this.match(47)&&!n&&(p=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let h=super.parseObjPropValue(e,s,i,r,a,n,o);return p&&((h.value||h).typeParameters=p),h}parseFunctionParamType(e){return this.eat(17)&&(e.type!=="Identifier"&&this.raise(E.PatternIsOptional,e),this.isThisParam(e)&&this.raise(E.ThisParamMayNotBeOptional,e),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(E.ThisParamAnnotationRequired,e),this.match(29)&&this.isThisParam(e)&&this.raise(E.ThisParamNoDefault,e),this.resetEndLocation(e),e}parseMaybeDefault(e,s){let i=super.parseMaybeDefault(e,s);return i.type==="AssignmentPattern"&&i.typeAnnotation&&i.right.start<i.typeAnnotation.start&&this.raise(E.TypeBeforeInitializer,i.typeAnnotation),i}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(E.ImportReflectionHasImportType,e.specifiers[0].loc.start)}parseImportSpecifierLocal(e,s,i){s.local=Pt(e)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(s,i))}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){if(!e)return!0;let s=this.lookaheadCharCode();return s===123||s===42}return!e&&this.isContextual(87)}applyImportPhase(e,s,i,r){if(super.applyImportPhase(e,s,i,r),s){if(!i&&this.match(65))return;e.exportKind=i==="type"?i:"value"}else i==="type"&&this.match(55)&&this.unexpected(),e.importKind=i==="type"||i==="typeof"?i:"value"}parseImportSpecifier(e,s,i,r,a){let n=e.imported,o=null;n.type==="Identifier"&&(n.name==="type"?o="type":n.name==="typeof"&&(o="typeof"));let p=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let d=this.parseIdentifier(!0);o!==null&&!V(this.state.type)?(e.imported=d,e.importKind=o,e.local=this.cloneIdentifier(d)):(e.imported=n,e.importKind=null,e.local=this.parseIdentifier())}else{if(o!==null&&V(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=o;else{if(s)throw this.raise(c.ImportBindingIsString,e,{importName:n.value});e.imported=n,e.importKind=null}this.eatContextual(93)?e.local=this.parseIdentifier():(p=!0,e.local=this.cloneIdentifier(e.imported))}let h=Pt(e);return i&&h&&this.raise(E.ImportTypeShorthandOnlyInPureImport,e),(i||h)&&this.checkReservedType(e.local.name,e.local.loc.start,!0),p&&!i&&!h&&this.checkReservedWord(e.local.name,e.loc.start,!0,!0),this.finishImportSpecifier(e,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(e,s){let i=e.kind;i!=="get"&&i!=="set"&&this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(e,s)}parseVarId(e,s){super.parseVarId(e,s),this.match(14)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,s){if(this.match(14)){let i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,e.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=i}return super.parseAsyncArrowFromCallExpression(e,s)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(e,s){var i;let r=null,a;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(r=this.state.clone(),a=this.tryParse(()=>super.parseMaybeAssign(e,s),r),!a.error)return a.node;let{context:p}=this.state,h=p[p.length-1];(h===F.j_oTag||h===F.j_expr)&&p.pop()}if((i=a)!=null&&i.error||this.match(47)){var n,o;r=r||this.state.clone();let p,h=this.tryParse((y)=>{var A;p=this.flowParseTypeParameterDeclaration();let T=this.forwardNoArrowParamsConversionAt(p,()=>{let O=super.parseMaybeAssign(e,s);return this.resetStartLocationFromNode(O,p),O});(A=T.extra)!=null&&A.parenthesized&&y();let w=this.maybeUnwrapTypeCastExpression(T);return w.type!=="ArrowFunctionExpression"&&y(),w.typeParameters=p,this.resetStartLocationFromNode(w,p),T},r),d=null;if(h.node&&this.maybeUnwrapTypeCastExpression(h.node).type==="ArrowFunctionExpression"){if(!h.error&&!h.aborted)return h.node.async&&this.raise(E.UnexpectedTypeParameterBeforeAsyncArrowFunction,p),h.node;d=h.node}if((n=a)!=null&&n.node)return this.state=a.failState,a.node;if(d)return this.state=h.failState,d;throw(o=a)!=null&&o.thrown?a.error:h.thrown?h.error:this.raise(E.UnexpectedTokenAfterTypeParameter,p)}return super.parseMaybeAssign(e,s)}parseArrow(e){if(this.match(14)){let s=this.tryParse(()=>{let i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let r=this.startNode();return[r.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=i,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),r});if(s.thrown)return null;s.error&&(this.state=s.failState),e.returnType=s.node.typeAnnotation?this.finishNode(s.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,s){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start))?e.params=s:super.setArrowFunctionParameters(e,s)}checkParams(e,s,i,r=!0){if(!(i&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start)))){for(let a=0;a<e.params.length;a++)this.isThisParam(e.params[a])&&a>0&&this.raise(E.ThisParamMustBeFirst,e.params[a]);super.checkParams(e,s,i,r)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(e,s,i){if(e.type==="Identifier"&&e.name==="async"&&this.state.noArrowAt.includes(s.index)){this.next();let r=this.startNodeAt(s);r.callee=e,r.arguments=super.parseCallExpressionArguments(11),e=this.finishNode(r,"CallExpression")}else if(e.type==="Identifier"&&e.name==="async"&&this.match(47)){let r=this.state.clone(),a=this.tryParse((o)=>this.parseAsyncArrowWithTypeParameters(s)||o(),r);if(!a.error&&!a.aborted)return a.node;let n=this.tryParse(()=>super.parseSubscripts(e,s,i),r);if(n.node&&!n.error)return n.node;if(a.node)return this.state=a.failState,a.node;if(n.node)return this.state=n.failState,n.node;throw a.error||n.error}return super.parseSubscripts(e,s,i)}parseSubscript(e,s,i,r){if(this.match(18)&&this.isLookaheadToken_lt()){if(r.optionalChainMember=!0,i)return r.stop=!0,e;this.next();let a=this.startNodeAt(s);return a.callee=e,a.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),a.arguments=this.parseCallExpressionArguments(11),a.optional=!0,this.finishCallExpression(a,!0)}else if(!i&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){let a=this.startNodeAt(s);a.callee=e;let n=this.tryParse(()=>(a.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),a.arguments=super.parseCallExpressionArguments(11),r.optionalChainMember&&(a.optional=!1),this.finishCallExpression(a,r.optionalChainMember)));if(n.node)return n.error&&(this.state=n.failState),n.node}return super.parseSubscript(e,s,i,r)}parseNewCallee(e){super.parseNewCallee(e);let s=null;this.shouldParseTypes()&&this.match(47)&&(s=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),e.typeArguments=s}parseAsyncArrowWithTypeParameters(e){let s=this.startNodeAt(e);if(this.parseFunctionParams(s,!1),!!this.parseArrow(s))return super.parseArrowExpression(s,void 0,!0)}readToken_mult_modulo(e){let s=this.input.charCodeAt(this.state.pos+1);if(e===42&&s===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(e)}readToken_pipe_amp(e){let s=this.input.charCodeAt(this.state.pos+1);if(e===124&&s===125){this.finishOp(9,2);return}super.readToken_pipe_amp(e)}parseTopLevel(e,s){let i=super.parseTopLevel(e,s);return this.state.hasFlowComment&&this.raise(E.UnterminatedFlowComment,this.state.curPosition()),i}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(E.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:e}=this.state,s=2;for(;[32,9].includes(this.input.charCodeAt(e+s));)s++;let i=this.input.charCodeAt(s+e),r=this.input.charCodeAt(s+e+1);return i===58&&r===58?s+2:this.input.slice(s+e,s+e+12)==="flow-include"?s+12:i===58&&r!==58?s:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(c.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:s,memberName:i}){this.raise(E.EnumBooleanMemberNotInitialized,e,{memberName:i,enumName:s})}flowEnumErrorInvalidMemberInitializer(e,s){return this.raise(s.explicitType?s.explicitType==="symbol"?E.EnumInvalidMemberInitializerSymbolType:E.EnumInvalidMemberInitializerPrimaryType:E.EnumInvalidMemberInitializerUnknownType,e,s)}flowEnumErrorNumberMemberNotInitialized(e,s){this.raise(E.EnumNumberMemberNotInitialized,e,s)}flowEnumErrorStringMemberInconsistentlyInitialized(e,s){this.raise(E.EnumStringMemberInconsistentlyInitialized,e,s)}flowEnumMemberInit(){let e=this.state.startLoc,s=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{let i=this.parseNumericLiteral(this.state.value);return s()?{type:"number",loc:i.loc.start,value:i}:{type:"invalid",loc:e}}case 134:{let i=this.parseStringLiteral(this.state.value);return s()?{type:"string",loc:i.loc.start,value:i}:{type:"invalid",loc:e}}case 85:case 86:{let i=this.parseBooleanLiteral(this.match(85));return s()?{type:"boolean",loc:i.loc.start,value:i}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){let e=this.state.startLoc,s=this.parseIdentifier(!0),i=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e};return{id:s,init:i}}flowEnumCheckExplicitTypeMismatch(e,s,i){let{explicitType:r}=s;r!==null&&r!==i&&this.flowEnumErrorInvalidMemberInitializer(e,s)}flowEnumMembers({enumName:e,explicitType:s}){let i=new Set,r={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},a=!1;for(;!this.match(8);){if(this.eat(21)){a=!0;break}let n=this.startNode(),{id:o,init:p}=this.flowEnumMemberRaw(),h=o.name;if(h==="")continue;/^[a-z]/.test(h)&&this.raise(E.EnumInvalidMemberName,o,{memberName:h,suggestion:h[0].toUpperCase()+h.slice(1),enumName:e}),i.has(h)&&this.raise(E.EnumDuplicateMemberName,o,{memberName:h,enumName:e}),i.add(h);let d={enumName:e,explicitType:s,memberName:h};switch(n.id=o,p.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(p.loc,d,"boolean"),n.init=p.value,r.booleanMembers.push(this.finishNode(n,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(p.loc,d,"number"),n.init=p.value,r.numberMembers.push(this.finishNode(n,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(p.loc,d,"string"),n.init=p.value,r.stringMembers.push(this.finishNode(n,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(p.loc,d);case"none":switch(s){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(p.loc,d);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(p.loc,d);break;default:r.defaultedMembers.push(this.finishNode(n,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:r,hasUnknownMembers:a}}flowEnumStringMembers(e,s,{enumName:i}){if(e.length===0)return s;if(s.length===0)return e;if(s.length>e.length){for(let r of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(r,{enumName:i});return s}else{for(let r of s)this.flowEnumErrorStringMemberInconsistentlyInitialized(r,{enumName:i});return e}}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(102))return null;if(!L(this.state.type))throw this.raise(E.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:e});let{value:s}=this.state;return this.next(),s!=="boolean"&&s!=="number"&&s!=="string"&&s!=="symbol"&&this.raise(E.EnumInvalidExplicitType,this.state.startLoc,{enumName:e,invalidEnumType:s}),s}flowEnumBody(e,s){let i=s.name,r=s.loc.start,a=this.flowEnumParseExplicitType({enumName:i});this.expect(5);let{members:n,hasUnknownMembers:o}=this.flowEnumMembers({enumName:i,explicitType:a});switch(e.hasUnknownMembers=o,a){case"boolean":return e.explicitType=!0,e.members=n.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=n.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(n.stringMembers,n.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=n.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{let p=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;let h=n.booleanMembers.length,d=n.numberMembers.length,y=n.stringMembers.length,A=n.defaultedMembers.length;if(!h&&!d&&!y&&!A)return p();if(!h&&!d)return e.members=this.flowEnumStringMembers(n.stringMembers,n.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(e,"EnumStringBody");if(!d&&!y&&h>=A){for(let T of n.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(T.loc.start,{enumName:i,memberName:T.id.name});return e.members=n.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}else if(!h&&!y&&d>=A){for(let T of n.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(T.loc.start,{enumName:i,memberName:T.id.name});return e.members=n.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}else return this.raise(E.EnumInconsistentMemberValues,r,{enumName:i}),p()}}}flowParseEnumDeclaration(e){let s=this.parseIdentifier();return e.id=s,e.body=this.flowEnumBody(this.startNode(),s),this.finishNode(e,"EnumDeclaration")}jsxParseOpeningElementAfterName(e){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(e.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(e)}isLookaheadToken_lt(){let e=this.nextTokenStart();if(this.input.charCodeAt(e)===60){let s=this.input.charCodeAt(e+1);return s!==60&&s!==61}return!1}reScan_lt_gt(){let{type:e}=this.state;e===47?(this.state.pos-=1,this.readToken_lt()):e===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:e}=this.state;return e===51?(this.state.pos-=2,this.finishOp(47,1),47):e}maybeUnwrapTypeCastExpression(e){return e.type==="TypeCastExpression"?e.expression:e}},Gs=/\r\n|[\r\n\u2028\u2029]/,Se=new RegExp(Gs.source,"g");function ne(t){switch(t){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function At(t,e,s){for(let i=e;i<s;i++)if(ne(t.charCodeAt(i)))return!0;return!1}var Je=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,We=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function Ys(t){switch(t){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var se=$`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:t})=>`Expected corresponding JSX closing tag for <${t}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:t,HTMLEntity:e})=>`Unexpected token \`${t}\`. Did you mean \`${e}\` or \`{'${t}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"});function Q(t){return t?t.type==="JSXOpeningFragment"||t.type==="JSXClosingFragment":!1}function oe(t){if(t.type==="JSXIdentifier")return t.name;if(t.type==="JSXNamespacedName")return t.namespace.name+":"+t.name.name;if(t.type==="JSXMemberExpression")return oe(t.object)+"."+oe(t.property);throw Error("Node had unexpected type: "+t.type)}var Qs=(t)=>class extends t{jsxReadToken(){let e="",s=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(se.UnterminatedJsxContent,this.state.startLoc);let i=this.input.charCodeAt(this.state.pos);switch(i){case 60:case 123:if(this.state.pos===this.state.start){i===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(i);return}e+=this.input.slice(s,this.state.pos),this.finishToken(142,e);return;case 38:e+=this.input.slice(s,this.state.pos),e+=this.jsxReadEntity(),s=this.state.pos;break;case 62:case 125:default:ne(i)?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadNewLine(!0),s=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){let s=this.input.charCodeAt(this.state.pos),i;return++this.state.pos,s===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,i=e?`
5
5
  `:`\r
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Af as l}from"./chunk-8ywdddts.js";import"./chunk-zfnbk5gy.js";import{vg as q}from"./chunk-ebabnv33.js";import"./chunk-nfg7nt13.js";import"./chunk-yj6rbe9p.js";import{kQ as C}from"./chunk-4sazy0nq.js";function J(){return async(f,b)=>{if("_zod"in f)return l()(f,{components:b.components,options:{io:"input",...b.options}});try{let{createSchema:w}=await import("./chunk-swcgsrbj.js"),{schema:B,components:k}=w(f,{schemaType:"input",...b.options});if(k)b.components.schemas={...b.components.schemas,...k};return B}catch{throw Error(q('Missing dependencies "zod-openapi v4".'))}}}export{J as default};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{if as BX}from"./chunk-08f4khsw.js";import{$q as i,Eq as r,Iq as gQ,Jq as cQ,Oq as AQ,Pq as zQ,Rq as O,Uq as f,ar as l,er as u,fr as yQ,gr as _,hr as qQ,ir as MQ,jr as s,nr as EQ,oq as p,qq as mQ,uq as UQ,vq as ZQ}from"./chunk-z8gdmvgg.js";import{Ar as uQ,Cr as YQ,pr as QQ}from"./chunk-kwx9ewe0.js";import"./chunk-cqtkxwd8.js";import"./chunk-c5pb87yf.js";import{pv as Q}from"./chunk-gmzrvxnv.js";import"./chunk-mpygdb5a.js";import{_P as wX}from"./chunk-3k2b05fv.js";var dQ=wX(BX(),1);function wQ(X){var Y,L,Z,K;if(X==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let U=(Y=X.promptTokenCount)!=null?Y:0,R=(L=X.candidatesTokenCount)!=null?L:0,N=(Z=X.cachedContentTokenCount)!=null?Z:0,z=(K=X.thoughtsTokenCount)!=null?K:0;return{inputTokens:{total:U,noCache:U-N,cacheRead:N,cacheWrite:void 0},outputTokens:{total:R+z,text:R,reasoning:z},raw:X}}function g(X,Y=!0){if(X==null)return;if(iQ(X)){if(Y)return;if(typeof X==="object"&&X.description)return{type:"object",description:X.description};return{type:"object"}}if(typeof X==="boolean")return{type:"boolean",properties:{}};let{type:L,description:Z,required:K,properties:U,items:R,allOf:N,anyOf:z,oneOf:D,format:A,const:V,minLength:W,enum:B}=X,E={};if(Z)E.description=Z;if(K)E.required=K;if(A)E.format=A;if(V!==void 0)E.enum=[V];if(L)if(Array.isArray(L)){let J=L.includes("null"),j=L.filter((w)=>w!=="null");if(j.length===0)E.type="null";else if(E.anyOf=j.map((w)=>({type:w})),J)E.nullable=!0}else E.type=L;if(B!==void 0)E.enum=B;if(U!=null)E.properties=Object.entries(U).reduce((J,[j,w])=>{return J[j]=g(w,!1),J},{});if(R)E.items=Array.isArray(R)?R.map((J)=>g(J,!1)):g(R,!1);if(N)E.allOf=N.map((J)=>g(J,!1));if(z)if(z.some((J)=>typeof J==="object"&&(J==null?void 0:J.type)==="null")){let J=z.filter((j)=>!(typeof j==="object"&&(j==null?void 0:j.type)==="null"));if(J.length===1){let j=g(J[0],!1);if(typeof j==="object")E.nullable=!0,Object.assign(E,j)}else E.anyOf=J.map((j)=>g(j,!1)),E.nullable=!0}else E.anyOf=z.map((J)=>g(J,!1));if(D)E.oneOf=D.map((J)=>g(J,!1));if(W!==void 0)E.minLength=W;return E}function iQ(X){return X!=null&&typeof X==="object"&&X.type==="object"&&(X.properties==null||Object.keys(X.properties).length===0)&&!X.additionalProperties}var lQ=/^data:([^;,]+);base64,(.+)$/s;function sQ(X){let Y=lQ.exec(X);if(Y==null)return;return{mediaType:Y[1],data:Y[2]}}function nQ(X){let Y=sQ(X);if(Y==null)return;return{inlineData:{mimeType:Y.mediaType,data:Y.data}}}function aQ(X,Y,L){let Z=[],K=[];for(let U of L)switch(U.type){case"text":{K.push(U.text);break}case"image-data":case"file-data":{Z.push({inlineData:{mimeType:U.mediaType,data:U.data}});break}case"image-url":case"file-url":{let R=nQ(U.url);if(R!=null)Z.push(R);else K.push(JSON.stringify(U));break}default:{K.push(JSON.stringify(U));break}}X.push({functionResponse:{name:Y,response:{name:Y,content:K.length>0?K.join(`
2
+ import{gf as BX}from"./chunk-snt1kefv.js";import{Aq as ZQ,Jq as r,Nq as gQ,Oq as cQ,Tq as AQ,Uq as zQ,Wq as O,Zq as f,er as i,fr as l,jr as u,kr as yQ,lr as _,mr as qQ,nr as MQ,or as s,sr as EQ,tq as p,vq as mQ,zq as UQ}from"./chunk-gwfx7tx7.js";import{Fr as uQ,Hr as YQ,ur as QQ}from"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import{xv as Q}from"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import{gQ as wX}from"./chunk-4sazy0nq.js";var dQ=wX(BX(),1);function wQ(X){var Y,L,Z,K;if(X==null)return{inputTokens:{total:void 0,noCache:void 0,cacheRead:void 0,cacheWrite:void 0},outputTokens:{total:void 0,text:void 0,reasoning:void 0},raw:void 0};let U=(Y=X.promptTokenCount)!=null?Y:0,R=(L=X.candidatesTokenCount)!=null?L:0,N=(Z=X.cachedContentTokenCount)!=null?Z:0,z=(K=X.thoughtsTokenCount)!=null?K:0;return{inputTokens:{total:U,noCache:U-N,cacheRead:N,cacheWrite:void 0},outputTokens:{total:R+z,text:R,reasoning:z},raw:X}}function g(X,Y=!0){if(X==null)return;if(iQ(X)){if(Y)return;if(typeof X==="object"&&X.description)return{type:"object",description:X.description};return{type:"object"}}if(typeof X==="boolean")return{type:"boolean",properties:{}};let{type:L,description:Z,required:K,properties:U,items:R,allOf:N,anyOf:z,oneOf:D,format:A,const:V,minLength:W,enum:B}=X,E={};if(Z)E.description=Z;if(K)E.required=K;if(A)E.format=A;if(V!==void 0)E.enum=[V];if(L)if(Array.isArray(L)){let J=L.includes("null"),j=L.filter((w)=>w!=="null");if(j.length===0)E.type="null";else if(E.anyOf=j.map((w)=>({type:w})),J)E.nullable=!0}else E.type=L;if(B!==void 0)E.enum=B;if(U!=null)E.properties=Object.entries(U).reduce((J,[j,w])=>{return J[j]=g(w,!1),J},{});if(R)E.items=Array.isArray(R)?R.map((J)=>g(J,!1)):g(R,!1);if(N)E.allOf=N.map((J)=>g(J,!1));if(z)if(z.some((J)=>typeof J==="object"&&(J==null?void 0:J.type)==="null")){let J=z.filter((j)=>!(typeof j==="object"&&(j==null?void 0:j.type)==="null"));if(J.length===1){let j=g(J[0],!1);if(typeof j==="object")E.nullable=!0,Object.assign(E,j)}else E.anyOf=J.map((j)=>g(j,!1)),E.nullable=!0}else E.anyOf=z.map((J)=>g(J,!1));if(D)E.oneOf=D.map((J)=>g(J,!1));if(W!==void 0)E.minLength=W;return E}function iQ(X){return X!=null&&typeof X==="object"&&X.type==="object"&&(X.properties==null||Object.keys(X.properties).length===0)&&!X.additionalProperties}var lQ=/^data:([^;,]+);base64,(.+)$/s;function sQ(X){let Y=lQ.exec(X);if(Y==null)return;return{mediaType:Y[1],data:Y[2]}}function nQ(X){let Y=sQ(X);if(Y==null)return;return{inlineData:{mimeType:Y.mediaType,data:Y.data}}}function aQ(X,Y,L){let Z=[],K=[];for(let U of L)switch(U.type){case"text":{K.push(U.text);break}case"image-data":case"file-data":{Z.push({inlineData:{mimeType:U.mediaType,data:U.data}});break}case"image-url":case"file-url":{let R=nQ(U.url);if(R!=null)Z.push(R);else K.push(JSON.stringify(U));break}default:{K.push(JSON.stringify(U));break}}X.push({functionResponse:{name:Y,response:{name:Y,content:K.length>0?K.join(`
3
3
  `):"Tool executed successfully."},...Z.length>0?{parts:Z}:{}}})}function rQ(X,Y,L){for(let Z of L)switch(Z.type){case"text":X.push({functionResponse:{name:Y,response:{name:Y,content:Z.text}}});break;case"image-data":X.push({inlineData:{mimeType:String(Z.mediaType),data:String(Z.data)}},{text:"Tool executed successfully and returned this image as a response"});break;default:X.push({text:JSON.stringify(Z)});break}}function tQ(X,Y){var L,Z,K,U,R,N,z,D;let A=[],V=[],W=!0,B=(L=Y==null?void 0:Y.isGemmaModel)!=null?L:!1,E=(Z=Y==null?void 0:Y.providerOptionsName)!=null?Z:"google",J=(K=Y==null?void 0:Y.supportsFunctionResponseParts)!=null?K:!0;for(let{role:j,content:w}of X)switch(j){case"system":{if(!W)throw new YQ({functionality:"system messages are only supported at the beginning of the conversation"});A.push({text:w});break}case"user":{W=!1;let q=[];for(let F of w)switch(F.type){case"text":{q.push({text:F.text});break}case"file":{let b=F.mediaType==="image/*"?"image/jpeg":F.mediaType;q.push(F.data instanceof URL?{fileData:{mimeType:b,fileUri:F.data.toString()}}:{inlineData:{mimeType:b,data:ZQ(F.data)}});break}}V.push({role:"user",parts:q});break}case"assistant":{W=!1,V.push({role:"model",parts:w.map((q)=>{var F,b,S,y;let $=(y=(F=q.providerOptions)==null?void 0:F[E])!=null?y:E!=="google"?(b=q.providerOptions)==null?void 0:b.google:(S=q.providerOptions)==null?void 0:S.vertex,P=($==null?void 0:$.thoughtSignature)!=null?String($.thoughtSignature):void 0;switch(q.type){case"text":return q.text.length===0?void 0:{text:q.text,thoughtSignature:P};case"reasoning":return q.text.length===0?void 0:{text:q.text,thought:!0,thoughtSignature:P};case"file":{if(q.data instanceof URL)throw new YQ({functionality:"File data URLs in assistant messages are not supported"});return{inlineData:{mimeType:q.mediaType,data:ZQ(q.data)},...($==null?void 0:$.thought)===!0?{thought:!0}:{},thoughtSignature:P}}case"tool-call":{let x=($==null?void 0:$.serverToolCallId)!=null?String($.serverToolCallId):void 0,k=($==null?void 0:$.serverToolType)!=null?String($.serverToolType):void 0;if(x&&k)return{toolCall:{toolType:k,args:typeof q.input==="string"?JSON.parse(q.input):q.input,id:x},thoughtSignature:P};return{functionCall:{name:q.toolName,args:q.input},thoughtSignature:P}}case"tool-result":{let x=($==null?void 0:$.serverToolCallId)!=null?String($.serverToolCallId):void 0,k=($==null?void 0:$.serverToolType)!=null?String($.serverToolType):void 0;if(x&&k)return{toolResponse:{toolType:k,response:q.output.type==="json"?q.output.value:{},id:x},thoughtSignature:P};return}}}).filter((q)=>q!==void 0)});break}case"tool":{W=!1;let q=[];for(let F of w){if(F.type==="tool-approval-response")continue;let b=(z=(U=F.providerOptions)==null?void 0:U[E])!=null?z:E!=="google"?(R=F.providerOptions)==null?void 0:R.google:(N=F.providerOptions)==null?void 0:N.vertex,S=(b==null?void 0:b.serverToolCallId)!=null?String(b.serverToolCallId):void 0,y=(b==null?void 0:b.serverToolType)!=null?String(b.serverToolType):void 0;if(S&&y){let P=(b==null?void 0:b.thoughtSignature)!=null?String(b.thoughtSignature):void 0;if(V.length>0){let x=V[V.length-1];if(x.role==="model"){x.parts.push({toolResponse:{toolType:y,response:F.output.type==="json"?F.output.value:{},id:S},thoughtSignature:P});continue}}}let $=F.output;if($.type==="content")if(J)aQ(q,F.toolName,$.value);else rQ(q,F.toolName,$.value);else q.push({functionResponse:{name:F.toolName,response:{name:F.toolName,content:$.type==="execution-denied"?(D=$.reason)!=null?D:"Tool execution denied.":$.value}}})}V.push({role:"user",parts:q});break}}if(B&&A.length>0&&V.length>0&&V[0].role==="user"){let j=A.map((w)=>w.text).join(`
4
4
 
5
5
  `);V[0].parts.unshift({text:j+`
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Wd as a}from"./chunk-gg7bg3ek.js";import"./chunk-t01bhw5h.js";import"./chunk-8yr682pv.js";import"./chunk-v3x5nrc4.js";import"./chunk-4sazy0nq.js";export{a as fromIni};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{fk as s,kk as e,lk as j,mk as v,yk as u,zk as f}from"./chunk-e74efvj2.js";import{Ul as r,Vl as C,Wl as k,Xl as m,bm as D,fm as b,gm as a,hm as t}from"./chunk-a1hzeejj.js";import{An as x,Bn as q,Dn as n,En as o,Gn as K,In as c,Pn as i}from"./chunk-nj4d554m.js";import{nu as O_,xu as Q_}from"./chunk-tns5x4w0.js";import{Mu as d,Ru as g}from"./chunk-e7v9trve.js";import{aQ as S_}from"./chunk-3k2b05fv.js";var l={};S_(l,{run:()=>h_,encodeDir:()=>k_,ClaudeImport:()=>l});import E_ from"path";import W_ from"path";import{access as X_,readFile as Y_}from"fs/promises";var G=n("external_import",{source:q().$type().notNull(),source_key:q().notNull(),session_id:q().$type().notNull(),source_path:q().notNull(),source_mtime:x().notNull(),time_imported:x().notNull(),message_ids:q({mode:"json"}).$type()},(N)=>[o({columns:[N.source,N.source_key]})]);function Z_(){return{scanned:0,imported:0,resynced:0,skipped:0,errors:[]}}async function L_(N){if(!N||!await g.exists(N))return{id:b.global,worktree:N||"/",vcs:null};if(!await a(N))return{id:b.global,worktree:N,vcs:null};return{id:await t(N),worktree:N,vcs:"git"}}function __(N){return N.split(`
2
+ import{$j as e,Wj as s,ak as j,bk as v,nk as u,ok as f}from"./chunk-rtdym35y.js";import{Jl as r,Kl as C,Ll as k,Ml as m,Sl as D,Wl as b,Xl as a,Yl as t}from"./chunk-sp8ek94w.js";import{En as i,pn as x,qn as q,sn as n,tn as o,vn as K,xn as c}from"./chunk-1bx2sjn6.js";import{Ku as Q_}from"./chunk-kmtfdky8.js";import{Qu as d,Vu as g,_u as O_}from"./chunk-vc4e6xc4.js";import{iQ as S_}from"./chunk-4sazy0nq.js";var l={};S_(l,{run:()=>h_,encodeDir:()=>k_,ClaudeImport:()=>l});import E_ from"path";import W_ from"path";import{access as X_,readFile as Y_}from"fs/promises";var G=n("external_import",{source:q().$type().notNull(),source_key:q().notNull(),session_id:q().$type().notNull(),source_path:q().notNull(),source_mtime:x().notNull(),time_imported:x().notNull(),message_ids:q({mode:"json"}).$type()},(N)=>[o({columns:[N.source,N.source_key]})]);function Z_(){return{scanned:0,imported:0,resynced:0,skipped:0,errors:[]}}async function L_(N){if(!N||!await g.exists(N))return{id:b.global,worktree:N||"/",vcs:null};if(!await a(N))return{id:b.global,worktree:N,vcs:null};return{id:await t(N),worktree:N,vcs:"git"}}function __(N){return N.split(`
3
3
  `).map((_)=>_.trim()).filter(Boolean).flatMap((_)=>{try{return[JSON.parse(_)]}catch{return[]}})}function N_(N){let _=N.find((H)=>H.trim()&&!H.trim().startsWith("<"));if(!_)return;return _.trim().replace(/\s+/g," ").slice(0,100)}function R_(N,_){return D.use((H)=>H.select().from(G).where(c(K(G.source,N),K(G.source_key,_))).get())}function G_(N,_){if(!_)return{existing:void 0,existingUpdated:void 0};let H=_,O=D.use((Z)=>Z.select({updated:C.time_updated}).from(C).where(K(C.id,H.session_id)).get());if(!O)return D.use((Z)=>Z.delete(G).where(c(K(G.source,N),K(G.source_key,H.source_key))).run()),{existing:void 0,existingUpdated:void 0};return{existing:_,existingUpdated:O.updated}}function J_(N,_,H,O){N.insert(r).values({id:_.id,worktree:_.worktree,vcs:_.vcs,sandboxes:[],time_created:H,time_updated:O}).onConflictDoNothing().run()}function K_(N,_,H){if(_.message_ids?.length)for(let O=0;O<_.message_ids.length;O+=500)N.delete(k).where(i(k.id,_.message_ids.slice(O,O+500))).run();else N.delete(k).where(K(k.session_id,H)).run()}function A_(N,_,H){N.update(C).set({project_id:H.projectId,directory:H.directory,version:H.version,time_updated:Math.max(H.existingUpdated??0,H.timeUpdated)}).where(K(C.id,_)).run()}function $_(N){return async(_)=>F_({...N,force:_?.force})}async function F_(N){let _=Z_();if(!await X_(N.root).then(()=>!0).catch(()=>!1))return _;let H=await d.scan(N.pattern,{cwd:N.root,absolute:!0});for(let O of H){_.scanned++;try{let Z=W_.basename(O,".jsonl"),A=await g.statAsync(O);if(!A){_.skipped++;continue}let F=Math.floor(Number(A.mtimeMs)),Y=R_(N.source,Z);if(Y&&Y.source_mtime===F&&!N.force){_.skipped++;continue}let S=G_(N.source,Y);Y=S.existing;let T=S.existingUpdated,Q=Y?Y.session_id:e.descending(),V=N.parse(await Y_(O,"utf-8"),Q);if(!V||V.messages.length===0){_.skipped++;continue}let E=await L_(V.cwd),U=Date.now(),X=V.messages.map(($)=>$.info.id);if(D.transaction(($)=>{if(J_($,E,V.timeCreated,V.timeUpdated),Y)K_($,Y,Q),A_($,Q,{projectId:E.id,directory:V.cwd,version:V.version,existingUpdated:T,timeUpdated:V.timeUpdated});else $.insert(C).values({id:Q,project_id:E.id,slug:s.create(),directory:V.cwd,title:V.title,version:V.version,time_created:V.timeCreated,time_updated:V.timeUpdated}).run();for(let L of V.messages){let{id:B,sessionID:I,agentID:w,...z}=L.info;$.insert(k).values({id:B,session_id:Q,agent_id:"main",time_created:L.info.time.created,data:z}).onConflictDoUpdate({target:k.id,set:{data:z}}).run();for(let J of L.parts){let{id:y,sessionID:p,messageID:P,...h}=J.part;$.insert(m).values({id:y,message_id:L.info.id,session_id:Q,time_created:J.time,data:h}).onConflictDoUpdate({target:m.id,set:{data:h}}).run()}}$.insert(G).values({source:N.source,source_key:Z,session_id:Q,source_path:O,source_mtime:F,time_imported:U,message_ids:X}).onConflictDoUpdate({target:[G.source,G.source_key],set:{session_id:Q,source_path:O,source_mtime:F,time_imported:U,message_ids:X}}).run()}),Y)_.resynced++;else _.imported++}catch(Z){_.errors.push(`${O}: ${Z}`)}}if(_.imported+_.resynced>0||_.errors.length>0)N.log.info(N.logMessage,{..._,errors:_.errors.length});return _}var B_=Q_.create({service:"claude-import"});function k_(N){return N.replace(/[^a-zA-Z0-9]/g,"-")}function z_(N){if(!N)return{providerID:u.anthropic,modelID:f.make("unknown")};let _=N.indexOf("/");if(_===-1)return{providerID:u.anthropic,modelID:f.make(N)};return{providerID:u.make(N.slice(0,_)),modelID:f.make(N.slice(_+1))}}function H_(N){let _=N??{};return{input:_.input_tokens??0,output:_.output_tokens??0,reasoning:0,cache:{read:_.cache_read_input_tokens??0,write:_.cache_creation_input_tokens??0}}}function C_(N){if(typeof N==="string")return N;if(Array.isArray(N))return N.map((_)=>_&&typeof _==="object"&&("type"in _)&&_.type==="text"?_.text:JSON.stringify(_)).join(`
4
4
  `);return N==null?"":JSON.stringify(N)}function U_(N,_){let H=__(N);if(H.length===0)return;let O,Z,A,F=0,Y,S=[],T=new Map,Q=null,V=null,E=z_(void 0),U=()=>{if(Q)S.push(Q);Q=null};for(let X of H){if(X.type!=="user"&&X.type!=="assistant")continue;let $=X.timestamp?Date.parse(X.timestamp):Date.now();if(!O&&X.cwd)O=X.cwd;if(!Z&&X.version)Z=X.version;if(A===void 0)A=$;F=Math.max(F,$);let L=X.message;if(!L)continue;if(X.type==="user"){let z=L.content,J=typeof z==="string"?[]:Array.isArray(z)?z:[];for(let W of J.filter((R)=>R?.type==="tool_result")){let R=T.get(W.tool_use_id);if(!R)continue;let M=C_(W.content);R.part.state=W.is_error?{status:"error",input:R.part.state.input??{},error:M,time:{start:R.start,end:$}}:{status:"completed",input:R.part.state.input??{},output:M,title:R.part.tool,metadata:{},time:{start:R.start,end:$}}}let y=typeof z==="string"?z.trim()?[z]:[]:J.filter((W)=>W?.type==="text"&&typeof W.text==="string"&&W.text.trim()).map((W)=>W.text),p=J.filter((W)=>W?.type==="image"&&W.source);if(y.length===0&&p.length===0)continue;U();let P=j.ascending(),h=[];for(let W of y)h.push({part:{id:v.ascending(),sessionID:_,messageID:P,type:"text",text:W},time:$});for(let W of p){let R=W.source.media_type??"image/png",M=W.source.type==="base64"?`data:${R};base64,${W.source.data}`:W.source.url??"";if(M)h.push({part:{id:v.ascending(),sessionID:_,messageID:P,type:"file",mime:R,url:M},time:$})}let V_={id:P,sessionID:_,role:"user",agent:"main",time:{created:$},model:{providerID:E.providerID,modelID:E.modelID}};if(S.push({info:V_,parts:h}),V=P,!Y)Y=N_(y);continue}let B=z_(L.model);if(E=B,!V){let z=j.ascending();S.push({info:{id:z,sessionID:_,role:"user",agent:"main",time:{created:$},model:{providerID:B.providerID,modelID:B.modelID}},parts:[]}),V=z}if(!Q||Q.info.role!=="assistant"||Q.info.parentID!==V)U(),Q={info:{id:j.ascending(),sessionID:_,role:"assistant",time:{created:$,completed:$},parentID:V,modelID:B.modelID,providerID:B.providerID,mode:"build",agent:"main",path:{cwd:O??X.cwd??"",root:O??X.cwd??""},cost:0,tokens:H_(L.usage)},parts:[]};let I=Q.info;I.time.completed=$,I.tokens=H_(L.usage);let w=Q.info.id;for(let z of Array.isArray(L.content)?L.content:[])if(z?.type==="thinking"||z?.type==="reasoning")Q.parts.push({part:{id:v.ascending(),sessionID:_,messageID:w,type:"reasoning",text:z.thinking??z.text??"",time:{start:$,end:$}},time:$});else if(z?.type==="text"&&typeof z.text==="string")Q.parts.push({part:{id:v.ascending(),sessionID:_,messageID:w,type:"text",text:z.text},time:$});else if(z?.type==="tool_use"){let J={id:v.ascending(),sessionID:_,messageID:w,type:"tool",callID:z.id,tool:z.name,state:{status:"pending",input:z.input??{},raw:JSON.stringify(z.input??{})}};Q.parts.push({part:J,time:$}),T.set(z.id,{part:J,start:$})}}return U(),{cwd:O??"",version:Z??"claude-code",title:Y??"Claude Code session",timeCreated:A??Date.now(),timeUpdated:F||A||Date.now(),messages:S}}var h_=$_({source:"cc",root:E_.join(O_.Path.home,".claude","projects"),pattern:"*/*.jsonl",log:B_,logMessage:"claude import",parse:U_});
5
- export{G as bg,Z_ as cg,L_ as dg,__ as eg,N_ as fg,R_ as gg,G_ as hg,J_ as ig,K_ as jg,A_ as kg,$_ as lg,k_ as mg,h_ as ng,l as og};
5
+ export{G as _f,Z_ as $f,L_ as ag,__ as bg,N_ as cg,R_ as dg,G_ as eg,J_ as fg,K_ as gg,A_ as hg,$_ as ig,k_ as jg,h_ as kg,l as lg};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-4sazy0nq.js";var q="./tree-sitter-powershell-ryb2ffqs.wasm";export{q as default};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{fl as e}from"./chunk-e74efvj2.js";import{fm as r}from"./chunk-a1hzeejj.js";import{Tu as o}from"./chunk-m4j7jyrd.js";var s=o.object({id:e.zod,type:o.string(),name:o.string(),branch:o.string().nullable(),directory:o.string().nullable(),extra:o.unknown().nullable(),projectID:r.zod});
3
- export{s as Kg};
2
+ import{Wk as e}from"./chunk-rtdym35y.js";import{Wl as r}from"./chunk-sp8ek94w.js";import{$u as o}from"./chunk-hnz570f9.js";var s=o.object({id:e.zod,type:o.string(),name:o.string(),branch:o.string().nullable(),directory:o.string().nullable(),extra:o.unknown().nullable(),projectID:r.zod});
3
+ export{s as zg};