@farm.js/core 0.1.71 → 0.1.73

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 (256) hide show
  1. package/dist/{agent-mcp-handler-VIT4GOSR.mjs → agent-mcp-handler-RK7LDYEL.mjs} +5 -5
  2. package/dist/{agent-mcp-handler-KE4J3W7S.cjs → agent-mcp-handler-VBCA3WZ6.cjs} +6 -6
  3. package/dist/{agent-mcp.d-BzNw6JI8.d.ts → agent-mcp.d-D_gHjCAE.d.ts} +2 -2
  4. package/dist/{agent-mcp.d-CgFen3EH.d.mts → agent-mcp.d-PvEf-1mi.d.mts} +2 -2
  5. package/dist/agent-runtime.d.mts +4 -4
  6. package/dist/agent-runtime.d.ts +4 -4
  7. package/dist/{analyzer-VK3BAOFI.mjs → analyzer-MFYCJT75.mjs} +2 -2
  8. package/dist/analyzer-V5ZMRIIY.cjs +16 -0
  9. package/dist/api/node.d.mts +6 -6
  10. package/dist/api/node.d.ts +6 -6
  11. package/dist/api/route-manager.cjs +7 -6
  12. package/dist/api/route-manager.d.mts +8 -8
  13. package/dist/api/route-manager.d.ts +8 -8
  14. package/dist/api/route-manager.mjs +6 -5
  15. package/dist/api/runtime.d.mts +5 -5
  16. package/dist/api/runtime.d.ts +5 -5
  17. package/dist/api.cjs +8 -7
  18. package/dist/api.d.mts +9 -9
  19. package/dist/api.d.ts +9 -9
  20. package/dist/api.mjs +7 -6
  21. package/dist/{app-manifest.d-DY4JfJxi.d.ts → app-manifest.d-BpVTg43i.d.ts} +1 -1
  22. package/dist/{app-manifest.d-DpDK_B1k.d.mts → app-manifest.d-CN7cEWHX.d.mts} +1 -1
  23. package/dist/app-markdown.cjs +4 -4
  24. package/dist/app-markdown.d.mts +5 -5
  25. package/dist/app-markdown.d.ts +5 -5
  26. package/dist/app-markdown.mjs +3 -3
  27. package/dist/{app.d-D-5UNrFd.d.mts → app.d-BFWzAdTe.d.mts} +54 -6
  28. package/dist/{app.d-BeK6bb1c.d.ts → app.d-DO4PTCWm.d.ts} +54 -6
  29. package/dist/{chunk-7A3URI2F.mjs → chunk-2EVESLP3.mjs} +8 -1
  30. package/dist/{chunk-IYDJNCR7.mjs → chunk-462MUII7.mjs} +10 -5
  31. package/dist/{chunk-MWUDEYBI.mjs → chunk-4CTCSKAF.mjs} +1 -1
  32. package/dist/{chunk-SXMWVP2L.cjs → chunk-4YHGQDTT.cjs} +12 -12
  33. package/dist/{chunk-YCNHUIPR.cjs → chunk-4Z3YLMSW.cjs} +10 -10
  34. package/dist/{chunk-K66JILV3.cjs → chunk-5LOARKDP.cjs} +2 -2
  35. package/dist/{chunk-O32QPFVV.cjs → chunk-5PDMBWAF.cjs} +5 -5
  36. package/dist/{chunk-IGXS54GC.mjs → chunk-6O6PAZZR.mjs} +1 -1
  37. package/dist/{chunk-LXEJNWF5.mjs → chunk-73K53YPP.mjs} +2 -2
  38. package/dist/{chunk-2CQC5CMD.mjs → chunk-7GMBETHM.mjs} +1 -1
  39. package/dist/{chunk-W2T6NDNP.mjs → chunk-B67CW2LM.mjs} +2 -2
  40. package/dist/{chunk-CSQPMV3Q.cjs → chunk-CLEWORVY.cjs} +6 -6
  41. package/dist/{chunk-KPJYBSHL.mjs → chunk-CPMME66W.mjs} +149 -22
  42. package/dist/{chunk-BBPDJGCU.cjs → chunk-CYOTNHDF.cjs} +2 -2
  43. package/dist/{chunk-4OD2LXF2.mjs → chunk-CYRIIVD4.mjs} +26 -15
  44. package/dist/{chunk-DPIGYXSV.mjs → chunk-FRO4BB2T.mjs} +1 -1
  45. package/dist/{chunk-Y2SZVIVH.cjs → chunk-GPICBTDV.cjs} +8 -1
  46. package/dist/{chunk-N3XO5AL5.cjs → chunk-GPO3LJDJ.cjs} +2 -2
  47. package/dist/{chunk-MITIAOUQ.mjs → chunk-GZOKWJIW.mjs} +4 -4
  48. package/dist/{chunk-NAXKOTPP.cjs → chunk-HFUOLILA.cjs} +21 -21
  49. package/dist/{chunk-C2JOS77Z.cjs → chunk-HGB4PM2C.cjs} +178 -51
  50. package/dist/{chunk-2IFT2CSA.cjs → chunk-HTXKSREF.cjs} +515 -151
  51. package/dist/{chunk-Z3GPAFIA.mjs → chunk-HY6IVQ54.mjs} +1 -1
  52. package/dist/{chunk-X7LGLF33.mjs → chunk-IBVN7SW5.mjs} +480 -116
  53. package/dist/{chunk-DPYBVVL3.cjs → chunk-ILQ5DKYF.cjs} +2 -2
  54. package/dist/{chunk-V25GSH43.mjs → chunk-IXZSBO76.mjs} +1 -1
  55. package/dist/{chunk-RJUCNO7R.mjs → chunk-JMOCMXTQ.mjs} +1 -1
  56. package/dist/{chunk-UISZLYKY.cjs → chunk-KDOZORJD.cjs} +52 -41
  57. package/dist/{chunk-PLXD2MJV.cjs → chunk-KTDG4THT.cjs} +2 -2
  58. package/dist/{chunk-L6E4SHUB.cjs → chunk-LGR7565L.cjs} +6 -6
  59. package/dist/chunk-LRPPXKCX.mjs +58 -0
  60. package/dist/{chunk-GUU3IZSM.mjs → chunk-MJEKMT6B.mjs} +324 -148
  61. package/dist/chunk-NDOE76QC.cjs +58 -0
  62. package/dist/{chunk-2AM26UGI.cjs → chunk-NLBK37HI.cjs} +5 -4
  63. package/dist/{chunk-REP6HWJN.mjs → chunk-OBYM5S5G.mjs} +2 -2
  64. package/dist/{chunk-ZUVAGMQ5.cjs → chunk-ODBM54RT.cjs} +7 -7
  65. package/dist/{chunk-J5ASGNKF.mjs → chunk-OIP62QEL.mjs} +1 -1
  66. package/dist/{chunk-KEB7AGS6.cjs → chunk-OXNZUCHN.cjs} +16 -11
  67. package/dist/{chunk-2MR4MABG.cjs → chunk-PXAHSCR6.cjs} +58 -8
  68. package/dist/{chunk-7BUE2GM6.mjs → chunk-QGCSUC5O.mjs} +174 -81
  69. package/dist/{chunk-VXB5CMNC.cjs → chunk-QKEZLYON.cjs} +2 -2
  70. package/dist/{chunk-UQUOSNRN.mjs → chunk-REK6HZSU.mjs} +470 -267
  71. package/dist/{chunk-E77IA5IF.mjs → chunk-RLFGKJQ6.mjs} +1 -1
  72. package/dist/{chunk-3BQ7QHUH.cjs → chunk-ROCF6UQD.cjs} +17 -8
  73. package/dist/{chunk-KQAB5LML.mjs → chunk-SUQACHER.mjs} +2 -2
  74. package/dist/{chunk-NA77GEIU.mjs → chunk-SVQX5HYW.mjs} +53 -3
  75. package/dist/{chunk-KWST2O22.cjs → chunk-TAU3OF5B.cjs} +611 -435
  76. package/dist/{chunk-ZPUAOKHV.cjs → chunk-TDCP3Z4T.cjs} +3 -3
  77. package/dist/{chunk-3AUINHFG.mjs → chunk-TNYC3TYP.mjs} +3 -2
  78. package/dist/{chunk-TP4RAV7Y.cjs → chunk-TU6VAH4V.cjs} +8 -8
  79. package/dist/{chunk-MEJCP2LX.cjs → chunk-UVQRMUAR.cjs} +1 -1
  80. package/dist/{chunk-JMFTKNBA.mjs → chunk-UVZMSRHF.mjs} +2 -2
  81. package/dist/{chunk-MU5V7XHL.mjs → chunk-VJSXPN3W.mjs} +3 -0
  82. package/dist/{chunk-DU4VHHPJ.mjs → chunk-VO55MMBX.mjs} +1 -1
  83. package/dist/{chunk-GF22VGMS.cjs → chunk-VPETSSWN.cjs} +2 -2
  84. package/dist/{chunk-LDVJIBGN.mjs → chunk-VT25ERQK.mjs} +1 -1
  85. package/dist/{chunk-AYVGD3PK.mjs → chunk-XI3OXOMK.mjs} +1 -1
  86. package/dist/{chunk-7OHJWFLB.cjs → chunk-XUSJVHHD.cjs} +466 -373
  87. package/dist/{chunk-FILXOEWD.cjs → chunk-YXIQYWOK.cjs} +2 -2
  88. package/dist/{chunk-JVA4PIYN.cjs → chunk-YZK64PZT.cjs} +635 -432
  89. package/dist/{chunk-THG2TVDH.mjs → chunk-YZLEOMMA.mjs} +3 -3
  90. package/dist/{chunk-QUFENL7Q.mjs → chunk-Z3IN6GEX.mjs} +16 -7
  91. package/dist/{chunk-Q5HMVGR5.cjs → chunk-ZFEJ2SF2.cjs} +13 -13
  92. package/dist/{chunk-LNVGXUL3.cjs → chunk-ZMSVKVI3.cjs} +3 -0
  93. package/dist/{client-component.d-DwpH251K.d.mts → client-component.d-C71rMuHF.d.mts} +2 -2
  94. package/dist/{client-component.d-fYupugbZ.d.ts → client-component.d-sF-Znk0j.d.ts} +2 -2
  95. package/dist/{client-plugins.d-k3bOT5gz.d.mts → client-plugins.d-B-Gd9mWR.d.mts} +5 -4
  96. package/dist/{client-plugins.d-BxqFfHpM.d.ts → client-plugins.d-MFibjgBg.d.ts} +5 -4
  97. package/dist/client-plugins.d.mts +4 -4
  98. package/dist/client-plugins.d.ts +4 -4
  99. package/dist/client.cjs +1 -1
  100. package/dist/client.d.mts +9 -9
  101. package/dist/client.d.ts +9 -9
  102. package/dist/client.mjs +1 -1
  103. package/dist/config.d.mts +4 -4
  104. package/dist/config.d.ts +4 -4
  105. package/dist/desktop.d.mts +5 -5
  106. package/dist/desktop.d.ts +5 -5
  107. package/dist/{devtools-O5625KCK.cjs → devtools-6K4QXFRL.cjs} +7 -7
  108. package/dist/{devtools-6MXPFPNJ.mjs → devtools-TDIJ6HVC.mjs} +6 -6
  109. package/dist/docs.cjs +10 -10
  110. package/dist/docs.d.mts +5 -5
  111. package/dist/docs.d.ts +5 -5
  112. package/dist/docs.mjs +9 -9
  113. package/dist/environment/vite.cjs +3 -3
  114. package/dist/environment/vite.mjs +2 -2
  115. package/dist/{headers.d-sNT7ZQiU.d.mts → headers.d-BUxGJTsj.d.mts} +2 -2
  116. package/dist/{headers.d-DalIGbVO.d.ts → headers.d-uQ6BR59u.d.ts} +2 -2
  117. package/dist/i18n/client.cjs +3 -2
  118. package/dist/i18n/client.d.mts +2 -2
  119. package/dist/i18n/client.d.ts +2 -2
  120. package/dist/i18n/client.mjs +2 -1
  121. package/dist/i18n/index.cjs +3 -2
  122. package/dist/i18n/index.d.mts +3 -3
  123. package/dist/i18n/index.d.ts +3 -3
  124. package/dist/i18n/index.mjs +2 -1
  125. package/dist/i18n/server.cjs +6 -5
  126. package/dist/i18n/server.d.mts +5 -5
  127. package/dist/i18n/server.d.ts +5 -5
  128. package/dist/i18n/server.mjs +5 -4
  129. package/dist/index.cjs +32 -30
  130. package/dist/{index.d-BcA-secm.d.ts → index.d-BCGfxCXY.d.ts} +1 -1
  131. package/dist/{index.d-DDHHAv7j.d.mts → index.d-CuWOJ-un.d.mts} +1 -1
  132. package/dist/index.d.mts +24 -24
  133. package/dist/index.d.ts +24 -24
  134. package/dist/index.mjs +31 -29
  135. package/dist/integrations/orm.d.mts +4 -4
  136. package/dist/integrations/orm.d.ts +4 -4
  137. package/dist/integrations.d.mts +4 -4
  138. package/dist/integrations.d.ts +4 -4
  139. package/dist/internal/app-markdown-runtime.cjs +3 -3
  140. package/dist/internal/app-markdown-runtime.d.mts +5 -5
  141. package/dist/internal/app-markdown-runtime.d.ts +5 -5
  142. package/dist/internal/app-markdown-runtime.mjs +2 -2
  143. package/dist/internal/build-runtime.cjs +29 -29
  144. package/dist/internal/build-runtime.d.mts +6 -6
  145. package/dist/internal/build-runtime.d.ts +6 -6
  146. package/dist/internal/build-runtime.mjs +28 -28
  147. package/dist/internal/cli-runtime.cjs +12 -12
  148. package/dist/internal/cli-runtime.mjs +11 -11
  149. package/dist/internal/client-error-overlay.cjs +4 -4
  150. package/dist/internal/client-error-overlay.mjs +1 -1
  151. package/dist/internal/client-runtime.cjs +2 -2
  152. package/dist/internal/client-runtime.d.mts +7 -7
  153. package/dist/internal/client-runtime.d.ts +7 -7
  154. package/dist/internal/client-runtime.mjs +3 -3
  155. package/dist/internal/compression-runtime.d.mts +4 -4
  156. package/dist/internal/compression-runtime.d.ts +4 -4
  157. package/dist/internal/config-runtime.cjs +8 -8
  158. package/dist/internal/config-runtime.d.mts +7 -7
  159. package/dist/internal/config-runtime.d.ts +7 -7
  160. package/dist/internal/config-runtime.mjs +7 -7
  161. package/dist/internal/infra-analytics-runtime.cjs +10 -10
  162. package/dist/internal/infra-analytics-runtime.mjs +8 -8
  163. package/dist/internal/native-server-fns.cjs +4 -4
  164. package/dist/internal/native-server-fns.mjs +3 -3
  165. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  166. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  167. package/dist/internal/production-runtime.cjs +19 -19
  168. package/dist/internal/production-runtime.d.mts +37 -25
  169. package/dist/internal/production-runtime.d.ts +37 -25
  170. package/dist/internal/production-runtime.mjs +18 -18
  171. package/dist/internal/vercel-edge-middleware.d.mts +2 -2
  172. package/dist/internal/vercel-edge-middleware.d.ts +2 -2
  173. package/dist/markdown.cjs +2 -2
  174. package/dist/markdown.d.mts +4 -4
  175. package/dist/markdown.d.ts +4 -4
  176. package/dist/markdown.mjs +1 -1
  177. package/dist/middleware.cjs +3 -3
  178. package/dist/middleware.d.mts +5 -5
  179. package/dist/middleware.d.ts +5 -5
  180. package/dist/middleware.mjs +2 -2
  181. package/dist/mobile.d.mts +3 -3
  182. package/dist/mobile.d.ts +3 -3
  183. package/dist/{mount.d-C1PONsEe.d.mts → mount.d-BIYmcGGg.d.mts} +1 -1
  184. package/dist/{mount.d-D3JOux2V.d.ts → mount.d-q8k0cJV0.d.ts} +1 -1
  185. package/dist/{native-tree-L2IIEBXH.mjs → native-tree-OYGKP2NZ.mjs} +2 -2
  186. package/dist/{native-tree-GF4BH33L.cjs → native-tree-R6CQMDTI.cjs} +3 -3
  187. package/dist/{navigation-delegate.d-CQQPbdkE.d.ts → navigation-delegate.d-Btfs6Uoa.d.ts} +1 -1
  188. package/dist/{navigation-delegate.d-CJQQHboA.d.mts → navigation-delegate.d-CYBUupsv.d.mts} +1 -1
  189. package/dist/navigation.d.mts +7 -7
  190. package/dist/navigation.d.ts +7 -7
  191. package/dist/{observability.d-B2363jB6.d.mts → observability.d-DdJRiaIX.d.mts} +27 -3
  192. package/dist/{observability.d-B2363jB6.d.ts → observability.d-DdJRiaIX.d.ts} +27 -3
  193. package/dist/observability.d.mts +1 -1
  194. package/dist/observability.d.ts +1 -1
  195. package/dist/plugin.cjs +21 -21
  196. package/dist/plugin.d.mts +7 -7
  197. package/dist/plugin.d.ts +7 -7
  198. package/dist/plugin.mjs +20 -20
  199. package/dist/{production-runtime.d-B0IeWWyO.d.mts → production-runtime.d-Bcu37SCo.d.mts} +1 -1
  200. package/dist/{production-runtime.d-q3aHIv5Y.d.ts → production-runtime.d-qPj3XRET.d.ts} +1 -1
  201. package/dist/{render-plan.d-DHuJMJRP.d.ts → render-plan.d-0FHusf1D.d.ts} +1 -1
  202. package/dist/{render-plan.d-CiUj0rq5.d.mts → render-plan.d-BlyxqKMu.d.mts} +1 -1
  203. package/dist/renderer-client.cjs +3 -2
  204. package/dist/renderer-client.d.mts +7 -7
  205. package/dist/renderer-client.d.ts +7 -7
  206. package/dist/renderer-client.mjs +2 -1
  207. package/dist/{request.d-DRUbOmYD.d.ts → request.d-CPdVjssg.d.ts} +1 -1
  208. package/dist/{request.d-D-F7o7tb.d.mts → request.d-CX-gks1l.d.mts} +1 -1
  209. package/dist/request.d.mts +5 -5
  210. package/dist/request.d.ts +5 -5
  211. package/dist/{resolver.d-9iKC79CU.d.mts → resolver.d-DJgzbdsp.d.mts} +1 -1
  212. package/dist/{resolver.d-CY6mEa_F.d.ts → resolver.d-yaHcGCCG.d.ts} +1 -1
  213. package/dist/{route-rendering.d-6smgwT2t.d.mts → route-rendering.d-CcvZ_4N2.d.mts} +1 -1
  214. package/dist/{route-rendering.d-KwqM_mlK.d.ts → route-rendering.d-DcOoSNoG.d.ts} +1 -1
  215. package/dist/{router.d-BYmDeDlp.d.mts → router.d-C8RHma4A.d.mts} +1 -1
  216. package/dist/{router.d-B6sesMRD.d.ts → router.d-D2QnK8cM.d.ts} +1 -1
  217. package/dist/{routes.d-D3aJw1H5.d.mts → routes.d-CCccJRrp.d.mts} +1 -1
  218. package/dist/{routes.d-K-Qg79AA.d.ts → routes.d-b7khoRoU.d.ts} +1 -1
  219. package/dist/routes.d.mts +4 -4
  220. package/dist/routes.d.ts +4 -4
  221. package/dist/{routing.d-DwSUVZbF.d.mts → routing.d-BhPgtN_S.d.ts} +2 -1
  222. package/dist/{routing.d-BxOZ2YWc.d.ts → routing.d-D67HQmnv.d.mts} +2 -1
  223. package/dist/{rsc-pipeline-R2GOKIMU.mjs → rsc-pipeline-LC2FBZAR.mjs} +7 -7
  224. package/dist/{rsc-pipeline-P4PCWDO2.cjs → rsc-pipeline-NTAM65NT.cjs} +8 -8
  225. package/dist/{runtime-DP5DYGW5.mjs → runtime-MWAC7NWR.mjs} +7 -7
  226. package/dist/{runtime-WA2Q4SLG.cjs → runtime-U4PAMTVH.cjs} +9 -9
  227. package/dist/{runtime.d-CbdMI0Oy.d.ts → runtime.d-1l_1bLrL.d.ts} +1 -1
  228. package/dist/{runtime.d-BFSJf-ww.d.mts → runtime.d-BQUHHq8M.d.mts} +1 -1
  229. package/dist/{runtime.d-nUz0HAL4.d.mts → runtime.d-CTAXWZby.d.mts} +2 -2
  230. package/dist/{runtime.d-B_uPfMjA.d.ts → runtime.d-PUA5qBnd.d.ts} +2 -2
  231. package/dist/server-plugins.d.mts +6 -6
  232. package/dist/server-plugins.d.ts +6 -6
  233. package/dist/server.cjs +43 -41
  234. package/dist/server.d.mts +15 -15
  235. package/dist/server.d.ts +15 -15
  236. package/dist/server.mjs +26 -24
  237. package/dist/{spa-router.d-mC1D5cTN.d.ts → spa-router.d-BJtXNeqo.d.ts} +3 -3
  238. package/dist/{spa-router.d-D4EDwR20.d.mts → spa-router.d-BzPdi48R.d.mts} +3 -3
  239. package/dist/testing.cjs +6 -5
  240. package/dist/testing.d.mts +4 -4
  241. package/dist/testing.d.ts +4 -4
  242. package/dist/testing.mjs +6 -5
  243. package/dist/{types.d-wVRlLtBf.d.ts → types.d-euATAbE4.d.mts} +4 -0
  244. package/dist/{types.d-wVRlLtBf.d.mts → types.d-euATAbE4.d.ts} +4 -0
  245. package/dist/{utils.d-DxMzteqE.d.mts → utils.d-B4ZW-6z6.d.mts} +1 -1
  246. package/dist/{utils.d-A2X3a6z_.d.ts → utils.d-DquC6qxy.d.ts} +1 -1
  247. package/dist/version.cjs +2 -2
  248. package/dist/version.mjs +1 -1
  249. package/dist/vite.cjs +23 -21
  250. package/dist/vite.d.mts +18 -9
  251. package/dist/vite.d.ts +18 -9
  252. package/dist/vite.mjs +22 -20
  253. package/package.json +1 -1
  254. package/dist/analyzer-LPIVRSTJ.cjs +0 -16
  255. package/dist/chunk-V3UOEWCB.cjs +0 -46
  256. package/dist/chunk-VE3FWJBO.mjs +0 -46
