@farm.js/core 0.1.78 → 0.1.81

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 (467) hide show
  1. package/dist/{agent-mcp-handler-EDJNU224.mjs → agent-mcp-handler-GDY5CPPW.mjs} +5 -5
  2. package/dist/{agent-mcp-handler-LNBYLRTZ.cjs → agent-mcp-handler-IUL6OPC3.cjs} +6 -6
  3. package/dist/{agent-mcp.d-BErtnhV2.d.ts → agent-mcp.d-Cxi3214_.d.ts} +1 -1
  4. package/dist/{agent-mcp.d-CYHfcjur.d.mts → agent-mcp.d-DMqOqnOA.d.mts} +1 -1
  5. package/dist/agent-runtime.cjs +2 -2
  6. package/dist/agent-runtime.d.mts +5 -4
  7. package/dist/agent-runtime.d.ts +5 -4
  8. package/dist/agent-runtime.mjs +1 -1
  9. package/dist/analyzer-435DCIQ6.cjs +17 -0
  10. package/dist/{analyzer-M2BG6QYU.mjs → analyzer-IC66UJCU.mjs} +3 -2
  11. package/dist/api/client.cjs +1 -1
  12. package/dist/api/client.mjs +1 -1
  13. package/dist/api/client.native.cjs +1 -1
  14. package/dist/api/client.native.mjs +1 -1
  15. package/dist/api/node.cjs +7 -7
  16. package/dist/api/node.d.mts +7 -6
  17. package/dist/api/node.d.ts +7 -6
  18. package/dist/api/node.mjs +6 -6
  19. package/dist/api/route-manager.cjs +10 -10
  20. package/dist/api/route-manager.d.mts +7 -6
  21. package/dist/api/route-manager.d.ts +7 -6
  22. package/dist/api/route-manager.mjs +9 -9
  23. package/dist/api/runtime.cjs +6 -6
  24. package/dist/api/runtime.d.mts +6 -5
  25. package/dist/api/runtime.d.ts +6 -5
  26. package/dist/api/runtime.mjs +5 -5
  27. package/dist/api.cjs +12 -12
  28. package/dist/api.d.mts +8 -7
  29. package/dist/api.d.ts +8 -7
  30. package/dist/api.mjs +11 -11
  31. package/dist/{app-manifest.d-6NCkLQ1y.d.mts → app-manifest.d-Bbxp5kes.d.mts} +1 -1
  32. package/dist/{app-manifest.d-DuqLBcmi.d.ts → app-manifest.d-C8Cswd31.d.ts} +1 -1
  33. package/dist/app-markdown.cjs +5 -5
  34. package/dist/app-markdown.d.mts +8 -7
  35. package/dist/app-markdown.d.ts +8 -7
  36. package/dist/app-markdown.mjs +4 -4
  37. package/dist/{app.d-Dk2HkvPh.d.mts → app.d-BJuSurgy.d.mts} +13 -4
  38. package/dist/{app.d-Bz6vYBFF.d.ts → app.d-DGIoFt5D.d.ts} +13 -4
  39. package/dist/cache.cjs +3 -3
  40. package/dist/cache.mjs +2 -2
  41. package/dist/{chunk-PG7J7XYT.cjs → chunk-26WP75W5.cjs} +38 -22
  42. package/dist/{chunk-QYOAGT3E.cjs → chunk-2BEGVSDF.cjs} +6 -5
  43. package/dist/{chunk-GCRT6GJG.mjs → chunk-2HMSSPCZ.mjs} +26 -0
  44. package/dist/{chunk-2YJ4DHTD.cjs → chunk-2NOHVIJ3.cjs} +2 -2
  45. package/dist/{chunk-GDM3ZD2O.cjs → chunk-2OFP3IVA.cjs} +5 -1
  46. package/dist/{chunk-7KDCVSTR.mjs → chunk-2PFGA6PB.mjs} +2 -2
  47. package/dist/chunk-2UYYXSUS.mjs +401 -0
  48. package/dist/{chunk-DD2ANOEF.cjs → chunk-2Y2HRZQY.cjs} +843 -627
  49. package/dist/{chunk-PL7MCYYD.mjs → chunk-3AV4DCXY.mjs} +58 -358
  50. package/dist/{chunk-3GNHJ3RN.cjs → chunk-3BTN3NP7.cjs} +2 -2
  51. package/dist/{chunk-XT2CHTDN.mjs → chunk-3RVLJTFZ.mjs} +6 -6
  52. package/dist/{chunk-VJ6L7TII.cjs → chunk-3SPECQXI.cjs} +31 -20
  53. package/dist/{chunk-ODYKCC6W.cjs → chunk-46UV2E7I.cjs} +156 -104
  54. package/dist/{chunk-F4ID7BGO.cjs → chunk-4OFWG4IK.cjs} +7 -7
  55. package/dist/{chunk-VRI43FDN.mjs → chunk-4WXNTAOM.mjs} +1 -1
  56. package/dist/{chunk-QMR2TUVZ.cjs → chunk-52Q4OB4A.cjs} +4 -4
  57. package/dist/chunk-5MMKNW7Q.cjs +54 -0
  58. package/dist/{chunk-RIMEFQYO.mjs → chunk-5N526T7Q.mjs} +116 -86
  59. package/dist/{chunk-CYNQPKA4.cjs → chunk-5ZHC6QGD.cjs} +2 -2
  60. package/dist/{chunk-ALEUMLJN.mjs → chunk-67JTJCAS.mjs} +3 -2
  61. package/dist/{chunk-CBP7AKZH.mjs → chunk-6GJZJAED.mjs} +1 -1
  62. package/dist/{chunk-5REIO5DT.mjs → chunk-6WVRVGKC.mjs} +6 -6
  63. package/dist/{chunk-GC5ROI3A.cjs → chunk-7U4XF76R.cjs} +1 -1
  64. package/dist/{chunk-FOULIN4S.cjs → chunk-ADQ2LATR.cjs} +2 -2
  65. package/dist/{chunk-K3ZELA6U.cjs → chunk-AHVF5GI2.cjs} +10 -10
  66. package/dist/{chunk-CSAIIMY3.mjs → chunk-ATISIC6G.mjs} +1 -1
  67. package/dist/{chunk-MGKWYPE3.mjs → chunk-AYDVUCXD.mjs} +1 -0
  68. package/dist/chunk-B7L24VPX.cjs +401 -0
  69. package/dist/{chunk-DPBQRDWW.cjs → chunk-BBVLOEND.cjs} +4 -4
  70. package/dist/{chunk-DASQJ5UD.mjs → chunk-BCQIXH7L.mjs} +1 -1
  71. package/dist/{chunk-BNCKXPCU.cjs → chunk-BIAGSYIZ.cjs} +30 -30
  72. package/dist/{chunk-R77D7TCZ.mjs → chunk-BJWJP5A4.mjs} +20 -13
  73. package/dist/{chunk-X2SEYK7I.mjs → chunk-BPWTSPK6.mjs} +3 -3
  74. package/dist/{chunk-CKNZJFK5.cjs → chunk-BSX5OGSD.cjs} +4 -4
  75. package/dist/{chunk-ERT6HQAI.mjs → chunk-BVJUFVCU.mjs} +2 -2
  76. package/dist/chunk-C5QHZ626.cjs +85 -0
  77. package/dist/{chunk-HVMQAVZK.cjs → chunk-CL7BUGVB.cjs} +656 -521
  78. package/dist/{chunk-TZ2YPXLB.cjs → chunk-CN2JOTRO.cjs} +7 -7
  79. package/dist/{chunk-ZCYGYIC2.cjs → chunk-CPZZBCPO.cjs} +22 -21
  80. package/dist/{chunk-RK4MGL6Q.mjs → chunk-CYRO3WP4.mjs} +4 -3
  81. package/dist/chunk-D2VAANBS.mjs +48 -0
  82. package/dist/{chunk-VRJAMU34.mjs → chunk-D77OGI6X.mjs} +1 -1
  83. package/dist/{chunk-6XDDE7M6.cjs → chunk-DJ3PVHTW.cjs} +3 -3
  84. package/dist/{chunk-XGS76V7L.cjs → chunk-E3HBD2K3.cjs} +22 -22
  85. package/dist/{chunk-F35C3TJZ.mjs → chunk-E4E4Y5FD.mjs} +1 -1
  86. package/dist/{chunk-KUXEII7V.mjs → chunk-ECVSRE4Y.mjs} +3 -2
  87. package/dist/{chunk-2DA7CLY7.mjs → chunk-EILUVBKS.mjs} +14 -0
  88. package/dist/chunk-EZYKV24V.mjs +385 -0
  89. package/dist/{chunk-TVCFY3KK.cjs → chunk-FB4CWSC2.cjs} +12 -12
  90. package/dist/{chunk-ZO6TOLHL.mjs → chunk-FS55CNTC.mjs} +1 -1
  91. package/dist/{chunk-IYFBLWXU.cjs → chunk-FULX5RYX.cjs} +61 -361
  92. package/dist/{chunk-5KISFWD2.cjs → chunk-FYZD7DUS.cjs} +12 -12
  93. package/dist/{chunk-H5OVJHXY.cjs → chunk-GAWSWJJ2.cjs} +27 -27
  94. package/dist/{chunk-A37D6LOS.mjs → chunk-GY63XD6K.mjs} +1 -1
  95. package/dist/{chunk-OVUU2RCQ.mjs → chunk-HD5FLXP2.mjs} +1 -1
  96. package/dist/{chunk-5QZT2EQN.cjs → chunk-HQEYZSF3.cjs} +4 -3
  97. package/dist/{chunk-JA6RML7C.mjs → chunk-HR4N2K4V.mjs} +2 -2
  98. package/dist/{chunk-6D3CJFNU.cjs → chunk-HR5GU4UU.cjs} +7 -7
  99. package/dist/{chunk-7RQ5KAK6.mjs → chunk-HTNJ7A4D.mjs} +88 -36
  100. package/dist/chunk-I4WZRG73.mjs +54 -0
  101. package/dist/{chunk-BGUTIQII.mjs → chunk-ICOJ2BC6.mjs} +24 -8
  102. package/dist/{chunk-SX535SU5.cjs → chunk-IJPRCQHW.cjs} +10 -10
  103. package/dist/{chunk-E7V2GYBP.mjs → chunk-IM3UINTZ.mjs} +67 -9
  104. package/dist/{chunk-MNIR7I7B.mjs → chunk-INKVDO42.mjs} +1 -1
  105. package/dist/{chunk-AHGOHPRN.mjs → chunk-IPG6B25T.mjs} +235 -100
  106. package/dist/{chunk-PE2LEWXA.mjs → chunk-J2VUPCCR.mjs} +4 -4
  107. package/dist/{chunk-Q2EKSSEG.cjs → chunk-JB4BHRFK.cjs} +17 -17
  108. package/dist/{chunk-YN7G22MP.cjs → chunk-JCYDWJVO.cjs} +3 -3
  109. package/dist/{chunk-LPXJEZJK.mjs → chunk-KCJBIWBM.mjs} +2 -2
  110. package/dist/{chunk-NSNQLBHR.cjs → chunk-KMGHXIDA.cjs} +2 -2
  111. package/dist/{chunk-SVCUSOEF.mjs → chunk-KR5DF7WK.mjs} +1 -1
  112. package/dist/{chunk-5DREJN4G.cjs → chunk-LKIG5SM6.cjs} +17 -17
  113. package/dist/{chunk-OGVOKAQU.mjs → chunk-LTOT5KVJ.mjs} +2 -2
  114. package/dist/{chunk-Z2FFLTF5.mjs → chunk-LTXKRIST.mjs} +2 -2
  115. package/dist/{chunk-67MZTLTF.cjs → chunk-M6DAIE4T.cjs} +27 -1
  116. package/dist/{chunk-IWGGRXD2.cjs → chunk-MHKPXX3J.cjs} +2 -2
  117. package/dist/{chunk-F7PKUP6P.cjs → chunk-MOGRRZMW.cjs} +38 -38
  118. package/dist/{chunk-DZZHTMWM.cjs → chunk-N3H7UPBM.cjs} +3 -2
  119. package/dist/{chunk-WGNGM6MJ.mjs → chunk-N3VMHPIY.mjs} +2 -2
  120. package/dist/{chunk-EBFTAVGD.mjs → chunk-NOYKBGUK.mjs} +672 -456
  121. package/dist/{chunk-LMXGCFAM.cjs → chunk-NSLRK5DK.cjs} +1 -1
  122. package/dist/{chunk-EVVV2XZ2.cjs → chunk-NW3DL2PM.cjs} +53 -7
  123. package/dist/{chunk-6ZFGWB75.cjs → chunk-OFVCWV2D.cjs} +5 -5
  124. package/dist/{chunk-NB2ZEBIS.cjs → chunk-OIWDEDUO.cjs} +540 -510
  125. package/dist/{chunk-WRWJ7IWT.cjs → chunk-OLKYHTLN.cjs} +5 -5
  126. package/dist/{chunk-QES76U42.mjs → chunk-ONSZP5JK.mjs} +4 -4
  127. package/dist/{chunk-H76C5AOU.mjs → chunk-OO4GVGM3.mjs} +4 -4
  128. package/dist/{chunk-BZJYPIFZ.cjs → chunk-OUDNUFVR.cjs} +12 -12
  129. package/dist/{chunk-EVIWKPJV.cjs → chunk-PLJMEUAN.cjs} +15 -1
  130. package/dist/{chunk-GFXKO4UW.mjs → chunk-PO5MZIWK.mjs} +49 -49
  131. package/dist/{chunk-VCW6BR6U.mjs → chunk-POL5RCVU.mjs} +2 -2
  132. package/dist/{chunk-EMTN5ABC.mjs → chunk-POVHO46S.mjs} +1 -1
  133. package/dist/{chunk-ASYOWPSR.cjs → chunk-PWDBWXQI.cjs} +2 -1
  134. package/dist/{chunk-X3Y6JWJG.cjs → chunk-PWMJBCAN.cjs} +3 -3
  135. package/dist/{chunk-IGE5BAWK.mjs → chunk-QBJ6N5MT.mjs} +53 -7
  136. package/dist/{chunk-62DZHPDK.cjs → chunk-QCKSYYXK.cjs} +10 -10
  137. package/dist/{chunk-PKXGFQZS.mjs → chunk-QD34VE4N.mjs} +1 -1
  138. package/dist/{chunk-57QAQU4F.mjs → chunk-QRNYSISP.mjs} +1 -1
  139. package/dist/{chunk-PRL7FXG4.cjs → chunk-RDNKQ5MK.cjs} +12 -13
  140. package/dist/{chunk-VJI2LWTL.cjs → chunk-RFNQTQ44.cjs} +2 -2
  141. package/dist/{chunk-IG2JE6WJ.mjs → chunk-RLEAVG6G.mjs} +1 -1
  142. package/dist/{chunk-VO5XDZHK.mjs → chunk-RPA45OQS.mjs} +2 -2
  143. package/dist/{chunk-PNWRH6TR.mjs → chunk-RZ6XUEQS.mjs} +4 -4
  144. package/dist/{chunk-S6RUJRWI.mjs → chunk-S3IWDDQ3.mjs} +1 -1
  145. package/dist/{chunk-EGHPFXPZ.cjs → chunk-SAPG45RA.cjs} +23 -23
  146. package/dist/{chunk-FE6KYDHC.cjs → chunk-SHDCKRP4.cjs} +3 -3
  147. package/dist/{chunk-DUSTJ6A5.mjs → chunk-SLEHAGGV.mjs} +2 -2
  148. package/dist/{chunk-26CNCIFI.cjs → chunk-T3SMMLSB.cjs} +2 -2
  149. package/dist/{chunk-K6DXKHFE.mjs → chunk-TE7AX6HB.mjs} +1 -1
  150. package/dist/{chunk-A7EJATEW.mjs → chunk-TLSGRK7E.mjs} +4 -4
  151. package/dist/{chunk-KHS3T3E5.mjs → chunk-TYHWZOA2.mjs} +1 -1
  152. package/dist/{chunk-Z3QXQN4U.mjs → chunk-U6GMCDRS.mjs} +1 -1
  153. package/dist/{chunk-URQW27KO.mjs → chunk-UBLKPREL.mjs} +1 -1
  154. package/dist/chunk-UDMBUTJD.mjs +85 -0
  155. package/dist/{chunk-WJ4NUY2H.mjs → chunk-UF4BNKKJ.mjs} +4 -4
  156. package/dist/{chunk-L7Y65BQU.cjs → chunk-UGD53SNO.cjs} +50 -50
  157. package/dist/{chunk-DD22NQFX.cjs → chunk-UGLTOLTJ.cjs} +2 -2
  158. package/dist/{chunk-G7B6NU4X.cjs → chunk-VFMHE5D3.cjs} +3 -3
  159. package/dist/{chunk-4SLHSODZ.cjs → chunk-VGHDPEPQ.cjs} +15 -15
  160. package/dist/{chunk-IXO6O2EL.cjs → chunk-VGVRGGP4.cjs} +2 -2
  161. package/dist/{chunk-47R7CX4A.mjs → chunk-VPGEYX5Y.mjs} +4 -4
  162. package/dist/chunk-VS7HLH4S.cjs +385 -0
  163. package/dist/{chunk-YRXPDKMM.cjs → chunk-W53Z4WDI.cjs} +8 -8
  164. package/dist/{chunk-NNGBTJCX.cjs → chunk-W6C3LEXX.cjs} +83 -25
  165. package/dist/{chunk-4VLXQ55O.cjs → chunk-WIZRYFB2.cjs} +3 -3
  166. package/dist/chunk-WMRGIQTA.cjs +48 -0
  167. package/dist/{chunk-52LTENRE.cjs → chunk-WOAXQ5MZ.cjs} +9 -9
  168. package/dist/{chunk-C6HGUTXB.mjs → chunk-XBSIGZ4J.mjs} +2 -3
  169. package/dist/{chunk-S7QEQCVV.mjs → chunk-XGL42MQ7.mjs} +1 -1
  170. package/dist/{chunk-JHZ6HULQ.cjs → chunk-XOFJUSWC.cjs} +4 -4
  171. package/dist/{chunk-LJKTJNOF.cjs → chunk-XOGCNKB7.cjs} +3 -3
  172. package/dist/{chunk-7JTVN6IJ.mjs → chunk-XOXCQGAF.mjs} +7 -6
  173. package/dist/{chunk-LIC6CMLB.mjs → chunk-YH7ENV3K.mjs} +18 -18
  174. package/dist/{chunk-ZJGFAW5U.mjs → chunk-YHHOTKUT.mjs} +5 -1
  175. package/dist/{chunk-B3IRRANH.mjs → chunk-YHM4PXJY.mjs} +1 -1
  176. package/dist/{chunk-PDACTAVX.mjs → chunk-YOVSWY2E.mjs} +1 -1
  177. package/dist/{chunk-ZEWIWAS2.mjs → chunk-YSU3WCW6.mjs} +2 -2
  178. package/dist/{chunk-R5X7FDOG.mjs → chunk-YU2MNIIY.mjs} +1 -1
  179. package/dist/{chunk-42EUEYW6.cjs → chunk-YUQUGVSV.cjs} +8 -8
  180. package/dist/{chunk-4STJ6LGR.mjs → chunk-Z3RM3VA2.mjs} +1 -1
  181. package/dist/{chunk-MBD34AS5.cjs → chunk-Z5BANEQD.cjs} +6 -6
  182. package/dist/{chunk-4PWGLPL6.mjs → chunk-ZIEO3DQ3.mjs} +26 -15
  183. package/dist/{chunk-2G6JPLSL.cjs → chunk-ZIYJWJV2.cjs} +27 -20
  184. package/dist/{chunk-KZ5BOWJS.cjs → chunk-ZKNXCRUQ.cjs} +28 -28
  185. package/dist/{cli-runtime.d-CGMGs1Zz.d.mts → cli-runtime.d-D8O1v2_X.d.mts} +7 -6
  186. package/dist/{cli-runtime.d-BG9q2_vC.d.ts → cli-runtime.d-hf4L1MNP.d.ts} +7 -6
  187. package/dist/client/lifecycle.d.mts +1 -1
  188. package/dist/client/lifecycle.d.ts +1 -1
  189. package/dist/{client-component.d-B84GPb_u.d.ts → client-component.d-CX8UCQh-.d.ts} +1 -1
  190. package/dist/{client-component.d-CdsG1E7p.d.mts → client-component.d-DFwUHlOz.d.mts} +1 -1
  191. package/dist/{client-plugins.d-DX-iCJWE.d.mts → client-plugins.d-BflSNO-b.d.mts} +5 -16
  192. package/dist/{client-plugins.d-FptsHgls.d.ts → client-plugins.d-qWp8hNwd.d.ts} +5 -16
  193. package/dist/client-plugins.d.mts +5 -4
  194. package/dist/client-plugins.d.ts +5 -4
  195. package/dist/client.cjs +9 -8
  196. package/dist/client.d.mts +23 -154
  197. package/dist/client.d.ts +23 -154
  198. package/dist/client.mjs +8 -7
  199. package/dist/config.d.mts +5 -4
  200. package/dist/config.d.ts +5 -4
  201. package/dist/cron.cjs +3 -3
  202. package/dist/cron.mjs +2 -2
  203. package/dist/desktop.d.mts +6 -5
  204. package/dist/desktop.d.ts +6 -5
  205. package/dist/{devtools-TMATFNUY.cjs → devtools-EI5N366Z.cjs} +17 -17
  206. package/dist/{devtools-7P3OUNLV.mjs → devtools-XJHODO5H.mjs} +14 -14
  207. package/dist/docs.cjs +18 -18
  208. package/dist/docs.d.mts +7 -6
  209. package/dist/docs.d.ts +7 -6
  210. package/dist/docs.mjs +17 -17
  211. package/dist/environment/vite.cjs +8 -7
  212. package/dist/environment/vite.d.mts +9 -0
  213. package/dist/environment/vite.d.ts +9 -0
  214. package/dist/environment/vite.mjs +7 -6
  215. package/dist/{handler.d-Cy3XbY_W.d.ts → handler.d-C2oRihfa.d.ts} +1 -1
  216. package/dist/{handler.d-DSwLTpa5.d.mts → handler.d-DoH5Krkq.d.mts} +1 -1
  217. package/dist/{headers.d-DiL9YTH3.d.mts → headers.d-BrX53wFQ.d.mts} +1 -1
  218. package/dist/{headers.d-Qbjo38a0.d.ts → headers.d-Dj0mfYpb.d.ts} +1 -1
  219. package/dist/index.cjs +90 -82
  220. package/dist/{index.d-OccJoC6I.d.ts → index.d-Dhc2scRl.d.ts} +1 -1
  221. package/dist/{index.d-CqQKX3s6.d.mts → index.d-DzDHOttz.d.mts} +1 -1
  222. package/dist/index.d.mts +29 -27
  223. package/dist/index.d.ts +29 -27
  224. package/dist/index.mjs +92 -84
  225. package/dist/instrumentation.cjs +3 -3
  226. package/dist/instrumentation.mjs +2 -2
  227. package/dist/integrations/orm.cjs +3 -3
  228. package/dist/integrations/orm.d.mts +5 -4
  229. package/dist/integrations/orm.d.ts +5 -4
  230. package/dist/integrations/orm.mjs +2 -2
  231. package/dist/integrations.cjs +2 -2
  232. package/dist/integrations.d.mts +5 -4
  233. package/dist/integrations.d.ts +5 -4
  234. package/dist/integrations.mjs +1 -1
  235. package/dist/internal/app-markdown-runtime.cjs +4 -4
  236. package/dist/internal/app-markdown-runtime.d.mts +15 -8
  237. package/dist/internal/app-markdown-runtime.d.ts +15 -8
  238. package/dist/internal/app-markdown-runtime.mjs +3 -3
  239. package/dist/internal/build-runtime.cjs +63 -62
  240. package/dist/internal/build-runtime.d.mts +8 -7
  241. package/dist/internal/build-runtime.d.ts +8 -7
  242. package/dist/internal/build-runtime.mjs +62 -61
  243. package/dist/internal/cli-runtime.cjs +37 -34
  244. package/dist/internal/cli-runtime.d.mts +12 -11
  245. package/dist/internal/cli-runtime.d.ts +12 -11
  246. package/dist/internal/cli-runtime.mjs +39 -36
  247. package/dist/internal/client-error-overlay.cjs +4 -4
  248. package/dist/internal/client-error-overlay.mjs +1 -1
  249. package/dist/internal/client-runtime.cjs +112 -14
  250. package/dist/internal/client-runtime.d.mts +29 -22
  251. package/dist/internal/client-runtime.d.ts +29 -22
  252. package/dist/internal/client-runtime.mjs +104 -6
  253. package/dist/internal/compression-runtime.d.mts +5 -4
  254. package/dist/internal/compression-runtime.d.ts +5 -4
  255. package/dist/internal/config-runtime.cjs +16 -16
  256. package/dist/internal/config-runtime.d.mts +7 -6
  257. package/dist/internal/config-runtime.d.ts +7 -6
  258. package/dist/internal/config-runtime.mjs +15 -15
  259. package/dist/internal/docs-precompiled-runtime.cjs +1 -1
  260. package/dist/internal/docs-precompiled-runtime.mjs +1 -1
  261. package/dist/internal/form-actions.cjs +3 -3
  262. package/dist/internal/form-actions.mjs +2 -2
  263. package/dist/internal/infra-analytics-runtime.cjs +11 -11
  264. package/dist/internal/infra-analytics-runtime.mjs +9 -9
  265. package/dist/internal/island-codec.cjs +3 -3
  266. package/dist/internal/island-codec.mjs +2 -2
  267. package/dist/internal/island-value-store.d.mts +1 -1
  268. package/dist/internal/island-value-store.d.ts +1 -1
  269. package/dist/internal/islands-boot.cjs +39 -5
  270. package/dist/internal/islands-boot.d.mts +19 -1
  271. package/dist/internal/islands-boot.d.ts +19 -1
  272. package/dist/internal/islands-boot.mjs +38 -4
  273. package/dist/internal/islands-runtime.cjs +10 -56
  274. package/dist/internal/islands-runtime.mjs +6 -52
  275. package/dist/internal/islands-server.cjs +4 -4
  276. package/dist/internal/islands-server.mjs +3 -3
  277. package/dist/internal/islx-actions-client.cjs +36 -0
  278. package/dist/internal/islx-actions-client.d.mts +13 -0
  279. package/dist/internal/islx-actions-client.d.ts +13 -0
  280. package/dist/internal/islx-actions-client.mjs +36 -0
  281. package/dist/internal/islx-actions-server.cjs +8 -0
  282. package/dist/internal/islx-actions-server.d.mts +6 -0
  283. package/dist/internal/islx-actions-server.d.ts +6 -0
  284. package/dist/internal/islx-actions-server.mjs +8 -0
  285. package/dist/internal/islx-client.d.mts +0 -4
  286. package/dist/internal/islx-client.d.ts +0 -4
  287. package/dist/internal/isolated-boundary.cjs +3 -3
  288. package/dist/internal/isolated-boundary.d.mts +1 -1
  289. package/dist/internal/isolated-boundary.d.ts +1 -1
  290. package/dist/internal/isolated-boundary.mjs +2 -2
  291. package/dist/internal/metadata-image-runtime.cjs +4 -2
  292. package/dist/internal/metadata-image-runtime.d.mts +18 -2
  293. package/dist/internal/metadata-image-runtime.d.ts +18 -2
  294. package/dist/internal/metadata-image-runtime.mjs +5 -3
  295. package/dist/internal/native-server-fns.cjs +5 -4
  296. package/dist/internal/native-server-fns.mjs +4 -3
  297. package/dist/internal/navigation-neutral.cjs +36 -0
  298. package/dist/internal/navigation-neutral.d.mts +14 -0
  299. package/dist/internal/navigation-neutral.d.ts +14 -0
  300. package/dist/internal/navigation-neutral.mjs +36 -0
  301. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  302. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  303. package/dist/internal/production-runtime.cjs +36 -36
  304. package/dist/internal/production-runtime.d.mts +15 -13
  305. package/dist/internal/production-runtime.d.ts +15 -13
  306. package/dist/internal/production-runtime.mjs +46 -46
  307. package/dist/internal/server-tree.cjs +5 -4
  308. package/dist/internal/server-tree.d.mts +3 -4
  309. package/dist/internal/server-tree.d.ts +3 -4
  310. package/dist/internal/server-tree.mjs +4 -3
  311. package/dist/internal/spa-router.cjs +44 -0
  312. package/dist/internal/spa-router.d.mts +42 -0
  313. package/dist/internal/spa-router.d.ts +42 -0
  314. package/dist/internal/spa-router.mjs +44 -0
  315. package/dist/internal/start-manifest.d.mts +5 -4
  316. package/dist/internal/start-manifest.d.ts +5 -4
  317. package/dist/internal/vercel-edge-middleware.cjs +4 -4
  318. package/dist/internal/vercel-edge-middleware.mjs +3 -3
  319. package/dist/island-value-protocol.d-fEoc1m8e.d.mts +27 -0
  320. package/dist/island-value-protocol.d-fEoc1m8e.d.ts +27 -0
  321. package/dist/{layers-5ZD4764G.mjs → layers-744BBUY5.mjs} +2 -2
  322. package/dist/layers-XLOMMQP7.cjs +21 -0
  323. package/dist/{lifecycle.d-VzcXyEyn.d.ts → lifecycle.d-OtGWAvJT.d.mts} +1 -1
  324. package/dist/{lifecycle.d-VzcXyEyn.d.mts → lifecycle.d-OtGWAvJT.d.ts} +1 -1
  325. package/dist/markdown.cjs +3 -3
  326. package/dist/markdown.d.mts +5 -4
  327. package/dist/markdown.d.ts +5 -4
  328. package/dist/markdown.mjs +2 -2
  329. package/dist/middleware.cjs +10 -10
  330. package/dist/middleware.d.mts +5 -4
  331. package/dist/middleware.d.ts +5 -4
  332. package/dist/middleware.mjs +9 -9
  333. package/dist/{mount.d-AcJaUtHF.d.mts → mount.d-DOaeUoWq.d.mts} +1 -1
  334. package/dist/{mount.d-CPzqOm-a.d.ts → mount.d-DwXjaOHY.d.ts} +1 -1
  335. package/dist/{native-server-fn-handler-XRTZR7SZ.cjs → native-server-fn-handler-57TCQPSM.cjs} +6 -6
  336. package/dist/{native-server-fn-handler-WYYY4YBN.mjs → native-server-fn-handler-PYK65A46.mjs} +5 -5
  337. package/dist/{native-tree-MNUFN5G6.cjs → native-tree-5TENEQ7Y.cjs} +4 -4
  338. package/dist/{native-tree-JDI3LJSH.mjs → native-tree-LNO7K6JR.mjs} +3 -3
  339. package/dist/{navigation-delegate.d-C4i5Y39E.d.mts → navigation-delegate.d-BElGUMgt.d.mts} +1 -1
  340. package/dist/{navigation-delegate.d-_Df9DnPY.d.ts → navigation-delegate.d-o3pPd9VI.d.ts} +1 -1
  341. package/dist/navigation-errors.d-DwHtoMyR.d.mts +13 -0
  342. package/dist/navigation-errors.d-DwHtoMyR.d.ts +13 -0
  343. package/dist/navigation.cjs +6 -6
  344. package/dist/navigation.d.mts +10 -9
  345. package/dist/navigation.d.ts +10 -9
  346. package/dist/navigation.mjs +5 -5
  347. package/dist/{nitro-NUCTYEKJ.cjs → nitro-XGIO6EQN.cjs} +7 -7
  348. package/dist/{nitro-VCJ6QQSI.mjs → nitro-YLTGVGK4.mjs} +3 -3
  349. package/dist/node-module-bundle-TNSY5PAC.cjs +15 -0
  350. package/dist/{node-module-bundle-XPLBMXRD.mjs → node-module-bundle-ZWCQJCKA.mjs} +3 -1
  351. package/dist/observability.cjs +8 -2
  352. package/dist/{observability.d-DdJRiaIX.d.mts → observability.d-mXSbp4jc.d.mts} +17 -1
  353. package/dist/{observability.d-DdJRiaIX.d.ts → observability.d-mXSbp4jc.d.ts} +17 -1
  354. package/dist/observability.d.mts +1 -1
  355. package/dist/observability.d.ts +1 -1
  356. package/dist/observability.mjs +7 -1
  357. package/dist/{plugin-TV6W7YNK.mjs → plugin-33I3V42N.mjs} +1 -1
  358. package/dist/{plugin-AGEFSU7K.cjs → plugin-LN3JBZRR.cjs} +2 -2
  359. package/dist/plugin.cjs +50 -48
  360. package/dist/plugin.d.mts +9 -8
  361. package/dist/plugin.d.ts +9 -8
  362. package/dist/plugin.mjs +49 -47
  363. package/dist/query/client.cjs +10 -10
  364. package/dist/query/client.mjs +5 -5
  365. package/dist/{render-plan.d-CslZE7o7.d.ts → render-plan.d-BD06tqFA.d.ts} +1 -1
  366. package/dist/{render-plan.d-4V_NmaA6.d.mts → render-plan.d-xWCRAJeR.d.mts} +1 -1
  367. package/dist/renderer/none/server.cjs +5 -1
  368. package/dist/renderer/none/server.d.mts +3 -1
  369. package/dist/renderer/none/server.d.ts +3 -1
  370. package/dist/renderer/none/server.mjs +4 -0
  371. package/dist/renderer/react/server.cjs +6 -6
  372. package/dist/renderer/react/server.mjs +3 -3
  373. package/dist/renderer-client.cjs +34 -15
  374. package/dist/renderer-client.d.mts +16 -100
  375. package/dist/renderer-client.d.ts +16 -100
  376. package/dist/renderer-client.mjs +23 -4
  377. package/dist/renderer.cjs +4 -2
  378. package/dist/renderer.d.mts +49 -6
  379. package/dist/renderer.d.ts +49 -6
  380. package/dist/renderer.mjs +3 -1
  381. package/dist/{request.d-CbV3y7j3.d.ts → request.d-DUMuWxSN.d.ts} +1 -1
  382. package/dist/{request.d-CmLTxEgS.d.mts → request.d-Dx82V8bz.d.mts} +1 -1
  383. package/dist/request.d.mts +6 -5
  384. package/dist/request.d.ts +6 -5
  385. package/dist/{route-rendering.d-CETnXNez.d.ts → route-rendering.d-BwBVpLtD.d.ts} +1 -1
  386. package/dist/{route-rendering.d-CmoqfOmj.d.mts → route-rendering.d-DJh6GauM.d.mts} +1 -1
  387. package/dist/{router.d-ktz7pwYm.d.mts → router.d-BtkKDxUB.d.mts} +1 -1
  388. package/dist/{router.d-Dga3N5YO.d.ts → router.d-CJBSG5jr.d.ts} +1 -1
  389. package/dist/routes.cjs +5 -5
  390. package/dist/routes.d.mts +5 -4
  391. package/dist/routes.d.ts +5 -4
  392. package/dist/routes.mjs +4 -4
  393. package/dist/{rsc-pipeline-N7CWJW7T.mjs → rsc-pipeline-GD6KLOIG.mjs} +20 -20
  394. package/dist/{rsc-pipeline-JLYD26AR.cjs → rsc-pipeline-H5AXQA7A.cjs} +21 -21
  395. package/dist/{runtime-QXX2A4TS.mjs → runtime-OJ7FXFUI.mjs} +22 -22
  396. package/dist/{runtime-F5NSS4DD.cjs → runtime-YWQVBC3V.cjs} +32 -32
  397. package/dist/{runtime.d-BWLZUOfA.d.ts → runtime.d-BQnD0cfC.d.ts} +1 -1
  398. package/dist/{runtime.d-DuaXEM0p.d.mts → runtime.d-C4SuZXf6.d.mts} +1 -1
  399. package/dist/{schema-dev-notice-2GN5V7Y2.mjs → schema-dev-notice-EUPAUJVN.mjs} +2 -2
  400. package/dist/{schema-dev-notice-6VCOZGG2.cjs → schema-dev-notice-ZSCL47CT.cjs} +5 -5
  401. package/dist/search-client-A7YJT7JZ.cjs +15 -0
  402. package/dist/{search-client-W4PEFAQB.mjs → search-client-GIXIEU75.mjs} +1 -1
  403. package/dist/server-action-security.cjs +1 -1
  404. package/dist/server-action-security.mjs +1 -1
  405. package/dist/{server-components-status.d-CqxtJmqP.d.mts → server-components-status.d-9rH7ZoEq.d.mts} +1 -1
  406. package/dist/{server-components-status.d-C5JpC7_Y.d.ts → server-components-status.d-rfKOcE0N.d.ts} +1 -1
  407. package/dist/server-fn.cjs +5 -5
  408. package/dist/server-fn.mjs +4 -4
  409. package/dist/server-plugins.cjs +1 -1
  410. package/dist/server-plugins.d.mts +7 -6
  411. package/dist/server-plugins.d.ts +7 -6
  412. package/dist/server-plugins.mjs +1 -1
  413. package/dist/server-query.cjs +6 -6
  414. package/dist/server-query.mjs +5 -5
  415. package/dist/server.cjs +95 -90
  416. package/dist/server.d.mts +16 -15
  417. package/dist/server.d.ts +16 -15
  418. package/dist/server.mjs +61 -56
  419. package/dist/{session-AK2OA5UZ.mjs → session-4IB34X35.mjs} +2 -2
  420. package/dist/session-MOYQJ7E6.cjs +24 -0
  421. package/dist/{spa-router.d-C3LzwTlY.d.ts → spa-router.d-DMKiBsHH.d.ts} +20 -4
  422. package/dist/{spa-router.d-BLE188EL.d.mts → spa-router.d-V6XLSTCy.d.mts} +20 -4
  423. package/dist/{ssg.d-QrFyU6T4.d.mts → ssg.d-BnCKPQL0.d.mts} +2 -2
  424. package/dist/{ssg.d-DisOfj0I.d.ts → ssg.d-MNedvvMB.d.ts} +2 -2
  425. package/dist/storage.cjs +2 -2
  426. package/dist/storage.d.mts +112 -96
  427. package/dist/storage.d.ts +112 -96
  428. package/dist/storage.mjs +1 -1
  429. package/dist/store-core.d-Ad5biajo.d.ts +301 -0
  430. package/dist/store-core.d-BqJI1-ix.d.mts +301 -0
  431. package/dist/testing.cjs +13 -13
  432. package/dist/testing.d.mts +5 -4
  433. package/dist/testing.d.ts +5 -4
  434. package/dist/testing.mjs +10 -10
  435. package/dist/{types.d-DW2vyaUq.d.mts → types.d-C5hlNbHa.d.mts} +8 -1
  436. package/dist/{types.d-DW2vyaUq.d.ts → types.d-C5hlNbHa.d.ts} +8 -1
  437. package/dist/{utils.d-BlWZFgdL.d.mts → utils.d-BEKLWa0Z.d.mts} +1 -1
  438. package/dist/{utils.d-7YcgfTCK.d.ts → utils.d-BdjHKDuT.d.ts} +1 -1
  439. package/dist/version.cjs +2 -2
  440. package/dist/version.mjs +1 -1
  441. package/dist/vite.cjs +55 -49
  442. package/dist/vite.d.mts +26 -10
  443. package/dist/vite.d.ts +26 -10
  444. package/dist/vite.mjs +54 -48
  445. package/dist/workflows.cjs +3 -3
  446. package/dist/workflows.mjs +2 -2
  447. package/package.json +23 -2
  448. package/types/images.d.ts +9 -0
  449. package/dist/analyzer-KVTUYGTT.cjs +0 -16
  450. package/dist/chunk-CQL5ZGFU.cjs +0 -50
  451. package/dist/chunk-HONTCUK6.mjs +0 -203
  452. package/dist/chunk-K6PGK7DC.cjs +0 -203
  453. package/dist/chunk-NBIVGHAT.mjs +0 -50
  454. package/dist/island-value-protocol.d-BRayRghM.d.mts +0 -12
  455. package/dist/island-value-protocol.d-BRayRghM.d.ts +0 -12
  456. package/dist/layers-HMEGUEXM.cjs +0 -21
  457. package/dist/node-module-bundle-M6BISE2P.cjs +0 -13
  458. package/dist/search-client-6NVC6HM2.cjs +0 -15
  459. package/dist/session-H4TWP73H.cjs +0 -24
  460. package/dist/{chunk-JKFN3YVG.mjs → chunk-6JWXHPVR.mjs} +0 -0
  461. package/dist/{chunk-522K362I.mjs → chunk-C2OLXVUC.mjs} +0 -0
  462. package/dist/{chunk-MALGIHIC.cjs → chunk-HS4JPIGR.cjs} +0 -0
  463. package/dist/{chunk-PBJ7MEOV.cjs → chunk-OZUINP2P.cjs} +2 -2
  464. package/dist/{chunk-CUZT7474.cjs → chunk-TCMRLW3K.cjs} +0 -0
  465. package/dist/{chunk-Q3DO7MVK.mjs → chunk-URBP6DLH.mjs} +0 -0
  466. package/dist/{chunk-7FQFK3OA.mjs → chunk-V7HNYR76.mjs} +3 -3
  467. /package/dist/{chunk-AOTD2N5P.cjs → chunk-WGWWRV2M.cjs} +0 -0
