@farm.js/core 0.1.81 → 0.1.83

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 (290) hide show
  1. package/dist/{agent-mcp.d-Cxi3214_.d.ts → agent-mcp.d-7uKdOttc.d.ts} +1 -1
  2. package/dist/{agent-mcp.d-DMqOqnOA.d.mts → agent-mcp.d-LChlR2au.d.mts} +1 -1
  3. package/dist/agent-runtime.cjs +4 -3
  4. package/dist/agent-runtime.d.mts +2 -1
  5. package/dist/agent-runtime.d.ts +2 -1
  6. package/dist/agent-runtime.mjs +3 -2
  7. package/dist/analyzer-WGH6J2HN.cjs +17 -0
  8. package/dist/{analyzer-IC66UJCU.mjs → analyzer-Y6IY26HI.mjs} +2 -2
  9. package/dist/api/node.cjs +5 -4
  10. package/dist/api/node.d.mts +4 -3
  11. package/dist/api/node.d.ts +4 -3
  12. package/dist/api/node.mjs +4 -3
  13. package/dist/api/route-manager.cjs +5 -4
  14. package/dist/api/route-manager.d.mts +4 -3
  15. package/dist/api/route-manager.d.ts +4 -3
  16. package/dist/api/route-manager.mjs +4 -3
  17. package/dist/api/runtime.cjs +4 -3
  18. package/dist/api/runtime.d.mts +3 -2
  19. package/dist/api/runtime.d.ts +3 -2
  20. package/dist/api/runtime.mjs +3 -2
  21. package/dist/api.cjs +7 -6
  22. package/dist/api.d.mts +5 -4
  23. package/dist/api.d.ts +5 -4
  24. package/dist/api.mjs +6 -5
  25. package/dist/{app-manifest.d-C8Cswd31.d.ts → app-manifest.d-CRp21oAz.d.ts} +1 -1
  26. package/dist/{app-manifest.d-Bbxp5kes.d.mts → app-manifest.d-QMdmqqCr.d.mts} +1 -1
  27. package/dist/app-markdown.d.mts +3 -2
  28. package/dist/app-markdown.d.ts +3 -2
  29. package/dist/{app.d-DGIoFt5D.d.ts → app.d-CVPu_hoD.d.ts} +51 -4
  30. package/dist/{app.d-BJuSurgy.d.mts → app.d-eSm7jgoc.d.mts} +51 -4
  31. package/dist/{chunk-NSLRK5DK.cjs → chunk-3CZ4MJHW.cjs} +1 -1
  32. package/dist/{chunk-CPZZBCPO.cjs → chunk-3DAJXBSL.cjs} +2 -2
  33. package/dist/chunk-3DE6RK7K.cjs +36 -0
  34. package/dist/{chunk-XMHERKSE.mjs → chunk-42IBGQTN.mjs} +5 -12
  35. package/dist/{chunk-GY63XD6K.mjs → chunk-43N3X6OO.mjs} +1 -1
  36. package/dist/{chunk-MOGRRZMW.cjs → chunk-55UJGUBP.cjs} +35 -30
  37. package/dist/{chunk-BPWTSPK6.mjs → chunk-5AL2GXAU.mjs} +1 -1
  38. package/dist/{chunk-GAWSWJJ2.cjs → chunk-5GFTMTX3.cjs} +2 -2
  39. package/dist/{chunk-LKIG5SM6.cjs → chunk-5P65LXGU.cjs} +9 -9
  40. package/dist/{chunk-TPA2PV5J.mjs → chunk-5V6HSJFG.mjs} +24 -1
  41. package/dist/chunk-5X5GJU5A.cjs +426 -0
  42. package/dist/{chunk-UF4BNKKJ.mjs → chunk-6QYPP5KC.mjs} +2 -2
  43. package/dist/{chunk-ATISIC6G.mjs → chunk-7VJXYB6S.mjs} +7 -1
  44. package/dist/{chunk-OIWDEDUO.cjs → chunk-7X2CYE66.cjs} +419 -357
  45. package/dist/{chunk-XOGCNKB7.cjs → chunk-A5BHJHDF.cjs} +3 -3
  46. package/dist/{chunk-WGWWRV2M.cjs → chunk-B3HQTGXS.cjs} +6 -4
  47. package/dist/{chunk-HTNJ7A4D.mjs → chunk-B5SJYXJK.mjs} +177 -67
  48. package/dist/chunk-BUQR7KKO.mjs +17 -0
  49. package/dist/{chunk-OO4GVGM3.mjs → chunk-CA2HBLXP.mjs} +11 -1
  50. package/dist/{chunk-724WT3NI.mjs → chunk-CRE642TW.mjs} +1 -1
  51. package/dist/{chunk-Z5BANEQD.cjs → chunk-DMSXZNQR.cjs} +2 -2
  52. package/dist/{chunk-IPG6B25T.mjs → chunk-DPUZVGXH.mjs} +203 -54
  53. package/dist/{chunk-ZIYJWJV2.cjs → chunk-DZTWUEBB.cjs} +8 -8
  54. package/dist/{chunk-4OFWG4IK.cjs → chunk-EACD6ND7.cjs} +8 -2
  55. package/dist/{chunk-46UV2E7I.cjs → chunk-EFI6QWBQ.cjs} +200 -90
  56. package/dist/chunk-ELNRKD4V.mjs +426 -0
  57. package/dist/{chunk-XOXCQGAF.mjs → chunk-FFWSER54.mjs} +1 -1
  58. package/dist/chunk-FZ7OUN5M.cjs +30 -0
  59. package/dist/{chunk-5MMKNW7Q.cjs → chunk-H7REG7OX.cjs} +15 -8
  60. package/dist/{chunk-5ZHC6QGD.cjs → chunk-HQKCSJEH.cjs} +8 -2
  61. package/dist/{chunk-OUDNUFVR.cjs → chunk-HRH7OKBQ.cjs} +6 -4
  62. package/dist/{chunk-RHI67C2V.cjs → chunk-HUGPJFOC.cjs} +1 -35
  63. package/dist/{chunk-ADQ2LATR.cjs → chunk-IABI62FH.cjs} +2 -2
  64. package/dist/{chunk-TLSGRK7E.mjs → chunk-IAIRQAHA.mjs} +3 -1
  65. package/dist/{chunk-C2OLXVUC.mjs → chunk-IVP5Q4BX.mjs} +10 -3
  66. package/dist/{chunk-EX6ZSN5P.cjs → chunk-IZYFP7IN.cjs} +17 -24
  67. package/dist/chunk-J6RFB324.cjs +17 -0
  68. package/dist/{chunk-CL7BUGVB.cjs → chunk-JHRJ5V2F.cjs} +509 -360
  69. package/dist/{chunk-WIZRYFB2.cjs → chunk-JYQ6DGPW.cjs} +8 -6
  70. package/dist/{chunk-POL5RCVU.mjs → chunk-K3GHY7GY.mjs} +14 -9
  71. package/dist/{chunk-TYHWZOA2.mjs → chunk-KWI3SQFX.mjs} +4 -2
  72. package/dist/{chunk-UVV3I5QA.cjs → chunk-L2GUEYHR.cjs} +29 -6
  73. package/dist/{chunk-POVHO46S.mjs → chunk-L3RDECA5.mjs} +1 -1
  74. package/dist/{chunk-E3HBD2K3.cjs → chunk-LN6FAYNB.cjs} +36 -31
  75. package/dist/chunk-M6AJZ4XR.mjs +30 -0
  76. package/dist/{chunk-RPA45OQS.mjs → chunk-MO4UTDQ6.mjs} +1 -1
  77. package/dist/{chunk-6WVRVGKC.mjs → chunk-NAHDG6UX.mjs} +1 -1
  78. package/dist/{chunk-NOYKBGUK.mjs → chunk-NDWI6FDH.mjs} +558 -212
  79. package/dist/{chunk-OFVCWV2D.cjs → chunk-NEKO3HM2.cjs} +11 -1
  80. package/dist/{chunk-M6DAIE4T.cjs → chunk-NGTZHWBG.cjs} +78 -9
  81. package/dist/{chunk-D77OGI6X.mjs → chunk-NKVBWPXR.mjs} +1 -1
  82. package/dist/{chunk-SLEHAGGV.mjs → chunk-NQ3Y6E2T.mjs} +7 -1
  83. package/dist/{chunk-W6C3LEXX.cjs → chunk-OM6JIIJU.cjs} +155 -20
  84. package/dist/{chunk-S3IWDDQ3.mjs → chunk-ORBBAA7B.mjs} +1 -1
  85. package/dist/{chunk-7VCLTNED.mjs → chunk-PNMAD3OS.mjs} +1 -35
  86. package/dist/{chunk-BJWJP5A4.mjs → chunk-R3VLM2MW.mjs} +3 -3
  87. package/dist/{chunk-I4WZRG73.mjs → chunk-RB5IGN3N.mjs} +13 -6
  88. package/dist/{chunk-2HMSSPCZ.mjs → chunk-RGTZAM6Y.mjs} +71 -2
  89. package/dist/{chunk-IM3UINTZ.mjs → chunk-RNJX3MD6.mjs} +151 -16
  90. package/dist/{chunk-EJCVG25Z.mjs → chunk-S3R4JDRO.mjs} +17 -9
  91. package/dist/{chunk-2Y2HRZQY.cjs → chunk-SLIXHUMS.cjs} +931 -585
  92. package/dist/{chunk-WFVSAT7Y.cjs → chunk-T7HGXF7D.cjs} +3 -3
  93. package/dist/{chunk-ZKNXCRUQ.cjs → chunk-U54REWMJ.cjs} +23 -23
  94. package/dist/{chunk-YH7ENV3K.mjs → chunk-U56Z3755.mjs} +13 -8
  95. package/dist/chunk-U6XYBTUT.mjs +36 -0
  96. package/dist/{chunk-TCMRLW3K.cjs → chunk-VACYUMXW.cjs} +10 -3
  97. package/dist/{chunk-RZ6XUEQS.mjs → chunk-VQ6IXALL.mjs} +2 -2
  98. package/dist/{chunk-UGLTOLTJ.cjs → chunk-W76C7TCW.cjs} +2 -2
  99. package/dist/{chunk-FYZD7DUS.cjs → chunk-WCSBYQOT.cjs} +4 -4
  100. package/dist/{chunk-5N526T7Q.mjs → chunk-WZV2G2A6.mjs} +95 -33
  101. package/dist/{chunk-SM2SYWAR.cjs → chunk-XJDB564A.cjs} +18 -10
  102. package/dist/{chunk-6JWXHPVR.mjs → chunk-XRSNW4IU.mjs} +4 -2
  103. package/dist/{cli-runtime.d-D8O1v2_X.d.mts → cli-runtime.d-C7aMfoTq.d.mts} +8 -6
  104. package/dist/{cli-runtime.d-hf4L1MNP.d.ts → cli-runtime.d-DaElKjaL.d.ts} +8 -6
  105. package/dist/{client-component.d-DFwUHlOz.d.mts → client-component.d-DLMCzmUx.d.mts} +1 -1
  106. package/dist/{client-component.d-CX8UCQh-.d.ts → client-component.d-DLknFP8l.d.ts} +1 -1
  107. package/dist/{client-plugins.d-qWp8hNwd.d.ts → client-plugins.d-BVXjyIkY.d.ts} +20 -1
  108. package/dist/{client-plugins.d-BflSNO-b.d.mts → client-plugins.d-BwKwuO_0.d.mts} +20 -1
  109. package/dist/client-plugins.d.mts +2 -1
  110. package/dist/client-plugins.d.ts +2 -1
  111. package/dist/client.cjs +4 -3
  112. package/dist/client.d.mts +10 -9
  113. package/dist/client.d.ts +10 -9
  114. package/dist/client.mjs +3 -2
  115. package/dist/config.d.mts +2 -1
  116. package/dist/config.d.ts +2 -1
  117. package/dist/cron.cjs +2 -2
  118. package/dist/cron.mjs +1 -1
  119. package/dist/desktop.d.mts +3 -2
  120. package/dist/desktop.d.ts +3 -2
  121. package/dist/{devtools-XJHODO5H.mjs → devtools-OI52TCSD.mjs} +8 -7
  122. package/dist/{devtools-EI5N366Z.cjs → devtools-ZM2AR36W.cjs} +11 -10
  123. package/dist/docs.cjs +13 -11
  124. package/dist/docs.d.mts +15 -6
  125. package/dist/docs.d.ts +15 -6
  126. package/dist/docs.mjs +12 -10
  127. package/dist/environment/vite.cjs +4 -4
  128. package/dist/environment/vite.d.mts +1 -0
  129. package/dist/environment/vite.d.ts +1 -0
  130. package/dist/environment/vite.mjs +3 -3
  131. package/dist/{generate-route-types.d-CaGMIaNI.d.mts → generate-route-types.d-BFOMM8Ef.d.mts} +3 -0
  132. package/dist/{generate-route-types.d-B76M5R11.d.ts → generate-route-types.d-C2m8myHb.d.ts} +3 -0
  133. package/dist/{handler.d-DoH5Krkq.d.mts → handler.d-BKTWzzNA.d.mts} +1 -1
  134. package/dist/{handler.d-C2oRihfa.d.ts → handler.d-Dzpyg3-N.d.ts} +1 -1
  135. package/dist/{headers.d-BrX53wFQ.d.mts → headers.d-5opjyhXw.d.mts} +1 -1
  136. package/dist/{headers.d-Dj0mfYpb.d.ts → headers.d-PZyXcDAH.d.ts} +1 -1
  137. package/dist/index.cjs +38 -35
  138. package/dist/{index.d-DzDHOttz.d.mts → index.d-C0Mie66f.d.mts} +1 -1
  139. package/dist/{index.d-Dhc2scRl.d.ts → index.d-DV2q-0mE.d.ts} +1 -1
  140. package/dist/index.d.mts +26 -25
  141. package/dist/index.d.ts +26 -25
  142. package/dist/index.mjs +38 -35
  143. package/dist/integrations/orm.d.mts +2 -1
  144. package/dist/integrations/orm.d.ts +2 -1
  145. package/dist/integrations.cjs +4 -3
  146. package/dist/integrations.d.mts +2 -1
  147. package/dist/integrations.d.ts +2 -1
  148. package/dist/integrations.mjs +3 -2
  149. package/dist/internal/app-markdown-runtime.d.mts +3 -2
  150. package/dist/internal/app-markdown-runtime.d.ts +3 -2
  151. package/dist/internal/build-runtime.cjs +31 -30
  152. package/dist/internal/build-runtime.d.mts +5 -4
  153. package/dist/internal/build-runtime.d.ts +5 -4
  154. package/dist/internal/build-runtime.mjs +30 -29
  155. package/dist/internal/cli-runtime.cjs +12 -11
  156. package/dist/internal/cli-runtime.d.mts +8 -7
  157. package/dist/internal/cli-runtime.d.ts +8 -7
  158. package/dist/internal/cli-runtime.mjs +11 -10
  159. package/dist/internal/client-error-overlay.cjs +4 -4
  160. package/dist/internal/client-error-overlay.mjs +1 -1
  161. package/dist/internal/client-runtime.d.mts +5 -5
  162. package/dist/internal/client-runtime.d.ts +5 -5
  163. package/dist/internal/compression-runtime.d.mts +2 -1
  164. package/dist/internal/compression-runtime.d.ts +2 -1
  165. package/dist/internal/config-runtime.cjs +10 -9
  166. package/dist/internal/config-runtime.d.mts +6 -5
  167. package/dist/internal/config-runtime.d.ts +6 -5
  168. package/dist/internal/config-runtime.mjs +9 -8
  169. package/dist/internal/infra-analytics-runtime.cjs +8 -6
  170. package/dist/internal/infra-analytics-runtime.d.mts +8 -2
  171. package/dist/internal/infra-analytics-runtime.d.ts +8 -2
  172. package/dist/internal/infra-analytics-runtime.mjs +8 -6
  173. package/dist/internal/islands-action-client.cjs +18 -0
  174. package/dist/internal/islands-action-client.d.mts +18 -0
  175. package/dist/internal/islands-action-client.d.ts +18 -0
  176. package/dist/internal/islands-action-client.mjs +18 -0
  177. package/dist/internal/islands-boot.cjs +54 -20
  178. package/dist/internal/islands-boot.d.mts +5 -3
  179. package/dist/internal/islands-boot.d.ts +5 -3
  180. package/dist/internal/islands-boot.mjs +49 -15
  181. package/dist/internal/islands-runtime.cjs +3 -8
  182. package/dist/internal/islands-runtime.mjs +4 -9
  183. package/dist/internal/islx-actions-client.cjs +4 -3
  184. package/dist/internal/islx-actions-client.mjs +3 -2
  185. package/dist/internal/islx-actions-server.d.mts +0 -2
  186. package/dist/internal/islx-actions-server.d.ts +0 -2
  187. package/dist/internal/islx-client.cjs +13 -1
  188. package/dist/internal/islx-client.d.mts +11 -0
  189. package/dist/internal/islx-client.d.ts +11 -0
  190. package/dist/internal/islx-client.mjs +14 -0
  191. package/dist/internal/metadata-image-runtime.d.mts +1 -0
  192. package/dist/internal/metadata-image-runtime.d.ts +1 -0
  193. package/dist/internal/native-server-fns.cjs +4 -4
  194. package/dist/internal/native-server-fns.mjs +3 -3
  195. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  196. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  197. package/dist/internal/production-runtime.cjs +12 -7
  198. package/dist/internal/production-runtime.d.mts +14 -12
  199. package/dist/internal/production-runtime.d.ts +14 -12
  200. package/dist/internal/production-runtime.mjs +11 -6
  201. package/dist/internal/spa-router.d.mts +3 -3
  202. package/dist/internal/spa-router.d.ts +3 -3
  203. package/dist/internal/start-manifest.d.mts +2 -1
  204. package/dist/internal/start-manifest.d.ts +2 -1
  205. package/dist/markdown.d.mts +2 -1
  206. package/dist/markdown.d.ts +2 -1
  207. package/dist/middleware.d.mts +2 -1
  208. package/dist/middleware.d.ts +2 -1
  209. package/dist/mobile.d.mts +6 -3
  210. package/dist/mobile.d.ts +6 -3
  211. package/dist/{mount.d-DOaeUoWq.d.mts → mount.d-CZ_qL1iS.d.mts} +1 -1
  212. package/dist/{mount.d-DwXjaOHY.d.ts → mount.d-gWul1GA1.d.ts} +1 -1
  213. package/dist/{navigation-delegate.d-BElGUMgt.d.mts → navigation-delegate.d-BBTzhJLj.d.mts} +1 -1
  214. package/dist/{navigation-delegate.d-o3pPd9VI.d.ts → navigation-delegate.d-BZsYEAet.d.ts} +1 -1
  215. package/dist/navigation.d.mts +5 -5
  216. package/dist/navigation.d.ts +5 -5
  217. package/dist/{nitro-YLTGVGK4.mjs → nitro-FK3SZM4H.mjs} +1 -1
  218. package/dist/{nitro-XGIO6EQN.cjs → nitro-YDFMH5PY.cjs} +4 -4
  219. package/dist/{plugin-LN3JBZRR.cjs → plugin-3PT7I26P.cjs} +2 -2
  220. package/dist/{plugin-33I3V42N.mjs → plugin-QOTAPTVV.mjs} +1 -1
  221. package/dist/plugin.cjs +25 -23
  222. package/dist/plugin.d.mts +6 -6
  223. package/dist/plugin.d.ts +6 -6
  224. package/dist/plugin.mjs +24 -22
  225. package/dist/{render-plan.d-BD06tqFA.d.ts → render-plan.d-AaJsYPX-.d.ts} +1 -1
  226. package/dist/{render-plan.d-xWCRAJeR.d.mts → render-plan.d-bnWxS12w.d.mts} +1 -1
  227. package/dist/renderer-client.cjs +54 -10
  228. package/dist/renderer-client.d.mts +8 -7
  229. package/dist/renderer-client.d.ts +8 -7
  230. package/dist/renderer-client.mjs +50 -6
  231. package/dist/renderer.cjs +6 -2
  232. package/dist/renderer.d.mts +97 -4
  233. package/dist/renderer.d.ts +97 -4
  234. package/dist/renderer.mjs +5 -1
  235. package/dist/{request.d-Dx82V8bz.d.mts → request.d-C2HOn3Hi.d.mts} +1 -1
  236. package/dist/{request.d-DUMuWxSN.d.ts → request.d-CAeitOG1.d.ts} +1 -1
  237. package/dist/request.d.mts +3 -2
  238. package/dist/request.d.ts +3 -2
  239. package/dist/{route-rendering.d-BwBVpLtD.d.ts → route-rendering.d-A1dIkUK5.d.ts} +1 -1
  240. package/dist/{route-rendering.d-DJh6GauM.d.mts → route-rendering.d-CYA-ulnX.d.mts} +1 -1
  241. package/dist/{router.d-BtkKDxUB.d.mts → router.d-8lxnzlkr.d.mts} +1 -1
  242. package/dist/{router.d-CJBSG5jr.d.ts → router.d-A_Yt6jYz.d.ts} +1 -1
  243. package/dist/{routes.d-CCccJRrp.d.mts → routes.d-BWvpUoYu.d.mts} +1 -1
  244. package/dist/{routes.d-b7khoRoU.d.ts → routes.d-D7RWvfqL.d.ts} +1 -1
  245. package/dist/routes.d.mts +2 -1
  246. package/dist/routes.d.ts +2 -1
  247. package/dist/{rsc-pipeline-H5AXQA7A.cjs → rsc-pipeline-MFJZGDPE.cjs} +11 -10
  248. package/dist/{rsc-pipeline-GD6KLOIG.mjs → rsc-pipeline-TRZVFCBX.mjs} +10 -9
  249. package/dist/{runtime-YWQVBC3V.cjs → runtime-MJUG2HGR.cjs} +15 -13
  250. package/dist/{runtime-OJ7FXFUI.mjs → runtime-O4Y3Z6V3.mjs} +11 -9
  251. package/dist/{runtime.d-BQnD0cfC.d.ts → runtime.d-BPyvWrgQ.d.ts} +1 -1
  252. package/dist/{runtime.d-C4SuZXf6.d.mts → runtime.d-C_rZ9_DD.d.mts} +1 -1
  253. package/dist/{server-components-status.d-9rH7ZoEq.d.mts → server-components-status.d-BpxiEMQE.d.mts} +1 -1
  254. package/dist/{server-components-status.d-rfKOcE0N.d.ts → server-components-status.d-C2UEKJn7.d.ts} +1 -1
  255. package/dist/server-plugins.d.mts +4 -3
  256. package/dist/server-plugins.d.ts +4 -3
  257. package/dist/server-query-call.d-rVM_lsYk.d.mts +15 -0
  258. package/dist/server-query-call.d-rVM_lsYk.d.ts +15 -0
  259. package/dist/server-query-client.cjs +5 -3
  260. package/dist/server-query-client.d.mts +3 -2
  261. package/dist/server-query-client.d.ts +3 -2
  262. package/dist/server-query-client.mjs +5 -3
  263. package/dist/{server-query-runtime.d-DXRNhX_3.d.ts → server-query-runtime.d-BlHd90D0.d.ts} +2 -8
  264. package/dist/{server-query-runtime.d-aP52iuL5.d.mts → server-query-runtime.d-CCLGkQtE.d.mts} +2 -8
  265. package/dist/server.cjs +58 -52
  266. package/dist/server.d.mts +12 -12
  267. package/dist/server.d.ts +12 -12
  268. package/dist/server.mjs +34 -28
  269. package/dist/{spa-router.d-V6XLSTCy.d.mts → spa-router.d-BD-6WX1R.d.mts} +2 -2
  270. package/dist/{spa-router.d-DMKiBsHH.d.ts → spa-router.d-Cw5i_15e.d.ts} +2 -2
  271. package/dist/{ssg.d-MNedvvMB.d.ts → ssg.d-Bifiq0EL.d.ts} +2 -2
  272. package/dist/{ssg.d-BnCKPQL0.d.mts → ssg.d-CCE9aob5.d.mts} +2 -2
  273. package/dist/{store-core.d-Ad5biajo.d.ts → store-core.d-5tVn5vi1.d.ts} +12 -4
  274. package/dist/{store-core.d-BqJI1-ix.d.mts → store-core.d-BN2MxSG9.d.mts} +12 -4
  275. package/dist/testing.cjs +5 -4
  276. package/dist/testing.d.mts +2 -1
  277. package/dist/testing.d.ts +2 -1
  278. package/dist/testing.mjs +4 -3
  279. package/dist/{utils.d-BdjHKDuT.d.ts → utils.d-BUjpSNIO.d.ts} +1 -1
  280. package/dist/{utils.d-BEKLWa0Z.d.mts → utils.d-wGPLeVbq.d.mts} +1 -1
  281. package/dist/version.cjs +2 -2
  282. package/dist/version.mjs +1 -1
  283. package/dist/vite.cjs +25 -23
  284. package/dist/vite.d.mts +6 -6
  285. package/dist/vite.d.ts +6 -6
  286. package/dist/vite.mjs +24 -22
  287. package/package.json +7 -2
  288. package/dist/analyzer-435DCIQ6.cjs +0 -17
  289. package/dist/chunk-AHVF5GI2.cjs +0 -229
  290. package/dist/chunk-ONSZP5JK.mjs +0 -229