@@ -31,7 +31,9 @@ var _chunkO47W53D3cjs = require('./chunk-O47W53D3.cjs');
31
31
 
32
32
 
33
33
 
34
- var _chunkKWST2O22cjs = require('./chunk-KWST2O22.cjs');
34
+
35
+
36
+ var _chunkTAU3OF5Bcjs = require('./chunk-TAU3OF5B.cjs');
35
37
 
36
38
 
37
39
 
@@ -46,7 +48,7 @@ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
46
48
 
47
49
 
48
50
 
49
- var _chunkCSQPMV3Qcjs = require('./chunk-CSQPMV3Q.cjs');
51
+ var _chunkCLEWORVYcjs = require('./chunk-CLEWORVY.cjs');
50
52
 
51
53
 
52
54
 
@@ -60,9 +62,7 @@ var _chunkPIUTGRDIcjs = require('./chunk-PIUTGRDI.cjs');
60
62
 
61
63
 
62
64
 
63
-
64
-
65
- var _chunk2MR4MABGcjs = require('./chunk-2MR4MABG.cjs');
65
+ var _chunkPXAHSCR6cjs = require('./chunk-PXAHSCR6.cjs');
66
66
 
67
67
 
68
68
  var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
@@ -80,13 +80,13 @@ var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
80
80
 
81
81
 
82
82
 
83
- var _chunkSXMWVP2Lcjs = require('./chunk-SXMWVP2L.cjs');
83
+ var _chunk4YHGQDTTcjs = require('./chunk-4YHGQDTT.cjs');
84
84
 
85
85
 
86
- var _chunkTP4RAV7Ycjs = require('./chunk-TP4RAV7Y.cjs');
86
+ var _chunkTU6VAH4Vcjs = require('./chunk-TU6VAH4V.cjs');
87
87
 
88
88
 
89
- var _chunkDPYBVVL3cjs = require('./chunk-DPYBVVL3.cjs');
89
+ var _chunkILQ5DKYFcjs = require('./chunk-ILQ5DKYF.cjs');
90
90
 
91
91
 
92
92
  var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
@@ -121,7 +121,12 @@ var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
121
121
 
122
122
 
123
123
 
124
- var _chunk2IFT2CSAcjs = require('./chunk-2IFT2CSA.cjs');
124
+
125
+
126
+
127
+
128
+
129
+ var _chunkHTXKSREFcjs = require('./chunk-HTXKSREF.cjs');
125
130
 
126
131
 
127
132
 
@@ -145,10 +150,10 @@ var _chunkSTF6VDYQcjs = require('./chunk-STF6VDYQ.cjs');
145
150
 
146
151
 
147
152
 
148
- var _chunkZUVAGMQ5cjs = require('./chunk-ZUVAGMQ5.cjs');
153
+ var _chunkODBM54RTcjs = require('./chunk-ODBM54RT.cjs');
149
154
 
150
155
 
151
- var _chunkO32QPFVVcjs = require('./chunk-O32QPFVV.cjs');
156
+ var _chunk5PDMBWAFcjs = require('./chunk-5PDMBWAF.cjs');
152
157
 
153
158
 
154
159
  var _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
@@ -178,15 +183,19 @@ var _chunk3EIPOTZVcjs = require('./chunk-3EIPOTZV.cjs');
178
183
 
179
184
 
180
185
 
181
- var _chunkL6E4SHUBcjs = require('./chunk-L6E4SHUB.cjs');
186
+ var _chunkLGR7565Lcjs = require('./chunk-LGR7565L.cjs');
182
187
 
183
188
 
184
189
 
190
+ var _chunk2HW5LWAHcjs = require('./chunk-2HW5LWAH.cjs');
185
191
 
186
192
 
187
193
 
188
194
 
189
- var _chunkC2JOS77Zcjs = require('./chunk-C2JOS77Z.cjs');
195
+
196
+
197
+
198
+ var _chunkHGB4PM2Ccjs = require('./chunk-HGB4PM2C.cjs');
190
199
 
191
200
 
192
201
 
@@ -216,10 +225,10 @@ var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
216
225
  var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
217
226
 
218
227
 
219
- var _chunkK66JILV3cjs = require('./chunk-K66JILV3.cjs');
228
+ var _chunk5LOARKDPcjs = require('./chunk-5LOARKDP.cjs');
220
229
 
221
230
 
222
- var _chunk2AM26UGIcjs = require('./chunk-2AM26UGI.cjs');
231
+ var _chunkNLBK37HIcjs = require('./chunk-NLBK37HI.cjs');
223
232
 
224
233
 
225
234
 
@@ -253,7 +262,7 @@ var _chunkJYNNIGQOcjs = require('./chunk-JYNNIGQO.cjs');
253
262
 
254
263
 
255
264
 
256
- var _chunkLNVGXUL3cjs = require('./chunk-LNVGXUL3.cjs');
265
+ var _chunkZMSVKVI3cjs = require('./chunk-ZMSVKVI3.cjs');
257
266
 
258
267
 
259
268
 
@@ -279,10 +288,7 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
279
288
  var _chunkEVIWKPJVcjs = require('./chunk-EVIWKPJV.cjs');
280
289
 
281
290
 
282
- var _chunkMEJCP2LXcjs = require('./chunk-MEJCP2LX.cjs');
283
-
284
-
285
- var _chunkDVJM55D2cjs = require('./chunk-DVJM55D2.cjs');
291
+ var _chunkUVQRMUARcjs = require('./chunk-UVQRMUAR.cjs');
286
292
 
287
293
 
288
294
  var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
@@ -306,6 +312,9 @@ var _chunkDBYNZIIQcjs = require('./chunk-DBYNZIIQ.cjs');
306
312
  var _chunkNLBHLPEOcjs = require('./chunk-NLBHLPEO.cjs');
307
313
 
308
314
 
315
+ var _chunkDVJM55D2cjs = require('./chunk-DVJM55D2.cjs');
316
+
317
+
309
318
 
310
319
 
311
320
 
@@ -1023,13 +1032,13 @@ function reportOpenAPIDevGenerationResult(spec, output = _chunkQMNWKQL4cjs.logge
1023
1032
  // src/vite.ts
1024
1033
  var SERVER_FN_TRANSFORM_PLUGIN = "@farm.js/plugin/rsc:server-fn-actions";
1025
1034
  function farmLlmsTxtGeneratedPaths(config) {
1026
- const llms = _chunkO32QPFVVcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([config, 'access', _57 => _57.agent, 'optionalAccess', _58 => _58.llmsTxt]));
1035
+ const llms = _chunk5PDMBWAFcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([config, 'access', _57 => _57.agent, 'optionalAccess', _58 => _58.llmsTxt]));
1027
1036
  if (!llms.enabled) return [];
1028
1037
  return llms.full ? ["/llms.txt", "/llms-full.txt"] : ["/llms.txt"];
1029
1038
  }
