@farm.js/core 0.1.78 → 0.1.80

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 (363) 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-BPa5n0ld.d.ts} +1 -1
  4. package/dist/{agent-mcp.d-CYHfcjur.d.mts → agent-mcp.d-DOP95Jxm.d.mts} +1 -1
  5. package/dist/agent-runtime.cjs +2 -2
  6. package/dist/agent-runtime.d.mts +4 -4
  7. package/dist/agent-runtime.d.ts +4 -4
  8. package/dist/agent-runtime.mjs +1 -1
  9. package/dist/{analyzer-M2BG6QYU.mjs → analyzer-F7CWE5VA.mjs} +2 -2
  10. package/dist/analyzer-I7RBBQ65.cjs +16 -0
  11. package/dist/api/node.cjs +6 -6
  12. package/dist/api/node.d.mts +6 -6
  13. package/dist/api/node.d.ts +6 -6
  14. package/dist/api/node.mjs +5 -5
  15. package/dist/api/route-manager.cjs +8 -8
  16. package/dist/api/route-manager.d.mts +6 -6
  17. package/dist/api/route-manager.d.ts +6 -6
  18. package/dist/api/route-manager.mjs +7 -7
  19. package/dist/api/runtime.cjs +5 -5
  20. package/dist/api/runtime.d.mts +5 -5
  21. package/dist/api/runtime.d.ts +5 -5
  22. package/dist/api/runtime.mjs +4 -4
  23. package/dist/api.cjs +10 -10
  24. package/dist/api.d.mts +7 -7
  25. package/dist/api.d.ts +7 -7
  26. package/dist/api.mjs +9 -9
  27. package/dist/{app-manifest.d-6NCkLQ1y.d.mts → app-manifest.d-9UD6BznX.d.mts} +1 -1
  28. package/dist/{app-manifest.d-DuqLBcmi.d.ts → app-manifest.d-CO6Iu0Hx.d.ts} +1 -1
  29. package/dist/app-markdown.cjs +5 -5
  30. package/dist/app-markdown.d.mts +5 -5
  31. package/dist/app-markdown.d.ts +5 -5
  32. package/dist/app-markdown.mjs +4 -4
  33. package/dist/{app.d-Dk2HkvPh.d.mts → app.d-DXeRWZK7.d.mts} +4 -4
  34. package/dist/{app.d-Bz6vYBFF.d.ts → app.d-DwX1ePhs.d.ts} +4 -4
  35. package/dist/cache.cjs +3 -3
  36. package/dist/cache.mjs +2 -2
  37. package/dist/{chunk-QYOAGT3E.cjs → chunk-2BEGVSDF.cjs} +6 -5
  38. package/dist/{chunk-4SLHSODZ.cjs → chunk-2FK47RRZ.cjs} +13 -13
  39. package/dist/{chunk-2YJ4DHTD.cjs → chunk-2NOHVIJ3.cjs} +2 -2
  40. package/dist/{chunk-GDM3ZD2O.cjs → chunk-2OFP3IVA.cjs} +5 -1
  41. package/dist/{chunk-B3IRRANH.mjs → chunk-2RRTOKRZ.mjs} +1 -1
  42. package/dist/{chunk-PNWRH6TR.mjs → chunk-3JQBQG7K.mjs} +4 -4
  43. package/dist/{chunk-H76C5AOU.mjs → chunk-3K2E55BJ.mjs} +2 -2
  44. package/dist/{chunk-VJ6L7TII.cjs → chunk-3SPECQXI.cjs} +31 -20
  45. package/dist/{chunk-R77D7TCZ.mjs → chunk-44G4XHEL.mjs} +13 -6
  46. package/dist/{chunk-6XDDE7M6.cjs → chunk-4H4ZXUNB.cjs} +3 -3
  47. package/dist/{chunk-LIC6CMLB.mjs → chunk-4MIDUSIX.mjs} +13 -13
  48. package/dist/{chunk-F4ID7BGO.cjs → chunk-4OFWG4IK.cjs} +7 -7
  49. package/dist/{chunk-VRI43FDN.mjs → chunk-4WXNTAOM.mjs} +1 -1
  50. package/dist/{chunk-5KISFWD2.cjs → chunk-5OAN7BG5.cjs} +12 -12
  51. package/dist/{chunk-DPBQRDWW.cjs → chunk-5VDJEKGK.cjs} +3 -3
  52. package/dist/{chunk-CYNQPKA4.cjs → chunk-5ZHC6QGD.cjs} +2 -2
  53. package/dist/{chunk-ALEUMLJN.mjs → chunk-67JTJCAS.mjs} +3 -2
  54. package/dist/{chunk-CBP7AKZH.mjs → chunk-6GJZJAED.mjs} +1 -1
  55. package/dist/{chunk-K3ZELA6U.cjs → chunk-7DD5TNPS.cjs} +8 -8
  56. package/dist/{chunk-GC5ROI3A.cjs → chunk-7U4XF76R.cjs} +1 -1
  57. package/dist/{chunk-62DZHPDK.cjs → chunk-7YLDUB4R.cjs} +10 -10
  58. package/dist/{chunk-ZEWIWAS2.mjs → chunk-A5D3UMLJ.mjs} +1 -1
  59. package/dist/{chunk-NNGBTJCX.cjs → chunk-ANZLZNNX.cjs} +83 -25
  60. package/dist/{chunk-CSAIIMY3.mjs → chunk-ATISIC6G.mjs} +1 -1
  61. package/dist/{chunk-ZCYGYIC2.cjs → chunk-AXA2BSX3.cjs} +2 -2
  62. package/dist/{chunk-BNCKXPCU.cjs → chunk-BIAGSYIZ.cjs} +30 -30
  63. package/dist/{chunk-X2SEYK7I.mjs → chunk-BPWTSPK6.mjs} +3 -3
  64. package/dist/{chunk-LMXGCFAM.cjs → chunk-CCMP4JD2.cjs} +1 -1
  65. package/dist/{chunk-JHZ6HULQ.cjs → chunk-CGIVCGH5.cjs} +2 -2
  66. package/dist/{chunk-ERT6HQAI.mjs → chunk-CNDBLUKI.mjs} +2 -2
  67. package/dist/{chunk-OGVOKAQU.mjs → chunk-COTFX4GT.mjs} +1 -1
  68. package/dist/{chunk-RK4MGL6Q.mjs → chunk-CYRO3WP4.mjs} +4 -3
  69. package/dist/{chunk-2G6JPLSL.cjs → chunk-DVHFIETW.cjs} +25 -18
  70. package/dist/{chunk-F35C3TJZ.mjs → chunk-E4E4Y5FD.mjs} +1 -1
  71. package/dist/{chunk-VCW6BR6U.mjs → chunk-EG5YBYHO.mjs} +2 -2
  72. package/dist/{chunk-2DA7CLY7.mjs → chunk-EILUVBKS.mjs} +14 -0
  73. package/dist/{chunk-XT2CHTDN.mjs → chunk-EY7ED5UW.mjs} +3 -3
  74. package/dist/{chunk-ZO6TOLHL.mjs → chunk-FS55CNTC.mjs} +1 -1
  75. package/dist/{chunk-DD2ANOEF.cjs → chunk-G4SZC2WH.cjs} +589 -472
  76. package/dist/{chunk-H5OVJHXY.cjs → chunk-GAWSWJJ2.cjs} +27 -27
  77. package/dist/{chunk-CKNZJFK5.cjs → chunk-GBESKA76.cjs} +3 -3
  78. package/dist/{chunk-EBFTAVGD.mjs → chunk-GBW5DU7V.mjs} +327 -210
  79. package/dist/{chunk-OVUU2RCQ.mjs → chunk-HD5FLXP2.mjs} +1 -1
  80. package/dist/{chunk-Q2EKSSEG.cjs → chunk-HEDGTXXB.cjs} +14 -14
  81. package/dist/{chunk-5QZT2EQN.cjs → chunk-HNUBRUFQ.cjs} +2 -2
  82. package/dist/{chunk-JA6RML7C.mjs → chunk-HR4N2K4V.mjs} +2 -2
  83. package/dist/{chunk-6D3CJFNU.cjs → chunk-HR5GU4UU.cjs} +7 -7
  84. package/dist/{chunk-SX535SU5.cjs → chunk-IJPRCQHW.cjs} +10 -10
  85. package/dist/{chunk-VRJAMU34.mjs → chunk-JGEN2FIT.mjs} +1 -1
  86. package/dist/{chunk-QES76U42.mjs → chunk-K3XKEZR6.mjs} +3 -3
  87. package/dist/{chunk-LPXJEZJK.mjs → chunk-KCJBIWBM.mjs} +2 -2
  88. package/dist/{chunk-7JTVN6IJ.mjs → chunk-KEU55O2D.mjs} +1 -1
  89. package/dist/{chunk-5REIO5DT.mjs → chunk-KKVRWNDH.mjs} +3 -3
  90. package/dist/{chunk-NSNQLBHR.cjs → chunk-KMGHXIDA.cjs} +2 -2
  91. package/dist/{chunk-Z2FFLTF5.mjs → chunk-LTXKRIST.mjs} +2 -2
  92. package/dist/{chunk-F7PKUP6P.cjs → chunk-LVGB5PYK.cjs} +27 -27
  93. package/dist/{chunk-7RQ5KAK6.mjs → chunk-MDEFTF63.mjs} +69 -14
  94. package/dist/{chunk-IWGGRXD2.cjs → chunk-MHKPXX3J.cjs} +2 -2
  95. package/dist/{chunk-5DREJN4G.cjs → chunk-MQOHYV6L.cjs} +15 -15
  96. package/dist/{chunk-BGUTIQII.mjs → chunk-MUZHULW2.mjs} +1 -1
  97. package/dist/{chunk-WGNGM6MJ.mjs → chunk-MZ5QGWRW.mjs} +2 -2
  98. package/dist/{chunk-DZZHTMWM.cjs → chunk-N3H7UPBM.cjs} +3 -2
  99. package/dist/{chunk-WJ4NUY2H.mjs → chunk-NJ4OASLP.mjs} +4 -4
  100. package/dist/{chunk-EVVV2XZ2.cjs → chunk-NW3DL2PM.cjs} +53 -7
  101. package/dist/{chunk-WRWJ7IWT.cjs → chunk-OLKYHTLN.cjs} +5 -5
  102. package/dist/{chunk-EVIWKPJV.cjs → chunk-PLJMEUAN.cjs} +15 -1
  103. package/dist/{chunk-EMTN5ABC.mjs → chunk-POVHO46S.mjs} +1 -1
  104. package/dist/{chunk-X3Y6JWJG.cjs → chunk-PWMJBCAN.cjs} +3 -3
  105. package/dist/{chunk-PG7J7XYT.cjs → chunk-Q4TRGTO7.cjs} +6 -6
  106. package/dist/{chunk-KUXEII7V.mjs → chunk-Q4YEAWUK.mjs} +1 -1
  107. package/dist/{chunk-IGE5BAWK.mjs → chunk-QBJ6N5MT.mjs} +53 -7
  108. package/dist/{chunk-PKXGFQZS.mjs → chunk-QD34VE4N.mjs} +1 -1
  109. package/dist/{chunk-S6RUJRWI.mjs → chunk-QHAISITM.mjs} +1 -1
  110. package/dist/{chunk-VJI2LWTL.cjs → chunk-RFNQTQ44.cjs} +2 -2
  111. package/dist/{chunk-TZ2YPXLB.cjs → chunk-RLCOWWE5.cjs} +7 -7
  112. package/dist/{chunk-IG2JE6WJ.mjs → chunk-RLEAVG6G.mjs} +1 -1
  113. package/dist/{chunk-VO5XDZHK.mjs → chunk-RPA45OQS.mjs} +2 -2
  114. package/dist/{chunk-A37D6LOS.mjs → chunk-RQBGHHOQ.mjs} +1 -1
  115. package/dist/{chunk-BZJYPIFZ.cjs → chunk-SDICLSQU.cjs} +8 -8
  116. package/dist/{chunk-FE6KYDHC.cjs → chunk-SHDCKRP4.cjs} +3 -3
  117. package/dist/{chunk-DUSTJ6A5.mjs → chunk-SLEHAGGV.mjs} +2 -2
  118. package/dist/{chunk-26CNCIFI.cjs → chunk-T3SMMLSB.cjs} +2 -2
  119. package/dist/{chunk-K6DXKHFE.mjs → chunk-TE7AX6HB.mjs} +1 -1
  120. package/dist/{chunk-LJKTJNOF.cjs → chunk-TS3ZHJN5.cjs} +3 -3
  121. package/dist/{chunk-KHS3T3E5.mjs → chunk-TYHWZOA2.mjs} +1 -1
  122. package/dist/{chunk-Z3QXQN4U.mjs → chunk-U6GMCDRS.mjs} +1 -1
  123. package/dist/{chunk-URQW27KO.mjs → chunk-UBLKPREL.mjs} +1 -1
  124. package/dist/{chunk-DD22NQFX.cjs → chunk-UGLTOLTJ.cjs} +2 -2
  125. package/dist/{chunk-PE2LEWXA.mjs → chunk-UJPE75GF.mjs} +1 -1
  126. package/dist/{chunk-6ZFGWB75.cjs → chunk-UWOCYINY.cjs} +4 -4
  127. package/dist/{chunk-E7V2GYBP.mjs → chunk-V73Y4UBL.mjs} +67 -9
  128. package/dist/{chunk-G7B6NU4X.cjs → chunk-VFMHE5D3.cjs} +3 -3
  129. package/dist/{chunk-IXO6O2EL.cjs → chunk-VGVRGGP4.cjs} +2 -2
  130. package/dist/{chunk-YRXPDKMM.cjs → chunk-W53Z4WDI.cjs} +8 -8
  131. package/dist/{chunk-47R7CX4A.mjs → chunk-WBPVLCNE.mjs} +1 -1
  132. package/dist/{chunk-4VLXQ55O.cjs → chunk-WIZRYFB2.cjs} +3 -3
  133. package/dist/{chunk-NB2ZEBIS.cjs → chunk-WJ2O2MPP.cjs} +287 -288
  134. package/dist/{chunk-HVMQAVZK.cjs → chunk-X4TSMQWF.cjs} +333 -303
  135. package/dist/{chunk-DASQJ5UD.mjs → chunk-XF7MJSUS.mjs} +1 -1
  136. package/dist/{chunk-S7QEQCVV.mjs → chunk-XGL42MQ7.mjs} +1 -1
  137. package/dist/{chunk-YN7G22MP.cjs → chunk-XKUKWMGX.cjs} +3 -3
  138. package/dist/{chunk-FOULIN4S.cjs → chunk-XY5OZQF6.cjs} +2 -2
  139. package/dist/{chunk-RIMEFQYO.mjs → chunk-XZBBKZGW.mjs} +73 -74
  140. package/dist/{chunk-ZJGFAW5U.mjs → chunk-YHHOTKUT.mjs} +5 -1
  141. package/dist/{chunk-A7EJATEW.mjs → chunk-YN3YMSKD.mjs} +3 -3
  142. package/dist/{chunk-PDACTAVX.mjs → chunk-YOVSWY2E.mjs} +1 -1
  143. package/dist/{chunk-R5X7FDOG.mjs → chunk-YU2MNIIY.mjs} +1 -1
  144. package/dist/{chunk-42EUEYW6.cjs → chunk-YUQUGVSV.cjs} +8 -8
  145. package/dist/{chunk-KZ5BOWJS.cjs → chunk-Z4SMFUZ7.cjs} +28 -28
  146. package/dist/{chunk-MBD34AS5.cjs → chunk-Z5BANEQD.cjs} +6 -6
  147. package/dist/{chunk-AHGOHPRN.mjs → chunk-ZDYYZX73.mjs} +60 -30
  148. package/dist/{chunk-4PWGLPL6.mjs → chunk-ZIEO3DQ3.mjs} +26 -15
  149. package/dist/{chunk-XGS76V7L.cjs → chunk-ZPEZXQTM.cjs} +22 -22
  150. package/dist/{chunk-ODYKCC6W.cjs → chunk-ZVSQN7NC.cjs} +135 -80
  151. package/dist/{cli-runtime.d-BG9q2_vC.d.ts → cli-runtime.d-8BhZy_wr.d.ts} +7 -6
  152. package/dist/{cli-runtime.d-CGMGs1Zz.d.mts → cli-runtime.d-DPNTN-JV.d.mts} +7 -6
  153. package/dist/client/lifecycle.d.mts +1 -1
  154. package/dist/client/lifecycle.d.ts +1 -1
  155. package/dist/{client-component.d-CdsG1E7p.d.mts → client-component.d-CMCdyAr8.d.mts} +1 -1
  156. package/dist/{client-component.d-B84GPb_u.d.ts → client-component.d-CkDcob6D.d.ts} +1 -1
  157. package/dist/{client-plugins.d-FptsHgls.d.ts → client-plugins.d-BYIovYqX.d.ts} +4 -4
  158. package/dist/{client-plugins.d-DX-iCJWE.d.mts → client-plugins.d-WcMwOZGZ.d.mts} +4 -4
  159. package/dist/client-plugins.d.mts +4 -4
  160. package/dist/client-plugins.d.ts +4 -4
  161. package/dist/client.cjs +3 -3
  162. package/dist/client.d.mts +9 -9
  163. package/dist/client.d.ts +9 -9
  164. package/dist/client.mjs +2 -2
  165. package/dist/config.d.mts +4 -4
  166. package/dist/config.d.ts +4 -4
  167. package/dist/cron.cjs +3 -3
  168. package/dist/cron.mjs +2 -2
  169. package/dist/desktop.d.mts +5 -5
  170. package/dist/desktop.d.ts +5 -5
  171. package/dist/{devtools-7P3OUNLV.mjs → devtools-F3FDFV26.mjs} +10 -10
  172. package/dist/{devtools-TMATFNUY.cjs → devtools-JJOYTIMS.cjs} +12 -12
  173. package/dist/docs.cjs +14 -14
  174. package/dist/docs.d.mts +6 -6
  175. package/dist/docs.d.ts +6 -6
  176. package/dist/docs.mjs +13 -13
  177. package/dist/environment/vite.cjs +5 -5
  178. package/dist/environment/vite.d.mts +9 -0
  179. package/dist/environment/vite.d.ts +9 -0
  180. package/dist/environment/vite.mjs +4 -4
  181. package/dist/{handler.d-Cy3XbY_W.d.ts → handler.d-BwdOyc9x.d.ts} +1 -1
  182. package/dist/{handler.d-DSwLTpa5.d.mts → handler.d-s3IM6pbJ.d.mts} +1 -1
  183. package/dist/{headers.d-DiL9YTH3.d.mts → headers.d-BR-OXrqQ.d.mts} +1 -1
  184. package/dist/{headers.d-Qbjo38a0.d.ts → headers.d-CAW4wPey.d.ts} +1 -1
  185. package/dist/index.cjs +65 -59
  186. package/dist/{index.d-CqQKX3s6.d.mts → index.d-BEVK61zS.d.mts} +1 -1
  187. package/dist/{index.d-OccJoC6I.d.ts → index.d-ah2c89Wu.d.ts} +1 -1
  188. package/dist/index.d.mts +25 -25
  189. package/dist/index.d.ts +25 -25
  190. package/dist/index.mjs +67 -61
  191. package/dist/integrations/orm.cjs +3 -3
  192. package/dist/integrations/orm.d.mts +4 -4
  193. package/dist/integrations/orm.d.ts +4 -4
  194. package/dist/integrations/orm.mjs +2 -2
  195. package/dist/integrations.cjs +2 -2
  196. package/dist/integrations.d.mts +4 -4
  197. package/dist/integrations.d.ts +4 -4
  198. package/dist/integrations.mjs +1 -1
  199. package/dist/internal/app-markdown-runtime.cjs +4 -4
  200. package/dist/internal/app-markdown-runtime.d.mts +5 -5
  201. package/dist/internal/app-markdown-runtime.d.ts +5 -5
  202. package/dist/internal/app-markdown-runtime.mjs +3 -3
  203. package/dist/internal/build-runtime.cjs +47 -47
  204. package/dist/internal/build-runtime.d.mts +7 -7
  205. package/dist/internal/build-runtime.d.ts +7 -7
  206. package/dist/internal/build-runtime.mjs +46 -46
  207. package/dist/internal/cli-runtime.cjs +29 -26
  208. package/dist/internal/cli-runtime.d.mts +11 -11
  209. package/dist/internal/cli-runtime.d.ts +11 -11
  210. package/dist/internal/cli-runtime.mjs +28 -25
  211. package/dist/internal/client-error-overlay.cjs +4 -4
  212. package/dist/internal/client-error-overlay.mjs +1 -1
  213. package/dist/internal/client-runtime.cjs +48 -11
  214. package/dist/internal/client-runtime.d.mts +17 -21
  215. package/dist/internal/client-runtime.d.ts +17 -21
  216. package/dist/internal/client-runtime.mjs +37 -0
  217. package/dist/internal/compression-runtime.d.mts +4 -4
  218. package/dist/internal/compression-runtime.d.ts +4 -4
  219. package/dist/internal/config-runtime.cjs +12 -12
  220. package/dist/internal/config-runtime.d.mts +6 -6
  221. package/dist/internal/config-runtime.d.ts +6 -6
  222. package/dist/internal/config-runtime.mjs +11 -11
  223. package/dist/internal/infra-analytics-runtime.cjs +10 -10
  224. package/dist/internal/infra-analytics-runtime.mjs +8 -8
  225. package/dist/internal/islands-boot.cjs +33 -5
  226. package/dist/internal/islands-boot.d.mts +19 -1
  227. package/dist/internal/islands-boot.d.ts +19 -1
  228. package/dist/internal/islands-boot.mjs +32 -4
  229. package/dist/internal/native-server-fns.cjs +4 -4
  230. package/dist/internal/native-server-fns.mjs +3 -3
  231. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  232. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  233. package/dist/internal/production-runtime.cjs +26 -26
  234. package/dist/internal/production-runtime.d.mts +14 -13
  235. package/dist/internal/production-runtime.d.ts +14 -13
  236. package/dist/internal/production-runtime.mjs +27 -27
  237. package/dist/internal/spa-router.cjs +44 -0
  238. package/dist/internal/spa-router.d.mts +41 -0
  239. package/dist/internal/spa-router.d.ts +41 -0
  240. package/dist/internal/spa-router.mjs +44 -0
  241. package/dist/internal/start-manifest.d.mts +4 -4
  242. package/dist/internal/start-manifest.d.ts +4 -4
  243. package/dist/internal/vercel-edge-middleware.cjs +3 -3
  244. package/dist/internal/vercel-edge-middleware.mjs +2 -2
  245. package/dist/{lifecycle.d-VzcXyEyn.d.ts → lifecycle.d-OtGWAvJT.d.mts} +1 -1
  246. package/dist/{lifecycle.d-VzcXyEyn.d.mts → lifecycle.d-OtGWAvJT.d.ts} +1 -1
  247. package/dist/markdown.cjs +3 -3
  248. package/dist/markdown.d.mts +4 -4
  249. package/dist/markdown.d.ts +4 -4
  250. package/dist/markdown.mjs +2 -2
  251. package/dist/middleware.cjs +8 -8
  252. package/dist/middleware.d.mts +4 -4
  253. package/dist/middleware.d.ts +4 -4
  254. package/dist/middleware.mjs +7 -7
  255. package/dist/{mount.d-CPzqOm-a.d.ts → mount.d-DcoPFqv5.d.ts} +1 -1
  256. package/dist/{mount.d-AcJaUtHF.d.mts → mount.d-Ylo-CmzK.d.mts} +1 -1
  257. package/dist/{native-server-fn-handler-WYYY4YBN.mjs → native-server-fn-handler-OXFTI6V5.mjs} +4 -4
  258. package/dist/{native-server-fn-handler-XRTZR7SZ.cjs → native-server-fn-handler-TNVFEQW3.cjs} +5 -5
  259. package/dist/{native-tree-MNUFN5G6.cjs → native-tree-5TENEQ7Y.cjs} +4 -4
  260. package/dist/{native-tree-JDI3LJSH.mjs → native-tree-LNO7K6JR.mjs} +3 -3
  261. package/dist/{navigation-delegate.d-_Df9DnPY.d.ts → navigation-delegate.d-2MK4YSlL.d.ts} +1 -1
  262. package/dist/{navigation-delegate.d-C4i5Y39E.d.mts → navigation-delegate.d-BA5h0fbE.d.mts} +1 -1
  263. package/dist/navigation.cjs +4 -4
  264. package/dist/navigation.d.mts +7 -7
  265. package/dist/navigation.d.ts +7 -7
  266. package/dist/navigation.mjs +3 -3
  267. package/dist/{nitro-NUCTYEKJ.cjs → nitro-6UOJXJZ6.cjs} +7 -7
  268. package/dist/{nitro-VCJ6QQSI.mjs → nitro-C3MYDX7V.mjs} +3 -3
  269. package/dist/observability.cjs +8 -2
  270. package/dist/{observability.d-DdJRiaIX.d.mts → observability.d-mXSbp4jc.d.mts} +17 -1
  271. package/dist/{observability.d-DdJRiaIX.d.ts → observability.d-mXSbp4jc.d.ts} +17 -1
  272. package/dist/observability.d.mts +1 -1
  273. package/dist/observability.d.ts +1 -1
  274. package/dist/observability.mjs +7 -1
  275. package/dist/{plugin-TV6W7YNK.mjs → plugin-33I3V42N.mjs} +1 -1
  276. package/dist/{plugin-AGEFSU7K.cjs → plugin-LN3JBZRR.cjs} +2 -2
  277. package/dist/plugin.cjs +37 -37
  278. package/dist/plugin.d.mts +8 -8
  279. package/dist/plugin.d.ts +8 -8
  280. package/dist/plugin.mjs +36 -36
  281. package/dist/query/client.cjs +6 -6
  282. package/dist/query/client.mjs +1 -1
  283. package/dist/{render-plan.d-CslZE7o7.d.ts → render-plan.d-2o-AG-ot.d.ts} +1 -1
  284. package/dist/{render-plan.d-4V_NmaA6.d.mts → render-plan.d-ChYBMhLu.d.mts} +1 -1
  285. package/dist/renderer-client.cjs +4 -4
  286. package/dist/renderer-client.d.mts +7 -7
  287. package/dist/renderer-client.d.ts +7 -7
  288. package/dist/renderer-client.mjs +1 -1
  289. package/dist/renderer.d.mts +16 -1
  290. package/dist/renderer.d.ts +16 -1
  291. package/dist/{request.d-CbV3y7j3.d.ts → request.d-CE0FIkiM.d.ts} +1 -1
  292. package/dist/{request.d-CmLTxEgS.d.mts → request.d-RCnCBuWq.d.mts} +1 -1
  293. package/dist/request.d.mts +5 -5
  294. package/dist/request.d.ts +5 -5
  295. package/dist/{route-rendering.d-CETnXNez.d.ts → route-rendering.d-BTPOM2nU.d.ts} +1 -1
  296. package/dist/{route-rendering.d-CmoqfOmj.d.mts → route-rendering.d-BZJnfKsp.d.mts} +1 -1
  297. package/dist/{router.d-Dga3N5YO.d.ts → router.d-BU_WE6Ol.d.ts} +1 -1
  298. package/dist/{router.d-ktz7pwYm.d.mts → router.d-D8Vvwl4i.d.mts} +1 -1
  299. package/dist/routes.cjs +4 -4
  300. package/dist/routes.d.mts +4 -4
  301. package/dist/routes.d.ts +4 -4
  302. package/dist/routes.mjs +3 -3
  303. package/dist/{rsc-pipeline-JLYD26AR.cjs → rsc-pipeline-A3R4U26C.cjs} +15 -15
  304. package/dist/{rsc-pipeline-N7CWJW7T.mjs → rsc-pipeline-JZWVSHOR.mjs} +14 -14
  305. package/dist/{runtime-QXX2A4TS.mjs → runtime-SQFRHRGJ.mjs} +18 -18
  306. package/dist/{runtime-F5NSS4DD.cjs → runtime-WZ3CHHGJ.cjs} +26 -26
  307. package/dist/{runtime.d-DuaXEM0p.d.mts → runtime.d-BnmuOXVD.d.mts} +1 -1
  308. package/dist/{runtime.d-BWLZUOfA.d.ts → runtime.d-DJ6IIKcF.d.ts} +1 -1
  309. package/dist/{schema-dev-notice-2GN5V7Y2.mjs → schema-dev-notice-EUPAUJVN.mjs} +2 -2
  310. package/dist/{schema-dev-notice-6VCOZGG2.cjs → schema-dev-notice-ZSCL47CT.cjs} +5 -5
  311. package/dist/search-client-A7YJT7JZ.cjs +15 -0
  312. package/dist/{search-client-W4PEFAQB.mjs → search-client-GIXIEU75.mjs} +1 -1
  313. package/dist/{server-components-status.d-C5JpC7_Y.d.ts → server-components-status.d-BeqSXcjM.d.ts} +1 -1
  314. package/dist/{server-components-status.d-CqxtJmqP.d.mts → server-components-status.d-BzOg9M8g.d.mts} +1 -1
  315. package/dist/server-fn.cjs +4 -4
  316. package/dist/server-fn.mjs +3 -3
  317. package/dist/server-plugins.d.mts +6 -6
  318. package/dist/server-plugins.d.ts +6 -6
  319. package/dist/server-query.cjs +5 -5
  320. package/dist/server-query.mjs +4 -4
  321. package/dist/server.cjs +73 -73
  322. package/dist/server.d.mts +15 -15
  323. package/dist/server.d.ts +15 -15
  324. package/dist/server.mjs +47 -47
  325. package/dist/{session-AK2OA5UZ.mjs → session-4IB34X35.mjs} +2 -2
  326. package/dist/session-MOYQJ7E6.cjs +24 -0
  327. package/dist/{spa-router.d-C3LzwTlY.d.ts → spa-router.d-BOwuVkMl.d.ts} +20 -4
  328. package/dist/{spa-router.d-BLE188EL.d.mts → spa-router.d-CDpftSsk.d.mts} +20 -4
  329. package/dist/{ssg.d-DisOfj0I.d.ts → ssg.d-BTVqyq8T.d.ts} +2 -2
  330. package/dist/{ssg.d-QrFyU6T4.d.mts → ssg.d-Bx_WFuwg.d.mts} +2 -2
  331. package/dist/storage.cjs +2 -2
  332. package/dist/storage.d.mts +112 -96
  333. package/dist/storage.d.ts +112 -96
  334. package/dist/storage.mjs +1 -1
  335. package/dist/testing.cjs +11 -11
  336. package/dist/testing.d.mts +4 -4
  337. package/dist/testing.d.ts +4 -4
  338. package/dist/testing.mjs +8 -8
  339. package/dist/{types.d-DW2vyaUq.d.mts → types.d-C5hlNbHa.d.mts} +8 -1
  340. package/dist/{types.d-DW2vyaUq.d.ts → types.d-C5hlNbHa.d.ts} +8 -1
  341. package/dist/{utils.d-BlWZFgdL.d.mts → utils.d-JkrpS-NJ.d.mts} +1 -1
  342. package/dist/{utils.d-7YcgfTCK.d.ts → utils.d-_dvevm5s.d.ts} +1 -1
  343. package/dist/version.cjs +2 -2
  344. package/dist/version.mjs +1 -1
  345. package/dist/vite.cjs +39 -37
  346. package/dist/vite.d.mts +15 -10
  347. package/dist/vite.d.ts +15 -10
  348. package/dist/vite.mjs +38 -36
  349. package/dist/workflows.cjs +3 -3
  350. package/dist/workflows.mjs +2 -2
  351. package/package.json +7 -1
  352. package/types/images.d.ts +9 -0
  353. package/dist/analyzer-KVTUYGTT.cjs +0 -16
  354. package/dist/search-client-6NVC6HM2.cjs +0 -15
  355. package/dist/session-H4TWP73H.cjs +0 -24
  356. package/dist/{chunk-GFXKO4UW.mjs → chunk-3XTRT3MB.mjs} +48 -48
  357. package/dist/{chunk-JKFN3YVG.mjs → chunk-6JWXHPVR.mjs} +0 -0
  358. package/dist/{chunk-522K362I.mjs → chunk-C2OLXVUC.mjs} +0 -0
  359. package/dist/{chunk-MALGIHIC.cjs → chunk-HS4JPIGR.cjs} +0 -0
  360. package/dist/{chunk-CUZT7474.cjs → chunk-TCMRLW3K.cjs} +0 -0
  361. package/dist/{chunk-Q3DO7MVK.mjs → chunk-URBP6DLH.mjs} +0 -0
  362. package/dist/{chunk-AOTD2N5P.cjs → chunk-WGWWRV2M.cjs} +0 -0
  363. package/dist/{chunk-L7Y65BQU.cjs → chunk-WHEQJN4G.cjs} +48 -48