@@ -43,19 +43,19 @@ var _chunkRDADQG5Scjs = require('./chunk-RDADQG5S.cjs');
43
43
 
44
44
 
45
45
 
46
- var _chunkCL7BUGVBcjs = require('./chunk-CL7BUGVB.cjs');
46
+ var _chunkJHRJ5V2Fcjs = require('./chunk-JHRJ5V2F.cjs');
47
47
 
48
48
 
49
49
 
50
50
 
51
- var _chunkZ5BANEQDcjs = require('./chunk-Z5BANEQD.cjs');
51
+ var _chunkDMSXZNQRcjs = require('./chunk-DMSXZNQR.cjs');
52
52
 
53
53
 
54
- var _chunkTCMRLW3Kcjs = require('./chunk-TCMRLW3K.cjs');
54
+ var _chunkVACYUMXWcjs = require('./chunk-VACYUMXW.cjs');
55
55
 
56
56
 
57
57
 
58
- var _chunkOUDNUFVRcjs = require('./chunk-OUDNUFVR.cjs');
58
+ var _chunkHRH7OKBQcjs = require('./chunk-HRH7OKBQ.cjs');
59
59
 
60
60
 
61
61
  var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
@@ -67,12 +67,13 @@ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
67
67
 
68
68
 
69
69
 
70
- var _chunkOFVCWV2Dcjs = require('./chunk-OFVCWV2D.cjs');
70
+ var _chunkNEKO3HM2cjs = require('./chunk-NEKO3HM2.cjs');
71
71
 
72
72
 
73
73
  var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
74
74
 
75
75
 
76
+ var _chunkOM6JIIJUcjs = require('./chunk-OM6JIIJU.cjs');
76
77
 
77
78
 
78
79
 
@@ -85,13 +86,15 @@ var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
85
86
 
86
87
 
87
88
 
88
- var _chunkFYZD7DUScjs = require('./chunk-FYZD7DUS.cjs');
89
+
90
+
91
+ var _chunkWCSBYQOTcjs = require('./chunk-WCSBYQOT.cjs');
89
92
 
90
93
 
91
94
  var _chunkW53Z4WDIcjs = require('./chunk-W53Z4WDI.cjs');
92
95
 
93
96
 
94
- var _chunkADQ2LATRcjs = require('./chunk-ADQ2LATR.cjs');
97
+ var _chunkIABI62FHcjs = require('./chunk-IABI62FH.cjs');
95
98
 
96
99
 
97
100
 
@@ -142,18 +145,20 @@ var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
142
145
 
143
146
 
144
147
 
145
- var _chunk46UV2E7Icjs = require('./chunk-46UV2E7I.cjs');
148
+ var _chunkEFI6QWBQcjs = require('./chunk-EFI6QWBQ.cjs');
146
149
 
147
150
 
148
151
 
149
- var _chunkSM2SYWARcjs = require('./chunk-SM2SYWAR.cjs');
152
+ var _chunkXJDB564Acjs = require('./chunk-XJDB564A.cjs');
150
153
 
151
154
 
152
155
 
153
156
  var _chunkERMUL73Lcjs = require('./chunk-ERMUL73L.cjs');
154
157
 
155
158
 
156
- var _chunkUVV3I5QAcjs = require('./chunk-UVV3I5QA.cjs');
159
+
160
+
161
+ var _chunkL2GUEYHRcjs = require('./chunk-L2GUEYHR.cjs');
157
162
 
158
163
 
159
164
  var _chunkIIHZ2BEEcjs = require('./chunk-IIHZ2BEE.cjs');
@@ -166,7 +171,7 @@ var _chunkSTF6VDYQcjs = require('./chunk-STF6VDYQ.cjs');
166
171
 
167
172
 
168
173
 
169
- var _chunk4OFWG4IKcjs = require('./chunk-4OFWG4IK.cjs');
174
+ var _chunkEACD6ND7cjs = require('./chunk-EACD6ND7.cjs');
170
175
 
171
176
 
172
177
  var _chunkOLKYHTLNcjs = require('./chunk-OLKYHTLN.cjs');
@@ -187,13 +192,16 @@ var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
187
192
 
188
193
 
189
194
 
190
- var _chunkM6DAIE4Tcjs = require('./chunk-M6DAIE4T.cjs');
195
+ var _chunkNGTZHWBGcjs = require('./chunk-NGTZHWBG.cjs');
191
196
 
192
197
 
193
198
 
194
199
  var _chunkMCSRMEQVcjs = require('./chunk-MCSRMEQV.cjs');
195
200
 
196
201
 
202
+ var _chunkHQKCSJEHcjs = require('./chunk-HQKCSJEH.cjs');
203
+
204
+
197
205
  var _chunk3EIPOTZVcjs = require('./chunk-3EIPOTZV.cjs');
198
206
 
199
207
 
@@ -218,7 +226,7 @@ var _chunk2NOHVIJ3cjs = require('./chunk-2NOHVIJ3.cjs');
218
226
 
219
227
 
220
228
 
221
- var _chunkWGWWRV2Mcjs = require('./chunk-WGWWRV2M.cjs');
229
+ var _chunkB3HQTGXScjs = require('./chunk-B3HQTGXS.cjs');
222
230
 
223
231
 
224
232
 
@@ -241,7 +249,7 @@ var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
241
249
  var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
242
250
 
243
251
 
244
- var _chunkLKIG5SM6cjs = require('./chunk-LKIG5SM6.cjs');
252
+ var _chunk5P65LXGUcjs = require('./chunk-5P65LXGU.cjs');
245
253
 
246
254
 
247
255
  var _chunkSXXSQVKKcjs = require('./chunk-SXXSQVKK.cjs');
@@ -253,7 +261,7 @@ var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
253
261
 
254
262
 
255
263
 
256
- var _chunkWIZRYFB2cjs = require('./chunk-WIZRYFB2.cjs');
264
+ var _chunkJYQ6DGPWcjs = require('./chunk-JYQ6DGPW.cjs');
257
265
 
258
266
 
259
267
  var _chunkRKQOMG2Xcjs = require('./chunk-RKQOMG2X.cjs');
@@ -304,7 +312,7 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
304
312
  var _chunkPLJMEUANcjs = require('./chunk-PLJMEUAN.cjs');
305
313
 
306
314
 
307
- var _chunkNSLRK5DKcjs = require('./chunk-NSLRK5DK.cjs');
315
+ var _chunk3CZ4MJHWcjs = require('./chunk-3CZ4MJHW.cjs');
308
316
 
309
317
 
310
318
  var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
@@ -386,9 +394,8 @@ var _module = require('module');
386
394
  // src/dev-preview-guard.ts
387
395
  var _fs = require('fs'); var fs2 = _interopRequireWildcard(_fs); var fs = _interopRequireWildcard(_fs);
388
396
 
389
- var FARM_PREVIEW_REQUEST_HEADER = "x-farm-preview";
390
397
  function isFarmPreviewTunnelRequest(headers) {
391
- return headers[FARM_PREVIEW_REQUEST_HEADER] !== void 0;
398
+ return headers[_chunkHQKCSJEHcjs.FARM_PREVIEW_REQUEST_HEADER] !== void 0;
392
399
  }
