@farm.js/core 0.2.0-beta.0 → 0.2.0-beta.2

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 (262) hide show
  1. package/dist/{agent-mcp-handler-IUL6OPC3.cjs → agent-mcp-handler-EXOG55M4.cjs} +5 -5
  2. package/dist/{agent-mcp-handler-GDY5CPPW.mjs → agent-mcp-handler-VX4NDDHR.mjs} +4 -4
  3. package/dist/{agent-mcp.d-BdM0pIrD.d.ts → agent-mcp.d-DBaonhLg.d.ts} +1 -1
  4. package/dist/{agent-mcp.d-CMGqpUbk.d.mts → agent-mcp.d-DhCEzIfu.d.mts} +1 -1
  5. package/dist/agent-runtime.cjs +2 -2
  6. package/dist/agent-runtime.d.mts +1 -1
  7. package/dist/agent-runtime.d.ts +1 -1
  8. package/dist/agent-runtime.mjs +1 -1
  9. package/dist/analyzer-OWIHFO5M.cjs +17 -0
  10. package/dist/{analyzer-PWHYGER6.mjs → analyzer-T2U345WL.mjs} +2 -2
  11. package/dist/api/node.d.mts +3 -3
  12. package/dist/api/node.d.ts +3 -3
  13. package/dist/api/route-manager.cjs +3 -3
  14. package/dist/api/route-manager.d.mts +3 -3
  15. package/dist/api/route-manager.d.ts +3 -3
  16. package/dist/api/route-manager.mjs +2 -2
  17. package/dist/api/runtime.d.mts +2 -2
  18. package/dist/api/runtime.d.ts +2 -2
  19. package/dist/api.cjs +4 -4
  20. package/dist/api.d.mts +4 -4
  21. package/dist/api.d.ts +4 -4
  22. package/dist/api.mjs +3 -3
  23. package/dist/{app-manifest.d-COhjPgHn.d.ts → app-manifest.d-nLVFFd7N.d.ts} +1 -1
  24. package/dist/{app-manifest.d-BeDB2OVm.d.mts → app-manifest.d-uE0JGZKN.d.mts} +1 -1
  25. package/dist/app-markdown.cjs +6 -4
  26. package/dist/app-markdown.d.mts +3 -3
  27. package/dist/app-markdown.d.ts +3 -3
  28. package/dist/app-markdown.mjs +7 -5
  29. package/dist/{app.d-b3A4cca5.d.ts → app.d-CwVkAUEU.d.ts} +14 -8
  30. package/dist/{app.d-AVZXCfcO.d.mts → app.d-DGGcNXV7.d.mts} +14 -8
  31. package/dist/{chunk-AG27TI6Q.mjs → chunk-23NBOP43.mjs} +3 -0
  32. package/dist/{chunk-BGEA4K7C.mjs → chunk-26ZTI2ZO.mjs} +4 -4
  33. package/dist/{chunk-L6ZL35ZJ.mjs → chunk-4A6A6P4T.mjs} +2 -2
  34. package/dist/{chunk-ZOD6EYWE.mjs → chunk-4Q263EQI.mjs} +2 -2
  35. package/dist/{chunk-2NOHVIJ3.cjs → chunk-5LJF4KUZ.cjs} +17 -4
  36. package/dist/{chunk-5AL2GXAU.mjs → chunk-7MMDEIVC.mjs} +1 -1
  37. package/dist/{chunk-GV5D5EM6.mjs → chunk-ANKMAGFJ.mjs} +1 -1
  38. package/dist/{chunk-QBXS4TNG.mjs → chunk-BL54BTVJ.mjs} +1 -1
  39. package/dist/{chunk-YCHIR3X6.mjs → chunk-BW563VZZ.mjs} +34 -2
  40. package/dist/{chunk-XRYLMTYF.cjs → chunk-CBB7I6HW.cjs} +3 -3
  41. package/dist/{chunk-KMGHXIDA.cjs → chunk-CHOOBTDD.cjs} +2 -2
  42. package/dist/{chunk-MRULVIH3.mjs → chunk-COK4IXOO.mjs} +35 -18
  43. package/dist/{chunk-YU2MNIIY.mjs → chunk-CRF5MOLO.mjs} +17 -4
  44. package/dist/{chunk-NQ3Y6E2T.mjs → chunk-CV4MOEMO.mjs} +2 -2
  45. package/dist/{chunk-OLKYHTLN.cjs → chunk-DA432P2F.cjs} +5 -5
  46. package/dist/{chunk-B3HQTGXS.cjs → chunk-DVAZ53X6.cjs} +6 -1
  47. package/dist/{chunk-XRSNW4IU.mjs → chunk-E72GG355.mjs} +5 -0
  48. package/dist/{chunk-CNGGEHXY.cjs → chunk-EA5HVG45.cjs} +2 -2
  49. package/dist/{chunk-NG2EZ6QS.cjs → chunk-EODGIFI7.cjs} +4 -2
  50. package/dist/{chunk-Y3DO7BIJ.cjs → chunk-EUZFBHPP.cjs} +3 -0
  51. package/dist/{chunk-ERV422FO.cjs → chunk-EXPVSFAG.cjs} +16 -13
  52. package/dist/{chunk-EACD6ND7.cjs → chunk-EZUTDTFM.cjs} +7 -7
  53. package/dist/{chunk-PTAGDZ7I.mjs → chunk-GTHBWZUK.mjs} +5 -1
  54. package/dist/{chunk-KCJBIWBM.mjs → chunk-GVORDLLV.mjs} +1 -1
  55. package/dist/{chunk-XGL42MQ7.mjs → chunk-HIDZM23B.mjs} +1 -1
  56. package/dist/{chunk-W3ZBLFLU.mjs → chunk-HNB5JHBO.mjs} +6 -3
  57. package/dist/{chunk-MM4U2NNI.mjs → chunk-HVGINJTO.mjs} +101 -42
  58. package/dist/{chunk-XJJQAFZX.mjs → chunk-I5KPOXUE.mjs} +1 -1
  59. package/dist/{chunk-HR5GU4UU.cjs → chunk-ILQSRLKK.cjs} +4 -4
  60. package/dist/{chunk-TQFIZRON.cjs → chunk-J2EKGR6E.cjs} +1030 -485
  61. package/dist/{chunk-26WP75W5.cjs → chunk-JDT733EW.cjs} +41 -27
  62. package/dist/{chunk-W53Z4WDI.cjs → chunk-JH4CDG4G.cjs} +8 -8
  63. package/dist/{chunk-KQ6TYQU7.cjs → chunk-KDQKTX3Q.cjs} +4 -4
  64. package/dist/{chunk-PEQJ4UUT.mjs → chunk-LP6DIYGA.mjs} +2 -2
  65. package/dist/{chunk-M4CNAZMS.mjs → chunk-LQ3FISSD.mjs} +61 -40
  66. package/dist/{chunk-PQ6DBVJ2.cjs → chunk-M4YXD6MD.cjs} +291 -232
  67. package/dist/{chunk-CFLRUCN7.cjs → chunk-MWAWMFG3.cjs} +415 -394
  68. package/dist/{chunk-ECVSRE4Y.mjs → chunk-N2BRIN7I.mjs} +1 -1
  69. package/dist/{chunk-SUACCCZG.cjs → chunk-N2ZMSSPP.cjs} +11 -11
  70. package/dist/{chunk-MO4UTDQ6.mjs → chunk-NNNMFSXG.mjs} +1 -1
  71. package/dist/{chunk-6266WH6X.cjs → chunk-NOSLIDSG.cjs} +1 -1
  72. package/dist/{chunk-ICOJ2BC6.mjs → chunk-NWF2FTFV.mjs} +24 -10
  73. package/dist/{chunk-HU4R2PPW.cjs → chunk-NZRAUCUL.cjs} +2 -2
  74. package/dist/{chunk-VMGQOP7X.cjs → chunk-OLIWLN4I.cjs} +2 -2
  75. package/dist/{chunk-H47EH24T.mjs → chunk-OQOII62L.mjs} +1 -1
  76. package/dist/{chunk-BJHXFEAF.mjs → chunk-P2TGLGRR.mjs} +4 -4
  77. package/dist/{chunk-THGSPDFD.cjs → chunk-PAKB6JHX.cjs} +7 -7
  78. package/dist/{chunk-WOTAU3BN.mjs → chunk-Q637AXGZ.mjs} +218 -74
  79. package/dist/{chunk-ZZGQD3LL.mjs → chunk-QO24II6C.mjs} +4 -2
  80. package/dist/{chunk-SG5RFGV6.cjs → chunk-RBSGFS5X.cjs} +66 -34
  81. package/dist/{chunk-IJPRCQHW.cjs → chunk-RGMUS3HO.cjs} +10 -10
  82. package/dist/{chunk-PA3VZNWU.cjs → chunk-RTAWQXME.cjs} +324 -180
  83. package/dist/{chunk-DMSXZNQR.cjs → chunk-RZI6436F.cjs} +2 -2
  84. package/dist/{chunk-HZY63K5C.mjs → chunk-S6MGFULY.mjs} +2 -2
  85. package/dist/{chunk-5GFTMTX3.cjs → chunk-SAUGKNCF.cjs} +2 -2
  86. package/dist/{chunk-JGUMFTZT.cjs → chunk-SCE7VWPN.cjs} +12 -12
  87. package/dist/{chunk-BQHIJOZM.cjs → chunk-SIECKBNK.cjs} +6 -2
  88. package/dist/{chunk-JDO3X7RB.mjs → chunk-SPKZCFPH.mjs} +1 -1
  89. package/dist/{chunk-LUGQUU4S.mjs → chunk-SSFAPTRD.mjs} +1 -1
  90. package/dist/{chunk-7LBNWL3L.cjs → chunk-SWPLGPYF.cjs} +7 -7
  91. package/dist/{chunk-3MY6TNNE.cjs → chunk-TWFJJPE7.cjs} +3 -3
  92. package/dist/{chunk-WP77JDKI.cjs → chunk-UCJCU2IL.cjs} +14 -14
  93. package/dist/{chunk-WX752VMN.mjs → chunk-UCRNNDNS.mjs} +1 -1
  94. package/dist/{chunk-FEWCWBOF.cjs → chunk-UGWKNZ4U.cjs} +44 -27
  95. package/dist/{chunk-IRPXOTEN.cjs → chunk-UOMSGJHK.cjs} +11 -11
  96. package/dist/{chunk-WPB6HJC7.mjs → chunk-UWDFH3ZV.mjs} +1 -1
  97. package/dist/{chunk-MZPPT5NA.mjs → chunk-V5FEFFHV.mjs} +1 -1
  98. package/dist/{chunk-HR4N2K4V.mjs → chunk-WABOJXAA.mjs} +2 -2
  99. package/dist/{chunk-LTXKRIST.mjs → chunk-WANLI3ZC.mjs} +2 -2
  100. package/dist/{chunk-5ZWXTIGE.cjs → chunk-WEZTGM7N.cjs} +2 -2
  101. package/dist/{chunk-HQEYZSF3.cjs → chunk-WPURVYXT.cjs} +2 -2
  102. package/dist/{chunk-TE7AX6HB.mjs → chunk-WV63R4GE.mjs} +1 -1
  103. package/dist/{chunk-SCOKBXHS.mjs → chunk-XOLYZZDX.mjs} +696 -151
  104. package/dist/{chunk-4ZVKDHS6.cjs → chunk-YSRZSKQB.cjs} +4 -4
  105. package/dist/{cli-runtime.d-jqZ7YCsm.d.ts → cli-runtime.d-Dbl-gIoz.d.ts} +5 -5
  106. package/dist/{cli-runtime.d-qL44rqYO.d.mts → cli-runtime.d-oUiNuspW.d.mts} +5 -5
  107. package/dist/{client-component.d-BDD5aiUb.d.ts → client-component.d-CT4q7tmy.d.ts} +1 -1
  108. package/dist/{client-component.d-B2L2LyAr.d.mts → client-component.d-DaUqOhZT.d.mts} +1 -1
  109. package/dist/{client-plugins.d-Crct3m_r.d.ts → client-plugins.d-24qhjX8c.d.ts} +30 -4
  110. package/dist/{client-plugins.d-Dzc3vOw_.d.mts → client-plugins.d-BfGTqbAH.d.mts} +30 -4
  111. package/dist/client-plugins.d.mts +1 -1
  112. package/dist/client-plugins.d.ts +1 -1
  113. package/dist/client.cjs +4 -4
  114. package/dist/client.d.mts +7 -7
  115. package/dist/client.d.ts +7 -7
  116. package/dist/client.mjs +3 -3
  117. package/dist/config.d.mts +1 -1
  118. package/dist/config.d.ts +1 -1
  119. package/dist/desktop.d.mts +2 -2
  120. package/dist/desktop.d.ts +2 -2
  121. package/dist/{devtools-RL4AU5KD.cjs → devtools-5WDQQDTA.cjs} +6 -6
  122. package/dist/{devtools-2CRVXV7E.mjs → devtools-DPYIYHTI.mjs} +5 -5
  123. package/dist/docs.cjs +8 -8
  124. package/dist/docs.d.mts +3 -3
  125. package/dist/docs.d.ts +3 -3
  126. package/dist/docs.mjs +7 -7
  127. package/dist/environment/vite.cjs +3 -3
  128. package/dist/environment/vite.mjs +2 -2
  129. package/dist/{handler.d-B1S1ZBqS.d.mts → handler.d-GfNuz57p.d.mts} +1 -1
  130. package/dist/{handler.d-ZweCBJD4.d.ts → handler.d-Oca5kNSz.d.ts} +1 -1
  131. package/dist/{headers.d-C-yGl_f6.d.mts → headers.d-C_lsQIWA.d.mts} +1 -1
  132. package/dist/{headers.d-BgBdQN8x.d.ts → headers.d-b8gHJDvu.d.ts} +1 -1
  133. package/dist/index.cjs +42 -38
  134. package/dist/{index.d-13h3oDu7.d.mts → index.d-BLtjh1aS.d.mts} +1 -1
  135. package/dist/{index.d-CtoniAXT.d.ts → index.d-Ckv6kHFm.d.ts} +1 -1
  136. package/dist/index.d.mts +23 -23
  137. package/dist/index.d.ts +23 -23
  138. package/dist/index.mjs +39 -35
  139. package/dist/integrations/orm.d.mts +1 -1
  140. package/dist/integrations/orm.d.ts +1 -1
  141. package/dist/integrations.cjs +4 -2
  142. package/dist/integrations.d.mts +1 -1
  143. package/dist/integrations.d.ts +1 -1
  144. package/dist/integrations.mjs +3 -1
  145. package/dist/internal/app-markdown-runtime.cjs +5 -3
  146. package/dist/internal/app-markdown-runtime.d.mts +10 -5
  147. package/dist/internal/app-markdown-runtime.d.ts +10 -5
  148. package/dist/internal/app-markdown-runtime.mjs +6 -4
  149. package/dist/internal/build-runtime.cjs +29 -29
  150. package/dist/internal/build-runtime.d.mts +4 -4
  151. package/dist/internal/build-runtime.d.ts +4 -4
  152. package/dist/internal/build-runtime.mjs +28 -28
  153. package/dist/internal/cli-runtime.cjs +12 -12
  154. package/dist/internal/cli-runtime.d.mts +7 -7
  155. package/dist/internal/cli-runtime.d.ts +7 -7
  156. package/dist/internal/cli-runtime.mjs +11 -11
  157. package/dist/internal/client-error-overlay.cjs +4 -4
  158. package/dist/internal/client-error-overlay.mjs +1 -1
  159. package/dist/internal/client-runtime.d.mts +5 -5
  160. package/dist/internal/client-runtime.d.ts +5 -5
  161. package/dist/internal/compression-runtime.d.mts +1 -1
  162. package/dist/internal/compression-runtime.d.ts +1 -1
  163. package/dist/internal/config-runtime.cjs +7 -7
  164. package/dist/internal/config-runtime.d.mts +3 -3
  165. package/dist/internal/config-runtime.d.ts +3 -3
  166. package/dist/internal/config-runtime.mjs +6 -6
  167. package/dist/internal/infra-analytics-runtime.cjs +9 -9
  168. package/dist/internal/infra-analytics-runtime.mjs +7 -7
  169. package/dist/internal/metadata-image-runtime.d.mts +2 -2
  170. package/dist/internal/metadata-image-runtime.d.ts +2 -2
  171. package/dist/internal/native-server-fns.cjs +4 -4
  172. package/dist/internal/native-server-fns.mjs +3 -3
  173. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  174. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  175. package/dist/internal/production-node-env.cjs +2 -2
  176. package/dist/internal/production-node-env.mjs +1 -1
  177. package/dist/internal/production-runtime.cjs +12 -12
  178. package/dist/internal/production-runtime.d.mts +10 -10
  179. package/dist/internal/production-runtime.d.ts +10 -10
  180. package/dist/internal/production-runtime.mjs +11 -11
  181. package/dist/internal/spa-router.cjs +3 -3
  182. package/dist/internal/spa-router.d.mts +3 -3
  183. package/dist/internal/spa-router.d.ts +3 -3
  184. package/dist/internal/spa-router.mjs +2 -2
  185. package/dist/internal/start-manifest.d.mts +1 -1
  186. package/dist/internal/start-manifest.d.ts +1 -1
  187. package/dist/{manager-D4DZRBRS.cjs → manager-37UJPUN4.cjs} +4 -4
  188. package/dist/{manager-PKPQGBAE.mjs → manager-7BNSJKME.mjs} +3 -3
  189. package/dist/markdown.cjs +2 -2
  190. package/dist/markdown.d.mts +1 -1
  191. package/dist/markdown.d.ts +1 -1
  192. package/dist/markdown.mjs +1 -1
  193. package/dist/middleware.d.mts +1 -1
  194. package/dist/middleware.d.ts +1 -1
  195. package/dist/{mount.d-_6Un9wdK.d.mts → mount.d-BCS8mD4E.d.mts} +1 -1
  196. package/dist/{mount.d-DyKlRR6z.d.ts → mount.d-DEX8eref.d.ts} +1 -1
  197. package/dist/{native-tree-5TENEQ7Y.cjs → native-tree-52CUAP3N.cjs} +3 -3
  198. package/dist/{native-tree-LNO7K6JR.mjs → native-tree-AO7PQ7FR.mjs} +2 -2
  199. package/dist/{navigation-delegate.d-BbW1_pf_.d.ts → navigation-delegate.d-Cgi28e5Q.d.ts} +1 -1
  200. package/dist/{navigation-delegate.d-B9GjWbov.d.mts → navigation-delegate.d-F83ugsZW.d.mts} +1 -1
  201. package/dist/navigation.cjs +5 -5
  202. package/dist/navigation.d.mts +4 -4
  203. package/dist/navigation.d.ts +4 -4
  204. package/dist/navigation.mjs +4 -4
  205. package/dist/plugin.cjs +22 -22
  206. package/dist/plugin.d.mts +5 -5
  207. package/dist/plugin.d.ts +5 -5
  208. package/dist/plugin.mjs +21 -21
  209. package/dist/query/client.cjs +7 -7
  210. package/dist/query/client.mjs +2 -2
  211. package/dist/{render-plan.d-DaM1NPnm.d.mts → render-plan.d-BkVY4aFb.d.mts} +1 -1
  212. package/dist/{render-plan.d-D0FV9lDT.d.ts → render-plan.d-DCF2GZdD.d.ts} +1 -1
  213. package/dist/renderer-client.cjs +5 -5
  214. package/dist/renderer-client.d.mts +5 -5
  215. package/dist/renderer-client.d.ts +5 -5
  216. package/dist/renderer-client.mjs +2 -2
  217. package/dist/renderer.d.mts +22 -11
  218. package/dist/renderer.d.ts +22 -11
  219. package/dist/{request.d-CrXC7voZ.d.ts → request.d-C5o-4dU2.d.ts} +1 -1
  220. package/dist/{request.d-DVSLilGx.d.mts → request.d-DMPB53-i.d.mts} +1 -1
  221. package/dist/request.d.mts +2 -2
  222. package/dist/request.d.ts +2 -2
  223. package/dist/{route-rendering.d-CWi3UYtR.d.mts → route-rendering.d-DDvArvik.d.mts} +1 -1
  224. package/dist/{route-rendering.d-OfbM_rj8.d.ts → route-rendering.d-DfP6zRP7.d.ts} +1 -1
  225. package/dist/{router.d-YKVirmj4.d.mts → router.d-1Skf2XCO.d.mts} +1 -1
  226. package/dist/{router.d-Bm9FNSu3.d.ts → router.d-s40h7aoS.d.ts} +1 -1
  227. package/dist/routes.d.mts +3 -3
  228. package/dist/routes.d.ts +3 -3
  229. package/dist/{rsc-pipeline-LRB4ZG6I.mjs → rsc-pipeline-O2YMVHUF.mjs} +7 -7
  230. package/dist/{rsc-pipeline-3DYC5ZXW.cjs → rsc-pipeline-SFQSMVI7.cjs} +8 -8
  231. package/dist/{runtime-3WJNNAAR.mjs → runtime-K2X3IZAF.mjs} +6 -6
  232. package/dist/{runtime-CRFF32H6.cjs → runtime-WOTVFYQY.cjs} +8 -8
  233. package/dist/{runtime.d-BVj6apd0.d.mts → runtime.d-Bykc5Qfg.d.mts} +1 -1
  234. package/dist/{runtime.d-D7QYVJGO.d.ts → runtime.d-k-9kFUsM.d.ts} +1 -1
  235. package/dist/{server-components-status.d-BDVcxi0z.d.mts → server-components-status.d-D-HixBe0.d.mts} +1 -1
  236. package/dist/{server-components-status.d-CfKDpmCH.d.ts → server-components-status.d-DLNd1C5j.d.ts} +1 -1
  237. package/dist/server-plugins.d.mts +3 -3
  238. package/dist/server-plugins.d.ts +3 -3
  239. package/dist/server.cjs +47 -46
  240. package/dist/server.d.mts +11 -11
  241. package/dist/server.d.ts +11 -11
  242. package/dist/server.mjs +26 -25
  243. package/dist/{spa-router.d-DGmropfK.d.mts → spa-router.d-DIlXwm00.d.mts} +2 -2
  244. package/dist/{spa-router.d-nE1jHNGt.d.ts → spa-router.d-Dl-EJeJT.d.ts} +2 -2
  245. package/dist/{ssg.d-DS-gXUbf.d.mts → ssg.d-D2ZV0bhs.d.mts} +2 -2
  246. package/dist/{ssg.d-jXlUAKzg.d.ts → ssg.d-bE-ylg0e.d.ts} +2 -2
  247. package/dist/{store-core.d-B5cwOd8g.d.ts → store-core.d-BmdnMopD.d.ts} +2 -2
  248. package/dist/{store-core.d-C-gATBwd.d.mts → store-core.d-DPsCYzV7.d.mts} +2 -2
  249. package/dist/testing.cjs +2 -2
  250. package/dist/testing.d.mts +1 -1
  251. package/dist/testing.d.ts +1 -1
  252. package/dist/testing.mjs +2 -2
  253. package/dist/{utils.d-BODwBtkz.d.ts → utils.d-BFZQcBZV.d.ts} +1 -1
  254. package/dist/{utils.d-Cmj-fzds.d.mts → utils.d-nM3OHKq5.d.mts} +1 -1
  255. package/dist/version.cjs +2 -2
  256. package/dist/version.mjs +1 -1
  257. package/dist/vite.cjs +22 -22
  258. package/dist/vite.d.mts +6 -6
  259. package/dist/vite.d.ts +6 -6
  260. package/dist/vite.mjs +21 -21
  261. package/package.json +1 -1
  262. package/dist/analyzer-B2TRJT3B.cjs +0 -17
