@farm.js/core 0.1.82 → 0.1.84

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 (253) hide show
  1. package/dist/{agent-mcp.d-C2Su3x4D.d.ts → agent-mcp.d-7uKdOttc.d.ts} +1 -1
  2. package/dist/{agent-mcp.d-Yak-LqRd.d.mts → agent-mcp.d-LChlR2au.d.mts} +1 -1
  3. package/dist/agent-runtime.d.mts +2 -1
  4. package/dist/agent-runtime.d.ts +2 -1
  5. package/dist/{analyzer-RPU2KG4J.mjs → analyzer-7RNO3XKC.mjs} +2 -2
  6. package/dist/analyzer-PFKA5NI6.cjs +17 -0
  7. package/dist/api/node.d.mts +4 -3
  8. package/dist/api/node.d.ts +4 -3
  9. package/dist/api/route-manager.d.mts +4 -3
  10. package/dist/api/route-manager.d.ts +4 -3
  11. package/dist/api/runtime.d.mts +3 -2
  12. package/dist/api/runtime.d.ts +3 -2
  13. package/dist/api.d.mts +5 -4
  14. package/dist/api.d.ts +5 -4
  15. package/dist/{app-manifest.d-DZyXaICz.d.ts → app-manifest.d-CRp21oAz.d.ts} +1 -1
  16. package/dist/{app-manifest.d-BcyOFMrg.d.mts → app-manifest.d-QMdmqqCr.d.mts} +1 -1
  17. package/dist/app-markdown.d.mts +3 -2
  18. package/dist/app-markdown.d.ts +3 -2
  19. package/dist/{app.d-CIoXsAbN.d.ts → app.d-CVPu_hoD.d.ts} +34 -4
  20. package/dist/{app.d-C0ePpuaG.d.mts → app.d-eSm7jgoc.d.mts} +34 -4
  21. package/dist/{chunk-B2PGVHBG.cjs → chunk-22BTYPIX.cjs} +4 -4
  22. package/dist/{chunk-BCTHOQPP.cjs → chunk-3OKSEJ33.cjs} +98 -10
  23. package/dist/{chunk-QSMUMK7Y.mjs → chunk-3WM7VBGW.mjs} +2 -2
  24. package/dist/{chunk-XMHERKSE.mjs → chunk-42IBGQTN.mjs} +5 -12
  25. package/dist/{chunk-RMPUEH5T.cjs → chunk-57EEWWUS.cjs} +2 -2
  26. package/dist/{chunk-Q2VOT3K2.cjs → chunk-5I4ZGKP2.cjs} +395 -333
  27. package/dist/{chunk-TPA2PV5J.mjs → chunk-5V6HSJFG.mjs} +24 -1
  28. package/dist/{chunk-RMLR5RMH.mjs → chunk-BCCCPFHQ.mjs} +92 -4
  29. package/dist/{chunk-LM2ZDNDD.cjs → chunk-BOEDYXAX.cjs} +30 -25
  30. package/dist/{chunk-NRCKBDYP.mjs → chunk-BRDGINBB.mjs} +153 -47
  31. package/dist/chunk-BUQR7KKO.mjs +17 -0
  32. package/dist/{chunk-63ZE6B6M.mjs → chunk-BZY3SRRD.mjs} +1 -1
  33. package/dist/{chunk-724WT3NI.mjs → chunk-CRE642TW.mjs} +1 -1
  34. package/dist/{chunk-JK26IMT7.cjs → chunk-CVZY4TLW.cjs} +1 -1
  35. package/dist/{chunk-ZIZRIZLP.mjs → chunk-CWUQBECF.mjs} +3 -1
  36. package/dist/{chunk-DAXU2NBE.mjs → chunk-DFDQGHPU.mjs} +104 -42
  37. package/dist/{chunk-AIPZDBP6.cjs → chunk-DSWSDDP2.cjs} +844 -553
  38. package/dist/{chunk-DRO3NXA3.cjs → chunk-EBSL5TW7.cjs} +203 -93
  39. package/dist/{chunk-CJDBTTLB.mjs → chunk-EDBIBO67.mjs} +18 -13
  40. package/dist/{chunk-BBVLOEND.cjs → chunk-F7JVO3OZ.cjs} +4 -4
  41. package/dist/chunk-FZ7OUN5M.cjs +30 -0
  42. package/dist/chunk-GLNVLCUH.cjs +426 -0
  43. package/dist/{chunk-5MMKNW7Q.cjs → chunk-H7REG7OX.cjs} +15 -8
  44. package/dist/{chunk-N2EFMN2K.cjs → chunk-HOQ2MYBJ.cjs} +10 -10
  45. package/dist/{chunk-OP5VI4TP.mjs → chunk-I5CVJ24H.mjs} +1 -1
  46. package/dist/{chunk-I4DR3HCH.mjs → chunk-INU4K4U4.mjs} +5 -5
  47. package/dist/{chunk-4X7LSGM6.mjs → chunk-IRJSZAJB.mjs} +1 -1
  48. package/dist/{chunk-EX6ZSN5P.cjs → chunk-IZYFP7IN.cjs} +17 -24
  49. package/dist/chunk-J6RFB324.cjs +17 -0
  50. package/dist/{chunk-47I2MYIR.mjs → chunk-KXVMWLTC.mjs} +484 -193
  51. package/dist/{chunk-UVV3I5QA.cjs → chunk-L2GUEYHR.cjs} +29 -6
  52. package/dist/{chunk-VMBIKDKW.cjs → chunk-L3BSHASB.cjs} +6 -4
  53. package/dist/chunk-L5HDCDFT.mjs +426 -0
  54. package/dist/{chunk-GXLNARPO.mjs → chunk-M5XU22PQ.mjs} +1 -1
  55. package/dist/chunk-M6AJZ4XR.mjs +30 -0
  56. package/dist/chunk-MAPHNGTF.cjs +98 -0
  57. package/dist/{chunk-RE5E2G5S.cjs → chunk-MNUYXZV7.cjs} +2 -18
  58. package/dist/{chunk-C3VCYOU4.mjs → chunk-MUUDHWQZ.mjs} +1 -1
  59. package/dist/{chunk-YSU3WCW6.mjs → chunk-MYSH5Y4E.mjs} +1 -1
  60. package/dist/{chunk-OMB7UGVW.mjs → chunk-NLHSKKTT.mjs} +14 -9
  61. package/dist/{chunk-ARORZ3MH.cjs → chunk-OFVBMS6I.cjs} +439 -333
  62. package/dist/{chunk-5MUFW5UU.cjs → chunk-OP7BIEUW.cjs} +2 -2
  63. package/dist/{chunk-I4WZRG73.mjs → chunk-RB5IGN3N.mjs} +13 -6
  64. package/dist/chunk-RJBUI5AN.mjs +18 -0
  65. package/dist/chunk-RQ6XX5IN.mjs +98 -0
  66. package/dist/{chunk-EJCVG25Z.mjs → chunk-S3R4JDRO.mjs} +17 -9
  67. package/dist/{chunk-WFVSAT7Y.cjs → chunk-T7HGXF7D.cjs} +3 -3
  68. package/dist/{chunk-HHQEKLZL.cjs → chunk-USMRAC72.cjs} +36 -31
  69. package/dist/{chunk-SM2SYWAR.cjs → chunk-XJDB564A.cjs} +18 -10
  70. package/dist/{chunk-EL2Z6YFZ.mjs → chunk-XLULEFRW.mjs} +180 -70
  71. package/dist/{chunk-6BPFIYGY.cjs → chunk-YU6VL7H5.cjs} +3 -3
  72. package/dist/{chunk-CD5Z7RR5.cjs → chunk-Z37PDUJR.cjs} +4 -4
  73. package/dist/{cli-runtime.d-Hnvvadz7.d.mts → cli-runtime.d-C7aMfoTq.d.mts} +8 -6
  74. package/dist/{cli-runtime.d-I0MphTbc.d.ts → cli-runtime.d-DaElKjaL.d.ts} +8 -6
  75. package/dist/{client-component.d-DapRqtSC.d.mts → client-component.d-DLMCzmUx.d.mts} +1 -1
  76. package/dist/{client-component.d-5QEvtJsg.d.ts → client-component.d-DLknFP8l.d.ts} +1 -1
  77. package/dist/{client-plugins.d-DcmDzcSC.d.ts → client-plugins.d-BVXjyIkY.d.ts} +14 -0
  78. package/dist/{client-plugins.d-C1WM3ieD.d.mts → client-plugins.d-BwKwuO_0.d.mts} +14 -0
  79. package/dist/client-plugins.d.mts +2 -1
  80. package/dist/client-plugins.d.ts +2 -1
  81. package/dist/client.cjs +4 -3
  82. package/dist/client.d.mts +10 -9
  83. package/dist/client.d.ts +10 -9
  84. package/dist/client.mjs +3 -2
  85. package/dist/config.d.mts +2 -1
  86. package/dist/config.d.ts +2 -1
  87. package/dist/desktop.d.mts +3 -2
  88. package/dist/desktop.d.ts +3 -2
  89. package/dist/{devtools-5B7NZE6F.cjs → devtools-4SVIRV4P.cjs} +7 -7
  90. package/dist/{devtools-C5GXZZ7E.mjs → devtools-MWQA5LVN.mjs} +5 -5
  91. package/dist/docs.cjs +10 -9
  92. package/dist/docs.d.mts +15 -6
  93. package/dist/docs.d.ts +15 -6
  94. package/dist/docs.mjs +9 -8
  95. package/dist/environment/vite.cjs +5 -5
  96. package/dist/environment/vite.d.mts +1 -0
  97. package/dist/environment/vite.d.ts +1 -0
  98. package/dist/environment/vite.mjs +4 -4
  99. package/dist/{generate-route-types.d-CaGMIaNI.d.mts → generate-route-types.d-BFOMM8Ef.d.mts} +3 -0
  100. package/dist/{generate-route-types.d-B76M5R11.d.ts → generate-route-types.d-C2m8myHb.d.ts} +3 -0
  101. package/dist/{handler.d-B8bPCBzl.d.mts → handler.d-BKTWzzNA.d.mts} +1 -1
  102. package/dist/{handler.d-Cliwo6Nu.d.ts → handler.d-Dzpyg3-N.d.ts} +1 -1
  103. package/dist/{headers.d-CVwSpSGX.d.mts → headers.d-5opjyhXw.d.mts} +1 -1
  104. package/dist/{headers.d-C_btqjV6.d.ts → headers.d-PZyXcDAH.d.ts} +1 -1
  105. package/dist/index.cjs +32 -29
  106. package/dist/{index.d-DFuMZk9-.d.mts → index.d-C0Mie66f.d.mts} +1 -1
  107. package/dist/{index.d-hOEbMcLk.d.ts → index.d-DV2q-0mE.d.ts} +1 -1
  108. package/dist/index.d.mts +26 -25
  109. package/dist/index.d.ts +26 -25
  110. package/dist/index.mjs +32 -29
  111. package/dist/integrations/orm.d.mts +2 -1
  112. package/dist/integrations/orm.d.ts +2 -1
  113. package/dist/integrations.d.mts +2 -1
  114. package/dist/integrations.d.ts +2 -1
  115. package/dist/internal/app-markdown-runtime.d.mts +3 -2
  116. package/dist/internal/app-markdown-runtime.d.ts +3 -2
  117. package/dist/internal/build-runtime.cjs +28 -27
  118. package/dist/internal/build-runtime.d.mts +5 -4
  119. package/dist/internal/build-runtime.d.ts +5 -4
  120. package/dist/internal/build-runtime.mjs +27 -26
  121. package/dist/internal/cli-runtime.cjs +9 -9
  122. package/dist/internal/cli-runtime.d.mts +8 -7
  123. package/dist/internal/cli-runtime.d.ts +8 -7
  124. package/dist/internal/cli-runtime.mjs +8 -8
  125. package/dist/internal/client-error-overlay.cjs +4 -4
  126. package/dist/internal/client-error-overlay.mjs +1 -1
  127. package/dist/internal/client-runtime.d.mts +8 -42
  128. package/dist/internal/client-runtime.d.ts +8 -42
  129. package/dist/internal/compression-runtime.d.mts +2 -1
  130. package/dist/internal/compression-runtime.d.ts +2 -1
  131. package/dist/internal/config-runtime.cjs +7 -7
  132. package/dist/internal/config-runtime.d.mts +6 -5
  133. package/dist/internal/config-runtime.d.ts +6 -5
  134. package/dist/internal/config-runtime.mjs +6 -6
  135. package/dist/internal/infra-analytics-runtime.cjs +6 -6
  136. package/dist/internal/infra-analytics-runtime.mjs +4 -4
  137. package/dist/internal/islands-action-client.cjs +18 -0
  138. package/dist/internal/islands-action-client.d.mts +18 -0
  139. package/dist/internal/islands-action-client.d.ts +18 -0
  140. package/dist/internal/islands-action-client.mjs +18 -0
  141. package/dist/internal/islands-runtime.cjs +3 -8
  142. package/dist/internal/islands-runtime.mjs +4 -9
  143. package/dist/internal/islx-actions-client.cjs +4 -3
  144. package/dist/internal/islx-actions-client.mjs +3 -2
  145. package/dist/internal/islx-actions-server.d.mts +0 -2
  146. package/dist/internal/islx-actions-server.d.ts +0 -2
  147. package/dist/internal/islx-client.cjs +13 -1
  148. package/dist/internal/islx-client.d.mts +11 -0
  149. package/dist/internal/islx-client.d.ts +11 -0
  150. package/dist/internal/islx-client.mjs +14 -0
  151. package/dist/internal/metadata-image-runtime.d.mts +1 -0
  152. package/dist/internal/metadata-image-runtime.d.ts +1 -0
  153. package/dist/internal/native-server-fns.cjs +4 -4
  154. package/dist/internal/native-server-fns.mjs +3 -3
  155. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  156. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  157. package/dist/internal/production-runtime.cjs +13 -13
  158. package/dist/internal/production-runtime.d.mts +11 -11
  159. package/dist/internal/production-runtime.d.ts +11 -11
  160. package/dist/internal/production-runtime.mjs +19 -19
  161. package/dist/internal/renderer-islands.cjs +47 -0
  162. package/dist/internal/renderer-islands.d.mts +32 -0
  163. package/dist/internal/renderer-islands.d.ts +32 -0
  164. package/dist/internal/renderer-islands.mjs +47 -0
  165. package/dist/internal/spa-router.d.mts +3 -3
  166. package/dist/internal/spa-router.d.ts +3 -3
  167. package/dist/internal/start-manifest.d.mts +2 -1
  168. package/dist/internal/start-manifest.d.ts +2 -1
  169. package/dist/island-runtime.d-BA7EPo1v.d.ts +38 -0
  170. package/dist/island-runtime.d-BBS_YUSX.d.mts +38 -0
  171. package/dist/markdown.d.mts +2 -1
  172. package/dist/markdown.d.ts +2 -1
  173. package/dist/middleware.d.mts +2 -1
  174. package/dist/middleware.d.ts +2 -1
  175. package/dist/mobile.d.mts +6 -3
  176. package/dist/mobile.d.ts +6 -3
  177. package/dist/{mount.d-DLeYxeRR.d.mts → mount.d-CZ_qL1iS.d.mts} +1 -1
  178. package/dist/{mount.d-CAovYKfs.d.ts → mount.d-gWul1GA1.d.ts} +1 -1
  179. package/dist/{navigation-delegate.d-Chv93QS6.d.mts → navigation-delegate.d-BBTzhJLj.d.mts} +1 -1
  180. package/dist/{navigation-delegate.d-BLM-8Q3Z.d.ts → navigation-delegate.d-BZsYEAet.d.ts} +1 -1
  181. package/dist/navigation.d.mts +5 -5
  182. package/dist/navigation.d.ts +5 -5
  183. package/dist/plugin.cjs +23 -22
  184. package/dist/plugin.d.mts +6 -6
  185. package/dist/plugin.d.ts +6 -6
  186. package/dist/plugin.mjs +22 -21
  187. package/dist/{render-plan.d-BSTjTH8h.d.ts → render-plan.d-AaJsYPX-.d.ts} +1 -1
  188. package/dist/{render-plan.d-CK5Lggyb.d.mts → render-plan.d-bnWxS12w.d.mts} +1 -1
  189. package/dist/renderer-client.cjs +6 -5
  190. package/dist/renderer-client.d.mts +8 -7
  191. package/dist/renderer-client.d.ts +8 -7
  192. package/dist/renderer-client.mjs +2 -1
  193. package/dist/renderer.cjs +12 -2
  194. package/dist/renderer.d.mts +167 -4
  195. package/dist/renderer.d.ts +167 -4
  196. package/dist/renderer.mjs +11 -1
  197. package/dist/{request.d-BhggxQf3.d.mts → request.d-C2HOn3Hi.d.mts} +1 -1
  198. package/dist/{request.d-CyJS9bjm.d.ts → request.d-CAeitOG1.d.ts} +1 -1
  199. package/dist/request.d.mts +3 -2
  200. package/dist/request.d.ts +3 -2
  201. package/dist/{route-rendering.d-BLPPmI5I.d.ts → route-rendering.d-A1dIkUK5.d.ts} +1 -1
  202. package/dist/{route-rendering.d-CUpG2mZJ.d.mts → route-rendering.d-CYA-ulnX.d.mts} +1 -1
  203. package/dist/{router.d-2NQM1Kgw.d.mts → router.d-8lxnzlkr.d.mts} +1 -1
  204. package/dist/{router.d-0X2Ki6rf.d.ts → router.d-A_Yt6jYz.d.ts} +1 -1
  205. package/dist/{routes.d-CCccJRrp.d.mts → routes.d-BWvpUoYu.d.mts} +1 -1
  206. package/dist/{routes.d-b7khoRoU.d.ts → routes.d-D7RWvfqL.d.ts} +1 -1
  207. package/dist/routes.d.mts +2 -1
  208. package/dist/routes.d.ts +2 -1
  209. package/dist/{rsc-pipeline-5AOF64FL.cjs → rsc-pipeline-OWBEZ7HB.cjs} +10 -10
  210. package/dist/{rsc-pipeline-DNRLYOJ7.mjs → rsc-pipeline-UT3Z2GDO.mjs} +9 -9
  211. package/dist/{runtime-EHG2FRXZ.mjs → runtime-F5I3WY3B.mjs} +12 -12
  212. package/dist/{runtime-ZVHG5SRB.cjs → runtime-SRMQ46SK.cjs} +15 -15
  213. package/dist/{runtime.d-CXuwkUgr.d.ts → runtime.d-BPyvWrgQ.d.ts} +1 -1
  214. package/dist/{runtime.d-CaFXcu_Q.d.mts → runtime.d-C_rZ9_DD.d.mts} +1 -1
  215. package/dist/{server-components-status.d-Cp7zvBm5.d.mts → server-components-status.d-BpxiEMQE.d.mts} +1 -1
  216. package/dist/{server-components-status.d-BdeFD8ZH.d.ts → server-components-status.d-C2UEKJn7.d.ts} +1 -1
  217. package/dist/server-plugins.d.mts +4 -3
  218. package/dist/server-plugins.d.ts +4 -3
  219. package/dist/server-query-call.d-rVM_lsYk.d.mts +15 -0
  220. package/dist/server-query-call.d-rVM_lsYk.d.ts +15 -0
  221. package/dist/server-query-client.cjs +5 -3
  222. package/dist/server-query-client.d.mts +3 -2
  223. package/dist/server-query-client.d.ts +3 -2
  224. package/dist/server-query-client.mjs +5 -3
  225. package/dist/{server-query-runtime.d-DXRNhX_3.d.ts → server-query-runtime.d-BlHd90D0.d.ts} +2 -8
  226. package/dist/{server-query-runtime.d-aP52iuL5.d.mts → server-query-runtime.d-CCLGkQtE.d.mts} +2 -8
  227. package/dist/server.cjs +52 -52
  228. package/dist/server.d.mts +12 -12
  229. package/dist/server.d.ts +12 -12
  230. package/dist/server.mjs +30 -30
  231. package/dist/{spa-router.d-l3G38xHa.d.mts → spa-router.d-BD-6WX1R.d.mts} +2 -2
  232. package/dist/{spa-router.d-Bjgl-Osi.d.ts → spa-router.d-Cw5i_15e.d.ts} +2 -2
  233. package/dist/{ssg.d-DDca17Lc.d.ts → ssg.d-Bifiq0EL.d.ts} +2 -2
  234. package/dist/{ssg.d-RnlHOqUL.d.mts → ssg.d-CCE9aob5.d.mts} +2 -2
  235. package/dist/{store-core.d-BaOUOPf7.d.ts → store-core.d-5tVn5vi1.d.ts} +3 -3
  236. package/dist/{store-core.d-BZjuC6Zc.d.mts → store-core.d-BN2MxSG9.d.mts} +3 -3
  237. package/dist/testing.d.mts +2 -1
  238. package/dist/testing.d.ts +2 -1
  239. package/dist/{utils.d-D8TWmpWo.d.ts → utils.d-BUjpSNIO.d.ts} +1 -1
  240. package/dist/{utils.d-tdzw0_zQ.d.mts → utils.d-wGPLeVbq.d.mts} +1 -1
  241. package/dist/version.cjs +2 -2
  242. package/dist/version.mjs +1 -1
  243. package/dist/vite.cjs +23 -22
  244. package/dist/vite.d.mts +12 -6
  245. package/dist/vite.d.ts +12 -6
  246. package/dist/vite.mjs +22 -21
  247. package/package.json +13 -3
  248. package/dist/analyzer-LV23T6QN.cjs +0 -17
  249. package/dist/chunk-4QENVMG7.mjs +0 -34
  250. package/dist/chunk-AUFEM3FB.mjs +0 -229
  251. package/dist/chunk-S7WZUK3B.cjs +0 -229
  252. package/dist/{chunk-NEKO3HM2.cjs → chunk-4B6YJ5DS.cjs} +2 -2
  253. package/dist/{chunk-CA2HBLXP.mjs → chunk-4EEAPBNV.mjs} +3 -3