393
400
  var VITE_DEFAULT_FS_DENY = [
394
401
  ".env",
@@ -706,7 +713,7 @@ function findClientServerFnViolation(code, id) {
706
713
  return null;
707
714
  }
708
715
  function createServerFnBoundaryDiagnostic(violation, id, location) {
709
- return _chunk46UV2E7Icjs.createFarmDiagnostic.call(void 0,
716
+ return _chunkEFI6QWBQcjs.createFarmDiagnostic.call(void 0,
710
717
  "CLIENT_SERVER_FUNCTION",
711
718
  id,
712
719
  `${violation.factory} handlers run only on the server, but this module is bundled into the client, so the handler and its Node-only imports would run in the browser.`,
@@ -965,21 +972,21 @@ function readPropertyKey(property) {
965
972
  function createClientBoundaryDiagnostic(file, finding, location) {
966
973
  switch (finding.kind) {
967
974
  case "server-env":
968
- return _chunk46UV2E7Icjs.createFarmDiagnostic.call(void 0,
975
+ return _chunkEFI6QWBQcjs.createFarmDiagnostic.call(void 0,
969
976
  "CLIENT_SERVER_ENV",
970
977
  file,
971
978
  `process.env.${finding.name} is read at module scope in a module compiled for the browser, where it is undefined.`,
972
979
  location
973
980
  );
974
981
  case "public-env":
975
- return _chunk46UV2E7Icjs.createFarmDiagnostic.call(void 0,
982
+ return _chunkEFI6QWBQcjs.createFarmDiagnostic.call(void 0,
976
983
  "CLIENT_PROCESS_ENV_PUBLIC",
977
984
  file,
978
985
  `process.env.${finding.name} is declared public, but process.env is not populated in the browser, so this module-scope read is undefined there.`,
979
986
  location
980
987
  );
981
988
  case "builtin":
982
- return _chunk46UV2E7Icjs.createFarmDiagnostic.call(void 0,
989
+ return _chunkEFI6QWBQcjs.createFarmDiagnostic.call(void 0,
983
990
  "CLIENT_NODE_BUILTIN",
984
991
  file,
985
992
  `"${finding.name}" is imported into a module compiled for the browser, which gets a stub whose exports without a Web API equivalent are undefined.`,
@@ -1235,8 +1242,8 @@ function farmLlmsTxtGeneratedPaths(config) {
1235
1242
  return llms.full ? ["/llms.txt", "/llms-full.txt"] : ["/llms.txt"];
1236
1243
  }
1237
1244
  function farmAgentGeneratedPaths(config) {
1238
- const crawlers = _chunk4OFWG4IKcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _64 => _64.agent, 'optionalAccess', _65 => _65.crawlers]));
1239
- const sitemap = _chunk4OFWG4IKcjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _66 => _66.agent, 'optionalAccess', _67 => _67.sitemap]));
1245
+ const crawlers = _chunkEACD6ND7cjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _64 => _64.agent, 'optionalAccess', _65 => _65.crawlers]));
1246
+ const sitemap = _chunkEACD6ND7cjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _66 => _66.agent, 'optionalAccess', _67 => _67.sitemap]));
1240
1247
  return [
1241
1248
  ...farmLlmsTxtGeneratedPaths(config),
1242
1249
  ...sitemap.enabled ? ["/sitemap.xml"] : [],
@@ -1281,7 +1288,7 @@ function loadFarmWorkflowsDevRuntime() {
1281
1288
  return import("./workflows.cjs");
1282
1289
  }
1283
1290
  function loadFarmDevtoolsSnapshotRuntime() {
1284
- return import("./devtools-EI5N366Z.cjs");
1291
+ return import("./devtools-ZM2AR36W.cjs");
1285
1292
  }
1286
1293
  function loadFarmDevtoolsUIRuntime() {
1287
1294
  return import("./devtools-ui-C2EMF2SO.cjs");
@@ -1306,7 +1313,7 @@ function farmI18nClientBridgePlugin() {
1306
1313
  };
1307
1314
  }
1308
1315
  function farmNavigationPlugin(renderer) {
1309
- const otherRenderer = !_chunkM6DAIE4Tcjs.isFarmRendererDisabled.call(void 0, renderer) && !_chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer || void 0) && _optionalChain([(renderer || void 0), 'optionalAccess', _69 => _69.name]) !== "preact";
1316
+ const otherRenderer = !_chunkNGTZHWBGcjs.isFarmRendererDisabled.call(void 0, renderer) && !_chunkNGTZHWBGcjs.isReactRenderer.call(void 0, renderer || void 0) && _optionalChain([(renderer || void 0), 'optionalAccess', _69 => _69.name]) !== "preact";
1310
1317
  return {
1311
1318
  name: "farm:navigation",
1312
1319
  config() {
@@ -1331,16 +1338,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
1331
1338
  var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
1332
1339
  var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
1333
1340
  var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
1334
- _chunkCL7BUGVBcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1335
- new RegExp(`^${_chunk46UV2E7Icjs.FARM_RESOLVE_FROM_PREFIX}`),
1341
+ _chunkJHRJ5V2Fcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1342
+ new RegExp(`^${_chunkEFI6QWBQcjs.FARM_RESOLVE_FROM_PREFIX}`),
1336
1343
  // What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
1337
1344
  // included.
1338
1345
  /^node:/,
1339
- _chunkCL7BUGVBcjs.exactIdPattern.call(void 0, _module.builtinModules)
1346
+ _chunkJHRJ5V2Fcjs.exactIdPattern.call(void 0, _module.builtinModules)
1340
1347
  ];
1341
1348
  var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
1342
- _chunkCL7BUGVBcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1343
- new RegExp(`^${_chunk46UV2E7Icjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1349
+ _chunkJHRJ5V2Fcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1350
+ new RegExp(`^${_chunkEFI6QWBQcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1344
1351
  ];
1345
1352
  function createFarmPlatformClientModule(platform) {
1346
1353
  return `export function platform() { return ${JSON.stringify(platform)}; }
@@ -1376,18 +1383,18 @@ function farmIslandContainersPlugin(config) {
1376
1383
  if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
1377
1384
  return null;
1378
1385
  }
1379
- if (_chunk46UV2E7Icjs.hasUseClientDirective.call(void 0, code)) return null;
1386
+ if (_chunkEFI6QWBQcjs.hasUseClientDirective.call(void 0, code)) return null;
1380
1387
  const file = id.split("?", 1)[0];
1381
- const bindings = _chunk46UV2E7Icjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1388
+ const bindings = _chunkEFI6QWBQcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1382
1389
  if (bindings.length === 0) return null;
1383
- const grown = _chunk46UV2E7Icjs.wrapFarmIslandContainers.call(void 0, {
1390
+ const grown = _chunkEFI6QWBQcjs.wrapFarmIslandContainers.call(void 0, {
1384
1391
  code,
1385
1392
  file,
1386
1393
  bindings,
1387
- reference: _chunk46UV2E7Icjs.farmIslandContainerReferencePath.call(void 0, root)
1394
+ reference: _chunkEFI6QWBQcjs.farmIslandContainerReferencePath.call(void 0, root)
1388
1395
  });
1389
1396
  if (grown === null) return null;
1390
- _chunk46UV2E7Icjs.ensureFarmIslandContainerReference.call(void 0, root);
1397
+ _chunkEFI6QWBQcjs.ensureFarmIslandContainerReference.call(void 0, root);
1391
1398
  return { code: grown, map: null };
1392
1399
  }
1393
1400
  };
@@ -1401,15 +1408,15 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1401
1408
  config(config) {
1402
1409
  const appRoot = path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())));
1403
1410
  if (options.distDir) {
1404
- _chunk46UV2E7Icjs.usePackageScanCacheFile.call(void 0,
1411
+ _chunkEFI6QWBQcjs.usePackageScanCacheFile.call(void 0,
1405
1412
  path6.resolve(appRoot, options.distDir, "cache", "package-scans.json")
1406
1413
  );
1407
1414
  }
1408
- const bundledPackages = _chunk46UV2E7Icjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1415
+ const bundledPackages = _chunkEFI6QWBQcjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1409
1416
  const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
1410
- _chunk46UV2E7Icjs.persistPackageScanCache.call(void 0, );
1417
+ _chunkEFI6QWBQcjs.persistPackageScanCache.call(void 0, );
1411
1418
  return {
1412
- optimizeDeps: { rolldownOptions: { plugins: [_chunk46UV2E7Icjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
1419
+ optimizeDeps: { rolldownOptions: { plugins: [_chunkEFI6QWBQcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
1413
1420
  ssr: {
1414
1421
  noExternal: [
1415
1422
  // Resolve `server-only` here rather than in Node, which would load its throwing build.
@@ -1433,8 +1440,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1433
1440
  return FARM_SERVER_ONLY_PACKAGE_ID;
1434
1441
  }
1435
1442
  this.error(
1436
- _chunk46UV2E7Icjs.formatFarmDiagnostic.call(void 0,
1437
- _chunk46UV2E7Icjs.createFarmDiagnostic.call(void 0,
1443
+ _chunkEFI6QWBQcjs.formatFarmDiagnostic.call(void 0,
1444
+ _chunkEFI6QWBQcjs.createFarmDiagnostic.call(void 0,
1438
1445
  "CLIENT_SERVER_ONLY_IMPORT",
1439
1446
  _nullishCoalesce(importer, () => ( "<unknown module>")),
1440
1447
  `${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
@@ -1444,9 +1451,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1444
1451
  );
1445
1452
  }
1446
1453
  if (!_optionalChain([options2, 'optionalAccess', _75 => _75.ssr]) && _module.isBuiltin.call(void 0, id)) {
1447
- return _chunk46UV2E7Icjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1454
+ return _chunkEFI6QWBQcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1448
1455
  }
1449
- const resolveFrom = importer ? _chunk46UV2E7Icjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1456
+ const resolveFrom = importer ? _chunkEFI6QWBQcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1450
1457
  if (resolveFrom) {
1451
1458
  const directory = path6.dirname(resolveFrom.importer);
1452
1459
  return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
@@ -1463,8 +1470,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1463
1470
  const importedBy = importer ? ` (imported by ${importer})` : "";
1464
1471
  if (!_optionalChain([options2, 'optionalAccess', _76 => _76.ssr])) {
1465
1472
  this.error(
1466
- _chunk46UV2E7Icjs.formatFarmDiagnostic.call(void 0,
1467
- _chunk46UV2E7Icjs.createFarmDiagnostic.call(void 0,
1473
+ _chunkEFI6QWBQcjs.formatFarmDiagnostic.call(void 0,
1474
+ _chunkEFI6QWBQcjs.createFarmDiagnostic.call(void 0,
1468
1475
  "CLIENT_SERVER_ONLY_ENTRY",
1469
1476
  _nullishCoalesce(importer, () => ( id)),
1470
1477
  `${id} is server-only and cannot be imported into client code.`
@@ -1489,7 +1496,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1489
1496
  if (id === FARM_PLATFORM_CLIENT_ID) {
1490
1497
  return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))));
1491
1498
  }
1492
- return _nullishCoalesce(_chunk46UV2E7Icjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1499
+ return _nullishCoalesce(_chunkEFI6QWBQcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1493
1500
  }
1494
1501
  }
1495
1502
  };
@@ -1522,7 +1529,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
1522
1529
  if (!snapshot) return "";
1523
1530
  const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
1524
1531
  if (snapshot.routing === "none") return runtime;
1525
- return `${_chunkOFVCWV2Dcjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1532
+ return `${_chunkNEKO3HM2cjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1526
1533
  }
1527
1534
  function getPublicEnvDefine(config) {
1528
1535
  const publicEnv = _optionalChain([config, 'access', _77 => _77.env, 'optionalAccess', _78 => _78.public]);
@@ -1569,7 +1576,7 @@ function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request)
1569
1576
  }
1570
1577
  res.statusCode = 500;
1571
1578
  res.setHeader("Content-Type", "application/json");
1572
- res.end(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
1579
+ res.end(_chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY);
1573
1580
  });
1574
1581
  };
1575
1582
  }
@@ -1577,10 +1584,10 @@ function sendFarmDevErrorJSON(res) {
1577
1584
  res.statusCode = 500;
1578
1585
  res.setHeader("Content-Type", "application/json");
1579
1586
  res.setHeader("Cache-Control", "private, no-store");
1580
- res.end(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
1587
+ res.end(_chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY);
1581
1588
  }
1582
1589
  function createFarmDevMiddlewareErrorResponse() {
1583
- return new Response(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY, {
1590
+ return new Response(_chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY, {
1584
1591
  status: 500,
1585
1592
  headers: { "Content-Type": "application/json", "Cache-Control": "private, no-store" }
1586
1593
  });
@@ -1592,10 +1599,10 @@ function setFarmDevRuntimeHookErrorHead(res, json) {
1592
1599
  }
1593
1600
  function sendFarmDevRuntimeHookError(res, json) {
1594
1601
  setFarmDevRuntimeHookErrorHead(res, json);
1595
- res.end(json ? _chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
1602
+ res.end(json ? _chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
1596
1603
  }
1597
1604
  function opensFarmDevRuntimeSession(pm) {
1598
- return pm.hasRuntimeRequestHooks() || _chunkZ5BANEQDcjs.hasFarmServerRuntimePlugins.call(void 0, pm.getPlugins());
1605
+ return pm.hasRuntimeRequestHooks() || _chunkDMSXZNQRcjs.hasFarmServerRuntimePlugins.call(void 0, pm.getPlugins());
1599
1606
  }
1600
1607
  var FARM_CONFIG_ROUTE_PLUGIN_NAMES = /* @__PURE__ */ new Set([
1601
1608
  _chunkH7OFZJCVcjs.FARM_CONFIG_HEADERS_PLUGIN_NAME,
@@ -1708,7 +1715,7 @@ function interceptFarmDevPageResponse(options) {
1708
1715
  res.end = originalEnd;
1709
1716
  res.writeHead = originalWriteHead;
1710
1717
  if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
1711
- delete res[_chunkTCMRLW3Kcjs.FARM_NODE_RESPONSE_END_PENDING];
1718
+ delete res[_chunkVACYUMXWcjs.FARM_NODE_RESPONSE_END_PENDING];
1712
1719
  };
1713
1720
  let runtimeHookFailed = false;
1714
1721
  const endRuntimeRequest = (response) => pm.endRuntimeRequest(runtimeSession, response).catch((error) => {
@@ -1722,7 +1729,7 @@ function interceptFarmDevPageResponse(options) {
1722
1729
  const writeRuntimeHookFailure = () => {
1723
1730
  setFarmDevRuntimeHookErrorHead(res, Boolean(options.jsonError));
1724
1731
  originalWriteHead(500);
1725
- originalWrite(options.jsonError ? _chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
1732
+ originalWrite(options.jsonError ? _chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
1726
1733
  };
1727
1734
  const htmlChunks = [];
1728
1735
  const responseChunks = [];
@@ -1832,7 +1839,7 @@ function interceptFarmDevPageResponse(options) {
1832
1839
  });
1833
1840
  res.end = ((...args) => {
1834
1841
  interceptedEnd = true;
1835
- res[_chunkTCMRLW3Kcjs.FARM_NODE_RESPONSE_END_PENDING] = true;
1842
+ res[_chunkVACYUMXWcjs.FARM_NODE_RESPONSE_END_PENDING] = true;
1836
1843
  if (afterResponseCalled) return res;
1837
1844
  afterResponseCalled = true;
1838
1845
  options.logResponse(method, urlPath, res.statusCode || 200, Date.now() - startTime, "PAGE");
@@ -1915,7 +1922,7 @@ function interceptFarmDevPageResponse(options) {
1915
1922
  res.end = originalEnd;
1916
1923
  res.writeHead = originalWriteHead;
1917
1924
  if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
1918
- delete res[_chunkTCMRLW3Kcjs.FARM_NODE_RESPONSE_END_PENDING];
1925
+ delete res[_chunkVACYUMXWcjs.FARM_NODE_RESPONSE_END_PENDING];
1919
1926
  originalEnd(...originalEndArgs);
1920
1927
  }).catch((error) => {
1921
1928
  reportFailure(error);
@@ -1932,14 +1939,14 @@ function interceptFarmDevPageResponse(options) {
1932
1939
  res.end = originalEnd;
1933
1940
  res.writeHead = originalWriteHead;
1934
1941
  if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
1935
- delete res[_chunkTCMRLW3Kcjs.FARM_NODE_RESPONSE_END_PENDING];
1942
+ delete res[_chunkVACYUMXWcjs.FARM_NODE_RESPONSE_END_PENDING];
1936
1943
  originalEnd(body, callback);
1937
1944
  } else {
1938
1945
  res.write = originalWrite;
1939
1946
  res.end = originalEnd;
1940
1947
  res.writeHead = originalWriteHead;
1941
1948
  if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
1942
- delete res[_chunkTCMRLW3Kcjs.FARM_NODE_RESPONSE_END_PENDING];
1949
+ delete res[_chunkVACYUMXWcjs.FARM_NODE_RESPONSE_END_PENDING];
1943
1950
  originalEnd(...originalEndArgs);
1944
1951
  }
1945
1952
  });
@@ -1970,7 +1977,7 @@ function getEnvDefines(config, configEnv) {
1970
1977
  _chunkMCSRMEQVcjs.getPublicFarmImageConfig.call(void 0,
1971
1978
  _chunkMCSRMEQVcjs.resolveFarmImageConfig.call(void 0,
1972
1979
  config.images,
1973
- _chunkM6DAIE4Tcjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
1980
+ _chunkNGTZHWBGcjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
1974
1981
  )
1975
1982
  )
1976
1983
  )
@@ -2103,7 +2110,7 @@ function transformIsolatedClientBoundaryModule(options) {
2103
2110
  return null;
2104
2111
  }
2105
2112
  const body = Array.isArray(ast.body) ? ast.body : [];
2106
- const everyExportIsComponent = options.code.includes(_chunk46UV2E7Icjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunk46UV2E7Icjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2113
+ const everyExportIsComponent = options.code.includes(_chunkEFI6QWBQcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkEFI6QWBQcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2107
2114
  const replacements = [];
2108
2115
  const wrapperStatements = [];
2109
2116
  const originalEntries = [];
@@ -2254,16 +2261,16 @@ async function warnClientBoundaryOnce(context, id, code, config) {
2254
2261
  for (const finding of analyzeClientBoundary(program, publicKeys)) {
2255
2262
  if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
2256
2263
  const resolved = await context.resolve(finding.name, id).catch(() => null);
2257
- if (!_optionalChain([resolved, 'optionalAccess', _103 => _103.id, 'access', _104 => _104.startsWith, 'call', _105 => _105(_chunk46UV2E7Icjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2264
+ if (!_optionalChain([resolved, 'optionalAccess', _103 => _103.id, 'access', _104 => _104.startsWith, 'call', _105 => _105(_chunkEFI6QWBQcjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2258
2265
  }
2259
2266
  findings.push(finding);
2260
2267
  }
2261
2268
  if (findings.length === 0) return;
2262
2269
  warnedClientBoundaryIds.add(id);
2263
- const locate = _chunk46UV2E7Icjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2270
+ const locate = _chunkEFI6QWBQcjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2264
2271
  _chunk7U4XF76Rcjs.logger.warn(
2265
2272
  findings.map(
2266
- (finding) => _chunk46UV2E7Icjs.formatFarmDiagnostic.call(void 0,
2273
+ (finding) => _chunkEFI6QWBQcjs.formatFarmDiagnostic.call(void 0,
2267
2274
  createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
2268
2275
  config.root
2269
2276
  )
@@ -2280,7 +2287,7 @@ function isFarmAppRuntimeFile(file, appDirs, routeModuleExtensions) {
2280
2287
  );
2281
2288
  }
2282
2289
  function shouldEmitFarmClientRootHmr(renderer) {
2283
- return _chunkM6DAIE4Tcjs.getFarmRendererCapabilities.call(void 0, _chunkM6DAIE4Tcjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
2290
+ return _chunkNGTZHWBGcjs.getFarmRendererCapabilities.call(void 0, _chunkNGTZHWBGcjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
2284
2291
  }
2285
2292
  var FARM_RUNTIME_MODULE_PREFIX = "/@farm/runtime/";
2286
2293
  function toFarmRuntimeModuleId(specifier) {
@@ -2311,9 +2318,9 @@ function hasFarmSourceAliasOverride(alias) {
2311
2318
  );
2312
2319
  }
2313
2320
  function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2314
- const rendererDisabled = _chunkM6DAIE4Tcjs.isFarmRendererDisabled.call(void 0, options.renderer);
2321
+ const rendererDisabled = _chunkNGTZHWBGcjs.isFarmRendererDisabled.call(void 0, options.renderer);
2315
2322
  const imageImports = farmImageImportsPlugin();
2316
- const fontImports = _chunkCL7BUGVBcjs.farmFontImportsPlugin.call(void 0, {
2323
+ const fontImports = _chunkJHRJ5V2Fcjs.farmFontImportsPlugin.call(void 0, {
2317
2324
  root: options.root,
2318
2325
  basePath: options.basePath,
2319
2326
  publicDir: options.publicDir
@@ -2347,8 +2354,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2347
2354
  if (mdxComponents) files.add(mdxComponents);
2348
2355
  return files;
2349
2356
  };
2350
- const islxActionsMode = () => _chunkCL7BUGVBcjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _111 => _111.getConfig, 'call', _112 => _112()]), () => ( options)));
2351
- const islandsServerFns = () => _chunkCL7BUGVBcjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _113 => _113.getConfig, 'call', _114 => _114()]), () => ( options)));
2357
+ const islxActionsMode = () => _chunkJHRJ5V2Fcjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _111 => _111.getConfig, 'call', _112 => _112()]), () => ( options)));
2358
+ const islandsServerFns = () => _chunkJHRJ5V2Fcjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _113 => _113.getConfig, 'call', _114 => _114()]), () => ( options)));
2352
2359
  let reactRefreshActive = false;
2353
2360
  let server;
2354
2361
  let deferredGates;
@@ -2391,11 +2398,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2391
2398
  isBuild = configEnv.command === "build";
2392
2399
  const farmAliases = {
2393
2400
  ..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, options.layers),
2394
- ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _124 => _124.resolve, 'optionalAccess', _125 => _125.alias])) ? {} : _chunkCL7BUGVBcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2401
+ ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _124 => _124.resolve, 'optionalAccess', _125 => _125.alias])) ? {} : _chunkJHRJ5V2Fcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2395
2402
  };
2396
2403
  if (Object.keys(farmAliases).length > 0) {
2397
2404
  _nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
2398
- userConfig.resolve.alias = _chunkCL7BUGVBcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2405
+ userConfig.resolve.alias = _chunkJHRJ5V2Fcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2399
2406
  }
2400
2407
  const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
2401
2408
  farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _126 => _126.server, 'optionalAccess', _127 => _127.cors]) === void 0;
@@ -2469,7 +2476,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2469
2476
  } catch (e21) {
2470
2477
  }
2471
2478
  };
2472
- farmApp = new (0, _chunkCL7BUGVBcjs.FarmApp)(
2479
+ farmApp = new (0, _chunkJHRJ5V2Fcjs.FarmApp)(
2473
2480
  {
2474
2481
  ...options,
2475
2482
  root: resolveDevelopmentRoot(options.root, server.config.root)
@@ -2477,7 +2484,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2477
2484
  server
2478
2485
  );
2479
2486
  farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
2480
- _chunk46UV2E7Icjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2487
+ _chunkEFI6QWBQcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2481
2488
  farmApp.getConfig().root,
2482
2489
  options.distDir || ".farm"
2483
2490
  )
@@ -2488,15 +2495,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2488
2495
  let farmAppPackages;
2489
2496
  if (_optionalChain([farmConfig, 'access', _149 => _149.agent, 'optionalAccess', _150 => _150.noindexPreviews])) {
2490
2497
  farmMiddlewares.use((_req, res, next) => {
2491
- if (_chunkADQ2LATRcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2492
- res.setHeader("X-Robots-Tag", _chunk4OFWG4IKcjs.FARM_PREVIEW_ROBOTS_TAG);
2498
+ if (_chunkIABI62FHcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2499
+ res.setHeader("X-Robots-Tag", _chunkEACD6ND7cjs.FARM_PREVIEW_ROBOTS_TAG);
2493
2500
  }
2494
2501
  next();
2495
2502
  });
2496
2503
  }
2497
2504
  const apiServerBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
2498
2505
  const devBuiltInRoutePaths = new Set(
2499
- _chunkFYZD7DUScjs.listFarmBuiltInRoutePaths.call(void 0, {
2506
+ _chunkWCSBYQOTcjs.listFarmBuiltInRoutePaths.call(void 0, {
2500
2507
  agent: {
2501
2508
  apiCatalog: true,
2502
2509
  mcp: true,
@@ -2546,7 +2553,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2546
2553
  );
2547
2554
  const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
2548
2555
  try {
2549
- const result = await _chunkOUDNUFVRcjs.generateFarmTypeArtifacts.call(void 0, {
2556
+ const result = await _chunkHRH7OKBQcjs.generateFarmTypeArtifacts.call(void 0, {
2550
2557
  root: farmConfig.root,
2551
2558
  srcDir: farmConfig.srcDir,
2552
2559
  layers: farmConfig.layers,
@@ -2555,6 +2562,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2555
2562
  extraRoutes: getExtraRouteTypes(),
2556
2563
  suppressLintOnLink: farmConfig.suppressLintOnLink,
2557
2564
  componentExtensions: farmConfig.renderer.componentExtensions,
2565
+ renderer: farmConfig.renderer,
2558
2566
  i18nConfig: farmConfig.i18n,
2559
2567
  ...selection
2560
2568
  });
@@ -2590,7 +2598,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2590
2598
  farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _158 => _158.configFile, 'optionalAccess', _159 => _159.replace, 'call', _160 => _160(/\\/g, "/")])).filter((file) => Boolean(file))
2591
2599
  );
2592
2600
  const routeModuleExtensions = /* @__PURE__ */ new Set([
2593
- ..._chunkM6DAIE4Tcjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
2601
+ ..._chunkNGTZHWBGcjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
2594
2602
  ".md",
2595
2603
  ".mdx"
2596
2604
  ]);
@@ -2614,6 +2622,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2614
2622
  );
2615
2623
  };
2616
2624
  const isAppRuntimeFile = (file) => isFarmAppRuntimeFile(file, appDirSlugs, routeModuleExtensions);
2625
+ const isRendererRouteFile = (file) => routeModuleExtensions.has(path6.extname(file).toLowerCase()) && _optionalChain([farmApp, 'optionalAccess', _161 => _161.getRouteManager, 'call', _162 => _162(), 'access', _163 => _163.isRendererRouteFile, 'call', _164 => _164(file)]) === true;
2617
2626
  const isStaticMetadataImageFile = (file) => /\/(?:opengraph-image|twitter-image)(?:\.(?:png|jpg|jpeg|gif|webp)|\.alt\.txt)$/.test(
2618
2627
  file.replace(/\\/g, "/")
2619
2628
  );
@@ -2650,7 +2659,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2650
2659
  const configChanged = isFarmConfigFile(file, farmConfig.root) || layerConfigFiles.has(normalizedFile);
2651
2660
  const programmaticRouteChanged = isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file));
2652
2661
  const typeArtifacts = configChanged ? ALL_TYPE_ARTIFACTS : {
2653
- routes: ev !== "change" && isRouteModuleFile(file) || programmaticRouteChanged,
2662
+ routes: ev !== "change" && (isRouteModuleFile(file) || isRendererRouteFile(file)) || programmaticRouteChanged,
2654
2663
  api: isApiRouteFile(file) || programmaticRouteChanged,
2655
2664
  env: false,
2656
2665
  images: false,
@@ -2660,9 +2669,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2660
2669
  scheduleTypeArtifactGen(file, ev, typeArtifacts);
2661
2670
  }
2662
2671
  if (isI18nCatalogFile(file)) {
2663
- _optionalChain([farmApp, 'optionalAccess', _161 => _161.getI18nRuntime, 'call', _162 => _162(), 'access', _163 => _163.reload, 'call', _164 => _164(), 'access', _165 => _165.then, 'call', _166 => _166(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _167 => _167.catch, 'call', _168 => _168((error) => _chunk7U4XF76Rcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
2672
+ _optionalChain([farmApp, 'optionalAccess', _165 => _165.getI18nRuntime, 'call', _166 => _166(), 'access', _167 => _167.reload, 'call', _168 => _168(), 'access', _169 => _169.then, 'call', _170 => _170(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _171 => _171.catch, 'call', _172 => _172((error) => _chunk7U4XF76Rcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
2664
2673
  }
2665
- const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
2674
+ const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || isRendererRouteFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
2666
2675
  if (isRouteRefreshEvent) {
2667
2676
  if (!queuedRouteFiles) {
2668
2677
  const files = /* @__PURE__ */ new Set();
@@ -2672,8 +2681,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2672
2681
  queuedRouteFiles = void 0;
2673
2682
  try {
2674
2683
  await Promise.all([
2675
- _optionalChain([refreshRouteDiscovery, 'optionalCall', _169 => _169(`${ev} ${file}`)]),
2676
- [...files].some((path7) => path7.includes("middleware.")) ? _optionalChain([middlewareManager, 'optionalAccess', _170 => _170.reload, 'call', _171 => _171()]) : void 0
2684
+ _optionalChain([refreshRouteDiscovery, 'optionalCall', _173 => _173(`${ev} ${file}`)]),
2685
+ [...files].some((path7) => path7.includes("middleware.")) ? _optionalChain([middlewareManager, 'optionalAccess', _174 => _174.reload, 'call', _175 => _175()]) : void 0
2677
2686
  ]);
2678
2687
  if (pendingRouteReloads.size === 1)
2679
2688
  server.ws.send({ type: "full-reload", path: "*" });
@@ -2722,14 +2731,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2722
2731
  const { FARM_DEV_SERVER_MODULE_LOADER } = await import("./internal/native-server-fns.cjs");
2723
2732
  const load = (file) => _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, file);
2724
2733
  globalThis[FARM_DEV_SERVER_MODULE_LOADER] = load;
2725
- _optionalChain([server, 'access', _172 => _172.httpServer, 'optionalAccess', _173 => _173.once, 'call', _174 => _174("close", () => {
2734
+ _optionalChain([server, 'access', _176 => _176.httpServer, 'optionalAccess', _177 => _177.once, 'call', _178 => _178("close", () => {
2726
2735
  const globals = globalThis;
2727
2736
  if (globals[FARM_DEV_SERVER_MODULE_LOADER] === load) {
2728
2737
  delete globals[FARM_DEV_SERVER_MODULE_LOADER];
2729
2738
  }
2730
2739
  })]);
2731
2740
  }
2732
- apiRouteManager = new (0, _chunkLKIG5SM6cjs.APIRouteManager)(appDirs, server, {
2741
+ apiRouteManager = new (0, _chunk5P65LXGUcjs.APIRouteManager)(appDirs, server, {
2733
2742
  plugins: farmConfig.plugins,
2734
2743
  i18n: farmApp.getI18nRuntime(),
2735
2744
  bodySizeLimit: serverConfig.bodySizeLimit,
@@ -2796,11 +2805,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2796
2805
  });
2797
2806
  }
2798
2807
  }
2799
- if (_optionalChain([options, 'access', _175 => _175.openapi, 'optionalAccess', _176 => _176.enabled])) {
2808
+ if (_optionalChain([options, 'access', _179 => _179.openapi, 'optionalAccess', _180 => _180.enabled])) {
2800
2809
  const { OpenAPIManager } = await loadFarmOpenAPIDevRuntime();
2801
2810
  openAPIManager = new OpenAPIManager(appDirs, options.openapi, {
2802
2811
  mode: "development",
2803
- apiBaseURL: typeof _optionalChain([options, 'access', _177 => _177.api, 'optionalAccess', _178 => _178.baseURL]) === "string" ? options.api.baseURL : void 0,
2812
+ apiBaseURL: typeof _optionalChain([options, 'access', _181 => _181.api, 'optionalAccess', _182 => _182.baseURL]) === "string" ? options.api.baseURL : void 0,
2804
2813
  routes: () => apiRouteManager.getRoutes().values(),
2805
2814
  loadModule: (filePath) => apiRouteManager.loadModule(filePath)
2806
2815
  });
@@ -2831,7 +2840,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2831
2840
  return _chunk7EPYN7GWcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
2832
2841
  };
2833
2842
  releaseDocsMCPServers();
2834
- const isFarmDocsPathGuarded = (href) => _chunkOFVCWV2Dcjs.farmPathGuardCoversPage.call(void 0,
2843
+ const isFarmDocsPathGuarded = (href) => _chunkNEKO3HM2cjs.farmPathGuardCoversPage.call(void 0,
2835
2844
  {
2836
2845
  config: farmConfig,
2837
2846
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -2842,22 +2851,23 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2842
2851
  root: farmConfig.root,
2843
2852
  srcDir: farmConfig.srcDir,
2844
2853
  clientEntry: "/@farm/client.js",
2854
+ rendererServer: farmConfig.renderer.server,
2845
2855
  resolveLayoutFonts: resolveDocsLayoutFonts,
2846
2856
  fontStylesheetHref: "/@farm/fonts.css",
2847
- globalStylesheetHref: _chunkCL7BUGVBcjs.resolveDevGlobalStylesheetHref.call(void 0,
2857
+ globalStylesheetHref: _chunkJHRJ5V2Fcjs.resolveDevGlobalStylesheetHref.call(void 0,
2848
2858
  farmConfig.root,
2849
2859
  farmConfig.srcDir
2850
2860
  ),
2851
2861
  loadModule: async (specifier) => {
2852
2862
  const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
2853
- if (specifier === _optionalChain([farmConfig, 'access', _179 => _179.docs, 'access', _180 => _180.adapter, 'optionalAccess', _181 => _181.server]) && _optionalChain([resolved, 'optionalAccess', _182 => _182.id])) {
2863
+ if (specifier === _optionalChain([farmConfig, 'access', _183 => _183.docs, 'access', _184 => _184.adapter, 'optionalAccess', _185 => _185.server]) && _optionalChain([resolved, 'optionalAccess', _186 => _186.id])) {
2854
2864
  const file = resolved.id.split("?", 1)[0];
2855
2865
  return import(
2856
2866
  /* @vite-ignore */
2857
2867
  _url.pathToFileURL.call(void 0, file).href
2858
2868
  );
2859
2869
  }
2860
- return _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _183 => _183.id]), () => ( specifier)));
2870
+ return _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _187 => _187.id]), () => ( specifier)));
2861
2871
  },
2862
2872
  registerMCPServer: (mcpServer) => {
2863
2873
  const dispose = _chunkRKQOMG2Xcjs.registerFarmMCPServer.call(void 0, mcpServer);
@@ -2875,7 +2885,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2875
2885
  fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
2876
2886
  resolveLayoutFonts: resolveDocsLayoutFonts,
2877
2887
  fontStylesheetHref: "/@farm/fonts.css",
2878
- globalStylesheetHref: _chunkCL7BUGVBcjs.resolveDevGlobalStylesheetHref.call(void 0,
2888
+ globalStylesheetHref: _chunkJHRJ5V2Fcjs.resolveDevGlobalStylesheetHref.call(void 0,
2879
2889
  farmConfig.root,
2880
2890
  farmConfig.srcDir
2881
2891
  ),
@@ -2883,7 +2893,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2883
2893
  basePath: farmConfig.basePath
2884
2894
  }) : null;
2885
2895
  const farmDocsListsPages = Boolean(
2886
- farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _184 => _184.getPlugins, 'call', _185 => _185(), 'access', _186 => _186.some, 'call', _187 => _187((plugin2) => plugin2.name === "farm:infra-analytics")])
2896
+ farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _188 => _188.getPlugins, 'call', _189 => _189(), 'access', _190 => _190.some, 'call', _191 => _191((plugin2) => plugin2.name === "farm:infra-analytics")])
2887
2897
  );
2888
2898
  let farmDocsPagePaths;
2889
2899
  const getFarmDocsPagePaths = () => {
@@ -2910,6 +2920,24 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2910
2920
  });
2911
2921
  }
2912
2922
  }
2923
+ const farmInfraAnalyticsPlugin = _optionalChain([pm, 'optionalAccess', _192 => _192.getPlugins, 'call', _193 => _193(), 'access', _194 => _194.find, 'call', _195 => _195((plugin2) => plugin2.name === "farm:infra-analytics")]);
2924
+ if (farmInfraAnalyticsPlugin) {
2925
+ _chunkOM6JIIJUcjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
2926
+ if (farmDocsDevRuntime) {
2927
+ const label = _chunkWCSBYQOTcjs.resolveFarmDocsRouteLabel.call(void 0,
2928
+ _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname, farmConfig.basePath),
2929
+ {
2930
+ path: _optionalChain([farmConfig, 'access', _196 => _196.docs, 'optionalAccess', _197 => _197.entry]) || "/docs",
2931
+ roots: _optionalChain([farmConfig, 'access', _198 => _198.docs, 'optionalAccess', _199 => _199.roots, 'optionalAccess', _200 => _200.map, 'call', _201 => _201((root) => root.entry)]),
2932
+ pages: await getFarmDocsPagePaths()
2933
+ }
2934
+ );
2935
+ if (label) return _chunkWCSBYQOTcjs.setFarmRouteLabel.call(void 0, { pathname }, label);
2936
+ }
2937
+ const match = farmApp.getRouteManager().matchRoute(pathname);
2938
+ return { pathname, pattern: _optionalChain([match, 'access', _202 => _202.route, 'optionalAccess', _203 => _203.pattern]) || null };
2939
+ });
2940
+ }
2913
2941
  if (farmDocsDevRuntime && !farmDocsDevRuntime.hasFarmDocsRuntimeAdapter(farmConfig.docs)) {
2914
2942
  const docsContentDirs = farmDocsDevRuntime.getFarmDocsContentDirs(farmConfig.docs, {
2915
2943
  root: farmConfig.root,
@@ -2982,7 +3010,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2982
3010
  }
2983
3011
  },
2984
3012
  (request) => {
2985
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _188 => _188.getConfig, 'call', _189 => _189()]), () => ( options));
3013
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _204 => _204.getConfig, 'call', _205 => _205()]), () => ( options));
2986
3014
  const currentServerConfig = _chunk7Q7UB4TLcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
2987
3015
  return _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, request, {
2988
3016
  trustProxy: currentServerConfig.trustProxy
@@ -2998,7 +3026,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2998
3026
  withAPIRequestTracing(async function handleFarmDevRequest(req, res, next) {
2999
3027
  const requestUrl = req.url || "/";
3000
3028
  const requestMethod = req.method || "GET";
3001
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _190 => _190.getConfig, 'call', _191 => _191()]), () => ( options));
3029
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _206 => _206.getConfig, 'call', _207 => _207()]), () => ( options));
3002
3030
  const currentServerConfig = _chunk7Q7UB4TLcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