@@ -44,12 +44,12 @@ var _chunkRDADQG5Scjs = require('./chunk-RDADQG5S.cjs');
44
44
 
45
45
 
46
46
 
47
- var _chunkPQ6DBVJ2cjs = require('./chunk-PQ6DBVJ2.cjs');
47
+ var _chunkM4YXD6MDcjs = require('./chunk-M4YXD6MD.cjs');
48
48
 
49
49
 
50
50
 
51
51
 
52
- var _chunkDMSXZNQRcjs = require('./chunk-DMSXZNQR.cjs');
52
+ var _chunkRZI6436Fcjs = require('./chunk-RZI6436F.cjs');
53
53
 
54
54
 
55
55
  var _chunkVACYUMXWcjs = require('./chunk-VACYUMXW.cjs');
@@ -59,10 +59,10 @@ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
59
59
 
60
60
 
61
61
 
62
- var _chunkERV422FOcjs = require('./chunk-ERV422FO.cjs');
62
+ var _chunkEXPVSFAGcjs = require('./chunk-EXPVSFAG.cjs');
63
63
 
64
64
 
65
- var _chunkFEWCWBOFcjs = require('./chunk-FEWCWBOF.cjs');
65
+ var _chunkUGWKNZ4Ucjs = require('./chunk-UGWKNZ4U.cjs');
66
66
 
67
67
 
68
68
 
@@ -71,7 +71,7 @@ var _chunkFEWCWBOFcjs = require('./chunk-FEWCWBOF.cjs');
71
71
 
72
72
 
73
73
 
74
- var _chunk4ZVKDHS6cjs = require('./chunk-4ZVKDHS6.cjs');
74
+ var _chunkYSRZSKQBcjs = require('./chunk-YSRZSKQB.cjs');
75
75
 
76
76
 
77
77
  var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
@@ -89,13 +89,13 @@ var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
89
89
 
90
90
 
91
91
 
92
- var _chunkJGUMFTZTcjs = require('./chunk-JGUMFTZT.cjs');
92
+ var _chunkSCE7VWPNcjs = require('./chunk-SCE7VWPN.cjs');
93
93
 
94
94
 
95
- var _chunkW53Z4WDIcjs = require('./chunk-W53Z4WDI.cjs');
95
+ var _chunkJH4CDG4Gcjs = require('./chunk-JH4CDG4G.cjs');
96
96
 
97
97
 
98
- var _chunkCNGGEHXYcjs = require('./chunk-CNGGEHXY.cjs');
98
+ var _chunkEA5HVG45cjs = require('./chunk-EA5HVG45.cjs');
99
99
 
100
100
 
101
101
 
@@ -146,7 +146,8 @@ var _chunkNDMPGFKLcjs = require('./chunk-NDMPGFKL.cjs');
146
146
 
147
147
 
148
148
 
149
- var _chunkPA3VZNWUcjs = require('./chunk-PA3VZNWU.cjs');
149
+
150
+ var _chunkRTAWQXMEcjs = require('./chunk-RTAWQXME.cjs');
150
151
 
151
152
 
152
153
 
@@ -175,10 +176,10 @@ var _chunkZ43CIBURcjs = require('./chunk-Z43CIBUR.cjs');
175
176
 
176
177
 
177
178
 
178
- var _chunkEACD6ND7cjs = require('./chunk-EACD6ND7.cjs');
179
+ var _chunkEZUTDTFMcjs = require('./chunk-EZUTDTFM.cjs');
179
180
 
180
181
 
181
- var _chunkOLKYHTLNcjs = require('./chunk-OLKYHTLN.cjs');
182
+ var _chunkDA432P2Fcjs = require('./chunk-DA432P2F.cjs');
182
183
 
183
184
 
184
185
 
@@ -205,7 +206,7 @@ var _chunk3EIPOTZVcjs = require('./chunk-3EIPOTZV.cjs');
205
206
 
206
207
 
207
208
 
208
- var _chunk26WP75W5cjs = require('./chunk-26WP75W5.cjs');
209
+ var _chunkJDT733EWcjs = require('./chunk-JDT733EW.cjs');
209
210
 
210
211
 
211
212
 
@@ -217,14 +218,15 @@ var _chunk2HW5LWAHcjs = require('./chunk-2HW5LWAH.cjs');
217
218
 
218
219
 
219
220
 
220
- var _chunk2NOHVIJ3cjs = require('./chunk-2NOHVIJ3.cjs');
221
+ var _chunk5LJF4KUZcjs = require('./chunk-5LJF4KUZ.cjs');
222
+
221
223
 
222
224
 
223
225
 
224
226
 
225
227
 
226
228
 
227
- var _chunkB3HQTGXScjs = require('./chunk-B3HQTGXS.cjs');
229
+ var _chunkDVAZ53X6cjs = require('./chunk-DVAZ53X6.cjs');
228
230
 
229
231
 
230
232
 
@@ -247,11 +249,11 @@ var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
247
249
  var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
248
250
 
249
251
 
250
- var _chunk3MY6TNNEcjs = require('./chunk-3MY6TNNE.cjs');
252
+ var _chunkTWFJJPE7cjs = require('./chunk-TWFJJPE7.cjs');
251
253
 
252
254
 
253
255
 
254
- var _chunkBQHIJOZMcjs = require('./chunk-BQHIJOZM.cjs');
256
+ var _chunkSIECKBNKcjs = require('./chunk-SIECKBNK.cjs');
255
257
 
256
258
 
257
259
  var _chunkSXXSQVKKcjs = require('./chunk-SXXSQVKK.cjs');
@@ -314,7 +316,7 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
314
316
  var _chunkPLJMEUANcjs = require('./chunk-PLJMEUAN.cjs');
315
317
 
316
318
 
317
- var _chunk6266WH6Xcjs = require('./chunk-6266WH6X.cjs');
319
+ var _chunkNOSLIDSGcjs = require('./chunk-NOSLIDSG.cjs');
318
320
 
319
321
 
320
322
  var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
@@ -331,7 +333,7 @@ var _chunkRWR7SMD7cjs = require('./chunk-RWR7SMD7.cjs');
331
333
 
332
334
 
333
335
 
334
- var _chunkY3DO7BIJcjs = require('./chunk-Y3DO7BIJ.cjs');
336
+ var _chunkEUZFBHPPcjs = require('./chunk-EUZFBHPP.cjs');
335
337
 
336
338
 
337
339
  var _chunkDBYNZIIQcjs = require('./chunk-DBYNZIIQ.cjs');
@@ -353,6 +355,9 @@ var _chunkDVJM55D2cjs = require('./chunk-DVJM55D2.cjs');
353
355
  var _chunkH7OFZJCVcjs = require('./chunk-H7OFZJCV.cjs');
354
356
 
355
357
 
358
+ var _chunkA25FXJ7Dcjs = require('./chunk-A25FXJ7D.cjs');
359
+
360
+
356
361
 
357
362
 
358
363
  var _chunk2RSVYJT6cjs = require('./chunk-2RSVYJT6.cjs');
@@ -719,7 +724,7 @@ function findClientServerFnViolation(code, id) {
719
724
  return null;
720
725
  }
721
726
  function createServerFnBoundaryDiagnostic(violation, id, location) {
722
- return _chunkPA3VZNWUcjs.createFarmDiagnostic.call(void 0,
727
+ return _chunkRTAWQXMEcjs.createFarmDiagnostic.call(void 0,
723
728
  "CLIENT_SERVER_FUNCTION",
724
729
  id,
725
730
  `${violation.factory} handlers run only on the server, but this module is bundled into the client, so the handler and its Node-only imports would run in the browser.`,
@@ -978,21 +983,21 @@ function readPropertyKey(property) {
978
983
  function createClientBoundaryDiagnostic(file, finding, location) {
979
984
  switch (finding.kind) {
980
985
  case "server-env":
981
- return _chunkPA3VZNWUcjs.createFarmDiagnostic.call(void 0,
986
+ return _chunkRTAWQXMEcjs.createFarmDiagnostic.call(void 0,
982
987
  "CLIENT_SERVER_ENV",
983
988
  file,
984
989
  `process.env.${finding.name} is read at module scope in a module compiled for the browser, where it is undefined.`,
985
990
  location
986
991
  );
987
992
  case "public-env":
988
- return _chunkPA3VZNWUcjs.createFarmDiagnostic.call(void 0,
993
+ return _chunkRTAWQXMEcjs.createFarmDiagnostic.call(void 0,
989
994
  "CLIENT_PROCESS_ENV_PUBLIC",
990
995
  file,
991
996
  `process.env.${finding.name} is declared public, but process.env is not populated in the browser, so this module-scope read is undefined there.`,
992
997
  location
993
998
  );
994
999
  case "builtin":
995
- return _chunkPA3VZNWUcjs.createFarmDiagnostic.call(void 0,
1000
+ return _chunkRTAWQXMEcjs.createFarmDiagnostic.call(void 0,
996
1001
  "CLIENT_NODE_BUILTIN",
997
1002
  file,
998
1003
  `"${finding.name}" is imported into a module compiled for the browser, which gets a stub whose exports without a Web API equivalent are undefined.`,
@@ -1243,13 +1248,13 @@ function reportOpenAPIDevGenerationResult(spec, output = _chunk7U4XF76Rcjs.logge
1243
1248
  // src/vite.ts
1244
1249
  var SERVER_FN_TRANSFORM_PLUGIN = "@farm.js/plugin/rsc:server-fn-actions";
1245
1250
  function farmLlmsTxtGeneratedPaths(config) {
1246
- const llms = _chunkOLKYHTLNcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([config, 'access', _62 => _62.agent, 'optionalAccess', _63 => _63.llmsTxt]));
1251
+ const llms = _chunkDA432P2Fcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([config, 'access', _62 => _62.agent, 'optionalAccess', _63 => _63.llmsTxt]));
1247
1252
  if (!llms.enabled) return [];
1248
1253
  return llms.full ? ["/llms.txt", "/llms-full.txt"] : ["/llms.txt"];
1249
1254
  }
1250
1255
  function farmAgentGeneratedPaths(config) {
1251
- const crawlers = _chunkEACD6ND7cjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _64 => _64.agent, 'optionalAccess', _65 => _65.crawlers]));
1252
- const sitemap = _chunkEACD6ND7cjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _66 => _66.agent, 'optionalAccess', _67 => _67.sitemap]));
1256
+ const crawlers = _chunkEZUTDTFMcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _64 => _64.agent, 'optionalAccess', _65 => _65.crawlers]));
1257
+ const sitemap = _chunkEZUTDTFMcjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _66 => _66.agent, 'optionalAccess', _67 => _67.sitemap]));
1253
1258
  return [
1254
1259
  ...farmLlmsTxtGeneratedPaths(config),
1255
1260
  ...sitemap.enabled ? ["/sitemap.xml"] : [],
@@ -1288,13 +1293,13 @@ function loadFarmDocsSearchDevRuntime() {
1288
1293
  return import("./search-client-A7YJT7JZ.cjs");
1289
1294
  }
1290
1295
  function loadFarmOpenAPIDevRuntime() {
1291
- return import("./manager-D4DZRBRS.cjs");
1296
+ return import("./manager-37UJPUN4.cjs");
1292
1297
  }
1293
1298
  function loadFarmWorkflowsDevRuntime() {
1294
1299
  return import("./workflows.cjs");
1295
1300
  }
1296
1301
  function loadFarmDevtoolsSnapshotRuntime() {
1297
- return import("./devtools-RL4AU5KD.cjs");
1302
+ return import("./devtools-5WDQQDTA.cjs");
1298
1303
  }
1299
1304
  function loadFarmDevtoolsUIRuntime() {
1300
1305
  return import("./devtools-ui-C2EMF2SO.cjs");
@@ -1344,16 +1349,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
1344
1349
  var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
1345
1350
  var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
1346
1351
  var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
1347
- _chunkPQ6DBVJ2cjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1348
- new RegExp(`^${_chunkPA3VZNWUcjs.FARM_RESOLVE_FROM_PREFIX}`),
1352
+ _chunkM4YXD6MDcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1353
+ new RegExp(`^${_chunkRTAWQXMEcjs.FARM_RESOLVE_FROM_PREFIX}`),
1349
1354
  // What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
1350
1355
  // included.
1351
1356
  /^node:/,
1352
- _chunkPQ6DBVJ2cjs.exactIdPattern.call(void 0, _module.builtinModules)
1357
+ _chunkM4YXD6MDcjs.exactIdPattern.call(void 0, _module.builtinModules)
1353
1358
  ];
1354
1359
  var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
1355
- _chunkPQ6DBVJ2cjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1356
- new RegExp(`^${_chunkPA3VZNWUcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1360
+ _chunkM4YXD6MDcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1361
+ new RegExp(`^${_chunkRTAWQXMEcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1357
1362
  ];
1358
1363
  function createFarmPlatformClientModule(platform) {
1359
1364
  return `export function platform() { return ${JSON.stringify(platform)}; }
@@ -1376,31 +1381,34 @@ function createFarmServerPrebundleConfig(bundledPackages) {
1376
1381
  }
1377
1382
  function farmIslandContainersPlugin(config) {
1378
1383
  let root = _nullishCoalesce(config.root, () => ( process.cwd()));
1384
+ let farmApi;
1379
1385
  return {
1380
1386
  name: "farm:island-containers",
1381
1387
  enforce: "pre",
1382
1388
  configResolved(resolved) {
1383
1389
  root = config.root || resolved.root;
1390
+ farmApi = _optionalChain([resolved, 'access', _70 => _70.plugins, 'access', _71 => _71.find, 'call', _72 => _72((plugin) => plugin.name === "farm"), 'optionalAccess', _73 => _73.api]);
1384
1391
  },
1385
1392
  transform(code, id) {
1386
- if (_chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _70 => _70.experimental, 'optionalAccess', _71 => _71.serverComponents])) !== "islands") {
1393
+ if (_chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _74 => _74.experimental, 'optionalAccess', _75 => _75.serverComponents])) !== "islands") {
1387
1394
  return null;
1388
1395
  }
1389
1396
  if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
1390
1397
  return null;
1391
1398
  }
1392
- if (_chunkPA3VZNWUcjs.hasUseClientDirective.call(void 0, code)) return null;
1399
+ if (_chunkRTAWQXMEcjs.hasUseClientDirective.call(void 0, code)) return null;
1393
1400
  const file = id.split("?", 1)[0];
1394
- const bindings = _chunkPA3VZNWUcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1401
+ const inspect = () => _chunkRTAWQXMEcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1402
+ const bindings = farmApi ? farmApi.inspectPackages(inspect) : inspect();
1395
1403
  if (bindings.length === 0) return null;
1396
- const grown = _chunkPA3VZNWUcjs.wrapFarmIslandContainers.call(void 0, {
1404
+ const grown = _chunkRTAWQXMEcjs.wrapFarmIslandContainers.call(void 0, {
1397
1405
  code,
1398
1406
  file,
1399
1407
  bindings,
1400
- reference: _chunkPA3VZNWUcjs.farmIslandContainerReferencePath.call(void 0, root)
1408
+ reference: _chunkRTAWQXMEcjs.farmIslandContainerReferencePath.call(void 0, root)
1401
1409
  });
1402
1410
  if (grown === null) return null;
1403
- _chunkPA3VZNWUcjs.ensureFarmIslandContainerReference.call(void 0, root);
1411
+ _chunkRTAWQXMEcjs.ensureFarmIslandContainerReference.call(void 0, root);
1404
1412
  return { code: grown, map: null };
1405
1413
  }
1406
1414
  };
@@ -1414,18 +1422,18 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1414
1422
  config(config) {
1415
1423
  const appRoot = path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())));
1416
1424
  if (options.distDir) {
1417
- _chunkPA3VZNWUcjs.usePackageScanCacheFile.call(void 0,
1425
+ _chunkRTAWQXMEcjs.usePackageScanCacheFile.call(void 0,
1418
1426
  path6.resolve(appRoot, options.distDir, "cache", "package-scans.json")
1419
1427
  );
1420
1428
  }
1421
- const bundledPackages = _chunkPA3VZNWUcjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1429
+ const bundledPackages = _chunkRTAWQXMEcjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1422
1430
  const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
1423
- _chunkPA3VZNWUcjs.persistPackageScanCache.call(void 0, );
1431
+ _chunkRTAWQXMEcjs.persistPackageScanCache.call(void 0, );
1424
1432
  return {
1425
1433
  optimizeDeps: {
1426
1434
  // A package that defines fonts is served unbundled, so Farm's font compiler sees it.
1427
1435
  exclude: bundledPackages.filter(({ fonts }) => fonts).map(({ name }) => name),
1428
- rolldownOptions: { plugins: [_chunkPA3VZNWUcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] }
1436
+ rolldownOptions: { plugins: [_chunkRTAWQXMEcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] }
1429
1437
  },
1430
1438
  ssr: {
1431
1439
  noExternal: [
@@ -1445,14 +1453,14 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1445
1453
  resolveId: {
1446
1454
  filter: { id: FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER },
1447
1455
  handler(id, importer, options2) {
1448
- if (id === FARM_PLATFORM_ENTRY) return _optionalChain([options2, 'optionalAccess', _72 => _72.ssr]) ? null : FARM_PLATFORM_CLIENT_ID;
1456
+ if (id === FARM_PLATFORM_ENTRY) return _optionalChain([options2, 'optionalAccess', _76 => _76.ssr]) ? null : FARM_PLATFORM_CLIENT_ID;
1449
1457
  if (id === SERVER_ONLY_PACKAGE) {
1450
- if (_optionalChain([options2, 'optionalAccess', _73 => _73.ssr]) || _optionalChain([options2, 'optionalAccess', _74 => _74.scan])) {
1458
+ if (_optionalChain([options2, 'optionalAccess', _77 => _77.ssr]) || _optionalChain([options2, 'optionalAccess', _78 => _78.scan])) {
1451
1459
  return FARM_SERVER_ONLY_PACKAGE_ID;
1452
1460
  }
1453
1461
  this.error(
1454
- _chunkPA3VZNWUcjs.formatFarmDiagnostic.call(void 0,
1455
- _chunkPA3VZNWUcjs.createFarmDiagnostic.call(void 0,
1462
+ _chunkRTAWQXMEcjs.formatFarmDiagnostic.call(void 0,
1463
+ _chunkRTAWQXMEcjs.createFarmDiagnostic.call(void 0,
1456
1464
  "CLIENT_SERVER_ONLY_IMPORT",
1457
1465
  _nullishCoalesce(importer, () => ( "<unknown module>")),
1458
1466
  `${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
@@ -1461,10 +1469,10 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1461
1469
  )
1462
1470
  );
1463
1471
  }
1464
- if (!_optionalChain([options2, 'optionalAccess', _75 => _75.ssr]) && _module.isBuiltin.call(void 0, id)) {
1465
- return _chunkPA3VZNWUcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1472
+ if (!_optionalChain([options2, 'optionalAccess', _79 => _79.ssr]) && _module.isBuiltin.call(void 0, id)) {
1473
+ return _chunkRTAWQXMEcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1466
1474
  }
1467
- const resolveFrom = importer ? _chunkPA3VZNWUcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1475
+ const resolveFrom = importer ? _chunkRTAWQXMEcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1468
1476
  if (resolveFrom) {
1469
1477
  const directory = path6.dirname(resolveFrom.importer);
1470
1478
  return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
@@ -1479,10 +1487,10 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1479
1487
  }
1480
1488
  if (!FARM_SERVER_ONLY_ENTRIES.has(id)) return null;
1481
1489
  const importedBy = importer ? ` (imported by ${importer})` : "";
1482
- if (!_optionalChain([options2, 'optionalAccess', _76 => _76.ssr])) {
1490
+ if (!_optionalChain([options2, 'optionalAccess', _80 => _80.ssr])) {
1483
1491
  this.error(
1484
- _chunkPA3VZNWUcjs.formatFarmDiagnostic.call(void 0,
1485
- _chunkPA3VZNWUcjs.createFarmDiagnostic.call(void 0,
1492
+ _chunkRTAWQXMEcjs.formatFarmDiagnostic.call(void 0,
1493
+ _chunkRTAWQXMEcjs.createFarmDiagnostic.call(void 0,
1486
1494
  "CLIENT_SERVER_ONLY_ENTRY",
1487
1495
  _nullishCoalesce(importer, () => ( id)),
1488
1496
  `${id} is server-only and cannot be imported into client code.`
@@ -1507,7 +1515,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1507
1515
  if (id === FARM_PLATFORM_CLIENT_ID) {
1508
1516
  return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))));
1509
1517
  }
1510
- return _nullishCoalesce(_chunkPA3VZNWUcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1518
+ return _nullishCoalesce(_chunkRTAWQXMEcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1511
1519
  }
1512
1520
  }
1513
1521
  };
@@ -1540,10 +1548,10 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
1540
1548
  if (!snapshot) return "";
1541
1549
  const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
1542
1550
  if (snapshot.routing === "none") return runtime;
1543
- return `${_chunk4ZVKDHS6cjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1551
+ return `${_chunkYSRZSKQBcjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1544
1552
  }
1545
1553
  function getPublicEnvDefine(config) {
1546
- const publicEnv = _optionalChain([config, 'access', _77 => _77.env, 'optionalAccess', _78 => _78.public]);
1554
+ const publicEnv = _optionalChain([config, 'access', _81 => _81.env, 'optionalAccess', _82 => _82.public]);
1547
1555
  if (!isResolvedEnvScope(publicEnv)) {
1548
1556
  return {};
1549
1557
  }
@@ -1582,7 +1590,7 @@ function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request)
1582
1590
  return;
1583
1591
  }
1584
1592
  if (res.headersSent) {
1585
- _optionalChain([res, 'access', _79 => _79.destroy, 'optionalCall', _80 => _80(error instanceof Error ? error : new Error(String(error)))]);
1593
+ _optionalChain([res, 'access', _83 => _83.destroy, 'optionalCall', _84 => _84(error instanceof Error ? error : new Error(String(error)))]);
1586
1594
  return;
1587
1595
  }
1588
1596
  res.statusCode = 500;
@@ -1613,7 +1621,7 @@ function sendFarmDevRuntimeHookError(res, json) {
1613
1621
  res.end(json ? _chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
1614
1622
  }
1615
1623
  function opensFarmDevRuntimeSession(pm) {
1616
- return pm.hasRuntimeRequestHooks() || _chunkDMSXZNQRcjs.hasFarmServerRuntimePlugins.call(void 0, pm.getPlugins());
1624
+ return pm.hasRuntimeRequestHooks() || _chunkRZI6436Fcjs.hasFarmServerRuntimePlugins.call(void 0, pm.getPlugins());
1617
1625
  }
1618
1626
  var FARM_CONFIG_ROUTE_PLUGIN_NAMES = /* @__PURE__ */ new Set([
1619
1627
  _chunkH7OFZJCVcjs.FARM_CONFIG_HEADERS_PLUGIN_NAME,
@@ -1718,7 +1726,7 @@ function interceptFarmDevPageResponse(options) {
1718
1726
  const originalWrite = res.write.bind(res);
1719
1727
  const originalEnd = res.end.bind(res);
1720
1728
  const originalWriteHead = res.writeHead.bind(res);
1721
- const originalFlushHeaders = _optionalChain([res, 'access', _81 => _81.flushHeaders, 'optionalAccess', _82 => _82.bind, 'call', _83 => _83(res)]);
1729
+ const originalFlushHeaders = _optionalChain([res, 'access', _85 => _85.flushHeaders, 'optionalAccess', _86 => _86.bind, 'call', _87 => _87(res)]);
1722
1730
  let afterResponseCalled = false;
1723
1731
  let interceptedEnd = false;
1724
1732
  const restore = () => {
@@ -1780,7 +1788,7 @@ function interceptFarmDevPageResponse(options) {
1780
1788
  ).then(async (runtimeResponse) => {
1781
1789
  applyWebResponseToNodeResponse(runtimeResponse, res);
1782
1790
  if (!res.headersSent) originalWriteHead(res.statusCode);
1783
- _optionalChain([originalFlushHeaders, 'optionalCall', _84 => _84()]);
1791
+ _optionalChain([originalFlushHeaders, 'optionalCall', _88 => _88()]);
1784
1792
  if (!runtimeResponse.body) return;
1785
1793
  const reader = runtimeResponse.body.getReader();
1786
1794
  for (; ; ) {
@@ -1829,7 +1837,7 @@ function interceptFarmDevPageResponse(options) {
1829
1837
  if (streamsThroughRuntime()) {
1830
1838
  streamRuntimeChunk(bufferChunk);
1831
1839
  const callback = args.find((arg) => typeof arg === "function");
1832
- _optionalChain([callback, 'optionalCall', _85 => _85()]);
1840
+ _optionalChain([callback, 'optionalCall', _89 => _89()]);
1833
1841
  return true;
1834
1842
  }
1835
1843
  if (isHtmlResponse && bufferChunk) {
@@ -1841,7 +1849,7 @@ function interceptFarmDevPageResponse(options) {
1841
1849
  const shouldBufferResponse = isHtmlResponse ? bufferPluginResponse : Boolean(runtimeSession && hasRuntimeAfterHook);
1842
1850
  if (shouldBufferResponse) {
1843
1851
  const callback = args.find((arg) => typeof arg === "function");
1844
- _optionalChain([callback, 'optionalCall', _86 => _86()]);
1852
+ _optionalChain([callback, 'optionalCall', _90 => _90()]);
1845
1853
  return true;
1846
1854
  }
1847
1855
  const writeResult = originalWrite(chunk, ...args);
@@ -1993,13 +2001,13 @@ function getEnvDefines(config, configEnv) {
1993
2001
  )
1994
2002
  )
1995
2003
  };
1996
- if (_optionalChain([configEnv, 'optionalAccess', _87 => _87.isSsrBuild])) {
2004
+ if (_optionalChain([configEnv, 'optionalAccess', _91 => _91.isSsrBuild])) {
1997
2005
  defines.__FARM_ENV__ = JSON.stringify(_chunk3EIPOTZVcjs.createBundledEnv.call(void 0, getFullEnvDefine(config)));
1998
2006
  }
1999
2007
  return defines;
2000
2008
  }
2001
2009
  function getFarmAPIBaseURLDefine(config) {
2002
- const baseURL = _optionalChain([config, 'access', _88 => _88.api, 'optionalAccess', _89 => _89.baseURL]);
2010
+ const baseURL = _optionalChain([config, 'access', _92 => _92.api, 'optionalAccess', _93 => _93.baseURL]);
2003
2011
  return typeof baseURL === "string" && baseURL ? baseURL : _chunkPMJSG4JScjs.DEFAULT_FARM_API_BASE_PATH;
2004
2012
  }
2005
2013
  function isResolvedEnvScope(value) {
@@ -2121,7 +2129,7 @@ function transformIsolatedClientBoundaryModule(options) {
2121
2129
  return null;
2122
2130
  }
2123
2131
  const body = Array.isArray(ast.body) ? ast.body : [];
2124
- const everyExportIsComponent = options.code.includes(_chunkPA3VZNWUcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkPA3VZNWUcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2132
+ const everyExportIsComponent = options.code.includes(_chunkRTAWQXMEcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkRTAWQXMEcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2125
2133
  const replacements = [];
2126
2134
  const wrapperStatements = [];
2127
2135
  const originalEntries = [];
@@ -2140,9 +2148,9 @@ function transformIsolatedClientBoundaryModule(options) {
2140
2148
  transformedExports++;
2141
2149
  };
2142
2150
  for (const node of body) {
2143
- if (_optionalChain([node, 'optionalAccess', _90 => _90.type]) === "ExportDefaultDeclaration" && node.declaration) {
2151
+ if (_optionalChain([node, 'optionalAccess', _94 => _94.type]) === "ExportDefaultDeclaration" && node.declaration) {
2144
2152
  const declaration2 = node.declaration;
2145
- if ((declaration2.type === "FunctionDeclaration" || declaration2.type === "ClassDeclaration") && _optionalChain([declaration2, 'access', _91 => _91.id, 'optionalAccess', _92 => _92.name])) {
2153
+ if ((declaration2.type === "FunctionDeclaration" || declaration2.type === "ClassDeclaration") && _optionalChain([declaration2, 'access', _95 => _95.id, 'optionalAccess', _96 => _96.name])) {
2146
2154
  replacements.push({
2147
2155
  start: node.start,
2148
2156
  end: node.end,
@@ -2160,11 +2168,11 @@ function transformIsolatedClientBoundaryModule(options) {
2160
2168
  }
2161
2169
  continue;
2162
2170
  }
2163
- if (_optionalChain([node, 'optionalAccess', _93 => _93.type]) === "ExportNamedDeclaration" && !node.declaration && node.exportKind !== "type") {
2171
+ if (_optionalChain([node, 'optionalAccess', _97 => _97.type]) === "ExportNamedDeclaration" && !node.declaration && node.exportKind !== "type") {
2164
2172
  const specifiers = (node.specifiers || []).filter(
2165
2173
  (specifier) => specifier.type === "ExportSpecifier" && specifier.exportKind !== "type"
2166
2174
  );
2167
- const specifierName = (name) => _nullishCoalesce(_optionalChain([name, 'optionalAccess', _94 => _94.name]), () => ( String(_nullishCoalesce(_optionalChain([name, 'optionalAccess', _95 => _95.value]), () => ( "")))));
2175
+ const specifierName = (name) => _nullishCoalesce(_optionalChain([name, 'optionalAccess', _98 => _98.name]), () => ( String(_nullishCoalesce(_optionalChain([name, 'optionalAccess', _99 => _99.value]), () => ( "")))));
2168
2176
  const isComponentExport = (specifier) => {
2169
2177
  const exported = specifierName(specifier.exported);
2170
2178
  return everyExportIsComponent || exported === "default" || /^[A-Z]/.test(exported);
@@ -2191,14 +2199,14 @@ function transformIsolatedClientBoundaryModule(options) {
2191
2199
  if (kept.length > 0) wrapperStatements.push(`export { ${kept.join(", ")} };`);
2192
2200
  continue;
2193
2201
  }
2194
- if (_optionalChain([node, 'optionalAccess', _96 => _96.type]) !== "ExportNamedDeclaration" || !node.declaration) continue;
2202
+ if (_optionalChain([node, 'optionalAccess', _100 => _100.type]) !== "ExportNamedDeclaration" || !node.declaration) continue;
2195
2203
  const declaration = node.declaration;
2196
2204
  const declaredNames = [];
2197
- if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && _optionalChain([declaration, 'access', _97 => _97.id, 'optionalAccess', _98 => _98.name])) {
2205
+ if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && _optionalChain([declaration, 'access', _101 => _101.id, 'optionalAccess', _102 => _102.name])) {
2198
2206
  declaredNames.push(declaration.id.name);
2199
2207
  } else if (declaration.type === "VariableDeclaration") {
2200
2208
  for (const declarator of declaration.declarations || []) {
2201
- if (_optionalChain([declarator, 'access', _99 => _99.id, 'optionalAccess', _100 => _100.type]) === "Identifier") declaredNames.push(declarator.id.name);
2209
+ if (_optionalChain([declarator, 'access', _103 => _103.id, 'optionalAccess', _104 => _104.type]) === "Identifier") declaredNames.push(declarator.id.name);
2202
2210
  }
2203
2211
  }
2204
2212
  const componentNames = declaredNames.filter((name) => /^[A-Z]/.test(name));
@@ -2271,21 +2279,21 @@ async function warnClientBoundaryOnce(context, id, code, config) {
2271
2279
  } catch (e20) {
2272
2280
  return;
2273
2281
  }
2274
- const publicKeys = new Set(Object.keys(_nullishCoalesce(_optionalChain([config, 'access', _101 => _101.env, 'optionalAccess', _102 => _102.public]), () => ( {}))));
2282
+ const publicKeys = new Set(Object.keys(_nullishCoalesce(_optionalChain([config, 'access', _105 => _105.env, 'optionalAccess', _106 => _106.public]), () => ( {}))));
2275
2283
  const findings = [];
2276
2284
  for (const finding of analyzeClientBoundary(program, publicKeys)) {
2277
2285
  if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
2278
2286
  const resolved = await context.resolve(finding.name, id).catch(() => null);
2279
- if (!_optionalChain([resolved, 'optionalAccess', _103 => _103.id, 'access', _104 => _104.startsWith, 'call', _105 => _105(_chunkPA3VZNWUcjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2287
+ if (!_optionalChain([resolved, 'optionalAccess', _107 => _107.id, 'access', _108 => _108.startsWith, 'call', _109 => _109(_chunkRTAWQXMEcjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2280
2288
  }
2281
2289
  findings.push(finding);
2282
2290
  }
2283
2291
  if (findings.length === 0) return;
2284
2292
  warnedClientBoundaryIds.add(id);
2285
- const locate = _chunkPA3VZNWUcjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2293
+ const locate = _chunkRTAWQXMEcjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2286
2294
  _chunk7U4XF76Rcjs.logger.warn(
2287
2295
  findings.map(
2288
- (finding) => _chunkPA3VZNWUcjs.formatFarmDiagnostic.call(void 0,
2296
+ (finding) => _chunkRTAWQXMEcjs.formatFarmDiagnostic.call(void 0,
2289
2297
  createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
2290
2298
  config.root
2291
2299
  )
@@ -2305,7 +2313,7 @@ function shouldEmitFarmClientRootHmr(renderer) {
2305
2313
  return _chunkT7UC2ORAcjs.getFarmRendererCapabilities.call(void 0, _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
2306
2314
  }
2307
2315
  function reachesSharedFarmRendererIsland(graph, file, islandModules) {
2308
- const queue = Array.from(_nullishCoalesce(_optionalChain([graph, 'optionalAccess', _106 => _106.getModulesByFile, 'call', _107 => _107(file)]), () => ( [])));
2316
+ const queue = Array.from(_nullishCoalesce(_optionalChain([graph, 'optionalAccess', _110 => _110.getModulesByFile, 'call', _111 => _111(file)]), () => ( [])));
2309
2317
  const seen = new Set(queue);
2310
2318
  for (const node of queue) {
2311
2319
  if (node.file && islandModules.has(path6.resolve(node.file))) {
@@ -2351,23 +2359,23 @@ function hasFarmSourceAliasOverride(alias) {
2351
2359
  function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2352
2360
  const rendererDisabled = _chunkT7UC2ORAcjs.isFarmRendererDisabled.call(void 0, options.renderer);
2353
2361
  const imageImports = farmImageImportsPlugin();
2354
- const fontImports = _chunkPQ6DBVJ2cjs.farmFontImportsPlugin.call(void 0, {
2362
+ const fontImports = _chunkM4YXD6MDcjs.farmFontImportsPlugin.call(void 0, {
2355
2363
  root: options.root,
2356
2364
  basePath: options.basePath,
2357
2365
  publicDir: options.publicDir,
2358
2366
  // A production build never starts the app, so it reads the directories from these options.
2359
- isLayoutModule: (id) => _chunkPQ6DBVJ2cjs.isFarmLayoutModule.call(void 0, id, _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _108 => _108.getConfig, 'call', _109 => _109()]), () => ( options))))
2367
+ isLayoutModule: (id) => _chunkM4YXD6MDcjs.isFarmLayoutModule.call(void 0, id, _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _112 => _112.getConfig, 'call', _113 => _113()]), () => ( options))))
2360
2368
  });
2361
2369
  let farmApp;
2362
2370
  const isFarmGeneratedOutput = (file) => {
2363
- const root = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _110 => _110.getConfig, 'call', _111 => _111(), 'access', _112 => _112.root]), () => ( options.root));
2371
+ const root = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _114 => _114.getConfig, 'call', _115 => _115(), 'access', _116 => _116.root]), () => ( options.root));
2364
2372
  if (!root) return file.includes("/.farm/");
2365
2373
  const output = _chunk7U4XF76Rcjs.toPosixPath.call(void 0, path6.resolve(root, options.distDir || ".farm"));
2366
2374
  return file === output || file.startsWith(`${output}/`);
2367
2375
  };
2368
2376
  let serverFnTransformActive = false;
2369
2377
  const getFarmRenderedServerModules = () => {
2370
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _113 => _113.getRouteManager, 'call', _114 => _114()]);
2378
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _117 => _117.getRouteManager, 'call', _118 => _118()]);
2371
2379
  if (!routeManager) return /* @__PURE__ */ new Set();
2372
2380
  const files = /* @__PURE__ */ new Set();
2373
2381
  for (const entries of [
@@ -2387,8 +2395,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2387
2395
  if (mdxComponents) files.add(mdxComponents);
2388
2396
  return files;
2389
2397
  };
2390
- const islxActionsMode = () => _chunkPQ6DBVJ2cjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _115 => _115.getConfig, 'call', _116 => _116()]), () => ( options)));
2391
- const islandsServerFns = () => _chunkPQ6DBVJ2cjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _117 => _117.getConfig, 'call', _118 => _118()]), () => ( options)));
2398
+ const islxActionsMode = () => _chunkM4YXD6MDcjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _119 => _119.getConfig, 'call', _120 => _120()]), () => ( options)));
2399
+ const islandsServerFns = () => _chunkM4YXD6MDcjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _121 => _121.getConfig, 'call', _122 => _122()]), () => ( options)));
2392
2400
  let reactRefreshActive = false;
2393
2401
  let server;
2394
2402
  let deferredGates;
@@ -2417,28 +2425,38 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2417
2425
  ].join(" ");
2418
2426
  console.log(log);
2419
2427
  };
2420
- const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _119 => _119.getRouteManager, 'call', _120 => _120(), 'access', _121 => _121.getProgrammaticClientRoutes, 'call', _122 => _122()])));
2428
+ const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _123 => _123.getRouteManager, 'call', _124 => _124(), 'access', _125 => _125.getProgrammaticClientRoutes, 'call', _126 => _126()])));
2429
+ const inBuildPackageCache = _chunkRTAWQXMEcjs.bindPackageClientBoundaryCache.call(void 0, );
2430
+ const inspectPackages = (operation) => {
2431
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _127 => _127.getRouteManager, 'call', _128 => _128()]);
2432
+ return inBuildPackageCache(
2433
+ () => routeManager ? routeManager.inspectPackages(operation) : operation()
2434
+ );
2435
+ };
2421
2436
  const isOutsideAppRoot = (file) => {
2422
- const root = _optionalChain([farmApp, 'optionalAccess', _123 => _123.getConfig, 'call', _124 => _124(), 'access', _125 => _125.root]) || _optionalChain([server, 'optionalAccess', _126 => _126.config, 'access', _127 => _127.root]) || options.root;
2437
+ const root = _optionalChain([farmApp, 'optionalAccess', _129 => _129.getConfig, 'call', _130 => _130(), 'access', _131 => _131.root]) || _optionalChain([server, 'optionalAccess', _132 => _132.config, 'access', _133 => _133.root]) || options.root;
2423
2438
  if (!root) return false;
2424
2439
  const relative4 = path6.relative(root, file.split("?", 1)[0]);
2425
2440
  return relative4.startsWith("..") || path6.isAbsolute(relative4);
2426
2441
  };