@@ -7,7 +7,7 @@ var _chunkY2FEFQAYcjs = require('./chunk-Y2FEFQAY.cjs');
7
7
 
8
8
 
9
9
 
10
- var _chunkVJ6L7TIIcjs = require('./chunk-VJ6L7TII.cjs');
10
+ var _chunk3SPECQXIcjs = require('./chunk-3SPECQXI.cjs');
11
11
 
12
12
 
13
13
  var _chunkRDADQG5Scjs = require('./chunk-RDADQG5S.cjs');
@@ -40,22 +40,25 @@ var _chunkRDADQG5Scjs = require('./chunk-RDADQG5S.cjs');
40
40
 
41
41
 
42
42
 
43
- var _chunkHVMQAVZKcjs = require('./chunk-HVMQAVZK.cjs');
44
43
 
45
44
 
46
45
 
46
+ var _chunkCL7BUGVBcjs = require('./chunk-CL7BUGVB.cjs');
47
47
 
48
- var _chunkMBD34AS5cjs = require('./chunk-MBD34AS5.cjs');
49
48
 
50
49
 
51
- var _chunkCUZT7474cjs = require('./chunk-CUZT7474.cjs');
52
50
 
51
+ var _chunkZ5BANEQDcjs = require('./chunk-Z5BANEQD.cjs');
52
+
53
+
54
+ var _chunkTCMRLW3Kcjs = require('./chunk-TCMRLW3K.cjs');
53
55
 
54
- var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
55
56
 
56
57
 
58
+ var _chunkOUDNUFVRcjs = require('./chunk-OUDNUFVR.cjs');
57
59
 
58
- var _chunkBZJYPIFZcjs = require('./chunk-BZJYPIFZ.cjs');
60
+
61
+ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
59
62
 
60
63
 
61
64
 
@@ -64,7 +67,7 @@ var _chunkBZJYPIFZcjs = require('./chunk-BZJYPIFZ.cjs');
64
67
 
65
68
 
66
69
 
67
- var _chunk6ZFGWB75cjs = require('./chunk-6ZFGWB75.cjs');
70
+ var _chunkOFVCWV2Dcjs = require('./chunk-OFVCWV2D.cjs');
68
71
 
69
72
 
70
73
  var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
@@ -82,13 +85,13 @@ var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
82
85
 
83
86
 
84
87
 
85
- var _chunk5KISFWD2cjs = require('./chunk-5KISFWD2.cjs');
88
+ var _chunkFYZD7DUScjs = require('./chunk-FYZD7DUS.cjs');
86
89
 
87
90
 
88
- var _chunkYRXPDKMMcjs = require('./chunk-YRXPDKMM.cjs');
91
+ var _chunkW53Z4WDIcjs = require('./chunk-W53Z4WDI.cjs');
89
92
 
90
93
 
91
- var _chunkFOULIN4Scjs = require('./chunk-FOULIN4S.cjs');
94
+ var _chunkADQ2LATRcjs = require('./chunk-ADQ2LATR.cjs');
92
95
 
93
96
 
94
97
 
@@ -139,7 +142,7 @@ var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
139
142
 
140
143
 
141
144
 
142
- var _chunkODYKCC6Wcjs = require('./chunk-ODYKCC6W.cjs');
145
+ var _chunk46UV2E7Icjs = require('./chunk-46UV2E7I.cjs');
143
146
 
144
147
 
145
148
 
@@ -163,10 +166,10 @@ var _chunkSTF6VDYQcjs = require('./chunk-STF6VDYQ.cjs');
163
166
 
164
167
 
165
168
 
166
- var _chunkF4ID7BGOcjs = require('./chunk-F4ID7BGO.cjs');
169
+ var _chunk4OFWG4IKcjs = require('./chunk-4OFWG4IK.cjs');
167
170
 
168
171
 
169
- var _chunkWRWJ7IWTcjs = require('./chunk-WRWJ7IWT.cjs');
172
+ var _chunkOLKYHTLNcjs = require('./chunk-OLKYHTLN.cjs');
170
173
 
171
174
 
172
175
  var _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
@@ -174,7 +177,7 @@ var _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
174
177
 
175
178
 
176
179
 
177
- var _chunkQMR2TUVZcjs = require('./chunk-QMR2TUVZ.cjs');
180
+ var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
178
181
 
179
182
 
180
183
 
@@ -184,7 +187,7 @@ var _chunkQMR2TUVZcjs = require('./chunk-QMR2TUVZ.cjs');
184
187
 
185
188
 
186
189
 
187
- var _chunk67MZTLTFcjs = require('./chunk-67MZTLTF.cjs');
190
+ var _chunkM6DAIE4Tcjs = require('./chunk-M6DAIE4T.cjs');
188
191
 
189
192
 
190
193
 
@@ -196,7 +199,7 @@ var _chunk3EIPOTZVcjs = require('./chunk-3EIPOTZV.cjs');
196
199
 
197
200
 
198
201
 
199
- var _chunkPG7J7XYTcjs = require('./chunk-PG7J7XYT.cjs');
202
+ var _chunk26WP75W5cjs = require('./chunk-26WP75W5.cjs');
200
203
 
201
204
 
202
205
 
@@ -208,21 +211,21 @@ var _chunk2HW5LWAHcjs = require('./chunk-2HW5LWAH.cjs');
208
211
 
209
212
 
210
213
 
211
- var _chunk2YJ4DHTDcjs = require('./chunk-2YJ4DHTD.cjs');
214
+ var _chunk2NOHVIJ3cjs = require('./chunk-2NOHVIJ3.cjs');
212
215
 
213
216
 
214
217
 
215
218
 
216
219
 
217
220
 
218
- var _chunkAOTD2N5Pcjs = require('./chunk-AOTD2N5P.cjs');
221
+ var _chunkWGWWRV2Mcjs = require('./chunk-WGWWRV2M.cjs');
219
222
 
220
223
 
221
224
 
222
225
  var _chunkX333W5KVcjs = require('./chunk-X333W5KV.cjs');
223
226
 
224
227
 
225
- var _chunk4SLHSODZcjs = require('./chunk-4SLHSODZ.cjs');
228
+ var _chunkVGHDPEPQcjs = require('./chunk-VGHDPEPQ.cjs');
226
229
 
227
230
 
228
231
 
@@ -238,7 +241,7 @@ var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
238
241
  var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
239
242
 
240
243
 
241
- var _chunk5DREJN4Gcjs = require('./chunk-5DREJN4G.cjs');
244
+ var _chunkLKIG5SM6cjs = require('./chunk-LKIG5SM6.cjs');
242
245
 
243
246
 
244
247
  var _chunkSXXSQVKKcjs = require('./chunk-SXXSQVKK.cjs');
@@ -250,7 +253,7 @@ var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
250
253
 
251
254
 
252
255
 
253
- var _chunk4VLXQ55Ocjs = require('./chunk-4VLXQ55O.cjs');
256
+ var _chunkWIZRYFB2cjs = require('./chunk-WIZRYFB2.cjs');
254
257
 
255
258
 
256
259
  var _chunkRKQOMG2Xcjs = require('./chunk-RKQOMG2X.cjs');
@@ -280,7 +283,7 @@ var _chunkZMSVKVI3cjs = require('./chunk-ZMSVKVI3.cjs');
280
283
 
281
284
 
282
285
 
283
- var _chunkGC5ROI3Acjs = require('./chunk-GC5ROI3A.cjs');
286
+ var _chunk7U4XF76Rcjs = require('./chunk-7U4XF76R.cjs');
284
287
 
285
288
 
286
289
  var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
@@ -298,10 +301,10 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
298
301
 
299
302
 
300
303
 
301
- var _chunkEVIWKPJVcjs = require('./chunk-EVIWKPJV.cjs');
304
+ var _chunkPLJMEUANcjs = require('./chunk-PLJMEUAN.cjs');
302
305
 
303
306
 
304
- var _chunkLMXGCFAMcjs = require('./chunk-LMXGCFAM.cjs');
307
+ var _chunkNSLRK5DKcjs = require('./chunk-NSLRK5DK.cjs');
305
308
 
306
309
 
307
310
  var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