@@ -43,7 +43,7 @@ var _chunkRDADQG5Scjs = require('./chunk-RDADQG5S.cjs');
43
43
 
44
44
 
45
45
 
46
- var _chunkARORZ3MHcjs = require('./chunk-ARORZ3MH.cjs');
46
+ var _chunkOFVBMS6Icjs = require('./chunk-OFVBMS6I.cjs');
47
47
 
48
48
 
49
49
 
@@ -54,26 +54,29 @@ var _chunkDMSXZNQRcjs = require('./chunk-DMSXZNQR.cjs');
54
54
  var _chunkVACYUMXWcjs = require('./chunk-VACYUMXW.cjs');
55
55
 
56
56
 
57
+ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
57
58
 
58
- var _chunkVMBIKDKWcjs = require('./chunk-VMBIKDKW.cjs');
59
59
 
60
60
 
61
- var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
61
+ var _chunkL3BSHASBcjs = require('./chunk-L3BSHASB.cjs');
62
62
 
63
63
 
64
+ var _chunkMAPHNGTFcjs = require('./chunk-MAPHNGTF.cjs');
64
65
 
65
66
 
67
+ var _chunkZ37PDUJRcjs = require('./chunk-Z37PDUJR.cjs');
66
68
 
67
69
 
68
70
 
69
71
 
70
- var _chunkNEKO3HM2cjs = require('./chunk-NEKO3HM2.cjs');
71
72
 
72
73
 
73
- var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
74
74
 
75
75
 
76
- var _chunkCD5Z7RR5cjs = require('./chunk-CD5Z7RR5.cjs');
76
+ var _chunk4B6YJ5DScjs = require('./chunk-4B6YJ5DS.cjs');
77
+
78
+
79
+ var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
77
80
 
78
81
 
79
82
 
@@ -88,13 +91,13 @@ var _chunkCD5Z7RR5cjs = require('./chunk-CD5Z7RR5.cjs');
88
91
 
89
92
 
90
93
 
91
- var _chunkB2PGVHBGcjs = require('./chunk-B2PGVHBG.cjs');
94
+ var _chunk22BTYPIXcjs = require('./chunk-22BTYPIX.cjs');
92
95
 
93
96
 
94
97
  var _chunkW53Z4WDIcjs = require('./chunk-W53Z4WDI.cjs');
95
98
 
96
99
 
97
- var _chunkRMPUEH5Tcjs = require('./chunk-RMPUEH5T.cjs');
100
+ var _chunk57EEWWUScjs = require('./chunk-57EEWWUS.cjs');
98
101
 
99
102
 
100
103
 
@@ -145,18 +148,20 @@ var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
145
148
 
146
149
 
147
150
 
148
- var _chunkDRO3NXA3cjs = require('./chunk-DRO3NXA3.cjs');
151
+ var _chunkEBSL5TW7cjs = require('./chunk-EBSL5TW7.cjs');
149
152
 
150
153
 
151
154
 
152
- var _chunkSM2SYWARcjs = require('./chunk-SM2SYWAR.cjs');
155
+ var _chunkXJDB564Acjs = require('./chunk-XJDB564A.cjs');
153
156
 
154
157
 
155
158
 
156
159
  var _chunkERMUL73Lcjs = require('./chunk-ERMUL73L.cjs');
157
160
 
158
161
 
159
- var _chunkUVV3I5QAcjs = require('./chunk-UVV3I5QA.cjs');
162
+
163
+
164
+ var _chunkL2GUEYHRcjs = require('./chunk-L2GUEYHR.cjs');
160
165
 
161
166
 
162
167
  var _chunkIIHZ2BEEcjs = require('./chunk-IIHZ2BEE.cjs');
@@ -175,9 +180,6 @@ var _chunkEACD6ND7cjs = require('./chunk-EACD6ND7.cjs');
175
180
  var _chunkOLKYHTLNcjs = require('./chunk-OLKYHTLN.cjs');
176
181
 
177
182
 
178
- var _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
179
-
180
-
181
183
 
182
184
 
183
185
  var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
@@ -190,7 +192,8 @@ var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
190
192
 
191
193
 
192
194
 
193
- var _chunkBCTHOQPPcjs = require('./chunk-BCTHOQPP.cjs');
195
+
196
+ var _chunk3OKSEJ33cjs = require('./chunk-3OKSEJ33.cjs');
194
197
 
195
198
 
196
199
 
@@ -310,7 +313,7 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
310
313
  var _chunkPLJMEUANcjs = require('./chunk-PLJMEUAN.cjs');
311
314
 
312
315
 
313
- var _chunkJK26IMT7cjs = require('./chunk-JK26IMT7.cjs');
316
+ var _chunkCVZY4TLWcjs = require('./chunk-CVZY4TLW.cjs');
314
317
 
315
318
 
316
319
  var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
@@ -711,7 +714,7 @@ function findClientServerFnViolation(code, id) {
711
714
  return null;
712
715
  }