2427
2442
  const plugin = {
2428
2443
  name: "farm",
2429
- api: { getProgrammaticClientRoutes },
2444
+ api: {
2445
+ getProgrammaticClientRoutes,
2446
+ inspectPackages
2447
+ },
2430
2448
  config(userConfig, configEnv) {
2431
2449
  isBuild = configEnv.command === "build";
2432
2450
  const farmAliases = {
2433
2451
  ..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, options.layers),
2434
- ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _128 => _128.resolve, 'optionalAccess', _129 => _129.alias])) ? {} : _chunkPQ6DBVJ2cjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2452
+ ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _134 => _134.resolve, 'optionalAccess', _135 => _135.alias])) ? {} : _chunkM4YXD6MDcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2435
2453
  };
2436
2454
  if (Object.keys(farmAliases).length > 0) {
2437
2455
  _nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
2438
- userConfig.resolve.alias = _chunkPQ6DBVJ2cjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2456
+ userConfig.resolve.alias = _chunkM4YXD6MDcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2439
2457
  }
2440
2458
  const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
2441
- farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _130 => _130.server, 'optionalAccess', _131 => _131.cors]) === void 0;
2459
+ farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _136 => _136.server, 'optionalAccess', _137 => _137.cors]) === void 0;
2442
2460
  return {
2443
2461
  // Honor Farm's publicDir so the dev server serves the same static
2444
2462
  // directory the production client build emits.
@@ -2451,13 +2469,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2451
2469
  ...farmOwnsDevCors ? { cors: false } : {},
2452
2470
  fs: {
2453
2471
  ...layerRoots.length ? { allow: [path6.resolve(options.root || process.cwd()), ...layerRoots] } : {},
2454
- deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access', _132 => _132.server, 'optionalAccess', _133 => _133.fs, 'optionalAccess', _134 => _134.deny]), options)
2472
+ deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access', _138 => _138.server, 'optionalAccess', _139 => _139.fs, 'optionalAccess', _140 => _140.deny]), options)
2455
2473
  }
2456
2474
  }
2457
2475
  };
2458
2476
  },
2459
2477
  configEnvironment(name, environmentConfig, env) {
2460
- if (env.command !== "serve" || name !== "ssr" && name !== "rsc" || _optionalChain([environmentConfig, 'access', _135 => _135.dev, 'optionalAccess', _136 => _136.createEnvironment])) {
2478
+ if (env.command !== "serve" || name !== "ssr" && name !== "rsc" || _optionalChain([environmentConfig, 'access', _141 => _141.dev, 'optionalAccess', _142 => _142.createEnvironment])) {
2461
2479
  return;
2462
2480
  }
2463
2481
  return {
@@ -2476,7 +2494,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2476
2494
  (plugin2) => plugin2.name === SERVER_FN_TRANSFORM_PLUGIN
2477
2495
  );
2478
2496
  reactRefreshActive = _chunkY2FEFQAYcjs.isFarmReactRefreshActive.call(void 0, config);
2479
- if (_optionalChain([options, 'access', _137 => _137.experimental, 'optionalAccess', _138 => _138.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
2497
+ if (_optionalChain([options, 'access', _143 => _143.experimental, 'optionalAccess', _144 => _144.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
2480
2498
  _chunk7U4XF76Rcjs.logger.warn(
2481
2499
  "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."
2482
2500
  );
@@ -2485,20 +2503,20 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2485
2503
  async configureServer(viteServer) {
2486
2504
  viteServer.middlewares.use(
2487
2505
  createFarmDevPreviewGuard(viteServer, {
2488
- getSourceRoots: () => _chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _139 => _139.getConfig, 'call', _140 => _140()]), () => ( options)))
2506
+ getSourceRoots: () => _chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _145 => _145.getConfig, 'call', _146 => _146()]), () => ( options)))
2489
2507
  })
2490
2508
  );
2491
2509
  if (typeof fontImports.configureServer === "function") {
2492
2510
  await fontImports.configureServer.call(this, viteServer);
2493
2511
  }
2494
2512
  server = viteServer;
2495
- const farmMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _141 => _141.pre, 'access', _142 => _142.target]), () => ( viteServer.middlewares));
2496
- const farmPostMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _143 => _143.post, 'access', _144 => _144.target]), () => ( viteServer.middlewares));
2513
+ const farmMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _147 => _147.pre, 'access', _148 => _148.target]), () => ( viteServer.middlewares));
2514
+ const farmPostMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _149 => _149.post, 'access', _150 => _150.target]), () => ( viteServer.middlewares));
2497
2515
  const pm = initialPluginManager;
2498
2516
  const configRoutePlugins = new Set(
2499
- _optionalChain([pm, 'optionalAccess', _145 => _145.getPlugins, 'call', _146 => _146(), 'access', _147 => _147.filter, 'call', _148 => _148(isFarmConfigRoutePlugin), 'access', _149 => _149.map, 'call', _150 => _150((plugin2) => plugin2.name)])
2517
+ _optionalChain([pm, 'optionalAccess', _151 => _151.getPlugins, 'call', _152 => _152(), 'access', _153 => _153.filter, 'call', _154 => _154(isFarmConfigRoutePlugin), 'access', _155 => _155.map, 'call', _156 => _156((plugin2) => plugin2.name)])
2500
2518
  );
2501
- const configRedirectMatchers = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _151 => _151.getPlugins, 'call', _152 => _152()]), () => ( []))).flatMap((plugin2) => {
2519
+ const configRedirectMatchers = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _157 => _157.getPlugins, 'call', _158 => _158()]), () => ( []))).flatMap((plugin2) => {
2502
2520
  const matcher = _chunkH7OFZJCVcjs.getConfigRedirectMatcher.call(void 0, plugin2);
2503
2521
  return matcher ? [matcher] : [];
2504
2522
  });
@@ -2509,7 +2527,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2509
2527
  } catch (e21) {
2510
2528
  }
2511
2529
  };