@@ -363,7 +366,10 @@ function transformFarmFormActionModule(options) {
363
366
  root: options.root,
364
367
  environment: options.ssr ? "server" : "client",
365
368
  parse: options.parse,
366
- runtime: {
369
+ runtime: options.runtime === "renderer" ? {
370
+ server: runtimeModule("@farm.js/core/internal/islx-actions-server"),
371
+ client: runtimeModule("@farm.js/core/internal/islx-actions-client")
372
+ } : {
367
373
  server: runtimeModule("@farm.js/core/internal/islx-server"),
368
374
  client: runtimeModule("@farm.js/core/internal/islx-client")
369
375
  }
@@ -700,7 +706,7 @@ function findClientServerFnViolation(code, id) {
700
706
  return null;
701
707
  }
702
708
  function createServerFnBoundaryDiagnostic(violation, id, location) {
703
- return _chunkODYKCC6Wcjs.createFarmDiagnostic.call(void 0,
709
+ return _chunk46UV2E7Icjs.createFarmDiagnostic.call(void 0,
704
710
  "CLIENT_SERVER_FUNCTION",
705
711
  id,
706
712
  `${violation.factory} handlers run only on the server, but this module is bundled into the client, so the handler and its Node-only imports would run in the browser.`,
@@ -959,21 +965,21 @@ function readPropertyKey(property) {
959
965
  function createClientBoundaryDiagnostic(file, finding, location) {
960
966
  switch (finding.kind) {
961
967
  case "server-env":
962
- return _chunkODYKCC6Wcjs.createFarmDiagnostic.call(void 0,
968
+ return _chunk46UV2E7Icjs.createFarmDiagnostic.call(void 0,
963
969
  "CLIENT_SERVER_ENV",
964
970
  file,
965
971
  `process.env.${finding.name} is read at module scope in a module compiled for the browser, where it is undefined.`,
966
972
  location
967
973
  );
968
974
  case "public-env":
969
- return _chunkODYKCC6Wcjs.createFarmDiagnostic.call(void 0,
975
+ return _chunk46UV2E7Icjs.createFarmDiagnostic.call(void 0,
970
976
  "CLIENT_PROCESS_ENV_PUBLIC",
971
977
  file,
972
978
  `process.env.${finding.name} is declared public, but process.env is not populated in the browser, so this module-scope read is undefined there.`,
973
979
  location
974
980
  );
975
981
  case "builtin":
976
- return _chunkODYKCC6Wcjs.createFarmDiagnostic.call(void 0,
982
+ return _chunk46UV2E7Icjs.createFarmDiagnostic.call(void 0,
977
983
  "CLIENT_NODE_BUILTIN",
978
984
  file,
979
985
  `"${finding.name}" is imported into a module compiled for the browser, which gets a stub whose exports without a Web API equivalent are undefined.`,
@@ -987,7 +993,8 @@ var _promises = require('fs/promises');
987
993
 
988
994
  var _imagesize = require('image-size');
989
995
  var FARM_IMAGE_ID_PREFIX = "\0farm:image:";
990
- var STATIC_IMAGE_RE = /\.(?:avif|gif|jpe?g|png|webp)$/i;
996
+ var STATIC_IMAGE_RE = /\.(?:avif|gif|jpe?g|png|svg|webp)$/i;
997
+ var SVG_RE = /\.svg$/i;
991
998
  var SCRIPT_IMPORTER_RE = /\.(?:[cm]?[jt]sx?|mdx?)$/i;
992
999
  function farmImageImportsPlugin() {
993
1000
  return {
@@ -1022,7 +1029,7 @@ async function createStaticImageModule(filePath, sourceDeclaration) {
1022
1029
  if (!dimensions.width || !dimensions.height) {
1023
1030
  throw new Error(`Could not determine image dimensions for ${filePath}`);
1024
1031
  }
1025
- const blurDataURL = await createBlurDataURL(bytes);
1032
+ const blurDataURL = SVG_RE.test(filePath) ? void 0 : await createBlurDataURL(bytes);
1026
1033
  return [
1027
1034
  sourceDeclaration,
1028
1035
  `const image = ${JSON.stringify({
@@ -1212,7 +1219,7 @@ function resolveFarmPageDataFailure(error) {
1212
1219
  }
1213
1220
 
1214
1221
  // src/openapi/dev-status.ts
1215
- function reportOpenAPIDevGenerationResult(spec, output = _chunkGC5ROI3Acjs.logger) {
1222
+ function reportOpenAPIDevGenerationResult(spec, output = _chunk7U4XF76Rcjs.logger) {
1216
1223
  if (spec) {
1217
1224
  output.success("\u2705 OpenAPI documentation enabled");
1218
1225
  return;
@@ -1223,13 +1230,13 @@ function reportOpenAPIDevGenerationResult(spec, output = _chunkGC5ROI3Acjs.logge
1223
1230
  // src/vite.ts
1224
1231
  var SERVER_FN_TRANSFORM_PLUGIN = "@farm.js/plugin/rsc:server-fn-actions";
1225
1232
  function farmLlmsTxtGeneratedPaths(config) {
1226
- const llms = _chunkWRWJ7IWTcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([config, 'access', _62 => _62.agent, 'optionalAccess', _63 => _63.llmsTxt]));
1233
+ const llms = _chunkOLKYHTLNcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([config, 'access', _62 => _62.agent, 'optionalAccess', _63 => _63.llmsTxt]));
1227
1234
  if (!llms.enabled) return [];
1228
1235
  return llms.full ? ["/llms.txt", "/llms-full.txt"] : ["/llms.txt"];
1229
1236
  }
1230
1237
  function farmAgentGeneratedPaths(config) {
1231
- const crawlers = _chunkF4ID7BGOcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _64 => _64.agent, 'optionalAccess', _65 => _65.crawlers]));
1232
- const sitemap = _chunkF4ID7BGOcjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _66 => _66.agent, 'optionalAccess', _67 => _67.sitemap]));
1238
+ const crawlers = _chunk4OFWG4IKcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _64 => _64.agent, 'optionalAccess', _65 => _65.crawlers]));
1239
+ const sitemap = _chunk4OFWG4IKcjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _66 => _66.agent, 'optionalAccess', _67 => _67.sitemap]));
1233
1240
  return [
1234
1241
  ...farmLlmsTxtGeneratedPaths(config),
1235
1242
  ...sitemap.enabled ? ["/sitemap.xml"] : [],
@@ -1265,7 +1272,7 @@ function loadFarmDocsDevRuntime() {
1265
1272
  return import("./docs.cjs");
1266
1273
  }
1267
1274
  function loadFarmDocsSearchDevRuntime() {
1268
- return import("./search-client-6NVC6HM2.cjs");
1275
+ return import("./search-client-A7YJT7JZ.cjs");
1269
1276
  }
1270
1277
  function loadFarmOpenAPIDevRuntime() {
1271
1278
  return import("./manager-PX4QN4HK.cjs");
@@ -1274,7 +1281,7 @@ function loadFarmWorkflowsDevRuntime() {
1274
1281
  return import("./workflows.cjs");
1275
1282
  }
1276
1283
  function loadFarmDevtoolsSnapshotRuntime() {
1277
- return import("./devtools-TMATFNUY.cjs");
1284
+ return import("./devtools-EI5N366Z.cjs");
1278
1285
  }
1279
1286
  function loadFarmDevtoolsUIRuntime() {
1280
1287
  return import("./devtools-ui-C2EMF2SO.cjs");
@@ -1298,6 +1305,25 @@ function farmI18nClientBridgePlugin() {
1298
1305
  }
1299
1306
  };
1300
1307
  }
1308
+ function farmNavigationPlugin(renderer) {
1309
+ const otherRenderer = !_chunkM6DAIE4Tcjs.isFarmRendererDisabled.call(void 0, renderer) && !_chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer || void 0) && _optionalChain([(renderer || void 0), 'optionalAccess', _69 => _69.name]) !== "preact";
1310
+ return {
1311
+ name: "farm:navigation",
1312
+ config() {
1313
+ if (!otherRenderer) return;
1314
+ return {
1315
+ resolve: {
1316
+ alias: [
1317
+ {
1318
+ find: /^@farm\.js\/core\/navigation$/,
1319
+ replacement: "@farm.js/core/internal/navigation-neutral"
1320
+ }
1321
+ ]
1322
+ }
1323
+ };
1324
+ }
1325
+ };
1326
+ }
1301
1327
  var FARM_SERVER_ONLY_ENTRIES = /* @__PURE__ */ new Set(["@farm.js/core/og"]);
1302
1328
  var SERVER_ONLY_PACKAGE = "server-only";
1303
1329
  var farmReactServerFiles = /* @__PURE__ */ new Set();
@@ -1305,16 +1331,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
1305
1331
  var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
1306
1332
  var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
1307
1333
  var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
1308
- _chunkHVMQAVZKcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1309
- new RegExp(`^${_chunkODYKCC6Wcjs.FARM_RESOLVE_FROM_PREFIX}`),
1334
+ _chunkCL7BUGVBcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1335
+ new RegExp(`^${_chunk46UV2E7Icjs.FARM_RESOLVE_FROM_PREFIX}`),
1310
1336
  // What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
1311
1337
  // included.
1312
1338
  /^node:/,
1313
- _chunkHVMQAVZKcjs.exactIdPattern.call(void 0, _module.builtinModules)
1339
+ _chunkCL7BUGVBcjs.exactIdPattern.call(void 0, _module.builtinModules)
1314
1340
  ];
1315
1341
  var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
1316
- _chunkHVMQAVZKcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1317
- new RegExp(`^${_chunkODYKCC6Wcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1342
+ _chunkCL7BUGVBcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1343
+ new RegExp(`^${_chunk46UV2E7Icjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1318
1344
  ];
1319
1345
  function createFarmPlatformClientModule(platform) {
1320
1346
  return `export function platform() { return ${JSON.stringify(platform)}; }
@@ -1344,24 +1370,24 @@ function farmIslandContainersPlugin(config) {
1344
1370
  root = config.root || resolved.root;
1345
1371
  },
1346
1372
  transform(code, id) {
1347
- if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _69 => _69.experimental, 'optionalAccess', _70 => _70.serverComponents])) !== "islands") {
1373
+ if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _70 => _70.experimental, 'optionalAccess', _71 => _71.serverComponents])) !== "islands") {
1348
1374
  return null;
1349
1375
  }
1350
1376
  if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
1351
1377
  return null;
1352
1378
  }
1353
- if (_chunkODYKCC6Wcjs.hasUseClientDirective.call(void 0, code)) return null;
1379
+ if (_chunk46UV2E7Icjs.hasUseClientDirective.call(void 0, code)) return null;
1354
1380
  const file = id.split("?", 1)[0];
1355
- const bindings = _chunkODYKCC6Wcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1381
+ const bindings = _chunk46UV2E7Icjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1356
1382
  if (bindings.length === 0) return null;
1357
- const grown = _chunkODYKCC6Wcjs.wrapFarmIslandContainers.call(void 0, {
1383
+ const grown = _chunk46UV2E7Icjs.wrapFarmIslandContainers.call(void 0, {
1358
1384
  code,
1359
1385
  file,
1360
1386
  bindings,
1361
- reference: _chunkODYKCC6Wcjs.farmIslandContainerReferencePath.call(void 0, root)
1387
+ reference: _chunk46UV2E7Icjs.farmIslandContainerReferencePath.call(void 0, root)
1362
1388
  });
1363
1389
  if (grown === null) return null;
1364
- _chunkODYKCC6Wcjs.ensureFarmIslandContainerReference.call(void 0, root);
1390
+ _chunk46UV2E7Icjs.ensureFarmIslandContainerReference.call(void 0, root);
1365
1391
  return { code: grown, map: null };
1366
1392
  }
1367
1393
  };
@@ -1375,15 +1401,15 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1375
1401
  config(config) {
1376
1402
  const appRoot = path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())));
1377
1403
  if (options.distDir) {
1378
- _chunkODYKCC6Wcjs.usePackageScanCacheFile.call(void 0,
1404
+ _chunk46UV2E7Icjs.usePackageScanCacheFile.call(void 0,
1379
1405
  path6.resolve(appRoot, options.distDir, "cache", "package-scans.json")
1380
1406
  );
1381
1407
  }
1382
- const bundledPackages = _chunkODYKCC6Wcjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1408
+ const bundledPackages = _chunk46UV2E7Icjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1383
1409
  const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
1384
- _chunkODYKCC6Wcjs.persistPackageScanCache.call(void 0, );
1410
+ _chunk46UV2E7Icjs.persistPackageScanCache.call(void 0, );
1385
1411
  return {
1386
- optimizeDeps: { rolldownOptions: { plugins: [_chunkODYKCC6Wcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
1412
+ optimizeDeps: { rolldownOptions: { plugins: [_chunk46UV2E7Icjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
1387
1413
  ssr: {
1388
1414
  noExternal: [
1389
1415
  // Resolve `server-only` here rather than in Node, which would load its throwing build.
@@ -1401,14 +1427,14 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1401
1427
  resolveId: {
1402
1428
  filter: { id: FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER },
1403
1429
  handler(id, importer, options2) {
1404
- if (id === FARM_PLATFORM_ENTRY) return _optionalChain([options2, 'optionalAccess', _71 => _71.ssr]) ? null : FARM_PLATFORM_CLIENT_ID;
1430
+ if (id === FARM_PLATFORM_ENTRY) return _optionalChain([options2, 'optionalAccess', _72 => _72.ssr]) ? null : FARM_PLATFORM_CLIENT_ID;
1405
1431
  if (id === SERVER_ONLY_PACKAGE) {
1406
- if (_optionalChain([options2, 'optionalAccess', _72 => _72.ssr]) || _optionalChain([options2, 'optionalAccess', _73 => _73.scan])) {
1432
+ if (_optionalChain([options2, 'optionalAccess', _73 => _73.ssr]) || _optionalChain([options2, 'optionalAccess', _74 => _74.scan])) {
1407
1433
  return FARM_SERVER_ONLY_PACKAGE_ID;
1408
1434
  }
1409
1435
  this.error(
1410
- _chunkODYKCC6Wcjs.formatFarmDiagnostic.call(void 0,
1411
- _chunkODYKCC6Wcjs.createFarmDiagnostic.call(void 0,
1436
+ _chunk46UV2E7Icjs.formatFarmDiagnostic.call(void 0,
1437
+ _chunk46UV2E7Icjs.createFarmDiagnostic.call(void 0,
1412
1438
  "CLIENT_SERVER_ONLY_IMPORT",
1413
1439
  _nullishCoalesce(importer, () => ( "<unknown module>")),
1414
1440
  `${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
@@ -1417,10 +1443,10 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1417
1443
  )
1418
1444
  );
1419
1445
  }
1420
- if (!_optionalChain([options2, 'optionalAccess', _74 => _74.ssr]) && _module.isBuiltin.call(void 0, id)) {
1421
- return _chunkODYKCC6Wcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1446
+ if (!_optionalChain([options2, 'optionalAccess', _75 => _75.ssr]) && _module.isBuiltin.call(void 0, id)) {
1447
+ return _chunk46UV2E7Icjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1422
1448
  }
1423
- const resolveFrom = importer ? _chunkODYKCC6Wcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1449
+ const resolveFrom = importer ? _chunk46UV2E7Icjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1424
1450
  if (resolveFrom) {
1425
1451
  const directory = path6.dirname(resolveFrom.importer);
1426
1452
  return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
@@ -1435,10 +1461,10 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1435
1461
  }
1436
1462
  if (!FARM_SERVER_ONLY_ENTRIES.has(id)) return null;
1437
1463
  const importedBy = importer ? ` (imported by ${importer})` : "";
1438
- if (!_optionalChain([options2, 'optionalAccess', _75 => _75.ssr])) {
1464
+ if (!_optionalChain([options2, 'optionalAccess', _76 => _76.ssr])) {
1439
1465
  this.error(
1440
- _chunkODYKCC6Wcjs.formatFarmDiagnostic.call(void 0,
1441
- _chunkODYKCC6Wcjs.createFarmDiagnostic.call(void 0,
1466
+ _chunk46UV2E7Icjs.formatFarmDiagnostic.call(void 0,
1467
+ _chunk46UV2E7Icjs.createFarmDiagnostic.call(void 0,
1442
1468
  "CLIENT_SERVER_ONLY_ENTRY",
1443
1469
  _nullishCoalesce(importer, () => ( id)),
1444
1470
  `${id} is server-only and cannot be imported into client code.`
@@ -1463,7 +1489,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1463
1489
  if (id === FARM_PLATFORM_CLIENT_ID) {
1464
1490
  return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))));
1465
1491
  }
1466
- return _nullishCoalesce(_chunkODYKCC6Wcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1492
+ return _nullishCoalesce(_chunk46UV2E7Icjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1467
1493
  }
1468
1494
  }
1469
1495
  };
@@ -1496,10 +1522,10 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
1496
1522
  if (!snapshot) return "";
1497
1523
  const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
1498
1524
  if (snapshot.routing === "none") return runtime;
1499
- return `${_chunk6ZFGWB75cjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1525
+ return `${_chunkOFVCWV2Dcjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1500
1526
  }
1501
1527
  function getPublicEnvDefine(config) {
1502
- const publicEnv = _optionalChain([config, 'access', _76 => _76.env, 'optionalAccess', _77 => _77.public]);
1528
+ const publicEnv = _optionalChain([config, 'access', _77 => _77.env, 'optionalAccess', _78 => _78.public]);
1503
1529
  if (!isResolvedEnvScope(publicEnv)) {
1504
1530
  return {};
1505
1531
  }
@@ -1525,7 +1551,7 @@ function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request)
1525
1551
  return (req, res, next) => {
1526
1552
  const traceUrl = resolveTraceUrl(req);
1527
1553
  const traceRequest = createRequestFromNodeRequest(req, traceUrl);
1528
- const run = () => _chunkEVIWKPJVcjs.runWithFarmRequestSpan.call(void 0, traceRequest, () => middleware(req, res, next), {
1554
+ const run = () => _chunkPLJMEUANcjs.runWithFarmRequestSpan.call(void 0, traceRequest, () => middleware(req, res, next), {
1529
1555
  getStatusCode: () => res.statusCode || 200
1530
1556
  });
1531
1557
  const result = apiRuntime ? _chunkKBGZ5FD6cjs._runWithAPIRequestRuntime.call(void 0, apiRuntime, run) : run();
@@ -1538,12 +1564,12 @@ function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request)
1538
1564
  return;
1539
1565
  }
1540
1566
  if (res.headersSent) {
1541
- _optionalChain([res, 'access', _78 => _78.destroy, 'optionalCall', _79 => _79(error instanceof Error ? error : new Error(String(error)))]);
1567
+ _optionalChain([res, 'access', _79 => _79.destroy, 'optionalCall', _80 => _80(error instanceof Error ? error : new Error(String(error)))]);
1542
1568
  return;
1543
1569
  }
1544
1570
  res.statusCode = 500;
1545
1571
  res.setHeader("Content-Type", "application/json");
1546
- res.end(_chunk4VLXQ55Ocjs.FARM_INTERNAL_SERVER_ERROR_BODY);
1572
+ res.end(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
1547
1573
  });
1548
1574
  };
1549
1575
  }
@@ -1551,10 +1577,10 @@ function sendFarmDevErrorJSON(res) {
1551
1577
  res.statusCode = 500;
1552
1578
  res.setHeader("Content-Type", "application/json");
1553
1579
  res.setHeader("Cache-Control", "private, no-store");
1554
- res.end(_chunk4VLXQ55Ocjs.FARM_INTERNAL_SERVER_ERROR_BODY);
1580
+ res.end(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
1555
1581
  }
1556
1582
  function createFarmDevMiddlewareErrorResponse() {
1557
- return new Response(_chunk4VLXQ55Ocjs.FARM_INTERNAL_SERVER_ERROR_BODY, {
1583
+ return new Response(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY, {
1558
1584
  status: 500,
1559
1585
  headers: { "Content-Type": "application/json", "Cache-Control": "private, no-store" }
1560
1586
  });
@@ -1566,10 +1592,10 @@ function setFarmDevRuntimeHookErrorHead(res, json) {
1566
1592
  }
1567
1593
  function sendFarmDevRuntimeHookError(res, json) {
1568
1594
  setFarmDevRuntimeHookErrorHead(res, json);
1569
- res.end(json ? _chunk4VLXQ55Ocjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
1595
+ res.end(json ? _chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
1570
1596
  }
1571
1597
  function opensFarmDevRuntimeSession(pm) {
1572
- return pm.hasRuntimeRequestHooks() || _chunkMBD34AS5cjs.hasFarmServerRuntimePlugins.call(void 0, pm.getPlugins());
1598
+ return pm.hasRuntimeRequestHooks() || _chunkZ5BANEQDcjs.hasFarmServerRuntimePlugins.call(void 0, pm.getPlugins());
1573
1599
  }
1574
1600
  var FARM_CONFIG_ROUTE_PLUGIN_NAMES = /* @__PURE__ */ new Set([
1575
1601
  _chunkH7OFZJCVcjs.FARM_CONFIG_HEADERS_PLUGIN_NAME,
@@ -1674,7 +1700,7 @@ function interceptFarmDevPageResponse(options) {
1674
1700
  const originalWrite = res.write.bind(res);
1675
1701
  const originalEnd = res.end.bind(res);
1676
1702
  const originalWriteHead = res.writeHead.bind(res);
1677
- const originalFlushHeaders = _optionalChain([res, 'access', _80 => _80.flushHeaders, 'optionalAccess', _81 => _81.bind, 'call', _82 => _82(res)]);
1703
+ const originalFlushHeaders = _optionalChain([res, 'access', _81 => _81.flushHeaders, 'optionalAccess', _82 => _82.bind, 'call', _83 => _83(res)]);
1678
1704
  let afterResponseCalled = false;
1679
1705
  let interceptedEnd = false;
1680
1706
  const restore = () => {
@@ -1682,7 +1708,7 @@ function interceptFarmDevPageResponse(options) {
1682
1708
  res.end = originalEnd;
1683
1709
  res.writeHead = originalWriteHead;
1684
1710
  if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
1685
- delete res[_chunkCUZT7474cjs.FARM_NODE_RESPONSE_END_PENDING];
1711
+ delete res[_chunkTCMRLW3Kcjs.FARM_NODE_RESPONSE_END_PENDING];
1686
1712
  };
1687
1713
  let runtimeHookFailed = false;
1688
1714
  const endRuntimeRequest = (response) => pm.endRuntimeRequest(runtimeSession, response).catch((error) => {
@@ -1696,7 +1722,7 @@ function interceptFarmDevPageResponse(options) {
1696
1722
  const writeRuntimeHookFailure = () => {
1697
1723
  setFarmDevRuntimeHookErrorHead(res, Boolean(options.jsonError));
1698
1724
  originalWriteHead(500);
1699
- originalWrite(options.jsonError ? _chunk4VLXQ55Ocjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
1725
+ originalWrite(options.jsonError ? _chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
1700
1726
  };
1701
1727
  const htmlChunks = [];
1702
1728
  const responseChunks = [];
@@ -1736,7 +1762,7 @@ function interceptFarmDevPageResponse(options) {
1736
1762
  ).then(async (runtimeResponse) => {
1737
1763
  applyWebResponseToNodeResponse(runtimeResponse, res);
1738
1764
  if (!res.headersSent) originalWriteHead(res.statusCode);
1739
- _optionalChain([originalFlushHeaders, 'optionalCall', _83 => _83()]);
1765
+ _optionalChain([originalFlushHeaders, 'optionalCall', _84 => _84()]);
1740
1766
  if (!runtimeResponse.body) return;
1741
1767
  const reader = runtimeResponse.body.getReader();
1742
1768
  for (; ; ) {
@@ -1785,7 +1811,7 @@ function interceptFarmDevPageResponse(options) {
1785
1811
  if (streamsThroughRuntime()) {
1786
1812
  streamRuntimeChunk(bufferChunk);
1787
1813
  const callback = args.find((arg) => typeof arg === "function");
1788
- _optionalChain([callback, 'optionalCall', _84 => _84()]);
1814
+ _optionalChain([callback, 'optionalCall', _85 => _85()]);
1789
1815
  return true;
1790
1816
  }
1791
1817
  if (isHtmlResponse && bufferChunk) {
@@ -1797,7 +1823,7 @@ function interceptFarmDevPageResponse(options) {
1797
1823
  const shouldBufferResponse = isHtmlResponse ? bufferPluginResponse : Boolean(runtimeSession && hasRuntimeAfterHook);
1798
1824
  if (shouldBufferResponse) {
1799
1825
  const callback = args.find((arg) => typeof arg === "function");
1800
- _optionalChain([callback, 'optionalCall', _85 => _85()]);
1826
+ _optionalChain([callback, 'optionalCall', _86 => _86()]);
1801
1827
  return true;
1802
1828
  }
1803
1829
  const writeResult = originalWrite(chunk, ...args);
@@ -1806,7 +1832,7 @@ function interceptFarmDevPageResponse(options) {
1806
1832
  });
1807
1833
  res.end = ((...args) => {
1808
1834
  interceptedEnd = true;
1809
- res[_chunkCUZT7474cjs.FARM_NODE_RESPONSE_END_PENDING] = true;
1835
+ res[_chunkTCMRLW3Kcjs.FARM_NODE_RESPONSE_END_PENDING] = true;
1810
1836
  if (afterResponseCalled) return res;
1811
1837
  afterResponseCalled = true;
1812
1838
  options.logResponse(method, urlPath, res.statusCode || 200, Date.now() - startTime, "PAGE");
@@ -1889,7 +1915,7 @@ function interceptFarmDevPageResponse(options) {
1889
1915
  res.end = originalEnd;
1890
1916
  res.writeHead = originalWriteHead;
1891
1917
  if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
1892
- delete res[_chunkCUZT7474cjs.FARM_NODE_RESPONSE_END_PENDING];
1918
+ delete res[_chunkTCMRLW3Kcjs.FARM_NODE_RESPONSE_END_PENDING];
1893
1919
  originalEnd(...originalEndArgs);
1894
1920
  }).catch((error) => {
1895
1921
  reportFailure(error);
@@ -1906,14 +1932,14 @@ function interceptFarmDevPageResponse(options) {
1906
1932
  res.end = originalEnd;
1907
1933
  res.writeHead = originalWriteHead;
1908
1934
  if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
1909
- delete res[_chunkCUZT7474cjs.FARM_NODE_RESPONSE_END_PENDING];
1935
+ delete res[_chunkTCMRLW3Kcjs.FARM_NODE_RESPONSE_END_PENDING];
1910
1936
  originalEnd(body, callback);
1911
1937
  } else {
1912
1938
  res.write = originalWrite;
1913
1939
  res.end = originalEnd;
1914
1940
  res.writeHead = originalWriteHead;
1915
1941
  if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
1916
- delete res[_chunkCUZT7474cjs.FARM_NODE_RESPONSE_END_PENDING];
1942
+ delete res[_chunkTCMRLW3Kcjs.FARM_NODE_RESPONSE_END_PENDING];
1917
1943
  originalEnd(...originalEndArgs);
1918
1944
  }
1919
1945
  });
@@ -1944,18 +1970,18 @@ function getEnvDefines(config, configEnv) {
1944
1970
  _chunkMCSRMEQVcjs.getPublicFarmImageConfig.call(void 0,
1945
1971
  _chunkMCSRMEQVcjs.resolveFarmImageConfig.call(void 0,
1946
1972
  config.images,
1947
- _chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
1973
+ _chunkM6DAIE4Tcjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
1948
1974
  )
1949
1975
  )
1950
1976
  )
1951
1977
  };
1952
- if (_optionalChain([configEnv, 'optionalAccess', _86 => _86.isSsrBuild])) {
1978
+ if (_optionalChain([configEnv, 'optionalAccess', _87 => _87.isSsrBuild])) {
1953
1979
  defines.__FARM_ENV__ = JSON.stringify(_chunk3EIPOTZVcjs.createBundledEnv.call(void 0, getFullEnvDefine(config)));
1954
1980
  }
1955
1981
  return defines;
1956
1982
  }
1957
1983
  function getFarmAPIBaseURLDefine(config) {
1958
- const baseURL = _optionalChain([config, 'access', _87 => _87.api, 'optionalAccess', _88 => _88.baseURL]);
1984
+ const baseURL = _optionalChain([config, 'access', _88 => _88.api, 'optionalAccess', _89 => _89.baseURL]);
1959
1985
  return typeof baseURL === "string" && baseURL ? baseURL : _chunkPMJSG4JScjs.DEFAULT_FARM_API_BASE_PATH;
1960
1986
  }
1961
1987
  function isResolvedEnvScope(value) {
@@ -2034,8 +2060,8 @@ function rewriteEarlySsrRelativeImports(options) {
2034
2060
  const sourcePath = suffixIndex === -1 ? source.value : source.value.slice(0, suffixIndex);
2035
2061
  const suffix = suffixIndex === -1 ? "" : source.value.slice(suffixIndex);
2036
2062
  const resolvedPath = path6.resolve(path6.dirname(cleanId), sourcePath);
2037
- const moduleId = _chunkGC5ROI3Acjs.toViteModuleId.call(void 0, resolvedPath, options.root);
2038
- const specifier = moduleId.startsWith("/@fs/") ? _chunkGC5ROI3Acjs.toPosixPath.call(void 0, resolvedPath) : moduleId;
2063
+ const moduleId = _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, resolvedPath, options.root);
2064
+ const specifier = moduleId.startsWith("/@fs/") ? _chunk7U4XF76Rcjs.toPosixPath.call(void 0, resolvedPath) : moduleId;
2039
2065
  replacements.push({
2040
2066
  start: source.start,
2041
2067
  end: source.end,
@@ -2077,7 +2103,7 @@ function transformIsolatedClientBoundaryModule(options) {
2077
2103
  return null;
2078
2104
  }
2079
2105
  const body = Array.isArray(ast.body) ? ast.body : [];
2080
- const everyExportIsComponent = options.code.includes(_chunkODYKCC6Wcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkODYKCC6Wcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2106
+ const everyExportIsComponent = options.code.includes(_chunk46UV2E7Icjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunk46UV2E7Icjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2081
2107
  const replacements = [];
2082
2108
  const wrapperStatements = [];
2083
2109
  const originalEntries = [];
@@ -2096,9 +2122,9 @@ function transformIsolatedClientBoundaryModule(options) {
2096
2122
  transformedExports++;
2097
2123
  };
2098
2124
  for (const node of body) {
2099
- if (_optionalChain([node, 'optionalAccess', _89 => _89.type]) === "ExportDefaultDeclaration" && node.declaration) {
2125
+ if (_optionalChain([node, 'optionalAccess', _90 => _90.type]) === "ExportDefaultDeclaration" && node.declaration) {
2100
2126
  const declaration2 = node.declaration;
2101
- if ((declaration2.type === "FunctionDeclaration" || declaration2.type === "ClassDeclaration") && _optionalChain([declaration2, 'access', _90 => _90.id, 'optionalAccess', _91 => _91.name])) {
2127
+ if ((declaration2.type === "FunctionDeclaration" || declaration2.type === "ClassDeclaration") && _optionalChain([declaration2, 'access', _91 => _91.id, 'optionalAccess', _92 => _92.name])) {
2102
2128
  replacements.push({
2103
2129
  start: node.start,
2104
2130
  end: node.end,
@@ -2116,11 +2142,11 @@ function transformIsolatedClientBoundaryModule(options) {
2116
2142
  }
2117
2143
  continue;
2118
2144
  }
2119
- if (_optionalChain([node, 'optionalAccess', _92 => _92.type]) === "ExportNamedDeclaration" && !node.declaration && node.exportKind !== "type") {
2145
+ if (_optionalChain([node, 'optionalAccess', _93 => _93.type]) === "ExportNamedDeclaration" && !node.declaration && node.exportKind !== "type") {
2120
2146
  const specifiers = (node.specifiers || []).filter(
2121
2147
  (specifier) => specifier.type === "ExportSpecifier" && specifier.exportKind !== "type"
2122
2148
  );
2123
- const specifierName = (name) => _nullishCoalesce(_optionalChain([name, 'optionalAccess', _93 => _93.name]), () => ( String(_nullishCoalesce(_optionalChain([name, 'optionalAccess', _94 => _94.value]), () => ( "")))));
2149
+ const specifierName = (name) => _nullishCoalesce(_optionalChain([name, 'optionalAccess', _94 => _94.name]), () => ( String(_nullishCoalesce(_optionalChain([name, 'optionalAccess', _95 => _95.value]), () => ( "")))));
2124
2150
  const isComponentExport = (specifier) => {
2125
2151
  const exported = specifierName(specifier.exported);
2126
2152
  return everyExportIsComponent || exported === "default" || /^[A-Z]/.test(exported);
@@ -2147,14 +2173,14 @@ function transformIsolatedClientBoundaryModule(options) {
2147
2173
  if (kept.length > 0) wrapperStatements.push(`export { ${kept.join(", ")} };`);
2148
2174
  continue;
2149
2175
  }
2150
- if (_optionalChain([node, 'optionalAccess', _95 => _95.type]) !== "ExportNamedDeclaration" || !node.declaration) continue;
2176
+ if (_optionalChain([node, 'optionalAccess', _96 => _96.type]) !== "ExportNamedDeclaration" || !node.declaration) continue;
2151
2177
  const declaration = node.declaration;
2152
2178
  const declaredNames = [];
2153
- if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && _optionalChain([declaration, 'access', _96 => _96.id, 'optionalAccess', _97 => _97.name])) {
2179
+ if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && _optionalChain([declaration, 'access', _97 => _97.id, 'optionalAccess', _98 => _98.name])) {
2154
2180
  declaredNames.push(declaration.id.name);
2155
2181
  } else if (declaration.type === "VariableDeclaration") {
2156
2182
  for (const declarator of declaration.declarations || []) {
2157
- if (_optionalChain([declarator, 'access', _98 => _98.id, 'optionalAccess', _99 => _99.type]) === "Identifier") declaredNames.push(declarator.id.name);
2183
+ if (_optionalChain([declarator, 'access', _99 => _99.id, 'optionalAccess', _100 => _100.type]) === "Identifier") declaredNames.push(declarator.id.name);
2158
2184
  }
2159
2185
  }
2160
2186
  const componentNames = declaredNames.filter((name) => /^[A-Z]/.test(name));
@@ -2223,29 +2249,38 @@ async function warnClientBoundaryOnce(context, id, code, config) {
2223
2249
  } catch (e20) {
2224
2250
  return;
2225
2251
  }
2226
- const publicKeys = new Set(Object.keys(_nullishCoalesce(_optionalChain([config, 'access', _100 => _100.env, 'optionalAccess', _101 => _101.public]), () => ( {}))));
2252
+ const publicKeys = new Set(Object.keys(_nullishCoalesce(_optionalChain([config, 'access', _101 => _101.env, 'optionalAccess', _102 => _102.public]), () => ( {}))));
2227
2253
  const findings = [];
2228
2254
  for (const finding of analyzeClientBoundary(program, publicKeys)) {
2229
2255
  if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
2230
2256
  const resolved = await context.resolve(finding.name, id).catch(() => null);
2231
- if (!_optionalChain([resolved, 'optionalAccess', _102 => _102.id, 'access', _103 => _103.startsWith, 'call', _104 => _104(_chunkODYKCC6Wcjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2257
+ if (!_optionalChain([resolved, 'optionalAccess', _103 => _103.id, 'access', _104 => _104.startsWith, 'call', _105 => _105(_chunk46UV2E7Icjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2232
2258
  }
2233
2259
  findings.push(finding);
2234
2260
  }
2235
2261
  if (findings.length === 0) return;
2236
2262
  warnedClientBoundaryIds.add(id);
2237
- const locate = _chunkODYKCC6Wcjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2238
- _chunkGC5ROI3Acjs.logger.warn(
2263
+ const locate = _chunk46UV2E7Icjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2264
+ _chunk7U4XF76Rcjs.logger.warn(
2239
2265
  findings.map(
2240
- (finding) => _chunkODYKCC6Wcjs.formatFarmDiagnostic.call(void 0,
2266
+ (finding) => _chunk46UV2E7Icjs.formatFarmDiagnostic.call(void 0,
2241
2267
  createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
2242
2268
  config.root
2243
2269
  )
2244
2270
  ).join("\n")
2245
2271
  );
2246
2272
  }
2273
+ function isFarmAppRuntimeFile(file, appDirs, routeModuleExtensions) {
2274
+ const normalized = file.replace(/\\/g, "/");
2275
+ if (!appDirs.some((appDir) => normalized.startsWith(`${appDir}/`))) return false;
2276
+ const routeModule = /\/(?:page|default|layout|loading|error)(\.[^./]+)$/.exec(normalized);
2277
+ if (routeModule) return routeModuleExtensions.has(routeModule[1].toLowerCase());
2278
+ return /\/(?:middleware|route)\.(?:ts|tsx|js|jsx|md|mdx)$|\/(?:sitemap|robots|manifest)\.(?:ts|js)$|\/(?:opengraph-image|twitter-image)(?:\.(?:ts|tsx|js|jsx|png|jpg|jpeg|gif|webp)|\.alt\.txt)$/.test(
2279
+ normalized
2280
+ );
2281
+ }
2247
2282
  function shouldEmitFarmClientRootHmr(renderer) {
2248
- return _chunk67MZTLTFcjs.getFarmRendererCapabilities.call(void 0, _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
2283
+ return _chunkM6DAIE4Tcjs.getFarmRendererCapabilities.call(void 0, _chunkM6DAIE4Tcjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
2249
2284
  }
2250
2285
  var FARM_RUNTIME_MODULE_PREFIX = "/@farm/runtime/";
2251
2286
  function toFarmRuntimeModuleId(specifier) {
@@ -2276,23 +2311,23 @@ function hasFarmSourceAliasOverride(alias) {
2276
2311
  );
2277
2312
  }
2278
2313
  function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2279
- const rendererDisabled = _chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, options.renderer);
2314
+ const rendererDisabled = _chunkM6DAIE4Tcjs.isFarmRendererDisabled.call(void 0, options.renderer);
2280
2315
  const imageImports = farmImageImportsPlugin();
2281
- const fontImports = _chunkHVMQAVZKcjs.farmFontImportsPlugin.call(void 0, {
2316
+ const fontImports = _chunkCL7BUGVBcjs.farmFontImportsPlugin.call(void 0, {
2282
2317
  root: options.root,
2283
2318
  basePath: options.basePath,
2284
2319
  publicDir: options.publicDir
2285
2320
  });
2286
2321
  let farmApp;
2287
2322
  const isFarmGeneratedOutput = (file) => {
2288
- const root = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _105 => _105.getConfig, 'call', _106 => _106(), 'access', _107 => _107.root]), () => ( options.root));
2323
+ const root = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _106 => _106.getConfig, 'call', _107 => _107(), 'access', _108 => _108.root]), () => ( options.root));
2289
2324
  if (!root) return file.includes("/.farm/");
2290
- const output = _chunkGC5ROI3Acjs.toPosixPath.call(void 0, path6.resolve(root, options.distDir || ".farm"));
2325
+ const output = _chunk7U4XF76Rcjs.toPosixPath.call(void 0, path6.resolve(root, options.distDir || ".farm"));
2291
2326
  return file === output || file.startsWith(`${output}/`);
2292
2327
  };
2293
2328
  let serverFnTransformActive = false;
2294
2329
  const getFarmRenderedServerModules = () => {
2295
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _108 => _108.getRouteManager, 'call', _109 => _109()]);
2330
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _109 => _109.getRouteManager, 'call', _110 => _110()]);
2296
2331
  if (!routeManager) return /* @__PURE__ */ new Set();
2297
2332
  const files = /* @__PURE__ */ new Set();
2298
2333
  for (const entries of [
@@ -2312,10 +2347,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2312
2347
  if (mdxComponents) files.add(mdxComponents);
2313
2348
  return files;
2314
2349
  };
2315
- const islandsServerFns = () => {
2316
- const config = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _110 => _110.getConfig, 'call', _111 => _111()]), () => ( options));
2317
- return _optionalChain([config, 'access', _112 => _112.experimental, 'optionalAccess', _113 => _113.serverActions]) === true && _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _114 => _114.experimental, 'optionalAccess', _115 => _115.serverComponents])) === "islands";
2318
- };
2350
+ const islxActionsMode = () => _chunkCL7BUGVBcjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _111 => _111.getConfig, 'call', _112 => _112()]), () => ( options)));
2351
+ const islandsServerFns = () => _chunkCL7BUGVBcjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _113 => _113.getConfig, 'call', _114 => _114()]), () => ( options)));
2319
2352
  let reactRefreshActive = false;
2320
2353
  let server;
2321
2354
  let deferredGates;
@@ -2344,9 +2377,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2344
2377
  ].join(" ");
2345
2378
  console.log(log);
2346
2379
  };
2347
- const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _116 => _116.getRouteManager, 'call', _117 => _117(), 'access', _118 => _118.getProgrammaticClientRoutes, 'call', _119 => _119()])));
2380
+ const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _115 => _115.getRouteManager, 'call', _116 => _116(), 'access', _117 => _117.getProgrammaticClientRoutes, 'call', _118 => _118()])));
2348
2381
  const isOutsideAppRoot = (file) => {
2349
- const root = _optionalChain([farmApp, 'optionalAccess', _120 => _120.getConfig, 'call', _121 => _121(), 'access', _122 => _122.root]) || _optionalChain([server, 'optionalAccess', _123 => _123.config, 'access', _124 => _124.root]) || options.root;
2382
+ const root = _optionalChain([farmApp, 'optionalAccess', _119 => _119.getConfig, 'call', _120 => _120(), 'access', _121 => _121.root]) || _optionalChain([server, 'optionalAccess', _122 => _122.config, 'access', _123 => _123.root]) || options.root;
2350
2383
  if (!root) return false;
2351
2384
  const relative4 = path6.relative(root, file.split("?", 1)[0]);
2352
2385
  return relative4.startsWith("..") || path6.isAbsolute(relative4);
@@ -2357,15 +2390,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2357
2390
  config(userConfig, configEnv) {
2358
2391
  isBuild = configEnv.command === "build";
2359
2392
  const farmAliases = {
2360
- ..._chunkQMR2TUVZcjs.getFarmLayerAliases.call(void 0, options.layers),
2361
- ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _125 => _125.resolve, 'optionalAccess', _126 => _126.alias])) ? {} : _chunkHVMQAVZKcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2393
+ ..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, options.layers),
2394
+ ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _124 => _124.resolve, 'optionalAccess', _125 => _125.alias])) ? {} : _chunkCL7BUGVBcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2362
2395
  };
2363
2396
  if (Object.keys(farmAliases).length > 0) {
2364
2397
  _nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
2365
- userConfig.resolve.alias = _chunkHVMQAVZKcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2398
+ userConfig.resolve.alias = _chunkCL7BUGVBcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2366
2399
  }
2367
2400
  const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
2368
- farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _127 => _127.server, 'optionalAccess', _128 => _128.cors]) === void 0;
2401
+ farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _126 => _126.server, 'optionalAccess', _127 => _127.cors]) === void 0;
2369
2402
  return {
2370
2403
  // Honor Farm's publicDir so the dev server serves the same static
2371
2404
  // directory the production client build emits.
@@ -2378,13 +2411,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2378
2411
  ...farmOwnsDevCors ? { cors: false } : {},
2379
2412
  fs: {
2380
2413
  ...layerRoots.length ? { allow: [path6.resolve(options.root || process.cwd()), ...layerRoots] } : {},
2381
- deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access', _129 => _129.server, 'optionalAccess', _130 => _130.fs, 'optionalAccess', _131 => _131.deny]), options)
2414
+ deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access', _128 => _128.server, 'optionalAccess', _129 => _129.fs, 'optionalAccess', _130 => _130.deny]), options)
2382
2415
  }
2383
2416
  }
2384
2417
  };
2385
2418
  },
2386
2419
  configEnvironment(name, environmentConfig, env) {
2387
- if (env.command !== "serve" || name !== "ssr" && name !== "rsc" || _optionalChain([environmentConfig, 'access', _132 => _132.dev, 'optionalAccess', _133 => _133.createEnvironment])) {
2420
+ if (env.command !== "serve" || name !== "ssr" && name !== "rsc" || _optionalChain([environmentConfig, 'access', _131 => _131.dev, 'optionalAccess', _132 => _132.createEnvironment])) {
2388
2421
  return;
2389
2422
  }
2390
2423
  return {
@@ -2403,8 +2436,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2403
2436
  (plugin2) => plugin2.name === SERVER_FN_TRANSFORM_PLUGIN
2404
2437
  );
2405
2438
  reactRefreshActive = _chunkY2FEFQAYcjs.isFarmReactRefreshActive.call(void 0, config);
2406
- if (_optionalChain([options, 'access', _134 => _134.experimental, 'optionalAccess', _135 => _135.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
2407
- _chunkGC5ROI3Acjs.logger.warn(
2439
+ if (_optionalChain([options, 'access', _133 => _133.experimental, 'optionalAccess', _134 => _134.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
2440
+ _chunk7U4XF76Rcjs.logger.warn(
2408
2441
  "experimental.serverActions has no effect without @farm.js/plugin/rsc in the Vite plugins. Server functions stay server-only, and importing one from client code is a build error."
2409
2442
  );
2410
2443
  }
@@ -2412,20 +2445,20 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2412
2445
  async configureServer(viteServer) {
2413
2446
  viteServer.middlewares.use(
2414
2447
  createFarmDevPreviewGuard(viteServer, {
2415
- getSourceRoots: () => _chunkQMR2TUVZcjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _136 => _136.getConfig, 'call', _137 => _137()]), () => ( options)))
2448
+ getSourceRoots: () => _chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _135 => _135.getConfig, 'call', _136 => _136()]), () => ( options)))
2416
2449
  })
2417
2450
  );
2418
2451
  if (typeof fontImports.configureServer === "function") {
2419
2452
  await fontImports.configureServer.call(this, viteServer);
2420
2453
  }
2421
2454
  server = viteServer;
2422
- const farmMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _138 => _138.pre, 'access', _139 => _139.target]), () => ( viteServer.middlewares));
2423
- const farmPostMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _140 => _140.post, 'access', _141 => _141.target]), () => ( viteServer.middlewares));
2455
+ const farmMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _137 => _137.pre, 'access', _138 => _138.target]), () => ( viteServer.middlewares));
2456
+ const farmPostMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _139 => _139.post, 'access', _140 => _140.target]), () => ( viteServer.middlewares));
2424
2457
  const pm = initialPluginManager;
2425
2458
  const configRoutePlugins = new Set(
2426
- _optionalChain([pm, 'optionalAccess', _142 => _142.getPlugins, 'call', _143 => _143(), 'access', _144 => _144.filter, 'call', _145 => _145(isFarmConfigRoutePlugin), 'access', _146 => _146.map, 'call', _147 => _147((plugin2) => plugin2.name)])
2459
+ _optionalChain([pm, 'optionalAccess', _141 => _141.getPlugins, 'call', _142 => _142(), 'access', _143 => _143.filter, 'call', _144 => _144(isFarmConfigRoutePlugin), 'access', _145 => _145.map, 'call', _146 => _146((plugin2) => plugin2.name)])
2427
2460
  );
2428
- const configRedirectMatchers = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _148 => _148.getPlugins, 'call', _149 => _149()]), () => ( []))).flatMap((plugin2) => {
2461
+ const configRedirectMatchers = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _147 => _147.getPlugins, 'call', _148 => _148()]), () => ( []))).flatMap((plugin2) => {
2429
2462
  const matcher = _chunkH7OFZJCVcjs.getConfigRedirectMatcher.call(void 0, plugin2);
2430
2463
  return matcher ? [matcher] : [];
2431
2464
  });
@@ -2436,7 +2469,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2436
2469
  } catch (e21) {
2437
2470
  }
2438
2471
  };
2439
- farmApp = new (0, _chunkHVMQAVZKcjs.FarmApp)(
2472
+ farmApp = new (0, _chunkCL7BUGVBcjs.FarmApp)(
2440
2473
  {
2441
2474
  ...options,
2442
2475
  root: resolveDevelopmentRoot(options.root, server.config.root)
@@ -2444,7 +2477,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2444
2477
  server
2445
2478
  );
2446
2479
  farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
2447
- _chunkODYKCC6Wcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2480
+ _chunk46UV2E7Icjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2448
2481
  farmApp.getConfig().root,
2449
2482
  options.distDir || ".farm"
2450
2483
  )
@@ -2453,17 +2486,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2453
2486
  await farmApp.initialize();
2454
2487
  const farmConfig = farmApp.getConfig();
2455
2488
  let farmAppPackages;
2456
- if (_optionalChain([farmConfig, 'access', _150 => _150.agent, 'optionalAccess', _151 => _151.noindexPreviews])) {
2489
+ if (_optionalChain([farmConfig, 'access', _149 => _149.agent, 'optionalAccess', _150 => _150.noindexPreviews])) {
2457
2490
  farmMiddlewares.use((_req, res, next) => {
2458
- if (_chunkFOULIN4Scjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2459
- res.setHeader("X-Robots-Tag", _chunkF4ID7BGOcjs.FARM_PREVIEW_ROBOTS_TAG);
2491
+ if (_chunkADQ2LATRcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2492
+ res.setHeader("X-Robots-Tag", _chunk4OFWG4IKcjs.FARM_PREVIEW_ROBOTS_TAG);
2460
2493
  }
2461
2494
  next();
2462
2495
  });
2463
2496
  }
2464
2497
  const apiServerBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
2465
2498
  const devBuiltInRoutePaths = new Set(
2466
- _chunk5KISFWD2cjs.listFarmBuiltInRoutePaths.call(void 0, {
2499
+ _chunkFYZD7DUScjs.listFarmBuiltInRoutePaths.call(void 0, {
2467
2500
  agent: {
2468
2501
  apiCatalog: true,
2469
2502
  mcp: true,
@@ -2485,15 +2518,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2485
2518
  validateRemoteUrl: createNodeImageUrlValidator(farmConfig.images),
2486
2519
  // Vite owns this address. Unlike request.url, it cannot be replaced by
2487
2520
  // a caller-controlled Host header.
2488
- trustedLocalOrigin: () => _optionalChain([server, 'access', _152 => _152.resolvedUrls, 'optionalAccess', _153 => _153.local, 'access', _154 => _154[0]]),
2521
+ trustedLocalOrigin: () => _optionalChain([server, 'access', _151 => _151.resolvedUrls, 'optionalAccess', _152 => _152.local, 'access', _153 => _153[0]]),
2489
2522
  onError(error) {
2490
- _chunkGC5ROI3Acjs.logger.error(
2523
+ _chunk7U4XF76Rcjs.logger.error(
2491
2524
  `Image optimization failed: ${error instanceof Error ? error.message : String(error)}`
2492
2525
  );
2493
2526
  }
2494
2527
  });
2495
2528
  }
2496
- const sourceRoots = _chunkQMR2TUVZcjs.getFarmSourceRoots.call(void 0, farmConfig);
2529
+ const sourceRoots = _chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, farmConfig);
2497
2530
  server.watcher.add(sourceRoots.map((source) => path6.join(source.root, source.srcDir)));
2498
2531
  if (farmConfig.i18n.enabled) {
2499
2532
  server.watcher.add(
@@ -2505,15 +2538,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2505
2538
  const workflowConfig = farmConfig.workflows;
2506
2539
  const farmDocsDevRuntime = farmConfig.docs.enabled ? await loadFarmDocsDevRuntime() : null;
2507
2540
  const getExtraRouteTypes = () => [
2508
- ..._optionalChain([options, 'access', _155 => _155.openapi, 'optionalAccess', _156 => _156.enabled]) && options.openapi.route ? [options.openapi.route] : [],
2509
- ..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _157 => _157.getFarmDocsRouteTypeEntries, 'call', _158 => _158(farmConfig.docs)]), () => ( []))
2541
+ ..._optionalChain([options, 'access', _154 => _154.openapi, 'optionalAccess', _155 => _155.enabled]) && options.openapi.route ? [options.openapi.route] : [],
2542
+ ..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _156 => _156.getFarmDocsRouteTypeEntries, 'call', _157 => _157(farmConfig.docs)]), () => ( []))
2510
2543
  ];
2511
2544
  const appDirSlugs = sourceRoots.map(
2512
2545
  (source) => path6.join(source.root, source.srcDir, "app").replace(/\\/g, "/")
2513
2546
  );
2514
2547
  const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
2515
2548
  try {
2516
- const result = await _chunkBZJYPIFZcjs.generateFarmTypeArtifacts.call(void 0, {
2549
+ const result = await _chunkOUDNUFVRcjs.generateFarmTypeArtifacts.call(void 0, {
2517
2550
  root: farmConfig.root,
2518
2551
  srcDir: farmConfig.srcDir,
2519
2552
  layers: farmConfig.layers,
@@ -2543,7 +2576,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2543
2576
  }
2544
2577
  } catch (e) {
2545
2578
  const message = e instanceof Error ? e.message : String(e);
2546
- _chunkGC5ROI3Acjs.logger.warn(`Route type generation failed (farm.d.ts may be stale): ${message}`);
2579
+ _chunk7U4XF76Rcjs.logger.warn(`Route type generation failed (farm.d.ts may be stale): ${message}`);
2547
2580
  if (pm) {
2548
2581
  await emitPluginError("type-artifact-generation", e, { reason });
2549
2582
  }
@@ -2554,10 +2587,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2554
2587
  (source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")
2555
2588
  );
2556
2589
  const layerConfigFiles = new Set(
2557
- farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _159 => _159.configFile, 'optionalAccess', _160 => _160.replace, 'call', _161 => _161(/\\/g, "/")])).filter((file) => Boolean(file))
2590
+ farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _158 => _158.configFile, 'optionalAccess', _159 => _159.replace, 'call', _160 => _160(/\\/g, "/")])).filter((file) => Boolean(file))
2558
2591
  );
2559
2592
  const routeModuleExtensions = /* @__PURE__ */ new Set([
2560
- ..._chunk67MZTLTFcjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
2593
+ ..._chunkM6DAIE4Tcjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
2561
2594
  ".md",
2562
2595
  ".mdx"
2563
2596
  ]);
@@ -2580,12 +2613,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2580
2613
  (srcDir) => isPotentialProgrammaticRouteSourceFile(normalized, srcDir)
2581
2614
  );
2582
2615
  };
2583
- const isAppRuntimeFile = (file) => {
2584
- const normalized = file.replace(/\\/g, "/");
2585
- return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/`)) && /\/(?:page|default|layout|loading|error|middleware|route)\.(?:ts|tsx|js|jsx|md|mdx)$|\/(?:sitemap|robots|manifest)\.(?:ts|js)$|\/(?:opengraph-image|twitter-image)(?:\.(?:ts|tsx|js|jsx|png|jpg|jpeg|gif|webp)|\.alt\.txt)$/.test(
2586
- normalized
2587
- );
2588
- };
2616
+ const isAppRuntimeFile = (file) => isFarmAppRuntimeFile(file, appDirSlugs, routeModuleExtensions);
2589
2617
  const isStaticMetadataImageFile = (file) => /\/(?:opengraph-image|twitter-image)(?:\.(?:png|jpg|jpeg|gif|webp)|\.alt\.txt)$/.test(
2590
2618
  file.replace(/\\/g, "/")
2591
2619
  );
@@ -2595,7 +2623,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2595
2623
  let pendingTypeArtifactReason = "";
2596
2624
  let queuedRouteFiles;
2597
2625
  const scheduleTypeArtifactGen = (file, event, selection) => {
2598
- const normalizedFile = _chunkGC5ROI3Acjs.toPosixPath.call(void 0, file);
2626
+ const normalizedFile = _chunk7U4XF76Rcjs.toPosixPath.call(void 0, file);
2599
2627
  for (const [artifact, enabled] of Object.entries(selection)) {
2600
2628
  if (enabled) {
2601
2629
  pendingTypeArtifacts[artifact] = true;
@@ -2632,7 +2660,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2632
2660
  scheduleTypeArtifactGen(file, ev, typeArtifacts);
2633
2661
  }
2634
2662
  if (isI18nCatalogFile(file)) {
2635
- _optionalChain([farmApp, 'optionalAccess', _162 => _162.getI18nRuntime, 'call', _163 => _163(), 'access', _164 => _164.reload, 'call', _165 => _165(), 'access', _166 => _166.then, 'call', _167 => _167(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _168 => _168.catch, 'call', _169 => _169((error) => _chunkGC5ROI3Acjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
2663
+ _optionalChain([farmApp, 'optionalAccess', _161 => _161.getI18nRuntime, 'call', _162 => _162(), 'access', _163 => _163.reload, 'call', _164 => _164(), 'access', _165 => _165.then, 'call', _166 => _166(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _167 => _167.catch, 'call', _168 => _168((error) => _chunk7U4XF76Rcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
2636
2664
  }
2637
2665
  const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
2638
2666
  if (isRouteRefreshEvent) {
@@ -2644,13 +2672,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2644
2672
  queuedRouteFiles = void 0;
2645
2673
  try {
2646
2674
  await Promise.all([
2647
- _optionalChain([refreshRouteDiscovery, 'optionalCall', _170 => _170(`${ev} ${file}`)]),
2648
- [...files].some((path7) => path7.includes("middleware.")) ? _optionalChain([middlewareManager, 'optionalAccess', _171 => _171.reload, 'call', _172 => _172()]) : void 0
2675
+ _optionalChain([refreshRouteDiscovery, 'optionalCall', _169 => _169(`${ev} ${file}`)]),
2676
+ [...files].some((path7) => path7.includes("middleware.")) ? _optionalChain([middlewareManager, 'optionalAccess', _170 => _170.reload, 'call', _171 => _171()]) : void 0
2649
2677
  ]);
2650
2678
  if (pendingRouteReloads.size === 1)
2651
2679
  server.ws.send({ type: "full-reload", path: "*" });
2652
2680
  } catch (error) {
2653
- _chunkGC5ROI3Acjs.logger.warn(
2681
+ _chunk7U4XF76Rcjs.logger.warn(
2654
2682
  `Route refresh failed: ${error instanceof Error ? error.message : String(error)}`
2655
2683
  );
2656
2684
  } finally {
@@ -2662,7 +2690,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2662
2690
  }
2663
2691
  });
2664
2692
  });
2665
- const appDirs = _chunkQMR2TUVZcjs.getFarmAppDirectories.call(void 0, farmConfig);
2693
+ const appDirs = _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, farmConfig);
2666
2694
  const routeManager = farmApp.getRouteManager();
2667
2695
  const discoveredRoutes = [];
2668
2696
  for (const [pattern, entry] of routeManager.getRoutes()) {
@@ -2694,14 +2722,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2694
2722
  const { FARM_DEV_SERVER_MODULE_LOADER } = await import("./internal/native-server-fns.cjs");
2695
2723
  const load = (file) => _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, file);
2696
2724
  globalThis[FARM_DEV_SERVER_MODULE_LOADER] = load;
2697
- _optionalChain([server, 'access', _173 => _173.httpServer, 'optionalAccess', _174 => _174.once, 'call', _175 => _175("close", () => {
2725
+ _optionalChain([server, 'access', _172 => _172.httpServer, 'optionalAccess', _173 => _173.once, 'call', _174 => _174("close", () => {
2698
2726
  const globals = globalThis;
2699
2727
  if (globals[FARM_DEV_SERVER_MODULE_LOADER] === load) {
2700
2728
  delete globals[FARM_DEV_SERVER_MODULE_LOADER];
2701
2729
  }
2702
2730
  })]);
2703
2731
  }
2704
- apiRouteManager = new (0, _chunk5DREJN4Gcjs.APIRouteManager)(appDirs, server, {
2732
+ apiRouteManager = new (0, _chunkLKIG5SM6cjs.APIRouteManager)(appDirs, server, {
2705
2733
  plugins: farmConfig.plugins,
2706
2734
  i18n: farmApp.getI18nRuntime(),
2707
2735
  bodySizeLimit: serverConfig.bodySizeLimit,
@@ -2735,7 +2763,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2735
2763
  loadModule: async (workflow) => _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, workflow.filePath),
2736
2764
  server: farmConfig.server
2737
2765
  });
2738
- _chunkGC5ROI3Acjs.logger.success(`\u2705 Discovered ${discoveredWorkflows.length} Farm workflow task(s)`);
2766
+ _chunk7U4XF76Rcjs.logger.success(`\u2705 Discovered ${discoveredWorkflows.length} Farm workflow task(s)`);
2739
2767
  }
2740
2768
  }
2741
2769
  if (pm) {
@@ -2747,7 +2775,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2747
2775
  });
2748
2776
  }
2749
2777
  }
2750
- middlewareManager = new (0, _chunk4SLHSODZcjs.MiddlewareManager)(
2778
+ middlewareManager = new (0, _chunkVGHDPEPQcjs.MiddlewareManager)(
2751
2779
  appDirs,
2752
2780
  server,
2753
2781
  farmConfig.middleware,
@@ -2768,11 +2796,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2768
2796
  });
2769
2797
  }
2770
2798
  }
2771
- if (_optionalChain([options, 'access', _176 => _176.openapi, 'optionalAccess', _177 => _177.enabled])) {
2799
+ if (_optionalChain([options, 'access', _175 => _175.openapi, 'optionalAccess', _176 => _176.enabled])) {
2772
2800
  const { OpenAPIManager } = await loadFarmOpenAPIDevRuntime();
2773
2801
  openAPIManager = new OpenAPIManager(appDirs, options.openapi, {
2774
2802
  mode: "development",
2775
- apiBaseURL: typeof _optionalChain([options, 'access', _178 => _178.api, 'optionalAccess', _179 => _179.baseURL]) === "string" ? options.api.baseURL : void 0,
2803
+ apiBaseURL: typeof _optionalChain([options, 'access', _177 => _177.api, 'optionalAccess', _178 => _178.baseURL]) === "string" ? options.api.baseURL : void 0,
2776
2804
  routes: () => apiRouteManager.getRoutes().values(),
2777
2805
  loadModule: (filePath) => apiRouteManager.loadModule(filePath)
2778
2806
  });
@@ -2791,7 +2819,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2791
2819
  await openAPIManager.invalidateCache();
2792
2820
  }
2793
2821
  if (process.env.FARM_VERBOSE) {
2794
- _chunkGC5ROI3Acjs.logger.info(`Refreshed routes: ${reason}`);
2822
+ _chunk7U4XF76Rcjs.logger.info(`Refreshed routes: ${reason}`);
2795
2823
  }
2796
2824
  };
2797
2825
  const farmDocsFontAssetList = farmDocsDevRuntime ? _chunkERMUL73Lcjs.resolveFarmDocsFontAssets.call(void 0, farmConfig.root) : [];
@@ -2803,7 +2831,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2803
2831
  return _chunk7EPYN7GWcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
2804
2832
  };
2805
2833
  releaseDocsMCPServers();
2806
- const isFarmDocsPathGuarded = (href) => _chunk6ZFGWB75cjs.farmPathGuardCoversPage.call(void 0,
2834
+ const isFarmDocsPathGuarded = (href) => _chunkOFVCWV2Dcjs.farmPathGuardCoversPage.call(void 0,
2807
2835
  {
2808
2836
  config: farmConfig,
2809
2837
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -2816,20 +2844,20 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2816
2844
  clientEntry: "/@farm/client.js",
2817
2845
  resolveLayoutFonts: resolveDocsLayoutFonts,
2818
2846
  fontStylesheetHref: "/@farm/fonts.css",
2819
- globalStylesheetHref: _chunkHVMQAVZKcjs.resolveDevGlobalStylesheetHref.call(void 0,
2847
+ globalStylesheetHref: _chunkCL7BUGVBcjs.resolveDevGlobalStylesheetHref.call(void 0,
2820
2848
  farmConfig.root,
2821
2849
  farmConfig.srcDir
2822
2850
  ),
2823
2851
  loadModule: async (specifier) => {
2824
2852
  const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
2825
- if (specifier === _optionalChain([farmConfig, 'access', _180 => _180.docs, 'access', _181 => _181.adapter, 'optionalAccess', _182 => _182.server]) && _optionalChain([resolved, 'optionalAccess', _183 => _183.id])) {
2853
+ if (specifier === _optionalChain([farmConfig, 'access', _179 => _179.docs, 'access', _180 => _180.adapter, 'optionalAccess', _181 => _181.server]) && _optionalChain([resolved, 'optionalAccess', _182 => _182.id])) {
2826
2854
  const file = resolved.id.split("?", 1)[0];
2827
2855
  return import(
2828
2856
  /* @vite-ignore */
2829
2857
  _url.pathToFileURL.call(void 0, file).href
2830
2858
  );
2831
2859
  }
2832
- return _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _184 => _184.id]), () => ( specifier)));
2860
+ return _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _183 => _183.id]), () => ( specifier)));
2833
2861
  },
2834
2862
  registerMCPServer: (mcpServer) => {
2835
2863
  const dispose = _chunkRKQOMG2Xcjs.registerFarmMCPServer.call(void 0, mcpServer);
@@ -2847,7 +2875,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2847
2875
  fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
2848
2876
  resolveLayoutFonts: resolveDocsLayoutFonts,
2849
2877
  fontStylesheetHref: "/@farm/fonts.css",
2850
- globalStylesheetHref: _chunkHVMQAVZKcjs.resolveDevGlobalStylesheetHref.call(void 0,
2878
+ globalStylesheetHref: _chunkCL7BUGVBcjs.resolveDevGlobalStylesheetHref.call(void 0,
2851
2879
  farmConfig.root,
2852
2880
  farmConfig.srcDir
2853
2881
  ),
@@ -2855,7 +2883,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2855
2883
  basePath: farmConfig.basePath
2856
2884
  }) : null;
2857
2885
  const farmDocsListsPages = Boolean(
2858
- farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _185 => _185.getPlugins, 'call', _186 => _186(), 'access', _187 => _187.some, 'call', _188 => _188((plugin2) => plugin2.name === "farm:infra-analytics")])
2886
+ farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _184 => _184.getPlugins, 'call', _185 => _185(), 'access', _186 => _186.some, 'call', _187 => _187((plugin2) => plugin2.name === "farm:infra-analytics")])
2859
2887
  );
2860
2888
  let farmDocsPagePaths;
2861
2889
  const getFarmDocsPagePaths = () => {
@@ -2867,7 +2895,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2867
2895
  }).then(
2868
2896
  (pages) => new Set(pages),
2869
2897
  (error) => {
2870
- _chunkGC5ROI3Acjs.logger.warn(
2898
+ _chunk7U4XF76Rcjs.logger.warn(
2871
2899
  `Farm Infra analytics reports docs pages by the docs route, not each page's path: listing them failed (${error instanceof Error ? error.message : String(error)}).`
2872
2900
  );
2873
2901
  return void 0;
@@ -2890,7 +2918,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2890
2918
  server.watcher.add(docsContentDirs);
2891
2919
  for (const event of ["add", "change", "unlink"]) {
2892
2920
  server.watcher.on(event, (file) => {
2893
- const normalizedFile = _chunkGC5ROI3Acjs.toPosixPath.call(void 0, file);
2921
+ const normalizedFile = _chunk7U4XF76Rcjs.toPosixPath.call(void 0, file);
2894
2922
  if (appDirSlugs.some((appDir) => normalizedFile.startsWith(`${appDir}/`))) return;
2895
2923
  const contentDirs = docsContentDirs.filter(
2896
2924
  (contentDir) => farmDocsDevRuntime.isFarmDocsContentFile(contentDir, file)
@@ -2901,7 +2929,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2901
2929
  }
2902
2930
  logUpdate(
2903
2931
  "PAGE",
2904
- `${event === "add" ? "added" : event === "unlink" ? "removed" : "updated"} ${_chunkGC5ROI3Acjs.toPosixPath.call(void 0, path6.relative(farmConfig.root, file))}`
2932
+ `${event === "add" ? "added" : event === "unlink" ? "removed" : "updated"} ${_chunk7U4XF76Rcjs.toPosixPath.call(void 0, path6.relative(farmConfig.root, file))}`
2905
2933
  );
2906
2934
  server.ws.send({ type: "full-reload", path: "*" });
2907
2935
  });
@@ -2954,7 +2982,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2954
2982
  }
2955
2983
  },
2956
2984
  (request) => {
2957
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _189 => _189.getConfig, 'call', _190 => _190()]), () => ( options));
2985
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _188 => _188.getConfig, 'call', _189 => _189()]), () => ( options));
2958
2986
  const currentServerConfig = _chunk7Q7UB4TLcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
2959
2987
  return _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, request, {
2960
2988
  trustProxy: currentServerConfig.trustProxy
@@ -2970,7 +2998,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2970
2998
  withAPIRequestTracing(async function handleFarmDevRequest(req, res, next) {
2971
2999
  const requestUrl = req.url || "/";
2972
3000
  const requestMethod = req.method || "GET";
2973
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _191 => _191.getConfig, 'call', _192 => _192()]), () => ( options));
3001
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _190 => _190.getConfig, 'call', _191 => _191()]), () => ( options));
2974
3002
  const currentServerConfig = _chunk7Q7UB4TLcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
2975
3003
  const parsedRequestUrl = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, {
2976
3004
  trustProxy: currentServerConfig.trustProxy
@@ -3015,7 +3043,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3015
3043
  if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkY3DO7BIJcjs.FARM_VIDEO_PLAYER_PATH) {
3016
3044
  res.statusCode = 200;
3017
3045
  res.setHeader("Content-Type", "text/html; charset=utf-8");
3018
- res.end(requestMethod === "HEAD" ? void 0 : _chunkHVMQAVZKcjs.FARM_VIDEO_PLAYER_HTML);
3046
+ res.end(requestMethod === "HEAD" ? void 0 : _chunkCL7BUGVBcjs.FARM_VIDEO_PLAYER_HTML);
3019
3047
  return;
3020
3048
  }
3021
3049
  const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
@@ -3070,7 +3098,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3070
3098
  openapi: options.openapi
3071
3099
  },
3072
3100
  workflows: discoveredWorkflows,
3073
- plugins: _optionalChain([pm, 'optionalAccess', _193 => _193.getSortedPlugins, 'call', _194 => _194()])
3101
+ plugins: _optionalChain([pm, 'optionalAccess', _192 => _192.getSortedPlugins, 'call', _193 => _193()])
3074
3102
  });
3075
3103
  res.statusCode = 200;
3076
3104
  res.setHeader(
@@ -3083,7 +3111,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3083
3111
  } else {
3084
3112
  if (!warnedDeprecatedDevtoolsDashboard) {
3085
3113
  warnedDeprecatedDevtoolsDashboard = true;
3086
- _chunkGC5ROI3Acjs.logger.warn(
3114
+ _chunk7U4XF76Rcjs.logger.warn(
3087
3115
  "The built-in DevTools dashboard is deprecated. Install @farm.js/devtools and add devtools() to plugins in farm.config.ts."
3088
3116
  );
3089
3117
  }
@@ -3094,7 +3122,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3094
3122
  }
3095
3123
  const isViteOwnedRequest = () => requestUrl.startsWith("/@") || requestUrl.startsWith("/node_modules/") || requestUrl.startsWith("/__farm/") || isViteModuleRequest(parsedRequestUrl, req.headers) || (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname.includes(".") && (devServableFileExists(requestPathname, [server.config.publicDir]) || isViteDevClientRequest(parsedRequestUrl, req.headers) && devServableFileExists(requestPathname, [server.config.root]));
3096
3124
  const configRewriteSource = req[FARM_DEV_CONFIG_REWRITE_SOURCE];
3097
- const runtimeHookErrorAnswersJSON = rendererDisabled || _chunk4VLXQ55Ocjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath);
3125
+ const runtimeHookErrorAnswersJSON = rendererDisabled || _chunkWIZRYFB2cjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath);
3098
3126
  const requestedPagePathname = configRewriteSource === void 0 ? requestPathname : new URL(configRewriteSource).pathname;
3099
3127
  let pageHookRouteMatch;
3100
3128
  const pageHookRoute = () => {
@@ -3105,10 +3133,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3105
3133
  render: {
3106
3134
  pathname: pathname2,
3107
3135
  method: requestMethod,
3108
- routePattern: _optionalChain([match, 'optionalAccess', _195 => _195.route, 'optionalAccess', _196 => _196.pattern]) || null,
3109
- params: _optionalChain([match, 'optionalAccess', _197 => _197.params]) || {}
3136
+ routePattern: _optionalChain([match, 'optionalAccess', _194 => _194.route, 'optionalAccess', _195 => _195.pattern]) || null,
3137
+ params: _optionalChain([match, 'optionalAccess', _196 => _196.params]) || {}
3110
3138
  },
3111
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _198 => _198.layouts]) || []).map((layout) => layout.pattern)
3139
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _197 => _197.layouts]) || []).map((layout) => layout.pattern)
3112
3140
  };
3113
3141
  return pageHookRouteMatch;
3114
3142
  };
@@ -3175,7 +3203,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3175
3203
  const redirectResponse = response;
3176
3204
  try {
3177
3205
  const metadataRoute = matchAppMetadataRoute(requestPathname);
3178
- const kind = metadataRoute ? "asset" : _chunk4VLXQ55Ocjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath) ? "api" : requestMethod === "GET" || requestMethod === "HEAD" ? "page" : "request";
3206
+ const kind = metadataRoute ? "asset" : _chunkWIZRYFB2cjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath) ? "api" : requestMethod === "GET" || requestMethod === "HEAD" ? "page" : "request";
3179
3207
  response = await pm.runRuntimeRequest(
3180
3208
  createRequestFromNodeRequest(req, parsedRequestUrl),
3181
3209
  async () => {
@@ -3196,7 +3224,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3196
3224
  }
3197
3225
  }
3198
3226
  const runAppMiddlewareForContentRoute = async () => {
3199
- if (!_optionalChain([middlewareManager, 'optionalAccess', _199 => _199.hasMiddleware, 'call', _200 => _200()])) return false;
3227
+ if (!_optionalChain([middlewareManager, 'optionalAccess', _198 => _198.hasMiddleware, 'call', _199 => _199()])) return false;
3200
3228
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
3201
3229
  return runFarmMiddlewareWithNavigation(
3202
3230
  farmApp.getServerRenderer(),
@@ -3234,7 +3262,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3234
3262
  return response.status;
3235
3263
  };
3236
3264
  const runAppMiddlewareInRuntimeSession = async (runtimeSession2, logResponse2) => {
3237
- const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _201 => _201.hasRuntimeHook, 'call', _202 => _202("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _203 => _203.hasMiddleware, 'call', _204 => _204()]) ? interceptFarmDevPageResponse({
3265
+ const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _200 => _200.hasRuntimeHook, 'call', _201 => _201("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _202 => _202.hasMiddleware, 'call', _203 => _203()]) ? interceptFarmDevPageResponse({
3238
3266
  req,
3239
3267
  res,
3240
3268
  pm,
@@ -3247,7 +3275,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3247
3275
  urlPath: requestUrl,
3248
3276
  pathname: requestPathname,
3249
3277
  startTime: Date.now(),
3250
- logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _205 => _205(status)]),
3278
+ logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _204 => _204(status)]),
3251
3279
  // The runtime reports a runtime.after failure itself.
3252
3280
  emitError: async () => {
3253
3281
  },
@@ -3258,7 +3286,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3258
3286
  handled = await runAppMiddlewareForContentRoute();
3259
3287
  } catch (error) {
3260
3288
  if (runtimeHookErrorAnswersJSON || res.headersSent) {
3261
- _optionalChain([interceptor, 'optionalAccess', _206 => _206.release, 'call', _207 => _207()]);
3289
+ _optionalChain([interceptor, 'optionalAccess', _205 => _205.release, 'call', _206 => _206()]);
3262
3290
  throw error;
3263
3291
  }
3264
3292
  if (runtimeSession2) await pm.reportRuntimeRequestError(runtimeSession2, error);
@@ -3266,10 +3294,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3266
3294
  return true;
3267
3295
  }
3268
3296
  if (!handled) {
3269
- _optionalChain([interceptor, 'optionalAccess', _208 => _208.release, 'call', _209 => _209()]);
3297
+ _optionalChain([interceptor, 'optionalAccess', _207 => _207.release, 'call', _208 => _208()]);
3270
3298
  return false;
3271
3299
  }
3272
- if (!_optionalChain([interceptor, 'optionalAccess', _210 => _210.isEnded, 'call', _211 => _211()])) _optionalChain([logResponse2, 'optionalCall', _212 => _212(res.statusCode || 200)]);
3300
+ if (!_optionalChain([interceptor, 'optionalAccess', _209 => _209.isEnded, 'call', _210 => _210()])) _optionalChain([logResponse2, 'optionalCall', _211 => _211(res.statusCode || 200)]);
3273
3301
  return true;
3274
3302
  };
3275
3303
  const serveBuiltInRoute = async (respond, {
@@ -3278,7 +3306,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3278
3306
  label
3279
3307
  } = {}) => {
3280
3308
  const discard = async () => {
3281
- await _optionalChain([computed, 'optionalAccess', _213 => _213.body, 'optionalAccess', _214 => _214.cancel, 'call', _215 => _215(), 'access', _216 => _216.catch, 'call', _217 => _217(() => {
3309
+ await _optionalChain([computed, 'optionalAccess', _212 => _212.body, 'optionalAccess', _213 => _213.cancel, 'call', _214 => _214(), 'access', _215 => _215.catch, 'call', _216 => _216(() => {
3282
3310
  })]);
3283
3311
  };
3284
3312
  const sendRuntimeResponse = async (runtimeSession3, response2) => {
@@ -3295,9 +3323,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3295
3323
  if (pm && opensFarmDevRuntimeSession(pm)) {
3296
3324
  try {
3297
3325
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
3298
- const route = _chunk5KISFWD2cjs.setFarmRouteLabel.call(void 0,
3326
+ const route = _chunkFYZD7DUScjs.setFarmRouteLabel.call(void 0,
3299
3327
  { pathname: requestPathname },
3300
- label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunk5KISFWD2cjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3328
+ label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkFYZD7DUScjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3301
3329
  );
3302
3330
  runtimeSession2 = await pm.beginRuntimeRequest(
3303
3331
  createRequestFromNodeRequest(req, new URL(fullUrl)),
@@ -3335,11 +3363,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3335
3363
  }
3336
3364
  responding = true;
3337
3365
  response = await respond(
3338
- _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _218 => _218.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3366
+ _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _217 => _217.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3339
3367
  );
3340
3368
  } catch (error) {
3341
3369
  if (!responding && !res.headersSent) {
3342
- _chunkGC5ROI3Acjs.logger.error(`Middleware error: ${error}`);
3370
+ _chunk7U4XF76Rcjs.logger.error(`Middleware error: ${error}`);
3343
3371
  await discard();
3344
3372
  await sendMiddlewareErrorJSON(runtimeSession2, error);
3345
3373
  return;
@@ -3355,7 +3383,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3355
3383
  else await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
3356
3384
  };
3357
3385
  const openAPIRequestPathname = openAPIManager ? _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
3358
- if (openAPIManager && _optionalChain([options, 'access', _219 => _219.openapi, 'optionalAccess', _220 => _220.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3386
+ if (openAPIManager && _optionalChain([options, 'access', _218 => _218.openapi, 'optionalAccess', _219 => _219.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3359
3387
  const specManager = openAPIManager;
3360
3388
  await serveBuiltInRoute(async () => {
3361
3389
  if (requestMethod !== "GET" && requestMethod !== "HEAD") {
@@ -3375,7 +3403,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3375
3403
  });
3376
3404
  return;
3377
3405
  }
3378
- if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _221 => _221.openapi, 'optionalAccess', _222 => _222.route])) {
3406
+ if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _220 => _220.openapi, 'optionalAccess', _221 => _221.route])) {
3379
3407
  const docsManager = openAPIManager;
3380
3408
  await serveBuiltInRoute(
3381
3409
  async () => {
@@ -3386,8 +3414,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3386
3414
  );
3387
3415
  return;
3388
3416
  }
3389
- if (_optionalChain([options, 'access', _223 => _223.agent, 'optionalAccess', _224 => _224.manifest]) !== false && _chunk5KISFWD2cjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3390
- const manifestGuardCoversPath = (path7) => _chunk6ZFGWB75cjs.farmPathGuardCoversEndpoint.call(void 0,
3417
+ if (_optionalChain([options, 'access', _222 => _222.agent, 'optionalAccess', _223 => _223.manifest]) !== false && _chunkFYZD7DUScjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3418
+ const manifestGuardCoversPath = (path7) => _chunkOFVCWV2Dcjs.farmPathGuardCoversEndpoint.call(void 0,
3391
3419
  {
3392
3420
  config: farmConfig,
3393
3421
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -3396,25 +3424,25 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3396
3424
  apiServerBasePath
3397
3425
  );
3398
3426
  await serveBuiltInRoute(async () => {
3399
- _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkHVMQAVZKcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3400
- const manifest = await _chunk5KISFWD2cjs.createFarmAppManifestResponse.call(void 0,
3427
+ _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkCL7BUGVBcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3428
+ const manifest = await _chunkFYZD7DUScjs.createFarmAppManifestResponse.call(void 0,
3401
3429
  new Request(parsedRequestUrl, {
3402
3430
  method: requestMethod,
3403
3431
  headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
3404
3432
  }),
3405
3433
  {
3406
- ..._chunk5KISFWD2cjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3434
+ ..._chunkFYZD7DUScjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3407
3435
  build: "development",
3408
3436
  packages: farmAppPackages,
3409
3437
  // Read again on each request; unchanged files come from a cache.
3410
- webmcpTools: _optionalChain([farmConfig, 'access', _225 => _225.plugins, 'optionalAccess', _226 => _226.some, 'call', _227 => _227(({ name }) => name === "farm:webmcp")]) ? _chunkHVMQAVZKcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3438
+ webmcpTools: _optionalChain([farmConfig, 'access', _224 => _224.plugins, 'optionalAccess', _225 => _225.some, 'call', _226 => _226(({ name }) => name === "farm:webmcp")]) ? _chunkCL7BUGVBcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3411
3439
  }),
3412
3440
  defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
3413
3441
  // A guard written for an MCP server's path keeps its tools out of the public view.
3414
3442
  guardCoversPath: manifestGuardCoversPath,
3415
3443
  // A docs runtime's MCP server lists its tools when asked, read on each request.
3416
3444
  ...farmDocsHandler ? {
3417
- registeredMCP: (request) => _chunkVJ6L7TIIcjs._listFarmRegisteredMCPServerTools.call(void 0, farmDocsHandler, request, {
3445
+ registeredMCP: (request) => _chunk3SPECQXIcjs._listFarmRegisteredMCPServerTools.call(void 0, farmDocsHandler, request, {
3418
3446
  basePath: farmConfig.basePath,
3419
3447
  guardCoversPath: manifestGuardCoversPath
3420
3448
  })
@@ -3425,11 +3453,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3425
3453
  });
3426
3454
  return;
3427
3455
  }
3428
- if (_optionalChain([options, 'access', _228 => _228.agent, 'optionalAccess', _229 => _229.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunk5KISFWD2cjs.FARM_API_CATALOG_PATH) {
3456
+ if (_optionalChain([options, 'access', _227 => _227.agent, 'optionalAccess', _228 => _228.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkFYZD7DUScjs.FARM_API_CATALOG_PATH) {
3429
3457
  await serveBuiltInRoute(
3430
- () => _chunk5KISFWD2cjs.createFarmApiCatalogResponse.call(void 0,
3458
+ () => _chunkFYZD7DUScjs.createFarmApiCatalogResponse.call(void 0,
3431
3459
  requestMethod,
3432
- _chunk5KISFWD2cjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3460
+ _chunkFYZD7DUScjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3433
3461
  new Request(parsedRequestUrl, {
3434
3462
  headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
3435
3463
  })
@@ -3437,8 +3465,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3437
3465
  );
3438
3466
  return;
3439
3467
  }
3440
- if (_optionalChain([options, 'access', _230 => _230.agent, 'optionalAccess', _231 => _231.aiCatalog]) !== false) {
3441
- const aiCatalog = _chunk5KISFWD2cjs.createFarmAiCatalogResponse.call(void 0,
3468
+ if (_optionalChain([options, 'access', _229 => _229.agent, 'optionalAccess', _230 => _230.aiCatalog]) !== false) {
3469
+ const aiCatalog = _chunkFYZD7DUScjs.createFarmAiCatalogResponse.call(void 0,
3442
3470
  new Request(parsedRequestUrl, {
3443
3471
  method: requestMethod,
3444
3472
  headers: {
@@ -3480,13 +3508,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3480
3508
  });
3481
3509
  const docsBodyInit = requestMethod === "GET" || requestMethod === "HEAD" ? {} : { body: _chunk7Q7UB4TLcjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" };
3482
3510
  const docsHandlerRequest = new Request(docsRequest, docsBodyInit);
3483
- const registeredMCPCalls = await _chunkVJ6L7TIIcjs._readFarmRegisteredMCPCalls.call(void 0,
3511
+ const registeredMCPCalls = await _chunk3SPECQXIcjs._readFarmRegisteredMCPCalls.call(void 0,
3484
3512
  docsHandlerRequest,
3485
3513
  farmConfig.basePath
3486
3514
  );
3487
3515
  const docsResponse = await farmDocsHandler(docsHandlerRequest);
3488
3516
  if (docsResponse) {
3489
- const docsPage = _optionalChain([docsResponse, 'access', _232 => _232.headers, 'access', _233 => _233.get, 'call', _234 => _234("content-type"), 'optionalAccess', _235 => _235.toLowerCase, 'call', _236 => _236(), 'access', _237 => _237.includes, 'call', _238 => _238("text/html")]);
3517
+ const docsPage = _optionalChain([docsResponse, 'access', _231 => _231.headers, 'access', _232 => _232.get, 'call', _233 => _233("content-type"), 'optionalAccess', _234 => _234.toLowerCase, 'call', _235 => _235(), 'access', _236 => _236.includes, 'call', _237 => _237("text/html")]);
3490
3518
  await serveBuiltInRoute(
3491
3519
  async (request) => {
3492
3520
  if (!docsPage) {
@@ -3496,7 +3524,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3496
3524
  );
3497
3525
  return _chunk2RSVYJT6cjs._runWithCurrentRequest.call(void 0,
3498
3526
  request,
3499
- () => _chunkVJ6L7TIIcjs._observeFarmRegisteredMCPResponse.call(void 0, response, registeredMCPCalls)
3527
+ () => _chunk3SPECQXIcjs._observeFarmRegisteredMCPResponse.call(void 0, response, registeredMCPCalls)
3500
3528
  );
3501
3529
  }
3502
3530
  const deploymentMismatch = _chunkNLBHLPEOcjs.getFarmDeploymentMismatch.call(void 0,
@@ -3504,7 +3532,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3504
3532
  farmConfig.deploymentId
3505
3533
  );
3506
3534
  if (deploymentMismatch) {
3507
- await _optionalChain([docsResponse, 'access', _239 => _239.body, 'optionalAccess', _240 => _240.cancel, 'call', _241 => _241()]);
3535
+ await _optionalChain([docsResponse, 'access', _238 => _238.body, 'optionalAccess', _239 => _239.cancel, 'call', _240 => _240()]);
3508
3536
  return _chunkNLBHLPEOcjs.createFarmDeploymentMismatchResponse.call(void 0, deploymentMismatch);
3509
3537
  }
3510
3538
  return _chunkNLBHLPEOcjs.withFarmDeploymentResponse.call(void 0,
@@ -3520,11 +3548,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3520
3548
  {
3521
3549
  kind: "docs",
3522
3550
  computed: docsResponse,
3523
- label: _chunk5KISFWD2cjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3551
+ label: _chunkFYZD7DUScjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3524
3552
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
3525
3553
  {
3526
- path: _optionalChain([farmConfig, 'access', _242 => _242.docs, 'optionalAccess', _243 => _243.entry]) || "/docs",
3527
- roots: _optionalChain([farmConfig, 'access', _244 => _244.docs, 'optionalAccess', _245 => _245.roots, 'optionalAccess', _246 => _246.map, 'call', _247 => _247((root) => root.entry)]),
3554
+ path: _optionalChain([farmConfig, 'access', _241 => _241.docs, 'optionalAccess', _242 => _242.entry]) || "/docs",
3555
+ roots: _optionalChain([farmConfig, 'access', _243 => _243.docs, 'optionalAccess', _244 => _244.roots, 'optionalAccess', _245 => _245.map, 'call', _246 => _246((root) => root.entry)]),
3528
3556
  pages: await getFarmDocsPagePaths()
3529
3557
  }
3530
3558
  )
@@ -3533,8 +3561,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3533
3561
  return;
3534
3562
  }
3535
3563
  }
3536
- if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _248 => _248.headers, 'access', _249 => _249.accept, 'optionalAccess', _250 => _250.includes, 'call', _251 => _251(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
3537
- const { createFarmNativeTreeResponse } = await import("./native-tree-MNUFN5G6.cjs");
3564
+ if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _247 => _247.headers, 'access', _248 => _248.accept, 'optionalAccess', _249 => _249.includes, 'call', _250 => _250(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
3565
+ const { createFarmNativeTreeResponse } = await import("./native-tree-5TENEQ7Y.cjs");
3538
3566
  const treeBodyInit = requestMethod === "POST" ? { body: _chunk7Q7UB4TLcjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" } : {};
3539
3567
  const treeResponse = await createFarmNativeTreeResponse({
3540
3568
  request: new Request(fullUrl, {
@@ -3551,18 +3579,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3551
3579
  });
3552
3580
  await serveBuiltInRoute(() => treeResponse, {
3553
3581
  computed: treeResponse,
3554
- label: _nullishCoalesce(_optionalChain([farmApp, 'access', _252 => _252.getRouteManager, 'call', _253 => _253(), 'access', _254 => _254.matchRoute, 'call', _255 => _255(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _256 => _256.route, 'optionalAccess', _257 => _257.pattern]), () => ( null))
3582
+ label: _nullishCoalesce(_optionalChain([farmApp, 'access', _251 => _251.getRouteManager, 'call', _252 => _252(), 'access', _253 => _253.matchRoute, 'call', _254 => _254(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _255 => _255.route, 'optionalAccess', _256 => _256.pattern]), () => ( null))
3555
3583
  });
3556
3584
  return;
3557
3585
  }
3558
3586
  const markdownRouteLabel = () => (
3559
3587
  // On the route path, as production labels it: /fr/index.md is /index.md.
3560
- _chunk5KISFWD2cjs.resolveFarmMarkdownRouteLabel.call(void 0,
3588
+ _chunkFYZD7DUScjs.resolveFarmMarkdownRouteLabel.call(void 0,
3561
3589
  toRoutePathname(requestPathname),
3562
- (page) => _optionalChain([farmApp, 'access', _258 => _258.getRouteManager, 'call', _259 => _259(), 'access', _260 => _260.matchRoute, 'call', _261 => _261(page), 'access', _262 => _262.route, 'optionalAccess', _263 => _263.pattern])
3590
+ (page) => _optionalChain([farmApp, 'access', _257 => _257.getRouteManager, 'call', _258 => _258(), 'access', _259 => _259.matchRoute, 'call', _260 => _260(page), 'access', _261 => _261.route, 'optionalAccess', _262 => _262.pattern])
3563
3591
  )
3564
3592
  );
3565
- const markdownSourceResponse = viteModuleRequest ? null : await _chunkPG7J7XYTcjs.createFarmMarkdownSourceResponse.call(void 0, {
3593
+ const markdownSourceResponse = viteModuleRequest ? null : await _chunk26WP75W5cjs.createFarmMarkdownSourceResponse.call(void 0, {
3566
3594
  request: new Request(fullUrl, {
3567
3595
  method: requestMethod,
3568
3596
  headers: docsHeaders
@@ -3571,14 +3599,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3571
3599
  routePathname: toRoutePathname,
3572
3600
  resolveSource: async (pathname2) => {
3573
3601
  const match = farmApp.getRouteManager().matchRoute(pathname2);
3574
- const sourcePath = _optionalChain([match, 'access', _264 => _264.route, 'optionalAccess', _265 => _265.markdownSourcePath]) || (match.route && _chunkPG7J7XYTcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
3602
+ const sourcePath = _optionalChain([match, 'access', _263 => _263.route, 'optionalAccess', _264 => _264.markdownSourcePath]) || (match.route && _chunk26WP75W5cjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
3575
3603
  if (!sourcePath) {
3576
3604
  return null;
3577
3605
  }
3578
3606
  return {
3579
3607
  source: await fs2.promises.readFile(sourcePath, "utf8"),
3580
3608
  // Project-relative, as production sends it: never the machine's path.
3581
- filePath: _chunkHVMQAVZKcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3609
+ filePath: _chunkCL7BUGVBcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3582
3610
  };
3583
3611
  },
3584
3612
  // The anonymous check goes through this server, so its guards and
@@ -3604,7 +3632,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3604
3632
  });
3605
3633
  return;
3606
3634
  }
3607
- const markdownResponse = viteModuleRequest ? null : await _chunk2YJ4DHTDcjs.createMarkdownMirrorResponse.call(void 0, {
3635
+ const markdownResponse = viteModuleRequest ? null : await _chunk2NOHVIJ3cjs.createMarkdownMirrorResponse.call(void 0, {
3608
3636
  request: new Request(fullUrl, {
3609
3637
  method: requestMethod,
3610
3638
  headers: docsHeaders
@@ -3643,16 +3671,16 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3643
3671
  });
3644
3672
  return;
3645
3673
  }
3646
- if (!viteModuleRequest && _chunk2YJ4DHTDcjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
3647
- const markdownRoute = farmApp.getRouteManager().matchRoute(_chunkPG7J7XYTcjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname, toRoutePathname));
3674
+ if (!viteModuleRequest && _chunk2NOHVIJ3cjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
3675
+ const markdownRoute = farmApp.getRouteManager().matchRoute(_chunk26WP75W5cjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname, toRoutePathname));
3648
3676
  if (!markdownRoute.route) {
3649
3677
  await serveBuiltInRoute(
3650
3678
  () => new Response(
3651
- _chunk2YJ4DHTDcjs.createFarmMarkdownErrorBody.call(void 0, 404, requestPathname, farmConfig.basePath || "/"),
3679
+ _chunk2NOHVIJ3cjs.createFarmMarkdownErrorBody.call(void 0, 404, requestPathname, farmConfig.basePath || "/"),
3652
3680
  {
3653
3681
  status: 404,
3654
3682
  headers: {
3655
- "Content-Type": _chunk2YJ4DHTDcjs.FARM_MARKDOWN_CONTENT_TYPE,
3683
+ "Content-Type": _chunk2NOHVIJ3cjs.FARM_MARKDOWN_CONTENT_TYPE,
3656
3684
  "X-Farm-Markdown-Error": "404",
3657
3685
  "Cache-Control": "no-store"
3658
3686
  }
@@ -3662,7 +3690,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3662
3690
  return;
3663
3691
  }
3664
3692
  }
3665
- const markdownPageTarget = _chunk2YJ4DHTDcjs.resolveMarkdownMirrorTarget.call(void 0,
3693
+ const markdownPageTarget = _chunk2NOHVIJ3cjs.resolveMarkdownMirrorTarget.call(void 0,
3666
3694
  farmApp.getConfig().md,
3667
3695
  requestPathname,
3668
3696
  {
@@ -3713,7 +3741,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3713
3741
  }
3714
3742
  const configuredIntegrations = currentConfig.integrations;
3715
3743
  const tryConfiguredIntegrationRoute = async () => {
3716
- const matchedRoute = _chunkAOTD2N5Pcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3744
+ const matchedRoute = _chunkWGWWRV2Mcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3717
3745
  pathname: requestPathname,
3718
3746
  method: requestMethod
3719
3747
  });
@@ -3727,8 +3755,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3727
3755
  await pm.runHookParallelFiltered(
3728
3756
  "beforeRequest",
3729
3757
  (plugin2) => {
3730
- const owner = _chunkAOTD2N5Pcjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
3731
- return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _266 => _266.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3758
+ const owner = _chunkWGWWRV2Mcjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
3759
+ return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _265 => _265.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3732
3760
  },
3733
3761
  req,
3734
3762
  res
@@ -3757,7 +3785,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3757
3785
  });
3758
3786
  const dispatchIntegration = async (request, runtime) => {
3759
3787
  try {
3760
- const result = await _chunkAOTD2N5Pcjs.dispatchIntegrationRequest.call(void 0,
3788
+ const result = await _chunkWGWWRV2Mcjs.dispatchIntegrationRequest.call(void 0,
3761
3789
  {
3762
3790
  integration: matchedRoute.integration,
3763
3791
  config: currentConfig,
@@ -3765,16 +3793,16 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3765
3793
  isProd: false
3766
3794
  },
3767
3795
  request,
3768
- { clientAddress: _optionalChain([req, 'access', _267 => _267.socket, 'optionalAccess', _268 => _268.remoteAddress]) }
3796
+ { clientAddress: _optionalChain([req, 'access', _266 => _266.socket, 'optionalAccess', _267 => _267.remoteAddress]) }
3769
3797
  );
3770
3798
  if (!result) {
3771
3799
  throw new Error(`Matched integration route did not return a response`);
3772
3800
  }
3773
3801
  return result;
3774
3802
  } catch (error) {
3775
- _chunkGC5ROI3Acjs.logger.error(`Integration route error: ${error}`);
3776
- await _optionalChain([runtime, 'optionalAccess', _269 => _269.reportError, 'call', _270 => _270(error)]);
3777
- return _chunk4VLXQ55Ocjs.createFarmInternalServerErrorResponse.call(void 0, );
3803
+ _chunk7U4XF76Rcjs.logger.error(`Integration route error: ${error}`);
3804
+ await _optionalChain([runtime, 'optionalAccess', _268 => _268.reportError, 'call', _269 => _269(error)]);
3805
+ return _chunkWIZRYFB2cjs.createFarmInternalServerErrorResponse.call(void 0, );
3778
3806
  }
3779
3807
  };
3780
3808
  runtimeReportsErrors = Boolean(pm);
@@ -3808,14 +3836,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3808
3836
  integration: matchedRoute.key
3809
3837
  });
3810
3838
  }
3811
- _chunkGC5ROI3Acjs.logger.error(`Integration route error: ${error}`);
3839
+ _chunk7U4XF76Rcjs.logger.error(`Integration route error: ${error}`);
3812
3840
  if (runtimeReportsErrors) {
3813
3841
  if (!res.headersSent) sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
3814
3842
  else if (!res.writableEnded) res.end();
3815
3843
  } else if (!res.writableEnded) {
3816
3844
  res.statusCode = 500;
3817
3845
  res.setHeader("Content-Type", "application/json");
3818
- res.end(_chunk4VLXQ55Ocjs.FARM_INTERNAL_SERVER_ERROR_BODY);
3846
+ res.end(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
3819
3847
  }
3820
3848
  return true;
3821
3849
  }
@@ -3824,10 +3852,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3824
3852
  const hasLocalDevRoute = () => {
3825
3853
  const routeManager3 = farmApp.getRouteManager();
3826
3854
  return Boolean(
3827
- _chunkAOTD2N5Pcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3855
+ _chunkWGWWRV2Mcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3828
3856
  pathname: requestPathname,
3829
3857
  method: requestMethod
3830
- }) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _271 => _271.isFarmDocsAPIRequest, 'call', _272 => _272(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
3858
+ }) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _270 => _270.isFarmDocsAPIRequest, 'call', _271 => _271(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
3831
3859
  );
3832
3860
  };
3833
3861
  try {
@@ -3861,7 +3889,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3861
3889
  }
3862
3890
  const matchedApiRoute = apiRouteManager.matchRoute(requestPathname);
3863
3891
  const hasMatchedApiRoute = Boolean(matchedApiRoute);
3864
- if (hasMatchedApiRoute || _chunk4VLXQ55Ocjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath)) {
3892
+ if (hasMatchedApiRoute || _chunkWIZRYFB2cjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath)) {
3865
3893
  const startTime2 = Date.now();
3866
3894
  const method2 = req.method || "GET";
3867
3895
  const urlPath2 = req.url || "/";
@@ -3887,10 +3915,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3887
3915
  urlPath: urlPath2,
3888
3916
  method: method2
3889
3917
  });
3890
- _chunkGC5ROI3Acjs.logger.error(`Request hook error: ${error}`);
3918
+ _chunk7U4XF76Rcjs.logger.error(`Request hook error: ${error}`);
3891
3919
  res.statusCode = 500;
3892
3920
  res.setHeader("Content-Type", "application/json");
3893
- res.end(_chunk4VLXQ55Ocjs.FARM_INTERNAL_SERVER_ERROR_BODY);
3921
+ res.end(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
3894
3922
  return;
3895
3923
  }
3896
3924
  const createAPIRequest = async () => {
@@ -3917,15 +3945,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3917
3945
  );
3918
3946
  };
3919
3947
  const isDocsAPIRequest = Boolean(
3920
- farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _273 => _273.isFarmDocsAPIRequest, 'call', _274 => _274(pathname2)])
3948
+ farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _272 => _272.isFarmDocsAPIRequest, 'call', _273 => _273(pathname2)])
3921
3949
  );
3922
3950
  const docsRuntimeOptions = () => ({
3923
3951
  kind: "docs",
3924
- route: _chunk5KISFWD2cjs.setFarmRouteLabel.call(void 0,
3952
+ route: _chunkFYZD7DUScjs.setFarmRouteLabel.call(void 0,
3925
3953
  { pathname: pathname2, pattern: urlPath2 },
3926
- _chunk5KISFWD2cjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
3927
- path: _optionalChain([farmConfig, 'access', _275 => _275.docs, 'optionalAccess', _276 => _276.entry]) || "/docs",
3928
- roots: _optionalChain([farmConfig, 'access', _277 => _277.docs, 'optionalAccess', _278 => _278.roots, 'optionalAccess', _279 => _279.map, 'call', _280 => _280((root) => root.entry)])
3954
+ _chunkFYZD7DUScjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
3955
+ path: _optionalChain([farmConfig, 'access', _274 => _274.docs, 'optionalAccess', _275 => _275.entry]) || "/docs",
3956
+ roots: _optionalChain([farmConfig, 'access', _276 => _276.docs, 'optionalAccess', _277 => _277.roots, 'optionalAccess', _278 => _278.map, 'call', _279 => _279((root) => root.entry)])
3929
3957
  })
3930
3958
  )
3931
3959
  });
@@ -3962,7 +3990,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3962
3990
  await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
3963
3991
  return;
3964
3992
  }
3965
- _chunkGC5ROI3Acjs.logger.error(`API route error: ${error}`);
3993
+ _chunk7U4XF76Rcjs.logger.error(`API route error: ${error}`);
3966
3994
  sendFarmDevRuntimeHookError(res, true);
3967
3995
  return;
3968
3996
  }
@@ -3982,7 +4010,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3982
4010
  if (runtimeSession2) await pm.failRuntimeRequest(runtimeSession2, error);
3983
4011
  throw error;
3984
4012
  }
3985
- _chunkGC5ROI3Acjs.logger.error(`Middleware error: ${error}`);
4013
+ _chunk7U4XF76Rcjs.logger.error(`Middleware error: ${error}`);
3986
4014
  const status = await sendMiddlewareErrorJSON(runtimeSession2, error);
3987
4015
  logResponse(method2, urlPath2, status, Date.now() - startTime2, "API");
3988
4016
  return;
@@ -4007,13 +4035,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4007
4035
  const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
4008
4036
  const hasExplicitAPIRoute = Boolean(routedApiRoute);
4009
4037
  if (apiHandler && hasExplicitAPIRoute) {
4010
- const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _281 => _281.route, 'access', _282 => _282.path]) || urlPath2;
4011
- _chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
4038
+ const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _280 => _280.route, 'access', _281 => _281.path]) || urlPath2;
4039
+ _chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
4012
4040
  type: "route.matched",
4013
4041
  pathname: pathname2,
4014
4042
  route: apiRoutePattern
4015
4043
  });
4016
- _chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
4044
+ _chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
4017
4045
  type: "api.request.start",
4018
4046
  pathname: pathname2,
4019
4047
  route: apiRoutePattern,
@@ -4038,7 +4066,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4038
4066
  try {
4039
4067
  response = await apiHandler(handledRequest);
4040
4068
  apiOutcomeReported = true;
4041
- _chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
4069
+ _chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
4042
4070
  type: "api.request.complete",
4043
4071
  pathname: pathname2,
4044
4072
  route: apiRoutePattern,
@@ -4048,7 +4076,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4048
4076
  });
4049
4077
  } catch (error) {
4050
4078
  apiOutcomeReported = true;
4051
- _chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
4079
+ _chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
4052
4080
  type: "api.error",
4053
4081
  pathname: pathname2,
4054
4082
  route: apiRoutePattern,
@@ -4056,9 +4084,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4056
4084
  durationMs: Date.now() - startTime2,
4057
4085
  error
4058
4086
  });
4059
- _chunkGC5ROI3Acjs.logger.error(`API route error: ${error}`);
4060
- await _optionalChain([runtime, 'optionalAccess', _283 => _283.reportError, 'call', _284 => _284(error)]);
4061
- response = _chunk4VLXQ55Ocjs.createFarmInternalServerErrorResponse.call(void 0, );
4087
+ _chunk7U4XF76Rcjs.logger.error(`API route error: ${error}`);
4088
+ await _optionalChain([runtime, 'optionalAccess', _282 => _282.reportError, 'call', _283 => _283(error)]);
4089
+ response = _chunkWIZRYFB2cjs.createFarmInternalServerErrorResponse.call(void 0, );
4062
4090
  }
4063
4091
  return pm ? await pm.runHookSerial("afterApiHandler", response, apiLifecyclePayload) : response;
4064
4092
  };
@@ -4076,7 +4104,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4076
4104
  } catch (error) {
4077
4105
  const duration = Date.now() - startTime2;
4078
4106
  if (!apiOutcomeReported) {
4079
- _chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
4107
+ _chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
4080
4108
  type: "api.error",
4081
4109
  pathname: pathname2,
4082
4110
  route: apiRoutePattern,
@@ -4091,7 +4119,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4091
4119
  await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
4092
4120
  return;
4093
4121
  }
4094
- _chunkGC5ROI3Acjs.logger.error(`API route error: ${error}`);
4122
+ _chunk7U4XF76Rcjs.logger.error(`API route error: ${error}`);
4095
4123
  sendFarmDevRuntimeHookError(res, true);
4096
4124
  return;
4097
4125
  }
@@ -4133,7 +4161,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4133
4161
  await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
4134
4162
  return;
4135
4163
  }
4136
- _chunkGC5ROI3Acjs.logger.error(`Docs API route error: ${error}`);
4164
+ _chunk7U4XF76Rcjs.logger.error(`Docs API route error: ${error}`);
4137
4165
  sendFarmDevRuntimeHookError(res, true);
4138
4166
  return;
4139
4167
  }
@@ -4157,17 +4185,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4157
4185
  logResponse(method2, urlPath2, response.status, Date.now() - startTime2, "API");
4158
4186
  await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
4159
4187
  } catch (error) {
4160
- _chunkGC5ROI3Acjs.logger.error(`API route error: ${error}`);
4188
+ _chunk7U4XF76Rcjs.logger.error(`API route error: ${error}`);
4161
4189
  sendFarmDevRuntimeHookError(res, true);
4162
4190
  }
4163
4191
  return;
4164
4192
  }
4165
- if (_optionalChain([req, 'access', _285 => _285.url, 'optionalAccess', _286 => _286.startsWith, 'call', _287 => _287("/@")]) || _optionalChain([req, 'access', _288 => _288.url, 'optionalAccess', _289 => _289.startsWith, 'call', _290 => _290("/node_modules")])) {
4193
+ if (_optionalChain([req, 'access', _284 => _284.url, 'optionalAccess', _285 => _285.startsWith, 'call', _286 => _286("/@")]) || _optionalChain([req, 'access', _287 => _287.url, 'optionalAccess', _288 => _288.startsWith, 'call', _289 => _289("/node_modules")])) {
4166
4194
  return next();
4167
4195
  }
4168
4196
  if (!deferredDottedRequests.has(req) && shouldBypassFarmRouterForDottedPath(
4169
4197
  requestPathname,
4170
- _optionalChain([farmApp, 'optionalAccess', _291 => _291.getRouteManager, 'call', _292 => _292()]),
4198
+ _optionalChain([farmApp, 'optionalAccess', _290 => _290.getRouteManager, 'call', _291 => _291()]),
4171
4199
  [server.config.publicDir, server.config.root],
4172
4200
  farmAgentGeneratedPaths(farmConfig),
4173
4201
  requestMethod
@@ -4175,7 +4203,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4175
4203
  if (!viteModuleRequest) deferredDottedRequests.set(req, requestUrl);
4176
4204
  return next();
4177
4205
  }
4178
- if (_optionalChain([req, 'access', _293 => _293.url, 'optionalAccess', _294 => _294.startsWith, 'call', _295 => _295("/__farm/page-data")])) {
4206
+ if (_optionalChain([req, 'access', _292 => _292.url, 'optionalAccess', _293 => _293.startsWith, 'call', _294 => _294("/__farm/page-data")])) {
4179
4207
  const urlObj = parsedRequestUrl;
4180
4208
  const targetPath = urlObj.searchParams.get("path") || "/";
4181
4209
  let renderedRequest;
@@ -4205,7 +4233,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4205
4233
  renderedRequest = targetRequest;
4206
4234
  let middlewareMap = /* @__PURE__ */ new Map();
4207
4235
  let middlewareContext = /* @__PURE__ */ new Map();
4208
- if (_optionalChain([middlewareManager, 'optionalAccess', _296 => _296.hasMiddleware, 'call', _297 => _297()])) {
4236
+ if (_optionalChain([middlewareManager, 'optionalAccess', _295 => _295.hasMiddleware, 'call', _296 => _296()])) {
4209
4237
  const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
4210
4238
  const targetNodeResponse = createPageDataMiddlewareResponse(res);
4211
4239
  const handled = await runFarmMiddlewareWithNavigation(
@@ -4239,10 +4267,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4239
4267
  if (pm) {
4240
4268
  await pm.runHookParallel("afterRouteMatch", {
4241
4269
  pathname: targetPath,
4242
- matched: !!_optionalChain([match, 'optionalAccess', _298 => _298.route]),
4243
- routePattern: _optionalChain([match, 'optionalAccess', _299 => _299.route, 'optionalAccess', _300 => _300.pattern]) || null,
4244
- params: _optionalChain([match, 'optionalAccess', _301 => _301.params]) || {},
4245
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _302 => _302.layouts]) || []).map((l) => l.pattern)
4270
+ matched: !!_optionalChain([match, 'optionalAccess', _297 => _297.route]),
4271
+ routePattern: _optionalChain([match, 'optionalAccess', _298 => _298.route, 'optionalAccess', _299 => _299.pattern]) || null,
4272
+ params: _optionalChain([match, 'optionalAccess', _300 => _300.params]) || {},
4273
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _301 => _301.layouts]) || []).map((l) => l.pattern)
4246
4274
  });
4247
4275
  }
4248
4276
  if (!match) {
@@ -4277,7 +4305,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4277
4305
  );
4278
4306
  const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
4279
4307
  const navigationManifest = routeManager3.generateClientManifest(server.config.root);
4280
- const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkODYKCC6Wcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4308
+ const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunk46UV2E7Icjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4281
4309
  const isClientComponent = moduleMetadata.isClientComponent;
4282
4310
  const shouldHydrate = moduleMetadata.shouldHydrate;
4283
4311
  let mergedMetadata = {};
@@ -4288,7 +4316,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4288
4316
  (layout) => _nullishCoalesce(navigationManifest.layouts.find(
4289
4317
  (entry) => entry.pattern === layout.pattern
4290
4318
  ), () => ( {
4291
- ..._chunkODYKCC6Wcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4319
+ ..._chunk46UV2E7Icjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4292
4320
  serverTree: false
4293
4321
  }))
4294
4322
  );
@@ -4302,17 +4330,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4302
4330
  )
4303
4331
  ];
4304
4332
  const hydrationIslandStrategy = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0,
4305
- _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _303 => _303.getConfig, 'call', _304 => _304()]), () => ( options))), 'access', _305 => _305.experimental, 'optionalAccess', _306 => _306.serverComponents])
4306
- ) === "islands" ? _chunkHVMQAVZKcjs.resolveFarmRouteRootStrategy.call(void 0,
4333
+ _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _302 => _302.getConfig, 'call', _303 => _303()]), () => ( options))), 'access', _304 => _304.experimental, 'optionalAccess', _305 => _305.serverComponents])
4334
+ ) === "islands" ? _chunkCL7BUGVBcjs.resolveFarmRouteRootStrategy.call(void 0,
4307
4335
  route,
4308
4336
  { shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
4309
4337
  layouts.map((layout, index) => ({
4310
4338
  pattern: layout.pattern,
4311
4339
  modulePath: layout.modulePath,
4312
- shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _307 => _307[index], 'optionalAccess', _308 => _308.shouldHydrate]) === true,
4340
+ shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _306 => _306[index], 'optionalAccess', _307 => _307.shouldHydrate]) === true,
4313
4341
  // Manifest entries carry it; metadata read from source does not.
4314
- hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _309 => _309[index], 'optionalAccess', _310 => _310.hasIsolatedClientBoundaries]) === true,
4315
- islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _311 => _311[index], 'optionalAccess', _312 => _312.islandStrategy]), () => ( null))
4342
+ hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _308 => _308[index], 'optionalAccess', _309 => _309.hasIsolatedClientBoundaries]) === true,
4343
+ islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _310 => _310[index], 'optionalAccess', _311 => _311.islandStrategy]), () => ( null))
4316
4344
  })),