1030
1039
  function farmAgentGeneratedPaths(config) {
1031
- const crawlers = _chunkZUVAGMQ5cjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _59 => _59.agent, 'optionalAccess', _60 => _60.crawlers]));
1032
- const sitemap = _chunkZUVAGMQ5cjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _61 => _61.agent, 'optionalAccess', _62 => _62.sitemap]));
1040
+ const crawlers = _chunkODBM54RTcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _59 => _59.agent, 'optionalAccess', _60 => _60.crawlers]));
1041
+ const sitemap = _chunkODBM54RTcjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _61 => _61.agent, 'optionalAccess', _62 => _62.sitemap]));
1033
1042
  return [
1034
1043
  ...farmLlmsTxtGeneratedPaths(config),
1035
1044
  ...sitemap.enabled ? ["/sitemap.xml"] : [],
@@ -1074,7 +1083,7 @@ function loadFarmWorkflowsDevRuntime() {
1074
1083
  return import("./workflows.cjs");
1075
1084
  }
1076
1085
  function loadFarmDevtoolsSnapshotRuntime() {
1077
- return import("./devtools-O5625KCK.cjs");
1086
+ return import("./devtools-6K4QXFRL.cjs");
1078
1087
  }
1079
1088
  function loadFarmDevtoolsUIRuntime() {
1080
1089
  return import("./devtools-ui-SYRUXUA7.cjs");
@@ -1105,16 +1114,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
1105
1114
  var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
1106
1115
  var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
1107
1116
  var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
1108
- _chunkKWST2O22cjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1109
- new RegExp(`^${_chunk2IFT2CSAcjs.FARM_RESOLVE_FROM_PREFIX}`),
1117
+ _chunkTAU3OF5Bcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1118
+ new RegExp(`^${_chunkHTXKSREFcjs.FARM_RESOLVE_FROM_PREFIX}`),
1110
1119
  // What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
1111
1120
  // included.
1112
1121
  /^node:/,
1113
- _chunkKWST2O22cjs.exactIdPattern.call(void 0, _module.builtinModules)
1122
+ _chunkTAU3OF5Bcjs.exactIdPattern.call(void 0, _module.builtinModules)
1114
1123
  ];
1115
1124
  var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
1116
- _chunkKWST2O22cjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1117
- new RegExp(`^${_chunk2IFT2CSAcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1125
+ _chunkTAU3OF5Bcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1126
+ new RegExp(`^${_chunkHTXKSREFcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1118
1127
  ];
1119
1128
  function createFarmPlatformClientModule(platform) {
1120
1129
  return `export function platform() { return ${JSON.stringify(platform)}; }
@@ -1135,6 +1144,37 @@ function createFarmServerPrebundleConfig(bundledPackages) {
1135
1144
  }
1136
1145
  };
1137
1146
  }
1147
+ function farmIslandContainersPlugin(config) {
1148
+ let root = _nullishCoalesce(config.root, () => ( process.cwd()));
1149
+ return {
1150
+ name: "farm:island-containers",
1151
+ enforce: "pre",
1152
+ configResolved(resolved) {
1153
+ root = config.root || resolved.root;
1154
+ },
1155
+ transform(code, id) {
1156
+ if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _64 => _64.experimental, 'optionalAccess', _65 => _65.serverComponents])) !== "islands") {
1157
+ return null;
1158
+ }
1159
+ if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
1160
+ return null;
1161
+ }
1162
+ if (_chunkHTXKSREFcjs.hasUseClientDirective.call(void 0, code)) return null;
1163
+ const file = id.split("?", 1)[0];
1164
+ const bindings = _chunkHTXKSREFcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1165
+ if (bindings.length === 0) return null;
1166
+ const grown = _chunkHTXKSREFcjs.wrapFarmIslandContainers.call(void 0, {
1167
+ code,
1168
+ file,
1169
+ bindings,
1170
+ reference: _chunkHTXKSREFcjs.farmIslandContainerReferencePath.call(void 0, root)
1171
+ });
1172
+ if (grown === null) return null;
1173
+ _chunkHTXKSREFcjs.ensureFarmIslandContainerReference.call(void 0, root);
1174
+ return { code: grown, map: null };
1175
+ }
1176
+ };
1177
+ }
1138
1178
  function farmServerOnlyEntriesPlugin(options = {}) {
1139
1179
  let root = process.cwd();
1140
1180
  let vercelOgInstalled = false;
@@ -1142,11 +1182,11 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1142
1182
  name: "farm:server-only-entries",
1143
1183
  enforce: "pre",
1144
1184
  config(config) {
1145
- const bundledPackages = _chunk2IFT2CSAcjs.collectFarmServerBundledPackageInfo.call(void 0,
1185
+ const bundledPackages = _chunkHTXKSREFcjs.collectFarmServerBundledPackageInfo.call(void 0,
1146
1186
  path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())))
1147
1187
  );
1148
1188
  return {
1149
- optimizeDeps: { rolldownOptions: { plugins: [_chunk2IFT2CSAcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
1189
+ optimizeDeps: { rolldownOptions: { plugins: [_chunkHTXKSREFcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
1150
1190
  ssr: {
1151
1191
  noExternal: [
1152
1192
  // Resolve `server-only` here rather than in Node, which would load its throwing build.
@@ -1164,19 +1204,19 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1164
1204
  resolveId: {
1165
1205
  filter: { id: FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER },
1166
1206
  handler(id, importer, options2) {
1167
- if (id === FARM_PLATFORM_ENTRY) return _optionalChain([options2, 'optionalAccess', _64 => _64.ssr]) ? null : FARM_PLATFORM_CLIENT_ID;
1207
+ if (id === FARM_PLATFORM_ENTRY) return _optionalChain([options2, 'optionalAccess', _66 => _66.ssr]) ? null : FARM_PLATFORM_CLIENT_ID;
1168
1208
  if (id === SERVER_ONLY_PACKAGE) {
1169
- if (_optionalChain([options2, 'optionalAccess', _65 => _65.ssr]) || _optionalChain([options2, 'optionalAccess', _66 => _66.scan])) {
1209
+ if (_optionalChain([options2, 'optionalAccess', _67 => _67.ssr]) || _optionalChain([options2, 'optionalAccess', _68 => _68.scan])) {
1170
1210
  return FARM_SERVER_ONLY_PACKAGE_ID;
1171
1211
  }
1172
1212
  this.error(
1173
1213
  `${_nullishCoalesce(importer, () => ( "A module"))} imports "server-only", so it must not reach the browser, but client code imports it. Move what the client needs out of that module, or call it from a server component, server function or API route.`
1174
1214
  );
1175
1215
  }
1176
- if (!_optionalChain([options2, 'optionalAccess', _67 => _67.ssr]) && _module.isBuiltin.call(void 0, id)) {
1177
- return _chunk2IFT2CSAcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1216
+ if (!_optionalChain([options2, 'optionalAccess', _69 => _69.ssr]) && _module.isBuiltin.call(void 0, id)) {
1217
+ return _chunkHTXKSREFcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1178
1218
  }
1179
- const resolveFrom = importer ? _chunk2IFT2CSAcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1219
+ const resolveFrom = importer ? _chunkHTXKSREFcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1180
1220
  if (resolveFrom) {
1181
1221
  const directory = path6.dirname(resolveFrom.importer);
1182
1222
  return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
@@ -1191,7 +1231,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1191
1231
  }
1192
1232
  if (!FARM_SERVER_ONLY_ENTRIES.has(id)) return null;
1193
1233
  const importedBy = importer ? ` (imported by ${importer})` : "";
1194
- if (!_optionalChain([options2, 'optionalAccess', _68 => _68.ssr])) {
1234
+ if (!_optionalChain([options2, 'optionalAccess', _70 => _70.ssr])) {
1195
1235
  this.error(
1196
1236
  `${id} is server-only and cannot be imported into client code${importedBy}. Use it from an API route or another server module.`
1197
1237
  );
@@ -1212,7 +1252,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1212
1252
  if (id === FARM_PLATFORM_CLIENT_ID) {
1213
1253
  return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))));
1214
1254
  }
1215
- return _nullishCoalesce(_chunk2IFT2CSAcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1255
+ return _nullishCoalesce(_chunkHTXKSREFcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1216
1256
  }
1217
1257
  }
1218
1258
  };
@@ -1245,10 +1285,10 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
1245
1285
  if (!snapshot) return "";
1246
1286
  const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
1247
1287
  if (snapshot.routing === "none") return runtime;
1248
- return `${_chunk2MR4MABGcjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1288
+ return `${_chunkPXAHSCR6cjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1249
1289
  }
1250
1290
  function getPublicEnvDefine(config) {
1251
- const publicEnv = _optionalChain([config, 'access', _69 => _69.env, 'optionalAccess', _70 => _70.public]);
1291
+ const publicEnv = _optionalChain([config, 'access', _71 => _71.env, 'optionalAccess', _72 => _72.public]);
1252
1292
  if (!isResolvedEnvScope(publicEnv)) {
1253
1293
  return {};
1254
1294
  }
@@ -1287,7 +1327,7 @@ function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request)
1287
1327
  return;
1288
1328
  }
1289
1329
  if (res.headersSent) {
1290
- _optionalChain([res, 'access', _71 => _71.destroy, 'optionalCall', _72 => _72(error instanceof Error ? error : new Error(String(error)))]);
1330
+ _optionalChain([res, 'access', _73 => _73.destroy, 'optionalCall', _74 => _74(error instanceof Error ? error : new Error(String(error)))]);
1291
1331
  return;
1292
1332
  }
1293
1333
  res.statusCode = 500;
@@ -1423,7 +1463,7 @@ function interceptFarmDevPageResponse(options) {
1423
1463
  const originalWrite = res.write.bind(res);
1424
1464
  const originalEnd = res.end.bind(res);
1425
1465
  const originalWriteHead = res.writeHead.bind(res);
1426
- const originalFlushHeaders = _optionalChain([res, 'access', _73 => _73.flushHeaders, 'optionalAccess', _74 => _74.bind, 'call', _75 => _75(res)]);
1466
+ const originalFlushHeaders = _optionalChain([res, 'access', _75 => _75.flushHeaders, 'optionalAccess', _76 => _76.bind, 'call', _77 => _77(res)]);
1427
1467
  let afterResponseCalled = false;
1428
1468
  let interceptedEnd = false;
1429
1469
  const restore = () => {
@@ -1485,7 +1525,7 @@ function interceptFarmDevPageResponse(options) {
1485
1525
  ).then(async (runtimeResponse) => {
1486
1526
  applyWebResponseToNodeResponse(runtimeResponse, res);
1487
1527
  if (!res.headersSent) originalWriteHead(res.statusCode);
1488
- _optionalChain([originalFlushHeaders, 'optionalCall', _76 => _76()]);
1528
+ _optionalChain([originalFlushHeaders, 'optionalCall', _78 => _78()]);
1489
1529
  if (!runtimeResponse.body) return;
1490
1530
  const reader = runtimeResponse.body.getReader();
1491
1531
  for (; ; ) {
@@ -1534,7 +1574,7 @@ function interceptFarmDevPageResponse(options) {
1534
1574
  if (streamsThroughRuntime()) {
1535
1575
  streamRuntimeChunk(bufferChunk);
1536
1576
  const callback = args.find((arg) => typeof arg === "function");
1537
- _optionalChain([callback, 'optionalCall', _77 => _77()]);
1577
+ _optionalChain([callback, 'optionalCall', _79 => _79()]);
1538
1578
  return true;
1539
1579
  }
1540
1580
  if (isHtmlResponse && bufferChunk) {
@@ -1546,7 +1586,7 @@ function interceptFarmDevPageResponse(options) {
1546
1586
  const shouldBufferResponse = isHtmlResponse ? bufferPluginResponse : Boolean(runtimeSession && hasRuntimeAfterHook);
1547
1587
  if (shouldBufferResponse) {
1548
1588
  const callback = args.find((arg) => typeof arg === "function");
1549
- _optionalChain([callback, 'optionalCall', _78 => _78()]);
1589
+ _optionalChain([callback, 'optionalCall', _80 => _80()]);
1550
1590
  return true;
1551
1591
  }
1552
1592
  const writeResult = originalWrite(chunk, ...args);
@@ -1698,13 +1738,13 @@ function getEnvDefines(config, configEnv) {
1698
1738
  )
1699
1739
  )
1700
1740
  };
1701
- if (_optionalChain([configEnv, 'optionalAccess', _79 => _79.isSsrBuild])) {
1741
+ if (_optionalChain([configEnv, 'optionalAccess', _81 => _81.isSsrBuild])) {
1702
1742
  defines.__FARM_ENV__ = JSON.stringify(_chunk3EIPOTZVcjs.createBundledEnv.call(void 0, getFullEnvDefine(config)));
1703
1743
  }
1704
1744
  return defines;
1705
1745
  }
1706
1746
  function getFarmAPIBaseURLDefine(config) {
1707
- const baseURL = _optionalChain([config, 'access', _80 => _80.api, 'optionalAccess', _81 => _81.baseURL]);
1747
+ const baseURL = _optionalChain([config, 'access', _82 => _82.api, 'optionalAccess', _83 => _83.baseURL]);
1708
1748
  return typeof baseURL === "string" && baseURL ? baseURL : _chunkPMJSG4JScjs.DEFAULT_FARM_API_BASE_PATH;
1709
1749
  }
1710
1750
  function isResolvedEnvScope(value) {
@@ -1826,7 +1866,7 @@ function transformIsolatedClientBoundaryModule(options) {
1826
1866
  return null;
1827
1867
  }
1828
1868
  const body = Array.isArray(ast.body) ? ast.body : [];
1829
- const everyExportIsComponent = options.code.includes(_chunk2IFT2CSAcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunk2IFT2CSAcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
1869
+ const everyExportIsComponent = options.code.includes(_chunkHTXKSREFcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkHTXKSREFcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
1830
1870
  const replacements = [];
1831
1871
  const wrapperStatements = [];
1832
1872
  const originalEntries = [];
@@ -1845,9 +1885,9 @@ function transformIsolatedClientBoundaryModule(options) {
1845
1885
  transformedExports++;
1846
1886
  };
1847
1887
  for (const node of body) {
1848
- if (_optionalChain([node, 'optionalAccess', _82 => _82.type]) === "ExportDefaultDeclaration" && node.declaration) {
1888
+ if (_optionalChain([node, 'optionalAccess', _84 => _84.type]) === "ExportDefaultDeclaration" && node.declaration) {
1849
1889
  const declaration2 = node.declaration;
1850
- if ((declaration2.type === "FunctionDeclaration" || declaration2.type === "ClassDeclaration") && _optionalChain([declaration2, 'access', _83 => _83.id, 'optionalAccess', _84 => _84.name])) {
1890
+ if ((declaration2.type === "FunctionDeclaration" || declaration2.type === "ClassDeclaration") && _optionalChain([declaration2, 'access', _85 => _85.id, 'optionalAccess', _86 => _86.name])) {
1851
1891
  replacements.push({
1852
1892
  start: node.start,
1853
1893
  end: node.end,
@@ -1865,11 +1905,11 @@ function transformIsolatedClientBoundaryModule(options) {
1865
1905
  }
1866
1906
  continue;
1867
1907
  }
1868
- if (_optionalChain([node, 'optionalAccess', _85 => _85.type]) === "ExportNamedDeclaration" && !node.declaration && node.exportKind !== "type") {
1908
+ if (_optionalChain([node, 'optionalAccess', _87 => _87.type]) === "ExportNamedDeclaration" && !node.declaration && node.exportKind !== "type") {
1869
1909
  const specifiers = (node.specifiers || []).filter(
1870
1910
  (specifier) => specifier.type === "ExportSpecifier" && specifier.exportKind !== "type"
1871
1911
  );
1872
- const specifierName = (name) => _nullishCoalesce(_optionalChain([name, 'optionalAccess', _86 => _86.name]), () => ( String(_nullishCoalesce(_optionalChain([name, 'optionalAccess', _87 => _87.value]), () => ( "")))));
1912
+ const specifierName = (name) => _nullishCoalesce(_optionalChain([name, 'optionalAccess', _88 => _88.name]), () => ( String(_nullishCoalesce(_optionalChain([name, 'optionalAccess', _89 => _89.value]), () => ( "")))));
1873
1913
  const isComponentExport = (specifier) => {
1874
1914
  const exported = specifierName(specifier.exported);
1875
1915
  return everyExportIsComponent || exported === "default" || /^[A-Z]/.test(exported);
@@ -1896,14 +1936,14 @@ function transformIsolatedClientBoundaryModule(options) {
1896
1936
  if (kept.length > 0) wrapperStatements.push(`export { ${kept.join(", ")} };`);
1897
1937
  continue;
1898
1938
  }
1899
- if (_optionalChain([node, 'optionalAccess', _88 => _88.type]) !== "ExportNamedDeclaration" || !node.declaration) continue;
1939
+ if (_optionalChain([node, 'optionalAccess', _90 => _90.type]) !== "ExportNamedDeclaration" || !node.declaration) continue;
1900
1940
  const declaration = node.declaration;
1901
1941
  const declaredNames = [];
1902
- if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && _optionalChain([declaration, 'access', _89 => _89.id, 'optionalAccess', _90 => _90.name])) {
1942
+ if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && _optionalChain([declaration, 'access', _91 => _91.id, 'optionalAccess', _92 => _92.name])) {
1903
1943
  declaredNames.push(declaration.id.name);
1904
1944
  } else if (declaration.type === "VariableDeclaration") {
1905
1945
  for (const declarator of declaration.declarations || []) {
1906
- if (_optionalChain([declarator, 'access', _91 => _91.id, 'optionalAccess', _92 => _92.type]) === "Identifier") declaredNames.push(declarator.id.name);
1946
+ if (_optionalChain([declarator, 'access', _93 => _93.id, 'optionalAccess', _94 => _94.type]) === "Identifier") declaredNames.push(declarator.id.name);
1907
1947
  }
1908
1948
  }
1909
1949
  const componentNames = declaredNames.filter((name) => /^[A-Z]/.test(name));
@@ -1972,7 +2012,7 @@ function warnClientBoundaryOnce(context, id, code, config) {
1972
2012
  } catch (e20) {
1973
2013
  return;
1974
2014
  }
1975
- const publicKeys = new Set(Object.keys(_nullishCoalesce(_optionalChain([config, 'access', _93 => _93.env, 'optionalAccess', _94 => _94.public]), () => ( {}))));
2015
+ const publicKeys = new Set(Object.keys(_nullishCoalesce(_optionalChain([config, 'access', _95 => _95.env, 'optionalAccess', _96 => _96.public]), () => ( {}))));
1976
2016
  const findings = analyzeClientBoundary(program, publicKeys);
1977
2017
  if (findings.envKeys.length === 0 && findings.publicEnvKeys.length === 0 && findings.builtinImports.length === 0) {
1978
2018
  return;
@@ -2014,16 +2054,43 @@ function hasFarmSourceAliasOverride(alias) {
2014
2054
  function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2015
2055
  const rendererDisabled = _chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, options.renderer);
2016
2056
  const imageImports = farmImageImportsPlugin();
2017
- const fontImports = _chunkKWST2O22cjs.farmFontImportsPlugin.call(void 0, {
2057
+ const fontImports = _chunkTAU3OF5Bcjs.farmFontImportsPlugin.call(void 0, {
2018
2058
  root: options.root,
2019
2059
  basePath: options.basePath,
2020
2060
  publicDir: options.publicDir
2021
2061
  });
2022
2062
  let farmApp;
2063
+ const isFarmGeneratedOutput = (file) => {
2064
+ const root = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _97 => _97.getConfig, 'call', _98 => _98(), 'access', _99 => _99.root]), () => ( options.root));
2065
+ if (!root) return file.includes("/.farm/");
2066
+ const output = _chunkQMNWKQL4cjs.toPosixPath.call(void 0, path6.resolve(root, options.distDir || ".farm"));
2067
+ return file === output || file.startsWith(`${output}/`);
2068
+ };
2023
2069
  let serverFnTransformActive = false;
2070
+ const getFarmRenderedServerModules = () => {
2071
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _100 => _100.getRouteManager, 'call', _101 => _101()]);
2072
+ if (!routeManager) return /* @__PURE__ */ new Set();
2073
+ const files = /* @__PURE__ */ new Set();
2074
+ for (const entries of [
2075
+ routeManager.getRoutes(),
2076
+ routeManager.getLayouts(),
2077
+ routeManager.getLoadings(),
2078
+ routeManager.getErrors(),
2079
+ routeManager.getRouteSlots()
2080
+ ]) {
2081
+ for (const entry of entries.values()) files.add(entry.modulePath);
2082
+ }
2083
+ const config = farmApp.getConfig();
2084
+ const mdxComponents = _chunk2HW5LWAHcjs.resolveFarmMdxComponentsModulePath.call(void 0,
2085
+ _chunk2HW5LWAHcjs.resolveMdxConfig.call(void 0, config.mdx),
2086
+ config.root
2087
+ );
2088
+ if (mdxComponents) files.add(mdxComponents);
2089
+ return files;
2090
+ };
2024
2091
  const islandsServerFns = () => {
2025
- const config = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _95 => _95.getConfig, 'call', _96 => _96()]), () => ( options));
2026
- return _optionalChain([config, 'access', _97 => _97.experimental, 'optionalAccess', _98 => _98.serverActions]) === true && _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _99 => _99.experimental, 'optionalAccess', _100 => _100.serverComponents])) === "islands";
2092
+ const config = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _102 => _102.getConfig, 'call', _103 => _103()]), () => ( options));
2093
+ return _optionalChain([config, 'access', _104 => _104.experimental, 'optionalAccess', _105 => _105.serverActions]) === true && _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _106 => _106.experimental, 'optionalAccess', _107 => _107.serverComponents])) === "islands";
2027
2094
  };
2028
2095
  let reactRefreshActive = false;
2029
2096
  let server;
@@ -2052,9 +2119,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2052
2119
  ].join(" ");
2053
2120
  console.log(log);
2054
2121
  };
2055
- const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _101 => _101.getRouteManager, 'call', _102 => _102(), 'access', _103 => _103.getProgrammaticClientRoutes, 'call', _104 => _104()])));
2122
+ const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _108 => _108.getRouteManager, 'call', _109 => _109(), 'access', _110 => _110.getProgrammaticClientRoutes, 'call', _111 => _111()])));
2056
2123
  const isOutsideAppRoot = (file) => {
2057
- const root = _optionalChain([farmApp, 'optionalAccess', _105 => _105.getConfig, 'call', _106 => _106(), 'access', _107 => _107.root]) || _optionalChain([server, 'optionalAccess', _108 => _108.config, 'access', _109 => _109.root]) || options.root;
2124
+ const root = _optionalChain([farmApp, 'optionalAccess', _112 => _112.getConfig, 'call', _113 => _113(), 'access', _114 => _114.root]) || _optionalChain([server, 'optionalAccess', _115 => _115.config, 'access', _116 => _116.root]) || options.root;
2058
2125
  if (!root) return false;
2059
2126
  const relative4 = path6.relative(root, file.split("?", 1)[0]);
2060
2127
  return relative4.startsWith("..") || path6.isAbsolute(relative4);
@@ -2066,14 +2133,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2066
2133
  isBuild = configEnv.command === "build";
2067
2134
  const farmAliases = {
2068
2135
  ..._chunkMTBDJ326cjs.getFarmLayerAliases.call(void 0, options.layers),
2069
- ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _110 => _110.resolve, 'optionalAccess', _111 => _111.alias])) ? {} : _chunkKWST2O22cjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2136
+ ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _117 => _117.resolve, 'optionalAccess', _118 => _118.alias])) ? {} : _chunkTAU3OF5Bcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2070
2137
  };
2071
2138
  if (Object.keys(farmAliases).length > 0) {
2072
2139
  _nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
2073
- userConfig.resolve.alias = _chunkKWST2O22cjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2140
+ userConfig.resolve.alias = _chunkTAU3OF5Bcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2074
2141
  }
2075
2142
  const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
2076
- farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _112 => _112.server, 'optionalAccess', _113 => _113.cors]) === void 0;
2143
+ farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _119 => _119.server, 'optionalAccess', _120 => _120.cors]) === void 0;
2077
2144
  return {
2078
2145
  // Honor Farm's publicDir so the dev server serves the same static
2079
2146
  // directory the production client build emits.
@@ -2086,11 +2153,23 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2086
2153
  ...farmOwnsDevCors ? { cors: false } : {},
2087
2154
  fs: {
2088
2155
  ...layerRoots.length ? { allow: [path6.resolve(options.root || process.cwd()), ...layerRoots] } : {},
2089
- deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access', _114 => _114.server, 'optionalAccess', _115 => _115.fs, 'optionalAccess', _116 => _116.deny]), options)
2156
+ deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access', _121 => _121.server, 'optionalAccess', _122 => _122.fs, 'optionalAccess', _123 => _123.deny]), options)
2090
2157
  }
2091
2158
  }
2092
2159
  };
2093
2160
  },
2161
+ configEnvironment(name, environmentConfig, env) {
2162
+ if (env.command !== "serve" || name !== "ssr" && name !== "rsc" || _optionalChain([environmentConfig, 'access', _124 => _124.dev, 'optionalAccess', _125 => _125.createEnvironment])) {
2163
+ return;
2164
+ }
2165
+ return {
2166
+ dev: {
2167
+ createEnvironment: (environmentName, config) => _vite.createRunnableDevEnvironment.call(void 0, environmentName, config, {
2168
+ runnerOptions: { sourcemapInterceptor: "prepareStackTrace" }
2169
+ })
2170
+ }
2171
+ };
2172
+ },
2094
2173
  async configResolved(config) {
2095
2174
  if (typeof fontImports.configResolved === "function") {
2096
2175
  await fontImports.configResolved.call(this, config);
@@ -2099,7 +2178,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2099
2178
  (plugin2) => plugin2.name === SERVER_FN_TRANSFORM_PLUGIN
2100
2179
  );
2101
2180
  reactRefreshActive = _chunk3QM74STYcjs.isFarmReactRefreshActive.call(void 0, config);
2102
- if (_optionalChain([options, 'access', _117 => _117.experimental, 'optionalAccess', _118 => _118.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
2181
+ if (_optionalChain([options, 'access', _126 => _126.experimental, 'optionalAccess', _127 => _127.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
2103
2182
  _chunkQMNWKQL4cjs.logger.warn(
2104
2183
  "experimental.serverActions has no effect without @farm.js/plugin/rsc in the Vite plugins. Server functions stay server-only, and importing one from client code is a build error."
2105
2184
  );
@@ -2108,20 +2187,20 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2108
2187
  async configureServer(viteServer) {
2109
2188
  viteServer.middlewares.use(
2110
2189
  createFarmDevPreviewGuard(viteServer, {
2111
- getSourceRoots: () => _chunkMTBDJ326cjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _119 => _119.getConfig, 'call', _120 => _120()]), () => ( options)))
2190
+ getSourceRoots: () => _chunkMTBDJ326cjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _128 => _128.getConfig, 'call', _129 => _129()]), () => ( options)))
2112
2191
  })
2113
2192
  );
2114
2193
  if (typeof fontImports.configureServer === "function") {
2115
2194
  await fontImports.configureServer.call(this, viteServer);
2116
2195
  }
2117
2196
  server = viteServer;
2118
- const farmMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _121 => _121.pre, 'access', _122 => _122.target]), () => ( viteServer.middlewares));
2119
- const farmPostMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _123 => _123.post, 'access', _124 => _124.target]), () => ( viteServer.middlewares));
2197
+ const farmMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _130 => _130.pre, 'access', _131 => _131.target]), () => ( viteServer.middlewares));
2198
+ const farmPostMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _132 => _132.post, 'access', _133 => _133.target]), () => ( viteServer.middlewares));
2120
2199
  const pm = initialPluginManager;
2121
2200
  const configRoutePlugins = new Set(
2122
- _optionalChain([pm, 'optionalAccess', _125 => _125.getPlugins, 'call', _126 => _126(), 'access', _127 => _127.filter, 'call', _128 => _128(isFarmConfigRoutePlugin), 'access', _129 => _129.map, 'call', _130 => _130((plugin2) => plugin2.name)])
2201
+ _optionalChain([pm, 'optionalAccess', _134 => _134.getPlugins, 'call', _135 => _135(), 'access', _136 => _136.filter, 'call', _137 => _137(isFarmConfigRoutePlugin), 'access', _138 => _138.map, 'call', _139 => _139((plugin2) => plugin2.name)])
2123
2202
  );
2124
- const configRedirectMatchers = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _131 => _131.getPlugins, 'call', _132 => _132()]), () => ( []))).flatMap((plugin2) => {
2203
+ const configRedirectMatchers = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _140 => _140.getPlugins, 'call', _141 => _141()]), () => ( []))).flatMap((plugin2) => {
2125
2204
  const matcher = _chunkMBCRWU3Pcjs.getConfigRedirectMatcher.call(void 0, plugin2);
2126
2205
  return matcher ? [matcher] : [];
2127
2206
  });
@@ -2132,7 +2211,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2132
2211
  } catch (e21) {
2133
2212
  }
2134
2213
  };
2135
- farmApp = new (0, _chunkKWST2O22cjs.FarmApp)(
2214
+ farmApp = new (0, _chunkTAU3OF5Bcjs.FarmApp)(
2136
2215
  {
2137
2216
  ...options,
2138
2217
  root: resolveDevelopmentRoot(options.root, server.config.root)
@@ -2140,25 +2219,26 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2140
2219
  server
2141
2220
  );
2142
2221
  farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
2143
- _chunk2IFT2CSAcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2222
+ _chunkHTXKSREFcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2144
2223
  farmApp.getConfig().root,
2145
2224
  options.distDir || ".farm"
2146
2225
  )
2147
2226
  );
2227
+ farmApp.getRouteManager().trackSourceChanges();
2148
2228
  await farmApp.initialize();
2149
2229
  const farmConfig = farmApp.getConfig();
2150
2230
  let farmAppPackages;
2151
- if (_optionalChain([farmConfig, 'access', _133 => _133.agent, 'optionalAccess', _134 => _134.noindexPreviews])) {
2231
+ if (_optionalChain([farmConfig, 'access', _142 => _142.agent, 'optionalAccess', _143 => _143.noindexPreviews])) {
2152
2232
  farmMiddlewares.use((_req, res, next) => {
2153
- if (_chunkDPYBVVL3cjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2154
- res.setHeader("X-Robots-Tag", _chunkZUVAGMQ5cjs.FARM_PREVIEW_ROBOTS_TAG);
2233
+ if (_chunkILQ5DKYFcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2234
+ res.setHeader("X-Robots-Tag", _chunkODBM54RTcjs.FARM_PREVIEW_ROBOTS_TAG);
2155
2235
  }
2156
2236
  next();
2157
2237
  });
2158
2238
  }
2159
2239
  const apiServerBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
2160
2240
  const devBuiltInRoutePaths = new Set(
2161
- _chunkSXMWVP2Lcjs.listFarmBuiltInRoutePaths.call(void 0, {
2241
+ _chunk4YHGQDTTcjs.listFarmBuiltInRoutePaths.call(void 0, {
2162
2242
  agent: {
2163
2243
  apiCatalog: true,
2164
2244
  mcp: true,
@@ -2180,7 +2260,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2180
2260
  validateRemoteUrl: createNodeImageUrlValidator(farmConfig.images),
2181
2261
  // Vite owns this address. Unlike request.url, it cannot be replaced by
2182
2262
  // a caller-controlled Host header.
2183
- trustedLocalOrigin: () => _optionalChain([server, 'access', _135 => _135.resolvedUrls, 'optionalAccess', _136 => _136.local, 'access', _137 => _137[0]]),
2263
+ trustedLocalOrigin: () => _optionalChain([server, 'access', _144 => _144.resolvedUrls, 'optionalAccess', _145 => _145.local, 'access', _146 => _146[0]]),
2184
2264
  onError(error) {
2185
2265
  _chunkQMNWKQL4cjs.logger.error(
2186
2266
  `Image optimization failed: ${error instanceof Error ? error.message : String(error)}`
@@ -2193,22 +2273,22 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2193
2273
  if (farmConfig.i18n.enabled) {
2194
2274
  server.watcher.add(
2195
2275
  farmConfig.i18n.locales.map(
2196
- (locale) => _chunkLNVGXUL3cjs.resolveFarmI18nMessagePath.call(void 0, farmConfig.i18n, locale)
2276
+ (locale) => _chunkZMSVKVI3cjs.resolveFarmI18nMessagePath.call(void 0, farmConfig.i18n, locale)
2197
2277
  )
2198
2278
  );
2199
2279
  }
2200
2280
  const workflowConfig = farmConfig.workflows;
2201
2281
  const farmDocsDevRuntime = farmConfig.docs.enabled ? await loadFarmDocsDevRuntime() : null;
2202
2282
  const getExtraRouteTypes = () => [
2203
- ..._optionalChain([options, 'access', _138 => _138.openapi, 'optionalAccess', _139 => _139.enabled]) && options.openapi.route ? [options.openapi.route] : [],
2204
- ..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _140 => _140.getFarmDocsRouteTypeEntries, 'call', _141 => _141(farmConfig.docs)]), () => ( []))
2283
+ ..._optionalChain([options, 'access', _147 => _147.openapi, 'optionalAccess', _148 => _148.enabled]) && options.openapi.route ? [options.openapi.route] : [],
2284
+ ..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _149 => _149.getFarmDocsRouteTypeEntries, 'call', _150 => _150(farmConfig.docs)]), () => ( []))
2205
2285
  ];
2206
2286
  const appDirSlugs = sourceRoots.map(
2207
2287
  (source) => path6.join(source.root, source.srcDir, "app").replace(/\\/g, "/")
2208
2288
  );
2209
2289
  const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
2210
2290
  try {
2211
- const result = await _chunkCSQPMV3Qcjs.generateFarmTypeArtifacts.call(void 0, {
2291
+ const result = await _chunkCLEWORVYcjs.generateFarmTypeArtifacts.call(void 0, {
2212
2292
  root: farmConfig.root,
2213
2293
  srcDir: farmConfig.srcDir,
2214
2294
  layers: farmConfig.layers,
@@ -2248,7 +2328,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2248
2328
  (source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")
2249
2329
  );
2250
2330
  const layerConfigFiles = new Set(
2251
- farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _142 => _142.configFile, 'optionalAccess', _143 => _143.replace, 'call', _144 => _144(/\\/g, "/")])).filter((file) => Boolean(file))
2331
+ farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _151 => _151.configFile, 'optionalAccess', _152 => _152.replace, 'call', _153 => _153(/\\/g, "/")])).filter((file) => Boolean(file))
2252
2332
  );
2253
2333
  const routeModuleExtensions = /* @__PURE__ */ new Set([
2254
2334
  ..._chunk67MZTLTFcjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
@@ -2283,7 +2363,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2283
2363
  const isStaticMetadataImageFile = (file) => /\/(?:opengraph-image|twitter-image)(?:\.(?:png|jpg|jpeg|gif|webp)|\.alt\.txt)$/.test(
2284
2364
  file.replace(/\\/g, "/")
2285
2365
  );
2286
- const isI18nCatalogFile = (file) => _chunkLNVGXUL3cjs.isFarmI18nCatalogFile.call(void 0, farmConfig.i18n, file);
2366
+ const isI18nCatalogFile = (file) => _chunkZMSVKVI3cjs.isFarmI18nCatalogFile.call(void 0, farmConfig.i18n, file);
2287
2367
  let typeArtifactGenScheduled = null;
2288
2368
  let pendingTypeArtifacts = createEmptyTypeArtifactSelection();
2289
2369
  let pendingTypeArtifactReason = "";
@@ -2327,7 +2407,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2327
2407
  scheduleTypeArtifactGen(file, ev, typeArtifacts);
2328
2408
  }
2329
2409
  if (isI18nCatalogFile(file)) {
2330
- _optionalChain([farmApp, 'optionalAccess', _145 => _145.getI18nRuntime, 'call', _146 => _146(), 'access', _147 => _147.reload, 'call', _148 => _148(), 'access', _149 => _149.then, 'call', _150 => _150(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _151 => _151.catch, 'call', _152 => _152((error) => _chunkQMNWKQL4cjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
2410
+ _optionalChain([farmApp, 'optionalAccess', _154 => _154.getI18nRuntime, 'call', _155 => _155(), 'access', _156 => _156.reload, 'call', _157 => _157(), 'access', _158 => _158.then, 'call', _159 => _159(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _160 => _160.catch, 'call', _161 => _161((error) => _chunkQMNWKQL4cjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
2331
2411
  }
2332
2412
  const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
2333
2413
  if (isRouteRefreshEvent) {
@@ -2340,8 +2420,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2340
2420
  const reloadsMiddleware = pendingRouteRefreshIncludesMiddleware;
2341
2421
  pendingRouteRefreshIncludesMiddleware = false;
2342
2422
  Promise.all([
2343
- _optionalChain([refreshRouteDiscovery, 'optionalCall', _153 => _153(`${ev} ${file}`)]),
2344
- reloadsMiddleware ? _optionalChain([middlewareManager, 'optionalAccess', _154 => _154.reload, 'call', _155 => _155()]) : void 0
2423
+ _optionalChain([refreshRouteDiscovery, 'optionalCall', _162 => _162(`${ev} ${file}`)]),
2424
+ reloadsMiddleware ? _optionalChain([middlewareManager, 'optionalAccess', _163 => _163.reload, 'call', _164 => _164()]) : void 0
2345
2425
  ]).then(() => server.ws.send({ type: "full-reload", path: "*" })).catch((error) => _chunkQMNWKQL4cjs.logger.warn(`Route refresh failed: ${error.message}`));
2346
2426
  }, 50);
2347
2427
  }
@@ -2380,14 +2460,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2380
2460
  const { FARM_DEV_SERVER_MODULE_LOADER } = await import("./internal/native-server-fns.cjs");
2381
2461
  const load = (file) => _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, file);
2382
2462
  globalThis[FARM_DEV_SERVER_MODULE_LOADER] = load;
2383
- _optionalChain([server, 'access', _156 => _156.httpServer, 'optionalAccess', _157 => _157.once, 'call', _158 => _158("close", () => {
2463
+ _optionalChain([server, 'access', _165 => _165.httpServer, 'optionalAccess', _166 => _166.once, 'call', _167 => _167("close", () => {
2384
2464
  const globals = globalThis;
2385
2465
  if (globals[FARM_DEV_SERVER_MODULE_LOADER] === load) {
2386
2466
  delete globals[FARM_DEV_SERVER_MODULE_LOADER];
2387
2467
  }
2388
2468
  })]);
2389
2469
  }
2390
- apiRouteManager = new (0, _chunkK66JILV3cjs.APIRouteManager)(appDirs, server, {
2470
+ apiRouteManager = new (0, _chunk5LOARKDPcjs.APIRouteManager)(appDirs, server, {
2391
2471
  plugins: farmConfig.plugins,
2392
2472
  i18n: farmApp.getI18nRuntime(),
2393
2473
  bodySizeLimit: serverConfig.bodySizeLimit,
@@ -2454,11 +2534,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2454
2534
  });
2455
2535
  }
2456
2536
  }
2457
- if (_optionalChain([options, 'access', _159 => _159.openapi, 'optionalAccess', _160 => _160.enabled])) {
2537
+ if (_optionalChain([options, 'access', _168 => _168.openapi, 'optionalAccess', _169 => _169.enabled])) {
2458
2538
  const { OpenAPIManager } = await loadFarmOpenAPIDevRuntime();
2459
2539
  openAPIManager = new OpenAPIManager(appDirs, options.openapi, {
2460
2540
  mode: "development",
2461
- apiBaseURL: typeof _optionalChain([options, 'access', _161 => _161.api, 'optionalAccess', _162 => _162.baseURL]) === "string" ? options.api.baseURL : void 0,
2541
+ apiBaseURL: typeof _optionalChain([options, 'access', _170 => _170.api, 'optionalAccess', _171 => _171.baseURL]) === "string" ? options.api.baseURL : void 0,
2462
2542
  loadModule: (filePath) => apiRouteManager.loadModule(filePath)
2463
2543
  });
2464
2544
  const spec = await openAPIManager.generateSpec();
@@ -2488,7 +2568,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2488
2568
  return _chunk7EPYN7GWcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
2489
2569
  };
2490
2570
  releaseDocsMCPServers();
2491
- const isFarmDocsPathGuarded = (href) => _chunk2MR4MABGcjs.farmPathGuardCoversPage.call(void 0,
2571
+ const isFarmDocsPathGuarded = (href) => _chunkPXAHSCR6cjs.farmPathGuardCoversPage.call(void 0,
2492
2572
  {
2493
2573
  config: farmConfig,
2494
2574
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -2501,20 +2581,20 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2501
2581
  clientEntry: "/@farm/client.js",
2502
2582
  resolveLayoutFonts: resolveDocsLayoutFonts,
2503
2583
  fontStylesheetHref: "/@farm/fonts.css",
2504
- globalStylesheetHref: _chunkKWST2O22cjs.resolveDevGlobalStylesheetHref.call(void 0,
2584
+ globalStylesheetHref: _chunkTAU3OF5Bcjs.resolveDevGlobalStylesheetHref.call(void 0,
2505
2585
  farmConfig.root,
2506
2586
  farmConfig.srcDir
2507
2587
  ),
2508
2588
  loadModule: async (specifier) => {
2509
2589
  const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
2510
- if (specifier === _optionalChain([farmConfig, 'access', _163 => _163.docs, 'access', _164 => _164.adapter, 'optionalAccess', _165 => _165.server]) && _optionalChain([resolved, 'optionalAccess', _166 => _166.id])) {
2590
+ if (specifier === _optionalChain([farmConfig, 'access', _172 => _172.docs, 'access', _173 => _173.adapter, 'optionalAccess', _174 => _174.server]) && _optionalChain([resolved, 'optionalAccess', _175 => _175.id])) {
2511
2591
  const file = resolved.id.split("?", 1)[0];
2512
2592
  return import(
2513
2593
  /* @vite-ignore */
2514
2594
  _url.pathToFileURL.call(void 0, file).href
2515
2595
  );
2516
2596
  }
2517
- return _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _167 => _167.id]), () => ( specifier)));
2597
+ return _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _176 => _176.id]), () => ( specifier)));
2518
2598
  },
2519
2599
  registerMCPServer: (mcpServer) => {
2520
2600
  const dispose = _chunkLRB5OVRTcjs.registerFarmMCPServer.call(void 0, mcpServer);
@@ -2532,7 +2612,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2532
2612
  fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
2533
2613
  resolveLayoutFonts: resolveDocsLayoutFonts,
2534
2614
  fontStylesheetHref: "/@farm/fonts.css",
2535
- globalStylesheetHref: _chunkKWST2O22cjs.resolveDevGlobalStylesheetHref.call(void 0,
2615
+ globalStylesheetHref: _chunkTAU3OF5Bcjs.resolveDevGlobalStylesheetHref.call(void 0,
2536
2616
  farmConfig.root,
2537
2617
  farmConfig.srcDir
2538
2618
  ),
@@ -2540,7 +2620,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2540
2620
  basePath: farmConfig.basePath
2541
2621
  }) : null;
2542
2622
  const farmDocsListsPages = Boolean(
2543
- farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _168 => _168.getPlugins, 'call', _169 => _169(), 'access', _170 => _170.some, 'call', _171 => _171((plugin2) => plugin2.name === "farm:infra-analytics")])
2623
+ farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _177 => _177.getPlugins, 'call', _178 => _178(), 'access', _179 => _179.some, 'call', _180 => _180((plugin2) => plugin2.name === "farm:infra-analytics")])
2544
2624
  );
2545
2625
  let farmDocsPagePaths;
2546
2626
  const getFarmDocsPagePaths = () => {
@@ -2568,14 +2648,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2568
2648
  }
2569
2649
  }
2570
2650
  const wrapFarmDocsResponseWithLayouts = async (request, response) => {
2571
- if (request.method === "HEAD" || response.headers.has("x-farm-docs-adapter") || !_optionalChain([response, 'access', _172 => _172.headers, 'access', _173 => _173.get, 'call', _174 => _174("content-type"), 'optionalAccess', _175 => _175.toLowerCase, 'call', _176 => _176(), 'access', _177 => _177.includes, 'call', _178 => _178("text/html")])) {
2651
+ if (request.method === "HEAD" || response.headers.has("x-farm-docs-adapter") || !_optionalChain([response, 'access', _181 => _181.headers, 'access', _182 => _182.get, 'call', _183 => _183("content-type"), 'optionalAccess', _184 => _184.toLowerCase, 'call', _185 => _185(), 'access', _186 => _186.includes, 'call', _187 => _187("text/html")])) {
2572
2652
  return response;
2573
2653
  }
2574
2654
  const pathname = new URL(request.url).pathname;
2575
2655
  const matchedRoute = routeManager.matchRoute(pathname);
2576
2656
  const layoutEntries = matchedRoute.layouts.map((layout) => ({
2577
2657
  ...layout,
2578
- metadata: _chunk2IFT2CSAcjs.getClientModuleMetadata.call(void 0, layout.modulePath, farmConfig.root)
2658
+ metadata: _chunkHTXKSREFcjs.getClientModuleMetadata.call(void 0, layout.modulePath, farmConfig.root)
2579
2659
  }));
2580
2660
  if (!layoutEntries.some((layout) => layout.metadata.shouldHydrate)) {
2581
2661
  return response;
@@ -2589,7 +2669,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2589
2669
  headers: response.headers
2590
2670
  });
2591
2671
  }
2592
- const docsRenderer = _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, (_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _179 => _179.getConfig, 'call', _180 => _180()]), () => ( options))).renderer);
2672
+ const docsRenderer = _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, (_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _188 => _188.getConfig, 'call', _189 => _189()]), () => ( options))).renderer);
2593
2673
  const [rendererRuntime, layoutModules] = await Promise.all([
2594
2674
  _chunk67MZTLTFcjs.isReactRenderer.call(void 0, docsRenderer) ? import("./renderer/react/server.cjs") : _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, docsRenderer.server),
2595
2675
  Promise.all(
@@ -2618,7 +2698,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2618
2698
  ])
2619
2699
  );
2620
2700
  const inlineValue = (value) => JSON.stringify(value).replace(/</g, "\\u003c").replace(/>/g, "\\u003e");
2621
- const pageModulePath = _optionalChain([matchedRoute, 'access', _181 => _181.route, 'optionalAccess', _182 => _182.modulePath]) ? toUrlPath(matchedRoute.route.modulePath) : "";
2701
+ const pageModulePath = _optionalChain([matchedRoute, 'access', _190 => _190.route, 'optionalAccess', _191 => _191.modulePath]) ? toUrlPath(matchedRoute.route.modulePath) : "";
2622
2702
  const bootstrapScript = `<script>
2623
2703
  window.__FARM_PROPS__ = ${inlineValue({ params })};
2624
2704
  window.__FARM_ROUTE_SLOTS__ = [];
@@ -2715,7 +2795,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2715
2795
  }
2716
2796
  },
2717
2797
  (request) => {
2718
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _183 => _183.getConfig, 'call', _184 => _184()]), () => ( options));
2798
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _192 => _192.getConfig, 'call', _193 => _193()]), () => ( options));
2719
2799
  const currentServerConfig = _chunkCFG4QERRcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
