@qitqode/qitqode-android-arm64 0.1.26 → 0.1.27

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 (418) hide show
  1. package/bundle/chunk-02y04bsz.js +2 -0
  2. package/bundle/{chunk-x3z8q0ep.js → chunk-04tw0r4s.js} +1 -1
  3. package/bundle/chunk-07ws99b1.js +2 -0
  4. package/bundle/chunk-09c4ngag.js +2 -0
  5. package/bundle/{chunk-se195e52.js → chunk-09kba1hg.js} +2 -2
  6. package/bundle/{chunk-pfn1db1m.js → chunk-0a0vat1h.js} +2 -2
  7. package/bundle/{chunk-txty44v2.js → chunk-0eqwm9a8.js} +2 -2
  8. package/bundle/chunk-0jgst767.js +2 -0
  9. package/bundle/chunk-0psrr9vp.js +2 -0
  10. package/bundle/chunk-0srrmwqs.js +2 -0
  11. package/bundle/{chunk-eq33vmze.js → chunk-0x3sbyny.js} +2 -2
  12. package/bundle/chunk-0zkejr6k.js +2 -0
  13. package/bundle/{chunk-z2q3mg73.js → chunk-12bssxd4.js} +2 -2
  14. package/bundle/chunk-14n6rvh2.js +2 -0
  15. package/bundle/{chunk-1qbm1k9y.js → chunk-17psxhve.js} +3 -3
  16. package/bundle/{chunk-hz1hd1bd.js → chunk-1bhvt33f.js} +1 -1
  17. package/bundle/{chunk-49tqzsy0.js → chunk-1dwcga8g.js} +2 -2
  18. package/bundle/{chunk-9qtf8khv.js → chunk-1fbeendk.js} +1 -1
  19. package/bundle/chunk-1fja3j80.js +2 -0
  20. package/bundle/chunk-1j73cnvz.js +2 -0
  21. package/bundle/{chunk-eqaym8gm.js → chunk-1qshjfzm.js} +1 -1
  22. package/bundle/{chunk-d31yrcrn.js → chunk-1rp1cvmc.js} +2 -2
  23. package/bundle/{chunk-vx837ete.js → chunk-1sgby720.js} +1 -1
  24. package/bundle/{chunk-wefjbwv6.js → chunk-1t9jne14.js} +1 -1
  25. package/bundle/chunk-1yddn03z.js +2 -0
  26. package/bundle/{chunk-qngs31yf.js → chunk-26nfphsg.js} +1 -1
  27. package/bundle/{chunk-kkdgzeva.js → chunk-27yxgy03.js} +2 -2
  28. package/bundle/{chunk-b79k456s.js → chunk-2ahqhh4z.js} +1 -1
  29. package/bundle/{chunk-fx7w497c.js → chunk-2bn4b42t.js} +1 -1
  30. package/bundle/{chunk-4k70wrhf.js → chunk-2dzk5txw.js} +1 -1
  31. package/bundle/{chunk-56qm8xpt.js → chunk-2jmxt3fb.js} +1 -1
  32. package/bundle/{chunk-r1yqmd4y.js → chunk-2km50rd3.js} +1 -1
  33. package/bundle/{chunk-j87bvp1b.js → chunk-2q96x1t5.js} +1 -1
  34. package/bundle/{chunk-77e1wh0j.js → chunk-2rs39vj2.js} +2 -2
  35. package/bundle/{chunk-qb5qemtp.js → chunk-2tnarng3.js} +1 -1
  36. package/bundle/{chunk-cr06m77n.js → chunk-2vepzgek.js} +2 -2
  37. package/bundle/{chunk-s86fj82v.js → chunk-2wcv3sq5.js} +2 -2
  38. package/bundle/{chunk-k7h6tfzj.js → chunk-371r2111.js} +1 -1
  39. package/bundle/{chunk-5jtd006j.js → chunk-37n34pzd.js} +2 -2
  40. package/bundle/chunk-38g8yzw0.js +2 -0
  41. package/bundle/chunk-3bkd0ar3.js +2 -0
  42. package/bundle/{chunk-6nkcfncg.js → chunk-3bmzjznz.js} +1 -1
  43. package/bundle/chunk-3c7d3dqt.js +3 -0
  44. package/bundle/{chunk-7n2kpqh5.js → chunk-3nwve06r.js} +1 -1
  45. package/bundle/{chunk-ptf09vmp.js → chunk-3nyqh1d6.js} +1 -1
  46. package/bundle/{chunk-7rxsj310.js → chunk-463f9wre.js} +2 -2
  47. package/bundle/{chunk-cyjzqa5p.js → chunk-47b084yv.js} +204 -202
  48. package/bundle/{chunk-6s2f5sv4.js → chunk-48fvrggx.js} +1 -1
  49. package/bundle/chunk-4amgp4yd.js +3 -0
  50. package/bundle/chunk-4k7kbhps.js +2 -0
  51. package/bundle/{chunk-f3c9667r.js → chunk-4qqkqrn9.js} +2 -2
  52. package/bundle/chunk-4sz3jbc5.js +2 -0
  53. package/bundle/{chunk-1n4w8dya.js → chunk-4tbwha3m.js} +2 -2
  54. package/bundle/{chunk-admgf65a.js → chunk-4ypcf4tg.js} +1 -1
  55. package/bundle/chunk-4z4p492c.js +3 -0
  56. package/bundle/chunk-55b9699f.js +2 -0
  57. package/bundle/{chunk-dv5zf5gz.js → chunk-5a5t01ka.js} +1 -1
  58. package/bundle/{chunk-880msfsd.js → chunk-5fgx6fa4.js} +1 -1
  59. package/bundle/{chunk-t1vtdgd6.js → chunk-5fz8tph5.js} +1 -1
  60. package/bundle/{chunk-e57d1he9.js → chunk-5qam3c8r.js} +1 -1
  61. package/bundle/{chunk-fffj9447.js → chunk-61c62e5s.js} +2 -2
  62. package/bundle/chunk-6d9wsjxm.js +2 -0
  63. package/bundle/{chunk-f6y7a5w3.js → chunk-6fp8a9ek.js} +2 -2
  64. package/bundle/chunk-6gz9cthq.js +2 -0
  65. package/bundle/{chunk-st74db4c.js → chunk-6hv59ere.js} +1 -1
  66. package/bundle/{chunk-56pwz1kk.js → chunk-6nbzdb0r.js} +1 -1
  67. package/bundle/{chunk-8ahpk8td.js → chunk-6p7yg5sr.js} +1 -1
  68. package/bundle/chunk-6q87abbr.js +2 -0
  69. package/bundle/{chunk-kfk1zqc1.js → chunk-6qy1ghrx.js} +1 -1
  70. package/bundle/chunk-730a2d1k.js +2 -0
  71. package/bundle/chunk-7bd0x9vf.js +2 -0
  72. package/bundle/chunk-7czkntef.js +2 -0
  73. package/bundle/chunk-7ex57nyh.js +2 -0
  74. package/bundle/chunk-7gpczxbh.js +2 -0
  75. package/bundle/chunk-7j0bgeh2.js +2 -0
  76. package/bundle/{chunk-w3pzv615.js → chunk-7jbz3dgt.js} +1 -1
  77. package/bundle/{chunk-0ndvy0nh.js → chunk-7ppd2phw.js} +2 -2
  78. package/bundle/chunk-7py443fe.js +2 -0
  79. package/bundle/{chunk-ykxde207.js → chunk-7yrhe3xq.js} +2 -2
  80. package/bundle/{chunk-3s0d17xe.js → chunk-89q1y7tc.js} +1 -1
  81. package/bundle/{chunk-9wm41z2f.js → chunk-89v6dgpp.js} +2 -2
  82. package/bundle/chunk-8cdm8gh2.js +2 -0
  83. package/bundle/chunk-90q5sae0.js +2 -0
  84. package/bundle/{chunk-ygwe0vf1.js → chunk-90zd5rss.js} +2 -2
  85. package/bundle/chunk-9grvepmd.js +2 -0
  86. package/bundle/chunk-9hrh15p2.js +2 -0
  87. package/bundle/{chunk-t7tstr83.js → chunk-9j1qqdr2.js} +1 -1
  88. package/bundle/{chunk-hkmb3zer.js → chunk-9t84mh6t.js} +2 -2
  89. package/bundle/{chunk-58gp7wbg.js → chunk-a1p2f16h.js} +2 -2
  90. package/bundle/{chunk-fk8cctjy.js → chunk-a1pw9r6f.js} +2 -2
  91. package/bundle/chunk-a2qz9m10.js +2 -0
  92. package/bundle/{chunk-0w5npkgr.js → chunk-ab6cabxh.js} +1 -1
  93. package/bundle/{chunk-jzcz92pq.js → chunk-ad46r434.js} +2 -2
  94. package/bundle/{chunk-qmhcbdkg.js → chunk-ak5ngp50.js} +2 -2
  95. package/bundle/{chunk-j7zs1yg2.js → chunk-apbgb4h0.js} +1 -1
  96. package/bundle/chunk-av6ezvxm.js +2 -0
  97. package/bundle/{chunk-s2za1y84.js → chunk-aztre27e.js} +1 -1
  98. package/bundle/{chunk-xdv9xt0y.js → chunk-b0syck9r.js} +2 -2
  99. package/bundle/{chunk-sdsggxm4.js → chunk-b2z0kjss.js} +2 -2
  100. package/bundle/{chunk-s1h0k1yj.js → chunk-b3dqcbsc.js} +1 -1
  101. package/bundle/{chunk-xdwej3ae.js → chunk-b75gpv0q.js} +1 -1
  102. package/bundle/chunk-b7mg883n.js +3 -0
  103. package/bundle/{chunk-ewvgbg68.js → chunk-b8tw709r.js} +1 -1
  104. package/bundle/{chunk-7fmy4cvn.js → chunk-b9za12y1.js} +1 -1
  105. package/bundle/{chunk-dazye86e.js → chunk-baet4zev.js} +2 -2
  106. package/bundle/{chunk-hybq019j.js → chunk-be216spx.js} +2 -2
  107. package/bundle/chunk-beksar7w.js +2 -0
  108. package/bundle/chunk-bg66rqrx.js +2 -0
  109. package/bundle/{chunk-cn10hn58.js → chunk-brpx707p.js} +1 -1
  110. package/bundle/{chunk-32zrch7h.js → chunk-bss414qz.js} +1 -1
  111. package/bundle/{chunk-vthm5q05.js → chunk-btneef3z.js} +1 -1
  112. package/bundle/{chunk-5mec6cde.js → chunk-btz9jvec.js} +1 -1
  113. package/bundle/{chunk-6nk3wx6f.js → chunk-bvkq0a5q.js} +1 -1
  114. package/bundle/{chunk-kn318ev4.js → chunk-c01z3cvg.js} +2 -2
  115. package/bundle/{chunk-4nck07pc.js → chunk-c0796v8j.js} +2 -2
  116. package/bundle/{chunk-z559gc3n.js → chunk-c5e6sk9c.js} +1 -1
  117. package/bundle/chunk-c7yy1km8.js +2 -0
  118. package/bundle/{chunk-453wpzg6.js → chunk-c8k32724.js} +1 -1
  119. package/bundle/{chunk-2q76qax6.js → chunk-cafzcmrg.js} +2 -2
  120. package/bundle/{chunk-g6dgc5af.js → chunk-cdhmc0t0.js} +1 -1
  121. package/bundle/{chunk-xc3fadkh.js → chunk-chmrvbbj.js} +1 -1
  122. package/bundle/{chunk-6vb26adv.js → chunk-cpmmvwgw.js} +1 -1
  123. package/bundle/{chunk-vpqd0t8a.js → chunk-crx18k6g.js} +2 -2
  124. package/bundle/{chunk-14ag9ea0.js → chunk-ct48575c.js} +1 -1
  125. package/bundle/chunk-ct6dv8st.js +2 -0
  126. package/bundle/{chunk-5ymj2q6j.js → chunk-cvdxgsq1.js} +2 -2
  127. package/bundle/{chunk-41ftye7w.js → chunk-cvwa142e.js} +1 -1
  128. package/bundle/chunk-cy9s1ma5.js +2 -0
  129. package/bundle/{chunk-fxb6vjcb.js → chunk-d5bxan80.js} +2 -2
  130. package/bundle/{chunk-p0k4sv89.js → chunk-d6r4xwtg.js} +4 -4
  131. package/bundle/{chunk-vyjsng14.js → chunk-deae0y1j.js} +1 -1
  132. package/bundle/{chunk-rf625fxx.js → chunk-dfnv7vkn.js} +1 -1
  133. package/bundle/{chunk-06x1p3t4.js → chunk-dhjp0zx2.js} +1 -1
  134. package/bundle/{chunk-xak2r993.js → chunk-dq9kpj4a.js} +2 -2
  135. package/bundle/{chunk-kp84yba1.js → chunk-dqed63ek.js} +1 -1
  136. package/bundle/{chunk-7tbvr236.js → chunk-drs1gv2b.js} +1 -1
  137. package/bundle/{chunk-xqxpjbqk.js → chunk-ds69qc8b.js} +1 -1
  138. package/bundle/chunk-dtv1vp0d.js +2 -0
  139. package/bundle/chunk-dvk2wwjj.js +2 -0
  140. package/bundle/{chunk-tyy4gx61.js → chunk-dzxzcb2e.js} +1 -1
  141. package/bundle/chunk-e0jy9qxd.js +2 -0
  142. package/bundle/{chunk-t6xm49ea.js → chunk-eb9mytjq.js} +1 -1
  143. package/bundle/{chunk-hjratj6g.js → chunk-ecn8gbtz.js} +1 -1
  144. package/bundle/chunk-erg0ske8.js +2 -0
  145. package/bundle/chunk-ew51rwdp.js +9 -0
  146. package/bundle/{chunk-3bb7y9pq.js → chunk-exh6cg1r.js} +2 -2
  147. package/bundle/{chunk-afhg3w2j.js → chunk-f45tp3e3.js} +1 -1
  148. package/bundle/chunk-f72pppr7.js +2 -0
  149. package/bundle/{chunk-fk3praj7.js → chunk-fddsgvjy.js} +1 -1
  150. package/bundle/{chunk-pnj8s20t.js → chunk-fff3151r.js} +1 -1
  151. package/bundle/{chunk-0mekr486.js → chunk-fkgv2hqd.js} +1 -1
  152. package/bundle/{chunk-zvsafnkp.js → chunk-fnbpap62.js} +2 -2
  153. package/bundle/{chunk-5yaahmjb.js → chunk-g1dwbvkg.js} +1 -1
  154. package/bundle/{chunk-1xkwm21b.js → chunk-g3dhsmbt.js} +3 -3
  155. package/bundle/{chunk-c0k8j498.js → chunk-g7rjtehn.js} +1 -1
  156. package/bundle/chunk-gbyy8sh5.js +2 -0
  157. package/bundle/{chunk-e58pdw5k.js → chunk-gf0pdgjs.js} +2 -2
  158. package/bundle/{chunk-0m2tj2h9.js → chunk-ggqst87g.js} +1 -1
  159. package/bundle/chunk-gk34kh8p.js +2 -0
  160. package/bundle/{chunk-1yx4jesj.js → chunk-gm85xefs.js} +1 -1
  161. package/bundle/chunk-gn50xqbd.js +2 -0
  162. package/bundle/{chunk-wmrq9qqf.js → chunk-gsez13bg.js} +1 -1
  163. package/bundle/{chunk-njzpswgt.js → chunk-gsvdt4kq.js} +7 -7
  164. package/bundle/{chunk-s54c8fpf.js → chunk-h0rpmne5.js} +1 -1
  165. package/bundle/chunk-h7s2w1e2.js +2 -0
  166. package/bundle/chunk-h7yya9pv.js +7610 -0
  167. package/bundle/{chunk-91khd3fq.js → chunk-h9pvnp5c.js} +1 -1
  168. package/bundle/chunk-hgxdg1y5.js +2 -0
  169. package/bundle/{chunk-07net7s8.js → chunk-hj5y7fvk.js} +1 -1
  170. package/bundle/chunk-hmv2cdnz.js +2 -0
  171. package/bundle/chunk-ht81ensf.js +2 -0
  172. package/bundle/chunk-j59ktwny.js +2 -0
  173. package/bundle/{chunk-3zn71txs.js → chunk-j5kb0y1m.js} +1 -1
  174. package/bundle/{chunk-6wdwwpsc.js → chunk-j5y10dn6.js} +2 -2
  175. package/bundle/{chunk-qpv4438m.js → chunk-j6emx6jn.js} +2 -2
  176. package/bundle/{chunk-x36jhtex.js → chunk-j8efst22.js} +1 -1
  177. package/bundle/{chunk-z3hj5bfd.js → chunk-j94bdaav.js} +2 -2
  178. package/bundle/{chunk-z4ae6jmb.js → chunk-j9pcnkkq.js} +3 -3
  179. package/bundle/{chunk-ppvmy940.js → chunk-jg7s9rqz.js} +2 -2
  180. package/bundle/chunk-jh3nw7fd.js +2 -0
  181. package/bundle/chunk-jh6yvzee.js +2 -0
  182. package/bundle/{chunk-y2ch07yv.js → chunk-jje0srjq.js} +2 -2
  183. package/bundle/{chunk-nxjbbq5h.js → chunk-jm1ptn8n.js} +1 -1
  184. package/bundle/chunk-jmz2mq3t.js +2 -0
  185. package/bundle/{chunk-2yb59jwr.js → chunk-jnabd9gn.js} +1 -1
  186. package/bundle/chunk-k309zez0.js +3 -0
  187. package/bundle/chunk-k3fn3yed.js +2 -0
  188. package/bundle/{chunk-wg42cxrw.js → chunk-k7gq9bra.js} +1 -1
  189. package/bundle/{chunk-n07rsssz.js → chunk-k9b1jcqw.js} +1 -1
  190. package/bundle/{chunk-qan3kwbv.js → chunk-kavhpdvb.js} +1 -1
  191. package/bundle/{chunk-qm9ezq93.js → chunk-kdcnder5.js} +1 -1
  192. package/bundle/{chunk-28vnspd4.js → chunk-kfsb2stm.js} +1 -1
  193. package/bundle/{chunk-kvz0vzsn.js → chunk-knpt9n8f.js} +1 -1
  194. package/bundle/chunk-kpw6nghv.js +2 -0
  195. package/bundle/{chunk-cbmw8fy2.js → chunk-kqn9h2gk.js} +1 -1
  196. package/bundle/{chunk-9zrwbxx0.js → chunk-ksyh6h3a.js} +2 -2
  197. package/bundle/{chunk-kbyk7hyn.js → chunk-m02zt1a3.js} +2 -2
  198. package/bundle/{chunk-yqtfvgrp.js → chunk-m1h5a4vg.js} +1 -1
  199. package/bundle/{chunk-kpnfndkg.js → chunk-m2ekhbdp.js} +1 -1
  200. package/bundle/{chunk-atbm0pnt.js → chunk-m2x9xhha.js} +2 -2
  201. package/bundle/chunk-m5ghbt5y.js +2 -0
  202. package/bundle/{chunk-7ryv0f5h.js → chunk-m612agnk.js} +1 -1
  203. package/bundle/{chunk-05amr7y9.js → chunk-m67tcnk4.js} +1 -1
  204. package/bundle/{chunk-2sy1wx99.js → chunk-m8yv4sd2.js} +1 -1
  205. package/bundle/{chunk-vy9xre57.js → chunk-mdck9s88.js} +1 -1
  206. package/bundle/{chunk-613kegcn.js → chunk-mgk9sh16.js} +1 -1
  207. package/bundle/{chunk-7e1aw8rw.js → chunk-mk6cddvd.js} +1 -1
  208. package/bundle/chunk-mn41f9qv.js +2 -0
  209. package/bundle/chunk-mqjf9sbm.js +2 -0
  210. package/bundle/{chunk-n10atvac.js → chunk-msegx0t7.js} +1 -1
  211. package/bundle/{chunk-8bzwgcjb.js → chunk-mskwkcgj.js} +1 -1
  212. package/bundle/chunk-n5gwrrbb.js +2 -0
  213. package/bundle/{chunk-1xpx1t40.js → chunk-n8h6x2en.js} +2 -2
  214. package/bundle/chunk-nfjhem1c.js +2 -0
  215. package/bundle/{chunk-j0ftbmex.js → chunk-ngchsw2g.js} +2 -2
  216. package/bundle/{chunk-3rgct4bd.js → chunk-nj4d554m.js} +1 -1
  217. package/bundle/{chunk-d2n09yvh.js → chunk-njnwdgvd.js} +2 -2
  218. package/bundle/{chunk-w4hbw37v.js → chunk-nt4e3em9.js} +1 -1
  219. package/bundle/chunk-nx90tvwg.js +2 -0
  220. package/bundle/{chunk-f416n3mp.js → chunk-nxbkh4k9.js} +2 -2
  221. package/bundle/chunk-nxyyn2ra.js +2 -0
  222. package/bundle/{chunk-md7vpe1e.js → chunk-nzehfpxp.js} +1 -1
  223. package/bundle/chunk-p5tceb4k.js +2 -0
  224. package/bundle/{chunk-3w64fpwn.js → chunk-p68rwmhc.js} +2 -2
  225. package/bundle/{chunk-nszqy06d.js → chunk-pekm54ce.js} +1 -1
  226. package/bundle/{chunk-fvy5w4dh.js → chunk-pget15wc.js} +1 -1
  227. package/bundle/{chunk-tedrfa7d.js → chunk-phxrg7aw.js} +2 -2
  228. package/bundle/{chunk-81engf0t.js → chunk-ppfjf7qx.js} +1 -1
  229. package/bundle/{chunk-s5krbdvd.js → chunk-q1v2pytx.js} +1 -1
  230. package/bundle/{chunk-w01gjnty.js → chunk-q6ztpfcs.js} +2 -2
  231. package/bundle/{chunk-yvj021eg.js → chunk-qhc90p4a.js} +2 -2
  232. package/bundle/chunk-qjgm3e2p.js +2 -0
  233. package/bundle/{chunk-qkwhgfjt.js → chunk-qjjch1zt.js} +2 -2
  234. package/bundle/{chunk-f3rrd2p6.js → chunk-qjn86fc0.js} +1 -1
  235. package/bundle/{chunk-qq71akpw.js → chunk-qrey2gwb.js} +2 -2
  236. package/bundle/chunk-qt1wffbh.js +3 -0
  237. package/bundle/{chunk-z2m09m4w.js → chunk-qt2c4bty.js} +1 -1
  238. package/bundle/{chunk-pjbbdm96.js → chunk-qv2s39dv.js} +2 -2
  239. package/bundle/chunk-r08957sm.js +11 -0
  240. package/bundle/chunk-r1616dce.js +2 -0
  241. package/bundle/chunk-s07j8hfy.js +2 -0
  242. package/bundle/{chunk-01gwb793.js → chunk-s3yna2wm.js} +1 -1
  243. package/bundle/{chunk-0vqrakhw.js → chunk-s6bar2f9.js} +1 -1
  244. package/bundle/chunk-sbyey0qb.js +2 -0
  245. package/bundle/{chunk-ze00x1xb.js → chunk-scnz207s.js} +2 -2
  246. package/bundle/{chunk-xcs2jbz9.js → chunk-sermjas1.js} +1 -1
  247. package/bundle/chunk-sj5v361q.js +2 -0
  248. package/bundle/chunk-smtvgr3w.js +2 -0
  249. package/bundle/{chunk-ynfbz3sz.js → chunk-snm5q21k.js} +2 -2
  250. package/bundle/{chunk-4920vf6a.js → chunk-srh4xvsj.js} +1 -1
  251. package/bundle/{chunk-m7txgh5w.js → chunk-stezw26z.js} +1 -1
  252. package/bundle/{chunk-g7vahvkz.js → chunk-szr0f7k2.js} +1 -1
  253. package/bundle/{chunk-vw673y0t.js → chunk-t12xrrfr.js} +2 -2
  254. package/bundle/{chunk-6fpfr8tk.js → chunk-tj78jsp9.js} +1 -1
  255. package/bundle/chunk-tpndnprb.js +2 -0
  256. package/bundle/{chunk-jdkxeqw5.js → chunk-tr8sf0dk.js} +1 -1
  257. package/bundle/{chunk-hyckncza.js → chunk-v2zp22r3.js} +2 -2
  258. package/bundle/{chunk-0cehm5fn.js → chunk-v4xcysh0.js} +1 -1
  259. package/bundle/{chunk-7qxn24qa.js → chunk-v965rsr8.js} +2 -2
  260. package/bundle/{chunk-0304b7xg.js → chunk-va316nee.js} +1 -1
  261. package/bundle/chunk-vfdhqf4h.js +28 -0
  262. package/bundle/{chunk-6h2faxs9.js → chunk-vg2fmyje.js} +2 -2
  263. package/bundle/{chunk-yt1yk4j1.js → chunk-vj62pc0h.js} +1 -1
  264. package/bundle/{chunk-2jn2hd12.js → chunk-vkskqhag.js} +2 -2
  265. package/bundle/{chunk-hk8j5ht8.js → chunk-vn7nkrqb.js} +2 -2
  266. package/bundle/{chunk-g8wvr7a1.js → chunk-vsjyr170.js} +2 -2
  267. package/bundle/chunk-vwxfgea7.js +2 -0
  268. package/bundle/chunk-w0kgcz1t.js +2 -0
  269. package/bundle/{chunk-zjvzc0my.js → chunk-w87a3mzm.js} +1 -1
  270. package/bundle/chunk-wajmd3r7.js +2 -0
  271. package/bundle/{chunk-9p83me3p.js → chunk-whxjkz9a.js} +2 -2
  272. package/bundle/chunk-wksczmes.js +2 -0
  273. package/bundle/{chunk-2kdn66xt.js → chunk-wnqwb6fd.js} +1 -1
  274. package/bundle/chunk-wrw22v0a.js +616 -0
  275. package/bundle/chunk-wsxta33r.js +2 -0
  276. package/bundle/{chunk-rvrjw0fy.js → chunk-wsy0m70r.js} +1 -1
  277. package/bundle/{chunk-w2gpgapp.js → chunk-wy46mbwt.js} +1 -1
  278. package/bundle/{chunk-cqhpbfcn.js → chunk-wz0zcddf.js} +3 -3
  279. package/bundle/{chunk-q2exgz82.js → chunk-x067eetw.js} +1 -1
  280. package/bundle/{chunk-fkat2pw6.js → chunk-xc5044tm.js} +1 -1
  281. package/bundle/chunk-xck0sq3k.js +2 -0
  282. package/bundle/chunk-xjyhtm8r.js +2 -0
  283. package/bundle/{chunk-wg5dv21f.js → chunk-xn2ds2s4.js} +2 -2
  284. package/bundle/{chunk-rs0nx844.js → chunk-xpc2zgj7.js} +2 -2
  285. package/bundle/{chunk-54pk7nna.js → chunk-xrxyrr00.js} +1 -1
  286. package/bundle/{chunk-zna6neq5.js → chunk-xs3xtz6x.js} +1 -1
  287. package/bundle/{chunk-crap29f6.js → chunk-xxbqhg9n.js} +1 -1
  288. package/bundle/{chunk-gaxbbxk6.js → chunk-y062spw2.js} +1 -1
  289. package/bundle/{chunk-bse8p94q.js → chunk-y2v09y71.js} +1 -1
  290. package/bundle/chunk-y9p87bfd.js +2 -0
  291. package/bundle/{chunk-g4qwkcdv.js → chunk-yajd975f.js} +1 -1
  292. package/bundle/{chunk-5dm3p5r6.js → chunk-ydp0q1hk.js} +1 -1
  293. package/bundle/{chunk-gxa2r4zc.js → chunk-yfkvjphe.js} +1 -1
  294. package/bundle/chunk-ygc5qegv.js +2 -0
  295. package/bundle/{chunk-kbg3k1az.js → chunk-yhk7d1j0.js} +1 -1
  296. package/bundle/chunk-yhwx62yf.js +2 -0
  297. package/bundle/chunk-yjqmzm51.js +2 -0
  298. package/bundle/{chunk-49ypxzfx.js → chunk-yjtdgcq5.js} +1 -1
  299. package/bundle/{chunk-mg239rc3.js → chunk-yp0a8q29.js} +3 -3
  300. package/bundle/{chunk-p31yg62z.js → chunk-yq3m8190.js} +2 -2
  301. package/bundle/{chunk-rze20q68.js → chunk-yt3f3j35.js} +1 -1
  302. package/bundle/{chunk-tfggzzqw.js → chunk-ywkvq7zb.js} +1 -1
  303. package/bundle/chunk-z4z8hk7e.js +2 -0
  304. package/bundle/chunk-z7y9pdj7.js +2 -0
  305. package/bundle/chunk-z8g819cz.js +2 -0
  306. package/bundle/{chunk-h56jxxvj.js → chunk-z8v2tsz2.js} +1 -1
  307. package/bundle/{chunk-vztxv9dj.js → chunk-zb0me4kk.js} +1 -1
  308. package/bundle/{chunk-7ez3ye6e.js → chunk-zcm2jdr5.js} +1 -1
  309. package/bundle/chunk-zqv7fx25.js +2 -0
  310. package/bundle/{chunk-hb4d06q0.js → chunk-zrc54vc4.js} +2 -2
  311. package/bundle/chunk-zs2a1f20.js +2 -0
  312. package/bundle/chunk-zt1nbwmm.js +2 -0
  313. package/bundle/{chunk-fd9zrmhr.js → chunk-ztc3gm8y.js} +2 -2
  314. package/bundle/{chunk-08y06vgt.js → chunk-zxaaxb99.js} +2 -2
  315. package/bundle/{chunk-x3931we7.js → chunk-zyhdxggp.js} +2 -2
  316. package/bundle/index.js +3 -3
  317. package/bundle/parser.worker.js +2 -2
  318. package/bundle/qffi.node +0 -0
  319. package/bundle/worker.js +1 -1
  320. package/package.json +1 -1
  321. package/bundle/chunk-09ecxdmd.js +0 -2
  322. package/bundle/chunk-0jaj2g7x.js +0 -2
  323. package/bundle/chunk-0nr2925m.js +0 -2
  324. package/bundle/chunk-0wbq1y92.js +0 -2
  325. package/bundle/chunk-12pxszgn.js +0 -2
  326. package/bundle/chunk-1337582e.js +0 -2
  327. package/bundle/chunk-182jf8fz.js +0 -2
  328. package/bundle/chunk-1ht3zcsh.js +0 -2
  329. package/bundle/chunk-25zkavr0.js +0 -2
  330. package/bundle/chunk-2cm91ktc.js +0 -3
  331. package/bundle/chunk-2jfd82jk.js +0 -2
  332. package/bundle/chunk-2k7bbzj2.js +0 -2
  333. package/bundle/chunk-30081kwd.js +0 -2
  334. package/bundle/chunk-3kdhvq0p.js +0 -3
  335. package/bundle/chunk-3vag59se.js +0 -2
  336. package/bundle/chunk-3x5v6sjw.js +0 -2
  337. package/bundle/chunk-43ep9d7a.js +0 -2
  338. package/bundle/chunk-48j09m6e.js +0 -3
  339. package/bundle/chunk-4qqja22v.js +0 -2
  340. package/bundle/chunk-5gazgxt5.js +0 -2
  341. package/bundle/chunk-63znhwx0.js +0 -2
  342. package/bundle/chunk-6hmyy7n6.js +0 -2
  343. package/bundle/chunk-7dyddrpk.js +0 -2
  344. package/bundle/chunk-7penjsgq.js +0 -2
  345. package/bundle/chunk-7t5gzkj6.js +0 -2
  346. package/bundle/chunk-89vgt8vq.js +0 -2
  347. package/bundle/chunk-8e8n82f9.js +0 -2
  348. package/bundle/chunk-97exhw9j.js +0 -2
  349. package/bundle/chunk-9cvkaht5.js +0 -2
  350. package/bundle/chunk-akdvstd9.js +0 -2
  351. package/bundle/chunk-ave2e4sa.js +0 -2
  352. package/bundle/chunk-axnwehc7.js +0 -2
  353. package/bundle/chunk-bmzyxspj.js +0 -2
  354. package/bundle/chunk-bvaqpfv8.js +0 -2
  355. package/bundle/chunk-cxb05cdg.js +0 -2
  356. package/bundle/chunk-cxe92z5c.js +0 -2
  357. package/bundle/chunk-d5wp85kw.js +0 -2
  358. package/bundle/chunk-dm5xnb4t.js +0 -2
  359. package/bundle/chunk-dpeqsvan.js +0 -2
  360. package/bundle/chunk-drxtmg5c.js +0 -2
  361. package/bundle/chunk-e9pfdjcy.js +0 -2
  362. package/bundle/chunk-ejn5hfzd.js +0 -2
  363. package/bundle/chunk-ek1fawsj.js +0 -3
  364. package/bundle/chunk-ernd18jb.js +0 -2
  365. package/bundle/chunk-ff9b4cg8.js +0 -2
  366. package/bundle/chunk-fpff6a4q.js +0 -2
  367. package/bundle/chunk-gq361kdt.js +0 -2
  368. package/bundle/chunk-hbagpppv.js +0 -2
  369. package/bundle/chunk-hf473xav.js +0 -2
  370. package/bundle/chunk-hr88054m.js +0 -2
  371. package/bundle/chunk-j3czd7v2.js +0 -28
  372. package/bundle/chunk-j9m2d6t5.js +0 -2
  373. package/bundle/chunk-jd9edy2s.js +0 -2
  374. package/bundle/chunk-jwtdbx31.js +0 -2
  375. package/bundle/chunk-kbjwdv1x.js +0 -8223
  376. package/bundle/chunk-krkxrej2.js +0 -2
  377. package/bundle/chunk-m26mcy8p.js +0 -2
  378. package/bundle/chunk-m62wgqp1.js +0 -2
  379. package/bundle/chunk-m84cn9c6.js +0 -2
  380. package/bundle/chunk-mvc7pvtq.js +0 -2
  381. package/bundle/chunk-nfp9xtca.js +0 -3
  382. package/bundle/chunk-ngz5xw45.js +0 -3
  383. package/bundle/chunk-p5t9mq8r.js +0 -2
  384. package/bundle/chunk-pfbykat1.js +0 -2
  385. package/bundle/chunk-qd0nvn4z.js +0 -2
  386. package/bundle/chunk-qh99kv2j.js +0 -2
  387. package/bundle/chunk-qyrafh4m.js +0 -2
  388. package/bundle/chunk-rc37cw86.js +0 -2
  389. package/bundle/chunk-rmpty636.js +0 -2
  390. package/bundle/chunk-rz54qjew.js +0 -2
  391. package/bundle/chunk-s3wjwxme.js +0 -2
  392. package/bundle/chunk-s4ncnbgd.js +0 -2
  393. package/bundle/chunk-snz3w30x.js +0 -2
  394. package/bundle/chunk-srw748gr.js +0 -2
  395. package/bundle/chunk-tn167yyz.js +0 -2
  396. package/bundle/chunk-v1xwe58d.js +0 -2
  397. package/bundle/chunk-vh05n2x3.js +0 -2
  398. package/bundle/chunk-vrfegg5f.js +0 -2
  399. package/bundle/chunk-w12tky28.js +0 -2
  400. package/bundle/chunk-w9ct698t.js +0 -2
  401. package/bundle/chunk-wms4skr9.js +0 -11
  402. package/bundle/chunk-wr5hdsst.js +0 -9
  403. package/bundle/chunk-wxnqgh8t.js +0 -2
  404. package/bundle/chunk-wzmte7sy.js +0 -3
  405. package/bundle/chunk-x0h1jdxt.js +0 -2
  406. package/bundle/chunk-x6hsmnhz.js +0 -2
  407. package/bundle/chunk-xg9e0enb.js +0 -2
  408. package/bundle/chunk-xtxxb25n.js +0 -2
  409. package/bundle/chunk-y3s7sh1e.js +0 -2
  410. package/bundle/chunk-ydvheqw9.js +0 -2
  411. package/bundle/chunk-yxnq0d7k.js +0 -2
  412. package/bundle/chunk-z2raegj9.js +0 -2
  413. package/bundle/chunk-z3pyhmg6.js +0 -2
  414. package/bundle/chunk-z7pg6sw1.js +0 -2
  415. package/bundle/chunk-z84376c6.js +0 -2
  416. package/bundle/chunk-zn8th65r.js +0 -2
  417. package/bundle/chunk-ztv1brgn.js +0 -2
  418. package/bundle/chunk-zyxvd9fj.js +0 -2
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ul as no,Vl as Vi,Wl as oo,Xl as ci,Zl as $i,_l as Qi}from"./chunk-1qbm1k9y.js";import{$l as pr,$m as ft,$n as vt,Am as Wr,An as Tt,Bm as Pr,Bn as lt,Cm as Ur,Cn as At,Dm as Zr,Dn as Ot,Do as Zi,Em as vr,En as dt,Fm as Xr,Fn as Lo,Gm as Yr,Gn as Go,Hm as H,Hn as $t,Im as zr,In as Qt,Jm as kr,Jn as Bt,Km as Vr,Kn as Dt,Lm as cr,Ln as It,Mm as wr,Mn as Lt,Nm as qr,Nn as Gt,Om as Fr,On as Mt,Pm as ar,Pn as xt,Qm as jr,Qn as Ct,Rm as br,Rn as Jt,Sm as hr,Sn as Ht,Tm as nt,Tn as Kt,Um as ot,Un as Rt,Vm as rt,Vn as St,Wm as tt,Wn as Et,Xm as it,Xn as Wt,Ym as et,Yn as Pt,Zm as mt,Zn as Ut,_m as yt,_n as Zt,am as _r,an as gt,ao as Xt,bm as En,bn as a,bo as Yt,cm as Wn,cn as Q,co as zt,dm as Nr,dn as fn,do as kt,em as Tr,en as yn,eo as Vt,fm as lr,fn as Yo,fo as ct,gn as ut,go as wt,hm as Ar,hn as X,ho as qt,im as Or,in as so,io as Ft,jm as dr,jn as Pn,jo as at,km as $r,kn as po,ko as jt,lm as Qr,ln as _o,lo as bt,mm as Br,mn as No,mo as ht,nm as Dr,nn as To,no as ni,om as Ir,on as lo,oo as oi,pm as Lr,pn as Ao,po as ri,qm as Gr,qn as Oo,qo as ti,rm as Mr,rn as st,ro as ii,sm as xr,sn as $o,so as ei,tm as Cr,tn as Qo,to as mi,um as Jr,un as Bo,uo as yi,vm as Hr,vn as pt,vo as ao,wm as Kr,wn as Do,wo as fi,xm as Rr,xn as _t,xo as gi,ym as Sr,yn as Io,yo as ui,zm as Er,zn as Nt}from"./chunk-3rgct4bd.js";import{hp as bn}from"./chunk-w4hbw37v.js";import{Cp as hn}from"./chunk-7qxn24qa.js";import{Dp as Yi}from"./chunk-vx837ete.js";import{Ep as Jo}from"./chunk-ppvmy940.js";import{Gr as Xn,Hr as ro,Ir as Nn,Jr as Hi,Kr as Wi,Mr as Ki}from"./chunk-4nck07pc.js";import{Nr as Si}from"./chunk-d2n09yvh.js";import{Ts as eo}from"./chunk-z2q3mg73.js";import{$t as V,Ht as un,Rt as dn,St as nn,Xs as Wo}from"./chunk-08y06vgt.js";import{lu as di,ou as wo,pu as c,tu as go}from"./chunk-9p83me3p.js";import{vu as j}from"./chunk-48j09m6e.js";import{GA as Kn,kA as Tn,sA as Cn}from"./chunk-tedrfa7d.js";import{AD as Qn,FJ as Ln,PF as h,SN as N,XE as Eo,bP as Oi,cF as kn,cO as vo,jF as sn,qI as r,vC as wn,zF as Ai}from"./chunk-ynfbz3sz.js";import{EP as On}from"./chunk-s2za1y84.js";var qo={};On(qo,{run:()=>ji});var mn={time_created:a().notNull().$default(()=>Date.now()),time_updated:a().notNull().$onUpdate(()=>Date.now())};var x=yn("project",{id:Q().$type().primaryKey(),worktree:Q().notNull(),vcs:Q(),name:Q(),icon_url:Q(),icon_color:Q(),...mn,time_initialized:a(),sandboxes:Q({mode:"json"}).notNull().$type(),commands:Q({mode:"json"}).$type()});var gn=yn("session",{id:Q().$type().primaryKey(),project_id:Q().$type().notNull().references(()=>x.id,{onDelete:"cascade"}),workspace_id:Q().$type(),parent_id:Q().$type(),context_from:Q().$type(),context_watermark:Q().$type(),slug:Q().notNull(),directory:Q().notNull(),title:Q().notNull(),version:Q().notNull(),share_url:Q(),summary_additions:a(),summary_deletions:a(),summary_files:a(),summary_diffs:Q({mode:"json"}).$type(),revert:Q({mode:"json"}).$type(),permission:Q({mode:"json"}).$type(),...mn,time_compacting:a(),time_archived:a(),last_checkpoint_message_id:Q().$type()},(n)=>[fn("session_project_idx").on(n.project_id),fn("session_workspace_idx").on(n.workspace_id),fn("session_parent_idx").on(n.parent_id),fn("session_context_from_idx").on(n.context_from)]),fo=yn("message",{id:Q().$type().primaryKey(),session_id:Q().$type().notNull().references(()=>gn.id,{onDelete:"cascade"}),agent_id:Q().notNull().default("main"),...mn,data:Q({mode:"json"}).notNull().$type()},(n)=>[fn("message_session_time_created_id_idx").on(n.session_id,n.time_created,n.id),fn("message_session_agent_idx").on(n.session_id,n.agent_id,n.id)]),zo=yn("part",{id:Q().$type().primaryKey(),message_id:Q().$type().notNull().references(()=>fo.id,{onDelete:"cascade"}),session_id:Q().$type().notNull(),...mn,data:Q({mode:"json"}).notNull().$type()},(n)=>[fn("part_message_id_id_idx").on(n.message_id,n.id),fn("part_session_idx").on(n.session_id)]),ko=yn("todo",{session_id:Q().$type().notNull().references(()=>gn.id,{onDelete:"cascade"}),content:Q().notNull(),status:Q().notNull(),position:a().notNull(),...mn},(n)=>[Yo({columns:[n.session_id,n.position]}),fn("todo_session_idx").on(n.session_id)]),Vo=yn("permission",{project_id:Q().primaryKey().references(()=>x.id,{onDelete:"cascade"}),...mn,data:Q({mode:"json"}).notNull().$type()});var co=yn("session_share",{session_id:Q().primaryKey().references(()=>gn.id,{onDelete:"cascade"}),id:Q().notNull(),secret:Q().notNull(),url:Q().notNull(),...mn});import k from"path";var v=V.create({service:"json-migration"});async function ji(n,o){let t=k.join(dn.Path.data,"storage");if(!await go.exists(t))return v.info("storage directory does not exist, skipping migration"),{projects:0,sessions:0,messages:0,parts:0,todos:0,permissions:0,shares:0,errors:[]};v.info("starting json to sqlite migration",{storageDir:t});let s=performance.now();n.run("PRAGMA journal_mode = WAL"),n.run("PRAGMA synchronous = OFF"),n.run("PRAGMA cache_size = 10000"),n.run("PRAGMA temp_store = MEMORY");let e={projects:0,sessions:0,messages:0,parts:0,todos:0,permissions:0,shares:0,errors:[]},l={sessions:0,todos:0,permissions:0,shares:0},_=e.errors,A=1000,C=Date.now();async function S(g){return wo.scan(g,{cwd:t,absolute:!0})}async function K(g,G,J){let B=J-G,T=Array(B);for(let P=0;P<B;P++)T[P]=go.readJson(g[G+P]);let M=await Promise.allSettled(T),Z=Array(B);for(let P=0;P<M.length;P++){let w=M[P];if(w.status==="fulfilled"){Z[P]=w.value;continue}_.push(`failed to read ${g[G+P]}: ${w.reason}`)}return Z}function R(g,G,J){if(g.length===0)return 0;try{return n.insert(G).values(g).onConflictDoNothing().run(),g.length}catch(B){return _.push(`failed to migrate ${J} batch: ${B}`),0}}v.info("scanning files...");let[E,d,D,L,u,p,m]=await Promise.all([S("project/*.json"),S("session/*/*.json"),S("message/*/*.json"),S("part/*/*.json"),S("todo/*.json"),S("permission/*.json"),S("session_share/*.json")]);v.info("file scan complete",{projects:E.length,sessions:d.length,messages:D.length,parts:L.length,todos:u.length,permissions:p.length,shares:m.length});let f=Math.max(1,E.length+d.length+D.length+L.length+u.length+p.length+m.length),i=o?.progress,y=0,$=(g,G)=>{y=Math.min(f,y+G),i?.({current:y,total:f,label:g})};i?.({current:y,total:f,label:"starting"}),n.run("BEGIN TRANSACTION");let I=new Set,O=[];for(let g=0;g<E.length;g+=A){let G=Math.min(g+A,E.length),J=await K(E,g,G);O.length=0;for(let B=0;B<J.length;B++){let T=J[B];if(!T)continue;let M=k.basename(E[g+B],".json");I.add(M),O.push({id:M,worktree:T.worktree??"/",vcs:T.vcs,name:T.name??void 0,icon_url:T.icon?.url,icon_color:T.icon?.color,time_created:T.time?.created??C,time_updated:T.time?.updated??C,time_initialized:T.time?.initialized,sandboxes:T.sandboxes??[],commands:T.commands})}e.projects+=R(O,x,"project"),$("projects",G-g)}v.info("migrated projects",{count:e.projects,duration:Math.round(performance.now()-s)});let U=d.map((g)=>k.basename(k.dirname(g))),z=new Set,en=[];for(let g=0;g<d.length;g+=A){let G=Math.min(g+A,d.length),J=await K(d,g,G);en.length=0;for(let B=0;B<J.length;B++){let T=J[B];if(!T)continue;let M=k.basename(d[g+B],".json"),Z=U[g+B];if(!I.has(Z)){l.sessions++;continue}z.add(M),en.push({id:M,project_id:Z,parent_id:T.parentID??null,slug:T.slug??"",directory:T.directory??"",title:T.title??"",version:T.version??"",share_url:T.share?.url??null,summary_additions:T.summary?.additions??null,summary_deletions:T.summary?.deletions??null,summary_files:T.summary?.files??null,summary_diffs:T.summary?.diffs??null,revert:T.revert??null,permission:T.permission??null,time_created:T.time?.created??C,time_updated:T.time?.updated??C,time_compacting:T.time?.compacting??null,time_archived:T.time?.archived??null})}e.sessions+=R(en,gn,"session"),$("sessions",G-g)}if(v.info("migrated sessions",{count:e.sessions}),l.sessions>0)v.warn("skipped orphaned sessions",{count:l.sessions});let pn=[],W=[],qn=new Map;for(let g of D){let G=k.basename(k.dirname(g));if(!z.has(G))continue;pn.push(g),W.push(G)}for(let g=0;g<pn.length;g+=A){let G=Math.min(g+A,pn.length),J=await K(pn,g,G),B=Array(J.length),T=0;for(let M=0;M<J.length;M++){let Z=J[M];if(!Z)continue;let P=pn[g+M],w=k.basename(P,".json"),Sn=W[g+M];qn.set(w,Sn);let Bn=Z;delete Bn.id,delete Bn.sessionID,B[T++]={id:w,session_id:Sn,time_created:Z.time?.created??C,time_updated:Z.time?.updated??C,data:Bn}}B.length=T,e.messages+=R(B,fo,"message"),$("messages",G-g)}v.info("migrated messages",{count:e.messages});for(let g=0;g<L.length;g+=A){let G=Math.min(g+A,L.length),J=await K(L,g,G),B=Array(J.length),T=0;for(let M=0;M<J.length;M++){let Z=J[M];if(!Z)continue;let P=L[g+M],w=k.basename(P,".json"),Sn=k.basename(k.dirname(P)),Bn=qn.get(Sn);if(!Bn){_.push(`part missing message session: ${P}`);continue}if(!z.has(Bn))continue;let jn=Z;delete jn.id,delete jn.messageID,delete jn.sessionID,B[T++]={id:w,message_id:Sn,session_id:Bn,time_created:Z.time?.created??C,time_updated:Z.time?.updated??C,data:jn}}B.length=T,e.parts+=R(B,zo,"part"),$("parts",G-g)}v.info("migrated parts",{count:e.parts});let An=u.map((g)=>k.basename(g,".json"));for(let g=0;g<u.length;g+=A){let G=Math.min(g+A,u.length),J=await K(u,g,G),B=[];for(let T=0;T<J.length;T++){let M=J[T];if(!M)continue;let Z=An[g+T];if(!z.has(Z)){l.todos++;continue}if(!Array.isArray(M)){_.push(`todo not an array: ${u[g+T]}`);continue}for(let P=0;P<M.length;P++){let w=M[P];if(!w?.content||!w?.status)continue;B.push({session_id:Z,content:w.content,status:w.status,position:P,time_created:C,time_updated:C})}}e.todos+=R(B,ko,"todo"),$("todos",G-g)}if(v.info("migrated todos",{count:e.todos}),l.todos>0)v.warn("skipped orphaned todos",{count:l.todos});let Fn=p.map((g)=>k.basename(g,".json")),Rn=[];for(let g=0;g<p.length;g+=A){let G=Math.min(g+A,p.length),J=await K(p,g,G);Rn.length=0;for(let B=0;B<J.length;B++){let T=J[B];if(!T)continue;let M=Fn[g+B];if(!I.has(M)){l.permissions++;continue}Rn.push({project_id:M,data:T})}e.permissions+=R(Rn,Vo,"permission"),$("permissions",G-g)}if(v.info("migrated permissions",{count:e.permissions}),l.permissions>0)v.warn("skipped orphaned permissions",{count:l.permissions});let an=m.map((g)=>k.basename(g,".json")),Gn=[];for(let g=0;g<m.length;g+=A){let G=Math.min(g+A,m.length),J=await K(m,g,G);Gn.length=0;for(let B=0;B<J.length;B++){let T=J[B];if(!T)continue;let M=an[g+B];if(!z.has(M)){l.shares++;continue}if(!T?.id||!T?.secret||!T?.url){_.push(`session_share missing id/secret/url: ${m[g+B]}`);continue}Gn.push({session_id:M,id:T.id,secret:T.secret,url:T.url})}e.shares+=R(Gn,co,"session_share"),$("shares",G-g)}if(v.info("migrated session shares",{count:e.shares}),l.shares>0)v.warn("skipped orphaned session shares",{count:l.shares});if(n.run("COMMIT"),v.info("json migration complete",{projects:e.projects,sessions:e.sessions,messages:e.messages,parts:e.parts,todos:e.todos,permissions:e.permissions,shares:e.shares,errorCount:e.errors.length,duration:Math.round(performance.now()-s)}),e.errors.length>0)v.warn("migration errors",{errors:e.errors.slice(0,20)});return i?.({current:f,total:f,label:"complete"}),e}var In={};On(In,{use:()=>Je,transaction:()=>Ke,textDecoder:()=>mt,sumDistinct:()=>tr,sum:()=>rr,sql:()=>H,relationsOrderToSQL:()=>ii,relationsFilterToSQL:()=>ti,relationToSQL:()=>mi,relationExtrasToSQL:()=>ei,processRelations:()=>Wt,placeholder:()=>kr,param:()=>Yr,orderSelectedFields:()=>ar,orderByOperators:()=>Vt,or:()=>po,operators:()=>kt,notLike:()=>Nt,notInArray:()=>st,notIlike:()=>lt,notExists:()=>pt,notBetween:()=>_t,not:()=>_o,noopMapper:()=>vr,noopEncoder:()=>Zr,noopDecoder:()=>Ur,ne:()=>so,name:()=>Wr,min:()=>er,max:()=>ir,mapUpdateSet:()=>br,mapResultRow:()=>Fr,mapRelationalRow:()=>wt,mapColumnsInSQLToAlias:()=>Ht,mapColumnsInAliasedSQLToAlias:()=>Jt,lte:()=>Ao,lt:()=>lo,like:()=>Io,l2Distance:()=>mr,l1Distance:()=>yr,jaccardDistance:()=>sr,isWithEnum:()=>ft,isView:()=>wr,isTable:()=>Lr,isSQLWrapper:()=>Kr,isNull:()=>$o,isNotNull:()=>Qo,isDriverValueEncoder:()=>Pr,isConfig:()=>et,is:()=>En,innerProduct:()=>fr,inArray:()=>Oo,ilike:()=>Tt,haveSameKeys:()=>jr,hasOwnEntityKind:()=>_r,hammingDistance:()=>ur,gte:()=>To,gt:()=>No,getViewSelectedFields:()=>ot,getViewName:()=>qr,getTableUniqueName:()=>Mr,getTableName:()=>Gr,getTableLikeName:()=>tt,getTableColumns:()=>nt,getTableAsAliasSQL:()=>yi,getOriginalColumnFromAlias:()=>Kt,getOrderByOperators:()=>ct,getColumns:()=>rt,getColumnTable:()=>Nr,getColumnNameAndConfig:()=>it,getChannelPath:()=>zi,fillPlaceholders:()=>Vr,fieldSelectionToSQL:()=>ri,extractTablesFromSchema:()=>ht,extractExtendedColumnType:()=>Tr,exists:()=>Bo,eq:()=>X,entityKind:()=>pr,effect:()=>He,desc:()=>Go,defineRelationsPart:()=>oi,defineRelations:()=>ni,createRelationsHelper:()=>bt,countDistinct:()=>ho,count:()=>uo,cosineDistance:()=>gr,close:()=>Ce,buildRelationsParts:()=>Ut,buildRelations:()=>Pt,bindIfParam:()=>ut,between:()=>Do,avgDistinct:()=>or,avg:()=>nr,assertUnreachable:()=>yt,asc:()=>Lo,arrayOverlaps:()=>dt,arrayContains:()=>At,arrayContained:()=>Ot,applyMixins:()=>hr,and:()=>Pn,aliasedTableColumn:()=>Ct,aliasedTable:()=>Gt,aliasedRelation:()=>xt,aliasedColumn:()=>Mt,WithSubquery:()=>Cr,ViewSelectionAliasProxyHandler:()=>Bt,ViewBaseConfig:()=>Jr,View:()=>cr,TransactionRollbackError:()=>Et,TableSchema:()=>Ar,TableColumns:()=>Or,TableAliasProxyHandler:()=>Dt,Table:()=>Ir,Subquery:()=>xr,StringChunk:()=>Rr,SQL:()=>Sr,RelationsHelperStatic:()=>jt,RelationsBuilderTable:()=>qt,RelationsBuilderJunctionColumn:()=>at,RelationsBuilderColumn:()=>Ft,RelationTableAliasProxyHandler:()=>Lt,Relation:()=>Zt,QueryPromise:()=>$t,Placeholder:()=>zr,Path:()=>Po,Param:()=>Xr,OriginalName:()=>$r,One:()=>vt,NotFoundError:()=>xe,NoopLogger:()=>ui,Name:()=>Er,Many:()=>Xt,IsAlias:()=>Br,FakePrimitiveParam:()=>Hr,ExtraConfigColumns:()=>dr,ExtraConfigBuilder:()=>Dr,DrizzleQueryError:()=>St,DrizzleError:()=>Rt,DefaultLogger:()=>gi,Count:()=>zt,ConsoleLogWriter:()=>fi,ColumnTableAliasProxyHandler:()=>Qt,ColumnBuilder:()=>lr,ColumnAliasProxyHandler:()=>It,Column:()=>Wn,Client:()=>Jn,CONSTANTS:()=>gt,BaseName:()=>Qr,AggregatedField:()=>Yt});import bi from"crypto";import Fo,{existsSync as hi,readdirSync as ne}from"fs";import{join as oe}from"path";function jo(n){if(Fo.existsSync(`${n.migrationsFolder}/meta/_journal.json`))throw Error('We detected that you have old drizzle-kit migration folders. You must upgrade drizzle-kit and run "drizzle-kit up"');let o=n.migrationsFolder,t=[],s=ne(o).map((e)=>({path:oe(o,e,"migration.sql"),name:e})).filter((e)=>hi(e.path));s.sort((e,l)=>e.name.localeCompare(l.name));for(let e of s){let l=e.path,_=e.name.slice(0,14),A=Fo.readFileSync(l).toString(),C=A.split("--> statement-breakpoint").map((K)=>{return K}),S=ao(_);t.push({sql:C,bps:!0,folderMillis:S,hash:bi.createHash("sha256").update(A).digest("hex"),name:e.name})}return t}function bo(n,o){if(Array.isArray(o)||"migrationsJournal"in o){let s=Array.isArray(o)?o:o.migrationsJournal,e=Array.isArray(o)?void 0:o.migrationsTable,l=s.map((_)=>({sql:_.sql.split("--> statement-breakpoint"),folderMillis:_.timestamp,hash:"",bps:!0,name:_.name}));return n.dialect.migrate(l,n.session,{migrationsTable:e})}let t=jo(o);return n.dialect.migrate(t,n.session,o)}function uo(n){return H`count(${n||H.raw("*")})`.mapWith(Number)}function ho(n){return H`count(distinct ${n})`.mapWith(Number)}function nr(n){return H`avg(${n})`.mapWith(String)}function or(n){return H`avg(distinct ${n})`.mapWith(String)}function rr(n){return H`sum(${n})`.mapWith(String)}function tr(n){return H`sum(distinct ${n})`.mapWith(String)}function ir(n){return H`max(${n})`.mapWith(En(n,Wn)?n:String)}function er(n){return H`min(${n})`.mapWith(En(n,Wn)?n:String)}function Mn(n){return JSON.stringify(n)}function mr(n,o){if(Array.isArray(o))return H`${n} <-> ${Mn(o)}`;return H`${n} <-> ${o}`}function yr(n,o){if(Array.isArray(o))return H`${n} <+> ${Mn(o)}`;return H`${n} <+> ${o}`}function fr(n,o){if(Array.isArray(o))return H`${n} <#> ${Mn(o)}`;return H`${n} <#> ${o}`}function gr(n,o){if(Array.isArray(o))return H`${n} <=> ${Mn(o)}`;return H`${n} <=> ${o}`}function ur(n,o){if(Array.isArray(o))return H`${n} <~> ${Mn(o)}`;return H`${n} <~> ${o}`}function sr(n,o){if(Array.isArray(o))return H`${n} <%> ${Mn(o)}`;return H`${n} <%> ${o}`}import io from"path";var Yn={};On(Yn,{workspaceID:()=>de,useEffect:()=>Be,use:()=>Qe,make:()=>$e,invalidate:()=>Ie,has:()=>De,get:()=>So,directory:()=>to,context:()=>Ro,bind:()=>Oe});import{EventEmitter as re}from"events";var Un=new re;var Mo=new Set;function si(n){return Mo.add(n),()=>{Mo.delete(n)}}async function xo(n){await Promise.allSettled([...Mo].map((o)=>o(n)))}function Zn(n){return n()}var xi={};On(xi,{setInitialized:()=>se,list:()=>ge,layer:()=>Mi,get:()=>ue,fromRow:()=>_n,defaultLayer:()=>Ko,UpdateInput:()=>fe,Service:()=>xn,Info:()=>Li,Event:()=>Gi});import*as F from"fs/promises";import*as Bi from"os";import*as $n from"path";var te=N.String.pipe(N.brand("ProjectID")),q=te.pipe(bn((n)=>({global:n.make("global"),zod:j.string().pipe(j.custom())})));import*as Dn from"fs/promises";import*as b from"path";import*as Ni from"crypto";async function Co(n){let o=b.resolve(n);while(!0){let t=b.join(o,".git"),s=await Dn.stat(t).catch(()=>null);if(s){if(s.isDirectory())return t;let _=(await Dn.readFile(t,"utf-8")).trim().match(/^gitdir:\s*(.+)$/);if(!_)return null;let A=b.isAbsolute(_[1])?_[1]:b.resolve(o,_[1]);return b.resolve(A,"../..")}let e=b.dirname(o);if(e===o)return null;o=e}}async function pi(n){let o=await Dn.readFile(n,"utf-8").catch(()=>null);if(o===null)return null;return o.trim()||null}async function _i(n){let o=await pi(n);if(o)return o;let t=Ni.randomUUID();try{return await Dn.writeFile(n,t,{flag:"wx"}),t}catch(s){if(s.code!=="EEXIST")throw s;let e=await pi(n);if(e)return e;throw Error(`Project ID file was concurrently created but is empty: ${n}`)}}async function Ti(n){let o=await Co(n);if(o){let s=b.join(o,"qitqode-project-id");return q.make(await _i(s))}let t=b.join(n,".qitqode-project-id");return q.make(await _i(t))}async function ee(n){let o=await Co(n);if(!o)return;let t=$n.join(n,".qitqode-project-id"),s=$n.join(o,"qitqode-project-id"),e=(A)=>F.access(A).then(()=>!0).catch(()=>!1);if(await e(t)){if(!await e(s)){let A=await F.readFile(t,"utf-8");await F.writeFile(s,A)}await F.unlink(t).catch(()=>{})}let l=$n.join(o,"info","exclude");if(await F.mkdir($n.dirname(l),{recursive:!0}),!(await F.readFile(l,"utf-8").catch(()=>"")).includes(".qitqode-project-id"))await F.appendFile(l,`
2
+ import{rm as no,sm as Vi,tm as oo,um as ci,wm as $i,xm as Qi}from"./chunk-17psxhve.js";import{$m as Ur,$n as At,Am as En,An as a,Ao as Yt,Bm as Wn,Bn as Q,Bo as zt,Cm as Nr,Cn as fn,Co as kt,Dm as Tr,Dn as yn,Do as Vt,Em as lr,En as Yo,Eo as ct,Fn as ut,Fo as wt,Gm as Ar,Gn as X,Go as qt,Hm as Or,Hn as so,Ho as Ft,Im as dr,In as Pn,Io as at,Jm as $r,Jn as po,Jo as jt,Km as Qr,Kn as _o,Ko as bt,Lm as Br,Ln as No,Lo as ht,Mm as Dr,Mn as To,Mo as ni,Nm as Ir,Nn as lo,No as oi,Om as Lr,On as Ao,Oo as ri,Pm as Gr,Pn as Oo,Po as ti,Qm as Mr,Qn as st,Qo as ii,Rm as xr,Rn as $o,Ro as ei,Sm as Cr,Sn as Qo,So as mi,Tm as Jr,Tn as Bo,To as yi,Um as Hr,Un as pt,Uo as ao,Vm as Kr,Vn as Do,Vo as fi,Wm as Rr,Wn as _t,Wo as gi,Xm as Sr,Xn as Io,Xo as ui,Ym as Er,Yn as Nt,Zm as Wr,Zn as Tt,_m as Pr,_n as lt,an as Zr,ao as Ot,ap as Zi,bn as vr,bo as dt,cn as Xr,co as Lo,dn as Yr,do as Go,en as H,eo as $t,fn as zr,fo as Qt,gn as kr,go as Bt,hn as Vr,ho as Dt,in as cr,io as It,jn as wr,jo as Lt,kn as qr,ko as Gt,ln as Fr,lo as Mt,mn as ar,mo as xt,nn as jr,no as Ct,on as br,oo as Jt,pn as hr,po as Ht,qn as nt,qo as Kt,rn as ot,ro as Rt,sn as rt,so as St,tn as tt,to as Et,un as it,uo as Wt,vn as et,vo as Pt,wn as mt,wo as Ut,xn as yt,xo as Zt,ym as pr,yn as ft,yo as vt,zm as _r,zn as gt,zo as Xt}from"./chunk-nj4d554m.js";import{Gp as bn}from"./chunk-nt4e3em9.js";import{$p as hn}from"./chunk-v965rsr8.js";import{aq as Yi}from"./chunk-1sgby720.js";import{bq as Jo}from"./chunk-jg7s9rqz.js";import{ds as Xn,es as ro,fs as Nn,gs as Hi,hs as Wi,js as Ki}from"./chunk-c0796v8j.js";import{ks as Si}from"./chunk-njnwdgvd.js";import{qt as eo}from"./chunk-12bssxd4.js";import{eu as un,ou as dn,pu as nn,ut as Wo,yu as V}from"./chunk-zxaaxb99.js";import{Ku as di,Nu as wo,Ou as c,Su as go}from"./chunk-whxjkz9a.js";import{Uu as j}from"./chunk-k309zez0.js";import{JA as Tn,RA as Cn,dB as Kn}from"./chunk-phxrg7aw.js";import{AP as Oi,BF as kn,BO as vo,IF as sn,PI as r,UC as wn,YF as Ai,ZD as Qn,cK as Ln,mG as h,pO as N,uF as Eo}from"./chunk-snm5q21k.js";import{bQ as On}from"./chunk-aztre27e.js";var qo={};On(qo,{run:()=>ji});var mn={time_created:a().notNull().$default(()=>Date.now()),time_updated:a().notNull().$onUpdate(()=>Date.now())};var x=yn("project",{id:Q().$type().primaryKey(),worktree:Q().notNull(),vcs:Q(),name:Q(),icon_url:Q(),icon_color:Q(),...mn,time_initialized:a(),sandboxes:Q({mode:"json"}).notNull().$type(),commands:Q({mode:"json"}).$type()});var gn=yn("session",{id:Q().$type().primaryKey(),project_id:Q().$type().notNull().references(()=>x.id,{onDelete:"cascade"}),workspace_id:Q().$type(),parent_id:Q().$type(),context_from:Q().$type(),context_watermark:Q().$type(),slug:Q().notNull(),directory:Q().notNull(),title:Q().notNull(),version:Q().notNull(),share_url:Q(),summary_additions:a(),summary_deletions:a(),summary_files:a(),summary_diffs:Q({mode:"json"}).$type(),revert:Q({mode:"json"}).$type(),permission:Q({mode:"json"}).$type(),...mn,time_compacting:a(),time_archived:a(),last_checkpoint_message_id:Q().$type()},(n)=>[fn("session_project_idx").on(n.project_id),fn("session_workspace_idx").on(n.workspace_id),fn("session_parent_idx").on(n.parent_id),fn("session_context_from_idx").on(n.context_from)]),fo=yn("message",{id:Q().$type().primaryKey(),session_id:Q().$type().notNull().references(()=>gn.id,{onDelete:"cascade"}),agent_id:Q().notNull().default("main"),...mn,data:Q({mode:"json"}).notNull().$type()},(n)=>[fn("message_session_time_created_id_idx").on(n.session_id,n.time_created,n.id),fn("message_session_agent_idx").on(n.session_id,n.agent_id,n.id)]),zo=yn("part",{id:Q().$type().primaryKey(),message_id:Q().$type().notNull().references(()=>fo.id,{onDelete:"cascade"}),session_id:Q().$type().notNull(),...mn,data:Q({mode:"json"}).notNull().$type()},(n)=>[fn("part_message_id_id_idx").on(n.message_id,n.id),fn("part_session_idx").on(n.session_id)]),ko=yn("todo",{session_id:Q().$type().notNull().references(()=>gn.id,{onDelete:"cascade"}),content:Q().notNull(),status:Q().notNull(),position:a().notNull(),...mn},(n)=>[Yo({columns:[n.session_id,n.position]}),fn("todo_session_idx").on(n.session_id)]),Vo=yn("permission",{project_id:Q().primaryKey().references(()=>x.id,{onDelete:"cascade"}),...mn,data:Q({mode:"json"}).notNull().$type()});var co=yn("session_share",{session_id:Q().primaryKey().references(()=>gn.id,{onDelete:"cascade"}),id:Q().notNull(),secret:Q().notNull(),url:Q().notNull(),...mn});import k from"path";var v=V.create({service:"json-migration"});async function ji(n,o){let t=k.join(dn.Path.data,"storage");if(!await go.exists(t))return v.info("storage directory does not exist, skipping migration"),{projects:0,sessions:0,messages:0,parts:0,todos:0,permissions:0,shares:0,errors:[]};v.info("starting json to sqlite migration",{storageDir:t});let s=performance.now();n.run("PRAGMA journal_mode = WAL"),n.run("PRAGMA synchronous = OFF"),n.run("PRAGMA cache_size = 10000"),n.run("PRAGMA temp_store = MEMORY");let e={projects:0,sessions:0,messages:0,parts:0,todos:0,permissions:0,shares:0,errors:[]},l={sessions:0,todos:0,permissions:0,shares:0},_=e.errors,A=1000,C=Date.now();async function S(g){return wo.scan(g,{cwd:t,absolute:!0})}async function K(g,G,J){let B=J-G,T=Array(B);for(let P=0;P<B;P++)T[P]=go.readJson(g[G+P]);let M=await Promise.allSettled(T),Z=Array(B);for(let P=0;P<M.length;P++){let w=M[P];if(w.status==="fulfilled"){Z[P]=w.value;continue}_.push(`failed to read ${g[G+P]}: ${w.reason}`)}return Z}function R(g,G,J){if(g.length===0)return 0;try{return n.insert(G).values(g).onConflictDoNothing().run(),g.length}catch(B){return _.push(`failed to migrate ${J} batch: ${B}`),0}}v.info("scanning files...");let[E,d,D,L,u,p,m]=await Promise.all([S("project/*.json"),S("session/*/*.json"),S("message/*/*.json"),S("part/*/*.json"),S("todo/*.json"),S("permission/*.json"),S("session_share/*.json")]);v.info("file scan complete",{projects:E.length,sessions:d.length,messages:D.length,parts:L.length,todos:u.length,permissions:p.length,shares:m.length});let f=Math.max(1,E.length+d.length+D.length+L.length+u.length+p.length+m.length),i=o?.progress,y=0,$=(g,G)=>{y=Math.min(f,y+G),i?.({current:y,total:f,label:g})};i?.({current:y,total:f,label:"starting"}),n.run("BEGIN TRANSACTION");let I=new Set,O=[];for(let g=0;g<E.length;g+=A){let G=Math.min(g+A,E.length),J=await K(E,g,G);O.length=0;for(let B=0;B<J.length;B++){let T=J[B];if(!T)continue;let M=k.basename(E[g+B],".json");I.add(M),O.push({id:M,worktree:T.worktree??"/",vcs:T.vcs,name:T.name??void 0,icon_url:T.icon?.url,icon_color:T.icon?.color,time_created:T.time?.created??C,time_updated:T.time?.updated??C,time_initialized:T.time?.initialized,sandboxes:T.sandboxes??[],commands:T.commands})}e.projects+=R(O,x,"project"),$("projects",G-g)}v.info("migrated projects",{count:e.projects,duration:Math.round(performance.now()-s)});let U=d.map((g)=>k.basename(k.dirname(g))),z=new Set,en=[];for(let g=0;g<d.length;g+=A){let G=Math.min(g+A,d.length),J=await K(d,g,G);en.length=0;for(let B=0;B<J.length;B++){let T=J[B];if(!T)continue;let M=k.basename(d[g+B],".json"),Z=U[g+B];if(!I.has(Z)){l.sessions++;continue}z.add(M),en.push({id:M,project_id:Z,parent_id:T.parentID??null,slug:T.slug??"",directory:T.directory??"",title:T.title??"",version:T.version??"",share_url:T.share?.url??null,summary_additions:T.summary?.additions??null,summary_deletions:T.summary?.deletions??null,summary_files:T.summary?.files??null,summary_diffs:T.summary?.diffs??null,revert:T.revert??null,permission:T.permission??null,time_created:T.time?.created??C,time_updated:T.time?.updated??C,time_compacting:T.time?.compacting??null,time_archived:T.time?.archived??null})}e.sessions+=R(en,gn,"session"),$("sessions",G-g)}if(v.info("migrated sessions",{count:e.sessions}),l.sessions>0)v.warn("skipped orphaned sessions",{count:l.sessions});let pn=[],W=[],qn=new Map;for(let g of D){let G=k.basename(k.dirname(g));if(!z.has(G))continue;pn.push(g),W.push(G)}for(let g=0;g<pn.length;g+=A){let G=Math.min(g+A,pn.length),J=await K(pn,g,G),B=Array(J.length),T=0;for(let M=0;M<J.length;M++){let Z=J[M];if(!Z)continue;let P=pn[g+M],w=k.basename(P,".json"),Sn=W[g+M];qn.set(w,Sn);let Bn=Z;delete Bn.id,delete Bn.sessionID,B[T++]={id:w,session_id:Sn,time_created:Z.time?.created??C,time_updated:Z.time?.updated??C,data:Bn}}B.length=T,e.messages+=R(B,fo,"message"),$("messages",G-g)}v.info("migrated messages",{count:e.messages});for(let g=0;g<L.length;g+=A){let G=Math.min(g+A,L.length),J=await K(L,g,G),B=Array(J.length),T=0;for(let M=0;M<J.length;M++){let Z=J[M];if(!Z)continue;let P=L[g+M],w=k.basename(P,".json"),Sn=k.basename(k.dirname(P)),Bn=qn.get(Sn);if(!Bn){_.push(`part missing message session: ${P}`);continue}if(!z.has(Bn))continue;let jn=Z;delete jn.id,delete jn.messageID,delete jn.sessionID,B[T++]={id:w,message_id:Sn,session_id:Bn,time_created:Z.time?.created??C,time_updated:Z.time?.updated??C,data:jn}}B.length=T,e.parts+=R(B,zo,"part"),$("parts",G-g)}v.info("migrated parts",{count:e.parts});let An=u.map((g)=>k.basename(g,".json"));for(let g=0;g<u.length;g+=A){let G=Math.min(g+A,u.length),J=await K(u,g,G),B=[];for(let T=0;T<J.length;T++){let M=J[T];if(!M)continue;let Z=An[g+T];if(!z.has(Z)){l.todos++;continue}if(!Array.isArray(M)){_.push(`todo not an array: ${u[g+T]}`);continue}for(let P=0;P<M.length;P++){let w=M[P];if(!w?.content||!w?.status)continue;B.push({session_id:Z,content:w.content,status:w.status,position:P,time_created:C,time_updated:C})}}e.todos+=R(B,ko,"todo"),$("todos",G-g)}if(v.info("migrated todos",{count:e.todos}),l.todos>0)v.warn("skipped orphaned todos",{count:l.todos});let Fn=p.map((g)=>k.basename(g,".json")),Rn=[];for(let g=0;g<p.length;g+=A){let G=Math.min(g+A,p.length),J=await K(p,g,G);Rn.length=0;for(let B=0;B<J.length;B++){let T=J[B];if(!T)continue;let M=Fn[g+B];if(!I.has(M)){l.permissions++;continue}Rn.push({project_id:M,data:T})}e.permissions+=R(Rn,Vo,"permission"),$("permissions",G-g)}if(v.info("migrated permissions",{count:e.permissions}),l.permissions>0)v.warn("skipped orphaned permissions",{count:l.permissions});let an=m.map((g)=>k.basename(g,".json")),Gn=[];for(let g=0;g<m.length;g+=A){let G=Math.min(g+A,m.length),J=await K(m,g,G);Gn.length=0;for(let B=0;B<J.length;B++){let T=J[B];if(!T)continue;let M=an[g+B];if(!z.has(M)){l.shares++;continue}if(!T?.id||!T?.secret||!T?.url){_.push(`session_share missing id/secret/url: ${m[g+B]}`);continue}Gn.push({session_id:M,id:T.id,secret:T.secret,url:T.url})}e.shares+=R(Gn,co,"session_share"),$("shares",G-g)}if(v.info("migrated session shares",{count:e.shares}),l.shares>0)v.warn("skipped orphaned session shares",{count:l.shares});if(n.run("COMMIT"),v.info("json migration complete",{projects:e.projects,sessions:e.sessions,messages:e.messages,parts:e.parts,todos:e.todos,permissions:e.permissions,shares:e.shares,errorCount:e.errors.length,duration:Math.round(performance.now()-s)}),e.errors.length>0)v.warn("migration errors",{errors:e.errors.slice(0,20)});return i?.({current:f,total:f,label:"complete"}),e}var In={};On(In,{use:()=>Je,transaction:()=>Ke,textDecoder:()=>mt,sumDistinct:()=>tr,sum:()=>rr,sql:()=>H,relationsOrderToSQL:()=>ii,relationsFilterToSQL:()=>ti,relationToSQL:()=>mi,relationExtrasToSQL:()=>ei,processRelations:()=>Wt,placeholder:()=>kr,param:()=>Yr,orderSelectedFields:()=>ar,orderByOperators:()=>Vt,or:()=>po,operators:()=>kt,notLike:()=>Nt,notInArray:()=>st,notIlike:()=>lt,notExists:()=>pt,notBetween:()=>_t,not:()=>_o,noopMapper:()=>vr,noopEncoder:()=>Zr,noopDecoder:()=>Ur,ne:()=>so,name:()=>Wr,min:()=>er,max:()=>ir,mapUpdateSet:()=>br,mapResultRow:()=>Fr,mapRelationalRow:()=>wt,mapColumnsInSQLToAlias:()=>Ht,mapColumnsInAliasedSQLToAlias:()=>Jt,lte:()=>Ao,lt:()=>lo,like:()=>Io,l2Distance:()=>mr,l1Distance:()=>yr,jaccardDistance:()=>sr,isWithEnum:()=>ft,isView:()=>wr,isTable:()=>Lr,isSQLWrapper:()=>Kr,isNull:()=>$o,isNotNull:()=>Qo,isDriverValueEncoder:()=>Pr,isConfig:()=>et,is:()=>En,innerProduct:()=>fr,inArray:()=>Oo,ilike:()=>Tt,haveSameKeys:()=>jr,hasOwnEntityKind:()=>_r,hammingDistance:()=>ur,gte:()=>To,gt:()=>No,getViewSelectedFields:()=>ot,getViewName:()=>qr,getTableUniqueName:()=>Mr,getTableName:()=>Gr,getTableLikeName:()=>tt,getTableColumns:()=>nt,getTableAsAliasSQL:()=>yi,getOriginalColumnFromAlias:()=>Kt,getOrderByOperators:()=>ct,getColumns:()=>rt,getColumnTable:()=>Nr,getColumnNameAndConfig:()=>it,getChannelPath:()=>zi,fillPlaceholders:()=>Vr,fieldSelectionToSQL:()=>ri,extractTablesFromSchema:()=>ht,extractExtendedColumnType:()=>Tr,exists:()=>Bo,eq:()=>X,entityKind:()=>pr,effect:()=>He,desc:()=>Go,defineRelationsPart:()=>oi,defineRelations:()=>ni,createRelationsHelper:()=>bt,countDistinct:()=>ho,count:()=>uo,cosineDistance:()=>gr,close:()=>Ce,buildRelationsParts:()=>Ut,buildRelations:()=>Pt,bindIfParam:()=>ut,between:()=>Do,avgDistinct:()=>or,avg:()=>nr,assertUnreachable:()=>yt,asc:()=>Lo,arrayOverlaps:()=>dt,arrayContains:()=>At,arrayContained:()=>Ot,applyMixins:()=>hr,and:()=>Pn,aliasedTableColumn:()=>Ct,aliasedTable:()=>Gt,aliasedRelation:()=>xt,aliasedColumn:()=>Mt,WithSubquery:()=>Cr,ViewSelectionAliasProxyHandler:()=>Bt,ViewBaseConfig:()=>Jr,View:()=>cr,TransactionRollbackError:()=>Et,TableSchema:()=>Ar,TableColumns:()=>Or,TableAliasProxyHandler:()=>Dt,Table:()=>Ir,Subquery:()=>xr,StringChunk:()=>Rr,SQL:()=>Sr,RelationsHelperStatic:()=>jt,RelationsBuilderTable:()=>qt,RelationsBuilderJunctionColumn:()=>at,RelationsBuilderColumn:()=>Ft,RelationTableAliasProxyHandler:()=>Lt,Relation:()=>Zt,QueryPromise:()=>$t,Placeholder:()=>zr,Path:()=>Po,Param:()=>Xr,OriginalName:()=>$r,One:()=>vt,NotFoundError:()=>xe,NoopLogger:()=>ui,Name:()=>Er,Many:()=>Xt,IsAlias:()=>Br,FakePrimitiveParam:()=>Hr,ExtraConfigColumns:()=>dr,ExtraConfigBuilder:()=>Dr,DrizzleQueryError:()=>St,DrizzleError:()=>Rt,DefaultLogger:()=>gi,Count:()=>zt,ConsoleLogWriter:()=>fi,ColumnTableAliasProxyHandler:()=>Qt,ColumnBuilder:()=>lr,ColumnAliasProxyHandler:()=>It,Column:()=>Wn,Client:()=>Jn,CONSTANTS:()=>gt,BaseName:()=>Qr,AggregatedField:()=>Yt});import bi from"crypto";import Fo,{existsSync as hi,readdirSync as ne}from"fs";import{join as oe}from"path";function jo(n){if(Fo.existsSync(`${n.migrationsFolder}/meta/_journal.json`))throw Error('We detected that you have old drizzle-kit migration folders. You must upgrade drizzle-kit and run "drizzle-kit up"');let o=n.migrationsFolder,t=[],s=ne(o).map((e)=>({path:oe(o,e,"migration.sql"),name:e})).filter((e)=>hi(e.path));s.sort((e,l)=>e.name.localeCompare(l.name));for(let e of s){let l=e.path,_=e.name.slice(0,14),A=Fo.readFileSync(l).toString(),C=A.split("--> statement-breakpoint").map((K)=>{return K}),S=ao(_);t.push({sql:C,bps:!0,folderMillis:S,hash:bi.createHash("sha256").update(A).digest("hex"),name:e.name})}return t}function bo(n,o){if(Array.isArray(o)||"migrationsJournal"in o){let s=Array.isArray(o)?o:o.migrationsJournal,e=Array.isArray(o)?void 0:o.migrationsTable,l=s.map((_)=>({sql:_.sql.split("--> statement-breakpoint"),folderMillis:_.timestamp,hash:"",bps:!0,name:_.name}));return n.dialect.migrate(l,n.session,{migrationsTable:e})}let t=jo(o);return n.dialect.migrate(t,n.session,o)}function uo(n){return H`count(${n||H.raw("*")})`.mapWith(Number)}function ho(n){return H`count(distinct ${n})`.mapWith(Number)}function nr(n){return H`avg(${n})`.mapWith(String)}function or(n){return H`avg(distinct ${n})`.mapWith(String)}function rr(n){return H`sum(${n})`.mapWith(String)}function tr(n){return H`sum(distinct ${n})`.mapWith(String)}function ir(n){return H`max(${n})`.mapWith(En(n,Wn)?n:String)}function er(n){return H`min(${n})`.mapWith(En(n,Wn)?n:String)}function Mn(n){return JSON.stringify(n)}function mr(n,o){if(Array.isArray(o))return H`${n} <-> ${Mn(o)}`;return H`${n} <-> ${o}`}function yr(n,o){if(Array.isArray(o))return H`${n} <+> ${Mn(o)}`;return H`${n} <+> ${o}`}function fr(n,o){if(Array.isArray(o))return H`${n} <#> ${Mn(o)}`;return H`${n} <#> ${o}`}function gr(n,o){if(Array.isArray(o))return H`${n} <=> ${Mn(o)}`;return H`${n} <=> ${o}`}function ur(n,o){if(Array.isArray(o))return H`${n} <~> ${Mn(o)}`;return H`${n} <~> ${o}`}function sr(n,o){if(Array.isArray(o))return H`${n} <%> ${Mn(o)}`;return H`${n} <%> ${o}`}import io from"path";var Yn={};On(Yn,{workspaceID:()=>de,useEffect:()=>Be,use:()=>Qe,make:()=>$e,invalidate:()=>Ie,has:()=>De,get:()=>So,directory:()=>to,context:()=>Ro,bind:()=>Oe});import{EventEmitter as re}from"events";var Un=new re;var Mo=new Set;function si(n){return Mo.add(n),()=>{Mo.delete(n)}}async function xo(n){await Promise.allSettled([...Mo].map((o)=>o(n)))}function Zn(n){return n()}var xi={};On(xi,{setInitialized:()=>se,list:()=>ge,layer:()=>Mi,get:()=>ue,fromRow:()=>_n,defaultLayer:()=>Ko,UpdateInput:()=>fe,Service:()=>xn,Info:()=>Li,Event:()=>Gi});import*as F from"fs/promises";import*as Bi from"os";import*as $n from"path";var te=N.String.pipe(N.brand("ProjectID")),q=te.pipe(bn((n)=>({global:n.make("global"),zod:j.string().pipe(j.custom())})));import*as Dn from"fs/promises";import*as b from"path";import*as Ni from"crypto";async function Co(n){let o=b.resolve(n);while(!0){let t=b.join(o,".git"),s=await Dn.stat(t).catch(()=>null);if(s){if(s.isDirectory())return t;let _=(await Dn.readFile(t,"utf-8")).trim().match(/^gitdir:\s*(.+)$/);if(!_)return null;let A=b.isAbsolute(_[1])?_[1]:b.resolve(o,_[1]);return b.resolve(A,"../..")}let e=b.dirname(o);if(e===o)return null;o=e}}async function pi(n){let o=await Dn.readFile(n,"utf-8").catch(()=>null);if(o===null)return null;return o.trim()||null}async function _i(n){let o=await pi(n);if(o)return o;let t=Ni.randomUUID();try{return await Dn.writeFile(n,t,{flag:"wx"}),t}catch(s){if(s.code!=="EEXIST")throw s;let e=await pi(n);if(e)return e;throw Error(`Project ID file was concurrently created but is empty: ${n}`)}}async function Ti(n){let o=await Co(n);if(o){let s=b.join(o,"qitqode-project-id");return q.make(await _i(s))}let t=b.join(n,".qitqode-project-id");return q.make(await _i(t))}async function ee(n){let o=await Co(n);if(!o)return;let t=$n.join(n,".qitqode-project-id"),s=$n.join(o,"qitqode-project-id"),e=(A)=>F.access(A).then(()=>!0).catch(()=>!1);if(await e(t)){if(!await e(s)){let A=await F.readFile(t,"utf-8");await F.writeFile(s,A)}await F.unlink(t).catch(()=>{})}let l=$n.join(o,"info","exclude");if(await F.mkdir($n.dirname(l),{recursive:!0}),!(await F.readFile(l,"utf-8").catch(()=>"")).includes(".qitqode-project-id"))await F.appendFile(l,`
3
3
  .qitqode-project-id
4
4
  `)}var li=V.create({service:"project"}),me=262144,Ho=N.Literal("git"),Di=N.Struct({url:N.optional(N.String),override:N.optional(N.String),color:N.optional(N.String)}),Ii=N.Struct({start:N.optional(N.String.annotate({description:"Startup script to run when creating a new workspace (worktree)"}))}),ye=N.Struct({created:N.Number,updated:N.Number,initialized:N.optional(N.Number)}),Li=N.Struct({id:q,worktree:N.String,vcs:N.optional(Ho),name:N.optional(N.String),icon:N.optional(Di),commands:N.optional(Ii),time:ye,sandboxes:N.Array(N.String)}).annotate({identifier:"Project"}).pipe(bn((n)=>({zod:hn(n)}))),Gi={Updated:Qi.define("project.updated",Li.zod)};function _n(n){let o=n.icon_url||n.icon_color?{url:n.icon_url??void 0,color:n.icon_color??void 0}:void 0;return{id:n.id,worktree:n.worktree,vcs:n.vcs?N.decodeUnknownSync(Ho)(n.vcs):void 0,name:n.name??void 0,icon:o,time:{created:n.time_created,updated:n.time_updated,initialized:n.time_initialized??void 0},sandboxes:n.sandboxes,commands:n.commands??void 0}}var fe=j.object({projectID:q.zod,name:j.string().optional(),icon:hn(Di).optional(),commands:hn(Ii).optional()});class xn extends Qn.Service()("@qitqode/Project"){}var Mi=h.effect(xn,r.gen(function*(){let n=yield*c.Service,o=yield*Oi.Path,t=yield*no.ChildProcessSpawner,s=r.fnUntraced(function*(i,y){return yield*$i(t,i,y)},r.catch(()=>r.succeed({code:1,text:"",stderr:""}))),e=(i)=>r.sync(()=>In.use(i)),l=(i)=>r.sync(()=>Un.emit("event",{directory:"global",project:i.id,payload:{type:Gi.Updated.type,properties:i}})),_=N.decodeUnknownSync(N.optional(Ho))(nn.QITQODE_FAKE_VCS),A=(i,y)=>{if(!y)return i;if(y=y.replace(/[\r\n]+$/,""),!y)return i;if(y=c.windowsPath(y),o.isAbsolute(y))return o.normalize(y);return o.resolve(i,y)},C=yield*Ai.Scope,S=r.fn("Project.fromDirectory")(function*(i){li.info("fromDirectory",{directory:i});let y=yield*r.gen(function*(){if(nn.QITQODE_DISABLE_GIT)return{id:q.global,worktree:i,sandbox:i,vcs:_};let z=(yield*n.up({targets:[".git"],start:i}).pipe(r.orDie))[0];if(!z)return{id:q.global,worktree:"/",sandbox:"/",vcs:_};let en=o.dirname(z),pn=process.env.HOME??process.env.USERPROFILE??Bi.homedir();if(en===pn||$n.parse(en).root===en)return li.warn("ignoring .git at home or filesystem root, snapshots disabled",{dotgit:z}),{id:q.global,worktree:i,sandbox:i,vcs:_};let W=en,qn=yield*r.sync(()=>Jo("git")),An;if(!qn)return{id:An??q.global,worktree:W,sandbox:W,vcs:_};let Fn=yield*s(["rev-parse","--git-common-dir"],{cwd:W});if(Fn.code!==0)return{id:An??q.global,worktree:W,sandbox:W,vcs:_};let Rn=(()=>{let Gn=A(W,Fn.text.trim());return Gn===W?W:o.dirname(Gn)})();if(An==null)yield*r.promise(()=>ee(W)),An=yield*r.promise(()=>Ti(W));let an=yield*s(["rev-parse","--show-toplevel"],{cwd:W});if(an.code!==0)return{id:An,worktree:W,sandbox:W,vcs:_};return W=A(W,an.text.trim()),{id:An,sandbox:W,worktree:Rn,vcs:"git"}}),$=yield*e((U)=>U.select().from(x).where(X(x.id,y.id)).get()),I=$?_n($):{id:y.id,worktree:y.worktree,vcs:y.vcs,sandboxes:[],time:{created:Date.now(),updated:Date.now()}};if(nn.QITQODE_EXPERIMENTAL_ICON_DISCOVERY)yield*K(I).pipe(r.ignore,r.forkIn(C));let O={...I,worktree:y.worktree,vcs:y.vcs,time:{...I.time,updated:Date.now()}};if(y.sandbox!==O.worktree&&!O.sandboxes.includes(y.sandbox))O.sandboxes.push(y.sandbox);if(O.sandboxes=yield*r.forEach(O.sandboxes,(U)=>n.exists(U).pipe(r.orDie,r.map((z)=>z?U:void 0)),{concurrency:16}).pipe(r.map((U)=>U.filter((z)=>z!==void 0))),yield*e((U)=>U.insert(x).values({id:O.id,worktree:O.worktree,vcs:O.vcs??null,name:O.name,icon_url:O.icon?.url,icon_color:O.icon?.color,time_created:O.time.created,time_updated:O.time.updated,time_initialized:O.time.initialized,sandboxes:O.sandboxes,commands:O.commands}).onConflictDoUpdate({target:x.id,set:{worktree:O.worktree,vcs:O.vcs??null,name:O.name,icon_url:O.icon?.url,icon_color:O.icon?.color,time_updated:O.time.updated,time_initialized:O.time.initialized,sandboxes:O.sandboxes,commands:O.commands}}).run()),y.id!==q.global)yield*e((U)=>U.update(gn).set({project_id:y.id}).where(Pn(X(gn.project_id,q.global),X(gn.directory,y.worktree))).run());return yield*l(O),{project:O,sandbox:y.sandbox}}),K=r.fn("Project.discover")(function*(i){if(i.vcs!=="git")return;if(i.icon?.override)return;if(i.icon?.url)return;let $=(yield*n.glob("**/favicon.{ico,png,svg,jpg,jpeg,webp}",{cwd:i.worktree,absolute:!0,include:"file"}).pipe(r.orDie)).sort((pn,W)=>pn.length-W.length)[0];if(!$)return;let I=yield*n.stat($).pipe(r.orDie);if(Number(I.size)>me)return;let O=yield*n.readFile($).pipe(r.orDie),U=Buffer.from(O).toString("base64"),en=`data:${c.mimeType($)};base64,${U}`;yield*d({projectID:i.id,icon:{url:en}})}),R=r.fn("Project.list")(function*(){return yield*e((i)=>i.select().from(x).all().map(_n))}),E=r.fn("Project.get")(function*(i){let y=yield*e(($)=>$.select().from(x).where(X(x.id,i)).get());return y?_n(y):void 0}),d=r.fn("Project.update")(function*(i){let y=yield*e((I)=>I.update(x).set({name:i.name,icon_url:i.icon?.url,icon_color:i.icon?.color,commands:i.commands,time_updated:Date.now()}).where(X(x.id,i.projectID)).returning().get());if(!y)throw Error(`Project not found: ${i.projectID}`);let $=_n(y);return yield*l($),$}),D=r.fn("Project.initGit")(function*(i){if(i.project.vcs==="git")return i.project;if(!(yield*r.sync(()=>Jo("git"))))throw Error("Git is not installed");let y=yield*s(["init","--quiet"],{cwd:i.directory});if(y.code!==0)throw Error(y.stderr.trim()||y.text.trim()||"Failed to initialize git repository");let{project:$}=yield*S(i.directory);return $}),L=r.fn("Project.setInitialized")(function*(i){yield*e((y)=>y.update(x).set({time_initialized:Date.now()}).where(X(x.id,i)).run())}),u=r.fn("Project.sandboxes")(function*(i){let y=yield*e((I)=>I.select().from(x).where(X(x.id,i)).get());if(!y)return[];let $=_n(y);return yield*r.forEach($.sandboxes,(I)=>n.isDir(I).pipe(r.orDie,r.map((O)=>O?I:void 0)),{concurrency:16}).pipe(r.map((I)=>I.filter((O)=>O!==void 0)))}),p=r.fnUntraced(function*(i,y){let $=yield*e((I)=>I.update(x).set({sandboxes:y,time_updated:Date.now()}).where(X(x.id,i)).returning().get());if(!$)throw Error(`Project not found: ${i}`);yield*l(_n($))}),m=r.fn("Project.addSandbox")(function*(i,y){let $=yield*e((O)=>O.select().from(x).where(X(x.id,i)).get());if(!$)throw Error(`Project not found: ${i}`);let I=[...$.sandboxes];if(!I.includes(y))I.push(y);yield*p(i,I)}),f=r.fn("Project.removeSandbox")(function*(i,y){let $=yield*e((O)=>O.select().from(x).where(X(x.id,i)).get());if(!$)throw Error(`Project not found: ${i}`);let I=$.sandboxes.filter((O)=>O!==y);yield*p(i,I)});return xn.of({fromDirectory:S,discover:K,list:R,get:E,update:d,initGit:D,setInitialized:L,sandboxes:u,addSandbox:m,removeSandbox:f})})),Ko=Mi.pipe(h.provide(oo),h.provide(c.defaultLayer),h.provide(di.layer));function ge(){return In.use((n)=>n.select().from(x).all().map((o)=>_n(o)))}function ue(n){let o=In.use((t)=>t.select().from(x).where(X(x.id,n)).get());if(!o)return;return _n(o)}function se(n){In.use((o)=>o.update(x).set({time_initialized:Date.now()}).where(X(x.id,n)).run())}import{parse as pe}from"path";var rn=un.create("instance");Hi(()=>rn.use());var tn=new Map,_e=Ki(xn,Ko),Ne=new Set(["/etc","/proc","/sys","/dev","/boot","/root","/var","/private/etc","/private/var"]);function Te(n){if(n===pe(n).root)return"filesystem root is not a valid project directory";for(let o of Ne)if(n===o||c.contains(o,n))return"target is a protected system directory";return null}function le(n){let o=Te(n);if(o)throw Error("Access denied: "+o)}var vn={all:void 0};function Ci(n){return Zn(async()=>{let o=n.project&&n.worktree?{directory:n.directory,worktree:n.worktree,project:n.project}:await _e.runPromise((t)=>t.fromDirectory(n.directory)).then(({project:t,sandbox:s})=>({directory:n.directory,worktree:s,project:t}));return await rn.provide(o,async()=>{await n.init?.()}),o})}function Ji(n,o){let t=o.catch((s)=>{if(tn.get(n)===t)tn.delete(n);throw s});return tn.set(n,t),t}var on={async provide(n){let o=c.resolve(n.directory);le(o);let t=tn.get(o);if(!t)V.Default.info("creating instance",{directory:o}),t=Ji(o,Ci({directory:o,init:n.init}));let s=await t;return rn.provide(s,async()=>{return n.fn()})},get current(){return rn.use()},get directory(){return rn.use().directory},get worktree(){return rn.use().worktree},get project(){return rn.use().project},containsPath(n,o){let t=o??on;if(c.contains(t.directory,n))return!0;if(t.worktree==="/")return!1;return c.contains(t.worktree,n)},bind(n){let o=rn.use();return(...t)=>rn.provide(o,()=>n(...t))},restore(n,o){return rn.provide(n,o)},async reload(n){let o=c.resolve(n.directory);V.Default.info("reloading instance",{directory:o}),await xo(o),tn.delete(o);let t=Ji(o,Ci({...n,directory:o}));return Un.emit("event",{directory:o,project:n.project?.id,workspace:Nn.workspaceID,payload:{type:"server.instance.disposed",properties:{directory:o}}}),await t},async dispose(){let{directory:n,project:o}=on;V.Default.info("disposing instance",{directory:n}),await xo(n),tn.delete(n),Un.emit("event",{directory:n,project:o.id,workspace:Nn.workspaceID,payload:{type:"server.instance.disposed",properties:{directory:n}}})},async disposeAll(){if(vn.all)return vn.all;return vn.all=Zn(async()=>{V.Default.info("disposing all instances");let n=[...tn.entries()];for(let[o,t]of n){if(tn.get(o)!==t)continue;let s=await t.catch((e)=>{V.Default.warn("instance dispose failed",{key:o,error:e});return});if(!s){if(tn.get(o)===t)tn.delete(o);continue}if(tn.get(o)!==t)continue;await rn.provide(s,async()=>{await on.dispose()})}}).finally(()=>{vn.all=void 0}),vn.all}};var Ri="~qitqode/InstanceState",Oe=(n)=>{try{return on.bind(n)}catch(s){if(!(s instanceof un.NotFound))throw s}let o=Ln.getCurrent(),t=o?Qn.getReferenceUnsafe(o.context,Xn):void 0;if(!t)return n;return(...s)=>on.restore(t,()=>n(...s))},Ro=r.gen(function*(){return(yield*Xn)??on.current}),de=r.gen(function*(){return(yield*ro)??Nn.workspaceID}),to=r.map(Ro,(n)=>n.directory),$e=(n)=>r.gen(function*(){let o=yield*Cn.make({capacity:Number.POSITIVE_INFINITY,lookup:()=>r.gen(function*(){return yield*n(yield*Ro)})}),t=si((s)=>r.runPromise(Cn.invalidate(o,s).pipe(r.provide(Si))));return yield*r.addFinalizer(()=>r.sync(t)),{[Ri]:Ri,cache:o}}),So=(n)=>r.gen(function*(){return yield*Cn.get(n.cache,yield*to)}),Qe=(n,o)=>r.map(So(n),o),Be=(n,o)=>r.flatMap(So(n),o),De=(n)=>r.gen(function*(){return yield*Cn.has(n.cache,yield*to)}),Ie=(n)=>r.gen(function*(){return yield*Cn.invalidate(n.cache,yield*to)});var Pi={};On(Pi,{make:()=>Le});function Ei(n,o,t){if(n&&o!==void 0)return Nn.restore(o,()=>on.restore(n,t));if(n)return on.restore(n,t);if(o!==void 0)return Nn.restore(o,t);return t()}function Le(){return r.gen(function*(){let n=yield*r.context(),t=(yield*Xn)??(()=>{try{return on.current}catch(_){if(!(_ instanceof un.NotFound))throw _}})(),s=(yield*ro)??Nn.workspaceID,e=(_)=>Wi(_,{instance:t,workspace:s}),l=(_)=>e(_).pipe(r.provide(n));return{promise:(_)=>Ei(t,s,()=>r.runPromise(l(_))),fork:(_)=>Ei(t,s,()=>r.runFork(l(_)))}})}var Ui={};On(Ui,{make:()=>Ge,Cancelled:()=>zn});class zn extends N.TaggedErrorClass()("RunnerCancelled",{}){}var Ge=(n,o)=>{let t=Tn.makeUnsafe({_tag:"Idle"}),s=o?.onIdle??r.void,e=o?.onBusy??r.void,l=o?.onInterrupt,_=0,A=()=>Tn.getUnsafe(t),C=()=>{return _+=1,_},S=(m,f)=>kn.isFailure(f)&&Eo.hasInterruptsOnly(f.cause)?sn.fail(m,new zn).pipe(r.asVoid):sn.done(m,f).pipe(r.asVoid),K=()=>Tn.modify(t,(m)=>[m._tag==="Idle"?s:r.void,m]).pipe(r.flatten),R=(m,f,i)=>Tn.modify(t,(y)=>[r.gen(function*(){if(y._tag==="Running"&&y.run.id===m)yield*s;yield*S(f,i)}),y._tag==="Running"&&y.run.id===m?{_tag:"Idle"}:y]).pipe(r.flatten),E=(m,f)=>r.gen(function*(){let i=C(),y=yield*m.pipe(r.onExit(($)=>R(i,f,$)),r.forkIn(n));return{id:i,done:f,fiber:y}}),d=(m)=>Tn.modifyEffect(t,r.fnUntraced(function*(f){if(f._tag==="Shell"&&f.shell.id===m)return[s,{_tag:"Idle"}];if(f._tag==="ShellThenRun"&&f.shell.id===m){let i=yield*E(f.run.work,f.run.done);return[r.void,{_tag:"Running",run:i}]}return[r.void,f]})).pipe(r.flatten),D=(m)=>Ln.interrupt(m.fiber),L=(m)=>Tn.modifyEffect(t,r.fnUntraced(function*(f){switch(f._tag){case"Running":case"ShellThenRun":if(o?.onReentryWarn)yield*o.onReentryWarn({label:o.label??"(unlabeled)",existingRunId:f.run.id});return[sn.await(f.run.done),f];case"Shell":{let i={id:C(),done:yield*sn.make(),work:m};return[sn.await(i.done),{_tag:"ShellThenRun",shell:f.shell,run:i}]}case"Idle":{let i=yield*sn.make(),y=yield*E(m,i);return[sn.await(i),{_tag:"Running",run:y}]}}})).pipe(r.flatten,r.catch((f)=>f instanceof zn?l??r.die(f):r.fail(f))),u=(m)=>Tn.modifyEffect(t,r.fnUntraced(function*(f){if(f._tag!=="Idle")return[r.sync(()=>{if(o?.busy)o.busy();throw Error("Runner is busy")}),f];yield*e;let i=C(),y=yield*m.pipe(r.ensuring(d(i)),r.forkChild),$={id:i,fiber:y};return[r.gen(function*(){let I=yield*Ln.await(y);if(kn.isSuccess(I))return I.value;if(Eo.hasInterruptsOnly(I.cause)&&l)return yield*l;return yield*r.failCause(I.cause)}),{_tag:"Shell",shell:$}]})).pipe(r.flatten),p=Tn.modify(t,(m)=>{switch(m._tag){case"Idle":return[r.void,m];case"Running":return[r.gen(function*(){yield*Ln.interrupt(m.run.fiber);let f=yield*Ln.await(m.run.fiber);yield*S(m.run.done,f),yield*sn.await(m.run.done).pipe(r.exit,r.asVoid),yield*K()}),{_tag:"Idle"}];case"Shell":return[r.gen(function*(){yield*D(m.shell),yield*K()}),{_tag:"Idle"}];case"ShellThenRun":return[r.gen(function*(){yield*sn.fail(m.run.done,new zn).pipe(r.asVoid),yield*D(m.shell),yield*K()}),{_tag:"Idle"}]}}).pipe(r.flatten);return{get state(){return A()},get busy(){return A()._tag!=="Idle"},ensureRunning:L,startShell:u,cancel:p}};import{Database as Me}from"bun:sqlite";function vi(n){let o=new Me(n,{create:!0});return Zi({client:o})}var xe=eo.create("NotFoundError",j.object({message:j.string()})),Xi=V.create({service:"db"});function zi(){if(["latest","beta","prod"].includes(Wo)||nn.QITQODE_DISABLE_CHANNEL_DB)return io.join(dn.Path.data,"qitqode.db");let n=Wo.replace(/[^a-zA-Z0-9._-]/g,"-");return io.join(dn.Path.data,`qitqode-${n}.db`)}var Po=Zn(()=>{if(nn.QITQODE_DB){if(nn.QITQODE_DB===":memory:"||io.isAbsolute(nn.QITQODE_DB))return nn.QITQODE_DB;return io.join(dn.Path.data,nn.QITQODE_DB)}return zi()}),Jn=Yi(()=>{Xi.info("opening database",{path:Po});let n=vi(Po);n.run("PRAGMA journal_mode = WAL"),n.run("PRAGMA synchronous = NORMAL"),n.run("PRAGMA busy_timeout = 5000"),n.run("PRAGMA cache_size = -64000"),n.run("PRAGMA foreign_keys = ON"),n.run("PRAGMA wal_checkpoint(PASSIVE)");let o=[{sql:"CREATE TABLE `project` (\n\t`id` text PRIMARY KEY,\n\t`worktree` text NOT NULL,\n\t`vcs` text,\n\t`name` text,\n\t`icon_url` text,\n\t`icon_color` text,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\t`time_initialized` integer,\n\t`sandboxes` text NOT NULL\n);\n--> statement-breakpoint\nCREATE TABLE `message` (\n\t`id` text PRIMARY KEY,\n\t`session_id` text NOT NULL,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\t`data` text NOT NULL,\n\tCONSTRAINT `fk_message_session_id_session_id_fk` FOREIGN KEY (`session_id`) REFERENCES `session`(`id`) ON DELETE CASCADE\n);\n--> statement-breakpoint\nCREATE TABLE `part` (\n\t`id` text PRIMARY KEY,\n\t`message_id` text NOT NULL,\n\t`session_id` text NOT NULL,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\t`data` text NOT NULL,\n\tCONSTRAINT `fk_part_message_id_message_id_fk` FOREIGN KEY (`message_id`) REFERENCES `message`(`id`) ON DELETE CASCADE\n);\n--> statement-breakpoint\nCREATE TABLE `permission` (\n\t`project_id` text PRIMARY KEY,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\t`data` text NOT NULL,\n\tCONSTRAINT `fk_permission_project_id_project_id_fk` FOREIGN KEY (`project_id`) REFERENCES `project`(`id`) ON DELETE CASCADE\n);\n--> statement-breakpoint\nCREATE TABLE `session` (\n\t`id` text PRIMARY KEY,\n\t`project_id` text NOT NULL,\n\t`parent_id` text,\n\t`slug` text NOT NULL,\n\t`directory` text NOT NULL,\n\t`title` text NOT NULL,\n\t`version` text NOT NULL,\n\t`share_url` text,\n\t`summary_additions` integer,\n\t`summary_deletions` integer,\n\t`summary_files` integer,\n\t`summary_diffs` text,\n\t`revert` text,\n\t`permission` text,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\t`time_compacting` integer,\n\t`time_archived` integer,\n\tCONSTRAINT `fk_session_project_id_project_id_fk` FOREIGN KEY (`project_id`) REFERENCES `project`(`id`) ON DELETE CASCADE\n);\n--> statement-breakpoint\nCREATE TABLE `todo` (\n\t`session_id` text NOT NULL,\n\t`content` text NOT NULL,\n\t`status` text NOT NULL,\n\t`priority` text NOT NULL,\n\t`position` integer NOT NULL,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\tCONSTRAINT `todo_pk` PRIMARY KEY(`session_id`, `position`),\n\tCONSTRAINT `fk_todo_session_id_session_id_fk` FOREIGN KEY (`session_id`) REFERENCES `session`(`id`) ON DELETE CASCADE\n);\n--> statement-breakpoint\nCREATE TABLE `session_share` (\n\t`session_id` text PRIMARY KEY,\n\t`id` text NOT NULL,\n\t`secret` text NOT NULL,\n\t`url` text NOT NULL,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\tCONSTRAINT `fk_session_share_session_id_session_id_fk` FOREIGN KEY (`session_id`) REFERENCES `session`(`id`) ON DELETE CASCADE\n);\n--> statement-breakpoint\nCREATE INDEX `message_session_idx` ON `message` (`session_id`);--> statement-breakpoint\nCREATE INDEX `part_message_idx` ON `part` (`message_id`);--> statement-breakpoint\nCREATE INDEX `part_session_idx` ON `part` (`session_id`);--> statement-breakpoint\nCREATE INDEX `session_project_idx` ON `session` (`project_id`);--> statement-breakpoint\nCREATE INDEX `session_parent_idx` ON `session` (`parent_id`);--> statement-breakpoint\nCREATE INDEX `todo_session_idx` ON `todo` (`session_id`);",timestamp:1769552633000,name:"20260127222353_familiar_lady_ursula"},{sql:"ALTER TABLE `project` ADD `commands` text;",timestamp:1770830228000,name:"20260211171708_add_project_commands"},{sql:"CREATE TABLE `control_account` (\n\t`email` text NOT NULL,\n\t`url` text NOT NULL,\n\t`access_token` text NOT NULL,\n\t`refresh_token` text NOT NULL,\n\t`token_expiry` integer,\n\t`active` integer NOT NULL,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\tCONSTRAINT `control_account_pk` PRIMARY KEY(`email`, `url`)\n);\n",timestamp:1770993676000,name:"20260213144116_wakeful_the_professor"},{sql:"CREATE TABLE `workspace` (\n\t`id` text PRIMARY KEY,\n\t`branch` text,\n\t`project_id` text NOT NULL,\n\t`config` text NOT NULL,\n\tCONSTRAINT `fk_workspace_project_id_project_id_fk` FOREIGN KEY (`project_id`) REFERENCES `project`(`id`) ON DELETE CASCADE\n);\n",timestamp:1772056728000,name:"20260225215848_workspace"},{sql:"ALTER TABLE `session` ADD `workspace_id` text;--> statement-breakpoint\nCREATE INDEX `session_workspace_idx` ON `session` (`workspace_id`);",timestamp:1772228279000,name:"20260227213759_add_session_workspace_id"},{sql:"CREATE TABLE `account` (\n\t`id` text PRIMARY KEY,\n\t`email` text NOT NULL,\n\t`url` text NOT NULL,\n\t`access_token` text NOT NULL,\n\t`refresh_token` text NOT NULL,\n\t`token_expiry` integer,\n\t`selected_org_id` text,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL\n);\n--> statement-breakpoint\nCREATE TABLE `account_state` (\n\t`id` integer PRIMARY KEY NOT NULL,\n\t`active_account_id` text,\n\tFOREIGN KEY (`active_account_id`) REFERENCES `account`(`id`) ON UPDATE no action ON DELETE set null\n);\n",timestamp:1772310750000,name:"20260228203230_blue_harpoon"},{sql:"ALTER TABLE `workspace` ADD `type` text NOT NULL;--> statement-breakpoint\nALTER TABLE `workspace` ADD `name` text;--> statement-breakpoint\nALTER TABLE `workspace` ADD `directory` text;--> statement-breakpoint\nALTER TABLE `workspace` ADD `extra` text;--> statement-breakpoint\nALTER TABLE `workspace` DROP COLUMN `config`;",timestamp:1772579546000,name:"20260303231226_add_workspace_fields"},{sql:"ALTER TABLE `account_state` ADD `active_org_id` text;--> statement-breakpoint\nUPDATE `account_state` SET `active_org_id` = (SELECT `selected_org_id` FROM `account` WHERE `account`.`id` = `account_state`.`active_account_id`);--> statement-breakpoint\nALTER TABLE `account` DROP COLUMN `selected_org_id`;\n",timestamp:1773097200000,name:"20260309230000_move_org_to_state"},{sql:"DROP INDEX IF EXISTS `message_session_idx`;--> statement-breakpoint\nDROP INDEX IF EXISTS `part_message_idx`;--> statement-breakpoint\nCREATE INDEX `message_session_time_created_id_idx` ON `message` (`session_id`,`time_created`,`id`);--> statement-breakpoint\nCREATE INDEX `part_message_id_id_idx` ON `part` (`message_id`,`id`);",timestamp:1773290071000,name:"20260312043431_session_message_cursor"},{sql:"CREATE TABLE `event_sequence` (\n\t`aggregate_id` text PRIMARY KEY,\n\t`seq` integer NOT NULL\n);\n--> statement-breakpoint\nCREATE TABLE `event` (\n\t`id` text PRIMARY KEY,\n\t`aggregate_id` text NOT NULL,\n\t`seq` integer NOT NULL,\n\t`type` text NOT NULL,\n\t`data` text NOT NULL,\n\tCONSTRAINT `fk_event_aggregate_id_event_sequence_aggregate_id_fk` FOREIGN KEY (`aggregate_id`) REFERENCES `event_sequence`(`aggregate_id`) ON DELETE CASCADE\n);\n",timestamp:1774309702000,name:"20260323234822_events"},{sql:"PRAGMA foreign_keys=OFF;--> statement-breakpoint\nCREATE TABLE `__new_workspace` (\n\t`id` text PRIMARY KEY,\n\t`type` text NOT NULL,\n\t`name` text DEFAULT '' NOT NULL,\n\t`branch` text,\n\t`directory` text,\n\t`extra` text,\n\t`project_id` text NOT NULL,\n\tCONSTRAINT `fk_workspace_project_id_project_id_fk` FOREIGN KEY (`project_id`) REFERENCES `project`(`id`) ON DELETE CASCADE\n);\n--> statement-breakpoint\nINSERT INTO `__new_workspace`(`id`, `type`, `branch`, `name`, `directory`, `extra`, `project_id`) SELECT `id`, `type`, `branch`, `name`, `directory`, `extra`, `project_id` FROM `workspace`;--> statement-breakpoint\nDROP TABLE `workspace`;--> statement-breakpoint\nALTER TABLE `__new_workspace` RENAME TO `workspace`;--> statement-breakpoint\nPRAGMA foreign_keys=ON;",timestamp:1775843113000,name:"20260410174513_workspace-name"},{sql:"CREATE TABLE `session_entry` (\n\t`id` text PRIMARY KEY,\n\t`session_id` text NOT NULL,\n\t`type` text NOT NULL,\n\t`time_created` integer NOT NULL,\n\t`time_updated` integer NOT NULL,\n\t`data` text NOT NULL,\n\tCONSTRAINT `fk_session_entry_session_id_session_id_fk` FOREIGN KEY (`session_id`) REFERENCES `session`(`id`) ON DELETE CASCADE\n);\n--> statement-breakpoint\nCREATE INDEX `session_entry_session_idx` ON `session_entry` (`session_id`);--> statement-breakpoint\nCREATE INDEX `session_entry_session_type_idx` ON `session_entry` (`session_id`,`type`);--> statement-breakpoint\nCREATE INDEX `session_entry_time_created_idx` ON `session_entry` (`time_created`);",timestamp:1776103196000,name:"20260413175956_chief_energizer"},{sql:"ALTER TABLE `session` ADD `context_from` text;--> statement-breakpoint\nALTER TABLE `session` ADD `context_watermark` text;--> statement-breakpoint\nCREATE INDEX `session_context_from_idx` ON `session` (`context_from`);\n",timestamp:1776873600000,name:"20260422160000_context_inheritance"},{sql:"CREATE TABLE `task_registry` (\n `id` text PRIMARY KEY,\n `parent_session_id` text NOT NULL REFERENCES `session`(`id`) ON DELETE CASCADE,\n `status` text NOT NULL,\n `agent` text NOT NULL,\n `description` text NOT NULL,\n `context_mode` text NOT NULL,\n `background` integer NOT NULL,\n `last_turn_time` integer NOT NULL,\n `turn_count` integer NOT NULL DEFAULT 0,\n `error` text,\n `time_completed` integer,\n `time_created` integer NOT NULL,\n `time_updated` integer NOT NULL\n);--> statement-breakpoint\nCREATE INDEX `task_registry_parent_idx` ON `task_registry` (`parent_session_id`);--> statement-breakpoint\nCREATE INDEX `task_registry_status_idx` ON `task_registry` (`status`);--> statement-breakpoint\nCREATE INDEX `task_registry_status_last_turn_idx` ON `task_registry` (`status`, `last_turn_time`);\n",timestamp:1776877200000,name:"20260422170000_task_registry"},{sql:"DROP INDEX IF EXISTS `session_entry_session_idx`;--> statement-breakpoint\nDROP INDEX IF EXISTS `session_entry_session_type_idx`;--> statement-breakpoint\nDROP INDEX IF EXISTS `session_entry_time_created_idx`;--> statement-breakpoint\nDROP TABLE IF EXISTS `session_entry`;\n",timestamp:1776956061000,name:"20260423145421_remove_session_entry"},{sql:"DROP INDEX IF EXISTS `task_registry_parent_idx`;--> statement-breakpoint\nDROP INDEX IF EXISTS `task_registry_status_idx`;--> statement-breakpoint\nDROP INDEX IF EXISTS `task_registry_status_last_turn_idx`;--> statement-breakpoint\nALTER TABLE `task_registry` RENAME TO `actor_registry`;--> statement-breakpoint\nCREATE INDEX `actor_registry_parent_idx` ON `actor_registry` (`parent_session_id`);--> statement-breakpoint\nCREATE INDEX `actor_registry_status_idx` ON `actor_registry` (`status`);--> statement-breakpoint\nCREATE INDEX `actor_registry_status_last_turn_idx` ON `actor_registry` (`status`, `last_turn_time`);\n",timestamp:1778803200000,name:"20260515000000_actor_rename"},{sql:"CREATE TABLE `memory_fts` (\n `path` text PRIMARY KEY NOT NULL,\n `scope` text NOT NULL,\n `scope_id` text DEFAULT '' NOT NULL,\n `type` text NOT NULL,\n `body` text NOT NULL,\n `fingerprint` text NOT NULL,\n `last_indexed_at` integer NOT NULL\n);\n--> statement-breakpoint\nCREATE INDEX `memory_fts_scope_idx` ON `memory_fts` (`scope`, `scope_id`);\n--> statement-breakpoint\nCREATE INDEX `memory_fts_type_idx` ON `memory_fts` (`type`);\n--> statement-breakpoint\nCREATE VIRTUAL TABLE `memory_fts_idx` USING fts5(\n body,\n content='memory_fts',\n content_rowid='rowid',\n tokenize='unicode61 remove_diacritics 1'\n);\n--> statement-breakpoint\nCREATE TRIGGER `memory_fts_ai` AFTER INSERT ON `memory_fts` BEGIN\n INSERT INTO `memory_fts_idx`(rowid, body) VALUES (NEW.rowid, NEW.body);\nEND;\n--> statement-breakpoint\nCREATE TRIGGER `memory_fts_ad` AFTER DELETE ON `memory_fts` BEGIN\n DELETE FROM `memory_fts_idx` WHERE rowid = OLD.rowid;\nEND;\n--> statement-breakpoint\nCREATE TRIGGER `memory_fts_au` AFTER UPDATE ON `memory_fts` BEGIN\n DELETE FROM `memory_fts_idx` WHERE rowid = OLD.rowid;\n INSERT INTO `memory_fts_idx`(rowid, body) VALUES (NEW.rowid, NEW.body);\nEND;\n",timestamp:1778806800000,name:"20260515010000_memory_fts"},{sql:"CREATE TABLE `task` (\n `id` text NOT NULL,\n `session_id` text NOT NULL REFERENCES `session`(`id`) ON DELETE CASCADE,\n `parent_task_id` text,\n `kind` text NOT NULL DEFAULT 'user',\n `status` text NOT NULL,\n `focus` integer NOT NULL DEFAULT 0,\n `summary` text NOT NULL,\n `created_at` integer NOT NULL,\n `last_event_at` integer NOT NULL,\n `ended_at` integer,\n `cleanup_after` integer,\n PRIMARY KEY (`session_id`, `id`)\n);--> statement-breakpoint\nCREATE INDEX `task_session_idx` ON `task` (`session_id`);--> statement-breakpoint\nCREATE INDEX `task_parent_idx` ON `task` (`session_id`, `parent_task_id`);--> statement-breakpoint\nCREATE INDEX `task_status_idx` ON `task` (`status`);--> statement-breakpoint\nCREATE INDEX `task_kind_idx` ON `task` (`kind`);--> statement-breakpoint\nCREATE UNIQUE INDEX `task_focus_per_session_idx` ON `task` (`session_id`) WHERE focus = 1;--> statement-breakpoint\nCREATE TABLE `task_event` (\n `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,\n `session_id` text NOT NULL REFERENCES `session`(`id`) ON DELETE CASCADE,\n `task_id` text NOT NULL,\n `at` integer NOT NULL,\n `kind` text NOT NULL,\n `summary` text,\n FOREIGN KEY (`session_id`, `task_id`) REFERENCES `task`(`session_id`, `id`) ON DELETE CASCADE\n);--> statement-breakpoint\nCREATE INDEX `task_event_task_idx` ON `task_event` (`session_id`, `task_id`, `at`);\n",timestamp:1778810400000,name:"20260515020000_user_task"},{sql:"ALTER TABLE `session` ADD `last_checkpoint_message_id` text;\n",timestamp:1779148800000,name:"20260519000000_last_checkpoint_message_id"},{sql:"ALTER TABLE `message` ADD `agent_id` text;--> statement-breakpoint\nCREATE INDEX `message_session_agent_idx` ON `message` (`session_id`,`agent_id`,`id`);\n",timestamp:1779321600000,name:"20260521000000_message_agent_id"},{sql:"DROP TABLE `actor_registry`;--> statement-breakpoint\nCREATE TABLE `actor_registry` (\n `session_id` text NOT NULL REFERENCES `session`(`id`) ON DELETE CASCADE,\n `actor_id` text NOT NULL,\n `mode` text NOT NULL,\n `parent_actor_id` text,\n `status` text NOT NULL,\n `agent` text NOT NULL,\n `description` text NOT NULL,\n `context_mode` text NOT NULL,\n `context_watermark` text,\n `background` integer NOT NULL,\n `tools` text,\n `last_turn_time` integer NOT NULL,\n `turn_count` integer NOT NULL DEFAULT 0,\n `error` text,\n `time_completed` integer,\n `time_created` integer NOT NULL,\n `time_updated` integer NOT NULL,\n PRIMARY KEY (`session_id`, `actor_id`)\n);--> statement-breakpoint\nCREATE INDEX `actor_registry_session_agent_idx` ON `actor_registry` (`session_id`, `agent`);--> statement-breakpoint\nCREATE INDEX `actor_registry_session_parent_idx` ON `actor_registry` (`session_id`, `parent_actor_id`);--> statement-breakpoint\nCREATE INDEX `actor_registry_status_idx` ON `actor_registry` (`status`);--> statement-breakpoint\nCREATE INDEX `actor_registry_status_last_turn_idx` ON `actor_registry` (`status`, `last_turn_time`);\n",timestamp:1779321660000,name:"20260521000100_actor_registry_v6"},{sql:"DROP TRIGGER IF EXISTS `memory_fts_ai`;--> statement-breakpoint\nDROP TRIGGER IF EXISTS `memory_fts_ad`;--> statement-breakpoint\nDROP TRIGGER IF EXISTS `memory_fts_au`;--> statement-breakpoint\nDROP TABLE IF EXISTS `memory_fts_idx`;--> statement-breakpoint\nDROP TABLE IF EXISTS `memory_fts`;--> statement-breakpoint\nCREATE TABLE `memory_fts` (\n `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,\n `path` text NOT NULL UNIQUE,\n `scope` text NOT NULL,\n `scope_id` text DEFAULT '' NOT NULL,\n `type` text NOT NULL,\n `body` text NOT NULL,\n `fingerprint` text NOT NULL,\n `last_indexed_at` integer NOT NULL\n);--> statement-breakpoint\nCREATE INDEX `memory_fts_scope_idx` ON `memory_fts` (`scope`, `scope_id`);--> statement-breakpoint\nCREATE INDEX `memory_fts_type_idx` ON `memory_fts` (`type`);--> statement-breakpoint\nCREATE VIRTUAL TABLE `memory_fts_idx` USING fts5(\n body,\n content='memory_fts',\n content_rowid='id',\n tokenize='unicode61 remove_diacritics 1'\n);--> statement-breakpoint\nCREATE TRIGGER `memory_fts_ai` AFTER INSERT ON `memory_fts` BEGIN\n INSERT INTO `memory_fts_idx`(rowid, body) VALUES (NEW.id, NEW.body);\nEND;--> statement-breakpoint\nCREATE TRIGGER `memory_fts_ad` AFTER DELETE ON `memory_fts` BEGIN\n DELETE FROM `memory_fts_idx` WHERE rowid = OLD.id;\nEND;--> statement-breakpoint\nCREATE TRIGGER `memory_fts_au` AFTER UPDATE ON `memory_fts` BEGIN\n DELETE FROM `memory_fts_idx` WHERE rowid = OLD.id;\n INSERT INTO `memory_fts_idx`(rowid, body) VALUES (NEW.id, NEW.body);\nEND;\n",timestamp:1779325200000,name:"20260521010000_memory_fts_v6"},{sql:"-- Fix v6.1 trigger pattern: external content FTS5 vtab requires the 'delete'\n-- magic command to remove OLD body's tokens, NOT a plain DELETE FROM the vtab.\n-- The previous DELETE FROM pattern was contentless-mode syntax misapplied to\n-- external-content mode, leaving stale tokens accumulating until vtab corrupts.\nDROP TRIGGER IF EXISTS `memory_fts_ai`;--> statement-breakpoint\nDROP TRIGGER IF EXISTS `memory_fts_ad`;--> statement-breakpoint\nDROP TRIGGER IF EXISTS `memory_fts_au`;--> statement-breakpoint\nCREATE TRIGGER `memory_fts_ai` AFTER INSERT ON `memory_fts` BEGIN\n INSERT INTO `memory_fts_idx`(rowid, body) VALUES (NEW.id, NEW.body);\nEND;--> statement-breakpoint\nCREATE TRIGGER `memory_fts_ad` AFTER DELETE ON `memory_fts` BEGIN\n INSERT INTO `memory_fts_idx`(`memory_fts_idx`, rowid, body) VALUES('delete', OLD.id, OLD.body);\nEND;--> statement-breakpoint\nCREATE TRIGGER `memory_fts_au` AFTER UPDATE ON `memory_fts` BEGIN\n INSERT INTO `memory_fts_idx`(`memory_fts_idx`, rowid, body) VALUES('delete', OLD.id, OLD.body);\n INSERT INTO `memory_fts_idx`(rowid, body) VALUES (NEW.id, NEW.body);\nEND;\n",timestamp:1779328800000,name:"20260521020000_memory_fts_triggers"},{sql:"UPDATE `message` SET `agent_id` = 'main' WHERE `agent_id` IS NULL;--> statement-breakpoint\nCREATE TABLE `message_new` (\n `id` text PRIMARY KEY NOT NULL,\n `session_id` text NOT NULL REFERENCES `session`(`id`) ON DELETE CASCADE,\n `agent_id` text NOT NULL DEFAULT 'main',\n `time_created` integer NOT NULL,\n `time_updated` integer NOT NULL,\n `data` text NOT NULL\n);--> statement-breakpoint\nINSERT INTO `message_new` SELECT `id`, `session_id`, COALESCE(`agent_id`, 'main'), `time_created`, `time_updated`, `data` FROM `message`;--> statement-breakpoint\nDROP TABLE `message`;--> statement-breakpoint\nALTER TABLE `message_new` RENAME TO `message`;--> statement-breakpoint\nCREATE INDEX `message_session_time_created_id_idx` ON `message` (`session_id`,`time_created`,`id`);--> statement-breakpoint\nCREATE INDEX `message_session_agent_idx` ON `message` (`session_id`,`agent_id`,`id`);\n",timestamp:1779753600000,name:"20260526000000_agent_id_main"},{sql:"ALTER TABLE `actor_registry` ADD COLUMN `last_outcome` text;--> statement-breakpoint\nALTER TABLE `actor_registry` ADD COLUMN `lifecycle` text NOT NULL DEFAULT 'ephemeral';--> statement-breakpoint\nALTER TABLE `actor_registry` RENAME COLUMN `error` TO `last_error`;--> statement-breakpoint\nUPDATE `actor_registry` SET `last_outcome` = 'success' WHERE `status` = 'completed';--> statement-breakpoint\nUPDATE `actor_registry` SET `last_outcome` = 'failure' WHERE `status` = 'failed';--> statement-breakpoint\nUPDATE `actor_registry` SET `last_outcome` = 'cancelled' WHERE `status` = 'cancelled';--> statement-breakpoint\nUPDATE `actor_registry` SET `status` = 'idle' WHERE `status` IN ('completed','failed','cancelled');--> statement-breakpoint\nUPDATE `actor_registry` SET `lifecycle` = CASE `mode` WHEN 'peer' THEN 'persistent' WHEN 'main' THEN 'persistent' ELSE 'ephemeral' END;\n",timestamp:1779840000000,name:"20260527000000_actor_lifecycle"},{sql:"CREATE TABLE `inbox` (\n `id` text PRIMARY KEY NOT NULL,\n `receiver_session_id` text NOT NULL REFERENCES `session`(`id`) ON DELETE CASCADE,\n `receiver_actor_id` text NOT NULL,\n `sender_session_id` text,\n `sender_actor_id` text,\n `type` text NOT NULL DEFAULT 'text',\n `content` text NOT NULL,\n `created_at` integer NOT NULL\n);--> statement-breakpoint\nCREATE INDEX `inbox_receiver_idx` ON `inbox` (`receiver_session_id`,`receiver_actor_id`,`id`);--> statement-breakpoint\nCREATE INDEX `inbox_created_idx` ON `inbox` (`created_at`);\n",timestamp:1779840060000,name:"20260527000100_inbox"},{sql:"-- todo: drop priority column\nALTER TABLE `todo` DROP COLUMN `priority`;\n--> statement-breakpoint\n\n-- task: drop focus-dependent index before dropping its column\nDROP INDEX `task_focus_per_session_idx`;\n--> statement-breakpoint\nDROP INDEX `task_kind_idx`;\n--> statement-breakpoint\nALTER TABLE `task` DROP COLUMN `focus`;\n--> statement-breakpoint\nALTER TABLE `task` DROP COLUMN `kind`;\n--> statement-breakpoint\n\n-- migrate status values: proposed/active -> open\nUPDATE `task` SET `status` = 'open' WHERE `status` IN ('proposed', 'active');\n",timestamp:1780012800000,name:"20260529000000_task_todo_redesign"},{sql:"ALTER TABLE `task` ADD COLUMN `owner` text;\n",timestamp:1780444800000,name:"20260603000000_task_in_progress_owner"},{sql:"CREATE TABLE `workflow_run` (\n `id` text PRIMARY KEY NOT NULL,\n `session_id` text NOT NULL REFERENCES `session`(`id`) ON DELETE CASCADE,\n `name` text NOT NULL,\n `status` text NOT NULL,\n `running` integer NOT NULL DEFAULT 0,\n `succeeded` integer NOT NULL DEFAULT 0,\n `failed` integer NOT NULL DEFAULT 0,\n `current_phase` text,\n `parent_actor_id` text,\n `args` text,\n `error` text,\n `time_created` integer NOT NULL,\n `time_updated` integer NOT NULL\n);--> statement-breakpoint\nCREATE INDEX `workflow_run_session_idx` ON `workflow_run` (`session_id`);--> statement-breakpoint\nCREATE INDEX `workflow_run_status_idx` ON `workflow_run` (`status`);\n",timestamp:1780444800000,name:"20260603000000_workflow_run"},{sql:"ALTER TABLE `workflow_run` ADD COLUMN `script_sha` text;\n",timestamp:1780531200000,name:"20260604000000_workflow_script_sha"},{sql:"CREATE TABLE `claude_import` (\n `source_uuid` text PRIMARY KEY NOT NULL,\n `session_id` text NOT NULL,\n `source_path` text NOT NULL,\n `source_mtime` integer NOT NULL,\n `time_imported` integer NOT NULL\n);\n",timestamp:1780876800000,name:"20260608000000_claude_import"},{sql:"ALTER TABLE `claude_import` ADD `message_ids` text;\n",timestamp:1780880400000,name:"20260608010000_claude_import_message_ids"},{sql:"CREATE TABLE `history_fts` (\n `part_id` text PRIMARY KEY NOT NULL,\n `session_id` text NOT NULL,\n `message_id` text NOT NULL,\n `project_id` text NOT NULL,\n `kind` text NOT NULL,\n `tool_name` text,\n `body` text NOT NULL,\n `time_created` integer NOT NULL\n);--> statement-breakpoint\nCREATE INDEX `history_fts_session_idx` ON `history_fts` (`session_id`, `time_created`);--> statement-breakpoint\nCREATE INDEX `history_fts_project_idx` ON `history_fts` (`project_id`, `time_created`);--> statement-breakpoint\nCREATE INDEX `history_fts_message_idx` ON `history_fts` (`message_id`);--> statement-breakpoint\nCREATE VIRTUAL TABLE `history_fts_idx` USING fts5(\n body,\n content='history_fts',\n content_rowid='rowid',\n tokenize='unicode61 remove_diacritics 1'\n);--> statement-breakpoint\nCREATE TRIGGER `history_fts_ai` AFTER INSERT ON `history_fts` BEGIN\n INSERT INTO `history_fts_idx`(rowid, body) VALUES (NEW.rowid, NEW.body);\nEND;--> statement-breakpoint\nCREATE TRIGGER `history_fts_ad` AFTER DELETE ON `history_fts` BEGIN\n INSERT INTO `history_fts_idx`(`history_fts_idx`, rowid, body) VALUES('delete', OLD.rowid, OLD.body);\nEND;--> statement-breakpoint\nCREATE TRIGGER `history_fts_au` AFTER UPDATE ON `history_fts` BEGIN\n INSERT INTO `history_fts_idx`(`history_fts_idx`, rowid, body) VALUES('delete', OLD.rowid, OLD.body);\n INSERT INTO `history_fts_idx`(rowid, body) VALUES (NEW.rowid, NEW.body);\nEND;\n",timestamp:1780963200000,name:"20260609000000_history_fts"},{sql:"ALTER TABLE `workflow_run` ADD COLUMN `agent_timeout_ms` integer;\n",timestamp:1781046000000,name:"20260609230000_workflow_agent_timeout"},{sql:"CREATE TABLE `external_import` (\n `source` text NOT NULL,\n `source_key` text NOT NULL,\n `session_id` text NOT NULL,\n `source_path` text NOT NULL,\n `source_mtime` integer NOT NULL,\n `time_imported` integer NOT NULL,\n `message_ids` text,\n PRIMARY KEY (`source`, `source_key`)\n);\n\nINSERT INTO `external_import` (`source`, `source_key`, `session_id`, `source_path`, `source_mtime`, `time_imported`, `message_ids`)\nSELECT 'cc', `source_uuid`, `session_id`, `source_path`, `source_mtime`, `time_imported`, `message_ids`\nFROM `claude_import`;\n\nDROP TABLE `claude_import`;\n",timestamp:1781222400000,name:"20260612000000_external_import"}];if(o.length>0){if(Xi.info("applying migrations",{count:o.length,mode:"bundled"}),nn.QITQODE_SKIP_MIGRATIONS)for(let t of o)t.sql="select 1;";bo(n,o)}return n});function Ce(){Jn().$client.close(),Jn.reset()}var Vn=un.create("database");function Je(n){try{return n(Vn.use().tx)}catch(o){if(o instanceof un.NotFound){let t=[],s=Vn.provide({effects:t,tx:Jn()},()=>n(Jn()));for(let e of t)e();return s}throw o}}function He(n){let o=Yn.bind(n);try{Vn.use().effects.push(o)}catch{o()}}function Ke(n,o){try{return n(Vn.use().tx)}catch(t){if(t instanceof un.NotFound){let s=[],e=Yn.bind((_)=>Vn.provide({tx:_,effects:s},()=>n(_))),l=Jn().transaction(e,{behavior:o?.behavior});for(let _ of s)_();return l}throw t}}var ai={};On(ai,{layer:()=>Fi,defaultLayer:()=>we,Service:()=>yo,NotFoundError:()=>Xo});import Y from"path";var Hn={};On(Hn,{layer:()=>wi,defaultLayer:()=>Ee,Service:()=>mo,Git:()=>Hn});var Re=["--no-optional-locks","-c","core.autocrlf=false","-c","core.fsmonitor=false","-c","core.longpaths=true","-c","core.symlinks=true","-c","core.quotepath=false"],cn=(n)=>n.text().trim(),Uo=(n)=>n.split("\x00").filter(Boolean),Se=(n)=>({exitCode:1,text:()=>"",stdout:Buffer.alloc(0),stderr:Buffer.from(n instanceof Error?n.message:String(n))}),ki=(n)=>{if(n==="??")return"added";if(n.includes("U"))return"modified";if(n.includes("A")&&!n.includes("D"))return"added";if(n.includes("D")&&!n.includes("A"))return"deleted";return"modified"};class mo extends Qn.Service()("@qitqode/Git"){}var wi=h.effect(mo,r.gen(function*(){let n=yield*no.ChildProcessSpawner,o=r.fn("Git.run")(function*(u,p){let m=Vi.make("git",[...Re,...u],{cwd:p.cwd,env:p.env,extendEnv:!0,stdin:"ignore",stdout:"pipe",stderr:"pipe"}),f=yield*ci(n,m);return{exitCode:f.code,text:()=>f.text,stdout:Buffer.from(f.text),stderr:Buffer.from(f.stderr)}},r.scoped,r.catch((u)=>r.succeed(Se(u)))),t=r.fn("Git.text")(function*(u,p){return(yield*o(u,p)).text()}),s=r.fn("Git.lines")(function*(u,p){return(yield*t(u,p)).split(/\r?\n/).map((m)=>m.trim()).filter(Boolean)}),e=r.fnUntraced(function*(u){return yield*s(["for-each-ref","--format=%(refname:short)","refs/heads"],{cwd:u})}),l=r.fnUntraced(function*(u,p){let m=yield*o(["config","init.defaultBranch"],{cwd:u}),f=cn(m);if(!f||!p.includes(f))return;return{name:f,ref:f}}),_=r.fnUntraced(function*(u){let p=yield*s(["remote"],{cwd:u});if(p.includes("origin"))return"origin";if(p.length===1)return p[0];if(p.includes("upstream"))return"upstream";return p[0]}),A=r.fn("Git.branch")(function*(u){let p=yield*o(["symbolic-ref","--quiet","--short","HEAD"],{cwd:u});if(p.exitCode!==0)return;return cn(p)||void 0}),C=r.fn("Git.prefix")(function*(u){let p=yield*o(["rev-parse","--show-prefix"],{cwd:u});if(p.exitCode!==0)return"";return cn(p)}),S=r.fn("Git.defaultBranch")(function*(u){let p=yield*_(u);if(p){let i=yield*o(["symbolic-ref",`refs/remotes/${p}/HEAD`],{cwd:u});if(i.exitCode===0){let y=cn(i).replace(/^refs\/remotes\//,""),$=y.startsWith(`${p}/`)?y.slice(`${p}/`.length):"";if($)return{name:$,ref:y}}}let m=yield*e(u),f=yield*l(u,m);if(f)return f;if(m.includes("main"))return{name:"main",ref:"main"};if(m.includes("master"))return{name:"master",ref:"master"}}),K=r.fn("Git.hasHead")(function*(u){return(yield*o(["rev-parse","--verify","HEAD"],{cwd:u})).exitCode===0}),R=r.fn("Git.mergeBase")(function*(u,p,m="HEAD"){let f=yield*o(["merge-base",p,m],{cwd:u});if(f.exitCode!==0)return;return cn(f)||void 0}),E=r.fn("Git.show")(function*(u,p,m,f=""){let i=f?`${f}${m}`:m,y=yield*o(["show",`${p}:${i}`],{cwd:u});if(y.exitCode!==0)return"";if(y.stdout.includes(0))return"";return y.text()}),d=r.fn("Git.status")(function*(u){return Uo(yield*t(["status","--porcelain=v1","--untracked-files=all","--no-renames","-z","--","."],{cwd:u})).flatMap((p)=>{let m=p.slice(3);if(!m)return[];let f=p.slice(0,2);return[{file:m,code:f,status:ki(f)}]})}),D=r.fn("Git.diff")(function*(u,p){let m=Uo(yield*t(["diff","--no-ext-diff","--no-renames","--name-status","-z",p,"--","."],{cwd:u}));return m.flatMap((f,i)=>{if(i%2!==0)return[];let y=m[i+1];if(!f||!y)return[];return[{file:y,code:f,status:ki(f)}]})}),L=r.fn("Git.stats")(function*(u,p){return Uo(yield*t(["diff","--no-ext-diff","--no-renames","--numstat","-z",p,"--","."],{cwd:u})).flatMap((m)=>{let f=m.indexOf("\t"),i=m.indexOf("\t",f+1);if(f===-1||i===-1)return[];let y=m.slice(i+1);if(!y)return[];let $=m.slice(0,f),I=m.slice(f+1,i),O=$==="-"?0:Number.parseInt($||"0",10),U=I==="-"?0:Number.parseInt(I||"0",10);return[{file:y,additions:Number.isFinite(O)?O:0,deletions:Number.isFinite(U)?U:0}]})});return mo.of({run:o,branch:A,prefix:C,defaultBranch:S,hasHead:K,mergeBase:R,show:E,status:d,diff:D,stats:L})})),Ee=wi.pipe(h.provide(oo));var ln=V.create({service:"storage"}),Xo=eo.create("NotFoundError",j.object({message:j.string()})),We=N.Struct({path:N.optional(N.Struct({root:N.optional(N.String)}))}),Pe=N.Struct({id:N.String}),Ue=N.Struct({id:N.String}),Ze=N.Struct({additions:N.Number,deletions:N.Number}),ve=N.Struct({id:N.String,projectID:N.String,summary:N.Struct({diffs:N.Array(Ze)})}),Xe=N.decodeUnknownOption(We),Ye=N.decodeUnknownOption(Pe),ze=N.decodeUnknownOption(Ue),ke=N.decodeUnknownOption(ve);class yo extends Qn.Service()("@qitqode/Storage"){}function Ve(n,o){return Y.join(n,...o)+".json"}function Zo(n){if(!n||typeof n!=="object")return!1;if("code"in n&&n.code==="ENOENT")return!0;if("reason"in n&&n.reason&&typeof n.reason==="object"&&"_tag"in n.reason)return n.reason._tag==="NotFound";return!1}function ce(n){let o=Number.parseInt(n,10);return Number.isNaN(o)?0:o}var qi=[r.fn("Storage.migration.1")(function*(n,o,t){let s=Y.resolve(n,"../project");if(!(yield*o.isDir(s)))return;let e=yield*o.glob("*",{cwd:s,include:"all"});for(let l of e){let _=Y.join(s,l);if(!(yield*o.isDir(_)))continue;ln.info(`migrating project ${l}`);let A=l,C="/";if(A!=="global"){for(let R of yield*o.glob("storage/session/message/*/*.json",{cwd:_,absolute:!0})){let E=Xe(yield*o.readJson(R),{onExcessProperty:"preserve"}),d=wn.isSome(E)?E.value.path?.root:void 0;if(!d)continue;C=d;break}if(!C)continue;if(!(yield*o.isDir(C)))continue;let S=yield*t.run(["rev-list","--max-parents=0","--all"],{cwd:C}),[K]=S.text().split(`
5
- `).filter(Boolean).map((R)=>R.trim()).toSorted();if(!K)continue;A=K,yield*o.writeWithDirs(Y.join(n,"project",A+".json"),JSON.stringify({id:K,vcs:"git",worktree:C,time:{created:Date.now(),initialized:Date.now()}},null,2)),ln.info(`migrating sessions for project ${A}`);for(let R of yield*o.glob("storage/session/info/*.json",{cwd:_,absolute:!0})){let E=Y.join(n,"session",A,Y.basename(R));ln.info("copying",{sessionFile:R,dest:E});let d=yield*o.readJson(R),D=Ye(d,{onExcessProperty:"preserve"});if(yield*o.writeWithDirs(E,JSON.stringify(d,null,2)),wn.isNone(D))continue;ln.info(`migrating messages for session ${D.value.id}`);for(let L of yield*o.glob(`storage/session/message/${D.value.id}/*.json`,{cwd:_,absolute:!0})){let u=Y.join(n,"message",D.value.id,Y.basename(L));ln.info("copying",{msgFile:L,dest:u});let p=yield*o.readJson(L),m=ze(p,{onExcessProperty:"preserve"});if(yield*o.writeWithDirs(u,JSON.stringify(p,null,2)),wn.isNone(m))continue;ln.info(`migrating parts for message ${m.value.id}`);for(let f of yield*o.glob(`storage/session/part/${D.value.id}/${m.value.id}/*.json`,{cwd:_,absolute:!0})){let i=Y.join(n,"part",m.value.id,Y.basename(f)),y=yield*o.readJson(f);ln.info("copying",{partFile:f,dest:i}),yield*o.writeWithDirs(i,JSON.stringify(y,null,2))}}}}}}),r.fn("Storage.migration.2")(function*(n,o){for(let t of yield*o.glob("session/*/*.json",{cwd:n,absolute:!0})){let s=yield*o.readJson(t),e=ke(s,{onExcessProperty:"preserve"});if(wn.isNone(e))continue;let l=e.value.summary.diffs;yield*o.writeWithDirs(Y.join(n,"session_diff",e.value.id+".json"),JSON.stringify(l,null,2)),yield*o.writeWithDirs(Y.join(n,"session",e.value.projectID,e.value.id+".json"),JSON.stringify({...s,summary:{additions:l.reduce((_,A)=>_+A.additions,0),deletions:l.reduce((_,A)=>_+A.deletions,0)}},null,2))}})],Fi=h.effect(yo,r.gen(function*(){let n=yield*c.Service,o=yield*Hn.Service,t=yield*vo.make({lookup:()=>Kn.make(),idleTimeToLive:0}),s=yield*r.cached(r.gen(function*(){let d=Y.join(dn.Path.data,"storage"),D=Y.join(d,"migration"),L=yield*n.readFileString(D).pipe(r.map(ce),r.catchIf(Zo,()=>r.succeed(0)),r.orElseSucceed(()=>0));for(let u=L;u<qi.length;u++){ln.info("running migration",{index:u});let p=qi[u],m=yield*r.exit(p(d,n,o));if(kn.isFailure(m)){ln.error("failed to run migration",{index:u,cause:m.cause});break}yield*n.writeWithDirs(D,String(u+1))}return{dir:d}})),e=(d)=>r.fail(new Xo({message:`Resource not found: ${d}`})),l=(d,D)=>D.pipe(r.catchIf(Zo,()=>e(d))),_=r.fnUntraced(function*(d,D){yield*n.writeWithDirs(d,JSON.stringify(D,null,2))}),A=(d,D)=>r.scoped(r.gen(function*(){let L=Ve((yield*s).dir,d);return yield*D(L,yield*vo.get(t,L))})),C=r.fn("Storage.remove")(function*(d){yield*A(d,(D,L)=>Kn.withWriteLock(L,n.remove(D).pipe(r.catchIf(Zo,()=>r.void))))}),S=(d)=>r.gen(function*(){return yield*A(d,(L,u)=>Kn.withReadLock(u,l(L,n.readJson(L))))}),K=(d,D)=>r.gen(function*(){return yield*A(d,(u,p)=>Kn.withWriteLock(p,r.gen(function*(){let m=yield*l(u,n.readJson(u));return D(m),yield*_(u,m),m})))}),R=(d,D)=>r.gen(function*(){yield*A(d,(L,u)=>Kn.withWriteLock(u,_(L,D)))}),E=r.fn("Storage.list")(function*(d){let D=(yield*s).dir,L=Y.join(D,...d);return(yield*n.glob("**/*",{cwd:L,include:"file"}).pipe(r.catch(()=>r.succeed([])))).map((p)=>[...d,...p.slice(0,-5).split(Y.sep)]).toSorted((p,m)=>p.join("/").localeCompare(m.join("/")))});return yo.of({remove:C,read:S,update:K,write:R,list:E})})),we=Fi.pipe(h.provide(c.defaultLayer),h.provide(Hn.defaultLayer));export{Un as rl,si as sl,Zn as tl,mn as ul,x as vl,gn as wl,fo as xl,zo as yl,ko as zl,Vo as Al,co as Bl,qo as Cl,uo as Dl,In as El,Hn as Fl,Xo as Gl,ai as Hl,q as Il,Co as Jl,Ti as Kl,se as Ll,xi as Ml,Te as Nl,on as Ol,Yn as Pl,Le as Ql,Pi as Rl,Ui as Sl};
5
+ `).filter(Boolean).map((R)=>R.trim()).toSorted();if(!K)continue;A=K,yield*o.writeWithDirs(Y.join(n,"project",A+".json"),JSON.stringify({id:K,vcs:"git",worktree:C,time:{created:Date.now(),initialized:Date.now()}},null,2)),ln.info(`migrating sessions for project ${A}`);for(let R of yield*o.glob("storage/session/info/*.json",{cwd:_,absolute:!0})){let E=Y.join(n,"session",A,Y.basename(R));ln.info("copying",{sessionFile:R,dest:E});let d=yield*o.readJson(R),D=Ye(d,{onExcessProperty:"preserve"});if(yield*o.writeWithDirs(E,JSON.stringify(d,null,2)),wn.isNone(D))continue;ln.info(`migrating messages for session ${D.value.id}`);for(let L of yield*o.glob(`storage/session/message/${D.value.id}/*.json`,{cwd:_,absolute:!0})){let u=Y.join(n,"message",D.value.id,Y.basename(L));ln.info("copying",{msgFile:L,dest:u});let p=yield*o.readJson(L),m=ze(p,{onExcessProperty:"preserve"});if(yield*o.writeWithDirs(u,JSON.stringify(p,null,2)),wn.isNone(m))continue;ln.info(`migrating parts for message ${m.value.id}`);for(let f of yield*o.glob(`storage/session/part/${D.value.id}/${m.value.id}/*.json`,{cwd:_,absolute:!0})){let i=Y.join(n,"part",m.value.id,Y.basename(f)),y=yield*o.readJson(f);ln.info("copying",{partFile:f,dest:i}),yield*o.writeWithDirs(i,JSON.stringify(y,null,2))}}}}}}),r.fn("Storage.migration.2")(function*(n,o){for(let t of yield*o.glob("session/*/*.json",{cwd:n,absolute:!0})){let s=yield*o.readJson(t),e=ke(s,{onExcessProperty:"preserve"});if(wn.isNone(e))continue;let l=e.value.summary.diffs;yield*o.writeWithDirs(Y.join(n,"session_diff",e.value.id+".json"),JSON.stringify(l,null,2)),yield*o.writeWithDirs(Y.join(n,"session",e.value.projectID,e.value.id+".json"),JSON.stringify({...s,summary:{additions:l.reduce((_,A)=>_+A.additions,0),deletions:l.reduce((_,A)=>_+A.deletions,0)}},null,2))}})],Fi=h.effect(yo,r.gen(function*(){let n=yield*c.Service,o=yield*Hn.Service,t=yield*vo.make({lookup:()=>Kn.make(),idleTimeToLive:0}),s=yield*r.cached(r.gen(function*(){let d=Y.join(dn.Path.data,"storage"),D=Y.join(d,"migration"),L=yield*n.readFileString(D).pipe(r.map(ce),r.catchIf(Zo,()=>r.succeed(0)),r.orElseSucceed(()=>0));for(let u=L;u<qi.length;u++){ln.info("running migration",{index:u});let p=qi[u],m=yield*r.exit(p(d,n,o));if(kn.isFailure(m)){ln.error("failed to run migration",{index:u,cause:m.cause});break}yield*n.writeWithDirs(D,String(u+1))}return{dir:d}})),e=(d)=>r.fail(new Xo({message:`Resource not found: ${d}`})),l=(d,D)=>D.pipe(r.catchIf(Zo,()=>e(d))),_=r.fnUntraced(function*(d,D){yield*n.writeWithDirs(d,JSON.stringify(D,null,2))}),A=(d,D)=>r.scoped(r.gen(function*(){let L=Ve((yield*s).dir,d);return yield*D(L,yield*vo.get(t,L))})),C=r.fn("Storage.remove")(function*(d){yield*A(d,(D,L)=>Kn.withWriteLock(L,n.remove(D).pipe(r.catchIf(Zo,()=>r.void))))}),S=(d)=>r.gen(function*(){return yield*A(d,(L,u)=>Kn.withReadLock(u,l(L,n.readJson(L))))}),K=(d,D)=>r.gen(function*(){return yield*A(d,(u,p)=>Kn.withWriteLock(p,r.gen(function*(){let m=yield*l(u,n.readJson(u));return D(m),yield*_(u,m),m})))}),R=(d,D)=>r.gen(function*(){yield*A(d,(L,u)=>Kn.withWriteLock(u,_(L,D)))}),E=r.fn("Storage.list")(function*(d){let D=(yield*s).dir,L=Y.join(D,...d);return(yield*n.glob("**/*",{cwd:L,include:"file"}).pipe(r.catch(()=>r.succeed([])))).map((p)=>[...d,...p.slice(0,-5).split(Y.sep)]).toSorted((p,m)=>p.join("/").localeCompare(m.join("/")))});return yo.of({remove:C,read:S,update:K,write:R,list:E})})),we=Fi.pipe(h.provide(c.defaultLayer),h.provide(Hn.defaultLayer));export{Un as Ql,si as Rl,Zn as Sl,mn as Tl,x as Ul,gn as Vl,fo as Wl,zo as Xl,ko as Yl,Vo as Zl,co as _l,qo as $l,uo as am,In as bm,Hn as cm,Xo as dm,ai as em,q as fm,Co as gm,Ti as hm,se as im,xi as jm,Te as km,on as lm,Yn as mm,Le as nm,Pi as om,Ui as pm};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-aztre27e.js";var A="./tree-sitter-zig-e78zbjpm.wasm";export{A as default};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{PP as a,QP as b,RP as c,SP as d,TP as e,UP as f,VP as g,WP as h,XP as i,YP as j}from"./chunk-xpc2zgj7.js";import"./chunk-aztre27e.js";export{c as TreeCursor,b as Tree,f as Query,j as Parser,d as Node,i as MIN_COMPATIBLE_VERSION,a as LookaheadIterator,g as Language,h as LANGUAGE_VERSION,e as CaptureQuantifier};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import"./chunk-s2za1y84.js";var Ys=Object.defineProperty,is=(e)=>{throw TypeError(e)},rs=(e,t)=>{for(var s in t)Ys(e,s,{get:t[s],enumerable:!0})},Je=(e,t,s)=>t.has(e)||is("Cannot "+s),M=(e,t,s)=>(Je(e,t,"read from private field"),s?s.call(e):t.get(e)),J=(e,t,s)=>t.has(e)?is("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),Ne=(e,t,s,i)=>(Je(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),l=(e,t,s)=>(Je(e,t,"access private method"),s),ns={};rs(ns,{parsers:()=>as});var as={};rs(as,{__ng_action:()=>Vr,__ng_binding:()=>Wr,__ng_directive:()=>Kr,__ng_interpolation:()=>_r});var qr=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g"),nt;(function(e){e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom"})(nt||(nt={}));var at;(function(e){e[e.OnPush=0]="OnPush",e[e.Default=1]="Default"})(at||(at={}));var ot;(function(e){e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform"})(ot||(ot={}));var R;(function(e){e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL"})(R||(R={}));var lt;(function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Ignore=2]="Ignore"})(lt||(lt={}));var ut;(function(e){e[e.Directive=0]="Directive",e[e.Component=1]="Component",e[e.Injectable=2]="Injectable",e[e.Pipe=3]="Pipe",e[e.NgModule=4]="NgModule"})(ut||(ut={}));var ct;(function(e){e[e.Directive=0]="Directive",e[e.Pipe=1]="Pipe",e[e.NgModule=2]="NgModule"})(ct||(ct={}));var ht;(function(e){e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom"})(ht||(ht={}));var pt;(function(e){e[e.Little=0]="Little",e[e.Big=1]="Big"})(pt||(pt={}));var dt;(function(e){e[e.None=0]="None",e[e.Const=1]="Const"})(dt||(dt={}));var mt;(function(e){e[e.Dynamic=0]="Dynamic",e[e.Bool=1]="Bool",e[e.String=2]="String",e[e.Int=3]="Int",e[e.Number=4]="Number",e[e.Function=5]="Function",e[e.Inferred=6]="Inferred",e[e.None=7]="None"})(mt||(mt={}));var Xs=void 0,ft;(function(e){e[e.Minus=0]="Minus",e[e.Plus=1]="Plus"})(ft||(ft={}));var S;(function(e){e[e.Equals=0]="Equals",e[e.NotEquals=1]="NotEquals",e[e.Identical=2]="Identical",e[e.NotIdentical=3]="NotIdentical",e[e.Minus=4]="Minus",e[e.Plus=5]="Plus",e[e.Divide=6]="Divide",e[e.Multiply=7]="Multiply",e[e.Modulo=8]="Modulo",e[e.And=9]="And",e[e.Or=10]="Or",e[e.BitwiseOr=11]="BitwiseOr",e[e.BitwiseAnd=12]="BitwiseAnd",e[e.Lower=13]="Lower",e[e.LowerEquals=14]="LowerEquals",e[e.Bigger=15]="Bigger",e[e.BiggerEquals=16]="BiggerEquals",e[e.NullishCoalesce=17]="NullishCoalesce",e[e.Exponentiation=18]="Exponentiation",e[e.In=19]="In"})(S||(S={}));function Js(e,t){return e==null||t==null?e==t:e.isEquivalent(t)}function Zs(e,t,s){let i=e.length;if(i!==t.length)return!1;for(let r=0;r<i;r++)if(!s(e[r],t[r]))return!1;return!0}function Le(e,t){return Zs(e,t,(s,i)=>s.isEquivalent(i))}var I=class{type;sourceSpan;constructor(e,t){this.type=e||null,this.sourceSpan=t||null}prop(e,t){return new li(this,e,null,t)}key(e,t,s){return new ui(this,e,t,s)}callFn(e,t,s){return new ri(this,e,null,t,s)}instantiate(e,t,s){return new ni(this,e,t,s)}conditional(e,t=null,s){return new oi(this,e,t,null,s)}equals(e,t){return new C(S.Equals,this,e,null,t)}notEquals(e,t){return new C(S.NotEquals,this,e,null,t)}identical(e,t){return new C(S.Identical,this,e,null,t)}notIdentical(e,t){return new C(S.NotIdentical,this,e,null,t)}minus(e,t){return new C(S.Minus,this,e,null,t)}plus(e,t){return new C(S.Plus,this,e,null,t)}divide(e,t){return new C(S.Divide,this,e,null,t)}multiply(e,t){return new C(S.Multiply,this,e,null,t)}modulo(e,t){return new C(S.Modulo,this,e,null,t)}power(e,t){return new C(S.Exponentiation,this,e,null,t)}and(e,t){return new C(S.And,this,e,null,t)}bitwiseOr(e,t){return new C(S.BitwiseOr,this,e,null,t)}bitwiseAnd(e,t){return new C(S.BitwiseAnd,this,e,null,t)}or(e,t){return new C(S.Or,this,e,null,t)}lower(e,t){return new C(S.Lower,this,e,null,t)}lowerEquals(e,t){return new C(S.LowerEquals,this,e,null,t)}bigger(e,t){return new C(S.Bigger,this,e,null,t)}biggerEquals(e,t){return new C(S.BiggerEquals,this,e,null,t)}isBlank(e){return this.equals(TYPED_NULL_EXPR,e)}nullishCoalesce(e,t){return new C(S.NullishCoalesce,this,e,null,t)}toStmt(){return new di(this,null)}},os=class e extends I{name;constructor(t,s,i){super(s,i),this.name=t}isEquivalent(t){return t instanceof e&&this.name===t.name}isConstant(){return!1}visitExpression(t,s){return t.visitReadVarExpr(this,s)}clone(){return new e(this.name,this.type,this.sourceSpan)}set(t){return new ti(this.name,t,null,this.sourceSpan)}},ei=class e extends I{expr;constructor(t,s,i){super(s,i),this.expr=t}visitExpression(t,s){return t.visitTypeofExpr(this,s)}isEquivalent(t){return t instanceof e&&t.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new e(this.expr.clone())}},ti=class e extends I{name;value;constructor(t,s,i,r){super(i||s.type,r),this.name=t,this.value=s}isEquivalent(t){return t instanceof e&&this.name===t.name&&this.value.isEquivalent(t.value)}isConstant(){return!1}visitExpression(t,s){return t.visitWriteVarExpr(this,s)}clone(){return new e(this.name,this.value.clone(),this.type,this.sourceSpan)}toDeclStmt(t,s){return new pi(this.name,this.value,t,s,this.sourceSpan)}toConstDecl(){return this.toDeclStmt(Xs,ce.Final)}},si=class e extends I{receiver;index;value;constructor(t,s,i,r,a){super(r||i.type,a),this.receiver=t,this.index=s,this.value=i}isEquivalent(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.index.isEquivalent(t.index)&&this.value.isEquivalent(t.value)}isConstant(){return!1}visitExpression(t,s){return t.visitWriteKeyExpr(this,s)}clone(){return new e(this.receiver.clone(),this.index.clone(),this.value.clone(),this.type,this.sourceSpan)}},ii=class e extends I{receiver;name;value;constructor(t,s,i,r,a){super(r||i.type,a),this.receiver=t,this.name=s,this.value=i}isEquivalent(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.name===t.name&&this.value.isEquivalent(t.value)}isConstant(){return!1}visitExpression(t,s){return t.visitWritePropExpr(this,s)}clone(){return new e(this.receiver.clone(),this.name,this.value.clone(),this.type,this.sourceSpan)}},ri=class e extends I{fn;args;pure;constructor(t,s,i,r,a=!1){super(i,r),this.fn=t,this.args=s,this.pure=a}get receiver(){return this.fn}isEquivalent(t){return t instanceof e&&this.fn.isEquivalent(t.fn)&&Le(this.args,t.args)&&this.pure===t.pure}isConstant(){return!1}visitExpression(t,s){return t.visitInvokeFunctionExpr(this,s)}clone(){return new e(this.fn.clone(),this.args.map((t)=>t.clone()),this.type,this.sourceSpan,this.pure)}},ni=class e extends I{classExpr;args;constructor(t,s,i,r){super(i,r),this.classExpr=t,this.args=s}isEquivalent(t){return t instanceof e&&this.classExpr.isEquivalent(t.classExpr)&&Le(this.args,t.args)}isConstant(){return!1}visitExpression(t,s){return t.visitInstantiateExpr(this,s)}clone(){return new e(this.classExpr.clone(),this.args.map((t)=>t.clone()),this.type,this.sourceSpan)}},vt=class e extends I{value;constructor(t,s,i){super(s,i),this.value=t}isEquivalent(t){return t instanceof e&&this.value===t.value}isConstant(){return!0}visitExpression(t,s){return t.visitLiteralExpr(this,s)}clone(){return new e(this.value,this.type,this.sourceSpan)}},ai=class e extends I{value;typeParams;constructor(t,s,i=null,r){super(s,r),this.value=t,this.typeParams=i}isEquivalent(t){return t instanceof e&&this.value.name===t.value.name&&this.value.moduleName===t.value.moduleName}isConstant(){return!1}visitExpression(t,s){return t.visitExternalExpr(this,s)}clone(){return new e(this.value,this.type,this.typeParams,this.sourceSpan)}},oi=class e extends I{condition;falseCase;trueCase;constructor(t,s,i=null,r,a){super(r||s.type,a),this.condition=t,this.falseCase=i,this.trueCase=s}isEquivalent(t){return t instanceof e&&this.condition.isEquivalent(t.condition)&&this.trueCase.isEquivalent(t.trueCase)&&Js(this.falseCase,t.falseCase)}isConstant(){return!1}visitExpression(t,s){return t.visitConditionalExpr(this,s)}clone(){var t;return new e(this.condition.clone(),this.trueCase.clone(),(t=this.falseCase)==null?void 0:t.clone(),this.type,this.sourceSpan)}},C=class e extends I{operator;rhs;lhs;constructor(t,s,i,r,a){super(r||s.type,a),this.operator=t,this.rhs=i,this.lhs=s}isEquivalent(t){return t instanceof e&&this.operator===t.operator&&this.lhs.isEquivalent(t.lhs)&&this.rhs.isEquivalent(t.rhs)}isConstant(){return!1}visitExpression(t,s){return t.visitBinaryOperatorExpr(this,s)}clone(){return new e(this.operator,this.lhs.clone(),this.rhs.clone(),this.type,this.sourceSpan)}},li=class e extends I{receiver;name;constructor(t,s,i,r){super(i,r),this.receiver=t,this.name=s}get index(){return this.name}isEquivalent(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.name===t.name}isConstant(){return!1}visitExpression(t,s){return t.visitReadPropExpr(this,s)}set(t){return new ii(this.receiver,this.name,t,null,this.sourceSpan)}clone(){return new e(this.receiver.clone(),this.name,this.type,this.sourceSpan)}},ui=class e extends I{receiver;index;constructor(t,s,i,r){super(i,r),this.receiver=t,this.index=s}isEquivalent(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.index.isEquivalent(t.index)}isConstant(){return!1}visitExpression(t,s){return t.visitReadKeyExpr(this,s)}set(t){return new si(this.receiver,this.index,t,null,this.sourceSpan)}clone(){return new e(this.receiver.clone(),this.index.clone(),this.type,this.sourceSpan)}},ci=class e extends I{entries;constructor(t,s,i){super(s,i),this.entries=t}isConstant(){return this.entries.every((t)=>t.isConstant())}isEquivalent(t){return t instanceof e&&Le(this.entries,t.entries)}visitExpression(t,s){return t.visitLiteralArrayExpr(this,s)}clone(){return new e(this.entries.map((t)=>t.clone()),this.type,this.sourceSpan)}},hi=class e extends I{entries;valueType=null;constructor(t,s,i){super(s,i),this.entries=t,s&&(this.valueType=s.valueType)}isEquivalent(t){return t instanceof e&&Le(this.entries,t.entries)}isConstant(){return this.entries.every((t)=>t.value.isConstant())}visitExpression(t,s){return t.visitLiteralMapExpr(this,s)}clone(){let t=this.entries.map((s)=>s.clone());return new e(t,this.type,this.sourceSpan)}},ce;(function(e){e[e.None=0]="None",e[e.Final=1]="Final",e[e.Private=2]="Private",e[e.Exported=4]="Exported",e[e.Static=8]="Static"})(ce||(ce={}));var ls=class{modifiers;sourceSpan;leadingComments;constructor(e=ce.None,t=null,s){this.modifiers=e,this.sourceSpan=t,this.leadingComments=s}hasModifier(e){return(this.modifiers&e)!==0}addLeadingComment(e){this.leadingComments=this.leadingComments??[],this.leadingComments.push(e)}},pi=class e extends ls{name;value;type;constructor(t,s,i,r,a,o){super(r,a,o),this.name=t,this.value=s,this.type=i||s&&s.type||null}isEquivalent(t){return t instanceof e&&this.name===t.name&&(this.value?!!t.value&&this.value.isEquivalent(t.value):!t.value)}visitStatement(t,s){return t.visitDeclareVarStmt(this,s)}},di=class e extends ls{expr;constructor(t,s,i){super(ce.None,s,i),this.expr=t}isEquivalent(t){return t instanceof e&&this.expr.isEquivalent(t.expr)}visitStatement(t,s){return t.visitExpressionStmt(this,s)}};function mi(e,t,s){return new os(e,t,s)}var $r=mi("<unknown>"),Hr=class e{static INSTANCE=new e;keyOf(t){if(t instanceof vt&&typeof t.value=="string")return`"${t.value}"`;if(t instanceof vt)return String(t.value);if(t instanceof ci){let s=[];for(let i of t.entries)s.push(this.keyOf(i));return`[${s.join(",")}]`}else if(t instanceof hi){let s=[];for(let i of t.entries){let r=i.key;i.quoted&&(r=`"${r}"`),s.push(r+":"+this.keyOf(i.value))}return`{${s.join(",")}}`}else{if(t instanceof ai)return`import("${t.value.moduleName}", ${t.value.name})`;if(t instanceof os)return`read(${t.name})`;if(t instanceof ei)return`typeof(${this.keyOf(t.expr)})`;throw Error(`${this.constructor.name} does not handle expressions of type ${t.constructor.name}`)}}},n="@angular/core",c=class{static NEW_METHOD="factory";static TRANSFORM_METHOD="transform";static PATCH_DEPS="patchedDeps";static core={name:null,moduleName:n};static namespaceHTML={name:"\u0275\u0275namespaceHTML",moduleName:n};static namespaceMathML={name:"\u0275\u0275namespaceMathML",moduleName:n};static namespaceSVG={name:"\u0275\u0275namespaceSVG",moduleName:n};static element={name:"\u0275\u0275element",moduleName:n};static elementStart={name:"\u0275\u0275elementStart",moduleName:n};static elementEnd={name:"\u0275\u0275elementEnd",moduleName:n};static advance={name:"\u0275\u0275advance",moduleName:n};static syntheticHostProperty={name:"\u0275\u0275syntheticHostProperty",moduleName:n};static syntheticHostListener={name:"\u0275\u0275syntheticHostListener",moduleName:n};static attribute={name:"\u0275\u0275attribute",moduleName:n};static classProp={name:"\u0275\u0275classProp",moduleName:n};static elementContainerStart={name:"\u0275\u0275elementContainerStart",moduleName:n};static elementContainerEnd={name:"\u0275\u0275elementContainerEnd",moduleName:n};static elementContainer={name:"\u0275\u0275elementContainer",moduleName:n};static styleMap={name:"\u0275\u0275styleMap",moduleName:n};static classMap={name:"\u0275\u0275classMap",moduleName:n};static styleProp={name:"\u0275\u0275styleProp",moduleName:n};static interpolate={name:"\u0275\u0275interpolate",moduleName:n};static interpolate1={name:"\u0275\u0275interpolate1",moduleName:n};static interpolate2={name:"\u0275\u0275interpolate2",moduleName:n};static interpolate3={name:"\u0275\u0275interpolate3",moduleName:n};static interpolate4={name:"\u0275\u0275interpolate4",moduleName:n};static interpolate5={name:"\u0275\u0275interpolate5",moduleName:n};static interpolate6={name:"\u0275\u0275interpolate6",moduleName:n};static interpolate7={name:"\u0275\u0275interpolate7",moduleName:n};static interpolate8={name:"\u0275\u0275interpolate8",moduleName:n};static interpolateV={name:"\u0275\u0275interpolateV",moduleName:n};static nextContext={name:"\u0275\u0275nextContext",moduleName:n};static resetView={name:"\u0275\u0275resetView",moduleName:n};static templateCreate={name:"\u0275\u0275template",moduleName:n};static defer={name:"\u0275\u0275defer",moduleName:n};static deferWhen={name:"\u0275\u0275deferWhen",moduleName:n};static deferOnIdle={name:"\u0275\u0275deferOnIdle",moduleName:n};static deferOnImmediate={name:"\u0275\u0275deferOnImmediate",moduleName:n};static deferOnTimer={name:"\u0275\u0275deferOnTimer",moduleName:n};static deferOnHover={name:"\u0275\u0275deferOnHover",moduleName:n};static deferOnInteraction={name:"\u0275\u0275deferOnInteraction",moduleName:n};static deferOnViewport={name:"\u0275\u0275deferOnViewport",moduleName:n};static deferPrefetchWhen={name:"\u0275\u0275deferPrefetchWhen",moduleName:n};static deferPrefetchOnIdle={name:"\u0275\u0275deferPrefetchOnIdle",moduleName:n};static deferPrefetchOnImmediate={name:"\u0275\u0275deferPrefetchOnImmediate",moduleName:n};static deferPrefetchOnTimer={name:"\u0275\u0275deferPrefetchOnTimer",moduleName:n};static deferPrefetchOnHover={name:"\u0275\u0275deferPrefetchOnHover",moduleName:n};static deferPrefetchOnInteraction={name:"\u0275\u0275deferPrefetchOnInteraction",moduleName:n};static deferPrefetchOnViewport={name:"\u0275\u0275deferPrefetchOnViewport",moduleName:n};static deferHydrateWhen={name:"\u0275\u0275deferHydrateWhen",moduleName:n};static deferHydrateNever={name:"\u0275\u0275deferHydrateNever",moduleName:n};static deferHydrateOnIdle={name:"\u0275\u0275deferHydrateOnIdle",moduleName:n};static deferHydrateOnImmediate={name:"\u0275\u0275deferHydrateOnImmediate",moduleName:n};static deferHydrateOnTimer={name:"\u0275\u0275deferHydrateOnTimer",moduleName:n};static deferHydrateOnHover={name:"\u0275\u0275deferHydrateOnHover",moduleName:n};static deferHydrateOnInteraction={name:"\u0275\u0275deferHydrateOnInteraction",moduleName:n};static deferHydrateOnViewport={name:"\u0275\u0275deferHydrateOnViewport",moduleName:n};static deferEnableTimerScheduling={name:"\u0275\u0275deferEnableTimerScheduling",moduleName:n};static conditionalCreate={name:"\u0275\u0275conditionalCreate",moduleName:n};static conditionalBranchCreate={name:"\u0275\u0275conditionalBranchCreate",moduleName:n};static conditional={name:"\u0275\u0275conditional",moduleName:n};static repeater={name:"\u0275\u0275repeater",moduleName:n};static repeaterCreate={name:"\u0275\u0275repeaterCreate",moduleName:n};static repeaterTrackByIndex={name:"\u0275\u0275repeaterTrackByIndex",moduleName:n};static repeaterTrackByIdentity={name:"\u0275\u0275repeaterTrackByIdentity",moduleName:n};static componentInstance={name:"\u0275\u0275componentInstance",moduleName:n};static text={name:"\u0275\u0275text",moduleName:n};static enableBindings={name:"\u0275\u0275enableBindings",moduleName:n};static disableBindings={name:"\u0275\u0275disableBindings",moduleName:n};static getCurrentView={name:"\u0275\u0275getCurrentView",moduleName:n};static textInterpolate={name:"\u0275\u0275textInterpolate",moduleName:n};static textInterpolate1={name:"\u0275\u0275textInterpolate1",moduleName:n};static textInterpolate2={name:"\u0275\u0275textInterpolate2",moduleName:n};static textInterpolate3={name:"\u0275\u0275textInterpolate3",moduleName:n};static textInterpolate4={name:"\u0275\u0275textInterpolate4",moduleName:n};static textInterpolate5={name:"\u0275\u0275textInterpolate5",moduleName:n};static textInterpolate6={name:"\u0275\u0275textInterpolate6",moduleName:n};static textInterpolate7={name:"\u0275\u0275textInterpolate7",moduleName:n};static textInterpolate8={name:"\u0275\u0275textInterpolate8",moduleName:n};static textInterpolateV={name:"\u0275\u0275textInterpolateV",moduleName:n};static restoreView={name:"\u0275\u0275restoreView",moduleName:n};static pureFunction0={name:"\u0275\u0275pureFunction0",moduleName:n};static pureFunction1={name:"\u0275\u0275pureFunction1",moduleName:n};static pureFunction2={name:"\u0275\u0275pureFunction2",moduleName:n};static pureFunction3={name:"\u0275\u0275pureFunction3",moduleName:n};static pureFunction4={name:"\u0275\u0275pureFunction4",moduleName:n};static pureFunction5={name:"\u0275\u0275pureFunction5",moduleName:n};static pureFunction6={name:"\u0275\u0275pureFunction6",moduleName:n};static pureFunction7={name:"\u0275\u0275pureFunction7",moduleName:n};static pureFunction8={name:"\u0275\u0275pureFunction8",moduleName:n};static pureFunctionV={name:"\u0275\u0275pureFunctionV",moduleName:n};static pipeBind1={name:"\u0275\u0275pipeBind1",moduleName:n};static pipeBind2={name:"\u0275\u0275pipeBind2",moduleName:n};static pipeBind3={name:"\u0275\u0275pipeBind3",moduleName:n};static pipeBind4={name:"\u0275\u0275pipeBind4",moduleName:n};static pipeBindV={name:"\u0275\u0275pipeBindV",moduleName:n};static domProperty={name:"\u0275\u0275domProperty",moduleName:n};static property={name:"\u0275\u0275property",moduleName:n};static i18n={name:"\u0275\u0275i18n",moduleName:n};static i18nAttributes={name:"\u0275\u0275i18nAttributes",moduleName:n};static i18nExp={name:"\u0275\u0275i18nExp",moduleName:n};static i18nStart={name:"\u0275\u0275i18nStart",moduleName:n};static i18nEnd={name:"\u0275\u0275i18nEnd",moduleName:n};static i18nApply={name:"\u0275\u0275i18nApply",moduleName:n};static i18nPostprocess={name:"\u0275\u0275i18nPostprocess",moduleName:n};static pipe={name:"\u0275\u0275pipe",moduleName:n};static projection={name:"\u0275\u0275projection",moduleName:n};static projectionDef={name:"\u0275\u0275projectionDef",moduleName:n};static reference={name:"\u0275\u0275reference",moduleName:n};static inject={name:"\u0275\u0275inject",moduleName:n};static injectAttribute={name:"\u0275\u0275injectAttribute",moduleName:n};static directiveInject={name:"\u0275\u0275directiveInject",moduleName:n};static invalidFactory={name:"\u0275\u0275invalidFactory",moduleName:n};static invalidFactoryDep={name:"\u0275\u0275invalidFactoryDep",moduleName:n};static templateRefExtractor={name:"\u0275\u0275templateRefExtractor",moduleName:n};static forwardRef={name:"forwardRef",moduleName:n};static resolveForwardRef={name:"resolveForwardRef",moduleName:n};static replaceMetadata={name:"\u0275\u0275replaceMetadata",moduleName:n};static getReplaceMetadataURL={name:"\u0275\u0275getReplaceMetadataURL",moduleName:n};static \u{275}\u{275}defineInjectable={name:"\u0275\u0275defineInjectable",moduleName:n};static declareInjectable={name:"\u0275\u0275ngDeclareInjectable",moduleName:n};static InjectableDeclaration={name:"\u0275\u0275InjectableDeclaration",moduleName:n};static resolveWindow={name:"\u0275\u0275resolveWindow",moduleName:n};static resolveDocument={name:"\u0275\u0275resolveDocument",moduleName:n};static resolveBody={name:"\u0275\u0275resolveBody",moduleName:n};static getComponentDepsFactory={name:"\u0275\u0275getComponentDepsFactory",moduleName:n};static defineComponent={name:"\u0275\u0275defineComponent",moduleName:n};static declareComponent={name:"\u0275\u0275ngDeclareComponent",moduleName:n};static setComponentScope={name:"\u0275\u0275setComponentScope",moduleName:n};static ChangeDetectionStrategy={name:"ChangeDetectionStrategy",moduleName:n};static ViewEncapsulation={name:"ViewEncapsulation",moduleName:n};static ComponentDeclaration={name:"\u0275\u0275ComponentDeclaration",moduleName:n};static FactoryDeclaration={name:"\u0275\u0275FactoryDeclaration",moduleName:n};static declareFactory={name:"\u0275\u0275ngDeclareFactory",moduleName:n};static FactoryTarget={name:"\u0275\u0275FactoryTarget",moduleName:n};static defineDirective={name:"\u0275\u0275defineDirective",moduleName:n};static declareDirective={name:"\u0275\u0275ngDeclareDirective",moduleName:n};static DirectiveDeclaration={name:"\u0275\u0275DirectiveDeclaration",moduleName:n};static InjectorDef={name:"\u0275\u0275InjectorDef",moduleName:n};static InjectorDeclaration={name:"\u0275\u0275InjectorDeclaration",moduleName:n};static defineInjector={name:"\u0275\u0275defineInjector",moduleName:n};static declareInjector={name:"\u0275\u0275ngDeclareInjector",moduleName:n};static NgModuleDeclaration={name:"\u0275\u0275NgModuleDeclaration",moduleName:n};static ModuleWithProviders={name:"ModuleWithProviders",moduleName:n};static defineNgModule={name:"\u0275\u0275defineNgModule",moduleName:n};static declareNgModule={name:"\u0275\u0275ngDeclareNgModule",moduleName:n};static setNgModuleScope={name:"\u0275\u0275setNgModuleScope",moduleName:n};static registerNgModuleType={name:"\u0275\u0275registerNgModuleType",moduleName:n};static PipeDeclaration={name:"\u0275\u0275PipeDeclaration",moduleName:n};static definePipe={name:"\u0275\u0275definePipe",moduleName:n};static declarePipe={name:"\u0275\u0275ngDeclarePipe",moduleName:n};static declareClassMetadata={name:"\u0275\u0275ngDeclareClassMetadata",moduleName:n};static declareClassMetadataAsync={name:"\u0275\u0275ngDeclareClassMetadataAsync",moduleName:n};static setClassMetadata={name:"\u0275setClassMetadata",moduleName:n};static setClassMetadataAsync={name:"\u0275setClassMetadataAsync",moduleName:n};static setClassDebugInfo={name:"\u0275setClassDebugInfo",moduleName:n};static queryRefresh={name:"\u0275\u0275queryRefresh",moduleName:n};static viewQuery={name:"\u0275\u0275viewQuery",moduleName:n};static loadQuery={name:"\u0275\u0275loadQuery",moduleName:n};static contentQuery={name:"\u0275\u0275contentQuery",moduleName:n};static viewQuerySignal={name:"\u0275\u0275viewQuerySignal",moduleName:n};static contentQuerySignal={name:"\u0275\u0275contentQuerySignal",moduleName:n};static queryAdvance={name:"\u0275\u0275queryAdvance",moduleName:n};static twoWayProperty={name:"\u0275\u0275twoWayProperty",moduleName:n};static twoWayBindingSet={name:"\u0275\u0275twoWayBindingSet",moduleName:n};static twoWayListener={name:"\u0275\u0275twoWayListener",moduleName:n};static declareLet={name:"\u0275\u0275declareLet",moduleName:n};static storeLet={name:"\u0275\u0275storeLet",moduleName:n};static readContextLet={name:"\u0275\u0275readContextLet",moduleName:n};static attachSourceLocations={name:"\u0275\u0275attachSourceLocations",moduleName:n};static NgOnChangesFeature={name:"\u0275\u0275NgOnChangesFeature",moduleName:n};static InheritDefinitionFeature={name:"\u0275\u0275InheritDefinitionFeature",moduleName:n};static CopyDefinitionFeature={name:"\u0275\u0275CopyDefinitionFeature",moduleName:n};static ProvidersFeature={name:"\u0275\u0275ProvidersFeature",moduleName:n};static HostDirectivesFeature={name:"\u0275\u0275HostDirectivesFeature",moduleName:n};static ExternalStylesFeature={name:"\u0275\u0275ExternalStylesFeature",moduleName:n};static listener={name:"\u0275\u0275listener",moduleName:n};static getInheritedFactory={name:"\u0275\u0275getInheritedFactory",moduleName:n};static sanitizeHtml={name:"\u0275\u0275sanitizeHtml",moduleName:n};static sanitizeStyle={name:"\u0275\u0275sanitizeStyle",moduleName:n};static sanitizeResourceUrl={name:"\u0275\u0275sanitizeResourceUrl",moduleName:n};static sanitizeScript={name:"\u0275\u0275sanitizeScript",moduleName:n};static sanitizeUrl={name:"\u0275\u0275sanitizeUrl",moduleName:n};static sanitizeUrlOrResourceUrl={name:"\u0275\u0275sanitizeUrlOrResourceUrl",moduleName:n};static trustConstantHtml={name:"\u0275\u0275trustConstantHtml",moduleName:n};static trustConstantResourceUrl={name:"\u0275\u0275trustConstantResourceUrl",moduleName:n};static validateIframeAttribute={name:"\u0275\u0275validateIframeAttribute",moduleName:n};static InputSignalBrandWriteType={name:"\u0275INPUT_SIGNAL_BRAND_WRITE_TYPE",moduleName:n};static UnwrapDirectiveSignalInputs={name:"\u0275UnwrapDirectiveSignalInputs",moduleName:n};static unwrapWritableSignal={name:"\u0275unwrapWritableSignal",moduleName:n}},fi=class{full;major;minor;patch;constructor(e){this.full=e;let t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")}},xt;(function(e){e[e.Class=0]="Class",e[e.Function=1]="Function"})(xt||(xt={}));var We=class{input;errLocation;ctxLocation;message;constructor(e,t,s,i){this.input=t,this.errLocation=s,this.ctxLocation=i,this.message=`Parser Error: ${e} ${s} [${t}] in ${i}`}},he=class{start;end;constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new q(e+this.start,e+this.end)}},g=class{span;sourceSpan;constructor(e,t){this.span=e,this.sourceSpan=t}toString(){return"AST"}},Ae=class extends g{nameSpan;constructor(e,t,s){super(e,t),this.nameSpan=s}},k=class extends g{visit(e,t=null){}},Ie=class extends g{visit(e,t=null){return e.visitImplicitReceiver(this,t)}},vi=class extends Ie{visit(e,t=null){var s;return(s=e.visitThisReceiver)==null?void 0:s.call(e,this,t)}},us=class extends g{expressions;constructor(e,t,s){super(e,t),this.expressions=s}visit(e,t=null){return e.visitChain(this,t)}},cs=class extends g{condition;trueExp;falseExp;constructor(e,t,s,i,r){super(e,t),this.condition=s,this.trueExp=i,this.falseExp=r}visit(e,t=null){return e.visitConditional(this,t)}},_e=class extends Ae{receiver;name;constructor(e,t,s,i,r){super(e,t,s),this.receiver=i,this.name=r}visit(e,t=null){return e.visitPropertyRead(this,t)}},hs=class extends Ae{receiver;name;value;constructor(e,t,s,i,r,a){super(e,t,s),this.receiver=i,this.name=r,this.value=a}visit(e,t=null){return e.visitPropertyWrite(this,t)}},Ke=class extends Ae{receiver;name;constructor(e,t,s,i,r){super(e,t,s),this.receiver=i,this.name=r}visit(e,t=null){return e.visitSafePropertyRead(this,t)}},ps=class extends g{receiver;key;constructor(e,t,s,i){super(e,t),this.receiver=s,this.key=i}visit(e,t=null){return e.visitKeyedRead(this,t)}},qe=class extends g{receiver;key;constructor(e,t,s,i){super(e,t),this.receiver=s,this.key=i}visit(e,t=null){return e.visitSafeKeyedRead(this,t)}},ds=class extends g{receiver;key;value;constructor(e,t,s,i,r){super(e,t),this.receiver=s,this.key=i,this.value=r}visit(e,t=null){return e.visitKeyedWrite(this,t)}},ms=class extends Ae{exp;name;args;constructor(e,t,s,i,r,a){super(e,t,a),this.exp=s,this.name=i,this.args=r}visit(e,t=null){return e.visitPipe(this,t)}},L=class extends g{value;constructor(e,t,s){super(e,t),this.value=s}visit(e,t=null){return e.visitLiteralPrimitive(this,t)}},fs=class extends g{expressions;constructor(e,t,s){super(e,t),this.expressions=s}visit(e,t=null){return e.visitLiteralArray(this,t)}},vs=class extends g{keys;values;constructor(e,t,s,i){super(e,t),this.keys=s,this.values=i}visit(e,t=null){return e.visitLiteralMap(this,t)}},xs=class extends g{strings;expressions;constructor(e,t,s,i){super(e,t),this.strings=s,this.expressions=i}visit(e,t=null){return e.visitInterpolation(this,t)}},A=class extends g{operation;left;right;constructor(e,t,s,i,r){super(e,t),this.operation=s,this.left=i,this.right=r}visit(e,t=null){return e.visitBinary(this,t)}},ge=class e extends A{operator;expr;left=null;right=null;operation=null;static createMinus(t,s,i){return new e(t,s,"-",i,"-",new L(t,s,0),i)}static createPlus(t,s,i){return new e(t,s,"+",i,"-",i,new L(t,s,0))}constructor(t,s,i,r,a,o,h){super(t,s,a,o,h),this.operator=i,this.expr=r}visit(t,s=null){return t.visitUnary!==void 0?t.visitUnary(this,s):t.visitBinary(this,s)}},Pe=class extends g{expression;constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitPrefixNot(this,t)}},Te=class extends g{expression;constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitTypeofExpression(this,t)}},Oe=class extends g{expression;constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitVoidExpression(this,t)}},ys=class extends g{expression;constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitNonNullAssert(this,t)}},gs=class extends g{receiver;args;argumentSpan;constructor(e,t,s,i,r){super(e,t),this.receiver=s,this.args=i,this.argumentSpan=r}visit(e,t=null){return e.visitCall(this,t)}},$e=class extends g{receiver;args;argumentSpan;constructor(e,t,s,i,r){super(e,t),this.receiver=s,this.args=i,this.argumentSpan=r}visit(e,t=null){return e.visitSafeCall(this,t)}},He=class extends g{tag;template;constructor(e,t,s,i){super(e,t),this.tag=s,this.template=i}visit(e,t){return e.visitTaggedTemplateLiteral(this,t)}},Ue=class extends g{elements;expressions;constructor(e,t,s,i){super(e,t),this.elements=s,this.expressions=i}visit(e,t){return e.visitTemplateLiteral(this,t)}},je=class extends g{text;constructor(e,t,s){super(e,t),this.text=s}visit(e,t){return e.visitTemplateLiteralElement(this,t)}},Es=class extends g{expression;constructor(e,t,s){super(e,t),this.expression=s}visit(e,t){return e.visitParenthesizedExpression(this,t)}},q=class{start;end;constructor(e,t){this.start=e,this.end=t}},U=class extends g{ast;source;location;errors;constructor(e,t,s,i,r){super(new he(0,t===null?0:t.length),new q(i,t===null?i:i+t.length)),this.ast=e,this.source=t,this.location=s,this.errors=r}visit(e,t=null){return e.visitASTWithSource?e.visitASTWithSource(this,t):this.ast.visit(e,t)}toString(){return`${this.source} in ${this.location}`}},Ge=class{sourceSpan;key;value;constructor(e,t,s){this.sourceSpan=e,this.key=t,this.value=s}},ws=class{sourceSpan;key;value;constructor(e,t,s){this.sourceSpan=e,this.key=t,this.value=s}},xi=class{visit(e,t){e.visit(this,t)}visitUnary(e,t){this.visit(e.expr,t)}visitBinary(e,t){this.visit(e.left,t),this.visit(e.right,t)}visitChain(e,t){this.visitAll(e.expressions,t)}visitConditional(e,t){this.visit(e.condition,t),this.visit(e.trueExp,t),this.visit(e.falseExp,t)}visitPipe(e,t){this.visit(e.exp,t),this.visitAll(e.args,t)}visitImplicitReceiver(e,t){}visitThisReceiver(e,t){}visitInterpolation(e,t){this.visitAll(e.expressions,t)}visitKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitKeyedWrite(e,t){this.visit(e.receiver,t),this.visit(e.key,t),this.visit(e.value,t)}visitLiteralArray(e,t){this.visitAll(e.expressions,t)}visitLiteralMap(e,t){this.visitAll(e.values,t)}visitLiteralPrimitive(e,t){}visitPrefixNot(e,t){this.visit(e.expression,t)}visitTypeofExpression(e,t){this.visit(e.expression,t)}visitVoidExpression(e,t){this.visit(e.expression,t)}visitNonNullAssert(e,t){this.visit(e.expression,t)}visitPropertyRead(e,t){this.visit(e.receiver,t)}visitPropertyWrite(e,t){this.visit(e.receiver,t),this.visit(e.value,t)}visitSafePropertyRead(e,t){this.visit(e.receiver,t)}visitSafeKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitSafeCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitTemplateLiteral(e,t){for(let s=0;s<e.elements.length;s++){this.visit(e.elements[s],t);let i=s<e.expressions.length?e.expressions[s]:null;i!==null&&this.visit(i,t)}}visitTemplateLiteralElement(e,t){}visitTaggedTemplateLiteral(e,t){this.visit(e.tag,t),this.visit(e.template,t)}visitParenthesizedExpression(e,t){this.visit(e.expression,t)}visitAll(e,t){for(let s of e)this.visit(s,t)}},yt;(function(e){e[e.DEFAULT=0]="DEFAULT",e[e.LITERAL_ATTR=1]="LITERAL_ATTR",e[e.ANIMATION=2]="ANIMATION",e[e.TWO_WAY=3]="TWO_WAY"})(yt||(yt={}));var gt;(function(e){e[e.Regular=0]="Regular",e[e.Animation=1]="Animation",e[e.TwoWay=2]="TwoWay"})(gt||(gt={}));var F;(function(e){e[e.Property=0]="Property",e[e.Attribute=1]="Attribute",e[e.Class=2]="Class",e[e.Style=3]="Style",e[e.Animation=4]="Animation",e[e.TwoWay=5]="TwoWay"})(F||(F={}));var Et;(function(e){e[e.RAW_TEXT=0]="RAW_TEXT",e[e.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",e[e.PARSABLE_DATA=2]="PARSABLE_DATA"})(Et||(Et={}));var yi=[/@/,/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function gi(e,t){if(t!=null&&!(Array.isArray(t)&&t.length==2))throw Error(`Expected '${e}' to be an array, [start, end].`);if(t!=null){let s=t[0],i=t[1];yi.forEach((r)=>{if(r.test(s)||r.test(i))throw Error(`['${s}', '${i}'] contains unusable interpolation symbol.`)})}}var Ei=class e{start;end;static fromArray(t){return t?(gi("interpolation",t),new e(t[0],t[1])):j}constructor(t,s){this.start=t,this.end=s}},j=new Ei("{{","}}"),fe=0,Ss=9,wi=10,Si=11,Ci=12,Ni=13,Cs=32,Ii=33,Ns=34,Pi=35,Ze=36,Ti=37,wt=38,Is=39,Ee=40,G=41,St=42,Ps=43,ie=44,Ts=45,z=46,ze=47,Q=58,re=59,Oi=60,ve=61,bi=62,Ct=63,ki=48,Li=57,Os=65,Ai=69,bs=90,we=91,Nt=92,ne=93,Mi=94,et=95,ks=97,Ri=101,Bi=102,Di=110,Fi=114,Vi=116,Wi=117,_i=118,Ls=122,be=123,It=124,ae=125,As=160,Qe=96;function Ki(e){return e>=Ss&&e<=Cs||e==As}function K(e){return ki<=e&&e<=Li}function qi(e){return e>=ks&&e<=Ls||e>=Os&&e<=bs}function Pt(e){return e===Is||e===Ns||e===Qe}var Tt;(function(e){e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR"})(Tt||(Tt={}));var Ot;(function(e){e[e.Inline=0]="Inline",e[e.SideEffect=1]="SideEffect",e[e.Omit=2]="Omit"})(Ot||(Ot={}));var bt;(function(e){e[e.Global=0]="Global",e[e.Local=1]="Local"})(bt||(bt={}));var kt;(function(e){e[e.Directive=0]="Directive",e[e.Pipe=1]="Pipe",e[e.NgModule=2]="NgModule"})(kt||(kt={}));var $i="(:(where|is)\\()?",Ms="-shadowcsshost",Hi="-shadowcsscontext",Rs="(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))",Ur=new RegExp(Ms+Rs+"?([^,{]*)","gim"),Bs=Hi+Rs+"?([^{]*)",jr=new RegExp(`${$i}(${Bs})`,"gim"),Gr=new RegExp(Bs,"im"),Ui=Ms+"-no-combinator",zr=new RegExp(`${Ui}(?![^(]*\\))`,"g"),Ds="%COMMENT%",Qr=new RegExp(Ds,"g"),Yr=new RegExp(`(\\s*(?:${Ds}\\s*)*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))`,"g"),ji="%COMMA_IN_PLACEHOLDER%",Gi="%SEMI_IN_PLACEHOLDER%",zi="%COLON_IN_PLACEHOLDER%",Xr=new RegExp(ji,"g"),Jr=new RegExp(Gi,"g"),Zr=new RegExp(zi,"g"),d;(function(e){e[e.ListEnd=0]="ListEnd",e[e.Statement=1]="Statement",e[e.Variable=2]="Variable",e[e.ElementStart=3]="ElementStart",e[e.Element=4]="Element",e[e.Template=5]="Template",e[e.ElementEnd=6]="ElementEnd",e[e.ContainerStart=7]="ContainerStart",e[e.Container=8]="Container",e[e.ContainerEnd=9]="ContainerEnd",e[e.DisableBindings=10]="DisableBindings",e[e.ConditionalCreate=11]="ConditionalCreate",e[e.ConditionalBranchCreate=12]="ConditionalBranchCreate",e[e.Conditional=13]="Conditional",e[e.EnableBindings=14]="EnableBindings",e[e.Text=15]="Text",e[e.Listener=16]="Listener",e[e.InterpolateText=17]="InterpolateText",e[e.Binding=18]="Binding",e[e.Property=19]="Property",e[e.StyleProp=20]="StyleProp",e[e.ClassProp=21]="ClassProp",e[e.StyleMap=22]="StyleMap",e[e.ClassMap=23]="ClassMap",e[e.Advance=24]="Advance",e[e.Pipe=25]="Pipe",e[e.Attribute=26]="Attribute",e[e.ExtractedAttribute=27]="ExtractedAttribute",e[e.Defer=28]="Defer",e[e.DeferOn=29]="DeferOn",e[e.DeferWhen=30]="DeferWhen",e[e.I18nMessage=31]="I18nMessage",e[e.DomProperty=32]="DomProperty",e[e.Namespace=33]="Namespace",e[e.ProjectionDef=34]="ProjectionDef",e[e.Projection=35]="Projection",e[e.RepeaterCreate=36]="RepeaterCreate",e[e.Repeater=37]="Repeater",e[e.TwoWayProperty=38]="TwoWayProperty",e[e.TwoWayListener=39]="TwoWayListener",e[e.DeclareLet=40]="DeclareLet",e[e.StoreLet=41]="StoreLet",e[e.I18nStart=42]="I18nStart",e[e.I18n=43]="I18n",e[e.I18nEnd=44]="I18nEnd",e[e.I18nExpression=45]="I18nExpression",e[e.I18nApply=46]="I18nApply",e[e.IcuStart=47]="IcuStart",e[e.IcuEnd=48]="IcuEnd",e[e.IcuPlaceholder=49]="IcuPlaceholder",e[e.I18nContext=50]="I18nContext",e[e.I18nAttributes=51]="I18nAttributes",e[e.SourceLocation=52]="SourceLocation"})(d||(d={}));var Z;(function(e){e[e.LexicalRead=0]="LexicalRead",e[e.Context=1]="Context",e[e.TrackContext=2]="TrackContext",e[e.ReadVariable=3]="ReadVariable",e[e.NextContext=4]="NextContext",e[e.Reference=5]="Reference",e[e.StoreLet=6]="StoreLet",e[e.ContextLetReference=7]="ContextLetReference",e[e.GetCurrentView=8]="GetCurrentView",e[e.RestoreView=9]="RestoreView",e[e.ResetView=10]="ResetView",e[e.PureFunctionExpr=11]="PureFunctionExpr",e[e.PureFunctionParameterExpr=12]="PureFunctionParameterExpr",e[e.PipeBinding=13]="PipeBinding",e[e.PipeBindingVariadic=14]="PipeBindingVariadic",e[e.SafePropertyRead=15]="SafePropertyRead",e[e.SafeKeyedRead=16]="SafeKeyedRead",e[e.SafeInvokeFunction=17]="SafeInvokeFunction",e[e.SafeTernaryExpr=18]="SafeTernaryExpr",e[e.EmptyExpr=19]="EmptyExpr",e[e.AssignTemporaryExpr=20]="AssignTemporaryExpr",e[e.ReadTemporaryExpr=21]="ReadTemporaryExpr",e[e.SlotLiteralExpr=22]="SlotLiteralExpr",e[e.ConditionalCase=23]="ConditionalCase",e[e.ConstCollected=24]="ConstCollected",e[e.TwoWayBindingSet=25]="TwoWayBindingSet"})(Z||(Z={}));var Lt;(function(e){e[e.None=0]="None",e[e.AlwaysInline=1]="AlwaysInline"})(Lt||(Lt={}));var At;(function(e){e[e.Context=0]="Context",e[e.Identifier=1]="Identifier",e[e.SavedView=2]="SavedView",e[e.Alias=3]="Alias"})(At||(At={}));var Mt;(function(e){e[e.Normal=0]="Normal",e[e.TemplateDefinitionBuilder=1]="TemplateDefinitionBuilder"})(Mt||(Mt={}));var V;(function(e){e[e.Attribute=0]="Attribute",e[e.ClassName=1]="ClassName",e[e.StyleProperty=2]="StyleProperty",e[e.Property=3]="Property",e[e.Template=4]="Template",e[e.I18n=5]="I18n",e[e.Animation=6]="Animation",e[e.TwoWayProperty=7]="TwoWayProperty"})(V||(V={}));var Rt;(function(e){e[e.Creation=0]="Creation",e[e.Postproccessing=1]="Postproccessing"})(Rt||(Rt={}));var Bt;(function(e){e[e.I18nText=0]="I18nText",e[e.I18nAttribute=1]="I18nAttribute"})(Bt||(Bt={}));var Dt;(function(e){e[e.None=0]="None",e[e.ElementTag=1]="ElementTag",e[e.TemplateTag=2]="TemplateTag",e[e.OpenTag=4]="OpenTag",e[e.CloseTag=8]="CloseTag",e[e.ExpressionIndex=16]="ExpressionIndex"})(Dt||(Dt={}));var Ft;(function(e){e[e.HTML=0]="HTML",e[e.SVG=1]="SVG",e[e.Math=2]="Math"})(Ft||(Ft={}));var Vt;(function(e){e[e.Idle=0]="Idle",e[e.Immediate=1]="Immediate",e[e.Timer=2]="Timer",e[e.Hover=3]="Hover",e[e.Interaction=4]="Interaction",e[e.Viewport=5]="Viewport",e[e.Never=6]="Never"})(Vt||(Vt={}));var Wt;(function(e){e[e.RootI18n=0]="RootI18n",e[e.Icu=1]="Icu",e[e.Attr=2]="Attr"})(Wt||(Wt={}));var _t;(function(e){e[e.NgTemplate=0]="NgTemplate",e[e.Structural=1]="Structural",e[e.Block=2]="Block"})(_t||(_t={}));var Qi=Symbol("ConsumesSlot"),Fs=Symbol("DependsOnSlotContext"),pe=Symbol("ConsumesVars"),tt=Symbol("UsesVarOffset"),en={[Qi]:!0,numSlotsUsed:1},tn={[Fs]:!0},sn={[pe]:!0},Vs=class{strings;expressions;i18nPlaceholders;constructor(e,t,s){if(this.strings=e,this.expressions=t,this.i18nPlaceholders=s,s.length!==0&&s.length!==t.length)throw Error(`Expected ${t.length} placeholders to match interpolation expression count, but got ${s.length}`)}},Me=class extends I{constructor(e=null){super(null,e)}},rn=class e extends Me{target;value;sourceSpan;kind=Z.StoreLet;[pe]=!0;[Fs]=!0;constructor(t,s,i){super(),this.target=t,this.value=s,this.sourceSpan=i}visitExpression(){}isEquivalent(t){return t instanceof e&&t.target===this.target&&t.value.isEquivalent(this.value)}isConstant(){return!1}transformInternalExpressions(t,s){this.value=(this.value,void 0)}clone(){return new e(this.target,this.value,this.sourceSpan)}},nn=class e extends Me{kind=Z.PureFunctionExpr;[pe]=!0;[tt]=!0;varOffset=null;body;args;fn=null;constructor(t,s){super(),this.body=t,this.args=s}visitExpression(t,s){var i;(i=this.body)==null||i.visitExpression(t,s);for(let r of this.args)r.visitExpression(t,s)}isEquivalent(t){return!(t instanceof e)||t.args.length!==this.args.length?!1:t.body!==null&&this.body!==null&&t.body.isEquivalent(this.body)&&t.args.every((s,i)=>s.isEquivalent(this.args[i]))}isConstant(){return!1}transformInternalExpressions(t,s){this.body!==null?this.body=(this.body,s|Ye.InChildOperation,void 0):this.fn!==null&&(this.fn=(this.fn,void 0));for(let i=0;i<this.args.length;i++)this.args[i]=(this.args[i],void 0)}clone(){var t,s;let i=new e(((t=this.body)==null?void 0:t.clone())??null,this.args.map((r)=>r.clone()));return i.fn=((s=this.fn)==null?void 0:s.clone())??null,i.varOffset=this.varOffset,i}},an=class e extends Me{target;targetSlot;name;args;kind=Z.PipeBinding;[pe]=!0;[tt]=!0;varOffset=null;constructor(t,s,i,r){super(),this.target=t,this.targetSlot=s,this.name=i,this.args=r}visitExpression(t,s){for(let i of this.args)i.visitExpression(t,s)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(t,s){for(let i=0;i<this.args.length;i++)this.args[i]=(this.args[i],void 0)}clone(){let t=new e(this.target,this.targetSlot,this.name,this.args.map((s)=>s.clone()));return t.varOffset=this.varOffset,t}},on=class e extends Me{target;targetSlot;name;args;numArgs;kind=Z.PipeBindingVariadic;[pe]=!0;[tt]=!0;varOffset=null;constructor(t,s,i,r,a){super(),this.target=t,this.targetSlot=s,this.name=i,this.args=r,this.numArgs=a}visitExpression(t,s){this.args.visitExpression(t,s)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(t,s){this.args=(this.args,void 0)}clone(){let t=new e(this.target,this.targetSlot,this.name,this.args.clone(),this.numArgs);return t.varOffset=this.varOffset,t}},Ye;(function(e){e[e.None=0]="None",e[e.InChildOperation=1]="InChildOperation"})(Ye||(Ye={}));var ln=new Set([d.Element,d.ElementStart,d.Container,d.ContainerStart,d.Template,d.RepeaterCreate,d.ConditionalCreate,d.ConditionalBranchCreate]),Kt;(function(e){e[e.Tmpl=0]="Tmpl",e[e.Host=1]="Host",e[e.Both=2]="Both"})(Kt||(Kt={}));var un=new Map([[c.attribute,c.attribute],[c.classProp,c.classProp],[c.element,c.element],[c.elementContainer,c.elementContainer],[c.elementContainerEnd,c.elementContainerEnd],[c.elementContainerStart,c.elementContainerStart],[c.elementEnd,c.elementEnd],[c.elementStart,c.elementStart],[c.domProperty,c.domProperty],[c.i18nExp,c.i18nExp],[c.listener,c.listener],[c.listener,c.listener],[c.property,c.property],[c.styleProp,c.styleProp],[c.syntheticHostListener,c.syntheticHostListener],[c.syntheticHostProperty,c.syntheticHostProperty],[c.templateCreate,c.templateCreate],[c.twoWayProperty,c.twoWayProperty],[c.twoWayListener,c.twoWayListener],[c.declareLet,c.declareLet],[c.conditionalCreate,c.conditionalBranchCreate],[c.conditionalBranchCreate,c.conditionalBranchCreate]]),cn=Object.freeze([]),hn=new Map([[d.ElementEnd,[d.ElementStart,d.Element]],[d.ContainerEnd,[d.ContainerStart,d.Container]],[d.I18nEnd,[d.I18nStart,d.I18n]]]),pn=new Set([d.Pipe]),Yi={},Xi="\uE500";Yi.ngsp=Xi;var qt;(function(e){e.HEX="hexadecimal",e.DEC="decimal"})(qt||(qt={}));var Ws=` \f
2
+ import"./chunk-aztre27e.js";var Ys=Object.defineProperty,is=(e)=>{throw TypeError(e)},rs=(e,t)=>{for(var s in t)Ys(e,s,{get:t[s],enumerable:!0})},Je=(e,t,s)=>t.has(e)||is("Cannot "+s),M=(e,t,s)=>(Je(e,t,"read from private field"),s?s.call(e):t.get(e)),J=(e,t,s)=>t.has(e)?is("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),Ne=(e,t,s,i)=>(Je(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),l=(e,t,s)=>(Je(e,t,"access private method"),s),ns={};rs(ns,{parsers:()=>as});var as={};rs(as,{__ng_action:()=>Vr,__ng_binding:()=>Wr,__ng_directive:()=>Kr,__ng_interpolation:()=>_r});var qr=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g"),nt;(function(e){e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom"})(nt||(nt={}));var at;(function(e){e[e.OnPush=0]="OnPush",e[e.Default=1]="Default"})(at||(at={}));var ot;(function(e){e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform"})(ot||(ot={}));var R;(function(e){e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL"})(R||(R={}));var lt;(function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Ignore=2]="Ignore"})(lt||(lt={}));var ut;(function(e){e[e.Directive=0]="Directive",e[e.Component=1]="Component",e[e.Injectable=2]="Injectable",e[e.Pipe=3]="Pipe",e[e.NgModule=4]="NgModule"})(ut||(ut={}));var ct;(function(e){e[e.Directive=0]="Directive",e[e.Pipe=1]="Pipe",e[e.NgModule=2]="NgModule"})(ct||(ct={}));var ht;(function(e){e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom"})(ht||(ht={}));var pt;(function(e){e[e.Little=0]="Little",e[e.Big=1]="Big"})(pt||(pt={}));var dt;(function(e){e[e.None=0]="None",e[e.Const=1]="Const"})(dt||(dt={}));var mt;(function(e){e[e.Dynamic=0]="Dynamic",e[e.Bool=1]="Bool",e[e.String=2]="String",e[e.Int=3]="Int",e[e.Number=4]="Number",e[e.Function=5]="Function",e[e.Inferred=6]="Inferred",e[e.None=7]="None"})(mt||(mt={}));var Xs=void 0,ft;(function(e){e[e.Minus=0]="Minus",e[e.Plus=1]="Plus"})(ft||(ft={}));var S;(function(e){e[e.Equals=0]="Equals",e[e.NotEquals=1]="NotEquals",e[e.Identical=2]="Identical",e[e.NotIdentical=3]="NotIdentical",e[e.Minus=4]="Minus",e[e.Plus=5]="Plus",e[e.Divide=6]="Divide",e[e.Multiply=7]="Multiply",e[e.Modulo=8]="Modulo",e[e.And=9]="And",e[e.Or=10]="Or",e[e.BitwiseOr=11]="BitwiseOr",e[e.BitwiseAnd=12]="BitwiseAnd",e[e.Lower=13]="Lower",e[e.LowerEquals=14]="LowerEquals",e[e.Bigger=15]="Bigger",e[e.BiggerEquals=16]="BiggerEquals",e[e.NullishCoalesce=17]="NullishCoalesce",e[e.Exponentiation=18]="Exponentiation",e[e.In=19]="In"})(S||(S={}));function Js(e,t){return e==null||t==null?e==t:e.isEquivalent(t)}function Zs(e,t,s){let i=e.length;if(i!==t.length)return!1;for(let r=0;r<i;r++)if(!s(e[r],t[r]))return!1;return!0}function Le(e,t){return Zs(e,t,(s,i)=>s.isEquivalent(i))}var I=class{type;sourceSpan;constructor(e,t){this.type=e||null,this.sourceSpan=t||null}prop(e,t){return new li(this,e,null,t)}key(e,t,s){return new ui(this,e,t,s)}callFn(e,t,s){return new ri(this,e,null,t,s)}instantiate(e,t,s){return new ni(this,e,t,s)}conditional(e,t=null,s){return new oi(this,e,t,null,s)}equals(e,t){return new C(S.Equals,this,e,null,t)}notEquals(e,t){return new C(S.NotEquals,this,e,null,t)}identical(e,t){return new C(S.Identical,this,e,null,t)}notIdentical(e,t){return new C(S.NotIdentical,this,e,null,t)}minus(e,t){return new C(S.Minus,this,e,null,t)}plus(e,t){return new C(S.Plus,this,e,null,t)}divide(e,t){return new C(S.Divide,this,e,null,t)}multiply(e,t){return new C(S.Multiply,this,e,null,t)}modulo(e,t){return new C(S.Modulo,this,e,null,t)}power(e,t){return new C(S.Exponentiation,this,e,null,t)}and(e,t){return new C(S.And,this,e,null,t)}bitwiseOr(e,t){return new C(S.BitwiseOr,this,e,null,t)}bitwiseAnd(e,t){return new C(S.BitwiseAnd,this,e,null,t)}or(e,t){return new C(S.Or,this,e,null,t)}lower(e,t){return new C(S.Lower,this,e,null,t)}lowerEquals(e,t){return new C(S.LowerEquals,this,e,null,t)}bigger(e,t){return new C(S.Bigger,this,e,null,t)}biggerEquals(e,t){return new C(S.BiggerEquals,this,e,null,t)}isBlank(e){return this.equals(TYPED_NULL_EXPR,e)}nullishCoalesce(e,t){return new C(S.NullishCoalesce,this,e,null,t)}toStmt(){return new di(this,null)}},os=class e extends I{name;constructor(t,s,i){super(s,i),this.name=t}isEquivalent(t){return t instanceof e&&this.name===t.name}isConstant(){return!1}visitExpression(t,s){return t.visitReadVarExpr(this,s)}clone(){return new e(this.name,this.type,this.sourceSpan)}set(t){return new ti(this.name,t,null,this.sourceSpan)}},ei=class e extends I{expr;constructor(t,s,i){super(s,i),this.expr=t}visitExpression(t,s){return t.visitTypeofExpr(this,s)}isEquivalent(t){return t instanceof e&&t.expr.isEquivalent(this.expr)}isConstant(){return this.expr.isConstant()}clone(){return new e(this.expr.clone())}},ti=class e extends I{name;value;constructor(t,s,i,r){super(i||s.type,r),this.name=t,this.value=s}isEquivalent(t){return t instanceof e&&this.name===t.name&&this.value.isEquivalent(t.value)}isConstant(){return!1}visitExpression(t,s){return t.visitWriteVarExpr(this,s)}clone(){return new e(this.name,this.value.clone(),this.type,this.sourceSpan)}toDeclStmt(t,s){return new pi(this.name,this.value,t,s,this.sourceSpan)}toConstDecl(){return this.toDeclStmt(Xs,ce.Final)}},si=class e extends I{receiver;index;value;constructor(t,s,i,r,a){super(r||i.type,a),this.receiver=t,this.index=s,this.value=i}isEquivalent(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.index.isEquivalent(t.index)&&this.value.isEquivalent(t.value)}isConstant(){return!1}visitExpression(t,s){return t.visitWriteKeyExpr(this,s)}clone(){return new e(this.receiver.clone(),this.index.clone(),this.value.clone(),this.type,this.sourceSpan)}},ii=class e extends I{receiver;name;value;constructor(t,s,i,r,a){super(r||i.type,a),this.receiver=t,this.name=s,this.value=i}isEquivalent(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.name===t.name&&this.value.isEquivalent(t.value)}isConstant(){return!1}visitExpression(t,s){return t.visitWritePropExpr(this,s)}clone(){return new e(this.receiver.clone(),this.name,this.value.clone(),this.type,this.sourceSpan)}},ri=class e extends I{fn;args;pure;constructor(t,s,i,r,a=!1){super(i,r),this.fn=t,this.args=s,this.pure=a}get receiver(){return this.fn}isEquivalent(t){return t instanceof e&&this.fn.isEquivalent(t.fn)&&Le(this.args,t.args)&&this.pure===t.pure}isConstant(){return!1}visitExpression(t,s){return t.visitInvokeFunctionExpr(this,s)}clone(){return new e(this.fn.clone(),this.args.map((t)=>t.clone()),this.type,this.sourceSpan,this.pure)}},ni=class e extends I{classExpr;args;constructor(t,s,i,r){super(i,r),this.classExpr=t,this.args=s}isEquivalent(t){return t instanceof e&&this.classExpr.isEquivalent(t.classExpr)&&Le(this.args,t.args)}isConstant(){return!1}visitExpression(t,s){return t.visitInstantiateExpr(this,s)}clone(){return new e(this.classExpr.clone(),this.args.map((t)=>t.clone()),this.type,this.sourceSpan)}},vt=class e extends I{value;constructor(t,s,i){super(s,i),this.value=t}isEquivalent(t){return t instanceof e&&this.value===t.value}isConstant(){return!0}visitExpression(t,s){return t.visitLiteralExpr(this,s)}clone(){return new e(this.value,this.type,this.sourceSpan)}},ai=class e extends I{value;typeParams;constructor(t,s,i=null,r){super(s,r),this.value=t,this.typeParams=i}isEquivalent(t){return t instanceof e&&this.value.name===t.value.name&&this.value.moduleName===t.value.moduleName}isConstant(){return!1}visitExpression(t,s){return t.visitExternalExpr(this,s)}clone(){return new e(this.value,this.type,this.typeParams,this.sourceSpan)}},oi=class e extends I{condition;falseCase;trueCase;constructor(t,s,i=null,r,a){super(r||s.type,a),this.condition=t,this.falseCase=i,this.trueCase=s}isEquivalent(t){return t instanceof e&&this.condition.isEquivalent(t.condition)&&this.trueCase.isEquivalent(t.trueCase)&&Js(this.falseCase,t.falseCase)}isConstant(){return!1}visitExpression(t,s){return t.visitConditionalExpr(this,s)}clone(){var t;return new e(this.condition.clone(),this.trueCase.clone(),(t=this.falseCase)==null?void 0:t.clone(),this.type,this.sourceSpan)}},C=class e extends I{operator;rhs;lhs;constructor(t,s,i,r,a){super(r||s.type,a),this.operator=t,this.rhs=i,this.lhs=s}isEquivalent(t){return t instanceof e&&this.operator===t.operator&&this.lhs.isEquivalent(t.lhs)&&this.rhs.isEquivalent(t.rhs)}isConstant(){return!1}visitExpression(t,s){return t.visitBinaryOperatorExpr(this,s)}clone(){return new e(this.operator,this.lhs.clone(),this.rhs.clone(),this.type,this.sourceSpan)}},li=class e extends I{receiver;name;constructor(t,s,i,r){super(i,r),this.receiver=t,this.name=s}get index(){return this.name}isEquivalent(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.name===t.name}isConstant(){return!1}visitExpression(t,s){return t.visitReadPropExpr(this,s)}set(t){return new ii(this.receiver,this.name,t,null,this.sourceSpan)}clone(){return new e(this.receiver.clone(),this.name,this.type,this.sourceSpan)}},ui=class e extends I{receiver;index;constructor(t,s,i,r){super(i,r),this.receiver=t,this.index=s}isEquivalent(t){return t instanceof e&&this.receiver.isEquivalent(t.receiver)&&this.index.isEquivalent(t.index)}isConstant(){return!1}visitExpression(t,s){return t.visitReadKeyExpr(this,s)}set(t){return new si(this.receiver,this.index,t,null,this.sourceSpan)}clone(){return new e(this.receiver.clone(),this.index.clone(),this.type,this.sourceSpan)}},ci=class e extends I{entries;constructor(t,s,i){super(s,i),this.entries=t}isConstant(){return this.entries.every((t)=>t.isConstant())}isEquivalent(t){return t instanceof e&&Le(this.entries,t.entries)}visitExpression(t,s){return t.visitLiteralArrayExpr(this,s)}clone(){return new e(this.entries.map((t)=>t.clone()),this.type,this.sourceSpan)}},hi=class e extends I{entries;valueType=null;constructor(t,s,i){super(s,i),this.entries=t,s&&(this.valueType=s.valueType)}isEquivalent(t){return t instanceof e&&Le(this.entries,t.entries)}isConstant(){return this.entries.every((t)=>t.value.isConstant())}visitExpression(t,s){return t.visitLiteralMapExpr(this,s)}clone(){let t=this.entries.map((s)=>s.clone());return new e(t,this.type,this.sourceSpan)}},ce;(function(e){e[e.None=0]="None",e[e.Final=1]="Final",e[e.Private=2]="Private",e[e.Exported=4]="Exported",e[e.Static=8]="Static"})(ce||(ce={}));var ls=class{modifiers;sourceSpan;leadingComments;constructor(e=ce.None,t=null,s){this.modifiers=e,this.sourceSpan=t,this.leadingComments=s}hasModifier(e){return(this.modifiers&e)!==0}addLeadingComment(e){this.leadingComments=this.leadingComments??[],this.leadingComments.push(e)}},pi=class e extends ls{name;value;type;constructor(t,s,i,r,a,o){super(r,a,o),this.name=t,this.value=s,this.type=i||s&&s.type||null}isEquivalent(t){return t instanceof e&&this.name===t.name&&(this.value?!!t.value&&this.value.isEquivalent(t.value):!t.value)}visitStatement(t,s){return t.visitDeclareVarStmt(this,s)}},di=class e extends ls{expr;constructor(t,s,i){super(ce.None,s,i),this.expr=t}isEquivalent(t){return t instanceof e&&this.expr.isEquivalent(t.expr)}visitStatement(t,s){return t.visitExpressionStmt(this,s)}};function mi(e,t,s){return new os(e,t,s)}var $r=mi("<unknown>"),Hr=class e{static INSTANCE=new e;keyOf(t){if(t instanceof vt&&typeof t.value=="string")return`"${t.value}"`;if(t instanceof vt)return String(t.value);if(t instanceof ci){let s=[];for(let i of t.entries)s.push(this.keyOf(i));return`[${s.join(",")}]`}else if(t instanceof hi){let s=[];for(let i of t.entries){let r=i.key;i.quoted&&(r=`"${r}"`),s.push(r+":"+this.keyOf(i.value))}return`{${s.join(",")}}`}else{if(t instanceof ai)return`import("${t.value.moduleName}", ${t.value.name})`;if(t instanceof os)return`read(${t.name})`;if(t instanceof ei)return`typeof(${this.keyOf(t.expr)})`;throw Error(`${this.constructor.name} does not handle expressions of type ${t.constructor.name}`)}}},n="@angular/core",c=class{static NEW_METHOD="factory";static TRANSFORM_METHOD="transform";static PATCH_DEPS="patchedDeps";static core={name:null,moduleName:n};static namespaceHTML={name:"\u0275\u0275namespaceHTML",moduleName:n};static namespaceMathML={name:"\u0275\u0275namespaceMathML",moduleName:n};static namespaceSVG={name:"\u0275\u0275namespaceSVG",moduleName:n};static element={name:"\u0275\u0275element",moduleName:n};static elementStart={name:"\u0275\u0275elementStart",moduleName:n};static elementEnd={name:"\u0275\u0275elementEnd",moduleName:n};static advance={name:"\u0275\u0275advance",moduleName:n};static syntheticHostProperty={name:"\u0275\u0275syntheticHostProperty",moduleName:n};static syntheticHostListener={name:"\u0275\u0275syntheticHostListener",moduleName:n};static attribute={name:"\u0275\u0275attribute",moduleName:n};static classProp={name:"\u0275\u0275classProp",moduleName:n};static elementContainerStart={name:"\u0275\u0275elementContainerStart",moduleName:n};static elementContainerEnd={name:"\u0275\u0275elementContainerEnd",moduleName:n};static elementContainer={name:"\u0275\u0275elementContainer",moduleName:n};static styleMap={name:"\u0275\u0275styleMap",moduleName:n};static classMap={name:"\u0275\u0275classMap",moduleName:n};static styleProp={name:"\u0275\u0275styleProp",moduleName:n};static interpolate={name:"\u0275\u0275interpolate",moduleName:n};static interpolate1={name:"\u0275\u0275interpolate1",moduleName:n};static interpolate2={name:"\u0275\u0275interpolate2",moduleName:n};static interpolate3={name:"\u0275\u0275interpolate3",moduleName:n};static interpolate4={name:"\u0275\u0275interpolate4",moduleName:n};static interpolate5={name:"\u0275\u0275interpolate5",moduleName:n};static interpolate6={name:"\u0275\u0275interpolate6",moduleName:n};static interpolate7={name:"\u0275\u0275interpolate7",moduleName:n};static interpolate8={name:"\u0275\u0275interpolate8",moduleName:n};static interpolateV={name:"\u0275\u0275interpolateV",moduleName:n};static nextContext={name:"\u0275\u0275nextContext",moduleName:n};static resetView={name:"\u0275\u0275resetView",moduleName:n};static templateCreate={name:"\u0275\u0275template",moduleName:n};static defer={name:"\u0275\u0275defer",moduleName:n};static deferWhen={name:"\u0275\u0275deferWhen",moduleName:n};static deferOnIdle={name:"\u0275\u0275deferOnIdle",moduleName:n};static deferOnImmediate={name:"\u0275\u0275deferOnImmediate",moduleName:n};static deferOnTimer={name:"\u0275\u0275deferOnTimer",moduleName:n};static deferOnHover={name:"\u0275\u0275deferOnHover",moduleName:n};static deferOnInteraction={name:"\u0275\u0275deferOnInteraction",moduleName:n};static deferOnViewport={name:"\u0275\u0275deferOnViewport",moduleName:n};static deferPrefetchWhen={name:"\u0275\u0275deferPrefetchWhen",moduleName:n};static deferPrefetchOnIdle={name:"\u0275\u0275deferPrefetchOnIdle",moduleName:n};static deferPrefetchOnImmediate={name:"\u0275\u0275deferPrefetchOnImmediate",moduleName:n};static deferPrefetchOnTimer={name:"\u0275\u0275deferPrefetchOnTimer",moduleName:n};static deferPrefetchOnHover={name:"\u0275\u0275deferPrefetchOnHover",moduleName:n};static deferPrefetchOnInteraction={name:"\u0275\u0275deferPrefetchOnInteraction",moduleName:n};static deferPrefetchOnViewport={name:"\u0275\u0275deferPrefetchOnViewport",moduleName:n};static deferHydrateWhen={name:"\u0275\u0275deferHydrateWhen",moduleName:n};static deferHydrateNever={name:"\u0275\u0275deferHydrateNever",moduleName:n};static deferHydrateOnIdle={name:"\u0275\u0275deferHydrateOnIdle",moduleName:n};static deferHydrateOnImmediate={name:"\u0275\u0275deferHydrateOnImmediate",moduleName:n};static deferHydrateOnTimer={name:"\u0275\u0275deferHydrateOnTimer",moduleName:n};static deferHydrateOnHover={name:"\u0275\u0275deferHydrateOnHover",moduleName:n};static deferHydrateOnInteraction={name:"\u0275\u0275deferHydrateOnInteraction",moduleName:n};static deferHydrateOnViewport={name:"\u0275\u0275deferHydrateOnViewport",moduleName:n};static deferEnableTimerScheduling={name:"\u0275\u0275deferEnableTimerScheduling",moduleName:n};static conditionalCreate={name:"\u0275\u0275conditionalCreate",moduleName:n};static conditionalBranchCreate={name:"\u0275\u0275conditionalBranchCreate",moduleName:n};static conditional={name:"\u0275\u0275conditional",moduleName:n};static repeater={name:"\u0275\u0275repeater",moduleName:n};static repeaterCreate={name:"\u0275\u0275repeaterCreate",moduleName:n};static repeaterTrackByIndex={name:"\u0275\u0275repeaterTrackByIndex",moduleName:n};static repeaterTrackByIdentity={name:"\u0275\u0275repeaterTrackByIdentity",moduleName:n};static componentInstance={name:"\u0275\u0275componentInstance",moduleName:n};static text={name:"\u0275\u0275text",moduleName:n};static enableBindings={name:"\u0275\u0275enableBindings",moduleName:n};static disableBindings={name:"\u0275\u0275disableBindings",moduleName:n};static getCurrentView={name:"\u0275\u0275getCurrentView",moduleName:n};static textInterpolate={name:"\u0275\u0275textInterpolate",moduleName:n};static textInterpolate1={name:"\u0275\u0275textInterpolate1",moduleName:n};static textInterpolate2={name:"\u0275\u0275textInterpolate2",moduleName:n};static textInterpolate3={name:"\u0275\u0275textInterpolate3",moduleName:n};static textInterpolate4={name:"\u0275\u0275textInterpolate4",moduleName:n};static textInterpolate5={name:"\u0275\u0275textInterpolate5",moduleName:n};static textInterpolate6={name:"\u0275\u0275textInterpolate6",moduleName:n};static textInterpolate7={name:"\u0275\u0275textInterpolate7",moduleName:n};static textInterpolate8={name:"\u0275\u0275textInterpolate8",moduleName:n};static textInterpolateV={name:"\u0275\u0275textInterpolateV",moduleName:n};static restoreView={name:"\u0275\u0275restoreView",moduleName:n};static pureFunction0={name:"\u0275\u0275pureFunction0",moduleName:n};static pureFunction1={name:"\u0275\u0275pureFunction1",moduleName:n};static pureFunction2={name:"\u0275\u0275pureFunction2",moduleName:n};static pureFunction3={name:"\u0275\u0275pureFunction3",moduleName:n};static pureFunction4={name:"\u0275\u0275pureFunction4",moduleName:n};static pureFunction5={name:"\u0275\u0275pureFunction5",moduleName:n};static pureFunction6={name:"\u0275\u0275pureFunction6",moduleName:n};static pureFunction7={name:"\u0275\u0275pureFunction7",moduleName:n};static pureFunction8={name:"\u0275\u0275pureFunction8",moduleName:n};static pureFunctionV={name:"\u0275\u0275pureFunctionV",moduleName:n};static pipeBind1={name:"\u0275\u0275pipeBind1",moduleName:n};static pipeBind2={name:"\u0275\u0275pipeBind2",moduleName:n};static pipeBind3={name:"\u0275\u0275pipeBind3",moduleName:n};static pipeBind4={name:"\u0275\u0275pipeBind4",moduleName:n};static pipeBindV={name:"\u0275\u0275pipeBindV",moduleName:n};static domProperty={name:"\u0275\u0275domProperty",moduleName:n};static property={name:"\u0275\u0275property",moduleName:n};static i18n={name:"\u0275\u0275i18n",moduleName:n};static i18nAttributes={name:"\u0275\u0275i18nAttributes",moduleName:n};static i18nExp={name:"\u0275\u0275i18nExp",moduleName:n};static i18nStart={name:"\u0275\u0275i18nStart",moduleName:n};static i18nEnd={name:"\u0275\u0275i18nEnd",moduleName:n};static i18nApply={name:"\u0275\u0275i18nApply",moduleName:n};static i18nPostprocess={name:"\u0275\u0275i18nPostprocess",moduleName:n};static pipe={name:"\u0275\u0275pipe",moduleName:n};static projection={name:"\u0275\u0275projection",moduleName:n};static projectionDef={name:"\u0275\u0275projectionDef",moduleName:n};static reference={name:"\u0275\u0275reference",moduleName:n};static inject={name:"\u0275\u0275inject",moduleName:n};static injectAttribute={name:"\u0275\u0275injectAttribute",moduleName:n};static directiveInject={name:"\u0275\u0275directiveInject",moduleName:n};static invalidFactory={name:"\u0275\u0275invalidFactory",moduleName:n};static invalidFactoryDep={name:"\u0275\u0275invalidFactoryDep",moduleName:n};static templateRefExtractor={name:"\u0275\u0275templateRefExtractor",moduleName:n};static forwardRef={name:"forwardRef",moduleName:n};static resolveForwardRef={name:"resolveForwardRef",moduleName:n};static replaceMetadata={name:"\u0275\u0275replaceMetadata",moduleName:n};static getReplaceMetadataURL={name:"\u0275\u0275getReplaceMetadataURL",moduleName:n};static \u{275}\u{275}defineInjectable={name:"\u0275\u0275defineInjectable",moduleName:n};static declareInjectable={name:"\u0275\u0275ngDeclareInjectable",moduleName:n};static InjectableDeclaration={name:"\u0275\u0275InjectableDeclaration",moduleName:n};static resolveWindow={name:"\u0275\u0275resolveWindow",moduleName:n};static resolveDocument={name:"\u0275\u0275resolveDocument",moduleName:n};static resolveBody={name:"\u0275\u0275resolveBody",moduleName:n};static getComponentDepsFactory={name:"\u0275\u0275getComponentDepsFactory",moduleName:n};static defineComponent={name:"\u0275\u0275defineComponent",moduleName:n};static declareComponent={name:"\u0275\u0275ngDeclareComponent",moduleName:n};static setComponentScope={name:"\u0275\u0275setComponentScope",moduleName:n};static ChangeDetectionStrategy={name:"ChangeDetectionStrategy",moduleName:n};static ViewEncapsulation={name:"ViewEncapsulation",moduleName:n};static ComponentDeclaration={name:"\u0275\u0275ComponentDeclaration",moduleName:n};static FactoryDeclaration={name:"\u0275\u0275FactoryDeclaration",moduleName:n};static declareFactory={name:"\u0275\u0275ngDeclareFactory",moduleName:n};static FactoryTarget={name:"\u0275\u0275FactoryTarget",moduleName:n};static defineDirective={name:"\u0275\u0275defineDirective",moduleName:n};static declareDirective={name:"\u0275\u0275ngDeclareDirective",moduleName:n};static DirectiveDeclaration={name:"\u0275\u0275DirectiveDeclaration",moduleName:n};static InjectorDef={name:"\u0275\u0275InjectorDef",moduleName:n};static InjectorDeclaration={name:"\u0275\u0275InjectorDeclaration",moduleName:n};static defineInjector={name:"\u0275\u0275defineInjector",moduleName:n};static declareInjector={name:"\u0275\u0275ngDeclareInjector",moduleName:n};static NgModuleDeclaration={name:"\u0275\u0275NgModuleDeclaration",moduleName:n};static ModuleWithProviders={name:"ModuleWithProviders",moduleName:n};static defineNgModule={name:"\u0275\u0275defineNgModule",moduleName:n};static declareNgModule={name:"\u0275\u0275ngDeclareNgModule",moduleName:n};static setNgModuleScope={name:"\u0275\u0275setNgModuleScope",moduleName:n};static registerNgModuleType={name:"\u0275\u0275registerNgModuleType",moduleName:n};static PipeDeclaration={name:"\u0275\u0275PipeDeclaration",moduleName:n};static definePipe={name:"\u0275\u0275definePipe",moduleName:n};static declarePipe={name:"\u0275\u0275ngDeclarePipe",moduleName:n};static declareClassMetadata={name:"\u0275\u0275ngDeclareClassMetadata",moduleName:n};static declareClassMetadataAsync={name:"\u0275\u0275ngDeclareClassMetadataAsync",moduleName:n};static setClassMetadata={name:"\u0275setClassMetadata",moduleName:n};static setClassMetadataAsync={name:"\u0275setClassMetadataAsync",moduleName:n};static setClassDebugInfo={name:"\u0275setClassDebugInfo",moduleName:n};static queryRefresh={name:"\u0275\u0275queryRefresh",moduleName:n};static viewQuery={name:"\u0275\u0275viewQuery",moduleName:n};static loadQuery={name:"\u0275\u0275loadQuery",moduleName:n};static contentQuery={name:"\u0275\u0275contentQuery",moduleName:n};static viewQuerySignal={name:"\u0275\u0275viewQuerySignal",moduleName:n};static contentQuerySignal={name:"\u0275\u0275contentQuerySignal",moduleName:n};static queryAdvance={name:"\u0275\u0275queryAdvance",moduleName:n};static twoWayProperty={name:"\u0275\u0275twoWayProperty",moduleName:n};static twoWayBindingSet={name:"\u0275\u0275twoWayBindingSet",moduleName:n};static twoWayListener={name:"\u0275\u0275twoWayListener",moduleName:n};static declareLet={name:"\u0275\u0275declareLet",moduleName:n};static storeLet={name:"\u0275\u0275storeLet",moduleName:n};static readContextLet={name:"\u0275\u0275readContextLet",moduleName:n};static attachSourceLocations={name:"\u0275\u0275attachSourceLocations",moduleName:n};static NgOnChangesFeature={name:"\u0275\u0275NgOnChangesFeature",moduleName:n};static InheritDefinitionFeature={name:"\u0275\u0275InheritDefinitionFeature",moduleName:n};static CopyDefinitionFeature={name:"\u0275\u0275CopyDefinitionFeature",moduleName:n};static ProvidersFeature={name:"\u0275\u0275ProvidersFeature",moduleName:n};static HostDirectivesFeature={name:"\u0275\u0275HostDirectivesFeature",moduleName:n};static ExternalStylesFeature={name:"\u0275\u0275ExternalStylesFeature",moduleName:n};static listener={name:"\u0275\u0275listener",moduleName:n};static getInheritedFactory={name:"\u0275\u0275getInheritedFactory",moduleName:n};static sanitizeHtml={name:"\u0275\u0275sanitizeHtml",moduleName:n};static sanitizeStyle={name:"\u0275\u0275sanitizeStyle",moduleName:n};static sanitizeResourceUrl={name:"\u0275\u0275sanitizeResourceUrl",moduleName:n};static sanitizeScript={name:"\u0275\u0275sanitizeScript",moduleName:n};static sanitizeUrl={name:"\u0275\u0275sanitizeUrl",moduleName:n};static sanitizeUrlOrResourceUrl={name:"\u0275\u0275sanitizeUrlOrResourceUrl",moduleName:n};static trustConstantHtml={name:"\u0275\u0275trustConstantHtml",moduleName:n};static trustConstantResourceUrl={name:"\u0275\u0275trustConstantResourceUrl",moduleName:n};static validateIframeAttribute={name:"\u0275\u0275validateIframeAttribute",moduleName:n};static InputSignalBrandWriteType={name:"\u0275INPUT_SIGNAL_BRAND_WRITE_TYPE",moduleName:n};static UnwrapDirectiveSignalInputs={name:"\u0275UnwrapDirectiveSignalInputs",moduleName:n};static unwrapWritableSignal={name:"\u0275unwrapWritableSignal",moduleName:n}},fi=class{full;major;minor;patch;constructor(e){this.full=e;let t=e.split(".");this.major=t[0],this.minor=t[1],this.patch=t.slice(2).join(".")}},xt;(function(e){e[e.Class=0]="Class",e[e.Function=1]="Function"})(xt||(xt={}));var We=class{input;errLocation;ctxLocation;message;constructor(e,t,s,i){this.input=t,this.errLocation=s,this.ctxLocation=i,this.message=`Parser Error: ${e} ${s} [${t}] in ${i}`}},he=class{start;end;constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new q(e+this.start,e+this.end)}},g=class{span;sourceSpan;constructor(e,t){this.span=e,this.sourceSpan=t}toString(){return"AST"}},Ae=class extends g{nameSpan;constructor(e,t,s){super(e,t),this.nameSpan=s}},k=class extends g{visit(e,t=null){}},Ie=class extends g{visit(e,t=null){return e.visitImplicitReceiver(this,t)}},vi=class extends Ie{visit(e,t=null){var s;return(s=e.visitThisReceiver)==null?void 0:s.call(e,this,t)}},us=class extends g{expressions;constructor(e,t,s){super(e,t),this.expressions=s}visit(e,t=null){return e.visitChain(this,t)}},cs=class extends g{condition;trueExp;falseExp;constructor(e,t,s,i,r){super(e,t),this.condition=s,this.trueExp=i,this.falseExp=r}visit(e,t=null){return e.visitConditional(this,t)}},_e=class extends Ae{receiver;name;constructor(e,t,s,i,r){super(e,t,s),this.receiver=i,this.name=r}visit(e,t=null){return e.visitPropertyRead(this,t)}},hs=class extends Ae{receiver;name;value;constructor(e,t,s,i,r,a){super(e,t,s),this.receiver=i,this.name=r,this.value=a}visit(e,t=null){return e.visitPropertyWrite(this,t)}},Ke=class extends Ae{receiver;name;constructor(e,t,s,i,r){super(e,t,s),this.receiver=i,this.name=r}visit(e,t=null){return e.visitSafePropertyRead(this,t)}},ps=class extends g{receiver;key;constructor(e,t,s,i){super(e,t),this.receiver=s,this.key=i}visit(e,t=null){return e.visitKeyedRead(this,t)}},qe=class extends g{receiver;key;constructor(e,t,s,i){super(e,t),this.receiver=s,this.key=i}visit(e,t=null){return e.visitSafeKeyedRead(this,t)}},ds=class extends g{receiver;key;value;constructor(e,t,s,i,r){super(e,t),this.receiver=s,this.key=i,this.value=r}visit(e,t=null){return e.visitKeyedWrite(this,t)}},ms=class extends Ae{exp;name;args;constructor(e,t,s,i,r,a){super(e,t,a),this.exp=s,this.name=i,this.args=r}visit(e,t=null){return e.visitPipe(this,t)}},L=class extends g{value;constructor(e,t,s){super(e,t),this.value=s}visit(e,t=null){return e.visitLiteralPrimitive(this,t)}},fs=class extends g{expressions;constructor(e,t,s){super(e,t),this.expressions=s}visit(e,t=null){return e.visitLiteralArray(this,t)}},vs=class extends g{keys;values;constructor(e,t,s,i){super(e,t),this.keys=s,this.values=i}visit(e,t=null){return e.visitLiteralMap(this,t)}},xs=class extends g{strings;expressions;constructor(e,t,s,i){super(e,t),this.strings=s,this.expressions=i}visit(e,t=null){return e.visitInterpolation(this,t)}},A=class extends g{operation;left;right;constructor(e,t,s,i,r){super(e,t),this.operation=s,this.left=i,this.right=r}visit(e,t=null){return e.visitBinary(this,t)}},ge=class e extends A{operator;expr;left=null;right=null;operation=null;static createMinus(t,s,i){return new e(t,s,"-",i,"-",new L(t,s,0),i)}static createPlus(t,s,i){return new e(t,s,"+",i,"-",i,new L(t,s,0))}constructor(t,s,i,r,a,o,h){super(t,s,a,o,h),this.operator=i,this.expr=r}visit(t,s=null){return t.visitUnary!==void 0?t.visitUnary(this,s):t.visitBinary(this,s)}},Pe=class extends g{expression;constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitPrefixNot(this,t)}},Te=class extends g{expression;constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitTypeofExpression(this,t)}},Oe=class extends g{expression;constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitVoidExpression(this,t)}},ys=class extends g{expression;constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitNonNullAssert(this,t)}},gs=class extends g{receiver;args;argumentSpan;constructor(e,t,s,i,r){super(e,t),this.receiver=s,this.args=i,this.argumentSpan=r}visit(e,t=null){return e.visitCall(this,t)}},$e=class extends g{receiver;args;argumentSpan;constructor(e,t,s,i,r){super(e,t),this.receiver=s,this.args=i,this.argumentSpan=r}visit(e,t=null){return e.visitSafeCall(this,t)}},He=class extends g{tag;template;constructor(e,t,s,i){super(e,t),this.tag=s,this.template=i}visit(e,t){return e.visitTaggedTemplateLiteral(this,t)}},Ue=class extends g{elements;expressions;constructor(e,t,s,i){super(e,t),this.elements=s,this.expressions=i}visit(e,t){return e.visitTemplateLiteral(this,t)}},je=class extends g{text;constructor(e,t,s){super(e,t),this.text=s}visit(e,t){return e.visitTemplateLiteralElement(this,t)}},Es=class extends g{expression;constructor(e,t,s){super(e,t),this.expression=s}visit(e,t){return e.visitParenthesizedExpression(this,t)}},q=class{start;end;constructor(e,t){this.start=e,this.end=t}},U=class extends g{ast;source;location;errors;constructor(e,t,s,i,r){super(new he(0,t===null?0:t.length),new q(i,t===null?i:i+t.length)),this.ast=e,this.source=t,this.location=s,this.errors=r}visit(e,t=null){return e.visitASTWithSource?e.visitASTWithSource(this,t):this.ast.visit(e,t)}toString(){return`${this.source} in ${this.location}`}},Ge=class{sourceSpan;key;value;constructor(e,t,s){this.sourceSpan=e,this.key=t,this.value=s}},ws=class{sourceSpan;key;value;constructor(e,t,s){this.sourceSpan=e,this.key=t,this.value=s}},xi=class{visit(e,t){e.visit(this,t)}visitUnary(e,t){this.visit(e.expr,t)}visitBinary(e,t){this.visit(e.left,t),this.visit(e.right,t)}visitChain(e,t){this.visitAll(e.expressions,t)}visitConditional(e,t){this.visit(e.condition,t),this.visit(e.trueExp,t),this.visit(e.falseExp,t)}visitPipe(e,t){this.visit(e.exp,t),this.visitAll(e.args,t)}visitImplicitReceiver(e,t){}visitThisReceiver(e,t){}visitInterpolation(e,t){this.visitAll(e.expressions,t)}visitKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitKeyedWrite(e,t){this.visit(e.receiver,t),this.visit(e.key,t),this.visit(e.value,t)}visitLiteralArray(e,t){this.visitAll(e.expressions,t)}visitLiteralMap(e,t){this.visitAll(e.values,t)}visitLiteralPrimitive(e,t){}visitPrefixNot(e,t){this.visit(e.expression,t)}visitTypeofExpression(e,t){this.visit(e.expression,t)}visitVoidExpression(e,t){this.visit(e.expression,t)}visitNonNullAssert(e,t){this.visit(e.expression,t)}visitPropertyRead(e,t){this.visit(e.receiver,t)}visitPropertyWrite(e,t){this.visit(e.receiver,t),this.visit(e.value,t)}visitSafePropertyRead(e,t){this.visit(e.receiver,t)}visitSafeKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitSafeCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitTemplateLiteral(e,t){for(let s=0;s<e.elements.length;s++){this.visit(e.elements[s],t);let i=s<e.expressions.length?e.expressions[s]:null;i!==null&&this.visit(i,t)}}visitTemplateLiteralElement(e,t){}visitTaggedTemplateLiteral(e,t){this.visit(e.tag,t),this.visit(e.template,t)}visitParenthesizedExpression(e,t){this.visit(e.expression,t)}visitAll(e,t){for(let s of e)this.visit(s,t)}},yt;(function(e){e[e.DEFAULT=0]="DEFAULT",e[e.LITERAL_ATTR=1]="LITERAL_ATTR",e[e.ANIMATION=2]="ANIMATION",e[e.TWO_WAY=3]="TWO_WAY"})(yt||(yt={}));var gt;(function(e){e[e.Regular=0]="Regular",e[e.Animation=1]="Animation",e[e.TwoWay=2]="TwoWay"})(gt||(gt={}));var F;(function(e){e[e.Property=0]="Property",e[e.Attribute=1]="Attribute",e[e.Class=2]="Class",e[e.Style=3]="Style",e[e.Animation=4]="Animation",e[e.TwoWay=5]="TwoWay"})(F||(F={}));var Et;(function(e){e[e.RAW_TEXT=0]="RAW_TEXT",e[e.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",e[e.PARSABLE_DATA=2]="PARSABLE_DATA"})(Et||(Et={}));var yi=[/@/,/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function gi(e,t){if(t!=null&&!(Array.isArray(t)&&t.length==2))throw Error(`Expected '${e}' to be an array, [start, end].`);if(t!=null){let s=t[0],i=t[1];yi.forEach((r)=>{if(r.test(s)||r.test(i))throw Error(`['${s}', '${i}'] contains unusable interpolation symbol.`)})}}var Ei=class e{start;end;static fromArray(t){return t?(gi("interpolation",t),new e(t[0],t[1])):j}constructor(t,s){this.start=t,this.end=s}},j=new Ei("{{","}}"),fe=0,Ss=9,wi=10,Si=11,Ci=12,Ni=13,Cs=32,Ii=33,Ns=34,Pi=35,Ze=36,Ti=37,wt=38,Is=39,Ee=40,G=41,St=42,Ps=43,ie=44,Ts=45,z=46,ze=47,Q=58,re=59,Oi=60,ve=61,bi=62,Ct=63,ki=48,Li=57,Os=65,Ai=69,bs=90,we=91,Nt=92,ne=93,Mi=94,et=95,ks=97,Ri=101,Bi=102,Di=110,Fi=114,Vi=116,Wi=117,_i=118,Ls=122,be=123,It=124,ae=125,As=160,Qe=96;function Ki(e){return e>=Ss&&e<=Cs||e==As}function K(e){return ki<=e&&e<=Li}function qi(e){return e>=ks&&e<=Ls||e>=Os&&e<=bs}function Pt(e){return e===Is||e===Ns||e===Qe}var Tt;(function(e){e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR"})(Tt||(Tt={}));var Ot;(function(e){e[e.Inline=0]="Inline",e[e.SideEffect=1]="SideEffect",e[e.Omit=2]="Omit"})(Ot||(Ot={}));var bt;(function(e){e[e.Global=0]="Global",e[e.Local=1]="Local"})(bt||(bt={}));var kt;(function(e){e[e.Directive=0]="Directive",e[e.Pipe=1]="Pipe",e[e.NgModule=2]="NgModule"})(kt||(kt={}));var $i="(:(where|is)\\()?",Ms="-shadowcsshost",Hi="-shadowcsscontext",Rs="(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))",Ur=new RegExp(Ms+Rs+"?([^,{]*)","gim"),Bs=Hi+Rs+"?([^{]*)",jr=new RegExp(`${$i}(${Bs})`,"gim"),Gr=new RegExp(Bs,"im"),Ui=Ms+"-no-combinator",zr=new RegExp(`${Ui}(?![^(]*\\))`,"g"),Ds="%COMMENT%",Qr=new RegExp(Ds,"g"),Yr=new RegExp(`(\\s*(?:${Ds}\\s*)*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))`,"g"),ji="%COMMA_IN_PLACEHOLDER%",Gi="%SEMI_IN_PLACEHOLDER%",zi="%COLON_IN_PLACEHOLDER%",Xr=new RegExp(ji,"g"),Jr=new RegExp(Gi,"g"),Zr=new RegExp(zi,"g"),d;(function(e){e[e.ListEnd=0]="ListEnd",e[e.Statement=1]="Statement",e[e.Variable=2]="Variable",e[e.ElementStart=3]="ElementStart",e[e.Element=4]="Element",e[e.Template=5]="Template",e[e.ElementEnd=6]="ElementEnd",e[e.ContainerStart=7]="ContainerStart",e[e.Container=8]="Container",e[e.ContainerEnd=9]="ContainerEnd",e[e.DisableBindings=10]="DisableBindings",e[e.ConditionalCreate=11]="ConditionalCreate",e[e.ConditionalBranchCreate=12]="ConditionalBranchCreate",e[e.Conditional=13]="Conditional",e[e.EnableBindings=14]="EnableBindings",e[e.Text=15]="Text",e[e.Listener=16]="Listener",e[e.InterpolateText=17]="InterpolateText",e[e.Binding=18]="Binding",e[e.Property=19]="Property",e[e.StyleProp=20]="StyleProp",e[e.ClassProp=21]="ClassProp",e[e.StyleMap=22]="StyleMap",e[e.ClassMap=23]="ClassMap",e[e.Advance=24]="Advance",e[e.Pipe=25]="Pipe",e[e.Attribute=26]="Attribute",e[e.ExtractedAttribute=27]="ExtractedAttribute",e[e.Defer=28]="Defer",e[e.DeferOn=29]="DeferOn",e[e.DeferWhen=30]="DeferWhen",e[e.I18nMessage=31]="I18nMessage",e[e.DomProperty=32]="DomProperty",e[e.Namespace=33]="Namespace",e[e.ProjectionDef=34]="ProjectionDef",e[e.Projection=35]="Projection",e[e.RepeaterCreate=36]="RepeaterCreate",e[e.Repeater=37]="Repeater",e[e.TwoWayProperty=38]="TwoWayProperty",e[e.TwoWayListener=39]="TwoWayListener",e[e.DeclareLet=40]="DeclareLet",e[e.StoreLet=41]="StoreLet",e[e.I18nStart=42]="I18nStart",e[e.I18n=43]="I18n",e[e.I18nEnd=44]="I18nEnd",e[e.I18nExpression=45]="I18nExpression",e[e.I18nApply=46]="I18nApply",e[e.IcuStart=47]="IcuStart",e[e.IcuEnd=48]="IcuEnd",e[e.IcuPlaceholder=49]="IcuPlaceholder",e[e.I18nContext=50]="I18nContext",e[e.I18nAttributes=51]="I18nAttributes",e[e.SourceLocation=52]="SourceLocation"})(d||(d={}));var Z;(function(e){e[e.LexicalRead=0]="LexicalRead",e[e.Context=1]="Context",e[e.TrackContext=2]="TrackContext",e[e.ReadVariable=3]="ReadVariable",e[e.NextContext=4]="NextContext",e[e.Reference=5]="Reference",e[e.StoreLet=6]="StoreLet",e[e.ContextLetReference=7]="ContextLetReference",e[e.GetCurrentView=8]="GetCurrentView",e[e.RestoreView=9]="RestoreView",e[e.ResetView=10]="ResetView",e[e.PureFunctionExpr=11]="PureFunctionExpr",e[e.PureFunctionParameterExpr=12]="PureFunctionParameterExpr",e[e.PipeBinding=13]="PipeBinding",e[e.PipeBindingVariadic=14]="PipeBindingVariadic",e[e.SafePropertyRead=15]="SafePropertyRead",e[e.SafeKeyedRead=16]="SafeKeyedRead",e[e.SafeInvokeFunction=17]="SafeInvokeFunction",e[e.SafeTernaryExpr=18]="SafeTernaryExpr",e[e.EmptyExpr=19]="EmptyExpr",e[e.AssignTemporaryExpr=20]="AssignTemporaryExpr",e[e.ReadTemporaryExpr=21]="ReadTemporaryExpr",e[e.SlotLiteralExpr=22]="SlotLiteralExpr",e[e.ConditionalCase=23]="ConditionalCase",e[e.ConstCollected=24]="ConstCollected",e[e.TwoWayBindingSet=25]="TwoWayBindingSet"})(Z||(Z={}));var Lt;(function(e){e[e.None=0]="None",e[e.AlwaysInline=1]="AlwaysInline"})(Lt||(Lt={}));var At;(function(e){e[e.Context=0]="Context",e[e.Identifier=1]="Identifier",e[e.SavedView=2]="SavedView",e[e.Alias=3]="Alias"})(At||(At={}));var Mt;(function(e){e[e.Normal=0]="Normal",e[e.TemplateDefinitionBuilder=1]="TemplateDefinitionBuilder"})(Mt||(Mt={}));var V;(function(e){e[e.Attribute=0]="Attribute",e[e.ClassName=1]="ClassName",e[e.StyleProperty=2]="StyleProperty",e[e.Property=3]="Property",e[e.Template=4]="Template",e[e.I18n=5]="I18n",e[e.Animation=6]="Animation",e[e.TwoWayProperty=7]="TwoWayProperty"})(V||(V={}));var Rt;(function(e){e[e.Creation=0]="Creation",e[e.Postproccessing=1]="Postproccessing"})(Rt||(Rt={}));var Bt;(function(e){e[e.I18nText=0]="I18nText",e[e.I18nAttribute=1]="I18nAttribute"})(Bt||(Bt={}));var Dt;(function(e){e[e.None=0]="None",e[e.ElementTag=1]="ElementTag",e[e.TemplateTag=2]="TemplateTag",e[e.OpenTag=4]="OpenTag",e[e.CloseTag=8]="CloseTag",e[e.ExpressionIndex=16]="ExpressionIndex"})(Dt||(Dt={}));var Ft;(function(e){e[e.HTML=0]="HTML",e[e.SVG=1]="SVG",e[e.Math=2]="Math"})(Ft||(Ft={}));var Vt;(function(e){e[e.Idle=0]="Idle",e[e.Immediate=1]="Immediate",e[e.Timer=2]="Timer",e[e.Hover=3]="Hover",e[e.Interaction=4]="Interaction",e[e.Viewport=5]="Viewport",e[e.Never=6]="Never"})(Vt||(Vt={}));var Wt;(function(e){e[e.RootI18n=0]="RootI18n",e[e.Icu=1]="Icu",e[e.Attr=2]="Attr"})(Wt||(Wt={}));var _t;(function(e){e[e.NgTemplate=0]="NgTemplate",e[e.Structural=1]="Structural",e[e.Block=2]="Block"})(_t||(_t={}));var Qi=Symbol("ConsumesSlot"),Fs=Symbol("DependsOnSlotContext"),pe=Symbol("ConsumesVars"),tt=Symbol("UsesVarOffset"),en={[Qi]:!0,numSlotsUsed:1},tn={[Fs]:!0},sn={[pe]:!0},Vs=class{strings;expressions;i18nPlaceholders;constructor(e,t,s){if(this.strings=e,this.expressions=t,this.i18nPlaceholders=s,s.length!==0&&s.length!==t.length)throw Error(`Expected ${t.length} placeholders to match interpolation expression count, but got ${s.length}`)}},Me=class extends I{constructor(e=null){super(null,e)}},rn=class e extends Me{target;value;sourceSpan;kind=Z.StoreLet;[pe]=!0;[Fs]=!0;constructor(t,s,i){super(),this.target=t,this.value=s,this.sourceSpan=i}visitExpression(){}isEquivalent(t){return t instanceof e&&t.target===this.target&&t.value.isEquivalent(this.value)}isConstant(){return!1}transformInternalExpressions(t,s){this.value=(this.value,void 0)}clone(){return new e(this.target,this.value,this.sourceSpan)}},nn=class e extends Me{kind=Z.PureFunctionExpr;[pe]=!0;[tt]=!0;varOffset=null;body;args;fn=null;constructor(t,s){super(),this.body=t,this.args=s}visitExpression(t,s){var i;(i=this.body)==null||i.visitExpression(t,s);for(let r of this.args)r.visitExpression(t,s)}isEquivalent(t){return!(t instanceof e)||t.args.length!==this.args.length?!1:t.body!==null&&this.body!==null&&t.body.isEquivalent(this.body)&&t.args.every((s,i)=>s.isEquivalent(this.args[i]))}isConstant(){return!1}transformInternalExpressions(t,s){this.body!==null?this.body=(this.body,s|Ye.InChildOperation,void 0):this.fn!==null&&(this.fn=(this.fn,void 0));for(let i=0;i<this.args.length;i++)this.args[i]=(this.args[i],void 0)}clone(){var t,s;let i=new e(((t=this.body)==null?void 0:t.clone())??null,this.args.map((r)=>r.clone()));return i.fn=((s=this.fn)==null?void 0:s.clone())??null,i.varOffset=this.varOffset,i}},an=class e extends Me{target;targetSlot;name;args;kind=Z.PipeBinding;[pe]=!0;[tt]=!0;varOffset=null;constructor(t,s,i,r){super(),this.target=t,this.targetSlot=s,this.name=i,this.args=r}visitExpression(t,s){for(let i of this.args)i.visitExpression(t,s)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(t,s){for(let i=0;i<this.args.length;i++)this.args[i]=(this.args[i],void 0)}clone(){let t=new e(this.target,this.targetSlot,this.name,this.args.map((s)=>s.clone()));return t.varOffset=this.varOffset,t}},on=class e extends Me{target;targetSlot;name;args;numArgs;kind=Z.PipeBindingVariadic;[pe]=!0;[tt]=!0;varOffset=null;constructor(t,s,i,r,a){super(),this.target=t,this.targetSlot=s,this.name=i,this.args=r,this.numArgs=a}visitExpression(t,s){this.args.visitExpression(t,s)}isEquivalent(){return!1}isConstant(){return!1}transformInternalExpressions(t,s){this.args=(this.args,void 0)}clone(){let t=new e(this.target,this.targetSlot,this.name,this.args.clone(),this.numArgs);return t.varOffset=this.varOffset,t}},Ye;(function(e){e[e.None=0]="None",e[e.InChildOperation=1]="InChildOperation"})(Ye||(Ye={}));var ln=new Set([d.Element,d.ElementStart,d.Container,d.ContainerStart,d.Template,d.RepeaterCreate,d.ConditionalCreate,d.ConditionalBranchCreate]),Kt;(function(e){e[e.Tmpl=0]="Tmpl",e[e.Host=1]="Host",e[e.Both=2]="Both"})(Kt||(Kt={}));var un=new Map([[c.attribute,c.attribute],[c.classProp,c.classProp],[c.element,c.element],[c.elementContainer,c.elementContainer],[c.elementContainerEnd,c.elementContainerEnd],[c.elementContainerStart,c.elementContainerStart],[c.elementEnd,c.elementEnd],[c.elementStart,c.elementStart],[c.domProperty,c.domProperty],[c.i18nExp,c.i18nExp],[c.listener,c.listener],[c.listener,c.listener],[c.property,c.property],[c.styleProp,c.styleProp],[c.syntheticHostListener,c.syntheticHostListener],[c.syntheticHostProperty,c.syntheticHostProperty],[c.templateCreate,c.templateCreate],[c.twoWayProperty,c.twoWayProperty],[c.twoWayListener,c.twoWayListener],[c.declareLet,c.declareLet],[c.conditionalCreate,c.conditionalBranchCreate],[c.conditionalBranchCreate,c.conditionalBranchCreate]]),cn=Object.freeze([]),hn=new Map([[d.ElementEnd,[d.ElementStart,d.Element]],[d.ContainerEnd,[d.ContainerStart,d.Container]],[d.I18nEnd,[d.I18nStart,d.I18n]]]),pn=new Set([d.Pipe]),Yi={},Xi="\uE500";Yi.ngsp=Xi;var qt;(function(e){e.HEX="hexadecimal",e.DEC="decimal"})(qt||(qt={}));var Ws=` \f
3
3
  \r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`,dn=new RegExp(`[^${Ws}]`),mn=new RegExp(`[${Ws}]{2,}`,"g"),m;(function(e){e[e.Character=0]="Character",e[e.Identifier=1]="Identifier",e[e.PrivateIdentifier=2]="PrivateIdentifier",e[e.Keyword=3]="Keyword",e[e.String=4]="String",e[e.Operator=5]="Operator",e[e.Number=6]="Number",e[e.Error=7]="Error"})(m||(m={}));var W;(function(e){e[e.Plain=0]="Plain",e[e.TemplateLiteralPart=1]="TemplateLiteralPart",e[e.TemplateLiteralEnd=2]="TemplateLiteralEnd"})(W||(W={}));var Ji=["var","let","as","null","undefined","true","false","if","else","this","typeof","void","in"],_s=class{tokenize(e){return new rr(e).scan()}},D=class{index;end;type;numValue;strValue;constructor(e,t,s,i,r){this.index=e,this.end=t,this.type=s,this.numValue=i,this.strValue=r}isCharacter(e){return this.type===m.Character&&this.numValue===e}isNumber(){return this.type===m.Number}isString(){return this.type===m.String}isOperator(e){return this.type===m.Operator&&this.strValue===e}isIdentifier(){return this.type===m.Identifier}isPrivateIdentifier(){return this.type===m.PrivateIdentifier}isKeyword(){return this.type===m.Keyword}isKeywordLet(){return this.type===m.Keyword&&this.strValue==="let"}isKeywordAs(){return this.type===m.Keyword&&this.strValue==="as"}isKeywordNull(){return this.type===m.Keyword&&this.strValue==="null"}isKeywordUndefined(){return this.type===m.Keyword&&this.strValue==="undefined"}isKeywordTrue(){return this.type===m.Keyword&&this.strValue==="true"}isKeywordFalse(){return this.type===m.Keyword&&this.strValue==="false"}isKeywordThis(){return this.type===m.Keyword&&this.strValue==="this"}isKeywordTypeof(){return this.type===m.Keyword&&this.strValue==="typeof"}isKeywordVoid(){return this.type===m.Keyword&&this.strValue==="void"}isKeywordIn(){return this.type===m.Keyword&&this.strValue==="in"}isError(){return this.type===m.Error}toNumber(){return this.type===m.Number?this.numValue:-1}isTemplateLiteralPart(){return this.isString()&&this.kind===W.TemplateLiteralPart}isTemplateLiteralEnd(){return this.isString()&&this.kind===W.TemplateLiteralEnd}isTemplateLiteralInterpolationStart(){return this.isOperator("${")}isTemplateLiteralInterpolationEnd(){return this.isOperator("}")}toString(){switch(this.type){case m.Character:case m.Identifier:case m.Keyword:case m.Operator:case m.PrivateIdentifier:case m.String:case m.Error:return this.strValue;case m.Number:return this.numValue.toString();default:return null}}},Be=class extends D{kind;constructor(e,t,s,i){super(e,t,m.String,0,s),this.kind=i}};function xe(e,t,s){return new D(e,t,m.Character,s,String.fromCharCode(s))}function Zi(e,t,s){return new D(e,t,m.Identifier,0,s)}function er(e,t,s){return new D(e,t,m.PrivateIdentifier,0,s)}function tr(e,t,s){return new D(e,t,m.Keyword,0,s)}function ee(e,t,s){return new D(e,t,m.Operator,0,s)}function sr(e,t,s){return new D(e,t,m.Number,s,"")}function ir(e,t,s){return new D(e,t,m.Error,0,s)}var ye=new D(-1,-1,m.Character,0,""),rr=class{input;tokens=[];length;peek=0;index=-1;braceStack=[];constructor(e){this.input=e,this.length=e.length,this.advance()}scan(){let e=this.scanToken();for(;e!==null;)this.tokens.push(e),e=this.scanToken();return this.tokens}advance(){this.peek=++this.index>=this.length?fe:this.input.charCodeAt(this.index)}scanToken(){let e=this.input,t=this.length,s=this.peek,i=this.index;for(;s<=Cs;)if(++i>=t){s=fe;break}else s=e.charCodeAt(i);if(this.peek=s,this.index=i,i>=t)return null;if($t(s))return this.scanIdentifier();if(K(s))return this.scanNumber(i);let r=i;switch(s){case z:return this.advance(),K(this.peek)?this.scanNumber(r):xe(r,this.index,z);case Ee:case G:case we:case ne:case ie:case Q:case re:return this.scanCharacter(r,s);case be:return this.scanOpenBrace(r,s);case ae:return this.scanCloseBrace(r,s);case Is:case Ns:return this.scanString();case Qe:return this.advance(),this.scanTemplateLiteralPart(r);case Pi:return this.scanPrivateIdentifier();case Ps:case Ts:case ze:case Ti:case Mi:return this.scanOperator(r,String.fromCharCode(s));case St:return this.scanComplexOperator(r,"*",St,"*");case Ct:return this.scanQuestion(r);case Oi:case bi:return this.scanComplexOperator(r,String.fromCharCode(s),ve,"=");case Ii:case ve:return this.scanComplexOperator(r,String.fromCharCode(s),ve,"=",ve,"=");case wt:return this.scanComplexOperator(r,"&",wt,"&");case It:return this.scanComplexOperator(r,"|",It,"|");case As:for(;Ki(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(s)}]`,0)}scanCharacter(e,t){return this.advance(),xe(e,this.index,t)}scanOperator(e,t){return this.advance(),ee(e,this.index,t)}scanOpenBrace(e,t){return this.braceStack.push("expression"),this.advance(),xe(e,this.index,t)}scanCloseBrace(e,t){return this.advance(),this.braceStack.pop()==="interpolation"?(this.tokens.push(ee(e,this.index,"}")),this.scanTemplateLiteralPart(this.index)):xe(e,this.index,t)}scanComplexOperator(e,t,s,i,r,a){this.advance();let o=t;return this.peek==s&&(this.advance(),o+=i),r!=null&&this.peek==r&&(this.advance(),o+=a),ee(e,this.index,o)}scanIdentifier(){let e=this.index;for(this.advance();Ht(this.peek);)this.advance();let t=this.input.substring(e,this.index);return Ji.indexOf(t)>-1?tr(e,this.index,t):Zi(e,this.index,t)}scanPrivateIdentifier(){let e=this.index;if(this.advance(),!$t(this.peek))return this.error("Invalid character [#]",-1);for(;Ht(this.peek);)this.advance();let t=this.input.substring(e,this.index);return er(e,this.index,t)}scanNumber(e){let t=this.index===e,s=!1;for(this.advance();;){if(!K(this.peek))if(this.peek===et){if(!K(this.input.charCodeAt(this.index-1))||!K(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);s=!0}else if(this.peek===z)t=!1;else if(nr(this.peek)){if(this.advance(),ar(this.peek)&&this.advance(),!K(this.peek))return this.error("Invalid exponent",-1);t=!1}else break;this.advance()}let i=this.input.substring(e,this.index);s&&(i=i.replace(/_/g,""));let r=t?lr(i):parseFloat(i);return sr(e,this.index,r)}scanString(){let e=this.index,t=this.peek;this.advance();let s="",i=this.index,r=this.input;for(;this.peek!=t;)if(this.peek==Nt){let o=this.scanStringBackslash(s,i);if(typeof o!="string")return o;s=o,i=this.index}else{if(this.peek==fe)return this.error("Unterminated quote",0);this.advance()}let a=r.substring(i,this.index);return this.advance(),new Be(e,this.index,s+a,W.Plain)}scanQuestion(e){this.advance();let t="?";return(this.peek===Ct||this.peek===z)&&(t+=this.peek===z?".":"?",this.advance()),ee(e,this.index,t)}scanTemplateLiteralPart(e){let t="",s=this.index;for(;this.peek!==Qe;)if(this.peek===Nt){let r=this.scanStringBackslash(t,s);if(typeof r!="string")return r;t=r,s=this.index}else if(this.peek===Ze){let r=this.index;if(this.advance(),this.peek===be)return this.braceStack.push("interpolation"),this.tokens.push(new Be(e,r,t+this.input.substring(s,r),W.TemplateLiteralPart)),this.advance(),ee(r,this.index,this.input.substring(r,this.index))}else{if(this.peek===fe)return this.error("Unterminated template literal",0);this.advance()}let i=this.input.substring(s,this.index);return this.advance(),new Be(e,this.index,t+i,W.TemplateLiteralEnd)}error(e,t){let s=this.index+t;return ir(s,this.index,`Lexer Error: ${e} at column ${s} in expression [${this.input}]`)}scanStringBackslash(e,t){e+=this.input.substring(t,this.index);let s;if(this.advance(),this.peek===Wi){let i=this.input.substring(this.index+1,this.index+5);if(/^[0-9a-f]+$/i.test(i))s=parseInt(i,16);else return this.error(`Invalid unicode escape [\\u${i}]`,0);for(let r=0;r<5;r++)this.advance()}else s=or(this.peek),this.advance();return e+=String.fromCharCode(s),e}};function $t(e){return ks<=e&&e<=Ls||Os<=e&&e<=bs||e==et||e==Ze}function Ht(e){return qi(e)||K(e)||e==et||e==Ze}function nr(e){return e==Ri||e==Ai}function ar(e){return e==Ts||e==Ps}function or(e){switch(e){case Di:return wi;case Bi:return Ci;case Fi:return Ni;case Vi:return Ss;case _i:return Si;default:return e}}function lr(e){let t=parseInt(e);if(isNaN(t))throw Error("Invalid integer literal when parsing "+e);return t}var ur=class{strings;expressions;offsets;constructor(e,t,s){this.strings=e,this.expressions=t,this.offsets=s}},cr=class{templateBindings;warnings;errors;constructor(e,t,s){this.templateBindings=e,this.warnings=t,this.errors=s}},st=class{_lexer;errors=[];constructor(e){this._lexer=e}parseAction(e,t,s,i=j){this._checkNoInterpolation(e,t,i);let r=this._stripComments(e),a=this._lexer.tokenize(r),o=new te(e,t,s,a,1,this.errors,0).parseChain();return new U(o,e,t,s,this.errors)}parseBinding(e,t,s,i=j){let r=this._parseBindingAst(e,t,s,i);return new U(r,e,t,s,this.errors)}checkSimpleExpression(e){let t=new hr;return e.visit(t),t.errors}parseSimpleBinding(e,t,s,i=j){let r=this._parseBindingAst(e,t,s,i),a=this.checkSimpleExpression(r);return a.length>0&&this._reportError(`Host binding expression cannot contain ${a.join(" ")}`,e,t),new U(r,e,t,s,this.errors)}_reportError(e,t,s,i){this.errors.push(new We(e,t,s,i))}_parseBindingAst(e,t,s,i){this._checkNoInterpolation(e,t,i);let r=this._stripComments(e),a=this._lexer.tokenize(r);return new te(e,t,s,a,0,this.errors,0).parseChain()}parseTemplateBindings(e,t,s,i,r){let a=this._lexer.tokenize(t);return new te(t,s,r,a,0,this.errors,0).parseTemplateBindings({source:e,span:new q(i,i+e.length)})}parseInterpolation(e,t,s,i,r=j){let{strings:a,expressions:o,offsets:h}=this.splitInterpolation(e,t,i,r);if(o.length===0)return null;let p=[];for(let f=0;f<o.length;++f){let E=o[f].text,w=this._stripComments(E),T=this._lexer.tokenize(w),N=new te(e,t,s,T,0,this.errors,h[f]).parseChain();p.push(N)}return this.createInterpolationAst(a.map((f)=>f.text),p,e,t,s)}parseInterpolationExpression(e,t,s){let i=this._stripComments(e),r=this._lexer.tokenize(i),a=new te(e,t,s,r,0,this.errors,0).parseChain(),o=["",""];return this.createInterpolationAst(o,[a],e,t,s)}createInterpolationAst(e,t,s,i,r){let a=new he(0,s.length),o=new xs(a,a.toAbsolute(r),e,t);return new U(o,s,i,r,this.errors)}splitInterpolation(e,t,s,i=j){let r=[],a=[],o=[],h=s?pr(s):null,p=0,f=!1,E=!1,{start:w,end:T}=i;for(;p<e.length;)if(f){let N=p,$=N+w.length,H=this._getInterpolationEndIndex(e,T,$);if(H===-1){f=!1,E=!0;break}let _=H+T.length,me=e.substring($,H);me.trim().length===0&&this._reportError("Blank expressions are not allowed in interpolated strings",e,`at column ${p} in`,t),a.push({text:me,start:N,end:_});let Qs=((h==null?void 0:h.get(N))??N)+w.length;o.push(Qs),p=_,f=!1}else{let N=p;p=e.indexOf(w,p),p===-1&&(p=e.length);let $=e.substring(N,p);r.push({text:$,start:N,end:p}),f=!0}if(!f)if(E){let N=r[r.length-1];N.text+=e.substring(p),N.end=e.length}else r.push({text:e.substring(p),start:p,end:e.length});return new ur(r,a,o)}wrapLiteralPrimitive(e,t,s){let i=new he(0,e==null?0:e.length);return new U(new L(i,i.toAbsolute(s),e),e,t,s,this.errors)}_stripComments(e){let t=this._commentStart(e);return t!=null?e.substring(0,t):e}_commentStart(e){let t=null;for(let s=0;s<e.length-1;s++){let i=e.charCodeAt(s),r=e.charCodeAt(s+1);if(i===ze&&r==ze&&t==null)return s;t===i?t=null:t==null&&Pt(i)&&(t=i)}return null}_checkNoInterpolation(e,t,{start:s,end:i}){let r=-1,a=-1;for(let o of this._forEachUnquotedChar(e,0))if(r===-1)e.startsWith(s)&&(r=o);else if(a=this._getInterpolationEndIndex(e,i,o),a>-1)break;r>-1&&a>-1&&this._reportError(`Got interpolation (${s}${i}) where expression was expected`,e,`at column ${r} in`,t)}_getInterpolationEndIndex(e,t,s){for(let i of this._forEachUnquotedChar(e,s)){if(e.startsWith(t,i))return i;if(e.startsWith("//",i))return e.indexOf(t,i)}return-1}*_forEachUnquotedChar(e,t){let s=null,i=0;for(let r=t;r<e.length;r++){let a=e[r];Pt(e.charCodeAt(r))&&(s===null||s===a)&&i%2===0?s=s===null?a:null:s===null&&(yield r),i=a==="\\"?i+1:0}}},Y;(function(e){e[e.None=0]="None",e[e.Writable=1]="Writable"})(Y||(Y={}));var te=class{input;location;absoluteOffset;tokens;parseFlags;errors;offset;rparensExpected=0;rbracketsExpected=0;rbracesExpected=0;context=Y.None;sourceSpanCache=new Map;index=0;constructor(e,t,s,i,r,a,o){this.input=e,this.location=t,this.absoluteOffset=s,this.tokens=i,this.parseFlags=r,this.errors=a,this.offset=o}peek(e){let t=this.index+e;return t<this.tokens.length?this.tokens[t]:ye}get next(){return this.peek(0)}get atEOF(){return this.index>=this.tokens.length}get inputIndex(){return this.atEOF?this.currentEndIndex:this.next.index+this.offset}get currentEndIndex(){return this.index>0?this.peek(-1).end+this.offset:this.tokens.length===0?this.input.length+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(e,t){let s=this.currentEndIndex;if(t!==void 0&&t>this.currentEndIndex&&(s=t),e>s){let i=s;s=e,e=i}return new he(e,s)}sourceSpan(e,t){let s=`${e}@${this.inputIndex}:${t}`;return this.sourceSpanCache.has(s)||this.sourceSpanCache.set(s,this.span(e,t).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(s)}advance(){this.index++}withContext(e,t){this.context|=e;let s=t();return this.context^=e,s}consumeOptionalCharacter(e){return this.next.isCharacter(e)?(this.advance(),!0):!1}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(e){this.consumeOptionalCharacter(e)||this.error(`Missing expected ${String.fromCharCode(e)}`)}consumeOptionalOperator(e){return this.next.isOperator(e)?(this.advance(),!0):!1}expectOperator(e){this.consumeOptionalOperator(e)||this.error(`Missing expected operator ${e}`)}prettyPrintToken(e){return e===ye?"end of input":`token ${e}`}expectIdentifierOrKeyword(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier or keyword"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier or keyword`),null):(this.advance(),e.toString())}expectIdentifierOrKeywordOrString(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()&&!e.isString()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier, keyword or string"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier, keyword, or string`),""):(this.advance(),e.toString())}parseChain(){let e=[],t=this.inputIndex;for(;this.index<this.tokens.length;){let s=this.parsePipe();if(e.push(s),this.consumeOptionalCharacter(re))for(this.parseFlags&1||this.error("Binding expression cannot contain chained expression");this.consumeOptionalCharacter(re););else if(this.index<this.tokens.length){let i=this.index;if(this.error(`Unexpected token '${this.next}'`),this.index===i)break}}if(e.length===0){let s=this.offset,i=this.offset+this.input.length;return new k(this.span(s,i),this.sourceSpan(s,i))}return e.length==1?e[0]:new us(this.span(t),this.sourceSpan(t),e)}parsePipe(){let e=this.inputIndex,t=this.parseExpression();if(this.consumeOptionalOperator("|")){this.parseFlags&1&&this.error("Cannot have a pipe in an action expression");do{let s=this.inputIndex,i=this.expectIdentifierOrKeyword(),r,a;i!==null?r=this.sourceSpan(s):(i="",a=this.next.index!==-1?this.next.index:this.input.length+this.offset,r=new he(a,a).toAbsolute(this.absoluteOffset));let o=[];for(;this.consumeOptionalCharacter(Q);)o.push(this.parseExpression());t=new ms(this.span(e),this.sourceSpan(e,a),t,i,o,r)}while(this.consumeOptionalOperator("|"))}return t}parseExpression(){return this.parseConditional()}parseConditional(){let e=this.inputIndex,t=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){let s=this.parsePipe(),i;if(this.consumeOptionalCharacter(Q))i=this.parsePipe();else{let r=this.inputIndex,a=this.input.substring(e,r);this.error(`Conditional expression ${a} requires all 3 expressions`),i=new k(this.span(e),this.sourceSpan(e))}return new cs(this.span(e),this.sourceSpan(e),t,s,i)}else return t}parseLogicalOr(){let e=this.inputIndex,t=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){let s=this.parseLogicalAnd();t=new A(this.span(e),this.sourceSpan(e),"||",t,s)}return t}parseLogicalAnd(){let e=this.inputIndex,t=this.parseNullishCoalescing();for(;this.consumeOptionalOperator("&&");){let s=this.parseNullishCoalescing();t=new A(this.span(e),this.sourceSpan(e),"&&",t,s)}return t}parseNullishCoalescing(){let e=this.inputIndex,t=this.parseEquality();for(;this.consumeOptionalOperator("??");){let s=this.parseEquality();t=new A(this.span(e),this.sourceSpan(e),"??",t,s)}return t}parseEquality(){let e=this.inputIndex,t=this.parseRelational();for(;this.next.type==m.Operator;){let s=this.next.strValue;switch(s){case"==":case"===":case"!=":case"!==":this.advance();let i=this.parseRelational();t=new A(this.span(e),this.sourceSpan(e),s,t,i);continue}break}return t}parseRelational(){let e=this.inputIndex,t=this.parseAdditive();for(;this.next.type==m.Operator||this.next.isKeywordIn;){let s=this.next.strValue;switch(s){case"<":case">":case"<=":case">=":case"in":this.advance();let i=this.parseAdditive();t=new A(this.span(e),this.sourceSpan(e),s,t,i);continue}break}return t}parseAdditive(){let e=this.inputIndex,t=this.parseMultiplicative();for(;this.next.type==m.Operator;){let s=this.next.strValue;switch(s){case"+":case"-":this.advance();let i=this.parseMultiplicative();t=new A(this.span(e),this.sourceSpan(e),s,t,i);continue}break}return t}parseMultiplicative(){let e=this.inputIndex,t=this.parseExponentiation();for(;this.next.type==m.Operator;){let s=this.next.strValue;switch(s){case"*":case"%":case"/":this.advance();let i=this.parseExponentiation();t=new A(this.span(e),this.sourceSpan(e),s,t,i);continue}break}return t}parseExponentiation(){let e=this.inputIndex,t=this.parsePrefix();for(;this.next.type==m.Operator&&this.next.strValue==="**";){(t instanceof ge||t instanceof Pe||t instanceof Te||t instanceof Oe)&&this.error("Unary operator used immediately before exponentiation expression. Parenthesis must be used to disambiguate operator precedence"),this.advance();let s=this.parseExponentiation();t=new A(this.span(e),this.sourceSpan(e),"**",t,s)}return t}parsePrefix(){if(this.next.type==m.Operator){let e=this.inputIndex,t=this.next.strValue,s;switch(t){case"+":return this.advance(),s=this.parsePrefix(),ge.createPlus(this.span(e),this.sourceSpan(e),s);case"-":return this.advance(),s=this.parsePrefix(),ge.createMinus(this.span(e),this.sourceSpan(e),s);case"!":return this.advance(),s=this.parsePrefix(),new Pe(this.span(e),this.sourceSpan(e),s)}}else if(this.next.isKeywordTypeof()){this.advance();let e=this.inputIndex,t=this.parsePrefix();return new Te(this.span(e),this.sourceSpan(e),t)}else if(this.next.isKeywordVoid()){this.advance();let e=this.inputIndex,t=this.parsePrefix();return new Oe(this.span(e),this.sourceSpan(e),t)}return this.parseCallChain()}parseCallChain(){let e=this.inputIndex,t=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(z))t=this.parseAccessMember(t,e,!1);else if(this.consumeOptionalOperator("?."))this.consumeOptionalCharacter(Ee)?t=this.parseCall(t,e,!0):t=this.consumeOptionalCharacter(we)?this.parseKeyedReadOrWrite(t,e,!0):this.parseAccessMember(t,e,!0);else if(this.consumeOptionalCharacter(we))t=this.parseKeyedReadOrWrite(t,e,!1);else if(this.consumeOptionalCharacter(Ee))t=this.parseCall(t,e,!1);else if(this.consumeOptionalOperator("!"))t=new ys(this.span(e),this.sourceSpan(e),t);else if(this.next.isTemplateLiteralEnd())t=this.parseNoInterpolationTaggedTemplateLiteral(t,e);else if(this.next.isTemplateLiteralPart())t=this.parseTaggedTemplateLiteral(t,e);else return t}parsePrimary(){let e=this.inputIndex;if(this.consumeOptionalCharacter(Ee)){this.rparensExpected++;let t=this.parsePipe();return this.consumeOptionalCharacter(G)||(this.error("Missing closing parentheses"),this.consumeOptionalCharacter(G)),this.rparensExpected--,new Es(this.span(e),this.sourceSpan(e),t)}else{if(this.next.isKeywordNull())return this.advance(),new L(this.span(e),this.sourceSpan(e),null);if(this.next.isKeywordUndefined())return this.advance(),new L(this.span(e),this.sourceSpan(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new L(this.span(e),this.sourceSpan(e),!0);if(this.next.isKeywordFalse())return this.advance(),new L(this.span(e),this.sourceSpan(e),!1);if(this.next.isKeywordIn())return this.advance(),new L(this.span(e),this.sourceSpan(e),"in");if(this.next.isKeywordThis())return this.advance(),new vi(this.span(e),this.sourceSpan(e));if(this.consumeOptionalCharacter(we)){this.rbracketsExpected++;let t=this.parseExpressionList(ne);return this.rbracketsExpected--,this.expectCharacter(ne),new fs(this.span(e),this.sourceSpan(e),t)}else{if(this.next.isCharacter(be))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMember(new Ie(this.span(e),this.sourceSpan(e)),e,!1);if(this.next.isNumber()){let t=this.next.toNumber();return this.advance(),new L(this.span(e),this.sourceSpan(e),t)}else{if(this.next.isTemplateLiteralEnd())return this.parseNoInterpolationTemplateLiteral();if(this.next.isTemplateLiteralPart())return this.parseTemplateLiteral();if(this.next.isString()&&this.next.kind===W.Plain){let t=this.next.toString();return this.advance(),new L(this.span(e),this.sourceSpan(e),t)}else return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new k(this.span(e),this.sourceSpan(e))):this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new k(this.span(e),this.sourceSpan(e))):(this.error(`Unexpected token ${this.next}`),new k(this.span(e),this.sourceSpan(e)))}}}}parseExpressionList(e){let t=[];do if(!this.next.isCharacter(e))t.push(this.parsePipe());else break;while(this.consumeOptionalCharacter(ie));return t}parseLiteralMap(){let e=[],t=[],s=this.inputIndex;if(this.expectCharacter(be),!this.consumeOptionalCharacter(ae)){this.rbracesExpected++;do{let i=this.inputIndex,r=this.next.isString(),a=this.expectIdentifierOrKeywordOrString(),o={key:a,quoted:r};if(e.push(o),r)this.expectCharacter(Q),t.push(this.parsePipe());else if(this.consumeOptionalCharacter(Q))t.push(this.parsePipe());else{o.isShorthandInitialized=!0;let h=this.span(i),p=this.sourceSpan(i);t.push(new _e(h,p,p,new Ie(h,p),a))}}while(this.consumeOptionalCharacter(ie)&&!this.next.isCharacter(ae));this.rbracesExpected--,this.expectCharacter(ae)}return new vs(this.span(s),this.sourceSpan(s),e,t)}parseAccessMember(e,t,s){let i=this.inputIndex,r=this.withContext(Y.Writable,()=>{let h=this.expectIdentifierOrKeyword()??"";return h.length===0&&this.error("Expected identifier for property access",e.span.end),h}),a=this.sourceSpan(i),o;if(s)this.consumeOptionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),o=new k(this.span(t),this.sourceSpan(t))):o=new Ke(this.span(t),this.sourceSpan(t),a,e,r);else if(this.consumeOptionalOperator("=")){if(!(this.parseFlags&1))return this.error("Bindings cannot contain assignments"),new k(this.span(t),this.sourceSpan(t));let h=this.parseConditional();o=new hs(this.span(t),this.sourceSpan(t),a,e,r,h)}else o=new _e(this.span(t),this.sourceSpan(t),a,e,r);return o}parseCall(e,t,s){let i=this.inputIndex;this.rparensExpected++;let r=this.parseCallArguments(),a=this.span(i,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(G),this.rparensExpected--;let o=this.span(t),h=this.sourceSpan(t);return s?new $e(o,h,e,r,a):new gs(o,h,e,r,a)}parseCallArguments(){if(this.next.isCharacter(G))return[];let e=[];do e.push(this.parsePipe());while(this.consumeOptionalCharacter(ie));return e}expectTemplateBindingKey(){let e="",t=!1,s=this.currentAbsoluteOffset;do e+=this.expectIdentifierOrKeywordOrString(),t=this.consumeOptionalOperator("-"),t&&(e+="-");while(t);return{source:e,span:new q(s,s+e.length)}}parseTemplateBindings(e){let t=[];for(t.push(...this.parseDirectiveKeywordBindings(e));this.index<this.tokens.length;){let s=this.parseLetBinding();if(s)t.push(s);else{let i=this.expectTemplateBindingKey(),r=this.parseAsBinding(i);r?t.push(r):(i.source=e.source+i.source.charAt(0).toUpperCase()+i.source.substring(1),t.push(...this.parseDirectiveKeywordBindings(i)))}this.consumeStatementTerminator()}return new cr(t,[],this.errors)}parseKeyedReadOrWrite(e,t,s){return this.withContext(Y.Writable,()=>{this.rbracketsExpected++;let i=this.parsePipe();if(i instanceof k&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(ne),this.consumeOptionalOperator("="))if(s)this.error("The '?.' operator cannot be used in the assignment");else{let r=this.parseConditional();return new ds(this.span(t),this.sourceSpan(t),e,i,r)}else return s?new qe(this.span(t),this.sourceSpan(t),e,i):new ps(this.span(t),this.sourceSpan(t),e,i);return new k(this.span(t),this.sourceSpan(t))})}parseDirectiveKeywordBindings(e){let t=[];this.consumeOptionalCharacter(Q);let s=this.getDirectiveBoundTarget(),i=this.currentAbsoluteOffset,r=this.parseAsBinding(e);r||(this.consumeStatementTerminator(),i=this.currentAbsoluteOffset);let a=new q(e.span.start,i);return t.push(new ws(a,e,s)),r&&t.push(r),t}getDirectiveBoundTarget(){if(this.next===ye||this.peekKeywordAs()||this.peekKeywordLet())return null;let e=this.parsePipe(),{start:t,end:s}=e.span,i=this.input.substring(t,s);return new U(e,i,this.location,this.absoluteOffset+t,this.errors)}parseAsBinding(e){if(!this.peekKeywordAs())return null;this.advance();let t=this.expectTemplateBindingKey();this.consumeStatementTerminator();let s=new q(e.span.start,this.currentAbsoluteOffset);return new Ge(s,t,e)}parseLetBinding(){if(!this.peekKeywordLet())return null;let e=this.currentAbsoluteOffset;this.advance();let t=this.expectTemplateBindingKey(),s=null;this.consumeOptionalOperator("=")&&(s=this.expectTemplateBindingKey()),this.consumeStatementTerminator();let i=new q(e,this.currentAbsoluteOffset);return new Ge(i,t,s)}parseNoInterpolationTaggedTemplateLiteral(e,t){let s=this.parseNoInterpolationTemplateLiteral();return new He(this.span(t),this.sourceSpan(t),e,s)}parseNoInterpolationTemplateLiteral(){let e=this.next.strValue,t=this.inputIndex;this.advance();let s=this.span(t),i=this.sourceSpan(t);return new Ue(s,i,[new je(s,i,e)],[])}parseTaggedTemplateLiteral(e,t){let s=this.parseTemplateLiteral();return new He(this.span(t),this.sourceSpan(t),e,s)}parseTemplateLiteral(){let e=[],t=[],s=this.inputIndex;for(;this.next!==ye;){let i=this.next;if(i.isTemplateLiteralPart()||i.isTemplateLiteralEnd()){let r=this.inputIndex;if(this.advance(),e.push(new je(this.span(r),this.sourceSpan(r),i.strValue)),i.isTemplateLiteralEnd())break}else if(i.isTemplateLiteralInterpolationStart()){this.advance();let r=this.parsePipe();r instanceof k?this.error("Template literal interpolation cannot be empty"):t.push(r)}else this.advance()}return new Ue(this.span(s),this.sourceSpan(s),e,t)}consumeStatementTerminator(){this.consumeOptionalCharacter(re)||this.consumeOptionalCharacter(ie)}error(e,t=null){this.errors.push(new We(e,this.input,this.locationText(t),this.location)),this.skip()}locationText(e=null){return e==null&&(e=this.index),e<this.tokens.length?`at column ${this.tokens[e].index+1} in`:"at the end of the expression"}_reportErrorForPrivateIdentifier(e,t){let s=`Private identifiers are not supported. Unexpected private identifier: ${e}`;t!==null&&(s+=`, ${t}`),this.error(s)}skip(){let e=this.next;for(;this.index<this.tokens.length&&!e.isCharacter(re)&&!e.isOperator("|")&&(this.rparensExpected<=0||!e.isCharacter(G))&&(this.rbracesExpected<=0||!e.isCharacter(ae))&&(this.rbracketsExpected<=0||!e.isCharacter(ne))&&(!(this.context&Y.Writable)||!e.isOperator("="));)this.next.isError()&&this.errors.push(new We(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),e=this.next}},hr=class extends xi{errors=[];visitPipe(){this.errors.push("pipes")}};function pr(e){let t=new Map,s=0,i=0,r=0;for(;r<e.length;){let a=e[r];if(a.type===9){let[o,h]=a.parts;s+=h.length,i+=o.length}else{let o=a.parts.reduce((h,p)=>h+p.length,0);i+=o,s+=o}t.set(i,s),r++}return t}var dr=new Map(Object.entries({class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"})),fn=Array.from(dr).reduce((e,[t,s])=>(e.set(t,s),e),new Map),vn=new st(new _s);function B(e){return(t)=>t.kind===e}function oe(e,t){return(s)=>s.kind===e&&t===s.expression instanceof Vs}function mr(e){return(e.kind===d.Property||e.kind===d.TwoWayProperty)&&!(e.expression instanceof Vs)}var xn=[{test:B(d.StyleMap),transform:ke},{test:B(d.ClassMap),transform:ke},{test:B(d.StyleProp)},{test:B(d.ClassProp)},{test:oe(d.Attribute,!0)},{test:oe(d.Property,!0)},{test:mr},{test:oe(d.Attribute,!1)}],yn=[{test:oe(d.DomProperty,!0)},{test:oe(d.DomProperty,!1)},{test:B(d.Attribute)},{test:B(d.StyleMap),transform:ke},{test:B(d.ClassMap),transform:ke},{test:B(d.StyleProp)},{test:B(d.ClassProp)}],gn=new Set([d.Listener,d.TwoWayListener,d.StyleMap,d.ClassMap,d.StyleProp,d.ClassProp,d.Property,d.TwoWayProperty,d.DomProperty,d.Attribute]);function ke(e){return e.slice(e.length-1)}var En={constant:[c.interpolate,c.interpolate1,c.interpolate2,c.interpolate3,c.interpolate4,c.interpolate5,c.interpolate6,c.interpolate7,c.interpolate8],variable:c.interpolateV,mapping:(e)=>{if(e%2===0)throw Error("Expected odd number of arguments");return(e-1)/2}},wn=new Map([["window",c.resolveWindow],["document",c.resolveDocument],["body",c.resolveBody]]),Sn=new Map([[R.HTML,c.sanitizeHtml],[R.RESOURCE_URL,c.sanitizeResourceUrl],[R.SCRIPT,c.sanitizeScript],[R.STYLE,c.sanitizeStyle],[R.URL,c.sanitizeUrl]]),Cn=new Map([[R.HTML,c.trustConstantHtml],[R.RESOURCE_URL,c.trustConstantResourceUrl]]),Ut;(function(e){e[e.None=0]="None",e[e.ViewContextRead=1]="ViewContextRead",e[e.ViewContextWrite=2]="ViewContextWrite",e[e.SideEffectful=4]="SideEffectful"})(Ut||(Ut={}));var Nn=new Map([[F.Property,V.Property],[F.TwoWay,V.TwoWayProperty],[F.Attribute,V.Attribute],[F.Class,V.ClassName],[F.Style,V.StyleProperty],[F.Animation,V.Animation]]),In=Symbol("queryAdvancePlaceholder"),jt;(function(e){e[e.NG_CONTENT=0]="NG_CONTENT",e[e.STYLE=1]="STYLE",e[e.STYLESHEET=2]="STYLESHEET",e[e.SCRIPT=3]="SCRIPT",e[e.OTHER=4]="OTHER"})(jt||(jt={}));var Gt;(function(e){e.IDLE="idle",e.TIMER="timer",e.INTERACTION="interaction",e.IMMEDIATE="immediate",e.HOVER="hover",e.VIEWPORT="viewport",e.NEVER="never"})(Gt||(Gt={}));var Ks="%COMP%",Pn=`_nghost-${Ks}`,Tn=`_ngcontent-${Ks}`,zt;(function(e){e[e.Extract=0]="Extract",e[e.Merge=1]="Merge"})(zt||(zt={}));var On=new fi("20.0.5");function Qt({start:e,end:t},s){let i=e,r=t;for(;r!==i&&/\s/.test(s[r-1]);)r--;for(;i!==r&&/\s/.test(s[i]);)i++;return{start:i,end:r}}function fr({start:e,end:t},s){let i=e,r=t;for(;r!==s.length&&/\s/.test(s[r]);)r++;for(;i!==0&&/\s/.test(s[i-1]);)i--;return{start:i,end:r}}function vr(e,t){return t[e.start-1]==="("&&t[e.end]===")"?{start:e.start-1,end:e.end+1}:e}function xr(e,t,s){let i=0,r={start:e.start,end:e.end};for(;;){let a=fr(r,t),o=vr(a,t);if(a.start===o.start&&a.end===o.end)break;r.start=o.start,r.end=o.end,i++}return{hasParens:(s?i-1:i)!==0,outerSpan:Qt(s?{start:r.start+1,end:r.end-1}:r,t),innerSpan:Qt(e,t)}}function qs(e){return typeof e=="string"?(t)=>t===e:(t)=>e.test(t)}function yr(e,t,s){let i=qs(t);for(let r=s;r>=0;r--){let a=e[r];if(i(a))return r}throw Error(`Cannot find front char ${t} from index ${s} in ${JSON.stringify(e)}`)}function gr(e,t,s){let i=qs(t);for(let r=s;r<e.length;r++){let a=e[r];if(i(a))return r}throw Error(`Cannot find character ${t} from index ${s} in ${JSON.stringify(e)}`)}function Er(e){return e.slice(0,1).toLowerCase()+e.slice(1)}function Xe(e){let{start:t,end:s}=e;return{start:t,end:s,range:[t,s]}}var wr=(e)=>st.prototype._commentStart(e);function Sr(e,t){let s=t?wr(e):null;if(s===null)return{text:e,comments:[]};let i={type:"CommentLine",value:e.slice(s+2),...Xe({start:s,end:e.length})};return{text:e.slice(0,s),comments:[i]}}function de(e,t=!0){return(s)=>{let i=new _s,r=new st(i),{text:a,comments:o}=Sr(s,t),h=e(a,r);if(h.errors.length!==0){let[{message:p}]=h.errors;throw SyntaxError(p.replace(/^Parser Error: | at column \d+ in [^]*$/g,""))}return{result:h,comments:o,text:a}}}var Cr=de((e,t)=>t.parseBinding(e,"",0)),bn=de((e,t)=>t.parseSimpleBinding(e,"",0)),Nr=de((e,t)=>t.parseAction(e,"",0)),Ir=de((e,t)=>t.parseInterpolationExpression(e,"",0)),Pr=de((e,t)=>t.parseTemplateBindings("",e,"",0,0),!1),Tr=(e,t,s)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[s<0?t.length+s:s]:t.at(s)},$s=Tr,Or=class{text;constructor(e){this.text=e}getCharacterIndex(e,t){return gr(this.text,e,t)}getCharacterLastIndex(e,t){return yr(this.text,e,t)}transformSpan(e,{stripSpaces:t=!1,hasParentParens:s=!1}={}){if(!t)return Xe(e);let{outerSpan:i,innerSpan:r,hasParens:a}=xr(e,this.text,s),o=Xe(r);return a&&(o.extra={parenthesized:!0,parenStart:i.start,parenEnd:i.end}),o}createNode(e,{stripSpaces:t=!0,hasParentParens:s=!1}={}){let{type:i,start:r,end:a}=e,o={...e,...this.transformSpan({start:r,end:a},{stripSpaces:t,hasParentParens:s})};switch(i){case"NumericLiteral":case"StringLiteral":{let h=this.text.slice(o.start,o.end),{value:p}=o;o.extra={...o.extra,raw:h,rawValue:p};break}case"ObjectProperty":{let{shorthand:h}=o;h&&(o.extra={...o.extra,shorthand:h});break}}return o}},br=Or;function it(e){var t;return!!((t=e.extra)!=null&&t.parenthesized)}function O(e){return it(e)?e.extra.parenStart:e.start}function b(e){return it(e)?e.extra.parenEnd:e.end}function Yt(e){return(e.type==="OptionalCallExpression"||e.type==="OptionalMemberExpression")&&!it(e)}function Xt(e,t){let{start:s,end:i}=e.sourceSpan;return s>=i||/^\s+$/.test(t.slice(s,i))}var Se,le,u,v,se,x,Ce,Hs=class extends br{constructor(e,t){super(t);J(this,u),J(this,Se),J(this,le),Ne(this,Se,e),Ne(this,le,t)}get node(){return l(this,u,x).call(this,M(this,Se))}transformNode(e){return l(this,u,Ce).call(this,e)}};Se=new WeakMap,le=new WeakMap,u=new WeakSet,v=function(e,{stripSpaces:t=!0,hasParentParens:s=!1}={}){return this.createNode(e,{stripSpaces:t,hasParentParens:s})},se=function(e,t,{computed:s,optional:i,end:r=b(t),hasParentParens:a=!1}){if(Xt(e,M(this,le))||e.sourceSpan.start===t.start)return t;let o=l(this,u,x).call(this,e),h=Yt(o);return l(this,u,v).call(this,{type:i||h?"OptionalMemberExpression":"MemberExpression",object:o,property:t,computed:s,...i?{optional:!0}:h?{optional:!1}:void 0,start:O(o),end:r},{hasParentParens:a})},x=function(e,t){return l(this,u,Ce).call(this,e,t)},Ce=function(e,t){let{isInParentParens:s}={isInParentParens:!1,...t};if(e instanceof xs){let{expressions:i}=e;if(i.length!==1)throw Error("Unexpected 'Interpolation'");return l(this,u,x).call(this,i[0])}if(e instanceof ge)return l(this,u,v).call(this,{type:"UnaryExpression",prefix:!0,argument:l(this,u,x).call(this,e.expr),operator:e.operator,...e.sourceSpan},{hasParentParens:s});if(e instanceof A){let{left:i,operation:r,right:a}=e,o=l(this,u,x).call(this,i),h=l(this,u,x).call(this,a),p=O(o),f=b(h),E={left:o,right:h,start:p,end:f};return r==="&&"||r==="||"||r==="??"?l(this,u,v).call(this,{...E,type:"LogicalExpression",operator:r},{hasParentParens:s}):l(this,u,v).call(this,{...E,type:"BinaryExpression",operator:r},{hasParentParens:s})}if(e instanceof ms){let{exp:i,name:r,args:a}=e,o=l(this,u,x).call(this,i),h=O(o),p=b(o),f=this.getCharacterIndex(/\S/,this.getCharacterIndex("|",p)+1),E=l(this,u,v).call(this,{type:"Identifier",name:r,start:f,end:f+r.length}),w=a.map((T)=>l(this,u,x).call(this,T));return l(this,u,v).call(this,{type:"NGPipeExpression",left:o,right:E,arguments:w,start:h,end:b(w.length===0?E:$s(!1,w,-1))},{hasParentParens:s})}if(e instanceof us)return l(this,u,v).call(this,{type:"NGChainedExpression",expressions:e.expressions.map((i)=>l(this,u,x).call(this,i)),...e.sourceSpan},{hasParentParens:s});if(e instanceof cs){let{condition:i,trueExp:r,falseExp:a}=e,o=l(this,u,x).call(this,i),h=l(this,u,x).call(this,r),p=l(this,u,x).call(this,a);return l(this,u,v).call(this,{type:"ConditionalExpression",test:o,consequent:h,alternate:p,start:O(o),end:b(p)},{hasParentParens:s})}if(e instanceof k)return l(this,u,v).call(this,{type:"NGEmptyExpression",...e.sourceSpan},{hasParentParens:s});if(e instanceof Ie)return l(this,u,v).call(this,{type:"ThisExpression",...e.sourceSpan},{hasParentParens:s});if(e instanceof ps||e instanceof qe)return l(this,u,se).call(this,e.receiver,l(this,u,x).call(this,e.key),{computed:!0,optional:e instanceof qe,end:e.sourceSpan.end,hasParentParens:s});if(e instanceof fs)return l(this,u,v).call(this,{type:"ArrayExpression",elements:e.expressions.map((i)=>l(this,u,x).call(this,i)),...e.sourceSpan},{hasParentParens:s});if(e instanceof vs){let{keys:i,values:r}=e,a=r.map((h)=>l(this,u,x).call(this,h)),o=i.map(({key:h,quoted:p},f)=>{let E=a[f],w=O(E),T=b(E),N=this.getCharacterIndex(/\S/,f===0?e.sourceSpan.start+1:this.getCharacterIndex(",",b(a[f-1]))+1),$=w===N?T:this.getCharacterLastIndex(/\S/,this.getCharacterLastIndex(":",w-1)-1)+1,H={start:N,end:$},_=p?l(this,u,v).call(this,{type:"StringLiteral",value:h,...H}):l(this,u,v).call(this,{type:"Identifier",name:h,...H}),me=_.end<_.start||N===w;return l(this,u,v).call(this,{type:"ObjectProperty",key:_,value:E,shorthand:me,computed:!1,start:O(_),end:T})});return l(this,u,v).call(this,{type:"ObjectExpression",properties:o,...e.sourceSpan},{hasParentParens:s})}if(e instanceof L){let{value:i}=e;switch(typeof i){case"boolean":return l(this,u,v).call(this,{type:"BooleanLiteral",value:i,...e.sourceSpan},{hasParentParens:s});case"number":return l(this,u,v).call(this,{type:"NumericLiteral",value:i,...e.sourceSpan},{hasParentParens:s});case"object":return l(this,u,v).call(this,{type:"NullLiteral",...e.sourceSpan},{hasParentParens:s});case"string":return l(this,u,v).call(this,{type:"StringLiteral",value:i,...e.sourceSpan},{hasParentParens:s});case"undefined":return l(this,u,v).call(this,{type:"Identifier",name:"undefined",...e.sourceSpan},{hasParentParens:s});default:throw Error(`Unexpected LiteralPrimitive value type ${typeof i}`)}}if(e instanceof gs||e instanceof $e){let i=e instanceof $e,{receiver:r,args:a}=e,o=a.length===1?[l(this,u,x).call(this,a[0],{isInParentParens:!0})]:a.map((E)=>l(this,u,x).call(this,E)),h=l(this,u,x).call(this,r),p=Yt(h),f=i||p?"OptionalCallExpression":"CallExpression";return l(this,u,v).call(this,{type:f,callee:h,arguments:o,...f==="OptionalCallExpression"?{optional:i}:void 0,start:O(h),end:e.sourceSpan.end},{hasParentParens:s})}if(e instanceof ys){let i=l(this,u,x).call(this,e.expression);return l(this,u,v).call(this,{type:"TSNonNullExpression",expression:i,start:O(i),end:e.sourceSpan.end},{hasParentParens:s})}if(e instanceof Pe||e instanceof Te||e instanceof Oe){let i=e instanceof Pe?"!":e instanceof Te?"typeof":e instanceof Oe?"void":void 0;if(!i)throw Error("Unexpected expression.");let{start:r}=e.sourceSpan;if(i==="typeof"||i==="void"){let o=this.text.lastIndexOf(i,r);if(o===-1)throw Error(`Cannot find operator '${i}' from index ${r} in ${JSON.stringify(this.text)}`);r=o}let a=l(this,u,x).call(this,e.expression);return l(this,u,v).call(this,{type:"UnaryExpression",prefix:!0,operator:i,argument:a,start:r,end:b(a)},{hasParentParens:s})}if(e instanceof _e||e instanceof Ke){let{receiver:i,name:r}=e,a=this.getCharacterLastIndex(/\S/,e.sourceSpan.end-1)+1,o=l(this,u,v).call(this,{type:"Identifier",name:r,start:a-r.length,end:a},Xt(i,M(this,le))?{hasParentParens:s}:{});return l(this,u,se).call(this,i,o,{computed:!1,optional:e instanceof Ke,hasParentParens:s})}if(e instanceof ds){let i=l(this,u,x).call(this,e.key),r=l(this,u,x).call(this,e.value),a=l(this,u,se).call(this,e.receiver,i,{computed:!0,optional:!1,end:this.getCharacterIndex("]",b(i))+1});return l(this,u,v).call(this,{type:"AssignmentExpression",left:a,operator:"=",right:r,start:O(a),end:b(r)},{hasParentParens:s})}if(e instanceof hs){let{receiver:i,name:r,value:a}=e,o=l(this,u,x).call(this,a),h=this.getCharacterLastIndex(/\S/,this.getCharacterLastIndex("=",O(o)-1)-1)+1,p=l(this,u,v).call(this,{type:"Identifier",name:r,start:h-r.length,end:h}),f=l(this,u,se).call(this,i,p,{computed:!1,optional:!1});return l(this,u,v).call(this,{type:"AssignmentExpression",left:f,operator:"=",right:o,start:O(f),end:b(o)},{hasParentParens:s})}if(e instanceof He)return l(this,u,v).call(this,{type:"TaggedTemplateExpression",tag:l(this,u,x).call(this,e.tag),quasi:l(this,u,x).call(this,e.template),...e.sourceSpan});if(e instanceof Ue){let{elements:i,expressions:r}=e;return l(this,u,v).call(this,{type:"TemplateLiteral",quasis:i.map((a)=>l(this,u,x).call(this,a,{parent:e})),expressions:r.map((a)=>l(this,u,x).call(this,a)),...e.sourceSpan})}if(e instanceof je){let{elements:i}=t.parent,r=i.indexOf(e),a=r===0,o=r===i.length-1,h=e.sourceSpan.end-(o?1:0),p=e.sourceSpan.start+(a?1:0),f=this.text.slice(p,h);return l(this,u,v).call(this,{type:"TemplateElement",value:{cooked:e.text,raw:f},start:p,end:h,tail:o},{stripSpaces:!1})}if(e instanceof Es)return l(this,u,Ce).call(this,e.expression);throw Error(`Unexpected node type '${e.constructor.name}'`)};function kr(e,t){return new Hs(e,t).node}function Jt(e){return e instanceof ws}function Zt(e){return e instanceof Ge}var ue,X,y,es,P,De,Fe,Ve,Us,ts,js,ss,Lr=class extends Hs{constructor(e,t){super(void 0,t);J(this,y),J(this,ue),J(this,X),Ne(this,ue,e),Ne(this,X,t);for(let s of e)l(this,y,Us).call(this,s)}get expressions(){return l(this,y,js).call(this)}};ue=new WeakMap,X=new WeakMap,y=new WeakSet,es=function(){return M(this,ue)[0].key},P=function(e,{stripSpaces:t=!0}={}){return this.createNode(e,{stripSpaces:t})},De=function(e){return this.transformNode(e)},Fe=function(e){return Er(e.slice(M(this,y,es).source.length))},Ve=function(e){let t=M(this,X);if(t[e.start]!=='"'&&t[e.start]!=="'")return;let s=t[e.start],i=!1;for(let r=e.start+1;r<t.length;r++)switch(t[r]){case s:if(!i){e.end=r+1;return}default:i=!1;break;case"\\":i=!i;break}},Us=function(e){l(this,y,Ve).call(this,e.key.span),Zt(e)&&e.value&&l(this,y,Ve).call(this,e.value.span)},ts=function(e){if(!e.value||e.value.source)return e.value;let t=this.getCharacterIndex(/\S/,e.sourceSpan.start);return{source:"$implicit",span:{start:t,end:t}}},js=function(){let e=M(this,ue),[t]=e,s=M(this,X).slice(t.sourceSpan.start,t.sourceSpan.end).trim().length===0?e.slice(1):e,i=[],r=null;for(let[a,o]of s.entries()){if(r&&Jt(r)&&Zt(o)&&o.value&&o.value.source===r.key.source){let h=l(this,y,P).call(this,{type:"NGMicrosyntaxKey",name:o.key.source,...o.key.span}),p=(w,T)=>({...w,...this.transformSpan({start:w.start,end:T})}),f=(w)=>({...p(w,h.end),alias:h}),E=i.pop();if(E.type==="NGMicrosyntaxExpression")i.push(f(E));else if(E.type==="NGMicrosyntaxKeyedExpression"){let w=f(E.expression);i.push(p({...E,expression:w},w.end))}else throw Error(`Unexpected type ${E.type}`)}else i.push(l(this,y,ss).call(this,o,a));r=o}return l(this,y,P).call(this,{type:"NGMicrosyntax",body:i,...i.length===0?e[0].sourceSpan:{start:i[0].start,end:$s(!1,i,-1).end}})},ss=function(e,t){if(Jt(e)){let{key:s,value:i}=e;return i?t===0?l(this,y,P).call(this,{type:"NGMicrosyntaxExpression",expression:l(this,y,De).call(this,i.ast),alias:null,...i.sourceSpan}):l(this,y,P).call(this,{type:"NGMicrosyntaxKeyedExpression",key:l(this,y,P).call(this,{type:"NGMicrosyntaxKey",name:l(this,y,Fe).call(this,s.source),...s.span}),expression:l(this,y,P).call(this,{type:"NGMicrosyntaxExpression",expression:l(this,y,De).call(this,i.ast),alias:null,...i.sourceSpan}),start:s.span.start,end:i.sourceSpan.end}):l(this,y,P).call(this,{type:"NGMicrosyntaxKey",name:l(this,y,Fe).call(this,s.source),...s.span})}else{let{key:s,sourceSpan:i}=e;if(/^let\s$/.test(M(this,X).slice(i.start,i.start+4))){let{value:r}=e;return l(this,y,P).call(this,{type:"NGMicrosyntaxLet",key:l(this,y,P).call(this,{type:"NGMicrosyntaxKey",name:s.source,...s.span}),value:r?l(this,y,P).call(this,{type:"NGMicrosyntaxKey",name:r.source,...r.span}):null,start:i.start,end:r?r.span.end:s.span.end})}else{let r=l(this,y,ts).call(this,e);return l(this,y,P).call(this,{type:"NGMicrosyntaxAs",key:l(this,y,P).call(this,{type:"NGMicrosyntaxKey",name:r.source,...r.span}),alias:l(this,y,P).call(this,{type:"NGMicrosyntaxKey",name:s.source,...s.span}),start:r.span.start,end:s.span.end})}}};function Ar(e,t){return new Lr(e,t).expressions}function rt({result:{ast:e},text:t,comments:s}){return Object.assign(kr(e,t),{comments:s})}function Mr({result:{templateBindings:e},text:t}){return Ar(e,t)}var Rr=(e)=>rt(Cr(e)),Br=(e)=>rt(Ir(e)),Gs=(e)=>rt(Nr(e)),Dr=(e)=>Mr(Pr(e));function zs(e){var t,s,i;let r=((t=e.range)==null?void 0:t[0])??e.start,a=(i=((s=e.declaration)==null?void 0:s.decorators)??e.decorators)==null?void 0:i[0];return a?Math.min(zs(a),r):r}function Fr(e){var t;return((t=e.range)==null?void 0:t[1])??e.end}function Re(e){return{astFormat:"estree",parse(t){let s=e(t);return{type:"NGRoot",node:e===Gs&&s.type!=="NGChainedExpression"?{...s,type:"NGChainedExpression",expressions:[s]}:s}},locStart:zs,locEnd:Fr}}var Vr=Re(Gs),Wr=Re(Rr),_r=Re(Br),Kr=Re(Dr),kn=ns;export{as as parsers,kn as default};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Vt as c,Yt as i}from"./chunk-08y06vgt.js";import{cu as s}from"./chunk-9p83me3p.js";function f(u){let n=!1,o=(e,a)=>{if(n)return;n=!0,process.exitCode=1,c.error(e,{error:s(a),process_role:u});let l=setTimeout(()=>process.exit(1),1000);i().finally(()=>{clearTimeout(l),process.exit(1)})},t=(e)=>o("unhandled rejection",e),r=(e)=>o("uncaught exception",e);return process.on("unhandledRejection",t),process.on("uncaughtException",r),()=>{process.off("unhandledRejection",t),process.off("uncaughtException",r)}}
3
- export{f as Ss};
2
+ import{su as c,vu as i}from"./chunk-zxaaxb99.js";import{Bu as s}from"./chunk-whxjkz9a.js";function f(u){let n=!1,o=(e,a)=>{if(n)return;n=!0,process.exitCode=1,c.error(e,{error:s(a),process_role:u});let l=setTimeout(()=>process.exit(1),1000);i().finally(()=>{clearTimeout(l),process.exit(1)})},t=(e)=>o("unhandled rejection",e),r=(e)=>o("uncaught exception",e);return process.on("unhandledRejection",t),process.on("uncaughtException",r),()=>{process.off("unhandledRejection",t),process.off("uncaughtException",r)}}
3
+ export{f as pt};