4317
4345
  server.config.root,
4318
4346
  true
@@ -4360,7 +4388,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4360
4388
  mergedMetadata = await _chunkY3DO7BIJcjs.mergeModuleViewport.call(void 0, mergedMetadata, routeModule, routeProps);
4361
4389
  mergedMetadata = _chunkY3DO7BIJcjs.addMetadataMarkdownAlternate.call(void 0,
4362
4390
  mergedMetadata,
4363
- _chunk2YJ4DHTDcjs.getFarmMarkdownAlternatePath.call(void 0, farmApp.getConfig().md, targetRequestUrl.pathname, {
4391
+ _chunk2NOHVIJ3cjs.getFarmMarkdownAlternatePath.call(void 0, farmApp.getConfig().md, targetRequestUrl.pathname, {
4364
4392
  routePathname: (pathname2) => routeManager3.toRoutePathname(pathname2)
4365
4393
  })
4366
4394
  );
@@ -4369,7 +4397,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4369
4397
  const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
4370
4398
  const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
4371
4399
  (entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
4372
- ), () => ( _chunkODYKCC6Wcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4400
+ ), () => ( _chunk46UV2E7Icjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4373
4401
  const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
4374
4402
  request: targetRequest,
4375
4403
  params: slot.params,
@@ -4414,16 +4442,16 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4414
4442
  })
4415
4443
  );