2720
2800
  return _chunkHDPT6OYEcjs.resolveFarmRequestURL.call(void 0, request, {
2721
2801
  trustProxy: currentServerConfig.trustProxy
@@ -2731,7 +2811,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2731
2811
  withAPIRequestTracing(async function handleFarmDevRequest(req, res, next) {
2732
2812
  const requestUrl = req.url || "/";
2733
2813
  const requestMethod = req.method || "GET";
2734
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _185 => _185.getConfig, 'call', _186 => _186()]), () => ( options));
2814
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _194 => _194.getConfig, 'call', _195 => _195()]), () => ( options));
2735
2815
  const currentServerConfig = _chunkCFG4QERRcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
2736
2816
  const parsedRequestUrl = _chunkHDPT6OYEcjs.resolveFarmRequestURL.call(void 0, req, {
2737
2817
  trustProxy: currentServerConfig.trustProxy
@@ -2825,7 +2905,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2825
2905
  openapi: options.openapi
2826
2906
  },
2827
2907
  workflows: discoveredWorkflows,
2828
- plugins: _optionalChain([pm, 'optionalAccess', _187 => _187.getSortedPlugins, 'call', _188 => _188()])
2908
+ plugins: _optionalChain([pm, 'optionalAccess', _196 => _196.getSortedPlugins, 'call', _197 => _197()])
2829
2909
  });
2830
2910
  res.statusCode = 200;
2831
2911
  res.setHeader(
@@ -2860,10 +2940,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2860
2940
  render: {
2861
2941
  pathname: pathname2,
2862
2942
  method: requestMethod,
2863
- routePattern: _optionalChain([match, 'optionalAccess', _189 => _189.route, 'optionalAccess', _190 => _190.pattern]) || null,
2864
- params: _optionalChain([match, 'optionalAccess', _191 => _191.params]) || {}
2943
+ routePattern: _optionalChain([match, 'optionalAccess', _198 => _198.route, 'optionalAccess', _199 => _199.pattern]) || null,
2944
+ params: _optionalChain([match, 'optionalAccess', _200 => _200.params]) || {}
2865
2945
  },
2866
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _192 => _192.layouts]) || []).map((layout) => layout.pattern)
2946
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _201 => _201.layouts]) || []).map((layout) => layout.pattern)
2867
2947
  };
2868
2948
  return pageHookRouteMatch;
2869
2949
  };
@@ -2951,7 +3031,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2951
3031
  }
2952
3032
  }
2953
3033
  const runAppMiddlewareForContentRoute = async () => {
2954
- if (!_optionalChain([middlewareManager, 'optionalAccess', _193 => _193.hasMiddleware, 'call', _194 => _194()])) return false;
3034
+ if (!_optionalChain([middlewareManager, 'optionalAccess', _202 => _202.hasMiddleware, 'call', _203 => _203()])) return false;
2955
3035
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
2956
3036
  return runFarmMiddlewareWithNavigation(
2957
3037
  farmApp.getServerRenderer(),
@@ -2989,7 +3069,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2989
3069
  return response.status;
2990
3070
  };
2991
3071
  const runAppMiddlewareInRuntimeSession = async (runtimeSession2, logResponse2) => {
2992
- const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _195 => _195.hasRuntimeHook, 'call', _196 => _196("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _197 => _197.hasMiddleware, 'call', _198 => _198()]) ? interceptFarmDevPageResponse({
3072
+ const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _204 => _204.hasRuntimeHook, 'call', _205 => _205("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _206 => _206.hasMiddleware, 'call', _207 => _207()]) ? interceptFarmDevPageResponse({
2993
3073
  req,
2994
3074
  res,
2995
3075
  pm,
@@ -3002,7 +3082,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3002
3082
  urlPath: requestUrl,
3003
3083
  pathname: requestPathname,
3004
3084
  startTime: Date.now(),
3005
- logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _199 => _199(status)]),
3085
+ logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _208 => _208(status)]),
3006
3086
  // The runtime reports a runtime.after failure itself.
3007
3087
  emitError: async () => {
3008
3088
  },
@@ -3013,7 +3093,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3013
3093
  handled = await runAppMiddlewareForContentRoute();
3014
3094
  } catch (error) {
3015
3095
  if (runtimeHookErrorAnswersJSON || res.headersSent) {
3016
- _optionalChain([interceptor, 'optionalAccess', _200 => _200.release, 'call', _201 => _201()]);
3096
+ _optionalChain([interceptor, 'optionalAccess', _209 => _209.release, 'call', _210 => _210()]);
3017
3097
  throw error;
3018
3098
  }
3019
3099
  if (runtimeSession2) await pm.reportRuntimeRequestError(runtimeSession2, error);
@@ -3021,10 +3101,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3021
3101
  return true;
3022
3102
  }
3023
3103
  if (!handled) {
3024
- _optionalChain([interceptor, 'optionalAccess', _202 => _202.release, 'call', _203 => _203()]);
3104
+ _optionalChain([interceptor, 'optionalAccess', _211 => _211.release, 'call', _212 => _212()]);
3025
3105
  return false;
3026
3106
  }
3027
- if (!_optionalChain([interceptor, 'optionalAccess', _204 => _204.isEnded, 'call', _205 => _205()])) _optionalChain([logResponse2, 'optionalCall', _206 => _206(res.statusCode || 200)]);
3107
+ if (!_optionalChain([interceptor, 'optionalAccess', _213 => _213.isEnded, 'call', _214 => _214()])) _optionalChain([logResponse2, 'optionalCall', _215 => _215(res.statusCode || 200)]);
3028
3108
  return true;
3029
3109
  };