3003
3031
  const parsedRequestUrl = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, {
3004
3032
  trustProxy: currentServerConfig.trustProxy
@@ -3040,10 +3068,35 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3040
3068
  return;
3041
3069
  }
3042
3070
  }
3071
+ if (pm && requestMethod !== "GET" && requestMethod !== "HEAD" && pm._hasRuntimeEndpoint(requestPathname)) {
3072
+ let body;
3073
+ try {
3074
+ body = await _chunk7Q7UB4TLcjs.readNodeRequestBody.call(void 0, req, currentServerConfig.bodySizeLimit);
3075
+ } catch (error) {
3076
+ res.statusCode = _nullishCoalesce(error.status, () => ( 400));
3077
+ res.end();
3078
+ return;
3079
+ }
3080
+ let response;
3081
+ try {
3082
+ const endpointRequest = createRequestFromNodeRequest(req, parsedRequestUrl);
3083
+ response = await pm.runRuntimeRequest(
3084
+ new Request(endpointRequest, { method: requestMethod, body: toRequestBody(body) }),
3085
+ // An endpoint answers before the handler would run.
3086
+ () => new Response(null, { status: 404 }),
3087
+ { kind: "request", route: { pathname: requestPathname } }
3088
+ );
3089
+ } catch (e22) {
3090
+ sendFarmDevRuntimeHookError(res, true);
3091
+ return;
3092
+ }
3093
+ await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
3094
+ return;
3095
+ }
3043
3096
  if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkY3DO7BIJcjs.FARM_VIDEO_PLAYER_PATH) {
3044
3097
  res.statusCode = 200;
3045
3098
  res.setHeader("Content-Type", "text/html; charset=utf-8");
3046
- res.end(requestMethod === "HEAD" ? void 0 : _chunkCL7BUGVBcjs.FARM_VIDEO_PLAYER_HTML);
3099
+ res.end(requestMethod === "HEAD" ? void 0 : _chunkJHRJ5V2Fcjs.FARM_VIDEO_PLAYER_HTML);
3047
3100
  return;
3048
3101
  }
3049
3102
  const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
@@ -3072,7 +3125,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3072
3125
  if (referrerUrl.origin === parsedRequestUrl.origin && !referrerUrl.pathname.startsWith(_chunkSTF6VDYQcjs.FARM_DEVTOOLS_PATH)) {
3073
3126
  launchUrl = referrerUrl;
3074
3127
  }
3075
- } catch (e22) {
3128
+ } catch (e23) {
3076
3129
  }
3077
3130
  }
3078
3131
  launchUrl.searchParams.set(_chunkSTF6VDYQcjs.FARM_DEVTOOLS_LAUNCH_PARAM, "1");
@@ -3098,7 +3151,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3098
3151
  openapi: options.openapi
3099
3152
  },
3100
3153
  workflows: discoveredWorkflows,
3101
- plugins: _optionalChain([pm, 'optionalAccess', _192 => _192.getSortedPlugins, 'call', _193 => _193()])
3154
+ plugins: _optionalChain([pm, 'optionalAccess', _208 => _208.getSortedPlugins, 'call', _209 => _209()])
3102
3155
  });
3103
3156
  res.statusCode = 200;
3104
3157
  res.setHeader(
@@ -3122,7 +3175,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3122
3175
  }
3123
3176
  const isViteOwnedRequest = () => requestUrl.startsWith("/@") || requestUrl.startsWith("/node_modules/") || requestUrl.startsWith("/__farm/") || isViteModuleRequest(parsedRequestUrl, req.headers) || (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname.includes(".") && (devServableFileExists(requestPathname, [server.config.publicDir]) || isViteDevClientRequest(parsedRequestUrl, req.headers) && devServableFileExists(requestPathname, [server.config.root]));
3124
3177
  const configRewriteSource = req[FARM_DEV_CONFIG_REWRITE_SOURCE];
3125
- const runtimeHookErrorAnswersJSON = rendererDisabled || _chunkWIZRYFB2cjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath);
3178
+ const runtimeHookErrorAnswersJSON = rendererDisabled || _chunkJYQ6DGPWcjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath);
3126
3179
  const requestedPagePathname = configRewriteSource === void 0 ? requestPathname : new URL(configRewriteSource).pathname;
3127
3180
  let pageHookRouteMatch;
3128
3181
  const pageHookRoute = () => {
@@ -3133,10 +3186,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3133
3186
  render: {
3134
3187
  pathname: pathname2,
3135
3188
  method: requestMethod,
3136
- routePattern: _optionalChain([match, 'optionalAccess', _194 => _194.route, 'optionalAccess', _195 => _195.pattern]) || null,
3137
- params: _optionalChain([match, 'optionalAccess', _196 => _196.params]) || {}
3189
+ routePattern: _optionalChain([match, 'optionalAccess', _210 => _210.route, 'optionalAccess', _211 => _211.pattern]) || null,
3190
+ params: _optionalChain([match, 'optionalAccess', _212 => _212.params]) || {}
3138
3191
  },
3139
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _197 => _197.layouts]) || []).map((layout) => layout.pattern)
3192
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _213 => _213.layouts]) || []).map((layout) => layout.pattern)
3140
3193
  };
3141
3194
  return pageHookRouteMatch;
3142
3195
  };
@@ -3203,7 +3256,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3203
3256
  const redirectResponse = response;
3204
3257
  try {
3205
3258
  const metadataRoute = matchAppMetadataRoute(requestPathname);
3206
- const kind = metadataRoute ? "asset" : _chunkWIZRYFB2cjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath) ? "api" : requestMethod === "GET" || requestMethod === "HEAD" ? "page" : "request";
3259
+ const kind = metadataRoute ? "asset" : _chunkJYQ6DGPWcjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath) ? "api" : requestMethod === "GET" || requestMethod === "HEAD" ? "page" : "request";
3207
3260
  response = await pm.runRuntimeRequest(
3208
3261
  createRequestFromNodeRequest(req, parsedRequestUrl),
3209
3262
  async () => {
@@ -3212,7 +3265,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3212
3265
  },
3213
3266
  { kind, route: { pathname: requestPathname, ...metadataRoute } }
3214
3267
  );
3215
- } catch (e23) {
3268
+ } catch (e24) {
3216
3269
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
3217
3270
  logResponse(requestMethod, requestUrl, 500, 0, "PAGE");
3218
3271
  return;
@@ -3224,7 +3277,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3224
3277
  }
3225
3278
  }
3226
3279
  const runAppMiddlewareForContentRoute = async () => {
3227
- if (!_optionalChain([middlewareManager, 'optionalAccess', _198 => _198.hasMiddleware, 'call', _199 => _199()])) return false;
3280
+ if (!_optionalChain([middlewareManager, 'optionalAccess', _214 => _214.hasMiddleware, 'call', _215 => _215()])) return false;
3228
3281
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
3229
3282
  return runFarmMiddlewareWithNavigation(
3230
3283
  farmApp.getServerRenderer(),
@@ -3253,7 +3306,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3253
3306
  return errorResponse;
3254
3307
  }
3255
3308
  );
3256
- } catch (e24) {
3309
+ } catch (e25) {
3257
3310
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
3258
3311
  return 500;
3259
3312
  }
@@ -3262,7 +3315,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3262
3315
  return response.status;
3263
3316
  };
3264
3317
  const runAppMiddlewareInRuntimeSession = async (runtimeSession2, logResponse2) => {
3265
- const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _200 => _200.hasRuntimeHook, 'call', _201 => _201("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _202 => _202.hasMiddleware, 'call', _203 => _203()]) ? interceptFarmDevPageResponse({
3318
+ const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _216 => _216.hasRuntimeHook, 'call', _217 => _217("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _218 => _218.hasMiddleware, 'call', _219 => _219()]) ? interceptFarmDevPageResponse({
3266
3319
  req,
3267
3320
  res,
3268
3321
  pm,
@@ -3275,7 +3328,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3275
3328
  urlPath: requestUrl,
3276
3329
  pathname: requestPathname,
3277
3330
  startTime: Date.now(),
3278
- logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _204 => _204(status)]),
3331
+ logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _220 => _220(status)]),
3279
3332
  // The runtime reports a runtime.after failure itself.
3280
3333
  emitError: async () => {
3281
3334
  },
@@ -3286,7 +3339,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3286
3339
  handled = await runAppMiddlewareForContentRoute();
3287
3340
  } catch (error) {
3288
3341
  if (runtimeHookErrorAnswersJSON || res.headersSent) {
3289
- _optionalChain([interceptor, 'optionalAccess', _205 => _205.release, 'call', _206 => _206()]);
3342
+ _optionalChain([interceptor, 'optionalAccess', _221 => _221.release, 'call', _222 => _222()]);
3290
3343
  throw error;
3291
3344
  }
3292
3345
  if (runtimeSession2) await pm.reportRuntimeRequestError(runtimeSession2, error);
@@ -3294,10 +3347,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3294
3347
  return true;
3295
3348
  }
3296
3349
  if (!handled) {
3297
- _optionalChain([interceptor, 'optionalAccess', _207 => _207.release, 'call', _208 => _208()]);
3350
+ _optionalChain([interceptor, 'optionalAccess', _223 => _223.release, 'call', _224 => _224()]);
3298
3351
  return false;
3299
3352
  }
3300
- if (!_optionalChain([interceptor, 'optionalAccess', _209 => _209.isEnded, 'call', _210 => _210()])) _optionalChain([logResponse2, 'optionalCall', _211 => _211(res.statusCode || 200)]);
3353
+ if (!_optionalChain([interceptor, 'optionalAccess', _225 => _225.isEnded, 'call', _226 => _226()])) _optionalChain([logResponse2, 'optionalCall', _227 => _227(res.statusCode || 200)]);
3301
3354
  return true;
3302
3355
  };