713
716
  function createServerFnBoundaryDiagnostic(violation, id, location) {
714
- return _chunkDRO3NXA3cjs.createFarmDiagnostic.call(void 0,
717
+ return _chunkEBSL5TW7cjs.createFarmDiagnostic.call(void 0,
715
718
  "CLIENT_SERVER_FUNCTION",
716
719
  id,
717
720
  `${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.`,
@@ -970,21 +973,21 @@ function readPropertyKey(property) {
970
973
  function createClientBoundaryDiagnostic(file, finding, location) {
971
974
  switch (finding.kind) {
972
975
  case "server-env":
973
- return _chunkDRO3NXA3cjs.createFarmDiagnostic.call(void 0,
976
+ return _chunkEBSL5TW7cjs.createFarmDiagnostic.call(void 0,
974
977
  "CLIENT_SERVER_ENV",
975
978
  file,
976
979
  `process.env.${finding.name} is read at module scope in a module compiled for the browser, where it is undefined.`,
977
980
  location
978
981
  );
979
982
  case "public-env":
980
- return _chunkDRO3NXA3cjs.createFarmDiagnostic.call(void 0,
983
+ return _chunkEBSL5TW7cjs.createFarmDiagnostic.call(void 0,
981
984
  "CLIENT_PROCESS_ENV_PUBLIC",
982
985
  file,
983
986
  `process.env.${finding.name} is declared public, but process.env is not populated in the browser, so this module-scope read is undefined there.`,
984
987
  location
985
988
  );
986
989
  case "builtin":
987
- return _chunkDRO3NXA3cjs.createFarmDiagnostic.call(void 0,
990
+ return _chunkEBSL5TW7cjs.createFarmDiagnostic.call(void 0,
988
991
  "CLIENT_NODE_BUILTIN",
989
992
  file,
990
993
  `"${finding.name}" is imported into a module compiled for the browser, which gets a stub whose exports without a Web API equivalent are undefined.`,
@@ -1286,7 +1289,7 @@ function loadFarmWorkflowsDevRuntime() {
1286
1289
  return import("./workflows.cjs");
1287
1290
  }
1288
1291
  function loadFarmDevtoolsSnapshotRuntime() {
1289
- return import("./devtools-5B7NZE6F.cjs");
1292
+ return import("./devtools-4SVIRV4P.cjs");
1290
1293
  }
1291
1294
  function loadFarmDevtoolsUIRuntime() {
1292
1295
  return import("./devtools-ui-C2EMF2SO.cjs");
@@ -1311,7 +1314,7 @@ function farmI18nClientBridgePlugin() {
1311
1314
  };
1312
1315
  }
1313
1316
  function farmNavigationPlugin(renderer) {
1314
- const otherRenderer = !_chunkBCTHOQPPcjs.isFarmRendererDisabled.call(void 0, renderer) && !_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer || void 0) && _optionalChain([(renderer || void 0), 'optionalAccess', _69 => _69.name]) !== "preact";
1317
+ const otherRenderer = !_chunk3OKSEJ33cjs.isFarmRendererDisabled.call(void 0, renderer) && !_chunk3OKSEJ33cjs.isReactRenderer.call(void 0, renderer || void 0) && _optionalChain([(renderer || void 0), 'optionalAccess', _69 => _69.name]) !== "preact";
1315
1318
  return {
1316
1319
  name: "farm:navigation",
1317
1320
  config() {
@@ -1336,16 +1339,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
1336
1339
  var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
1337
1340
  var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
1338
1341
  var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
1339
- _chunkARORZ3MHcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1340
- new RegExp(`^${_chunkDRO3NXA3cjs.FARM_RESOLVE_FROM_PREFIX}`),
1342
+ _chunkOFVBMS6Icjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1343
+ new RegExp(`^${_chunkEBSL5TW7cjs.FARM_RESOLVE_FROM_PREFIX}`),
1341
1344
  // What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
1342
1345
  // included.
1343
1346
  /^node:/,
1344
- _chunkARORZ3MHcjs.exactIdPattern.call(void 0, _module.builtinModules)
1347
+ _chunkOFVBMS6Icjs.exactIdPattern.call(void 0, _module.builtinModules)
1345
1348
  ];
1346
1349
  var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
1347
- _chunkARORZ3MHcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1348
- new RegExp(`^${_chunkDRO3NXA3cjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1350
+ _chunkOFVBMS6Icjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1351
+ new RegExp(`^${_chunkEBSL5TW7cjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1349
1352
  ];
1350
1353
  function createFarmPlatformClientModule(platform) {
1351
1354
  return `export function platform() { return ${JSON.stringify(platform)}; }
@@ -1375,24 +1378,24 @@ function farmIslandContainersPlugin(config) {
1375
1378
  root = config.root || resolved.root;
1376
1379
  },
1377
1380
  transform(code, id) {
1378
- if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _70 => _70.experimental, 'optionalAccess', _71 => _71.serverComponents])) !== "islands") {
1381
+ if (_chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _70 => _70.experimental, 'optionalAccess', _71 => _71.serverComponents])) !== "islands") {
1379
1382
  return null;
1380
1383
  }
1381
1384
  if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
1382
1385
  return null;
1383
1386
  }
1384
- if (_chunkDRO3NXA3cjs.hasUseClientDirective.call(void 0, code)) return null;
1387
+ if (_chunkEBSL5TW7cjs.hasUseClientDirective.call(void 0, code)) return null;
1385
1388
  const file = id.split("?", 1)[0];
1386
- const bindings = _chunkDRO3NXA3cjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1389
+ const bindings = _chunkEBSL5TW7cjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1387
1390
  if (bindings.length === 0) return null;
1388
- const grown = _chunkDRO3NXA3cjs.wrapFarmIslandContainers.call(void 0, {
1391
+ const grown = _chunkEBSL5TW7cjs.wrapFarmIslandContainers.call(void 0, {
1389
1392
  code,
1390
1393
  file,
1391
1394
  bindings,
1392
- reference: _chunkDRO3NXA3cjs.farmIslandContainerReferencePath.call(void 0, root)
1395
+ reference: _chunkEBSL5TW7cjs.farmIslandContainerReferencePath.call(void 0, root)
1393
1396
  });
1394
1397
  if (grown === null) return null;
1395
- _chunkDRO3NXA3cjs.ensureFarmIslandContainerReference.call(void 0, root);
1398
+ _chunkEBSL5TW7cjs.ensureFarmIslandContainerReference.call(void 0, root);
1396
1399
  return { code: grown, map: null };
1397
1400
  }
1398
1401
  };
@@ -1406,15 +1409,15 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1406
1409
  config(config) {
1407
1410
  const appRoot = path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())));
1408
1411
  if (options.distDir) {
1409
- _chunkDRO3NXA3cjs.usePackageScanCacheFile.call(void 0,
1412
+ _chunkEBSL5TW7cjs.usePackageScanCacheFile.call(void 0,
1410
1413
  path6.resolve(appRoot, options.distDir, "cache", "package-scans.json")
1411
1414
  );
1412
1415
  }
1413
- const bundledPackages = _chunkDRO3NXA3cjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1416
+ const bundledPackages = _chunkEBSL5TW7cjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1414
1417
  const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
1415
- _chunkDRO3NXA3cjs.persistPackageScanCache.call(void 0, );
1418
+ _chunkEBSL5TW7cjs.persistPackageScanCache.call(void 0, );
1416
1419
  return {
1417
- optimizeDeps: { rolldownOptions: { plugins: [_chunkDRO3NXA3cjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
1420
+ optimizeDeps: { rolldownOptions: { plugins: [_chunkEBSL5TW7cjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
1418
1421
  ssr: {
1419
1422
  noExternal: [
1420
1423
  // Resolve `server-only` here rather than in Node, which would load its throwing build.
@@ -1438,8 +1441,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1438
1441
  return FARM_SERVER_ONLY_PACKAGE_ID;
1439
1442
  }
1440
1443
  this.error(
1441
- _chunkDRO3NXA3cjs.formatFarmDiagnostic.call(void 0,
1442
- _chunkDRO3NXA3cjs.createFarmDiagnostic.call(void 0,
1444
+ _chunkEBSL5TW7cjs.formatFarmDiagnostic.call(void 0,
1445
+ _chunkEBSL5TW7cjs.createFarmDiagnostic.call(void 0,
1443
1446
  "CLIENT_SERVER_ONLY_IMPORT",
1444
1447
  _nullishCoalesce(importer, () => ( "<unknown module>")),
1445
1448
  `${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
@@ -1449,9 +1452,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1449
1452
  );
1450
1453
  }
1451
1454
  if (!_optionalChain([options2, 'optionalAccess', _75 => _75.ssr]) && _module.isBuiltin.call(void 0, id)) {
1452
- return _chunkDRO3NXA3cjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1455
+ return _chunkEBSL5TW7cjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1453
1456
  }
1454
- const resolveFrom = importer ? _chunkDRO3NXA3cjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1457
+ const resolveFrom = importer ? _chunkEBSL5TW7cjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1455
1458
  if (resolveFrom) {
1456
1459
  const directory = path6.dirname(resolveFrom.importer);
1457
1460
  return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
@@ -1468,8 +1471,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1468
1471
  const importedBy = importer ? ` (imported by ${importer})` : "";
1469
1472
  if (!_optionalChain([options2, 'optionalAccess', _76 => _76.ssr])) {
1470
1473
  this.error(
1471
- _chunkDRO3NXA3cjs.formatFarmDiagnostic.call(void 0,
1472
- _chunkDRO3NXA3cjs.createFarmDiagnostic.call(void 0,
1474
+ _chunkEBSL5TW7cjs.formatFarmDiagnostic.call(void 0,
1475
+ _chunkEBSL5TW7cjs.createFarmDiagnostic.call(void 0,
1473
1476
  "CLIENT_SERVER_ONLY_ENTRY",
1474
1477
  _nullishCoalesce(importer, () => ( id)),
1475
1478
  `${id} is server-only and cannot be imported into client code.`
@@ -1494,7 +1497,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1494
1497
  if (id === FARM_PLATFORM_CLIENT_ID) {
1495
1498
  return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))));
1496
1499
  }
1497
- return _nullishCoalesce(_chunkDRO3NXA3cjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1500
+ return _nullishCoalesce(_chunkEBSL5TW7cjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1498
1501
  }
1499
1502
  }
1500
1503
  };
@@ -1527,7 +1530,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
1527
1530
  if (!snapshot) return "";
1528
1531
  const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
1529
1532
  if (snapshot.routing === "none") return runtime;
1530
- return `${_chunkNEKO3HM2cjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1533
+ return `${_chunk4B6YJ5DScjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1531
1534
  }
1532
1535
  function getPublicEnvDefine(config) {
1533
1536
  const publicEnv = _optionalChain([config, 'access', _77 => _77.env, 'optionalAccess', _78 => _78.public]);
@@ -1975,7 +1978,7 @@ function getEnvDefines(config, configEnv) {
1975
1978
  _chunkMCSRMEQVcjs.getPublicFarmImageConfig.call(void 0,
1976
1979
  _chunkMCSRMEQVcjs.resolveFarmImageConfig.call(void 0,
1977
1980
  config.images,
1978
- _chunkBCTHOQPPcjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
1981
+ _chunk3OKSEJ33cjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
1979
1982
  )
1980
1983
  )
1981
1984
  )
@@ -2108,7 +2111,7 @@ function transformIsolatedClientBoundaryModule(options) {
2108
2111
  return null;
2109
2112
  }
2110
2113
  const body = Array.isArray(ast.body) ? ast.body : [];
2111
- const everyExportIsComponent = options.code.includes(_chunkDRO3NXA3cjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkDRO3NXA3cjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2114
+ const everyExportIsComponent = options.code.includes(_chunkEBSL5TW7cjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkEBSL5TW7cjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2112
2115
  const replacements = [];
2113
2116
  const wrapperStatements = [];
2114
2117
  const originalEntries = [];
@@ -2118,7 +2121,7 @@ function transformIsolatedClientBoundaryModule(options) {
2118
2121
  const wrapperName = `__farm_isolated_boundary_${safeName || "default"}__`;
2119
2122
  wrapperStatements.push(
2120
2123
  // Islands mode renders through islx; the older isolated hydration keeps Farm's boundary.
2121
- options.slots && options.inferredInteraction ? `const ${wrapperName} = __farm_islx_island__(${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, "interaction", { inferred: true });` : options.slots ? `const ${wrapperName} = __farm_islx_island__(${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, ${JSON.stringify(options.islandStrategy)});` : `const ${wrapperName} = __farm_create_isolated_boundary__(__farm_isolated_react__, ${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, ${JSON.stringify(options.islandStrategy)});`
2124
+ options.withIsland ? `const ${wrapperName} = __farm_with_island__(${localName}, { src: ${JSON.stringify(options.moduleReference)}, export: ${JSON.stringify(exportName)}, strategy: ${JSON.stringify(options.islandStrategy)} });` : options.slots && options.inferredInteraction ? `const ${wrapperName} = __farm_islx_island__(${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, "interaction", { inferred: true });` : options.slots ? `const ${wrapperName} = __farm_islx_island__(${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, ${JSON.stringify(options.islandStrategy)});` : `const ${wrapperName} = __farm_create_isolated_boundary__(__farm_isolated_react__, ${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, ${JSON.stringify(options.islandStrategy)});`
2122
2125
  );
2123
2126
  wrapperStatements.push(
2124
2127
  isDefault ? `export default ${wrapperName};` : `export { ${wrapperName} as ${exportName} };`
@@ -2206,7 +2209,11 @@ function transformIsolatedClientBoundaryModule(options) {
2206
2209
  output = output.slice(0, replacement.start) + replacement.code + output.slice(replacement.end);
2207
2210
  }
2208
2211
  const isComponent = `(value) => typeof value === "function" || (typeof value === "object" && value !== null && [Symbol.for("react.memo"), Symbol.for("react.forward_ref"), Symbol.for("react.lazy")].includes(value.$$typeof))`;
2209
- const runtimeImport = options.slots ? options.browser ? "const __farm_islx_island__ = (component) => component;" : `import { createIsland as __farm_islx_create_island__ } from ${islxReact};
2212
+ const runtimeImport = options.withIsland ? (
2213
+ // The renderer's withIsland returns a value that isn't one of its components unchanged.
2214
+ `import { withIsland as __farm_renderer_with_island__ } from ${JSON.stringify(options.withIsland)};
2215
+ const __farm_with_island__ = (component, reference) => component !== null && (typeof component === "function" || typeof component === "object") ? __farm_renderer_with_island__(component, reference) : component;`
2216
+ ) : options.slots ? options.browser ? "const __farm_islx_island__ = (component) => component;" : `import { createIsland as __farm_islx_create_island__ } from ${islxReact};
2210
2217
  const __farm_is_component__ = ${isComponent};
2211
2218
  const __farm_islx_island__ = (component, ...rest) => __farm_is_component__(component) ? __farm_islx_create_island__(component, ...rest) : component;` : `import * as __farm_isolated_react__ from "react";
2212
2219
  import { createFarmIsolatedClientBoundary as __farm_create_boundary__ } from ${isolatedBoundary};
@@ -2259,16 +2266,16 @@ async function warnClientBoundaryOnce(context, id, code, config) {
2259
2266
  for (const finding of analyzeClientBoundary(program, publicKeys)) {
2260
2267
  if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
2261
2268
  const resolved = await context.resolve(finding.name, id).catch(() => null);
2262
- if (!_optionalChain([resolved, 'optionalAccess', _103 => _103.id, 'access', _104 => _104.startsWith, 'call', _105 => _105(_chunkDRO3NXA3cjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2269
+ if (!_optionalChain([resolved, 'optionalAccess', _103 => _103.id, 'access', _104 => _104.startsWith, 'call', _105 => _105(_chunkEBSL5TW7cjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2263
2270
  }
2264
2271
  findings.push(finding);
2265
2272
  }
2266
2273
  if (findings.length === 0) return;
2267
2274
  warnedClientBoundaryIds.add(id);
2268
- const locate = _chunkDRO3NXA3cjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2275
+ const locate = _chunkEBSL5TW7cjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2269
2276
  _chunk7U4XF76Rcjs.logger.warn(
2270
2277
  findings.map(
2271
- (finding) => _chunkDRO3NXA3cjs.formatFarmDiagnostic.call(void 0,
2278
+ (finding) => _chunkEBSL5TW7cjs.formatFarmDiagnostic.call(void 0,
2272
2279
  createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
2273
2280
  config.root
2274
2281
  )
@@ -2285,7 +2292,7 @@ function isFarmAppRuntimeFile(file, appDirs, routeModuleExtensions) {
2285
2292
  );
2286
2293
  }
2287
2294
  function shouldEmitFarmClientRootHmr(renderer) {
2288
- return _chunkBCTHOQPPcjs.getFarmRendererCapabilities.call(void 0, _chunkBCTHOQPPcjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
2295
+ return _chunk3OKSEJ33cjs.getFarmRendererCapabilities.call(void 0, _chunk3OKSEJ33cjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
2289
2296
  }
2290
2297
  var FARM_RUNTIME_MODULE_PREFIX = "/@farm/runtime/";
2291
2298
  function toFarmRuntimeModuleId(specifier) {
@@ -2316,9 +2323,9 @@ function hasFarmSourceAliasOverride(alias) {
2316
2323
  );
2317
2324
  }
2318
2325
  function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2319
- const rendererDisabled = _chunkBCTHOQPPcjs.isFarmRendererDisabled.call(void 0, options.renderer);
2326
+ const rendererDisabled = _chunk3OKSEJ33cjs.isFarmRendererDisabled.call(void 0, options.renderer);
2320
2327
  const imageImports = farmImageImportsPlugin();
2321
- const fontImports = _chunkARORZ3MHcjs.farmFontImportsPlugin.call(void 0, {
2328
+ const fontImports = _chunkOFVBMS6Icjs.farmFontImportsPlugin.call(void 0, {
2322
2329
  root: options.root,
2323
2330
  basePath: options.basePath,
2324
2331
  publicDir: options.publicDir
@@ -2352,8 +2359,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2352
2359
  if (mdxComponents) files.add(mdxComponents);
2353
2360
  return files;
2354
2361
  };
2355
- const islxActionsMode = () => _chunkARORZ3MHcjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _111 => _111.getConfig, 'call', _112 => _112()]), () => ( options)));
2356
- const islandsServerFns = () => _chunkARORZ3MHcjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _113 => _113.getConfig, 'call', _114 => _114()]), () => ( options)));
2362
+ const islxActionsMode = () => _chunkOFVBMS6Icjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _111 => _111.getConfig, 'call', _112 => _112()]), () => ( options)));
2363
+ const islandsServerFns = () => _chunkOFVBMS6Icjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _113 => _113.getConfig, 'call', _114 => _114()]), () => ( options)));
2357
2364
  let reactRefreshActive = false;
2358
2365
  let server;
2359
2366
  let deferredGates;
@@ -2396,11 +2403,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2396
2403
  isBuild = configEnv.command === "build";
2397
2404
  const farmAliases = {
2398
2405
  ..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, options.layers),
2399
- ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _124 => _124.resolve, 'optionalAccess', _125 => _125.alias])) ? {} : _chunkARORZ3MHcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2406
+ ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _124 => _124.resolve, 'optionalAccess', _125 => _125.alias])) ? {} : _chunkOFVBMS6Icjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2400
2407
  };
2401
2408
  if (Object.keys(farmAliases).length > 0) {
2402
2409
  _nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
2403
- userConfig.resolve.alias = _chunkARORZ3MHcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2410
+ userConfig.resolve.alias = _chunkOFVBMS6Icjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2404
2411
  }
2405
2412
  const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
2406
2413
  farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _126 => _126.server, 'optionalAccess', _127 => _127.cors]) === void 0;
@@ -2474,7 +2481,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2474
2481
  } catch (e21) {
2475
2482
  }
2476
2483
  };
2477
- farmApp = new (0, _chunkARORZ3MHcjs.FarmApp)(
2484
+ farmApp = new (0, _chunkOFVBMS6Icjs.FarmApp)(
2478
2485
  {
2479
2486
  ...options,
2480
2487
  root: resolveDevelopmentRoot(options.root, server.config.root)
@@ -2482,7 +2489,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2482
2489
  server
2483
2490
  );
2484
2491
  farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
2485
- _chunkDRO3NXA3cjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2492
+ _chunkEBSL5TW7cjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2486
2493
  farmApp.getConfig().root,
2487
2494
  options.distDir || ".farm"
2488
2495
  )
@@ -2493,7 +2500,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2493
2500
  let farmAppPackages;
2494
2501
  if (_optionalChain([farmConfig, 'access', _149 => _149.agent, 'optionalAccess', _150 => _150.noindexPreviews])) {
2495
2502
  farmMiddlewares.use((_req, res, next) => {
2496
- if (_chunkRMPUEH5Tcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2503
+ if (_chunk57EEWWUScjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2497
2504
  res.setHeader("X-Robots-Tag", _chunkEACD6ND7cjs.FARM_PREVIEW_ROBOTS_TAG);
2498
2505
  }
2499
2506
  next();
@@ -2501,7 +2508,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2501
2508
  }
2502
2509
  const apiServerBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
2503
2510
  const devBuiltInRoutePaths = new Set(
2504
- _chunkB2PGVHBGcjs.listFarmBuiltInRoutePaths.call(void 0, {
2511
+ _chunk22BTYPIXcjs.listFarmBuiltInRoutePaths.call(void 0, {
2505
2512
  agent: {
2506
2513
  apiCatalog: true,
2507
2514
  mcp: true,
@@ -2551,7 +2558,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2551
2558
  );
2552
2559
  const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
2553
2560
  try {
2554
- const result = await _chunkVMBIKDKWcjs.generateFarmTypeArtifacts.call(void 0, {
2561
+ const result = await _chunkL3BSHASBcjs.generateFarmTypeArtifacts.call(void 0, {
2555
2562
  root: farmConfig.root,
2556
2563
  srcDir: farmConfig.srcDir,
2557
2564
  layers: farmConfig.layers,
@@ -2560,6 +2567,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2560
2567
  extraRoutes: getExtraRouteTypes(),
2561
2568
  suppressLintOnLink: farmConfig.suppressLintOnLink,
2562
2569
  componentExtensions: farmConfig.renderer.componentExtensions,
2570
+ renderer: farmConfig.renderer,
2563
2571
  i18nConfig: farmConfig.i18n,
2564
2572
  ...selection
2565
2573
  });
@@ -2595,7 +2603,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2595
2603
  farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _158 => _158.configFile, 'optionalAccess', _159 => _159.replace, 'call', _160 => _160(/\\/g, "/")])).filter((file) => Boolean(file))
2596
2604
  );
2597
2605
  const routeModuleExtensions = /* @__PURE__ */ new Set([
2598
- ..._chunkBCTHOQPPcjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
2606
+ ..._chunk3OKSEJ33cjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
2599
2607
  ".md",
2600
2608
  ".mdx"
2601
2609
  ]);
@@ -2619,6 +2627,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2619
2627
  );
2620
2628
  };
2621
2629
  const isAppRuntimeFile = (file) => isFarmAppRuntimeFile(file, appDirSlugs, routeModuleExtensions);
2630
+ const isRendererRouteFile = (file) => routeModuleExtensions.has(path6.extname(file).toLowerCase()) && _optionalChain([farmApp, 'optionalAccess', _161 => _161.getRouteManager, 'call', _162 => _162(), 'access', _163 => _163.isRendererRouteFile, 'call', _164 => _164(file)]) === true;
2622
2631
  const isStaticMetadataImageFile = (file) => /\/(?:opengraph-image|twitter-image)(?:\.(?:png|jpg|jpeg|gif|webp)|\.alt\.txt)$/.test(
2623
2632
  file.replace(/\\/g, "/")
2624
2633
  );
@@ -2655,7 +2664,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2655
2664
  const configChanged = isFarmConfigFile(file, farmConfig.root) || layerConfigFiles.has(normalizedFile);
2656
2665
  const programmaticRouteChanged = isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file));
2657
2666
  const typeArtifacts = configChanged ? ALL_TYPE_ARTIFACTS : {
2658
- routes: ev !== "change" && isRouteModuleFile(file) || programmaticRouteChanged,
2667
+ routes: ev !== "change" && (isRouteModuleFile(file) || isRendererRouteFile(file)) || programmaticRouteChanged,
2659
2668
  api: isApiRouteFile(file) || programmaticRouteChanged,
2660
2669
  env: false,
2661
2670
  images: false,
@@ -2665,9 +2674,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2665
2674
  scheduleTypeArtifactGen(file, ev, typeArtifacts);
2666
2675
  }
2667
2676
  if (isI18nCatalogFile(file)) {
2668
- _optionalChain([farmApp, 'optionalAccess', _161 => _161.getI18nRuntime, 'call', _162 => _162(), 'access', _163 => _163.reload, 'call', _164 => _164(), 'access', _165 => _165.then, 'call', _166 => _166(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _167 => _167.catch, 'call', _168 => _168((error) => _chunk7U4XF76Rcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
2677
+ _optionalChain([farmApp, 'optionalAccess', _165 => _165.getI18nRuntime, 'call', _166 => _166(), 'access', _167 => _167.reload, 'call', _168 => _168(), 'access', _169 => _169.then, 'call', _170 => _170(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _171 => _171.catch, 'call', _172 => _172((error) => _chunk7U4XF76Rcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
2669
2678
  }
2670
- const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
2679
+ const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || isRendererRouteFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
2671
2680
  if (isRouteRefreshEvent) {
2672
2681
  if (!queuedRouteFiles) {
2673
2682
  const files = /* @__PURE__ */ new Set();
@@ -2677,8 +2686,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2677
2686
  queuedRouteFiles = void 0;
2678
2687
  try {
2679
2688
  await Promise.all([
2680
- _optionalChain([refreshRouteDiscovery, 'optionalCall', _169 => _169(`${ev} ${file}`)]),
2681
- [...files].some((path7) => path7.includes("middleware.")) ? _optionalChain([middlewareManager, 'optionalAccess', _170 => _170.reload, 'call', _171 => _171()]) : void 0
2689
+ _optionalChain([refreshRouteDiscovery, 'optionalCall', _173 => _173(`${ev} ${file}`)]),
2690
+ [...files].some((path7) => path7.includes("middleware.")) ? _optionalChain([middlewareManager, 'optionalAccess', _174 => _174.reload, 'call', _175 => _175()]) : void 0
2682
2691
  ]);
2683
2692
  if (pendingRouteReloads.size === 1)
2684
2693
  server.ws.send({ type: "full-reload", path: "*" });
@@ -2727,7 +2736,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2727
2736
  const { FARM_DEV_SERVER_MODULE_LOADER } = await import("./internal/native-server-fns.cjs");
2728
2737
  const load = (file) => _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, file);
2729
2738
  globalThis[FARM_DEV_SERVER_MODULE_LOADER] = load;
2730
- _optionalChain([server, 'access', _172 => _172.httpServer, 'optionalAccess', _173 => _173.once, 'call', _174 => _174("close", () => {
2739
+ _optionalChain([server, 'access', _176 => _176.httpServer, 'optionalAccess', _177 => _177.once, 'call', _178 => _178("close", () => {
2731
2740
  const globals = globalThis;
2732
2741
  if (globals[FARM_DEV_SERVER_MODULE_LOADER] === load) {
2733
2742
  delete globals[FARM_DEV_SERVER_MODULE_LOADER];
@@ -2801,11 +2810,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2801
2810
  });
2802
2811
  }
2803
2812
  }
2804
- if (_optionalChain([options, 'access', _175 => _175.openapi, 'optionalAccess', _176 => _176.enabled])) {
2813
+ if (_optionalChain([options, 'access', _179 => _179.openapi, 'optionalAccess', _180 => _180.enabled])) {
2805
2814
  const { OpenAPIManager } = await loadFarmOpenAPIDevRuntime();
2806
2815
  openAPIManager = new OpenAPIManager(appDirs, options.openapi, {
2807
2816
  mode: "development",
2808
- apiBaseURL: typeof _optionalChain([options, 'access', _177 => _177.api, 'optionalAccess', _178 => _178.baseURL]) === "string" ? options.api.baseURL : void 0,
2817
+ apiBaseURL: typeof _optionalChain([options, 'access', _181 => _181.api, 'optionalAccess', _182 => _182.baseURL]) === "string" ? options.api.baseURL : void 0,
2809
2818
  routes: () => apiRouteManager.getRoutes().values(),
2810
2819
  loadModule: (filePath) => apiRouteManager.loadModule(filePath)
2811
2820
  });
@@ -2836,7 +2845,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2836
2845
  return _chunk7EPYN7GWcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
2837
2846
  };
2838
2847
  releaseDocsMCPServers();
2839
- const isFarmDocsPathGuarded = (href) => _chunkNEKO3HM2cjs.farmPathGuardCoversPage.call(void 0,
2848
+ const isFarmDocsPathGuarded = (href) => _chunk4B6YJ5DScjs.farmPathGuardCoversPage.call(void 0,
2840
2849
  {
2841
2850
  config: farmConfig,
2842
2851
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -2847,22 +2856,23 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2847
2856
  root: farmConfig.root,
2848
2857
  srcDir: farmConfig.srcDir,
2849
2858
  clientEntry: "/@farm/client.js",
2859
+ rendererServer: farmConfig.renderer.server,
2850
2860
  resolveLayoutFonts: resolveDocsLayoutFonts,
2851
2861
  fontStylesheetHref: "/@farm/fonts.css",
2852
- globalStylesheetHref: _chunkARORZ3MHcjs.resolveDevGlobalStylesheetHref.call(void 0,
2862
+ globalStylesheetHref: _chunkOFVBMS6Icjs.resolveDevGlobalStylesheetHref.call(void 0,
2853
2863
  farmConfig.root,
2854
2864
  farmConfig.srcDir
2855
2865
  ),
2856
2866
  loadModule: async (specifier) => {
2857
2867
  const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
2858
- if (specifier === _optionalChain([farmConfig, 'access', _179 => _179.docs, 'access', _180 => _180.adapter, 'optionalAccess', _181 => _181.server]) && _optionalChain([resolved, 'optionalAccess', _182 => _182.id])) {
2868
+ if (specifier === _optionalChain([farmConfig, 'access', _183 => _183.docs, 'access', _184 => _184.adapter, 'optionalAccess', _185 => _185.server]) && _optionalChain([resolved, 'optionalAccess', _186 => _186.id])) {
2859
2869
  const file = resolved.id.split("?", 1)[0];
2860
2870
  return import(
2861
2871
  /* @vite-ignore */
2862
2872
  _url.pathToFileURL.call(void 0, file).href
2863
2873
  );
2864
2874
  }
2865
- return _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _183 => _183.id]), () => ( specifier)));
2875
+ return _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _187 => _187.id]), () => ( specifier)));
2866
2876
  },
2867
2877
  registerMCPServer: (mcpServer) => {
2868
2878
  const dispose = _chunkRKQOMG2Xcjs.registerFarmMCPServer.call(void 0, mcpServer);
@@ -2880,7 +2890,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2880
2890
  fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
2881
2891
  resolveLayoutFonts: resolveDocsLayoutFonts,
2882
2892
  fontStylesheetHref: "/@farm/fonts.css",
2883
- globalStylesheetHref: _chunkARORZ3MHcjs.resolveDevGlobalStylesheetHref.call(void 0,
2893
+ globalStylesheetHref: _chunkOFVBMS6Icjs.resolveDevGlobalStylesheetHref.call(void 0,
2884
2894
  farmConfig.root,
2885
2895
  farmConfig.srcDir
2886
2896
  ),
@@ -2888,7 +2898,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2888
2898
  basePath: farmConfig.basePath
2889
2899
  }) : null;
2890
2900
  const farmDocsListsPages = Boolean(
2891
- farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _184 => _184.getPlugins, 'call', _185 => _185(), 'access', _186 => _186.some, 'call', _187 => _187((plugin2) => plugin2.name === "farm:infra-analytics")])
2901
+ farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _188 => _188.getPlugins, 'call', _189 => _189(), 'access', _190 => _190.some, 'call', _191 => _191((plugin2) => plugin2.name === "farm:infra-analytics")])
2892
2902
  );
2893
2903
  let farmDocsPagePaths;
2894
2904
  const getFarmDocsPagePaths = () => {
@@ -2915,22 +2925,22 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2915
2925
  });
2916
2926
  }
2917
2927
  }
2918
- const farmInfraAnalyticsPlugin = _optionalChain([pm, 'optionalAccess', _188 => _188.getPlugins, 'call', _189 => _189(), 'access', _190 => _190.find, 'call', _191 => _191((plugin2) => plugin2.name === "farm:infra-analytics")]);
2928
+ const farmInfraAnalyticsPlugin = _optionalChain([pm, 'optionalAccess', _192 => _192.getPlugins, 'call', _193 => _193(), 'access', _194 => _194.find, 'call', _195 => _195((plugin2) => plugin2.name === "farm:infra-analytics")]);
2919
2929
  if (farmInfraAnalyticsPlugin) {
2920
- _chunkCD5Z7RR5cjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
2930
+ _chunkZ37PDUJRcjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
2921
2931
  if (farmDocsDevRuntime) {
2922
- const label = _chunkB2PGVHBGcjs.resolveFarmDocsRouteLabel.call(void 0,
2932
+ const label = _chunk22BTYPIXcjs.resolveFarmDocsRouteLabel.call(void 0,
2923
2933
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname, farmConfig.basePath),
2924
2934
  {
2925
- path: _optionalChain([farmConfig, 'access', _192 => _192.docs, 'optionalAccess', _193 => _193.entry]) || "/docs",
2926
- roots: _optionalChain([farmConfig, 'access', _194 => _194.docs, 'optionalAccess', _195 => _195.roots, 'optionalAccess', _196 => _196.map, 'call', _197 => _197((root) => root.entry)]),
2935
+ path: _optionalChain([farmConfig, 'access', _196 => _196.docs, 'optionalAccess', _197 => _197.entry]) || "/docs",
2936
+ roots: _optionalChain([farmConfig, 'access', _198 => _198.docs, 'optionalAccess', _199 => _199.roots, 'optionalAccess', _200 => _200.map, 'call', _201 => _201((root) => root.entry)]),
2927
2937
  pages: await getFarmDocsPagePaths()
2928
2938
  }
2929
2939
  );
2930
- if (label) return _chunkB2PGVHBGcjs.setFarmRouteLabel.call(void 0, { pathname }, label);
2940
+ if (label) return _chunk22BTYPIXcjs.setFarmRouteLabel.call(void 0, { pathname }, label);
2931
2941
  }
2932
2942
  const match = farmApp.getRouteManager().matchRoute(pathname);
2933
- return { pathname, pattern: _optionalChain([match, 'access', _198 => _198.route, 'optionalAccess', _199 => _199.pattern]) || null };
2943
+ return { pathname, pattern: _optionalChain([match, 'access', _202 => _202.route, 'optionalAccess', _203 => _203.pattern]) || null };
2934
2944
  });
2935
2945
  }
2936
2946
  if (farmDocsDevRuntime && !farmDocsDevRuntime.hasFarmDocsRuntimeAdapter(farmConfig.docs)) {
@@ -3005,7 +3015,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3005
3015
  }
3006
3016
  },
3007
3017
  (request) => {
3008
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _200 => _200.getConfig, 'call', _201 => _201()]), () => ( options));
3018
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _204 => _204.getConfig, 'call', _205 => _205()]), () => ( options));
3009
3019
  const currentServerConfig = _chunk7Q7UB4TLcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
3010
3020
  return _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, request, {
3011
3021
  trustProxy: currentServerConfig.trustProxy
@@ -3021,7 +3031,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3021
3031
  withAPIRequestTracing(async function handleFarmDevRequest(req, res, next) {
3022
3032
  const requestUrl = req.url || "/";
3023
3033
  const requestMethod = req.method || "GET";
3024
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _202 => _202.getConfig, 'call', _203 => _203()]), () => ( options));
3034
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _206 => _206.getConfig, 'call', _207 => _207()]), () => ( options));
3025
3035
  const currentServerConfig = _chunk7Q7UB4TLcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
3026
3036
  const parsedRequestUrl = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, {
3027
3037
  trustProxy: currentServerConfig.trustProxy
@@ -3091,7 +3101,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3091
3101
  if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkY3DO7BIJcjs.FARM_VIDEO_PLAYER_PATH) {
3092
3102
  res.statusCode = 200;
3093
3103
  res.setHeader("Content-Type", "text/html; charset=utf-8");
3094
- res.end(requestMethod === "HEAD" ? void 0 : _chunkARORZ3MHcjs.FARM_VIDEO_PLAYER_HTML);
3104
+ res.end(requestMethod === "HEAD" ? void 0 : _chunkOFVBMS6Icjs.FARM_VIDEO_PLAYER_HTML);
3095
3105
  return;
3096
3106
  }
3097
3107
  const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
@@ -3146,7 +3156,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3146
3156
  openapi: options.openapi
3147
3157
  },
3148
3158
  workflows: discoveredWorkflows,
3149
- plugins: _optionalChain([pm, 'optionalAccess', _204 => _204.getSortedPlugins, 'call', _205 => _205()])
3159
+ plugins: _optionalChain([pm, 'optionalAccess', _208 => _208.getSortedPlugins, 'call', _209 => _209()])
3150
3160
  });
3151
3161
  res.statusCode = 200;
3152
3162
  res.setHeader(
@@ -3181,10 +3191,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3181
3191
  render: {
3182
3192
  pathname: pathname2,
3183
3193
  method: requestMethod,
3184
- routePattern: _optionalChain([match, 'optionalAccess', _206 => _206.route, 'optionalAccess', _207 => _207.pattern]) || null,
3185
- params: _optionalChain([match, 'optionalAccess', _208 => _208.params]) || {}
3194
+ routePattern: _optionalChain([match, 'optionalAccess', _210 => _210.route, 'optionalAccess', _211 => _211.pattern]) || null,
3195
+ params: _optionalChain([match, 'optionalAccess', _212 => _212.params]) || {}
3186
3196
  },
3187
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _209 => _209.layouts]) || []).map((layout) => layout.pattern)
3197
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _213 => _213.layouts]) || []).map((layout) => layout.pattern)
3188
3198
  };