4416
4444
  const projectRoot = server.config.root;
4417
- const toUrlPath = (absolutePath) => _chunkGC5ROI3Acjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
4418
- const renderPlan = _chunk6ZFGWB75cjs.createFarmRouteRenderPlan.call(void 0, {
4445
+ const toUrlPath = (absolutePath) => _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
4446
+ const renderPlan = _chunkOFVCWV2Dcjs.createFarmRouteRenderPlan.call(void 0, {
4419
4447
  pageShouldHydrate: shouldHydrate,
4420
4448
  layoutShouldHydrate: shouldHydrateLayout,
4421
4449
  islandStrategy: hydrationIslandStrategy,
4422
- rendering: _chunkBZJYPIFZcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4450
+ rendering: _chunkOUDNUFVRcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4423
4451
  });
4424
4452
  const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
4425
- const layoutStartIndex = _chunk6ZFGWB75cjs.getSharedLayoutPrefixLength.call(void 0,
4426
- _chunk6ZFGWB75cjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4453
+ const layoutStartIndex = _chunkOFVCWV2Dcjs.getSharedLayoutPrefixLength.call(void 0,
4454
+ _chunkOFVCWV2Dcjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4427
4455
  destinationLayoutPatterns
4428
4456
  );
4429
4457
  const renderer = farmApp.getServerRenderer();
@@ -4433,13 +4461,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4433
4461
  middlewareContext,
4434
4462
  () => renderer.renderNavigationFragment({
4435
4463
  PageComponent: routeModule.default,
4436
- LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _313 => _313.default]),
4464
+ LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _312 => _312.default]),
4437
4465
  pageProps: routeProps,
4438
4466
  params,
4439
4467
  layouts: layouts.map((layout, index) => ({
4440
4468
  pattern: layout.pattern,
4441
4469
  module: layoutModules[index],
4442
- serverTree: _optionalChain([layoutHydrationMetadata, 'access', _314 => _314[index], 'optionalAccess', _315 => _315.serverTree])
4470
+ serverTree: _optionalChain([layoutHydrationMetadata, 'access', _313 => _313[index], 'optionalAccess', _314 => _314.serverTree])
4443
4471
  })),
4444
4472
  layoutStartIndex,
4445
4473
  slots: routeSlots.map((slot) => ({
@@ -4505,7 +4533,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4505
4533
  {
4506
4534
  status: 200,
4507
4535
  headers: {
4508
- "Cache-Control": _chunk6ZFGWB75cjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4536
+ "Cache-Control": _chunkOFVCWV2Dcjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4509
4537
  "X-Farm-Navigation": "html-fragment",
4510
4538
  Vary: "X-Farm-Layout-Chain",
4511
4539
  [_chunkNLBHLPEOcjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
@@ -4513,7 +4541,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4513
4541
  },
4514
4542
  {
4515
4543
  onError(error, id) {
4516
- _chunkGC5ROI3Acjs.logger.error(`Deferred route data ${id} failed: ${error}`);
4544
+ _chunk7U4XF76Rcjs.logger.error(`Deferred route data ${id} failed: ${error}`);
4517
4545
  }
4518
4546
  }
4519
4547
  )
@@ -4547,29 +4575,29 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4547
4575
  trustProxy: currentServerConfig.trustProxy
4548
4576
  }).pathname;
4549
4577
  const routeManager2 = farmApp.getRouteManager();
4550
- const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _316 => _316.hasHook, 'call', _317 => _317("beforeRequest")]), () => ( false));
4551
- const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _318 => _318.hasHook, 'call', _319 => _319("afterResponse")]), () => ( false));
4552
- const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _320 => _320.hasHook, 'call', _321 => _321("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _322 => _322.hasHook, 'call', _323 => _323("afterRender")]), () => ( false)));
4578
+ const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _315 => _315.hasHook, 'call', _316 => _316("beforeRequest")]), () => ( false));
4579
+ const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _317 => _317.hasHook, 'call', _318 => _318("afterResponse")]), () => ( false));
4580
+ const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _319 => _319.hasHook, 'call', _320 => _320("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _321 => _321.hasHook, 'call', _322 => _322("afterRender")]), () => ( false)));
4553
4581
  const opensRuntimeSession = pm ? opensFarmDevRuntimeSession(pm) : false;
4554
- const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _324 => _324.hasRuntimeHook, 'call', _325 => _325("after")]), () => ( false));
4582
+ const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _323 => _323.hasRuntimeHook, 'call', _324 => _324("after")]), () => ( false));
4555
4583
  const pageBuiltInRouteLabel = (pathname2) => {
4556
4584
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
4557
- const mcpLabel = _chunk5KISFWD2cjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4585
+ const mcpLabel = _chunkFYZD7DUScjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4558
4586
  if (mcpLabel) return mcpLabel;
4559
4587
  if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
4560
- return routePathname === _chunkYRXPDKMMcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkYRXPDKMMcjs.FARM_DEFAULT_MCP_PATH : null;
4588
+ return routePathname === _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH : null;
4561
4589
  };