3303
3356
  const serveBuiltInRoute = async (respond, {
@@ -3306,14 +3359,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3306
3359
  label
3307
3360
  } = {}) => {
3308
3361
  const discard = async () => {
3309
- await _optionalChain([computed, 'optionalAccess', _212 => _212.body, 'optionalAccess', _213 => _213.cancel, 'call', _214 => _214(), 'access', _215 => _215.catch, 'call', _216 => _216(() => {
3362
+ await _optionalChain([computed, 'optionalAccess', _228 => _228.body, 'optionalAccess', _229 => _229.cancel, 'call', _230 => _230(), 'access', _231 => _231.catch, 'call', _232 => _232(() => {
3310
3363
  })]);
3311
3364
  };
3312
3365
  const sendRuntimeResponse = async (runtimeSession3, response2) => {
3313
3366
  let runtimeResponse;
3314
3367
  try {
3315
3368
  runtimeResponse = await pm.endRuntimeRequest(runtimeSession3, response2);
3316
- } catch (e25) {
3369
+ } catch (e26) {
3317
3370
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
3318
3371
  return;
3319
3372
  }
@@ -3323,15 +3376,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3323
3376
  if (pm && opensFarmDevRuntimeSession(pm)) {
3324
3377
  try {
3325
3378
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
3326
- const route = _chunkFYZD7DUScjs.setFarmRouteLabel.call(void 0,
3379
+ const route = _chunkWCSBYQOTcjs.setFarmRouteLabel.call(void 0,
3327
3380
  { pathname: requestPathname },
3328
- label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkFYZD7DUScjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3381
+ label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkWCSBYQOTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3329
3382
  );
3330
3383
  runtimeSession2 = await pm.beginRuntimeRequest(
3331
3384
  createRequestFromNodeRequest(req, new URL(fullUrl)),
3332
3385
  { kind, route }
3333
3386
  );
3334
- } catch (e26) {
3387
+ } catch (e27) {
3335
3388
  await discard();
3336
3389
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
3337
3390
  return;
@@ -3363,7 +3416,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3363
3416
  }
3364
3417
  responding = true;
3365
3418
  response = await respond(
3366
- _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _217 => _217.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3419
+ _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _233 => _233.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3367
3420
  );
3368
3421
  } catch (error) {
3369
3422
  if (!responding && !res.headersSent) {
@@ -3383,7 +3436,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3383
3436
  else await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
3384
3437
  };
3385
3438
  const openAPIRequestPathname = openAPIManager ? _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
3386
- if (openAPIManager && _optionalChain([options, 'access', _218 => _218.openapi, 'optionalAccess', _219 => _219.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3439
+ if (openAPIManager && _optionalChain([options, 'access', _234 => _234.openapi, 'optionalAccess', _235 => _235.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3387
3440
  const specManager = openAPIManager;
3388
3441
  await serveBuiltInRoute(async () => {
3389
3442
  if (requestMethod !== "GET" && requestMethod !== "HEAD") {
@@ -3403,7 +3456,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3403
3456
  });
3404
3457
  return;
3405
3458
  }
3406
- if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _220 => _220.openapi, 'optionalAccess', _221 => _221.route])) {
3459
+ if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _236 => _236.openapi, 'optionalAccess', _237 => _237.route])) {
3407
3460
  const docsManager = openAPIManager;
3408
3461
  await serveBuiltInRoute(
3409
3462
  async () => {
@@ -3414,8 +3467,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3414
3467
  );
3415
3468
  return;
3416
3469
  }
3417
- if (_optionalChain([options, 'access', _222 => _222.agent, 'optionalAccess', _223 => _223.manifest]) !== false && _chunkFYZD7DUScjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3418
- const manifestGuardCoversPath = (path7) => _chunkOFVCWV2Dcjs.farmPathGuardCoversEndpoint.call(void 0,
3470
+ if (_optionalChain([options, 'access', _238 => _238.agent, 'optionalAccess', _239 => _239.manifest]) !== false && _chunkWCSBYQOTcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3471
+ const manifestGuardCoversPath = (path7) => _chunkNEKO3HM2cjs.farmPathGuardCoversEndpoint.call(void 0,
3419
3472
  {
3420
3473
  config: farmConfig,
3421
3474
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -3424,18 +3477,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3424
3477
  apiServerBasePath
3425
3478
  );
3426
3479
  await serveBuiltInRoute(async () => {
3427
- _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkCL7BUGVBcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3428
- const manifest = await _chunkFYZD7DUScjs.createFarmAppManifestResponse.call(void 0,
3480
+ _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkJHRJ5V2Fcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3481
+ const manifest = await _chunkWCSBYQOTcjs.createFarmAppManifestResponse.call(void 0,
3429
3482
  new Request(parsedRequestUrl, {
3430
3483
  method: requestMethod,
3431
3484
  headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
3432
3485
  }),
3433
3486
  {
3434
- ..._chunkFYZD7DUScjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3487
+ ..._chunkWCSBYQOTcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3435
3488
  build: "development",
3436
3489
  packages: farmAppPackages,
3437
3490
  // Read again on each request; unchanged files come from a cache.
3438
- webmcpTools: _optionalChain([farmConfig, 'access', _224 => _224.plugins, 'optionalAccess', _225 => _225.some, 'call', _226 => _226(({ name }) => name === "farm:webmcp")]) ? _chunkCL7BUGVBcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3491
+ webmcpTools: _optionalChain([farmConfig, 'access', _240 => _240.plugins, 'optionalAccess', _241 => _241.some, 'call', _242 => _242(({ name }) => name === "farm:webmcp")]) ? _chunkJHRJ5V2Fcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3439
3492
  }),
3440
3493
  defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
3441
3494
  // A guard written for an MCP server's path keeps its tools out of the public view.
@@ -3453,11 +3506,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3453
3506
  });
3454
3507
  return;
3455
3508
  }
3456
- if (_optionalChain([options, 'access', _227 => _227.agent, 'optionalAccess', _228 => _228.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkFYZD7DUScjs.FARM_API_CATALOG_PATH) {
3509
+ if (_optionalChain([options, 'access', _243 => _243.agent, 'optionalAccess', _244 => _244.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkWCSBYQOTcjs.FARM_API_CATALOG_PATH) {
3457
3510
  await serveBuiltInRoute(
3458
- () => _chunkFYZD7DUScjs.createFarmApiCatalogResponse.call(void 0,
3511
+ () => _chunkWCSBYQOTcjs.createFarmApiCatalogResponse.call(void 0,
3459
3512
  requestMethod,
3460
- _chunkFYZD7DUScjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3513
+ _chunkWCSBYQOTcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3461
3514
  new Request(parsedRequestUrl, {
3462
3515
  headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
3463
3516
  })
@@ -3465,8 +3518,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3465
3518
  );
3466
3519
  return;
3467
3520
  }
3468
- if (_optionalChain([options, 'access', _229 => _229.agent, 'optionalAccess', _230 => _230.aiCatalog]) !== false) {
3469
- const aiCatalog = _chunkFYZD7DUScjs.createFarmAiCatalogResponse.call(void 0,
3521
+ if (_optionalChain([options, 'access', _245 => _245.agent, 'optionalAccess', _246 => _246.aiCatalog]) !== false) {
3522
+ const aiCatalog = _chunkWCSBYQOTcjs.createFarmAiCatalogResponse.call(void 0,
3470
3523
  new Request(parsedRequestUrl, {
3471
3524
  method: requestMethod,
3472
3525
  headers: {
@@ -3514,7 +3567,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3514
3567
  );
3515
3568
  const docsResponse = await farmDocsHandler(docsHandlerRequest);
3516
3569
  if (docsResponse) {
3517
- const docsPage = _optionalChain([docsResponse, 'access', _231 => _231.headers, 'access', _232 => _232.get, 'call', _233 => _233("content-type"), 'optionalAccess', _234 => _234.toLowerCase, 'call', _235 => _235(), 'access', _236 => _236.includes, 'call', _237 => _237("text/html")]);
3570
+ const docsPage = _optionalChain([docsResponse, 'access', _247 => _247.headers, 'access', _248 => _248.get, 'call', _249 => _249("content-type"), 'optionalAccess', _250 => _250.toLowerCase, 'call', _251 => _251(), 'access', _252 => _252.includes, 'call', _253 => _253("text/html")]);
3518
3571
  await serveBuiltInRoute(
3519
3572
  async (request) => {
3520
3573
  if (!docsPage) {
@@ -3532,7 +3585,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3532
3585
  farmConfig.deploymentId
3533
3586
  );
3534
3587
  if (deploymentMismatch) {
3535
- await _optionalChain([docsResponse, 'access', _238 => _238.body, 'optionalAccess', _239 => _239.cancel, 'call', _240 => _240()]);
3588
+ await _optionalChain([docsResponse, 'access', _254 => _254.body, 'optionalAccess', _255 => _255.cancel, 'call', _256 => _256()]);
3536
3589
  return _chunkNLBHLPEOcjs.createFarmDeploymentMismatchResponse.call(void 0, deploymentMismatch);
3537
3590
  }
3538
3591
  return _chunkNLBHLPEOcjs.withFarmDeploymentResponse.call(void 0,
@@ -3548,11 +3601,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3548
3601
  {
3549
3602
  kind: "docs",
3550
3603
  computed: docsResponse,
3551
- label: _chunkFYZD7DUScjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3604
+ label: _chunkWCSBYQOTcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3552
3605
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
3553
3606
  {
3554
- path: _optionalChain([farmConfig, 'access', _241 => _241.docs, 'optionalAccess', _242 => _242.entry]) || "/docs",
3555
- roots: _optionalChain([farmConfig, 'access', _243 => _243.docs, 'optionalAccess', _244 => _244.roots, 'optionalAccess', _245 => _245.map, 'call', _246 => _246((root) => root.entry)]),
3607
+ path: _optionalChain([farmConfig, 'access', _257 => _257.docs, 'optionalAccess', _258 => _258.entry]) || "/docs",
3608
+ roots: _optionalChain([farmConfig, 'access', _259 => _259.docs, 'optionalAccess', _260 => _260.roots, 'optionalAccess', _261 => _261.map, 'call', _262 => _262((root) => root.entry)]),
3556
3609
  pages: await getFarmDocsPagePaths()
3557
3610
  }
3558
3611
  )
@@ -3561,7 +3614,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3561
3614
  return;
3562
3615
  }
3563
3616
  }
3564
- if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _247 => _247.headers, 'access', _248 => _248.accept, 'optionalAccess', _249 => _249.includes, 'call', _250 => _250(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
3617
+ if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _263 => _263.headers, 'access', _264 => _264.accept, 'optionalAccess', _265 => _265.includes, 'call', _266 => _266(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
3565
3618
  const { createFarmNativeTreeResponse } = await import("./native-tree-5TENEQ7Y.cjs");
3566
3619
  const treeBodyInit = requestMethod === "POST" ? { body: _chunk7Q7UB4TLcjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" } : {};
3567
3620
  const treeResponse = await createFarmNativeTreeResponse({
@@ -3579,15 +3632,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3579
3632
  });
3580
3633
  await serveBuiltInRoute(() => treeResponse, {
3581
3634
  computed: treeResponse,
3582
- label: _nullishCoalesce(_optionalChain([farmApp, 'access', _251 => _251.getRouteManager, 'call', _252 => _252(), 'access', _253 => _253.matchRoute, 'call', _254 => _254(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _255 => _255.route, 'optionalAccess', _256 => _256.pattern]), () => ( null))
3635
+ label: _nullishCoalesce(_optionalChain([farmApp, 'access', _267 => _267.getRouteManager, 'call', _268 => _268(), 'access', _269 => _269.matchRoute, 'call', _270 => _270(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _271 => _271.route, 'optionalAccess', _272 => _272.pattern]), () => ( null))
3583
3636
  });
3584
3637
  return;
3585
3638
  }
3586
3639
  const markdownRouteLabel = () => (
3587
3640
  // On the route path, as production labels it: /fr/index.md is /index.md.
3588
- _chunkFYZD7DUScjs.resolveFarmMarkdownRouteLabel.call(void 0,
3641
+ _chunkWCSBYQOTcjs.resolveFarmMarkdownRouteLabel.call(void 0,
3589
3642
  toRoutePathname(requestPathname),
3590
- (page) => _optionalChain([farmApp, 'access', _257 => _257.getRouteManager, 'call', _258 => _258(), 'access', _259 => _259.matchRoute, 'call', _260 => _260(page), 'access', _261 => _261.route, 'optionalAccess', _262 => _262.pattern])
3643
+ (page) => _optionalChain([farmApp, 'access', _273 => _273.getRouteManager, 'call', _274 => _274(), 'access', _275 => _275.matchRoute, 'call', _276 => _276(page), 'access', _277 => _277.route, 'optionalAccess', _278 => _278.pattern])
3591
3644
  )
3592
3645
  );
3593
3646
  const markdownSourceResponse = viteModuleRequest ? null : await _chunk26WP75W5cjs.createFarmMarkdownSourceResponse.call(void 0, {
@@ -3599,14 +3652,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3599
3652
  routePathname: toRoutePathname,
3600
3653
  resolveSource: async (pathname2) => {
3601
3654
  const match = farmApp.getRouteManager().matchRoute(pathname2);
3602
- const sourcePath = _optionalChain([match, 'access', _263 => _263.route, 'optionalAccess', _264 => _264.markdownSourcePath]) || (match.route && _chunk26WP75W5cjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
3655
+ const sourcePath = _optionalChain([match, 'access', _279 => _279.route, 'optionalAccess', _280 => _280.markdownSourcePath]) || (match.route && _chunk26WP75W5cjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
3603
3656
  if (!sourcePath) {
3604
3657
  return null;
3605
3658
  }
3606
3659
  return {
3607
3660
  source: await fs2.promises.readFile(sourcePath, "utf8"),
3608
3661
  // Project-relative, as production sends it: never the machine's path.
3609
- filePath: _chunkCL7BUGVBcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3662
+ filePath: _chunkJHRJ5V2Fcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3610
3663
  };
3611
3664
  },
3612
3665
  // The anonymous check goes through this server, so its guards and
@@ -3741,7 +3794,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3741
3794
  }
3742
3795
  const configuredIntegrations = currentConfig.integrations;
3743
3796
  const tryConfiguredIntegrationRoute = async () => {
3744
- const matchedRoute = _chunkWGWWRV2Mcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3797
+ const matchedRoute = _chunkB3HQTGXScjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3745
3798
  pathname: requestPathname,
3746
3799
  method: requestMethod
3747
3800
  });
@@ -3755,8 +3808,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3755
3808
  await pm.runHookParallelFiltered(
3756
3809
  "beforeRequest",
3757
3810
  (plugin2) => {
3758
- const owner = _chunkWGWWRV2Mcjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
3759
- return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _265 => _265.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3811
+ const owner = _chunkB3HQTGXScjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
3812
+ return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _281 => _281.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3760
3813
  },
3761
3814
  req,
3762
3815
  res
@@ -3785,7 +3838,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3785
3838
  });
3786
3839
  const dispatchIntegration = async (request, runtime) => {
3787
3840
  try {
3788
- const result = await _chunkWGWWRV2Mcjs.dispatchIntegrationRequest.call(void 0,
3841
+ const result = await _chunkB3HQTGXScjs.dispatchIntegrationRequest.call(void 0,
3789
3842
  {
3790
3843
  integration: matchedRoute.integration,
3791
3844
  config: currentConfig,
@@ -3793,7 +3846,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3793
3846
  isProd: false
3794
3847
  },
3795
3848
  request,
3796
- { clientAddress: _optionalChain([req, 'access', _266 => _266.socket, 'optionalAccess', _267 => _267.remoteAddress]) }
3849
+ { clientAddress: _optionalChain([req, 'access', _282 => _282.socket, 'optionalAccess', _283 => _283.remoteAddress]) }
3797
3850
  );
3798
3851
  if (!result) {
3799
3852
  throw new Error(`Matched integration route did not return a response`);
@@ -3801,8 +3854,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3801
3854
  return result;
3802
3855
  } catch (error) {
3803
3856
  _chunk7U4XF76Rcjs.logger.error(`Integration route error: ${error}`);
3804
- await _optionalChain([runtime, 'optionalAccess', _268 => _268.reportError, 'call', _269 => _269(error)]);
3805
- return _chunkWIZRYFB2cjs.createFarmInternalServerErrorResponse.call(void 0, );
3857
+ await _optionalChain([runtime, 'optionalAccess', _284 => _284.reportError, 'call', _285 => _285(error)]);
3858
+ return _chunkJYQ6DGPWcjs.createFarmInternalServerErrorResponse.call(void 0, );
3806
3859
  }
3807
3860
  };
3808
3861
  runtimeReportsErrors = Boolean(pm);
@@ -3843,7 +3896,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3843
3896
  } else if (!res.writableEnded) {
3844
3897
  res.statusCode = 500;
3845
3898
  res.setHeader("Content-Type", "application/json");
3846
- res.end(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
3899
+ res.end(_chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY);
3847
3900
  }
3848
3901
  return true;
3849
3902
  }
@@ -3852,10 +3905,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3852
3905
  const hasLocalDevRoute = () => {
3853
3906
  const routeManager3 = farmApp.getRouteManager();
3854
3907
  return Boolean(
3855
- _chunkWGWWRV2Mcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3908
+ _chunkB3HQTGXScjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3856
3909
  pathname: requestPathname,
3857
3910
  method: requestMethod
3858
- }) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _270 => _270.isFarmDocsAPIRequest, 'call', _271 => _271(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
3911
+ }) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _286 => _286.isFarmDocsAPIRequest, 'call', _287 => _287(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
3859
3912
  );
3860
3913
  };
3861
3914
  try {
@@ -3889,7 +3942,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3889
3942
  }
3890
3943
  const matchedApiRoute = apiRouteManager.matchRoute(requestPathname);
3891
3944
  const hasMatchedApiRoute = Boolean(matchedApiRoute);
3892
- if (hasMatchedApiRoute || _chunkWIZRYFB2cjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath)) {
3945
+ if (hasMatchedApiRoute || _chunkJYQ6DGPWcjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath)) {
3893
3946
  const startTime2 = Date.now();
3894
3947
  const method2 = req.method || "GET";
3895
3948
  const urlPath2 = req.url || "/";
@@ -3918,7 +3971,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3918
3971
  _chunk7U4XF76Rcjs.logger.error(`Request hook error: ${error}`);
3919
3972
  res.statusCode = 500;
3920
3973
  res.setHeader("Content-Type", "application/json");
3921
- res.end(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
3974
+ res.end(_chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY);
3922
3975
  return;
3923
3976
  }
3924
3977
  const createAPIRequest = async () => {
@@ -3945,15 +3998,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3945
3998
  );
3946
3999
  };
3947
4000
  const isDocsAPIRequest = Boolean(
3948
- farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _272 => _272.isFarmDocsAPIRequest, 'call', _273 => _273(pathname2)])
4001
+ farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _288 => _288.isFarmDocsAPIRequest, 'call', _289 => _289(pathname2)])
3949
4002
  );
3950
4003
  const docsRuntimeOptions = () => ({
3951
4004
  kind: "docs",
3952
- route: _chunkFYZD7DUScjs.setFarmRouteLabel.call(void 0,
4005
+ route: _chunkWCSBYQOTcjs.setFarmRouteLabel.call(void 0,
3953
4006
  { pathname: pathname2, pattern: urlPath2 },
3954
- _chunkFYZD7DUScjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
3955
- path: _optionalChain([farmConfig, 'access', _274 => _274.docs, 'optionalAccess', _275 => _275.entry]) || "/docs",
3956
- roots: _optionalChain([farmConfig, 'access', _276 => _276.docs, 'optionalAccess', _277 => _277.roots, 'optionalAccess', _278 => _278.map, 'call', _279 => _279((root) => root.entry)])
4007
+ _chunkWCSBYQOTcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
4008
+ path: _optionalChain([farmConfig, 'access', _290 => _290.docs, 'optionalAccess', _291 => _291.entry]) || "/docs",
4009
+ roots: _optionalChain([farmConfig, 'access', _292 => _292.docs, 'optionalAccess', _293 => _293.roots, 'optionalAccess', _294 => _294.map, 'call', _295 => _295((root) => root.entry)])
3957
4010
  })
3958
4011
  )
3959
4012
  });
@@ -4035,7 +4088,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4035
4088
  const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
4036
4089
  const hasExplicitAPIRoute = Boolean(routedApiRoute);
4037
4090
  if (apiHandler && hasExplicitAPIRoute) {
4038
- const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _280 => _280.route, 'access', _281 => _281.path]) || urlPath2;
4091
+ const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _296 => _296.route, 'access', _297 => _297.path]) || urlPath2;
4039
4092
  _chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
4040
4093
  type: "route.matched",
4041
4094
  pathname: pathname2,
@@ -4085,8 +4138,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4085
4138
  error
4086
4139
  });
4087
4140
  _chunk7U4XF76Rcjs.logger.error(`API route error: ${error}`);
4088
- await _optionalChain([runtime, 'optionalAccess', _282 => _282.reportError, 'call', _283 => _283(error)]);
4089
- response = _chunkWIZRYFB2cjs.createFarmInternalServerErrorResponse.call(void 0, );
4141
+ await _optionalChain([runtime, 'optionalAccess', _298 => _298.reportError, 'call', _299 => _299(error)]);
4142
+ response = _chunkJYQ6DGPWcjs.createFarmInternalServerErrorResponse.call(void 0, );
4090
4143
  }
4091
4144
  return pm ? await pm.runHookSerial("afterApiHandler", response, apiLifecyclePayload) : response;
4092
4145
  };
@@ -4190,12 +4243,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4190
4243
  }
4191
4244
  return;
4192
4245
  }
4193
- if (_optionalChain([req, 'access', _284 => _284.url, 'optionalAccess', _285 => _285.startsWith, 'call', _286 => _286("/@")]) || _optionalChain([req, 'access', _287 => _287.url, 'optionalAccess', _288 => _288.startsWith, 'call', _289 => _289("/node_modules")])) {
4246
+ if (_optionalChain([req, 'access', _300 => _300.url, 'optionalAccess', _301 => _301.startsWith, 'call', _302 => _302("/@")]) || _optionalChain([req, 'access', _303 => _303.url, 'optionalAccess', _304 => _304.startsWith, 'call', _305 => _305("/node_modules")])) {
4194
4247
  return next();
4195
4248
  }
4196
4249
  if (!deferredDottedRequests.has(req) && shouldBypassFarmRouterForDottedPath(
4197
4250
  requestPathname,
4198
- _optionalChain([farmApp, 'optionalAccess', _290 => _290.getRouteManager, 'call', _291 => _291()]),
4251
+ _optionalChain([farmApp, 'optionalAccess', _306 => _306.getRouteManager, 'call', _307 => _307()]),
4199
4252
  [server.config.publicDir, server.config.root],
4200
4253
  farmAgentGeneratedPaths(farmConfig),
4201
4254
  requestMethod
@@ -4203,7 +4256,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4203
4256
  if (!viteModuleRequest) deferredDottedRequests.set(req, requestUrl);
4204
4257
  return next();
4205
4258
  }
4206
- if (_optionalChain([req, 'access', _292 => _292.url, 'optionalAccess', _293 => _293.startsWith, 'call', _294 => _294("/__farm/page-data")])) {
4259
+ if (_optionalChain([req, 'access', _308 => _308.url, 'optionalAccess', _309 => _309.startsWith, 'call', _310 => _310("/__farm/page-data")])) {
4207
4260
  const urlObj = parsedRequestUrl;
4208
4261
  const targetPath = urlObj.searchParams.get("path") || "/";
4209
4262
  let renderedRequest;
@@ -4233,7 +4286,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4233
4286
  renderedRequest = targetRequest;
4234
4287
  let middlewareMap = /* @__PURE__ */ new Map();
4235
4288
  let middlewareContext = /* @__PURE__ */ new Map();
4236
- if (_optionalChain([middlewareManager, 'optionalAccess', _295 => _295.hasMiddleware, 'call', _296 => _296()])) {
4289
+ if (_optionalChain([middlewareManager, 'optionalAccess', _311 => _311.hasMiddleware, 'call', _312 => _312()])) {
4237
4290
  const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
4238
4291
  const targetNodeResponse = createPageDataMiddlewareResponse(res);
4239
4292
  const handled = await runFarmMiddlewareWithNavigation(
@@ -4267,10 +4320,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4267
4320
  if (pm) {
4268
4321
  await pm.runHookParallel("afterRouteMatch", {
4269
4322
  pathname: targetPath,
4270
- matched: !!_optionalChain([match, 'optionalAccess', _297 => _297.route]),
4271
- routePattern: _optionalChain([match, 'optionalAccess', _298 => _298.route, 'optionalAccess', _299 => _299.pattern]) || null,
4272
- params: _optionalChain([match, 'optionalAccess', _300 => _300.params]) || {},
4273
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _301 => _301.layouts]) || []).map((l) => l.pattern)
4323
+ matched: !!_optionalChain([match, 'optionalAccess', _313 => _313.route]),
4324
+ routePattern: _optionalChain([match, 'optionalAccess', _314 => _314.route, 'optionalAccess', _315 => _315.pattern]) || null,
4325
+ params: _optionalChain([match, 'optionalAccess', _316 => _316.params]) || {},
4326
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _317 => _317.layouts]) || []).map((l) => l.pattern)
4274
4327
  });
4275
4328
  }
4276
4329
  if (!match) {
@@ -4305,7 +4358,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4305
4358
  );
4306
4359
  const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
4307
4360
  const navigationManifest = routeManager3.generateClientManifest(server.config.root);
4308
- const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunk46UV2E7Icjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4361
+ const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkEFI6QWBQcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4309
4362
  const isClientComponent = moduleMetadata.isClientComponent;
4310
4363
  const shouldHydrate = moduleMetadata.shouldHydrate;
4311
4364
  let mergedMetadata = {};
@@ -4316,7 +4369,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4316
4369
  (layout) => _nullishCoalesce(navigationManifest.layouts.find(
4317
4370
  (entry) => entry.pattern === layout.pattern
4318
4371
  ), () => ( {
4319
- ..._chunk46UV2E7Icjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4372
+ ..._chunkEFI6QWBQcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4320
4373
  serverTree: false
4321
4374
  }))
4322
4375
  );
@@ -4330,17 +4383,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4330
4383
  )
4331
4384
  ];
4332
4385
  const hydrationIslandStrategy = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0,
4333
- _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _302 => _302.getConfig, 'call', _303 => _303()]), () => ( options))), 'access', _304 => _304.experimental, 'optionalAccess', _305 => _305.serverComponents])
4334
- ) === "islands" ? _chunkCL7BUGVBcjs.resolveFarmRouteRootStrategy.call(void 0,
4386
+ _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _318 => _318.getConfig, 'call', _319 => _319()]), () => ( options))), 'access', _320 => _320.experimental, 'optionalAccess', _321 => _321.serverComponents])
4387
+ ) === "islands" ? _chunkJHRJ5V2Fcjs.resolveFarmRouteRootStrategy.call(void 0,
4335
4388
  route,
4336
4389
  { shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
4337
4390
  layouts.map((layout, index) => ({
4338
4391
  pattern: layout.pattern,
4339
4392
  modulePath: layout.modulePath,
4340
- shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _306 => _306[index], 'optionalAccess', _307 => _307.shouldHydrate]) === true,
4393
+ shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _322 => _322[index], 'optionalAccess', _323 => _323.shouldHydrate]) === true,
4341
4394
  // Manifest entries carry it; metadata read from source does not.
4342
- hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _308 => _308[index], 'optionalAccess', _309 => _309.hasIsolatedClientBoundaries]) === true,
4343
- islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _310 => _310[index], 'optionalAccess', _311 => _311.islandStrategy]), () => ( null))
4395
+ hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _324 => _324[index], 'optionalAccess', _325 => _325.hasIsolatedClientBoundaries]) === true,
4396
+ islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _326 => _326[index], 'optionalAccess', _327 => _327.islandStrategy]), () => ( null))
4344
4397
  })),
4345
4398
  server.config.root,
4346
4399
  true
@@ -4397,7 +4450,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4397
4450
  const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