3189
3199
  return pageHookRouteMatch;
3190
3200
  };
@@ -3272,7 +3282,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3272
3282
  }
3273
3283
  }
3274
3284
  const runAppMiddlewareForContentRoute = async () => {
3275
- if (!_optionalChain([middlewareManager, 'optionalAccess', _210 => _210.hasMiddleware, 'call', _211 => _211()])) return false;
3285
+ if (!_optionalChain([middlewareManager, 'optionalAccess', _214 => _214.hasMiddleware, 'call', _215 => _215()])) return false;
3276
3286
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
3277
3287
  return runFarmMiddlewareWithNavigation(
3278
3288
  farmApp.getServerRenderer(),
@@ -3310,7 +3320,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3310
3320
  return response.status;
3311
3321
  };
3312
3322
  const runAppMiddlewareInRuntimeSession = async (runtimeSession2, logResponse2) => {
3313
- const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _212 => _212.hasRuntimeHook, 'call', _213 => _213("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _214 => _214.hasMiddleware, 'call', _215 => _215()]) ? interceptFarmDevPageResponse({
3323
+ const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _216 => _216.hasRuntimeHook, 'call', _217 => _217("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _218 => _218.hasMiddleware, 'call', _219 => _219()]) ? interceptFarmDevPageResponse({
3314
3324
  req,
3315
3325
  res,
3316
3326
  pm,
@@ -3323,7 +3333,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3323
3333
  urlPath: requestUrl,
3324
3334
  pathname: requestPathname,
3325
3335
  startTime: Date.now(),
3326
- logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _216 => _216(status)]),
3336
+ logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _220 => _220(status)]),
3327
3337
  // The runtime reports a runtime.after failure itself.
3328
3338
  emitError: async () => {
3329
3339
  },
@@ -3334,7 +3344,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3334
3344
  handled = await runAppMiddlewareForContentRoute();
3335
3345
  } catch (error) {
3336
3346
  if (runtimeHookErrorAnswersJSON || res.headersSent) {
3337
- _optionalChain([interceptor, 'optionalAccess', _217 => _217.release, 'call', _218 => _218()]);
3347
+ _optionalChain([interceptor, 'optionalAccess', _221 => _221.release, 'call', _222 => _222()]);
3338
3348
  throw error;
3339
3349
  }
3340
3350
  if (runtimeSession2) await pm.reportRuntimeRequestError(runtimeSession2, error);
@@ -3342,10 +3352,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3342
3352
  return true;
3343
3353
  }
3344
3354
  if (!handled) {
3345
- _optionalChain([interceptor, 'optionalAccess', _219 => _219.release, 'call', _220 => _220()]);
3355
+ _optionalChain([interceptor, 'optionalAccess', _223 => _223.release, 'call', _224 => _224()]);
3346
3356
  return false;
3347
3357
  }
3348
- if (!_optionalChain([interceptor, 'optionalAccess', _221 => _221.isEnded, 'call', _222 => _222()])) _optionalChain([logResponse2, 'optionalCall', _223 => _223(res.statusCode || 200)]);
3358
+ if (!_optionalChain([interceptor, 'optionalAccess', _225 => _225.isEnded, 'call', _226 => _226()])) _optionalChain([logResponse2, 'optionalCall', _227 => _227(res.statusCode || 200)]);
3349
3359
  return true;
3350
3360
  };
3351
3361
  const serveBuiltInRoute = async (respond, {
@@ -3354,7 +3364,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3354
3364
  label
3355
3365
  } = {}) => {
3356
3366
  const discard = async () => {
3357
- await _optionalChain([computed, 'optionalAccess', _224 => _224.body, 'optionalAccess', _225 => _225.cancel, 'call', _226 => _226(), 'access', _227 => _227.catch, 'call', _228 => _228(() => {
3367
+ await _optionalChain([computed, 'optionalAccess', _228 => _228.body, 'optionalAccess', _229 => _229.cancel, 'call', _230 => _230(), 'access', _231 => _231.catch, 'call', _232 => _232(() => {
3358
3368
  })]);
3359
3369
  };
3360
3370
  const sendRuntimeResponse = async (runtimeSession3, response2) => {
@@ -3371,9 +3381,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3371
3381
  if (pm && opensFarmDevRuntimeSession(pm)) {
3372
3382
  try {
3373
3383
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
3374
- const route = _chunkB2PGVHBGcjs.setFarmRouteLabel.call(void 0,
3384
+ const route = _chunk22BTYPIXcjs.setFarmRouteLabel.call(void 0,
3375
3385
  { pathname: requestPathname },
3376
- label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkB2PGVHBGcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3386
+ label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunk22BTYPIXcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3377
3387
  );
3378
3388
  runtimeSession2 = await pm.beginRuntimeRequest(
3379
3389
  createRequestFromNodeRequest(req, new URL(fullUrl)),
@@ -3411,7 +3421,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3411
3421
  }
3412
3422
  responding = true;
3413
3423
  response = await respond(
3414
- _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _229 => _229.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3424
+ _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _233 => _233.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3415
3425
  );
3416
3426
  } catch (error) {
3417
3427
  if (!responding && !res.headersSent) {
@@ -3431,7 +3441,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3431
3441
  else await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
3432
3442
  };
3433
3443
  const openAPIRequestPathname = openAPIManager ? _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
3434
- if (openAPIManager && _optionalChain([options, 'access', _230 => _230.openapi, 'optionalAccess', _231 => _231.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3444
+ if (openAPIManager && _optionalChain([options, 'access', _234 => _234.openapi, 'optionalAccess', _235 => _235.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3435
3445
  const specManager = openAPIManager;
3436
3446
  await serveBuiltInRoute(async () => {
3437
3447
  if (requestMethod !== "GET" && requestMethod !== "HEAD") {
@@ -3451,7 +3461,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3451
3461
  });
3452
3462
  return;
3453
3463
  }
3454
- if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _232 => _232.openapi, 'optionalAccess', _233 => _233.route])) {
3464
+ if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _236 => _236.openapi, 'optionalAccess', _237 => _237.route])) {
3455
3465
  const docsManager = openAPIManager;
3456
3466
  await serveBuiltInRoute(
3457
3467
  async () => {
@@ -3462,8 +3472,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3462
3472
  );
3463
3473
  return;
3464
3474
  }
3465
- if (_optionalChain([options, 'access', _234 => _234.agent, 'optionalAccess', _235 => _235.manifest]) !== false && _chunkB2PGVHBGcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3466
- const manifestGuardCoversPath = (path7) => _chunkNEKO3HM2cjs.farmPathGuardCoversEndpoint.call(void 0,
3475
+ if (_optionalChain([options, 'access', _238 => _238.agent, 'optionalAccess', _239 => _239.manifest]) !== false && _chunk22BTYPIXcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3476
+ const manifestGuardCoversPath = (path7) => _chunk4B6YJ5DScjs.farmPathGuardCoversEndpoint.call(void 0,
3467
3477
  {
3468
3478
  config: farmConfig,
3469
3479
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -3472,18 +3482,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3472
3482
  apiServerBasePath
3473
3483
  );
3474
3484
  await serveBuiltInRoute(async () => {
3475
- _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkARORZ3MHcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3476
- const manifest = await _chunkB2PGVHBGcjs.createFarmAppManifestResponse.call(void 0,
3485
+ _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkOFVBMS6Icjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3486
+ const manifest = await _chunk22BTYPIXcjs.createFarmAppManifestResponse.call(void 0,
3477
3487
  new Request(parsedRequestUrl, {
3478
3488
  method: requestMethod,
3479
3489
  headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
3480
3490
  }),
3481
3491
  {
3482
- ..._chunkB2PGVHBGcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3492
+ ..._chunk22BTYPIXcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3483
3493
  build: "development",
3484
3494
  packages: farmAppPackages,
3485
3495
  // Read again on each request; unchanged files come from a cache.
3486
- webmcpTools: _optionalChain([farmConfig, 'access', _236 => _236.plugins, 'optionalAccess', _237 => _237.some, 'call', _238 => _238(({ name }) => name === "farm:webmcp")]) ? _chunkARORZ3MHcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3496
+ webmcpTools: _optionalChain([farmConfig, 'access', _240 => _240.plugins, 'optionalAccess', _241 => _241.some, 'call', _242 => _242(({ name }) => name === "farm:webmcp")]) ? _chunkOFVBMS6Icjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3487
3497
  }),
3488
3498
  defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
3489
3499
  // A guard written for an MCP server's path keeps its tools out of the public view.
@@ -3501,11 +3511,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3501
3511
  });
3502
3512
  return;
3503
3513
  }
3504
- if (_optionalChain([options, 'access', _239 => _239.agent, 'optionalAccess', _240 => _240.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkB2PGVHBGcjs.FARM_API_CATALOG_PATH) {
3514
+ if (_optionalChain([options, 'access', _243 => _243.agent, 'optionalAccess', _244 => _244.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunk22BTYPIXcjs.FARM_API_CATALOG_PATH) {
3505
3515
  await serveBuiltInRoute(
3506
- () => _chunkB2PGVHBGcjs.createFarmApiCatalogResponse.call(void 0,
3516
+ () => _chunk22BTYPIXcjs.createFarmApiCatalogResponse.call(void 0,
3507
3517
  requestMethod,
3508
- _chunkB2PGVHBGcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3518
+ _chunk22BTYPIXcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3509
3519
  new Request(parsedRequestUrl, {
3510
3520
  headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
3511
3521
  })
@@ -3513,8 +3523,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3513
3523
  );
3514
3524
  return;
3515
3525
  }
3516
- if (_optionalChain([options, 'access', _241 => _241.agent, 'optionalAccess', _242 => _242.aiCatalog]) !== false) {
3517
- const aiCatalog = _chunkB2PGVHBGcjs.createFarmAiCatalogResponse.call(void 0,
3526
+ if (_optionalChain([options, 'access', _245 => _245.agent, 'optionalAccess', _246 => _246.aiCatalog]) !== false) {
3527
+ const aiCatalog = _chunk22BTYPIXcjs.createFarmAiCatalogResponse.call(void 0,
3518
3528
  new Request(parsedRequestUrl, {
3519
3529
  method: requestMethod,
3520
3530
  headers: {
@@ -3562,7 +3572,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3562
3572
  );
3563
3573
  const docsResponse = await farmDocsHandler(docsHandlerRequest);
3564
3574
  if (docsResponse) {
3565
- const docsPage = _optionalChain([docsResponse, 'access', _243 => _243.headers, 'access', _244 => _244.get, 'call', _245 => _245("content-type"), 'optionalAccess', _246 => _246.toLowerCase, 'call', _247 => _247(), 'access', _248 => _248.includes, 'call', _249 => _249("text/html")]);
3575
+ const docsPage = _optionalChain([docsResponse, 'access', _247 => _247.headers, 'access', _248 => _248.get, 'call', _249 => _249("content-type"), 'optionalAccess', _250 => _250.toLowerCase, 'call', _251 => _251(), 'access', _252 => _252.includes, 'call', _253 => _253("text/html")]);
3566
3576
  await serveBuiltInRoute(
3567
3577
  async (request) => {
3568
3578
  if (!docsPage) {
@@ -3580,7 +3590,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3580
3590
  farmConfig.deploymentId
3581
3591
  );
3582
3592
  if (deploymentMismatch) {
3583
- await _optionalChain([docsResponse, 'access', _250 => _250.body, 'optionalAccess', _251 => _251.cancel, 'call', _252 => _252()]);
3593
+ await _optionalChain([docsResponse, 'access', _254 => _254.body, 'optionalAccess', _255 => _255.cancel, 'call', _256 => _256()]);
3584
3594
  return _chunkNLBHLPEOcjs.createFarmDeploymentMismatchResponse.call(void 0, deploymentMismatch);
3585
3595
  }
3586
3596
  return _chunkNLBHLPEOcjs.withFarmDeploymentResponse.call(void 0,
@@ -3596,11 +3606,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3596
3606
  {
3597
3607
  kind: "docs",
3598
3608
  computed: docsResponse,
3599
- label: _chunkB2PGVHBGcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3609
+ label: _chunk22BTYPIXcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3600
3610
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
3601
3611
  {
3602
- path: _optionalChain([farmConfig, 'access', _253 => _253.docs, 'optionalAccess', _254 => _254.entry]) || "/docs",
3603
- roots: _optionalChain([farmConfig, 'access', _255 => _255.docs, 'optionalAccess', _256 => _256.roots, 'optionalAccess', _257 => _257.map, 'call', _258 => _258((root) => root.entry)]),
3612
+ path: _optionalChain([farmConfig, 'access', _257 => _257.docs, 'optionalAccess', _258 => _258.entry]) || "/docs",
3613
+ roots: _optionalChain([farmConfig, 'access', _259 => _259.docs, 'optionalAccess', _260 => _260.roots, 'optionalAccess', _261 => _261.map, 'call', _262 => _262((root) => root.entry)]),
3604
3614
  pages: await getFarmDocsPagePaths()
3605
3615
  }
3606
3616
  )
@@ -3609,7 +3619,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3609
3619
  return;
3610
3620
  }
3611
3621
  }
3612
- if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _259 => _259.headers, 'access', _260 => _260.accept, 'optionalAccess', _261 => _261.includes, 'call', _262 => _262(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
3622
+ if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _263 => _263.headers, 'access', _264 => _264.accept, 'optionalAccess', _265 => _265.includes, 'call', _266 => _266(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
3613
3623
  const { createFarmNativeTreeResponse } = await import("./native-tree-5TENEQ7Y.cjs");
3614
3624
  const treeBodyInit = requestMethod === "POST" ? { body: _chunk7Q7UB4TLcjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" } : {};
3615
3625
  const treeResponse = await createFarmNativeTreeResponse({
@@ -3627,15 +3637,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3627
3637
  });
3628
3638
  await serveBuiltInRoute(() => treeResponse, {
3629
3639
  computed: treeResponse,
3630
- label: _nullishCoalesce(_optionalChain([farmApp, 'access', _263 => _263.getRouteManager, 'call', _264 => _264(), 'access', _265 => _265.matchRoute, 'call', _266 => _266(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _267 => _267.route, 'optionalAccess', _268 => _268.pattern]), () => ( null))
3640
+ label: _nullishCoalesce(_optionalChain([farmApp, 'access', _267 => _267.getRouteManager, 'call', _268 => _268(), 'access', _269 => _269.matchRoute, 'call', _270 => _270(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _271 => _271.route, 'optionalAccess', _272 => _272.pattern]), () => ( null))
3631
3641
  });
3632
3642
  return;
3633
3643
  }
3634
3644
  const markdownRouteLabel = () => (
3635
3645
  // On the route path, as production labels it: /fr/index.md is /index.md.
3636
- _chunkB2PGVHBGcjs.resolveFarmMarkdownRouteLabel.call(void 0,
3646
+ _chunk22BTYPIXcjs.resolveFarmMarkdownRouteLabel.call(void 0,
3637
3647
  toRoutePathname(requestPathname),
3638
- (page) => _optionalChain([farmApp, 'access', _269 => _269.getRouteManager, 'call', _270 => _270(), 'access', _271 => _271.matchRoute, 'call', _272 => _272(page), 'access', _273 => _273.route, 'optionalAccess', _274 => _274.pattern])
3648
+ (page) => _optionalChain([farmApp, 'access', _273 => _273.getRouteManager, 'call', _274 => _274(), 'access', _275 => _275.matchRoute, 'call', _276 => _276(page), 'access', _277 => _277.route, 'optionalAccess', _278 => _278.pattern])
3639
3649
  )
3640
3650
  );
3641
3651
  const markdownSourceResponse = viteModuleRequest ? null : await _chunk26WP75W5cjs.createFarmMarkdownSourceResponse.call(void 0, {
@@ -3647,14 +3657,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3647
3657
  routePathname: toRoutePathname,
3648
3658
  resolveSource: async (pathname2) => {
3649
3659
  const match = farmApp.getRouteManager().matchRoute(pathname2);
3650
- const sourcePath = _optionalChain([match, 'access', _275 => _275.route, 'optionalAccess', _276 => _276.markdownSourcePath]) || (match.route && _chunk26WP75W5cjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
3660
+ const sourcePath = _optionalChain([match, 'access', _279 => _279.route, 'optionalAccess', _280 => _280.markdownSourcePath]) || (match.route && _chunk26WP75W5cjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
3651
3661
  if (!sourcePath) {
3652
3662
  return null;
3653
3663
  }
3654
3664
  return {
3655
3665
  source: await fs2.promises.readFile(sourcePath, "utf8"),
3656
3666
  // Project-relative, as production sends it: never the machine's path.
3657
- filePath: _chunkARORZ3MHcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3667
+ filePath: _chunkOFVBMS6Icjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3658
3668
  };
3659
3669
  },
3660
3670
  // The anonymous check goes through this server, so its guards and
@@ -3804,7 +3814,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3804
3814
  "beforeRequest",
3805
3815
  (plugin2) => {
3806
3816
  const owner = _chunkB3HQTGXScjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
3807
- return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _277 => _277.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3817
+ return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _281 => _281.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3808
3818
  },
3809
3819
  req,
3810
3820
  res
@@ -3841,7 +3851,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3841
3851
  isProd: false
3842
3852
  },
3843
3853
  request,
3844
- { clientAddress: _optionalChain([req, 'access', _278 => _278.socket, 'optionalAccess', _279 => _279.remoteAddress]) }
3854
+ { clientAddress: _optionalChain([req, 'access', _282 => _282.socket, 'optionalAccess', _283 => _283.remoteAddress]) }
3845
3855
  );
3846
3856
  if (!result) {
3847
3857
  throw new Error(`Matched integration route did not return a response`);
@@ -3849,7 +3859,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3849
3859
  return result;
3850
3860
  } catch (error) {
3851
3861
  _chunk7U4XF76Rcjs.logger.error(`Integration route error: ${error}`);
3852
- await _optionalChain([runtime, 'optionalAccess', _280 => _280.reportError, 'call', _281 => _281(error)]);
3862
+ await _optionalChain([runtime, 'optionalAccess', _284 => _284.reportError, 'call', _285 => _285(error)]);
3853
3863
  return _chunkJYQ6DGPWcjs.createFarmInternalServerErrorResponse.call(void 0, );
3854
3864
  }
3855
3865
  };
@@ -3903,7 +3913,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3903
3913
  _chunkB3HQTGXScjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3904
3914
  pathname: requestPathname,
3905
3915
  method: requestMethod
3906
- }) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _282 => _282.isFarmDocsAPIRequest, 'call', _283 => _283(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
3916
+ }) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _286 => _286.isFarmDocsAPIRequest, 'call', _287 => _287(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
3907
3917
  );
3908
3918
  };
3909
3919
  try {
@@ -3993,15 +4003,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3993
4003
  );
3994
4004
  };
3995
4005
  const isDocsAPIRequest = Boolean(
3996
- farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _284 => _284.isFarmDocsAPIRequest, 'call', _285 => _285(pathname2)])
4006
+ farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _288 => _288.isFarmDocsAPIRequest, 'call', _289 => _289(pathname2)])
3997
4007
  );
3998
4008
  const docsRuntimeOptions = () => ({
3999
4009
  kind: "docs",
4000
- route: _chunkB2PGVHBGcjs.setFarmRouteLabel.call(void 0,
4010
+ route: _chunk22BTYPIXcjs.setFarmRouteLabel.call(void 0,
4001
4011
  { pathname: pathname2, pattern: urlPath2 },
4002
- _chunkB2PGVHBGcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
4003
- path: _optionalChain([farmConfig, 'access', _286 => _286.docs, 'optionalAccess', _287 => _287.entry]) || "/docs",
4004
- roots: _optionalChain([farmConfig, 'access', _288 => _288.docs, 'optionalAccess', _289 => _289.roots, 'optionalAccess', _290 => _290.map, 'call', _291 => _291((root) => root.entry)])
4012
+ _chunk22BTYPIXcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
4013
+ path: _optionalChain([farmConfig, 'access', _290 => _290.docs, 'optionalAccess', _291 => _291.entry]) || "/docs",
4014
+ roots: _optionalChain([farmConfig, 'access', _292 => _292.docs, 'optionalAccess', _293 => _293.roots, 'optionalAccess', _294 => _294.map, 'call', _295 => _295((root) => root.entry)])
4005
4015
  })
4006
4016
  )
4007
4017
  });
@@ -4083,7 +4093,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4083
4093
  const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
4084
4094
  const hasExplicitAPIRoute = Boolean(routedApiRoute);
4085
4095
  if (apiHandler && hasExplicitAPIRoute) {
4086
- const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _292 => _292.route, 'access', _293 => _293.path]) || urlPath2;
4096
+ const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _296 => _296.route, 'access', _297 => _297.path]) || urlPath2;
4087
4097
  _chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
4088
4098
  type: "route.matched",
4089
4099
  pathname: pathname2,
@@ -4133,7 +4143,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4133
4143
  error
4134
4144
  });
4135
4145
  _chunk7U4XF76Rcjs.logger.error(`API route error: ${error}`);
4136
- await _optionalChain([runtime, 'optionalAccess', _294 => _294.reportError, 'call', _295 => _295(error)]);
4146
+ await _optionalChain([runtime, 'optionalAccess', _298 => _298.reportError, 'call', _299 => _299(error)]);
4137
4147
  response = _chunkJYQ6DGPWcjs.createFarmInternalServerErrorResponse.call(void 0, );
4138
4148
  }
4139
4149
  return pm ? await pm.runHookSerial("afterApiHandler", response, apiLifecyclePayload) : response;
@@ -4238,12 +4248,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4238
4248
  }
4239
4249
  return;
4240
4250
  }
4241
- if (_optionalChain([req, 'access', _296 => _296.url, 'optionalAccess', _297 => _297.startsWith, 'call', _298 => _298("/@")]) || _optionalChain([req, 'access', _299 => _299.url, 'optionalAccess', _300 => _300.startsWith, 'call', _301 => _301("/node_modules")])) {
4251
+ if (_optionalChain([req, 'access', _300 => _300.url, 'optionalAccess', _301 => _301.startsWith, 'call', _302 => _302("/@")]) || _optionalChain([req, 'access', _303 => _303.url, 'optionalAccess', _304 => _304.startsWith, 'call', _305 => _305("/node_modules")])) {
4242
4252
  return next();
4243
4253
  }
4244
4254
  if (!deferredDottedRequests.has(req) && shouldBypassFarmRouterForDottedPath(
4245
4255
  requestPathname,
4246
- _optionalChain([farmApp, 'optionalAccess', _302 => _302.getRouteManager, 'call', _303 => _303()]),
4256
+ _optionalChain([farmApp, 'optionalAccess', _306 => _306.getRouteManager, 'call', _307 => _307()]),
4247
4257
  [server.config.publicDir, server.config.root],
4248
4258
  farmAgentGeneratedPaths(farmConfig),
4249
4259
  requestMethod
@@ -4251,7 +4261,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4251
4261
  if (!viteModuleRequest) deferredDottedRequests.set(req, requestUrl);
4252
4262
  return next();
4253
4263
  }
4254
- if (_optionalChain([req, 'access', _304 => _304.url, 'optionalAccess', _305 => _305.startsWith, 'call', _306 => _306("/__farm/page-data")])) {
4264
+ if (_optionalChain([req, 'access', _308 => _308.url, 'optionalAccess', _309 => _309.startsWith, 'call', _310 => _310("/__farm/page-data")])) {
4255
4265
  const urlObj = parsedRequestUrl;
4256
4266
  const targetPath = urlObj.searchParams.get("path") || "/";
4257
4267
  let renderedRequest;
@@ -4281,7 +4291,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4281
4291
  renderedRequest = targetRequest;
4282
4292
  let middlewareMap = /* @__PURE__ */ new Map();
4283
4293
  let middlewareContext = /* @__PURE__ */ new Map();
4284
- if (_optionalChain([middlewareManager, 'optionalAccess', _307 => _307.hasMiddleware, 'call', _308 => _308()])) {
4294
+ if (_optionalChain([middlewareManager, 'optionalAccess', _311 => _311.hasMiddleware, 'call', _312 => _312()])) {
4285
4295
  const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
4286
4296
  const targetNodeResponse = createPageDataMiddlewareResponse(res);
4287
4297
  const handled = await runFarmMiddlewareWithNavigation(
@@ -4315,10 +4325,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4315
4325
  if (pm) {
4316
4326
  await pm.runHookParallel("afterRouteMatch", {
4317
4327
  pathname: targetPath,
4318
- matched: !!_optionalChain([match, 'optionalAccess', _309 => _309.route]),
4319
- routePattern: _optionalChain([match, 'optionalAccess', _310 => _310.route, 'optionalAccess', _311 => _311.pattern]) || null,
4320
- params: _optionalChain([match, 'optionalAccess', _312 => _312.params]) || {},
4321
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _313 => _313.layouts]) || []).map((l) => l.pattern)
4328
+ matched: !!_optionalChain([match, 'optionalAccess', _313 => _313.route]),
4329
+ routePattern: _optionalChain([match, 'optionalAccess', _314 => _314.route, 'optionalAccess', _315 => _315.pattern]) || null,
4330
+ params: _optionalChain([match, 'optionalAccess', _316 => _316.params]) || {},
4331
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _317 => _317.layouts]) || []).map((l) => l.pattern)
4322
4332
  });
4323
4333
  }
4324
4334
  if (!match) {
@@ -4353,7 +4363,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4353
4363
  );
4354
4364
  const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
4355
4365
  const navigationManifest = routeManager3.generateClientManifest(server.config.root);
4356
- const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkDRO3NXA3cjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4366
+ const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkEBSL5TW7cjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4357
4367
  const isClientComponent = moduleMetadata.isClientComponent;
4358
4368
  const shouldHydrate = moduleMetadata.shouldHydrate;
4359
4369
  let mergedMetadata = {};
@@ -4364,7 +4374,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4364
4374
  (layout) => _nullishCoalesce(navigationManifest.layouts.find(
4365
4375
  (entry) => entry.pattern === layout.pattern
4366
4376
  ), () => ( {
4367
- ..._chunkDRO3NXA3cjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4377
+ ..._chunkEBSL5TW7cjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4368
4378
  serverTree: false
4369
4379
  }))
4370
4380
  );
@@ -4377,18 +4387,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4377
4387
  (metadata) => metadata.shouldHydrate && metadata.islandStrategy ? [metadata.islandStrategy] : []
4378
4388
  )
4379
4389
  ];
4380
- const hydrationIslandStrategy = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0,
4381
- _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _314 => _314.getConfig, 'call', _315 => _315()]), () => ( options))), 'access', _316 => _316.experimental, 'optionalAccess', _317 => _317.serverComponents])
4382
- ) === "islands" ? _chunkARORZ3MHcjs.resolveFarmRouteRootStrategy.call(void 0,
4390
+ const hydrationIslandStrategy = _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0,
4391
+ _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _318 => _318.getConfig, 'call', _319 => _319()]), () => ( options))), 'access', _320 => _320.experimental, 'optionalAccess', _321 => _321.serverComponents])
4392
+ ) === "islands" ? _chunkOFVBMS6Icjs.resolveFarmRouteRootStrategy.call(void 0,
4383
4393
  route,
4384
4394
  { shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
4385
4395
  layouts.map((layout, index) => ({
4386
4396
  pattern: layout.pattern,
4387
4397
  modulePath: layout.modulePath,
4388
- shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _318 => _318[index], 'optionalAccess', _319 => _319.shouldHydrate]) === true,
4398
+ shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _322 => _322[index], 'optionalAccess', _323 => _323.shouldHydrate]) === true,
4389
4399
  // Manifest entries carry it; metadata read from source does not.
4390
- hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _320 => _320[index], 'optionalAccess', _321 => _321.hasIsolatedClientBoundaries]) === true,
4391
- islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _322 => _322[index], 'optionalAccess', _323 => _323.islandStrategy]), () => ( null))
4400
+ hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _324 => _324[index], 'optionalAccess', _325 => _325.hasIsolatedClientBoundaries]) === true,
4401
+ islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _326 => _326[index], 'optionalAccess', _327 => _327.islandStrategy]), () => ( null))
4392
4402
  })),