@@ -28,11 +28,11 @@ var _chunkNG2EZ6QScjs = require('./chunk-NG2EZ6QS.cjs');
28
28
  var _chunkVM57CK74cjs = require('./chunk-VM57CK74.cjs');
29
29
 
30
30
 
31
- var _chunkIWGGRXD2cjs = require('./chunk-IWGGRXD2.cjs');
31
+ var _chunkMHKPXX3Jcjs = require('./chunk-MHKPXX3J.cjs');
32
32
 
33
33
 
34
34
 
35
- var _chunkLJKTJNOFcjs = require('./chunk-LJKTJNOF.cjs');
35
+ var _chunkTS3ZHJN5cjs = require('./chunk-TS3ZHJN5.cjs');
36
36
 
37
37
 
38
38
 
@@ -41,7 +41,7 @@ var _chunkLJKTJNOFcjs = require('./chunk-LJKTJNOF.cjs');
41
41
 
42
42
 
43
43
 
44
- var _chunkXGS76V7Lcjs = require('./chunk-XGS76V7L.cjs');
44
+ var _chunkZPEZXQTMcjs = require('./chunk-ZPEZXQTM.cjs');
45
45
 
46
46
 
47
47
 
@@ -54,18 +54,18 @@ var _chunkXGS76V7Lcjs = require('./chunk-XGS76V7L.cjs');
54
54
 
55
55
 
56
56
 
57
- var _chunk6D3CJFNUcjs = require('./chunk-6D3CJFNU.cjs');
57
+ var _chunkHR5GU4UUcjs = require('./chunk-HR5GU4UU.cjs');
58
58
 
59
59
 
60
60
 
61
61
 
62
- var _chunkDZZHTMWMcjs = require('./chunk-DZZHTMWM.cjs');
62
+ var _chunkN3H7UPBMcjs = require('./chunk-N3H7UPBM.cjs');
63
63
 
64
64
 
65
- var _chunk42EUEYW6cjs = require('./chunk-42EUEYW6.cjs');
65
+ var _chunkYUQUGVSVcjs = require('./chunk-YUQUGVSV.cjs');
66
66
 
67
67
 
68
- var _chunkNNGBTJCXcjs = require('./chunk-NNGBTJCX.cjs');
68
+ var _chunkANZLZNNXcjs = require('./chunk-ANZLZNNX.cjs');
69
69
 
70
70
 
71
71
  var _chunkNDOE76QCcjs = require('./chunk-NDOE76QC.cjs');
@@ -74,7 +74,7 @@ var _chunkNDOE76QCcjs = require('./chunk-NDOE76QC.cjs');
74
74
 
75
75
 
76
76
 
77
- var _chunkF7PKUP6Pcjs = require('./chunk-F7PKUP6P.cjs');
77
+ var _chunkLVGB5PYKcjs = require('./chunk-LVGB5PYK.cjs');
78
78
 
79
79
 
80
80
  var _chunk3GNHJ3RNcjs = require('./chunk-3GNHJ3RN.cjs');
@@ -116,24 +116,24 @@ var _chunkO4JYMU5Ncjs = require('./chunk-O4JYMU5N.cjs');
116
116
 
117
117
 
118
118
 
119
- var _chunkHVMQAVZKcjs = require('./chunk-HVMQAVZK.cjs');
120
119
 
120
+ var _chunkX4TSMQWFcjs = require('./chunk-X4TSMQWF.cjs');
121
121
 
122
122
 
123
123
 
124
124
 
125
125
 
126
- var _chunkMBD34AS5cjs = require('./chunk-MBD34AS5.cjs');
127
126
 
127
+ var _chunkZ5BANEQDcjs = require('./chunk-Z5BANEQD.cjs');
128
128
 
129
- var _chunkCUZT7474cjs = require('./chunk-CUZT7474.cjs');
130
129
 
130
+ var _chunkTCMRLW3Kcjs = require('./chunk-TCMRLW3K.cjs');
131
131
 
132
132
 
133
133
 
134
134
 
135
- var _chunkBZJYPIFZcjs = require('./chunk-BZJYPIFZ.cjs');
136
135
 
136
+ var _chunkSDICLSQUcjs = require('./chunk-SDICLSQU.cjs');
137
137
 
138
138
 
139
139
 
@@ -145,7 +145,8 @@ var _chunkBZJYPIFZcjs = require('./chunk-BZJYPIFZ.cjs');
145
145
 
146
146
 
147
147
 
148
- var _chunk6ZFGWB75cjs = require('./chunk-6ZFGWB75.cjs');
148
+
149
+ var _chunkUWOCYINYcjs = require('./chunk-UWOCYINY.cjs');
149
150
 
150
151
 
151
152
  var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
@@ -159,15 +160,15 @@ var _chunk47JV57DAcjs = require('./chunk-47JV57DA.cjs');
159
160
 
160
161
 
161
162
 
162
- var _chunk5KISFWD2cjs = require('./chunk-5KISFWD2.cjs');
163
+ var _chunk5OAN7BG5cjs = require('./chunk-5OAN7BG5.cjs');
163
164
 
164
165
 
165
166
 
166
167
 
167
- var _chunkYRXPDKMMcjs = require('./chunk-YRXPDKMM.cjs');
168
+ var _chunkW53Z4WDIcjs = require('./chunk-W53Z4WDI.cjs');
168
169
 
169
170
 
170
- var _chunkFOULIN4Scjs = require('./chunk-FOULIN4S.cjs');
171
+ var _chunkXY5OZQF6cjs = require('./chunk-XY5OZQF6.cjs');
171
172
 
172
173
 
173
174
  var _chunk4EBC7EMWcjs = require('./chunk-4EBC7EMW.cjs');
@@ -188,7 +189,7 @@ var _chunk4EBC7EMWcjs = require('./chunk-4EBC7EMW.cjs');
188
189
 
189
190
 
190
191
 
191
- var _chunkODYKCC6Wcjs = require('./chunk-ODYKCC6W.cjs');
192
+ var _chunkZVSQN7NCcjs = require('./chunk-ZVSQN7NC.cjs');
192
193
 
193
194
 
194
195
 
@@ -210,7 +211,6 @@ var _chunk6JHZPB52cjs = require('./chunk-6JHZPB52.cjs');
210
211
  var _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
211
212
 
212
213
 
213
- var _chunkQMR2TUVZcjs = require('./chunk-QMR2TUVZ.cjs');
214
214
 
215
215
 
216
216
 
@@ -218,16 +218,17 @@ var _chunkQMR2TUVZcjs = require('./chunk-QMR2TUVZ.cjs');
218
218
 
219
219
 
220
220
 
221
+ var _chunk67MZTLTFcjs = require('./chunk-67MZTLTF.cjs');
221
222
 
222
223
 
223
- var _chunk67MZTLTFcjs = require('./chunk-67MZTLTF.cjs');
224
+ var _chunkQMR2TUVZcjs = require('./chunk-QMR2TUVZ.cjs');
224
225
 
225
226
 
226
227
 
227
228
 
228
229
 
229
230
 
230
- var _chunkCYNQPKA4cjs = require('./chunk-CYNQPKA4.cjs');
231
+ var _chunk5ZHC6QGDcjs = require('./chunk-5ZHC6QGD.cjs');
231
232
 
232
233
 
233
234
  var _chunkXRFGOYXGcjs = require('./chunk-XRFGOYXG.cjs');
@@ -239,39 +240,39 @@ var _chunk3EIPOTZVcjs = require('./chunk-3EIPOTZV.cjs');
239
240
 
240
241
 
241
242
 
242
- var _chunkPG7J7XYTcjs = require('./chunk-PG7J7XYT.cjs');
243
+ var _chunkQ4TRGTO7cjs = require('./chunk-Q4TRGTO7.cjs');
243
244
 
244
245
 
245
246
 
246
247
  var _chunk2HW5LWAHcjs = require('./chunk-2HW5LWAH.cjs');
247
248
 
248
249
 
249
- var _chunk2YJ4DHTDcjs = require('./chunk-2YJ4DHTD.cjs');
250
+ var _chunk2NOHVIJ3cjs = require('./chunk-2NOHVIJ3.cjs');
250
251
 
251
252
 
252
253
  var _chunkASYOWPSRcjs = require('./chunk-ASYOWPSR.cjs');
253
254
 
254
255
 
255
256
 
256
- var _chunkCKNZJFK5cjs = require('./chunk-CKNZJFK5.cjs');
257
+ var _chunkGBESKA76cjs = require('./chunk-GBESKA76.cjs');
257
258
 
258
259
 
259
260
 
260
- var _chunkAOTD2N5Pcjs = require('./chunk-AOTD2N5P.cjs');
261
+ var _chunkWGWWRV2Mcjs = require('./chunk-WGWWRV2M.cjs');
261
262
 
262
263
 
263
264
  var _chunkQKW6DLDTcjs = require('./chunk-QKW6DLDT.cjs');
264
265
 
265
266
 
266
- var _chunkEVVV2XZ2cjs = require('./chunk-EVVV2XZ2.cjs');
267
+ var _chunkNW3DL2PMcjs = require('./chunk-NW3DL2PM.cjs');
267
268
 
268
269
 
269
270
 
270
271
 
271
- var _chunkFE6KYDHCcjs = require('./chunk-FE6KYDHC.cjs');
272
+ var _chunkSHDCKRP4cjs = require('./chunk-SHDCKRP4.cjs');
272
273
 
273
274
 
274
- var _chunk5DREJN4Gcjs = require('./chunk-5DREJN4G.cjs');
275
+ var _chunkMQOHYV6Lcjs = require('./chunk-MQOHYV6L.cjs');
275
276
 
276
277
 
277
278
  var _chunkCYOTNHDFcjs = require('./chunk-CYOTNHDF.cjs');
@@ -292,14 +293,14 @@ var _chunkIUKBPBM7cjs = require('./chunk-IUKBPBM7.cjs');
292
293
 
293
294
 
294
295
 
295
- var _chunkGC5ROI3Acjs = require('./chunk-GC5ROI3A.cjs');
296
+ var _chunk7U4XF76Rcjs = require('./chunk-7U4XF76R.cjs');
296
297
 
297
298
 
298
299
 
299
300
  var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
300
301
 
301
302
 
302
- var _chunkLMXGCFAMcjs = require('./chunk-LMXGCFAM.cjs');
303
+ var _chunkCCMP4JD2cjs = require('./chunk-CCMP4JD2.cjs');
303
304
 
304
305
 
305
306
  var _chunkY3DO7BIJcjs = require('./chunk-Y3DO7BIJ.cjs');
@@ -606,7 +607,7 @@ function getDocsTitle(docs) {
606
607
  return typeof docs.config.nav === "object" && docs.config.nav && "title" in docs.config.nav ? String(docs.config.nav.title || "Documentation") : "Documentation";
607
608
  }
608
609
  function loadPages(contentDir, docs) {
609
- return _chunk6D3CJFNUcjs.discoverFarmDocsPages.call(void 0, contentDir, docs).map((page) => _chunk6D3CJFNUcjs.loadFarmDocsPage.call(void 0, contentDir, docs, page.slug)).filter((page) => Boolean(page)).sort((a, b) => a.href.localeCompare(b.href));
610
+ return _chunkHR5GU4UUcjs.discoverFarmDocsPages.call(void 0, contentDir, docs).map((page) => _chunkHR5GU4UUcjs.loadFarmDocsPage.call(void 0, contentDir, docs, page.slug)).filter((page) => Boolean(page)).sort((a, b) => a.href.localeCompare(b.href));
610
611
  }