4398
4451
  const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
4399
4452
  (entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
4400
- ), () => ( _chunk46UV2E7Icjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4453
+ ), () => ( _chunkEFI6QWBQcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4401
4454
  const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
4402
4455
  request: targetRequest,
4403
4456
  params: slot.params,
@@ -4443,15 +4496,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4443
4496
  );
4444
4497
  const projectRoot = server.config.root;
4445
4498
  const toUrlPath = (absolutePath) => _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
4446
- const renderPlan = _chunkOFVCWV2Dcjs.createFarmRouteRenderPlan.call(void 0, {
4499
+ const renderPlan = _chunkNEKO3HM2cjs.createFarmRouteRenderPlan.call(void 0, {
4447
4500
  pageShouldHydrate: shouldHydrate,
4448
4501
  layoutShouldHydrate: shouldHydrateLayout,
4449
4502
  islandStrategy: hydrationIslandStrategy,
4450
- rendering: _chunkOUDNUFVRcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4503
+ rendering: _chunkHRH7OKBQcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4451
4504
  });
4452
4505
  const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
4453
- const layoutStartIndex = _chunkOFVCWV2Dcjs.getSharedLayoutPrefixLength.call(void 0,
4454
- _chunkOFVCWV2Dcjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4506
+ const layoutStartIndex = _chunkNEKO3HM2cjs.getSharedLayoutPrefixLength.call(void 0,
4507
+ _chunkNEKO3HM2cjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4455
4508
  destinationLayoutPatterns
4456
4509
  );
4457
4510
  const renderer = farmApp.getServerRenderer();
@@ -4461,13 +4514,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4461
4514
  middlewareContext,
4462
4515
  () => renderer.renderNavigationFragment({
4463
4516
  PageComponent: routeModule.default,
4464
- LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _312 => _312.default]),
4517
+ LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _328 => _328.default]),
4465
4518
  pageProps: routeProps,
4466
4519
  params,
4467
4520
  layouts: layouts.map((layout, index) => ({
4468
4521
  pattern: layout.pattern,
4469
4522
  module: layoutModules[index],
4470
- serverTree: _optionalChain([layoutHydrationMetadata, 'access', _313 => _313[index], 'optionalAccess', _314 => _314.serverTree])
4523
+ serverTree: _optionalChain([layoutHydrationMetadata, 'access', _329 => _329[index], 'optionalAccess', _330 => _330.serverTree])
4471
4524
  })),
4472
4525
  layoutStartIndex,
4473
4526
  slots: routeSlots.map((slot) => ({
@@ -4533,7 +4586,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4533
4586
  {
4534
4587
  status: 200,
4535
4588
  headers: {
4536
- "Cache-Control": _chunkOFVCWV2Dcjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4589
+ "Cache-Control": _chunkNEKO3HM2cjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4537
4590
  "X-Farm-Navigation": "html-fragment",
4538
4591
  Vary: "X-Farm-Layout-Chain",
4539
4592
  [_chunkNLBHLPEOcjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
@@ -4575,14 +4628,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4575
4628
  trustProxy: currentServerConfig.trustProxy
4576
4629
  }).pathname;
4577
4630
  const routeManager2 = farmApp.getRouteManager();
4578
- const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _315 => _315.hasHook, 'call', _316 => _316("beforeRequest")]), () => ( false));
4579
- const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _317 => _317.hasHook, 'call', _318 => _318("afterResponse")]), () => ( false));
4580
- const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _319 => _319.hasHook, 'call', _320 => _320("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _321 => _321.hasHook, 'call', _322 => _322("afterRender")]), () => ( false)));
4631
+ const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _331 => _331.hasHook, 'call', _332 => _332("beforeRequest")]), () => ( false));
4632
+ const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _333 => _333.hasHook, 'call', _334 => _334("afterResponse")]), () => ( false));
4633
+ const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _335 => _335.hasHook, 'call', _336 => _336("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _337 => _337.hasHook, 'call', _338 => _338("afterRender")]), () => ( false)));
4581
4634
  const opensRuntimeSession = pm ? opensFarmDevRuntimeSession(pm) : false;
4582
- const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _323 => _323.hasRuntimeHook, 'call', _324 => _324("after")]), () => ( false));
4635
+ const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _339 => _339.hasRuntimeHook, 'call', _340 => _340("after")]), () => ( false));
4583
4636
  const pageBuiltInRouteLabel = (pathname2) => {
4584
4637
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
4585
- const mcpLabel = _chunkFYZD7DUScjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4638
+ const mcpLabel = _chunkWCSBYQOTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4586
4639
  if (mcpLabel) return mcpLabel;
4587
4640
  if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
4588
4641
  return routePathname === _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH : null;
@@ -4591,13 +4644,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4591
4644
  const match = routeManager2.matchRoute(pathname2);
4592
4645
  return {
4593
4646
  kind: "page",
4594
- route: _chunkFYZD7DUScjs.setFarmRouteLabel.call(void 0,
4647
+ route: _chunkWCSBYQOTcjs.setFarmRouteLabel.call(void 0,
4595
4648
  {
4596
4649
  pathname: pathname2,
4597
- pattern: _optionalChain([match, 'optionalAccess', _325 => _325.route, 'optionalAccess', _326 => _326.pattern]) || null,
4598
- params: _optionalChain([match, 'optionalAccess', _327 => _327.params]) || {}
4650
+ pattern: _optionalChain([match, 'optionalAccess', _341 => _341.route, 'optionalAccess', _342 => _342.pattern]) || null,
4651
+ params: _optionalChain([match, 'optionalAccess', _343 => _343.params]) || {}
4599
4652
  },
4600
- _optionalChain([match, 'optionalAccess', _328 => _328.route]) ? null : pageBuiltInRouteLabel(pathname2)
4653
+ _optionalChain([match, 'optionalAccess', _344 => _344.route]) ? null : pageBuiltInRouteLabel(pathname2)
4601
4654
  )
4602
4655
  };
4603
4656
  };
@@ -4677,7 +4730,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4677
4730
  }) : void 0;
4678
4731
  let middlewareFailed = false;
4679
4732
  try {
4680
- if (_optionalChain([middlewareManager, 'optionalAccess', _329 => _329.hasMiddleware, 'call', _330 => _330()])) {
4733
+ if (_optionalChain([middlewareManager, 'optionalAccess', _345 => _345.hasMiddleware, 'call', _346 => _346()])) {
4681
4734
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
4682
4735
  const handled = await runFarmMiddlewareWithNavigation(
4683
4736
  farmApp.getServerRenderer(),
@@ -4690,7 +4743,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4690
4743
  throw error;
4691
4744
  });
4692
4745
  if (handled) {
4693
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _331 => _331.isEnded, 'call', _332 => _332()])) {
4746
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _347 => _347.isEnded, 'call', _348 => _348()])) {
4694
4747
  const duration = Date.now() - startTime;
4695
4748
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4696
4749
  }
@@ -4705,8 +4758,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4705
4758
  res
4706
4759
  );
4707
4760
  }
4708
- if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _333 => _333.isEnded, 'call', _334 => _334()])) {
4709
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _335 => _335.isEnded, 'call', _336 => _336()])) {
4761
+ if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _349 => _349.isEnded, 'call', _350 => _350()])) {
4762
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _351 => _351.isEnded, 'call', _352 => _352()])) {
4710
4763
  const duration = Date.now() - startTime;
4711
4764
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4712
4765
  }
@@ -4725,8 +4778,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4725
4778
  await pm.reportRuntimeRequestError(runtimeSession, error);
4726
4779
  } else {
4727
4780
  await pm.failRuntimeRequest(runtimeSession, error);
4728
- if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _337 => _337.isEnded, 'call', _338 => _338()])) {
4729
- _optionalChain([responseInterceptor, 'optionalAccess', _339 => _339.release, 'call', _340 => _340()]);
4781
+ if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _353 => _353.isEnded, 'call', _354 => _354()])) {
4782
+ _optionalChain([responseInterceptor, 'optionalAccess', _355 => _355.release, 'call', _356 => _356()]);
4730
4783
  console.error("[FARM] Page error:", error);
4731
4784
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
4732
4785
  return;
@@ -4743,7 +4796,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4743
4796
  }
4744
4797
  })
4745
4798
  );
4746
- const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _341 => _341.stack, 'access', _342 => _342.at, 'call', _343 => _343(-1), 'optionalAccess', _344 => _344.handle]);
4799
+ const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _357 => _357.stack, 'access', _358 => _358.at, 'call', _359 => _359(-1), 'optionalAccess', _360 => _360.handle]);
4747
4800
  if (farmOwnsDevCors && viteServer.config.server.cors === false) {
4748
4801
  farmMiddlewares.use(createFarmDevViteCorsMiddleware());
4749
4802
  }
@@ -4772,7 +4825,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4772
4825
  });
4773
4826
  }
4774
4827
  if (id.startsWith("@farm.js/core/internal/") && importer && isOutsideAppRoot(importer)) {
4775
- const root = _optionalChain([farmApp, 'optionalAccess', _345 => _345.getConfig, 'call', _346 => _346(), 'access', _347 => _347.root]) || _optionalChain([server, 'optionalAccess', _348 => _348.config, 'access', _349 => _349.root]) || options.root;
4828
+ const root = _optionalChain([farmApp, 'optionalAccess', _361 => _361.getConfig, 'call', _362 => _362(), 'access', _363 => _363.root]) || _optionalChain([server, 'optionalAccess', _364 => _364.config, 'access', _365 => _365.root]) || options.root;
4776
4829
  return this.resolve(id, path6.join(root, "package.json"), {
4777
4830
  ...resolveOptions,
4778
4831
  skipSelf: true
@@ -4800,7 +4853,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4800
4853
  }
4801
4854
  },
4802
4855
  async load(id, loadOptions) {
4803
- if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _350 => _350.ssr]) && !farmSetupContext.getStore()) {
4856
+ if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _366 => _366.ssr]) && !farmSetupContext.getStore()) {
4804
4857
  await pendingClientSetup;
4805
4858
  }
4806
4859
  if (_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && islandsServerFns()) {
@@ -4818,8 +4871,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4818
4871
  if (imageModule) return imageModule;
4819
4872
  }
4820
4873
  if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
4821
- const renderer = _optionalChain([farmApp, 'optionalAccess', _351 => _351.getConfig, 'call', _352 => _352(), 'access', _353 => _353.renderer]) || _chunkM6DAIE4Tcjs.resolveFarmRenderer.call(void 0, options.renderer);
4822
- const root = _optionalChain([server, 'optionalAccess', _354 => _354.config, 'access', _355 => _355.root]) || options.root;
4874
+ const renderer = _optionalChain([farmApp, 'optionalAccess', _367 => _367.getConfig, 'call', _368 => _368(), 'access', _369 => _369.renderer]) || _chunkNGTZHWBGcjs.resolveFarmRenderer.call(void 0, options.renderer);
4875
+ const root = _optionalChain([server, 'optionalAccess', _370 => _370.config, 'access', _371 => _371.root]) || options.root;
4823
4876
  if (isClientEnvironment(this, loadOptions)) {
4824
4877
  return generateProgrammaticClientRouteModuleForId(
4825
4878
  id,
@@ -4835,65 +4888,63 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4835
4888
  return FARM_DEV_CLIENT_BOOT_MODULE;
4836
4889
  }
4837
4890
  if (isFarmClientVirtualId(id)) {
4838
- const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _356 => _356.getConfig, 'call', _357 => _357()]);
4839
- const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _358 => _358.renderer]) || _chunkM6DAIE4Tcjs.resolveFarmRenderer.call(void 0, options.renderer);
4840
- const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _359 => _359.integrations]) || options.integrations;
4841
- const root = _optionalChain([resolvedConfig, 'optionalAccess', _360 => _360.root]) || _optionalChain([server, 'optionalAccess', _361 => _361.config, 'access', _362 => _362.root]) || process.cwd();
4842
- const docs = _optionalChain([resolvedConfig, 'optionalAccess', _363 => _363.docs]);
4843
- const adapterOwnsDocsRuntime = Boolean(
4844
- _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _364 => _364.adapter, 'optionalAccess', _365 => _365.server]) && docs.adapter.react
4845
- );
4846
- const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _366 => _366.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4891
+ const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _372 => _372.getConfig, 'call', _373 => _373()]);
4892
+ const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _374 => _374.renderer]) || _chunkNGTZHWBGcjs.resolveFarmRenderer.call(void 0, options.renderer);
4893
+ const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _375 => _375.integrations]) || options.integrations;
4894
+ const root = _optionalChain([resolvedConfig, 'optionalAccess', _376 => _376.root]) || _optionalChain([server, 'optionalAccess', _377 => _377.config, 'access', _378 => _378.root]) || process.cwd();
4895
+ const docs = _optionalChain([resolvedConfig, 'optionalAccess', _379 => _379.docs]);
4896
+ const adapterOwnsDocsRuntime = _chunkL2GUEYHRcjs.hasFarmDocsRuntimeAdapter.call(void 0, docs);
4897
+ const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _380 => _380.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4847
4898
  const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
4848
- _optionalChain([docs, 'optionalAccess', _367 => _367.enabled]) ? loadFarmDocsDevRuntime() : null,
4849
- _optionalChain([docs, 'optionalAccess', _368 => _368.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4899
+ _optionalChain([docs, 'optionalAccess', _381 => _381.enabled]) ? loadFarmDocsDevRuntime() : null,
4900
+ _optionalChain([docs, 'optionalAccess', _382 => _382.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4850
4901
  devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
4851
4902
  ]);
4852
- const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _369 => _369.isFarmDocsSearchEnabled, 'call', _370 => _370(docs)]), () => ( false));
4903
+ const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _383 => _383.isFarmDocsSearchEnabled, 'call', _384 => _384(docs)]), () => ( false));
4853
4904
  const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
4854
4905
  docsSearchEnabled,
4855
4906
  docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
4856
4907
  ) : EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME;
4857
4908
  const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
4858
- const generatedDevIndicatorsClientRuntime = farmApp ? _chunkUVV3I5QAcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
4859
- const integrationProviders = _chunkWGWWRV2Mcjs.getIntegrationProviders.call(void 0, integrations);
4860
- const isolatedHydrationMode = _chunk46UV2E7Icjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4861
- _optionalChain([resolvedConfig, 'optionalAccess', _371 => _371.experimental, 'optionalAccess', _372 => _372.isolatedClientHydration]),
4909
+ const generatedDevIndicatorsClientRuntime = farmApp ? _chunkL2GUEYHRcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
4910
+ const integrationProviders = _chunkB3HQTGXScjs.getIntegrationProviders.call(void 0, integrations);
4911
+ const isolatedHydrationMode = _chunkEFI6QWBQcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4912
+ _optionalChain([resolvedConfig, 'optionalAccess', _385 => _385.experimental, 'optionalAccess', _386 => _386.isolatedClientHydration]),
4862
4913
  {
4863
- serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _373 => _373.experimental, 'optionalAccess', _374 => _374.serverComponents])) === "rsc",
4914
+ serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _387 => _387.experimental, 'optionalAccess', _388 => _388.serverComponents])) === "rsc",
4864
4915
  hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
4865
4916
  }
4866
4917
  );
4867
4918
  return generateClientCode(
4868
4919
  integrationProviders,
4869
4920
  [
4870
- ..._chunkWGWWRV2Mcjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
4871
- ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _375 => _375.getFarmDocsDocumentNavigationMatchers, 'call', _376 => _376(docs)]), () => ( []))
4921
+ ..._chunkB3HQTGXScjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
4922
+ ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _389 => _389.getFarmDocsDocumentNavigationMatchers, 'call', _390 => _390(docs)]), () => ( []))
4872
4923
  ],
4873
4924
  generatedDocsSearchRuntime,
4874
4925
  `${generatedDevtoolsClientRuntime}
4875
4926
  ${generatedDevIndicatorsClientRuntime}`,
4876
- _optionalChain([resolvedConfig, 'optionalAccess', _377 => _377.plugins]) || [],
4927
+ _optionalChain([resolvedConfig, 'optionalAccess', _391 => _391.plugins]) || [],
4877
4928
  root,
4878
- _optionalChain([resolvedConfig, 'optionalAccess', _378 => _378.srcDir]) || options.srcDir || "src",
4879
- _optionalChain([resolvedConfig, 'optionalAccess', _379 => _379.publicRuntimeConfig]) || options.publicRuntimeConfig,
4880
- _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _380 => _380.adapter, 'optionalAccess', _381 => _381.react]) : void 0,
4929
+ _optionalChain([resolvedConfig, 'optionalAccess', _392 => _392.srcDir]) || options.srcDir || "src",
4930
+ _optionalChain([resolvedConfig, 'optionalAccess', _393 => _393.publicRuntimeConfig]) || options.publicRuntimeConfig,
4931
+ adapterOwnsDocsRuntime ? _chunkL2GUEYHRcjs.getFarmDocsAdapterUIModule.call(void 0, _optionalChain([docs, 'optionalAccess', _394 => _394.adapter])) : void 0,
4881
4932
  renderer,
4882
- isolatedHydrationMode === "enabled" || _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _382 => _382.getRouteManager, 'call', _383 => _383(), 'access', _384 => _384.getIsolatedClientBoundaryModules, 'call', _385 => _385(root)])))), 'optionalAccess', _386 => _386.size]) > 0,
4883
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _387 => _387.trailingSlash]), () => ( false)),
4884
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _388 => _388.basePath]), () => ( "/")),
4885
- _chunkCL7BUGVBcjs.generateClientCachePersistenceCode.call(void 0,
4886
- _chunkCL7BUGVBcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _389 => _389.cache]))
4933
+ isolatedHydrationMode === "enabled" || _chunkNGTZHWBGcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _395 => _395.getRouteManager, 'call', _396 => _396(), 'access', _397 => _397.getIsolatedClientBoundaryModules, 'call', _398 => _398(root)])))), 'optionalAccess', _399 => _399.size]) > 0,
4934
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _400 => _400.trailingSlash]), () => ( false)),
4935
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _401 => _401.basePath]), () => ( "/")),
4936
+ _chunkJHRJ5V2Fcjs.generateClientCachePersistenceCode.call(void 0,
4937
+ _chunkJHRJ5V2Fcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _402 => _402.cache]))
4887
4938
  ),
4888
- _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
4889
- _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _390 => _390.experimental, 'optionalAccess', _391 => _391.serverComponents])) === "islands"
4939
+ adapterOwnsDocsRuntime ? _chunkXJDB564Acjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
4940
+ _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _403 => _403.experimental, 'optionalAccess', _404 => _404.serverComponents])) === "islands"
4890
4941
  );
4891
4942
  }
4892
4943
  if (id === "/@farm/server") {
4893
4944
  return generateServerCode();
4894
4945
  }
4895
4946
  if (id === "/@farm/manifest") {
4896
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _392 => _392.getRouteManager, 'call', _393 => _393()]);
4947
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _405 => _405.getRouteManager, 'call', _406 => _406()]);
4897
4948
  if (!routeManager) {
4898
4949
  return `
4899
4950
  export const getManifest = () => ({
@@ -4905,11 +4956,11 @@ export const getManifest = () => ({
4905
4956
  });
4906
4957
  `;
4907
4958
  }
4908
- const globalStylesheetHref = _chunkCL7BUGVBcjs.resolveDevGlobalStylesheetHref.call(void 0,
4959
+ const globalStylesheetHref = _chunkJHRJ5V2Fcjs.resolveDevGlobalStylesheetHref.call(void 0,
4909
4960
  server.config.root,
4910
- _optionalChain([farmApp, 'optionalAccess', _394 => _394.getConfig, 'call', _395 => _395(), 'access', _396 => _396.srcDir])
4961
+ _optionalChain([farmApp, 'optionalAccess', _407 => _407.getConfig, 'call', _408 => _408(), 'access', _409 => _409.srcDir])
4911
4962
  );
4912
- const fullManifest = _chunkCL7BUGVBcjs.createFarmDevClientManifest.call(void 0,
4963
+ const fullManifest = _chunkJHRJ5V2Fcjs.createFarmDevClientManifest.call(void 0,
4913
4964
  routeManager.generateClientManifest(server.config.root),
4914
4965
  {
4915
4966
  sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
@@ -4925,64 +4976,64 @@ export { manifest };
4925
4976
  }
4926
4977
  },
4927
4978
  async transform(code, id, transformOptions) {
4928
- if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _397 => _397.ssr]) && !farmSetupContext.getStore()) {
4979
+ if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _410 => _410.ssr]) && !farmSetupContext.getStore()) {
4929
4980
  await pendingClientSetup;
4930
4981
  }
4931
- const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _398 => _398.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
4932
- const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _399 => _399.getConfig, 'call', _400 => _400()]), () => ( options));
4982
+ const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _411 => _411.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
4983
+ const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _412 => _412.getConfig, 'call', _413 => _413()]), () => ( options));
4933
4984
  let rewrotePackageImports = false;
4934
- if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _401 => _401.experimental, 'optionalAccess', _402 => _402.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _403 => _403.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunk46UV2E7Icjs.hasUseClientDirective.call(void 0, code)) {
4985
+ if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _414 => _414.experimental, 'optionalAccess', _415 => _415.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _416 => _416.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkEFI6QWBQcjs.hasUseClientDirective.call(void 0, code)) {
4935
4986
  const file = id.split("?", 1)[0];
4936
- const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _404 => _404.config, 'access', _405 => _405.root]) || process.cwd();
4987
+ const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _417 => _417.config, 'access', _418 => _418.root]) || process.cwd();
4937
4988
  const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