4393
4403
  server.config.root,
4394
4404
  true
@@ -4445,7 +4455,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4445
4455
  const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
4446
4456
  const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
4447
4457
  (entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
4448
- ), () => ( _chunkDRO3NXA3cjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4458
+ ), () => ( _chunkEBSL5TW7cjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4449
4459
  const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
4450
4460
  request: targetRequest,
4451
4461
  params: slot.params,
@@ -4491,15 +4501,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4491
4501
  );
4492
4502
  const projectRoot = server.config.root;
4493
4503
  const toUrlPath = (absolutePath) => _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
4494
- const renderPlan = _chunkNEKO3HM2cjs.createFarmRouteRenderPlan.call(void 0, {
4504
+ const renderPlan = _chunk4B6YJ5DScjs.createFarmRouteRenderPlan.call(void 0, {
4495
4505
  pageShouldHydrate: shouldHydrate,
4496
4506
  layoutShouldHydrate: shouldHydrateLayout,
4497
4507
  islandStrategy: hydrationIslandStrategy,
4498
- rendering: _chunkVMBIKDKWcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4508
+ rendering: _chunkL3BSHASBcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4499
4509
  });
4500
4510
  const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
4501
- const layoutStartIndex = _chunkNEKO3HM2cjs.getSharedLayoutPrefixLength.call(void 0,
4502
- _chunkNEKO3HM2cjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4511
+ const layoutStartIndex = _chunk4B6YJ5DScjs.getSharedLayoutPrefixLength.call(void 0,
4512
+ _chunk4B6YJ5DScjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4503
4513
  destinationLayoutPatterns
4504
4514
  );
4505
4515
  const renderer = farmApp.getServerRenderer();
@@ -4509,13 +4519,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4509
4519
  middlewareContext,
4510
4520
  () => renderer.renderNavigationFragment({
4511
4521
  PageComponent: routeModule.default,
4512
- LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _324 => _324.default]),
4522
+ LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _328 => _328.default]),
4513
4523
  pageProps: routeProps,
4514
4524
  params,
4515
4525
  layouts: layouts.map((layout, index) => ({
4516
4526
  pattern: layout.pattern,
4517
4527
  module: layoutModules[index],
4518
- serverTree: _optionalChain([layoutHydrationMetadata, 'access', _325 => _325[index], 'optionalAccess', _326 => _326.serverTree])
4528
+ serverTree: _optionalChain([layoutHydrationMetadata, 'access', _329 => _329[index], 'optionalAccess', _330 => _330.serverTree])
4519
4529
  })),
4520
4530
  layoutStartIndex,
4521
4531
  slots: routeSlots.map((slot) => ({
@@ -4581,7 +4591,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4581
4591
  {
4582
4592
  status: 200,
4583
4593
  headers: {
4584
- "Cache-Control": _chunkNEKO3HM2cjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4594
+ "Cache-Control": _chunk4B6YJ5DScjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4585
4595
  "X-Farm-Navigation": "html-fragment",
4586
4596
  Vary: "X-Farm-Layout-Chain",
4587
4597
  [_chunkNLBHLPEOcjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
@@ -4623,14 +4633,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4623
4633
  trustProxy: currentServerConfig.trustProxy
4624
4634
  }).pathname;
4625
4635
  const routeManager2 = farmApp.getRouteManager();
4626
- const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _327 => _327.hasHook, 'call', _328 => _328("beforeRequest")]), () => ( false));
4627
- const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _329 => _329.hasHook, 'call', _330 => _330("afterResponse")]), () => ( false));
4628
- const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _331 => _331.hasHook, 'call', _332 => _332("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _333 => _333.hasHook, 'call', _334 => _334("afterRender")]), () => ( false)));
4636
+ const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _331 => _331.hasHook, 'call', _332 => _332("beforeRequest")]), () => ( false));
4637
+ const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _333 => _333.hasHook, 'call', _334 => _334("afterResponse")]), () => ( false));
4638
+ const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _335 => _335.hasHook, 'call', _336 => _336("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _337 => _337.hasHook, 'call', _338 => _338("afterRender")]), () => ( false)));
4629
4639
  const opensRuntimeSession = pm ? opensFarmDevRuntimeSession(pm) : false;
4630
- const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _335 => _335.hasRuntimeHook, 'call', _336 => _336("after")]), () => ( false));
4640
+ const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _339 => _339.hasRuntimeHook, 'call', _340 => _340("after")]), () => ( false));
4631
4641
  const pageBuiltInRouteLabel = (pathname2) => {
4632
4642
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
4633
- const mcpLabel = _chunkB2PGVHBGcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4643
+ const mcpLabel = _chunk22BTYPIXcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4634
4644
  if (mcpLabel) return mcpLabel;
4635
4645
  if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
4636
4646
  return routePathname === _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH : null;
@@ -4639,13 +4649,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4639
4649
  const match = routeManager2.matchRoute(pathname2);
4640
4650
  return {
4641
4651
  kind: "page",
4642
- route: _chunkB2PGVHBGcjs.setFarmRouteLabel.call(void 0,
4652
+ route: _chunk22BTYPIXcjs.setFarmRouteLabel.call(void 0,
4643
4653
  {
4644
4654
  pathname: pathname2,
4645
- pattern: _optionalChain([match, 'optionalAccess', _337 => _337.route, 'optionalAccess', _338 => _338.pattern]) || null,
4646
- params: _optionalChain([match, 'optionalAccess', _339 => _339.params]) || {}
4655
+ pattern: _optionalChain([match, 'optionalAccess', _341 => _341.route, 'optionalAccess', _342 => _342.pattern]) || null,
4656
+ params: _optionalChain([match, 'optionalAccess', _343 => _343.params]) || {}
4647
4657
  },
4648
- _optionalChain([match, 'optionalAccess', _340 => _340.route]) ? null : pageBuiltInRouteLabel(pathname2)
4658
+ _optionalChain([match, 'optionalAccess', _344 => _344.route]) ? null : pageBuiltInRouteLabel(pathname2)
4649
4659
  )
4650
4660
  };
4651
4661
  };
@@ -4725,7 +4735,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4725
4735
  }) : void 0;
4726
4736
  let middlewareFailed = false;
4727
4737
  try {
4728
- if (_optionalChain([middlewareManager, 'optionalAccess', _341 => _341.hasMiddleware, 'call', _342 => _342()])) {
4738
+ if (_optionalChain([middlewareManager, 'optionalAccess', _345 => _345.hasMiddleware, 'call', _346 => _346()])) {
4729
4739
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
4730
4740
  const handled = await runFarmMiddlewareWithNavigation(
4731
4741
  farmApp.getServerRenderer(),
@@ -4738,7 +4748,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4738
4748
  throw error;
4739
4749
  });
4740
4750
  if (handled) {
4741
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _343 => _343.isEnded, 'call', _344 => _344()])) {
4751
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _347 => _347.isEnded, 'call', _348 => _348()])) {
4742
4752
  const duration = Date.now() - startTime;
4743
4753
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4744
4754
  }
@@ -4753,8 +4763,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4753
4763
  res
4754
4764
  );
4755
4765
  }
4756
- if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _345 => _345.isEnded, 'call', _346 => _346()])) {
4757
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _347 => _347.isEnded, 'call', _348 => _348()])) {
4766
+ if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _349 => _349.isEnded, 'call', _350 => _350()])) {
4767
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _351 => _351.isEnded, 'call', _352 => _352()])) {
4758
4768
  const duration = Date.now() - startTime;
4759
4769
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4760
4770
  }
@@ -4773,8 +4783,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4773
4783
  await pm.reportRuntimeRequestError(runtimeSession, error);
4774
4784
  } else {
4775
4785
  await pm.failRuntimeRequest(runtimeSession, error);
4776
- if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _349 => _349.isEnded, 'call', _350 => _350()])) {
4777
- _optionalChain([responseInterceptor, 'optionalAccess', _351 => _351.release, 'call', _352 => _352()]);
4786
+ if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _353 => _353.isEnded, 'call', _354 => _354()])) {
4787
+ _optionalChain([responseInterceptor, 'optionalAccess', _355 => _355.release, 'call', _356 => _356()]);
4778
4788
  console.error("[FARM] Page error:", error);
4779
4789
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
4780
4790
  return;
@@ -4791,7 +4801,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4791
4801
  }
4792
4802
  })
4793
4803
  );