611
612
  function findSocialImagePath(html, basePath) {
612
613
  const match = /<meta\s+property=["']og:image["']\s+content=["']([^"']+)["']/i.exec(html) || /<meta\s+content=["']([^"']+)["']\s+property=["']og:image["']/i.exec(html);
@@ -624,7 +625,7 @@ async function addHandlerRoute(routes, pathname, handler, absolutePaths) {
624
625
  return response;
625
626
  }
626
627
  async function compileFarmDocsManifest(docs, options) {
627
- const contentDir = _chunk6D3CJFNUcjs.resolveFarmDocsContentDir.call(void 0, docs, options);
628
+ const contentDir = _chunkHR5GU4UUcjs.resolveFarmDocsContentDir.call(void 0, docs, options);
628
629
  const pages = loadPages(contentDir, docs);
629
630
  const basePath = _chunkD22BUQKWcjs.normalizeFarmBasePath.call(void 0, options.basePath);
630
631
  const absolutePaths = [
@@ -632,7 +633,7 @@ async function compileFarmDocsManifest(docs, options) {
632
633
  _path2.default.resolve(contentDir),
633
634
  docs.configPath || ""
634
635
  ];
635
- const handler = _chunk6D3CJFNUcjs.createFarmDocsHandler.call(void 0, docs, {
636
+ const handler = _chunkHR5GU4UUcjs.createFarmDocsHandler.call(void 0, docs, {
636
637
  root: options.root,
637
638
  srcDir: options.srcDir,
638
639
  clientEntry: options.clientEntry,
@@ -642,7 +643,7 @@ async function compileFarmDocsManifest(docs, options) {
642
643
  isPathGuarded: options.isPathGuarded,
643
644
  basePath
644
645
  });
645
- const apiHandler = _chunkXGS76V7Lcjs.createFarmDocsAPIHandler.call(void 0, {
646
+ const apiHandler = _chunkZPEZXQTMcjs.createFarmDocsAPIHandler.call(void 0, {
646
647
  rootDir: options.root,
647
648
  srcDir: options.srcDir,
648
649
  docs,
@@ -654,7 +655,7 @@ async function compileFarmDocsManifest(docs, options) {
654
655
  const apiMarkdown = {};
655
656
  for (const page of pages) {
656
657
  const htmlResponse = await addHandlerRoute(routes, page.href, handler, absolutePaths);
657
- const markdownPath = _chunk6D3CJFNUcjs.getFarmDocsMarkdownPath.call(void 0, page.href);
658
+ const markdownPath = _chunkHR5GU4UUcjs.getFarmDocsMarkdownPath.call(void 0, page.href);
658
659
  await addHandlerRoute(routes, markdownPath, handler, absolutePaths);
659
660
  if (htmlResponse) {
660
661
  const socialImagePath = findSocialImagePath(await htmlResponse.text(), basePath);
@@ -739,7 +740,7 @@ async function compileFarmDocsManifest(docs, options) {
739
740
  post: await compileResponse(postResponse, absolutePaths),
740
741
  search: {
741
742
  pages: publicPages.map((page) => ({
742
- ..._chunk6D3CJFNUcjs.toFarmDocsMarkdownPage.call(void 0, page, basePath),
743
+ ..._chunkHR5GU4UUcjs.toFarmDocsMarkdownPage.call(void 0, page, basePath),
743
744
  sourcePath: `farm-docs:${page.slug || "index"}`
744
745
  })),
745
746
  search: _nullishCoalesce(searchConfig, () => ( true)),
@@ -792,26 +793,31 @@ function collectFarmClientModulePreloads(bundle, options) {
792
793
  const moduleId = chunk.facadeModuleId.split("?")[0];
793
794
  if (!_path2.default.isAbsolute(moduleId)) continue;
794
795
  const loaded = /* @__PURE__ */ new Set([...entryLoaded, chunk.fileName]);
795
- modules[_chunkGC5ROI3Acjs.toViteModuleId.call(void 0, moduleId, options.root)] = [
796
+ modules[_chunk7U4XF76Rcjs.toViteModuleId.call(void 0, moduleId, options.root)] = [
796
797
  chunk.fileName,
797
798
  ...staticImports(chunk, loaded, [])
798
799
  ].map(index);
799
800
  }
800
- const routerFiles = [];
801
- const routerLoaded = new Set(entryLoaded);
802
- for (const routerModule of _nullishCoalesce(options.routerModules, () => ( []))) {
803
- const chunk = chunks.find(
804
- (candidate) => candidate.isDynamicEntry && candidate.facadeModuleId && _path2.default.resolve(candidate.facadeModuleId.split("?")[0]) === _path2.default.resolve(routerModule)
805
- );
806
- if (!chunk || routerLoaded.has(chunk.fileName)) continue;
807
- routerLoaded.add(chunk.fileName);
808
- routerFiles.push(chunk.fileName);
809
- staticImports(chunk, routerLoaded, routerFiles);
810
- }
801
+ const dynamicFiles = (moduleIds) => {
802
+ const into = [];
803
+ const loaded = new Set(entryLoaded);
804
+ for (const moduleId of _nullishCoalesce(moduleIds, () => ( []))) {
805
+ const chunk = chunks.find(
806
+ (candidate) => candidate.isDynamicEntry && candidate.facadeModuleId && _path2.default.resolve(candidate.facadeModuleId.split("?")[0]) === _path2.default.resolve(moduleId)
807
+ );
808
+ if (!chunk || loaded.has(chunk.fileName)) continue;
809
+ loaded.add(chunk.fileName);
810
+ into.push(chunk.fileName);
811
+ staticImports(chunk, loaded, into);
812
+ }
813
+ return into;
814
+ };
815
+ const rendererFiles = dynamicFiles(options.rendererModules);
811
816
  return {
812
817
  files,
813
818
  entry: entryFiles.map(index),
814
- router: routerFiles.map(index),
819
+ router: dynamicFiles(options.routerModules).map(index),
820
+ ...rendererFiles.length > 0 ? { renderer: rendererFiles.map(index) } : {},
815
821
  modules
816
822
  };
817
823
  }
@@ -820,10 +826,15 @@ function createFarmClientModulePreloadPlugin(options) {
820
826
  name: "farm-client-module-preloads",
821
827
  enforce: "post",
822
828
  async generateBundle(_output, bundle) {
829
+ const rendererModules = [];
830
+ for (const specifier of _nullishCoalesce(options.rendererImports, () => ( []))) {
831
+ const resolved = await this.resolve(specifier, options.rendererImporter);
832
+ if (resolved) rendererModules.push(resolved.id);
833
+ }
823
834
  await _promises2.default.mkdir(options.buildDir, { recursive: true });
824
835
  await _promises2.default.writeFile(
825
836
  _path2.default.join(options.buildDir, FARM_CLIENT_MODULE_PRELOADS_FILE),
826
- JSON.stringify(collectFarmClientModulePreloads(bundle, options))
837
+ JSON.stringify(collectFarmClientModulePreloads(bundle, { ...options, rendererModules }))
827
838
  );
828
839
  }
829
840
  };
@@ -1009,7 +1020,7 @@ async function createFarmRouteRuntimeManifest(options) {
1009
1020
  const routes = [];
1010
1021
  for (const [pattern, entry] of options.routeManager.getRoutes()) {
1011
1022
  const routeModule = await options.routeManager.loadRouteModule(entry.modulePath);
1012
- const rendering = await _chunkBZJYPIFZcjs.resolveRouteRenderingConfigFromFile.call(void 0, routeModule, entry.modulePath);
1023
+ const rendering = await _chunkSDICLSQUcjs.resolveRouteRenderingConfigFromFile.call(void 0, routeModule, entry.modulePath);
1013
1024
  const runtimeConfig = await options.routeManager.resolveRouteRuntimeConfig(pattern);
1014
1025
  routes.push({
1015
1026
  kind: "page",
@@ -1622,7 +1633,7 @@ function farmStripPlatformConfigPlugin(configFiles) {
1622
1633
  // removed block used (`readFileSync` for a version, say).
1623
1634
  enforce: "pre",
1624
1635
  transform: {
1625
- filter: { id: _chunkHVMQAVZKcjs.fileNamePattern.call(void 0, configFiles) },
1636
+ filter: { id: _chunkX4TSMQWFcjs.fileNamePattern.call(void 0, configFiles) },
1626
1637
  async handler(code, id) {
1627
1638
  const file = id.split("?", 1)[0];
1628
1639
  if (!files.has(_path2.default.resolve(file)) && !files.has(realPath(file))) return null;
@@ -1701,12 +1712,15 @@ function createFarmPrivateClientSourcemapsPlugin(options) {
1701
1712
  return {
1702
1713
  name: "farm-private-client-sourcemaps",
1703
1714
  enforce: "post",
1704
- generateBundle(_output, bundle) {
1705
- maps = [];
1706
- for (const [fileName, output] of Object.entries(bundle)) {
1707
- if (output.type !== "asset" || !fileName.endsWith(".map")) continue;
1708
- maps.push([fileName, _nullishCoalesce(output.source, () => ( ""))]);
1709
- delete bundle[fileName];
1715
+ generateBundle: {
1716
+ order: "post",
1717
+ handler(_output, bundle) {
1718
+ maps = [];
1719
+ for (const [fileName, output] of Object.entries(bundle)) {
1720
+ if (output.type !== "asset" || !fileName.endsWith(".map")) continue;
1721
+ maps.push([fileName, _nullishCoalesce(output.source, () => ( ""))]);
1722
+ delete bundle[fileName];
1723
+ }
1710
1724
  }
1711
1725
  },
1712
1726
  async writeBundle() {
@@ -1902,7 +1916,7 @@ async function writeFarmVercelEdgeMiddlewareFunction(options) {
1902
1916
  logLevel: "silent",
1903
1917
  plugins: [edgeNodeModulesPlugin(coreDir, unsupported)],
1904
1918
  resolve: {
1905
- alias: _chunkHVMQAVZKcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
1919
+ alias: _chunkX4TSMQWFcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
1906
1920
  conditionNames: ["edge-light", "worker", "browser", "import", "module", "default"]
1907
1921
  },
1908
1922
  transform: {
@@ -1942,11 +1956,11 @@ Remove them from the middleware (Edge provides ${[...EDGE_NODE_MODULES].join(",
1942
1956
  );
1943
1957
  const gzippedBytes = _zlib.gzipSync.call(void 0, code).length;
1944
1958
  if (gzippedBytes > EDGE_FUNCTION_SIZE_WARNING_BYTES) {
1945
- _chunkGC5ROI3Acjs.logger.warn(
1959
+ _chunk7U4XF76Rcjs.logger.warn(
1946
1960
  `Vercel edge middleware is ${(gzippedBytes / 1024 / 1024).toFixed(2)} MB gzipped, over the Hobby plan's 1 MB Edge function limit (Pro allows 2 MB, Enterprise 4 MB).`
1947
1961
  );
1948
1962
  }
1949
- _chunkGC5ROI3Acjs.logger.info(
1963
+ _chunk7U4XF76Rcjs.logger.info(
1950
1964
  `\u{1F6E1}\uFE0F Vercel edge middleware: ${routes.length} middleware file(s) guard their prerendered pages before the CDN serves them`
1951
1965
  );
1952
1966
  }
@@ -2124,7 +2138,7 @@ function createPrerenderMarkdownPagesPlugin(pages) {
2124
2138
  const compiled = await pages;
2125
2139
  if (compiled.size === 0) return "";
2126
2140
  return `globalThis[Symbol.for(${JSON.stringify(
2127
- _chunkPG7J7XYTcjs.FARM_MARKDOWN_PRECOMPILED_PAGES.description
2141
+ _chunkQ4TRGTO7cjs.FARM_MARKDOWN_PRECOMPILED_PAGES.description
2128
2142
  )})] = new Map(${JSON.stringify([...compiled])});`;
2129
2143
  }
2130
2144
  };
@@ -2155,7 +2169,7 @@ function createPrerenderRuntimeResolverPlugin(root, resolveNitroEntry = resolveN
2155
2169
  };
2156
2170
  }
2157
2171
  function createFarmStorageModuleRegistration(config) {
2158
- const modules = _chunkEVVV2XZ2cjs._collectFarmStorageModules.call(void 0, config.storage);
2172
+ const modules = _chunkNW3DL2PMcjs._collectFarmStorageModules.call(void 0, config.storage);
2159
2173
  if (modules.length === 0) return "";
2160
2174
  const root = config.root || process.cwd();
2161
2175
  const projectRequire = _module.createRequire.call(void 0, _path2.default.join(root, "package.json"));
@@ -2304,7 +2318,7 @@ function createOmittedMetadataImageRuntimePlugin(externalizeOtherImports) {
2304
2318
  return {
2305
2319
  name: "farm-omitted-metadata-image-runtime",
2306
2320
  resolveId: {
2307
- filter: { id: _chunkHVMQAVZKcjs.exactIdPattern.call(void 0, ["@vercel/og"]) },
2321
+ filter: { id: _chunkX4TSMQWFcjs.exactIdPattern.call(void 0, ["@vercel/og"]) },
2308
2322
  handler(source, importer) {
2309
2323
  if (source !== "@vercel/og") return null;
2310
2324
  const fromCoreRuntime = importer !== void 0 && isFarmCoreModule(importer) && !/^og\.[cm]?[jt]sx?$/.test(_path2.default.basename(importer.split("?", 1)[0]));
@@ -2313,7 +2327,7 @@ function createOmittedMetadataImageRuntimePlugin(externalizeOtherImports) {
2313
2327
  }
2314
2328
  },
2315
2329
  load: {
2316
- filter: { id: _chunkHVMQAVZKcjs.exactIdPattern.call(void 0, [FARM_OMITTED_METADATA_IMAGE_RUNTIME_ID]) },
2330
+ filter: { id: _chunkX4TSMQWFcjs.exactIdPattern.call(void 0, [FARM_OMITTED_METADATA_IMAGE_RUNTIME_ID]) },
2317
2331
  handler(id) {
2318
2332
  if (id !== FARM_OMITTED_METADATA_IMAGE_RUNTIME_ID) return null;
2319
2333
  return `
@@ -2362,7 +2376,7 @@ function createEdgeMetadataImageRuntimePlugin({
2362
2376
  return null;
2363
2377
  }
2364
2378
  const resolvedPath = _path2.default.resolve(_path2.default.dirname(importer.split("?", 1)[0]), source);
2365
- return { id: _chunkGC5ROI3Acjs.toPosixPath.call(void 0, resolvedPath), external: "absolute" };
2379
+ return { id: _chunk7U4XF76Rcjs.toPosixPath.call(void 0, resolvedPath), external: "absolute" };
2366
2380
  }
2367
2381
  };
2368
2382
  }
@@ -2642,9 +2656,9 @@ function hasFarmPluginRoutes(config) {
2642
2656
  }
2643
2657
  function farmServerRuntimePluginsMayHandlePath(config, pathname) {
2644
2658
  return (config.plugins || []).some(
2645
- (plugin) => _chunkAOTD2N5Pcjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) !== false && // Mobile session tokens change only bearer requests and cookie-clearing responses, which a
2659
+ (plugin) => _chunkWGWWRV2Mcjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) !== false && // Mobile session tokens change only bearer requests and cookie-clearing responses, which a
2646
2660
  // prerendered file never answers or sends; its endpoints live under /__farm/.
2647
- plugin.name !== _chunkIWGGRXD2cjs.FARM_MOBILE_SESSION_PLUGIN && _chunk47JV57DAcjs.farmPluginMayAffectRuntimePath.call(void 0, plugin, pathname)
2661
+ plugin.name !== _chunkMHKPXX3Jcjs.FARM_MOBILE_SESSION_PLUGIN && _chunk47JV57DAcjs.farmPluginMayAffectRuntimePath.call(void 0, plugin, pathname)
2648
2662
  );
2649
2663
  }
2650
2664
  async function discoverMiddlewareRoutes(appDir) {
@@ -2674,8 +2688,8 @@ async function discoverMiddlewareRoutes(appDir) {
2674
2688
  }
2675
2689
  await walk(
2676
2690
  _path2.default.join(dir, entry.name),
2677
- _chunkFE6KYDHCcjs.appendMiddlewareRoutePath.call(void 0, routePath, entry.name),
2678
- _chunkFE6KYDHCcjs.appendMiddlewareDirectory.call(void 0, directory, entry.name),
2691
+ _chunkSHDCKRP4cjs.appendMiddlewareRoutePath.call(void 0, routePath, entry.name),
2692
+ _chunkSHDCKRP4cjs.appendMiddlewareDirectory.call(void 0, directory, entry.name),
2679
2693
  discovered
2680
2694
  );
2681
2695
  }
@@ -2687,7 +2701,7 @@ async function discoverMiddlewareRoutes(appDir) {
2687
2701
  routes.set(route.directory, route);
2688
2702
  }
2689
2703
  }
2690
- return Array.from(routes.values()).sort(_chunkFE6KYDHCcjs.compareMiddlewareRouteLocations).map(({ path: routePath, filePath }) => ({ path: routePath, filePath }));
2704
+ return Array.from(routes.values()).sort(_chunkSHDCKRP4cjs.compareMiddlewareRouteLocations).map(({ path: routePath, filePath }) => ({ path: routePath, filePath }));
2691
2705
  }
2692
2706
  function assertFarmDocsRuntimeSupported(config, preset) {
2693
2707
  if (!_optionalChain([config, 'access', _77 => _77.docs, 'optionalAccess', _78 => _78.enabled]) || !_optionalChain([config, 'access', _79 => _79.docs, 'access', _80 => _80.adapter, 'optionalAccess', _81 => _81.server]) || _chunkNLBHLPEOcjs.getFarmPresetRuntime.call(void 0, preset) !== "edge" || Boolean(config.docs.adapter.edgeCompiler)) {
@@ -2708,7 +2722,7 @@ async function buildUniversal(config, routeManager, apiRouteManager, serverRende
2708
2722
  Promise.resolve(_nullishCoalesce(options.productionVite, () => ( _chunkMF3IA2AWcjs.loadFarmProductionVite.call(void 0, ))))
2709
2723
  ]);
2710
2724
  const nitroBuilderResultPromise = preloadFarmNitroBuilder();
2711
- _chunkGC5ROI3Acjs.logger.info(`\u{1F69C} Building Farm.js application (universal) with preset: ${preset}...`);
2725
+ _chunk7U4XF76Rcjs.logger.info(`\u{1F69C} Building Farm.js application (universal) with preset: ${preset}...`);
2712
2726
  const rendererBuild = options.rendererBuildLifetime ? void 0 : new AbortController();
2713
2727
  const rendererBuildLifetime = _nullishCoalesce(options.rendererBuildLifetime, () => ( rendererBuild.signal));
2714
2728
  let markdownPrecompile;
@@ -2725,7 +2739,7 @@ async function buildUniversal(config, routeManager, apiRouteManager, serverRende
2725
2739
  routeManager.getSearchPreserveRoutes().map((route) => [route.pattern, route])
2726
2740
  );
2727
2741
  for (const [pattern, entry] of routeManager.getRoutes()) {
2728
- const markdownSourcePath = entry.markdownSourcePath || (_chunkPG7J7XYTcjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? entry.modulePath : void 0);
2742
+ const markdownSourcePath = entry.markdownSourcePath || (_chunkQ4TRGTO7cjs.isFarmMarkdownPageFile.call(void 0, entry.modulePath) ? entry.modulePath : void 0);
2729
2743
  const searchPreserve = searchPreserveRoutes.get(entry.pattern);
2730
2744
  pageRoutes.push({
2731
2745
  pattern,
@@ -2755,13 +2769,13 @@ async function buildUniversal(config, routeManager, apiRouteManager, serverRende
2755
2769
  fallback: entry.fallback
2756
2770
  })
2757
2771
  );
2758
- _chunkGC5ROI3Acjs.logger.info(`\u{1F4CB} Found ${pageRoutes.length} page routes`);
2772
+ _chunk7U4XF76Rcjs.logger.info(`\u{1F4CB} Found ${pageRoutes.length} page routes`);
2759
2773
  const fs5 = await import("fs/promises");
2760
2774
  const layoutRoutes = Array.from(routeManager.getLayouts(), ([pattern, { modulePath }]) => ({
2761
2775
  pattern,
2762
2776
  modulePath
2763
2777
  }));
2764
- _chunkGC5ROI3Acjs.logger.info(`\u{1F4CB} Found ${pageRoutes.length} page routes and ${layoutRoutes.length} layouts`);
2778
+ _chunk7U4XF76Rcjs.logger.info(`\u{1F4CB} Found ${pageRoutes.length} page routes and ${layoutRoutes.length} layouts`);
2765
2779
  const isolatedClientBoundaryModules = routeManager.getIsolatedClientBoundaryModules(root);
2766
2780
  const islandsErrors = routeManager.getIslandsErrors(root);
2767
2781
  if (islandsErrors.length > 0) {
@@ -2780,7 +2794,7 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
2780
2794
  throw productionViteResult.reason;
2781
2795
  }
2782
2796
  const productionVite = productionViteResult.value;
2783
- _chunkGC5ROI3Acjs.logger.info("\u26A1 Building application bundles with Vite Rolldown");
2797
+ _chunk7U4XF76Rcjs.logger.info("\u26A1 Building application bundles with Vite Rolldown");
2784
2798
  const mobileClient = shouldBuildFarmMobileClient(config);
2785
2799
  const rendererDisabled = _chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, config.renderer);
2786
2800
  const buildClientBundle = async () => {
@@ -2825,11 +2839,11 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
2825
2839
  let clientBuildResult;
2826
2840
  let ssrBuildResult;
2827
2841
  if (!rendererDisabled && config.renderer.buildConcurrency === "serial") {
2828
- _chunkGC5ROI3Acjs.logger.info(`\u{1F4E6} Building client and SSR bundles serially for ${config.renderer.name}...`);
2842
+ _chunk7U4XF76Rcjs.logger.info(`\u{1F4E6} Building client and SSR bundles serially for ${config.renderer.name}...`);
2829
2843
  [clientBuildResult] = await Promise.allSettled([buildClientBundle()]);
2830
2844
  [ssrBuildResult] = await Promise.allSettled([buildSSRBundle()]);
2831
2845
  } else {
2832
- _chunkGC5ROI3Acjs.logger.info(
2846
+ _chunk7U4XF76Rcjs.logger.info(
2833
2847
  rendererDisabled ? "\u{1F4E6} Building the server bundle (renderer: false, no client bundle)..." : "\u{1F4E6} Building client and SSR bundles in parallel..."
2834
2848
  );
2835
2849
  [clientBuildResult, ssrBuildResult] = await Promise.allSettled([
@@ -2846,7 +2860,7 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
2846
2860
  if (productionVite.builder !== "rolldown" || !(clientBuildResult.reason instanceof IncompleteClientBuildOutputError)) {
2847
2861
  throw clientBuildResult.reason;
2848
2862
  }
2849
- _chunkGC5ROI3Acjs.logger.warn("Client bundle was incomplete; retrying after the SSR build...");
2863
+ _chunk7U4XF76Rcjs.logger.warn("Client bundle was incomplete; retrying after the SSR build...");
2850
2864
  try {
2851
2865
  await buildClient(
2852
2866
  productionVite,
@@ -2876,7 +2890,7 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
2876
2890
  const routeRuntimeManifest = routeRuntimeManifestResult.value;
2877
2891
  const runtimeValidation = validateFarmRouteRuntimeDeployment(routeRuntimeManifest, preset);
2878
2892
  for (const warning of runtimeValidation.warnings) {
2879
- _chunkGC5ROI3Acjs.logger.warn(warning);
2893
+ _chunk7U4XF76Rcjs.logger.warn(warning);
2880
2894
  }
2881
2895
  const { bundle: ssrBundle, entryFile: ssrEntryFile, configuredHeaderRoutes } = ssrResult;
2882
2896
  assertServerReadSSRAssetsSupported(ssrBundle, preset, root);
@@ -2887,7 +2901,7 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
2887
2901
  if (config.docs.enabled) {
2888
2902
  await copyFarmDocsFontAssetsToClient(root, clientOutputDir);
2889
2903
  }
2890
- _chunkGC5ROI3Acjs.logger.info(`\u{1F680} Building server with Nitro (preset: ${preset})...`);
2904
+ _chunk7U4XF76Rcjs.logger.info(`\u{1F680} Building server with Nitro (preset: ${preset})...`);
2891
2905
  await buildNitroUniversal(
2892
2906
  config,
2893
2907
  routeManager,
@@ -2909,7 +2923,7 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
2909
2923
  _path2.default.join(root, distDir),
2910
2924
  routeRuntimeManifest
2911
2925
  );
2912
- _chunkGC5ROI3Acjs.logger.info(`\u{1F4CB} Route runtime manifest: ${_path2.default.relative(root, runtimeManifestPath)}`);
2926
+ _chunk7U4XF76Rcjs.logger.info(`\u{1F4CB} Route runtime manifest: ${_path2.default.relative(root, runtimeManifestPath)}`);
2913
2927
  } catch (error) {
2914
2928
  if (lifecyclePluginManager) {
2915
2929
  await lifecyclePluginManager.runHookParallel("onError", {
@@ -2921,7 +2935,7 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
2921
2935
  }
2922
2936
  });
2923
2937
  }
2924
- _chunkGC5ROI3Acjs.logger.error(`\u274C Build failed: ${error}`);
2938
+ _chunk7U4XF76Rcjs.logger.error(`\u274C Build failed: ${error}`);
2925
2939
  throw error;
2926
2940
  } finally {
2927
2941
  _optionalChain([rendererBuild, 'optionalAccess', _85 => _85.abort, 'call', _86 => _86()]);
@@ -2931,10 +2945,10 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
2931
2945
  function collectFarmPrerenderedMarkdownBodies(pageRoutes) {
2932
2946
  const bodies = [];
2933
2947
  for (const route of pageRoutes) {
2934
- if (route.source === void 0 || !_chunkPG7J7XYTcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath)) continue;
2935
- const { body } = _chunkPG7J7XYTcjs.parseMarkdownFrontmatter.call(void 0, route.source);
2936
- const rendering = _chunkBZJYPIFZcjs.resolveRouteRenderingConfig.call(void 0,
2937
- _chunkPG7J7XYTcjs.readFarmMarkdownRouteConfig.call(void 0, body),
2948
+ if (route.source === void 0 || !_chunkQ4TRGTO7cjs.isFarmMarkdownPageFile.call(void 0, route.modulePath)) continue;
2949
+ const { body } = _chunkQ4TRGTO7cjs.parseMarkdownFrontmatter.call(void 0, route.source);
2950
+ const rendering = _chunkSDICLSQUcjs.resolveRouteRenderingConfig.call(void 0,
2951
+ _chunkQ4TRGTO7cjs.readFarmMarkdownRouteConfig.call(void 0, body),
2938
2952
  route.source
2939
2953
  );
2940
2954
  if (rendering.ssg && rendering.revalidate === void 0) bodies.push(body);
@@ -2977,7 +2991,7 @@ async function writeFarmVideoPlayerToClient(outputDir) {
2977
2991
  const filePath = _path2.default.join(outputDir, _chunkY3DO7BIJcjs.FARM_VIDEO_PLAYER_PATH.slice(1));
2978
2992
  await fs5.mkdir(_path2.default.dirname(filePath), { recursive: true });
2979
2993
  try {
2980
- await fs5.writeFile(filePath, _chunkHVMQAVZKcjs.FARM_VIDEO_PLAYER_HTML, { flag: "wx" });
2994
+ await fs5.writeFile(filePath, _chunkX4TSMQWFcjs.FARM_VIDEO_PLAYER_HTML, { flag: "wx" });
2981
2995
  } catch (error) {
2982
2996
  if (error.code !== "EEXIST") throw error;
2983
2997
  }
@@ -3011,7 +3025,7 @@ async function mergeBuiltFontCss(outputDir, fontCssSource) {
3011
3025
  }
3012
3026
  const normalizedFontCss = typeof fontCss === "string" ? fontCss : Buffer.from(fontCss).toString("utf8");
3013
3027
  await fs5.writeFile(fontCssPath, normalizedFontCss);
3014
- await fs5.writeFile(clientCssPath, _chunkHVMQAVZKcjs.mergeFarmFontCss.call(void 0, clientCss, normalizedFontCss));
3028
+ await fs5.writeFile(clientCssPath, _chunkX4TSMQWFcjs.mergeFarmFontCss.call(void 0, clientCss, normalizedFontCss));
3015
3029
  }
3016
3030
  function importsFarmClientBlockedPackage(id, packageName) {
3017
3031
  return id === packageName || id.startsWith(`${packageName}/`);
@@ -3061,10 +3075,10 @@ async function validateClientBuildOutput(root, srcDir, outputDir) {
3061
3075
  }
3062
3076
  }
3063
3077
  function getCachedClientModuleHydrationPlan(modulePath, root, mode, cache, options = {}) {
3064
- const key = _chunkODYKCC6Wcjs.getClientModuleHydrationPlanKey.call(void 0, modulePath, root, mode, options);
3078
+ const key = _chunkZVSQN7NCcjs.getClientModuleHydrationPlanKey.call(void 0, modulePath, root, mode, options);
3065
3079
  let plan = cache.get(key);
3066
3080
  if (!plan) {
3067
- plan = _chunkODYKCC6Wcjs.getClientModuleHydrationPlan.call(void 0, modulePath, root, mode, options);
3081
+ plan = _chunkZVSQN7NCcjs.getClientModuleHydrationPlan.call(void 0, modulePath, root, mode, options);
3068
3082
  cache.set(key, plan);
3069
3083
  }
3070
3084
  return { ...plan, isolatedBoundaries: [...plan.isolatedBoundaries] };
@@ -3073,7 +3087,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3073
3087
  if (!mobile) await _chunkE5UN4OWXcjs.removeFarmMobileClientManifest.call(void 0, _path2.default.dirname(outputDir));
3074
3088
  const viteBuild = productionVite.build;
3075
3089
  const { farmIslandContainersPlugin, farmPlugin, farmServerOnlyEntriesPlugin } = await import("./vite.cjs");
3076
- const { PluginManager: PluginManager2 } = await import("./plugin-AGEFSU7K.cjs");
3090
+ const { PluginManager: PluginManager2 } = await import("./plugin-LN3JBZRR.cjs");
3077
3091
  const fs5 = await import("fs/promises");
3078
3092
  const pluginManager = new PluginManager2({
3079
3093
  config,
@@ -3082,25 +3096,25 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3082
3096
  });
3083
3097
  pluginManager.addPlugins(config.plugins || []);
3084
3098
  const clientPages = [];
3085
- const integrationProviders = _chunkAOTD2N5Pcjs.getIntegrationProviders.call(void 0, config.integrations).filter(
3099
+ const integrationProviders = _chunkWGWWRV2Mcjs.getIntegrationProviders.call(void 0, config.integrations).filter(
3086
3100
  (provider) => provider.component || provider.type === "clerk"
3087
3101
  );
3088
3102
  const unsupportedIntegrationProvider = integrationProviders.find(
3089
3103
  (provider) => provider.supportsIsolatedHydration !== true
3090
3104
  );
3091
3105
  if (_optionalChain([config, 'access', _91 => _91.experimental, 'optionalAccess', _92 => _92.isolatedClientHydration]) === "enabled" && _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _93 => _93.experimental, 'optionalAccess', _94 => _94.serverComponents])) !== "rsc" && unsupportedIntegrationProvider) {
3092
- _chunkGC5ROI3Acjs.logger.warn(
3106
+ _chunk7U4XF76Rcjs.logger.warn(
3093
3107
  `[Farm.js] isolated hydration kept route-wide because integration provider "${unsupportedIntegrationProvider.name}" does not declare supportsIsolatedHydration: true.`
3094
3108
  );
3095
3109
  }
3096
- const isolatedMode = _chunkODYKCC6Wcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
3110
+ const isolatedMode = _chunkZVSQN7NCcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
3097
3111
  _optionalChain([config, 'access', _95 => _95.experimental, 'optionalAccess', _96 => _96.isolatedClientHydration]),
3098
3112
  {
3099
3113
  serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _97 => _97.experimental, 'optionalAccess', _98 => _98.serverComponents])) === "rsc",
3100
3114
  hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
3101
3115
  }
3102
3116
  );
3103
- const planOptions = _chunkODYKCC6Wcjs.getFarmClientHydrationPlanOptions.call(void 0,
3117
+ const planOptions = _chunkZVSQN7NCcjs.getFarmClientHydrationPlanOptions.call(void 0,
3104
3118
  config.renderer,
3105
3119
  Boolean(unsupportedIntegrationProvider)
3106
3120
  );
@@ -3112,13 +3126,13 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3112
3126
  ...planOptions,
3113
3127
  serverTreeLayouts: pagePlanOptions.serverOwners
3114
3128
  };
3115
- const layoutAppliesToRoute = _chunk6ZFGWB75cjs.routeBoundaryCoversDirectory;
3129
+ const layoutAppliesToRoute = _chunkUWOCYINYcjs.routeBoundaryCoversDirectory;
3116
3130
  const routeDirectory = (route) => _nullishCoalesce(route.directory, () => ( route.pattern));
3117
3131
  const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _101 => _101.experimental, 'optionalAccess', _102 => _102.serverComponents])) === "islands";
3118
3132
  const adapterOwnsDocsRuntime = Boolean(
3119
3133
  _chunk67MZTLTFcjs.isReactRenderer.call(void 0, config.renderer) && _optionalChain([config, 'access', _103 => _103.docs, 'optionalAccess', _104 => _104.enabled]) && _optionalChain([config, 'access', _105 => _105.docs, 'access', _106 => _106.adapter, 'optionalAccess', _107 => _107.server]) && config.docs.adapter.react
3120
3134
  );
3121
- const docsEntries = _optionalChain([config, 'access', _108 => _108.docs, 'optionalAccess', _109 => _109.enabled]) ? _chunk6D3CJFNUcjs.getFarmDocsRoots.call(void 0, config.docs).map(
3135
+ const docsEntries = _optionalChain([config, 'access', _108 => _108.docs, 'optionalAccess', _109 => _109.enabled]) ? _chunkHR5GU4UUcjs.getFarmDocsRoots.call(void 0, config.docs).map(
3122
3136
  (docsRoot) => `/${docsRoot.entry || "docs"}`.replace(/\/+/g, "/").replace(/\/$/, "") || "/"
3123
3137
  ) : [];
3124
3138
  const adapterDocsEntry = _nullishCoalesce(docsEntries[0], () => ( null));
@@ -3127,7 +3141,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3127
3141
  );
3128
3142
  const syntheticDocsEntry = _optionalChain([config, 'access', _110 => _110.docs, 'optionalAccess', _111 => _111.enabled]) && !adapterOwnsDocsRuntime ? adapterDocsEntry : null;
3129
3143
  const syntheticDocsPatterns = syntheticDocsEntry ? syntheticDocsEntry === "/" ? ["/", "/[...slug]"] : [syntheticDocsEntry, `${syntheticDocsEntry}/[...slug]`] : [];
3130
- const plan = (operation) => sourceSnapshot ? _chunkODYKCC6Wcjs.withFarmSourceSnapshotOf.call(void 0, sourceSnapshot, operation) : _chunkODYKCC6Wcjs.withFarmSourceSnapshot.call(void 0, operation);
3144
+ const plan = (operation) => sourceSnapshot ? _chunkZVSQN7NCcjs.withFarmSourceSnapshotOf.call(void 0, sourceSnapshot, operation) : _chunkZVSQN7NCcjs.withFarmSourceSnapshot.call(void 0, operation);
3131
3145
  const { clientLayouts, clientRouteSlots } = plan(() => {
3132
3146
  const clientLayouts2 = layoutRoutes.map((layout) => {
3133
3147
  try {
@@ -3155,7 +3169,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3155
3169
  serverTreeLayout: metadata.serverTreeLayout
3156
3170
  };
3157
3171
  } catch (error) {
3158
- _chunkGC5ROI3Acjs.logger.warn(`\u26A0\uFE0F Could not inspect layout file ${layout.modulePath}: ${error}`);
3172
+ _chunk7U4XF76Rcjs.logger.warn(`\u26A0\uFE0F Could not inspect layout file ${layout.modulePath}: ${error}`);
3159
3173
  return {
3160
3174
  ...layout,
3161
3175
  shouldHydrate: false,
@@ -3174,7 +3188,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3174
3188
  };
3175
3189
  }
3176
3190
  });
3177
- const markdownPagePlan = _chunkODYKCC6Wcjs.createMarkdownPageHydrationPlanner.call(void 0,
3191
+ const markdownPagePlan = _chunkZVSQN7NCcjs.createMarkdownPageHydrationPlanner.call(void 0,
3178
3192
  _chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, config.mdx), root),
3179
3193
  root,
3180
3194
  isolatedMode,
@@ -3182,7 +3196,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3182
3196
  );
3183
3197
  const routePlans = pageRoutes.map((route) => ({
3184
3198
  route,
3185
- metadata: _chunkPG7J7XYTcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath) ? markdownPagePlan() : getCachedClientModuleHydrationPlan(
3199
+ metadata: _chunkQ4TRGTO7cjs.isFarmMarkdownPageFile.call(void 0, route.modulePath) ? markdownPagePlan() : getCachedClientModuleHydrationPlan(
3186
3200
  route.modulePath,
3187
3201
  root,
3188
3202
  isolatedMode,
@@ -3190,7 +3204,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3190
3204
  pagePlanOptions
3191
3205
  )
3192
3206
  }));
3193
- _chunkODYKCC6Wcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
3207
+ _chunkZVSQN7NCcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
3194
3208
  clientLayouts2.map((layout) => ({
3195
3209
  pattern: layout.pattern,
3196
3210
  depth: layout.pattern.split("/").filter(Boolean).length,
@@ -3199,7 +3213,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3199
3213
  [
3200
3214
  ...routePlans.map(({ route, metadata }) => ({
3201
3215
  pattern: routeDirectory(route),
3202
- depth: _chunk6ZFGWB75cjs.getRouteDirectoryDepth.call(void 0, routeDirectory(route)),
3216
+ depth: _chunkUWOCYINYcjs.getRouteDirectoryDepth.call(void 0, routeDirectory(route)),
3203
3217
  metadata
3204
3218
  })),
3205
3219
  ...syntheticDocsPatterns.map((pattern) => ({
@@ -3223,8 +3237,8 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3223
3237
  for (const layout of clientLayouts2) {
3224
3238
  const matchesBuiltRoute = pageRoutes.some((route) => layoutAppliesToRoute(layout.pattern, routeDirectory(route))) || docsEntries.some((docsEntry) => layoutAppliesToRoute(layout.pattern, docsEntry));
3225
3239
  if (matchesBuiltRoute && layout.suppressedAsyncHydration) {
3226
- _chunkGC5ROI3Acjs.logger.warn(
3227
- `\u26A0\uFE0F ${_chunkODYKCC6Wcjs.describeSuppressedAsyncHydration.call(void 0, layout.pattern, layout.fallbackReason)}`
3240
+ _chunk7U4XF76Rcjs.logger.warn(
3241
+ `\u26A0\uFE0F ${_chunkZVSQN7NCcjs.describeSuppressedAsyncHydration.call(void 0, layout.pattern, layout.fallbackReason)}`
3228
3242
  );
3229
3243
  }
3230
3244
  }
@@ -3236,7 +3250,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3236
3250
  if (!("isolatedHydrationEligible" in metadata) || !metadata.isolatedHydrationEligible) {
3237
3251
  continue;
3238
3252
  }
3239
- _chunkGC5ROI3Acjs.logger.info(
3253
+ _chunk7U4XF76Rcjs.logger.info(
3240
3254
  `\u{1F4CA} Isolated hydration analysis: ${entry.modulePath} can exclude its server owner and hydrate ${metadata.isolatedBoundaries.length} client ${metadata.isolatedBoundaries.length === 1 ? "boundary" : "boundaries"}.`
3241
3255
  );
3242
3256
  }
@@ -3258,8 +3272,8 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3258
3272
  (layout) => (layout.shouldHydrate || layout.hasIsolatedClientBoundaries) && layoutAppliesToRoute(layout.pattern, routeDirectory(route))
3259
3273
  );
3260
3274
  if (metadata.suppressedAsyncHydration) {
3261
- _chunkGC5ROI3Acjs.logger.warn(
3262
- `\u26A0\uFE0F ${_chunkODYKCC6Wcjs.describeSuppressedAsyncHydration.call(void 0, route.pattern, metadata.fallbackReason)}`
3275
+ _chunk7U4XF76Rcjs.logger.warn(
3276
+ `\u26A0\uFE0F ${_chunkZVSQN7NCcjs.describeSuppressedAsyncHydration.call(void 0, route.pattern, metadata.fallbackReason)}`
3263
3277
  );
3264
3278
  }
3265
3279
  const slotBoundaries = serverSlotPlans.filter(
@@ -3267,7 +3281,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3267
3281
  ).flatMap(({ plan: plan2 }) => plan2.isolatedBoundaries);
3268
3282
  if (metadata.shouldHydrate || metadata.hasIsolatedClientBoundaries || applicableClientLayouts.length > 0 || slotBoundaries.length > 0) {
3269
3283
  const relativePath = route.modulePath.replace(root, "").replace(/^\//, "");
3270
- const islandStrategy = _chunkHVMQAVZKcjs.resolveFarmRouteRootStrategy.call(void 0,
3284
+ const islandStrategy = _chunkX4TSMQWFcjs.resolveFarmRouteRootStrategy.call(void 0,
3271
3285
  route,
3272
3286
  metadata,
3273
3287
  clientLayouts2,
@@ -3286,12 +3300,12 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3286
3300
  ...applicableClientLayouts.filter((layout) => layout.hasIsolatedClientBoundaries || layout.serverTreeLayout).flatMap((layout) => layout.isolatedBoundaries)
3287
3301
  ],
3288
3302
  // The server renders a server tree only below a hydrating layout.
3289
- ..._chunkODYKCC6Wcjs.usesFarmServerTree.call(void 0, metadata) && applicableClientLayouts.some((layout) => layout.shouldHydrate) ? { serverTree: true } : {}
3303
+ ..._chunkZVSQN7NCcjs.usesFarmServerTree.call(void 0, metadata) && applicableClientLayouts.some((layout) => layout.shouldHydrate) ? { serverTree: true } : {}
3290
3304
  });
3291
- _chunkGC5ROI3Acjs.logger.info(`\u{1F4F1} Found hydratable route: ${route.pattern} -> ${route.modulePath}`);
3305
+ _chunk7U4XF76Rcjs.logger.info(`\u{1F4F1} Found hydratable route: ${route.pattern} -> ${route.modulePath}`);
3292
3306
  }
3293
3307
  } catch (error) {
3294
- _chunkGC5ROI3Acjs.logger.warn(`\u26A0\uFE0F Could not inspect route file ${route.modulePath}: ${error}`);
3308
+ _chunk7U4XF76Rcjs.logger.warn(`\u26A0\uFE0F Could not inspect route file ${route.modulePath}: ${error}`);
3295
3309
  }
3296
3310
  }
3297
3311
  if (syntheticDocsEntry) {
@@ -3323,10 +3337,10 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3323
3337
  }
3324
3338
  const clientRouteSlots2 = routeSlots.filter((slot) => {
3325
3339
  try {
3326
- const metadata = _chunkODYKCC6Wcjs.getClientModuleMetadata.call(void 0, slot.modulePath, root);
3340
+ const metadata = _chunkZVSQN7NCcjs.getClientModuleMetadata.call(void 0, slot.modulePath, root);
3327
3341
  return metadata.shouldHydrate && (!islandsMode || metadata.isClientComponent);
3328
3342
  } catch (error) {
3329
- _chunkGC5ROI3Acjs.logger.warn(`\u26A0\uFE0F Could not inspect route slot ${slot.modulePath}: ${error}`);
3343
+ _chunk7U4XF76Rcjs.logger.warn(`\u26A0\uFE0F Could not inspect route slot ${slot.modulePath}: ${error}`);
3330
3344
  return false;
3331
3345
  }
3332
3346
  });
@@ -3335,20 +3349,20 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3335
3349
  const docsEntryOwns = (pattern) => syntheticDocsEntry === "/" || pattern === syntheticDocsEntry || pattern.startsWith(`${syntheticDocsEntry}/`);
3336
3350
  if (syntheticDocsEntry && clientPages.some((page) => !page.docs && docsEntryOwns(page.pattern))) {
3337
3351
  const docsPagePaths = new Set(
3338
- _chunk6D3CJFNUcjs.discoverFarmDocsPages.call(void 0,
3339
- _chunk6D3CJFNUcjs.resolveFarmDocsContentDir.call(void 0, config.docs, { root: config.root, srcDir: config.srcDir }),
3352
+ _chunkHR5GU4UUcjs.discoverFarmDocsPages.call(void 0,
3353
+ _chunkHR5GU4UUcjs.resolveFarmDocsContentDir.call(void 0, config.docs, { root: config.root, srcDir: config.srcDir }),
3340
3354
  config.docs
3341
3355
  ).map((page) => page.href)
3342
3356
  );
3343
3357
  const resolved = resolveFarmDocsClientRoutes(clientPages, docsPagePaths);
3344
3358
  for (const page of resolved.shadowed) {
3345
- _chunkGC5ROI3Acjs.logger.warn(
3359
+ _chunk7U4XF76Rcjs.logger.warn(
3346
3360
  `\u26A0\uFE0F ${page.pattern} has the URL shape of the docs route ${syntheticDocsPatterns[1]}, whose pages answer first: the page renders only at paths without a docs page, and does not hydrate as a page there.`
3347
3361
  );
3348
3362
  }
3349
3363
  clientPages.splice(0, clientPages.length, ...resolved.pages);
3350
3364
  }
3351
- _chunkGC5ROI3Acjs.logger.info(
3365
+ _chunk7U4XF76Rcjs.logger.info(
3352
3366
  `\u{1F4F1} Total hydratable routes detected: ${clientPages.length} pages, ${clientLayouts.filter((layout) => layout.shouldHydrate || layout.hasIsolatedClientBoundaries).length} layouts, and ${clientRouteSlots.length} slots`
3353
3367
  );
3354
3368
  const clientRouteTable = createFarmClientRouteTable(clientPages);
@@ -3365,22 +3379,22 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3365
3379
  clientRouteSlots,
3366
3380
  root,
3367
3381
  srcDir,
3368
- adapterOwnsDocsRuntime ? false : _chunkDZZHTMWMcjs.isFarmDocsSearchEnabled.call(void 0, config.docs),
3369
- adapterOwnsDocsRuntime ? void 0 : _chunkDZZHTMWMcjs.resolveFarmDocsSearchClientModule.call(void 0, root),
3370
- _optionalChain([config, 'access', _112 => _112.docs, 'optionalAccess', _113 => _113.enabled]) ? _chunk6D3CJFNUcjs.getFarmDocsRoots.call(void 0, config.docs).map((docsRoot) => docsRoot.entry) : void 0,
3382
+ adapterOwnsDocsRuntime ? false : _chunkN3H7UPBMcjs.isFarmDocsSearchEnabled.call(void 0, config.docs),
3383
+ adapterOwnsDocsRuntime ? void 0 : _chunkN3H7UPBMcjs.resolveFarmDocsSearchClientModule.call(void 0, root),
3384
+ _optionalChain([config, 'access', _112 => _112.docs, 'optionalAccess', _113 => _113.enabled]) ? _chunkHR5GU4UUcjs.getFarmDocsRoots.call(void 0, config.docs).map((docsRoot) => docsRoot.entry) : void 0,
3371
3385
  adapterOwnsDocsRuntime ? _optionalChain([config, 'access', _114 => _114.docs, 'access', _115 => _115.adapter, 'optionalAccess', _116 => _116.react]) : void 0,
3372
3386
  config.i18n,
3373
3387
  config.plugins,
3374
3388
  config.renderer,
3375
3389
  config.publicRuntimeConfig,
3376
3390
  config.trailingSlash,
3377
- _chunkAOTD2N5Pcjs.getIntegrationProviders.call(void 0, config.integrations),
3391
+ _chunkWGWWRV2Mcjs.getIntegrationProviders.call(void 0, config.integrations),
3378
3392
  config.basePath,
3379
- _chunkHVMQAVZKcjs.generateClientCachePersistenceCode.call(void 0, _chunkHVMQAVZKcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, config.cache)),
3393
+ _chunkX4TSMQWFcjs.generateClientCachePersistenceCode.call(void 0, _chunkX4TSMQWFcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, config.cache)),
3380
3394
  adapterOwnsDocsRuntime ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs) : void 0,
3381
3395
  _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _117 => _117.experimental, 'optionalAccess', _118 => _118.serverComponents])) === "islands",
3382
3396
  platform,
3383
- islandsMode ? _chunkODYKCC6Wcjs.collectFarmServerStylesheets.call(void 0,
3397
+ islandsMode ? _chunkZVSQN7NCcjs.collectFarmServerStylesheets.call(void 0,
3384
3398
  [
3385
3399
  ...layoutRoutes.map((layout) => layout.modulePath),
3386
3400
  ...pageRoutes.filter((route) => !isAdapterDocsRoute(route.pattern)).map((route) => route.modulePath)
@@ -3399,7 +3413,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3399
3413
  await fs5.writeFile(_path2.default.join(clientEntryDir, "farm-client-router.tsx"), clientEntry.router);
3400
3414
  }
3401
3415
  const clientInput = { [entryName]: clientEntryPath };
3402
- if (platform === "web" && _chunkHVMQAVZKcjs.canBootFarmIslandsClient.call(void 0, config)) {
3416
+ if (platform === "web" && _chunkX4TSMQWFcjs.canBootFarmIslandsClient.call(void 0, config)) {
3403
3417
  const clientBootPath = _path2.default.join(clientEntryDir, "farm-client-boot.tsx");
3404
3418
  await fs5.writeFile(
3405
3419
  clientBootPath,
@@ -3415,12 +3429,12 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3415
3429
  buildLifetime: rendererBuildLifetime
3416
3430
  });
3417
3431
  if (hasScopedPostcssConfig) {
3418
- _chunkGC5ROI3Acjs.logger.info("\u{1F4E6} Using project PostCSS/Tailwind configuration");
3432
+ _chunk7U4XF76Rcjs.logger.info("\u{1F4E6} Using project PostCSS/Tailwind configuration");
3419
3433
  } else {
3420
3434
  const postcssConfigPath = _path2.default.join(clientEntryDir, "postcss.config.cjs");
3421
3435
  await fs5.writeFile(postcssConfigPath, "module.exports = { plugins: [] };\n");
3422
3436
  postcssSearchPath = clientEntryDir;
3423
- tailwindVitePlugin = await _chunkMBD34AS5cjs.loadTailwindVitePlugin.call(void 0, {
3437
+ tailwindVitePlugin = await _chunkZ5BANEQDcjs.loadTailwindVitePlugin.call(void 0, {
3424
3438
  builder: productionVite.builder,
3425
3439
  announce: true
3426
3440
  });
@@ -3441,7 +3455,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3441
3455
  target: FARM_CLIENT_BUILD_TARGET,
3442
3456
  // Tailwind CSS 4 already requires newer browsers than that baseline. An app's own
3443
3457
  // `build.target` or `build.cssTarget` still decides, as Vite derives one from the other.
3444
- ..._optionalChain([config, 'access', _119 => _119.vite, 'optionalAccess', _120 => _120.build, 'optionalAccess', _121 => _121.target]) === void 0 && _optionalChain([config, 'access', _122 => _122.vite, 'optionalAccess', _123 => _123.build, 'optionalAccess', _124 => _124.cssTarget]) === void 0 && (_chunkMBD34AS5cjs.includesTailwindVitePlugin.call(void 0, tailwindVitePlugin) || _chunkMBD34AS5cjs.includesTailwindVitePlugin.call(void 0, _optionalChain([config, 'access', _125 => _125.vite, 'optionalAccess', _126 => _126.plugins]))) ? { cssTarget: _chunkMBD34AS5cjs.TAILWIND_CSS_BROWSER_TARGET } : {},
3458
+ ..._optionalChain([config, 'access', _119 => _119.vite, 'optionalAccess', _120 => _120.build, 'optionalAccess', _121 => _121.target]) === void 0 && _optionalChain([config, 'access', _122 => _122.vite, 'optionalAccess', _123 => _123.build, 'optionalAccess', _124 => _124.cssTarget]) === void 0 && (_chunkZ5BANEQDcjs.includesTailwindVitePlugin.call(void 0, tailwindVitePlugin) || _chunkZ5BANEQDcjs.includesTailwindVitePlugin.call(void 0, _optionalChain([config, 'access', _125 => _125.vite, 'optionalAccess', _126 => _126.plugins]))) ? { cssTarget: _chunkZ5BANEQDcjs.TAILWIND_CSS_BROWSER_TARGET } : {},
3445
3459
  outDir: outputDir,
3446
3460
  emptyOutDir: platform === "web",
3447
3461
  // Never public: see resolveFarmClientSourcemap.
@@ -3474,7 +3488,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3474
3488
  }
3475
3489
  },
3476
3490
  plugins: [
3477
- _chunkHVMQAVZKcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
3491
+ _chunkX4TSMQWFcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
3478
3492
  createFarmPrivateClientSourcemapsPlugin({
3479
3493
  outDir: _path2.default.join(
3480
3494
  _path2.default.dirname(outputDir),
@@ -3492,7 +3506,15 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3492
3506
  routerModules: [
3493
3507
  _path2.default.join(clientEntryDir, "farm-client-router.tsx"),
3494
3508
  _path2.default.join(clientEntryDir, `${FARM_CLIENT_ROUTE_TABLE_MODULE}.tsx`)
3495
- ]
3509
+ ],
3510
+ // What the islands entry loads with its first render or hydration (RFC 0010).
3511
+ ...islandsMode && _chunk67MZTLTFcjs.isReactRenderer.call(void 0, config.renderer) ? {
3512
+ rendererImports: [
3513
+ "react-dom/client",
3514
+ "@farm.js/core/internal/islands-runtime"
3515
+ ],
3516
+ rendererImporter: clientEntryPath
3517
+ } : {}
3496
3518
  }),
3497
3519
  ...adapterOwnsDocsRuntime && platform === "web" ? [
3498
3520
  createFarmDocsModulePreloadPlugin({
@@ -3510,7 +3532,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3510
3532
  ...rendererVitePlugins,
3511
3533
  ...config.vite.plugins || [],
3512
3534
  farmServerOnlyEntriesPlugin({ platform, distDir: config.distDir || ".farm" }),
3513
- _chunkHVMQAVZKcjs.farmDocsClientConfigPlugin.call(void 0,
3535
+ _chunkX4TSMQWFcjs.farmDocsClientConfigPlugin.call(void 0,
3514
3536
  adapterOwnsDocsRuntime ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, config.docs) : void 0
3515
3537
  ),
3516
3538
  // Plugin to redirect @farm.js/core imports to client-only exports
@@ -3543,7 +3565,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3543
3565
  },
3544
3566
  load: {
3545
3567
  filter: {
3546
- id: _chunkHVMQAVZKcjs.exactIdPattern.call(void 0, [
3568
+ id: _chunkX4TSMQWFcjs.exactIdPattern.call(void 0, [
3547
3569
  "\0empty-module",
3548
3570
  "\0empty-api-route",
3549
3571
  "\0farm-i18n-client-bridge",
@@ -3581,7 +3603,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3581
3603
  { ...config, isolatedClientBoundaryModules, programmaticClientRoutes, sourceSnapshot },
3582
3604
  pluginManager
3583
3605
  ),
3584
- _chunkODYKCC6Wcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
3606
+ _chunkZVSQN7NCcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
3585
3607
  ],
3586
3608
  mode: "production",
3587
3609
  css: postcssSearchPath ? {
@@ -3589,7 +3611,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3589
3611
  } : void 0,
3590
3612
  // Ensure React is bundled for client
3591
3613
  resolve: {
3592
- alias: _chunkHVMQAVZKcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
3614
+ alias: _chunkX4TSMQWFcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
3593
3615
  dedupe: [...config.renderer.dedupe || []]
3594
3616
  },
3595
3617
  // Optimize dependencies - exclude server-side code from client bundle
@@ -3603,7 +3625,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
3603
3625
  }
3604
3626
  };
3605
3627
  await viteBuild(
3606
- _chunkHVMQAVZKcjs.mergeFarmProductionViteConfig.call(void 0, clientViteConfig, config.vite, { clientOutput: true })
3628
+ _chunkX4TSMQWFcjs.mergeFarmProductionViteConfig.call(void 0, clientViteConfig, config.vite, { clientOutput: true })
3607
3629
  );
3608
3630
  if (platform === "mobile") {
3609
3631
  await fs5.rm(_path2.default.join(outputDir, `${entryName}.css`), { force: true });
@@ -3665,11 +3687,12 @@ function createHistoryState(path, pageState, currentState) {
3665
3687
 
3666
3688
  async function fetchFarmNavigationDocument(url, headers, recover = true, signal) {
3667
3689
  const deploymentId = window.__FARM_DEPLOYMENT_ID__;
3668
- const response = await fetch(url, {
3669
- headers: createFarmDeploymentRequestHeaders(deploymentId, headers),
3690
+ const requestHeaders = createFarmDeploymentRequestHeaders(deploymentId, headers);
3691
+ const response = await (${streamNavigations ? "(recover && takeFarmEarlyNavigation(url, requestHeaders, signal)) || " : ""}fetch(url, {
3692
+ headers: requestHeaders,
3670
3693
  signal,
3671
3694
  redirect: "manual",
3672
- });
3695
+ }));
3673
3696
  // Let a document navigation follow redirects, including cross-origin chains
3674
3697
  // and fragment inheritance. Never cache/swap their HTML under the source URL.
3675
3698
  if (response.type === "opaqueredirect" || response.redirected) {
@@ -3696,7 +3719,9 @@ async function fetchFarmNavigationDocument(url, headers, recover = true, signal)
3696
3719
  return response;
3697
3720
  }
3698
3721
 
3699
- ${streamNavigations ? _chunkHVMQAVZKcjs.FARM_NAVIGATION_STREAM_READER_SOURCE : ""}
3722
+ ${streamNavigations ? `${_chunkX4TSMQWFcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
3723
+
3724
+ ${_chunkX4TSMQWFcjs.FARM_EARLY_NAVIGATION_SOURCE}` : ""}
3700
3725
 
3701
3726
  function clearFarmPrefetchCacheOnDeploymentMismatch(router, error) {
3702
3727
  if (error?.name === "FarmDeploymentMismatchError") {
@@ -4849,7 +4874,7 @@ function generateClientHydrationEntry(clientPages, layoutRoutes, clientRouteSlot
4849
4874
  direction: {}
4850
4875
  }, plugins = [], renderer = _chunk67MZTLTFcjs.REACT_RENDERER, publicRuntimeConfig = void 0, trailingSlash = false, integrationProviders = [], basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false, platform, serverStylesheets = []) {
4851
4876
  const toImportPath = (targetPath) => targetPath.replace(/\\/g, "/");
4852
- const clientPluginEntry = _chunkMBD34AS5cjs.generateFarmClientPluginEntryCode.call(void 0,
4877
+ const clientPluginEntry = _chunkZ5BANEQDcjs.generateFarmClientPluginEntryCode.call(void 0,
4853
4878
  plugins,
4854
4879
  root,
4855
4880
  srcDir,
@@ -4857,12 +4882,22 @@ function generateClientHydrationEntry(clientPages, layoutRoutes, clientRouteSlot
4857
4882
  platform
4858
4883
  );
4859
4884
  const appSetupPath = _chunk67MZTLTFcjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
4860
- const rendererClientImports = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? `import React from "react";
4885
+ const lazyRenderer = islandValues && platform !== "mobile" && _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && clientRouteSlots.length === 0;
4886
+ const rendererClientImports = lazyRenderer ? `import React from "react";
4887
+ import { holdFarmIslandInteractions, restorePagePosition } from "@farm.js/core/internal/client-runtime";` : _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? `import React from "react";
4861
4888
  import { createRoot, hydrateRoot } from "react-dom/client";
4862
- import { restorePagePosition } from "@farm.js/core/internal/client-runtime";` : appSetupPath ? `import React, { createRoot, hydrateRoot, configureApp as __farmConfigureApp } from ${JSON.stringify(renderer.client)};
4863
- import __farmAppSetup from ${JSON.stringify(_chunkGC5ROI3Acjs.toPosixPath.call(void 0, appSetupPath))};
4864
- __farmConfigureApp(__farmAppSetup);` : `import React, { createRoot, hydrateRoot } from ${JSON.stringify(renderer.client)};`;
4865
- const providerClientCode = _chunkHVMQAVZKcjs.generateFarmIntegrationProviderClientCode.call(void 0,
4889
+ import { restorePagePosition } from "@farm.js/core/internal/client-runtime";` : (
4890
+ // Named exports only, as the server entry and the development client read them. A copy
4891
+ // of the namespace, so feature checks of optional exports don't make Rolldown warn.
4892
+ appSetupPath ? `import * as __farmRendererClient from ${JSON.stringify(renderer.client)};
4893
+ import { createRoot, hydrateRoot, configureApp as __farmConfigureApp } from ${JSON.stringify(renderer.client)};
4894
+ import __farmAppSetup from ${JSON.stringify(_chunk7U4XF76Rcjs.toPosixPath.call(void 0, appSetupPath))};
4895
+ const React = { ...__farmRendererClient };
4896
+ __farmConfigureApp(__farmAppSetup);` : `import * as __farmRendererClient from ${JSON.stringify(renderer.client)};
4897
+ import { createRoot, hydrateRoot } from ${JSON.stringify(renderer.client)};
4898
+ const React = { ...__farmRendererClient };`
4899
+ );
4900
+ const providerClientCode = _chunkX4TSMQWFcjs.generateFarmIntegrationProviderClientCode.call(void 0,
4866
4901
  integrationProviders,
4867
4902
  root,
4868
4903
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
@@ -4885,18 +4920,18 @@ __farmConfigureApp(__farmAppSetup);` : `import React, { createRoot, hydrateRoot
4885
4920
  const layoutImportStatements = [];
4886
4921
  const layoutRegistrations = [];
4887
4922
  const hydratingLayoutPatterns = layoutRoutes.filter((layout) => layout.shouldHydrate).map((layout) => layout.pattern);
4888
- const treeLayoutPatterns = islandValues ? _chunk6ZFGWB75cjs.getFarmServerTreeLayoutPatterns.call(void 0, layoutRoutes) : /* @__PURE__ */ new Set();
4923
+ const treeLayoutPatterns = islandValues ? _chunkUWOCYINYcjs.getFarmServerTreeLayoutPatterns.call(void 0, layoutRoutes) : /* @__PURE__ */ new Set();
4889
4924
  layoutRoutes.forEach((layout, index) => {
4890
4925
  const relativePath = toImportPath(layout.modulePath);
4891
4926
  const treeLayout = treeLayoutPatterns.has(layout.pattern);
4892
4927
  const rendersOnClient = treeLayout || !layout.hasIsolatedClientBoundaries && hydratingLayoutPatterns.some(
4893
- (pattern) => _chunk6ZFGWB75cjs.layoutsCanCoverSamePage.call(void 0, layout.pattern, pattern)
4928
+ (pattern) => _chunkUWOCYINYcjs.layoutsCanCoverSamePage.call(void 0, layout.pattern, pattern)
4894
4929
  );
4895
4930
  if (rendersOnClient && !treeLayout) {
4896
4931
  layoutImportStatements.push(`import Layout${index} from "${relativePath}";`);
4897
4932
  }
4898
- const groupScope = _chunk6ZFGWB75cjs.getRouteGroupScope.call(void 0, layout.pattern);
4899
- const groupFields = groupScope ? `, urlPattern: ${JSON.stringify(_chunk6ZFGWB75cjs.stripRouteGroups.call(void 0, layout.pattern))}, groupScope: ${JSON.stringify(groupScope)}` : "";
4933
+ const groupScope = _chunkUWOCYINYcjs.getRouteGroupScope.call(void 0, layout.pattern);
4934
+ const groupFields = groupScope ? `, urlPattern: ${JSON.stringify(_chunkUWOCYINYcjs.stripRouteGroups.call(void 0, layout.pattern))}, groupScope: ${JSON.stringify(groupScope)}` : "";
4900
4935
  layoutRegistrations.push(
4901
4936
  ` { pattern: ${JSON.stringify(layout.pattern)}${groupFields}, Component: ${rendersOnClient ? treeLayout ? `getFarmTreeLayoutComponent(${JSON.stringify(layout.pattern)})` : `Layout${index}` : "null"}, shouldHydrate: ${JSON.stringify(layout.shouldHydrate)}, islandStrategy: ${JSON.stringify(layout.islandStrategy)}${treeLayout ? ", serverTree: true" : ""} }`
4902
4937
  );
@@ -4973,7 +5008,7 @@ ${clientCachePersistence.imports}
4973
5008
  ${i18nClientRuntime}
4974
5009
  ${docsNavigationRuntime}
4975
5010
  ${docsAdapterRuntime}
4976
- ${_chunkDZZHTMWMcjs.generateFarmDocsSearchClientRuntime.call(void 0, docsSearchEnabled, docsSearchModuleId)}
5011
+ ${_chunkN3H7UPBMcjs.generateFarmDocsSearchClientRuntime.call(void 0, docsSearchEnabled, docsSearchModuleId)}
4977
5012
 
4978
5013
  setFarmBasePath(${JSON.stringify(basePath)});
4979
5014
  setFarmTrailingSlashPreference(${JSON.stringify(trailingSlash)});
@@ -4983,7 +5018,7 @@ mountFarmDocsSearch();
4983
5018
 
4984
5019
  ${generateUniversalRouterStateRuntime()}
4985
5020
 
4986
- ${_chunkHVMQAVZKcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
5021
+ ${_chunkX4TSMQWFcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
4987
5022
 
4988
5023
  // SPA Router for server-rendered pages (HTML swap)
4989
5024
  const spaRouter = {
@@ -5273,7 +5308,7 @@ installFarmLinkPrefetch();
5273
5308
  clientPages.forEach((page) => {
5274
5309
  for (const boundary of page.isolatedBoundaries) {
5275
5310
  isolatedBoundaryModules.set(
5276
- _chunkGC5ROI3Acjs.toViteModuleId.call(void 0, boundary.modulePath, root),
5311
+ _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, boundary.modulePath, root),
5277
5312
  toImportPath(boundary.modulePath)
5278
5313
  );
5279
5314
  }
@@ -5285,7 +5320,42 @@ installFarmLinkPrefetch();
5285
5320
  });
5286
5321
  const isolatedHydrationEnabled = isolatedBoundaryModules.size > 0;
5287
5322
  const serverTreeEnabled = isolatedHydrationEnabled && clientPages.some((page) => page.serverTree);
5288
- const isolatedHydrationImport = isolatedHydrationEnabled ? `${islandValues ? `import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph, createFarmServerTreeElement${hasServerTreeLayouts ? ", createFarmServerTreeLayout" : ""} } from "@farm.js/core/internal/islands-runtime";` : 'import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph } from "@farm.js/core/internal/isolated-boundary";'}${serverTreeEnabled && !islandValues ? '\nimport { createFarmServerTreeElement } from "@farm.js/core/internal/server-tree";' : ""}` : "";
5323
+ const islandsRuntimeExports = [
5324
+ "createFarmIsolatedHydrationRuntime",
5325
+ "createFarmServerPageBoundary",
5326
+ "wrapFarmIsolatedClientGraph",
5327
+ ...serverTreeEnabled ? ["createFarmServerTreeElement"] : [],
5328
+ ...hasServerTreeLayouts ? ["createFarmServerTreeLayout"] : []
5329
+ ].join(", ");
5330
+ const lazyRendererRuntime = lazyRenderer ? `// React DOM${isolatedHydrationEnabled ? " and islx" : ""} load with the first render or hydration (RFC 0010).
5331
+ let createRoot;
5332
+ let hydrateRoot;
5333
+ let farmRendererLoading = null;
5334
+ let farmRendererLoaded = false;${isolatedHydrationEnabled ? `
5335
+ // The boot stops holding interactions once this entry runs. Until islx loads, islands that have not
5336
+ // hydrated hold them here, for their schedulers to replay.
5337
+ const releaseFarmIslandInteractions = holdFarmIslandInteractions("f-island");` : ""}
5338
+ function loadFarmRenderer() {
5339
+ return farmRendererLoading || (farmRendererLoading = Promise.all([
5340
+ import("react-dom/client"),${isolatedHydrationEnabled ? `
5341
+ // Named here, so the build keeps only these of islx's exports.
5342
+ import("@farm.js/core/internal/islands-runtime").then(function({ ${islandsRuntimeExports} }) {
5343
+ return { ${islandsRuntimeExports} };
5344
+ }),` : ""}
5345
+ ]).then(function(modules) {
5346
+ createRoot = modules[0].createRoot;
5347
+ hydrateRoot = modules[0].hydrateRoot;${isolatedHydrationEnabled ? "\n startFarmIslandsRuntime(modules[1]);\n releaseFarmIslandInteractions();" : ""}
5348
+ farmRendererLoaded = true;
5349
+ }, function(error) {${isolatedHydrationEnabled ? `
5350
+ // Without islx a held click would never replay: the page acts natively again.
5351
+ releaseFarmIslandInteractions();` : ""}
5352
+ // A chunk that failed to load can load on a later call.
5353
+ farmRendererLoading = null;
5354
+ throw error;
5355
+ }));
5356
+ }
5357
+ ` : "";
5358
+ const isolatedHydrationImport = lazyRenderer ? "" : isolatedHydrationEnabled ? `${islandValues ? `import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph, createFarmServerTreeElement${hasServerTreeLayouts ? ", createFarmServerTreeLayout" : ""} } from "@farm.js/core/internal/islands-runtime";` : 'import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph } from "@farm.js/core/internal/isolated-boundary";'}${serverTreeEnabled && !islandValues ? '\nimport { createFarmServerTreeElement } from "@farm.js/core/internal/server-tree";' : ""}` : "";
5289
5359
  const isolatedHydrationRuntime = isolatedHydrationEnabled ? `const farmIsolatedBoundaryLoaders = {
5290
5360
  ${Array.from(isolatedBoundaryModules.entries()).map(
5291
5361
  ([reference, modulePath]) => ` ${JSON.stringify(reference)}: () => import(${JSON.stringify(modulePath)}),`
@@ -5296,7 +5366,43 @@ async function loadFarmIsolatedBoundary(reference) {
5296
5366
  if (!loader) throw new Error("isolated client boundary loader was not found: " + reference);
5297
5367
  return loader();
5298
5368
  }
5299
- const farmIsolatedHydrationRuntime = createFarmIsolatedHydrationRuntime({
5369
+ ${lazyRenderer ? `let farmIslandsRuntime = null;
5370
+ let FarmServerPage;
5371
+ let wrapFarmIsolatedClientGraph;${serverTreeEnabled ? "\nlet createFarmServerTreeElement;" : ""}${hasServerTreeLayouts ? "\nlet createFarmServerTreeLayout;" : ""}
5372
+ function startFarmIslandsRuntime(islands) {
5373
+ wrapFarmIsolatedClientGraph = islands.wrapFarmIsolatedClientGraph;${serverTreeEnabled ? "\n createFarmServerTreeElement = islands.createFarmServerTreeElement;" : ""}${hasServerTreeLayouts ? "\n createFarmServerTreeLayout = islands.createFarmServerTreeLayout;" : ""}
5374
+ farmIslandsRuntime = islands.createFarmIsolatedHydrationRuntime({
5375
+ ReactRuntime: React,
5376
+ hydrateRoot,
5377
+ load: loadFarmIsolatedBoundary,
5378
+ schedule: scheduleFarmIslandHydration,
5379
+ wrap: wrapWithIntegrationProviders,
5380
+ });
5381
+ // A hydrating layout keeps a non-hydrating page as server HTML; this wrapper runs its islands.
5382
+ FarmServerPage = islands.createFarmServerPageBoundary(React, farmIslandsRuntime);
5383
+ }
5384
+ // Nothing hydrates before islx loads. Until then, calls wait for it in the order they were made,
5385
+ // behind the hydration that loads it; one that fails reports itself to whoever awaited it.
5386
+ function whenFarmIslandsRuntime(call) {
5387
+ if (farmIslandsRuntime) call(farmIslandsRuntime);
5388
+ else if (farmRendererLoading) farmRendererLoading.then(function() { call(farmIslandsRuntime); }, function() {});
5389
+ }
5390
+ const farmIsolatedHydrationRuntime = {
5391
+ hydrate: function(scope, signal) {
5392
+ if (farmIslandsRuntime) return farmIslandsRuntime.hydrate(scope, signal);
5393
+ return loadFarmRenderer().then(function() { return farmIslandsRuntime.hydrate(scope, signal); });
5394
+ },
5395
+ dispose: function(scope) {
5396
+ whenFarmIslandsRuntime(function(runtime) { runtime.dispose(scope); });
5397
+ },
5398
+ // Only a hydrated island has state to carry over.
5399
+ carryOver: function(from, to) {
5400
+ if (farmIslandsRuntime) farmIslandsRuntime.carryOver(from, to);
5401
+ },
5402
+ endStream: function(root) {
5403
+ whenFarmIslandsRuntime(function(runtime) { runtime.endStream(root); });
5404
+ },
5405
+ };` : `const farmIsolatedHydrationRuntime = createFarmIsolatedHydrationRuntime({
5300
5406
  ReactRuntime: React,
5301
5407
  hydrateRoot,
5302
5408
  load: loadFarmIsolatedBoundary,
@@ -5305,7 +5411,7 @@ const farmIsolatedHydrationRuntime = createFarmIsolatedHydrationRuntime({
5305
5411
  });
5306
5412
 
5307
5413
  // A hydrating layout keeps a non-hydrating page as server HTML; this wrapper runs its islands.
5308
- const FarmServerPage = createFarmServerPageBoundary(React, farmIsolatedHydrationRuntime);
5414
+ const FarmServerPage = createFarmServerPageBoundary(React, farmIsolatedHydrationRuntime);`}
5309
5415
 
5310
5416
  function disposeFarmIsolatedClientBoundaries(scope) {
5311
5417
  farmIsolatedHydrationRuntime.dispose(scope);
@@ -5362,7 +5468,7 @@ ${docsNavigationRuntime}
5362
5468
  ${docsAdapterRuntime}
5363
5469
 
5364
5470
  ${imports.join("\n")}
5365
- ${_chunkDZZHTMWMcjs.generateFarmDocsSearchClientRuntime.call(void 0, docsSearchEnabled, docsSearchModuleId)}
5471
+ ${_chunkN3H7UPBMcjs.generateFarmDocsSearchClientRuntime.call(void 0, docsSearchEnabled, docsSearchModuleId, void 0, lazyRenderer ? "loadFarmRenderer" : void 0)}
5366
5472
 
5367
5473
  ${providerClientCode.runtime}
5368
5474
 
@@ -5382,7 +5488,7 @@ ${generateFarmClientRouteTableRuntime({
5382
5488
  })}
5383
5489
  ${generateClientPageDirectorySource()}
5384
5490
 
5385
- ${isolatedHydrationRuntime}
5491
+ ${lazyRendererRuntime}${isolatedHydrationRuntime}
5386
5492
  ${routeClientGraphRuntime}
5387
5493
 
5388
5494
  const clientRouteSlots = [
@@ -5431,7 +5537,7 @@ function hasHydratableLayout(pathname) {
5431
5537
  });
5432
5538
  }
5433
5539
 
5434
- ${_chunkHVMQAVZKcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
5540
+ ${_chunkX4TSMQWFcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
5435
5541
  // Wrap a page element with applicable layouts
5436
5542
  function wrapWithLayouts(pageElement, pathname, params) {
5437
5543
  const layouts = getApplicableLayouts(pathname);
@@ -5466,7 +5572,7 @@ function createLayoutPageBoundary(route, pageElement, serverHtml) {
5466
5572
  return React.createElement("div", props, pageElement);
5467
5573
  }
5468
5574
  let farmLastRouteState = null;
5469
- ${hasServerTreeLayouts && islandValues && isolatedHydrationEnabled ? `${_chunkHVMQAVZKcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
5575
+ ${hasServerTreeLayouts && islandValues && isolatedHydrationEnabled ? `${_chunkX4TSMQWFcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
5470
5576
  function farmTreeLayoutsOf(pathname) {
5471
5577
  return getApplicableLayouts(pathname).filter(function(layout) {
5472
5578
  return layout.serverTree === true;
@@ -5506,10 +5612,15 @@ function matchRoute(pathname) {
5506
5612
  }
5507
5613
 
5508
5614
  async function loadRouteComponent(route) {
5509
- if (!route.load) return null;
5615
+ if (!route.load) return null;${lazyRenderer ? `
5616
+ // A page component renders with React DOM, which loads beside it (RFC 0010).
5617
+ const renderer = loadFarmRenderer();
5618
+ if (!route.Component) route.Component = await route.load();
5619
+ await renderer;
5620
+ return route.Component;` : `
5510
5621
  if (route.Component) return route.Component;
5511
5622
  route.Component = await route.load();
5512
- return route.Component;
5623
+ return route.Component;`}
5513
5624
  }
5514
5625
 
5515
5626
  // The props the server rendered this document with, as the page receives them:
@@ -5525,7 +5636,9 @@ function reviveServerPageProps(serverProps) {
5525
5636
  async function createMatchedHydrationRoute(matched, pathname, searchParams, navigationPage, serverProps, layoutSource, hydrationContainer) {
5526
5637
  const hydrateLayouts = hasHydratableLayout(pathname);
5527
5638
  const params = matched.params;
5528
- let pageElement = null;
5639
+ let pageElement = null;${lazyRenderer ? `
5640
+ // Only a route that renders a page or its layouts needs React DOM; one of islands hydrates them.
5641
+ if (hydrateLayouts || matched.route.pageShouldHydrate) await loadFarmRenderer();` : ""}
5529
5642
  // Layouts rendered as server trees rebuild from the HTML that carries them.
5530
5643
  if (hydrateLayouts && !(await prepareFarmTreeLayouts(pathname, params, layoutSource))) return null;
5531
5644
 
@@ -5895,7 +6008,9 @@ async function hydrate() {
5895
6008
  );
5896
6009
  window.__FARM_PROPS__ = initialPayload.page;
5897
6010
  window.__FARM_ROUTE_SLOTS__ = initialPayload.slots;
5898
-
6011
+ ${lazyRenderer ? ` // React DOM and islx load with what first renders or hydrates, not here (RFC 0010): a root
6012
+ // that waits for its trigger, or a navigation that swaps its page in, does not wait for them.
6013
+ ` : ""}
5899
6014
  if (await hydrateFarmDocsAdapterRuntime()) {
5900
6015
  return;
5901
6016
  }
@@ -5932,101 +6047,82 @@ async function hydrate() {
5932
6047
  return;
5933
6048
  }
5934
6049
 
6050
+ const pageHydration = scheduleFarmRouteHydration(matched, pathname, container, window.__FARM_PROPS__);
6051
+ ${isolatedHydrationEnabled ? `// Not cancelled with the page: a navigation disposes the islands it removes, and one in a
6052
+ // layout it keeps still waits for its trigger, as on a page of islands only.
6053
+ const isolatedHydration =
6054
+ !hasHydratableLayout(pathname) &&
6055
+ document.querySelector('f-island[src]')
6056
+ ? hydrateFarmIsolatedClientBoundaries(document)
6057
+ : Promise.resolve();
6058
+ await Promise.all([pageHydration, isolatedHydration]);` : "await pageHydration;"}
6059
+ }
6060
+
6061
+ // Hydrates the route's page or layout root in \`container\` when its strategy is due: at once, or
6062
+ // on its idle, visible or interaction trigger (RFC 0003, section 11). The first load schedules it,
6063
+ // and so does a navigation that swaps a page into a root that never hydrated (RFC 0011): nothing
6064
+ // in that root ran, so it waits for the next page's trigger as a first load of that page would.
6065
+ function scheduleFarmRouteHydration(matched, pathname, container, serverProps) {
5935
6066
  container.dataset.farmIsland = "page";
5936
6067
  container.dataset.farmIslandStrategy = matched.route.islandStrategy || "load";
5937
6068
 
5938
6069
  const hydrationController = new AbortController();
5939
6070
  pendingPageHydrationController = hydrationController;
5940
- try {
5941
- const pageHydration = scheduleFarmIslandHydration({
5942
- container,
5943
- strategy: matched.route.islandStrategy,
5944
- signal: hydrationController.signal,
5945
- hydrate: async function() {
5946
- if (
5947
- hydrationController.signal.aborted ||
5948
- !container.isConnected ||
5949
- window.location.pathname !== pathname
5950
- ) {
5951
- return;
5952
- }
5953
- const searchParams = searchParamsToObject(new URLSearchParams(window.location.search));
5954
- const shouldHydrate = !isHydrated && Boolean(container.innerHTML.trim());
5955
- const routeState = await createMatchedHydrationRoute(
5956
- matched,
5957
- pathname,
5958
- searchParams,
5959
- undefined,
5960
- window.__FARM_PROPS__,
5961
- undefined,
5962
- shouldHydrate ? container : undefined,
5963
- );
5964
- if (!routeState) return;
5965
- const hydrationSession = await farmClientRuntime.beginHydration({
5966
- container,
5967
- mode: shouldHydrate ? "hydrate" : "render",
5968
- });
6071
+ return scheduleFarmIslandHydration({
6072
+ container,
6073
+ strategy: matched.route.islandStrategy,
6074
+ signal: hydrationController.signal,
6075
+ hydrate: async function() {
6076
+ if (
6077
+ hydrationController.signal.aborted ||
6078
+ !container.isConnected ||
6079
+ window.location.pathname !== pathname
6080
+ ) {
6081
+ return;
6082
+ }
6083
+ const searchParams = searchParamsToObject(new URLSearchParams(window.location.search));
6084
+ const shouldHydrate = !isHydrated && Boolean(container.innerHTML.trim());
6085
+ const routeState = await createMatchedHydrationRoute(
6086
+ matched,
6087
+ pathname,
6088
+ searchParams,
6089
+ undefined,
6090
+ serverProps,
6091
+ undefined,
6092
+ shouldHydrate ? container : undefined,
6093
+ );
6094
+ if (!routeState) return;
6095
+ const hydrationSession = await farmClientRuntime.beginHydration({
6096
+ container,
6097
+ mode: shouldHydrate ? "hydrate" : "render",
6098
+ });
5969
6099
 
5970
- try {
5971
- // A navigation replaced this route before it hydrated. Like a superseded
5972
- // navigation, that is not a failure, so error hooks never see it.
5973
- if (hydrationController.signal.aborted || !container.isConnected) return;
5974
- if (shouldHydrate) {
5975
- reactRoot = hydrateFarmRoute(container, routeState);
6100
+ try {
6101
+ // A navigation replaced this route before it hydrated. Like a superseded
6102
+ // navigation, that is not a failure, so error hooks never see it.
6103
+ if (hydrationController.signal.aborted || !container.isConnected) return;
6104
+ if (shouldHydrate) {
6105
+ reactRoot = hydrateFarmRoute(container, routeState);
6106
+ reactRootContainer = container;
6107
+ isHydrated = true;
6108
+ } else {
6109
+ if (!reactRoot) {
6110
+ reactRoot = createRoot(container);
5976
6111
  reactRootContainer = container;
5977
- isHydrated = true;
5978
- } else {
5979
- if (!reactRoot) {
5980
- reactRoot = createRoot(container);
5981
- reactRootContainer = container;
5982
- }
5983
- renderFarmRoute(reactRoot, routeState);
5984
6112
  }
5985
- await farmClientRuntime.completeHydration(hydrationSession);
5986
- } catch (error) {
5987
- await farmClientRuntime.failHydration(hydrationSession, error);
5988
- console.error("[Farm.js] Hydration error:", error);
6113
+ renderFarmRoute(reactRoot, routeState);
5989
6114
  }
5990
- },
5991
- });
5992
- ${islandValues ? `// A layout root that waits for a click renders again on a navigation, and a link under the
5993
- // pointer is a navigation on its way: hydrate the root now, as a focus would, so the click
5994
- // updates it instead of rendering it from the start.
5995
- if (hasHydratableLayout(pathname) && (matched.route.islandStrategy || "load") !== "load") {
5996
- const hydrateForLink = function(target) {
5997
- const anchor = target instanceof Element ? target.closest("a[href]") : null;
5998
- const href = anchor && anchor.getAttribute("href");
5999
- if (!href || href.startsWith("#") || hasAbsoluteNavigationHref(href)) return false;
6000
- if (!container.contains(anchor)) return false;
6001
- document.dispatchEvent(
6002
- new CustomEvent("farm:island-interaction", { detail: { target: anchor, kind: null } }),
6003
- );
6004
- return true;
6005
- };
6006
- const onLinkIntent = function(event) {
6007
- if (hydrateForLink(event.target)) document.removeEventListener("mouseover", onLinkIntent, true);
6008
- };
6009
- // The hover that loaded this entry fired before it ran.
6010
- if (!hydrateForLink(container.querySelector("a[href]:hover"))) {
6011
- document.addEventListener("mouseover", onLinkIntent, true);
6012
- void pageHydration.finally(function() {
6013
- document.removeEventListener("mouseover", onLinkIntent, true);
6014
- });
6115
+ await farmClientRuntime.completeHydration(hydrationSession);
6116
+ } catch (error) {
6117
+ await farmClientRuntime.failHydration(hydrationSession, error);
6118
+ console.error("[Farm.js] Hydration error:", error);
6015
6119
  }
6016
- }` : ""}
6017
- ${isolatedHydrationEnabled ? `// Not cancelled with the page: a navigation disposes the islands it removes, and one in a
6018
- // layout it keeps still waits for its trigger, as on a page of islands only.
6019
- const isolatedHydration =
6020
- !hasHydratableLayout(pathname) &&
6021
- document.querySelector('f-island[src]')
6022
- ? hydrateFarmIsolatedClientBoundaries(document)
6023
- : Promise.resolve();
6024
- await Promise.all([pageHydration, isolatedHydration]);` : "await pageHydration;"}
6025
- } finally {
6120
+ },
6121
+ }).finally(function() {
6026
6122
  if (pendingPageHydrationController === hydrationController) {
6027
6123
  pendingPageHydrationController = null;
6028
6124
  }
6029
- }
6125
+ });
6030
6126
  }
6031
6127
 
6032
6128
  /*farm-router-start*/
@@ -6065,7 +6161,7 @@ function fitsSegmentResponse(currentRoot, nextRoot) {
6065
6161
  return true;
6066
6162
  }` : ""}
6067
6163
 
6068
- ${_chunkHVMQAVZKcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
6164
+ ${_chunkX4TSMQWFcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
6069
6165
 
6070
6166
  function activateNavigationScripts(root) {
6071
6167
  for (const script of Array.from(root?.querySelectorAll?.("script") || [])) {
@@ -6168,7 +6264,7 @@ function getLayoutShell(root, patterns, index) {
6168
6264
  return shell.innerHTML;
6169
6265
  }
6170
6266
 
6171
- ${islandValues ? _chunkHVMQAVZKcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceSharedLayoutBoundary(currentRoot, nextRoot, refresh = false) {
6267
+ ${islandValues ? _chunkX4TSMQWFcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceSharedLayoutBoundary(currentRoot, nextRoot, refresh = false) {
6172
6268
  // A refresh keeps the islands still on the page: the ones in streamed Suspense content too.
6173
6269
  if (refresh) revealFarmStreamedContent(nextRoot);
6174
6270
  const currentPatterns = getLayoutPatterns(currentRoot);
@@ -6235,11 +6331,9 @@ ${islandValues ? ` // Islands mode: navigations name the layouts on screen, and
6235
6331
  partialNavigationHeaders: function() {
6236
6332
  const root = document.getElementById("root") || document.body;
6237
6333
  const layouts = getLayoutPatterns(root);
6238
- // The root React owns, or one whose layouts hydrate together but have not yet: the
6239
- // navigation creates it (swapContent).
6240
- const rendersTree = reactRoot
6241
- ? reactRootContainer === root
6242
- : root.id === "root" && hasHydratableLayout(window.location.pathname);
6334
+ // Only a root React owns rebuilds the next page from its tree. One that has not hydrated
6335
+ // swaps the next page's HTML in and keeps waiting (swapContent), without React DOM.
6336
+ const rendersTree = Boolean(reactRoot) && reactRootContainer === root;
6243
6337
  return {
6244
6338
  ...(layouts.length ? { "F-Layouts": JSON.stringify(layouts) } : {}),
6245
6339
  ...(rendersTree ? { "F-Render": "tree" } : {}),
@@ -6578,30 +6672,6 @@ ${islandValues ? ` // Islands mode: navigations name the layouts on screen, and
6578
6672
  const hydrateLayouts = hasHydratableLayout(newPathname);
6579
6673
  const nextPage = newRoot.querySelector("#__farm_page__");
6580
6674
 
6581
- ${islandValues ? `// A layout that hydrates as one root but has not yet (its client components wait for a
6582
- // click): its first navigation renders the page's payload in a new root, as later ones do.
6583
- if (
6584
- matched && hydrateLayouts && !reactRoot && currentRoot.id === "root" &&
6585
- nextPage?.querySelector('script[type="f/tree"][partial]')
6586
- ) {
6587
- const routeState = await createMatchedHydrationRoute(
6588
- matched,
6589
- newPathname,
6590
- searchParamsToObject(targetUrl.searchParams),
6591
- nextPage,
6592
- nextPageProps,
6593
- newRoot,
6594
- );
6595
- if (!isNavigationCurrent()) return false;
6596
- if (!routeState) return "segment-mismatch";
6597
- cancelPendingPageHydration();
6598
- resetRouteSlotRoots();
6599
- setFarmReactRoot(createRoot(currentRoot), currentRoot);
6600
- renderFarmRoute(reactRoot, routeState);
6601
- window.__FARM_ROUTE_SLOTS__ = nextRouteSlots;
6602
- setFarmHydrated();
6603
- return true;
6604
- }` : ""}
6605
6675
  // If React already owns the shared layout, update that root. React keeps
6606
6676
  // matching layout component instances and their state mounted.
6607
6677
  if (matched && hydrateLayouts && reactRoot && reactRootContainer === currentRoot) {
@@ -6646,24 +6716,51 @@ ${islandValues ? ` // Islands mode: navigations name the layouts on screen, and
6646
6716
 
6647
6717
  // Check if the new HTML contains an interactive route boundary.
6648
6718
  if (matched) {
6649
- const searchParams = searchParamsToObject(targetUrl.searchParams);
6650
6719
  const pageContainer =
6651
6720
  hydrateLayouts ? currentRoot : document.getElementById("__farm_page__") || currentRoot;
6652
- const routeState = await createMatchedHydrationRoute(
6653
- matched,
6654
- newPathname,
6655
- searchParams,
6656
- undefined,
6657
- nextPageProps,
6658
- undefined,
6659
- pageContainer,
6660
- );
6661
- if (!isNavigationCurrent()) return false;
6662
- if (routeState) {
6663
- setFarmReactRoot(hydrateFarmRoute(pageContainer, routeState), pageContainer);
6664
- setFarmHydrated();
6721
+ if (
6722
+ (hydrateLayouts || matched.route.pageShouldHydrate) &&
6723
+ (matched.route.islandStrategy || "load") !== "load"
6724
+ ) {
6725
+ // A root that waits for its trigger waits after a navigation too, as on a first load:
6726
+ // the page is server HTML and its tree until then, and React DOM loads when it hydrates.
6727
+ scheduleFarmRouteHydration(matched, newPathname, pageContainer, nextPageProps).catch(
6728
+ function(error) {
6729
+ console.error("[Farm.js] Hydration error:", error);
6730
+ },
6731
+ );
6732
+ } else {
6733
+ const searchParams = searchParamsToObject(targetUrl.searchParams);
6734
+ const routeState = await createMatchedHydrationRoute(
6735
+ matched,
6736
+ newPathname,
6737
+ searchParams,
6738
+ undefined,
6739
+ nextPageProps,
6740
+ undefined,
6741
+ pageContainer,
6742
+ );
6743
+ if (!isNavigationCurrent()) return false;
6744
+ if (routeState) {
6745
+ setFarmReactRoot(hydrateFarmRoute(pageContainer, routeState), pageContainer);
6746
+ setFarmHydrated();
6747
+ }
6665
6748
  }
6666
- ${isolatedHydrationEnabled ? `if (matched.route.hasIsolatedClientBoundaries && !hydrateLayouts) {
6749
+ ${isolatedHydrationEnabled ? lazyRenderer ? `if (matched.route.hasIsolatedClientBoundaries && !hydrateLayouts) {
6750
+ if (farmRendererLoaded) {
6751
+ await hydrateFarmIsolatedClientBoundaries(
6752
+ isolatedHydrationScope,
6753
+ navigation.controller.signal,
6754
+ );
6755
+ if (!isNavigationCurrent()) return false;
6756
+ } else {
6757
+ // React DOM and islx are still on their way (RFC 0010): the page shows now, and its
6758
+ // islands hydrate once they arrive. A navigation that removes them first disposes them.
6759
+ hydrateFarmIsolatedClientBoundaries(isolatedHydrationScope).catch(function(error) {
6760
+ console.error("[Farm.js] Hydrating the page's islands failed:", error);
6761
+ });
6762
+ }
6763
+ }` : `if (matched.route.hasIsolatedClientBoundaries && !hydrateLayouts) {
6667
6764
  await hydrateFarmIsolatedClientBoundaries(
6668
6765
  isolatedHydrationScope,
6669
6766
  navigation.controller.signal,
@@ -6816,7 +6913,7 @@ void hydrate();
6816
6913
  async function buildSSRInMemory(productionVite, config, root, routeManager, apiRouteManager, serverRenderer, preset, collectedPageRoutes, collectedLayoutRoutes, collectedRouteSlots, isolatedClientBoundaryModules, hydrationPlanCache, rendererBuildLifetime, sourceSnapshot) {
6817
6914
  const viteBuild = productionVite.build;
6818
6915
  const { farmIslandContainersPlugin, farmPlugin, farmServerOnlyEntriesPlugin } = await import("./vite.cjs");
6819
- const { PluginManager: PluginManager2 } = await import("./plugin-AGEFSU7K.cjs");
6916
+ const { PluginManager: PluginManager2 } = await import("./plugin-LN3JBZRR.cjs");
6820
6917
  const fs5 = await import("fs/promises");
6821
6918
  const pluginManager = new PluginManager2({
6822
6919
  config,
@@ -6837,7 +6934,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
6837
6934
  _path2.default.join(postcssConfigDir, "postcss.config.cjs"),
6838
6935
  "module.exports = { plugins: [] };\n"
6839
6936
  );
6840
- tailwindVitePlugin = await _chunkMBD34AS5cjs.loadTailwindVitePlugin.call(void 0, {
6937
+ tailwindVitePlugin = await _chunkZ5BANEQDcjs.loadTailwindVitePlugin.call(void 0, {
6841
6938
  builder: productionVite.builder,
6842
6939
  label: "for SSR"
6843
6940
  });
@@ -6944,14 +7041,14 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
6944
7041
  }))
6945
7042
  );
6946
7043
  const instrumentationPath = _chunk3GNHJ3RNcjs.resolveFarmInstrumentationFile.call(void 0, root, config.srcDir || "src");
6947
- const notFoundPath = _chunkHVMQAVZKcjs.resolveFarmNotFoundComponentPath.call(void 0, config, appDirs);
6948
- if (notFoundPath) _chunkGC5ROI3Acjs.logger.info(`\u{1F4CB} Found custom 404 page: ${notFoundPath}`);
7044
+ const notFoundPath = _chunkX4TSMQWFcjs.resolveFarmNotFoundComponentPath.call(void 0, config, appDirs);
7045
+ if (notFoundPath) _chunk7U4XF76Rcjs.logger.info(`\u{1F4CB} Found custom 404 page: ${notFoundPath}`);
6949
7046
  layoutRoutes.sort((a, b) => {
6950
7047
  const depthA = a.pattern.split("/").filter(Boolean).length;
6951
7048
  const depthB = b.pattern.split("/").filter(Boolean).length;
6952
7049
  return depthA - depthB;
6953
7050
  });
6954
- _chunkGC5ROI3Acjs.logger.info(
7051
+ _chunk7U4XF76Rcjs.logger.info(
6955
7052
  `\u{1F4CB} Found ${pageRoutes.length} page routes, ${layoutRoutes.length} layouts, ${apiRoutes.length} API routes, ${applicationMetadataRoutes.length} metadata routes, and ${middlewareRoutes.length} middleware files`
6956
7053
  );
6957
7054
  const configuredIntegrationValues = Object.values(config.integrations || {});
@@ -6961,14 +7058,14 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
6961
7058
  const hasServerRuntimeIntegrations = configuredIntegrationValues.some(
6962
7059
  (integration) => typeof integration === "object" && integration !== null && (!("serverRuntime" in integration) || integration.serverRuntime !== false)
6963
7060
  );
6964
- const hasIntegrationProviders = _chunkAOTD2N5Pcjs.getIntegrationProviders.call(void 0, config.integrations).some(
7061
+ const hasIntegrationProviders = _chunkWGWWRV2Mcjs.getIntegrationProviders.call(void 0, config.integrations).some(
6965
7062
  (provider) => provider.component || provider.type === "clerk"
6966
7063
  );
6967
7064
  const hasObservabilityHandler = !!config.observability && typeof config.observability === "object" && "onEvent" in config.observability;
6968
7065
  const hasMdxComponentConfig = Boolean(_optionalChain([config, 'access', _136 => _136.mdx, 'optionalAccess', _137 => _137.components]));
6969
- const hasMiddlewareConfig = _chunk6ZFGWB75cjs.hasFarmMiddlewareConfig.call(void 0, config.middleware);
6970
- const hasRouteContextConfig = _chunkF7PKUP6Pcjs.hasCustomFarmRouteContext.call(void 0, config);
6971
- const hasServerRuntimePlugins = _chunkMBD34AS5cjs.hasFarmServerRuntimePlugins.call(void 0, config.plugins);
7066
+ const hasMiddlewareConfig = _chunkUWOCYINYcjs.hasFarmMiddlewareConfig.call(void 0, config.middleware);
7067
+ const hasRouteContextConfig = _chunkLVGB5PYKcjs.hasCustomFarmRouteContext.call(void 0, config);
7068
+ const hasServerRuntimePlugins = _chunkZ5BANEQDcjs.hasFarmServerRuntimePlugins.call(void 0, config.plugins);
6972
7069
  const hasPluginRoutes = hasFarmPluginRoutes(config);
6973
7070
  const hasServerCacheConfig = hasFarmServerCacheConfig(config.cache);
6974
7071
  const configModulePath = hasServerRuntimeIntegrations || hasObservabilityHandler || hasMdxComponentConfig || hasMiddlewareConfig || hasRouteContextConfig || hasServerRuntimePlugins || hasPluginRoutes || hasServerCacheConfig || hasFarmServerStorageConfig(config.storage) || hasIntegrationProviders ? await findFarmConfigPath(root) : null;
@@ -6977,9 +7074,9 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
6977
7074
  const hasConfiguredRuntimePlugins = Boolean(
6978
7075
  hasRuntimeConfigModule && (config.plugins || []).length > 0
6979
7076
  );
6980
- if (_chunkXGS76V7Lcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
7077
+ if (_chunkZPEZXQTMcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
6981
7078
  const adapterGuardedPaths = new Set(getFarmDocsGuardedPaths(config, middlewareRoutes));
6982
- _chunkXGS76V7Lcjs.assertFarmDocsAdapterServesNoGuardedPages.call(void 0,
7079
+ _chunkZPEZXQTMcjs.assertFarmDocsAdapterServesNoGuardedPages.call(void 0,
6983
7080
  config.docs,
6984
7081
  { root, srcDir: config.srcDir },
6985
7082
  (pathname) => adapterGuardedPaths.has(pathname),
@@ -6989,7 +7086,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
6989
7086
  const farmDocsCspNonceMarker = _chunk6JHZPB52cjs.createFarmCspNonce.call(void 0, config.security);
6990
7087
  const farmDocsPrecompiledManifest = _optionalChain([config, 'access', _138 => _138.docs, 'optionalAccess', _139 => _139.enabled]) && _chunkNLBHLPEOcjs.getFarmPresetRuntime.call(void 0, preset) === "edge" ? await _chunk2RSVYJT6cjs._runWithFarmCspNonce.call(void 0,
6991
7088
  farmDocsCspNonceMarker,
6992
- async () => _optionalChain([config, 'access', _140 => _140.docs, 'access', _141 => _141.adapter, 'optionalAccess', _142 => _142.server]) ? await _chunkXGS76V7Lcjs.compileFarmDocsAdapterEdgeManifest.call(void 0, config.docs, {
7089
+ async () => _optionalChain([config, 'access', _140 => _140.docs, 'access', _141 => _141.adapter, 'optionalAccess', _142 => _142.server]) ? await _chunkZPEZXQTMcjs.compileFarmDocsAdapterEdgeManifest.call(void 0, config.docs, {
6993
7090
  root,
6994
7091
  srcDir: config.srcDir,
6995
7092
  clientEntry: FARM_CLIENT_JS_SRC_PLACEHOLDER,
@@ -7156,7 +7253,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7156
7253
  __FARM_PUBLIC_ENV__: JSON.stringify(_optionalChain([config, 'access', _148 => _148.env, 'optionalAccess', _149 => _149.public]) || {})
7157
7254
  },
7158
7255
  plugins: [
7159
- _chunkHVMQAVZKcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
7256
+ _chunkX4TSMQWFcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
7160
7257
  ...tailwindVitePlugin ? [tailwindVitePlugin] : [],
7161
7258
  ...rendererVitePlugins,
7162
7259
  ...config.vite.plugins || [],
@@ -7187,7 +7284,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7187
7284
  },
7188
7285
  pluginManager
7189
7286
  ),
7190
- _chunkODYKCC6Wcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
7287
+ _chunkZVSQN7NCcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
7191
7288
  ...hasRuntimeConfigModule ? [
7192
7289
  farmStripPlatformConfigPlugin(
7193
7290
  [
@@ -7199,7 +7296,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7199
7296
  {
7200
7297
  name: "farm-virtual-ssr-entry",
7201
7298
  resolveId: {
7202
- filter: { id: _chunkHVMQAVZKcjs.exactIdPattern.call(void 0, [virtualEntryId, "\0virtual:farm-ssr-entry"]) },
7299
+ filter: { id: _chunkX4TSMQWFcjs.exactIdPattern.call(void 0, [virtualEntryId, "\0virtual:farm-ssr-entry"]) },
7203
7300
  handler(id) {
7204
7301
  if (id === virtualEntryId || id === "\0virtual:farm-ssr-entry") {
7205
7302
  return virtualEntryId;
@@ -7208,7 +7305,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7208
7305
  }
7209
7306
  },
7210
7307
  load: {
7211
- filter: { id: _chunkHVMQAVZKcjs.exactIdPattern.call(void 0, [virtualEntryId]) },
7308
+ filter: { id: _chunkX4TSMQWFcjs.exactIdPattern.call(void 0, [virtualEntryId]) },
7212
7309
  handler(id) {
7213
7310
  if (id === virtualEntryId) {
7214
7311
  return virtualEntryCode;
@@ -7240,7 +7337,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7240
7337
  resolve: {
7241
7338
  alias: [
7242
7339
  ...shouldAliasReactServerToWebBuild(config.renderer, preset) ? [createFarmReactWebServerAlias(hasReactDomEdgeServerBuild(root))] : [],
7243
- ...Object.entries(_chunkHVMQAVZKcjs.createFarmSourceAlias.call(void 0, root, config.srcDir)).map(
7340
+ ...Object.entries(_chunkX4TSMQWFcjs.createFarmSourceAlias.call(void 0, root, config.srcDir)).map(
7244
7341
  ([find, replacement]) => ({ find, replacement })
7245
7342
  )
7246
7343
  ],
@@ -7248,7 +7345,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
7248
7345
  dedupe: [...config.renderer.dedupe || []]
7249
7346
  }
7250
7347
  };
7251
- await viteBuild(_chunkHVMQAVZKcjs.mergeFarmProductionViteConfig.call(void 0, serverViteConfig, config.vite));
7348
+ await viteBuild(_chunkX4TSMQWFcjs.mergeFarmProductionViteConfig.call(void 0, serverViteConfig, config.vite));
7252
7349
  } finally {
7253
7350
  if (postcssConfigDir) {
7254
7351
  try {
@@ -7290,9 +7387,9 @@ function getFarmDocsGuardedPaths(config, middlewareRoutes) {
7290
7387
  config: { middleware: config.middleware, integrations: config.integrations },
7291
7388
  middlewareRoutes
7292
7389
  };
7293
- return _chunk6D3CJFNUcjs.getFarmDocsRoots.call(void 0, config.docs).flatMap(
7294
- (docsRoot) => _chunk6D3CJFNUcjs.discoverFarmDocsPages.call(void 0, _chunk6D3CJFNUcjs.resolveFarmDocsContentDir.call(void 0, docsRoot, options), docsRoot)
7295
- ).flatMap((page) => [page.href, _chunk6D3CJFNUcjs.getFarmDocsMarkdownPath.call(void 0, page.href)]).filter((pathname) => _chunk6ZFGWB75cjs.farmPathGuardCoversPage.call(void 0, guards, pathname));
7390
+ return _chunkHR5GU4UUcjs.getFarmDocsRoots.call(void 0, config.docs).flatMap(
7391
+ (docsRoot) => _chunkHR5GU4UUcjs.discoverFarmDocsPages.call(void 0, _chunkHR5GU4UUcjs.resolveFarmDocsContentDir.call(void 0, docsRoot, options), docsRoot)
7392
+ ).flatMap((page) => [page.href, _chunkHR5GU4UUcjs.getFarmDocsMarkdownPath.call(void 0, page.href)]).filter((pathname) => _chunkUWOCYINYcjs.farmPathGuardCoversPage.call(void 0, guards, pathname));
7296
7393
  }
7297
7394
  function getFarmAppOwnedDocsEnginePaths(agent, applicationMetadataRoutes) {
7298
7395
  const llmsTxt = _optionalChain([agent, 'optionalAccess', _152 => _152.llmsTxt]);
@@ -7685,7 +7782,7 @@ function generateFarmRendererAppSetupServerCode(config) {
7685
7782
  const appSetupPath = _chunk67MZTLTFcjs.resolveFarmRendererAppSetup.call(void 0, config.root || process.cwd(), config.renderer);
7686
7783
  if (!appSetupPath) return "";
7687
7784
  return `
7688
- import __farmAppSetup from ${JSON.stringify(_chunkGC5ROI3Acjs.toPosixPath.call(void 0, appSetupPath))};
7785
+ import __farmAppSetup from ${JSON.stringify(_chunk7U4XF76Rcjs.toPosixPath.call(void 0, appSetupPath))};
7689
7786
  if (typeof ReactDOMServer.configureApp !== "function") {
7690
7787
  throw new Error(${JSON.stringify(`Renderer \`${config.renderer.name}\` does not support \`appSetup\`: its server module must export configureApp().`)});
7691
7788
  }
@@ -7698,7 +7795,7 @@ function generateVirtualEntryCode(apiRoutes, pageRoutes, layoutRoutes, routeSlot
7698
7795
  );
7699
7796
  const searchPreserveRoutesSource = searchPreserveRoutes.length > 0 ? JSON.stringify(searchPreserveRoutes) : "";
7700
7797
  const farmIslandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _166 => _166.experimental, 'optionalAccess', _167 => _167.serverComponents])) === "islands";
7701
- const farmClientBoot = _chunkHVMQAVZKcjs.canBootFarmIslandsClient.call(void 0, config);
7798
+ const farmClientBoot = _chunkX4TSMQWFcjs.canBootFarmIslandsClient.call(void 0, config);
7702
7799
  const farmMobileClient = shouldBuildFarmMobileClient(config);
7703
7800
  const farmMobileShells = farmMobileClient && config.mobileShells ? config.mobileShells : null;
7704
7801
  const hasCompressionRuntime = config.compress && _chunkOCS3PSYRcjs.resolveFarmInstrumentationRuntime.call(void 0, preset) === "nodejs";
@@ -7708,7 +7805,7 @@ function generateVirtualEntryCode(apiRoutes, pageRoutes, layoutRoutes, routeSlot
7708
7805
  const servesAgentSitemap = Boolean(_optionalChain([config, 'access', _171 => _171.agent, 'optionalAccess', _172 => _172.sitemap, 'optionalAccess', _173 => _173.enabled])) && !applicationMetadataRoutes.some(
7709
7806
  (metadata) => metadata.kind === "sitemap" && metadata.pattern === "/"
7710
7807
  );
7711
- const servesDefaultMCP = _optionalChain([config, 'access', _174 => _174.agent, 'optionalAccess', _175 => _175.mcp]) === true && !_chunkYRXPDKMMcjs.farmConfigMountsMCP.call(void 0, config) && !apiRoutes.some((route) => route.path === "/api/mcp");
7808
+ const servesDefaultMCP = _optionalChain([config, 'access', _174 => _174.agent, 'optionalAccess', _175 => _175.mcp]) === true && !_chunkW53Z4WDIcjs.farmConfigMountsMCP.call(void 0, config) && !apiRoutes.some((route) => route.path === "/api/mcp");
7712
7809
  const servesAiCatalog = _optionalChain([config, 'access', _176 => _176.agent, 'optionalAccess', _177 => _177.aiCatalog]) !== false;
7713
7810
  const hasPluginRuntime = hasRuntimeIntegrationConfig || hasServerRuntimePlugins;
7714
7811
  const hasInfraAnalyticsRuntime = config.analytics !== false && _chunkOCS3PSYRcjs.resolveFarmInstrumentationRuntime.call(void 0, preset) === "nodejs";
@@ -7731,7 +7828,15 @@ function generateVirtualEntryCode(apiRoutes, pageRoutes, layoutRoutes, routeSlot
7731
7828
  const hasReactSyncRender = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, config.renderer);
7732
7829
  const rendererServerImports = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, config.renderer) ? `import * as React from "react";
7733
7830
  import * as ReactDOMServer from "react-dom/server";
7734
- import { markPagePosition, markLayoutPosition } from "@farm.js/core/internal/production-runtime";${hasIsolatedClientGraphRuntime ? farmIslandsMode ? '\nimport { isolateFarmServerPageGraph, wrapFarmIsolatedClientGraph, renderFarmServerTreePage, renderFarmServerTreeLayout, withFarmIslandsRender } from "@farm.js/core/internal/islands-runtime";' : '\nimport { isolateFarmServerPageGraph, wrapFarmIsolatedClientGraph } from "@farm.js/core/internal/isolated-boundary";\nimport { renderFarmServerTreePage } from "@farm.js/core/internal/server-tree";' : ""}` : `import React, * as ReactDOMServer from ${JSON.stringify(config.renderer.server)};${generateFarmRendererAppSetupServerCode(config)}`;
7831
+ import { markPagePosition, markLayoutPosition } from "@farm.js/core/internal/production-runtime";${hasIsolatedClientGraphRuntime ? farmIslandsMode ? '\nimport { isolateFarmServerPageGraph, wrapFarmIsolatedClientGraph, renderFarmServerTreePage, renderFarmServerTreeLayout, withFarmIslandsRender } from "@farm.js/core/internal/islands-runtime";' : '\nimport { isolateFarmServerPageGraph, wrapFarmIsolatedClientGraph } from "@farm.js/core/internal/isolated-boundary";\nimport { renderFarmServerTreePage } from "@farm.js/core/internal/server-tree";' : ""}` : (
7832
+ // The renderer contract is the server module's named exports, which the development
7833
+ // server reads too; a renderer needs no default export. The entry feature-checks optional
7834
+ // exports (streaming, `capabilities`, `generateHydrationScript`) on a copy of the
7835
+ // namespace, because Rolldown warns about each such read off the namespace itself.
7836
+ `import * as __farmRendererServer from ${JSON.stringify(config.renderer.server)};
7837
+ const ReactDOMServer = { ...__farmRendererServer };
7838
+ const React = ReactDOMServer;${generateFarmRendererAppSetupServerCode(config)}`
7839
+ );
7735
7840
  const routeClientGraphServerRuntime = hasIsolatedClientGraphRuntime ? `function wrapFarmRouteClientGraph(element) {
7736
7841
  return wrapFarmIsolatedClientGraph(React, element);
7737
7842
  }
@@ -7767,9 +7872,9 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
7767
7872
  (image) => image.sourceType === "module"
7768
7873
  );
7769
7874
  const edgeMiddlewareFilePaths = farmTargetRunsEdgeMiddleware(preset) ? middlewareRoutes.filter(isFarmEdgeMiddlewareRoute).map((route) => route.filePath) : [];
7770
- const hasMiddlewareRuntime = middlewareRoutes.length > 0 || _chunk6ZFGWB75cjs.hasFarmMiddlewareConfig.call(void 0, config.middleware);
7875
+ const hasMiddlewareRuntime = middlewareRoutes.length > 0 || _chunkUWOCYINYcjs.hasFarmMiddlewareConfig.call(void 0, config.middleware);
7771
7876
  const farmDocsFontAssets = _optionalChain([config, 'access', _188 => _188.docs, 'optionalAccess', _189 => _189.enabled]) ? _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, _chunkERMUL73Lcjs.resolveFarmDocsFontAssets.call(void 0, config.root)) : [];
7772
- const integrationProviders = _chunkAOTD2N5Pcjs.getIntegrationProviders.call(void 0, config.integrations);
7877
+ const integrationProviders = _chunkWGWWRV2Mcjs.getIntegrationProviders.call(void 0, config.integrations);
7773
7878
  const renderedIntegrationProviders = integrationProviders.filter(
7774
7879
  (provider) => provider.component || provider.type === "clerk"
7775
7880
  );
@@ -7778,7 +7883,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
7778
7883
  `Integration provider components are not supported by the "${config.renderer.name}" renderer.`
7779
7884
  );
7780
7885
  }
7781
- const providerServerModules = _chunkHVMQAVZKcjs.generateFarmIntegrationProviderServerModules.call(void 0,
7886
+ const providerServerModules = _chunkX4TSMQWFcjs.generateFarmIntegrationProviderServerModules.call(void 0,
7782
7887
  renderedIntegrationProviders,
7783
7888
  config.root,
7784
7889
  _nullishCoalesce(config.renderer.componentExtensions, () => ( []))
@@ -7798,14 +7903,14 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
7798
7903
  const unsupportedIntegrationProvider = renderedIntegrationProviders.find(
7799
7904
  (provider) => provider.supportsIsolatedHydration !== true
7800
7905
  );
7801
- const isolatedHydrationMode = _chunkODYKCC6Wcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
7906
+ const isolatedHydrationMode = _chunkZVSQN7NCcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
7802
7907
  _optionalChain([config, 'access', _192 => _192.experimental, 'optionalAccess', _193 => _193.isolatedClientHydration]),
7803
7908
  {
7804
7909
  serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _194 => _194.experimental, 'optionalAccess', _195 => _195.serverComponents])) === "rsc",
7805
7910
  hasUnsupportedIntegrationProvider: Boolean(unsupportedIntegrationProvider)
7806
7911
  }
7807
7912
  );
7808
- const hydrationPlanOptions = _chunkODYKCC6Wcjs.getFarmClientHydrationPlanOptions.call(void 0,
7913
+ const hydrationPlanOptions = _chunkZVSQN7NCcjs.getFarmClientHydrationPlanOptions.call(void 0,
7809
7914
  config.renderer,
7810
7915
  Boolean(unsupportedIntegrationProvider)
7811
7916
  );
@@ -7813,7 +7918,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
7813
7918
  ...hydrationPlanOptions,
7814
7919
  serverOwners: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _196 => _196.experimental, 'optionalAccess', _197 => _197.serverComponents])) === "islands"
7815
7920
  };
7816
- const { layoutHydrationPlans, pageHydrationPlans } = _chunkODYKCC6Wcjs.withFarmSourceSnapshot.call(void 0, () => {
7921
+ const { layoutHydrationPlans, pageHydrationPlans } = _chunkZVSQN7NCcjs.withFarmSourceSnapshot.call(void 0, () => {
7817
7922
  const layoutHydrationPlans2 = layoutRoutes.map((layout) => ({
7818
7923
  ...layout,
7819
7924
  hydration: getCachedClientModuleHydrationPlan(
@@ -7824,7 +7929,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
7824
7929
  { ...hydrationPlanOptions, serverTreeLayouts: pageHydrationPlanOptions.serverOwners }
7825
7930
  )
7826
7931
  }));
7827
- const markdownPagePlan = _chunkODYKCC6Wcjs.createMarkdownPageHydrationPlanner.call(void 0,
7932
+ const markdownPagePlan = _chunkZVSQN7NCcjs.createMarkdownPageHydrationPlanner.call(void 0,
7828
7933
  _chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0, _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, config.mdx), config.root),
7829
7934
  config.root,
7830
7935
  isolatedHydrationMode,
@@ -7833,7 +7938,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
7833
7938
  const pageHydrationPlans2 = new Map(
7834
7939
  pageRoutes.map((route) => [
7835
7940
  route.modulePath,
7836
- _chunkPG7J7XYTcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath) ? markdownPagePlan() : getCachedClientModuleHydrationPlan(
7941
+ _chunkQ4TRGTO7cjs.isFarmMarkdownPageFile.call(void 0, route.modulePath) ? markdownPagePlan() : getCachedClientModuleHydrationPlan(
7837
7942
  route.modulePath,
7838
7943
  config.root,
7839
7944
  isolatedHydrationMode,
@@ -7844,7 +7949,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
7844
7949
  );
7845
7950
  return { layoutHydrationPlans: layoutHydrationPlans2, pageHydrationPlans: pageHydrationPlans2 };
7846
7951
  });
7847
- _chunkODYKCC6Wcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
7952
+ _chunkZVSQN7NCcjs.enforceFarmIsolatedHydrationRouteBudget.call(void 0,
7848
7953
  layoutHydrationPlans.map((layout) => ({
7849
7954
  pattern: layout.pattern,
7850
7955
  depth: layout.pattern.split("/").filter(Boolean).length,
@@ -7853,10 +7958,10 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
7853
7958
  pageRoutes.map((route) => ({
7854
7959
  // Compared by directory so a grouped layout applies only inside its group.
7855
7960
  pattern: _nullishCoalesce(route.directory, () => ( route.pattern)),
7856
- depth: _chunk6ZFGWB75cjs.getRouteDirectoryDepth.call(void 0, _nullishCoalesce(route.directory, () => ( route.pattern))),
7961
+ depth: _chunkUWOCYINYcjs.getRouteDirectoryDepth.call(void 0, _nullishCoalesce(route.directory, () => ( route.pattern))),
7857
7962
  metadata: pageHydrationPlans.get(route.modulePath)
7858
7963
  })),
7859
- _chunk6ZFGWB75cjs.routeBoundaryCoversDirectory,
7964
+ _chunkUWOCYINYcjs.routeBoundaryCoversDirectory,
7860
7965
  { serverOwners: pageHydrationPlanOptions.serverOwners }
7861
7966
  );
7862
7967
  const providerServerImports = [
@@ -7887,9 +7992,9 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
7887
7992
  }).map(({ route }) => route);
7888
7993
  orderedPageRoutes.forEach((route, index) => {
7889
7994
  const varName = `pageRoute${index}`;
7890
- if (_chunkPG7J7XYTcjs.isFarmMarkdownPageFile.call(void 0, route.modulePath)) {
7891
- const renderingDirective2 = _chunkBZJYPIFZcjs.readRouteRenderingDirectiveFromFile.call(void 0, route.modulePath);
7892
- const markdownServerTree = pageHydrationPlanOptions.serverOwners && _chunkODYKCC6Wcjs.usesFarmServerTree.call(void 0, pageHydrationPlans.get(route.modulePath));
7995
+ if (_chunkQ4TRGTO7cjs.isFarmMarkdownPageFile.call(void 0, route.modulePath)) {
7996
+ const renderingDirective2 = _chunkSDICLSQUcjs.readRouteRenderingDirectiveFromFile.call(void 0, route.modulePath);
7997
+ const markdownServerTree = pageHydrationPlanOptions.serverOwners && _chunkZVSQN7NCcjs.usesFarmServerTree.call(void 0, pageHydrationPlans.get(route.modulePath));
7893
7998
  pageRegistrations.push(`
7894
7999
  {
7895
8000
  pattern: ${JSON.stringify(route.pattern)},${route.directory ? `
@@ -7897,14 +8002,14 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
7897
8002
  rendering: ${JSON.stringify(renderingDirective2)},` : ""}${markdownServerTree ? "\n serverTree: true," : ""}
7898
8003
  module: createFarmMarkdownRouteModule({
7899
8004
  source: ${JSON.stringify(_nullishCoalesce(route.source, () => ( "")))},
7900
- filePath: ${JSON.stringify(_chunkHVMQAVZKcjs.toBakedMarkdownSourcePath.call(void 0, config.root, route.modulePath))},
8005
+ filePath: ${JSON.stringify(_chunkX4TSMQWFcjs.toBakedMarkdownSourcePath.call(void 0, config.root, route.modulePath))},
7901
8006
  components: farmMdxComponents,
7902
8007
  config: farmMdxConfig,
7903
8008
  }),
7904
8009
  markdownSource: {
7905
8010
  source: ${JSON.stringify(_nullishCoalesce(route.source, () => ( "")))},
7906
8011
  filePath: ${JSON.stringify(
7907
- _chunkHVMQAVZKcjs.toBakedMarkdownSourcePath.call(void 0, config.root, _nullishCoalesce(route.markdownSourcePath, () => ( route.modulePath)))
8012
+ _chunkX4TSMQWFcjs.toBakedMarkdownSourcePath.call(void 0, config.root, _nullishCoalesce(route.markdownSourcePath, () => ( route.modulePath)))
7908
8013
  )},
7909
8014
  },
7910
8015
  }`);
@@ -7914,16 +8019,16 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
7914
8019
  `import * as ${varName} from ${toVirtualEntryImportSpecifier(route.modulePath)};`
7915
8020
  );
7916
8021
  const clientMetadata = pageHydrationPlans.get(route.modulePath);
7917
- const renderingDirective = _chunkBZJYPIFZcjs.readRouteRenderingDirectiveFromFile.call(void 0, route.modulePath);
8022
+ const renderingDirective = _chunkSDICLSQUcjs.readRouteRenderingDirectiveFromFile.call(void 0, route.modulePath);
7918
8023
  pageRegistrations.push(`
7919
8024
  {
7920
8025
  pattern: ${JSON.stringify(route.pattern)},${route.directory ? `
7921
8026
  directory: ${JSON.stringify(route.directory)},` : ""}
7922
8027
  module: ${varName},
7923
8028
  shouldHydrate: ${JSON.stringify(clientMetadata.shouldHydrate)},${clientMetadata.shouldHydrate ? `
7924
- clientModule: ${JSON.stringify(_chunkGC5ROI3Acjs.toViteModuleId.call(void 0, route.modulePath, config.root))},` : ""}
7925
- islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${_chunkODYKCC6Wcjs.usesFarmServerTree.call(void 0, clientMetadata) ? "\n serverTree: true," : ""}${(() => {
7926
- const rootStrategy = _chunkHVMQAVZKcjs.resolveFarmRouteRootStrategy.call(void 0,
8029
+ clientModule: ${JSON.stringify(_chunk7U4XF76Rcjs.toViteModuleId.call(void 0, route.modulePath, config.root))},` : ""}
8030
+ islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${_chunkZVSQN7NCcjs.usesFarmServerTree.call(void 0, clientMetadata) ? "\n serverTree: true," : ""}${(() => {
8031
+ const rootStrategy = _chunkX4TSMQWFcjs.resolveFarmRouteRootStrategy.call(void 0,
7927
8032
  route,
7928
8033
  clientMetadata,
7929
8034
  layoutHydrationPlans.map((layout) => ({ ...layout, ...layout.hydration })),
@@ -7936,13 +8041,13 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
7936
8041
  rendering: ${JSON.stringify(renderingDirective)},` : ""}
7937
8042
  ${route.source !== void 0 ? `markdownSource: {
7938
8043
  source: ${JSON.stringify(route.source)},
7939
- filePath: ${JSON.stringify(_chunkHVMQAVZKcjs.toBakedMarkdownSourcePath.call(void 0, config.root, route.markdownSourcePath))},
8044
+ filePath: ${JSON.stringify(_chunkX4TSMQWFcjs.toBakedMarkdownSourcePath.call(void 0, config.root, route.markdownSourcePath))},
7940
8045
  },` : ""}
7941
8046
  }`);
7942
8047
  });
7943
8048
  const layoutImports = [];
7944
8049
  const layoutRegistrations = [];
7945
- const treeLayoutPatterns = farmIslandsMode ? _chunk6ZFGWB75cjs.getFarmServerTreeLayoutPatterns.call(void 0,
8050
+ const treeLayoutPatterns = farmIslandsMode ? _chunkUWOCYINYcjs.getFarmServerTreeLayoutPatterns.call(void 0,
7946
8051
  layoutHydrationPlans.map((layout) => ({
7947
8052
  pattern: layout.pattern,
7948
8053
  shouldHydrate: layout.hydration.shouldHydrate,
@@ -7960,7 +8065,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
7960
8065
  pattern: ${JSON.stringify(layout.pattern)},
7961
8066
  module: ${varName},
7962
8067
  shouldHydrate: ${JSON.stringify(clientMetadata.shouldHydrate)},
7963
- islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${treeLayoutPatterns.has(layout.pattern) ? "\n serverTree: true," : ""}${farmIslandsMode && _chunkHVMQAVZKcjs.canFarmSkipKeptLayoutRender.call(void 0, layout.modulePath, config.root) ? "\n skipKeptRender: true," : ""}${// A layout whose client components hydrate as islands of their own (islands mode,
8068
+ islandStrategy: ${JSON.stringify(clientMetadata.islandStrategy)},${treeLayoutPatterns.has(layout.pattern) ? "\n serverTree: true," : ""}${farmIslandsMode && _chunkX4TSMQWFcjs.canFarmSkipKeptLayoutRender.call(void 0, layout.modulePath, config.root) ? "\n skipKeptRender: true," : ""}${// A layout whose client components hydrate as islands of their own (islands mode,
7964
8069
  // isolatedClientHydration, or an async layout): it wraps a docs page as an app page.
7965
8070
  clientMetadata.hasIsolatedClientBoundaries ? "\n islands: true," : ""}
7966
8071
  }`);
@@ -7988,7 +8093,7 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
7988
8093
  containerId: ${JSON.stringify(slot.containerId)},
7989
8094
  interception: ${JSON.stringify(slot.interception)},
7990
8095
  fallback: ${JSON.stringify(slot.fallback)},
7991
- hydrates: ${!farmIslandsMode || _chunkODYKCC6Wcjs.getClientModuleMetadata.call(void 0, slot.modulePath, config.root).isClientComponent},
8096
+ hydrates: ${!farmIslandsMode || _chunkZVSQN7NCcjs.getClientModuleMetadata.call(void 0, slot.modulePath, config.root).isClientComponent},
7992
8097
  module: ${varName},
7993
8098
  }`);
7994
8099
  });
@@ -7999,12 +8104,12 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
7999
8104
  errorImports.push(
8000
8105
  `import * as ${varName} from ${toVirtualEntryImportSpecifier(errorRoute.modulePath)};`
8001
8106
  );
8002
- const groupScope = _chunk6ZFGWB75cjs.getRouteGroupScope.call(void 0, errorRoute.pattern);
8107
+ const groupScope = _chunkUWOCYINYcjs.getRouteGroupScope.call(void 0, errorRoute.pattern);
8003
8108
  errorRegistrations.push(`
8004
8109
  {
8005
- pattern: ${JSON.stringify(_chunk6ZFGWB75cjs.stripRouteGroups.call(void 0, errorRoute.pattern))},${groupScope ? `
8110
+ pattern: ${JSON.stringify(_chunkUWOCYINYcjs.stripRouteGroups.call(void 0, errorRoute.pattern))},${groupScope ? `
8006
8111
  groupScope: ${JSON.stringify(groupScope)},
8007
- directoryDepth: ${_chunk6ZFGWB75cjs.getRouteDirectoryDepth.call(void 0, errorRoute.pattern)},` : ""}
8112
+ directoryDepth: ${_chunkUWOCYINYcjs.getRouteDirectoryDepth.call(void 0, errorRoute.pattern)},` : ""}
8008
8113
  module: ${varName},
8009
8114
  }`);
8010
8115
  });
@@ -8016,12 +8121,12 @@ function renderFarmServerTreeLayout(Layout, props, outlets) {
8016
8121
  loadingImports.push(
8017
8122
  `import * as ${varName} from ${toVirtualEntryImportSpecifier(loadingRoute.modulePath)};`
8018
8123
  );
8019
- const groupScope = _chunk6ZFGWB75cjs.getRouteGroupScope.call(void 0, loadingRoute.pattern);
8124
+ const groupScope = _chunkUWOCYINYcjs.getRouteGroupScope.call(void 0, loadingRoute.pattern);
8020
8125
  loadingRegistrations.push(`
8021
8126
  {
8022
- pattern: ${JSON.stringify(_chunk6ZFGWB75cjs.stripRouteGroups.call(void 0, loadingRoute.pattern))},${groupScope ? `
8127
+ pattern: ${JSON.stringify(_chunkUWOCYINYcjs.stripRouteGroups.call(void 0, loadingRoute.pattern))},${groupScope ? `
8023
8128
  groupScope: ${JSON.stringify(groupScope)},
8024
- directoryDepth: ${_chunk6ZFGWB75cjs.getRouteDirectoryDepth.call(void 0, loadingRoute.pattern)},` : ""}
8129
+ directoryDepth: ${_chunkUWOCYINYcjs.getRouteDirectoryDepth.call(void 0, loadingRoute.pattern)},` : ""}
8025
8130
  module: ${varName},
8026
8131
  }`);
8027
8132
  });
@@ -8298,14 +8403,14 @@ import { fileURLToPath as farmDocsFileURLToPath } from "node:url";` : "";
8298
8403
  const nativeAuth = generateNativeAuthIntegrationSource(config.auth);
8299
8404
  const nativeMCP = _chunkVM57CK74cjs.generateNativeMCPPluginSource.call(void 0, config.mcp);
8300
8405
  const mobileSession = (config.plugins || []).some(
8301
- (plugin) => _optionalChain([plugin, 'optionalAccess', _219 => _219.name]) === _chunkIWGGRXD2cjs.FARM_MOBILE_SESSION_PLUGIN
8406
+ (plugin) => _optionalChain([plugin, 'optionalAccess', _219 => _219.name]) === _chunkMHKPXX3Jcjs.FARM_MOBILE_SESSION_PLUGIN
8302
8407
  );
8303
8408
  const nativeServerFns = (config.plugins || []).some(
8304
8409
  (plugin) => _optionalChain([plugin, 'optionalAccess', _220 => _220.name]) === _chunk4EBC7EMWcjs.FARM_NATIVE_SERVER_FN_PLUGIN
8305
- ) ? _chunkLJKTJNOFcjs.collectFarmNativeServerFns.call(void 0, {
8410
+ ) ? _chunkTS3ZHJN5cjs.collectFarmNativeServerFns.call(void 0, {
8306
8411
  root: config.root,
8307
8412
  srcDir: config.srcDir,
8308
- entries: _chunkLJKTJNOFcjs.findFarmNativeScreenFiles.call(void 0, _chunkQMR2TUVZcjs.getFarmAppDirectories.call(void 0, config))
8413
+ entries: _chunkTS3ZHJN5cjs.findFarmNativeScreenFiles.call(void 0, _chunkQMR2TUVZcjs.getFarmAppDirectories.call(void 0, config))
8309
8414
  }) : void 0;
8310
8415
  const integrationImports = `
8311
8416
  ${configModulePath ? `import * as FarmUserConfigModule from ${toVirtualEntryImportSpecifier(configModulePath)};` : ""}
@@ -8320,7 +8425,7 @@ ${nativeServerFns ? `const __farmNativeServerFnRegistry = Object.assign(Object.c
8320
8425
  ${nativeServerFns.flatMap((module, index) => module.exports.map((entry) => ` ${JSON.stringify(entry.id)}: __farmNativeServerFns${index}[${JSON.stringify(entry.name)}],`)).join("\n")}
8321
8426
  });` : ""}
8322
8427
  `;
8323
- const imageRuntime = _chunkHVMQAVZKcjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
8428
+ const imageRuntime = _chunkX4TSMQWFcjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
8324
8429
  const imageRuntimeImport = imageRuntime === "none" ? "" : `import { _withFarmImageSourceClientAddress, createCloudflareImageTransformer, createFarmImageHandler } from "@farm.js/core/image/server";`;
8325
8430
  const imageNodeRuntimeImport = imageRuntime === "node" ? `import { createNodeImageFetcher, createNodeImageUrlValidator, createSharpImageTransformer } from "@farm.js/core/image/sharp";` : "";
8326
8431
  const apiHandlerCode = apiRoutes.length > 0 ? `
@@ -8502,7 +8607,7 @@ const farmResolvedRuntimeConfig = Object.assign({}, ...farmRuntimeConfigs);
8502
8607
 
8503
8608
  function renderFarmDefault404Page() {
8504
8609
  return React.createElement(React.Fragment, null,
8505
- React.createElement("style", null, ${JSON.stringify(_chunkHVMQAVZKcjs.DEFAULT_NOT_FOUND_STYLES)}),
8610
+ React.createElement("style", null, ${JSON.stringify(_chunkX4TSMQWFcjs.DEFAULT_NOT_FOUND_STYLES)}),
8506
8611
  React.createElement("main", {
8507
8612
  className: "farm-default-not-found",
8508
8613
  "aria-labelledby": "farm-default-not-found-title",
@@ -8662,7 +8767,7 @@ ${_optionalChain([config, 'access', _230 => _230.agent, 'optionalAccess', _231 =
8662
8767
  // to the build.
8663
8768
  const farmNoindexPreview = resolveFarmPreviewDeployment(
8664
8769
  globalThis.process?.env,
8665
- ${JSON.stringify(_chunkFOULIN4Scjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env))},
8770
+ ${JSON.stringify(_chunkXY5OZQF6cjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env))},
8666
8771
  );` : ""}
8667
8772
  const farmMdxComponents = ${mdxComponentsPath ? `(FarmMdxComponentsModule.components || Reflect.get(FarmMdxComponentsModule, "default") || {})` : `(configuredFarmMdxComponents && typeof configuredFarmMdxComponents === "object" ? configuredFarmMdxComponents : {})`};
8668
8773
  const farmObservabilityConfig = farmUserConfig?.observability ?? ${JSON.stringify(
@@ -8793,7 +8898,7 @@ const farmDocsHandler = ${_optionalChain([config, 'access', _239 => _239.docs, '
8793
8898
  registerMCPServer: registerFarmMCPServer,
8794
8899
  // A page built with this keeps its HTML string, so the preload budget and the response
8795
8900
  // writer use it instead of reading and re-encoding the body. Older adapters ignore it.
8796
- createHtmlResponse: farmOwnedHtmlResponse,${_chunkXGS76V7Lcjs.farmDocsAdapterServesGuardedPages.call(void 0, config.docs) ? `
8901
+ createHtmlResponse: farmOwnedHtmlResponse,${_chunkZPEZXQTMcjs.farmDocsAdapterServesGuardedPages.call(void 0, config.docs) ? `
8797
8902
  // The adapter keeps pages a path guard covers off search, llms.txt, the sitemap and MCP. It
8798
8903
  // asks about any path its own content lists, so the guards decide here, not a page list.
8799
8904
  isPathGuarded: (pathname) =>
@@ -8854,12 +8959,12 @@ const farmDeploymentCookiePath = ${JSON.stringify(config.basePath || "/")};
8854
8959
  // runtime request.
8855
8960
  const farmRuntimeErrorSlot = Symbol("farm.runtime.error.slot");
8856
8961
  const farmOpenAPIReference = ${JSON.stringify(openAPIReference)};
8857
- ${_optionalChain([config, 'access', _243 => _243.agent, 'optionalAccess', _244 => _244.apiCatalog]) ? `const farmApiCatalogInput = ${JSON.stringify(_chunk5KISFWD2cjs.resolveFarmApiCatalogInput.call(void 0, config))};
8962
+ ${_optionalChain([config, 'access', _243 => _243.agent, 'optionalAccess', _244 => _244.apiCatalog]) ? `const farmApiCatalogInput = ${JSON.stringify(_chunk5OAN7BG5cjs.resolveFarmApiCatalogInput.call(void 0, config))};
8858
8963
  ` : ""}${_optionalChain([config, 'access', _245 => _245.agent, 'optionalAccess', _246 => _246.manifest]) !== false ? `const farmAppManifestInput = ${JSON.stringify(
8859
- _chunk5KISFWD2cjs.resolveFarmAppManifestInput.call(void 0, config, {
8964
+ _chunk5OAN7BG5cjs.resolveFarmAppManifestInput.call(void 0, config, {
8860
8965
  build: config.deploymentId,
8861
- packages: _chunkHVMQAVZKcjs.resolveFarmAppPackages.call(void 0, config.root),
8862
- webmcpTools: config.plugins.some(({ name }) => name === "farm:webmcp") ? _chunkHVMQAVZKcjs.collectFarmWebMCPTools.call(void 0, config.root, config.srcDir) : []
8966
+ packages: _chunkX4TSMQWFcjs.resolveFarmAppPackages.call(void 0, config.root),
8967
+ webmcpTools: config.plugins.some(({ name }) => name === "farm:webmcp") ? _chunkX4TSMQWFcjs.collectFarmWebMCPTools.call(void 0, config.root, config.srcDir) : []
8863
8968
  })
8864
8969
  )};
8865
8970
  ${servesDefaultMCP ? "farmAppManifestInput.defaultMCP = getFarmDefaultMCPServer;\n" : ""}// A guard written for an MCP server's path keeps its tools out of the public view.
@@ -9037,9 +9142,9 @@ function farmDocumentBootsClient(markup, hydratesAtLoad, routeSlots) {
9037
9142
  // The boot entry runs the client entry from the URL on its script, with the files listed for what
9038
9143
  // started it. A root that waits (the element a hydrating layout or client page hydrates) is named
9039
9144
  // with its strategy, for the boot to watch.
9040
- function renderFarmClientBootScript(root, rootStrategy, markup, pageModule) {
9145
+ function renderFarmClientBootScript(root, rootStrategy, markup, pageModule, navigation) {
9041
9146
  return stampFarmCspNonce('<script type="module" src="${farmClientBoot ? FARM_CLIENT_BOOT_SRC_PLACEHOLDER : ""}" data-farm-runtime="/__farm_client_js_src__"' +
9042
- renderFarmClientBootPreloads(markup, pageModule, root, rootStrategy) +
9147
+ renderFarmClientBootPreloads(markup, pageModule, root, rootStrategy, navigation) +
9043
9148
  (root ? ' data-farm-root="' + root + '" data-farm-root-strategy="' + rootStrategy + '"' : '') +
9044
9149
  '></script>');
9045
9150
  }
@@ -9642,7 +9747,7 @@ function peelFarmDocumentPrefix(markup) {
9642
9747
  let inner = markup.replace(/^\\s+/, "");
9643
9748
  let hoisted = "";
9644
9749
  const wrapper = /^<div\\b[^>]*style=["']display\\s*:\\s*contents;?\\s*["'][^>]*>/i;
9645
- const hoistable = /${_chunk6ZFGWB75cjs.HOISTED_HEAD_ELEMENT.source}/i;
9750
+ const hoistable = /${_chunkUWOCYINYcjs.HOISTED_HEAD_ELEMENT.source}/i;
9646
9751
  let match;
9647
9752
  while ((match = wrapper.exec(inner) || hoistable.exec(inner))) {
9648
9753
  if (!/^<div/i.test(match[0])) hoisted += match[0];
@@ -9671,7 +9776,7 @@ function opensFarmFullDocument(markup) {
9671
9776
  // them: its own head takes them. Matches the dev renderer's takeFarmHoistedHead.
9672
9777
  function takeFarmHoistedHead(markup) {
9673
9778
  if (opensFarmFullDocument(markup)) return { head: "", body: markup };
9674
- const hoistable = /${_chunk6ZFGWB75cjs.HOISTED_HEAD_ELEMENT.source}/i;
9779
+ const hoistable = /${_chunkUWOCYINYcjs.HOISTED_HEAD_ELEMENT.source}/i;
9675
9780
  let head = "";
9676
9781
  let body = markup;
9677
9782
  let match;
@@ -9829,6 +9934,11 @@ ${generateFarmClientBootRoutesServerSource(`"${FARM_CLIENT_ROUTE_TABLE_PLACEHOLD
9829
9934
  const farmClientEntryPreloadTags = farmClientModulePreloads
9830
9935
  ? farmClientModulePreloads.entry.map(renderFarmClientModulePreload).join("")
9831
9936
  : "";
9937
+ // A document that runs the entry at once (no boot) hydrates with the renderer it imports lazily
9938
+ // (RFC 0010). A client navigation's response runs neither, so it leaves them out.
9939
+ const farmClientRendererPreloadTags = farmClientModulePreloads
9940
+ ? (farmClientModulePreloads.renderer || []).map(renderFarmClientModulePreload).join("")
9941
+ : "";
9832
9942
  // The client modules a document's markup loads: its islands' boundaries and the
9833
9943
  // client references of its server tree. An island with a deferred strategy loads its
9834
9944
  // module on its own trigger, so it is not preloaded.
@@ -9863,14 +9973,14 @@ function collectFarmClientDocumentModules(markup, pageModule, listed) {
9863
9973
  return indexes;
9864
9974
  }
9865
9975
 
9866
- // The modulepreload links for a document: the entry's static imports, then the
9867
- // modules its hydrating page and its markup load.
9868
- function renderFarmClientModulePreloads(markup, pageModule) {
9976
+ // The modulepreload links for a document: the entry's static imports and, unless it answers a
9977
+ // client navigation, the renderer, then the modules its hydrating page and its markup load.
9978
+ function renderFarmClientModulePreloads(markup, pageModule, navigation) {
9869
9979
  // A nonce policy blocks parser-inserted links without the nonce, and the
9870
9980
  // response filter manages nonces on script elements only, so CSP nonce mode
9871
9981
  // keeps the documents it had.
9872
9982
  if (!farmClientModulePreloads || (farmSecurityConfig.csp && farmSecurityConfig.csp.nonce)) return "";
9873
- return farmClientEntryPreloadTags +
9983
+ return farmClientEntryPreloadTags + (navigation ? "" : farmClientRendererPreloadTags) +
9874
9984
  collectFarmClientDocumentModules(markup, pageModule, new Set())
9875
9985
  .map(renderFarmClientModulePreload)
9876
9986
  .join("");
@@ -9878,11 +9988,12 @@ function renderFarmClientModulePreloads(markup, pageModule) {
9878
9988
 
9879
9989
  // What a boot document's runtime fetches as it starts, for the boot to request with it rather
9880
9990
  // than each a round trip after the file that imports it: the entry's static imports, the router
9881
- // and route table a link's intent loads, and the modules the root hydrates with. A root that
9991
+ // and route table a link's intent loads, the renderer the entry renders and hydrates with (RFC
9992
+ // 0010), and the modules the root hydrates with. A root that
9882
9993
  // waits for its time hydrates once the runtime runs, so its modules come with the entry's; one
9883
9994
  // that waits for a click hydrates on an interaction in it, and the boot fetches them then. The
9884
9995
  // boot adds the links itself with the script's nonce, so CSP nonce mode keeps them.
9885
- function renderFarmClientBootPreloads(markup, pageModule, root, rootStrategy) {
9996
+ function renderFarmClientBootPreloads(markup, pageModule, root, rootStrategy, navigation) {
9886
9997
  if (!farmClientModulePreloads) return "";
9887
9998
  const files = farmClientModulePreloads.files;
9888
9999
  const attribute = function(name, indexes) {
@@ -9898,6 +10009,7 @@ function renderFarmClientBootPreloads(markup, pageModule, root, rootStrategy) {
9898
10009
  const waitsForClick = rootStrategy === "interaction";
9899
10010
  return attribute("data-farm-preload", waitsForClick ? entry : entry.concat(rootModules)) +
9900
10011
  attribute("data-farm-preload-router", farmClientModulePreloads.router || []) +
10012
+ attribute("data-farm-preload-renderer", navigation ? [] : farmClientModulePreloads.renderer || []) +
9901
10013
  (waitsForClick ? attribute("data-farm-preload-root", rootModules) : "");
9902
10014
  }
9903
10015
 
@@ -10234,7 +10346,7 @@ function createFarmAgentRobotsResponse(request) {
10234
10346
  // its nearest layout's.
10235
10347
  const farmAgentGuardedPages = new Set(${JSON.stringify(
10236
10348
  pageRoutes.map((route) => route.pattern).filter(
10237
- (pattern) => !pattern.includes("[") && _chunk6ZFGWB75cjs.farmPathGuardCoversPage.call(void 0,
10349
+ (pattern) => !pattern.includes("[") && _chunkUWOCYINYcjs.farmPathGuardCoversPage.call(void 0,
10238
10350
  {
10239
10351
  config: { middleware: config.middleware, integrations: config.integrations },
10240
10352
  middlewareRoutes
@@ -10289,12 +10401,12 @@ ${servesDefaultMCP ? `// agent.mcp: the default read-only MCP server at /mcp, as
10289
10401
  // aside for a page route that answers /mcp and for any MCP server published or
10290
10402
  // registered at runtime, such as the docs engine's.
10291
10403
  const farmDefaultMCPServer = ${JSON.stringify(
10292
- _chunkYRXPDKMMcjs.createFarmDefaultMCPServer.call(void 0, readFarmAppPackageIdentity(config.root), _chunkLMXGCFAMcjs.FARM_VERSION)
10404
+ _chunkW53Z4WDIcjs.createFarmDefaultMCPServer.call(void 0, readFarmAppPackageIdentity(config.root), _chunkCCMP4JD2cjs.FARM_VERSION)
10293
10405
  )};
10294
10406
  let farmDefaultMCPRouteFree;
10295
10407
  function getFarmDefaultMCPServer() {
10296
10408
  if (farmDefaultMCPRouteFree === undefined) {
10297
- farmDefaultMCPRouteFree = !matchPageRoute(${JSON.stringify(_chunkYRXPDKMMcjs.FARM_DEFAULT_MCP_PATH)});
10409
+ farmDefaultMCPRouteFree = !matchPageRoute(${JSON.stringify(_chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH)});
10298
10410
  }
10299
10411
  return farmDefaultMCPRouteFree ? resolveFarmDefaultMCPServer(farmDefaultMCPServer) : undefined;
10300
10412
  }
@@ -10483,7 +10595,7 @@ ${edgeMiddlewareFilePaths.length > 0 ? `
10483
10595
  // middleware guards is never prerendered. Read once: Nitro's prerender worker sets the variable.
10484
10596
  const farmEdgeMiddlewareFiles = new Set(${JSON.stringify(edgeMiddlewareFilePaths)});
10485
10597
  const farmPrerendering =
10486
- typeof process !== "undefined" && process.env?.${_chunkNNGBTJCXcjs.FARM_PRERENDER_ENV} === "1";
10598
+ typeof process !== "undefined" && process.env?.${_chunkANZLZNNXcjs.FARM_PRERENDER_ENV} === "1";
10487
10599
  ` : ""}
10488
10600
  const farmMiddlewareRunner = ${hasMiddlewareRuntime ? `createProductionMiddlewareRunner({
10489
10601
  config: farmMiddlewareConfig,
@@ -10739,7 +10851,7 @@ ${hasInfraAnalyticsRuntime ? `
10739
10851
  // endpoints, Markdown mirrors, and docs pages have no app route pattern, so they are
10740
10852
  // labeled here; route.pattern keeps meaning the matched app route for plugins.
10741
10853
  const farmBuiltInRoutePaths = new Set(${JSON.stringify(
10742
- _chunk5KISFWD2cjs.listFarmBuiltInRoutePaths.call(void 0, {
10854
+ _chunk5OAN7BG5cjs.listFarmBuiltInRoutePaths.call(void 0, {
10743
10855
  agent: {
10744
10856
  ...config.agent,
10745
10857
  aiCatalog: servesAiCatalog,
@@ -11516,7 +11628,7 @@ ${hasServerRuntimeIntegrations ? `
11516
11628
  // agent.manifest: /.well-known/farmjs.json (and 0.1.34's /.well-known/farmjs), the app's
11517
11629
  // public manifest, the same document for every request.
11518
11630
  if (
11519
- [${JSON.stringify(_chunk5KISFWD2cjs.FARM_APP_MANIFEST_PATH)}, ${JSON.stringify(_chunk5KISFWD2cjs.FARM_APP_MANIFEST_LEGACY_PATH)}].includes(
11631
+ [${JSON.stringify(_chunk5OAN7BG5cjs.FARM_APP_MANIFEST_PATH)}, ${JSON.stringify(_chunk5OAN7BG5cjs.FARM_APP_MANIFEST_LEGACY_PATH)}].includes(
11520
11632
  normalizeRuntimePath(routePathname),
11521
11633
  )
11522
11634
  ) {
@@ -11528,7 +11640,7 @@ ${hasServerRuntimeIntegrations ? `
11528
11640
  ` : ""}
11529
11641
  ${_optionalChain([config, 'access', _277 => _277.agent, 'optionalAccess', _278 => _278.apiCatalog]) ? `
11530
11642
  // agent.apiCatalog: list the OpenAPI and MCP surfaces at the RFC 9727 path.
11531
- if (normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunk5KISFWD2cjs.FARM_API_CATALOG_PATH)}) {
11643
+ if (normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunk5OAN7BG5cjs.FARM_API_CATALOG_PATH)}) {
11532
11644
  return applyProductionMiddlewareHeaders(
11533
11645
  createFarmApiCatalogResponse(request.method, farmApiCatalogInput, request),
11534
11646
  middlewareHeaders,
@@ -12338,6 +12450,10 @@ ${hasServerRuntimeIntegrations ? `
12338
12450
  // Set once the whole document is rendered: whether it starts with the boot entry, which
12339
12451
  // preloads nothing.
12340
12452
  let farmBootsClient = false;
12453
+ // A client navigation swaps this document in without running its scripts. A route a
12454
+ // shared cache stores renders the same for every request.
12455
+ const farmNavigationRequest = ${farmIslandsMode ? `!farmSharedCacheableRoute &&
12456
+ (request.headers.has("f-stream") || request.headers.has("f-render"))` : "false"};
12341
12457
  // A layout's own <html> document with Farm's head assets merged in and the #root the client
12342
12458
  // hydrates opening its body: the whole document, or a streamed one's opening.
12343
12459
  const composeFarmFullDocument = function(markup) {
@@ -12347,7 +12463,7 @@ ${hasServerRuntimeIntegrations ? `
12347
12463
  );
12348
12464
  composed = composed
12349
12465
  // Inject CSS link after opening head tag or first meta tag
12350
- .replace(/<head([^>]*)>/i, function(match, attrs) { return '<head' + attrs + '>\\n <link rel="stylesheet" href="/__farm_client_css_href__">' + (farmBootsClient ? "" : renderFarmClientModulePreloads(composed, route.clientModule)); })
12466
+ .replace(/<head([^>]*)>/i, function(match, attrs) { return '<head' + attrs + '>\\n <link rel="stylesheet" href="/__farm_client_css_href__">' + (farmBootsClient ? "" : renderFarmClientModulePreloads(composed, route.clientModule, farmNavigationRequest)); })
12351
12467
  .replace(/<\\/head>/i, () => renderFarmRendererHydrationScript() + '\\n</head>')
12352
12468
  // Explicit metadata wins over renderer and layout titles. Without
12353
12469
  // explicit metadata, a renderer title wins over the layout title.
@@ -12545,7 +12661,8 @@ ${hasServerRuntimeIntegrations ? `
12545
12661
  farmHydratesRoot ? (shouldHydrateLayout ? "root" : "__farm_page__") : "",
12546
12662
  route.rootStrategy,
12547
12663
  html,
12548
- route.clientModule
12664
+ route.clientModule,
12665
+ farmNavigationRequest
12549
12666
  )
12550
12667
  : renderFarmClientEntryScript();
12551
12668
 
@@ -12576,7 +12693,7 @@ ${hasServerRuntimeIntegrations ? `
12576
12693
  \${viewportTags}
12577
12694
  \${hasFavicon ? "" : '<link rel="icon" href="data:,">'}
12578
12695
  \${suppressDefaultTitle ? "" : "<title>" + title + "</title>"}\${metaTags}\${rendererHead ? "\\n " + rendererHead : ""}
12579
- <link rel="stylesheet" href="/__farm_client_css_href__">\${farmBootsClient ? "" : renderFarmClientModulePreloads(html, route.clientModule)}
12696
+ <link rel="stylesheet" href="/__farm_client_css_href__">\${farmBootsClient ? "" : renderFarmClientModulePreloads(html, route.clientModule, farmNavigationRequest)}
12580
12697
  \${renderFarmRendererHydrationScript()}
12581
12698
  </head>
12582
12699
  <body>
@@ -12712,7 +12829,7 @@ ${hasServerRuntimeIntegrations ? `
12712
12829
  ${servesDefaultMCP ? `
12713
12830
  // agent.mcp: no app route answered /mcp, so the default read-only server may.
12714
12831
  if (
12715
- normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunkYRXPDKMMcjs.FARM_DEFAULT_MCP_PATH)} &&
12832
+ normalizeRuntimePath(routePathname) === ${JSON.stringify(_chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH)} &&
12716
12833
  getFarmDefaultMCPServer()
12717
12834
  ) {
12718
12835
  return applyProductionMiddlewareHeaders(
@@ -13306,7 +13423,7 @@ function getManifestPageEntry(manifest, pathname) {
13306
13423
  }
13307
13424
  function withFarmEdgeGuardedPrerenderHeaders(headers, edgeGuarded) {
13308
13425
  if (!edgeGuarded) return headers;
13309
- const cacheHeaders = /* @__PURE__ */ new Set(["cache-control", ..._chunk42EUEYW6cjs.CDN_CACHE_CONTROL_HEADERS]);
13426
+ const cacheHeaders = /* @__PURE__ */ new Set(["cache-control", ..._chunkYUQUGVSVcjs.CDN_CACHE_CONTROL_HEADERS]);
13310
13427
  return {
13311
13428
  ...Object.fromEntries(
13312
13429
  Object.entries(headers).filter(([name]) => !cacheHeaders.has(name.toLowerCase()))
@@ -13339,9 +13456,9 @@ function getPhysicalPrerenderBypassReason(options) {
13339
13456
  if (rewriteSources.some((source) => middlewarePatternMatches(source, pathname))) {
13340
13457
  return "rewrite";
13341
13458
  }
13342
- if (_chunk6ZFGWB75cjs.appMiddlewareMayHandlePath.call(void 0, middlewareRoutes, pathname)) return "app middleware";
13343
- if (_chunk6ZFGWB75cjs.configMiddlewareMayHandlePath.call(void 0, config.middleware, pathname)) return "configured middleware";
13344
- if (_chunkF7PKUP6Pcjs.hasCustomFarmRouteContext.call(void 0, config)) return "request context";
13459
+ if (_chunkUWOCYINYcjs.appMiddlewareMayHandlePath.call(void 0, middlewareRoutes, pathname)) return "app middleware";
13460
+ if (_chunkUWOCYINYcjs.configMiddlewareMayHandlePath.call(void 0, config.middleware, pathname)) return "configured middleware";
13461
+ if (_chunkLVGB5PYKcjs.hasCustomFarmRouteContext.call(void 0, config)) return "request context";
13345
13462
  if (farmServerRuntimePluginsMayHandlePath(config, pathname)) return "server runtime plugin";
13346
13463
  const manifestEntry = getManifestPageEntry(routeRuntimeManifest, pathname);
13347
13464
  if (_optionalChain([manifestEntry, 'optionalAccess', _298 => _298.rendering]) === "dynamic") return "dynamic runtime manifest";
@@ -13360,32 +13477,32 @@ function getPhysicalPrerenderBypassReason(options) {
13360
13477
  async function getFarmDocsPrerenderPages(config, root, preset) {
13361
13478
  if (!_optionalChain([config, 'access', _301 => _301.docs, 'optionalAccess', _302 => _302.enabled]) || !config.docs.prerender) return [];
13362
13479
  if (_chunkNLBHLPEOcjs.getFarmPresetRuntime.call(void 0, preset) === "edge") {
13363
- _chunkGC5ROI3Acjs.logger.info(
13480
+ _chunk7U4XF76Rcjs.logger.info(
13364
13481
  `\u21AA Keeping docs pages in the edge docs snapshot: docs.prerender writes static files on Node and serverless targets, not "${preset}".`
13365
13482
  );
13366
13483
  return [];
13367
13484
  }
13368
- if (!_chunkXGS76V7Lcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
13369
- const { pages: pages2, originDependent } = _chunk6D3CJFNUcjs.listFarmDocsBuiltInPrerenderPages.call(void 0, config.docs, {
13485
+ if (!_chunkZPEZXQTMcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)) {
13486
+ const { pages: pages2, originDependent } = _chunkHR5GU4UUcjs.listFarmDocsBuiltInPrerenderPages.call(void 0, config.docs, {
13370
13487
  root,
13371
13488
  srcDir: config.srcDir
13372
13489
  });
13373
13490
  if (originDependent.length > 0) {
13374
- _chunkGC5ROI3Acjs.logger.info(
13491
+ _chunk7U4XF76Rcjs.logger.info(
13375
13492
  `\u21AA Keeping ${originDependent.length} docs page(s) rendering on request: their social image metadata is an absolute URL built from the request's origin. Set docs.socialImage.baseUrl to prerender them.`
13376
13493
  );
13377
13494
  }
13378
13495
  return pages2;
13379
13496
  }
13380
13497
  if (!_chunk67MZTLTFcjs.isReactRenderer.call(void 0, config.renderer)) {
13381
- _chunkGC5ROI3Acjs.logger.warn(
13498
+ _chunk7U4XF76Rcjs.logger.warn(
13382
13499
  `The docs adapter ${JSON.stringify(config.docs.adapter.id)} renders with React; docs.prerender keeps its pages rendering on request with the "${config.renderer.name}" renderer.`
13383
13500
  );
13384
13501
  return [];
13385
13502
  }
13386
- const pages = await _chunkXGS76V7Lcjs.listFarmDocsAdapterPages.call(void 0, config.docs, { root, srcDir: config.srcDir });
13503
+ const pages = await _chunkZPEZXQTMcjs.listFarmDocsAdapterPages.call(void 0, config.docs, { root, srcDir: config.srcDir });
13387
13504
  if (!pages) {
13388
- _chunkGC5ROI3Acjs.logger.warn(
13505
+ _chunk7U4XF76Rcjs.logger.warn(
13389
13506
  `The docs adapter ${JSON.stringify(config.docs.adapter.id)} does not list its pages for prerendering; upgrade it to prerender docs pages. They render on request until then.`
13390
13507
  );
13391
13508
  return [];
@@ -13397,13 +13514,13 @@ async function listFarmDocsAnalyticsPages(config, root, preset) {
13397
13514
  return [];
13398
13515
  }
13399
13516
  try {
13400
- return await _chunkXGS76V7Lcjs.listFarmDocsPagePaths.call(void 0, config.docs, {
13517
+ return await _chunkZPEZXQTMcjs.listFarmDocsPagePaths.call(void 0, config.docs, {
13401
13518
  root,
13402
13519
  srcDir: config.srcDir,
13403
- adapter: _chunk67MZTLTFcjs.isReactRenderer.call(void 0, config.renderer) && _chunkXGS76V7Lcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)
13520
+ adapter: _chunk67MZTLTFcjs.isReactRenderer.call(void 0, config.renderer) && _chunkZPEZXQTMcjs.hasFarmDocsRuntimeAdapter.call(void 0, config.docs)
13404
13521
  });
13405
13522
  } catch (error) {
13406
- _chunkGC5ROI3Acjs.logger.warn(
13523
+ _chunk7U4XF76Rcjs.logger.warn(
13407
13524
  `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)}).`
13408
13525
  );
13409
13526
  return [];
@@ -13426,10 +13543,10 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
13426
13543
  const nitroBuilder = nitroBuilderResult.value;
13427
13544
  const isVercel = preset === "vercel";
13428
13545
  const isCloudflareWorker = preset === "cloudflare-module";
13429
- const outputDir = _chunkF7PKUP6Pcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
13546
+ const outputDir = _chunkLVGB5PYKcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
13430
13547
  const runtimeServerOutputDir = isVercel ? _path2.default.join(outputDir, "functions", "__nitro.func") : _path2.default.join(outputDir, "server");
13431
13548
  const ssrOutputDir = _path2.default.join(root, distDir, "ssr");
13432
- const imageRuntime = _chunkHVMQAVZKcjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
13549
+ const imageRuntime = _chunkX4TSMQWFcjs.resolveFarmImageServerRuntime.call(void 0, config.images, preset);
13433
13550
  const hasGeneratedMetadataImages = Array.from(routeManager.getMetadataImages().values()).some(
13434
13551
  (image) => image.sourceType === "module"
13435
13552
  );
@@ -13447,15 +13564,15 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
13447
13564
  (packageName) => copiedRuntimePackages.has(packageName)
13448
13565
  );
13449
13566
  const isPrebuiltSSRCandidate = preset === "node-server" && ssrExternalsArePackaged;
13450
- _chunkGC5ROI3Acjs.logger.info(`\u{1F4E6} Nitro output directory: ${outputDir}`);
13451
- _chunkGC5ROI3Acjs.logger.info(`\u{1F4E6} SSR entry file: ${ssrEntryFile}`);
13452
- _chunkGC5ROI3Acjs.logger.info(`\u{1F4E6} Preset: ${preset}`);
13567
+ _chunk7U4XF76Rcjs.logger.info(`\u{1F4E6} Nitro output directory: ${outputDir}`);
13568
+ _chunk7U4XF76Rcjs.logger.info(`\u{1F4E6} SSR entry file: ${ssrEntryFile}`);
13569
+ _chunk7U4XF76Rcjs.logger.info(`\u{1F4E6} Preset: ${preset}`);
13453
13570
  const ssgCollectionPromise = routeManager.collectSSGPages();
13454
13571
  const middlewareRoutesPromise = discoverMiddlewareRoutes(_chunkQMR2TUVZcjs.getFarmAppDirectories.call(void 0, config));
13455
13572
  const configuredResponseRoutesPromise = Promise.all([config.redirects(), config.rewrites()]);
13456
13573
  const docsPrerenderPagesPromise = getFarmDocsPrerenderPages(config, root, preset);
13457
- const farmWorkflows = await _chunkCKNZJFK5cjs.prepareFarmWorkflowsForNitro.call(void 0, config);
13458
- const farmCron = await _chunkCYNQPKA4cjs.prepareFarmCronForNitro.call(void 0, config);
13574
+ const farmWorkflows = await _chunkGBESKA76cjs.prepareFarmWorkflowsForNitro.call(void 0, config);
13575
+ const farmCron = await _chunk5ZHC6QGDcjs.prepareFarmCronForNitro.call(void 0, config);
13459
13576
  const [
13460
13577
  { ssg: ssgPages },
13461
13578
  middlewareRoutes,
@@ -13485,7 +13602,7 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
13485
13602
  const edgeGuardedPrerenderRoutes = [];
13486
13603
  const addPrerenderRoute = (pathname) => {
13487
13604
  prerenderRoutes.push(pathname);
13488
- if (_chunk6ZFGWB75cjs.appMiddlewareMayHandlePath.call(void 0, edgeMiddlewareRoutes, pathname)) {
13605
+ if (_chunkUWOCYINYcjs.appMiddlewareMayHandlePath.call(void 0, edgeMiddlewareRoutes, pathname)) {
13489
13606
  edgeGuardedPrerenderRoutes.push(pathname);
13490
13607
  }
13491
13608
  };
@@ -13527,29 +13644,29 @@ async function buildNitroUniversal(config, routeManager, apiRouteManager, server
13527
13644
  addPrerenderRoute(pathname);
13528
13645
  }
13529
13646
  for (const skipped of skippedPrerenderRoutes) {
13530
- _chunkGC5ROI3Acjs.logger.info(`\u21AA Keeping SSG route ${skipped.pathname} server-handled (${skipped.reason})`);
13647
+ _chunk7U4XF76Rcjs.logger.info(`\u21AA Keeping SSG route ${skipped.pathname} server-handled (${skipped.reason})`);
13531
13648
  }
13532
13649
  if (farmWorkflows.workflows.length > 0) {
13533
- _chunkGC5ROI3Acjs.logger.info(`\u23F1\uFE0F Found ${farmWorkflows.workflows.length} Farm workflow task(s)`);
13650
+ _chunk7U4XF76Rcjs.logger.info(`\u23F1\uFE0F Found ${farmWorkflows.workflows.length} Farm workflow task(s)`);
13534
13651
  }
13535
13652
  if (farmCron.jobs.length > 0 && farmCron.provider === "farmjs") {
13536
- _chunkGC5ROI3Acjs.logger.info(
13653
+ _chunk7U4XF76Rcjs.logger.info(
13537
13654
  `\u23F1\uFE0F ${farmCron.jobs.length} Farm cron job(s) for Infra; run farm cron sync after deployment`
13538
13655
  );
13539
13656
  } else if (farmCron.jobs.length > 0) {
13540
- _chunkGC5ROI3Acjs.logger.info(`\u23F1\uFE0F Configured ${farmCron.jobs.length} Farm cron route(s)`);
13657
+ _chunk7U4XF76Rcjs.logger.info(`\u23F1\uFE0F Configured ${farmCron.jobs.length} Farm cron route(s)`);
13541
13658
  }
13542
13659
  if (preset === "cloudflare-pages" && farmCron.jobs.length > 0 && farmCron.provider === "host") {
13543
- _chunkGC5ROI3Acjs.logger.warn(
13660
+ _chunk7U4XF76Rcjs.logger.warn(
13544
13661
  "Cloudflare Pages does not install Cron Triggers. Use the cloudflare-module preset or an external scheduler with .farm/cron-manifest.json."
13545
13662
  );
13546
13663
  }
13547
- const portableScheduledTasks = _chunkCYNQPKA4cjs.mergeScheduledTasks.call(void 0,
13664
+ const portableScheduledTasks = _chunk5ZHC6QGDcjs.mergeScheduledTasks.call(void 0,
13548
13665
  farmWorkflows.scheduledTasks,
13549
13666
  farmCron.scheduledTasks
13550
13667
  );
13551
- const scheduledTasks = preset.startsWith("cloudflare") ? _chunkCYNQPKA4cjs.toFarmCronCloudflareScheduledTasks.call(void 0, portableScheduledTasks) : portableScheduledTasks;
13552
- const cloudflareCronConfig = farmCron.provider === "host" ? _chunkCYNQPKA4cjs.createFarmCronCloudflareConfig.call(void 0, farmCron.jobs) : void 0;
13668
+ const scheduledTasks = preset.startsWith("cloudflare") ? _chunk5ZHC6QGDcjs.toFarmCronCloudflareScheduledTasks.call(void 0, portableScheduledTasks) : portableScheduledTasks;
13669
+ const cloudflareCronConfig = farmCron.provider === "host" ? _chunk5ZHC6QGDcjs.createFarmCronCloudflareConfig.call(void 0, farmCron.jobs) : void 0;
13553
13670
  const [
13554
13671
  clientCssHref,
13555
13672
  clientJsSrc,
@@ -14002,7 +14119,7 @@ function toFarmNodeResponse(request, response) {
14002
14119
  } : {},
14003
14120
  // Use serverHandlers to define our workflow handler first, then the catch-all handler.
14004
14121
  handlers: [
14005
- ...farmCloudflareEnvPath ? [{ route: "/**", middleware: true, handler: _chunkGC5ROI3Acjs.toPosixPath.call(void 0, farmCloudflareEnvPath) }] : [],
14122
+ ...farmCloudflareEnvPath ? [{ route: "/**", middleware: true, handler: _chunk7U4XF76Rcjs.toPosixPath.call(void 0, farmCloudflareEnvPath) }] : [],
14006
14123
  ...farmWorkflows.handlerPath ? [
14007
14124
  {
14008
14125
  route: `${config.workflows.route}/**`,
@@ -14011,7 +14128,7 @@ function toFarmNodeResponse(request, response) {
14011
14128
  ] : [],
14012
14129
  {
14013
14130
  route: "/**",
14014
- handler: _chunkGC5ROI3Acjs.toPosixPath.call(void 0, nitroEntryPath)
14131
+ handler: _chunk7U4XF76Rcjs.toPosixPath.call(void 0, nitroEntryPath)
14015
14132
  }
14016
14133
  ],
14017
14134
  routeRules: {
@@ -14120,7 +14237,7 @@ function toFarmNodeResponse(request, response) {
14120
14237
  const configuredRule = configuredNitroRouteRules[route.route];
14121
14238
  if (configuredRule) nitroInstance.options.routeRules[route.route] = configuredRule;
14122
14239
  else delete nitroInstance.options.routeRules[route.route];
14123
- _chunkGC5ROI3Acjs.logger.info(`\u21AA Keeping SSG route ${route.route} server-handled (it does not render HTML)`);
14240
+ _chunk7U4XF76Rcjs.logger.info(`\u21AA Keeping SSG route ${route.route} server-handled (it does not render HTML)`);
14124
14241
  });
14125
14242
  nitroInstance.hooks.hook("prerender:done", () => {
14126
14243
  if (skippedNonHtmlPrerenderRoute) nitroInstance.routing.sync();
@@ -14128,7 +14245,7 @@ function toFarmNodeResponse(request, response) {
14128
14245
  if (_optionalChain([config, 'access', _333 => _333.md, 'optionalAccess', _334 => _334.enabled])) {
14129
14246
  nitroInstance.hooks.hook("prerender:generate", (route) => {
14130
14247
  if (!route.contents || !_optionalChain([route, 'access', _335 => _335.contentType, 'optionalAccess', _336 => _336.toLowerCase, 'call', _337 => _337(), 'access', _338 => _338.includes, 'call', _339 => _339("html")])) return;
14131
- const alternatePath = _chunk2YJ4DHTDcjs.getFarmMarkdownAlternatePath.call(void 0, config.md, route.route, {
14248
+ const alternatePath = _chunk2NOHVIJ3cjs.getFarmMarkdownAlternatePath.call(void 0, config.md, route.route, {
14132
14249
  routePathname: (pathname) => routeManager.toRoutePathname(pathname)
14133
14250
  });
14134
14251
  if (!alternatePath) return;
@@ -14242,14 +14359,14 @@ function toFarmNodeResponse(request, response) {
14242
14359
  });
14243
14360
  }
14244
14361
  if (prerenderRoutes.length > 0) {
14245
- _chunkGC5ROI3Acjs.logger.info(`\u{1F4C4} Pre-rendering ${prerenderRoutes.length} SSG page(s)`);
14246
- const previousPrerender = process.env[_chunkNNGBTJCXcjs.FARM_PRERENDER_ENV];
14247
- process.env[_chunkNNGBTJCXcjs.FARM_PRERENDER_ENV] = "1";
14362
+ _chunk7U4XF76Rcjs.logger.info(`\u{1F4C4} Pre-rendering ${prerenderRoutes.length} SSG page(s)`);
14363
+ const previousPrerender = process.env[_chunkANZLZNNXcjs.FARM_PRERENDER_ENV];
14364
+ process.env[_chunkANZLZNNXcjs.FARM_PRERENDER_ENV] = "1";
14248
14365
  try {
14249
14366
  await nitroBuilder.prerender(nitroInstance);
14250
14367
  } finally {
14251
- if (previousPrerender === void 0) delete process.env[_chunkNNGBTJCXcjs.FARM_PRERENDER_ENV];
14252
- else process.env[_chunkNNGBTJCXcjs.FARM_PRERENDER_ENV] = previousPrerender;
14368
+ if (previousPrerender === void 0) delete process.env[_chunkANZLZNNXcjs.FARM_PRERENDER_ENV];
14369
+ else process.env[_chunkANZLZNNXcjs.FARM_PRERENDER_ENV] = previousPrerender;
14253
14370
  }
14254
14371
  }
14255
14372
  const sharpRuntimeStagePromise = imageRuntime === "node" ? stageSharpRuntime(config, root, distDir, fs5, preset) : Promise.resolve(null);
@@ -14301,10 +14418,10 @@ function toFarmNodeResponse(request, response) {
14301
14418
  if (failedCopy) throw failedCopy.reason;
14302
14419
  if (canReusePrebuiltSSR) {
14303
14420
  await registerPrebuiltSSRPackageImport(_path2.default.join(outputDir, "server"), ssrEntryFile, fs5);
14304
- _chunkGC5ROI3Acjs.logger.info("\u26A1 Reused Farm's prebuilt SSR bundle for the Node output");
14421
+ _chunk7U4XF76Rcjs.logger.info("\u26A1 Reused Farm's prebuilt SSR bundle for the Node output");
14305
14422
  }
14306
14423
  if (useRolldownBuilder) {
14307
- _chunkGC5ROI3Acjs.logger.info("\u26A1 Built the Node adapter with Rolldown");
14424
+ _chunk7U4XF76Rcjs.logger.info("\u26A1 Built the Node adapter with Rolldown");
14308
14425
  }
14309
14426
  if (preset === "node-server" && !desktopServerEntry) {
14310
14427
  await installFarmCompileCacheLauncher(_path2.default.join(outputDir, "server"), fs5);
@@ -14337,7 +14454,7 @@ function toFarmNodeResponse(request, response) {
14337
14454
  prerenderRoutes.map(toPrerenderPublicPath)
14338
14455
  );
14339
14456
  }
14340
- _chunkGC5ROI3Acjs.logger.success(`\u2705 Nitro build completed with preset: ${preset}`);
14457
+ _chunk7U4XF76Rcjs.logger.success(`\u2705 Nitro build completed with preset: ${preset}`);
14341
14458
  }
14342
14459
  function resolveFarmNitroOutputConfig(preset, outputDir) {
14343
14460
  const isVercel = preset === "vercel";
@@ -14466,7 +14583,7 @@ async function postProcessVercelOutput(root, outputDir, fs5, config, farmWorkflo
14466
14583
  config.basePath
14467
14584
  );
14468
14585
  const edgeMiddlewareRoutes = edgeMiddleware.middlewareRoutes.filter(
14469
- (route) => edgeMiddleware.guardedPages.some((pathname) => _chunk6ZFGWB75cjs.appMiddlewareMayHandlePath.call(void 0, [route], pathname))
14586
+ (route) => edgeMiddleware.guardedPages.some((pathname) => _chunkUWOCYINYcjs.appMiddlewareMayHandlePath.call(void 0, [route], pathname))
14470
14587
  );
14471
14588
  if (edgeMiddlewareRoutes.length > 0) {
14472
14589
  await writeFarmVercelEdgeMiddlewareFunction({
@@ -14485,17 +14602,17 @@ async function postProcessVercelOutput(root, outputDir, fs5, config, farmWorkflo
14485
14602
  middlewareRoutes: edgeMiddlewareRoutes.length > 0 ? createFarmVercelEdgeMiddlewareRoutes(edgeMiddleware.guardedPages, config.basePath) : [],
14486
14603
  canonicalSlashRoutes: createFarmVercelCanonicalSlashRoutes(prerenderedPages)
14487
14604
  });
14488
- const vercelConfigWithWorkflowCrons = _chunkCKNZJFK5cjs.applyFarmWorkflowVercelCrons.call(void 0,
14605
+ const vercelConfigWithWorkflowCrons = _chunkGBESKA76cjs.applyFarmWorkflowVercelCrons.call(void 0,
14489
14606
  vercelConfig,
14490
14607
  farmWorkflows.workflows
14491
14608
  );
14492
- const vercelConfigWithCrons = _chunkCYNQPKA4cjs.applyFarmCronVercelCrons.call(void 0, vercelConfigWithWorkflowCrons, cronJobs);
14609
+ const vercelConfigWithCrons = _chunk5ZHC6QGDcjs.applyFarmCronVercelCrons.call(void 0, vercelConfigWithWorkflowCrons, cronJobs);
14493
14610
  await fs5.writeFile(configPath, JSON.stringify(vercelConfigWithCrons, null, 2));
14494
- _chunkGC5ROI3Acjs.logger.info("\u2705 Post-processed Vercel output for Build Output API v3");
14611
+ _chunk7U4XF76Rcjs.logger.info("\u2705 Post-processed Vercel output for Build Output API v3");
14495
14612
  }
14496
14613
  async function copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs5) {
14497
14614
  if (!_optionalChain([config, 'access', _349 => _349.docs, 'optionalAccess', _350 => _350.enabled])) return;
14498
- const [mainRoot, ...extraRoots] = _chunk6D3CJFNUcjs.getFarmDocsRoots.call(void 0, config.docs);
14615
+ const [mainRoot, ...extraRoots] = _chunkHR5GU4UUcjs.getFarmDocsRoots.call(void 0, config.docs);
14499
14616
  await copyFarmDocsRootContent(
14500
14617
  mainRoot,
14501
14618
  root,
@@ -14516,12 +14633,12 @@ async function copyFarmDocsContentForVercel(config, root, nitroFuncDir, fs5) {
14516
14633
  async function copyFarmDocsRootContent(docs, root, srcDir, bundledContentDir, fs5) {
14517
14634
  const docsContentDir = resolveBuildDocsContentDir(docs, root, srcDir);
14518
14635
  if (!docsContentDir) return;
14519
- const lastModifiedManifest = _chunk6D3CJFNUcjs.createFarmDocsLastModifiedManifest.call(void 0, docsContentDir, {
14636
+ const lastModifiedManifest = _chunkHR5GU4UUcjs.createFarmDocsLastModifiedManifest.call(void 0, docsContentDir, {
14520
14637
  fallback: "now"
14521
14638
  });
14522
14639
  const undatedPages = _nullishCoalesce(_optionalChain([lastModifiedManifest, 'access', _351 => _351.unknown, 'optionalAccess', _352 => _352.length]), () => ( 0));
14523
14640
  if (undatedPages > 0) {
14524
- _chunkGC5ROI3Acjs.logger.warn(
14641
+ _chunk7U4XF76Rcjs.logger.warn(
14525
14642
  `${undatedPages} docs page(s) were last changed before this shallow clone's Git history, so they show no "Last updated" date. Build from a full clone (git fetch --unshallow) or set lastModified in the page's frontmatter.`
14526
14643
  );
14527
14644
  }
@@ -14533,11 +14650,11 @@ async function copyFarmDocsRootContent(docs, root, srcDir, bundledContentDir, fs
14533
14650
  dereference: true
14534
14651
  });
14535
14652
  await fs5.writeFile(
14536
- _path2.default.join(bundledContentDir, _chunk6D3CJFNUcjs.FARM_DOCS_LAST_MODIFIED_MANIFEST),
14653
+ _path2.default.join(bundledContentDir, _chunkHR5GU4UUcjs.FARM_DOCS_LAST_MODIFIED_MANIFEST),
14537
14654
  `${JSON.stringify(lastModifiedManifest, null, 2)}
14538
14655
  `
14539
14656
  );
14540
- _chunkGC5ROI3Acjs.logger.info(`\u{1F4DA} Bundled docs content for Vercel: ${_path2.default.relative(root, docsContentDir)}`);
14657
+ _chunk7U4XF76Rcjs.logger.info(`\u{1F4DA} Bundled docs content for Vercel: ${_path2.default.relative(root, docsContentDir)}`);
14541
14658
  }
14542
14659
  function resolveServerFunctionPlatform(preset) {
14543
14660
  return preset === "vercel" || preset === "netlify" ? { os: "linux", cpu: "x64", libc: "glibc" } : null;
@@ -14604,7 +14721,7 @@ async function stageSharpRuntime(config, root, distDir, fs5, preset) {
14604
14721
  try {
14605
14722
  await copyPackage("sharp", sharpRequire);
14606
14723
  if (!copiedPackages.has("sharp")) {
14607
- throw new Error(`Farm image optimization requires sharp. ${_chunkHVMQAVZKcjs.SHARP_INSTALL_HINT}`);
14724
+ throw new Error(`Farm image optimization requires sharp. ${_chunkX4TSMQWFcjs.SHARP_INSTALL_HINT}`);
14608
14725
  }
14609
14726
  } catch (error) {
14610
14727
  await fs5.rm(stageDir, { recursive: true, force: true });
@@ -14631,7 +14748,7 @@ async function installStagedSharpRuntime(staged, nitroFuncDir, fs5) {
14631
14748
  } finally {
14632
14749
  await fs5.rm(staged.stageDir, { recursive: true, force: true });
14633
14750
  }
14634
- _chunkGC5ROI3Acjs.logger.info(
14751
+ _chunk7U4XF76Rcjs.logger.info(
14635
14752
  `\u{1F5BC}\uFE0F Bundled Sharp image runtime (${Object.keys(staged.dependencies).length} packages)`
14636
14753
  );
14637
14754
  }
@@ -14675,7 +14792,7 @@ async function mergeStagedDirectory(sourceDir, targetDir, fs5) {
14675
14792
  function assertMetadataImageRuntimeInstalled(root, metadataImageRoutes) {
14676
14793
  const generated = metadataImageRoutes.find((image) => image.sourceType === "module");
14677
14794
  if (!generated || resolveMetadataImageRuntimePackageJson(root)) return;
14678
- const file = generated.modulePath ? _chunkGC5ROI3Acjs.toPosixPath.call(void 0, _path2.default.relative(root, generated.modulePath)) : "";
14795
+ const file = generated.modulePath ? _chunk7U4XF76Rcjs.toPosixPath.call(void 0, _path2.default.relative(root, generated.modulePath)) : "";
14679
14796
  throw new Error(
14680
14797
  `${file || "A generated metadata image"} renders with @vercel/og, which is not installed. ${_chunkKORZ6PREcjs.VERCEL_OG_INSTALL_HINT}`
14681
14798
  );
@@ -14709,7 +14826,7 @@ async function copyMetadataImageRuntime(root, nitroFuncDir, fs5) {
14709
14826
  "@vercel/og": String(packageJson.version || "0.11.1")
14710
14827
  };
14711
14828
  await writeNitroOutputPackage(nitroFuncDir, functionPackage, fs5);
14712
- _chunkGC5ROI3Acjs.logger.info("\u{1F5BC}\uFE0F Bundled generated metadata image runtime");
14829
+ _chunk7U4XF76Rcjs.logger.info("\u{1F5BC}\uFE0F Bundled generated metadata image runtime");
14713
14830
  }
14714
14831
  async function readNitroOutputPackage(outputDir, fs5) {
14715
14832
  const packagePath = _path2.default.join(outputDir, "package.json");
@@ -14837,7 +14954,7 @@ async function createFarmProjectModuleSsrEnvironment() {
14837
14954
  // src/build/index.ts
14838
14955
  async function build(config, options = {}) {
14839
14956
  return _chunkNG2EZ6QScjs.withProductionNodeEnv.call(void 0,
14840
- () => _chunkODYKCC6Wcjs.withPackageClientBoundaryCache.call(void 0, () => buildWithProductionNodeEnv(config, options))
14957
+ () => _chunkZVSQN7NCcjs.withPackageClientBoundaryCache.call(void 0, () => buildWithProductionNodeEnv(config, options))
14841
14958
  );
14842
14959
  }
14843
14960
  function createBuildTargetBaseline(config) {
@@ -14848,7 +14965,7 @@ function createBuildTargetBaseline(config) {
14848
14965
  preset,
14849
14966
  distDir,
14850
14967
  outputDir,
14851
- outputWasDerived: outputDir === _chunkF7PKUP6Pcjs.getDefaultDeployOutputDir.call(void 0, config.deploy.target, preset, distDir)
14968
+ outputWasDerived: outputDir === _chunkLVGB5PYKcjs.getDefaultDeployOutputDir.call(void 0, config.deploy.target, preset, distDir)
14852
14969
  };
14853
14970
  }
14854
14971
  function resolveBuildTargets(config, options, baseline) {
@@ -14857,8 +14974,8 @@ function resolveBuildTargets(config, options, baseline) {
14857
14974
  const distDir = config.distDir || ".farm";
14858
14975
  const outputWasReplaced = config.deploy.outputDir !== baseline.outputDir;
14859
14976
  const shouldRefreshDerivedOutput = baseline.outputWasDerived && !outputWasReplaced && (preset !== baseline.preset || distDir !== baseline.distDir);
14860
- const deployTarget = preset === config.deploy.preset ? config.deploy.target : _chunkF7PKUP6Pcjs.getDeployTargetForPreset.call(void 0, preset);
14861
- const outputDir = shouldRefreshDerivedOutput ? _chunkF7PKUP6Pcjs.getDefaultDeployOutputDir.call(void 0, deployTarget, preset, distDir) : config.deploy.outputDir;
14977
+ const deployTarget = preset === config.deploy.preset ? config.deploy.target : _chunkLVGB5PYKcjs.getDeployTargetForPreset.call(void 0, preset);
14978
+ const outputDir = shouldRefreshDerivedOutput ? _chunkLVGB5PYKcjs.getDefaultDeployOutputDir.call(void 0, deployTarget, preset, distDir) : config.deploy.outputDir;
14862
14979
  return {
14863
14980
  root,
14864
14981
  preset,
@@ -14866,7 +14983,7 @@ function resolveBuildTargets(config, options, baseline) {
14866
14983
  distDir,
14867
14984
  deployTarget,
14868
14985
  outputDir,
14869
- deployOutputDir: _chunkF7PKUP6Pcjs.resolveDeployOutputPath.call(void 0, root, outputDir)
14986
+ deployOutputDir: _chunkLVGB5PYKcjs.resolveDeployOutputPath.call(void 0, root, outputDir)
14870
14987
  };
14871
14988
  }
14872
14989
  async function buildWithProductionNodeEnv(inputConfig, options) {
@@ -14874,7 +14991,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
14874
14991
  const targetBaseline = createBuildTargetBaseline(config);
14875
14992
  let targets;
14876
14993
  const productionViteResultPromise = options.universal === false ? void 0 : Promise.allSettled([Promise.resolve(_nullishCoalesce(options.productionVite, () => ( _chunkMF3IA2AWcjs.loadFarmProductionVite.call(void 0, ))))]);
14877
- const pluginManager = new (0, _chunkCUZT7474cjs.PluginManager)({
14994
+ const pluginManager = new (0, _chunkTCMRLW3Kcjs.PluginManager)({
14878
14995
  config,
14879
14996
  isDev: false,
14880
14997
  isProd: true
@@ -14903,7 +15020,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
14903
15020
  };
14904
15021
  config = {
14905
15022
  ...config,
14906
- images: _chunkHVMQAVZKcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, {
15023
+ images: _chunkX4TSMQWFcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, {
14907
15024
  root: targets.root,
14908
15025
  preset: targets.preset
14909
15026
  })
@@ -14911,8 +15028,8 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
14911
15028
  if (_optionalChain([config, 'access', _353 => _353.docs, 'optionalAccess', _354 => _354.enabled])) await _chunkNDOE76QCcjs.loadFarmDocsEngine.call(void 0, );
14912
15029
  pluginManager.updateContext({ config });
14913
15030
  const { root, preset, srcDir, distDir, deployOutputDir } = targets;
14914
- _chunkODYKCC6Wcjs.usePackageClientBoundaryCacheFile.call(void 0, _chunkODYKCC6Wcjs.resolvePackageClientBoundaryCacheFile.call(void 0, root, distDir));
14915
- _chunkGC5ROI3Acjs.logger.info(`\u{1F69C} Building Farm.js application with preset: ${preset}...`);
15031
+ _chunkZVSQN7NCcjs.usePackageClientBoundaryCacheFile.call(void 0, _chunkZVSQN7NCcjs.resolvePackageClientBoundaryCacheFile.call(void 0, root, distDir));
15032
+ _chunk7U4XF76Rcjs.logger.info(`\u{1F69C} Building Farm.js application with preset: ${preset}...`);
14916
15033
  await pluginManager.setupPlugins();
14917
15034
  await pluginManager.runHookParallel("beforeBundle", {
14918
15035
  root,
@@ -14921,7 +15038,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
14921
15038
  distDir,
14922
15039
  outputDir: deployOutputDir
14923
15040
  });
14924
- _chunkGC5ROI3Acjs.logger.info("\u{1F50D} Discovering routes and API endpoints...");
15041
+ _chunk7U4XF76Rcjs.logger.info("\u{1F50D} Discovering routes and API endpoints...");
14925
15042
  const productionViteResult = productionViteResultPromise ? (await productionViteResultPromise)[0] : void 0;
14926
15043
  if (_optionalChain([productionViteResult, 'optionalAccess', _355 => _355.status]) === "rejected") throw productionViteResult.reason;
14927
15044
  const productionVite = _optionalChain([productionViteResult, 'optionalAccess', _356 => _356.value]);
@@ -14932,12 +15049,12 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
14932
15049
  root,
14933
15050
  rendererBuild.signal
14934
15051
  );
14935
- const farmApp = _chunkHVMQAVZKcjs.createFarmApp.call(void 0, config, projectModuleServer);
15052
+ const farmApp = _chunkX4TSMQWFcjs.createFarmApp.call(void 0, config, projectModuleServer);
14936
15053
  if (options.universal !== false) farmApp.getRouteManager().keepBuildSourceSnapshot();
14937
15054
  await farmApp.initialize();
14938
15055
  const routeManager = farmApp.getRouteManager();
14939
15056
  const serverRenderer = farmApp.getServerRenderer();
14940
- const typeArtifacts = _chunkBZJYPIFZcjs.generateFarmTypeArtifacts.call(void 0, {
15057
+ const typeArtifacts = _chunkSDICLSQUcjs.generateFarmTypeArtifacts.call(void 0, {
14941
15058
  root,
14942
15059
  srcDir,
14943
15060
  layers: config.layers,
@@ -14945,16 +15062,16 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
14945
15062
  plugins: config.plugins,
14946
15063
  extraRoutes: [
14947
15064
  ..._optionalChain([config, 'access', _357 => _357.openapi, 'optionalAccess', _358 => _358.enabled]) && config.openapi.route ? [config.openapi.route] : [],
14948
- ..._chunk6D3CJFNUcjs.getFarmDocsRouteTypeEntries.call(void 0, config.docs)
15065
+ ..._chunkHR5GU4UUcjs.getFarmDocsRouteTypeEntries.call(void 0, config.docs)
14949
15066
  ],
14950
15067
  suppressLintOnLink: config.suppressLintOnLink,
14951
15068
  componentExtensions: config.renderer.componentExtensions,
14952
15069
  i18nConfig: config.i18n
14953
15070
  }).catch((error) => {
14954
15071
  const message = error instanceof Error ? error.message : String(error);
14955
- _chunkGC5ROI3Acjs.logger.warn(`Route type generation failed (farm.d.ts may be stale): ${message}`);
15072
+ _chunk7U4XF76Rcjs.logger.warn(`Route type generation failed (farm.d.ts may be stale): ${message}`);
14956
15073
  });
14957
- const apiRouteManager = new (0, _chunk5DREJN4Gcjs.APIRouteManager)(
15074
+ const apiRouteManager = new (0, _chunkMQOHYV6Lcjs.APIRouteManager)(
14958
15075
  _chunkQMR2TUVZcjs.getFarmAppDirectories.call(void 0, config),
14959
15076
  projectModuleServer,
14960
15077
  {
@@ -14980,11 +15097,11 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
14980
15097
  });
14981
15098
  } else {
14982
15099
  const { build: legacyViteBuild } = await import("vite");
14983
- _chunkGC5ROI3Acjs.logger.info("\u{1F4E6} Building client bundle...");
15100
+ _chunk7U4XF76Rcjs.logger.info("\u{1F4E6} Building client bundle...");
14984
15101
  await buildClient2(legacyViteBuild, config, root, srcDir, _path2.default.join(root, distDir, "client"));
14985
- _chunkGC5ROI3Acjs.logger.info("\u{1F4E6} Building SSR bundle...");
15102
+ _chunk7U4XF76Rcjs.logger.info("\u{1F4E6} Building SSR bundle...");
14986
15103
  await buildSSR(legacyViteBuild, config, root, srcDir, _path2.default.join(root, distDir, "server"));
14987
- _chunkGC5ROI3Acjs.logger.info(`\u{1F680} Building server with Nitro (preset: ${preset})...`);
15104
+ _chunk7U4XF76Rcjs.logger.info(`\u{1F680} Building server with Nitro (preset: ${preset})...`);
14988
15105
  await buildNitro(
14989
15106
  config,
14990
15107
  routeManager,
@@ -15005,8 +15122,8 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
15005
15122
  outputDir: deployOutputDir,
15006
15123
  success: true
15007
15124
  });
15008
- _chunkGC5ROI3Acjs.logger.success(`\u2705 Build completed successfully! (preset: ${preset})`);
15009
- _chunkGC5ROI3Acjs.logger.info(`\u{1F4C1} Output directory: ${deployOutputDir}`);
15125
+ _chunk7U4XF76Rcjs.logger.success(`\u2705 Build completed successfully! (preset: ${preset})`);
15126
+ _chunk7U4XF76Rcjs.logger.info(`\u{1F4C1} Output directory: ${deployOutputDir}`);
15010
15127
  } catch (error) {
15011
15128
  const { root, preset, distDir, deployOutputDir } = _nullishCoalesce(targets, () => ( resolveBuildTargets(config, options, targetBaseline)));
15012
15129
  await pluginManager.runHookParallel("onError", {
@@ -15025,7 +15142,7 @@ async function buildWithProductionNodeEnv(inputConfig, options) {
15025
15142
  outputDir: deployOutputDir,
15026
15143
  success: false
15027
15144
  });
15028
- _chunkGC5ROI3Acjs.logger.error(`\u274C Build failed: ${error}`);
15145
+ _chunk7U4XF76Rcjs.logger.error(`\u274C Build failed: ${error}`);
15029
15146
  throw error;
15030
15147
  } finally {
15031
15148
  try {
@@ -15041,7 +15158,7 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
15041
15158
  ssr: true,
15042
15159
  buildLifetime
15043
15160
  });
15044
- const viteConfig = _chunkHVMQAVZKcjs.mergeFarmViteConfig.call(void 0,
15161
+ const viteConfig = _chunkX4TSMQWFcjs.mergeFarmViteConfig.call(void 0,
15045
15162
  {
15046
15163
  root,
15047
15164
  appType: "custom",
@@ -15053,12 +15170,12 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
15053
15170
  },
15054
15171
  plugins: [
15055
15172
  ...rendererVitePlugins,
15056
- _chunkHVMQAVZKcjs.farmFontImportsPlugin.call(void 0, {
15173
+ _chunkX4TSMQWFcjs.farmFontImportsPlugin.call(void 0, {
15057
15174
  root,
15058
15175
  basePath: config.basePath,
15059
15176
  publicDir: config.publicDir
15060
15177
  }),
15061
- _chunkODYKCC6Wcjs.farmEnvironmentFunctionsPlugin.call(void 0, ),
15178
+ _chunkZVSQN7NCcjs.farmEnvironmentFunctionsPlugin.call(void 0, { renderer: config.renderer }),
15062
15179
  // Route modules load here at build time (rendering config, prerendering): `server-only`
15063
15180
  // resolves as it does in the server build. Module-entry packages load pre-bundled, as in
15064
15181
  // `farm dev`: unbundled, lucide-react alone is ~1,750 modules through the module runner,
@@ -15073,7 +15190,7 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
15073
15190
  hmr: false
15074
15191
  },
15075
15192
  resolve: {
15076
- alias: _chunkHVMQAVZKcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
15193
+ alias: _chunkX4TSMQWFcjs.createFarmSourceAlias.call(void 0, root, config.srcDir),
15077
15194
  dedupe: [...config.renderer.dedupe || []]
15078
15195
  },
15079
15196
  optimizeDeps: {
@@ -15128,7 +15245,7 @@ async function buildClient2(viteBuild, config, root, srcDir, outputDir) {
15128
15245
  farmPlugin,
15129
15246
  farmServerOnlyEntriesPlugin
15130
15247
  } = await import("./vite.cjs");
15131
- const { PluginManager: PluginManager2 } = await import("./plugin-AGEFSU7K.cjs");
15248
+ const { PluginManager: PluginManager2 } = await import("./plugin-LN3JBZRR.cjs");
15132
15249
  const pluginManager = new PluginManager2({
15133
15250
  config,
15134
15251
  isDev: false,
@@ -15149,14 +15266,14 @@ async function buildClient2(viteBuild, config, root, srcDir, outputDir) {
15149
15266
  farmServerOnlyEntriesPlugin({ distDir: config.distDir || ".farm" }),
15150
15267
  farmIslandContainersPlugin(config),
15151
15268
  farmPlugin(config, pluginManager),
15152
- _chunkODYKCC6Wcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
15269
+ _chunkZVSQN7NCcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
15153
15270
  ],
15154
15271
  mode: "production"
15155
15272
  });
15156
15273
  }
15157
15274
  async function buildSSR(viteBuild, config, root, srcDir, outputDir) {
15158
15275
  const { farmI18nClientBridgePlugin, farmIslandContainersPlugin, farmPlugin } = await import("./vite.cjs");
15159
- const { PluginManager: PluginManager2 } = await import("./plugin-AGEFSU7K.cjs");
15276
+ const { PluginManager: PluginManager2 } = await import("./plugin-LN3JBZRR.cjs");
15160
15277
  const pluginManager = new PluginManager2({
15161
15278
  config,
15162
15279
  isDev: false,
@@ -15183,7 +15300,7 @@ async function buildSSR(viteBuild, config, root, srcDir, outputDir) {
15183
15300
  farmI18nClientBridgePlugin(),
15184
15301
  farmIslandContainersPlugin(config),
15185
15302
  farmPlugin(config, pluginManager),
15186
- _chunkODYKCC6Wcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
15303
+ _chunkZVSQN7NCcjs.farmEnvironmentFunctionsPlugin.call(void 0, config)
15187
15304
  ],
15188
15305
  mode: "production"
15189
15306
  });
@@ -15198,7 +15315,7 @@ function resolveLegacyPageEntry(config, root, srcDir) {
15198
15315
  }
15199
15316
  async function buildNitro(config, routeManager, apiRouteManager, serverRenderer, preset, root, distDir, pluginManager) {
15200
15317
  const [{ createNitroConfig }, { createNitro, build: nitroBuild }] = await Promise.all([
15201
- import("./nitro-NUCTYEKJ.cjs"),
15318
+ import("./nitro-6UOJXJZ6.cjs"),
15202
15319
  import("nitro/builder")
15203
15320
  ]);
15204
15321
  let nitroConfig = await createNitroConfig(
@@ -15211,7 +15328,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
15211
15328
  if (pluginManager) {
15212
15329
  nitroConfig = await pluginManager.runHookSerial("beforeNitroBuild", nitroConfig);
15213
15330
  }
15214
- const outputDir = _chunkF7PKUP6Pcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
15331
+ const outputDir = _chunkLVGB5PYKcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir);
15215
15332
  const serverOutputDir = _path2.default.join(outputDir, "server");
15216
15333
  const publicOutputDir = _path2.default.join(outputDir, "public");
15217
15334
  const { mkdir, cp } = await import("fs/promises");
@@ -15221,7 +15338,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
15221
15338
  try {
15222
15339
  await mkdir(publicOutputDir, { recursive: true });
15223
15340
  await cp(clientDir, publicOutputDir, { recursive: true });
15224
- _chunkGC5ROI3Acjs.logger.info("\u{1F4E6} Copied client assets to public directory");
15341
+ _chunk7U4XF76Rcjs.logger.info("\u{1F4E6} Copied client assets to public directory");
15225
15342
  const manifestPath = _path2.default.join(publicOutputDir, "farm-client-manifest.json");
15226
15343
  const assetsDir = _path2.default.join(publicOutputDir, "assets");
15227
15344
  const manifestExists = await import("fs/promises").then(
@@ -15231,12 +15348,12 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
15231
15348
  (fs5) => fs5.access(assetsDir).then(() => true).catch(() => false)
15232
15349
  );
15233
15350
  if (manifestExists && assetsExist) {
15234
- _chunkGC5ROI3Acjs.logger.info("\u2705 Verified client assets are present");
15351
+ _chunk7U4XF76Rcjs.logger.info("\u2705 Verified client assets are present");
15235
15352
  } else {
15236
- _chunkGC5ROI3Acjs.logger.warn("\u26A0\uFE0F Some client assets may be missing");
15353
+ _chunk7U4XF76Rcjs.logger.warn("\u26A0\uFE0F Some client assets may be missing");
15237
15354
  }
15238
15355
  } catch (error) {
15239
- _chunkGC5ROI3Acjs.logger.error(`\u274C Failed to copy client assets: ${error}`);
15356
+ _chunk7U4XF76Rcjs.logger.error(`\u274C Failed to copy client assets: ${error}`);
15240
15357
  throw error;
15241
15358
  }
15242
15359
  const serverDir = _path2.default.join(root, distDir, "server");
@@ -15244,9 +15361,9 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
15244
15361
  try {
15245
15362
  await mkdir(nitroServerDir, { recursive: true });
15246
15363
  await cp(serverDir, nitroServerDir, { recursive: true });
15247
- _chunkGC5ROI3Acjs.logger.info("\u{1F4E6} Copied SSR bundles to Nitro server directory");
15364
+ _chunk7U4XF76Rcjs.logger.info("\u{1F4E6} Copied SSR bundles to Nitro server directory");
15248
15365
  } catch (error) {
15249
- _chunkGC5ROI3Acjs.logger.warn(`Could not copy SSR bundles: ${error}`);
15366
+ _chunk7U4XF76Rcjs.logger.warn(`Could not copy SSR bundles: ${error}`);
15250
15367
  }
15251
15368
  const nitro = await createNitro(nitroConfig);
15252
15369
  const registryPath = _path2.default.join(root, distDir, ".nitro", "server", "farm-registry.ts");
@@ -15274,7 +15391,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
15274
15391
  farmRegistry.clientManifest = {};
15275
15392
  }
15276
15393
  } catch (error) {
15277
- _chunkGC5ROI3Acjs.logger.warn(`Could not populate registry: ${error}`);
15394
+ _chunk7U4XF76Rcjs.logger.warn(`Could not populate registry: ${error}`);
15278
15395
  }
15279
15396
  await nitroBuild(nitro);
15280
15397
  if (pluginManager) {
@@ -15282,7 +15399,7 @@ async function buildNitro(config, routeManager, apiRouteManager, serverRenderer,
15282
15399
  root,
15283
15400
  preset,
15284
15401
  distDir,
15285
- outputDir: _chunkF7PKUP6Pcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir)
15402
+ outputDir: _chunkLVGB5PYKcjs.resolveDeployOutputPath.call(void 0, root, config.deploy.outputDir)
15286
15403
  });
15287
15404
  }
15288
15405
  }