3030
3110
  const serveBuiltInRoute = async (respond, {
@@ -3033,7 +3113,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3033
3113
  label
3034
3114
  } = {}) => {
3035
3115
  const discard = async () => {
3036
- await _optionalChain([computed, 'optionalAccess', _207 => _207.body, 'optionalAccess', _208 => _208.cancel, 'call', _209 => _209(), 'access', _210 => _210.catch, 'call', _211 => _211(() => {
3116
+ await _optionalChain([computed, 'optionalAccess', _216 => _216.body, 'optionalAccess', _217 => _217.cancel, 'call', _218 => _218(), 'access', _219 => _219.catch, 'call', _220 => _220(() => {
3037
3117
  })]);
3038
3118
  };
3039
3119
  const sendRuntimeResponse = async (runtimeSession3, response2) => {
@@ -3050,9 +3130,9 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3050
3130
  if (pm && opensFarmDevRuntimeSession(pm)) {
3051
3131
  try {
3052
3132
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
3053
- const route = _chunkSXMWVP2Lcjs.setFarmRouteLabel.call(void 0,
3133
+ const route = _chunk4YHGQDTTcjs.setFarmRouteLabel.call(void 0,
3054
3134
  { pathname: requestPathname },
3055
- label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkSXMWVP2Lcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3135
+ label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunk4YHGQDTTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3056
3136
  );
3057
3137
  runtimeSession2 = await pm.beginRuntimeRequest(
3058
3138
  createRequestFromNodeRequest(req, new URL(fullUrl)),
@@ -3090,7 +3170,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3090
3170
  }
3091
3171
  responding = true;
3092
3172
  response = await respond(
3093
- _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _212 => _212.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3173
+ _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _221 => _221.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3094
3174
  );
3095
3175
  } catch (error) {
3096
3176
  if (!responding && !res.headersSent) {
@@ -3110,7 +3190,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3110
3190
  else await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
3111
3191
  };
3112
3192
  const openAPIRequestPathname = openAPIManager ? _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
3113
- if (openAPIManager && _optionalChain([options, 'access', _213 => _213.openapi, 'optionalAccess', _214 => _214.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3193
+ if (openAPIManager && _optionalChain([options, 'access', _222 => _222.openapi, 'optionalAccess', _223 => _223.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3114
3194
  const specManager = openAPIManager;
3115
3195
  await serveBuiltInRoute(async () => {
3116
3196
  if (requestMethod !== "GET" && requestMethod !== "HEAD") {
@@ -3130,7 +3210,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3130
3210
  });
3131
3211
  return;
3132
3212
  }
3133
- if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _215 => _215.openapi, 'optionalAccess', _216 => _216.route])) {
3213
+ if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _224 => _224.openapi, 'optionalAccess', _225 => _225.route])) {
3134
3214
  const docsManager = openAPIManager;
3135
3215
  await serveBuiltInRoute(
3136
3216
  async () => {
@@ -3141,24 +3221,24 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3141
3221
  );
3142
3222
  return;
3143
3223
  }
3144
- if (_optionalChain([options, 'access', _217 => _217.agent, 'optionalAccess', _218 => _218.manifest]) !== false && _chunkSXMWVP2Lcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3224
+ if (_optionalChain([options, 'access', _226 => _226.agent, 'optionalAccess', _227 => _227.manifest]) !== false && _chunk4YHGQDTTcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3145
3225
  await serveBuiltInRoute(async () => {
3146
- _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkKWST2O22cjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3147
- const manifest = await _chunkSXMWVP2Lcjs.createFarmAppManifestResponse.call(void 0,
3226
+ _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkTAU3OF5Bcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3227
+ const manifest = await _chunk4YHGQDTTcjs.createFarmAppManifestResponse.call(void 0,
3148
3228
  new Request(parsedRequestUrl, {
3149
3229
  method: requestMethod,
3150
3230
  headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
3151
3231
  }),
3152
3232
  {
3153
- ..._chunkSXMWVP2Lcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3233
+ ..._chunk4YHGQDTTcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3154
3234
  build: "development",
3155
3235
  packages: farmAppPackages,
3156
3236
  // Read again on each request; unchanged files come from a cache.
3157
- webmcpTools: _optionalChain([farmConfig, 'access', _219 => _219.plugins, 'optionalAccess', _220 => _220.some, 'call', _221 => _221(({ name }) => name === "farm:webmcp")]) ? _chunkKWST2O22cjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3237
+ webmcpTools: _optionalChain([farmConfig, 'access', _228 => _228.plugins, 'optionalAccess', _229 => _229.some, 'call', _230 => _230(({ name }) => name === "farm:webmcp")]) ? _chunkTAU3OF5Bcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3158
3238
  }),
3159
3239
  defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
3160
3240
  // A guard written for an MCP server's path keeps its tools out of the public view.
3161
- guardCoversPath: (path7) => _chunk2MR4MABGcjs.farmPathGuardCoversEndpoint.call(void 0,
3241
+ guardCoversPath: (path7) => _chunkPXAHSCR6cjs.farmPathGuardCoversEndpoint.call(void 0,
3162
3242
  {
3163
3243
  config: farmConfig,
3164
3244
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -3172,11 +3252,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3172
3252
  });
3173
3253
  return;
3174
3254
  }
3175
- if (_optionalChain([options, 'access', _222 => _222.agent, 'optionalAccess', _223 => _223.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkSXMWVP2Lcjs.FARM_API_CATALOG_PATH) {
3255
+ if (_optionalChain([options, 'access', _231 => _231.agent, 'optionalAccess', _232 => _232.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunk4YHGQDTTcjs.FARM_API_CATALOG_PATH) {
3176
3256
  await serveBuiltInRoute(
3177
- () => _chunkSXMWVP2Lcjs.createFarmApiCatalogResponse.call(void 0,
3257
+ () => _chunk4YHGQDTTcjs.createFarmApiCatalogResponse.call(void 0,
3178
3258
  requestMethod,
3179
- _chunkSXMWVP2Lcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3259
+ _chunk4YHGQDTTcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3180
3260
  new Request(parsedRequestUrl, {
3181
3261
  headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
3182
3262
  })
@@ -3184,8 +3264,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3184
3264
  );
3185
3265
  return;
3186
3266
  }
3187
- if (_optionalChain([options, 'access', _224 => _224.agent, 'optionalAccess', _225 => _225.aiCatalog]) !== false) {
3188
- const aiCatalog = _chunkSXMWVP2Lcjs.createFarmAiCatalogResponse.call(void 0,
3267
+ if (_optionalChain([options, 'access', _233 => _233.agent, 'optionalAccess', _234 => _234.aiCatalog]) !== false) {
3268
+ const aiCatalog = _chunk4YHGQDTTcjs.createFarmAiCatalogResponse.call(void 0,
3189
3269
  new Request(parsedRequestUrl, {
3190
3270
  method: requestMethod,
3191
3271
  headers: {
@@ -3228,7 +3308,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3228
3308
  const docsBodyInit = requestMethod === "GET" || requestMethod === "HEAD" ? {} : { body: _chunkCFG4QERRcjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" };
3229
3309
  const docsResponse = await farmDocsHandler(new Request(docsRequest, docsBodyInit));
3230
3310
  if (docsResponse) {
3231
- const docsPage = _optionalChain([docsResponse, 'access', _226 => _226.headers, 'access', _227 => _227.get, 'call', _228 => _228("content-type"), 'optionalAccess', _229 => _229.toLowerCase, 'call', _230 => _230(), 'access', _231 => _231.includes, 'call', _232 => _232("text/html")]);
3311
+ const docsPage = _optionalChain([docsResponse, 'access', _235 => _235.headers, 'access', _236 => _236.get, 'call', _237 => _237("content-type"), 'optionalAccess', _238 => _238.toLowerCase, 'call', _239 => _239(), 'access', _240 => _240.includes, 'call', _241 => _241("text/html")]);
3232
3312
  await serveBuiltInRoute(
3233
3313
  async (request) => {
3234
3314
  if (!docsPage) return wrapFarmDocsResponseWithLayouts(docsRequest, docsResponse);
@@ -3237,7 +3317,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3237
3317
  farmConfig.deploymentId
3238
3318
  );
3239
3319
  if (deploymentMismatch) {
3240
- await _optionalChain([docsResponse, 'access', _233 => _233.body, 'optionalAccess', _234 => _234.cancel, 'call', _235 => _235()]);
3320
+ await _optionalChain([docsResponse, 'access', _242 => _242.body, 'optionalAccess', _243 => _243.cancel, 'call', _244 => _244()]);
3241
3321
  return _chunkNLBHLPEOcjs.createFarmDeploymentMismatchResponse.call(void 0, deploymentMismatch);
3242
3322
  }
3243
3323
  return _chunkNLBHLPEOcjs.withFarmDeploymentResponse.call(void 0,
@@ -3253,11 +3333,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3253
3333
  {
3254
3334
  kind: "docs",
3255
3335
  computed: docsResponse,
3256
- label: _chunkSXMWVP2Lcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3336
+ label: _chunk4YHGQDTTcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3257
3337
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
3258
3338
  {
3259
- path: _optionalChain([farmConfig, 'access', _236 => _236.docs, 'optionalAccess', _237 => _237.entry]) || "/docs",
3260
- roots: _optionalChain([farmConfig, 'access', _238 => _238.docs, 'optionalAccess', _239 => _239.roots, 'optionalAccess', _240 => _240.map, 'call', _241 => _241((root) => root.entry)]),
3339
+ path: _optionalChain([farmConfig, 'access', _245 => _245.docs, 'optionalAccess', _246 => _246.entry]) || "/docs",
3340
+ roots: _optionalChain([farmConfig, 'access', _247 => _247.docs, 'optionalAccess', _248 => _248.roots, 'optionalAccess', _249 => _249.map, 'call', _250 => _250((root) => root.entry)]),
3261
3341
  pages: await getFarmDocsPagePaths()
3262
3342
  }
3263
3343
  )
@@ -3266,8 +3346,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3266
3346
  return;
3267
3347
  }
3268
3348
  }
3269
- if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _242 => _242.headers, 'access', _243 => _243.accept, 'optionalAccess', _244 => _244.includes, 'call', _245 => _245(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
3270
- const { createFarmNativeTreeResponse } = await import("./native-tree-GF4BH33L.cjs");
3349
+ if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _251 => _251.headers, 'access', _252 => _252.accept, 'optionalAccess', _253 => _253.includes, 'call', _254 => _254(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
3350
+ const { createFarmNativeTreeResponse } = await import("./native-tree-R6CQMDTI.cjs");
3271
3351
  const treeBodyInit = requestMethod === "POST" ? { body: _chunkCFG4QERRcjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" } : {};
3272
3352
  const treeResponse = await createFarmNativeTreeResponse({
3273
3353
  request: new Request(fullUrl, {
@@ -3284,18 +3364,18 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3284
3364
  });
3285
3365
  await serveBuiltInRoute(() => treeResponse, {
3286
3366
  computed: treeResponse,
3287
- label: _nullishCoalesce(_optionalChain([farmApp, 'access', _246 => _246.getRouteManager, 'call', _247 => _247(), 'access', _248 => _248.matchRoute, 'call', _249 => _249(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _250 => _250.route, 'optionalAccess', _251 => _251.pattern]), () => ( null))
3367
+ label: _nullishCoalesce(_optionalChain([farmApp, 'access', _255 => _255.getRouteManager, 'call', _256 => _256(), 'access', _257 => _257.matchRoute, 'call', _258 => _258(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _259 => _259.route, 'optionalAccess', _260 => _260.pattern]), () => ( null))
3288
3368
  });
3289
3369
  return;
3290
3370
  }
3291
3371
  const markdownRouteLabel = () => (
3292
3372
  // On the route path, as production labels it: /fr/index.md is /index.md.
3293
- _chunkSXMWVP2Lcjs.resolveFarmMarkdownRouteLabel.call(void 0,
3373
+ _chunk4YHGQDTTcjs.resolveFarmMarkdownRouteLabel.call(void 0,
3294
3374
  toRoutePathname(requestPathname),
3295
- (page) => _optionalChain([farmApp, 'access', _252 => _252.getRouteManager, 'call', _253 => _253(), 'access', _254 => _254.matchRoute, 'call', _255 => _255(page), 'access', _256 => _256.route, 'optionalAccess', _257 => _257.pattern])
3375
+ (page) => _optionalChain([farmApp, 'access', _261 => _261.getRouteManager, 'call', _262 => _262(), 'access', _263 => _263.matchRoute, 'call', _264 => _264(page), 'access', _265 => _265.route, 'optionalAccess', _266 => _266.pattern])
3296
3376
  )
3297
3377
  );
3298
- const markdownSourceResponse = viteModuleRequest ? null : await _chunkL6E4SHUBcjs.createFarmMarkdownSourceResponse.call(void 0, {
3378
+ const markdownSourceResponse = viteModuleRequest ? null : await _chunkLGR7565Lcjs.createFarmMarkdownSourceResponse.call(void 0, {
3299
3379
  request: new Request(fullUrl, {
3300
3380
  method: requestMethod,
3301
3381
  headers: docsHeaders
@@ -3304,7 +3384,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3304
3384
  routePathname: toRoutePathname,
3305
3385
  resolveSource: async (pathname2) => {
3306
3386
  const match = farmApp.getRouteManager().matchRoute(pathname2);
3307
- const sourcePath = _optionalChain([match, 'access', _258 => _258.route, 'optionalAccess', _259 => _259.markdownSourcePath]) || (match.route && _chunkL6E4SHUBcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
3387
+ const sourcePath = _optionalChain([match, 'access', _267 => _267.route, 'optionalAccess', _268 => _268.markdownSourcePath]) || (match.route && _chunkLGR7565Lcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
3308
3388
  if (!sourcePath) {
3309
3389
  return null;
3310
3390
  }
@@ -3336,7 +3416,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3336
3416
  });
3337
3417
  return;
3338
3418
  }
3339
- const markdownResponse = viteModuleRequest ? null : await _chunkC2JOS77Zcjs.createMarkdownMirrorResponse.call(void 0, {
3419
+ const markdownResponse = viteModuleRequest ? null : await _chunkHGB4PM2Ccjs.createMarkdownMirrorResponse.call(void 0, {
3340
3420
  request: new Request(fullUrl, {
3341
3421
  method: requestMethod,
3342
3422
  headers: docsHeaders
@@ -3375,16 +3455,16 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3375
3455
  });
3376
3456
  return;
3377
3457
  }
3378
- if (!viteModuleRequest && _chunkC2JOS77Zcjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
3379
- const markdownRoute = farmApp.getRouteManager().matchRoute(_chunkL6E4SHUBcjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname, toRoutePathname));
3458
+ if (!viteModuleRequest && _chunkHGB4PM2Ccjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
3459
+ const markdownRoute = farmApp.getRouteManager().matchRoute(_chunkLGR7565Lcjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname, toRoutePathname));
3380
3460
  if (!markdownRoute.route) {
3381
3461
  await serveBuiltInRoute(
3382
3462
  () => new Response(
3383
- _chunkC2JOS77Zcjs.createFarmMarkdownErrorBody.call(void 0, 404, requestPathname, farmConfig.basePath || "/"),
3463
+ _chunkHGB4PM2Ccjs.createFarmMarkdownErrorBody.call(void 0, 404, requestPathname, farmConfig.basePath || "/"),
3384
3464
  {
3385
3465
  status: 404,
3386
3466
  headers: {
3387
- "Content-Type": _chunkC2JOS77Zcjs.FARM_MARKDOWN_CONTENT_TYPE,
3467
+ "Content-Type": _chunkHGB4PM2Ccjs.FARM_MARKDOWN_CONTENT_TYPE,
3388
3468
  "X-Farm-Markdown-Error": "404",
3389
3469
  "Cache-Control": "no-store"
3390
3470
  }
@@ -3394,7 +3474,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3394
3474
  return;
3395
3475
  }
3396
3476
  }
3397
- const markdownPageTarget = _chunkC2JOS77Zcjs.resolveMarkdownMirrorTarget.call(void 0,
3477
+ const markdownPageTarget = _chunkHGB4PM2Ccjs.resolveMarkdownMirrorTarget.call(void 0,
3398
3478
  farmApp.getConfig().md,
3399
3479
  requestPathname,
3400
3480
  {
@@ -3460,7 +3540,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3460
3540
  "beforeRequest",
3461
3541
  (plugin2) => {
3462
3542
  const owner = _chunkJX5VOLAVcjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
3463
- return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _260 => _260.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3543
+ return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _269 => _269.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3464
3544
  },
3465
3545
  req,
3466
3546
  res
@@ -3497,7 +3577,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3497
3577
  isProd: false
3498
3578
  },
3499
3579
  request,
3500
- { clientAddress: _optionalChain([req, 'access', _261 => _261.socket, 'optionalAccess', _262 => _262.remoteAddress]) }
3580
+ { clientAddress: _optionalChain([req, 'access', _270 => _270.socket, 'optionalAccess', _271 => _271.remoteAddress]) }
3501
3581
  );
3502
3582
  if (!result) {
3503
3583
  throw new Error(`Matched integration route did not return a response`);
@@ -3505,7 +3585,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3505
3585
  return result;
3506
3586
  } catch (error) {
3507
3587
  _chunkQMNWKQL4cjs.logger.error(`Integration route error: ${error}`);
3508
- await _optionalChain([runtime, 'optionalAccess', _263 => _263.reportError, 'call', _264 => _264(error)]);
3588
+ await _optionalChain([runtime, 'optionalAccess', _272 => _272.reportError, 'call', _273 => _273(error)]);
3509
3589
  return _chunkXGTFLG73cjs.createFarmInternalServerErrorResponse.call(void 0, );
3510
3590
  }
3511
3591
  };
@@ -3559,7 +3639,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3559
3639
  _chunkJX5VOLAVcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3560
3640
  pathname: requestPathname,
3561
3641
  method: requestMethod
3562
- }) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _265 => _265.isFarmDocsAPIRequest, 'call', _266 => _266(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
3642
+ }) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _274 => _274.isFarmDocsAPIRequest, 'call', _275 => _275(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
3563
3643
  );
3564
3644
  };
3565
3645
  try {
@@ -3644,15 +3724,15 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3644
3724
  });
3645
3725
  };
3646
3726
  const isDocsAPIRequest = Boolean(
3647
- farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _267 => _267.isFarmDocsAPIRequest, 'call', _268 => _268(pathname2)])
3727
+ farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _276 => _276.isFarmDocsAPIRequest, 'call', _277 => _277(pathname2)])
3648
3728
  );
3649
3729
  const docsRuntimeOptions = () => ({
3650
3730
  kind: "docs",
3651
- route: _chunkSXMWVP2Lcjs.setFarmRouteLabel.call(void 0,
3731
+ route: _chunk4YHGQDTTcjs.setFarmRouteLabel.call(void 0,
3652
3732
  { pathname: pathname2, pattern: urlPath2 },
3653
- _chunkSXMWVP2Lcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
3654
- path: _optionalChain([farmConfig, 'access', _269 => _269.docs, 'optionalAccess', _270 => _270.entry]) || "/docs",
3655
- roots: _optionalChain([farmConfig, 'access', _271 => _271.docs, 'optionalAccess', _272 => _272.roots, 'optionalAccess', _273 => _273.map, 'call', _274 => _274((root) => root.entry)])
3733
+ _chunk4YHGQDTTcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
3734
+ path: _optionalChain([farmConfig, 'access', _278 => _278.docs, 'optionalAccess', _279 => _279.entry]) || "/docs",
3735
+ roots: _optionalChain([farmConfig, 'access', _280 => _280.docs, 'optionalAccess', _281 => _281.roots, 'optionalAccess', _282 => _282.map, 'call', _283 => _283((root) => root.entry)])
3656
3736
  })
3657
3737
  )
3658
3738
  });
@@ -3734,7 +3814,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3734
3814
  const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
3735
3815
  const hasExplicitAPIRoute = Boolean(routedApiRoute);
3736
3816
  if (apiHandler && hasExplicitAPIRoute) {
3737
- const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _275 => _275.route, 'access', _276 => _276.path]) || urlPath2;
3817
+ const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _284 => _284.route, 'access', _285 => _285.path]) || urlPath2;
3738
3818
  _chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
3739
3819
  type: "route.matched",
3740
3820
  pathname: pathname2,
@@ -3784,7 +3864,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3784
3864
  error
3785
3865
  });
3786
3866
  _chunkQMNWKQL4cjs.logger.error(`API route error: ${error}`);
3787
- await _optionalChain([runtime, 'optionalAccess', _277 => _277.reportError, 'call', _278 => _278(error)]);
3867
+ await _optionalChain([runtime, 'optionalAccess', _286 => _286.reportError, 'call', _287 => _287(error)]);
3788
3868
  response = _chunkXGTFLG73cjs.createFarmInternalServerErrorResponse.call(void 0, );
3789
3869
  }
3790
3870
  return pm ? await pm.runHookSerial("afterApiHandler", response, apiLifecyclePayload) : response;
@@ -3889,12 +3969,12 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3889
3969
  }
3890
3970
  return;
3891
3971
  }
3892
- if (_optionalChain([req, 'access', _279 => _279.url, 'optionalAccess', _280 => _280.startsWith, 'call', _281 => _281("/@")]) || _optionalChain([req, 'access', _282 => _282.url, 'optionalAccess', _283 => _283.startsWith, 'call', _284 => _284("/node_modules")])) {
3972
+ if (_optionalChain([req, 'access', _288 => _288.url, 'optionalAccess', _289 => _289.startsWith, 'call', _290 => _290("/@")]) || _optionalChain([req, 'access', _291 => _291.url, 'optionalAccess', _292 => _292.startsWith, 'call', _293 => _293("/node_modules")])) {
3893
3973
  return next();
3894
3974
  }
3895
3975
  if (!deferredDottedRequests.has(req) && shouldBypassFarmRouterForDottedPath(
3896
3976
  requestPathname,
3897
- _optionalChain([farmApp, 'optionalAccess', _285 => _285.getRouteManager, 'call', _286 => _286()]),
3977
+ _optionalChain([farmApp, 'optionalAccess', _294 => _294.getRouteManager, 'call', _295 => _295()]),
3898
3978
  [server.config.publicDir, server.config.root],
3899
3979
  farmAgentGeneratedPaths(farmConfig),
3900
3980
  requestMethod
@@ -3902,7 +3982,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3902
3982
  if (!viteModuleRequest) deferredDottedRequests.set(req, requestUrl);
3903
3983
  return next();
3904
3984
  }
3905
- if (_optionalChain([req, 'access', _287 => _287.url, 'optionalAccess', _288 => _288.startsWith, 'call', _289 => _289("/__farm/page-data")])) {
3985
+ if (_optionalChain([req, 'access', _296 => _296.url, 'optionalAccess', _297 => _297.startsWith, 'call', _298 => _298("/__farm/page-data")])) {
3906
3986
  const urlObj = parsedRequestUrl;
3907
3987
  const targetPath = urlObj.searchParams.get("path") || "/";
3908
3988
  let renderedRequest;
@@ -3932,7 +4012,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3932
4012
  renderedRequest = targetRequest;
3933
4013
  let middlewareMap = /* @__PURE__ */ new Map();
3934
4014
  let middlewareContext = /* @__PURE__ */ new Map();
3935
- if (_optionalChain([middlewareManager, 'optionalAccess', _290 => _290.hasMiddleware, 'call', _291 => _291()])) {
4015
+ if (_optionalChain([middlewareManager, 'optionalAccess', _299 => _299.hasMiddleware, 'call', _300 => _300()])) {
3936
4016
  const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
3937
4017
  const targetNodeResponse = createPageDataMiddlewareResponse(res);
3938
4018
  const handled = await runFarmMiddlewareWithNavigation(
@@ -3966,10 +4046,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3966
4046
  if (pm) {
3967
4047
  await pm.runHookParallel("afterRouteMatch", {
3968
4048
  pathname: targetPath,
3969
- matched: !!_optionalChain([match, 'optionalAccess', _292 => _292.route]),
3970
- routePattern: _optionalChain([match, 'optionalAccess', _293 => _293.route, 'optionalAccess', _294 => _294.pattern]) || null,
3971
- params: _optionalChain([match, 'optionalAccess', _295 => _295.params]) || {},
3972
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _296 => _296.layouts]) || []).map((l) => l.pattern)
4049
+ matched: !!_optionalChain([match, 'optionalAccess', _301 => _301.route]),
4050
+ routePattern: _optionalChain([match, 'optionalAccess', _302 => _302.route, 'optionalAccess', _303 => _303.pattern]) || null,
4051
+ params: _optionalChain([match, 'optionalAccess', _304 => _304.params]) || {},
4052
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _305 => _305.layouts]) || []).map((l) => l.pattern)
3973
4053
  });
3974
4054
  }
3975
4055
  if (!match) {
@@ -3992,7 +4072,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3992
4072
  );
3993
4073
  const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
3994
4074
  const navigationManifest = routeManager3.generateClientManifest(server.config.root);
3995
- const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunk2IFT2CSAcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4075
+ const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkHTXKSREFcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
3996
4076
  const isClientComponent = moduleMetadata.isClientComponent;
3997
4077
  const shouldHydrate = moduleMetadata.shouldHydrate;
3998
4078
  let mergedMetadata = {};
@@ -4000,7 +4080,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4000
4080
  layouts.map((layout) => routeManager3.loadLayoutModule(layout.modulePath))
4001
4081
  );
4002
4082
  const layoutHydrationMetadata = layouts.map(
4003
- (layout) => _nullishCoalesce(navigationManifest.layouts.find((entry) => entry.pattern === layout.pattern), () => ( _chunk2IFT2CSAcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root)))
4083
+ (layout) => _nullishCoalesce(navigationManifest.layouts.find((entry) => entry.pattern === layout.pattern), () => ( _chunkHTXKSREFcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root)))
4004
4084
  );
4005
4085
  const shouldHydrateLayout = layoutHydrationMetadata.some(
4006
4086
  (metadata) => metadata.shouldHydrate
@@ -4012,17 +4092,17 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4012
4092
  )
4013
4093
  ];
4014
4094
  const hydrationIslandStrategy = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0,
4015
- _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _297 => _297.getConfig, 'call', _298 => _298()]), () => ( options))), 'access', _299 => _299.experimental, 'optionalAccess', _300 => _300.serverComponents])
4016
- ) === "islands" ? _chunkKWST2O22cjs.resolveFarmRouteRootStrategy.call(void 0,
4095
+ _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _306 => _306.getConfig, 'call', _307 => _307()]), () => ( options))), 'access', _308 => _308.experimental, 'optionalAccess', _309 => _309.serverComponents])
4096
+ ) === "islands" ? _chunkTAU3OF5Bcjs.resolveFarmRouteRootStrategy.call(void 0,
4017
4097
  route,
4018
4098
  { shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
4019
4099
  layouts.map((layout, index) => ({
4020
4100
  pattern: layout.pattern,
4021
4101
  modulePath: layout.modulePath,
4022
- shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _301 => _301[index], 'optionalAccess', _302 => _302.shouldHydrate]) === true,
4102
+ shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _310 => _310[index], 'optionalAccess', _311 => _311.shouldHydrate]) === true,
4023
4103
  // Manifest entries carry it; metadata read from source does not.
4024
- hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _303 => _303[index], 'optionalAccess', _304 => _304.hasIsolatedClientBoundaries]) === true,
4025
- islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _305 => _305[index], 'optionalAccess', _306 => _306.islandStrategy]), () => ( null))
4104
+ hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _312 => _312[index], 'optionalAccess', _313 => _313.hasIsolatedClientBoundaries]) === true,
4105
+ islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _314 => _314[index], 'optionalAccess', _315 => _315.islandStrategy]), () => ( null))
4026
4106
  })),
4027
4107
  server.config.root,
4028
4108
  true
@@ -4070,7 +4150,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4070
4150
  mergedMetadata = await _chunk6IOZPJ3Icjs.mergeModuleViewport.call(void 0, mergedMetadata, routeModule, routeProps);
4071
4151
  mergedMetadata = _chunk6IOZPJ3Icjs.addMetadataMarkdownAlternate.call(void 0,
4072
4152
  mergedMetadata,
4073
- _chunkC2JOS77Zcjs.getFarmMarkdownAlternatePath.call(void 0, farmApp.getConfig().md, targetRequestUrl.pathname, {
4153
+ _chunkHGB4PM2Ccjs.getFarmMarkdownAlternatePath.call(void 0, farmApp.getConfig().md, targetRequestUrl.pathname, {
4074
4154
  routePathname: (pathname2) => routeManager3.toRoutePathname(pathname2)
4075
4155
  })
4076
4156
  );
@@ -4079,7 +4159,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4079
4159
  const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
4080
4160
  const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
4081
4161
  (entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
4082
- ), () => ( _chunk2IFT2CSAcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4162
+ ), () => ( _chunkHTXKSREFcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4083
4163
  const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
4084
4164
  request: targetRequest,
4085
4165
  params: slot.params,
@@ -4125,15 +4205,15 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4125
4205
  );
4126
4206
  const projectRoot = server.config.root;
4127
4207
  const toUrlPath = (absolutePath) => _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
4128
- const renderPlan = _chunk2MR4MABGcjs.createFarmRouteRenderPlan.call(void 0, {
4208
+ const renderPlan = _chunkPXAHSCR6cjs.createFarmRouteRenderPlan.call(void 0, {
4129
4209
  pageShouldHydrate: shouldHydrate,
4130
4210
  layoutShouldHydrate: shouldHydrateLayout,
4131
4211
  islandStrategy: hydrationIslandStrategy,
4132
- rendering: _chunkCSQPMV3Qcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4212
+ rendering: _chunkCLEWORVYcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4133
4213
  });
4134
4214
  const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
4135
- const layoutStartIndex = _chunk2MR4MABGcjs.getSharedLayoutPrefixLength.call(void 0,
4136
- _chunk2MR4MABGcjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4215
+ const layoutStartIndex = _chunkPXAHSCR6cjs.getSharedLayoutPrefixLength.call(void 0,
4216
+ _chunkPXAHSCR6cjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4137
4217
  destinationLayoutPatterns
4138
4218
  );
4139
4219
  const renderer = farmApp.getServerRenderer();
@@ -4143,7 +4223,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4143
4223
  middlewareContext,
4144
4224
  () => renderer.renderNavigationFragment({
4145
4225
  PageComponent: routeModule.default,
4146
- LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _307 => _307.default]),
4226
+ LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _316 => _316.default]),
4147
4227
  pageProps: routeProps,
4148
4228
  params,
4149
4229
  layouts: layouts.map((layout, index) => ({
@@ -4205,7 +4285,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4205
4285
  from: interceptFromHeader,
4206
4286
  slots: routeSlots.filter((slot) => slot.interception).map((slot) => slot.name)
4207
4287
  } : void 0,
4208
- i18n: _chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0, )
4288
+ i18n: _chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, )
4209
4289
  };
4210
4290
  await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0,
4211
4291
  res,
@@ -4214,7 +4294,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4214
4294
  {
4215
4295
  status: 200,
4216
4296
  headers: {
4217
- "Cache-Control": _chunk2MR4MABGcjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4297
+ "Cache-Control": _chunkPXAHSCR6cjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4218
4298
  "X-Farm-Navigation": "html-fragment",
4219
4299
  Vary: "X-Farm-Layout-Chain",
4220
4300
  [_chunkNLBHLPEOcjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
@@ -4256,29 +4336,29 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4256
4336
  trustProxy: currentServerConfig.trustProxy
4257
4337
  }).pathname;
4258
4338
  const routeManager2 = farmApp.getRouteManager();
4259
- const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _308 => _308.hasHook, 'call', _309 => _309("beforeRequest")]), () => ( false));
4260
- const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _310 => _310.hasHook, 'call', _311 => _311("afterResponse")]), () => ( false));
4261
- const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _312 => _312.hasHook, 'call', _313 => _313("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _314 => _314.hasHook, 'call', _315 => _315("afterRender")]), () => ( false)));
4339
+ const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _317 => _317.hasHook, 'call', _318 => _318("beforeRequest")]), () => ( false));
4340
+ const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _319 => _319.hasHook, 'call', _320 => _320("afterResponse")]), () => ( false));
4341
+ const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _321 => _321.hasHook, 'call', _322 => _322("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _323 => _323.hasHook, 'call', _324 => _324("afterRender")]), () => ( false)));
4262
4342
  const opensRuntimeSession = pm ? opensFarmDevRuntimeSession(pm) : false;
4263
- const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _316 => _316.hasRuntimeHook, 'call', _317 => _317("after")]), () => ( false));
4343
+ const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _325 => _325.hasRuntimeHook, 'call', _326 => _326("after")]), () => ( false));
4264
4344
  const pageBuiltInRouteLabel = (pathname2) => {
4265
4345
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
4266
- const mcpLabel = _chunkSXMWVP2Lcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4346
+ const mcpLabel = _chunk4YHGQDTTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4267
4347
  if (mcpLabel) return mcpLabel;
4268
4348
  if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
4269
- return routePathname === _chunkTP4RAV7Ycjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkTP4RAV7Ycjs.FARM_DEFAULT_MCP_PATH : null;
4349
+ return routePathname === _chunkTU6VAH4Vcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkTU6VAH4Vcjs.FARM_DEFAULT_MCP_PATH : null;
4270
4350
  };