4794
- const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _353 => _353.stack, 'access', _354 => _354.at, 'call', _355 => _355(-1), 'optionalAccess', _356 => _356.handle]);
4804
+ const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _357 => _357.stack, 'access', _358 => _358.at, 'call', _359 => _359(-1), 'optionalAccess', _360 => _360.handle]);
4795
4805
  if (farmOwnsDevCors && viteServer.config.server.cors === false) {
4796
4806
  farmMiddlewares.use(createFarmDevViteCorsMiddleware());
4797
4807
  }
@@ -4820,7 +4830,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4820
4830
  });
4821
4831
  }
4822
4832
  if (id.startsWith("@farm.js/core/internal/") && importer && isOutsideAppRoot(importer)) {
4823
- const root = _optionalChain([farmApp, 'optionalAccess', _357 => _357.getConfig, 'call', _358 => _358(), 'access', _359 => _359.root]) || _optionalChain([server, 'optionalAccess', _360 => _360.config, 'access', _361 => _361.root]) || options.root;
4833
+ const root = _optionalChain([farmApp, 'optionalAccess', _361 => _361.getConfig, 'call', _362 => _362(), 'access', _363 => _363.root]) || _optionalChain([server, 'optionalAccess', _364 => _364.config, 'access', _365 => _365.root]) || options.root;
4824
4834
  return this.resolve(id, path6.join(root, "package.json"), {
4825
4835
  ...resolveOptions,
4826
4836
  skipSelf: true
@@ -4848,7 +4858,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4848
4858
  }
4849
4859
  },
4850
4860
  async load(id, loadOptions) {
4851
- if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _362 => _362.ssr]) && !farmSetupContext.getStore()) {
4861
+ if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _366 => _366.ssr]) && !farmSetupContext.getStore()) {
4852
4862
  await pendingClientSetup;
4853
4863
  }
4854
4864
  if (_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && islandsServerFns()) {
@@ -4866,8 +4876,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4866
4876
  if (imageModule) return imageModule;
4867
4877
  }
4868
4878
  if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
4869
- const renderer = _optionalChain([farmApp, 'optionalAccess', _363 => _363.getConfig, 'call', _364 => _364(), 'access', _365 => _365.renderer]) || _chunkBCTHOQPPcjs.resolveFarmRenderer.call(void 0, options.renderer);
4870
- const root = _optionalChain([server, 'optionalAccess', _366 => _366.config, 'access', _367 => _367.root]) || options.root;
4879
+ const renderer = _optionalChain([farmApp, 'optionalAccess', _367 => _367.getConfig, 'call', _368 => _368(), 'access', _369 => _369.renderer]) || _chunk3OKSEJ33cjs.resolveFarmRenderer.call(void 0, options.renderer);
4880
+ const root = _optionalChain([server, 'optionalAccess', _370 => _370.config, 'access', _371 => _371.root]) || options.root;
4871
4881
  if (isClientEnvironment(this, loadOptions)) {
4872
4882
  return generateProgrammaticClientRouteModuleForId(
4873
4883
  id,
@@ -4883,32 +4893,30 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4883
4893
  return FARM_DEV_CLIENT_BOOT_MODULE;
4884
4894
  }
4885
4895
  if (isFarmClientVirtualId(id)) {
4886
- const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _368 => _368.getConfig, 'call', _369 => _369()]);
4887
- const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _370 => _370.renderer]) || _chunkBCTHOQPPcjs.resolveFarmRenderer.call(void 0, options.renderer);
4888
- const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _371 => _371.integrations]) || options.integrations;
4889
- const root = _optionalChain([resolvedConfig, 'optionalAccess', _372 => _372.root]) || _optionalChain([server, 'optionalAccess', _373 => _373.config, 'access', _374 => _374.root]) || process.cwd();
4890
- const docs = _optionalChain([resolvedConfig, 'optionalAccess', _375 => _375.docs]);
4891
- const adapterOwnsDocsRuntime = Boolean(
4892
- _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _376 => _376.adapter, 'optionalAccess', _377 => _377.server]) && docs.adapter.react
4893
- );
4894
- const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _378 => _378.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4896
+ const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _372 => _372.getConfig, 'call', _373 => _373()]);
4897
+ const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _374 => _374.renderer]) || _chunk3OKSEJ33cjs.resolveFarmRenderer.call(void 0, options.renderer);
4898
+ const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _375 => _375.integrations]) || options.integrations;
4899
+ const root = _optionalChain([resolvedConfig, 'optionalAccess', _376 => _376.root]) || _optionalChain([server, 'optionalAccess', _377 => _377.config, 'access', _378 => _378.root]) || process.cwd();
4900
+ const docs = _optionalChain([resolvedConfig, 'optionalAccess', _379 => _379.docs]);
4901
+ const adapterOwnsDocsRuntime = _chunkL2GUEYHRcjs.hasFarmDocsRuntimeAdapter.call(void 0, docs);
4902
+ const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _380 => _380.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4895
4903
  const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
4896
- _optionalChain([docs, 'optionalAccess', _379 => _379.enabled]) ? loadFarmDocsDevRuntime() : null,
4897
- _optionalChain([docs, 'optionalAccess', _380 => _380.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4904
+ _optionalChain([docs, 'optionalAccess', _381 => _381.enabled]) ? loadFarmDocsDevRuntime() : null,
4905
+ _optionalChain([docs, 'optionalAccess', _382 => _382.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4898
4906
  devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
4899
4907
  ]);
4900
- const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _381 => _381.isFarmDocsSearchEnabled, 'call', _382 => _382(docs)]), () => ( false));
4908
+ const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _383 => _383.isFarmDocsSearchEnabled, 'call', _384 => _384(docs)]), () => ( false));
4901
4909
  const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
4902
4910
  docsSearchEnabled,
4903
4911
  docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
4904
4912
  ) : EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME;
4905
4913
  const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
4906
- const generatedDevIndicatorsClientRuntime = farmApp ? _chunkUVV3I5QAcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
4914
+ const generatedDevIndicatorsClientRuntime = farmApp ? _chunkL2GUEYHRcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
4907
4915
  const integrationProviders = _chunkB3HQTGXScjs.getIntegrationProviders.call(void 0, integrations);
4908
- const isolatedHydrationMode = _chunkDRO3NXA3cjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4909
- _optionalChain([resolvedConfig, 'optionalAccess', _383 => _383.experimental, 'optionalAccess', _384 => _384.isolatedClientHydration]),
4916
+ const isolatedHydrationMode = _chunkEBSL5TW7cjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4917
+ _optionalChain([resolvedConfig, 'optionalAccess', _385 => _385.experimental, 'optionalAccess', _386 => _386.isolatedClientHydration]),
4910
4918
  {
4911
- serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _385 => _385.experimental, 'optionalAccess', _386 => _386.serverComponents])) === "rsc",
4919
+ serverComponents: _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _387 => _387.experimental, 'optionalAccess', _388 => _388.serverComponents])) === "rsc",
4912
4920
  hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
4913
4921
  }
4914
4922
  );
@@ -4916,32 +4924,32 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4916
4924
  integrationProviders,
4917
4925
  [
4918
4926
  ..._chunkB3HQTGXScjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
4919
- ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _387 => _387.getFarmDocsDocumentNavigationMatchers, 'call', _388 => _388(docs)]), () => ( []))
4927
+ ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _389 => _389.getFarmDocsDocumentNavigationMatchers, 'call', _390 => _390(docs)]), () => ( []))
4920
4928
  ],
4921
4929
  generatedDocsSearchRuntime,
4922
4930
  `${generatedDevtoolsClientRuntime}
4923
4931
  ${generatedDevIndicatorsClientRuntime}`,
4924
- _optionalChain([resolvedConfig, 'optionalAccess', _389 => _389.plugins]) || [],
4932
+ _optionalChain([resolvedConfig, 'optionalAccess', _391 => _391.plugins]) || [],
4925
4933
  root,
4926
- _optionalChain([resolvedConfig, 'optionalAccess', _390 => _390.srcDir]) || options.srcDir || "src",
4927
- _optionalChain([resolvedConfig, 'optionalAccess', _391 => _391.publicRuntimeConfig]) || options.publicRuntimeConfig,
4928
- _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _392 => _392.adapter, 'optionalAccess', _393 => _393.react]) : void 0,
4934
+ _optionalChain([resolvedConfig, 'optionalAccess', _392 => _392.srcDir]) || options.srcDir || "src",
4935
+ _optionalChain([resolvedConfig, 'optionalAccess', _393 => _393.publicRuntimeConfig]) || options.publicRuntimeConfig,
4936
+ adapterOwnsDocsRuntime ? _chunkL2GUEYHRcjs.getFarmDocsAdapterUIModule.call(void 0, _optionalChain([docs, 'optionalAccess', _394 => _394.adapter])) : void 0,
4929
4937
  renderer,
4930
- isolatedHydrationMode === "enabled" || _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _394 => _394.getRouteManager, 'call', _395 => _395(), 'access', _396 => _396.getIsolatedClientBoundaryModules, 'call', _397 => _397(root)])))), 'optionalAccess', _398 => _398.size]) > 0,
4931
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _399 => _399.trailingSlash]), () => ( false)),
4932
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _400 => _400.basePath]), () => ( "/")),
4933
- _chunkARORZ3MHcjs.generateClientCachePersistenceCode.call(void 0,
4934
- _chunkARORZ3MHcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _401 => _401.cache]))
4938
+ isolatedHydrationMode === "enabled" || _chunk3OKSEJ33cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _395 => _395.getRouteManager, 'call', _396 => _396(), 'access', _397 => _397.getIsolatedClientBoundaryModules, 'call', _398 => _398(root)])))), 'optionalAccess', _399 => _399.size]) > 0,
4939
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _400 => _400.trailingSlash]), () => ( false)),
4940
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _401 => _401.basePath]), () => ( "/")),
4941
+ _chunkOFVBMS6Icjs.generateClientCachePersistenceCode.call(void 0,
4942
+ _chunkOFVBMS6Icjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _402 => _402.cache]))
4935
4943
  ),
4936
- _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
4937
- _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _402 => _402.experimental, 'optionalAccess', _403 => _403.serverComponents])) === "islands"
4944
+ adapterOwnsDocsRuntime ? _chunkXJDB564Acjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
4945
+ _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _403 => _403.experimental, 'optionalAccess', _404 => _404.serverComponents])) === "islands"
4938
4946
  );
4939
4947
  }
4940
4948
  if (id === "/@farm/server") {
4941
4949
  return generateServerCode();
4942
4950
  }
4943
4951
  if (id === "/@farm/manifest") {
4944
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _404 => _404.getRouteManager, 'call', _405 => _405()]);
4952
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _405 => _405.getRouteManager, 'call', _406 => _406()]);
4945
4953
  if (!routeManager) {
4946
4954
  return `
4947
4955
  export const getManifest = () => ({
@@ -4953,11 +4961,11 @@ export const getManifest = () => ({
4953
4961
  });
4954
4962
  `;
4955
4963
  }
4956
- const globalStylesheetHref = _chunkARORZ3MHcjs.resolveDevGlobalStylesheetHref.call(void 0,
4964
+ const globalStylesheetHref = _chunkOFVBMS6Icjs.resolveDevGlobalStylesheetHref.call(void 0,
4957
4965
  server.config.root,
4958
- _optionalChain([farmApp, 'optionalAccess', _406 => _406.getConfig, 'call', _407 => _407(), 'access', _408 => _408.srcDir])
4966
+ _optionalChain([farmApp, 'optionalAccess', _407 => _407.getConfig, 'call', _408 => _408(), 'access', _409 => _409.srcDir])
4959
4967
  );
4960
- const fullManifest = _chunkARORZ3MHcjs.createFarmDevClientManifest.call(void 0,
4968
+ const fullManifest = _chunkOFVBMS6Icjs.createFarmDevClientManifest.call(void 0,
4961
4969
  routeManager.generateClientManifest(server.config.root),
4962
4970
  {
4963
4971
  sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
@@ -4973,64 +4981,64 @@ export { manifest };
4973
4981
  }
4974
4982
  },
4975
4983
  async transform(code, id, transformOptions) {
4976
- if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _409 => _409.ssr]) && !farmSetupContext.getStore()) {
4984
+ if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _410 => _410.ssr]) && !farmSetupContext.getStore()) {
4977
4985
  await pendingClientSetup;
4978
4986
  }
4979
- const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _410 => _410.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
4980
- const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _411 => _411.getConfig, 'call', _412 => _412()]), () => ( options));
4987
+ const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _411 => _411.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
4988
+ const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _412 => _412.getConfig, 'call', _413 => _413()]), () => ( options));
4981
4989
  let rewrotePackageImports = false;
4982
- if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _413 => _413.experimental, 'optionalAccess', _414 => _414.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _415 => _415.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkDRO3NXA3cjs.hasUseClientDirective.call(void 0, code)) {
4990
+ if (_chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _414 => _414.experimental, 'optionalAccess', _415 => _415.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _416 => _416.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkEBSL5TW7cjs.hasUseClientDirective.call(void 0, code)) {
4983
4991
  const file = id.split("?", 1)[0];
4984
- const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _416 => _416.config, 'access', _417 => _417.root]) || process.cwd();
4992
+ const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _417 => _417.config, 'access', _418 => _418.root]) || process.cwd();
4985
4993
  const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
4986
4994
  const rewrite = () => {
4987
- if (_optionalChain([transformOptions, 'optionalAccess', _418 => _418.ssr]) === true) {
4995
+ if (_optionalChain([transformOptions, 'optionalAccess', _419 => _419.ssr]) === true) {
4988
4996
  if (farmReactServerFiles.has(file)) {
4989
- for (const child of _chunkDRO3NXA3cjs.farmRelativeImportFiles.call(void 0, code, file))
4997
+ for (const child of _chunkEBSL5TW7cjs.farmRelativeImportFiles.call(void 0, code, file))
4990
4998
  farmReactServerFiles.add(child);
4991
4999
  }
4992
- const serverModule = farmReactServerFiles.has(file) || !_chunkDRO3NXA3cjs.getFarmClientReachableModules.call(void 0,
5000
+ const serverModule = farmReactServerFiles.has(file) || !_chunkEBSL5TW7cjs.getFarmClientReachableModules.call(void 0,
4993
5001
  path6.resolve(projectRoot, actionConfig.srcDir || "src"),
4994
5002
  projectRoot
4995
5003
  ).has(path6.resolve(file));
4996
- const reactServer = !serverModule ? null : _chunkDRO3NXA3cjs.rewriteFarmReactServerImports.call(void 0, {
5004
+ const reactServer = !serverModule ? null : _chunkEBSL5TW7cjs.rewriteFarmReactServerImports.call(void 0, {
4997
5005
  code,
4998
5006
  file,
4999
- reference: (specifier, exportName) => _chunkDRO3NXA3cjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
5007
+ reference: (specifier, exportName) => _chunkEBSL5TW7cjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
5000
5008
  onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
5001
5009
  });
5002
5010
  if (reactServer !== null) {
5003
5011
  code = reactServer;
5004
5012
  rewrotePackageImports = true;
5005
5013
  }
5006
- const internal = farmReactServerFiles.has(file) ? _chunkDRO3NXA3cjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
5014
+ const internal = farmReactServerFiles.has(file) ? _chunkEBSL5TW7cjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
5007
5015
  code,
5008
5016
  file,
5009
- reference: (clientFile) => _chunkDRO3NXA3cjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
5017
+ reference: (clientFile) => _chunkEBSL5TW7cjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
5010
5018
  }) : null;
5011
5019
  if (internal !== null) {
5012
5020
  code = internal;
5013
5021
  rewrotePackageImports = true;
5014
5022
  }
5015
5023
  }
5016
- const rewritePackageImports = (source2) => _chunkDRO3NXA3cjs.rewriteFarmPackageClientImports.call(void 0, {
5024
+ const rewritePackageImports = (source2) => _chunkEBSL5TW7cjs.rewriteFarmPackageClientImports.call(void 0, {
5017
5025
  code: source2,
5018
5026
  file,
5019
5027
  root: projectRoot,
5020
- isClientPackage: (specifier) => _chunkDRO3NXA3cjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
5028
+ isClientPackage: (specifier) => _chunkEBSL5TW7cjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
5021
5029
  });
5022
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _419 => _419.getRouteManager, 'call', _420 => _420()]);
5030
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _420 => _420.getRouteManager, 'call', _421 => _421()]);
5023
5031
  const source = code;
5024
5032
  const referenced = routeManager ? routeManager.inspectPackages(() => rewritePackageImports(source)) : rewritePackageImports(source);
5025
5033
  if (referenced !== null) {
5026
5034
  code = referenced;
5027
5035
  rewrotePackageImports = true;
5028
5036
  }
5029
- if (_optionalChain([transformOptions, 'optionalAccess', _421 => _421.ssr]) === true) {
5037
+ if (_optionalChain([transformOptions, 'optionalAccess', _422 => _422.ssr]) === true) {
5030
5038
  const cached = rewriteFarmReactCacheImport(
5031
5039
  code,
5032
5040
  file,
5033
- _optionalChain([runtimeModule, 'optionalCall', _422 => _422(FARM_REACT_CACHE_MODULE)])
5041
+ _optionalChain([runtimeModule, 'optionalCall', _423 => _423(FARM_REACT_CACHE_MODULE)])
5034
5042
  );
5035
5043
  if (cached !== null) {
5036
5044
  code = cached;
@@ -5038,12 +5046,12 @@ export { manifest };
5038
5046
  }
5039
5047
  }
5040
5048
  };
5041
- if (buildSnapshot) _chunkDRO3NXA3cjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
5049
+ if (buildSnapshot) _chunkEBSL5TW7cjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
5042
5050
  else rewrite();
5043
5051
  }
5044
5052
  if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
5045
5053
  const serverFns = _chunkPIUTGRDIcjs.transformFarmServerFns.call(void 0, code, id, {
5046
- environment: _optionalChain([transformOptions, 'optionalAccess', _423 => _423.ssr]) === true ? "rsc" : "client"
5054
+ environment: _optionalChain([transformOptions, 'optionalAccess', _424 => _424.ssr]) === true ? "rsc" : "client"
5047
5055
  });
5048
5056
  if (serverFns) {
5049
5057
  if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
@@ -5056,8 +5064,8 @@ export { manifest };
5056
5064
  const actionModule = transformFarmFormActionModule({
5057
5065
  code,
5058
5066
  id,
5059
- root: actionConfig.root || _optionalChain([server, 'optionalAccess', _424 => _424.config, 'access', _425 => _425.root]) || process.cwd(),
5060
- ssr: _optionalChain([transformOptions, 'optionalAccess', _426 => _426.ssr]) === true,
5067
+ root: actionConfig.root || _optionalChain([server, 'optionalAccess', _425 => _425.config, 'access', _426 => _426.root]) || process.cwd(),
5068
+ ssr: _optionalChain([transformOptions, 'optionalAccess', _427 => _427.ssr]) === true,
5061
5069
  // Parsed by file type: page components are TSX.
5062
5070
  parse: (source) => _vite.parseSync.call(void 0, file, source).program,
5063
5071
  runtimeModule,
@@ -5065,21 +5073,21 @@ export { manifest };
5065
5073
  });
5066
5074
  if (actionModule) return { code: actionModule, map: null };
5067
5075
  }
5068
- if (!_optionalChain([transformOptions, 'optionalAccess', _427 => _427.ssr])) {
5069
- const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _428 => _428.getConfig, 'call', _429 => _429(), 'optionalAccess', _430 => _430.docs]));
5070
- if (_chunkARORZ3MHcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
5071
- const redacted = _chunkARORZ3MHcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
5076
+ if (!_optionalChain([transformOptions, 'optionalAccess', _428 => _428.ssr])) {
5077
+ const docsConfigModule = _chunkXJDB564Acjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _429 => _429.getConfig, 'call', _430 => _430(), 'optionalAccess', _431 => _431.docs]));
5078
+ if (_chunkOFVBMS6Icjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
5079
+ const redacted = _chunkOFVBMS6Icjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
5072
5080
  if (redacted !== null) return { code: redacted, map: null };
5073
5081
  }
5074
5082
  }