2512
- farmApp = new (0, _chunkPQ6DBVJ2cjs.FarmApp)(
2530
+ farmApp = new (0, _chunkM4YXD6MDcjs.FarmApp)(
2513
2531
  {
2514
2532
  ...options,
2515
2533
  root: resolveDevelopmentRoot(options.root, server.config.root)
@@ -2517,7 +2535,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2517
2535
  server
2518
2536
  );
2519
2537
  farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
2520
- _chunkPA3VZNWUcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2538
+ _chunkRTAWQXMEcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2521
2539
  farmApp.getConfig().root,
2522
2540
  options.distDir || ".farm"
2523
2541
  )
@@ -2526,17 +2544,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2526
2544
  await farmApp.initialize();
2527
2545
  const farmConfig = farmApp.getConfig();
2528
2546
  let farmAppPackages;
2529
- if (_optionalChain([farmConfig, 'access', _153 => _153.agent, 'optionalAccess', _154 => _154.noindexPreviews])) {
2547
+ if (_optionalChain([farmConfig, 'access', _159 => _159.agent, 'optionalAccess', _160 => _160.noindexPreviews])) {
2530
2548
  farmMiddlewares.use((_req, res, next) => {
2531
- if (_chunkCNGGEHXYcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2532
- res.setHeader("X-Robots-Tag", _chunkEACD6ND7cjs.FARM_PREVIEW_ROBOTS_TAG);
2549
+ if (_chunkEA5HVG45cjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2550
+ res.setHeader("X-Robots-Tag", _chunkEZUTDTFMcjs.FARM_PREVIEW_ROBOTS_TAG);
2533
2551
  }
2534
2552
  next();
2535
2553
  });
2536
2554
  }
2537
2555
  const apiServerBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
2538
2556
  const devBuiltInRoutePaths = new Set(
2539
- _chunkJGUMFTZTcjs.listFarmBuiltInRoutePaths.call(void 0, {
2557
+ _chunkSCE7VWPNcjs.listFarmBuiltInRoutePaths.call(void 0, {
2540
2558
  agent: {
2541
2559
  apiCatalog: true,
2542
2560
  mcp: true,
@@ -2558,7 +2576,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2558
2576
  validateRemoteUrl: createNodeImageUrlValidator(farmConfig.images),
2559
2577
  // Vite owns this address. Unlike request.url, it cannot be replaced by
2560
2578
  // a caller-controlled Host header.
2561
- trustedLocalOrigin: () => _optionalChain([server, 'access', _155 => _155.resolvedUrls, 'optionalAccess', _156 => _156.local, 'access', _157 => _157[0]]),
2579
+ trustedLocalOrigin: () => _optionalChain([server, 'access', _161 => _161.resolvedUrls, 'optionalAccess', _162 => _162.local, 'access', _163 => _163[0]]),
2562
2580
  onError(error) {
2563
2581
  _chunk7U4XF76Rcjs.logger.error(
2564
2582
  `Image optimization failed: ${error instanceof Error ? error.message : String(error)}`
@@ -2578,15 +2596,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2578
2596
  const workflowConfig = farmConfig.workflows;
2579
2597
  const farmDocsDevRuntime = farmConfig.docs.enabled ? await loadFarmDocsDevRuntime() : null;
2580
2598
  const getExtraRouteTypes = () => [
2581
- ..._optionalChain([options, 'access', _158 => _158.openapi, 'optionalAccess', _159 => _159.enabled]) && options.openapi.route ? [options.openapi.route] : [],
2582
- ..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _160 => _160.getFarmDocsRouteTypeEntries, 'call', _161 => _161(farmConfig.docs)]), () => ( []))
2599
+ ..._optionalChain([options, 'access', _164 => _164.openapi, 'optionalAccess', _165 => _165.enabled]) && options.openapi.route ? [options.openapi.route] : [],
2600
+ ..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _166 => _166.getFarmDocsRouteTypeEntries, 'call', _167 => _167(farmConfig.docs)]), () => ( []))
2583
2601
  ];
2584
2602
  const appDirSlugs = sourceRoots.map(
2585
2603
  (source) => path6.join(source.root, source.srcDir, "app").replace(/\\/g, "/")
2586
2604
  );
2587
2605
  const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
2588
2606
  try {
2589
- const result = await _chunkERV422FOcjs.generateFarmTypeArtifacts.call(void 0, {
2607
+ const result = await _chunkEXPVSFAGcjs.generateFarmTypeArtifacts.call(void 0, {
2590
2608
  root: farmConfig.root,
2591
2609
  srcDir: farmConfig.srcDir,
2592
2610
  layers: farmConfig.layers,
@@ -2628,7 +2646,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2628
2646
  (source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")
2629
2647
  );
2630
2648
  const layerConfigFiles = new Set(
2631
- farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _162 => _162.configFile, 'optionalAccess', _163 => _163.replace, 'call', _164 => _164(/\\/g, "/")])).filter((file) => Boolean(file))
2649
+ farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _168 => _168.configFile, 'optionalAccess', _169 => _169.replace, 'call', _170 => _170(/\\/g, "/")])).filter((file) => Boolean(file))
2632
2650
  );
2633
2651
  const routeModuleExtensions = /* @__PURE__ */ new Set([
2634
2652
  ..._chunkT7UC2ORAcjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
@@ -2640,10 +2658,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2640
2658
  const match = /\/(?:page|layout|loading|error)(\.[^./]+)$/.exec(normalized);
2641
2659
  return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/`)) && !!match && routeModuleExtensions.has(match[1].toLowerCase());
2642
2660
  };
2643
- const polyroute = _chunkBQHIJOZMcjs.hasPolyroutePlugin.call(void 0, server.config.plugins);
2661
+ const polyroute = _chunkSIECKBNKcjs.hasPolyroutePlugin.call(void 0, server.config.plugins);
2644
2662
  const isApiRouteFile = (file) => {
2645
2663
  const normalized = file.replace(/\\/g, "/");
2646
- return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/api/`)) && _chunkBQHIJOZMcjs.isFarmAPIRouteFileName.call(void 0, path6.posix.basename(normalized), polyroute);
2664
+ return appDirSlugs.some((appDir) => normalized.startsWith(`${appDir}/api/`)) && _chunkSIECKBNKcjs.isFarmAPIRouteFileName.call(void 0, path6.posix.basename(normalized), polyroute);
2647
2665
  };
2648
2666
  const isProgrammaticRouteFile = (file) => {
2649
2667
  const normalized = file.replace(/\\/g, "/");
@@ -2656,7 +2674,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2656
2674
  );
2657
2675
  };
2658
2676
  const isAppRuntimeFile = (file) => isFarmAppRuntimeFile(file, appDirSlugs, routeModuleExtensions);
2659
- const isRendererRouteFile = (file) => routeModuleExtensions.has(path6.extname(file).toLowerCase()) && _optionalChain([farmApp, 'optionalAccess', _165 => _165.getRouteManager, 'call', _166 => _166(), 'access', _167 => _167.isRendererRouteFile, 'call', _168 => _168(file)]) === true;
2677
+ const isRendererRouteFile = (file) => routeModuleExtensions.has(path6.extname(file).toLowerCase()) && _optionalChain([farmApp, 'optionalAccess', _171 => _171.getRouteManager, 'call', _172 => _172(), 'access', _173 => _173.isRendererRouteFile, 'call', _174 => _174(file)]) === true;
2660
2678
  const isStaticMetadataImageFile = (file) => /\/(?:opengraph-image|twitter-image)(?:\.(?:png|jpg|jpeg|gif|webp)|\.alt\.txt)$/.test(
2661
2679
  file.replace(/\\/g, "/")
2662
2680
  );
@@ -2703,7 +2721,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2703
2721
  scheduleTypeArtifactGen(file, ev, typeArtifacts);
2704
2722
  }
2705
2723
  if (isI18nCatalogFile(file)) {
2706
- _optionalChain([farmApp, 'optionalAccess', _169 => _169.getI18nRuntime, 'call', _170 => _170(), 'access', _171 => _171.reload, 'call', _172 => _172(), 'access', _173 => _173.then, 'call', _174 => _174(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _175 => _175.catch, 'call', _176 => _176((error) => _chunk7U4XF76Rcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
2724
+ _optionalChain([farmApp, 'optionalAccess', _175 => _175.getI18nRuntime, 'call', _176 => _176(), 'access', _177 => _177.reload, 'call', _178 => _178(), 'access', _179 => _179.then, 'call', _180 => _180(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _181 => _181.catch, 'call', _182 => _182((error) => _chunk7U4XF76Rcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
2707
2725
  }
2708
2726
  const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || polyroute && isApiRouteFile(file) || isRendererRouteFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
2709
2727
  if (isRouteRefreshEvent) {
@@ -2715,8 +2733,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2715
2733
  queuedRouteFiles = void 0;
2716
2734
  try {
2717
2735
  await Promise.all([
2718
- _optionalChain([refreshRouteDiscovery, 'optionalCall', _177 => _177(`${ev} ${file}`)]),
2719
- [...files].some((path7) => path7.includes("middleware.")) ? _optionalChain([middlewareManager, 'optionalAccess', _178 => _178.reload, 'call', _179 => _179()]) : void 0
2736
+ _optionalChain([refreshRouteDiscovery, 'optionalCall', _183 => _183(`${ev} ${file}`)]),
2737
+ [...files].some((path7) => path7.includes("middleware.")) ? _optionalChain([middlewareManager, 'optionalAccess', _184 => _184.reload, 'call', _185 => _185()]) : void 0
2720
2738
  ]);
2721
2739
  if (pendingRouteReloads.size === 1)
2722
2740
  server.ws.send({ type: "full-reload", path: "*" });
@@ -2765,14 +2783,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2765
2783
  const { FARM_DEV_SERVER_MODULE_LOADER } = await import("./internal/native-server-fns.cjs");
2766
2784
  const load = (file) => _chunkI2RBHZF7cjs.loadFarmDevModule.call(void 0, server, file);
2767
2785
  globalThis[FARM_DEV_SERVER_MODULE_LOADER] = load;
2768
- _optionalChain([server, 'access', _180 => _180.httpServer, 'optionalAccess', _181 => _181.once, 'call', _182 => _182("close", () => {
2786
+ _optionalChain([server, 'access', _186 => _186.httpServer, 'optionalAccess', _187 => _187.once, 'call', _188 => _188("close", () => {
2769
2787
  const globals = globalThis;
2770
2788
  if (globals[FARM_DEV_SERVER_MODULE_LOADER] === load) {
2771
2789
  delete globals[FARM_DEV_SERVER_MODULE_LOADER];
2772
2790
  }
2773
2791
  })]);
2774
2792
  }
2775
- apiRouteManager = new (0, _chunk3MY6TNNEcjs.APIRouteManager)(appDirs, server, {
2793
+ apiRouteManager = new (0, _chunkTWFJJPE7cjs.APIRouteManager)(appDirs, server, {
2776
2794
  plugins: farmConfig.plugins,
2777
2795
  i18n: farmApp.getI18nRuntime(),
2778
2796
  bodySizeLimit: serverConfig.bodySizeLimit,
@@ -2839,11 +2857,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2839
2857
  });
2840
2858
  }
2841
2859
  }
2842
- if (_optionalChain([options, 'access', _183 => _183.openapi, 'optionalAccess', _184 => _184.enabled])) {
2860
+ if (_optionalChain([options, 'access', _189 => _189.openapi, 'optionalAccess', _190 => _190.enabled])) {
2843
2861
  const { OpenAPIManager } = await loadFarmOpenAPIDevRuntime();
2844
2862
  openAPIManager = new OpenAPIManager(appDirs, options.openapi, {
2845
2863
  mode: "development",
2846
- apiBaseURL: typeof _optionalChain([options, 'access', _185 => _185.api, 'optionalAccess', _186 => _186.baseURL]) === "string" ? options.api.baseURL : void 0,
2864
+ apiBaseURL: typeof _optionalChain([options, 'access', _191 => _191.api, 'optionalAccess', _192 => _192.baseURL]) === "string" ? options.api.baseURL : void 0,
2847
2865
  routes: () => apiRouteManager.getRoutes().values(),
2848
2866
  loadModule: (filePath) => apiRouteManager.loadModule(filePath)
2849
2867
  });
@@ -2874,7 +2892,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2874
2892
  return _chunkNDMPGFKLcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
2875
2893
  };
2876
2894
  releaseDocsMCPServers();
2877
- const isFarmDocsPathGuarded = (href) => _chunk4ZVKDHS6cjs.farmPathGuardCoversPage.call(void 0,
2895
+ const isFarmDocsPathGuarded = (href) => _chunkYSRZSKQBcjs.farmPathGuardCoversPage.call(void 0,
2878
2896
  {
2879
2897
  config: farmConfig,
2880
2898
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -2888,20 +2906,20 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2888
2906
  rendererServer: farmConfig.renderer.server,
2889
2907
  resolveLayoutFonts: resolveDocsLayoutFonts,
2890
2908
  fontStylesheetHref: "/@farm/fonts.css",
2891
- globalStylesheetHref: _chunkPQ6DBVJ2cjs.resolveDevGlobalStylesheetHref.call(void 0,
2909
+ globalStylesheetHref: _chunkM4YXD6MDcjs.resolveDevGlobalStylesheetHref.call(void 0,
2892
2910
  farmConfig.root,
2893
2911
  farmConfig.srcDir
2894
2912
  ),
2895
2913
  loadModule: async (specifier) => {
2896
2914
  const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
2897
- if (specifier === _optionalChain([farmConfig, 'access', _187 => _187.docs, 'access', _188 => _188.adapter, 'optionalAccess', _189 => _189.server]) && _optionalChain([resolved, 'optionalAccess', _190 => _190.id])) {
2915
+ if (specifier === _optionalChain([farmConfig, 'access', _193 => _193.docs, 'access', _194 => _194.adapter, 'optionalAccess', _195 => _195.server]) && _optionalChain([resolved, 'optionalAccess', _196 => _196.id])) {
2898
2916
  const file = resolved.id.split("?", 1)[0];
2899
2917
  return import(
2900
2918
  /* @vite-ignore */
2901
2919
  _url.pathToFileURL.call(void 0, file).href
2902
2920
  );
2903
2921
  }
2904
- return _chunkI2RBHZF7cjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _191 => _191.id]), () => ( specifier)));
2922
+ return _chunkI2RBHZF7cjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _197 => _197.id]), () => ( specifier)));
2905
2923
  },
2906
2924
  registerMCPServer: (mcpServer) => {
2907
2925
  const dispose = _chunkRKQOMG2Xcjs.registerFarmMCPServer.call(void 0, mcpServer);
@@ -2919,7 +2937,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2919
2937
  fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
2920
2938
  resolveLayoutFonts: resolveDocsLayoutFonts,
2921
2939
  fontStylesheetHref: "/@farm/fonts.css",
2922
- globalStylesheetHref: _chunkPQ6DBVJ2cjs.resolveDevGlobalStylesheetHref.call(void 0,
2940
+ globalStylesheetHref: _chunkM4YXD6MDcjs.resolveDevGlobalStylesheetHref.call(void 0,
2923
2941
  farmConfig.root,
2924
2942
  farmConfig.srcDir
2925
2943
  ),
@@ -2927,7 +2945,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2927
2945
  basePath: farmConfig.basePath
2928
2946
  }) : null;
2929
2947
  const farmDocsListsPages = Boolean(
2930
- farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _192 => _192.getPlugins, 'call', _193 => _193(), 'access', _194 => _194.some, 'call', _195 => _195((plugin2) => plugin2.name === "farm:infra-analytics")])
2948
+ farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _198 => _198.getPlugins, 'call', _199 => _199(), 'access', _200 => _200.some, 'call', _201 => _201((plugin2) => plugin2.name === "farm:infra-analytics")])
2931
2949
  );
2932
2950
  let farmDocsPagePaths;
2933
2951
  const getFarmDocsPagePaths = () => {
@@ -2954,22 +2972,22 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2954
2972
  });
2955
2973
  }
2956
2974
  }
2957
- const farmInfraAnalyticsPlugin = _optionalChain([pm, 'optionalAccess', _196 => _196.getPlugins, 'call', _197 => _197(), 'access', _198 => _198.find, 'call', _199 => _199((plugin2) => plugin2.name === "farm:infra-analytics")]);
2975
+ const farmInfraAnalyticsPlugin = _optionalChain([pm, 'optionalAccess', _202 => _202.getPlugins, 'call', _203 => _203(), 'access', _204 => _204.find, 'call', _205 => _205((plugin2) => plugin2.name === "farm:infra-analytics")]);
2958
2976
  if (farmInfraAnalyticsPlugin) {
2959
- _chunkFEWCWBOFcjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
2977
+ _chunkUGWKNZ4Ucjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
2960
2978
  if (farmDocsDevRuntime) {
2961
- const label = _chunkJGUMFTZTcjs.resolveFarmDocsRouteLabel.call(void 0,
2979
+ const label = _chunkSCE7VWPNcjs.resolveFarmDocsRouteLabel.call(void 0,
2962
2980
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname, farmConfig.basePath),
2963
2981
  {
2964
- path: _optionalChain([farmConfig, 'access', _200 => _200.docs, 'optionalAccess', _201 => _201.entry]) || "/docs",
2965
- roots: _optionalChain([farmConfig, 'access', _202 => _202.docs, 'optionalAccess', _203 => _203.roots, 'optionalAccess', _204 => _204.map, 'call', _205 => _205((root) => root.entry)]),
2982
+ path: _optionalChain([farmConfig, 'access', _206 => _206.docs, 'optionalAccess', _207 => _207.entry]) || "/docs",
2983
+ roots: _optionalChain([farmConfig, 'access', _208 => _208.docs, 'optionalAccess', _209 => _209.roots, 'optionalAccess', _210 => _210.map, 'call', _211 => _211((root) => root.entry)]),
2966
2984
  pages: await getFarmDocsPagePaths()
2967
2985
  }
2968
2986
  );
2969
- if (label) return _chunkJGUMFTZTcjs.setFarmRouteLabel.call(void 0, { pathname }, label);
2987
+ if (label) return _chunkSCE7VWPNcjs.setFarmRouteLabel.call(void 0, { pathname }, label);
2970
2988
  }
2971
2989
  const match = farmApp.getRouteManager().matchRoute(pathname);
2972
- return { pathname, pattern: _optionalChain([match, 'access', _206 => _206.route, 'optionalAccess', _207 => _207.pattern]) || null };
2990
+ return { pathname, pattern: _optionalChain([match, 'access', _212 => _212.route, 'optionalAccess', _213 => _213.pattern]) || null };
2973
2991
  });
2974
2992
  }
2975
2993
  if (farmDocsDevRuntime && !farmDocsDevRuntime.hasFarmDocsRuntimeAdapter(farmConfig.docs)) {
@@ -3044,7 +3062,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3044
3062
  }
3045
3063
  },
3046
3064
  (request) => {
3047
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _208 => _208.getConfig, 'call', _209 => _209()]), () => ( options));
3065
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _214 => _214.getConfig, 'call', _215 => _215()]), () => ( options));
3048
3066
  const currentServerConfig = _chunk7Q7UB4TLcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
3049
3067
  return _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, request, {
3050
3068
  trustProxy: currentServerConfig.trustProxy
@@ -3060,7 +3078,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3060
3078
  withAPIRequestTracing(async function handleFarmDevRequest(req, res, next) {
3061
3079
  const requestUrl = req.url || "/";
3062
3080
  const requestMethod = req.method || "GET";
3063
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _210 => _210.getConfig, 'call', _211 => _211()]), () => ( options));
3081
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _216 => _216.getConfig, 'call', _217 => _217()]), () => ( options));
3064
3082
  const currentServerConfig = _chunk7Q7UB4TLcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
3065
3083
  const parsedRequestUrl = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, {
3066
3084
  trustProxy: currentServerConfig.trustProxy
@@ -3127,10 +3145,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3127
3145
  await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
3128
3146
  return;
3129
3147
  }
3130
- if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkY3DO7BIJcjs.FARM_VIDEO_PLAYER_PATH) {
3148
+ if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkEUZFBHPPcjs.FARM_VIDEO_PLAYER_PATH) {
3131
3149
  res.statusCode = 200;
3132
3150
  res.setHeader("Content-Type", "text/html; charset=utf-8");
3133
- res.end(requestMethod === "HEAD" ? void 0 : _chunkPQ6DBVJ2cjs.FARM_VIDEO_PLAYER_HTML);
3151
+ res.end(requestMethod === "HEAD" ? void 0 : _chunkM4YXD6MDcjs.FARM_VIDEO_PLAYER_HTML);
3134
3152
  return;
3135
3153
  }
3136
3154
  const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
@@ -3185,7 +3203,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3185
3203
  openapi: options.openapi
3186
3204
  },
3187
3205
  workflows: discoveredWorkflows,
3188
- plugins: _optionalChain([pm, 'optionalAccess', _212 => _212.getSortedPlugins, 'call', _213 => _213()])
3206
+ plugins: _optionalChain([pm, 'optionalAccess', _218 => _218.getSortedPlugins, 'call', _219 => _219()])
3189
3207
  });
3190
3208
  res.statusCode = 200;
3191
3209
  res.setHeader(
@@ -3220,10 +3238,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3220
3238
  render: {
3221
3239
  pathname: pathname2,
3222
3240
  method: requestMethod,
3223
- routePattern: _optionalChain([match, 'optionalAccess', _214 => _214.route, 'optionalAccess', _215 => _215.pattern]) || null,
3224
- params: _optionalChain([match, 'optionalAccess', _216 => _216.params]) || {}
3241
+ routePattern: _optionalChain([match, 'optionalAccess', _220 => _220.route, 'optionalAccess', _221 => _221.pattern]) || null,
3242
+ params: _optionalChain([match, 'optionalAccess', _222 => _222.params]) || {}
3225
3243
  },
3226
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _217 => _217.layouts]) || []).map((layout) => layout.pattern)
3244
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _223 => _223.layouts]) || []).map((layout) => layout.pattern)
3227
3245
  };
3228
3246
  return pageHookRouteMatch;
3229
3247
  };
@@ -3311,7 +3329,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3311
3329
  }
3312
3330
  }
3313
3331
  const runAppMiddlewareForContentRoute = async () => {
3314
- if (!_optionalChain([middlewareManager, 'optionalAccess', _218 => _218.hasMiddleware, 'call', _219 => _219()])) return false;
3332
+ if (!_optionalChain([middlewareManager, 'optionalAccess', _224 => _224.hasMiddleware, 'call', _225 => _225()])) return false;
3315
3333
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
3316
3334
  return runFarmMiddlewareWithNavigation(
3317
3335
  farmApp.getServerRenderer(),
@@ -3349,7 +3367,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3349
3367
  return response.status;
3350
3368
  };
3351
3369
  const runAppMiddlewareInRuntimeSession = async (runtimeSession2, logResponse2) => {
3352
- const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _220 => _220.hasRuntimeHook, 'call', _221 => _221("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _222 => _222.hasMiddleware, 'call', _223 => _223()]) ? interceptFarmDevPageResponse({
3370
+ const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _226 => _226.hasRuntimeHook, 'call', _227 => _227("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _228 => _228.hasMiddleware, 'call', _229 => _229()]) ? interceptFarmDevPageResponse({
3353
3371
  req,
3354
3372
  res,
3355
3373
  pm,
@@ -3362,7 +3380,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3362
3380
  urlPath: requestUrl,
3363
3381
  pathname: requestPathname,
3364
3382
  startTime: Date.now(),
3365
- logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _224 => _224(status)]),
3383
+ logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _230 => _230(status)]),
3366
3384
  // The runtime reports a runtime.after failure itself.
3367
3385
  emitError: async () => {
3368
3386
  },
@@ -3373,7 +3391,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3373
3391
  handled = await runAppMiddlewareForContentRoute();
3374
3392
  } catch (error) {
3375
3393
  if (runtimeHookErrorAnswersJSON || res.headersSent) {
3376
- _optionalChain([interceptor, 'optionalAccess', _225 => _225.release, 'call', _226 => _226()]);
3394
+ _optionalChain([interceptor, 'optionalAccess', _231 => _231.release, 'call', _232 => _232()]);
3377
3395
  throw error;
3378
3396
  }
3379
3397
  if (runtimeSession2) await pm.reportRuntimeRequestError(runtimeSession2, error);
@@ -3381,10 +3399,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3381
3399
  return true;
3382
3400
  }
3383
3401
  if (!handled) {
3384
- _optionalChain([interceptor, 'optionalAccess', _227 => _227.release, 'call', _228 => _228()]);
3402
+ _optionalChain([interceptor, 'optionalAccess', _233 => _233.release, 'call', _234 => _234()]);
3385
3403
  return false;
3386
3404
  }
3387
- if (!_optionalChain([interceptor, 'optionalAccess', _229 => _229.isEnded, 'call', _230 => _230()])) _optionalChain([logResponse2, 'optionalCall', _231 => _231(res.statusCode || 200)]);
3405
+ if (!_optionalChain([interceptor, 'optionalAccess', _235 => _235.isEnded, 'call', _236 => _236()])) _optionalChain([logResponse2, 'optionalCall', _237 => _237(res.statusCode || 200)]);
3388
3406
  return true;
3389
3407
  };