4271
4351
  const pageRuntimeOptions = (pathname2) => {
4272
4352
  const match = routeManager2.matchRoute(pathname2);
4273
4353
  return {
4274
4354
  kind: "page",
4275
- route: _chunkSXMWVP2Lcjs.setFarmRouteLabel.call(void 0,
4355
+ route: _chunk4YHGQDTTcjs.setFarmRouteLabel.call(void 0,
4276
4356
  {
4277
4357
  pathname: pathname2,
4278
- pattern: _optionalChain([match, 'optionalAccess', _318 => _318.route, 'optionalAccess', _319 => _319.pattern]) || null,
4279
- params: _optionalChain([match, 'optionalAccess', _320 => _320.params]) || {}
4358
+ pattern: _optionalChain([match, 'optionalAccess', _327 => _327.route, 'optionalAccess', _328 => _328.pattern]) || null,
4359
+ params: _optionalChain([match, 'optionalAccess', _329 => _329.params]) || {}
4280
4360
  },
4281
- _optionalChain([match, 'optionalAccess', _321 => _321.route]) ? null : pageBuiltInRouteLabel(pathname2)
4361
+ _optionalChain([match, 'optionalAccess', _330 => _330.route]) ? null : pageBuiltInRouteLabel(pathname2)
4282
4362
  )
4283
4363
  };
4284
4364
  };
@@ -4358,7 +4438,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4358
4438
  }) : void 0;
4359
4439
  let middlewareFailed = false;
4360
4440
  try {
4361
- if (_optionalChain([middlewareManager, 'optionalAccess', _322 => _322.hasMiddleware, 'call', _323 => _323()])) {
4441
+ if (_optionalChain([middlewareManager, 'optionalAccess', _331 => _331.hasMiddleware, 'call', _332 => _332()])) {
4362
4442
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
4363
4443
  const handled = await runFarmMiddlewareWithNavigation(
4364
4444
  farmApp.getServerRenderer(),
@@ -4371,7 +4451,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4371
4451
  throw error;
4372
4452
  });
4373
4453
  if (handled) {
4374
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _324 => _324.isEnded, 'call', _325 => _325()])) {
4454
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _333 => _333.isEnded, 'call', _334 => _334()])) {
4375
4455
  const duration = Date.now() - startTime;
4376
4456
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4377
4457
  }
@@ -4386,8 +4466,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4386
4466
  res
4387
4467
  );
4388
4468
  }
4389
- if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _326 => _326.isEnded, 'call', _327 => _327()])) {
4390
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _328 => _328.isEnded, 'call', _329 => _329()])) {
4469
+ if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _335 => _335.isEnded, 'call', _336 => _336()])) {
4470
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _337 => _337.isEnded, 'call', _338 => _338()])) {
4391
4471
  const duration = Date.now() - startTime;
4392
4472
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4393
4473
  }
@@ -4406,8 +4486,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4406
4486
  await pm.reportRuntimeRequestError(runtimeSession, error);
4407
4487
  } else {
4408
4488
  await pm.failRuntimeRequest(runtimeSession, error);
4409
- if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _330 => _330.isEnded, 'call', _331 => _331()])) {
4410
- _optionalChain([responseInterceptor, 'optionalAccess', _332 => _332.release, 'call', _333 => _333()]);
4489
+ if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _339 => _339.isEnded, 'call', _340 => _340()])) {
4490
+ _optionalChain([responseInterceptor, 'optionalAccess', _341 => _341.release, 'call', _342 => _342()]);
4411
4491
  console.error("[FARM] Page error:", error);
4412
4492
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
4413
4493
  return;
@@ -4424,7 +4504,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4424
4504
  }
4425
4505
  })
4426
4506
  );
4427
- const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _334 => _334.stack, 'access', _335 => _335.at, 'call', _336 => _336(-1), 'optionalAccess', _337 => _337.handle]);
4507
+ const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _343 => _343.stack, 'access', _344 => _344.at, 'call', _345 => _345(-1), 'optionalAccess', _346 => _346.handle]);
4428
4508
  if (farmOwnsDevCors && viteServer.config.server.cors === false) {
4429
4509
  farmMiddlewares.use(createFarmDevViteCorsMiddleware());
4430
4510
  }
@@ -4453,7 +4533,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4453
4533
  });
4454
4534
  }
4455
4535
  if (id.startsWith("@farm.js/core/internal/") && importer && isOutsideAppRoot(importer)) {
4456
- const root = _optionalChain([farmApp, 'optionalAccess', _338 => _338.getConfig, 'call', _339 => _339(), 'access', _340 => _340.root]) || _optionalChain([server, 'optionalAccess', _341 => _341.config, 'access', _342 => _342.root]) || options.root;
4536
+ const root = _optionalChain([farmApp, 'optionalAccess', _347 => _347.getConfig, 'call', _348 => _348(), 'access', _349 => _349.root]) || _optionalChain([server, 'optionalAccess', _350 => _350.config, 'access', _351 => _351.root]) || options.root;
4457
4537
  return this.resolve(id, path6.join(root, "package.json"), {
4458
4538
  ...resolveOptions,
4459
4539
  skipSelf: true
@@ -4481,7 +4561,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4481
4561
  }
4482
4562
  },
4483
4563
  async load(id, loadOptions) {
4484
- if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _343 => _343.ssr]) && !farmSetupContext.getStore()) {
4564
+ if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _352 => _352.ssr]) && !farmSetupContext.getStore()) {
4485
4565
  await pendingClientSetup;
4486
4566
  }
4487
4567
  if (_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && islandsServerFns()) {
@@ -4499,8 +4579,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4499
4579
  if (imageModule) return imageModule;
4500
4580
  }
4501
4581
  if (_chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
4502
- const renderer = _optionalChain([farmApp, 'optionalAccess', _344 => _344.getConfig, 'call', _345 => _345(), 'access', _346 => _346.renderer]) || _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, options.renderer);
4503
- const root = _optionalChain([server, 'optionalAccess', _347 => _347.config, 'access', _348 => _348.root]) || options.root;
4582
+ const renderer = _optionalChain([farmApp, 'optionalAccess', _353 => _353.getConfig, 'call', _354 => _354(), 'access', _355 => _355.renderer]) || _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, options.renderer);
4583
+ const root = _optionalChain([server, 'optionalAccess', _356 => _356.config, 'access', _357 => _357.root]) || options.root;
4504
4584
  if (isClientEnvironment(this, loadOptions)) {
4505
4585
  return generateProgrammaticClientRouteModuleForId(
4506
4586
  id,
@@ -4516,21 +4596,21 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4516
4596
  return FARM_DEV_CLIENT_BOOT_MODULE;
4517
4597
  }
4518
4598
  if (isFarmClientVirtualId(id)) {
4519
- const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _349 => _349.getConfig, 'call', _350 => _350()]);
4520
- const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _351 => _351.renderer]) || _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, options.renderer);
4521
- const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _352 => _352.integrations]) || options.integrations;
4522
- const root = _optionalChain([resolvedConfig, 'optionalAccess', _353 => _353.root]) || _optionalChain([server, 'optionalAccess', _354 => _354.config, 'access', _355 => _355.root]) || process.cwd();
4523
- const docs = _optionalChain([resolvedConfig, 'optionalAccess', _356 => _356.docs]);
4599
+ const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _358 => _358.getConfig, 'call', _359 => _359()]);
4600
+ const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _360 => _360.renderer]) || _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, options.renderer);
4601
+ const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _361 => _361.integrations]) || options.integrations;
4602
+ const root = _optionalChain([resolvedConfig, 'optionalAccess', _362 => _362.root]) || _optionalChain([server, 'optionalAccess', _363 => _363.config, 'access', _364 => _364.root]) || process.cwd();
4603
+ const docs = _optionalChain([resolvedConfig, 'optionalAccess', _365 => _365.docs]);
4524
4604
  const adapterOwnsDocsRuntime = Boolean(
4525
- _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _357 => _357.adapter, 'optionalAccess', _358 => _358.server]) && docs.adapter.react
4605
+ _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _366 => _366.adapter, 'optionalAccess', _367 => _367.server]) && docs.adapter.react
4526
4606
  );
4527
- const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _359 => _359.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4607
+ const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _368 => _368.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4528
4608
  const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
4529
- _optionalChain([docs, 'optionalAccess', _360 => _360.enabled]) ? loadFarmDocsDevRuntime() : null,
4530
- _optionalChain([docs, 'optionalAccess', _361 => _361.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4609
+ _optionalChain([docs, 'optionalAccess', _369 => _369.enabled]) ? loadFarmDocsDevRuntime() : null,
4610
+ _optionalChain([docs, 'optionalAccess', _370 => _370.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4531
4611
  devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
4532
4612
  ]);
4533
- const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _362 => _362.isFarmDocsSearchEnabled, 'call', _363 => _363(docs)]), () => ( false));
4613
+ const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _371 => _371.isFarmDocsSearchEnabled, 'call', _372 => _372(docs)]), () => ( false));
4534
4614
  const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
4535
4615
  docsSearchEnabled,
4536
4616
  docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
@@ -4538,10 +4618,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4538
4618
  const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
4539
4619
  const generatedDevIndicatorsClientRuntime = farmApp ? _chunkUVV3I5QAcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
4540
4620
  const integrationProviders = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _chunkJX5VOLAVcjs.getIntegrationProviders.call(void 0, integrations) : [];
4541
- const isolatedHydrationMode = _chunk2IFT2CSAcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4542
- _optionalChain([resolvedConfig, 'optionalAccess', _364 => _364.experimental, 'optionalAccess', _365 => _365.isolatedClientHydration]),
4621
+ const isolatedHydrationMode = _chunkHTXKSREFcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4622
+ _optionalChain([resolvedConfig, 'optionalAccess', _373 => _373.experimental, 'optionalAccess', _374 => _374.isolatedClientHydration]),
4543
4623
  {
4544
- serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _366 => _366.experimental, 'optionalAccess', _367 => _367.serverComponents])) === "rsc",
4624
+ serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _375 => _375.experimental, 'optionalAccess', _376 => _376.serverComponents])) === "rsc",
4545
4625
  hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
4546
4626
  }
4547
4627
  );
@@ -4549,32 +4629,32 @@ window.__FARM_MANIFEST__ = ${inlineValue({
4549
4629
  integrationProviders,
4550
4630
  [
4551
4631
  ..._chunkJX5VOLAVcjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
4552
- ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _368 => _368.getFarmDocsDocumentNavigationMatchers, 'call', _369 => _369(docs)]), () => ( []))
4632
+ ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _377 => _377.getFarmDocsDocumentNavigationMatchers, 'call', _378 => _378(docs)]), () => ( []))
4553
4633
  ],
4554
4634
  generatedDocsSearchRuntime,
4555
4635
  `${generatedDevtoolsClientRuntime}
4556
4636
  ${generatedDevIndicatorsClientRuntime}`,
4557
- _optionalChain([resolvedConfig, 'optionalAccess', _370 => _370.plugins]) || [],
4637
+ _optionalChain([resolvedConfig, 'optionalAccess', _379 => _379.plugins]) || [],
4558
4638
  root,
4559
- _optionalChain([resolvedConfig, 'optionalAccess', _371 => _371.srcDir]) || options.srcDir || "src",
4560
- _optionalChain([resolvedConfig, 'optionalAccess', _372 => _372.publicRuntimeConfig]) || options.publicRuntimeConfig,
4561
- _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _373 => _373.adapter, 'optionalAccess', _374 => _374.react]) : void 0,
4639
+ _optionalChain([resolvedConfig, 'optionalAccess', _380 => _380.srcDir]) || options.srcDir || "src",
4640
+ _optionalChain([resolvedConfig, 'optionalAccess', _381 => _381.publicRuntimeConfig]) || options.publicRuntimeConfig,
4641
+ _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _382 => _382.adapter, 'optionalAccess', _383 => _383.react]) : void 0,
4562
4642
  renderer,
4563
- isolatedHydrationMode === "enabled" || _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _375 => _375.getRouteManager, 'call', _376 => _376(), 'access', _377 => _377.getIsolatedClientBoundaryModules, 'call', _378 => _378(root)])))), 'optionalAccess', _379 => _379.size]) > 0,
4564
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _380 => _380.trailingSlash]), () => ( false)),
4565
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _381 => _381.basePath]), () => ( "/")),
4566
- _chunkKWST2O22cjs.generateClientCachePersistenceCode.call(void 0,
4567
- _chunkKWST2O22cjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _382 => _382.cache]))
4643
+ isolatedHydrationMode === "enabled" || _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _384 => _384.getRouteManager, 'call', _385 => _385(), 'access', _386 => _386.getIsolatedClientBoundaryModules, 'call', _387 => _387(root)])))), 'optionalAccess', _388 => _388.size]) > 0,
4644
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _389 => _389.trailingSlash]), () => ( false)),
4645
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _390 => _390.basePath]), () => ( "/")),
4646
+ _chunkTAU3OF5Bcjs.generateClientCachePersistenceCode.call(void 0,
4647
+ _chunkTAU3OF5Bcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _391 => _391.cache]))
4568
4648
  ),
4569
4649
  _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
4570
- _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _383 => _383.experimental, 'optionalAccess', _384 => _384.serverComponents])) === "islands"
4650
+ _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _392 => _392.experimental, 'optionalAccess', _393 => _393.serverComponents])) === "islands"
4571
4651
  );
4572
4652
  }
4573
4653
  if (id === "/@farm/server") {
4574
4654
  return generateServerCode();
4575
4655
  }