4938
4989
  const rewrite = () => {
4939
- if (_optionalChain([transformOptions, 'optionalAccess', _406 => _406.ssr]) === true) {
4990
+ if (_optionalChain([transformOptions, 'optionalAccess', _419 => _419.ssr]) === true) {
4940
4991
  if (farmReactServerFiles.has(file)) {
4941
- for (const child of _chunk46UV2E7Icjs.farmRelativeImportFiles.call(void 0, code, file))
4992
+ for (const child of _chunkEFI6QWBQcjs.farmRelativeImportFiles.call(void 0, code, file))
4942
4993
  farmReactServerFiles.add(child);
4943
4994
  }
4944
- const serverModule = farmReactServerFiles.has(file) || !_chunk46UV2E7Icjs.getFarmClientReachableModules.call(void 0,
4995
+ const serverModule = farmReactServerFiles.has(file) || !_chunkEFI6QWBQcjs.getFarmClientReachableModules.call(void 0,
4945
4996
  path6.resolve(projectRoot, actionConfig.srcDir || "src"),
4946
4997
  projectRoot
4947
4998
  ).has(path6.resolve(file));
4948
- const reactServer = !serverModule ? null : _chunk46UV2E7Icjs.rewriteFarmReactServerImports.call(void 0, {
4999
+ const reactServer = !serverModule ? null : _chunkEFI6QWBQcjs.rewriteFarmReactServerImports.call(void 0, {
4949
5000
  code,
4950
5001
  file,
4951
- reference: (specifier, exportName) => _chunk46UV2E7Icjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
5002
+ reference: (specifier, exportName) => _chunkEFI6QWBQcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
4952
5003
  onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
4953
5004
  });
4954
5005
  if (reactServer !== null) {
4955
5006
  code = reactServer;
4956
5007
  rewrotePackageImports = true;
4957
5008
  }
4958
- const internal = farmReactServerFiles.has(file) ? _chunk46UV2E7Icjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
5009
+ const internal = farmReactServerFiles.has(file) ? _chunkEFI6QWBQcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
4959
5010
  code,
4960
5011
  file,
4961
- reference: (clientFile) => _chunk46UV2E7Icjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
5012
+ reference: (clientFile) => _chunkEFI6QWBQcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
4962
5013
  }) : null;
4963
5014
  if (internal !== null) {
4964
5015
  code = internal;
4965
5016
  rewrotePackageImports = true;
4966
5017
  }
4967
5018
  }
4968
- const rewritePackageImports = (source2) => _chunk46UV2E7Icjs.rewriteFarmPackageClientImports.call(void 0, {
5019
+ const rewritePackageImports = (source2) => _chunkEFI6QWBQcjs.rewriteFarmPackageClientImports.call(void 0, {
4969
5020
  code: source2,
4970
5021
  file,
4971
5022
  root: projectRoot,
4972
- isClientPackage: (specifier) => _chunk46UV2E7Icjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
5023
+ isClientPackage: (specifier) => _chunkEFI6QWBQcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
4973
5024
  });
4974
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _407 => _407.getRouteManager, 'call', _408 => _408()]);
5025
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _420 => _420.getRouteManager, 'call', _421 => _421()]);
4975
5026
  const source = code;
4976
5027
  const referenced = routeManager ? routeManager.inspectPackages(() => rewritePackageImports(source)) : rewritePackageImports(source);
4977
5028
  if (referenced !== null) {
4978
5029
  code = referenced;
4979
5030
  rewrotePackageImports = true;
4980
5031
  }
4981
- if (_optionalChain([transformOptions, 'optionalAccess', _409 => _409.ssr]) === true) {
5032
+ if (_optionalChain([transformOptions, 'optionalAccess', _422 => _422.ssr]) === true) {
4982
5033
  const cached = rewriteFarmReactCacheImport(
4983
5034
  code,
4984
5035
  file,
4985
- _optionalChain([runtimeModule, 'optionalCall', _410 => _410(FARM_REACT_CACHE_MODULE)])
5036
+ _optionalChain([runtimeModule, 'optionalCall', _423 => _423(FARM_REACT_CACHE_MODULE)])
4986
5037
  );
4987
5038
  if (cached !== null) {
4988
5039
  code = cached;
@@ -4990,12 +5041,12 @@ export { manifest };
4990
5041
  }
4991
5042
  }
4992
5043
  };
4993
- if (buildSnapshot) _chunk46UV2E7Icjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
5044
+ if (buildSnapshot) _chunkEFI6QWBQcjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
4994
5045
  else rewrite();
4995
5046
  }
4996
5047
  if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
4997
5048
  const serverFns = _chunkPIUTGRDIcjs.transformFarmServerFns.call(void 0, code, id, {
4998
- environment: _optionalChain([transformOptions, 'optionalAccess', _411 => _411.ssr]) === true ? "rsc" : "client"
5049
+ environment: _optionalChain([transformOptions, 'optionalAccess', _424 => _424.ssr]) === true ? "rsc" : "client"
4999
5050
  });
5000
5051
  if (serverFns) {
5001
5052
  if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
@@ -5008,8 +5059,8 @@ export { manifest };
5008
5059
  const actionModule = transformFarmFormActionModule({
5009
5060
  code,
5010
5061
  id,
5011
- root: actionConfig.root || _optionalChain([server, 'optionalAccess', _412 => _412.config, 'access', _413 => _413.root]) || process.cwd(),
5012
- ssr: _optionalChain([transformOptions, 'optionalAccess', _414 => _414.ssr]) === true,
5062
+ root: actionConfig.root || _optionalChain([server, 'optionalAccess', _425 => _425.config, 'access', _426 => _426.root]) || process.cwd(),
5063
+ ssr: _optionalChain([transformOptions, 'optionalAccess', _427 => _427.ssr]) === true,
5013
5064
  // Parsed by file type: page components are TSX.
5014
5065
  parse: (source) => _vite.parseSync.call(void 0, file, source).program,
5015
5066
  runtimeModule,
@@ -5017,21 +5068,21 @@ export { manifest };
5017
5068
  });
5018
5069
  if (actionModule) return { code: actionModule, map: null };
5019
5070
  }
5020
- if (!_optionalChain([transformOptions, 'optionalAccess', _415 => _415.ssr])) {
5021
- const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _416 => _416.getConfig, 'call', _417 => _417(), 'optionalAccess', _418 => _418.docs]));
5022
- if (_chunkCL7BUGVBcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
5023
- const redacted = _chunkCL7BUGVBcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
5071
+ if (!_optionalChain([transformOptions, 'optionalAccess', _428 => _428.ssr])) {
5072
+ const docsConfigModule = _chunkXJDB564Acjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _429 => _429.getConfig, 'call', _430 => _430(), 'optionalAccess', _431 => _431.docs]));
5073
+ if (_chunkJHRJ5V2Fcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
5074
+ const redacted = _chunkJHRJ5V2Fcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
5024
5075
  if (redacted !== null) return { code: redacted, map: null };
5025
5076
  }
5026
5077
  }
5027
- if (!_optionalChain([transformOptions, 'optionalAccess', _419 => _419.ssr])) {
5028
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _420 => _420.getConfig, 'call', _421 => _421()]), () => ( options));
5029
- if ((_optionalChain([currentConfig, 'access', _422 => _422.experimental, 'optionalAccess', _423 => _423.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
5078
+ if (!_optionalChain([transformOptions, 'optionalAccess', _432 => _432.ssr])) {
5079
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _433 => _433.getConfig, 'call', _434 => _434()]), () => ( options));
5080
+ if ((_optionalChain([currentConfig, 'access', _435 => _435.experimental, 'optionalAccess', _436 => _436.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
5030
5081
  const violation = findClientServerFnViolation(code, id);
5031
5082
  if (violation) {
5032
- const locate = _chunk46UV2E7Icjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5083
+ const locate = _chunkEFI6QWBQcjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5033
5084
  this.error(
5034
- _chunk46UV2E7Icjs.formatFarmDiagnostic.call(void 0,
5085
+ _chunkEFI6QWBQcjs.formatFarmDiagnostic.call(void 0,
5035
5086
  createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
5036
5087
  currentConfig.root
5037
5088
  )
@@ -5039,8 +5090,8 @@ export { manifest };
5039
5090
  }
5040
5091
  }
5041
5092
  }
5042
- if (!_optionalChain([transformOptions, 'optionalAccess', _424 => _424.ssr]) && shouldInspectClientBoundary(id, code)) {
5043
- await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _425 => _425.getConfig, 'call', _426 => _426()]), () => ( options)));
5093
+ if (!_optionalChain([transformOptions, 'optionalAccess', _437 => _437.ssr]) && shouldInspectClientBoundary(id, code)) {
5094
+ await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _438 => _438.getConfig, 'call', _439 => _439()]), () => ( options)));
5044
5095
  }
5045
5096
  if (typeof imageImports.transform === "function") {
5046
5097
  const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
@@ -5055,13 +5106,13 @@ export { manifest };
5055
5106
  id,
5056
5107
  transformOptions
5057
5108
  );
5058
- const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _427 => _427.code, 'optionalAccess', _428 => _428.toString, 'call', _429 => _429()]);
5109
+ const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _440 => _440.code, 'optionalAccess', _441 => _441.toString, 'call', _442 => _442()]);
5059
5110
  if (fontCode) {
5060
5111
  transformedCode = fontCode;
5061
5112
  transformed = true;
5062
5113
  }
5063
5114
  }
5064
- if (_optionalChain([transformOptions, 'optionalAccess', _430 => _430.ssr]) && server) {
5115
+ if (_optionalChain([transformOptions, 'optionalAccess', _443 => _443.ssr]) && server) {
5065
5116
  const rewrittenImports = rewriteEarlySsrRelativeImports({
5066
5117
  code: transformedCode,
5067
5118
  id,
@@ -5073,26 +5124,26 @@ export { manifest };
5073
5124
  transformed = true;
5074
5125
  }
5075
5126
  }
5076
- if (_chunk46UV2E7Icjs.hasUseClientDirective.call(void 0, transformedCode)) {
5127
+ if (_chunkEFI6QWBQcjs.hasUseClientDirective.call(void 0, transformedCode)) {
5077
5128
  const clientBoundarySource = transformedCode;
5078
5129
  const moduleInfo = this.getModuleInfo(id);
5079
5130
  if (moduleInfo) {
5080
5131
  moduleInfo.isClientComponent = true;
5081
5132
  }
5082
- transformedCode = _chunk46UV2E7Icjs.stripUseClientDirective.call(void 0, transformedCode);
5133
+ transformedCode = _chunkEFI6QWBQcjs.stripUseClientDirective.call(void 0, transformedCode);
5083
5134
  transformed = true;
5084
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _431 => _431.getConfig, 'call', _432 => _432()]), () => ( options));
5135
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _444 => _444.getConfig, 'call', _445 => _445()]), () => ( options));
5085
5136
  let isolatedModuleReference = null;
5086
- const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _433 => _433.config, 'access', _434 => _434.root]) || process.cwd();
5137
+ const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _446 => _446.config, 'access', _447 => _447.root]) || process.cwd();
5087
5138
  const cleanId = id.split("?", 1)[0];
5088
- const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _435 => _435.getRouteManager, 'call', _436 => _436(), 'access', _437 => _437.getIsolatedClientBoundaryModules, 'call', _438 => _438(root)])));
5089
- const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _439 => _439.has, 'call', _440 => _440(path6.resolve(cleanId))]) === true;
5090
- if (_chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, _chunkM6DAIE4Tcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunk46UV2E7Icjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5091
- cleanId.replace(/\\/g, "/").includes(_chunk46UV2E7Icjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5139
+ const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _448 => _448.getRouteManager, 'call', _449 => _449(), 'access', _450 => _450.getIsolatedClientBoundaryModules, 'call', _451 => _451(root)])));
5140
+ const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _452 => _452.has, 'call', _453 => _453(path6.resolve(cleanId))]) === true;
5141
+ if (_chunkNGTZHWBGcjs.isReactRenderer.call(void 0, _chunkNGTZHWBGcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkEFI6QWBQcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5142
+ cleanId.replace(/\\/g, "/").includes(_chunkEFI6QWBQcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5092
5143
  isolatedModuleReference = _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, cleanId, root);
5093
- const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _441 => _441.experimental, 'optionalAccess', _442 => _442.serverComponents])) === "islands";
5094
- const explicitStrategy = _chunk46UV2E7Icjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5095
- const inference = islandsMode && explicitStrategy === null ? _chunkCL7BUGVBcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5144
+ const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _454 => _454.experimental, 'optionalAccess', _455 => _455.serverComponents])) === "islands";
5145
+ const explicitStrategy = _chunkEFI6QWBQcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5146
+ const inference = islandsMode && explicitStrategy === null ? _chunkJHRJ5V2Fcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5096
5147
  if (inference) {
5097
5148
  for (const file of inference.files) {
5098
5149
  if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
@@ -5105,8 +5156,8 @@ export { manifest };
5105
5156
  islandStrategy: _nullishCoalesce(explicitStrategy, () => ( "load")),
5106
5157
  parse: (source) => this.parse(source),
5107
5158
  slots: islandsMode,
5108
- browser: _optionalChain([transformOptions, 'optionalAccess', _443 => _443.ssr]) !== true,
5109
- inferredInteraction: _optionalChain([inference, 'optionalAccess', _444 => _444.strategy]) === "interaction",
5159
+ browser: _optionalChain([transformOptions, 'optionalAccess', _456 => _456.ssr]) !== true,
5160
+ inferredInteraction: _optionalChain([inference, 'optionalAccess', _457 => _457.strategy]) === "interaction",
5110
5161
  runtimeModule
5111
5162
  });
5112
5163
  if (!transformedBoundary) {
@@ -5137,7 +5188,7 @@ export { manifest };
5137
5188
  );
5138
5189
  return;
5139
5190
  }` : "";
5140
- const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _445 => _445.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5191
+ const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _458 => _458.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5141
5192
  if (import.meta.hot) {
5142
5193
  import.meta.hot.accept((newModule) => {
5143
5194
  ${isolatedHmrUpdate}
@@ -5193,14 +5244,14 @@ if (import.meta.hot) {
5193
5244
  }
5194
5245
  _chunk7U4XF76Rcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
5195
5246
  _chunk7U4XF76Rcjs.logger.info("Pre-rendering SSG pages...");
5196
- const outDir = path6.join(_optionalChain([server, 'optionalAccess', _446 => _446.config, 'access', _447 => _447.root]) || process.cwd(), options.outDir || "dist");
5247
+ const outDir = path6.join(_optionalChain([server, 'optionalAccess', _459 => _459.config, 'access', _460 => _460.root]) || process.cwd(), options.outDir || "dist");
5197
5248
  const clientDir = path6.join(outDir, "client");
5198
5249
  for (const page of ssgPages) {
5199
5250
  try {
5200
5251
  const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
5201
5252
  await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
5202
5253
  const mod = await routeManager.loadRouteModule(page.filePath);
5203
- if (!_optionalChain([mod, 'optionalAccess', _448 => _448.default])) return;
5254
+ if (!_optionalChain([mod, 'optionalAccess', _461 => _461.default])) return;
5204
5255
  const { layouts } = routeManager.matchRoute(page.urlPath);
5205
5256
  const layoutModules = await Promise.all(
5206
5257
  layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
@@ -5232,7 +5283,7 @@ if (import.meta.hot) {
5232
5283
  const i18nSnapshot = _chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, );
5233
5284
  const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
5234
5285
  const fullHtml = `<!DOCTYPE html>
5235
- <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _449 => _449.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5286
+ <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _462 => _462.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5236
5287
  <head>
5237
5288
  <meta charset="utf-8">
5238
5289
  <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -5277,12 +5328,12 @@ if (import.meta.hot) {
5277
5328
  watchChange(id, change) {
5278
5329
  const watched = _chunk7U4XF76Rcjs.toPosixPath.call(void 0, id);
5279
5330
  if (!watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched)) {
5280
- _optionalChain([farmApp, 'optionalAccess', _450 => _450.getRouteManager, 'call', _451 => _451(), 'access', _452 => _452.noteSourceChange, 'call', _453 => _453(id, change.event)]);
5331
+ _optionalChain([farmApp, 'optionalAccess', _463 => _463.getRouteManager, 'call', _464 => _464(), 'access', _465 => _465.noteSourceChange, 'call', _466 => _466(id, change.event)]);
5281
5332
  }
5282
- _chunk46UV2E7Icjs.invalidateFarmClientReachableModules.call(void 0, );
5283
- _chunk46UV2E7Icjs.invalidateFarmClientOnlyScan.call(void 0, );
5284
- _chunkCL7BUGVBcjs.invalidateFarmRouteRootInferences.call(void 0, );
5285
- _chunk46UV2E7Icjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5333
+ _chunkEFI6QWBQcjs.invalidateFarmClientReachableModules.call(void 0, );
5334
+ _chunkEFI6QWBQcjs.invalidateFarmClientOnlyScan.call(void 0, );
5335
+ _chunkJHRJ5V2Fcjs.invalidateFarmRouteRootInferences.call(void 0, );
5336
+ _chunkEFI6QWBQcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5286
5337
  },
5287
5338
  async handleHotUpdate(ctx) {
5288
5339
  if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
@@ -5307,7 +5358,7 @@ if (import.meta.hot) {
5307
5358
  server2.moduleGraph.invalidateModule(mod);
5308
5359
  }
5309
5360
  }
5310
- const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _454 => _454.getConfig, 'call', _455 => _455()]);
5361
+ const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _467 => _467.getConfig, 'call', _468 => _468()]);
5311
5362
  const normalizedFile = file.replace(/\\/g, "/");
5312
5363
  const reloadAfterEdit = () => {
5313
5364
  for (const files of pendingRouteReloads) {
@@ -5315,10 +5366,10 @@ if (import.meta.hot) {
5315
5366
  }
5316
5367
  server2.ws.send({ type: "full-reload", path: "*" });
5317
5368
  };
5318
- if (normalizedFile.includes(_chunk46UV2E7Icjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5369
+ if (normalizedFile.includes(_chunkEFI6QWBQcjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5319
5370
  path6.posix.join(
5320
- _chunk7U4XF76Rcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _456 => _456.root]) || options.root || server2.config.root),
5321
- _chunk46UV2E7Icjs.FARM_CLIENT_REFERENCE_DIRECTORY
5371
+ _chunk7U4XF76Rcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _469 => _469.root]) || options.root || server2.config.root),
5372
+ _chunkEFI6QWBQcjs.FARM_CLIENT_REFERENCE_DIRECTORY
5322
5373
  )
5323
5374
  ))
5324
5375
  return modules;
@@ -5326,7 +5377,7 @@ if (import.meta.hot) {
5326
5377
  (appDir) => normalizedFile.startsWith(`${_chunk7U4XF76Rcjs.toPosixPath.call(void 0, appDir)}/api/`)
5327
5378
  )) {
5328
5379
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
5329
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _457 => _457(`updated ${file}`)]);
5380
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _470 => _470(`updated ${file}`)]);
5330
5381
  reloadAfterEdit();
5331
5382
  return [];
5332
5383
  }
@@ -5336,7 +5387,7 @@ if (import.meta.hot) {
5336
5387
  for (const mod of modules) {
5337
5388
  server2.moduleGraph.invalidateModule(mod);
5338
5389
  }
5339
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _458 => _458(`updated ${file}`)]);
5390
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _471 => _471(`updated ${file}`)]);
5340
5391
  reloadAfterEdit();
5341
5392
  return [];
5342
5393
  }
@@ -5346,22 +5397,22 @@ if (import.meta.hot) {
5346
5397
  for (const mod of modules) {
5347
5398
  server2.moduleGraph.invalidateModule(mod);
5348
5399
  }
5349
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _459 => _459(`updated ${file}`)]);
5400
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _472 => _472(`updated ${file}`)]);
5350
5401
  reloadAfterEdit();
5351
5402
  return [];
5352
5403
  }
5353
5404
  if (apiRouteManager && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
5354
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _460 => _460(`updated ${file}`)]);
5405
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _473 => _473(`updated ${file}`)]);
5355
5406
  }
5356
- const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _461 => _461.experimental, 'optionalAccess', _462 => _462.isolatedClientHydration]);
5357
- const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _463 => _463.getRouteManager, 'call', _464 => _464()]);
5407
+ const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _474 => _474.experimental, 'optionalAccess', _475 => _475.isolatedClientHydration]);
5408
+ const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _476 => _476.getRouteManager, 'call', _477 => _477()]);
5358
5409
  const isHydrationPlanSource = /\.[cm]?[jt]sx?$/.test(normalizedFile) && !normalizedFile.includes("/node_modules/") && !isFarmGeneratedOutput(normalizedFile);
5359
- const tracksAsyncOwnerIslands = _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _465 => _465.renderer])) && planRouteManager !== void 0;
5410
+ const tracksAsyncOwnerIslands = _chunkNGTZHWBGcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _478 => _478.renderer])) && planRouteManager !== void 0;
5360
5411
  let clientPlanCurrent = false;
5361
5412
  if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
5362
5413
  const routeManager = planRouteManager;
5363
- await _optionalChain([ctx, 'access', _466 => _466.read, 'optionalCall', _467 => _467()]);
5364
- if (_optionalChain([routeManager, 'optionalAccess', _468 => _468.isEditPlanNeutral, 'call', _469 => _469(file)])) {
5414
+ await _optionalChain([ctx, 'access', _479 => _479.read, 'optionalCall', _480 => _480()]);
5415
+ if (_optionalChain([routeManager, 'optionalAccess', _481 => _481.isEditPlanNeutral, 'call', _482 => _482(file)])) {
5365
5416
  clientPlanCurrent = true;
5366
5417
  } else if (routeManager) {
5367
5418
  routeManager.noteSourceChange(file, "update");
@@ -5405,7 +5456,8 @@ if (import.meta.hot) {
5405
5456
  }
5406
5457
  }
5407
5458
  }