5075
- if (!_optionalChain([transformOptions, 'optionalAccess', _431 => _431.ssr])) {
5076
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _432 => _432.getConfig, 'call', _433 => _433()]), () => ( options));
5077
- if ((_optionalChain([currentConfig, 'access', _434 => _434.experimental, 'optionalAccess', _435 => _435.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
5083
+ if (!_optionalChain([transformOptions, 'optionalAccess', _432 => _432.ssr])) {
5084
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _433 => _433.getConfig, 'call', _434 => _434()]), () => ( options));
5085
+ if ((_optionalChain([currentConfig, 'access', _435 => _435.experimental, 'optionalAccess', _436 => _436.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
5078
5086
  const violation = findClientServerFnViolation(code, id);
5079
5087
  if (violation) {
5080
- const locate = _chunkDRO3NXA3cjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5088
+ const locate = _chunkEBSL5TW7cjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5081
5089
  this.error(
5082
- _chunkDRO3NXA3cjs.formatFarmDiagnostic.call(void 0,
5090
+ _chunkEBSL5TW7cjs.formatFarmDiagnostic.call(void 0,
5083
5091
  createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
5084
5092
  currentConfig.root
5085
5093
  )
@@ -5087,8 +5095,8 @@ export { manifest };
5087
5095
  }
5088
5096
  }
5089
5097
  }
5090
- if (!_optionalChain([transformOptions, 'optionalAccess', _436 => _436.ssr]) && shouldInspectClientBoundary(id, code)) {
5091
- await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _437 => _437.getConfig, 'call', _438 => _438()]), () => ( options)));
5098
+ if (!_optionalChain([transformOptions, 'optionalAccess', _437 => _437.ssr]) && shouldInspectClientBoundary(id, code)) {
5099
+ await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _438 => _438.getConfig, 'call', _439 => _439()]), () => ( options)));
5092
5100
  }
5093
5101
  if (typeof imageImports.transform === "function") {
5094
5102
  const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
@@ -5103,13 +5111,13 @@ export { manifest };
5103
5111
  id,
5104
5112
  transformOptions
5105
5113
  );
5106
- const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _439 => _439.code, 'optionalAccess', _440 => _440.toString, 'call', _441 => _441()]);
5114
+ const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _440 => _440.code, 'optionalAccess', _441 => _441.toString, 'call', _442 => _442()]);
5107
5115
  if (fontCode) {
5108
5116
  transformedCode = fontCode;
5109
5117
  transformed = true;
5110
5118
  }
5111
5119
  }
5112
- if (_optionalChain([transformOptions, 'optionalAccess', _442 => _442.ssr]) && server) {
5120
+ if (_optionalChain([transformOptions, 'optionalAccess', _443 => _443.ssr]) && server) {
5113
5121
  const rewrittenImports = rewriteEarlySsrRelativeImports({
5114
5122
  code: transformedCode,
5115
5123
  id,
@@ -5121,26 +5129,27 @@ export { manifest };
5121
5129
  transformed = true;
5122
5130
  }
5123
5131
  }
5124
- if (_chunkDRO3NXA3cjs.hasUseClientDirective.call(void 0, transformedCode)) {
5132
+ if (_chunkEBSL5TW7cjs.hasUseClientDirective.call(void 0, transformedCode)) {
5125
5133
  const clientBoundarySource = transformedCode;
5126
5134
  const moduleInfo = this.getModuleInfo(id);
5127
5135
  if (moduleInfo) {
5128
5136
  moduleInfo.isClientComponent = true;
5129
5137
  }
5130
- transformedCode = _chunkDRO3NXA3cjs.stripUseClientDirective.call(void 0, transformedCode);
5138
+ transformedCode = _chunkEBSL5TW7cjs.stripUseClientDirective.call(void 0, transformedCode);
5131
5139
  transformed = true;
5132
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _443 => _443.getConfig, 'call', _444 => _444()]), () => ( options));
5140
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _444 => _444.getConfig, 'call', _445 => _445()]), () => ( options));
5133
5141
  let isolatedModuleReference = null;
5134
- const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _445 => _445.config, 'access', _446 => _446.root]) || process.cwd();
5142
+ let rendererIslandModule = false;
5143
+ const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _446 => _446.config, 'access', _447 => _447.root]) || process.cwd();
5135
5144
  const cleanId = id.split("?", 1)[0];
5136
- const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _447 => _447.getRouteManager, 'call', _448 => _448(), 'access', _449 => _449.getIsolatedClientBoundaryModules, 'call', _450 => _450(root)])));
5137
- const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _451 => _451.has, 'call', _452 => _452(path6.resolve(cleanId))]) === true;
5138
- if (_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, _chunkBCTHOQPPcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkDRO3NXA3cjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5139
- cleanId.replace(/\\/g, "/").includes(_chunkDRO3NXA3cjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5145
+ const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _448 => _448.getRouteManager, 'call', _449 => _449(), 'access', _450 => _450.getIsolatedClientBoundaryModules, 'call', _451 => _451(root)])));
5146
+ const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _452 => _452.has, 'call', _453 => _453(path6.resolve(cleanId))]) === true;
5147
+ if (_chunk3OKSEJ33cjs.isReactRenderer.call(void 0, _chunk3OKSEJ33cjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkEBSL5TW7cjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5148
+ cleanId.replace(/\\/g, "/").includes(_chunkEBSL5TW7cjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5140
5149
  isolatedModuleReference = _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, cleanId, root);
5141
- const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _453 => _453.experimental, 'optionalAccess', _454 => _454.serverComponents])) === "islands";
5142
- const explicitStrategy = _chunkDRO3NXA3cjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5143
- const inference = islandsMode && explicitStrategy === null ? _chunkARORZ3MHcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5150
+ const islandsMode = _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _454 => _454.experimental, 'optionalAccess', _455 => _455.serverComponents])) === "islands";
5151
+ const explicitStrategy = _chunkEBSL5TW7cjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5152
+ const inference = islandsMode && explicitStrategy === null ? _chunkOFVBMS6Icjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5144
5153
  if (inference) {
5145
5154
  for (const file of inference.files) {
5146
5155
  if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
@@ -5153,8 +5162,8 @@ export { manifest };
5153
5162
  islandStrategy: _nullishCoalesce(explicitStrategy, () => ( "load")),
5154
5163
  parse: (source) => this.parse(source),
5155
5164
  slots: islandsMode,
5156
- browser: _optionalChain([transformOptions, 'optionalAccess', _455 => _455.ssr]) !== true,
5157
- inferredInteraction: _optionalChain([inference, 'optionalAccess', _456 => _456.strategy]) === "interaction",
5165
+ browser: _optionalChain([transformOptions, 'optionalAccess', _456 => _456.ssr]) !== true,
5166
+ inferredInteraction: _optionalChain([inference, 'optionalAccess', _457 => _457.strategy]) === "interaction",
5158
5167
  runtimeModule
5159
5168
  });
5160
5169
  if (!transformedBoundary) {
@@ -5163,6 +5172,24 @@ export { manifest };
5163
5172
  );
5164
5173
  }
5165
5174
  transformedCode = transformedBoundary;
5175
+ } else if (selectedForIsolatedHydration && _chunkMAPHNGTFcjs.usesFarmRendererIslands.call(void 0, currentConfig) && (_chunkEBSL5TW7cjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || cleanId.replace(/\\/g, "/").includes(_chunkEBSL5TW7cjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5176
+ rendererIslandModule = true;
5177
+ if (_optionalChain([transformOptions, 'optionalAccess', _458 => _458.ssr]) === true) {
5178
+ const renderer = _chunk3OKSEJ33cjs.resolveFarmRenderer.call(void 0, currentConfig.renderer);
5179
+ const transformedBoundary = transformIsolatedClientBoundaryModule({
5180
+ code: transformedCode,
5181
+ moduleReference: _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, cleanId, root),
5182
+ islandStrategy: _nullishCoalesce(_chunkEBSL5TW7cjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
5183
+ parse: (source) => this.parse(source),
5184
+ withIsland: renderer.server
5185
+ });
5186
+ if (!transformedBoundary) {
5187
+ this.error(
5188
+ `[Farm.js] Could not compile the island module ${cleanId} for renderer \`${renderer.name}\`. Set experimental.isolatedClientHydration = "off" to hydrate its routes whole.`
5189
+ );
5190
+ }
5191
+ transformedCode = transformedBoundary;
5192
+ }
5166
5193
  }
5167
5194
  if (!farmApp) {
5168
5195
  return {
@@ -5185,7 +5212,7 @@ export { manifest };
5185
5212
  );
5186
5213
  return;
5187
5214
  }` : "";
5188
- const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _457 => _457.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5215
+ const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _459 => _459.ssr]) || reactRefreshActive || rendererIslandModule || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5189
5216
  if (import.meta.hot) {
5190
5217
  import.meta.hot.accept((newModule) => {
5191
5218
  ${isolatedHmrUpdate}
@@ -5241,14 +5268,14 @@ if (import.meta.hot) {
5241
5268
  }
5242
5269
  _chunk7U4XF76Rcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
5243
5270
  _chunk7U4XF76Rcjs.logger.info("Pre-rendering SSG pages...");
5244
- const outDir = path6.join(_optionalChain([server, 'optionalAccess', _458 => _458.config, 'access', _459 => _459.root]) || process.cwd(), options.outDir || "dist");
5271
+ const outDir = path6.join(_optionalChain([server, 'optionalAccess', _460 => _460.config, 'access', _461 => _461.root]) || process.cwd(), options.outDir || "dist");
5245
5272
  const clientDir = path6.join(outDir, "client");
5246
5273
  for (const page of ssgPages) {
5247
5274
  try {
5248
5275
  const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
5249
5276
  await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
5250
5277
  const mod = await routeManager.loadRouteModule(page.filePath);
5251
- if (!_optionalChain([mod, 'optionalAccess', _460 => _460.default])) return;
5278
+ if (!_optionalChain([mod, 'optionalAccess', _462 => _462.default])) return;
5252
5279
  const { layouts } = routeManager.matchRoute(page.urlPath);
5253
5280
  const layoutModules = await Promise.all(
5254
5281
  layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
@@ -5280,7 +5307,7 @@ if (import.meta.hot) {
5280
5307
  const i18nSnapshot = _chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, );
5281
5308
  const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
5282
5309
  const fullHtml = `<!DOCTYPE html>
5283
- <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _461 => _461.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5310
+ <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _463 => _463.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5284
5311
  <head>
5285
5312
  <meta charset="utf-8">
5286
5313
  <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -5325,12 +5352,12 @@ if (import.meta.hot) {
5325
5352
  watchChange(id, change) {
5326
5353
  const watched = _chunk7U4XF76Rcjs.toPosixPath.call(void 0, id);
5327
5354
  if (!watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched)) {
5328
- _optionalChain([farmApp, 'optionalAccess', _462 => _462.getRouteManager, 'call', _463 => _463(), 'access', _464 => _464.noteSourceChange, 'call', _465 => _465(id, change.event)]);
5355
+ _optionalChain([farmApp, 'optionalAccess', _464 => _464.getRouteManager, 'call', _465 => _465(), 'access', _466 => _466.noteSourceChange, 'call', _467 => _467(id, change.event)]);
5329
5356
  }
5330
- _chunkDRO3NXA3cjs.invalidateFarmClientReachableModules.call(void 0, );
5331
- _chunkDRO3NXA3cjs.invalidateFarmClientOnlyScan.call(void 0, );
5332
- _chunkARORZ3MHcjs.invalidateFarmRouteRootInferences.call(void 0, );
5333
- _chunkDRO3NXA3cjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5357
+ _chunkEBSL5TW7cjs.invalidateFarmClientReachableModules.call(void 0, );
5358
+ _chunkEBSL5TW7cjs.invalidateFarmClientOnlyScan.call(void 0, );
5359
+ _chunkOFVBMS6Icjs.invalidateFarmRouteRootInferences.call(void 0, );
5360
+ _chunkEBSL5TW7cjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5334
5361
  },
5335
5362
  async handleHotUpdate(ctx) {
5336
5363
  if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
@@ -5355,7 +5382,7 @@ if (import.meta.hot) {
5355
5382
  server2.moduleGraph.invalidateModule(mod);
5356
5383
  }
5357
5384
  }
5358
- const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _466 => _466.getConfig, 'call', _467 => _467()]);
5385
+ const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _468 => _468.getConfig, 'call', _469 => _469()]);
5359
5386
  const normalizedFile = file.replace(/\\/g, "/");
5360
5387
  const reloadAfterEdit = () => {
5361
5388
  for (const files of pendingRouteReloads) {
@@ -5363,10 +5390,10 @@ if (import.meta.hot) {
5363
5390
  }
5364
5391
  server2.ws.send({ type: "full-reload", path: "*" });
5365
5392
  };
5366
- if (normalizedFile.includes(_chunkDRO3NXA3cjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5393
+ if (normalizedFile.includes(_chunkEBSL5TW7cjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5367
5394
  path6.posix.join(
5368
- _chunk7U4XF76Rcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _468 => _468.root]) || options.root || server2.config.root),
5369
- _chunkDRO3NXA3cjs.FARM_CLIENT_REFERENCE_DIRECTORY
5395
+ _chunk7U4XF76Rcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _470 => _470.root]) || options.root || server2.config.root),
5396
+ _chunkEBSL5TW7cjs.FARM_CLIENT_REFERENCE_DIRECTORY
5370
5397
  )
5371
5398
  ))
5372
5399
  return modules;
@@ -5374,7 +5401,7 @@ if (import.meta.hot) {
5374
5401
  (appDir) => normalizedFile.startsWith(`${_chunk7U4XF76Rcjs.toPosixPath.call(void 0, appDir)}/api/`)
5375
5402
  )) {
5376
5403
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
5377
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _469 => _469(`updated ${file}`)]);
5404
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _471 => _471(`updated ${file}`)]);
5378
5405
  reloadAfterEdit();
5379
5406
  return [];
5380
5407
  }
@@ -5384,7 +5411,7 @@ if (import.meta.hot) {
5384
5411
  for (const mod of modules) {
5385
5412
  server2.moduleGraph.invalidateModule(mod);
5386
5413
  }
5387
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _470 => _470(`updated ${file}`)]);
5414
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _472 => _472(`updated ${file}`)]);
5388
5415
  reloadAfterEdit();
5389
5416
  return [];
5390
5417
  }
@@ -5394,22 +5421,22 @@ if (import.meta.hot) {
5394
5421
  for (const mod of modules) {
5395
5422
  server2.moduleGraph.invalidateModule(mod);
5396
5423
  }
5397
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _471 => _471(`updated ${file}`)]);
5424
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _473 => _473(`updated ${file}`)]);
5398
5425
  reloadAfterEdit();
5399
5426
  return [];
5400
5427
  }
5401
5428
  if (apiRouteManager && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
5402
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _472 => _472(`updated ${file}`)]);
5429
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _474 => _474(`updated ${file}`)]);
5403
5430
  }
5404
- const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _473 => _473.experimental, 'optionalAccess', _474 => _474.isolatedClientHydration]);
5405
- const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _475 => _475.getRouteManager, 'call', _476 => _476()]);
5431
+ const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _475 => _475.experimental, 'optionalAccess', _476 => _476.isolatedClientHydration]);
5432
+ const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _477 => _477.getRouteManager, 'call', _478 => _478()]);
5406
5433
  const isHydrationPlanSource = /\.[cm]?[jt]sx?$/.test(normalizedFile) && !normalizedFile.includes("/node_modules/") && !isFarmGeneratedOutput(normalizedFile);
5407
- const tracksAsyncOwnerIslands = _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _477 => _477.renderer])) && planRouteManager !== void 0;
5434
+ const tracksAsyncOwnerIslands = _chunk3OKSEJ33cjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _479 => _479.renderer])) && planRouteManager !== void 0;
5408
5435
  let clientPlanCurrent = false;
5409
5436
  if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
5410
5437
  const routeManager = planRouteManager;
5411
- await _optionalChain([ctx, 'access', _478 => _478.read, 'optionalCall', _479 => _479()]);
5412
- if (_optionalChain([routeManager, 'optionalAccess', _480 => _480.isEditPlanNeutral, 'call', _481 => _481(file)])) {
5438
+ await _optionalChain([ctx, 'access', _480 => _480.read, 'optionalCall', _481 => _481()]);
5439
+ if (_optionalChain([routeManager, 'optionalAccess', _482 => _482.isEditPlanNeutral, 'call', _483 => _483(file)])) {
5413
5440
  clientPlanCurrent = true;
5414
5441
  } else if (routeManager) {
5415
5442
  routeManager.noteSourceChange(file, "update");
@@ -5453,7 +5480,8 @@ if (import.meta.hot) {
5453
5480
  }
5454
5481
  }
5455
5482
  }
5456
- if (normalizedFile.includes("/app/")) {
5483
+ const rendererRouteFile = _optionalChain([farmApp, 'optionalAccess', _484 => _484.getRouteManager, 'call', _485 => _485(), 'access', _486 => _486.isRendererRouteModule, 'call', _487 => _487(normalizedFile)]) === true;
5484
+ if (normalizedFile.includes("/app/") || rendererRouteFile) {
5457
5485
  if (normalizedFile.includes("middleware.")) {
5458
5486
  if (middlewareManager) {
5459
5487
  await middlewareManager.reload();
@@ -5470,12 +5498,12 @@ if (import.meta.hot) {
5470
5498
  }
5471
5499
  return [];
5472
5500
  }
5473
- if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _482 => _482.getRouteManager, 'call', _483 => _483(), 'access', _484 => _484.invalidateClientManifest, 'call', _485 => _485()]);
5501
+ if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _488 => _488.getRouteManager, 'call', _489 => _489(), 'access', _490 => _490.invalidateClientManifest, 'call', _491 => _491()]);
5474
5502
  const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
5475
5503
  if (manifestModule) {
5476
5504
  server2.moduleGraph.invalidateModule(manifestModule);
5477
5505
  }
5478
- if (normalizedFile.includes("page.") || normalizedFile.includes("layout.")) {
5506
+ if (normalizedFile.includes("page.") || normalizedFile.includes("layout.") || rendererRouteFile) {
5479
5507
  const shortPath = normalizedFile.split("/app/")[1] || normalizedFile;
5480
5508
  logUpdate("PAGE", `updated ${shortPath}`);
5481
5509
  for (const mod of modules) {
@@ -5485,7 +5513,7 @@ if (import.meta.hot) {
5485
5513
  return [];
5486
5514
  }
5487
5515
  }
5488
- if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _486 => _486.environments, 'access', _487 => _487.client, 'optionalAccess', _488 => _488.moduleGraph, 'access', _489 => _489.getModulesByFile, 'call', _490 => _490(normalizedFile), 'optionalAccess', _491 => _491.size]) && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
5516
+ if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _492 => _492.environments, 'access', _493 => _493.client, 'optionalAccess', _494 => _494.moduleGraph, 'access', _495 => _495.getModulesByFile, 'call', _496 => _496(normalizedFile), 'optionalAccess', _497 => _497.size]) && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
5489
5517
  logUpdate("PAGE", `updated ${path6.basename(file)}`);
5490
5518
  reloadAfterEdit();
5491
5519
  return [];