3390
3408
  const serveBuiltInRoute = async (respond, {
@@ -3393,7 +3411,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3393
3411
  label
3394
3412
  } = {}) => {
3395
3413
  const discard = async () => {
3396
- await _optionalChain([computed, 'optionalAccess', _232 => _232.body, 'optionalAccess', _233 => _233.cancel, 'call', _234 => _234(), 'access', _235 => _235.catch, 'call', _236 => _236(() => {
3414
+ await _optionalChain([computed, 'optionalAccess', _238 => _238.body, 'optionalAccess', _239 => _239.cancel, 'call', _240 => _240(), 'access', _241 => _241.catch, 'call', _242 => _242(() => {
3397
3415
  })]);
3398
3416
  };
3399
3417
  const sendRuntimeResponse = async (runtimeSession3, response2) => {
@@ -3410,9 +3428,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3410
3428
  if (pm && opensFarmDevRuntimeSession(pm)) {
3411
3429
  try {
3412
3430
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
3413
- const route = _chunkJGUMFTZTcjs.setFarmRouteLabel.call(void 0,
3431
+ const route = _chunkSCE7VWPNcjs.setFarmRouteLabel.call(void 0,
3414
3432
  { pathname: requestPathname },
3415
- label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkJGUMFTZTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3433
+ label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkSCE7VWPNcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3416
3434
  );
3417
3435
  runtimeSession2 = await pm.beginRuntimeRequest(
3418
3436
  createRequestFromNodeRequest(req, new URL(fullUrl)),
@@ -3450,7 +3468,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3450
3468
  }
3451
3469
  responding = true;
3452
3470
  response = await respond(
3453
- _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _237 => _237.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3471
+ _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _243 => _243.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3454
3472
  );
3455
3473
  } catch (error) {
3456
3474
  if (!responding && !res.headersSent) {
@@ -3470,7 +3488,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3470
3488
  else await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
3471
3489
  };
3472
3490
  const openAPIRequestPathname = openAPIManager ? _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
3473
- if (openAPIManager && _optionalChain([options, 'access', _238 => _238.openapi, 'optionalAccess', _239 => _239.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3491
+ if (openAPIManager && _optionalChain([options, 'access', _244 => _244.openapi, 'optionalAccess', _245 => _245.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3474
3492
  const specManager = openAPIManager;
3475
3493
  await serveBuiltInRoute(async () => {
3476
3494
  if (requestMethod !== "GET" && requestMethod !== "HEAD") {
@@ -3490,7 +3508,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3490
3508
  });
3491
3509
  return;
3492
3510
  }
3493
- if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _240 => _240.openapi, 'optionalAccess', _241 => _241.route])) {
3511
+ if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _246 => _246.openapi, 'optionalAccess', _247 => _247.route])) {
3494
3512
  const docsManager = openAPIManager;
3495
3513
  await serveBuiltInRoute(
3496
3514
  async () => {
@@ -3501,8 +3519,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3501
3519
  );
3502
3520
  return;
3503
3521
  }
3504
- if (_optionalChain([options, 'access', _242 => _242.agent, 'optionalAccess', _243 => _243.manifest]) !== false && _chunkJGUMFTZTcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3505
- const manifestGuardCoversPath = (path7) => _chunk4ZVKDHS6cjs.farmPathGuardCoversEndpoint.call(void 0,
3522
+ if (_optionalChain([options, 'access', _248 => _248.agent, 'optionalAccess', _249 => _249.manifest]) !== false && _chunkSCE7VWPNcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3523
+ const manifestGuardCoversPath = (path7) => _chunkYSRZSKQBcjs.farmPathGuardCoversEndpoint.call(void 0,
3506
3524
  {
3507
3525
  config: farmConfig,
3508
3526
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -3511,18 +3529,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3511
3529
  apiServerBasePath
3512
3530
  );
3513
3531
  await serveBuiltInRoute(async () => {
3514
- _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkPQ6DBVJ2cjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3515
- const manifest = await _chunkJGUMFTZTcjs.createFarmAppManifestResponse.call(void 0,
3532
+ _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkM4YXD6MDcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3533
+ const manifest = await _chunkSCE7VWPNcjs.createFarmAppManifestResponse.call(void 0,
3516
3534
  new Request(parsedRequestUrl, {
3517
3535
  method: requestMethod,
3518
3536
  headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
3519
3537
  }),
3520
3538
  {
3521
- ..._chunkJGUMFTZTcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3539
+ ..._chunkSCE7VWPNcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3522
3540
  build: "development",
3523
3541
  packages: farmAppPackages,
3524
3542
  // Read again on each request; unchanged files come from a cache.
3525
- webmcpTools: _optionalChain([farmConfig, 'access', _244 => _244.plugins, 'optionalAccess', _245 => _245.some, 'call', _246 => _246(({ name }) => name === "farm:webmcp")]) ? _chunkPQ6DBVJ2cjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3543
+ webmcpTools: _optionalChain([farmConfig, 'access', _250 => _250.plugins, 'optionalAccess', _251 => _251.some, 'call', _252 => _252(({ name }) => name === "farm:webmcp")]) ? _chunkM4YXD6MDcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3526
3544
  }),
3527
3545
  defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
3528
3546
  // A guard written for an MCP server's path keeps its tools out of the public view.
@@ -3540,11 +3558,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3540
3558
  });
3541
3559
  return;
3542
3560
  }
3543
- if (_optionalChain([options, 'access', _247 => _247.agent, 'optionalAccess', _248 => _248.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkJGUMFTZTcjs.FARM_API_CATALOG_PATH) {
3561
+ if (_optionalChain([options, 'access', _253 => _253.agent, 'optionalAccess', _254 => _254.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkSCE7VWPNcjs.FARM_API_CATALOG_PATH) {
3544
3562
  await serveBuiltInRoute(
3545
- () => _chunkJGUMFTZTcjs.createFarmApiCatalogResponse.call(void 0,
3563
+ () => _chunkSCE7VWPNcjs.createFarmApiCatalogResponse.call(void 0,
3546
3564
  requestMethod,
3547
- _chunkJGUMFTZTcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3565
+ _chunkSCE7VWPNcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3548
3566
  new Request(parsedRequestUrl, {
3549
3567
  headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
3550
3568
  })
@@ -3552,8 +3570,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3552
3570
  );
3553
3571
  return;
3554
3572
  }
3555
- if (_optionalChain([options, 'access', _249 => _249.agent, 'optionalAccess', _250 => _250.aiCatalog]) !== false) {
3556
- const aiCatalog = _chunkJGUMFTZTcjs.createFarmAiCatalogResponse.call(void 0,
3573
+ if (_optionalChain([options, 'access', _255 => _255.agent, 'optionalAccess', _256 => _256.aiCatalog]) !== false) {
3574
+ const aiCatalog = _chunkSCE7VWPNcjs.createFarmAiCatalogResponse.call(void 0,
3557
3575
  new Request(parsedRequestUrl, {
3558
3576
  method: requestMethod,
3559
3577
  headers: {
@@ -3601,7 +3619,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3601
3619
  );
3602
3620
  const docsResponse = await farmDocsHandler(docsHandlerRequest);
3603
3621
  if (docsResponse) {
3604
- const docsPage = _optionalChain([docsResponse, 'access', _251 => _251.headers, 'access', _252 => _252.get, 'call', _253 => _253("content-type"), 'optionalAccess', _254 => _254.toLowerCase, 'call', _255 => _255(), 'access', _256 => _256.includes, 'call', _257 => _257("text/html")]);
3622
+ const docsPage = _optionalChain([docsResponse, 'access', _257 => _257.headers, 'access', _258 => _258.get, 'call', _259 => _259("content-type"), 'optionalAccess', _260 => _260.toLowerCase, 'call', _261 => _261(), 'access', _262 => _262.includes, 'call', _263 => _263("text/html")]);
3605
3623
  await serveBuiltInRoute(
3606
3624
  async (request) => {
3607
3625
  if (!docsPage) {
@@ -3619,27 +3637,32 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3619
3637
  farmConfig.deploymentId
3620
3638
  );
3621
3639
  if (deploymentMismatch) {
3622
- await _optionalChain([docsResponse, 'access', _258 => _258.body, 'optionalAccess', _259 => _259.cancel, 'call', _260 => _260()]);
3640
+ await _optionalChain([docsResponse, 'access', _264 => _264.body, 'optionalAccess', _265 => _265.cancel, 'call', _266 => _266()]);
3623
3641
  return _chunkNLBHLPEOcjs.createFarmDeploymentMismatchResponse.call(void 0, deploymentMismatch);
3624
3642
  }
3625
- return _chunkNLBHLPEOcjs.withFarmDeploymentResponse.call(void 0,
3643
+ const page = _chunkA25FXJ7Dcjs._withFarmResponseHeaders.call(void 0,
3626
3644
  await wrapFarmDocsResponseWithLayouts(docsRequest, docsResponse),
3627
- farmConfig.deploymentId,
3628
- {
3629
- setCookie: request.method.toUpperCase() === "GET",
3630
- cookiePath: farmConfig.basePath || "/",
3631
- secureCookie: new URL(request.url).protocol === "https:"
3645
+ (headers) => {
3646
+ const vary = (_nullishCoalesce(headers.get("Vary"), () => ( ""))).split(",").map((value) => value.trim()).filter(Boolean);
3647
+ if (!vary.some((value) => value.toLowerCase() === "accept")) {
3648
+ headers.set("Vary", [...vary, "Accept"].join(", "));
3649
+ }
3632
3650
  }
3633
3651
  );
3652
+ return _chunkNLBHLPEOcjs.withFarmDeploymentResponse.call(void 0, page, farmConfig.deploymentId, {
3653
+ setCookie: request.method.toUpperCase() === "GET",
3654
+ cookiePath: farmConfig.basePath || "/",
3655
+ secureCookie: new URL(request.url).protocol === "https:"
3656
+ });
3634
3657
  },
3635
3658
  {
3636
3659
  kind: "docs",
3637
3660
  computed: docsResponse,
3638
- label: _chunkJGUMFTZTcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3661
+ label: _chunkSCE7VWPNcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3639
3662
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
3640
3663
  {
3641
- path: _optionalChain([farmConfig, 'access', _261 => _261.docs, 'optionalAccess', _262 => _262.entry]) || "/docs",
3642
- roots: _optionalChain([farmConfig, 'access', _263 => _263.docs, 'optionalAccess', _264 => _264.roots, 'optionalAccess', _265 => _265.map, 'call', _266 => _266((root) => root.entry)]),
3664
+ path: _optionalChain([farmConfig, 'access', _267 => _267.docs, 'optionalAccess', _268 => _268.entry]) || "/docs",
3665
+ roots: _optionalChain([farmConfig, 'access', _269 => _269.docs, 'optionalAccess', _270 => _270.roots, 'optionalAccess', _271 => _271.map, 'call', _272 => _272((root) => root.entry)]),
3643
3666
  pages: await getFarmDocsPagePaths()
3644
3667
  }
3645
3668
  )
@@ -3648,8 +3671,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3648
3671
  return;
3649
3672
  }
3650
3673
  }
3651
- if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _267 => _267.headers, 'access', _268 => _268.accept, 'optionalAccess', _269 => _269.includes, 'call', _270 => _270(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
3652
- const { createFarmNativeTreeResponse } = await import("./native-tree-5TENEQ7Y.cjs");
3674
+ if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _273 => _273.headers, 'access', _274 => _274.accept, 'optionalAccess', _275 => _275.includes, 'call', _276 => _276(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
3675
+ const { createFarmNativeTreeResponse } = await import("./native-tree-52CUAP3N.cjs");
3653
3676
  const treeBodyInit = requestMethod === "POST" ? { body: _chunk7Q7UB4TLcjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" } : {};
3654
3677
  const treeResponse = await createFarmNativeTreeResponse({
3655
3678
  request: new Request(fullUrl, {
@@ -3666,18 +3689,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3666
3689
  });
3667
3690
  await serveBuiltInRoute(() => treeResponse, {
3668
3691
  computed: treeResponse,
3669
- label: _nullishCoalesce(_optionalChain([farmApp, 'access', _271 => _271.getRouteManager, 'call', _272 => _272(), 'access', _273 => _273.matchRoute, 'call', _274 => _274(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _275 => _275.route, 'optionalAccess', _276 => _276.pattern]), () => ( null))
3692
+ label: _nullishCoalesce(_optionalChain([farmApp, 'access', _277 => _277.getRouteManager, 'call', _278 => _278(), 'access', _279 => _279.matchRoute, 'call', _280 => _280(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _281 => _281.route, 'optionalAccess', _282 => _282.pattern]), () => ( null))
3670
3693
  });
3671
3694
  return;
3672
3695
  }
3673
3696
  const markdownRouteLabel = () => (
3674
3697
  // On the route path, as production labels it: /fr/index.md is /index.md.
3675
- _chunkJGUMFTZTcjs.resolveFarmMarkdownRouteLabel.call(void 0,
3698
+ _chunkSCE7VWPNcjs.resolveFarmMarkdownRouteLabel.call(void 0,
3676
3699
  toRoutePathname(requestPathname),
3677
- (page) => _optionalChain([farmApp, 'access', _277 => _277.getRouteManager, 'call', _278 => _278(), 'access', _279 => _279.matchRoute, 'call', _280 => _280(page), 'access', _281 => _281.route, 'optionalAccess', _282 => _282.pattern])
3700
+ (page) => _optionalChain([farmApp, 'access', _283 => _283.getRouteManager, 'call', _284 => _284(), 'access', _285 => _285.matchRoute, 'call', _286 => _286(page), 'access', _287 => _287.route, 'optionalAccess', _288 => _288.pattern])
3678
3701
  )
3679
3702
  );
3680
- const markdownSourceResponse = viteModuleRequest ? null : await _chunk26WP75W5cjs.createFarmMarkdownSourceResponse.call(void 0, {
3703
+ const markdownSourceResponse = viteModuleRequest ? null : await _chunkJDT733EWcjs.createFarmMarkdownSourceResponse.call(void 0, {
3681
3704
  request: new Request(fullUrl, {
3682
3705
  method: requestMethod,
3683
3706
  headers: docsHeaders
@@ -3686,14 +3709,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3686
3709
  routePathname: toRoutePathname,
3687
3710
  resolveSource: async (pathname2) => {
3688
3711
  const match = farmApp.getRouteManager().matchRoute(pathname2);
3689
- const sourcePath = _optionalChain([match, 'access', _283 => _283.route, 'optionalAccess', _284 => _284.markdownSourcePath]) || (match.route && _chunk26WP75W5cjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
3712
+ const sourcePath = _optionalChain([match, 'access', _289 => _289.route, 'optionalAccess', _290 => _290.markdownSourcePath]) || (match.route && _chunkJDT733EWcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
3690
3713
  if (!sourcePath) {
3691
3714
  return null;
3692
3715
  }
3693
3716
  return {
3694
3717
  source: await fs2.promises.readFile(sourcePath, "utf8"),
3695
3718
  // Project-relative, as production sends it: never the machine's path.
3696
- filePath: _chunkPQ6DBVJ2cjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3719
+ filePath: _chunkM4YXD6MDcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3697
3720
  };
3698
3721
  },
3699
3722
  // The anonymous check goes through this server, so its guards and
@@ -3719,7 +3742,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3719
3742
  });
3720
3743
  return;
3721
3744
  }
3722
- const markdownResponse = viteModuleRequest ? null : await _chunk2NOHVIJ3cjs.createMarkdownMirrorResponse.call(void 0, {
3745
+ const markdownResponse = viteModuleRequest ? null : await _chunk5LJF4KUZcjs.createMarkdownMirrorResponse.call(void 0, {
3723
3746
  request: new Request(fullUrl, {
3724
3747
  method: requestMethod,
3725
3748
  headers: docsHeaders
@@ -3758,16 +3781,16 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3758
3781
  });
3759
3782
  return;
3760
3783
  }
3761
- if (!viteModuleRequest && _chunk2NOHVIJ3cjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
3762
- const markdownRoute = farmApp.getRouteManager().matchRoute(_chunk26WP75W5cjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname, toRoutePathname));
3784
+ if (!viteModuleRequest && _chunk5LJF4KUZcjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
3785
+ const markdownRoute = farmApp.getRouteManager().matchRoute(_chunkJDT733EWcjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname, toRoutePathname));
3763
3786
  if (!markdownRoute.route) {
3764
3787
  await serveBuiltInRoute(
3765
3788
  () => new Response(
3766
- _chunk2NOHVIJ3cjs.createFarmMarkdownErrorBody.call(void 0, 404, requestPathname, farmConfig.basePath || "/"),
3789
+ _chunk5LJF4KUZcjs.createFarmMarkdownErrorBody.call(void 0, 404, requestPathname, farmConfig.basePath || "/"),
3767
3790
  {
3768
3791
  status: 404,
3769
3792
  headers: {
3770
- "Content-Type": _chunk2NOHVIJ3cjs.FARM_MARKDOWN_CONTENT_TYPE,
3793
+ "Content-Type": _chunk5LJF4KUZcjs.FARM_MARKDOWN_CONTENT_TYPE,
3771
3794
  "X-Farm-Markdown-Error": "404",
3772
3795
  "Cache-Control": "no-store"
3773
3796
  }
@@ -3777,7 +3800,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3777
3800
  return;
3778
3801
  }
3779
3802
  }
3780
- const markdownPageTarget = _chunk2NOHVIJ3cjs.resolveMarkdownMirrorTarget.call(void 0,
3803
+ const markdownPageTarget = _chunk5LJF4KUZcjs.resolveMarkdownMirrorTarget.call(void 0,
3781
3804
  farmApp.getConfig().md,
3782
3805
  requestPathname,
3783
3806
  {
@@ -3828,7 +3851,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3828
3851
  }
3829
3852
  const configuredIntegrations = currentConfig.integrations;
3830
3853
  const tryConfiguredIntegrationRoute = async () => {
3831
- const matchedRoute = _chunkB3HQTGXScjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3854
+ const matchedRoute = _chunkDVAZ53X6cjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3832
3855
  pathname: requestPathname,
3833
3856
  method: requestMethod
3834
3857
  });
@@ -3842,8 +3865,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3842
3865
  await pm.runHookParallelFiltered(
3843
3866
  "beforeRequest",
3844
3867
  (plugin2) => {
3845
- const owner = _chunkB3HQTGXScjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
3846
- return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _285 => _285.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3868
+ const owner = _chunkDVAZ53X6cjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
3869
+ return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _291 => _291.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3847
3870
  },
3848
3871
  req,
3849
3872
  res
@@ -3872,7 +3895,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3872
3895
  });
3873
3896
  const dispatchIntegration = async (request, runtime) => {
3874
3897
  try {
3875
- const result = await _chunkB3HQTGXScjs.dispatchIntegrationRequest.call(void 0,
3898
+ const result = await _chunkDVAZ53X6cjs.dispatchIntegrationRequest.call(void 0,
3876
3899
  {
3877
3900
  integration: matchedRoute.integration,
3878
3901
  config: currentConfig,
@@ -3880,7 +3903,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3880
3903
  isProd: false
3881
3904
  },
3882
3905
  request,
3883
- { clientAddress: _optionalChain([req, 'access', _286 => _286.socket, 'optionalAccess', _287 => _287.remoteAddress]) }
3906
+ { clientAddress: _optionalChain([req, 'access', _292 => _292.socket, 'optionalAccess', _293 => _293.remoteAddress]) }
3884
3907
  );
3885
3908
  if (!result) {
3886
3909
  throw new Error(`Matched integration route did not return a response`);
@@ -3888,7 +3911,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3888
3911
  return result;
3889
3912
  } catch (error) {
3890
3913
  _chunk7U4XF76Rcjs.logger.error(`Integration route error: ${error}`);
3891
- await _optionalChain([runtime, 'optionalAccess', _288 => _288.reportError, 'call', _289 => _289(error)]);
3914
+ await _optionalChain([runtime, 'optionalAccess', _294 => _294.reportError, 'call', _295 => _295(error)]);
3892
3915
  return _chunkJYQ6DGPWcjs.createFarmInternalServerErrorResponse.call(void 0, );
3893
3916
  }
3894
3917
  };
@@ -3939,10 +3962,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3939
3962
  const hasLocalDevRoute = () => {
3940
3963
  const routeManager3 = farmApp.getRouteManager();
3941
3964
  return Boolean(
3942
- _chunkB3HQTGXScjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3965
+ _chunkDVAZ53X6cjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3943
3966
  pathname: requestPathname,
3944
3967
  method: requestMethod
3945
- }) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _290 => _290.isFarmDocsAPIRequest, 'call', _291 => _291(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
3968
+ }) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _296 => _296.isFarmDocsAPIRequest, 'call', _297 => _297(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
3946
3969
  );
3947
3970
  };
3948
3971
  try {
@@ -4032,15 +4055,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4032
4055
  );
4033
4056
  };
4034
4057
  const isDocsAPIRequest = Boolean(
4035
- farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _292 => _292.isFarmDocsAPIRequest, 'call', _293 => _293(pathname2)])
4058
+ farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _298 => _298.isFarmDocsAPIRequest, 'call', _299 => _299(pathname2)])
4036
4059
  );
4037
4060
  const docsRuntimeOptions = () => ({
4038
4061
  kind: "docs",
4039
- route: _chunkJGUMFTZTcjs.setFarmRouteLabel.call(void 0,
4062
+ route: _chunkSCE7VWPNcjs.setFarmRouteLabel.call(void 0,
4040
4063
  { pathname: pathname2, pattern: urlPath2 },
4041
- _chunkJGUMFTZTcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
4042
- path: _optionalChain([farmConfig, 'access', _294 => _294.docs, 'optionalAccess', _295 => _295.entry]) || "/docs",
4043
- roots: _optionalChain([farmConfig, 'access', _296 => _296.docs, 'optionalAccess', _297 => _297.roots, 'optionalAccess', _298 => _298.map, 'call', _299 => _299((root) => root.entry)])
4064
+ _chunkSCE7VWPNcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
4065
+ path: _optionalChain([farmConfig, 'access', _300 => _300.docs, 'optionalAccess', _301 => _301.entry]) || "/docs",
4066
+ roots: _optionalChain([farmConfig, 'access', _302 => _302.docs, 'optionalAccess', _303 => _303.roots, 'optionalAccess', _304 => _304.map, 'call', _305 => _305((root) => root.entry)])
4044
4067
  })
4045
4068
  )
4046
4069
  });
@@ -4122,7 +4145,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4122
4145
  const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
4123
4146
  const hasExplicitAPIRoute = Boolean(routedApiRoute);
4124
4147
  if (apiHandler && hasExplicitAPIRoute) {
4125
- const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _300 => _300.route, 'access', _301 => _301.path]) || urlPath2;
4148
+ const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _306 => _306.route, 'access', _307 => _307.path]) || urlPath2;
4126
4149
  _chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
4127
4150
  type: "route.matched",
4128
4151
  pathname: pathname2,
@@ -4172,7 +4195,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4172
4195
  error
4173
4196
  });
4174
4197
  _chunk7U4XF76Rcjs.logger.error(`API route error: ${error}`);
4175
- await _optionalChain([runtime, 'optionalAccess', _302 => _302.reportError, 'call', _303 => _303(error)]);
4198
+ await _optionalChain([runtime, 'optionalAccess', _308 => _308.reportError, 'call', _309 => _309(error)]);
4176
4199
  response = _chunkJYQ6DGPWcjs.createFarmInternalServerErrorResponse.call(void 0, );
4177
4200
  }
4178
4201
  return pm ? await pm.runHookSerial("afterApiHandler", response, apiLifecyclePayload) : response;
@@ -4277,12 +4300,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4277
4300
  }
4278
4301
  return;
4279
4302
  }
4280
- if (_optionalChain([req, 'access', _304 => _304.url, 'optionalAccess', _305 => _305.startsWith, 'call', _306 => _306("/@")]) || _optionalChain([req, 'access', _307 => _307.url, 'optionalAccess', _308 => _308.startsWith, 'call', _309 => _309("/node_modules")])) {
4303
+ if (_optionalChain([req, 'access', _310 => _310.url, 'optionalAccess', _311 => _311.startsWith, 'call', _312 => _312("/@")]) || _optionalChain([req, 'access', _313 => _313.url, 'optionalAccess', _314 => _314.startsWith, 'call', _315 => _315("/node_modules")])) {
4281
4304
  return next();
4282
4305
  }
4283
4306
  if (!deferredDottedRequests.has(req) && shouldBypassFarmRouterForDottedPath(
4284
4307
  requestPathname,
4285
- _optionalChain([farmApp, 'optionalAccess', _310 => _310.getRouteManager, 'call', _311 => _311()]),
4308
+ _optionalChain([farmApp, 'optionalAccess', _316 => _316.getRouteManager, 'call', _317 => _317()]),
4286
4309
  [server.config.publicDir, server.config.root],
4287
4310
  farmAgentGeneratedPaths(farmConfig),
4288
4311
  requestMethod
@@ -4290,7 +4313,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4290
4313
  if (!viteModuleRequest) deferredDottedRequests.set(req, requestUrl);
4291
4314
  return next();
4292
4315
  }
4293
- if (_optionalChain([req, 'access', _312 => _312.url, 'optionalAccess', _313 => _313.startsWith, 'call', _314 => _314("/__farm/page-data")])) {
4316
+ if (_optionalChain([req, 'access', _318 => _318.url, 'optionalAccess', _319 => _319.startsWith, 'call', _320 => _320("/__farm/page-data")])) {
4294
4317
  const urlObj = parsedRequestUrl;
4295
4318
  const targetPath = urlObj.searchParams.get("path") || "/";
4296
4319
  let renderedRequest;
@@ -4320,7 +4343,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4320
4343
  renderedRequest = targetRequest;
4321
4344
  let middlewareMap = /* @__PURE__ */ new Map();
4322
4345
  let middlewareContext = /* @__PURE__ */ new Map();
4323
- if (_optionalChain([middlewareManager, 'optionalAccess', _315 => _315.hasMiddleware, 'call', _316 => _316()])) {
4346
+ if (_optionalChain([middlewareManager, 'optionalAccess', _321 => _321.hasMiddleware, 'call', _322 => _322()])) {
4324
4347
  const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
4325
4348
  const targetNodeResponse = createPageDataMiddlewareResponse(res);
4326
4349
  const handled = await runFarmMiddlewareWithNavigation(
@@ -4354,10 +4377,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4354
4377
  if (pm) {
4355
4378
  await pm.runHookParallel("afterRouteMatch", {
4356
4379
  pathname: targetPath,
4357
- matched: !!_optionalChain([match, 'optionalAccess', _317 => _317.route]),
4358
- routePattern: _optionalChain([match, 'optionalAccess', _318 => _318.route, 'optionalAccess', _319 => _319.pattern]) || null,
4359
- params: _optionalChain([match, 'optionalAccess', _320 => _320.params]) || {},
4360
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _321 => _321.layouts]) || []).map((l) => l.pattern)
4380
+ matched: !!_optionalChain([match, 'optionalAccess', _323 => _323.route]),
4381
+ routePattern: _optionalChain([match, 'optionalAccess', _324 => _324.route, 'optionalAccess', _325 => _325.pattern]) || null,
4382
+ params: _optionalChain([match, 'optionalAccess', _326 => _326.params]) || {},
4383
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _327 => _327.layouts]) || []).map((l) => l.pattern)
4361
4384
  });
4362
4385
  }
4363
4386
  if (!match) {
@@ -4392,7 +4415,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4392
4415
  );
4393
4416
  const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
4394
4417
  const navigationManifest = routeManager3.generateClientManifest(server.config.root);
4395
- const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkPA3VZNWUcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4418
+ const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkRTAWQXMEcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4396
4419
  const isClientComponent = moduleMetadata.isClientComponent;
4397
4420
  const shouldHydrate = moduleMetadata.shouldHydrate;
4398
4421
  let mergedMetadata = {};
@@ -4403,7 +4426,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4403
4426
  (layout) => _nullishCoalesce(navigationManifest.layouts.find(
4404
4427
  (entry) => entry.pattern === layout.pattern
4405
4428
  ), () => ( {
4406
- ..._chunkPA3VZNWUcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4429
+ ..._chunkRTAWQXMEcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4407
4430
  serverTree: false
4408
4431
  }))
4409
4432
  );
@@ -4417,17 +4440,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4417
4440
  )
4418
4441
  ];
4419
4442
  const hydrationIslandStrategy = _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0,
4420
- _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _322 => _322.getConfig, 'call', _323 => _323()]), () => ( options))), 'access', _324 => _324.experimental, 'optionalAccess', _325 => _325.serverComponents])
4421
- ) === "islands" ? _chunkPQ6DBVJ2cjs.resolveFarmRouteRootStrategy.call(void 0,
4443
+ _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _328 => _328.getConfig, 'call', _329 => _329()]), () => ( options))), 'access', _330 => _330.experimental, 'optionalAccess', _331 => _331.serverComponents])
4444
+ ) === "islands" ? _chunkM4YXD6MDcjs.resolveFarmRouteRootStrategy.call(void 0,
4422
4445
  route,
4423
4446
  { shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
4424
4447
  layouts.map((layout, index) => ({
4425
4448
  pattern: layout.pattern,
4426
4449
  modulePath: layout.modulePath,
4427
- shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _326 => _326[index], 'optionalAccess', _327 => _327.shouldHydrate]) === true,
4450
+ shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _332 => _332[index], 'optionalAccess', _333 => _333.shouldHydrate]) === true,
4428
4451
  // Manifest entries carry it; metadata read from source does not.
4429
- hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _328 => _328[index], 'optionalAccess', _329 => _329.hasIsolatedClientBoundaries]) === true,
4430
- islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _330 => _330[index], 'optionalAccess', _331 => _331.islandStrategy]), () => ( null))
4452
+ hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _334 => _334[index], 'optionalAccess', _335 => _335.hasIsolatedClientBoundaries]) === true,
4453
+ islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _336 => _336[index], 'optionalAccess', _337 => _337.islandStrategy]), () => ( null))
4431
4454
  })),
4432
4455
  server.config.root,
4433
4456
  true
@@ -4454,28 +4477,28 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4454
4477
  routePath: route.pattern
4455
4478
  });
4456
4479
  for (const layoutModule of layoutModules) {
4457
- mergedMetadata = _chunkY3DO7BIJcjs.mergeMetadata.call(void 0, mergedMetadata, layoutModule.metadata);
4480
+ mergedMetadata = _chunkEUZFBHPPcjs.mergeMetadata.call(void 0, mergedMetadata, layoutModule.metadata);
4458
4481
  if (typeof layoutModule.generateMetadata === "function") {
4459
- mergedMetadata = _chunkY3DO7BIJcjs.mergeMetadata.call(void 0,
4482
+ mergedMetadata = _chunkEUZFBHPPcjs.mergeMetadata.call(void 0,
4460
4483
  mergedMetadata,
4461
4484
  await layoutModule.generateMetadata({ params: routeProps.params })
4462
4485
  );
4463
4486
  }
4464
- mergedMetadata = await _chunkY3DO7BIJcjs.mergeModuleViewport.call(void 0, mergedMetadata, layoutModule, {
4487
+ mergedMetadata = await _chunkEUZFBHPPcjs.mergeModuleViewport.call(void 0, mergedMetadata, layoutModule, {
4465
4488
  params: routeProps.params
4466
4489
  });
4467
4490
  }
4468
- mergedMetadata = _chunkY3DO7BIJcjs.mergeMetadata.call(void 0, mergedMetadata, routeModule.metadata);
4491
+ mergedMetadata = _chunkEUZFBHPPcjs.mergeMetadata.call(void 0, mergedMetadata, routeModule.metadata);
4469
4492
  if (typeof routeModule.generateMetadata === "function") {
4470
- mergedMetadata = _chunkY3DO7BIJcjs.mergeMetadata.call(void 0,
4493
+ mergedMetadata = _chunkEUZFBHPPcjs.mergeMetadata.call(void 0,
4471
4494
  mergedMetadata,
4472
4495
  await routeModule.generateMetadata(routeProps)
4473
4496
  );
4474
4497
  }
4475
- mergedMetadata = await _chunkY3DO7BIJcjs.mergeModuleViewport.call(void 0, mergedMetadata, routeModule, routeProps);
4476
- mergedMetadata = _chunkY3DO7BIJcjs.addMetadataMarkdownAlternate.call(void 0,
4498
+ mergedMetadata = await _chunkEUZFBHPPcjs.mergeModuleViewport.call(void 0, mergedMetadata, routeModule, routeProps);
4499
+ mergedMetadata = _chunkEUZFBHPPcjs.addMetadataMarkdownAlternate.call(void 0,
4477
4500
  mergedMetadata,
4478
- _chunk2NOHVIJ3cjs.getFarmMarkdownAlternatePath.call(void 0, farmApp.getConfig().md, targetRequestUrl.pathname, {
4501
+ _chunk5LJF4KUZcjs.getFarmMarkdownAlternatePath.call(void 0, farmApp.getConfig().md, targetRequestUrl.pathname, {
4479
4502
  routePathname: (pathname2) => routeManager3.toRoutePathname(pathname2)
4480
4503
  })
4481
4504
  );
@@ -4484,7 +4507,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4484
4507
  const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
4485
4508
  const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
4486
4509
  (entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
4487
- ), () => ( _chunkPA3VZNWUcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4510
+ ), () => ( _chunkRTAWQXMEcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4488
4511
  const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
4489
4512
  request: targetRequest,
4490
4513
  params: slot.params,
@@ -4530,15 +4553,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4530
4553
  );
4531
4554
  const projectRoot = server.config.root;
4532
4555
  const toUrlPath = (absolutePath) => _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
4533
- const renderPlan = _chunk4ZVKDHS6cjs.createFarmRouteRenderPlan.call(void 0, {
4556
+ const renderPlan = _chunkYSRZSKQBcjs.createFarmRouteRenderPlan.call(void 0, {
4534
4557
  pageShouldHydrate: shouldHydrate,
4535
4558
  layoutShouldHydrate: shouldHydrateLayout,
4536
4559
  islandStrategy: hydrationIslandStrategy,
4537
- rendering: _chunkERV422FOcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4560
+ rendering: _chunkEXPVSFAGcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4538
4561
  });
4539
4562
  const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
4540
- const layoutStartIndex = _chunk4ZVKDHS6cjs.getSharedLayoutPrefixLength.call(void 0,
4541
- _chunk4ZVKDHS6cjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4563
+ const layoutStartIndex = _chunkYSRZSKQBcjs.getSharedLayoutPrefixLength.call(void 0,
4564
+ _chunkYSRZSKQBcjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4542
4565
  destinationLayoutPatterns
4543
4566
  );
4544
4567
  const renderer = farmApp.getServerRenderer();
@@ -4548,13 +4571,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4548
4571
  middlewareContext,
4549
4572
  () => renderer.renderNavigationFragment({
4550
4573
  PageComponent: routeModule.default,
4551
- LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _332 => _332.default]),
4574
+ LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _338 => _338.default]),
4552
4575
  pageProps: routeProps,
4553
4576
  params,
4554
4577
  layouts: layouts.map((layout, index) => ({
4555
4578
  pattern: layout.pattern,
4556
4579
  module: layoutModules[index],
4557
- serverTree: _optionalChain([layoutHydrationMetadata, 'access', _333 => _333[index], 'optionalAccess', _334 => _334.serverTree])
4580
+ serverTree: _optionalChain([layoutHydrationMetadata, 'access', _339 => _339[index], 'optionalAccess', _340 => _340.serverTree])
4558
4581
  })),
4559
4582
  layoutStartIndex,
4560
4583
  slots: routeSlots.map((slot) => ({
@@ -4620,7 +4643,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4620
4643
  {
4621
4644
  status: 200,
4622
4645
  headers: {
4623
- "Cache-Control": _chunk4ZVKDHS6cjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4646
+ "Cache-Control": _chunkYSRZSKQBcjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4624
4647
  "X-Farm-Navigation": "html-fragment",
4625
4648
  Vary: "X-Farm-Layout-Chain",
4626
4649
  [_chunkNLBHLPEOcjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
@@ -4662,29 +4685,29 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4662
4685
  trustProxy: currentServerConfig.trustProxy
4663
4686
  }).pathname;
4664
4687
  const routeManager2 = farmApp.getRouteManager();
4665
- const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _335 => _335.hasHook, 'call', _336 => _336("beforeRequest")]), () => ( false));
4666
- const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _337 => _337.hasHook, 'call', _338 => _338("afterResponse")]), () => ( false));
4667
- const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _339 => _339.hasHook, 'call', _340 => _340("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _341 => _341.hasHook, 'call', _342 => _342("afterRender")]), () => ( false)));
4688
+ const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _341 => _341.hasHook, 'call', _342 => _342("beforeRequest")]), () => ( false));
4689
+ const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _343 => _343.hasHook, 'call', _344 => _344("afterResponse")]), () => ( false));
4690
+ const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _345 => _345.hasHook, 'call', _346 => _346("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _347 => _347.hasHook, 'call', _348 => _348("afterRender")]), () => ( false)));
4668
4691
  const opensRuntimeSession = pm ? opensFarmDevRuntimeSession(pm) : false;
4669
- const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _343 => _343.hasRuntimeHook, 'call', _344 => _344("after")]), () => ( false));
4692
+ const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _349 => _349.hasRuntimeHook, 'call', _350 => _350("after")]), () => ( false));
4670
4693
  const pageBuiltInRouteLabel = (pathname2) => {
4671
4694
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
4672
- const mcpLabel = _chunkJGUMFTZTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4695
+ const mcpLabel = _chunkSCE7VWPNcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4673
4696
  if (mcpLabel) return mcpLabel;
4674
4697
  if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
4675
- return routePathname === _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH : null;
4698
+ return routePathname === _chunkJH4CDG4Gcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkJH4CDG4Gcjs.FARM_DEFAULT_MCP_PATH : null;
4676
4699
  };