5408
- if (normalizedFile.includes("/app/")) {
5459
+ const rendererRouteFile = _optionalChain([farmApp, 'optionalAccess', _483 => _483.getRouteManager, 'call', _484 => _484(), 'access', _485 => _485.isRendererRouteModule, 'call', _486 => _486(normalizedFile)]) === true;
5460
+ if (normalizedFile.includes("/app/") || rendererRouteFile) {
5409
5461
  if (normalizedFile.includes("middleware.")) {
5410
5462
  if (middlewareManager) {
5411
5463
  await middlewareManager.reload();
@@ -5422,12 +5474,12 @@ if (import.meta.hot) {
5422
5474
  }
5423
5475
  return [];
5424
5476
  }
5425
- if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _470 => _470.getRouteManager, 'call', _471 => _471(), 'access', _472 => _472.invalidateClientManifest, 'call', _473 => _473()]);
5477
+ if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _487 => _487.getRouteManager, 'call', _488 => _488(), 'access', _489 => _489.invalidateClientManifest, 'call', _490 => _490()]);
5426
5478
  const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
5427
5479
  if (manifestModule) {
5428
5480
  server2.moduleGraph.invalidateModule(manifestModule);
5429
5481
  }
5430
- if (normalizedFile.includes("page.") || normalizedFile.includes("layout.")) {
5482
+ if (normalizedFile.includes("page.") || normalizedFile.includes("layout.") || rendererRouteFile) {
5431
5483
  const shortPath = normalizedFile.split("/app/")[1] || normalizedFile;
5432
5484
  logUpdate("PAGE", `updated ${shortPath}`);
5433
5485
  for (const mod of modules) {
@@ -5437,7 +5489,7 @@ if (import.meta.hot) {
5437
5489
  return [];
5438
5490
  }
5439
5491
  }
5440
- if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _474 => _474.environments, 'access', _475 => _475.client, 'optionalAccess', _476 => _476.moduleGraph, 'access', _477 => _477.getModulesByFile, 'call', _478 => _478(normalizedFile), 'optionalAccess', _479 => _479.size]) && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
5492
+ if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _491 => _491.environments, 'access', _492 => _492.client, 'optionalAccess', _493 => _493.moduleGraph, 'access', _494 => _494.getModulesByFile, 'call', _495 => _495(normalizedFile), 'optionalAccess', _496 => _496.size]) && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
5441
5493
  logUpdate("PAGE", `updated ${path6.basename(file)}`);
5442
5494
  reloadAfterEdit();
5443
5495
  return [];
@@ -5535,7 +5587,7 @@ function createPageDataMiddlewareResponse(res) {
5535
5587
  return (...args) => {
5536
5588
  if (captures(target.statusCode, target.getHeader("location"))) {
5537
5589
  const callback = args.find((arg) => typeof arg === "function");
5538
- _optionalChain([callback, 'optionalCall', _480 => _480()]);
5590
+ _optionalChain([callback, 'optionalCall', _497 => _497()]);
5539
5591
  return property === "write" ? true : response;
5540
5592
  }
5541
5593
  return target[property](...args);
@@ -5580,7 +5632,7 @@ function resolveDevelopmentRoot(farmRoot, viteRoot) {
5580
5632
  if (fs2.realpathSync(farmRoot) === fs2.realpathSync(viteRoot)) {
5581
5633
  return path6.resolve(viteRoot);
5582
5634
  }
5583
- } catch (e27) {
5635
+ } catch (e28) {
5584
5636
  }
5585
5637
  return farmRoot;
5586
5638
  }
@@ -5599,12 +5651,12 @@ function isFarmClientVirtualId(id) {
5599
5651
  }
5600
5652
  function isClientEnvironment(context, loadOptions) {
5601
5653
  const environment = context.environment;
5602
- if (_optionalChain([environment, 'optionalAccess', _481 => _481.config, 'optionalAccess', _482 => _482.consumer])) return environment.config.consumer === "client";
5603
- if (_optionalChain([environment, 'optionalAccess', _483 => _483.name])) return environment.name === "client";
5604
- return _optionalChain([loadOptions, 'optionalAccess', _484 => _484.ssr]) !== true;
5654
+ if (_optionalChain([environment, 'optionalAccess', _498 => _498.config, 'optionalAccess', _499 => _499.consumer])) return environment.config.consumer === "client";
5655
+ if (_optionalChain([environment, 'optionalAccess', _500 => _500.name])) return environment.name === "client";
5656
+ return _optionalChain([loadOptions, 'optionalAccess', _501 => _501.ssr]) !== true;
5605
5657
  }
5606
5658
  function invalidateProgrammaticClientRouteModules(server) {
5607
- const graph = _optionalChain([server, 'access', _485 => _485.environments, 'optionalAccess', _486 => _486.client, 'optionalAccess', _487 => _487.moduleGraph]);
5659
+ const graph = _optionalChain([server, 'access', _502 => _502.environments, 'optionalAccess', _503 => _503.client, 'optionalAccess', _504 => _504.moduleGraph]);
5608
5660
  if (!graph) return;
5609
5661
  for (const [id, module] of graph.idToModuleMap) {
5610
5662
  if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
@@ -5614,27 +5666,27 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
5614
5666
  const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5615
5667
  const routesFile = resolveRealModuleFile(parsed.filePath, root);
5616
5668
  watchFile(routesFile);
5617
- return _chunk46UV2E7Icjs.generateProgrammaticClientRouteModule.call(void 0, {
5669
+ return _chunkEFI6QWBQcjs.generateProgrammaticClientRouteModule.call(void 0, {
5618
5670
  kind: parsed.kind,
5619
5671
  routePath: parsed.routePath,
5620
5672
  routesFile,
5621
- route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _488 => _488.routes, 'access', _489 => _489.get, 'call', _490 => _490(
5622
- _chunk46UV2E7Icjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5673
+ route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _505 => _505.routes, 'access', _506 => _506.get, 'call', _507 => _507(
5674
+ _chunkEFI6QWBQcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5623
5675
  )]),
5624
5676
  // React's client module exports no createElement; the main client entry imports React too.
5625
- rendererClient: _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
5677
+ rendererClient: _chunkNGTZHWBGcjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
5626
5678
  toImportSpecifier: (file) => toProgrammaticRouteImportSpecifier(file, root)
5627
5679
  });
5628
5680
  }
5629
5681
  function resolveRealModuleFile(filePath, root) {
5630
- const resolved = _nullishCoalesce(_chunk46UV2E7Icjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5682
+ const resolved = _nullishCoalesce(_chunkEFI6QWBQcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5631
5683
  try {
5632
5684
  return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
5633
- } catch (e28) {
5685
+ } catch (e29) {
5634
5686
  return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, resolved);
5635
5687
  }
5636
5688
  }
5637
- function generateProgrammaticRouteModule(moduleId, root, renderer = _chunkM6DAIE4Tcjs.REACT_RENDERER) {
5689
+ function generateProgrammaticRouteModule(moduleId, root, renderer = _chunkNGTZHWBGcjs.REACT_RENDERER) {
5638
5690
  const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5639
5691
  if (!parsed) {
5640
5692
  return "";
@@ -5941,12 +5993,12 @@ async function parseRouteModuleProps(routeModule, input) {
5941
5993
  }
5942
5994
  const schemas = routeModule.__farmRouteSchemas;
5943
5995
  const params = parseRouteModuleSchema(
5944
- _optionalChain([schemas, 'optionalAccess', _491 => _491.params]),
5996
+ _optionalChain([schemas, 'optionalAccess', _508 => _508.params]),
5945
5997
  input.props.params,
5946
5998
  "params",
5947
5999
  input.routePath
5948
6000
  );
5949
- const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _492 => _492.search]), input.search, "search", input.routePath);
6001
+ const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _509 => _509.search]), input.search, "search", input.routePath);
5950
6002
  return {
5951
6003
  ...input.props,
5952
6004
  params,
@@ -5965,20 +6017,20 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
5965
6017
  throw new Error(`Invalid ${label} for route "${routePath}": ${message}`);
5966
6018
  }
5967
6019
  }
5968
- function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterReact, renderer = _chunkM6DAIE4Tcjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
5969
- const providerClientCode = _chunkCL7BUGVBcjs.generateFarmIntegrationProviderClientCode.call(void 0,
6020
+ function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterUI, renderer = _chunkNGTZHWBGcjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
6021
+ const providerClientCode = _chunkJHRJ5V2Fcjs.generateFarmIntegrationProviderClientCode.call(void 0,
5970
6022
  integrationProviders,
5971
6023
  root,
5972
6024
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
5973
6025
  );
5974
- const clientPluginEntry = _chunkZ5BANEQDcjs.generateFarmClientPluginEntryCode.call(void 0,
6026
+ const clientPluginEntry = _chunkDMSXZNQRcjs.generateFarmClientPluginEntryCode.call(void 0,
5975
6027
  plugins,
5976
6028
  root,
5977
6029
  srcDir,
5978
6030
  publicRuntimeConfig
5979
6031
  );
5980
- const appSetupPath = _chunkM6DAIE4Tcjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
5981
- const rendererClientImports = _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
6032
+ const appSetupPath = _chunkNGTZHWBGcjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
6033
+ const rendererClientImports = _chunkNGTZHWBGcjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
5982
6034
  import { hydrateRoot, createRoot } from 'react-dom/client'
5983
6035
  import { restorePagePosition } from '@farm.js/core/internal/client-runtime'` : (
5984
6036
  // Named exports only: a renderer's client module needs no default export. `React` is a
@@ -5993,9 +6045,11 @@ import { hydrateRoot, createRoot } from ${JSON.stringify(renderer.client)}
5993
6045
  const React = { ...__farmRendererClient }`
5994
6046
  );
5995
6047
  const isolatedHydrationImport = isolatedHydrationEnabled ? `${islandValues ? "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph, createFarmServerTreeElement, createFarmServerTreeLayout } from '@farm.js/core/internal/islands-runtime'" : "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph } from '@farm.js/core/internal/isolated-boundary'\nimport { createFarmServerTreeElement } from '@farm.js/core/internal/server-tree'"}` : "";
5996
- const docsAdapterImportBlock = _chunkSM2SYWARcjs.generateFarmDocsAdapterClientRuntime.call(void 0,
5997
- docsAdapterReact,
5998
- docsConfigModule
6048
+ const docsAdapterImportBlock = _chunkXJDB564Acjs.generateFarmDocsAdapterClientRuntime.call(void 0,
6049
+ docsAdapterUI,
6050
+ docsConfigModule,
6051
+ // Config resolution keeps an adapter to its UI's renderer, so this is the UI's renderer too.
6052
+ _chunkNGTZHWBGcjs.isReactRenderer.call(void 0, renderer) ? void 0 : renderer.client
5999
6053
  );
6000
6054
  const isolatedHydrationRuntime = isolatedHydrationEnabled ? `const farmIsolatedHydrationRuntime = createFarmIsolatedHydrationRuntime({
6001
6055
  ReactRuntime: React,
@@ -6030,7 +6084,7 @@ async function createFarmServerTreePageElement(source, pathname) {
6030
6084
  return null;
6031
6085
  }
6032
6086
  }
6033
- ${islandValues ? `${_chunkCL7BUGVBcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6087
+ ${islandValues ? `${_chunkJHRJ5V2Fcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6034
6088
  let farmLastRouteState = null;
6035
6089
 
6036
6090
  // A hot update to a layout tree's client module renders the route again.
@@ -6871,7 +6925,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
6871
6925
  return loadedLayouts;
6872
6926
  }
6873
6927
 
6874
- ${_chunkCL7BUGVBcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6928
+ ${_chunkJHRJ5V2Fcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6875
6929
  function wrapWithLoadedLayouts(element, loadedLayouts, params) {
6876
6930
  let wrapped = element;
6877
6931
  for (let index = loadedLayouts.length - 1; index >= 0; index--) {
@@ -6950,7 +7004,7 @@ async function buildWrappedHydrationElement(PageComponent, pageProps, layouts =
6950
7004
 
6951
7005
  function hydrateFarmRoute(container, route) {
6952
7006
  farmLastRouteState = route;
6953
- ${_chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) ? "return hydrateRoot(container, route.element);" : "return route.layouts.length > 0 ? hydrateRoot(container, route.element, route) : hydrateRoot(container, route.element);"}
7007
+ ${_chunkNGTZHWBGcjs.isReactRenderer.call(void 0, renderer) ? "return hydrateRoot(container, route.element);" : "return route.layouts.length > 0 ? hydrateRoot(container, route.element, route) : hydrateRoot(container, route.element);"}
6954
7008
  }
6955
7009
 
6956
7010
  function renderFarmRoute(root, route) {
@@ -7094,7 +7148,7 @@ async function tryHydrateImportedPage(
7094
7148
  wrap: wrapFarmClientRouteGraph,
7095
7149
  };
7096
7150
  } else if (useHydrate && container?.id === '__farm_page__') {
7097
- wrappedElement = wrapFarmClientRouteGraph(${_chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) ? "restorePagePosition(React, container, pageElement)" : "pageElement"});
7151
+ wrappedElement = wrapFarmClientRouteGraph(${_chunkNGTZHWBGcjs.isReactRenderer.call(void 0, renderer) ? "restorePagePosition(React, container, pageElement)" : "pageElement"});
7098
7152
  } else {
7099
7153
  wrappedElement = await buildWrappedHydrationElement(
7100
7154
  currentPageComponent,
@@ -7114,6 +7168,8 @@ async function tryHydrateImportedPage(
7114
7168
  window.__FARM_REACT_ROOT__ = reactRoot;
7115
7169
  return true;
7116
7170
  } catch (error) {
7171
+ // The page still works, but the server's DOM, focus, and typed input are gone, so say so.
7172
+ console.error('[Farm.js] Hydration error; rendering the page on the client instead:', error);
7117
7173
  appRoot = createRoot(container);
7118
7174
  if (routeState) renderFarmRoute(appRoot, routeState);
7119
7175
  else appRoot.render(wrappedElement);
@@ -7169,7 +7225,7 @@ function readActiveLayoutPatterns() {
7169
7225
  );
7170
7226
  }
7171
7227
 
7172
- ${_chunkCL7BUGVBcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7228
+ ${_chunkJHRJ5V2Fcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7173
7229
 
7174
7230
  function activateFragmentScripts(root) {
7175
7231
  for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
@@ -7228,7 +7284,7 @@ function getLayoutShell(root, patterns, index, find) {
7228
7284
  return shell.innerHTML;
7229
7285
  }
7230
7286
 
7231
- ${islandValues ? _chunkCL7BUGVBcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7287
+ ${islandValues ? _chunkJHRJ5V2Fcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7232
7288
  container,
7233
7289
  fragment,
7234
7290
  currentPatterns,
@@ -7250,6 +7306,8 @@ ${islandValues ? _chunkCL7BUGVBcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function repl
7250
7306
  ) {
7251
7307
  sharedCount++;
7252
7308
  }
7309
+ // After the comparison: a noscript turned to text serializes escaped in the template's document.
7310
+ adoptFarmParsedNodes(fragment);
7253
7311
 
7254
7312
  const fragmentTreeRoot = nextPatterns.length > 0
7255
7313
  ? find(fragment, nextPatterns[0])
@@ -7301,9 +7359,9 @@ ${islandValues ? `
7301
7359
  return nextTarget;
7302
7360
  }
7303
7361
 
7304
- ${islandValues ? `${_chunkCL7BUGVBcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7362
+ ${islandValues ? `${_chunkJHRJ5V2Fcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7305
7363
 
7306
- ${_chunkCL7BUGVBcjs.FARM_EARLY_NAVIGATION_SOURCE}
7364
+ ${_chunkJHRJ5V2Fcjs.FARM_EARLY_NAVIGATION_SOURCE}
7307
7365
 
7308
7366
  // Islands mode navigates as the production client does: it fetches the page itself, names the
7309
7367
  // layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
@@ -7473,9 +7531,12 @@ async function streamFarmDevNavigation(stream, root, generation) {
7473
7531
  observer.disconnect();
7474
7532
  return stream.cancel();
7475
7533
  }
7476
- const parsed = new DOMParser().parseFromString('<div id="root">' + flush, 'text/html');
7534
+ const parsed = new DOMParser()
7535
+ .parseFromString('<div id="root">' + flush, 'text/html')
7536
+ .getElementById('root');
7537
+ adoptFarmParsedNodes(parsed);
7477
7538
  const fragment = document.createDocumentFragment();
7478
- for (const node of Array.from(parsed.getElementById('root').childNodes)) fragment.appendChild(node);
7539
+ for (const node of Array.from(parsed.childNodes)) fragment.appendChild(node);
7479
7540
  activateFragmentScripts(fragment);
7480
7541
  root.appendChild(fragment);
7481
7542
  }
@@ -7628,6 +7689,7 @@ async function renderPage(pageData, info) {
7628
7689
  ${isolatedHydrationEnabled ? "disposeFarmIsolatedClientBoundaries(container);" : ""}
7629
7690
  if (appRoot) { try { appRoot.unmount(); } catch (error) {} appRoot = null; }
7630
7691
  if (reactRoot) { try { reactRoot.unmount(); } catch (error) {} reactRoot = null; }
7692
+ adoptFarmParsedNodes(fragment);
7631
7693
  container.replaceChildren(fragment);
7632
7694
  activateFragmentScripts(container);
7633
7695
  } else {
@@ -8004,9 +8066,9 @@ function generateClientManifest(bundle) {
8004
8066
  return manifest;
8005
8067
  }
8006
8068
  async function defineConfig(config = {}) {
8007
- const tailwindVitePlugin = await _chunkZ5BANEQDcjs.loadTailwindVitePlugin.call(void 0, );
8069
+ const tailwindVitePlugin = await _chunkDMSXZNQRcjs.loadTailwindVitePlugin.call(void 0, );
8008
8070
  const appRoot = path6.resolve(config.root || process.cwd());
8009
- if (_optionalChain([config, 'access', _493 => _493.extends, 'optionalAccess', _494 => _494.length])) {
8071
+ if (_optionalChain([config, 'access', _510 => _510.extends, 'optionalAccess', _511 => _511.length])) {
8010
8072
  const { config: layeredConfig } = await import("./layers-XLOMMQP7.cjs").then(
8011
8073
  ({ resolveFarmLayers }) => resolveFarmLayers(config, {
8012
8074
  root: appRoot,
@@ -8015,12 +8077,12 @@ async function defineConfig(config = {}) {
8015
8077
  );
8016
8078
  config = layeredConfig;
8017
8079
  }
8018
- config.renderer = _chunkM6DAIE4Tcjs.resolveFarmRenderer.call(void 0, config.renderer);
8019
- config.images = _chunkCL7BUGVBcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
8020
- const rendererVitePlugins = await _chunkM6DAIE4Tcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
8080
+ config.renderer = _chunkNGTZHWBGcjs.resolveFarmRenderer.call(void 0, config.renderer);
8081
+ config.images = _chunkJHRJ5V2Fcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
8082
+ const rendererVitePlugins = await _chunkNGTZHWBGcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
8021
8083
  ssr: true
8022
8084
  });
8023
- const reactRefreshPlugins = _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkY2FEFQAYcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
8085
+ const reactRefreshPlugins = _chunkNGTZHWBGcjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkY2FEFQAYcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
8024
8086
  const nodeBuiltinStubs = {
8025
8087
  "node:string_decoder": "data:text/javascript,export class StringDecoder { write(buf) { return ''; } end() { return ''; } }; export default StringDecoder;",
8026
8088
  "node:buffer": "data:text/javascript,export const Buffer = { from: () => ({}), alloc: () => ({}), isBuffer: () => false }; export default { Buffer };",
@@ -8108,13 +8170,13 @@ async function defineConfig(config = {}) {
8108
8170
  if (!serverStarted) {
8109
8171
  serverStarted = true;
8110
8172
  const elapsed = Date.now() - startTime;
8111
- const address = _optionalChain([server, 'access', _495 => _495.httpServer, 'optionalAccess', _496 => _496.address, 'call', _497 => _497()]);
8173
+ const address = _optionalChain([server, 'access', _512 => _512.httpServer, 'optionalAccess', _513 => _513.address, 'call', _514 => _514()]);
8112
8174
  const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
8113
8175
  const hostConfig = server.config.server.host;
8114
8176
  const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
8115
8177
  console.log("");
8116
8178
  console.log(
8117
- ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkNSLRK5DKcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8179
+ ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunk3CZ4MJHWcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8118
8180
  );
8119
8181
  console.log("");
8120
8182
  console.log(
@@ -8148,7 +8210,7 @@ async function defineConfig(config = {}) {
8148
8210
  plugins: [
8149
8211
  // `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
8150
8212
  _chunkY2FEFQAYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
8151
- _chunkCL7BUGVBcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8213
+ _chunkJHRJ5V2Fcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8152
8214
  tailwindVitePlugin,
8153
8215
  ...rendererVitePlugins,
8154
8216
  ...reactRefreshPlugins,
@@ -8158,14 +8220,14 @@ async function defineConfig(config = {}) {
8158
8220
  farmNavigationPlugin(config.renderer),
8159
8221
  farmIslandContainersPlugin(config),
8160
8222
  farmPlugin(config),
8161
- _chunk46UV2E7Icjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8223
+ _chunkEFI6QWBQcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8162
8224
  farmBrandingPlugin
8163
8225
  ],
8164
8226
  customLogger: farmLogger,
8165
8227
  clearScreen: false,
8166
8228
  optimizeDeps: {
8167
- ..._chunkCL7BUGVBcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8168
- _chunkCL7BUGVBcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8229
+ ..._chunkJHRJ5V2Fcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8230
+ _chunkJHRJ5V2Fcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8169
8231
  appRoot,
8170
8232
  _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
8171
8233
  ),
@@ -8209,7 +8271,7 @@ async function defineConfig(config = {}) {
8209
8271
  // Stub out problematic server-only modules during dev mode
8210
8272
  alias: {
8211
8273
  ..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, config.layers),
8212
- ..._chunkCL7BUGVBcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8274
+ ..._chunkJHRJ5V2Fcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8213
8275
  // Nitro internals that should not be resolved in browser
8214
8276
  "supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
8215
8277
  "@poppinss/dumper": "data:text/javascript,export default {};",