4576
4656
  if (id === "/@farm/manifest") {
4577
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _385 => _385.getRouteManager, 'call', _386 => _386()]);
4657
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _394 => _394.getRouteManager, 'call', _395 => _395()]);
4578
4658
  if (!routeManager) {
4579
4659
  return `
4580
4660
  export const getManifest = () => ({
@@ -4586,118 +4666,82 @@ export const getManifest = () => ({
4586
4666
  });
4587
4667
  `;
4588
4668
  }
4589
- const manifest = routeManager.generateClientManifest(server.config.root);
4590
- const globalStylesheetHref = _chunkKWST2O22cjs.resolveDevGlobalStylesheetHref.call(void 0,
4669
+ const globalStylesheetHref = _chunkTAU3OF5Bcjs.resolveDevGlobalStylesheetHref.call(void 0,
4591
4670
  server.config.root,
4592
- _optionalChain([farmApp, 'optionalAccess', _387 => _387.getConfig, 'call', _388 => _388(), 'access', _389 => _389.srcDir])
4671
+ _optionalChain([farmApp, 'optionalAccess', _396 => _396.getConfig, 'call', _397 => _397(), 'access', _398 => _398.srcDir])
4593
4672
  );
4594
- const fullManifest = {
4595
- clientEntry: "/@farm/client.js",
4596
- routes: {},
4597
- layouts: {},
4598
- slots: [],
4599
- sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
4673
+ const fullManifest = _chunkTAU3OF5Bcjs.createFarmDevClientManifest.call(void 0,
4674
+ routeManager.generateClientManifest(server.config.root),
4675
+ {
4676
+ sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
4677
+ }
4678
+ );
4679
+ return {
4680
+ code: `const manifest = JSON.parse(${JSON.stringify(JSON.stringify(fullManifest))});
4681
+ export const getManifest = () => manifest;
4682
+ export { manifest };
4683
+ `,
4684
+ map: { mappings: "" }
4600
4685
  };
4601
- for (const route of manifest.routes) {
4602
- fullManifest.routes[route.pattern] = {
4603
- modulePath: route.modulePath,
4604
- pattern: route.pattern,
4605
- ...route.directory ? { directory: route.directory } : {},
4606
- segments: route.segments,
4607
- search: route.search,
4608
- isClientComponent: route.isClientComponent,
4609
- shouldHydrate: route.shouldHydrate,
4610
- islandStrategy: route.islandStrategy,
4611
- renderPlan: route.renderPlan,
4612
- preloads: [route.modulePath],
4613
- // In dev, preload is just the module
4614
- assets: []
4615
- };
4616
- }
4617
- for (const layout of manifest.layouts) {
4618
- const groupScope = _chunk2MR4MABGcjs.getRouteGroupScope.call(void 0, layout.pattern);
4619
- fullManifest.layouts[layout.pattern] = {
4620
- modulePath: layout.modulePath,
4621
- pattern: layout.pattern,
4622
- ...groupScope ? { urlPattern: _chunk2MR4MABGcjs.stripRouteGroups.call(void 0, layout.pattern), groupScope } : {},
4623
- shouldHydrate: layout.shouldHydrate,
4624
- islandStrategy: layout.islandStrategy,
4625
- // Islands mode: rebuilt from its server tree, so its module is never preloaded.
4626
- ...layout.serverTree ? { serverTree: true } : {},
4627
- preloads: layout.serverTree ? [] : [layout.modulePath],
4628
- assets: []
4629
- };
4630
- }
4631
- for (const slot of manifest.slots) {
4632
- fullManifest.slots.push({
4633
- ...slot,
4634
- preloads: [slot.modulePath],
4635
- assets: []
4636
- });
4637
- }
4638
- return `
4639
- // Auto-generated manifest for SPA navigation (TanStack Start pattern)
4640
- // This manifest is inlined in the server bundle - no file on disk
4641
- // Client receives this via window.__FARM_MANIFEST__ in HTML
4642
- export const getManifest = () => (${JSON.stringify(fullManifest, null, 2)});
4643
- export const manifest = getManifest();
4644
- `;
4645
4686
  }
4646
4687
  },
4647
4688
  async transform(code, id, transformOptions) {
4648
- if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _390 => _390.ssr]) && !farmSetupContext.getStore()) {
4689
+ if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _399 => _399.ssr]) && !farmSetupContext.getStore()) {
4649
4690
  await pendingClientSetup;
4650
4691
  }
4651
- const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _391 => _391.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
4652
- const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _392 => _392.getConfig, 'call', _393 => _393()]), () => ( options));
4692
+ const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _400 => _400.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
4693
+ const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _401 => _401.getConfig, 'call', _402 => _402()]), () => ( options));
4653
4694
  let rewrotePackageImports = false;
4654
- if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _394 => _394.experimental, 'optionalAccess', _395 => _395.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _396 => _396.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunk2IFT2CSAcjs.hasUseClientDirective.call(void 0, code)) {
4695
+ if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _403 => _403.experimental, 'optionalAccess', _404 => _404.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _405 => _405.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkHTXKSREFcjs.hasUseClientDirective.call(void 0, code)) {
4655
4696
  const file = id.split("?", 1)[0];
4656
- const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _397 => _397.config, 'access', _398 => _398.root]) || process.cwd();
4657
- if (_optionalChain([transformOptions, 'optionalAccess', _399 => _399.ssr]) === true) {
4697
+ const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _406 => _406.config, 'access', _407 => _407.root]) || process.cwd();
4698
+ if (_optionalChain([transformOptions, 'optionalAccess', _408 => _408.ssr]) === true) {
4658
4699
  if (farmReactServerFiles.has(file)) {
4659
- for (const child of _chunk2IFT2CSAcjs.farmRelativeImportFiles.call(void 0, code, file))
4700
+ for (const child of _chunkHTXKSREFcjs.farmRelativeImportFiles.call(void 0, code, file))
4660
4701
  farmReactServerFiles.add(child);
4661
4702
  }
4662
- const serverModule = farmReactServerFiles.has(file) || !_chunk2IFT2CSAcjs.getFarmClientReachableModules.call(void 0,
4703
+ const serverModule = farmReactServerFiles.has(file) || !_chunkHTXKSREFcjs.getFarmClientReachableModules.call(void 0,
4663
4704
  path6.resolve(projectRoot, actionConfig.srcDir || "src"),
4664
4705
  projectRoot
4665
4706
  ).has(path6.resolve(file));
4666
- const reactServer = !serverModule ? null : _chunk2IFT2CSAcjs.rewriteFarmReactServerImports.call(void 0, {
4707
+ const reactServer = !serverModule ? null : _chunkHTXKSREFcjs.rewriteFarmReactServerImports.call(void 0, {
4667
4708
  code,
4668
4709
  file,
4669
- reference: (specifier, exportName) => _chunk2IFT2CSAcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
4710
+ reference: (specifier, exportName) => _chunkHTXKSREFcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
4670
4711
  onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
4671
4712
  });
4672
4713
  if (reactServer !== null) {
4673
4714
  code = reactServer;
4674
4715
  rewrotePackageImports = true;
4675
4716
  }
4676
- const internal = farmReactServerFiles.has(file) ? _chunk2IFT2CSAcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
4717
+ const internal = farmReactServerFiles.has(file) ? _chunkHTXKSREFcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
4677
4718
  code,
4678
4719
  file,
4679
- reference: (clientFile) => _chunk2IFT2CSAcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
4720
+ reference: (clientFile) => _chunkHTXKSREFcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
4680
4721
  }) : null;
4681
4722
  if (internal !== null) {
4682
4723
  code = internal;
4683
4724
  rewrotePackageImports = true;
4684
4725
  }
4685
4726
  }
4686
- const referenced = _chunk2IFT2CSAcjs.rewriteFarmPackageClientImports.call(void 0, {
4687
- code,
4727
+ const rewritePackageImports = (source2) => _chunkHTXKSREFcjs.rewriteFarmPackageClientImports.call(void 0, {
4728
+ code: source2,
4688
4729
  file,
4689
4730
  root: projectRoot,
4690
- isClientPackage: (specifier) => _chunk2IFT2CSAcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
4731
+ isClientPackage: (specifier) => _chunkHTXKSREFcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
4691
4732
  });
4733
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _409 => _409.getRouteManager, 'call', _410 => _410()]);
4734
+ const source = code;
4735
+ const referenced = routeManager ? routeManager.inspectPackages(() => rewritePackageImports(source)) : rewritePackageImports(source);
4692
4736
  if (referenced !== null) {
4693
4737
  code = referenced;
4694
4738
  rewrotePackageImports = true;
4695
4739
  }
4696
- if (_optionalChain([transformOptions, 'optionalAccess', _400 => _400.ssr]) === true) {
4740
+ if (_optionalChain([transformOptions, 'optionalAccess', _411 => _411.ssr]) === true) {
4697
4741
  const cached = rewriteFarmReactCacheImport(
4698
4742
  code,
4699
4743
  file,
4700
- _optionalChain([runtimeModule, 'optionalCall', _401 => _401(FARM_REACT_CACHE_MODULE)])
4744
+ _optionalChain([runtimeModule, 'optionalCall', _412 => _412(FARM_REACT_CACHE_MODULE)])
4701
4745
  );
4702
4746
  if (cached !== null) {
4703
4747
  code = cached;
@@ -4707,44 +4751,44 @@ export const manifest = getManifest();
4707
4751
  }
4708
4752
  if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
4709
4753
  const serverFns = _chunkPIUTGRDIcjs.transformFarmServerFns.call(void 0, code, id, {
4710
- environment: _optionalChain([transformOptions, 'optionalAccess', _402 => _402.ssr]) === true ? "rsc" : "client"
4754
+ environment: _optionalChain([transformOptions, 'optionalAccess', _413 => _413.ssr]) === true ? "rsc" : "client"
4711
4755
  });
4712
4756
  if (serverFns) {
4713
4757
  if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
4714
4758
  code = serverFns.code;
4715
4759
  }
4716
4760
  }
4717
- if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _403 => _403.experimental, 'optionalAccess', _404 => _404.serverComponents])) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
4761
+ if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _414 => _414.experimental, 'optionalAccess', _415 => _415.serverComponents])) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
4718
4762
  const file = id.split("?", 1)[0];
4719
4763
  const actionModule = transformFarmFormActionModule({
4720
4764
  code,
4721
4765
  id,
4722
- root: actionConfig.root || _optionalChain([server, 'optionalAccess', _405 => _405.config, 'access', _406 => _406.root]) || process.cwd(),
4723
- ssr: _optionalChain([transformOptions, 'optionalAccess', _407 => _407.ssr]) === true,
4766
+ root: actionConfig.root || _optionalChain([server, 'optionalAccess', _416 => _416.config, 'access', _417 => _417.root]) || process.cwd(),
4767
+ ssr: _optionalChain([transformOptions, 'optionalAccess', _418 => _418.ssr]) === true,
4724
4768
  // Parsed by file type: page components are TSX.
4725
4769
  parse: (source) => _vite.parseSync.call(void 0, file, source).program,
4726
4770
  runtimeModule
4727
4771
  });
4728
4772
  if (actionModule) return { code: actionModule, map: null };
4729
4773
  }
4730
- if (!_optionalChain([transformOptions, 'optionalAccess', _408 => _408.ssr])) {
4731
- const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _409 => _409.getConfig, 'call', _410 => _410(), 'optionalAccess', _411 => _411.docs]));
4732
- if (_chunkKWST2O22cjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
4733
- const redacted = _chunkKWST2O22cjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
4774
+ if (!_optionalChain([transformOptions, 'optionalAccess', _419 => _419.ssr])) {
4775
+ const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _420 => _420.getConfig, 'call', _421 => _421(), 'optionalAccess', _422 => _422.docs]));
4776
+ if (_chunkTAU3OF5Bcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
4777
+ const redacted = _chunkTAU3OF5Bcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
4734
4778
  if (redacted !== null) return { code: redacted, map: null };
4735
4779
  }
4736
4780
  }
4737
- if (!_optionalChain([transformOptions, 'optionalAccess', _412 => _412.ssr])) {
4738
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _413 => _413.getConfig, 'call', _414 => _414()]), () => ( options));
4739
- if ((_optionalChain([currentConfig, 'access', _415 => _415.experimental, 'optionalAccess', _416 => _416.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
4781
+ if (!_optionalChain([transformOptions, 'optionalAccess', _423 => _423.ssr])) {
4782
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _424 => _424.getConfig, 'call', _425 => _425()]), () => ( options));
4783
+ if ((_optionalChain([currentConfig, 'access', _426 => _426.experimental, 'optionalAccess', _427 => _427.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
4740
4784
  const violation = findClientServerFnViolation(code, id);
4741
4785
  if (violation) {
4742
4786
  this.error(formatServerFnBoundaryError(violation, id));
4743
4787
  }
4744
4788
  }
4745
4789
  }
4746
- if (!_optionalChain([transformOptions, 'optionalAccess', _417 => _417.ssr]) && shouldInspectClientBoundary(id, code)) {
4747
- warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _418 => _418.getConfig, 'call', _419 => _419()]), () => ( options)));
4790
+ if (!_optionalChain([transformOptions, 'optionalAccess', _428 => _428.ssr]) && shouldInspectClientBoundary(id, code)) {
4791
+ warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _429 => _429.getConfig, 'call', _430 => _430()]), () => ( options)));
4748
4792
  }
4749
4793
  if (typeof imageImports.transform === "function") {
4750
4794
  const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
@@ -4759,13 +4803,13 @@ export const manifest = getManifest();
4759
4803
  id,
4760
4804
  transformOptions
4761
4805
  );
4762
- const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _420 => _420.code, 'optionalAccess', _421 => _421.toString, 'call', _422 => _422()]);
4806
+ const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _431 => _431.code, 'optionalAccess', _432 => _432.toString, 'call', _433 => _433()]);
4763
4807
  if (fontCode) {
4764
4808
  transformedCode = fontCode;
4765
4809
  transformed = true;
4766
4810
  }
4767
4811
  }
4768
- if (_optionalChain([transformOptions, 'optionalAccess', _423 => _423.ssr]) && server) {
4812
+ if (_optionalChain([transformOptions, 'optionalAccess', _434 => _434.ssr]) && server) {
4769
4813
  const rewrittenImports = rewriteEarlySsrRelativeImports({
4770
4814
  code: transformedCode,
4771
4815
  id,
@@ -4777,26 +4821,26 @@ export const manifest = getManifest();
4777
4821
  transformed = true;
4778
4822
  }
4779
4823
  }
4780
- if (_chunk2IFT2CSAcjs.hasUseClientDirective.call(void 0, transformedCode)) {
4824
+ if (_chunkHTXKSREFcjs.hasUseClientDirective.call(void 0, transformedCode)) {
4781
4825
  const clientBoundarySource = transformedCode;
4782
4826
  const moduleInfo = this.getModuleInfo(id);
4783
4827
  if (moduleInfo) {
4784
4828
  moduleInfo.isClientComponent = true;
4785
4829
  }
4786
- transformedCode = _chunk2IFT2CSAcjs.stripUseClientDirective.call(void 0, transformedCode);
4830
+ transformedCode = _chunkHTXKSREFcjs.stripUseClientDirective.call(void 0, transformedCode);
4787
4831
  transformed = true;
4788
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _424 => _424.getConfig, 'call', _425 => _425()]), () => ( options));
4832
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _435 => _435.getConfig, 'call', _436 => _436()]), () => ( options));
4789
4833
  let isolatedModuleReference = null;
4790
- const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _426 => _426.config, 'access', _427 => _427.root]) || process.cwd();
4834
+ const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _437 => _437.config, 'access', _438 => _438.root]) || process.cwd();
4791
4835
  const cleanId = id.split("?", 1)[0];
4792
- const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _428 => _428.getRouteManager, 'call', _429 => _429(), 'access', _430 => _430.getIsolatedClientBoundaryModules, 'call', _431 => _431(root)])));
4793
- const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _432 => _432.has, 'call', _433 => _433(path6.resolve(cleanId))]) === true;
4794
- if (_chunk67MZTLTFcjs.isReactRenderer.call(void 0, _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunk2IFT2CSAcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
4795
- cleanId.replace(/\\/g, "/").includes(_chunk2IFT2CSAcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
4836
+ const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _439 => _439.getRouteManager, 'call', _440 => _440(), 'access', _441 => _441.getIsolatedClientBoundaryModules, 'call', _442 => _442(root)])));
4837
+ const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _443 => _443.has, 'call', _444 => _444(path6.resolve(cleanId))]) === true;
4838
+ if (_chunk67MZTLTFcjs.isReactRenderer.call(void 0, _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkHTXKSREFcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
4839
+ cleanId.replace(/\\/g, "/").includes(_chunkHTXKSREFcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
4796
4840
  isolatedModuleReference = _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, cleanId, root);
4797
- const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _434 => _434.experimental, 'optionalAccess', _435 => _435.serverComponents])) === "islands";
4798
- const explicitStrategy = _chunk2IFT2CSAcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
4799
- const inference = islandsMode && explicitStrategy === null ? _chunkKWST2O22cjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
4841
+ const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _445 => _445.experimental, 'optionalAccess', _446 => _446.serverComponents])) === "islands";
4842
+ const explicitStrategy = _chunkHTXKSREFcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
4843
+ const inference = islandsMode && explicitStrategy === null ? _chunkTAU3OF5Bcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
4800
4844
  if (inference) {
4801
4845
  for (const file of inference.files) {
4802
4846
  if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
@@ -4809,8 +4853,8 @@ export const manifest = getManifest();
4809
4853
  islandStrategy: _nullishCoalesce(explicitStrategy, () => ( "load")),
4810
4854
  parse: (source) => this.parse(source),
4811
4855
  slots: islandsMode,
4812
- browser: _optionalChain([transformOptions, 'optionalAccess', _436 => _436.ssr]) !== true,
4813
- inferredInteraction: _optionalChain([inference, 'optionalAccess', _437 => _437.strategy]) === "interaction",
4856
+ browser: _optionalChain([transformOptions, 'optionalAccess', _447 => _447.ssr]) !== true,
4857
+ inferredInteraction: _optionalChain([inference, 'optionalAccess', _448 => _448.strategy]) === "interaction",
4814
4858
  runtimeModule
4815
4859
  });
4816
4860
  if (!transformedBoundary) {
@@ -4841,7 +4885,7 @@ export const manifest = getManifest();
4841
4885
  );
4842
4886
  return;
4843
4887
  }` : "";
4844
- const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _438 => _438.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
4888
+ const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _449 => _449.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
4845
4889
  if (import.meta.hot) {
4846
4890
  import.meta.hot.accept((newModule) => {
4847
4891
  ${isolatedHmrUpdate}
@@ -4897,14 +4941,14 @@ if (import.meta.hot) {
4897
4941
  }
4898
4942
  _chunkQMNWKQL4cjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
4899
4943
  _chunkQMNWKQL4cjs.logger.info("Pre-rendering SSG pages...");
4900
- const outDir = path6.join(_optionalChain([server, 'optionalAccess', _439 => _439.config, 'access', _440 => _440.root]) || process.cwd(), options.outDir || "dist");
4944
+ const outDir = path6.join(_optionalChain([server, 'optionalAccess', _450 => _450.config, 'access', _451 => _451.root]) || process.cwd(), options.outDir || "dist");
4901
4945
  const clientDir = path6.join(outDir, "client");
4902
4946
  for (const page of ssgPages) {
4903
4947
  try {
4904
4948
  const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
4905
4949
  await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
4906
4950
  const mod = await routeManager.loadRouteModule(page.filePath);
4907
- if (!_optionalChain([mod, 'optionalAccess', _441 => _441.default])) return;
4951
+ if (!_optionalChain([mod, 'optionalAccess', _452 => _452.default])) return;
4908
4952
  const { layouts } = routeManager.matchRoute(page.urlPath);
4909
4953
  const layoutModules = await Promise.all(
4910
4954
  layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
@@ -4933,10 +4977,10 @@ if (import.meta.hot) {
4933
4977
  );
4934
4978
  }
4935
4979
  const html = renderToString(pageElement);
4936
- const i18nSnapshot = _chunk2AM26UGIcjs.getFarmI18nClientSnapshot.call(void 0, );
4980
+ const i18nSnapshot = _chunkNLBK37HIcjs.getFarmI18nClientSnapshot.call(void 0, );
4937
4981
  const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
4938
4982
  const fullHtml = `<!DOCTYPE html>
4939
- <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _442 => _442.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
4983
+ <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _453 => _453.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
4940
4984
  <head>
4941
4985
  <meta charset="utf-8">
4942
4986
  <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -4978,9 +5022,15 @@ if (import.meta.hot) {
4978
5022
  _chunkQMNWKQL4cjs.logger.error(`SSG build failed: ${error}`);
4979
5023
  }
4980
5024
  },
4981
- watchChange() {
4982
- _chunk2IFT2CSAcjs.invalidateFarmClientReachableModules.call(void 0, );
4983
- _chunk2IFT2CSAcjs.invalidateFarmClientOnlyScan.call(void 0, );
5025
+ watchChange(id, change) {
5026
+ const watched = _chunkQMNWKQL4cjs.toPosixPath.call(void 0, id);
5027
+ if (!watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched)) {
5028
+ _optionalChain([farmApp, 'optionalAccess', _454 => _454.getRouteManager, 'call', _455 => _455(), 'access', _456 => _456.noteSourceChange, 'call', _457 => _457(id, change.event)]);
5029
+ }
5030
+ _chunkHTXKSREFcjs.invalidateFarmClientReachableModules.call(void 0, );
5031
+ _chunkHTXKSREFcjs.invalidateFarmClientOnlyScan.call(void 0, );
5032
+ _chunkTAU3OF5Bcjs.invalidateFarmRouteRootInferences.call(void 0, );
5033
+ _chunkHTXKSREFcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
4984
5034
  },