4677
4700
  const pageRuntimeOptions = (pathname2) => {
4678
4701
  const match = routeManager2.matchRoute(pathname2);
4679
4702
  return {
4680
4703
  kind: "page",
4681
- route: _chunkJGUMFTZTcjs.setFarmRouteLabel.call(void 0,
4704
+ route: _chunkSCE7VWPNcjs.setFarmRouteLabel.call(void 0,
4682
4705
  {
4683
4706
  pathname: pathname2,
4684
- pattern: _optionalChain([match, 'optionalAccess', _345 => _345.route, 'optionalAccess', _346 => _346.pattern]) || null,
4685
- params: _optionalChain([match, 'optionalAccess', _347 => _347.params]) || {}
4707
+ pattern: _optionalChain([match, 'optionalAccess', _351 => _351.route, 'optionalAccess', _352 => _352.pattern]) || null,
4708
+ params: _optionalChain([match, 'optionalAccess', _353 => _353.params]) || {}
4686
4709
  },
4687
- _optionalChain([match, 'optionalAccess', _348 => _348.route]) ? null : pageBuiltInRouteLabel(pathname2)
4710
+ _optionalChain([match, 'optionalAccess', _354 => _354.route]) ? null : pageBuiltInRouteLabel(pathname2)
4688
4711
  )
4689
4712
  };
4690
4713
  };
@@ -4764,7 +4787,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4764
4787
  }) : void 0;
4765
4788
  let middlewareFailed = false;
4766
4789
  try {
4767
- if (_optionalChain([middlewareManager, 'optionalAccess', _349 => _349.hasMiddleware, 'call', _350 => _350()])) {
4790
+ if (_optionalChain([middlewareManager, 'optionalAccess', _355 => _355.hasMiddleware, 'call', _356 => _356()])) {
4768
4791
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
4769
4792
  const handled = await runFarmMiddlewareWithNavigation(
4770
4793
  farmApp.getServerRenderer(),
@@ -4777,7 +4800,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4777
4800
  throw error;
4778
4801
  });
4779
4802
  if (handled) {
4780
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _351 => _351.isEnded, 'call', _352 => _352()])) {
4803
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _357 => _357.isEnded, 'call', _358 => _358()])) {
4781
4804
  const duration = Date.now() - startTime;
4782
4805
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4783
4806
  }
@@ -4792,8 +4815,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4792
4815
  res
4793
4816
  );
4794
4817
  }
4795
- if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _353 => _353.isEnded, 'call', _354 => _354()])) {
4796
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _355 => _355.isEnded, 'call', _356 => _356()])) {
4818
+ if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _359 => _359.isEnded, 'call', _360 => _360()])) {
4819
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _361 => _361.isEnded, 'call', _362 => _362()])) {
4797
4820
  const duration = Date.now() - startTime;
4798
4821
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4799
4822
  }
@@ -4812,8 +4835,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4812
4835
  await pm.reportRuntimeRequestError(runtimeSession, error);
4813
4836
  } else {
4814
4837
  await pm.failRuntimeRequest(runtimeSession, error);
4815
- if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _357 => _357.isEnded, 'call', _358 => _358()])) {
4816
- _optionalChain([responseInterceptor, 'optionalAccess', _359 => _359.release, 'call', _360 => _360()]);
4838
+ if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _363 => _363.isEnded, 'call', _364 => _364()])) {
4839
+ _optionalChain([responseInterceptor, 'optionalAccess', _365 => _365.release, 'call', _366 => _366()]);
4817
4840
  console.error("[FARM] Page error:", error);
4818
4841
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
4819
4842
  return;
@@ -4830,7 +4853,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4830
4853
  }
4831
4854
  })
4832
4855
  );
4833
- const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _361 => _361.stack, 'access', _362 => _362.at, 'call', _363 => _363(-1), 'optionalAccess', _364 => _364.handle]);
4856
+ const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _367 => _367.stack, 'access', _368 => _368.at, 'call', _369 => _369(-1), 'optionalAccess', _370 => _370.handle]);
4834
4857
  if (farmOwnsDevCors && viteServer.config.server.cors === false) {
4835
4858
  farmMiddlewares.use(createFarmDevViteCorsMiddleware());
4836
4859
  }
@@ -4859,7 +4882,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4859
4882
  });
4860
4883
  }
4861
4884
  if (id.startsWith("@farm.js/core/internal/") && importer && isOutsideAppRoot(importer)) {
4862
- const root = _optionalChain([farmApp, 'optionalAccess', _365 => _365.getConfig, 'call', _366 => _366(), 'access', _367 => _367.root]) || _optionalChain([server, 'optionalAccess', _368 => _368.config, 'access', _369 => _369.root]) || options.root;
4885
+ const root = _optionalChain([farmApp, 'optionalAccess', _371 => _371.getConfig, 'call', _372 => _372(), 'access', _373 => _373.root]) || _optionalChain([server, 'optionalAccess', _374 => _374.config, 'access', _375 => _375.root]) || options.root;
4863
4886
  return this.resolve(id, path6.join(root, "package.json"), {
4864
4887
  ...resolveOptions,
4865
4888
  skipSelf: true
@@ -4887,7 +4910,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4887
4910
  }
4888
4911
  },
4889
4912
  async load(id, loadOptions) {
4890
- if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _370 => _370.ssr]) && !farmSetupContext.getStore()) {
4913
+ if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _376 => _376.ssr]) && !farmSetupContext.getStore()) {
4891
4914
  await pendingClientSetup;
4892
4915
  }
4893
4916
  if (_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && islandsServerFns()) {
@@ -4905,8 +4928,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4905
4928
  if (imageModule) return imageModule;
4906
4929
  }
4907
4930
  if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
4908
- const renderer = _optionalChain([farmApp, 'optionalAccess', _371 => _371.getConfig, 'call', _372 => _372(), 'access', _373 => _373.renderer]) || _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, options.renderer);
4909
- const root = _optionalChain([server, 'optionalAccess', _374 => _374.config, 'access', _375 => _375.root]) || options.root;
4931
+ const renderer = _optionalChain([farmApp, 'optionalAccess', _377 => _377.getConfig, 'call', _378 => _378(), 'access', _379 => _379.renderer]) || _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, options.renderer);
4932
+ const root = _optionalChain([server, 'optionalAccess', _380 => _380.config, 'access', _381 => _381.root]) || options.root;
4910
4933
  if (isClientEnvironment(this, loadOptions)) {
4911
4934
  return generateProgrammaticClientRouteModuleForId(
4912
4935
  id,
@@ -4922,63 +4945,63 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4922
4945
  return FARM_DEV_CLIENT_BOOT_MODULE;
4923
4946
  }
4924
4947
  if (isFarmClientVirtualId(id)) {
4925
- const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _376 => _376.getConfig, 'call', _377 => _377()]);
4926
- const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _378 => _378.renderer]) || _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, options.renderer);
4927
- const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _379 => _379.integrations]) || options.integrations;
4928
- const root = _optionalChain([resolvedConfig, 'optionalAccess', _380 => _380.root]) || _optionalChain([server, 'optionalAccess', _381 => _381.config, 'access', _382 => _382.root]) || process.cwd();
4929
- const docs = _optionalChain([resolvedConfig, 'optionalAccess', _383 => _383.docs]);
4948
+ const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _382 => _382.getConfig, 'call', _383 => _383()]);
4949
+ const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _384 => _384.renderer]) || _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, options.renderer);
4950
+ const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _385 => _385.integrations]) || options.integrations;
4951
+ const root = _optionalChain([resolvedConfig, 'optionalAccess', _386 => _386.root]) || _optionalChain([server, 'optionalAccess', _387 => _387.config, 'access', _388 => _388.root]) || process.cwd();
4952
+ const docs = _optionalChain([resolvedConfig, 'optionalAccess', _389 => _389.docs]);
4930
4953
  const adapterOwnsDocsRuntime = _chunkL2GUEYHRcjs.hasFarmDocsRuntimeAdapter.call(void 0, docs);
4931
- const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _384 => _384.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4954
+ const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _390 => _390.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4932
4955
  const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
4933
- _optionalChain([docs, 'optionalAccess', _385 => _385.enabled]) ? loadFarmDocsDevRuntime() : null,
4934
- _optionalChain([docs, 'optionalAccess', _386 => _386.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4956
+ _optionalChain([docs, 'optionalAccess', _391 => _391.enabled]) ? loadFarmDocsDevRuntime() : null,
4957
+ _optionalChain([docs, 'optionalAccess', _392 => _392.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4935
4958
  devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
4936
4959
  ]);
4937
- const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _387 => _387.isFarmDocsSearchEnabled, 'call', _388 => _388(docs)]), () => ( false));
4960
+ const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _393 => _393.isFarmDocsSearchEnabled, 'call', _394 => _394(docs)]), () => ( false));
4938
4961
  const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
4939
4962
  docsSearchEnabled,
4940
4963
  docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
4941
4964
  ) : EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME;
4942
4965
  const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
4943
4966
  const generatedDevIndicatorsClientRuntime = farmApp ? _chunkL2GUEYHRcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