4562
4590
  const pageRuntimeOptions = (pathname2) => {
4563
4591
  const match = routeManager2.matchRoute(pathname2);
4564
4592
  return {
4565
4593
  kind: "page",
4566
- route: _chunk5KISFWD2cjs.setFarmRouteLabel.call(void 0,
4594
+ route: _chunkFYZD7DUScjs.setFarmRouteLabel.call(void 0,
4567
4595
  {
4568
4596
  pathname: pathname2,
4569
- pattern: _optionalChain([match, 'optionalAccess', _326 => _326.route, 'optionalAccess', _327 => _327.pattern]) || null,
4570
- params: _optionalChain([match, 'optionalAccess', _328 => _328.params]) || {}
4597
+ pattern: _optionalChain([match, 'optionalAccess', _325 => _325.route, 'optionalAccess', _326 => _326.pattern]) || null,
4598
+ params: _optionalChain([match, 'optionalAccess', _327 => _327.params]) || {}
4571
4599
  },
4572
- _optionalChain([match, 'optionalAccess', _329 => _329.route]) ? null : pageBuiltInRouteLabel(pathname2)
4600
+ _optionalChain([match, 'optionalAccess', _328 => _328.route]) ? null : pageBuiltInRouteLabel(pathname2)
4573
4601
  )
4574
4602
  };
4575
4603
  };
@@ -4649,7 +4677,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4649
4677
  }) : void 0;
4650
4678
  let middlewareFailed = false;
4651
4679
  try {
4652
- if (_optionalChain([middlewareManager, 'optionalAccess', _330 => _330.hasMiddleware, 'call', _331 => _331()])) {
4680
+ if (_optionalChain([middlewareManager, 'optionalAccess', _329 => _329.hasMiddleware, 'call', _330 => _330()])) {
4653
4681
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
4654
4682
  const handled = await runFarmMiddlewareWithNavigation(
4655
4683
  farmApp.getServerRenderer(),
@@ -4662,7 +4690,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4662
4690
  throw error;
4663
4691
  });
4664
4692
  if (handled) {
4665
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _332 => _332.isEnded, 'call', _333 => _333()])) {
4693
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _331 => _331.isEnded, 'call', _332 => _332()])) {
4666
4694
  const duration = Date.now() - startTime;
4667
4695
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4668
4696
  }
@@ -4677,8 +4705,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4677
4705
  res
4678
4706
  );
4679
4707
  }
4680
- if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _334 => _334.isEnded, 'call', _335 => _335()])) {
4681
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _336 => _336.isEnded, 'call', _337 => _337()])) {
4708
+ if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _333 => _333.isEnded, 'call', _334 => _334()])) {
4709
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _335 => _335.isEnded, 'call', _336 => _336()])) {
4682
4710
  const duration = Date.now() - startTime;
4683
4711
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4684
4712
  }
@@ -4697,8 +4725,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4697
4725
  await pm.reportRuntimeRequestError(runtimeSession, error);
4698
4726
  } else {
4699
4727
  await pm.failRuntimeRequest(runtimeSession, error);
4700
- if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _338 => _338.isEnded, 'call', _339 => _339()])) {
4701
- _optionalChain([responseInterceptor, 'optionalAccess', _340 => _340.release, 'call', _341 => _341()]);
4728
+ if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _337 => _337.isEnded, 'call', _338 => _338()])) {
4729
+ _optionalChain([responseInterceptor, 'optionalAccess', _339 => _339.release, 'call', _340 => _340()]);
4702
4730
  console.error("[FARM] Page error:", error);
4703
4731
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
4704
4732
  return;
@@ -4715,7 +4743,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4715
4743
  }
4716
4744
  })
4717
4745
  );
4718
- const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _342 => _342.stack, 'access', _343 => _343.at, 'call', _344 => _344(-1), 'optionalAccess', _345 => _345.handle]);
4746
+ const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _341 => _341.stack, 'access', _342 => _342.at, 'call', _343 => _343(-1), 'optionalAccess', _344 => _344.handle]);
4719
4747
  if (farmOwnsDevCors && viteServer.config.server.cors === false) {
4720
4748
  farmMiddlewares.use(createFarmDevViteCorsMiddleware());
4721
4749
  }
@@ -4744,7 +4772,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4744
4772
  });
4745
4773
  }
4746
4774
  if (id.startsWith("@farm.js/core/internal/") && importer && isOutsideAppRoot(importer)) {
4747
- const root = _optionalChain([farmApp, 'optionalAccess', _346 => _346.getConfig, 'call', _347 => _347(), 'access', _348 => _348.root]) || _optionalChain([server, 'optionalAccess', _349 => _349.config, 'access', _350 => _350.root]) || options.root;
4775
+ const root = _optionalChain([farmApp, 'optionalAccess', _345 => _345.getConfig, 'call', _346 => _346(), 'access', _347 => _347.root]) || _optionalChain([server, 'optionalAccess', _348 => _348.config, 'access', _349 => _349.root]) || options.root;
4748
4776
  return this.resolve(id, path6.join(root, "package.json"), {
4749
4777
  ...resolveOptions,
4750
4778
  skipSelf: true
@@ -4772,7 +4800,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4772
4800
  }
4773
4801
  },
4774
4802
  async load(id, loadOptions) {
4775
- if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _351 => _351.ssr]) && !farmSetupContext.getStore()) {
4803
+ if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _350 => _350.ssr]) && !farmSetupContext.getStore()) {
4776
4804
  await pendingClientSetup;
4777
4805
  }
4778
4806
  if (_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && islandsServerFns()) {
@@ -4790,8 +4818,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4790
4818
  if (imageModule) return imageModule;
4791
4819
  }
4792
4820
  if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
4793
- const renderer = _optionalChain([farmApp, 'optionalAccess', _352 => _352.getConfig, 'call', _353 => _353(), 'access', _354 => _354.renderer]) || _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, options.renderer);
4794
- const root = _optionalChain([server, 'optionalAccess', _355 => _355.config, 'access', _356 => _356.root]) || options.root;
4821
+ const renderer = _optionalChain([farmApp, 'optionalAccess', _351 => _351.getConfig, 'call', _352 => _352(), 'access', _353 => _353.renderer]) || _chunkM6DAIE4Tcjs.resolveFarmRenderer.call(void 0, options.renderer);
4822
+ const root = _optionalChain([server, 'optionalAccess', _354 => _354.config, 'access', _355 => _355.root]) || options.root;
4795
4823
  if (isClientEnvironment(this, loadOptions)) {
4796
4824
  return generateProgrammaticClientRouteModuleForId(
4797
4825
  id,
@@ -4807,65 +4835,65 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4807
4835
  return FARM_DEV_CLIENT_BOOT_MODULE;
4808
4836
  }
4809
4837
  if (isFarmClientVirtualId(id)) {
4810
- const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _357 => _357.getConfig, 'call', _358 => _358()]);
4811
- const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _359 => _359.renderer]) || _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, options.renderer);
4812
- const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _360 => _360.integrations]) || options.integrations;
4813
- const root = _optionalChain([resolvedConfig, 'optionalAccess', _361 => _361.root]) || _optionalChain([server, 'optionalAccess', _362 => _362.config, 'access', _363 => _363.root]) || process.cwd();
4814
- const docs = _optionalChain([resolvedConfig, 'optionalAccess', _364 => _364.docs]);
4838
+ const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _356 => _356.getConfig, 'call', _357 => _357()]);
4839
+ const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _358 => _358.renderer]) || _chunkM6DAIE4Tcjs.resolveFarmRenderer.call(void 0, options.renderer);
4840
+ const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _359 => _359.integrations]) || options.integrations;
4841
+ const root = _optionalChain([resolvedConfig, 'optionalAccess', _360 => _360.root]) || _optionalChain([server, 'optionalAccess', _361 => _361.config, 'access', _362 => _362.root]) || process.cwd();
4842
+ const docs = _optionalChain([resolvedConfig, 'optionalAccess', _363 => _363.docs]);
4815
4843
  const adapterOwnsDocsRuntime = Boolean(
4816
- _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _365 => _365.adapter, 'optionalAccess', _366 => _366.server]) && docs.adapter.react
4844
+ _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _364 => _364.adapter, 'optionalAccess', _365 => _365.server]) && docs.adapter.react
4817
4845
  );
4818
- const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _367 => _367.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4846
+ const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _366 => _366.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4819
4847
  const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
4820
- _optionalChain([docs, 'optionalAccess', _368 => _368.enabled]) ? loadFarmDocsDevRuntime() : null,
4821
- _optionalChain([docs, 'optionalAccess', _369 => _369.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4848
+ _optionalChain([docs, 'optionalAccess', _367 => _367.enabled]) ? loadFarmDocsDevRuntime() : null,
4849
+ _optionalChain([docs, 'optionalAccess', _368 => _368.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4822
4850
  devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
4823
4851
  ]);
4824
- const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _370 => _370.isFarmDocsSearchEnabled, 'call', _371 => _371(docs)]), () => ( false));
4852
+ const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _369 => _369.isFarmDocsSearchEnabled, 'call', _370 => _370(docs)]), () => ( false));
4825
4853
  const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
4826
4854
  docsSearchEnabled,
4827
4855
  docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
4828
4856
  ) : EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME;
4829
4857
  const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
4830
4858
  const generatedDevIndicatorsClientRuntime = farmApp ? _chunkUVV3I5QAcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
4831
- const integrationProviders = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _chunkAOTD2N5Pcjs.getIntegrationProviders.call(void 0, integrations) : [];
4832
- const isolatedHydrationMode = _chunkODYKCC6Wcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4833
- _optionalChain([resolvedConfig, 'optionalAccess', _372 => _372.experimental, 'optionalAccess', _373 => _373.isolatedClientHydration]),
4859
+ const integrationProviders = _chunkWGWWRV2Mcjs.getIntegrationProviders.call(void 0, integrations);
4860
+ const isolatedHydrationMode = _chunk46UV2E7Icjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4861
+ _optionalChain([resolvedConfig, 'optionalAccess', _371 => _371.experimental, 'optionalAccess', _372 => _372.isolatedClientHydration]),
4834
4862
  {
4835
- serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _374 => _374.experimental, 'optionalAccess', _375 => _375.serverComponents])) === "rsc",
4863
+ serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _373 => _373.experimental, 'optionalAccess', _374 => _374.serverComponents])) === "rsc",
4836
4864
  hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
4837
4865
  }
4838
4866
  );
4839
4867
  return generateClientCode(
4840
4868
  integrationProviders,
4841
4869
  [
4842
- ..._chunkAOTD2N5Pcjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
4843
- ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _376 => _376.getFarmDocsDocumentNavigationMatchers, 'call', _377 => _377(docs)]), () => ( []))
4870
+ ..._chunkWGWWRV2Mcjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
4871
+ ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _375 => _375.getFarmDocsDocumentNavigationMatchers, 'call', _376 => _376(docs)]), () => ( []))
4844
4872
  ],
4845
4873
  generatedDocsSearchRuntime,
4846
4874
  `${generatedDevtoolsClientRuntime}
4847
4875
  ${generatedDevIndicatorsClientRuntime}`,
4848
- _optionalChain([resolvedConfig, 'optionalAccess', _378 => _378.plugins]) || [],
4876
+ _optionalChain([resolvedConfig, 'optionalAccess', _377 => _377.plugins]) || [],
4849
4877
  root,
4850
- _optionalChain([resolvedConfig, 'optionalAccess', _379 => _379.srcDir]) || options.srcDir || "src",
4851
- _optionalChain([resolvedConfig, 'optionalAccess', _380 => _380.publicRuntimeConfig]) || options.publicRuntimeConfig,
4852
- _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _381 => _381.adapter, 'optionalAccess', _382 => _382.react]) : void 0,
4878
+ _optionalChain([resolvedConfig, 'optionalAccess', _378 => _378.srcDir]) || options.srcDir || "src",
4879
+ _optionalChain([resolvedConfig, 'optionalAccess', _379 => _379.publicRuntimeConfig]) || options.publicRuntimeConfig,
4880
+ _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _380 => _380.adapter, 'optionalAccess', _381 => _381.react]) : void 0,
4853
4881
  renderer,