@@ -5583,7 +5611,7 @@ function createPageDataMiddlewareResponse(res) {
5583
5611
  return (...args) => {
5584
5612
  if (captures(target.statusCode, target.getHeader("location"))) {
5585
5613
  const callback = args.find((arg) => typeof arg === "function");
5586
- _optionalChain([callback, 'optionalCall', _492 => _492()]);
5614
+ _optionalChain([callback, 'optionalCall', _498 => _498()]);
5587
5615
  return property === "write" ? true : response;
5588
5616
  }
5589
5617
  return target[property](...args);
@@ -5647,12 +5675,12 @@ function isFarmClientVirtualId(id) {
5647
5675
  }
5648
5676
  function isClientEnvironment(context, loadOptions) {
5649
5677
  const environment = context.environment;
5650
- if (_optionalChain([environment, 'optionalAccess', _493 => _493.config, 'optionalAccess', _494 => _494.consumer])) return environment.config.consumer === "client";
5651
- if (_optionalChain([environment, 'optionalAccess', _495 => _495.name])) return environment.name === "client";
5652
- return _optionalChain([loadOptions, 'optionalAccess', _496 => _496.ssr]) !== true;
5678
+ if (_optionalChain([environment, 'optionalAccess', _499 => _499.config, 'optionalAccess', _500 => _500.consumer])) return environment.config.consumer === "client";
5679
+ if (_optionalChain([environment, 'optionalAccess', _501 => _501.name])) return environment.name === "client";
5680
+ return _optionalChain([loadOptions, 'optionalAccess', _502 => _502.ssr]) !== true;
5653
5681
  }
5654
5682
  function invalidateProgrammaticClientRouteModules(server) {
5655
- const graph = _optionalChain([server, 'access', _497 => _497.environments, 'optionalAccess', _498 => _498.client, 'optionalAccess', _499 => _499.moduleGraph]);
5683
+ const graph = _optionalChain([server, 'access', _503 => _503.environments, 'optionalAccess', _504 => _504.client, 'optionalAccess', _505 => _505.moduleGraph]);
5656
5684
  if (!graph) return;
5657
5685
  for (const [id, module] of graph.idToModuleMap) {
5658
5686
  if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
@@ -5662,27 +5690,27 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
5662
5690
  const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5663
5691
  const routesFile = resolveRealModuleFile(parsed.filePath, root);
5664
5692
  watchFile(routesFile);
5665
- return _chunkDRO3NXA3cjs.generateProgrammaticClientRouteModule.call(void 0, {
5693
+ return _chunkEBSL5TW7cjs.generateProgrammaticClientRouteModule.call(void 0, {
5666
5694
  kind: parsed.kind,
5667
5695
  routePath: parsed.routePath,
5668
5696
  routesFile,
5669
- route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _500 => _500.routes, 'access', _501 => _501.get, 'call', _502 => _502(
5670
- _chunkDRO3NXA3cjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5697
+ route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _506 => _506.routes, 'access', _507 => _507.get, 'call', _508 => _508(
5698
+ _chunkEBSL5TW7cjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5671
5699
  )]),
5672
5700
  // React's client module exports no createElement; the main client entry imports React too.
5673
- rendererClient: _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
5701
+ rendererClient: _chunk3OKSEJ33cjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
5674
5702
  toImportSpecifier: (file) => toProgrammaticRouteImportSpecifier(file, root)
5675
5703
  });
5676
5704
  }
5677
5705
  function resolveRealModuleFile(filePath, root) {
5678
- const resolved = _nullishCoalesce(_chunkDRO3NXA3cjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5706
+ const resolved = _nullishCoalesce(_chunkEBSL5TW7cjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5679
5707
  try {
5680
5708
  return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
5681
5709
  } catch (e29) {
5682
5710
  return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, resolved);
5683
5711
  }
5684
5712
  }
5685
- function generateProgrammaticRouteModule(moduleId, root, renderer = _chunkBCTHOQPPcjs.REACT_RENDERER) {
5713
+ function generateProgrammaticRouteModule(moduleId, root, renderer = _chunk3OKSEJ33cjs.REACT_RENDERER) {
5686
5714
  const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5687
5715
  if (!parsed) {
5688
5716
  return "";
@@ -5989,12 +6017,12 @@ async function parseRouteModuleProps(routeModule, input) {
5989
6017
  }
5990
6018
  const schemas = routeModule.__farmRouteSchemas;
5991
6019
  const params = parseRouteModuleSchema(
5992
- _optionalChain([schemas, 'optionalAccess', _503 => _503.params]),
6020
+ _optionalChain([schemas, 'optionalAccess', _509 => _509.params]),
5993
6021
  input.props.params,
5994
6022
  "params",
5995
6023
  input.routePath
5996
6024
  );
5997
- const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _504 => _504.search]), input.search, "search", input.routePath);
6025
+ const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _510 => _510.search]), input.search, "search", input.routePath);
5998
6026
  return {
5999
6027
  ...input.props,
6000
6028
  params,
@@ -6013,8 +6041,8 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
6013
6041
  throw new Error(`Invalid ${label} for route "${routePath}": ${message}`);
6014
6042
  }
6015
6043
  }
6016
- function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterReact, renderer = _chunkBCTHOQPPcjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
6017
- const providerClientCode = _chunkARORZ3MHcjs.generateFarmIntegrationProviderClientCode.call(void 0,
6044
+ function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterUI, renderer = _chunk3OKSEJ33cjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
6045
+ const providerClientCode = _chunkOFVBMS6Icjs.generateFarmIntegrationProviderClientCode.call(void 0,
6018
6046
  integrationProviders,
6019
6047
  root,
6020
6048
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
@@ -6025,8 +6053,8 @@ function generateClientCode(integrationProviders = [], documentNavigationMatcher
6025
6053
  srcDir,
6026
6054
  publicRuntimeConfig
6027
6055
  );
6028
- const appSetupPath = _chunkBCTHOQPPcjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
6029
- const rendererClientImports = _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
6056
+ const appSetupPath = _chunk3OKSEJ33cjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
6057
+ const rendererClientImports = _chunk3OKSEJ33cjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
6030
6058
  import { hydrateRoot, createRoot } from 'react-dom/client'
6031
6059
  import { restorePagePosition } from '@farm.js/core/internal/client-runtime'` : (
6032
6060
  // Named exports only: a renderer's client module needs no default export. `React` is a
@@ -6040,12 +6068,46 @@ __farmConfigureApp(__farmAppSetup)` : `import * as __farmRendererClient from ${J
6040
6068
  import { hydrateRoot, createRoot } from ${JSON.stringify(renderer.client)}
6041
6069
  const React = { ...__farmRendererClient }`
6042
6070
  );
6043
- const isolatedHydrationImport = isolatedHydrationEnabled ? `${islandValues ? "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph, createFarmServerTreeElement, createFarmServerTreeLayout } from '@farm.js/core/internal/islands-runtime'" : "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph } from '@farm.js/core/internal/isolated-boundary'\nimport { createFarmServerTreeElement } from '@farm.js/core/internal/server-tree'"}` : "";
6044
- const docsAdapterImportBlock = _chunkSM2SYWARcjs.generateFarmDocsAdapterClientRuntime.call(void 0,
6045
- docsAdapterReact,
6046
- docsConfigModule
6071
+ const rendererIslands = isolatedHydrationEnabled && !islandValues && !_chunk3OKSEJ33cjs.isReactRenderer.call(void 0, renderer) && _chunk3OKSEJ33cjs.getFarmRendererCapabilities.call(void 0, renderer).islands;
6072
+ const isolatedHydrationImport = rendererIslands ? "import { createFarmRendererIslandRuntime } from '@farm.js/core/internal/renderer-islands'" : isolatedHydrationEnabled ? `${islandValues ? "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph, createFarmServerTreeElement, createFarmServerTreeLayout } from '@farm.js/core/internal/islands-runtime'" : "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph } from '@farm.js/core/internal/isolated-boundary'\nimport { createFarmServerTreeElement } from '@farm.js/core/internal/server-tree'"}` : "";
6073
+ const docsAdapterImportBlock = _chunkXJDB564Acjs.generateFarmDocsAdapterClientRuntime.call(void 0,
6074
+ docsAdapterUI,
6075
+ docsConfigModule,
6076
+ // Config resolution keeps an adapter to its UI's renderer, so this is the UI's renderer too.
6077
+ _chunk3OKSEJ33cjs.isReactRenderer.call(void 0, renderer) ? void 0 : renderer.client
6047
6078
  );
6048
- const isolatedHydrationRuntime = isolatedHydrationEnabled ? `const farmIsolatedHydrationRuntime = createFarmIsolatedHydrationRuntime({
6079
+ const isolatedHydrationRuntime = rendererIslands ? `const farmIsolatedHydrationRuntime = createFarmRendererIslandRuntime({
6080
+ renderer: React,
6081
+ load: (reference) => import(/* @vite-ignore */ farmModuleUrl(reference)),
6082
+ schedule: scheduleFarmIslandHydration,
6083
+ });
6084
+ window.__FARM_ISOLATED_HYDRATION_RUNTIME__ = farmIsolatedHydrationRuntime;
6085
+ // A hydrating layout keeps a page that doesn't hydrate as server HTML in a plain element. The
6086
+ // renderer's root never renders the page's islands, so the runtime starts them after each render.
6087
+ const FarmServerPage = 'div';
6088
+ // Island modules reach the browser as written, so a client tree has nothing to mark.
6089
+ function wrapFarmIsolatedClientGraph(_React, element) { return element; }
6090
+
6091
+ function disposeFarmIsolatedClientBoundaries(scope) {
6092
+ farmIsolatedHydrationRuntime.dispose(scope);
6093
+ }
6094
+
6095
+ async function hydrateFarmIsolatedClientBoundaries(scope = document, signal) {
6096
+ await farmIsolatedHydrationRuntime.hydrate(scope, signal);
6097
+ }
6098
+
6099
+ // After a hydrating layout renders another page: release the islands whose markup it replaced,
6100
+ // and start the new page's.
6101
+ async function hydrateFarmLayoutPageIslands(container) {
6102
+ farmIsolatedHydrationRuntime.prune();
6103
+ await hydrateFarmIsolatedClientBoundaries(container);
6104
+ }
6105
+
6106
+ async function createFarmServerTreePageElement() { return null; }
6107
+ async function buildFarmTreeLayouts() { return true; }
6108
+ function getFarmTreeLayoutComponent() { return null; }
6109
+ let farmLastRouteState = null;
6110
+ function rerenderFarmTreeLayouts() {}` : isolatedHydrationEnabled ? `const farmIsolatedHydrationRuntime = createFarmIsolatedHydrationRuntime({
6049
6111
  ReactRuntime: React,
6050
6112
  hydrateRoot,
6051
6113
  load: (reference) => import(/* @vite-ignore */ farmModuleUrl(reference)),
@@ -6078,7 +6140,7 @@ async function createFarmServerTreePageElement(source, pathname) {
6078
6140
  return null;
6079
6141
  }
6080
6142
  }
6081
- ${islandValues ? `${_chunkARORZ3MHcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6143
+ ${islandValues ? `${_chunkOFVBMS6Icjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6082
6144
  let farmLastRouteState = null;
6083
6145
 
6084
6146
  // A hot update to a layout tree's client module renders the route again.
@@ -6919,7 +6981,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
6919
6981
  return loadedLayouts;
6920
6982
  }
6921
6983
 
6922
- ${_chunkARORZ3MHcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6984
+ ${_chunkOFVBMS6Icjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6923
6985
  function wrapWithLoadedLayouts(element, loadedLayouts, params) {
6924
6986
  let wrapped = element;
6925
6987
  for (let index = loadedLayouts.length - 1; index >= 0; index--) {
@@ -6998,7 +7060,7 @@ async function buildWrappedHydrationElement(PageComponent, pageProps, layouts =
6998
7060
 
6999
7061
  function hydrateFarmRoute(container, route) {
7000
7062
  farmLastRouteState = route;
7001
- ${_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) ? "return hydrateRoot(container, route.element);" : "return route.layouts.length > 0 ? hydrateRoot(container, route.element, route) : hydrateRoot(container, route.element);"}
7063
+ ${_chunk3OKSEJ33cjs.isReactRenderer.call(void 0, renderer) ? "return hydrateRoot(container, route.element);" : "return route.layouts.length > 0 ? hydrateRoot(container, route.element, route) : hydrateRoot(container, route.element);"}
7002
7064
  }
7003
7065
 
7004
7066
  function renderFarmRoute(root, route) {
@@ -7142,7 +7204,7 @@ async function tryHydrateImportedPage(
7142
7204
  wrap: wrapFarmClientRouteGraph,
7143
7205
  };
7144
7206
  } else if (useHydrate && container?.id === '__farm_page__') {
7145
- wrappedElement = wrapFarmClientRouteGraph(${_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) ? "restorePagePosition(React, container, pageElement)" : "pageElement"});
7207
+ wrappedElement = wrapFarmClientRouteGraph(${_chunk3OKSEJ33cjs.isReactRenderer.call(void 0, renderer) ? "restorePagePosition(React, container, pageElement)" : "pageElement"});
7146
7208
  } else {
7147
7209
  wrappedElement = await buildWrappedHydrationElement(
7148
7210
  currentPageComponent,
@@ -7219,7 +7281,7 @@ function readActiveLayoutPatterns() {
7219
7281
  );
7220
7282
  }
7221
7283
 
7222
- ${_chunkARORZ3MHcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7284
+ ${_chunkOFVBMS6Icjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7223
7285
 
7224
7286
  function activateFragmentScripts(root) {
7225
7287
  for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
@@ -7278,7 +7340,7 @@ function getLayoutShell(root, patterns, index, find) {
7278
7340
  return shell.innerHTML;
7279
7341
  }
7280
7342
 
7281
- ${islandValues ? _chunkARORZ3MHcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7343
+ ${islandValues ? _chunkOFVBMS6Icjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7282
7344
  container,
7283
7345
  fragment,
7284
7346
  currentPatterns,
@@ -7353,9 +7415,9 @@ ${islandValues ? `
7353
7415
  return nextTarget;
7354
7416
  }
7355
7417
 
7356
- ${islandValues ? `${_chunkARORZ3MHcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7418
+ ${islandValues ? `${_chunkOFVBMS6Icjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7357
7419
 
7358
- ${_chunkARORZ3MHcjs.FARM_EARLY_NAVIGATION_SOURCE}
7420
+ ${_chunkOFVBMS6Icjs.FARM_EARLY_NAVIGATION_SOURCE}
7359
7421
 
7360
7422
  // Islands mode navigates as the production client does: it fetches the page itself, names the
7361
7423
  // layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
@@ -7674,6 +7736,7 @@ async function renderPage(pageData, info) {
7674
7736
  loadingModulePath: route.loadingModulePath,
7675
7737
  },
7676
7738
  );
7739
+ ${rendererIslands ? "await hydrateFarmLayoutPageIslands(container);" : ""}
7677
7740
  } else {
7678
7741
  ${isolatedHydrationEnabled ? "let isolatedHydrationScope = container;" : ""}
7679
7742
  ${islandValues ? "const keepValues = keepFarmIslandValues(container);" : ""}
@@ -7696,7 +7759,7 @@ async function renderPage(pageData, info) {
7696
7759
 
7697
7760
  const hydrationController = new AbortController();
7698
7761
  if (
7699
- shouldHydrate${isolatedHydrationEnabled ? " || (hasIsolatedClientBoundaries && !layoutShouldHydrate)" : ""}
7762
+ shouldHydrate${rendererIslands ? " || hasIsolatedClientBoundaries" : isolatedHydrationEnabled ? " || (hasIsolatedClientBoundaries && !layoutShouldHydrate)" : ""}
7700
7763
  ) {
7701
7764
  pendingPageHydrationController = hydrationController;
7702
7765
  }
@@ -7734,7 +7797,7 @@ async function renderPage(pageData, info) {
7734
7797
  });
7735
7798
  }
7736
7799
  }
7737
- ${isolatedHydrationEnabled ? `if (hasIsolatedClientBoundaries && !layoutShouldHydrate) {
7800
+ ${isolatedHydrationEnabled ? `if (hasIsolatedClientBoundaries${rendererIslands ? "" : " && !layoutShouldHydrate"}) {
7738
7801
  await hydrateFarmIsolatedClientBoundaries(
7739
7802
  isolatedHydrationScope,
7740
7803
  hydrationController.signal,
@@ -7953,8 +8016,7 @@ function farmIslandsOnlyDocument() {
7953
8016
  },
7954
8017
  });
7955
8018
  ${isolatedHydrationEnabled ? `const isolatedHydration =
7956
- hasIsolatedClientBoundaries &&
7957
- !layoutShouldHydrate
8019
+ hasIsolatedClientBoundaries${rendererIslands ? "" : " &&\n !layoutShouldHydrate"}
7958
8020
  ? hydrateFarmIsolatedClientBoundaries(rootContainer, hydrationController.signal)
7959
8021
  : Promise.resolve();
7960
8022
  await Promise.all([pageHydration, isolatedHydration]);` : "await pageHydration;"}
@@ -8062,7 +8124,7 @@ function generateClientManifest(bundle) {
8062
8124
  async function defineConfig(config = {}) {
8063
8125
  const tailwindVitePlugin = await _chunkDMSXZNQRcjs.loadTailwindVitePlugin.call(void 0, );
8064
8126
  const appRoot = path6.resolve(config.root || process.cwd());
8065
- if (_optionalChain([config, 'access', _505 => _505.extends, 'optionalAccess', _506 => _506.length])) {
8127
+ if (_optionalChain([config, 'access', _511 => _511.extends, 'optionalAccess', _512 => _512.length])) {
8066
8128
  const { config: layeredConfig } = await import("./layers-XLOMMQP7.cjs").then(
8067
8129
  ({ resolveFarmLayers }) => resolveFarmLayers(config, {
8068
8130
  root: appRoot,
@@ -8071,12 +8133,12 @@ async function defineConfig(config = {}) {
8071
8133
  );
8072
8134
  config = layeredConfig;
8073
8135
  }
8074
- config.renderer = _chunkBCTHOQPPcjs.resolveFarmRenderer.call(void 0, config.renderer);
8075
- config.images = _chunkARORZ3MHcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
8076
- const rendererVitePlugins = await _chunkBCTHOQPPcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
8136
+ config.renderer = _chunk3OKSEJ33cjs.resolveFarmRenderer.call(void 0, config.renderer);
8137
+ config.images = _chunkOFVBMS6Icjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
8138
+ const rendererVitePlugins = await _chunk3OKSEJ33cjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
8077
8139
  ssr: true
8078
8140
  });
8079
- const reactRefreshPlugins = _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkY2FEFQAYcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
8141
+ const reactRefreshPlugins = _chunk3OKSEJ33cjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkY2FEFQAYcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
8080
8142
  const nodeBuiltinStubs = {
8081
8143
  "node:string_decoder": "data:text/javascript,export class StringDecoder { write(buf) { return ''; } end() { return ''; } }; export default StringDecoder;",
8082
8144
  "node:buffer": "data:text/javascript,export const Buffer = { from: () => ({}), alloc: () => ({}), isBuffer: () => false }; export default { Buffer };",
@@ -8164,13 +8226,13 @@ async function defineConfig(config = {}) {
8164
8226
  if (!serverStarted) {
8165
8227
  serverStarted = true;
8166
8228
  const elapsed = Date.now() - startTime;
8167
- const address = _optionalChain([server, 'access', _507 => _507.httpServer, 'optionalAccess', _508 => _508.address, 'call', _509 => _509()]);
8229
+ const address = _optionalChain([server, 'access', _513 => _513.httpServer, 'optionalAccess', _514 => _514.address, 'call', _515 => _515()]);
8168
8230
  const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
8169
8231
  const hostConfig = server.config.server.host;
8170
8232
  const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
8171
8233
  console.log("");
8172
8234
  console.log(
8173
- ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkJK26IMT7cjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8235
+ ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkCVZY4TLWcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8174
8236
  );
8175
8237
  console.log("");
8176
8238
  console.log(
@@ -8204,7 +8266,7 @@ async function defineConfig(config = {}) {
8204
8266
  plugins: [
8205
8267
  // `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
8206
8268
  _chunkY2FEFQAYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
8207
- _chunkARORZ3MHcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8269
+ _chunkOFVBMS6Icjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8208
8270
  tailwindVitePlugin,
8209
8271
  ...rendererVitePlugins,
8210
8272
  ...reactRefreshPlugins,
@@ -8214,14 +8276,14 @@ async function defineConfig(config = {}) {
8214
8276
  farmNavigationPlugin(config.renderer),
8215
8277
  farmIslandContainersPlugin(config),
8216
8278
  farmPlugin(config),
8217
- _chunkDRO3NXA3cjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8279
+ _chunkEBSL5TW7cjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8218
8280
  farmBrandingPlugin
8219
8281
  ],
8220
8282
  customLogger: farmLogger,
8221
8283
  clearScreen: false,
8222
8284
  optimizeDeps: {
8223
- ..._chunkARORZ3MHcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8224
- _chunkARORZ3MHcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8285
+ ..._chunkOFVBMS6Icjs.createFarmClientOptimizeDepsConfig.call(void 0,
8286
+ _chunkOFVBMS6Icjs.createFarmClientOptimizeDepsEntries.call(void 0,
8225
8287
  appRoot,
8226
8288
  _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
8227
8289
  ),
@@ -8265,7 +8327,7 @@ async function defineConfig(config = {}) {
8265
8327
  // Stub out problematic server-only modules during dev mode
8266
8328
  alias: {
8267
8329
  ..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, config.layers),
8268
- ..._chunkARORZ3MHcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8330
+ ..._chunkOFVBMS6Icjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8269
8331
  // Nitro internals that should not be resolved in browser
8270
8332
  "supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
8271
8333
  "@poppinss/dumper": "data:text/javascript,export default {};",