4944
- const integrationProviders = _chunkB3HQTGXScjs.getIntegrationProviders.call(void 0, integrations);
4945
- const isolatedHydrationMode = _chunkPA3VZNWUcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4946
- _optionalChain([resolvedConfig, 'optionalAccess', _389 => _389.experimental, 'optionalAccess', _390 => _390.isolatedClientHydration]),
4967
+ const integrationProviders = _chunkDVAZ53X6cjs.getIntegrationProviders.call(void 0, integrations);
4968
+ const isolatedHydrationMode = _chunkRTAWQXMEcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4969
+ _optionalChain([resolvedConfig, 'optionalAccess', _395 => _395.experimental, 'optionalAccess', _396 => _396.isolatedClientHydration]),
4947
4970
  {
4948
- serverComponents: _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _391 => _391.experimental, 'optionalAccess', _392 => _392.serverComponents])) === "rsc",
4949
- hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
4971
+ serverComponents: _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _397 => _397.experimental, 'optionalAccess', _398 => _398.serverComponents])) === "rsc",
4972
+ hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => !_chunkDVAZ53X6cjs.providerSupportsIslands.call(void 0, provider))
4950
4973
  }
4951
4974
  );
4952
4975
  return generateClientCode(
4953
4976
  integrationProviders,
4954
4977
  [
4955
- ..._chunkB3HQTGXScjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
4956
- ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _393 => _393.getFarmDocsDocumentNavigationMatchers, 'call', _394 => _394(docs)]), () => ( []))
4978
+ ..._chunkDVAZ53X6cjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
4979
+ ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _399 => _399.getFarmDocsDocumentNavigationMatchers, 'call', _400 => _400(docs)]), () => ( []))
4957
4980
  ],
4958
4981
  generatedDocsSearchRuntime,
4959
4982
  `${generatedDevtoolsClientRuntime}
4960
4983
  ${generatedDevIndicatorsClientRuntime}`,
4961
- _optionalChain([resolvedConfig, 'optionalAccess', _395 => _395.plugins]) || [],
4984
+ _optionalChain([resolvedConfig, 'optionalAccess', _401 => _401.plugins]) || [],
4962
4985
  root,
4963
- _optionalChain([resolvedConfig, 'optionalAccess', _396 => _396.srcDir]) || options.srcDir || "src",
4964
- _optionalChain([resolvedConfig, 'optionalAccess', _397 => _397.publicRuntimeConfig]) || options.publicRuntimeConfig,
4965
- adapterOwnsDocsRuntime ? _chunkL2GUEYHRcjs.getFarmDocsAdapterUIModule.call(void 0, _optionalChain([docs, 'optionalAccess', _398 => _398.adapter])) : void 0,
4986
+ _optionalChain([resolvedConfig, 'optionalAccess', _402 => _402.srcDir]) || options.srcDir || "src",
4987
+ _optionalChain([resolvedConfig, 'optionalAccess', _403 => _403.publicRuntimeConfig]) || options.publicRuntimeConfig,
4988
+ adapterOwnsDocsRuntime ? _chunkL2GUEYHRcjs.getFarmDocsAdapterUIModule.call(void 0, _optionalChain([docs, 'optionalAccess', _404 => _404.adapter])) : void 0,
4966
4989
  renderer,
4967
- isolatedHydrationMode === "enabled" || _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _399 => _399.getRouteManager, 'call', _400 => _400(), 'access', _401 => _401.getIsolatedClientBoundaryModules, 'call', _402 => _402(root)])))), 'optionalAccess', _403 => _403.size]) > 0,
4968
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _404 => _404.trailingSlash]), () => ( false)),
4969
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _405 => _405.basePath]), () => ( "/")),
4970
- _chunkPQ6DBVJ2cjs.generateClientCachePersistenceCode.call(void 0,
4971
- _chunkPQ6DBVJ2cjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _406 => _406.cache]))
4990
+ isolatedHydrationMode === "enabled" || _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _405 => _405.getRouteManager, 'call', _406 => _406(), 'access', _407 => _407.getIsolatedClientBoundaryModules, 'call', _408 => _408(root)])))), 'optionalAccess', _409 => _409.size]) > 0,
4991
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _410 => _410.trailingSlash]), () => ( false)),
4992
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _411 => _411.basePath]), () => ( "/")),
4993
+ _chunkM4YXD6MDcjs.generateClientCachePersistenceCode.call(void 0,
4994
+ _chunkM4YXD6MDcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _412 => _412.cache]))
4972
4995
  ),
4973
4996
  adapterOwnsDocsRuntime ? _chunkXJDB564Acjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
4974
- _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _407 => _407.experimental, 'optionalAccess', _408 => _408.serverComponents])) === "islands"
4997
+ _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _413 => _413.experimental, 'optionalAccess', _414 => _414.serverComponents])) === "islands"
4975
4998
  );
4976
4999
  }
4977
5000
  if (id === "/@farm/server") {
4978
5001
  return generateServerCode();
4979
5002
  }
4980
5003
  if (id === "/@farm/manifest") {
4981
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _409 => _409.getRouteManager, 'call', _410 => _410()]);
5004
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _415 => _415.getRouteManager, 'call', _416 => _416()]);
4982
5005
  if (!routeManager) {
4983
5006
  return `
4984
5007
  export const getManifest = () => ({
@@ -4990,11 +5013,11 @@ export const getManifest = () => ({
4990
5013
  });
4991
5014
  `;
4992
5015
  }
4993
- const globalStylesheetHref = _chunkPQ6DBVJ2cjs.resolveDevGlobalStylesheetHref.call(void 0,
5016
+ const globalStylesheetHref = _chunkM4YXD6MDcjs.resolveDevGlobalStylesheetHref.call(void 0,
4994
5017
  server.config.root,
4995
- _optionalChain([farmApp, 'optionalAccess', _411 => _411.getConfig, 'call', _412 => _412(), 'access', _413 => _413.srcDir])
5018
+ _optionalChain([farmApp, 'optionalAccess', _417 => _417.getConfig, 'call', _418 => _418(), 'access', _419 => _419.srcDir])
4996
5019
  );
4997
- const fullManifest = _chunkPQ6DBVJ2cjs.createFarmDevClientManifest.call(void 0,
5020
+ const fullManifest = _chunkM4YXD6MDcjs.createFarmDevClientManifest.call(void 0,
4998
5021
  routeManager.generateClientManifest(server.config.root),
4999
5022
  {
5000
5023
  sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
@@ -5010,64 +5033,63 @@ export { manifest };
5010
5033
  }
5011
5034
  },
5012
5035
  async transform(code, id, transformOptions) {
5013
- if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _414 => _414.ssr]) && !farmSetupContext.getStore()) {
5036
+ if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _420 => _420.ssr]) && !farmSetupContext.getStore()) {
5014
5037
  await pendingClientSetup;
5015
5038
  }
5016
- const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _415 => _415.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
5017
- const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _416 => _416.getConfig, 'call', _417 => _417()]), () => ( options));
5039
+ const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _421 => _421.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
5040
+ const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _422 => _422.getConfig, 'call', _423 => _423()]), () => ( options));
5018
5041
  let rewrotePackageImports = false;
5019
- if (_chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _418 => _418.experimental, 'optionalAccess', _419 => _419.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _420 => _420.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkPA3VZNWUcjs.hasUseClientDirective.call(void 0, code)) {
5042
+ if (_chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _424 => _424.experimental, 'optionalAccess', _425 => _425.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _426 => _426.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkRTAWQXMEcjs.hasUseClientDirective.call(void 0, code)) {
5020
5043
  const file = id.split("?", 1)[0];
5021
- const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _421 => _421.config, 'access', _422 => _422.root]) || process.cwd();
5044
+ const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _427 => _427.config, 'access', _428 => _428.root]) || process.cwd();
5022
5045
  const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
5023
5046
  const rewrite = () => {
5024
- if (_optionalChain([transformOptions, 'optionalAccess', _423 => _423.ssr]) === true) {
5047
+ if (_optionalChain([transformOptions, 'optionalAccess', _429 => _429.ssr]) === true) {
5025
5048
  if (farmReactServerFiles.has(file)) {
5026
- for (const child of _chunkPA3VZNWUcjs.farmRelativeImportFiles.call(void 0, code, file))
5049
+ for (const child of _chunkRTAWQXMEcjs.farmRelativeImportFiles.call(void 0, code, file))
5027
5050
  farmReactServerFiles.add(child);
5028
5051
  }
5029
- const serverModule = farmReactServerFiles.has(file) || !_chunkPA3VZNWUcjs.getFarmClientReachableModules.call(void 0,
5052
+ const serverModule = farmReactServerFiles.has(file) || !_chunkRTAWQXMEcjs.getFarmClientReachableModules.call(void 0,
5030
5053
  path6.resolve(projectRoot, actionConfig.srcDir || "src"),
5031
5054
  projectRoot
5032
5055
  ).has(path6.resolve(file));
5033
- const reactServer = !serverModule ? null : _chunkPA3VZNWUcjs.rewriteFarmReactServerImports.call(void 0, {
5056
+ const reactServer = !serverModule ? null : _chunkRTAWQXMEcjs.rewriteFarmReactServerImports.call(void 0, {
5034
5057
  code,
5035
5058
  file,
5036
- reference: (specifier, exportName) => _chunkPA3VZNWUcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
5059
+ reference: (specifier, exportName) => _chunkRTAWQXMEcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
5037
5060
  onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
5038
5061
  });
5039
5062
  if (reactServer !== null) {
5040
5063
  code = reactServer;
5041
5064
  rewrotePackageImports = true;
5042
5065
  }
5043
- const internal = farmReactServerFiles.has(file) ? _chunkPA3VZNWUcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
5066
+ const internal = farmReactServerFiles.has(file) ? _chunkRTAWQXMEcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
5044
5067
  code,
5045
5068
  file,
5046
- reference: (clientFile) => _chunkPA3VZNWUcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
5069
+ reference: (clientFile) => _chunkRTAWQXMEcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
5047
5070
  }) : null;
5048
5071
  if (internal !== null) {
5049
5072
  code = internal;
5050
5073
  rewrotePackageImports = true;
5051
5074
  }
5052
5075
  }
5053
- const rewritePackageImports = (source2) => _chunkPA3VZNWUcjs.rewriteFarmPackageClientImports.call(void 0, {
5076
+ const rewritePackageImports = (source2) => _chunkRTAWQXMEcjs.rewriteFarmPackageClientImports.call(void 0, {
5054
5077
  code: source2,
5055
5078
  file,
5056
5079
  root: projectRoot,
5057
- isClientPackage: (specifier) => _chunkPA3VZNWUcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
5080
+ isClientPackage: (specifier) => _chunkRTAWQXMEcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
5058
5081
  });
5059
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _424 => _424.getRouteManager, 'call', _425 => _425()]);
5060
5082
  const source = code;
5061
- const referenced = routeManager ? routeManager.inspectPackages(() => rewritePackageImports(source)) : rewritePackageImports(source);
5083
+ const referenced = inspectPackages(() => rewritePackageImports(source));
5062
5084
  if (referenced !== null) {
5063
5085
  code = referenced;
5064
5086
  rewrotePackageImports = true;
5065
5087
  }
5066
- if (_optionalChain([transformOptions, 'optionalAccess', _426 => _426.ssr]) === true) {
5088
+ if (_optionalChain([transformOptions, 'optionalAccess', _430 => _430.ssr]) === true) {
5067
5089
  const cached = rewriteFarmReactCacheImport(
5068
5090
  code,
5069
5091
  file,
5070
- _optionalChain([runtimeModule, 'optionalCall', _427 => _427(FARM_REACT_CACHE_MODULE)])
5092
+ _optionalChain([runtimeModule, 'optionalCall', _431 => _431(FARM_REACT_CACHE_MODULE)])
5071
5093
  );
5072
5094
  if (cached !== null) {
5073
5095
  code = cached;
@@ -5075,12 +5097,12 @@ export { manifest };
5075
5097
  }
5076
5098
  }
5077
5099
  };
5078
- if (buildSnapshot) _chunkPA3VZNWUcjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
5100
+ if (buildSnapshot) _chunkRTAWQXMEcjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
5079
5101
  else rewrite();
5080
5102
  }
5081
5103
  if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
5082
5104
  const serverFns = _chunkPIUTGRDIcjs.transformFarmServerFns.call(void 0, code, id, {
5083
- environment: _optionalChain([transformOptions, 'optionalAccess', _428 => _428.ssr]) === true ? "rsc" : "client"
5105
+ environment: _optionalChain([transformOptions, 'optionalAccess', _432 => _432.ssr]) === true ? "rsc" : "client"
5084
5106
  });
5085
5107
  if (serverFns) {
5086
5108
  if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
@@ -5093,8 +5115,8 @@ export { manifest };
5093
5115
  const actionModule = transformFarmFormActionModule({
5094
5116
  code,
5095
5117
  id,
5096
- root: actionConfig.root || _optionalChain([server, 'optionalAccess', _429 => _429.config, 'access', _430 => _430.root]) || process.cwd(),
5097
- ssr: _optionalChain([transformOptions, 'optionalAccess', _431 => _431.ssr]) === true,
5118
+ root: actionConfig.root || _optionalChain([server, 'optionalAccess', _433 => _433.config, 'access', _434 => _434.root]) || process.cwd(),
5119
+ ssr: _optionalChain([transformOptions, 'optionalAccess', _435 => _435.ssr]) === true,
5098
5120
  // Parsed by file type: page components are TSX.
5099
5121
  parse: (source) => _vite.parseSync.call(void 0, file, source).program,
5100
5122
  runtimeModule,
@@ -5102,21 +5124,21 @@ export { manifest };
5102
5124
  });
5103
5125
  if (actionModule) return { code: actionModule, map: null };
5104
5126
  }
5105
- if (!_optionalChain([transformOptions, 'optionalAccess', _432 => _432.ssr])) {
5106
- const docsConfigModule = _chunkXJDB564Acjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _433 => _433.getConfig, 'call', _434 => _434(), 'optionalAccess', _435 => _435.docs]));
5107
- if (_chunkPQ6DBVJ2cjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
5108
- const redacted = _chunkPQ6DBVJ2cjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
5127
+ if (!_optionalChain([transformOptions, 'optionalAccess', _436 => _436.ssr])) {
5128
+ const docsConfigModule = _chunkXJDB564Acjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _437 => _437.getConfig, 'call', _438 => _438(), 'optionalAccess', _439 => _439.docs]));
5129
+ if (_chunkM4YXD6MDcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
5130
+ const redacted = _chunkM4YXD6MDcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
5109
5131
  if (redacted !== null) return { code: redacted, map: null };
5110
5132
  }
5111
5133
  }
5112
- if (!_optionalChain([transformOptions, 'optionalAccess', _436 => _436.ssr])) {
5113
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _437 => _437.getConfig, 'call', _438 => _438()]), () => ( options));
5114
- if ((_optionalChain([currentConfig, 'access', _439 => _439.experimental, 'optionalAccess', _440 => _440.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
5134
+ if (!_optionalChain([transformOptions, 'optionalAccess', _440 => _440.ssr])) {
5135
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _441 => _441.getConfig, 'call', _442 => _442()]), () => ( options));
5136
+ if ((_optionalChain([currentConfig, 'access', _443 => _443.experimental, 'optionalAccess', _444 => _444.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
5115
5137
  const violation = findClientServerFnViolation(code, id);
5116
5138
  if (violation) {
5117
- const locate = _chunkPA3VZNWUcjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5139
+ const locate = _chunkRTAWQXMEcjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5118
5140
  this.error(
5119
- _chunkPA3VZNWUcjs.formatFarmDiagnostic.call(void 0,
5141
+ _chunkRTAWQXMEcjs.formatFarmDiagnostic.call(void 0,
5120
5142
  createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
5121
5143
  currentConfig.root
5122
5144
  )
@@ -5124,8 +5146,8 @@ export { manifest };
5124
5146
  }
5125
5147
  }
5126
5148
  }
5127
- if (!_optionalChain([transformOptions, 'optionalAccess', _441 => _441.ssr]) && shouldInspectClientBoundary(id, code)) {
5128
- await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _442 => _442.getConfig, 'call', _443 => _443()]), () => ( options)));
5149
+ if (!_optionalChain([transformOptions, 'optionalAccess', _445 => _445.ssr]) && shouldInspectClientBoundary(id, code)) {
5150
+ await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _446 => _446.getConfig, 'call', _447 => _447()]), () => ( options)));
5129
5151
  }
5130
5152
  if (typeof imageImports.transform === "function") {
5131
5153
  const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
@@ -5140,13 +5162,13 @@ export { manifest };
5140
5162
  id,
5141
5163
  transformOptions
5142
5164
  );
5143
- const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _444 => _444.code, 'optionalAccess', _445 => _445.toString, 'call', _446 => _446()]);
5165
+ const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _448 => _448.code, 'optionalAccess', _449 => _449.toString, 'call', _450 => _450()]);
5144
5166
  if (fontCode) {
5145
5167
  transformedCode = fontCode;
5146
5168
  transformed = true;
5147
5169
  }
5148
5170
  }
5149
- if (_optionalChain([transformOptions, 'optionalAccess', _447 => _447.ssr]) && server) {
5171
+ if (_optionalChain([transformOptions, 'optionalAccess', _451 => _451.ssr]) && server) {
5150
5172
  const rewrittenImports = rewriteEarlySsrRelativeImports({
5151
5173
  code: transformedCode,
5152
5174
  id,
@@ -5158,27 +5180,27 @@ export { manifest };
5158
5180
  transformed = true;
5159
5181
  }
5160
5182
  }
5161
- if (_chunkPA3VZNWUcjs.hasUseClientDirective.call(void 0, transformedCode)) {
5183
+ if (_chunkRTAWQXMEcjs.hasUseClientDirective.call(void 0, transformedCode)) {
5162
5184
  const clientBoundarySource = transformedCode;
5163
5185
  const moduleInfo = this.getModuleInfo(id);
5164
5186
  if (moduleInfo) {
5165
5187
  moduleInfo.isClientComponent = true;
5166
5188
  }
5167
- transformedCode = _chunkPA3VZNWUcjs.stripUseClientDirective.call(void 0, transformedCode);
5189
+ transformedCode = _chunkRTAWQXMEcjs.stripUseClientDirective.call(void 0, transformedCode);
5168
5190
  transformed = true;
5169
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _448 => _448.getConfig, 'call', _449 => _449()]), () => ( options));
5191
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _452 => _452.getConfig, 'call', _453 => _453()]), () => ( options));
5170
5192
  let isolatedModuleReference = null;
5171
5193
  let rendererIslandModule = false;
5172
- const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _450 => _450.config, 'access', _451 => _451.root]) || process.cwd();
5194
+ const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _454 => _454.config, 'access', _455 => _455.root]) || process.cwd();
5173
5195
  const cleanId = id.split("?", 1)[0];
5174
- const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _452 => _452.getRouteManager, 'call', _453 => _453(), 'access', _454 => _454.getIsolatedClientBoundaryModules, 'call', _455 => _455(root)])));
5175
- const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _456 => _456.has, 'call', _457 => _457(path6.resolve(cleanId))]) === true;
5176
- if (_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkPA3VZNWUcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5177
- cleanId.replace(/\\/g, "/").includes(_chunkPA3VZNWUcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5196
+ const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _456 => _456.getRouteManager, 'call', _457 => _457(), 'access', _458 => _458.getIsolatedClientBoundaryModules, 'call', _459 => _459(root)])));
5197
+ const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _460 => _460.has, 'call', _461 => _461(path6.resolve(cleanId))]) === true;
5198
+ if (_chunkT7UC2ORAcjs.isReactRenderer.call(void 0, _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkRTAWQXMEcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5199
+ cleanId.replace(/\\/g, "/").includes(_chunkRTAWQXMEcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5178
5200
  isolatedModuleReference = _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, cleanId, root);
5179
- const islandsMode = _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _458 => _458.experimental, 'optionalAccess', _459 => _459.serverComponents])) === "islands";
5180
- const explicitStrategy = _chunkPA3VZNWUcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5181
- const inference = islandsMode && explicitStrategy === null ? _chunkPQ6DBVJ2cjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5201
+ const islandsMode = _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _462 => _462.experimental, 'optionalAccess', _463 => _463.serverComponents])) === "islands";
5202
+ const explicitStrategy = _chunkRTAWQXMEcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5203
+ const inference = islandsMode && explicitStrategy === null ? _chunkM4YXD6MDcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5182
5204
  if (inference) {
5183
5205
  for (const file of inference.files) {
5184
5206
  if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
@@ -5191,8 +5213,8 @@ export { manifest };
5191
5213
  islandStrategy: _nullishCoalesce(explicitStrategy, () => ( "load")),
5192
5214
  parse: (source) => this.parse(source),
5193
5215
  slots: islandsMode,
5194
- browser: _optionalChain([transformOptions, 'optionalAccess', _460 => _460.ssr]) !== true,
5195
- inferredInteraction: _optionalChain([inference, 'optionalAccess', _461 => _461.strategy]) === "interaction",
5216
+ browser: _optionalChain([transformOptions, 'optionalAccess', _464 => _464.ssr]) !== true,
5217
+ inferredInteraction: _optionalChain([inference, 'optionalAccess', _465 => _465.strategy]) === "interaction",
5196
5218
  runtimeModule
5197
5219
  });
5198
5220
  if (!transformedBoundary) {
@@ -5201,14 +5223,14 @@ export { manifest };
5201
5223
  );
5202
5224
  }
5203
5225
  transformedCode = transformedBoundary;