4985
5035
  async handleHotUpdate(ctx) {
4986
5036
  if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
@@ -5005,13 +5055,13 @@ if (import.meta.hot) {
5005
5055
  server2.moduleGraph.invalidateModule(mod);
5006
5056
  }
5007
5057
  }
5008
- const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _443 => _443.getConfig, 'call', _444 => _444()]);
5058
+ const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _458 => _458.getConfig, 'call', _459 => _459()]);
5009
5059
  const normalizedFile = file.replace(/\\/g, "/");
5010
5060
  if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) && _chunkMTBDJ326cjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
5011
5061
  (appDir) => normalizedFile.startsWith(`${_chunkQMNWKQL4cjs.toPosixPath.call(void 0, appDir)}/api/`)
5012
5062
  )) {
5013
5063
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
5014
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _445 => _445(`updated ${file}`)]);
5064
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _460 => _460(`updated ${file}`)]);
5015
5065
  server2.ws.send({ type: "full-reload", path: "*" });
5016
5066
  return [];
5017
5067
  }
@@ -5021,7 +5071,7 @@ if (import.meta.hot) {
5021
5071
  for (const mod of modules) {
5022
5072
  server2.moduleGraph.invalidateModule(mod);
5023
5073
  }
5024
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _446 => _446(`updated ${file}`)]);
5074
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _461 => _461(`updated ${file}`)]);
5025
5075
  server2.ws.send({
5026
5076
  type: "full-reload",
5027
5077
  path: "*"
@@ -5034,7 +5084,7 @@ if (import.meta.hot) {
5034
5084
  for (const mod of modules) {
5035
5085
  server2.moduleGraph.invalidateModule(mod);
5036
5086
  }
5037
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _447 => _447(`updated ${file}`)]);
5087
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _462 => _462(`updated ${file}`)]);
5038
5088
  server2.ws.send({
5039
5089
  type: "full-reload",
5040
5090
  path: "*"
@@ -5042,16 +5092,19 @@ if (import.meta.hot) {
5042
5092
  return [];
5043
5093
  }
5044
5094
  if (apiRouteManager && _chunkJYNNIGQOcjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
5045
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _448 => _448(`updated ${file}`)]);
5095
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _463 => _463(`updated ${file}`)]);
5046
5096
  }
5047
- const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _449 => _449.experimental, 'optionalAccess', _450 => _450.isolatedClientHydration]);
5048
- const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _451 => _451.getRouteManager, 'call', _452 => _452()]);
5049
- const isHydrationPlanSource = currentSrcRoot !== null && normalizedFile.startsWith(`${currentSrcRoot}/`) && /\.[cm]?[jt]sx?$/.test(normalizedFile);
5050
- const tracksAsyncOwnerIslands = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _453 => _453.renderer])) && planRouteManager !== void 0;
5097
+ const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _464 => _464.experimental, 'optionalAccess', _465 => _465.isolatedClientHydration]);
5098
+ const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _466 => _466.getRouteManager, 'call', _467 => _467()]);
5099
+ const isHydrationPlanSource = /\.[cm]?[jt]sx?$/.test(normalizedFile) && !normalizedFile.includes("/node_modules/") && !isFarmGeneratedOutput(normalizedFile);
5100
+ const tracksAsyncOwnerIslands = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _468 => _468.renderer])) && planRouteManager !== void 0;
5051
5101
  let clientPlanCurrent = false;
5052
5102
  if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
5053
5103
  const routeManager = planRouteManager;
5054
- if (routeManager) {
5104
+ if (_optionalChain([routeManager, 'optionalAccess', _469 => _469.isEditPlanNeutral, 'call', _470 => _470(file)])) {
5105
+ clientPlanCurrent = true;
5106
+ } else if (routeManager) {
5107
+ routeManager.noteSourceChange(file, "update");
5055
5108
  try {
5056
5109
  const previousPlan = JSON.stringify(
5057
5110
  routeManager.generateClientManifest(currentFarmConfig.root)
@@ -5109,7 +5162,7 @@ if (import.meta.hot) {
5109
5162
  }
5110
5163
  return [];
5111
5164
  }
5112
- if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _454 => _454.getRouteManager, 'call', _455 => _455(), 'access', _456 => _456.invalidateClientManifest, 'call', _457 => _457()]);
5165
+ if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _471 => _471.getRouteManager, 'call', _472 => _472(), 'access', _473 => _473.invalidateClientManifest, 'call', _474 => _474()]);
5113
5166
  const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
5114
5167
  if (manifestModule) {
5115
5168
  server2.moduleGraph.invalidateModule(manifestModule);
@@ -5127,6 +5180,11 @@ if (import.meta.hot) {
5127
5180
  return [];
5128
5181
  }
5129
5182
  }
5183
+ if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _475 => _475.environments, 'access', _476 => _476.client, 'optionalAccess', _477 => _477.moduleGraph, 'access', _478 => _478.getModulesByFile, 'call', _479 => _479(normalizedFile), 'optionalAccess', _480 => _480.size]) && _chunkJYNNIGQOcjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
5184
+ logUpdate("PAGE", `updated ${path6.basename(file)}`);
5185
+ server2.ws.send({ type: "full-reload", path: "*" });
5186
+ return [];
5187
+ }
5130
5188
  return modules;
5131
5189
  }
5132
5190
  };
@@ -5220,7 +5278,7 @@ function createPageDataMiddlewareResponse(res) {
5220
5278
  return (...args) => {
5221
5279
  if (captures(target.statusCode, target.getHeader("location"))) {
5222
5280
  const callback = args.find((arg) => typeof arg === "function");
5223
- _optionalChain([callback, 'optionalCall', _458 => _458()]);
5281
+ _optionalChain([callback, 'optionalCall', _481 => _481()]);
5224
5282
  return property === "write" ? true : response;
5225
5283
  }
5226
5284
  return target[property](...args);
@@ -5284,12 +5342,12 @@ function isFarmClientVirtualId(id) {
5284
5342
  }
5285
5343
  function isClientEnvironment(context, loadOptions) {
5286
5344
  const environment = context.environment;
5287
- if (_optionalChain([environment, 'optionalAccess', _459 => _459.config, 'optionalAccess', _460 => _460.consumer])) return environment.config.consumer === "client";
5288
- if (_optionalChain([environment, 'optionalAccess', _461 => _461.name])) return environment.name === "client";
5289
- return _optionalChain([loadOptions, 'optionalAccess', _462 => _462.ssr]) !== true;
5345
+ if (_optionalChain([environment, 'optionalAccess', _482 => _482.config, 'optionalAccess', _483 => _483.consumer])) return environment.config.consumer === "client";
5346
+ if (_optionalChain([environment, 'optionalAccess', _484 => _484.name])) return environment.name === "client";
5347
+ return _optionalChain([loadOptions, 'optionalAccess', _485 => _485.ssr]) !== true;
5290
5348
  }
5291
5349
  function invalidateProgrammaticClientRouteModules(server) {
5292
- const graph = _optionalChain([server, 'access', _463 => _463.environments, 'optionalAccess', _464 => _464.client, 'optionalAccess', _465 => _465.moduleGraph]);
5350
+ const graph = _optionalChain([server, 'access', _486 => _486.environments, 'optionalAccess', _487 => _487.client, 'optionalAccess', _488 => _488.moduleGraph]);
5293
5351
  if (!graph) return;
5294
5352
  for (const [id, module] of graph.idToModuleMap) {
5295
5353
  if (_chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
@@ -5299,19 +5357,19 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
5299
5357
  const parsed = _chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5300
5358
  const routesFile = resolveRealModuleFile(parsed.filePath, root);
5301
5359
  watchFile(routesFile);
5302
- return _chunk2IFT2CSAcjs.generateProgrammaticClientRouteModule.call(void 0, {
5360
+ return _chunkHTXKSREFcjs.generateProgrammaticClientRouteModule.call(void 0, {
5303
5361
  kind: parsed.kind,
5304
5362
  routePath: parsed.routePath,
5305
5363
  routesFile,
5306
- route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _466 => _466.routes, 'access', _467 => _467.get, 'call', _468 => _468(
5307
- _chunk2IFT2CSAcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5364
+ route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _489 => _489.routes, 'access', _490 => _490.get, 'call', _491 => _491(
5365
+ _chunkHTXKSREFcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5308
5366
  )]),
5309
5367
  rendererServer: renderer.server,
5310
5368
  toImportSpecifier: (file) => toProgrammaticRouteImportSpecifier(file, root)
5311
5369
  });
5312
5370
  }
5313
5371
  function resolveRealModuleFile(filePath, root) {
5314
- const resolved = _nullishCoalesce(_chunk2IFT2CSAcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5372
+ const resolved = _nullishCoalesce(_chunkHTXKSREFcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5315
5373
  try {
5316
5374
  return _chunkQMNWKQL4cjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
5317
5375
  } catch (e28) {
@@ -5625,12 +5683,12 @@ async function parseRouteModuleProps(routeModule, input) {
5625
5683
  }
5626
5684
  const schemas = routeModule.__farmRouteSchemas;
5627
5685
  const params = parseRouteModuleSchema(
5628
- _optionalChain([schemas, 'optionalAccess', _469 => _469.params]),
5686
+ _optionalChain([schemas, 'optionalAccess', _492 => _492.params]),
5629
5687
  input.props.params,
5630
5688
  "params",
5631
5689
  input.routePath
5632
5690
  );
5633
- const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _470 => _470.search]), input.search, "search", input.routePath);
5691
+ const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _493 => _493.search]), input.search, "search", input.routePath);
5634
5692
  return {
5635
5693
  ...input.props,
5636
5694
  params,
@@ -5650,7 +5708,7 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
5650
5708
  }
5651
5709
  }
5652
5710
  function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterReact, renderer = _chunk67MZTLTFcjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
5653
- const providerClientCode = _chunkKWST2O22cjs.generateFarmIntegrationProviderClientCode.call(void 0,
5711
+ const providerClientCode = _chunkTAU3OF5Bcjs.generateFarmIntegrationProviderClientCode.call(void 0,
5654
5712
  integrationProviders,
5655
5713
  root,
5656
5714
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
@@ -5704,7 +5762,7 @@ async function createFarmServerTreePageElement(source, pathname) {
5704
5762
  return null;
5705
5763
  }
5706
5764
  }
5707
- ${islandValues ? `${_chunkKWST2O22cjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
5765
+ ${islandValues ? `${_chunkTAU3OF5Bcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
5708
5766
  let farmLastRouteState = null;
5709
5767
 
5710
5768
  // A hot update to a layout tree's client module renders the route again.
@@ -5795,6 +5853,35 @@ function wrapFarmClientRouteGraph(element) {
5795
5853
  // Fallback to empty manifest if not available yet
5796
5854
  const getManifest = () => window.__FARM_MANIFEST__ || { routes: {}, layouts: {}, slots: [], clientEntry: '', sharedAssets: [] };
5797
5855
 
5856
+ // A document inlines only the entries its page boots with and names the module that has the
5857
+ // whole manifest (manifest.module), as production keeps its route table out of the HTML. Code
5858
+ // that matches another route awaits this first; it imports the module once. A failed import
5859
+ // keeps the inlined entries, so the router treats other routes as it treats an unknown one.
5860
+ let farmManifestLoad = null;
5861
+ function ensureFarmManifest() {
5862
+ const inlined = window.__FARM_MANIFEST__;
5863
+ if (!inlined || typeof inlined.module !== 'string') return Promise.resolve();
5864
+ if (!farmManifestLoad) {
5865
+ farmManifestLoad = import(/* @vite-ignore */ new URL(inlined.module, location.origin).href)
5866
+ .then((loaded) => {
5867
+ const manifest = loaded.getManifest();
5868
+ if (window.__FARM_MANIFEST__ !== inlined) return;
5869
+ const { module: _module, ...boot } = inlined;
5870
+ window.__FARM_MANIFEST__ = {
5871
+ ...boot,
5872
+ routes: manifest.routes,
5873
+ layouts: manifest.layouts,
5874
+ slots: manifest.slots,
5875
+ };
5876
+ })
5877
+ .catch((error) => {
5878
+ farmManifestLoad = null;
5879
+ console.warn('[Farm.js] Could not load the route manifest: ' + inlined.module, error);
5880
+ });
5881
+ }
5882
+ return farmManifestLoad;
5883
+ }
5884
+
5798
5885
  // ====== CLIENT-SIDE ROUTE MATCHING ======
5799
5886
  // Matches URL to route using manifest (no server request!)
5800
5887
 
@@ -6515,7 +6602,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
6515
6602
  return loadedLayouts;
6516
6603
  }
6517
6604
 
6518
- ${_chunkKWST2O22cjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6605
+ ${_chunkTAU3OF5Bcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6519
6606
  function wrapWithLoadedLayouts(element, loadedLayouts, params) {
6520
6607
  let wrapped = element;
6521
6608
  for (let index = loadedLayouts.length - 1; index >= 0; index--) {
@@ -6800,7 +6887,7 @@ function readActiveLayoutPatterns() {
6800
6887
  .filter(Boolean);
6801
6888
  }
6802
6889
 
6803
- ${_chunkKWST2O22cjs.FARM_NAVIGATION_SCRIPT_SOURCE}
6890
+ ${_chunkTAU3OF5Bcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
6804
6891
 
6805
6892
  function activateFragmentScripts(root) {
6806
6893
  for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
@@ -6859,7 +6946,7 @@ function getLayoutShell(root, patterns, index, find) {
6859
6946
  return shell.innerHTML;
6860
6947
  }
6861
6948
 
6862
- ${islandValues ? _chunkKWST2O22cjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
6949
+ ${islandValues ? _chunkTAU3OF5Bcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
6863
6950
  container,
6864
6951
  fragment,
6865
6952
  currentPatterns,
@@ -6932,7 +7019,7 @@ ${islandValues ? `
6932
7019
  return nextTarget;
6933
7020
  }
6934
7021
 
6935
- ${islandValues ? `${_chunkKWST2O22cjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7022
+ ${islandValues ? `${_chunkTAU3OF5Bcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
6936
7023
 
6937
7024
  // Islands mode navigates as the production client does: it fetches the page itself, names the
6938
7025
  // layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
@@ -6993,6 +7080,7 @@ async function fetchFarmNavigationDocument(path, context) {
6993
7080
  // A prefetch reads the page whole for the router's cache, and leaves a page that streams alone.
6994
7081
  if (!context.prefetch) farmNavigationStreamGeneration++;
6995
7082
  const url = new URL(path, window.location.href);
7083
+ await ensureFarmManifest();
6996
7084
  const match = farmDocumentNavigationRoute(url.pathname);
6997
7085
  const container = document.getElementById('root');
6998
7086
  if (!match || !container) return null;
@@ -7139,6 +7227,9 @@ async function renderPage(pageData, info) {
7139
7227
  return;
7140
7228
  }
7141
7229
 
7230
+ // Page data carries the route's render plan, which the manifest entry only backs up. Islands
7231
+ // mode also reads which layouts render as server trees (loadLayoutComponents).
7232
+ if (${islandValues ? "true" : "!pageData.renderPlan"}) await ensureFarmManifest();
7142
7233
  const manifestRoute = findRoute(window.location.pathname)?.route;
7143
7234
  const renderPlan = pageData.renderPlan || manifestRoute?.renderPlan;
7144
7235
  const hydrationMode = renderPlan?.hydration;
@@ -7629,7 +7720,7 @@ function generateClientManifest(bundle) {
7629
7720
  async function defineConfig(config = {}) {
7630
7721
  const tailwindVitePlugin = await _chunkDMXMIE2Ccjs.loadTailwindVitePlugin.call(void 0, );
7631
7722
  const appRoot = path6.resolve(config.root || process.cwd());
7632
- if (_optionalChain([config, 'access', _471 => _471.extends, 'optionalAccess', _472 => _472.length])) {
7723
+ if (_optionalChain([config, 'access', _494 => _494.extends, 'optionalAccess', _495 => _495.length])) {
7633
7724
  const { config: layeredConfig } = await import("./layers-7P4RLKVX.cjs").then(
7634
7725
  ({ resolveFarmLayers }) => resolveFarmLayers(config, {
7635
7726
  root: appRoot,
@@ -7639,7 +7730,7 @@ async function defineConfig(config = {}) {
7639
7730
  config = layeredConfig;
7640
7731
  }
7641
7732
  config.renderer = _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, config.renderer);
7642
- config.images = _chunkKWST2O22cjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
7733
+ config.images = _chunkTAU3OF5Bcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
7643
7734
  const rendererVitePlugins = await _chunk67MZTLTFcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
7644
7735
  ssr: true
7645
7736
  });
@@ -7731,13 +7822,13 @@ async function defineConfig(config = {}) {
7731
7822
  if (!serverStarted) {
7732
7823
  serverStarted = true;
7733
7824
  const elapsed = Date.now() - startTime;
7734
- const address = _optionalChain([server, 'access', _473 => _473.httpServer, 'optionalAccess', _474 => _474.address, 'call', _475 => _475()]);
7825
+ const address = _optionalChain([server, 'access', _496 => _496.httpServer, 'optionalAccess', _497 => _497.address, 'call', _498 => _498()]);
7735
7826
  const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
7736
7827
  const hostConfig = server.config.server.host;
7737
7828
  const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
7738
7829
  console.log("");
7739
7830
  console.log(
7740
- ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkMEJCP2LXcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
7831
+ ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkUVQRMUARcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
7741
7832
  );
7742
7833
  console.log("");
7743
7834
  console.log(
@@ -7771,22 +7862,23 @@ async function defineConfig(config = {}) {
7771
7862
  plugins: [
7772
7863
  // `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
7773
7864
  _chunk3QM74STYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
7774
- _chunkKWST2O22cjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
7865
+ _chunkTAU3OF5Bcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
7775
7866
  tailwindVitePlugin,
7776
7867
  ...rendererVitePlugins,
7777
7868
  ...reactRefreshPlugins,
7778
7869
  viteBrowserExternalPlugin,
7779
7870
  farmI18nClientBridgePlugin(),
7780
7871
  farmServerOnlyEntriesPlugin(),
7872
+ farmIslandContainersPlugin(config),
7781
7873
  farmPlugin(config),
7782
- _chunk2IFT2CSAcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
7874
+ _chunkHTXKSREFcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
7783
7875
  farmBrandingPlugin
7784
7876
  ],
7785
7877
  customLogger: farmLogger,
7786
7878
  clearScreen: false,
7787
7879
  optimizeDeps: {
7788
- ..._chunkKWST2O22cjs.createFarmClientOptimizeDepsConfig.call(void 0,
7789
- _chunkKWST2O22cjs.createFarmClientOptimizeDepsEntries.call(void 0,
7880
+ ..._chunkTAU3OF5Bcjs.createFarmClientOptimizeDepsConfig.call(void 0,
7881
+ _chunkTAU3OF5Bcjs.createFarmClientOptimizeDepsEntries.call(void 0,
7790
7882
  appRoot,
7791
7883
  _chunkMTBDJ326cjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
7792
7884
  ),
@@ -7829,7 +7921,7 @@ async function defineConfig(config = {}) {
7829
7921
  // Stub out problematic server-only modules during dev mode
7830
7922
  alias: {
7831
7923
  ..._chunkMTBDJ326cjs.getFarmLayerAliases.call(void 0, config.layers),
7832
- ..._chunkKWST2O22cjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
7924
+ ..._chunkTAU3OF5Bcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
7833
7925
  // Nitro internals that should not be resolved in browser
7834
7926
  "supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
7835
7927
  "@poppinss/dumper": "data:text/javascript,export default {};",
@@ -7860,4 +7952,5 @@ async function defineConfig(config = {}) {
7860
7952
 
7861
7953
 
7862
7954
 
7863
- exports.isViteModuleRequest = isViteModuleRequest; exports.isViteDevClientRequest = isViteDevClientRequest; exports.farmImageImportsPlugin = farmImageImportsPlugin; exports.farmI18nClientBridgePlugin = farmI18nClientBridgePlugin; exports.farmServerOnlyEntriesPlugin = farmServerOnlyEntriesPlugin; exports.withFarmRequestTracing = withFarmRequestTracing; exports.rewriteEarlySsrRelativeImports = rewriteEarlySsrRelativeImports; exports.transformIsolatedClientBoundaryModule = transformIsolatedClientBoundaryModule; exports.shouldEmitFarmClientRootHmr = shouldEmitFarmClientRootHmr; exports.farmPlugin = farmPlugin; exports.defineConfig = defineConfig;
7955
+
7956
+ exports.isViteModuleRequest = isViteModuleRequest; exports.isViteDevClientRequest = isViteDevClientRequest; exports.farmImageImportsPlugin = farmImageImportsPlugin; exports.farmI18nClientBridgePlugin = farmI18nClientBridgePlugin; exports.farmIslandContainersPlugin = farmIslandContainersPlugin; exports.farmServerOnlyEntriesPlugin = farmServerOnlyEntriesPlugin; exports.withFarmRequestTracing = withFarmRequestTracing; exports.rewriteEarlySsrRelativeImports = rewriteEarlySsrRelativeImports; exports.transformIsolatedClientBoundaryModule = transformIsolatedClientBoundaryModule; exports.shouldEmitFarmClientRootHmr = shouldEmitFarmClientRootHmr; exports.farmPlugin = farmPlugin; exports.defineConfig = defineConfig;