4854
- isolatedHydrationMode === "enabled" || _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _383 => _383.getRouteManager, 'call', _384 => _384(), 'access', _385 => _385.getIsolatedClientBoundaryModules, 'call', _386 => _386(root)])))), 'optionalAccess', _387 => _387.size]) > 0,
4855
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _388 => _388.trailingSlash]), () => ( false)),
4856
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _389 => _389.basePath]), () => ( "/")),
4857
- _chunkHVMQAVZKcjs.generateClientCachePersistenceCode.call(void 0,
4858
- _chunkHVMQAVZKcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _390 => _390.cache]))
4882
+ isolatedHydrationMode === "enabled" || _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _382 => _382.getRouteManager, 'call', _383 => _383(), 'access', _384 => _384.getIsolatedClientBoundaryModules, 'call', _385 => _385(root)])))), 'optionalAccess', _386 => _386.size]) > 0,
4883
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _387 => _387.trailingSlash]), () => ( false)),
4884
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _388 => _388.basePath]), () => ( "/")),
4885
+ _chunkCL7BUGVBcjs.generateClientCachePersistenceCode.call(void 0,
4886
+ _chunkCL7BUGVBcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _389 => _389.cache]))
4859
4887
  ),
4860
- _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
4861
- _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _391 => _391.experimental, 'optionalAccess', _392 => _392.serverComponents])) === "islands"
4888
+ _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
4889
+ _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _390 => _390.experimental, 'optionalAccess', _391 => _391.serverComponents])) === "islands"
4862
4890
  );
4863
4891
  }
4864
4892
  if (id === "/@farm/server") {
4865
4893
  return generateServerCode();
4866
4894
  }
4867
4895
  if (id === "/@farm/manifest") {
4868
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _393 => _393.getRouteManager, 'call', _394 => _394()]);
4896
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _392 => _392.getRouteManager, 'call', _393 => _393()]);
4869
4897
  if (!routeManager) {
4870
4898
  return `
4871
4899
  export const getManifest = () => ({
@@ -4877,11 +4905,11 @@ export const getManifest = () => ({
4877
4905
  });
4878
4906
  `;
4879
4907
  }
4880
- const globalStylesheetHref = _chunkHVMQAVZKcjs.resolveDevGlobalStylesheetHref.call(void 0,
4908
+ const globalStylesheetHref = _chunkCL7BUGVBcjs.resolveDevGlobalStylesheetHref.call(void 0,
4881
4909
  server.config.root,
4882
- _optionalChain([farmApp, 'optionalAccess', _395 => _395.getConfig, 'call', _396 => _396(), 'access', _397 => _397.srcDir])
4910
+ _optionalChain([farmApp, 'optionalAccess', _394 => _394.getConfig, 'call', _395 => _395(), 'access', _396 => _396.srcDir])
4883
4911
  );
4884
- const fullManifest = _chunkHVMQAVZKcjs.createFarmDevClientManifest.call(void 0,
4912
+ const fullManifest = _chunkCL7BUGVBcjs.createFarmDevClientManifest.call(void 0,
4885
4913
  routeManager.generateClientManifest(server.config.root),
4886
4914
  {
4887
4915
  sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
@@ -4897,64 +4925,64 @@ export { manifest };
4897
4925
  }
4898
4926
  },
4899
4927
  async transform(code, id, transformOptions) {
4900
- if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _398 => _398.ssr]) && !farmSetupContext.getStore()) {
4928
+ if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _397 => _397.ssr]) && !farmSetupContext.getStore()) {
4901
4929
  await pendingClientSetup;
4902
4930
  }
4903
- const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _399 => _399.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
4904
- const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _400 => _400.getConfig, 'call', _401 => _401()]), () => ( options));
4931
+ const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _398 => _398.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
4932
+ const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _399 => _399.getConfig, 'call', _400 => _400()]), () => ( options));
4905
4933
  let rewrotePackageImports = false;
4906
- if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _402 => _402.experimental, 'optionalAccess', _403 => _403.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _404 => _404.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkODYKCC6Wcjs.hasUseClientDirective.call(void 0, code)) {
4934
+ if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _401 => _401.experimental, 'optionalAccess', _402 => _402.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _403 => _403.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunk46UV2E7Icjs.hasUseClientDirective.call(void 0, code)) {
4907
4935
  const file = id.split("?", 1)[0];
4908
- const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _405 => _405.config, 'access', _406 => _406.root]) || process.cwd();
4936
+ const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _404 => _404.config, 'access', _405 => _405.root]) || process.cwd();
4909
4937
  const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
4910
4938
  const rewrite = () => {
4911
- if (_optionalChain([transformOptions, 'optionalAccess', _407 => _407.ssr]) === true) {
4939
+ if (_optionalChain([transformOptions, 'optionalAccess', _406 => _406.ssr]) === true) {
4912
4940
  if (farmReactServerFiles.has(file)) {
4913
- for (const child of _chunkODYKCC6Wcjs.farmRelativeImportFiles.call(void 0, code, file))
4941
+ for (const child of _chunk46UV2E7Icjs.farmRelativeImportFiles.call(void 0, code, file))
4914
4942
  farmReactServerFiles.add(child);
4915
4943
  }
4916
- const serverModule = farmReactServerFiles.has(file) || !_chunkODYKCC6Wcjs.getFarmClientReachableModules.call(void 0,
4944
+ const serverModule = farmReactServerFiles.has(file) || !_chunk46UV2E7Icjs.getFarmClientReachableModules.call(void 0,
4917
4945
  path6.resolve(projectRoot, actionConfig.srcDir || "src"),
4918
4946
  projectRoot
4919
4947
  ).has(path6.resolve(file));
4920
- const reactServer = !serverModule ? null : _chunkODYKCC6Wcjs.rewriteFarmReactServerImports.call(void 0, {
4948
+ const reactServer = !serverModule ? null : _chunk46UV2E7Icjs.rewriteFarmReactServerImports.call(void 0, {
4921
4949
  code,
4922
4950
  file,
4923
- reference: (specifier, exportName) => _chunkODYKCC6Wcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
4951
+ reference: (specifier, exportName) => _chunk46UV2E7Icjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
4924
4952
  onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
4925
4953
  });
4926
4954
  if (reactServer !== null) {
4927
4955
  code = reactServer;
4928
4956
  rewrotePackageImports = true;
4929
4957
  }
4930
- const internal = farmReactServerFiles.has(file) ? _chunkODYKCC6Wcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
4958
+ const internal = farmReactServerFiles.has(file) ? _chunk46UV2E7Icjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
4931
4959
  code,
4932
4960
  file,
4933
- reference: (clientFile) => _chunkODYKCC6Wcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
4961
+ reference: (clientFile) => _chunk46UV2E7Icjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
4934
4962
  }) : null;
4935
4963
  if (internal !== null) {
4936
4964
  code = internal;
4937
4965
  rewrotePackageImports = true;
4938
4966
  }
4939
4967
  }
4940
- const rewritePackageImports = (source2) => _chunkODYKCC6Wcjs.rewriteFarmPackageClientImports.call(void 0, {
4968
+ const rewritePackageImports = (source2) => _chunk46UV2E7Icjs.rewriteFarmPackageClientImports.call(void 0, {
4941
4969
  code: source2,
4942
4970
  file,
4943
4971
  root: projectRoot,
4944
- isClientPackage: (specifier) => _chunkODYKCC6Wcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
4972
+ isClientPackage: (specifier) => _chunk46UV2E7Icjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
4945
4973
  });
4946
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _408 => _408.getRouteManager, 'call', _409 => _409()]);
4974
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _407 => _407.getRouteManager, 'call', _408 => _408()]);
4947
4975
  const source = code;
4948
4976
  const referenced = routeManager ? routeManager.inspectPackages(() => rewritePackageImports(source)) : rewritePackageImports(source);
4949
4977
  if (referenced !== null) {
4950
4978
  code = referenced;
4951
4979
  rewrotePackageImports = true;
4952
4980
  }
4953
- if (_optionalChain([transformOptions, 'optionalAccess', _410 => _410.ssr]) === true) {
4981
+ if (_optionalChain([transformOptions, 'optionalAccess', _409 => _409.ssr]) === true) {
4954
4982
  const cached = rewriteFarmReactCacheImport(
4955
4983
  code,
4956
4984
  file,
4957
- _optionalChain([runtimeModule, 'optionalCall', _411 => _411(FARM_REACT_CACHE_MODULE)])
4985
+ _optionalChain([runtimeModule, 'optionalCall', _410 => _410(FARM_REACT_CACHE_MODULE)])
4958
4986
  );
4959
4987
  if (cached !== null) {
4960
4988
  code = cached;
@@ -4962,46 +4990,48 @@ export { manifest };
4962
4990
  }
4963
4991
  }
4964
4992
  };
4965
- if (buildSnapshot) _chunkODYKCC6Wcjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
4993
+ if (buildSnapshot) _chunk46UV2E7Icjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
4966
4994
  else rewrite();
4967
4995
  }
4968
4996
  if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
4969
4997
  const serverFns = _chunkPIUTGRDIcjs.transformFarmServerFns.call(void 0, code, id, {
4970
- environment: _optionalChain([transformOptions, 'optionalAccess', _412 => _412.ssr]) === true ? "rsc" : "client"
4998
+ environment: _optionalChain([transformOptions, 'optionalAccess', _411 => _411.ssr]) === true ? "rsc" : "client"
4971
4999
  });
4972
5000
  if (serverFns) {
4973
5001
  if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
4974
5002
  code = serverFns.code;
4975
5003
  }
4976
5004
  }
4977
- if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _413 => _413.experimental, 'optionalAccess', _414 => _414.serverComponents])) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
5005
+ const actionsMode = islxActionsMode();
5006
+ if (actionsMode !== null && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
4978
5007
  const file = id.split("?", 1)[0];
4979
5008
  const actionModule = transformFarmFormActionModule({
4980
5009
  code,
4981
5010
  id,
4982
- root: actionConfig.root || _optionalChain([server, 'optionalAccess', _415 => _415.config, 'access', _416 => _416.root]) || process.cwd(),
4983
- ssr: _optionalChain([transformOptions, 'optionalAccess', _417 => _417.ssr]) === true,
5011
+ root: actionConfig.root || _optionalChain([server, 'optionalAccess', _412 => _412.config, 'access', _413 => _413.root]) || process.cwd(),
5012
+ ssr: _optionalChain([transformOptions, 'optionalAccess', _414 => _414.ssr]) === true,
4984
5013
  // Parsed by file type: page components are TSX.
4985
5014
  parse: (source) => _vite.parseSync.call(void 0, file, source).program,
4986
- runtimeModule
5015
+ runtimeModule,
5016
+ runtime: actionsMode
4987
5017
  });
4988
5018
  if (actionModule) return { code: actionModule, map: null };
4989
5019
  }
4990
- if (!_optionalChain([transformOptions, 'optionalAccess', _418 => _418.ssr])) {
4991
- const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _419 => _419.getConfig, 'call', _420 => _420(), 'optionalAccess', _421 => _421.docs]));
4992
- if (_chunkHVMQAVZKcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
4993
- const redacted = _chunkHVMQAVZKcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
5020
+ if (!_optionalChain([transformOptions, 'optionalAccess', _415 => _415.ssr])) {
5021
+ const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _416 => _416.getConfig, 'call', _417 => _417(), 'optionalAccess', _418 => _418.docs]));
5022
+ if (_chunkCL7BUGVBcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
5023
+ const redacted = _chunkCL7BUGVBcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
4994
5024
  if (redacted !== null) return { code: redacted, map: null };
4995
5025
  }
4996
5026
  }
4997
- if (!_optionalChain([transformOptions, 'optionalAccess', _422 => _422.ssr])) {
4998
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _423 => _423.getConfig, 'call', _424 => _424()]), () => ( options));
4999
- if ((_optionalChain([currentConfig, 'access', _425 => _425.experimental, 'optionalAccess', _426 => _426.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
5027
+ if (!_optionalChain([transformOptions, 'optionalAccess', _419 => _419.ssr])) {
5028
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _420 => _420.getConfig, 'call', _421 => _421()]), () => ( options));
5029
+ if ((_optionalChain([currentConfig, 'access', _422 => _422.experimental, 'optionalAccess', _423 => _423.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
5000
5030
  const violation = findClientServerFnViolation(code, id);
5001
5031
  if (violation) {
5002
- const locate = _chunkODYKCC6Wcjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5032
+ const locate = _chunk46UV2E7Icjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5003
5033
  this.error(
5004
- _chunkODYKCC6Wcjs.formatFarmDiagnostic.call(void 0,
5034
+ _chunk46UV2E7Icjs.formatFarmDiagnostic.call(void 0,
5005
5035
  createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
5006
5036
  currentConfig.root
5007
5037
  )
@@ -5009,8 +5039,8 @@ export { manifest };
5009
5039
  }
5010
5040
  }
5011
5041
  }
5012
- if (!_optionalChain([transformOptions, 'optionalAccess', _427 => _427.ssr]) && shouldInspectClientBoundary(id, code)) {
5013
- await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _428 => _428.getConfig, 'call', _429 => _429()]), () => ( options)));
5042
+ if (!_optionalChain([transformOptions, 'optionalAccess', _424 => _424.ssr]) && shouldInspectClientBoundary(id, code)) {
5043
+ await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _425 => _425.getConfig, 'call', _426 => _426()]), () => ( options)));
5014
5044
  }
5015
5045
  if (typeof imageImports.transform === "function") {
5016
5046
  const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
@@ -5025,13 +5055,13 @@ export { manifest };
5025
5055
  id,
5026
5056
  transformOptions
5027
5057
  );
5028
- const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _430 => _430.code, 'optionalAccess', _431 => _431.toString, 'call', _432 => _432()]);
5058
+ const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _427 => _427.code, 'optionalAccess', _428 => _428.toString, 'call', _429 => _429()]);
5029
5059
  if (fontCode) {
5030
5060
  transformedCode = fontCode;
5031
5061
  transformed = true;
5032
5062
  }
5033
5063
  }
5034
- if (_optionalChain([transformOptions, 'optionalAccess', _433 => _433.ssr]) && server) {
5064
+ if (_optionalChain([transformOptions, 'optionalAccess', _430 => _430.ssr]) && server) {
5035
5065
  const rewrittenImports = rewriteEarlySsrRelativeImports({
5036
5066
  code: transformedCode,
5037
5067
  id,
@@ -5043,26 +5073,26 @@ export { manifest };
5043
5073
  transformed = true;
5044
5074
  }
5045
5075
  }
5046
- if (_chunkODYKCC6Wcjs.hasUseClientDirective.call(void 0, transformedCode)) {
5076
+ if (_chunk46UV2E7Icjs.hasUseClientDirective.call(void 0, transformedCode)) {
5047
5077
  const clientBoundarySource = transformedCode;
5048
5078
  const moduleInfo = this.getModuleInfo(id);
5049
5079
  if (moduleInfo) {
5050
5080
  moduleInfo.isClientComponent = true;
5051
5081
  }
5052
- transformedCode = _chunkODYKCC6Wcjs.stripUseClientDirective.call(void 0, transformedCode);
5082
+ transformedCode = _chunk46UV2E7Icjs.stripUseClientDirective.call(void 0, transformedCode);
5053
5083
  transformed = true;
5054
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _434 => _434.getConfig, 'call', _435 => _435()]), () => ( options));
5084
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _431 => _431.getConfig, 'call', _432 => _432()]), () => ( options));
5055
5085
  let isolatedModuleReference = null;
5056
- const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _436 => _436.config, 'access', _437 => _437.root]) || process.cwd();
5086
+ const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _433 => _433.config, 'access', _434 => _434.root]) || process.cwd();
5057
5087
  const cleanId = id.split("?", 1)[0];
5058
- const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _438 => _438.getRouteManager, 'call', _439 => _439(), 'access', _440 => _440.getIsolatedClientBoundaryModules, 'call', _441 => _441(root)])));
5059
- const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _442 => _442.has, 'call', _443 => _443(path6.resolve(cleanId))]) === true;
5060
- if (_chunk67MZTLTFcjs.isReactRenderer.call(void 0, _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkODYKCC6Wcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5061
- cleanId.replace(/\\/g, "/").includes(_chunkODYKCC6Wcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5062
- isolatedModuleReference = _chunkGC5ROI3Acjs.toViteModuleId.call(void 0, cleanId, root);
5063
- const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _444 => _444.experimental, 'optionalAccess', _445 => _445.serverComponents])) === "islands";
5064
- const explicitStrategy = _chunkODYKCC6Wcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5065
- const inference = islandsMode && explicitStrategy === null ? _chunkHVMQAVZKcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5088
+ const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _435 => _435.getRouteManager, 'call', _436 => _436(), 'access', _437 => _437.getIsolatedClientBoundaryModules, 'call', _438 => _438(root)])));
5089
+ const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _439 => _439.has, 'call', _440 => _440(path6.resolve(cleanId))]) === true;
5090
+ if (_chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, _chunkM6DAIE4Tcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunk46UV2E7Icjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5091
+ cleanId.replace(/\\/g, "/").includes(_chunk46UV2E7Icjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5092
+ isolatedModuleReference = _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, cleanId, root);
5093
+ const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _441 => _441.experimental, 'optionalAccess', _442 => _442.serverComponents])) === "islands";
5094
+ const explicitStrategy = _chunk46UV2E7Icjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5095
+ const inference = islandsMode && explicitStrategy === null ? _chunkCL7BUGVBcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5066
5096
  if (inference) {
5067
5097
  for (const file of inference.files) {
5068
5098
  if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
@@ -5075,8 +5105,8 @@ export { manifest };
5075
5105
  islandStrategy: _nullishCoalesce(explicitStrategy, () => ( "load")),
5076
5106
  parse: (source) => this.parse(source),
5077
5107
  slots: islandsMode,
5078
- browser: _optionalChain([transformOptions, 'optionalAccess', _446 => _446.ssr]) !== true,
5079
- inferredInteraction: _optionalChain([inference, 'optionalAccess', _447 => _447.strategy]) === "interaction",
5108
+ browser: _optionalChain([transformOptions, 'optionalAccess', _443 => _443.ssr]) !== true,
5109
+ inferredInteraction: _optionalChain([inference, 'optionalAccess', _444 => _444.strategy]) === "interaction",
5080
5110
  runtimeModule
5081
5111
  });
5082
5112
  if (!transformedBoundary) {
@@ -5107,7 +5137,7 @@ export { manifest };
5107
5137
  );
5108
5138
  return;
5109
5139
  }` : "";
5110
- const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _448 => _448.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5140
+ const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _445 => _445.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5111
5141
  if (import.meta.hot) {
5112
5142
  import.meta.hot.accept((newModule) => {
5113
5143
  ${isolatedHmrUpdate}
@@ -5158,19 +5188,19 @@ if (import.meta.hot) {
5158
5188
  if (!routeManager) return;
5159
5189
  const { ssg: ssgPages, ssr: ssrRoutes } = await routeManager.collectSSGPages();
5160
5190
  if (ssgPages.length === 0) {
5161
- _chunkGC5ROI3Acjs.logger.info("No SSG pages found - all pages will use SSR");
5191
+ _chunk7U4XF76Rcjs.logger.info("No SSG pages found - all pages will use SSR");
5162
5192
  return;
5163
5193
  }
5164
- _chunkGC5ROI3Acjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
5165
- _chunkGC5ROI3Acjs.logger.info("Pre-rendering SSG pages...");
5166
- const outDir = path6.join(_optionalChain([server, 'optionalAccess', _449 => _449.config, 'access', _450 => _450.root]) || process.cwd(), options.outDir || "dist");
5194
+ _chunk7U4XF76Rcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
5195
+ _chunk7U4XF76Rcjs.logger.info("Pre-rendering SSG pages...");
5196
+ const outDir = path6.join(_optionalChain([server, 'optionalAccess', _446 => _446.config, 'access', _447 => _447.root]) || process.cwd(), options.outDir || "dist");
5167
5197
  const clientDir = path6.join(outDir, "client");
5168
5198
  for (const page of ssgPages) {
5169
5199
  try {
5170
5200
  const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
5171
5201
  await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
5172
5202
  const mod = await routeManager.loadRouteModule(page.filePath);
5173
- if (!_optionalChain([mod, 'optionalAccess', _451 => _451.default])) return;
5203
+ if (!_optionalChain([mod, 'optionalAccess', _448 => _448.default])) return;
5174
5204
  const { layouts } = routeManager.matchRoute(page.urlPath);
5175
5205
  const layoutModules = await Promise.all(
5176
5206
  layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
@@ -5202,7 +5232,7 @@ if (import.meta.hot) {
5202
5232
  const i18nSnapshot = _chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, );
5203
5233
  const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
5204
5234
  const fullHtml = `<!DOCTYPE html>
5205
- <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _452 => _452.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5235
+ <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _449 => _449.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5206
5236
  <head>
5207
5237
  <meta charset="utf-8">
5208
5238
  <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -5220,10 +5250,10 @@ if (import.meta.hot) {
5220
5250
  fs2.mkdirSync(path6.dirname(outputPath), { recursive: true });
5221
5251
  fs2.writeFileSync(outputPath, fullHtml);
5222
5252
  const revalidateInfo = page.revalidate ? ` (revalidate: ${page.revalidate}s)` : "";
5223
- _chunkGC5ROI3Acjs.logger.success(` \u2713 ${page.urlPath}${revalidateInfo}`);
5253
+ _chunk7U4XF76Rcjs.logger.success(` \u2713 ${page.urlPath}${revalidateInfo}`);
5224
5254
  });
5225
5255
  } catch (error) {
5226
- _chunkGC5ROI3Acjs.logger.error(` \u2717 ${page.urlPath}: ${error}`);
5256
+ _chunk7U4XF76Rcjs.logger.error(` \u2717 ${page.urlPath}: ${error}`);
5227
5257
  }
5228
5258
  }
5229
5259
  const manifestPath = path6.join(outDir, "__ssg_manifest.json");
@@ -5239,20 +5269,20 @@ if (import.meta.hot) {
5239
5269
  2
5240
5270
  )
5241
5271
  );
5242
- _chunkGC5ROI3Acjs.logger.success(`SSG complete: ${ssgPages.length} pages pre-rendered`);
5272
+ _chunk7U4XF76Rcjs.logger.success(`SSG complete: ${ssgPages.length} pages pre-rendered`);
5243
5273
  } catch (error) {
5244
- _chunkGC5ROI3Acjs.logger.error(`SSG build failed: ${error}`);
5274
+ _chunk7U4XF76Rcjs.logger.error(`SSG build failed: ${error}`);
5245
5275
  }
5246
5276
  },
5247
5277
  watchChange(id, change) {
5248
- const watched = _chunkGC5ROI3Acjs.toPosixPath.call(void 0, id);
5278
+ const watched = _chunk7U4XF76Rcjs.toPosixPath.call(void 0, id);
5249
5279
  if (!watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched)) {
5250
- _optionalChain([farmApp, 'optionalAccess', _453 => _453.getRouteManager, 'call', _454 => _454(), 'access', _455 => _455.noteSourceChange, 'call', _456 => _456(id, change.event)]);
5280
+ _optionalChain([farmApp, 'optionalAccess', _450 => _450.getRouteManager, 'call', _451 => _451(), 'access', _452 => _452.noteSourceChange, 'call', _453 => _453(id, change.event)]);
5251
5281
  }
5252
- _chunkODYKCC6Wcjs.invalidateFarmClientReachableModules.call(void 0, );
5253
- _chunkODYKCC6Wcjs.invalidateFarmClientOnlyScan.call(void 0, );
5254
- _chunkHVMQAVZKcjs.invalidateFarmRouteRootInferences.call(void 0, );
5255
- _chunkODYKCC6Wcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5282
+ _chunk46UV2E7Icjs.invalidateFarmClientReachableModules.call(void 0, );
5283
+ _chunk46UV2E7Icjs.invalidateFarmClientOnlyScan.call(void 0, );
5284
+ _chunkCL7BUGVBcjs.invalidateFarmRouteRootInferences.call(void 0, );
5285
+ _chunk46UV2E7Icjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5256
5286
  },
5257
5287
  async handleHotUpdate(ctx) {
5258
5288
  if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
@@ -5273,11 +5303,11 @@ if (import.meta.hot) {
5273
5303
  }
5274
5304
  for (const island of _nullishCoalesce(farmIslandInferenceDependents.get(path6.resolve(file)), () => ( []))) {
5275
5305
  if (island === path6.resolve(file)) continue;
5276
- for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(_chunkGC5ROI3Acjs.toPosixPath.call(void 0, island)), () => ( []))) {
5306
+ for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(_chunk7U4XF76Rcjs.toPosixPath.call(void 0, island)), () => ( []))) {
5277
5307
  server2.moduleGraph.invalidateModule(mod);
5278
5308
  }
5279
5309
  }
5280
- const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _457 => _457.getConfig, 'call', _458 => _458()]);
5310
+ const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _454 => _454.getConfig, 'call', _455 => _455()]);
5281
5311
  const normalizedFile = file.replace(/\\/g, "/");
5282
5312
  const reloadAfterEdit = () => {
5283
5313
  for (const files of pendingRouteReloads) {
@@ -5285,28 +5315,28 @@ if (import.meta.hot) {
5285
5315
  }
5286
5316
  server2.ws.send({ type: "full-reload", path: "*" });
5287
5317
  };
5288
- if (normalizedFile.includes(_chunkODYKCC6Wcjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5318
+ if (normalizedFile.includes(_chunk46UV2E7Icjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5289
5319
  path6.posix.join(
5290
- _chunkGC5ROI3Acjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _459 => _459.root]) || options.root || server2.config.root),
5291
- _chunkODYKCC6Wcjs.FARM_CLIENT_REFERENCE_DIRECTORY
5320
+ _chunk7U4XF76Rcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _456 => _456.root]) || options.root || server2.config.root),
5321
+ _chunk46UV2E7Icjs.FARM_CLIENT_REFERENCE_DIRECTORY
5292
5322
  )
5293
5323
  ))
5294
5324
  return modules;
5295
- if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) && _chunkQMR2TUVZcjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
5296
- (appDir) => normalizedFile.startsWith(`${_chunkGC5ROI3Acjs.toPosixPath.call(void 0, appDir)}/api/`)
5325
+ if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) && _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
5326
+ (appDir) => normalizedFile.startsWith(`${_chunk7U4XF76Rcjs.toPosixPath.call(void 0, appDir)}/api/`)
5297
5327
  )) {
5298
5328
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
5299
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _460 => _460(`updated ${file}`)]);
5329
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _457 => _457(`updated ${file}`)]);
5300
5330
  reloadAfterEdit();
5301
5331
  return [];
5302
5332
  }
5303
- const currentSrcRoot = currentFarmConfig ? _chunkQMR2TUVZcjs.getFarmSourceRoots.call(void 0, currentFarmConfig).map((source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")).find((sourceRoot) => normalizedFile.startsWith(`${sourceRoot}/`)) || null : null;
5333
+ const currentSrcRoot = currentFarmConfig ? _chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, currentFarmConfig).map((source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")).find((sourceRoot) => normalizedFile.startsWith(`${sourceRoot}/`)) || null : null;
5304
5334
  if (currentSrcRoot && normalizedFile.startsWith(`${currentSrcRoot}/`) && _chunkYUCU6XB4cjs.isProgrammaticRoutesFileName.call(void 0, normalizedFile)) {
5305
5335
  logUpdate("PAGE", `updated ${path6.basename(file)}`);
5306
5336
  for (const mod of modules) {
5307
5337
  server2.moduleGraph.invalidateModule(mod);
5308
5338
  }
5309
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _461 => _461(`updated ${file}`)]);
5339
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _458 => _458(`updated ${file}`)]);
5310
5340
  reloadAfterEdit();
5311
5341
  return [];
5312
5342
  }
@@ -5316,22 +5346,22 @@ if (import.meta.hot) {
5316
5346
  for (const mod of modules) {
5317
5347
  server2.moduleGraph.invalidateModule(mod);
5318
5348
  }
5319
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _462 => _462(`updated ${file}`)]);
5349
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _459 => _459(`updated ${file}`)]);
5320
5350
  reloadAfterEdit();
5321
5351
  return [];
5322
5352
  }
5323
5353
  if (apiRouteManager && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
5324
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _463 => _463(`updated ${file}`)]);
5354
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _460 => _460(`updated ${file}`)]);
5325
5355
  }
5326
- const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _464 => _464.experimental, 'optionalAccess', _465 => _465.isolatedClientHydration]);
5327
- const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _466 => _466.getRouteManager, 'call', _467 => _467()]);
5356
+ const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _461 => _461.experimental, 'optionalAccess', _462 => _462.isolatedClientHydration]);
5357
+ const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _463 => _463.getRouteManager, 'call', _464 => _464()]);
5328
5358
  const isHydrationPlanSource = /\.[cm]?[jt]sx?$/.test(normalizedFile) && !normalizedFile.includes("/node_modules/") && !isFarmGeneratedOutput(normalizedFile);
5329
- const tracksAsyncOwnerIslands = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _468 => _468.renderer])) && planRouteManager !== void 0;
5359
+ const tracksAsyncOwnerIslands = _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _465 => _465.renderer])) && planRouteManager !== void 0;
5330
5360
  let clientPlanCurrent = false;
5331
5361
  if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
5332
5362
  const routeManager = planRouteManager;
5333
- await _optionalChain([ctx, 'access', _469 => _469.read, 'optionalCall', _470 => _470()]);
5334
- if (_optionalChain([routeManager, 'optionalAccess', _471 => _471.isEditPlanNeutral, 'call', _472 => _472(file)])) {
5363
+ await _optionalChain([ctx, 'access', _466 => _466.read, 'optionalCall', _467 => _467()]);
5364
+ if (_optionalChain([routeManager, 'optionalAccess', _468 => _468.isEditPlanNeutral, 'call', _469 => _469(file)])) {
5335
5365
  clientPlanCurrent = true;
5336
5366
  } else if (routeManager) {
5337
5367
  routeManager.noteSourceChange(file, "update");
@@ -5355,7 +5385,7 @@ if (import.meta.hot) {
5355
5385
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
5356
5386
  for (const boundary of /* @__PURE__ */ new Set([...previousBoundaries, ...nextBoundaries])) {
5357
5387
  if (previousBoundaries.has(boundary) === nextBoundaries.has(boundary)) continue;
5358
- for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(_chunkGC5ROI3Acjs.toPosixPath.call(void 0, boundary)), () => ( []))) {
5388
+ for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(_chunk7U4XF76Rcjs.toPosixPath.call(void 0, boundary)), () => ( []))) {
5359
5389
  server2.moduleGraph.invalidateModule(mod);
5360
5390
  }
5361
5391
  }