5204
- } else if (selectedForIsolatedHydration && _chunkZ43CIBURcjs.usesFarmRendererIslands.call(void 0, currentConfig) && (_chunkPA3VZNWUcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || cleanId.replace(/\\/g, "/").includes(_chunkPA3VZNWUcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5226
+ } else if (selectedForIsolatedHydration && _chunkZ43CIBURcjs.usesFarmRendererIslands.call(void 0, currentConfig) && (_chunkRTAWQXMEcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || cleanId.replace(/\\/g, "/").includes(_chunkRTAWQXMEcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5205
5227
  rendererIslandModule = true;
5206
- if (_optionalChain([transformOptions, 'optionalAccess', _462 => _462.ssr]) === true) {
5228
+ if (_optionalChain([transformOptions, 'optionalAccess', _466 => _466.ssr]) === true) {
5207
5229
  const renderer = _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer);
5208
5230
  const transformedBoundary = transformIsolatedClientBoundaryModule({
5209
5231
  code: transformedCode,
5210
5232
  moduleReference: _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, cleanId, root),
5211
- islandStrategy: _nullishCoalesce(_chunkPA3VZNWUcjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
5233
+ islandStrategy: _nullishCoalesce(_chunkRTAWQXMEcjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
5212
5234
  parse: (source) => this.parse(source),
5213
5235
  withIsland: renderer.server
5214
5236
  });
@@ -5241,7 +5263,7 @@ export { manifest };
5241
5263
  );
5242
5264
  return;
5243
5265
  }` : "";
5244
- const rendererIslandHmr = rendererIslandModule && !_optionalChain([transformOptions, 'optionalAccess', _463 => _463.ssr]) && !/\bimport\.meta\.hot\b/.test(transformedCode) && shouldEmitFarmClientRootHmr(currentConfig.renderer);
5266
+ const rendererIslandHmr = rendererIslandModule && !_optionalChain([transformOptions, 'optionalAccess', _467 => _467.ssr]) && !/\bimport\.meta\.hot\b/.test(transformedCode) && shouldEmitFarmClientRootHmr(currentConfig.renderer);
5245
5267
  const hmrCode = rendererIslandHmr ? `
5246
5268
  if (import.meta.hot) {
5247
5269
  import.meta.hot.accept((newModule) => {
@@ -5251,7 +5273,7 @@ if (import.meta.hot) {
5251
5273
  }
5252
5274
  });
5253
5275
  }
5254
- ` : _optionalChain([transformOptions, 'optionalAccess', _464 => _464.ssr]) || reactRefreshActive || rendererIslandModule || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5276
+ ` : _optionalChain([transformOptions, 'optionalAccess', _468 => _468.ssr]) || reactRefreshActive || rendererIslandModule || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5255
5277
  if (import.meta.hot) {
5256
5278
  import.meta.hot.accept((newModule) => {
5257
5279
  ${isolatedHmrUpdate}
@@ -5307,14 +5329,14 @@ if (import.meta.hot) {
5307
5329
  }
5308
5330
  _chunk7U4XF76Rcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
5309
5331
  _chunk7U4XF76Rcjs.logger.info("Pre-rendering SSG pages...");
5310
- const outDir = path6.join(_optionalChain([server, 'optionalAccess', _465 => _465.config, 'access', _466 => _466.root]) || process.cwd(), options.outDir || "dist");
5332
+ const outDir = path6.join(_optionalChain([server, 'optionalAccess', _469 => _469.config, 'access', _470 => _470.root]) || process.cwd(), options.outDir || "dist");
5311
5333
  const clientDir = path6.join(outDir, "client");
5312
5334
  for (const page of ssgPages) {
5313
5335
  try {
5314
5336
  const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
5315
5337
  await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
5316
5338
  const mod = await routeManager.loadRouteModule(page.filePath);
5317
- if (!_optionalChain([mod, 'optionalAccess', _467 => _467.default])) return;
5339
+ if (!_optionalChain([mod, 'optionalAccess', _471 => _471.default])) return;
5318
5340
  const { layouts } = routeManager.matchRoute(page.urlPath);
5319
5341
  const layoutModules = await Promise.all(
5320
5342
  layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
@@ -5346,7 +5368,7 @@ if (import.meta.hot) {
5346
5368
  const i18nSnapshot = _chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, );
5347
5369
  const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
5348
5370
  const fullHtml = `<!DOCTYPE html>
5349
- <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _468 => _468.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5371
+ <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _472 => _472.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5350
5372
  <head>
5351
5373
  <meta charset="utf-8">
5352
5374
  <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -5390,13 +5412,12 @@ if (import.meta.hot) {
5390
5412
  },
5391
5413
  watchChange(id, change) {
5392
5414
  const watched = _chunk7U4XF76Rcjs.toPosixPath.call(void 0, id);
5393
- if (!watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched)) {
5394
- _optionalChain([farmApp, 'optionalAccess', _469 => _469.getRouteManager, 'call', _470 => _470(), 'access', _471 => _471.noteSourceChange, 'call', _472 => _472(id, change.event)]);
5395
- }
5396
- _chunkPA3VZNWUcjs.invalidateFarmClientReachableModules.call(void 0, );
5397
- _chunkPA3VZNWUcjs.invalidateFarmClientOnlyScan.call(void 0, );
5398
- _chunkPQ6DBVJ2cjs.invalidateFarmRouteRootInferences.call(void 0, );
5399
- _chunkPA3VZNWUcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5415
+ const appSource = !watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched);
5416
+ if (appSource) _optionalChain([farmApp, 'optionalAccess', _473 => _473.getRouteManager, 'call', _474 => _474(), 'access', _475 => _475.noteSourceChange, 'call', _476 => _476(id, change.event)]);
5417
+ _chunkRTAWQXMEcjs.noteFarmClientReachableModuleChange.call(void 0, id, change.event, { appSource });
5418
+ _chunkRTAWQXMEcjs.invalidateFarmClientOnlyScan.call(void 0, id, change.event);
5419
+ _chunkM4YXD6MDcjs.invalidateFarmRouteRootInferences.call(void 0, id, change.event);
5420
+ _chunkRTAWQXMEcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5400
5421
  },
5401
5422
  async handleHotUpdate(ctx) {
5402
5423
  if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
@@ -5421,7 +5442,7 @@ if (import.meta.hot) {
5421
5442
  server2.moduleGraph.invalidateModule(mod);
5422
5443
  }
5423
5444
  }
5424
- const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _473 => _473.getConfig, 'call', _474 => _474()]);
5445
+ const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _477 => _477.getConfig, 'call', _478 => _478()]);
5425
5446
  const normalizedFile = file.replace(/\\/g, "/");
5426
5447
  const reloadAfterEdit = () => {
5427
5448
  for (const files of pendingRouteReloads) {
@@ -5429,21 +5450,21 @@ if (import.meta.hot) {
5429
5450
  }
5430
5451
  server2.ws.send({ type: "full-reload", path: "*" });
5431
5452
  };
5432
- if (normalizedFile.includes(_chunkPA3VZNWUcjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5453
+ if (normalizedFile.includes(_chunkRTAWQXMEcjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5433
5454
  path6.posix.join(
5434
- _chunk7U4XF76Rcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _475 => _475.root]) || options.root || server2.config.root),
5435
- _chunkPA3VZNWUcjs.FARM_CLIENT_REFERENCE_DIRECTORY
5455
+ _chunk7U4XF76Rcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _479 => _479.root]) || options.root || server2.config.root),
5456
+ _chunkRTAWQXMEcjs.FARM_CLIENT_REFERENCE_DIRECTORY
5436
5457
  )
5437
5458
  ))
5438
5459
  return modules;
5439
- if (currentFarmConfig && _chunkBQHIJOZMcjs.isFarmAPIRouteFileName.call(void 0,
5460
+ if (currentFarmConfig && _chunkSIECKBNKcjs.isFarmAPIRouteFileName.call(void 0,
5440
5461
  path6.posix.basename(normalizedFile),
5441
- _chunkBQHIJOZMcjs.hasPolyroutePlugin.call(void 0, server2.config.plugins)
5462
+ _chunkSIECKBNKcjs.hasPolyroutePlugin.call(void 0, server2.config.plugins)
5442
5463
  ) && _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
5443
5464
  (appDir) => normalizedFile.startsWith(`${_chunk7U4XF76Rcjs.toPosixPath.call(void 0, appDir)}/api/`)
5444
5465
  )) {
5445
5466
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
5446
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _476 => _476(`updated ${file}`)]);
5467
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _480 => _480(`updated ${file}`)]);
5447
5468
  reloadAfterEdit();
5448
5469
  return [];
5449
5470
  }
@@ -5453,7 +5474,7 @@ if (import.meta.hot) {
5453
5474
  for (const mod of modules) {
5454
5475
  server2.moduleGraph.invalidateModule(mod);
5455
5476
  }
5456
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _477 => _477(`updated ${file}`)]);
5477
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _481 => _481(`updated ${file}`)]);
5457
5478
  reloadAfterEdit();
5458
5479
  return [];
5459
5480
  }
@@ -5463,22 +5484,22 @@ if (import.meta.hot) {
5463
5484
  for (const mod of modules) {
5464
5485
  server2.moduleGraph.invalidateModule(mod);
5465
5486
  }
5466
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _478 => _478(`updated ${file}`)]);
5487
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _482 => _482(`updated ${file}`)]);
5467
5488
  reloadAfterEdit();
5468
5489
  return [];
5469
5490
  }
5470
5491
  if (apiRouteManager && _chunkI2RBHZF7cjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
5471
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _479 => _479(`updated ${file}`)]);
5492
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _483 => _483(`updated ${file}`)]);
5472
5493
  }
5473
- const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _480 => _480.experimental, 'optionalAccess', _481 => _481.isolatedClientHydration]);
5474
- const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _482 => _482.getRouteManager, 'call', _483 => _483()]);
5494
+ const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _484 => _484.experimental, 'optionalAccess', _485 => _485.isolatedClientHydration]);
5495
+ const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _486 => _486.getRouteManager, 'call', _487 => _487()]);
5475
5496
  const isHydrationPlanSource = /\.[cm]?[jt]sx?$/.test(normalizedFile) && !normalizedFile.includes("/node_modules/") && !isFarmGeneratedOutput(normalizedFile);
5476
- const tracksAsyncOwnerIslands = _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _484 => _484.renderer])) && planRouteManager !== void 0;
5497
+ const tracksAsyncOwnerIslands = _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _488 => _488.renderer])) && planRouteManager !== void 0;
5477
5498
  let clientPlanCurrent = false;
5478
5499
  if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
5479
5500
  const routeManager = planRouteManager;
5480
- await _optionalChain([ctx, 'access', _485 => _485.read, 'optionalCall', _486 => _486()]);
5481
- if (_optionalChain([routeManager, 'optionalAccess', _487 => _487.isEditPlanNeutral, 'call', _488 => _488(file)])) {
5501
+ await _optionalChain([ctx, 'access', _489 => _489.read, 'optionalCall', _490 => _490()]);
5502
+ if (_optionalChain([routeManager, 'optionalAccess', _491 => _491.isEditPlanNeutral, 'call', _492 => _492(file)])) {
5482
5503
  clientPlanCurrent = true;
5483
5504
  } else if (routeManager) {
5484
5505
  routeManager.noteSourceChange(file, "update");
@@ -5522,7 +5543,7 @@ if (import.meta.hot) {
5522
5543
  }
5523
5544
  }
5524
5545
  }
5525
- const rendererRouteFile = _optionalChain([farmApp, 'optionalAccess', _489 => _489.getRouteManager, 'call', _490 => _490(), 'access', _491 => _491.isRendererRouteModule, 'call', _492 => _492(normalizedFile)]) === true;
5546
+ const rendererRouteFile = _optionalChain([farmApp, 'optionalAccess', _493 => _493.getRouteManager, 'call', _494 => _494(), 'access', _495 => _495.isRendererRouteModule, 'call', _496 => _496(normalizedFile)]) === true;
5526
5547
  if (normalizedFile.includes("/app/") || rendererRouteFile) {
5527
5548
  if (normalizedFile.includes("middleware.")) {
5528
5549
  if (middlewareManager) {
@@ -5540,7 +5561,7 @@ if (import.meta.hot) {
5540
5561
  }
5541
5562
  return [];
5542
5563
  }
5543
- if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _493 => _493.getRouteManager, 'call', _494 => _494(), 'access', _495 => _495.invalidateClientManifest, 'call', _496 => _496()]);
5564
+ if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _497 => _497.getRouteManager, 'call', _498 => _498(), 'access', _499 => _499.invalidateClientManifest, 'call', _500 => _500()]);
5544
5565
  const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
5545
5566
  if (manifestModule) {
5546
5567
  server2.moduleGraph.invalidateModule(manifestModule);
@@ -5556,14 +5577,14 @@ if (import.meta.hot) {
5556
5577
  }
5557
5578
  }
5558
5579
  if (currentFarmConfig && planRouteManager && _chunkZ43CIBURcjs.usesFarmRendererIslands.call(void 0, currentFarmConfig) && shouldEmitFarmClientRootHmr(currentFarmConfig.renderer) && reachesSharedFarmRendererIsland(
5559
- _optionalChain([server2, 'access', _497 => _497.environments, 'access', _498 => _498.client, 'optionalAccess', _499 => _499.moduleGraph]),
5580
+ _optionalChain([server2, 'access', _501 => _501.environments, 'access', _502 => _502.client, 'optionalAccess', _503 => _503.moduleGraph]),
5560
5581
  normalizedFile,
5561
5582
  planRouteManager.getIsolatedClientBoundaryModules(currentFarmConfig.root)
5562
5583
  )) {
5563
5584
  reloadAfterEdit();
5564
5585
  return [];
5565
5586
  }
5566
- if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _500 => _500.environments, 'access', _501 => _501.client, 'optionalAccess', _502 => _502.moduleGraph, 'access', _503 => _503.getModulesByFile, 'call', _504 => _504(normalizedFile), 'optionalAccess', _505 => _505.size]) && _chunkI2RBHZF7cjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
5587
+ if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _504 => _504.environments, 'access', _505 => _505.client, 'optionalAccess', _506 => _506.moduleGraph, 'access', _507 => _507.getModulesByFile, 'call', _508 => _508(normalizedFile), 'optionalAccess', _509 => _509.size]) && _chunkI2RBHZF7cjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
5567
5588
  logUpdate("PAGE", `updated ${path6.basename(file)}`);
5568
5589
  reloadAfterEdit();
5569
5590
  return [];
@@ -5661,7 +5682,7 @@ function createPageDataMiddlewareResponse(res) {
5661
5682
  return (...args) => {
5662
5683
  if (captures(target.statusCode, target.getHeader("location"))) {
5663
5684
  const callback = args.find((arg) => typeof arg === "function");
5664
- _optionalChain([callback, 'optionalCall', _506 => _506()]);
5685
+ _optionalChain([callback, 'optionalCall', _510 => _510()]);
5665
5686
  return property === "write" ? true : response;
5666
5687
  }
5667
5688
  return target[property](...args);
@@ -5725,12 +5746,12 @@ function isFarmClientVirtualId(id) {
5725
5746
  }
5726
5747
  function isClientEnvironment(context, loadOptions) {
5727
5748
  const environment = context.environment;
5728
- if (_optionalChain([environment, 'optionalAccess', _507 => _507.config, 'optionalAccess', _508 => _508.consumer])) return environment.config.consumer === "client";
5729
- if (_optionalChain([environment, 'optionalAccess', _509 => _509.name])) return environment.name === "client";
5730
- return _optionalChain([loadOptions, 'optionalAccess', _510 => _510.ssr]) !== true;
5749
+ if (_optionalChain([environment, 'optionalAccess', _511 => _511.config, 'optionalAccess', _512 => _512.consumer])) return environment.config.consumer === "client";
5750
+ if (_optionalChain([environment, 'optionalAccess', _513 => _513.name])) return environment.name === "client";
5751
+ return _optionalChain([loadOptions, 'optionalAccess', _514 => _514.ssr]) !== true;
5731
5752
  }
5732
5753
  function invalidateProgrammaticClientRouteModules(server) {
5733
- const graph = _optionalChain([server, 'access', _511 => _511.environments, 'optionalAccess', _512 => _512.client, 'optionalAccess', _513 => _513.moduleGraph]);
5754
+ const graph = _optionalChain([server, 'access', _515 => _515.environments, 'optionalAccess', _516 => _516.client, 'optionalAccess', _517 => _517.moduleGraph]);
5734
5755
  if (!graph) return;
5735
5756
  for (const [id, module] of graph.idToModuleMap) {
5736
5757
  if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
@@ -5740,12 +5761,12 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
5740
5761
  const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5741
5762
  const routesFile = resolveRealModuleFile(parsed.filePath, root);
5742
5763
  watchFile(routesFile);
5743
- return _chunkPA3VZNWUcjs.generateProgrammaticClientRouteModule.call(void 0, {
5764
+ return _chunkRTAWQXMEcjs.generateProgrammaticClientRouteModule.call(void 0, {
5744
5765
  kind: parsed.kind,
5745
5766
  routePath: parsed.routePath,
5746
5767
  routesFile,
5747
- route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _514 => _514.routes, 'access', _515 => _515.get, 'call', _516 => _516(
5748
- _chunkPA3VZNWUcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5768
+ route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _518 => _518.routes, 'access', _519 => _519.get, 'call', _520 => _520(
5769
+ _chunkRTAWQXMEcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5749
5770
  )]),
5750
5771
  // React's client module exports no createElement; the main client entry imports React too.
5751
5772
  rendererClient: _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
@@ -5753,7 +5774,7 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
5753
5774
  });
5754
5775
  }
5755
5776
  function resolveRealModuleFile(filePath, root) {
5756
- const resolved = _nullishCoalesce(_chunkPA3VZNWUcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5777
+ const resolved = _nullishCoalesce(_chunkRTAWQXMEcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5757
5778
  try {
5758
5779
  return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
5759
5780
  } catch (e29) {
@@ -6067,12 +6088,12 @@ async function parseRouteModuleProps(routeModule, input) {
6067
6088
  }
6068
6089
  const schemas = routeModule.__farmRouteSchemas;
6069
6090
  const params = parseRouteModuleSchema(
6070
- _optionalChain([schemas, 'optionalAccess', _517 => _517.params]),
6091
+ _optionalChain([schemas, 'optionalAccess', _521 => _521.params]),
6071
6092
  input.props.params,
6072
6093
  "params",
6073
6094
  input.routePath
6074
6095
  );
6075
- const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _518 => _518.search]), input.search, "search", input.routePath);
6096
+ const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _522 => _522.search]), input.search, "search", input.routePath);
6076
6097
  return {
6077
6098
  ...input.props,
6078
6099
  params,
@@ -6092,12 +6113,12 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
6092
6113
  }
6093
6114
  }
6094
6115
  function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterUI, renderer = _chunkT7UC2ORAcjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
6095
- const providerClientCode = _chunkPQ6DBVJ2cjs.generateFarmIntegrationProviderClientCode.call(void 0,
6116
+ const providerClientCode = _chunkM4YXD6MDcjs.generateFarmIntegrationProviderClientCode.call(void 0,
6096
6117
  integrationProviders,
6097
6118
  root,
6098
6119
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
6099
6120
  );
6100
- const clientPluginEntry = _chunkDMSXZNQRcjs.generateFarmClientPluginEntryCode.call(void 0,
6121
+ const clientPluginEntry = _chunkRZI6436Fcjs.generateFarmClientPluginEntryCode.call(void 0,
6101
6122
  plugins,
6102
6123
  root,
6103
6124
  srcDir,
@@ -6190,7 +6211,7 @@ async function createFarmServerTreePageElement(source, pathname) {
6190
6211
  return null;
6191
6212
  }
6192
6213
  }
6193
- ${islandValues ? `${_chunkPQ6DBVJ2cjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6214
+ ${islandValues ? `${_chunkM4YXD6MDcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6194
6215
  let farmLastRouteState = null;
6195
6216
 
6196
6217
  // A hot update to a layout tree's client module renders the route again.
@@ -7031,7 +7052,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
7031
7052
  return loadedLayouts;
7032
7053
  }
7033
7054
 
7034
- ${_chunkPQ6DBVJ2cjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
7055
+ ${_chunkM4YXD6MDcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
7035
7056
  function wrapWithLoadedLayouts(element, loadedLayouts, params) {
7036
7057
  let wrapped = element;
7037
7058
  for (let index = loadedLayouts.length - 1; index >= 0; index--) {
@@ -7331,7 +7352,7 @@ function readActiveLayoutPatterns() {
7331
7352
  );
7332
7353
  }
7333
7354
 
7334
- ${_chunkPQ6DBVJ2cjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7355
+ ${_chunkM4YXD6MDcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7335
7356
 
7336
7357
  function activateFragmentScripts(root) {
7337
7358
  for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
@@ -7390,7 +7411,7 @@ function getLayoutShell(root, patterns, index, find) {
7390
7411
  return shell.innerHTML;
7391
7412
  }
7392
7413
 
7393
- ${islandValues ? _chunkPQ6DBVJ2cjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7414
+ ${islandValues ? _chunkM4YXD6MDcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7394
7415
  container,
7395
7416
  fragment,
7396
7417
  currentPatterns,
@@ -7465,9 +7486,9 @@ ${islandValues ? `
7465
7486
  return nextTarget;
7466
7487
  }
7467
7488
 
7468
- ${islandValues ? `${_chunkPQ6DBVJ2cjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7489
+ ${islandValues ? `${_chunkM4YXD6MDcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7469
7490
 
7470
- ${_chunkPQ6DBVJ2cjs.FARM_EARLY_NAVIGATION_SOURCE}
7491
+ ${_chunkM4YXD6MDcjs.FARM_EARLY_NAVIGATION_SOURCE}
7471
7492
 
7472
7493
  // Islands mode navigates as the production client does: it fetches the page itself, names the
7473
7494
  // layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
@@ -8171,9 +8192,9 @@ function generateClientManifest(bundle) {
8171
8192
  return manifest;
8172
8193
  }
8173
8194
  async function defineConfig(config = {}) {
8174
- const tailwindVitePlugin = await _chunkDMSXZNQRcjs.loadTailwindVitePlugin.call(void 0, );
8195
+ const tailwindVitePlugin = await _chunkRZI6436Fcjs.loadTailwindVitePlugin.call(void 0, );
8175
8196
  const appRoot = path6.resolve(config.root || process.cwd());
8176
- if (_optionalChain([config, 'access', _519 => _519.extends, 'optionalAccess', _520 => _520.length])) {
8197
+ if (_optionalChain([config, 'access', _523 => _523.extends, 'optionalAccess', _524 => _524.length])) {
8177
8198
  const { config: layeredConfig } = await import("./layers-XLOMMQP7.cjs").then(
8178
8199
  ({ resolveFarmLayers }) => resolveFarmLayers(config, {
8179
8200
  root: appRoot,
@@ -8183,7 +8204,7 @@ async function defineConfig(config = {}) {
8183
8204
  config = layeredConfig;
8184
8205
  }
8185
8206
  config.renderer = _chunkT7UC2ORAcjs.resolveFarmRenderer.call(void 0, config.renderer);
8186
- config.images = _chunkPQ6DBVJ2cjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
8207
+ config.images = _chunkM4YXD6MDcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
8187
8208
  const rendererVitePlugins = await _chunkT7UC2ORAcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
8188
8209
  ssr: true
8189
8210
  });
@@ -8275,13 +8296,13 @@ async function defineConfig(config = {}) {
8275
8296
  if (!serverStarted) {
8276
8297
  serverStarted = true;
8277
8298
  const elapsed = Date.now() - startTime;
8278
- const address = _optionalChain([server, 'access', _521 => _521.httpServer, 'optionalAccess', _522 => _522.address, 'call', _523 => _523()]);
8299
+ const address = _optionalChain([server, 'access', _525 => _525.httpServer, 'optionalAccess', _526 => _526.address, 'call', _527 => _527()]);
8279
8300
  const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
8280
8301
  const hostConfig = server.config.server.host;
8281
8302
  const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
8282
8303
  console.log("");
8283
8304
  console.log(
8284
- ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunk6266WH6Xcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8305
+ ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkNOSLIDSGcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8285
8306
  );
8286
8307
  console.log("");
8287
8308
  console.log(
@@ -8315,7 +8336,7 @@ async function defineConfig(config = {}) {
8315
8336
  plugins: [
8316
8337
  // `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
8317
8338
  _chunkY2FEFQAYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
8318
- _chunkPQ6DBVJ2cjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8339
+ _chunkM4YXD6MDcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8319
8340
  tailwindVitePlugin,
8320
8341
  ...rendererVitePlugins,
8321
8342
  ...reactRefreshPlugins,
@@ -8325,14 +8346,14 @@ async function defineConfig(config = {}) {
8325
8346
  farmNavigationPlugin(config.renderer),
8326
8347
  farmIslandContainersPlugin(config),
8327
8348
  farmPlugin(config),
8328
- _chunkPA3VZNWUcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8349
+ _chunkRTAWQXMEcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8329
8350
  farmBrandingPlugin
8330
8351
  ],
8331
8352
  customLogger: farmLogger,
8332
8353
  clearScreen: false,
8333
8354
  optimizeDeps: {
8334
- ..._chunkPQ6DBVJ2cjs.createFarmClientOptimizeDepsConfig.call(void 0,
8335
- _chunkPQ6DBVJ2cjs.createFarmClientOptimizeDepsEntries.call(void 0,
8355
+ ..._chunkM4YXD6MDcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8356
+ _chunkM4YXD6MDcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8336
8357
  appRoot,
8337
8358
  _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
8338
8359
  ),
@@ -8376,7 +8397,7 @@ async function defineConfig(config = {}) {
8376
8397
  // Stub out problematic server-only modules during dev mode
8377
8398
  alias: {
8378
8399
  ..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, config.layers),
8379
- ..._chunkPQ6DBVJ2cjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8400
+ ..._chunkM4YXD6MDcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8380
8401
  // Nitro internals that should not be resolved in browser
8381
8402
  "supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
8382
8403
  "@poppinss/dumper": "data:text/javascript,export default {};",