@@ -5368,7 +5398,7 @@ if (import.meta.hot) {
5368
5398
  }
5369
5399
  clientPlanCurrent = true;
5370
5400
  } catch (error) {
5371
- _chunkGC5ROI3Acjs.logger.warn(
5401
+ _chunk7U4XF76Rcjs.logger.warn(
5372
5402
  `[Farm.js] Could not refresh the client hydration plan after ${file}: ${error instanceof Error ? error.message : String(error)}`
5373
5403
  );
5374
5404
  return modules;
@@ -5379,7 +5409,7 @@ if (import.meta.hot) {
5379
5409
  if (normalizedFile.includes("middleware.")) {
5380
5410
  if (middlewareManager) {
5381
5411
  await middlewareManager.reload();
5382
- _chunkGC5ROI3Acjs.logger.success("\u2705 Middleware reloaded!");
5412
+ _chunk7U4XF76Rcjs.logger.success("\u2705 Middleware reloaded!");
5383
5413
  if (initialPluginManager) {
5384
5414
  for (const middleware of middlewareManager.getMiddlewares()) {
5385
5415
  await initialPluginManager.runHookParallel("middlewareDiscovered", {
@@ -5392,7 +5422,7 @@ if (import.meta.hot) {
5392
5422
  }
5393
5423
  return [];
5394
5424
  }
5395
- if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _473 => _473.getRouteManager, 'call', _474 => _474(), 'access', _475 => _475.invalidateClientManifest, 'call', _476 => _476()]);
5425
+ if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _470 => _470.getRouteManager, 'call', _471 => _471(), 'access', _472 => _472.invalidateClientManifest, 'call', _473 => _473()]);
5396
5426
  const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
5397
5427
  if (manifestModule) {
5398
5428
  server2.moduleGraph.invalidateModule(manifestModule);
@@ -5407,7 +5437,7 @@ if (import.meta.hot) {
5407
5437
  return [];
5408
5438
  }
5409
5439
  }
5410
- if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _477 => _477.environments, 'access', _478 => _478.client, 'optionalAccess', _479 => _479.moduleGraph, 'access', _480 => _480.getModulesByFile, 'call', _481 => _481(normalizedFile), 'optionalAccess', _482 => _482.size]) && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
5440
+ if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _474 => _474.environments, 'access', _475 => _475.client, 'optionalAccess', _476 => _476.moduleGraph, 'access', _477 => _477.getModulesByFile, 'call', _478 => _478(normalizedFile), 'optionalAccess', _479 => _479.size]) && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
5411
5441
  logUpdate("PAGE", `updated ${path6.basename(file)}`);
5412
5442
  reloadAfterEdit();
5413
5443
  return [];
@@ -5505,7 +5535,7 @@ function createPageDataMiddlewareResponse(res) {
5505
5535
  return (...args) => {
5506
5536
  if (captures(target.statusCode, target.getHeader("location"))) {
5507
5537
  const callback = args.find((arg) => typeof arg === "function");
5508
- _optionalChain([callback, 'optionalCall', _483 => _483()]);
5538
+ _optionalChain([callback, 'optionalCall', _480 => _480()]);
5509
5539
  return property === "write" ? true : response;
5510
5540
  }
5511
5541
  return target[property](...args);
@@ -5569,12 +5599,12 @@ function isFarmClientVirtualId(id) {
5569
5599
  }
5570
5600
  function isClientEnvironment(context, loadOptions) {
5571
5601
  const environment = context.environment;
5572
- if (_optionalChain([environment, 'optionalAccess', _484 => _484.config, 'optionalAccess', _485 => _485.consumer])) return environment.config.consumer === "client";
5573
- if (_optionalChain([environment, 'optionalAccess', _486 => _486.name])) return environment.name === "client";
5574
- return _optionalChain([loadOptions, 'optionalAccess', _487 => _487.ssr]) !== true;
5602
+ if (_optionalChain([environment, 'optionalAccess', _481 => _481.config, 'optionalAccess', _482 => _482.consumer])) return environment.config.consumer === "client";
5603
+ if (_optionalChain([environment, 'optionalAccess', _483 => _483.name])) return environment.name === "client";
5604
+ return _optionalChain([loadOptions, 'optionalAccess', _484 => _484.ssr]) !== true;
5575
5605
  }
5576
5606
  function invalidateProgrammaticClientRouteModules(server) {
5577
- const graph = _optionalChain([server, 'access', _488 => _488.environments, 'optionalAccess', _489 => _489.client, 'optionalAccess', _490 => _490.moduleGraph]);
5607
+ const graph = _optionalChain([server, 'access', _485 => _485.environments, 'optionalAccess', _486 => _486.client, 'optionalAccess', _487 => _487.moduleGraph]);
5578
5608
  if (!graph) return;
5579
5609
  for (const [id, module] of graph.idToModuleMap) {
5580
5610
  if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
@@ -5584,26 +5614,27 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
5584
5614
  const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5585
5615
  const routesFile = resolveRealModuleFile(parsed.filePath, root);
5586
5616
  watchFile(routesFile);
5587
- return _chunkODYKCC6Wcjs.generateProgrammaticClientRouteModule.call(void 0, {
5617
+ return _chunk46UV2E7Icjs.generateProgrammaticClientRouteModule.call(void 0, {
5588
5618
  kind: parsed.kind,
5589
5619
  routePath: parsed.routePath,
5590
5620
  routesFile,
5591
- route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _491 => _491.routes, 'access', _492 => _492.get, 'call', _493 => _493(
5592
- _chunkODYKCC6Wcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5621
+ route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _488 => _488.routes, 'access', _489 => _489.get, 'call', _490 => _490(
5622
+ _chunk46UV2E7Icjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5593
5623
  )]),
5594
- rendererServer: renderer.server,
5624
+ // React's client module exports no createElement; the main client entry imports React too.
5625
+ rendererClient: _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
5595
5626
  toImportSpecifier: (file) => toProgrammaticRouteImportSpecifier(file, root)
5596
5627
  });
5597
5628
  }
5598
5629
  function resolveRealModuleFile(filePath, root) {
5599
- const resolved = _nullishCoalesce(_chunkODYKCC6Wcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5630
+ const resolved = _nullishCoalesce(_chunk46UV2E7Icjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5600
5631
  try {
5601
- return _chunkGC5ROI3Acjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
5632
+ return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
5602
5633
  } catch (e28) {
5603
- return _chunkGC5ROI3Acjs.toPosixPath.call(void 0, resolved);
5634
+ return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, resolved);
5604
5635
  }
5605
5636
  }
5606
- function generateProgrammaticRouteModule(moduleId, root, renderer = _chunk67MZTLTFcjs.REACT_RENDERER) {
5637
+ function generateProgrammaticRouteModule(moduleId, root, renderer = _chunkM6DAIE4Tcjs.REACT_RENDERER) {
5607
5638
  const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5608
5639
  if (!parsed) {
5609
5640
  return "";
@@ -5896,7 +5927,7 @@ export const OPTIONS = __farmRoute.methods.OPTIONS;
5896
5927
  `.trim();
5897
5928
  }
5898
5929
  function toProgrammaticRouteImportSpecifier(filePath, root) {
5899
- return root ? _chunkGC5ROI3Acjs.toViteModuleId.call(void 0, filePath, root) : filePath;
5930
+ return root ? _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, filePath, root) : filePath;
5900
5931
  }
5901
5932
  async function parseRouteModuleProps(routeModule, input) {
5902
5933
  if (typeof routeModule.__farmResolveRouteProps === "function") {
@@ -5910,12 +5941,12 @@ async function parseRouteModuleProps(routeModule, input) {
5910
5941
  }
5911
5942
  const schemas = routeModule.__farmRouteSchemas;
5912
5943
  const params = parseRouteModuleSchema(
5913
- _optionalChain([schemas, 'optionalAccess', _494 => _494.params]),
5944
+ _optionalChain([schemas, 'optionalAccess', _491 => _491.params]),
5914
5945
  input.props.params,
5915
5946
  "params",
5916
5947
  input.routePath
5917
5948
  );
5918
- const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _495 => _495.search]), input.search, "search", input.routePath);
5949
+ const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _492 => _492.search]), input.search, "search", input.routePath);
5919
5950
  return {
5920
5951
  ...input.props,
5921
5952
  params,
@@ -5934,24 +5965,33 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
5934
5965
  throw new Error(`Invalid ${label} for route "${routePath}": ${message}`);
5935
5966
  }
5936
5967
  }
5937
- function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterReact, renderer = _chunk67MZTLTFcjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
5938
- const providerClientCode = _chunkHVMQAVZKcjs.generateFarmIntegrationProviderClientCode.call(void 0,
5968
+ function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterReact, renderer = _chunkM6DAIE4Tcjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
5969
+ const providerClientCode = _chunkCL7BUGVBcjs.generateFarmIntegrationProviderClientCode.call(void 0,
5939
5970
  integrationProviders,
5940
5971
  root,
5941
5972
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
5942
5973
  );
5943
- const clientPluginEntry = _chunkMBD34AS5cjs.generateFarmClientPluginEntryCode.call(void 0,
5974
+ const clientPluginEntry = _chunkZ5BANEQDcjs.generateFarmClientPluginEntryCode.call(void 0,
5944
5975
  plugins,
5945
5976
  root,
5946
5977
  srcDir,
5947
5978
  publicRuntimeConfig
5948
5979
  );
5949
- const appSetupPath = _chunk67MZTLTFcjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
5950
- const rendererClientImports = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
5980
+ const appSetupPath = _chunkM6DAIE4Tcjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
5981
+ const rendererClientImports = _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
5951
5982
  import { hydrateRoot, createRoot } from 'react-dom/client'
5952
- import { restorePagePosition } from '@farm.js/core/internal/client-runtime'` : appSetupPath ? `import React, { hydrateRoot, createRoot, configureApp as __farmConfigureApp } from ${JSON.stringify(renderer.client)}
5953
- import __farmAppSetup from ${JSON.stringify(_chunkGC5ROI3Acjs.toViteModuleId.call(void 0, appSetupPath, root))}
5954
- __farmConfigureApp(__farmAppSetup)` : `import React, { hydrateRoot, createRoot } from ${JSON.stringify(renderer.client)}`;
5983
+ import { restorePagePosition } from '@farm.js/core/internal/client-runtime'` : (
5984
+ // Named exports only: a renderer's client module needs no default export. `React` is a
5985
+ // copy of the namespace, as in the production entry, where Rolldown warns about each
5986
+ // optional export (`Children`, `markFunctionComponent`) feature-checked on the namespace.
5987
+ appSetupPath ? `import * as __farmRendererClient from ${JSON.stringify(renderer.client)}
5988
+ import { hydrateRoot, createRoot, configureApp as __farmConfigureApp } from ${JSON.stringify(renderer.client)}
5989
+ import __farmAppSetup from ${JSON.stringify(_chunk7U4XF76Rcjs.toViteModuleId.call(void 0, appSetupPath, root))}
5990
+ const React = { ...__farmRendererClient }
5991
+ __farmConfigureApp(__farmAppSetup)` : `import * as __farmRendererClient from ${JSON.stringify(renderer.client)}
5992
+ import { hydrateRoot, createRoot } from ${JSON.stringify(renderer.client)}
5993
+ const React = { ...__farmRendererClient }`
5994
+ );
5955
5995
  const isolatedHydrationImport = isolatedHydrationEnabled ? `${islandValues ? "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph, createFarmServerTreeElement, createFarmServerTreeLayout } from '@farm.js/core/internal/islands-runtime'" : "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph } from '@farm.js/core/internal/isolated-boundary'\nimport { createFarmServerTreeElement } from '@farm.js/core/internal/server-tree'"}` : "";
5956
5996
  const docsAdapterImportBlock = _chunkSM2SYWARcjs.generateFarmDocsAdapterClientRuntime.call(void 0,
5957
5997
  docsAdapterReact,
@@ -5990,7 +6030,7 @@ async function createFarmServerTreePageElement(source, pathname) {
5990
6030
  return null;
5991
6031
  }
5992
6032
  }
5993
- ${islandValues ? `${_chunkHVMQAVZKcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6033
+ ${islandValues ? `${_chunkCL7BUGVBcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
5994
6034
  let farmLastRouteState = null;
5995
6035
 
5996
6036
  // A hot update to a layout tree's client module renders the route again.
@@ -6007,17 +6047,18 @@ function rerenderFarmTreeLayouts() {}`;
6007
6047
  return `
6008
6048
  ${rendererClientImports}
6009
6049
  ${isolatedHydrationImport}
6010
- import { installChunkErrorRecovery, SPARouter } from '@farm.js/core/client'
6011
6050
  import { createClientPluginManager } from '@farm.js/core/plugin/client'
6051
+ // Not @farm.js/core/client: that module's graph imports react, which other renderers' apps lack.
6052
+ import { SPARouter } from '@farm.js/core/internal/spa-router'
6012
6053
  import { isFarmRouteActive } from '@farm.js/core/router'
6013
- import { installFarmLinkPrefetch, isFarmBlockedNavigationURL, readFarmLinkNavigateOptions, rememberFarmLinkLocale, replayFarmQueuedInteraction, scheduleFarmIslandHydration, createFarmSearchParams, searchParamsToObject, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from '@farm.js/core/internal/client-runtime'
6054
+ import { installChunkErrorRecovery, installFarmLinkPrefetch, isFarmBlockedNavigationURL, readFarmLinkNavigateOptions, rememberFarmLinkLocale, replayFarmQueuedInteraction, scheduleFarmIslandHydration, createFarmSearchParams, searchParamsToObject, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from '@farm.js/core/internal/client-runtime'
6014
6055
  import { reviveDeferredData } from '@farm.js/core/deferred'
6015
6056
  import {
6016
6057
  createFarmDeploymentMismatchError,
6017
6058
  createFarmDeploymentRequestHeaders,
6018
6059
  isFarmDeploymentMismatchResponse,
6019
6060
  } from '@farm.js/core/deployment'
6020
- ${islandValues ? "import { getFarmIslandValueHeaders } from '@farm.js/core/internal/client-runtime'" : ""}
6061
+ ${islandValues ? "import { getFarmIslandValueHeaders, keepFarmIslandValues } from '@farm.js/core/internal/client-runtime'" : ""}
6021
6062
  ${providerClientCode.imports}
6022
6063
  ${clientPluginEntry.imports}
6023
6064
 
@@ -6830,7 +6871,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
6830
6871
  return loadedLayouts;
6831
6872
  }
6832
6873
 
6833
- ${_chunkHVMQAVZKcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6874
+ ${_chunkCL7BUGVBcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6834
6875
  function wrapWithLoadedLayouts(element, loadedLayouts, params) {
6835
6876
  let wrapped = element;
6836
6877
  for (let index = loadedLayouts.length - 1; index >= 0; index--) {
@@ -6909,7 +6950,7 @@ async function buildWrappedHydrationElement(PageComponent, pageProps, layouts =
6909
6950
 
6910
6951
  function hydrateFarmRoute(container, route) {
6911
6952
  farmLastRouteState = route;
6912
- ${_chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? "return hydrateRoot(container, route.element);" : "return route.layouts.length > 0 ? hydrateRoot(container, route.element, route) : hydrateRoot(container, route.element);"}
6953
+ ${_chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) ? "return hydrateRoot(container, route.element);" : "return route.layouts.length > 0 ? hydrateRoot(container, route.element, route) : hydrateRoot(container, route.element);"}
6913
6954
  }
6914
6955
 
6915
6956
  function renderFarmRoute(root, route) {
@@ -7053,7 +7094,7 @@ async function tryHydrateImportedPage(
7053
7094
  wrap: wrapFarmClientRouteGraph,
7054
7095
  };
7055
7096
  } else if (useHydrate && container?.id === '__farm_page__') {
7056
- wrappedElement = wrapFarmClientRouteGraph(${_chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? "restorePagePosition(React, container, pageElement)" : "pageElement"});
7097
+ wrappedElement = wrapFarmClientRouteGraph(${_chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) ? "restorePagePosition(React, container, pageElement)" : "pageElement"});
7057
7098
  } else {
7058
7099
  wrappedElement = await buildWrappedHydrationElement(
7059
7100
  currentPageComponent,
@@ -7128,7 +7169,7 @@ function readActiveLayoutPatterns() {
7128
7169
  );
7129
7170
  }
7130
7171
 
7131
- ${_chunkHVMQAVZKcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7172
+ ${_chunkCL7BUGVBcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7132
7173
 
7133
7174
  function activateFragmentScripts(root) {
7134
7175
  for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
@@ -7187,7 +7228,7 @@ function getLayoutShell(root, patterns, index, find) {
7187
7228
  return shell.innerHTML;
7188
7229
  }
7189
7230
 
7190
- ${islandValues ? _chunkHVMQAVZKcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7231
+ ${islandValues ? _chunkCL7BUGVBcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7191
7232
  container,
7192
7233
  fragment,
7193
7234
  currentPatterns,
@@ -7260,7 +7301,9 @@ ${islandValues ? `
7260
7301
  return nextTarget;
7261
7302
  }
7262
7303
 
7263
- ${islandValues ? `${_chunkHVMQAVZKcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7304
+ ${islandValues ? `${_chunkCL7BUGVBcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7305
+
7306
+ ${_chunkCL7BUGVBcjs.FARM_EARLY_NAVIGATION_SOURCE}
7264
7307
 
7265
7308
  // Islands mode navigates as the production client does: it fetches the page itself, names the
7266
7309
  // layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
@@ -7333,19 +7376,21 @@ async function fetchFarmNavigationDocument(path, context) {
7333
7376
  keepLayouts && !context.refresh && !activeLayoutShouldHydrate
7334
7377
  ? readLayoutIdentities(container)
7335
7378
  : [];
7336
- const response = await fetch(url.pathname + url.search, {
7337
- signal: context.signal,
7338
- redirect: 'manual',
7339
- headers: createFarmDeploymentRequestHeaders(deploymentId, {
7340
- Accept: 'text/html',
7341
- // A refresh arrives whole, like a transition: the islands it keeps are all in it.
7342
- ...(context.prefetch || context.refresh ? {} : { 'F-Stream': 'flush' }),
7343
- ...getFarmIslandValueHeaders(),
7344
- // A prefetch names its layouts even when it keeps none: that marks it as a navigation,
7345
- // which the server answers without loading.tsx.
7346
- ...(identities.length || context.prefetch ? { 'F-Layouts': JSON.stringify(identities) } : {}),
7347
- }),
7379
+ const headers = createFarmDeploymentRequestHeaders(deploymentId, {
7380
+ Accept: 'text/html',
7381
+ // A refresh arrives whole, like a transition: the islands it keeps are all in it.
7382
+ ...(context.prefetch || context.refresh ? {} : { 'F-Stream': 'flush' }),
7383
+ // The swap keeps the values only the page holds (keepFarmIslandValues).
7384
+ ...getFarmIslandValueHeaders(container),
7385
+ // A prefetch names its layouts even when it keeps none: that marks it as a navigation,
7386
+ // which the server answers without loading.tsx.
7387
+ ...(identities.length || context.prefetch ? { 'F-Layouts': JSON.stringify(identities) } : {}),
7348
7388
  });
7389
+ const target = url.pathname + url.search;
7390
+ const response = await (
7391
+ (!context.prefetch && takeFarmEarlyNavigation(target, headers, context.signal)) ||
7392
+ fetch(target, { signal: context.signal, redirect: 'manual', headers })
7393
+ );
7349
7394
  if (isFarmDeploymentMismatchResponse(response, deploymentId)) {
7350
7395
  const error = createFarmDeploymentMismatchError(response, deploymentId || 'unknown');
7351
7396
  window.dispatchEvent(new CustomEvent('farm:deployment-mismatch', { detail: error }));
@@ -7576,6 +7621,7 @@ async function renderPage(pageData, info) {
7576
7621
  );
7577
7622
  } else {
7578
7623
  ${isolatedHydrationEnabled ? "let isolatedHydrationScope = container;" : ""}
7624
+ ${islandValues ? "const keepValues = keepFarmIslandValues(container);" : ""}
7579
7625
  // A route whose layouts hydrate renders them for its own root (inline client components,
7580
7626
  // islands mode's layout trees), so the HTML of shared layouts is replaced too.
7581
7627
  if (activeLayoutShouldHydrate || layoutShouldHydrate) {
@@ -7590,6 +7636,7 @@ async function renderPage(pageData, info) {
7590
7636
  delete window.__FARM_REACT_ROOT__;
7591
7637
  ${isolatedHydrationEnabled ? islandValues ? "isolatedHydrationScope = (pageData.farmDocument ? replaceNavigationBoundary(container, fragment, readLayoutIdentities(container), readLayoutIdentities(fragment), info?.refresh === true, findLayoutBoundaryByIdentity) : replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns, info?.refresh === true)) || container;" : "isolatedHydrationScope = replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns, info?.refresh === true) || container;" : islandValues ? "if (pageData.farmDocument) replaceNavigationBoundary(container, fragment, readLayoutIdentities(container), readLayoutIdentities(fragment), false, findLayoutBoundaryByIdentity); else replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns);" : "replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns);"}
7592
7638
  }
7639
+ ${islandValues ? "keepValues();" : ""}
7593
7640
 
7594
7641
  const hydrationController = new AbortController();
7595
7642
  if (
@@ -7849,27 +7896,6 @@ function farmIslandsOnlyDocument() {
7849
7896
  }
7850
7897
  },
7851
7898
  });
7852
- ${islandValues ? `// A layout root that waits for a click renders again on a navigation, and a link under the
7853
- // pointer is a navigation on its way: hydrate the root now, as the production entry does.
7854
- if (layoutShouldHydrate && islandStrategy !== 'load') {
7855
- const hydrateForLink = (target) => {
7856
- const anchor = target instanceof Element ? target.closest('a[href]') : null;
7857
- const href = anchor && anchor.getAttribute('href');
7858
- if (!href || href.startsWith('#') || hasAbsoluteNavigationHref(href)) return false;
7859
- if (!pageContainer.contains(anchor)) return false;
7860
- document.dispatchEvent(
7861
- new CustomEvent('farm:island-interaction', { detail: { target: anchor, kind: null } }),
7862
- );
7863
- return true;
7864
- };
7865
- const onLinkIntent = (event) => {
7866
- if (hydrateForLink(event.target)) document.removeEventListener('mouseover', onLinkIntent, true);
7867
- };
7868
- if (!hydrateForLink(pageContainer.querySelector('a[href]:hover'))) {
7869
- document.addEventListener('mouseover', onLinkIntent, true);
7870
- void pageHydration.finally(() => document.removeEventListener('mouseover', onLinkIntent, true));
7871
- }
7872
- }` : ""}
7873
7899
  ${isolatedHydrationEnabled ? `const isolatedHydration =
7874
7900
  hasIsolatedClientBoundaries &&
7875
7901
  !layoutShouldHydrate
@@ -7978,10 +8004,10 @@ function generateClientManifest(bundle) {
7978
8004
  return manifest;
7979
8005
  }
7980
8006
  async function defineConfig(config = {}) {
7981
- const tailwindVitePlugin = await _chunkMBD34AS5cjs.loadTailwindVitePlugin.call(void 0, );
8007
+ const tailwindVitePlugin = await _chunkZ5BANEQDcjs.loadTailwindVitePlugin.call(void 0, );
7982
8008
  const appRoot = path6.resolve(config.root || process.cwd());
7983
- if (_optionalChain([config, 'access', _496 => _496.extends, 'optionalAccess', _497 => _497.length])) {
7984
- const { config: layeredConfig } = await import("./layers-HMEGUEXM.cjs").then(
8009
+ if (_optionalChain([config, 'access', _493 => _493.extends, 'optionalAccess', _494 => _494.length])) {
8010
+ const { config: layeredConfig } = await import("./layers-XLOMMQP7.cjs").then(
7985
8011
  ({ resolveFarmLayers }) => resolveFarmLayers(config, {
7986
8012
  root: appRoot,
7987
8013
  mode: process.env.NODE_ENV === "production" ? "production" : "development"
@@ -7989,12 +8015,12 @@ async function defineConfig(config = {}) {
7989
8015
  );
7990
8016
  config = layeredConfig;
7991
8017
  }
7992
- config.renderer = _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, config.renderer);
7993
- config.images = _chunkHVMQAVZKcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
7994
- const rendererVitePlugins = await _chunk67MZTLTFcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
8018
+ config.renderer = _chunkM6DAIE4Tcjs.resolveFarmRenderer.call(void 0, config.renderer);
8019
+ config.images = _chunkCL7BUGVBcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
8020
+ const rendererVitePlugins = await _chunkM6DAIE4Tcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
7995
8021
  ssr: true
7996
8022
  });
7997
- const reactRefreshPlugins = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkY2FEFQAYcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
8023
+ const reactRefreshPlugins = _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkY2FEFQAYcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
7998
8024
  const nodeBuiltinStubs = {
7999
8025
  "node:string_decoder": "data:text/javascript,export class StringDecoder { write(buf) { return ''; } end() { return ''; } }; export default StringDecoder;",
8000
8026
  "node:buffer": "data:text/javascript,export const Buffer = { from: () => ({}), alloc: () => ({}), isBuffer: () => false }; export default { Buffer };",
@@ -8082,13 +8108,13 @@ async function defineConfig(config = {}) {
8082
8108
  if (!serverStarted) {
8083
8109
  serverStarted = true;
8084
8110
  const elapsed = Date.now() - startTime;
8085
- const address = _optionalChain([server, 'access', _498 => _498.httpServer, 'optionalAccess', _499 => _499.address, 'call', _500 => _500()]);
8111
+ const address = _optionalChain([server, 'access', _495 => _495.httpServer, 'optionalAccess', _496 => _496.address, 'call', _497 => _497()]);
8086
8112
  const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
8087
8113
  const hostConfig = server.config.server.host;
8088
8114
  const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
8089
8115
  console.log("");
8090
8116
  console.log(
8091
- ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkLMXGCFAMcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8117
+ ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkNSLRK5DKcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8092
8118
  );
8093
8119
  console.log("");
8094
8120
  console.log(
@@ -8122,27 +8148,29 @@ async function defineConfig(config = {}) {
8122
8148
  plugins: [
8123
8149
  // `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
8124
8150
  _chunkY2FEFQAYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
8125
- _chunkHVMQAVZKcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8151
+ _chunkCL7BUGVBcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8126
8152
  tailwindVitePlugin,
8127
8153
  ...rendererVitePlugins,
8128
8154
  ...reactRefreshPlugins,
8129
8155
  viteBrowserExternalPlugin,
8130
8156
  farmI18nClientBridgePlugin(),
8131
8157
  farmServerOnlyEntriesPlugin({ distDir: config.distDir || ".farm" }),
8158
+ farmNavigationPlugin(config.renderer),
8132
8159
  farmIslandContainersPlugin(config),
8133
8160
  farmPlugin(config),
8134
- _chunkODYKCC6Wcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8161
+ _chunk46UV2E7Icjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8135
8162
  farmBrandingPlugin
8136
8163
  ],
8137
8164
  customLogger: farmLogger,
8138
8165
  clearScreen: false,
8139
8166
  optimizeDeps: {
8140
- ..._chunkHVMQAVZKcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8141
- _chunkHVMQAVZKcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8167
+ ..._chunkCL7BUGVBcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8168
+ _chunkCL7BUGVBcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8142
8169
  appRoot,
8143
- _chunkQMR2TUVZcjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
8170
+ _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
8144
8171
  ),
8145
- config.renderer
8172
+ config.renderer,
8173
+ appRoot
8146
8174
  ),
8147
8175
  // Pre-bundle every framework client-runtime entry with the renderer. Without
8148
8176
  // this, Vite can discover a linked Farm entry after the page has loaded,
@@ -8180,8 +8208,8 @@ async function defineConfig(config = {}) {
8180
8208
  dedupe: [...config.renderer.dedupe || []],
8181
8209
  // Stub out problematic server-only modules during dev mode
8182
8210
  alias: {
8183
- ..._chunkQMR2TUVZcjs.getFarmLayerAliases.call(void 0, config.layers),
8184
- ..._chunkHVMQAVZKcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8211
+ ..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, config.layers),
8212
+ ..._chunkCL7BUGVBcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8185
8213
  // Nitro internals that should not be resolved in browser
8186
8214
  "supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
8187
8215
  "@poppinss/dumper": "data:text/javascript,export default {};",
@@ -8213,4 +8241,6 @@ async function defineConfig(config = {}) {
8213
8241
 
8214
8242
 
8215
8243
 
8216
- exports.isViteModuleRequest = isViteModuleRequest; exports.isViteDevClientRequest = isViteDevClientRequest; exports.farmImageImportsPlugin = farmImageImportsPlugin; exports.farmI18nClientBridgePlugin = farmI18nClientBridgePlugin; exports.farmIslandContainersPlugin = farmIslandContainersPlugin; exports.farmServerOnlyEntriesPlugin = farmServerOnlyEntriesPlugin; exports.withFarmRequestTracing = withFarmRequestTracing; exports.rewriteEarlySsrRelativeImports = rewriteEarlySsrRelativeImports; exports.transformIsolatedClientBoundaryModule = transformIsolatedClientBoundaryModule; exports.shouldEmitFarmClientRootHmr = shouldEmitFarmClientRootHmr; exports.farmPlugin = farmPlugin; exports.defineConfig = defineConfig;
8244
+
8245
+
8246
+ exports.isViteModuleRequest = isViteModuleRequest; exports.isViteDevClientRequest = isViteDevClientRequest; exports.farmImageImportsPlugin = farmImageImportsPlugin; exports.farmI18nClientBridgePlugin = farmI18nClientBridgePlugin; exports.farmNavigationPlugin = farmNavigationPlugin; exports.farmIslandContainersPlugin = farmIslandContainersPlugin; exports.farmServerOnlyEntriesPlugin = farmServerOnlyEntriesPlugin; exports.withFarmRequestTracing = withFarmRequestTracing; exports.rewriteEarlySsrRelativeImports = rewriteEarlySsrRelativeImports; exports.transformIsolatedClientBoundaryModule = transformIsolatedClientBoundaryModule; exports.isFarmAppRuntimeFile = isFarmAppRuntimeFile; exports.shouldEmitFarmClientRootHmr = shouldEmitFarmClientRootHmr; exports.farmPlugin = farmPlugin; exports.defineConfig = defineConfig;